summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-11-29 01:46:27 +0100
committerkali kaneko (leap communications) <kali@leap.se>2021-11-29 18:14:16 +0100
commit18f52af5be3a9a0c73811706108f790d65ee9c67 (patch)
treee13cbacb47d56919caa9c44a2b45dec1497a7860
parentebcef0d57b6ecb5a40c6579f6be07182dd3033ba (diff)
[pkg] update vendor
-rw-r--r--go.mod12
-rw-r--r--go.sum520
-rw-r--r--vendor/git.torproject.org/pluggable-transports/goptlib.git/.gitignore2
-rw-r--r--vendor/git.torproject.org/pluggable-transports/goptlib.git/COPYING121
-rw-r--r--vendor/git.torproject.org/pluggable-transports/goptlib.git/ChangeLog60
-rw-r--r--vendor/git.torproject.org/pluggable-transports/goptlib.git/README27
-rw-r--r--vendor/git.torproject.org/pluggable-transports/goptlib.git/args.go219
-rw-r--r--vendor/git.torproject.org/pluggable-transports/goptlib.git/pt.go1033
-rw-r--r--vendor/git.torproject.org/pluggable-transports/goptlib.git/socks.go507
-rw-r--r--vendor/git.torproject.org/pluggable-transports/goptlib.git/test_authcookie2
-rw-r--r--vendor/git.torproject.org/pluggable-transports/snowflake.git/LICENSE32
-rw-r--r--vendor/git.torproject.org/pluggable-transports/snowflake.git/common/encapsulation/encapsulation.go194
-rw-r--r--vendor/git.torproject.org/pluggable-transports/snowflake.git/common/nat/nat.go246
-rw-r--r--vendor/git.torproject.org/pluggable-transports/snowflake.git/common/safelog/log.go71
-rw-r--r--vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/clientid.go28
-rw-r--r--vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/clientmap.go145
-rw-r--r--vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/consts.go17
-rw-r--r--vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/queuepacketconn.go137
-rw-r--r--vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/redialpacketconn.go204
-rw-r--r--vendor/git.torproject.org/pluggable-transports/snowflake.git/common/util/util.go99
-rw-r--r--vendor/github.com/cretz/bine/LICENSE21
-rw-r--r--vendor/github.com/cretz/bine/control/cmd_authenticate.go108
-rw-r--r--vendor/github.com/cretz/bine/control/cmd_circuit.go38
-rw-r--r--vendor/github.com/cretz/bine/control/cmd_conf.go65
-rw-r--r--vendor/github.com/cretz/bine/control/cmd_event.go1218
-rw-r--r--vendor/github.com/cretz/bine/control/cmd_hiddenservice.go23
-rw-r--r--vendor/github.com/cretz/bine/control/cmd_misc.go92
-rw-r--r--vendor/github.com/cretz/bine/control/cmd_onion.go201
-rw-r--r--vendor/github.com/cretz/bine/control/cmd_protocolinfo.go76
-rw-r--r--vendor/github.com/cretz/bine/control/cmd_stream.go31
-rw-r--r--vendor/github.com/cretz/bine/control/conn.go102
-rw-r--r--vendor/github.com/cretz/bine/control/doc.go10
-rw-r--r--vendor/github.com/cretz/bine/control/keyval.go40
-rw-r--r--vendor/github.com/cretz/bine/control/response.go106
-rw-r--r--vendor/github.com/cretz/bine/control/status.go64
-rw-r--r--vendor/github.com/cretz/bine/process/process.go82
-rw-r--r--vendor/github.com/cretz/bine/tor/dialer.go111
-rw-r--r--vendor/github.com/cretz/bine/tor/doc.go7
-rw-r--r--vendor/github.com/cretz/bine/tor/listen.go343
-rw-r--r--vendor/github.com/cretz/bine/tor/log.go16
-rw-r--r--vendor/github.com/cretz/bine/tor/tor.go453
-rw-r--r--vendor/github.com/cretz/bine/torutil/doc.go2
-rw-r--r--vendor/github.com/cretz/bine/torutil/ed25519/ed25519.go189
-rw-r--r--vendor/github.com/cretz/bine/torutil/ed25519/internal/edwards25519/README.md1
-rw-r--r--vendor/github.com/cretz/bine/torutil/ed25519/internal/edwards25519/const.go1422
-rw-r--r--vendor/github.com/cretz/bine/torutil/ed25519/internal/edwards25519/edwards25519.go1793
-rw-r--r--vendor/github.com/cretz/bine/torutil/key.go85
-rw-r--r--vendor/github.com/cretz/bine/torutil/string.go112
-rw-r--r--vendor/github.com/google/uuid/.travis.yml9
-rw-r--r--vendor/github.com/google/uuid/CONTRIBUTING.md10
-rw-r--r--vendor/github.com/google/uuid/CONTRIBUTORS9
-rw-r--r--vendor/github.com/google/uuid/LICENSE27
-rw-r--r--vendor/github.com/google/uuid/README.md19
-rw-r--r--vendor/github.com/google/uuid/dce.go80
-rw-r--r--vendor/github.com/google/uuid/doc.go12
-rw-r--r--vendor/github.com/google/uuid/go.mod1
-rw-r--r--vendor/github.com/google/uuid/hash.go53
-rw-r--r--vendor/github.com/google/uuid/marshal.go38
-rw-r--r--vendor/github.com/google/uuid/node.go90
-rw-r--r--vendor/github.com/google/uuid/node_js.go12
-rw-r--r--vendor/github.com/google/uuid/node_net.go33
-rw-r--r--vendor/github.com/google/uuid/sql.go59
-rw-r--r--vendor/github.com/google/uuid/time.go123
-rw-r--r--vendor/github.com/google/uuid/util.go43
-rw-r--r--vendor/github.com/google/uuid/uuid.go251
-rw-r--r--vendor/github.com/google/uuid/version1.go44
-rw-r--r--vendor/github.com/google/uuid/version4.go51
-rw-r--r--vendor/github.com/gopherjs/gopherjs/LICENSE24
-rw-r--r--vendor/github.com/gopherjs/gopherjs/js/js.go168
-rw-r--r--vendor/github.com/jtolds/gls/LICENSE18
-rw-r--r--vendor/github.com/jtolds/gls/README.md89
-rw-r--r--vendor/github.com/jtolds/gls/context.go153
-rw-r--r--vendor/github.com/jtolds/gls/gen_sym.go21
-rw-r--r--vendor/github.com/jtolds/gls/gid.go25
-rw-r--r--vendor/github.com/jtolds/gls/id_pool.go34
-rw-r--r--vendor/github.com/jtolds/gls/stack_tags.go147
-rw-r--r--vendor/github.com/jtolds/gls/stack_tags_js.go75
-rw-r--r--vendor/github.com/jtolds/gls/stack_tags_main.go30
-rw-r--r--vendor/github.com/klauspost/cpuid/.gitignore24
-rw-r--r--vendor/github.com/klauspost/cpuid/.travis.yml46
-rw-r--r--vendor/github.com/klauspost/cpuid/CONTRIBUTING.txt35
-rw-r--r--vendor/github.com/klauspost/cpuid/LICENSE22
-rw-r--r--vendor/github.com/klauspost/cpuid/README.md191
-rw-r--r--vendor/github.com/klauspost/cpuid/cpuid.go1504
-rw-r--r--vendor/github.com/klauspost/cpuid/cpuid_386.s42
-rw-r--r--vendor/github.com/klauspost/cpuid/cpuid_amd64.s42
-rw-r--r--vendor/github.com/klauspost/cpuid/cpuid_arm64.s26
-rw-r--r--vendor/github.com/klauspost/cpuid/detect_arm64.go219
-rw-r--r--vendor/github.com/klauspost/cpuid/detect_intel.go33
-rw-r--r--vendor/github.com/klauspost/cpuid/detect_ref.go14
-rw-r--r--vendor/github.com/klauspost/cpuid/go.mod3
-rw-r--r--vendor/github.com/klauspost/reedsolomon/.gitignore26
-rw-r--r--vendor/github.com/klauspost/reedsolomon/.travis.yml77
-rw-r--r--vendor/github.com/klauspost/reedsolomon/LICENSE23
-rw-r--r--vendor/github.com/klauspost/reedsolomon/README.md395
-rw-r--r--vendor/github.com/klauspost/reedsolomon/appveyor.yml20
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galois.go929
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galoisAvx512_amd64.go338
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galoisAvx512_amd64.s400
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galois_amd64.go138
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galois_amd64.s368
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galois_arm64.go67
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galois_arm64.s125
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galois_gen_amd64.go408
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galois_gen_amd64.s18526
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galois_gen_none.go11
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galois_gen_switch_amd64.go293
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galois_noasm.go44
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galois_notamd64.go13
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galois_ppc64le.go75
-rw-r--r--vendor/github.com/klauspost/reedsolomon/galois_ppc64le.s124
-rw-r--r--vendor/github.com/klauspost/reedsolomon/gen.go249
-rw-r--r--vendor/github.com/klauspost/reedsolomon/go.mod7
-rw-r--r--vendor/github.com/klauspost/reedsolomon/go.sum2
-rw-r--r--vendor/github.com/klauspost/reedsolomon/inversion_tree.go160
-rw-r--r--vendor/github.com/klauspost/reedsolomon/matrix.go279
-rw-r--r--vendor/github.com/klauspost/reedsolomon/options.go175
-rw-r--r--vendor/github.com/klauspost/reedsolomon/reedsolomon.go1011
-rw-r--r--vendor/github.com/klauspost/reedsolomon/streaming.go603
-rw-r--r--vendor/github.com/mmcloughlin/avo/LICENSE29
-rw-r--r--vendor/github.com/mmcloughlin/avo/attr/attr.go102
-rw-r--r--vendor/github.com/mmcloughlin/avo/buildtags/buildtags.go312
-rw-r--r--vendor/github.com/mmcloughlin/avo/gotypes/components.go253
-rw-r--r--vendor/github.com/mmcloughlin/avo/gotypes/doc.go2
-rw-r--r--vendor/github.com/mmcloughlin/avo/gotypes/signature.go177
-rw-r--r--vendor/github.com/mmcloughlin/avo/internal/prnt/printer.go60
-rw-r--r--vendor/github.com/mmcloughlin/avo/internal/stack/stack.go73
-rw-r--r--vendor/github.com/mmcloughlin/avo/ir/doc.go2
-rw-r--r--vendor/github.com/mmcloughlin/avo/ir/ir.go355
-rw-r--r--vendor/github.com/mmcloughlin/avo/operand/checks.go247
-rw-r--r--vendor/github.com/mmcloughlin/avo/operand/const.go36
-rw-r--r--vendor/github.com/mmcloughlin/avo/operand/doc.go2
-rw-r--r--vendor/github.com/mmcloughlin/avo/operand/types.go151
-rw-r--r--vendor/github.com/mmcloughlin/avo/operand/zconst.go75
-rw-r--r--vendor/github.com/mmcloughlin/avo/pass/alloc.go190
-rw-r--r--vendor/github.com/mmcloughlin/avo/pass/cfg.go81
-rw-r--r--vendor/github.com/mmcloughlin/avo/pass/cleanup.go123
-rw-r--r--vendor/github.com/mmcloughlin/avo/pass/isa.go31
-rw-r--r--vendor/github.com/mmcloughlin/avo/pass/pass.go100
-rw-r--r--vendor/github.com/mmcloughlin/avo/pass/reg.go139
-rw-r--r--vendor/github.com/mmcloughlin/avo/pass/textflag.go42
-rw-r--r--vendor/github.com/mmcloughlin/avo/pass/verify.go32
-rw-r--r--vendor/github.com/mmcloughlin/avo/printer/goasm.go186
-rw-r--r--vendor/github.com/mmcloughlin/avo/printer/printer.go98
-rw-r--r--vendor/github.com/mmcloughlin/avo/printer/stubs.go45
-rw-r--r--vendor/github.com/mmcloughlin/avo/reg/collection.go54
-rw-r--r--vendor/github.com/mmcloughlin/avo/reg/doc.go2
-rw-r--r--vendor/github.com/mmcloughlin/avo/reg/set.go112
-rw-r--r--vendor/github.com/mmcloughlin/avo/reg/types.go304
-rw-r--r--vendor/github.com/mmcloughlin/avo/reg/x86.go331
-rw-r--r--vendor/github.com/mmcloughlin/avo/src/src.go62
-rw-r--r--vendor/github.com/mmcloughlin/avo/x86/doc.go2
-rw-r--r--vendor/github.com/mmcloughlin/avo/x86/gen.go4
-rw-r--r--vendor/github.com/mmcloughlin/avo/x86/zctors.go34629
-rw-r--r--vendor/github.com/pion/datachannel/.gitignore2
-rw-r--r--vendor/github.com/pion/datachannel/.golangci.yml8
-rw-r--r--vendor/github.com/pion/datachannel/DESIGN.md20
-rw-r--r--vendor/github.com/pion/datachannel/LICENSE21
-rw-r--r--vendor/github.com/pion/datachannel/README.md45
-rw-r--r--vendor/github.com/pion/datachannel/codecov.yml20
-rw-r--r--vendor/github.com/pion/datachannel/datachannel.go378
-rw-r--r--vendor/github.com/pion/datachannel/go.mod11
-rw-r--r--vendor/github.com/pion/datachannel/go.sum38
-rw-r--r--vendor/github.com/pion/datachannel/message.go94
-rw-r--r--vendor/github.com/pion/datachannel/message_channel_ack.go22
-rw-r--r--vendor/github.com/pion/datachannel/message_channel_open.go123
-rw-r--r--vendor/github.com/pion/datachannel/renovate.json15
-rw-r--r--vendor/github.com/pion/dtls/v2/.editorconfig21
-rw-r--r--vendor/github.com/pion/dtls/v2/.gitignore24
-rw-r--r--vendor/github.com/pion/dtls/v2/.golangci.yml89
-rw-r--r--vendor/github.com/pion/dtls/v2/LICENSE21
-rw-r--r--vendor/github.com/pion/dtls/v2/Makefile6
-rw-r--r--vendor/github.com/pion/dtls/v2/README.md155
-rw-r--r--vendor/github.com/pion/dtls/v2/certificate.go67
-rw-r--r--vendor/github.com/pion/dtls/v2/cipher_suite.go213
-rw-r--r--vendor/github.com/pion/dtls/v2/cipher_suite_go114.go40
-rw-r--r--vendor/github.com/pion/dtls/v2/codecov.yml20
-rw-r--r--vendor/github.com/pion/dtls/v2/compression_method.go9
-rw-r--r--vendor/github.com/pion/dtls/v2/config.go193
-rw-r--r--vendor/github.com/pion/dtls/v2/conn.go978
-rw-r--r--vendor/github.com/pion/dtls/v2/crypto.go221
-rw-r--r--vendor/github.com/pion/dtls/v2/dtls.go2
-rw-r--r--vendor/github.com/pion/dtls/v2/errors.go141
-rw-r--r--vendor/github.com/pion/dtls/v2/errors_errno.go25
-rw-r--r--vendor/github.com/pion/dtls/v2/errors_noerrno.go14
-rw-r--r--vendor/github.com/pion/dtls/v2/flight.go75
-rw-r--r--vendor/github.com/pion/dtls/v2/flight0handler.go102
-rw-r--r--vendor/github.com/pion/dtls/v2/flight1handler.go112
-rw-r--r--vendor/github.com/pion/dtls/v2/flight2handler.go61
-rw-r--r--vendor/github.com/pion/dtls/v2/flight3handler.go194
-rw-r--r--vendor/github.com/pion/dtls/v2/flight4handler.go337
-rw-r--r--vendor/github.com/pion/dtls/v2/flight5handler.go323
-rw-r--r--vendor/github.com/pion/dtls/v2/flight6handler.go82
-rw-r--r--vendor/github.com/pion/dtls/v2/flighthandler.go57
-rw-r--r--vendor/github.com/pion/dtls/v2/fragment_buffer.go111
-rw-r--r--vendor/github.com/pion/dtls/v2/fuzz.go38
-rw-r--r--vendor/github.com/pion/dtls/v2/go.mod12
-rw-r--r--vendor/github.com/pion/dtls/v2/go.sum48
-rw-r--r--vendor/github.com/pion/dtls/v2/handshake_cache.go171
-rw-r--r--vendor/github.com/pion/dtls/v2/handshaker.go334
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/ciphersuite/aes_128_ccm.go108
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/ciphersuite/ciphersuite.go71
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_128_ccm.go11
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_128_ccm8.go11
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_128_gcm_sha256.go92
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_256_cbc_sha.go101
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_rsa_with_aes_128_gcm_sha256.go22
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_rsa_with_aes_256_cbc_sha.go22
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_cbc_sha256.go100
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_ccm.go11
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_ccm8.go11
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_gcm_sha256.go27
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/closer/closer.go45
-rw-r--r--vendor/github.com/pion/dtls/v2/internal/util/util.go39
-rw-r--r--vendor/github.com/pion/dtls/v2/listener.go80
-rw-r--r--vendor/github.com/pion/dtls/v2/packet.go9
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/ccm/ccm.go251
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/cbc.go164
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/ccm.go104
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/ciphersuite.go72
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/gcm.go100
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/clientcertificate/client_certificate.go22
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/elliptic/elliptic.go99
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/fingerprint/fingerprint.go50
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/fingerprint/hash.go37
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/hash/hash.go126
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/prf/prf.go224
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/signature/signature.go24
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/signaturehash/errors.go9
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/crypto/signaturehash/signaturehash.go93
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/alert/alert.go160
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/application_data.go26
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/change_cipher_spec.go28
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/compression_method.go48
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/content.go21
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/errors.go104
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/extension/errors.go14
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/extension/extension.go96
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/extension/renegotiation_info.go43
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/extension/server_name.go78
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/extension/srtp_protection_profile.go21
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/extension/supported_elliptic_curves.go62
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/extension/supported_point_formats.go62
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/extension/supported_signature_algorithms.go70
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/extension/use_master_secret.go45
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/extension/use_srtp.go59
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/cipher_suite.go29
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/errors.go25
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/handshake.go145
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/header.go50
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_certificate.go66
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_certificate_request.go100
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_certificate_verify.go61
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_client_hello.go125
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_client_key_exchange.go56
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_finished.go27
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_hello_verify_request.go62
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_server_hello.go106
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_server_hello_done.go22
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_server_key_exchange.go119
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/random.go49
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/recordlayer/errors.go16
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/recordlayer/header.go61
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/recordlayer/recordlayer.go99
-rw-r--r--vendor/github.com/pion/dtls/v2/pkg/protocol/version.go21
-rw-r--r--vendor/github.com/pion/dtls/v2/renovate.json15
-rw-r--r--vendor/github.com/pion/dtls/v2/resume.go19
-rw-r--r--vendor/github.com/pion/dtls/v2/srtp_protection_profile.go14
-rw-r--r--vendor/github.com/pion/dtls/v2/state.go194
-rw-r--r--vendor/github.com/pion/dtls/v2/util.go38
-rw-r--r--vendor/github.com/pion/ice/v2/.gitignore24
-rw-r--r--vendor/github.com/pion/ice/v2/.golangci.yml89
-rw-r--r--vendor/github.com/pion/ice/v2/LICENSE21
-rw-r--r--vendor/github.com/pion/ice/v2/README.md67
-rw-r--r--vendor/github.com/pion/ice/v2/agent.go1233
-rw-r--r--vendor/github.com/pion/ice/v2/agent_config.go252
-rw-r--r--vendor/github.com/pion/ice/v2/agent_stats.go113
-rw-r--r--vendor/github.com/pion/ice/v2/candidate.go68
-rw-r--r--vendor/github.com/pion/ice/v2/candidate_base.go496
-rw-r--r--vendor/github.com/pion/ice/v2/candidate_host.go76
-rw-r--r--vendor/github.com/pion/ice/v2/candidate_peer_reflexive.go60
-rw-r--r--vendor/github.com/pion/ice/v2/candidate_relay.go73
-rw-r--r--vendor/github.com/pion/ice/v2/candidate_server_reflexive.go59
-rw-r--r--vendor/github.com/pion/ice/v2/candidatepair.go98
-rw-r--r--vendor/github.com/pion/ice/v2/candidatepair_state.go37
-rw-r--r--vendor/github.com/pion/ice/v2/candidaterelatedaddress.go30
-rw-r--r--vendor/github.com/pion/ice/v2/candidatetype.go62
-rw-r--r--vendor/github.com/pion/ice/v2/codecov.yml20
-rw-r--r--vendor/github.com/pion/ice/v2/context.go37
-rw-r--r--vendor/github.com/pion/ice/v2/errors.go132
-rw-r--r--vendor/github.com/pion/ice/v2/external_ip_mapper.go143
-rw-r--r--vendor/github.com/pion/ice/v2/gather.go497
-rw-r--r--vendor/github.com/pion/ice/v2/go.mod16
-rw-r--r--vendor/github.com/pion/ice/v2/go.sum60
-rw-r--r--vendor/github.com/pion/ice/v2/ice.go76
-rw-r--r--vendor/github.com/pion/ice/v2/icecontrol.go87
-rw-r--r--vendor/github.com/pion/ice/v2/mdns.go63
-rw-r--r--vendor/github.com/pion/ice/v2/networktype.go130
-rw-r--r--vendor/github.com/pion/ice/v2/priority.go33
-rw-r--r--vendor/github.com/pion/ice/v2/rand.go53
-rw-r--r--vendor/github.com/pion/ice/v2/renovate.json15
-rw-r--r--vendor/github.com/pion/ice/v2/role.go43
-rw-r--r--vendor/github.com/pion/ice/v2/selection.go287
-rw-r--r--vendor/github.com/pion/ice/v2/stats.go177
-rw-r--r--vendor/github.com/pion/ice/v2/stun.go24
-rw-r--r--vendor/github.com/pion/ice/v2/tcp_mux.go295
-rw-r--r--vendor/github.com/pion/ice/v2/tcp_packet_conn.go240
-rw-r--r--vendor/github.com/pion/ice/v2/tcptype.go48
-rw-r--r--vendor/github.com/pion/ice/v2/transport.go145
-rw-r--r--vendor/github.com/pion/ice/v2/url.go225
-rw-r--r--vendor/github.com/pion/ice/v2/usecandidate.go23
-rw-r--r--vendor/github.com/pion/ice/v2/util.go233
-rw-r--r--vendor/github.com/pion/interceptor/.gitignore24
-rw-r--r--vendor/github.com/pion/interceptor/.golangci.yml89
-rw-r--r--vendor/github.com/pion/interceptor/LICENSE21
-rw-r--r--vendor/github.com/pion/interceptor/README.md81
-rw-r--r--vendor/github.com/pion/interceptor/chain.go75
-rw-r--r--vendor/github.com/pion/interceptor/codecov.yml20
-rw-r--r--vendor/github.com/pion/interceptor/errors.go51
-rw-r--r--vendor/github.com/pion/interceptor/go.mod10
-rw-r--r--vendor/github.com/pion/interceptor/go.sum21
-rw-r--r--vendor/github.com/pion/interceptor/interceptor.go108
-rw-r--r--vendor/github.com/pion/interceptor/noop.go40
-rw-r--r--vendor/github.com/pion/interceptor/pkg/nack/errors.go6
-rw-r--r--vendor/github.com/pion/interceptor/pkg/nack/generator_interceptor.go162
-rw-r--r--vendor/github.com/pion/interceptor/pkg/nack/generator_option.go44
-rw-r--r--vendor/github.com/pion/interceptor/pkg/nack/nack.go14
-rw-r--r--vendor/github.com/pion/interceptor/pkg/nack/receive_log.go134
-rw-r--r--vendor/github.com/pion/interceptor/pkg/nack/responder_interceptor.go119
-rw-r--r--vendor/github.com/pion/interceptor/pkg/nack/responder_option.go23
-rw-r--r--vendor/github.com/pion/interceptor/pkg/nack/send_buffer.go74
-rw-r--r--vendor/github.com/pion/interceptor/pkg/report/receiver_interceptor.go166
-rw-r--r--vendor/github.com/pion/interceptor/pkg/report/receiver_option.go34
-rw-r--r--vendor/github.com/pion/interceptor/pkg/report/receiver_stream.go159
-rw-r--r--vendor/github.com/pion/interceptor/pkg/report/report.go2
-rw-r--r--vendor/github.com/pion/interceptor/pkg/report/sender_interceptor.go139
-rw-r--r--vendor/github.com/pion/interceptor/pkg/report/sender_option.go34
-rw-r--r--vendor/github.com/pion/interceptor/pkg/report/sender_stream.go37
-rw-r--r--vendor/github.com/pion/interceptor/registry.go20
-rw-r--r--vendor/github.com/pion/interceptor/renovate.json15
-rw-r--r--vendor/github.com/pion/interceptor/streaminfo.go34
-rw-r--r--vendor/github.com/pion/logging/.golangci.yml13
-rw-r--r--vendor/github.com/pion/logging/.travis.yml19
-rw-r--r--vendor/github.com/pion/logging/LICENSE21
-rw-r--r--vendor/github.com/pion/logging/README.md41
-rw-r--r--vendor/github.com/pion/logging/go.mod3
-rw-r--r--vendor/github.com/pion/logging/go.sum0
-rw-r--r--vendor/github.com/pion/logging/logger.go228
-rw-r--r--vendor/github.com/pion/logging/scoped.go72
-rw-r--r--vendor/github.com/pion/mdns/.golangci.yml13
-rw-r--r--vendor/github.com/pion/mdns/.travis.yml19
-rw-r--r--vendor/github.com/pion/mdns/LICENSE21
-rw-r--r--vendor/github.com/pion/mdns/README.md63
-rw-r--r--vendor/github.com/pion/mdns/config.go27
-rw-r--r--vendor/github.com/pion/mdns/conn.go316
-rw-r--r--vendor/github.com/pion/mdns/errors.go10
-rw-r--r--vendor/github.com/pion/mdns/go.mod9
-rw-r--r--vendor/github.com/pion/mdns/go.sum16
-rw-r--r--vendor/github.com/pion/mdns/renovate.json15
-rw-r--r--vendor/github.com/pion/randutil/.travis.yml142
-rw-r--r--vendor/github.com/pion/randutil/LICENSE21
-rw-r--r--vendor/github.com/pion/randutil/README.md14
-rw-r--r--vendor/github.com/pion/randutil/codecov.yml20
-rw-r--r--vendor/github.com/pion/randutil/crypto.go30
-rw-r--r--vendor/github.com/pion/randutil/go.mod3
-rw-r--r--vendor/github.com/pion/randutil/math.go72
-rw-r--r--vendor/github.com/pion/randutil/renovate.json15
-rw-r--r--vendor/github.com/pion/rtcp/.gitignore24
-rw-r--r--vendor/github.com/pion/rtcp/.golangci.yml89
-rw-r--r--vendor/github.com/pion/rtcp/LICENSE21
-rw-r--r--vendor/github.com/pion/rtcp/README.md49
-rw-r--r--vendor/github.com/pion/rtcp/codecov.yml20
-rw-r--r--vendor/github.com/pion/rtcp/compound_packet.go136
-rw-r--r--vendor/github.com/pion/rtcp/doc.go39
-rw-r--r--vendor/github.com/pion/rtcp/errors.go30
-rw-r--r--vendor/github.com/pion/rtcp/full_intra_request.go107
-rw-r--r--vendor/github.com/pion/rtcp/fuzz.go51
-rw-r--r--vendor/github.com/pion/rtcp/go.mod5
-rw-r--r--vendor/github.com/pion/rtcp/go.sum11
-rw-r--r--vendor/github.com/pion/rtcp/goodbye.go146
-rw-r--r--vendor/github.com/pion/rtcp/header.go140
-rw-r--r--vendor/github.com/pion/rtcp/packet.go115
-rw-r--r--vendor/github.com/pion/rtcp/picture_loss_indication.go91
-rw-r--r--vendor/github.com/pion/rtcp/rapid_resynchronization_request.go88
-rw-r--r--vendor/github.com/pion/rtcp/raw_packet.go44
-rw-r--r--vendor/github.com/pion/rtcp/receiver_estimated_maximum_bitrate.go284
-rw-r--r--vendor/github.com/pion/rtcp/receiver_report.go193
-rw-r--r--vendor/github.com/pion/rtcp/reception_report.go130
-rw-r--r--vendor/github.com/pion/rtcp/renovate.json15
-rw-r--r--vendor/github.com/pion/rtcp/sender_report.go260
-rw-r--r--vendor/github.com/pion/rtcp/slice_loss_indication.go115
-rw-r--r--vendor/github.com/pion/rtcp/source_description.go352
-rw-r--r--vendor/github.com/pion/rtcp/transport_layer_cc.go560
-rw-r--r--vendor/github.com/pion/rtcp/transport_layer_nack.go174
-rw-r--r--vendor/github.com/pion/rtcp/util.go38
-rw-r--r--vendor/github.com/pion/rtp/.gitignore24
-rw-r--r--vendor/github.com/pion/rtp/.golangci.yml89
-rw-r--r--vendor/github.com/pion/rtp/LICENSE21
-rw-r--r--vendor/github.com/pion/rtp/README.md53
-rw-r--r--vendor/github.com/pion/rtp/abssendtimeextension.go78
-rw-r--r--vendor/github.com/pion/rtp/audiolevelextension.go60
-rw-r--r--vendor/github.com/pion/rtp/codecov.yml20
-rw-r--r--vendor/github.com/pion/rtp/codecs/codecs.go2
-rw-r--r--vendor/github.com/pion/rtp/codecs/common.go8
-rw-r--r--vendor/github.com/pion/rtp/codecs/error.go11
-rw-r--r--vendor/github.com/pion/rtp/codecs/g711_packet.go22
-rw-r--r--vendor/github.com/pion/rtp/codecs/g722_packet.go22
-rw-r--r--vendor/github.com/pion/rtp/codecs/h264_packet.go205
-rw-r--r--vendor/github.com/pion/rtp/codecs/opus_packet.go44
-rw-r--r--vendor/github.com/pion/rtp/codecs/vp8_packet.go143
-rw-r--r--vendor/github.com/pion/rtp/codecs/vp9_packet.go385
-rw-r--r--vendor/github.com/pion/rtp/depacketizer.go6
-rw-r--r--vendor/github.com/pion/rtp/error.go21
-rw-r--r--vendor/github.com/pion/rtp/go.mod5
-rw-r--r--vendor/github.com/pion/rtp/go.sum2
-rw-r--r--vendor/github.com/pion/rtp/packet.go490
-rw-r--r--vendor/github.com/pion/rtp/packetizer.go91
-rw-r--r--vendor/github.com/pion/rtp/partitionheadchecker.go6
-rw-r--r--vendor/github.com/pion/rtp/rand.go8
-rw-r--r--vendor/github.com/pion/rtp/renovate.json15
-rw-r--r--vendor/github.com/pion/rtp/rtp.go2
-rw-r--r--vendor/github.com/pion/rtp/sequencer.go57
-rw-r--r--vendor/github.com/pion/rtp/transportccextension.go39
-rw-r--r--vendor/github.com/pion/sctp/.gitignore1
-rw-r--r--vendor/github.com/pion/sctp/.golangci.yml82
-rw-r--r--vendor/github.com/pion/sctp/DESIGN.md20
-rw-r--r--vendor/github.com/pion/sctp/LICENSE21
-rw-r--r--vendor/github.com/pion/sctp/README.md54
-rw-r--r--vendor/github.com/pion/sctp/ack_timer.go105
-rw-r--r--vendor/github.com/pion/sctp/association.go2241
-rw-r--r--vendor/github.com/pion/sctp/association_stats.go61
-rw-r--r--vendor/github.com/pion/sctp/chunk.go9
-rw-r--r--vendor/github.com/pion/sctp/chunk_abort.go88
-rw-r--r--vendor/github.com/pion/sctp/chunk_cookie_ack.go44
-rw-r--r--vendor/github.com/pion/sctp/chunk_cookie_echo.go46
-rw-r--r--vendor/github.com/pion/sctp/chunk_error.go95
-rw-r--r--vendor/github.com/pion/sctp/chunk_forward_tsn.go145
-rw-r--r--vendor/github.com/pion/sctp/chunk_heartbeat.go75
-rw-r--r--vendor/github.com/pion/sctp/chunk_heartbeat_ack.go86
-rw-r--r--vendor/github.com/pion/sctp/chunk_init.go123
-rw-r--r--vendor/github.com/pion/sctp/chunk_init_ack.go126
-rw-r--r--vendor/github.com/pion/sctp/chunk_init_common.go155
-rw-r--r--vendor/github.com/pion/sctp/chunk_payload_data.go195
-rw-r--r--vendor/github.com/pion/sctp/chunk_reconfig.go99
-rw-r--r--vendor/github.com/pion/sctp/chunk_selective_ack.go142
-rw-r--r--vendor/github.com/pion/sctp/chunkheader.go90
-rw-r--r--vendor/github.com/pion/sctp/chunktype.go67
-rw-r--r--vendor/github.com/pion/sctp/codecov.yml20
-rw-r--r--vendor/github.com/pion/sctp/control_queue.go29
-rw-r--r--vendor/github.com/pion/sctp/error_cause.go91
-rw-r--r--vendor/github.com/pion/sctp/error_cause_header.go47
-rw-r--r--vendor/github.com/pion/sctp/error_cause_invalid_mandatory_parameter.go19
-rw-r--r--vendor/github.com/pion/sctp/error_cause_protocol_violation.go50
-rw-r--r--vendor/github.com/pion/sctp/error_cause_unrecognized_chunk_type.go28
-rw-r--r--vendor/github.com/pion/sctp/go.mod14
-rw-r--r--vendor/github.com/pion/sctp/go.sum36
-rw-r--r--vendor/github.com/pion/sctp/packet.go178
-rw-r--r--vendor/github.com/pion/sctp/param.go35
-rw-r--r--vendor/github.com/pion/sctp/param_chunk_list.go28
-rw-r--r--vendor/github.com/pion/sctp/param_forward_tsn_supported.go28
-rw-r--r--vendor/github.com/pion/sctp/param_heartbeat_info.go21
-rw-r--r--vendor/github.com/pion/sctp/param_outgoing_reset_request.go88
-rw-r--r--vendor/github.com/pion/sctp/param_random.go21
-rw-r--r--vendor/github.com/pion/sctp/param_reconfig_response.go92
-rw-r--r--vendor/github.com/pion/sctp/param_requested_hmac_algorithm.go73
-rw-r--r--vendor/github.com/pion/sctp/param_state_cookie.go46
-rw-r--r--vendor/github.com/pion/sctp/param_supported_extensions.go29
-rw-r--r--vendor/github.com/pion/sctp/paramheader.go63
-rw-r--r--vendor/github.com/pion/sctp/paramtype.go106
-rw-r--r--vendor/github.com/pion/sctp/payload_queue.go179
-rw-r--r--vendor/github.com/pion/sctp/pending_queue.go138
-rw-r--r--vendor/github.com/pion/sctp/reassembly_queue.go353
-rw-r--r--vendor/github.com/pion/sctp/renovate.json15
-rw-r--r--vendor/github.com/pion/sctp/rtx_timer.go219
-rw-r--r--vendor/github.com/pion/sctp/sctp.go2
-rw-r--r--vendor/github.com/pion/sctp/stream.go357
-rw-r--r--vendor/github.com/pion/sctp/util.go58
-rw-r--r--vendor/github.com/pion/sdp/v3/.gitignore24
-rw-r--r--vendor/github.com/pion/sdp/v3/.golangci.yml89
-rw-r--r--vendor/github.com/pion/sdp/v3/LICENSE21
-rw-r--r--vendor/github.com/pion/sdp/v3/README.md59
-rw-r--r--vendor/github.com/pion/sdp/v3/base_lexer.go231
-rw-r--r--vendor/github.com/pion/sdp/v3/codecov.yml20
-rw-r--r--vendor/github.com/pion/sdp/v3/common_description.go110
-rw-r--r--vendor/github.com/pion/sdp/v3/direction.go59
-rw-r--r--vendor/github.com/pion/sdp/v3/extmap.go108
-rw-r--r--vendor/github.com/pion/sdp/v3/fuzz.go31
-rw-r--r--vendor/github.com/pion/sdp/v3/go.mod8
-rw-r--r--vendor/github.com/pion/sdp/v3/go.sum13
-rw-r--r--vendor/github.com/pion/sdp/v3/jsep.go205
-rw-r--r--vendor/github.com/pion/sdp/v3/marshal.go136
-rw-r--r--vendor/github.com/pion/sdp/v3/media_description.go80
-rw-r--r--vendor/github.com/pion/sdp/v3/renovate.json15
-rw-r--r--vendor/github.com/pion/sdp/v3/sdp.go2
-rw-r--r--vendor/github.com/pion/sdp/v3/session_description.go146
-rw-r--r--vendor/github.com/pion/sdp/v3/time_description.go51
-rw-r--r--vendor/github.com/pion/sdp/v3/unmarshal.go907
-rw-r--r--vendor/github.com/pion/sdp/v3/util.go318
-rw-r--r--vendor/github.com/pion/srtp/v2/.gitignore24
-rw-r--r--vendor/github.com/pion/srtp/v2/.golangci.yml89
-rw-r--r--vendor/github.com/pion/srtp/v2/DESIGN.md20
-rw-r--r--vendor/github.com/pion/srtp/v2/LICENSE21
-rw-r--r--vendor/github.com/pion/srtp/v2/README.md54
-rw-r--r--vendor/github.com/pion/srtp/v2/codecov.yml20
-rw-r--r--vendor/github.com/pion/srtp/v2/context.go196
-rw-r--r--vendor/github.com/pion/srtp/v2/errors.go40
-rw-r--r--vendor/github.com/pion/srtp/v2/go.mod11
-rw-r--r--vendor/github.com/pion/srtp/v2/go.sum34
-rw-r--r--vendor/github.com/pion/srtp/v2/key_derivation.go63
-rw-r--r--vendor/github.com/pion/srtp/v2/keying.go54
-rw-r--r--vendor/github.com/pion/srtp/v2/option.go54
-rw-r--r--vendor/github.com/pion/srtp/v2/protection_profile.go67
-rw-r--r--vendor/github.com/pion/srtp/v2/renovate.json15
-rw-r--r--vendor/github.com/pion/srtp/v2/session.go150
-rw-r--r--vendor/github.com/pion/srtp/v2/session_srtcp.go180
-rw-r--r--vendor/github.com/pion/srtp/v2/session_srtp.go171
-rw-r--r--vendor/github.com/pion/srtp/v2/srtcp.go77
-rw-r--r--vendor/github.com/pion/srtp/v2/srtp.go68
-rw-r--r--vendor/github.com/pion/srtp/v2/srtp_cipher.go46
-rw-r--r--vendor/github.com/pion/srtp/v2/srtp_cipher_aead_aes_gcm.go198
-rw-r--r--vendor/github.com/pion/srtp/v2/srtp_cipher_aes_cm_hmac_sha1.go228
-rw-r--r--vendor/github.com/pion/srtp/v2/stream.go8
-rw-r--r--vendor/github.com/pion/srtp/v2/stream_srtcp.go157
-rw-r--r--vendor/github.com/pion/srtp/v2/stream_srtp.go154
-rw-r--r--vendor/github.com/pion/srtp/v2/util.go33
-rw-r--r--vendor/github.com/pion/stun/.codecov.yml9
-rw-r--r--vendor/github.com/pion/stun/.gitignore17
-rw-r--r--vendor/github.com/pion/stun/.golangci.yml93
-rw-r--r--vendor/github.com/pion/stun/.goreleaser.yml39
-rw-r--r--vendor/github.com/pion/stun/.travis.yml135
-rw-r--r--vendor/github.com/pion/stun/AUTHORS10
-rw-r--r--vendor/github.com/pion/stun/Dockerfile5
-rw-r--r--vendor/github.com/pion/stun/LICENSE.md7
-rw-r--r--vendor/github.com/pion/stun/Makefile61
-rw-r--r--vendor/github.com/pion/stun/README.md184
-rw-r--r--vendor/github.com/pion/stun/addr.go134
-rw-r--r--vendor/github.com/pion/stun/agent.go228
-rw-r--r--vendor/github.com/pion/stun/appveyor.yml22
-rw-r--r--vendor/github.com/pion/stun/attributes.go226
-rw-r--r--vendor/github.com/pion/stun/attributes_debug.go33
-rw-r--r--vendor/github.com/pion/stun/checks.go45
-rw-r--r--vendor/github.com/pion/stun/checks_debug.go61
-rw-r--r--vendor/github.com/pion/stun/client.go631
-rw-r--r--vendor/github.com/pion/stun/errorcode.go158
-rw-r--r--vendor/github.com/pion/stun/errors.go62
-rw-r--r--vendor/github.com/pion/stun/fingerprint.go67
-rw-r--r--vendor/github.com/pion/stun/fingerprint_debug.go18
-rw-r--r--vendor/github.com/pion/stun/fuzz.go140
-rw-r--r--vendor/github.com/pion/stun/go.mod3
-rw-r--r--vendor/github.com/pion/stun/go.sum0
-rw-r--r--vendor/github.com/pion/stun/go.test.sh24
-rw-r--r--vendor/github.com/pion/stun/helpers.go105
-rw-r--r--vendor/github.com/pion/stun/integrity.go124
-rw-r--r--vendor/github.com/pion/stun/integrity_debug.go18
-rw-r--r--vendor/github.com/pion/stun/internal/hmac/hmac.go101
-rw-r--r--vendor/github.com/pion/stun/internal/hmac/pool.go92
-rw-r--r--vendor/github.com/pion/stun/internal/hmac/vendor.sh4
-rw-r--r--vendor/github.com/pion/stun/message.go588
-rw-r--r--vendor/github.com/pion/stun/renovate.json15
-rw-r--r--vendor/github.com/pion/stun/stun.go51
-rw-r--r--vendor/github.com/pion/stun/textattrs.go129
-rw-r--r--vendor/github.com/pion/stun/uattrs.go63
-rw-r--r--vendor/github.com/pion/stun/xor.go62
-rw-r--r--vendor/github.com/pion/stun/xoraddr.go145
-rw-r--r--vendor/github.com/pion/transport/LICENSE21
-rw-r--r--vendor/github.com/pion/transport/connctx/connctx.go172
-rw-r--r--vendor/github.com/pion/transport/connctx/pipe.go11
-rw-r--r--vendor/github.com/pion/transport/deadline/deadline.go110
-rw-r--r--vendor/github.com/pion/transport/packetio/buffer.go347
-rw-r--r--vendor/github.com/pion/transport/packetio/errors.go27
-rw-r--r--vendor/github.com/pion/transport/packetio/hardlimit.go5
-rw-r--r--vendor/github.com/pion/transport/packetio/no_hardlimit.go5
-rw-r--r--vendor/github.com/pion/transport/replaydetector/fixedbig.go78
-rw-r--r--vendor/github.com/pion/transport/replaydetector/replaydetector.go116
-rw-r--r--vendor/github.com/pion/transport/vnet/.gitignore1
-rw-r--r--vendor/github.com/pion/transport/vnet/README.md239
-rw-r--r--vendor/github.com/pion/transport/vnet/chunk.go283
-rw-r--r--vendor/github.com/pion/transport/vnet/chunk_queue.go52
-rw-r--r--vendor/github.com/pion/transport/vnet/conn.go246
-rw-r--r--vendor/github.com/pion/transport/vnet/conn_map.go136
-rw-r--r--vendor/github.com/pion/transport/vnet/errors.go19
-rw-r--r--vendor/github.com/pion/transport/vnet/interface.go40
-rw-r--r--vendor/github.com/pion/transport/vnet/nat.go338
-rw-r--r--vendor/github.com/pion/transport/vnet/net.go677
-rw-r--r--vendor/github.com/pion/transport/vnet/resolver.go89
-rw-r--r--vendor/github.com/pion/transport/vnet/router.go605
-rw-r--r--vendor/github.com/pion/transport/vnet/udpproxy.go176
-rw-r--r--vendor/github.com/pion/transport/vnet/vnet.go2
-rw-r--r--vendor/github.com/pion/turn/v2/.gitignore9
-rw-r--r--vendor/github.com/pion/turn/v2/.golangci.yml88
-rw-r--r--vendor/github.com/pion/turn/v2/.goreleaser.yml109
-rw-r--r--vendor/github.com/pion/turn/v2/DESIGN.md31
-rw-r--r--vendor/github.com/pion/turn/v2/LICENSE.md7
-rw-r--r--vendor/github.com/pion/turn/v2/README.md96
-rw-r--r--vendor/github.com/pion/turn/v2/client.go569
-rw-r--r--vendor/github.com/pion/turn/v2/codecov.yml20
-rw-r--r--vendor/github.com/pion/turn/v2/errors.go28
-rw-r--r--vendor/github.com/pion/turn/v2/go.mod11
-rw-r--r--vendor/github.com/pion/turn/v2/go.sum28
-rw-r--r--vendor/github.com/pion/turn/v2/internal/allocation/allocation.go259
-rw-r--r--vendor/github.com/pion/turn/v2/internal/allocation/allocation_manager.go186
-rw-r--r--vendor/github.com/pion/turn/v2/internal/allocation/channel_bind.go43
-rw-r--r--vendor/github.com/pion/turn/v2/internal/allocation/errors.go17
-rw-r--r--vendor/github.com/pion/turn/v2/internal/allocation/five_tuple.go36
-rw-r--r--vendor/github.com/pion/turn/v2/internal/allocation/permission.go40
-rw-r--r--vendor/github.com/pion/turn/v2/internal/client/binding.go151
-rw-r--r--vendor/github.com/pion/turn/v2/internal/client/conn.go613
-rw-r--r--vendor/github.com/pion/turn/v2/internal/client/errors.go37
-rw-r--r--vendor/github.com/pion/turn/v2/internal/client/periodic_timer.go82
-rw-r--r--vendor/github.com/pion/turn/v2/internal/client/permission.go90
-rw-r--r--vendor/github.com/pion/turn/v2/internal/client/transaction.go185
-rw-r--r--vendor/github.com/pion/turn/v2/internal/client/trylock.go24
-rw-r--r--vendor/github.com/pion/turn/v2/internal/ipnet/util.go40
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/addr.go65
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/chandata.go140
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/chann.go67
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/data.go30
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/dontfrag.go18
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/evenport.go55
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/fuzz.go111
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/lifetime.go52
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/peeraddr.go42
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/proto.go30
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/relayedaddr.go40
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/reqfamily.go61
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/reqtrans.go65
-rw-r--r--vendor/github.com/pion/turn/v2/internal/proto/rsrvtoken.go39
-rw-r--r--vendor/github.com/pion/turn/v2/internal/server/errors.go26
-rw-r--r--vendor/github.com/pion/turn/v2/internal/server/server.go109
-rw-r--r--vendor/github.com/pion/turn/v2/internal/server/stun.go22
-rw-r--r--vendor/github.com/pion/turn/v2/internal/server/turn.go352
-rw-r--r--vendor/github.com/pion/turn/v2/internal/server/util.go133
-rw-r--r--vendor/github.com/pion/turn/v2/lt_cred.go56
-rw-r--r--vendor/github.com/pion/turn/v2/relay_address_generator_none.go45
-rw-r--r--vendor/github.com/pion/turn/v2/relay_address_generator_range.go92
-rw-r--r--vendor/github.com/pion/turn/v2/relay_address_generator_static.go55
-rw-r--r--vendor/github.com/pion/turn/v2/renovate.json15
-rw-r--r--vendor/github.com/pion/turn/v2/server.go161
-rw-r--r--vendor/github.com/pion/turn/v2/server_config.go116
-rw-r--r--vendor/github.com/pion/turn/v2/stun_conn.go121
-rw-r--r--vendor/github.com/pion/udp/.gitignore15
-rw-r--r--vendor/github.com/pion/udp/.golangci.yml12
-rw-r--r--vendor/github.com/pion/udp/LICENSE21
-rw-r--r--vendor/github.com/pion/udp/README.md39
-rw-r--r--vendor/github.com/pion/udp/conn.go296
-rw-r--r--vendor/github.com/pion/udp/go.mod5
-rw-r--r--vendor/github.com/pion/udp/go.sum19
-rw-r--r--vendor/github.com/pion/webrtc/v3/.codacy.yaml3
-rw-r--r--vendor/github.com/pion/webrtc/v3/.eslintrc.json3
-rw-r--r--vendor/github.com/pion/webrtc/v3/.gitignore24
-rw-r--r--vendor/github.com/pion/webrtc/v3/.golangci.yml89
-rw-r--r--vendor/github.com/pion/webrtc/v3/DESIGN.md43
-rw-r--r--vendor/github.com/pion/webrtc/v3/LICENSE21
-rw-r--r--vendor/github.com/pion/webrtc/v3/README.md271
-rw-r--r--vendor/github.com/pion/webrtc/v3/api.go73
-rw-r--r--vendor/github.com/pion/webrtc/v3/api_js.go31
-rw-r--r--vendor/github.com/pion/webrtc/v3/atomicbool.go20
-rw-r--r--vendor/github.com/pion/webrtc/v3/bundlepolicy.go78
-rw-r--r--vendor/github.com/pion/webrtc/v3/certificate.go185
-rw-r--r--vendor/github.com/pion/webrtc/v3/codecov.yml20
-rw-r--r--vendor/github.com/pion/webrtc/v3/configuration.go51
-rw-r--r--vendor/github.com/pion/webrtc/v3/configuration_common.go24
-rw-r--r--vendor/github.com/pion/webrtc/v3/configuration_js.go35
-rw-r--r--vendor/github.com/pion/webrtc/v3/constants.go25
-rw-r--r--vendor/github.com/pion/webrtc/v3/datachannel.go597
-rw-r--r--vendor/github.com/pion/webrtc/v3/datachannel_js.go319
-rw-r--r--vendor/github.com/pion/webrtc/v3/datachannel_js_detach.go71
-rw-r--r--vendor/github.com/pion/webrtc/v3/datachannelinit.go33
-rw-r--r--vendor/github.com/pion/webrtc/v3/datachannelmessage.go10
-rw-r--r--vendor/github.com/pion/webrtc/v3/datachannelparameters.go12
-rw-r--r--vendor/github.com/pion/webrtc/v3/datachannelstate.go61
-rw-r--r--vendor/github.com/pion/webrtc/v3/dtlsfingerprint.go14
-rw-r--r--vendor/github.com/pion/webrtc/v3/dtlsparameters.go7
-rw-r--r--vendor/github.com/pion/webrtc/v3/dtlsrole.go92
-rw-r--r--vendor/github.com/pion/webrtc/v3/dtlstransport.go430
-rw-r--r--vendor/github.com/pion/webrtc/v3/dtlstransportstate.go71
-rw-r--r--vendor/github.com/pion/webrtc/v3/errors.go220
-rw-r--r--vendor/github.com/pion/webrtc/v3/gathering_complete_promise.go24
-rw-r--r--vendor/github.com/pion/webrtc/v3/go.mod23
-rw-r--r--vendor/github.com/pion/webrtc/v3/go.sum151
-rw-r--r--vendor/github.com/pion/webrtc/v3/ice_go.go10
-rw-r--r--vendor/github.com/pion/webrtc/v3/icecandidate.go169
-rw-r--r--vendor/github.com/pion/webrtc/v3/icecandidateinit.go9
-rw-r--r--vendor/github.com/pion/webrtc/v3/icecandidatepair.go29
-rw-r--r--vendor/github.com/pion/webrtc/v3/icecandidatetype.go94
-rw-r--r--vendor/github.com/pion/webrtc/v3/icecomponent.go47
-rw-r--r--vendor/github.com/pion/webrtc/v3/iceconnectionstate.go94
-rw-r--r--vendor/github.com/pion/webrtc/v3/icecredentialtype.go43
-rw-r--r--vendor/github.com/pion/webrtc/v3/icegatherer.go367
-rw-r--r--vendor/github.com/pion/webrtc/v3/icegathererstate.go48
-rw-r--r--vendor/github.com/pion/webrtc/v3/icegatheringstate.go53
-rw-r--r--vendor/github.com/pion/webrtc/v3/icegatheroptions.go7
-rw-r--r--vendor/github.com/pion/webrtc/v3/iceparameters.go9
-rw-r--r--vendor/github.com/pion/webrtc/v3/iceprotocol.go47
-rw-r--r--vendor/github.com/pion/webrtc/v3/icerole.go45
-rw-r--r--vendor/github.com/pion/webrtc/v3/iceserver.go68
-rw-r--r--vendor/github.com/pion/webrtc/v3/iceserver_js.go42
-rw-r--r--vendor/github.com/pion/webrtc/v3/icetcp.go18
-rw-r--r--vendor/github.com/pion/webrtc/v3/icetransport.go368
-rw-r--r--vendor/github.com/pion/webrtc/v3/icetransportpolicy.go65
-rw-r--r--vendor/github.com/pion/webrtc/v3/icetransportstate.go107
-rw-r--r--vendor/github.com/pion/webrtc/v3/interceptor.go107
-rw-r--r--vendor/github.com/pion/webrtc/v3/internal/mux/endpoint.go75
-rw-r--r--vendor/github.com/pion/webrtc/v3/internal/mux/mux.go145
-rw-r--r--vendor/github.com/pion/webrtc/v3/internal/mux/muxfunc.go101
-rw-r--r--vendor/github.com/pion/webrtc/v3/internal/util/util.go72
-rw-r--r--vendor/github.com/pion/webrtc/v3/js_compare.go13
-rw-r--r--vendor/github.com/pion/webrtc/v3/js_compare_legacy.go13
-rw-r--r--vendor/github.com/pion/webrtc/v3/js_utils.go168
-rw-r--r--vendor/github.com/pion/webrtc/v3/mediaengine.go533
-rw-r--r--vendor/github.com/pion/webrtc/v3/networktype.go104
-rw-r--r--vendor/github.com/pion/webrtc/v3/oauthcredential.go15
-rw-r--r--vendor/github.com/pion/webrtc/v3/offeransweroptions.go26
-rw-r--r--vendor/github.com/pion/webrtc/v3/operations.go87
-rw-r--r--vendor/github.com/pion/webrtc/v3/package.json11
-rw-r--r--vendor/github.com/pion/webrtc/v3/peerconnection.go2323
-rw-r--r--vendor/github.com/pion/webrtc/v3/peerconnection_js.go676
-rw-r--r--vendor/github.com/pion/webrtc/v3/peerconnectionstate.go94
-rw-r--r--vendor/github.com/pion/webrtc/v3/pkg/media/media.go25
-rw-r--r--vendor/github.com/pion/webrtc/v3/pkg/rtcerr/errors.go160
-rw-r--r--vendor/github.com/pion/webrtc/v3/renovate.json15
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtcpfeedback.go31
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtcpmuxpolicy.go66
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtpcapabilities.go9
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtpcodec.go118
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtpcodingparameters.go10
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtpdecodingparameters.go8
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtpencodingparameters.go8
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtpreceiveparameters.go6
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtpreceiver.go361
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtpsender.go261
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtpsendparameters.go7
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtptransceiver.go187
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtptransceiverdirection.go85
-rw-r--r--vendor/github.com/pion/webrtc/v3/rtptransceiverinit.go12
-rw-r--r--vendor/github.com/pion/webrtc/v3/sctpcapabilities.go6
-rw-r--r--vendor/github.com/pion/webrtc/v3/sctptransport.go379
-rw-r--r--vendor/github.com/pion/webrtc/v3/sctptransportstate.go54
-rw-r--r--vendor/github.com/pion/webrtc/v3/sdp.go643
-rw-r--r--vendor/github.com/pion/webrtc/v3/sdpsemantics.go74
-rw-r--r--vendor/github.com/pion/webrtc/v3/sdptype.go100
-rw-r--r--vendor/github.com/pion/webrtc/v3/sessiondescription.go21
-rw-r--r--vendor/github.com/pion/webrtc/v3/settingengine.go265
-rw-r--r--vendor/github.com/pion/webrtc/v3/settingengine_js.go19
-rw-r--r--vendor/github.com/pion/webrtc/v3/signalingstate.go188
-rw-r--r--vendor/github.com/pion/webrtc/v3/srtp_writer_future.go118
-rw-r--r--vendor/github.com/pion/webrtc/v3/stats.go1452
-rw-r--r--vendor/github.com/pion/webrtc/v3/stats_go.go93
-rw-r--r--vendor/github.com/pion/webrtc/v3/track_local.go75
-rw-r--r--vendor/github.com/pion/webrtc/v3/track_local_static.go267
-rw-r--r--vendor/github.com/pion/webrtc/v3/track_remote.go183
-rw-r--r--vendor/github.com/pion/webrtc/v3/webrtc.go17
-rw-r--r--vendor/github.com/pion/webrtc/v3/yarn.lock795
-rw-r--r--vendor/github.com/pkg/errors/.gitignore24
-rw-r--r--vendor/github.com/pkg/errors/.travis.yml10
-rw-r--r--vendor/github.com/pkg/errors/LICENSE23
-rw-r--r--vendor/github.com/pkg/errors/Makefile44
-rw-r--r--vendor/github.com/pkg/errors/README.md59
-rw-r--r--vendor/github.com/pkg/errors/appveyor.yml32
-rw-r--r--vendor/github.com/pkg/errors/errors.go288
-rw-r--r--vendor/github.com/pkg/errors/go113.go38
-rw-r--r--vendor/github.com/pkg/errors/stack.go177
-rw-r--r--vendor/github.com/smartystreets/assertions/.gitignore5
-rw-r--r--vendor/github.com/smartystreets/assertions/.travis.yml11
-rw-r--r--vendor/github.com/smartystreets/assertions/CONTRIBUTING.md12
-rw-r--r--vendor/github.com/smartystreets/assertions/LICENSE.md23
-rw-r--r--vendor/github.com/smartystreets/assertions/README.md611
-rw-r--r--vendor/github.com/smartystreets/assertions/collections.go244
-rw-r--r--vendor/github.com/smartystreets/assertions/doc.go109
-rw-r--r--vendor/github.com/smartystreets/assertions/equal_method.go75
-rw-r--r--vendor/github.com/smartystreets/assertions/equality.go328
-rw-r--r--vendor/github.com/smartystreets/assertions/filter.go31
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/go-render/LICENSE27
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/go-render/render/render.go481
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/go-render/render/render_time.go26
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/.gitignore5
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/.travis.yml4
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/LICENSE202
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/README.md58
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/any_of.go94
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/contains.go61
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/deep_equals.go88
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/equals.go541
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/greater_or_equal.go39
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/greater_than.go39
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/less_or_equal.go41
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/less_than.go152
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/matcher.go86
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/not.go53
-rw-r--r--vendor/github.com/smartystreets/assertions/internal/oglematchers/transform_description.go36
-rw-r--r--vendor/github.com/smartystreets/assertions/messages.go97
-rw-r--r--vendor/github.com/smartystreets/assertions/panic.go115
-rw-r--r--vendor/github.com/smartystreets/assertions/quantity.go141
-rw-r--r--vendor/github.com/smartystreets/assertions/serializer.go63
-rw-r--r--vendor/github.com/smartystreets/assertions/strings.go227
-rw-r--r--vendor/github.com/smartystreets/assertions/time.go202
-rw-r--r--vendor/github.com/smartystreets/assertions/type.go134
-rw-r--r--vendor/github.com/smartystreets/goconvey/LICENSE.md23
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/assertions.go71
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/context.go272
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/convey.goconvey4
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/discovery.go103
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/doc.go218
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/gotest/utils.go28
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/init.go81
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/nilReporter.go15
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/reporting/console.go16
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/reporting/doc.go5
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/reporting/dot.go40
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/reporting/gotest.go33
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/reporting/init.go94
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/reporting/json.go88
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/reporting/printer.go60
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/reporting/problems.go80
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/reporting/reporter.go39
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/reporting/reporting.goconvey2
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/reporting/reports.go179
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/reporting/statistics.go108
-rw-r--r--vendor/github.com/smartystreets/goconvey/convey/reporting/story.go73
-rw-r--r--vendor/github.com/templexxx/cpu/.gitignore12
-rw-r--r--vendor/github.com/templexxx/cpu/LICENSE32
-rw-r--r--vendor/github.com/templexxx/cpu/README.md23
-rw-r--r--vendor/github.com/templexxx/cpu/cpu.go234
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_386.go7
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_amd64.go7
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_amd64p32.go7
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_arm.go7
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_arm64.go102
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_mips.go7
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_mips64.go7
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_mips64le.go7
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_mipsle.go7
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_no_init.go16
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_ppc64x.go68
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_s390x.go153
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_s390x.s55
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_wasm.go7
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_x86.go425
-rw-r--r--vendor/github.com/templexxx/cpu/cpu_x86.s32
-rw-r--r--vendor/github.com/templexxx/xorsimd/.gitattributes1
-rw-r--r--vendor/github.com/templexxx/xorsimd/.gitignore13
-rw-r--r--vendor/github.com/templexxx/xorsimd/LICENSE21
-rw-r--r--vendor/github.com/templexxx/xorsimd/README.md46
-rw-r--r--vendor/github.com/templexxx/xorsimd/go.mod5
-rw-r--r--vendor/github.com/templexxx/xorsimd/go.sum2
-rw-r--r--vendor/github.com/templexxx/xorsimd/xor.go89
-rw-r--r--vendor/github.com/templexxx/xorsimd/xor_amd64.go95
-rw-r--r--vendor/github.com/templexxx/xorsimd/xor_generic.go205
-rw-r--r--vendor/github.com/templexxx/xorsimd/xoravx2_amd64.s124
-rw-r--r--vendor/github.com/templexxx/xorsimd/xoravx512_amd64.s124
-rw-r--r--vendor/github.com/templexxx/xorsimd/xorbytes_amd64.s72
-rw-r--r--vendor/github.com/templexxx/xorsimd/xorsse2_amd64.s123
-rw-r--r--vendor/github.com/tjfoc/gmsm/LICENSE201
-rw-r--r--vendor/github.com/tjfoc/gmsm/sm4/sm4.go350
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/.gitignore25
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/.travis.yml20
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/LICENSE22
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/README.md285
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/autotune.go64
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/batchconn.go12
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/crypt.go618
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/donate.pngbin0 -> 4420 bytes
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/entropy.go52
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/fec.go381
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/flame.pngbin0 -> 57142 bytes
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/frame.pngbin0 -> 36006 bytes
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/go.mod20
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/go.sum69
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/kcp-go.pngbin0 -> 9153 bytes
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/kcp.go1080
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/readloop.go39
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/readloop_generic.go11
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/readloop_linux.go111
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/sess.go1075
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/snmp.go164
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/timedsched.go146
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/tx.go24
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/tx_generic.go11
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/tx_linux.go51
-rw-r--r--vendor/github.com/xtaci/kcp-go/v5/wechat_donate.jpgbin0 -> 35307 bytes
-rw-r--r--vendor/github.com/xtaci/smux/.gitignore24
-rw-r--r--vendor/github.com/xtaci/smux/.travis.yml17
-rw-r--r--vendor/github.com/xtaci/smux/LICENSE21
-rw-r--r--vendor/github.com/xtaci/smux/README.md136
-rw-r--r--vendor/github.com/xtaci/smux/alloc.go72
-rw-r--r--vendor/github.com/xtaci/smux/curve.jpgbin0 -> 106626 bytes
-rw-r--r--vendor/github.com/xtaci/smux/frame.go81
-rw-r--r--vendor/github.com/xtaci/smux/go.mod3
-rw-r--r--vendor/github.com/xtaci/smux/go.sum0
-rw-r--r--vendor/github.com/xtaci/smux/mux.go110
-rw-r--r--vendor/github.com/xtaci/smux/mux.jpgbin0 -> 6199 bytes
-rw-r--r--vendor/github.com/xtaci/smux/session.go525
-rw-r--r--vendor/github.com/xtaci/smux/shaper.go16
-rw-r--r--vendor/github.com/xtaci/smux/smux.pngbin0 -> 9891 bytes
-rw-r--r--vendor/github.com/xtaci/smux/stream.go549
-rw-r--r--vendor/golang.org/x/crypto/blowfish/block.go159
-rw-r--r--vendor/golang.org/x/crypto/blowfish/cipher.go99
-rw-r--r--vendor/golang.org/x/crypto/blowfish/const.go199
-rw-r--r--vendor/golang.org/x/crypto/cast5/cast5.go533
-rw-r--r--vendor/golang.org/x/crypto/cryptobyte/asn1.go804
-rw-r--r--vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go46
-rw-r--r--vendor/golang.org/x/crypto/cryptobyte/builder.go337
-rw-r--r--vendor/golang.org/x/crypto/cryptobyte/string.go161
-rw-r--r--vendor/golang.org/x/crypto/curve25519/const_amd64.h8
-rw-r--r--vendor/golang.org/x/crypto/curve25519/const_amd64.s20
-rw-r--r--vendor/golang.org/x/crypto/curve25519/cswap_amd64.s65
-rw-r--r--vendor/golang.org/x/crypto/curve25519/curve25519.go925
-rw-r--r--vendor/golang.org/x/crypto/curve25519/doc.go23
-rw-r--r--vendor/golang.org/x/crypto/curve25519/freeze_amd64.s73
-rw-r--r--vendor/golang.org/x/crypto/curve25519/internal/field/README7
-rw-r--r--vendor/golang.org/x/crypto/curve25519/internal/field/fe.go416
-rw-r--r--vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go13
-rw-r--r--vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s379
-rw-r--r--vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go12
-rw-r--r--vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go16
-rw-r--r--vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s43
-rw-r--r--vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go12
-rw-r--r--vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go264
-rw-r--r--vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint1
-rw-r--r--vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh19
-rw-r--r--vendor/golang.org/x/crypto/curve25519/ladderstep_amd64.s1377
-rw-r--r--vendor/golang.org/x/crypto/curve25519/mont25519_amd64.go240
-rw-r--r--vendor/golang.org/x/crypto/curve25519/mul_amd64.s169
-rw-r--r--vendor/golang.org/x/crypto/curve25519/square_amd64.s132
-rw-r--r--vendor/golang.org/x/crypto/ed25519/ed25519.go223
-rw-r--r--vendor/golang.org/x/crypto/ed25519/ed25519_go113.go74
-rw-r--r--vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go1422
-rw-r--r--vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go1793
-rw-r--r--vendor/golang.org/x/crypto/internal/subtle/aliasing.go3
-rw-r--r--vendor/golang.org/x/crypto/internal/subtle/aliasing_purego.go (renamed from vendor/golang.org/x/crypto/internal/subtle/aliasing_appengine.go)3
-rw-r--r--vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go77
-rw-r--r--vendor/golang.org/x/crypto/poly1305/bits_compat.go40
-rw-r--r--vendor/golang.org/x/crypto/poly1305/bits_go1.13.go22
-rw-r--r--vendor/golang.org/x/crypto/poly1305/mac_noasm.go5
-rw-r--r--vendor/golang.org/x/crypto/poly1305/poly1305.go34
-rw-r--r--vendor/golang.org/x/crypto/poly1305/sum_amd64.go66
-rw-r--r--vendor/golang.org/x/crypto/poly1305/sum_amd64.s43
-rw-r--r--vendor/golang.org/x/crypto/poly1305/sum_arm.go22
-rw-r--r--vendor/golang.org/x/crypto/poly1305/sum_arm.s427
-rw-r--r--vendor/golang.org/x/crypto/poly1305/sum_generic.go398
-rw-r--r--vendor/golang.org/x/crypto/poly1305/sum_noasm.go16
-rw-r--r--vendor/golang.org/x/crypto/poly1305/sum_ppc64le.go66
-rw-r--r--vendor/golang.org/x/crypto/poly1305/sum_ppc64le.s87
-rw-r--r--vendor/golang.org/x/crypto/poly1305/sum_s390x.go78
-rw-r--r--vendor/golang.org/x/crypto/poly1305/sum_s390x.s668
-rw-r--r--vendor/golang.org/x/crypto/poly1305/sum_vmsl_s390x.s909
-rw-r--r--vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go3
-rw-r--r--vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s238
-rw-r--r--vendor/golang.org/x/crypto/salsa20/salsa/salsa20_noasm.go3
-rw-r--r--vendor/golang.org/x/crypto/salsa20/salsa20.go58
-rw-r--r--vendor/golang.org/x/crypto/sha3/doc.go66
-rw-r--r--vendor/golang.org/x/crypto/sha3/hashes.go97
-rw-r--r--vendor/golang.org/x/crypto/sha3/hashes_generic.go28
-rw-r--r--vendor/golang.org/x/crypto/sha3/keccakf.go413
-rw-r--r--vendor/golang.org/x/crypto/sha3/keccakf_amd64.go14
-rw-r--r--vendor/golang.org/x/crypto/sha3/keccakf_amd64.s391
-rw-r--r--vendor/golang.org/x/crypto/sha3/register.go19
-rw-r--r--vendor/golang.org/x/crypto/sha3/sha3.go193
-rw-r--r--vendor/golang.org/x/crypto/sha3/sha3_s390x.go285
-rw-r--r--vendor/golang.org/x/crypto/sha3/sha3_s390x.s34
-rw-r--r--vendor/golang.org/x/crypto/sha3/shake.go173
-rw-r--r--vendor/golang.org/x/crypto/sha3/shake_generic.go20
-rw-r--r--vendor/golang.org/x/crypto/sha3/xor.go24
-rw-r--r--vendor/golang.org/x/crypto/sha3/xor_generic.go28
-rw-r--r--vendor/golang.org/x/crypto/sha3/xor_unaligned.go68
-rw-r--r--vendor/golang.org/x/crypto/tea/cipher.go116
-rw-r--r--vendor/golang.org/x/crypto/twofish/twofish.go348
-rw-r--r--vendor/golang.org/x/crypto/xtea/block.go66
-rw-r--r--vendor/golang.org/x/crypto/xtea/cipher.go90
-rw-r--r--vendor/golang.org/x/mod/LICENSE27
-rw-r--r--vendor/golang.org/x/mod/PATENTS22
-rw-r--r--vendor/golang.org/x/mod/semver/semver.go388
-rw-r--r--vendor/golang.org/x/net/bpf/asm.go41
-rw-r--r--vendor/golang.org/x/net/bpf/constants.go222
-rw-r--r--vendor/golang.org/x/net/bpf/doc.go82
-rw-r--r--vendor/golang.org/x/net/bpf/instructions.go726
-rw-r--r--vendor/golang.org/x/net/bpf/setter.go10
-rw-r--r--vendor/golang.org/x/net/bpf/vm.go150
-rw-r--r--vendor/golang.org/x/net/bpf/vm_instructions.go182
-rw-r--r--vendor/golang.org/x/net/dns/dnsmessage/message.go2664
-rw-r--r--vendor/golang.org/x/net/internal/iana/const.go223
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr.go12
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go14
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go14
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go28
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go22
-rw-r--r--vendor/golang.org/x/net/internal/socket/cmsghdr_zos_s390x.go25
-rw-r--r--vendor/golang.org/x/net/internal/socket/empty.s7
-rw-r--r--vendor/golang.org/x/net/internal/socket/error_unix.go32
-rw-r--r--vendor/golang.org/x/net/internal/socket/error_windows.go26
-rw-r--r--vendor/golang.org/x/net/internal/socket/iovec_32bit.go20
-rw-r--r--vendor/golang.org/x/net/internal/socket/iovec_64bit.go20
-rw-r--r--vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go19
-rw-r--r--vendor/golang.org/x/net/internal/socket/iovec_stub.go12
-rw-r--r--vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go22
-rw-r--r--vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go114
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_bsd.go40
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go17
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_linux.go39
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go25
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go25
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go14
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go36
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_stub.go15
-rw-r--r--vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go36
-rw-r--r--vendor/golang.org/x/net/internal/socket/norace.go (renamed from vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go)10
-rw-r--r--vendor/golang.org/x/net/internal/socket/race.go38
-rw-r--r--vendor/golang.org/x/net/internal/socket/rawconn.go91
-rw-r--r--vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go78
-rw-r--r--vendor/golang.org/x/net/internal/socket/rawconn_msg.go81
-rw-r--r--vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/socket.go280
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys.go23
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_bsd.go16
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_const_unix.go21
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linkname.go43
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux.go23
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_386.go53
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_386.s11
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go10
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_arm.go10
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go10
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_mips.go10
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go10
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go10
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go10
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_ppc.go10
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go10
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go10
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go (renamed from vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go)12
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go53
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s11
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_netbsd.go25
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_posix.go185
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_solaris.go59
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s11
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_stub.go53
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_unix.go34
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_windows.go54
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_zos_s390x.go38
-rw-r--r--vendor/golang.org/x/net/internal/socket/sys_zos_s390x.s11
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go40
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go30
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go32
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go30
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go32
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go32
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go30
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go32
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go30
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm64.go32
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_386.go35
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go38
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go35
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go38
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go35
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go38
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go38
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go35
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_ppc.go35
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go38
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go38
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go40
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go38
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go35
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go38
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go35
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go38
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go30
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go32
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go30
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm64.go32
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_openbsd_mips64.go30
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go32
-rw-r--r--vendor/golang.org/x/net/internal/socket/zsys_zos_s390x.go28
-rw-r--r--vendor/golang.org/x/net/ipv4/batch.go194
-rw-r--r--vendor/golang.org/x/net/ipv4/control.go144
-rw-r--r--vendor/golang.org/x/net/ipv4/control_bsd.go44
-rw-r--r--vendor/golang.org/x/net/ipv4/control_pktinfo.go42
-rw-r--r--vendor/golang.org/x/net/ipv4/control_stub.go14
-rw-r--r--vendor/golang.org/x/net/ipv4/control_unix.go76
-rw-r--r--vendor/golang.org/x/net/ipv4/control_windows.go12
-rw-r--r--vendor/golang.org/x/net/ipv4/control_zos.go88
-rw-r--r--vendor/golang.org/x/net/ipv4/dgramopt.go264
-rw-r--r--vendor/golang.org/x/net/ipv4/doc.go244
-rw-r--r--vendor/golang.org/x/net/ipv4/endpoint.go186
-rw-r--r--vendor/golang.org/x/net/ipv4/genericopt.go55
-rw-r--r--vendor/golang.org/x/net/ipv4/header.go172
-rw-r--r--vendor/golang.org/x/net/ipv4/helper.go77
-rw-r--r--vendor/golang.org/x/net/ipv4/iana.go38
-rw-r--r--vendor/golang.org/x/net/ipv4/icmp.go57
-rw-r--r--vendor/golang.org/x/net/ipv4/icmp_linux.go25
-rw-r--r--vendor/golang.org/x/net/ipv4/icmp_stub.go26
-rw-r--r--vendor/golang.org/x/net/ipv4/packet.go117
-rw-r--r--vendor/golang.org/x/net/ipv4/payload.go23
-rw-r--r--vendor/golang.org/x/net/ipv4/payload_cmsg.go85
-rw-r--r--vendor/golang.org/x/net/ipv4/payload_nocmsg.go40
-rw-r--r--vendor/golang.org/x/net/ipv4/sockopt.go44
-rw-r--r--vendor/golang.org/x/net/ipv4/sockopt_posix.go72
-rw-r--r--vendor/golang.org/x/net/ipv4/sockopt_stub.go43
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_aix.go44
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_asmreq.go123
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go26
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_asmreqn.go45
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go22
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_bpf.go25
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_bpf_stub.go17
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_bsd.go42
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_darwin.go69
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_dragonfly.go39
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_freebsd.go80
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_linux.go61
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_solaris.go61
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_ssmreq.go53
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go22
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_stub.go14
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_windows.go44
-rw-r--r--vendor/golang.org/x/net/ipv4/sys_zos.go57
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_aix_ppc64.go17
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_darwin.go59
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_dragonfly.go13
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go52
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go54
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go54
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_freebsd_arm64.go52
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_linux_386.go72
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go74
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_linux_arm.go72
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go74
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_linux_mips.go72
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go74
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go74
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go72
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go72
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go74
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go74
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_linux_riscv64.go77
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go74
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_netbsd.go13
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_openbsd.go13
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_solaris.go57
-rw-r--r--vendor/golang.org/x/net/ipv4/zsys_zos_s390x.go56
-rw-r--r--vendor/golang.org/x/net/ipv6/batch.go116
-rw-r--r--vendor/golang.org/x/net/ipv6/control.go187
-rw-r--r--vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go51
-rw-r--r--vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go97
-rw-r--r--vendor/golang.org/x/net/ipv6/control_stub.go14
-rw-r--r--vendor/golang.org/x/net/ipv6/control_unix.go56
-rw-r--r--vendor/golang.org/x/net/ipv6/control_windows.go12
-rw-r--r--vendor/golang.org/x/net/ipv6/dgramopt.go301
-rw-r--r--vendor/golang.org/x/net/ipv6/doc.go243
-rw-r--r--vendor/golang.org/x/net/ipv6/endpoint.go127
-rw-r--r--vendor/golang.org/x/net/ipv6/genericopt.go56
-rw-r--r--vendor/golang.org/x/net/ipv6/header.go55
-rw-r--r--vendor/golang.org/x/net/ipv6/helper.go58
-rw-r--r--vendor/golang.org/x/net/ipv6/iana.go86
-rw-r--r--vendor/golang.org/x/net/ipv6/icmp.go60
-rw-r--r--vendor/golang.org/x/net/ipv6/icmp_bsd.go30
-rw-r--r--vendor/golang.org/x/net/ipv6/icmp_linux.go27
-rw-r--r--vendor/golang.org/x/net/ipv6/icmp_solaris.go27
-rw-r--r--vendor/golang.org/x/net/ipv6/icmp_stub.go24
-rw-r--r--vendor/golang.org/x/net/ipv6/icmp_windows.go22
-rw-r--r--vendor/golang.org/x/net/ipv6/icmp_zos.go29
-rw-r--r--vendor/golang.org/x/net/ipv6/payload.go23
-rw-r--r--vendor/golang.org/x/net/ipv6/payload_cmsg.go71
-rw-r--r--vendor/golang.org/x/net/ipv6/payload_nocmsg.go39
-rw-r--r--vendor/golang.org/x/net/ipv6/sockopt.go43
-rw-r--r--vendor/golang.org/x/net/ipv6/sockopt_posix.go90
-rw-r--r--vendor/golang.org/x/net/ipv6/sockopt_stub.go47
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_aix.go80
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_asmreq.go25
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go18
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_bpf.go25
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_bpf_stub.go17
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_bsd.go60
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_darwin.go80
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_freebsd.go94
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_linux.go76
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_solaris.go76
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_ssmreq.go55
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go22
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_stub.go14
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_windows.go68
-rw-r--r--vendor/golang.org/x/net/ipv6/sys_zos.go72
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_aix_ppc64.go69
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_darwin.go64
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_dragonfly.go42
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go64
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go66
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go66
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_freebsd_arm64.go64
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_linux_386.go72
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go74
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_linux_arm.go72
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go74
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_linux_mips.go72
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go74
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go74
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go72
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go72
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go74
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go74
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_linux_riscv64.go77
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go74
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_netbsd.go42
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_openbsd.go42
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_solaris.go63
-rw-r--r--vendor/golang.org/x/net/ipv6/zsys_zos_s390x.go62
-rw-r--r--vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s2
-rw-r--r--vendor/golang.org/x/sys/cpu/byteorder.go11
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu.go165
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_aix.go (renamed from vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go)7
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_arm.go33
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_arm64.go64
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_arm64.s2
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go3
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go3
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_gc_x86.go3
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go1
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go1
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_linux.go3
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go24
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go3
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go3
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go123
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_mips64x.go7
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_mipsx.go3
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go173
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_other_arm.go10
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_other_arm64.go3
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go13
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_ppc64x.go17
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_riscv64.go3
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_s390x.go172
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_s390x.s2
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_wasm.go5
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_x86.go83
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_x86.s2
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_zos.go10
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go25
-rw-r--r--vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go27
-rw-r--r--vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go4
-rw-r--r--vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go30
-rw-r--r--vendor/golang.org/x/sys/unix/README.md15
-rw-r--r--vendor/golang.org/x/sys/unix/aliases.go3
-rw-r--r--vendor/golang.org/x/sys/unix/asm_aix_ppc64.s2
-rw-r--r--vendor/golang.org/x/sys/unix/asm_bsd_386.s (renamed from vendor/golang.org/x/sys/unix/asm_freebsd_386.s)12
-rw-r--r--vendor/golang.org/x/sys/unix/asm_bsd_amd64.s (renamed from vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s)10
-rw-r--r--vendor/golang.org/x/sys/unix/asm_bsd_arm.s (renamed from vendor/golang.org/x/sys/unix/asm_netbsd_arm.s)10
-rw-r--r--vendor/golang.org/x/sys/unix/asm_bsd_arm64.s (renamed from vendor/golang.org/x/sys/unix/asm_darwin_amd64.s)10
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_386.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_arm.s30
-rw-r--r--vendor/golang.org/x/sys/unix/asm_darwin_arm64.s30
-rw-r--r--vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_freebsd_arm.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_386.s2
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_amd64.s2
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_arm.s2
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_arm64.s2
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_mips64x.s2
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_mipsx.s2
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s2
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_riscv64.s2
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_s390x.s2
-rw-r--r--vendor/golang.org/x/sys/unix/asm_netbsd_386.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_openbsd_386.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_openbsd_arm.s29
-rw-r--r--vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s (renamed from vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s)4
-rw-r--r--vendor/golang.org/x/sys/unix/asm_solaris_amd64.s2
-rw-r--r--vendor/golang.org/x/sys/unix/asm_zos_s390x.s426
-rw-r--r--vendor/golang.org/x/sys/unix/cap_freebsd.go1
-rw-r--r--vendor/golang.org/x/sys/unix/constants.go3
-rw-r--r--vendor/golang.org/x/sys/unix/dev_aix_ppc.go4
-rw-r--r--vendor/golang.org/x/sys/unix/dev_aix_ppc64.go4
-rw-r--r--vendor/golang.org/x/sys/unix/dev_zos.go29
-rw-r--r--vendor/golang.org/x/sys/unix/dirent.go1
-rw-r--r--vendor/golang.org/x/sys/unix/endian_big.go3
-rw-r--r--vendor/golang.org/x/sys/unix/endian_little.go3
-rw-r--r--vendor/golang.org/x/sys/unix/env_unix.go3
-rw-r--r--vendor/golang.org/x/sys/unix/epoll_zos.go221
-rw-r--r--vendor/golang.org/x/sys/unix/errors_freebsd_386.go6
-rw-r--r--vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go6
-rw-r--r--vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go17
-rw-r--r--vendor/golang.org/x/sys/unix/fcntl.go1
-rw-r--r--vendor/golang.org/x/sys/unix/fcntl_darwin.go6
-rw-r--r--vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go5
-rw-r--r--vendor/golang.org/x/sys/unix/fdset.go1
-rw-r--r--vendor/golang.org/x/sys/unix/fstatfs_zos.go164
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo.go6
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo_c.c6
-rw-r--r--vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/ioctl.go10
-rw-r--r--vendor/golang.org/x/sys/unix/ioctl_linux.go196
-rw-r--r--vendor/golang.org/x/sys/unix/ioctl_zos.go74
-rw-r--r--vendor/golang.org/x/sys/unix/mkall.sh28
-rw-r--r--vendor/golang.org/x/sys/unix/mkerrors.sh74
-rw-r--r--vendor/golang.org/x/sys/unix/pagesize_unix.go1
-rw-r--r--vendor/golang.org/x/sys/unix/ptrace_darwin.go12
-rw-r--r--vendor/golang.org/x/sys/unix/ptrace_ios.go12
-rw-r--r--vendor/golang.org/x/sys/unix/race.go1
-rw-r--r--vendor/golang.org/x/sys/unix/race0.go3
-rw-r--r--vendor/golang.org/x/sys/unix/readdirent_getdents.go1
-rw-r--r--vendor/golang.org/x/sys/unix/readdirent_getdirentries.go1
-rw-r--r--vendor/golang.org/x/sys/unix/sockcmsg_unix.go3
-rw-r--r--vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go13
-rw-r--r--vendor/golang.org/x/sys/unix/str.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall.go46
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_aix.go29
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_aix_ppc.go4
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go4
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_bsd.go45
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go5
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go23
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin.go177
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_386.go23
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go9
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go23
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_arm.go21
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go25
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_dragonfly.go40
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd.go40
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd_386.go5
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go5
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_illumos.go129
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux.go347
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_386.go12
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_amd64.go5
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go4
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_arm.go18
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_arm64.go31
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_gc.go3
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go3
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go14
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go14
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go11
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_ppc.go272
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go7
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go11
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_s390x.go7
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd.go40
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd.go23
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go35
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_solaris.go30
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_unix.go20
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_unix_gc.go5
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go3
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_zos_s390x.go1781
-rw-r--r--vendor/golang.org/x/sys/unix/timestruct.go29
-rw-r--r--vendor/golang.org/x/sys/unix/xattr_bsd.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_386.go5
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go92
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go5
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go92
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go139
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go173
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go171
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go38
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go172
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux.go2808
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_386.go3365
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go3365
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_arm.go3377
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go3355
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips.go3369
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go3369
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go3369
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go3369
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go860
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go3489
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go3489
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go3339
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go3485
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go3467
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go8
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go8
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go8
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go8
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go1863
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go26
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go838
-rw-r--r--vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zptrace_x86_linux.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go4
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go4
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go3
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go306
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s18
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go1811
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go3
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go306
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s18
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go1784
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go3
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go277
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s14
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go3
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go291
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s16
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go45
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go53
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go33
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go35
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go128
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux.go (renamed from vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go)1359
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_386.go1818
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go1818
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go1818
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go1820
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go1818
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go1818
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go1818
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go1818
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go762
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go1818
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go1818
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go1816
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go1818
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go1818
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go11
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go11
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go11
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go11
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go (renamed from vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go)515
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go33
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go1217
-rw-r--r--vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go4
-rw-r--r--vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go2
-rw-r--r--vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go2
-rw-r--r--vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go280
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go2
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go2
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go2
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go2
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go256
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_386.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go433
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go221
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go2670
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go2
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go2
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_386.go41
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go60
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go48
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go60
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go48
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go50
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go35
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go23
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go65
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go40
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux.go3737
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_386.go2246
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go2249
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_arm.go2249
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go2249
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips.go2249
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go2249
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go2249
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go2249
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go627
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go2249
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go2249
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go2249
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go2249
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go2249
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go2
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go2
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go2
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go2
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go2
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go2
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go2
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go2
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go567
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go33
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go402
-rw-r--r--vendor/golang.org/x/sys/windows/dll_windows.go32
-rw-r--r--vendor/golang.org/x/sys/windows/env_windows.go11
-rw-r--r--vendor/golang.org/x/sys/windows/exec_windows.go35
-rw-r--r--vendor/golang.org/x/sys/windows/memory_windows.go25
-rw-r--r--vendor/golang.org/x/sys/windows/mkerrors.bash7
-rw-r--r--vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go39
-rw-r--r--vendor/golang.org/x/sys/windows/security_windows.go59
-rw-r--r--vendor/golang.org/x/sys/windows/service.go8
-rw-r--r--vendor/golang.org/x/sys/windows/setupapierrors_windows.go100
-rw-r--r--vendor/golang.org/x/sys/windows/svc/mgr/config.go47
-rw-r--r--vendor/golang.org/x/sys/windows/svc/mgr/mgr.go16
-rw-r--r--vendor/golang.org/x/sys/windows/svc/mgr/recovery.go12
-rw-r--r--vendor/golang.org/x/sys/windows/svc/mgr/service.go8
-rw-r--r--vendor/golang.org/x/sys/windows/svc/security.go52
-rw-r--r--vendor/golang.org/x/sys/windows/svc/service.go28
-rw-r--r--vendor/golang.org/x/sys/windows/svc/sys_windows_386.s (renamed from vendor/golang.org/x/sys/windows/svc/sys_386.s)2
-rw-r--r--vendor/golang.org/x/sys/windows/svc/sys_windows_amd64.s (renamed from vendor/golang.org/x/sys/windows/svc/sys_amd64.s)12
-rw-r--r--vendor/golang.org/x/sys/windows/svc/sys_windows_arm.s (renamed from vendor/golang.org/x/sys/windows/svc/sys_arm.s)16
-rw-r--r--vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s31
-rw-r--r--vendor/golang.org/x/sys/windows/syscall.go46
-rw-r--r--vendor/golang.org/x/sys/windows/syscall_windows.go299
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows.go1052
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows_386.go13
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows_amd64.go12
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows_arm.go13
-rw-r--r--vendor/golang.org/x/sys/windows/types_windows_arm64.go34
-rw-r--r--vendor/golang.org/x/sys/windows/zerrors_windows.go2619
-rw-r--r--vendor/golang.org/x/sys/windows/zsyscall_windows.go4774
-rw-r--r--vendor/golang.org/x/tools/AUTHORS3
-rw-r--r--vendor/golang.org/x/tools/CONTRIBUTORS3
-rw-r--r--vendor/golang.org/x/tools/LICENSE27
-rw-r--r--vendor/golang.org/x/tools/PATENTS22
-rw-r--r--vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go109
-rw-r--r--vendor/golang.org/x/tools/go/gcexportdata/importer.go73
-rw-r--r--vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go852
-rw-r--r--vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go1039
-rw-r--r--vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go93
-rw-r--r--vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go1078
-rw-r--r--vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go739
-rw-r--r--vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go630
-rw-r--r--vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go21
-rw-r--r--vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go13
-rw-r--r--vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go117
-rw-r--r--vendor/golang.org/x/tools/go/packages/doc.go221
-rw-r--r--vendor/golang.org/x/tools/go/packages/external.go101
-rw-r--r--vendor/golang.org/x/tools/go/packages/golist.go996
-rw-r--r--vendor/golang.org/x/tools/go/packages/golist_overlay.go473
-rw-r--r--vendor/golang.org/x/tools/go/packages/loadmode_string.go57
-rw-r--r--vendor/golang.org/x/tools/go/packages/packages.go1212
-rw-r--r--vendor/golang.org/x/tools/go/packages/visit.go55
-rw-r--r--vendor/golang.org/x/tools/internal/event/core/event.go85
-rw-r--r--vendor/golang.org/x/tools/internal/event/core/export.go70
-rw-r--r--vendor/golang.org/x/tools/internal/event/core/fast.go77
-rw-r--r--vendor/golang.org/x/tools/internal/event/doc.go (renamed from vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go)8
-rw-r--r--vendor/golang.org/x/tools/internal/event/event.go127
-rw-r--r--vendor/golang.org/x/tools/internal/event/keys/keys.go564
-rw-r--r--vendor/golang.org/x/tools/internal/event/keys/standard.go22
-rw-r--r--vendor/golang.org/x/tools/internal/event/label/label.go213
-rw-r--r--vendor/golang.org/x/tools/internal/gocommand/invoke.go230
-rw-r--r--vendor/golang.org/x/tools/internal/gocommand/vendor.go102
-rw-r--r--vendor/golang.org/x/tools/internal/packagesinternal/packages.go14
-rw-r--r--vendor/golang.org/x/tools/internal/typesinternal/types.go28
-rw-r--r--vendor/golang.org/x/xerrors/LICENSE27
-rw-r--r--vendor/golang.org/x/xerrors/PATENTS22
-rw-r--r--vendor/golang.org/x/xerrors/README2
-rw-r--r--vendor/golang.org/x/xerrors/adaptor.go193
-rw-r--r--vendor/golang.org/x/xerrors/codereview.cfg1
-rw-r--r--vendor/golang.org/x/xerrors/doc.go22
-rw-r--r--vendor/golang.org/x/xerrors/errors.go33
-rw-r--r--vendor/golang.org/x/xerrors/fmt.go187
-rw-r--r--vendor/golang.org/x/xerrors/format.go34
-rw-r--r--vendor/golang.org/x/xerrors/frame.go56
-rw-r--r--vendor/golang.org/x/xerrors/go.mod3
-rw-r--r--vendor/golang.org/x/xerrors/internal/internal.go8
-rw-r--r--vendor/golang.org/x/xerrors/wrap.go106
-rw-r--r--vendor/modules.txt181
1616 files changed, 234221 insertions, 104739 deletions
diff --git a/go.mod b/go.mod
index eefa779..5546621 100644
--- a/go.mod
+++ b/go.mod
@@ -4,19 +4,23 @@ go 1.14
require (
0xacab.org/leap/shapeshifter v0.0.0-20191029173606-85d3e8ac43e2
+ git.torproject.org/pluggable-transports/goptlib.git v1.1.0
+ git.torproject.org/pluggable-transports/snowflake.git v1.1.0
github.com/OperatorFoundation/obfs4 v0.0.0-20161108041644-17f2cb99c264 // indirect
github.com/OperatorFoundation/shapeshifter-ipc v0.0.0-20170814234159-11746ba927e0 // indirect
github.com/OperatorFoundation/shapeshifter-transports v0.0.0-20191101030951-7a751b0500f4 // indirect
github.com/ProtonMail/go-autostart v0.0.0-20181114175602-c5272053443a
github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect
github.com/apparentlymart/go-openvpn-mgmt v0.0.0-20161009010951-9a305aecd7f2
+ github.com/cretz/bine v0.2.0
github.com/dchest/siphash v1.2.1 // indirect
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19
+ github.com/pion/webrtc/v3 v3.0.15
github.com/rakyll/statik v0.1.7
github.com/sevlyar/go-daemon v0.1.5
- github.com/stretchr/testify v1.3.0 // indirect
- golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59 // indirect
- golang.org/x/net v0.0.0-20200226121028-0de0cce0169b // indirect
- golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4
+ github.com/smartystreets/goconvey v1.6.4
+ github.com/xtaci/kcp-go/v5 v5.6.1
+ github.com/xtaci/smux v1.5.15
+ golang.org/x/sys v0.0.0-20210423082822-04245dca01da
)
diff --git a/go.sum b/go.sum
index 195f05f..07b1a13 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,13 @@
0xacab.org/leap/shapeshifter v0.0.0-20191029173606-85d3e8ac43e2 h1:+IGQXhBErpPeZPbeQgmGZXbcCC39kJXwWC377r8cvkw=
0xacab.org/leap/shapeshifter v0.0.0-20191029173606-85d3e8ac43e2/go.mod h1:TRHdLzHFv5wZnWXkuqpRzEdMFk9ICgvPXmcSupSfjk8=
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+git.torproject.org/pluggable-transports/goptlib.git v1.1.0 h1:LMQAA8pAho+QtYrrVNimJQiINNEwcwuuD99vezD/PAo=
+git.torproject.org/pluggable-transports/goptlib.git v1.1.0/go.mod h1:YT4XMSkuEXbtqlydr9+OxqFAyspUv0Gr9qhM3B++o/Q=
+git.torproject.org/pluggable-transports/snowflake.git v1.1.0 h1:rl/LloEeBG1sqdZdVxdW1Gmb/c3ZjdvT5o3RV8iaDg4=
+git.torproject.org/pluggable-transports/snowflake.git v1.1.0/go.mod h1:+a2yI6dfEjwEnqPgXTtKobeHDEdgJa3ANZN4bjSQk+M=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/OperatorFoundation/obfs4 v0.0.0-20161108041644-17f2cb99c264 h1:8UbFvUSYrlcEU9W92tohq74kYvtXJo11WLI16TMi904=
github.com/OperatorFoundation/obfs4 v0.0.0-20161108041644-17f2cb99c264/go.mod h1:oxwvRzQ4FDp7ysA1En4F/pyOh2Jfef4YTo1YhHUsBOA=
github.com/OperatorFoundation/shapeshifter-ipc v0.0.0-20170814234159-11746ba927e0 h1:zDYt6FDJwDSX4woVFVK2EMt7fkxU5L5qDNLUjQwA+BQ=
@@ -8,35 +16,547 @@ github.com/OperatorFoundation/shapeshifter-transports v0.0.0-20191101030951-7a75
github.com/OperatorFoundation/shapeshifter-transports v0.0.0-20191101030951-7a751b0500f4/go.mod h1:u3jvRgYV13oHabVAdXekh3yk9PHfpCKvB8uolQEs4jA=
github.com/ProtonMail/go-autostart v0.0.0-20181114175602-c5272053443a h1:fXK2KsfnkBV9Nh+9SKzHchYjuE9s0vI20JG1mbtEAcc=
github.com/ProtonMail/go-autostart v0.0.0-20181114175602-c5272053443a/go.mod h1:oTGdE7/DlWIr23G0IKW3OXK9wZ5Hw1GGiaJFccTvZi4=
+github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
+github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
+github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
+github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 h1:w1UutsfOrms1J05zt7ISrnJIXKzwaspym5BTKGx93EI=
github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0=
+github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
+github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
+github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apparentlymart/go-openvpn-mgmt v0.0.0-20161009010951-9a305aecd7f2 h1:E7mgGSu7JSN+ELgOq2Pddy8fVfAbMN8u1jUvpKpHtXg=
github.com/apparentlymart/go-openvpn-mgmt v0.0.0-20161009010951-9a305aecd7f2/go.mod h1:69IHK2p7ZvTuKqxDx3vRWZRyBhLh2rNJN3b6XnjCVhY=
+github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
+github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
+github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
+github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
+github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
+github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
+github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
+github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
+github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
+github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
+github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
+github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
+github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
+github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
+github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
+github.com/cretz/bine v0.2.0 h1:8GiDRGlTgz+o8H9DSnsl+5MeBK4HsExxgl6WgzOCuZo=
+github.com/cretz/bine v0.2.0/go.mod h1:WU4o9QR9wWp8AVKtTM1XD5vUHkEqnf2vVSo6dBqbetI=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dchest/siphash v1.2.1 h1:4cLinnzVJDKxTCl9B01807Yiy+W7ZzVHj/KIroQRvT4=
github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4=
+github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
+github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
+github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
+github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
+github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
+github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
+github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
+github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
+github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
+github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
+github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
+github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
+github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
+github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
+github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
+github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
+github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
+github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
+github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
+github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
+github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
+github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
+github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
+github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
+github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
+github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
+github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
+github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
+github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
+github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
+github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
+github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
+github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
+github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
+github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
+github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
+github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
+github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
+github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
+github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
+github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
+github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
+github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
+github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
+github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
+github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
+github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA=
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 h1:WjT3fLi9n8YWh/Ih8Q1LHAPsTqGddPcHqscN+PJ3i68=
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ=
+github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/klauspost/cpuid v1.2.4/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
+github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s=
+github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4=
+github.com/klauspost/reedsolomon v1.9.9 h1:qCL7LZlv17xMixl55nq2/Oa1Y86nfO8EqDfv2GHND54=
+github.com/klauspost/reedsolomon v1.9.9/go.mod h1:O7yFFHiQwDR6b2t63KPUpccPtNdp5ADgh1gg4fd12wo=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
+github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
+github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
+github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
+github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
+github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
+github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
+github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
+github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
+github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
+github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/mmcloughlin/avo v0.0.0-20200803215136-443f81d77104 h1:ULR/QWMgcgRiZLUjSSJMU+fW+RDMstRdmnDWj9Q+AsA=
+github.com/mmcloughlin/avo v0.0.0-20200803215136-443f81d77104/go.mod h1:wqKykBG2QzQDJEzvRkcS8x6MiSJkF52hXZsXcjaB3ls=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
+github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU=
+github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k=
+github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
+github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
+github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
+github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
+github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
+github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
+github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
+github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
+github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
+github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
+github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
+github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
+github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
+github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
+github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
+github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
+github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
+github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
+github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA=
+github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
+github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
+github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
+github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
+github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
+github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
+github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
+github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
+github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
+github.com/pion/datachannel v1.4.21 h1:3ZvhNyfmxsAqltQrApLPQMhSFNA+aT87RqyCq4OXmf0=
+github.com/pion/datachannel v1.4.21/go.mod h1:oiNyP4gHx2DIwRzX/MFyH0Rz/Gz05OgBlayAI2hAWjg=
+github.com/pion/dtls/v2 v2.0.4/go.mod h1:qAkFscX0ZHoI1E07RfYPoRw3manThveu+mlTDdOxoGI=
+github.com/pion/dtls/v2 v2.0.8 h1:reGe8rNIMfO/UAeFLqO61tl64t154Qfkr4U3Gzu1tsg=
+github.com/pion/dtls/v2 v2.0.8/go.mod h1:QuDII+8FVvk9Dp5t5vYIMTo7hh7uBkra+8QIm7QGm10=
+github.com/pion/ice/v2 v2.0.15 h1:KZrwa2ciL9od8+TUVJiYTNsCW9J5lktBjGwW1MacEnQ=
+github.com/pion/ice/v2 v2.0.15/go.mod h1:ZIiVGevpgAxF/cXiIVmuIUtCb3Xs4gCzCbXB6+nFkSI=
+github.com/pion/interceptor v0.0.10 h1:dXFyFWRJFwmzQqyn0U8dUAbOJu+JJnMVAqxmvTu30B4=
+github.com/pion/interceptor v0.0.10/go.mod h1:qzeuWuD/ZXvPqOnxNcnhWfkCZ2e1kwwslicyyPnhoK4=
+github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
+github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
+github.com/pion/mdns v0.0.4 h1:O4vvVqr4DGX63vzmO6Fw9vpy3lfztVWHGCQfyw0ZLSY=
+github.com/pion/mdns v0.0.4/go.mod h1:R1sL0p50l42S5lJs91oNdUL58nm0QHrhxnSegr++qC0=
+github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
+github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
+github.com/pion/rtcp v1.2.6 h1:1zvwBbyd0TeEuuWftrd/4d++m+/kZSeiguxU61LFWpo=
+github.com/pion/rtcp v1.2.6/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE0=
+github.com/pion/rtp v1.6.2 h1:iGBerLX6JiDjB9NXuaPzHyxHFG9JsIEdgwTC0lp5n/U=
+github.com/pion/rtp v1.6.2/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
+github.com/pion/sctp v1.7.10/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0=
+github.com/pion/sctp v1.7.11 h1:UCnj7MsobLKLuP/Hh+JMiI/6W5Bs/VF45lWKgHFjSIE=
+github.com/pion/sctp v1.7.11/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0=
+github.com/pion/sdp/v3 v3.0.4 h1:2Kf+dgrzJflNCSw3TV5v2VLeI0s/qkzy2r5jlR0wzf8=
+github.com/pion/sdp/v3 v3.0.4/go.mod h1:bNiSknmJE0HYBprTHXKPQ3+JjacTv5uap92ueJZKsRk=
+github.com/pion/srtp/v2 v2.0.2 h1:664iGzVmaY7KYS5M0gleY0DscRo9ReDfTxQrq4UgGoU=
+github.com/pion/srtp/v2 v2.0.2/go.mod h1:VEyLv4CuxrwGY8cxM+Ng3bmVy8ckz/1t6A0q/msKOw0=
+github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg=
+github.com/pion/stun v0.3.5/go.mod h1:gDMim+47EeEtfWogA37n6qXZS88L5V6LqFcf+DZA2UA=
+github.com/pion/transport v0.8.10/go.mod h1:tBmha/UCjpum5hqTWhfAEs3CO4/tHSg0MYRhSzR+CZ8=
+github.com/pion/transport v0.10.0/go.mod h1:BnHnUipd0rZQyTVB2SBGojFHT9CBt5C5TcsJSQGkvSE=
+github.com/pion/transport v0.10.1/go.mod h1:PBis1stIILMiis0PewDw91WJeLJkyIMcEk+DwKOzf4A=
+github.com/pion/transport v0.12.1/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q=
+github.com/pion/transport v0.12.2/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q=
+github.com/pion/transport v0.12.3 h1:vdBfvfU/0Wq8kd2yhUMSDB/x+O4Z9MYVl2fJ5BT4JZw=
+github.com/pion/transport v0.12.3/go.mod h1:OViWW9SP2peE/HbwBvARicmAVnesphkNkCVZIWJ6q9A=
+github.com/pion/turn/v2 v2.0.5 h1:iwMHqDfPEDEOFzwWKT56eFmh6DYC6o/+xnLAEzgISbA=
+github.com/pion/turn/v2 v2.0.5/go.mod h1:APg43CFyt/14Uy7heYUOGWdkem/Wu4PhCO/bjyrTqMw=
+github.com/pion/udp v0.1.0 h1:uGxQsNyrqG3GLINv36Ff60covYmfrLoxzwnCsIYspXI=
+github.com/pion/udp v0.1.0/go.mod h1:BPELIjbwE9PRbd/zxI/KYBnbo7B6+oA6YuEaNE8lths=
+github.com/pion/webrtc/v3 v3.0.15 h1:g8MMJohjQoj0+pTrU329tWM6dvCieNTgnjtqv1kmEdY=
+github.com/pion/webrtc/v3 v3.0.15/go.mod h1:uUt2nRSsCnK/nfzTAfOmaeLan26ZJ0aP9iwjc/gcC2Y=
+github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
+github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
+github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
+github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
+github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
+github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU=
+github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
+github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
+github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
+github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
+github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
+github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ=
github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc=
+github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
+github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
+github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
+github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
+github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/sevlyar/go-daemon v0.1.5 h1:Zy/6jLbM8CfqJ4x4RPr7MJlSKt90f00kNM1D401C+Qk=
github.com/sevlyar/go-daemon v0.1.5/go.mod h1:6dJpPatBT9eUwM5VCw9Bt6CdX9Tk6UWvhW3MebLDRKE=
+github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
+github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
+github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
+github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
+github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
+github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
+github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
+github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
+github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
+github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
+github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/templexxx/cpu v0.0.1/go.mod h1:w7Tb+7qgcAlIyX4NhLuDKt78AHA5SzPmq0Wj6HiEnnk=
+github.com/templexxx/cpu v0.0.7 h1:pUEZn8JBy/w5yzdYWgx+0m0xL9uk6j4K91C5kOViAzo=
+github.com/templexxx/cpu v0.0.7/go.mod h1:w7Tb+7qgcAlIyX4NhLuDKt78AHA5SzPmq0Wj6HiEnnk=
+github.com/templexxx/xorsimd v0.4.1 h1:iUZcywbOYDRAZUasAs2eSCUW8eobuZDy0I9FJiORkVg=
+github.com/templexxx/xorsimd v0.4.1/go.mod h1:W+ffZz8jJMH2SXwuKu9WhygqBMbFnp14G2fqEr8qaNo=
+github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM=
+github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w=
+github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
+github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
+github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
+github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
+github.com/xtaci/kcp-go/v5 v5.6.1 h1:Pwn0aoeNSPF9dTS7IgiPXn0HEtaIlVb6y5UKWPsx8bI=
+github.com/xtaci/kcp-go/v5 v5.6.1/go.mod h1:W3kVPyNYwZ06p79dNwFWQOVFrdcBpDBsdyvK8moQrYo=
+github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE=
+github.com/xtaci/smux v1.5.15 h1:6hMiXswcleXj5oNfcJc+DXS8Vj36XX2LaX98udog6Kc=
+github.com/xtaci/smux v1.5.15/go.mod h1:OMlQbT5vcgl2gb49mFkYo6SMf+zP3rcjcwQz7ZU7IGY=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
+go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
+go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
+go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
+go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
+go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
+go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
+go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
+go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
+go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
+go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
+golang.org/x/arch v0.0.0-20190909030613-46d78d1859ac/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4=
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59 h1:PyXRxSVbvzDGuqYXjHndV7xDzJ7w2K8KD9Ef8GB7KOE=
golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
+golang.org/x/crypto v0.0.0-20210317152858-513c2a44f670 h1:gzMM0EjIYiRmJI3+jBdFuoynZlpxa2JQZsolKu09BXo=
+golang.org/x/crypto v0.0.0-20210317152858-513c2a44f670/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
+golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a h1:kr2P4QFmQr29mSLA43kwrOcgcReGTfbE9N577tCTuBc=
+golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
+golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
+golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
+golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 h1:b0LrWgu8+q7z4J+0Y3Umo5q1dL7NXBkKBWkaVkAq17E=
+golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
+golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo=
+golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4 h1:sfkvUWPNGwSV+8/fNqctR5lS2AqCSqYwXdrjCxp/dXo=
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200808120158-1030fc2bf1d9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210317225723-c4fcb01b228e h1:XNp2Flc/1eWQGk5BLzqTAN7fQIwIbfyVTuVxXxZh73M=
+golang.org/x/sys v0.0.0-20210317225723-c4fcb01b228e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
+golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200425043458-8463f397d07c/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200808161706-5bf02b21f123 h1:4JSJPND/+4555t1HfXYF4UEqDqiSKCgeV0+hbA8hMs4=
+golang.org/x/tools v0.0.0-20200808161706-5bf02b21f123/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
+google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
+google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
+google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
+google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
+google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
+gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
+gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
+gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
+rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
+sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
+sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
diff --git a/vendor/git.torproject.org/pluggable-transports/goptlib.git/.gitignore b/vendor/git.torproject.org/pluggable-transports/goptlib.git/.gitignore
new file mode 100644
index 0000000..d4d5132
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/goptlib.git/.gitignore
@@ -0,0 +1,2 @@
+/examples/dummy-client/dummy-client
+/examples/dummy-server/dummy-server
diff --git a/vendor/git.torproject.org/pluggable-transports/goptlib.git/COPYING b/vendor/git.torproject.org/pluggable-transports/goptlib.git/COPYING
new file mode 100644
index 0000000..0e259d4
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/goptlib.git/COPYING
@@ -0,0 +1,121 @@
+Creative Commons Legal Code
+
+CC0 1.0 Universal
+
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
+ HEREUNDER.
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator
+and subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for
+the purpose of contributing to a commons of creative, cultural and
+scientific works ("Commons") that the public can reliably and without fear
+of later claims of infringement build upon, modify, incorporate in other
+works, reuse and redistribute as freely as possible in any form whatsoever
+and for any purposes, including without limitation commercial purposes.
+These owners may contribute to the Commons to promote the ideal of a free
+culture and the further production of creative, cultural and scientific
+works, or to gain reputation or greater distribution for their Work in
+part through the use and efforts of others.
+
+For these and/or other purposes and motivations, and without any
+expectation of additional consideration or compensation, the person
+associating CC0 with a Work (the "Affirmer"), to the extent that he or she
+is an owner of Copyright and Related Rights in the Work, voluntarily
+elects to apply CC0 to the Work and publicly distribute the Work under its
+terms, with knowledge of his or her Copyright and Related Rights in the
+Work and the meaning and intended legal effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not
+limited to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display,
+ communicate, and translate a Work;
+ ii. moral rights retained by the original author(s) and/or performer(s);
+iii. publicity and privacy rights pertaining to a person's image or
+ likeness depicted in a Work;
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+ v. rights protecting the extraction, dissemination, use and reuse of data
+ in a Work;
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation
+ thereof, including any amended or successor version of such
+ directive); and
+vii. other similar, equivalent or corresponding rights throughout the
+ world based on applicable law or treaty, and any national
+ implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention
+of, applicable law, Affirmer hereby overtly, fully, permanently,
+irrevocably and unconditionally waives, abandons, and surrenders all of
+Affirmer's Copyright and Related Rights and associated claims and causes
+of action, whether now known or unknown (including existing as well as
+future claims and causes of action), in the Work (i) in all territories
+worldwide, (ii) for the maximum duration provided by applicable law or
+treaty (including future time extensions), (iii) in any current or future
+medium and for any number of copies, and (iv) for any purpose whatsoever,
+including without limitation commercial, advertising or promotional
+purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
+member of the public at large and to the detriment of Affirmer's heirs and
+successors, fully intending that such Waiver shall not be subject to
+revocation, rescission, cancellation, termination, or any other legal or
+equitable action to disrupt the quiet enjoyment of the Work by the public
+as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason
+be judged legally invalid or ineffective under applicable law, then the
+Waiver shall be preserved to the maximum extent permitted taking into
+account Affirmer's express Statement of Purpose. In addition, to the
+extent the Waiver is so judged Affirmer hereby grants to each affected
+person a royalty-free, non transferable, non sublicensable, non exclusive,
+irrevocable and unconditional license to exercise Affirmer's Copyright and
+Related Rights in the Work (i) in all territories worldwide, (ii) for the
+maximum duration provided by applicable law or treaty (including future
+time extensions), (iii) in any current or future medium and for any number
+of copies, and (iv) for any purpose whatsoever, including without
+limitation commercial, advertising or promotional purposes (the
+"License"). The License shall be deemed effective as of the date CC0 was
+applied by Affirmer to the Work. Should any part of the License for any
+reason be judged legally invalid or ineffective under applicable law, such
+partial invalidity or ineffectiveness shall not invalidate the remainder
+of the License, and in such case Affirmer hereby affirms that he or she
+will not (i) exercise any of his or her remaining Copyright and Related
+Rights in the Work or (ii) assert any associated claims and causes of
+action with respect to the Work, in either case contrary to Affirmer's
+express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+ b. Affirmer offers the Work as-is and makes no representations or
+ warranties of any kind concerning the Work, express, implied,
+ statutory or otherwise, including without limitation warranties of
+ title, merchantability, fitness for a particular purpose, non
+ infringement, or the absence of latent or other defects, accuracy, or
+ the present or absence of errors, whether or not discoverable, all to
+ the greatest extent permissible under applicable law.
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without
+ limitation any person's Copyright and Related Rights in the Work.
+ Further, Affirmer disclaims responsibility for obtaining any necessary
+ consents, permissions or other rights required for any use of the
+ Work.
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to
+ this CC0 or use of the Work.
diff --git a/vendor/git.torproject.org/pluggable-transports/goptlib.git/ChangeLog b/vendor/git.torproject.org/pluggable-transports/goptlib.git/ChangeLog
new file mode 100644
index 0000000..2aae857
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/goptlib.git/ChangeLog
@@ -0,0 +1,60 @@
+== v1.1.0
+
+Added the Log function.
+https://bugs.torproject.org/28940
+
+== v1.0.0
+
+Changed the tag naming scheme to work better with Go modules.
+https://github.com/golang/go/wiki/Modules#semantic-import-versioning
+
+== 0.7
+
+Fixed the ProxyError function; previously it would always panic.
+
+Repeated transport names in TOR_PT_SERVER_BINDADDR now result in an
+ENV-ERROR.
+https://bugs.torproject.org/21261
+
+== 0.6
+
+Remove all support for the "*" transport specification. The argument to
+the ClientSetup and ServerSetup functions is now unused.
+https://bugs.torproject.org/15612
+
+Replaced SOCKS4a with SOCKS5.
+https://bugs.torproject.org/12535
+
+== 0.5
+
+The AcceptSocks function no longer reports non-permanent errors, such as
+those caused by a faulty SOCKS handshake.
+
+Added support for an upstream proxy (TOR_PT_PROXY). The two new
+functions are ProxyError and ProxyDone. The ClientInfo struct has a new
+ProxyURL member.
+https://bugs.torproject.org/12125
+
+== 0.4
+
+Read the ExtORPort cookie file on every call to DialOr, instead of
+reading it once and caching the result. This is to work around a tor bug
+where tor doesn't ensure a new cookie file is written before starting
+pluggable transports.
+https://bugs.torproject.org/15240
+
+== 0.3
+
+Made output functions panic intead of backslash-escaping. Escaping of
+invalid bytes is not specified by pt-spec, and backslashes conflicted
+with the specified escaping of SMETHOD ARGS.
+https://bugs.torproject.org/13370
+
+== 0.2
+
+Added the MakeStateDir function.
+
+== 0.1
+== 0.0
+
+Initial release.
diff --git a/vendor/git.torproject.org/pluggable-transports/goptlib.git/README b/vendor/git.torproject.org/pluggable-transports/goptlib.git/README
new file mode 100644
index 0000000..dc605d1
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/goptlib.git/README
@@ -0,0 +1,27 @@
+goptlib is a library for writing Tor pluggable transports in Go.
+
+https://spec.torproject.org/pt-spec
+https://gitweb.torproject.org/torspec.git/tree/proposals/196-transport-control-ports.txt
+https://gitweb.torproject.org/torspec.git/tree/proposals/217-ext-orport-auth.txt
+https://gitweb.torproject.org/torspec.git/tree/proposals/232-pluggable-transports-through-proxy.txt
+
+To download a copy of the library into $GOPATH:
+ go get git.torproject.org/pluggable-transports/goptlib.git
+
+See the included example programs for examples of how to use the
+library. To build them, enter their directory and run "go build".
+ examples/dummy-client/dummy-client.go
+ examples/dummy-server/dummy-server.go
+The recommended way to start writing a new transport plugin is to copy
+dummy-client or dummy-server and make changes to it.
+
+There is browseable documentation here:
+https://godoc.org/git.torproject.org/pluggable-transports/goptlib.git
+
+Report bugs to the tor-dev@lists.torproject.org mailing list or to the
+bug tracker at https://trac.torproject.org/projects/tor.
+
+To the extent possible under law, the authors have dedicated all
+copyright and related and neighboring rights to this software to the
+public domain worldwide. This software is distributed without any
+warranty. See COPYING.
diff --git a/vendor/git.torproject.org/pluggable-transports/goptlib.git/args.go b/vendor/git.torproject.org/pluggable-transports/goptlib.git/args.go
new file mode 100644
index 0000000..c50bc93
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/goptlib.git/args.go
@@ -0,0 +1,219 @@
+package pt
+
+import (
+ "bytes"
+ "fmt"
+ "sort"
+ "strings"
+)
+
+// Key–value mappings for the representation of client and server options.
+
+// Args maps a string key to a list of values. It is similar to url.Values.
+type Args map[string][]string
+
+// Get the first value associated with the given key. If there are any values
+// associated with the key, the value return has the value and ok is set to
+// true. If there are no values for the given key, value is "" and ok is false.
+// If you need access to multiple values, use the map directly.
+func (args Args) Get(key string) (value string, ok bool) {
+ if args == nil {
+ return "", false
+ }
+ vals, ok := args[key]
+ if !ok || len(vals) == 0 {
+ return "", false
+ }
+ return vals[0], true
+}
+
+// Append value to the list of values for key.
+func (args Args) Add(key, value string) {
+ args[key] = append(args[key], value)
+}
+
+// Return the index of the next unescaped byte in s that is in the term set, or
+// else the length of the string if no terminators appear. Additionally return
+// the unescaped string up to the returned index.
+func indexUnescaped(s string, term []byte) (int, string, error) {
+ var i int
+ unesc := make([]byte, 0)
+ for i = 0; i < len(s); i++ {
+ b := s[i]
+ // A terminator byte?
+ if bytes.IndexByte(term, b) != -1 {
+ break
+ }
+ if b == '\\' {
+ i++
+ if i >= len(s) {
+ return 0, "", fmt.Errorf("nothing following final escape in %q", s)
+ }
+ b = s[i]
+ }
+ unesc = append(unesc, b)
+ }
+ return i, string(unesc), nil
+}
+
+// Parse a name–value mapping as from an encoded SOCKS username/password.
+//
+// "First the '<Key>=<Value>' formatted arguments MUST be escaped, such that all
+// backslash, equal sign, and semicolon characters are escaped with a
+// backslash."
+func parseClientParameters(s string) (args Args, err error) {
+ args = make(Args)
+ if len(s) == 0 {
+ return
+ }
+ i := 0
+ for {
+ var key, value string
+ var offset, begin int
+
+ begin = i
+ // Read the key.
+ offset, key, err = indexUnescaped(s[i:], []byte{'=', ';'})
+ if err != nil {
+ return
+ }
+ i += offset
+ // End of string or no equals sign?
+ if i >= len(s) || s[i] != '=' {
+ err = fmt.Errorf("no equals sign in %q", s[begin:i])
+ return
+ }
+ // Skip the equals sign.
+ i++
+ // Read the value.
+ offset, value, err = indexUnescaped(s[i:], []byte{';'})
+ if err != nil {
+ return
+ }
+ i += offset
+ if len(key) == 0 {
+ err = fmt.Errorf("empty key in %q", s[begin:i])
+ return
+ }
+ args.Add(key, value)
+ if i >= len(s) {
+ break
+ }
+ // Skip the semicolon.
+ i++
+ }
+ return args, nil
+}
+
+// Parse a transport–name–value mapping as from TOR_PT_SERVER_TRANSPORT_OPTIONS.
+//
+// "...a semicolon-separated list of <key>:<value> pairs, where <key> is a PT
+// name and <value> is a k=v string value with options that are to be passed to
+// the transport. Colons, semicolons, equal signs and backslashes must be
+// escaped with a backslash."
+// Example: scramblesuit:key=banana;automata:rule=110;automata:depth=3
+func parseServerTransportOptions(s string) (opts map[string]Args, err error) {
+ opts = make(map[string]Args)
+ if len(s) == 0 {
+ return
+ }
+ i := 0
+ for {
+ var methodName, key, value string
+ var offset, begin int
+
+ begin = i
+ // Read the method name.
+ offset, methodName, err = indexUnescaped(s[i:], []byte{':', '=', ';'})
+ if err != nil {
+ return
+ }
+ i += offset
+ // End of string or no colon?
+ if i >= len(s) || s[i] != ':' {
+ err = fmt.Errorf("no colon in %q", s[begin:i])
+ return
+ }
+ // Skip the colon.
+ i++
+ // Read the key.
+ offset, key, err = indexUnescaped(s[i:], []byte{'=', ';'})
+ if err != nil {
+ return
+ }
+ i += offset
+ // End of string or no equals sign?
+ if i >= len(s) || s[i] != '=' {
+ err = fmt.Errorf("no equals sign in %q", s[begin:i])
+ return
+ }
+ // Skip the equals sign.
+ i++
+ // Read the value.
+ offset, value, err = indexUnescaped(s[i:], []byte{';'})
+ if err != nil {
+ return
+ }
+ i += offset
+ if len(methodName) == 0 {
+ err = fmt.Errorf("empty method name in %q", s[begin:i])
+ return
+ }
+ if len(key) == 0 {
+ err = fmt.Errorf("empty key in %q", s[begin:i])
+ return
+ }
+ if opts[methodName] == nil {
+ opts[methodName] = make(Args)
+ }
+ opts[methodName].Add(key, value)
+ if i >= len(s) {
+ break
+ }
+ // Skip the semicolon.
+ i++
+ }
+ return opts, nil
+}
+
+// Escape backslashes and all the bytes that are in set.
+func backslashEscape(s string, set []byte) string {
+ var buf bytes.Buffer
+ for _, b := range []byte(s) {
+ if b == '\\' || bytes.IndexByte(set, b) != -1 {
+ buf.WriteByte('\\')
+ }
+ buf.WriteByte(b)
+ }
+ return buf.String()
+}
+
+// Encode a name–value mapping so that it is suitable to go in the ARGS option
+// of an SMETHOD line. The output is sorted by key. The "ARGS:" prefix is not
+// added.
+//
+// "Equal signs and commas [and backslashes] MUST be escaped with a backslash."
+func encodeSmethodArgs(args Args) string {
+ if args == nil {
+ return ""
+ }
+
+ keys := make([]string, 0, len(args))
+ for key := range args {
+ keys = append(keys, key)
+ }
+ sort.Strings(keys)
+
+ escape := func(s string) string {
+ return backslashEscape(s, []byte{'=', ','})
+ }
+
+ var pairs []string
+ for _, key := range keys {
+ for _, value := range args[key] {
+ pairs = append(pairs, escape(key)+"="+escape(value))
+ }
+ }
+
+ return strings.Join(pairs, ",")
+}
diff --git a/vendor/git.torproject.org/pluggable-transports/goptlib.git/pt.go b/vendor/git.torproject.org/pluggable-transports/goptlib.git/pt.go
new file mode 100644
index 0000000..23893f4
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/goptlib.git/pt.go
@@ -0,0 +1,1033 @@
+// Package pt implements the Tor pluggable transports specification.
+//
+// Sample client usage:
+// var ptInfo pt.ClientInfo
+// ...
+// func handler(conn *pt.SocksConn) error {
+// defer conn.Close()
+// remote, err := net.Dial("tcp", conn.Req.Target)
+// if err != nil {
+// conn.Reject()
+// return err
+// }
+// defer remote.Close()
+// err = conn.Grant(remote.RemoteAddr().(*net.TCPAddr))
+// if err != nil {
+// return err
+// }
+// // do something with conn and remote.
+// return nil
+// }
+// func acceptLoop(ln *pt.SocksListener) error {
+// defer ln.Close()
+// for {
+// conn, err := ln.AcceptSocks()
+// if err != nil {
+// if e, ok := err.(net.Error); ok && e.Temporary() {
+// pt.Log(pt.LogSeverityError, "accept error: " + err.Error())
+// continue
+// }
+// return err
+// }
+// go handler(conn)
+// }
+// return nil
+// }
+// ...
+// func main() {
+// var err error
+// ptInfo, err = pt.ClientSetup(nil)
+// if err != nil {
+// os.Exit(1)
+// }
+// if ptInfo.ProxyURL != nil {
+// // you need to interpret the proxy URL yourself
+// // call pt.ProxyDone instead if it's a type you understand
+// pt.ProxyError(fmt.Sprintf("proxy %s is not supported", ptInfo.ProxyURL))
+// os.Exit(1)
+// }
+// for _, methodName := range ptInfo.MethodNames {
+// switch methodName {
+// case "foo":
+// ln, err := pt.ListenSocks("tcp", "127.0.0.1:0")
+// if err != nil {
+// pt.CmethodError(methodName, err.Error())
+// break
+// }
+// go acceptLoop(ln)
+// pt.Cmethod(methodName, ln.Version(), ln.Addr())
+// default:
+// pt.CmethodError(methodName, "no such method")
+// }
+// }
+// pt.CmethodsDone()
+// }
+//
+// Sample server usage:
+// var ptInfo pt.ServerInfo
+// ...
+// func handler(conn net.Conn) error {
+// defer conn.Close()
+// or, err := pt.DialOr(&ptInfo, conn.RemoteAddr().String(), "foo")
+// if err != nil {
+// return
+// }
+// defer or.Close()
+// // do something with or and conn
+// return nil
+// }
+// func acceptLoop(ln net.Listener) error {
+// defer ln.Close()
+// for {
+// conn, err := ln.Accept()
+// if err != nil {
+// if e, ok := err.(net.Error); ok && e.Temporary() {
+// continue
+// }
+// pt.Log(pt.LogSeverityError, "accept error: " + err.Error())
+// return err
+// }
+// go handler(conn)
+// }
+// return nil
+// }
+// ...
+// func main() {
+// var err error
+// ptInfo, err = pt.ServerSetup(nil)
+// if err != nil {
+// os.Exit(1)
+// }
+// for _, bindaddr := range ptInfo.Bindaddrs {
+// switch bindaddr.MethodName {
+// case "foo":
+// ln, err := net.ListenTCP("tcp", bindaddr.Addr)
+// if err != nil {
+// pt.SmethodError(bindaddr.MethodName, err.Error())
+// break
+// }
+// go acceptLoop(ln)
+// pt.Smethod(bindaddr.MethodName, ln.Addr())
+// default:
+// pt.SmethodError(bindaddr.MethodName, "no such method")
+// }
+// }
+// pt.SmethodsDone()
+// }
+//
+// Some additional care is needed to handle signals and shutdown properly. See
+// the example programs dummy-client and dummy-server.
+//
+// Tor pluggable transports specification:
+// https://spec.torproject.org/pt-spec
+//
+// Extended ORPort:
+// https://gitweb.torproject.org/torspec.git/tree/proposals/196-transport-control-ports.txt
+//
+// Extended ORPort Authentication:
+// https://gitweb.torproject.org/torspec.git/tree/proposals/217-ext-orport-auth.txt
+//
+// Pluggable Transport through SOCKS proxy:
+// https://gitweb.torproject.org/torspec.git/tree/proposals/232-pluggable-transports-through-proxy.txt
+//
+// The package implements a SOCKS5 server sufficient for a Tor client transport
+// plugin.
+//
+// https://www.ietf.org/rfc/rfc1928.txt
+// https://www.ietf.org/rfc/rfc1929.txt
+package pt
+
+import (
+ "bytes"
+ "crypto/hmac"
+ "crypto/rand"
+ "crypto/sha256"
+ "crypto/subtle"
+ "encoding/binary"
+ "fmt"
+ "io"
+ "net"
+ "net/url"
+ "os"
+ "strconv"
+ "strings"
+ "time"
+)
+
+// This type wraps a Write method and calls Sync after each Write.
+type syncWriter struct {
+ *os.File
+}
+
+// Call File.Write and then Sync. An error is returned if either operation
+// returns an error.
+func (w syncWriter) Write(p []byte) (n int, err error) {
+ n, err = w.File.Write(p)
+ if err != nil {
+ return
+ }
+ err = w.Sync()
+ return
+}
+
+// Writer to which pluggable transports negotiation messages are written. It
+// defaults to a Writer that writes to os.Stdout and calls Sync after each
+// write.
+//
+// You may, for example, log pluggable transports messages by defining a Writer
+// that logs what is written to it:
+// type logWriteWrapper struct {
+// io.Writer
+// }
+//
+// func (w logWriteWrapper) Write(p []byte) (int, error) {
+// log.Print(string(p))
+// return w.Writer.Write(p)
+// }
+// and then redefining Stdout:
+// pt.Stdout = logWriteWrapper{pt.Stdout}
+var Stdout io.Writer = syncWriter{os.Stdout}
+
+// Represents an error that can happen during negotiation, for example
+// ENV-ERROR. When an error occurs, we print it to stdout and also pass it up
+// the return chain.
+type ptErr struct {
+ Keyword string
+ Args []string
+}
+
+// Implements the error interface.
+func (err *ptErr) Error() string {
+ return formatline(err.Keyword, err.Args...)
+}
+
+func getenv(key string) string {
+ return os.Getenv(key)
+}
+
+// Returns an ENV-ERROR if the environment variable isn't set.
+func getenvRequired(key string) (string, error) {
+ value := os.Getenv(key)
+ if value == "" {
+ return "", envError(fmt.Sprintf("no %s environment variable", key))
+ }
+ return value, nil
+}
+
+// Returns true iff keyword contains only bytes allowed in a PT→Tor output line
+// keyword.
+// <KeywordChar> ::= <any US-ASCII alphanumeric, dash, and underscore>
+func keywordIsSafe(keyword string) bool {
+ for _, b := range []byte(keyword) {
+ switch {
+ case '0' <= b && b <= '9':
+ continue
+ case 'A' <= b && b <= 'Z':
+ continue
+ case 'a' <= b && b <= 'z':
+ continue
+ case b == '-' || b == '_':
+ continue
+ default:
+ return false
+ }
+ }
+ return true
+}
+
+// Returns true iff arg contains only bytes allowed in a PT→Tor output line arg.
+// <ArgChar> ::= <any US-ASCII character but NUL or NL>
+func argIsSafe(arg string) bool {
+ for _, b := range []byte(arg) {
+ if b >= '\x80' || b == '\x00' || b == '\n' {
+ return false
+ }
+ }
+ return true
+}
+
+func formatline(keyword string, v ...string) string {
+ var buf bytes.Buffer
+ if !keywordIsSafe(keyword) {
+ panic(fmt.Sprintf("keyword %q contains forbidden bytes", keyword))
+ }
+ buf.WriteString(keyword)
+ for _, x := range v {
+ if !argIsSafe(x) {
+ panic(fmt.Sprintf("arg %q contains forbidden bytes", x))
+ }
+ buf.WriteString(" " + x)
+ }
+ return buf.String()
+}
+
+// Print a pluggable transports protocol line to Stdout. The line consists of a
+// keyword followed by any number of space-separated arg strings. Panics if
+// there are forbidden bytes in the keyword or the args (pt-spec.txt 2.2.1).
+func line(keyword string, v ...string) {
+ fmt.Fprintln(Stdout, formatline(keyword, v...))
+}
+
+// Emit and return the given error as a ptErr.
+func doError(keyword string, v ...string) *ptErr {
+ line(keyword, v...)
+ return &ptErr{keyword, v}
+}
+
+// Emit an ENV-ERROR line with explanation text. Returns a representation of the
+// error.
+func envError(msg string) error {
+ return doError("ENV-ERROR", msg)
+}
+
+// Emit a VERSION-ERROR line with explanation text. Returns a representation of
+// the error.
+func versionError(msg string) error {
+ return doError("VERSION-ERROR", msg)
+}
+
+// Emit a CMETHOD-ERROR line with explanation text. Returns a representation of
+// the error.
+func CmethodError(methodName, msg string) error {
+ return doError("CMETHOD-ERROR", methodName, msg)
+}
+
+// Emit an SMETHOD-ERROR line with explanation text. Returns a representation of
+// the error.
+func SmethodError(methodName, msg string) error {
+ return doError("SMETHOD-ERROR", methodName, msg)
+}
+
+// Emit a PROXY-ERROR line with explanation text. Returns a representation of
+// the error.
+func ProxyError(msg string) error {
+ return doError("PROXY-ERROR", msg)
+}
+
+// Emit a CMETHOD line. socks must be "socks4" or "socks5". Call this once for
+// each listening client SOCKS port.
+func Cmethod(name string, socks string, addr net.Addr) {
+ line("CMETHOD", name, socks, addr.String())
+}
+
+// Emit a CMETHODS DONE line. Call this after opening all client listeners.
+func CmethodsDone() {
+ line("CMETHODS", "DONE")
+}
+
+// Emit an SMETHOD line. Call this once for each listening server port.
+func Smethod(name string, addr net.Addr) {
+ line("SMETHOD", name, addr.String())
+}
+
+// Emit an SMETHOD line with an ARGS option. args is a name–value mapping that
+// will be added to the server's extrainfo document.
+//
+// This is an example of how to check for a required option:
+// secret, ok := bindaddr.Options.Get("shared-secret")
+// if ok {
+// args := pt.Args{}
+// args.Add("shared-secret", secret)
+// pt.SmethodArgs(bindaddr.MethodName, ln.Addr(), args)
+// } else {
+// pt.SmethodError(bindaddr.MethodName, "need a shared-secret option")
+// }
+// Or, if you just want to echo back the options provided by Tor from the
+// TransportServerOptions configuration,
+// pt.SmethodArgs(bindaddr.MethodName, ln.Addr(), bindaddr.Options)
+func SmethodArgs(name string, addr net.Addr, args Args) {
+ line("SMETHOD", name, addr.String(), "ARGS:"+encodeSmethodArgs(args))
+}
+
+// Emit an SMETHODS DONE line. Call this after opening all server listeners.
+func SmethodsDone() {
+ line("SMETHODS", "DONE")
+}
+
+// Emit a PROXY DONE line. Call this after parsing ClientInfo.ProxyURL.
+func ProxyDone() {
+ fmt.Fprintf(Stdout, "PROXY DONE\n")
+}
+
+// Unexported type to represent log severities, preventing external callers from
+// inventing new severity strings that may violate quoting rules.
+//
+// pt-spec.txt section 3.3.4 specifies quoting for MESSAGE, but not for
+// SEVERITY, and the example shows an unquoted "SEVERITY=debug". While we know
+// tor's parser permits quoting of SEVERITY, it's not actually specified.
+// Therefore we we need to guard against callers passing a string that violates
+// the global protocol constraint of "any US-ASCII character but NUL or NL." So
+// here, we instantiate exactly the five supported severities, using a type that
+// cannot be constructed outside the package.
+type logSeverity struct {
+ string
+}
+
+// Severity levels for the Log function.
+var (
+ LogSeverityError = logSeverity{"error"}
+ LogSeverityWarning = logSeverity{"warning"}
+ LogSeverityNotice = logSeverity{"notice"}
+ LogSeverityInfo = logSeverity{"info"}
+ LogSeverityDebug = logSeverity{"debug"}
+)
+
+// Encode a string according to the CString rules of section 2.1.1 in
+// control-spec.txt.
+// CString = DQUOTE *qcontent DQUOTE
+// "...in a CString, the escapes '\n', '\t', '\r', and the octal escapes '\0'
+// ... '\377' represent newline, tab, carriage return, and the 256 possible
+// octet values respectively."
+// RFC 2822 section 3.2.5 in turn defines what byte values we need to escape:
+// everything but
+// NO-WS-CTL / ; Non white space controls
+// %d33 / ; The rest of the US-ASCII
+// %d35-91 / ; characters not including "\"
+// %d93-126 ; or the quote character
+// Technically control-spec.txt requires us to escape the space character (32),
+// but it is an error in the spec: https://bugs.torproject.org/29432.
+//
+// We additionally need to ensure that whatever we return passes argIsSafe,
+// because strings encoded by this function are printed verbatim by Log.
+func encodeCString(s string) string {
+ result := bytes.NewBuffer([]byte{})
+ result.WriteByte('"')
+ for _, c := range []byte(s) {
+ if c == 32 || c == 33 || (35 <= c && c <= 91) || (93 <= c && c <= 126) {
+ result.WriteByte(c)
+ } else {
+ fmt.Fprintf(result, "\\%03o", c)
+ }
+ }
+ result.WriteByte('"')
+ return result.String()
+}
+
+// Emit a LOG message with the given severity (one of LogSeverityError,
+// LogSeverityWarning, LogSeverityNotice, LogSeverityInfo, or LogSeverityDebug).
+func Log(severity logSeverity, message string) {
+ // "<Message> contains the log message which can be a String or CString..."
+ // encodeCString always makes the string safe to emit; i.e., it
+ // satisfies argIsSafe.
+ line("LOG", "SEVERITY="+severity.string, "MESSAGE="+encodeCString(message))
+}
+
+// Get a pluggable transports version offered by Tor and understood by us, if
+// any. The only version we understand is "1". This function reads the
+// environment variable TOR_PT_MANAGED_TRANSPORT_VER.
+func getManagedTransportVer() (string, error) {
+ const transportVersion = "1"
+ managedTransportVer, err := getenvRequired("TOR_PT_MANAGED_TRANSPORT_VER")
+ if err != nil {
+ return "", err
+ }
+ for _, offered := range strings.Split(managedTransportVer, ",") {
+ if offered == transportVersion {
+ return offered, nil
+ }
+ }
+ return "", versionError("no-version")
+}
+
+// Return the directory name in the TOR_PT_STATE_LOCATION environment variable,
+// creating it if it doesn't exist. Returns non-nil error if
+// TOR_PT_STATE_LOCATION is not set or if there is an error creating the
+// directory.
+func MakeStateDir() (string, error) {
+ dir, err := getenvRequired("TOR_PT_STATE_LOCATION")
+ if err != nil {
+ return "", err
+ }
+ err = os.MkdirAll(dir, 0700)
+ return dir, err
+}
+
+// Get the list of method names requested by Tor. This function reads the
+// environment variable TOR_PT_CLIENT_TRANSPORTS.
+func getClientTransports() ([]string, error) {
+ clientTransports, err := getenvRequired("TOR_PT_CLIENT_TRANSPORTS")
+ if err != nil {
+ return nil, err
+ }
+ return strings.Split(clientTransports, ","), nil
+}
+
+// Get the upstream proxy URL. Returns nil if no proxy is requested. The
+// function ensures that the Scheme and Host fields are set; i.e., that the URL
+// is absolute. It additionally checks that the Host field contains both a host
+// and a port part. This function reads the environment variable TOR_PT_PROXY.
+//
+// This function doesn't check that the scheme is one of Tor's supported proxy
+// schemes; that is, one of "http", "socks5", or "socks4a". The caller must be
+// able to handle any returned scheme (which may be by calling ProxyError if
+// it doesn't know how to handle the scheme).
+func getProxyURL() (*url.URL, error) {
+ rawurl := os.Getenv("TOR_PT_PROXY")
+ if rawurl == "" {
+ return nil, nil
+ }
+ u, err := url.Parse(rawurl)
+ if err != nil {
+ return nil, err
+ }
+ if u.Scheme == "" {
+ return nil, fmt.Errorf("missing scheme")
+ }
+ if u.Host == "" {
+ return nil, fmt.Errorf("missing authority")
+ }
+ host, port, err := net.SplitHostPort(u.Host)
+ if err != nil {
+ return nil, err
+ }
+ if host == "" {
+ return nil, fmt.Errorf("missing host")
+ }
+ if port == "" {
+ return nil, fmt.Errorf("missing port")
+ }
+ return u, nil
+}
+
+// This structure is returned by ClientSetup. It consists of a list of method
+// names and the upstream proxy URL, if any.
+type ClientInfo struct {
+ MethodNames []string
+ ProxyURL *url.URL
+}
+
+// Check the client pluggable transports environment, emitting an error message
+// and returning a non-nil error if any error is encountered. Returns a
+// ClientInfo struct.
+//
+// If your program needs to know whether to call ClientSetup or ServerSetup
+// (i.e., if the same program can be run as either a client or a server), check
+// whether the TOR_PT_CLIENT_TRANSPORTS environment variable is set:
+// if os.Getenv("TOR_PT_CLIENT_TRANSPORTS") != "" {
+// // Client mode; call pt.ClientSetup.
+// } else {
+// // Server mode; call pt.ServerSetup.
+// }
+//
+// Always pass nil for the unused single parameter. In the past, the parameter
+// was a list of transport names to use in case Tor requested "*". That feature
+// was never implemented and has been removed from the pluggable transports
+// specification.
+// https://bugs.torproject.org/15612
+func ClientSetup(_ []string) (info ClientInfo, err error) {
+ ver, err := getManagedTransportVer()
+ if err != nil {
+ return
+ }
+ line("VERSION", ver)
+
+ info.MethodNames, err = getClientTransports()
+ if err != nil {
+ return
+ }
+
+ info.ProxyURL, err = getProxyURL()
+ if err != nil {
+ return
+ }
+
+ return info, nil
+}
+
+// A combination of a method name and an address, as extracted from
+// TOR_PT_SERVER_BINDADDR.
+type Bindaddr struct {
+ MethodName string
+ Addr *net.TCPAddr
+ // Options from TOR_PT_SERVER_TRANSPORT_OPTIONS that pertain to this
+ // transport.
+ Options Args
+}
+
+func parsePort(portStr string) (int, error) {
+ port, err := strconv.ParseUint(portStr, 10, 16)
+ return int(port), err
+}
+
+// Resolve an address string into a net.TCPAddr. We are a bit more strict than
+// net.ResolveTCPAddr; we don't allow an empty host or port, and the host part
+// must be a literal IP address.
+func resolveAddr(addrStr string) (*net.TCPAddr, error) {
+ ipStr, portStr, err := net.SplitHostPort(addrStr)
+ if err != nil {
+ // Before the fixing of bug #7011, tor doesn't put brackets around IPv6
+ // addresses. Split after the last colon, assuming it is a port
+ // separator, and try adding the brackets.
+ // https://bugs.torproject.org/7011
+ parts := strings.Split(addrStr, ":")
+ if len(parts) <= 2 {
+ return nil, err
+ }
+ addrStr := "[" + strings.Join(parts[:len(parts)-1], ":") + "]:" + parts[len(parts)-1]
+ ipStr, portStr, err = net.SplitHostPort(addrStr)
+ }
+ if err != nil {
+ return nil, err
+ }
+ if ipStr == "" {
+ return nil, net.InvalidAddrError(fmt.Sprintf("address string %q lacks a host part", addrStr))
+ }
+ if portStr == "" {
+ return nil, net.InvalidAddrError(fmt.Sprintf("address string %q lacks a port part", addrStr))
+ }
+ ip := net.ParseIP(ipStr)
+ if ip == nil {
+ return nil, net.InvalidAddrError(fmt.Sprintf("not an IP string: %q", ipStr))
+ }
+ port, err := parsePort(portStr)
+ if err != nil {
+ return nil, err
+ }
+ return &net.TCPAddr{IP: ip, Port: port}, nil
+}
+
+// Return a new slice, the members of which are those members of addrs having a
+// MethodName in methodNames.
+func filterBindaddrs(addrs []Bindaddr, methodNames []string) []Bindaddr {
+ var result []Bindaddr
+
+ for _, ba := range addrs {
+ for _, methodName := range methodNames {
+ if ba.MethodName == methodName {
+ result = append(result, ba)
+ break
+ }
+ }
+ }
+
+ return result
+}
+
+// Return an array of Bindaddrs, being the contents of TOR_PT_SERVER_BINDADDR
+// with keys filtered by TOR_PT_SERVER_TRANSPORTS. Transport-specific options
+// from TOR_PT_SERVER_TRANSPORT_OPTIONS are assigned to the Options member.
+func getServerBindaddrs() ([]Bindaddr, error) {
+ var result []Bindaddr
+
+ // Parse the list of server transport options.
+ serverTransportOptions := getenv("TOR_PT_SERVER_TRANSPORT_OPTIONS")
+ optionsMap, err := parseServerTransportOptions(serverTransportOptions)
+ if err != nil {
+ return nil, envError(fmt.Sprintf("TOR_PT_SERVER_TRANSPORT_OPTIONS: %q: %s", serverTransportOptions, err.Error()))
+ }
+
+ // Get the list of all requested bindaddrs.
+ serverBindaddr, err := getenvRequired("TOR_PT_SERVER_BINDADDR")
+ if err != nil {
+ return nil, err
+ }
+ seenMethods := make(map[string]bool)
+ for _, spec := range strings.Split(serverBindaddr, ",") {
+ var bindaddr Bindaddr
+
+ parts := strings.SplitN(spec, "-", 2)
+ if len(parts) != 2 {
+ return nil, envError(fmt.Sprintf("TOR_PT_SERVER_BINDADDR: %q: doesn't contain \"-\"", spec))
+ }
+ bindaddr.MethodName = parts[0]
+ // Check for duplicate method names: "Applications MUST NOT set
+ // more than one <address>:<port> pair per PT name."
+ if seenMethods[bindaddr.MethodName] {
+ return nil, envError(fmt.Sprintf("TOR_PT_SERVER_BINDADDR: %q: duplicate method name %q", spec, bindaddr.MethodName))
+ }
+ seenMethods[bindaddr.MethodName] = true
+ addr, err := resolveAddr(parts[1])
+ if err != nil {
+ return nil, envError(fmt.Sprintf("TOR_PT_SERVER_BINDADDR: %q: %s", spec, err.Error()))
+ }
+ bindaddr.Addr = addr
+ bindaddr.Options = optionsMap[bindaddr.MethodName]
+ result = append(result, bindaddr)
+ }
+
+ // Filter by TOR_PT_SERVER_TRANSPORTS.
+ serverTransports, err := getenvRequired("TOR_PT_SERVER_TRANSPORTS")
+ if err != nil {
+ return nil, err
+ }
+ result = filterBindaddrs(result, strings.Split(serverTransports, ","))
+
+ return result, nil
+}
+
+func readAuthCookie(f io.Reader) ([]byte, error) {
+ authCookieHeader := []byte("! Extended ORPort Auth Cookie !\x0a")
+ buf := make([]byte, 64)
+
+ n, err := io.ReadFull(f, buf)
+ if err != nil {
+ return nil, err
+ }
+ // Check that the file ends here.
+ n, err = f.Read(make([]byte, 1))
+ if n != 0 {
+ return nil, fmt.Errorf("file is longer than 64 bytes")
+ } else if err != io.EOF {
+ return nil, fmt.Errorf("did not find EOF at end of file")
+ }
+ header := buf[0:32]
+ cookie := buf[32:64]
+ if subtle.ConstantTimeCompare(header, authCookieHeader) != 1 {
+ return nil, fmt.Errorf("missing auth cookie header")
+ }
+
+ return cookie, nil
+}
+
+// Read and validate the contents of an auth cookie file. Returns the 32-byte
+// cookie. See section 4.2.1.2 of 217-ext-orport-auth.txt.
+func readAuthCookieFile(filename string) (cookie []byte, err error) {
+ f, err := os.Open(filename)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ closeErr := f.Close()
+ if err == nil {
+ err = closeErr
+ }
+ }()
+
+ return readAuthCookie(f)
+}
+
+// This structure is returned by ServerSetup. It consists of a list of
+// Bindaddrs, an address for the ORPort, an address for the extended ORPort (if
+// any), and an authentication cookie (if any).
+type ServerInfo struct {
+ Bindaddrs []Bindaddr
+ OrAddr *net.TCPAddr
+ ExtendedOrAddr *net.TCPAddr
+ AuthCookiePath string
+}
+
+// Check the server pluggable transports environment, emitting an error message
+// and returning a non-nil error if any error is encountered. Resolves the
+// various requested bind addresses, the server ORPort and extended ORPort, and
+// reads the auth cookie file. Returns a ServerInfo struct.
+//
+// If your program needs to know whether to call ClientSetup or ServerSetup
+// (i.e., if the same program can be run as either a client or a server), check
+// whether the TOR_PT_CLIENT_TRANSPORTS environment variable is set:
+// if os.Getenv("TOR_PT_CLIENT_TRANSPORTS") != "" {
+// // Client mode; call pt.ClientSetup.
+// } else {
+// // Server mode; call pt.ServerSetup.
+// }
+//
+// Always pass nil for the unused single parameter. In the past, the parameter
+// was a list of transport names to use in case Tor requested "*". That feature
+// was never implemented and has been removed from the pluggable transports
+// specification.
+// https://bugs.torproject.org/15612
+func ServerSetup(_ []string) (info ServerInfo, err error) {
+ ver, err := getManagedTransportVer()
+ if err != nil {
+ return
+ }
+ line("VERSION", ver)
+
+ info.Bindaddrs, err = getServerBindaddrs()
+ if err != nil {
+ return
+ }
+
+ orPort := getenv("TOR_PT_ORPORT")
+ if orPort != "" {
+ info.OrAddr, err = resolveAddr(orPort)
+ if err != nil {
+ err = envError(fmt.Sprintf("cannot resolve TOR_PT_ORPORT %q: %s", orPort, err.Error()))
+ return
+ }
+ }
+
+ info.AuthCookiePath = getenv("TOR_PT_AUTH_COOKIE_FILE")
+
+ extendedOrPort := getenv("TOR_PT_EXTENDED_SERVER_PORT")
+ if extendedOrPort != "" {
+ if info.AuthCookiePath == "" {
+ err = envError("need TOR_PT_AUTH_COOKIE_FILE environment variable with TOR_PT_EXTENDED_SERVER_PORT")
+ return
+ }
+ info.ExtendedOrAddr, err = resolveAddr(extendedOrPort)
+ if err != nil {
+ err = envError(fmt.Sprintf("cannot resolve TOR_PT_EXTENDED_SERVER_PORT %q: %s", extendedOrPort, err.Error()))
+ return
+ }
+ }
+
+ // Need either OrAddr or ExtendedOrAddr.
+ if info.OrAddr == nil && info.ExtendedOrAddr == nil {
+ err = envError("need TOR_PT_ORPORT or TOR_PT_EXTENDED_SERVER_PORT environment variable")
+ return
+ }
+
+ return info, nil
+}
+
+// See 217-ext-orport-auth.txt section 4.2.1.3.
+func computeServerHash(authCookie, clientNonce, serverNonce []byte) []byte {
+ h := hmac.New(sha256.New, authCookie)
+ io.WriteString(h, "ExtORPort authentication server-to-client hash")
+ h.Write(clientNonce)
+ h.Write(serverNonce)
+ return h.Sum([]byte{})
+}
+
+// See 217-ext-orport-auth.txt section 4.2.1.3.
+func computeClientHash(authCookie, clientNonce, serverNonce []byte) []byte {
+ h := hmac.New(sha256.New, authCookie)
+ io.WriteString(h, "ExtORPort authentication client-to-server hash")
+ h.Write(clientNonce)
+ h.Write(serverNonce)
+ return h.Sum([]byte{})
+}
+
+func extOrPortAuthenticate(s io.ReadWriter, info *ServerInfo) error {
+ // Read auth types. 217-ext-orport-auth.txt section 4.1.
+ var authTypes [256]bool
+ var count int
+ for count = 0; count < 256; count++ {
+ buf := make([]byte, 1)
+ _, err := io.ReadFull(s, buf)
+ if err != nil {
+ return err
+ }
+ b := buf[0]
+ if b == 0 {
+ break
+ }
+ authTypes[b] = true
+ }
+ if count >= 256 {
+ return fmt.Errorf("read 256 auth types without seeing \\x00")
+ }
+
+ // We support only type 1, SAFE_COOKIE.
+ if !authTypes[1] {
+ return fmt.Errorf("server didn't offer auth type 1")
+ }
+ _, err := s.Write([]byte{1})
+ if err != nil {
+ return err
+ }
+
+ clientNonce := make([]byte, 32)
+ clientHash := make([]byte, 32)
+ serverNonce := make([]byte, 32)
+ serverHash := make([]byte, 32)
+
+ _, err = io.ReadFull(rand.Reader, clientNonce)
+ if err != nil {
+ return err
+ }
+ _, err = s.Write(clientNonce)
+ if err != nil {
+ return err
+ }
+
+ _, err = io.ReadFull(s, serverHash)
+ if err != nil {
+ return err
+ }
+ _, err = io.ReadFull(s, serverNonce)
+ if err != nil {
+ return err
+ }
+
+ // Work around tor bug #15240 where the auth cookie is generated after
+ // pluggable transports are launched, leading to a stale cookie getting
+ // cached forever if it is only read once as part of ServerSetup.
+ // https://bugs.torproject.org/15240
+ authCookie, err := readAuthCookieFile(info.AuthCookiePath)
+ if err != nil {
+ return fmt.Errorf("error reading TOR_PT_AUTH_COOKIE_FILE %q: %s", info.AuthCookiePath, err.Error())
+ }
+
+ expectedServerHash := computeServerHash(authCookie, clientNonce, serverNonce)
+ if subtle.ConstantTimeCompare(serverHash, expectedServerHash) != 1 {
+ return fmt.Errorf("mismatch in server hash")
+ }
+
+ clientHash = computeClientHash(authCookie, clientNonce, serverNonce)
+ _, err = s.Write(clientHash)
+ if err != nil {
+ return err
+ }
+
+ status := make([]byte, 1)
+ _, err = io.ReadFull(s, status)
+ if err != nil {
+ return err
+ }
+ if status[0] != 1 {
+ return fmt.Errorf("server rejected authentication")
+ }
+
+ return nil
+}
+
+// See section 3.1.1 of 196-transport-control-ports.txt.
+const (
+ extOrCmdDone = 0x0000
+ extOrCmdUserAddr = 0x0001
+ extOrCmdTransport = 0x0002
+ extOrCmdOkay = 0x1000
+ extOrCmdDeny = 0x1001
+)
+
+func extOrPortSendCommand(s io.Writer, cmd uint16, body []byte) error {
+ var buf bytes.Buffer
+ if len(body) > 65535 {
+ return fmt.Errorf("body length %d exceeds maximum of 65535", len(body))
+ }
+ err := binary.Write(&buf, binary.BigEndian, cmd)
+ if err != nil {
+ return err
+ }
+ err = binary.Write(&buf, binary.BigEndian, uint16(len(body)))
+ if err != nil {
+ return err
+ }
+ err = binary.Write(&buf, binary.BigEndian, body)
+ if err != nil {
+ return err
+ }
+ _, err = s.Write(buf.Bytes())
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// Send a USERADDR command on s. See section 3.1.2.1 of
+// 196-transport-control-ports.txt.
+func extOrPortSendUserAddr(s io.Writer, addr string) error {
+ return extOrPortSendCommand(s, extOrCmdUserAddr, []byte(addr))
+}
+
+// Send a TRANSPORT command on s. See section 3.1.2.2 of
+// 196-transport-control-ports.txt.
+func extOrPortSendTransport(s io.Writer, methodName string) error {
+ return extOrPortSendCommand(s, extOrCmdTransport, []byte(methodName))
+}
+
+// Send a DONE command on s. See section 3.1 of 196-transport-control-ports.txt.
+func extOrPortSendDone(s io.Writer) error {
+ return extOrPortSendCommand(s, extOrCmdDone, []byte{})
+}
+
+func extOrPortRecvCommand(s io.Reader) (cmd uint16, body []byte, err error) {
+ var bodyLen uint16
+ data := make([]byte, 4)
+
+ _, err = io.ReadFull(s, data)
+ if err != nil {
+ return
+ }
+ buf := bytes.NewBuffer(data)
+ err = binary.Read(buf, binary.BigEndian, &cmd)
+ if err != nil {
+ return
+ }
+ err = binary.Read(buf, binary.BigEndian, &bodyLen)
+ if err != nil {
+ return
+ }
+ body = make([]byte, bodyLen)
+ _, err = io.ReadFull(s, body)
+ if err != nil {
+ return
+ }
+
+ return cmd, body, err
+}
+
+// Send USERADDR and TRANSPORT commands followed by a DONE command. Wait for an
+// OKAY or DENY response command from the server. If addr or methodName is "",
+// the corresponding command is not sent. Returns nil if and only if OKAY is
+// received.
+func extOrPortSetMetadata(s io.ReadWriter, addr, methodName string) error {
+ var err error
+
+ if addr != "" {
+ err = extOrPortSendUserAddr(s, addr)
+ if err != nil {
+ return err
+ }
+ }
+ if methodName != "" {
+ err = extOrPortSendTransport(s, methodName)
+ if err != nil {
+ return err
+ }
+ }
+ err = extOrPortSendDone(s)
+ if err != nil {
+ return err
+ }
+ cmd, _, err := extOrPortRecvCommand(s)
+ if err != nil {
+ return err
+ }
+ if cmd == extOrCmdDeny {
+ return fmt.Errorf("server returned DENY after our USERADDR and DONE")
+ } else if cmd != extOrCmdOkay {
+ return fmt.Errorf("server returned unknown command 0x%04x after our USERADDR and DONE", cmd)
+ }
+
+ return nil
+}
+
+func extOrPortSetup(s net.Conn, timeout time.Duration,
+ info *ServerInfo, addr, methodName string) error {
+ err := s.SetDeadline(time.Now().Add(5 * time.Second))
+ if err != nil {
+ return err
+ }
+ err = extOrPortAuthenticate(s, info)
+ if err != nil {
+ return err
+ }
+ err = extOrPortSetMetadata(s, addr, methodName)
+ if err != nil {
+ return err
+ }
+ err = s.SetDeadline(time.Time{})
+ if err != nil {
+ return err
+ }
+ return nil
+}
+
+// Dial info.ExtendedOrAddr if defined, or else info.OrAddr, and return an open
+// *net.TCPConn. If connecting to the extended OR port, extended OR port
+// authentication à la 217-ext-orport-auth.txt is done before returning; an
+// error is returned if authentication fails.
+//
+// The addr and methodName arguments are put in USERADDR and TRANSPORT ExtOrPort
+// commands, respectively. If either is "", the corresponding command is not
+// sent.
+func DialOr(info *ServerInfo, addr, methodName string) (*net.TCPConn, error) {
+ if info.ExtendedOrAddr == nil || info.AuthCookiePath == "" {
+ return net.DialTCP("tcp", nil, info.OrAddr)
+ }
+
+ s, err := net.DialTCP("tcp", nil, info.ExtendedOrAddr)
+ if err != nil {
+ return nil, err
+ }
+ err = extOrPortSetup(s, 5*time.Second, info, addr, methodName)
+ if err != nil {
+ s.Close()
+ return nil, err
+ }
+
+ return s, nil
+}
diff --git a/vendor/git.torproject.org/pluggable-transports/goptlib.git/socks.go b/vendor/git.torproject.org/pluggable-transports/goptlib.git/socks.go
new file mode 100644
index 0000000..29827d9
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/goptlib.git/socks.go
@@ -0,0 +1,507 @@
+package pt
+
+import (
+ "bufio"
+ "fmt"
+ "io"
+ "net"
+ "time"
+)
+
+const (
+ socksVersion = 0x05
+
+ socksAuthNoneRequired = 0x00
+ socksAuthUsernamePassword = 0x02
+ socksAuthNoAcceptableMethods = 0xff
+
+ socksCmdConnect = 0x01
+ socksRsv = 0x00
+
+ socksAtypeV4 = 0x01
+ socksAtypeDomainName = 0x03
+ socksAtypeV6 = 0x04
+
+ socksAuthRFC1929Ver = 0x01
+ socksAuthRFC1929Success = 0x00
+ socksAuthRFC1929Fail = 0x01
+
+ socksRepSucceeded = 0x00
+ // "general SOCKS server failure"
+ SocksRepGeneralFailure = 0x01
+ // "connection not allowed by ruleset"
+ SocksRepConnectionNotAllowed = 0x02
+ // "Network unreachable"
+ SocksRepNetworkUnreachable = 0x03
+ // "Host unreachable"
+ SocksRepHostUnreachable = 0x04
+ // "Connection refused"
+ SocksRepConnectionRefused = 0x05
+ // "TTL expired"
+ SocksRepTTLExpired = 0x06
+ // "Command not supported"
+ SocksRepCommandNotSupported = 0x07
+ // "Address type not supported"
+ SocksRepAddressNotSupported = 0x08
+)
+
+// Put a sanity timeout on how long we wait for a SOCKS request.
+const socksRequestTimeout = 5 * time.Second
+
+// SocksRequest describes a SOCKS request.
+type SocksRequest struct {
+ // The endpoint requested by the client as a "host:port" string.
+ Target string
+ // The userid string sent by the client.
+ Username string
+ // The password string sent by the client.
+ Password string
+ // The parsed contents of Username as a key–value mapping.
+ Args Args
+}
+
+// SocksConn encapsulates a net.Conn and information associated with a SOCKS request.
+type SocksConn struct {
+ net.Conn
+ Req SocksRequest
+}
+
+// Send a message to the proxy client that access to the given address is
+// granted. Addr is ignored, and "0.0.0.0:0" is always sent back for
+// BND.ADDR/BND.PORT in the SOCKS response.
+func (conn *SocksConn) Grant(addr *net.TCPAddr) error {
+ return sendSocks5ResponseGranted(conn)
+}
+
+// Send a message to the proxy client that access was rejected or failed. This
+// sends back a "General Failure" error code. RejectReason should be used if
+// more specific error reporting is desired.
+func (conn *SocksConn) Reject() error {
+ return conn.RejectReason(SocksRepGeneralFailure)
+}
+
+// Send a message to the proxy client that access was rejected, with the
+// specific error code indicating the reason behind the rejection.
+func (conn *SocksConn) RejectReason(reason byte) error {
+ return sendSocks5ResponseRejected(conn, reason)
+}
+
+// SocksListener wraps a net.Listener in order to read a SOCKS request on Accept.
+//
+// func handleConn(conn *pt.SocksConn) error {
+// defer conn.Close()
+// remote, err := net.Dial("tcp", conn.Req.Target)
+// if err != nil {
+// conn.Reject()
+// return err
+// }
+// defer remote.Close()
+// err = conn.Grant(remote.RemoteAddr().(*net.TCPAddr))
+// if err != nil {
+// return err
+// }
+// // do something with conn and remote
+// return nil
+// }
+// ...
+// ln, err := pt.ListenSocks("tcp", "127.0.0.1:0")
+// if err != nil {
+// panic(err.Error())
+// }
+// for {
+// conn, err := ln.AcceptSocks()
+// if err != nil {
+// log.Printf("accept error: %s", err)
+// if e, ok := err.(net.Error); ok && e.Temporary() {
+// continue
+// }
+// break
+// }
+// go handleConn(conn)
+// }
+type SocksListener struct {
+ net.Listener
+}
+
+// Open a net.Listener according to network and laddr, and return it as a
+// SocksListener.
+func ListenSocks(network, laddr string) (*SocksListener, error) {
+ ln, err := net.Listen(network, laddr)
+ if err != nil {
+ return nil, err
+ }
+ return NewSocksListener(ln), nil
+}
+
+// Create a new SocksListener wrapping the given net.Listener.
+func NewSocksListener(ln net.Listener) *SocksListener {
+ return &SocksListener{ln}
+}
+
+// Accept is the same as AcceptSocks, except that it returns a generic net.Conn.
+// It is present for the sake of satisfying the net.Listener interface.
+func (ln *SocksListener) Accept() (net.Conn, error) {
+ return ln.AcceptSocks()
+}
+
+// Call Accept on the wrapped net.Listener, do SOCKS negotiation, and return a
+// SocksConn. After accepting, you must call either conn.Grant or conn.Reject
+// (presumably after trying to connect to conn.Req.Target).
+//
+// Errors returned by AcceptSocks may be temporary (for example, EOF while
+// reading the request, or a badly formatted userid string), or permanent (e.g.,
+// the underlying socket is closed). You can determine whether an error is
+// temporary and take appropriate action with a type conversion to net.Error.
+// For example:
+//
+// for {
+// conn, err := ln.AcceptSocks()
+// if err != nil {
+// if e, ok := err.(net.Error); ok && e.Temporary() {
+// log.Printf("temporary accept error; trying again: %s", err)
+// continue
+// }
+// log.Printf("permanent accept error; giving up: %s", err)
+// break
+// }
+// go handleConn(conn)
+// }
+func (ln *SocksListener) AcceptSocks() (*SocksConn, error) {
+retry:
+ c, err := ln.Listener.Accept()
+ if err != nil {
+ return nil, err
+ }
+ conn := new(SocksConn)
+ conn.Conn = c
+ err = conn.SetDeadline(time.Now().Add(socksRequestTimeout))
+ if err != nil {
+ conn.Close()
+ goto retry
+ }
+ conn.Req, err = socks5Handshake(conn)
+ if err != nil {
+ conn.Close()
+ goto retry
+ }
+ err = conn.SetDeadline(time.Time{})
+ if err != nil {
+ conn.Close()
+ goto retry
+ }
+ return conn, nil
+}
+
+// Returns "socks5", suitable to be included in a call to Cmethod.
+func (ln *SocksListener) Version() string {
+ return "socks5"
+}
+
+// socks5handshake conducts the SOCKS5 handshake up to the point where the
+// client command is read and the proxy must open the outgoing connection.
+// Returns a SocksRequest.
+func socks5Handshake(s io.ReadWriter) (req SocksRequest, err error) {
+ rw := bufio.NewReadWriter(bufio.NewReader(s), bufio.NewWriter(s))
+
+ // Negotiate the authentication method.
+ var method byte
+ if method, err = socksNegotiateAuth(rw); err != nil {
+ return
+ }
+
+ // Authenticate the client.
+ if err = socksAuthenticate(rw, method, &req); err != nil {
+ return
+ }
+
+ // Read the command.
+ err = socksReadCommand(rw, &req)
+ return
+}
+
+// socksNegotiateAuth negotiates the authentication method and returns the
+// selected method as a byte. On negotiation failures an error is returned.
+func socksNegotiateAuth(rw *bufio.ReadWriter) (method byte, err error) {
+ // Validate the version.
+ if err = socksReadByteVerify(rw, "version", socksVersion); err != nil {
+ return
+ }
+
+ // Read the number of methods.
+ var nmethods byte
+ if nmethods, err = socksReadByte(rw); err != nil {
+ return
+ }
+
+ // Read the methods.
+ var methods []byte
+ if methods, err = socksReadBytes(rw, int(nmethods)); err != nil {
+ return
+ }
+
+ // Pick the most "suitable" method.
+ method = socksAuthNoAcceptableMethods
+ for _, m := range methods {
+ switch m {
+ case socksAuthNoneRequired:
+ // Pick Username/Password over None if the client happens to
+ // send both.
+ if method == socksAuthNoAcceptableMethods {
+ method = m
+ }
+
+ case socksAuthUsernamePassword:
+ method = m
+ }
+ }
+
+ // Send the negotiated method.
+ var msg [2]byte
+ msg[0] = socksVersion
+ msg[1] = method
+ if _, err = rw.Writer.Write(msg[:]); err != nil {
+ return
+ }
+
+ if err = socksFlushBuffers(rw); err != nil {
+ return
+ }
+ return
+}
+
+// socksAuthenticate authenticates the client via the chosen authentication
+// mechanism.
+func socksAuthenticate(rw *bufio.ReadWriter, method byte, req *SocksRequest) (err error) {
+ switch method {
+ case socksAuthNoneRequired:
+ // Straight into reading the connect.
+
+ case socksAuthUsernamePassword:
+ if err = socksAuthRFC1929(rw, req); err != nil {
+ return
+ }
+
+ case socksAuthNoAcceptableMethods:
+ err = fmt.Errorf("SOCKS method select had no compatible methods")
+ return
+
+ default:
+ err = fmt.Errorf("SOCKS method select picked a unsupported method 0x%02x", method)
+ return
+ }
+
+ if err = socksFlushBuffers(rw); err != nil {
+ return
+ }
+ return
+}
+
+// socksAuthRFC1929 authenticates the client via RFC 1929 username/password
+// auth. As a design decision any valid username/password is accepted as this
+// field is primarily used as an out-of-band argument passing mechanism for
+// pluggable transports.
+func socksAuthRFC1929(rw *bufio.ReadWriter, req *SocksRequest) (err error) {
+ sendErrResp := func() {
+ // Swallow the write/flush error here, we are going to close the
+ // connection and the original failure is more useful.
+ resp := []byte{socksAuthRFC1929Ver, socksAuthRFC1929Fail}
+ rw.Write(resp[:])
+ socksFlushBuffers(rw)
+ }
+
+ // Validate the fixed parts of the command message.
+ if err = socksReadByteVerify(rw, "auth version", socksAuthRFC1929Ver); err != nil {
+ sendErrResp()
+ return
+ }
+
+ // Read the username.
+ var ulen byte
+ if ulen, err = socksReadByte(rw); err != nil {
+ return
+ }
+ if ulen < 1 {
+ sendErrResp()
+ err = fmt.Errorf("RFC1929 username with 0 length")
+ return
+ }
+ var uname []byte
+ if uname, err = socksReadBytes(rw, int(ulen)); err != nil {
+ return
+ }
+ req.Username = string(uname)
+
+ // Read the password.
+ var plen byte
+ if plen, err = socksReadByte(rw); err != nil {
+ return
+ }
+ if plen < 1 {
+ sendErrResp()
+ err = fmt.Errorf("RFC1929 password with 0 length")
+ return
+ }
+ var passwd []byte
+ if passwd, err = socksReadBytes(rw, int(plen)); err != nil {
+ return
+ }
+ if !(plen == 1 && passwd[0] == 0x00) {
+ // tor will set the password to 'NUL' if there are no arguments.
+ req.Password = string(passwd)
+ }
+
+ // Mash the username/password together and parse it as a pluggable
+ // transport argument string.
+ if req.Args, err = parseClientParameters(req.Username + req.Password); err != nil {
+ sendErrResp()
+ } else {
+ resp := []byte{socksAuthRFC1929Ver, socksAuthRFC1929Success}
+ _, err = rw.Write(resp[:])
+ }
+ return
+}
+
+// socksReadCommand reads a SOCKS5 client command and parses out the relevant
+// fields into a SocksRequest. Only CMD_CONNECT is supported.
+func socksReadCommand(rw *bufio.ReadWriter, req *SocksRequest) (err error) {
+ sendErrResp := func(reason byte) {
+ // Swallow errors that occur when writing/flushing the response,
+ // connection will be closed anyway.
+ sendSocks5ResponseRejected(rw, reason)
+ socksFlushBuffers(rw)
+ }
+
+ // Validate the fixed parts of the command message.
+ if err = socksReadByteVerify(rw, "version", socksVersion); err != nil {
+ sendErrResp(SocksRepGeneralFailure)
+ return
+ }
+ if err = socksReadByteVerify(rw, "command", socksCmdConnect); err != nil {
+ sendErrResp(SocksRepCommandNotSupported)
+ return
+ }
+ if err = socksReadByteVerify(rw, "reserved", socksRsv); err != nil {
+ sendErrResp(SocksRepGeneralFailure)
+ return
+ }
+
+ // Read the destination address/port.
+ // XXX: This should probably eventually send socks 5 error messages instead
+ // of rudely closing connections on invalid addresses.
+ var atype byte
+ if atype, err = socksReadByte(rw); err != nil {
+ return
+ }
+ var host string
+ switch atype {
+ case socksAtypeV4:
+ var addr []byte
+ if addr, err = socksReadBytes(rw, net.IPv4len); err != nil {
+ return
+ }
+ host = net.IPv4(addr[0], addr[1], addr[2], addr[3]).String()
+
+ case socksAtypeDomainName:
+ var alen byte
+ if alen, err = socksReadByte(rw); err != nil {
+ return
+ }
+ if alen == 0 {
+ err = fmt.Errorf("SOCKS request had domain name with 0 length")
+ return
+ }
+ var addr []byte
+ if addr, err = socksReadBytes(rw, int(alen)); err != nil {
+ return
+ }
+ host = string(addr)
+
+ case socksAtypeV6:
+ var rawAddr []byte
+ if rawAddr, err = socksReadBytes(rw, net.IPv6len); err != nil {
+ return
+ }
+ addr := make(net.IP, net.IPv6len)
+ copy(addr[:], rawAddr[:])
+ host = fmt.Sprintf("[%s]", addr.String())
+
+ default:
+ sendErrResp(SocksRepAddressNotSupported)
+ err = fmt.Errorf("SOCKS request had unsupported address type 0x%02x", atype)
+ return
+ }
+ var rawPort []byte
+ if rawPort, err = socksReadBytes(rw, 2); err != nil {
+ return
+ }
+ port := int(rawPort[0])<<8 | int(rawPort[1])<<0
+
+ if err = socksFlushBuffers(rw); err != nil {
+ return
+ }
+
+ req.Target = fmt.Sprintf("%s:%d", host, port)
+ return
+}
+
+// Send a SOCKS5 response with the given code. BND.ADDR/BND.PORT is always the
+// IPv4 address/port "0.0.0.0:0".
+func sendSocks5Response(w io.Writer, code byte) error {
+ resp := make([]byte, 4+4+2)
+ resp[0] = socksVersion
+ resp[1] = code
+ resp[2] = socksRsv
+ resp[3] = socksAtypeV4
+
+ // BND.ADDR/BND.PORT should be the address and port that the outgoing
+ // connection is bound to on the proxy, but Tor does not use this
+ // information, so all zeroes are sent.
+
+ _, err := w.Write(resp[:])
+ return err
+}
+
+// Send a SOCKS5 response code 0x00.
+func sendSocks5ResponseGranted(w io.Writer) error {
+ return sendSocks5Response(w, socksRepSucceeded)
+}
+
+// Send a SOCKS5 response with the provided failure reason.
+func sendSocks5ResponseRejected(w io.Writer, reason byte) error {
+ return sendSocks5Response(w, reason)
+}
+
+func socksFlushBuffers(rw *bufio.ReadWriter) error {
+ if err := rw.Writer.Flush(); err != nil {
+ return err
+ }
+ if rw.Reader.Buffered() > 0 {
+ return fmt.Errorf("%d bytes left after SOCKS message", rw.Reader.Buffered())
+ }
+ return nil
+}
+
+func socksReadByte(rw *bufio.ReadWriter) (byte, error) {
+ return rw.Reader.ReadByte()
+}
+
+func socksReadBytes(rw *bufio.ReadWriter, n int) ([]byte, error) {
+ ret := make([]byte, n)
+ if _, err := io.ReadFull(rw.Reader, ret); err != nil {
+ return nil, err
+ }
+ return ret, nil
+}
+
+func socksReadByteVerify(rw *bufio.ReadWriter, descr string, expected byte) error {
+ val, err := socksReadByte(rw)
+ if err != nil {
+ return err
+ }
+ if val != expected {
+ return fmt.Errorf("SOCKS message field %s was 0x%02x, not 0x%02x", descr, val, expected)
+ }
+ return nil
+}
+
+var _ net.Listener = (*SocksListener)(nil)
diff --git a/vendor/git.torproject.org/pluggable-transports/goptlib.git/test_authcookie b/vendor/git.torproject.org/pluggable-transports/goptlib.git/test_authcookie
new file mode 100644
index 0000000..0df0cfb
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/goptlib.git/test_authcookie
@@ -0,0 +1,2 @@
+! Extended ORPort Auth Cookie !
+this file is used in test code.
diff --git a/vendor/git.torproject.org/pluggable-transports/snowflake.git/LICENSE b/vendor/git.torproject.org/pluggable-transports/snowflake.git/LICENSE
new file mode 100644
index 0000000..42f6296
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/snowflake.git/LICENSE
@@ -0,0 +1,32 @@
+ This file contains the license for "Snowflake"
+ a free software project which provides a WebRTC pluggable transport.
+
+================================================================================
+Copyright (c) 2016, Serene Han, Arlo Breault
+Copyright (c) 2019-2020, The Tor Project, Inc
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+
+ * Neither the names of the copyright owners nor the names of its
+contributors may be used to endorse or promote products derived from this
+software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+================================================================================
diff --git a/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/encapsulation/encapsulation.go b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/encapsulation/encapsulation.go
new file mode 100644
index 0000000..bfe9b5b
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/encapsulation/encapsulation.go
@@ -0,0 +1,194 @@
+// Package encapsulation implements a way of encoding variable-size chunks of
+// data and padding into a byte stream.
+//
+// Each chunk of data or padding starts with a variable-size length prefix. One
+// bit ("d") in the first byte of the prefix indicates whether the chunk
+// represents data or padding (1=data, 0=padding). Another bit ("c" for
+// "continuation") is the indicates whether there are more bytes in the length
+// prefix. The remaining 6 bits ("x") encode part of the length value.
+// dcxxxxxx
+// If the continuation bit is set, then the next byte is also part of the length
+// prefix. It lacks the "d" bit, has its own "c" bit, and 7 value-carrying bits
+// ("y").
+// cyyyyyyy
+// The length is decoded by concatenating value-carrying bits, from left to
+// right, of all value-carrying bits, up to and including the first byte whose
+// "c" bit is 0. Although in principle this encoding would allow for length
+// prefixes of any size, length prefixes are arbitrarily limited to 3 bytes and
+// any attempt to read or write a longer one is an error. These are therefore
+// the only valid formats:
+// 00xxxxxx xxxxxx₂ bytes of padding
+// 10xxxxxx xxxxxx₂ bytes of data
+// 01xxxxxx 0yyyyyyy xxxxxxyyyyyyy₂ bytes of padding
+// 11xxxxxx 0yyyyyyy xxxxxxyyyyyyy₂ bytes of data
+// 01xxxxxx 1yyyyyyy 0zzzzzzz xxxxxxyyyyyyyzzzzzzz₂ bytes of padding
+// 11xxxxxx 1yyyyyyy 0zzzzzzz xxxxxxyyyyyyyzzzzzzz₂ bytes of data
+// The maximum encodable length is 11111111111111111111₂ = 0xfffff = 1048575.
+// There is no requirement to use a length prefix of minimum size; i.e. 00000100
+// and 01000000 00000100 are both valid encodings of the value 4.
+//
+// After the length prefix follow that many bytes of padding or data. There are
+// no restrictions on the value of bytes comprising padding.
+//
+// The idea for this encapsulation is sketched here:
+// https://github.com/net4people/bbs/issues/9#issuecomment-524095186
+package encapsulation
+
+import (
+ "errors"
+ "io"
+ "io/ioutil"
+)
+
+// ErrTooLong is the error returned when an encoded length prefix is longer than
+// 3 bytes, or when ReadData receives an input whose length is too large to
+// encode in a 3-byte length prefix.
+var ErrTooLong = errors.New("length prefix is too long")
+
+// ReadData returns a new slice with the contents of the next available data
+// chunk, skipping over any padding chunks that may come first. The returned
+// error value is nil if and only if a data chunk was present and was read in
+// its entirety. The returned error is io.EOF only if r ended before the first
+// byte of a length prefix. If r ended in the middle of a length prefix or
+// data/padding, the returned error is io.ErrUnexpectedEOF.
+func ReadData(r io.Reader) ([]byte, error) {
+ for {
+ var b [1]byte
+ _, err := r.Read(b[:])
+ if err != nil {
+ // This is the only place we may return a real io.EOF.
+ return nil, err
+ }
+ isData := (b[0] & 0x80) != 0
+ moreLength := (b[0] & 0x40) != 0
+ n := int(b[0] & 0x3f)
+ for i := 0; moreLength; i++ {
+ if i >= 2 {
+ return nil, ErrTooLong
+ }
+ _, err := r.Read(b[:])
+ if err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+ if err != nil {
+ return nil, err
+ }
+ moreLength = (b[0] & 0x80) != 0
+ n = (n << 7) | int(b[0]&0x7f)
+ }
+ if isData {
+ p := make([]byte, n)
+ _, err := io.ReadFull(r, p)
+ if err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+ if err != nil {
+ return nil, err
+ }
+ return p, err
+ } else {
+ _, err := io.CopyN(ioutil.Discard, r, int64(n))
+ if err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+ if err != nil {
+ return nil, err
+ }
+ }
+ }
+}
+
+// dataPrefixForLength returns a length prefix for the given length, with the
+// "d" bit set to 1.
+func dataPrefixForLength(n int) ([]byte, error) {
+ switch {
+ case (n>>0)&0x3f == (n >> 0):
+ return []byte{0x80 | byte((n>>0)&0x3f)}, nil
+ case (n>>7)&0x3f == (n >> 7):
+ return []byte{0xc0 | byte((n>>7)&0x3f), byte((n >> 0) & 0x7f)}, nil
+ case (n>>14)&0x3f == (n >> 14):
+ return []byte{0xc0 | byte((n>>14)&0x3f), 0x80 | byte((n>>7)&0x7f), byte((n >> 0) & 0x7f)}, nil
+ default:
+ return nil, ErrTooLong
+ }
+}
+
+// WriteData encodes a data chunk into w. It returns the total number of bytes
+// written; i.e., including the length prefix. The error is ErrTooLong if the
+// length of data cannot fit into a length prefix.
+func WriteData(w io.Writer, data []byte) (int, error) {
+ prefix, err := dataPrefixForLength(len(data))
+ if err != nil {
+ return 0, err
+ }
+ total := 0
+ n, err := w.Write(prefix)
+ total += n
+ if err != nil {
+ return total, err
+ }
+ n, err = w.Write(data)
+ total += n
+ return total, err
+}
+
+var paddingBuffer = make([]byte, 1024)
+
+// WritePadding encodes padding chunks, whose total size (including their own
+// length prefixes) is n. Returns the total number of bytes written to w, which
+// will be exactly n unless there was an error. The error cannot be ErrTooLong
+// because this function will write multiple padding chunks if necessary to
+// reach the requested size. Panics if n is negative.
+func WritePadding(w io.Writer, n int) (int, error) {
+ if n < 0 {
+ panic("negative length")
+ }
+ total := 0
+ for n > 0 {
+ p := len(paddingBuffer)
+ if p > n {
+ p = n
+ }
+ n -= p
+ var prefix []byte
+ switch {
+ case ((p-1)>>0)&0x3f == ((p - 1) >> 0):
+ p = p - 1
+ prefix = []byte{byte((p >> 0) & 0x3f)}
+ case ((p-2)>>7)&0x3f == ((p - 2) >> 7):
+ p = p - 2
+ prefix = []byte{0x40 | byte((p>>7)&0x3f), byte((p >> 0) & 0x7f)}
+ case ((p-3)>>14)&0x3f == ((p - 3) >> 14):
+ p = p - 3
+ prefix = []byte{0x40 | byte((p>>14)&0x3f), 0x80 | byte((p>>7)&0x3f), byte((p >> 0) & 0x7f)}
+ }
+ nn, err := w.Write(prefix)
+ total += nn
+ if err != nil {
+ return total, err
+ }
+ nn, err = w.Write(paddingBuffer[:p])
+ total += nn
+ if err != nil {
+ return total, err
+ }
+ }
+ return total, nil
+}
+
+// MaxDataForSize returns the length of the longest slice that can pe passed to
+// WriteData, whose total encoded size (including length prefix) is no larger
+// than n. Call this to find out if a chunk of data will fit into a length
+// budget. Panics if n == 0.
+func MaxDataForSize(n int) int {
+ if n == 0 {
+ panic("zero length")
+ }
+ prefix, err := dataPrefixForLength(n)
+ if err == ErrTooLong {
+ return (1 << (6 + 7 + 7)) - 1 - 3
+ } else if err != nil {
+ panic(err)
+ }
+ return n - len(prefix)
+}
diff --git a/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/nat/nat.go b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/nat/nat.go
new file mode 100644
index 0000000..552ed45
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/nat/nat.go
@@ -0,0 +1,246 @@
+/*
+The majority of this code is taken from a utility I wrote for pion/stun
+https://github.com/pion/stun/blob/master/cmd/stun-nat-behaviour/main.go
+
+Copyright 2018 Pion LLC
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+package nat
+
+import (
+ "errors"
+ "fmt"
+ "log"
+ "net"
+ "time"
+
+ "github.com/pion/stun"
+)
+
+var ErrTimedOut = errors.New("timed out waiting for response")
+
+const (
+ NATUnknown = "unknown"
+ NATRestricted = "restricted"
+ NATUnrestricted = "unrestricted"
+)
+
+// This function checks the NAT mapping and filtering
+// behaviour and returns true if the NAT is restrictive
+// (address-dependent mapping and/or port-dependent filtering)
+// and false if the NAT is unrestrictive (meaning it
+// will work with most other NATs),
+func CheckIfRestrictedNAT(server string) (bool, error) {
+ return isRestrictedMapping(server)
+}
+
+// Performs two tests from RFC 5780 to determine whether the mapping type
+// of the client's NAT is address-independent or address-dependent
+// Returns true if the mapping is address-dependent and false otherwise
+func isRestrictedMapping(addrStr string) (bool, error) {
+ var xorAddr1 stun.XORMappedAddress
+ var xorAddr2 stun.XORMappedAddress
+
+ mapTestConn, err := connect(addrStr)
+ if err != nil {
+ log.Printf("Error creating STUN connection: %s", err.Error())
+ return false, err
+ }
+
+ defer mapTestConn.Close()
+
+ // Test I: Regular binding request
+ message := stun.MustBuild(stun.TransactionID, stun.BindingRequest)
+
+ resp, err := mapTestConn.RoundTrip(message, mapTestConn.PrimaryAddr)
+ if err == ErrTimedOut {
+ log.Printf("Error: no response from server")
+ return false, err
+ }
+ if err != nil {
+ log.Printf("Error receiving response from server: %s", err.Error())
+ return false, err
+ }
+
+ // Decoding XOR-MAPPED-ADDRESS attribute from message.
+ if err = xorAddr1.GetFrom(resp); err != nil {
+ log.Printf("Error retrieving XOR-MAPPED-ADDRESS resonse: %s", err.Error())
+ return false, err
+ }
+
+ // Decoding OTHER-ADDRESS attribute from message.
+ var otherAddr stun.OtherAddress
+ if err = otherAddr.GetFrom(resp); err != nil {
+ log.Println("NAT discovery feature not supported by this server")
+ return false, err
+ }
+
+ if err = mapTestConn.AddOtherAddr(otherAddr.String()); err != nil {
+ log.Printf("Failed to resolve address %s\t", otherAddr.String())
+ return false, err
+ }
+
+ // Test II: Send binding request to other address
+ resp, err = mapTestConn.RoundTrip(message, mapTestConn.OtherAddr)
+ if err == ErrTimedOut {
+ log.Printf("Error: no response from server")
+ return false, err
+ }
+ if err != nil {
+ log.Printf("Error retrieving server response: %s", err.Error())
+ return false, err
+ }
+
+ // Decoding XOR-MAPPED-ADDRESS attribute from message.
+ if err = xorAddr2.GetFrom(resp); err != nil {
+ log.Printf("Error retrieving XOR-MAPPED-ADDRESS resonse: %s", err.Error())
+ return false, err
+ }
+
+ return xorAddr1.String() != xorAddr2.String(), nil
+
+}
+
+// Performs two tests from RFC 5780 to determine whether the filtering type
+// of the client's NAT is port-dependent.
+// Returns true if the filtering is port-dependent and false otherwise
+// Note: This function is no longer used because a client's NAT type is
+// determined only by their mapping type, but the functionality might
+// be useful in the future and remains here.
+func isRestrictedFiltering(addrStr string) (bool, error) {
+ var xorAddr stun.XORMappedAddress
+
+ mapTestConn, err := connect(addrStr)
+ if err != nil {
+ log.Printf("Error creating STUN connection: %s", err.Error())
+ return false, err
+ }
+
+ defer mapTestConn.Close()
+
+ // Test I: Regular binding request
+ message := stun.MustBuild(stun.TransactionID, stun.BindingRequest)
+
+ resp, err := mapTestConn.RoundTrip(message, mapTestConn.PrimaryAddr)
+ if err == ErrTimedOut {
+ log.Printf("Error: no response from server")
+ return false, err
+ }
+ if err != nil {
+ log.Printf("Error: %s", err.Error())
+ return false, err
+ }
+
+ // Decoding XOR-MAPPED-ADDRESS attribute from message.
+ if err = xorAddr.GetFrom(resp); err != nil {
+ log.Printf("Error retrieving XOR-MAPPED-ADDRESS from resonse: %s", err.Error())
+ return false, err
+ }
+
+ // Test III: Request port change
+ message.Add(stun.AttrChangeRequest, []byte{0x00, 0x00, 0x00, 0x02})
+
+ _, err = mapTestConn.RoundTrip(message, mapTestConn.PrimaryAddr)
+ if err != ErrTimedOut && err != nil {
+ // something else went wrong
+ log.Printf("Error reading response from server: %s", err.Error())
+ return false, err
+ }
+
+ return err == ErrTimedOut, nil
+}
+
+// Given an address string, returns a StunServerConn
+func connect(addrStr string) (*StunServerConn, error) {
+ // Creating a "connection" to STUN server.
+ addr, err := net.ResolveUDPAddr("udp4", addrStr)
+ if err != nil {
+ log.Printf("Error resolving address: %s\n", err.Error())
+ return nil, err
+ }
+
+ c, err := net.ListenUDP("udp4", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ mChan := listen(c)
+
+ return &StunServerConn{
+ conn: c,
+ PrimaryAddr: addr,
+ messageChan: mChan,
+ }, nil
+}
+
+type StunServerConn struct {
+ conn net.PacketConn
+ PrimaryAddr *net.UDPAddr
+ OtherAddr *net.UDPAddr
+ messageChan chan *stun.Message
+}
+
+func (c *StunServerConn) Close() {
+ c.conn.Close()
+}
+
+func (c *StunServerConn) RoundTrip(msg *stun.Message, addr net.Addr) (*stun.Message, error) {
+ _, err := c.conn.WriteTo(msg.Raw, addr)
+ if err != nil {
+ return nil, err
+ }
+
+ // Wait for response or timeout
+ select {
+ case m, ok := <-c.messageChan:
+ if !ok {
+ return nil, fmt.Errorf("error reading from messageChan")
+ }
+ return m, nil
+ case <-time.After(10 * time.Second):
+ return nil, ErrTimedOut
+ }
+}
+
+func (c *StunServerConn) AddOtherAddr(addrStr string) error {
+ addr2, err := net.ResolveUDPAddr("udp4", addrStr)
+ if err != nil {
+ return err
+ }
+ c.OtherAddr = addr2
+ return nil
+}
+
+// taken from https://github.com/pion/stun/blob/master/cmd/stun-traversal/main.go
+func listen(conn *net.UDPConn) chan *stun.Message {
+ messages := make(chan *stun.Message)
+ go func() {
+ for {
+ buf := make([]byte, 1024)
+
+ n, _, err := conn.ReadFromUDP(buf)
+ if err != nil {
+ close(messages)
+ return
+ }
+ buf = buf[:n]
+
+ m := new(stun.Message)
+ m.Raw = buf
+ err = m.Decode()
+ if err != nil {
+ close(messages)
+ return
+ }
+
+ messages <- m
+ }
+ }()
+ return messages
+}
diff --git a/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/safelog/log.go b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/safelog/log.go
new file mode 100644
index 0000000..9148e53
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/safelog/log.go
@@ -0,0 +1,71 @@
+//Package for a safer logging wrapper around the standard logging package
+
+//import "git.torproject.org/pluggable-transports/snowflake.git/common/safelog"
+package safelog
+
+import (
+ "bytes"
+ "io"
+ "regexp"
+ "sync"
+)
+
+const ipv4Address = `\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}`
+const ipv6Address = `([0-9a-fA-F]{0,4}:){5,7}([0-9a-fA-F]{0,4})?`
+const ipv6Compressed = `([0-9a-fA-F]{0,4}:){0,5}([0-9a-fA-F]{0,4})?(::)([0-9a-fA-F]{0,4}:){0,5}([0-9a-fA-F]{0,4})?`
+const ipv6Full = `(` + ipv6Address + `(` + ipv4Address + `))` +
+ `|(` + ipv6Compressed + `(` + ipv4Address + `))` +
+ `|(` + ipv6Address + `)` + `|(` + ipv6Compressed + `)`
+const optionalPort = `(:\d{1,5})?`
+const addressPattern = `((` + ipv4Address + `)|(\[(` + ipv6Full + `)\])|(` + ipv6Full + `))` + optionalPort
+const fullAddrPattern = `(^|\s|[^\w:])` + addressPattern + `(\s|(:\s)|[^\w:]|$)`
+
+var scrubberPatterns = []*regexp.Regexp{
+ regexp.MustCompile(fullAddrPattern),
+}
+
+var addressRegexp = regexp.MustCompile(addressPattern)
+
+// An io.Writer that can be used as the output for a logger that first
+// sanitizes logs and then writes to the provided io.Writer
+type LogScrubber struct {
+ Output io.Writer
+ buffer []byte
+
+ lock sync.Mutex
+}
+
+func (ls *LogScrubber) Lock() { (*ls).lock.Lock() }
+func (ls *LogScrubber) Unlock() { (*ls).lock.Unlock() }
+
+func scrub(b []byte) []byte {
+ scrubbedBytes := b
+ for _, pattern := range scrubberPatterns {
+ // this is a workaround since go does not yet support look ahead or look
+ // behind for regular expressions.
+ scrubbedBytes = pattern.ReplaceAllFunc(scrubbedBytes, func(b []byte) []byte {
+ return addressRegexp.ReplaceAll(b, []byte("[scrubbed]"))
+ })
+ }
+ return scrubbedBytes
+}
+
+func (ls *LogScrubber) Write(b []byte) (n int, err error) {
+ ls.Lock()
+ defer ls.Unlock()
+
+ n = len(b)
+ ls.buffer = append(ls.buffer, b...)
+ for {
+ i := bytes.LastIndexByte(ls.buffer, '\n')
+ if i == -1 {
+ return
+ }
+ fullLines := ls.buffer[:i+1]
+ _, err = ls.Output.Write(scrub(fullLines))
+ if err != nil {
+ return
+ }
+ ls.buffer = ls.buffer[i+1:]
+ }
+}
diff --git a/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/clientid.go b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/clientid.go
new file mode 100644
index 0000000..17257e1
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/clientid.go
@@ -0,0 +1,28 @@
+package turbotunnel
+
+import (
+ "crypto/rand"
+ "encoding/hex"
+)
+
+// ClientID is an abstract identifier that binds together all the communications
+// belonging to a single client session, even though those communications may
+// arrive from multiple IP addresses or over multiple lower-level connections.
+// It plays the same role that an (IP address, port number) tuple plays in a
+// net.UDPConn: it's the return address pertaining to a long-lived abstract
+// client session. The client attaches its ClientID to each of its
+// communications, enabling the server to disambiguate requests among its many
+// clients. ClientID implements the net.Addr interface.
+type ClientID [8]byte
+
+func NewClientID() ClientID {
+ var id ClientID
+ _, err := rand.Read(id[:])
+ if err != nil {
+ panic(err)
+ }
+ return id
+}
+
+func (id ClientID) Network() string { return "clientid" }
+func (id ClientID) String() string { return hex.EncodeToString(id[:]) }
diff --git a/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/clientmap.go b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/clientmap.go
new file mode 100644
index 0000000..53d0302
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/clientmap.go
@@ -0,0 +1,145 @@
+package turbotunnel
+
+import (
+ "container/heap"
+ "net"
+ "sync"
+ "time"
+)
+
+// clientRecord is a record of a recently seen client, with the time it was last
+// seen and a send queue.
+type clientRecord struct {
+ Addr net.Addr
+ LastSeen time.Time
+ SendQueue chan []byte
+}
+
+// ClientMap manages a mapping of live clients (keyed by address, which will be
+// a ClientID) to their respective send queues. ClientMap's functions are safe
+// to call from multiple goroutines.
+type ClientMap struct {
+ // We use an inner structure to avoid exposing public heap.Interface
+ // functions to users of clientMap.
+ inner clientMapInner
+ // Synchronizes access to inner.
+ lock sync.Mutex
+}
+
+// NewClientMap creates a ClientMap that expires clients after a timeout.
+//
+// The timeout does not have to be kept in sync with QUIC's internal idle
+// timeout. If a client is removed from the client map while the QUIC session is
+// still live, the worst that can happen is a loss of whatever packets were in
+// the send queue at the time. If QUIC later decides to send more packets to the
+// same client, we'll instantiate a new send queue, and if the client ever
+// connects again with the proper client ID, we'll deliver them.
+func NewClientMap(timeout time.Duration) *ClientMap {
+ m := &ClientMap{
+ inner: clientMapInner{
+ byAge: make([]*clientRecord, 0),
+ byAddr: make(map[net.Addr]int),
+ },
+ }
+ go func() {
+ for {
+ time.Sleep(timeout / 2)
+ now := time.Now()
+ m.lock.Lock()
+ m.inner.removeExpired(now, timeout)
+ m.lock.Unlock()
+ }
+ }()
+ return m
+}
+
+// SendQueue returns the send queue corresponding to addr, creating it if
+// necessary.
+func (m *ClientMap) SendQueue(addr net.Addr) chan []byte {
+ m.lock.Lock()
+ defer m.lock.Unlock()
+ return m.inner.SendQueue(addr, time.Now())
+}
+
+// clientMapInner is the inner type of ClientMap, implementing heap.Interface.
+// byAge is the backing store, a heap ordered by LastSeen time, to facilitate
+// expiring old client records. byAddr is a map from addresses (i.e., ClientIDs)
+// to heap indices, to allow looking up by address. Unlike ClientMap,
+// clientMapInner requires external synchonization.
+type clientMapInner struct {
+ byAge []*clientRecord
+ byAddr map[net.Addr]int
+}
+
+// removeExpired removes all client records whose LastSeen timestamp is more
+// than timeout in the past.
+func (inner *clientMapInner) removeExpired(now time.Time, timeout time.Duration) {
+ for len(inner.byAge) > 0 && now.Sub(inner.byAge[0].LastSeen) >= timeout {
+ heap.Pop(inner)
+ }
+}
+
+// SendQueue finds the existing client record corresponding to addr, or creates
+// a new one if none exists yet. It updates the client record's LastSeen time
+// and returns its SendQueue.
+func (inner *clientMapInner) SendQueue(addr net.Addr, now time.Time) chan []byte {
+ var record *clientRecord
+ i, ok := inner.byAddr[addr]
+ if ok {
+ // Found one, update its LastSeen.
+ record = inner.byAge[i]
+ record.LastSeen = now
+ heap.Fix(inner, i)
+ } else {
+ // Not found, create a new one.
+ record = &clientRecord{
+ Addr: addr,
+ LastSeen: now,
+ SendQueue: make(chan []byte, queueSize),
+ }
+ heap.Push(inner, record)
+ }
+ return record.SendQueue
+}
+
+// heap.Interface for clientMapInner.
+
+func (inner *clientMapInner) Len() int {
+ if len(inner.byAge) != len(inner.byAddr) {
+ panic("inconsistent clientMap")
+ }
+ return len(inner.byAge)
+}
+
+func (inner *clientMapInner) Less(i, j int) bool {
+ return inner.byAge[i].LastSeen.Before(inner.byAge[j].LastSeen)
+}
+
+func (inner *clientMapInner) Swap(i, j int) {
+ inner.byAge[i], inner.byAge[j] = inner.byAge[j], inner.byAge[i]
+ inner.byAddr[inner.byAge[i].Addr] = i
+ inner.byAddr[inner.byAge[j].Addr] = j
+}
+
+func (inner *clientMapInner) Push(x interface{}) {
+ record := x.(*clientRecord)
+ if _, ok := inner.byAddr[record.Addr]; ok {
+ panic("duplicate address in clientMap")
+ }
+ // Insert into byAddr map.
+ inner.byAddr[record.Addr] = len(inner.byAge)
+ // Insert into byAge slice.
+ inner.byAge = append(inner.byAge, record)
+}
+
+func (inner *clientMapInner) Pop() interface{} {
+ n := len(inner.byAddr)
+ // Remove from byAge slice.
+ record := inner.byAge[n-1]
+ inner.byAge[n-1] = nil
+ inner.byAge = inner.byAge[:n-1]
+ // Remove from byAddr map.
+ delete(inner.byAddr, record.Addr)
+ close(record.SendQueue)
+ return record
+}
diff --git a/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/consts.go b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/consts.go
new file mode 100644
index 0000000..80f70af
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/consts.go
@@ -0,0 +1,17 @@
+// Package turbotunnel provides support for overlaying a virtual net.PacketConn
+// on some other network carrier.
+//
+// https://github.com/net4people/bbs/issues/9
+package turbotunnel
+
+import "errors"
+
+// This magic prefix is how a client opts into turbo tunnel mode. It is just a
+// randomly generated byte string.
+var Token = [8]byte{0x12, 0x93, 0x60, 0x5d, 0x27, 0x81, 0x75, 0xf5}
+
+// The size of receive and send queues.
+const queueSize = 32
+
+var errClosedPacketConn = errors.New("operation on closed connection")
+var errNotImplemented = errors.New("not implemented")
diff --git a/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/queuepacketconn.go b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/queuepacketconn.go
new file mode 100644
index 0000000..14a9833
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/queuepacketconn.go
@@ -0,0 +1,137 @@
+package turbotunnel
+
+import (
+ "net"
+ "sync"
+ "sync/atomic"
+ "time"
+)
+
+// taggedPacket is a combination of a []byte and a net.Addr, encapsulating the
+// return type of PacketConn.ReadFrom.
+type taggedPacket struct {
+ P []byte
+ Addr net.Addr
+}
+
+// QueuePacketConn implements net.PacketConn by storing queues of packets. There
+// is one incoming queue (where packets are additionally tagged by the source
+// address of the client that sent them). There are many outgoing queues, one
+// for each client address that has been recently seen. The QueueIncoming method
+// inserts a packet into the incoming queue, to eventually be returned by
+// ReadFrom. WriteTo inserts a packet into an address-specific outgoing queue,
+// which can later by accessed through the OutgoingQueue method.
+type QueuePacketConn struct {
+ clients *ClientMap
+ localAddr net.Addr
+ recvQueue chan taggedPacket
+ closeOnce sync.Once
+ closed chan struct{}
+ // What error to return when the QueuePacketConn is closed.
+ err atomic.Value
+}
+
+// NewQueuePacketConn makes a new QueuePacketConn, set to track recent clients
+// for at least a duration of timeout.
+func NewQueuePacketConn(localAddr net.Addr, timeout time.Duration) *QueuePacketConn {
+ return &QueuePacketConn{
+ clients: NewClientMap(timeout),
+ localAddr: localAddr,
+ recvQueue: make(chan taggedPacket, queueSize),
+ closed: make(chan struct{}),
+ }
+}
+
+// QueueIncoming queues and incoming packet and its source address, to be
+// returned in a future call to ReadFrom.
+func (c *QueuePacketConn) QueueIncoming(p []byte, addr net.Addr) {
+ select {
+ case <-c.closed:
+ // If we're closed, silently drop it.
+ return
+ default:
+ }
+ // Copy the slice so that the caller may reuse it.
+ buf := make([]byte, len(p))
+ copy(buf, p)
+ select {
+ case c.recvQueue <- taggedPacket{buf, addr}:
+ default:
+ // Drop the incoming packet if the receive queue is full.
+ }
+}
+
+// OutgoingQueue returns the queue of outgoing packets corresponding to addr,
+// creating it if necessary. The contents of the queue will be packets that are
+// written to the address in question using WriteTo.
+func (c *QueuePacketConn) OutgoingQueue(addr net.Addr) <-chan []byte {
+ return c.clients.SendQueue(addr)
+}
+
+// ReadFrom returns a packet and address previously stored by QueueIncoming.
+func (c *QueuePacketConn) ReadFrom(p []byte) (int, net.Addr, error) {
+ select {
+ case <-c.closed:
+ return 0, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Addr: c.LocalAddr(), Err: c.err.Load().(error)}
+ default:
+ }
+ select {
+ case <-c.closed:
+ return 0, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Addr: c.LocalAddr(), Err: c.err.Load().(error)}
+ case packet := <-c.recvQueue:
+ return copy(p, packet.P), packet.Addr, nil
+ }
+}
+
+// WriteTo queues an outgoing packet for the given address. The queue can later
+// be retrieved using the OutgoingQueue method.
+func (c *QueuePacketConn) WriteTo(p []byte, addr net.Addr) (int, error) {
+ select {
+ case <-c.closed:
+ return 0, &net.OpError{Op: "write", Net: c.LocalAddr().Network(), Addr: c.LocalAddr(), Err: c.err.Load().(error)}
+ default:
+ }
+ // Copy the slice so that the caller may reuse it.
+ buf := make([]byte, len(p))
+ copy(buf, p)
+ select {
+ case c.clients.SendQueue(addr) <- buf:
+ return len(buf), nil
+ default:
+ // Drop the outgoing packet if the send queue is full.
+ return len(buf), nil
+ }
+}
+
+// closeWithError unblocks pending operations and makes future operations fail
+// with the given error. If err is nil, it becomes errClosedPacketConn.
+func (c *QueuePacketConn) closeWithError(err error) error {
+ var newlyClosed bool
+ c.closeOnce.Do(func() {
+ newlyClosed = true
+ // Store the error to be returned by future PacketConn
+ // operations.
+ if err == nil {
+ err = errClosedPacketConn
+ }
+ c.err.Store(err)
+ close(c.closed)
+ })
+ if !newlyClosed {
+ return &net.OpError{Op: "close", Net: c.LocalAddr().Network(), Addr: c.LocalAddr(), Err: c.err.Load().(error)}
+ }
+ return nil
+}
+
+// Close unblocks pending operations and makes future operations fail with a
+// "closed connection" error.
+func (c *QueuePacketConn) Close() error {
+ return c.closeWithError(nil)
+}
+
+// LocalAddr returns the localAddr value that was passed to NewQueuePacketConn.
+func (c *QueuePacketConn) LocalAddr() net.Addr { return c.localAddr }
+
+func (c *QueuePacketConn) SetDeadline(t time.Time) error { return errNotImplemented }
+func (c *QueuePacketConn) SetReadDeadline(t time.Time) error { return errNotImplemented }
+func (c *QueuePacketConn) SetWriteDeadline(t time.Time) error { return errNotImplemented }
diff --git a/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/redialpacketconn.go b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/redialpacketconn.go
new file mode 100644
index 0000000..cf6a8c9
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel/redialpacketconn.go
@@ -0,0 +1,204 @@
+package turbotunnel
+
+import (
+ "context"
+ "errors"
+ "net"
+ "sync"
+ "sync/atomic"
+ "time"
+)
+
+// RedialPacketConn implements a long-lived net.PacketConn atop a sequence of
+// other, transient net.PacketConns. RedialPacketConn creates a new
+// net.PacketConn by calling a provided dialContext function. Whenever the
+// net.PacketConn experiences a ReadFrom or WriteTo error, RedialPacketConn
+// calls the dialContext function again and starts sending and receiving packets
+// on the new net.PacketConn. RedialPacketConn's own ReadFrom and WriteTo
+// methods return an error only when the dialContext function returns an error.
+//
+// RedialPacketConn uses static local and remote addresses that are independent
+// of those of any dialed net.PacketConn.
+type RedialPacketConn struct {
+ localAddr net.Addr
+ remoteAddr net.Addr
+ dialContext func(context.Context) (net.PacketConn, error)
+ recvQueue chan []byte
+ sendQueue chan []byte
+ closed chan struct{}
+ closeOnce sync.Once
+ // The first dial error, which causes the clientPacketConn to be
+ // closed and is returned from future read/write operations. Compare to
+ // the rerr and werr in io.Pipe.
+ err atomic.Value
+}
+
+// NewQueuePacketConn makes a new RedialPacketConn, with the given static local
+// and remote addresses, and dialContext function.
+func NewRedialPacketConn(
+ localAddr, remoteAddr net.Addr,
+ dialContext func(context.Context) (net.PacketConn, error),
+) *RedialPacketConn {
+ c := &RedialPacketConn{
+ localAddr: localAddr,
+ remoteAddr: remoteAddr,
+ dialContext: dialContext,
+ recvQueue: make(chan []byte, queueSize),
+ sendQueue: make(chan []byte, queueSize),
+ closed: make(chan struct{}),
+ err: atomic.Value{},
+ }
+ go c.dialLoop()
+ return c
+}
+
+// dialLoop repeatedly calls c.dialContext and passes the resulting
+// net.PacketConn to c.exchange. It returns only when c is closed or dialContext
+// returns an error.
+func (c *RedialPacketConn) dialLoop() {
+ ctx, cancel := context.WithCancel(context.Background())
+ for {
+ select {
+ case <-c.closed:
+ cancel()
+ return
+ default:
+ }
+ conn, err := c.dialContext(ctx)
+ if err != nil {
+ c.closeWithError(err)
+ cancel()
+ return
+ }
+ c.exchange(conn)
+ conn.Close()
+ }
+}
+
+// exchange calls ReadFrom on the given net.PacketConn and places the resulting
+// packets in the receive queue, and takes packets from the send queue and calls
+// WriteTo on them, making the current net.PacketConn active.
+func (c *RedialPacketConn) exchange(conn net.PacketConn) {
+ readErrCh := make(chan error)
+ writeErrCh := make(chan error)
+
+ go func() {
+ defer close(readErrCh)
+ for {
+ select {
+ case <-c.closed:
+ return
+ case <-writeErrCh:
+ return
+ default:
+ }
+
+ var buf [1500]byte
+ n, _, err := conn.ReadFrom(buf[:])
+ if err != nil {
+ readErrCh <- err
+ return
+ }
+ p := make([]byte, n)
+ copy(p, buf[:])
+ select {
+ case c.recvQueue <- p:
+ default: // OK to drop packets.
+ }
+ }
+ }()
+
+ go func() {
+ defer close(writeErrCh)
+ for {
+ select {
+ case <-c.closed:
+ return
+ case <-readErrCh:
+ return
+ case p := <-c.sendQueue:
+ _, err := conn.WriteTo(p, c.remoteAddr)
+ if err != nil {
+ writeErrCh <- err
+ return
+ }
+ }
+ }
+ }()
+
+ select {
+ case <-readErrCh:
+ case <-writeErrCh:
+ }
+}
+
+// ReadFrom reads a packet from the currently active net.PacketConn. The
+// packet's original remote address is replaced with the RedialPacketConn's own
+// remote address.
+func (c *RedialPacketConn) ReadFrom(p []byte) (int, net.Addr, error) {
+ select {
+ case <-c.closed:
+ return 0, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Addr: c.remoteAddr, Err: c.err.Load().(error)}
+ default:
+ }
+ select {
+ case <-c.closed:
+ return 0, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Addr: c.remoteAddr, Err: c.err.Load().(error)}
+ case buf := <-c.recvQueue:
+ return copy(p, buf), c.remoteAddr, nil
+ }
+}
+
+// WriteTo writes a packet to the currently active net.PacketConn. The addr
+// argument is ignored and instead replaced with the RedialPacketConn's own
+// remote address.
+func (c *RedialPacketConn) WriteTo(p []byte, addr net.Addr) (int, error) {
+ // addr is ignored.
+ select {
+ case <-c.closed:
+ return 0, &net.OpError{Op: "write", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Addr: c.remoteAddr, Err: c.err.Load().(error)}
+ default:
+ }
+ buf := make([]byte, len(p))
+ copy(buf, p)
+ select {
+ case c.sendQueue <- buf:
+ return len(buf), nil
+ default:
+ // Drop the outgoing packet if the send queue is full.
+ return len(buf), nil
+ }
+}
+
+// closeWithError unblocks pending operations and makes future operations fail
+// with the given error. If err is nil, it becomes errClosedPacketConn.
+func (c *RedialPacketConn) closeWithError(err error) error {
+ var once bool
+ c.closeOnce.Do(func() {
+ // Store the error to be returned by future read/write
+ // operations.
+ if err == nil {
+ err = errors.New("operation on closed connection")
+ }
+ c.err.Store(err)
+ close(c.closed)
+ once = true
+ })
+ if !once {
+ return &net.OpError{Op: "close", Net: c.LocalAddr().Network(), Addr: c.LocalAddr(), Err: c.err.Load().(error)}
+ }
+ return nil
+}
+
+// Close unblocks pending operations and makes future operations fail with a
+// "closed connection" error.
+func (c *RedialPacketConn) Close() error {
+ return c.closeWithError(nil)
+}
+
+// LocalAddr returns the localAddr value that was passed to NewRedialPacketConn.
+func (c *RedialPacketConn) LocalAddr() net.Addr { return c.localAddr }
+
+func (c *RedialPacketConn) SetDeadline(t time.Time) error { return errNotImplemented }
+func (c *RedialPacketConn) SetReadDeadline(t time.Time) error { return errNotImplemented }
+func (c *RedialPacketConn) SetWriteDeadline(t time.Time) error { return errNotImplemented }
diff --git a/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/util/util.go b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/util/util.go
new file mode 100644
index 0000000..00f7302
--- /dev/null
+++ b/vendor/git.torproject.org/pluggable-transports/snowflake.git/common/util/util.go
@@ -0,0 +1,99 @@
+package util
+
+import (
+ "encoding/json"
+ "errors"
+ "net"
+
+ "github.com/pion/ice/v2"
+ "github.com/pion/sdp/v3"
+ "github.com/pion/webrtc/v3"
+)
+
+func SerializeSessionDescription(desc *webrtc.SessionDescription) (string, error) {
+ bytes, err := json.Marshal(*desc)
+ if err != nil {
+ return "", err
+ }
+ return string(bytes), nil
+}
+
+func DeserializeSessionDescription(msg string) (*webrtc.SessionDescription, error) {
+ var parsed map[string]interface{}
+ err := json.Unmarshal([]byte(msg), &parsed)
+ if err != nil {
+ return nil, err
+ }
+ if _, ok := parsed["type"]; !ok {
+ return nil, errors.New("cannot deserialize SessionDescription without type field")
+ }
+ if _, ok := parsed["sdp"]; !ok {
+ return nil, errors.New("cannot deserialize SessionDescription without sdp field")
+ }
+
+ var stype webrtc.SDPType
+ switch parsed["type"].(string) {
+ default:
+ return nil, errors.New("Unknown SDP type")
+ case "offer":
+ stype = webrtc.SDPTypeOffer
+ case "pranswer":
+ stype = webrtc.SDPTypePranswer
+ case "answer":
+ stype = webrtc.SDPTypeAnswer
+ case "rollback":
+ stype = webrtc.SDPTypeRollback
+ }
+
+ return &webrtc.SessionDescription{
+ Type: stype,
+ SDP: parsed["sdp"].(string),
+ }, nil
+}
+
+// Stolen from https://github.com/golang/go/pull/30278
+func IsLocal(ip net.IP) bool {
+ if ip4 := ip.To4(); ip4 != nil {
+ // Local IPv4 addresses are defined in https://tools.ietf.org/html/rfc1918
+ return ip4[0] == 10 ||
+ (ip4[0] == 172 && ip4[1]&0xf0 == 16) ||
+ (ip4[0] == 192 && ip4[1] == 168) ||
+ // Carrier-Grade NAT as per https://tools.ietf.org/htm/rfc6598
+ (ip4[0] == 100 && ip4[1]&0xc0 == 64) ||
+ // Dynamic Configuration as per https://tools.ietf.org/htm/rfc3927
+ (ip4[0] == 169 && ip4[1] == 254)
+ }
+ // Local IPv6 addresses are defined in https://tools.ietf.org/html/rfc4193
+ return len(ip) == net.IPv6len && ip[0]&0xfe == 0xfc
+}
+
+// Removes local LAN address ICE candidates
+func StripLocalAddresses(str string) string {
+ var desc sdp.SessionDescription
+ err := desc.Unmarshal([]byte(str))
+ if err != nil {
+ return str
+ }
+ for _, m := range desc.MediaDescriptions {
+ attrs := make([]sdp.Attribute, 0)
+ for _, a := range m.Attributes {
+ if a.IsICECandidate() {
+ c, err := ice.UnmarshalCandidate(a.Value)
+ if err == nil && c.Type() == ice.CandidateTypeHost {
+ ip := net.ParseIP(c.Address())
+ if ip != nil && (IsLocal(ip) || ip.IsUnspecified() || ip.IsLoopback()) {
+ /* no append in this case */
+ continue
+ }
+ }
+ }
+ attrs = append(attrs, a)
+ }
+ m.Attributes = attrs
+ }
+ bts, err := desc.Marshal()
+ if err != nil {
+ return str
+ }
+ return string(bts)
+}
diff --git a/vendor/github.com/cretz/bine/LICENSE b/vendor/github.com/cretz/bine/LICENSE
new file mode 100644
index 0000000..6a6444d
--- /dev/null
+++ b/vendor/github.com/cretz/bine/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Chad Retz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE. \ No newline at end of file
diff --git a/vendor/github.com/cretz/bine/control/cmd_authenticate.go b/vendor/github.com/cretz/bine/control/cmd_authenticate.go
new file mode 100644
index 0000000..c43d864
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/cmd_authenticate.go
@@ -0,0 +1,108 @@
+package control
+
+import (
+ "crypto/hmac"
+ "crypto/rand"
+ "crypto/sha256"
+ "encoding/hex"
+ "io/ioutil"
+ "strings"
+)
+
+// Authenticate authenticates with the Tor instance using the "best" possible
+// authentication method if not already authenticated and sets the Authenticated
+// field. The password argument is optional, and will only be used if the
+// "SAFECOOKIE" and "NULL" authentication methods are not available and
+// "HASHEDPASSWORD" is.
+func (c *Conn) Authenticate(password string) error {
+ if c.Authenticated {
+ return nil
+ }
+ // Determine the supported authentication methods, and the cookie path.
+ pi, err := c.ProtocolInfo()
+ if err != nil {
+ return err
+ }
+ // Get the bytes to pass to with authenticate
+ var authBytes []byte
+ if pi.HasAuthMethod("NULL") {
+ // No auth bytes
+ } else if pi.HasAuthMethod("SAFECOOKIE") {
+ if pi.CookieFile == "" {
+ return c.protoErr("Invalid (empty) COOKIEFILE")
+ }
+ cookie, err := ioutil.ReadFile(pi.CookieFile)
+ if err != nil {
+ return c.protoErr("Failed to read COOKIEFILE: %v", err)
+ } else if len(cookie) != 32 {
+ return c.protoErr("Invalid cookie file length: %v", len(cookie))
+ }
+
+ // Send an AUTHCHALLENGE command, and parse the response.
+ var clientNonce [32]byte
+ if _, err := rand.Read(clientNonce[:]); err != nil {
+ return c.protoErr("Failed to generate clientNonce: %v", err)
+ }
+ resp, err := c.SendRequest("AUTHCHALLENGE %s %s", "SAFECOOKIE", hex.EncodeToString(clientNonce[:]))
+ if err != nil {
+ return err
+ }
+ splitResp := strings.Split(resp.Reply, " ")
+ if len(splitResp) != 3 || !strings.HasPrefix(splitResp[1], "SERVERHASH=") ||
+ !strings.HasPrefix(splitResp[2], "SERVERNONCE=") {
+ return c.protoErr("Invalid AUTHCHALLENGE response")
+ }
+ serverHash, err := hex.DecodeString(splitResp[1][11:])
+ if err != nil {
+ return c.protoErr("Failed to decode ServerHash: %v", err)
+ }
+ if len(serverHash) != 32 {
+ return c.protoErr("Invalid ServerHash length: %d", len(serverHash))
+ }
+ serverNonce, err := hex.DecodeString(splitResp[2][12:])
+ if err != nil {
+ return c.protoErr("Failed to decode ServerNonce: %v", err)
+ }
+ if len(serverNonce) != 32 {
+ return c.protoErr("Invalid ServerNonce length: %d", len(serverNonce))
+ }
+
+ // Validate the ServerHash.
+ m := hmac.New(sha256.New, []byte("Tor safe cookie authentication server-to-controller hash"))
+ m.Write(cookie)
+ m.Write(clientNonce[:])
+ m.Write(serverNonce)
+ dervServerHash := m.Sum(nil)
+ if !hmac.Equal(serverHash, dervServerHash) {
+ return c.protoErr("invalid ServerHash: mismatch")
+ }
+
+ // Calculate the ClientHash, and issue the AUTHENTICATE.
+ m = hmac.New(sha256.New, []byte("Tor safe cookie authentication controller-to-server hash"))
+ m.Write(cookie)
+ m.Write(clientNonce[:])
+ m.Write(serverNonce)
+ authBytes = m.Sum(nil)
+ } else if pi.HasAuthMethod("HASHEDPASSWORD") {
+ // Despite the name HASHEDPASSWORD, the raw password is actually sent. According to the code, this can either be
+ // a QuotedString, or base16 encoded, so go with the later since it's easier to handle.
+ if password == "" {
+ return c.protoErr("password auth needs a password")
+ }
+ authBytes = []byte(password)
+ } else {
+ return c.protoErr("No supported authentication methods")
+ }
+ // Send it
+ if err = c.sendAuthenticate(authBytes); err == nil {
+ c.Authenticated = true
+ }
+ return err
+}
+
+func (c *Conn) sendAuthenticate(byts []byte) error {
+ if len(byts) == 0 {
+ return c.sendRequestIgnoreResponse("AUTHENTICATE")
+ }
+ return c.sendRequestIgnoreResponse("AUTHENTICATE %v", hex.EncodeToString(byts))
+}
diff --git a/vendor/github.com/cretz/bine/control/cmd_circuit.go b/vendor/github.com/cretz/bine/control/cmd_circuit.go
new file mode 100644
index 0000000..f796145
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/cmd_circuit.go
@@ -0,0 +1,38 @@
+package control
+
+import (
+ "strings"
+)
+
+// ExtendCircuit invokes EXTENDCIRCUIT and returns the circuit ID on success.
+func (c *Conn) ExtendCircuit(circuitID string, path []string, purpose string) (string, error) {
+ if circuitID == "" {
+ circuitID = "0"
+ }
+ cmd := "EXTENDCIRCUIT " + circuitID
+ if len(path) > 0 {
+ cmd += " " + strings.Join(path, ",")
+ }
+ if purpose != "" {
+ cmd += " purpose=" + purpose
+ }
+ resp, err := c.SendRequest(cmd)
+ if err != nil {
+ return "", err
+ }
+ return resp.Reply[strings.LastIndexByte(resp.Reply, ' ')+1:], nil
+}
+
+// SetCircuitPurpose invokes SETCIRCUITPURPOSE.
+func (c *Conn) SetCircuitPurpose(circuitID string, purpose string) error {
+ return c.sendRequestIgnoreResponse("SETCIRCUITPURPOSE %v purpose=%v", circuitID, purpose)
+}
+
+// CloseCircuit invokes CLOSECIRCUIT.
+func (c *Conn) CloseCircuit(circuitID string, flags []string) error {
+ cmd := "CLOSECIRCUIT " + circuitID
+ for _, flag := range flags {
+ cmd += " " + flag
+ }
+ return c.sendRequestIgnoreResponse(cmd)
+}
diff --git a/vendor/github.com/cretz/bine/control/cmd_conf.go b/vendor/github.com/cretz/bine/control/cmd_conf.go
new file mode 100644
index 0000000..c0446e5
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/cmd_conf.go
@@ -0,0 +1,65 @@
+package control
+
+import (
+ "strings"
+
+ "github.com/cretz/bine/torutil"
+)
+
+// SetConf invokes SETCONF.
+func (c *Conn) SetConf(entries ...*KeyVal) error {
+ return c.sendSetConf("SETCONF", entries)
+}
+
+// ResetConf invokes RESETCONF.
+func (c *Conn) ResetConf(entries ...*KeyVal) error {
+ return c.sendSetConf("RESETCONF", entries)
+}
+
+func (c *Conn) sendSetConf(cmd string, entries []*KeyVal) error {
+ for _, entry := range entries {
+ cmd += " " + entry.Key
+ if entry.ValSet() {
+ cmd += "=" + torutil.EscapeSimpleQuotedStringIfNeeded(entry.Val)
+ }
+ }
+ return c.sendRequestIgnoreResponse(cmd)
+}
+
+// GetConf invokes GETCONF and returns the values for the requested keys.
+func (c *Conn) GetConf(keys ...string) ([]*KeyVal, error) {
+ resp, err := c.SendRequest("GETCONF %v", strings.Join(keys, " "))
+ if err != nil {
+ return nil, err
+ }
+ data := resp.DataWithReply()
+ ret := make([]*KeyVal, 0, len(data))
+ for _, data := range data {
+ key, val, ok := torutil.PartitionString(data, '=')
+ entry := &KeyVal{Key: key}
+ if ok {
+ if entry.Val, err = torutil.UnescapeSimpleQuotedStringIfNeeded(val); err != nil {
+ return nil, err
+ }
+ if len(entry.Val) == 0 {
+ entry.ValSetAndEmpty = true
+ }
+ }
+ ret = append(ret, entry)
+ }
+ return ret, nil
+}
+
+// SaveConf invokes SAVECONF.
+func (c *Conn) SaveConf(force bool) error {
+ cmd := "SAVECONF"
+ if force {
+ cmd += " FORCE"
+ }
+ return c.sendRequestIgnoreResponse(cmd)
+}
+
+// LoadConf invokes LOADCONF.
+func (c *Conn) LoadConf(conf string) error {
+ return c.sendRequestIgnoreResponse("+LOADCONF\r\n%v\r\n.", conf)
+}
diff --git a/vendor/github.com/cretz/bine/control/cmd_event.go b/vendor/github.com/cretz/bine/control/cmd_event.go
new file mode 100644
index 0000000..578a800
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/cmd_event.go
@@ -0,0 +1,1218 @@
+package control
+
+import (
+ "context"
+ "errors"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/cretz/bine/torutil"
+)
+
+// EventCode represents an asynchronous event code (ref control spec 4.1).
+type EventCode string
+
+// Event codes
+const (
+ EventCodeAddrMap EventCode = "ADDRMAP"
+ EventCodeBandwidth EventCode = "BW"
+ EventCodeBuildTimeoutSet EventCode = "BUILDTIMEOUT_SET"
+ EventCodeCellStats EventCode = "CELL_STATS"
+ EventCodeCircuit EventCode = "CIRC"
+ EventCodeCircuitBandwidth EventCode = "CIRC_BW"
+ EventCodeCircuitMinor EventCode = "CIRC_MINOR"
+ EventCodeClientsSeen EventCode = "CLIENTS_SEEN"
+ EventCodeConfChanged EventCode = "CONF_CHANGED"
+ EventCodeConnBandwidth EventCode = "CONN_BW"
+ EventCodeDescChanged EventCode = "DESCCHANGED"
+ EventCodeGuard EventCode = "GUARD"
+ EventCodeHSDesc EventCode = "HS_DESC"
+ EventCodeHSDescContent EventCode = "HS_DESC_CONTENT"
+ EventCodeLogDebug EventCode = "DEBUG"
+ EventCodeLogErr EventCode = "ERR"
+ EventCodeLogInfo EventCode = "INFO"
+ EventCodeLogNotice EventCode = "NOTICE"
+ EventCodeLogWarn EventCode = "WARN"
+ EventCodeNetworkLiveness EventCode = "NETWORK_LIVENESS"
+ EventCodeNetworkStatus EventCode = "NS"
+ EventCodeNewConsensus EventCode = "NEWCONSENSUS"
+ EventCodeNewDesc EventCode = "NEWDESC"
+ EventCodeORConn EventCode = "ORCONN"
+ EventCodeSignal EventCode = "SIGNAL"
+ EventCodeStatusClient EventCode = "STATUS_CLIENT"
+ EventCodeStatusGeneral EventCode = "STATUS_GENERAL"
+ EventCodeStatusServer EventCode = "STATUS_SERVER"
+ EventCodeStream EventCode = "STREAM"
+ EventCodeStreamBandwidth EventCode = "STREAM_BW"
+ EventCodeTokenBucketEmpty EventCode = "TB_EMPTY"
+ EventCodeTransportLaunched EventCode = "TRANSPORT_LAUNCHED"
+)
+
+// EventCodeUnrecognized is a special event code that is only used with
+// AddEventListener and RemoveEventListener to listen for events that are
+// unrecognized by this library (i.e. UnrecognizedEvent).
+var EventCodeUnrecognized EventCode = "<unrecognized>"
+
+var recognizedEventCodes = []EventCode{
+ EventCodeAddrMap,
+ EventCodeBandwidth,
+ EventCodeBuildTimeoutSet,
+ EventCodeCellStats,
+ EventCodeCircuit,
+ EventCodeCircuitBandwidth,
+ EventCodeCircuitMinor,
+ EventCodeClientsSeen,
+ EventCodeConfChanged,
+ EventCodeConnBandwidth,
+ EventCodeDescChanged,
+ EventCodeGuard,
+ EventCodeHSDesc,
+ EventCodeHSDescContent,
+ EventCodeLogDebug,
+ EventCodeLogErr,
+ EventCodeLogInfo,
+ EventCodeLogNotice,
+ EventCodeLogWarn,
+ EventCodeNetworkLiveness,
+ EventCodeNetworkStatus,
+ EventCodeNewConsensus,
+ EventCodeNewDesc,
+ EventCodeORConn,
+ EventCodeSignal,
+ EventCodeStatusClient,
+ EventCodeStatusGeneral,
+ EventCodeStatusServer,
+ EventCodeStream,
+ EventCodeStreamBandwidth,
+ EventCodeTokenBucketEmpty,
+ EventCodeTransportLaunched,
+}
+
+var recognizedEventCodesByCode = mapEventCodes()
+
+func mapEventCodes() map[EventCode]struct{} {
+ ret := make(map[EventCode]struct{}, len(recognizedEventCodes))
+ for _, eventCode := range recognizedEventCodes {
+ ret[eventCode] = struct{}{}
+ }
+ return ret
+}
+
+// EventCodes returns a new slice of all event codes that are recognized (i.e.
+// does not include EventCodeUnrecognized).
+func EventCodes() []EventCode {
+ ret := make([]EventCode, len(recognizedEventCodes))
+ copy(ret, recognizedEventCodes)
+ return ret
+}
+
+// ErrEventWaitSynchronousResponseOccurred is returned from EventWait (see docs)
+var ErrEventWaitSynchronousResponseOccurred = errors.New("Synchronous event occurred during EventWait")
+
+// EventWait waits for the predicate to be satisified or a non-event message to
+// come through. If a non-event comes through, the error
+// ErrEventWaitSynchronousResponseOccurred is returned. If there is an error in
+// the predicate or if the context completes or there is an error internally
+// handling the event, the error is returned. Otherwise, the event that true was
+// returned from the predicate for is returned.
+func (c *Conn) EventWait(
+ ctx context.Context, events []EventCode, predicate func(Event) (bool, error),
+) (Event, error) {
+ eventCh := make(chan Event, 10)
+ defer close(eventCh)
+ if err := c.AddEventListener(eventCh, events...); err != nil {
+ return nil, err
+ }
+ defer c.RemoveEventListener(eventCh, events...)
+ eventCtx, eventCancel := context.WithCancel(ctx)
+ defer eventCancel()
+ errCh := make(chan error, 1)
+ go func() { errCh <- c.HandleEvents(eventCtx) }()
+ for {
+ select {
+ case <-eventCtx.Done():
+ return nil, eventCtx.Err()
+ case err := <-errCh:
+ return nil, err
+ case event := <-eventCh:
+ if ok, err := predicate(event); err != nil {
+ return nil, err
+ } else if ok {
+ return event, nil
+ }
+ }
+ }
+}
+
+// HandleEvents loops until the context is closed dispatching async events. Can
+// dispatch events even after context is done and of course during synchronous
+// request. This will always end with an error, either from ctx.Done() or from
+// an error reading/handling the event.
+func (c *Conn) HandleEvents(ctx context.Context) error {
+ errCh := make(chan error, 1)
+ go func() {
+ for ctx.Err() == nil {
+ if err := c.HandleNextEvent(); err != nil {
+ errCh <- err
+ break
+ }
+ }
+ }()
+ select {
+ case err := <-errCh:
+ return err
+ case <-ctx.Done():
+ return ctx.Err()
+ }
+}
+
+// HandleNextEvent attempts to read and handle the next event. It will return on
+// first message seen, event or not. Otherwise it will wait until there is a
+// message read.
+func (c *Conn) HandleNextEvent() error {
+ c.readLock.Lock()
+ defer c.readLock.Unlock()
+ // We'll just peek for the next 3 bytes and see if they are async
+ byts, err := c.conn.R.Peek(3)
+ if err != nil {
+ return err
+ }
+ statusCode, err := strconv.Atoi(string(byts))
+ if err != nil || statusCode != StatusAsyncEvent {
+ return err
+ }
+ // Read the entire thing and handle it
+ resp, err := c.ReadResponse()
+ if err != nil {
+ return err
+ }
+ c.relayAsyncEvents(resp)
+ return nil
+}
+
+// AddEventListener adds the given channel as an event listener for the given
+// events. Then Tor is notified about which events should be listened to.
+// Callers are expected to call RemoveEventListener for the channel and all
+// event codes used here before closing the channel. If no events are provided,
+// this is essentially a no-op. The EventCodeUnrecognized event code can be used
+// to listen for unrecognized events.
+func (c *Conn) AddEventListener(ch chan<- Event, events ...EventCode) error {
+ c.addEventListenerToMap(ch, events...)
+ // If there is an error updating the events, remove what we just added
+ err := c.sendSetEvents()
+ if err != nil {
+ c.removeEventListenerFromMap(ch, events...)
+ }
+ return err
+}
+
+// RemoveEventListener removes the given channel from being sent to by the given
+// event codes. It is not an error to remove a channel from events
+// AddEventListener was not called for. Tor is notified about events which may
+// no longer be listened to. If no events are provided, this is essentially a
+// no-op.
+func (c *Conn) RemoveEventListener(ch chan<- Event, events ...EventCode) error {
+ c.removeEventListenerFromMap(ch, events...)
+ return c.sendSetEvents()
+}
+
+func (c *Conn) addEventListenerToMap(ch chan<- Event, events ...EventCode) {
+ c.eventListenersLock.Lock()
+ defer c.eventListenersLock.Unlock()
+ for _, event := range events {
+ // Must completely replace the array, never mutate it
+ prevArr := c.eventListeners[event]
+ newArr := make([]chan<- Event, len(prevArr)+1)
+ copy(newArr, prevArr)
+ newArr[len(newArr)-1] = ch
+ c.eventListeners[event] = newArr
+ }
+}
+
+func (c *Conn) removeEventListenerFromMap(ch chan<- Event, events ...EventCode) {
+ c.eventListenersLock.Lock()
+ defer c.eventListenersLock.Unlock()
+ for _, event := range events {
+ arr := c.eventListeners[event]
+ index := -1
+ for i, listener := range arr {
+ if listener == ch {
+ index = i
+ break
+ }
+ }
+ if index != -1 {
+ if len(arr) == 1 {
+ delete(c.eventListeners, event)
+ } else {
+ // Must completely replace the array, never mutate it
+ newArr := make([]chan<- Event, len(arr)-1)
+ copy(newArr, arr[:index])
+ copy(newArr[index:], arr[index+1:])
+ c.eventListeners[event] = newArr
+ }
+ }
+ }
+}
+
+func (c *Conn) sendSetEvents() error {
+ c.eventListenersLock.RLock()
+ cmd := "SETEVENTS"
+ for event := range c.eventListeners {
+ cmd += " " + string(event)
+ }
+ c.eventListenersLock.RUnlock()
+ return c.sendRequestIgnoreResponse(cmd)
+}
+
+func (c *Conn) relayAsyncEvents(resp *Response) {
+ var code, data string
+ var dataArray []string
+ if len(resp.Data) == 1 {
+ // On single line, part up to space, newline, or EOL is the code, rest is data
+ if index := strings.Index(resp.Data[0], " "); index != -1 {
+ code, data = resp.Data[0][:index], resp.Data[0][index+1:]
+ } else if index := strings.Index(resp.Data[0], "\r\n"); index != -1 {
+ code, data = resp.Data[0][:index], resp.Data[0][index+2:]
+ } else {
+ code, data = resp.Data[0], ""
+ }
+ } else if len(resp.Data) > 0 {
+ // If there are multiple lines, the entire first line is the code
+ code, dataArray = resp.Data[0], resp.Data[1:]
+ } else {
+ // Otherwise, the reply line has the data
+ code, data, _ = torutil.PartitionString(resp.Reply, ' ')
+ }
+ // Only relay if there are chans
+ eventCode := EventCode(code)
+ c.eventListenersLock.RLock()
+ chans := c.eventListeners[eventCode]
+ if _, ok := recognizedEventCodesByCode[eventCode]; !ok {
+ chans = append(chans, c.eventListeners[EventCodeUnrecognized]...)
+ }
+ c.eventListenersLock.RUnlock()
+ if len(chans) == 0 {
+ return
+ }
+ // Parse the event and only send if known event
+ if event := ParseEvent(eventCode, data, dataArray); event != nil {
+ for _, ch := range chans {
+ // Just send, if closed or blocking, that's not our problem
+ ch <- event
+ }
+ }
+}
+
+// Zero on fail
+func parseISOTime(str string) time.Time {
+ // Essentially time.RFC3339 but without 'T' or TZ info
+ const layout = "2006-01-02 15:04:05"
+ ret, err := time.Parse(layout, str)
+ if err != nil {
+ ret = time.Time{}
+ }
+ return ret
+}
+
+// Zero on fail
+func parseISOTime2Frac(str string) time.Time {
+ // Essentially time.RFC3339Nano but without TZ info
+ const layout = "2006-01-02T15:04:05.999999999"
+ ret, err := time.Parse(layout, str)
+ if err != nil {
+ ret = time.Time{}
+ }
+ return ret
+}
+
+// Event is the base interface for all known asynchronous events.
+type Event interface {
+ Code() EventCode
+}
+
+// ParseEvent returns an Event for the given code and data info. Raw is the raw
+// single line if it is a single-line event (even if it has newlines), dataArray
+// is the array of lines for multi-line events. Only one of the two needs to be
+// set. The response is never nil, but may be UnrecognizedEvent. Format errors
+// are ignored per the Tor spec.
+func ParseEvent(code EventCode, raw string, dataArray []string) Event {
+ switch code {
+ case EventCodeAddrMap:
+ return ParseAddrMapEvent(raw)
+ case EventCodeBandwidth:
+ return ParseBandwidthEvent(raw)
+ case EventCodeBuildTimeoutSet:
+ return ParseBuildTimeoutSetEvent(raw)
+ case EventCodeCellStats:
+ return ParseCellStatsEvent(raw)
+ case EventCodeCircuit:
+ return ParseCircuitEvent(raw)
+ case EventCodeCircuitBandwidth:
+ return ParseCircuitBandwidthEvent(raw)
+ case EventCodeCircuitMinor:
+ return ParseCircuitMinorEvent(raw)
+ case EventCodeClientsSeen:
+ return ParseClientsSeenEvent(raw)
+ case EventCodeConfChanged:
+ return ParseConfChangedEvent(dataArray)
+ case EventCodeConnBandwidth:
+ return ParseConnBandwidthEvent(raw)
+ case EventCodeDescChanged:
+ return ParseDescChangedEvent(raw)
+ case EventCodeGuard:
+ return ParseGuardEvent(raw)
+ case EventCodeHSDesc:
+ return ParseHSDescEvent(raw)
+ case EventCodeHSDescContent:
+ return ParseHSDescContentEvent(raw)
+ case EventCodeLogDebug, EventCodeLogErr, EventCodeLogInfo, EventCodeLogNotice, EventCodeLogWarn:
+ return ParseLogEvent(code, raw)
+ case EventCodeNetworkLiveness:
+ return ParseNetworkLivenessEvent(raw)
+ case EventCodeNetworkStatus:
+ return ParseNetworkStatusEvent(raw)
+ case EventCodeNewConsensus:
+ return ParseNewConsensusEvent(raw)
+ case EventCodeNewDesc:
+ return ParseNewDescEvent(raw)
+ case EventCodeORConn:
+ return ParseORConnEvent(raw)
+ case EventCodeSignal:
+ return ParseSignalEvent(raw)
+ case EventCodeStatusClient, EventCodeStatusGeneral, EventCodeStatusServer:
+ return ParseStatusEvent(code, raw)
+ case EventCodeStream:
+ return ParseStreamEvent(raw)
+ case EventCodeStreamBandwidth:
+ return ParseStreamBandwidthEvent(raw)
+ case EventCodeTokenBucketEmpty:
+ return ParseTokenBucketEmptyEvent(raw)
+ case EventCodeTransportLaunched:
+ return ParseTransportLaunchedEvent(raw)
+ default:
+ return ParseUnrecognizedEvent(code, raw, dataArray)
+ }
+}
+
+// CircuitEvent is CIRC in spec.
+type CircuitEvent struct {
+ Raw string
+ CircuitID string
+ Status string
+ Path []string
+ BuildFlags []string
+ Purpose string
+ HSState string
+ RendQuery string
+ TimeCreated time.Time
+ Reason string
+ RemoteReason string
+ SocksUsername string
+ SocksPassword string
+}
+
+// ParseCircuitEvent parses the event.
+func ParseCircuitEvent(raw string) *CircuitEvent {
+ event := &CircuitEvent{Raw: raw}
+ event.CircuitID, raw, _ = torutil.PartitionString(raw, ' ')
+ var ok bool
+ event.Status, raw, ok = torutil.PartitionString(raw, ' ')
+ var attr string
+ first := true
+ for ok {
+ attr, raw, ok = torutil.PartitionString(raw, ' ')
+ key, val, _ := torutil.PartitionString(attr, '=')
+ switch key {
+ case "BUILD_FLAGS":
+ event.BuildFlags = strings.Split(val, ",")
+ case "PURPOSE":
+ event.Purpose = val
+ case "HS_STATE":
+ event.HSState = val
+ case "REND_QUERY":
+ event.RendQuery = val
+ case "TIME_CREATED":
+ event.TimeCreated = parseISOTime2Frac(val)
+ case "REASON":
+ event.Reason = val
+ case "REMOTE_REASON":
+ event.RemoteReason = val
+ case "SOCKS_USERNAME":
+ event.SocksUsername = val
+ case "SOCKS_PASSWORD":
+ event.SocksPassword = val
+ default:
+ if first {
+ event.Path = strings.Split(val, ",")
+ }
+ }
+ first = false
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (*CircuitEvent) Code() EventCode { return EventCodeCircuit }
+
+// StreamEvent is STREAM in spec.
+type StreamEvent struct {
+ Raw string
+ StreamID string
+ Status string
+ CircuitID string
+ TargetAddress string
+ TargetPort int
+ Reason string
+ RemoteReason string
+ Source string
+ SourceAddress string
+ SourcePort int
+ Purpose string
+}
+
+// ParseStreamEvent parses the event.
+func ParseStreamEvent(raw string) *StreamEvent {
+ event := &StreamEvent{Raw: raw}
+ event.StreamID, raw, _ = torutil.PartitionString(raw, ' ')
+ event.Status, raw, _ = torutil.PartitionString(raw, ' ')
+ event.CircuitID, raw, _ = torutil.PartitionString(raw, ' ')
+ var ok bool
+ event.TargetAddress, raw, ok = torutil.PartitionString(raw, ' ')
+ if target, port, hasPort := torutil.PartitionStringFromEnd(event.TargetAddress, ':'); hasPort {
+ event.TargetAddress = target
+ event.TargetPort, _ = strconv.Atoi(port)
+ }
+ var attr string
+ for ok {
+ attr, raw, ok = torutil.PartitionString(raw, ' ')
+ key, val, _ := torutil.PartitionString(attr, '=')
+ switch key {
+ case "REASON":
+ event.Reason = val
+ case "REMOTE_REASON":
+ event.RemoteReason = val
+ case "SOURCE":
+ event.Source = val
+ case "SOURCE_ADDR":
+ event.SourceAddress = val
+ if source, port, hasPort := torutil.PartitionStringFromEnd(event.SourceAddress, ':'); hasPort {
+ event.SourceAddress = source
+ event.SourcePort, _ = strconv.Atoi(port)
+ }
+ case "PURPOSE":
+ event.Purpose = val
+ }
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (*StreamEvent) Code() EventCode { return EventCodeStream }
+
+// ORConnEvent is ORCONN in spec.
+type ORConnEvent struct {
+ Raw string
+ Target string
+ Status string
+ Reason string
+ NumCircuits int
+ ConnID string
+}
+
+// ParseORConnEvent parses the event.
+func ParseORConnEvent(raw string) *ORConnEvent {
+ event := &ORConnEvent{Raw: raw}
+ event.Target, raw, _ = torutil.PartitionString(raw, ' ')
+ var ok bool
+ event.Status, raw, ok = torutil.PartitionString(raw, ' ')
+ var attr string
+ for ok {
+ attr, raw, ok = torutil.PartitionString(raw, ' ')
+ key, val, _ := torutil.PartitionString(attr, '=')
+ switch key {
+ case "REASON":
+ event.Reason = val
+ case "NCIRCS":
+ event.NumCircuits, _ = strconv.Atoi(val)
+ case "ID":
+ event.ConnID = val
+ }
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (*ORConnEvent) Code() EventCode { return EventCodeORConn }
+
+// BandwidthEvent is BW in spec.
+type BandwidthEvent struct {
+ Raw string
+ BytesRead int64
+ BytesWritten int64
+}
+
+// ParseBandwidthEvent parses the event.
+func ParseBandwidthEvent(raw string) *BandwidthEvent {
+ event := &BandwidthEvent{Raw: raw}
+ var temp string
+ temp, raw, _ = torutil.PartitionString(raw, ' ')
+ event.BytesRead, _ = strconv.ParseInt(temp, 10, 64)
+ temp, raw, _ = torutil.PartitionString(raw, ' ')
+ event.BytesWritten, _ = strconv.ParseInt(temp, 10, 64)
+ return event
+}
+
+// Code implements Event.Code
+func (*BandwidthEvent) Code() EventCode { return EventCodeBandwidth }
+
+// LogEvent is DEBUG, ERR, INFO, NOTICE, and WARN in spec.
+type LogEvent struct {
+ Severity EventCode
+ Raw string
+}
+
+// ParseLogEvent parses the event.
+func ParseLogEvent(severity EventCode, raw string) *LogEvent {
+ return &LogEvent{Severity: severity, Raw: raw}
+}
+
+// Code implements Event.Code
+func (l *LogEvent) Code() EventCode { return l.Severity }
+
+// NewDescEvent is NEWDESC in spec.
+type NewDescEvent struct {
+ Raw string
+ Descs []string
+}
+
+// ParseNewDescEvent parses the event.
+func ParseNewDescEvent(raw string) *NewDescEvent {
+ return &NewDescEvent{Raw: raw, Descs: strings.Split(raw, " ")}
+}
+
+// Code implements Event.Code
+func (*NewDescEvent) Code() EventCode { return EventCodeNewDesc }
+
+// AddrMapEvent is ADDRMAP in spec.
+type AddrMapEvent struct {
+ Raw string
+ Address string
+ NewAddress string
+ ErrorCode string
+ // Zero if no expire
+ Expires time.Time
+ // Sans double quotes
+ Cached string
+}
+
+// ParseAddrMapEvent parses the event.
+func ParseAddrMapEvent(raw string) *AddrMapEvent {
+ event := &AddrMapEvent{Raw: raw}
+ event.Address, raw, _ = torutil.PartitionString(raw, ' ')
+ event.NewAddress, raw, _ = torutil.PartitionString(raw, ' ')
+ var ok bool
+ // Skip local expiration, use UTC one later
+ _, raw, ok = torutil.PartitionString(raw, ' ')
+ var attr string
+ for ok {
+ attr, raw, ok = torutil.PartitionString(raw, ' ')
+ key, val, _ := torutil.PartitionString(attr, '=')
+ switch key {
+ case "error":
+ event.ErrorCode = val
+ case "EXPIRES":
+ val, _ = torutil.UnescapeSimpleQuotedString(val)
+ event.Expires = parseISOTime(val)
+ case "CACHED":
+ event.Cached, _ = torutil.UnescapeSimpleQuotedStringIfNeeded(val)
+ }
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (*AddrMapEvent) Code() EventCode { return EventCodeAddrMap }
+
+// DescChangedEvent is DESCCHANGED in spec.
+type DescChangedEvent struct {
+ Raw string
+}
+
+// ParseDescChangedEvent parses the event.
+func ParseDescChangedEvent(raw string) *DescChangedEvent {
+ return &DescChangedEvent{Raw: raw}
+}
+
+// Code implements Event.Code
+func (*DescChangedEvent) Code() EventCode { return EventCodeDescChanged }
+
+// StatusEvent is STATUS_CLIENT, STATUS_GENERAL, and STATUS_SERVER in spec.
+type StatusEvent struct {
+ Raw string
+ Type EventCode
+ Severity string
+ Action string
+ Arguments map[string]string
+}
+
+// ParseStatusEvent parses the event.
+func ParseStatusEvent(typ EventCode, raw string) *StatusEvent {
+ event := &StatusEvent{Raw: raw, Type: typ, Arguments: map[string]string{}}
+ event.Severity, raw, _ = torutil.PartitionString(raw, ' ')
+ var ok bool
+ event.Action, raw, ok = torutil.PartitionString(raw, ' ')
+ var attr string
+ for ok {
+ attr, raw, ok = torutil.PartitionString(raw, ' ')
+ key, val, _ := torutil.PartitionString(attr, '=')
+ event.Arguments[key], _ = torutil.UnescapeSimpleQuotedStringIfNeeded(val)
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (s *StatusEvent) Code() EventCode { return s.Type }
+
+// GuardEvent is GUARD in spec.
+type GuardEvent struct {
+ Raw string
+ Type string
+ Name string
+ Status string
+}
+
+// ParseGuardEvent parses the event.
+func ParseGuardEvent(raw string) *GuardEvent {
+ event := &GuardEvent{Raw: raw}
+ event.Type, raw, _ = torutil.PartitionString(raw, ' ')
+ event.Name, raw, _ = torutil.PartitionString(raw, ' ')
+ event.Status, raw, _ = torutil.PartitionString(raw, ' ')
+ return event
+}
+
+// Code implements Event.Code
+func (*GuardEvent) Code() EventCode { return EventCodeGuard }
+
+// NetworkStatusEvent is NS in spec.
+type NetworkStatusEvent struct {
+ Raw string
+}
+
+// ParseNetworkStatusEvent parses the event.
+func ParseNetworkStatusEvent(raw string) *NetworkStatusEvent {
+ return &NetworkStatusEvent{Raw: raw}
+}
+
+// Code implements Event.Code
+func (*NetworkStatusEvent) Code() EventCode { return EventCodeNetworkStatus }
+
+// StreamBandwidthEvent is STREAM_BW in spec.
+type StreamBandwidthEvent struct {
+ Raw string
+ BytesRead int64
+ BytesWritten int64
+ Time time.Time
+}
+
+// ParseStreamBandwidthEvent parses the event.
+func ParseStreamBandwidthEvent(raw string) *StreamBandwidthEvent {
+ event := &StreamBandwidthEvent{Raw: raw}
+ var temp string
+ temp, raw, _ = torutil.PartitionString(raw, ' ')
+ event.BytesRead, _ = strconv.ParseInt(temp, 10, 64)
+ temp, raw, _ = torutil.PartitionString(raw, ' ')
+ event.BytesWritten, _ = strconv.ParseInt(temp, 10, 64)
+ temp, raw, _ = torutil.PartitionString(raw, ' ')
+ temp, _ = torutil.UnescapeSimpleQuotedString(temp)
+ event.Time = parseISOTime2Frac(temp)
+ return event
+}
+
+// Code implements Event.Code
+func (*StreamBandwidthEvent) Code() EventCode { return EventCodeStreamBandwidth }
+
+// ClientsSeenEvent is CLIENTS_SEEN in spec.
+type ClientsSeenEvent struct {
+ Raw string
+ TimeStarted time.Time
+ CountrySummary map[string]int
+ IPVersions map[string]int
+}
+
+// ParseClientsSeenEvent parses the event.
+func ParseClientsSeenEvent(raw string) *ClientsSeenEvent {
+ event := &ClientsSeenEvent{Raw: raw}
+ var temp string
+ var ok bool
+ temp, raw, ok = torutil.PartitionString(raw, ' ')
+ temp, _ = torutil.UnescapeSimpleQuotedString(temp)
+ event.TimeStarted = parseISOTime(temp)
+ strToMap := func(str string) map[string]int {
+ ret := map[string]int{}
+ for _, keyVal := range strings.Split(str, ",") {
+ key, val, _ := torutil.PartitionString(keyVal, '=')
+ ret[key], _ = strconv.Atoi(val)
+ }
+ return ret
+ }
+ var attr string
+ for ok {
+ attr, raw, ok = torutil.PartitionString(raw, ' ')
+ key, val, _ := torutil.PartitionString(attr, '=')
+ switch key {
+ case "CountrySummary":
+ event.CountrySummary = strToMap(val)
+ case "IPVersions":
+ event.IPVersions = strToMap(val)
+ }
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (*ClientsSeenEvent) Code() EventCode { return EventCodeClientsSeen }
+
+// NewConsensusEvent is NEWCONSENSUS in spec.
+type NewConsensusEvent struct {
+ Raw string
+}
+
+// ParseNewConsensusEvent parses the event.
+func ParseNewConsensusEvent(raw string) *NewConsensusEvent {
+ return &NewConsensusEvent{Raw: raw}
+}
+
+// Code implements Event.Code
+func (*NewConsensusEvent) Code() EventCode { return EventCodeNewConsensus }
+
+// BuildTimeoutSetEvent is BUILDTIMEOUT_SET in spec.
+type BuildTimeoutSetEvent struct {
+ Raw string
+ Type string
+ TotalTimes int
+ Timeout time.Duration
+ Xm int
+ Alpha float32
+ Quantile float32
+ TimeoutRate float32
+ CloseTimeout time.Duration
+ CloseRate float32
+}
+
+// ParseBuildTimeoutSetEvent parses the event.
+func ParseBuildTimeoutSetEvent(raw string) *BuildTimeoutSetEvent {
+ event := &BuildTimeoutSetEvent{Raw: raw}
+ var ok bool
+ event.Type, raw, ok = torutil.PartitionString(raw, ' ')
+ _, raw, ok = torutil.PartitionString(raw, ' ')
+ var attr string
+ parseFloat := func(val string) float32 {
+ f, _ := strconv.ParseFloat(val, 32)
+ return float32(f)
+ }
+ for ok {
+ attr, raw, ok = torutil.PartitionString(raw, ' ')
+ key, val, _ := torutil.PartitionString(attr, '=')
+ switch key {
+ case "TOTAL_TIMES":
+ event.TotalTimes, _ = strconv.Atoi(val)
+ case "TIMEOUT_MS":
+ if ms, err := strconv.ParseInt(val, 10, 64); err == nil {
+ event.Timeout = time.Duration(ms) * time.Millisecond
+ }
+ case "XM":
+ event.Xm, _ = strconv.Atoi(val)
+ case "ALPHA":
+ event.Alpha = parseFloat(val)
+ case "CUTOFF_QUANTILE":
+ event.Quantile = parseFloat(val)
+ case "TIMEOUT_RATE":
+ event.TimeoutRate = parseFloat(val)
+ case "CLOSE_MS":
+ if ms, err := strconv.ParseInt(val, 10, 64); err == nil {
+ event.CloseTimeout = time.Duration(ms) * time.Millisecond
+ }
+ case "CLOSE_RATE":
+ event.CloseRate = parseFloat(val)
+ }
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (*BuildTimeoutSetEvent) Code() EventCode { return EventCodeBuildTimeoutSet }
+
+// SignalEvent is SIGNAL in spec.
+type SignalEvent struct {
+ Raw string
+}
+
+// ParseSignalEvent parses the event.
+func ParseSignalEvent(raw string) *SignalEvent {
+ return &SignalEvent{Raw: raw}
+}
+
+// Code implements Event.Code
+func (*SignalEvent) Code() EventCode { return EventCodeSignal }
+
+// ConfChangedEvent is CONF_CHANGED in spec.
+type ConfChangedEvent struct {
+ Raw []string
+}
+
+// ParseConfChangedEvent parses the event.
+func ParseConfChangedEvent(raw []string) *ConfChangedEvent {
+ // TODO: break into KeyVal and unescape strings
+ return &ConfChangedEvent{Raw: raw}
+}
+
+// Code implements Event.Code
+func (*ConfChangedEvent) Code() EventCode { return EventCodeConfChanged }
+
+// CircuitMinorEvent is CIRC_MINOR in spec.
+type CircuitMinorEvent struct {
+ Raw string
+ CircuitID string
+ Event string
+ Path []string
+ BuildFlags []string
+ Purpose string
+ HSState string
+ RendQuery string
+ TimeCreated time.Time
+ OldPurpose string
+ OldHSState string
+}
+
+// ParseCircuitMinorEvent parses the event.
+func ParseCircuitMinorEvent(raw string) *CircuitMinorEvent {
+ event := &CircuitMinorEvent{Raw: raw}
+ event.CircuitID, raw, _ = torutil.PartitionString(raw, ' ')
+ var ok bool
+ event.Event, raw, ok = torutil.PartitionString(raw, ' ')
+ var attr string
+ first := true
+ for ok {
+ attr, raw, ok = torutil.PartitionString(raw, ' ')
+ key, val, _ := torutil.PartitionString(attr, '=')
+ switch key {
+ case "BUILD_FLAGS":
+ event.BuildFlags = strings.Split(val, ",")
+ case "PURPOSE":
+ event.Purpose = val
+ case "HS_STATE":
+ event.HSState = val
+ case "REND_QUERY":
+ event.RendQuery = val
+ case "TIME_CREATED":
+ event.TimeCreated = parseISOTime2Frac(val)
+ case "OLD_PURPOSE":
+ event.OldPurpose = val
+ case "OLD_HS_STATE":
+ event.OldHSState = val
+ default:
+ if first {
+ event.Path = strings.Split(val, ",")
+ }
+ }
+ first = false
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (*CircuitMinorEvent) Code() EventCode { return EventCodeCircuitMinor }
+
+// TransportLaunchedEvent is TRANSPORT_LAUNCHED in spec.
+type TransportLaunchedEvent struct {
+ Raw string
+ Type string
+ Name string
+ Address string
+ Port int
+}
+
+// ParseTransportLaunchedEvent parses the event.
+func ParseTransportLaunchedEvent(raw string) *TransportLaunchedEvent {
+ event := &TransportLaunchedEvent{Raw: raw}
+ event.Type, raw, _ = torutil.PartitionString(raw, ' ')
+ event.Name, raw, _ = torutil.PartitionString(raw, ' ')
+ event.Address, raw, _ = torutil.PartitionString(raw, ' ')
+ var temp string
+ temp, raw, _ = torutil.PartitionString(raw, ' ')
+ event.Port, _ = strconv.Atoi(temp)
+ return event
+}
+
+// Code implements Event.Code
+func (*TransportLaunchedEvent) Code() EventCode { return EventCodeTransportLaunched }
+
+// ConnBandwidthEvent is CONN_BW in spec.
+type ConnBandwidthEvent struct {
+ Raw string
+ ConnID string
+ ConnType string
+ BytesRead int64
+ BytesWritten int64
+}
+
+// ParseConnBandwidthEvent parses the event.
+func ParseConnBandwidthEvent(raw string) *ConnBandwidthEvent {
+ event := &ConnBandwidthEvent{Raw: raw}
+ ok := true
+ var attr string
+ for ok {
+ attr, raw, ok = torutil.PartitionString(raw, ' ')
+ key, val, _ := torutil.PartitionString(attr, '=')
+ switch key {
+ case "ID":
+ event.ConnID = val
+ case "TYPE":
+ event.ConnType = val
+ case "READ":
+ event.BytesRead, _ = strconv.ParseInt(val, 10, 64)
+ case "WRITTEN":
+ event.BytesWritten, _ = strconv.ParseInt(val, 10, 64)
+ }
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (*ConnBandwidthEvent) Code() EventCode { return EventCodeConnBandwidth }
+
+// CircuitBandwidthEvent is CIRC_BW in spec.
+type CircuitBandwidthEvent struct {
+ Raw string
+ CircuitID string
+ BytesRead int64
+ BytesWritten int64
+ Time time.Time
+}
+
+// ParseCircuitBandwidthEvent parses the event.
+func ParseCircuitBandwidthEvent(raw string) *CircuitBandwidthEvent {
+ event := &CircuitBandwidthEvent{Raw: raw}
+ ok := true
+ var attr string
+ for ok {
+ attr, raw, ok = torutil.PartitionString(raw, ' ')
+ key, val, _ := torutil.PartitionString(attr, '=')
+ switch key {
+ case "ID":
+ event.CircuitID = val
+ case "READ":
+ event.BytesRead, _ = strconv.ParseInt(val, 10, 64)
+ case "WRITTEN":
+ event.BytesWritten, _ = strconv.ParseInt(val, 10, 64)
+ case "TIME":
+ event.Time = parseISOTime2Frac(val)
+ }
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (*CircuitBandwidthEvent) Code() EventCode { return EventCodeCircuitBandwidth }
+
+// CellStatsEvent is CELL_STATS in spec.
+type CellStatsEvent struct {
+ Raw string
+ CircuitID string
+ InboundQueueID string
+ InboundConnID string
+ InboundAdded map[string]int
+ InboundRemoved map[string]int
+ InboundTime map[string]int
+ OutboundQueueID string
+ OutboundConnID string
+ OutboundAdded map[string]int
+ OutboundRemoved map[string]int
+ OutboundTime map[string]int
+}
+
+// ParseCellStatsEvent parses the event.
+func ParseCellStatsEvent(raw string) *CellStatsEvent {
+ event := &CellStatsEvent{Raw: raw}
+ ok := true
+ var attr string
+ toIntMap := func(val string) map[string]int {
+ ret := map[string]int{}
+ for _, v := range strings.Split(val, ",") {
+ key, val, _ := torutil.PartitionString(v, ':')
+ ret[key], _ = strconv.Atoi(val)
+ }
+ return ret
+ }
+ for ok {
+ attr, raw, ok = torutil.PartitionString(raw, ' ')
+ key, val, _ := torutil.PartitionString(attr, '=')
+ switch key {
+ case "ID":
+ event.CircuitID = val
+ case "InboundQueue":
+ event.InboundQueueID = val
+ case "InboundConn":
+ event.InboundConnID = val
+ case "InboundAdded":
+ event.InboundAdded = toIntMap(val)
+ case "InboundRemoved":
+ event.InboundRemoved = toIntMap(val)
+ case "InboundTime":
+ event.OutboundTime = toIntMap(val)
+ case "OutboundQueue":
+ event.OutboundQueueID = val
+ case "OutboundConn":
+ event.OutboundConnID = val
+ case "OutboundAdded":
+ event.OutboundAdded = toIntMap(val)
+ case "OutboundRemoved":
+ event.OutboundRemoved = toIntMap(val)
+ case "OutboundTime":
+ event.OutboundTime = toIntMap(val)
+ }
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (*CellStatsEvent) Code() EventCode { return EventCodeCellStats }
+
+// TokenBucketEmptyEvent is TB_EMPTY in spec.
+type TokenBucketEmptyEvent struct {
+ Raw string
+ BucketName string
+ ConnID string
+ ReadBucketEmpty time.Duration
+ WriteBucketEmpty time.Duration
+ LastRefil time.Duration
+}
+
+// ParseTokenBucketEmptyEvent parses the event.
+func ParseTokenBucketEmptyEvent(raw string) *TokenBucketEmptyEvent {
+ event := &TokenBucketEmptyEvent{Raw: raw}
+ var ok bool
+ event.BucketName, raw, ok = torutil.PartitionString(raw, ' ')
+ var attr string
+ for ok {
+ attr, raw, ok = torutil.PartitionString(raw, ' ')
+ key, val, _ := torutil.PartitionString(attr, '=')
+ switch key {
+ case "ID":
+ event.ConnID = val
+ case "READ":
+ i, _ := strconv.ParseInt(val, 10, 64)
+ event.ReadBucketEmpty = time.Duration(i) * time.Millisecond
+ case "WRITTEN":
+ i, _ := strconv.ParseInt(val, 10, 64)
+ event.WriteBucketEmpty = time.Duration(i) * time.Millisecond
+ case "LAST":
+ i, _ := strconv.ParseInt(val, 10, 64)
+ event.LastRefil = time.Duration(i) * time.Millisecond
+ }
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (*TokenBucketEmptyEvent) Code() EventCode { return EventCodeTokenBucketEmpty }
+
+// HSDescEvent is HS_DESC in spec.
+type HSDescEvent struct {
+ Raw string
+ Action string
+ Address string
+ AuthType string
+ HSDir string
+ DescID string
+ Reason string
+ Replica int
+ HSDirIndex string
+}
+
+// ParseHSDescEvent parses the event.
+func ParseHSDescEvent(raw string) *HSDescEvent {
+ event := &HSDescEvent{Raw: raw}
+ event.Action, raw, _ = torutil.PartitionString(raw, ' ')
+ event.Address, raw, _ = torutil.PartitionString(raw, ' ')
+ event.AuthType, raw, _ = torutil.PartitionString(raw, ' ')
+ var ok bool
+ event.HSDir, raw, ok = torutil.PartitionString(raw, ' ')
+ var attr string
+ first := true
+ for ok {
+ attr, raw, ok = torutil.PartitionString(raw, ' ')
+ key, val, valOk := torutil.PartitionString(attr, '=')
+ switch key {
+ case "REASON":
+ event.Reason = val
+ case "REPLICA":
+ event.Replica, _ = strconv.Atoi(val)
+ case "HSDIR_INDEX":
+ event.HSDirIndex = val
+ default:
+ if first && !valOk {
+ event.DescID = attr
+ }
+ }
+ first = false
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (*HSDescEvent) Code() EventCode { return EventCodeHSDesc }
+
+// HSDescContentEvent is HS_DESC_CONTENT in spec.
+type HSDescContentEvent struct {
+ Raw string
+ Address string
+ DescID string
+ HSDir string
+ Descriptor string
+}
+
+// ParseHSDescContentEvent parses the event.
+func ParseHSDescContentEvent(raw string) *HSDescContentEvent {
+ event := &HSDescContentEvent{Raw: raw}
+ event.Address, raw, _ = torutil.PartitionString(raw, ' ')
+ event.DescID, raw, _ = torutil.PartitionString(raw, ' ')
+ newlineIndex := strings.Index(raw, "\r\n")
+ if newlineIndex != -1 {
+ event.HSDir, event.Descriptor = raw[:newlineIndex], raw[newlineIndex+2:]
+ }
+ return event
+}
+
+// Code implements Event.Code
+func (*HSDescContentEvent) Code() EventCode { return EventCodeHSDescContent }
+
+// NetworkLivenessEvent is NETWORK_LIVENESS in spec.
+type NetworkLivenessEvent struct {
+ Raw string
+}
+
+// ParseNetworkLivenessEvent parses the event.
+func ParseNetworkLivenessEvent(raw string) *NetworkLivenessEvent {
+ return &NetworkLivenessEvent{Raw: raw}
+}
+
+// Code implements Event.Code
+func (*NetworkLivenessEvent) Code() EventCode { return EventCodeNetworkLiveness }
+
+// UnrecognizedEvent is any unrecognized event code.
+type UnrecognizedEvent struct {
+ EventCode EventCode
+ RawSingleLine string
+ RawMultiLine []string
+}
+
+// ParseUnrecognizedEvent creates an unrecognized event with the given values.
+func ParseUnrecognizedEvent(eventCode EventCode, rawSingleLine string, rawMultiLine []string) *UnrecognizedEvent {
+ return &UnrecognizedEvent{EventCode: eventCode, RawSingleLine: rawSingleLine, RawMultiLine: rawMultiLine}
+}
+
+// Code implements Event.Code
+func (u *UnrecognizedEvent) Code() EventCode { return u.EventCode }
diff --git a/vendor/github.com/cretz/bine/control/cmd_hiddenservice.go b/vendor/github.com/cretz/bine/control/cmd_hiddenservice.go
new file mode 100644
index 0000000..ab52142
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/cmd_hiddenservice.go
@@ -0,0 +1,23 @@
+package control
+
+// GetHiddenServiceDescriptorAsync invokes HSFETCH.
+func (c *Conn) GetHiddenServiceDescriptorAsync(address string, server string) error {
+ cmd := "HSFETCH " + address
+ if server != "" {
+ cmd += " SERVER=" + server
+ }
+ return c.sendRequestIgnoreResponse(cmd)
+}
+
+// PostHiddenServiceDescriptorAsync invokes HSPOST.
+func (c *Conn) PostHiddenServiceDescriptorAsync(desc string, servers []string, address string) error {
+ cmd := "+HSPOST"
+ for _, server := range servers {
+ cmd += " SERVER=" + server
+ }
+ if address != "" {
+ cmd += "HSADDRESS=" + address
+ }
+ cmd += "\r\n" + desc + "\r\n."
+ return c.sendRequestIgnoreResponse(cmd)
+}
diff --git a/vendor/github.com/cretz/bine/control/cmd_misc.go b/vendor/github.com/cretz/bine/control/cmd_misc.go
new file mode 100644
index 0000000..6c3fa49
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/cmd_misc.go
@@ -0,0 +1,92 @@
+package control
+
+import (
+ "strings"
+
+ "github.com/cretz/bine/torutil"
+)
+
+// Signal invokes SIGNAL.
+func (c *Conn) Signal(signal string) error {
+ return c.sendRequestIgnoreResponse("SIGNAL %v", signal)
+}
+
+// Quit invokes QUIT.
+func (c *Conn) Quit() error {
+ return c.sendRequestIgnoreResponse("QUIT")
+}
+
+// MapAddresses invokes MAPADDRESS and returns mapped addresses.
+func (c *Conn) MapAddresses(addresses ...*KeyVal) ([]*KeyVal, error) {
+ cmd := "MAPADDRESS"
+ for _, address := range addresses {
+ cmd += " " + address.Key + "=" + address.Val
+ }
+ resp, err := c.SendRequest(cmd)
+ if err != nil {
+ return nil, err
+ }
+ data := resp.DataWithReply()
+ ret := make([]*KeyVal, 0, len(data))
+ for _, address := range data {
+ mappedAddress := &KeyVal{}
+ mappedAddress.Key, mappedAddress.Val, _ = torutil.PartitionString(address, '=')
+ ret = append(ret, mappedAddress)
+ }
+ return ret, nil
+}
+
+// GetInfo invokes GETINTO and returns values for requested keys.
+func (c *Conn) GetInfo(keys ...string) ([]*KeyVal, error) {
+ resp, err := c.SendRequest("GETINFO %v", strings.Join(keys, " "))
+ if err != nil {
+ return nil, err
+ }
+ ret := make([]*KeyVal, 0, len(resp.Data))
+ for _, val := range resp.Data {
+ infoVal := &KeyVal{}
+ infoVal.Key, infoVal.Val, _ = torutil.PartitionString(val, '=')
+ if infoVal.Val, err = torutil.UnescapeSimpleQuotedStringIfNeeded(infoVal.Val); err != nil {
+ return nil, err
+ }
+ ret = append(ret, infoVal)
+ }
+ return ret, nil
+}
+
+// PostDescriptor invokes POSTDESCRIPTOR.
+func (c *Conn) PostDescriptor(descriptor string, purpose string, cache string) error {
+ cmd := "+POSTDESCRIPTOR"
+ if purpose != "" {
+ cmd += " purpose=" + purpose
+ }
+ if cache != "" {
+ cmd += " cache=" + cache
+ }
+ cmd += "\r\n" + descriptor + "\r\n."
+ return c.sendRequestIgnoreResponse(cmd)
+}
+
+// UseFeatures invokes USEFEATURE.
+func (c *Conn) UseFeatures(features ...string) error {
+ return c.sendRequestIgnoreResponse("USEFEATURE " + strings.Join(features, " "))
+}
+
+// ResolveAsync invokes RESOLVE.
+func (c *Conn) ResolveAsync(address string, reverse bool) error {
+ cmd := "RESOLVE "
+ if reverse {
+ cmd += "mode=reverse "
+ }
+ return c.sendRequestIgnoreResponse(cmd + address)
+}
+
+// TakeOwnership invokes TAKEOWNERSHIP.
+func (c *Conn) TakeOwnership() error {
+ return c.sendRequestIgnoreResponse("TAKEOWNERSHIP")
+}
+
+// DropGuards invokes DROPGUARDS.
+func (c *Conn) DropGuards() error {
+ return c.sendRequestIgnoreResponse("DROPGUARDS")
+}
diff --git a/vendor/github.com/cretz/bine/control/cmd_onion.go b/vendor/github.com/cretz/bine/control/cmd_onion.go
new file mode 100644
index 0000000..b298d36
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/cmd_onion.go
@@ -0,0 +1,201 @@
+package control
+
+import (
+ "crypto/rsa"
+ "crypto/x509"
+ "encoding/base64"
+ "fmt"
+ "strconv"
+ "strings"
+
+ "github.com/cretz/bine/torutil"
+ "github.com/cretz/bine/torutil/ed25519"
+)
+
+// KeyType is a key type for Key in AddOnion.
+type KeyType string
+
+const (
+ // KeyTypeNew is NEW.
+ KeyTypeNew KeyType = "NEW"
+ // KeyTypeRSA1024 is RSA1024.
+ KeyTypeRSA1024 KeyType = "RSA1024"
+ // KeyTypeED25519V3 is ED25519-V3.
+ KeyTypeED25519V3 KeyType = "ED25519-V3"
+)
+
+// KeyAlgo is a key algorithm for GenKey on AddOnion.
+type KeyAlgo string
+
+const (
+ // KeyAlgoBest is BEST.
+ KeyAlgoBest KeyAlgo = "BEST"
+ // KeyAlgoRSA1024 is RSA1024.
+ KeyAlgoRSA1024 KeyAlgo = "RSA1024"
+ // KeyAlgoED25519V3 is ED25519-V3.
+ KeyAlgoED25519V3 KeyAlgo = "ED25519-V3"
+)
+
+// Key is a type of key to use for AddOnion. Implementations include GenKey,
+// RSAKey, and ED25519Key.
+type Key interface {
+ // Type is the KeyType for AddOnion.
+ Type() KeyType
+ // Blob is the serialized key for AddOnion.
+ Blob() string
+}
+
+// KeyFromString creates a Key for AddOnion based on a response string.
+func KeyFromString(str string) (Key, error) {
+ typ, blob, _ := torutil.PartitionString(str, ':')
+ switch KeyType(typ) {
+ case KeyTypeNew:
+ return GenKeyFromBlob(blob), nil
+ case KeyTypeRSA1024:
+ return RSA1024KeyFromBlob(blob)
+ case KeyTypeED25519V3:
+ return ED25519KeyFromBlob(blob)
+ default:
+ return nil, fmt.Errorf("Unrecognized key type: %v", typ)
+ }
+}
+
+// GenKey is a Key for AddOnion that asks Tor to generate a key for the given
+// algorithm.
+type GenKey KeyAlgo
+
+// GenKeyFromBlob creates a GenKey for the given response blob which is a
+// KeyAlgo.
+func GenKeyFromBlob(blob string) GenKey { return GenKey(KeyAlgo(blob)) }
+
+// Type implements Key.Type.
+func (GenKey) Type() KeyType { return KeyTypeNew }
+
+// Blob implements Key.Blob.
+func (g GenKey) Blob() string { return string(g) }
+
+// RSAKey is a Key for AddOnion that is a RSA-1024 key (i.e. v2).
+type RSAKey struct{ *rsa.PrivateKey }
+
+// RSA1024KeyFromBlob creates a RSAKey for the given response blob.
+func RSA1024KeyFromBlob(blob string) (*RSAKey, error) {
+ byts, err := base64.StdEncoding.DecodeString(blob)
+ if err != nil {
+ return nil, err
+ }
+ rsaKey, err := x509.ParsePKCS1PrivateKey(byts)
+ if err != nil {
+ return nil, err
+ }
+ return &RSAKey{rsaKey}, nil
+}
+
+// Type implements Key.Type.
+func (*RSAKey) Type() KeyType { return KeyTypeRSA1024 }
+
+// Blob implements Key.Blob.
+func (r *RSAKey) Blob() string {
+ return base64.StdEncoding.EncodeToString(x509.MarshalPKCS1PrivateKey(r.PrivateKey))
+}
+
+// ED25519Key is a Key for AddOnion that is a ed25519 key (i.e. v3).
+type ED25519Key struct{ ed25519.KeyPair }
+
+// ED25519KeyFromBlob creates a ED25519Key for the given response blob.
+func ED25519KeyFromBlob(blob string) (*ED25519Key, error) {
+ byts, err := base64.StdEncoding.DecodeString(blob)
+ if err != nil {
+ return nil, err
+ }
+ return &ED25519Key{ed25519.PrivateKey(byts).KeyPair()}, nil
+}
+
+// Type implements Key.Type.
+func (*ED25519Key) Type() KeyType { return KeyTypeED25519V3 }
+
+// Blob implements Key.Blob.
+func (e *ED25519Key) Blob() string { return base64.StdEncoding.EncodeToString(e.PrivateKey()) }
+
+// AddOnionRequest is a set of request params for AddOnion.
+type AddOnionRequest struct {
+ // Key is the key to use or GenKey if Tor should generate it.
+ Key Key
+ // Flags are ADD_ONION flags.
+ Flags []string
+ // MaxStreams is ADD_ONION MaxStreams.
+ MaxStreams int
+ // Ports are ADD_ONION Port values. Key is virtual port, Val is target
+ // port (or can be empty to use virtual port).
+ Ports []*KeyVal
+ // ClientAuths are ADD_ONION ClientAuth values. If value is empty string,
+ // Tor will generate the password.
+ ClientAuths map[string]string
+}
+
+// AddOnionResponse is the response for AddOnion.
+type AddOnionResponse struct {
+ // ServiceID is the ADD_ONION response ServiceID value.
+ ServiceID string
+ // Key is the ADD_ONION response PrivateKey value.
+ Key Key
+ // ClientAuths are the ADD_ONION response ClientAuth values.
+ ClientAuths map[string]string
+ // RawResponse is the raw ADD_ONION response.
+ RawResponse *Response
+}
+
+// AddOnion invokes ADD_ONION and returns its response.
+func (c *Conn) AddOnion(req *AddOnionRequest) (*AddOnionResponse, error) {
+ // Build command
+ if req.Key == nil {
+ return nil, c.protoErr("Key required")
+ }
+ cmd := "ADD_ONION " + string(req.Key.Type()) + ":" + req.Key.Blob()
+ if len(req.Flags) > 0 {
+ cmd += " Flags=" + strings.Join(req.Flags, ",")
+ }
+ if req.MaxStreams > 0 {
+ cmd += " MaxStreams=" + strconv.Itoa(req.MaxStreams)
+ }
+ for _, port := range req.Ports {
+ cmd += " Port=" + port.Key
+ if port.Val != "" {
+ cmd += "," + port.Val
+ }
+ }
+ for name, blob := range req.ClientAuths {
+ cmd += " ClientAuth=" + name
+ if blob != "" {
+ cmd += ":" + blob
+ }
+ }
+ // Invoke and read response
+ resp, err := c.SendRequest(cmd)
+ if err != nil {
+ return nil, err
+ }
+ ret := &AddOnionResponse{RawResponse: resp}
+ for _, data := range resp.Data {
+ key, val, _ := torutil.PartitionString(data, '=')
+ switch key {
+ case "ServiceID":
+ ret.ServiceID = val
+ case "PrivateKey":
+ if ret.Key, err = KeyFromString(val); err != nil {
+ return nil, err
+ }
+ case "ClientAuth":
+ name, pass, _ := torutil.PartitionString(val, ':')
+ if ret.ClientAuths == nil {
+ ret.ClientAuths = map[string]string{}
+ }
+ ret.ClientAuths[name] = pass
+ }
+ }
+ return ret, nil
+}
+
+// DelOnion invokes DELONION.
+func (c *Conn) DelOnion(serviceID string) error {
+ return c.sendRequestIgnoreResponse("DEL_ONION %v", serviceID)
+}
diff --git a/vendor/github.com/cretz/bine/control/cmd_protocolinfo.go b/vendor/github.com/cretz/bine/control/cmd_protocolinfo.go
new file mode 100644
index 0000000..346b36d
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/cmd_protocolinfo.go
@@ -0,0 +1,76 @@
+package control
+
+import (
+ "strings"
+
+ "github.com/cretz/bine/torutil"
+)
+
+// ProtocolInfo is the protocol info result of Conn.ProtocolInfo.
+type ProtocolInfo struct {
+ AuthMethods []string
+ CookieFile string
+ TorVersion string
+ RawResponse *Response
+}
+
+// HasAuthMethod checks if ProtocolInfo contains the requested auth method.
+func (p *ProtocolInfo) HasAuthMethod(authMethod string) bool {
+ for _, m := range p.AuthMethods {
+ if m == authMethod {
+ return true
+ }
+ }
+ return false
+}
+
+// ProtocolInfo invokes PROTOCOLINFO on first invocation and returns a cached
+// result on all others.
+func (c *Conn) ProtocolInfo() (*ProtocolInfo, error) {
+ var err error
+ if c.protocolInfo == nil {
+ c.protocolInfo, err = c.sendProtocolInfo()
+ }
+ return c.protocolInfo, err
+}
+
+func (c *Conn) sendProtocolInfo() (*ProtocolInfo, error) {
+ resp, err := c.SendRequest("PROTOCOLINFO")
+ if err != nil {
+ return nil, err
+ }
+ // Check data vals
+ ret := &ProtocolInfo{RawResponse: resp}
+ for _, piece := range resp.Data {
+ key, val, ok := torutil.PartitionString(piece, ' ')
+ if !ok {
+ continue
+ }
+ switch key {
+ case "PROTOCOLINFO":
+ if val != "1" {
+ return nil, c.protoErr("Invalid PIVERSION: %v", val)
+ }
+ case "AUTH":
+ methods, cookieFile, _ := torutil.PartitionString(val, ' ')
+ if !strings.HasPrefix(methods, "METHODS=") {
+ continue
+ }
+ if cookieFile != "" {
+ if !strings.HasPrefix(cookieFile, "COOKIEFILE=") {
+ continue
+ }
+ if ret.CookieFile, err = torutil.UnescapeSimpleQuotedString(cookieFile[11:]); err != nil {
+ continue
+ }
+ }
+ ret.AuthMethods = strings.Split(methods[8:], ",")
+ case "VERSION":
+ torVersion, _, _ := torutil.PartitionString(val, ' ')
+ if strings.HasPrefix(torVersion, "Tor=") {
+ ret.TorVersion, err = torutil.UnescapeSimpleQuotedString(torVersion[4:])
+ }
+ }
+ }
+ return ret, nil
+}
diff --git a/vendor/github.com/cretz/bine/control/cmd_stream.go b/vendor/github.com/cretz/bine/control/cmd_stream.go
new file mode 100644
index 0000000..6fde0a8
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/cmd_stream.go
@@ -0,0 +1,31 @@
+package control
+
+import (
+ "strconv"
+)
+
+// AttachStream invokes ATTACHSTREAM.
+func (c *Conn) AttachStream(streamID string, circuitID string, hopNum int) error {
+ if circuitID == "" {
+ circuitID = "0"
+ }
+ cmd := "ATTACHSTREAM " + streamID + " " + circuitID
+ if hopNum > 0 {
+ cmd += " HOP=" + strconv.Itoa(hopNum)
+ }
+ return c.sendRequestIgnoreResponse(cmd)
+}
+
+// RedirectStream invokes REDIRECTSTREAM.
+func (c *Conn) RedirectStream(streamID string, address string, port int) error {
+ cmd := "REDIRECTSTREAM " + streamID + " " + address
+ if port > 0 {
+ cmd += " " + strconv.Itoa(port)
+ }
+ return c.sendRequestIgnoreResponse(cmd)
+}
+
+// CloseStream invokes CLOSESTREAM.
+func (c *Conn) CloseStream(streamID string, reason string) error {
+ return c.sendRequestIgnoreResponse("CLOSESTREAM %v %v", streamID, reason)
+}
diff --git a/vendor/github.com/cretz/bine/control/conn.go b/vendor/github.com/cretz/bine/control/conn.go
new file mode 100644
index 0000000..02995e8
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/conn.go
@@ -0,0 +1,102 @@
+package control
+
+import (
+ "fmt"
+ "io"
+ "net/textproto"
+ "sync"
+)
+
+// Conn is the connection to the Tor control port.
+type Conn struct {
+ // DebugWriter is the writer that debug logs for this library (not Tor
+ // itself) will be written to. If nil, no debug logs are generated/written.
+ DebugWriter io.Writer
+
+ // This is the underlying connection.
+ conn *textproto.Conn
+
+ // This is set lazily by ProtocolInfo().
+ protocolInfo *ProtocolInfo
+
+ // True if Authenticate has been called successfully.
+ Authenticated bool
+
+ // The lock fot eventListeners
+ eventListenersLock sync.RWMutex
+ // The value slices can be traversed outside of lock, they are completely
+ // replaced on change, never mutated. But the map itself must be locked on
+ // when reading or writing.
+ eventListeners map[EventCode][]chan<- Event
+
+ // This mutex is locked on when an entire response needs to be read. It
+ // helps synchronize accesses to the response by the asynchronous response
+ // listeners and the synchronous responses.
+ readLock sync.Mutex
+}
+
+// NewConn creates a Conn from the given textproto connection.
+func NewConn(conn *textproto.Conn) *Conn {
+ return &Conn{
+ conn: conn,
+ eventListeners: map[EventCode][]chan<- Event{},
+ }
+}
+
+func (c *Conn) sendRequestIgnoreResponse(format string, args ...interface{}) error {
+ _, err := c.SendRequest(format, args...)
+ return err
+}
+
+// SendRequest sends a synchronous request to Tor and awaits the response. If
+// the response errors, the error result will be set, but the response will be
+// set also. This is usually not directly used by callers, but instead called by
+// higher-level methods.
+func (c *Conn) SendRequest(format string, args ...interface{}) (*Response, error) {
+ if c.debugEnabled() {
+ c.debugf("Write line: %v", fmt.Sprintf(format, args...))
+ }
+ id, err := c.conn.Cmd(format, args...)
+ if err != nil {
+ return nil, err
+ }
+ c.readLock.Lock()
+ defer c.readLock.Unlock()
+ c.conn.StartResponse(id)
+ defer c.conn.EndResponse(id)
+ // Get the first non-async response
+ var resp *Response
+ for {
+ if resp, err = c.ReadResponse(); err != nil || !resp.IsAsync() {
+ break
+ }
+ c.relayAsyncEvents(resp)
+ }
+ if err == nil && !resp.IsOk() {
+ err = resp.Err
+ }
+ return resp, err
+}
+
+// Close sends a QUIT and closes the underlying Tor connection. This does not
+// error if the QUIT is not accepted but does relay any error that occurs while
+// closing the underlying connection.
+func (c *Conn) Close() error {
+ // Ignore the response and ignore the error
+ c.Quit()
+ return c.conn.Close()
+}
+
+func (c *Conn) debugEnabled() bool {
+ return c.DebugWriter != nil
+}
+
+func (c *Conn) debugf(format string, args ...interface{}) {
+ if w := c.DebugWriter; w != nil {
+ fmt.Fprintf(w, format+"\n", args...)
+ }
+}
+
+func (*Conn) protoErr(format string, args ...interface{}) textproto.ProtocolError {
+ return textproto.ProtocolError(fmt.Sprintf(format, args...))
+}
diff --git a/vendor/github.com/cretz/bine/control/doc.go b/vendor/github.com/cretz/bine/control/doc.go
new file mode 100644
index 0000000..2be3dc1
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/doc.go
@@ -0,0 +1,10 @@
+// Package control implements a low-level client for the Tor control spec
+// version 1.
+//
+// The primary entrypoint is the Conn struct, instantiated with NewConn. This is
+// the low-level layer to the control port of an already-running Tor instance.
+// Most developers will prefer the tor package adjacent to this one for a higher
+// level abstraction over the process and this connection.
+//
+// Some of this code is lifted from https://github.com/yawning/bulb with thanks.
+package control
diff --git a/vendor/github.com/cretz/bine/control/keyval.go b/vendor/github.com/cretz/bine/control/keyval.go
new file mode 100644
index 0000000..00cefd8
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/keyval.go
@@ -0,0 +1,40 @@
+package control
+
+// KeyVal is a simple key-value struct. In cases where Val can be nil, an empty
+// string represents that unless ValSetAndEmpty is true.
+type KeyVal struct {
+ // Key is the always-present key
+ Key string
+
+ // Val is the value. If it's an empty string and nils are accepted/supported
+ // where this is used, it means nil unless ValSetAndEmpty is true.
+ Val string
+
+ // ValSetAndEmpty is true when Val is an empty string, the associated
+ // command supports nils, and Val should NOT be treated as nil. False
+ // otherwise.
+ ValSetAndEmpty bool
+}
+
+// NewKeyVal creates a new key-value pair.
+func NewKeyVal(key string, val string) *KeyVal {
+ return &KeyVal{Key: key, Val: val}
+}
+
+// KeyVals creates multiple new key-value pairs from the given strings. The
+// provided set of strings must have a length that is a multiple of 2.
+func KeyVals(keysAndVals ...string) []*KeyVal {
+ if len(keysAndVals)%2 != 0 {
+ panic("Expected multiple of 2")
+ }
+ ret := make([]*KeyVal, len(keysAndVals)/2)
+ for i := 0; i < len(ret); i++ {
+ ret[i] = NewKeyVal(keysAndVals[i*2], keysAndVals[i*2+1])
+ }
+ return ret
+}
+
+// ValSet returns true if Val is either non empty or ValSetAndEmpty is true.
+func (k *KeyVal) ValSet() bool {
+ return len(k.Val) > 0 || k.ValSetAndEmpty
+}
diff --git a/vendor/github.com/cretz/bine/control/response.go b/vendor/github.com/cretz/bine/control/response.go
new file mode 100644
index 0000000..705905e
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/response.go
@@ -0,0 +1,106 @@
+package control
+
+import (
+ "net/textproto"
+ "strconv"
+ "strings"
+)
+
+// Response is a response to a control port command or an asynchronous event.
+type Response struct {
+ // Err is the status code and string representation associated with a
+ // response. Responses that have completed successfully will also have Err
+ // set to indicate such.
+ Err *textproto.Error
+
+ // Reply is the text on the EndReplyLine of the response.
+ Reply string
+
+ // Data is the MidReplyLines/DataReplyLines of the response. Dot encoded
+ // data is "decoded" and presented as a single string (terminal ".CRLF"
+ // removed, all intervening CRs stripped).
+ Data []string
+
+ // RawLines is all of the lines of a response, without CRLFs.
+ RawLines []string
+}
+
+// IsOk returns true if the response status code indicates success or an
+// asynchronous event.
+func (r *Response) IsOk() bool {
+ switch r.Err.Code {
+ case StatusOk, StatusOkUnnecessary, StatusAsyncEvent:
+ return true
+ default:
+ return false
+ }
+}
+
+// DataWithReply returns a combination of Data and Reply to give a full set of
+// the lines of the response.
+func (r *Response) DataWithReply() []string {
+ ret := make([]string, len(r.Data)+1)
+ copy(ret, r.Data)
+ ret[len(ret)-1] = r.Reply
+ return ret
+}
+
+// IsAsync returns true if the response is an asynchronous event.
+func (r *Response) IsAsync() bool {
+ return r.Err.Code == StatusAsyncEvent
+}
+
+// ReadResponse returns the next response object.
+func (c *Conn) ReadResponse() (*Response, error) {
+ var resp *Response
+ var statusCode int
+ for {
+ line, err := c.conn.ReadLine()
+ if err != nil {
+ return nil, err
+ }
+ c.debugf("Read line: %v", line)
+
+ // Parse the line that was just read.
+ if len(line) < 4 {
+ return nil, c.protoErr("Truncated response: %v", line)
+ }
+ if code, err := strconv.Atoi(line[0:3]); err != nil || code < 100 {
+ return nil, c.protoErr("Invalid status code: %v", line[0:3])
+ } else if resp == nil {
+ resp = &Response{}
+ statusCode = code
+ } else if code != statusCode {
+ // The status code should stay fixed for all lines of the response, since events can't be interleaved with
+ // response lines.
+ return nil, c.protoErr("Status code changed: %v != %v", code, statusCode)
+ }
+ resp.RawLines = append(resp.RawLines, line)
+ switch line[3] {
+ case ' ':
+ // Final line in the response.
+ resp.Reply = line[4:]
+ resp.Err = statusCodeToError(statusCode, resp.Reply)
+ return resp, nil
+ case '-':
+ // Continuation, keep reading.
+ resp.Data = append(resp.Data, line[4:])
+ case '+':
+ // A "dot-encoded" payload follows.
+ dotBody, err := c.conn.ReadDotBytes()
+ if err != nil {
+ return nil, err
+ }
+ dotBodyStr := strings.TrimRight(string(dotBody), "\n\r")
+ // c.debugf("Read dot body:\n---\n%v\n---", dotBodyStr)
+ resp.Data = append(resp.Data, line[4:]+"\r\n"+dotBodyStr)
+ dotLines := strings.Split(dotBodyStr, "\n")
+ for _, dotLine := range dotLines[:len(dotLines)-1] {
+ resp.RawLines = append(resp.RawLines, dotLine)
+ }
+ resp.RawLines = append(resp.RawLines, ".")
+ default:
+ return nil, c.protoErr("Invalid separator: '%v'", line[3])
+ }
+ }
+}
diff --git a/vendor/github.com/cretz/bine/control/status.go b/vendor/github.com/cretz/bine/control/status.go
new file mode 100644
index 0000000..8be3464
--- /dev/null
+++ b/vendor/github.com/cretz/bine/control/status.go
@@ -0,0 +1,64 @@
+package control
+
+import (
+ "fmt"
+ "net/textproto"
+ "strings"
+)
+
+// The various control port StatusCode constants.
+const (
+ StatusOk = 250
+ StatusOkUnnecessary = 251
+
+ StatusErrResourceExhausted = 451
+ StatusErrSyntaxError = 500
+ StatusErrUnrecognizedCmd = 510
+ StatusErrUnimplementedCmd = 511
+ StatusErrSyntaxErrorArg = 512
+ StatusErrUnrecognizedCmdArg = 513
+ StatusErrAuthenticationRequired = 514
+ StatusErrBadAuthentication = 515
+ StatusErrUnspecifiedTorError = 550
+ StatusErrInternalError = 551
+ StatusErrUnrecognizedEntity = 552
+ StatusErrInvalidConfigValue = 553
+ StatusErrInvalidDescriptor = 554
+ StatusErrUnmanagedEntity = 555
+
+ StatusAsyncEvent = 650
+)
+
+var statusCodeStringMap = map[int]string{
+ StatusOk: "OK",
+ StatusOkUnnecessary: "Operation was unnecessary",
+
+ StatusErrResourceExhausted: "Resource exhausted",
+ StatusErrSyntaxError: "Syntax error: protocol",
+ StatusErrUnrecognizedCmd: "Unrecognized command",
+ StatusErrUnimplementedCmd: "Unimplemented command",
+ StatusErrSyntaxErrorArg: "Syntax error in command argument",
+ StatusErrUnrecognizedCmdArg: "Unrecognized command argument",
+ StatusErrAuthenticationRequired: "Authentication required",
+ StatusErrBadAuthentication: "Bad authentication",
+ StatusErrUnspecifiedTorError: "Unspecified Tor error",
+ StatusErrInternalError: "Internal error",
+ StatusErrUnrecognizedEntity: "Unrecognized entity",
+ StatusErrInvalidConfigValue: "Invalid configuration value",
+ StatusErrInvalidDescriptor: "Invalid descriptor",
+ StatusErrUnmanagedEntity: "Unmanaged entity",
+
+ StatusAsyncEvent: "Asynchronous event notification",
+}
+
+func statusCodeToError(code int, reply string) *textproto.Error {
+ err := new(textproto.Error)
+ err.Code = code
+ if msg, ok := statusCodeStringMap[code]; ok {
+ trimmedReply := strings.TrimSpace(strings.TrimPrefix(reply, msg))
+ err.Msg = fmt.Sprintf("%s: %s", msg, trimmedReply)
+ } else {
+ err.Msg = fmt.Sprintf("Unknown status code (%03d): %s", code, reply)
+ }
+ return err
+}
diff --git a/vendor/github.com/cretz/bine/process/process.go b/vendor/github.com/cretz/bine/process/process.go
new file mode 100644
index 0000000..88c6389
--- /dev/null
+++ b/vendor/github.com/cretz/bine/process/process.go
@@ -0,0 +1,82 @@
+// Package process is the low-level abstraction for a Tor instance.
+//
+// The standard use is to create a Creator with NewCreator and the path to the
+// Tor executable. The child package 'embedded' can be used if Tor is statically
+// linked in the binary. Most developers will prefer the tor package adjacent to
+// this one for a higher level abstraction over the process and control port
+// connection.
+package process
+
+import (
+ "context"
+ "fmt"
+ "net"
+ "os"
+ "os/exec"
+ "strconv"
+ "strings"
+
+ "github.com/cretz/bine/torutil"
+)
+
+// Process is the interface implemented by Tor processes.
+type Process interface {
+ // Start starts the Tor process in the background and returns. It is
+ // analagous to os/exec.Cmd.Start.
+ Start() error
+ // Wait waits for the Tor process to exit and returns error if it was not a
+ // successful exit. It is analagous to os/exec.Cmd.Wait.
+ Wait() error
+ // ControlConn is used for statically linked, embedded processes to create
+ // a controller connection. For non-embedded processes or Tor versions that
+ // don't support embedded control connections, ErrControlConnUnsupported is
+ // returned. Note, this should only be called once per process before
+ // Start, and the connection does not need to be closed.
+ EmbeddedControlConn() (net.Conn, error)
+}
+
+// Creator is the interface for process creation.
+type Creator interface {
+ New(ctx context.Context, args ...string) (Process, error)
+}
+
+type CmdCreatorFunc func(ctx context.Context, args ...string) (*exec.Cmd, error)
+
+// NewCreator creates a Creator for external Tor process execution based on the
+// given exe path.
+func NewCreator(exePath string) Creator {
+ return CmdCreatorFunc(func(ctx context.Context, args ...string) (*exec.Cmd, error) {
+ cmd := exec.CommandContext(ctx, exePath, args...)
+ cmd.Stdout = os.Stdout
+ cmd.Stderr = os.Stderr
+ return cmd, nil
+ })
+}
+
+type exeProcess struct {
+ *exec.Cmd
+}
+
+func (c CmdCreatorFunc) New(ctx context.Context, args ...string) (Process, error) {
+ cmd, err := c(ctx, args...)
+ return &exeProcess{cmd}, err
+}
+
+// ErrControlConnUnsupported is returned by Process.EmbeddedControlConn when
+// it is unsupported.
+var ErrControlConnUnsupported = fmt.Errorf("Control conn not supported")
+
+func (e *exeProcess) EmbeddedControlConn() (net.Conn, error) {
+ return nil, ErrControlConnUnsupported
+}
+
+// ControlPortFromFileContents reads a control port file that is written by Tor
+// when ControlPortWriteToFile is set.
+func ControlPortFromFileContents(contents string) (int, error) {
+ contents = strings.TrimSpace(contents)
+ _, port, ok := torutil.PartitionString(contents, ':')
+ if !ok || !strings.HasPrefix(contents, "PORT=") {
+ return 0, fmt.Errorf("Invalid port format: %v", contents)
+ }
+ return strconv.Atoi(port)
+}
diff --git a/vendor/github.com/cretz/bine/tor/dialer.go b/vendor/github.com/cretz/bine/tor/dialer.go
new file mode 100644
index 0000000..9ef211e
--- /dev/null
+++ b/vendor/github.com/cretz/bine/tor/dialer.go
@@ -0,0 +1,111 @@
+package tor
+
+import (
+ "context"
+ "fmt"
+ "net"
+ "strings"
+
+ "golang.org/x/net/proxy"
+)
+
+// Dialer is a wrapper around a proxy.Dialer for dialing connections.
+type Dialer struct {
+ proxy.Dialer
+}
+
+// DialConf is the configuration used for Dialer.
+type DialConf struct {
+ // ProxyAddress is the address for the SOCKS5 proxy. If empty, it is looked
+ // up.
+ ProxyAddress string
+
+ // ProxyNetwork is the network for the SOCKS5 proxy. If ProxyAddress is
+ // empty, this value is ignored and overridden by what is looked up. If this
+ // is empty and ProxyAddress is not empty, it defaults to "tcp".
+ ProxyNetwork string
+
+ // ProxyAuth is the auth for the proxy. Since Tor's SOCKS5 proxy is
+ // unauthenticated, this is rarely needed. It can be used when
+ // IsolateSOCKSAuth is set to ensure separate circuits.
+ //
+ // This should not be confused with downstream SOCKS proxy authentication
+ // which is set via Tor values for Socks5ProxyUsername and
+ // Socks5ProxyPassword when Socks5Proxy is set.
+ ProxyAuth *proxy.Auth
+
+ // SkipEnableNetwork, if true, will skip the enable network step in Dialer.
+ SkipEnableNetwork bool
+
+ // Forward is the dialer to forward to. If nil, just uses normal net dialer.
+ Forward proxy.Dialer
+}
+
+// Dialer creates a new Dialer for the given configuration. Context can be nil.
+// If conf is nil, a default is used.
+func (t *Tor) Dialer(ctx context.Context, conf *DialConf) (*Dialer, error) {
+ if ctx == nil {
+ ctx = context.Background()
+ }
+ if conf == nil {
+ conf = &DialConf{}
+ }
+ // Enable the network if requested
+ if !conf.SkipEnableNetwork {
+ if err := t.EnableNetwork(ctx, true); err != nil {
+ return nil, err
+ }
+ }
+ // Lookup proxy address as needed
+ proxyNetwork := conf.ProxyNetwork
+ proxyAddress := conf.ProxyAddress
+ if proxyAddress == "" {
+ info, err := t.Control.GetInfo("net/listeners/socks")
+ if err != nil {
+ return nil, err
+ }
+ if len(info) != 1 || info[0].Key != "net/listeners/socks" {
+ return nil, fmt.Errorf("Unable to get socks proxy address")
+ }
+ proxyAddress = info[0].Val
+ if strings.HasPrefix(proxyAddress, "unix:") {
+ proxyAddress = proxyAddress[5:]
+ proxyNetwork = "unix"
+ } else {
+ proxyNetwork = "tcp"
+ }
+ } else if proxyNetwork == "" {
+ proxyNetwork = "tcp"
+ }
+
+ dialer, err := proxy.SOCKS5(proxyNetwork, proxyAddress, conf.ProxyAuth, conf.Forward)
+ if err != nil {
+ return nil, err
+ }
+ return &Dialer{dialer}, nil
+}
+
+// DialContext is the equivalent of net.DialContext.
+//
+// TODO: Remove when https://github.com/golang/go/issues/17759 is released.
+func (d *Dialer) DialContext(ctx context.Context, network string, addr string) (net.Conn, error) {
+ errCh := make(chan error, 1)
+ connCh := make(chan net.Conn, 1)
+ go func() {
+ if conn, err := d.Dial(network, addr); err != nil {
+ errCh <- err
+ } else if ctx.Err() != nil {
+ conn.Close()
+ } else {
+ connCh <- conn
+ }
+ }()
+ select {
+ case err := <-errCh:
+ return nil, err
+ case conn := <-connCh:
+ return conn, nil
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ }
+}
diff --git a/vendor/github.com/cretz/bine/tor/doc.go b/vendor/github.com/cretz/bine/tor/doc.go
new file mode 100644
index 0000000..a58086a
--- /dev/null
+++ b/vendor/github.com/cretz/bine/tor/doc.go
@@ -0,0 +1,7 @@
+// Package tor is the high-level client for Tor.
+//
+// The Tor type is a combination of a Tor instance and a connection to it.
+// Use Start to create Tor. Then Dialer or Listener can be used.
+//
+// Some of this code is lifted from https://github.com/yawning/bulb with thanks.
+package tor
diff --git a/vendor/github.com/cretz/bine/tor/listen.go b/vendor/github.com/cretz/bine/tor/listen.go
new file mode 100644
index 0000000..6b142d2
--- /dev/null
+++ b/vendor/github.com/cretz/bine/tor/listen.go
@@ -0,0 +1,343 @@
+package tor
+
+import (
+ "context"
+ "crypto"
+ "crypto/rsa"
+ "fmt"
+ "net"
+ "strconv"
+
+ "github.com/cretz/bine/control"
+ "github.com/cretz/bine/torutil/ed25519"
+ othered25519 "golang.org/x/crypto/ed25519"
+)
+
+// OnionService implements net.Listener and net.Addr for an onion service.
+type OnionService struct {
+ // ID is the service ID for this onion service.
+ ID string
+
+ // Key is the private key for this service. It is either the set key, the
+ // generated key, or nil if asked to discard the key. If present, it is
+ // *crypto/rsa.PrivateKey (1024 bit) when Version3 is false or
+ // github.com/cretz/bine/torutil/ed25519.KeyPair when Version3 is true.
+ Key crypto.PrivateKey
+
+ // Version3 says whether or not this service is a V3 service.
+ Version3 bool
+
+ // ClientAuths is the credential set for clients. The keys are username and
+ // the values are credentials. The credentials will always be present even
+ // if Tor had to generate them.
+ ClientAuths map[string]string
+
+ // LocalListener is the local TCP listener. This is always present.
+ LocalListener net.Listener
+
+ // RemotePorts is the set of remote ports that are forwarded to the local
+ // listener. This will always have at least one value.
+ RemotePorts []int
+
+ // CloseLocalListenerOnClose is true if the local listener should be closed
+ // on Close. This is set to true if a listener was created by Listen and set
+ // to false of an existing LocalListener was provided to Listen.
+ CloseLocalListenerOnClose bool
+
+ // The Tor object that created this. Needed for Close.
+ Tor *Tor
+}
+
+// ListenConf is the configuration for Listen calls.
+type ListenConf struct {
+ // LocalPort is the local port to create a TCP listener on. If the port is
+ // 0, it is automatically chosen. This is ignored if LocalListener is set.
+ LocalPort int
+
+ // LocalListener is the specific local listener to back the onion service.
+ // If this is nil (the default), then a listener is created with LocalPort.
+ LocalListener net.Listener
+
+ // RemotePorts are the remote ports to serve the onion service on. If empty,
+ // it is the same as the local port or local listener. This must have at
+ // least one value if the local listener is not a *net.TCPListener.
+ RemotePorts []int
+
+ // Key is the private key to use. If not present, a key is generated based
+ // on whether Version3 is true or false. If present, it must be a
+ // *crypto/rsa.PrivateKey (1024 bit), a
+ // github.com/cretz/bine/torutil/ed25519.KeyPair, a
+ // golang.org/x/crypto/ed25519.PrivateKey, or a
+ // github.com/cretz/bine/control.Key.
+ Key crypto.PrivateKey
+
+ // Version3 determines whether, when Key is nil, a version 2 or version 3
+ // service/key will be generated. If true it is version 3 (an ed25519 key
+ // and v3 onion service) and if false it is version 2 (a RSA-1024 key and v2
+ // onion service). If Key is not nil, this value is ignored.
+ Version3 bool
+
+ // ClientAuths is the set of usernames and credentials for client
+ // authentication. The keys are usernames and the values are credentials. If
+ // a username is present but the credential is empty, a credential is
+ // generated by Tor for that user. If this is empty there is no
+ // authentication.
+ ClientAuths map[string]string
+
+ // MaxStreams is the maximum number of streams the service will accept. 0
+ // means unlimited.
+ MaxStreams int
+
+ // DiscardKey, if true and Key is nil (meaning a private key is generated),
+ // tells Tor not to return the generated private key. This value is ignored
+ // if Key is not nil.
+ DiscardKey bool
+
+ // Detach, if true, prevents the default behavior of the onion service being
+ // deleted when this controller connection is closed.
+ Detach bool
+
+ // NonAnonymous must be true if Tor options HiddenServiceSingleHopMode and
+ // HiddenServiceNonAnonymousMode are set. Otherwise, it must be false.
+ NonAnonymous bool
+
+ // MaxStreamsCloseCircuit determines whether to close the circuit when the
+ // maximum number of streams is exceeded. If true, the circuit is closed. If
+ // false, the stream is simply not connected but the circuit stays open.
+ MaxStreamsCloseCircuit bool
+
+ // NoWait if true will not wait until the onion service is published. If
+ // false, the network will be enabled if it's not and then we will wait
+ // until the onion service is published.
+ NoWait bool
+}
+
+// Listen creates an onion service and local listener. The context can be nil.
+// If conf is nil, the default struct value is used. Note, if this errors, any
+// listeners created here are closed but if a LocalListener is provided it may remain open.
+func (t *Tor) Listen(ctx context.Context, conf *ListenConf) (*OnionService, error) {
+ if ctx == nil {
+ ctx = context.Background()
+ }
+ // Create the service up here and make sure we close it no matter the error within
+ svc := &OnionService{Tor: t, CloseLocalListenerOnClose: conf.LocalListener == nil}
+ var err error
+
+ // Create the local listener if necessary
+ svc.LocalListener = conf.LocalListener
+ if svc.LocalListener == nil {
+ if svc.LocalListener, err = net.Listen("tcp", "127.0.0.1:"+strconv.Itoa(conf.LocalPort)); err != nil {
+ return nil, err
+ }
+ }
+
+ // Henceforth, any error requires we close the svc
+
+ // Build the onion request
+ req := &control.AddOnionRequest{MaxStreams: conf.MaxStreams, ClientAuths: conf.ClientAuths}
+ // Set flags
+ if conf.DiscardKey {
+ req.Flags = append(req.Flags, "DiscardPK")
+ }
+ if conf.Detach {
+ req.Flags = append(req.Flags, "Detach")
+ }
+ if len(conf.ClientAuths) > 0 {
+ req.Flags = append(req.Flags, "BasicAuth")
+ }
+ if conf.NonAnonymous {
+ req.Flags = append(req.Flags, "NonAnonymous")
+ }
+ if conf.MaxStreamsCloseCircuit {
+ req.Flags = append(req.Flags, "MaxStreamsCloseCircuit")
+ }
+ // Set the key
+ switch key := conf.Key.(type) {
+ case nil:
+ svc.Version3 = conf.Version3
+ if conf.Version3 {
+ req.Key = control.GenKey(control.KeyAlgoED25519V3)
+ } else {
+ req.Key = control.GenKey(control.KeyAlgoRSA1024)
+ }
+ case control.GenKey:
+ svc.Version3 = conf.Version3
+ req.Key = key
+ case *rsa.PrivateKey:
+ svc.Key = key
+ svc.Version3 = false
+ if key.N == nil || key.N.BitLen() != 1024 {
+ err = fmt.Errorf("RSA key must be 1024 bits")
+ } else {
+ req.Key = &control.RSAKey{PrivateKey: key}
+ }
+ case *control.RSAKey:
+ svc.Key = key.PrivateKey
+ svc.Version3 = false
+ if key.N == nil || key.N.BitLen() != 1024 {
+ err = fmt.Errorf("RSA key must be 1024 bits")
+ } else {
+ req.Key = key
+ }
+ case ed25519.KeyPair:
+ svc.Key = key
+ svc.Version3 = true
+ req.Key = &control.ED25519Key{key}
+ case othered25519.PrivateKey:
+ properKey := ed25519.FromCryptoPrivateKey(key)
+ svc.Key = properKey
+ svc.Version3 = true
+ req.Key = &control.ED25519Key{properKey}
+ case *control.ED25519Key:
+ svc.Key = key.KeyPair
+ svc.Version3 = true
+ req.Key = key
+ default:
+ err = fmt.Errorf("Unrecognized key type: %T", key)
+ }
+
+ // Apply the remote ports
+ if err == nil {
+ if len(conf.RemotePorts) == 0 {
+ tcpAddr, ok := svc.LocalListener.Addr().(*net.TCPAddr)
+ if !ok {
+ err = fmt.Errorf("Unable to derive local TCP port")
+ } else {
+ svc.RemotePorts = []int{tcpAddr.Port}
+ }
+ } else {
+ svc.RemotePorts = make([]int, len(conf.RemotePorts))
+ copy(svc.RemotePorts, conf.RemotePorts)
+ }
+ }
+ // Apply the local ports with the remote ports
+ if err == nil {
+ localAddr := svc.LocalListener.Addr().String()
+ if _, ok := svc.LocalListener.(*net.UnixListener); ok {
+ localAddr = "unix:" + localAddr
+ }
+ for _, remotePort := range svc.RemotePorts {
+ req.Ports = append(req.Ports, &control.KeyVal{Key: strconv.Itoa(remotePort), Val: localAddr})
+ }
+ }
+
+ // Create the onion service
+ var resp *control.AddOnionResponse
+ if err == nil {
+ resp, err = t.Control.AddOnion(req)
+ }
+
+ // Apply the response to the service
+ if err == nil {
+ svc.ID = resp.ServiceID
+ switch key := resp.Key.(type) {
+ case nil:
+ // Do nothing
+ case *control.RSAKey:
+ svc.Key = key.PrivateKey
+ case *control.ED25519Key:
+ svc.Key = key.KeyPair
+ default:
+ err = fmt.Errorf("Unrecognized result key type: %T", key)
+ }
+ // Client auths are the conf and then overridden by results
+ if len(conf.ClientAuths) > 0 {
+ svc.ClientAuths = make(map[string]string, len(conf.ClientAuths))
+ for k, v := range conf.ClientAuths {
+ svc.ClientAuths[k] = v
+ }
+ for k, v := range resp.ClientAuths {
+ svc.ClientAuths[k] = v
+ }
+ }
+ }
+
+ // Wait if necessary
+ if err == nil && !conf.NoWait {
+ t.Debugf("Enabling network before waiting for publication")
+ // First make sure network is enabled
+ if err = t.EnableNetwork(ctx, true); err == nil {
+ t.Debugf("Waiting for publication")
+ // Now we'll take a similar approach to Stem. Several UPLOADs are sent out, so we count em. If we see
+ // UPLOADED, we succeeded. If we see failed, we count those. If there are as many failures as uploads, they
+ // all failed and it's a failure. NOTE: unlike Stem's comments that say they don't, we are actually seeing
+ // the service IDs for UPLOADED so we don't keep a map.
+ uploadsAttempted := 0
+ failures := []string{}
+ _, err = t.Control.EventWait(ctx, []control.EventCode{control.EventCodeHSDesc},
+ func(evt control.Event) (bool, error) {
+ hs, _ := evt.(*control.HSDescEvent)
+ if hs != nil && hs.Address == svc.ID {
+ switch hs.Action {
+ case "UPLOAD":
+ uploadsAttempted++
+ case "FAILED":
+ failures = append(failures,
+ fmt.Sprintf("Failed uploading to dir %v - reason: %v", hs.HSDir, hs.Reason))
+ if len(failures) == uploadsAttempted {
+ return false, fmt.Errorf("Failed all uploads, reasons: %v", failures)
+ }
+ case "UPLOADED":
+ return true, nil
+ }
+ }
+ return false, nil
+ })
+ }
+ }
+
+ // Give back err and close if there is an err
+ if err != nil {
+ if closeErr := svc.Close(); closeErr != nil {
+ err = fmt.Errorf("Error on listen: %v (also got error trying to close: %v)", err, closeErr)
+ }
+ return nil, err
+ }
+ return svc, nil
+}
+
+// Accept implements net.Listener.Accept.
+func (o *OnionService) Accept() (net.Conn, error) {
+ return o.LocalListener.Accept()
+}
+
+// Addr implements net.Listener.Addr just returning this object.
+func (o *OnionService) Addr() net.Addr {
+ return o
+}
+
+// Network implements net.Addr.Network always returning "tcp".
+func (o *OnionService) Network() string {
+ return "tcp"
+}
+
+// String implements net.Addr.String and returns "<serviceID>.onion:<virtport>".
+func (o *OnionService) String() string {
+ return fmt.Sprintf("%v.onion:%v", o.ID, o.RemotePorts[0])
+}
+
+// Close implements net.Listener.Close and deletes the onion service and closes
+// the LocalListener if CloseLocalListenerOnClose is true.
+func (o *OnionService) Close() (err error) {
+ o.Tor.Debugf("Closing onion %v", o)
+ // Delete the onion first
+ if o.ID != "" {
+ err = o.Tor.Control.DelOnion(o.ID)
+ o.ID = ""
+ }
+ // Now if the local one needs to be closed, do it
+ if o.CloseLocalListenerOnClose && o.LocalListener != nil {
+ if closeErr := o.LocalListener.Close(); closeErr != nil {
+ if err != nil {
+ err = fmt.Errorf("Unable to close onion: %v (also unable to close local listener: %v)", err, closeErr)
+ } else {
+ err = closeErr
+ }
+ }
+ o.LocalListener = nil
+ }
+ if err != nil {
+ o.Tor.Debugf("Failed closing onion: %v", err)
+ }
+ return
+}
diff --git a/vendor/github.com/cretz/bine/tor/log.go b/vendor/github.com/cretz/bine/tor/log.go
new file mode 100644
index 0000000..b53f318
--- /dev/null
+++ b/vendor/github.com/cretz/bine/tor/log.go
@@ -0,0 +1,16 @@
+package tor
+
+import "fmt"
+
+// DebugEnabled returns true if there is a DebugWriter.
+func (t *Tor) DebugEnabled() bool {
+ return t.DebugWriter != nil
+}
+
+// Debugf writes the formatted string with a newline appended to the DebugWriter
+// if present.
+func (t *Tor) Debugf(format string, args ...interface{}) {
+ if w := t.DebugWriter; w != nil {
+ fmt.Fprintf(w, format+"\n", args...)
+ }
+}
diff --git a/vendor/github.com/cretz/bine/tor/tor.go b/vendor/github.com/cretz/bine/tor/tor.go
new file mode 100644
index 0000000..0edd241
--- /dev/null
+++ b/vendor/github.com/cretz/bine/tor/tor.go
@@ -0,0 +1,453 @@
+package tor
+
+import (
+ "context"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "net/textproto"
+ "os"
+ "path/filepath"
+ "strconv"
+ "time"
+
+ "github.com/cretz/bine/control"
+
+ "github.com/cretz/bine/process"
+)
+
+// Tor is the wrapper around the Tor process and control port connection. It
+// should be created with Start and developers should always call Close when
+// done.
+type Tor struct {
+ // Process is the Tor instance that is running.
+ Process process.Process
+
+ // Control is the Tor controller connection.
+ Control *control.Conn
+
+ // ProcessCancelFunc is the context cancellation func for the Tor process.
+ // It is used by Close and should not be called directly. This can be nil.
+ ProcessCancelFunc context.CancelFunc
+
+ // ControlPort is the port that Control is connected on. It is 0 if the
+ // connection is an embedded control connection.
+ ControlPort int
+
+ // DataDir is the path to the data directory that Tor is using.
+ DataDir string
+
+ // DeleteDataDirOnClose is true if, when Close is invoked, the entire
+ // directory will be deleted.
+ DeleteDataDirOnClose bool
+
+ // DebugWriter is the writer used for debug logs, or nil if debug logs
+ // should not be emitted.
+ DebugWriter io.Writer
+
+ // StopProcessOnClose, if true, will attempt to halt the process on close.
+ StopProcessOnClose bool
+
+ // GeoIPCreatedFile is the path, relative to DataDir, that was created from
+ // StartConf.GeoIPFileReader. It is empty if no file was created.
+ GeoIPCreatedFile string
+
+ // GeoIPv6CreatedFile is the path, relative to DataDir, that was created
+ // from StartConf.GeoIPFileReader. It is empty if no file was created.
+ GeoIPv6CreatedFile string
+}
+
+// StartConf is the configuration used for Start when starting a Tor instance. A
+// default instance with no fields set is the default used for Start.
+type StartConf struct {
+ // ExePath is the path to the Tor executable. If it is not present, "tor" is
+ // used either locally or on the PATH. This is ignored if ProcessCreator is
+ // set.
+ ExePath string
+
+ // ProcessCreator is the override to use a specific process creator. If set,
+ // ExePath is ignored.
+ ProcessCreator process.Creator
+
+ // UseEmbeddedControlConn can be set to true to use
+ // process.Process.EmbeddedControlConn() instead of creating a connection
+ // via ControlPort. Note, this only works when ProcessCreator is an
+ // embedded Tor creator with version >= 0.3.5.x.
+ UseEmbeddedControlConn bool
+
+ // ControlPort is the port to use for the Tor controller. If it is 0, Tor
+ // picks a port for use. This is ignored if UseEmbeddedControlConn is true.
+ ControlPort int
+
+ // DataDir is the directory used by Tor. If it is empty, a temporary
+ // directory is created in TempDataDirBase.
+ DataDir string
+
+ // TempDataDirBase is the parent directory that a temporary data directory
+ // will be created under for use by Tor. This is ignored if DataDir is not
+ // empty. If empty it is assumed to be the current working directory.
+ TempDataDirBase string
+
+ // RetainTempDataDir, if true, will not set the created temporary data
+ // directory to be deleted on close. This is ignored if DataDir is not
+ // empty.
+ RetainTempDataDir bool
+
+ // DisableCookieAuth, if true, will not use the default SAFECOOKIE
+ // authentication mechanism for the Tor controller.
+ DisableCookieAuth bool
+
+ // DisableEagerAuth, if true, will not authenticate on Start.
+ DisableEagerAuth bool
+
+ // EnableNetwork, if true, will connect to the wider Tor network on start.
+ EnableNetwork bool
+
+ // ExtraArgs is the set of extra args passed to the Tor instance when
+ // started.
+ ExtraArgs []string
+
+ // TorrcFile is the torrc file to set on start. If empty, a blank torrc is
+ // created in the data directory and is used instead.
+ TorrcFile string
+
+ // DebugWriter is the writer to use for debug logs, or nil for no debug
+ // logs.
+ DebugWriter io.Writer
+
+ // NoHush if true does not set --hush. By default --hush is set.
+ NoHush bool
+
+ // NoAutoSocksPort if true does not set "--SocksPort auto" as is done by
+ // default. This means the caller could set their own or just let it
+ // default to 9050.
+ NoAutoSocksPort bool
+
+ // GeoIPReader, if present, is called before start to copy geo IP files to
+ // the data directory. Errors are propagated. If the ReadCloser is present,
+ // it is copied to the data dir, overwriting as necessary, and then closed
+ // and the appropriate command line argument is added to reference it. If
+ // both the ReadCloser and error are nil, no copy or command line argument
+ // is used for that version. This is called twice, once with false and once
+ // with true for ipv6.
+ //
+ // This can be set to torutil/geoipembed.GeoIPReader to use an embedded
+ // source.
+ GeoIPFileReader func(ipv6 bool) (io.ReadCloser, error)
+}
+
+// Start a Tor instance and connect to it. If ctx is nil, context.Background()
+// is used. If conf is nil, a default instance is used.
+func Start(ctx context.Context, conf *StartConf) (*Tor, error) {
+ if ctx == nil {
+ ctx = context.Background()
+ }
+ if conf == nil {
+ conf = &StartConf{}
+ }
+ tor := &Tor{DataDir: conf.DataDir, DebugWriter: conf.DebugWriter, StopProcessOnClose: true}
+ // Create the data dir and make it absolute
+ if tor.DataDir == "" {
+ tempBase := conf.TempDataDirBase
+ if tempBase == "" {
+ tempBase = "."
+ }
+ var err error
+ if tempBase, err = filepath.Abs(tempBase); err != nil {
+ return nil, err
+ }
+ if tor.DataDir, err = ioutil.TempDir(tempBase, "data-dir-"); err != nil {
+ return nil, fmt.Errorf("Unable to create temp data dir: %v", err)
+ }
+ tor.Debugf("Created temp data directory at: %v", tor.DataDir)
+ tor.DeleteDataDirOnClose = !conf.RetainTempDataDir
+ } else if err := os.MkdirAll(tor.DataDir, 0700); err != nil {
+ return nil, fmt.Errorf("Unable to create data dir: %v", err)
+ }
+
+ // !!!! From this point on, we must close tor if we error !!!!
+
+ // Copy geoip stuff if necessary
+ err := tor.copyGeoIPFiles(conf)
+ // Start tor
+ if err == nil {
+ err = tor.startProcess(ctx, conf)
+ }
+ // Connect the controller
+ if err == nil {
+ err = tor.connectController(ctx, conf)
+ }
+ // Attempt eager auth w/ no password
+ if err == nil && !conf.DisableEagerAuth {
+ err = tor.Control.Authenticate("")
+ }
+ // If there was an error, we have to try to close here but it may leave the process open
+ if err != nil {
+ if closeErr := tor.Close(); closeErr != nil {
+ err = fmt.Errorf("Error on start: %v (also got error trying to close: %v)", err, closeErr)
+ }
+ }
+ return tor, err
+}
+
+func (t *Tor) copyGeoIPFiles(conf *StartConf) error {
+ if conf.GeoIPFileReader == nil {
+ return nil
+ }
+ if r, err := conf.GeoIPFileReader(false); err != nil {
+ return fmt.Errorf("Unable to read geoip file: %v", err)
+ } else if r != nil {
+ t.GeoIPCreatedFile = "geoip"
+ if err := createFile(filepath.Join(t.DataDir, "geoip"), r); err != nil {
+ return fmt.Errorf("Unable to create geoip file: %v", err)
+ }
+ }
+ if r, err := conf.GeoIPFileReader(true); err != nil {
+ return fmt.Errorf("Unable to read geoip6 file: %v", err)
+ } else if r != nil {
+ t.GeoIPv6CreatedFile = "geoip6"
+ if err := createFile(filepath.Join(t.DataDir, "geoip6"), r); err != nil {
+ return fmt.Errorf("Unable to create geoip6 file: %v", err)
+ }
+ }
+ return nil
+}
+
+func createFile(to string, from io.ReadCloser) error {
+ f, err := os.Create(to)
+ if err == nil {
+ _, err = io.Copy(f, from)
+ if closeErr := f.Close(); err == nil {
+ err = closeErr
+ }
+ }
+ if closeErr := from.Close(); err == nil {
+ err = closeErr
+ }
+ return err
+}
+
+func (t *Tor) startProcess(ctx context.Context, conf *StartConf) error {
+ // Get the creator
+ creator := conf.ProcessCreator
+ if creator == nil {
+ torPath := conf.ExePath
+ if torPath == "" {
+ torPath = "tor"
+ }
+ creator = process.NewCreator(torPath)
+ }
+ // Build the args
+ args := []string{"--DataDirectory", t.DataDir}
+ if !conf.DisableCookieAuth {
+ args = append(args, "--CookieAuthentication", "1")
+ }
+ if !conf.EnableNetwork {
+ args = append(args, "--DisableNetwork", "1")
+ }
+ if !conf.NoHush {
+ args = append(args, "--hush")
+ }
+ if !conf.NoAutoSocksPort {
+ args = append(args, "--SocksPort", "auto")
+ }
+ if t.GeoIPCreatedFile != "" {
+ args = append(args, "--GeoIPFile", filepath.Join(t.DataDir, t.GeoIPCreatedFile))
+ }
+ if t.GeoIPv6CreatedFile != "" {
+ args = append(args, "--GeoIPv6File", filepath.Join(t.DataDir, t.GeoIPv6CreatedFile))
+ }
+ // If there is no Torrc file, create a blank temp one
+ torrcFileName := conf.TorrcFile
+ if torrcFileName == "" {
+ torrcFile, err := ioutil.TempFile(t.DataDir, "torrc-")
+ if err != nil {
+ return err
+ }
+ torrcFileName = torrcFile.Name()
+ if err = torrcFile.Close(); err != nil {
+ return err
+ }
+ }
+ args = append(args, "-f", torrcFileName)
+ // Create file for Tor to write the control port to if it's not told to us and we're not embedded
+ var controlPortFileName string
+ var err error
+ if !conf.UseEmbeddedControlConn {
+ if conf.ControlPort == 0 {
+ controlPortFile, err := ioutil.TempFile(t.DataDir, "control-port-")
+ if err != nil {
+ return err
+ }
+ controlPortFileName = controlPortFile.Name()
+ if err = controlPortFile.Close(); err != nil {
+ return err
+ }
+ args = append(args, "--ControlPort", "auto", "--ControlPortWriteToFile", controlPortFile.Name())
+ } else {
+ args = append(args, "--ControlPort", strconv.Itoa(conf.ControlPort))
+ }
+ }
+ // Create process creator with args
+ var processCtx context.Context
+ processCtx, t.ProcessCancelFunc = context.WithCancel(ctx)
+ args = append(args, conf.ExtraArgs...)
+ p, err := creator.New(processCtx, args...)
+ if err != nil {
+ return err
+ }
+ // Use the embedded conn if requested
+ if conf.UseEmbeddedControlConn {
+ t.Debugf("Using embedded control connection")
+ conn, err := p.EmbeddedControlConn()
+ if err != nil {
+ return fmt.Errorf("Unable to get embedded control conn: %v", err)
+ }
+ t.Control = control.NewConn(textproto.NewConn(conn))
+ t.Control.DebugWriter = t.DebugWriter
+ }
+ // Start process with the args
+ t.Debugf("Starting tor with args %v", args)
+ if err = p.Start(); err != nil {
+ return err
+ }
+ t.Process = p
+ // If not embedded, try a few times to read the control port file if we need to
+ if !conf.UseEmbeddedControlConn {
+ t.ControlPort = conf.ControlPort
+ if t.ControlPort == 0 {
+ ControlPortCheck:
+ for i := 0; i < 10; i++ {
+ select {
+ case <-ctx.Done():
+ err = ctx.Err()
+ break ControlPortCheck
+ default:
+ // Try to read the controlport file, or wait a bit
+ var byts []byte
+ if byts, err = ioutil.ReadFile(controlPortFileName); err != nil {
+ break ControlPortCheck
+ } else if t.ControlPort, err = process.ControlPortFromFileContents(string(byts)); err == nil {
+ break ControlPortCheck
+ }
+ time.Sleep(200 * time.Millisecond)
+ }
+ }
+ if err != nil {
+ return fmt.Errorf("Unable to read control port file: %v", err)
+ }
+ }
+ }
+ return nil
+}
+
+func (t *Tor) connectController(ctx context.Context, conf *StartConf) error {
+ // This doesn't apply if already connected (e.g. using embedded conn)
+ if t.Control != nil {
+ return nil
+ }
+ t.Debugf("Connecting to control port %v", t.ControlPort)
+ textConn, err := textproto.Dial("tcp", "127.0.0.1:"+strconv.Itoa(t.ControlPort))
+ if err != nil {
+ return err
+ }
+ t.Control = control.NewConn(textConn)
+ t.Control.DebugWriter = t.DebugWriter
+ return nil
+}
+
+// EnableNetwork sets DisableNetwork to 0 and optionally waits for bootstrap to
+// complete. The context can be nil. If DisableNetwork isnt 1, this does
+// nothing.
+func (t *Tor) EnableNetwork(ctx context.Context, wait bool) error {
+ if ctx == nil {
+ ctx = context.Background()
+ }
+ // Only enable if DisableNetwork is 1
+ if vals, err := t.Control.GetConf("DisableNetwork"); err != nil {
+ return err
+ } else if len(vals) == 0 || vals[0].Key != "DisableNetwork" || vals[0].Val != "1" {
+ return nil
+ }
+ // Enable the network
+ if err := t.Control.SetConf(control.KeyVals("DisableNetwork", "0")...); err != nil {
+ return nil
+ }
+ // If not waiting, leave
+ if !wait {
+ return nil
+ }
+ // Wait for progress to hit 100
+ _, err := t.Control.EventWait(ctx, []control.EventCode{control.EventCodeStatusClient},
+ func(evt control.Event) (bool, error) {
+ if status, _ := evt.(*control.StatusEvent); status != nil && status.Action == "BOOTSTRAP" {
+ if status.Severity == "NOTICE" && status.Arguments["PROGRESS"] == "100" {
+ return true, nil
+ } else if status.Severity == "ERR" {
+ return false, fmt.Errorf("Failing bootstrapping, Tor warning: %v", status.Arguments["WARNING"])
+ }
+ }
+ return false, nil
+ })
+ return err
+}
+
+// Close sends a halt to the Tor process if it can, closes the controller
+// connection, and stops the process.
+func (t *Tor) Close() error {
+ t.Debugf("Closing Tor")
+ errs := []error{}
+ // If controller is authenticated, send the quit signal to the process. Otherwise, just close the controller.
+ sentHalt := false
+ if t.Control != nil {
+ if t.Control.Authenticated && t.StopProcessOnClose {
+ if err := t.Control.Signal("HALT"); err != nil {
+ errs = append(errs, fmt.Errorf("Unable to signal halt: %v", err))
+ } else {
+ sentHalt = true
+ }
+ }
+ // Now close the controller
+ if err := t.Control.Close(); err != nil {
+ errs = append(errs, fmt.Errorf("Unable to close contrlller: %v", err))
+ } else {
+ t.Control = nil
+ }
+ }
+ if t.Process != nil {
+ // If we didn't halt, we have to force kill w/ the cancel func
+ if !sentHalt && t.StopProcessOnClose {
+ t.ProcessCancelFunc()
+ }
+ // Wait for a bit to make sure it stopped
+ errCh := make(chan error, 1)
+ var waitErr error
+ go func() { errCh <- t.Process.Wait() }()
+ select {
+ case waitErr = <-errCh:
+ if waitErr != nil {
+ errs = append(errs, fmt.Errorf("Process wait failed: %v", waitErr))
+ }
+ case <-time.After(300 * time.Millisecond):
+ errs = append(errs, fmt.Errorf("Process did not exit after 300 ms"))
+ }
+ if waitErr == nil {
+ t.Process = nil
+ }
+ }
+ // Get rid of the entire data dir
+ if t.DeleteDataDirOnClose {
+ if err := os.RemoveAll(t.DataDir); err != nil {
+ errs = append(errs, fmt.Errorf("Failed to remove data dir %v: %v", t.DataDir, err))
+ }
+ }
+ // Combine the errors if present
+ if len(errs) == 0 {
+ return nil
+ } else if len(errs) == 1 {
+ t.Debugf("Error while closing Tor: %v", errs[0])
+ return errs[0]
+ }
+ t.Debugf("Errors while closing Tor: %v", errs)
+ return fmt.Errorf("Got %v errors while closing - %v", len(errs), errs)
+}
diff --git a/vendor/github.com/cretz/bine/torutil/doc.go b/vendor/github.com/cretz/bine/torutil/doc.go
new file mode 100644
index 0000000..4f0528d
--- /dev/null
+++ b/vendor/github.com/cretz/bine/torutil/doc.go
@@ -0,0 +1,2 @@
+// Package torutil has generic utilities shared across the library.
+package torutil
diff --git a/vendor/github.com/cretz/bine/torutil/ed25519/ed25519.go b/vendor/github.com/cretz/bine/torutil/ed25519/ed25519.go
new file mode 100644
index 0000000..c27378f
--- /dev/null
+++ b/vendor/github.com/cretz/bine/torutil/ed25519/ed25519.go
@@ -0,0 +1,189 @@
+// Package ed25519 implements Tor/BitTorrent-like ed25519 keys.
+//
+// See the following stack overflow post for details on why
+// golang.org/x/crypto/ed25519 can't be used:
+// https://stackoverflow.com/questions/44810708/ed25519-public-result-is-different
+package ed25519
+
+import (
+ "crypto"
+ "crypto/rand"
+ "crypto/sha512"
+ "errors"
+ "io"
+
+ "github.com/cretz/bine/torutil/ed25519/internal/edwards25519"
+ "golang.org/x/crypto/ed25519"
+)
+
+const (
+ // PublicKeySize is the size, in bytes, of public keys as used in this package.
+ PublicKeySize = 32
+ // PrivateKeySize is the size, in bytes, of private keys as used in this package.
+ PrivateKeySize = 64
+ // SignatureSize is the size, in bytes, of signatures generated and verified by this package.
+ SignatureSize = 64
+)
+
+// PrivateKey is a 64-byte Ed25519 private key. Unlike
+// golang.org/x/crypto/ed25519, this is just the digest and does not contain
+// the public key within it. Instead call PublicKey() or better, call KeyPair()
+// which stores the precomputed public key.
+type PrivateKey []byte
+
+// PublicKey is a 32-byte Ed25519 public key.
+type PublicKey []byte
+
+// FromCryptoPrivateKey converts a Go private key to the one in this package.
+func FromCryptoPrivateKey(key ed25519.PrivateKey) KeyPair {
+ digest := sha512.Sum512(key[:32])
+ digest[0] &= 248
+ digest[31] &= 127
+ digest[31] |= 64
+ return &precomputedKeyPair{PrivateKeyBytes: digest[:], PublicKeyBytes: PublicKey(key[32:])}
+}
+
+// FromCryptoPublicKey converts a Go public key to the one in this package.
+func FromCryptoPublicKey(key ed25519.PublicKey) PublicKey {
+ return PublicKey(key)
+}
+
+// KeyPair returns a new key pair with the public key precomputed.
+func (p PrivateKey) KeyPair() KeyPair {
+ return &precomputedKeyPair{PrivateKeyBytes: p, PublicKeyBytes: p.PublicKey()}
+}
+
+// PrivateKey simply returns itself. Implements KeyPair.PrivateKey.
+func (p PrivateKey) PrivateKey() PrivateKey { return p }
+
+// Public simply delegates to PublicKey() to satisfy crypto.Signer. This method
+// does a bit more work than the traditional Go ed25519's private key's Public()
+// method so developers are encouraged to reuse the result or use KeyPair()
+// which stores this value.
+func (p PrivateKey) Public() crypto.PublicKey { return p.PublicKey() }
+
+// PublicKey generates a public key for this private key. This method does a bit
+// more work than the traditional Go ed25519's private key's Public() method so
+// developers are encouraged to reuse the result or use KeyPair() which stores
+// this value. Implements KeyPair.PublicKey.
+func (p PrivateKey) PublicKey() PublicKey {
+ var A edwards25519.ExtendedGroupElement
+ var hBytes [32]byte
+ copy(hBytes[:], p[:])
+ edwards25519.GeScalarMultBase(&A, &hBytes)
+ var publicKeyBytes [32]byte
+ A.ToBytes(&publicKeyBytes)
+ return publicKeyBytes[:]
+}
+
+// Sign signs the given message with priv. Ed25519 performs two passes over
+// messages to be signed and therefore cannot handle pre-hashed messages. Thus
+// opts.HashFunc() must return zero to indicate the message hasn't been hashed.
+// This can be achieved by passing crypto.Hash(0) as the value for opts.
+func (p PrivateKey) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) ([]byte, error) {
+ if opts.HashFunc() != crypto.Hash(0) {
+ return nil, errors.New("ed25519: cannot sign hashed message")
+ }
+ return Sign(p, message), nil
+}
+
+// Verify simply calls PublicKey().Verify(). Callers are encouraged to instead
+// store a precomputed KeyPair (via KeyPair() or GenerateKey()) and call Verify
+// on that.
+func (p PrivateKey) Verify(message []byte, sig []byte) bool {
+ return p.PublicKey().Verify(message, sig)
+}
+
+// Verify simply calls the package-level function Verify().
+func (p PublicKey) Verify(message []byte, sig []byte) bool {
+ return Verify(p, message, sig)
+}
+
+// KeyPair is an interface for types with both keys. While PrivateKey does
+// implement this, it generates the PublicKey on demand. For better performance,
+// use the result of GenerateKey directly or call PrivateKey.KeyPair().
+type KeyPair interface {
+ crypto.Signer
+ PrivateKey() PrivateKey
+ PublicKey() PublicKey
+ Verify(message []byte, sig []byte) bool
+}
+
+type precomputedKeyPair struct {
+ PrivateKeyBytes PrivateKey
+ PublicKeyBytes PublicKey
+}
+
+func (p *precomputedKeyPair) PrivateKey() PrivateKey { return p.PrivateKeyBytes }
+func (p *precomputedKeyPair) PublicKey() PublicKey { return p.PublicKeyBytes }
+func (p *precomputedKeyPair) Public() crypto.PublicKey { return p.PublicKey() }
+func (p *precomputedKeyPair) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) ([]byte, error) {
+ if opts.HashFunc() != crypto.Hash(0) {
+ return nil, errors.New("ed25519: cannot sign hashed message")
+ }
+ return Sign(p, message), nil
+}
+func (p *precomputedKeyPair) Verify(message []byte, sig []byte) bool {
+ return p.PublicKeyBytes.Verify(message, sig)
+}
+
+// GenerateKey generates a public/private key pair using entropy from rand.
+// If rand is nil, crypto/rand.Reader will be used.
+func GenerateKey(rnd io.Reader) (KeyPair, error) {
+ if rnd == nil {
+ rnd = rand.Reader
+ }
+ rndByts := make([]byte, 32)
+ if _, err := io.ReadFull(rnd, rndByts); err != nil {
+ return nil, err
+ }
+ digest := sha512.Sum512(rndByts)
+ digest[0] &= 248
+ digest[31] &= 127
+ digest[31] |= 64
+ return PrivateKey(digest[:]).KeyPair(), nil
+}
+
+// Sign signs the message with the given key pair.
+func Sign(keyPair KeyPair, message []byte) []byte {
+ // Ref: https://stackoverflow.com/questions/44810708/ed25519-public-result-is-different
+
+ var privateKeyA [32]byte
+ copy(privateKeyA[:], keyPair.PrivateKey()) // we need this in an array later
+ var messageDigest, hramDigest [64]byte
+
+ h := sha512.New()
+ h.Write(keyPair.PrivateKey()[32:])
+ h.Write(message)
+ h.Sum(messageDigest[:0])
+
+ var messageDigestReduced [32]byte
+ edwards25519.ScReduce(&messageDigestReduced, &messageDigest)
+ var R edwards25519.ExtendedGroupElement
+ edwards25519.GeScalarMultBase(&R, &messageDigestReduced)
+
+ var encodedR [32]byte
+ R.ToBytes(&encodedR)
+
+ h.Reset()
+ h.Write(encodedR[:])
+ h.Write(keyPair.PublicKey())
+ h.Write(message)
+ h.Sum(hramDigest[:0])
+ var hramDigestReduced [32]byte
+ edwards25519.ScReduce(&hramDigestReduced, &hramDigest)
+
+ var s [32]byte
+ edwards25519.ScMulAdd(&s, &hramDigestReduced, &privateKeyA, &messageDigestReduced)
+
+ signature := make([]byte, 64)
+ copy(signature[:], encodedR[:])
+ copy(signature[32:], s[:])
+
+ return signature
+}
+
+// Verify verifies a signed message.
+func Verify(p PublicKey, message []byte, sig []byte) bool {
+ return ed25519.Verify(ed25519.PublicKey(p), message, sig)
+}
diff --git a/vendor/github.com/cretz/bine/torutil/ed25519/internal/edwards25519/README.md b/vendor/github.com/cretz/bine/torutil/ed25519/internal/edwards25519/README.md
new file mode 100644
index 0000000..f8ffca5
--- /dev/null
+++ b/vendor/github.com/cretz/bine/torutil/ed25519/internal/edwards25519/README.md
@@ -0,0 +1 @@
+This is taken from https://github.com/golang/crypto/tree/1a580b3eff7814fc9b40602fd35256c63b50f491/ed25519/internal/edwards25519 \ No newline at end of file
diff --git a/vendor/github.com/cretz/bine/torutil/ed25519/internal/edwards25519/const.go b/vendor/github.com/cretz/bine/torutil/ed25519/internal/edwards25519/const.go
new file mode 100644
index 0000000..e39f086
--- /dev/null
+++ b/vendor/github.com/cretz/bine/torutil/ed25519/internal/edwards25519/const.go
@@ -0,0 +1,1422 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package edwards25519
+
+// These values are from the public domain, “ref10” implementation of ed25519
+// from SUPERCOP.
+
+// d is a constant in the Edwards curve equation.
+var d = FieldElement{
+ -10913610, 13857413, -15372611, 6949391, 114729, -8787816, -6275908, -3247719, -18696448, -12055116,
+}
+
+// d2 is 2*d.
+var d2 = FieldElement{
+ -21827239, -5839606, -30745221, 13898782, 229458, 15978800, -12551817, -6495438, 29715968, 9444199,
+}
+
+// SqrtM1 is the square-root of -1 in the field.
+var SqrtM1 = FieldElement{
+ -32595792, -7943725, 9377950, 3500415, 12389472, -272473, -25146209, -2005654, 326686, 11406482,
+}
+
+// A is a constant in the Montgomery-form of curve25519.
+var A = FieldElement{
+ 486662, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+}
+
+// bi contains precomputed multiples of the base-point. See the Ed25519 paper
+// for a discussion about how these values are used.
+var bi = [8]PreComputedGroupElement{
+ {
+ FieldElement{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605},
+ FieldElement{-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378},
+ FieldElement{-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546},
+ },
+ {
+ FieldElement{15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024},
+ FieldElement{16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574},
+ FieldElement{30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357},
+ },
+ {
+ FieldElement{10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380},
+ FieldElement{4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306},
+ FieldElement{19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942},
+ },
+ {
+ FieldElement{5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766},
+ FieldElement{-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701},
+ FieldElement{28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300},
+ },
+ {
+ FieldElement{-22518993, -6692182, 14201702, -8745502, -23510406, 8844726, 18474211, -1361450, -13062696, 13821877},
+ FieldElement{-6455177, -7839871, 3374702, -4740862, -27098617, -10571707, 31655028, -7212327, 18853322, -14220951},
+ FieldElement{4566830, -12963868, -28974889, -12240689, -7602672, -2830569, -8514358, -10431137, 2207753, -3209784},
+ },
+ {
+ FieldElement{-25154831, -4185821, 29681144, 7868801, -6854661, -9423865, -12437364, -663000, -31111463, -16132436},
+ FieldElement{25576264, -2703214, 7349804, -11814844, 16472782, 9300885, 3844789, 15725684, 171356, 6466918},
+ FieldElement{23103977, 13316479, 9739013, -16149481, 817875, -15038942, 8965339, -14088058, -30714912, 16193877},
+ },
+ {
+ FieldElement{-33521811, 3180713, -2394130, 14003687, -16903474, -16270840, 17238398, 4729455, -18074513, 9256800},
+ FieldElement{-25182317, -4174131, 32336398, 5036987, -21236817, 11360617, 22616405, 9761698, -19827198, 630305},
+ FieldElement{-13720693, 2639453, -24237460, -7406481, 9494427, -5774029, -6554551, -15960994, -2449256, -14291300},
+ },
+ {
+ FieldElement{-3151181, -5046075, 9282714, 6866145, -31907062, -863023, -18940575, 15033784, 25105118, -7894876},
+ FieldElement{-24326370, 15950226, -31801215, -14592823, -11662737, -5090925, 1573892, -2625887, 2198790, -15804619},
+ FieldElement{-3099351, 10324967, -2241613, 7453183, -5446979, -2735503, -13812022, -16236442, -32461234, -12290683},
+ },
+}
+
+// base contains precomputed multiples of the base-point. See the Ed25519 paper
+// for a discussion about how these values are used.
+var base = [32][8]PreComputedGroupElement{
+ {
+ {
+ FieldElement{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605},
+ FieldElement{-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378},
+ FieldElement{-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546},
+ },
+ {
+ FieldElement{-12815894, -12976347, -21581243, 11784320, -25355658, -2750717, -11717903, -3814571, -358445, -10211303},
+ FieldElement{-21703237, 6903825, 27185491, 6451973, -29577724, -9554005, -15616551, 11189268, -26829678, -5319081},
+ FieldElement{26966642, 11152617, 32442495, 15396054, 14353839, -12752335, -3128826, -9541118, -15472047, -4166697},
+ },
+ {
+ FieldElement{15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024},
+ FieldElement{16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574},
+ FieldElement{30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357},
+ },
+ {
+ FieldElement{-17036878, 13921892, 10945806, -6033431, 27105052, -16084379, -28926210, 15006023, 3284568, -6276540},
+ FieldElement{23599295, -8306047, -11193664, -7687416, 13236774, 10506355, 7464579, 9656445, 13059162, 10374397},
+ FieldElement{7798556, 16710257, 3033922, 2874086, 28997861, 2835604, 32406664, -3839045, -641708, -101325},
+ },
+ {
+ FieldElement{10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380},
+ FieldElement{4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306},
+ FieldElement{19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942},
+ },
+ {
+ FieldElement{-15371964, -12862754, 32573250, 4720197, -26436522, 5875511, -19188627, -15224819, -9818940, -12085777},
+ FieldElement{-8549212, 109983, 15149363, 2178705, 22900618, 4543417, 3044240, -15689887, 1762328, 14866737},
+ FieldElement{-18199695, -15951423, -10473290, 1707278, -17185920, 3916101, -28236412, 3959421, 27914454, 4383652},
+ },
+ {
+ FieldElement{5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766},
+ FieldElement{-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701},
+ FieldElement{28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300},
+ },
+ {
+ FieldElement{14499471, -2729599, -33191113, -4254652, 28494862, 14271267, 30290735, 10876454, -33154098, 2381726},
+ FieldElement{-7195431, -2655363, -14730155, 462251, -27724326, 3941372, -6236617, 3696005, -32300832, 15351955},
+ FieldElement{27431194, 8222322, 16448760, -3907995, -18707002, 11938355, -32961401, -2970515, 29551813, 10109425},
+ },
+ },
+ {
+ {
+ FieldElement{-13657040, -13155431, -31283750, 11777098, 21447386, 6519384, -2378284, -1627556, 10092783, -4764171},
+ FieldElement{27939166, 14210322, 4677035, 16277044, -22964462, -12398139, -32508754, 12005538, -17810127, 12803510},
+ FieldElement{17228999, -15661624, -1233527, 300140, -1224870, -11714777, 30364213, -9038194, 18016357, 4397660},
+ },
+ {
+ FieldElement{-10958843, -7690207, 4776341, -14954238, 27850028, -15602212, -26619106, 14544525, -17477504, 982639},
+ FieldElement{29253598, 15796703, -2863982, -9908884, 10057023, 3163536, 7332899, -4120128, -21047696, 9934963},
+ FieldElement{5793303, 16271923, -24131614, -10116404, 29188560, 1206517, -14747930, 4559895, -30123922, -10897950},
+ },
+ {
+ FieldElement{-27643952, -11493006, 16282657, -11036493, 28414021, -15012264, 24191034, 4541697, -13338309, 5500568},
+ FieldElement{12650548, -1497113, 9052871, 11355358, -17680037, -8400164, -17430592, 12264343, 10874051, 13524335},
+ FieldElement{25556948, -3045990, 714651, 2510400, 23394682, -10415330, 33119038, 5080568, -22528059, 5376628},
+ },
+ {
+ FieldElement{-26088264, -4011052, -17013699, -3537628, -6726793, 1920897, -22321305, -9447443, 4535768, 1569007},
+ FieldElement{-2255422, 14606630, -21692440, -8039818, 28430649, 8775819, -30494562, 3044290, 31848280, 12543772},
+ FieldElement{-22028579, 2943893, -31857513, 6777306, 13784462, -4292203, -27377195, -2062731, 7718482, 14474653},
+ },
+ {
+ FieldElement{2385315, 2454213, -22631320, 46603, -4437935, -15680415, 656965, -7236665, 24316168, -5253567},
+ FieldElement{13741529, 10911568, -33233417, -8603737, -20177830, -1033297, 33040651, -13424532, -20729456, 8321686},
+ FieldElement{21060490, -2212744, 15712757, -4336099, 1639040, 10656336, 23845965, -11874838, -9984458, 608372},
+ },
+ {
+ FieldElement{-13672732, -15087586, -10889693, -7557059, -6036909, 11305547, 1123968, -6780577, 27229399, 23887},
+ FieldElement{-23244140, -294205, -11744728, 14712571, -29465699, -2029617, 12797024, -6440308, -1633405, 16678954},
+ FieldElement{-29500620, 4770662, -16054387, 14001338, 7830047, 9564805, -1508144, -4795045, -17169265, 4904953},
+ },
+ {
+ FieldElement{24059557, 14617003, 19037157, -15039908, 19766093, -14906429, 5169211, 16191880, 2128236, -4326833},
+ FieldElement{-16981152, 4124966, -8540610, -10653797, 30336522, -14105247, -29806336, 916033, -6882542, -2986532},
+ FieldElement{-22630907, 12419372, -7134229, -7473371, -16478904, 16739175, 285431, 2763829, 15736322, 4143876},
+ },
+ {
+ FieldElement{2379352, 11839345, -4110402, -5988665, 11274298, 794957, 212801, -14594663, 23527084, -16458268},
+ FieldElement{33431127, -11130478, -17838966, -15626900, 8909499, 8376530, -32625340, 4087881, -15188911, -14416214},
+ FieldElement{1767683, 7197987, -13205226, -2022635, -13091350, 448826, 5799055, 4357868, -4774191, -16323038},
+ },
+ },
+ {
+ {
+ FieldElement{6721966, 13833823, -23523388, -1551314, 26354293, -11863321, 23365147, -3949732, 7390890, 2759800},
+ FieldElement{4409041, 2052381, 23373853, 10530217, 7676779, -12885954, 21302353, -4264057, 1244380, -12919645},
+ FieldElement{-4421239, 7169619, 4982368, -2957590, 30256825, -2777540, 14086413, 9208236, 15886429, 16489664},
+ },
+ {
+ FieldElement{1996075, 10375649, 14346367, 13311202, -6874135, -16438411, -13693198, 398369, -30606455, -712933},
+ FieldElement{-25307465, 9795880, -2777414, 14878809, -33531835, 14780363, 13348553, 12076947, -30836462, 5113182},
+ FieldElement{-17770784, 11797796, 31950843, 13929123, -25888302, 12288344, -30341101, -7336386, 13847711, 5387222},
+ },
+ {
+ FieldElement{-18582163, -3416217, 17824843, -2340966, 22744343, -10442611, 8763061, 3617786, -19600662, 10370991},
+ FieldElement{20246567, -14369378, 22358229, -543712, 18507283, -10413996, 14554437, -8746092, 32232924, 16763880},
+ FieldElement{9648505, 10094563, 26416693, 14745928, -30374318, -6472621, 11094161, 15689506, 3140038, -16510092},
+ },
+ {
+ FieldElement{-16160072, 5472695, 31895588, 4744994, 8823515, 10365685, -27224800, 9448613, -28774454, 366295},
+ FieldElement{19153450, 11523972, -11096490, -6503142, -24647631, 5420647, 28344573, 8041113, 719605, 11671788},
+ FieldElement{8678025, 2694440, -6808014, 2517372, 4964326, 11152271, -15432916, -15266516, 27000813, -10195553},
+ },
+ {
+ FieldElement{-15157904, 7134312, 8639287, -2814877, -7235688, 10421742, 564065, 5336097, 6750977, -14521026},
+ FieldElement{11836410, -3979488, 26297894, 16080799, 23455045, 15735944, 1695823, -8819122, 8169720, 16220347},
+ FieldElement{-18115838, 8653647, 17578566, -6092619, -8025777, -16012763, -11144307, -2627664, -5990708, -14166033},
+ },
+ {
+ FieldElement{-23308498, -10968312, 15213228, -10081214, -30853605, -11050004, 27884329, 2847284, 2655861, 1738395},
+ FieldElement{-27537433, -14253021, -25336301, -8002780, -9370762, 8129821, 21651608, -3239336, -19087449, -11005278},
+ FieldElement{1533110, 3437855, 23735889, 459276, 29970501, 11335377, 26030092, 5821408, 10478196, 8544890},
+ },
+ {
+ FieldElement{32173121, -16129311, 24896207, 3921497, 22579056, -3410854, 19270449, 12217473, 17789017, -3395995},
+ FieldElement{-30552961, -2228401, -15578829, -10147201, 13243889, 517024, 15479401, -3853233, 30460520, 1052596},
+ FieldElement{-11614875, 13323618, 32618793, 8175907, -15230173, 12596687, 27491595, -4612359, 3179268, -9478891},
+ },
+ {
+ FieldElement{31947069, -14366651, -4640583, -15339921, -15125977, -6039709, -14756777, -16411740, 19072640, -9511060},
+ FieldElement{11685058, 11822410, 3158003, -13952594, 33402194, -4165066, 5977896, -5215017, 473099, 5040608},
+ FieldElement{-20290863, 8198642, -27410132, 11602123, 1290375, -2799760, 28326862, 1721092, -19558642, -3131606},
+ },
+ },
+ {
+ {
+ FieldElement{7881532, 10687937, 7578723, 7738378, -18951012, -2553952, 21820786, 8076149, -27868496, 11538389},
+ FieldElement{-19935666, 3899861, 18283497, -6801568, -15728660, -11249211, 8754525, 7446702, -5676054, 5797016},
+ FieldElement{-11295600, -3793569, -15782110, -7964573, 12708869, -8456199, 2014099, -9050574, -2369172, -5877341},
+ },
+ {
+ FieldElement{-22472376, -11568741, -27682020, 1146375, 18956691, 16640559, 1192730, -3714199, 15123619, 10811505},
+ FieldElement{14352098, -3419715, -18942044, 10822655, 32750596, 4699007, -70363, 15776356, -28886779, -11974553},
+ FieldElement{-28241164, -8072475, -4978962, -5315317, 29416931, 1847569, -20654173, -16484855, 4714547, -9600655},
+ },
+ {
+ FieldElement{15200332, 8368572, 19679101, 15970074, -31872674, 1959451, 24611599, -4543832, -11745876, 12340220},
+ FieldElement{12876937, -10480056, 33134381, 6590940, -6307776, 14872440, 9613953, 8241152, 15370987, 9608631},
+ FieldElement{-4143277, -12014408, 8446281, -391603, 4407738, 13629032, -7724868, 15866074, -28210621, -8814099},
+ },
+ {
+ FieldElement{26660628, -15677655, 8393734, 358047, -7401291, 992988, -23904233, 858697, 20571223, 8420556},
+ FieldElement{14620715, 13067227, -15447274, 8264467, 14106269, 15080814, 33531827, 12516406, -21574435, -12476749},
+ FieldElement{236881, 10476226, 57258, -14677024, 6472998, 2466984, 17258519, 7256740, 8791136, 15069930},
+ },
+ {
+ FieldElement{1276410, -9371918, 22949635, -16322807, -23493039, -5702186, 14711875, 4874229, -30663140, -2331391},
+ FieldElement{5855666, 4990204, -13711848, 7294284, -7804282, 1924647, -1423175, -7912378, -33069337, 9234253},
+ FieldElement{20590503, -9018988, 31529744, -7352666, -2706834, 10650548, 31559055, -11609587, 18979186, 13396066},
+ },
+ {
+ FieldElement{24474287, 4968103, 22267082, 4407354, 24063882, -8325180, -18816887, 13594782, 33514650, 7021958},
+ FieldElement{-11566906, -6565505, -21365085, 15928892, -26158305, 4315421, -25948728, -3916677, -21480480, 12868082},
+ FieldElement{-28635013, 13504661, 19988037, -2132761, 21078225, 6443208, -21446107, 2244500, -12455797, -8089383},
+ },
+ {
+ FieldElement{-30595528, 13793479, -5852820, 319136, -25723172, -6263899, 33086546, 8957937, -15233648, 5540521},
+ FieldElement{-11630176, -11503902, -8119500, -7643073, 2620056, 1022908, -23710744, -1568984, -16128528, -14962807},
+ FieldElement{23152971, 775386, 27395463, 14006635, -9701118, 4649512, 1689819, 892185, -11513277, -15205948},
+ },
+ {
+ FieldElement{9770129, 9586738, 26496094, 4324120, 1556511, -3550024, 27453819, 4763127, -19179614, 5867134},
+ FieldElement{-32765025, 1927590, 31726409, -4753295, 23962434, -16019500, 27846559, 5931263, -29749703, -16108455},
+ FieldElement{27461885, -2977536, 22380810, 1815854, -23033753, -3031938, 7283490, -15148073, -19526700, 7734629},
+ },
+ },
+ {
+ {
+ FieldElement{-8010264, -9590817, -11120403, 6196038, 29344158, -13430885, 7585295, -3176626, 18549497, 15302069},
+ FieldElement{-32658337, -6171222, -7672793, -11051681, 6258878, 13504381, 10458790, -6418461, -8872242, 8424746},
+ FieldElement{24687205, 8613276, -30667046, -3233545, 1863892, -1830544, 19206234, 7134917, -11284482, -828919},
+ },
+ {
+ FieldElement{11334899, -9218022, 8025293, 12707519, 17523892, -10476071, 10243738, -14685461, -5066034, 16498837},
+ FieldElement{8911542, 6887158, -9584260, -6958590, 11145641, -9543680, 17303925, -14124238, 6536641, 10543906},
+ FieldElement{-28946384, 15479763, -17466835, 568876, -1497683, 11223454, -2669190, -16625574, -27235709, 8876771},
+ },
+ {
+ FieldElement{-25742899, -12566864, -15649966, -846607, -33026686, -796288, -33481822, 15824474, -604426, -9039817},
+ FieldElement{10330056, 70051, 7957388, -9002667, 9764902, 15609756, 27698697, -4890037, 1657394, 3084098},
+ FieldElement{10477963, -7470260, 12119566, -13250805, 29016247, -5365589, 31280319, 14396151, -30233575, 15272409},
+ },
+ {
+ FieldElement{-12288309, 3169463, 28813183, 16658753, 25116432, -5630466, -25173957, -12636138, -25014757, 1950504},
+ FieldElement{-26180358, 9489187, 11053416, -14746161, -31053720, 5825630, -8384306, -8767532, 15341279, 8373727},
+ FieldElement{28685821, 7759505, -14378516, -12002860, -31971820, 4079242, 298136, -10232602, -2878207, 15190420},
+ },
+ {
+ FieldElement{-32932876, 13806336, -14337485, -15794431, -24004620, 10940928, 8669718, 2742393, -26033313, -6875003},
+ FieldElement{-1580388, -11729417, -25979658, -11445023, -17411874, -10912854, 9291594, -16247779, -12154742, 6048605},
+ FieldElement{-30305315, 14843444, 1539301, 11864366, 20201677, 1900163, 13934231, 5128323, 11213262, 9168384},
+ },
+ {
+ FieldElement{-26280513, 11007847, 19408960, -940758, -18592965, -4328580, -5088060, -11105150, 20470157, -16398701},
+ FieldElement{-23136053, 9282192, 14855179, -15390078, -7362815, -14408560, -22783952, 14461608, 14042978, 5230683},
+ FieldElement{29969567, -2741594, -16711867, -8552442, 9175486, -2468974, 21556951, 3506042, -5933891, -12449708},
+ },
+ {
+ FieldElement{-3144746, 8744661, 19704003, 4581278, -20430686, 6830683, -21284170, 8971513, -28539189, 15326563},
+ FieldElement{-19464629, 10110288, -17262528, -3503892, -23500387, 1355669, -15523050, 15300988, -20514118, 9168260},
+ FieldElement{-5353335, 4488613, -23803248, 16314347, 7780487, -15638939, -28948358, 9601605, 33087103, -9011387},
+ },
+ {
+ FieldElement{-19443170, -15512900, -20797467, -12445323, -29824447, 10229461, -27444329, -15000531, -5996870, 15664672},
+ FieldElement{23294591, -16632613, -22650781, -8470978, 27844204, 11461195, 13099750, -2460356, 18151676, 13417686},
+ FieldElement{-24722913, -4176517, -31150679, 5988919, -26858785, 6685065, 1661597, -12551441, 15271676, -15452665},
+ },
+ },
+ {
+ {
+ FieldElement{11433042, -13228665, 8239631, -5279517, -1985436, -725718, -18698764, 2167544, -6921301, -13440182},
+ FieldElement{-31436171, 15575146, 30436815, 12192228, -22463353, 9395379, -9917708, -8638997, 12215110, 12028277},
+ FieldElement{14098400, 6555944, 23007258, 5757252, -15427832, -12950502, 30123440, 4617780, -16900089, -655628},
+ },
+ {
+ FieldElement{-4026201, -15240835, 11893168, 13718664, -14809462, 1847385, -15819999, 10154009, 23973261, -12684474},
+ FieldElement{-26531820, -3695990, -1908898, 2534301, -31870557, -16550355, 18341390, -11419951, 32013174, -10103539},
+ FieldElement{-25479301, 10876443, -11771086, -14625140, -12369567, 1838104, 21911214, 6354752, 4425632, -837822},
+ },
+ {
+ FieldElement{-10433389, -14612966, 22229858, -3091047, -13191166, 776729, -17415375, -12020462, 4725005, 14044970},
+ FieldElement{19268650, -7304421, 1555349, 8692754, -21474059, -9910664, 6347390, -1411784, -19522291, -16109756},
+ FieldElement{-24864089, 12986008, -10898878, -5558584, -11312371, -148526, 19541418, 8180106, 9282262, 10282508},
+ },
+ {
+ FieldElement{-26205082, 4428547, -8661196, -13194263, 4098402, -14165257, 15522535, 8372215, 5542595, -10702683},
+ FieldElement{-10562541, 14895633, 26814552, -16673850, -17480754, -2489360, -2781891, 6993761, -18093885, 10114655},
+ FieldElement{-20107055, -929418, 31422704, 10427861, -7110749, 6150669, -29091755, -11529146, 25953725, -106158},
+ },
+ {
+ FieldElement{-4234397, -8039292, -9119125, 3046000, 2101609, -12607294, 19390020, 6094296, -3315279, 12831125},
+ FieldElement{-15998678, 7578152, 5310217, 14408357, -33548620, -224739, 31575954, 6326196, 7381791, -2421839},
+ FieldElement{-20902779, 3296811, 24736065, -16328389, 18374254, 7318640, 6295303, 8082724, -15362489, 12339664},
+ },
+ {
+ FieldElement{27724736, 2291157, 6088201, -14184798, 1792727, 5857634, 13848414, 15768922, 25091167, 14856294},
+ FieldElement{-18866652, 8331043, 24373479, 8541013, -701998, -9269457, 12927300, -12695493, -22182473, -9012899},
+ FieldElement{-11423429, -5421590, 11632845, 3405020, 30536730, -11674039, -27260765, 13866390, 30146206, 9142070},
+ },
+ {
+ FieldElement{3924129, -15307516, -13817122, -10054960, 12291820, -668366, -27702774, 9326384, -8237858, 4171294},
+ FieldElement{-15921940, 16037937, 6713787, 16606682, -21612135, 2790944, 26396185, 3731949, 345228, -5462949},
+ FieldElement{-21327538, 13448259, 25284571, 1143661, 20614966, -8849387, 2031539, -12391231, -16253183, -13582083},
+ },
+ {
+ FieldElement{31016211, -16722429, 26371392, -14451233, -5027349, 14854137, 17477601, 3842657, 28012650, -16405420},
+ FieldElement{-5075835, 9368966, -8562079, -4600902, -15249953, 6970560, -9189873, 16292057, -8867157, 3507940},
+ FieldElement{29439664, 3537914, 23333589, 6997794, -17555561, -11018068, -15209202, -15051267, -9164929, 6580396},
+ },
+ },
+ {
+ {
+ FieldElement{-12185861, -7679788, 16438269, 10826160, -8696817, -6235611, 17860444, -9273846, -2095802, 9304567},
+ FieldElement{20714564, -4336911, 29088195, 7406487, 11426967, -5095705, 14792667, -14608617, 5289421, -477127},
+ FieldElement{-16665533, -10650790, -6160345, -13305760, 9192020, -1802462, 17271490, 12349094, 26939669, -3752294},
+ },
+ {
+ FieldElement{-12889898, 9373458, 31595848, 16374215, 21471720, 13221525, -27283495, -12348559, -3698806, 117887},
+ FieldElement{22263325, -6560050, 3984570, -11174646, -15114008, -566785, 28311253, 5358056, -23319780, 541964},
+ FieldElement{16259219, 3261970, 2309254, -15534474, -16885711, -4581916, 24134070, -16705829, -13337066, -13552195},
+ },
+ {
+ FieldElement{9378160, -13140186, -22845982, -12745264, 28198281, -7244098, -2399684, -717351, 690426, 14876244},
+ FieldElement{24977353, -314384, -8223969, -13465086, 28432343, -1176353, -13068804, -12297348, -22380984, 6618999},
+ FieldElement{-1538174, 11685646, 12944378, 13682314, -24389511, -14413193, 8044829, -13817328, 32239829, -5652762},
+ },
+ {
+ FieldElement{-18603066, 4762990, -926250, 8885304, -28412480, -3187315, 9781647, -10350059, 32779359, 5095274},
+ FieldElement{-33008130, -5214506, -32264887, -3685216, 9460461, -9327423, -24601656, 14506724, 21639561, -2630236},
+ FieldElement{-16400943, -13112215, 25239338, 15531969, 3987758, -4499318, -1289502, -6863535, 17874574, 558605},
+ },
+ {
+ FieldElement{-13600129, 10240081, 9171883, 16131053, -20869254, 9599700, 33499487, 5080151, 2085892, 5119761},
+ FieldElement{-22205145, -2519528, -16381601, 414691, -25019550, 2170430, 30634760, -8363614, -31999993, -5759884},
+ FieldElement{-6845704, 15791202, 8550074, -1312654, 29928809, -12092256, 27534430, -7192145, -22351378, 12961482},
+ },
+ {
+ FieldElement{-24492060, -9570771, 10368194, 11582341, -23397293, -2245287, 16533930, 8206996, -30194652, -5159638},
+ FieldElement{-11121496, -3382234, 2307366, 6362031, -135455, 8868177, -16835630, 7031275, 7589640, 8945490},
+ FieldElement{-32152748, 8917967, 6661220, -11677616, -1192060, -15793393, 7251489, -11182180, 24099109, -14456170},
+ },
+ {
+ FieldElement{5019558, -7907470, 4244127, -14714356, -26933272, 6453165, -19118182, -13289025, -6231896, -10280736},
+ FieldElement{10853594, 10721687, 26480089, 5861829, -22995819, 1972175, -1866647, -10557898, -3363451, -6441124},
+ FieldElement{-17002408, 5906790, 221599, -6563147, 7828208, -13248918, 24362661, -2008168, -13866408, 7421392},
+ },
+ {
+ FieldElement{8139927, -6546497, 32257646, -5890546, 30375719, 1886181, -21175108, 15441252, 28826358, -4123029},
+ FieldElement{6267086, 9695052, 7709135, -16603597, -32869068, -1886135, 14795160, -7840124, 13746021, -1742048},
+ FieldElement{28584902, 7787108, -6732942, -15050729, 22846041, -7571236, -3181936, -363524, 4771362, -8419958},
+ },
+ },
+ {
+ {
+ FieldElement{24949256, 6376279, -27466481, -8174608, -18646154, -9930606, 33543569, -12141695, 3569627, 11342593},
+ FieldElement{26514989, 4740088, 27912651, 3697550, 19331575, -11472339, 6809886, 4608608, 7325975, -14801071},
+ FieldElement{-11618399, -14554430, -24321212, 7655128, -1369274, 5214312, -27400540, 10258390, -17646694, -8186692},
+ },
+ {
+ FieldElement{11431204, 15823007, 26570245, 14329124, 18029990, 4796082, -31446179, 15580664, 9280358, -3973687},
+ FieldElement{-160783, -10326257, -22855316, -4304997, -20861367, -13621002, -32810901, -11181622, -15545091, 4387441},
+ FieldElement{-20799378, 12194512, 3937617, -5805892, -27154820, 9340370, -24513992, 8548137, 20617071, -7482001},
+ },
+ {
+ FieldElement{-938825, -3930586, -8714311, 16124718, 24603125, -6225393, -13775352, -11875822, 24345683, 10325460},
+ FieldElement{-19855277, -1568885, -22202708, 8714034, 14007766, 6928528, 16318175, -1010689, 4766743, 3552007},
+ FieldElement{-21751364, -16730916, 1351763, -803421, -4009670, 3950935, 3217514, 14481909, 10988822, -3994762},
+ },
+ {
+ FieldElement{15564307, -14311570, 3101243, 5684148, 30446780, -8051356, 12677127, -6505343, -8295852, 13296005},
+ FieldElement{-9442290, 6624296, -30298964, -11913677, -4670981, -2057379, 31521204, 9614054, -30000824, 12074674},
+ FieldElement{4771191, -135239, 14290749, -13089852, 27992298, 14998318, -1413936, -1556716, 29832613, -16391035},
+ },
+ {
+ FieldElement{7064884, -7541174, -19161962, -5067537, -18891269, -2912736, 25825242, 5293297, -27122660, 13101590},
+ FieldElement{-2298563, 2439670, -7466610, 1719965, -27267541, -16328445, 32512469, -5317593, -30356070, -4190957},
+ FieldElement{-30006540, 10162316, -33180176, 3981723, -16482138, -13070044, 14413974, 9515896, 19568978, 9628812},
+ },
+ {
+ FieldElement{33053803, 199357, 15894591, 1583059, 27380243, -4580435, -17838894, -6106839, -6291786, 3437740},
+ FieldElement{-18978877, 3884493, 19469877, 12726490, 15913552, 13614290, -22961733, 70104, 7463304, 4176122},
+ FieldElement{-27124001, 10659917, 11482427, -16070381, 12771467, -6635117, -32719404, -5322751, 24216882, 5944158},
+ },
+ {
+ FieldElement{8894125, 7450974, -2664149, -9765752, -28080517, -12389115, 19345746, 14680796, 11632993, 5847885},
+ FieldElement{26942781, -2315317, 9129564, -4906607, 26024105, 11769399, -11518837, 6367194, -9727230, 4782140},
+ FieldElement{19916461, -4828410, -22910704, -11414391, 25606324, -5972441, 33253853, 8220911, 6358847, -1873857},
+ },
+ {
+ FieldElement{801428, -2081702, 16569428, 11065167, 29875704, 96627, 7908388, -4480480, -13538503, 1387155},
+ FieldElement{19646058, 5720633, -11416706, 12814209, 11607948, 12749789, 14147075, 15156355, -21866831, 11835260},
+ FieldElement{19299512, 1155910, 28703737, 14890794, 2925026, 7269399, 26121523, 15467869, -26560550, 5052483},
+ },
+ },
+ {
+ {
+ FieldElement{-3017432, 10058206, 1980837, 3964243, 22160966, 12322533, -6431123, -12618185, 12228557, -7003677},
+ FieldElement{32944382, 14922211, -22844894, 5188528, 21913450, -8719943, 4001465, 13238564, -6114803, 8653815},
+ FieldElement{22865569, -4652735, 27603668, -12545395, 14348958, 8234005, 24808405, 5719875, 28483275, 2841751},
+ },
+ {
+ FieldElement{-16420968, -1113305, -327719, -12107856, 21886282, -15552774, -1887966, -315658, 19932058, -12739203},
+ FieldElement{-11656086, 10087521, -8864888, -5536143, -19278573, -3055912, 3999228, 13239134, -4777469, -13910208},
+ FieldElement{1382174, -11694719, 17266790, 9194690, -13324356, 9720081, 20403944, 11284705, -14013818, 3093230},
+ },
+ {
+ FieldElement{16650921, -11037932, -1064178, 1570629, -8329746, 7352753, -302424, 16271225, -24049421, -6691850},
+ FieldElement{-21911077, -5927941, -4611316, -5560156, -31744103, -10785293, 24123614, 15193618, -21652117, -16739389},
+ FieldElement{-9935934, -4289447, -25279823, 4372842, 2087473, 10399484, 31870908, 14690798, 17361620, 11864968},
+ },
+ {
+ FieldElement{-11307610, 6210372, 13206574, 5806320, -29017692, -13967200, -12331205, -7486601, -25578460, -16240689},
+ FieldElement{14668462, -12270235, 26039039, 15305210, 25515617, 4542480, 10453892, 6577524, 9145645, -6443880},
+ FieldElement{5974874, 3053895, -9433049, -10385191, -31865124, 3225009, -7972642, 3936128, -5652273, -3050304},
+ },
+ {
+ FieldElement{30625386, -4729400, -25555961, -12792866, -20484575, 7695099, 17097188, -16303496, -27999779, 1803632},
+ FieldElement{-3553091, 9865099, -5228566, 4272701, -5673832, -16689700, 14911344, 12196514, -21405489, 7047412},
+ FieldElement{20093277, 9920966, -11138194, -5343857, 13161587, 12044805, -32856851, 4124601, -32343828, -10257566},
+ },
+ {
+ FieldElement{-20788824, 14084654, -13531713, 7842147, 19119038, -13822605, 4752377, -8714640, -21679658, 2288038},
+ FieldElement{-26819236, -3283715, 29965059, 3039786, -14473765, 2540457, 29457502, 14625692, -24819617, 12570232},
+ FieldElement{-1063558, -11551823, 16920318, 12494842, 1278292, -5869109, -21159943, -3498680, -11974704, 4724943},
+ },
+ {
+ FieldElement{17960970, -11775534, -4140968, -9702530, -8876562, -1410617, -12907383, -8659932, -29576300, 1903856},
+ FieldElement{23134274, -14279132, -10681997, -1611936, 20684485, 15770816, -12989750, 3190296, 26955097, 14109738},
+ FieldElement{15308788, 5320727, -30113809, -14318877, 22902008, 7767164, 29425325, -11277562, 31960942, 11934971},
+ },
+ {
+ FieldElement{-27395711, 8435796, 4109644, 12222639, -24627868, 14818669, 20638173, 4875028, 10491392, 1379718},
+ FieldElement{-13159415, 9197841, 3875503, -8936108, -1383712, -5879801, 33518459, 16176658, 21432314, 12180697},
+ FieldElement{-11787308, 11500838, 13787581, -13832590, -22430679, 10140205, 1465425, 12689540, -10301319, -13872883},
+ },
+ },
+ {
+ {
+ FieldElement{5414091, -15386041, -21007664, 9643570, 12834970, 1186149, -2622916, -1342231, 26128231, 6032912},
+ FieldElement{-26337395, -13766162, 32496025, -13653919, 17847801, -12669156, 3604025, 8316894, -25875034, -10437358},
+ FieldElement{3296484, 6223048, 24680646, -12246460, -23052020, 5903205, -8862297, -4639164, 12376617, 3188849},
+ },
+ {
+ FieldElement{29190488, -14659046, 27549113, -1183516, 3520066, -10697301, 32049515, -7309113, -16109234, -9852307},
+ FieldElement{-14744486, -9309156, 735818, -598978, -20407687, -5057904, 25246078, -15795669, 18640741, -960977},
+ FieldElement{-6928835, -16430795, 10361374, 5642961, 4910474, 12345252, -31638386, -494430, 10530747, 1053335},
+ },
+ {
+ FieldElement{-29265967, -14186805, -13538216, -12117373, -19457059, -10655384, -31462369, -2948985, 24018831, 15026644},
+ FieldElement{-22592535, -3145277, -2289276, 5953843, -13440189, 9425631, 25310643, 13003497, -2314791, -15145616},
+ FieldElement{-27419985, -603321, -8043984, -1669117, -26092265, 13987819, -27297622, 187899, -23166419, -2531735},
+ },
+ {
+ FieldElement{-21744398, -13810475, 1844840, 5021428, -10434399, -15911473, 9716667, 16266922, -5070217, 726099},
+ FieldElement{29370922, -6053998, 7334071, -15342259, 9385287, 2247707, -13661962, -4839461, 30007388, -15823341},
+ FieldElement{-936379, 16086691, 23751945, -543318, -1167538, -5189036, 9137109, 730663, 9835848, 4555336},
+ },
+ {
+ FieldElement{-23376435, 1410446, -22253753, -12899614, 30867635, 15826977, 17693930, 544696, -11985298, 12422646},
+ FieldElement{31117226, -12215734, -13502838, 6561947, -9876867, -12757670, -5118685, -4096706, 29120153, 13924425},
+ FieldElement{-17400879, -14233209, 19675799, -2734756, -11006962, -5858820, -9383939, -11317700, 7240931, -237388},
+ },
+ {
+ FieldElement{-31361739, -11346780, -15007447, -5856218, -22453340, -12152771, 1222336, 4389483, 3293637, -15551743},
+ FieldElement{-16684801, -14444245, 11038544, 11054958, -13801175, -3338533, -24319580, 7733547, 12796905, -6335822},
+ FieldElement{-8759414, -10817836, -25418864, 10783769, -30615557, -9746811, -28253339, 3647836, 3222231, -11160462},
+ },
+ {
+ FieldElement{18606113, 1693100, -25448386, -15170272, 4112353, 10045021, 23603893, -2048234, -7550776, 2484985},
+ FieldElement{9255317, -3131197, -12156162, -1004256, 13098013, -9214866, 16377220, -2102812, -19802075, -3034702},
+ FieldElement{-22729289, 7496160, -5742199, 11329249, 19991973, -3347502, -31718148, 9936966, -30097688, -10618797},
+ },
+ {
+ FieldElement{21878590, -5001297, 4338336, 13643897, -3036865, 13160960, 19708896, 5415497, -7360503, -4109293},
+ FieldElement{27736861, 10103576, 12500508, 8502413, -3413016, -9633558, 10436918, -1550276, -23659143, -8132100},
+ FieldElement{19492550, -12104365, -29681976, -852630, -3208171, 12403437, 30066266, 8367329, 13243957, 8709688},
+ },
+ },
+ {
+ {
+ FieldElement{12015105, 2801261, 28198131, 10151021, 24818120, -4743133, -11194191, -5645734, 5150968, 7274186},
+ FieldElement{2831366, -12492146, 1478975, 6122054, 23825128, -12733586, 31097299, 6083058, 31021603, -9793610},
+ FieldElement{-2529932, -2229646, 445613, 10720828, -13849527, -11505937, -23507731, 16354465, 15067285, -14147707},
+ },
+ {
+ FieldElement{7840942, 14037873, -33364863, 15934016, -728213, -3642706, 21403988, 1057586, -19379462, -12403220},
+ FieldElement{915865, -16469274, 15608285, -8789130, -24357026, 6060030, -17371319, 8410997, -7220461, 16527025},
+ FieldElement{32922597, -556987, 20336074, -16184568, 10903705, -5384487, 16957574, 52992, 23834301, 6588044},
+ },
+ {
+ FieldElement{32752030, 11232950, 3381995, -8714866, 22652988, -10744103, 17159699, 16689107, -20314580, -1305992},
+ FieldElement{-4689649, 9166776, -25710296, -10847306, 11576752, 12733943, 7924251, -2752281, 1976123, -7249027},
+ FieldElement{21251222, 16309901, -2983015, -6783122, 30810597, 12967303, 156041, -3371252, 12331345, -8237197},
+ },
+ {
+ FieldElement{8651614, -4477032, -16085636, -4996994, 13002507, 2950805, 29054427, -5106970, 10008136, -4667901},
+ FieldElement{31486080, 15114593, -14261250, 12951354, 14369431, -7387845, 16347321, -13662089, 8684155, -10532952},
+ FieldElement{19443825, 11385320, 24468943, -9659068, -23919258, 2187569, -26263207, -6086921, 31316348, 14219878},
+ },
+ {
+ FieldElement{-28594490, 1193785, 32245219, 11392485, 31092169, 15722801, 27146014, 6992409, 29126555, 9207390},
+ FieldElement{32382935, 1110093, 18477781, 11028262, -27411763, -7548111, -4980517, 10843782, -7957600, -14435730},
+ FieldElement{2814918, 7836403, 27519878, -7868156, -20894015, -11553689, -21494559, 8550130, 28346258, 1994730},
+ },
+ {
+ FieldElement{-19578299, 8085545, -14000519, -3948622, 2785838, -16231307, -19516951, 7174894, 22628102, 8115180},
+ FieldElement{-30405132, 955511, -11133838, -15078069, -32447087, -13278079, -25651578, 3317160, -9943017, 930272},
+ FieldElement{-15303681, -6833769, 28856490, 1357446, 23421993, 1057177, 24091212, -1388970, -22765376, -10650715},
+ },
+ {
+ FieldElement{-22751231, -5303997, -12907607, -12768866, -15811511, -7797053, -14839018, -16554220, -1867018, 8398970},
+ FieldElement{-31969310, 2106403, -4736360, 1362501, 12813763, 16200670, 22981545, -6291273, 18009408, -15772772},
+ FieldElement{-17220923, -9545221, -27784654, 14166835, 29815394, 7444469, 29551787, -3727419, 19288549, 1325865},
+ },
+ {
+ FieldElement{15100157, -15835752, -23923978, -1005098, -26450192, 15509408, 12376730, -3479146, 33166107, -8042750},
+ FieldElement{20909231, 13023121, -9209752, 16251778, -5778415, -8094914, 12412151, 10018715, 2213263, -13878373},
+ FieldElement{32529814, -11074689, 30361439, -16689753, -9135940, 1513226, 22922121, 6382134, -5766928, 8371348},
+ },
+ },
+ {
+ {
+ FieldElement{9923462, 11271500, 12616794, 3544722, -29998368, -1721626, 12891687, -8193132, -26442943, 10486144},
+ FieldElement{-22597207, -7012665, 8587003, -8257861, 4084309, -12970062, 361726, 2610596, -23921530, -11455195},
+ FieldElement{5408411, -1136691, -4969122, 10561668, 24145918, 14240566, 31319731, -4235541, 19985175, -3436086},
+ },
+ {
+ FieldElement{-13994457, 16616821, 14549246, 3341099, 32155958, 13648976, -17577068, 8849297, 65030, 8370684},
+ FieldElement{-8320926, -12049626, 31204563, 5839400, -20627288, -1057277, -19442942, 6922164, 12743482, -9800518},
+ FieldElement{-2361371, 12678785, 28815050, 4759974, -23893047, 4884717, 23783145, 11038569, 18800704, 255233},
+ },
+ {
+ FieldElement{-5269658, -1773886, 13957886, 7990715, 23132995, 728773, 13393847, 9066957, 19258688, -14753793},
+ FieldElement{-2936654, -10827535, -10432089, 14516793, -3640786, 4372541, -31934921, 2209390, -1524053, 2055794},
+ FieldElement{580882, 16705327, 5468415, -2683018, -30926419, -14696000, -7203346, -8994389, -30021019, 7394435},
+ },
+ {
+ FieldElement{23838809, 1822728, -15738443, 15242727, 8318092, -3733104, -21672180, -3492205, -4821741, 14799921},
+ FieldElement{13345610, 9759151, 3371034, -16137791, 16353039, 8577942, 31129804, 13496856, -9056018, 7402518},
+ FieldElement{2286874, -4435931, -20042458, -2008336, -13696227, 5038122, 11006906, -15760352, 8205061, 1607563},
+ },
+ {
+ FieldElement{14414086, -8002132, 3331830, -3208217, 22249151, -5594188, 18364661, -2906958, 30019587, -9029278},
+ FieldElement{-27688051, 1585953, -10775053, 931069, -29120221, -11002319, -14410829, 12029093, 9944378, 8024},
+ FieldElement{4368715, -3709630, 29874200, -15022983, -20230386, -11410704, -16114594, -999085, -8142388, 5640030},
+ },
+ {
+ FieldElement{10299610, 13746483, 11661824, 16234854, 7630238, 5998374, 9809887, -16694564, 15219798, -14327783},
+ FieldElement{27425505, -5719081, 3055006, 10660664, 23458024, 595578, -15398605, -1173195, -18342183, 9742717},
+ FieldElement{6744077, 2427284, 26042789, 2720740, -847906, 1118974, 32324614, 7406442, 12420155, 1994844},
+ },
+ {
+ FieldElement{14012521, -5024720, -18384453, -9578469, -26485342, -3936439, -13033478, -10909803, 24319929, -6446333},
+ FieldElement{16412690, -4507367, 10772641, 15929391, -17068788, -4658621, 10555945, -10484049, -30102368, -4739048},
+ FieldElement{22397382, -7767684, -9293161, -12792868, 17166287, -9755136, -27333065, 6199366, 21880021, -12250760},
+ },
+ {
+ FieldElement{-4283307, 5368523, -31117018, 8163389, -30323063, 3209128, 16557151, 8890729, 8840445, 4957760},
+ FieldElement{-15447727, 709327, -6919446, -10870178, -29777922, 6522332, -21720181, 12130072, -14796503, 5005757},
+ FieldElement{-2114751, -14308128, 23019042, 15765735, -25269683, 6002752, 10183197, -13239326, -16395286, -2176112},
+ },
+ },
+ {
+ {
+ FieldElement{-19025756, 1632005, 13466291, -7995100, -23640451, 16573537, -32013908, -3057104, 22208662, 2000468},
+ FieldElement{3065073, -1412761, -25598674, -361432, -17683065, -5703415, -8164212, 11248527, -3691214, -7414184},
+ FieldElement{10379208, -6045554, 8877319, 1473647, -29291284, -12507580, 16690915, 2553332, -3132688, 16400289},
+ },
+ {
+ FieldElement{15716668, 1254266, -18472690, 7446274, -8448918, 6344164, -22097271, -7285580, 26894937, 9132066},
+ FieldElement{24158887, 12938817, 11085297, -8177598, -28063478, -4457083, -30576463, 64452, -6817084, -2692882},
+ FieldElement{13488534, 7794716, 22236231, 5989356, 25426474, -12578208, 2350710, -3418511, -4688006, 2364226},
+ },
+ {
+ FieldElement{16335052, 9132434, 25640582, 6678888, 1725628, 8517937, -11807024, -11697457, 15445875, -7798101},
+ FieldElement{29004207, -7867081, 28661402, -640412, -12794003, -7943086, 31863255, -4135540, -278050, -15759279},
+ FieldElement{-6122061, -14866665, -28614905, 14569919, -10857999, -3591829, 10343412, -6976290, -29828287, -10815811},
+ },
+ {
+ FieldElement{27081650, 3463984, 14099042, -4517604, 1616303, -6205604, 29542636, 15372179, 17293797, 960709},
+ FieldElement{20263915, 11434237, -5765435, 11236810, 13505955, -10857102, -16111345, 6493122, -19384511, 7639714},
+ FieldElement{-2830798, -14839232, 25403038, -8215196, -8317012, -16173699, 18006287, -16043750, 29994677, -15808121},
+ },
+ {
+ FieldElement{9769828, 5202651, -24157398, -13631392, -28051003, -11561624, -24613141, -13860782, -31184575, 709464},
+ FieldElement{12286395, 13076066, -21775189, -1176622, -25003198, 4057652, -32018128, -8890874, 16102007, 13205847},
+ FieldElement{13733362, 5599946, 10557076, 3195751, -5557991, 8536970, -25540170, 8525972, 10151379, 10394400},
+ },
+ {
+ FieldElement{4024660, -16137551, 22436262, 12276534, -9099015, -2686099, 19698229, 11743039, -33302334, 8934414},
+ FieldElement{-15879800, -4525240, -8580747, -2934061, 14634845, -698278, -9449077, 3137094, -11536886, 11721158},
+ FieldElement{17555939, -5013938, 8268606, 2331751, -22738815, 9761013, 9319229, 8835153, -9205489, -1280045},
+ },
+ {
+ FieldElement{-461409, -7830014, 20614118, 16688288, -7514766, -4807119, 22300304, 505429, 6108462, -6183415},
+ FieldElement{-5070281, 12367917, -30663534, 3234473, 32617080, -8422642, 29880583, -13483331, -26898490, -7867459},
+ FieldElement{-31975283, 5726539, 26934134, 10237677, -3173717, -605053, 24199304, 3795095, 7592688, -14992079},
+ },
+ {
+ FieldElement{21594432, -14964228, 17466408, -4077222, 32537084, 2739898, 6407723, 12018833, -28256052, 4298412},
+ FieldElement{-20650503, -11961496, -27236275, 570498, 3767144, -1717540, 13891942, -1569194, 13717174, 10805743},
+ FieldElement{-14676630, -15644296, 15287174, 11927123, 24177847, -8175568, -796431, 14860609, -26938930, -5863836},
+ },
+ },
+ {
+ {
+ FieldElement{12962541, 5311799, -10060768, 11658280, 18855286, -7954201, 13286263, -12808704, -4381056, 9882022},
+ FieldElement{18512079, 11319350, -20123124, 15090309, 18818594, 5271736, -22727904, 3666879, -23967430, -3299429},
+ FieldElement{-6789020, -3146043, 16192429, 13241070, 15898607, -14206114, -10084880, -6661110, -2403099, 5276065},
+ },
+ {
+ FieldElement{30169808, -5317648, 26306206, -11750859, 27814964, 7069267, 7152851, 3684982, 1449224, 13082861},
+ FieldElement{10342826, 3098505, 2119311, 193222, 25702612, 12233820, 23697382, 15056736, -21016438, -8202000},
+ FieldElement{-33150110, 3261608, 22745853, 7948688, 19370557, -15177665, -26171976, 6482814, -10300080, -11060101},
+ },
+ {
+ FieldElement{32869458, -5408545, 25609743, 15678670, -10687769, -15471071, 26112421, 2521008, -22664288, 6904815},
+ FieldElement{29506923, 4457497, 3377935, -9796444, -30510046, 12935080, 1561737, 3841096, -29003639, -6657642},
+ FieldElement{10340844, -6630377, -18656632, -2278430, 12621151, -13339055, 30878497, -11824370, -25584551, 5181966},
+ },
+ {
+ FieldElement{25940115, -12658025, 17324188, -10307374, -8671468, 15029094, 24396252, -16450922, -2322852, -12388574},
+ FieldElement{-21765684, 9916823, -1300409, 4079498, -1028346, 11909559, 1782390, 12641087, 20603771, -6561742},
+ FieldElement{-18882287, -11673380, 24849422, 11501709, 13161720, -4768874, 1925523, 11914390, 4662781, 7820689},
+ },
+ {
+ FieldElement{12241050, -425982, 8132691, 9393934, 32846760, -1599620, 29749456, 12172924, 16136752, 15264020},
+ FieldElement{-10349955, -14680563, -8211979, 2330220, -17662549, -14545780, 10658213, 6671822, 19012087, 3772772},
+ FieldElement{3753511, -3421066, 10617074, 2028709, 14841030, -6721664, 28718732, -15762884, 20527771, 12988982},
+ },
+ {
+ FieldElement{-14822485, -5797269, -3707987, 12689773, -898983, -10914866, -24183046, -10564943, 3299665, -12424953},
+ FieldElement{-16777703, -15253301, -9642417, 4978983, 3308785, 8755439, 6943197, 6461331, -25583147, 8991218},
+ FieldElement{-17226263, 1816362, -1673288, -6086439, 31783888, -8175991, -32948145, 7417950, -30242287, 1507265},
+ },
+ {
+ FieldElement{29692663, 6829891, -10498800, 4334896, 20945975, -11906496, -28887608, 8209391, 14606362, -10647073},
+ FieldElement{-3481570, 8707081, 32188102, 5672294, 22096700, 1711240, -33020695, 9761487, 4170404, -2085325},
+ FieldElement{-11587470, 14855945, -4127778, -1531857, -26649089, 15084046, 22186522, 16002000, -14276837, -8400798},
+ },
+ {
+ FieldElement{-4811456, 13761029, -31703877, -2483919, -3312471, 7869047, -7113572, -9620092, 13240845, 10965870},
+ FieldElement{-7742563, -8256762, -14768334, -13656260, -23232383, 12387166, 4498947, 14147411, 29514390, 4302863},
+ FieldElement{-13413405, -12407859, 20757302, -13801832, 14785143, 8976368, -5061276, -2144373, 17846988, -13971927},
+ },
+ },
+ {
+ {
+ FieldElement{-2244452, -754728, -4597030, -1066309, -6247172, 1455299, -21647728, -9214789, -5222701, 12650267},
+ FieldElement{-9906797, -16070310, 21134160, 12198166, -27064575, 708126, 387813, 13770293, -19134326, 10958663},
+ FieldElement{22470984, 12369526, 23446014, -5441109, -21520802, -9698723, -11772496, -11574455, -25083830, 4271862},
+ },
+ {
+ FieldElement{-25169565, -10053642, -19909332, 15361595, -5984358, 2159192, 75375, -4278529, -32526221, 8469673},
+ FieldElement{15854970, 4148314, -8893890, 7259002, 11666551, 13824734, -30531198, 2697372, 24154791, -9460943},
+ FieldElement{15446137, -15806644, 29759747, 14019369, 30811221, -9610191, -31582008, 12840104, 24913809, 9815020},
+ },
+ {
+ FieldElement{-4709286, -5614269, -31841498, -12288893, -14443537, 10799414, -9103676, 13438769, 18735128, 9466238},
+ FieldElement{11933045, 9281483, 5081055, -5183824, -2628162, -4905629, -7727821, -10896103, -22728655, 16199064},
+ FieldElement{14576810, 379472, -26786533, -8317236, -29426508, -10812974, -102766, 1876699, 30801119, 2164795},
+ },
+ {
+ FieldElement{15995086, 3199873, 13672555, 13712240, -19378835, -4647646, -13081610, -15496269, -13492807, 1268052},
+ FieldElement{-10290614, -3659039, -3286592, 10948818, 23037027, 3794475, -3470338, -12600221, -17055369, 3565904},
+ FieldElement{29210088, -9419337, -5919792, -4952785, 10834811, -13327726, -16512102, -10820713, -27162222, -14030531},
+ },
+ {
+ FieldElement{-13161890, 15508588, 16663704, -8156150, -28349942, 9019123, -29183421, -3769423, 2244111, -14001979},
+ FieldElement{-5152875, -3800936, -9306475, -6071583, 16243069, 14684434, -25673088, -16180800, 13491506, 4641841},
+ FieldElement{10813417, 643330, -19188515, -728916, 30292062, -16600078, 27548447, -7721242, 14476989, -12767431},
+ },
+ {
+ FieldElement{10292079, 9984945, 6481436, 8279905, -7251514, 7032743, 27282937, -1644259, -27912810, 12651324},
+ FieldElement{-31185513, -813383, 22271204, 11835308, 10201545, 15351028, 17099662, 3988035, 21721536, -3148940},
+ FieldElement{10202177, -6545839, -31373232, -9574638, -32150642, -8119683, -12906320, 3852694, 13216206, 14842320},
+ },
+ {
+ FieldElement{-15815640, -10601066, -6538952, -7258995, -6984659, -6581778, -31500847, 13765824, -27434397, 9900184},
+ FieldElement{14465505, -13833331, -32133984, -14738873, -27443187, 12990492, 33046193, 15796406, -7051866, -8040114},
+ FieldElement{30924417, -8279620, 6359016, -12816335, 16508377, 9071735, -25488601, 15413635, 9524356, -7018878},
+ },
+ {
+ FieldElement{12274201, -13175547, 32627641, -1785326, 6736625, 13267305, 5237659, -5109483, 15663516, 4035784},
+ FieldElement{-2951309, 8903985, 17349946, 601635, -16432815, -4612556, -13732739, -15889334, -22258478, 4659091},
+ FieldElement{-16916263, -4952973, -30393711, -15158821, 20774812, 15897498, 5736189, 15026997, -2178256, -13455585},
+ },
+ },
+ {
+ {
+ FieldElement{-8858980, -2219056, 28571666, -10155518, -474467, -10105698, -3801496, 278095, 23440562, -290208},
+ FieldElement{10226241, -5928702, 15139956, 120818, -14867693, 5218603, 32937275, 11551483, -16571960, -7442864},
+ FieldElement{17932739, -12437276, -24039557, 10749060, 11316803, 7535897, 22503767, 5561594, -3646624, 3898661},
+ },
+ {
+ FieldElement{7749907, -969567, -16339731, -16464, -25018111, 15122143, -1573531, 7152530, 21831162, 1245233},
+ FieldElement{26958459, -14658026, 4314586, 8346991, -5677764, 11960072, -32589295, -620035, -30402091, -16716212},
+ FieldElement{-12165896, 9166947, 33491384, 13673479, 29787085, 13096535, 6280834, 14587357, -22338025, 13987525},
+ },
+ {
+ FieldElement{-24349909, 7778775, 21116000, 15572597, -4833266, -5357778, -4300898, -5124639, -7469781, -2858068},
+ FieldElement{9681908, -6737123, -31951644, 13591838, -6883821, 386950, 31622781, 6439245, -14581012, 4091397},
+ FieldElement{-8426427, 1470727, -28109679, -1596990, 3978627, -5123623, -19622683, 12092163, 29077877, -14741988},
+ },
+ {
+ FieldElement{5269168, -6859726, -13230211, -8020715, 25932563, 1763552, -5606110, -5505881, -20017847, 2357889},
+ FieldElement{32264008, -15407652, -5387735, -1160093, -2091322, -3946900, 23104804, -12869908, 5727338, 189038},
+ FieldElement{14609123, -8954470, -6000566, -16622781, -14577387, -7743898, -26745169, 10942115, -25888931, -14884697},
+ },
+ {
+ FieldElement{20513500, 5557931, -15604613, 7829531, 26413943, -2019404, -21378968, 7471781, 13913677, -5137875},
+ FieldElement{-25574376, 11967826, 29233242, 12948236, -6754465, 4713227, -8940970, 14059180, 12878652, 8511905},
+ FieldElement{-25656801, 3393631, -2955415, -7075526, -2250709, 9366908, -30223418, 6812974, 5568676, -3127656},
+ },
+ {
+ FieldElement{11630004, 12144454, 2116339, 13606037, 27378885, 15676917, -17408753, -13504373, -14395196, 8070818},
+ FieldElement{27117696, -10007378, -31282771, -5570088, 1127282, 12772488, -29845906, 10483306, -11552749, -1028714},
+ FieldElement{10637467, -5688064, 5674781, 1072708, -26343588, -6982302, -1683975, 9177853, -27493162, 15431203},
+ },
+ {
+ FieldElement{20525145, 10892566, -12742472, 12779443, -29493034, 16150075, -28240519, 14943142, -15056790, -7935931},
+ FieldElement{-30024462, 5626926, -551567, -9981087, 753598, 11981191, 25244767, -3239766, -3356550, 9594024},
+ FieldElement{-23752644, 2636870, -5163910, -10103818, 585134, 7877383, 11345683, -6492290, 13352335, -10977084},
+ },
+ {
+ FieldElement{-1931799, -5407458, 3304649, -12884869, 17015806, -4877091, -29783850, -7752482, -13215537, -319204},
+ FieldElement{20239939, 6607058, 6203985, 3483793, -18386976, -779229, -20723742, 15077870, -22750759, 14523817},
+ FieldElement{27406042, -6041657, 27423596, -4497394, 4996214, 10002360, -28842031, -4545494, -30172742, -4805667},
+ },
+ },
+ {
+ {
+ FieldElement{11374242, 12660715, 17861383, -12540833, 10935568, 1099227, -13886076, -9091740, -27727044, 11358504},
+ FieldElement{-12730809, 10311867, 1510375, 10778093, -2119455, -9145702, 32676003, 11149336, -26123651, 4985768},
+ FieldElement{-19096303, 341147, -6197485, -239033, 15756973, -8796662, -983043, 13794114, -19414307, -15621255},
+ },
+ {
+ FieldElement{6490081, 11940286, 25495923, -7726360, 8668373, -8751316, 3367603, 6970005, -1691065, -9004790},
+ FieldElement{1656497, 13457317, 15370807, 6364910, 13605745, 8362338, -19174622, -5475723, -16796596, -5031438},
+ FieldElement{-22273315, -13524424, -64685, -4334223, -18605636, -10921968, -20571065, -7007978, -99853, -10237333},
+ },
+ {
+ FieldElement{17747465, 10039260, 19368299, -4050591, -20630635, -16041286, 31992683, -15857976, -29260363, -5511971},
+ FieldElement{31932027, -4986141, -19612382, 16366580, 22023614, 88450, 11371999, -3744247, 4882242, -10626905},
+ FieldElement{29796507, 37186, 19818052, 10115756, -11829032, 3352736, 18551198, 3272828, -5190932, -4162409},
+ },
+ {
+ FieldElement{12501286, 4044383, -8612957, -13392385, -32430052, 5136599, -19230378, -3529697, 330070, -3659409},
+ FieldElement{6384877, 2899513, 17807477, 7663917, -2358888, 12363165, 25366522, -8573892, -271295, 12071499},
+ FieldElement{-8365515, -4042521, 25133448, -4517355, -6211027, 2265927, -32769618, 1936675, -5159697, 3829363},
+ },
+ {
+ FieldElement{28425966, -5835433, -577090, -4697198, -14217555, 6870930, 7921550, -6567787, 26333140, 14267664},
+ FieldElement{-11067219, 11871231, 27385719, -10559544, -4585914, -11189312, 10004786, -8709488, -21761224, 8930324},
+ FieldElement{-21197785, -16396035, 25654216, -1725397, 12282012, 11008919, 1541940, 4757911, -26491501, -16408940},
+ },
+ {
+ FieldElement{13537262, -7759490, -20604840, 10961927, -5922820, -13218065, -13156584, 6217254, -15943699, 13814990},
+ FieldElement{-17422573, 15157790, 18705543, 29619, 24409717, -260476, 27361681, 9257833, -1956526, -1776914},
+ FieldElement{-25045300, -10191966, 15366585, 15166509, -13105086, 8423556, -29171540, 12361135, -18685978, 4578290},
+ },
+ {
+ FieldElement{24579768, 3711570, 1342322, -11180126, -27005135, 14124956, -22544529, 14074919, 21964432, 8235257},
+ FieldElement{-6528613, -2411497, 9442966, -5925588, 12025640, -1487420, -2981514, -1669206, 13006806, 2355433},
+ FieldElement{-16304899, -13605259, -6632427, -5142349, 16974359, -10911083, 27202044, 1719366, 1141648, -12796236},
+ },
+ {
+ FieldElement{-12863944, -13219986, -8318266, -11018091, -6810145, -4843894, 13475066, -3133972, 32674895, 13715045},
+ FieldElement{11423335, -5468059, 32344216, 8962751, 24989809, 9241752, -13265253, 16086212, -28740881, -15642093},
+ FieldElement{-1409668, 12530728, -6368726, 10847387, 19531186, -14132160, -11709148, 7791794, -27245943, 4383347},
+ },
+ },
+ {
+ {
+ FieldElement{-28970898, 5271447, -1266009, -9736989, -12455236, 16732599, -4862407, -4906449, 27193557, 6245191},
+ FieldElement{-15193956, 5362278, -1783893, 2695834, 4960227, 12840725, 23061898, 3260492, 22510453, 8577507},
+ FieldElement{-12632451, 11257346, -32692994, 13548177, -721004, 10879011, 31168030, 13952092, -29571492, -3635906},
+ },
+ {
+ FieldElement{3877321, -9572739, 32416692, 5405324, -11004407, -13656635, 3759769, 11935320, 5611860, 8164018},
+ FieldElement{-16275802, 14667797, 15906460, 12155291, -22111149, -9039718, 32003002, -8832289, 5773085, -8422109},
+ FieldElement{-23788118, -8254300, 1950875, 8937633, 18686727, 16459170, -905725, 12376320, 31632953, 190926},
+ },
+ {
+ FieldElement{-24593607, -16138885, -8423991, 13378746, 14162407, 6901328, -8288749, 4508564, -25341555, -3627528},
+ FieldElement{8884438, -5884009, 6023974, 10104341, -6881569, -4941533, 18722941, -14786005, -1672488, 827625},
+ FieldElement{-32720583, -16289296, -32503547, 7101210, 13354605, 2659080, -1800575, -14108036, -24878478, 1541286},
+ },
+ {
+ FieldElement{2901347, -1117687, 3880376, -10059388, -17620940, -3612781, -21802117, -3567481, 20456845, -1885033},
+ FieldElement{27019610, 12299467, -13658288, -1603234, -12861660, -4861471, -19540150, -5016058, 29439641, 15138866},
+ FieldElement{21536104, -6626420, -32447818, -10690208, -22408077, 5175814, -5420040, -16361163, 7779328, 109896},
+ },
+ {
+ FieldElement{30279744, 14648750, -8044871, 6425558, 13639621, -743509, 28698390, 12180118, 23177719, -554075},
+ FieldElement{26572847, 3405927, -31701700, 12890905, -19265668, 5335866, -6493768, 2378492, 4439158, -13279347},
+ FieldElement{-22716706, 3489070, -9225266, -332753, 18875722, -1140095, 14819434, -12731527, -17717757, -5461437},
+ },
+ {
+ FieldElement{-5056483, 16566551, 15953661, 3767752, -10436499, 15627060, -820954, 2177225, 8550082, -15114165},
+ FieldElement{-18473302, 16596775, -381660, 15663611, 22860960, 15585581, -27844109, -3582739, -23260460, -8428588},
+ FieldElement{-32480551, 15707275, -8205912, -5652081, 29464558, 2713815, -22725137, 15860482, -21902570, 1494193},
+ },
+ {
+ FieldElement{-19562091, -14087393, -25583872, -9299552, 13127842, 759709, 21923482, 16529112, 8742704, 12967017},
+ FieldElement{-28464899, 1553205, 32536856, -10473729, -24691605, -406174, -8914625, -2933896, -29903758, 15553883},
+ FieldElement{21877909, 3230008, 9881174, 10539357, -4797115, 2841332, 11543572, 14513274, 19375923, -12647961},
+ },
+ {
+ FieldElement{8832269, -14495485, 13253511, 5137575, 5037871, 4078777, 24880818, -6222716, 2862653, 9455043},
+ FieldElement{29306751, 5123106, 20245049, -14149889, 9592566, 8447059, -2077124, -2990080, 15511449, 4789663},
+ FieldElement{-20679756, 7004547, 8824831, -9434977, -4045704, -3750736, -5754762, 108893, 23513200, 16652362},
+ },
+ },
+ {
+ {
+ FieldElement{-33256173, 4144782, -4476029, -6579123, 10770039, -7155542, -6650416, -12936300, -18319198, 10212860},
+ FieldElement{2756081, 8598110, 7383731, -6859892, 22312759, -1105012, 21179801, 2600940, -9988298, -12506466},
+ FieldElement{-24645692, 13317462, -30449259, -15653928, 21365574, -10869657, 11344424, 864440, -2499677, -16710063},
+ },
+ {
+ FieldElement{-26432803, 6148329, -17184412, -14474154, 18782929, -275997, -22561534, 211300, 2719757, 4940997},
+ FieldElement{-1323882, 3911313, -6948744, 14759765, -30027150, 7851207, 21690126, 8518463, 26699843, 5276295},
+ FieldElement{-13149873, -6429067, 9396249, 365013, 24703301, -10488939, 1321586, 149635, -15452774, 7159369},
+ },
+ {
+ FieldElement{9987780, -3404759, 17507962, 9505530, 9731535, -2165514, 22356009, 8312176, 22477218, -8403385},
+ FieldElement{18155857, -16504990, 19744716, 9006923, 15154154, -10538976, 24256460, -4864995, -22548173, 9334109},
+ FieldElement{2986088, -4911893, 10776628, -3473844, 10620590, -7083203, -21413845, 14253545, -22587149, 536906},
+ },
+ {
+ FieldElement{4377756, 8115836, 24567078, 15495314, 11625074, 13064599, 7390551, 10589625, 10838060, -15420424},
+ FieldElement{-19342404, 867880, 9277171, -3218459, -14431572, -1986443, 19295826, -15796950, 6378260, 699185},
+ FieldElement{7895026, 4057113, -7081772, -13077756, -17886831, -323126, -716039, 15693155, -5045064, -13373962},
+ },
+ {
+ FieldElement{-7737563, -5869402, -14566319, -7406919, 11385654, 13201616, 31730678, -10962840, -3918636, -9669325},
+ FieldElement{10188286, -15770834, -7336361, 13427543, 22223443, 14896287, 30743455, 7116568, -21786507, 5427593},
+ FieldElement{696102, 13206899, 27047647, -10632082, 15285305, -9853179, 10798490, -4578720, 19236243, 12477404},
+ },
+ {
+ FieldElement{-11229439, 11243796, -17054270, -8040865, -788228, -8167967, -3897669, 11180504, -23169516, 7733644},
+ FieldElement{17800790, -14036179, -27000429, -11766671, 23887827, 3149671, 23466177, -10538171, 10322027, 15313801},
+ FieldElement{26246234, 11968874, 32263343, -5468728, 6830755, -13323031, -15794704, -101982, -24449242, 10890804},
+ },
+ {
+ FieldElement{-31365647, 10271363, -12660625, -6267268, 16690207, -13062544, -14982212, 16484931, 25180797, -5334884},
+ FieldElement{-586574, 10376444, -32586414, -11286356, 19801893, 10997610, 2276632, 9482883, 316878, 13820577},
+ FieldElement{-9882808, -4510367, -2115506, 16457136, -11100081, 11674996, 30756178, -7515054, 30696930, -3712849},
+ },
+ {
+ FieldElement{32988917, -9603412, 12499366, 7910787, -10617257, -11931514, -7342816, -9985397, -32349517, 7392473},
+ FieldElement{-8855661, 15927861, 9866406, -3649411, -2396914, -16655781, -30409476, -9134995, 25112947, -2926644},
+ FieldElement{-2504044, -436966, 25621774, -5678772, 15085042, -5479877, -24884878, -13526194, 5537438, -13914319},
+ },
+ },
+ {
+ {
+ FieldElement{-11225584, 2320285, -9584280, 10149187, -33444663, 5808648, -14876251, -1729667, 31234590, 6090599},
+ FieldElement{-9633316, 116426, 26083934, 2897444, -6364437, -2688086, 609721, 15878753, -6970405, -9034768},
+ FieldElement{-27757857, 247744, -15194774, -9002551, 23288161, -10011936, -23869595, 6503646, 20650474, 1804084},
+ },
+ {
+ FieldElement{-27589786, 15456424, 8972517, 8469608, 15640622, 4439847, 3121995, -10329713, 27842616, -202328},
+ FieldElement{-15306973, 2839644, 22530074, 10026331, 4602058, 5048462, 28248656, 5031932, -11375082, 12714369},
+ FieldElement{20807691, -7270825, 29286141, 11421711, -27876523, -13868230, -21227475, 1035546, -19733229, 12796920},
+ },
+ {
+ FieldElement{12076899, -14301286, -8785001, -11848922, -25012791, 16400684, -17591495, -12899438, 3480665, -15182815},
+ FieldElement{-32361549, 5457597, 28548107, 7833186, 7303070, -11953545, -24363064, -15921875, -33374054, 2771025},
+ FieldElement{-21389266, 421932, 26597266, 6860826, 22486084, -6737172, -17137485, -4210226, -24552282, 15673397},
+ },
+ {
+ FieldElement{-20184622, 2338216, 19788685, -9620956, -4001265, -8740893, -20271184, 4733254, 3727144, -12934448},
+ FieldElement{6120119, 814863, -11794402, -622716, 6812205, -15747771, 2019594, 7975683, 31123697, -10958981},
+ FieldElement{30069250, -11435332, 30434654, 2958439, 18399564, -976289, 12296869, 9204260, -16432438, 9648165},
+ },
+ {
+ FieldElement{32705432, -1550977, 30705658, 7451065, -11805606, 9631813, 3305266, 5248604, -26008332, -11377501},
+ FieldElement{17219865, 2375039, -31570947, -5575615, -19459679, 9219903, 294711, 15298639, 2662509, -16297073},
+ FieldElement{-1172927, -7558695, -4366770, -4287744, -21346413, -8434326, 32087529, -1222777, 32247248, -14389861},
+ },
+ {
+ FieldElement{14312628, 1221556, 17395390, -8700143, -4945741, -8684635, -28197744, -9637817, -16027623, -13378845},
+ FieldElement{-1428825, -9678990, -9235681, 6549687, -7383069, -468664, 23046502, 9803137, 17597934, 2346211},
+ FieldElement{18510800, 15337574, 26171504, 981392, -22241552, 7827556, -23491134, -11323352, 3059833, -11782870},
+ },
+ {
+ FieldElement{10141598, 6082907, 17829293, -1947643, 9830092, 13613136, -25556636, -5544586, -33502212, 3592096},
+ FieldElement{33114168, -15889352, -26525686, -13343397, 33076705, 8716171, 1151462, 1521897, -982665, -6837803},
+ FieldElement{-32939165, -4255815, 23947181, -324178, -33072974, -12305637, -16637686, 3891704, 26353178, 693168},
+ },
+ {
+ FieldElement{30374239, 1595580, -16884039, 13186931, 4600344, 406904, 9585294, -400668, 31375464, 14369965},
+ FieldElement{-14370654, -7772529, 1510301, 6434173, -18784789, -6262728, 32732230, -13108839, 17901441, 16011505},
+ FieldElement{18171223, -11934626, -12500402, 15197122, -11038147, -15230035, -19172240, -16046376, 8764035, 12309598},
+ },
+ },
+ {
+ {
+ FieldElement{5975908, -5243188, -19459362, -9681747, -11541277, 14015782, -23665757, 1228319, 17544096, -10593782},
+ FieldElement{5811932, -1715293, 3442887, -2269310, -18367348, -8359541, -18044043, -15410127, -5565381, 12348900},
+ FieldElement{-31399660, 11407555, 25755363, 6891399, -3256938, 14872274, -24849353, 8141295, -10632534, -585479},
+ },
+ {
+ FieldElement{-12675304, 694026, -5076145, 13300344, 14015258, -14451394, -9698672, -11329050, 30944593, 1130208},
+ FieldElement{8247766, -6710942, -26562381, -7709309, -14401939, -14648910, 4652152, 2488540, 23550156, -271232},
+ FieldElement{17294316, -3788438, 7026748, 15626851, 22990044, 113481, 2267737, -5908146, -408818, -137719},
+ },
+ {
+ FieldElement{16091085, -16253926, 18599252, 7340678, 2137637, -1221657, -3364161, 14550936, 3260525, -7166271},
+ FieldElement{-4910104, -13332887, 18550887, 10864893, -16459325, -7291596, -23028869, -13204905, -12748722, 2701326},
+ FieldElement{-8574695, 16099415, 4629974, -16340524, -20786213, -6005432, -10018363, 9276971, 11329923, 1862132},
+ },
+ {
+ FieldElement{14763076, -15903608, -30918270, 3689867, 3511892, 10313526, -21951088, 12219231, -9037963, -940300},
+ FieldElement{8894987, -3446094, 6150753, 3013931, 301220, 15693451, -31981216, -2909717, -15438168, 11595570},
+ FieldElement{15214962, 3537601, -26238722, -14058872, 4418657, -15230761, 13947276, 10730794, -13489462, -4363670},
+ },
+ {
+ FieldElement{-2538306, 7682793, 32759013, 263109, -29984731, -7955452, -22332124, -10188635, 977108, 699994},
+ FieldElement{-12466472, 4195084, -9211532, 550904, -15565337, 12917920, 19118110, -439841, -30534533, -14337913},
+ FieldElement{31788461, -14507657, 4799989, 7372237, 8808585, -14747943, 9408237, -10051775, 12493932, -5409317},
+ },
+ {
+ FieldElement{-25680606, 5260744, -19235809, -6284470, -3695942, 16566087, 27218280, 2607121, 29375955, 6024730},
+ FieldElement{842132, -2794693, -4763381, -8722815, 26332018, -12405641, 11831880, 6985184, -9940361, 2854096},
+ FieldElement{-4847262, -7969331, 2516242, -5847713, 9695691, -7221186, 16512645, 960770, 12121869, 16648078},
+ },
+ {
+ FieldElement{-15218652, 14667096, -13336229, 2013717, 30598287, -464137, -31504922, -7882064, 20237806, 2838411},
+ FieldElement{-19288047, 4453152, 15298546, -16178388, 22115043, -15972604, 12544294, -13470457, 1068881, -12499905},
+ FieldElement{-9558883, -16518835, 33238498, 13506958, 30505848, -1114596, -8486907, -2630053, 12521378, 4845654},
+ },
+ {
+ FieldElement{-28198521, 10744108, -2958380, 10199664, 7759311, -13088600, 3409348, -873400, -6482306, -12885870},
+ FieldElement{-23561822, 6230156, -20382013, 10655314, -24040585, -11621172, 10477734, -1240216, -3113227, 13974498},
+ FieldElement{12966261, 15550616, -32038948, -1615346, 21025980, -629444, 5642325, 7188737, 18895762, 12629579},
+ },
+ },
+ {
+ {
+ FieldElement{14741879, -14946887, 22177208, -11721237, 1279741, 8058600, 11758140, 789443, 32195181, 3895677},
+ FieldElement{10758205, 15755439, -4509950, 9243698, -4879422, 6879879, -2204575, -3566119, -8982069, 4429647},
+ FieldElement{-2453894, 15725973, -20436342, -10410672, -5803908, -11040220, -7135870, -11642895, 18047436, -15281743},
+ },
+ {
+ FieldElement{-25173001, -11307165, 29759956, 11776784, -22262383, -15820455, 10993114, -12850837, -17620701, -9408468},
+ FieldElement{21987233, 700364, -24505048, 14972008, -7774265, -5718395, 32155026, 2581431, -29958985, 8773375},
+ FieldElement{-25568350, 454463, -13211935, 16126715, 25240068, 8594567, 20656846, 12017935, -7874389, -13920155},
+ },
+ {
+ FieldElement{6028182, 6263078, -31011806, -11301710, -818919, 2461772, -31841174, -5468042, -1721788, -2776725},
+ FieldElement{-12278994, 16624277, 987579, -5922598, 32908203, 1248608, 7719845, -4166698, 28408820, 6816612},
+ FieldElement{-10358094, -8237829, 19549651, -12169222, 22082623, 16147817, 20613181, 13982702, -10339570, 5067943},
+ },
+ {
+ FieldElement{-30505967, -3821767, 12074681, 13582412, -19877972, 2443951, -19719286, 12746132, 5331210, -10105944},
+ FieldElement{30528811, 3601899, -1957090, 4619785, -27361822, -15436388, 24180793, -12570394, 27679908, -1648928},
+ FieldElement{9402404, -13957065, 32834043, 10838634, -26580150, -13237195, 26653274, -8685565, 22611444, -12715406},
+ },
+ {
+ FieldElement{22190590, 1118029, 22736441, 15130463, -30460692, -5991321, 19189625, -4648942, 4854859, 6622139},
+ FieldElement{-8310738, -2953450, -8262579, -3388049, -10401731, -271929, 13424426, -3567227, 26404409, 13001963},
+ FieldElement{-31241838, -15415700, -2994250, 8939346, 11562230, -12840670, -26064365, -11621720, -15405155, 11020693},
+ },
+ {
+ FieldElement{1866042, -7949489, -7898649, -10301010, 12483315, 13477547, 3175636, -12424163, 28761762, 1406734},
+ FieldElement{-448555, -1777666, 13018551, 3194501, -9580420, -11161737, 24760585, -4347088, 25577411, -13378680},
+ FieldElement{-24290378, 4759345, -690653, -1852816, 2066747, 10693769, -29595790, 9884936, -9368926, 4745410},
+ },
+ {
+ FieldElement{-9141284, 6049714, -19531061, -4341411, -31260798, 9944276, -15462008, -11311852, 10931924, -11931931},
+ FieldElement{-16561513, 14112680, -8012645, 4817318, -8040464, -11414606, -22853429, 10856641, -20470770, 13434654},
+ FieldElement{22759489, -10073434, -16766264, -1871422, 13637442, -10168091, 1765144, -12654326, 28445307, -5364710},
+ },
+ {
+ FieldElement{29875063, 12493613, 2795536, -3786330, 1710620, 15181182, -10195717, -8788675, 9074234, 1167180},
+ FieldElement{-26205683, 11014233, -9842651, -2635485, -26908120, 7532294, -18716888, -9535498, 3843903, 9367684},
+ FieldElement{-10969595, -6403711, 9591134, 9582310, 11349256, 108879, 16235123, 8601684, -139197, 4242895},
+ },
+ },
+ {
+ {
+ FieldElement{22092954, -13191123, -2042793, -11968512, 32186753, -11517388, -6574341, 2470660, -27417366, 16625501},
+ FieldElement{-11057722, 3042016, 13770083, -9257922, 584236, -544855, -7770857, 2602725, -27351616, 14247413},
+ FieldElement{6314175, -10264892, -32772502, 15957557, -10157730, 168750, -8618807, 14290061, 27108877, -1180880},
+ },
+ {
+ FieldElement{-8586597, -7170966, 13241782, 10960156, -32991015, -13794596, 33547976, -11058889, -27148451, 981874},
+ FieldElement{22833440, 9293594, -32649448, -13618667, -9136966, 14756819, -22928859, -13970780, -10479804, -16197962},
+ FieldElement{-7768587, 3326786, -28111797, 10783824, 19178761, 14905060, 22680049, 13906969, -15933690, 3797899},
+ },
+ {
+ FieldElement{21721356, -4212746, -12206123, 9310182, -3882239, -13653110, 23740224, -2709232, 20491983, -8042152},
+ FieldElement{9209270, -15135055, -13256557, -6167798, -731016, 15289673, 25947805, 15286587, 30997318, -6703063},
+ FieldElement{7392032, 16618386, 23946583, -8039892, -13265164, -1533858, -14197445, -2321576, 17649998, -250080},
+ },
+ {
+ FieldElement{-9301088, -14193827, 30609526, -3049543, -25175069, -1283752, -15241566, -9525724, -2233253, 7662146},
+ FieldElement{-17558673, 1763594, -33114336, 15908610, -30040870, -12174295, 7335080, -8472199, -3174674, 3440183},
+ FieldElement{-19889700, -5977008, -24111293, -9688870, 10799743, -16571957, 40450, -4431835, 4862400, 1133},
+ },
+ {
+ FieldElement{-32856209, -7873957, -5422389, 14860950, -16319031, 7956142, 7258061, 311861, -30594991, -7379421},
+ FieldElement{-3773428, -1565936, 28985340, 7499440, 24445838, 9325937, 29727763, 16527196, 18278453, 15405622},
+ FieldElement{-4381906, 8508652, -19898366, -3674424, -5984453, 15149970, -13313598, 843523, -21875062, 13626197},
+ },
+ {
+ FieldElement{2281448, -13487055, -10915418, -2609910, 1879358, 16164207, -10783882, 3953792, 13340839, 15928663},
+ FieldElement{31727126, -7179855, -18437503, -8283652, 2875793, -16390330, -25269894, -7014826, -23452306, 5964753},
+ FieldElement{4100420, -5959452, -17179337, 6017714, -18705837, 12227141, -26684835, 11344144, 2538215, -7570755},
+ },
+ {
+ FieldElement{-9433605, 6123113, 11159803, -2156608, 30016280, 14966241, -20474983, 1485421, -629256, -15958862},
+ FieldElement{-26804558, 4260919, 11851389, 9658551, -32017107, 16367492, -20205425, -13191288, 11659922, -11115118},
+ FieldElement{26180396, 10015009, -30844224, -8581293, 5418197, 9480663, 2231568, -10170080, 33100372, -1306171},
+ },
+ {
+ FieldElement{15121113, -5201871, -10389905, 15427821, -27509937, -15992507, 21670947, 4486675, -5931810, -14466380},
+ FieldElement{16166486, -9483733, -11104130, 6023908, -31926798, -1364923, 2340060, -16254968, -10735770, -10039824},
+ FieldElement{28042865, -3557089, -12126526, 12259706, -3717498, -6945899, 6766453, -8689599, 18036436, 5803270},
+ },
+ },
+ {
+ {
+ FieldElement{-817581, 6763912, 11803561, 1585585, 10958447, -2671165, 23855391, 4598332, -6159431, -14117438},
+ FieldElement{-31031306, -14256194, 17332029, -2383520, 31312682, -5967183, 696309, 50292, -20095739, 11763584},
+ FieldElement{-594563, -2514283, -32234153, 12643980, 12650761, 14811489, 665117, -12613632, -19773211, -10713562},
+ },
+ {
+ FieldElement{30464590, -11262872, -4127476, -12734478, 19835327, -7105613, -24396175, 2075773, -17020157, 992471},
+ FieldElement{18357185, -6994433, 7766382, 16342475, -29324918, 411174, 14578841, 8080033, -11574335, -10601610},
+ FieldElement{19598397, 10334610, 12555054, 2555664, 18821899, -10339780, 21873263, 16014234, 26224780, 16452269},
+ },
+ {
+ FieldElement{-30223925, 5145196, 5944548, 16385966, 3976735, 2009897, -11377804, -7618186, -20533829, 3698650},
+ FieldElement{14187449, 3448569, -10636236, -10810935, -22663880, -3433596, 7268410, -10890444, 27394301, 12015369},
+ FieldElement{19695761, 16087646, 28032085, 12999827, 6817792, 11427614, 20244189, -1312777, -13259127, -3402461},
+ },
+ {
+ FieldElement{30860103, 12735208, -1888245, -4699734, -16974906, 2256940, -8166013, 12298312, -8550524, -10393462},
+ FieldElement{-5719826, -11245325, -1910649, 15569035, 26642876, -7587760, -5789354, -15118654, -4976164, 12651793},
+ FieldElement{-2848395, 9953421, 11531313, -5282879, 26895123, -12697089, -13118820, -16517902, 9768698, -2533218},
+ },
+ {
+ FieldElement{-24719459, 1894651, -287698, -4704085, 15348719, -8156530, 32767513, 12765450, 4940095, 10678226},
+ FieldElement{18860224, 15980149, -18987240, -1562570, -26233012, -11071856, -7843882, 13944024, -24372348, 16582019},
+ FieldElement{-15504260, 4970268, -29893044, 4175593, -20993212, -2199756, -11704054, 15444560, -11003761, 7989037},
+ },
+ {
+ FieldElement{31490452, 5568061, -2412803, 2182383, -32336847, 4531686, -32078269, 6200206, -19686113, -14800171},
+ FieldElement{-17308668, -15879940, -31522777, -2831, -32887382, 16375549, 8680158, -16371713, 28550068, -6857132},
+ FieldElement{-28126887, -5688091, 16837845, -1820458, -6850681, 12700016, -30039981, 4364038, 1155602, 5988841},
+ },
+ {
+ FieldElement{21890435, -13272907, -12624011, 12154349, -7831873, 15300496, 23148983, -4470481, 24618407, 8283181},
+ FieldElement{-33136107, -10512751, 9975416, 6841041, -31559793, 16356536, 3070187, -7025928, 1466169, 10740210},
+ FieldElement{-1509399, -15488185, -13503385, -10655916, 32799044, 909394, -13938903, -5779719, -32164649, -15327040},
+ },
+ {
+ FieldElement{3960823, -14267803, -28026090, -15918051, -19404858, 13146868, 15567327, 951507, -3260321, -573935},
+ FieldElement{24740841, 5052253, -30094131, 8961361, 25877428, 6165135, -24368180, 14397372, -7380369, -6144105},
+ FieldElement{-28888365, 3510803, -28103278, -1158478, -11238128, -10631454, -15441463, -14453128, -1625486, -6494814},
+ },
+ },
+ {
+ {
+ FieldElement{793299, -9230478, 8836302, -6235707, -27360908, -2369593, 33152843, -4885251, -9906200, -621852},
+ FieldElement{5666233, 525582, 20782575, -8038419, -24538499, 14657740, 16099374, 1468826, -6171428, -15186581},
+ FieldElement{-4859255, -3779343, -2917758, -6748019, 7778750, 11688288, -30404353, -9871238, -1558923, -9863646},
+ },
+ {
+ FieldElement{10896332, -7719704, 824275, 472601, -19460308, 3009587, 25248958, 14783338, -30581476, -15757844},
+ FieldElement{10566929, 12612572, -31944212, 11118703, -12633376, 12362879, 21752402, 8822496, 24003793, 14264025},
+ FieldElement{27713862, -7355973, -11008240, 9227530, 27050101, 2504721, 23886875, -13117525, 13958495, -5732453},
+ },
+ {
+ FieldElement{-23481610, 4867226, -27247128, 3900521, 29838369, -8212291, -31889399, -10041781, 7340521, -15410068},
+ FieldElement{4646514, -8011124, -22766023, -11532654, 23184553, 8566613, 31366726, -1381061, -15066784, -10375192},
+ FieldElement{-17270517, 12723032, -16993061, 14878794, 21619651, -6197576, 27584817, 3093888, -8843694, 3849921},
+ },
+ {
+ FieldElement{-9064912, 2103172, 25561640, -15125738, -5239824, 9582958, 32477045, -9017955, 5002294, -15550259},
+ FieldElement{-12057553, -11177906, 21115585, -13365155, 8808712, -12030708, 16489530, 13378448, -25845716, 12741426},
+ FieldElement{-5946367, 10645103, -30911586, 15390284, -3286982, -7118677, 24306472, 15852464, 28834118, -7646072},
+ },
+ {
+ FieldElement{-17335748, -9107057, -24531279, 9434953, -8472084, -583362, -13090771, 455841, 20461858, 5491305},
+ FieldElement{13669248, -16095482, -12481974, -10203039, -14569770, -11893198, -24995986, 11293807, -28588204, -9421832},
+ FieldElement{28497928, 6272777, -33022994, 14470570, 8906179, -1225630, 18504674, -14165166, 29867745, -8795943},
+ },
+ {
+ FieldElement{-16207023, 13517196, -27799630, -13697798, 24009064, -6373891, -6367600, -13175392, 22853429, -4012011},
+ FieldElement{24191378, 16712145, -13931797, 15217831, 14542237, 1646131, 18603514, -11037887, 12876623, -2112447},
+ FieldElement{17902668, 4518229, -411702, -2829247, 26878217, 5258055, -12860753, 608397, 16031844, 3723494},
+ },
+ {
+ FieldElement{-28632773, 12763728, -20446446, 7577504, 33001348, -13017745, 17558842, -7872890, 23896954, -4314245},
+ FieldElement{-20005381, -12011952, 31520464, 605201, 2543521, 5991821, -2945064, 7229064, -9919646, -8826859},
+ FieldElement{28816045, 298879, -28165016, -15920938, 19000928, -1665890, -12680833, -2949325, -18051778, -2082915},
+ },
+ {
+ FieldElement{16000882, -344896, 3493092, -11447198, -29504595, -13159789, 12577740, 16041268, -19715240, 7847707},
+ FieldElement{10151868, 10572098, 27312476, 7922682, 14825339, 4723128, -32855931, -6519018, -10020567, 3852848},
+ FieldElement{-11430470, 15697596, -21121557, -4420647, 5386314, 15063598, 16514493, -15932110, 29330899, -15076224},
+ },
+ },
+ {
+ {
+ FieldElement{-25499735, -4378794, -15222908, -6901211, 16615731, 2051784, 3303702, 15490, -27548796, 12314391},
+ FieldElement{15683520, -6003043, 18109120, -9980648, 15337968, -5997823, -16717435, 15921866, 16103996, -3731215},
+ FieldElement{-23169824, -10781249, 13588192, -1628807, -3798557, -1074929, -19273607, 5402699, -29815713, -9841101},
+ },
+ {
+ FieldElement{23190676, 2384583, -32714340, 3462154, -29903655, -1529132, -11266856, 8911517, -25205859, 2739713},
+ FieldElement{21374101, -3554250, -33524649, 9874411, 15377179, 11831242, -33529904, 6134907, 4931255, 11987849},
+ FieldElement{-7732, -2978858, -16223486, 7277597, 105524, -322051, -31480539, 13861388, -30076310, 10117930},
+ },
+ {
+ FieldElement{-29501170, -10744872, -26163768, 13051539, -25625564, 5089643, -6325503, 6704079, 12890019, 15728940},
+ FieldElement{-21972360, -11771379, -951059, -4418840, 14704840, 2695116, 903376, -10428139, 12885167, 8311031},
+ FieldElement{-17516482, 5352194, 10384213, -13811658, 7506451, 13453191, 26423267, 4384730, 1888765, -5435404},
+ },
+ {
+ FieldElement{-25817338, -3107312, -13494599, -3182506, 30896459, -13921729, -32251644, -12707869, -19464434, -3340243},
+ FieldElement{-23607977, -2665774, -526091, 4651136, 5765089, 4618330, 6092245, 14845197, 17151279, -9854116},
+ FieldElement{-24830458, -12733720, -15165978, 10367250, -29530908, -265356, 22825805, -7087279, -16866484, 16176525},
+ },
+ {
+ FieldElement{-23583256, 6564961, 20063689, 3798228, -4740178, 7359225, 2006182, -10363426, -28746253, -10197509},
+ FieldElement{-10626600, -4486402, -13320562, -5125317, 3432136, -6393229, 23632037, -1940610, 32808310, 1099883},
+ FieldElement{15030977, 5768825, -27451236, -2887299, -6427378, -15361371, -15277896, -6809350, 2051441, -15225865},
+ },
+ {
+ FieldElement{-3362323, -7239372, 7517890, 9824992, 23555850, 295369, 5148398, -14154188, -22686354, 16633660},
+ FieldElement{4577086, -16752288, 13249841, -15304328, 19958763, -14537274, 18559670, -10759549, 8402478, -9864273},
+ FieldElement{-28406330, -1051581, -26790155, -907698, -17212414, -11030789, 9453451, -14980072, 17983010, 9967138},
+ },
+ {
+ FieldElement{-25762494, 6524722, 26585488, 9969270, 24709298, 1220360, -1677990, 7806337, 17507396, 3651560},
+ FieldElement{-10420457, -4118111, 14584639, 15971087, -15768321, 8861010, 26556809, -5574557, -18553322, -11357135},
+ FieldElement{2839101, 14284142, 4029895, 3472686, 14402957, 12689363, -26642121, 8459447, -5605463, -7621941},
+ },
+ {
+ FieldElement{-4839289, -3535444, 9744961, 2871048, 25113978, 3187018, -25110813, -849066, 17258084, -7977739},
+ FieldElement{18164541, -10595176, -17154882, -1542417, 19237078, -9745295, 23357533, -15217008, 26908270, 12150756},
+ FieldElement{-30264870, -7647865, 5112249, -7036672, -1499807, -6974257, 43168, -5537701, -32302074, 16215819},
+ },
+ },
+ {
+ {
+ FieldElement{-6898905, 9824394, -12304779, -4401089, -31397141, -6276835, 32574489, 12532905, -7503072, -8675347},
+ FieldElement{-27343522, -16515468, -27151524, -10722951, 946346, 16291093, 254968, 7168080, 21676107, -1943028},
+ FieldElement{21260961, -8424752, -16831886, -11920822, -23677961, 3968121, -3651949, -6215466, -3556191, -7913075},
+ },
+ {
+ FieldElement{16544754, 13250366, -16804428, 15546242, -4583003, 12757258, -2462308, -8680336, -18907032, -9662799},
+ FieldElement{-2415239, -15577728, 18312303, 4964443, -15272530, -12653564, 26820651, 16690659, 25459437, -4564609},
+ FieldElement{-25144690, 11425020, 28423002, -11020557, -6144921, -15826224, 9142795, -2391602, -6432418, -1644817},
+ },
+ {
+ FieldElement{-23104652, 6253476, 16964147, -3768872, -25113972, -12296437, -27457225, -16344658, 6335692, 7249989},
+ FieldElement{-30333227, 13979675, 7503222, -12368314, -11956721, -4621693, -30272269, 2682242, 25993170, -12478523},
+ FieldElement{4364628, 5930691, 32304656, -10044554, -8054781, 15091131, 22857016, -10598955, 31820368, 15075278},
+ },
+ {
+ FieldElement{31879134, -8918693, 17258761, 90626, -8041836, -4917709, 24162788, -9650886, -17970238, 12833045},
+ FieldElement{19073683, 14851414, -24403169, -11860168, 7625278, 11091125, -19619190, 2074449, -9413939, 14905377},
+ FieldElement{24483667, -11935567, -2518866, -11547418, -1553130, 15355506, -25282080, 9253129, 27628530, -7555480},
+ },
+ {
+ FieldElement{17597607, 8340603, 19355617, 552187, 26198470, -3176583, 4593324, -9157582, -14110875, 15297016},
+ FieldElement{510886, 14337390, -31785257, 16638632, 6328095, 2713355, -20217417, -11864220, 8683221, 2921426},
+ FieldElement{18606791, 11874196, 27155355, -5281482, -24031742, 6265446, -25178240, -1278924, 4674690, 13890525},
+ },
+ {
+ FieldElement{13609624, 13069022, -27372361, -13055908, 24360586, 9592974, 14977157, 9835105, 4389687, 288396},
+ FieldElement{9922506, -519394, 13613107, 5883594, -18758345, -434263, -12304062, 8317628, 23388070, 16052080},
+ FieldElement{12720016, 11937594, -31970060, -5028689, 26900120, 8561328, -20155687, -11632979, -14754271, -10812892},
+ },
+ {
+ FieldElement{15961858, 14150409, 26716931, -665832, -22794328, 13603569, 11829573, 7467844, -28822128, 929275},
+ FieldElement{11038231, -11582396, -27310482, -7316562, -10498527, -16307831, -23479533, -9371869, -21393143, 2465074},
+ FieldElement{20017163, -4323226, 27915242, 1529148, 12396362, 15675764, 13817261, -9658066, 2463391, -4622140},
+ },
+ {
+ FieldElement{-16358878, -12663911, -12065183, 4996454, -1256422, 1073572, 9583558, 12851107, 4003896, 12673717},
+ FieldElement{-1731589, -15155870, -3262930, 16143082, 19294135, 13385325, 14741514, -9103726, 7903886, 2348101},
+ FieldElement{24536016, -16515207, 12715592, -3862155, 1511293, 10047386, -3842346, -7129159, -28377538, 10048127},
+ },
+ },
+ {
+ {
+ FieldElement{-12622226, -6204820, 30718825, 2591312, -10617028, 12192840, 18873298, -7297090, -32297756, 15221632},
+ FieldElement{-26478122, -11103864, 11546244, -1852483, 9180880, 7656409, -21343950, 2095755, 29769758, 6593415},
+ FieldElement{-31994208, -2907461, 4176912, 3264766, 12538965, -868111, 26312345, -6118678, 30958054, 8292160},
+ },
+ {
+ FieldElement{31429822, -13959116, 29173532, 15632448, 12174511, -2760094, 32808831, 3977186, 26143136, -3148876},
+ FieldElement{22648901, 1402143, -22799984, 13746059, 7936347, 365344, -8668633, -1674433, -3758243, -2304625},
+ FieldElement{-15491917, 8012313, -2514730, -12702462, -23965846, -10254029, -1612713, -1535569, -16664475, 8194478},
+ },
+ {
+ FieldElement{27338066, -7507420, -7414224, 10140405, -19026427, -6589889, 27277191, 8855376, 28572286, 3005164},
+ FieldElement{26287124, 4821776, 25476601, -4145903, -3764513, -15788984, -18008582, 1182479, -26094821, -13079595},
+ FieldElement{-7171154, 3178080, 23970071, 6201893, -17195577, -4489192, -21876275, -13982627, 32208683, -1198248},
+ },
+ {
+ FieldElement{-16657702, 2817643, -10286362, 14811298, 6024667, 13349505, -27315504, -10497842, -27672585, -11539858},
+ FieldElement{15941029, -9405932, -21367050, 8062055, 31876073, -238629, -15278393, -1444429, 15397331, -4130193},
+ FieldElement{8934485, -13485467, -23286397, -13423241, -32446090, 14047986, 31170398, -1441021, -27505566, 15087184},
+ },
+ {
+ FieldElement{-18357243, -2156491, 24524913, -16677868, 15520427, -6360776, -15502406, 11461896, 16788528, -5868942},
+ FieldElement{-1947386, 16013773, 21750665, 3714552, -17401782, -16055433, -3770287, -10323320, 31322514, -11615635},
+ FieldElement{21426655, -5650218, -13648287, -5347537, -28812189, -4920970, -18275391, -14621414, 13040862, -12112948},
+ },
+ {
+ FieldElement{11293895, 12478086, -27136401, 15083750, -29307421, 14748872, 14555558, -13417103, 1613711, 4896935},
+ FieldElement{-25894883, 15323294, -8489791, -8057900, 25967126, -13425460, 2825960, -4897045, -23971776, -11267415},
+ FieldElement{-15924766, -5229880, -17443532, 6410664, 3622847, 10243618, 20615400, 12405433, -23753030, -8436416},
+ },
+ {
+ FieldElement{-7091295, 12556208, -20191352, 9025187, -17072479, 4333801, 4378436, 2432030, 23097949, -566018},
+ FieldElement{4565804, -16025654, 20084412, -7842817, 1724999, 189254, 24767264, 10103221, -18512313, 2424778},
+ FieldElement{366633, -11976806, 8173090, -6890119, 30788634, 5745705, -7168678, 1344109, -3642553, 12412659},
+ },
+ {
+ FieldElement{-24001791, 7690286, 14929416, -168257, -32210835, -13412986, 24162697, -15326504, -3141501, 11179385},
+ FieldElement{18289522, -14724954, 8056945, 16430056, -21729724, 7842514, -6001441, -1486897, -18684645, -11443503},
+ FieldElement{476239, 6601091, -6152790, -9723375, 17503545, -4863900, 27672959, 13403813, 11052904, 5219329},
+ },
+ },
+ {
+ {
+ FieldElement{20678546, -8375738, -32671898, 8849123, -5009758, 14574752, 31186971, -3973730, 9014762, -8579056},
+ FieldElement{-13644050, -10350239, -15962508, 5075808, -1514661, -11534600, -33102500, 9160280, 8473550, -3256838},
+ FieldElement{24900749, 14435722, 17209120, -15292541, -22592275, 9878983, -7689309, -16335821, -24568481, 11788948},
+ },
+ {
+ FieldElement{-3118155, -11395194, -13802089, 14797441, 9652448, -6845904, -20037437, 10410733, -24568470, -1458691},
+ FieldElement{-15659161, 16736706, -22467150, 10215878, -9097177, 7563911, 11871841, -12505194, -18513325, 8464118},
+ FieldElement{-23400612, 8348507, -14585951, -861714, -3950205, -6373419, 14325289, 8628612, 33313881, -8370517},
+ },
+ {
+ FieldElement{-20186973, -4967935, 22367356, 5271547, -1097117, -4788838, -24805667, -10236854, -8940735, -5818269},
+ FieldElement{-6948785, -1795212, -32625683, -16021179, 32635414, -7374245, 15989197, -12838188, 28358192, -4253904},
+ FieldElement{-23561781, -2799059, -32351682, -1661963, -9147719, 10429267, -16637684, 4072016, -5351664, 5596589},
+ },
+ {
+ FieldElement{-28236598, -3390048, 12312896, 6213178, 3117142, 16078565, 29266239, 2557221, 1768301, 15373193},
+ FieldElement{-7243358, -3246960, -4593467, -7553353, -127927, -912245, -1090902, -4504991, -24660491, 3442910},
+ FieldElement{-30210571, 5124043, 14181784, 8197961, 18964734, -11939093, 22597931, 7176455, -18585478, 13365930},
+ },
+ {
+ FieldElement{-7877390, -1499958, 8324673, 4690079, 6261860, 890446, 24538107, -8570186, -9689599, -3031667},
+ FieldElement{25008904, -10771599, -4305031, -9638010, 16265036, 15721635, 683793, -11823784, 15723479, -15163481},
+ FieldElement{-9660625, 12374379, -27006999, -7026148, -7724114, -12314514, 11879682, 5400171, 519526, -1235876},
+ },
+ {
+ FieldElement{22258397, -16332233, -7869817, 14613016, -22520255, -2950923, -20353881, 7315967, 16648397, 7605640},
+ FieldElement{-8081308, -8464597, -8223311, 9719710, 19259459, -15348212, 23994942, -5281555, -9468848, 4763278},
+ FieldElement{-21699244, 9220969, -15730624, 1084137, -25476107, -2852390, 31088447, -7764523, -11356529, 728112},
+ },
+ {
+ FieldElement{26047220, -11751471, -6900323, -16521798, 24092068, 9158119, -4273545, -12555558, -29365436, -5498272},
+ FieldElement{17510331, -322857, 5854289, 8403524, 17133918, -3112612, -28111007, 12327945, 10750447, 10014012},
+ FieldElement{-10312768, 3936952, 9156313, -8897683, 16498692, -994647, -27481051, -666732, 3424691, 7540221},
+ },
+ {
+ FieldElement{30322361, -6964110, 11361005, -4143317, 7433304, 4989748, -7071422, -16317219, -9244265, 15258046},
+ FieldElement{13054562, -2779497, 19155474, 469045, -12482797, 4566042, 5631406, 2711395, 1062915, -5136345},
+ FieldElement{-19240248, -11254599, -29509029, -7499965, -5835763, 13005411, -6066489, 12194497, 32960380, 1459310},
+ },
+ },
+ {
+ {
+ FieldElement{19852034, 7027924, 23669353, 10020366, 8586503, -6657907, 394197, -6101885, 18638003, -11174937},
+ FieldElement{31395534, 15098109, 26581030, 8030562, -16527914, -5007134, 9012486, -7584354, -6643087, -5442636},
+ FieldElement{-9192165, -2347377, -1997099, 4529534, 25766844, 607986, -13222, 9677543, -32294889, -6456008},
+ },
+ {
+ FieldElement{-2444496, -149937, 29348902, 8186665, 1873760, 12489863, -30934579, -7839692, -7852844, -8138429},
+ FieldElement{-15236356, -15433509, 7766470, 746860, 26346930, -10221762, -27333451, 10754588, -9431476, 5203576},
+ FieldElement{31834314, 14135496, -770007, 5159118, 20917671, -16768096, -7467973, -7337524, 31809243, 7347066},
+ },
+ {
+ FieldElement{-9606723, -11874240, 20414459, 13033986, 13716524, -11691881, 19797970, -12211255, 15192876, -2087490},
+ FieldElement{-12663563, -2181719, 1168162, -3804809, 26747877, -14138091, 10609330, 12694420, 33473243, -13382104},
+ FieldElement{33184999, 11180355, 15832085, -11385430, -1633671, 225884, 15089336, -11023903, -6135662, 14480053},
+ },
+ {
+ FieldElement{31308717, -5619998, 31030840, -1897099, 15674547, -6582883, 5496208, 13685227, 27595050, 8737275},
+ FieldElement{-20318852, -15150239, 10933843, -16178022, 8335352, -7546022, -31008351, -12610604, 26498114, 66511},
+ FieldElement{22644454, -8761729, -16671776, 4884562, -3105614, -13559366, 30540766, -4286747, -13327787, -7515095},
+ },
+ {
+ FieldElement{-28017847, 9834845, 18617207, -2681312, -3401956, -13307506, 8205540, 13585437, -17127465, 15115439},
+ FieldElement{23711543, -672915, 31206561, -8362711, 6164647, -9709987, -33535882, -1426096, 8236921, 16492939},
+ FieldElement{-23910559, -13515526, -26299483, -4503841, 25005590, -7687270, 19574902, 10071562, 6708380, -6222424},
+ },
+ {
+ FieldElement{2101391, -4930054, 19702731, 2367575, -15427167, 1047675, 5301017, 9328700, 29955601, -11678310},
+ FieldElement{3096359, 9271816, -21620864, -15521844, -14847996, -7592937, -25892142, -12635595, -9917575, 6216608},
+ FieldElement{-32615849, 338663, -25195611, 2510422, -29213566, -13820213, 24822830, -6146567, -26767480, 7525079},
+ },
+ {
+ FieldElement{-23066649, -13985623, 16133487, -7896178, -3389565, 778788, -910336, -2782495, -19386633, 11994101},
+ FieldElement{21691500, -13624626, -641331, -14367021, 3285881, -3483596, -25064666, 9718258, -7477437, 13381418},
+ FieldElement{18445390, -4202236, 14979846, 11622458, -1727110, -3582980, 23111648, -6375247, 28535282, 15779576},
+ },
+ {
+ FieldElement{30098053, 3089662, -9234387, 16662135, -21306940, 11308411, -14068454, 12021730, 9955285, -16303356},
+ FieldElement{9734894, -14576830, -7473633, -9138735, 2060392, 11313496, -18426029, 9924399, 20194861, 13380996},
+ FieldElement{-26378102, -7965207, -22167821, 15789297, -18055342, -6168792, -1984914, 15707771, 26342023, 10146099},
+ },
+ },
+ {
+ {
+ FieldElement{-26016874, -219943, 21339191, -41388, 19745256, -2878700, -29637280, 2227040, 21612326, -545728},
+ FieldElement{-13077387, 1184228, 23562814, -5970442, -20351244, -6348714, 25764461, 12243797, -20856566, 11649658},
+ FieldElement{-10031494, 11262626, 27384172, 2271902, 26947504, -15997771, 39944, 6114064, 33514190, 2333242},
+ },
+ {
+ FieldElement{-21433588, -12421821, 8119782, 7219913, -21830522, -9016134, -6679750, -12670638, 24350578, -13450001},
+ FieldElement{-4116307, -11271533, -23886186, 4843615, -30088339, 690623, -31536088, -10406836, 8317860, 12352766},
+ FieldElement{18200138, -14475911, -33087759, -2696619, -23702521, -9102511, -23552096, -2287550, 20712163, 6719373},
+ },
+ {
+ FieldElement{26656208, 6075253, -7858556, 1886072, -28344043, 4262326, 11117530, -3763210, 26224235, -3297458},
+ FieldElement{-17168938, -14854097, -3395676, -16369877, -19954045, 14050420, 21728352, 9493610, 18620611, -16428628},
+ FieldElement{-13323321, 13325349, 11432106, 5964811, 18609221, 6062965, -5269471, -9725556, -30701573, -16479657},
+ },
+ {
+ FieldElement{-23860538, -11233159, 26961357, 1640861, -32413112, -16737940, 12248509, -5240639, 13735342, 1934062},
+ FieldElement{25089769, 6742589, 17081145, -13406266, 21909293, -16067981, -15136294, -3765346, -21277997, 5473616},
+ FieldElement{31883677, -7961101, 1083432, -11572403, 22828471, 13290673, -7125085, 12469656, 29111212, -5451014},
+ },
+ {
+ FieldElement{24244947, -15050407, -26262976, 2791540, -14997599, 16666678, 24367466, 6388839, -10295587, 452383},
+ FieldElement{-25640782, -3417841, 5217916, 16224624, 19987036, -4082269, -24236251, -5915248, 15766062, 8407814},
+ FieldElement{-20406999, 13990231, 15495425, 16395525, 5377168, 15166495, -8917023, -4388953, -8067909, 2276718},
+ },
+ {
+ FieldElement{30157918, 12924066, -17712050, 9245753, 19895028, 3368142, -23827587, 5096219, 22740376, -7303417},
+ FieldElement{2041139, -14256350, 7783687, 13876377, -25946985, -13352459, 24051124, 13742383, -15637599, 13295222},
+ FieldElement{33338237, -8505733, 12532113, 7977527, 9106186, -1715251, -17720195, -4612972, -4451357, -14669444},
+ },
+ {
+ FieldElement{-20045281, 5454097, -14346548, 6447146, 28862071, 1883651, -2469266, -4141880, 7770569, 9620597},
+ FieldElement{23208068, 7979712, 33071466, 8149229, 1758231, -10834995, 30945528, -1694323, -33502340, -14767970},
+ FieldElement{1439958, -16270480, -1079989, -793782, 4625402, 10647766, -5043801, 1220118, 30494170, -11440799},
+ },
+ {
+ FieldElement{-5037580, -13028295, -2970559, -3061767, 15640974, -6701666, -26739026, 926050, -1684339, -13333647},
+ FieldElement{13908495, -3549272, 30919928, -6273825, -21521863, 7989039, 9021034, 9078865, 3353509, 4033511},
+ FieldElement{-29663431, -15113610, 32259991, -344482, 24295849, -12912123, 23161163, 8839127, 27485041, 7356032},
+ },
+ },
+ {
+ {
+ FieldElement{9661027, 705443, 11980065, -5370154, -1628543, 14661173, -6346142, 2625015, 28431036, -16771834},
+ FieldElement{-23839233, -8311415, -25945511, 7480958, -17681669, -8354183, -22545972, 14150565, 15970762, 4099461},
+ FieldElement{29262576, 16756590, 26350592, -8793563, 8529671, -11208050, 13617293, -9937143, 11465739, 8317062},
+ },
+ {
+ FieldElement{-25493081, -6962928, 32500200, -9419051, -23038724, -2302222, 14898637, 3848455, 20969334, -5157516},
+ FieldElement{-20384450, -14347713, -18336405, 13884722, -33039454, 2842114, -21610826, -3649888, 11177095, 14989547},
+ FieldElement{-24496721, -11716016, 16959896, 2278463, 12066309, 10137771, 13515641, 2581286, -28487508, 9930240},
+ },
+ {
+ FieldElement{-17751622, -2097826, 16544300, -13009300, -15914807, -14949081, 18345767, -13403753, 16291481, -5314038},
+ FieldElement{-33229194, 2553288, 32678213, 9875984, 8534129, 6889387, -9676774, 6957617, 4368891, 9788741},
+ FieldElement{16660756, 7281060, -10830758, 12911820, 20108584, -8101676, -21722536, -8613148, 16250552, -11111103},
+ },
+ {
+ FieldElement{-19765507, 2390526, -16551031, 14161980, 1905286, 6414907, 4689584, 10604807, -30190403, 4782747},
+ FieldElement{-1354539, 14736941, -7367442, -13292886, 7710542, -14155590, -9981571, 4383045, 22546403, 437323},
+ FieldElement{31665577, -12180464, -16186830, 1491339, -18368625, 3294682, 27343084, 2786261, -30633590, -14097016},
+ },
+ {
+ FieldElement{-14467279, -683715, -33374107, 7448552, 19294360, 14334329, -19690631, 2355319, -19284671, -6114373},
+ FieldElement{15121312, -15796162, 6377020, -6031361, -10798111, -12957845, 18952177, 15496498, -29380133, 11754228},
+ FieldElement{-2637277, -13483075, 8488727, -14303896, 12728761, -1622493, 7141596, 11724556, 22761615, -10134141},
+ },
+ {
+ FieldElement{16918416, 11729663, -18083579, 3022987, -31015732, -13339659, -28741185, -12227393, 32851222, 11717399},
+ FieldElement{11166634, 7338049, -6722523, 4531520, -29468672, -7302055, 31474879, 3483633, -1193175, -4030831},
+ FieldElement{-185635, 9921305, 31456609, -13536438, -12013818, 13348923, 33142652, 6546660, -19985279, -3948376},
+ },
+ {
+ FieldElement{-32460596, 11266712, -11197107, -7899103, 31703694, 3855903, -8537131, -12833048, -30772034, -15486313},
+ FieldElement{-18006477, 12709068, 3991746, -6479188, -21491523, -10550425, -31135347, -16049879, 10928917, 3011958},
+ FieldElement{-6957757, -15594337, 31696059, 334240, 29576716, 14796075, -30831056, -12805180, 18008031, 10258577},
+ },
+ {
+ FieldElement{-22448644, 15655569, 7018479, -4410003, -30314266, -1201591, -1853465, 1367120, 25127874, 6671743},
+ FieldElement{29701166, -14373934, -10878120, 9279288, -17568, 13127210, 21382910, 11042292, 25838796, 4642684},
+ FieldElement{-20430234, 14955537, -24126347, 8124619, -5369288, -5990470, 30468147, -13900640, 18423289, 4177476},
+ },
+ },
+}
diff --git a/vendor/github.com/cretz/bine/torutil/ed25519/internal/edwards25519/edwards25519.go b/vendor/github.com/cretz/bine/torutil/ed25519/internal/edwards25519/edwards25519.go
new file mode 100644
index 0000000..fd03c25
--- /dev/null
+++ b/vendor/github.com/cretz/bine/torutil/ed25519/internal/edwards25519/edwards25519.go
@@ -0,0 +1,1793 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package edwards25519
+
+import "encoding/binary"
+
+// This code is a port of the public domain, “ref10” implementation of ed25519
+// from SUPERCOP.
+
+// FieldElement represents an element of the field GF(2^255 - 19). An element
+// t, entries t[0]...t[9], represents the integer t[0]+2^26 t[1]+2^51 t[2]+2^77
+// t[3]+2^102 t[4]+...+2^230 t[9]. Bounds on each t[i] vary depending on
+// context.
+type FieldElement [10]int32
+
+var zero FieldElement
+
+func FeZero(fe *FieldElement) {
+ copy(fe[:], zero[:])
+}
+
+func FeOne(fe *FieldElement) {
+ FeZero(fe)
+ fe[0] = 1
+}
+
+func FeAdd(dst, a, b *FieldElement) {
+ dst[0] = a[0] + b[0]
+ dst[1] = a[1] + b[1]
+ dst[2] = a[2] + b[2]
+ dst[3] = a[3] + b[3]
+ dst[4] = a[4] + b[4]
+ dst[5] = a[5] + b[5]
+ dst[6] = a[6] + b[6]
+ dst[7] = a[7] + b[7]
+ dst[8] = a[8] + b[8]
+ dst[9] = a[9] + b[9]
+}
+
+func FeSub(dst, a, b *FieldElement) {
+ dst[0] = a[0] - b[0]
+ dst[1] = a[1] - b[1]
+ dst[2] = a[2] - b[2]
+ dst[3] = a[3] - b[3]
+ dst[4] = a[4] - b[4]
+ dst[5] = a[5] - b[5]
+ dst[6] = a[6] - b[6]
+ dst[7] = a[7] - b[7]
+ dst[8] = a[8] - b[8]
+ dst[9] = a[9] - b[9]
+}
+
+func FeCopy(dst, src *FieldElement) {
+ copy(dst[:], src[:])
+}
+
+// Replace (f,g) with (g,g) if b == 1;
+// replace (f,g) with (f,g) if b == 0.
+//
+// Preconditions: b in {0,1}.
+func FeCMove(f, g *FieldElement, b int32) {
+ b = -b
+ f[0] ^= b & (f[0] ^ g[0])
+ f[1] ^= b & (f[1] ^ g[1])
+ f[2] ^= b & (f[2] ^ g[2])
+ f[3] ^= b & (f[3] ^ g[3])
+ f[4] ^= b & (f[4] ^ g[4])
+ f[5] ^= b & (f[5] ^ g[5])
+ f[6] ^= b & (f[6] ^ g[6])
+ f[7] ^= b & (f[7] ^ g[7])
+ f[8] ^= b & (f[8] ^ g[8])
+ f[9] ^= b & (f[9] ^ g[9])
+}
+
+func load3(in []byte) int64 {
+ var r int64
+ r = int64(in[0])
+ r |= int64(in[1]) << 8
+ r |= int64(in[2]) << 16
+ return r
+}
+
+func load4(in []byte) int64 {
+ var r int64
+ r = int64(in[0])
+ r |= int64(in[1]) << 8
+ r |= int64(in[2]) << 16
+ r |= int64(in[3]) << 24
+ return r
+}
+
+func FeFromBytes(dst *FieldElement, src *[32]byte) {
+ h0 := load4(src[:])
+ h1 := load3(src[4:]) << 6
+ h2 := load3(src[7:]) << 5
+ h3 := load3(src[10:]) << 3
+ h4 := load3(src[13:]) << 2
+ h5 := load4(src[16:])
+ h6 := load3(src[20:]) << 7
+ h7 := load3(src[23:]) << 5
+ h8 := load3(src[26:]) << 4
+ h9 := (load3(src[29:]) & 8388607) << 2
+
+ FeCombine(dst, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
+}
+
+// FeToBytes marshals h to s.
+// Preconditions:
+// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
+//
+// Write p=2^255-19; q=floor(h/p).
+// Basic claim: q = floor(2^(-255)(h + 19 2^(-25)h9 + 2^(-1))).
+//
+// Proof:
+// Have |h|<=p so |q|<=1 so |19^2 2^(-255) q|<1/4.
+// Also have |h-2^230 h9|<2^230 so |19 2^(-255)(h-2^230 h9)|<1/4.
+//
+// Write y=2^(-1)-19^2 2^(-255)q-19 2^(-255)(h-2^230 h9).
+// Then 0<y<1.
+//
+// Write r=h-pq.
+// Have 0<=r<=p-1=2^255-20.
+// Thus 0<=r+19(2^-255)r<r+19(2^-255)2^255<=2^255-1.
+//
+// Write x=r+19(2^-255)r+y.
+// Then 0<x<2^255 so floor(2^(-255)x) = 0 so floor(q+2^(-255)x) = q.
+//
+// Have q+2^(-255)x = 2^(-255)(h + 19 2^(-25) h9 + 2^(-1))
+// so floor(2^(-255)(h + 19 2^(-25) h9 + 2^(-1))) = q.
+func FeToBytes(s *[32]byte, h *FieldElement) {
+ var carry [10]int32
+
+ q := (19*h[9] + (1 << 24)) >> 25
+ q = (h[0] + q) >> 26
+ q = (h[1] + q) >> 25
+ q = (h[2] + q) >> 26
+ q = (h[3] + q) >> 25
+ q = (h[4] + q) >> 26
+ q = (h[5] + q) >> 25
+ q = (h[6] + q) >> 26
+ q = (h[7] + q) >> 25
+ q = (h[8] + q) >> 26
+ q = (h[9] + q) >> 25
+
+ // Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20.
+ h[0] += 19 * q
+ // Goal: Output h-2^255 q, which is between 0 and 2^255-20.
+
+ carry[0] = h[0] >> 26
+ h[1] += carry[0]
+ h[0] -= carry[0] << 26
+ carry[1] = h[1] >> 25
+ h[2] += carry[1]
+ h[1] -= carry[1] << 25
+ carry[2] = h[2] >> 26
+ h[3] += carry[2]
+ h[2] -= carry[2] << 26
+ carry[3] = h[3] >> 25
+ h[4] += carry[3]
+ h[3] -= carry[3] << 25
+ carry[4] = h[4] >> 26
+ h[5] += carry[4]
+ h[4] -= carry[4] << 26
+ carry[5] = h[5] >> 25
+ h[6] += carry[5]
+ h[5] -= carry[5] << 25
+ carry[6] = h[6] >> 26
+ h[7] += carry[6]
+ h[6] -= carry[6] << 26
+ carry[7] = h[7] >> 25
+ h[8] += carry[7]
+ h[7] -= carry[7] << 25
+ carry[8] = h[8] >> 26
+ h[9] += carry[8]
+ h[8] -= carry[8] << 26
+ carry[9] = h[9] >> 25
+ h[9] -= carry[9] << 25
+ // h10 = carry9
+
+ // Goal: Output h[0]+...+2^255 h10-2^255 q, which is between 0 and 2^255-20.
+ // Have h[0]+...+2^230 h[9] between 0 and 2^255-1;
+ // evidently 2^255 h10-2^255 q = 0.
+ // Goal: Output h[0]+...+2^230 h[9].
+
+ s[0] = byte(h[0] >> 0)
+ s[1] = byte(h[0] >> 8)
+ s[2] = byte(h[0] >> 16)
+ s[3] = byte((h[0] >> 24) | (h[1] << 2))
+ s[4] = byte(h[1] >> 6)
+ s[5] = byte(h[1] >> 14)
+ s[6] = byte((h[1] >> 22) | (h[2] << 3))
+ s[7] = byte(h[2] >> 5)
+ s[8] = byte(h[2] >> 13)
+ s[9] = byte((h[2] >> 21) | (h[3] << 5))
+ s[10] = byte(h[3] >> 3)
+ s[11] = byte(h[3] >> 11)
+ s[12] = byte((h[3] >> 19) | (h[4] << 6))
+ s[13] = byte(h[4] >> 2)
+ s[14] = byte(h[4] >> 10)
+ s[15] = byte(h[4] >> 18)
+ s[16] = byte(h[5] >> 0)
+ s[17] = byte(h[5] >> 8)
+ s[18] = byte(h[5] >> 16)
+ s[19] = byte((h[5] >> 24) | (h[6] << 1))
+ s[20] = byte(h[6] >> 7)
+ s[21] = byte(h[6] >> 15)
+ s[22] = byte((h[6] >> 23) | (h[7] << 3))
+ s[23] = byte(h[7] >> 5)
+ s[24] = byte(h[7] >> 13)
+ s[25] = byte((h[7] >> 21) | (h[8] << 4))
+ s[26] = byte(h[8] >> 4)
+ s[27] = byte(h[8] >> 12)
+ s[28] = byte((h[8] >> 20) | (h[9] << 6))
+ s[29] = byte(h[9] >> 2)
+ s[30] = byte(h[9] >> 10)
+ s[31] = byte(h[9] >> 18)
+}
+
+func FeIsNegative(f *FieldElement) byte {
+ var s [32]byte
+ FeToBytes(&s, f)
+ return s[0] & 1
+}
+
+func FeIsNonZero(f *FieldElement) int32 {
+ var s [32]byte
+ FeToBytes(&s, f)
+ var x uint8
+ for _, b := range s {
+ x |= b
+ }
+ x |= x >> 4
+ x |= x >> 2
+ x |= x >> 1
+ return int32(x & 1)
+}
+
+// FeNeg sets h = -f
+//
+// Preconditions:
+// |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
+//
+// Postconditions:
+// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
+func FeNeg(h, f *FieldElement) {
+ h[0] = -f[0]
+ h[1] = -f[1]
+ h[2] = -f[2]
+ h[3] = -f[3]
+ h[4] = -f[4]
+ h[5] = -f[5]
+ h[6] = -f[6]
+ h[7] = -f[7]
+ h[8] = -f[8]
+ h[9] = -f[9]
+}
+
+func FeCombine(h *FieldElement, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 int64) {
+ var c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 int64
+
+ /*
+ |h0| <= (1.1*1.1*2^52*(1+19+19+19+19)+1.1*1.1*2^50*(38+38+38+38+38))
+ i.e. |h0| <= 1.2*2^59; narrower ranges for h2, h4, h6, h8
+ |h1| <= (1.1*1.1*2^51*(1+1+19+19+19+19+19+19+19+19))
+ i.e. |h1| <= 1.5*2^58; narrower ranges for h3, h5, h7, h9
+ */
+
+ c0 = (h0 + (1 << 25)) >> 26
+ h1 += c0
+ h0 -= c0 << 26
+ c4 = (h4 + (1 << 25)) >> 26
+ h5 += c4
+ h4 -= c4 << 26
+ /* |h0| <= 2^25 */
+ /* |h4| <= 2^25 */
+ /* |h1| <= 1.51*2^58 */
+ /* |h5| <= 1.51*2^58 */
+
+ c1 = (h1 + (1 << 24)) >> 25
+ h2 += c1
+ h1 -= c1 << 25
+ c5 = (h5 + (1 << 24)) >> 25
+ h6 += c5
+ h5 -= c5 << 25
+ /* |h1| <= 2^24; from now on fits into int32 */
+ /* |h5| <= 2^24; from now on fits into int32 */
+ /* |h2| <= 1.21*2^59 */
+ /* |h6| <= 1.21*2^59 */
+
+ c2 = (h2 + (1 << 25)) >> 26
+ h3 += c2
+ h2 -= c2 << 26
+ c6 = (h6 + (1 << 25)) >> 26
+ h7 += c6
+ h6 -= c6 << 26
+ /* |h2| <= 2^25; from now on fits into int32 unchanged */
+ /* |h6| <= 2^25; from now on fits into int32 unchanged */
+ /* |h3| <= 1.51*2^58 */
+ /* |h7| <= 1.51*2^58 */
+
+ c3 = (h3 + (1 << 24)) >> 25
+ h4 += c3
+ h3 -= c3 << 25
+ c7 = (h7 + (1 << 24)) >> 25
+ h8 += c7
+ h7 -= c7 << 25
+ /* |h3| <= 2^24; from now on fits into int32 unchanged */
+ /* |h7| <= 2^24; from now on fits into int32 unchanged */
+ /* |h4| <= 1.52*2^33 */
+ /* |h8| <= 1.52*2^33 */
+
+ c4 = (h4 + (1 << 25)) >> 26
+ h5 += c4
+ h4 -= c4 << 26
+ c8 = (h8 + (1 << 25)) >> 26
+ h9 += c8
+ h8 -= c8 << 26
+ /* |h4| <= 2^25; from now on fits into int32 unchanged */
+ /* |h8| <= 2^25; from now on fits into int32 unchanged */
+ /* |h5| <= 1.01*2^24 */
+ /* |h9| <= 1.51*2^58 */
+
+ c9 = (h9 + (1 << 24)) >> 25
+ h0 += c9 * 19
+ h9 -= c9 << 25
+ /* |h9| <= 2^24; from now on fits into int32 unchanged */
+ /* |h0| <= 1.8*2^37 */
+
+ c0 = (h0 + (1 << 25)) >> 26
+ h1 += c0
+ h0 -= c0 << 26
+ /* |h0| <= 2^25; from now on fits into int32 unchanged */
+ /* |h1| <= 1.01*2^24 */
+
+ h[0] = int32(h0)
+ h[1] = int32(h1)
+ h[2] = int32(h2)
+ h[3] = int32(h3)
+ h[4] = int32(h4)
+ h[5] = int32(h5)
+ h[6] = int32(h6)
+ h[7] = int32(h7)
+ h[8] = int32(h8)
+ h[9] = int32(h9)
+}
+
+// FeMul calculates h = f * g
+// Can overlap h with f or g.
+//
+// Preconditions:
+// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
+// |g| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
+//
+// Postconditions:
+// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
+//
+// Notes on implementation strategy:
+//
+// Using schoolbook multiplication.
+// Karatsuba would save a little in some cost models.
+//
+// Most multiplications by 2 and 19 are 32-bit precomputations;
+// cheaper than 64-bit postcomputations.
+//
+// There is one remaining multiplication by 19 in the carry chain;
+// one *19 precomputation can be merged into this,
+// but the resulting data flow is considerably less clean.
+//
+// There are 12 carries below.
+// 10 of them are 2-way parallelizable and vectorizable.
+// Can get away with 11 carries, but then data flow is much deeper.
+//
+// With tighter constraints on inputs, can squeeze carries into int32.
+func FeMul(h, f, g *FieldElement) {
+ f0 := int64(f[0])
+ f1 := int64(f[1])
+ f2 := int64(f[2])
+ f3 := int64(f[3])
+ f4 := int64(f[4])
+ f5 := int64(f[5])
+ f6 := int64(f[6])
+ f7 := int64(f[7])
+ f8 := int64(f[8])
+ f9 := int64(f[9])
+
+ f1_2 := int64(2 * f[1])
+ f3_2 := int64(2 * f[3])
+ f5_2 := int64(2 * f[5])
+ f7_2 := int64(2 * f[7])
+ f9_2 := int64(2 * f[9])
+
+ g0 := int64(g[0])
+ g1 := int64(g[1])
+ g2 := int64(g[2])
+ g3 := int64(g[3])
+ g4 := int64(g[4])
+ g5 := int64(g[5])
+ g6 := int64(g[6])
+ g7 := int64(g[7])
+ g8 := int64(g[8])
+ g9 := int64(g[9])
+
+ g1_19 := int64(19 * g[1]) /* 1.4*2^29 */
+ g2_19 := int64(19 * g[2]) /* 1.4*2^30; still ok */
+ g3_19 := int64(19 * g[3])
+ g4_19 := int64(19 * g[4])
+ g5_19 := int64(19 * g[5])
+ g6_19 := int64(19 * g[6])
+ g7_19 := int64(19 * g[7])
+ g8_19 := int64(19 * g[8])
+ g9_19 := int64(19 * g[9])
+
+ h0 := f0*g0 + f1_2*g9_19 + f2*g8_19 + f3_2*g7_19 + f4*g6_19 + f5_2*g5_19 + f6*g4_19 + f7_2*g3_19 + f8*g2_19 + f9_2*g1_19
+ h1 := f0*g1 + f1*g0 + f2*g9_19 + f3*g8_19 + f4*g7_19 + f5*g6_19 + f6*g5_19 + f7*g4_19 + f8*g3_19 + f9*g2_19
+ h2 := f0*g2 + f1_2*g1 + f2*g0 + f3_2*g9_19 + f4*g8_19 + f5_2*g7_19 + f6*g6_19 + f7_2*g5_19 + f8*g4_19 + f9_2*g3_19
+ h3 := f0*g3 + f1*g2 + f2*g1 + f3*g0 + f4*g9_19 + f5*g8_19 + f6*g7_19 + f7*g6_19 + f8*g5_19 + f9*g4_19
+ h4 := f0*g4 + f1_2*g3 + f2*g2 + f3_2*g1 + f4*g0 + f5_2*g9_19 + f6*g8_19 + f7_2*g7_19 + f8*g6_19 + f9_2*g5_19
+ h5 := f0*g5 + f1*g4 + f2*g3 + f3*g2 + f4*g1 + f5*g0 + f6*g9_19 + f7*g8_19 + f8*g7_19 + f9*g6_19
+ h6 := f0*g6 + f1_2*g5 + f2*g4 + f3_2*g3 + f4*g2 + f5_2*g1 + f6*g0 + f7_2*g9_19 + f8*g8_19 + f9_2*g7_19
+ h7 := f0*g7 + f1*g6 + f2*g5 + f3*g4 + f4*g3 + f5*g2 + f6*g1 + f7*g0 + f8*g9_19 + f9*g8_19
+ h8 := f0*g8 + f1_2*g7 + f2*g6 + f3_2*g5 + f4*g4 + f5_2*g3 + f6*g2 + f7_2*g1 + f8*g0 + f9_2*g9_19
+ h9 := f0*g9 + f1*g8 + f2*g7 + f3*g6 + f4*g5 + f5*g4 + f6*g3 + f7*g2 + f8*g1 + f9*g0
+
+ FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
+}
+
+func feSquare(f *FieldElement) (h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 int64) {
+ f0 := int64(f[0])
+ f1 := int64(f[1])
+ f2 := int64(f[2])
+ f3 := int64(f[3])
+ f4 := int64(f[4])
+ f5 := int64(f[5])
+ f6 := int64(f[6])
+ f7 := int64(f[7])
+ f8 := int64(f[8])
+ f9 := int64(f[9])
+ f0_2 := int64(2 * f[0])
+ f1_2 := int64(2 * f[1])
+ f2_2 := int64(2 * f[2])
+ f3_2 := int64(2 * f[3])
+ f4_2 := int64(2 * f[4])
+ f5_2 := int64(2 * f[5])
+ f6_2 := int64(2 * f[6])
+ f7_2 := int64(2 * f[7])
+ f5_38 := 38 * f5 // 1.31*2^30
+ f6_19 := 19 * f6 // 1.31*2^30
+ f7_38 := 38 * f7 // 1.31*2^30
+ f8_19 := 19 * f8 // 1.31*2^30
+ f9_38 := 38 * f9 // 1.31*2^30
+
+ h0 = f0*f0 + f1_2*f9_38 + f2_2*f8_19 + f3_2*f7_38 + f4_2*f6_19 + f5*f5_38
+ h1 = f0_2*f1 + f2*f9_38 + f3_2*f8_19 + f4*f7_38 + f5_2*f6_19
+ h2 = f0_2*f2 + f1_2*f1 + f3_2*f9_38 + f4_2*f8_19 + f5_2*f7_38 + f6*f6_19
+ h3 = f0_2*f3 + f1_2*f2 + f4*f9_38 + f5_2*f8_19 + f6*f7_38
+ h4 = f0_2*f4 + f1_2*f3_2 + f2*f2 + f5_2*f9_38 + f6_2*f8_19 + f7*f7_38
+ h5 = f0_2*f5 + f1_2*f4 + f2_2*f3 + f6*f9_38 + f7_2*f8_19
+ h6 = f0_2*f6 + f1_2*f5_2 + f2_2*f4 + f3_2*f3 + f7_2*f9_38 + f8*f8_19
+ h7 = f0_2*f7 + f1_2*f6 + f2_2*f5 + f3_2*f4 + f8*f9_38
+ h8 = f0_2*f8 + f1_2*f7_2 + f2_2*f6 + f3_2*f5_2 + f4*f4 + f9*f9_38
+ h9 = f0_2*f9 + f1_2*f8 + f2_2*f7 + f3_2*f6 + f4_2*f5
+
+ return
+}
+
+// FeSquare calculates h = f*f. Can overlap h with f.
+//
+// Preconditions:
+// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
+//
+// Postconditions:
+// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
+func FeSquare(h, f *FieldElement) {
+ h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 := feSquare(f)
+ FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
+}
+
+// FeSquare2 sets h = 2 * f * f
+//
+// Can overlap h with f.
+//
+// Preconditions:
+// |f| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc.
+//
+// Postconditions:
+// |h| bounded by 1.01*2^25,1.01*2^24,1.01*2^25,1.01*2^24,etc.
+// See fe_mul.c for discussion of implementation strategy.
+func FeSquare2(h, f *FieldElement) {
+ h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 := feSquare(f)
+
+ h0 += h0
+ h1 += h1
+ h2 += h2
+ h3 += h3
+ h4 += h4
+ h5 += h5
+ h6 += h6
+ h7 += h7
+ h8 += h8
+ h9 += h9
+
+ FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
+}
+
+func FeInvert(out, z *FieldElement) {
+ var t0, t1, t2, t3 FieldElement
+ var i int
+
+ FeSquare(&t0, z) // 2^1
+ FeSquare(&t1, &t0) // 2^2
+ for i = 1; i < 2; i++ { // 2^3
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t1, z, &t1) // 2^3 + 2^0
+ FeMul(&t0, &t0, &t1) // 2^3 + 2^1 + 2^0
+ FeSquare(&t2, &t0) // 2^4 + 2^2 + 2^1
+ FeMul(&t1, &t1, &t2) // 2^4 + 2^3 + 2^2 + 2^1 + 2^0
+ FeSquare(&t2, &t1) // 5,4,3,2,1
+ for i = 1; i < 5; i++ { // 9,8,7,6,5
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t1, &t2, &t1) // 9,8,7,6,5,4,3,2,1,0
+ FeSquare(&t2, &t1) // 10..1
+ for i = 1; i < 10; i++ { // 19..10
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t2, &t2, &t1) // 19..0
+ FeSquare(&t3, &t2) // 20..1
+ for i = 1; i < 20; i++ { // 39..20
+ FeSquare(&t3, &t3)
+ }
+ FeMul(&t2, &t3, &t2) // 39..0
+ FeSquare(&t2, &t2) // 40..1
+ for i = 1; i < 10; i++ { // 49..10
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t1, &t2, &t1) // 49..0
+ FeSquare(&t2, &t1) // 50..1
+ for i = 1; i < 50; i++ { // 99..50
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t2, &t2, &t1) // 99..0
+ FeSquare(&t3, &t2) // 100..1
+ for i = 1; i < 100; i++ { // 199..100
+ FeSquare(&t3, &t3)
+ }
+ FeMul(&t2, &t3, &t2) // 199..0
+ FeSquare(&t2, &t2) // 200..1
+ for i = 1; i < 50; i++ { // 249..50
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t1, &t2, &t1) // 249..0
+ FeSquare(&t1, &t1) // 250..1
+ for i = 1; i < 5; i++ { // 254..5
+ FeSquare(&t1, &t1)
+ }
+ FeMul(out, &t1, &t0) // 254..5,3,1,0
+}
+
+func fePow22523(out, z *FieldElement) {
+ var t0, t1, t2 FieldElement
+ var i int
+
+ FeSquare(&t0, z)
+ for i = 1; i < 1; i++ {
+ FeSquare(&t0, &t0)
+ }
+ FeSquare(&t1, &t0)
+ for i = 1; i < 2; i++ {
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t1, z, &t1)
+ FeMul(&t0, &t0, &t1)
+ FeSquare(&t0, &t0)
+ for i = 1; i < 1; i++ {
+ FeSquare(&t0, &t0)
+ }
+ FeMul(&t0, &t1, &t0)
+ FeSquare(&t1, &t0)
+ for i = 1; i < 5; i++ {
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t0, &t1, &t0)
+ FeSquare(&t1, &t0)
+ for i = 1; i < 10; i++ {
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t1, &t1, &t0)
+ FeSquare(&t2, &t1)
+ for i = 1; i < 20; i++ {
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t1, &t2, &t1)
+ FeSquare(&t1, &t1)
+ for i = 1; i < 10; i++ {
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t0, &t1, &t0)
+ FeSquare(&t1, &t0)
+ for i = 1; i < 50; i++ {
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t1, &t1, &t0)
+ FeSquare(&t2, &t1)
+ for i = 1; i < 100; i++ {
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t1, &t2, &t1)
+ FeSquare(&t1, &t1)
+ for i = 1; i < 50; i++ {
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t0, &t1, &t0)
+ FeSquare(&t0, &t0)
+ for i = 1; i < 2; i++ {
+ FeSquare(&t0, &t0)
+ }
+ FeMul(out, &t0, z)
+}
+
+// Group elements are members of the elliptic curve -x^2 + y^2 = 1 + d * x^2 *
+// y^2 where d = -121665/121666.
+//
+// Several representations are used:
+// ProjectiveGroupElement: (X:Y:Z) satisfying x=X/Z, y=Y/Z
+// ExtendedGroupElement: (X:Y:Z:T) satisfying x=X/Z, y=Y/Z, XY=ZT
+// CompletedGroupElement: ((X:Z),(Y:T)) satisfying x=X/Z, y=Y/T
+// PreComputedGroupElement: (y+x,y-x,2dxy)
+
+type ProjectiveGroupElement struct {
+ X, Y, Z FieldElement
+}
+
+type ExtendedGroupElement struct {
+ X, Y, Z, T FieldElement
+}
+
+type CompletedGroupElement struct {
+ X, Y, Z, T FieldElement
+}
+
+type PreComputedGroupElement struct {
+ yPlusX, yMinusX, xy2d FieldElement
+}
+
+type CachedGroupElement struct {
+ yPlusX, yMinusX, Z, T2d FieldElement
+}
+
+func (p *ProjectiveGroupElement) Zero() {
+ FeZero(&p.X)
+ FeOne(&p.Y)
+ FeOne(&p.Z)
+}
+
+func (p *ProjectiveGroupElement) Double(r *CompletedGroupElement) {
+ var t0 FieldElement
+
+ FeSquare(&r.X, &p.X)
+ FeSquare(&r.Z, &p.Y)
+ FeSquare2(&r.T, &p.Z)
+ FeAdd(&r.Y, &p.X, &p.Y)
+ FeSquare(&t0, &r.Y)
+ FeAdd(&r.Y, &r.Z, &r.X)
+ FeSub(&r.Z, &r.Z, &r.X)
+ FeSub(&r.X, &t0, &r.Y)
+ FeSub(&r.T, &r.T, &r.Z)
+}
+
+func (p *ProjectiveGroupElement) ToBytes(s *[32]byte) {
+ var recip, x, y FieldElement
+
+ FeInvert(&recip, &p.Z)
+ FeMul(&x, &p.X, &recip)
+ FeMul(&y, &p.Y, &recip)
+ FeToBytes(s, &y)
+ s[31] ^= FeIsNegative(&x) << 7
+}
+
+func (p *ExtendedGroupElement) Zero() {
+ FeZero(&p.X)
+ FeOne(&p.Y)
+ FeOne(&p.Z)
+ FeZero(&p.T)
+}
+
+func (p *ExtendedGroupElement) Double(r *CompletedGroupElement) {
+ var q ProjectiveGroupElement
+ p.ToProjective(&q)
+ q.Double(r)
+}
+
+func (p *ExtendedGroupElement) ToCached(r *CachedGroupElement) {
+ FeAdd(&r.yPlusX, &p.Y, &p.X)
+ FeSub(&r.yMinusX, &p.Y, &p.X)
+ FeCopy(&r.Z, &p.Z)
+ FeMul(&r.T2d, &p.T, &d2)
+}
+
+func (p *ExtendedGroupElement) ToProjective(r *ProjectiveGroupElement) {
+ FeCopy(&r.X, &p.X)
+ FeCopy(&r.Y, &p.Y)
+ FeCopy(&r.Z, &p.Z)
+}
+
+func (p *ExtendedGroupElement) ToBytes(s *[32]byte) {
+ var recip, x, y FieldElement
+
+ FeInvert(&recip, &p.Z)
+ FeMul(&x, &p.X, &recip)
+ FeMul(&y, &p.Y, &recip)
+ FeToBytes(s, &y)
+ s[31] ^= FeIsNegative(&x) << 7
+}
+
+func (p *ExtendedGroupElement) FromBytes(s *[32]byte) bool {
+ var u, v, v3, vxx, check FieldElement
+
+ FeFromBytes(&p.Y, s)
+ FeOne(&p.Z)
+ FeSquare(&u, &p.Y)
+ FeMul(&v, &u, &d)
+ FeSub(&u, &u, &p.Z) // y = y^2-1
+ FeAdd(&v, &v, &p.Z) // v = dy^2+1
+
+ FeSquare(&v3, &v)
+ FeMul(&v3, &v3, &v) // v3 = v^3
+ FeSquare(&p.X, &v3)
+ FeMul(&p.X, &p.X, &v)
+ FeMul(&p.X, &p.X, &u) // x = uv^7
+
+ fePow22523(&p.X, &p.X) // x = (uv^7)^((q-5)/8)
+ FeMul(&p.X, &p.X, &v3)
+ FeMul(&p.X, &p.X, &u) // x = uv^3(uv^7)^((q-5)/8)
+
+ var tmpX, tmp2 [32]byte
+
+ FeSquare(&vxx, &p.X)
+ FeMul(&vxx, &vxx, &v)
+ FeSub(&check, &vxx, &u) // vx^2-u
+ if FeIsNonZero(&check) == 1 {
+ FeAdd(&check, &vxx, &u) // vx^2+u
+ if FeIsNonZero(&check) == 1 {
+ return false
+ }
+ FeMul(&p.X, &p.X, &SqrtM1)
+
+ FeToBytes(&tmpX, &p.X)
+ for i, v := range tmpX {
+ tmp2[31-i] = v
+ }
+ }
+
+ if FeIsNegative(&p.X) != (s[31] >> 7) {
+ FeNeg(&p.X, &p.X)
+ }
+
+ FeMul(&p.T, &p.X, &p.Y)
+ return true
+}
+
+func (p *CompletedGroupElement) ToProjective(r *ProjectiveGroupElement) {
+ FeMul(&r.X, &p.X, &p.T)
+ FeMul(&r.Y, &p.Y, &p.Z)
+ FeMul(&r.Z, &p.Z, &p.T)
+}
+
+func (p *CompletedGroupElement) ToExtended(r *ExtendedGroupElement) {
+ FeMul(&r.X, &p.X, &p.T)
+ FeMul(&r.Y, &p.Y, &p.Z)
+ FeMul(&r.Z, &p.Z, &p.T)
+ FeMul(&r.T, &p.X, &p.Y)
+}
+
+func (p *PreComputedGroupElement) Zero() {
+ FeOne(&p.yPlusX)
+ FeOne(&p.yMinusX)
+ FeZero(&p.xy2d)
+}
+
+func geAdd(r *CompletedGroupElement, p *ExtendedGroupElement, q *CachedGroupElement) {
+ var t0 FieldElement
+
+ FeAdd(&r.X, &p.Y, &p.X)
+ FeSub(&r.Y, &p.Y, &p.X)
+ FeMul(&r.Z, &r.X, &q.yPlusX)
+ FeMul(&r.Y, &r.Y, &q.yMinusX)
+ FeMul(&r.T, &q.T2d, &p.T)
+ FeMul(&r.X, &p.Z, &q.Z)
+ FeAdd(&t0, &r.X, &r.X)
+ FeSub(&r.X, &r.Z, &r.Y)
+ FeAdd(&r.Y, &r.Z, &r.Y)
+ FeAdd(&r.Z, &t0, &r.T)
+ FeSub(&r.T, &t0, &r.T)
+}
+
+func geSub(r *CompletedGroupElement, p *ExtendedGroupElement, q *CachedGroupElement) {
+ var t0 FieldElement
+
+ FeAdd(&r.X, &p.Y, &p.X)
+ FeSub(&r.Y, &p.Y, &p.X)
+ FeMul(&r.Z, &r.X, &q.yMinusX)
+ FeMul(&r.Y, &r.Y, &q.yPlusX)
+ FeMul(&r.T, &q.T2d, &p.T)
+ FeMul(&r.X, &p.Z, &q.Z)
+ FeAdd(&t0, &r.X, &r.X)
+ FeSub(&r.X, &r.Z, &r.Y)
+ FeAdd(&r.Y, &r.Z, &r.Y)
+ FeSub(&r.Z, &t0, &r.T)
+ FeAdd(&r.T, &t0, &r.T)
+}
+
+func geMixedAdd(r *CompletedGroupElement, p *ExtendedGroupElement, q *PreComputedGroupElement) {
+ var t0 FieldElement
+
+ FeAdd(&r.X, &p.Y, &p.X)
+ FeSub(&r.Y, &p.Y, &p.X)
+ FeMul(&r.Z, &r.X, &q.yPlusX)
+ FeMul(&r.Y, &r.Y, &q.yMinusX)
+ FeMul(&r.T, &q.xy2d, &p.T)
+ FeAdd(&t0, &p.Z, &p.Z)
+ FeSub(&r.X, &r.Z, &r.Y)
+ FeAdd(&r.Y, &r.Z, &r.Y)
+ FeAdd(&r.Z, &t0, &r.T)
+ FeSub(&r.T, &t0, &r.T)
+}
+
+func geMixedSub(r *CompletedGroupElement, p *ExtendedGroupElement, q *PreComputedGroupElement) {
+ var t0 FieldElement
+
+ FeAdd(&r.X, &p.Y, &p.X)
+ FeSub(&r.Y, &p.Y, &p.X)
+ FeMul(&r.Z, &r.X, &q.yMinusX)
+ FeMul(&r.Y, &r.Y, &q.yPlusX)
+ FeMul(&r.T, &q.xy2d, &p.T)
+ FeAdd(&t0, &p.Z, &p.Z)
+ FeSub(&r.X, &r.Z, &r.Y)
+ FeAdd(&r.Y, &r.Z, &r.Y)
+ FeSub(&r.Z, &t0, &r.T)
+ FeAdd(&r.T, &t0, &r.T)
+}
+
+func slide(r *[256]int8, a *[32]byte) {
+ for i := range r {
+ r[i] = int8(1 & (a[i>>3] >> uint(i&7)))
+ }
+
+ for i := range r {
+ if r[i] != 0 {
+ for b := 1; b <= 6 && i+b < 256; b++ {
+ if r[i+b] != 0 {
+ if r[i]+(r[i+b]<<uint(b)) <= 15 {
+ r[i] += r[i+b] << uint(b)
+ r[i+b] = 0
+ } else if r[i]-(r[i+b]<<uint(b)) >= -15 {
+ r[i] -= r[i+b] << uint(b)
+ for k := i + b; k < 256; k++ {
+ if r[k] == 0 {
+ r[k] = 1
+ break
+ }
+ r[k] = 0
+ }
+ } else {
+ break
+ }
+ }
+ }
+ }
+ }
+}
+
+// GeDoubleScalarMultVartime sets r = a*A + b*B
+// where a = a[0]+256*a[1]+...+256^31 a[31].
+// and b = b[0]+256*b[1]+...+256^31 b[31].
+// B is the Ed25519 base point (x,4/5) with x positive.
+func GeDoubleScalarMultVartime(r *ProjectiveGroupElement, a *[32]byte, A *ExtendedGroupElement, b *[32]byte) {
+ var aSlide, bSlide [256]int8
+ var Ai [8]CachedGroupElement // A,3A,5A,7A,9A,11A,13A,15A
+ var t CompletedGroupElement
+ var u, A2 ExtendedGroupElement
+ var i int
+
+ slide(&aSlide, a)
+ slide(&bSlide, b)
+
+ A.ToCached(&Ai[0])
+ A.Double(&t)
+ t.ToExtended(&A2)
+
+ for i := 0; i < 7; i++ {
+ geAdd(&t, &A2, &Ai[i])
+ t.ToExtended(&u)
+ u.ToCached(&Ai[i+1])
+ }
+
+ r.Zero()
+
+ for i = 255; i >= 0; i-- {
+ if aSlide[i] != 0 || bSlide[i] != 0 {
+ break
+ }
+ }
+
+ for ; i >= 0; i-- {
+ r.Double(&t)
+
+ if aSlide[i] > 0 {
+ t.ToExtended(&u)
+ geAdd(&t, &u, &Ai[aSlide[i]/2])
+ } else if aSlide[i] < 0 {
+ t.ToExtended(&u)
+ geSub(&t, &u, &Ai[(-aSlide[i])/2])
+ }
+
+ if bSlide[i] > 0 {
+ t.ToExtended(&u)
+ geMixedAdd(&t, &u, &bi[bSlide[i]/2])
+ } else if bSlide[i] < 0 {
+ t.ToExtended(&u)
+ geMixedSub(&t, &u, &bi[(-bSlide[i])/2])
+ }
+
+ t.ToProjective(r)
+ }
+}
+
+// equal returns 1 if b == c and 0 otherwise, assuming that b and c are
+// non-negative.
+func equal(b, c int32) int32 {
+ x := uint32(b ^ c)
+ x--
+ return int32(x >> 31)
+}
+
+// negative returns 1 if b < 0 and 0 otherwise.
+func negative(b int32) int32 {
+ return (b >> 31) & 1
+}
+
+func PreComputedGroupElementCMove(t, u *PreComputedGroupElement, b int32) {
+ FeCMove(&t.yPlusX, &u.yPlusX, b)
+ FeCMove(&t.yMinusX, &u.yMinusX, b)
+ FeCMove(&t.xy2d, &u.xy2d, b)
+}
+
+func selectPoint(t *PreComputedGroupElement, pos int32, b int32) {
+ var minusT PreComputedGroupElement
+ bNegative := negative(b)
+ bAbs := b - (((-bNegative) & b) << 1)
+
+ t.Zero()
+ for i := int32(0); i < 8; i++ {
+ PreComputedGroupElementCMove(t, &base[pos][i], equal(bAbs, i+1))
+ }
+ FeCopy(&minusT.yPlusX, &t.yMinusX)
+ FeCopy(&minusT.yMinusX, &t.yPlusX)
+ FeNeg(&minusT.xy2d, &t.xy2d)
+ PreComputedGroupElementCMove(t, &minusT, bNegative)
+}
+
+// GeScalarMultBase computes h = a*B, where
+// a = a[0]+256*a[1]+...+256^31 a[31]
+// B is the Ed25519 base point (x,4/5) with x positive.
+//
+// Preconditions:
+// a[31] <= 127
+func GeScalarMultBase(h *ExtendedGroupElement, a *[32]byte) {
+ var e [64]int8
+
+ for i, v := range a {
+ e[2*i] = int8(v & 15)
+ e[2*i+1] = int8((v >> 4) & 15)
+ }
+
+ // each e[i] is between 0 and 15 and e[63] is between 0 and 7.
+
+ carry := int8(0)
+ for i := 0; i < 63; i++ {
+ e[i] += carry
+ carry = (e[i] + 8) >> 4
+ e[i] -= carry << 4
+ }
+ e[63] += carry
+ // each e[i] is between -8 and 8.
+
+ h.Zero()
+ var t PreComputedGroupElement
+ var r CompletedGroupElement
+ for i := int32(1); i < 64; i += 2 {
+ selectPoint(&t, i/2, int32(e[i]))
+ geMixedAdd(&r, h, &t)
+ r.ToExtended(h)
+ }
+
+ var s ProjectiveGroupElement
+
+ h.Double(&r)
+ r.ToProjective(&s)
+ s.Double(&r)
+ r.ToProjective(&s)
+ s.Double(&r)
+ r.ToProjective(&s)
+ s.Double(&r)
+ r.ToExtended(h)
+
+ for i := int32(0); i < 64; i += 2 {
+ selectPoint(&t, i/2, int32(e[i]))
+ geMixedAdd(&r, h, &t)
+ r.ToExtended(h)
+ }
+}
+
+// The scalars are GF(2^252 + 27742317777372353535851937790883648493).
+
+// Input:
+// a[0]+256*a[1]+...+256^31*a[31] = a
+// b[0]+256*b[1]+...+256^31*b[31] = b
+// c[0]+256*c[1]+...+256^31*c[31] = c
+//
+// Output:
+// s[0]+256*s[1]+...+256^31*s[31] = (ab+c) mod l
+// where l = 2^252 + 27742317777372353535851937790883648493.
+func ScMulAdd(s, a, b, c *[32]byte) {
+ a0 := 2097151 & load3(a[:])
+ a1 := 2097151 & (load4(a[2:]) >> 5)
+ a2 := 2097151 & (load3(a[5:]) >> 2)
+ a3 := 2097151 & (load4(a[7:]) >> 7)
+ a4 := 2097151 & (load4(a[10:]) >> 4)
+ a5 := 2097151 & (load3(a[13:]) >> 1)
+ a6 := 2097151 & (load4(a[15:]) >> 6)
+ a7 := 2097151 & (load3(a[18:]) >> 3)
+ a8 := 2097151 & load3(a[21:])
+ a9 := 2097151 & (load4(a[23:]) >> 5)
+ a10 := 2097151 & (load3(a[26:]) >> 2)
+ a11 := (load4(a[28:]) >> 7)
+ b0 := 2097151 & load3(b[:])
+ b1 := 2097151 & (load4(b[2:]) >> 5)
+ b2 := 2097151 & (load3(b[5:]) >> 2)
+ b3 := 2097151 & (load4(b[7:]) >> 7)
+ b4 := 2097151 & (load4(b[10:]) >> 4)
+ b5 := 2097151 & (load3(b[13:]) >> 1)
+ b6 := 2097151 & (load4(b[15:]) >> 6)
+ b7 := 2097151 & (load3(b[18:]) >> 3)
+ b8 := 2097151 & load3(b[21:])
+ b9 := 2097151 & (load4(b[23:]) >> 5)
+ b10 := 2097151 & (load3(b[26:]) >> 2)
+ b11 := (load4(b[28:]) >> 7)
+ c0 := 2097151 & load3(c[:])
+ c1 := 2097151 & (load4(c[2:]) >> 5)
+ c2 := 2097151 & (load3(c[5:]) >> 2)
+ c3 := 2097151 & (load4(c[7:]) >> 7)
+ c4 := 2097151 & (load4(c[10:]) >> 4)
+ c5 := 2097151 & (load3(c[13:]) >> 1)
+ c6 := 2097151 & (load4(c[15:]) >> 6)
+ c7 := 2097151 & (load3(c[18:]) >> 3)
+ c8 := 2097151 & load3(c[21:])
+ c9 := 2097151 & (load4(c[23:]) >> 5)
+ c10 := 2097151 & (load3(c[26:]) >> 2)
+ c11 := (load4(c[28:]) >> 7)
+ var carry [23]int64
+
+ s0 := c0 + a0*b0
+ s1 := c1 + a0*b1 + a1*b0
+ s2 := c2 + a0*b2 + a1*b1 + a2*b0
+ s3 := c3 + a0*b3 + a1*b2 + a2*b1 + a3*b0
+ s4 := c4 + a0*b4 + a1*b3 + a2*b2 + a3*b1 + a4*b0
+ s5 := c5 + a0*b5 + a1*b4 + a2*b3 + a3*b2 + a4*b1 + a5*b0
+ s6 := c6 + a0*b6 + a1*b5 + a2*b4 + a3*b3 + a4*b2 + a5*b1 + a6*b0
+ s7 := c7 + a0*b7 + a1*b6 + a2*b5 + a3*b4 + a4*b3 + a5*b2 + a6*b1 + a7*b0
+ s8 := c8 + a0*b8 + a1*b7 + a2*b6 + a3*b5 + a4*b4 + a5*b3 + a6*b2 + a7*b1 + a8*b0
+ s9 := c9 + a0*b9 + a1*b8 + a2*b7 + a3*b6 + a4*b5 + a5*b4 + a6*b3 + a7*b2 + a8*b1 + a9*b0
+ s10 := c10 + a0*b10 + a1*b9 + a2*b8 + a3*b7 + a4*b6 + a5*b5 + a6*b4 + a7*b3 + a8*b2 + a9*b1 + a10*b0
+ s11 := c11 + a0*b11 + a1*b10 + a2*b9 + a3*b8 + a4*b7 + a5*b6 + a6*b5 + a7*b4 + a8*b3 + a9*b2 + a10*b1 + a11*b0
+ s12 := a1*b11 + a2*b10 + a3*b9 + a4*b8 + a5*b7 + a6*b6 + a7*b5 + a8*b4 + a9*b3 + a10*b2 + a11*b1
+ s13 := a2*b11 + a3*b10 + a4*b9 + a5*b8 + a6*b7 + a7*b6 + a8*b5 + a9*b4 + a10*b3 + a11*b2
+ s14 := a3*b11 + a4*b10 + a5*b9 + a6*b8 + a7*b7 + a8*b6 + a9*b5 + a10*b4 + a11*b3
+ s15 := a4*b11 + a5*b10 + a6*b9 + a7*b8 + a8*b7 + a9*b6 + a10*b5 + a11*b4
+ s16 := a5*b11 + a6*b10 + a7*b9 + a8*b8 + a9*b7 + a10*b6 + a11*b5
+ s17 := a6*b11 + a7*b10 + a8*b9 + a9*b8 + a10*b7 + a11*b6
+ s18 := a7*b11 + a8*b10 + a9*b9 + a10*b8 + a11*b7
+ s19 := a8*b11 + a9*b10 + a10*b9 + a11*b8
+ s20 := a9*b11 + a10*b10 + a11*b9
+ s21 := a10*b11 + a11*b10
+ s22 := a11 * b11
+ s23 := int64(0)
+
+ carry[0] = (s0 + (1 << 20)) >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[2] = (s2 + (1 << 20)) >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[4] = (s4 + (1 << 20)) >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[6] = (s6 + (1 << 20)) >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[8] = (s8 + (1 << 20)) >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[10] = (s10 + (1 << 20)) >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+ carry[12] = (s12 + (1 << 20)) >> 21
+ s13 += carry[12]
+ s12 -= carry[12] << 21
+ carry[14] = (s14 + (1 << 20)) >> 21
+ s15 += carry[14]
+ s14 -= carry[14] << 21
+ carry[16] = (s16 + (1 << 20)) >> 21
+ s17 += carry[16]
+ s16 -= carry[16] << 21
+ carry[18] = (s18 + (1 << 20)) >> 21
+ s19 += carry[18]
+ s18 -= carry[18] << 21
+ carry[20] = (s20 + (1 << 20)) >> 21
+ s21 += carry[20]
+ s20 -= carry[20] << 21
+ carry[22] = (s22 + (1 << 20)) >> 21
+ s23 += carry[22]
+ s22 -= carry[22] << 21
+
+ carry[1] = (s1 + (1 << 20)) >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[3] = (s3 + (1 << 20)) >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[5] = (s5 + (1 << 20)) >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[7] = (s7 + (1 << 20)) >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[9] = (s9 + (1 << 20)) >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[11] = (s11 + (1 << 20)) >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+ carry[13] = (s13 + (1 << 20)) >> 21
+ s14 += carry[13]
+ s13 -= carry[13] << 21
+ carry[15] = (s15 + (1 << 20)) >> 21
+ s16 += carry[15]
+ s15 -= carry[15] << 21
+ carry[17] = (s17 + (1 << 20)) >> 21
+ s18 += carry[17]
+ s17 -= carry[17] << 21
+ carry[19] = (s19 + (1 << 20)) >> 21
+ s20 += carry[19]
+ s19 -= carry[19] << 21
+ carry[21] = (s21 + (1 << 20)) >> 21
+ s22 += carry[21]
+ s21 -= carry[21] << 21
+
+ s11 += s23 * 666643
+ s12 += s23 * 470296
+ s13 += s23 * 654183
+ s14 -= s23 * 997805
+ s15 += s23 * 136657
+ s16 -= s23 * 683901
+ s23 = 0
+
+ s10 += s22 * 666643
+ s11 += s22 * 470296
+ s12 += s22 * 654183
+ s13 -= s22 * 997805
+ s14 += s22 * 136657
+ s15 -= s22 * 683901
+ s22 = 0
+
+ s9 += s21 * 666643
+ s10 += s21 * 470296
+ s11 += s21 * 654183
+ s12 -= s21 * 997805
+ s13 += s21 * 136657
+ s14 -= s21 * 683901
+ s21 = 0
+
+ s8 += s20 * 666643
+ s9 += s20 * 470296
+ s10 += s20 * 654183
+ s11 -= s20 * 997805
+ s12 += s20 * 136657
+ s13 -= s20 * 683901
+ s20 = 0
+
+ s7 += s19 * 666643
+ s8 += s19 * 470296
+ s9 += s19 * 654183
+ s10 -= s19 * 997805
+ s11 += s19 * 136657
+ s12 -= s19 * 683901
+ s19 = 0
+
+ s6 += s18 * 666643
+ s7 += s18 * 470296
+ s8 += s18 * 654183
+ s9 -= s18 * 997805
+ s10 += s18 * 136657
+ s11 -= s18 * 683901
+ s18 = 0
+
+ carry[6] = (s6 + (1 << 20)) >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[8] = (s8 + (1 << 20)) >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[10] = (s10 + (1 << 20)) >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+ carry[12] = (s12 + (1 << 20)) >> 21
+ s13 += carry[12]
+ s12 -= carry[12] << 21
+ carry[14] = (s14 + (1 << 20)) >> 21
+ s15 += carry[14]
+ s14 -= carry[14] << 21
+ carry[16] = (s16 + (1 << 20)) >> 21
+ s17 += carry[16]
+ s16 -= carry[16] << 21
+
+ carry[7] = (s7 + (1 << 20)) >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[9] = (s9 + (1 << 20)) >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[11] = (s11 + (1 << 20)) >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+ carry[13] = (s13 + (1 << 20)) >> 21
+ s14 += carry[13]
+ s13 -= carry[13] << 21
+ carry[15] = (s15 + (1 << 20)) >> 21
+ s16 += carry[15]
+ s15 -= carry[15] << 21
+
+ s5 += s17 * 666643
+ s6 += s17 * 470296
+ s7 += s17 * 654183
+ s8 -= s17 * 997805
+ s9 += s17 * 136657
+ s10 -= s17 * 683901
+ s17 = 0
+
+ s4 += s16 * 666643
+ s5 += s16 * 470296
+ s6 += s16 * 654183
+ s7 -= s16 * 997805
+ s8 += s16 * 136657
+ s9 -= s16 * 683901
+ s16 = 0
+
+ s3 += s15 * 666643
+ s4 += s15 * 470296
+ s5 += s15 * 654183
+ s6 -= s15 * 997805
+ s7 += s15 * 136657
+ s8 -= s15 * 683901
+ s15 = 0
+
+ s2 += s14 * 666643
+ s3 += s14 * 470296
+ s4 += s14 * 654183
+ s5 -= s14 * 997805
+ s6 += s14 * 136657
+ s7 -= s14 * 683901
+ s14 = 0
+
+ s1 += s13 * 666643
+ s2 += s13 * 470296
+ s3 += s13 * 654183
+ s4 -= s13 * 997805
+ s5 += s13 * 136657
+ s6 -= s13 * 683901
+ s13 = 0
+
+ s0 += s12 * 666643
+ s1 += s12 * 470296
+ s2 += s12 * 654183
+ s3 -= s12 * 997805
+ s4 += s12 * 136657
+ s5 -= s12 * 683901
+ s12 = 0
+
+ carry[0] = (s0 + (1 << 20)) >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[2] = (s2 + (1 << 20)) >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[4] = (s4 + (1 << 20)) >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[6] = (s6 + (1 << 20)) >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[8] = (s8 + (1 << 20)) >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[10] = (s10 + (1 << 20)) >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+
+ carry[1] = (s1 + (1 << 20)) >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[3] = (s3 + (1 << 20)) >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[5] = (s5 + (1 << 20)) >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[7] = (s7 + (1 << 20)) >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[9] = (s9 + (1 << 20)) >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[11] = (s11 + (1 << 20)) >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+
+ s0 += s12 * 666643
+ s1 += s12 * 470296
+ s2 += s12 * 654183
+ s3 -= s12 * 997805
+ s4 += s12 * 136657
+ s5 -= s12 * 683901
+ s12 = 0
+
+ carry[0] = s0 >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[1] = s1 >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[2] = s2 >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[3] = s3 >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[4] = s4 >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[5] = s5 >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[6] = s6 >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[7] = s7 >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[8] = s8 >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[9] = s9 >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[10] = s10 >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+ carry[11] = s11 >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+
+ s0 += s12 * 666643
+ s1 += s12 * 470296
+ s2 += s12 * 654183
+ s3 -= s12 * 997805
+ s4 += s12 * 136657
+ s5 -= s12 * 683901
+ s12 = 0
+
+ carry[0] = s0 >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[1] = s1 >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[2] = s2 >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[3] = s3 >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[4] = s4 >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[5] = s5 >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[6] = s6 >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[7] = s7 >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[8] = s8 >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[9] = s9 >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[10] = s10 >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+
+ s[0] = byte(s0 >> 0)
+ s[1] = byte(s0 >> 8)
+ s[2] = byte((s0 >> 16) | (s1 << 5))
+ s[3] = byte(s1 >> 3)
+ s[4] = byte(s1 >> 11)
+ s[5] = byte((s1 >> 19) | (s2 << 2))
+ s[6] = byte(s2 >> 6)
+ s[7] = byte((s2 >> 14) | (s3 << 7))
+ s[8] = byte(s3 >> 1)
+ s[9] = byte(s3 >> 9)
+ s[10] = byte((s3 >> 17) | (s4 << 4))
+ s[11] = byte(s4 >> 4)
+ s[12] = byte(s4 >> 12)
+ s[13] = byte((s4 >> 20) | (s5 << 1))
+ s[14] = byte(s5 >> 7)
+ s[15] = byte((s5 >> 15) | (s6 << 6))
+ s[16] = byte(s6 >> 2)
+ s[17] = byte(s6 >> 10)
+ s[18] = byte((s6 >> 18) | (s7 << 3))
+ s[19] = byte(s7 >> 5)
+ s[20] = byte(s7 >> 13)
+ s[21] = byte(s8 >> 0)
+ s[22] = byte(s8 >> 8)
+ s[23] = byte((s8 >> 16) | (s9 << 5))
+ s[24] = byte(s9 >> 3)
+ s[25] = byte(s9 >> 11)
+ s[26] = byte((s9 >> 19) | (s10 << 2))
+ s[27] = byte(s10 >> 6)
+ s[28] = byte((s10 >> 14) | (s11 << 7))
+ s[29] = byte(s11 >> 1)
+ s[30] = byte(s11 >> 9)
+ s[31] = byte(s11 >> 17)
+}
+
+// Input:
+// s[0]+256*s[1]+...+256^63*s[63] = s
+//
+// Output:
+// s[0]+256*s[1]+...+256^31*s[31] = s mod l
+// where l = 2^252 + 27742317777372353535851937790883648493.
+func ScReduce(out *[32]byte, s *[64]byte) {
+ s0 := 2097151 & load3(s[:])
+ s1 := 2097151 & (load4(s[2:]) >> 5)
+ s2 := 2097151 & (load3(s[5:]) >> 2)
+ s3 := 2097151 & (load4(s[7:]) >> 7)
+ s4 := 2097151 & (load4(s[10:]) >> 4)
+ s5 := 2097151 & (load3(s[13:]) >> 1)
+ s6 := 2097151 & (load4(s[15:]) >> 6)
+ s7 := 2097151 & (load3(s[18:]) >> 3)
+ s8 := 2097151 & load3(s[21:])
+ s9 := 2097151 & (load4(s[23:]) >> 5)
+ s10 := 2097151 & (load3(s[26:]) >> 2)
+ s11 := 2097151 & (load4(s[28:]) >> 7)
+ s12 := 2097151 & (load4(s[31:]) >> 4)
+ s13 := 2097151 & (load3(s[34:]) >> 1)
+ s14 := 2097151 & (load4(s[36:]) >> 6)
+ s15 := 2097151 & (load3(s[39:]) >> 3)
+ s16 := 2097151 & load3(s[42:])
+ s17 := 2097151 & (load4(s[44:]) >> 5)
+ s18 := 2097151 & (load3(s[47:]) >> 2)
+ s19 := 2097151 & (load4(s[49:]) >> 7)
+ s20 := 2097151 & (load4(s[52:]) >> 4)
+ s21 := 2097151 & (load3(s[55:]) >> 1)
+ s22 := 2097151 & (load4(s[57:]) >> 6)
+ s23 := (load4(s[60:]) >> 3)
+
+ s11 += s23 * 666643
+ s12 += s23 * 470296
+ s13 += s23 * 654183
+ s14 -= s23 * 997805
+ s15 += s23 * 136657
+ s16 -= s23 * 683901
+ s23 = 0
+
+ s10 += s22 * 666643
+ s11 += s22 * 470296
+ s12 += s22 * 654183
+ s13 -= s22 * 997805
+ s14 += s22 * 136657
+ s15 -= s22 * 683901
+ s22 = 0
+
+ s9 += s21 * 666643
+ s10 += s21 * 470296
+ s11 += s21 * 654183
+ s12 -= s21 * 997805
+ s13 += s21 * 136657
+ s14 -= s21 * 683901
+ s21 = 0
+
+ s8 += s20 * 666643
+ s9 += s20 * 470296
+ s10 += s20 * 654183
+ s11 -= s20 * 997805
+ s12 += s20 * 136657
+ s13 -= s20 * 683901
+ s20 = 0
+
+ s7 += s19 * 666643
+ s8 += s19 * 470296
+ s9 += s19 * 654183
+ s10 -= s19 * 997805
+ s11 += s19 * 136657
+ s12 -= s19 * 683901
+ s19 = 0
+
+ s6 += s18 * 666643
+ s7 += s18 * 470296
+ s8 += s18 * 654183
+ s9 -= s18 * 997805
+ s10 += s18 * 136657
+ s11 -= s18 * 683901
+ s18 = 0
+
+ var carry [17]int64
+
+ carry[6] = (s6 + (1 << 20)) >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[8] = (s8 + (1 << 20)) >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[10] = (s10 + (1 << 20)) >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+ carry[12] = (s12 + (1 << 20)) >> 21
+ s13 += carry[12]
+ s12 -= carry[12] << 21
+ carry[14] = (s14 + (1 << 20)) >> 21
+ s15 += carry[14]
+ s14 -= carry[14] << 21
+ carry[16] = (s16 + (1 << 20)) >> 21
+ s17 += carry[16]
+ s16 -= carry[16] << 21
+
+ carry[7] = (s7 + (1 << 20)) >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[9] = (s9 + (1 << 20)) >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[11] = (s11 + (1 << 20)) >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+ carry[13] = (s13 + (1 << 20)) >> 21
+ s14 += carry[13]
+ s13 -= carry[13] << 21
+ carry[15] = (s15 + (1 << 20)) >> 21
+ s16 += carry[15]
+ s15 -= carry[15] << 21
+
+ s5 += s17 * 666643
+ s6 += s17 * 470296
+ s7 += s17 * 654183
+ s8 -= s17 * 997805
+ s9 += s17 * 136657
+ s10 -= s17 * 683901
+ s17 = 0
+
+ s4 += s16 * 666643
+ s5 += s16 * 470296
+ s6 += s16 * 654183
+ s7 -= s16 * 997805
+ s8 += s16 * 136657
+ s9 -= s16 * 683901
+ s16 = 0
+
+ s3 += s15 * 666643
+ s4 += s15 * 470296
+ s5 += s15 * 654183
+ s6 -= s15 * 997805
+ s7 += s15 * 136657
+ s8 -= s15 * 683901
+ s15 = 0
+
+ s2 += s14 * 666643
+ s3 += s14 * 470296
+ s4 += s14 * 654183
+ s5 -= s14 * 997805
+ s6 += s14 * 136657
+ s7 -= s14 * 683901
+ s14 = 0
+
+ s1 += s13 * 666643
+ s2 += s13 * 470296
+ s3 += s13 * 654183
+ s4 -= s13 * 997805
+ s5 += s13 * 136657
+ s6 -= s13 * 683901
+ s13 = 0
+
+ s0 += s12 * 666643
+ s1 += s12 * 470296
+ s2 += s12 * 654183
+ s3 -= s12 * 997805
+ s4 += s12 * 136657
+ s5 -= s12 * 683901
+ s12 = 0
+
+ carry[0] = (s0 + (1 << 20)) >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[2] = (s2 + (1 << 20)) >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[4] = (s4 + (1 << 20)) >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[6] = (s6 + (1 << 20)) >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[8] = (s8 + (1 << 20)) >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[10] = (s10 + (1 << 20)) >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+
+ carry[1] = (s1 + (1 << 20)) >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[3] = (s3 + (1 << 20)) >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[5] = (s5 + (1 << 20)) >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[7] = (s7 + (1 << 20)) >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[9] = (s9 + (1 << 20)) >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[11] = (s11 + (1 << 20)) >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+
+ s0 += s12 * 666643
+ s1 += s12 * 470296
+ s2 += s12 * 654183
+ s3 -= s12 * 997805
+ s4 += s12 * 136657
+ s5 -= s12 * 683901
+ s12 = 0
+
+ carry[0] = s0 >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[1] = s1 >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[2] = s2 >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[3] = s3 >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[4] = s4 >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[5] = s5 >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[6] = s6 >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[7] = s7 >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[8] = s8 >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[9] = s9 >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[10] = s10 >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+ carry[11] = s11 >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+
+ s0 += s12 * 666643
+ s1 += s12 * 470296
+ s2 += s12 * 654183
+ s3 -= s12 * 997805
+ s4 += s12 * 136657
+ s5 -= s12 * 683901
+ s12 = 0
+
+ carry[0] = s0 >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[1] = s1 >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[2] = s2 >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[3] = s3 >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[4] = s4 >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[5] = s5 >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[6] = s6 >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[7] = s7 >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[8] = s8 >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[9] = s9 >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[10] = s10 >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+
+ out[0] = byte(s0 >> 0)
+ out[1] = byte(s0 >> 8)
+ out[2] = byte((s0 >> 16) | (s1 << 5))
+ out[3] = byte(s1 >> 3)
+ out[4] = byte(s1 >> 11)
+ out[5] = byte((s1 >> 19) | (s2 << 2))
+ out[6] = byte(s2 >> 6)
+ out[7] = byte((s2 >> 14) | (s3 << 7))
+ out[8] = byte(s3 >> 1)
+ out[9] = byte(s3 >> 9)
+ out[10] = byte((s3 >> 17) | (s4 << 4))
+ out[11] = byte(s4 >> 4)
+ out[12] = byte(s4 >> 12)
+ out[13] = byte((s4 >> 20) | (s5 << 1))
+ out[14] = byte(s5 >> 7)
+ out[15] = byte((s5 >> 15) | (s6 << 6))
+ out[16] = byte(s6 >> 2)
+ out[17] = byte(s6 >> 10)
+ out[18] = byte((s6 >> 18) | (s7 << 3))
+ out[19] = byte(s7 >> 5)
+ out[20] = byte(s7 >> 13)
+ out[21] = byte(s8 >> 0)
+ out[22] = byte(s8 >> 8)
+ out[23] = byte((s8 >> 16) | (s9 << 5))
+ out[24] = byte(s9 >> 3)
+ out[25] = byte(s9 >> 11)
+ out[26] = byte((s9 >> 19) | (s10 << 2))
+ out[27] = byte(s10 >> 6)
+ out[28] = byte((s10 >> 14) | (s11 << 7))
+ out[29] = byte(s11 >> 1)
+ out[30] = byte(s11 >> 9)
+ out[31] = byte(s11 >> 17)
+}
+
+// order is the order of Curve25519 in little-endian form.
+var order = [4]uint64{0x5812631a5cf5d3ed, 0x14def9dea2f79cd6, 0, 0x1000000000000000}
+
+// ScMinimal returns true if the given scalar is less than the order of the
+// curve.
+func ScMinimal(scalar *[32]byte) bool {
+ for i := 3; ; i-- {
+ v := binary.LittleEndian.Uint64(scalar[i*8:])
+ if v > order[i] {
+ return false
+ } else if v < order[i] {
+ break
+ } else if i == 0 {
+ return false
+ }
+ }
+
+ return true
+}
diff --git a/vendor/github.com/cretz/bine/torutil/key.go b/vendor/github.com/cretz/bine/torutil/key.go
new file mode 100644
index 0000000..70407e2
--- /dev/null
+++ b/vendor/github.com/cretz/bine/torutil/key.go
@@ -0,0 +1,85 @@
+package torutil
+
+import (
+ "crypto"
+ "crypto/rsa"
+ "crypto/sha1"
+ "crypto/x509"
+ "encoding/base32"
+ "fmt"
+ "strings"
+
+ "github.com/cretz/bine/torutil/ed25519"
+ "golang.org/x/crypto/sha3"
+)
+
+var serviceIDEncoding = base32.StdEncoding.WithPadding(base32.NoPadding)
+
+// OnionServiceIDFromPrivateKey generates the onion service ID from the given
+// private key. This panics if the private key is not a 1024-bit
+// crypto/*rsa.PrivateKey or github.com/cretz/bine/torutil/ed25519.KeyPair.
+func OnionServiceIDFromPrivateKey(key crypto.PrivateKey) string {
+ switch k := key.(type) {
+ case *rsa.PrivateKey:
+ return OnionServiceIDFromV2PublicKey(&k.PublicKey)
+ case ed25519.KeyPair:
+ return OnionServiceIDFromV3PublicKey(k.PublicKey())
+ }
+ panic(fmt.Sprintf("Unrecognized private key type: %T", key))
+}
+
+// OnionServiceIDFromPublicKey generates the onion service ID from the given
+// public key. This panics if the public key is not a 1024-bit
+// crypto/*rsa.PublicKey or github.com/cretz/bine/torutil/ed25519.PublicKey.
+func OnionServiceIDFromPublicKey(key crypto.PublicKey) string {
+ switch k := key.(type) {
+ case *rsa.PublicKey:
+ return OnionServiceIDFromV2PublicKey(k)
+ case ed25519.PublicKey:
+ return OnionServiceIDFromV3PublicKey(k)
+ }
+ panic(fmt.Sprintf("Unrecognized public key type: %T", key))
+}
+
+// OnionServiceIDFromV2PublicKey generates a V2 service ID for the given
+// RSA-1024 public key. Panics if not a 1024-bit key.
+func OnionServiceIDFromV2PublicKey(key *rsa.PublicKey) string {
+ if key.N.BitLen() != 1024 {
+ panic("RSA key not 1024 bit")
+ }
+ h := sha1.New()
+ h.Write(x509.MarshalPKCS1PublicKey(key))
+ return strings.ToLower(serviceIDEncoding.EncodeToString(h.Sum(nil)[:10]))
+}
+
+// OnionServiceIDFromV3PublicKey generates a V3 service ID for the given
+// ED25519 public key.
+func OnionServiceIDFromV3PublicKey(key ed25519.PublicKey) string {
+ checkSum := sha3.Sum256(append(append([]byte(".onion checksum"), key...), 0x03))
+ var keyBytes [35]byte
+ copy(keyBytes[:], key)
+ keyBytes[32] = checkSum[0]
+ keyBytes[33] = checkSum[1]
+ keyBytes[34] = 0x03
+ return strings.ToLower(serviceIDEncoding.EncodeToString(keyBytes[:]))
+}
+
+// PublicKeyFromV3OnionServiceID returns a public key for the given service ID
+// or an error if the service ID is invalid.
+func PublicKeyFromV3OnionServiceID(id string) (ed25519.PublicKey, error) {
+ byts, err := serviceIDEncoding.DecodeString(strings.ToUpper(id))
+ if err != nil {
+ return nil, err
+ } else if len(byts) != 35 {
+ return nil, fmt.Errorf("Invalid id length")
+ } else if byts[34] != 0x03 {
+ return nil, fmt.Errorf("Invalid version")
+ }
+ // Do a checksum check
+ key := ed25519.PublicKey(byts[:32])
+ checkSum := sha3.Sum256(append(append([]byte(".onion checksum"), key...), 0x03))
+ if byts[32] != checkSum[0] || byts[33] != checkSum[1] {
+ return nil, fmt.Errorf("Invalid checksum")
+ }
+ return key, nil
+}
diff --git a/vendor/github.com/cretz/bine/torutil/string.go b/vendor/github.com/cretz/bine/torutil/string.go
new file mode 100644
index 0000000..86cee96
--- /dev/null
+++ b/vendor/github.com/cretz/bine/torutil/string.go
@@ -0,0 +1,112 @@
+package torutil
+
+import (
+ "fmt"
+ "strings"
+)
+
+// PartitionString returns the two parts of a string delimited by the first
+// occurrence of ch. If ch does not exist, the second string is empty and the
+// resulting bool is false. Otherwise it is true.
+func PartitionString(str string, ch byte) (string, string, bool) {
+ index := strings.IndexByte(str, ch)
+ if index == -1 {
+ return str, "", false
+ }
+ return str[:index], str[index+1:], true
+}
+
+// PartitionStringFromEnd is same as PartitionString except it delimts by the
+// last occurrence of ch instead of the first.
+func PartitionStringFromEnd(str string, ch byte) (string, string, bool) {
+ index := strings.LastIndexByte(str, ch)
+ if index == -1 {
+ return str, "", false
+ }
+ return str[:index], str[index+1:], true
+}
+
+// EscapeSimpleQuotedStringIfNeeded calls EscapeSimpleQuotedString only if the
+// string contains a space, backslash, double quote, newline, or carriage return
+// character.
+func EscapeSimpleQuotedStringIfNeeded(str string) string {
+ if strings.ContainsAny(str, " \\\"\r\n") {
+ return EscapeSimpleQuotedString(str)
+ }
+ return str
+}
+
+var simpleQuotedStringEscapeReplacer = strings.NewReplacer(
+ "\\", "\\\\",
+ "\"", "\\\"",
+ "\r", "\\r",
+ "\n", "\\n",
+)
+
+// EscapeSimpleQuotedString calls EscapeSimpleQuotedStringContents and then
+// surrounds the entire string with double quotes.
+func EscapeSimpleQuotedString(str string) string {
+ return "\"" + EscapeSimpleQuotedStringContents(str) + "\""
+}
+
+// EscapeSimpleQuotedStringContents escapes backslashes, double quotes,
+// newlines, and carriage returns in str.
+func EscapeSimpleQuotedStringContents(str string) string {
+ return simpleQuotedStringEscapeReplacer.Replace(str)
+}
+
+// UnescapeSimpleQuotedStringIfNeeded calls UnescapeSimpleQuotedString only if
+// str is surrounded with double quotes.
+func UnescapeSimpleQuotedStringIfNeeded(str string) (string, error) {
+ if len(str) >= 2 && str[0] == '"' && str[len(str)-1] == '"' {
+ return UnescapeSimpleQuotedString(str)
+ }
+ return str, nil
+}
+
+// UnescapeSimpleQuotedString removes surrounding double quotes and calls
+// UnescapeSimpleQuotedStringContents.
+func UnescapeSimpleQuotedString(str string) (string, error) {
+ if len(str) < 2 || str[0] != '"' || str[len(str)-1] != '"' {
+ return "", fmt.Errorf("Missing quotes")
+ }
+ return UnescapeSimpleQuotedStringContents(str[1 : len(str)-1])
+}
+
+// UnescapeSimpleQuotedStringContents unescapes backslashes, double quotes,
+// newlines, and carriage returns. Also errors if those aren't escaped.
+func UnescapeSimpleQuotedStringContents(str string) (string, error) {
+ ret := ""
+ escaping := false
+ for _, c := range str {
+ switch c {
+ case '\\':
+ if escaping {
+ ret += "\\"
+ }
+ escaping = !escaping
+ case '"':
+ if !escaping {
+ return "", fmt.Errorf("Unescaped quote")
+ }
+ ret += "\""
+ escaping = false
+ case '\r', '\n':
+ return "", fmt.Errorf("Unescaped newline or carriage return")
+ default:
+ if escaping {
+ if c == 'r' {
+ ret += "\r"
+ } else if c == 'n' {
+ ret += "\n"
+ } else {
+ return "", fmt.Errorf("Unexpected escape")
+ }
+ } else {
+ ret += string(c)
+ }
+ escaping = false
+ }
+ }
+ return ret, nil
+}
diff --git a/vendor/github.com/google/uuid/.travis.yml b/vendor/github.com/google/uuid/.travis.yml
new file mode 100644
index 0000000..d8156a6
--- /dev/null
+++ b/vendor/github.com/google/uuid/.travis.yml
@@ -0,0 +1,9 @@
+language: go
+
+go:
+ - 1.4.3
+ - 1.5.3
+ - tip
+
+script:
+ - go test -v ./...
diff --git a/vendor/github.com/google/uuid/CONTRIBUTING.md b/vendor/github.com/google/uuid/CONTRIBUTING.md
new file mode 100644
index 0000000..04fdf09
--- /dev/null
+++ b/vendor/github.com/google/uuid/CONTRIBUTING.md
@@ -0,0 +1,10 @@
+# How to contribute
+
+We definitely welcome patches and contribution to this project!
+
+### Legal requirements
+
+In order to protect both you and ourselves, you will need to sign the
+[Contributor License Agreement](https://cla.developers.google.com/clas).
+
+You may have already signed it for other Google projects.
diff --git a/vendor/github.com/google/uuid/CONTRIBUTORS b/vendor/github.com/google/uuid/CONTRIBUTORS
new file mode 100644
index 0000000..b4bb97f
--- /dev/null
+++ b/vendor/github.com/google/uuid/CONTRIBUTORS
@@ -0,0 +1,9 @@
+Paul Borman <borman@google.com>
+bmatsuo
+shawnps
+theory
+jboverfelt
+dsymonds
+cd1
+wallclockbuilder
+dansouza
diff --git a/vendor/github.com/google/uuid/LICENSE b/vendor/github.com/google/uuid/LICENSE
new file mode 100644
index 0000000..5dc6826
--- /dev/null
+++ b/vendor/github.com/google/uuid/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2009,2014 Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/google/uuid/README.md b/vendor/github.com/google/uuid/README.md
new file mode 100644
index 0000000..f765a46
--- /dev/null
+++ b/vendor/github.com/google/uuid/README.md
@@ -0,0 +1,19 @@
+# uuid ![build status](https://travis-ci.org/google/uuid.svg?branch=master)
+The uuid package generates and inspects UUIDs based on
+[RFC 4122](http://tools.ietf.org/html/rfc4122)
+and DCE 1.1: Authentication and Security Services.
+
+This package is based on the github.com/pborman/uuid package (previously named
+code.google.com/p/go-uuid). It differs from these earlier packages in that
+a UUID is a 16 byte array rather than a byte slice. One loss due to this
+change is the ability to represent an invalid UUID (vs a NIL UUID).
+
+###### Install
+`go get github.com/google/uuid`
+
+###### Documentation
+[![GoDoc](https://godoc.org/github.com/google/uuid?status.svg)](http://godoc.org/github.com/google/uuid)
+
+Full `go doc` style documentation for the package can be viewed online without
+installing this package by using the GoDoc site here:
+http://pkg.go.dev/github.com/google/uuid
diff --git a/vendor/github.com/google/uuid/dce.go b/vendor/github.com/google/uuid/dce.go
new file mode 100644
index 0000000..fa820b9
--- /dev/null
+++ b/vendor/github.com/google/uuid/dce.go
@@ -0,0 +1,80 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "encoding/binary"
+ "fmt"
+ "os"
+)
+
+// A Domain represents a Version 2 domain
+type Domain byte
+
+// Domain constants for DCE Security (Version 2) UUIDs.
+const (
+ Person = Domain(0)
+ Group = Domain(1)
+ Org = Domain(2)
+)
+
+// NewDCESecurity returns a DCE Security (Version 2) UUID.
+//
+// The domain should be one of Person, Group or Org.
+// On a POSIX system the id should be the users UID for the Person
+// domain and the users GID for the Group. The meaning of id for
+// the domain Org or on non-POSIX systems is site defined.
+//
+// For a given domain/id pair the same token may be returned for up to
+// 7 minutes and 10 seconds.
+func NewDCESecurity(domain Domain, id uint32) (UUID, error) {
+ uuid, err := NewUUID()
+ if err == nil {
+ uuid[6] = (uuid[6] & 0x0f) | 0x20 // Version 2
+ uuid[9] = byte(domain)
+ binary.BigEndian.PutUint32(uuid[0:], id)
+ }
+ return uuid, err
+}
+
+// NewDCEPerson returns a DCE Security (Version 2) UUID in the person
+// domain with the id returned by os.Getuid.
+//
+// NewDCESecurity(Person, uint32(os.Getuid()))
+func NewDCEPerson() (UUID, error) {
+ return NewDCESecurity(Person, uint32(os.Getuid()))
+}
+
+// NewDCEGroup returns a DCE Security (Version 2) UUID in the group
+// domain with the id returned by os.Getgid.
+//
+// NewDCESecurity(Group, uint32(os.Getgid()))
+func NewDCEGroup() (UUID, error) {
+ return NewDCESecurity(Group, uint32(os.Getgid()))
+}
+
+// Domain returns the domain for a Version 2 UUID. Domains are only defined
+// for Version 2 UUIDs.
+func (uuid UUID) Domain() Domain {
+ return Domain(uuid[9])
+}
+
+// ID returns the id for a Version 2 UUID. IDs are only defined for Version 2
+// UUIDs.
+func (uuid UUID) ID() uint32 {
+ return binary.BigEndian.Uint32(uuid[0:4])
+}
+
+func (d Domain) String() string {
+ switch d {
+ case Person:
+ return "Person"
+ case Group:
+ return "Group"
+ case Org:
+ return "Org"
+ }
+ return fmt.Sprintf("Domain%d", int(d))
+}
diff --git a/vendor/github.com/google/uuid/doc.go b/vendor/github.com/google/uuid/doc.go
new file mode 100644
index 0000000..5b8a4b9
--- /dev/null
+++ b/vendor/github.com/google/uuid/doc.go
@@ -0,0 +1,12 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package uuid generates and inspects UUIDs.
+//
+// UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security
+// Services.
+//
+// A UUID is a 16 byte (128 bit) array. UUIDs may be used as keys to
+// maps or compared directly.
+package uuid
diff --git a/vendor/github.com/google/uuid/go.mod b/vendor/github.com/google/uuid/go.mod
new file mode 100644
index 0000000..fc84cd7
--- /dev/null
+++ b/vendor/github.com/google/uuid/go.mod
@@ -0,0 +1 @@
+module github.com/google/uuid
diff --git a/vendor/github.com/google/uuid/hash.go b/vendor/github.com/google/uuid/hash.go
new file mode 100644
index 0000000..b404f4b
--- /dev/null
+++ b/vendor/github.com/google/uuid/hash.go
@@ -0,0 +1,53 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "crypto/md5"
+ "crypto/sha1"
+ "hash"
+)
+
+// Well known namespace IDs and UUIDs
+var (
+ NameSpaceDNS = Must(Parse("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
+ NameSpaceURL = Must(Parse("6ba7b811-9dad-11d1-80b4-00c04fd430c8"))
+ NameSpaceOID = Must(Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8"))
+ NameSpaceX500 = Must(Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8"))
+ Nil UUID // empty UUID, all zeros
+)
+
+// NewHash returns a new UUID derived from the hash of space concatenated with
+// data generated by h. The hash should be at least 16 byte in length. The
+// first 16 bytes of the hash are used to form the UUID. The version of the
+// UUID will be the lower 4 bits of version. NewHash is used to implement
+// NewMD5 and NewSHA1.
+func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID {
+ h.Reset()
+ h.Write(space[:]) //nolint:errcheck
+ h.Write(data) //nolint:errcheck
+ s := h.Sum(nil)
+ var uuid UUID
+ copy(uuid[:], s)
+ uuid[6] = (uuid[6] & 0x0f) | uint8((version&0xf)<<4)
+ uuid[8] = (uuid[8] & 0x3f) | 0x80 // RFC 4122 variant
+ return uuid
+}
+
+// NewMD5 returns a new MD5 (Version 3) UUID based on the
+// supplied name space and data. It is the same as calling:
+//
+// NewHash(md5.New(), space, data, 3)
+func NewMD5(space UUID, data []byte) UUID {
+ return NewHash(md5.New(), space, data, 3)
+}
+
+// NewSHA1 returns a new SHA1 (Version 5) UUID based on the
+// supplied name space and data. It is the same as calling:
+//
+// NewHash(sha1.New(), space, data, 5)
+func NewSHA1(space UUID, data []byte) UUID {
+ return NewHash(sha1.New(), space, data, 5)
+}
diff --git a/vendor/github.com/google/uuid/marshal.go b/vendor/github.com/google/uuid/marshal.go
new file mode 100644
index 0000000..14bd340
--- /dev/null
+++ b/vendor/github.com/google/uuid/marshal.go
@@ -0,0 +1,38 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import "fmt"
+
+// MarshalText implements encoding.TextMarshaler.
+func (uuid UUID) MarshalText() ([]byte, error) {
+ var js [36]byte
+ encodeHex(js[:], uuid)
+ return js[:], nil
+}
+
+// UnmarshalText implements encoding.TextUnmarshaler.
+func (uuid *UUID) UnmarshalText(data []byte) error {
+ id, err := ParseBytes(data)
+ if err != nil {
+ return err
+ }
+ *uuid = id
+ return nil
+}
+
+// MarshalBinary implements encoding.BinaryMarshaler.
+func (uuid UUID) MarshalBinary() ([]byte, error) {
+ return uuid[:], nil
+}
+
+// UnmarshalBinary implements encoding.BinaryUnmarshaler.
+func (uuid *UUID) UnmarshalBinary(data []byte) error {
+ if len(data) != 16 {
+ return fmt.Errorf("invalid UUID (got %d bytes)", len(data))
+ }
+ copy(uuid[:], data)
+ return nil
+}
diff --git a/vendor/github.com/google/uuid/node.go b/vendor/github.com/google/uuid/node.go
new file mode 100644
index 0000000..d651a2b
--- /dev/null
+++ b/vendor/github.com/google/uuid/node.go
@@ -0,0 +1,90 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "sync"
+)
+
+var (
+ nodeMu sync.Mutex
+ ifname string // name of interface being used
+ nodeID [6]byte // hardware for version 1 UUIDs
+ zeroID [6]byte // nodeID with only 0's
+)
+
+// NodeInterface returns the name of the interface from which the NodeID was
+// derived. The interface "user" is returned if the NodeID was set by
+// SetNodeID.
+func NodeInterface() string {
+ defer nodeMu.Unlock()
+ nodeMu.Lock()
+ return ifname
+}
+
+// SetNodeInterface selects the hardware address to be used for Version 1 UUIDs.
+// If name is "" then the first usable interface found will be used or a random
+// Node ID will be generated. If a named interface cannot be found then false
+// is returned.
+//
+// SetNodeInterface never fails when name is "".
+func SetNodeInterface(name string) bool {
+ defer nodeMu.Unlock()
+ nodeMu.Lock()
+ return setNodeInterface(name)
+}
+
+func setNodeInterface(name string) bool {
+ iname, addr := getHardwareInterface(name) // null implementation for js
+ if iname != "" && addr != nil {
+ ifname = iname
+ copy(nodeID[:], addr)
+ return true
+ }
+
+ // We found no interfaces with a valid hardware address. If name
+ // does not specify a specific interface generate a random Node ID
+ // (section 4.1.6)
+ if name == "" {
+ ifname = "random"
+ randomBits(nodeID[:])
+ return true
+ }
+ return false
+}
+
+// NodeID returns a slice of a copy of the current Node ID, setting the Node ID
+// if not already set.
+func NodeID() []byte {
+ defer nodeMu.Unlock()
+ nodeMu.Lock()
+ if nodeID == zeroID {
+ setNodeInterface("")
+ }
+ nid := nodeID
+ return nid[:]
+}
+
+// SetNodeID sets the Node ID to be used for Version 1 UUIDs. The first 6 bytes
+// of id are used. If id is less than 6 bytes then false is returned and the
+// Node ID is not set.
+func SetNodeID(id []byte) bool {
+ if len(id) < 6 {
+ return false
+ }
+ defer nodeMu.Unlock()
+ nodeMu.Lock()
+ copy(nodeID[:], id)
+ ifname = "user"
+ return true
+}
+
+// NodeID returns the 6 byte node id encoded in uuid. It returns nil if uuid is
+// not valid. The NodeID is only well defined for version 1 and 2 UUIDs.
+func (uuid UUID) NodeID() []byte {
+ var node [6]byte
+ copy(node[:], uuid[10:])
+ return node[:]
+}
diff --git a/vendor/github.com/google/uuid/node_js.go b/vendor/github.com/google/uuid/node_js.go
new file mode 100644
index 0000000..24b78ed
--- /dev/null
+++ b/vendor/github.com/google/uuid/node_js.go
@@ -0,0 +1,12 @@
+// Copyright 2017 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build js
+
+package uuid
+
+// getHardwareInterface returns nil values for the JS version of the code.
+// This remvoves the "net" dependency, because it is not used in the browser.
+// Using the "net" library inflates the size of the transpiled JS code by 673k bytes.
+func getHardwareInterface(name string) (string, []byte) { return "", nil }
diff --git a/vendor/github.com/google/uuid/node_net.go b/vendor/github.com/google/uuid/node_net.go
new file mode 100644
index 0000000..0cbbcdd
--- /dev/null
+++ b/vendor/github.com/google/uuid/node_net.go
@@ -0,0 +1,33 @@
+// Copyright 2017 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !js
+
+package uuid
+
+import "net"
+
+var interfaces []net.Interface // cached list of interfaces
+
+// getHardwareInterface returns the name and hardware address of interface name.
+// If name is "" then the name and hardware address of one of the system's
+// interfaces is returned. If no interfaces are found (name does not exist or
+// there are no interfaces) then "", nil is returned.
+//
+// Only addresses of at least 6 bytes are returned.
+func getHardwareInterface(name string) (string, []byte) {
+ if interfaces == nil {
+ var err error
+ interfaces, err = net.Interfaces()
+ if err != nil {
+ return "", nil
+ }
+ }
+ for _, ifs := range interfaces {
+ if len(ifs.HardwareAddr) >= 6 && (name == "" || name == ifs.Name) {
+ return ifs.Name, ifs.HardwareAddr
+ }
+ }
+ return "", nil
+}
diff --git a/vendor/github.com/google/uuid/sql.go b/vendor/github.com/google/uuid/sql.go
new file mode 100644
index 0000000..2e02ec0
--- /dev/null
+++ b/vendor/github.com/google/uuid/sql.go
@@ -0,0 +1,59 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "database/sql/driver"
+ "fmt"
+)
+
+// Scan implements sql.Scanner so UUIDs can be read from databases transparently.
+// Currently, database types that map to string and []byte are supported. Please
+// consult database-specific driver documentation for matching types.
+func (uuid *UUID) Scan(src interface{}) error {
+ switch src := src.(type) {
+ case nil:
+ return nil
+
+ case string:
+ // if an empty UUID comes from a table, we return a null UUID
+ if src == "" {
+ return nil
+ }
+
+ // see Parse for required string format
+ u, err := Parse(src)
+ if err != nil {
+ return fmt.Errorf("Scan: %v", err)
+ }
+
+ *uuid = u
+
+ case []byte:
+ // if an empty UUID comes from a table, we return a null UUID
+ if len(src) == 0 {
+ return nil
+ }
+
+ // assumes a simple slice of bytes if 16 bytes
+ // otherwise attempts to parse
+ if len(src) != 16 {
+ return uuid.Scan(string(src))
+ }
+ copy((*uuid)[:], src)
+
+ default:
+ return fmt.Errorf("Scan: unable to scan type %T into UUID", src)
+ }
+
+ return nil
+}
+
+// Value implements sql.Valuer so that UUIDs can be written to databases
+// transparently. Currently, UUIDs map to strings. Please consult
+// database-specific driver documentation for matching types.
+func (uuid UUID) Value() (driver.Value, error) {
+ return uuid.String(), nil
+}
diff --git a/vendor/github.com/google/uuid/time.go b/vendor/github.com/google/uuid/time.go
new file mode 100644
index 0000000..e6ef06c
--- /dev/null
+++ b/vendor/github.com/google/uuid/time.go
@@ -0,0 +1,123 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "encoding/binary"
+ "sync"
+ "time"
+)
+
+// A Time represents a time as the number of 100's of nanoseconds since 15 Oct
+// 1582.
+type Time int64
+
+const (
+ lillian = 2299160 // Julian day of 15 Oct 1582
+ unix = 2440587 // Julian day of 1 Jan 1970
+ epoch = unix - lillian // Days between epochs
+ g1582 = epoch * 86400 // seconds between epochs
+ g1582ns100 = g1582 * 10000000 // 100s of a nanoseconds between epochs
+)
+
+var (
+ timeMu sync.Mutex
+ lasttime uint64 // last time we returned
+ clockSeq uint16 // clock sequence for this run
+
+ timeNow = time.Now // for testing
+)
+
+// UnixTime converts t the number of seconds and nanoseconds using the Unix
+// epoch of 1 Jan 1970.
+func (t Time) UnixTime() (sec, nsec int64) {
+ sec = int64(t - g1582ns100)
+ nsec = (sec % 10000000) * 100
+ sec /= 10000000
+ return sec, nsec
+}
+
+// GetTime returns the current Time (100s of nanoseconds since 15 Oct 1582) and
+// clock sequence as well as adjusting the clock sequence as needed. An error
+// is returned if the current time cannot be determined.
+func GetTime() (Time, uint16, error) {
+ defer timeMu.Unlock()
+ timeMu.Lock()
+ return getTime()
+}
+
+func getTime() (Time, uint16, error) {
+ t := timeNow()
+
+ // If we don't have a clock sequence already, set one.
+ if clockSeq == 0 {
+ setClockSequence(-1)
+ }
+ now := uint64(t.UnixNano()/100) + g1582ns100
+
+ // If time has gone backwards with this clock sequence then we
+ // increment the clock sequence
+ if now <= lasttime {
+ clockSeq = ((clockSeq + 1) & 0x3fff) | 0x8000
+ }
+ lasttime = now
+ return Time(now), clockSeq, nil
+}
+
+// ClockSequence returns the current clock sequence, generating one if not
+// already set. The clock sequence is only used for Version 1 UUIDs.
+//
+// The uuid package does not use global static storage for the clock sequence or
+// the last time a UUID was generated. Unless SetClockSequence is used, a new
+// random clock sequence is generated the first time a clock sequence is
+// requested by ClockSequence, GetTime, or NewUUID. (section 4.2.1.1)
+func ClockSequence() int {
+ defer timeMu.Unlock()
+ timeMu.Lock()
+ return clockSequence()
+}
+
+func clockSequence() int {
+ if clockSeq == 0 {
+ setClockSequence(-1)
+ }
+ return int(clockSeq & 0x3fff)
+}
+
+// SetClockSequence sets the clock sequence to the lower 14 bits of seq. Setting to
+// -1 causes a new sequence to be generated.
+func SetClockSequence(seq int) {
+ defer timeMu.Unlock()
+ timeMu.Lock()
+ setClockSequence(seq)
+}
+
+func setClockSequence(seq int) {
+ if seq == -1 {
+ var b [2]byte
+ randomBits(b[:]) // clock sequence
+ seq = int(b[0])<<8 | int(b[1])
+ }
+ oldSeq := clockSeq
+ clockSeq = uint16(seq&0x3fff) | 0x8000 // Set our variant
+ if oldSeq != clockSeq {
+ lasttime = 0
+ }
+}
+
+// Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in
+// uuid. The time is only defined for version 1 and 2 UUIDs.
+func (uuid UUID) Time() Time {
+ time := int64(binary.BigEndian.Uint32(uuid[0:4]))
+ time |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32
+ time |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48
+ return Time(time)
+}
+
+// ClockSequence returns the clock sequence encoded in uuid.
+// The clock sequence is only well defined for version 1 and 2 UUIDs.
+func (uuid UUID) ClockSequence() int {
+ return int(binary.BigEndian.Uint16(uuid[8:10])) & 0x3fff
+}
diff --git a/vendor/github.com/google/uuid/util.go b/vendor/github.com/google/uuid/util.go
new file mode 100644
index 0000000..5ea6c73
--- /dev/null
+++ b/vendor/github.com/google/uuid/util.go
@@ -0,0 +1,43 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "io"
+)
+
+// randomBits completely fills slice b with random data.
+func randomBits(b []byte) {
+ if _, err := io.ReadFull(rander, b); err != nil {
+ panic(err.Error()) // rand should never fail
+ }
+}
+
+// xvalues returns the value of a byte as a hexadecimal digit or 255.
+var xvalues = [256]byte{
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 255, 255, 255, 255, 255,
+ 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+}
+
+// xtob converts hex characters x1 and x2 into a byte.
+func xtob(x1, x2 byte) (byte, bool) {
+ b1 := xvalues[x1]
+ b2 := xvalues[x2]
+ return (b1 << 4) | b2, b1 != 255 && b2 != 255
+}
diff --git a/vendor/github.com/google/uuid/uuid.go b/vendor/github.com/google/uuid/uuid.go
new file mode 100644
index 0000000..60d26bb
--- /dev/null
+++ b/vendor/github.com/google/uuid/uuid.go
@@ -0,0 +1,251 @@
+// Copyright 2018 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "bytes"
+ "crypto/rand"
+ "encoding/hex"
+ "errors"
+ "fmt"
+ "io"
+ "strings"
+)
+
+// A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC
+// 4122.
+type UUID [16]byte
+
+// A Version represents a UUID's version.
+type Version byte
+
+// A Variant represents a UUID's variant.
+type Variant byte
+
+// Constants returned by Variant.
+const (
+ Invalid = Variant(iota) // Invalid UUID
+ RFC4122 // The variant specified in RFC4122
+ Reserved // Reserved, NCS backward compatibility.
+ Microsoft // Reserved, Microsoft Corporation backward compatibility.
+ Future // Reserved for future definition.
+)
+
+var rander = rand.Reader // random function
+
+type invalidLengthError struct{ len int }
+
+func (err invalidLengthError) Error() string {
+ return fmt.Sprintf("invalid UUID length: %d", err.len)
+}
+
+// Parse decodes s into a UUID or returns an error. Both the standard UUID
+// forms of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and
+// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded as well as the
+// Microsoft encoding {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} and the raw hex
+// encoding: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
+func Parse(s string) (UUID, error) {
+ var uuid UUID
+ switch len(s) {
+ // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+ case 36:
+
+ // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+ case 36 + 9:
+ if strings.ToLower(s[:9]) != "urn:uuid:" {
+ return uuid, fmt.Errorf("invalid urn prefix: %q", s[:9])
+ }
+ s = s[9:]
+
+ // {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
+ case 36 + 2:
+ s = s[1:]
+
+ // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ case 32:
+ var ok bool
+ for i := range uuid {
+ uuid[i], ok = xtob(s[i*2], s[i*2+1])
+ if !ok {
+ return uuid, errors.New("invalid UUID format")
+ }
+ }
+ return uuid, nil
+ default:
+ return uuid, invalidLengthError{len(s)}
+ }
+ // s is now at least 36 bytes long
+ // it must be of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+ if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' {
+ return uuid, errors.New("invalid UUID format")
+ }
+ for i, x := range [16]int{
+ 0, 2, 4, 6,
+ 9, 11,
+ 14, 16,
+ 19, 21,
+ 24, 26, 28, 30, 32, 34} {
+ v, ok := xtob(s[x], s[x+1])
+ if !ok {
+ return uuid, errors.New("invalid UUID format")
+ }
+ uuid[i] = v
+ }
+ return uuid, nil
+}
+
+// ParseBytes is like Parse, except it parses a byte slice instead of a string.
+func ParseBytes(b []byte) (UUID, error) {
+ var uuid UUID
+ switch len(b) {
+ case 36: // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+ case 36 + 9: // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+ if !bytes.Equal(bytes.ToLower(b[:9]), []byte("urn:uuid:")) {
+ return uuid, fmt.Errorf("invalid urn prefix: %q", b[:9])
+ }
+ b = b[9:]
+ case 36 + 2: // {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
+ b = b[1:]
+ case 32: // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ var ok bool
+ for i := 0; i < 32; i += 2 {
+ uuid[i/2], ok = xtob(b[i], b[i+1])
+ if !ok {
+ return uuid, errors.New("invalid UUID format")
+ }
+ }
+ return uuid, nil
+ default:
+ return uuid, invalidLengthError{len(b)}
+ }
+ // s is now at least 36 bytes long
+ // it must be of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+ if b[8] != '-' || b[13] != '-' || b[18] != '-' || b[23] != '-' {
+ return uuid, errors.New("invalid UUID format")
+ }
+ for i, x := range [16]int{
+ 0, 2, 4, 6,
+ 9, 11,
+ 14, 16,
+ 19, 21,
+ 24, 26, 28, 30, 32, 34} {
+ v, ok := xtob(b[x], b[x+1])
+ if !ok {
+ return uuid, errors.New("invalid UUID format")
+ }
+ uuid[i] = v
+ }
+ return uuid, nil
+}
+
+// MustParse is like Parse but panics if the string cannot be parsed.
+// It simplifies safe initialization of global variables holding compiled UUIDs.
+func MustParse(s string) UUID {
+ uuid, err := Parse(s)
+ if err != nil {
+ panic(`uuid: Parse(` + s + `): ` + err.Error())
+ }
+ return uuid
+}
+
+// FromBytes creates a new UUID from a byte slice. Returns an error if the slice
+// does not have a length of 16. The bytes are copied from the slice.
+func FromBytes(b []byte) (uuid UUID, err error) {
+ err = uuid.UnmarshalBinary(b)
+ return uuid, err
+}
+
+// Must returns uuid if err is nil and panics otherwise.
+func Must(uuid UUID, err error) UUID {
+ if err != nil {
+ panic(err)
+ }
+ return uuid
+}
+
+// String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
+// , or "" if uuid is invalid.
+func (uuid UUID) String() string {
+ var buf [36]byte
+ encodeHex(buf[:], uuid)
+ return string(buf[:])
+}
+
+// URN returns the RFC 2141 URN form of uuid,
+// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, or "" if uuid is invalid.
+func (uuid UUID) URN() string {
+ var buf [36 + 9]byte
+ copy(buf[:], "urn:uuid:")
+ encodeHex(buf[9:], uuid)
+ return string(buf[:])
+}
+
+func encodeHex(dst []byte, uuid UUID) {
+ hex.Encode(dst, uuid[:4])
+ dst[8] = '-'
+ hex.Encode(dst[9:13], uuid[4:6])
+ dst[13] = '-'
+ hex.Encode(dst[14:18], uuid[6:8])
+ dst[18] = '-'
+ hex.Encode(dst[19:23], uuid[8:10])
+ dst[23] = '-'
+ hex.Encode(dst[24:], uuid[10:])
+}
+
+// Variant returns the variant encoded in uuid.
+func (uuid UUID) Variant() Variant {
+ switch {
+ case (uuid[8] & 0xc0) == 0x80:
+ return RFC4122
+ case (uuid[8] & 0xe0) == 0xc0:
+ return Microsoft
+ case (uuid[8] & 0xe0) == 0xe0:
+ return Future
+ default:
+ return Reserved
+ }
+}
+
+// Version returns the version of uuid.
+func (uuid UUID) Version() Version {
+ return Version(uuid[6] >> 4)
+}
+
+func (v Version) String() string {
+ if v > 15 {
+ return fmt.Sprintf("BAD_VERSION_%d", v)
+ }
+ return fmt.Sprintf("VERSION_%d", v)
+}
+
+func (v Variant) String() string {
+ switch v {
+ case RFC4122:
+ return "RFC4122"
+ case Reserved:
+ return "Reserved"
+ case Microsoft:
+ return "Microsoft"
+ case Future:
+ return "Future"
+ case Invalid:
+ return "Invalid"
+ }
+ return fmt.Sprintf("BadVariant%d", int(v))
+}
+
+// SetRand sets the random number generator to r, which implements io.Reader.
+// If r.Read returns an error when the package requests random data then
+// a panic will be issued.
+//
+// Calling SetRand with nil sets the random number generator to the default
+// generator.
+func SetRand(r io.Reader) {
+ if r == nil {
+ rander = rand.Reader
+ return
+ }
+ rander = r
+}
diff --git a/vendor/github.com/google/uuid/version1.go b/vendor/github.com/google/uuid/version1.go
new file mode 100644
index 0000000..4631096
--- /dev/null
+++ b/vendor/github.com/google/uuid/version1.go
@@ -0,0 +1,44 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import (
+ "encoding/binary"
+)
+
+// NewUUID returns a Version 1 UUID based on the current NodeID and clock
+// sequence, and the current time. If the NodeID has not been set by SetNodeID
+// or SetNodeInterface then it will be set automatically. If the NodeID cannot
+// be set NewUUID returns nil. If clock sequence has not been set by
+// SetClockSequence then it will be set automatically. If GetTime fails to
+// return the current NewUUID returns nil and an error.
+//
+// In most cases, New should be used.
+func NewUUID() (UUID, error) {
+ var uuid UUID
+ now, seq, err := GetTime()
+ if err != nil {
+ return uuid, err
+ }
+
+ timeLow := uint32(now & 0xffffffff)
+ timeMid := uint16((now >> 32) & 0xffff)
+ timeHi := uint16((now >> 48) & 0x0fff)
+ timeHi |= 0x1000 // Version 1
+
+ binary.BigEndian.PutUint32(uuid[0:], timeLow)
+ binary.BigEndian.PutUint16(uuid[4:], timeMid)
+ binary.BigEndian.PutUint16(uuid[6:], timeHi)
+ binary.BigEndian.PutUint16(uuid[8:], seq)
+
+ nodeMu.Lock()
+ if nodeID == zeroID {
+ setNodeInterface("")
+ }
+ copy(uuid[10:], nodeID[:])
+ nodeMu.Unlock()
+
+ return uuid, nil
+}
diff --git a/vendor/github.com/google/uuid/version4.go b/vendor/github.com/google/uuid/version4.go
new file mode 100644
index 0000000..86160fb
--- /dev/null
+++ b/vendor/github.com/google/uuid/version4.go
@@ -0,0 +1,51 @@
+// Copyright 2016 Google Inc. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package uuid
+
+import "io"
+
+// New creates a new random UUID or panics. New is equivalent to
+// the expression
+//
+// uuid.Must(uuid.NewRandom())
+func New() UUID {
+ return Must(NewRandom())
+}
+
+// NewString creates a new random UUID and returns it as a string or panics.
+// NewString is equivalent to the expression
+//
+// uuid.New().String()
+func NewString() string {
+ return Must(NewRandom()).String()
+}
+
+// NewRandom returns a Random (Version 4) UUID.
+//
+// The strength of the UUIDs is based on the strength of the crypto/rand
+// package.
+//
+// A note about uniqueness derived from the UUID Wikipedia entry:
+//
+// Randomly generated UUIDs have 122 random bits. One's annual risk of being
+// hit by a meteorite is estimated to be one chance in 17 billion, that
+// means the probability is about 0.00000000006 (6 × 10−11),
+// equivalent to the odds of creating a few tens of trillions of UUIDs in a
+// year and having one duplicate.
+func NewRandom() (UUID, error) {
+ return NewRandomFromReader(rander)
+}
+
+// NewRandomFromReader returns a UUID based on bytes read from a given io.Reader.
+func NewRandomFromReader(r io.Reader) (UUID, error) {
+ var uuid UUID
+ _, err := io.ReadFull(r, uuid[:])
+ if err != nil {
+ return Nil, err
+ }
+ uuid[6] = (uuid[6] & 0x0f) | 0x40 // Version 4
+ uuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10
+ return uuid, nil
+}
diff --git a/vendor/github.com/gopherjs/gopherjs/LICENSE b/vendor/github.com/gopherjs/gopherjs/LICENSE
new file mode 100644
index 0000000..d496fef
--- /dev/null
+++ b/vendor/github.com/gopherjs/gopherjs/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2013 Richard Musiol. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/gopherjs/gopherjs/js/js.go b/vendor/github.com/gopherjs/gopherjs/js/js.go
new file mode 100644
index 0000000..3fbf1d8
--- /dev/null
+++ b/vendor/github.com/gopherjs/gopherjs/js/js.go
@@ -0,0 +1,168 @@
+// Package js provides functions for interacting with native JavaScript APIs. Calls to these functions are treated specially by GopherJS and translated directly to their corresponding JavaScript syntax.
+//
+// Use MakeWrapper to expose methods to JavaScript. When passing values directly, the following type conversions are performed:
+//
+// | Go type | JavaScript type | Conversions back to interface{} |
+// | --------------------- | --------------------- | ------------------------------- |
+// | bool | Boolean | bool |
+// | integers and floats | Number | float64 |
+// | string | String | string |
+// | []int8 | Int8Array | []int8 |
+// | []int16 | Int16Array | []int16 |
+// | []int32, []int | Int32Array | []int |
+// | []uint8 | Uint8Array | []uint8 |
+// | []uint16 | Uint16Array | []uint16 |
+// | []uint32, []uint | Uint32Array | []uint |
+// | []float32 | Float32Array | []float32 |
+// | []float64 | Float64Array | []float64 |
+// | all other slices | Array | []interface{} |
+// | arrays | see slice type | see slice type |
+// | functions | Function | func(...interface{}) *js.Object |
+// | time.Time | Date | time.Time |
+// | - | instanceof Node | *js.Object |
+// | maps, structs | instanceof Object | map[string]interface{} |
+//
+// Additionally, for a struct containing a *js.Object field, only the content of the field will be passed to JavaScript and vice versa.
+package js
+
+// Object is a container for a native JavaScript object. Calls to its methods are treated specially by GopherJS and translated directly to their JavaScript syntax. A nil pointer to Object is equal to JavaScript's "null". Object can not be used as a map key.
+type Object struct{ object *Object }
+
+// Get returns the object's property with the given key.
+func (o *Object) Get(key string) *Object { return o.object.Get(key) }
+
+// Set assigns the value to the object's property with the given key.
+func (o *Object) Set(key string, value interface{}) { o.object.Set(key, value) }
+
+// Delete removes the object's property with the given key.
+func (o *Object) Delete(key string) { o.object.Delete(key) }
+
+// Length returns the object's "length" property, converted to int.
+func (o *Object) Length() int { return o.object.Length() }
+
+// Index returns the i'th element of an array.
+func (o *Object) Index(i int) *Object { return o.object.Index(i) }
+
+// SetIndex sets the i'th element of an array.
+func (o *Object) SetIndex(i int, value interface{}) { o.object.SetIndex(i, value) }
+
+// Call calls the object's method with the given name.
+func (o *Object) Call(name string, args ...interface{}) *Object { return o.object.Call(name, args...) }
+
+// Invoke calls the object itself. This will fail if it is not a function.
+func (o *Object) Invoke(args ...interface{}) *Object { return o.object.Invoke(args...) }
+
+// New creates a new instance of this type object. This will fail if it not a function (constructor).
+func (o *Object) New(args ...interface{}) *Object { return o.object.New(args...) }
+
+// Bool returns the object converted to bool according to JavaScript type conversions.
+func (o *Object) Bool() bool { return o.object.Bool() }
+
+// String returns the object converted to string according to JavaScript type conversions.
+func (o *Object) String() string { return o.object.String() }
+
+// Int returns the object converted to int according to JavaScript type conversions (parseInt).
+func (o *Object) Int() int { return o.object.Int() }
+
+// Int64 returns the object converted to int64 according to JavaScript type conversions (parseInt).
+func (o *Object) Int64() int64 { return o.object.Int64() }
+
+// Uint64 returns the object converted to uint64 according to JavaScript type conversions (parseInt).
+func (o *Object) Uint64() uint64 { return o.object.Uint64() }
+
+// Float returns the object converted to float64 according to JavaScript type conversions (parseFloat).
+func (o *Object) Float() float64 { return o.object.Float() }
+
+// Interface returns the object converted to interface{}. See table in package comment for details.
+func (o *Object) Interface() interface{} { return o.object.Interface() }
+
+// Unsafe returns the object as an uintptr, which can be converted via unsafe.Pointer. Not intended for public use.
+func (o *Object) Unsafe() uintptr { return o.object.Unsafe() }
+
+// Error encapsulates JavaScript errors. Those are turned into a Go panic and may be recovered, giving an *Error that holds the JavaScript error object.
+type Error struct {
+ *Object
+}
+
+// Error returns the message of the encapsulated JavaScript error object.
+func (err *Error) Error() string {
+ return "JavaScript error: " + err.Get("message").String()
+}
+
+// Stack returns the stack property of the encapsulated JavaScript error object.
+func (err *Error) Stack() string {
+ return err.Get("stack").String()
+}
+
+// Global gives JavaScript's global object ("window" for browsers and "GLOBAL" for Node.js).
+var Global *Object
+
+// Module gives the value of the "module" variable set by Node.js. Hint: Set a module export with 'js.Module.Get("exports").Set("exportName", ...)'.
+var Module *Object
+
+// Undefined gives the JavaScript value "undefined".
+var Undefined *Object
+
+// Debugger gets compiled to JavaScript's "debugger;" statement.
+func Debugger() {}
+
+// InternalObject returns the internal JavaScript object that represents i. Not intended for public use.
+func InternalObject(i interface{}) *Object {
+ return nil
+}
+
+// MakeFunc wraps a function and gives access to the values of JavaScript's "this" and "arguments" keywords.
+func MakeFunc(fn func(this *Object, arguments []*Object) interface{}) *Object {
+ return Global.Call("$makeFunc", InternalObject(fn))
+}
+
+// Keys returns the keys of the given JavaScript object.
+func Keys(o *Object) []string {
+ if o == nil || o == Undefined {
+ return nil
+ }
+ a := Global.Get("Object").Call("keys", o)
+ s := make([]string, a.Length())
+ for i := 0; i < a.Length(); i++ {
+ s[i] = a.Index(i).String()
+ }
+ return s
+}
+
+// MakeWrapper creates a JavaScript object which has wrappers for the exported methods of i. Use explicit getter and setter methods to expose struct fields to JavaScript.
+func MakeWrapper(i interface{}) *Object {
+ v := InternalObject(i)
+ o := Global.Get("Object").New()
+ o.Set("__internal_object__", v)
+ methods := v.Get("constructor").Get("methods")
+ for i := 0; i < methods.Length(); i++ {
+ m := methods.Index(i)
+ if m.Get("pkg").String() != "" { // not exported
+ continue
+ }
+ o.Set(m.Get("name").String(), func(args ...*Object) *Object {
+ return Global.Call("$externalizeFunction", v.Get(m.Get("prop").String()), m.Get("typ"), true).Call("apply", v, args)
+ })
+ }
+ return o
+}
+
+// NewArrayBuffer creates a JavaScript ArrayBuffer from a byte slice.
+func NewArrayBuffer(b []byte) *Object {
+ slice := InternalObject(b)
+ offset := slice.Get("$offset").Int()
+ length := slice.Get("$length").Int()
+ return slice.Get("$array").Get("buffer").Call("slice", offset, offset+length)
+}
+
+// M is a simple map type. It is intended as a shorthand for JavaScript objects (before conversion).
+type M map[string]interface{}
+
+// S is a simple slice type. It is intended as a shorthand for JavaScript arrays (before conversion).
+type S []interface{}
+
+func init() {
+ // avoid dead code elimination
+ e := Error{}
+ _ = e
+}
diff --git a/vendor/github.com/jtolds/gls/LICENSE b/vendor/github.com/jtolds/gls/LICENSE
new file mode 100644
index 0000000..9b4a822
--- /dev/null
+++ b/vendor/github.com/jtolds/gls/LICENSE
@@ -0,0 +1,18 @@
+Copyright (c) 2013, Space Monkey, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/jtolds/gls/README.md b/vendor/github.com/jtolds/gls/README.md
new file mode 100644
index 0000000..4ebb692
--- /dev/null
+++ b/vendor/github.com/jtolds/gls/README.md
@@ -0,0 +1,89 @@
+gls
+===
+
+Goroutine local storage
+
+### IMPORTANT NOTE ###
+
+It is my duty to point you to https://blog.golang.org/context, which is how
+Google solves all of the problems you'd perhaps consider using this package
+for at scale.
+
+One downside to Google's approach is that *all* of your functions must have
+a new first argument, but after clearing that hurdle everything else is much
+better.
+
+If you aren't interested in this warning, read on.
+
+### Huhwaht? Why? ###
+
+Every so often, a thread shows up on the
+[golang-nuts](https://groups.google.com/d/forum/golang-nuts) asking for some
+form of goroutine-local-storage, or some kind of goroutine id, or some kind of
+context. There are a few valid use cases for goroutine-local-storage, one of
+the most prominent being log line context. One poster was interested in being
+able to log an HTTP request context id in every log line in the same goroutine
+as the incoming HTTP request, without having to change every library and
+function call he was interested in logging.
+
+This would be pretty useful. Provided that you could get some kind of
+goroutine-local-storage, you could call
+[log.SetOutput](http://golang.org/pkg/log/#SetOutput) with your own logging
+writer that checks goroutine-local-storage for some context information and
+adds that context to your log lines.
+
+But alas, Andrew Gerrand's typically diplomatic answer to the question of
+goroutine-local variables was:
+
+> We wouldn't even be having this discussion if thread local storage wasn't
+> useful. But every feature comes at a cost, and in my opinion the cost of
+> threadlocals far outweighs their benefits. They're just not a good fit for
+> Go.
+
+So, yeah, that makes sense. That's a pretty good reason for why the language
+won't support a specific and (relatively) unuseful feature that requires some
+runtime changes, just for the sake of a little bit of log improvement.
+
+But does Go require runtime changes?
+
+### How it works ###
+
+Go has pretty fantastic introspective and reflective features, but one thing Go
+doesn't give you is any kind of access to the stack pointer, or frame pointer,
+or goroutine id, or anything contextual about your current stack. It gives you
+access to your list of callers, but only along with program counters, which are
+fixed at compile time.
+
+But it does give you the stack.
+
+So, we define 16 special functions and embed base-16 tags into the stack using
+the call order of those 16 functions. Then, we can read our tags back out of
+the stack looking at the callers list.
+
+We then use these tags as an index into a traditional map for implementing
+this library.
+
+### What are people saying? ###
+
+"Wow, that's horrifying."
+
+"This is the most terrible thing I have seen in a very long time."
+
+"Where is it getting a context from? Is this serializing all the requests?
+What the heck is the client being bound to? What are these tags? Why does he
+need callers? Oh god no. No no no."
+
+### Docs ###
+
+Please see the docs at http://godoc.org/github.com/jtolds/gls
+
+### Related ###
+
+If you're okay relying on the string format of the current runtime stacktrace
+including a unique goroutine id (not guaranteed by the spec or anything, but
+very unlikely to change within a Go release), you might be able to squeeze
+out a bit more performance by using this similar library, inspired by some
+code Brad Fitzpatrick wrote for debugging his HTTP/2 library:
+https://github.com/tylerb/gls (in contrast, jtolds/gls doesn't require
+any knowledge of the string format of the runtime stacktrace, which
+probably adds unnecessary overhead).
diff --git a/vendor/github.com/jtolds/gls/context.go b/vendor/github.com/jtolds/gls/context.go
new file mode 100644
index 0000000..618a171
--- /dev/null
+++ b/vendor/github.com/jtolds/gls/context.go
@@ -0,0 +1,153 @@
+// Package gls implements goroutine-local storage.
+package gls
+
+import (
+ "sync"
+)
+
+var (
+ mgrRegistry = make(map[*ContextManager]bool)
+ mgrRegistryMtx sync.RWMutex
+)
+
+// Values is simply a map of key types to value types. Used by SetValues to
+// set multiple values at once.
+type Values map[interface{}]interface{}
+
+// ContextManager is the main entrypoint for interacting with
+// Goroutine-local-storage. You can have multiple independent ContextManagers
+// at any given time. ContextManagers are usually declared globally for a given
+// class of context variables. You should use NewContextManager for
+// construction.
+type ContextManager struct {
+ mtx sync.Mutex
+ values map[uint]Values
+}
+
+// NewContextManager returns a brand new ContextManager. It also registers the
+// new ContextManager in the ContextManager registry which is used by the Go
+// method. ContextManagers are typically defined globally at package scope.
+func NewContextManager() *ContextManager {
+ mgr := &ContextManager{values: make(map[uint]Values)}
+ mgrRegistryMtx.Lock()
+ defer mgrRegistryMtx.Unlock()
+ mgrRegistry[mgr] = true
+ return mgr
+}
+
+// Unregister removes a ContextManager from the global registry, used by the
+// Go method. Only intended for use when you're completely done with a
+// ContextManager. Use of Unregister at all is rare.
+func (m *ContextManager) Unregister() {
+ mgrRegistryMtx.Lock()
+ defer mgrRegistryMtx.Unlock()
+ delete(mgrRegistry, m)
+}
+
+// SetValues takes a collection of values and a function to call for those
+// values to be set in. Anything further down the stack will have the set
+// values available through GetValue. SetValues will add new values or replace
+// existing values of the same key and will not mutate or change values for
+// previous stack frames.
+// SetValues is slow (makes a copy of all current and new values for the new
+// gls-context) in order to reduce the amount of lookups GetValue requires.
+func (m *ContextManager) SetValues(new_values Values, context_call func()) {
+ if len(new_values) == 0 {
+ context_call()
+ return
+ }
+
+ mutated_keys := make([]interface{}, 0, len(new_values))
+ mutated_vals := make(Values, len(new_values))
+
+ EnsureGoroutineId(func(gid uint) {
+ m.mtx.Lock()
+ state, found := m.values[gid]
+ if !found {
+ state = make(Values, len(new_values))
+ m.values[gid] = state
+ }
+ m.mtx.Unlock()
+
+ for key, new_val := range new_values {
+ mutated_keys = append(mutated_keys, key)
+ if old_val, ok := state[key]; ok {
+ mutated_vals[key] = old_val
+ }
+ state[key] = new_val
+ }
+
+ defer func() {
+ if !found {
+ m.mtx.Lock()
+ delete(m.values, gid)
+ m.mtx.Unlock()
+ return
+ }
+
+ for _, key := range mutated_keys {
+ if val, ok := mutated_vals[key]; ok {
+ state[key] = val
+ } else {
+ delete(state, key)
+ }
+ }
+ }()
+
+ context_call()
+ })
+}
+
+// GetValue will return a previously set value, provided that the value was set
+// by SetValues somewhere higher up the stack. If the value is not found, ok
+// will be false.
+func (m *ContextManager) GetValue(key interface{}) (
+ value interface{}, ok bool) {
+ gid, ok := GetGoroutineId()
+ if !ok {
+ return nil, false
+ }
+
+ m.mtx.Lock()
+ state, found := m.values[gid]
+ m.mtx.Unlock()
+
+ if !found {
+ return nil, false
+ }
+ value, ok = state[key]
+ return value, ok
+}
+
+func (m *ContextManager) getValues() Values {
+ gid, ok := GetGoroutineId()
+ if !ok {
+ return nil
+ }
+ m.mtx.Lock()
+ state, _ := m.values[gid]
+ m.mtx.Unlock()
+ return state
+}
+
+// Go preserves ContextManager values and Goroutine-local-storage across new
+// goroutine invocations. The Go method makes a copy of all existing values on
+// all registered context managers and makes sure they are still set after
+// kicking off the provided function in a new goroutine. If you don't use this
+// Go method instead of the standard 'go' keyword, you will lose values in
+// ContextManagers, as goroutines have brand new stacks.
+func Go(cb func()) {
+ mgrRegistryMtx.RLock()
+ defer mgrRegistryMtx.RUnlock()
+
+ for mgr := range mgrRegistry {
+ values := mgr.getValues()
+ if len(values) > 0 {
+ cb = func(mgr *ContextManager, cb func()) func() {
+ return func() { mgr.SetValues(values, cb) }
+ }(mgr, cb)
+ }
+ }
+
+ go cb()
+}
diff --git a/vendor/github.com/jtolds/gls/gen_sym.go b/vendor/github.com/jtolds/gls/gen_sym.go
new file mode 100644
index 0000000..7f615cc
--- /dev/null
+++ b/vendor/github.com/jtolds/gls/gen_sym.go
@@ -0,0 +1,21 @@
+package gls
+
+import (
+ "sync"
+)
+
+var (
+ keyMtx sync.Mutex
+ keyCounter uint64
+)
+
+// ContextKey is a throwaway value you can use as a key to a ContextManager
+type ContextKey struct{ id uint64 }
+
+// GenSym will return a brand new, never-before-used ContextKey
+func GenSym() ContextKey {
+ keyMtx.Lock()
+ defer keyMtx.Unlock()
+ keyCounter += 1
+ return ContextKey{id: keyCounter}
+}
diff --git a/vendor/github.com/jtolds/gls/gid.go b/vendor/github.com/jtolds/gls/gid.go
new file mode 100644
index 0000000..c16bf3a
--- /dev/null
+++ b/vendor/github.com/jtolds/gls/gid.go
@@ -0,0 +1,25 @@
+package gls
+
+var (
+ stackTagPool = &idPool{}
+)
+
+// Will return this goroutine's identifier if set. If you always need a
+// goroutine identifier, you should use EnsureGoroutineId which will make one
+// if there isn't one already.
+func GetGoroutineId() (gid uint, ok bool) {
+ return readStackTag()
+}
+
+// Will call cb with the current goroutine identifier. If one hasn't already
+// been generated, one will be created and set first. The goroutine identifier
+// might be invalid after cb returns.
+func EnsureGoroutineId(cb func(gid uint)) {
+ if gid, ok := readStackTag(); ok {
+ cb(gid)
+ return
+ }
+ gid := stackTagPool.Acquire()
+ defer stackTagPool.Release(gid)
+ addStackTag(gid, func() { cb(gid) })
+}
diff --git a/vendor/github.com/jtolds/gls/id_pool.go b/vendor/github.com/jtolds/gls/id_pool.go
new file mode 100644
index 0000000..b7974ae
--- /dev/null
+++ b/vendor/github.com/jtolds/gls/id_pool.go
@@ -0,0 +1,34 @@
+package gls
+
+// though this could probably be better at keeping ids smaller, the goal of
+// this class is to keep a registry of the smallest unique integer ids
+// per-process possible
+
+import (
+ "sync"
+)
+
+type idPool struct {
+ mtx sync.Mutex
+ released []uint
+ max_id uint
+}
+
+func (p *idPool) Acquire() (id uint) {
+ p.mtx.Lock()
+ defer p.mtx.Unlock()
+ if len(p.released) > 0 {
+ id = p.released[len(p.released)-1]
+ p.released = p.released[:len(p.released)-1]
+ return id
+ }
+ id = p.max_id
+ p.max_id++
+ return id
+}
+
+func (p *idPool) Release(id uint) {
+ p.mtx.Lock()
+ defer p.mtx.Unlock()
+ p.released = append(p.released, id)
+}
diff --git a/vendor/github.com/jtolds/gls/stack_tags.go b/vendor/github.com/jtolds/gls/stack_tags.go
new file mode 100644
index 0000000..37bbd33
--- /dev/null
+++ b/vendor/github.com/jtolds/gls/stack_tags.go
@@ -0,0 +1,147 @@
+package gls
+
+// so, basically, we're going to encode integer tags in base-16 on the stack
+
+const (
+ bitWidth = 4
+ stackBatchSize = 16
+)
+
+var (
+ pc_lookup = make(map[uintptr]int8, 17)
+ mark_lookup [16]func(uint, func())
+)
+
+func init() {
+ setEntries := func(f func(uint, func()), v int8) {
+ var ptr uintptr
+ f(0, func() {
+ ptr = findPtr()
+ })
+ pc_lookup[ptr] = v
+ if v >= 0 {
+ mark_lookup[v] = f
+ }
+ }
+ setEntries(github_com_jtolds_gls_markS, -0x1)
+ setEntries(github_com_jtolds_gls_mark0, 0x0)
+ setEntries(github_com_jtolds_gls_mark1, 0x1)
+ setEntries(github_com_jtolds_gls_mark2, 0x2)
+ setEntries(github_com_jtolds_gls_mark3, 0x3)
+ setEntries(github_com_jtolds_gls_mark4, 0x4)
+ setEntries(github_com_jtolds_gls_mark5, 0x5)
+ setEntries(github_com_jtolds_gls_mark6, 0x6)
+ setEntries(github_com_jtolds_gls_mark7, 0x7)
+ setEntries(github_com_jtolds_gls_mark8, 0x8)
+ setEntries(github_com_jtolds_gls_mark9, 0x9)
+ setEntries(github_com_jtolds_gls_markA, 0xa)
+ setEntries(github_com_jtolds_gls_markB, 0xb)
+ setEntries(github_com_jtolds_gls_markC, 0xc)
+ setEntries(github_com_jtolds_gls_markD, 0xd)
+ setEntries(github_com_jtolds_gls_markE, 0xe)
+ setEntries(github_com_jtolds_gls_markF, 0xf)
+}
+
+func addStackTag(tag uint, context_call func()) {
+ if context_call == nil {
+ return
+ }
+ github_com_jtolds_gls_markS(tag, context_call)
+}
+
+// these private methods are named this horrendous name so gopherjs support
+// is easier. it shouldn't add any runtime cost in non-js builds.
+
+//go:noinline
+func github_com_jtolds_gls_markS(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_mark0(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_mark1(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_mark2(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_mark3(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_mark4(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_mark5(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_mark6(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_mark7(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_mark8(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_mark9(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_markA(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_markB(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_markC(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_markD(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_markE(tag uint, cb func()) { _m(tag, cb) }
+
+//go:noinline
+func github_com_jtolds_gls_markF(tag uint, cb func()) { _m(tag, cb) }
+
+func _m(tag_remainder uint, cb func()) {
+ if tag_remainder == 0 {
+ cb()
+ } else {
+ mark_lookup[tag_remainder&0xf](tag_remainder>>bitWidth, cb)
+ }
+}
+
+func readStackTag() (tag uint, ok bool) {
+ var current_tag uint
+ offset := 0
+ for {
+ batch, next_offset := getStack(offset, stackBatchSize)
+ for _, pc := range batch {
+ val, ok := pc_lookup[pc]
+ if !ok {
+ continue
+ }
+ if val < 0 {
+ return current_tag, true
+ }
+ current_tag <<= bitWidth
+ current_tag += uint(val)
+ }
+ if next_offset == 0 {
+ break
+ }
+ offset = next_offset
+ }
+ return 0, false
+}
+
+func (m *ContextManager) preventInlining() {
+ // dunno if findPtr or getStack are likely to get inlined in a future release
+ // of go, but if they are inlined and their callers are inlined, that could
+ // hork some things. let's do our best to explain to the compiler that we
+ // really don't want those two functions inlined by saying they could change
+ // at any time. assumes preventInlining doesn't get compiled out.
+ // this whole thing is probably overkill.
+ findPtr = m.values[0][0].(func() uintptr)
+ getStack = m.values[0][1].(func(int, int) ([]uintptr, int))
+}
diff --git a/vendor/github.com/jtolds/gls/stack_tags_js.go b/vendor/github.com/jtolds/gls/stack_tags_js.go
new file mode 100644
index 0000000..c4e8b80
--- /dev/null
+++ b/vendor/github.com/jtolds/gls/stack_tags_js.go
@@ -0,0 +1,75 @@
+// +build js
+
+package gls
+
+// This file is used for GopherJS builds, which don't have normal runtime
+// stack trace support
+
+import (
+ "strconv"
+ "strings"
+
+ "github.com/gopherjs/gopherjs/js"
+)
+
+const (
+ jsFuncNamePrefix = "github_com_jtolds_gls_mark"
+)
+
+func jsMarkStack() (f []uintptr) {
+ lines := strings.Split(
+ js.Global.Get("Error").New().Get("stack").String(), "\n")
+ f = make([]uintptr, 0, len(lines))
+ for i, line := range lines {
+ line = strings.TrimSpace(line)
+ if line == "" {
+ continue
+ }
+ if i == 0 {
+ if line != "Error" {
+ panic("didn't understand js stack trace")
+ }
+ continue
+ }
+ fields := strings.Fields(line)
+ if len(fields) < 2 || fields[0] != "at" {
+ panic("didn't understand js stack trace")
+ }
+
+ pos := strings.Index(fields[1], jsFuncNamePrefix)
+ if pos < 0 {
+ continue
+ }
+ pos += len(jsFuncNamePrefix)
+ if pos >= len(fields[1]) {
+ panic("didn't understand js stack trace")
+ }
+ char := string(fields[1][pos])
+ switch char {
+ case "S":
+ f = append(f, uintptr(0))
+ default:
+ val, err := strconv.ParseUint(char, 16, 8)
+ if err != nil {
+ panic("didn't understand js stack trace")
+ }
+ f = append(f, uintptr(val)+1)
+ }
+ }
+ return f
+}
+
+// variables to prevent inlining
+var (
+ findPtr = func() uintptr {
+ funcs := jsMarkStack()
+ if len(funcs) == 0 {
+ panic("failed to find function pointer")
+ }
+ return funcs[0]
+ }
+
+ getStack = func(offset, amount int) (stack []uintptr, next_offset int) {
+ return jsMarkStack(), 0
+ }
+)
diff --git a/vendor/github.com/jtolds/gls/stack_tags_main.go b/vendor/github.com/jtolds/gls/stack_tags_main.go
new file mode 100644
index 0000000..4da89e4
--- /dev/null
+++ b/vendor/github.com/jtolds/gls/stack_tags_main.go
@@ -0,0 +1,30 @@
+// +build !js
+
+package gls
+
+// This file is used for standard Go builds, which have the expected runtime
+// support
+
+import (
+ "runtime"
+)
+
+var (
+ findPtr = func() uintptr {
+ var pc [1]uintptr
+ n := runtime.Callers(4, pc[:])
+ if n != 1 {
+ panic("failed to find function pointer")
+ }
+ return pc[0]
+ }
+
+ getStack = func(offset, amount int) (stack []uintptr, next_offset int) {
+ stack = make([]uintptr, amount)
+ stack = stack[:runtime.Callers(offset, stack)]
+ if len(stack) < amount {
+ return stack, 0
+ }
+ return stack, offset + len(stack)
+ }
+)
diff --git a/vendor/github.com/klauspost/cpuid/.gitignore b/vendor/github.com/klauspost/cpuid/.gitignore
new file mode 100644
index 0000000..daf913b
--- /dev/null
+++ b/vendor/github.com/klauspost/cpuid/.gitignore
@@ -0,0 +1,24 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof
diff --git a/vendor/github.com/klauspost/cpuid/.travis.yml b/vendor/github.com/klauspost/cpuid/.travis.yml
new file mode 100644
index 0000000..77d975f
--- /dev/null
+++ b/vendor/github.com/klauspost/cpuid/.travis.yml
@@ -0,0 +1,46 @@
+language: go
+
+os:
+ - linux
+ - osx
+ - windows
+
+arch:
+ - amd64
+ - arm64
+
+go:
+ - 1.12.x
+ - 1.13.x
+ - 1.14.x
+ - master
+
+script:
+ - go vet ./...
+ - go test -race ./...
+ - go test -tags=noasm ./...
+
+stages:
+ - gofmt
+ - test
+
+matrix:
+ allow_failures:
+ - go: 'master'
+ fast_finish: true
+ include:
+ - stage: gofmt
+ go: 1.14.x
+ os: linux
+ arch: amd64
+ script:
+ - diff <(gofmt -d .) <(printf "")
+ - diff <(gofmt -d ./private) <(printf "")
+ - go install github.com/klauspost/asmfmt/cmd/asmfmt
+ - diff <(asmfmt -d .) <(printf "")
+ - stage: i386
+ go: 1.14.x
+ os: linux
+ arch: amd64
+ script:
+ - GOOS=linux GOARCH=386 go test .
diff --git a/vendor/github.com/klauspost/cpuid/CONTRIBUTING.txt b/vendor/github.com/klauspost/cpuid/CONTRIBUTING.txt
new file mode 100644
index 0000000..2ef4714
--- /dev/null
+++ b/vendor/github.com/klauspost/cpuid/CONTRIBUTING.txt
@@ -0,0 +1,35 @@
+Developer Certificate of Origin
+Version 1.1
+
+Copyright (C) 2015- Klaus Post & Contributors.
+Email: klauspost@gmail.com
+
+Everyone is permitted to copy and distribute verbatim copies of this
+license document, but changing it is not allowed.
+
+
+Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+(a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+(b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+(c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+(d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
diff --git a/vendor/github.com/klauspost/cpuid/LICENSE b/vendor/github.com/klauspost/cpuid/LICENSE
new file mode 100644
index 0000000..5cec7ee
--- /dev/null
+++ b/vendor/github.com/klauspost/cpuid/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Klaus Post
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/vendor/github.com/klauspost/cpuid/README.md b/vendor/github.com/klauspost/cpuid/README.md
new file mode 100644
index 0000000..38d4a8b
--- /dev/null
+++ b/vendor/github.com/klauspost/cpuid/README.md
@@ -0,0 +1,191 @@
+# cpuid
+Package cpuid provides information about the CPU running the current program.
+
+CPU features are detected on startup, and kept for fast access through the life of the application.
+Currently x86 / x64 (AMD64/i386) and ARM (ARM64) is supported, and no external C (cgo) code is used, which should make the library very easy to use.
+
+You can access the CPU information by accessing the shared CPU variable of the cpuid library.
+
+Package home: https://github.com/klauspost/cpuid
+
+[![GoDoc][1]][2] [![Build Status][3]][4]
+
+[1]: https://godoc.org/github.com/klauspost/cpuid?status.svg
+[2]: https://godoc.org/github.com/klauspost/cpuid
+[3]: https://travis-ci.org/klauspost/cpuid.svg?branch=master
+[4]: https://travis-ci.org/klauspost/cpuid
+
+# features
+
+## x86 CPU Instructions
+* **CMOV** (i686 CMOV)
+* **NX** (NX (No-Execute) bit)
+* **AMD3DNOW** (AMD 3DNOW)
+* **AMD3DNOWEXT** (AMD 3DNowExt)
+* **MMX** (standard MMX)
+* **MMXEXT** (SSE integer functions or AMD MMX ext)
+* **SSE** (SSE functions)
+* **SSE2** (P4 SSE functions)
+* **SSE3** (Prescott SSE3 functions)
+* **SSSE3** (Conroe SSSE3 functions)
+* **SSE4** (Penryn SSE4.1 functions)
+* **SSE4A** (AMD Barcelona microarchitecture SSE4a instructions)
+* **SSE42** (Nehalem SSE4.2 functions)
+* **AVX** (AVX functions)
+* **AVX2** (AVX2 functions)
+* **FMA3** (Intel FMA 3)
+* **FMA4** (Bulldozer FMA4 functions)
+* **XOP** (Bulldozer XOP functions)
+* **F16C** (Half-precision floating-point conversion)
+* **BMI1** (Bit Manipulation Instruction Set 1)
+* **BMI2** (Bit Manipulation Instruction Set 2)
+* **TBM** (AMD Trailing Bit Manipulation)
+* **LZCNT** (LZCNT instruction)
+* **POPCNT** (POPCNT instruction)
+* **AESNI** (Advanced Encryption Standard New Instructions)
+* **CLMUL** (Carry-less Multiplication)
+* **HTT** (Hyperthreading (enabled))
+* **HLE** (Hardware Lock Elision)
+* **RTM** (Restricted Transactional Memory)
+* **RDRAND** (RDRAND instruction is available)
+* **RDSEED** (RDSEED instruction is available)
+* **ADX** (Intel ADX (Multi-Precision Add-Carry Instruction Extensions))
+* **SHA** (Intel SHA Extensions)
+* **AVX512F** (AVX-512 Foundation)
+* **AVX512DQ** (AVX-512 Doubleword and Quadword Instructions)
+* **AVX512IFMA** (AVX-512 Integer Fused Multiply-Add Instructions)
+* **AVX512PF** (AVX-512 Prefetch Instructions)
+* **AVX512ER** (AVX-512 Exponential and Reciprocal Instructions)
+* **AVX512CD** (AVX-512 Conflict Detection Instructions)
+* **AVX512BW** (AVX-512 Byte and Word Instructions)
+* **AVX512VL** (AVX-512 Vector Length Extensions)
+* **AVX512VBMI** (AVX-512 Vector Bit Manipulation Instructions)
+* **AVX512VBMI2** (AVX-512 Vector Bit Manipulation Instructions, Version 2)
+* **AVX512VNNI** (AVX-512 Vector Neural Network Instructions)
+* **AVX512VPOPCNTDQ** (AVX-512 Vector Population Count Doubleword and Quadword)
+* **GFNI** (Galois Field New Instructions)
+* **VAES** (Vector AES)
+* **AVX512BITALG** (AVX-512 Bit Algorithms)
+* **VPCLMULQDQ** (Carry-Less Multiplication Quadword)
+* **AVX512BF16** (AVX-512 BFLOAT16 Instructions)
+* **AVX512VP2INTERSECT** (AVX-512 Intersect for D/Q)
+* **MPX** (Intel MPX (Memory Protection Extensions))
+* **ERMS** (Enhanced REP MOVSB/STOSB)
+* **RDTSCP** (RDTSCP Instruction)
+* **CX16** (CMPXCHG16B Instruction)
+* **SGX** (Software Guard Extensions, with activation details)
+* **VMX** (Virtual Machine Extensions)
+
+## Performance
+* **RDTSCP()** Returns current cycle count. Can be used for benchmarking.
+* **SSE2SLOW** (SSE2 is supported, but usually not faster)
+* **SSE3SLOW** (SSE3 is supported, but usually not faster)
+* **ATOM** (Atom processor, some SSSE3 instructions are slower)
+* **Cache line** (Probable size of a cache line).
+* **L1, L2, L3 Cache size** on newer Intel/AMD CPUs.
+
+## ARM CPU features
+
+# ARM FEATURE DETECTION DISABLED!
+
+See [#52](https://github.com/klauspost/cpuid/issues/52).
+
+Currently only `arm64` platforms are implemented.
+
+* **FP** Single-precision and double-precision floating point
+* **ASIMD** Advanced SIMD
+* **EVTSTRM** Generic timer
+* **AES** AES instructions
+* **PMULL** Polynomial Multiply instructions (PMULL/PMULL2)
+* **SHA1** SHA-1 instructions (SHA1C, etc)
+* **SHA2** SHA-2 instructions (SHA256H, etc)
+* **CRC32** CRC32/CRC32C instructions
+* **ATOMICS** Large System Extensions (LSE)
+* **FPHP** Half-precision floating point
+* **ASIMDHP** Advanced SIMD half-precision floating point
+* **ARMCPUID** Some CPU ID registers readable at user-level
+* **ASIMDRDM** Rounding Double Multiply Accumulate/Subtract (SQRDMLAH/SQRDMLSH)
+* **JSCVT** Javascript-style double->int convert (FJCVTZS)
+* **FCMA** Floating point complex number addition and multiplication
+* **LRCPC** Weaker release consistency (LDAPR, etc)
+* **DCPOP** Data cache clean to Point of Persistence (DC CVAP)
+* **SHA3** SHA-3 instructions (EOR3, RAXI, XAR, BCAX)
+* **SM3** SM3 instructions
+* **SM4** SM4 instructions
+* **ASIMDDP** SIMD Dot Product
+* **SHA512** SHA512 instructions
+* **SVE** Scalable Vector Extension
+* **GPA** Generic Pointer Authentication
+
+## Cpu Vendor/VM
+* **Intel**
+* **AMD**
+* **VIA**
+* **Transmeta**
+* **NSC**
+* **KVM** (Kernel-based Virtual Machine)
+* **MSVM** (Microsoft Hyper-V or Windows Virtual PC)
+* **VMware**
+* **XenHVM**
+* **Bhyve**
+* **Hygon**
+
+# installing
+
+```go get github.com/klauspost/cpuid```
+
+# example
+
+```Go
+package main
+
+import (
+ "fmt"
+ "github.com/klauspost/cpuid"
+)
+
+func main() {
+ // Print basic CPU information:
+ fmt.Println("Name:", cpuid.CPU.BrandName)
+ fmt.Println("PhysicalCores:", cpuid.CPU.PhysicalCores)
+ fmt.Println("ThreadsPerCore:", cpuid.CPU.ThreadsPerCore)
+ fmt.Println("LogicalCores:", cpuid.CPU.LogicalCores)
+ fmt.Println("Family", cpuid.CPU.Family, "Model:", cpuid.CPU.Model)
+ fmt.Println("Features:", cpuid.CPU.Features)
+ fmt.Println("Cacheline bytes:", cpuid.CPU.CacheLine)
+ fmt.Println("L1 Data Cache:", cpuid.CPU.Cache.L1D, "bytes")
+ fmt.Println("L1 Instruction Cache:", cpuid.CPU.Cache.L1D, "bytes")
+ fmt.Println("L2 Cache:", cpuid.CPU.Cache.L2, "bytes")
+ fmt.Println("L3 Cache:", cpuid.CPU.Cache.L3, "bytes")
+
+ // Test if we have a specific feature:
+ if cpuid.CPU.SSE() {
+ fmt.Println("We have Streaming SIMD Extensions")
+ }
+}
+```
+
+Sample output:
+```
+>go run main.go
+Name: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz
+PhysicalCores: 2
+ThreadsPerCore: 2
+LogicalCores: 4
+Family 6 Model: 42
+Features: CMOV,MMX,MMXEXT,SSE,SSE2,SSE3,SSSE3,SSE4.1,SSE4.2,AVX,AESNI,CLMUL
+Cacheline bytes: 64
+We have Streaming SIMD Extensions
+```
+
+# private package
+
+In the "private" folder you can find an autogenerated version of the library you can include in your own packages.
+
+For this purpose all exports are removed, and functions and constants are lowercased.
+
+This is not a recommended way of using the library, but provided for convenience, if it is difficult for you to use external packages.
+
+# license
+
+This code is published under an MIT license. See LICENSE file for more information.
diff --git a/vendor/github.com/klauspost/cpuid/cpuid.go b/vendor/github.com/klauspost/cpuid/cpuid.go
new file mode 100644
index 0000000..208b3e7
--- /dev/null
+++ b/vendor/github.com/klauspost/cpuid/cpuid.go
@@ -0,0 +1,1504 @@
+// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
+
+// Package cpuid provides information about the CPU running the current program.
+//
+// CPU features are detected on startup, and kept for fast access through the life of the application.
+// Currently x86 / x64 (AMD64) as well as arm64 is supported.
+//
+// You can access the CPU information by accessing the shared CPU variable of the cpuid library.
+//
+// Package home: https://github.com/klauspost/cpuid
+package cpuid
+
+import (
+ "math"
+ "strings"
+)
+
+// AMD refererence: https://www.amd.com/system/files/TechDocs/25481.pdf
+// and Processor Programming Reference (PPR)
+
+// Vendor is a representation of a CPU vendor.
+type Vendor int
+
+const (
+ Other Vendor = iota
+ Intel
+ AMD
+ VIA
+ Transmeta
+ NSC
+ KVM // Kernel-based Virtual Machine
+ MSVM // Microsoft Hyper-V or Windows Virtual PC
+ VMware
+ XenHVM
+ Bhyve
+ Hygon
+ SiS
+ RDC
+)
+
+const (
+ CMOV = 1 << iota // i686 CMOV
+ NX // NX (No-Execute) bit
+ AMD3DNOW // AMD 3DNOW
+ AMD3DNOWEXT // AMD 3DNowExt
+ MMX // standard MMX
+ MMXEXT // SSE integer functions or AMD MMX ext
+ SSE // SSE functions
+ SSE2 // P4 SSE functions
+ SSE3 // Prescott SSE3 functions
+ SSSE3 // Conroe SSSE3 functions
+ SSE4 // Penryn SSE4.1 functions
+ SSE4A // AMD Barcelona microarchitecture SSE4a instructions
+ SSE42 // Nehalem SSE4.2 functions
+ AVX // AVX functions
+ AVX2 // AVX2 functions
+ FMA3 // Intel FMA 3
+ FMA4 // Bulldozer FMA4 functions
+ XOP // Bulldozer XOP functions
+ F16C // Half-precision floating-point conversion
+ BMI1 // Bit Manipulation Instruction Set 1
+ BMI2 // Bit Manipulation Instruction Set 2
+ TBM // AMD Trailing Bit Manipulation
+ LZCNT // LZCNT instruction
+ POPCNT // POPCNT instruction
+ AESNI // Advanced Encryption Standard New Instructions
+ CLMUL // Carry-less Multiplication
+ HTT // Hyperthreading (enabled)
+ HLE // Hardware Lock Elision
+ RTM // Restricted Transactional Memory
+ RDRAND // RDRAND instruction is available
+ RDSEED // RDSEED instruction is available
+ ADX // Intel ADX (Multi-Precision Add-Carry Instruction Extensions)
+ SHA // Intel SHA Extensions
+ AVX512F // AVX-512 Foundation
+ AVX512DQ // AVX-512 Doubleword and Quadword Instructions
+ AVX512IFMA // AVX-512 Integer Fused Multiply-Add Instructions
+ AVX512PF // AVX-512 Prefetch Instructions
+ AVX512ER // AVX-512 Exponential and Reciprocal Instructions
+ AVX512CD // AVX-512 Conflict Detection Instructions
+ AVX512BW // AVX-512 Byte and Word Instructions
+ AVX512VL // AVX-512 Vector Length Extensions
+ AVX512VBMI // AVX-512 Vector Bit Manipulation Instructions
+ AVX512VBMI2 // AVX-512 Vector Bit Manipulation Instructions, Version 2
+ AVX512VNNI // AVX-512 Vector Neural Network Instructions
+ AVX512VPOPCNTDQ // AVX-512 Vector Population Count Doubleword and Quadword
+ GFNI // Galois Field New Instructions
+ VAES // Vector AES
+ AVX512BITALG // AVX-512 Bit Algorithms
+ VPCLMULQDQ // Carry-Less Multiplication Quadword
+ AVX512BF16 // AVX-512 BFLOAT16 Instructions
+ AVX512VP2INTERSECT // AVX-512 Intersect for D/Q
+ MPX // Intel MPX (Memory Protection Extensions)
+ ERMS // Enhanced REP MOVSB/STOSB
+ RDTSCP // RDTSCP Instruction
+ CX16 // CMPXCHG16B Instruction
+ SGX // Software Guard Extensions
+ SGXLC // Software Guard Extensions Launch Control
+ IBPB // Indirect Branch Restricted Speculation (IBRS) and Indirect Branch Predictor Barrier (IBPB)
+ STIBP // Single Thread Indirect Branch Predictors
+ VMX // Virtual Machine Extensions
+
+ // Performance indicators
+ SSE2SLOW // SSE2 is supported, but usually not faster
+ SSE3SLOW // SSE3 is supported, but usually not faster
+ ATOM // Atom processor, some SSSE3 instructions are slower
+)
+
+var flagNames = map[Flags]string{
+ CMOV: "CMOV", // i686 CMOV
+ NX: "NX", // NX (No-Execute) bit
+ AMD3DNOW: "AMD3DNOW", // AMD 3DNOW
+ AMD3DNOWEXT: "AMD3DNOWEXT", // AMD 3DNowExt
+ MMX: "MMX", // Standard MMX
+ MMXEXT: "MMXEXT", // SSE integer functions or AMD MMX ext
+ SSE: "SSE", // SSE functions
+ SSE2: "SSE2", // P4 SSE2 functions
+ SSE3: "SSE3", // Prescott SSE3 functions
+ SSSE3: "SSSE3", // Conroe SSSE3 functions
+ SSE4: "SSE4.1", // Penryn SSE4.1 functions
+ SSE4A: "SSE4A", // AMD Barcelona microarchitecture SSE4a instructions
+ SSE42: "SSE4.2", // Nehalem SSE4.2 functions
+ AVX: "AVX", // AVX functions
+ AVX2: "AVX2", // AVX functions
+ FMA3: "FMA3", // Intel FMA 3
+ FMA4: "FMA4", // Bulldozer FMA4 functions
+ XOP: "XOP", // Bulldozer XOP functions
+ F16C: "F16C", // Half-precision floating-point conversion
+ BMI1: "BMI1", // Bit Manipulation Instruction Set 1
+ BMI2: "BMI2", // Bit Manipulation Instruction Set 2
+ TBM: "TBM", // AMD Trailing Bit Manipulation
+ LZCNT: "LZCNT", // LZCNT instruction
+ POPCNT: "POPCNT", // POPCNT instruction
+ AESNI: "AESNI", // Advanced Encryption Standard New Instructions
+ CLMUL: "CLMUL", // Carry-less Multiplication
+ HTT: "HTT", // Hyperthreading (enabled)
+ HLE: "HLE", // Hardware Lock Elision
+ RTM: "RTM", // Restricted Transactional Memory
+ RDRAND: "RDRAND", // RDRAND instruction is available
+ RDSEED: "RDSEED", // RDSEED instruction is available
+ ADX: "ADX", // Intel ADX (Multi-Precision Add-Carry Instruction Extensions)
+ SHA: "SHA", // Intel SHA Extensions
+ AVX512F: "AVX512F", // AVX-512 Foundation
+ AVX512DQ: "AVX512DQ", // AVX-512 Doubleword and Quadword Instructions
+ AVX512IFMA: "AVX512IFMA", // AVX-512 Integer Fused Multiply-Add Instructions
+ AVX512PF: "AVX512PF", // AVX-512 Prefetch Instructions
+ AVX512ER: "AVX512ER", // AVX-512 Exponential and Reciprocal Instructions
+ AVX512CD: "AVX512CD", // AVX-512 Conflict Detection Instructions
+ AVX512BW: "AVX512BW", // AVX-512 Byte and Word Instructions
+ AVX512VL: "AVX512VL", // AVX-512 Vector Length Extensions
+ AVX512VBMI: "AVX512VBMI", // AVX-512 Vector Bit Manipulation Instructions
+ AVX512VBMI2: "AVX512VBMI2", // AVX-512 Vector Bit Manipulation Instructions, Version 2
+ AVX512VNNI: "AVX512VNNI", // AVX-512 Vector Neural Network Instructions
+ AVX512VPOPCNTDQ: "AVX512VPOPCNTDQ", // AVX-512 Vector Population Count Doubleword and Quadword
+ GFNI: "GFNI", // Galois Field New Instructions
+ VAES: "VAES", // Vector AES
+ AVX512BITALG: "AVX512BITALG", // AVX-512 Bit Algorithms
+ VPCLMULQDQ: "VPCLMULQDQ", // Carry-Less Multiplication Quadword
+ AVX512BF16: "AVX512BF16", // AVX-512 BFLOAT16 Instruction
+ AVX512VP2INTERSECT: "AVX512VP2INTERSECT", // AVX-512 Intersect for D/Q
+ MPX: "MPX", // Intel MPX (Memory Protection Extensions)
+ ERMS: "ERMS", // Enhanced REP MOVSB/STOSB
+ RDTSCP: "RDTSCP", // RDTSCP Instruction
+ CX16: "CX16", // CMPXCHG16B Instruction
+ SGX: "SGX", // Software Guard Extensions
+ SGXLC: "SGXLC", // Software Guard Extensions Launch Control
+ IBPB: "IBPB", // Indirect Branch Restricted Speculation and Indirect Branch Predictor Barrier
+ STIBP: "STIBP", // Single Thread Indirect Branch Predictors
+ VMX: "VMX", // Virtual Machine Extensions
+
+ // Performance indicators
+ SSE2SLOW: "SSE2SLOW", // SSE2 supported, but usually not faster
+ SSE3SLOW: "SSE3SLOW", // SSE3 supported, but usually not faster
+ ATOM: "ATOM", // Atom processor, some SSSE3 instructions are slower
+
+}
+
+/* all special features for arm64 should be defined here */
+const (
+ /* extension instructions */
+ FP ArmFlags = 1 << iota
+ ASIMD
+ EVTSTRM
+ AES
+ PMULL
+ SHA1
+ SHA2
+ CRC32
+ ATOMICS
+ FPHP
+ ASIMDHP
+ ARMCPUID
+ ASIMDRDM
+ JSCVT
+ FCMA
+ LRCPC
+ DCPOP
+ SHA3
+ SM3
+ SM4
+ ASIMDDP
+ SHA512
+ SVE
+ GPA
+)
+
+var flagNamesArm = map[ArmFlags]string{
+ FP: "FP", // Single-precision and double-precision floating point
+ ASIMD: "ASIMD", // Advanced SIMD
+ EVTSTRM: "EVTSTRM", // Generic timer
+ AES: "AES", // AES instructions
+ PMULL: "PMULL", // Polynomial Multiply instructions (PMULL/PMULL2)
+ SHA1: "SHA1", // SHA-1 instructions (SHA1C, etc)
+ SHA2: "SHA2", // SHA-2 instructions (SHA256H, etc)
+ CRC32: "CRC32", // CRC32/CRC32C instructions
+ ATOMICS: "ATOMICS", // Large System Extensions (LSE)
+ FPHP: "FPHP", // Half-precision floating point
+ ASIMDHP: "ASIMDHP", // Advanced SIMD half-precision floating point
+ ARMCPUID: "CPUID", // Some CPU ID registers readable at user-level
+ ASIMDRDM: "ASIMDRDM", // Rounding Double Multiply Accumulate/Subtract (SQRDMLAH/SQRDMLSH)
+ JSCVT: "JSCVT", // Javascript-style double->int convert (FJCVTZS)
+ FCMA: "FCMA", // Floatin point complex number addition and multiplication
+ LRCPC: "LRCPC", // Weaker release consistency (LDAPR, etc)
+ DCPOP: "DCPOP", // Data cache clean to Point of Persistence (DC CVAP)
+ SHA3: "SHA3", // SHA-3 instructions (EOR3, RAXI, XAR, BCAX)
+ SM3: "SM3", // SM3 instructions
+ SM4: "SM4", // SM4 instructions
+ ASIMDDP: "ASIMDDP", // SIMD Dot Product
+ SHA512: "SHA512", // SHA512 instructions
+ SVE: "SVE", // Scalable Vector Extension
+ GPA: "GPA", // Generic Pointer Authentication
+}
+
+// CPUInfo contains information about the detected system CPU.
+type CPUInfo struct {
+ BrandName string // Brand name reported by the CPU
+ VendorID Vendor // Comparable CPU vendor ID
+ VendorString string // Raw vendor string.
+ Features Flags // Features of the CPU (x64)
+ Arm ArmFlags // Features of the CPU (arm)
+ PhysicalCores int // Number of physical processor cores in your CPU. Will be 0 if undetectable.
+ ThreadsPerCore int // Number of threads per physical core. Will be 1 if undetectable.
+ LogicalCores int // Number of physical cores times threads that can run on each core through the use of hyperthreading. Will be 0 if undetectable.
+ Family int // CPU family number
+ Model int // CPU model number
+ CacheLine int // Cache line size in bytes. Will be 0 if undetectable.
+ Hz int64 // Clock speed, if known
+ Cache struct {
+ L1I int // L1 Instruction Cache (per core or shared). Will be -1 if undetected
+ L1D int // L1 Data Cache (per core or shared). Will be -1 if undetected
+ L2 int // L2 Cache (per core or shared). Will be -1 if undetected
+ L3 int // L3 Cache (per core, per ccx or shared). Will be -1 if undetected
+ }
+ SGX SGXSupport
+ maxFunc uint32
+ maxExFunc uint32
+}
+
+var cpuid func(op uint32) (eax, ebx, ecx, edx uint32)
+var cpuidex func(op, op2 uint32) (eax, ebx, ecx, edx uint32)
+var xgetbv func(index uint32) (eax, edx uint32)
+var rdtscpAsm func() (eax, ebx, ecx, edx uint32)
+
+// CPU contains information about the CPU as detected on startup,
+// or when Detect last was called.
+//
+// Use this as the primary entry point to you data.
+var CPU CPUInfo
+
+func init() {
+ initCPU()
+ Detect()
+}
+
+// Detect will re-detect current CPU info.
+// This will replace the content of the exported CPU variable.
+//
+// Unless you expect the CPU to change while you are running your program
+// you should not need to call this function.
+// If you call this, you must ensure that no other goroutine is accessing the
+// exported CPU variable.
+func Detect() {
+ // Set defaults
+ CPU.ThreadsPerCore = 1
+ CPU.Cache.L1I = -1
+ CPU.Cache.L1D = -1
+ CPU.Cache.L2 = -1
+ CPU.Cache.L3 = -1
+ addInfo(&CPU)
+}
+
+// Generated here: http://play.golang.org/p/BxFH2Gdc0G
+
+// Cmov indicates support of CMOV instructions
+func (c CPUInfo) Cmov() bool {
+ return c.Features&CMOV != 0
+}
+
+// Amd3dnow indicates support of AMD 3DNOW! instructions
+func (c CPUInfo) Amd3dnow() bool {
+ return c.Features&AMD3DNOW != 0
+}
+
+// Amd3dnowExt indicates support of AMD 3DNOW! Extended instructions
+func (c CPUInfo) Amd3dnowExt() bool {
+ return c.Features&AMD3DNOWEXT != 0
+}
+
+// VMX indicates support of VMX
+func (c CPUInfo) VMX() bool {
+ return c.Features&VMX != 0
+}
+
+// MMX indicates support of MMX instructions
+func (c CPUInfo) MMX() bool {
+ return c.Features&MMX != 0
+}
+
+// MMXExt indicates support of MMXEXT instructions
+// (SSE integer functions or AMD MMX ext)
+func (c CPUInfo) MMXExt() bool {
+ return c.Features&MMXEXT != 0
+}
+
+// SSE indicates support of SSE instructions
+func (c CPUInfo) SSE() bool {
+ return c.Features&SSE != 0
+}
+
+// SSE2 indicates support of SSE 2 instructions
+func (c CPUInfo) SSE2() bool {
+ return c.Features&SSE2 != 0
+}
+
+// SSE3 indicates support of SSE 3 instructions
+func (c CPUInfo) SSE3() bool {
+ return c.Features&SSE3 != 0
+}
+
+// SSSE3 indicates support of SSSE 3 instructions
+func (c CPUInfo) SSSE3() bool {
+ return c.Features&SSSE3 != 0
+}
+
+// SSE4 indicates support of SSE 4 (also called SSE 4.1) instructions
+func (c CPUInfo) SSE4() bool {
+ return c.Features&SSE4 != 0
+}
+
+// SSE42 indicates support of SSE4.2 instructions
+func (c CPUInfo) SSE42() bool {
+ return c.Features&SSE42 != 0
+}
+
+// AVX indicates support of AVX instructions
+// and operating system support of AVX instructions
+func (c CPUInfo) AVX() bool {
+ return c.Features&AVX != 0
+}
+
+// AVX2 indicates support of AVX2 instructions
+func (c CPUInfo) AVX2() bool {
+ return c.Features&AVX2 != 0
+}
+
+// FMA3 indicates support of FMA3 instructions
+func (c CPUInfo) FMA3() bool {
+ return c.Features&FMA3 != 0
+}
+
+// FMA4 indicates support of FMA4 instructions
+func (c CPUInfo) FMA4() bool {
+ return c.Features&FMA4 != 0
+}
+
+// XOP indicates support of XOP instructions
+func (c CPUInfo) XOP() bool {
+ return c.Features&XOP != 0
+}
+
+// F16C indicates support of F16C instructions
+func (c CPUInfo) F16C() bool {
+ return c.Features&F16C != 0
+}
+
+// BMI1 indicates support of BMI1 instructions
+func (c CPUInfo) BMI1() bool {
+ return c.Features&BMI1 != 0
+}
+
+// BMI2 indicates support of BMI2 instructions
+func (c CPUInfo) BMI2() bool {
+ return c.Features&BMI2 != 0
+}
+
+// TBM indicates support of TBM instructions
+// (AMD Trailing Bit Manipulation)
+func (c CPUInfo) TBM() bool {
+ return c.Features&TBM != 0
+}
+
+// Lzcnt indicates support of LZCNT instruction
+func (c CPUInfo) Lzcnt() bool {
+ return c.Features&LZCNT != 0
+}
+
+// Popcnt indicates support of POPCNT instruction
+func (c CPUInfo) Popcnt() bool {
+ return c.Features&POPCNT != 0
+}
+
+// HTT indicates the processor has Hyperthreading enabled
+func (c CPUInfo) HTT() bool {
+ return c.Features&HTT != 0
+}
+
+// SSE2Slow indicates that SSE2 may be slow on this processor
+func (c CPUInfo) SSE2Slow() bool {
+ return c.Features&SSE2SLOW != 0
+}
+
+// SSE3Slow indicates that SSE3 may be slow on this processor
+func (c CPUInfo) SSE3Slow() bool {
+ return c.Features&SSE3SLOW != 0
+}
+
+// AesNi indicates support of AES-NI instructions
+// (Advanced Encryption Standard New Instructions)
+func (c CPUInfo) AesNi() bool {
+ return c.Features&AESNI != 0
+}
+
+// Clmul indicates support of CLMUL instructions
+// (Carry-less Multiplication)
+func (c CPUInfo) Clmul() bool {
+ return c.Features&CLMUL != 0
+}
+
+// NX indicates support of NX (No-Execute) bit
+func (c CPUInfo) NX() bool {
+ return c.Features&NX != 0
+}
+
+// SSE4A indicates support of AMD Barcelona microarchitecture SSE4a instructions
+func (c CPUInfo) SSE4A() bool {
+ return c.Features&SSE4A != 0
+}
+
+// HLE indicates support of Hardware Lock Elision
+func (c CPUInfo) HLE() bool {
+ return c.Features&HLE != 0
+}
+
+// RTM indicates support of Restricted Transactional Memory
+func (c CPUInfo) RTM() bool {
+ return c.Features&RTM != 0
+}
+
+// Rdrand indicates support of RDRAND instruction is available
+func (c CPUInfo) Rdrand() bool {
+ return c.Features&RDRAND != 0
+}
+
+// Rdseed indicates support of RDSEED instruction is available
+func (c CPUInfo) Rdseed() bool {
+ return c.Features&RDSEED != 0
+}
+
+// ADX indicates support of Intel ADX (Multi-Precision Add-Carry Instruction Extensions)
+func (c CPUInfo) ADX() bool {
+ return c.Features&ADX != 0
+}
+
+// SHA indicates support of Intel SHA Extensions
+func (c CPUInfo) SHA() bool {
+ return c.Features&SHA != 0
+}
+
+// AVX512F indicates support of AVX-512 Foundation
+func (c CPUInfo) AVX512F() bool {
+ return c.Features&AVX512F != 0
+}
+
+// AVX512DQ indicates support of AVX-512 Doubleword and Quadword Instructions
+func (c CPUInfo) AVX512DQ() bool {
+ return c.Features&AVX512DQ != 0
+}
+
+// AVX512IFMA indicates support of AVX-512 Integer Fused Multiply-Add Instructions
+func (c CPUInfo) AVX512IFMA() bool {
+ return c.Features&AVX512IFMA != 0
+}
+
+// AVX512PF indicates support of AVX-512 Prefetch Instructions
+func (c CPUInfo) AVX512PF() bool {
+ return c.Features&AVX512PF != 0
+}
+
+// AVX512ER indicates support of AVX-512 Exponential and Reciprocal Instructions
+func (c CPUInfo) AVX512ER() bool {
+ return c.Features&AVX512ER != 0
+}
+
+// AVX512CD indicates support of AVX-512 Conflict Detection Instructions
+func (c CPUInfo) AVX512CD() bool {
+ return c.Features&AVX512CD != 0
+}
+
+// AVX512BW indicates support of AVX-512 Byte and Word Instructions
+func (c CPUInfo) AVX512BW() bool {
+ return c.Features&AVX512BW != 0
+}
+
+// AVX512VL indicates support of AVX-512 Vector Length Extensions
+func (c CPUInfo) AVX512VL() bool {
+ return c.Features&AVX512VL != 0
+}
+
+// AVX512VBMI indicates support of AVX-512 Vector Bit Manipulation Instructions
+func (c CPUInfo) AVX512VBMI() bool {
+ return c.Features&AVX512VBMI != 0
+}
+
+// AVX512VBMI2 indicates support of AVX-512 Vector Bit Manipulation Instructions, Version 2
+func (c CPUInfo) AVX512VBMI2() bool {
+ return c.Features&AVX512VBMI2 != 0
+}
+
+// AVX512VNNI indicates support of AVX-512 Vector Neural Network Instructions
+func (c CPUInfo) AVX512VNNI() bool {
+ return c.Features&AVX512VNNI != 0
+}
+
+// AVX512VPOPCNTDQ indicates support of AVX-512 Vector Population Count Doubleword and Quadword
+func (c CPUInfo) AVX512VPOPCNTDQ() bool {
+ return c.Features&AVX512VPOPCNTDQ != 0
+}
+
+// GFNI indicates support of Galois Field New Instructions
+func (c CPUInfo) GFNI() bool {
+ return c.Features&GFNI != 0
+}
+
+// VAES indicates support of Vector AES
+func (c CPUInfo) VAES() bool {
+ return c.Features&VAES != 0
+}
+
+// AVX512BITALG indicates support of AVX-512 Bit Algorithms
+func (c CPUInfo) AVX512BITALG() bool {
+ return c.Features&AVX512BITALG != 0
+}
+
+// VPCLMULQDQ indicates support of Carry-Less Multiplication Quadword
+func (c CPUInfo) VPCLMULQDQ() bool {
+ return c.Features&VPCLMULQDQ != 0
+}
+
+// AVX512BF16 indicates support of
+func (c CPUInfo) AVX512BF16() bool {
+ return c.Features&AVX512BF16 != 0
+}
+
+// AVX512VP2INTERSECT indicates support of
+func (c CPUInfo) AVX512VP2INTERSECT() bool {
+ return c.Features&AVX512VP2INTERSECT != 0
+}
+
+// MPX indicates support of Intel MPX (Memory Protection Extensions)
+func (c CPUInfo) MPX() bool {
+ return c.Features&MPX != 0
+}
+
+// ERMS indicates support of Enhanced REP MOVSB/STOSB
+func (c CPUInfo) ERMS() bool {
+ return c.Features&ERMS != 0
+}
+
+// RDTSCP Instruction is available.
+func (c CPUInfo) RDTSCP() bool {
+ return c.Features&RDTSCP != 0
+}
+
+// CX16 indicates if CMPXCHG16B instruction is available.
+func (c CPUInfo) CX16() bool {
+ return c.Features&CX16 != 0
+}
+
+// TSX is split into HLE (Hardware Lock Elision) and RTM (Restricted Transactional Memory) detection.
+// So TSX simply checks that.
+func (c CPUInfo) TSX() bool {
+ return c.Features&(HLE|RTM) == HLE|RTM
+}
+
+// Atom indicates an Atom processor
+func (c CPUInfo) Atom() bool {
+ return c.Features&ATOM != 0
+}
+
+// Intel returns true if vendor is recognized as Intel
+func (c CPUInfo) Intel() bool {
+ return c.VendorID == Intel
+}
+
+// AMD returns true if vendor is recognized as AMD
+func (c CPUInfo) AMD() bool {
+ return c.VendorID == AMD
+}
+
+// Hygon returns true if vendor is recognized as Hygon
+func (c CPUInfo) Hygon() bool {
+ return c.VendorID == Hygon
+}
+
+// Transmeta returns true if vendor is recognized as Transmeta
+func (c CPUInfo) Transmeta() bool {
+ return c.VendorID == Transmeta
+}
+
+// NSC returns true if vendor is recognized as National Semiconductor
+func (c CPUInfo) NSC() bool {
+ return c.VendorID == NSC
+}
+
+// VIA returns true if vendor is recognized as VIA
+func (c CPUInfo) VIA() bool {
+ return c.VendorID == VIA
+}
+
+// RTCounter returns the 64-bit time-stamp counter
+// Uses the RDTSCP instruction. The value 0 is returned
+// if the CPU does not support the instruction.
+func (c CPUInfo) RTCounter() uint64 {
+ if !c.RDTSCP() {
+ return 0
+ }
+ a, _, _, d := rdtscpAsm()
+ return uint64(a) | (uint64(d) << 32)
+}
+
+// Ia32TscAux returns the IA32_TSC_AUX part of the RDTSCP.
+// This variable is OS dependent, but on Linux contains information
+// about the current cpu/core the code is running on.
+// If the RDTSCP instruction isn't supported on the CPU, the value 0 is returned.
+func (c CPUInfo) Ia32TscAux() uint32 {
+ if !c.RDTSCP() {
+ return 0
+ }
+ _, _, ecx, _ := rdtscpAsm()
+ return ecx
+}
+
+// LogicalCPU will return the Logical CPU the code is currently executing on.
+// This is likely to change when the OS re-schedules the running thread
+// to another CPU.
+// If the current core cannot be detected, -1 will be returned.
+func (c CPUInfo) LogicalCPU() int {
+ if c.maxFunc < 1 {
+ return -1
+ }
+ _, ebx, _, _ := cpuid(1)
+ return int(ebx >> 24)
+}
+
+// hertz tries to compute the clock speed of the CPU. If leaf 15 is
+// supported, use it, otherwise parse the brand string. Yes, really.
+func hertz(model string) int64 {
+ mfi := maxFunctionID()
+ if mfi >= 0x15 {
+ eax, ebx, ecx, _ := cpuid(0x15)
+ if eax != 0 && ebx != 0 && ecx != 0 {
+ return int64((int64(ecx) * int64(ebx)) / int64(eax))
+ }
+ }
+ // computeHz determines the official rated speed of a CPU from its brand
+ // string. This insanity is *actually the official documented way to do
+ // this according to Intel*, prior to leaf 0x15 existing. The official
+ // documentation only shows this working for exactly `x.xx` or `xxxx`
+ // cases, e.g., `2.50GHz` or `1300MHz`; this parser will accept other
+ // sizes.
+ hz := strings.LastIndex(model, "Hz")
+ if hz < 3 {
+ return -1
+ }
+ var multiplier int64
+ switch model[hz-1] {
+ case 'M':
+ multiplier = 1000 * 1000
+ case 'G':
+ multiplier = 1000 * 1000 * 1000
+ case 'T':
+ multiplier = 1000 * 1000 * 1000 * 1000
+ }
+ if multiplier == 0 {
+ return -1
+ }
+ freq := int64(0)
+ divisor := int64(0)
+ decimalShift := int64(1)
+ var i int
+ for i = hz - 2; i >= 0 && model[i] != ' '; i-- {
+ if model[i] >= '0' && model[i] <= '9' {
+ freq += int64(model[i]-'0') * decimalShift
+ decimalShift *= 10
+ } else if model[i] == '.' {
+ if divisor != 0 {
+ return -1
+ }
+ divisor = decimalShift
+ } else {
+ return -1
+ }
+ }
+ // we didn't find a space
+ if i < 0 {
+ return -1
+ }
+ if divisor != 0 {
+ return (freq * multiplier) / divisor
+ }
+ return freq * multiplier
+}
+
+// VM Will return true if the cpu id indicates we are in
+// a virtual machine. This is only a hint, and will very likely
+// have many false negatives.
+func (c CPUInfo) VM() bool {
+ switch c.VendorID {
+ case MSVM, KVM, VMware, XenHVM, Bhyve:
+ return true
+ }
+ return false
+}
+
+// Flags contains detected cpu features and characteristics
+type Flags uint64
+
+// ArmFlags contains detected ARM cpu features and characteristics
+type ArmFlags uint64
+
+// String returns a string representation of the detected
+// CPU features.
+func (f Flags) String() string {
+ return strings.Join(f.Strings(), ",")
+}
+
+// Strings returns an array of the detected features.
+func (f Flags) Strings() []string {
+ r := make([]string, 0, 20)
+ for i := uint(0); i < 64; i++ {
+ key := Flags(1 << i)
+ val := flagNames[key]
+ if f&key != 0 {
+ r = append(r, val)
+ }
+ }
+ return r
+}
+
+// String returns a string representation of the detected
+// CPU features.
+func (f ArmFlags) String() string {
+ return strings.Join(f.Strings(), ",")
+}
+
+// Strings returns an array of the detected features.
+func (f ArmFlags) Strings() []string {
+ r := make([]string, 0, 20)
+ for i := uint(0); i < 64; i++ {
+ key := ArmFlags(1 << i)
+ val := flagNamesArm[key]
+ if f&key != 0 {
+ r = append(r, val)
+ }
+ }
+ return r
+}
+func maxExtendedFunction() uint32 {
+ eax, _, _, _ := cpuid(0x80000000)
+ return eax
+}
+
+func maxFunctionID() uint32 {
+ a, _, _, _ := cpuid(0)
+ return a
+}
+
+func brandName() string {
+ if maxExtendedFunction() >= 0x80000004 {
+ v := make([]uint32, 0, 48)
+ for i := uint32(0); i < 3; i++ {
+ a, b, c, d := cpuid(0x80000002 + i)
+ v = append(v, a, b, c, d)
+ }
+ return strings.Trim(string(valAsString(v...)), " ")
+ }
+ return "unknown"
+}
+
+func threadsPerCore() int {
+ mfi := maxFunctionID()
+ vend, _ := vendorID()
+
+ if mfi < 0x4 || (vend != Intel && vend != AMD) {
+ return 1
+ }
+
+ if mfi < 0xb {
+ if vend != Intel {
+ return 1
+ }
+ _, b, _, d := cpuid(1)
+ if (d & (1 << 28)) != 0 {
+ // v will contain logical core count
+ v := (b >> 16) & 255
+ if v > 1 {
+ a4, _, _, _ := cpuid(4)
+ // physical cores
+ v2 := (a4 >> 26) + 1
+ if v2 > 0 {
+ return int(v) / int(v2)
+ }
+ }
+ }
+ return 1
+ }
+ _, b, _, _ := cpuidex(0xb, 0)
+ if b&0xffff == 0 {
+ return 1
+ }
+ return int(b & 0xffff)
+}
+
+func logicalCores() int {
+ mfi := maxFunctionID()
+ v, _ := vendorID()
+ switch v {
+ case Intel:
+ // Use this on old Intel processors
+ if mfi < 0xb {
+ if mfi < 1 {
+ return 0
+ }
+ // CPUID.1:EBX[23:16] represents the maximum number of addressable IDs (initial APIC ID)
+ // that can be assigned to logical processors in a physical package.
+ // The value may not be the same as the number of logical processors that are present in the hardware of a physical package.
+ _, ebx, _, _ := cpuid(1)
+ logical := (ebx >> 16) & 0xff
+ return int(logical)
+ }
+ _, b, _, _ := cpuidex(0xb, 1)
+ return int(b & 0xffff)
+ case AMD, Hygon:
+ _, b, _, _ := cpuid(1)
+ return int((b >> 16) & 0xff)
+ default:
+ return 0
+ }
+}
+
+func familyModel() (int, int) {
+ if maxFunctionID() < 0x1 {
+ return 0, 0
+ }
+ eax, _, _, _ := cpuid(1)
+ family := ((eax >> 8) & 0xf) + ((eax >> 20) & 0xff)
+ model := ((eax >> 4) & 0xf) + ((eax >> 12) & 0xf0)
+ return int(family), int(model)
+}
+
+func physicalCores() int {
+ v, _ := vendorID()
+ switch v {
+ case Intel:
+ return logicalCores() / threadsPerCore()
+ case AMD, Hygon:
+ lc := logicalCores()
+ tpc := threadsPerCore()
+ if lc > 0 && tpc > 0 {
+ return lc / tpc
+ }
+ // The following is inaccurate on AMD EPYC 7742 64-Core Processor
+
+ if maxExtendedFunction() >= 0x80000008 {
+ _, _, c, _ := cpuid(0x80000008)
+ return int(c&0xff) + 1
+ }
+ }
+ return 0
+}
+
+// Except from http://en.wikipedia.org/wiki/CPUID#EAX.3D0:_Get_vendor_ID
+var vendorMapping = map[string]Vendor{
+ "AMDisbetter!": AMD,
+ "AuthenticAMD": AMD,
+ "CentaurHauls": VIA,
+ "GenuineIntel": Intel,
+ "TransmetaCPU": Transmeta,
+ "GenuineTMx86": Transmeta,
+ "Geode by NSC": NSC,
+ "VIA VIA VIA ": VIA,
+ "KVMKVMKVMKVM": KVM,
+ "Microsoft Hv": MSVM,
+ "VMwareVMware": VMware,
+ "XenVMMXenVMM": XenHVM,
+ "bhyve bhyve ": Bhyve,
+ "HygonGenuine": Hygon,
+ "Vortex86 SoC": SiS,
+ "SiS SiS SiS ": SiS,
+ "RiseRiseRise": SiS,
+ "Genuine RDC": RDC,
+}
+
+func vendorID() (Vendor, string) {
+ _, b, c, d := cpuid(0)
+ v := string(valAsString(b, d, c))
+ vend, ok := vendorMapping[v]
+ if !ok {
+ return Other, v
+ }
+ return vend, v
+}
+
+func cacheLine() int {
+ if maxFunctionID() < 0x1 {
+ return 0
+ }
+
+ _, ebx, _, _ := cpuid(1)
+ cache := (ebx & 0xff00) >> 5 // cflush size
+ if cache == 0 && maxExtendedFunction() >= 0x80000006 {
+ _, _, ecx, _ := cpuid(0x80000006)
+ cache = ecx & 0xff // cacheline size
+ }
+ // TODO: Read from Cache and TLB Information
+ return int(cache)
+}
+
+func (c *CPUInfo) cacheSize() {
+ c.Cache.L1D = -1
+ c.Cache.L1I = -1
+ c.Cache.L2 = -1
+ c.Cache.L3 = -1
+ vendor, _ := vendorID()
+ switch vendor {
+ case Intel:
+ if maxFunctionID() < 4 {
+ return
+ }
+ for i := uint32(0); ; i++ {
+ eax, ebx, ecx, _ := cpuidex(4, i)
+ cacheType := eax & 15
+ if cacheType == 0 {
+ break
+ }
+ cacheLevel := (eax >> 5) & 7
+ coherency := int(ebx&0xfff) + 1
+ partitions := int((ebx>>12)&0x3ff) + 1
+ associativity := int((ebx>>22)&0x3ff) + 1
+ sets := int(ecx) + 1
+ size := associativity * partitions * coherency * sets
+ switch cacheLevel {
+ case 1:
+ if cacheType == 1 {
+ // 1 = Data Cache
+ c.Cache.L1D = size
+ } else if cacheType == 2 {
+ // 2 = Instruction Cache
+ c.Cache.L1I = size
+ } else {
+ if c.Cache.L1D < 0 {
+ c.Cache.L1I = size
+ }
+ if c.Cache.L1I < 0 {
+ c.Cache.L1I = size
+ }
+ }
+ case 2:
+ c.Cache.L2 = size
+ case 3:
+ c.Cache.L3 = size
+ }
+ }
+ case AMD, Hygon:
+ // Untested.
+ if maxExtendedFunction() < 0x80000005 {
+ return
+ }
+ _, _, ecx, edx := cpuid(0x80000005)
+ c.Cache.L1D = int(((ecx >> 24) & 0xFF) * 1024)
+ c.Cache.L1I = int(((edx >> 24) & 0xFF) * 1024)
+
+ if maxExtendedFunction() < 0x80000006 {
+ return
+ }
+ _, _, ecx, _ = cpuid(0x80000006)
+ c.Cache.L2 = int(((ecx >> 16) & 0xFFFF) * 1024)
+
+ // CPUID Fn8000_001D_EAX_x[N:0] Cache Properties
+ if maxExtendedFunction() < 0x8000001D {
+ return
+ }
+ for i := uint32(0); i < math.MaxUint32; i++ {
+ eax, ebx, ecx, _ := cpuidex(0x8000001D, i)
+
+ level := (eax >> 5) & 7
+ cacheNumSets := ecx + 1
+ cacheLineSize := 1 + (ebx & 2047)
+ cachePhysPartitions := 1 + ((ebx >> 12) & 511)
+ cacheNumWays := 1 + ((ebx >> 22) & 511)
+
+ typ := eax & 15
+ size := int(cacheNumSets * cacheLineSize * cachePhysPartitions * cacheNumWays)
+ if typ == 0 {
+ return
+ }
+
+ switch level {
+ case 1:
+ switch typ {
+ case 1:
+ // Data cache
+ c.Cache.L1D = size
+ case 2:
+ // Inst cache
+ c.Cache.L1I = size
+ default:
+ if c.Cache.L1D < 0 {
+ c.Cache.L1I = size
+ }
+ if c.Cache.L1I < 0 {
+ c.Cache.L1I = size
+ }
+ }
+ case 2:
+ c.Cache.L2 = size
+ case 3:
+ c.Cache.L3 = size
+ }
+ }
+ }
+
+ return
+}
+
+type SGXEPCSection struct {
+ BaseAddress uint64
+ EPCSize uint64
+}
+
+type SGXSupport struct {
+ Available bool
+ LaunchControl bool
+ SGX1Supported bool
+ SGX2Supported bool
+ MaxEnclaveSizeNot64 int64
+ MaxEnclaveSize64 int64
+ EPCSections []SGXEPCSection
+}
+
+func hasSGX(available, lc bool) (rval SGXSupport) {
+ rval.Available = available
+
+ if !available {
+ return
+ }
+
+ rval.LaunchControl = lc
+
+ a, _, _, d := cpuidex(0x12, 0)
+ rval.SGX1Supported = a&0x01 != 0
+ rval.SGX2Supported = a&0x02 != 0
+ rval.MaxEnclaveSizeNot64 = 1 << (d & 0xFF) // pow 2
+ rval.MaxEnclaveSize64 = 1 << ((d >> 8) & 0xFF) // pow 2
+ rval.EPCSections = make([]SGXEPCSection, 0)
+
+ for subleaf := uint32(2); subleaf < 2+8; subleaf++ {
+ eax, ebx, ecx, edx := cpuidex(0x12, subleaf)
+ leafType := eax & 0xf
+
+ if leafType == 0 {
+ // Invalid subleaf, stop iterating
+ break
+ } else if leafType == 1 {
+ // EPC Section subleaf
+ baseAddress := uint64(eax&0xfffff000) + (uint64(ebx&0x000fffff) << 32)
+ size := uint64(ecx&0xfffff000) + (uint64(edx&0x000fffff) << 32)
+
+ section := SGXEPCSection{BaseAddress: baseAddress, EPCSize: size}
+ rval.EPCSections = append(rval.EPCSections, section)
+ }
+ }
+
+ return
+}
+
+func support() Flags {
+ mfi := maxFunctionID()
+ vend, _ := vendorID()
+ if mfi < 0x1 {
+ return 0
+ }
+ rval := uint64(0)
+ _, _, c, d := cpuid(1)
+ if (d & (1 << 15)) != 0 {
+ rval |= CMOV
+ }
+ if (d & (1 << 23)) != 0 {
+ rval |= MMX
+ }
+ if (d & (1 << 25)) != 0 {
+ rval |= MMXEXT
+ }
+ if (d & (1 << 25)) != 0 {
+ rval |= SSE
+ }
+ if (d & (1 << 26)) != 0 {
+ rval |= SSE2
+ }
+ if (c & 1) != 0 {
+ rval |= SSE3
+ }
+ if (c & (1 << 5)) != 0 {
+ rval |= VMX
+ }
+ if (c & 0x00000200) != 0 {
+ rval |= SSSE3
+ }
+ if (c & 0x00080000) != 0 {
+ rval |= SSE4
+ }
+ if (c & 0x00100000) != 0 {
+ rval |= SSE42
+ }
+ if (c & (1 << 25)) != 0 {
+ rval |= AESNI
+ }
+ if (c & (1 << 1)) != 0 {
+ rval |= CLMUL
+ }
+ if c&(1<<23) != 0 {
+ rval |= POPCNT
+ }
+ if c&(1<<30) != 0 {
+ rval |= RDRAND
+ }
+ if c&(1<<29) != 0 {
+ rval |= F16C
+ }
+ if c&(1<<13) != 0 {
+ rval |= CX16
+ }
+ if vend == Intel && (d&(1<<28)) != 0 && mfi >= 4 {
+ if threadsPerCore() > 1 {
+ rval |= HTT
+ }
+ }
+ if vend == AMD && (d&(1<<28)) != 0 && mfi >= 4 {
+ if threadsPerCore() > 1 {
+ rval |= HTT
+ }
+ }
+ // Check XGETBV, OXSAVE and AVX bits
+ if c&(1<<26) != 0 && c&(1<<27) != 0 && c&(1<<28) != 0 {
+ // Check for OS support
+ eax, _ := xgetbv(0)
+ if (eax & 0x6) == 0x6 {
+ rval |= AVX
+ if (c & 0x00001000) != 0 {
+ rval |= FMA3
+ }
+ }
+ }
+
+ // Check AVX2, AVX2 requires OS support, but BMI1/2 don't.
+ if mfi >= 7 {
+ _, ebx, ecx, edx := cpuidex(7, 0)
+ eax1, _, _, _ := cpuidex(7, 1)
+ if (rval&AVX) != 0 && (ebx&0x00000020) != 0 {
+ rval |= AVX2
+ }
+ if (ebx & 0x00000008) != 0 {
+ rval |= BMI1
+ if (ebx & 0x00000100) != 0 {
+ rval |= BMI2
+ }
+ }
+ if ebx&(1<<2) != 0 {
+ rval |= SGX
+ }
+ if ebx&(1<<4) != 0 {
+ rval |= HLE
+ }
+ if ebx&(1<<9) != 0 {
+ rval |= ERMS
+ }
+ if ebx&(1<<11) != 0 {
+ rval |= RTM
+ }
+ if ebx&(1<<14) != 0 {
+ rval |= MPX
+ }
+ if ebx&(1<<18) != 0 {
+ rval |= RDSEED
+ }
+ if ebx&(1<<19) != 0 {
+ rval |= ADX
+ }
+ if ebx&(1<<29) != 0 {
+ rval |= SHA
+ }
+ if edx&(1<<26) != 0 {
+ rval |= IBPB
+ }
+ if ecx&(1<<30) != 0 {
+ rval |= SGXLC
+ }
+ if edx&(1<<27) != 0 {
+ rval |= STIBP
+ }
+
+ // Only detect AVX-512 features if XGETBV is supported
+ if c&((1<<26)|(1<<27)) == (1<<26)|(1<<27) {
+ // Check for OS support
+ eax, _ := xgetbv(0)
+
+ // Verify that XCR0[7:5] = ‘111b’ (OPMASK state, upper 256-bit of ZMM0-ZMM15 and
+ // ZMM16-ZMM31 state are enabled by OS)
+ /// and that XCR0[2:1] = ‘11b’ (XMM state and YMM state are enabled by OS).
+ if (eax>>5)&7 == 7 && (eax>>1)&3 == 3 {
+ if ebx&(1<<16) != 0 {
+ rval |= AVX512F
+ }
+ if ebx&(1<<17) != 0 {
+ rval |= AVX512DQ
+ }
+ if ebx&(1<<21) != 0 {
+ rval |= AVX512IFMA
+ }
+ if ebx&(1<<26) != 0 {
+ rval |= AVX512PF
+ }
+ if ebx&(1<<27) != 0 {
+ rval |= AVX512ER
+ }
+ if ebx&(1<<28) != 0 {
+ rval |= AVX512CD
+ }
+ if ebx&(1<<30) != 0 {
+ rval |= AVX512BW
+ }
+ if ebx&(1<<31) != 0 {
+ rval |= AVX512VL
+ }
+ // ecx
+ if ecx&(1<<1) != 0 {
+ rval |= AVX512VBMI
+ }
+ if ecx&(1<<6) != 0 {
+ rval |= AVX512VBMI2
+ }
+ if ecx&(1<<8) != 0 {
+ rval |= GFNI
+ }
+ if ecx&(1<<9) != 0 {
+ rval |= VAES
+ }
+ if ecx&(1<<10) != 0 {
+ rval |= VPCLMULQDQ
+ }
+ if ecx&(1<<11) != 0 {
+ rval |= AVX512VNNI
+ }
+ if ecx&(1<<12) != 0 {
+ rval |= AVX512BITALG
+ }
+ if ecx&(1<<14) != 0 {
+ rval |= AVX512VPOPCNTDQ
+ }
+ // edx
+ if edx&(1<<8) != 0 {
+ rval |= AVX512VP2INTERSECT
+ }
+ // cpuid eax 07h,ecx=1
+ if eax1&(1<<5) != 0 {
+ rval |= AVX512BF16
+ }
+ }
+ }
+ }
+
+ if maxExtendedFunction() >= 0x80000001 {
+ _, _, c, d := cpuid(0x80000001)
+ if (c & (1 << 5)) != 0 {
+ rval |= LZCNT
+ rval |= POPCNT
+ }
+ if (d & (1 << 31)) != 0 {
+ rval |= AMD3DNOW
+ }
+ if (d & (1 << 30)) != 0 {
+ rval |= AMD3DNOWEXT
+ }
+ if (d & (1 << 23)) != 0 {
+ rval |= MMX
+ }
+ if (d & (1 << 22)) != 0 {
+ rval |= MMXEXT
+ }
+ if (c & (1 << 6)) != 0 {
+ rval |= SSE4A
+ }
+ if d&(1<<20) != 0 {
+ rval |= NX
+ }
+ if d&(1<<27) != 0 {
+ rval |= RDTSCP
+ }
+
+ /* Allow for selectively disabling SSE2 functions on AMD processors
+ with SSE2 support but not SSE4a. This includes Athlon64, some
+ Opteron, and some Sempron processors. MMX, SSE, or 3DNow! are faster
+ than SSE2 often enough to utilize this special-case flag.
+ AV_CPU_FLAG_SSE2 and AV_CPU_FLAG_SSE2SLOW are both set in this case
+ so that SSE2 is used unless explicitly disabled by checking
+ AV_CPU_FLAG_SSE2SLOW. */
+ if vend != Intel &&
+ rval&SSE2 != 0 && (c&0x00000040) == 0 {
+ rval |= SSE2SLOW
+ }
+
+ /* XOP and FMA4 use the AVX instruction coding scheme, so they can't be
+ * used unless the OS has AVX support. */
+ if (rval & AVX) != 0 {
+ if (c & 0x00000800) != 0 {
+ rval |= XOP
+ }
+ if (c & 0x00010000) != 0 {
+ rval |= FMA4
+ }
+ }
+
+ if vend == Intel {
+ family, model := familyModel()
+ if family == 6 && (model == 9 || model == 13 || model == 14) {
+ /* 6/9 (pentium-m "banias"), 6/13 (pentium-m "dothan"), and
+ * 6/14 (core1 "yonah") theoretically support sse2, but it's
+ * usually slower than mmx. */
+ if (rval & SSE2) != 0 {
+ rval |= SSE2SLOW
+ }
+ if (rval & SSE3) != 0 {
+ rval |= SSE3SLOW
+ }
+ }
+ /* The Atom processor has SSSE3 support, which is useful in many cases,
+ * but sometimes the SSSE3 version is slower than the SSE2 equivalent
+ * on the Atom, but is generally faster on other processors supporting
+ * SSSE3. This flag allows for selectively disabling certain SSSE3
+ * functions on the Atom. */
+ if family == 6 && model == 28 {
+ rval |= ATOM
+ }
+ }
+ }
+ return Flags(rval)
+}
+
+func valAsString(values ...uint32) []byte {
+ r := make([]byte, 4*len(values))
+ for i, v := range values {
+ dst := r[i*4:]
+ dst[0] = byte(v & 0xff)
+ dst[1] = byte((v >> 8) & 0xff)
+ dst[2] = byte((v >> 16) & 0xff)
+ dst[3] = byte((v >> 24) & 0xff)
+ switch {
+ case dst[0] == 0:
+ return r[:i*4]
+ case dst[1] == 0:
+ return r[:i*4+1]
+ case dst[2] == 0:
+ return r[:i*4+2]
+ case dst[3] == 0:
+ return r[:i*4+3]
+ }
+ }
+ return r
+}
+
+// Single-precision and double-precision floating point
+func (c CPUInfo) ArmFP() bool {
+ return c.Arm&FP != 0
+}
+
+// Advanced SIMD
+func (c CPUInfo) ArmASIMD() bool {
+ return c.Arm&ASIMD != 0
+}
+
+// Generic timer
+func (c CPUInfo) ArmEVTSTRM() bool {
+ return c.Arm&EVTSTRM != 0
+}
+
+// AES instructions
+func (c CPUInfo) ArmAES() bool {
+ return c.Arm&AES != 0
+}
+
+// Polynomial Multiply instructions (PMULL/PMULL2)
+func (c CPUInfo) ArmPMULL() bool {
+ return c.Arm&PMULL != 0
+}
+
+// SHA-1 instructions (SHA1C, etc)
+func (c CPUInfo) ArmSHA1() bool {
+ return c.Arm&SHA1 != 0
+}
+
+// SHA-2 instructions (SHA256H, etc)
+func (c CPUInfo) ArmSHA2() bool {
+ return c.Arm&SHA2 != 0
+}
+
+// CRC32/CRC32C instructions
+func (c CPUInfo) ArmCRC32() bool {
+ return c.Arm&CRC32 != 0
+}
+
+// Large System Extensions (LSE)
+func (c CPUInfo) ArmATOMICS() bool {
+ return c.Arm&ATOMICS != 0
+}
+
+// Half-precision floating point
+func (c CPUInfo) ArmFPHP() bool {
+ return c.Arm&FPHP != 0
+}
+
+// Advanced SIMD half-precision floating point
+func (c CPUInfo) ArmASIMDHP() bool {
+ return c.Arm&ASIMDHP != 0
+}
+
+// Rounding Double Multiply Accumulate/Subtract (SQRDMLAH/SQRDMLSH)
+func (c CPUInfo) ArmASIMDRDM() bool {
+ return c.Arm&ASIMDRDM != 0
+}
+
+// Javascript-style double->int convert (FJCVTZS)
+func (c CPUInfo) ArmJSCVT() bool {
+ return c.Arm&JSCVT != 0
+}
+
+// Floatin point complex number addition and multiplication
+func (c CPUInfo) ArmFCMA() bool {
+ return c.Arm&FCMA != 0
+}
+
+// Weaker release consistency (LDAPR, etc)
+func (c CPUInfo) ArmLRCPC() bool {
+ return c.Arm&LRCPC != 0
+}
+
+// Data cache clean to Point of Persistence (DC CVAP)
+func (c CPUInfo) ArmDCPOP() bool {
+ return c.Arm&DCPOP != 0
+}
+
+// SHA-3 instructions (EOR3, RAXI, XAR, BCAX)
+func (c CPUInfo) ArmSHA3() bool {
+ return c.Arm&SHA3 != 0
+}
+
+// SM3 instructions
+func (c CPUInfo) ArmSM3() bool {
+ return c.Arm&SM3 != 0
+}
+
+// SM4 instructions
+func (c CPUInfo) ArmSM4() bool {
+ return c.Arm&SM4 != 0
+}
+
+// SIMD Dot Product
+func (c CPUInfo) ArmASIMDDP() bool {
+ return c.Arm&ASIMDDP != 0
+}
+
+// SHA512 instructions
+func (c CPUInfo) ArmSHA512() bool {
+ return c.Arm&SHA512 != 0
+}
+
+// Scalable Vector Extension
+func (c CPUInfo) ArmSVE() bool {
+ return c.Arm&SVE != 0
+}
+
+// Generic Pointer Authentication
+func (c CPUInfo) ArmGPA() bool {
+ return c.Arm&GPA != 0
+}
diff --git a/vendor/github.com/klauspost/cpuid/cpuid_386.s b/vendor/github.com/klauspost/cpuid/cpuid_386.s
new file mode 100644
index 0000000..089638f
--- /dev/null
+++ b/vendor/github.com/klauspost/cpuid/cpuid_386.s
@@ -0,0 +1,42 @@
+// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
+
+//+build 386,!gccgo,!noasm,!appengine
+
+// func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32)
+TEXT ·asmCpuid(SB), 7, $0
+ XORL CX, CX
+ MOVL op+0(FP), AX
+ CPUID
+ MOVL AX, eax+4(FP)
+ MOVL BX, ebx+8(FP)
+ MOVL CX, ecx+12(FP)
+ MOVL DX, edx+16(FP)
+ RET
+
+// func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32)
+TEXT ·asmCpuidex(SB), 7, $0
+ MOVL op+0(FP), AX
+ MOVL op2+4(FP), CX
+ CPUID
+ MOVL AX, eax+8(FP)
+ MOVL BX, ebx+12(FP)
+ MOVL CX, ecx+16(FP)
+ MOVL DX, edx+20(FP)
+ RET
+
+// func xgetbv(index uint32) (eax, edx uint32)
+TEXT ·asmXgetbv(SB), 7, $0
+ MOVL index+0(FP), CX
+ BYTE $0x0f; BYTE $0x01; BYTE $0xd0 // XGETBV
+ MOVL AX, eax+4(FP)
+ MOVL DX, edx+8(FP)
+ RET
+
+// func asmRdtscpAsm() (eax, ebx, ecx, edx uint32)
+TEXT ·asmRdtscpAsm(SB), 7, $0
+ BYTE $0x0F; BYTE $0x01; BYTE $0xF9 // RDTSCP
+ MOVL AX, eax+0(FP)
+ MOVL BX, ebx+4(FP)
+ MOVL CX, ecx+8(FP)
+ MOVL DX, edx+12(FP)
+ RET
diff --git a/vendor/github.com/klauspost/cpuid/cpuid_amd64.s b/vendor/github.com/klauspost/cpuid/cpuid_amd64.s
new file mode 100644
index 0000000..3ba0559
--- /dev/null
+++ b/vendor/github.com/klauspost/cpuid/cpuid_amd64.s
@@ -0,0 +1,42 @@
+// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
+
+//+build amd64,!gccgo,!noasm,!appengine
+
+// func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32)
+TEXT ·asmCpuid(SB), 7, $0
+ XORQ CX, CX
+ MOVL op+0(FP), AX
+ CPUID
+ MOVL AX, eax+8(FP)
+ MOVL BX, ebx+12(FP)
+ MOVL CX, ecx+16(FP)
+ MOVL DX, edx+20(FP)
+ RET
+
+// func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32)
+TEXT ·asmCpuidex(SB), 7, $0
+ MOVL op+0(FP), AX
+ MOVL op2+4(FP), CX
+ CPUID
+ MOVL AX, eax+8(FP)
+ MOVL BX, ebx+12(FP)
+ MOVL CX, ecx+16(FP)
+ MOVL DX, edx+20(FP)
+ RET
+
+// func asmXgetbv(index uint32) (eax, edx uint32)
+TEXT ·asmXgetbv(SB), 7, $0
+ MOVL index+0(FP), CX
+ BYTE $0x0f; BYTE $0x01; BYTE $0xd0 // XGETBV
+ MOVL AX, eax+8(FP)
+ MOVL DX, edx+12(FP)
+ RET
+
+// func asmRdtscpAsm() (eax, ebx, ecx, edx uint32)
+TEXT ·asmRdtscpAsm(SB), 7, $0
+ BYTE $0x0F; BYTE $0x01; BYTE $0xF9 // RDTSCP
+ MOVL AX, eax+0(FP)
+ MOVL BX, ebx+4(FP)
+ MOVL CX, ecx+8(FP)
+ MOVL DX, edx+12(FP)
+ RET
diff --git a/vendor/github.com/klauspost/cpuid/cpuid_arm64.s b/vendor/github.com/klauspost/cpuid/cpuid_arm64.s
new file mode 100644
index 0000000..8975ee8
--- /dev/null
+++ b/vendor/github.com/klauspost/cpuid/cpuid_arm64.s
@@ -0,0 +1,26 @@
+// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
+
+//+build arm64,!gccgo
+
+// See https://www.kernel.org/doc/Documentation/arm64/cpu-feature-registers.txt
+
+// func getMidr
+TEXT ·getMidr(SB), 7, $0
+ WORD $0xd5380000 // mrs x0, midr_el1 /* Main ID Register */
+ MOVD R0, midr+0(FP)
+ RET
+
+// func getProcFeatures
+TEXT ·getProcFeatures(SB), 7, $0
+ WORD $0xd5380400 // mrs x0, id_aa64pfr0_el1 /* Processor Feature Register 0 */
+ MOVD R0, procFeatures+0(FP)
+ RET
+
+// func getInstAttributes
+TEXT ·getInstAttributes(SB), 7, $0
+ WORD $0xd5380600 // mrs x0, id_aa64isar0_el1 /* Instruction Set Attribute Register 0 */
+ WORD $0xd5380621 // mrs x1, id_aa64isar1_el1 /* Instruction Set Attribute Register 1 */
+ MOVD R0, instAttrReg0+0(FP)
+ MOVD R1, instAttrReg1+8(FP)
+ RET
+
diff --git a/vendor/github.com/klauspost/cpuid/detect_arm64.go b/vendor/github.com/klauspost/cpuid/detect_arm64.go
new file mode 100644
index 0000000..923a826
--- /dev/null
+++ b/vendor/github.com/klauspost/cpuid/detect_arm64.go
@@ -0,0 +1,219 @@
+// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
+
+//+build arm64,!gccgo,!noasm,!appengine
+
+package cpuid
+
+func getMidr() (midr uint64)
+func getProcFeatures() (procFeatures uint64)
+func getInstAttributes() (instAttrReg0, instAttrReg1 uint64)
+
+func initCPU() {
+ cpuid = func(uint32) (a, b, c, d uint32) { return 0, 0, 0, 0 }
+ cpuidex = func(x, y uint32) (a, b, c, d uint32) { return 0, 0, 0, 0 }
+ xgetbv = func(uint32) (a, b uint32) { return 0, 0 }
+ rdtscpAsm = func() (a, b, c, d uint32) { return 0, 0, 0, 0 }
+}
+
+func addInfo(c *CPUInfo) {
+ // ARM64 disabled for now.
+ if true {
+ return
+ }
+ // midr := getMidr()
+
+ // MIDR_EL1 - Main ID Register
+ // x--------------------------------------------------x
+ // | Name | bits | visible |
+ // |--------------------------------------------------|
+ // | Implementer | [31-24] | y |
+ // |--------------------------------------------------|
+ // | Variant | [23-20] | y |
+ // |--------------------------------------------------|
+ // | Architecture | [19-16] | y |
+ // |--------------------------------------------------|
+ // | PartNum | [15-4] | y |
+ // |--------------------------------------------------|
+ // | Revision | [3-0] | y |
+ // x--------------------------------------------------x
+
+ // fmt.Printf(" implementer: 0x%02x\n", (midr>>24)&0xff)
+ // fmt.Printf(" variant: 0x%01x\n", (midr>>20)&0xf)
+ // fmt.Printf("architecture: 0x%01x\n", (midr>>16)&0xf)
+ // fmt.Printf(" part num: 0x%03x\n", (midr>>4)&0xfff)
+ // fmt.Printf(" revision: 0x%01x\n", (midr>>0)&0xf)
+
+ procFeatures := getProcFeatures()
+
+ // ID_AA64PFR0_EL1 - Processor Feature Register 0
+ // x--------------------------------------------------x
+ // | Name | bits | visible |
+ // |--------------------------------------------------|
+ // | DIT | [51-48] | y |
+ // |--------------------------------------------------|
+ // | SVE | [35-32] | y |
+ // |--------------------------------------------------|
+ // | GIC | [27-24] | n |
+ // |--------------------------------------------------|
+ // | AdvSIMD | [23-20] | y |
+ // |--------------------------------------------------|
+ // | FP | [19-16] | y |
+ // |--------------------------------------------------|
+ // | EL3 | [15-12] | n |
+ // |--------------------------------------------------|
+ // | EL2 | [11-8] | n |
+ // |--------------------------------------------------|
+ // | EL1 | [7-4] | n |
+ // |--------------------------------------------------|
+ // | EL0 | [3-0] | n |
+ // x--------------------------------------------------x
+
+ var f ArmFlags
+ // if procFeatures&(0xf<<48) != 0 {
+ // fmt.Println("DIT")
+ // }
+ if procFeatures&(0xf<<32) != 0 {
+ f |= SVE
+ }
+ if procFeatures&(0xf<<20) != 15<<20 {
+ f |= ASIMD
+ if procFeatures&(0xf<<20) == 1<<20 {
+ // https://developer.arm.com/docs/ddi0595/b/aarch64-system-registers/id_aa64pfr0_el1
+ // 0b0001 --> As for 0b0000, and also includes support for half-precision floating-point arithmetic.
+ f |= FPHP
+ f |= ASIMDHP
+ }
+ }
+ if procFeatures&(0xf<<16) != 0 {
+ f |= FP
+ }
+
+ instAttrReg0, instAttrReg1 := getInstAttributes()
+
+ // https://developer.arm.com/docs/ddi0595/b/aarch64-system-registers/id_aa64isar0_el1
+ //
+ // ID_AA64ISAR0_EL1 - Instruction Set Attribute Register 0
+ // x--------------------------------------------------x
+ // | Name | bits | visible |
+ // |--------------------------------------------------|
+ // | TS | [55-52] | y |
+ // |--------------------------------------------------|
+ // | FHM | [51-48] | y |
+ // |--------------------------------------------------|
+ // | DP | [47-44] | y |
+ // |--------------------------------------------------|
+ // | SM4 | [43-40] | y |
+ // |--------------------------------------------------|
+ // | SM3 | [39-36] | y |
+ // |--------------------------------------------------|
+ // | SHA3 | [35-32] | y |
+ // |--------------------------------------------------|
+ // | RDM | [31-28] | y |
+ // |--------------------------------------------------|
+ // | ATOMICS | [23-20] | y |
+ // |--------------------------------------------------|
+ // | CRC32 | [19-16] | y |
+ // |--------------------------------------------------|
+ // | SHA2 | [15-12] | y |
+ // |--------------------------------------------------|
+ // | SHA1 | [11-8] | y |
+ // |--------------------------------------------------|
+ // | AES | [7-4] | y |
+ // x--------------------------------------------------x
+
+ // if instAttrReg0&(0xf<<52) != 0 {
+ // fmt.Println("TS")
+ // }
+ // if instAttrReg0&(0xf<<48) != 0 {
+ // fmt.Println("FHM")
+ // }
+ if instAttrReg0&(0xf<<44) != 0 {
+ f |= ASIMDDP
+ }
+ if instAttrReg0&(0xf<<40) != 0 {
+ f |= SM4
+ }
+ if instAttrReg0&(0xf<<36) != 0 {
+ f |= SM3
+ }
+ if instAttrReg0&(0xf<<32) != 0 {
+ f |= SHA3
+ }
+ if instAttrReg0&(0xf<<28) != 0 {
+ f |= ASIMDRDM
+ }
+ if instAttrReg0&(0xf<<20) != 0 {
+ f |= ATOMICS
+ }
+ if instAttrReg0&(0xf<<16) != 0 {
+ f |= CRC32
+ }
+ if instAttrReg0&(0xf<<12) != 0 {
+ f |= SHA2
+ }
+ if instAttrReg0&(0xf<<12) == 2<<12 {
+ // https://developer.arm.com/docs/ddi0595/b/aarch64-system-registers/id_aa64isar0_el1
+ // 0b0010 --> As 0b0001, plus SHA512H, SHA512H2, SHA512SU0, and SHA512SU1 instructions implemented.
+ f |= SHA512
+ }
+ if instAttrReg0&(0xf<<8) != 0 {
+ f |= SHA1
+ }
+ if instAttrReg0&(0xf<<4) != 0 {
+ f |= AES
+ }
+ if instAttrReg0&(0xf<<4) == 2<<4 {
+ // https://developer.arm.com/docs/ddi0595/b/aarch64-system-registers/id_aa64isar0_el1
+ // 0b0010 --> As for 0b0001, plus PMULL/PMULL2 instructions operating on 64-bit data quantities.
+ f |= PMULL
+ }
+
+ // https://developer.arm.com/docs/ddi0595/b/aarch64-system-registers/id_aa64isar1_el1
+ //
+ // ID_AA64ISAR1_EL1 - Instruction set attribute register 1
+ // x--------------------------------------------------x
+ // | Name | bits | visible |
+ // |--------------------------------------------------|
+ // | GPI | [31-28] | y |
+ // |--------------------------------------------------|
+ // | GPA | [27-24] | y |
+ // |--------------------------------------------------|
+ // | LRCPC | [23-20] | y |
+ // |--------------------------------------------------|
+ // | FCMA | [19-16] | y |
+ // |--------------------------------------------------|
+ // | JSCVT | [15-12] | y |
+ // |--------------------------------------------------|
+ // | API | [11-8] | y |
+ // |--------------------------------------------------|
+ // | APA | [7-4] | y |
+ // |--------------------------------------------------|
+ // | DPB | [3-0] | y |
+ // x--------------------------------------------------x
+
+ // if instAttrReg1&(0xf<<28) != 0 {
+ // fmt.Println("GPI")
+ // }
+ if instAttrReg1&(0xf<<28) != 24 {
+ f |= GPA
+ }
+ if instAttrReg1&(0xf<<20) != 0 {
+ f |= LRCPC
+ }
+ if instAttrReg1&(0xf<<16) != 0 {
+ f |= FCMA
+ }
+ if instAttrReg1&(0xf<<12) != 0 {
+ f |= JSCVT
+ }
+ // if instAttrReg1&(0xf<<8) != 0 {
+ // fmt.Println("API")
+ // }
+ // if instAttrReg1&(0xf<<4) != 0 {
+ // fmt.Println("APA")
+ // }
+ if instAttrReg1&(0xf<<0) != 0 {
+ f |= DCPOP
+ }
+ c.Arm = f
+}
diff --git a/vendor/github.com/klauspost/cpuid/detect_intel.go b/vendor/github.com/klauspost/cpuid/detect_intel.go
new file mode 100644
index 0000000..363951b
--- /dev/null
+++ b/vendor/github.com/klauspost/cpuid/detect_intel.go
@@ -0,0 +1,33 @@
+// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
+
+//+build 386,!gccgo,!noasm amd64,!gccgo,!noasm,!appengine
+
+package cpuid
+
+func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32)
+func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32)
+func asmXgetbv(index uint32) (eax, edx uint32)
+func asmRdtscpAsm() (eax, ebx, ecx, edx uint32)
+
+func initCPU() {
+ cpuid = asmCpuid
+ cpuidex = asmCpuidex
+ xgetbv = asmXgetbv
+ rdtscpAsm = asmRdtscpAsm
+}
+
+func addInfo(c *CPUInfo) {
+ c.maxFunc = maxFunctionID()
+ c.maxExFunc = maxExtendedFunction()
+ c.BrandName = brandName()
+ c.CacheLine = cacheLine()
+ c.Family, c.Model = familyModel()
+ c.Features = support()
+ c.SGX = hasSGX(c.Features&SGX != 0, c.Features&SGXLC != 0)
+ c.ThreadsPerCore = threadsPerCore()
+ c.LogicalCores = logicalCores()
+ c.PhysicalCores = physicalCores()
+ c.VendorID, c.VendorString = vendorID()
+ c.Hz = hertz(c.BrandName)
+ c.cacheSize()
+}
diff --git a/vendor/github.com/klauspost/cpuid/detect_ref.go b/vendor/github.com/klauspost/cpuid/detect_ref.go
new file mode 100644
index 0000000..970ff3d
--- /dev/null
+++ b/vendor/github.com/klauspost/cpuid/detect_ref.go
@@ -0,0 +1,14 @@
+// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file.
+
+//+build !amd64,!386,!arm64 gccgo noasm appengine
+
+package cpuid
+
+func initCPU() {
+ cpuid = func(uint32) (a, b, c, d uint32) { return 0, 0, 0, 0 }
+ cpuidex = func(x, y uint32) (a, b, c, d uint32) { return 0, 0, 0, 0 }
+ xgetbv = func(uint32) (a, b uint32) { return 0, 0 }
+ rdtscpAsm = func() (a, b, c, d uint32) { return 0, 0, 0, 0 }
+}
+
+func addInfo(info *CPUInfo) {}
diff --git a/vendor/github.com/klauspost/cpuid/go.mod b/vendor/github.com/klauspost/cpuid/go.mod
new file mode 100644
index 0000000..55563f2
--- /dev/null
+++ b/vendor/github.com/klauspost/cpuid/go.mod
@@ -0,0 +1,3 @@
+module github.com/klauspost/cpuid
+
+go 1.12
diff --git a/vendor/github.com/klauspost/reedsolomon/.gitignore b/vendor/github.com/klauspost/reedsolomon/.gitignore
new file mode 100644
index 0000000..59610b5
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/.gitignore
@@ -0,0 +1,26 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof
+
+.idea \ No newline at end of file
diff --git a/vendor/github.com/klauspost/reedsolomon/.travis.yml b/vendor/github.com/klauspost/reedsolomon/.travis.yml
new file mode 100644
index 0000000..f77b85c
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/.travis.yml
@@ -0,0 +1,77 @@
+language: go
+
+os:
+ - linux
+ - osx
+ - windows
+
+arch:
+ - amd64
+ - arm64
+ - ppc64le
+ - s390x
+
+go:
+ - 1.12.x
+ - 1.13.x
+ - 1.14.x
+ - master
+
+install:
+ - go get ./...
+
+script:
+ - go vet ./...
+ - go test -cpu=1,2 .
+ - go test -tags=noasm -cpu=1,2 .
+ - go build examples/simple-decoder.go
+ - go build examples/simple-encoder.go
+ - go build examples/stream-decoder.go
+ - go build examples/stream-encoder.go
+
+stages:
+ - gofmt
+ - test
+ - deploy
+
+jobs:
+ allow_failures:
+ - go: 'master'
+ - arch: s390x
+ fast_finish: true
+ include:
+ - stage: gofmt
+ go: 1.14.x
+ os: linux
+ arch: amd64
+ script:
+ - diff <(gofmt -d .) <(printf "")
+ - diff <(gofmt -d ./examples) <(printf "")
+ - go install github.com/klauspost/asmfmt/cmd/asmfmt
+ - diff <(asmfmt -d .) <(printf "")
+ - stage: race
+ go: 1.14.x
+ os: linux
+ arch: amd64
+ script:
+ - go test -cpu=1 -short -race .
+ - go test -cpu=2 -short -race .
+ - go test -tags=noasm -cpu=1 -short -race .
+ - go test -tags=noasm -cpu=4 -short -race .
+ - go test -no-avx512 -short -race .
+ - go test -no-avx512 -no-avx2 -short -race .
+ - go test -no-avx512 -no-avx2 -no-ssse3 -short -race .
+ - stage: amd64-noasm
+ go: 1.14.x
+ os: linux
+ arch: amd64
+ script:
+ - go test -no-avx512
+ - go test -no-avx512 -no-avx2
+ - go test -no-avx512 -no-avx2 -no-ssse3
+ - stage: i386
+ go: 1.14.x
+ os: linux
+ arch: amd64
+ script:
+ - GOOS=linux GOARCH=386 go test -short .
diff --git a/vendor/github.com/klauspost/reedsolomon/LICENSE b/vendor/github.com/klauspost/reedsolomon/LICENSE
new file mode 100644
index 0000000..a947e16
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/LICENSE
@@ -0,0 +1,23 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Klaus Post
+Copyright (c) 2015 Backblaze
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/vendor/github.com/klauspost/reedsolomon/README.md b/vendor/github.com/klauspost/reedsolomon/README.md
new file mode 100644
index 0000000..f9824cb
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/README.md
@@ -0,0 +1,395 @@
+# Reed-Solomon
+[![GoDoc][1]][2] [![Build Status][3]][4]
+
+[1]: https://godoc.org/github.com/klauspost/reedsolomon?status.svg
+[2]: https://pkg.go.dev/github.com/klauspost/reedsolomon?tab=doc
+[3]: https://travis-ci.org/klauspost/reedsolomon.svg?branch=master
+[4]: https://travis-ci.org/klauspost/reedsolomon
+
+Reed-Solomon Erasure Coding in Go, with speeds exceeding 1GB/s/cpu core implemented in pure Go.
+
+This is a Go port of the [JavaReedSolomon](https://github.com/Backblaze/JavaReedSolomon) library released by
+[Backblaze](http://backblaze.com), with some additional optimizations.
+
+For an introduction on erasure coding, see the post on the [Backblaze blog](https://www.backblaze.com/blog/reed-solomon/).
+
+Package home: https://github.com/klauspost/reedsolomon
+
+Godoc: https://pkg.go.dev/github.com/klauspost/reedsolomon?tab=doc
+
+# Installation
+To get the package use the standard:
+```bash
+go get -u github.com/klauspost/reedsolomon
+```
+
+# Changes
+
+## May 2020
+
+* ARM64 optimizations, up to 2.5x faster.
+* Added [WithFastOneParityMatrix](https://pkg.go.dev/github.com/klauspost/reedsolomon?tab=doc#WithFastOneParityMatrix) for faster operation with 1 parity shard.
+* Much better performance when using a limited number of goroutines.
+* AVX512 is now using multiple cores.
+* Stream processing overhaul, big speedups in most cases.
+* AVX512 optimizations
+
+## March 6, 2019
+
+The pure Go implementation is about 30% faster. Minor tweaks to assembler implementations.
+
+## February 8, 2019
+
+AVX512 accelerated version added for Intel Skylake CPUs. This can give up to a 4x speed improvement as compared to AVX2.
+See [here](https://github.com/klauspost/reedsolomon#performance-on-avx512) for more details.
+
+## December 18, 2018
+
+Assembly code for ppc64le has been contributed, this boosts performance by about 10x on this platform.
+
+## November 18, 2017
+
+Added [WithAutoGoroutines](https://godoc.org/github.com/klauspost/reedsolomon#WithAutoGoroutines) which will attempt
+to calculate the optimal number of goroutines to use based on your expected shard size and detected CPU.
+
+## October 1, 2017
+
+* [Cauchy Matrix](https://godoc.org/github.com/klauspost/reedsolomon#WithCauchyMatrix) is now an option.
+Thanks to [templexxx](https://github.com/templexxx) for the basis of this.
+
+* Default maximum number of [goroutines](https://godoc.org/github.com/klauspost/reedsolomon#WithMaxGoroutines)
+has been increased for better multi-core scaling.
+
+* After several requests the Reconstruct and ReconstructData now slices of zero length but sufficient capacity to
+be used instead of allocating new memory.
+
+## August 26, 2017
+
+* The [`Encoder()`](https://godoc.org/github.com/klauspost/reedsolomon#Encoder) now contains an `Update`
+function contributed by [chenzhongtao](https://github.com/chenzhongtao).
+
+* [Frank Wessels](https://github.com/fwessels) kindly contributed ARM 64 bit assembly,
+which gives a huge performance boost on this platform.
+
+## July 20, 2017
+
+`ReconstructData` added to [`Encoder`](https://godoc.org/github.com/klauspost/reedsolomon#Encoder) interface.
+This can cause compatibility issues if you implement your own Encoder. A simple workaround can be added:
+
+```Go
+func (e *YourEnc) ReconstructData(shards [][]byte) error {
+ return ReconstructData(shards)
+}
+```
+
+You can of course also do your own implementation.
+The [`StreamEncoder`](https://godoc.org/github.com/klauspost/reedsolomon#StreamEncoder)
+handles this without modifying the interface.
+This is a good lesson on why returning interfaces is not a good design.
+
+# Usage
+
+This section assumes you know the basics of Reed-Solomon encoding.
+A good start is this [Backblaze blog post](https://www.backblaze.com/blog/reed-solomon/).
+
+This package performs the calculation of the parity sets. The usage is therefore relatively simple.
+
+First of all, you need to choose your distribution of data and parity shards.
+A 'good' distribution is very subjective, and will depend a lot on your usage scenario.
+A good starting point is above 5 and below 257 data shards (the maximum supported number),
+and the number of parity shards to be 2 or above, and below the number of data shards.
+
+To create an encoder with 10 data shards (where your data goes) and 3 parity shards (calculated):
+```Go
+ enc, err := reedsolomon.New(10, 3)
+```
+This encoder will work for all parity sets with this distribution of data and parity shards.
+The error will only be set if you specify 0 or negative values in any of the parameters,
+or if you specify more than 256 data shards.
+
+If you will primarily be using it with one shard size it is recommended to use
+[`WithAutoGoroutines(shardSize)`](https://pkg.go.dev/github.com/klauspost/reedsolomon?tab=doc#WithAutoGoroutines)
+as an additional parameter. This will attempt to calculate the optimal number of goroutines to use for the best speed.
+It is not required that all shards are this size.
+
+The you send and receive data is a simple slice of byte slices; `[][]byte`.
+In the example above, the top slice must have a length of 13.
+
+```Go
+ data := make([][]byte, 13)
+```
+You should then fill the 10 first slices with *equally sized* data,
+and create parity shards that will be populated with parity data. In this case we create the data in memory,
+but you could for instance also use [mmap](https://github.com/edsrzf/mmap-go) to map files.
+
+```Go
+ // Create all shards, size them at 50000 each
+ for i := range input {
+ data[i] := make([]byte, 50000)
+ }
+
+
+ // Fill some data into the data shards
+ for i, in := range data[:10] {
+ for j:= range in {
+ in[j] = byte((i+j)&0xff)
+ }
+ }
+```
+
+To populate the parity shards, you simply call `Encode()` with your data.
+```Go
+ err = enc.Encode(data)
+```
+The only cases where you should get an error is, if the data shards aren't of equal size.
+The last 3 shards now contain parity data. You can verify this by calling `Verify()`:
+
+```Go
+ ok, err = enc.Verify(data)
+```
+
+The final (and important) part is to be able to reconstruct missing shards.
+For this to work, you need to know which parts of your data is missing.
+The encoder *does not know which parts are invalid*, so if data corruption is a likely scenario,
+you need to implement a hash check for each shard.
+
+If a byte has changed in your set, and you don't know which it is, there is no way to reconstruct the data set.
+
+To indicate missing data, you set the shard to nil before calling `Reconstruct()`:
+
+```Go
+ // Delete two data shards
+ data[3] = nil
+ data[7] = nil
+
+ // Reconstruct the missing shards
+ err := enc.Reconstruct(data)
+```
+The missing data and parity shards will be recreated. If more than 3 shards are missing, the reconstruction will fail.
+
+If you are only interested in the data shards (for reading purposes) you can call `ReconstructData()`:
+
+```Go
+ // Delete two data shards
+ data[3] = nil
+ data[7] = nil
+
+ // Reconstruct just the missing data shards
+ err := enc.ReconstructData(data)
+```
+
+So to sum up reconstruction:
+* The number of data/parity shards must match the numbers used for encoding.
+* The order of shards must be the same as used when encoding.
+* You may only supply data you know is valid.
+* Invalid shards should be set to nil.
+
+For complete examples of an encoder and decoder see the
+[examples folder](https://github.com/klauspost/reedsolomon/tree/master/examples).
+
+# Splitting/Joining Data
+
+You might have a large slice of data.
+To help you split this, there are some helper functions that can split and join a single byte slice.
+
+```Go
+ bigfile, _ := ioutil.Readfile("myfile.data")
+
+ // Split the file
+ split, err := enc.Split(bigfile)
+```
+This will split the file into the number of data shards set when creating the encoder and create empty parity shards.
+
+An important thing to note is that you have to *keep track of the exact input size*.
+If the size of the input isn't divisible by the number of data shards, extra zeros will be inserted in the last shard.
+
+To join a data set, use the `Join()` function, which will join the shards and write it to the `io.Writer` you supply:
+```Go
+ // Join a data set and write it to io.Discard.
+ err = enc.Join(io.Discard, data, len(bigfile))
+```
+
+# Streaming/Merging
+
+It might seem like a limitation that all data should be in memory,
+but an important property is that *as long as the number of data/parity shards are the same,
+you can merge/split data sets*, and they will remain valid as a separate set.
+
+```Go
+ // Split the data set of 50000 elements into two of 25000
+ splitA := make([][]byte, 13)
+ splitB := make([][]byte, 13)
+
+ // Merge into a 100000 element set
+ merged := make([][]byte, 13)
+
+ for i := range data {
+ splitA[i] = data[i][:25000]
+ splitB[i] = data[i][25000:]
+
+ // Concatenate it to itself
+ merged[i] = append(make([]byte, 0, len(data[i])*2), data[i]...)
+ merged[i] = append(merged[i], data[i]...)
+ }
+
+ // Each part should still verify as ok.
+ ok, err := enc.Verify(splitA)
+ if ok && err == nil {
+ log.Println("splitA ok")
+ }
+
+ ok, err = enc.Verify(splitB)
+ if ok && err == nil {
+ log.Println("splitB ok")
+ }
+
+ ok, err = enc.Verify(merge)
+ if ok && err == nil {
+ log.Println("merge ok")
+ }
+```
+
+This means that if you have a data set that may not fit into memory, you can split processing into smaller blocks.
+For the best throughput, don't use too small blocks.
+
+This also means that you can divide big input up into smaller blocks, and do reconstruction on parts of your data.
+This doesn't give the same flexibility of a higher number of data shards, but it will be much more performant.
+
+# Streaming API
+
+There has been added support for a streaming API, to help perform fully streaming operations,
+which enables you to do the same operations, but on streams.
+To use the stream API, use [`NewStream`](https://godoc.org/github.com/klauspost/reedsolomon#NewStream) function
+to create the encoding/decoding interfaces.
+
+You can use [`WithConcurrentStreams`](https://godoc.org/github.com/klauspost/reedsolomon#WithConcurrentStreams)
+to ready an interface that reads/writes concurrently from the streams.
+
+You can specify the size of each operation using
+[`WithStreamBlockSize`](https://godoc.org/github.com/klauspost/reedsolomon#WithStreamBlockSize).
+This will set the size of each read/write operation.
+
+Input is delivered as `[]io.Reader`, output as `[]io.Writer`, and functionality corresponds to the in-memory API.
+Each stream must supply the same amount of data, similar to how each slice must be similar size with the in-memory API.
+If an error occurs in relation to a stream,
+a [`StreamReadError`](https://godoc.org/github.com/klauspost/reedsolomon#StreamReadError)
+or [`StreamWriteError`](https://godoc.org/github.com/klauspost/reedsolomon#StreamWriteError)
+will help you determine which stream was the offender.
+
+There is no buffering or timeouts/retry specified. If you want to add that, you need to add it to the Reader/Writer.
+
+For complete examples of a streaming encoder and decoder see the
+[examples folder](https://github.com/klauspost/reedsolomon/tree/master/examples).
+
+# Advanced Options
+
+You can modify internal options which affects how jobs are split between and processed by goroutines.
+
+To create options, use the WithXXX functions. You can supply options to `New`, `NewStream`.
+If no Options are supplied, default options are used.
+
+Example of how to supply options:
+
+ ```Go
+ enc, err := reedsolomon.New(10, 3, WithMaxGoroutines(25))
+ ```
+
+
+# Performance
+Performance depends mainly on the number of parity shards.
+In rough terms, doubling the number of parity shards will double the encoding time.
+
+Here are the throughput numbers with some different selections of data and parity shards.
+For reference each shard is 1MB random data, and 2 CPU cores are used for encoding.
+
+| Data | Parity | Parity | MB/s | SSSE3 MB/s | SSSE3 Speed | Rel. Speed |
+|------|--------|--------|--------|-------------|-------------|------------|
+| 5 | 2 | 40% | 576,11 | 2599,2 | 451% | 100,00% |
+| 10 | 2 | 20% | 587,73 | 3100,28 | 528% | 102,02% |
+| 10 | 4 | 40% | 298,38 | 2470,97 | 828% | 51,79% |
+| 50 | 20 | 40% | 59,81 | 713,28 | 1193% | 10,38% |
+
+If `runtime.GOMAXPROCS()` is set to a value higher than 1,
+the encoder will use multiple goroutines to perform the calculations in `Verify`, `Encode` and `Reconstruct`.
+
+Example of performance scaling on AMD Ryzen 3950X - 16 physical cores, 32 logical cores, AVX 2.
+The example uses 10 blocks with 1MB data each and 4 parity blocks.
+
+| Threads | Speed |
+|---------|------------|
+| 1 | 9979 MB/s |
+| 2 | 18870 MB/s |
+| 4 | 33697 MB/s |
+| 8 | 51531 MB/s |
+| 16 | 59204 MB/s |
+
+
+Benchmarking `Reconstruct()` followed by a `Verify()` (=`all`) versus just calling `ReconstructData()` (=`data`) gives the following result:
+```
+benchmark all MB/s data MB/s speedup
+BenchmarkReconstruct10x2x10000-8 2011.67 10530.10 5.23x
+BenchmarkReconstruct50x5x50000-8 4585.41 14301.60 3.12x
+BenchmarkReconstruct10x2x1M-8 8081.15 28216.41 3.49x
+BenchmarkReconstruct5x2x1M-8 5780.07 28015.37 4.85x
+BenchmarkReconstruct10x4x1M-8 4352.56 14367.61 3.30x
+BenchmarkReconstruct50x20x1M-8 1364.35 4189.79 3.07x
+BenchmarkReconstruct10x4x16M-8 1484.35 5779.53 3.89x
+```
+
+# Performance on AVX512
+
+The performance on AVX512 has been accelerated for Intel CPUs.
+This gives speedups on a per-core basis typically up to 2x compared to
+AVX2 as can be seen in the following table:
+
+```
+[...]
+```
+
+This speedup has been achieved by computing multiple parity blocks in parallel as opposed to one after the other.
+In doing so it is possible to minimize the memory bandwidth required for loading all data shards.
+At the same time the calculations are performed in the 512-bit wide ZMM registers and the surplus of ZMM
+registers (32 in total) is used to keep more data around (most notably the matrix coefficients).
+
+# Performance on ARM64 NEON
+
+By exploiting NEON instructions the performance for ARM has been accelerated.
+Below are the performance numbers for a single core on an EC2 m6g.16xlarge (Graviton2) instance (Amazon Linux 2):
+
+```
+BenchmarkGalois128K-64 119562 10028 ns/op 13070.78 MB/s
+BenchmarkGalois1M-64 14380 83424 ns/op 12569.22 MB/s
+BenchmarkGaloisXor128K-64 96508 12432 ns/op 10543.29 MB/s
+BenchmarkGaloisXor1M-64 10000 100322 ns/op 10452.13 MB/s
+```
+
+# Performance on ppc64le
+
+The performance for ppc64le has been accelerated.
+This gives roughly a 10x performance improvement on this architecture as can been seen below:
+
+```
+benchmark old MB/s new MB/s speedup
+BenchmarkGalois128K-160 948.87 8878.85 9.36x
+BenchmarkGalois1M-160 968.85 9041.92 9.33x
+BenchmarkGaloisXor128K-160 862.02 7905.00 9.17x
+BenchmarkGaloisXor1M-160 784.60 6296.65 8.03x
+```
+
+# asm2plan9s
+
+[asm2plan9s](https://github.com/fwessels/asm2plan9s) is used for assembling the AVX2 instructions into their BYTE/WORD/LONG equivalents.
+
+# Links
+* [Backblaze Open Sources Reed-Solomon Erasure Coding Source Code](https://www.backblaze.com/blog/reed-solomon/).
+* [JavaReedSolomon](https://github.com/Backblaze/JavaReedSolomon). Compatible java library by Backblaze.
+* [ocaml-reed-solomon-erasure](https://gitlab.com/darrenldl/ocaml-reed-solomon-erasure). Compatible OCaml implementation.
+* [reedsolomon-c](https://github.com/jannson/reedsolomon-c). C version, compatible with output from this package.
+* [Reed-Solomon Erasure Coding in Haskell](https://github.com/NicolasT/reedsolomon). Haskell port of the package with similar performance.
+* [reed-solomon-erasure](https://github.com/darrenldl/reed-solomon-erasure). Compatible Rust implementation.
+* [go-erasure](https://github.com/somethingnew2-0/go-erasure). A similar library using cgo, slower in my tests.
+* [Screaming Fast Galois Field Arithmetic](http://www.snia.org/sites/default/files2/SDC2013/presentations/NewThinking/EthanMiller_Screaming_Fast_Galois_Field%20Arithmetic_SIMD%20Instructions.pdf). Basis for SSE3 optimizations.
+
+# License
+
+This code, as the original [JavaReedSolomon](https://github.com/Backblaze/JavaReedSolomon) is published under an MIT license. See LICENSE file for more information.
diff --git a/vendor/github.com/klauspost/reedsolomon/appveyor.yml b/vendor/github.com/klauspost/reedsolomon/appveyor.yml
new file mode 100644
index 0000000..9bb067f
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/appveyor.yml
@@ -0,0 +1,20 @@
+os: Visual Studio 2015
+
+platform: x64
+
+clone_folder: c:\gopath\src\github.com\klauspost\reedsolomon
+
+# environment variables
+environment:
+ GOPATH: c:\gopath
+
+install:
+ - echo %PATH%
+ - echo %GOPATH%
+ - go version
+ - go env
+ - go get -d ./...
+
+build_script:
+ - go test -v -cpu=2 ./...
+ - go test -cpu=1,2,4 -short -race ./...
diff --git a/vendor/github.com/klauspost/reedsolomon/galois.go b/vendor/github.com/klauspost/reedsolomon/galois.go
new file mode 100644
index 0000000..76049f9
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galois.go
@@ -0,0 +1,929 @@
+/**
+ * 8-bit Galois Field
+ * Copyright 2015, Klaus Post
+ * Copyright 2015, Backblaze, Inc. All rights reserved.
+ */
+
+package reedsolomon
+
+const (
+ // The number of elements in the field.
+ fieldSize = 256
+
+ // The polynomial used to generate the logarithm table.
+ //
+ // There are a number of polynomials that work to generate
+ // a Galois field of 256 elements. The choice is arbitrary,
+ // and we just use the first one.
+ //
+ // The possibilities are: 29, 43, 45, 77, 95, 99, 101, 105,
+ //* 113, 135, 141, 169, 195, 207, 231, and 245.
+ generatingPolynomial = 29
+)
+
+var logTable = [fieldSize]byte{
+ 0, 0, 1, 25, 2, 50, 26, 198,
+ 3, 223, 51, 238, 27, 104, 199, 75,
+ 4, 100, 224, 14, 52, 141, 239, 129,
+ 28, 193, 105, 248, 200, 8, 76, 113,
+ 5, 138, 101, 47, 225, 36, 15, 33,
+ 53, 147, 142, 218, 240, 18, 130, 69,
+ 29, 181, 194, 125, 106, 39, 249, 185,
+ 201, 154, 9, 120, 77, 228, 114, 166,
+ 6, 191, 139, 98, 102, 221, 48, 253,
+ 226, 152, 37, 179, 16, 145, 34, 136,
+ 54, 208, 148, 206, 143, 150, 219, 189,
+ 241, 210, 19, 92, 131, 56, 70, 64,
+ 30, 66, 182, 163, 195, 72, 126, 110,
+ 107, 58, 40, 84, 250, 133, 186, 61,
+ 202, 94, 155, 159, 10, 21, 121, 43,
+ 78, 212, 229, 172, 115, 243, 167, 87,
+ 7, 112, 192, 247, 140, 128, 99, 13,
+ 103, 74, 222, 237, 49, 197, 254, 24,
+ 227, 165, 153, 119, 38, 184, 180, 124,
+ 17, 68, 146, 217, 35, 32, 137, 46,
+ 55, 63, 209, 91, 149, 188, 207, 205,
+ 144, 135, 151, 178, 220, 252, 190, 97,
+ 242, 86, 211, 171, 20, 42, 93, 158,
+ 132, 60, 57, 83, 71, 109, 65, 162,
+ 31, 45, 67, 216, 183, 123, 164, 118,
+ 196, 23, 73, 236, 127, 12, 111, 246,
+ 108, 161, 59, 82, 41, 157, 85, 170,
+ 251, 96, 134, 177, 187, 204, 62, 90,
+ 203, 89, 95, 176, 156, 169, 160, 81,
+ 11, 245, 22, 235, 122, 117, 44, 215,
+ 79, 174, 213, 233, 230, 231, 173, 232,
+ 116, 214, 244, 234, 168, 80, 88, 175,
+}
+
+/**
+ * Inverse of the logarithm table. Maps integer logarithms
+ * to members of the field. There is no entry for 255
+ * because the highest log is 254.
+ *
+ * This table was generated by `go run gentables.go`
+ */
+var expTable = []byte{0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26, 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x3, 0x6, 0xc, 0x18, 0x30, 0x60, 0xc0, 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23, 0x46, 0x8c, 0x5, 0xa, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1, 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, 0x65, 0xca, 0x89, 0xf, 0x1e, 0x3c, 0x78, 0xf0, 0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2, 0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, 0xd, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce, 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc, 0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54, 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73, 0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff, 0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41, 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x7, 0xe, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6, 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x9, 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0xb, 0x16, 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26, 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x3, 0x6, 0xc, 0x18, 0x30, 0x60, 0xc0, 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23, 0x46, 0x8c, 0x5, 0xa, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1, 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, 0x65, 0xca, 0x89, 0xf, 0x1e, 0x3c, 0x78, 0xf0, 0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2, 0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, 0xd, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce, 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc, 0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54, 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73, 0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff, 0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41, 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x7, 0xe, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6, 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x9, 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0xb, 0x16, 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e}
+
+func galAdd(a, b byte) byte {
+ return a ^ b
+}
+
+func galSub(a, b byte) byte {
+ return a ^ b
+}
+
+// Table from https://github.com/templexxx/reedsolomon
+var invTable = [256]byte{0x0, 0x1, 0x8e, 0xf4, 0x47, 0xa7, 0x7a, 0xba, 0xad, 0x9d, 0xdd, 0x98, 0x3d, 0xaa, 0x5d, 0x96, 0xd8, 0x72, 0xc0, 0x58, 0xe0, 0x3e, 0x4c, 0x66, 0x90, 0xde, 0x55, 0x80, 0xa0, 0x83, 0x4b, 0x2a, 0x6c, 0xed, 0x39, 0x51, 0x60, 0x56, 0x2c, 0x8a, 0x70, 0xd0, 0x1f, 0x4a, 0x26, 0x8b, 0x33, 0x6e, 0x48, 0x89, 0x6f, 0x2e, 0xa4, 0xc3, 0x40, 0x5e, 0x50, 0x22, 0xcf, 0xa9, 0xab, 0xc, 0x15, 0xe1, 0x36, 0x5f, 0xf8, 0xd5, 0x92, 0x4e, 0xa6, 0x4, 0x30, 0x88, 0x2b, 0x1e, 0x16, 0x67, 0x45, 0x93, 0x38, 0x23, 0x68, 0x8c, 0x81, 0x1a, 0x25, 0x61, 0x13, 0xc1, 0xcb, 0x63, 0x97, 0xe, 0x37, 0x41, 0x24, 0x57, 0xca, 0x5b, 0xb9, 0xc4, 0x17, 0x4d, 0x52, 0x8d, 0xef, 0xb3, 0x20, 0xec, 0x2f, 0x32, 0x28, 0xd1, 0x11, 0xd9, 0xe9, 0xfb, 0xda, 0x79, 0xdb, 0x77, 0x6, 0xbb, 0x84, 0xcd, 0xfe, 0xfc, 0x1b, 0x54, 0xa1, 0x1d, 0x7c, 0xcc, 0xe4, 0xb0, 0x49, 0x31, 0x27, 0x2d, 0x53, 0x69, 0x2, 0xf5, 0x18, 0xdf, 0x44, 0x4f, 0x9b, 0xbc, 0xf, 0x5c, 0xb, 0xdc, 0xbd, 0x94, 0xac, 0x9, 0xc7, 0xa2, 0x1c, 0x82, 0x9f, 0xc6, 0x34, 0xc2, 0x46, 0x5, 0xce, 0x3b, 0xd, 0x3c, 0x9c, 0x8, 0xbe, 0xb7, 0x87, 0xe5, 0xee, 0x6b, 0xeb, 0xf2, 0xbf, 0xaf, 0xc5, 0x64, 0x7, 0x7b, 0x95, 0x9a, 0xae, 0xb6, 0x12, 0x59, 0xa5, 0x35, 0x65, 0xb8, 0xa3, 0x9e, 0xd2, 0xf7, 0x62, 0x5a, 0x85, 0x7d, 0xa8, 0x3a, 0x29, 0x71, 0xc8, 0xf6, 0xf9, 0x43, 0xd7, 0xd6, 0x10, 0x73, 0x76, 0x78, 0x99, 0xa, 0x19, 0x91, 0x14, 0x3f, 0xe6, 0xf0, 0x86, 0xb1, 0xe2, 0xf1, 0xfa, 0x74, 0xf3, 0xb4, 0x6d, 0x21, 0xb2, 0x6a, 0xe3, 0xe7, 0xb5, 0xea, 0x3, 0x8f, 0xd3, 0xc9, 0x42, 0xd4, 0xe8, 0x75, 0x7f, 0xff, 0x7e, 0xfd}
+
+var mulTable = [256][256]uint8{[256]uint8{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
+ {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff},
+ {0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, 0x20, 0x22, 0x24, 0x26, 0x28, 0x2a, 0x2c, 0x2e, 0x30, 0x32, 0x34, 0x36, 0x38, 0x3a, 0x3c, 0x3e, 0x40, 0x42, 0x44, 0x46, 0x48, 0x4a, 0x4c, 0x4e, 0x50, 0x52, 0x54, 0x56, 0x58, 0x5a, 0x5c, 0x5e, 0x60, 0x62, 0x64, 0x66, 0x68, 0x6a, 0x6c, 0x6e, 0x70, 0x72, 0x74, 0x76, 0x78, 0x7a, 0x7c, 0x7e, 0x80, 0x82, 0x84, 0x86, 0x88, 0x8a, 0x8c, 0x8e, 0x90, 0x92, 0x94, 0x96, 0x98, 0x9a, 0x9c, 0x9e, 0xa0, 0xa2, 0xa4, 0xa6, 0xa8, 0xaa, 0xac, 0xae, 0xb0, 0xb2, 0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, 0xc0, 0xc2, 0xc4, 0xc6, 0xc8, 0xca, 0xcc, 0xce, 0xd0, 0xd2, 0xd4, 0xd6, 0xd8, 0xda, 0xdc, 0xde, 0xe0, 0xe2, 0xe4, 0xe6, 0xe8, 0xea, 0xec, 0xee, 0xf0, 0xf2, 0xf4, 0xf6, 0xf8, 0xfa, 0xfc, 0xfe, 0x1d, 0x1f, 0x19, 0x1b, 0x15, 0x17, 0x11, 0x13, 0xd, 0xf, 0x9, 0xb, 0x5, 0x7, 0x1, 0x3, 0x3d, 0x3f, 0x39, 0x3b, 0x35, 0x37, 0x31, 0x33, 0x2d, 0x2f, 0x29, 0x2b, 0x25, 0x27, 0x21, 0x23, 0x5d, 0x5f, 0x59, 0x5b, 0x55, 0x57, 0x51, 0x53, 0x4d, 0x4f, 0x49, 0x4b, 0x45, 0x47, 0x41, 0x43, 0x7d, 0x7f, 0x79, 0x7b, 0x75, 0x77, 0x71, 0x73, 0x6d, 0x6f, 0x69, 0x6b, 0x65, 0x67, 0x61, 0x63, 0x9d, 0x9f, 0x99, 0x9b, 0x95, 0x97, 0x91, 0x93, 0x8d, 0x8f, 0x89, 0x8b, 0x85, 0x87, 0x81, 0x83, 0xbd, 0xbf, 0xb9, 0xbb, 0xb5, 0xb7, 0xb1, 0xb3, 0xad, 0xaf, 0xa9, 0xab, 0xa5, 0xa7, 0xa1, 0xa3, 0xdd, 0xdf, 0xd9, 0xdb, 0xd5, 0xd7, 0xd1, 0xd3, 0xcd, 0xcf, 0xc9, 0xcb, 0xc5, 0xc7, 0xc1, 0xc3, 0xfd, 0xff, 0xf9, 0xfb, 0xf5, 0xf7, 0xf1, 0xf3, 0xed, 0xef, 0xe9, 0xeb, 0xe5, 0xe7, 0xe1, 0xe3},
+ {0x0, 0x3, 0x6, 0x5, 0xc, 0xf, 0xa, 0x9, 0x18, 0x1b, 0x1e, 0x1d, 0x14, 0x17, 0x12, 0x11, 0x30, 0x33, 0x36, 0x35, 0x3c, 0x3f, 0x3a, 0x39, 0x28, 0x2b, 0x2e, 0x2d, 0x24, 0x27, 0x22, 0x21, 0x60, 0x63, 0x66, 0x65, 0x6c, 0x6f, 0x6a, 0x69, 0x78, 0x7b, 0x7e, 0x7d, 0x74, 0x77, 0x72, 0x71, 0x50, 0x53, 0x56, 0x55, 0x5c, 0x5f, 0x5a, 0x59, 0x48, 0x4b, 0x4e, 0x4d, 0x44, 0x47, 0x42, 0x41, 0xc0, 0xc3, 0xc6, 0xc5, 0xcc, 0xcf, 0xca, 0xc9, 0xd8, 0xdb, 0xde, 0xdd, 0xd4, 0xd7, 0xd2, 0xd1, 0xf0, 0xf3, 0xf6, 0xf5, 0xfc, 0xff, 0xfa, 0xf9, 0xe8, 0xeb, 0xee, 0xed, 0xe4, 0xe7, 0xe2, 0xe1, 0xa0, 0xa3, 0xa6, 0xa5, 0xac, 0xaf, 0xaa, 0xa9, 0xb8, 0xbb, 0xbe, 0xbd, 0xb4, 0xb7, 0xb2, 0xb1, 0x90, 0x93, 0x96, 0x95, 0x9c, 0x9f, 0x9a, 0x99, 0x88, 0x8b, 0x8e, 0x8d, 0x84, 0x87, 0x82, 0x81, 0x9d, 0x9e, 0x9b, 0x98, 0x91, 0x92, 0x97, 0x94, 0x85, 0x86, 0x83, 0x80, 0x89, 0x8a, 0x8f, 0x8c, 0xad, 0xae, 0xab, 0xa8, 0xa1, 0xa2, 0xa7, 0xa4, 0xb5, 0xb6, 0xb3, 0xb0, 0xb9, 0xba, 0xbf, 0xbc, 0xfd, 0xfe, 0xfb, 0xf8, 0xf1, 0xf2, 0xf7, 0xf4, 0xe5, 0xe6, 0xe3, 0xe0, 0xe9, 0xea, 0xef, 0xec, 0xcd, 0xce, 0xcb, 0xc8, 0xc1, 0xc2, 0xc7, 0xc4, 0xd5, 0xd6, 0xd3, 0xd0, 0xd9, 0xda, 0xdf, 0xdc, 0x5d, 0x5e, 0x5b, 0x58, 0x51, 0x52, 0x57, 0x54, 0x45, 0x46, 0x43, 0x40, 0x49, 0x4a, 0x4f, 0x4c, 0x6d, 0x6e, 0x6b, 0x68, 0x61, 0x62, 0x67, 0x64, 0x75, 0x76, 0x73, 0x70, 0x79, 0x7a, 0x7f, 0x7c, 0x3d, 0x3e, 0x3b, 0x38, 0x31, 0x32, 0x37, 0x34, 0x25, 0x26, 0x23, 0x20, 0x29, 0x2a, 0x2f, 0x2c, 0xd, 0xe, 0xb, 0x8, 0x1, 0x2, 0x7, 0x4, 0x15, 0x16, 0x13, 0x10, 0x19, 0x1a, 0x1f, 0x1c},
+ {0x0, 0x4, 0x8, 0xc, 0x10, 0x14, 0x18, 0x1c, 0x20, 0x24, 0x28, 0x2c, 0x30, 0x34, 0x38, 0x3c, 0x40, 0x44, 0x48, 0x4c, 0x50, 0x54, 0x58, 0x5c, 0x60, 0x64, 0x68, 0x6c, 0x70, 0x74, 0x78, 0x7c, 0x80, 0x84, 0x88, 0x8c, 0x90, 0x94, 0x98, 0x9c, 0xa0, 0xa4, 0xa8, 0xac, 0xb0, 0xb4, 0xb8, 0xbc, 0xc0, 0xc4, 0xc8, 0xcc, 0xd0, 0xd4, 0xd8, 0xdc, 0xe0, 0xe4, 0xe8, 0xec, 0xf0, 0xf4, 0xf8, 0xfc, 0x1d, 0x19, 0x15, 0x11, 0xd, 0x9, 0x5, 0x1, 0x3d, 0x39, 0x35, 0x31, 0x2d, 0x29, 0x25, 0x21, 0x5d, 0x59, 0x55, 0x51, 0x4d, 0x49, 0x45, 0x41, 0x7d, 0x79, 0x75, 0x71, 0x6d, 0x69, 0x65, 0x61, 0x9d, 0x99, 0x95, 0x91, 0x8d, 0x89, 0x85, 0x81, 0xbd, 0xb9, 0xb5, 0xb1, 0xad, 0xa9, 0xa5, 0xa1, 0xdd, 0xd9, 0xd5, 0xd1, 0xcd, 0xc9, 0xc5, 0xc1, 0xfd, 0xf9, 0xf5, 0xf1, 0xed, 0xe9, 0xe5, 0xe1, 0x3a, 0x3e, 0x32, 0x36, 0x2a, 0x2e, 0x22, 0x26, 0x1a, 0x1e, 0x12, 0x16, 0xa, 0xe, 0x2, 0x6, 0x7a, 0x7e, 0x72, 0x76, 0x6a, 0x6e, 0x62, 0x66, 0x5a, 0x5e, 0x52, 0x56, 0x4a, 0x4e, 0x42, 0x46, 0xba, 0xbe, 0xb2, 0xb6, 0xaa, 0xae, 0xa2, 0xa6, 0x9a, 0x9e, 0x92, 0x96, 0x8a, 0x8e, 0x82, 0x86, 0xfa, 0xfe, 0xf2, 0xf6, 0xea, 0xee, 0xe2, 0xe6, 0xda, 0xde, 0xd2, 0xd6, 0xca, 0xce, 0xc2, 0xc6, 0x27, 0x23, 0x2f, 0x2b, 0x37, 0x33, 0x3f, 0x3b, 0x7, 0x3, 0xf, 0xb, 0x17, 0x13, 0x1f, 0x1b, 0x67, 0x63, 0x6f, 0x6b, 0x77, 0x73, 0x7f, 0x7b, 0x47, 0x43, 0x4f, 0x4b, 0x57, 0x53, 0x5f, 0x5b, 0xa7, 0xa3, 0xaf, 0xab, 0xb7, 0xb3, 0xbf, 0xbb, 0x87, 0x83, 0x8f, 0x8b, 0x97, 0x93, 0x9f, 0x9b, 0xe7, 0xe3, 0xef, 0xeb, 0xf7, 0xf3, 0xff, 0xfb, 0xc7, 0xc3, 0xcf, 0xcb, 0xd7, 0xd3, 0xdf, 0xdb},
+ {0x0, 0x5, 0xa, 0xf, 0x14, 0x11, 0x1e, 0x1b, 0x28, 0x2d, 0x22, 0x27, 0x3c, 0x39, 0x36, 0x33, 0x50, 0x55, 0x5a, 0x5f, 0x44, 0x41, 0x4e, 0x4b, 0x78, 0x7d, 0x72, 0x77, 0x6c, 0x69, 0x66, 0x63, 0xa0, 0xa5, 0xaa, 0xaf, 0xb4, 0xb1, 0xbe, 0xbb, 0x88, 0x8d, 0x82, 0x87, 0x9c, 0x99, 0x96, 0x93, 0xf0, 0xf5, 0xfa, 0xff, 0xe4, 0xe1, 0xee, 0xeb, 0xd8, 0xdd, 0xd2, 0xd7, 0xcc, 0xc9, 0xc6, 0xc3, 0x5d, 0x58, 0x57, 0x52, 0x49, 0x4c, 0x43, 0x46, 0x75, 0x70, 0x7f, 0x7a, 0x61, 0x64, 0x6b, 0x6e, 0xd, 0x8, 0x7, 0x2, 0x19, 0x1c, 0x13, 0x16, 0x25, 0x20, 0x2f, 0x2a, 0x31, 0x34, 0x3b, 0x3e, 0xfd, 0xf8, 0xf7, 0xf2, 0xe9, 0xec, 0xe3, 0xe6, 0xd5, 0xd0, 0xdf, 0xda, 0xc1, 0xc4, 0xcb, 0xce, 0xad, 0xa8, 0xa7, 0xa2, 0xb9, 0xbc, 0xb3, 0xb6, 0x85, 0x80, 0x8f, 0x8a, 0x91, 0x94, 0x9b, 0x9e, 0xba, 0xbf, 0xb0, 0xb5, 0xae, 0xab, 0xa4, 0xa1, 0x92, 0x97, 0x98, 0x9d, 0x86, 0x83, 0x8c, 0x89, 0xea, 0xef, 0xe0, 0xe5, 0xfe, 0xfb, 0xf4, 0xf1, 0xc2, 0xc7, 0xc8, 0xcd, 0xd6, 0xd3, 0xdc, 0xd9, 0x1a, 0x1f, 0x10, 0x15, 0xe, 0xb, 0x4, 0x1, 0x32, 0x37, 0x38, 0x3d, 0x26, 0x23, 0x2c, 0x29, 0x4a, 0x4f, 0x40, 0x45, 0x5e, 0x5b, 0x54, 0x51, 0x62, 0x67, 0x68, 0x6d, 0x76, 0x73, 0x7c, 0x79, 0xe7, 0xe2, 0xed, 0xe8, 0xf3, 0xf6, 0xf9, 0xfc, 0xcf, 0xca, 0xc5, 0xc0, 0xdb, 0xde, 0xd1, 0xd4, 0xb7, 0xb2, 0xbd, 0xb8, 0xa3, 0xa6, 0xa9, 0xac, 0x9f, 0x9a, 0x95, 0x90, 0x8b, 0x8e, 0x81, 0x84, 0x47, 0x42, 0x4d, 0x48, 0x53, 0x56, 0x59, 0x5c, 0x6f, 0x6a, 0x65, 0x60, 0x7b, 0x7e, 0x71, 0x74, 0x17, 0x12, 0x1d, 0x18, 0x3, 0x6, 0x9, 0xc, 0x3f, 0x3a, 0x35, 0x30, 0x2b, 0x2e, 0x21, 0x24},
+ {0x0, 0x6, 0xc, 0xa, 0x18, 0x1e, 0x14, 0x12, 0x30, 0x36, 0x3c, 0x3a, 0x28, 0x2e, 0x24, 0x22, 0x60, 0x66, 0x6c, 0x6a, 0x78, 0x7e, 0x74, 0x72, 0x50, 0x56, 0x5c, 0x5a, 0x48, 0x4e, 0x44, 0x42, 0xc0, 0xc6, 0xcc, 0xca, 0xd8, 0xde, 0xd4, 0xd2, 0xf0, 0xf6, 0xfc, 0xfa, 0xe8, 0xee, 0xe4, 0xe2, 0xa0, 0xa6, 0xac, 0xaa, 0xb8, 0xbe, 0xb4, 0xb2, 0x90, 0x96, 0x9c, 0x9a, 0x88, 0x8e, 0x84, 0x82, 0x9d, 0x9b, 0x91, 0x97, 0x85, 0x83, 0x89, 0x8f, 0xad, 0xab, 0xa1, 0xa7, 0xb5, 0xb3, 0xb9, 0xbf, 0xfd, 0xfb, 0xf1, 0xf7, 0xe5, 0xe3, 0xe9, 0xef, 0xcd, 0xcb, 0xc1, 0xc7, 0xd5, 0xd3, 0xd9, 0xdf, 0x5d, 0x5b, 0x51, 0x57, 0x45, 0x43, 0x49, 0x4f, 0x6d, 0x6b, 0x61, 0x67, 0x75, 0x73, 0x79, 0x7f, 0x3d, 0x3b, 0x31, 0x37, 0x25, 0x23, 0x29, 0x2f, 0xd, 0xb, 0x1, 0x7, 0x15, 0x13, 0x19, 0x1f, 0x27, 0x21, 0x2b, 0x2d, 0x3f, 0x39, 0x33, 0x35, 0x17, 0x11, 0x1b, 0x1d, 0xf, 0x9, 0x3, 0x5, 0x47, 0x41, 0x4b, 0x4d, 0x5f, 0x59, 0x53, 0x55, 0x77, 0x71, 0x7b, 0x7d, 0x6f, 0x69, 0x63, 0x65, 0xe7, 0xe1, 0xeb, 0xed, 0xff, 0xf9, 0xf3, 0xf5, 0xd7, 0xd1, 0xdb, 0xdd, 0xcf, 0xc9, 0xc3, 0xc5, 0x87, 0x81, 0x8b, 0x8d, 0x9f, 0x99, 0x93, 0x95, 0xb7, 0xb1, 0xbb, 0xbd, 0xaf, 0xa9, 0xa3, 0xa5, 0xba, 0xbc, 0xb6, 0xb0, 0xa2, 0xa4, 0xae, 0xa8, 0x8a, 0x8c, 0x86, 0x80, 0x92, 0x94, 0x9e, 0x98, 0xda, 0xdc, 0xd6, 0xd0, 0xc2, 0xc4, 0xce, 0xc8, 0xea, 0xec, 0xe6, 0xe0, 0xf2, 0xf4, 0xfe, 0xf8, 0x7a, 0x7c, 0x76, 0x70, 0x62, 0x64, 0x6e, 0x68, 0x4a, 0x4c, 0x46, 0x40, 0x52, 0x54, 0x5e, 0x58, 0x1a, 0x1c, 0x16, 0x10, 0x2, 0x4, 0xe, 0x8, 0x2a, 0x2c, 0x26, 0x20, 0x32, 0x34, 0x3e, 0x38},
+ {0x0, 0x7, 0xe, 0x9, 0x1c, 0x1b, 0x12, 0x15, 0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d, 0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65, 0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d, 0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb, 0xf2, 0xf5, 0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd, 0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85, 0xa8, 0xaf, 0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd, 0xdd, 0xda, 0xd3, 0xd4, 0xc1, 0xc6, 0xcf, 0xc8, 0xe5, 0xe2, 0xeb, 0xec, 0xf9, 0xfe, 0xf7, 0xf0, 0xad, 0xaa, 0xa3, 0xa4, 0xb1, 0xb6, 0xbf, 0xb8, 0x95, 0x92, 0x9b, 0x9c, 0x89, 0x8e, 0x87, 0x80, 0x3d, 0x3a, 0x33, 0x34, 0x21, 0x26, 0x2f, 0x28, 0x5, 0x2, 0xb, 0xc, 0x19, 0x1e, 0x17, 0x10, 0x4d, 0x4a, 0x43, 0x44, 0x51, 0x56, 0x5f, 0x58, 0x75, 0x72, 0x7b, 0x7c, 0x69, 0x6e, 0x67, 0x60, 0xa7, 0xa0, 0xa9, 0xae, 0xbb, 0xbc, 0xb5, 0xb2, 0x9f, 0x98, 0x91, 0x96, 0x83, 0x84, 0x8d, 0x8a, 0xd7, 0xd0, 0xd9, 0xde, 0xcb, 0xcc, 0xc5, 0xc2, 0xef, 0xe8, 0xe1, 0xe6, 0xf3, 0xf4, 0xfd, 0xfa, 0x47, 0x40, 0x49, 0x4e, 0x5b, 0x5c, 0x55, 0x52, 0x7f, 0x78, 0x71, 0x76, 0x63, 0x64, 0x6d, 0x6a, 0x37, 0x30, 0x39, 0x3e, 0x2b, 0x2c, 0x25, 0x22, 0xf, 0x8, 0x1, 0x6, 0x13, 0x14, 0x1d, 0x1a, 0x7a, 0x7d, 0x74, 0x73, 0x66, 0x61, 0x68, 0x6f, 0x42, 0x45, 0x4c, 0x4b, 0x5e, 0x59, 0x50, 0x57, 0xa, 0xd, 0x4, 0x3, 0x16, 0x11, 0x18, 0x1f, 0x32, 0x35, 0x3c, 0x3b, 0x2e, 0x29, 0x20, 0x27, 0x9a, 0x9d, 0x94, 0x93, 0x86, 0x81, 0x88, 0x8f, 0xa2, 0xa5, 0xac, 0xab, 0xbe, 0xb9, 0xb0, 0xb7, 0xea, 0xed, 0xe4, 0xe3, 0xf6, 0xf1, 0xf8, 0xff, 0xd2, 0xd5, 0xdc, 0xdb, 0xce, 0xc9, 0xc0, 0xc7},
+ {0x0, 0x8, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78, 0x80, 0x88, 0x90, 0x98, 0xa0, 0xa8, 0xb0, 0xb8, 0xc0, 0xc8, 0xd0, 0xd8, 0xe0, 0xe8, 0xf0, 0xf8, 0x1d, 0x15, 0xd, 0x5, 0x3d, 0x35, 0x2d, 0x25, 0x5d, 0x55, 0x4d, 0x45, 0x7d, 0x75, 0x6d, 0x65, 0x9d, 0x95, 0x8d, 0x85, 0xbd, 0xb5, 0xad, 0xa5, 0xdd, 0xd5, 0xcd, 0xc5, 0xfd, 0xf5, 0xed, 0xe5, 0x3a, 0x32, 0x2a, 0x22, 0x1a, 0x12, 0xa, 0x2, 0x7a, 0x72, 0x6a, 0x62, 0x5a, 0x52, 0x4a, 0x42, 0xba, 0xb2, 0xaa, 0xa2, 0x9a, 0x92, 0x8a, 0x82, 0xfa, 0xf2, 0xea, 0xe2, 0xda, 0xd2, 0xca, 0xc2, 0x27, 0x2f, 0x37, 0x3f, 0x7, 0xf, 0x17, 0x1f, 0x67, 0x6f, 0x77, 0x7f, 0x47, 0x4f, 0x57, 0x5f, 0xa7, 0xaf, 0xb7, 0xbf, 0x87, 0x8f, 0x97, 0x9f, 0xe7, 0xef, 0xf7, 0xff, 0xc7, 0xcf, 0xd7, 0xdf, 0x74, 0x7c, 0x64, 0x6c, 0x54, 0x5c, 0x44, 0x4c, 0x34, 0x3c, 0x24, 0x2c, 0x14, 0x1c, 0x4, 0xc, 0xf4, 0xfc, 0xe4, 0xec, 0xd4, 0xdc, 0xc4, 0xcc, 0xb4, 0xbc, 0xa4, 0xac, 0x94, 0x9c, 0x84, 0x8c, 0x69, 0x61, 0x79, 0x71, 0x49, 0x41, 0x59, 0x51, 0x29, 0x21, 0x39, 0x31, 0x9, 0x1, 0x19, 0x11, 0xe9, 0xe1, 0xf9, 0xf1, 0xc9, 0xc1, 0xd9, 0xd1, 0xa9, 0xa1, 0xb9, 0xb1, 0x89, 0x81, 0x99, 0x91, 0x4e, 0x46, 0x5e, 0x56, 0x6e, 0x66, 0x7e, 0x76, 0xe, 0x6, 0x1e, 0x16, 0x2e, 0x26, 0x3e, 0x36, 0xce, 0xc6, 0xde, 0xd6, 0xee, 0xe6, 0xfe, 0xf6, 0x8e, 0x86, 0x9e, 0x96, 0xae, 0xa6, 0xbe, 0xb6, 0x53, 0x5b, 0x43, 0x4b, 0x73, 0x7b, 0x63, 0x6b, 0x13, 0x1b, 0x3, 0xb, 0x33, 0x3b, 0x23, 0x2b, 0xd3, 0xdb, 0xc3, 0xcb, 0xf3, 0xfb, 0xe3, 0xeb, 0x93, 0x9b, 0x83, 0x8b, 0xb3, 0xbb, 0xa3, 0xab},
+ {0x0, 0x9, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f, 0x48, 0x41, 0x5a, 0x53, 0x6c, 0x65, 0x7e, 0x77, 0x90, 0x99, 0x82, 0x8b, 0xb4, 0xbd, 0xa6, 0xaf, 0xd8, 0xd1, 0xca, 0xc3, 0xfc, 0xf5, 0xee, 0xe7, 0x3d, 0x34, 0x2f, 0x26, 0x19, 0x10, 0xb, 0x2, 0x75, 0x7c, 0x67, 0x6e, 0x51, 0x58, 0x43, 0x4a, 0xad, 0xa4, 0xbf, 0xb6, 0x89, 0x80, 0x9b, 0x92, 0xe5, 0xec, 0xf7, 0xfe, 0xc1, 0xc8, 0xd3, 0xda, 0x7a, 0x73, 0x68, 0x61, 0x5e, 0x57, 0x4c, 0x45, 0x32, 0x3b, 0x20, 0x29, 0x16, 0x1f, 0x4, 0xd, 0xea, 0xe3, 0xf8, 0xf1, 0xce, 0xc7, 0xdc, 0xd5, 0xa2, 0xab, 0xb0, 0xb9, 0x86, 0x8f, 0x94, 0x9d, 0x47, 0x4e, 0x55, 0x5c, 0x63, 0x6a, 0x71, 0x78, 0xf, 0x6, 0x1d, 0x14, 0x2b, 0x22, 0x39, 0x30, 0xd7, 0xde, 0xc5, 0xcc, 0xf3, 0xfa, 0xe1, 0xe8, 0x9f, 0x96, 0x8d, 0x84, 0xbb, 0xb2, 0xa9, 0xa0, 0xf4, 0xfd, 0xe6, 0xef, 0xd0, 0xd9, 0xc2, 0xcb, 0xbc, 0xb5, 0xae, 0xa7, 0x98, 0x91, 0x8a, 0x83, 0x64, 0x6d, 0x76, 0x7f, 0x40, 0x49, 0x52, 0x5b, 0x2c, 0x25, 0x3e, 0x37, 0x8, 0x1, 0x1a, 0x13, 0xc9, 0xc0, 0xdb, 0xd2, 0xed, 0xe4, 0xff, 0xf6, 0x81, 0x88, 0x93, 0x9a, 0xa5, 0xac, 0xb7, 0xbe, 0x59, 0x50, 0x4b, 0x42, 0x7d, 0x74, 0x6f, 0x66, 0x11, 0x18, 0x3, 0xa, 0x35, 0x3c, 0x27, 0x2e, 0x8e, 0x87, 0x9c, 0x95, 0xaa, 0xa3, 0xb8, 0xb1, 0xc6, 0xcf, 0xd4, 0xdd, 0xe2, 0xeb, 0xf0, 0xf9, 0x1e, 0x17, 0xc, 0x5, 0x3a, 0x33, 0x28, 0x21, 0x56, 0x5f, 0x44, 0x4d, 0x72, 0x7b, 0x60, 0x69, 0xb3, 0xba, 0xa1, 0xa8, 0x97, 0x9e, 0x85, 0x8c, 0xfb, 0xf2, 0xe9, 0xe0, 0xdf, 0xd6, 0xcd, 0xc4, 0x23, 0x2a, 0x31, 0x38, 0x7, 0xe, 0x15, 0x1c, 0x6b, 0x62, 0x79, 0x70, 0x4f, 0x46, 0x5d, 0x54},
+ {0x0, 0xa, 0x14, 0x1e, 0x28, 0x22, 0x3c, 0x36, 0x50, 0x5a, 0x44, 0x4e, 0x78, 0x72, 0x6c, 0x66, 0xa0, 0xaa, 0xb4, 0xbe, 0x88, 0x82, 0x9c, 0x96, 0xf0, 0xfa, 0xe4, 0xee, 0xd8, 0xd2, 0xcc, 0xc6, 0x5d, 0x57, 0x49, 0x43, 0x75, 0x7f, 0x61, 0x6b, 0xd, 0x7, 0x19, 0x13, 0x25, 0x2f, 0x31, 0x3b, 0xfd, 0xf7, 0xe9, 0xe3, 0xd5, 0xdf, 0xc1, 0xcb, 0xad, 0xa7, 0xb9, 0xb3, 0x85, 0x8f, 0x91, 0x9b, 0xba, 0xb0, 0xae, 0xa4, 0x92, 0x98, 0x86, 0x8c, 0xea, 0xe0, 0xfe, 0xf4, 0xc2, 0xc8, 0xd6, 0xdc, 0x1a, 0x10, 0xe, 0x4, 0x32, 0x38, 0x26, 0x2c, 0x4a, 0x40, 0x5e, 0x54, 0x62, 0x68, 0x76, 0x7c, 0xe7, 0xed, 0xf3, 0xf9, 0xcf, 0xc5, 0xdb, 0xd1, 0xb7, 0xbd, 0xa3, 0xa9, 0x9f, 0x95, 0x8b, 0x81, 0x47, 0x4d, 0x53, 0x59, 0x6f, 0x65, 0x7b, 0x71, 0x17, 0x1d, 0x3, 0x9, 0x3f, 0x35, 0x2b, 0x21, 0x69, 0x63, 0x7d, 0x77, 0x41, 0x4b, 0x55, 0x5f, 0x39, 0x33, 0x2d, 0x27, 0x11, 0x1b, 0x5, 0xf, 0xc9, 0xc3, 0xdd, 0xd7, 0xe1, 0xeb, 0xf5, 0xff, 0x99, 0x93, 0x8d, 0x87, 0xb1, 0xbb, 0xa5, 0xaf, 0x34, 0x3e, 0x20, 0x2a, 0x1c, 0x16, 0x8, 0x2, 0x64, 0x6e, 0x70, 0x7a, 0x4c, 0x46, 0x58, 0x52, 0x94, 0x9e, 0x80, 0x8a, 0xbc, 0xb6, 0xa8, 0xa2, 0xc4, 0xce, 0xd0, 0xda, 0xec, 0xe6, 0xf8, 0xf2, 0xd3, 0xd9, 0xc7, 0xcd, 0xfb, 0xf1, 0xef, 0xe5, 0x83, 0x89, 0x97, 0x9d, 0xab, 0xa1, 0xbf, 0xb5, 0x73, 0x79, 0x67, 0x6d, 0x5b, 0x51, 0x4f, 0x45, 0x23, 0x29, 0x37, 0x3d, 0xb, 0x1, 0x1f, 0x15, 0x8e, 0x84, 0x9a, 0x90, 0xa6, 0xac, 0xb2, 0xb8, 0xde, 0xd4, 0xca, 0xc0, 0xf6, 0xfc, 0xe2, 0xe8, 0x2e, 0x24, 0x3a, 0x30, 0x6, 0xc, 0x12, 0x18, 0x7e, 0x74, 0x6a, 0x60, 0x56, 0x5c, 0x42, 0x48},
+ {0x0, 0xb, 0x16, 0x1d, 0x2c, 0x27, 0x3a, 0x31, 0x58, 0x53, 0x4e, 0x45, 0x74, 0x7f, 0x62, 0x69, 0xb0, 0xbb, 0xa6, 0xad, 0x9c, 0x97, 0x8a, 0x81, 0xe8, 0xe3, 0xfe, 0xf5, 0xc4, 0xcf, 0xd2, 0xd9, 0x7d, 0x76, 0x6b, 0x60, 0x51, 0x5a, 0x47, 0x4c, 0x25, 0x2e, 0x33, 0x38, 0x9, 0x2, 0x1f, 0x14, 0xcd, 0xc6, 0xdb, 0xd0, 0xe1, 0xea, 0xf7, 0xfc, 0x95, 0x9e, 0x83, 0x88, 0xb9, 0xb2, 0xaf, 0xa4, 0xfa, 0xf1, 0xec, 0xe7, 0xd6, 0xdd, 0xc0, 0xcb, 0xa2, 0xa9, 0xb4, 0xbf, 0x8e, 0x85, 0x98, 0x93, 0x4a, 0x41, 0x5c, 0x57, 0x66, 0x6d, 0x70, 0x7b, 0x12, 0x19, 0x4, 0xf, 0x3e, 0x35, 0x28, 0x23, 0x87, 0x8c, 0x91, 0x9a, 0xab, 0xa0, 0xbd, 0xb6, 0xdf, 0xd4, 0xc9, 0xc2, 0xf3, 0xf8, 0xe5, 0xee, 0x37, 0x3c, 0x21, 0x2a, 0x1b, 0x10, 0xd, 0x6, 0x6f, 0x64, 0x79, 0x72, 0x43, 0x48, 0x55, 0x5e, 0xe9, 0xe2, 0xff, 0xf4, 0xc5, 0xce, 0xd3, 0xd8, 0xb1, 0xba, 0xa7, 0xac, 0x9d, 0x96, 0x8b, 0x80, 0x59, 0x52, 0x4f, 0x44, 0x75, 0x7e, 0x63, 0x68, 0x1, 0xa, 0x17, 0x1c, 0x2d, 0x26, 0x3b, 0x30, 0x94, 0x9f, 0x82, 0x89, 0xb8, 0xb3, 0xae, 0xa5, 0xcc, 0xc7, 0xda, 0xd1, 0xe0, 0xeb, 0xf6, 0xfd, 0x24, 0x2f, 0x32, 0x39, 0x8, 0x3, 0x1e, 0x15, 0x7c, 0x77, 0x6a, 0x61, 0x50, 0x5b, 0x46, 0x4d, 0x13, 0x18, 0x5, 0xe, 0x3f, 0x34, 0x29, 0x22, 0x4b, 0x40, 0x5d, 0x56, 0x67, 0x6c, 0x71, 0x7a, 0xa3, 0xa8, 0xb5, 0xbe, 0x8f, 0x84, 0x99, 0x92, 0xfb, 0xf0, 0xed, 0xe6, 0xd7, 0xdc, 0xc1, 0xca, 0x6e, 0x65, 0x78, 0x73, 0x42, 0x49, 0x54, 0x5f, 0x36, 0x3d, 0x20, 0x2b, 0x1a, 0x11, 0xc, 0x7, 0xde, 0xd5, 0xc8, 0xc3, 0xf2, 0xf9, 0xe4, 0xef, 0x86, 0x8d, 0x90, 0x9b, 0xaa, 0xa1, 0xbc, 0xb7},
+ {0x0, 0xc, 0x18, 0x14, 0x30, 0x3c, 0x28, 0x24, 0x60, 0x6c, 0x78, 0x74, 0x50, 0x5c, 0x48, 0x44, 0xc0, 0xcc, 0xd8, 0xd4, 0xf0, 0xfc, 0xe8, 0xe4, 0xa0, 0xac, 0xb8, 0xb4, 0x90, 0x9c, 0x88, 0x84, 0x9d, 0x91, 0x85, 0x89, 0xad, 0xa1, 0xb5, 0xb9, 0xfd, 0xf1, 0xe5, 0xe9, 0xcd, 0xc1, 0xd5, 0xd9, 0x5d, 0x51, 0x45, 0x49, 0x6d, 0x61, 0x75, 0x79, 0x3d, 0x31, 0x25, 0x29, 0xd, 0x1, 0x15, 0x19, 0x27, 0x2b, 0x3f, 0x33, 0x17, 0x1b, 0xf, 0x3, 0x47, 0x4b, 0x5f, 0x53, 0x77, 0x7b, 0x6f, 0x63, 0xe7, 0xeb, 0xff, 0xf3, 0xd7, 0xdb, 0xcf, 0xc3, 0x87, 0x8b, 0x9f, 0x93, 0xb7, 0xbb, 0xaf, 0xa3, 0xba, 0xb6, 0xa2, 0xae, 0x8a, 0x86, 0x92, 0x9e, 0xda, 0xd6, 0xc2, 0xce, 0xea, 0xe6, 0xf2, 0xfe, 0x7a, 0x76, 0x62, 0x6e, 0x4a, 0x46, 0x52, 0x5e, 0x1a, 0x16, 0x2, 0xe, 0x2a, 0x26, 0x32, 0x3e, 0x4e, 0x42, 0x56, 0x5a, 0x7e, 0x72, 0x66, 0x6a, 0x2e, 0x22, 0x36, 0x3a, 0x1e, 0x12, 0x6, 0xa, 0x8e, 0x82, 0x96, 0x9a, 0xbe, 0xb2, 0xa6, 0xaa, 0xee, 0xe2, 0xf6, 0xfa, 0xde, 0xd2, 0xc6, 0xca, 0xd3, 0xdf, 0xcb, 0xc7, 0xe3, 0xef, 0xfb, 0xf7, 0xb3, 0xbf, 0xab, 0xa7, 0x83, 0x8f, 0x9b, 0x97, 0x13, 0x1f, 0xb, 0x7, 0x23, 0x2f, 0x3b, 0x37, 0x73, 0x7f, 0x6b, 0x67, 0x43, 0x4f, 0x5b, 0x57, 0x69, 0x65, 0x71, 0x7d, 0x59, 0x55, 0x41, 0x4d, 0x9, 0x5, 0x11, 0x1d, 0x39, 0x35, 0x21, 0x2d, 0xa9, 0xa5, 0xb1, 0xbd, 0x99, 0x95, 0x81, 0x8d, 0xc9, 0xc5, 0xd1, 0xdd, 0xf9, 0xf5, 0xe1, 0xed, 0xf4, 0xf8, 0xec, 0xe0, 0xc4, 0xc8, 0xdc, 0xd0, 0x94, 0x98, 0x8c, 0x80, 0xa4, 0xa8, 0xbc, 0xb0, 0x34, 0x38, 0x2c, 0x20, 0x4, 0x8, 0x1c, 0x10, 0x54, 0x58, 0x4c, 0x40, 0x64, 0x68, 0x7c, 0x70},
+ {0x0, 0xd, 0x1a, 0x17, 0x34, 0x39, 0x2e, 0x23, 0x68, 0x65, 0x72, 0x7f, 0x5c, 0x51, 0x46, 0x4b, 0xd0, 0xdd, 0xca, 0xc7, 0xe4, 0xe9, 0xfe, 0xf3, 0xb8, 0xb5, 0xa2, 0xaf, 0x8c, 0x81, 0x96, 0x9b, 0xbd, 0xb0, 0xa7, 0xaa, 0x89, 0x84, 0x93, 0x9e, 0xd5, 0xd8, 0xcf, 0xc2, 0xe1, 0xec, 0xfb, 0xf6, 0x6d, 0x60, 0x77, 0x7a, 0x59, 0x54, 0x43, 0x4e, 0x5, 0x8, 0x1f, 0x12, 0x31, 0x3c, 0x2b, 0x26, 0x67, 0x6a, 0x7d, 0x70, 0x53, 0x5e, 0x49, 0x44, 0xf, 0x2, 0x15, 0x18, 0x3b, 0x36, 0x21, 0x2c, 0xb7, 0xba, 0xad, 0xa0, 0x83, 0x8e, 0x99, 0x94, 0xdf, 0xd2, 0xc5, 0xc8, 0xeb, 0xe6, 0xf1, 0xfc, 0xda, 0xd7, 0xc0, 0xcd, 0xee, 0xe3, 0xf4, 0xf9, 0xb2, 0xbf, 0xa8, 0xa5, 0x86, 0x8b, 0x9c, 0x91, 0xa, 0x7, 0x10, 0x1d, 0x3e, 0x33, 0x24, 0x29, 0x62, 0x6f, 0x78, 0x75, 0x56, 0x5b, 0x4c, 0x41, 0xce, 0xc3, 0xd4, 0xd9, 0xfa, 0xf7, 0xe0, 0xed, 0xa6, 0xab, 0xbc, 0xb1, 0x92, 0x9f, 0x88, 0x85, 0x1e, 0x13, 0x4, 0x9, 0x2a, 0x27, 0x30, 0x3d, 0x76, 0x7b, 0x6c, 0x61, 0x42, 0x4f, 0x58, 0x55, 0x73, 0x7e, 0x69, 0x64, 0x47, 0x4a, 0x5d, 0x50, 0x1b, 0x16, 0x1, 0xc, 0x2f, 0x22, 0x35, 0x38, 0xa3, 0xae, 0xb9, 0xb4, 0x97, 0x9a, 0x8d, 0x80, 0xcb, 0xc6, 0xd1, 0xdc, 0xff, 0xf2, 0xe5, 0xe8, 0xa9, 0xa4, 0xb3, 0xbe, 0x9d, 0x90, 0x87, 0x8a, 0xc1, 0xcc, 0xdb, 0xd6, 0xf5, 0xf8, 0xef, 0xe2, 0x79, 0x74, 0x63, 0x6e, 0x4d, 0x40, 0x57, 0x5a, 0x11, 0x1c, 0xb, 0x6, 0x25, 0x28, 0x3f, 0x32, 0x14, 0x19, 0xe, 0x3, 0x20, 0x2d, 0x3a, 0x37, 0x7c, 0x71, 0x66, 0x6b, 0x48, 0x45, 0x52, 0x5f, 0xc4, 0xc9, 0xde, 0xd3, 0xf0, 0xfd, 0xea, 0xe7, 0xac, 0xa1, 0xb6, 0xbb, 0x98, 0x95, 0x82, 0x8f},
+ {0x0, 0xe, 0x1c, 0x12, 0x38, 0x36, 0x24, 0x2a, 0x70, 0x7e, 0x6c, 0x62, 0x48, 0x46, 0x54, 0x5a, 0xe0, 0xee, 0xfc, 0xf2, 0xd8, 0xd6, 0xc4, 0xca, 0x90, 0x9e, 0x8c, 0x82, 0xa8, 0xa6, 0xb4, 0xba, 0xdd, 0xd3, 0xc1, 0xcf, 0xe5, 0xeb, 0xf9, 0xf7, 0xad, 0xa3, 0xb1, 0xbf, 0x95, 0x9b, 0x89, 0x87, 0x3d, 0x33, 0x21, 0x2f, 0x5, 0xb, 0x19, 0x17, 0x4d, 0x43, 0x51, 0x5f, 0x75, 0x7b, 0x69, 0x67, 0xa7, 0xa9, 0xbb, 0xb5, 0x9f, 0x91, 0x83, 0x8d, 0xd7, 0xd9, 0xcb, 0xc5, 0xef, 0xe1, 0xf3, 0xfd, 0x47, 0x49, 0x5b, 0x55, 0x7f, 0x71, 0x63, 0x6d, 0x37, 0x39, 0x2b, 0x25, 0xf, 0x1, 0x13, 0x1d, 0x7a, 0x74, 0x66, 0x68, 0x42, 0x4c, 0x5e, 0x50, 0xa, 0x4, 0x16, 0x18, 0x32, 0x3c, 0x2e, 0x20, 0x9a, 0x94, 0x86, 0x88, 0xa2, 0xac, 0xbe, 0xb0, 0xea, 0xe4, 0xf6, 0xf8, 0xd2, 0xdc, 0xce, 0xc0, 0x53, 0x5d, 0x4f, 0x41, 0x6b, 0x65, 0x77, 0x79, 0x23, 0x2d, 0x3f, 0x31, 0x1b, 0x15, 0x7, 0x9, 0xb3, 0xbd, 0xaf, 0xa1, 0x8b, 0x85, 0x97, 0x99, 0xc3, 0xcd, 0xdf, 0xd1, 0xfb, 0xf5, 0xe7, 0xe9, 0x8e, 0x80, 0x92, 0x9c, 0xb6, 0xb8, 0xaa, 0xa4, 0xfe, 0xf0, 0xe2, 0xec, 0xc6, 0xc8, 0xda, 0xd4, 0x6e, 0x60, 0x72, 0x7c, 0x56, 0x58, 0x4a, 0x44, 0x1e, 0x10, 0x2, 0xc, 0x26, 0x28, 0x3a, 0x34, 0xf4, 0xfa, 0xe8, 0xe6, 0xcc, 0xc2, 0xd0, 0xde, 0x84, 0x8a, 0x98, 0x96, 0xbc, 0xb2, 0xa0, 0xae, 0x14, 0x1a, 0x8, 0x6, 0x2c, 0x22, 0x30, 0x3e, 0x64, 0x6a, 0x78, 0x76, 0x5c, 0x52, 0x40, 0x4e, 0x29, 0x27, 0x35, 0x3b, 0x11, 0x1f, 0xd, 0x3, 0x59, 0x57, 0x45, 0x4b, 0x61, 0x6f, 0x7d, 0x73, 0xc9, 0xc7, 0xd5, 0xdb, 0xf1, 0xff, 0xed, 0xe3, 0xb9, 0xb7, 0xa5, 0xab, 0x81, 0x8f, 0x9d, 0x93},
+ {0x0, 0xf, 0x1e, 0x11, 0x3c, 0x33, 0x22, 0x2d, 0x78, 0x77, 0x66, 0x69, 0x44, 0x4b, 0x5a, 0x55, 0xf0, 0xff, 0xee, 0xe1, 0xcc, 0xc3, 0xd2, 0xdd, 0x88, 0x87, 0x96, 0x99, 0xb4, 0xbb, 0xaa, 0xa5, 0xfd, 0xf2, 0xe3, 0xec, 0xc1, 0xce, 0xdf, 0xd0, 0x85, 0x8a, 0x9b, 0x94, 0xb9, 0xb6, 0xa7, 0xa8, 0xd, 0x2, 0x13, 0x1c, 0x31, 0x3e, 0x2f, 0x20, 0x75, 0x7a, 0x6b, 0x64, 0x49, 0x46, 0x57, 0x58, 0xe7, 0xe8, 0xf9, 0xf6, 0xdb, 0xd4, 0xc5, 0xca, 0x9f, 0x90, 0x81, 0x8e, 0xa3, 0xac, 0xbd, 0xb2, 0x17, 0x18, 0x9, 0x6, 0x2b, 0x24, 0x35, 0x3a, 0x6f, 0x60, 0x71, 0x7e, 0x53, 0x5c, 0x4d, 0x42, 0x1a, 0x15, 0x4, 0xb, 0x26, 0x29, 0x38, 0x37, 0x62, 0x6d, 0x7c, 0x73, 0x5e, 0x51, 0x40, 0x4f, 0xea, 0xe5, 0xf4, 0xfb, 0xd6, 0xd9, 0xc8, 0xc7, 0x92, 0x9d, 0x8c, 0x83, 0xae, 0xa1, 0xb0, 0xbf, 0xd3, 0xdc, 0xcd, 0xc2, 0xef, 0xe0, 0xf1, 0xfe, 0xab, 0xa4, 0xb5, 0xba, 0x97, 0x98, 0x89, 0x86, 0x23, 0x2c, 0x3d, 0x32, 0x1f, 0x10, 0x1, 0xe, 0x5b, 0x54, 0x45, 0x4a, 0x67, 0x68, 0x79, 0x76, 0x2e, 0x21, 0x30, 0x3f, 0x12, 0x1d, 0xc, 0x3, 0x56, 0x59, 0x48, 0x47, 0x6a, 0x65, 0x74, 0x7b, 0xde, 0xd1, 0xc0, 0xcf, 0xe2, 0xed, 0xfc, 0xf3, 0xa6, 0xa9, 0xb8, 0xb7, 0x9a, 0x95, 0x84, 0x8b, 0x34, 0x3b, 0x2a, 0x25, 0x8, 0x7, 0x16, 0x19, 0x4c, 0x43, 0x52, 0x5d, 0x70, 0x7f, 0x6e, 0x61, 0xc4, 0xcb, 0xda, 0xd5, 0xf8, 0xf7, 0xe6, 0xe9, 0xbc, 0xb3, 0xa2, 0xad, 0x80, 0x8f, 0x9e, 0x91, 0xc9, 0xc6, 0xd7, 0xd8, 0xf5, 0xfa, 0xeb, 0xe4, 0xb1, 0xbe, 0xaf, 0xa0, 0x8d, 0x82, 0x93, 0x9c, 0x39, 0x36, 0x27, 0x28, 0x5, 0xa, 0x1b, 0x14, 0x41, 0x4e, 0x5f, 0x50, 0x7d, 0x72, 0x63, 0x6c},
+ {0x0, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, 0x90, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, 0x1d, 0xd, 0x3d, 0x2d, 0x5d, 0x4d, 0x7d, 0x6d, 0x9d, 0x8d, 0xbd, 0xad, 0xdd, 0xcd, 0xfd, 0xed, 0x3a, 0x2a, 0x1a, 0xa, 0x7a, 0x6a, 0x5a, 0x4a, 0xba, 0xaa, 0x9a, 0x8a, 0xfa, 0xea, 0xda, 0xca, 0x27, 0x37, 0x7, 0x17, 0x67, 0x77, 0x47, 0x57, 0xa7, 0xb7, 0x87, 0x97, 0xe7, 0xf7, 0xc7, 0xd7, 0x74, 0x64, 0x54, 0x44, 0x34, 0x24, 0x14, 0x4, 0xf4, 0xe4, 0xd4, 0xc4, 0xb4, 0xa4, 0x94, 0x84, 0x69, 0x79, 0x49, 0x59, 0x29, 0x39, 0x9, 0x19, 0xe9, 0xf9, 0xc9, 0xd9, 0xa9, 0xb9, 0x89, 0x99, 0x4e, 0x5e, 0x6e, 0x7e, 0xe, 0x1e, 0x2e, 0x3e, 0xce, 0xde, 0xee, 0xfe, 0x8e, 0x9e, 0xae, 0xbe, 0x53, 0x43, 0x73, 0x63, 0x13, 0x3, 0x33, 0x23, 0xd3, 0xc3, 0xf3, 0xe3, 0x93, 0x83, 0xb3, 0xa3, 0xe8, 0xf8, 0xc8, 0xd8, 0xa8, 0xb8, 0x88, 0x98, 0x68, 0x78, 0x48, 0x58, 0x28, 0x38, 0x8, 0x18, 0xf5, 0xe5, 0xd5, 0xc5, 0xb5, 0xa5, 0x95, 0x85, 0x75, 0x65, 0x55, 0x45, 0x35, 0x25, 0x15, 0x5, 0xd2, 0xc2, 0xf2, 0xe2, 0x92, 0x82, 0xb2, 0xa2, 0x52, 0x42, 0x72, 0x62, 0x12, 0x2, 0x32, 0x22, 0xcf, 0xdf, 0xef, 0xff, 0x8f, 0x9f, 0xaf, 0xbf, 0x4f, 0x5f, 0x6f, 0x7f, 0xf, 0x1f, 0x2f, 0x3f, 0x9c, 0x8c, 0xbc, 0xac, 0xdc, 0xcc, 0xfc, 0xec, 0x1c, 0xc, 0x3c, 0x2c, 0x5c, 0x4c, 0x7c, 0x6c, 0x81, 0x91, 0xa1, 0xb1, 0xc1, 0xd1, 0xe1, 0xf1, 0x1, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71, 0xa6, 0xb6, 0x86, 0x96, 0xe6, 0xf6, 0xc6, 0xd6, 0x26, 0x36, 0x6, 0x16, 0x66, 0x76, 0x46, 0x56, 0xbb, 0xab, 0x9b, 0x8b, 0xfb, 0xeb, 0xdb, 0xcb, 0x3b, 0x2b, 0x1b, 0xb, 0x7b, 0x6b, 0x5b, 0x4b},
+ {0x0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0xd, 0x1c, 0x2f, 0x3e, 0x49, 0x58, 0x6b, 0x7a, 0x85, 0x94, 0xa7, 0xb6, 0xc1, 0xd0, 0xe3, 0xf2, 0x1a, 0xb, 0x38, 0x29, 0x5e, 0x4f, 0x7c, 0x6d, 0x92, 0x83, 0xb0, 0xa1, 0xd6, 0xc7, 0xf4, 0xe5, 0x17, 0x6, 0x35, 0x24, 0x53, 0x42, 0x71, 0x60, 0x9f, 0x8e, 0xbd, 0xac, 0xdb, 0xca, 0xf9, 0xe8, 0x34, 0x25, 0x16, 0x7, 0x70, 0x61, 0x52, 0x43, 0xbc, 0xad, 0x9e, 0x8f, 0xf8, 0xe9, 0xda, 0xcb, 0x39, 0x28, 0x1b, 0xa, 0x7d, 0x6c, 0x5f, 0x4e, 0xb1, 0xa0, 0x93, 0x82, 0xf5, 0xe4, 0xd7, 0xc6, 0x2e, 0x3f, 0xc, 0x1d, 0x6a, 0x7b, 0x48, 0x59, 0xa6, 0xb7, 0x84, 0x95, 0xe2, 0xf3, 0xc0, 0xd1, 0x23, 0x32, 0x1, 0x10, 0x67, 0x76, 0x45, 0x54, 0xab, 0xba, 0x89, 0x98, 0xef, 0xfe, 0xcd, 0xdc, 0x68, 0x79, 0x4a, 0x5b, 0x2c, 0x3d, 0xe, 0x1f, 0xe0, 0xf1, 0xc2, 0xd3, 0xa4, 0xb5, 0x86, 0x97, 0x65, 0x74, 0x47, 0x56, 0x21, 0x30, 0x3, 0x12, 0xed, 0xfc, 0xcf, 0xde, 0xa9, 0xb8, 0x8b, 0x9a, 0x72, 0x63, 0x50, 0x41, 0x36, 0x27, 0x14, 0x5, 0xfa, 0xeb, 0xd8, 0xc9, 0xbe, 0xaf, 0x9c, 0x8d, 0x7f, 0x6e, 0x5d, 0x4c, 0x3b, 0x2a, 0x19, 0x8, 0xf7, 0xe6, 0xd5, 0xc4, 0xb3, 0xa2, 0x91, 0x80, 0x5c, 0x4d, 0x7e, 0x6f, 0x18, 0x9, 0x3a, 0x2b, 0xd4, 0xc5, 0xf6, 0xe7, 0x90, 0x81, 0xb2, 0xa3, 0x51, 0x40, 0x73, 0x62, 0x15, 0x4, 0x37, 0x26, 0xd9, 0xc8, 0xfb, 0xea, 0x9d, 0x8c, 0xbf, 0xae, 0x46, 0x57, 0x64, 0x75, 0x2, 0x13, 0x20, 0x31, 0xce, 0xdf, 0xec, 0xfd, 0x8a, 0x9b, 0xa8, 0xb9, 0x4b, 0x5a, 0x69, 0x78, 0xf, 0x1e, 0x2d, 0x3c, 0xc3, 0xd2, 0xe1, 0xf0, 0x87, 0x96, 0xa5, 0xb4},
+ {0x0, 0x12, 0x24, 0x36, 0x48, 0x5a, 0x6c, 0x7e, 0x90, 0x82, 0xb4, 0xa6, 0xd8, 0xca, 0xfc, 0xee, 0x3d, 0x2f, 0x19, 0xb, 0x75, 0x67, 0x51, 0x43, 0xad, 0xbf, 0x89, 0x9b, 0xe5, 0xf7, 0xc1, 0xd3, 0x7a, 0x68, 0x5e, 0x4c, 0x32, 0x20, 0x16, 0x4, 0xea, 0xf8, 0xce, 0xdc, 0xa2, 0xb0, 0x86, 0x94, 0x47, 0x55, 0x63, 0x71, 0xf, 0x1d, 0x2b, 0x39, 0xd7, 0xc5, 0xf3, 0xe1, 0x9f, 0x8d, 0xbb, 0xa9, 0xf4, 0xe6, 0xd0, 0xc2, 0xbc, 0xae, 0x98, 0x8a, 0x64, 0x76, 0x40, 0x52, 0x2c, 0x3e, 0x8, 0x1a, 0xc9, 0xdb, 0xed, 0xff, 0x81, 0x93, 0xa5, 0xb7, 0x59, 0x4b, 0x7d, 0x6f, 0x11, 0x3, 0x35, 0x27, 0x8e, 0x9c, 0xaa, 0xb8, 0xc6, 0xd4, 0xe2, 0xf0, 0x1e, 0xc, 0x3a, 0x28, 0x56, 0x44, 0x72, 0x60, 0xb3, 0xa1, 0x97, 0x85, 0xfb, 0xe9, 0xdf, 0xcd, 0x23, 0x31, 0x7, 0x15, 0x6b, 0x79, 0x4f, 0x5d, 0xf5, 0xe7, 0xd1, 0xc3, 0xbd, 0xaf, 0x99, 0x8b, 0x65, 0x77, 0x41, 0x53, 0x2d, 0x3f, 0x9, 0x1b, 0xc8, 0xda, 0xec, 0xfe, 0x80, 0x92, 0xa4, 0xb6, 0x58, 0x4a, 0x7c, 0x6e, 0x10, 0x2, 0x34, 0x26, 0x8f, 0x9d, 0xab, 0xb9, 0xc7, 0xd5, 0xe3, 0xf1, 0x1f, 0xd, 0x3b, 0x29, 0x57, 0x45, 0x73, 0x61, 0xb2, 0xa0, 0x96, 0x84, 0xfa, 0xe8, 0xde, 0xcc, 0x22, 0x30, 0x6, 0x14, 0x6a, 0x78, 0x4e, 0x5c, 0x1, 0x13, 0x25, 0x37, 0x49, 0x5b, 0x6d, 0x7f, 0x91, 0x83, 0xb5, 0xa7, 0xd9, 0xcb, 0xfd, 0xef, 0x3c, 0x2e, 0x18, 0xa, 0x74, 0x66, 0x50, 0x42, 0xac, 0xbe, 0x88, 0x9a, 0xe4, 0xf6, 0xc0, 0xd2, 0x7b, 0x69, 0x5f, 0x4d, 0x33, 0x21, 0x17, 0x5, 0xeb, 0xf9, 0xcf, 0xdd, 0xa3, 0xb1, 0x87, 0x95, 0x46, 0x54, 0x62, 0x70, 0xe, 0x1c, 0x2a, 0x38, 0xd6, 0xc4, 0xf2, 0xe0, 0x9e, 0x8c, 0xba, 0xa8},
+ {0x0, 0x13, 0x26, 0x35, 0x4c, 0x5f, 0x6a, 0x79, 0x98, 0x8b, 0xbe, 0xad, 0xd4, 0xc7, 0xf2, 0xe1, 0x2d, 0x3e, 0xb, 0x18, 0x61, 0x72, 0x47, 0x54, 0xb5, 0xa6, 0x93, 0x80, 0xf9, 0xea, 0xdf, 0xcc, 0x5a, 0x49, 0x7c, 0x6f, 0x16, 0x5, 0x30, 0x23, 0xc2, 0xd1, 0xe4, 0xf7, 0x8e, 0x9d, 0xa8, 0xbb, 0x77, 0x64, 0x51, 0x42, 0x3b, 0x28, 0x1d, 0xe, 0xef, 0xfc, 0xc9, 0xda, 0xa3, 0xb0, 0x85, 0x96, 0xb4, 0xa7, 0x92, 0x81, 0xf8, 0xeb, 0xde, 0xcd, 0x2c, 0x3f, 0xa, 0x19, 0x60, 0x73, 0x46, 0x55, 0x99, 0x8a, 0xbf, 0xac, 0xd5, 0xc6, 0xf3, 0xe0, 0x1, 0x12, 0x27, 0x34, 0x4d, 0x5e, 0x6b, 0x78, 0xee, 0xfd, 0xc8, 0xdb, 0xa2, 0xb1, 0x84, 0x97, 0x76, 0x65, 0x50, 0x43, 0x3a, 0x29, 0x1c, 0xf, 0xc3, 0xd0, 0xe5, 0xf6, 0x8f, 0x9c, 0xa9, 0xba, 0x5b, 0x48, 0x7d, 0x6e, 0x17, 0x4, 0x31, 0x22, 0x75, 0x66, 0x53, 0x40, 0x39, 0x2a, 0x1f, 0xc, 0xed, 0xfe, 0xcb, 0xd8, 0xa1, 0xb2, 0x87, 0x94, 0x58, 0x4b, 0x7e, 0x6d, 0x14, 0x7, 0x32, 0x21, 0xc0, 0xd3, 0xe6, 0xf5, 0x8c, 0x9f, 0xaa, 0xb9, 0x2f, 0x3c, 0x9, 0x1a, 0x63, 0x70, 0x45, 0x56, 0xb7, 0xa4, 0x91, 0x82, 0xfb, 0xe8, 0xdd, 0xce, 0x2, 0x11, 0x24, 0x37, 0x4e, 0x5d, 0x68, 0x7b, 0x9a, 0x89, 0xbc, 0xaf, 0xd6, 0xc5, 0xf0, 0xe3, 0xc1, 0xd2, 0xe7, 0xf4, 0x8d, 0x9e, 0xab, 0xb8, 0x59, 0x4a, 0x7f, 0x6c, 0x15, 0x6, 0x33, 0x20, 0xec, 0xff, 0xca, 0xd9, 0xa0, 0xb3, 0x86, 0x95, 0x74, 0x67, 0x52, 0x41, 0x38, 0x2b, 0x1e, 0xd, 0x9b, 0x88, 0xbd, 0xae, 0xd7, 0xc4, 0xf1, 0xe2, 0x3, 0x10, 0x25, 0x36, 0x4f, 0x5c, 0x69, 0x7a, 0xb6, 0xa5, 0x90, 0x83, 0xfa, 0xe9, 0xdc, 0xcf, 0x2e, 0x3d, 0x8, 0x1b, 0x62, 0x71, 0x44, 0x57},
+ {0x0, 0x14, 0x28, 0x3c, 0x50, 0x44, 0x78, 0x6c, 0xa0, 0xb4, 0x88, 0x9c, 0xf0, 0xe4, 0xd8, 0xcc, 0x5d, 0x49, 0x75, 0x61, 0xd, 0x19, 0x25, 0x31, 0xfd, 0xe9, 0xd5, 0xc1, 0xad, 0xb9, 0x85, 0x91, 0xba, 0xae, 0x92, 0x86, 0xea, 0xfe, 0xc2, 0xd6, 0x1a, 0xe, 0x32, 0x26, 0x4a, 0x5e, 0x62, 0x76, 0xe7, 0xf3, 0xcf, 0xdb, 0xb7, 0xa3, 0x9f, 0x8b, 0x47, 0x53, 0x6f, 0x7b, 0x17, 0x3, 0x3f, 0x2b, 0x69, 0x7d, 0x41, 0x55, 0x39, 0x2d, 0x11, 0x5, 0xc9, 0xdd, 0xe1, 0xf5, 0x99, 0x8d, 0xb1, 0xa5, 0x34, 0x20, 0x1c, 0x8, 0x64, 0x70, 0x4c, 0x58, 0x94, 0x80, 0xbc, 0xa8, 0xc4, 0xd0, 0xec, 0xf8, 0xd3, 0xc7, 0xfb, 0xef, 0x83, 0x97, 0xab, 0xbf, 0x73, 0x67, 0x5b, 0x4f, 0x23, 0x37, 0xb, 0x1f, 0x8e, 0x9a, 0xa6, 0xb2, 0xde, 0xca, 0xf6, 0xe2, 0x2e, 0x3a, 0x6, 0x12, 0x7e, 0x6a, 0x56, 0x42, 0xd2, 0xc6, 0xfa, 0xee, 0x82, 0x96, 0xaa, 0xbe, 0x72, 0x66, 0x5a, 0x4e, 0x22, 0x36, 0xa, 0x1e, 0x8f, 0x9b, 0xa7, 0xb3, 0xdf, 0xcb, 0xf7, 0xe3, 0x2f, 0x3b, 0x7, 0x13, 0x7f, 0x6b, 0x57, 0x43, 0x68, 0x7c, 0x40, 0x54, 0x38, 0x2c, 0x10, 0x4, 0xc8, 0xdc, 0xe0, 0xf4, 0x98, 0x8c, 0xb0, 0xa4, 0x35, 0x21, 0x1d, 0x9, 0x65, 0x71, 0x4d, 0x59, 0x95, 0x81, 0xbd, 0xa9, 0xc5, 0xd1, 0xed, 0xf9, 0xbb, 0xaf, 0x93, 0x87, 0xeb, 0xff, 0xc3, 0xd7, 0x1b, 0xf, 0x33, 0x27, 0x4b, 0x5f, 0x63, 0x77, 0xe6, 0xf2, 0xce, 0xda, 0xb6, 0xa2, 0x9e, 0x8a, 0x46, 0x52, 0x6e, 0x7a, 0x16, 0x2, 0x3e, 0x2a, 0x1, 0x15, 0x29, 0x3d, 0x51, 0x45, 0x79, 0x6d, 0xa1, 0xb5, 0x89, 0x9d, 0xf1, 0xe5, 0xd9, 0xcd, 0x5c, 0x48, 0x74, 0x60, 0xc, 0x18, 0x24, 0x30, 0xfc, 0xe8, 0xd4, 0xc0, 0xac, 0xb8, 0x84, 0x90},
+ {0x0, 0x15, 0x2a, 0x3f, 0x54, 0x41, 0x7e, 0x6b, 0xa8, 0xbd, 0x82, 0x97, 0xfc, 0xe9, 0xd6, 0xc3, 0x4d, 0x58, 0x67, 0x72, 0x19, 0xc, 0x33, 0x26, 0xe5, 0xf0, 0xcf, 0xda, 0xb1, 0xa4, 0x9b, 0x8e, 0x9a, 0x8f, 0xb0, 0xa5, 0xce, 0xdb, 0xe4, 0xf1, 0x32, 0x27, 0x18, 0xd, 0x66, 0x73, 0x4c, 0x59, 0xd7, 0xc2, 0xfd, 0xe8, 0x83, 0x96, 0xa9, 0xbc, 0x7f, 0x6a, 0x55, 0x40, 0x2b, 0x3e, 0x1, 0x14, 0x29, 0x3c, 0x3, 0x16, 0x7d, 0x68, 0x57, 0x42, 0x81, 0x94, 0xab, 0xbe, 0xd5, 0xc0, 0xff, 0xea, 0x64, 0x71, 0x4e, 0x5b, 0x30, 0x25, 0x1a, 0xf, 0xcc, 0xd9, 0xe6, 0xf3, 0x98, 0x8d, 0xb2, 0xa7, 0xb3, 0xa6, 0x99, 0x8c, 0xe7, 0xf2, 0xcd, 0xd8, 0x1b, 0xe, 0x31, 0x24, 0x4f, 0x5a, 0x65, 0x70, 0xfe, 0xeb, 0xd4, 0xc1, 0xaa, 0xbf, 0x80, 0x95, 0x56, 0x43, 0x7c, 0x69, 0x2, 0x17, 0x28, 0x3d, 0x52, 0x47, 0x78, 0x6d, 0x6, 0x13, 0x2c, 0x39, 0xfa, 0xef, 0xd0, 0xc5, 0xae, 0xbb, 0x84, 0x91, 0x1f, 0xa, 0x35, 0x20, 0x4b, 0x5e, 0x61, 0x74, 0xb7, 0xa2, 0x9d, 0x88, 0xe3, 0xf6, 0xc9, 0xdc, 0xc8, 0xdd, 0xe2, 0xf7, 0x9c, 0x89, 0xb6, 0xa3, 0x60, 0x75, 0x4a, 0x5f, 0x34, 0x21, 0x1e, 0xb, 0x85, 0x90, 0xaf, 0xba, 0xd1, 0xc4, 0xfb, 0xee, 0x2d, 0x38, 0x7, 0x12, 0x79, 0x6c, 0x53, 0x46, 0x7b, 0x6e, 0x51, 0x44, 0x2f, 0x3a, 0x5, 0x10, 0xd3, 0xc6, 0xf9, 0xec, 0x87, 0x92, 0xad, 0xb8, 0x36, 0x23, 0x1c, 0x9, 0x62, 0x77, 0x48, 0x5d, 0x9e, 0x8b, 0xb4, 0xa1, 0xca, 0xdf, 0xe0, 0xf5, 0xe1, 0xf4, 0xcb, 0xde, 0xb5, 0xa0, 0x9f, 0x8a, 0x49, 0x5c, 0x63, 0x76, 0x1d, 0x8, 0x37, 0x22, 0xac, 0xb9, 0x86, 0x93, 0xf8, 0xed, 0xd2, 0xc7, 0x4, 0x11, 0x2e, 0x3b, 0x50, 0x45, 0x7a, 0x6f},
+ {0x0, 0x16, 0x2c, 0x3a, 0x58, 0x4e, 0x74, 0x62, 0xb0, 0xa6, 0x9c, 0x8a, 0xe8, 0xfe, 0xc4, 0xd2, 0x7d, 0x6b, 0x51, 0x47, 0x25, 0x33, 0x9, 0x1f, 0xcd, 0xdb, 0xe1, 0xf7, 0x95, 0x83, 0xb9, 0xaf, 0xfa, 0xec, 0xd6, 0xc0, 0xa2, 0xb4, 0x8e, 0x98, 0x4a, 0x5c, 0x66, 0x70, 0x12, 0x4, 0x3e, 0x28, 0x87, 0x91, 0xab, 0xbd, 0xdf, 0xc9, 0xf3, 0xe5, 0x37, 0x21, 0x1b, 0xd, 0x6f, 0x79, 0x43, 0x55, 0xe9, 0xff, 0xc5, 0xd3, 0xb1, 0xa7, 0x9d, 0x8b, 0x59, 0x4f, 0x75, 0x63, 0x1, 0x17, 0x2d, 0x3b, 0x94, 0x82, 0xb8, 0xae, 0xcc, 0xda, 0xe0, 0xf6, 0x24, 0x32, 0x8, 0x1e, 0x7c, 0x6a, 0x50, 0x46, 0x13, 0x5, 0x3f, 0x29, 0x4b, 0x5d, 0x67, 0x71, 0xa3, 0xb5, 0x8f, 0x99, 0xfb, 0xed, 0xd7, 0xc1, 0x6e, 0x78, 0x42, 0x54, 0x36, 0x20, 0x1a, 0xc, 0xde, 0xc8, 0xf2, 0xe4, 0x86, 0x90, 0xaa, 0xbc, 0xcf, 0xd9, 0xe3, 0xf5, 0x97, 0x81, 0xbb, 0xad, 0x7f, 0x69, 0x53, 0x45, 0x27, 0x31, 0xb, 0x1d, 0xb2, 0xa4, 0x9e, 0x88, 0xea, 0xfc, 0xc6, 0xd0, 0x2, 0x14, 0x2e, 0x38, 0x5a, 0x4c, 0x76, 0x60, 0x35, 0x23, 0x19, 0xf, 0x6d, 0x7b, 0x41, 0x57, 0x85, 0x93, 0xa9, 0xbf, 0xdd, 0xcb, 0xf1, 0xe7, 0x48, 0x5e, 0x64, 0x72, 0x10, 0x6, 0x3c, 0x2a, 0xf8, 0xee, 0xd4, 0xc2, 0xa0, 0xb6, 0x8c, 0x9a, 0x26, 0x30, 0xa, 0x1c, 0x7e, 0x68, 0x52, 0x44, 0x96, 0x80, 0xba, 0xac, 0xce, 0xd8, 0xe2, 0xf4, 0x5b, 0x4d, 0x77, 0x61, 0x3, 0x15, 0x2f, 0x39, 0xeb, 0xfd, 0xc7, 0xd1, 0xb3, 0xa5, 0x9f, 0x89, 0xdc, 0xca, 0xf0, 0xe6, 0x84, 0x92, 0xa8, 0xbe, 0x6c, 0x7a, 0x40, 0x56, 0x34, 0x22, 0x18, 0xe, 0xa1, 0xb7, 0x8d, 0x9b, 0xf9, 0xef, 0xd5, 0xc3, 0x11, 0x7, 0x3d, 0x2b, 0x49, 0x5f, 0x65, 0x73},
+ {0x0, 0x17, 0x2e, 0x39, 0x5c, 0x4b, 0x72, 0x65, 0xb8, 0xaf, 0x96, 0x81, 0xe4, 0xf3, 0xca, 0xdd, 0x6d, 0x7a, 0x43, 0x54, 0x31, 0x26, 0x1f, 0x8, 0xd5, 0xc2, 0xfb, 0xec, 0x89, 0x9e, 0xa7, 0xb0, 0xda, 0xcd, 0xf4, 0xe3, 0x86, 0x91, 0xa8, 0xbf, 0x62, 0x75, 0x4c, 0x5b, 0x3e, 0x29, 0x10, 0x7, 0xb7, 0xa0, 0x99, 0x8e, 0xeb, 0xfc, 0xc5, 0xd2, 0xf, 0x18, 0x21, 0x36, 0x53, 0x44, 0x7d, 0x6a, 0xa9, 0xbe, 0x87, 0x90, 0xf5, 0xe2, 0xdb, 0xcc, 0x11, 0x6, 0x3f, 0x28, 0x4d, 0x5a, 0x63, 0x74, 0xc4, 0xd3, 0xea, 0xfd, 0x98, 0x8f, 0xb6, 0xa1, 0x7c, 0x6b, 0x52, 0x45, 0x20, 0x37, 0xe, 0x19, 0x73, 0x64, 0x5d, 0x4a, 0x2f, 0x38, 0x1, 0x16, 0xcb, 0xdc, 0xe5, 0xf2, 0x97, 0x80, 0xb9, 0xae, 0x1e, 0x9, 0x30, 0x27, 0x42, 0x55, 0x6c, 0x7b, 0xa6, 0xb1, 0x88, 0x9f, 0xfa, 0xed, 0xd4, 0xc3, 0x4f, 0x58, 0x61, 0x76, 0x13, 0x4, 0x3d, 0x2a, 0xf7, 0xe0, 0xd9, 0xce, 0xab, 0xbc, 0x85, 0x92, 0x22, 0x35, 0xc, 0x1b, 0x7e, 0x69, 0x50, 0x47, 0x9a, 0x8d, 0xb4, 0xa3, 0xc6, 0xd1, 0xe8, 0xff, 0x95, 0x82, 0xbb, 0xac, 0xc9, 0xde, 0xe7, 0xf0, 0x2d, 0x3a, 0x3, 0x14, 0x71, 0x66, 0x5f, 0x48, 0xf8, 0xef, 0xd6, 0xc1, 0xa4, 0xb3, 0x8a, 0x9d, 0x40, 0x57, 0x6e, 0x79, 0x1c, 0xb, 0x32, 0x25, 0xe6, 0xf1, 0xc8, 0xdf, 0xba, 0xad, 0x94, 0x83, 0x5e, 0x49, 0x70, 0x67, 0x2, 0x15, 0x2c, 0x3b, 0x8b, 0x9c, 0xa5, 0xb2, 0xd7, 0xc0, 0xf9, 0xee, 0x33, 0x24, 0x1d, 0xa, 0x6f, 0x78, 0x41, 0x56, 0x3c, 0x2b, 0x12, 0x5, 0x60, 0x77, 0x4e, 0x59, 0x84, 0x93, 0xaa, 0xbd, 0xd8, 0xcf, 0xf6, 0xe1, 0x51, 0x46, 0x7f, 0x68, 0xd, 0x1a, 0x23, 0x34, 0xe9, 0xfe, 0xc7, 0xd0, 0xb5, 0xa2, 0x9b, 0x8c},
+ {0x0, 0x18, 0x30, 0x28, 0x60, 0x78, 0x50, 0x48, 0xc0, 0xd8, 0xf0, 0xe8, 0xa0, 0xb8, 0x90, 0x88, 0x9d, 0x85, 0xad, 0xb5, 0xfd, 0xe5, 0xcd, 0xd5, 0x5d, 0x45, 0x6d, 0x75, 0x3d, 0x25, 0xd, 0x15, 0x27, 0x3f, 0x17, 0xf, 0x47, 0x5f, 0x77, 0x6f, 0xe7, 0xff, 0xd7, 0xcf, 0x87, 0x9f, 0xb7, 0xaf, 0xba, 0xa2, 0x8a, 0x92, 0xda, 0xc2, 0xea, 0xf2, 0x7a, 0x62, 0x4a, 0x52, 0x1a, 0x2, 0x2a, 0x32, 0x4e, 0x56, 0x7e, 0x66, 0x2e, 0x36, 0x1e, 0x6, 0x8e, 0x96, 0xbe, 0xa6, 0xee, 0xf6, 0xde, 0xc6, 0xd3, 0xcb, 0xe3, 0xfb, 0xb3, 0xab, 0x83, 0x9b, 0x13, 0xb, 0x23, 0x3b, 0x73, 0x6b, 0x43, 0x5b, 0x69, 0x71, 0x59, 0x41, 0x9, 0x11, 0x39, 0x21, 0xa9, 0xb1, 0x99, 0x81, 0xc9, 0xd1, 0xf9, 0xe1, 0xf4, 0xec, 0xc4, 0xdc, 0x94, 0x8c, 0xa4, 0xbc, 0x34, 0x2c, 0x4, 0x1c, 0x54, 0x4c, 0x64, 0x7c, 0x9c, 0x84, 0xac, 0xb4, 0xfc, 0xe4, 0xcc, 0xd4, 0x5c, 0x44, 0x6c, 0x74, 0x3c, 0x24, 0xc, 0x14, 0x1, 0x19, 0x31, 0x29, 0x61, 0x79, 0x51, 0x49, 0xc1, 0xd9, 0xf1, 0xe9, 0xa1, 0xb9, 0x91, 0x89, 0xbb, 0xa3, 0x8b, 0x93, 0xdb, 0xc3, 0xeb, 0xf3, 0x7b, 0x63, 0x4b, 0x53, 0x1b, 0x3, 0x2b, 0x33, 0x26, 0x3e, 0x16, 0xe, 0x46, 0x5e, 0x76, 0x6e, 0xe6, 0xfe, 0xd6, 0xce, 0x86, 0x9e, 0xb6, 0xae, 0xd2, 0xca, 0xe2, 0xfa, 0xb2, 0xaa, 0x82, 0x9a, 0x12, 0xa, 0x22, 0x3a, 0x72, 0x6a, 0x42, 0x5a, 0x4f, 0x57, 0x7f, 0x67, 0x2f, 0x37, 0x1f, 0x7, 0x8f, 0x97, 0xbf, 0xa7, 0xef, 0xf7, 0xdf, 0xc7, 0xf5, 0xed, 0xc5, 0xdd, 0x95, 0x8d, 0xa5, 0xbd, 0x35, 0x2d, 0x5, 0x1d, 0x55, 0x4d, 0x65, 0x7d, 0x68, 0x70, 0x58, 0x40, 0x8, 0x10, 0x38, 0x20, 0xa8, 0xb0, 0x98, 0x80, 0xc8, 0xd0, 0xf8, 0xe0},
+ {0x0, 0x19, 0x32, 0x2b, 0x64, 0x7d, 0x56, 0x4f, 0xc8, 0xd1, 0xfa, 0xe3, 0xac, 0xb5, 0x9e, 0x87, 0x8d, 0x94, 0xbf, 0xa6, 0xe9, 0xf0, 0xdb, 0xc2, 0x45, 0x5c, 0x77, 0x6e, 0x21, 0x38, 0x13, 0xa, 0x7, 0x1e, 0x35, 0x2c, 0x63, 0x7a, 0x51, 0x48, 0xcf, 0xd6, 0xfd, 0xe4, 0xab, 0xb2, 0x99, 0x80, 0x8a, 0x93, 0xb8, 0xa1, 0xee, 0xf7, 0xdc, 0xc5, 0x42, 0x5b, 0x70, 0x69, 0x26, 0x3f, 0x14, 0xd, 0xe, 0x17, 0x3c, 0x25, 0x6a, 0x73, 0x58, 0x41, 0xc6, 0xdf, 0xf4, 0xed, 0xa2, 0xbb, 0x90, 0x89, 0x83, 0x9a, 0xb1, 0xa8, 0xe7, 0xfe, 0xd5, 0xcc, 0x4b, 0x52, 0x79, 0x60, 0x2f, 0x36, 0x1d, 0x4, 0x9, 0x10, 0x3b, 0x22, 0x6d, 0x74, 0x5f, 0x46, 0xc1, 0xd8, 0xf3, 0xea, 0xa5, 0xbc, 0x97, 0x8e, 0x84, 0x9d, 0xb6, 0xaf, 0xe0, 0xf9, 0xd2, 0xcb, 0x4c, 0x55, 0x7e, 0x67, 0x28, 0x31, 0x1a, 0x3, 0x1c, 0x5, 0x2e, 0x37, 0x78, 0x61, 0x4a, 0x53, 0xd4, 0xcd, 0xe6, 0xff, 0xb0, 0xa9, 0x82, 0x9b, 0x91, 0x88, 0xa3, 0xba, 0xf5, 0xec, 0xc7, 0xde, 0x59, 0x40, 0x6b, 0x72, 0x3d, 0x24, 0xf, 0x16, 0x1b, 0x2, 0x29, 0x30, 0x7f, 0x66, 0x4d, 0x54, 0xd3, 0xca, 0xe1, 0xf8, 0xb7, 0xae, 0x85, 0x9c, 0x96, 0x8f, 0xa4, 0xbd, 0xf2, 0xeb, 0xc0, 0xd9, 0x5e, 0x47, 0x6c, 0x75, 0x3a, 0x23, 0x8, 0x11, 0x12, 0xb, 0x20, 0x39, 0x76, 0x6f, 0x44, 0x5d, 0xda, 0xc3, 0xe8, 0xf1, 0xbe, 0xa7, 0x8c, 0x95, 0x9f, 0x86, 0xad, 0xb4, 0xfb, 0xe2, 0xc9, 0xd0, 0x57, 0x4e, 0x65, 0x7c, 0x33, 0x2a, 0x1, 0x18, 0x15, 0xc, 0x27, 0x3e, 0x71, 0x68, 0x43, 0x5a, 0xdd, 0xc4, 0xef, 0xf6, 0xb9, 0xa0, 0x8b, 0x92, 0x98, 0x81, 0xaa, 0xb3, 0xfc, 0xe5, 0xce, 0xd7, 0x50, 0x49, 0x62, 0x7b, 0x34, 0x2d, 0x6, 0x1f},
+ {0x0, 0x1a, 0x34, 0x2e, 0x68, 0x72, 0x5c, 0x46, 0xd0, 0xca, 0xe4, 0xfe, 0xb8, 0xa2, 0x8c, 0x96, 0xbd, 0xa7, 0x89, 0x93, 0xd5, 0xcf, 0xe1, 0xfb, 0x6d, 0x77, 0x59, 0x43, 0x5, 0x1f, 0x31, 0x2b, 0x67, 0x7d, 0x53, 0x49, 0xf, 0x15, 0x3b, 0x21, 0xb7, 0xad, 0x83, 0x99, 0xdf, 0xc5, 0xeb, 0xf1, 0xda, 0xc0, 0xee, 0xf4, 0xb2, 0xa8, 0x86, 0x9c, 0xa, 0x10, 0x3e, 0x24, 0x62, 0x78, 0x56, 0x4c, 0xce, 0xd4, 0xfa, 0xe0, 0xa6, 0xbc, 0x92, 0x88, 0x1e, 0x4, 0x2a, 0x30, 0x76, 0x6c, 0x42, 0x58, 0x73, 0x69, 0x47, 0x5d, 0x1b, 0x1, 0x2f, 0x35, 0xa3, 0xb9, 0x97, 0x8d, 0xcb, 0xd1, 0xff, 0xe5, 0xa9, 0xb3, 0x9d, 0x87, 0xc1, 0xdb, 0xf5, 0xef, 0x79, 0x63, 0x4d, 0x57, 0x11, 0xb, 0x25, 0x3f, 0x14, 0xe, 0x20, 0x3a, 0x7c, 0x66, 0x48, 0x52, 0xc4, 0xde, 0xf0, 0xea, 0xac, 0xb6, 0x98, 0x82, 0x81, 0x9b, 0xb5, 0xaf, 0xe9, 0xf3, 0xdd, 0xc7, 0x51, 0x4b, 0x65, 0x7f, 0x39, 0x23, 0xd, 0x17, 0x3c, 0x26, 0x8, 0x12, 0x54, 0x4e, 0x60, 0x7a, 0xec, 0xf6, 0xd8, 0xc2, 0x84, 0x9e, 0xb0, 0xaa, 0xe6, 0xfc, 0xd2, 0xc8, 0x8e, 0x94, 0xba, 0xa0, 0x36, 0x2c, 0x2, 0x18, 0x5e, 0x44, 0x6a, 0x70, 0x5b, 0x41, 0x6f, 0x75, 0x33, 0x29, 0x7, 0x1d, 0x8b, 0x91, 0xbf, 0xa5, 0xe3, 0xf9, 0xd7, 0xcd, 0x4f, 0x55, 0x7b, 0x61, 0x27, 0x3d, 0x13, 0x9, 0x9f, 0x85, 0xab, 0xb1, 0xf7, 0xed, 0xc3, 0xd9, 0xf2, 0xe8, 0xc6, 0xdc, 0x9a, 0x80, 0xae, 0xb4, 0x22, 0x38, 0x16, 0xc, 0x4a, 0x50, 0x7e, 0x64, 0x28, 0x32, 0x1c, 0x6, 0x40, 0x5a, 0x74, 0x6e, 0xf8, 0xe2, 0xcc, 0xd6, 0x90, 0x8a, 0xa4, 0xbe, 0x95, 0x8f, 0xa1, 0xbb, 0xfd, 0xe7, 0xc9, 0xd3, 0x45, 0x5f, 0x71, 0x6b, 0x2d, 0x37, 0x19, 0x3},
+ {0x0, 0x1b, 0x36, 0x2d, 0x6c, 0x77, 0x5a, 0x41, 0xd8, 0xc3, 0xee, 0xf5, 0xb4, 0xaf, 0x82, 0x99, 0xad, 0xb6, 0x9b, 0x80, 0xc1, 0xda, 0xf7, 0xec, 0x75, 0x6e, 0x43, 0x58, 0x19, 0x2, 0x2f, 0x34, 0x47, 0x5c, 0x71, 0x6a, 0x2b, 0x30, 0x1d, 0x6, 0x9f, 0x84, 0xa9, 0xb2, 0xf3, 0xe8, 0xc5, 0xde, 0xea, 0xf1, 0xdc, 0xc7, 0x86, 0x9d, 0xb0, 0xab, 0x32, 0x29, 0x4, 0x1f, 0x5e, 0x45, 0x68, 0x73, 0x8e, 0x95, 0xb8, 0xa3, 0xe2, 0xf9, 0xd4, 0xcf, 0x56, 0x4d, 0x60, 0x7b, 0x3a, 0x21, 0xc, 0x17, 0x23, 0x38, 0x15, 0xe, 0x4f, 0x54, 0x79, 0x62, 0xfb, 0xe0, 0xcd, 0xd6, 0x97, 0x8c, 0xa1, 0xba, 0xc9, 0xd2, 0xff, 0xe4, 0xa5, 0xbe, 0x93, 0x88, 0x11, 0xa, 0x27, 0x3c, 0x7d, 0x66, 0x4b, 0x50, 0x64, 0x7f, 0x52, 0x49, 0x8, 0x13, 0x3e, 0x25, 0xbc, 0xa7, 0x8a, 0x91, 0xd0, 0xcb, 0xe6, 0xfd, 0x1, 0x1a, 0x37, 0x2c, 0x6d, 0x76, 0x5b, 0x40, 0xd9, 0xc2, 0xef, 0xf4, 0xb5, 0xae, 0x83, 0x98, 0xac, 0xb7, 0x9a, 0x81, 0xc0, 0xdb, 0xf6, 0xed, 0x74, 0x6f, 0x42, 0x59, 0x18, 0x3, 0x2e, 0x35, 0x46, 0x5d, 0x70, 0x6b, 0x2a, 0x31, 0x1c, 0x7, 0x9e, 0x85, 0xa8, 0xb3, 0xf2, 0xe9, 0xc4, 0xdf, 0xeb, 0xf0, 0xdd, 0xc6, 0x87, 0x9c, 0xb1, 0xaa, 0x33, 0x28, 0x5, 0x1e, 0x5f, 0x44, 0x69, 0x72, 0x8f, 0x94, 0xb9, 0xa2, 0xe3, 0xf8, 0xd5, 0xce, 0x57, 0x4c, 0x61, 0x7a, 0x3b, 0x20, 0xd, 0x16, 0x22, 0x39, 0x14, 0xf, 0x4e, 0x55, 0x78, 0x63, 0xfa, 0xe1, 0xcc, 0xd7, 0x96, 0x8d, 0xa0, 0xbb, 0xc8, 0xd3, 0xfe, 0xe5, 0xa4, 0xbf, 0x92, 0x89, 0x10, 0xb, 0x26, 0x3d, 0x7c, 0x67, 0x4a, 0x51, 0x65, 0x7e, 0x53, 0x48, 0x9, 0x12, 0x3f, 0x24, 0xbd, 0xa6, 0x8b, 0x90, 0xd1, 0xca, 0xe7, 0xfc},
+ {0x0, 0x1c, 0x38, 0x24, 0x70, 0x6c, 0x48, 0x54, 0xe0, 0xfc, 0xd8, 0xc4, 0x90, 0x8c, 0xa8, 0xb4, 0xdd, 0xc1, 0xe5, 0xf9, 0xad, 0xb1, 0x95, 0x89, 0x3d, 0x21, 0x5, 0x19, 0x4d, 0x51, 0x75, 0x69, 0xa7, 0xbb, 0x9f, 0x83, 0xd7, 0xcb, 0xef, 0xf3, 0x47, 0x5b, 0x7f, 0x63, 0x37, 0x2b, 0xf, 0x13, 0x7a, 0x66, 0x42, 0x5e, 0xa, 0x16, 0x32, 0x2e, 0x9a, 0x86, 0xa2, 0xbe, 0xea, 0xf6, 0xd2, 0xce, 0x53, 0x4f, 0x6b, 0x77, 0x23, 0x3f, 0x1b, 0x7, 0xb3, 0xaf, 0x8b, 0x97, 0xc3, 0xdf, 0xfb, 0xe7, 0x8e, 0x92, 0xb6, 0xaa, 0xfe, 0xe2, 0xc6, 0xda, 0x6e, 0x72, 0x56, 0x4a, 0x1e, 0x2, 0x26, 0x3a, 0xf4, 0xe8, 0xcc, 0xd0, 0x84, 0x98, 0xbc, 0xa0, 0x14, 0x8, 0x2c, 0x30, 0x64, 0x78, 0x5c, 0x40, 0x29, 0x35, 0x11, 0xd, 0x59, 0x45, 0x61, 0x7d, 0xc9, 0xd5, 0xf1, 0xed, 0xb9, 0xa5, 0x81, 0x9d, 0xa6, 0xba, 0x9e, 0x82, 0xd6, 0xca, 0xee, 0xf2, 0x46, 0x5a, 0x7e, 0x62, 0x36, 0x2a, 0xe, 0x12, 0x7b, 0x67, 0x43, 0x5f, 0xb, 0x17, 0x33, 0x2f, 0x9b, 0x87, 0xa3, 0xbf, 0xeb, 0xf7, 0xd3, 0xcf, 0x1, 0x1d, 0x39, 0x25, 0x71, 0x6d, 0x49, 0x55, 0xe1, 0xfd, 0xd9, 0xc5, 0x91, 0x8d, 0xa9, 0xb5, 0xdc, 0xc0, 0xe4, 0xf8, 0xac, 0xb0, 0x94, 0x88, 0x3c, 0x20, 0x4, 0x18, 0x4c, 0x50, 0x74, 0x68, 0xf5, 0xe9, 0xcd, 0xd1, 0x85, 0x99, 0xbd, 0xa1, 0x15, 0x9, 0x2d, 0x31, 0x65, 0x79, 0x5d, 0x41, 0x28, 0x34, 0x10, 0xc, 0x58, 0x44, 0x60, 0x7c, 0xc8, 0xd4, 0xf0, 0xec, 0xb8, 0xa4, 0x80, 0x9c, 0x52, 0x4e, 0x6a, 0x76, 0x22, 0x3e, 0x1a, 0x6, 0xb2, 0xae, 0x8a, 0x96, 0xc2, 0xde, 0xfa, 0xe6, 0x8f, 0x93, 0xb7, 0xab, 0xff, 0xe3, 0xc7, 0xdb, 0x6f, 0x73, 0x57, 0x4b, 0x1f, 0x3, 0x27, 0x3b},
+ {0x0, 0x1d, 0x3a, 0x27, 0x74, 0x69, 0x4e, 0x53, 0xe8, 0xf5, 0xd2, 0xcf, 0x9c, 0x81, 0xa6, 0xbb, 0xcd, 0xd0, 0xf7, 0xea, 0xb9, 0xa4, 0x83, 0x9e, 0x25, 0x38, 0x1f, 0x2, 0x51, 0x4c, 0x6b, 0x76, 0x87, 0x9a, 0xbd, 0xa0, 0xf3, 0xee, 0xc9, 0xd4, 0x6f, 0x72, 0x55, 0x48, 0x1b, 0x6, 0x21, 0x3c, 0x4a, 0x57, 0x70, 0x6d, 0x3e, 0x23, 0x4, 0x19, 0xa2, 0xbf, 0x98, 0x85, 0xd6, 0xcb, 0xec, 0xf1, 0x13, 0xe, 0x29, 0x34, 0x67, 0x7a, 0x5d, 0x40, 0xfb, 0xe6, 0xc1, 0xdc, 0x8f, 0x92, 0xb5, 0xa8, 0xde, 0xc3, 0xe4, 0xf9, 0xaa, 0xb7, 0x90, 0x8d, 0x36, 0x2b, 0xc, 0x11, 0x42, 0x5f, 0x78, 0x65, 0x94, 0x89, 0xae, 0xb3, 0xe0, 0xfd, 0xda, 0xc7, 0x7c, 0x61, 0x46, 0x5b, 0x8, 0x15, 0x32, 0x2f, 0x59, 0x44, 0x63, 0x7e, 0x2d, 0x30, 0x17, 0xa, 0xb1, 0xac, 0x8b, 0x96, 0xc5, 0xd8, 0xff, 0xe2, 0x26, 0x3b, 0x1c, 0x1, 0x52, 0x4f, 0x68, 0x75, 0xce, 0xd3, 0xf4, 0xe9, 0xba, 0xa7, 0x80, 0x9d, 0xeb, 0xf6, 0xd1, 0xcc, 0x9f, 0x82, 0xa5, 0xb8, 0x3, 0x1e, 0x39, 0x24, 0x77, 0x6a, 0x4d, 0x50, 0xa1, 0xbc, 0x9b, 0x86, 0xd5, 0xc8, 0xef, 0xf2, 0x49, 0x54, 0x73, 0x6e, 0x3d, 0x20, 0x7, 0x1a, 0x6c, 0x71, 0x56, 0x4b, 0x18, 0x5, 0x22, 0x3f, 0x84, 0x99, 0xbe, 0xa3, 0xf0, 0xed, 0xca, 0xd7, 0x35, 0x28, 0xf, 0x12, 0x41, 0x5c, 0x7b, 0x66, 0xdd, 0xc0, 0xe7, 0xfa, 0xa9, 0xb4, 0x93, 0x8e, 0xf8, 0xe5, 0xc2, 0xdf, 0x8c, 0x91, 0xb6, 0xab, 0x10, 0xd, 0x2a, 0x37, 0x64, 0x79, 0x5e, 0x43, 0xb2, 0xaf, 0x88, 0x95, 0xc6, 0xdb, 0xfc, 0xe1, 0x5a, 0x47, 0x60, 0x7d, 0x2e, 0x33, 0x14, 0x9, 0x7f, 0x62, 0x45, 0x58, 0xb, 0x16, 0x31, 0x2c, 0x97, 0x8a, 0xad, 0xb0, 0xe3, 0xfe, 0xd9, 0xc4},
+ {0x0, 0x1e, 0x3c, 0x22, 0x78, 0x66, 0x44, 0x5a, 0xf0, 0xee, 0xcc, 0xd2, 0x88, 0x96, 0xb4, 0xaa, 0xfd, 0xe3, 0xc1, 0xdf, 0x85, 0x9b, 0xb9, 0xa7, 0xd, 0x13, 0x31, 0x2f, 0x75, 0x6b, 0x49, 0x57, 0xe7, 0xf9, 0xdb, 0xc5, 0x9f, 0x81, 0xa3, 0xbd, 0x17, 0x9, 0x2b, 0x35, 0x6f, 0x71, 0x53, 0x4d, 0x1a, 0x4, 0x26, 0x38, 0x62, 0x7c, 0x5e, 0x40, 0xea, 0xf4, 0xd6, 0xc8, 0x92, 0x8c, 0xae, 0xb0, 0xd3, 0xcd, 0xef, 0xf1, 0xab, 0xb5, 0x97, 0x89, 0x23, 0x3d, 0x1f, 0x1, 0x5b, 0x45, 0x67, 0x79, 0x2e, 0x30, 0x12, 0xc, 0x56, 0x48, 0x6a, 0x74, 0xde, 0xc0, 0xe2, 0xfc, 0xa6, 0xb8, 0x9a, 0x84, 0x34, 0x2a, 0x8, 0x16, 0x4c, 0x52, 0x70, 0x6e, 0xc4, 0xda, 0xf8, 0xe6, 0xbc, 0xa2, 0x80, 0x9e, 0xc9, 0xd7, 0xf5, 0xeb, 0xb1, 0xaf, 0x8d, 0x93, 0x39, 0x27, 0x5, 0x1b, 0x41, 0x5f, 0x7d, 0x63, 0xbb, 0xa5, 0x87, 0x99, 0xc3, 0xdd, 0xff, 0xe1, 0x4b, 0x55, 0x77, 0x69, 0x33, 0x2d, 0xf, 0x11, 0x46, 0x58, 0x7a, 0x64, 0x3e, 0x20, 0x2, 0x1c, 0xb6, 0xa8, 0x8a, 0x94, 0xce, 0xd0, 0xf2, 0xec, 0x5c, 0x42, 0x60, 0x7e, 0x24, 0x3a, 0x18, 0x6, 0xac, 0xb2, 0x90, 0x8e, 0xd4, 0xca, 0xe8, 0xf6, 0xa1, 0xbf, 0x9d, 0x83, 0xd9, 0xc7, 0xe5, 0xfb, 0x51, 0x4f, 0x6d, 0x73, 0x29, 0x37, 0x15, 0xb, 0x68, 0x76, 0x54, 0x4a, 0x10, 0xe, 0x2c, 0x32, 0x98, 0x86, 0xa4, 0xba, 0xe0, 0xfe, 0xdc, 0xc2, 0x95, 0x8b, 0xa9, 0xb7, 0xed, 0xf3, 0xd1, 0xcf, 0x65, 0x7b, 0x59, 0x47, 0x1d, 0x3, 0x21, 0x3f, 0x8f, 0x91, 0xb3, 0xad, 0xf7, 0xe9, 0xcb, 0xd5, 0x7f, 0x61, 0x43, 0x5d, 0x7, 0x19, 0x3b, 0x25, 0x72, 0x6c, 0x4e, 0x50, 0xa, 0x14, 0x36, 0x28, 0x82, 0x9c, 0xbe, 0xa0, 0xfa, 0xe4, 0xc6, 0xd8},
+ {0x0, 0x1f, 0x3e, 0x21, 0x7c, 0x63, 0x42, 0x5d, 0xf8, 0xe7, 0xc6, 0xd9, 0x84, 0x9b, 0xba, 0xa5, 0xed, 0xf2, 0xd3, 0xcc, 0x91, 0x8e, 0xaf, 0xb0, 0x15, 0xa, 0x2b, 0x34, 0x69, 0x76, 0x57, 0x48, 0xc7, 0xd8, 0xf9, 0xe6, 0xbb, 0xa4, 0x85, 0x9a, 0x3f, 0x20, 0x1, 0x1e, 0x43, 0x5c, 0x7d, 0x62, 0x2a, 0x35, 0x14, 0xb, 0x56, 0x49, 0x68, 0x77, 0xd2, 0xcd, 0xec, 0xf3, 0xae, 0xb1, 0x90, 0x8f, 0x93, 0x8c, 0xad, 0xb2, 0xef, 0xf0, 0xd1, 0xce, 0x6b, 0x74, 0x55, 0x4a, 0x17, 0x8, 0x29, 0x36, 0x7e, 0x61, 0x40, 0x5f, 0x2, 0x1d, 0x3c, 0x23, 0x86, 0x99, 0xb8, 0xa7, 0xfa, 0xe5, 0xc4, 0xdb, 0x54, 0x4b, 0x6a, 0x75, 0x28, 0x37, 0x16, 0x9, 0xac, 0xb3, 0x92, 0x8d, 0xd0, 0xcf, 0xee, 0xf1, 0xb9, 0xa6, 0x87, 0x98, 0xc5, 0xda, 0xfb, 0xe4, 0x41, 0x5e, 0x7f, 0x60, 0x3d, 0x22, 0x3, 0x1c, 0x3b, 0x24, 0x5, 0x1a, 0x47, 0x58, 0x79, 0x66, 0xc3, 0xdc, 0xfd, 0xe2, 0xbf, 0xa0, 0x81, 0x9e, 0xd6, 0xc9, 0xe8, 0xf7, 0xaa, 0xb5, 0x94, 0x8b, 0x2e, 0x31, 0x10, 0xf, 0x52, 0x4d, 0x6c, 0x73, 0xfc, 0xe3, 0xc2, 0xdd, 0x80, 0x9f, 0xbe, 0xa1, 0x4, 0x1b, 0x3a, 0x25, 0x78, 0x67, 0x46, 0x59, 0x11, 0xe, 0x2f, 0x30, 0x6d, 0x72, 0x53, 0x4c, 0xe9, 0xf6, 0xd7, 0xc8, 0x95, 0x8a, 0xab, 0xb4, 0xa8, 0xb7, 0x96, 0x89, 0xd4, 0xcb, 0xea, 0xf5, 0x50, 0x4f, 0x6e, 0x71, 0x2c, 0x33, 0x12, 0xd, 0x45, 0x5a, 0x7b, 0x64, 0x39, 0x26, 0x7, 0x18, 0xbd, 0xa2, 0x83, 0x9c, 0xc1, 0xde, 0xff, 0xe0, 0x6f, 0x70, 0x51, 0x4e, 0x13, 0xc, 0x2d, 0x32, 0x97, 0x88, 0xa9, 0xb6, 0xeb, 0xf4, 0xd5, 0xca, 0x82, 0x9d, 0xbc, 0xa3, 0xfe, 0xe1, 0xc0, 0xdf, 0x7a, 0x65, 0x44, 0x5b, 0x6, 0x19, 0x38, 0x27},
+ {0x0, 0x20, 0x40, 0x60, 0x80, 0xa0, 0xc0, 0xe0, 0x1d, 0x3d, 0x5d, 0x7d, 0x9d, 0xbd, 0xdd, 0xfd, 0x3a, 0x1a, 0x7a, 0x5a, 0xba, 0x9a, 0xfa, 0xda, 0x27, 0x7, 0x67, 0x47, 0xa7, 0x87, 0xe7, 0xc7, 0x74, 0x54, 0x34, 0x14, 0xf4, 0xd4, 0xb4, 0x94, 0x69, 0x49, 0x29, 0x9, 0xe9, 0xc9, 0xa9, 0x89, 0x4e, 0x6e, 0xe, 0x2e, 0xce, 0xee, 0x8e, 0xae, 0x53, 0x73, 0x13, 0x33, 0xd3, 0xf3, 0x93, 0xb3, 0xe8, 0xc8, 0xa8, 0x88, 0x68, 0x48, 0x28, 0x8, 0xf5, 0xd5, 0xb5, 0x95, 0x75, 0x55, 0x35, 0x15, 0xd2, 0xf2, 0x92, 0xb2, 0x52, 0x72, 0x12, 0x32, 0xcf, 0xef, 0x8f, 0xaf, 0x4f, 0x6f, 0xf, 0x2f, 0x9c, 0xbc, 0xdc, 0xfc, 0x1c, 0x3c, 0x5c, 0x7c, 0x81, 0xa1, 0xc1, 0xe1, 0x1, 0x21, 0x41, 0x61, 0xa6, 0x86, 0xe6, 0xc6, 0x26, 0x6, 0x66, 0x46, 0xbb, 0x9b, 0xfb, 0xdb, 0x3b, 0x1b, 0x7b, 0x5b, 0xcd, 0xed, 0x8d, 0xad, 0x4d, 0x6d, 0xd, 0x2d, 0xd0, 0xf0, 0x90, 0xb0, 0x50, 0x70, 0x10, 0x30, 0xf7, 0xd7, 0xb7, 0x97, 0x77, 0x57, 0x37, 0x17, 0xea, 0xca, 0xaa, 0x8a, 0x6a, 0x4a, 0x2a, 0xa, 0xb9, 0x99, 0xf9, 0xd9, 0x39, 0x19, 0x79, 0x59, 0xa4, 0x84, 0xe4, 0xc4, 0x24, 0x4, 0x64, 0x44, 0x83, 0xa3, 0xc3, 0xe3, 0x3, 0x23, 0x43, 0x63, 0x9e, 0xbe, 0xde, 0xfe, 0x1e, 0x3e, 0x5e, 0x7e, 0x25, 0x5, 0x65, 0x45, 0xa5, 0x85, 0xe5, 0xc5, 0x38, 0x18, 0x78, 0x58, 0xb8, 0x98, 0xf8, 0xd8, 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0xbf, 0xdf, 0xff, 0x2, 0x22, 0x42, 0x62, 0x82, 0xa2, 0xc2, 0xe2, 0x51, 0x71, 0x11, 0x31, 0xd1, 0xf1, 0x91, 0xb1, 0x4c, 0x6c, 0xc, 0x2c, 0xcc, 0xec, 0x8c, 0xac, 0x6b, 0x4b, 0x2b, 0xb, 0xeb, 0xcb, 0xab, 0x8b, 0x76, 0x56, 0x36, 0x16, 0xf6, 0xd6, 0xb6, 0x96},
+ {0x0, 0x21, 0x42, 0x63, 0x84, 0xa5, 0xc6, 0xe7, 0x15, 0x34, 0x57, 0x76, 0x91, 0xb0, 0xd3, 0xf2, 0x2a, 0xb, 0x68, 0x49, 0xae, 0x8f, 0xec, 0xcd, 0x3f, 0x1e, 0x7d, 0x5c, 0xbb, 0x9a, 0xf9, 0xd8, 0x54, 0x75, 0x16, 0x37, 0xd0, 0xf1, 0x92, 0xb3, 0x41, 0x60, 0x3, 0x22, 0xc5, 0xe4, 0x87, 0xa6, 0x7e, 0x5f, 0x3c, 0x1d, 0xfa, 0xdb, 0xb8, 0x99, 0x6b, 0x4a, 0x29, 0x8, 0xef, 0xce, 0xad, 0x8c, 0xa8, 0x89, 0xea, 0xcb, 0x2c, 0xd, 0x6e, 0x4f, 0xbd, 0x9c, 0xff, 0xde, 0x39, 0x18, 0x7b, 0x5a, 0x82, 0xa3, 0xc0, 0xe1, 0x6, 0x27, 0x44, 0x65, 0x97, 0xb6, 0xd5, 0xf4, 0x13, 0x32, 0x51, 0x70, 0xfc, 0xdd, 0xbe, 0x9f, 0x78, 0x59, 0x3a, 0x1b, 0xe9, 0xc8, 0xab, 0x8a, 0x6d, 0x4c, 0x2f, 0xe, 0xd6, 0xf7, 0x94, 0xb5, 0x52, 0x73, 0x10, 0x31, 0xc3, 0xe2, 0x81, 0xa0, 0x47, 0x66, 0x5, 0x24, 0x4d, 0x6c, 0xf, 0x2e, 0xc9, 0xe8, 0x8b, 0xaa, 0x58, 0x79, 0x1a, 0x3b, 0xdc, 0xfd, 0x9e, 0xbf, 0x67, 0x46, 0x25, 0x4, 0xe3, 0xc2, 0xa1, 0x80, 0x72, 0x53, 0x30, 0x11, 0xf6, 0xd7, 0xb4, 0x95, 0x19, 0x38, 0x5b, 0x7a, 0x9d, 0xbc, 0xdf, 0xfe, 0xc, 0x2d, 0x4e, 0x6f, 0x88, 0xa9, 0xca, 0xeb, 0x33, 0x12, 0x71, 0x50, 0xb7, 0x96, 0xf5, 0xd4, 0x26, 0x7, 0x64, 0x45, 0xa2, 0x83, 0xe0, 0xc1, 0xe5, 0xc4, 0xa7, 0x86, 0x61, 0x40, 0x23, 0x2, 0xf0, 0xd1, 0xb2, 0x93, 0x74, 0x55, 0x36, 0x17, 0xcf, 0xee, 0x8d, 0xac, 0x4b, 0x6a, 0x9, 0x28, 0xda, 0xfb, 0x98, 0xb9, 0x5e, 0x7f, 0x1c, 0x3d, 0xb1, 0x90, 0xf3, 0xd2, 0x35, 0x14, 0x77, 0x56, 0xa4, 0x85, 0xe6, 0xc7, 0x20, 0x1, 0x62, 0x43, 0x9b, 0xba, 0xd9, 0xf8, 0x1f, 0x3e, 0x5d, 0x7c, 0x8e, 0xaf, 0xcc, 0xed, 0xa, 0x2b, 0x48, 0x69},
+ {0x0, 0x22, 0x44, 0x66, 0x88, 0xaa, 0xcc, 0xee, 0xd, 0x2f, 0x49, 0x6b, 0x85, 0xa7, 0xc1, 0xe3, 0x1a, 0x38, 0x5e, 0x7c, 0x92, 0xb0, 0xd6, 0xf4, 0x17, 0x35, 0x53, 0x71, 0x9f, 0xbd, 0xdb, 0xf9, 0x34, 0x16, 0x70, 0x52, 0xbc, 0x9e, 0xf8, 0xda, 0x39, 0x1b, 0x7d, 0x5f, 0xb1, 0x93, 0xf5, 0xd7, 0x2e, 0xc, 0x6a, 0x48, 0xa6, 0x84, 0xe2, 0xc0, 0x23, 0x1, 0x67, 0x45, 0xab, 0x89, 0xef, 0xcd, 0x68, 0x4a, 0x2c, 0xe, 0xe0, 0xc2, 0xa4, 0x86, 0x65, 0x47, 0x21, 0x3, 0xed, 0xcf, 0xa9, 0x8b, 0x72, 0x50, 0x36, 0x14, 0xfa, 0xd8, 0xbe, 0x9c, 0x7f, 0x5d, 0x3b, 0x19, 0xf7, 0xd5, 0xb3, 0x91, 0x5c, 0x7e, 0x18, 0x3a, 0xd4, 0xf6, 0x90, 0xb2, 0x51, 0x73, 0x15, 0x37, 0xd9, 0xfb, 0x9d, 0xbf, 0x46, 0x64, 0x2, 0x20, 0xce, 0xec, 0x8a, 0xa8, 0x4b, 0x69, 0xf, 0x2d, 0xc3, 0xe1, 0x87, 0xa5, 0xd0, 0xf2, 0x94, 0xb6, 0x58, 0x7a, 0x1c, 0x3e, 0xdd, 0xff, 0x99, 0xbb, 0x55, 0x77, 0x11, 0x33, 0xca, 0xe8, 0x8e, 0xac, 0x42, 0x60, 0x6, 0x24, 0xc7, 0xe5, 0x83, 0xa1, 0x4f, 0x6d, 0xb, 0x29, 0xe4, 0xc6, 0xa0, 0x82, 0x6c, 0x4e, 0x28, 0xa, 0xe9, 0xcb, 0xad, 0x8f, 0x61, 0x43, 0x25, 0x7, 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, 0xf3, 0xd1, 0xb7, 0x95, 0x7b, 0x59, 0x3f, 0x1d, 0xb8, 0x9a, 0xfc, 0xde, 0x30, 0x12, 0x74, 0x56, 0xb5, 0x97, 0xf1, 0xd3, 0x3d, 0x1f, 0x79, 0x5b, 0xa2, 0x80, 0xe6, 0xc4, 0x2a, 0x8, 0x6e, 0x4c, 0xaf, 0x8d, 0xeb, 0xc9, 0x27, 0x5, 0x63, 0x41, 0x8c, 0xae, 0xc8, 0xea, 0x4, 0x26, 0x40, 0x62, 0x81, 0xa3, 0xc5, 0xe7, 0x9, 0x2b, 0x4d, 0x6f, 0x96, 0xb4, 0xd2, 0xf0, 0x1e, 0x3c, 0x5a, 0x78, 0x9b, 0xb9, 0xdf, 0xfd, 0x13, 0x31, 0x57, 0x75},
+ {0x0, 0x23, 0x46, 0x65, 0x8c, 0xaf, 0xca, 0xe9, 0x5, 0x26, 0x43, 0x60, 0x89, 0xaa, 0xcf, 0xec, 0xa, 0x29, 0x4c, 0x6f, 0x86, 0xa5, 0xc0, 0xe3, 0xf, 0x2c, 0x49, 0x6a, 0x83, 0xa0, 0xc5, 0xe6, 0x14, 0x37, 0x52, 0x71, 0x98, 0xbb, 0xde, 0xfd, 0x11, 0x32, 0x57, 0x74, 0x9d, 0xbe, 0xdb, 0xf8, 0x1e, 0x3d, 0x58, 0x7b, 0x92, 0xb1, 0xd4, 0xf7, 0x1b, 0x38, 0x5d, 0x7e, 0x97, 0xb4, 0xd1, 0xf2, 0x28, 0xb, 0x6e, 0x4d, 0xa4, 0x87, 0xe2, 0xc1, 0x2d, 0xe, 0x6b, 0x48, 0xa1, 0x82, 0xe7, 0xc4, 0x22, 0x1, 0x64, 0x47, 0xae, 0x8d, 0xe8, 0xcb, 0x27, 0x4, 0x61, 0x42, 0xab, 0x88, 0xed, 0xce, 0x3c, 0x1f, 0x7a, 0x59, 0xb0, 0x93, 0xf6, 0xd5, 0x39, 0x1a, 0x7f, 0x5c, 0xb5, 0x96, 0xf3, 0xd0, 0x36, 0x15, 0x70, 0x53, 0xba, 0x99, 0xfc, 0xdf, 0x33, 0x10, 0x75, 0x56, 0xbf, 0x9c, 0xf9, 0xda, 0x50, 0x73, 0x16, 0x35, 0xdc, 0xff, 0x9a, 0xb9, 0x55, 0x76, 0x13, 0x30, 0xd9, 0xfa, 0x9f, 0xbc, 0x5a, 0x79, 0x1c, 0x3f, 0xd6, 0xf5, 0x90, 0xb3, 0x5f, 0x7c, 0x19, 0x3a, 0xd3, 0xf0, 0x95, 0xb6, 0x44, 0x67, 0x2, 0x21, 0xc8, 0xeb, 0x8e, 0xad, 0x41, 0x62, 0x7, 0x24, 0xcd, 0xee, 0x8b, 0xa8, 0x4e, 0x6d, 0x8, 0x2b, 0xc2, 0xe1, 0x84, 0xa7, 0x4b, 0x68, 0xd, 0x2e, 0xc7, 0xe4, 0x81, 0xa2, 0x78, 0x5b, 0x3e, 0x1d, 0xf4, 0xd7, 0xb2, 0x91, 0x7d, 0x5e, 0x3b, 0x18, 0xf1, 0xd2, 0xb7, 0x94, 0x72, 0x51, 0x34, 0x17, 0xfe, 0xdd, 0xb8, 0x9b, 0x77, 0x54, 0x31, 0x12, 0xfb, 0xd8, 0xbd, 0x9e, 0x6c, 0x4f, 0x2a, 0x9, 0xe0, 0xc3, 0xa6, 0x85, 0x69, 0x4a, 0x2f, 0xc, 0xe5, 0xc6, 0xa3, 0x80, 0x66, 0x45, 0x20, 0x3, 0xea, 0xc9, 0xac, 0x8f, 0x63, 0x40, 0x25, 0x6, 0xef, 0xcc, 0xa9, 0x8a},
+ {0x0, 0x24, 0x48, 0x6c, 0x90, 0xb4, 0xd8, 0xfc, 0x3d, 0x19, 0x75, 0x51, 0xad, 0x89, 0xe5, 0xc1, 0x7a, 0x5e, 0x32, 0x16, 0xea, 0xce, 0xa2, 0x86, 0x47, 0x63, 0xf, 0x2b, 0xd7, 0xf3, 0x9f, 0xbb, 0xf4, 0xd0, 0xbc, 0x98, 0x64, 0x40, 0x2c, 0x8, 0xc9, 0xed, 0x81, 0xa5, 0x59, 0x7d, 0x11, 0x35, 0x8e, 0xaa, 0xc6, 0xe2, 0x1e, 0x3a, 0x56, 0x72, 0xb3, 0x97, 0xfb, 0xdf, 0x23, 0x7, 0x6b, 0x4f, 0xf5, 0xd1, 0xbd, 0x99, 0x65, 0x41, 0x2d, 0x9, 0xc8, 0xec, 0x80, 0xa4, 0x58, 0x7c, 0x10, 0x34, 0x8f, 0xab, 0xc7, 0xe3, 0x1f, 0x3b, 0x57, 0x73, 0xb2, 0x96, 0xfa, 0xde, 0x22, 0x6, 0x6a, 0x4e, 0x1, 0x25, 0x49, 0x6d, 0x91, 0xb5, 0xd9, 0xfd, 0x3c, 0x18, 0x74, 0x50, 0xac, 0x88, 0xe4, 0xc0, 0x7b, 0x5f, 0x33, 0x17, 0xeb, 0xcf, 0xa3, 0x87, 0x46, 0x62, 0xe, 0x2a, 0xd6, 0xf2, 0x9e, 0xba, 0xf7, 0xd3, 0xbf, 0x9b, 0x67, 0x43, 0x2f, 0xb, 0xca, 0xee, 0x82, 0xa6, 0x5a, 0x7e, 0x12, 0x36, 0x8d, 0xa9, 0xc5, 0xe1, 0x1d, 0x39, 0x55, 0x71, 0xb0, 0x94, 0xf8, 0xdc, 0x20, 0x4, 0x68, 0x4c, 0x3, 0x27, 0x4b, 0x6f, 0x93, 0xb7, 0xdb, 0xff, 0x3e, 0x1a, 0x76, 0x52, 0xae, 0x8a, 0xe6, 0xc2, 0x79, 0x5d, 0x31, 0x15, 0xe9, 0xcd, 0xa1, 0x85, 0x44, 0x60, 0xc, 0x28, 0xd4, 0xf0, 0x9c, 0xb8, 0x2, 0x26, 0x4a, 0x6e, 0x92, 0xb6, 0xda, 0xfe, 0x3f, 0x1b, 0x77, 0x53, 0xaf, 0x8b, 0xe7, 0xc3, 0x78, 0x5c, 0x30, 0x14, 0xe8, 0xcc, 0xa0, 0x84, 0x45, 0x61, 0xd, 0x29, 0xd5, 0xf1, 0x9d, 0xb9, 0xf6, 0xd2, 0xbe, 0x9a, 0x66, 0x42, 0x2e, 0xa, 0xcb, 0xef, 0x83, 0xa7, 0x5b, 0x7f, 0x13, 0x37, 0x8c, 0xa8, 0xc4, 0xe0, 0x1c, 0x38, 0x54, 0x70, 0xb1, 0x95, 0xf9, 0xdd, 0x21, 0x5, 0x69, 0x4d},
+ {0x0, 0x25, 0x4a, 0x6f, 0x94, 0xb1, 0xde, 0xfb, 0x35, 0x10, 0x7f, 0x5a, 0xa1, 0x84, 0xeb, 0xce, 0x6a, 0x4f, 0x20, 0x5, 0xfe, 0xdb, 0xb4, 0x91, 0x5f, 0x7a, 0x15, 0x30, 0xcb, 0xee, 0x81, 0xa4, 0xd4, 0xf1, 0x9e, 0xbb, 0x40, 0x65, 0xa, 0x2f, 0xe1, 0xc4, 0xab, 0x8e, 0x75, 0x50, 0x3f, 0x1a, 0xbe, 0x9b, 0xf4, 0xd1, 0x2a, 0xf, 0x60, 0x45, 0x8b, 0xae, 0xc1, 0xe4, 0x1f, 0x3a, 0x55, 0x70, 0xb5, 0x90, 0xff, 0xda, 0x21, 0x4, 0x6b, 0x4e, 0x80, 0xa5, 0xca, 0xef, 0x14, 0x31, 0x5e, 0x7b, 0xdf, 0xfa, 0x95, 0xb0, 0x4b, 0x6e, 0x1, 0x24, 0xea, 0xcf, 0xa0, 0x85, 0x7e, 0x5b, 0x34, 0x11, 0x61, 0x44, 0x2b, 0xe, 0xf5, 0xd0, 0xbf, 0x9a, 0x54, 0x71, 0x1e, 0x3b, 0xc0, 0xe5, 0x8a, 0xaf, 0xb, 0x2e, 0x41, 0x64, 0x9f, 0xba, 0xd5, 0xf0, 0x3e, 0x1b, 0x74, 0x51, 0xaa, 0x8f, 0xe0, 0xc5, 0x77, 0x52, 0x3d, 0x18, 0xe3, 0xc6, 0xa9, 0x8c, 0x42, 0x67, 0x8, 0x2d, 0xd6, 0xf3, 0x9c, 0xb9, 0x1d, 0x38, 0x57, 0x72, 0x89, 0xac, 0xc3, 0xe6, 0x28, 0xd, 0x62, 0x47, 0xbc, 0x99, 0xf6, 0xd3, 0xa3, 0x86, 0xe9, 0xcc, 0x37, 0x12, 0x7d, 0x58, 0x96, 0xb3, 0xdc, 0xf9, 0x2, 0x27, 0x48, 0x6d, 0xc9, 0xec, 0x83, 0xa6, 0x5d, 0x78, 0x17, 0x32, 0xfc, 0xd9, 0xb6, 0x93, 0x68, 0x4d, 0x22, 0x7, 0xc2, 0xe7, 0x88, 0xad, 0x56, 0x73, 0x1c, 0x39, 0xf7, 0xd2, 0xbd, 0x98, 0x63, 0x46, 0x29, 0xc, 0xa8, 0x8d, 0xe2, 0xc7, 0x3c, 0x19, 0x76, 0x53, 0x9d, 0xb8, 0xd7, 0xf2, 0x9, 0x2c, 0x43, 0x66, 0x16, 0x33, 0x5c, 0x79, 0x82, 0xa7, 0xc8, 0xed, 0x23, 0x6, 0x69, 0x4c, 0xb7, 0x92, 0xfd, 0xd8, 0x7c, 0x59, 0x36, 0x13, 0xe8, 0xcd, 0xa2, 0x87, 0x49, 0x6c, 0x3, 0x26, 0xdd, 0xf8, 0x97, 0xb2},
+ {0x0, 0x26, 0x4c, 0x6a, 0x98, 0xbe, 0xd4, 0xf2, 0x2d, 0xb, 0x61, 0x47, 0xb5, 0x93, 0xf9, 0xdf, 0x5a, 0x7c, 0x16, 0x30, 0xc2, 0xe4, 0x8e, 0xa8, 0x77, 0x51, 0x3b, 0x1d, 0xef, 0xc9, 0xa3, 0x85, 0xb4, 0x92, 0xf8, 0xde, 0x2c, 0xa, 0x60, 0x46, 0x99, 0xbf, 0xd5, 0xf3, 0x1, 0x27, 0x4d, 0x6b, 0xee, 0xc8, 0xa2, 0x84, 0x76, 0x50, 0x3a, 0x1c, 0xc3, 0xe5, 0x8f, 0xa9, 0x5b, 0x7d, 0x17, 0x31, 0x75, 0x53, 0x39, 0x1f, 0xed, 0xcb, 0xa1, 0x87, 0x58, 0x7e, 0x14, 0x32, 0xc0, 0xe6, 0x8c, 0xaa, 0x2f, 0x9, 0x63, 0x45, 0xb7, 0x91, 0xfb, 0xdd, 0x2, 0x24, 0x4e, 0x68, 0x9a, 0xbc, 0xd6, 0xf0, 0xc1, 0xe7, 0x8d, 0xab, 0x59, 0x7f, 0x15, 0x33, 0xec, 0xca, 0xa0, 0x86, 0x74, 0x52, 0x38, 0x1e, 0x9b, 0xbd, 0xd7, 0xf1, 0x3, 0x25, 0x4f, 0x69, 0xb6, 0x90, 0xfa, 0xdc, 0x2e, 0x8, 0x62, 0x44, 0xea, 0xcc, 0xa6, 0x80, 0x72, 0x54, 0x3e, 0x18, 0xc7, 0xe1, 0x8b, 0xad, 0x5f, 0x79, 0x13, 0x35, 0xb0, 0x96, 0xfc, 0xda, 0x28, 0xe, 0x64, 0x42, 0x9d, 0xbb, 0xd1, 0xf7, 0x5, 0x23, 0x49, 0x6f, 0x5e, 0x78, 0x12, 0x34, 0xc6, 0xe0, 0x8a, 0xac, 0x73, 0x55, 0x3f, 0x19, 0xeb, 0xcd, 0xa7, 0x81, 0x4, 0x22, 0x48, 0x6e, 0x9c, 0xba, 0xd0, 0xf6, 0x29, 0xf, 0x65, 0x43, 0xb1, 0x97, 0xfd, 0xdb, 0x9f, 0xb9, 0xd3, 0xf5, 0x7, 0x21, 0x4b, 0x6d, 0xb2, 0x94, 0xfe, 0xd8, 0x2a, 0xc, 0x66, 0x40, 0xc5, 0xe3, 0x89, 0xaf, 0x5d, 0x7b, 0x11, 0x37, 0xe8, 0xce, 0xa4, 0x82, 0x70, 0x56, 0x3c, 0x1a, 0x2b, 0xd, 0x67, 0x41, 0xb3, 0x95, 0xff, 0xd9, 0x6, 0x20, 0x4a, 0x6c, 0x9e, 0xb8, 0xd2, 0xf4, 0x71, 0x57, 0x3d, 0x1b, 0xe9, 0xcf, 0xa5, 0x83, 0x5c, 0x7a, 0x10, 0x36, 0xc4, 0xe2, 0x88, 0xae},
+ {0x0, 0x27, 0x4e, 0x69, 0x9c, 0xbb, 0xd2, 0xf5, 0x25, 0x2, 0x6b, 0x4c, 0xb9, 0x9e, 0xf7, 0xd0, 0x4a, 0x6d, 0x4, 0x23, 0xd6, 0xf1, 0x98, 0xbf, 0x6f, 0x48, 0x21, 0x6, 0xf3, 0xd4, 0xbd, 0x9a, 0x94, 0xb3, 0xda, 0xfd, 0x8, 0x2f, 0x46, 0x61, 0xb1, 0x96, 0xff, 0xd8, 0x2d, 0xa, 0x63, 0x44, 0xde, 0xf9, 0x90, 0xb7, 0x42, 0x65, 0xc, 0x2b, 0xfb, 0xdc, 0xb5, 0x92, 0x67, 0x40, 0x29, 0xe, 0x35, 0x12, 0x7b, 0x5c, 0xa9, 0x8e, 0xe7, 0xc0, 0x10, 0x37, 0x5e, 0x79, 0x8c, 0xab, 0xc2, 0xe5, 0x7f, 0x58, 0x31, 0x16, 0xe3, 0xc4, 0xad, 0x8a, 0x5a, 0x7d, 0x14, 0x33, 0xc6, 0xe1, 0x88, 0xaf, 0xa1, 0x86, 0xef, 0xc8, 0x3d, 0x1a, 0x73, 0x54, 0x84, 0xa3, 0xca, 0xed, 0x18, 0x3f, 0x56, 0x71, 0xeb, 0xcc, 0xa5, 0x82, 0x77, 0x50, 0x39, 0x1e, 0xce, 0xe9, 0x80, 0xa7, 0x52, 0x75, 0x1c, 0x3b, 0x6a, 0x4d, 0x24, 0x3, 0xf6, 0xd1, 0xb8, 0x9f, 0x4f, 0x68, 0x1, 0x26, 0xd3, 0xf4, 0x9d, 0xba, 0x20, 0x7, 0x6e, 0x49, 0xbc, 0x9b, 0xf2, 0xd5, 0x5, 0x22, 0x4b, 0x6c, 0x99, 0xbe, 0xd7, 0xf0, 0xfe, 0xd9, 0xb0, 0x97, 0x62, 0x45, 0x2c, 0xb, 0xdb, 0xfc, 0x95, 0xb2, 0x47, 0x60, 0x9, 0x2e, 0xb4, 0x93, 0xfa, 0xdd, 0x28, 0xf, 0x66, 0x41, 0x91, 0xb6, 0xdf, 0xf8, 0xd, 0x2a, 0x43, 0x64, 0x5f, 0x78, 0x11, 0x36, 0xc3, 0xe4, 0x8d, 0xaa, 0x7a, 0x5d, 0x34, 0x13, 0xe6, 0xc1, 0xa8, 0x8f, 0x15, 0x32, 0x5b, 0x7c, 0x89, 0xae, 0xc7, 0xe0, 0x30, 0x17, 0x7e, 0x59, 0xac, 0x8b, 0xe2, 0xc5, 0xcb, 0xec, 0x85, 0xa2, 0x57, 0x70, 0x19, 0x3e, 0xee, 0xc9, 0xa0, 0x87, 0x72, 0x55, 0x3c, 0x1b, 0x81, 0xa6, 0xcf, 0xe8, 0x1d, 0x3a, 0x53, 0x74, 0xa4, 0x83, 0xea, 0xcd, 0x38, 0x1f, 0x76, 0x51},
+ {0x0, 0x28, 0x50, 0x78, 0xa0, 0x88, 0xf0, 0xd8, 0x5d, 0x75, 0xd, 0x25, 0xfd, 0xd5, 0xad, 0x85, 0xba, 0x92, 0xea, 0xc2, 0x1a, 0x32, 0x4a, 0x62, 0xe7, 0xcf, 0xb7, 0x9f, 0x47, 0x6f, 0x17, 0x3f, 0x69, 0x41, 0x39, 0x11, 0xc9, 0xe1, 0x99, 0xb1, 0x34, 0x1c, 0x64, 0x4c, 0x94, 0xbc, 0xc4, 0xec, 0xd3, 0xfb, 0x83, 0xab, 0x73, 0x5b, 0x23, 0xb, 0x8e, 0xa6, 0xde, 0xf6, 0x2e, 0x6, 0x7e, 0x56, 0xd2, 0xfa, 0x82, 0xaa, 0x72, 0x5a, 0x22, 0xa, 0x8f, 0xa7, 0xdf, 0xf7, 0x2f, 0x7, 0x7f, 0x57, 0x68, 0x40, 0x38, 0x10, 0xc8, 0xe0, 0x98, 0xb0, 0x35, 0x1d, 0x65, 0x4d, 0x95, 0xbd, 0xc5, 0xed, 0xbb, 0x93, 0xeb, 0xc3, 0x1b, 0x33, 0x4b, 0x63, 0xe6, 0xce, 0xb6, 0x9e, 0x46, 0x6e, 0x16, 0x3e, 0x1, 0x29, 0x51, 0x79, 0xa1, 0x89, 0xf1, 0xd9, 0x5c, 0x74, 0xc, 0x24, 0xfc, 0xd4, 0xac, 0x84, 0xb9, 0x91, 0xe9, 0xc1, 0x19, 0x31, 0x49, 0x61, 0xe4, 0xcc, 0xb4, 0x9c, 0x44, 0x6c, 0x14, 0x3c, 0x3, 0x2b, 0x53, 0x7b, 0xa3, 0x8b, 0xf3, 0xdb, 0x5e, 0x76, 0xe, 0x26, 0xfe, 0xd6, 0xae, 0x86, 0xd0, 0xf8, 0x80, 0xa8, 0x70, 0x58, 0x20, 0x8, 0x8d, 0xa5, 0xdd, 0xf5, 0x2d, 0x5, 0x7d, 0x55, 0x6a, 0x42, 0x3a, 0x12, 0xca, 0xe2, 0x9a, 0xb2, 0x37, 0x1f, 0x67, 0x4f, 0x97, 0xbf, 0xc7, 0xef, 0x6b, 0x43, 0x3b, 0x13, 0xcb, 0xe3, 0x9b, 0xb3, 0x36, 0x1e, 0x66, 0x4e, 0x96, 0xbe, 0xc6, 0xee, 0xd1, 0xf9, 0x81, 0xa9, 0x71, 0x59, 0x21, 0x9, 0x8c, 0xa4, 0xdc, 0xf4, 0x2c, 0x4, 0x7c, 0x54, 0x2, 0x2a, 0x52, 0x7a, 0xa2, 0x8a, 0xf2, 0xda, 0x5f, 0x77, 0xf, 0x27, 0xff, 0xd7, 0xaf, 0x87, 0xb8, 0x90, 0xe8, 0xc0, 0x18, 0x30, 0x48, 0x60, 0xe5, 0xcd, 0xb5, 0x9d, 0x45, 0x6d, 0x15, 0x3d},
+ {0x0, 0x29, 0x52, 0x7b, 0xa4, 0x8d, 0xf6, 0xdf, 0x55, 0x7c, 0x7, 0x2e, 0xf1, 0xd8, 0xa3, 0x8a, 0xaa, 0x83, 0xf8, 0xd1, 0xe, 0x27, 0x5c, 0x75, 0xff, 0xd6, 0xad, 0x84, 0x5b, 0x72, 0x9, 0x20, 0x49, 0x60, 0x1b, 0x32, 0xed, 0xc4, 0xbf, 0x96, 0x1c, 0x35, 0x4e, 0x67, 0xb8, 0x91, 0xea, 0xc3, 0xe3, 0xca, 0xb1, 0x98, 0x47, 0x6e, 0x15, 0x3c, 0xb6, 0x9f, 0xe4, 0xcd, 0x12, 0x3b, 0x40, 0x69, 0x92, 0xbb, 0xc0, 0xe9, 0x36, 0x1f, 0x64, 0x4d, 0xc7, 0xee, 0x95, 0xbc, 0x63, 0x4a, 0x31, 0x18, 0x38, 0x11, 0x6a, 0x43, 0x9c, 0xb5, 0xce, 0xe7, 0x6d, 0x44, 0x3f, 0x16, 0xc9, 0xe0, 0x9b, 0xb2, 0xdb, 0xf2, 0x89, 0xa0, 0x7f, 0x56, 0x2d, 0x4, 0x8e, 0xa7, 0xdc, 0xf5, 0x2a, 0x3, 0x78, 0x51, 0x71, 0x58, 0x23, 0xa, 0xd5, 0xfc, 0x87, 0xae, 0x24, 0xd, 0x76, 0x5f, 0x80, 0xa9, 0xd2, 0xfb, 0x39, 0x10, 0x6b, 0x42, 0x9d, 0xb4, 0xcf, 0xe6, 0x6c, 0x45, 0x3e, 0x17, 0xc8, 0xe1, 0x9a, 0xb3, 0x93, 0xba, 0xc1, 0xe8, 0x37, 0x1e, 0x65, 0x4c, 0xc6, 0xef, 0x94, 0xbd, 0x62, 0x4b, 0x30, 0x19, 0x70, 0x59, 0x22, 0xb, 0xd4, 0xfd, 0x86, 0xaf, 0x25, 0xc, 0x77, 0x5e, 0x81, 0xa8, 0xd3, 0xfa, 0xda, 0xf3, 0x88, 0xa1, 0x7e, 0x57, 0x2c, 0x5, 0x8f, 0xa6, 0xdd, 0xf4, 0x2b, 0x2, 0x79, 0x50, 0xab, 0x82, 0xf9, 0xd0, 0xf, 0x26, 0x5d, 0x74, 0xfe, 0xd7, 0xac, 0x85, 0x5a, 0x73, 0x8, 0x21, 0x1, 0x28, 0x53, 0x7a, 0xa5, 0x8c, 0xf7, 0xde, 0x54, 0x7d, 0x6, 0x2f, 0xf0, 0xd9, 0xa2, 0x8b, 0xe2, 0xcb, 0xb0, 0x99, 0x46, 0x6f, 0x14, 0x3d, 0xb7, 0x9e, 0xe5, 0xcc, 0x13, 0x3a, 0x41, 0x68, 0x48, 0x61, 0x1a, 0x33, 0xec, 0xc5, 0xbe, 0x97, 0x1d, 0x34, 0x4f, 0x66, 0xb9, 0x90, 0xeb, 0xc2},
+ {0x0, 0x2a, 0x54, 0x7e, 0xa8, 0x82, 0xfc, 0xd6, 0x4d, 0x67, 0x19, 0x33, 0xe5, 0xcf, 0xb1, 0x9b, 0x9a, 0xb0, 0xce, 0xe4, 0x32, 0x18, 0x66, 0x4c, 0xd7, 0xfd, 0x83, 0xa9, 0x7f, 0x55, 0x2b, 0x1, 0x29, 0x3, 0x7d, 0x57, 0x81, 0xab, 0xd5, 0xff, 0x64, 0x4e, 0x30, 0x1a, 0xcc, 0xe6, 0x98, 0xb2, 0xb3, 0x99, 0xe7, 0xcd, 0x1b, 0x31, 0x4f, 0x65, 0xfe, 0xd4, 0xaa, 0x80, 0x56, 0x7c, 0x2, 0x28, 0x52, 0x78, 0x6, 0x2c, 0xfa, 0xd0, 0xae, 0x84, 0x1f, 0x35, 0x4b, 0x61, 0xb7, 0x9d, 0xe3, 0xc9, 0xc8, 0xe2, 0x9c, 0xb6, 0x60, 0x4a, 0x34, 0x1e, 0x85, 0xaf, 0xd1, 0xfb, 0x2d, 0x7, 0x79, 0x53, 0x7b, 0x51, 0x2f, 0x5, 0xd3, 0xf9, 0x87, 0xad, 0x36, 0x1c, 0x62, 0x48, 0x9e, 0xb4, 0xca, 0xe0, 0xe1, 0xcb, 0xb5, 0x9f, 0x49, 0x63, 0x1d, 0x37, 0xac, 0x86, 0xf8, 0xd2, 0x4, 0x2e, 0x50, 0x7a, 0xa4, 0x8e, 0xf0, 0xda, 0xc, 0x26, 0x58, 0x72, 0xe9, 0xc3, 0xbd, 0x97, 0x41, 0x6b, 0x15, 0x3f, 0x3e, 0x14, 0x6a, 0x40, 0x96, 0xbc, 0xc2, 0xe8, 0x73, 0x59, 0x27, 0xd, 0xdb, 0xf1, 0x8f, 0xa5, 0x8d, 0xa7, 0xd9, 0xf3, 0x25, 0xf, 0x71, 0x5b, 0xc0, 0xea, 0x94, 0xbe, 0x68, 0x42, 0x3c, 0x16, 0x17, 0x3d, 0x43, 0x69, 0xbf, 0x95, 0xeb, 0xc1, 0x5a, 0x70, 0xe, 0x24, 0xf2, 0xd8, 0xa6, 0x8c, 0xf6, 0xdc, 0xa2, 0x88, 0x5e, 0x74, 0xa, 0x20, 0xbb, 0x91, 0xef, 0xc5, 0x13, 0x39, 0x47, 0x6d, 0x6c, 0x46, 0x38, 0x12, 0xc4, 0xee, 0x90, 0xba, 0x21, 0xb, 0x75, 0x5f, 0x89, 0xa3, 0xdd, 0xf7, 0xdf, 0xf5, 0x8b, 0xa1, 0x77, 0x5d, 0x23, 0x9, 0x92, 0xb8, 0xc6, 0xec, 0x3a, 0x10, 0x6e, 0x44, 0x45, 0x6f, 0x11, 0x3b, 0xed, 0xc7, 0xb9, 0x93, 0x8, 0x22, 0x5c, 0x76, 0xa0, 0x8a, 0xf4, 0xde},
+ {0x0, 0x2b, 0x56, 0x7d, 0xac, 0x87, 0xfa, 0xd1, 0x45, 0x6e, 0x13, 0x38, 0xe9, 0xc2, 0xbf, 0x94, 0x8a, 0xa1, 0xdc, 0xf7, 0x26, 0xd, 0x70, 0x5b, 0xcf, 0xe4, 0x99, 0xb2, 0x63, 0x48, 0x35, 0x1e, 0x9, 0x22, 0x5f, 0x74, 0xa5, 0x8e, 0xf3, 0xd8, 0x4c, 0x67, 0x1a, 0x31, 0xe0, 0xcb, 0xb6, 0x9d, 0x83, 0xa8, 0xd5, 0xfe, 0x2f, 0x4, 0x79, 0x52, 0xc6, 0xed, 0x90, 0xbb, 0x6a, 0x41, 0x3c, 0x17, 0x12, 0x39, 0x44, 0x6f, 0xbe, 0x95, 0xe8, 0xc3, 0x57, 0x7c, 0x1, 0x2a, 0xfb, 0xd0, 0xad, 0x86, 0x98, 0xb3, 0xce, 0xe5, 0x34, 0x1f, 0x62, 0x49, 0xdd, 0xf6, 0x8b, 0xa0, 0x71, 0x5a, 0x27, 0xc, 0x1b, 0x30, 0x4d, 0x66, 0xb7, 0x9c, 0xe1, 0xca, 0x5e, 0x75, 0x8, 0x23, 0xf2, 0xd9, 0xa4, 0x8f, 0x91, 0xba, 0xc7, 0xec, 0x3d, 0x16, 0x6b, 0x40, 0xd4, 0xff, 0x82, 0xa9, 0x78, 0x53, 0x2e, 0x5, 0x24, 0xf, 0x72, 0x59, 0x88, 0xa3, 0xde, 0xf5, 0x61, 0x4a, 0x37, 0x1c, 0xcd, 0xe6, 0x9b, 0xb0, 0xae, 0x85, 0xf8, 0xd3, 0x2, 0x29, 0x54, 0x7f, 0xeb, 0xc0, 0xbd, 0x96, 0x47, 0x6c, 0x11, 0x3a, 0x2d, 0x6, 0x7b, 0x50, 0x81, 0xaa, 0xd7, 0xfc, 0x68, 0x43, 0x3e, 0x15, 0xc4, 0xef, 0x92, 0xb9, 0xa7, 0x8c, 0xf1, 0xda, 0xb, 0x20, 0x5d, 0x76, 0xe2, 0xc9, 0xb4, 0x9f, 0x4e, 0x65, 0x18, 0x33, 0x36, 0x1d, 0x60, 0x4b, 0x9a, 0xb1, 0xcc, 0xe7, 0x73, 0x58, 0x25, 0xe, 0xdf, 0xf4, 0x89, 0xa2, 0xbc, 0x97, 0xea, 0xc1, 0x10, 0x3b, 0x46, 0x6d, 0xf9, 0xd2, 0xaf, 0x84, 0x55, 0x7e, 0x3, 0x28, 0x3f, 0x14, 0x69, 0x42, 0x93, 0xb8, 0xc5, 0xee, 0x7a, 0x51, 0x2c, 0x7, 0xd6, 0xfd, 0x80, 0xab, 0xb5, 0x9e, 0xe3, 0xc8, 0x19, 0x32, 0x4f, 0x64, 0xf0, 0xdb, 0xa6, 0x8d, 0x5c, 0x77, 0xa, 0x21},
+ {0x0, 0x2c, 0x58, 0x74, 0xb0, 0x9c, 0xe8, 0xc4, 0x7d, 0x51, 0x25, 0x9, 0xcd, 0xe1, 0x95, 0xb9, 0xfa, 0xd6, 0xa2, 0x8e, 0x4a, 0x66, 0x12, 0x3e, 0x87, 0xab, 0xdf, 0xf3, 0x37, 0x1b, 0x6f, 0x43, 0xe9, 0xc5, 0xb1, 0x9d, 0x59, 0x75, 0x1, 0x2d, 0x94, 0xb8, 0xcc, 0xe0, 0x24, 0x8, 0x7c, 0x50, 0x13, 0x3f, 0x4b, 0x67, 0xa3, 0x8f, 0xfb, 0xd7, 0x6e, 0x42, 0x36, 0x1a, 0xde, 0xf2, 0x86, 0xaa, 0xcf, 0xe3, 0x97, 0xbb, 0x7f, 0x53, 0x27, 0xb, 0xb2, 0x9e, 0xea, 0xc6, 0x2, 0x2e, 0x5a, 0x76, 0x35, 0x19, 0x6d, 0x41, 0x85, 0xa9, 0xdd, 0xf1, 0x48, 0x64, 0x10, 0x3c, 0xf8, 0xd4, 0xa0, 0x8c, 0x26, 0xa, 0x7e, 0x52, 0x96, 0xba, 0xce, 0xe2, 0x5b, 0x77, 0x3, 0x2f, 0xeb, 0xc7, 0xb3, 0x9f, 0xdc, 0xf0, 0x84, 0xa8, 0x6c, 0x40, 0x34, 0x18, 0xa1, 0x8d, 0xf9, 0xd5, 0x11, 0x3d, 0x49, 0x65, 0x83, 0xaf, 0xdb, 0xf7, 0x33, 0x1f, 0x6b, 0x47, 0xfe, 0xd2, 0xa6, 0x8a, 0x4e, 0x62, 0x16, 0x3a, 0x79, 0x55, 0x21, 0xd, 0xc9, 0xe5, 0x91, 0xbd, 0x4, 0x28, 0x5c, 0x70, 0xb4, 0x98, 0xec, 0xc0, 0x6a, 0x46, 0x32, 0x1e, 0xda, 0xf6, 0x82, 0xae, 0x17, 0x3b, 0x4f, 0x63, 0xa7, 0x8b, 0xff, 0xd3, 0x90, 0xbc, 0xc8, 0xe4, 0x20, 0xc, 0x78, 0x54, 0xed, 0xc1, 0xb5, 0x99, 0x5d, 0x71, 0x5, 0x29, 0x4c, 0x60, 0x14, 0x38, 0xfc, 0xd0, 0xa4, 0x88, 0x31, 0x1d, 0x69, 0x45, 0x81, 0xad, 0xd9, 0xf5, 0xb6, 0x9a, 0xee, 0xc2, 0x6, 0x2a, 0x5e, 0x72, 0xcb, 0xe7, 0x93, 0xbf, 0x7b, 0x57, 0x23, 0xf, 0xa5, 0x89, 0xfd, 0xd1, 0x15, 0x39, 0x4d, 0x61, 0xd8, 0xf4, 0x80, 0xac, 0x68, 0x44, 0x30, 0x1c, 0x5f, 0x73, 0x7, 0x2b, 0xef, 0xc3, 0xb7, 0x9b, 0x22, 0xe, 0x7a, 0x56, 0x92, 0xbe, 0xca, 0xe6},
+ {0x0, 0x2d, 0x5a, 0x77, 0xb4, 0x99, 0xee, 0xc3, 0x75, 0x58, 0x2f, 0x2, 0xc1, 0xec, 0x9b, 0xb6, 0xea, 0xc7, 0xb0, 0x9d, 0x5e, 0x73, 0x4, 0x29, 0x9f, 0xb2, 0xc5, 0xe8, 0x2b, 0x6, 0x71, 0x5c, 0xc9, 0xe4, 0x93, 0xbe, 0x7d, 0x50, 0x27, 0xa, 0xbc, 0x91, 0xe6, 0xcb, 0x8, 0x25, 0x52, 0x7f, 0x23, 0xe, 0x79, 0x54, 0x97, 0xba, 0xcd, 0xe0, 0x56, 0x7b, 0xc, 0x21, 0xe2, 0xcf, 0xb8, 0x95, 0x8f, 0xa2, 0xd5, 0xf8, 0x3b, 0x16, 0x61, 0x4c, 0xfa, 0xd7, 0xa0, 0x8d, 0x4e, 0x63, 0x14, 0x39, 0x65, 0x48, 0x3f, 0x12, 0xd1, 0xfc, 0x8b, 0xa6, 0x10, 0x3d, 0x4a, 0x67, 0xa4, 0x89, 0xfe, 0xd3, 0x46, 0x6b, 0x1c, 0x31, 0xf2, 0xdf, 0xa8, 0x85, 0x33, 0x1e, 0x69, 0x44, 0x87, 0xaa, 0xdd, 0xf0, 0xac, 0x81, 0xf6, 0xdb, 0x18, 0x35, 0x42, 0x6f, 0xd9, 0xf4, 0x83, 0xae, 0x6d, 0x40, 0x37, 0x1a, 0x3, 0x2e, 0x59, 0x74, 0xb7, 0x9a, 0xed, 0xc0, 0x76, 0x5b, 0x2c, 0x1, 0xc2, 0xef, 0x98, 0xb5, 0xe9, 0xc4, 0xb3, 0x9e, 0x5d, 0x70, 0x7, 0x2a, 0x9c, 0xb1, 0xc6, 0xeb, 0x28, 0x5, 0x72, 0x5f, 0xca, 0xe7, 0x90, 0xbd, 0x7e, 0x53, 0x24, 0x9, 0xbf, 0x92, 0xe5, 0xc8, 0xb, 0x26, 0x51, 0x7c, 0x20, 0xd, 0x7a, 0x57, 0x94, 0xb9, 0xce, 0xe3, 0x55, 0x78, 0xf, 0x22, 0xe1, 0xcc, 0xbb, 0x96, 0x8c, 0xa1, 0xd6, 0xfb, 0x38, 0x15, 0x62, 0x4f, 0xf9, 0xd4, 0xa3, 0x8e, 0x4d, 0x60, 0x17, 0x3a, 0x66, 0x4b, 0x3c, 0x11, 0xd2, 0xff, 0x88, 0xa5, 0x13, 0x3e, 0x49, 0x64, 0xa7, 0x8a, 0xfd, 0xd0, 0x45, 0x68, 0x1f, 0x32, 0xf1, 0xdc, 0xab, 0x86, 0x30, 0x1d, 0x6a, 0x47, 0x84, 0xa9, 0xde, 0xf3, 0xaf, 0x82, 0xf5, 0xd8, 0x1b, 0x36, 0x41, 0x6c, 0xda, 0xf7, 0x80, 0xad, 0x6e, 0x43, 0x34, 0x19},
+ {0x0, 0x2e, 0x5c, 0x72, 0xb8, 0x96, 0xe4, 0xca, 0x6d, 0x43, 0x31, 0x1f, 0xd5, 0xfb, 0x89, 0xa7, 0xda, 0xf4, 0x86, 0xa8, 0x62, 0x4c, 0x3e, 0x10, 0xb7, 0x99, 0xeb, 0xc5, 0xf, 0x21, 0x53, 0x7d, 0xa9, 0x87, 0xf5, 0xdb, 0x11, 0x3f, 0x4d, 0x63, 0xc4, 0xea, 0x98, 0xb6, 0x7c, 0x52, 0x20, 0xe, 0x73, 0x5d, 0x2f, 0x1, 0xcb, 0xe5, 0x97, 0xb9, 0x1e, 0x30, 0x42, 0x6c, 0xa6, 0x88, 0xfa, 0xd4, 0x4f, 0x61, 0x13, 0x3d, 0xf7, 0xd9, 0xab, 0x85, 0x22, 0xc, 0x7e, 0x50, 0x9a, 0xb4, 0xc6, 0xe8, 0x95, 0xbb, 0xc9, 0xe7, 0x2d, 0x3, 0x71, 0x5f, 0xf8, 0xd6, 0xa4, 0x8a, 0x40, 0x6e, 0x1c, 0x32, 0xe6, 0xc8, 0xba, 0x94, 0x5e, 0x70, 0x2, 0x2c, 0x8b, 0xa5, 0xd7, 0xf9, 0x33, 0x1d, 0x6f, 0x41, 0x3c, 0x12, 0x60, 0x4e, 0x84, 0xaa, 0xd8, 0xf6, 0x51, 0x7f, 0xd, 0x23, 0xe9, 0xc7, 0xb5, 0x9b, 0x9e, 0xb0, 0xc2, 0xec, 0x26, 0x8, 0x7a, 0x54, 0xf3, 0xdd, 0xaf, 0x81, 0x4b, 0x65, 0x17, 0x39, 0x44, 0x6a, 0x18, 0x36, 0xfc, 0xd2, 0xa0, 0x8e, 0x29, 0x7, 0x75, 0x5b, 0x91, 0xbf, 0xcd, 0xe3, 0x37, 0x19, 0x6b, 0x45, 0x8f, 0xa1, 0xd3, 0xfd, 0x5a, 0x74, 0x6, 0x28, 0xe2, 0xcc, 0xbe, 0x90, 0xed, 0xc3, 0xb1, 0x9f, 0x55, 0x7b, 0x9, 0x27, 0x80, 0xae, 0xdc, 0xf2, 0x38, 0x16, 0x64, 0x4a, 0xd1, 0xff, 0x8d, 0xa3, 0x69, 0x47, 0x35, 0x1b, 0xbc, 0x92, 0xe0, 0xce, 0x4, 0x2a, 0x58, 0x76, 0xb, 0x25, 0x57, 0x79, 0xb3, 0x9d, 0xef, 0xc1, 0x66, 0x48, 0x3a, 0x14, 0xde, 0xf0, 0x82, 0xac, 0x78, 0x56, 0x24, 0xa, 0xc0, 0xee, 0x9c, 0xb2, 0x15, 0x3b, 0x49, 0x67, 0xad, 0x83, 0xf1, 0xdf, 0xa2, 0x8c, 0xfe, 0xd0, 0x1a, 0x34, 0x46, 0x68, 0xcf, 0xe1, 0x93, 0xbd, 0x77, 0x59, 0x2b, 0x5},
+ {0x0, 0x2f, 0x5e, 0x71, 0xbc, 0x93, 0xe2, 0xcd, 0x65, 0x4a, 0x3b, 0x14, 0xd9, 0xf6, 0x87, 0xa8, 0xca, 0xe5, 0x94, 0xbb, 0x76, 0x59, 0x28, 0x7, 0xaf, 0x80, 0xf1, 0xde, 0x13, 0x3c, 0x4d, 0x62, 0x89, 0xa6, 0xd7, 0xf8, 0x35, 0x1a, 0x6b, 0x44, 0xec, 0xc3, 0xb2, 0x9d, 0x50, 0x7f, 0xe, 0x21, 0x43, 0x6c, 0x1d, 0x32, 0xff, 0xd0, 0xa1, 0x8e, 0x26, 0x9, 0x78, 0x57, 0x9a, 0xb5, 0xc4, 0xeb, 0xf, 0x20, 0x51, 0x7e, 0xb3, 0x9c, 0xed, 0xc2, 0x6a, 0x45, 0x34, 0x1b, 0xd6, 0xf9, 0x88, 0xa7, 0xc5, 0xea, 0x9b, 0xb4, 0x79, 0x56, 0x27, 0x8, 0xa0, 0x8f, 0xfe, 0xd1, 0x1c, 0x33, 0x42, 0x6d, 0x86, 0xa9, 0xd8, 0xf7, 0x3a, 0x15, 0x64, 0x4b, 0xe3, 0xcc, 0xbd, 0x92, 0x5f, 0x70, 0x1, 0x2e, 0x4c, 0x63, 0x12, 0x3d, 0xf0, 0xdf, 0xae, 0x81, 0x29, 0x6, 0x77, 0x58, 0x95, 0xba, 0xcb, 0xe4, 0x1e, 0x31, 0x40, 0x6f, 0xa2, 0x8d, 0xfc, 0xd3, 0x7b, 0x54, 0x25, 0xa, 0xc7, 0xe8, 0x99, 0xb6, 0xd4, 0xfb, 0x8a, 0xa5, 0x68, 0x47, 0x36, 0x19, 0xb1, 0x9e, 0xef, 0xc0, 0xd, 0x22, 0x53, 0x7c, 0x97, 0xb8, 0xc9, 0xe6, 0x2b, 0x4, 0x75, 0x5a, 0xf2, 0xdd, 0xac, 0x83, 0x4e, 0x61, 0x10, 0x3f, 0x5d, 0x72, 0x3, 0x2c, 0xe1, 0xce, 0xbf, 0x90, 0x38, 0x17, 0x66, 0x49, 0x84, 0xab, 0xda, 0xf5, 0x11, 0x3e, 0x4f, 0x60, 0xad, 0x82, 0xf3, 0xdc, 0x74, 0x5b, 0x2a, 0x5, 0xc8, 0xe7, 0x96, 0xb9, 0xdb, 0xf4, 0x85, 0xaa, 0x67, 0x48, 0x39, 0x16, 0xbe, 0x91, 0xe0, 0xcf, 0x2, 0x2d, 0x5c, 0x73, 0x98, 0xb7, 0xc6, 0xe9, 0x24, 0xb, 0x7a, 0x55, 0xfd, 0xd2, 0xa3, 0x8c, 0x41, 0x6e, 0x1f, 0x30, 0x52, 0x7d, 0xc, 0x23, 0xee, 0xc1, 0xb0, 0x9f, 0x37, 0x18, 0x69, 0x46, 0x8b, 0xa4, 0xd5, 0xfa},
+ {0x0, 0x30, 0x60, 0x50, 0xc0, 0xf0, 0xa0, 0x90, 0x9d, 0xad, 0xfd, 0xcd, 0x5d, 0x6d, 0x3d, 0xd, 0x27, 0x17, 0x47, 0x77, 0xe7, 0xd7, 0x87, 0xb7, 0xba, 0x8a, 0xda, 0xea, 0x7a, 0x4a, 0x1a, 0x2a, 0x4e, 0x7e, 0x2e, 0x1e, 0x8e, 0xbe, 0xee, 0xde, 0xd3, 0xe3, 0xb3, 0x83, 0x13, 0x23, 0x73, 0x43, 0x69, 0x59, 0x9, 0x39, 0xa9, 0x99, 0xc9, 0xf9, 0xf4, 0xc4, 0x94, 0xa4, 0x34, 0x4, 0x54, 0x64, 0x9c, 0xac, 0xfc, 0xcc, 0x5c, 0x6c, 0x3c, 0xc, 0x1, 0x31, 0x61, 0x51, 0xc1, 0xf1, 0xa1, 0x91, 0xbb, 0x8b, 0xdb, 0xeb, 0x7b, 0x4b, 0x1b, 0x2b, 0x26, 0x16, 0x46, 0x76, 0xe6, 0xd6, 0x86, 0xb6, 0xd2, 0xe2, 0xb2, 0x82, 0x12, 0x22, 0x72, 0x42, 0x4f, 0x7f, 0x2f, 0x1f, 0x8f, 0xbf, 0xef, 0xdf, 0xf5, 0xc5, 0x95, 0xa5, 0x35, 0x5, 0x55, 0x65, 0x68, 0x58, 0x8, 0x38, 0xa8, 0x98, 0xc8, 0xf8, 0x25, 0x15, 0x45, 0x75, 0xe5, 0xd5, 0x85, 0xb5, 0xb8, 0x88, 0xd8, 0xe8, 0x78, 0x48, 0x18, 0x28, 0x2, 0x32, 0x62, 0x52, 0xc2, 0xf2, 0xa2, 0x92, 0x9f, 0xaf, 0xff, 0xcf, 0x5f, 0x6f, 0x3f, 0xf, 0x6b, 0x5b, 0xb, 0x3b, 0xab, 0x9b, 0xcb, 0xfb, 0xf6, 0xc6, 0x96, 0xa6, 0x36, 0x6, 0x56, 0x66, 0x4c, 0x7c, 0x2c, 0x1c, 0x8c, 0xbc, 0xec, 0xdc, 0xd1, 0xe1, 0xb1, 0x81, 0x11, 0x21, 0x71, 0x41, 0xb9, 0x89, 0xd9, 0xe9, 0x79, 0x49, 0x19, 0x29, 0x24, 0x14, 0x44, 0x74, 0xe4, 0xd4, 0x84, 0xb4, 0x9e, 0xae, 0xfe, 0xce, 0x5e, 0x6e, 0x3e, 0xe, 0x3, 0x33, 0x63, 0x53, 0xc3, 0xf3, 0xa3, 0x93, 0xf7, 0xc7, 0x97, 0xa7, 0x37, 0x7, 0x57, 0x67, 0x6a, 0x5a, 0xa, 0x3a, 0xaa, 0x9a, 0xca, 0xfa, 0xd0, 0xe0, 0xb0, 0x80, 0x10, 0x20, 0x70, 0x40, 0x4d, 0x7d, 0x2d, 0x1d, 0x8d, 0xbd, 0xed, 0xdd},
+ {0x0, 0x31, 0x62, 0x53, 0xc4, 0xf5, 0xa6, 0x97, 0x95, 0xa4, 0xf7, 0xc6, 0x51, 0x60, 0x33, 0x2, 0x37, 0x6, 0x55, 0x64, 0xf3, 0xc2, 0x91, 0xa0, 0xa2, 0x93, 0xc0, 0xf1, 0x66, 0x57, 0x4, 0x35, 0x6e, 0x5f, 0xc, 0x3d, 0xaa, 0x9b, 0xc8, 0xf9, 0xfb, 0xca, 0x99, 0xa8, 0x3f, 0xe, 0x5d, 0x6c, 0x59, 0x68, 0x3b, 0xa, 0x9d, 0xac, 0xff, 0xce, 0xcc, 0xfd, 0xae, 0x9f, 0x8, 0x39, 0x6a, 0x5b, 0xdc, 0xed, 0xbe, 0x8f, 0x18, 0x29, 0x7a, 0x4b, 0x49, 0x78, 0x2b, 0x1a, 0x8d, 0xbc, 0xef, 0xde, 0xeb, 0xda, 0x89, 0xb8, 0x2f, 0x1e, 0x4d, 0x7c, 0x7e, 0x4f, 0x1c, 0x2d, 0xba, 0x8b, 0xd8, 0xe9, 0xb2, 0x83, 0xd0, 0xe1, 0x76, 0x47, 0x14, 0x25, 0x27, 0x16, 0x45, 0x74, 0xe3, 0xd2, 0x81, 0xb0, 0x85, 0xb4, 0xe7, 0xd6, 0x41, 0x70, 0x23, 0x12, 0x10, 0x21, 0x72, 0x43, 0xd4, 0xe5, 0xb6, 0x87, 0xa5, 0x94, 0xc7, 0xf6, 0x61, 0x50, 0x3, 0x32, 0x30, 0x1, 0x52, 0x63, 0xf4, 0xc5, 0x96, 0xa7, 0x92, 0xa3, 0xf0, 0xc1, 0x56, 0x67, 0x34, 0x5, 0x7, 0x36, 0x65, 0x54, 0xc3, 0xf2, 0xa1, 0x90, 0xcb, 0xfa, 0xa9, 0x98, 0xf, 0x3e, 0x6d, 0x5c, 0x5e, 0x6f, 0x3c, 0xd, 0x9a, 0xab, 0xf8, 0xc9, 0xfc, 0xcd, 0x9e, 0xaf, 0x38, 0x9, 0x5a, 0x6b, 0x69, 0x58, 0xb, 0x3a, 0xad, 0x9c, 0xcf, 0xfe, 0x79, 0x48, 0x1b, 0x2a, 0xbd, 0x8c, 0xdf, 0xee, 0xec, 0xdd, 0x8e, 0xbf, 0x28, 0x19, 0x4a, 0x7b, 0x4e, 0x7f, 0x2c, 0x1d, 0x8a, 0xbb, 0xe8, 0xd9, 0xdb, 0xea, 0xb9, 0x88, 0x1f, 0x2e, 0x7d, 0x4c, 0x17, 0x26, 0x75, 0x44, 0xd3, 0xe2, 0xb1, 0x80, 0x82, 0xb3, 0xe0, 0xd1, 0x46, 0x77, 0x24, 0x15, 0x20, 0x11, 0x42, 0x73, 0xe4, 0xd5, 0x86, 0xb7, 0xb5, 0x84, 0xd7, 0xe6, 0x71, 0x40, 0x13, 0x22},
+ {0x0, 0x32, 0x64, 0x56, 0xc8, 0xfa, 0xac, 0x9e, 0x8d, 0xbf, 0xe9, 0xdb, 0x45, 0x77, 0x21, 0x13, 0x7, 0x35, 0x63, 0x51, 0xcf, 0xfd, 0xab, 0x99, 0x8a, 0xb8, 0xee, 0xdc, 0x42, 0x70, 0x26, 0x14, 0xe, 0x3c, 0x6a, 0x58, 0xc6, 0xf4, 0xa2, 0x90, 0x83, 0xb1, 0xe7, 0xd5, 0x4b, 0x79, 0x2f, 0x1d, 0x9, 0x3b, 0x6d, 0x5f, 0xc1, 0xf3, 0xa5, 0x97, 0x84, 0xb6, 0xe0, 0xd2, 0x4c, 0x7e, 0x28, 0x1a, 0x1c, 0x2e, 0x78, 0x4a, 0xd4, 0xe6, 0xb0, 0x82, 0x91, 0xa3, 0xf5, 0xc7, 0x59, 0x6b, 0x3d, 0xf, 0x1b, 0x29, 0x7f, 0x4d, 0xd3, 0xe1, 0xb7, 0x85, 0x96, 0xa4, 0xf2, 0xc0, 0x5e, 0x6c, 0x3a, 0x8, 0x12, 0x20, 0x76, 0x44, 0xda, 0xe8, 0xbe, 0x8c, 0x9f, 0xad, 0xfb, 0xc9, 0x57, 0x65, 0x33, 0x1, 0x15, 0x27, 0x71, 0x43, 0xdd, 0xef, 0xb9, 0x8b, 0x98, 0xaa, 0xfc, 0xce, 0x50, 0x62, 0x34, 0x6, 0x38, 0xa, 0x5c, 0x6e, 0xf0, 0xc2, 0x94, 0xa6, 0xb5, 0x87, 0xd1, 0xe3, 0x7d, 0x4f, 0x19, 0x2b, 0x3f, 0xd, 0x5b, 0x69, 0xf7, 0xc5, 0x93, 0xa1, 0xb2, 0x80, 0xd6, 0xe4, 0x7a, 0x48, 0x1e, 0x2c, 0x36, 0x4, 0x52, 0x60, 0xfe, 0xcc, 0x9a, 0xa8, 0xbb, 0x89, 0xdf, 0xed, 0x73, 0x41, 0x17, 0x25, 0x31, 0x3, 0x55, 0x67, 0xf9, 0xcb, 0x9d, 0xaf, 0xbc, 0x8e, 0xd8, 0xea, 0x74, 0x46, 0x10, 0x22, 0x24, 0x16, 0x40, 0x72, 0xec, 0xde, 0x88, 0xba, 0xa9, 0x9b, 0xcd, 0xff, 0x61, 0x53, 0x5, 0x37, 0x23, 0x11, 0x47, 0x75, 0xeb, 0xd9, 0x8f, 0xbd, 0xae, 0x9c, 0xca, 0xf8, 0x66, 0x54, 0x2, 0x30, 0x2a, 0x18, 0x4e, 0x7c, 0xe2, 0xd0, 0x86, 0xb4, 0xa7, 0x95, 0xc3, 0xf1, 0x6f, 0x5d, 0xb, 0x39, 0x2d, 0x1f, 0x49, 0x7b, 0xe5, 0xd7, 0x81, 0xb3, 0xa0, 0x92, 0xc4, 0xf6, 0x68, 0x5a, 0xc, 0x3e},
+ {0x0, 0x33, 0x66, 0x55, 0xcc, 0xff, 0xaa, 0x99, 0x85, 0xb6, 0xe3, 0xd0, 0x49, 0x7a, 0x2f, 0x1c, 0x17, 0x24, 0x71, 0x42, 0xdb, 0xe8, 0xbd, 0x8e, 0x92, 0xa1, 0xf4, 0xc7, 0x5e, 0x6d, 0x38, 0xb, 0x2e, 0x1d, 0x48, 0x7b, 0xe2, 0xd1, 0x84, 0xb7, 0xab, 0x98, 0xcd, 0xfe, 0x67, 0x54, 0x1, 0x32, 0x39, 0xa, 0x5f, 0x6c, 0xf5, 0xc6, 0x93, 0xa0, 0xbc, 0x8f, 0xda, 0xe9, 0x70, 0x43, 0x16, 0x25, 0x5c, 0x6f, 0x3a, 0x9, 0x90, 0xa3, 0xf6, 0xc5, 0xd9, 0xea, 0xbf, 0x8c, 0x15, 0x26, 0x73, 0x40, 0x4b, 0x78, 0x2d, 0x1e, 0x87, 0xb4, 0xe1, 0xd2, 0xce, 0xfd, 0xa8, 0x9b, 0x2, 0x31, 0x64, 0x57, 0x72, 0x41, 0x14, 0x27, 0xbe, 0x8d, 0xd8, 0xeb, 0xf7, 0xc4, 0x91, 0xa2, 0x3b, 0x8, 0x5d, 0x6e, 0x65, 0x56, 0x3, 0x30, 0xa9, 0x9a, 0xcf, 0xfc, 0xe0, 0xd3, 0x86, 0xb5, 0x2c, 0x1f, 0x4a, 0x79, 0xb8, 0x8b, 0xde, 0xed, 0x74, 0x47, 0x12, 0x21, 0x3d, 0xe, 0x5b, 0x68, 0xf1, 0xc2, 0x97, 0xa4, 0xaf, 0x9c, 0xc9, 0xfa, 0x63, 0x50, 0x5, 0x36, 0x2a, 0x19, 0x4c, 0x7f, 0xe6, 0xd5, 0x80, 0xb3, 0x96, 0xa5, 0xf0, 0xc3, 0x5a, 0x69, 0x3c, 0xf, 0x13, 0x20, 0x75, 0x46, 0xdf, 0xec, 0xb9, 0x8a, 0x81, 0xb2, 0xe7, 0xd4, 0x4d, 0x7e, 0x2b, 0x18, 0x4, 0x37, 0x62, 0x51, 0xc8, 0xfb, 0xae, 0x9d, 0xe4, 0xd7, 0x82, 0xb1, 0x28, 0x1b, 0x4e, 0x7d, 0x61, 0x52, 0x7, 0x34, 0xad, 0x9e, 0xcb, 0xf8, 0xf3, 0xc0, 0x95, 0xa6, 0x3f, 0xc, 0x59, 0x6a, 0x76, 0x45, 0x10, 0x23, 0xba, 0x89, 0xdc, 0xef, 0xca, 0xf9, 0xac, 0x9f, 0x6, 0x35, 0x60, 0x53, 0x4f, 0x7c, 0x29, 0x1a, 0x83, 0xb0, 0xe5, 0xd6, 0xdd, 0xee, 0xbb, 0x88, 0x11, 0x22, 0x77, 0x44, 0x58, 0x6b, 0x3e, 0xd, 0x94, 0xa7, 0xf2, 0xc1},
+ {0x0, 0x34, 0x68, 0x5c, 0xd0, 0xe4, 0xb8, 0x8c, 0xbd, 0x89, 0xd5, 0xe1, 0x6d, 0x59, 0x5, 0x31, 0x67, 0x53, 0xf, 0x3b, 0xb7, 0x83, 0xdf, 0xeb, 0xda, 0xee, 0xb2, 0x86, 0xa, 0x3e, 0x62, 0x56, 0xce, 0xfa, 0xa6, 0x92, 0x1e, 0x2a, 0x76, 0x42, 0x73, 0x47, 0x1b, 0x2f, 0xa3, 0x97, 0xcb, 0xff, 0xa9, 0x9d, 0xc1, 0xf5, 0x79, 0x4d, 0x11, 0x25, 0x14, 0x20, 0x7c, 0x48, 0xc4, 0xf0, 0xac, 0x98, 0x81, 0xb5, 0xe9, 0xdd, 0x51, 0x65, 0x39, 0xd, 0x3c, 0x8, 0x54, 0x60, 0xec, 0xd8, 0x84, 0xb0, 0xe6, 0xd2, 0x8e, 0xba, 0x36, 0x2, 0x5e, 0x6a, 0x5b, 0x6f, 0x33, 0x7, 0x8b, 0xbf, 0xe3, 0xd7, 0x4f, 0x7b, 0x27, 0x13, 0x9f, 0xab, 0xf7, 0xc3, 0xf2, 0xc6, 0x9a, 0xae, 0x22, 0x16, 0x4a, 0x7e, 0x28, 0x1c, 0x40, 0x74, 0xf8, 0xcc, 0x90, 0xa4, 0x95, 0xa1, 0xfd, 0xc9, 0x45, 0x71, 0x2d, 0x19, 0x1f, 0x2b, 0x77, 0x43, 0xcf, 0xfb, 0xa7, 0x93, 0xa2, 0x96, 0xca, 0xfe, 0x72, 0x46, 0x1a, 0x2e, 0x78, 0x4c, 0x10, 0x24, 0xa8, 0x9c, 0xc0, 0xf4, 0xc5, 0xf1, 0xad, 0x99, 0x15, 0x21, 0x7d, 0x49, 0xd1, 0xe5, 0xb9, 0x8d, 0x1, 0x35, 0x69, 0x5d, 0x6c, 0x58, 0x4, 0x30, 0xbc, 0x88, 0xd4, 0xe0, 0xb6, 0x82, 0xde, 0xea, 0x66, 0x52, 0xe, 0x3a, 0xb, 0x3f, 0x63, 0x57, 0xdb, 0xef, 0xb3, 0x87, 0x9e, 0xaa, 0xf6, 0xc2, 0x4e, 0x7a, 0x26, 0x12, 0x23, 0x17, 0x4b, 0x7f, 0xf3, 0xc7, 0x9b, 0xaf, 0xf9, 0xcd, 0x91, 0xa5, 0x29, 0x1d, 0x41, 0x75, 0x44, 0x70, 0x2c, 0x18, 0x94, 0xa0, 0xfc, 0xc8, 0x50, 0x64, 0x38, 0xc, 0x80, 0xb4, 0xe8, 0xdc, 0xed, 0xd9, 0x85, 0xb1, 0x3d, 0x9, 0x55, 0x61, 0x37, 0x3, 0x5f, 0x6b, 0xe7, 0xd3, 0x8f, 0xbb, 0x8a, 0xbe, 0xe2, 0xd6, 0x5a, 0x6e, 0x32, 0x6},
+ {0x0, 0x35, 0x6a, 0x5f, 0xd4, 0xe1, 0xbe, 0x8b, 0xb5, 0x80, 0xdf, 0xea, 0x61, 0x54, 0xb, 0x3e, 0x77, 0x42, 0x1d, 0x28, 0xa3, 0x96, 0xc9, 0xfc, 0xc2, 0xf7, 0xa8, 0x9d, 0x16, 0x23, 0x7c, 0x49, 0xee, 0xdb, 0x84, 0xb1, 0x3a, 0xf, 0x50, 0x65, 0x5b, 0x6e, 0x31, 0x4, 0x8f, 0xba, 0xe5, 0xd0, 0x99, 0xac, 0xf3, 0xc6, 0x4d, 0x78, 0x27, 0x12, 0x2c, 0x19, 0x46, 0x73, 0xf8, 0xcd, 0x92, 0xa7, 0xc1, 0xf4, 0xab, 0x9e, 0x15, 0x20, 0x7f, 0x4a, 0x74, 0x41, 0x1e, 0x2b, 0xa0, 0x95, 0xca, 0xff, 0xb6, 0x83, 0xdc, 0xe9, 0x62, 0x57, 0x8, 0x3d, 0x3, 0x36, 0x69, 0x5c, 0xd7, 0xe2, 0xbd, 0x88, 0x2f, 0x1a, 0x45, 0x70, 0xfb, 0xce, 0x91, 0xa4, 0x9a, 0xaf, 0xf0, 0xc5, 0x4e, 0x7b, 0x24, 0x11, 0x58, 0x6d, 0x32, 0x7, 0x8c, 0xb9, 0xe6, 0xd3, 0xed, 0xd8, 0x87, 0xb2, 0x39, 0xc, 0x53, 0x66, 0x9f, 0xaa, 0xf5, 0xc0, 0x4b, 0x7e, 0x21, 0x14, 0x2a, 0x1f, 0x40, 0x75, 0xfe, 0xcb, 0x94, 0xa1, 0xe8, 0xdd, 0x82, 0xb7, 0x3c, 0x9, 0x56, 0x63, 0x5d, 0x68, 0x37, 0x2, 0x89, 0xbc, 0xe3, 0xd6, 0x71, 0x44, 0x1b, 0x2e, 0xa5, 0x90, 0xcf, 0xfa, 0xc4, 0xf1, 0xae, 0x9b, 0x10, 0x25, 0x7a, 0x4f, 0x6, 0x33, 0x6c, 0x59, 0xd2, 0xe7, 0xb8, 0x8d, 0xb3, 0x86, 0xd9, 0xec, 0x67, 0x52, 0xd, 0x38, 0x5e, 0x6b, 0x34, 0x1, 0x8a, 0xbf, 0xe0, 0xd5, 0xeb, 0xde, 0x81, 0xb4, 0x3f, 0xa, 0x55, 0x60, 0x29, 0x1c, 0x43, 0x76, 0xfd, 0xc8, 0x97, 0xa2, 0x9c, 0xa9, 0xf6, 0xc3, 0x48, 0x7d, 0x22, 0x17, 0xb0, 0x85, 0xda, 0xef, 0x64, 0x51, 0xe, 0x3b, 0x5, 0x30, 0x6f, 0x5a, 0xd1, 0xe4, 0xbb, 0x8e, 0xc7, 0xf2, 0xad, 0x98, 0x13, 0x26, 0x79, 0x4c, 0x72, 0x47, 0x18, 0x2d, 0xa6, 0x93, 0xcc, 0xf9},
+ {0x0, 0x36, 0x6c, 0x5a, 0xd8, 0xee, 0xb4, 0x82, 0xad, 0x9b, 0xc1, 0xf7, 0x75, 0x43, 0x19, 0x2f, 0x47, 0x71, 0x2b, 0x1d, 0x9f, 0xa9, 0xf3, 0xc5, 0xea, 0xdc, 0x86, 0xb0, 0x32, 0x4, 0x5e, 0x68, 0x8e, 0xb8, 0xe2, 0xd4, 0x56, 0x60, 0x3a, 0xc, 0x23, 0x15, 0x4f, 0x79, 0xfb, 0xcd, 0x97, 0xa1, 0xc9, 0xff, 0xa5, 0x93, 0x11, 0x27, 0x7d, 0x4b, 0x64, 0x52, 0x8, 0x3e, 0xbc, 0x8a, 0xd0, 0xe6, 0x1, 0x37, 0x6d, 0x5b, 0xd9, 0xef, 0xb5, 0x83, 0xac, 0x9a, 0xc0, 0xf6, 0x74, 0x42, 0x18, 0x2e, 0x46, 0x70, 0x2a, 0x1c, 0x9e, 0xa8, 0xf2, 0xc4, 0xeb, 0xdd, 0x87, 0xb1, 0x33, 0x5, 0x5f, 0x69, 0x8f, 0xb9, 0xe3, 0xd5, 0x57, 0x61, 0x3b, 0xd, 0x22, 0x14, 0x4e, 0x78, 0xfa, 0xcc, 0x96, 0xa0, 0xc8, 0xfe, 0xa4, 0x92, 0x10, 0x26, 0x7c, 0x4a, 0x65, 0x53, 0x9, 0x3f, 0xbd, 0x8b, 0xd1, 0xe7, 0x2, 0x34, 0x6e, 0x58, 0xda, 0xec, 0xb6, 0x80, 0xaf, 0x99, 0xc3, 0xf5, 0x77, 0x41, 0x1b, 0x2d, 0x45, 0x73, 0x29, 0x1f, 0x9d, 0xab, 0xf1, 0xc7, 0xe8, 0xde, 0x84, 0xb2, 0x30, 0x6, 0x5c, 0x6a, 0x8c, 0xba, 0xe0, 0xd6, 0x54, 0x62, 0x38, 0xe, 0x21, 0x17, 0x4d, 0x7b, 0xf9, 0xcf, 0x95, 0xa3, 0xcb, 0xfd, 0xa7, 0x91, 0x13, 0x25, 0x7f, 0x49, 0x66, 0x50, 0xa, 0x3c, 0xbe, 0x88, 0xd2, 0xe4, 0x3, 0x35, 0x6f, 0x59, 0xdb, 0xed, 0xb7, 0x81, 0xae, 0x98, 0xc2, 0xf4, 0x76, 0x40, 0x1a, 0x2c, 0x44, 0x72, 0x28, 0x1e, 0x9c, 0xaa, 0xf0, 0xc6, 0xe9, 0xdf, 0x85, 0xb3, 0x31, 0x7, 0x5d, 0x6b, 0x8d, 0xbb, 0xe1, 0xd7, 0x55, 0x63, 0x39, 0xf, 0x20, 0x16, 0x4c, 0x7a, 0xf8, 0xce, 0x94, 0xa2, 0xca, 0xfc, 0xa6, 0x90, 0x12, 0x24, 0x7e, 0x48, 0x67, 0x51, 0xb, 0x3d, 0xbf, 0x89, 0xd3, 0xe5},
+ {0x0, 0x37, 0x6e, 0x59, 0xdc, 0xeb, 0xb2, 0x85, 0xa5, 0x92, 0xcb, 0xfc, 0x79, 0x4e, 0x17, 0x20, 0x57, 0x60, 0x39, 0xe, 0x8b, 0xbc, 0xe5, 0xd2, 0xf2, 0xc5, 0x9c, 0xab, 0x2e, 0x19, 0x40, 0x77, 0xae, 0x99, 0xc0, 0xf7, 0x72, 0x45, 0x1c, 0x2b, 0xb, 0x3c, 0x65, 0x52, 0xd7, 0xe0, 0xb9, 0x8e, 0xf9, 0xce, 0x97, 0xa0, 0x25, 0x12, 0x4b, 0x7c, 0x5c, 0x6b, 0x32, 0x5, 0x80, 0xb7, 0xee, 0xd9, 0x41, 0x76, 0x2f, 0x18, 0x9d, 0xaa, 0xf3, 0xc4, 0xe4, 0xd3, 0x8a, 0xbd, 0x38, 0xf, 0x56, 0x61, 0x16, 0x21, 0x78, 0x4f, 0xca, 0xfd, 0xa4, 0x93, 0xb3, 0x84, 0xdd, 0xea, 0x6f, 0x58, 0x1, 0x36, 0xef, 0xd8, 0x81, 0xb6, 0x33, 0x4, 0x5d, 0x6a, 0x4a, 0x7d, 0x24, 0x13, 0x96, 0xa1, 0xf8, 0xcf, 0xb8, 0x8f, 0xd6, 0xe1, 0x64, 0x53, 0xa, 0x3d, 0x1d, 0x2a, 0x73, 0x44, 0xc1, 0xf6, 0xaf, 0x98, 0x82, 0xb5, 0xec, 0xdb, 0x5e, 0x69, 0x30, 0x7, 0x27, 0x10, 0x49, 0x7e, 0xfb, 0xcc, 0x95, 0xa2, 0xd5, 0xe2, 0xbb, 0x8c, 0x9, 0x3e, 0x67, 0x50, 0x70, 0x47, 0x1e, 0x29, 0xac, 0x9b, 0xc2, 0xf5, 0x2c, 0x1b, 0x42, 0x75, 0xf0, 0xc7, 0x9e, 0xa9, 0x89, 0xbe, 0xe7, 0xd0, 0x55, 0x62, 0x3b, 0xc, 0x7b, 0x4c, 0x15, 0x22, 0xa7, 0x90, 0xc9, 0xfe, 0xde, 0xe9, 0xb0, 0x87, 0x2, 0x35, 0x6c, 0x5b, 0xc3, 0xf4, 0xad, 0x9a, 0x1f, 0x28, 0x71, 0x46, 0x66, 0x51, 0x8, 0x3f, 0xba, 0x8d, 0xd4, 0xe3, 0x94, 0xa3, 0xfa, 0xcd, 0x48, 0x7f, 0x26, 0x11, 0x31, 0x6, 0x5f, 0x68, 0xed, 0xda, 0x83, 0xb4, 0x6d, 0x5a, 0x3, 0x34, 0xb1, 0x86, 0xdf, 0xe8, 0xc8, 0xff, 0xa6, 0x91, 0x14, 0x23, 0x7a, 0x4d, 0x3a, 0xd, 0x54, 0x63, 0xe6, 0xd1, 0x88, 0xbf, 0x9f, 0xa8, 0xf1, 0xc6, 0x43, 0x74, 0x2d, 0x1a},
+ {0x0, 0x38, 0x70, 0x48, 0xe0, 0xd8, 0x90, 0xa8, 0xdd, 0xe5, 0xad, 0x95, 0x3d, 0x5, 0x4d, 0x75, 0xa7, 0x9f, 0xd7, 0xef, 0x47, 0x7f, 0x37, 0xf, 0x7a, 0x42, 0xa, 0x32, 0x9a, 0xa2, 0xea, 0xd2, 0x53, 0x6b, 0x23, 0x1b, 0xb3, 0x8b, 0xc3, 0xfb, 0x8e, 0xb6, 0xfe, 0xc6, 0x6e, 0x56, 0x1e, 0x26, 0xf4, 0xcc, 0x84, 0xbc, 0x14, 0x2c, 0x64, 0x5c, 0x29, 0x11, 0x59, 0x61, 0xc9, 0xf1, 0xb9, 0x81, 0xa6, 0x9e, 0xd6, 0xee, 0x46, 0x7e, 0x36, 0xe, 0x7b, 0x43, 0xb, 0x33, 0x9b, 0xa3, 0xeb, 0xd3, 0x1, 0x39, 0x71, 0x49, 0xe1, 0xd9, 0x91, 0xa9, 0xdc, 0xe4, 0xac, 0x94, 0x3c, 0x4, 0x4c, 0x74, 0xf5, 0xcd, 0x85, 0xbd, 0x15, 0x2d, 0x65, 0x5d, 0x28, 0x10, 0x58, 0x60, 0xc8, 0xf0, 0xb8, 0x80, 0x52, 0x6a, 0x22, 0x1a, 0xb2, 0x8a, 0xc2, 0xfa, 0x8f, 0xb7, 0xff, 0xc7, 0x6f, 0x57, 0x1f, 0x27, 0x51, 0x69, 0x21, 0x19, 0xb1, 0x89, 0xc1, 0xf9, 0x8c, 0xb4, 0xfc, 0xc4, 0x6c, 0x54, 0x1c, 0x24, 0xf6, 0xce, 0x86, 0xbe, 0x16, 0x2e, 0x66, 0x5e, 0x2b, 0x13, 0x5b, 0x63, 0xcb, 0xf3, 0xbb, 0x83, 0x2, 0x3a, 0x72, 0x4a, 0xe2, 0xda, 0x92, 0xaa, 0xdf, 0xe7, 0xaf, 0x97, 0x3f, 0x7, 0x4f, 0x77, 0xa5, 0x9d, 0xd5, 0xed, 0x45, 0x7d, 0x35, 0xd, 0x78, 0x40, 0x8, 0x30, 0x98, 0xa0, 0xe8, 0xd0, 0xf7, 0xcf, 0x87, 0xbf, 0x17, 0x2f, 0x67, 0x5f, 0x2a, 0x12, 0x5a, 0x62, 0xca, 0xf2, 0xba, 0x82, 0x50, 0x68, 0x20, 0x18, 0xb0, 0x88, 0xc0, 0xf8, 0x8d, 0xb5, 0xfd, 0xc5, 0x6d, 0x55, 0x1d, 0x25, 0xa4, 0x9c, 0xd4, 0xec, 0x44, 0x7c, 0x34, 0xc, 0x79, 0x41, 0x9, 0x31, 0x99, 0xa1, 0xe9, 0xd1, 0x3, 0x3b, 0x73, 0x4b, 0xe3, 0xdb, 0x93, 0xab, 0xde, 0xe6, 0xae, 0x96, 0x3e, 0x6, 0x4e, 0x76},
+ {0x0, 0x39, 0x72, 0x4b, 0xe4, 0xdd, 0x96, 0xaf, 0xd5, 0xec, 0xa7, 0x9e, 0x31, 0x8, 0x43, 0x7a, 0xb7, 0x8e, 0xc5, 0xfc, 0x53, 0x6a, 0x21, 0x18, 0x62, 0x5b, 0x10, 0x29, 0x86, 0xbf, 0xf4, 0xcd, 0x73, 0x4a, 0x1, 0x38, 0x97, 0xae, 0xe5, 0xdc, 0xa6, 0x9f, 0xd4, 0xed, 0x42, 0x7b, 0x30, 0x9, 0xc4, 0xfd, 0xb6, 0x8f, 0x20, 0x19, 0x52, 0x6b, 0x11, 0x28, 0x63, 0x5a, 0xf5, 0xcc, 0x87, 0xbe, 0xe6, 0xdf, 0x94, 0xad, 0x2, 0x3b, 0x70, 0x49, 0x33, 0xa, 0x41, 0x78, 0xd7, 0xee, 0xa5, 0x9c, 0x51, 0x68, 0x23, 0x1a, 0xb5, 0x8c, 0xc7, 0xfe, 0x84, 0xbd, 0xf6, 0xcf, 0x60, 0x59, 0x12, 0x2b, 0x95, 0xac, 0xe7, 0xde, 0x71, 0x48, 0x3, 0x3a, 0x40, 0x79, 0x32, 0xb, 0xa4, 0x9d, 0xd6, 0xef, 0x22, 0x1b, 0x50, 0x69, 0xc6, 0xff, 0xb4, 0x8d, 0xf7, 0xce, 0x85, 0xbc, 0x13, 0x2a, 0x61, 0x58, 0xd1, 0xe8, 0xa3, 0x9a, 0x35, 0xc, 0x47, 0x7e, 0x4, 0x3d, 0x76, 0x4f, 0xe0, 0xd9, 0x92, 0xab, 0x66, 0x5f, 0x14, 0x2d, 0x82, 0xbb, 0xf0, 0xc9, 0xb3, 0x8a, 0xc1, 0xf8, 0x57, 0x6e, 0x25, 0x1c, 0xa2, 0x9b, 0xd0, 0xe9, 0x46, 0x7f, 0x34, 0xd, 0x77, 0x4e, 0x5, 0x3c, 0x93, 0xaa, 0xe1, 0xd8, 0x15, 0x2c, 0x67, 0x5e, 0xf1, 0xc8, 0x83, 0xba, 0xc0, 0xf9, 0xb2, 0x8b, 0x24, 0x1d, 0x56, 0x6f, 0x37, 0xe, 0x45, 0x7c, 0xd3, 0xea, 0xa1, 0x98, 0xe2, 0xdb, 0x90, 0xa9, 0x6, 0x3f, 0x74, 0x4d, 0x80, 0xb9, 0xf2, 0xcb, 0x64, 0x5d, 0x16, 0x2f, 0x55, 0x6c, 0x27, 0x1e, 0xb1, 0x88, 0xc3, 0xfa, 0x44, 0x7d, 0x36, 0xf, 0xa0, 0x99, 0xd2, 0xeb, 0x91, 0xa8, 0xe3, 0xda, 0x75, 0x4c, 0x7, 0x3e, 0xf3, 0xca, 0x81, 0xb8, 0x17, 0x2e, 0x65, 0x5c, 0x26, 0x1f, 0x54, 0x6d, 0xc2, 0xfb, 0xb0, 0x89},
+ {0x0, 0x3a, 0x74, 0x4e, 0xe8, 0xd2, 0x9c, 0xa6, 0xcd, 0xf7, 0xb9, 0x83, 0x25, 0x1f, 0x51, 0x6b, 0x87, 0xbd, 0xf3, 0xc9, 0x6f, 0x55, 0x1b, 0x21, 0x4a, 0x70, 0x3e, 0x4, 0xa2, 0x98, 0xd6, 0xec, 0x13, 0x29, 0x67, 0x5d, 0xfb, 0xc1, 0x8f, 0xb5, 0xde, 0xe4, 0xaa, 0x90, 0x36, 0xc, 0x42, 0x78, 0x94, 0xae, 0xe0, 0xda, 0x7c, 0x46, 0x8, 0x32, 0x59, 0x63, 0x2d, 0x17, 0xb1, 0x8b, 0xc5, 0xff, 0x26, 0x1c, 0x52, 0x68, 0xce, 0xf4, 0xba, 0x80, 0xeb, 0xd1, 0x9f, 0xa5, 0x3, 0x39, 0x77, 0x4d, 0xa1, 0x9b, 0xd5, 0xef, 0x49, 0x73, 0x3d, 0x7, 0x6c, 0x56, 0x18, 0x22, 0x84, 0xbe, 0xf0, 0xca, 0x35, 0xf, 0x41, 0x7b, 0xdd, 0xe7, 0xa9, 0x93, 0xf8, 0xc2, 0x8c, 0xb6, 0x10, 0x2a, 0x64, 0x5e, 0xb2, 0x88, 0xc6, 0xfc, 0x5a, 0x60, 0x2e, 0x14, 0x7f, 0x45, 0xb, 0x31, 0x97, 0xad, 0xe3, 0xd9, 0x4c, 0x76, 0x38, 0x2, 0xa4, 0x9e, 0xd0, 0xea, 0x81, 0xbb, 0xf5, 0xcf, 0x69, 0x53, 0x1d, 0x27, 0xcb, 0xf1, 0xbf, 0x85, 0x23, 0x19, 0x57, 0x6d, 0x6, 0x3c, 0x72, 0x48, 0xee, 0xd4, 0x9a, 0xa0, 0x5f, 0x65, 0x2b, 0x11, 0xb7, 0x8d, 0xc3, 0xf9, 0x92, 0xa8, 0xe6, 0xdc, 0x7a, 0x40, 0xe, 0x34, 0xd8, 0xe2, 0xac, 0x96, 0x30, 0xa, 0x44, 0x7e, 0x15, 0x2f, 0x61, 0x5b, 0xfd, 0xc7, 0x89, 0xb3, 0x6a, 0x50, 0x1e, 0x24, 0x82, 0xb8, 0xf6, 0xcc, 0xa7, 0x9d, 0xd3, 0xe9, 0x4f, 0x75, 0x3b, 0x1, 0xed, 0xd7, 0x99, 0xa3, 0x5, 0x3f, 0x71, 0x4b, 0x20, 0x1a, 0x54, 0x6e, 0xc8, 0xf2, 0xbc, 0x86, 0x79, 0x43, 0xd, 0x37, 0x91, 0xab, 0xe5, 0xdf, 0xb4, 0x8e, 0xc0, 0xfa, 0x5c, 0x66, 0x28, 0x12, 0xfe, 0xc4, 0x8a, 0xb0, 0x16, 0x2c, 0x62, 0x58, 0x33, 0x9, 0x47, 0x7d, 0xdb, 0xe1, 0xaf, 0x95},
+ {0x0, 0x3b, 0x76, 0x4d, 0xec, 0xd7, 0x9a, 0xa1, 0xc5, 0xfe, 0xb3, 0x88, 0x29, 0x12, 0x5f, 0x64, 0x97, 0xac, 0xe1, 0xda, 0x7b, 0x40, 0xd, 0x36, 0x52, 0x69, 0x24, 0x1f, 0xbe, 0x85, 0xc8, 0xf3, 0x33, 0x8, 0x45, 0x7e, 0xdf, 0xe4, 0xa9, 0x92, 0xf6, 0xcd, 0x80, 0xbb, 0x1a, 0x21, 0x6c, 0x57, 0xa4, 0x9f, 0xd2, 0xe9, 0x48, 0x73, 0x3e, 0x5, 0x61, 0x5a, 0x17, 0x2c, 0x8d, 0xb6, 0xfb, 0xc0, 0x66, 0x5d, 0x10, 0x2b, 0x8a, 0xb1, 0xfc, 0xc7, 0xa3, 0x98, 0xd5, 0xee, 0x4f, 0x74, 0x39, 0x2, 0xf1, 0xca, 0x87, 0xbc, 0x1d, 0x26, 0x6b, 0x50, 0x34, 0xf, 0x42, 0x79, 0xd8, 0xe3, 0xae, 0x95, 0x55, 0x6e, 0x23, 0x18, 0xb9, 0x82, 0xcf, 0xf4, 0x90, 0xab, 0xe6, 0xdd, 0x7c, 0x47, 0xa, 0x31, 0xc2, 0xf9, 0xb4, 0x8f, 0x2e, 0x15, 0x58, 0x63, 0x7, 0x3c, 0x71, 0x4a, 0xeb, 0xd0, 0x9d, 0xa6, 0xcc, 0xf7, 0xba, 0x81, 0x20, 0x1b, 0x56, 0x6d, 0x9, 0x32, 0x7f, 0x44, 0xe5, 0xde, 0x93, 0xa8, 0x5b, 0x60, 0x2d, 0x16, 0xb7, 0x8c, 0xc1, 0xfa, 0x9e, 0xa5, 0xe8, 0xd3, 0x72, 0x49, 0x4, 0x3f, 0xff, 0xc4, 0x89, 0xb2, 0x13, 0x28, 0x65, 0x5e, 0x3a, 0x1, 0x4c, 0x77, 0xd6, 0xed, 0xa0, 0x9b, 0x68, 0x53, 0x1e, 0x25, 0x84, 0xbf, 0xf2, 0xc9, 0xad, 0x96, 0xdb, 0xe0, 0x41, 0x7a, 0x37, 0xc, 0xaa, 0x91, 0xdc, 0xe7, 0x46, 0x7d, 0x30, 0xb, 0x6f, 0x54, 0x19, 0x22, 0x83, 0xb8, 0xf5, 0xce, 0x3d, 0x6, 0x4b, 0x70, 0xd1, 0xea, 0xa7, 0x9c, 0xf8, 0xc3, 0x8e, 0xb5, 0x14, 0x2f, 0x62, 0x59, 0x99, 0xa2, 0xef, 0xd4, 0x75, 0x4e, 0x3, 0x38, 0x5c, 0x67, 0x2a, 0x11, 0xb0, 0x8b, 0xc6, 0xfd, 0xe, 0x35, 0x78, 0x43, 0xe2, 0xd9, 0x94, 0xaf, 0xcb, 0xf0, 0xbd, 0x86, 0x27, 0x1c, 0x51, 0x6a},
+ {0x0, 0x3c, 0x78, 0x44, 0xf0, 0xcc, 0x88, 0xb4, 0xfd, 0xc1, 0x85, 0xb9, 0xd, 0x31, 0x75, 0x49, 0xe7, 0xdb, 0x9f, 0xa3, 0x17, 0x2b, 0x6f, 0x53, 0x1a, 0x26, 0x62, 0x5e, 0xea, 0xd6, 0x92, 0xae, 0xd3, 0xef, 0xab, 0x97, 0x23, 0x1f, 0x5b, 0x67, 0x2e, 0x12, 0x56, 0x6a, 0xde, 0xe2, 0xa6, 0x9a, 0x34, 0x8, 0x4c, 0x70, 0xc4, 0xf8, 0xbc, 0x80, 0xc9, 0xf5, 0xb1, 0x8d, 0x39, 0x5, 0x41, 0x7d, 0xbb, 0x87, 0xc3, 0xff, 0x4b, 0x77, 0x33, 0xf, 0x46, 0x7a, 0x3e, 0x2, 0xb6, 0x8a, 0xce, 0xf2, 0x5c, 0x60, 0x24, 0x18, 0xac, 0x90, 0xd4, 0xe8, 0xa1, 0x9d, 0xd9, 0xe5, 0x51, 0x6d, 0x29, 0x15, 0x68, 0x54, 0x10, 0x2c, 0x98, 0xa4, 0xe0, 0xdc, 0x95, 0xa9, 0xed, 0xd1, 0x65, 0x59, 0x1d, 0x21, 0x8f, 0xb3, 0xf7, 0xcb, 0x7f, 0x43, 0x7, 0x3b, 0x72, 0x4e, 0xa, 0x36, 0x82, 0xbe, 0xfa, 0xc6, 0x6b, 0x57, 0x13, 0x2f, 0x9b, 0xa7, 0xe3, 0xdf, 0x96, 0xaa, 0xee, 0xd2, 0x66, 0x5a, 0x1e, 0x22, 0x8c, 0xb0, 0xf4, 0xc8, 0x7c, 0x40, 0x4, 0x38, 0x71, 0x4d, 0x9, 0x35, 0x81, 0xbd, 0xf9, 0xc5, 0xb8, 0x84, 0xc0, 0xfc, 0x48, 0x74, 0x30, 0xc, 0x45, 0x79, 0x3d, 0x1, 0xb5, 0x89, 0xcd, 0xf1, 0x5f, 0x63, 0x27, 0x1b, 0xaf, 0x93, 0xd7, 0xeb, 0xa2, 0x9e, 0xda, 0xe6, 0x52, 0x6e, 0x2a, 0x16, 0xd0, 0xec, 0xa8, 0x94, 0x20, 0x1c, 0x58, 0x64, 0x2d, 0x11, 0x55, 0x69, 0xdd, 0xe1, 0xa5, 0x99, 0x37, 0xb, 0x4f, 0x73, 0xc7, 0xfb, 0xbf, 0x83, 0xca, 0xf6, 0xb2, 0x8e, 0x3a, 0x6, 0x42, 0x7e, 0x3, 0x3f, 0x7b, 0x47, 0xf3, 0xcf, 0x8b, 0xb7, 0xfe, 0xc2, 0x86, 0xba, 0xe, 0x32, 0x76, 0x4a, 0xe4, 0xd8, 0x9c, 0xa0, 0x14, 0x28, 0x6c, 0x50, 0x19, 0x25, 0x61, 0x5d, 0xe9, 0xd5, 0x91, 0xad},
+ {0x0, 0x3d, 0x7a, 0x47, 0xf4, 0xc9, 0x8e, 0xb3, 0xf5, 0xc8, 0x8f, 0xb2, 0x1, 0x3c, 0x7b, 0x46, 0xf7, 0xca, 0x8d, 0xb0, 0x3, 0x3e, 0x79, 0x44, 0x2, 0x3f, 0x78, 0x45, 0xf6, 0xcb, 0x8c, 0xb1, 0xf3, 0xce, 0x89, 0xb4, 0x7, 0x3a, 0x7d, 0x40, 0x6, 0x3b, 0x7c, 0x41, 0xf2, 0xcf, 0x88, 0xb5, 0x4, 0x39, 0x7e, 0x43, 0xf0, 0xcd, 0x8a, 0xb7, 0xf1, 0xcc, 0x8b, 0xb6, 0x5, 0x38, 0x7f, 0x42, 0xfb, 0xc6, 0x81, 0xbc, 0xf, 0x32, 0x75, 0x48, 0xe, 0x33, 0x74, 0x49, 0xfa, 0xc7, 0x80, 0xbd, 0xc, 0x31, 0x76, 0x4b, 0xf8, 0xc5, 0x82, 0xbf, 0xf9, 0xc4, 0x83, 0xbe, 0xd, 0x30, 0x77, 0x4a, 0x8, 0x35, 0x72, 0x4f, 0xfc, 0xc1, 0x86, 0xbb, 0xfd, 0xc0, 0x87, 0xba, 0x9, 0x34, 0x73, 0x4e, 0xff, 0xc2, 0x85, 0xb8, 0xb, 0x36, 0x71, 0x4c, 0xa, 0x37, 0x70, 0x4d, 0xfe, 0xc3, 0x84, 0xb9, 0xeb, 0xd6, 0x91, 0xac, 0x1f, 0x22, 0x65, 0x58, 0x1e, 0x23, 0x64, 0x59, 0xea, 0xd7, 0x90, 0xad, 0x1c, 0x21, 0x66, 0x5b, 0xe8, 0xd5, 0x92, 0xaf, 0xe9, 0xd4, 0x93, 0xae, 0x1d, 0x20, 0x67, 0x5a, 0x18, 0x25, 0x62, 0x5f, 0xec, 0xd1, 0x96, 0xab, 0xed, 0xd0, 0x97, 0xaa, 0x19, 0x24, 0x63, 0x5e, 0xef, 0xd2, 0x95, 0xa8, 0x1b, 0x26, 0x61, 0x5c, 0x1a, 0x27, 0x60, 0x5d, 0xee, 0xd3, 0x94, 0xa9, 0x10, 0x2d, 0x6a, 0x57, 0xe4, 0xd9, 0x9e, 0xa3, 0xe5, 0xd8, 0x9f, 0xa2, 0x11, 0x2c, 0x6b, 0x56, 0xe7, 0xda, 0x9d, 0xa0, 0x13, 0x2e, 0x69, 0x54, 0x12, 0x2f, 0x68, 0x55, 0xe6, 0xdb, 0x9c, 0xa1, 0xe3, 0xde, 0x99, 0xa4, 0x17, 0x2a, 0x6d, 0x50, 0x16, 0x2b, 0x6c, 0x51, 0xe2, 0xdf, 0x98, 0xa5, 0x14, 0x29, 0x6e, 0x53, 0xe0, 0xdd, 0x9a, 0xa7, 0xe1, 0xdc, 0x9b, 0xa6, 0x15, 0x28, 0x6f, 0x52},
+ {0x0, 0x3e, 0x7c, 0x42, 0xf8, 0xc6, 0x84, 0xba, 0xed, 0xd3, 0x91, 0xaf, 0x15, 0x2b, 0x69, 0x57, 0xc7, 0xf9, 0xbb, 0x85, 0x3f, 0x1, 0x43, 0x7d, 0x2a, 0x14, 0x56, 0x68, 0xd2, 0xec, 0xae, 0x90, 0x93, 0xad, 0xef, 0xd1, 0x6b, 0x55, 0x17, 0x29, 0x7e, 0x40, 0x2, 0x3c, 0x86, 0xb8, 0xfa, 0xc4, 0x54, 0x6a, 0x28, 0x16, 0xac, 0x92, 0xd0, 0xee, 0xb9, 0x87, 0xc5, 0xfb, 0x41, 0x7f, 0x3d, 0x3, 0x3b, 0x5, 0x47, 0x79, 0xc3, 0xfd, 0xbf, 0x81, 0xd6, 0xe8, 0xaa, 0x94, 0x2e, 0x10, 0x52, 0x6c, 0xfc, 0xc2, 0x80, 0xbe, 0x4, 0x3a, 0x78, 0x46, 0x11, 0x2f, 0x6d, 0x53, 0xe9, 0xd7, 0x95, 0xab, 0xa8, 0x96, 0xd4, 0xea, 0x50, 0x6e, 0x2c, 0x12, 0x45, 0x7b, 0x39, 0x7, 0xbd, 0x83, 0xc1, 0xff, 0x6f, 0x51, 0x13, 0x2d, 0x97, 0xa9, 0xeb, 0xd5, 0x82, 0xbc, 0xfe, 0xc0, 0x7a, 0x44, 0x6, 0x38, 0x76, 0x48, 0xa, 0x34, 0x8e, 0xb0, 0xf2, 0xcc, 0x9b, 0xa5, 0xe7, 0xd9, 0x63, 0x5d, 0x1f, 0x21, 0xb1, 0x8f, 0xcd, 0xf3, 0x49, 0x77, 0x35, 0xb, 0x5c, 0x62, 0x20, 0x1e, 0xa4, 0x9a, 0xd8, 0xe6, 0xe5, 0xdb, 0x99, 0xa7, 0x1d, 0x23, 0x61, 0x5f, 0x8, 0x36, 0x74, 0x4a, 0xf0, 0xce, 0x8c, 0xb2, 0x22, 0x1c, 0x5e, 0x60, 0xda, 0xe4, 0xa6, 0x98, 0xcf, 0xf1, 0xb3, 0x8d, 0x37, 0x9, 0x4b, 0x75, 0x4d, 0x73, 0x31, 0xf, 0xb5, 0x8b, 0xc9, 0xf7, 0xa0, 0x9e, 0xdc, 0xe2, 0x58, 0x66, 0x24, 0x1a, 0x8a, 0xb4, 0xf6, 0xc8, 0x72, 0x4c, 0xe, 0x30, 0x67, 0x59, 0x1b, 0x25, 0x9f, 0xa1, 0xe3, 0xdd, 0xde, 0xe0, 0xa2, 0x9c, 0x26, 0x18, 0x5a, 0x64, 0x33, 0xd, 0x4f, 0x71, 0xcb, 0xf5, 0xb7, 0x89, 0x19, 0x27, 0x65, 0x5b, 0xe1, 0xdf, 0x9d, 0xa3, 0xf4, 0xca, 0x88, 0xb6, 0xc, 0x32, 0x70, 0x4e},
+ {0x0, 0x3f, 0x7e, 0x41, 0xfc, 0xc3, 0x82, 0xbd, 0xe5, 0xda, 0x9b, 0xa4, 0x19, 0x26, 0x67, 0x58, 0xd7, 0xe8, 0xa9, 0x96, 0x2b, 0x14, 0x55, 0x6a, 0x32, 0xd, 0x4c, 0x73, 0xce, 0xf1, 0xb0, 0x8f, 0xb3, 0x8c, 0xcd, 0xf2, 0x4f, 0x70, 0x31, 0xe, 0x56, 0x69, 0x28, 0x17, 0xaa, 0x95, 0xd4, 0xeb, 0x64, 0x5b, 0x1a, 0x25, 0x98, 0xa7, 0xe6, 0xd9, 0x81, 0xbe, 0xff, 0xc0, 0x7d, 0x42, 0x3, 0x3c, 0x7b, 0x44, 0x5, 0x3a, 0x87, 0xb8, 0xf9, 0xc6, 0x9e, 0xa1, 0xe0, 0xdf, 0x62, 0x5d, 0x1c, 0x23, 0xac, 0x93, 0xd2, 0xed, 0x50, 0x6f, 0x2e, 0x11, 0x49, 0x76, 0x37, 0x8, 0xb5, 0x8a, 0xcb, 0xf4, 0xc8, 0xf7, 0xb6, 0x89, 0x34, 0xb, 0x4a, 0x75, 0x2d, 0x12, 0x53, 0x6c, 0xd1, 0xee, 0xaf, 0x90, 0x1f, 0x20, 0x61, 0x5e, 0xe3, 0xdc, 0x9d, 0xa2, 0xfa, 0xc5, 0x84, 0xbb, 0x6, 0x39, 0x78, 0x47, 0xf6, 0xc9, 0x88, 0xb7, 0xa, 0x35, 0x74, 0x4b, 0x13, 0x2c, 0x6d, 0x52, 0xef, 0xd0, 0x91, 0xae, 0x21, 0x1e, 0x5f, 0x60, 0xdd, 0xe2, 0xa3, 0x9c, 0xc4, 0xfb, 0xba, 0x85, 0x38, 0x7, 0x46, 0x79, 0x45, 0x7a, 0x3b, 0x4, 0xb9, 0x86, 0xc7, 0xf8, 0xa0, 0x9f, 0xde, 0xe1, 0x5c, 0x63, 0x22, 0x1d, 0x92, 0xad, 0xec, 0xd3, 0x6e, 0x51, 0x10, 0x2f, 0x77, 0x48, 0x9, 0x36, 0x8b, 0xb4, 0xf5, 0xca, 0x8d, 0xb2, 0xf3, 0xcc, 0x71, 0x4e, 0xf, 0x30, 0x68, 0x57, 0x16, 0x29, 0x94, 0xab, 0xea, 0xd5, 0x5a, 0x65, 0x24, 0x1b, 0xa6, 0x99, 0xd8, 0xe7, 0xbf, 0x80, 0xc1, 0xfe, 0x43, 0x7c, 0x3d, 0x2, 0x3e, 0x1, 0x40, 0x7f, 0xc2, 0xfd, 0xbc, 0x83, 0xdb, 0xe4, 0xa5, 0x9a, 0x27, 0x18, 0x59, 0x66, 0xe9, 0xd6, 0x97, 0xa8, 0x15, 0x2a, 0x6b, 0x54, 0xc, 0x33, 0x72, 0x4d, 0xf0, 0xcf, 0x8e, 0xb1},
+ {0x0, 0x40, 0x80, 0xc0, 0x1d, 0x5d, 0x9d, 0xdd, 0x3a, 0x7a, 0xba, 0xfa, 0x27, 0x67, 0xa7, 0xe7, 0x74, 0x34, 0xf4, 0xb4, 0x69, 0x29, 0xe9, 0xa9, 0x4e, 0xe, 0xce, 0x8e, 0x53, 0x13, 0xd3, 0x93, 0xe8, 0xa8, 0x68, 0x28, 0xf5, 0xb5, 0x75, 0x35, 0xd2, 0x92, 0x52, 0x12, 0xcf, 0x8f, 0x4f, 0xf, 0x9c, 0xdc, 0x1c, 0x5c, 0x81, 0xc1, 0x1, 0x41, 0xa6, 0xe6, 0x26, 0x66, 0xbb, 0xfb, 0x3b, 0x7b, 0xcd, 0x8d, 0x4d, 0xd, 0xd0, 0x90, 0x50, 0x10, 0xf7, 0xb7, 0x77, 0x37, 0xea, 0xaa, 0x6a, 0x2a, 0xb9, 0xf9, 0x39, 0x79, 0xa4, 0xe4, 0x24, 0x64, 0x83, 0xc3, 0x3, 0x43, 0x9e, 0xde, 0x1e, 0x5e, 0x25, 0x65, 0xa5, 0xe5, 0x38, 0x78, 0xb8, 0xf8, 0x1f, 0x5f, 0x9f, 0xdf, 0x2, 0x42, 0x82, 0xc2, 0x51, 0x11, 0xd1, 0x91, 0x4c, 0xc, 0xcc, 0x8c, 0x6b, 0x2b, 0xeb, 0xab, 0x76, 0x36, 0xf6, 0xb6, 0x87, 0xc7, 0x7, 0x47, 0x9a, 0xda, 0x1a, 0x5a, 0xbd, 0xfd, 0x3d, 0x7d, 0xa0, 0xe0, 0x20, 0x60, 0xf3, 0xb3, 0x73, 0x33, 0xee, 0xae, 0x6e, 0x2e, 0xc9, 0x89, 0x49, 0x9, 0xd4, 0x94, 0x54, 0x14, 0x6f, 0x2f, 0xef, 0xaf, 0x72, 0x32, 0xf2, 0xb2, 0x55, 0x15, 0xd5, 0x95, 0x48, 0x8, 0xc8, 0x88, 0x1b, 0x5b, 0x9b, 0xdb, 0x6, 0x46, 0x86, 0xc6, 0x21, 0x61, 0xa1, 0xe1, 0x3c, 0x7c, 0xbc, 0xfc, 0x4a, 0xa, 0xca, 0x8a, 0x57, 0x17, 0xd7, 0x97, 0x70, 0x30, 0xf0, 0xb0, 0x6d, 0x2d, 0xed, 0xad, 0x3e, 0x7e, 0xbe, 0xfe, 0x23, 0x63, 0xa3, 0xe3, 0x4, 0x44, 0x84, 0xc4, 0x19, 0x59, 0x99, 0xd9, 0xa2, 0xe2, 0x22, 0x62, 0xbf, 0xff, 0x3f, 0x7f, 0x98, 0xd8, 0x18, 0x58, 0x85, 0xc5, 0x5, 0x45, 0xd6, 0x96, 0x56, 0x16, 0xcb, 0x8b, 0x4b, 0xb, 0xec, 0xac, 0x6c, 0x2c, 0xf1, 0xb1, 0x71, 0x31},
+ {0x0, 0x41, 0x82, 0xc3, 0x19, 0x58, 0x9b, 0xda, 0x32, 0x73, 0xb0, 0xf1, 0x2b, 0x6a, 0xa9, 0xe8, 0x64, 0x25, 0xe6, 0xa7, 0x7d, 0x3c, 0xff, 0xbe, 0x56, 0x17, 0xd4, 0x95, 0x4f, 0xe, 0xcd, 0x8c, 0xc8, 0x89, 0x4a, 0xb, 0xd1, 0x90, 0x53, 0x12, 0xfa, 0xbb, 0x78, 0x39, 0xe3, 0xa2, 0x61, 0x20, 0xac, 0xed, 0x2e, 0x6f, 0xb5, 0xf4, 0x37, 0x76, 0x9e, 0xdf, 0x1c, 0x5d, 0x87, 0xc6, 0x5, 0x44, 0x8d, 0xcc, 0xf, 0x4e, 0x94, 0xd5, 0x16, 0x57, 0xbf, 0xfe, 0x3d, 0x7c, 0xa6, 0xe7, 0x24, 0x65, 0xe9, 0xa8, 0x6b, 0x2a, 0xf0, 0xb1, 0x72, 0x33, 0xdb, 0x9a, 0x59, 0x18, 0xc2, 0x83, 0x40, 0x1, 0x45, 0x4, 0xc7, 0x86, 0x5c, 0x1d, 0xde, 0x9f, 0x77, 0x36, 0xf5, 0xb4, 0x6e, 0x2f, 0xec, 0xad, 0x21, 0x60, 0xa3, 0xe2, 0x38, 0x79, 0xba, 0xfb, 0x13, 0x52, 0x91, 0xd0, 0xa, 0x4b, 0x88, 0xc9, 0x7, 0x46, 0x85, 0xc4, 0x1e, 0x5f, 0x9c, 0xdd, 0x35, 0x74, 0xb7, 0xf6, 0x2c, 0x6d, 0xae, 0xef, 0x63, 0x22, 0xe1, 0xa0, 0x7a, 0x3b, 0xf8, 0xb9, 0x51, 0x10, 0xd3, 0x92, 0x48, 0x9, 0xca, 0x8b, 0xcf, 0x8e, 0x4d, 0xc, 0xd6, 0x97, 0x54, 0x15, 0xfd, 0xbc, 0x7f, 0x3e, 0xe4, 0xa5, 0x66, 0x27, 0xab, 0xea, 0x29, 0x68, 0xb2, 0xf3, 0x30, 0x71, 0x99, 0xd8, 0x1b, 0x5a, 0x80, 0xc1, 0x2, 0x43, 0x8a, 0xcb, 0x8, 0x49, 0x93, 0xd2, 0x11, 0x50, 0xb8, 0xf9, 0x3a, 0x7b, 0xa1, 0xe0, 0x23, 0x62, 0xee, 0xaf, 0x6c, 0x2d, 0xf7, 0xb6, 0x75, 0x34, 0xdc, 0x9d, 0x5e, 0x1f, 0xc5, 0x84, 0x47, 0x6, 0x42, 0x3, 0xc0, 0x81, 0x5b, 0x1a, 0xd9, 0x98, 0x70, 0x31, 0xf2, 0xb3, 0x69, 0x28, 0xeb, 0xaa, 0x26, 0x67, 0xa4, 0xe5, 0x3f, 0x7e, 0xbd, 0xfc, 0x14, 0x55, 0x96, 0xd7, 0xd, 0x4c, 0x8f, 0xce},
+ {0x0, 0x42, 0x84, 0xc6, 0x15, 0x57, 0x91, 0xd3, 0x2a, 0x68, 0xae, 0xec, 0x3f, 0x7d, 0xbb, 0xf9, 0x54, 0x16, 0xd0, 0x92, 0x41, 0x3, 0xc5, 0x87, 0x7e, 0x3c, 0xfa, 0xb8, 0x6b, 0x29, 0xef, 0xad, 0xa8, 0xea, 0x2c, 0x6e, 0xbd, 0xff, 0x39, 0x7b, 0x82, 0xc0, 0x6, 0x44, 0x97, 0xd5, 0x13, 0x51, 0xfc, 0xbe, 0x78, 0x3a, 0xe9, 0xab, 0x6d, 0x2f, 0xd6, 0x94, 0x52, 0x10, 0xc3, 0x81, 0x47, 0x5, 0x4d, 0xf, 0xc9, 0x8b, 0x58, 0x1a, 0xdc, 0x9e, 0x67, 0x25, 0xe3, 0xa1, 0x72, 0x30, 0xf6, 0xb4, 0x19, 0x5b, 0x9d, 0xdf, 0xc, 0x4e, 0x88, 0xca, 0x33, 0x71, 0xb7, 0xf5, 0x26, 0x64, 0xa2, 0xe0, 0xe5, 0xa7, 0x61, 0x23, 0xf0, 0xb2, 0x74, 0x36, 0xcf, 0x8d, 0x4b, 0x9, 0xda, 0x98, 0x5e, 0x1c, 0xb1, 0xf3, 0x35, 0x77, 0xa4, 0xe6, 0x20, 0x62, 0x9b, 0xd9, 0x1f, 0x5d, 0x8e, 0xcc, 0xa, 0x48, 0x9a, 0xd8, 0x1e, 0x5c, 0x8f, 0xcd, 0xb, 0x49, 0xb0, 0xf2, 0x34, 0x76, 0xa5, 0xe7, 0x21, 0x63, 0xce, 0x8c, 0x4a, 0x8, 0xdb, 0x99, 0x5f, 0x1d, 0xe4, 0xa6, 0x60, 0x22, 0xf1, 0xb3, 0x75, 0x37, 0x32, 0x70, 0xb6, 0xf4, 0x27, 0x65, 0xa3, 0xe1, 0x18, 0x5a, 0x9c, 0xde, 0xd, 0x4f, 0x89, 0xcb, 0x66, 0x24, 0xe2, 0xa0, 0x73, 0x31, 0xf7, 0xb5, 0x4c, 0xe, 0xc8, 0x8a, 0x59, 0x1b, 0xdd, 0x9f, 0xd7, 0x95, 0x53, 0x11, 0xc2, 0x80, 0x46, 0x4, 0xfd, 0xbf, 0x79, 0x3b, 0xe8, 0xaa, 0x6c, 0x2e, 0x83, 0xc1, 0x7, 0x45, 0x96, 0xd4, 0x12, 0x50, 0xa9, 0xeb, 0x2d, 0x6f, 0xbc, 0xfe, 0x38, 0x7a, 0x7f, 0x3d, 0xfb, 0xb9, 0x6a, 0x28, 0xee, 0xac, 0x55, 0x17, 0xd1, 0x93, 0x40, 0x2, 0xc4, 0x86, 0x2b, 0x69, 0xaf, 0xed, 0x3e, 0x7c, 0xba, 0xf8, 0x1, 0x43, 0x85, 0xc7, 0x14, 0x56, 0x90, 0xd2},
+ {0x0, 0x43, 0x86, 0xc5, 0x11, 0x52, 0x97, 0xd4, 0x22, 0x61, 0xa4, 0xe7, 0x33, 0x70, 0xb5, 0xf6, 0x44, 0x7, 0xc2, 0x81, 0x55, 0x16, 0xd3, 0x90, 0x66, 0x25, 0xe0, 0xa3, 0x77, 0x34, 0xf1, 0xb2, 0x88, 0xcb, 0xe, 0x4d, 0x99, 0xda, 0x1f, 0x5c, 0xaa, 0xe9, 0x2c, 0x6f, 0xbb, 0xf8, 0x3d, 0x7e, 0xcc, 0x8f, 0x4a, 0x9, 0xdd, 0x9e, 0x5b, 0x18, 0xee, 0xad, 0x68, 0x2b, 0xff, 0xbc, 0x79, 0x3a, 0xd, 0x4e, 0x8b, 0xc8, 0x1c, 0x5f, 0x9a, 0xd9, 0x2f, 0x6c, 0xa9, 0xea, 0x3e, 0x7d, 0xb8, 0xfb, 0x49, 0xa, 0xcf, 0x8c, 0x58, 0x1b, 0xde, 0x9d, 0x6b, 0x28, 0xed, 0xae, 0x7a, 0x39, 0xfc, 0xbf, 0x85, 0xc6, 0x3, 0x40, 0x94, 0xd7, 0x12, 0x51, 0xa7, 0xe4, 0x21, 0x62, 0xb6, 0xf5, 0x30, 0x73, 0xc1, 0x82, 0x47, 0x4, 0xd0, 0x93, 0x56, 0x15, 0xe3, 0xa0, 0x65, 0x26, 0xf2, 0xb1, 0x74, 0x37, 0x1a, 0x59, 0x9c, 0xdf, 0xb, 0x48, 0x8d, 0xce, 0x38, 0x7b, 0xbe, 0xfd, 0x29, 0x6a, 0xaf, 0xec, 0x5e, 0x1d, 0xd8, 0x9b, 0x4f, 0xc, 0xc9, 0x8a, 0x7c, 0x3f, 0xfa, 0xb9, 0x6d, 0x2e, 0xeb, 0xa8, 0x92, 0xd1, 0x14, 0x57, 0x83, 0xc0, 0x5, 0x46, 0xb0, 0xf3, 0x36, 0x75, 0xa1, 0xe2, 0x27, 0x64, 0xd6, 0x95, 0x50, 0x13, 0xc7, 0x84, 0x41, 0x2, 0xf4, 0xb7, 0x72, 0x31, 0xe5, 0xa6, 0x63, 0x20, 0x17, 0x54, 0x91, 0xd2, 0x6, 0x45, 0x80, 0xc3, 0x35, 0x76, 0xb3, 0xf0, 0x24, 0x67, 0xa2, 0xe1, 0x53, 0x10, 0xd5, 0x96, 0x42, 0x1, 0xc4, 0x87, 0x71, 0x32, 0xf7, 0xb4, 0x60, 0x23, 0xe6, 0xa5, 0x9f, 0xdc, 0x19, 0x5a, 0x8e, 0xcd, 0x8, 0x4b, 0xbd, 0xfe, 0x3b, 0x78, 0xac, 0xef, 0x2a, 0x69, 0xdb, 0x98, 0x5d, 0x1e, 0xca, 0x89, 0x4c, 0xf, 0xf9, 0xba, 0x7f, 0x3c, 0xe8, 0xab, 0x6e, 0x2d},
+ {0x0, 0x44, 0x88, 0xcc, 0xd, 0x49, 0x85, 0xc1, 0x1a, 0x5e, 0x92, 0xd6, 0x17, 0x53, 0x9f, 0xdb, 0x34, 0x70, 0xbc, 0xf8, 0x39, 0x7d, 0xb1, 0xf5, 0x2e, 0x6a, 0xa6, 0xe2, 0x23, 0x67, 0xab, 0xef, 0x68, 0x2c, 0xe0, 0xa4, 0x65, 0x21, 0xed, 0xa9, 0x72, 0x36, 0xfa, 0xbe, 0x7f, 0x3b, 0xf7, 0xb3, 0x5c, 0x18, 0xd4, 0x90, 0x51, 0x15, 0xd9, 0x9d, 0x46, 0x2, 0xce, 0x8a, 0x4b, 0xf, 0xc3, 0x87, 0xd0, 0x94, 0x58, 0x1c, 0xdd, 0x99, 0x55, 0x11, 0xca, 0x8e, 0x42, 0x6, 0xc7, 0x83, 0x4f, 0xb, 0xe4, 0xa0, 0x6c, 0x28, 0xe9, 0xad, 0x61, 0x25, 0xfe, 0xba, 0x76, 0x32, 0xf3, 0xb7, 0x7b, 0x3f, 0xb8, 0xfc, 0x30, 0x74, 0xb5, 0xf1, 0x3d, 0x79, 0xa2, 0xe6, 0x2a, 0x6e, 0xaf, 0xeb, 0x27, 0x63, 0x8c, 0xc8, 0x4, 0x40, 0x81, 0xc5, 0x9, 0x4d, 0x96, 0xd2, 0x1e, 0x5a, 0x9b, 0xdf, 0x13, 0x57, 0xbd, 0xf9, 0x35, 0x71, 0xb0, 0xf4, 0x38, 0x7c, 0xa7, 0xe3, 0x2f, 0x6b, 0xaa, 0xee, 0x22, 0x66, 0x89, 0xcd, 0x1, 0x45, 0x84, 0xc0, 0xc, 0x48, 0x93, 0xd7, 0x1b, 0x5f, 0x9e, 0xda, 0x16, 0x52, 0xd5, 0x91, 0x5d, 0x19, 0xd8, 0x9c, 0x50, 0x14, 0xcf, 0x8b, 0x47, 0x3, 0xc2, 0x86, 0x4a, 0xe, 0xe1, 0xa5, 0x69, 0x2d, 0xec, 0xa8, 0x64, 0x20, 0xfb, 0xbf, 0x73, 0x37, 0xf6, 0xb2, 0x7e, 0x3a, 0x6d, 0x29, 0xe5, 0xa1, 0x60, 0x24, 0xe8, 0xac, 0x77, 0x33, 0xff, 0xbb, 0x7a, 0x3e, 0xf2, 0xb6, 0x59, 0x1d, 0xd1, 0x95, 0x54, 0x10, 0xdc, 0x98, 0x43, 0x7, 0xcb, 0x8f, 0x4e, 0xa, 0xc6, 0x82, 0x5, 0x41, 0x8d, 0xc9, 0x8, 0x4c, 0x80, 0xc4, 0x1f, 0x5b, 0x97, 0xd3, 0x12, 0x56, 0x9a, 0xde, 0x31, 0x75, 0xb9, 0xfd, 0x3c, 0x78, 0xb4, 0xf0, 0x2b, 0x6f, 0xa3, 0xe7, 0x26, 0x62, 0xae, 0xea},
+ {0x0, 0x45, 0x8a, 0xcf, 0x9, 0x4c, 0x83, 0xc6, 0x12, 0x57, 0x98, 0xdd, 0x1b, 0x5e, 0x91, 0xd4, 0x24, 0x61, 0xae, 0xeb, 0x2d, 0x68, 0xa7, 0xe2, 0x36, 0x73, 0xbc, 0xf9, 0x3f, 0x7a, 0xb5, 0xf0, 0x48, 0xd, 0xc2, 0x87, 0x41, 0x4, 0xcb, 0x8e, 0x5a, 0x1f, 0xd0, 0x95, 0x53, 0x16, 0xd9, 0x9c, 0x6c, 0x29, 0xe6, 0xa3, 0x65, 0x20, 0xef, 0xaa, 0x7e, 0x3b, 0xf4, 0xb1, 0x77, 0x32, 0xfd, 0xb8, 0x90, 0xd5, 0x1a, 0x5f, 0x99, 0xdc, 0x13, 0x56, 0x82, 0xc7, 0x8, 0x4d, 0x8b, 0xce, 0x1, 0x44, 0xb4, 0xf1, 0x3e, 0x7b, 0xbd, 0xf8, 0x37, 0x72, 0xa6, 0xe3, 0x2c, 0x69, 0xaf, 0xea, 0x25, 0x60, 0xd8, 0x9d, 0x52, 0x17, 0xd1, 0x94, 0x5b, 0x1e, 0xca, 0x8f, 0x40, 0x5, 0xc3, 0x86, 0x49, 0xc, 0xfc, 0xb9, 0x76, 0x33, 0xf5, 0xb0, 0x7f, 0x3a, 0xee, 0xab, 0x64, 0x21, 0xe7, 0xa2, 0x6d, 0x28, 0x3d, 0x78, 0xb7, 0xf2, 0x34, 0x71, 0xbe, 0xfb, 0x2f, 0x6a, 0xa5, 0xe0, 0x26, 0x63, 0xac, 0xe9, 0x19, 0x5c, 0x93, 0xd6, 0x10, 0x55, 0x9a, 0xdf, 0xb, 0x4e, 0x81, 0xc4, 0x2, 0x47, 0x88, 0xcd, 0x75, 0x30, 0xff, 0xba, 0x7c, 0x39, 0xf6, 0xb3, 0x67, 0x22, 0xed, 0xa8, 0x6e, 0x2b, 0xe4, 0xa1, 0x51, 0x14, 0xdb, 0x9e, 0x58, 0x1d, 0xd2, 0x97, 0x43, 0x6, 0xc9, 0x8c, 0x4a, 0xf, 0xc0, 0x85, 0xad, 0xe8, 0x27, 0x62, 0xa4, 0xe1, 0x2e, 0x6b, 0xbf, 0xfa, 0x35, 0x70, 0xb6, 0xf3, 0x3c, 0x79, 0x89, 0xcc, 0x3, 0x46, 0x80, 0xc5, 0xa, 0x4f, 0x9b, 0xde, 0x11, 0x54, 0x92, 0xd7, 0x18, 0x5d, 0xe5, 0xa0, 0x6f, 0x2a, 0xec, 0xa9, 0x66, 0x23, 0xf7, 0xb2, 0x7d, 0x38, 0xfe, 0xbb, 0x74, 0x31, 0xc1, 0x84, 0x4b, 0xe, 0xc8, 0x8d, 0x42, 0x7, 0xd3, 0x96, 0x59, 0x1c, 0xda, 0x9f, 0x50, 0x15},
+ {0x0, 0x46, 0x8c, 0xca, 0x5, 0x43, 0x89, 0xcf, 0xa, 0x4c, 0x86, 0xc0, 0xf, 0x49, 0x83, 0xc5, 0x14, 0x52, 0x98, 0xde, 0x11, 0x57, 0x9d, 0xdb, 0x1e, 0x58, 0x92, 0xd4, 0x1b, 0x5d, 0x97, 0xd1, 0x28, 0x6e, 0xa4, 0xe2, 0x2d, 0x6b, 0xa1, 0xe7, 0x22, 0x64, 0xae, 0xe8, 0x27, 0x61, 0xab, 0xed, 0x3c, 0x7a, 0xb0, 0xf6, 0x39, 0x7f, 0xb5, 0xf3, 0x36, 0x70, 0xba, 0xfc, 0x33, 0x75, 0xbf, 0xf9, 0x50, 0x16, 0xdc, 0x9a, 0x55, 0x13, 0xd9, 0x9f, 0x5a, 0x1c, 0xd6, 0x90, 0x5f, 0x19, 0xd3, 0x95, 0x44, 0x2, 0xc8, 0x8e, 0x41, 0x7, 0xcd, 0x8b, 0x4e, 0x8, 0xc2, 0x84, 0x4b, 0xd, 0xc7, 0x81, 0x78, 0x3e, 0xf4, 0xb2, 0x7d, 0x3b, 0xf1, 0xb7, 0x72, 0x34, 0xfe, 0xb8, 0x77, 0x31, 0xfb, 0xbd, 0x6c, 0x2a, 0xe0, 0xa6, 0x69, 0x2f, 0xe5, 0xa3, 0x66, 0x20, 0xea, 0xac, 0x63, 0x25, 0xef, 0xa9, 0xa0, 0xe6, 0x2c, 0x6a, 0xa5, 0xe3, 0x29, 0x6f, 0xaa, 0xec, 0x26, 0x60, 0xaf, 0xe9, 0x23, 0x65, 0xb4, 0xf2, 0x38, 0x7e, 0xb1, 0xf7, 0x3d, 0x7b, 0xbe, 0xf8, 0x32, 0x74, 0xbb, 0xfd, 0x37, 0x71, 0x88, 0xce, 0x4, 0x42, 0x8d, 0xcb, 0x1, 0x47, 0x82, 0xc4, 0xe, 0x48, 0x87, 0xc1, 0xb, 0x4d, 0x9c, 0xda, 0x10, 0x56, 0x99, 0xdf, 0x15, 0x53, 0x96, 0xd0, 0x1a, 0x5c, 0x93, 0xd5, 0x1f, 0x59, 0xf0, 0xb6, 0x7c, 0x3a, 0xf5, 0xb3, 0x79, 0x3f, 0xfa, 0xbc, 0x76, 0x30, 0xff, 0xb9, 0x73, 0x35, 0xe4, 0xa2, 0x68, 0x2e, 0xe1, 0xa7, 0x6d, 0x2b, 0xee, 0xa8, 0x62, 0x24, 0xeb, 0xad, 0x67, 0x21, 0xd8, 0x9e, 0x54, 0x12, 0xdd, 0x9b, 0x51, 0x17, 0xd2, 0x94, 0x5e, 0x18, 0xd7, 0x91, 0x5b, 0x1d, 0xcc, 0x8a, 0x40, 0x6, 0xc9, 0x8f, 0x45, 0x3, 0xc6, 0x80, 0x4a, 0xc, 0xc3, 0x85, 0x4f, 0x9},
+ {0x0, 0x47, 0x8e, 0xc9, 0x1, 0x46, 0x8f, 0xc8, 0x2, 0x45, 0x8c, 0xcb, 0x3, 0x44, 0x8d, 0xca, 0x4, 0x43, 0x8a, 0xcd, 0x5, 0x42, 0x8b, 0xcc, 0x6, 0x41, 0x88, 0xcf, 0x7, 0x40, 0x89, 0xce, 0x8, 0x4f, 0x86, 0xc1, 0x9, 0x4e, 0x87, 0xc0, 0xa, 0x4d, 0x84, 0xc3, 0xb, 0x4c, 0x85, 0xc2, 0xc, 0x4b, 0x82, 0xc5, 0xd, 0x4a, 0x83, 0xc4, 0xe, 0x49, 0x80, 0xc7, 0xf, 0x48, 0x81, 0xc6, 0x10, 0x57, 0x9e, 0xd9, 0x11, 0x56, 0x9f, 0xd8, 0x12, 0x55, 0x9c, 0xdb, 0x13, 0x54, 0x9d, 0xda, 0x14, 0x53, 0x9a, 0xdd, 0x15, 0x52, 0x9b, 0xdc, 0x16, 0x51, 0x98, 0xdf, 0x17, 0x50, 0x99, 0xde, 0x18, 0x5f, 0x96, 0xd1, 0x19, 0x5e, 0x97, 0xd0, 0x1a, 0x5d, 0x94, 0xd3, 0x1b, 0x5c, 0x95, 0xd2, 0x1c, 0x5b, 0x92, 0xd5, 0x1d, 0x5a, 0x93, 0xd4, 0x1e, 0x59, 0x90, 0xd7, 0x1f, 0x58, 0x91, 0xd6, 0x20, 0x67, 0xae, 0xe9, 0x21, 0x66, 0xaf, 0xe8, 0x22, 0x65, 0xac, 0xeb, 0x23, 0x64, 0xad, 0xea, 0x24, 0x63, 0xaa, 0xed, 0x25, 0x62, 0xab, 0xec, 0x26, 0x61, 0xa8, 0xef, 0x27, 0x60, 0xa9, 0xee, 0x28, 0x6f, 0xa6, 0xe1, 0x29, 0x6e, 0xa7, 0xe0, 0x2a, 0x6d, 0xa4, 0xe3, 0x2b, 0x6c, 0xa5, 0xe2, 0x2c, 0x6b, 0xa2, 0xe5, 0x2d, 0x6a, 0xa3, 0xe4, 0x2e, 0x69, 0xa0, 0xe7, 0x2f, 0x68, 0xa1, 0xe6, 0x30, 0x77, 0xbe, 0xf9, 0x31, 0x76, 0xbf, 0xf8, 0x32, 0x75, 0xbc, 0xfb, 0x33, 0x74, 0xbd, 0xfa, 0x34, 0x73, 0xba, 0xfd, 0x35, 0x72, 0xbb, 0xfc, 0x36, 0x71, 0xb8, 0xff, 0x37, 0x70, 0xb9, 0xfe, 0x38, 0x7f, 0xb6, 0xf1, 0x39, 0x7e, 0xb7, 0xf0, 0x3a, 0x7d, 0xb4, 0xf3, 0x3b, 0x7c, 0xb5, 0xf2, 0x3c, 0x7b, 0xb2, 0xf5, 0x3d, 0x7a, 0xb3, 0xf4, 0x3e, 0x79, 0xb0, 0xf7, 0x3f, 0x78, 0xb1, 0xf6},
+ {0x0, 0x48, 0x90, 0xd8, 0x3d, 0x75, 0xad, 0xe5, 0x7a, 0x32, 0xea, 0xa2, 0x47, 0xf, 0xd7, 0x9f, 0xf4, 0xbc, 0x64, 0x2c, 0xc9, 0x81, 0x59, 0x11, 0x8e, 0xc6, 0x1e, 0x56, 0xb3, 0xfb, 0x23, 0x6b, 0xf5, 0xbd, 0x65, 0x2d, 0xc8, 0x80, 0x58, 0x10, 0x8f, 0xc7, 0x1f, 0x57, 0xb2, 0xfa, 0x22, 0x6a, 0x1, 0x49, 0x91, 0xd9, 0x3c, 0x74, 0xac, 0xe4, 0x7b, 0x33, 0xeb, 0xa3, 0x46, 0xe, 0xd6, 0x9e, 0xf7, 0xbf, 0x67, 0x2f, 0xca, 0x82, 0x5a, 0x12, 0x8d, 0xc5, 0x1d, 0x55, 0xb0, 0xf8, 0x20, 0x68, 0x3, 0x4b, 0x93, 0xdb, 0x3e, 0x76, 0xae, 0xe6, 0x79, 0x31, 0xe9, 0xa1, 0x44, 0xc, 0xd4, 0x9c, 0x2, 0x4a, 0x92, 0xda, 0x3f, 0x77, 0xaf, 0xe7, 0x78, 0x30, 0xe8, 0xa0, 0x45, 0xd, 0xd5, 0x9d, 0xf6, 0xbe, 0x66, 0x2e, 0xcb, 0x83, 0x5b, 0x13, 0x8c, 0xc4, 0x1c, 0x54, 0xb1, 0xf9, 0x21, 0x69, 0xf3, 0xbb, 0x63, 0x2b, 0xce, 0x86, 0x5e, 0x16, 0x89, 0xc1, 0x19, 0x51, 0xb4, 0xfc, 0x24, 0x6c, 0x7, 0x4f, 0x97, 0xdf, 0x3a, 0x72, 0xaa, 0xe2, 0x7d, 0x35, 0xed, 0xa5, 0x40, 0x8, 0xd0, 0x98, 0x6, 0x4e, 0x96, 0xde, 0x3b, 0x73, 0xab, 0xe3, 0x7c, 0x34, 0xec, 0xa4, 0x41, 0x9, 0xd1, 0x99, 0xf2, 0xba, 0x62, 0x2a, 0xcf, 0x87, 0x5f, 0x17, 0x88, 0xc0, 0x18, 0x50, 0xb5, 0xfd, 0x25, 0x6d, 0x4, 0x4c, 0x94, 0xdc, 0x39, 0x71, 0xa9, 0xe1, 0x7e, 0x36, 0xee, 0xa6, 0x43, 0xb, 0xd3, 0x9b, 0xf0, 0xb8, 0x60, 0x28, 0xcd, 0x85, 0x5d, 0x15, 0x8a, 0xc2, 0x1a, 0x52, 0xb7, 0xff, 0x27, 0x6f, 0xf1, 0xb9, 0x61, 0x29, 0xcc, 0x84, 0x5c, 0x14, 0x8b, 0xc3, 0x1b, 0x53, 0xb6, 0xfe, 0x26, 0x6e, 0x5, 0x4d, 0x95, 0xdd, 0x38, 0x70, 0xa8, 0xe0, 0x7f, 0x37, 0xef, 0xa7, 0x42, 0xa, 0xd2, 0x9a},
+ {0x0, 0x49, 0x92, 0xdb, 0x39, 0x70, 0xab, 0xe2, 0x72, 0x3b, 0xe0, 0xa9, 0x4b, 0x2, 0xd9, 0x90, 0xe4, 0xad, 0x76, 0x3f, 0xdd, 0x94, 0x4f, 0x6, 0x96, 0xdf, 0x4, 0x4d, 0xaf, 0xe6, 0x3d, 0x74, 0xd5, 0x9c, 0x47, 0xe, 0xec, 0xa5, 0x7e, 0x37, 0xa7, 0xee, 0x35, 0x7c, 0x9e, 0xd7, 0xc, 0x45, 0x31, 0x78, 0xa3, 0xea, 0x8, 0x41, 0x9a, 0xd3, 0x43, 0xa, 0xd1, 0x98, 0x7a, 0x33, 0xe8, 0xa1, 0xb7, 0xfe, 0x25, 0x6c, 0x8e, 0xc7, 0x1c, 0x55, 0xc5, 0x8c, 0x57, 0x1e, 0xfc, 0xb5, 0x6e, 0x27, 0x53, 0x1a, 0xc1, 0x88, 0x6a, 0x23, 0xf8, 0xb1, 0x21, 0x68, 0xb3, 0xfa, 0x18, 0x51, 0x8a, 0xc3, 0x62, 0x2b, 0xf0, 0xb9, 0x5b, 0x12, 0xc9, 0x80, 0x10, 0x59, 0x82, 0xcb, 0x29, 0x60, 0xbb, 0xf2, 0x86, 0xcf, 0x14, 0x5d, 0xbf, 0xf6, 0x2d, 0x64, 0xf4, 0xbd, 0x66, 0x2f, 0xcd, 0x84, 0x5f, 0x16, 0x73, 0x3a, 0xe1, 0xa8, 0x4a, 0x3, 0xd8, 0x91, 0x1, 0x48, 0x93, 0xda, 0x38, 0x71, 0xaa, 0xe3, 0x97, 0xde, 0x5, 0x4c, 0xae, 0xe7, 0x3c, 0x75, 0xe5, 0xac, 0x77, 0x3e, 0xdc, 0x95, 0x4e, 0x7, 0xa6, 0xef, 0x34, 0x7d, 0x9f, 0xd6, 0xd, 0x44, 0xd4, 0x9d, 0x46, 0xf, 0xed, 0xa4, 0x7f, 0x36, 0x42, 0xb, 0xd0, 0x99, 0x7b, 0x32, 0xe9, 0xa0, 0x30, 0x79, 0xa2, 0xeb, 0x9, 0x40, 0x9b, 0xd2, 0xc4, 0x8d, 0x56, 0x1f, 0xfd, 0xb4, 0x6f, 0x26, 0xb6, 0xff, 0x24, 0x6d, 0x8f, 0xc6, 0x1d, 0x54, 0x20, 0x69, 0xb2, 0xfb, 0x19, 0x50, 0x8b, 0xc2, 0x52, 0x1b, 0xc0, 0x89, 0x6b, 0x22, 0xf9, 0xb0, 0x11, 0x58, 0x83, 0xca, 0x28, 0x61, 0xba, 0xf3, 0x63, 0x2a, 0xf1, 0xb8, 0x5a, 0x13, 0xc8, 0x81, 0xf5, 0xbc, 0x67, 0x2e, 0xcc, 0x85, 0x5e, 0x17, 0x87, 0xce, 0x15, 0x5c, 0xbe, 0xf7, 0x2c, 0x65},
+ {0x0, 0x4a, 0x94, 0xde, 0x35, 0x7f, 0xa1, 0xeb, 0x6a, 0x20, 0xfe, 0xb4, 0x5f, 0x15, 0xcb, 0x81, 0xd4, 0x9e, 0x40, 0xa, 0xe1, 0xab, 0x75, 0x3f, 0xbe, 0xf4, 0x2a, 0x60, 0x8b, 0xc1, 0x1f, 0x55, 0xb5, 0xff, 0x21, 0x6b, 0x80, 0xca, 0x14, 0x5e, 0xdf, 0x95, 0x4b, 0x1, 0xea, 0xa0, 0x7e, 0x34, 0x61, 0x2b, 0xf5, 0xbf, 0x54, 0x1e, 0xc0, 0x8a, 0xb, 0x41, 0x9f, 0xd5, 0x3e, 0x74, 0xaa, 0xe0, 0x77, 0x3d, 0xe3, 0xa9, 0x42, 0x8, 0xd6, 0x9c, 0x1d, 0x57, 0x89, 0xc3, 0x28, 0x62, 0xbc, 0xf6, 0xa3, 0xe9, 0x37, 0x7d, 0x96, 0xdc, 0x2, 0x48, 0xc9, 0x83, 0x5d, 0x17, 0xfc, 0xb6, 0x68, 0x22, 0xc2, 0x88, 0x56, 0x1c, 0xf7, 0xbd, 0x63, 0x29, 0xa8, 0xe2, 0x3c, 0x76, 0x9d, 0xd7, 0x9, 0x43, 0x16, 0x5c, 0x82, 0xc8, 0x23, 0x69, 0xb7, 0xfd, 0x7c, 0x36, 0xe8, 0xa2, 0x49, 0x3, 0xdd, 0x97, 0xee, 0xa4, 0x7a, 0x30, 0xdb, 0x91, 0x4f, 0x5, 0x84, 0xce, 0x10, 0x5a, 0xb1, 0xfb, 0x25, 0x6f, 0x3a, 0x70, 0xae, 0xe4, 0xf, 0x45, 0x9b, 0xd1, 0x50, 0x1a, 0xc4, 0x8e, 0x65, 0x2f, 0xf1, 0xbb, 0x5b, 0x11, 0xcf, 0x85, 0x6e, 0x24, 0xfa, 0xb0, 0x31, 0x7b, 0xa5, 0xef, 0x4, 0x4e, 0x90, 0xda, 0x8f, 0xc5, 0x1b, 0x51, 0xba, 0xf0, 0x2e, 0x64, 0xe5, 0xaf, 0x71, 0x3b, 0xd0, 0x9a, 0x44, 0xe, 0x99, 0xd3, 0xd, 0x47, 0xac, 0xe6, 0x38, 0x72, 0xf3, 0xb9, 0x67, 0x2d, 0xc6, 0x8c, 0x52, 0x18, 0x4d, 0x7, 0xd9, 0x93, 0x78, 0x32, 0xec, 0xa6, 0x27, 0x6d, 0xb3, 0xf9, 0x12, 0x58, 0x86, 0xcc, 0x2c, 0x66, 0xb8, 0xf2, 0x19, 0x53, 0x8d, 0xc7, 0x46, 0xc, 0xd2, 0x98, 0x73, 0x39, 0xe7, 0xad, 0xf8, 0xb2, 0x6c, 0x26, 0xcd, 0x87, 0x59, 0x13, 0x92, 0xd8, 0x6, 0x4c, 0xa7, 0xed, 0x33, 0x79},
+ {0x0, 0x4b, 0x96, 0xdd, 0x31, 0x7a, 0xa7, 0xec, 0x62, 0x29, 0xf4, 0xbf, 0x53, 0x18, 0xc5, 0x8e, 0xc4, 0x8f, 0x52, 0x19, 0xf5, 0xbe, 0x63, 0x28, 0xa6, 0xed, 0x30, 0x7b, 0x97, 0xdc, 0x1, 0x4a, 0x95, 0xde, 0x3, 0x48, 0xa4, 0xef, 0x32, 0x79, 0xf7, 0xbc, 0x61, 0x2a, 0xc6, 0x8d, 0x50, 0x1b, 0x51, 0x1a, 0xc7, 0x8c, 0x60, 0x2b, 0xf6, 0xbd, 0x33, 0x78, 0xa5, 0xee, 0x2, 0x49, 0x94, 0xdf, 0x37, 0x7c, 0xa1, 0xea, 0x6, 0x4d, 0x90, 0xdb, 0x55, 0x1e, 0xc3, 0x88, 0x64, 0x2f, 0xf2, 0xb9, 0xf3, 0xb8, 0x65, 0x2e, 0xc2, 0x89, 0x54, 0x1f, 0x91, 0xda, 0x7, 0x4c, 0xa0, 0xeb, 0x36, 0x7d, 0xa2, 0xe9, 0x34, 0x7f, 0x93, 0xd8, 0x5, 0x4e, 0xc0, 0x8b, 0x56, 0x1d, 0xf1, 0xba, 0x67, 0x2c, 0x66, 0x2d, 0xf0, 0xbb, 0x57, 0x1c, 0xc1, 0x8a, 0x4, 0x4f, 0x92, 0xd9, 0x35, 0x7e, 0xa3, 0xe8, 0x6e, 0x25, 0xf8, 0xb3, 0x5f, 0x14, 0xc9, 0x82, 0xc, 0x47, 0x9a, 0xd1, 0x3d, 0x76, 0xab, 0xe0, 0xaa, 0xe1, 0x3c, 0x77, 0x9b, 0xd0, 0xd, 0x46, 0xc8, 0x83, 0x5e, 0x15, 0xf9, 0xb2, 0x6f, 0x24, 0xfb, 0xb0, 0x6d, 0x26, 0xca, 0x81, 0x5c, 0x17, 0x99, 0xd2, 0xf, 0x44, 0xa8, 0xe3, 0x3e, 0x75, 0x3f, 0x74, 0xa9, 0xe2, 0xe, 0x45, 0x98, 0xd3, 0x5d, 0x16, 0xcb, 0x80, 0x6c, 0x27, 0xfa, 0xb1, 0x59, 0x12, 0xcf, 0x84, 0x68, 0x23, 0xfe, 0xb5, 0x3b, 0x70, 0xad, 0xe6, 0xa, 0x41, 0x9c, 0xd7, 0x9d, 0xd6, 0xb, 0x40, 0xac, 0xe7, 0x3a, 0x71, 0xff, 0xb4, 0x69, 0x22, 0xce, 0x85, 0x58, 0x13, 0xcc, 0x87, 0x5a, 0x11, 0xfd, 0xb6, 0x6b, 0x20, 0xae, 0xe5, 0x38, 0x73, 0x9f, 0xd4, 0x9, 0x42, 0x8, 0x43, 0x9e, 0xd5, 0x39, 0x72, 0xaf, 0xe4, 0x6a, 0x21, 0xfc, 0xb7, 0x5b, 0x10, 0xcd, 0x86},
+ {0x0, 0x4c, 0x98, 0xd4, 0x2d, 0x61, 0xb5, 0xf9, 0x5a, 0x16, 0xc2, 0x8e, 0x77, 0x3b, 0xef, 0xa3, 0xb4, 0xf8, 0x2c, 0x60, 0x99, 0xd5, 0x1, 0x4d, 0xee, 0xa2, 0x76, 0x3a, 0xc3, 0x8f, 0x5b, 0x17, 0x75, 0x39, 0xed, 0xa1, 0x58, 0x14, 0xc0, 0x8c, 0x2f, 0x63, 0xb7, 0xfb, 0x2, 0x4e, 0x9a, 0xd6, 0xc1, 0x8d, 0x59, 0x15, 0xec, 0xa0, 0x74, 0x38, 0x9b, 0xd7, 0x3, 0x4f, 0xb6, 0xfa, 0x2e, 0x62, 0xea, 0xa6, 0x72, 0x3e, 0xc7, 0x8b, 0x5f, 0x13, 0xb0, 0xfc, 0x28, 0x64, 0x9d, 0xd1, 0x5, 0x49, 0x5e, 0x12, 0xc6, 0x8a, 0x73, 0x3f, 0xeb, 0xa7, 0x4, 0x48, 0x9c, 0xd0, 0x29, 0x65, 0xb1, 0xfd, 0x9f, 0xd3, 0x7, 0x4b, 0xb2, 0xfe, 0x2a, 0x66, 0xc5, 0x89, 0x5d, 0x11, 0xe8, 0xa4, 0x70, 0x3c, 0x2b, 0x67, 0xb3, 0xff, 0x6, 0x4a, 0x9e, 0xd2, 0x71, 0x3d, 0xe9, 0xa5, 0x5c, 0x10, 0xc4, 0x88, 0xc9, 0x85, 0x51, 0x1d, 0xe4, 0xa8, 0x7c, 0x30, 0x93, 0xdf, 0xb, 0x47, 0xbe, 0xf2, 0x26, 0x6a, 0x7d, 0x31, 0xe5, 0xa9, 0x50, 0x1c, 0xc8, 0x84, 0x27, 0x6b, 0xbf, 0xf3, 0xa, 0x46, 0x92, 0xde, 0xbc, 0xf0, 0x24, 0x68, 0x91, 0xdd, 0x9, 0x45, 0xe6, 0xaa, 0x7e, 0x32, 0xcb, 0x87, 0x53, 0x1f, 0x8, 0x44, 0x90, 0xdc, 0x25, 0x69, 0xbd, 0xf1, 0x52, 0x1e, 0xca, 0x86, 0x7f, 0x33, 0xe7, 0xab, 0x23, 0x6f, 0xbb, 0xf7, 0xe, 0x42, 0x96, 0xda, 0x79, 0x35, 0xe1, 0xad, 0x54, 0x18, 0xcc, 0x80, 0x97, 0xdb, 0xf, 0x43, 0xba, 0xf6, 0x22, 0x6e, 0xcd, 0x81, 0x55, 0x19, 0xe0, 0xac, 0x78, 0x34, 0x56, 0x1a, 0xce, 0x82, 0x7b, 0x37, 0xe3, 0xaf, 0xc, 0x40, 0x94, 0xd8, 0x21, 0x6d, 0xb9, 0xf5, 0xe2, 0xae, 0x7a, 0x36, 0xcf, 0x83, 0x57, 0x1b, 0xb8, 0xf4, 0x20, 0x6c, 0x95, 0xd9, 0xd, 0x41},
+ {0x0, 0x4d, 0x9a, 0xd7, 0x29, 0x64, 0xb3, 0xfe, 0x52, 0x1f, 0xc8, 0x85, 0x7b, 0x36, 0xe1, 0xac, 0xa4, 0xe9, 0x3e, 0x73, 0x8d, 0xc0, 0x17, 0x5a, 0xf6, 0xbb, 0x6c, 0x21, 0xdf, 0x92, 0x45, 0x8, 0x55, 0x18, 0xcf, 0x82, 0x7c, 0x31, 0xe6, 0xab, 0x7, 0x4a, 0x9d, 0xd0, 0x2e, 0x63, 0xb4, 0xf9, 0xf1, 0xbc, 0x6b, 0x26, 0xd8, 0x95, 0x42, 0xf, 0xa3, 0xee, 0x39, 0x74, 0x8a, 0xc7, 0x10, 0x5d, 0xaa, 0xe7, 0x30, 0x7d, 0x83, 0xce, 0x19, 0x54, 0xf8, 0xb5, 0x62, 0x2f, 0xd1, 0x9c, 0x4b, 0x6, 0xe, 0x43, 0x94, 0xd9, 0x27, 0x6a, 0xbd, 0xf0, 0x5c, 0x11, 0xc6, 0x8b, 0x75, 0x38, 0xef, 0xa2, 0xff, 0xb2, 0x65, 0x28, 0xd6, 0x9b, 0x4c, 0x1, 0xad, 0xe0, 0x37, 0x7a, 0x84, 0xc9, 0x1e, 0x53, 0x5b, 0x16, 0xc1, 0x8c, 0x72, 0x3f, 0xe8, 0xa5, 0x9, 0x44, 0x93, 0xde, 0x20, 0x6d, 0xba, 0xf7, 0x49, 0x4, 0xd3, 0x9e, 0x60, 0x2d, 0xfa, 0xb7, 0x1b, 0x56, 0x81, 0xcc, 0x32, 0x7f, 0xa8, 0xe5, 0xed, 0xa0, 0x77, 0x3a, 0xc4, 0x89, 0x5e, 0x13, 0xbf, 0xf2, 0x25, 0x68, 0x96, 0xdb, 0xc, 0x41, 0x1c, 0x51, 0x86, 0xcb, 0x35, 0x78, 0xaf, 0xe2, 0x4e, 0x3, 0xd4, 0x99, 0x67, 0x2a, 0xfd, 0xb0, 0xb8, 0xf5, 0x22, 0x6f, 0x91, 0xdc, 0xb, 0x46, 0xea, 0xa7, 0x70, 0x3d, 0xc3, 0x8e, 0x59, 0x14, 0xe3, 0xae, 0x79, 0x34, 0xca, 0x87, 0x50, 0x1d, 0xb1, 0xfc, 0x2b, 0x66, 0x98, 0xd5, 0x2, 0x4f, 0x47, 0xa, 0xdd, 0x90, 0x6e, 0x23, 0xf4, 0xb9, 0x15, 0x58, 0x8f, 0xc2, 0x3c, 0x71, 0xa6, 0xeb, 0xb6, 0xfb, 0x2c, 0x61, 0x9f, 0xd2, 0x5, 0x48, 0xe4, 0xa9, 0x7e, 0x33, 0xcd, 0x80, 0x57, 0x1a, 0x12, 0x5f, 0x88, 0xc5, 0x3b, 0x76, 0xa1, 0xec, 0x40, 0xd, 0xda, 0x97, 0x69, 0x24, 0xf3, 0xbe},
+ {0x0, 0x4e, 0x9c, 0xd2, 0x25, 0x6b, 0xb9, 0xf7, 0x4a, 0x4, 0xd6, 0x98, 0x6f, 0x21, 0xf3, 0xbd, 0x94, 0xda, 0x8, 0x46, 0xb1, 0xff, 0x2d, 0x63, 0xde, 0x90, 0x42, 0xc, 0xfb, 0xb5, 0x67, 0x29, 0x35, 0x7b, 0xa9, 0xe7, 0x10, 0x5e, 0x8c, 0xc2, 0x7f, 0x31, 0xe3, 0xad, 0x5a, 0x14, 0xc6, 0x88, 0xa1, 0xef, 0x3d, 0x73, 0x84, 0xca, 0x18, 0x56, 0xeb, 0xa5, 0x77, 0x39, 0xce, 0x80, 0x52, 0x1c, 0x6a, 0x24, 0xf6, 0xb8, 0x4f, 0x1, 0xd3, 0x9d, 0x20, 0x6e, 0xbc, 0xf2, 0x5, 0x4b, 0x99, 0xd7, 0xfe, 0xb0, 0x62, 0x2c, 0xdb, 0x95, 0x47, 0x9, 0xb4, 0xfa, 0x28, 0x66, 0x91, 0xdf, 0xd, 0x43, 0x5f, 0x11, 0xc3, 0x8d, 0x7a, 0x34, 0xe6, 0xa8, 0x15, 0x5b, 0x89, 0xc7, 0x30, 0x7e, 0xac, 0xe2, 0xcb, 0x85, 0x57, 0x19, 0xee, 0xa0, 0x72, 0x3c, 0x81, 0xcf, 0x1d, 0x53, 0xa4, 0xea, 0x38, 0x76, 0xd4, 0x9a, 0x48, 0x6, 0xf1, 0xbf, 0x6d, 0x23, 0x9e, 0xd0, 0x2, 0x4c, 0xbb, 0xf5, 0x27, 0x69, 0x40, 0xe, 0xdc, 0x92, 0x65, 0x2b, 0xf9, 0xb7, 0xa, 0x44, 0x96, 0xd8, 0x2f, 0x61, 0xb3, 0xfd, 0xe1, 0xaf, 0x7d, 0x33, 0xc4, 0x8a, 0x58, 0x16, 0xab, 0xe5, 0x37, 0x79, 0x8e, 0xc0, 0x12, 0x5c, 0x75, 0x3b, 0xe9, 0xa7, 0x50, 0x1e, 0xcc, 0x82, 0x3f, 0x71, 0xa3, 0xed, 0x1a, 0x54, 0x86, 0xc8, 0xbe, 0xf0, 0x22, 0x6c, 0x9b, 0xd5, 0x7, 0x49, 0xf4, 0xba, 0x68, 0x26, 0xd1, 0x9f, 0x4d, 0x3, 0x2a, 0x64, 0xb6, 0xf8, 0xf, 0x41, 0x93, 0xdd, 0x60, 0x2e, 0xfc, 0xb2, 0x45, 0xb, 0xd9, 0x97, 0x8b, 0xc5, 0x17, 0x59, 0xae, 0xe0, 0x32, 0x7c, 0xc1, 0x8f, 0x5d, 0x13, 0xe4, 0xaa, 0x78, 0x36, 0x1f, 0x51, 0x83, 0xcd, 0x3a, 0x74, 0xa6, 0xe8, 0x55, 0x1b, 0xc9, 0x87, 0x70, 0x3e, 0xec, 0xa2},
+ {0x0, 0x4f, 0x9e, 0xd1, 0x21, 0x6e, 0xbf, 0xf0, 0x42, 0xd, 0xdc, 0x93, 0x63, 0x2c, 0xfd, 0xb2, 0x84, 0xcb, 0x1a, 0x55, 0xa5, 0xea, 0x3b, 0x74, 0xc6, 0x89, 0x58, 0x17, 0xe7, 0xa8, 0x79, 0x36, 0x15, 0x5a, 0x8b, 0xc4, 0x34, 0x7b, 0xaa, 0xe5, 0x57, 0x18, 0xc9, 0x86, 0x76, 0x39, 0xe8, 0xa7, 0x91, 0xde, 0xf, 0x40, 0xb0, 0xff, 0x2e, 0x61, 0xd3, 0x9c, 0x4d, 0x2, 0xf2, 0xbd, 0x6c, 0x23, 0x2a, 0x65, 0xb4, 0xfb, 0xb, 0x44, 0x95, 0xda, 0x68, 0x27, 0xf6, 0xb9, 0x49, 0x6, 0xd7, 0x98, 0xae, 0xe1, 0x30, 0x7f, 0x8f, 0xc0, 0x11, 0x5e, 0xec, 0xa3, 0x72, 0x3d, 0xcd, 0x82, 0x53, 0x1c, 0x3f, 0x70, 0xa1, 0xee, 0x1e, 0x51, 0x80, 0xcf, 0x7d, 0x32, 0xe3, 0xac, 0x5c, 0x13, 0xc2, 0x8d, 0xbb, 0xf4, 0x25, 0x6a, 0x9a, 0xd5, 0x4, 0x4b, 0xf9, 0xb6, 0x67, 0x28, 0xd8, 0x97, 0x46, 0x9, 0x54, 0x1b, 0xca, 0x85, 0x75, 0x3a, 0xeb, 0xa4, 0x16, 0x59, 0x88, 0xc7, 0x37, 0x78, 0xa9, 0xe6, 0xd0, 0x9f, 0x4e, 0x1, 0xf1, 0xbe, 0x6f, 0x20, 0x92, 0xdd, 0xc, 0x43, 0xb3, 0xfc, 0x2d, 0x62, 0x41, 0xe, 0xdf, 0x90, 0x60, 0x2f, 0xfe, 0xb1, 0x3, 0x4c, 0x9d, 0xd2, 0x22, 0x6d, 0xbc, 0xf3, 0xc5, 0x8a, 0x5b, 0x14, 0xe4, 0xab, 0x7a, 0x35, 0x87, 0xc8, 0x19, 0x56, 0xa6, 0xe9, 0x38, 0x77, 0x7e, 0x31, 0xe0, 0xaf, 0x5f, 0x10, 0xc1, 0x8e, 0x3c, 0x73, 0xa2, 0xed, 0x1d, 0x52, 0x83, 0xcc, 0xfa, 0xb5, 0x64, 0x2b, 0xdb, 0x94, 0x45, 0xa, 0xb8, 0xf7, 0x26, 0x69, 0x99, 0xd6, 0x7, 0x48, 0x6b, 0x24, 0xf5, 0xba, 0x4a, 0x5, 0xd4, 0x9b, 0x29, 0x66, 0xb7, 0xf8, 0x8, 0x47, 0x96, 0xd9, 0xef, 0xa0, 0x71, 0x3e, 0xce, 0x81, 0x50, 0x1f, 0xad, 0xe2, 0x33, 0x7c, 0x8c, 0xc3, 0x12, 0x5d},
+ {0x0, 0x50, 0xa0, 0xf0, 0x5d, 0xd, 0xfd, 0xad, 0xba, 0xea, 0x1a, 0x4a, 0xe7, 0xb7, 0x47, 0x17, 0x69, 0x39, 0xc9, 0x99, 0x34, 0x64, 0x94, 0xc4, 0xd3, 0x83, 0x73, 0x23, 0x8e, 0xde, 0x2e, 0x7e, 0xd2, 0x82, 0x72, 0x22, 0x8f, 0xdf, 0x2f, 0x7f, 0x68, 0x38, 0xc8, 0x98, 0x35, 0x65, 0x95, 0xc5, 0xbb, 0xeb, 0x1b, 0x4b, 0xe6, 0xb6, 0x46, 0x16, 0x1, 0x51, 0xa1, 0xf1, 0x5c, 0xc, 0xfc, 0xac, 0xb9, 0xe9, 0x19, 0x49, 0xe4, 0xb4, 0x44, 0x14, 0x3, 0x53, 0xa3, 0xf3, 0x5e, 0xe, 0xfe, 0xae, 0xd0, 0x80, 0x70, 0x20, 0x8d, 0xdd, 0x2d, 0x7d, 0x6a, 0x3a, 0xca, 0x9a, 0x37, 0x67, 0x97, 0xc7, 0x6b, 0x3b, 0xcb, 0x9b, 0x36, 0x66, 0x96, 0xc6, 0xd1, 0x81, 0x71, 0x21, 0x8c, 0xdc, 0x2c, 0x7c, 0x2, 0x52, 0xa2, 0xf2, 0x5f, 0xf, 0xff, 0xaf, 0xb8, 0xe8, 0x18, 0x48, 0xe5, 0xb5, 0x45, 0x15, 0x6f, 0x3f, 0xcf, 0x9f, 0x32, 0x62, 0x92, 0xc2, 0xd5, 0x85, 0x75, 0x25, 0x88, 0xd8, 0x28, 0x78, 0x6, 0x56, 0xa6, 0xf6, 0x5b, 0xb, 0xfb, 0xab, 0xbc, 0xec, 0x1c, 0x4c, 0xe1, 0xb1, 0x41, 0x11, 0xbd, 0xed, 0x1d, 0x4d, 0xe0, 0xb0, 0x40, 0x10, 0x7, 0x57, 0xa7, 0xf7, 0x5a, 0xa, 0xfa, 0xaa, 0xd4, 0x84, 0x74, 0x24, 0x89, 0xd9, 0x29, 0x79, 0x6e, 0x3e, 0xce, 0x9e, 0x33, 0x63, 0x93, 0xc3, 0xd6, 0x86, 0x76, 0x26, 0x8b, 0xdb, 0x2b, 0x7b, 0x6c, 0x3c, 0xcc, 0x9c, 0x31, 0x61, 0x91, 0xc1, 0xbf, 0xef, 0x1f, 0x4f, 0xe2, 0xb2, 0x42, 0x12, 0x5, 0x55, 0xa5, 0xf5, 0x58, 0x8, 0xf8, 0xa8, 0x4, 0x54, 0xa4, 0xf4, 0x59, 0x9, 0xf9, 0xa9, 0xbe, 0xee, 0x1e, 0x4e, 0xe3, 0xb3, 0x43, 0x13, 0x6d, 0x3d, 0xcd, 0x9d, 0x30, 0x60, 0x90, 0xc0, 0xd7, 0x87, 0x77, 0x27, 0x8a, 0xda, 0x2a, 0x7a},
+ {0x0, 0x51, 0xa2, 0xf3, 0x59, 0x8, 0xfb, 0xaa, 0xb2, 0xe3, 0x10, 0x41, 0xeb, 0xba, 0x49, 0x18, 0x79, 0x28, 0xdb, 0x8a, 0x20, 0x71, 0x82, 0xd3, 0xcb, 0x9a, 0x69, 0x38, 0x92, 0xc3, 0x30, 0x61, 0xf2, 0xa3, 0x50, 0x1, 0xab, 0xfa, 0x9, 0x58, 0x40, 0x11, 0xe2, 0xb3, 0x19, 0x48, 0xbb, 0xea, 0x8b, 0xda, 0x29, 0x78, 0xd2, 0x83, 0x70, 0x21, 0x39, 0x68, 0x9b, 0xca, 0x60, 0x31, 0xc2, 0x93, 0xf9, 0xa8, 0x5b, 0xa, 0xa0, 0xf1, 0x2, 0x53, 0x4b, 0x1a, 0xe9, 0xb8, 0x12, 0x43, 0xb0, 0xe1, 0x80, 0xd1, 0x22, 0x73, 0xd9, 0x88, 0x7b, 0x2a, 0x32, 0x63, 0x90, 0xc1, 0x6b, 0x3a, 0xc9, 0x98, 0xb, 0x5a, 0xa9, 0xf8, 0x52, 0x3, 0xf0, 0xa1, 0xb9, 0xe8, 0x1b, 0x4a, 0xe0, 0xb1, 0x42, 0x13, 0x72, 0x23, 0xd0, 0x81, 0x2b, 0x7a, 0x89, 0xd8, 0xc0, 0x91, 0x62, 0x33, 0x99, 0xc8, 0x3b, 0x6a, 0xef, 0xbe, 0x4d, 0x1c, 0xb6, 0xe7, 0x14, 0x45, 0x5d, 0xc, 0xff, 0xae, 0x4, 0x55, 0xa6, 0xf7, 0x96, 0xc7, 0x34, 0x65, 0xcf, 0x9e, 0x6d, 0x3c, 0x24, 0x75, 0x86, 0xd7, 0x7d, 0x2c, 0xdf, 0x8e, 0x1d, 0x4c, 0xbf, 0xee, 0x44, 0x15, 0xe6, 0xb7, 0xaf, 0xfe, 0xd, 0x5c, 0xf6, 0xa7, 0x54, 0x5, 0x64, 0x35, 0xc6, 0x97, 0x3d, 0x6c, 0x9f, 0xce, 0xd6, 0x87, 0x74, 0x25, 0x8f, 0xde, 0x2d, 0x7c, 0x16, 0x47, 0xb4, 0xe5, 0x4f, 0x1e, 0xed, 0xbc, 0xa4, 0xf5, 0x6, 0x57, 0xfd, 0xac, 0x5f, 0xe, 0x6f, 0x3e, 0xcd, 0x9c, 0x36, 0x67, 0x94, 0xc5, 0xdd, 0x8c, 0x7f, 0x2e, 0x84, 0xd5, 0x26, 0x77, 0xe4, 0xb5, 0x46, 0x17, 0xbd, 0xec, 0x1f, 0x4e, 0x56, 0x7, 0xf4, 0xa5, 0xf, 0x5e, 0xad, 0xfc, 0x9d, 0xcc, 0x3f, 0x6e, 0xc4, 0x95, 0x66, 0x37, 0x2f, 0x7e, 0x8d, 0xdc, 0x76, 0x27, 0xd4, 0x85},
+ {0x0, 0x52, 0xa4, 0xf6, 0x55, 0x7, 0xf1, 0xa3, 0xaa, 0xf8, 0xe, 0x5c, 0xff, 0xad, 0x5b, 0x9, 0x49, 0x1b, 0xed, 0xbf, 0x1c, 0x4e, 0xb8, 0xea, 0xe3, 0xb1, 0x47, 0x15, 0xb6, 0xe4, 0x12, 0x40, 0x92, 0xc0, 0x36, 0x64, 0xc7, 0x95, 0x63, 0x31, 0x38, 0x6a, 0x9c, 0xce, 0x6d, 0x3f, 0xc9, 0x9b, 0xdb, 0x89, 0x7f, 0x2d, 0x8e, 0xdc, 0x2a, 0x78, 0x71, 0x23, 0xd5, 0x87, 0x24, 0x76, 0x80, 0xd2, 0x39, 0x6b, 0x9d, 0xcf, 0x6c, 0x3e, 0xc8, 0x9a, 0x93, 0xc1, 0x37, 0x65, 0xc6, 0x94, 0x62, 0x30, 0x70, 0x22, 0xd4, 0x86, 0x25, 0x77, 0x81, 0xd3, 0xda, 0x88, 0x7e, 0x2c, 0x8f, 0xdd, 0x2b, 0x79, 0xab, 0xf9, 0xf, 0x5d, 0xfe, 0xac, 0x5a, 0x8, 0x1, 0x53, 0xa5, 0xf7, 0x54, 0x6, 0xf0, 0xa2, 0xe2, 0xb0, 0x46, 0x14, 0xb7, 0xe5, 0x13, 0x41, 0x48, 0x1a, 0xec, 0xbe, 0x1d, 0x4f, 0xb9, 0xeb, 0x72, 0x20, 0xd6, 0x84, 0x27, 0x75, 0x83, 0xd1, 0xd8, 0x8a, 0x7c, 0x2e, 0x8d, 0xdf, 0x29, 0x7b, 0x3b, 0x69, 0x9f, 0xcd, 0x6e, 0x3c, 0xca, 0x98, 0x91, 0xc3, 0x35, 0x67, 0xc4, 0x96, 0x60, 0x32, 0xe0, 0xb2, 0x44, 0x16, 0xb5, 0xe7, 0x11, 0x43, 0x4a, 0x18, 0xee, 0xbc, 0x1f, 0x4d, 0xbb, 0xe9, 0xa9, 0xfb, 0xd, 0x5f, 0xfc, 0xae, 0x58, 0xa, 0x3, 0x51, 0xa7, 0xf5, 0x56, 0x4, 0xf2, 0xa0, 0x4b, 0x19, 0xef, 0xbd, 0x1e, 0x4c, 0xba, 0xe8, 0xe1, 0xb3, 0x45, 0x17, 0xb4, 0xe6, 0x10, 0x42, 0x2, 0x50, 0xa6, 0xf4, 0x57, 0x5, 0xf3, 0xa1, 0xa8, 0xfa, 0xc, 0x5e, 0xfd, 0xaf, 0x59, 0xb, 0xd9, 0x8b, 0x7d, 0x2f, 0x8c, 0xde, 0x28, 0x7a, 0x73, 0x21, 0xd7, 0x85, 0x26, 0x74, 0x82, 0xd0, 0x90, 0xc2, 0x34, 0x66, 0xc5, 0x97, 0x61, 0x33, 0x3a, 0x68, 0x9e, 0xcc, 0x6f, 0x3d, 0xcb, 0x99},
+ {0x0, 0x53, 0xa6, 0xf5, 0x51, 0x2, 0xf7, 0xa4, 0xa2, 0xf1, 0x4, 0x57, 0xf3, 0xa0, 0x55, 0x6, 0x59, 0xa, 0xff, 0xac, 0x8, 0x5b, 0xae, 0xfd, 0xfb, 0xa8, 0x5d, 0xe, 0xaa, 0xf9, 0xc, 0x5f, 0xb2, 0xe1, 0x14, 0x47, 0xe3, 0xb0, 0x45, 0x16, 0x10, 0x43, 0xb6, 0xe5, 0x41, 0x12, 0xe7, 0xb4, 0xeb, 0xb8, 0x4d, 0x1e, 0xba, 0xe9, 0x1c, 0x4f, 0x49, 0x1a, 0xef, 0xbc, 0x18, 0x4b, 0xbe, 0xed, 0x79, 0x2a, 0xdf, 0x8c, 0x28, 0x7b, 0x8e, 0xdd, 0xdb, 0x88, 0x7d, 0x2e, 0x8a, 0xd9, 0x2c, 0x7f, 0x20, 0x73, 0x86, 0xd5, 0x71, 0x22, 0xd7, 0x84, 0x82, 0xd1, 0x24, 0x77, 0xd3, 0x80, 0x75, 0x26, 0xcb, 0x98, 0x6d, 0x3e, 0x9a, 0xc9, 0x3c, 0x6f, 0x69, 0x3a, 0xcf, 0x9c, 0x38, 0x6b, 0x9e, 0xcd, 0x92, 0xc1, 0x34, 0x67, 0xc3, 0x90, 0x65, 0x36, 0x30, 0x63, 0x96, 0xc5, 0x61, 0x32, 0xc7, 0x94, 0xf2, 0xa1, 0x54, 0x7, 0xa3, 0xf0, 0x5, 0x56, 0x50, 0x3, 0xf6, 0xa5, 0x1, 0x52, 0xa7, 0xf4, 0xab, 0xf8, 0xd, 0x5e, 0xfa, 0xa9, 0x5c, 0xf, 0x9, 0x5a, 0xaf, 0xfc, 0x58, 0xb, 0xfe, 0xad, 0x40, 0x13, 0xe6, 0xb5, 0x11, 0x42, 0xb7, 0xe4, 0xe2, 0xb1, 0x44, 0x17, 0xb3, 0xe0, 0x15, 0x46, 0x19, 0x4a, 0xbf, 0xec, 0x48, 0x1b, 0xee, 0xbd, 0xbb, 0xe8, 0x1d, 0x4e, 0xea, 0xb9, 0x4c, 0x1f, 0x8b, 0xd8, 0x2d, 0x7e, 0xda, 0x89, 0x7c, 0x2f, 0x29, 0x7a, 0x8f, 0xdc, 0x78, 0x2b, 0xde, 0x8d, 0xd2, 0x81, 0x74, 0x27, 0x83, 0xd0, 0x25, 0x76, 0x70, 0x23, 0xd6, 0x85, 0x21, 0x72, 0x87, 0xd4, 0x39, 0x6a, 0x9f, 0xcc, 0x68, 0x3b, 0xce, 0x9d, 0x9b, 0xc8, 0x3d, 0x6e, 0xca, 0x99, 0x6c, 0x3f, 0x60, 0x33, 0xc6, 0x95, 0x31, 0x62, 0x97, 0xc4, 0xc2, 0x91, 0x64, 0x37, 0x93, 0xc0, 0x35, 0x66},
+ {0x0, 0x54, 0xa8, 0xfc, 0x4d, 0x19, 0xe5, 0xb1, 0x9a, 0xce, 0x32, 0x66, 0xd7, 0x83, 0x7f, 0x2b, 0x29, 0x7d, 0x81, 0xd5, 0x64, 0x30, 0xcc, 0x98, 0xb3, 0xe7, 0x1b, 0x4f, 0xfe, 0xaa, 0x56, 0x2, 0x52, 0x6, 0xfa, 0xae, 0x1f, 0x4b, 0xb7, 0xe3, 0xc8, 0x9c, 0x60, 0x34, 0x85, 0xd1, 0x2d, 0x79, 0x7b, 0x2f, 0xd3, 0x87, 0x36, 0x62, 0x9e, 0xca, 0xe1, 0xb5, 0x49, 0x1d, 0xac, 0xf8, 0x4, 0x50, 0xa4, 0xf0, 0xc, 0x58, 0xe9, 0xbd, 0x41, 0x15, 0x3e, 0x6a, 0x96, 0xc2, 0x73, 0x27, 0xdb, 0x8f, 0x8d, 0xd9, 0x25, 0x71, 0xc0, 0x94, 0x68, 0x3c, 0x17, 0x43, 0xbf, 0xeb, 0x5a, 0xe, 0xf2, 0xa6, 0xf6, 0xa2, 0x5e, 0xa, 0xbb, 0xef, 0x13, 0x47, 0x6c, 0x38, 0xc4, 0x90, 0x21, 0x75, 0x89, 0xdd, 0xdf, 0x8b, 0x77, 0x23, 0x92, 0xc6, 0x3a, 0x6e, 0x45, 0x11, 0xed, 0xb9, 0x8, 0x5c, 0xa0, 0xf4, 0x55, 0x1, 0xfd, 0xa9, 0x18, 0x4c, 0xb0, 0xe4, 0xcf, 0x9b, 0x67, 0x33, 0x82, 0xd6, 0x2a, 0x7e, 0x7c, 0x28, 0xd4, 0x80, 0x31, 0x65, 0x99, 0xcd, 0xe6, 0xb2, 0x4e, 0x1a, 0xab, 0xff, 0x3, 0x57, 0x7, 0x53, 0xaf, 0xfb, 0x4a, 0x1e, 0xe2, 0xb6, 0x9d, 0xc9, 0x35, 0x61, 0xd0, 0x84, 0x78, 0x2c, 0x2e, 0x7a, 0x86, 0xd2, 0x63, 0x37, 0xcb, 0x9f, 0xb4, 0xe0, 0x1c, 0x48, 0xf9, 0xad, 0x51, 0x5, 0xf1, 0xa5, 0x59, 0xd, 0xbc, 0xe8, 0x14, 0x40, 0x6b, 0x3f, 0xc3, 0x97, 0x26, 0x72, 0x8e, 0xda, 0xd8, 0x8c, 0x70, 0x24, 0x95, 0xc1, 0x3d, 0x69, 0x42, 0x16, 0xea, 0xbe, 0xf, 0x5b, 0xa7, 0xf3, 0xa3, 0xf7, 0xb, 0x5f, 0xee, 0xba, 0x46, 0x12, 0x39, 0x6d, 0x91, 0xc5, 0x74, 0x20, 0xdc, 0x88, 0x8a, 0xde, 0x22, 0x76, 0xc7, 0x93, 0x6f, 0x3b, 0x10, 0x44, 0xb8, 0xec, 0x5d, 0x9, 0xf5, 0xa1},
+ {0x0, 0x55, 0xaa, 0xff, 0x49, 0x1c, 0xe3, 0xb6, 0x92, 0xc7, 0x38, 0x6d, 0xdb, 0x8e, 0x71, 0x24, 0x39, 0x6c, 0x93, 0xc6, 0x70, 0x25, 0xda, 0x8f, 0xab, 0xfe, 0x1, 0x54, 0xe2, 0xb7, 0x48, 0x1d, 0x72, 0x27, 0xd8, 0x8d, 0x3b, 0x6e, 0x91, 0xc4, 0xe0, 0xb5, 0x4a, 0x1f, 0xa9, 0xfc, 0x3, 0x56, 0x4b, 0x1e, 0xe1, 0xb4, 0x2, 0x57, 0xa8, 0xfd, 0xd9, 0x8c, 0x73, 0x26, 0x90, 0xc5, 0x3a, 0x6f, 0xe4, 0xb1, 0x4e, 0x1b, 0xad, 0xf8, 0x7, 0x52, 0x76, 0x23, 0xdc, 0x89, 0x3f, 0x6a, 0x95, 0xc0, 0xdd, 0x88, 0x77, 0x22, 0x94, 0xc1, 0x3e, 0x6b, 0x4f, 0x1a, 0xe5, 0xb0, 0x6, 0x53, 0xac, 0xf9, 0x96, 0xc3, 0x3c, 0x69, 0xdf, 0x8a, 0x75, 0x20, 0x4, 0x51, 0xae, 0xfb, 0x4d, 0x18, 0xe7, 0xb2, 0xaf, 0xfa, 0x5, 0x50, 0xe6, 0xb3, 0x4c, 0x19, 0x3d, 0x68, 0x97, 0xc2, 0x74, 0x21, 0xde, 0x8b, 0xd5, 0x80, 0x7f, 0x2a, 0x9c, 0xc9, 0x36, 0x63, 0x47, 0x12, 0xed, 0xb8, 0xe, 0x5b, 0xa4, 0xf1, 0xec, 0xb9, 0x46, 0x13, 0xa5, 0xf0, 0xf, 0x5a, 0x7e, 0x2b, 0xd4, 0x81, 0x37, 0x62, 0x9d, 0xc8, 0xa7, 0xf2, 0xd, 0x58, 0xee, 0xbb, 0x44, 0x11, 0x35, 0x60, 0x9f, 0xca, 0x7c, 0x29, 0xd6, 0x83, 0x9e, 0xcb, 0x34, 0x61, 0xd7, 0x82, 0x7d, 0x28, 0xc, 0x59, 0xa6, 0xf3, 0x45, 0x10, 0xef, 0xba, 0x31, 0x64, 0x9b, 0xce, 0x78, 0x2d, 0xd2, 0x87, 0xa3, 0xf6, 0x9, 0x5c, 0xea, 0xbf, 0x40, 0x15, 0x8, 0x5d, 0xa2, 0xf7, 0x41, 0x14, 0xeb, 0xbe, 0x9a, 0xcf, 0x30, 0x65, 0xd3, 0x86, 0x79, 0x2c, 0x43, 0x16, 0xe9, 0xbc, 0xa, 0x5f, 0xa0, 0xf5, 0xd1, 0x84, 0x7b, 0x2e, 0x98, 0xcd, 0x32, 0x67, 0x7a, 0x2f, 0xd0, 0x85, 0x33, 0x66, 0x99, 0xcc, 0xe8, 0xbd, 0x42, 0x17, 0xa1, 0xf4, 0xb, 0x5e},
+ {0x0, 0x56, 0xac, 0xfa, 0x45, 0x13, 0xe9, 0xbf, 0x8a, 0xdc, 0x26, 0x70, 0xcf, 0x99, 0x63, 0x35, 0x9, 0x5f, 0xa5, 0xf3, 0x4c, 0x1a, 0xe0, 0xb6, 0x83, 0xd5, 0x2f, 0x79, 0xc6, 0x90, 0x6a, 0x3c, 0x12, 0x44, 0xbe, 0xe8, 0x57, 0x1, 0xfb, 0xad, 0x98, 0xce, 0x34, 0x62, 0xdd, 0x8b, 0x71, 0x27, 0x1b, 0x4d, 0xb7, 0xe1, 0x5e, 0x8, 0xf2, 0xa4, 0x91, 0xc7, 0x3d, 0x6b, 0xd4, 0x82, 0x78, 0x2e, 0x24, 0x72, 0x88, 0xde, 0x61, 0x37, 0xcd, 0x9b, 0xae, 0xf8, 0x2, 0x54, 0xeb, 0xbd, 0x47, 0x11, 0x2d, 0x7b, 0x81, 0xd7, 0x68, 0x3e, 0xc4, 0x92, 0xa7, 0xf1, 0xb, 0x5d, 0xe2, 0xb4, 0x4e, 0x18, 0x36, 0x60, 0x9a, 0xcc, 0x73, 0x25, 0xdf, 0x89, 0xbc, 0xea, 0x10, 0x46, 0xf9, 0xaf, 0x55, 0x3, 0x3f, 0x69, 0x93, 0xc5, 0x7a, 0x2c, 0xd6, 0x80, 0xb5, 0xe3, 0x19, 0x4f, 0xf0, 0xa6, 0x5c, 0xa, 0x48, 0x1e, 0xe4, 0xb2, 0xd, 0x5b, 0xa1, 0xf7, 0xc2, 0x94, 0x6e, 0x38, 0x87, 0xd1, 0x2b, 0x7d, 0x41, 0x17, 0xed, 0xbb, 0x4, 0x52, 0xa8, 0xfe, 0xcb, 0x9d, 0x67, 0x31, 0x8e, 0xd8, 0x22, 0x74, 0x5a, 0xc, 0xf6, 0xa0, 0x1f, 0x49, 0xb3, 0xe5, 0xd0, 0x86, 0x7c, 0x2a, 0x95, 0xc3, 0x39, 0x6f, 0x53, 0x5, 0xff, 0xa9, 0x16, 0x40, 0xba, 0xec, 0xd9, 0x8f, 0x75, 0x23, 0x9c, 0xca, 0x30, 0x66, 0x6c, 0x3a, 0xc0, 0x96, 0x29, 0x7f, 0x85, 0xd3, 0xe6, 0xb0, 0x4a, 0x1c, 0xa3, 0xf5, 0xf, 0x59, 0x65, 0x33, 0xc9, 0x9f, 0x20, 0x76, 0x8c, 0xda, 0xef, 0xb9, 0x43, 0x15, 0xaa, 0xfc, 0x6, 0x50, 0x7e, 0x28, 0xd2, 0x84, 0x3b, 0x6d, 0x97, 0xc1, 0xf4, 0xa2, 0x58, 0xe, 0xb1, 0xe7, 0x1d, 0x4b, 0x77, 0x21, 0xdb, 0x8d, 0x32, 0x64, 0x9e, 0xc8, 0xfd, 0xab, 0x51, 0x7, 0xb8, 0xee, 0x14, 0x42},
+ {0x0, 0x57, 0xae, 0xf9, 0x41, 0x16, 0xef, 0xb8, 0x82, 0xd5, 0x2c, 0x7b, 0xc3, 0x94, 0x6d, 0x3a, 0x19, 0x4e, 0xb7, 0xe0, 0x58, 0xf, 0xf6, 0xa1, 0x9b, 0xcc, 0x35, 0x62, 0xda, 0x8d, 0x74, 0x23, 0x32, 0x65, 0x9c, 0xcb, 0x73, 0x24, 0xdd, 0x8a, 0xb0, 0xe7, 0x1e, 0x49, 0xf1, 0xa6, 0x5f, 0x8, 0x2b, 0x7c, 0x85, 0xd2, 0x6a, 0x3d, 0xc4, 0x93, 0xa9, 0xfe, 0x7, 0x50, 0xe8, 0xbf, 0x46, 0x11, 0x64, 0x33, 0xca, 0x9d, 0x25, 0x72, 0x8b, 0xdc, 0xe6, 0xb1, 0x48, 0x1f, 0xa7, 0xf0, 0x9, 0x5e, 0x7d, 0x2a, 0xd3, 0x84, 0x3c, 0x6b, 0x92, 0xc5, 0xff, 0xa8, 0x51, 0x6, 0xbe, 0xe9, 0x10, 0x47, 0x56, 0x1, 0xf8, 0xaf, 0x17, 0x40, 0xb9, 0xee, 0xd4, 0x83, 0x7a, 0x2d, 0x95, 0xc2, 0x3b, 0x6c, 0x4f, 0x18, 0xe1, 0xb6, 0xe, 0x59, 0xa0, 0xf7, 0xcd, 0x9a, 0x63, 0x34, 0x8c, 0xdb, 0x22, 0x75, 0xc8, 0x9f, 0x66, 0x31, 0x89, 0xde, 0x27, 0x70, 0x4a, 0x1d, 0xe4, 0xb3, 0xb, 0x5c, 0xa5, 0xf2, 0xd1, 0x86, 0x7f, 0x28, 0x90, 0xc7, 0x3e, 0x69, 0x53, 0x4, 0xfd, 0xaa, 0x12, 0x45, 0xbc, 0xeb, 0xfa, 0xad, 0x54, 0x3, 0xbb, 0xec, 0x15, 0x42, 0x78, 0x2f, 0xd6, 0x81, 0x39, 0x6e, 0x97, 0xc0, 0xe3, 0xb4, 0x4d, 0x1a, 0xa2, 0xf5, 0xc, 0x5b, 0x61, 0x36, 0xcf, 0x98, 0x20, 0x77, 0x8e, 0xd9, 0xac, 0xfb, 0x2, 0x55, 0xed, 0xba, 0x43, 0x14, 0x2e, 0x79, 0x80, 0xd7, 0x6f, 0x38, 0xc1, 0x96, 0xb5, 0xe2, 0x1b, 0x4c, 0xf4, 0xa3, 0x5a, 0xd, 0x37, 0x60, 0x99, 0xce, 0x76, 0x21, 0xd8, 0x8f, 0x9e, 0xc9, 0x30, 0x67, 0xdf, 0x88, 0x71, 0x26, 0x1c, 0x4b, 0xb2, 0xe5, 0x5d, 0xa, 0xf3, 0xa4, 0x87, 0xd0, 0x29, 0x7e, 0xc6, 0x91, 0x68, 0x3f, 0x5, 0x52, 0xab, 0xfc, 0x44, 0x13, 0xea, 0xbd},
+ {0x0, 0x58, 0xb0, 0xe8, 0x7d, 0x25, 0xcd, 0x95, 0xfa, 0xa2, 0x4a, 0x12, 0x87, 0xdf, 0x37, 0x6f, 0xe9, 0xb1, 0x59, 0x1, 0x94, 0xcc, 0x24, 0x7c, 0x13, 0x4b, 0xa3, 0xfb, 0x6e, 0x36, 0xde, 0x86, 0xcf, 0x97, 0x7f, 0x27, 0xb2, 0xea, 0x2, 0x5a, 0x35, 0x6d, 0x85, 0xdd, 0x48, 0x10, 0xf8, 0xa0, 0x26, 0x7e, 0x96, 0xce, 0x5b, 0x3, 0xeb, 0xb3, 0xdc, 0x84, 0x6c, 0x34, 0xa1, 0xf9, 0x11, 0x49, 0x83, 0xdb, 0x33, 0x6b, 0xfe, 0xa6, 0x4e, 0x16, 0x79, 0x21, 0xc9, 0x91, 0x4, 0x5c, 0xb4, 0xec, 0x6a, 0x32, 0xda, 0x82, 0x17, 0x4f, 0xa7, 0xff, 0x90, 0xc8, 0x20, 0x78, 0xed, 0xb5, 0x5d, 0x5, 0x4c, 0x14, 0xfc, 0xa4, 0x31, 0x69, 0x81, 0xd9, 0xb6, 0xee, 0x6, 0x5e, 0xcb, 0x93, 0x7b, 0x23, 0xa5, 0xfd, 0x15, 0x4d, 0xd8, 0x80, 0x68, 0x30, 0x5f, 0x7, 0xef, 0xb7, 0x22, 0x7a, 0x92, 0xca, 0x1b, 0x43, 0xab, 0xf3, 0x66, 0x3e, 0xd6, 0x8e, 0xe1, 0xb9, 0x51, 0x9, 0x9c, 0xc4, 0x2c, 0x74, 0xf2, 0xaa, 0x42, 0x1a, 0x8f, 0xd7, 0x3f, 0x67, 0x8, 0x50, 0xb8, 0xe0, 0x75, 0x2d, 0xc5, 0x9d, 0xd4, 0x8c, 0x64, 0x3c, 0xa9, 0xf1, 0x19, 0x41, 0x2e, 0x76, 0x9e, 0xc6, 0x53, 0xb, 0xe3, 0xbb, 0x3d, 0x65, 0x8d, 0xd5, 0x40, 0x18, 0xf0, 0xa8, 0xc7, 0x9f, 0x77, 0x2f, 0xba, 0xe2, 0xa, 0x52, 0x98, 0xc0, 0x28, 0x70, 0xe5, 0xbd, 0x55, 0xd, 0x62, 0x3a, 0xd2, 0x8a, 0x1f, 0x47, 0xaf, 0xf7, 0x71, 0x29, 0xc1, 0x99, 0xc, 0x54, 0xbc, 0xe4, 0x8b, 0xd3, 0x3b, 0x63, 0xf6, 0xae, 0x46, 0x1e, 0x57, 0xf, 0xe7, 0xbf, 0x2a, 0x72, 0x9a, 0xc2, 0xad, 0xf5, 0x1d, 0x45, 0xd0, 0x88, 0x60, 0x38, 0xbe, 0xe6, 0xe, 0x56, 0xc3, 0x9b, 0x73, 0x2b, 0x44, 0x1c, 0xf4, 0xac, 0x39, 0x61, 0x89, 0xd1},
+ {0x0, 0x59, 0xb2, 0xeb, 0x79, 0x20, 0xcb, 0x92, 0xf2, 0xab, 0x40, 0x19, 0x8b, 0xd2, 0x39, 0x60, 0xf9, 0xa0, 0x4b, 0x12, 0x80, 0xd9, 0x32, 0x6b, 0xb, 0x52, 0xb9, 0xe0, 0x72, 0x2b, 0xc0, 0x99, 0xef, 0xb6, 0x5d, 0x4, 0x96, 0xcf, 0x24, 0x7d, 0x1d, 0x44, 0xaf, 0xf6, 0x64, 0x3d, 0xd6, 0x8f, 0x16, 0x4f, 0xa4, 0xfd, 0x6f, 0x36, 0xdd, 0x84, 0xe4, 0xbd, 0x56, 0xf, 0x9d, 0xc4, 0x2f, 0x76, 0xc3, 0x9a, 0x71, 0x28, 0xba, 0xe3, 0x8, 0x51, 0x31, 0x68, 0x83, 0xda, 0x48, 0x11, 0xfa, 0xa3, 0x3a, 0x63, 0x88, 0xd1, 0x43, 0x1a, 0xf1, 0xa8, 0xc8, 0x91, 0x7a, 0x23, 0xb1, 0xe8, 0x3, 0x5a, 0x2c, 0x75, 0x9e, 0xc7, 0x55, 0xc, 0xe7, 0xbe, 0xde, 0x87, 0x6c, 0x35, 0xa7, 0xfe, 0x15, 0x4c, 0xd5, 0x8c, 0x67, 0x3e, 0xac, 0xf5, 0x1e, 0x47, 0x27, 0x7e, 0x95, 0xcc, 0x5e, 0x7, 0xec, 0xb5, 0x9b, 0xc2, 0x29, 0x70, 0xe2, 0xbb, 0x50, 0x9, 0x69, 0x30, 0xdb, 0x82, 0x10, 0x49, 0xa2, 0xfb, 0x62, 0x3b, 0xd0, 0x89, 0x1b, 0x42, 0xa9, 0xf0, 0x90, 0xc9, 0x22, 0x7b, 0xe9, 0xb0, 0x5b, 0x2, 0x74, 0x2d, 0xc6, 0x9f, 0xd, 0x54, 0xbf, 0xe6, 0x86, 0xdf, 0x34, 0x6d, 0xff, 0xa6, 0x4d, 0x14, 0x8d, 0xd4, 0x3f, 0x66, 0xf4, 0xad, 0x46, 0x1f, 0x7f, 0x26, 0xcd, 0x94, 0x6, 0x5f, 0xb4, 0xed, 0x58, 0x1, 0xea, 0xb3, 0x21, 0x78, 0x93, 0xca, 0xaa, 0xf3, 0x18, 0x41, 0xd3, 0x8a, 0x61, 0x38, 0xa1, 0xf8, 0x13, 0x4a, 0xd8, 0x81, 0x6a, 0x33, 0x53, 0xa, 0xe1, 0xb8, 0x2a, 0x73, 0x98, 0xc1, 0xb7, 0xee, 0x5, 0x5c, 0xce, 0x97, 0x7c, 0x25, 0x45, 0x1c, 0xf7, 0xae, 0x3c, 0x65, 0x8e, 0xd7, 0x4e, 0x17, 0xfc, 0xa5, 0x37, 0x6e, 0x85, 0xdc, 0xbc, 0xe5, 0xe, 0x57, 0xc5, 0x9c, 0x77, 0x2e},
+ {0x0, 0x5a, 0xb4, 0xee, 0x75, 0x2f, 0xc1, 0x9b, 0xea, 0xb0, 0x5e, 0x4, 0x9f, 0xc5, 0x2b, 0x71, 0xc9, 0x93, 0x7d, 0x27, 0xbc, 0xe6, 0x8, 0x52, 0x23, 0x79, 0x97, 0xcd, 0x56, 0xc, 0xe2, 0xb8, 0x8f, 0xd5, 0x3b, 0x61, 0xfa, 0xa0, 0x4e, 0x14, 0x65, 0x3f, 0xd1, 0x8b, 0x10, 0x4a, 0xa4, 0xfe, 0x46, 0x1c, 0xf2, 0xa8, 0x33, 0x69, 0x87, 0xdd, 0xac, 0xf6, 0x18, 0x42, 0xd9, 0x83, 0x6d, 0x37, 0x3, 0x59, 0xb7, 0xed, 0x76, 0x2c, 0xc2, 0x98, 0xe9, 0xb3, 0x5d, 0x7, 0x9c, 0xc6, 0x28, 0x72, 0xca, 0x90, 0x7e, 0x24, 0xbf, 0xe5, 0xb, 0x51, 0x20, 0x7a, 0x94, 0xce, 0x55, 0xf, 0xe1, 0xbb, 0x8c, 0xd6, 0x38, 0x62, 0xf9, 0xa3, 0x4d, 0x17, 0x66, 0x3c, 0xd2, 0x88, 0x13, 0x49, 0xa7, 0xfd, 0x45, 0x1f, 0xf1, 0xab, 0x30, 0x6a, 0x84, 0xde, 0xaf, 0xf5, 0x1b, 0x41, 0xda, 0x80, 0x6e, 0x34, 0x6, 0x5c, 0xb2, 0xe8, 0x73, 0x29, 0xc7, 0x9d, 0xec, 0xb6, 0x58, 0x2, 0x99, 0xc3, 0x2d, 0x77, 0xcf, 0x95, 0x7b, 0x21, 0xba, 0xe0, 0xe, 0x54, 0x25, 0x7f, 0x91, 0xcb, 0x50, 0xa, 0xe4, 0xbe, 0x89, 0xd3, 0x3d, 0x67, 0xfc, 0xa6, 0x48, 0x12, 0x63, 0x39, 0xd7, 0x8d, 0x16, 0x4c, 0xa2, 0xf8, 0x40, 0x1a, 0xf4, 0xae, 0x35, 0x6f, 0x81, 0xdb, 0xaa, 0xf0, 0x1e, 0x44, 0xdf, 0x85, 0x6b, 0x31, 0x5, 0x5f, 0xb1, 0xeb, 0x70, 0x2a, 0xc4, 0x9e, 0xef, 0xb5, 0x5b, 0x1, 0x9a, 0xc0, 0x2e, 0x74, 0xcc, 0x96, 0x78, 0x22, 0xb9, 0xe3, 0xd, 0x57, 0x26, 0x7c, 0x92, 0xc8, 0x53, 0x9, 0xe7, 0xbd, 0x8a, 0xd0, 0x3e, 0x64, 0xff, 0xa5, 0x4b, 0x11, 0x60, 0x3a, 0xd4, 0x8e, 0x15, 0x4f, 0xa1, 0xfb, 0x43, 0x19, 0xf7, 0xad, 0x36, 0x6c, 0x82, 0xd8, 0xa9, 0xf3, 0x1d, 0x47, 0xdc, 0x86, 0x68, 0x32},
+ {0x0, 0x5b, 0xb6, 0xed, 0x71, 0x2a, 0xc7, 0x9c, 0xe2, 0xb9, 0x54, 0xf, 0x93, 0xc8, 0x25, 0x7e, 0xd9, 0x82, 0x6f, 0x34, 0xa8, 0xf3, 0x1e, 0x45, 0x3b, 0x60, 0x8d, 0xd6, 0x4a, 0x11, 0xfc, 0xa7, 0xaf, 0xf4, 0x19, 0x42, 0xde, 0x85, 0x68, 0x33, 0x4d, 0x16, 0xfb, 0xa0, 0x3c, 0x67, 0x8a, 0xd1, 0x76, 0x2d, 0xc0, 0x9b, 0x7, 0x5c, 0xb1, 0xea, 0x94, 0xcf, 0x22, 0x79, 0xe5, 0xbe, 0x53, 0x8, 0x43, 0x18, 0xf5, 0xae, 0x32, 0x69, 0x84, 0xdf, 0xa1, 0xfa, 0x17, 0x4c, 0xd0, 0x8b, 0x66, 0x3d, 0x9a, 0xc1, 0x2c, 0x77, 0xeb, 0xb0, 0x5d, 0x6, 0x78, 0x23, 0xce, 0x95, 0x9, 0x52, 0xbf, 0xe4, 0xec, 0xb7, 0x5a, 0x1, 0x9d, 0xc6, 0x2b, 0x70, 0xe, 0x55, 0xb8, 0xe3, 0x7f, 0x24, 0xc9, 0x92, 0x35, 0x6e, 0x83, 0xd8, 0x44, 0x1f, 0xf2, 0xa9, 0xd7, 0x8c, 0x61, 0x3a, 0xa6, 0xfd, 0x10, 0x4b, 0x86, 0xdd, 0x30, 0x6b, 0xf7, 0xac, 0x41, 0x1a, 0x64, 0x3f, 0xd2, 0x89, 0x15, 0x4e, 0xa3, 0xf8, 0x5f, 0x4, 0xe9, 0xb2, 0x2e, 0x75, 0x98, 0xc3, 0xbd, 0xe6, 0xb, 0x50, 0xcc, 0x97, 0x7a, 0x21, 0x29, 0x72, 0x9f, 0xc4, 0x58, 0x3, 0xee, 0xb5, 0xcb, 0x90, 0x7d, 0x26, 0xba, 0xe1, 0xc, 0x57, 0xf0, 0xab, 0x46, 0x1d, 0x81, 0xda, 0x37, 0x6c, 0x12, 0x49, 0xa4, 0xff, 0x63, 0x38, 0xd5, 0x8e, 0xc5, 0x9e, 0x73, 0x28, 0xb4, 0xef, 0x2, 0x59, 0x27, 0x7c, 0x91, 0xca, 0x56, 0xd, 0xe0, 0xbb, 0x1c, 0x47, 0xaa, 0xf1, 0x6d, 0x36, 0xdb, 0x80, 0xfe, 0xa5, 0x48, 0x13, 0x8f, 0xd4, 0x39, 0x62, 0x6a, 0x31, 0xdc, 0x87, 0x1b, 0x40, 0xad, 0xf6, 0x88, 0xd3, 0x3e, 0x65, 0xf9, 0xa2, 0x4f, 0x14, 0xb3, 0xe8, 0x5, 0x5e, 0xc2, 0x99, 0x74, 0x2f, 0x51, 0xa, 0xe7, 0xbc, 0x20, 0x7b, 0x96, 0xcd},
+ {0x0, 0x5c, 0xb8, 0xe4, 0x6d, 0x31, 0xd5, 0x89, 0xda, 0x86, 0x62, 0x3e, 0xb7, 0xeb, 0xf, 0x53, 0xa9, 0xf5, 0x11, 0x4d, 0xc4, 0x98, 0x7c, 0x20, 0x73, 0x2f, 0xcb, 0x97, 0x1e, 0x42, 0xa6, 0xfa, 0x4f, 0x13, 0xf7, 0xab, 0x22, 0x7e, 0x9a, 0xc6, 0x95, 0xc9, 0x2d, 0x71, 0xf8, 0xa4, 0x40, 0x1c, 0xe6, 0xba, 0x5e, 0x2, 0x8b, 0xd7, 0x33, 0x6f, 0x3c, 0x60, 0x84, 0xd8, 0x51, 0xd, 0xe9, 0xb5, 0x9e, 0xc2, 0x26, 0x7a, 0xf3, 0xaf, 0x4b, 0x17, 0x44, 0x18, 0xfc, 0xa0, 0x29, 0x75, 0x91, 0xcd, 0x37, 0x6b, 0x8f, 0xd3, 0x5a, 0x6, 0xe2, 0xbe, 0xed, 0xb1, 0x55, 0x9, 0x80, 0xdc, 0x38, 0x64, 0xd1, 0x8d, 0x69, 0x35, 0xbc, 0xe0, 0x4, 0x58, 0xb, 0x57, 0xb3, 0xef, 0x66, 0x3a, 0xde, 0x82, 0x78, 0x24, 0xc0, 0x9c, 0x15, 0x49, 0xad, 0xf1, 0xa2, 0xfe, 0x1a, 0x46, 0xcf, 0x93, 0x77, 0x2b, 0x21, 0x7d, 0x99, 0xc5, 0x4c, 0x10, 0xf4, 0xa8, 0xfb, 0xa7, 0x43, 0x1f, 0x96, 0xca, 0x2e, 0x72, 0x88, 0xd4, 0x30, 0x6c, 0xe5, 0xb9, 0x5d, 0x1, 0x52, 0xe, 0xea, 0xb6, 0x3f, 0x63, 0x87, 0xdb, 0x6e, 0x32, 0xd6, 0x8a, 0x3, 0x5f, 0xbb, 0xe7, 0xb4, 0xe8, 0xc, 0x50, 0xd9, 0x85, 0x61, 0x3d, 0xc7, 0x9b, 0x7f, 0x23, 0xaa, 0xf6, 0x12, 0x4e, 0x1d, 0x41, 0xa5, 0xf9, 0x70, 0x2c, 0xc8, 0x94, 0xbf, 0xe3, 0x7, 0x5b, 0xd2, 0x8e, 0x6a, 0x36, 0x65, 0x39, 0xdd, 0x81, 0x8, 0x54, 0xb0, 0xec, 0x16, 0x4a, 0xae, 0xf2, 0x7b, 0x27, 0xc3, 0x9f, 0xcc, 0x90, 0x74, 0x28, 0xa1, 0xfd, 0x19, 0x45, 0xf0, 0xac, 0x48, 0x14, 0x9d, 0xc1, 0x25, 0x79, 0x2a, 0x76, 0x92, 0xce, 0x47, 0x1b, 0xff, 0xa3, 0x59, 0x5, 0xe1, 0xbd, 0x34, 0x68, 0x8c, 0xd0, 0x83, 0xdf, 0x3b, 0x67, 0xee, 0xb2, 0x56, 0xa},
+ {0x0, 0x5d, 0xba, 0xe7, 0x69, 0x34, 0xd3, 0x8e, 0xd2, 0x8f, 0x68, 0x35, 0xbb, 0xe6, 0x1, 0x5c, 0xb9, 0xe4, 0x3, 0x5e, 0xd0, 0x8d, 0x6a, 0x37, 0x6b, 0x36, 0xd1, 0x8c, 0x2, 0x5f, 0xb8, 0xe5, 0x6f, 0x32, 0xd5, 0x88, 0x6, 0x5b, 0xbc, 0xe1, 0xbd, 0xe0, 0x7, 0x5a, 0xd4, 0x89, 0x6e, 0x33, 0xd6, 0x8b, 0x6c, 0x31, 0xbf, 0xe2, 0x5, 0x58, 0x4, 0x59, 0xbe, 0xe3, 0x6d, 0x30, 0xd7, 0x8a, 0xde, 0x83, 0x64, 0x39, 0xb7, 0xea, 0xd, 0x50, 0xc, 0x51, 0xb6, 0xeb, 0x65, 0x38, 0xdf, 0x82, 0x67, 0x3a, 0xdd, 0x80, 0xe, 0x53, 0xb4, 0xe9, 0xb5, 0xe8, 0xf, 0x52, 0xdc, 0x81, 0x66, 0x3b, 0xb1, 0xec, 0xb, 0x56, 0xd8, 0x85, 0x62, 0x3f, 0x63, 0x3e, 0xd9, 0x84, 0xa, 0x57, 0xb0, 0xed, 0x8, 0x55, 0xb2, 0xef, 0x61, 0x3c, 0xdb, 0x86, 0xda, 0x87, 0x60, 0x3d, 0xb3, 0xee, 0x9, 0x54, 0xa1, 0xfc, 0x1b, 0x46, 0xc8, 0x95, 0x72, 0x2f, 0x73, 0x2e, 0xc9, 0x94, 0x1a, 0x47, 0xa0, 0xfd, 0x18, 0x45, 0xa2, 0xff, 0x71, 0x2c, 0xcb, 0x96, 0xca, 0x97, 0x70, 0x2d, 0xa3, 0xfe, 0x19, 0x44, 0xce, 0x93, 0x74, 0x29, 0xa7, 0xfa, 0x1d, 0x40, 0x1c, 0x41, 0xa6, 0xfb, 0x75, 0x28, 0xcf, 0x92, 0x77, 0x2a, 0xcd, 0x90, 0x1e, 0x43, 0xa4, 0xf9, 0xa5, 0xf8, 0x1f, 0x42, 0xcc, 0x91, 0x76, 0x2b, 0x7f, 0x22, 0xc5, 0x98, 0x16, 0x4b, 0xac, 0xf1, 0xad, 0xf0, 0x17, 0x4a, 0xc4, 0x99, 0x7e, 0x23, 0xc6, 0x9b, 0x7c, 0x21, 0xaf, 0xf2, 0x15, 0x48, 0x14, 0x49, 0xae, 0xf3, 0x7d, 0x20, 0xc7, 0x9a, 0x10, 0x4d, 0xaa, 0xf7, 0x79, 0x24, 0xc3, 0x9e, 0xc2, 0x9f, 0x78, 0x25, 0xab, 0xf6, 0x11, 0x4c, 0xa9, 0xf4, 0x13, 0x4e, 0xc0, 0x9d, 0x7a, 0x27, 0x7b, 0x26, 0xc1, 0x9c, 0x12, 0x4f, 0xa8, 0xf5},
+ {0x0, 0x5e, 0xbc, 0xe2, 0x65, 0x3b, 0xd9, 0x87, 0xca, 0x94, 0x76, 0x28, 0xaf, 0xf1, 0x13, 0x4d, 0x89, 0xd7, 0x35, 0x6b, 0xec, 0xb2, 0x50, 0xe, 0x43, 0x1d, 0xff, 0xa1, 0x26, 0x78, 0x9a, 0xc4, 0xf, 0x51, 0xb3, 0xed, 0x6a, 0x34, 0xd6, 0x88, 0xc5, 0x9b, 0x79, 0x27, 0xa0, 0xfe, 0x1c, 0x42, 0x86, 0xd8, 0x3a, 0x64, 0xe3, 0xbd, 0x5f, 0x1, 0x4c, 0x12, 0xf0, 0xae, 0x29, 0x77, 0x95, 0xcb, 0x1e, 0x40, 0xa2, 0xfc, 0x7b, 0x25, 0xc7, 0x99, 0xd4, 0x8a, 0x68, 0x36, 0xb1, 0xef, 0xd, 0x53, 0x97, 0xc9, 0x2b, 0x75, 0xf2, 0xac, 0x4e, 0x10, 0x5d, 0x3, 0xe1, 0xbf, 0x38, 0x66, 0x84, 0xda, 0x11, 0x4f, 0xad, 0xf3, 0x74, 0x2a, 0xc8, 0x96, 0xdb, 0x85, 0x67, 0x39, 0xbe, 0xe0, 0x2, 0x5c, 0x98, 0xc6, 0x24, 0x7a, 0xfd, 0xa3, 0x41, 0x1f, 0x52, 0xc, 0xee, 0xb0, 0x37, 0x69, 0x8b, 0xd5, 0x3c, 0x62, 0x80, 0xde, 0x59, 0x7, 0xe5, 0xbb, 0xf6, 0xa8, 0x4a, 0x14, 0x93, 0xcd, 0x2f, 0x71, 0xb5, 0xeb, 0x9, 0x57, 0xd0, 0x8e, 0x6c, 0x32, 0x7f, 0x21, 0xc3, 0x9d, 0x1a, 0x44, 0xa6, 0xf8, 0x33, 0x6d, 0x8f, 0xd1, 0x56, 0x8, 0xea, 0xb4, 0xf9, 0xa7, 0x45, 0x1b, 0x9c, 0xc2, 0x20, 0x7e, 0xba, 0xe4, 0x6, 0x58, 0xdf, 0x81, 0x63, 0x3d, 0x70, 0x2e, 0xcc, 0x92, 0x15, 0x4b, 0xa9, 0xf7, 0x22, 0x7c, 0x9e, 0xc0, 0x47, 0x19, 0xfb, 0xa5, 0xe8, 0xb6, 0x54, 0xa, 0x8d, 0xd3, 0x31, 0x6f, 0xab, 0xf5, 0x17, 0x49, 0xce, 0x90, 0x72, 0x2c, 0x61, 0x3f, 0xdd, 0x83, 0x4, 0x5a, 0xb8, 0xe6, 0x2d, 0x73, 0x91, 0xcf, 0x48, 0x16, 0xf4, 0xaa, 0xe7, 0xb9, 0x5b, 0x5, 0x82, 0xdc, 0x3e, 0x60, 0xa4, 0xfa, 0x18, 0x46, 0xc1, 0x9f, 0x7d, 0x23, 0x6e, 0x30, 0xd2, 0x8c, 0xb, 0x55, 0xb7, 0xe9},
+ {0x0, 0x5f, 0xbe, 0xe1, 0x61, 0x3e, 0xdf, 0x80, 0xc2, 0x9d, 0x7c, 0x23, 0xa3, 0xfc, 0x1d, 0x42, 0x99, 0xc6, 0x27, 0x78, 0xf8, 0xa7, 0x46, 0x19, 0x5b, 0x4, 0xe5, 0xba, 0x3a, 0x65, 0x84, 0xdb, 0x2f, 0x70, 0x91, 0xce, 0x4e, 0x11, 0xf0, 0xaf, 0xed, 0xb2, 0x53, 0xc, 0x8c, 0xd3, 0x32, 0x6d, 0xb6, 0xe9, 0x8, 0x57, 0xd7, 0x88, 0x69, 0x36, 0x74, 0x2b, 0xca, 0x95, 0x15, 0x4a, 0xab, 0xf4, 0x5e, 0x1, 0xe0, 0xbf, 0x3f, 0x60, 0x81, 0xde, 0x9c, 0xc3, 0x22, 0x7d, 0xfd, 0xa2, 0x43, 0x1c, 0xc7, 0x98, 0x79, 0x26, 0xa6, 0xf9, 0x18, 0x47, 0x5, 0x5a, 0xbb, 0xe4, 0x64, 0x3b, 0xda, 0x85, 0x71, 0x2e, 0xcf, 0x90, 0x10, 0x4f, 0xae, 0xf1, 0xb3, 0xec, 0xd, 0x52, 0xd2, 0x8d, 0x6c, 0x33, 0xe8, 0xb7, 0x56, 0x9, 0x89, 0xd6, 0x37, 0x68, 0x2a, 0x75, 0x94, 0xcb, 0x4b, 0x14, 0xf5, 0xaa, 0xbc, 0xe3, 0x2, 0x5d, 0xdd, 0x82, 0x63, 0x3c, 0x7e, 0x21, 0xc0, 0x9f, 0x1f, 0x40, 0xa1, 0xfe, 0x25, 0x7a, 0x9b, 0xc4, 0x44, 0x1b, 0xfa, 0xa5, 0xe7, 0xb8, 0x59, 0x6, 0x86, 0xd9, 0x38, 0x67, 0x93, 0xcc, 0x2d, 0x72, 0xf2, 0xad, 0x4c, 0x13, 0x51, 0xe, 0xef, 0xb0, 0x30, 0x6f, 0x8e, 0xd1, 0xa, 0x55, 0xb4, 0xeb, 0x6b, 0x34, 0xd5, 0x8a, 0xc8, 0x97, 0x76, 0x29, 0xa9, 0xf6, 0x17, 0x48, 0xe2, 0xbd, 0x5c, 0x3, 0x83, 0xdc, 0x3d, 0x62, 0x20, 0x7f, 0x9e, 0xc1, 0x41, 0x1e, 0xff, 0xa0, 0x7b, 0x24, 0xc5, 0x9a, 0x1a, 0x45, 0xa4, 0xfb, 0xb9, 0xe6, 0x7, 0x58, 0xd8, 0x87, 0x66, 0x39, 0xcd, 0x92, 0x73, 0x2c, 0xac, 0xf3, 0x12, 0x4d, 0xf, 0x50, 0xb1, 0xee, 0x6e, 0x31, 0xd0, 0x8f, 0x54, 0xb, 0xea, 0xb5, 0x35, 0x6a, 0x8b, 0xd4, 0x96, 0xc9, 0x28, 0x77, 0xf7, 0xa8, 0x49, 0x16},
+ {0x0, 0x60, 0xc0, 0xa0, 0x9d, 0xfd, 0x5d, 0x3d, 0x27, 0x47, 0xe7, 0x87, 0xba, 0xda, 0x7a, 0x1a, 0x4e, 0x2e, 0x8e, 0xee, 0xd3, 0xb3, 0x13, 0x73, 0x69, 0x9, 0xa9, 0xc9, 0xf4, 0x94, 0x34, 0x54, 0x9c, 0xfc, 0x5c, 0x3c, 0x1, 0x61, 0xc1, 0xa1, 0xbb, 0xdb, 0x7b, 0x1b, 0x26, 0x46, 0xe6, 0x86, 0xd2, 0xb2, 0x12, 0x72, 0x4f, 0x2f, 0x8f, 0xef, 0xf5, 0x95, 0x35, 0x55, 0x68, 0x8, 0xa8, 0xc8, 0x25, 0x45, 0xe5, 0x85, 0xb8, 0xd8, 0x78, 0x18, 0x2, 0x62, 0xc2, 0xa2, 0x9f, 0xff, 0x5f, 0x3f, 0x6b, 0xb, 0xab, 0xcb, 0xf6, 0x96, 0x36, 0x56, 0x4c, 0x2c, 0x8c, 0xec, 0xd1, 0xb1, 0x11, 0x71, 0xb9, 0xd9, 0x79, 0x19, 0x24, 0x44, 0xe4, 0x84, 0x9e, 0xfe, 0x5e, 0x3e, 0x3, 0x63, 0xc3, 0xa3, 0xf7, 0x97, 0x37, 0x57, 0x6a, 0xa, 0xaa, 0xca, 0xd0, 0xb0, 0x10, 0x70, 0x4d, 0x2d, 0x8d, 0xed, 0x4a, 0x2a, 0x8a, 0xea, 0xd7, 0xb7, 0x17, 0x77, 0x6d, 0xd, 0xad, 0xcd, 0xf0, 0x90, 0x30, 0x50, 0x4, 0x64, 0xc4, 0xa4, 0x99, 0xf9, 0x59, 0x39, 0x23, 0x43, 0xe3, 0x83, 0xbe, 0xde, 0x7e, 0x1e, 0xd6, 0xb6, 0x16, 0x76, 0x4b, 0x2b, 0x8b, 0xeb, 0xf1, 0x91, 0x31, 0x51, 0x6c, 0xc, 0xac, 0xcc, 0x98, 0xf8, 0x58, 0x38, 0x5, 0x65, 0xc5, 0xa5, 0xbf, 0xdf, 0x7f, 0x1f, 0x22, 0x42, 0xe2, 0x82, 0x6f, 0xf, 0xaf, 0xcf, 0xf2, 0x92, 0x32, 0x52, 0x48, 0x28, 0x88, 0xe8, 0xd5, 0xb5, 0x15, 0x75, 0x21, 0x41, 0xe1, 0x81, 0xbc, 0xdc, 0x7c, 0x1c, 0x6, 0x66, 0xc6, 0xa6, 0x9b, 0xfb, 0x5b, 0x3b, 0xf3, 0x93, 0x33, 0x53, 0x6e, 0xe, 0xae, 0xce, 0xd4, 0xb4, 0x14, 0x74, 0x49, 0x29, 0x89, 0xe9, 0xbd, 0xdd, 0x7d, 0x1d, 0x20, 0x40, 0xe0, 0x80, 0x9a, 0xfa, 0x5a, 0x3a, 0x7, 0x67, 0xc7, 0xa7},
+ {0x0, 0x61, 0xc2, 0xa3, 0x99, 0xf8, 0x5b, 0x3a, 0x2f, 0x4e, 0xed, 0x8c, 0xb6, 0xd7, 0x74, 0x15, 0x5e, 0x3f, 0x9c, 0xfd, 0xc7, 0xa6, 0x5, 0x64, 0x71, 0x10, 0xb3, 0xd2, 0xe8, 0x89, 0x2a, 0x4b, 0xbc, 0xdd, 0x7e, 0x1f, 0x25, 0x44, 0xe7, 0x86, 0x93, 0xf2, 0x51, 0x30, 0xa, 0x6b, 0xc8, 0xa9, 0xe2, 0x83, 0x20, 0x41, 0x7b, 0x1a, 0xb9, 0xd8, 0xcd, 0xac, 0xf, 0x6e, 0x54, 0x35, 0x96, 0xf7, 0x65, 0x4, 0xa7, 0xc6, 0xfc, 0x9d, 0x3e, 0x5f, 0x4a, 0x2b, 0x88, 0xe9, 0xd3, 0xb2, 0x11, 0x70, 0x3b, 0x5a, 0xf9, 0x98, 0xa2, 0xc3, 0x60, 0x1, 0x14, 0x75, 0xd6, 0xb7, 0x8d, 0xec, 0x4f, 0x2e, 0xd9, 0xb8, 0x1b, 0x7a, 0x40, 0x21, 0x82, 0xe3, 0xf6, 0x97, 0x34, 0x55, 0x6f, 0xe, 0xad, 0xcc, 0x87, 0xe6, 0x45, 0x24, 0x1e, 0x7f, 0xdc, 0xbd, 0xa8, 0xc9, 0x6a, 0xb, 0x31, 0x50, 0xf3, 0x92, 0xca, 0xab, 0x8, 0x69, 0x53, 0x32, 0x91, 0xf0, 0xe5, 0x84, 0x27, 0x46, 0x7c, 0x1d, 0xbe, 0xdf, 0x94, 0xf5, 0x56, 0x37, 0xd, 0x6c, 0xcf, 0xae, 0xbb, 0xda, 0x79, 0x18, 0x22, 0x43, 0xe0, 0x81, 0x76, 0x17, 0xb4, 0xd5, 0xef, 0x8e, 0x2d, 0x4c, 0x59, 0x38, 0x9b, 0xfa, 0xc0, 0xa1, 0x2, 0x63, 0x28, 0x49, 0xea, 0x8b, 0xb1, 0xd0, 0x73, 0x12, 0x7, 0x66, 0xc5, 0xa4, 0x9e, 0xff, 0x5c, 0x3d, 0xaf, 0xce, 0x6d, 0xc, 0x36, 0x57, 0xf4, 0x95, 0x80, 0xe1, 0x42, 0x23, 0x19, 0x78, 0xdb, 0xba, 0xf1, 0x90, 0x33, 0x52, 0x68, 0x9, 0xaa, 0xcb, 0xde, 0xbf, 0x1c, 0x7d, 0x47, 0x26, 0x85, 0xe4, 0x13, 0x72, 0xd1, 0xb0, 0x8a, 0xeb, 0x48, 0x29, 0x3c, 0x5d, 0xfe, 0x9f, 0xa5, 0xc4, 0x67, 0x6, 0x4d, 0x2c, 0x8f, 0xee, 0xd4, 0xb5, 0x16, 0x77, 0x62, 0x3, 0xa0, 0xc1, 0xfb, 0x9a, 0x39, 0x58},
+ {0x0, 0x62, 0xc4, 0xa6, 0x95, 0xf7, 0x51, 0x33, 0x37, 0x55, 0xf3, 0x91, 0xa2, 0xc0, 0x66, 0x4, 0x6e, 0xc, 0xaa, 0xc8, 0xfb, 0x99, 0x3f, 0x5d, 0x59, 0x3b, 0x9d, 0xff, 0xcc, 0xae, 0x8, 0x6a, 0xdc, 0xbe, 0x18, 0x7a, 0x49, 0x2b, 0x8d, 0xef, 0xeb, 0x89, 0x2f, 0x4d, 0x7e, 0x1c, 0xba, 0xd8, 0xb2, 0xd0, 0x76, 0x14, 0x27, 0x45, 0xe3, 0x81, 0x85, 0xe7, 0x41, 0x23, 0x10, 0x72, 0xd4, 0xb6, 0xa5, 0xc7, 0x61, 0x3, 0x30, 0x52, 0xf4, 0x96, 0x92, 0xf0, 0x56, 0x34, 0x7, 0x65, 0xc3, 0xa1, 0xcb, 0xa9, 0xf, 0x6d, 0x5e, 0x3c, 0x9a, 0xf8, 0xfc, 0x9e, 0x38, 0x5a, 0x69, 0xb, 0xad, 0xcf, 0x79, 0x1b, 0xbd, 0xdf, 0xec, 0x8e, 0x28, 0x4a, 0x4e, 0x2c, 0x8a, 0xe8, 0xdb, 0xb9, 0x1f, 0x7d, 0x17, 0x75, 0xd3, 0xb1, 0x82, 0xe0, 0x46, 0x24, 0x20, 0x42, 0xe4, 0x86, 0xb5, 0xd7, 0x71, 0x13, 0x57, 0x35, 0x93, 0xf1, 0xc2, 0xa0, 0x6, 0x64, 0x60, 0x2, 0xa4, 0xc6, 0xf5, 0x97, 0x31, 0x53, 0x39, 0x5b, 0xfd, 0x9f, 0xac, 0xce, 0x68, 0xa, 0xe, 0x6c, 0xca, 0xa8, 0x9b, 0xf9, 0x5f, 0x3d, 0x8b, 0xe9, 0x4f, 0x2d, 0x1e, 0x7c, 0xda, 0xb8, 0xbc, 0xde, 0x78, 0x1a, 0x29, 0x4b, 0xed, 0x8f, 0xe5, 0x87, 0x21, 0x43, 0x70, 0x12, 0xb4, 0xd6, 0xd2, 0xb0, 0x16, 0x74, 0x47, 0x25, 0x83, 0xe1, 0xf2, 0x90, 0x36, 0x54, 0x67, 0x5, 0xa3, 0xc1, 0xc5, 0xa7, 0x1, 0x63, 0x50, 0x32, 0x94, 0xf6, 0x9c, 0xfe, 0x58, 0x3a, 0x9, 0x6b, 0xcd, 0xaf, 0xab, 0xc9, 0x6f, 0xd, 0x3e, 0x5c, 0xfa, 0x98, 0x2e, 0x4c, 0xea, 0x88, 0xbb, 0xd9, 0x7f, 0x1d, 0x19, 0x7b, 0xdd, 0xbf, 0x8c, 0xee, 0x48, 0x2a, 0x40, 0x22, 0x84, 0xe6, 0xd5, 0xb7, 0x11, 0x73, 0x77, 0x15, 0xb3, 0xd1, 0xe2, 0x80, 0x26, 0x44},
+ {0x0, 0x63, 0xc6, 0xa5, 0x91, 0xf2, 0x57, 0x34, 0x3f, 0x5c, 0xf9, 0x9a, 0xae, 0xcd, 0x68, 0xb, 0x7e, 0x1d, 0xb8, 0xdb, 0xef, 0x8c, 0x29, 0x4a, 0x41, 0x22, 0x87, 0xe4, 0xd0, 0xb3, 0x16, 0x75, 0xfc, 0x9f, 0x3a, 0x59, 0x6d, 0xe, 0xab, 0xc8, 0xc3, 0xa0, 0x5, 0x66, 0x52, 0x31, 0x94, 0xf7, 0x82, 0xe1, 0x44, 0x27, 0x13, 0x70, 0xd5, 0xb6, 0xbd, 0xde, 0x7b, 0x18, 0x2c, 0x4f, 0xea, 0x89, 0xe5, 0x86, 0x23, 0x40, 0x74, 0x17, 0xb2, 0xd1, 0xda, 0xb9, 0x1c, 0x7f, 0x4b, 0x28, 0x8d, 0xee, 0x9b, 0xf8, 0x5d, 0x3e, 0xa, 0x69, 0xcc, 0xaf, 0xa4, 0xc7, 0x62, 0x1, 0x35, 0x56, 0xf3, 0x90, 0x19, 0x7a, 0xdf, 0xbc, 0x88, 0xeb, 0x4e, 0x2d, 0x26, 0x45, 0xe0, 0x83, 0xb7, 0xd4, 0x71, 0x12, 0x67, 0x4, 0xa1, 0xc2, 0xf6, 0x95, 0x30, 0x53, 0x58, 0x3b, 0x9e, 0xfd, 0xc9, 0xaa, 0xf, 0x6c, 0xd7, 0xb4, 0x11, 0x72, 0x46, 0x25, 0x80, 0xe3, 0xe8, 0x8b, 0x2e, 0x4d, 0x79, 0x1a, 0xbf, 0xdc, 0xa9, 0xca, 0x6f, 0xc, 0x38, 0x5b, 0xfe, 0x9d, 0x96, 0xf5, 0x50, 0x33, 0x7, 0x64, 0xc1, 0xa2, 0x2b, 0x48, 0xed, 0x8e, 0xba, 0xd9, 0x7c, 0x1f, 0x14, 0x77, 0xd2, 0xb1, 0x85, 0xe6, 0x43, 0x20, 0x55, 0x36, 0x93, 0xf0, 0xc4, 0xa7, 0x2, 0x61, 0x6a, 0x9, 0xac, 0xcf, 0xfb, 0x98, 0x3d, 0x5e, 0x32, 0x51, 0xf4, 0x97, 0xa3, 0xc0, 0x65, 0x6, 0xd, 0x6e, 0xcb, 0xa8, 0x9c, 0xff, 0x5a, 0x39, 0x4c, 0x2f, 0x8a, 0xe9, 0xdd, 0xbe, 0x1b, 0x78, 0x73, 0x10, 0xb5, 0xd6, 0xe2, 0x81, 0x24, 0x47, 0xce, 0xad, 0x8, 0x6b, 0x5f, 0x3c, 0x99, 0xfa, 0xf1, 0x92, 0x37, 0x54, 0x60, 0x3, 0xa6, 0xc5, 0xb0, 0xd3, 0x76, 0x15, 0x21, 0x42, 0xe7, 0x84, 0x8f, 0xec, 0x49, 0x2a, 0x1e, 0x7d, 0xd8, 0xbb},
+ {0x0, 0x64, 0xc8, 0xac, 0x8d, 0xe9, 0x45, 0x21, 0x7, 0x63, 0xcf, 0xab, 0x8a, 0xee, 0x42, 0x26, 0xe, 0x6a, 0xc6, 0xa2, 0x83, 0xe7, 0x4b, 0x2f, 0x9, 0x6d, 0xc1, 0xa5, 0x84, 0xe0, 0x4c, 0x28, 0x1c, 0x78, 0xd4, 0xb0, 0x91, 0xf5, 0x59, 0x3d, 0x1b, 0x7f, 0xd3, 0xb7, 0x96, 0xf2, 0x5e, 0x3a, 0x12, 0x76, 0xda, 0xbe, 0x9f, 0xfb, 0x57, 0x33, 0x15, 0x71, 0xdd, 0xb9, 0x98, 0xfc, 0x50, 0x34, 0x38, 0x5c, 0xf0, 0x94, 0xb5, 0xd1, 0x7d, 0x19, 0x3f, 0x5b, 0xf7, 0x93, 0xb2, 0xd6, 0x7a, 0x1e, 0x36, 0x52, 0xfe, 0x9a, 0xbb, 0xdf, 0x73, 0x17, 0x31, 0x55, 0xf9, 0x9d, 0xbc, 0xd8, 0x74, 0x10, 0x24, 0x40, 0xec, 0x88, 0xa9, 0xcd, 0x61, 0x5, 0x23, 0x47, 0xeb, 0x8f, 0xae, 0xca, 0x66, 0x2, 0x2a, 0x4e, 0xe2, 0x86, 0xa7, 0xc3, 0x6f, 0xb, 0x2d, 0x49, 0xe5, 0x81, 0xa0, 0xc4, 0x68, 0xc, 0x70, 0x14, 0xb8, 0xdc, 0xfd, 0x99, 0x35, 0x51, 0x77, 0x13, 0xbf, 0xdb, 0xfa, 0x9e, 0x32, 0x56, 0x7e, 0x1a, 0xb6, 0xd2, 0xf3, 0x97, 0x3b, 0x5f, 0x79, 0x1d, 0xb1, 0xd5, 0xf4, 0x90, 0x3c, 0x58, 0x6c, 0x8, 0xa4, 0xc0, 0xe1, 0x85, 0x29, 0x4d, 0x6b, 0xf, 0xa3, 0xc7, 0xe6, 0x82, 0x2e, 0x4a, 0x62, 0x6, 0xaa, 0xce, 0xef, 0x8b, 0x27, 0x43, 0x65, 0x1, 0xad, 0xc9, 0xe8, 0x8c, 0x20, 0x44, 0x48, 0x2c, 0x80, 0xe4, 0xc5, 0xa1, 0xd, 0x69, 0x4f, 0x2b, 0x87, 0xe3, 0xc2, 0xa6, 0xa, 0x6e, 0x46, 0x22, 0x8e, 0xea, 0xcb, 0xaf, 0x3, 0x67, 0x41, 0x25, 0x89, 0xed, 0xcc, 0xa8, 0x4, 0x60, 0x54, 0x30, 0x9c, 0xf8, 0xd9, 0xbd, 0x11, 0x75, 0x53, 0x37, 0x9b, 0xff, 0xde, 0xba, 0x16, 0x72, 0x5a, 0x3e, 0x92, 0xf6, 0xd7, 0xb3, 0x1f, 0x7b, 0x5d, 0x39, 0x95, 0xf1, 0xd0, 0xb4, 0x18, 0x7c},
+ {0x0, 0x65, 0xca, 0xaf, 0x89, 0xec, 0x43, 0x26, 0xf, 0x6a, 0xc5, 0xa0, 0x86, 0xe3, 0x4c, 0x29, 0x1e, 0x7b, 0xd4, 0xb1, 0x97, 0xf2, 0x5d, 0x38, 0x11, 0x74, 0xdb, 0xbe, 0x98, 0xfd, 0x52, 0x37, 0x3c, 0x59, 0xf6, 0x93, 0xb5, 0xd0, 0x7f, 0x1a, 0x33, 0x56, 0xf9, 0x9c, 0xba, 0xdf, 0x70, 0x15, 0x22, 0x47, 0xe8, 0x8d, 0xab, 0xce, 0x61, 0x4, 0x2d, 0x48, 0xe7, 0x82, 0xa4, 0xc1, 0x6e, 0xb, 0x78, 0x1d, 0xb2, 0xd7, 0xf1, 0x94, 0x3b, 0x5e, 0x77, 0x12, 0xbd, 0xd8, 0xfe, 0x9b, 0x34, 0x51, 0x66, 0x3, 0xac, 0xc9, 0xef, 0x8a, 0x25, 0x40, 0x69, 0xc, 0xa3, 0xc6, 0xe0, 0x85, 0x2a, 0x4f, 0x44, 0x21, 0x8e, 0xeb, 0xcd, 0xa8, 0x7, 0x62, 0x4b, 0x2e, 0x81, 0xe4, 0xc2, 0xa7, 0x8, 0x6d, 0x5a, 0x3f, 0x90, 0xf5, 0xd3, 0xb6, 0x19, 0x7c, 0x55, 0x30, 0x9f, 0xfa, 0xdc, 0xb9, 0x16, 0x73, 0xf0, 0x95, 0x3a, 0x5f, 0x79, 0x1c, 0xb3, 0xd6, 0xff, 0x9a, 0x35, 0x50, 0x76, 0x13, 0xbc, 0xd9, 0xee, 0x8b, 0x24, 0x41, 0x67, 0x2, 0xad, 0xc8, 0xe1, 0x84, 0x2b, 0x4e, 0x68, 0xd, 0xa2, 0xc7, 0xcc, 0xa9, 0x6, 0x63, 0x45, 0x20, 0x8f, 0xea, 0xc3, 0xa6, 0x9, 0x6c, 0x4a, 0x2f, 0x80, 0xe5, 0xd2, 0xb7, 0x18, 0x7d, 0x5b, 0x3e, 0x91, 0xf4, 0xdd, 0xb8, 0x17, 0x72, 0x54, 0x31, 0x9e, 0xfb, 0x88, 0xed, 0x42, 0x27, 0x1, 0x64, 0xcb, 0xae, 0x87, 0xe2, 0x4d, 0x28, 0xe, 0x6b, 0xc4, 0xa1, 0x96, 0xf3, 0x5c, 0x39, 0x1f, 0x7a, 0xd5, 0xb0, 0x99, 0xfc, 0x53, 0x36, 0x10, 0x75, 0xda, 0xbf, 0xb4, 0xd1, 0x7e, 0x1b, 0x3d, 0x58, 0xf7, 0x92, 0xbb, 0xde, 0x71, 0x14, 0x32, 0x57, 0xf8, 0x9d, 0xaa, 0xcf, 0x60, 0x5, 0x23, 0x46, 0xe9, 0x8c, 0xa5, 0xc0, 0x6f, 0xa, 0x2c, 0x49, 0xe6, 0x83},
+ {0x0, 0x66, 0xcc, 0xaa, 0x85, 0xe3, 0x49, 0x2f, 0x17, 0x71, 0xdb, 0xbd, 0x92, 0xf4, 0x5e, 0x38, 0x2e, 0x48, 0xe2, 0x84, 0xab, 0xcd, 0x67, 0x1, 0x39, 0x5f, 0xf5, 0x93, 0xbc, 0xda, 0x70, 0x16, 0x5c, 0x3a, 0x90, 0xf6, 0xd9, 0xbf, 0x15, 0x73, 0x4b, 0x2d, 0x87, 0xe1, 0xce, 0xa8, 0x2, 0x64, 0x72, 0x14, 0xbe, 0xd8, 0xf7, 0x91, 0x3b, 0x5d, 0x65, 0x3, 0xa9, 0xcf, 0xe0, 0x86, 0x2c, 0x4a, 0xb8, 0xde, 0x74, 0x12, 0x3d, 0x5b, 0xf1, 0x97, 0xaf, 0xc9, 0x63, 0x5, 0x2a, 0x4c, 0xe6, 0x80, 0x96, 0xf0, 0x5a, 0x3c, 0x13, 0x75, 0xdf, 0xb9, 0x81, 0xe7, 0x4d, 0x2b, 0x4, 0x62, 0xc8, 0xae, 0xe4, 0x82, 0x28, 0x4e, 0x61, 0x7, 0xad, 0xcb, 0xf3, 0x95, 0x3f, 0x59, 0x76, 0x10, 0xba, 0xdc, 0xca, 0xac, 0x6, 0x60, 0x4f, 0x29, 0x83, 0xe5, 0xdd, 0xbb, 0x11, 0x77, 0x58, 0x3e, 0x94, 0xf2, 0x6d, 0xb, 0xa1, 0xc7, 0xe8, 0x8e, 0x24, 0x42, 0x7a, 0x1c, 0xb6, 0xd0, 0xff, 0x99, 0x33, 0x55, 0x43, 0x25, 0x8f, 0xe9, 0xc6, 0xa0, 0xa, 0x6c, 0x54, 0x32, 0x98, 0xfe, 0xd1, 0xb7, 0x1d, 0x7b, 0x31, 0x57, 0xfd, 0x9b, 0xb4, 0xd2, 0x78, 0x1e, 0x26, 0x40, 0xea, 0x8c, 0xa3, 0xc5, 0x6f, 0x9, 0x1f, 0x79, 0xd3, 0xb5, 0x9a, 0xfc, 0x56, 0x30, 0x8, 0x6e, 0xc4, 0xa2, 0x8d, 0xeb, 0x41, 0x27, 0xd5, 0xb3, 0x19, 0x7f, 0x50, 0x36, 0x9c, 0xfa, 0xc2, 0xa4, 0xe, 0x68, 0x47, 0x21, 0x8b, 0xed, 0xfb, 0x9d, 0x37, 0x51, 0x7e, 0x18, 0xb2, 0xd4, 0xec, 0x8a, 0x20, 0x46, 0x69, 0xf, 0xa5, 0xc3, 0x89, 0xef, 0x45, 0x23, 0xc, 0x6a, 0xc0, 0xa6, 0x9e, 0xf8, 0x52, 0x34, 0x1b, 0x7d, 0xd7, 0xb1, 0xa7, 0xc1, 0x6b, 0xd, 0x22, 0x44, 0xee, 0x88, 0xb0, 0xd6, 0x7c, 0x1a, 0x35, 0x53, 0xf9, 0x9f},
+ {0x0, 0x67, 0xce, 0xa9, 0x81, 0xe6, 0x4f, 0x28, 0x1f, 0x78, 0xd1, 0xb6, 0x9e, 0xf9, 0x50, 0x37, 0x3e, 0x59, 0xf0, 0x97, 0xbf, 0xd8, 0x71, 0x16, 0x21, 0x46, 0xef, 0x88, 0xa0, 0xc7, 0x6e, 0x9, 0x7c, 0x1b, 0xb2, 0xd5, 0xfd, 0x9a, 0x33, 0x54, 0x63, 0x4, 0xad, 0xca, 0xe2, 0x85, 0x2c, 0x4b, 0x42, 0x25, 0x8c, 0xeb, 0xc3, 0xa4, 0xd, 0x6a, 0x5d, 0x3a, 0x93, 0xf4, 0xdc, 0xbb, 0x12, 0x75, 0xf8, 0x9f, 0x36, 0x51, 0x79, 0x1e, 0xb7, 0xd0, 0xe7, 0x80, 0x29, 0x4e, 0x66, 0x1, 0xa8, 0xcf, 0xc6, 0xa1, 0x8, 0x6f, 0x47, 0x20, 0x89, 0xee, 0xd9, 0xbe, 0x17, 0x70, 0x58, 0x3f, 0x96, 0xf1, 0x84, 0xe3, 0x4a, 0x2d, 0x5, 0x62, 0xcb, 0xac, 0x9b, 0xfc, 0x55, 0x32, 0x1a, 0x7d, 0xd4, 0xb3, 0xba, 0xdd, 0x74, 0x13, 0x3b, 0x5c, 0xf5, 0x92, 0xa5, 0xc2, 0x6b, 0xc, 0x24, 0x43, 0xea, 0x8d, 0xed, 0x8a, 0x23, 0x44, 0x6c, 0xb, 0xa2, 0xc5, 0xf2, 0x95, 0x3c, 0x5b, 0x73, 0x14, 0xbd, 0xda, 0xd3, 0xb4, 0x1d, 0x7a, 0x52, 0x35, 0x9c, 0xfb, 0xcc, 0xab, 0x2, 0x65, 0x4d, 0x2a, 0x83, 0xe4, 0x91, 0xf6, 0x5f, 0x38, 0x10, 0x77, 0xde, 0xb9, 0x8e, 0xe9, 0x40, 0x27, 0xf, 0x68, 0xc1, 0xa6, 0xaf, 0xc8, 0x61, 0x6, 0x2e, 0x49, 0xe0, 0x87, 0xb0, 0xd7, 0x7e, 0x19, 0x31, 0x56, 0xff, 0x98, 0x15, 0x72, 0xdb, 0xbc, 0x94, 0xf3, 0x5a, 0x3d, 0xa, 0x6d, 0xc4, 0xa3, 0x8b, 0xec, 0x45, 0x22, 0x2b, 0x4c, 0xe5, 0x82, 0xaa, 0xcd, 0x64, 0x3, 0x34, 0x53, 0xfa, 0x9d, 0xb5, 0xd2, 0x7b, 0x1c, 0x69, 0xe, 0xa7, 0xc0, 0xe8, 0x8f, 0x26, 0x41, 0x76, 0x11, 0xb8, 0xdf, 0xf7, 0x90, 0x39, 0x5e, 0x57, 0x30, 0x99, 0xfe, 0xd6, 0xb1, 0x18, 0x7f, 0x48, 0x2f, 0x86, 0xe1, 0xc9, 0xae, 0x7, 0x60},
+ {0x0, 0x68, 0xd0, 0xb8, 0xbd, 0xd5, 0x6d, 0x5, 0x67, 0xf, 0xb7, 0xdf, 0xda, 0xb2, 0xa, 0x62, 0xce, 0xa6, 0x1e, 0x76, 0x73, 0x1b, 0xa3, 0xcb, 0xa9, 0xc1, 0x79, 0x11, 0x14, 0x7c, 0xc4, 0xac, 0x81, 0xe9, 0x51, 0x39, 0x3c, 0x54, 0xec, 0x84, 0xe6, 0x8e, 0x36, 0x5e, 0x5b, 0x33, 0x8b, 0xe3, 0x4f, 0x27, 0x9f, 0xf7, 0xf2, 0x9a, 0x22, 0x4a, 0x28, 0x40, 0xf8, 0x90, 0x95, 0xfd, 0x45, 0x2d, 0x1f, 0x77, 0xcf, 0xa7, 0xa2, 0xca, 0x72, 0x1a, 0x78, 0x10, 0xa8, 0xc0, 0xc5, 0xad, 0x15, 0x7d, 0xd1, 0xb9, 0x1, 0x69, 0x6c, 0x4, 0xbc, 0xd4, 0xb6, 0xde, 0x66, 0xe, 0xb, 0x63, 0xdb, 0xb3, 0x9e, 0xf6, 0x4e, 0x26, 0x23, 0x4b, 0xf3, 0x9b, 0xf9, 0x91, 0x29, 0x41, 0x44, 0x2c, 0x94, 0xfc, 0x50, 0x38, 0x80, 0xe8, 0xed, 0x85, 0x3d, 0x55, 0x37, 0x5f, 0xe7, 0x8f, 0x8a, 0xe2, 0x5a, 0x32, 0x3e, 0x56, 0xee, 0x86, 0x83, 0xeb, 0x53, 0x3b, 0x59, 0x31, 0x89, 0xe1, 0xe4, 0x8c, 0x34, 0x5c, 0xf0, 0x98, 0x20, 0x48, 0x4d, 0x25, 0x9d, 0xf5, 0x97, 0xff, 0x47, 0x2f, 0x2a, 0x42, 0xfa, 0x92, 0xbf, 0xd7, 0x6f, 0x7, 0x2, 0x6a, 0xd2, 0xba, 0xd8, 0xb0, 0x8, 0x60, 0x65, 0xd, 0xb5, 0xdd, 0x71, 0x19, 0xa1, 0xc9, 0xcc, 0xa4, 0x1c, 0x74, 0x16, 0x7e, 0xc6, 0xae, 0xab, 0xc3, 0x7b, 0x13, 0x21, 0x49, 0xf1, 0x99, 0x9c, 0xf4, 0x4c, 0x24, 0x46, 0x2e, 0x96, 0xfe, 0xfb, 0x93, 0x2b, 0x43, 0xef, 0x87, 0x3f, 0x57, 0x52, 0x3a, 0x82, 0xea, 0x88, 0xe0, 0x58, 0x30, 0x35, 0x5d, 0xe5, 0x8d, 0xa0, 0xc8, 0x70, 0x18, 0x1d, 0x75, 0xcd, 0xa5, 0xc7, 0xaf, 0x17, 0x7f, 0x7a, 0x12, 0xaa, 0xc2, 0x6e, 0x6, 0xbe, 0xd6, 0xd3, 0xbb, 0x3, 0x6b, 0x9, 0x61, 0xd9, 0xb1, 0xb4, 0xdc, 0x64, 0xc},
+ {0x0, 0x69, 0xd2, 0xbb, 0xb9, 0xd0, 0x6b, 0x2, 0x6f, 0x6, 0xbd, 0xd4, 0xd6, 0xbf, 0x4, 0x6d, 0xde, 0xb7, 0xc, 0x65, 0x67, 0xe, 0xb5, 0xdc, 0xb1, 0xd8, 0x63, 0xa, 0x8, 0x61, 0xda, 0xb3, 0xa1, 0xc8, 0x73, 0x1a, 0x18, 0x71, 0xca, 0xa3, 0xce, 0xa7, 0x1c, 0x75, 0x77, 0x1e, 0xa5, 0xcc, 0x7f, 0x16, 0xad, 0xc4, 0xc6, 0xaf, 0x14, 0x7d, 0x10, 0x79, 0xc2, 0xab, 0xa9, 0xc0, 0x7b, 0x12, 0x5f, 0x36, 0x8d, 0xe4, 0xe6, 0x8f, 0x34, 0x5d, 0x30, 0x59, 0xe2, 0x8b, 0x89, 0xe0, 0x5b, 0x32, 0x81, 0xe8, 0x53, 0x3a, 0x38, 0x51, 0xea, 0x83, 0xee, 0x87, 0x3c, 0x55, 0x57, 0x3e, 0x85, 0xec, 0xfe, 0x97, 0x2c, 0x45, 0x47, 0x2e, 0x95, 0xfc, 0x91, 0xf8, 0x43, 0x2a, 0x28, 0x41, 0xfa, 0x93, 0x20, 0x49, 0xf2, 0x9b, 0x99, 0xf0, 0x4b, 0x22, 0x4f, 0x26, 0x9d, 0xf4, 0xf6, 0x9f, 0x24, 0x4d, 0xbe, 0xd7, 0x6c, 0x5, 0x7, 0x6e, 0xd5, 0xbc, 0xd1, 0xb8, 0x3, 0x6a, 0x68, 0x1, 0xba, 0xd3, 0x60, 0x9, 0xb2, 0xdb, 0xd9, 0xb0, 0xb, 0x62, 0xf, 0x66, 0xdd, 0xb4, 0xb6, 0xdf, 0x64, 0xd, 0x1f, 0x76, 0xcd, 0xa4, 0xa6, 0xcf, 0x74, 0x1d, 0x70, 0x19, 0xa2, 0xcb, 0xc9, 0xa0, 0x1b, 0x72, 0xc1, 0xa8, 0x13, 0x7a, 0x78, 0x11, 0xaa, 0xc3, 0xae, 0xc7, 0x7c, 0x15, 0x17, 0x7e, 0xc5, 0xac, 0xe1, 0x88, 0x33, 0x5a, 0x58, 0x31, 0x8a, 0xe3, 0x8e, 0xe7, 0x5c, 0x35, 0x37, 0x5e, 0xe5, 0x8c, 0x3f, 0x56, 0xed, 0x84, 0x86, 0xef, 0x54, 0x3d, 0x50, 0x39, 0x82, 0xeb, 0xe9, 0x80, 0x3b, 0x52, 0x40, 0x29, 0x92, 0xfb, 0xf9, 0x90, 0x2b, 0x42, 0x2f, 0x46, 0xfd, 0x94, 0x96, 0xff, 0x44, 0x2d, 0x9e, 0xf7, 0x4c, 0x25, 0x27, 0x4e, 0xf5, 0x9c, 0xf1, 0x98, 0x23, 0x4a, 0x48, 0x21, 0x9a, 0xf3},
+ {0x0, 0x6a, 0xd4, 0xbe, 0xb5, 0xdf, 0x61, 0xb, 0x77, 0x1d, 0xa3, 0xc9, 0xc2, 0xa8, 0x16, 0x7c, 0xee, 0x84, 0x3a, 0x50, 0x5b, 0x31, 0x8f, 0xe5, 0x99, 0xf3, 0x4d, 0x27, 0x2c, 0x46, 0xf8, 0x92, 0xc1, 0xab, 0x15, 0x7f, 0x74, 0x1e, 0xa0, 0xca, 0xb6, 0xdc, 0x62, 0x8, 0x3, 0x69, 0xd7, 0xbd, 0x2f, 0x45, 0xfb, 0x91, 0x9a, 0xf0, 0x4e, 0x24, 0x58, 0x32, 0x8c, 0xe6, 0xed, 0x87, 0x39, 0x53, 0x9f, 0xf5, 0x4b, 0x21, 0x2a, 0x40, 0xfe, 0x94, 0xe8, 0x82, 0x3c, 0x56, 0x5d, 0x37, 0x89, 0xe3, 0x71, 0x1b, 0xa5, 0xcf, 0xc4, 0xae, 0x10, 0x7a, 0x6, 0x6c, 0xd2, 0xb8, 0xb3, 0xd9, 0x67, 0xd, 0x5e, 0x34, 0x8a, 0xe0, 0xeb, 0x81, 0x3f, 0x55, 0x29, 0x43, 0xfd, 0x97, 0x9c, 0xf6, 0x48, 0x22, 0xb0, 0xda, 0x64, 0xe, 0x5, 0x6f, 0xd1, 0xbb, 0xc7, 0xad, 0x13, 0x79, 0x72, 0x18, 0xa6, 0xcc, 0x23, 0x49, 0xf7, 0x9d, 0x96, 0xfc, 0x42, 0x28, 0x54, 0x3e, 0x80, 0xea, 0xe1, 0x8b, 0x35, 0x5f, 0xcd, 0xa7, 0x19, 0x73, 0x78, 0x12, 0xac, 0xc6, 0xba, 0xd0, 0x6e, 0x4, 0xf, 0x65, 0xdb, 0xb1, 0xe2, 0x88, 0x36, 0x5c, 0x57, 0x3d, 0x83, 0xe9, 0x95, 0xff, 0x41, 0x2b, 0x20, 0x4a, 0xf4, 0x9e, 0xc, 0x66, 0xd8, 0xb2, 0xb9, 0xd3, 0x6d, 0x7, 0x7b, 0x11, 0xaf, 0xc5, 0xce, 0xa4, 0x1a, 0x70, 0xbc, 0xd6, 0x68, 0x2, 0x9, 0x63, 0xdd, 0xb7, 0xcb, 0xa1, 0x1f, 0x75, 0x7e, 0x14, 0xaa, 0xc0, 0x52, 0x38, 0x86, 0xec, 0xe7, 0x8d, 0x33, 0x59, 0x25, 0x4f, 0xf1, 0x9b, 0x90, 0xfa, 0x44, 0x2e, 0x7d, 0x17, 0xa9, 0xc3, 0xc8, 0xa2, 0x1c, 0x76, 0xa, 0x60, 0xde, 0xb4, 0xbf, 0xd5, 0x6b, 0x1, 0x93, 0xf9, 0x47, 0x2d, 0x26, 0x4c, 0xf2, 0x98, 0xe4, 0x8e, 0x30, 0x5a, 0x51, 0x3b, 0x85, 0xef},
+ {0x0, 0x6b, 0xd6, 0xbd, 0xb1, 0xda, 0x67, 0xc, 0x7f, 0x14, 0xa9, 0xc2, 0xce, 0xa5, 0x18, 0x73, 0xfe, 0x95, 0x28, 0x43, 0x4f, 0x24, 0x99, 0xf2, 0x81, 0xea, 0x57, 0x3c, 0x30, 0x5b, 0xe6, 0x8d, 0xe1, 0x8a, 0x37, 0x5c, 0x50, 0x3b, 0x86, 0xed, 0x9e, 0xf5, 0x48, 0x23, 0x2f, 0x44, 0xf9, 0x92, 0x1f, 0x74, 0xc9, 0xa2, 0xae, 0xc5, 0x78, 0x13, 0x60, 0xb, 0xb6, 0xdd, 0xd1, 0xba, 0x7, 0x6c, 0xdf, 0xb4, 0x9, 0x62, 0x6e, 0x5, 0xb8, 0xd3, 0xa0, 0xcb, 0x76, 0x1d, 0x11, 0x7a, 0xc7, 0xac, 0x21, 0x4a, 0xf7, 0x9c, 0x90, 0xfb, 0x46, 0x2d, 0x5e, 0x35, 0x88, 0xe3, 0xef, 0x84, 0x39, 0x52, 0x3e, 0x55, 0xe8, 0x83, 0x8f, 0xe4, 0x59, 0x32, 0x41, 0x2a, 0x97, 0xfc, 0xf0, 0x9b, 0x26, 0x4d, 0xc0, 0xab, 0x16, 0x7d, 0x71, 0x1a, 0xa7, 0xcc, 0xbf, 0xd4, 0x69, 0x2, 0xe, 0x65, 0xd8, 0xb3, 0xa3, 0xc8, 0x75, 0x1e, 0x12, 0x79, 0xc4, 0xaf, 0xdc, 0xb7, 0xa, 0x61, 0x6d, 0x6, 0xbb, 0xd0, 0x5d, 0x36, 0x8b, 0xe0, 0xec, 0x87, 0x3a, 0x51, 0x22, 0x49, 0xf4, 0x9f, 0x93, 0xf8, 0x45, 0x2e, 0x42, 0x29, 0x94, 0xff, 0xf3, 0x98, 0x25, 0x4e, 0x3d, 0x56, 0xeb, 0x80, 0x8c, 0xe7, 0x5a, 0x31, 0xbc, 0xd7, 0x6a, 0x1, 0xd, 0x66, 0xdb, 0xb0, 0xc3, 0xa8, 0x15, 0x7e, 0x72, 0x19, 0xa4, 0xcf, 0x7c, 0x17, 0xaa, 0xc1, 0xcd, 0xa6, 0x1b, 0x70, 0x3, 0x68, 0xd5, 0xbe, 0xb2, 0xd9, 0x64, 0xf, 0x82, 0xe9, 0x54, 0x3f, 0x33, 0x58, 0xe5, 0x8e, 0xfd, 0x96, 0x2b, 0x40, 0x4c, 0x27, 0x9a, 0xf1, 0x9d, 0xf6, 0x4b, 0x20, 0x2c, 0x47, 0xfa, 0x91, 0xe2, 0x89, 0x34, 0x5f, 0x53, 0x38, 0x85, 0xee, 0x63, 0x8, 0xb5, 0xde, 0xd2, 0xb9, 0x4, 0x6f, 0x1c, 0x77, 0xca, 0xa1, 0xad, 0xc6, 0x7b, 0x10},
+ {0x0, 0x6c, 0xd8, 0xb4, 0xad, 0xc1, 0x75, 0x19, 0x47, 0x2b, 0x9f, 0xf3, 0xea, 0x86, 0x32, 0x5e, 0x8e, 0xe2, 0x56, 0x3a, 0x23, 0x4f, 0xfb, 0x97, 0xc9, 0xa5, 0x11, 0x7d, 0x64, 0x8, 0xbc, 0xd0, 0x1, 0x6d, 0xd9, 0xb5, 0xac, 0xc0, 0x74, 0x18, 0x46, 0x2a, 0x9e, 0xf2, 0xeb, 0x87, 0x33, 0x5f, 0x8f, 0xe3, 0x57, 0x3b, 0x22, 0x4e, 0xfa, 0x96, 0xc8, 0xa4, 0x10, 0x7c, 0x65, 0x9, 0xbd, 0xd1, 0x2, 0x6e, 0xda, 0xb6, 0xaf, 0xc3, 0x77, 0x1b, 0x45, 0x29, 0x9d, 0xf1, 0xe8, 0x84, 0x30, 0x5c, 0x8c, 0xe0, 0x54, 0x38, 0x21, 0x4d, 0xf9, 0x95, 0xcb, 0xa7, 0x13, 0x7f, 0x66, 0xa, 0xbe, 0xd2, 0x3, 0x6f, 0xdb, 0xb7, 0xae, 0xc2, 0x76, 0x1a, 0x44, 0x28, 0x9c, 0xf0, 0xe9, 0x85, 0x31, 0x5d, 0x8d, 0xe1, 0x55, 0x39, 0x20, 0x4c, 0xf8, 0x94, 0xca, 0xa6, 0x12, 0x7e, 0x67, 0xb, 0xbf, 0xd3, 0x4, 0x68, 0xdc, 0xb0, 0xa9, 0xc5, 0x71, 0x1d, 0x43, 0x2f, 0x9b, 0xf7, 0xee, 0x82, 0x36, 0x5a, 0x8a, 0xe6, 0x52, 0x3e, 0x27, 0x4b, 0xff, 0x93, 0xcd, 0xa1, 0x15, 0x79, 0x60, 0xc, 0xb8, 0xd4, 0x5, 0x69, 0xdd, 0xb1, 0xa8, 0xc4, 0x70, 0x1c, 0x42, 0x2e, 0x9a, 0xf6, 0xef, 0x83, 0x37, 0x5b, 0x8b, 0xe7, 0x53, 0x3f, 0x26, 0x4a, 0xfe, 0x92, 0xcc, 0xa0, 0x14, 0x78, 0x61, 0xd, 0xb9, 0xd5, 0x6, 0x6a, 0xde, 0xb2, 0xab, 0xc7, 0x73, 0x1f, 0x41, 0x2d, 0x99, 0xf5, 0xec, 0x80, 0x34, 0x58, 0x88, 0xe4, 0x50, 0x3c, 0x25, 0x49, 0xfd, 0x91, 0xcf, 0xa3, 0x17, 0x7b, 0x62, 0xe, 0xba, 0xd6, 0x7, 0x6b, 0xdf, 0xb3, 0xaa, 0xc6, 0x72, 0x1e, 0x40, 0x2c, 0x98, 0xf4, 0xed, 0x81, 0x35, 0x59, 0x89, 0xe5, 0x51, 0x3d, 0x24, 0x48, 0xfc, 0x90, 0xce, 0xa2, 0x16, 0x7a, 0x63, 0xf, 0xbb, 0xd7},
+ {0x0, 0x6d, 0xda, 0xb7, 0xa9, 0xc4, 0x73, 0x1e, 0x4f, 0x22, 0x95, 0xf8, 0xe6, 0x8b, 0x3c, 0x51, 0x9e, 0xf3, 0x44, 0x29, 0x37, 0x5a, 0xed, 0x80, 0xd1, 0xbc, 0xb, 0x66, 0x78, 0x15, 0xa2, 0xcf, 0x21, 0x4c, 0xfb, 0x96, 0x88, 0xe5, 0x52, 0x3f, 0x6e, 0x3, 0xb4, 0xd9, 0xc7, 0xaa, 0x1d, 0x70, 0xbf, 0xd2, 0x65, 0x8, 0x16, 0x7b, 0xcc, 0xa1, 0xf0, 0x9d, 0x2a, 0x47, 0x59, 0x34, 0x83, 0xee, 0x42, 0x2f, 0x98, 0xf5, 0xeb, 0x86, 0x31, 0x5c, 0xd, 0x60, 0xd7, 0xba, 0xa4, 0xc9, 0x7e, 0x13, 0xdc, 0xb1, 0x6, 0x6b, 0x75, 0x18, 0xaf, 0xc2, 0x93, 0xfe, 0x49, 0x24, 0x3a, 0x57, 0xe0, 0x8d, 0x63, 0xe, 0xb9, 0xd4, 0xca, 0xa7, 0x10, 0x7d, 0x2c, 0x41, 0xf6, 0x9b, 0x85, 0xe8, 0x5f, 0x32, 0xfd, 0x90, 0x27, 0x4a, 0x54, 0x39, 0x8e, 0xe3, 0xb2, 0xdf, 0x68, 0x5, 0x1b, 0x76, 0xc1, 0xac, 0x84, 0xe9, 0x5e, 0x33, 0x2d, 0x40, 0xf7, 0x9a, 0xcb, 0xa6, 0x11, 0x7c, 0x62, 0xf, 0xb8, 0xd5, 0x1a, 0x77, 0xc0, 0xad, 0xb3, 0xde, 0x69, 0x4, 0x55, 0x38, 0x8f, 0xe2, 0xfc, 0x91, 0x26, 0x4b, 0xa5, 0xc8, 0x7f, 0x12, 0xc, 0x61, 0xd6, 0xbb, 0xea, 0x87, 0x30, 0x5d, 0x43, 0x2e, 0x99, 0xf4, 0x3b, 0x56, 0xe1, 0x8c, 0x92, 0xff, 0x48, 0x25, 0x74, 0x19, 0xae, 0xc3, 0xdd, 0xb0, 0x7, 0x6a, 0xc6, 0xab, 0x1c, 0x71, 0x6f, 0x2, 0xb5, 0xd8, 0x89, 0xe4, 0x53, 0x3e, 0x20, 0x4d, 0xfa, 0x97, 0x58, 0x35, 0x82, 0xef, 0xf1, 0x9c, 0x2b, 0x46, 0x17, 0x7a, 0xcd, 0xa0, 0xbe, 0xd3, 0x64, 0x9, 0xe7, 0x8a, 0x3d, 0x50, 0x4e, 0x23, 0x94, 0xf9, 0xa8, 0xc5, 0x72, 0x1f, 0x1, 0x6c, 0xdb, 0xb6, 0x79, 0x14, 0xa3, 0xce, 0xd0, 0xbd, 0xa, 0x67, 0x36, 0x5b, 0xec, 0x81, 0x9f, 0xf2, 0x45, 0x28},
+ {0x0, 0x6e, 0xdc, 0xb2, 0xa5, 0xcb, 0x79, 0x17, 0x57, 0x39, 0x8b, 0xe5, 0xf2, 0x9c, 0x2e, 0x40, 0xae, 0xc0, 0x72, 0x1c, 0xb, 0x65, 0xd7, 0xb9, 0xf9, 0x97, 0x25, 0x4b, 0x5c, 0x32, 0x80, 0xee, 0x41, 0x2f, 0x9d, 0xf3, 0xe4, 0x8a, 0x38, 0x56, 0x16, 0x78, 0xca, 0xa4, 0xb3, 0xdd, 0x6f, 0x1, 0xef, 0x81, 0x33, 0x5d, 0x4a, 0x24, 0x96, 0xf8, 0xb8, 0xd6, 0x64, 0xa, 0x1d, 0x73, 0xc1, 0xaf, 0x82, 0xec, 0x5e, 0x30, 0x27, 0x49, 0xfb, 0x95, 0xd5, 0xbb, 0x9, 0x67, 0x70, 0x1e, 0xac, 0xc2, 0x2c, 0x42, 0xf0, 0x9e, 0x89, 0xe7, 0x55, 0x3b, 0x7b, 0x15, 0xa7, 0xc9, 0xde, 0xb0, 0x2, 0x6c, 0xc3, 0xad, 0x1f, 0x71, 0x66, 0x8, 0xba, 0xd4, 0x94, 0xfa, 0x48, 0x26, 0x31, 0x5f, 0xed, 0x83, 0x6d, 0x3, 0xb1, 0xdf, 0xc8, 0xa6, 0x14, 0x7a, 0x3a, 0x54, 0xe6, 0x88, 0x9f, 0xf1, 0x43, 0x2d, 0x19, 0x77, 0xc5, 0xab, 0xbc, 0xd2, 0x60, 0xe, 0x4e, 0x20, 0x92, 0xfc, 0xeb, 0x85, 0x37, 0x59, 0xb7, 0xd9, 0x6b, 0x5, 0x12, 0x7c, 0xce, 0xa0, 0xe0, 0x8e, 0x3c, 0x52, 0x45, 0x2b, 0x99, 0xf7, 0x58, 0x36, 0x84, 0xea, 0xfd, 0x93, 0x21, 0x4f, 0xf, 0x61, 0xd3, 0xbd, 0xaa, 0xc4, 0x76, 0x18, 0xf6, 0x98, 0x2a, 0x44, 0x53, 0x3d, 0x8f, 0xe1, 0xa1, 0xcf, 0x7d, 0x13, 0x4, 0x6a, 0xd8, 0xb6, 0x9b, 0xf5, 0x47, 0x29, 0x3e, 0x50, 0xe2, 0x8c, 0xcc, 0xa2, 0x10, 0x7e, 0x69, 0x7, 0xb5, 0xdb, 0x35, 0x5b, 0xe9, 0x87, 0x90, 0xfe, 0x4c, 0x22, 0x62, 0xc, 0xbe, 0xd0, 0xc7, 0xa9, 0x1b, 0x75, 0xda, 0xb4, 0x6, 0x68, 0x7f, 0x11, 0xa3, 0xcd, 0x8d, 0xe3, 0x51, 0x3f, 0x28, 0x46, 0xf4, 0x9a, 0x74, 0x1a, 0xa8, 0xc6, 0xd1, 0xbf, 0xd, 0x63, 0x23, 0x4d, 0xff, 0x91, 0x86, 0xe8, 0x5a, 0x34},
+ {0x0, 0x6f, 0xde, 0xb1, 0xa1, 0xce, 0x7f, 0x10, 0x5f, 0x30, 0x81, 0xee, 0xfe, 0x91, 0x20, 0x4f, 0xbe, 0xd1, 0x60, 0xf, 0x1f, 0x70, 0xc1, 0xae, 0xe1, 0x8e, 0x3f, 0x50, 0x40, 0x2f, 0x9e, 0xf1, 0x61, 0xe, 0xbf, 0xd0, 0xc0, 0xaf, 0x1e, 0x71, 0x3e, 0x51, 0xe0, 0x8f, 0x9f, 0xf0, 0x41, 0x2e, 0xdf, 0xb0, 0x1, 0x6e, 0x7e, 0x11, 0xa0, 0xcf, 0x80, 0xef, 0x5e, 0x31, 0x21, 0x4e, 0xff, 0x90, 0xc2, 0xad, 0x1c, 0x73, 0x63, 0xc, 0xbd, 0xd2, 0x9d, 0xf2, 0x43, 0x2c, 0x3c, 0x53, 0xe2, 0x8d, 0x7c, 0x13, 0xa2, 0xcd, 0xdd, 0xb2, 0x3, 0x6c, 0x23, 0x4c, 0xfd, 0x92, 0x82, 0xed, 0x5c, 0x33, 0xa3, 0xcc, 0x7d, 0x12, 0x2, 0x6d, 0xdc, 0xb3, 0xfc, 0x93, 0x22, 0x4d, 0x5d, 0x32, 0x83, 0xec, 0x1d, 0x72, 0xc3, 0xac, 0xbc, 0xd3, 0x62, 0xd, 0x42, 0x2d, 0x9c, 0xf3, 0xe3, 0x8c, 0x3d, 0x52, 0x99, 0xf6, 0x47, 0x28, 0x38, 0x57, 0xe6, 0x89, 0xc6, 0xa9, 0x18, 0x77, 0x67, 0x8, 0xb9, 0xd6, 0x27, 0x48, 0xf9, 0x96, 0x86, 0xe9, 0x58, 0x37, 0x78, 0x17, 0xa6, 0xc9, 0xd9, 0xb6, 0x7, 0x68, 0xf8, 0x97, 0x26, 0x49, 0x59, 0x36, 0x87, 0xe8, 0xa7, 0xc8, 0x79, 0x16, 0x6, 0x69, 0xd8, 0xb7, 0x46, 0x29, 0x98, 0xf7, 0xe7, 0x88, 0x39, 0x56, 0x19, 0x76, 0xc7, 0xa8, 0xb8, 0xd7, 0x66, 0x9, 0x5b, 0x34, 0x85, 0xea, 0xfa, 0x95, 0x24, 0x4b, 0x4, 0x6b, 0xda, 0xb5, 0xa5, 0xca, 0x7b, 0x14, 0xe5, 0x8a, 0x3b, 0x54, 0x44, 0x2b, 0x9a, 0xf5, 0xba, 0xd5, 0x64, 0xb, 0x1b, 0x74, 0xc5, 0xaa, 0x3a, 0x55, 0xe4, 0x8b, 0x9b, 0xf4, 0x45, 0x2a, 0x65, 0xa, 0xbb, 0xd4, 0xc4, 0xab, 0x1a, 0x75, 0x84, 0xeb, 0x5a, 0x35, 0x25, 0x4a, 0xfb, 0x94, 0xdb, 0xb4, 0x5, 0x6a, 0x7a, 0x15, 0xa4, 0xcb},
+ {0x0, 0x70, 0xe0, 0x90, 0xdd, 0xad, 0x3d, 0x4d, 0xa7, 0xd7, 0x47, 0x37, 0x7a, 0xa, 0x9a, 0xea, 0x53, 0x23, 0xb3, 0xc3, 0x8e, 0xfe, 0x6e, 0x1e, 0xf4, 0x84, 0x14, 0x64, 0x29, 0x59, 0xc9, 0xb9, 0xa6, 0xd6, 0x46, 0x36, 0x7b, 0xb, 0x9b, 0xeb, 0x1, 0x71, 0xe1, 0x91, 0xdc, 0xac, 0x3c, 0x4c, 0xf5, 0x85, 0x15, 0x65, 0x28, 0x58, 0xc8, 0xb8, 0x52, 0x22, 0xb2, 0xc2, 0x8f, 0xff, 0x6f, 0x1f, 0x51, 0x21, 0xb1, 0xc1, 0x8c, 0xfc, 0x6c, 0x1c, 0xf6, 0x86, 0x16, 0x66, 0x2b, 0x5b, 0xcb, 0xbb, 0x2, 0x72, 0xe2, 0x92, 0xdf, 0xaf, 0x3f, 0x4f, 0xa5, 0xd5, 0x45, 0x35, 0x78, 0x8, 0x98, 0xe8, 0xf7, 0x87, 0x17, 0x67, 0x2a, 0x5a, 0xca, 0xba, 0x50, 0x20, 0xb0, 0xc0, 0x8d, 0xfd, 0x6d, 0x1d, 0xa4, 0xd4, 0x44, 0x34, 0x79, 0x9, 0x99, 0xe9, 0x3, 0x73, 0xe3, 0x93, 0xde, 0xae, 0x3e, 0x4e, 0xa2, 0xd2, 0x42, 0x32, 0x7f, 0xf, 0x9f, 0xef, 0x5, 0x75, 0xe5, 0x95, 0xd8, 0xa8, 0x38, 0x48, 0xf1, 0x81, 0x11, 0x61, 0x2c, 0x5c, 0xcc, 0xbc, 0x56, 0x26, 0xb6, 0xc6, 0x8b, 0xfb, 0x6b, 0x1b, 0x4, 0x74, 0xe4, 0x94, 0xd9, 0xa9, 0x39, 0x49, 0xa3, 0xd3, 0x43, 0x33, 0x7e, 0xe, 0x9e, 0xee, 0x57, 0x27, 0xb7, 0xc7, 0x8a, 0xfa, 0x6a, 0x1a, 0xf0, 0x80, 0x10, 0x60, 0x2d, 0x5d, 0xcd, 0xbd, 0xf3, 0x83, 0x13, 0x63, 0x2e, 0x5e, 0xce, 0xbe, 0x54, 0x24, 0xb4, 0xc4, 0x89, 0xf9, 0x69, 0x19, 0xa0, 0xd0, 0x40, 0x30, 0x7d, 0xd, 0x9d, 0xed, 0x7, 0x77, 0xe7, 0x97, 0xda, 0xaa, 0x3a, 0x4a, 0x55, 0x25, 0xb5, 0xc5, 0x88, 0xf8, 0x68, 0x18, 0xf2, 0x82, 0x12, 0x62, 0x2f, 0x5f, 0xcf, 0xbf, 0x6, 0x76, 0xe6, 0x96, 0xdb, 0xab, 0x3b, 0x4b, 0xa1, 0xd1, 0x41, 0x31, 0x7c, 0xc, 0x9c, 0xec},
+ {0x0, 0x71, 0xe2, 0x93, 0xd9, 0xa8, 0x3b, 0x4a, 0xaf, 0xde, 0x4d, 0x3c, 0x76, 0x7, 0x94, 0xe5, 0x43, 0x32, 0xa1, 0xd0, 0x9a, 0xeb, 0x78, 0x9, 0xec, 0x9d, 0xe, 0x7f, 0x35, 0x44, 0xd7, 0xa6, 0x86, 0xf7, 0x64, 0x15, 0x5f, 0x2e, 0xbd, 0xcc, 0x29, 0x58, 0xcb, 0xba, 0xf0, 0x81, 0x12, 0x63, 0xc5, 0xb4, 0x27, 0x56, 0x1c, 0x6d, 0xfe, 0x8f, 0x6a, 0x1b, 0x88, 0xf9, 0xb3, 0xc2, 0x51, 0x20, 0x11, 0x60, 0xf3, 0x82, 0xc8, 0xb9, 0x2a, 0x5b, 0xbe, 0xcf, 0x5c, 0x2d, 0x67, 0x16, 0x85, 0xf4, 0x52, 0x23, 0xb0, 0xc1, 0x8b, 0xfa, 0x69, 0x18, 0xfd, 0x8c, 0x1f, 0x6e, 0x24, 0x55, 0xc6, 0xb7, 0x97, 0xe6, 0x75, 0x4, 0x4e, 0x3f, 0xac, 0xdd, 0x38, 0x49, 0xda, 0xab, 0xe1, 0x90, 0x3, 0x72, 0xd4, 0xa5, 0x36, 0x47, 0xd, 0x7c, 0xef, 0x9e, 0x7b, 0xa, 0x99, 0xe8, 0xa2, 0xd3, 0x40, 0x31, 0x22, 0x53, 0xc0, 0xb1, 0xfb, 0x8a, 0x19, 0x68, 0x8d, 0xfc, 0x6f, 0x1e, 0x54, 0x25, 0xb6, 0xc7, 0x61, 0x10, 0x83, 0xf2, 0xb8, 0xc9, 0x5a, 0x2b, 0xce, 0xbf, 0x2c, 0x5d, 0x17, 0x66, 0xf5, 0x84, 0xa4, 0xd5, 0x46, 0x37, 0x7d, 0xc, 0x9f, 0xee, 0xb, 0x7a, 0xe9, 0x98, 0xd2, 0xa3, 0x30, 0x41, 0xe7, 0x96, 0x5, 0x74, 0x3e, 0x4f, 0xdc, 0xad, 0x48, 0x39, 0xaa, 0xdb, 0x91, 0xe0, 0x73, 0x2, 0x33, 0x42, 0xd1, 0xa0, 0xea, 0x9b, 0x8, 0x79, 0x9c, 0xed, 0x7e, 0xf, 0x45, 0x34, 0xa7, 0xd6, 0x70, 0x1, 0x92, 0xe3, 0xa9, 0xd8, 0x4b, 0x3a, 0xdf, 0xae, 0x3d, 0x4c, 0x6, 0x77, 0xe4, 0x95, 0xb5, 0xc4, 0x57, 0x26, 0x6c, 0x1d, 0x8e, 0xff, 0x1a, 0x6b, 0xf8, 0x89, 0xc3, 0xb2, 0x21, 0x50, 0xf6, 0x87, 0x14, 0x65, 0x2f, 0x5e, 0xcd, 0xbc, 0x59, 0x28, 0xbb, 0xca, 0x80, 0xf1, 0x62, 0x13},
+ {0x0, 0x72, 0xe4, 0x96, 0xd5, 0xa7, 0x31, 0x43, 0xb7, 0xc5, 0x53, 0x21, 0x62, 0x10, 0x86, 0xf4, 0x73, 0x1, 0x97, 0xe5, 0xa6, 0xd4, 0x42, 0x30, 0xc4, 0xb6, 0x20, 0x52, 0x11, 0x63, 0xf5, 0x87, 0xe6, 0x94, 0x2, 0x70, 0x33, 0x41, 0xd7, 0xa5, 0x51, 0x23, 0xb5, 0xc7, 0x84, 0xf6, 0x60, 0x12, 0x95, 0xe7, 0x71, 0x3, 0x40, 0x32, 0xa4, 0xd6, 0x22, 0x50, 0xc6, 0xb4, 0xf7, 0x85, 0x13, 0x61, 0xd1, 0xa3, 0x35, 0x47, 0x4, 0x76, 0xe0, 0x92, 0x66, 0x14, 0x82, 0xf0, 0xb3, 0xc1, 0x57, 0x25, 0xa2, 0xd0, 0x46, 0x34, 0x77, 0x5, 0x93, 0xe1, 0x15, 0x67, 0xf1, 0x83, 0xc0, 0xb2, 0x24, 0x56, 0x37, 0x45, 0xd3, 0xa1, 0xe2, 0x90, 0x6, 0x74, 0x80, 0xf2, 0x64, 0x16, 0x55, 0x27, 0xb1, 0xc3, 0x44, 0x36, 0xa0, 0xd2, 0x91, 0xe3, 0x75, 0x7, 0xf3, 0x81, 0x17, 0x65, 0x26, 0x54, 0xc2, 0xb0, 0xbf, 0xcd, 0x5b, 0x29, 0x6a, 0x18, 0x8e, 0xfc, 0x8, 0x7a, 0xec, 0x9e, 0xdd, 0xaf, 0x39, 0x4b, 0xcc, 0xbe, 0x28, 0x5a, 0x19, 0x6b, 0xfd, 0x8f, 0x7b, 0x9, 0x9f, 0xed, 0xae, 0xdc, 0x4a, 0x38, 0x59, 0x2b, 0xbd, 0xcf, 0x8c, 0xfe, 0x68, 0x1a, 0xee, 0x9c, 0xa, 0x78, 0x3b, 0x49, 0xdf, 0xad, 0x2a, 0x58, 0xce, 0xbc, 0xff, 0x8d, 0x1b, 0x69, 0x9d, 0xef, 0x79, 0xb, 0x48, 0x3a, 0xac, 0xde, 0x6e, 0x1c, 0x8a, 0xf8, 0xbb, 0xc9, 0x5f, 0x2d, 0xd9, 0xab, 0x3d, 0x4f, 0xc, 0x7e, 0xe8, 0x9a, 0x1d, 0x6f, 0xf9, 0x8b, 0xc8, 0xba, 0x2c, 0x5e, 0xaa, 0xd8, 0x4e, 0x3c, 0x7f, 0xd, 0x9b, 0xe9, 0x88, 0xfa, 0x6c, 0x1e, 0x5d, 0x2f, 0xb9, 0xcb, 0x3f, 0x4d, 0xdb, 0xa9, 0xea, 0x98, 0xe, 0x7c, 0xfb, 0x89, 0x1f, 0x6d, 0x2e, 0x5c, 0xca, 0xb8, 0x4c, 0x3e, 0xa8, 0xda, 0x99, 0xeb, 0x7d, 0xf},
+ {0x0, 0x73, 0xe6, 0x95, 0xd1, 0xa2, 0x37, 0x44, 0xbf, 0xcc, 0x59, 0x2a, 0x6e, 0x1d, 0x88, 0xfb, 0x63, 0x10, 0x85, 0xf6, 0xb2, 0xc1, 0x54, 0x27, 0xdc, 0xaf, 0x3a, 0x49, 0xd, 0x7e, 0xeb, 0x98, 0xc6, 0xb5, 0x20, 0x53, 0x17, 0x64, 0xf1, 0x82, 0x79, 0xa, 0x9f, 0xec, 0xa8, 0xdb, 0x4e, 0x3d, 0xa5, 0xd6, 0x43, 0x30, 0x74, 0x7, 0x92, 0xe1, 0x1a, 0x69, 0xfc, 0x8f, 0xcb, 0xb8, 0x2d, 0x5e, 0x91, 0xe2, 0x77, 0x4, 0x40, 0x33, 0xa6, 0xd5, 0x2e, 0x5d, 0xc8, 0xbb, 0xff, 0x8c, 0x19, 0x6a, 0xf2, 0x81, 0x14, 0x67, 0x23, 0x50, 0xc5, 0xb6, 0x4d, 0x3e, 0xab, 0xd8, 0x9c, 0xef, 0x7a, 0x9, 0x57, 0x24, 0xb1, 0xc2, 0x86, 0xf5, 0x60, 0x13, 0xe8, 0x9b, 0xe, 0x7d, 0x39, 0x4a, 0xdf, 0xac, 0x34, 0x47, 0xd2, 0xa1, 0xe5, 0x96, 0x3, 0x70, 0x8b, 0xf8, 0x6d, 0x1e, 0x5a, 0x29, 0xbc, 0xcf, 0x3f, 0x4c, 0xd9, 0xaa, 0xee, 0x9d, 0x8, 0x7b, 0x80, 0xf3, 0x66, 0x15, 0x51, 0x22, 0xb7, 0xc4, 0x5c, 0x2f, 0xba, 0xc9, 0x8d, 0xfe, 0x6b, 0x18, 0xe3, 0x90, 0x5, 0x76, 0x32, 0x41, 0xd4, 0xa7, 0xf9, 0x8a, 0x1f, 0x6c, 0x28, 0x5b, 0xce, 0xbd, 0x46, 0x35, 0xa0, 0xd3, 0x97, 0xe4, 0x71, 0x2, 0x9a, 0xe9, 0x7c, 0xf, 0x4b, 0x38, 0xad, 0xde, 0x25, 0x56, 0xc3, 0xb0, 0xf4, 0x87, 0x12, 0x61, 0xae, 0xdd, 0x48, 0x3b, 0x7f, 0xc, 0x99, 0xea, 0x11, 0x62, 0xf7, 0x84, 0xc0, 0xb3, 0x26, 0x55, 0xcd, 0xbe, 0x2b, 0x58, 0x1c, 0x6f, 0xfa, 0x89, 0x72, 0x1, 0x94, 0xe7, 0xa3, 0xd0, 0x45, 0x36, 0x68, 0x1b, 0x8e, 0xfd, 0xb9, 0xca, 0x5f, 0x2c, 0xd7, 0xa4, 0x31, 0x42, 0x6, 0x75, 0xe0, 0x93, 0xb, 0x78, 0xed, 0x9e, 0xda, 0xa9, 0x3c, 0x4f, 0xb4, 0xc7, 0x52, 0x21, 0x65, 0x16, 0x83, 0xf0},
+ {0x0, 0x74, 0xe8, 0x9c, 0xcd, 0xb9, 0x25, 0x51, 0x87, 0xf3, 0x6f, 0x1b, 0x4a, 0x3e, 0xa2, 0xd6, 0x13, 0x67, 0xfb, 0x8f, 0xde, 0xaa, 0x36, 0x42, 0x94, 0xe0, 0x7c, 0x8, 0x59, 0x2d, 0xb1, 0xc5, 0x26, 0x52, 0xce, 0xba, 0xeb, 0x9f, 0x3, 0x77, 0xa1, 0xd5, 0x49, 0x3d, 0x6c, 0x18, 0x84, 0xf0, 0x35, 0x41, 0xdd, 0xa9, 0xf8, 0x8c, 0x10, 0x64, 0xb2, 0xc6, 0x5a, 0x2e, 0x7f, 0xb, 0x97, 0xe3, 0x4c, 0x38, 0xa4, 0xd0, 0x81, 0xf5, 0x69, 0x1d, 0xcb, 0xbf, 0x23, 0x57, 0x6, 0x72, 0xee, 0x9a, 0x5f, 0x2b, 0xb7, 0xc3, 0x92, 0xe6, 0x7a, 0xe, 0xd8, 0xac, 0x30, 0x44, 0x15, 0x61, 0xfd, 0x89, 0x6a, 0x1e, 0x82, 0xf6, 0xa7, 0xd3, 0x4f, 0x3b, 0xed, 0x99, 0x5, 0x71, 0x20, 0x54, 0xc8, 0xbc, 0x79, 0xd, 0x91, 0xe5, 0xb4, 0xc0, 0x5c, 0x28, 0xfe, 0x8a, 0x16, 0x62, 0x33, 0x47, 0xdb, 0xaf, 0x98, 0xec, 0x70, 0x4, 0x55, 0x21, 0xbd, 0xc9, 0x1f, 0x6b, 0xf7, 0x83, 0xd2, 0xa6, 0x3a, 0x4e, 0x8b, 0xff, 0x63, 0x17, 0x46, 0x32, 0xae, 0xda, 0xc, 0x78, 0xe4, 0x90, 0xc1, 0xb5, 0x29, 0x5d, 0xbe, 0xca, 0x56, 0x22, 0x73, 0x7, 0x9b, 0xef, 0x39, 0x4d, 0xd1, 0xa5, 0xf4, 0x80, 0x1c, 0x68, 0xad, 0xd9, 0x45, 0x31, 0x60, 0x14, 0x88, 0xfc, 0x2a, 0x5e, 0xc2, 0xb6, 0xe7, 0x93, 0xf, 0x7b, 0xd4, 0xa0, 0x3c, 0x48, 0x19, 0x6d, 0xf1, 0x85, 0x53, 0x27, 0xbb, 0xcf, 0x9e, 0xea, 0x76, 0x2, 0xc7, 0xb3, 0x2f, 0x5b, 0xa, 0x7e, 0xe2, 0x96, 0x40, 0x34, 0xa8, 0xdc, 0x8d, 0xf9, 0x65, 0x11, 0xf2, 0x86, 0x1a, 0x6e, 0x3f, 0x4b, 0xd7, 0xa3, 0x75, 0x1, 0x9d, 0xe9, 0xb8, 0xcc, 0x50, 0x24, 0xe1, 0x95, 0x9, 0x7d, 0x2c, 0x58, 0xc4, 0xb0, 0x66, 0x12, 0x8e, 0xfa, 0xab, 0xdf, 0x43, 0x37},
+ {0x0, 0x75, 0xea, 0x9f, 0xc9, 0xbc, 0x23, 0x56, 0x8f, 0xfa, 0x65, 0x10, 0x46, 0x33, 0xac, 0xd9, 0x3, 0x76, 0xe9, 0x9c, 0xca, 0xbf, 0x20, 0x55, 0x8c, 0xf9, 0x66, 0x13, 0x45, 0x30, 0xaf, 0xda, 0x6, 0x73, 0xec, 0x99, 0xcf, 0xba, 0x25, 0x50, 0x89, 0xfc, 0x63, 0x16, 0x40, 0x35, 0xaa, 0xdf, 0x5, 0x70, 0xef, 0x9a, 0xcc, 0xb9, 0x26, 0x53, 0x8a, 0xff, 0x60, 0x15, 0x43, 0x36, 0xa9, 0xdc, 0xc, 0x79, 0xe6, 0x93, 0xc5, 0xb0, 0x2f, 0x5a, 0x83, 0xf6, 0x69, 0x1c, 0x4a, 0x3f, 0xa0, 0xd5, 0xf, 0x7a, 0xe5, 0x90, 0xc6, 0xb3, 0x2c, 0x59, 0x80, 0xf5, 0x6a, 0x1f, 0x49, 0x3c, 0xa3, 0xd6, 0xa, 0x7f, 0xe0, 0x95, 0xc3, 0xb6, 0x29, 0x5c, 0x85, 0xf0, 0x6f, 0x1a, 0x4c, 0x39, 0xa6, 0xd3, 0x9, 0x7c, 0xe3, 0x96, 0xc0, 0xb5, 0x2a, 0x5f, 0x86, 0xf3, 0x6c, 0x19, 0x4f, 0x3a, 0xa5, 0xd0, 0x18, 0x6d, 0xf2, 0x87, 0xd1, 0xa4, 0x3b, 0x4e, 0x97, 0xe2, 0x7d, 0x8, 0x5e, 0x2b, 0xb4, 0xc1, 0x1b, 0x6e, 0xf1, 0x84, 0xd2, 0xa7, 0x38, 0x4d, 0x94, 0xe1, 0x7e, 0xb, 0x5d, 0x28, 0xb7, 0xc2, 0x1e, 0x6b, 0xf4, 0x81, 0xd7, 0xa2, 0x3d, 0x48, 0x91, 0xe4, 0x7b, 0xe, 0x58, 0x2d, 0xb2, 0xc7, 0x1d, 0x68, 0xf7, 0x82, 0xd4, 0xa1, 0x3e, 0x4b, 0x92, 0xe7, 0x78, 0xd, 0x5b, 0x2e, 0xb1, 0xc4, 0x14, 0x61, 0xfe, 0x8b, 0xdd, 0xa8, 0x37, 0x42, 0x9b, 0xee, 0x71, 0x4, 0x52, 0x27, 0xb8, 0xcd, 0x17, 0x62, 0xfd, 0x88, 0xde, 0xab, 0x34, 0x41, 0x98, 0xed, 0x72, 0x7, 0x51, 0x24, 0xbb, 0xce, 0x12, 0x67, 0xf8, 0x8d, 0xdb, 0xae, 0x31, 0x44, 0x9d, 0xe8, 0x77, 0x2, 0x54, 0x21, 0xbe, 0xcb, 0x11, 0x64, 0xfb, 0x8e, 0xd8, 0xad, 0x32, 0x47, 0x9e, 0xeb, 0x74, 0x1, 0x57, 0x22, 0xbd, 0xc8},
+ {0x0, 0x76, 0xec, 0x9a, 0xc5, 0xb3, 0x29, 0x5f, 0x97, 0xe1, 0x7b, 0xd, 0x52, 0x24, 0xbe, 0xc8, 0x33, 0x45, 0xdf, 0xa9, 0xf6, 0x80, 0x1a, 0x6c, 0xa4, 0xd2, 0x48, 0x3e, 0x61, 0x17, 0x8d, 0xfb, 0x66, 0x10, 0x8a, 0xfc, 0xa3, 0xd5, 0x4f, 0x39, 0xf1, 0x87, 0x1d, 0x6b, 0x34, 0x42, 0xd8, 0xae, 0x55, 0x23, 0xb9, 0xcf, 0x90, 0xe6, 0x7c, 0xa, 0xc2, 0xb4, 0x2e, 0x58, 0x7, 0x71, 0xeb, 0x9d, 0xcc, 0xba, 0x20, 0x56, 0x9, 0x7f, 0xe5, 0x93, 0x5b, 0x2d, 0xb7, 0xc1, 0x9e, 0xe8, 0x72, 0x4, 0xff, 0x89, 0x13, 0x65, 0x3a, 0x4c, 0xd6, 0xa0, 0x68, 0x1e, 0x84, 0xf2, 0xad, 0xdb, 0x41, 0x37, 0xaa, 0xdc, 0x46, 0x30, 0x6f, 0x19, 0x83, 0xf5, 0x3d, 0x4b, 0xd1, 0xa7, 0xf8, 0x8e, 0x14, 0x62, 0x99, 0xef, 0x75, 0x3, 0x5c, 0x2a, 0xb0, 0xc6, 0xe, 0x78, 0xe2, 0x94, 0xcb, 0xbd, 0x27, 0x51, 0x85, 0xf3, 0x69, 0x1f, 0x40, 0x36, 0xac, 0xda, 0x12, 0x64, 0xfe, 0x88, 0xd7, 0xa1, 0x3b, 0x4d, 0xb6, 0xc0, 0x5a, 0x2c, 0x73, 0x5, 0x9f, 0xe9, 0x21, 0x57, 0xcd, 0xbb, 0xe4, 0x92, 0x8, 0x7e, 0xe3, 0x95, 0xf, 0x79, 0x26, 0x50, 0xca, 0xbc, 0x74, 0x2, 0x98, 0xee, 0xb1, 0xc7, 0x5d, 0x2b, 0xd0, 0xa6, 0x3c, 0x4a, 0x15, 0x63, 0xf9, 0x8f, 0x47, 0x31, 0xab, 0xdd, 0x82, 0xf4, 0x6e, 0x18, 0x49, 0x3f, 0xa5, 0xd3, 0x8c, 0xfa, 0x60, 0x16, 0xde, 0xa8, 0x32, 0x44, 0x1b, 0x6d, 0xf7, 0x81, 0x7a, 0xc, 0x96, 0xe0, 0xbf, 0xc9, 0x53, 0x25, 0xed, 0x9b, 0x1, 0x77, 0x28, 0x5e, 0xc4, 0xb2, 0x2f, 0x59, 0xc3, 0xb5, 0xea, 0x9c, 0x6, 0x70, 0xb8, 0xce, 0x54, 0x22, 0x7d, 0xb, 0x91, 0xe7, 0x1c, 0x6a, 0xf0, 0x86, 0xd9, 0xaf, 0x35, 0x43, 0x8b, 0xfd, 0x67, 0x11, 0x4e, 0x38, 0xa2, 0xd4},
+ {0x0, 0x77, 0xee, 0x99, 0xc1, 0xb6, 0x2f, 0x58, 0x9f, 0xe8, 0x71, 0x6, 0x5e, 0x29, 0xb0, 0xc7, 0x23, 0x54, 0xcd, 0xba, 0xe2, 0x95, 0xc, 0x7b, 0xbc, 0xcb, 0x52, 0x25, 0x7d, 0xa, 0x93, 0xe4, 0x46, 0x31, 0xa8, 0xdf, 0x87, 0xf0, 0x69, 0x1e, 0xd9, 0xae, 0x37, 0x40, 0x18, 0x6f, 0xf6, 0x81, 0x65, 0x12, 0x8b, 0xfc, 0xa4, 0xd3, 0x4a, 0x3d, 0xfa, 0x8d, 0x14, 0x63, 0x3b, 0x4c, 0xd5, 0xa2, 0x8c, 0xfb, 0x62, 0x15, 0x4d, 0x3a, 0xa3, 0xd4, 0x13, 0x64, 0xfd, 0x8a, 0xd2, 0xa5, 0x3c, 0x4b, 0xaf, 0xd8, 0x41, 0x36, 0x6e, 0x19, 0x80, 0xf7, 0x30, 0x47, 0xde, 0xa9, 0xf1, 0x86, 0x1f, 0x68, 0xca, 0xbd, 0x24, 0x53, 0xb, 0x7c, 0xe5, 0x92, 0x55, 0x22, 0xbb, 0xcc, 0x94, 0xe3, 0x7a, 0xd, 0xe9, 0x9e, 0x7, 0x70, 0x28, 0x5f, 0xc6, 0xb1, 0x76, 0x1, 0x98, 0xef, 0xb7, 0xc0, 0x59, 0x2e, 0x5, 0x72, 0xeb, 0x9c, 0xc4, 0xb3, 0x2a, 0x5d, 0x9a, 0xed, 0x74, 0x3, 0x5b, 0x2c, 0xb5, 0xc2, 0x26, 0x51, 0xc8, 0xbf, 0xe7, 0x90, 0x9, 0x7e, 0xb9, 0xce, 0x57, 0x20, 0x78, 0xf, 0x96, 0xe1, 0x43, 0x34, 0xad, 0xda, 0x82, 0xf5, 0x6c, 0x1b, 0xdc, 0xab, 0x32, 0x45, 0x1d, 0x6a, 0xf3, 0x84, 0x60, 0x17, 0x8e, 0xf9, 0xa1, 0xd6, 0x4f, 0x38, 0xff, 0x88, 0x11, 0x66, 0x3e, 0x49, 0xd0, 0xa7, 0x89, 0xfe, 0x67, 0x10, 0x48, 0x3f, 0xa6, 0xd1, 0x16, 0x61, 0xf8, 0x8f, 0xd7, 0xa0, 0x39, 0x4e, 0xaa, 0xdd, 0x44, 0x33, 0x6b, 0x1c, 0x85, 0xf2, 0x35, 0x42, 0xdb, 0xac, 0xf4, 0x83, 0x1a, 0x6d, 0xcf, 0xb8, 0x21, 0x56, 0xe, 0x79, 0xe0, 0x97, 0x50, 0x27, 0xbe, 0xc9, 0x91, 0xe6, 0x7f, 0x8, 0xec, 0x9b, 0x2, 0x75, 0x2d, 0x5a, 0xc3, 0xb4, 0x73, 0x4, 0x9d, 0xea, 0xb2, 0xc5, 0x5c, 0x2b},
+ {0x0, 0x78, 0xf0, 0x88, 0xfd, 0x85, 0xd, 0x75, 0xe7, 0x9f, 0x17, 0x6f, 0x1a, 0x62, 0xea, 0x92, 0xd3, 0xab, 0x23, 0x5b, 0x2e, 0x56, 0xde, 0xa6, 0x34, 0x4c, 0xc4, 0xbc, 0xc9, 0xb1, 0x39, 0x41, 0xbb, 0xc3, 0x4b, 0x33, 0x46, 0x3e, 0xb6, 0xce, 0x5c, 0x24, 0xac, 0xd4, 0xa1, 0xd9, 0x51, 0x29, 0x68, 0x10, 0x98, 0xe0, 0x95, 0xed, 0x65, 0x1d, 0x8f, 0xf7, 0x7f, 0x7, 0x72, 0xa, 0x82, 0xfa, 0x6b, 0x13, 0x9b, 0xe3, 0x96, 0xee, 0x66, 0x1e, 0x8c, 0xf4, 0x7c, 0x4, 0x71, 0x9, 0x81, 0xf9, 0xb8, 0xc0, 0x48, 0x30, 0x45, 0x3d, 0xb5, 0xcd, 0x5f, 0x27, 0xaf, 0xd7, 0xa2, 0xda, 0x52, 0x2a, 0xd0, 0xa8, 0x20, 0x58, 0x2d, 0x55, 0xdd, 0xa5, 0x37, 0x4f, 0xc7, 0xbf, 0xca, 0xb2, 0x3a, 0x42, 0x3, 0x7b, 0xf3, 0x8b, 0xfe, 0x86, 0xe, 0x76, 0xe4, 0x9c, 0x14, 0x6c, 0x19, 0x61, 0xe9, 0x91, 0xd6, 0xae, 0x26, 0x5e, 0x2b, 0x53, 0xdb, 0xa3, 0x31, 0x49, 0xc1, 0xb9, 0xcc, 0xb4, 0x3c, 0x44, 0x5, 0x7d, 0xf5, 0x8d, 0xf8, 0x80, 0x8, 0x70, 0xe2, 0x9a, 0x12, 0x6a, 0x1f, 0x67, 0xef, 0x97, 0x6d, 0x15, 0x9d, 0xe5, 0x90, 0xe8, 0x60, 0x18, 0x8a, 0xf2, 0x7a, 0x2, 0x77, 0xf, 0x87, 0xff, 0xbe, 0xc6, 0x4e, 0x36, 0x43, 0x3b, 0xb3, 0xcb, 0x59, 0x21, 0xa9, 0xd1, 0xa4, 0xdc, 0x54, 0x2c, 0xbd, 0xc5, 0x4d, 0x35, 0x40, 0x38, 0xb0, 0xc8, 0x5a, 0x22, 0xaa, 0xd2, 0xa7, 0xdf, 0x57, 0x2f, 0x6e, 0x16, 0x9e, 0xe6, 0x93, 0xeb, 0x63, 0x1b, 0x89, 0xf1, 0x79, 0x1, 0x74, 0xc, 0x84, 0xfc, 0x6, 0x7e, 0xf6, 0x8e, 0xfb, 0x83, 0xb, 0x73, 0xe1, 0x99, 0x11, 0x69, 0x1c, 0x64, 0xec, 0x94, 0xd5, 0xad, 0x25, 0x5d, 0x28, 0x50, 0xd8, 0xa0, 0x32, 0x4a, 0xc2, 0xba, 0xcf, 0xb7, 0x3f, 0x47},
+ {0x0, 0x79, 0xf2, 0x8b, 0xf9, 0x80, 0xb, 0x72, 0xef, 0x96, 0x1d, 0x64, 0x16, 0x6f, 0xe4, 0x9d, 0xc3, 0xba, 0x31, 0x48, 0x3a, 0x43, 0xc8, 0xb1, 0x2c, 0x55, 0xde, 0xa7, 0xd5, 0xac, 0x27, 0x5e, 0x9b, 0xe2, 0x69, 0x10, 0x62, 0x1b, 0x90, 0xe9, 0x74, 0xd, 0x86, 0xff, 0x8d, 0xf4, 0x7f, 0x6, 0x58, 0x21, 0xaa, 0xd3, 0xa1, 0xd8, 0x53, 0x2a, 0xb7, 0xce, 0x45, 0x3c, 0x4e, 0x37, 0xbc, 0xc5, 0x2b, 0x52, 0xd9, 0xa0, 0xd2, 0xab, 0x20, 0x59, 0xc4, 0xbd, 0x36, 0x4f, 0x3d, 0x44, 0xcf, 0xb6, 0xe8, 0x91, 0x1a, 0x63, 0x11, 0x68, 0xe3, 0x9a, 0x7, 0x7e, 0xf5, 0x8c, 0xfe, 0x87, 0xc, 0x75, 0xb0, 0xc9, 0x42, 0x3b, 0x49, 0x30, 0xbb, 0xc2, 0x5f, 0x26, 0xad, 0xd4, 0xa6, 0xdf, 0x54, 0x2d, 0x73, 0xa, 0x81, 0xf8, 0x8a, 0xf3, 0x78, 0x1, 0x9c, 0xe5, 0x6e, 0x17, 0x65, 0x1c, 0x97, 0xee, 0x56, 0x2f, 0xa4, 0xdd, 0xaf, 0xd6, 0x5d, 0x24, 0xb9, 0xc0, 0x4b, 0x32, 0x40, 0x39, 0xb2, 0xcb, 0x95, 0xec, 0x67, 0x1e, 0x6c, 0x15, 0x9e, 0xe7, 0x7a, 0x3, 0x88, 0xf1, 0x83, 0xfa, 0x71, 0x8, 0xcd, 0xb4, 0x3f, 0x46, 0x34, 0x4d, 0xc6, 0xbf, 0x22, 0x5b, 0xd0, 0xa9, 0xdb, 0xa2, 0x29, 0x50, 0xe, 0x77, 0xfc, 0x85, 0xf7, 0x8e, 0x5, 0x7c, 0xe1, 0x98, 0x13, 0x6a, 0x18, 0x61, 0xea, 0x93, 0x7d, 0x4, 0x8f, 0xf6, 0x84, 0xfd, 0x76, 0xf, 0x92, 0xeb, 0x60, 0x19, 0x6b, 0x12, 0x99, 0xe0, 0xbe, 0xc7, 0x4c, 0x35, 0x47, 0x3e, 0xb5, 0xcc, 0x51, 0x28, 0xa3, 0xda, 0xa8, 0xd1, 0x5a, 0x23, 0xe6, 0x9f, 0x14, 0x6d, 0x1f, 0x66, 0xed, 0x94, 0x9, 0x70, 0xfb, 0x82, 0xf0, 0x89, 0x2, 0x7b, 0x25, 0x5c, 0xd7, 0xae, 0xdc, 0xa5, 0x2e, 0x57, 0xca, 0xb3, 0x38, 0x41, 0x33, 0x4a, 0xc1, 0xb8},
+ {0x0, 0x7a, 0xf4, 0x8e, 0xf5, 0x8f, 0x1, 0x7b, 0xf7, 0x8d, 0x3, 0x79, 0x2, 0x78, 0xf6, 0x8c, 0xf3, 0x89, 0x7, 0x7d, 0x6, 0x7c, 0xf2, 0x88, 0x4, 0x7e, 0xf0, 0x8a, 0xf1, 0x8b, 0x5, 0x7f, 0xfb, 0x81, 0xf, 0x75, 0xe, 0x74, 0xfa, 0x80, 0xc, 0x76, 0xf8, 0x82, 0xf9, 0x83, 0xd, 0x77, 0x8, 0x72, 0xfc, 0x86, 0xfd, 0x87, 0x9, 0x73, 0xff, 0x85, 0xb, 0x71, 0xa, 0x70, 0xfe, 0x84, 0xeb, 0x91, 0x1f, 0x65, 0x1e, 0x64, 0xea, 0x90, 0x1c, 0x66, 0xe8, 0x92, 0xe9, 0x93, 0x1d, 0x67, 0x18, 0x62, 0xec, 0x96, 0xed, 0x97, 0x19, 0x63, 0xef, 0x95, 0x1b, 0x61, 0x1a, 0x60, 0xee, 0x94, 0x10, 0x6a, 0xe4, 0x9e, 0xe5, 0x9f, 0x11, 0x6b, 0xe7, 0x9d, 0x13, 0x69, 0x12, 0x68, 0xe6, 0x9c, 0xe3, 0x99, 0x17, 0x6d, 0x16, 0x6c, 0xe2, 0x98, 0x14, 0x6e, 0xe0, 0x9a, 0xe1, 0x9b, 0x15, 0x6f, 0xcb, 0xb1, 0x3f, 0x45, 0x3e, 0x44, 0xca, 0xb0, 0x3c, 0x46, 0xc8, 0xb2, 0xc9, 0xb3, 0x3d, 0x47, 0x38, 0x42, 0xcc, 0xb6, 0xcd, 0xb7, 0x39, 0x43, 0xcf, 0xb5, 0x3b, 0x41, 0x3a, 0x40, 0xce, 0xb4, 0x30, 0x4a, 0xc4, 0xbe, 0xc5, 0xbf, 0x31, 0x4b, 0xc7, 0xbd, 0x33, 0x49, 0x32, 0x48, 0xc6, 0xbc, 0xc3, 0xb9, 0x37, 0x4d, 0x36, 0x4c, 0xc2, 0xb8, 0x34, 0x4e, 0xc0, 0xba, 0xc1, 0xbb, 0x35, 0x4f, 0x20, 0x5a, 0xd4, 0xae, 0xd5, 0xaf, 0x21, 0x5b, 0xd7, 0xad, 0x23, 0x59, 0x22, 0x58, 0xd6, 0xac, 0xd3, 0xa9, 0x27, 0x5d, 0x26, 0x5c, 0xd2, 0xa8, 0x24, 0x5e, 0xd0, 0xaa, 0xd1, 0xab, 0x25, 0x5f, 0xdb, 0xa1, 0x2f, 0x55, 0x2e, 0x54, 0xda, 0xa0, 0x2c, 0x56, 0xd8, 0xa2, 0xd9, 0xa3, 0x2d, 0x57, 0x28, 0x52, 0xdc, 0xa6, 0xdd, 0xa7, 0x29, 0x53, 0xdf, 0xa5, 0x2b, 0x51, 0x2a, 0x50, 0xde, 0xa4},
+ {0x0, 0x7b, 0xf6, 0x8d, 0xf1, 0x8a, 0x7, 0x7c, 0xff, 0x84, 0x9, 0x72, 0xe, 0x75, 0xf8, 0x83, 0xe3, 0x98, 0x15, 0x6e, 0x12, 0x69, 0xe4, 0x9f, 0x1c, 0x67, 0xea, 0x91, 0xed, 0x96, 0x1b, 0x60, 0xdb, 0xa0, 0x2d, 0x56, 0x2a, 0x51, 0xdc, 0xa7, 0x24, 0x5f, 0xd2, 0xa9, 0xd5, 0xae, 0x23, 0x58, 0x38, 0x43, 0xce, 0xb5, 0xc9, 0xb2, 0x3f, 0x44, 0xc7, 0xbc, 0x31, 0x4a, 0x36, 0x4d, 0xc0, 0xbb, 0xab, 0xd0, 0x5d, 0x26, 0x5a, 0x21, 0xac, 0xd7, 0x54, 0x2f, 0xa2, 0xd9, 0xa5, 0xde, 0x53, 0x28, 0x48, 0x33, 0xbe, 0xc5, 0xb9, 0xc2, 0x4f, 0x34, 0xb7, 0xcc, 0x41, 0x3a, 0x46, 0x3d, 0xb0, 0xcb, 0x70, 0xb, 0x86, 0xfd, 0x81, 0xfa, 0x77, 0xc, 0x8f, 0xf4, 0x79, 0x2, 0x7e, 0x5, 0x88, 0xf3, 0x93, 0xe8, 0x65, 0x1e, 0x62, 0x19, 0x94, 0xef, 0x6c, 0x17, 0x9a, 0xe1, 0x9d, 0xe6, 0x6b, 0x10, 0x4b, 0x30, 0xbd, 0xc6, 0xba, 0xc1, 0x4c, 0x37, 0xb4, 0xcf, 0x42, 0x39, 0x45, 0x3e, 0xb3, 0xc8, 0xa8, 0xd3, 0x5e, 0x25, 0x59, 0x22, 0xaf, 0xd4, 0x57, 0x2c, 0xa1, 0xda, 0xa6, 0xdd, 0x50, 0x2b, 0x90, 0xeb, 0x66, 0x1d, 0x61, 0x1a, 0x97, 0xec, 0x6f, 0x14, 0x99, 0xe2, 0x9e, 0xe5, 0x68, 0x13, 0x73, 0x8, 0x85, 0xfe, 0x82, 0xf9, 0x74, 0xf, 0x8c, 0xf7, 0x7a, 0x1, 0x7d, 0x6, 0x8b, 0xf0, 0xe0, 0x9b, 0x16, 0x6d, 0x11, 0x6a, 0xe7, 0x9c, 0x1f, 0x64, 0xe9, 0x92, 0xee, 0x95, 0x18, 0x63, 0x3, 0x78, 0xf5, 0x8e, 0xf2, 0x89, 0x4, 0x7f, 0xfc, 0x87, 0xa, 0x71, 0xd, 0x76, 0xfb, 0x80, 0x3b, 0x40, 0xcd, 0xb6, 0xca, 0xb1, 0x3c, 0x47, 0xc4, 0xbf, 0x32, 0x49, 0x35, 0x4e, 0xc3, 0xb8, 0xd8, 0xa3, 0x2e, 0x55, 0x29, 0x52, 0xdf, 0xa4, 0x27, 0x5c, 0xd1, 0xaa, 0xd6, 0xad, 0x20, 0x5b},
+ {0x0, 0x7c, 0xf8, 0x84, 0xed, 0x91, 0x15, 0x69, 0xc7, 0xbb, 0x3f, 0x43, 0x2a, 0x56, 0xd2, 0xae, 0x93, 0xef, 0x6b, 0x17, 0x7e, 0x2, 0x86, 0xfa, 0x54, 0x28, 0xac, 0xd0, 0xb9, 0xc5, 0x41, 0x3d, 0x3b, 0x47, 0xc3, 0xbf, 0xd6, 0xaa, 0x2e, 0x52, 0xfc, 0x80, 0x4, 0x78, 0x11, 0x6d, 0xe9, 0x95, 0xa8, 0xd4, 0x50, 0x2c, 0x45, 0x39, 0xbd, 0xc1, 0x6f, 0x13, 0x97, 0xeb, 0x82, 0xfe, 0x7a, 0x6, 0x76, 0xa, 0x8e, 0xf2, 0x9b, 0xe7, 0x63, 0x1f, 0xb1, 0xcd, 0x49, 0x35, 0x5c, 0x20, 0xa4, 0xd8, 0xe5, 0x99, 0x1d, 0x61, 0x8, 0x74, 0xf0, 0x8c, 0x22, 0x5e, 0xda, 0xa6, 0xcf, 0xb3, 0x37, 0x4b, 0x4d, 0x31, 0xb5, 0xc9, 0xa0, 0xdc, 0x58, 0x24, 0x8a, 0xf6, 0x72, 0xe, 0x67, 0x1b, 0x9f, 0xe3, 0xde, 0xa2, 0x26, 0x5a, 0x33, 0x4f, 0xcb, 0xb7, 0x19, 0x65, 0xe1, 0x9d, 0xf4, 0x88, 0xc, 0x70, 0xec, 0x90, 0x14, 0x68, 0x1, 0x7d, 0xf9, 0x85, 0x2b, 0x57, 0xd3, 0xaf, 0xc6, 0xba, 0x3e, 0x42, 0x7f, 0x3, 0x87, 0xfb, 0x92, 0xee, 0x6a, 0x16, 0xb8, 0xc4, 0x40, 0x3c, 0x55, 0x29, 0xad, 0xd1, 0xd7, 0xab, 0x2f, 0x53, 0x3a, 0x46, 0xc2, 0xbe, 0x10, 0x6c, 0xe8, 0x94, 0xfd, 0x81, 0x5, 0x79, 0x44, 0x38, 0xbc, 0xc0, 0xa9, 0xd5, 0x51, 0x2d, 0x83, 0xff, 0x7b, 0x7, 0x6e, 0x12, 0x96, 0xea, 0x9a, 0xe6, 0x62, 0x1e, 0x77, 0xb, 0x8f, 0xf3, 0x5d, 0x21, 0xa5, 0xd9, 0xb0, 0xcc, 0x48, 0x34, 0x9, 0x75, 0xf1, 0x8d, 0xe4, 0x98, 0x1c, 0x60, 0xce, 0xb2, 0x36, 0x4a, 0x23, 0x5f, 0xdb, 0xa7, 0xa1, 0xdd, 0x59, 0x25, 0x4c, 0x30, 0xb4, 0xc8, 0x66, 0x1a, 0x9e, 0xe2, 0x8b, 0xf7, 0x73, 0xf, 0x32, 0x4e, 0xca, 0xb6, 0xdf, 0xa3, 0x27, 0x5b, 0xf5, 0x89, 0xd, 0x71, 0x18, 0x64, 0xe0, 0x9c},
+ {0x0, 0x7d, 0xfa, 0x87, 0xe9, 0x94, 0x13, 0x6e, 0xcf, 0xb2, 0x35, 0x48, 0x26, 0x5b, 0xdc, 0xa1, 0x83, 0xfe, 0x79, 0x4, 0x6a, 0x17, 0x90, 0xed, 0x4c, 0x31, 0xb6, 0xcb, 0xa5, 0xd8, 0x5f, 0x22, 0x1b, 0x66, 0xe1, 0x9c, 0xf2, 0x8f, 0x8, 0x75, 0xd4, 0xa9, 0x2e, 0x53, 0x3d, 0x40, 0xc7, 0xba, 0x98, 0xe5, 0x62, 0x1f, 0x71, 0xc, 0x8b, 0xf6, 0x57, 0x2a, 0xad, 0xd0, 0xbe, 0xc3, 0x44, 0x39, 0x36, 0x4b, 0xcc, 0xb1, 0xdf, 0xa2, 0x25, 0x58, 0xf9, 0x84, 0x3, 0x7e, 0x10, 0x6d, 0xea, 0x97, 0xb5, 0xc8, 0x4f, 0x32, 0x5c, 0x21, 0xa6, 0xdb, 0x7a, 0x7, 0x80, 0xfd, 0x93, 0xee, 0x69, 0x14, 0x2d, 0x50, 0xd7, 0xaa, 0xc4, 0xb9, 0x3e, 0x43, 0xe2, 0x9f, 0x18, 0x65, 0xb, 0x76, 0xf1, 0x8c, 0xae, 0xd3, 0x54, 0x29, 0x47, 0x3a, 0xbd, 0xc0, 0x61, 0x1c, 0x9b, 0xe6, 0x88, 0xf5, 0x72, 0xf, 0x6c, 0x11, 0x96, 0xeb, 0x85, 0xf8, 0x7f, 0x2, 0xa3, 0xde, 0x59, 0x24, 0x4a, 0x37, 0xb0, 0xcd, 0xef, 0x92, 0x15, 0x68, 0x6, 0x7b, 0xfc, 0x81, 0x20, 0x5d, 0xda, 0xa7, 0xc9, 0xb4, 0x33, 0x4e, 0x77, 0xa, 0x8d, 0xf0, 0x9e, 0xe3, 0x64, 0x19, 0xb8, 0xc5, 0x42, 0x3f, 0x51, 0x2c, 0xab, 0xd6, 0xf4, 0x89, 0xe, 0x73, 0x1d, 0x60, 0xe7, 0x9a, 0x3b, 0x46, 0xc1, 0xbc, 0xd2, 0xaf, 0x28, 0x55, 0x5a, 0x27, 0xa0, 0xdd, 0xb3, 0xce, 0x49, 0x34, 0x95, 0xe8, 0x6f, 0x12, 0x7c, 0x1, 0x86, 0xfb, 0xd9, 0xa4, 0x23, 0x5e, 0x30, 0x4d, 0xca, 0xb7, 0x16, 0x6b, 0xec, 0x91, 0xff, 0x82, 0x5, 0x78, 0x41, 0x3c, 0xbb, 0xc6, 0xa8, 0xd5, 0x52, 0x2f, 0x8e, 0xf3, 0x74, 0x9, 0x67, 0x1a, 0x9d, 0xe0, 0xc2, 0xbf, 0x38, 0x45, 0x2b, 0x56, 0xd1, 0xac, 0xd, 0x70, 0xf7, 0x8a, 0xe4, 0x99, 0x1e, 0x63},
+ {0x0, 0x7e, 0xfc, 0x82, 0xe5, 0x9b, 0x19, 0x67, 0xd7, 0xa9, 0x2b, 0x55, 0x32, 0x4c, 0xce, 0xb0, 0xb3, 0xcd, 0x4f, 0x31, 0x56, 0x28, 0xaa, 0xd4, 0x64, 0x1a, 0x98, 0xe6, 0x81, 0xff, 0x7d, 0x3, 0x7b, 0x5, 0x87, 0xf9, 0x9e, 0xe0, 0x62, 0x1c, 0xac, 0xd2, 0x50, 0x2e, 0x49, 0x37, 0xb5, 0xcb, 0xc8, 0xb6, 0x34, 0x4a, 0x2d, 0x53, 0xd1, 0xaf, 0x1f, 0x61, 0xe3, 0x9d, 0xfa, 0x84, 0x6, 0x78, 0xf6, 0x88, 0xa, 0x74, 0x13, 0x6d, 0xef, 0x91, 0x21, 0x5f, 0xdd, 0xa3, 0xc4, 0xba, 0x38, 0x46, 0x45, 0x3b, 0xb9, 0xc7, 0xa0, 0xde, 0x5c, 0x22, 0x92, 0xec, 0x6e, 0x10, 0x77, 0x9, 0x8b, 0xf5, 0x8d, 0xf3, 0x71, 0xf, 0x68, 0x16, 0x94, 0xea, 0x5a, 0x24, 0xa6, 0xd8, 0xbf, 0xc1, 0x43, 0x3d, 0x3e, 0x40, 0xc2, 0xbc, 0xdb, 0xa5, 0x27, 0x59, 0xe9, 0x97, 0x15, 0x6b, 0xc, 0x72, 0xf0, 0x8e, 0xf1, 0x8f, 0xd, 0x73, 0x14, 0x6a, 0xe8, 0x96, 0x26, 0x58, 0xda, 0xa4, 0xc3, 0xbd, 0x3f, 0x41, 0x42, 0x3c, 0xbe, 0xc0, 0xa7, 0xd9, 0x5b, 0x25, 0x95, 0xeb, 0x69, 0x17, 0x70, 0xe, 0x8c, 0xf2, 0x8a, 0xf4, 0x76, 0x8, 0x6f, 0x11, 0x93, 0xed, 0x5d, 0x23, 0xa1, 0xdf, 0xb8, 0xc6, 0x44, 0x3a, 0x39, 0x47, 0xc5, 0xbb, 0xdc, 0xa2, 0x20, 0x5e, 0xee, 0x90, 0x12, 0x6c, 0xb, 0x75, 0xf7, 0x89, 0x7, 0x79, 0xfb, 0x85, 0xe2, 0x9c, 0x1e, 0x60, 0xd0, 0xae, 0x2c, 0x52, 0x35, 0x4b, 0xc9, 0xb7, 0xb4, 0xca, 0x48, 0x36, 0x51, 0x2f, 0xad, 0xd3, 0x63, 0x1d, 0x9f, 0xe1, 0x86, 0xf8, 0x7a, 0x4, 0x7c, 0x2, 0x80, 0xfe, 0x99, 0xe7, 0x65, 0x1b, 0xab, 0xd5, 0x57, 0x29, 0x4e, 0x30, 0xb2, 0xcc, 0xcf, 0xb1, 0x33, 0x4d, 0x2a, 0x54, 0xd6, 0xa8, 0x18, 0x66, 0xe4, 0x9a, 0xfd, 0x83, 0x1, 0x7f},
+ {0x0, 0x7f, 0xfe, 0x81, 0xe1, 0x9e, 0x1f, 0x60, 0xdf, 0xa0, 0x21, 0x5e, 0x3e, 0x41, 0xc0, 0xbf, 0xa3, 0xdc, 0x5d, 0x22, 0x42, 0x3d, 0xbc, 0xc3, 0x7c, 0x3, 0x82, 0xfd, 0x9d, 0xe2, 0x63, 0x1c, 0x5b, 0x24, 0xa5, 0xda, 0xba, 0xc5, 0x44, 0x3b, 0x84, 0xfb, 0x7a, 0x5, 0x65, 0x1a, 0x9b, 0xe4, 0xf8, 0x87, 0x6, 0x79, 0x19, 0x66, 0xe7, 0x98, 0x27, 0x58, 0xd9, 0xa6, 0xc6, 0xb9, 0x38, 0x47, 0xb6, 0xc9, 0x48, 0x37, 0x57, 0x28, 0xa9, 0xd6, 0x69, 0x16, 0x97, 0xe8, 0x88, 0xf7, 0x76, 0x9, 0x15, 0x6a, 0xeb, 0x94, 0xf4, 0x8b, 0xa, 0x75, 0xca, 0xb5, 0x34, 0x4b, 0x2b, 0x54, 0xd5, 0xaa, 0xed, 0x92, 0x13, 0x6c, 0xc, 0x73, 0xf2, 0x8d, 0x32, 0x4d, 0xcc, 0xb3, 0xd3, 0xac, 0x2d, 0x52, 0x4e, 0x31, 0xb0, 0xcf, 0xaf, 0xd0, 0x51, 0x2e, 0x91, 0xee, 0x6f, 0x10, 0x70, 0xf, 0x8e, 0xf1, 0x71, 0xe, 0x8f, 0xf0, 0x90, 0xef, 0x6e, 0x11, 0xae, 0xd1, 0x50, 0x2f, 0x4f, 0x30, 0xb1, 0xce, 0xd2, 0xad, 0x2c, 0x53, 0x33, 0x4c, 0xcd, 0xb2, 0xd, 0x72, 0xf3, 0x8c, 0xec, 0x93, 0x12, 0x6d, 0x2a, 0x55, 0xd4, 0xab, 0xcb, 0xb4, 0x35, 0x4a, 0xf5, 0x8a, 0xb, 0x74, 0x14, 0x6b, 0xea, 0x95, 0x89, 0xf6, 0x77, 0x8, 0x68, 0x17, 0x96, 0xe9, 0x56, 0x29, 0xa8, 0xd7, 0xb7, 0xc8, 0x49, 0x36, 0xc7, 0xb8, 0x39, 0x46, 0x26, 0x59, 0xd8, 0xa7, 0x18, 0x67, 0xe6, 0x99, 0xf9, 0x86, 0x7, 0x78, 0x64, 0x1b, 0x9a, 0xe5, 0x85, 0xfa, 0x7b, 0x4, 0xbb, 0xc4, 0x45, 0x3a, 0x5a, 0x25, 0xa4, 0xdb, 0x9c, 0xe3, 0x62, 0x1d, 0x7d, 0x2, 0x83, 0xfc, 0x43, 0x3c, 0xbd, 0xc2, 0xa2, 0xdd, 0x5c, 0x23, 0x3f, 0x40, 0xc1, 0xbe, 0xde, 0xa1, 0x20, 0x5f, 0xe0, 0x9f, 0x1e, 0x61, 0x1, 0x7e, 0xff, 0x80},
+ {0x0, 0x80, 0x1d, 0x9d, 0x3a, 0xba, 0x27, 0xa7, 0x74, 0xf4, 0x69, 0xe9, 0x4e, 0xce, 0x53, 0xd3, 0xe8, 0x68, 0xf5, 0x75, 0xd2, 0x52, 0xcf, 0x4f, 0x9c, 0x1c, 0x81, 0x1, 0xa6, 0x26, 0xbb, 0x3b, 0xcd, 0x4d, 0xd0, 0x50, 0xf7, 0x77, 0xea, 0x6a, 0xb9, 0x39, 0xa4, 0x24, 0x83, 0x3, 0x9e, 0x1e, 0x25, 0xa5, 0x38, 0xb8, 0x1f, 0x9f, 0x2, 0x82, 0x51, 0xd1, 0x4c, 0xcc, 0x6b, 0xeb, 0x76, 0xf6, 0x87, 0x7, 0x9a, 0x1a, 0xbd, 0x3d, 0xa0, 0x20, 0xf3, 0x73, 0xee, 0x6e, 0xc9, 0x49, 0xd4, 0x54, 0x6f, 0xef, 0x72, 0xf2, 0x55, 0xd5, 0x48, 0xc8, 0x1b, 0x9b, 0x6, 0x86, 0x21, 0xa1, 0x3c, 0xbc, 0x4a, 0xca, 0x57, 0xd7, 0x70, 0xf0, 0x6d, 0xed, 0x3e, 0xbe, 0x23, 0xa3, 0x4, 0x84, 0x19, 0x99, 0xa2, 0x22, 0xbf, 0x3f, 0x98, 0x18, 0x85, 0x5, 0xd6, 0x56, 0xcb, 0x4b, 0xec, 0x6c, 0xf1, 0x71, 0x13, 0x93, 0xe, 0x8e, 0x29, 0xa9, 0x34, 0xb4, 0x67, 0xe7, 0x7a, 0xfa, 0x5d, 0xdd, 0x40, 0xc0, 0xfb, 0x7b, 0xe6, 0x66, 0xc1, 0x41, 0xdc, 0x5c, 0x8f, 0xf, 0x92, 0x12, 0xb5, 0x35, 0xa8, 0x28, 0xde, 0x5e, 0xc3, 0x43, 0xe4, 0x64, 0xf9, 0x79, 0xaa, 0x2a, 0xb7, 0x37, 0x90, 0x10, 0x8d, 0xd, 0x36, 0xb6, 0x2b, 0xab, 0xc, 0x8c, 0x11, 0x91, 0x42, 0xc2, 0x5f, 0xdf, 0x78, 0xf8, 0x65, 0xe5, 0x94, 0x14, 0x89, 0x9, 0xae, 0x2e, 0xb3, 0x33, 0xe0, 0x60, 0xfd, 0x7d, 0xda, 0x5a, 0xc7, 0x47, 0x7c, 0xfc, 0x61, 0xe1, 0x46, 0xc6, 0x5b, 0xdb, 0x8, 0x88, 0x15, 0x95, 0x32, 0xb2, 0x2f, 0xaf, 0x59, 0xd9, 0x44, 0xc4, 0x63, 0xe3, 0x7e, 0xfe, 0x2d, 0xad, 0x30, 0xb0, 0x17, 0x97, 0xa, 0x8a, 0xb1, 0x31, 0xac, 0x2c, 0x8b, 0xb, 0x96, 0x16, 0xc5, 0x45, 0xd8, 0x58, 0xff, 0x7f, 0xe2, 0x62},
+ {0x0, 0x81, 0x1f, 0x9e, 0x3e, 0xbf, 0x21, 0xa0, 0x7c, 0xfd, 0x63, 0xe2, 0x42, 0xc3, 0x5d, 0xdc, 0xf8, 0x79, 0xe7, 0x66, 0xc6, 0x47, 0xd9, 0x58, 0x84, 0x5, 0x9b, 0x1a, 0xba, 0x3b, 0xa5, 0x24, 0xed, 0x6c, 0xf2, 0x73, 0xd3, 0x52, 0xcc, 0x4d, 0x91, 0x10, 0x8e, 0xf, 0xaf, 0x2e, 0xb0, 0x31, 0x15, 0x94, 0xa, 0x8b, 0x2b, 0xaa, 0x34, 0xb5, 0x69, 0xe8, 0x76, 0xf7, 0x57, 0xd6, 0x48, 0xc9, 0xc7, 0x46, 0xd8, 0x59, 0xf9, 0x78, 0xe6, 0x67, 0xbb, 0x3a, 0xa4, 0x25, 0x85, 0x4, 0x9a, 0x1b, 0x3f, 0xbe, 0x20, 0xa1, 0x1, 0x80, 0x1e, 0x9f, 0x43, 0xc2, 0x5c, 0xdd, 0x7d, 0xfc, 0x62, 0xe3, 0x2a, 0xab, 0x35, 0xb4, 0x14, 0x95, 0xb, 0x8a, 0x56, 0xd7, 0x49, 0xc8, 0x68, 0xe9, 0x77, 0xf6, 0xd2, 0x53, 0xcd, 0x4c, 0xec, 0x6d, 0xf3, 0x72, 0xae, 0x2f, 0xb1, 0x30, 0x90, 0x11, 0x8f, 0xe, 0x93, 0x12, 0x8c, 0xd, 0xad, 0x2c, 0xb2, 0x33, 0xef, 0x6e, 0xf0, 0x71, 0xd1, 0x50, 0xce, 0x4f, 0x6b, 0xea, 0x74, 0xf5, 0x55, 0xd4, 0x4a, 0xcb, 0x17, 0x96, 0x8, 0x89, 0x29, 0xa8, 0x36, 0xb7, 0x7e, 0xff, 0x61, 0xe0, 0x40, 0xc1, 0x5f, 0xde, 0x2, 0x83, 0x1d, 0x9c, 0x3c, 0xbd, 0x23, 0xa2, 0x86, 0x7, 0x99, 0x18, 0xb8, 0x39, 0xa7, 0x26, 0xfa, 0x7b, 0xe5, 0x64, 0xc4, 0x45, 0xdb, 0x5a, 0x54, 0xd5, 0x4b, 0xca, 0x6a, 0xeb, 0x75, 0xf4, 0x28, 0xa9, 0x37, 0xb6, 0x16, 0x97, 0x9, 0x88, 0xac, 0x2d, 0xb3, 0x32, 0x92, 0x13, 0x8d, 0xc, 0xd0, 0x51, 0xcf, 0x4e, 0xee, 0x6f, 0xf1, 0x70, 0xb9, 0x38, 0xa6, 0x27, 0x87, 0x6, 0x98, 0x19, 0xc5, 0x44, 0xda, 0x5b, 0xfb, 0x7a, 0xe4, 0x65, 0x41, 0xc0, 0x5e, 0xdf, 0x7f, 0xfe, 0x60, 0xe1, 0x3d, 0xbc, 0x22, 0xa3, 0x3, 0x82, 0x1c, 0x9d},
+ {0x0, 0x82, 0x19, 0x9b, 0x32, 0xb0, 0x2b, 0xa9, 0x64, 0xe6, 0x7d, 0xff, 0x56, 0xd4, 0x4f, 0xcd, 0xc8, 0x4a, 0xd1, 0x53, 0xfa, 0x78, 0xe3, 0x61, 0xac, 0x2e, 0xb5, 0x37, 0x9e, 0x1c, 0x87, 0x5, 0x8d, 0xf, 0x94, 0x16, 0xbf, 0x3d, 0xa6, 0x24, 0xe9, 0x6b, 0xf0, 0x72, 0xdb, 0x59, 0xc2, 0x40, 0x45, 0xc7, 0x5c, 0xde, 0x77, 0xf5, 0x6e, 0xec, 0x21, 0xa3, 0x38, 0xba, 0x13, 0x91, 0xa, 0x88, 0x7, 0x85, 0x1e, 0x9c, 0x35, 0xb7, 0x2c, 0xae, 0x63, 0xe1, 0x7a, 0xf8, 0x51, 0xd3, 0x48, 0xca, 0xcf, 0x4d, 0xd6, 0x54, 0xfd, 0x7f, 0xe4, 0x66, 0xab, 0x29, 0xb2, 0x30, 0x99, 0x1b, 0x80, 0x2, 0x8a, 0x8, 0x93, 0x11, 0xb8, 0x3a, 0xa1, 0x23, 0xee, 0x6c, 0xf7, 0x75, 0xdc, 0x5e, 0xc5, 0x47, 0x42, 0xc0, 0x5b, 0xd9, 0x70, 0xf2, 0x69, 0xeb, 0x26, 0xa4, 0x3f, 0xbd, 0x14, 0x96, 0xd, 0x8f, 0xe, 0x8c, 0x17, 0x95, 0x3c, 0xbe, 0x25, 0xa7, 0x6a, 0xe8, 0x73, 0xf1, 0x58, 0xda, 0x41, 0xc3, 0xc6, 0x44, 0xdf, 0x5d, 0xf4, 0x76, 0xed, 0x6f, 0xa2, 0x20, 0xbb, 0x39, 0x90, 0x12, 0x89, 0xb, 0x83, 0x1, 0x9a, 0x18, 0xb1, 0x33, 0xa8, 0x2a, 0xe7, 0x65, 0xfe, 0x7c, 0xd5, 0x57, 0xcc, 0x4e, 0x4b, 0xc9, 0x52, 0xd0, 0x79, 0xfb, 0x60, 0xe2, 0x2f, 0xad, 0x36, 0xb4, 0x1d, 0x9f, 0x4, 0x86, 0x9, 0x8b, 0x10, 0x92, 0x3b, 0xb9, 0x22, 0xa0, 0x6d, 0xef, 0x74, 0xf6, 0x5f, 0xdd, 0x46, 0xc4, 0xc1, 0x43, 0xd8, 0x5a, 0xf3, 0x71, 0xea, 0x68, 0xa5, 0x27, 0xbc, 0x3e, 0x97, 0x15, 0x8e, 0xc, 0x84, 0x6, 0x9d, 0x1f, 0xb6, 0x34, 0xaf, 0x2d, 0xe0, 0x62, 0xf9, 0x7b, 0xd2, 0x50, 0xcb, 0x49, 0x4c, 0xce, 0x55, 0xd7, 0x7e, 0xfc, 0x67, 0xe5, 0x28, 0xaa, 0x31, 0xb3, 0x1a, 0x98, 0x3, 0x81},
+ {0x0, 0x83, 0x1b, 0x98, 0x36, 0xb5, 0x2d, 0xae, 0x6c, 0xef, 0x77, 0xf4, 0x5a, 0xd9, 0x41, 0xc2, 0xd8, 0x5b, 0xc3, 0x40, 0xee, 0x6d, 0xf5, 0x76, 0xb4, 0x37, 0xaf, 0x2c, 0x82, 0x1, 0x99, 0x1a, 0xad, 0x2e, 0xb6, 0x35, 0x9b, 0x18, 0x80, 0x3, 0xc1, 0x42, 0xda, 0x59, 0xf7, 0x74, 0xec, 0x6f, 0x75, 0xf6, 0x6e, 0xed, 0x43, 0xc0, 0x58, 0xdb, 0x19, 0x9a, 0x2, 0x81, 0x2f, 0xac, 0x34, 0xb7, 0x47, 0xc4, 0x5c, 0xdf, 0x71, 0xf2, 0x6a, 0xe9, 0x2b, 0xa8, 0x30, 0xb3, 0x1d, 0x9e, 0x6, 0x85, 0x9f, 0x1c, 0x84, 0x7, 0xa9, 0x2a, 0xb2, 0x31, 0xf3, 0x70, 0xe8, 0x6b, 0xc5, 0x46, 0xde, 0x5d, 0xea, 0x69, 0xf1, 0x72, 0xdc, 0x5f, 0xc7, 0x44, 0x86, 0x5, 0x9d, 0x1e, 0xb0, 0x33, 0xab, 0x28, 0x32, 0xb1, 0x29, 0xaa, 0x4, 0x87, 0x1f, 0x9c, 0x5e, 0xdd, 0x45, 0xc6, 0x68, 0xeb, 0x73, 0xf0, 0x8e, 0xd, 0x95, 0x16, 0xb8, 0x3b, 0xa3, 0x20, 0xe2, 0x61, 0xf9, 0x7a, 0xd4, 0x57, 0xcf, 0x4c, 0x56, 0xd5, 0x4d, 0xce, 0x60, 0xe3, 0x7b, 0xf8, 0x3a, 0xb9, 0x21, 0xa2, 0xc, 0x8f, 0x17, 0x94, 0x23, 0xa0, 0x38, 0xbb, 0x15, 0x96, 0xe, 0x8d, 0x4f, 0xcc, 0x54, 0xd7, 0x79, 0xfa, 0x62, 0xe1, 0xfb, 0x78, 0xe0, 0x63, 0xcd, 0x4e, 0xd6, 0x55, 0x97, 0x14, 0x8c, 0xf, 0xa1, 0x22, 0xba, 0x39, 0xc9, 0x4a, 0xd2, 0x51, 0xff, 0x7c, 0xe4, 0x67, 0xa5, 0x26, 0xbe, 0x3d, 0x93, 0x10, 0x88, 0xb, 0x11, 0x92, 0xa, 0x89, 0x27, 0xa4, 0x3c, 0xbf, 0x7d, 0xfe, 0x66, 0xe5, 0x4b, 0xc8, 0x50, 0xd3, 0x64, 0xe7, 0x7f, 0xfc, 0x52, 0xd1, 0x49, 0xca, 0x8, 0x8b, 0x13, 0x90, 0x3e, 0xbd, 0x25, 0xa6, 0xbc, 0x3f, 0xa7, 0x24, 0x8a, 0x9, 0x91, 0x12, 0xd0, 0x53, 0xcb, 0x48, 0xe6, 0x65, 0xfd, 0x7e},
+ {0x0, 0x84, 0x15, 0x91, 0x2a, 0xae, 0x3f, 0xbb, 0x54, 0xd0, 0x41, 0xc5, 0x7e, 0xfa, 0x6b, 0xef, 0xa8, 0x2c, 0xbd, 0x39, 0x82, 0x6, 0x97, 0x13, 0xfc, 0x78, 0xe9, 0x6d, 0xd6, 0x52, 0xc3, 0x47, 0x4d, 0xc9, 0x58, 0xdc, 0x67, 0xe3, 0x72, 0xf6, 0x19, 0x9d, 0xc, 0x88, 0x33, 0xb7, 0x26, 0xa2, 0xe5, 0x61, 0xf0, 0x74, 0xcf, 0x4b, 0xda, 0x5e, 0xb1, 0x35, 0xa4, 0x20, 0x9b, 0x1f, 0x8e, 0xa, 0x9a, 0x1e, 0x8f, 0xb, 0xb0, 0x34, 0xa5, 0x21, 0xce, 0x4a, 0xdb, 0x5f, 0xe4, 0x60, 0xf1, 0x75, 0x32, 0xb6, 0x27, 0xa3, 0x18, 0x9c, 0xd, 0x89, 0x66, 0xe2, 0x73, 0xf7, 0x4c, 0xc8, 0x59, 0xdd, 0xd7, 0x53, 0xc2, 0x46, 0xfd, 0x79, 0xe8, 0x6c, 0x83, 0x7, 0x96, 0x12, 0xa9, 0x2d, 0xbc, 0x38, 0x7f, 0xfb, 0x6a, 0xee, 0x55, 0xd1, 0x40, 0xc4, 0x2b, 0xaf, 0x3e, 0xba, 0x1, 0x85, 0x14, 0x90, 0x29, 0xad, 0x3c, 0xb8, 0x3, 0x87, 0x16, 0x92, 0x7d, 0xf9, 0x68, 0xec, 0x57, 0xd3, 0x42, 0xc6, 0x81, 0x5, 0x94, 0x10, 0xab, 0x2f, 0xbe, 0x3a, 0xd5, 0x51, 0xc0, 0x44, 0xff, 0x7b, 0xea, 0x6e, 0x64, 0xe0, 0x71, 0xf5, 0x4e, 0xca, 0x5b, 0xdf, 0x30, 0xb4, 0x25, 0xa1, 0x1a, 0x9e, 0xf, 0x8b, 0xcc, 0x48, 0xd9, 0x5d, 0xe6, 0x62, 0xf3, 0x77, 0x98, 0x1c, 0x8d, 0x9, 0xb2, 0x36, 0xa7, 0x23, 0xb3, 0x37, 0xa6, 0x22, 0x99, 0x1d, 0x8c, 0x8, 0xe7, 0x63, 0xf2, 0x76, 0xcd, 0x49, 0xd8, 0x5c, 0x1b, 0x9f, 0xe, 0x8a, 0x31, 0xb5, 0x24, 0xa0, 0x4f, 0xcb, 0x5a, 0xde, 0x65, 0xe1, 0x70, 0xf4, 0xfe, 0x7a, 0xeb, 0x6f, 0xd4, 0x50, 0xc1, 0x45, 0xaa, 0x2e, 0xbf, 0x3b, 0x80, 0x4, 0x95, 0x11, 0x56, 0xd2, 0x43, 0xc7, 0x7c, 0xf8, 0x69, 0xed, 0x2, 0x86, 0x17, 0x93, 0x28, 0xac, 0x3d, 0xb9},
+ {0x0, 0x85, 0x17, 0x92, 0x2e, 0xab, 0x39, 0xbc, 0x5c, 0xd9, 0x4b, 0xce, 0x72, 0xf7, 0x65, 0xe0, 0xb8, 0x3d, 0xaf, 0x2a, 0x96, 0x13, 0x81, 0x4, 0xe4, 0x61, 0xf3, 0x76, 0xca, 0x4f, 0xdd, 0x58, 0x6d, 0xe8, 0x7a, 0xff, 0x43, 0xc6, 0x54, 0xd1, 0x31, 0xb4, 0x26, 0xa3, 0x1f, 0x9a, 0x8, 0x8d, 0xd5, 0x50, 0xc2, 0x47, 0xfb, 0x7e, 0xec, 0x69, 0x89, 0xc, 0x9e, 0x1b, 0xa7, 0x22, 0xb0, 0x35, 0xda, 0x5f, 0xcd, 0x48, 0xf4, 0x71, 0xe3, 0x66, 0x86, 0x3, 0x91, 0x14, 0xa8, 0x2d, 0xbf, 0x3a, 0x62, 0xe7, 0x75, 0xf0, 0x4c, 0xc9, 0x5b, 0xde, 0x3e, 0xbb, 0x29, 0xac, 0x10, 0x95, 0x7, 0x82, 0xb7, 0x32, 0xa0, 0x25, 0x99, 0x1c, 0x8e, 0xb, 0xeb, 0x6e, 0xfc, 0x79, 0xc5, 0x40, 0xd2, 0x57, 0xf, 0x8a, 0x18, 0x9d, 0x21, 0xa4, 0x36, 0xb3, 0x53, 0xd6, 0x44, 0xc1, 0x7d, 0xf8, 0x6a, 0xef, 0xa9, 0x2c, 0xbe, 0x3b, 0x87, 0x2, 0x90, 0x15, 0xf5, 0x70, 0xe2, 0x67, 0xdb, 0x5e, 0xcc, 0x49, 0x11, 0x94, 0x6, 0x83, 0x3f, 0xba, 0x28, 0xad, 0x4d, 0xc8, 0x5a, 0xdf, 0x63, 0xe6, 0x74, 0xf1, 0xc4, 0x41, 0xd3, 0x56, 0xea, 0x6f, 0xfd, 0x78, 0x98, 0x1d, 0x8f, 0xa, 0xb6, 0x33, 0xa1, 0x24, 0x7c, 0xf9, 0x6b, 0xee, 0x52, 0xd7, 0x45, 0xc0, 0x20, 0xa5, 0x37, 0xb2, 0xe, 0x8b, 0x19, 0x9c, 0x73, 0xf6, 0x64, 0xe1, 0x5d, 0xd8, 0x4a, 0xcf, 0x2f, 0xaa, 0x38, 0xbd, 0x1, 0x84, 0x16, 0x93, 0xcb, 0x4e, 0xdc, 0x59, 0xe5, 0x60, 0xf2, 0x77, 0x97, 0x12, 0x80, 0x5, 0xb9, 0x3c, 0xae, 0x2b, 0x1e, 0x9b, 0x9, 0x8c, 0x30, 0xb5, 0x27, 0xa2, 0x42, 0xc7, 0x55, 0xd0, 0x6c, 0xe9, 0x7b, 0xfe, 0xa6, 0x23, 0xb1, 0x34, 0x88, 0xd, 0x9f, 0x1a, 0xfa, 0x7f, 0xed, 0x68, 0xd4, 0x51, 0xc3, 0x46},
+ {0x0, 0x86, 0x11, 0x97, 0x22, 0xa4, 0x33, 0xb5, 0x44, 0xc2, 0x55, 0xd3, 0x66, 0xe0, 0x77, 0xf1, 0x88, 0xe, 0x99, 0x1f, 0xaa, 0x2c, 0xbb, 0x3d, 0xcc, 0x4a, 0xdd, 0x5b, 0xee, 0x68, 0xff, 0x79, 0xd, 0x8b, 0x1c, 0x9a, 0x2f, 0xa9, 0x3e, 0xb8, 0x49, 0xcf, 0x58, 0xde, 0x6b, 0xed, 0x7a, 0xfc, 0x85, 0x3, 0x94, 0x12, 0xa7, 0x21, 0xb6, 0x30, 0xc1, 0x47, 0xd0, 0x56, 0xe3, 0x65, 0xf2, 0x74, 0x1a, 0x9c, 0xb, 0x8d, 0x38, 0xbe, 0x29, 0xaf, 0x5e, 0xd8, 0x4f, 0xc9, 0x7c, 0xfa, 0x6d, 0xeb, 0x92, 0x14, 0x83, 0x5, 0xb0, 0x36, 0xa1, 0x27, 0xd6, 0x50, 0xc7, 0x41, 0xf4, 0x72, 0xe5, 0x63, 0x17, 0x91, 0x6, 0x80, 0x35, 0xb3, 0x24, 0xa2, 0x53, 0xd5, 0x42, 0xc4, 0x71, 0xf7, 0x60, 0xe6, 0x9f, 0x19, 0x8e, 0x8, 0xbd, 0x3b, 0xac, 0x2a, 0xdb, 0x5d, 0xca, 0x4c, 0xf9, 0x7f, 0xe8, 0x6e, 0x34, 0xb2, 0x25, 0xa3, 0x16, 0x90, 0x7, 0x81, 0x70, 0xf6, 0x61, 0xe7, 0x52, 0xd4, 0x43, 0xc5, 0xbc, 0x3a, 0xad, 0x2b, 0x9e, 0x18, 0x8f, 0x9, 0xf8, 0x7e, 0xe9, 0x6f, 0xda, 0x5c, 0xcb, 0x4d, 0x39, 0xbf, 0x28, 0xae, 0x1b, 0x9d, 0xa, 0x8c, 0x7d, 0xfb, 0x6c, 0xea, 0x5f, 0xd9, 0x4e, 0xc8, 0xb1, 0x37, 0xa0, 0x26, 0x93, 0x15, 0x82, 0x4, 0xf5, 0x73, 0xe4, 0x62, 0xd7, 0x51, 0xc6, 0x40, 0x2e, 0xa8, 0x3f, 0xb9, 0xc, 0x8a, 0x1d, 0x9b, 0x6a, 0xec, 0x7b, 0xfd, 0x48, 0xce, 0x59, 0xdf, 0xa6, 0x20, 0xb7, 0x31, 0x84, 0x2, 0x95, 0x13, 0xe2, 0x64, 0xf3, 0x75, 0xc0, 0x46, 0xd1, 0x57, 0x23, 0xa5, 0x32, 0xb4, 0x1, 0x87, 0x10, 0x96, 0x67, 0xe1, 0x76, 0xf0, 0x45, 0xc3, 0x54, 0xd2, 0xab, 0x2d, 0xba, 0x3c, 0x89, 0xf, 0x98, 0x1e, 0xef, 0x69, 0xfe, 0x78, 0xcd, 0x4b, 0xdc, 0x5a},
+ {0x0, 0x87, 0x13, 0x94, 0x26, 0xa1, 0x35, 0xb2, 0x4c, 0xcb, 0x5f, 0xd8, 0x6a, 0xed, 0x79, 0xfe, 0x98, 0x1f, 0x8b, 0xc, 0xbe, 0x39, 0xad, 0x2a, 0xd4, 0x53, 0xc7, 0x40, 0xf2, 0x75, 0xe1, 0x66, 0x2d, 0xaa, 0x3e, 0xb9, 0xb, 0x8c, 0x18, 0x9f, 0x61, 0xe6, 0x72, 0xf5, 0x47, 0xc0, 0x54, 0xd3, 0xb5, 0x32, 0xa6, 0x21, 0x93, 0x14, 0x80, 0x7, 0xf9, 0x7e, 0xea, 0x6d, 0xdf, 0x58, 0xcc, 0x4b, 0x5a, 0xdd, 0x49, 0xce, 0x7c, 0xfb, 0x6f, 0xe8, 0x16, 0x91, 0x5, 0x82, 0x30, 0xb7, 0x23, 0xa4, 0xc2, 0x45, 0xd1, 0x56, 0xe4, 0x63, 0xf7, 0x70, 0x8e, 0x9, 0x9d, 0x1a, 0xa8, 0x2f, 0xbb, 0x3c, 0x77, 0xf0, 0x64, 0xe3, 0x51, 0xd6, 0x42, 0xc5, 0x3b, 0xbc, 0x28, 0xaf, 0x1d, 0x9a, 0xe, 0x89, 0xef, 0x68, 0xfc, 0x7b, 0xc9, 0x4e, 0xda, 0x5d, 0xa3, 0x24, 0xb0, 0x37, 0x85, 0x2, 0x96, 0x11, 0xb4, 0x33, 0xa7, 0x20, 0x92, 0x15, 0x81, 0x6, 0xf8, 0x7f, 0xeb, 0x6c, 0xde, 0x59, 0xcd, 0x4a, 0x2c, 0xab, 0x3f, 0xb8, 0xa, 0x8d, 0x19, 0x9e, 0x60, 0xe7, 0x73, 0xf4, 0x46, 0xc1, 0x55, 0xd2, 0x99, 0x1e, 0x8a, 0xd, 0xbf, 0x38, 0xac, 0x2b, 0xd5, 0x52, 0xc6, 0x41, 0xf3, 0x74, 0xe0, 0x67, 0x1, 0x86, 0x12, 0x95, 0x27, 0xa0, 0x34, 0xb3, 0x4d, 0xca, 0x5e, 0xd9, 0x6b, 0xec, 0x78, 0xff, 0xee, 0x69, 0xfd, 0x7a, 0xc8, 0x4f, 0xdb, 0x5c, 0xa2, 0x25, 0xb1, 0x36, 0x84, 0x3, 0x97, 0x10, 0x76, 0xf1, 0x65, 0xe2, 0x50, 0xd7, 0x43, 0xc4, 0x3a, 0xbd, 0x29, 0xae, 0x1c, 0x9b, 0xf, 0x88, 0xc3, 0x44, 0xd0, 0x57, 0xe5, 0x62, 0xf6, 0x71, 0x8f, 0x8, 0x9c, 0x1b, 0xa9, 0x2e, 0xba, 0x3d, 0x5b, 0xdc, 0x48, 0xcf, 0x7d, 0xfa, 0x6e, 0xe9, 0x17, 0x90, 0x4, 0x83, 0x31, 0xb6, 0x22, 0xa5},
+ {0x0, 0x88, 0xd, 0x85, 0x1a, 0x92, 0x17, 0x9f, 0x34, 0xbc, 0x39, 0xb1, 0x2e, 0xa6, 0x23, 0xab, 0x68, 0xe0, 0x65, 0xed, 0x72, 0xfa, 0x7f, 0xf7, 0x5c, 0xd4, 0x51, 0xd9, 0x46, 0xce, 0x4b, 0xc3, 0xd0, 0x58, 0xdd, 0x55, 0xca, 0x42, 0xc7, 0x4f, 0xe4, 0x6c, 0xe9, 0x61, 0xfe, 0x76, 0xf3, 0x7b, 0xb8, 0x30, 0xb5, 0x3d, 0xa2, 0x2a, 0xaf, 0x27, 0x8c, 0x4, 0x81, 0x9, 0x96, 0x1e, 0x9b, 0x13, 0xbd, 0x35, 0xb0, 0x38, 0xa7, 0x2f, 0xaa, 0x22, 0x89, 0x1, 0x84, 0xc, 0x93, 0x1b, 0x9e, 0x16, 0xd5, 0x5d, 0xd8, 0x50, 0xcf, 0x47, 0xc2, 0x4a, 0xe1, 0x69, 0xec, 0x64, 0xfb, 0x73, 0xf6, 0x7e, 0x6d, 0xe5, 0x60, 0xe8, 0x77, 0xff, 0x7a, 0xf2, 0x59, 0xd1, 0x54, 0xdc, 0x43, 0xcb, 0x4e, 0xc6, 0x5, 0x8d, 0x8, 0x80, 0x1f, 0x97, 0x12, 0x9a, 0x31, 0xb9, 0x3c, 0xb4, 0x2b, 0xa3, 0x26, 0xae, 0x67, 0xef, 0x6a, 0xe2, 0x7d, 0xf5, 0x70, 0xf8, 0x53, 0xdb, 0x5e, 0xd6, 0x49, 0xc1, 0x44, 0xcc, 0xf, 0x87, 0x2, 0x8a, 0x15, 0x9d, 0x18, 0x90, 0x3b, 0xb3, 0x36, 0xbe, 0x21, 0xa9, 0x2c, 0xa4, 0xb7, 0x3f, 0xba, 0x32, 0xad, 0x25, 0xa0, 0x28, 0x83, 0xb, 0x8e, 0x6, 0x99, 0x11, 0x94, 0x1c, 0xdf, 0x57, 0xd2, 0x5a, 0xc5, 0x4d, 0xc8, 0x40, 0xeb, 0x63, 0xe6, 0x6e, 0xf1, 0x79, 0xfc, 0x74, 0xda, 0x52, 0xd7, 0x5f, 0xc0, 0x48, 0xcd, 0x45, 0xee, 0x66, 0xe3, 0x6b, 0xf4, 0x7c, 0xf9, 0x71, 0xb2, 0x3a, 0xbf, 0x37, 0xa8, 0x20, 0xa5, 0x2d, 0x86, 0xe, 0x8b, 0x3, 0x9c, 0x14, 0x91, 0x19, 0xa, 0x82, 0x7, 0x8f, 0x10, 0x98, 0x1d, 0x95, 0x3e, 0xb6, 0x33, 0xbb, 0x24, 0xac, 0x29, 0xa1, 0x62, 0xea, 0x6f, 0xe7, 0x78, 0xf0, 0x75, 0xfd, 0x56, 0xde, 0x5b, 0xd3, 0x4c, 0xc4, 0x41, 0xc9},
+ {0x0, 0x89, 0xf, 0x86, 0x1e, 0x97, 0x11, 0x98, 0x3c, 0xb5, 0x33, 0xba, 0x22, 0xab, 0x2d, 0xa4, 0x78, 0xf1, 0x77, 0xfe, 0x66, 0xef, 0x69, 0xe0, 0x44, 0xcd, 0x4b, 0xc2, 0x5a, 0xd3, 0x55, 0xdc, 0xf0, 0x79, 0xff, 0x76, 0xee, 0x67, 0xe1, 0x68, 0xcc, 0x45, 0xc3, 0x4a, 0xd2, 0x5b, 0xdd, 0x54, 0x88, 0x1, 0x87, 0xe, 0x96, 0x1f, 0x99, 0x10, 0xb4, 0x3d, 0xbb, 0x32, 0xaa, 0x23, 0xa5, 0x2c, 0xfd, 0x74, 0xf2, 0x7b, 0xe3, 0x6a, 0xec, 0x65, 0xc1, 0x48, 0xce, 0x47, 0xdf, 0x56, 0xd0, 0x59, 0x85, 0xc, 0x8a, 0x3, 0x9b, 0x12, 0x94, 0x1d, 0xb9, 0x30, 0xb6, 0x3f, 0xa7, 0x2e, 0xa8, 0x21, 0xd, 0x84, 0x2, 0x8b, 0x13, 0x9a, 0x1c, 0x95, 0x31, 0xb8, 0x3e, 0xb7, 0x2f, 0xa6, 0x20, 0xa9, 0x75, 0xfc, 0x7a, 0xf3, 0x6b, 0xe2, 0x64, 0xed, 0x49, 0xc0, 0x46, 0xcf, 0x57, 0xde, 0x58, 0xd1, 0xe7, 0x6e, 0xe8, 0x61, 0xf9, 0x70, 0xf6, 0x7f, 0xdb, 0x52, 0xd4, 0x5d, 0xc5, 0x4c, 0xca, 0x43, 0x9f, 0x16, 0x90, 0x19, 0x81, 0x8, 0x8e, 0x7, 0xa3, 0x2a, 0xac, 0x25, 0xbd, 0x34, 0xb2, 0x3b, 0x17, 0x9e, 0x18, 0x91, 0x9, 0x80, 0x6, 0x8f, 0x2b, 0xa2, 0x24, 0xad, 0x35, 0xbc, 0x3a, 0xb3, 0x6f, 0xe6, 0x60, 0xe9, 0x71, 0xf8, 0x7e, 0xf7, 0x53, 0xda, 0x5c, 0xd5, 0x4d, 0xc4, 0x42, 0xcb, 0x1a, 0x93, 0x15, 0x9c, 0x4, 0x8d, 0xb, 0x82, 0x26, 0xaf, 0x29, 0xa0, 0x38, 0xb1, 0x37, 0xbe, 0x62, 0xeb, 0x6d, 0xe4, 0x7c, 0xf5, 0x73, 0xfa, 0x5e, 0xd7, 0x51, 0xd8, 0x40, 0xc9, 0x4f, 0xc6, 0xea, 0x63, 0xe5, 0x6c, 0xf4, 0x7d, 0xfb, 0x72, 0xd6, 0x5f, 0xd9, 0x50, 0xc8, 0x41, 0xc7, 0x4e, 0x92, 0x1b, 0x9d, 0x14, 0x8c, 0x5, 0x83, 0xa, 0xae, 0x27, 0xa1, 0x28, 0xb0, 0x39, 0xbf, 0x36},
+ {0x0, 0x8a, 0x9, 0x83, 0x12, 0x98, 0x1b, 0x91, 0x24, 0xae, 0x2d, 0xa7, 0x36, 0xbc, 0x3f, 0xb5, 0x48, 0xc2, 0x41, 0xcb, 0x5a, 0xd0, 0x53, 0xd9, 0x6c, 0xe6, 0x65, 0xef, 0x7e, 0xf4, 0x77, 0xfd, 0x90, 0x1a, 0x99, 0x13, 0x82, 0x8, 0x8b, 0x1, 0xb4, 0x3e, 0xbd, 0x37, 0xa6, 0x2c, 0xaf, 0x25, 0xd8, 0x52, 0xd1, 0x5b, 0xca, 0x40, 0xc3, 0x49, 0xfc, 0x76, 0xf5, 0x7f, 0xee, 0x64, 0xe7, 0x6d, 0x3d, 0xb7, 0x34, 0xbe, 0x2f, 0xa5, 0x26, 0xac, 0x19, 0x93, 0x10, 0x9a, 0xb, 0x81, 0x2, 0x88, 0x75, 0xff, 0x7c, 0xf6, 0x67, 0xed, 0x6e, 0xe4, 0x51, 0xdb, 0x58, 0xd2, 0x43, 0xc9, 0x4a, 0xc0, 0xad, 0x27, 0xa4, 0x2e, 0xbf, 0x35, 0xb6, 0x3c, 0x89, 0x3, 0x80, 0xa, 0x9b, 0x11, 0x92, 0x18, 0xe5, 0x6f, 0xec, 0x66, 0xf7, 0x7d, 0xfe, 0x74, 0xc1, 0x4b, 0xc8, 0x42, 0xd3, 0x59, 0xda, 0x50, 0x7a, 0xf0, 0x73, 0xf9, 0x68, 0xe2, 0x61, 0xeb, 0x5e, 0xd4, 0x57, 0xdd, 0x4c, 0xc6, 0x45, 0xcf, 0x32, 0xb8, 0x3b, 0xb1, 0x20, 0xaa, 0x29, 0xa3, 0x16, 0x9c, 0x1f, 0x95, 0x4, 0x8e, 0xd, 0x87, 0xea, 0x60, 0xe3, 0x69, 0xf8, 0x72, 0xf1, 0x7b, 0xce, 0x44, 0xc7, 0x4d, 0xdc, 0x56, 0xd5, 0x5f, 0xa2, 0x28, 0xab, 0x21, 0xb0, 0x3a, 0xb9, 0x33, 0x86, 0xc, 0x8f, 0x5, 0x94, 0x1e, 0x9d, 0x17, 0x47, 0xcd, 0x4e, 0xc4, 0x55, 0xdf, 0x5c, 0xd6, 0x63, 0xe9, 0x6a, 0xe0, 0x71, 0xfb, 0x78, 0xf2, 0xf, 0x85, 0x6, 0x8c, 0x1d, 0x97, 0x14, 0x9e, 0x2b, 0xa1, 0x22, 0xa8, 0x39, 0xb3, 0x30, 0xba, 0xd7, 0x5d, 0xde, 0x54, 0xc5, 0x4f, 0xcc, 0x46, 0xf3, 0x79, 0xfa, 0x70, 0xe1, 0x6b, 0xe8, 0x62, 0x9f, 0x15, 0x96, 0x1c, 0x8d, 0x7, 0x84, 0xe, 0xbb, 0x31, 0xb2, 0x38, 0xa9, 0x23, 0xa0, 0x2a},
+ {0x0, 0x8b, 0xb, 0x80, 0x16, 0x9d, 0x1d, 0x96, 0x2c, 0xa7, 0x27, 0xac, 0x3a, 0xb1, 0x31, 0xba, 0x58, 0xd3, 0x53, 0xd8, 0x4e, 0xc5, 0x45, 0xce, 0x74, 0xff, 0x7f, 0xf4, 0x62, 0xe9, 0x69, 0xe2, 0xb0, 0x3b, 0xbb, 0x30, 0xa6, 0x2d, 0xad, 0x26, 0x9c, 0x17, 0x97, 0x1c, 0x8a, 0x1, 0x81, 0xa, 0xe8, 0x63, 0xe3, 0x68, 0xfe, 0x75, 0xf5, 0x7e, 0xc4, 0x4f, 0xcf, 0x44, 0xd2, 0x59, 0xd9, 0x52, 0x7d, 0xf6, 0x76, 0xfd, 0x6b, 0xe0, 0x60, 0xeb, 0x51, 0xda, 0x5a, 0xd1, 0x47, 0xcc, 0x4c, 0xc7, 0x25, 0xae, 0x2e, 0xa5, 0x33, 0xb8, 0x38, 0xb3, 0x9, 0x82, 0x2, 0x89, 0x1f, 0x94, 0x14, 0x9f, 0xcd, 0x46, 0xc6, 0x4d, 0xdb, 0x50, 0xd0, 0x5b, 0xe1, 0x6a, 0xea, 0x61, 0xf7, 0x7c, 0xfc, 0x77, 0x95, 0x1e, 0x9e, 0x15, 0x83, 0x8, 0x88, 0x3, 0xb9, 0x32, 0xb2, 0x39, 0xaf, 0x24, 0xa4, 0x2f, 0xfa, 0x71, 0xf1, 0x7a, 0xec, 0x67, 0xe7, 0x6c, 0xd6, 0x5d, 0xdd, 0x56, 0xc0, 0x4b, 0xcb, 0x40, 0xa2, 0x29, 0xa9, 0x22, 0xb4, 0x3f, 0xbf, 0x34, 0x8e, 0x5, 0x85, 0xe, 0x98, 0x13, 0x93, 0x18, 0x4a, 0xc1, 0x41, 0xca, 0x5c, 0xd7, 0x57, 0xdc, 0x66, 0xed, 0x6d, 0xe6, 0x70, 0xfb, 0x7b, 0xf0, 0x12, 0x99, 0x19, 0x92, 0x4, 0x8f, 0xf, 0x84, 0x3e, 0xb5, 0x35, 0xbe, 0x28, 0xa3, 0x23, 0xa8, 0x87, 0xc, 0x8c, 0x7, 0x91, 0x1a, 0x9a, 0x11, 0xab, 0x20, 0xa0, 0x2b, 0xbd, 0x36, 0xb6, 0x3d, 0xdf, 0x54, 0xd4, 0x5f, 0xc9, 0x42, 0xc2, 0x49, 0xf3, 0x78, 0xf8, 0x73, 0xe5, 0x6e, 0xee, 0x65, 0x37, 0xbc, 0x3c, 0xb7, 0x21, 0xaa, 0x2a, 0xa1, 0x1b, 0x90, 0x10, 0x9b, 0xd, 0x86, 0x6, 0x8d, 0x6f, 0xe4, 0x64, 0xef, 0x79, 0xf2, 0x72, 0xf9, 0x43, 0xc8, 0x48, 0xc3, 0x55, 0xde, 0x5e, 0xd5},
+ {0x0, 0x8c, 0x5, 0x89, 0xa, 0x86, 0xf, 0x83, 0x14, 0x98, 0x11, 0x9d, 0x1e, 0x92, 0x1b, 0x97, 0x28, 0xa4, 0x2d, 0xa1, 0x22, 0xae, 0x27, 0xab, 0x3c, 0xb0, 0x39, 0xb5, 0x36, 0xba, 0x33, 0xbf, 0x50, 0xdc, 0x55, 0xd9, 0x5a, 0xd6, 0x5f, 0xd3, 0x44, 0xc8, 0x41, 0xcd, 0x4e, 0xc2, 0x4b, 0xc7, 0x78, 0xf4, 0x7d, 0xf1, 0x72, 0xfe, 0x77, 0xfb, 0x6c, 0xe0, 0x69, 0xe5, 0x66, 0xea, 0x63, 0xef, 0xa0, 0x2c, 0xa5, 0x29, 0xaa, 0x26, 0xaf, 0x23, 0xb4, 0x38, 0xb1, 0x3d, 0xbe, 0x32, 0xbb, 0x37, 0x88, 0x4, 0x8d, 0x1, 0x82, 0xe, 0x87, 0xb, 0x9c, 0x10, 0x99, 0x15, 0x96, 0x1a, 0x93, 0x1f, 0xf0, 0x7c, 0xf5, 0x79, 0xfa, 0x76, 0xff, 0x73, 0xe4, 0x68, 0xe1, 0x6d, 0xee, 0x62, 0xeb, 0x67, 0xd8, 0x54, 0xdd, 0x51, 0xd2, 0x5e, 0xd7, 0x5b, 0xcc, 0x40, 0xc9, 0x45, 0xc6, 0x4a, 0xc3, 0x4f, 0x5d, 0xd1, 0x58, 0xd4, 0x57, 0xdb, 0x52, 0xde, 0x49, 0xc5, 0x4c, 0xc0, 0x43, 0xcf, 0x46, 0xca, 0x75, 0xf9, 0x70, 0xfc, 0x7f, 0xf3, 0x7a, 0xf6, 0x61, 0xed, 0x64, 0xe8, 0x6b, 0xe7, 0x6e, 0xe2, 0xd, 0x81, 0x8, 0x84, 0x7, 0x8b, 0x2, 0x8e, 0x19, 0x95, 0x1c, 0x90, 0x13, 0x9f, 0x16, 0x9a, 0x25, 0xa9, 0x20, 0xac, 0x2f, 0xa3, 0x2a, 0xa6, 0x31, 0xbd, 0x34, 0xb8, 0x3b, 0xb7, 0x3e, 0xb2, 0xfd, 0x71, 0xf8, 0x74, 0xf7, 0x7b, 0xf2, 0x7e, 0xe9, 0x65, 0xec, 0x60, 0xe3, 0x6f, 0xe6, 0x6a, 0xd5, 0x59, 0xd0, 0x5c, 0xdf, 0x53, 0xda, 0x56, 0xc1, 0x4d, 0xc4, 0x48, 0xcb, 0x47, 0xce, 0x42, 0xad, 0x21, 0xa8, 0x24, 0xa7, 0x2b, 0xa2, 0x2e, 0xb9, 0x35, 0xbc, 0x30, 0xb3, 0x3f, 0xb6, 0x3a, 0x85, 0x9, 0x80, 0xc, 0x8f, 0x3, 0x8a, 0x6, 0x91, 0x1d, 0x94, 0x18, 0x9b, 0x17, 0x9e, 0x12},
+ {0x0, 0x8d, 0x7, 0x8a, 0xe, 0x83, 0x9, 0x84, 0x1c, 0x91, 0x1b, 0x96, 0x12, 0x9f, 0x15, 0x98, 0x38, 0xb5, 0x3f, 0xb2, 0x36, 0xbb, 0x31, 0xbc, 0x24, 0xa9, 0x23, 0xae, 0x2a, 0xa7, 0x2d, 0xa0, 0x70, 0xfd, 0x77, 0xfa, 0x7e, 0xf3, 0x79, 0xf4, 0x6c, 0xe1, 0x6b, 0xe6, 0x62, 0xef, 0x65, 0xe8, 0x48, 0xc5, 0x4f, 0xc2, 0x46, 0xcb, 0x41, 0xcc, 0x54, 0xd9, 0x53, 0xde, 0x5a, 0xd7, 0x5d, 0xd0, 0xe0, 0x6d, 0xe7, 0x6a, 0xee, 0x63, 0xe9, 0x64, 0xfc, 0x71, 0xfb, 0x76, 0xf2, 0x7f, 0xf5, 0x78, 0xd8, 0x55, 0xdf, 0x52, 0xd6, 0x5b, 0xd1, 0x5c, 0xc4, 0x49, 0xc3, 0x4e, 0xca, 0x47, 0xcd, 0x40, 0x90, 0x1d, 0x97, 0x1a, 0x9e, 0x13, 0x99, 0x14, 0x8c, 0x1, 0x8b, 0x6, 0x82, 0xf, 0x85, 0x8, 0xa8, 0x25, 0xaf, 0x22, 0xa6, 0x2b, 0xa1, 0x2c, 0xb4, 0x39, 0xb3, 0x3e, 0xba, 0x37, 0xbd, 0x30, 0xdd, 0x50, 0xda, 0x57, 0xd3, 0x5e, 0xd4, 0x59, 0xc1, 0x4c, 0xc6, 0x4b, 0xcf, 0x42, 0xc8, 0x45, 0xe5, 0x68, 0xe2, 0x6f, 0xeb, 0x66, 0xec, 0x61, 0xf9, 0x74, 0xfe, 0x73, 0xf7, 0x7a, 0xf0, 0x7d, 0xad, 0x20, 0xaa, 0x27, 0xa3, 0x2e, 0xa4, 0x29, 0xb1, 0x3c, 0xb6, 0x3b, 0xbf, 0x32, 0xb8, 0x35, 0x95, 0x18, 0x92, 0x1f, 0x9b, 0x16, 0x9c, 0x11, 0x89, 0x4, 0x8e, 0x3, 0x87, 0xa, 0x80, 0xd, 0x3d, 0xb0, 0x3a, 0xb7, 0x33, 0xbe, 0x34, 0xb9, 0x21, 0xac, 0x26, 0xab, 0x2f, 0xa2, 0x28, 0xa5, 0x5, 0x88, 0x2, 0x8f, 0xb, 0x86, 0xc, 0x81, 0x19, 0x94, 0x1e, 0x93, 0x17, 0x9a, 0x10, 0x9d, 0x4d, 0xc0, 0x4a, 0xc7, 0x43, 0xce, 0x44, 0xc9, 0x51, 0xdc, 0x56, 0xdb, 0x5f, 0xd2, 0x58, 0xd5, 0x75, 0xf8, 0x72, 0xff, 0x7b, 0xf6, 0x7c, 0xf1, 0x69, 0xe4, 0x6e, 0xe3, 0x67, 0xea, 0x60, 0xed},
+ {0x0, 0x8e, 0x1, 0x8f, 0x2, 0x8c, 0x3, 0x8d, 0x4, 0x8a, 0x5, 0x8b, 0x6, 0x88, 0x7, 0x89, 0x8, 0x86, 0x9, 0x87, 0xa, 0x84, 0xb, 0x85, 0xc, 0x82, 0xd, 0x83, 0xe, 0x80, 0xf, 0x81, 0x10, 0x9e, 0x11, 0x9f, 0x12, 0x9c, 0x13, 0x9d, 0x14, 0x9a, 0x15, 0x9b, 0x16, 0x98, 0x17, 0x99, 0x18, 0x96, 0x19, 0x97, 0x1a, 0x94, 0x1b, 0x95, 0x1c, 0x92, 0x1d, 0x93, 0x1e, 0x90, 0x1f, 0x91, 0x20, 0xae, 0x21, 0xaf, 0x22, 0xac, 0x23, 0xad, 0x24, 0xaa, 0x25, 0xab, 0x26, 0xa8, 0x27, 0xa9, 0x28, 0xa6, 0x29, 0xa7, 0x2a, 0xa4, 0x2b, 0xa5, 0x2c, 0xa2, 0x2d, 0xa3, 0x2e, 0xa0, 0x2f, 0xa1, 0x30, 0xbe, 0x31, 0xbf, 0x32, 0xbc, 0x33, 0xbd, 0x34, 0xba, 0x35, 0xbb, 0x36, 0xb8, 0x37, 0xb9, 0x38, 0xb6, 0x39, 0xb7, 0x3a, 0xb4, 0x3b, 0xb5, 0x3c, 0xb2, 0x3d, 0xb3, 0x3e, 0xb0, 0x3f, 0xb1, 0x40, 0xce, 0x41, 0xcf, 0x42, 0xcc, 0x43, 0xcd, 0x44, 0xca, 0x45, 0xcb, 0x46, 0xc8, 0x47, 0xc9, 0x48, 0xc6, 0x49, 0xc7, 0x4a, 0xc4, 0x4b, 0xc5, 0x4c, 0xc2, 0x4d, 0xc3, 0x4e, 0xc0, 0x4f, 0xc1, 0x50, 0xde, 0x51, 0xdf, 0x52, 0xdc, 0x53, 0xdd, 0x54, 0xda, 0x55, 0xdb, 0x56, 0xd8, 0x57, 0xd9, 0x58, 0xd6, 0x59, 0xd7, 0x5a, 0xd4, 0x5b, 0xd5, 0x5c, 0xd2, 0x5d, 0xd3, 0x5e, 0xd0, 0x5f, 0xd1, 0x60, 0xee, 0x61, 0xef, 0x62, 0xec, 0x63, 0xed, 0x64, 0xea, 0x65, 0xeb, 0x66, 0xe8, 0x67, 0xe9, 0x68, 0xe6, 0x69, 0xe7, 0x6a, 0xe4, 0x6b, 0xe5, 0x6c, 0xe2, 0x6d, 0xe3, 0x6e, 0xe0, 0x6f, 0xe1, 0x70, 0xfe, 0x71, 0xff, 0x72, 0xfc, 0x73, 0xfd, 0x74, 0xfa, 0x75, 0xfb, 0x76, 0xf8, 0x77, 0xf9, 0x78, 0xf6, 0x79, 0xf7, 0x7a, 0xf4, 0x7b, 0xf5, 0x7c, 0xf2, 0x7d, 0xf3, 0x7e, 0xf0, 0x7f, 0xf1},
+ {0x0, 0x8f, 0x3, 0x8c, 0x6, 0x89, 0x5, 0x8a, 0xc, 0x83, 0xf, 0x80, 0xa, 0x85, 0x9, 0x86, 0x18, 0x97, 0x1b, 0x94, 0x1e, 0x91, 0x1d, 0x92, 0x14, 0x9b, 0x17, 0x98, 0x12, 0x9d, 0x11, 0x9e, 0x30, 0xbf, 0x33, 0xbc, 0x36, 0xb9, 0x35, 0xba, 0x3c, 0xb3, 0x3f, 0xb0, 0x3a, 0xb5, 0x39, 0xb6, 0x28, 0xa7, 0x2b, 0xa4, 0x2e, 0xa1, 0x2d, 0xa2, 0x24, 0xab, 0x27, 0xa8, 0x22, 0xad, 0x21, 0xae, 0x60, 0xef, 0x63, 0xec, 0x66, 0xe9, 0x65, 0xea, 0x6c, 0xe3, 0x6f, 0xe0, 0x6a, 0xe5, 0x69, 0xe6, 0x78, 0xf7, 0x7b, 0xf4, 0x7e, 0xf1, 0x7d, 0xf2, 0x74, 0xfb, 0x77, 0xf8, 0x72, 0xfd, 0x71, 0xfe, 0x50, 0xdf, 0x53, 0xdc, 0x56, 0xd9, 0x55, 0xda, 0x5c, 0xd3, 0x5f, 0xd0, 0x5a, 0xd5, 0x59, 0xd6, 0x48, 0xc7, 0x4b, 0xc4, 0x4e, 0xc1, 0x4d, 0xc2, 0x44, 0xcb, 0x47, 0xc8, 0x42, 0xcd, 0x41, 0xce, 0xc0, 0x4f, 0xc3, 0x4c, 0xc6, 0x49, 0xc5, 0x4a, 0xcc, 0x43, 0xcf, 0x40, 0xca, 0x45, 0xc9, 0x46, 0xd8, 0x57, 0xdb, 0x54, 0xde, 0x51, 0xdd, 0x52, 0xd4, 0x5b, 0xd7, 0x58, 0xd2, 0x5d, 0xd1, 0x5e, 0xf0, 0x7f, 0xf3, 0x7c, 0xf6, 0x79, 0xf5, 0x7a, 0xfc, 0x73, 0xff, 0x70, 0xfa, 0x75, 0xf9, 0x76, 0xe8, 0x67, 0xeb, 0x64, 0xee, 0x61, 0xed, 0x62, 0xe4, 0x6b, 0xe7, 0x68, 0xe2, 0x6d, 0xe1, 0x6e, 0xa0, 0x2f, 0xa3, 0x2c, 0xa6, 0x29, 0xa5, 0x2a, 0xac, 0x23, 0xaf, 0x20, 0xaa, 0x25, 0xa9, 0x26, 0xb8, 0x37, 0xbb, 0x34, 0xbe, 0x31, 0xbd, 0x32, 0xb4, 0x3b, 0xb7, 0x38, 0xb2, 0x3d, 0xb1, 0x3e, 0x90, 0x1f, 0x93, 0x1c, 0x96, 0x19, 0x95, 0x1a, 0x9c, 0x13, 0x9f, 0x10, 0x9a, 0x15, 0x99, 0x16, 0x88, 0x7, 0x8b, 0x4, 0x8e, 0x1, 0x8d, 0x2, 0x84, 0xb, 0x87, 0x8, 0x82, 0xd, 0x81, 0xe},
+ {0x0, 0x90, 0x3d, 0xad, 0x7a, 0xea, 0x47, 0xd7, 0xf4, 0x64, 0xc9, 0x59, 0x8e, 0x1e, 0xb3, 0x23, 0xf5, 0x65, 0xc8, 0x58, 0x8f, 0x1f, 0xb2, 0x22, 0x1, 0x91, 0x3c, 0xac, 0x7b, 0xeb, 0x46, 0xd6, 0xf7, 0x67, 0xca, 0x5a, 0x8d, 0x1d, 0xb0, 0x20, 0x3, 0x93, 0x3e, 0xae, 0x79, 0xe9, 0x44, 0xd4, 0x2, 0x92, 0x3f, 0xaf, 0x78, 0xe8, 0x45, 0xd5, 0xf6, 0x66, 0xcb, 0x5b, 0x8c, 0x1c, 0xb1, 0x21, 0xf3, 0x63, 0xce, 0x5e, 0x89, 0x19, 0xb4, 0x24, 0x7, 0x97, 0x3a, 0xaa, 0x7d, 0xed, 0x40, 0xd0, 0x6, 0x96, 0x3b, 0xab, 0x7c, 0xec, 0x41, 0xd1, 0xf2, 0x62, 0xcf, 0x5f, 0x88, 0x18, 0xb5, 0x25, 0x4, 0x94, 0x39, 0xa9, 0x7e, 0xee, 0x43, 0xd3, 0xf0, 0x60, 0xcd, 0x5d, 0x8a, 0x1a, 0xb7, 0x27, 0xf1, 0x61, 0xcc, 0x5c, 0x8b, 0x1b, 0xb6, 0x26, 0x5, 0x95, 0x38, 0xa8, 0x7f, 0xef, 0x42, 0xd2, 0xfb, 0x6b, 0xc6, 0x56, 0x81, 0x11, 0xbc, 0x2c, 0xf, 0x9f, 0x32, 0xa2, 0x75, 0xe5, 0x48, 0xd8, 0xe, 0x9e, 0x33, 0xa3, 0x74, 0xe4, 0x49, 0xd9, 0xfa, 0x6a, 0xc7, 0x57, 0x80, 0x10, 0xbd, 0x2d, 0xc, 0x9c, 0x31, 0xa1, 0x76, 0xe6, 0x4b, 0xdb, 0xf8, 0x68, 0xc5, 0x55, 0x82, 0x12, 0xbf, 0x2f, 0xf9, 0x69, 0xc4, 0x54, 0x83, 0x13, 0xbe, 0x2e, 0xd, 0x9d, 0x30, 0xa0, 0x77, 0xe7, 0x4a, 0xda, 0x8, 0x98, 0x35, 0xa5, 0x72, 0xe2, 0x4f, 0xdf, 0xfc, 0x6c, 0xc1, 0x51, 0x86, 0x16, 0xbb, 0x2b, 0xfd, 0x6d, 0xc0, 0x50, 0x87, 0x17, 0xba, 0x2a, 0x9, 0x99, 0x34, 0xa4, 0x73, 0xe3, 0x4e, 0xde, 0xff, 0x6f, 0xc2, 0x52, 0x85, 0x15, 0xb8, 0x28, 0xb, 0x9b, 0x36, 0xa6, 0x71, 0xe1, 0x4c, 0xdc, 0xa, 0x9a, 0x37, 0xa7, 0x70, 0xe0, 0x4d, 0xdd, 0xfe, 0x6e, 0xc3, 0x53, 0x84, 0x14, 0xb9, 0x29},
+ {0x0, 0x91, 0x3f, 0xae, 0x7e, 0xef, 0x41, 0xd0, 0xfc, 0x6d, 0xc3, 0x52, 0x82, 0x13, 0xbd, 0x2c, 0xe5, 0x74, 0xda, 0x4b, 0x9b, 0xa, 0xa4, 0x35, 0x19, 0x88, 0x26, 0xb7, 0x67, 0xf6, 0x58, 0xc9, 0xd7, 0x46, 0xe8, 0x79, 0xa9, 0x38, 0x96, 0x7, 0x2b, 0xba, 0x14, 0x85, 0x55, 0xc4, 0x6a, 0xfb, 0x32, 0xa3, 0xd, 0x9c, 0x4c, 0xdd, 0x73, 0xe2, 0xce, 0x5f, 0xf1, 0x60, 0xb0, 0x21, 0x8f, 0x1e, 0xb3, 0x22, 0x8c, 0x1d, 0xcd, 0x5c, 0xf2, 0x63, 0x4f, 0xde, 0x70, 0xe1, 0x31, 0xa0, 0xe, 0x9f, 0x56, 0xc7, 0x69, 0xf8, 0x28, 0xb9, 0x17, 0x86, 0xaa, 0x3b, 0x95, 0x4, 0xd4, 0x45, 0xeb, 0x7a, 0x64, 0xf5, 0x5b, 0xca, 0x1a, 0x8b, 0x25, 0xb4, 0x98, 0x9, 0xa7, 0x36, 0xe6, 0x77, 0xd9, 0x48, 0x81, 0x10, 0xbe, 0x2f, 0xff, 0x6e, 0xc0, 0x51, 0x7d, 0xec, 0x42, 0xd3, 0x3, 0x92, 0x3c, 0xad, 0x7b, 0xea, 0x44, 0xd5, 0x5, 0x94, 0x3a, 0xab, 0x87, 0x16, 0xb8, 0x29, 0xf9, 0x68, 0xc6, 0x57, 0x9e, 0xf, 0xa1, 0x30, 0xe0, 0x71, 0xdf, 0x4e, 0x62, 0xf3, 0x5d, 0xcc, 0x1c, 0x8d, 0x23, 0xb2, 0xac, 0x3d, 0x93, 0x2, 0xd2, 0x43, 0xed, 0x7c, 0x50, 0xc1, 0x6f, 0xfe, 0x2e, 0xbf, 0x11, 0x80, 0x49, 0xd8, 0x76, 0xe7, 0x37, 0xa6, 0x8, 0x99, 0xb5, 0x24, 0x8a, 0x1b, 0xcb, 0x5a, 0xf4, 0x65, 0xc8, 0x59, 0xf7, 0x66, 0xb6, 0x27, 0x89, 0x18, 0x34, 0xa5, 0xb, 0x9a, 0x4a, 0xdb, 0x75, 0xe4, 0x2d, 0xbc, 0x12, 0x83, 0x53, 0xc2, 0x6c, 0xfd, 0xd1, 0x40, 0xee, 0x7f, 0xaf, 0x3e, 0x90, 0x1, 0x1f, 0x8e, 0x20, 0xb1, 0x61, 0xf0, 0x5e, 0xcf, 0xe3, 0x72, 0xdc, 0x4d, 0x9d, 0xc, 0xa2, 0x33, 0xfa, 0x6b, 0xc5, 0x54, 0x84, 0x15, 0xbb, 0x2a, 0x6, 0x97, 0x39, 0xa8, 0x78, 0xe9, 0x47, 0xd6},
+ {0x0, 0x92, 0x39, 0xab, 0x72, 0xe0, 0x4b, 0xd9, 0xe4, 0x76, 0xdd, 0x4f, 0x96, 0x4, 0xaf, 0x3d, 0xd5, 0x47, 0xec, 0x7e, 0xa7, 0x35, 0x9e, 0xc, 0x31, 0xa3, 0x8, 0x9a, 0x43, 0xd1, 0x7a, 0xe8, 0xb7, 0x25, 0x8e, 0x1c, 0xc5, 0x57, 0xfc, 0x6e, 0x53, 0xc1, 0x6a, 0xf8, 0x21, 0xb3, 0x18, 0x8a, 0x62, 0xf0, 0x5b, 0xc9, 0x10, 0x82, 0x29, 0xbb, 0x86, 0x14, 0xbf, 0x2d, 0xf4, 0x66, 0xcd, 0x5f, 0x73, 0xe1, 0x4a, 0xd8, 0x1, 0x93, 0x38, 0xaa, 0x97, 0x5, 0xae, 0x3c, 0xe5, 0x77, 0xdc, 0x4e, 0xa6, 0x34, 0x9f, 0xd, 0xd4, 0x46, 0xed, 0x7f, 0x42, 0xd0, 0x7b, 0xe9, 0x30, 0xa2, 0x9, 0x9b, 0xc4, 0x56, 0xfd, 0x6f, 0xb6, 0x24, 0x8f, 0x1d, 0x20, 0xb2, 0x19, 0x8b, 0x52, 0xc0, 0x6b, 0xf9, 0x11, 0x83, 0x28, 0xba, 0x63, 0xf1, 0x5a, 0xc8, 0xf5, 0x67, 0xcc, 0x5e, 0x87, 0x15, 0xbe, 0x2c, 0xe6, 0x74, 0xdf, 0x4d, 0x94, 0x6, 0xad, 0x3f, 0x2, 0x90, 0x3b, 0xa9, 0x70, 0xe2, 0x49, 0xdb, 0x33, 0xa1, 0xa, 0x98, 0x41, 0xd3, 0x78, 0xea, 0xd7, 0x45, 0xee, 0x7c, 0xa5, 0x37, 0x9c, 0xe, 0x51, 0xc3, 0x68, 0xfa, 0x23, 0xb1, 0x1a, 0x88, 0xb5, 0x27, 0x8c, 0x1e, 0xc7, 0x55, 0xfe, 0x6c, 0x84, 0x16, 0xbd, 0x2f, 0xf6, 0x64, 0xcf, 0x5d, 0x60, 0xf2, 0x59, 0xcb, 0x12, 0x80, 0x2b, 0xb9, 0x95, 0x7, 0xac, 0x3e, 0xe7, 0x75, 0xde, 0x4c, 0x71, 0xe3, 0x48, 0xda, 0x3, 0x91, 0x3a, 0xa8, 0x40, 0xd2, 0x79, 0xeb, 0x32, 0xa0, 0xb, 0x99, 0xa4, 0x36, 0x9d, 0xf, 0xd6, 0x44, 0xef, 0x7d, 0x22, 0xb0, 0x1b, 0x89, 0x50, 0xc2, 0x69, 0xfb, 0xc6, 0x54, 0xff, 0x6d, 0xb4, 0x26, 0x8d, 0x1f, 0xf7, 0x65, 0xce, 0x5c, 0x85, 0x17, 0xbc, 0x2e, 0x13, 0x81, 0x2a, 0xb8, 0x61, 0xf3, 0x58, 0xca},
+ {0x0, 0x93, 0x3b, 0xa8, 0x76, 0xe5, 0x4d, 0xde, 0xec, 0x7f, 0xd7, 0x44, 0x9a, 0x9, 0xa1, 0x32, 0xc5, 0x56, 0xfe, 0x6d, 0xb3, 0x20, 0x88, 0x1b, 0x29, 0xba, 0x12, 0x81, 0x5f, 0xcc, 0x64, 0xf7, 0x97, 0x4, 0xac, 0x3f, 0xe1, 0x72, 0xda, 0x49, 0x7b, 0xe8, 0x40, 0xd3, 0xd, 0x9e, 0x36, 0xa5, 0x52, 0xc1, 0x69, 0xfa, 0x24, 0xb7, 0x1f, 0x8c, 0xbe, 0x2d, 0x85, 0x16, 0xc8, 0x5b, 0xf3, 0x60, 0x33, 0xa0, 0x8, 0x9b, 0x45, 0xd6, 0x7e, 0xed, 0xdf, 0x4c, 0xe4, 0x77, 0xa9, 0x3a, 0x92, 0x1, 0xf6, 0x65, 0xcd, 0x5e, 0x80, 0x13, 0xbb, 0x28, 0x1a, 0x89, 0x21, 0xb2, 0x6c, 0xff, 0x57, 0xc4, 0xa4, 0x37, 0x9f, 0xc, 0xd2, 0x41, 0xe9, 0x7a, 0x48, 0xdb, 0x73, 0xe0, 0x3e, 0xad, 0x5, 0x96, 0x61, 0xf2, 0x5a, 0xc9, 0x17, 0x84, 0x2c, 0xbf, 0x8d, 0x1e, 0xb6, 0x25, 0xfb, 0x68, 0xc0, 0x53, 0x66, 0xf5, 0x5d, 0xce, 0x10, 0x83, 0x2b, 0xb8, 0x8a, 0x19, 0xb1, 0x22, 0xfc, 0x6f, 0xc7, 0x54, 0xa3, 0x30, 0x98, 0xb, 0xd5, 0x46, 0xee, 0x7d, 0x4f, 0xdc, 0x74, 0xe7, 0x39, 0xaa, 0x2, 0x91, 0xf1, 0x62, 0xca, 0x59, 0x87, 0x14, 0xbc, 0x2f, 0x1d, 0x8e, 0x26, 0xb5, 0x6b, 0xf8, 0x50, 0xc3, 0x34, 0xa7, 0xf, 0x9c, 0x42, 0xd1, 0x79, 0xea, 0xd8, 0x4b, 0xe3, 0x70, 0xae, 0x3d, 0x95, 0x6, 0x55, 0xc6, 0x6e, 0xfd, 0x23, 0xb0, 0x18, 0x8b, 0xb9, 0x2a, 0x82, 0x11, 0xcf, 0x5c, 0xf4, 0x67, 0x90, 0x3, 0xab, 0x38, 0xe6, 0x75, 0xdd, 0x4e, 0x7c, 0xef, 0x47, 0xd4, 0xa, 0x99, 0x31, 0xa2, 0xc2, 0x51, 0xf9, 0x6a, 0xb4, 0x27, 0x8f, 0x1c, 0x2e, 0xbd, 0x15, 0x86, 0x58, 0xcb, 0x63, 0xf0, 0x7, 0x94, 0x3c, 0xaf, 0x71, 0xe2, 0x4a, 0xd9, 0xeb, 0x78, 0xd0, 0x43, 0x9d, 0xe, 0xa6, 0x35},
+ {0x0, 0x94, 0x35, 0xa1, 0x6a, 0xfe, 0x5f, 0xcb, 0xd4, 0x40, 0xe1, 0x75, 0xbe, 0x2a, 0x8b, 0x1f, 0xb5, 0x21, 0x80, 0x14, 0xdf, 0x4b, 0xea, 0x7e, 0x61, 0xf5, 0x54, 0xc0, 0xb, 0x9f, 0x3e, 0xaa, 0x77, 0xe3, 0x42, 0xd6, 0x1d, 0x89, 0x28, 0xbc, 0xa3, 0x37, 0x96, 0x2, 0xc9, 0x5d, 0xfc, 0x68, 0xc2, 0x56, 0xf7, 0x63, 0xa8, 0x3c, 0x9d, 0x9, 0x16, 0x82, 0x23, 0xb7, 0x7c, 0xe8, 0x49, 0xdd, 0xee, 0x7a, 0xdb, 0x4f, 0x84, 0x10, 0xb1, 0x25, 0x3a, 0xae, 0xf, 0x9b, 0x50, 0xc4, 0x65, 0xf1, 0x5b, 0xcf, 0x6e, 0xfa, 0x31, 0xa5, 0x4, 0x90, 0x8f, 0x1b, 0xba, 0x2e, 0xe5, 0x71, 0xd0, 0x44, 0x99, 0xd, 0xac, 0x38, 0xf3, 0x67, 0xc6, 0x52, 0x4d, 0xd9, 0x78, 0xec, 0x27, 0xb3, 0x12, 0x86, 0x2c, 0xb8, 0x19, 0x8d, 0x46, 0xd2, 0x73, 0xe7, 0xf8, 0x6c, 0xcd, 0x59, 0x92, 0x6, 0xa7, 0x33, 0xc1, 0x55, 0xf4, 0x60, 0xab, 0x3f, 0x9e, 0xa, 0x15, 0x81, 0x20, 0xb4, 0x7f, 0xeb, 0x4a, 0xde, 0x74, 0xe0, 0x41, 0xd5, 0x1e, 0x8a, 0x2b, 0xbf, 0xa0, 0x34, 0x95, 0x1, 0xca, 0x5e, 0xff, 0x6b, 0xb6, 0x22, 0x83, 0x17, 0xdc, 0x48, 0xe9, 0x7d, 0x62, 0xf6, 0x57, 0xc3, 0x8, 0x9c, 0x3d, 0xa9, 0x3, 0x97, 0x36, 0xa2, 0x69, 0xfd, 0x5c, 0xc8, 0xd7, 0x43, 0xe2, 0x76, 0xbd, 0x29, 0x88, 0x1c, 0x2f, 0xbb, 0x1a, 0x8e, 0x45, 0xd1, 0x70, 0xe4, 0xfb, 0x6f, 0xce, 0x5a, 0x91, 0x5, 0xa4, 0x30, 0x9a, 0xe, 0xaf, 0x3b, 0xf0, 0x64, 0xc5, 0x51, 0x4e, 0xda, 0x7b, 0xef, 0x24, 0xb0, 0x11, 0x85, 0x58, 0xcc, 0x6d, 0xf9, 0x32, 0xa6, 0x7, 0x93, 0x8c, 0x18, 0xb9, 0x2d, 0xe6, 0x72, 0xd3, 0x47, 0xed, 0x79, 0xd8, 0x4c, 0x87, 0x13, 0xb2, 0x26, 0x39, 0xad, 0xc, 0x98, 0x53, 0xc7, 0x66, 0xf2},
+ {0x0, 0x95, 0x37, 0xa2, 0x6e, 0xfb, 0x59, 0xcc, 0xdc, 0x49, 0xeb, 0x7e, 0xb2, 0x27, 0x85, 0x10, 0xa5, 0x30, 0x92, 0x7, 0xcb, 0x5e, 0xfc, 0x69, 0x79, 0xec, 0x4e, 0xdb, 0x17, 0x82, 0x20, 0xb5, 0x57, 0xc2, 0x60, 0xf5, 0x39, 0xac, 0xe, 0x9b, 0x8b, 0x1e, 0xbc, 0x29, 0xe5, 0x70, 0xd2, 0x47, 0xf2, 0x67, 0xc5, 0x50, 0x9c, 0x9, 0xab, 0x3e, 0x2e, 0xbb, 0x19, 0x8c, 0x40, 0xd5, 0x77, 0xe2, 0xae, 0x3b, 0x99, 0xc, 0xc0, 0x55, 0xf7, 0x62, 0x72, 0xe7, 0x45, 0xd0, 0x1c, 0x89, 0x2b, 0xbe, 0xb, 0x9e, 0x3c, 0xa9, 0x65, 0xf0, 0x52, 0xc7, 0xd7, 0x42, 0xe0, 0x75, 0xb9, 0x2c, 0x8e, 0x1b, 0xf9, 0x6c, 0xce, 0x5b, 0x97, 0x2, 0xa0, 0x35, 0x25, 0xb0, 0x12, 0x87, 0x4b, 0xde, 0x7c, 0xe9, 0x5c, 0xc9, 0x6b, 0xfe, 0x32, 0xa7, 0x5, 0x90, 0x80, 0x15, 0xb7, 0x22, 0xee, 0x7b, 0xd9, 0x4c, 0x41, 0xd4, 0x76, 0xe3, 0x2f, 0xba, 0x18, 0x8d, 0x9d, 0x8, 0xaa, 0x3f, 0xf3, 0x66, 0xc4, 0x51, 0xe4, 0x71, 0xd3, 0x46, 0x8a, 0x1f, 0xbd, 0x28, 0x38, 0xad, 0xf, 0x9a, 0x56, 0xc3, 0x61, 0xf4, 0x16, 0x83, 0x21, 0xb4, 0x78, 0xed, 0x4f, 0xda, 0xca, 0x5f, 0xfd, 0x68, 0xa4, 0x31, 0x93, 0x6, 0xb3, 0x26, 0x84, 0x11, 0xdd, 0x48, 0xea, 0x7f, 0x6f, 0xfa, 0x58, 0xcd, 0x1, 0x94, 0x36, 0xa3, 0xef, 0x7a, 0xd8, 0x4d, 0x81, 0x14, 0xb6, 0x23, 0x33, 0xa6, 0x4, 0x91, 0x5d, 0xc8, 0x6a, 0xff, 0x4a, 0xdf, 0x7d, 0xe8, 0x24, 0xb1, 0x13, 0x86, 0x96, 0x3, 0xa1, 0x34, 0xf8, 0x6d, 0xcf, 0x5a, 0xb8, 0x2d, 0x8f, 0x1a, 0xd6, 0x43, 0xe1, 0x74, 0x64, 0xf1, 0x53, 0xc6, 0xa, 0x9f, 0x3d, 0xa8, 0x1d, 0x88, 0x2a, 0xbf, 0x73, 0xe6, 0x44, 0xd1, 0xc1, 0x54, 0xf6, 0x63, 0xaf, 0x3a, 0x98, 0xd},
+ {0x0, 0x96, 0x31, 0xa7, 0x62, 0xf4, 0x53, 0xc5, 0xc4, 0x52, 0xf5, 0x63, 0xa6, 0x30, 0x97, 0x1, 0x95, 0x3, 0xa4, 0x32, 0xf7, 0x61, 0xc6, 0x50, 0x51, 0xc7, 0x60, 0xf6, 0x33, 0xa5, 0x2, 0x94, 0x37, 0xa1, 0x6, 0x90, 0x55, 0xc3, 0x64, 0xf2, 0xf3, 0x65, 0xc2, 0x54, 0x91, 0x7, 0xa0, 0x36, 0xa2, 0x34, 0x93, 0x5, 0xc0, 0x56, 0xf1, 0x67, 0x66, 0xf0, 0x57, 0xc1, 0x4, 0x92, 0x35, 0xa3, 0x6e, 0xf8, 0x5f, 0xc9, 0xc, 0x9a, 0x3d, 0xab, 0xaa, 0x3c, 0x9b, 0xd, 0xc8, 0x5e, 0xf9, 0x6f, 0xfb, 0x6d, 0xca, 0x5c, 0x99, 0xf, 0xa8, 0x3e, 0x3f, 0xa9, 0xe, 0x98, 0x5d, 0xcb, 0x6c, 0xfa, 0x59, 0xcf, 0x68, 0xfe, 0x3b, 0xad, 0xa, 0x9c, 0x9d, 0xb, 0xac, 0x3a, 0xff, 0x69, 0xce, 0x58, 0xcc, 0x5a, 0xfd, 0x6b, 0xae, 0x38, 0x9f, 0x9, 0x8, 0x9e, 0x39, 0xaf, 0x6a, 0xfc, 0x5b, 0xcd, 0xdc, 0x4a, 0xed, 0x7b, 0xbe, 0x28, 0x8f, 0x19, 0x18, 0x8e, 0x29, 0xbf, 0x7a, 0xec, 0x4b, 0xdd, 0x49, 0xdf, 0x78, 0xee, 0x2b, 0xbd, 0x1a, 0x8c, 0x8d, 0x1b, 0xbc, 0x2a, 0xef, 0x79, 0xde, 0x48, 0xeb, 0x7d, 0xda, 0x4c, 0x89, 0x1f, 0xb8, 0x2e, 0x2f, 0xb9, 0x1e, 0x88, 0x4d, 0xdb, 0x7c, 0xea, 0x7e, 0xe8, 0x4f, 0xd9, 0x1c, 0x8a, 0x2d, 0xbb, 0xba, 0x2c, 0x8b, 0x1d, 0xd8, 0x4e, 0xe9, 0x7f, 0xb2, 0x24, 0x83, 0x15, 0xd0, 0x46, 0xe1, 0x77, 0x76, 0xe0, 0x47, 0xd1, 0x14, 0x82, 0x25, 0xb3, 0x27, 0xb1, 0x16, 0x80, 0x45, 0xd3, 0x74, 0xe2, 0xe3, 0x75, 0xd2, 0x44, 0x81, 0x17, 0xb0, 0x26, 0x85, 0x13, 0xb4, 0x22, 0xe7, 0x71, 0xd6, 0x40, 0x41, 0xd7, 0x70, 0xe6, 0x23, 0xb5, 0x12, 0x84, 0x10, 0x86, 0x21, 0xb7, 0x72, 0xe4, 0x43, 0xd5, 0xd4, 0x42, 0xe5, 0x73, 0xb6, 0x20, 0x87, 0x11},
+ {0x0, 0x97, 0x33, 0xa4, 0x66, 0xf1, 0x55, 0xc2, 0xcc, 0x5b, 0xff, 0x68, 0xaa, 0x3d, 0x99, 0xe, 0x85, 0x12, 0xb6, 0x21, 0xe3, 0x74, 0xd0, 0x47, 0x49, 0xde, 0x7a, 0xed, 0x2f, 0xb8, 0x1c, 0x8b, 0x17, 0x80, 0x24, 0xb3, 0x71, 0xe6, 0x42, 0xd5, 0xdb, 0x4c, 0xe8, 0x7f, 0xbd, 0x2a, 0x8e, 0x19, 0x92, 0x5, 0xa1, 0x36, 0xf4, 0x63, 0xc7, 0x50, 0x5e, 0xc9, 0x6d, 0xfa, 0x38, 0xaf, 0xb, 0x9c, 0x2e, 0xb9, 0x1d, 0x8a, 0x48, 0xdf, 0x7b, 0xec, 0xe2, 0x75, 0xd1, 0x46, 0x84, 0x13, 0xb7, 0x20, 0xab, 0x3c, 0x98, 0xf, 0xcd, 0x5a, 0xfe, 0x69, 0x67, 0xf0, 0x54, 0xc3, 0x1, 0x96, 0x32, 0xa5, 0x39, 0xae, 0xa, 0x9d, 0x5f, 0xc8, 0x6c, 0xfb, 0xf5, 0x62, 0xc6, 0x51, 0x93, 0x4, 0xa0, 0x37, 0xbc, 0x2b, 0x8f, 0x18, 0xda, 0x4d, 0xe9, 0x7e, 0x70, 0xe7, 0x43, 0xd4, 0x16, 0x81, 0x25, 0xb2, 0x5c, 0xcb, 0x6f, 0xf8, 0x3a, 0xad, 0x9, 0x9e, 0x90, 0x7, 0xa3, 0x34, 0xf6, 0x61, 0xc5, 0x52, 0xd9, 0x4e, 0xea, 0x7d, 0xbf, 0x28, 0x8c, 0x1b, 0x15, 0x82, 0x26, 0xb1, 0x73, 0xe4, 0x40, 0xd7, 0x4b, 0xdc, 0x78, 0xef, 0x2d, 0xba, 0x1e, 0x89, 0x87, 0x10, 0xb4, 0x23, 0xe1, 0x76, 0xd2, 0x45, 0xce, 0x59, 0xfd, 0x6a, 0xa8, 0x3f, 0x9b, 0xc, 0x2, 0x95, 0x31, 0xa6, 0x64, 0xf3, 0x57, 0xc0, 0x72, 0xe5, 0x41, 0xd6, 0x14, 0x83, 0x27, 0xb0, 0xbe, 0x29, 0x8d, 0x1a, 0xd8, 0x4f, 0xeb, 0x7c, 0xf7, 0x60, 0xc4, 0x53, 0x91, 0x6, 0xa2, 0x35, 0x3b, 0xac, 0x8, 0x9f, 0x5d, 0xca, 0x6e, 0xf9, 0x65, 0xf2, 0x56, 0xc1, 0x3, 0x94, 0x30, 0xa7, 0xa9, 0x3e, 0x9a, 0xd, 0xcf, 0x58, 0xfc, 0x6b, 0xe0, 0x77, 0xd3, 0x44, 0x86, 0x11, 0xb5, 0x22, 0x2c, 0xbb, 0x1f, 0x88, 0x4a, 0xdd, 0x79, 0xee},
+ {0x0, 0x98, 0x2d, 0xb5, 0x5a, 0xc2, 0x77, 0xef, 0xb4, 0x2c, 0x99, 0x1, 0xee, 0x76, 0xc3, 0x5b, 0x75, 0xed, 0x58, 0xc0, 0x2f, 0xb7, 0x2, 0x9a, 0xc1, 0x59, 0xec, 0x74, 0x9b, 0x3, 0xb6, 0x2e, 0xea, 0x72, 0xc7, 0x5f, 0xb0, 0x28, 0x9d, 0x5, 0x5e, 0xc6, 0x73, 0xeb, 0x4, 0x9c, 0x29, 0xb1, 0x9f, 0x7, 0xb2, 0x2a, 0xc5, 0x5d, 0xe8, 0x70, 0x2b, 0xb3, 0x6, 0x9e, 0x71, 0xe9, 0x5c, 0xc4, 0xc9, 0x51, 0xe4, 0x7c, 0x93, 0xb, 0xbe, 0x26, 0x7d, 0xe5, 0x50, 0xc8, 0x27, 0xbf, 0xa, 0x92, 0xbc, 0x24, 0x91, 0x9, 0xe6, 0x7e, 0xcb, 0x53, 0x8, 0x90, 0x25, 0xbd, 0x52, 0xca, 0x7f, 0xe7, 0x23, 0xbb, 0xe, 0x96, 0x79, 0xe1, 0x54, 0xcc, 0x97, 0xf, 0xba, 0x22, 0xcd, 0x55, 0xe0, 0x78, 0x56, 0xce, 0x7b, 0xe3, 0xc, 0x94, 0x21, 0xb9, 0xe2, 0x7a, 0xcf, 0x57, 0xb8, 0x20, 0x95, 0xd, 0x8f, 0x17, 0xa2, 0x3a, 0xd5, 0x4d, 0xf8, 0x60, 0x3b, 0xa3, 0x16, 0x8e, 0x61, 0xf9, 0x4c, 0xd4, 0xfa, 0x62, 0xd7, 0x4f, 0xa0, 0x38, 0x8d, 0x15, 0x4e, 0xd6, 0x63, 0xfb, 0x14, 0x8c, 0x39, 0xa1, 0x65, 0xfd, 0x48, 0xd0, 0x3f, 0xa7, 0x12, 0x8a, 0xd1, 0x49, 0xfc, 0x64, 0x8b, 0x13, 0xa6, 0x3e, 0x10, 0x88, 0x3d, 0xa5, 0x4a, 0xd2, 0x67, 0xff, 0xa4, 0x3c, 0x89, 0x11, 0xfe, 0x66, 0xd3, 0x4b, 0x46, 0xde, 0x6b, 0xf3, 0x1c, 0x84, 0x31, 0xa9, 0xf2, 0x6a, 0xdf, 0x47, 0xa8, 0x30, 0x85, 0x1d, 0x33, 0xab, 0x1e, 0x86, 0x69, 0xf1, 0x44, 0xdc, 0x87, 0x1f, 0xaa, 0x32, 0xdd, 0x45, 0xf0, 0x68, 0xac, 0x34, 0x81, 0x19, 0xf6, 0x6e, 0xdb, 0x43, 0x18, 0x80, 0x35, 0xad, 0x42, 0xda, 0x6f, 0xf7, 0xd9, 0x41, 0xf4, 0x6c, 0x83, 0x1b, 0xae, 0x36, 0x6d, 0xf5, 0x40, 0xd8, 0x37, 0xaf, 0x1a, 0x82},
+ {0x0, 0x99, 0x2f, 0xb6, 0x5e, 0xc7, 0x71, 0xe8, 0xbc, 0x25, 0x93, 0xa, 0xe2, 0x7b, 0xcd, 0x54, 0x65, 0xfc, 0x4a, 0xd3, 0x3b, 0xa2, 0x14, 0x8d, 0xd9, 0x40, 0xf6, 0x6f, 0x87, 0x1e, 0xa8, 0x31, 0xca, 0x53, 0xe5, 0x7c, 0x94, 0xd, 0xbb, 0x22, 0x76, 0xef, 0x59, 0xc0, 0x28, 0xb1, 0x7, 0x9e, 0xaf, 0x36, 0x80, 0x19, 0xf1, 0x68, 0xde, 0x47, 0x13, 0x8a, 0x3c, 0xa5, 0x4d, 0xd4, 0x62, 0xfb, 0x89, 0x10, 0xa6, 0x3f, 0xd7, 0x4e, 0xf8, 0x61, 0x35, 0xac, 0x1a, 0x83, 0x6b, 0xf2, 0x44, 0xdd, 0xec, 0x75, 0xc3, 0x5a, 0xb2, 0x2b, 0x9d, 0x4, 0x50, 0xc9, 0x7f, 0xe6, 0xe, 0x97, 0x21, 0xb8, 0x43, 0xda, 0x6c, 0xf5, 0x1d, 0x84, 0x32, 0xab, 0xff, 0x66, 0xd0, 0x49, 0xa1, 0x38, 0x8e, 0x17, 0x26, 0xbf, 0x9, 0x90, 0x78, 0xe1, 0x57, 0xce, 0x9a, 0x3, 0xb5, 0x2c, 0xc4, 0x5d, 0xeb, 0x72, 0xf, 0x96, 0x20, 0xb9, 0x51, 0xc8, 0x7e, 0xe7, 0xb3, 0x2a, 0x9c, 0x5, 0xed, 0x74, 0xc2, 0x5b, 0x6a, 0xf3, 0x45, 0xdc, 0x34, 0xad, 0x1b, 0x82, 0xd6, 0x4f, 0xf9, 0x60, 0x88, 0x11, 0xa7, 0x3e, 0xc5, 0x5c, 0xea, 0x73, 0x9b, 0x2, 0xb4, 0x2d, 0x79, 0xe0, 0x56, 0xcf, 0x27, 0xbe, 0x8, 0x91, 0xa0, 0x39, 0x8f, 0x16, 0xfe, 0x67, 0xd1, 0x48, 0x1c, 0x85, 0x33, 0xaa, 0x42, 0xdb, 0x6d, 0xf4, 0x86, 0x1f, 0xa9, 0x30, 0xd8, 0x41, 0xf7, 0x6e, 0x3a, 0xa3, 0x15, 0x8c, 0x64, 0xfd, 0x4b, 0xd2, 0xe3, 0x7a, 0xcc, 0x55, 0xbd, 0x24, 0x92, 0xb, 0x5f, 0xc6, 0x70, 0xe9, 0x1, 0x98, 0x2e, 0xb7, 0x4c, 0xd5, 0x63, 0xfa, 0x12, 0x8b, 0x3d, 0xa4, 0xf0, 0x69, 0xdf, 0x46, 0xae, 0x37, 0x81, 0x18, 0x29, 0xb0, 0x6, 0x9f, 0x77, 0xee, 0x58, 0xc1, 0x95, 0xc, 0xba, 0x23, 0xcb, 0x52, 0xe4, 0x7d},
+ {0x0, 0x9a, 0x29, 0xb3, 0x52, 0xc8, 0x7b, 0xe1, 0xa4, 0x3e, 0x8d, 0x17, 0xf6, 0x6c, 0xdf, 0x45, 0x55, 0xcf, 0x7c, 0xe6, 0x7, 0x9d, 0x2e, 0xb4, 0xf1, 0x6b, 0xd8, 0x42, 0xa3, 0x39, 0x8a, 0x10, 0xaa, 0x30, 0x83, 0x19, 0xf8, 0x62, 0xd1, 0x4b, 0xe, 0x94, 0x27, 0xbd, 0x5c, 0xc6, 0x75, 0xef, 0xff, 0x65, 0xd6, 0x4c, 0xad, 0x37, 0x84, 0x1e, 0x5b, 0xc1, 0x72, 0xe8, 0x9, 0x93, 0x20, 0xba, 0x49, 0xd3, 0x60, 0xfa, 0x1b, 0x81, 0x32, 0xa8, 0xed, 0x77, 0xc4, 0x5e, 0xbf, 0x25, 0x96, 0xc, 0x1c, 0x86, 0x35, 0xaf, 0x4e, 0xd4, 0x67, 0xfd, 0xb8, 0x22, 0x91, 0xb, 0xea, 0x70, 0xc3, 0x59, 0xe3, 0x79, 0xca, 0x50, 0xb1, 0x2b, 0x98, 0x2, 0x47, 0xdd, 0x6e, 0xf4, 0x15, 0x8f, 0x3c, 0xa6, 0xb6, 0x2c, 0x9f, 0x5, 0xe4, 0x7e, 0xcd, 0x57, 0x12, 0x88, 0x3b, 0xa1, 0x40, 0xda, 0x69, 0xf3, 0x92, 0x8, 0xbb, 0x21, 0xc0, 0x5a, 0xe9, 0x73, 0x36, 0xac, 0x1f, 0x85, 0x64, 0xfe, 0x4d, 0xd7, 0xc7, 0x5d, 0xee, 0x74, 0x95, 0xf, 0xbc, 0x26, 0x63, 0xf9, 0x4a, 0xd0, 0x31, 0xab, 0x18, 0x82, 0x38, 0xa2, 0x11, 0x8b, 0x6a, 0xf0, 0x43, 0xd9, 0x9c, 0x6, 0xb5, 0x2f, 0xce, 0x54, 0xe7, 0x7d, 0x6d, 0xf7, 0x44, 0xde, 0x3f, 0xa5, 0x16, 0x8c, 0xc9, 0x53, 0xe0, 0x7a, 0x9b, 0x1, 0xb2, 0x28, 0xdb, 0x41, 0xf2, 0x68, 0x89, 0x13, 0xa0, 0x3a, 0x7f, 0xe5, 0x56, 0xcc, 0x2d, 0xb7, 0x4, 0x9e, 0x8e, 0x14, 0xa7, 0x3d, 0xdc, 0x46, 0xf5, 0x6f, 0x2a, 0xb0, 0x3, 0x99, 0x78, 0xe2, 0x51, 0xcb, 0x71, 0xeb, 0x58, 0xc2, 0x23, 0xb9, 0xa, 0x90, 0xd5, 0x4f, 0xfc, 0x66, 0x87, 0x1d, 0xae, 0x34, 0x24, 0xbe, 0xd, 0x97, 0x76, 0xec, 0x5f, 0xc5, 0x80, 0x1a, 0xa9, 0x33, 0xd2, 0x48, 0xfb, 0x61},
+ {0x0, 0x9b, 0x2b, 0xb0, 0x56, 0xcd, 0x7d, 0xe6, 0xac, 0x37, 0x87, 0x1c, 0xfa, 0x61, 0xd1, 0x4a, 0x45, 0xde, 0x6e, 0xf5, 0x13, 0x88, 0x38, 0xa3, 0xe9, 0x72, 0xc2, 0x59, 0xbf, 0x24, 0x94, 0xf, 0x8a, 0x11, 0xa1, 0x3a, 0xdc, 0x47, 0xf7, 0x6c, 0x26, 0xbd, 0xd, 0x96, 0x70, 0xeb, 0x5b, 0xc0, 0xcf, 0x54, 0xe4, 0x7f, 0x99, 0x2, 0xb2, 0x29, 0x63, 0xf8, 0x48, 0xd3, 0x35, 0xae, 0x1e, 0x85, 0x9, 0x92, 0x22, 0xb9, 0x5f, 0xc4, 0x74, 0xef, 0xa5, 0x3e, 0x8e, 0x15, 0xf3, 0x68, 0xd8, 0x43, 0x4c, 0xd7, 0x67, 0xfc, 0x1a, 0x81, 0x31, 0xaa, 0xe0, 0x7b, 0xcb, 0x50, 0xb6, 0x2d, 0x9d, 0x6, 0x83, 0x18, 0xa8, 0x33, 0xd5, 0x4e, 0xfe, 0x65, 0x2f, 0xb4, 0x4, 0x9f, 0x79, 0xe2, 0x52, 0xc9, 0xc6, 0x5d, 0xed, 0x76, 0x90, 0xb, 0xbb, 0x20, 0x6a, 0xf1, 0x41, 0xda, 0x3c, 0xa7, 0x17, 0x8c, 0x12, 0x89, 0x39, 0xa2, 0x44, 0xdf, 0x6f, 0xf4, 0xbe, 0x25, 0x95, 0xe, 0xe8, 0x73, 0xc3, 0x58, 0x57, 0xcc, 0x7c, 0xe7, 0x1, 0x9a, 0x2a, 0xb1, 0xfb, 0x60, 0xd0, 0x4b, 0xad, 0x36, 0x86, 0x1d, 0x98, 0x3, 0xb3, 0x28, 0xce, 0x55, 0xe5, 0x7e, 0x34, 0xaf, 0x1f, 0x84, 0x62, 0xf9, 0x49, 0xd2, 0xdd, 0x46, 0xf6, 0x6d, 0x8b, 0x10, 0xa0, 0x3b, 0x71, 0xea, 0x5a, 0xc1, 0x27, 0xbc, 0xc, 0x97, 0x1b, 0x80, 0x30, 0xab, 0x4d, 0xd6, 0x66, 0xfd, 0xb7, 0x2c, 0x9c, 0x7, 0xe1, 0x7a, 0xca, 0x51, 0x5e, 0xc5, 0x75, 0xee, 0x8, 0x93, 0x23, 0xb8, 0xf2, 0x69, 0xd9, 0x42, 0xa4, 0x3f, 0x8f, 0x14, 0x91, 0xa, 0xba, 0x21, 0xc7, 0x5c, 0xec, 0x77, 0x3d, 0xa6, 0x16, 0x8d, 0x6b, 0xf0, 0x40, 0xdb, 0xd4, 0x4f, 0xff, 0x64, 0x82, 0x19, 0xa9, 0x32, 0x78, 0xe3, 0x53, 0xc8, 0x2e, 0xb5, 0x5, 0x9e},
+ {0x0, 0x9c, 0x25, 0xb9, 0x4a, 0xd6, 0x6f, 0xf3, 0x94, 0x8, 0xb1, 0x2d, 0xde, 0x42, 0xfb, 0x67, 0x35, 0xa9, 0x10, 0x8c, 0x7f, 0xe3, 0x5a, 0xc6, 0xa1, 0x3d, 0x84, 0x18, 0xeb, 0x77, 0xce, 0x52, 0x6a, 0xf6, 0x4f, 0xd3, 0x20, 0xbc, 0x5, 0x99, 0xfe, 0x62, 0xdb, 0x47, 0xb4, 0x28, 0x91, 0xd, 0x5f, 0xc3, 0x7a, 0xe6, 0x15, 0x89, 0x30, 0xac, 0xcb, 0x57, 0xee, 0x72, 0x81, 0x1d, 0xa4, 0x38, 0xd4, 0x48, 0xf1, 0x6d, 0x9e, 0x2, 0xbb, 0x27, 0x40, 0xdc, 0x65, 0xf9, 0xa, 0x96, 0x2f, 0xb3, 0xe1, 0x7d, 0xc4, 0x58, 0xab, 0x37, 0x8e, 0x12, 0x75, 0xe9, 0x50, 0xcc, 0x3f, 0xa3, 0x1a, 0x86, 0xbe, 0x22, 0x9b, 0x7, 0xf4, 0x68, 0xd1, 0x4d, 0x2a, 0xb6, 0xf, 0x93, 0x60, 0xfc, 0x45, 0xd9, 0x8b, 0x17, 0xae, 0x32, 0xc1, 0x5d, 0xe4, 0x78, 0x1f, 0x83, 0x3a, 0xa6, 0x55, 0xc9, 0x70, 0xec, 0xb5, 0x29, 0x90, 0xc, 0xff, 0x63, 0xda, 0x46, 0x21, 0xbd, 0x4, 0x98, 0x6b, 0xf7, 0x4e, 0xd2, 0x80, 0x1c, 0xa5, 0x39, 0xca, 0x56, 0xef, 0x73, 0x14, 0x88, 0x31, 0xad, 0x5e, 0xc2, 0x7b, 0xe7, 0xdf, 0x43, 0xfa, 0x66, 0x95, 0x9, 0xb0, 0x2c, 0x4b, 0xd7, 0x6e, 0xf2, 0x1, 0x9d, 0x24, 0xb8, 0xea, 0x76, 0xcf, 0x53, 0xa0, 0x3c, 0x85, 0x19, 0x7e, 0xe2, 0x5b, 0xc7, 0x34, 0xa8, 0x11, 0x8d, 0x61, 0xfd, 0x44, 0xd8, 0x2b, 0xb7, 0xe, 0x92, 0xf5, 0x69, 0xd0, 0x4c, 0xbf, 0x23, 0x9a, 0x6, 0x54, 0xc8, 0x71, 0xed, 0x1e, 0x82, 0x3b, 0xa7, 0xc0, 0x5c, 0xe5, 0x79, 0x8a, 0x16, 0xaf, 0x33, 0xb, 0x97, 0x2e, 0xb2, 0x41, 0xdd, 0x64, 0xf8, 0x9f, 0x3, 0xba, 0x26, 0xd5, 0x49, 0xf0, 0x6c, 0x3e, 0xa2, 0x1b, 0x87, 0x74, 0xe8, 0x51, 0xcd, 0xaa, 0x36, 0x8f, 0x13, 0xe0, 0x7c, 0xc5, 0x59},
+ {0x0, 0x9d, 0x27, 0xba, 0x4e, 0xd3, 0x69, 0xf4, 0x9c, 0x1, 0xbb, 0x26, 0xd2, 0x4f, 0xf5, 0x68, 0x25, 0xb8, 0x2, 0x9f, 0x6b, 0xf6, 0x4c, 0xd1, 0xb9, 0x24, 0x9e, 0x3, 0xf7, 0x6a, 0xd0, 0x4d, 0x4a, 0xd7, 0x6d, 0xf0, 0x4, 0x99, 0x23, 0xbe, 0xd6, 0x4b, 0xf1, 0x6c, 0x98, 0x5, 0xbf, 0x22, 0x6f, 0xf2, 0x48, 0xd5, 0x21, 0xbc, 0x6, 0x9b, 0xf3, 0x6e, 0xd4, 0x49, 0xbd, 0x20, 0x9a, 0x7, 0x94, 0x9, 0xb3, 0x2e, 0xda, 0x47, 0xfd, 0x60, 0x8, 0x95, 0x2f, 0xb2, 0x46, 0xdb, 0x61, 0xfc, 0xb1, 0x2c, 0x96, 0xb, 0xff, 0x62, 0xd8, 0x45, 0x2d, 0xb0, 0xa, 0x97, 0x63, 0xfe, 0x44, 0xd9, 0xde, 0x43, 0xf9, 0x64, 0x90, 0xd, 0xb7, 0x2a, 0x42, 0xdf, 0x65, 0xf8, 0xc, 0x91, 0x2b, 0xb6, 0xfb, 0x66, 0xdc, 0x41, 0xb5, 0x28, 0x92, 0xf, 0x67, 0xfa, 0x40, 0xdd, 0x29, 0xb4, 0xe, 0x93, 0x35, 0xa8, 0x12, 0x8f, 0x7b, 0xe6, 0x5c, 0xc1, 0xa9, 0x34, 0x8e, 0x13, 0xe7, 0x7a, 0xc0, 0x5d, 0x10, 0x8d, 0x37, 0xaa, 0x5e, 0xc3, 0x79, 0xe4, 0x8c, 0x11, 0xab, 0x36, 0xc2, 0x5f, 0xe5, 0x78, 0x7f, 0xe2, 0x58, 0xc5, 0x31, 0xac, 0x16, 0x8b, 0xe3, 0x7e, 0xc4, 0x59, 0xad, 0x30, 0x8a, 0x17, 0x5a, 0xc7, 0x7d, 0xe0, 0x14, 0x89, 0x33, 0xae, 0xc6, 0x5b, 0xe1, 0x7c, 0x88, 0x15, 0xaf, 0x32, 0xa1, 0x3c, 0x86, 0x1b, 0xef, 0x72, 0xc8, 0x55, 0x3d, 0xa0, 0x1a, 0x87, 0x73, 0xee, 0x54, 0xc9, 0x84, 0x19, 0xa3, 0x3e, 0xca, 0x57, 0xed, 0x70, 0x18, 0x85, 0x3f, 0xa2, 0x56, 0xcb, 0x71, 0xec, 0xeb, 0x76, 0xcc, 0x51, 0xa5, 0x38, 0x82, 0x1f, 0x77, 0xea, 0x50, 0xcd, 0x39, 0xa4, 0x1e, 0x83, 0xce, 0x53, 0xe9, 0x74, 0x80, 0x1d, 0xa7, 0x3a, 0x52, 0xcf, 0x75, 0xe8, 0x1c, 0x81, 0x3b, 0xa6},
+ {0x0, 0x9e, 0x21, 0xbf, 0x42, 0xdc, 0x63, 0xfd, 0x84, 0x1a, 0xa5, 0x3b, 0xc6, 0x58, 0xe7, 0x79, 0x15, 0x8b, 0x34, 0xaa, 0x57, 0xc9, 0x76, 0xe8, 0x91, 0xf, 0xb0, 0x2e, 0xd3, 0x4d, 0xf2, 0x6c, 0x2a, 0xb4, 0xb, 0x95, 0x68, 0xf6, 0x49, 0xd7, 0xae, 0x30, 0x8f, 0x11, 0xec, 0x72, 0xcd, 0x53, 0x3f, 0xa1, 0x1e, 0x80, 0x7d, 0xe3, 0x5c, 0xc2, 0xbb, 0x25, 0x9a, 0x4, 0xf9, 0x67, 0xd8, 0x46, 0x54, 0xca, 0x75, 0xeb, 0x16, 0x88, 0x37, 0xa9, 0xd0, 0x4e, 0xf1, 0x6f, 0x92, 0xc, 0xb3, 0x2d, 0x41, 0xdf, 0x60, 0xfe, 0x3, 0x9d, 0x22, 0xbc, 0xc5, 0x5b, 0xe4, 0x7a, 0x87, 0x19, 0xa6, 0x38, 0x7e, 0xe0, 0x5f, 0xc1, 0x3c, 0xa2, 0x1d, 0x83, 0xfa, 0x64, 0xdb, 0x45, 0xb8, 0x26, 0x99, 0x7, 0x6b, 0xf5, 0x4a, 0xd4, 0x29, 0xb7, 0x8, 0x96, 0xef, 0x71, 0xce, 0x50, 0xad, 0x33, 0x8c, 0x12, 0xa8, 0x36, 0x89, 0x17, 0xea, 0x74, 0xcb, 0x55, 0x2c, 0xb2, 0xd, 0x93, 0x6e, 0xf0, 0x4f, 0xd1, 0xbd, 0x23, 0x9c, 0x2, 0xff, 0x61, 0xde, 0x40, 0x39, 0xa7, 0x18, 0x86, 0x7b, 0xe5, 0x5a, 0xc4, 0x82, 0x1c, 0xa3, 0x3d, 0xc0, 0x5e, 0xe1, 0x7f, 0x6, 0x98, 0x27, 0xb9, 0x44, 0xda, 0x65, 0xfb, 0x97, 0x9, 0xb6, 0x28, 0xd5, 0x4b, 0xf4, 0x6a, 0x13, 0x8d, 0x32, 0xac, 0x51, 0xcf, 0x70, 0xee, 0xfc, 0x62, 0xdd, 0x43, 0xbe, 0x20, 0x9f, 0x1, 0x78, 0xe6, 0x59, 0xc7, 0x3a, 0xa4, 0x1b, 0x85, 0xe9, 0x77, 0xc8, 0x56, 0xab, 0x35, 0x8a, 0x14, 0x6d, 0xf3, 0x4c, 0xd2, 0x2f, 0xb1, 0xe, 0x90, 0xd6, 0x48, 0xf7, 0x69, 0x94, 0xa, 0xb5, 0x2b, 0x52, 0xcc, 0x73, 0xed, 0x10, 0x8e, 0x31, 0xaf, 0xc3, 0x5d, 0xe2, 0x7c, 0x81, 0x1f, 0xa0, 0x3e, 0x47, 0xd9, 0x66, 0xf8, 0x5, 0x9b, 0x24, 0xba},
+ {0x0, 0x9f, 0x23, 0xbc, 0x46, 0xd9, 0x65, 0xfa, 0x8c, 0x13, 0xaf, 0x30, 0xca, 0x55, 0xe9, 0x76, 0x5, 0x9a, 0x26, 0xb9, 0x43, 0xdc, 0x60, 0xff, 0x89, 0x16, 0xaa, 0x35, 0xcf, 0x50, 0xec, 0x73, 0xa, 0x95, 0x29, 0xb6, 0x4c, 0xd3, 0x6f, 0xf0, 0x86, 0x19, 0xa5, 0x3a, 0xc0, 0x5f, 0xe3, 0x7c, 0xf, 0x90, 0x2c, 0xb3, 0x49, 0xd6, 0x6a, 0xf5, 0x83, 0x1c, 0xa0, 0x3f, 0xc5, 0x5a, 0xe6, 0x79, 0x14, 0x8b, 0x37, 0xa8, 0x52, 0xcd, 0x71, 0xee, 0x98, 0x7, 0xbb, 0x24, 0xde, 0x41, 0xfd, 0x62, 0x11, 0x8e, 0x32, 0xad, 0x57, 0xc8, 0x74, 0xeb, 0x9d, 0x2, 0xbe, 0x21, 0xdb, 0x44, 0xf8, 0x67, 0x1e, 0x81, 0x3d, 0xa2, 0x58, 0xc7, 0x7b, 0xe4, 0x92, 0xd, 0xb1, 0x2e, 0xd4, 0x4b, 0xf7, 0x68, 0x1b, 0x84, 0x38, 0xa7, 0x5d, 0xc2, 0x7e, 0xe1, 0x97, 0x8, 0xb4, 0x2b, 0xd1, 0x4e, 0xf2, 0x6d, 0x28, 0xb7, 0xb, 0x94, 0x6e, 0xf1, 0x4d, 0xd2, 0xa4, 0x3b, 0x87, 0x18, 0xe2, 0x7d, 0xc1, 0x5e, 0x2d, 0xb2, 0xe, 0x91, 0x6b, 0xf4, 0x48, 0xd7, 0xa1, 0x3e, 0x82, 0x1d, 0xe7, 0x78, 0xc4, 0x5b, 0x22, 0xbd, 0x1, 0x9e, 0x64, 0xfb, 0x47, 0xd8, 0xae, 0x31, 0x8d, 0x12, 0xe8, 0x77, 0xcb, 0x54, 0x27, 0xb8, 0x4, 0x9b, 0x61, 0xfe, 0x42, 0xdd, 0xab, 0x34, 0x88, 0x17, 0xed, 0x72, 0xce, 0x51, 0x3c, 0xa3, 0x1f, 0x80, 0x7a, 0xe5, 0x59, 0xc6, 0xb0, 0x2f, 0x93, 0xc, 0xf6, 0x69, 0xd5, 0x4a, 0x39, 0xa6, 0x1a, 0x85, 0x7f, 0xe0, 0x5c, 0xc3, 0xb5, 0x2a, 0x96, 0x9, 0xf3, 0x6c, 0xd0, 0x4f, 0x36, 0xa9, 0x15, 0x8a, 0x70, 0xef, 0x53, 0xcc, 0xba, 0x25, 0x99, 0x6, 0xfc, 0x63, 0xdf, 0x40, 0x33, 0xac, 0x10, 0x8f, 0x75, 0xea, 0x56, 0xc9, 0xbf, 0x20, 0x9c, 0x3, 0xf9, 0x66, 0xda, 0x45},
+ {0x0, 0xa0, 0x5d, 0xfd, 0xba, 0x1a, 0xe7, 0x47, 0x69, 0xc9, 0x34, 0x94, 0xd3, 0x73, 0x8e, 0x2e, 0xd2, 0x72, 0x8f, 0x2f, 0x68, 0xc8, 0x35, 0x95, 0xbb, 0x1b, 0xe6, 0x46, 0x1, 0xa1, 0x5c, 0xfc, 0xb9, 0x19, 0xe4, 0x44, 0x3, 0xa3, 0x5e, 0xfe, 0xd0, 0x70, 0x8d, 0x2d, 0x6a, 0xca, 0x37, 0x97, 0x6b, 0xcb, 0x36, 0x96, 0xd1, 0x71, 0x8c, 0x2c, 0x2, 0xa2, 0x5f, 0xff, 0xb8, 0x18, 0xe5, 0x45, 0x6f, 0xcf, 0x32, 0x92, 0xd5, 0x75, 0x88, 0x28, 0x6, 0xa6, 0x5b, 0xfb, 0xbc, 0x1c, 0xe1, 0x41, 0xbd, 0x1d, 0xe0, 0x40, 0x7, 0xa7, 0x5a, 0xfa, 0xd4, 0x74, 0x89, 0x29, 0x6e, 0xce, 0x33, 0x93, 0xd6, 0x76, 0x8b, 0x2b, 0x6c, 0xcc, 0x31, 0x91, 0xbf, 0x1f, 0xe2, 0x42, 0x5, 0xa5, 0x58, 0xf8, 0x4, 0xa4, 0x59, 0xf9, 0xbe, 0x1e, 0xe3, 0x43, 0x6d, 0xcd, 0x30, 0x90, 0xd7, 0x77, 0x8a, 0x2a, 0xde, 0x7e, 0x83, 0x23, 0x64, 0xc4, 0x39, 0x99, 0xb7, 0x17, 0xea, 0x4a, 0xd, 0xad, 0x50, 0xf0, 0xc, 0xac, 0x51, 0xf1, 0xb6, 0x16, 0xeb, 0x4b, 0x65, 0xc5, 0x38, 0x98, 0xdf, 0x7f, 0x82, 0x22, 0x67, 0xc7, 0x3a, 0x9a, 0xdd, 0x7d, 0x80, 0x20, 0xe, 0xae, 0x53, 0xf3, 0xb4, 0x14, 0xe9, 0x49, 0xb5, 0x15, 0xe8, 0x48, 0xf, 0xaf, 0x52, 0xf2, 0xdc, 0x7c, 0x81, 0x21, 0x66, 0xc6, 0x3b, 0x9b, 0xb1, 0x11, 0xec, 0x4c, 0xb, 0xab, 0x56, 0xf6, 0xd8, 0x78, 0x85, 0x25, 0x62, 0xc2, 0x3f, 0x9f, 0x63, 0xc3, 0x3e, 0x9e, 0xd9, 0x79, 0x84, 0x24, 0xa, 0xaa, 0x57, 0xf7, 0xb0, 0x10, 0xed, 0x4d, 0x8, 0xa8, 0x55, 0xf5, 0xb2, 0x12, 0xef, 0x4f, 0x61, 0xc1, 0x3c, 0x9c, 0xdb, 0x7b, 0x86, 0x26, 0xda, 0x7a, 0x87, 0x27, 0x60, 0xc0, 0x3d, 0x9d, 0xb3, 0x13, 0xee, 0x4e, 0x9, 0xa9, 0x54, 0xf4},
+ {0x0, 0xa1, 0x5f, 0xfe, 0xbe, 0x1f, 0xe1, 0x40, 0x61, 0xc0, 0x3e, 0x9f, 0xdf, 0x7e, 0x80, 0x21, 0xc2, 0x63, 0x9d, 0x3c, 0x7c, 0xdd, 0x23, 0x82, 0xa3, 0x2, 0xfc, 0x5d, 0x1d, 0xbc, 0x42, 0xe3, 0x99, 0x38, 0xc6, 0x67, 0x27, 0x86, 0x78, 0xd9, 0xf8, 0x59, 0xa7, 0x6, 0x46, 0xe7, 0x19, 0xb8, 0x5b, 0xfa, 0x4, 0xa5, 0xe5, 0x44, 0xba, 0x1b, 0x3a, 0x9b, 0x65, 0xc4, 0x84, 0x25, 0xdb, 0x7a, 0x2f, 0x8e, 0x70, 0xd1, 0x91, 0x30, 0xce, 0x6f, 0x4e, 0xef, 0x11, 0xb0, 0xf0, 0x51, 0xaf, 0xe, 0xed, 0x4c, 0xb2, 0x13, 0x53, 0xf2, 0xc, 0xad, 0x8c, 0x2d, 0xd3, 0x72, 0x32, 0x93, 0x6d, 0xcc, 0xb6, 0x17, 0xe9, 0x48, 0x8, 0xa9, 0x57, 0xf6, 0xd7, 0x76, 0x88, 0x29, 0x69, 0xc8, 0x36, 0x97, 0x74, 0xd5, 0x2b, 0x8a, 0xca, 0x6b, 0x95, 0x34, 0x15, 0xb4, 0x4a, 0xeb, 0xab, 0xa, 0xf4, 0x55, 0x5e, 0xff, 0x1, 0xa0, 0xe0, 0x41, 0xbf, 0x1e, 0x3f, 0x9e, 0x60, 0xc1, 0x81, 0x20, 0xde, 0x7f, 0x9c, 0x3d, 0xc3, 0x62, 0x22, 0x83, 0x7d, 0xdc, 0xfd, 0x5c, 0xa2, 0x3, 0x43, 0xe2, 0x1c, 0xbd, 0xc7, 0x66, 0x98, 0x39, 0x79, 0xd8, 0x26, 0x87, 0xa6, 0x7, 0xf9, 0x58, 0x18, 0xb9, 0x47, 0xe6, 0x5, 0xa4, 0x5a, 0xfb, 0xbb, 0x1a, 0xe4, 0x45, 0x64, 0xc5, 0x3b, 0x9a, 0xda, 0x7b, 0x85, 0x24, 0x71, 0xd0, 0x2e, 0x8f, 0xcf, 0x6e, 0x90, 0x31, 0x10, 0xb1, 0x4f, 0xee, 0xae, 0xf, 0xf1, 0x50, 0xb3, 0x12, 0xec, 0x4d, 0xd, 0xac, 0x52, 0xf3, 0xd2, 0x73, 0x8d, 0x2c, 0x6c, 0xcd, 0x33, 0x92, 0xe8, 0x49, 0xb7, 0x16, 0x56, 0xf7, 0x9, 0xa8, 0x89, 0x28, 0xd6, 0x77, 0x37, 0x96, 0x68, 0xc9, 0x2a, 0x8b, 0x75, 0xd4, 0x94, 0x35, 0xcb, 0x6a, 0x4b, 0xea, 0x14, 0xb5, 0xf5, 0x54, 0xaa, 0xb},
+ {0x0, 0xa2, 0x59, 0xfb, 0xb2, 0x10, 0xeb, 0x49, 0x79, 0xdb, 0x20, 0x82, 0xcb, 0x69, 0x92, 0x30, 0xf2, 0x50, 0xab, 0x9, 0x40, 0xe2, 0x19, 0xbb, 0x8b, 0x29, 0xd2, 0x70, 0x39, 0x9b, 0x60, 0xc2, 0xf9, 0x5b, 0xa0, 0x2, 0x4b, 0xe9, 0x12, 0xb0, 0x80, 0x22, 0xd9, 0x7b, 0x32, 0x90, 0x6b, 0xc9, 0xb, 0xa9, 0x52, 0xf0, 0xb9, 0x1b, 0xe0, 0x42, 0x72, 0xd0, 0x2b, 0x89, 0xc0, 0x62, 0x99, 0x3b, 0xef, 0x4d, 0xb6, 0x14, 0x5d, 0xff, 0x4, 0xa6, 0x96, 0x34, 0xcf, 0x6d, 0x24, 0x86, 0x7d, 0xdf, 0x1d, 0xbf, 0x44, 0xe6, 0xaf, 0xd, 0xf6, 0x54, 0x64, 0xc6, 0x3d, 0x9f, 0xd6, 0x74, 0x8f, 0x2d, 0x16, 0xb4, 0x4f, 0xed, 0xa4, 0x6, 0xfd, 0x5f, 0x6f, 0xcd, 0x36, 0x94, 0xdd, 0x7f, 0x84, 0x26, 0xe4, 0x46, 0xbd, 0x1f, 0x56, 0xf4, 0xf, 0xad, 0x9d, 0x3f, 0xc4, 0x66, 0x2f, 0x8d, 0x76, 0xd4, 0xc3, 0x61, 0x9a, 0x38, 0x71, 0xd3, 0x28, 0x8a, 0xba, 0x18, 0xe3, 0x41, 0x8, 0xaa, 0x51, 0xf3, 0x31, 0x93, 0x68, 0xca, 0x83, 0x21, 0xda, 0x78, 0x48, 0xea, 0x11, 0xb3, 0xfa, 0x58, 0xa3, 0x1, 0x3a, 0x98, 0x63, 0xc1, 0x88, 0x2a, 0xd1, 0x73, 0x43, 0xe1, 0x1a, 0xb8, 0xf1, 0x53, 0xa8, 0xa, 0xc8, 0x6a, 0x91, 0x33, 0x7a, 0xd8, 0x23, 0x81, 0xb1, 0x13, 0xe8, 0x4a, 0x3, 0xa1, 0x5a, 0xf8, 0x2c, 0x8e, 0x75, 0xd7, 0x9e, 0x3c, 0xc7, 0x65, 0x55, 0xf7, 0xc, 0xae, 0xe7, 0x45, 0xbe, 0x1c, 0xde, 0x7c, 0x87, 0x25, 0x6c, 0xce, 0x35, 0x97, 0xa7, 0x5, 0xfe, 0x5c, 0x15, 0xb7, 0x4c, 0xee, 0xd5, 0x77, 0x8c, 0x2e, 0x67, 0xc5, 0x3e, 0x9c, 0xac, 0xe, 0xf5, 0x57, 0x1e, 0xbc, 0x47, 0xe5, 0x27, 0x85, 0x7e, 0xdc, 0x95, 0x37, 0xcc, 0x6e, 0x5e, 0xfc, 0x7, 0xa5, 0xec, 0x4e, 0xb5, 0x17},
+ {0x0, 0xa3, 0x5b, 0xf8, 0xb6, 0x15, 0xed, 0x4e, 0x71, 0xd2, 0x2a, 0x89, 0xc7, 0x64, 0x9c, 0x3f, 0xe2, 0x41, 0xb9, 0x1a, 0x54, 0xf7, 0xf, 0xac, 0x93, 0x30, 0xc8, 0x6b, 0x25, 0x86, 0x7e, 0xdd, 0xd9, 0x7a, 0x82, 0x21, 0x6f, 0xcc, 0x34, 0x97, 0xa8, 0xb, 0xf3, 0x50, 0x1e, 0xbd, 0x45, 0xe6, 0x3b, 0x98, 0x60, 0xc3, 0x8d, 0x2e, 0xd6, 0x75, 0x4a, 0xe9, 0x11, 0xb2, 0xfc, 0x5f, 0xa7, 0x4, 0xaf, 0xc, 0xf4, 0x57, 0x19, 0xba, 0x42, 0xe1, 0xde, 0x7d, 0x85, 0x26, 0x68, 0xcb, 0x33, 0x90, 0x4d, 0xee, 0x16, 0xb5, 0xfb, 0x58, 0xa0, 0x3, 0x3c, 0x9f, 0x67, 0xc4, 0x8a, 0x29, 0xd1, 0x72, 0x76, 0xd5, 0x2d, 0x8e, 0xc0, 0x63, 0x9b, 0x38, 0x7, 0xa4, 0x5c, 0xff, 0xb1, 0x12, 0xea, 0x49, 0x94, 0x37, 0xcf, 0x6c, 0x22, 0x81, 0x79, 0xda, 0xe5, 0x46, 0xbe, 0x1d, 0x53, 0xf0, 0x8, 0xab, 0x43, 0xe0, 0x18, 0xbb, 0xf5, 0x56, 0xae, 0xd, 0x32, 0x91, 0x69, 0xca, 0x84, 0x27, 0xdf, 0x7c, 0xa1, 0x2, 0xfa, 0x59, 0x17, 0xb4, 0x4c, 0xef, 0xd0, 0x73, 0x8b, 0x28, 0x66, 0xc5, 0x3d, 0x9e, 0x9a, 0x39, 0xc1, 0x62, 0x2c, 0x8f, 0x77, 0xd4, 0xeb, 0x48, 0xb0, 0x13, 0x5d, 0xfe, 0x6, 0xa5, 0x78, 0xdb, 0x23, 0x80, 0xce, 0x6d, 0x95, 0x36, 0x9, 0xaa, 0x52, 0xf1, 0xbf, 0x1c, 0xe4, 0x47, 0xec, 0x4f, 0xb7, 0x14, 0x5a, 0xf9, 0x1, 0xa2, 0x9d, 0x3e, 0xc6, 0x65, 0x2b, 0x88, 0x70, 0xd3, 0xe, 0xad, 0x55, 0xf6, 0xb8, 0x1b, 0xe3, 0x40, 0x7f, 0xdc, 0x24, 0x87, 0xc9, 0x6a, 0x92, 0x31, 0x35, 0x96, 0x6e, 0xcd, 0x83, 0x20, 0xd8, 0x7b, 0x44, 0xe7, 0x1f, 0xbc, 0xf2, 0x51, 0xa9, 0xa, 0xd7, 0x74, 0x8c, 0x2f, 0x61, 0xc2, 0x3a, 0x99, 0xa6, 0x5, 0xfd, 0x5e, 0x10, 0xb3, 0x4b, 0xe8},
+ {0x0, 0xa4, 0x55, 0xf1, 0xaa, 0xe, 0xff, 0x5b, 0x49, 0xed, 0x1c, 0xb8, 0xe3, 0x47, 0xb6, 0x12, 0x92, 0x36, 0xc7, 0x63, 0x38, 0x9c, 0x6d, 0xc9, 0xdb, 0x7f, 0x8e, 0x2a, 0x71, 0xd5, 0x24, 0x80, 0x39, 0x9d, 0x6c, 0xc8, 0x93, 0x37, 0xc6, 0x62, 0x70, 0xd4, 0x25, 0x81, 0xda, 0x7e, 0x8f, 0x2b, 0xab, 0xf, 0xfe, 0x5a, 0x1, 0xa5, 0x54, 0xf0, 0xe2, 0x46, 0xb7, 0x13, 0x48, 0xec, 0x1d, 0xb9, 0x72, 0xd6, 0x27, 0x83, 0xd8, 0x7c, 0x8d, 0x29, 0x3b, 0x9f, 0x6e, 0xca, 0x91, 0x35, 0xc4, 0x60, 0xe0, 0x44, 0xb5, 0x11, 0x4a, 0xee, 0x1f, 0xbb, 0xa9, 0xd, 0xfc, 0x58, 0x3, 0xa7, 0x56, 0xf2, 0x4b, 0xef, 0x1e, 0xba, 0xe1, 0x45, 0xb4, 0x10, 0x2, 0xa6, 0x57, 0xf3, 0xa8, 0xc, 0xfd, 0x59, 0xd9, 0x7d, 0x8c, 0x28, 0x73, 0xd7, 0x26, 0x82, 0x90, 0x34, 0xc5, 0x61, 0x3a, 0x9e, 0x6f, 0xcb, 0xe4, 0x40, 0xb1, 0x15, 0x4e, 0xea, 0x1b, 0xbf, 0xad, 0x9, 0xf8, 0x5c, 0x7, 0xa3, 0x52, 0xf6, 0x76, 0xd2, 0x23, 0x87, 0xdc, 0x78, 0x89, 0x2d, 0x3f, 0x9b, 0x6a, 0xce, 0x95, 0x31, 0xc0, 0x64, 0xdd, 0x79, 0x88, 0x2c, 0x77, 0xd3, 0x22, 0x86, 0x94, 0x30, 0xc1, 0x65, 0x3e, 0x9a, 0x6b, 0xcf, 0x4f, 0xeb, 0x1a, 0xbe, 0xe5, 0x41, 0xb0, 0x14, 0x6, 0xa2, 0x53, 0xf7, 0xac, 0x8, 0xf9, 0x5d, 0x96, 0x32, 0xc3, 0x67, 0x3c, 0x98, 0x69, 0xcd, 0xdf, 0x7b, 0x8a, 0x2e, 0x75, 0xd1, 0x20, 0x84, 0x4, 0xa0, 0x51, 0xf5, 0xae, 0xa, 0xfb, 0x5f, 0x4d, 0xe9, 0x18, 0xbc, 0xe7, 0x43, 0xb2, 0x16, 0xaf, 0xb, 0xfa, 0x5e, 0x5, 0xa1, 0x50, 0xf4, 0xe6, 0x42, 0xb3, 0x17, 0x4c, 0xe8, 0x19, 0xbd, 0x3d, 0x99, 0x68, 0xcc, 0x97, 0x33, 0xc2, 0x66, 0x74, 0xd0, 0x21, 0x85, 0xde, 0x7a, 0x8b, 0x2f},
+ {0x0, 0xa5, 0x57, 0xf2, 0xae, 0xb, 0xf9, 0x5c, 0x41, 0xe4, 0x16, 0xb3, 0xef, 0x4a, 0xb8, 0x1d, 0x82, 0x27, 0xd5, 0x70, 0x2c, 0x89, 0x7b, 0xde, 0xc3, 0x66, 0x94, 0x31, 0x6d, 0xc8, 0x3a, 0x9f, 0x19, 0xbc, 0x4e, 0xeb, 0xb7, 0x12, 0xe0, 0x45, 0x58, 0xfd, 0xf, 0xaa, 0xf6, 0x53, 0xa1, 0x4, 0x9b, 0x3e, 0xcc, 0x69, 0x35, 0x90, 0x62, 0xc7, 0xda, 0x7f, 0x8d, 0x28, 0x74, 0xd1, 0x23, 0x86, 0x32, 0x97, 0x65, 0xc0, 0x9c, 0x39, 0xcb, 0x6e, 0x73, 0xd6, 0x24, 0x81, 0xdd, 0x78, 0x8a, 0x2f, 0xb0, 0x15, 0xe7, 0x42, 0x1e, 0xbb, 0x49, 0xec, 0xf1, 0x54, 0xa6, 0x3, 0x5f, 0xfa, 0x8, 0xad, 0x2b, 0x8e, 0x7c, 0xd9, 0x85, 0x20, 0xd2, 0x77, 0x6a, 0xcf, 0x3d, 0x98, 0xc4, 0x61, 0x93, 0x36, 0xa9, 0xc, 0xfe, 0x5b, 0x7, 0xa2, 0x50, 0xf5, 0xe8, 0x4d, 0xbf, 0x1a, 0x46, 0xe3, 0x11, 0xb4, 0x64, 0xc1, 0x33, 0x96, 0xca, 0x6f, 0x9d, 0x38, 0x25, 0x80, 0x72, 0xd7, 0x8b, 0x2e, 0xdc, 0x79, 0xe6, 0x43, 0xb1, 0x14, 0x48, 0xed, 0x1f, 0xba, 0xa7, 0x2, 0xf0, 0x55, 0x9, 0xac, 0x5e, 0xfb, 0x7d, 0xd8, 0x2a, 0x8f, 0xd3, 0x76, 0x84, 0x21, 0x3c, 0x99, 0x6b, 0xce, 0x92, 0x37, 0xc5, 0x60, 0xff, 0x5a, 0xa8, 0xd, 0x51, 0xf4, 0x6, 0xa3, 0xbe, 0x1b, 0xe9, 0x4c, 0x10, 0xb5, 0x47, 0xe2, 0x56, 0xf3, 0x1, 0xa4, 0xf8, 0x5d, 0xaf, 0xa, 0x17, 0xb2, 0x40, 0xe5, 0xb9, 0x1c, 0xee, 0x4b, 0xd4, 0x71, 0x83, 0x26, 0x7a, 0xdf, 0x2d, 0x88, 0x95, 0x30, 0xc2, 0x67, 0x3b, 0x9e, 0x6c, 0xc9, 0x4f, 0xea, 0x18, 0xbd, 0xe1, 0x44, 0xb6, 0x13, 0xe, 0xab, 0x59, 0xfc, 0xa0, 0x5, 0xf7, 0x52, 0xcd, 0x68, 0x9a, 0x3f, 0x63, 0xc6, 0x34, 0x91, 0x8c, 0x29, 0xdb, 0x7e, 0x22, 0x87, 0x75, 0xd0},
+ {0x0, 0xa6, 0x51, 0xf7, 0xa2, 0x4, 0xf3, 0x55, 0x59, 0xff, 0x8, 0xae, 0xfb, 0x5d, 0xaa, 0xc, 0xb2, 0x14, 0xe3, 0x45, 0x10, 0xb6, 0x41, 0xe7, 0xeb, 0x4d, 0xba, 0x1c, 0x49, 0xef, 0x18, 0xbe, 0x79, 0xdf, 0x28, 0x8e, 0xdb, 0x7d, 0x8a, 0x2c, 0x20, 0x86, 0x71, 0xd7, 0x82, 0x24, 0xd3, 0x75, 0xcb, 0x6d, 0x9a, 0x3c, 0x69, 0xcf, 0x38, 0x9e, 0x92, 0x34, 0xc3, 0x65, 0x30, 0x96, 0x61, 0xc7, 0xf2, 0x54, 0xa3, 0x5, 0x50, 0xf6, 0x1, 0xa7, 0xab, 0xd, 0xfa, 0x5c, 0x9, 0xaf, 0x58, 0xfe, 0x40, 0xe6, 0x11, 0xb7, 0xe2, 0x44, 0xb3, 0x15, 0x19, 0xbf, 0x48, 0xee, 0xbb, 0x1d, 0xea, 0x4c, 0x8b, 0x2d, 0xda, 0x7c, 0x29, 0x8f, 0x78, 0xde, 0xd2, 0x74, 0x83, 0x25, 0x70, 0xd6, 0x21, 0x87, 0x39, 0x9f, 0x68, 0xce, 0x9b, 0x3d, 0xca, 0x6c, 0x60, 0xc6, 0x31, 0x97, 0xc2, 0x64, 0x93, 0x35, 0xf9, 0x5f, 0xa8, 0xe, 0x5b, 0xfd, 0xa, 0xac, 0xa0, 0x6, 0xf1, 0x57, 0x2, 0xa4, 0x53, 0xf5, 0x4b, 0xed, 0x1a, 0xbc, 0xe9, 0x4f, 0xb8, 0x1e, 0x12, 0xb4, 0x43, 0xe5, 0xb0, 0x16, 0xe1, 0x47, 0x80, 0x26, 0xd1, 0x77, 0x22, 0x84, 0x73, 0xd5, 0xd9, 0x7f, 0x88, 0x2e, 0x7b, 0xdd, 0x2a, 0x8c, 0x32, 0x94, 0x63, 0xc5, 0x90, 0x36, 0xc1, 0x67, 0x6b, 0xcd, 0x3a, 0x9c, 0xc9, 0x6f, 0x98, 0x3e, 0xb, 0xad, 0x5a, 0xfc, 0xa9, 0xf, 0xf8, 0x5e, 0x52, 0xf4, 0x3, 0xa5, 0xf0, 0x56, 0xa1, 0x7, 0xb9, 0x1f, 0xe8, 0x4e, 0x1b, 0xbd, 0x4a, 0xec, 0xe0, 0x46, 0xb1, 0x17, 0x42, 0xe4, 0x13, 0xb5, 0x72, 0xd4, 0x23, 0x85, 0xd0, 0x76, 0x81, 0x27, 0x2b, 0x8d, 0x7a, 0xdc, 0x89, 0x2f, 0xd8, 0x7e, 0xc0, 0x66, 0x91, 0x37, 0x62, 0xc4, 0x33, 0x95, 0x99, 0x3f, 0xc8, 0x6e, 0x3b, 0x9d, 0x6a, 0xcc},
+ {0x0, 0xa7, 0x53, 0xf4, 0xa6, 0x1, 0xf5, 0x52, 0x51, 0xf6, 0x2, 0xa5, 0xf7, 0x50, 0xa4, 0x3, 0xa2, 0x5, 0xf1, 0x56, 0x4, 0xa3, 0x57, 0xf0, 0xf3, 0x54, 0xa0, 0x7, 0x55, 0xf2, 0x6, 0xa1, 0x59, 0xfe, 0xa, 0xad, 0xff, 0x58, 0xac, 0xb, 0x8, 0xaf, 0x5b, 0xfc, 0xae, 0x9, 0xfd, 0x5a, 0xfb, 0x5c, 0xa8, 0xf, 0x5d, 0xfa, 0xe, 0xa9, 0xaa, 0xd, 0xf9, 0x5e, 0xc, 0xab, 0x5f, 0xf8, 0xb2, 0x15, 0xe1, 0x46, 0x14, 0xb3, 0x47, 0xe0, 0xe3, 0x44, 0xb0, 0x17, 0x45, 0xe2, 0x16, 0xb1, 0x10, 0xb7, 0x43, 0xe4, 0xb6, 0x11, 0xe5, 0x42, 0x41, 0xe6, 0x12, 0xb5, 0xe7, 0x40, 0xb4, 0x13, 0xeb, 0x4c, 0xb8, 0x1f, 0x4d, 0xea, 0x1e, 0xb9, 0xba, 0x1d, 0xe9, 0x4e, 0x1c, 0xbb, 0x4f, 0xe8, 0x49, 0xee, 0x1a, 0xbd, 0xef, 0x48, 0xbc, 0x1b, 0x18, 0xbf, 0x4b, 0xec, 0xbe, 0x19, 0xed, 0x4a, 0x79, 0xde, 0x2a, 0x8d, 0xdf, 0x78, 0x8c, 0x2b, 0x28, 0x8f, 0x7b, 0xdc, 0x8e, 0x29, 0xdd, 0x7a, 0xdb, 0x7c, 0x88, 0x2f, 0x7d, 0xda, 0x2e, 0x89, 0x8a, 0x2d, 0xd9, 0x7e, 0x2c, 0x8b, 0x7f, 0xd8, 0x20, 0x87, 0x73, 0xd4, 0x86, 0x21, 0xd5, 0x72, 0x71, 0xd6, 0x22, 0x85, 0xd7, 0x70, 0x84, 0x23, 0x82, 0x25, 0xd1, 0x76, 0x24, 0x83, 0x77, 0xd0, 0xd3, 0x74, 0x80, 0x27, 0x75, 0xd2, 0x26, 0x81, 0xcb, 0x6c, 0x98, 0x3f, 0x6d, 0xca, 0x3e, 0x99, 0x9a, 0x3d, 0xc9, 0x6e, 0x3c, 0x9b, 0x6f, 0xc8, 0x69, 0xce, 0x3a, 0x9d, 0xcf, 0x68, 0x9c, 0x3b, 0x38, 0x9f, 0x6b, 0xcc, 0x9e, 0x39, 0xcd, 0x6a, 0x92, 0x35, 0xc1, 0x66, 0x34, 0x93, 0x67, 0xc0, 0xc3, 0x64, 0x90, 0x37, 0x65, 0xc2, 0x36, 0x91, 0x30, 0x97, 0x63, 0xc4, 0x96, 0x31, 0xc5, 0x62, 0x61, 0xc6, 0x32, 0x95, 0xc7, 0x60, 0x94, 0x33},
+ {0x0, 0xa8, 0x4d, 0xe5, 0x9a, 0x32, 0xd7, 0x7f, 0x29, 0x81, 0x64, 0xcc, 0xb3, 0x1b, 0xfe, 0x56, 0x52, 0xfa, 0x1f, 0xb7, 0xc8, 0x60, 0x85, 0x2d, 0x7b, 0xd3, 0x36, 0x9e, 0xe1, 0x49, 0xac, 0x4, 0xa4, 0xc, 0xe9, 0x41, 0x3e, 0x96, 0x73, 0xdb, 0x8d, 0x25, 0xc0, 0x68, 0x17, 0xbf, 0x5a, 0xf2, 0xf6, 0x5e, 0xbb, 0x13, 0x6c, 0xc4, 0x21, 0x89, 0xdf, 0x77, 0x92, 0x3a, 0x45, 0xed, 0x8, 0xa0, 0x55, 0xfd, 0x18, 0xb0, 0xcf, 0x67, 0x82, 0x2a, 0x7c, 0xd4, 0x31, 0x99, 0xe6, 0x4e, 0xab, 0x3, 0x7, 0xaf, 0x4a, 0xe2, 0x9d, 0x35, 0xd0, 0x78, 0x2e, 0x86, 0x63, 0xcb, 0xb4, 0x1c, 0xf9, 0x51, 0xf1, 0x59, 0xbc, 0x14, 0x6b, 0xc3, 0x26, 0x8e, 0xd8, 0x70, 0x95, 0x3d, 0x42, 0xea, 0xf, 0xa7, 0xa3, 0xb, 0xee, 0x46, 0x39, 0x91, 0x74, 0xdc, 0x8a, 0x22, 0xc7, 0x6f, 0x10, 0xb8, 0x5d, 0xf5, 0xaa, 0x2, 0xe7, 0x4f, 0x30, 0x98, 0x7d, 0xd5, 0x83, 0x2b, 0xce, 0x66, 0x19, 0xb1, 0x54, 0xfc, 0xf8, 0x50, 0xb5, 0x1d, 0x62, 0xca, 0x2f, 0x87, 0xd1, 0x79, 0x9c, 0x34, 0x4b, 0xe3, 0x6, 0xae, 0xe, 0xa6, 0x43, 0xeb, 0x94, 0x3c, 0xd9, 0x71, 0x27, 0x8f, 0x6a, 0xc2, 0xbd, 0x15, 0xf0, 0x58, 0x5c, 0xf4, 0x11, 0xb9, 0xc6, 0x6e, 0x8b, 0x23, 0x75, 0xdd, 0x38, 0x90, 0xef, 0x47, 0xa2, 0xa, 0xff, 0x57, 0xb2, 0x1a, 0x65, 0xcd, 0x28, 0x80, 0xd6, 0x7e, 0x9b, 0x33, 0x4c, 0xe4, 0x1, 0xa9, 0xad, 0x5, 0xe0, 0x48, 0x37, 0x9f, 0x7a, 0xd2, 0x84, 0x2c, 0xc9, 0x61, 0x1e, 0xb6, 0x53, 0xfb, 0x5b, 0xf3, 0x16, 0xbe, 0xc1, 0x69, 0x8c, 0x24, 0x72, 0xda, 0x3f, 0x97, 0xe8, 0x40, 0xa5, 0xd, 0x9, 0xa1, 0x44, 0xec, 0x93, 0x3b, 0xde, 0x76, 0x20, 0x88, 0x6d, 0xc5, 0xba, 0x12, 0xf7, 0x5f},
+ {0x0, 0xa9, 0x4f, 0xe6, 0x9e, 0x37, 0xd1, 0x78, 0x21, 0x88, 0x6e, 0xc7, 0xbf, 0x16, 0xf0, 0x59, 0x42, 0xeb, 0xd, 0xa4, 0xdc, 0x75, 0x93, 0x3a, 0x63, 0xca, 0x2c, 0x85, 0xfd, 0x54, 0xb2, 0x1b, 0x84, 0x2d, 0xcb, 0x62, 0x1a, 0xb3, 0x55, 0xfc, 0xa5, 0xc, 0xea, 0x43, 0x3b, 0x92, 0x74, 0xdd, 0xc6, 0x6f, 0x89, 0x20, 0x58, 0xf1, 0x17, 0xbe, 0xe7, 0x4e, 0xa8, 0x1, 0x79, 0xd0, 0x36, 0x9f, 0x15, 0xbc, 0x5a, 0xf3, 0x8b, 0x22, 0xc4, 0x6d, 0x34, 0x9d, 0x7b, 0xd2, 0xaa, 0x3, 0xe5, 0x4c, 0x57, 0xfe, 0x18, 0xb1, 0xc9, 0x60, 0x86, 0x2f, 0x76, 0xdf, 0x39, 0x90, 0xe8, 0x41, 0xa7, 0xe, 0x91, 0x38, 0xde, 0x77, 0xf, 0xa6, 0x40, 0xe9, 0xb0, 0x19, 0xff, 0x56, 0x2e, 0x87, 0x61, 0xc8, 0xd3, 0x7a, 0x9c, 0x35, 0x4d, 0xe4, 0x2, 0xab, 0xf2, 0x5b, 0xbd, 0x14, 0x6c, 0xc5, 0x23, 0x8a, 0x2a, 0x83, 0x65, 0xcc, 0xb4, 0x1d, 0xfb, 0x52, 0xb, 0xa2, 0x44, 0xed, 0x95, 0x3c, 0xda, 0x73, 0x68, 0xc1, 0x27, 0x8e, 0xf6, 0x5f, 0xb9, 0x10, 0x49, 0xe0, 0x6, 0xaf, 0xd7, 0x7e, 0x98, 0x31, 0xae, 0x7, 0xe1, 0x48, 0x30, 0x99, 0x7f, 0xd6, 0x8f, 0x26, 0xc0, 0x69, 0x11, 0xb8, 0x5e, 0xf7, 0xec, 0x45, 0xa3, 0xa, 0x72, 0xdb, 0x3d, 0x94, 0xcd, 0x64, 0x82, 0x2b, 0x53, 0xfa, 0x1c, 0xb5, 0x3f, 0x96, 0x70, 0xd9, 0xa1, 0x8, 0xee, 0x47, 0x1e, 0xb7, 0x51, 0xf8, 0x80, 0x29, 0xcf, 0x66, 0x7d, 0xd4, 0x32, 0x9b, 0xe3, 0x4a, 0xac, 0x5, 0x5c, 0xf5, 0x13, 0xba, 0xc2, 0x6b, 0x8d, 0x24, 0xbb, 0x12, 0xf4, 0x5d, 0x25, 0x8c, 0x6a, 0xc3, 0x9a, 0x33, 0xd5, 0x7c, 0x4, 0xad, 0x4b, 0xe2, 0xf9, 0x50, 0xb6, 0x1f, 0x67, 0xce, 0x28, 0x81, 0xd8, 0x71, 0x97, 0x3e, 0x46, 0xef, 0x9, 0xa0},
+ {0x0, 0xaa, 0x49, 0xe3, 0x92, 0x38, 0xdb, 0x71, 0x39, 0x93, 0x70, 0xda, 0xab, 0x1, 0xe2, 0x48, 0x72, 0xd8, 0x3b, 0x91, 0xe0, 0x4a, 0xa9, 0x3, 0x4b, 0xe1, 0x2, 0xa8, 0xd9, 0x73, 0x90, 0x3a, 0xe4, 0x4e, 0xad, 0x7, 0x76, 0xdc, 0x3f, 0x95, 0xdd, 0x77, 0x94, 0x3e, 0x4f, 0xe5, 0x6, 0xac, 0x96, 0x3c, 0xdf, 0x75, 0x4, 0xae, 0x4d, 0xe7, 0xaf, 0x5, 0xe6, 0x4c, 0x3d, 0x97, 0x74, 0xde, 0xd5, 0x7f, 0x9c, 0x36, 0x47, 0xed, 0xe, 0xa4, 0xec, 0x46, 0xa5, 0xf, 0x7e, 0xd4, 0x37, 0x9d, 0xa7, 0xd, 0xee, 0x44, 0x35, 0x9f, 0x7c, 0xd6, 0x9e, 0x34, 0xd7, 0x7d, 0xc, 0xa6, 0x45, 0xef, 0x31, 0x9b, 0x78, 0xd2, 0xa3, 0x9, 0xea, 0x40, 0x8, 0xa2, 0x41, 0xeb, 0x9a, 0x30, 0xd3, 0x79, 0x43, 0xe9, 0xa, 0xa0, 0xd1, 0x7b, 0x98, 0x32, 0x7a, 0xd0, 0x33, 0x99, 0xe8, 0x42, 0xa1, 0xb, 0xb7, 0x1d, 0xfe, 0x54, 0x25, 0x8f, 0x6c, 0xc6, 0x8e, 0x24, 0xc7, 0x6d, 0x1c, 0xb6, 0x55, 0xff, 0xc5, 0x6f, 0x8c, 0x26, 0x57, 0xfd, 0x1e, 0xb4, 0xfc, 0x56, 0xb5, 0x1f, 0x6e, 0xc4, 0x27, 0x8d, 0x53, 0xf9, 0x1a, 0xb0, 0xc1, 0x6b, 0x88, 0x22, 0x6a, 0xc0, 0x23, 0x89, 0xf8, 0x52, 0xb1, 0x1b, 0x21, 0x8b, 0x68, 0xc2, 0xb3, 0x19, 0xfa, 0x50, 0x18, 0xb2, 0x51, 0xfb, 0x8a, 0x20, 0xc3, 0x69, 0x62, 0xc8, 0x2b, 0x81, 0xf0, 0x5a, 0xb9, 0x13, 0x5b, 0xf1, 0x12, 0xb8, 0xc9, 0x63, 0x80, 0x2a, 0x10, 0xba, 0x59, 0xf3, 0x82, 0x28, 0xcb, 0x61, 0x29, 0x83, 0x60, 0xca, 0xbb, 0x11, 0xf2, 0x58, 0x86, 0x2c, 0xcf, 0x65, 0x14, 0xbe, 0x5d, 0xf7, 0xbf, 0x15, 0xf6, 0x5c, 0x2d, 0x87, 0x64, 0xce, 0xf4, 0x5e, 0xbd, 0x17, 0x66, 0xcc, 0x2f, 0x85, 0xcd, 0x67, 0x84, 0x2e, 0x5f, 0xf5, 0x16, 0xbc},
+ {0x0, 0xab, 0x4b, 0xe0, 0x96, 0x3d, 0xdd, 0x76, 0x31, 0x9a, 0x7a, 0xd1, 0xa7, 0xc, 0xec, 0x47, 0x62, 0xc9, 0x29, 0x82, 0xf4, 0x5f, 0xbf, 0x14, 0x53, 0xf8, 0x18, 0xb3, 0xc5, 0x6e, 0x8e, 0x25, 0xc4, 0x6f, 0x8f, 0x24, 0x52, 0xf9, 0x19, 0xb2, 0xf5, 0x5e, 0xbe, 0x15, 0x63, 0xc8, 0x28, 0x83, 0xa6, 0xd, 0xed, 0x46, 0x30, 0x9b, 0x7b, 0xd0, 0x97, 0x3c, 0xdc, 0x77, 0x1, 0xaa, 0x4a, 0xe1, 0x95, 0x3e, 0xde, 0x75, 0x3, 0xa8, 0x48, 0xe3, 0xa4, 0xf, 0xef, 0x44, 0x32, 0x99, 0x79, 0xd2, 0xf7, 0x5c, 0xbc, 0x17, 0x61, 0xca, 0x2a, 0x81, 0xc6, 0x6d, 0x8d, 0x26, 0x50, 0xfb, 0x1b, 0xb0, 0x51, 0xfa, 0x1a, 0xb1, 0xc7, 0x6c, 0x8c, 0x27, 0x60, 0xcb, 0x2b, 0x80, 0xf6, 0x5d, 0xbd, 0x16, 0x33, 0x98, 0x78, 0xd3, 0xa5, 0xe, 0xee, 0x45, 0x2, 0xa9, 0x49, 0xe2, 0x94, 0x3f, 0xdf, 0x74, 0x37, 0x9c, 0x7c, 0xd7, 0xa1, 0xa, 0xea, 0x41, 0x6, 0xad, 0x4d, 0xe6, 0x90, 0x3b, 0xdb, 0x70, 0x55, 0xfe, 0x1e, 0xb5, 0xc3, 0x68, 0x88, 0x23, 0x64, 0xcf, 0x2f, 0x84, 0xf2, 0x59, 0xb9, 0x12, 0xf3, 0x58, 0xb8, 0x13, 0x65, 0xce, 0x2e, 0x85, 0xc2, 0x69, 0x89, 0x22, 0x54, 0xff, 0x1f, 0xb4, 0x91, 0x3a, 0xda, 0x71, 0x7, 0xac, 0x4c, 0xe7, 0xa0, 0xb, 0xeb, 0x40, 0x36, 0x9d, 0x7d, 0xd6, 0xa2, 0x9, 0xe9, 0x42, 0x34, 0x9f, 0x7f, 0xd4, 0x93, 0x38, 0xd8, 0x73, 0x5, 0xae, 0x4e, 0xe5, 0xc0, 0x6b, 0x8b, 0x20, 0x56, 0xfd, 0x1d, 0xb6, 0xf1, 0x5a, 0xba, 0x11, 0x67, 0xcc, 0x2c, 0x87, 0x66, 0xcd, 0x2d, 0x86, 0xf0, 0x5b, 0xbb, 0x10, 0x57, 0xfc, 0x1c, 0xb7, 0xc1, 0x6a, 0x8a, 0x21, 0x4, 0xaf, 0x4f, 0xe4, 0x92, 0x39, 0xd9, 0x72, 0x35, 0x9e, 0x7e, 0xd5, 0xa3, 0x8, 0xe8, 0x43},
+ {0x0, 0xac, 0x45, 0xe9, 0x8a, 0x26, 0xcf, 0x63, 0x9, 0xa5, 0x4c, 0xe0, 0x83, 0x2f, 0xc6, 0x6a, 0x12, 0xbe, 0x57, 0xfb, 0x98, 0x34, 0xdd, 0x71, 0x1b, 0xb7, 0x5e, 0xf2, 0x91, 0x3d, 0xd4, 0x78, 0x24, 0x88, 0x61, 0xcd, 0xae, 0x2, 0xeb, 0x47, 0x2d, 0x81, 0x68, 0xc4, 0xa7, 0xb, 0xe2, 0x4e, 0x36, 0x9a, 0x73, 0xdf, 0xbc, 0x10, 0xf9, 0x55, 0x3f, 0x93, 0x7a, 0xd6, 0xb5, 0x19, 0xf0, 0x5c, 0x48, 0xe4, 0xd, 0xa1, 0xc2, 0x6e, 0x87, 0x2b, 0x41, 0xed, 0x4, 0xa8, 0xcb, 0x67, 0x8e, 0x22, 0x5a, 0xf6, 0x1f, 0xb3, 0xd0, 0x7c, 0x95, 0x39, 0x53, 0xff, 0x16, 0xba, 0xd9, 0x75, 0x9c, 0x30, 0x6c, 0xc0, 0x29, 0x85, 0xe6, 0x4a, 0xa3, 0xf, 0x65, 0xc9, 0x20, 0x8c, 0xef, 0x43, 0xaa, 0x6, 0x7e, 0xd2, 0x3b, 0x97, 0xf4, 0x58, 0xb1, 0x1d, 0x77, 0xdb, 0x32, 0x9e, 0xfd, 0x51, 0xb8, 0x14, 0x90, 0x3c, 0xd5, 0x79, 0x1a, 0xb6, 0x5f, 0xf3, 0x99, 0x35, 0xdc, 0x70, 0x13, 0xbf, 0x56, 0xfa, 0x82, 0x2e, 0xc7, 0x6b, 0x8, 0xa4, 0x4d, 0xe1, 0x8b, 0x27, 0xce, 0x62, 0x1, 0xad, 0x44, 0xe8, 0xb4, 0x18, 0xf1, 0x5d, 0x3e, 0x92, 0x7b, 0xd7, 0xbd, 0x11, 0xf8, 0x54, 0x37, 0x9b, 0x72, 0xde, 0xa6, 0xa, 0xe3, 0x4f, 0x2c, 0x80, 0x69, 0xc5, 0xaf, 0x3, 0xea, 0x46, 0x25, 0x89, 0x60, 0xcc, 0xd8, 0x74, 0x9d, 0x31, 0x52, 0xfe, 0x17, 0xbb, 0xd1, 0x7d, 0x94, 0x38, 0x5b, 0xf7, 0x1e, 0xb2, 0xca, 0x66, 0x8f, 0x23, 0x40, 0xec, 0x5, 0xa9, 0xc3, 0x6f, 0x86, 0x2a, 0x49, 0xe5, 0xc, 0xa0, 0xfc, 0x50, 0xb9, 0x15, 0x76, 0xda, 0x33, 0x9f, 0xf5, 0x59, 0xb0, 0x1c, 0x7f, 0xd3, 0x3a, 0x96, 0xee, 0x42, 0xab, 0x7, 0x64, 0xc8, 0x21, 0x8d, 0xe7, 0x4b, 0xa2, 0xe, 0x6d, 0xc1, 0x28, 0x84},
+ {0x0, 0xad, 0x47, 0xea, 0x8e, 0x23, 0xc9, 0x64, 0x1, 0xac, 0x46, 0xeb, 0x8f, 0x22, 0xc8, 0x65, 0x2, 0xaf, 0x45, 0xe8, 0x8c, 0x21, 0xcb, 0x66, 0x3, 0xae, 0x44, 0xe9, 0x8d, 0x20, 0xca, 0x67, 0x4, 0xa9, 0x43, 0xee, 0x8a, 0x27, 0xcd, 0x60, 0x5, 0xa8, 0x42, 0xef, 0x8b, 0x26, 0xcc, 0x61, 0x6, 0xab, 0x41, 0xec, 0x88, 0x25, 0xcf, 0x62, 0x7, 0xaa, 0x40, 0xed, 0x89, 0x24, 0xce, 0x63, 0x8, 0xa5, 0x4f, 0xe2, 0x86, 0x2b, 0xc1, 0x6c, 0x9, 0xa4, 0x4e, 0xe3, 0x87, 0x2a, 0xc0, 0x6d, 0xa, 0xa7, 0x4d, 0xe0, 0x84, 0x29, 0xc3, 0x6e, 0xb, 0xa6, 0x4c, 0xe1, 0x85, 0x28, 0xc2, 0x6f, 0xc, 0xa1, 0x4b, 0xe6, 0x82, 0x2f, 0xc5, 0x68, 0xd, 0xa0, 0x4a, 0xe7, 0x83, 0x2e, 0xc4, 0x69, 0xe, 0xa3, 0x49, 0xe4, 0x80, 0x2d, 0xc7, 0x6a, 0xf, 0xa2, 0x48, 0xe5, 0x81, 0x2c, 0xc6, 0x6b, 0x10, 0xbd, 0x57, 0xfa, 0x9e, 0x33, 0xd9, 0x74, 0x11, 0xbc, 0x56, 0xfb, 0x9f, 0x32, 0xd8, 0x75, 0x12, 0xbf, 0x55, 0xf8, 0x9c, 0x31, 0xdb, 0x76, 0x13, 0xbe, 0x54, 0xf9, 0x9d, 0x30, 0xda, 0x77, 0x14, 0xb9, 0x53, 0xfe, 0x9a, 0x37, 0xdd, 0x70, 0x15, 0xb8, 0x52, 0xff, 0x9b, 0x36, 0xdc, 0x71, 0x16, 0xbb, 0x51, 0xfc, 0x98, 0x35, 0xdf, 0x72, 0x17, 0xba, 0x50, 0xfd, 0x99, 0x34, 0xde, 0x73, 0x18, 0xb5, 0x5f, 0xf2, 0x96, 0x3b, 0xd1, 0x7c, 0x19, 0xb4, 0x5e, 0xf3, 0x97, 0x3a, 0xd0, 0x7d, 0x1a, 0xb7, 0x5d, 0xf0, 0x94, 0x39, 0xd3, 0x7e, 0x1b, 0xb6, 0x5c, 0xf1, 0x95, 0x38, 0xd2, 0x7f, 0x1c, 0xb1, 0x5b, 0xf6, 0x92, 0x3f, 0xd5, 0x78, 0x1d, 0xb0, 0x5a, 0xf7, 0x93, 0x3e, 0xd4, 0x79, 0x1e, 0xb3, 0x59, 0xf4, 0x90, 0x3d, 0xd7, 0x7a, 0x1f, 0xb2, 0x58, 0xf5, 0x91, 0x3c, 0xd6, 0x7b},
+ {0x0, 0xae, 0x41, 0xef, 0x82, 0x2c, 0xc3, 0x6d, 0x19, 0xb7, 0x58, 0xf6, 0x9b, 0x35, 0xda, 0x74, 0x32, 0x9c, 0x73, 0xdd, 0xb0, 0x1e, 0xf1, 0x5f, 0x2b, 0x85, 0x6a, 0xc4, 0xa9, 0x7, 0xe8, 0x46, 0x64, 0xca, 0x25, 0x8b, 0xe6, 0x48, 0xa7, 0x9, 0x7d, 0xd3, 0x3c, 0x92, 0xff, 0x51, 0xbe, 0x10, 0x56, 0xf8, 0x17, 0xb9, 0xd4, 0x7a, 0x95, 0x3b, 0x4f, 0xe1, 0xe, 0xa0, 0xcd, 0x63, 0x8c, 0x22, 0xc8, 0x66, 0x89, 0x27, 0x4a, 0xe4, 0xb, 0xa5, 0xd1, 0x7f, 0x90, 0x3e, 0x53, 0xfd, 0x12, 0xbc, 0xfa, 0x54, 0xbb, 0x15, 0x78, 0xd6, 0x39, 0x97, 0xe3, 0x4d, 0xa2, 0xc, 0x61, 0xcf, 0x20, 0x8e, 0xac, 0x2, 0xed, 0x43, 0x2e, 0x80, 0x6f, 0xc1, 0xb5, 0x1b, 0xf4, 0x5a, 0x37, 0x99, 0x76, 0xd8, 0x9e, 0x30, 0xdf, 0x71, 0x1c, 0xb2, 0x5d, 0xf3, 0x87, 0x29, 0xc6, 0x68, 0x5, 0xab, 0x44, 0xea, 0x8d, 0x23, 0xcc, 0x62, 0xf, 0xa1, 0x4e, 0xe0, 0x94, 0x3a, 0xd5, 0x7b, 0x16, 0xb8, 0x57, 0xf9, 0xbf, 0x11, 0xfe, 0x50, 0x3d, 0x93, 0x7c, 0xd2, 0xa6, 0x8, 0xe7, 0x49, 0x24, 0x8a, 0x65, 0xcb, 0xe9, 0x47, 0xa8, 0x6, 0x6b, 0xc5, 0x2a, 0x84, 0xf0, 0x5e, 0xb1, 0x1f, 0x72, 0xdc, 0x33, 0x9d, 0xdb, 0x75, 0x9a, 0x34, 0x59, 0xf7, 0x18, 0xb6, 0xc2, 0x6c, 0x83, 0x2d, 0x40, 0xee, 0x1, 0xaf, 0x45, 0xeb, 0x4, 0xaa, 0xc7, 0x69, 0x86, 0x28, 0x5c, 0xf2, 0x1d, 0xb3, 0xde, 0x70, 0x9f, 0x31, 0x77, 0xd9, 0x36, 0x98, 0xf5, 0x5b, 0xb4, 0x1a, 0x6e, 0xc0, 0x2f, 0x81, 0xec, 0x42, 0xad, 0x3, 0x21, 0x8f, 0x60, 0xce, 0xa3, 0xd, 0xe2, 0x4c, 0x38, 0x96, 0x79, 0xd7, 0xba, 0x14, 0xfb, 0x55, 0x13, 0xbd, 0x52, 0xfc, 0x91, 0x3f, 0xd0, 0x7e, 0xa, 0xa4, 0x4b, 0xe5, 0x88, 0x26, 0xc9, 0x67},
+ {0x0, 0xaf, 0x43, 0xec, 0x86, 0x29, 0xc5, 0x6a, 0x11, 0xbe, 0x52, 0xfd, 0x97, 0x38, 0xd4, 0x7b, 0x22, 0x8d, 0x61, 0xce, 0xa4, 0xb, 0xe7, 0x48, 0x33, 0x9c, 0x70, 0xdf, 0xb5, 0x1a, 0xf6, 0x59, 0x44, 0xeb, 0x7, 0xa8, 0xc2, 0x6d, 0x81, 0x2e, 0x55, 0xfa, 0x16, 0xb9, 0xd3, 0x7c, 0x90, 0x3f, 0x66, 0xc9, 0x25, 0x8a, 0xe0, 0x4f, 0xa3, 0xc, 0x77, 0xd8, 0x34, 0x9b, 0xf1, 0x5e, 0xb2, 0x1d, 0x88, 0x27, 0xcb, 0x64, 0xe, 0xa1, 0x4d, 0xe2, 0x99, 0x36, 0xda, 0x75, 0x1f, 0xb0, 0x5c, 0xf3, 0xaa, 0x5, 0xe9, 0x46, 0x2c, 0x83, 0x6f, 0xc0, 0xbb, 0x14, 0xf8, 0x57, 0x3d, 0x92, 0x7e, 0xd1, 0xcc, 0x63, 0x8f, 0x20, 0x4a, 0xe5, 0x9, 0xa6, 0xdd, 0x72, 0x9e, 0x31, 0x5b, 0xf4, 0x18, 0xb7, 0xee, 0x41, 0xad, 0x2, 0x68, 0xc7, 0x2b, 0x84, 0xff, 0x50, 0xbc, 0x13, 0x79, 0xd6, 0x3a, 0x95, 0xd, 0xa2, 0x4e, 0xe1, 0x8b, 0x24, 0xc8, 0x67, 0x1c, 0xb3, 0x5f, 0xf0, 0x9a, 0x35, 0xd9, 0x76, 0x2f, 0x80, 0x6c, 0xc3, 0xa9, 0x6, 0xea, 0x45, 0x3e, 0x91, 0x7d, 0xd2, 0xb8, 0x17, 0xfb, 0x54, 0x49, 0xe6, 0xa, 0xa5, 0xcf, 0x60, 0x8c, 0x23, 0x58, 0xf7, 0x1b, 0xb4, 0xde, 0x71, 0x9d, 0x32, 0x6b, 0xc4, 0x28, 0x87, 0xed, 0x42, 0xae, 0x1, 0x7a, 0xd5, 0x39, 0x96, 0xfc, 0x53, 0xbf, 0x10, 0x85, 0x2a, 0xc6, 0x69, 0x3, 0xac, 0x40, 0xef, 0x94, 0x3b, 0xd7, 0x78, 0x12, 0xbd, 0x51, 0xfe, 0xa7, 0x8, 0xe4, 0x4b, 0x21, 0x8e, 0x62, 0xcd, 0xb6, 0x19, 0xf5, 0x5a, 0x30, 0x9f, 0x73, 0xdc, 0xc1, 0x6e, 0x82, 0x2d, 0x47, 0xe8, 0x4, 0xab, 0xd0, 0x7f, 0x93, 0x3c, 0x56, 0xf9, 0x15, 0xba, 0xe3, 0x4c, 0xa0, 0xf, 0x65, 0xca, 0x26, 0x89, 0xf2, 0x5d, 0xb1, 0x1e, 0x74, 0xdb, 0x37, 0x98},
+ {0x0, 0xb0, 0x7d, 0xcd, 0xfa, 0x4a, 0x87, 0x37, 0xe9, 0x59, 0x94, 0x24, 0x13, 0xa3, 0x6e, 0xde, 0xcf, 0x7f, 0xb2, 0x2, 0x35, 0x85, 0x48, 0xf8, 0x26, 0x96, 0x5b, 0xeb, 0xdc, 0x6c, 0xa1, 0x11, 0x83, 0x33, 0xfe, 0x4e, 0x79, 0xc9, 0x4, 0xb4, 0x6a, 0xda, 0x17, 0xa7, 0x90, 0x20, 0xed, 0x5d, 0x4c, 0xfc, 0x31, 0x81, 0xb6, 0x6, 0xcb, 0x7b, 0xa5, 0x15, 0xd8, 0x68, 0x5f, 0xef, 0x22, 0x92, 0x1b, 0xab, 0x66, 0xd6, 0xe1, 0x51, 0x9c, 0x2c, 0xf2, 0x42, 0x8f, 0x3f, 0x8, 0xb8, 0x75, 0xc5, 0xd4, 0x64, 0xa9, 0x19, 0x2e, 0x9e, 0x53, 0xe3, 0x3d, 0x8d, 0x40, 0xf0, 0xc7, 0x77, 0xba, 0xa, 0x98, 0x28, 0xe5, 0x55, 0x62, 0xd2, 0x1f, 0xaf, 0x71, 0xc1, 0xc, 0xbc, 0x8b, 0x3b, 0xf6, 0x46, 0x57, 0xe7, 0x2a, 0x9a, 0xad, 0x1d, 0xd0, 0x60, 0xbe, 0xe, 0xc3, 0x73, 0x44, 0xf4, 0x39, 0x89, 0x36, 0x86, 0x4b, 0xfb, 0xcc, 0x7c, 0xb1, 0x1, 0xdf, 0x6f, 0xa2, 0x12, 0x25, 0x95, 0x58, 0xe8, 0xf9, 0x49, 0x84, 0x34, 0x3, 0xb3, 0x7e, 0xce, 0x10, 0xa0, 0x6d, 0xdd, 0xea, 0x5a, 0x97, 0x27, 0xb5, 0x5, 0xc8, 0x78, 0x4f, 0xff, 0x32, 0x82, 0x5c, 0xec, 0x21, 0x91, 0xa6, 0x16, 0xdb, 0x6b, 0x7a, 0xca, 0x7, 0xb7, 0x80, 0x30, 0xfd, 0x4d, 0x93, 0x23, 0xee, 0x5e, 0x69, 0xd9, 0x14, 0xa4, 0x2d, 0x9d, 0x50, 0xe0, 0xd7, 0x67, 0xaa, 0x1a, 0xc4, 0x74, 0xb9, 0x9, 0x3e, 0x8e, 0x43, 0xf3, 0xe2, 0x52, 0x9f, 0x2f, 0x18, 0xa8, 0x65, 0xd5, 0xb, 0xbb, 0x76, 0xc6, 0xf1, 0x41, 0x8c, 0x3c, 0xae, 0x1e, 0xd3, 0x63, 0x54, 0xe4, 0x29, 0x99, 0x47, 0xf7, 0x3a, 0x8a, 0xbd, 0xd, 0xc0, 0x70, 0x61, 0xd1, 0x1c, 0xac, 0x9b, 0x2b, 0xe6, 0x56, 0x88, 0x38, 0xf5, 0x45, 0x72, 0xc2, 0xf, 0xbf},
+ {0x0, 0xb1, 0x7f, 0xce, 0xfe, 0x4f, 0x81, 0x30, 0xe1, 0x50, 0x9e, 0x2f, 0x1f, 0xae, 0x60, 0xd1, 0xdf, 0x6e, 0xa0, 0x11, 0x21, 0x90, 0x5e, 0xef, 0x3e, 0x8f, 0x41, 0xf0, 0xc0, 0x71, 0xbf, 0xe, 0xa3, 0x12, 0xdc, 0x6d, 0x5d, 0xec, 0x22, 0x93, 0x42, 0xf3, 0x3d, 0x8c, 0xbc, 0xd, 0xc3, 0x72, 0x7c, 0xcd, 0x3, 0xb2, 0x82, 0x33, 0xfd, 0x4c, 0x9d, 0x2c, 0xe2, 0x53, 0x63, 0xd2, 0x1c, 0xad, 0x5b, 0xea, 0x24, 0x95, 0xa5, 0x14, 0xda, 0x6b, 0xba, 0xb, 0xc5, 0x74, 0x44, 0xf5, 0x3b, 0x8a, 0x84, 0x35, 0xfb, 0x4a, 0x7a, 0xcb, 0x5, 0xb4, 0x65, 0xd4, 0x1a, 0xab, 0x9b, 0x2a, 0xe4, 0x55, 0xf8, 0x49, 0x87, 0x36, 0x6, 0xb7, 0x79, 0xc8, 0x19, 0xa8, 0x66, 0xd7, 0xe7, 0x56, 0x98, 0x29, 0x27, 0x96, 0x58, 0xe9, 0xd9, 0x68, 0xa6, 0x17, 0xc6, 0x77, 0xb9, 0x8, 0x38, 0x89, 0x47, 0xf6, 0xb6, 0x7, 0xc9, 0x78, 0x48, 0xf9, 0x37, 0x86, 0x57, 0xe6, 0x28, 0x99, 0xa9, 0x18, 0xd6, 0x67, 0x69, 0xd8, 0x16, 0xa7, 0x97, 0x26, 0xe8, 0x59, 0x88, 0x39, 0xf7, 0x46, 0x76, 0xc7, 0x9, 0xb8, 0x15, 0xa4, 0x6a, 0xdb, 0xeb, 0x5a, 0x94, 0x25, 0xf4, 0x45, 0x8b, 0x3a, 0xa, 0xbb, 0x75, 0xc4, 0xca, 0x7b, 0xb5, 0x4, 0x34, 0x85, 0x4b, 0xfa, 0x2b, 0x9a, 0x54, 0xe5, 0xd5, 0x64, 0xaa, 0x1b, 0xed, 0x5c, 0x92, 0x23, 0x13, 0xa2, 0x6c, 0xdd, 0xc, 0xbd, 0x73, 0xc2, 0xf2, 0x43, 0x8d, 0x3c, 0x32, 0x83, 0x4d, 0xfc, 0xcc, 0x7d, 0xb3, 0x2, 0xd3, 0x62, 0xac, 0x1d, 0x2d, 0x9c, 0x52, 0xe3, 0x4e, 0xff, 0x31, 0x80, 0xb0, 0x1, 0xcf, 0x7e, 0xaf, 0x1e, 0xd0, 0x61, 0x51, 0xe0, 0x2e, 0x9f, 0x91, 0x20, 0xee, 0x5f, 0x6f, 0xde, 0x10, 0xa1, 0x70, 0xc1, 0xf, 0xbe, 0x8e, 0x3f, 0xf1, 0x40},
+ {0x0, 0xb2, 0x79, 0xcb, 0xf2, 0x40, 0x8b, 0x39, 0xf9, 0x4b, 0x80, 0x32, 0xb, 0xb9, 0x72, 0xc0, 0xef, 0x5d, 0x96, 0x24, 0x1d, 0xaf, 0x64, 0xd6, 0x16, 0xa4, 0x6f, 0xdd, 0xe4, 0x56, 0x9d, 0x2f, 0xc3, 0x71, 0xba, 0x8, 0x31, 0x83, 0x48, 0xfa, 0x3a, 0x88, 0x43, 0xf1, 0xc8, 0x7a, 0xb1, 0x3, 0x2c, 0x9e, 0x55, 0xe7, 0xde, 0x6c, 0xa7, 0x15, 0xd5, 0x67, 0xac, 0x1e, 0x27, 0x95, 0x5e, 0xec, 0x9b, 0x29, 0xe2, 0x50, 0x69, 0xdb, 0x10, 0xa2, 0x62, 0xd0, 0x1b, 0xa9, 0x90, 0x22, 0xe9, 0x5b, 0x74, 0xc6, 0xd, 0xbf, 0x86, 0x34, 0xff, 0x4d, 0x8d, 0x3f, 0xf4, 0x46, 0x7f, 0xcd, 0x6, 0xb4, 0x58, 0xea, 0x21, 0x93, 0xaa, 0x18, 0xd3, 0x61, 0xa1, 0x13, 0xd8, 0x6a, 0x53, 0xe1, 0x2a, 0x98, 0xb7, 0x5, 0xce, 0x7c, 0x45, 0xf7, 0x3c, 0x8e, 0x4e, 0xfc, 0x37, 0x85, 0xbc, 0xe, 0xc5, 0x77, 0x2b, 0x99, 0x52, 0xe0, 0xd9, 0x6b, 0xa0, 0x12, 0xd2, 0x60, 0xab, 0x19, 0x20, 0x92, 0x59, 0xeb, 0xc4, 0x76, 0xbd, 0xf, 0x36, 0x84, 0x4f, 0xfd, 0x3d, 0x8f, 0x44, 0xf6, 0xcf, 0x7d, 0xb6, 0x4, 0xe8, 0x5a, 0x91, 0x23, 0x1a, 0xa8, 0x63, 0xd1, 0x11, 0xa3, 0x68, 0xda, 0xe3, 0x51, 0x9a, 0x28, 0x7, 0xb5, 0x7e, 0xcc, 0xf5, 0x47, 0x8c, 0x3e, 0xfe, 0x4c, 0x87, 0x35, 0xc, 0xbe, 0x75, 0xc7, 0xb0, 0x2, 0xc9, 0x7b, 0x42, 0xf0, 0x3b, 0x89, 0x49, 0xfb, 0x30, 0x82, 0xbb, 0x9, 0xc2, 0x70, 0x5f, 0xed, 0x26, 0x94, 0xad, 0x1f, 0xd4, 0x66, 0xa6, 0x14, 0xdf, 0x6d, 0x54, 0xe6, 0x2d, 0x9f, 0x73, 0xc1, 0xa, 0xb8, 0x81, 0x33, 0xf8, 0x4a, 0x8a, 0x38, 0xf3, 0x41, 0x78, 0xca, 0x1, 0xb3, 0x9c, 0x2e, 0xe5, 0x57, 0x6e, 0xdc, 0x17, 0xa5, 0x65, 0xd7, 0x1c, 0xae, 0x97, 0x25, 0xee, 0x5c},
+ {0x0, 0xb3, 0x7b, 0xc8, 0xf6, 0x45, 0x8d, 0x3e, 0xf1, 0x42, 0x8a, 0x39, 0x7, 0xb4, 0x7c, 0xcf, 0xff, 0x4c, 0x84, 0x37, 0x9, 0xba, 0x72, 0xc1, 0xe, 0xbd, 0x75, 0xc6, 0xf8, 0x4b, 0x83, 0x30, 0xe3, 0x50, 0x98, 0x2b, 0x15, 0xa6, 0x6e, 0xdd, 0x12, 0xa1, 0x69, 0xda, 0xe4, 0x57, 0x9f, 0x2c, 0x1c, 0xaf, 0x67, 0xd4, 0xea, 0x59, 0x91, 0x22, 0xed, 0x5e, 0x96, 0x25, 0x1b, 0xa8, 0x60, 0xd3, 0xdb, 0x68, 0xa0, 0x13, 0x2d, 0x9e, 0x56, 0xe5, 0x2a, 0x99, 0x51, 0xe2, 0xdc, 0x6f, 0xa7, 0x14, 0x24, 0x97, 0x5f, 0xec, 0xd2, 0x61, 0xa9, 0x1a, 0xd5, 0x66, 0xae, 0x1d, 0x23, 0x90, 0x58, 0xeb, 0x38, 0x8b, 0x43, 0xf0, 0xce, 0x7d, 0xb5, 0x6, 0xc9, 0x7a, 0xb2, 0x1, 0x3f, 0x8c, 0x44, 0xf7, 0xc7, 0x74, 0xbc, 0xf, 0x31, 0x82, 0x4a, 0xf9, 0x36, 0x85, 0x4d, 0xfe, 0xc0, 0x73, 0xbb, 0x8, 0xab, 0x18, 0xd0, 0x63, 0x5d, 0xee, 0x26, 0x95, 0x5a, 0xe9, 0x21, 0x92, 0xac, 0x1f, 0xd7, 0x64, 0x54, 0xe7, 0x2f, 0x9c, 0xa2, 0x11, 0xd9, 0x6a, 0xa5, 0x16, 0xde, 0x6d, 0x53, 0xe0, 0x28, 0x9b, 0x48, 0xfb, 0x33, 0x80, 0xbe, 0xd, 0xc5, 0x76, 0xb9, 0xa, 0xc2, 0x71, 0x4f, 0xfc, 0x34, 0x87, 0xb7, 0x4, 0xcc, 0x7f, 0x41, 0xf2, 0x3a, 0x89, 0x46, 0xf5, 0x3d, 0x8e, 0xb0, 0x3, 0xcb, 0x78, 0x70, 0xc3, 0xb, 0xb8, 0x86, 0x35, 0xfd, 0x4e, 0x81, 0x32, 0xfa, 0x49, 0x77, 0xc4, 0xc, 0xbf, 0x8f, 0x3c, 0xf4, 0x47, 0x79, 0xca, 0x2, 0xb1, 0x7e, 0xcd, 0x5, 0xb6, 0x88, 0x3b, 0xf3, 0x40, 0x93, 0x20, 0xe8, 0x5b, 0x65, 0xd6, 0x1e, 0xad, 0x62, 0xd1, 0x19, 0xaa, 0x94, 0x27, 0xef, 0x5c, 0x6c, 0xdf, 0x17, 0xa4, 0x9a, 0x29, 0xe1, 0x52, 0x9d, 0x2e, 0xe6, 0x55, 0x6b, 0xd8, 0x10, 0xa3},
+ {0x0, 0xb4, 0x75, 0xc1, 0xea, 0x5e, 0x9f, 0x2b, 0xc9, 0x7d, 0xbc, 0x8, 0x23, 0x97, 0x56, 0xe2, 0x8f, 0x3b, 0xfa, 0x4e, 0x65, 0xd1, 0x10, 0xa4, 0x46, 0xf2, 0x33, 0x87, 0xac, 0x18, 0xd9, 0x6d, 0x3, 0xb7, 0x76, 0xc2, 0xe9, 0x5d, 0x9c, 0x28, 0xca, 0x7e, 0xbf, 0xb, 0x20, 0x94, 0x55, 0xe1, 0x8c, 0x38, 0xf9, 0x4d, 0x66, 0xd2, 0x13, 0xa7, 0x45, 0xf1, 0x30, 0x84, 0xaf, 0x1b, 0xda, 0x6e, 0x6, 0xb2, 0x73, 0xc7, 0xec, 0x58, 0x99, 0x2d, 0xcf, 0x7b, 0xba, 0xe, 0x25, 0x91, 0x50, 0xe4, 0x89, 0x3d, 0xfc, 0x48, 0x63, 0xd7, 0x16, 0xa2, 0x40, 0xf4, 0x35, 0x81, 0xaa, 0x1e, 0xdf, 0x6b, 0x5, 0xb1, 0x70, 0xc4, 0xef, 0x5b, 0x9a, 0x2e, 0xcc, 0x78, 0xb9, 0xd, 0x26, 0x92, 0x53, 0xe7, 0x8a, 0x3e, 0xff, 0x4b, 0x60, 0xd4, 0x15, 0xa1, 0x43, 0xf7, 0x36, 0x82, 0xa9, 0x1d, 0xdc, 0x68, 0xc, 0xb8, 0x79, 0xcd, 0xe6, 0x52, 0x93, 0x27, 0xc5, 0x71, 0xb0, 0x4, 0x2f, 0x9b, 0x5a, 0xee, 0x83, 0x37, 0xf6, 0x42, 0x69, 0xdd, 0x1c, 0xa8, 0x4a, 0xfe, 0x3f, 0x8b, 0xa0, 0x14, 0xd5, 0x61, 0xf, 0xbb, 0x7a, 0xce, 0xe5, 0x51, 0x90, 0x24, 0xc6, 0x72, 0xb3, 0x7, 0x2c, 0x98, 0x59, 0xed, 0x80, 0x34, 0xf5, 0x41, 0x6a, 0xde, 0x1f, 0xab, 0x49, 0xfd, 0x3c, 0x88, 0xa3, 0x17, 0xd6, 0x62, 0xa, 0xbe, 0x7f, 0xcb, 0xe0, 0x54, 0x95, 0x21, 0xc3, 0x77, 0xb6, 0x2, 0x29, 0x9d, 0x5c, 0xe8, 0x85, 0x31, 0xf0, 0x44, 0x6f, 0xdb, 0x1a, 0xae, 0x4c, 0xf8, 0x39, 0x8d, 0xa6, 0x12, 0xd3, 0x67, 0x9, 0xbd, 0x7c, 0xc8, 0xe3, 0x57, 0x96, 0x22, 0xc0, 0x74, 0xb5, 0x1, 0x2a, 0x9e, 0x5f, 0xeb, 0x86, 0x32, 0xf3, 0x47, 0x6c, 0xd8, 0x19, 0xad, 0x4f, 0xfb, 0x3a, 0x8e, 0xa5, 0x11, 0xd0, 0x64},
+ {0x0, 0xb5, 0x77, 0xc2, 0xee, 0x5b, 0x99, 0x2c, 0xc1, 0x74, 0xb6, 0x3, 0x2f, 0x9a, 0x58, 0xed, 0x9f, 0x2a, 0xe8, 0x5d, 0x71, 0xc4, 0x6, 0xb3, 0x5e, 0xeb, 0x29, 0x9c, 0xb0, 0x5, 0xc7, 0x72, 0x23, 0x96, 0x54, 0xe1, 0xcd, 0x78, 0xba, 0xf, 0xe2, 0x57, 0x95, 0x20, 0xc, 0xb9, 0x7b, 0xce, 0xbc, 0x9, 0xcb, 0x7e, 0x52, 0xe7, 0x25, 0x90, 0x7d, 0xc8, 0xa, 0xbf, 0x93, 0x26, 0xe4, 0x51, 0x46, 0xf3, 0x31, 0x84, 0xa8, 0x1d, 0xdf, 0x6a, 0x87, 0x32, 0xf0, 0x45, 0x69, 0xdc, 0x1e, 0xab, 0xd9, 0x6c, 0xae, 0x1b, 0x37, 0x82, 0x40, 0xf5, 0x18, 0xad, 0x6f, 0xda, 0xf6, 0x43, 0x81, 0x34, 0x65, 0xd0, 0x12, 0xa7, 0x8b, 0x3e, 0xfc, 0x49, 0xa4, 0x11, 0xd3, 0x66, 0x4a, 0xff, 0x3d, 0x88, 0xfa, 0x4f, 0x8d, 0x38, 0x14, 0xa1, 0x63, 0xd6, 0x3b, 0x8e, 0x4c, 0xf9, 0xd5, 0x60, 0xa2, 0x17, 0x8c, 0x39, 0xfb, 0x4e, 0x62, 0xd7, 0x15, 0xa0, 0x4d, 0xf8, 0x3a, 0x8f, 0xa3, 0x16, 0xd4, 0x61, 0x13, 0xa6, 0x64, 0xd1, 0xfd, 0x48, 0x8a, 0x3f, 0xd2, 0x67, 0xa5, 0x10, 0x3c, 0x89, 0x4b, 0xfe, 0xaf, 0x1a, 0xd8, 0x6d, 0x41, 0xf4, 0x36, 0x83, 0x6e, 0xdb, 0x19, 0xac, 0x80, 0x35, 0xf7, 0x42, 0x30, 0x85, 0x47, 0xf2, 0xde, 0x6b, 0xa9, 0x1c, 0xf1, 0x44, 0x86, 0x33, 0x1f, 0xaa, 0x68, 0xdd, 0xca, 0x7f, 0xbd, 0x8, 0x24, 0x91, 0x53, 0xe6, 0xb, 0xbe, 0x7c, 0xc9, 0xe5, 0x50, 0x92, 0x27, 0x55, 0xe0, 0x22, 0x97, 0xbb, 0xe, 0xcc, 0x79, 0x94, 0x21, 0xe3, 0x56, 0x7a, 0xcf, 0xd, 0xb8, 0xe9, 0x5c, 0x9e, 0x2b, 0x7, 0xb2, 0x70, 0xc5, 0x28, 0x9d, 0x5f, 0xea, 0xc6, 0x73, 0xb1, 0x4, 0x76, 0xc3, 0x1, 0xb4, 0x98, 0x2d, 0xef, 0x5a, 0xb7, 0x2, 0xc0, 0x75, 0x59, 0xec, 0x2e, 0x9b},
+ {0x0, 0xb6, 0x71, 0xc7, 0xe2, 0x54, 0x93, 0x25, 0xd9, 0x6f, 0xa8, 0x1e, 0x3b, 0x8d, 0x4a, 0xfc, 0xaf, 0x19, 0xde, 0x68, 0x4d, 0xfb, 0x3c, 0x8a, 0x76, 0xc0, 0x7, 0xb1, 0x94, 0x22, 0xe5, 0x53, 0x43, 0xf5, 0x32, 0x84, 0xa1, 0x17, 0xd0, 0x66, 0x9a, 0x2c, 0xeb, 0x5d, 0x78, 0xce, 0x9, 0xbf, 0xec, 0x5a, 0x9d, 0x2b, 0xe, 0xb8, 0x7f, 0xc9, 0x35, 0x83, 0x44, 0xf2, 0xd7, 0x61, 0xa6, 0x10, 0x86, 0x30, 0xf7, 0x41, 0x64, 0xd2, 0x15, 0xa3, 0x5f, 0xe9, 0x2e, 0x98, 0xbd, 0xb, 0xcc, 0x7a, 0x29, 0x9f, 0x58, 0xee, 0xcb, 0x7d, 0xba, 0xc, 0xf0, 0x46, 0x81, 0x37, 0x12, 0xa4, 0x63, 0xd5, 0xc5, 0x73, 0xb4, 0x2, 0x27, 0x91, 0x56, 0xe0, 0x1c, 0xaa, 0x6d, 0xdb, 0xfe, 0x48, 0x8f, 0x39, 0x6a, 0xdc, 0x1b, 0xad, 0x88, 0x3e, 0xf9, 0x4f, 0xb3, 0x5, 0xc2, 0x74, 0x51, 0xe7, 0x20, 0x96, 0x11, 0xa7, 0x60, 0xd6, 0xf3, 0x45, 0x82, 0x34, 0xc8, 0x7e, 0xb9, 0xf, 0x2a, 0x9c, 0x5b, 0xed, 0xbe, 0x8, 0xcf, 0x79, 0x5c, 0xea, 0x2d, 0x9b, 0x67, 0xd1, 0x16, 0xa0, 0x85, 0x33, 0xf4, 0x42, 0x52, 0xe4, 0x23, 0x95, 0xb0, 0x6, 0xc1, 0x77, 0x8b, 0x3d, 0xfa, 0x4c, 0x69, 0xdf, 0x18, 0xae, 0xfd, 0x4b, 0x8c, 0x3a, 0x1f, 0xa9, 0x6e, 0xd8, 0x24, 0x92, 0x55, 0xe3, 0xc6, 0x70, 0xb7, 0x1, 0x97, 0x21, 0xe6, 0x50, 0x75, 0xc3, 0x4, 0xb2, 0x4e, 0xf8, 0x3f, 0x89, 0xac, 0x1a, 0xdd, 0x6b, 0x38, 0x8e, 0x49, 0xff, 0xda, 0x6c, 0xab, 0x1d, 0xe1, 0x57, 0x90, 0x26, 0x3, 0xb5, 0x72, 0xc4, 0xd4, 0x62, 0xa5, 0x13, 0x36, 0x80, 0x47, 0xf1, 0xd, 0xbb, 0x7c, 0xca, 0xef, 0x59, 0x9e, 0x28, 0x7b, 0xcd, 0xa, 0xbc, 0x99, 0x2f, 0xe8, 0x5e, 0xa2, 0x14, 0xd3, 0x65, 0x40, 0xf6, 0x31, 0x87},
+ {0x0, 0xb7, 0x73, 0xc4, 0xe6, 0x51, 0x95, 0x22, 0xd1, 0x66, 0xa2, 0x15, 0x37, 0x80, 0x44, 0xf3, 0xbf, 0x8, 0xcc, 0x7b, 0x59, 0xee, 0x2a, 0x9d, 0x6e, 0xd9, 0x1d, 0xaa, 0x88, 0x3f, 0xfb, 0x4c, 0x63, 0xd4, 0x10, 0xa7, 0x85, 0x32, 0xf6, 0x41, 0xb2, 0x5, 0xc1, 0x76, 0x54, 0xe3, 0x27, 0x90, 0xdc, 0x6b, 0xaf, 0x18, 0x3a, 0x8d, 0x49, 0xfe, 0xd, 0xba, 0x7e, 0xc9, 0xeb, 0x5c, 0x98, 0x2f, 0xc6, 0x71, 0xb5, 0x2, 0x20, 0x97, 0x53, 0xe4, 0x17, 0xa0, 0x64, 0xd3, 0xf1, 0x46, 0x82, 0x35, 0x79, 0xce, 0xa, 0xbd, 0x9f, 0x28, 0xec, 0x5b, 0xa8, 0x1f, 0xdb, 0x6c, 0x4e, 0xf9, 0x3d, 0x8a, 0xa5, 0x12, 0xd6, 0x61, 0x43, 0xf4, 0x30, 0x87, 0x74, 0xc3, 0x7, 0xb0, 0x92, 0x25, 0xe1, 0x56, 0x1a, 0xad, 0x69, 0xde, 0xfc, 0x4b, 0x8f, 0x38, 0xcb, 0x7c, 0xb8, 0xf, 0x2d, 0x9a, 0x5e, 0xe9, 0x91, 0x26, 0xe2, 0x55, 0x77, 0xc0, 0x4, 0xb3, 0x40, 0xf7, 0x33, 0x84, 0xa6, 0x11, 0xd5, 0x62, 0x2e, 0x99, 0x5d, 0xea, 0xc8, 0x7f, 0xbb, 0xc, 0xff, 0x48, 0x8c, 0x3b, 0x19, 0xae, 0x6a, 0xdd, 0xf2, 0x45, 0x81, 0x36, 0x14, 0xa3, 0x67, 0xd0, 0x23, 0x94, 0x50, 0xe7, 0xc5, 0x72, 0xb6, 0x1, 0x4d, 0xfa, 0x3e, 0x89, 0xab, 0x1c, 0xd8, 0x6f, 0x9c, 0x2b, 0xef, 0x58, 0x7a, 0xcd, 0x9, 0xbe, 0x57, 0xe0, 0x24, 0x93, 0xb1, 0x6, 0xc2, 0x75, 0x86, 0x31, 0xf5, 0x42, 0x60, 0xd7, 0x13, 0xa4, 0xe8, 0x5f, 0x9b, 0x2c, 0xe, 0xb9, 0x7d, 0xca, 0x39, 0x8e, 0x4a, 0xfd, 0xdf, 0x68, 0xac, 0x1b, 0x34, 0x83, 0x47, 0xf0, 0xd2, 0x65, 0xa1, 0x16, 0xe5, 0x52, 0x96, 0x21, 0x3, 0xb4, 0x70, 0xc7, 0x8b, 0x3c, 0xf8, 0x4f, 0x6d, 0xda, 0x1e, 0xa9, 0x5a, 0xed, 0x29, 0x9e, 0xbc, 0xb, 0xcf, 0x78},
+ {0x0, 0xb8, 0x6d, 0xd5, 0xda, 0x62, 0xb7, 0xf, 0xa9, 0x11, 0xc4, 0x7c, 0x73, 0xcb, 0x1e, 0xa6, 0x4f, 0xf7, 0x22, 0x9a, 0x95, 0x2d, 0xf8, 0x40, 0xe6, 0x5e, 0x8b, 0x33, 0x3c, 0x84, 0x51, 0xe9, 0x9e, 0x26, 0xf3, 0x4b, 0x44, 0xfc, 0x29, 0x91, 0x37, 0x8f, 0x5a, 0xe2, 0xed, 0x55, 0x80, 0x38, 0xd1, 0x69, 0xbc, 0x4, 0xb, 0xb3, 0x66, 0xde, 0x78, 0xc0, 0x15, 0xad, 0xa2, 0x1a, 0xcf, 0x77, 0x21, 0x99, 0x4c, 0xf4, 0xfb, 0x43, 0x96, 0x2e, 0x88, 0x30, 0xe5, 0x5d, 0x52, 0xea, 0x3f, 0x87, 0x6e, 0xd6, 0x3, 0xbb, 0xb4, 0xc, 0xd9, 0x61, 0xc7, 0x7f, 0xaa, 0x12, 0x1d, 0xa5, 0x70, 0xc8, 0xbf, 0x7, 0xd2, 0x6a, 0x65, 0xdd, 0x8, 0xb0, 0x16, 0xae, 0x7b, 0xc3, 0xcc, 0x74, 0xa1, 0x19, 0xf0, 0x48, 0x9d, 0x25, 0x2a, 0x92, 0x47, 0xff, 0x59, 0xe1, 0x34, 0x8c, 0x83, 0x3b, 0xee, 0x56, 0x42, 0xfa, 0x2f, 0x97, 0x98, 0x20, 0xf5, 0x4d, 0xeb, 0x53, 0x86, 0x3e, 0x31, 0x89, 0x5c, 0xe4, 0xd, 0xb5, 0x60, 0xd8, 0xd7, 0x6f, 0xba, 0x2, 0xa4, 0x1c, 0xc9, 0x71, 0x7e, 0xc6, 0x13, 0xab, 0xdc, 0x64, 0xb1, 0x9, 0x6, 0xbe, 0x6b, 0xd3, 0x75, 0xcd, 0x18, 0xa0, 0xaf, 0x17, 0xc2, 0x7a, 0x93, 0x2b, 0xfe, 0x46, 0x49, 0xf1, 0x24, 0x9c, 0x3a, 0x82, 0x57, 0xef, 0xe0, 0x58, 0x8d, 0x35, 0x63, 0xdb, 0xe, 0xb6, 0xb9, 0x1, 0xd4, 0x6c, 0xca, 0x72, 0xa7, 0x1f, 0x10, 0xa8, 0x7d, 0xc5, 0x2c, 0x94, 0x41, 0xf9, 0xf6, 0x4e, 0x9b, 0x23, 0x85, 0x3d, 0xe8, 0x50, 0x5f, 0xe7, 0x32, 0x8a, 0xfd, 0x45, 0x90, 0x28, 0x27, 0x9f, 0x4a, 0xf2, 0x54, 0xec, 0x39, 0x81, 0x8e, 0x36, 0xe3, 0x5b, 0xb2, 0xa, 0xdf, 0x67, 0x68, 0xd0, 0x5, 0xbd, 0x1b, 0xa3, 0x76, 0xce, 0xc1, 0x79, 0xac, 0x14},
+ {0x0, 0xb9, 0x6f, 0xd6, 0xde, 0x67, 0xb1, 0x8, 0xa1, 0x18, 0xce, 0x77, 0x7f, 0xc6, 0x10, 0xa9, 0x5f, 0xe6, 0x30, 0x89, 0x81, 0x38, 0xee, 0x57, 0xfe, 0x47, 0x91, 0x28, 0x20, 0x99, 0x4f, 0xf6, 0xbe, 0x7, 0xd1, 0x68, 0x60, 0xd9, 0xf, 0xb6, 0x1f, 0xa6, 0x70, 0xc9, 0xc1, 0x78, 0xae, 0x17, 0xe1, 0x58, 0x8e, 0x37, 0x3f, 0x86, 0x50, 0xe9, 0x40, 0xf9, 0x2f, 0x96, 0x9e, 0x27, 0xf1, 0x48, 0x61, 0xd8, 0xe, 0xb7, 0xbf, 0x6, 0xd0, 0x69, 0xc0, 0x79, 0xaf, 0x16, 0x1e, 0xa7, 0x71, 0xc8, 0x3e, 0x87, 0x51, 0xe8, 0xe0, 0x59, 0x8f, 0x36, 0x9f, 0x26, 0xf0, 0x49, 0x41, 0xf8, 0x2e, 0x97, 0xdf, 0x66, 0xb0, 0x9, 0x1, 0xb8, 0x6e, 0xd7, 0x7e, 0xc7, 0x11, 0xa8, 0xa0, 0x19, 0xcf, 0x76, 0x80, 0x39, 0xef, 0x56, 0x5e, 0xe7, 0x31, 0x88, 0x21, 0x98, 0x4e, 0xf7, 0xff, 0x46, 0x90, 0x29, 0xc2, 0x7b, 0xad, 0x14, 0x1c, 0xa5, 0x73, 0xca, 0x63, 0xda, 0xc, 0xb5, 0xbd, 0x4, 0xd2, 0x6b, 0x9d, 0x24, 0xf2, 0x4b, 0x43, 0xfa, 0x2c, 0x95, 0x3c, 0x85, 0x53, 0xea, 0xe2, 0x5b, 0x8d, 0x34, 0x7c, 0xc5, 0x13, 0xaa, 0xa2, 0x1b, 0xcd, 0x74, 0xdd, 0x64, 0xb2, 0xb, 0x3, 0xba, 0x6c, 0xd5, 0x23, 0x9a, 0x4c, 0xf5, 0xfd, 0x44, 0x92, 0x2b, 0x82, 0x3b, 0xed, 0x54, 0x5c, 0xe5, 0x33, 0x8a, 0xa3, 0x1a, 0xcc, 0x75, 0x7d, 0xc4, 0x12, 0xab, 0x2, 0xbb, 0x6d, 0xd4, 0xdc, 0x65, 0xb3, 0xa, 0xfc, 0x45, 0x93, 0x2a, 0x22, 0x9b, 0x4d, 0xf4, 0x5d, 0xe4, 0x32, 0x8b, 0x83, 0x3a, 0xec, 0x55, 0x1d, 0xa4, 0x72, 0xcb, 0xc3, 0x7a, 0xac, 0x15, 0xbc, 0x5, 0xd3, 0x6a, 0x62, 0xdb, 0xd, 0xb4, 0x42, 0xfb, 0x2d, 0x94, 0x9c, 0x25, 0xf3, 0x4a, 0xe3, 0x5a, 0x8c, 0x35, 0x3d, 0x84, 0x52, 0xeb},
+ {0x0, 0xba, 0x69, 0xd3, 0xd2, 0x68, 0xbb, 0x1, 0xb9, 0x3, 0xd0, 0x6a, 0x6b, 0xd1, 0x2, 0xb8, 0x6f, 0xd5, 0x6, 0xbc, 0xbd, 0x7, 0xd4, 0x6e, 0xd6, 0x6c, 0xbf, 0x5, 0x4, 0xbe, 0x6d, 0xd7, 0xde, 0x64, 0xb7, 0xd, 0xc, 0xb6, 0x65, 0xdf, 0x67, 0xdd, 0xe, 0xb4, 0xb5, 0xf, 0xdc, 0x66, 0xb1, 0xb, 0xd8, 0x62, 0x63, 0xd9, 0xa, 0xb0, 0x8, 0xb2, 0x61, 0xdb, 0xda, 0x60, 0xb3, 0x9, 0xa1, 0x1b, 0xc8, 0x72, 0x73, 0xc9, 0x1a, 0xa0, 0x18, 0xa2, 0x71, 0xcb, 0xca, 0x70, 0xa3, 0x19, 0xce, 0x74, 0xa7, 0x1d, 0x1c, 0xa6, 0x75, 0xcf, 0x77, 0xcd, 0x1e, 0xa4, 0xa5, 0x1f, 0xcc, 0x76, 0x7f, 0xc5, 0x16, 0xac, 0xad, 0x17, 0xc4, 0x7e, 0xc6, 0x7c, 0xaf, 0x15, 0x14, 0xae, 0x7d, 0xc7, 0x10, 0xaa, 0x79, 0xc3, 0xc2, 0x78, 0xab, 0x11, 0xa9, 0x13, 0xc0, 0x7a, 0x7b, 0xc1, 0x12, 0xa8, 0x5f, 0xe5, 0x36, 0x8c, 0x8d, 0x37, 0xe4, 0x5e, 0xe6, 0x5c, 0x8f, 0x35, 0x34, 0x8e, 0x5d, 0xe7, 0x30, 0x8a, 0x59, 0xe3, 0xe2, 0x58, 0x8b, 0x31, 0x89, 0x33, 0xe0, 0x5a, 0x5b, 0xe1, 0x32, 0x88, 0x81, 0x3b, 0xe8, 0x52, 0x53, 0xe9, 0x3a, 0x80, 0x38, 0x82, 0x51, 0xeb, 0xea, 0x50, 0x83, 0x39, 0xee, 0x54, 0x87, 0x3d, 0x3c, 0x86, 0x55, 0xef, 0x57, 0xed, 0x3e, 0x84, 0x85, 0x3f, 0xec, 0x56, 0xfe, 0x44, 0x97, 0x2d, 0x2c, 0x96, 0x45, 0xff, 0x47, 0xfd, 0x2e, 0x94, 0x95, 0x2f, 0xfc, 0x46, 0x91, 0x2b, 0xf8, 0x42, 0x43, 0xf9, 0x2a, 0x90, 0x28, 0x92, 0x41, 0xfb, 0xfa, 0x40, 0x93, 0x29, 0x20, 0x9a, 0x49, 0xf3, 0xf2, 0x48, 0x9b, 0x21, 0x99, 0x23, 0xf0, 0x4a, 0x4b, 0xf1, 0x22, 0x98, 0x4f, 0xf5, 0x26, 0x9c, 0x9d, 0x27, 0xf4, 0x4e, 0xf6, 0x4c, 0x9f, 0x25, 0x24, 0x9e, 0x4d, 0xf7},
+ {0x0, 0xbb, 0x6b, 0xd0, 0xd6, 0x6d, 0xbd, 0x6, 0xb1, 0xa, 0xda, 0x61, 0x67, 0xdc, 0xc, 0xb7, 0x7f, 0xc4, 0x14, 0xaf, 0xa9, 0x12, 0xc2, 0x79, 0xce, 0x75, 0xa5, 0x1e, 0x18, 0xa3, 0x73, 0xc8, 0xfe, 0x45, 0x95, 0x2e, 0x28, 0x93, 0x43, 0xf8, 0x4f, 0xf4, 0x24, 0x9f, 0x99, 0x22, 0xf2, 0x49, 0x81, 0x3a, 0xea, 0x51, 0x57, 0xec, 0x3c, 0x87, 0x30, 0x8b, 0x5b, 0xe0, 0xe6, 0x5d, 0x8d, 0x36, 0xe1, 0x5a, 0x8a, 0x31, 0x37, 0x8c, 0x5c, 0xe7, 0x50, 0xeb, 0x3b, 0x80, 0x86, 0x3d, 0xed, 0x56, 0x9e, 0x25, 0xf5, 0x4e, 0x48, 0xf3, 0x23, 0x98, 0x2f, 0x94, 0x44, 0xff, 0xf9, 0x42, 0x92, 0x29, 0x1f, 0xa4, 0x74, 0xcf, 0xc9, 0x72, 0xa2, 0x19, 0xae, 0x15, 0xc5, 0x7e, 0x78, 0xc3, 0x13, 0xa8, 0x60, 0xdb, 0xb, 0xb0, 0xb6, 0xd, 0xdd, 0x66, 0xd1, 0x6a, 0xba, 0x1, 0x7, 0xbc, 0x6c, 0xd7, 0xdf, 0x64, 0xb4, 0xf, 0x9, 0xb2, 0x62, 0xd9, 0x6e, 0xd5, 0x5, 0xbe, 0xb8, 0x3, 0xd3, 0x68, 0xa0, 0x1b, 0xcb, 0x70, 0x76, 0xcd, 0x1d, 0xa6, 0x11, 0xaa, 0x7a, 0xc1, 0xc7, 0x7c, 0xac, 0x17, 0x21, 0x9a, 0x4a, 0xf1, 0xf7, 0x4c, 0x9c, 0x27, 0x90, 0x2b, 0xfb, 0x40, 0x46, 0xfd, 0x2d, 0x96, 0x5e, 0xe5, 0x35, 0x8e, 0x88, 0x33, 0xe3, 0x58, 0xef, 0x54, 0x84, 0x3f, 0x39, 0x82, 0x52, 0xe9, 0x3e, 0x85, 0x55, 0xee, 0xe8, 0x53, 0x83, 0x38, 0x8f, 0x34, 0xe4, 0x5f, 0x59, 0xe2, 0x32, 0x89, 0x41, 0xfa, 0x2a, 0x91, 0x97, 0x2c, 0xfc, 0x47, 0xf0, 0x4b, 0x9b, 0x20, 0x26, 0x9d, 0x4d, 0xf6, 0xc0, 0x7b, 0xab, 0x10, 0x16, 0xad, 0x7d, 0xc6, 0x71, 0xca, 0x1a, 0xa1, 0xa7, 0x1c, 0xcc, 0x77, 0xbf, 0x4, 0xd4, 0x6f, 0x69, 0xd2, 0x2, 0xb9, 0xe, 0xb5, 0x65, 0xde, 0xd8, 0x63, 0xb3, 0x8},
+ {0x0, 0xbc, 0x65, 0xd9, 0xca, 0x76, 0xaf, 0x13, 0x89, 0x35, 0xec, 0x50, 0x43, 0xff, 0x26, 0x9a, 0xf, 0xb3, 0x6a, 0xd6, 0xc5, 0x79, 0xa0, 0x1c, 0x86, 0x3a, 0xe3, 0x5f, 0x4c, 0xf0, 0x29, 0x95, 0x1e, 0xa2, 0x7b, 0xc7, 0xd4, 0x68, 0xb1, 0xd, 0x97, 0x2b, 0xf2, 0x4e, 0x5d, 0xe1, 0x38, 0x84, 0x11, 0xad, 0x74, 0xc8, 0xdb, 0x67, 0xbe, 0x2, 0x98, 0x24, 0xfd, 0x41, 0x52, 0xee, 0x37, 0x8b, 0x3c, 0x80, 0x59, 0xe5, 0xf6, 0x4a, 0x93, 0x2f, 0xb5, 0x9, 0xd0, 0x6c, 0x7f, 0xc3, 0x1a, 0xa6, 0x33, 0x8f, 0x56, 0xea, 0xf9, 0x45, 0x9c, 0x20, 0xba, 0x6, 0xdf, 0x63, 0x70, 0xcc, 0x15, 0xa9, 0x22, 0x9e, 0x47, 0xfb, 0xe8, 0x54, 0x8d, 0x31, 0xab, 0x17, 0xce, 0x72, 0x61, 0xdd, 0x4, 0xb8, 0x2d, 0x91, 0x48, 0xf4, 0xe7, 0x5b, 0x82, 0x3e, 0xa4, 0x18, 0xc1, 0x7d, 0x6e, 0xd2, 0xb, 0xb7, 0x78, 0xc4, 0x1d, 0xa1, 0xb2, 0xe, 0xd7, 0x6b, 0xf1, 0x4d, 0x94, 0x28, 0x3b, 0x87, 0x5e, 0xe2, 0x77, 0xcb, 0x12, 0xae, 0xbd, 0x1, 0xd8, 0x64, 0xfe, 0x42, 0x9b, 0x27, 0x34, 0x88, 0x51, 0xed, 0x66, 0xda, 0x3, 0xbf, 0xac, 0x10, 0xc9, 0x75, 0xef, 0x53, 0x8a, 0x36, 0x25, 0x99, 0x40, 0xfc, 0x69, 0xd5, 0xc, 0xb0, 0xa3, 0x1f, 0xc6, 0x7a, 0xe0, 0x5c, 0x85, 0x39, 0x2a, 0x96, 0x4f, 0xf3, 0x44, 0xf8, 0x21, 0x9d, 0x8e, 0x32, 0xeb, 0x57, 0xcd, 0x71, 0xa8, 0x14, 0x7, 0xbb, 0x62, 0xde, 0x4b, 0xf7, 0x2e, 0x92, 0x81, 0x3d, 0xe4, 0x58, 0xc2, 0x7e, 0xa7, 0x1b, 0x8, 0xb4, 0x6d, 0xd1, 0x5a, 0xe6, 0x3f, 0x83, 0x90, 0x2c, 0xf5, 0x49, 0xd3, 0x6f, 0xb6, 0xa, 0x19, 0xa5, 0x7c, 0xc0, 0x55, 0xe9, 0x30, 0x8c, 0x9f, 0x23, 0xfa, 0x46, 0xdc, 0x60, 0xb9, 0x5, 0x16, 0xaa, 0x73, 0xcf},
+ {0x0, 0xbd, 0x67, 0xda, 0xce, 0x73, 0xa9, 0x14, 0x81, 0x3c, 0xe6, 0x5b, 0x4f, 0xf2, 0x28, 0x95, 0x1f, 0xa2, 0x78, 0xc5, 0xd1, 0x6c, 0xb6, 0xb, 0x9e, 0x23, 0xf9, 0x44, 0x50, 0xed, 0x37, 0x8a, 0x3e, 0x83, 0x59, 0xe4, 0xf0, 0x4d, 0x97, 0x2a, 0xbf, 0x2, 0xd8, 0x65, 0x71, 0xcc, 0x16, 0xab, 0x21, 0x9c, 0x46, 0xfb, 0xef, 0x52, 0x88, 0x35, 0xa0, 0x1d, 0xc7, 0x7a, 0x6e, 0xd3, 0x9, 0xb4, 0x7c, 0xc1, 0x1b, 0xa6, 0xb2, 0xf, 0xd5, 0x68, 0xfd, 0x40, 0x9a, 0x27, 0x33, 0x8e, 0x54, 0xe9, 0x63, 0xde, 0x4, 0xb9, 0xad, 0x10, 0xca, 0x77, 0xe2, 0x5f, 0x85, 0x38, 0x2c, 0x91, 0x4b, 0xf6, 0x42, 0xff, 0x25, 0x98, 0x8c, 0x31, 0xeb, 0x56, 0xc3, 0x7e, 0xa4, 0x19, 0xd, 0xb0, 0x6a, 0xd7, 0x5d, 0xe0, 0x3a, 0x87, 0x93, 0x2e, 0xf4, 0x49, 0xdc, 0x61, 0xbb, 0x6, 0x12, 0xaf, 0x75, 0xc8, 0xf8, 0x45, 0x9f, 0x22, 0x36, 0x8b, 0x51, 0xec, 0x79, 0xc4, 0x1e, 0xa3, 0xb7, 0xa, 0xd0, 0x6d, 0xe7, 0x5a, 0x80, 0x3d, 0x29, 0x94, 0x4e, 0xf3, 0x66, 0xdb, 0x1, 0xbc, 0xa8, 0x15, 0xcf, 0x72, 0xc6, 0x7b, 0xa1, 0x1c, 0x8, 0xb5, 0x6f, 0xd2, 0x47, 0xfa, 0x20, 0x9d, 0x89, 0x34, 0xee, 0x53, 0xd9, 0x64, 0xbe, 0x3, 0x17, 0xaa, 0x70, 0xcd, 0x58, 0xe5, 0x3f, 0x82, 0x96, 0x2b, 0xf1, 0x4c, 0x84, 0x39, 0xe3, 0x5e, 0x4a, 0xf7, 0x2d, 0x90, 0x5, 0xb8, 0x62, 0xdf, 0xcb, 0x76, 0xac, 0x11, 0x9b, 0x26, 0xfc, 0x41, 0x55, 0xe8, 0x32, 0x8f, 0x1a, 0xa7, 0x7d, 0xc0, 0xd4, 0x69, 0xb3, 0xe, 0xba, 0x7, 0xdd, 0x60, 0x74, 0xc9, 0x13, 0xae, 0x3b, 0x86, 0x5c, 0xe1, 0xf5, 0x48, 0x92, 0x2f, 0xa5, 0x18, 0xc2, 0x7f, 0x6b, 0xd6, 0xc, 0xb1, 0x24, 0x99, 0x43, 0xfe, 0xea, 0x57, 0x8d, 0x30},
+ {0x0, 0xbe, 0x61, 0xdf, 0xc2, 0x7c, 0xa3, 0x1d, 0x99, 0x27, 0xf8, 0x46, 0x5b, 0xe5, 0x3a, 0x84, 0x2f, 0x91, 0x4e, 0xf0, 0xed, 0x53, 0x8c, 0x32, 0xb6, 0x8, 0xd7, 0x69, 0x74, 0xca, 0x15, 0xab, 0x5e, 0xe0, 0x3f, 0x81, 0x9c, 0x22, 0xfd, 0x43, 0xc7, 0x79, 0xa6, 0x18, 0x5, 0xbb, 0x64, 0xda, 0x71, 0xcf, 0x10, 0xae, 0xb3, 0xd, 0xd2, 0x6c, 0xe8, 0x56, 0x89, 0x37, 0x2a, 0x94, 0x4b, 0xf5, 0xbc, 0x2, 0xdd, 0x63, 0x7e, 0xc0, 0x1f, 0xa1, 0x25, 0x9b, 0x44, 0xfa, 0xe7, 0x59, 0x86, 0x38, 0x93, 0x2d, 0xf2, 0x4c, 0x51, 0xef, 0x30, 0x8e, 0xa, 0xb4, 0x6b, 0xd5, 0xc8, 0x76, 0xa9, 0x17, 0xe2, 0x5c, 0x83, 0x3d, 0x20, 0x9e, 0x41, 0xff, 0x7b, 0xc5, 0x1a, 0xa4, 0xb9, 0x7, 0xd8, 0x66, 0xcd, 0x73, 0xac, 0x12, 0xf, 0xb1, 0x6e, 0xd0, 0x54, 0xea, 0x35, 0x8b, 0x96, 0x28, 0xf7, 0x49, 0x65, 0xdb, 0x4, 0xba, 0xa7, 0x19, 0xc6, 0x78, 0xfc, 0x42, 0x9d, 0x23, 0x3e, 0x80, 0x5f, 0xe1, 0x4a, 0xf4, 0x2b, 0x95, 0x88, 0x36, 0xe9, 0x57, 0xd3, 0x6d, 0xb2, 0xc, 0x11, 0xaf, 0x70, 0xce, 0x3b, 0x85, 0x5a, 0xe4, 0xf9, 0x47, 0x98, 0x26, 0xa2, 0x1c, 0xc3, 0x7d, 0x60, 0xde, 0x1, 0xbf, 0x14, 0xaa, 0x75, 0xcb, 0xd6, 0x68, 0xb7, 0x9, 0x8d, 0x33, 0xec, 0x52, 0x4f, 0xf1, 0x2e, 0x90, 0xd9, 0x67, 0xb8, 0x6, 0x1b, 0xa5, 0x7a, 0xc4, 0x40, 0xfe, 0x21, 0x9f, 0x82, 0x3c, 0xe3, 0x5d, 0xf6, 0x48, 0x97, 0x29, 0x34, 0x8a, 0x55, 0xeb, 0x6f, 0xd1, 0xe, 0xb0, 0xad, 0x13, 0xcc, 0x72, 0x87, 0x39, 0xe6, 0x58, 0x45, 0xfb, 0x24, 0x9a, 0x1e, 0xa0, 0x7f, 0xc1, 0xdc, 0x62, 0xbd, 0x3, 0xa8, 0x16, 0xc9, 0x77, 0x6a, 0xd4, 0xb, 0xb5, 0x31, 0x8f, 0x50, 0xee, 0xf3, 0x4d, 0x92, 0x2c},
+ {0x0, 0xbf, 0x63, 0xdc, 0xc6, 0x79, 0xa5, 0x1a, 0x91, 0x2e, 0xf2, 0x4d, 0x57, 0xe8, 0x34, 0x8b, 0x3f, 0x80, 0x5c, 0xe3, 0xf9, 0x46, 0x9a, 0x25, 0xae, 0x11, 0xcd, 0x72, 0x68, 0xd7, 0xb, 0xb4, 0x7e, 0xc1, 0x1d, 0xa2, 0xb8, 0x7, 0xdb, 0x64, 0xef, 0x50, 0x8c, 0x33, 0x29, 0x96, 0x4a, 0xf5, 0x41, 0xfe, 0x22, 0x9d, 0x87, 0x38, 0xe4, 0x5b, 0xd0, 0x6f, 0xb3, 0xc, 0x16, 0xa9, 0x75, 0xca, 0xfc, 0x43, 0x9f, 0x20, 0x3a, 0x85, 0x59, 0xe6, 0x6d, 0xd2, 0xe, 0xb1, 0xab, 0x14, 0xc8, 0x77, 0xc3, 0x7c, 0xa0, 0x1f, 0x5, 0xba, 0x66, 0xd9, 0x52, 0xed, 0x31, 0x8e, 0x94, 0x2b, 0xf7, 0x48, 0x82, 0x3d, 0xe1, 0x5e, 0x44, 0xfb, 0x27, 0x98, 0x13, 0xac, 0x70, 0xcf, 0xd5, 0x6a, 0xb6, 0x9, 0xbd, 0x2, 0xde, 0x61, 0x7b, 0xc4, 0x18, 0xa7, 0x2c, 0x93, 0x4f, 0xf0, 0xea, 0x55, 0x89, 0x36, 0xe5, 0x5a, 0x86, 0x39, 0x23, 0x9c, 0x40, 0xff, 0x74, 0xcb, 0x17, 0xa8, 0xb2, 0xd, 0xd1, 0x6e, 0xda, 0x65, 0xb9, 0x6, 0x1c, 0xa3, 0x7f, 0xc0, 0x4b, 0xf4, 0x28, 0x97, 0x8d, 0x32, 0xee, 0x51, 0x9b, 0x24, 0xf8, 0x47, 0x5d, 0xe2, 0x3e, 0x81, 0xa, 0xb5, 0x69, 0xd6, 0xcc, 0x73, 0xaf, 0x10, 0xa4, 0x1b, 0xc7, 0x78, 0x62, 0xdd, 0x1, 0xbe, 0x35, 0x8a, 0x56, 0xe9, 0xf3, 0x4c, 0x90, 0x2f, 0x19, 0xa6, 0x7a, 0xc5, 0xdf, 0x60, 0xbc, 0x3, 0x88, 0x37, 0xeb, 0x54, 0x4e, 0xf1, 0x2d, 0x92, 0x26, 0x99, 0x45, 0xfa, 0xe0, 0x5f, 0x83, 0x3c, 0xb7, 0x8, 0xd4, 0x6b, 0x71, 0xce, 0x12, 0xad, 0x67, 0xd8, 0x4, 0xbb, 0xa1, 0x1e, 0xc2, 0x7d, 0xf6, 0x49, 0x95, 0x2a, 0x30, 0x8f, 0x53, 0xec, 0x58, 0xe7, 0x3b, 0x84, 0x9e, 0x21, 0xfd, 0x42, 0xc9, 0x76, 0xaa, 0x15, 0xf, 0xb0, 0x6c, 0xd3},
+ {0x0, 0xc0, 0x9d, 0x5d, 0x27, 0xe7, 0xba, 0x7a, 0x4e, 0x8e, 0xd3, 0x13, 0x69, 0xa9, 0xf4, 0x34, 0x9c, 0x5c, 0x1, 0xc1, 0xbb, 0x7b, 0x26, 0xe6, 0xd2, 0x12, 0x4f, 0x8f, 0xf5, 0x35, 0x68, 0xa8, 0x25, 0xe5, 0xb8, 0x78, 0x2, 0xc2, 0x9f, 0x5f, 0x6b, 0xab, 0xf6, 0x36, 0x4c, 0x8c, 0xd1, 0x11, 0xb9, 0x79, 0x24, 0xe4, 0x9e, 0x5e, 0x3, 0xc3, 0xf7, 0x37, 0x6a, 0xaa, 0xd0, 0x10, 0x4d, 0x8d, 0x4a, 0x8a, 0xd7, 0x17, 0x6d, 0xad, 0xf0, 0x30, 0x4, 0xc4, 0x99, 0x59, 0x23, 0xe3, 0xbe, 0x7e, 0xd6, 0x16, 0x4b, 0x8b, 0xf1, 0x31, 0x6c, 0xac, 0x98, 0x58, 0x5, 0xc5, 0xbf, 0x7f, 0x22, 0xe2, 0x6f, 0xaf, 0xf2, 0x32, 0x48, 0x88, 0xd5, 0x15, 0x21, 0xe1, 0xbc, 0x7c, 0x6, 0xc6, 0x9b, 0x5b, 0xf3, 0x33, 0x6e, 0xae, 0xd4, 0x14, 0x49, 0x89, 0xbd, 0x7d, 0x20, 0xe0, 0x9a, 0x5a, 0x7, 0xc7, 0x94, 0x54, 0x9, 0xc9, 0xb3, 0x73, 0x2e, 0xee, 0xda, 0x1a, 0x47, 0x87, 0xfd, 0x3d, 0x60, 0xa0, 0x8, 0xc8, 0x95, 0x55, 0x2f, 0xef, 0xb2, 0x72, 0x46, 0x86, 0xdb, 0x1b, 0x61, 0xa1, 0xfc, 0x3c, 0xb1, 0x71, 0x2c, 0xec, 0x96, 0x56, 0xb, 0xcb, 0xff, 0x3f, 0x62, 0xa2, 0xd8, 0x18, 0x45, 0x85, 0x2d, 0xed, 0xb0, 0x70, 0xa, 0xca, 0x97, 0x57, 0x63, 0xa3, 0xfe, 0x3e, 0x44, 0x84, 0xd9, 0x19, 0xde, 0x1e, 0x43, 0x83, 0xf9, 0x39, 0x64, 0xa4, 0x90, 0x50, 0xd, 0xcd, 0xb7, 0x77, 0x2a, 0xea, 0x42, 0x82, 0xdf, 0x1f, 0x65, 0xa5, 0xf8, 0x38, 0xc, 0xcc, 0x91, 0x51, 0x2b, 0xeb, 0xb6, 0x76, 0xfb, 0x3b, 0x66, 0xa6, 0xdc, 0x1c, 0x41, 0x81, 0xb5, 0x75, 0x28, 0xe8, 0x92, 0x52, 0xf, 0xcf, 0x67, 0xa7, 0xfa, 0x3a, 0x40, 0x80, 0xdd, 0x1d, 0x29, 0xe9, 0xb4, 0x74, 0xe, 0xce, 0x93, 0x53},
+ {0x0, 0xc1, 0x9f, 0x5e, 0x23, 0xe2, 0xbc, 0x7d, 0x46, 0x87, 0xd9, 0x18, 0x65, 0xa4, 0xfa, 0x3b, 0x8c, 0x4d, 0x13, 0xd2, 0xaf, 0x6e, 0x30, 0xf1, 0xca, 0xb, 0x55, 0x94, 0xe9, 0x28, 0x76, 0xb7, 0x5, 0xc4, 0x9a, 0x5b, 0x26, 0xe7, 0xb9, 0x78, 0x43, 0x82, 0xdc, 0x1d, 0x60, 0xa1, 0xff, 0x3e, 0x89, 0x48, 0x16, 0xd7, 0xaa, 0x6b, 0x35, 0xf4, 0xcf, 0xe, 0x50, 0x91, 0xec, 0x2d, 0x73, 0xb2, 0xa, 0xcb, 0x95, 0x54, 0x29, 0xe8, 0xb6, 0x77, 0x4c, 0x8d, 0xd3, 0x12, 0x6f, 0xae, 0xf0, 0x31, 0x86, 0x47, 0x19, 0xd8, 0xa5, 0x64, 0x3a, 0xfb, 0xc0, 0x1, 0x5f, 0x9e, 0xe3, 0x22, 0x7c, 0xbd, 0xf, 0xce, 0x90, 0x51, 0x2c, 0xed, 0xb3, 0x72, 0x49, 0x88, 0xd6, 0x17, 0x6a, 0xab, 0xf5, 0x34, 0x83, 0x42, 0x1c, 0xdd, 0xa0, 0x61, 0x3f, 0xfe, 0xc5, 0x4, 0x5a, 0x9b, 0xe6, 0x27, 0x79, 0xb8, 0x14, 0xd5, 0x8b, 0x4a, 0x37, 0xf6, 0xa8, 0x69, 0x52, 0x93, 0xcd, 0xc, 0x71, 0xb0, 0xee, 0x2f, 0x98, 0x59, 0x7, 0xc6, 0xbb, 0x7a, 0x24, 0xe5, 0xde, 0x1f, 0x41, 0x80, 0xfd, 0x3c, 0x62, 0xa3, 0x11, 0xd0, 0x8e, 0x4f, 0x32, 0xf3, 0xad, 0x6c, 0x57, 0x96, 0xc8, 0x9, 0x74, 0xb5, 0xeb, 0x2a, 0x9d, 0x5c, 0x2, 0xc3, 0xbe, 0x7f, 0x21, 0xe0, 0xdb, 0x1a, 0x44, 0x85, 0xf8, 0x39, 0x67, 0xa6, 0x1e, 0xdf, 0x81, 0x40, 0x3d, 0xfc, 0xa2, 0x63, 0x58, 0x99, 0xc7, 0x6, 0x7b, 0xba, 0xe4, 0x25, 0x92, 0x53, 0xd, 0xcc, 0xb1, 0x70, 0x2e, 0xef, 0xd4, 0x15, 0x4b, 0x8a, 0xf7, 0x36, 0x68, 0xa9, 0x1b, 0xda, 0x84, 0x45, 0x38, 0xf9, 0xa7, 0x66, 0x5d, 0x9c, 0xc2, 0x3, 0x7e, 0xbf, 0xe1, 0x20, 0x97, 0x56, 0x8, 0xc9, 0xb4, 0x75, 0x2b, 0xea, 0xd1, 0x10, 0x4e, 0x8f, 0xf2, 0x33, 0x6d, 0xac},
+ {0x0, 0xc2, 0x99, 0x5b, 0x2f, 0xed, 0xb6, 0x74, 0x5e, 0x9c, 0xc7, 0x5, 0x71, 0xb3, 0xe8, 0x2a, 0xbc, 0x7e, 0x25, 0xe7, 0x93, 0x51, 0xa, 0xc8, 0xe2, 0x20, 0x7b, 0xb9, 0xcd, 0xf, 0x54, 0x96, 0x65, 0xa7, 0xfc, 0x3e, 0x4a, 0x88, 0xd3, 0x11, 0x3b, 0xf9, 0xa2, 0x60, 0x14, 0xd6, 0x8d, 0x4f, 0xd9, 0x1b, 0x40, 0x82, 0xf6, 0x34, 0x6f, 0xad, 0x87, 0x45, 0x1e, 0xdc, 0xa8, 0x6a, 0x31, 0xf3, 0xca, 0x8, 0x53, 0x91, 0xe5, 0x27, 0x7c, 0xbe, 0x94, 0x56, 0xd, 0xcf, 0xbb, 0x79, 0x22, 0xe0, 0x76, 0xb4, 0xef, 0x2d, 0x59, 0x9b, 0xc0, 0x2, 0x28, 0xea, 0xb1, 0x73, 0x7, 0xc5, 0x9e, 0x5c, 0xaf, 0x6d, 0x36, 0xf4, 0x80, 0x42, 0x19, 0xdb, 0xf1, 0x33, 0x68, 0xaa, 0xde, 0x1c, 0x47, 0x85, 0x13, 0xd1, 0x8a, 0x48, 0x3c, 0xfe, 0xa5, 0x67, 0x4d, 0x8f, 0xd4, 0x16, 0x62, 0xa0, 0xfb, 0x39, 0x89, 0x4b, 0x10, 0xd2, 0xa6, 0x64, 0x3f, 0xfd, 0xd7, 0x15, 0x4e, 0x8c, 0xf8, 0x3a, 0x61, 0xa3, 0x35, 0xf7, 0xac, 0x6e, 0x1a, 0xd8, 0x83, 0x41, 0x6b, 0xa9, 0xf2, 0x30, 0x44, 0x86, 0xdd, 0x1f, 0xec, 0x2e, 0x75, 0xb7, 0xc3, 0x1, 0x5a, 0x98, 0xb2, 0x70, 0x2b, 0xe9, 0x9d, 0x5f, 0x4, 0xc6, 0x50, 0x92, 0xc9, 0xb, 0x7f, 0xbd, 0xe6, 0x24, 0xe, 0xcc, 0x97, 0x55, 0x21, 0xe3, 0xb8, 0x7a, 0x43, 0x81, 0xda, 0x18, 0x6c, 0xae, 0xf5, 0x37, 0x1d, 0xdf, 0x84, 0x46, 0x32, 0xf0, 0xab, 0x69, 0xff, 0x3d, 0x66, 0xa4, 0xd0, 0x12, 0x49, 0x8b, 0xa1, 0x63, 0x38, 0xfa, 0x8e, 0x4c, 0x17, 0xd5, 0x26, 0xe4, 0xbf, 0x7d, 0x9, 0xcb, 0x90, 0x52, 0x78, 0xba, 0xe1, 0x23, 0x57, 0x95, 0xce, 0xc, 0x9a, 0x58, 0x3, 0xc1, 0xb5, 0x77, 0x2c, 0xee, 0xc4, 0x6, 0x5d, 0x9f, 0xeb, 0x29, 0x72, 0xb0},
+ {0x0, 0xc3, 0x9b, 0x58, 0x2b, 0xe8, 0xb0, 0x73, 0x56, 0x95, 0xcd, 0xe, 0x7d, 0xbe, 0xe6, 0x25, 0xac, 0x6f, 0x37, 0xf4, 0x87, 0x44, 0x1c, 0xdf, 0xfa, 0x39, 0x61, 0xa2, 0xd1, 0x12, 0x4a, 0x89, 0x45, 0x86, 0xde, 0x1d, 0x6e, 0xad, 0xf5, 0x36, 0x13, 0xd0, 0x88, 0x4b, 0x38, 0xfb, 0xa3, 0x60, 0xe9, 0x2a, 0x72, 0xb1, 0xc2, 0x1, 0x59, 0x9a, 0xbf, 0x7c, 0x24, 0xe7, 0x94, 0x57, 0xf, 0xcc, 0x8a, 0x49, 0x11, 0xd2, 0xa1, 0x62, 0x3a, 0xf9, 0xdc, 0x1f, 0x47, 0x84, 0xf7, 0x34, 0x6c, 0xaf, 0x26, 0xe5, 0xbd, 0x7e, 0xd, 0xce, 0x96, 0x55, 0x70, 0xb3, 0xeb, 0x28, 0x5b, 0x98, 0xc0, 0x3, 0xcf, 0xc, 0x54, 0x97, 0xe4, 0x27, 0x7f, 0xbc, 0x99, 0x5a, 0x2, 0xc1, 0xb2, 0x71, 0x29, 0xea, 0x63, 0xa0, 0xf8, 0x3b, 0x48, 0x8b, 0xd3, 0x10, 0x35, 0xf6, 0xae, 0x6d, 0x1e, 0xdd, 0x85, 0x46, 0x9, 0xca, 0x92, 0x51, 0x22, 0xe1, 0xb9, 0x7a, 0x5f, 0x9c, 0xc4, 0x7, 0x74, 0xb7, 0xef, 0x2c, 0xa5, 0x66, 0x3e, 0xfd, 0x8e, 0x4d, 0x15, 0xd6, 0xf3, 0x30, 0x68, 0xab, 0xd8, 0x1b, 0x43, 0x80, 0x4c, 0x8f, 0xd7, 0x14, 0x67, 0xa4, 0xfc, 0x3f, 0x1a, 0xd9, 0x81, 0x42, 0x31, 0xf2, 0xaa, 0x69, 0xe0, 0x23, 0x7b, 0xb8, 0xcb, 0x8, 0x50, 0x93, 0xb6, 0x75, 0x2d, 0xee, 0x9d, 0x5e, 0x6, 0xc5, 0x83, 0x40, 0x18, 0xdb, 0xa8, 0x6b, 0x33, 0xf0, 0xd5, 0x16, 0x4e, 0x8d, 0xfe, 0x3d, 0x65, 0xa6, 0x2f, 0xec, 0xb4, 0x77, 0x4, 0xc7, 0x9f, 0x5c, 0x79, 0xba, 0xe2, 0x21, 0x52, 0x91, 0xc9, 0xa, 0xc6, 0x5, 0x5d, 0x9e, 0xed, 0x2e, 0x76, 0xb5, 0x90, 0x53, 0xb, 0xc8, 0xbb, 0x78, 0x20, 0xe3, 0x6a, 0xa9, 0xf1, 0x32, 0x41, 0x82, 0xda, 0x19, 0x3c, 0xff, 0xa7, 0x64, 0x17, 0xd4, 0x8c, 0x4f},
+ {0x0, 0xc4, 0x95, 0x51, 0x37, 0xf3, 0xa2, 0x66, 0x6e, 0xaa, 0xfb, 0x3f, 0x59, 0x9d, 0xcc, 0x8, 0xdc, 0x18, 0x49, 0x8d, 0xeb, 0x2f, 0x7e, 0xba, 0xb2, 0x76, 0x27, 0xe3, 0x85, 0x41, 0x10, 0xd4, 0xa5, 0x61, 0x30, 0xf4, 0x92, 0x56, 0x7, 0xc3, 0xcb, 0xf, 0x5e, 0x9a, 0xfc, 0x38, 0x69, 0xad, 0x79, 0xbd, 0xec, 0x28, 0x4e, 0x8a, 0xdb, 0x1f, 0x17, 0xd3, 0x82, 0x46, 0x20, 0xe4, 0xb5, 0x71, 0x57, 0x93, 0xc2, 0x6, 0x60, 0xa4, 0xf5, 0x31, 0x39, 0xfd, 0xac, 0x68, 0xe, 0xca, 0x9b, 0x5f, 0x8b, 0x4f, 0x1e, 0xda, 0xbc, 0x78, 0x29, 0xed, 0xe5, 0x21, 0x70, 0xb4, 0xd2, 0x16, 0x47, 0x83, 0xf2, 0x36, 0x67, 0xa3, 0xc5, 0x1, 0x50, 0x94, 0x9c, 0x58, 0x9, 0xcd, 0xab, 0x6f, 0x3e, 0xfa, 0x2e, 0xea, 0xbb, 0x7f, 0x19, 0xdd, 0x8c, 0x48, 0x40, 0x84, 0xd5, 0x11, 0x77, 0xb3, 0xe2, 0x26, 0xae, 0x6a, 0x3b, 0xff, 0x99, 0x5d, 0xc, 0xc8, 0xc0, 0x4, 0x55, 0x91, 0xf7, 0x33, 0x62, 0xa6, 0x72, 0xb6, 0xe7, 0x23, 0x45, 0x81, 0xd0, 0x14, 0x1c, 0xd8, 0x89, 0x4d, 0x2b, 0xef, 0xbe, 0x7a, 0xb, 0xcf, 0x9e, 0x5a, 0x3c, 0xf8, 0xa9, 0x6d, 0x65, 0xa1, 0xf0, 0x34, 0x52, 0x96, 0xc7, 0x3, 0xd7, 0x13, 0x42, 0x86, 0xe0, 0x24, 0x75, 0xb1, 0xb9, 0x7d, 0x2c, 0xe8, 0x8e, 0x4a, 0x1b, 0xdf, 0xf9, 0x3d, 0x6c, 0xa8, 0xce, 0xa, 0x5b, 0x9f, 0x97, 0x53, 0x2, 0xc6, 0xa0, 0x64, 0x35, 0xf1, 0x25, 0xe1, 0xb0, 0x74, 0x12, 0xd6, 0x87, 0x43, 0x4b, 0x8f, 0xde, 0x1a, 0x7c, 0xb8, 0xe9, 0x2d, 0x5c, 0x98, 0xc9, 0xd, 0x6b, 0xaf, 0xfe, 0x3a, 0x32, 0xf6, 0xa7, 0x63, 0x5, 0xc1, 0x90, 0x54, 0x80, 0x44, 0x15, 0xd1, 0xb7, 0x73, 0x22, 0xe6, 0xee, 0x2a, 0x7b, 0xbf, 0xd9, 0x1d, 0x4c, 0x88},
+ {0x0, 0xc5, 0x97, 0x52, 0x33, 0xf6, 0xa4, 0x61, 0x66, 0xa3, 0xf1, 0x34, 0x55, 0x90, 0xc2, 0x7, 0xcc, 0x9, 0x5b, 0x9e, 0xff, 0x3a, 0x68, 0xad, 0xaa, 0x6f, 0x3d, 0xf8, 0x99, 0x5c, 0xe, 0xcb, 0x85, 0x40, 0x12, 0xd7, 0xb6, 0x73, 0x21, 0xe4, 0xe3, 0x26, 0x74, 0xb1, 0xd0, 0x15, 0x47, 0x82, 0x49, 0x8c, 0xde, 0x1b, 0x7a, 0xbf, 0xed, 0x28, 0x2f, 0xea, 0xb8, 0x7d, 0x1c, 0xd9, 0x8b, 0x4e, 0x17, 0xd2, 0x80, 0x45, 0x24, 0xe1, 0xb3, 0x76, 0x71, 0xb4, 0xe6, 0x23, 0x42, 0x87, 0xd5, 0x10, 0xdb, 0x1e, 0x4c, 0x89, 0xe8, 0x2d, 0x7f, 0xba, 0xbd, 0x78, 0x2a, 0xef, 0x8e, 0x4b, 0x19, 0xdc, 0x92, 0x57, 0x5, 0xc0, 0xa1, 0x64, 0x36, 0xf3, 0xf4, 0x31, 0x63, 0xa6, 0xc7, 0x2, 0x50, 0x95, 0x5e, 0x9b, 0xc9, 0xc, 0x6d, 0xa8, 0xfa, 0x3f, 0x38, 0xfd, 0xaf, 0x6a, 0xb, 0xce, 0x9c, 0x59, 0x2e, 0xeb, 0xb9, 0x7c, 0x1d, 0xd8, 0x8a, 0x4f, 0x48, 0x8d, 0xdf, 0x1a, 0x7b, 0xbe, 0xec, 0x29, 0xe2, 0x27, 0x75, 0xb0, 0xd1, 0x14, 0x46, 0x83, 0x84, 0x41, 0x13, 0xd6, 0xb7, 0x72, 0x20, 0xe5, 0xab, 0x6e, 0x3c, 0xf9, 0x98, 0x5d, 0xf, 0xca, 0xcd, 0x8, 0x5a, 0x9f, 0xfe, 0x3b, 0x69, 0xac, 0x67, 0xa2, 0xf0, 0x35, 0x54, 0x91, 0xc3, 0x6, 0x1, 0xc4, 0x96, 0x53, 0x32, 0xf7, 0xa5, 0x60, 0x39, 0xfc, 0xae, 0x6b, 0xa, 0xcf, 0x9d, 0x58, 0x5f, 0x9a, 0xc8, 0xd, 0x6c, 0xa9, 0xfb, 0x3e, 0xf5, 0x30, 0x62, 0xa7, 0xc6, 0x3, 0x51, 0x94, 0x93, 0x56, 0x4, 0xc1, 0xa0, 0x65, 0x37, 0xf2, 0xbc, 0x79, 0x2b, 0xee, 0x8f, 0x4a, 0x18, 0xdd, 0xda, 0x1f, 0x4d, 0x88, 0xe9, 0x2c, 0x7e, 0xbb, 0x70, 0xb5, 0xe7, 0x22, 0x43, 0x86, 0xd4, 0x11, 0x16, 0xd3, 0x81, 0x44, 0x25, 0xe0, 0xb2, 0x77},
+ {0x0, 0xc6, 0x91, 0x57, 0x3f, 0xf9, 0xae, 0x68, 0x7e, 0xb8, 0xef, 0x29, 0x41, 0x87, 0xd0, 0x16, 0xfc, 0x3a, 0x6d, 0xab, 0xc3, 0x5, 0x52, 0x94, 0x82, 0x44, 0x13, 0xd5, 0xbd, 0x7b, 0x2c, 0xea, 0xe5, 0x23, 0x74, 0xb2, 0xda, 0x1c, 0x4b, 0x8d, 0x9b, 0x5d, 0xa, 0xcc, 0xa4, 0x62, 0x35, 0xf3, 0x19, 0xdf, 0x88, 0x4e, 0x26, 0xe0, 0xb7, 0x71, 0x67, 0xa1, 0xf6, 0x30, 0x58, 0x9e, 0xc9, 0xf, 0xd7, 0x11, 0x46, 0x80, 0xe8, 0x2e, 0x79, 0xbf, 0xa9, 0x6f, 0x38, 0xfe, 0x96, 0x50, 0x7, 0xc1, 0x2b, 0xed, 0xba, 0x7c, 0x14, 0xd2, 0x85, 0x43, 0x55, 0x93, 0xc4, 0x2, 0x6a, 0xac, 0xfb, 0x3d, 0x32, 0xf4, 0xa3, 0x65, 0xd, 0xcb, 0x9c, 0x5a, 0x4c, 0x8a, 0xdd, 0x1b, 0x73, 0xb5, 0xe2, 0x24, 0xce, 0x8, 0x5f, 0x99, 0xf1, 0x37, 0x60, 0xa6, 0xb0, 0x76, 0x21, 0xe7, 0x8f, 0x49, 0x1e, 0xd8, 0xb3, 0x75, 0x22, 0xe4, 0x8c, 0x4a, 0x1d, 0xdb, 0xcd, 0xb, 0x5c, 0x9a, 0xf2, 0x34, 0x63, 0xa5, 0x4f, 0x89, 0xde, 0x18, 0x70, 0xb6, 0xe1, 0x27, 0x31, 0xf7, 0xa0, 0x66, 0xe, 0xc8, 0x9f, 0x59, 0x56, 0x90, 0xc7, 0x1, 0x69, 0xaf, 0xf8, 0x3e, 0x28, 0xee, 0xb9, 0x7f, 0x17, 0xd1, 0x86, 0x40, 0xaa, 0x6c, 0x3b, 0xfd, 0x95, 0x53, 0x4, 0xc2, 0xd4, 0x12, 0x45, 0x83, 0xeb, 0x2d, 0x7a, 0xbc, 0x64, 0xa2, 0xf5, 0x33, 0x5b, 0x9d, 0xca, 0xc, 0x1a, 0xdc, 0x8b, 0x4d, 0x25, 0xe3, 0xb4, 0x72, 0x98, 0x5e, 0x9, 0xcf, 0xa7, 0x61, 0x36, 0xf0, 0xe6, 0x20, 0x77, 0xb1, 0xd9, 0x1f, 0x48, 0x8e, 0x81, 0x47, 0x10, 0xd6, 0xbe, 0x78, 0x2f, 0xe9, 0xff, 0x39, 0x6e, 0xa8, 0xc0, 0x6, 0x51, 0x97, 0x7d, 0xbb, 0xec, 0x2a, 0x42, 0x84, 0xd3, 0x15, 0x3, 0xc5, 0x92, 0x54, 0x3c, 0xfa, 0xad, 0x6b},
+ {0x0, 0xc7, 0x93, 0x54, 0x3b, 0xfc, 0xa8, 0x6f, 0x76, 0xb1, 0xe5, 0x22, 0x4d, 0x8a, 0xde, 0x19, 0xec, 0x2b, 0x7f, 0xb8, 0xd7, 0x10, 0x44, 0x83, 0x9a, 0x5d, 0x9, 0xce, 0xa1, 0x66, 0x32, 0xf5, 0xc5, 0x2, 0x56, 0x91, 0xfe, 0x39, 0x6d, 0xaa, 0xb3, 0x74, 0x20, 0xe7, 0x88, 0x4f, 0x1b, 0xdc, 0x29, 0xee, 0xba, 0x7d, 0x12, 0xd5, 0x81, 0x46, 0x5f, 0x98, 0xcc, 0xb, 0x64, 0xa3, 0xf7, 0x30, 0x97, 0x50, 0x4, 0xc3, 0xac, 0x6b, 0x3f, 0xf8, 0xe1, 0x26, 0x72, 0xb5, 0xda, 0x1d, 0x49, 0x8e, 0x7b, 0xbc, 0xe8, 0x2f, 0x40, 0x87, 0xd3, 0x14, 0xd, 0xca, 0x9e, 0x59, 0x36, 0xf1, 0xa5, 0x62, 0x52, 0x95, 0xc1, 0x6, 0x69, 0xae, 0xfa, 0x3d, 0x24, 0xe3, 0xb7, 0x70, 0x1f, 0xd8, 0x8c, 0x4b, 0xbe, 0x79, 0x2d, 0xea, 0x85, 0x42, 0x16, 0xd1, 0xc8, 0xf, 0x5b, 0x9c, 0xf3, 0x34, 0x60, 0xa7, 0x33, 0xf4, 0xa0, 0x67, 0x8, 0xcf, 0x9b, 0x5c, 0x45, 0x82, 0xd6, 0x11, 0x7e, 0xb9, 0xed, 0x2a, 0xdf, 0x18, 0x4c, 0x8b, 0xe4, 0x23, 0x77, 0xb0, 0xa9, 0x6e, 0x3a, 0xfd, 0x92, 0x55, 0x1, 0xc6, 0xf6, 0x31, 0x65, 0xa2, 0xcd, 0xa, 0x5e, 0x99, 0x80, 0x47, 0x13, 0xd4, 0xbb, 0x7c, 0x28, 0xef, 0x1a, 0xdd, 0x89, 0x4e, 0x21, 0xe6, 0xb2, 0x75, 0x6c, 0xab, 0xff, 0x38, 0x57, 0x90, 0xc4, 0x3, 0xa4, 0x63, 0x37, 0xf0, 0x9f, 0x58, 0xc, 0xcb, 0xd2, 0x15, 0x41, 0x86, 0xe9, 0x2e, 0x7a, 0xbd, 0x48, 0x8f, 0xdb, 0x1c, 0x73, 0xb4, 0xe0, 0x27, 0x3e, 0xf9, 0xad, 0x6a, 0x5, 0xc2, 0x96, 0x51, 0x61, 0xa6, 0xf2, 0x35, 0x5a, 0x9d, 0xc9, 0xe, 0x17, 0xd0, 0x84, 0x43, 0x2c, 0xeb, 0xbf, 0x78, 0x8d, 0x4a, 0x1e, 0xd9, 0xb6, 0x71, 0x25, 0xe2, 0xfb, 0x3c, 0x68, 0xaf, 0xc0, 0x7, 0x53, 0x94},
+ {0x0, 0xc8, 0x8d, 0x45, 0x7, 0xcf, 0x8a, 0x42, 0xe, 0xc6, 0x83, 0x4b, 0x9, 0xc1, 0x84, 0x4c, 0x1c, 0xd4, 0x91, 0x59, 0x1b, 0xd3, 0x96, 0x5e, 0x12, 0xda, 0x9f, 0x57, 0x15, 0xdd, 0x98, 0x50, 0x38, 0xf0, 0xb5, 0x7d, 0x3f, 0xf7, 0xb2, 0x7a, 0x36, 0xfe, 0xbb, 0x73, 0x31, 0xf9, 0xbc, 0x74, 0x24, 0xec, 0xa9, 0x61, 0x23, 0xeb, 0xae, 0x66, 0x2a, 0xe2, 0xa7, 0x6f, 0x2d, 0xe5, 0xa0, 0x68, 0x70, 0xb8, 0xfd, 0x35, 0x77, 0xbf, 0xfa, 0x32, 0x7e, 0xb6, 0xf3, 0x3b, 0x79, 0xb1, 0xf4, 0x3c, 0x6c, 0xa4, 0xe1, 0x29, 0x6b, 0xa3, 0xe6, 0x2e, 0x62, 0xaa, 0xef, 0x27, 0x65, 0xad, 0xe8, 0x20, 0x48, 0x80, 0xc5, 0xd, 0x4f, 0x87, 0xc2, 0xa, 0x46, 0x8e, 0xcb, 0x3, 0x41, 0x89, 0xcc, 0x4, 0x54, 0x9c, 0xd9, 0x11, 0x53, 0x9b, 0xde, 0x16, 0x5a, 0x92, 0xd7, 0x1f, 0x5d, 0x95, 0xd0, 0x18, 0xe0, 0x28, 0x6d, 0xa5, 0xe7, 0x2f, 0x6a, 0xa2, 0xee, 0x26, 0x63, 0xab, 0xe9, 0x21, 0x64, 0xac, 0xfc, 0x34, 0x71, 0xb9, 0xfb, 0x33, 0x76, 0xbe, 0xf2, 0x3a, 0x7f, 0xb7, 0xf5, 0x3d, 0x78, 0xb0, 0xd8, 0x10, 0x55, 0x9d, 0xdf, 0x17, 0x52, 0x9a, 0xd6, 0x1e, 0x5b, 0x93, 0xd1, 0x19, 0x5c, 0x94, 0xc4, 0xc, 0x49, 0x81, 0xc3, 0xb, 0x4e, 0x86, 0xca, 0x2, 0x47, 0x8f, 0xcd, 0x5, 0x40, 0x88, 0x90, 0x58, 0x1d, 0xd5, 0x97, 0x5f, 0x1a, 0xd2, 0x9e, 0x56, 0x13, 0xdb, 0x99, 0x51, 0x14, 0xdc, 0x8c, 0x44, 0x1, 0xc9, 0x8b, 0x43, 0x6, 0xce, 0x82, 0x4a, 0xf, 0xc7, 0x85, 0x4d, 0x8, 0xc0, 0xa8, 0x60, 0x25, 0xed, 0xaf, 0x67, 0x22, 0xea, 0xa6, 0x6e, 0x2b, 0xe3, 0xa1, 0x69, 0x2c, 0xe4, 0xb4, 0x7c, 0x39, 0xf1, 0xb3, 0x7b, 0x3e, 0xf6, 0xba, 0x72, 0x37, 0xff, 0xbd, 0x75, 0x30, 0xf8},
+ {0x0, 0xc9, 0x8f, 0x46, 0x3, 0xca, 0x8c, 0x45, 0x6, 0xcf, 0x89, 0x40, 0x5, 0xcc, 0x8a, 0x43, 0xc, 0xc5, 0x83, 0x4a, 0xf, 0xc6, 0x80, 0x49, 0xa, 0xc3, 0x85, 0x4c, 0x9, 0xc0, 0x86, 0x4f, 0x18, 0xd1, 0x97, 0x5e, 0x1b, 0xd2, 0x94, 0x5d, 0x1e, 0xd7, 0x91, 0x58, 0x1d, 0xd4, 0x92, 0x5b, 0x14, 0xdd, 0x9b, 0x52, 0x17, 0xde, 0x98, 0x51, 0x12, 0xdb, 0x9d, 0x54, 0x11, 0xd8, 0x9e, 0x57, 0x30, 0xf9, 0xbf, 0x76, 0x33, 0xfa, 0xbc, 0x75, 0x36, 0xff, 0xb9, 0x70, 0x35, 0xfc, 0xba, 0x73, 0x3c, 0xf5, 0xb3, 0x7a, 0x3f, 0xf6, 0xb0, 0x79, 0x3a, 0xf3, 0xb5, 0x7c, 0x39, 0xf0, 0xb6, 0x7f, 0x28, 0xe1, 0xa7, 0x6e, 0x2b, 0xe2, 0xa4, 0x6d, 0x2e, 0xe7, 0xa1, 0x68, 0x2d, 0xe4, 0xa2, 0x6b, 0x24, 0xed, 0xab, 0x62, 0x27, 0xee, 0xa8, 0x61, 0x22, 0xeb, 0xad, 0x64, 0x21, 0xe8, 0xae, 0x67, 0x60, 0xa9, 0xef, 0x26, 0x63, 0xaa, 0xec, 0x25, 0x66, 0xaf, 0xe9, 0x20, 0x65, 0xac, 0xea, 0x23, 0x6c, 0xa5, 0xe3, 0x2a, 0x6f, 0xa6, 0xe0, 0x29, 0x6a, 0xa3, 0xe5, 0x2c, 0x69, 0xa0, 0xe6, 0x2f, 0x78, 0xb1, 0xf7, 0x3e, 0x7b, 0xb2, 0xf4, 0x3d, 0x7e, 0xb7, 0xf1, 0x38, 0x7d, 0xb4, 0xf2, 0x3b, 0x74, 0xbd, 0xfb, 0x32, 0x77, 0xbe, 0xf8, 0x31, 0x72, 0xbb, 0xfd, 0x34, 0x71, 0xb8, 0xfe, 0x37, 0x50, 0x99, 0xdf, 0x16, 0x53, 0x9a, 0xdc, 0x15, 0x56, 0x9f, 0xd9, 0x10, 0x55, 0x9c, 0xda, 0x13, 0x5c, 0x95, 0xd3, 0x1a, 0x5f, 0x96, 0xd0, 0x19, 0x5a, 0x93, 0xd5, 0x1c, 0x59, 0x90, 0xd6, 0x1f, 0x48, 0x81, 0xc7, 0xe, 0x4b, 0x82, 0xc4, 0xd, 0x4e, 0x87, 0xc1, 0x8, 0x4d, 0x84, 0xc2, 0xb, 0x44, 0x8d, 0xcb, 0x2, 0x47, 0x8e, 0xc8, 0x1, 0x42, 0x8b, 0xcd, 0x4, 0x41, 0x88, 0xce, 0x7},
+ {0x0, 0xca, 0x89, 0x43, 0xf, 0xc5, 0x86, 0x4c, 0x1e, 0xd4, 0x97, 0x5d, 0x11, 0xdb, 0x98, 0x52, 0x3c, 0xf6, 0xb5, 0x7f, 0x33, 0xf9, 0xba, 0x70, 0x22, 0xe8, 0xab, 0x61, 0x2d, 0xe7, 0xa4, 0x6e, 0x78, 0xb2, 0xf1, 0x3b, 0x77, 0xbd, 0xfe, 0x34, 0x66, 0xac, 0xef, 0x25, 0x69, 0xa3, 0xe0, 0x2a, 0x44, 0x8e, 0xcd, 0x7, 0x4b, 0x81, 0xc2, 0x8, 0x5a, 0x90, 0xd3, 0x19, 0x55, 0x9f, 0xdc, 0x16, 0xf0, 0x3a, 0x79, 0xb3, 0xff, 0x35, 0x76, 0xbc, 0xee, 0x24, 0x67, 0xad, 0xe1, 0x2b, 0x68, 0xa2, 0xcc, 0x6, 0x45, 0x8f, 0xc3, 0x9, 0x4a, 0x80, 0xd2, 0x18, 0x5b, 0x91, 0xdd, 0x17, 0x54, 0x9e, 0x88, 0x42, 0x1, 0xcb, 0x87, 0x4d, 0xe, 0xc4, 0x96, 0x5c, 0x1f, 0xd5, 0x99, 0x53, 0x10, 0xda, 0xb4, 0x7e, 0x3d, 0xf7, 0xbb, 0x71, 0x32, 0xf8, 0xaa, 0x60, 0x23, 0xe9, 0xa5, 0x6f, 0x2c, 0xe6, 0xfd, 0x37, 0x74, 0xbe, 0xf2, 0x38, 0x7b, 0xb1, 0xe3, 0x29, 0x6a, 0xa0, 0xec, 0x26, 0x65, 0xaf, 0xc1, 0xb, 0x48, 0x82, 0xce, 0x4, 0x47, 0x8d, 0xdf, 0x15, 0x56, 0x9c, 0xd0, 0x1a, 0x59, 0x93, 0x85, 0x4f, 0xc, 0xc6, 0x8a, 0x40, 0x3, 0xc9, 0x9b, 0x51, 0x12, 0xd8, 0x94, 0x5e, 0x1d, 0xd7, 0xb9, 0x73, 0x30, 0xfa, 0xb6, 0x7c, 0x3f, 0xf5, 0xa7, 0x6d, 0x2e, 0xe4, 0xa8, 0x62, 0x21, 0xeb, 0xd, 0xc7, 0x84, 0x4e, 0x2, 0xc8, 0x8b, 0x41, 0x13, 0xd9, 0x9a, 0x50, 0x1c, 0xd6, 0x95, 0x5f, 0x31, 0xfb, 0xb8, 0x72, 0x3e, 0xf4, 0xb7, 0x7d, 0x2f, 0xe5, 0xa6, 0x6c, 0x20, 0xea, 0xa9, 0x63, 0x75, 0xbf, 0xfc, 0x36, 0x7a, 0xb0, 0xf3, 0x39, 0x6b, 0xa1, 0xe2, 0x28, 0x64, 0xae, 0xed, 0x27, 0x49, 0x83, 0xc0, 0xa, 0x46, 0x8c, 0xcf, 0x5, 0x57, 0x9d, 0xde, 0x14, 0x58, 0x92, 0xd1, 0x1b},
+ {0x0, 0xcb, 0x8b, 0x40, 0xb, 0xc0, 0x80, 0x4b, 0x16, 0xdd, 0x9d, 0x56, 0x1d, 0xd6, 0x96, 0x5d, 0x2c, 0xe7, 0xa7, 0x6c, 0x27, 0xec, 0xac, 0x67, 0x3a, 0xf1, 0xb1, 0x7a, 0x31, 0xfa, 0xba, 0x71, 0x58, 0x93, 0xd3, 0x18, 0x53, 0x98, 0xd8, 0x13, 0x4e, 0x85, 0xc5, 0xe, 0x45, 0x8e, 0xce, 0x5, 0x74, 0xbf, 0xff, 0x34, 0x7f, 0xb4, 0xf4, 0x3f, 0x62, 0xa9, 0xe9, 0x22, 0x69, 0xa2, 0xe2, 0x29, 0xb0, 0x7b, 0x3b, 0xf0, 0xbb, 0x70, 0x30, 0xfb, 0xa6, 0x6d, 0x2d, 0xe6, 0xad, 0x66, 0x26, 0xed, 0x9c, 0x57, 0x17, 0xdc, 0x97, 0x5c, 0x1c, 0xd7, 0x8a, 0x41, 0x1, 0xca, 0x81, 0x4a, 0xa, 0xc1, 0xe8, 0x23, 0x63, 0xa8, 0xe3, 0x28, 0x68, 0xa3, 0xfe, 0x35, 0x75, 0xbe, 0xf5, 0x3e, 0x7e, 0xb5, 0xc4, 0xf, 0x4f, 0x84, 0xcf, 0x4, 0x44, 0x8f, 0xd2, 0x19, 0x59, 0x92, 0xd9, 0x12, 0x52, 0x99, 0x7d, 0xb6, 0xf6, 0x3d, 0x76, 0xbd, 0xfd, 0x36, 0x6b, 0xa0, 0xe0, 0x2b, 0x60, 0xab, 0xeb, 0x20, 0x51, 0x9a, 0xda, 0x11, 0x5a, 0x91, 0xd1, 0x1a, 0x47, 0x8c, 0xcc, 0x7, 0x4c, 0x87, 0xc7, 0xc, 0x25, 0xee, 0xae, 0x65, 0x2e, 0xe5, 0xa5, 0x6e, 0x33, 0xf8, 0xb8, 0x73, 0x38, 0xf3, 0xb3, 0x78, 0x9, 0xc2, 0x82, 0x49, 0x2, 0xc9, 0x89, 0x42, 0x1f, 0xd4, 0x94, 0x5f, 0x14, 0xdf, 0x9f, 0x54, 0xcd, 0x6, 0x46, 0x8d, 0xc6, 0xd, 0x4d, 0x86, 0xdb, 0x10, 0x50, 0x9b, 0xd0, 0x1b, 0x5b, 0x90, 0xe1, 0x2a, 0x6a, 0xa1, 0xea, 0x21, 0x61, 0xaa, 0xf7, 0x3c, 0x7c, 0xb7, 0xfc, 0x37, 0x77, 0xbc, 0x95, 0x5e, 0x1e, 0xd5, 0x9e, 0x55, 0x15, 0xde, 0x83, 0x48, 0x8, 0xc3, 0x88, 0x43, 0x3, 0xc8, 0xb9, 0x72, 0x32, 0xf9, 0xb2, 0x79, 0x39, 0xf2, 0xaf, 0x64, 0x24, 0xef, 0xa4, 0x6f, 0x2f, 0xe4},
+ {0x0, 0xcc, 0x85, 0x49, 0x17, 0xdb, 0x92, 0x5e, 0x2e, 0xe2, 0xab, 0x67, 0x39, 0xf5, 0xbc, 0x70, 0x5c, 0x90, 0xd9, 0x15, 0x4b, 0x87, 0xce, 0x2, 0x72, 0xbe, 0xf7, 0x3b, 0x65, 0xa9, 0xe0, 0x2c, 0xb8, 0x74, 0x3d, 0xf1, 0xaf, 0x63, 0x2a, 0xe6, 0x96, 0x5a, 0x13, 0xdf, 0x81, 0x4d, 0x4, 0xc8, 0xe4, 0x28, 0x61, 0xad, 0xf3, 0x3f, 0x76, 0xba, 0xca, 0x6, 0x4f, 0x83, 0xdd, 0x11, 0x58, 0x94, 0x6d, 0xa1, 0xe8, 0x24, 0x7a, 0xb6, 0xff, 0x33, 0x43, 0x8f, 0xc6, 0xa, 0x54, 0x98, 0xd1, 0x1d, 0x31, 0xfd, 0xb4, 0x78, 0x26, 0xea, 0xa3, 0x6f, 0x1f, 0xd3, 0x9a, 0x56, 0x8, 0xc4, 0x8d, 0x41, 0xd5, 0x19, 0x50, 0x9c, 0xc2, 0xe, 0x47, 0x8b, 0xfb, 0x37, 0x7e, 0xb2, 0xec, 0x20, 0x69, 0xa5, 0x89, 0x45, 0xc, 0xc0, 0x9e, 0x52, 0x1b, 0xd7, 0xa7, 0x6b, 0x22, 0xee, 0xb0, 0x7c, 0x35, 0xf9, 0xda, 0x16, 0x5f, 0x93, 0xcd, 0x1, 0x48, 0x84, 0xf4, 0x38, 0x71, 0xbd, 0xe3, 0x2f, 0x66, 0xaa, 0x86, 0x4a, 0x3, 0xcf, 0x91, 0x5d, 0x14, 0xd8, 0xa8, 0x64, 0x2d, 0xe1, 0xbf, 0x73, 0x3a, 0xf6, 0x62, 0xae, 0xe7, 0x2b, 0x75, 0xb9, 0xf0, 0x3c, 0x4c, 0x80, 0xc9, 0x5, 0x5b, 0x97, 0xde, 0x12, 0x3e, 0xf2, 0xbb, 0x77, 0x29, 0xe5, 0xac, 0x60, 0x10, 0xdc, 0x95, 0x59, 0x7, 0xcb, 0x82, 0x4e, 0xb7, 0x7b, 0x32, 0xfe, 0xa0, 0x6c, 0x25, 0xe9, 0x99, 0x55, 0x1c, 0xd0, 0x8e, 0x42, 0xb, 0xc7, 0xeb, 0x27, 0x6e, 0xa2, 0xfc, 0x30, 0x79, 0xb5, 0xc5, 0x9, 0x40, 0x8c, 0xd2, 0x1e, 0x57, 0x9b, 0xf, 0xc3, 0x8a, 0x46, 0x18, 0xd4, 0x9d, 0x51, 0x21, 0xed, 0xa4, 0x68, 0x36, 0xfa, 0xb3, 0x7f, 0x53, 0x9f, 0xd6, 0x1a, 0x44, 0x88, 0xc1, 0xd, 0x7d, 0xb1, 0xf8, 0x34, 0x6a, 0xa6, 0xef, 0x23},
+ {0x0, 0xcd, 0x87, 0x4a, 0x13, 0xde, 0x94, 0x59, 0x26, 0xeb, 0xa1, 0x6c, 0x35, 0xf8, 0xb2, 0x7f, 0x4c, 0x81, 0xcb, 0x6, 0x5f, 0x92, 0xd8, 0x15, 0x6a, 0xa7, 0xed, 0x20, 0x79, 0xb4, 0xfe, 0x33, 0x98, 0x55, 0x1f, 0xd2, 0x8b, 0x46, 0xc, 0xc1, 0xbe, 0x73, 0x39, 0xf4, 0xad, 0x60, 0x2a, 0xe7, 0xd4, 0x19, 0x53, 0x9e, 0xc7, 0xa, 0x40, 0x8d, 0xf2, 0x3f, 0x75, 0xb8, 0xe1, 0x2c, 0x66, 0xab, 0x2d, 0xe0, 0xaa, 0x67, 0x3e, 0xf3, 0xb9, 0x74, 0xb, 0xc6, 0x8c, 0x41, 0x18, 0xd5, 0x9f, 0x52, 0x61, 0xac, 0xe6, 0x2b, 0x72, 0xbf, 0xf5, 0x38, 0x47, 0x8a, 0xc0, 0xd, 0x54, 0x99, 0xd3, 0x1e, 0xb5, 0x78, 0x32, 0xff, 0xa6, 0x6b, 0x21, 0xec, 0x93, 0x5e, 0x14, 0xd9, 0x80, 0x4d, 0x7, 0xca, 0xf9, 0x34, 0x7e, 0xb3, 0xea, 0x27, 0x6d, 0xa0, 0xdf, 0x12, 0x58, 0x95, 0xcc, 0x1, 0x4b, 0x86, 0x5a, 0x97, 0xdd, 0x10, 0x49, 0x84, 0xce, 0x3, 0x7c, 0xb1, 0xfb, 0x36, 0x6f, 0xa2, 0xe8, 0x25, 0x16, 0xdb, 0x91, 0x5c, 0x5, 0xc8, 0x82, 0x4f, 0x30, 0xfd, 0xb7, 0x7a, 0x23, 0xee, 0xa4, 0x69, 0xc2, 0xf, 0x45, 0x88, 0xd1, 0x1c, 0x56, 0x9b, 0xe4, 0x29, 0x63, 0xae, 0xf7, 0x3a, 0x70, 0xbd, 0x8e, 0x43, 0x9, 0xc4, 0x9d, 0x50, 0x1a, 0xd7, 0xa8, 0x65, 0x2f, 0xe2, 0xbb, 0x76, 0x3c, 0xf1, 0x77, 0xba, 0xf0, 0x3d, 0x64, 0xa9, 0xe3, 0x2e, 0x51, 0x9c, 0xd6, 0x1b, 0x42, 0x8f, 0xc5, 0x8, 0x3b, 0xf6, 0xbc, 0x71, 0x28, 0xe5, 0xaf, 0x62, 0x1d, 0xd0, 0x9a, 0x57, 0xe, 0xc3, 0x89, 0x44, 0xef, 0x22, 0x68, 0xa5, 0xfc, 0x31, 0x7b, 0xb6, 0xc9, 0x4, 0x4e, 0x83, 0xda, 0x17, 0x5d, 0x90, 0xa3, 0x6e, 0x24, 0xe9, 0xb0, 0x7d, 0x37, 0xfa, 0x85, 0x48, 0x2, 0xcf, 0x96, 0x5b, 0x11, 0xdc},
+ {0x0, 0xce, 0x81, 0x4f, 0x1f, 0xd1, 0x9e, 0x50, 0x3e, 0xf0, 0xbf, 0x71, 0x21, 0xef, 0xa0, 0x6e, 0x7c, 0xb2, 0xfd, 0x33, 0x63, 0xad, 0xe2, 0x2c, 0x42, 0x8c, 0xc3, 0xd, 0x5d, 0x93, 0xdc, 0x12, 0xf8, 0x36, 0x79, 0xb7, 0xe7, 0x29, 0x66, 0xa8, 0xc6, 0x8, 0x47, 0x89, 0xd9, 0x17, 0x58, 0x96, 0x84, 0x4a, 0x5, 0xcb, 0x9b, 0x55, 0x1a, 0xd4, 0xba, 0x74, 0x3b, 0xf5, 0xa5, 0x6b, 0x24, 0xea, 0xed, 0x23, 0x6c, 0xa2, 0xf2, 0x3c, 0x73, 0xbd, 0xd3, 0x1d, 0x52, 0x9c, 0xcc, 0x2, 0x4d, 0x83, 0x91, 0x5f, 0x10, 0xde, 0x8e, 0x40, 0xf, 0xc1, 0xaf, 0x61, 0x2e, 0xe0, 0xb0, 0x7e, 0x31, 0xff, 0x15, 0xdb, 0x94, 0x5a, 0xa, 0xc4, 0x8b, 0x45, 0x2b, 0xe5, 0xaa, 0x64, 0x34, 0xfa, 0xb5, 0x7b, 0x69, 0xa7, 0xe8, 0x26, 0x76, 0xb8, 0xf7, 0x39, 0x57, 0x99, 0xd6, 0x18, 0x48, 0x86, 0xc9, 0x7, 0xc7, 0x9, 0x46, 0x88, 0xd8, 0x16, 0x59, 0x97, 0xf9, 0x37, 0x78, 0xb6, 0xe6, 0x28, 0x67, 0xa9, 0xbb, 0x75, 0x3a, 0xf4, 0xa4, 0x6a, 0x25, 0xeb, 0x85, 0x4b, 0x4, 0xca, 0x9a, 0x54, 0x1b, 0xd5, 0x3f, 0xf1, 0xbe, 0x70, 0x20, 0xee, 0xa1, 0x6f, 0x1, 0xcf, 0x80, 0x4e, 0x1e, 0xd0, 0x9f, 0x51, 0x43, 0x8d, 0xc2, 0xc, 0x5c, 0x92, 0xdd, 0x13, 0x7d, 0xb3, 0xfc, 0x32, 0x62, 0xac, 0xe3, 0x2d, 0x2a, 0xe4, 0xab, 0x65, 0x35, 0xfb, 0xb4, 0x7a, 0x14, 0xda, 0x95, 0x5b, 0xb, 0xc5, 0x8a, 0x44, 0x56, 0x98, 0xd7, 0x19, 0x49, 0x87, 0xc8, 0x6, 0x68, 0xa6, 0xe9, 0x27, 0x77, 0xb9, 0xf6, 0x38, 0xd2, 0x1c, 0x53, 0x9d, 0xcd, 0x3, 0x4c, 0x82, 0xec, 0x22, 0x6d, 0xa3, 0xf3, 0x3d, 0x72, 0xbc, 0xae, 0x60, 0x2f, 0xe1, 0xb1, 0x7f, 0x30, 0xfe, 0x90, 0x5e, 0x11, 0xdf, 0x8f, 0x41, 0xe, 0xc0},
+ {0x0, 0xcf, 0x83, 0x4c, 0x1b, 0xd4, 0x98, 0x57, 0x36, 0xf9, 0xb5, 0x7a, 0x2d, 0xe2, 0xae, 0x61, 0x6c, 0xa3, 0xef, 0x20, 0x77, 0xb8, 0xf4, 0x3b, 0x5a, 0x95, 0xd9, 0x16, 0x41, 0x8e, 0xc2, 0xd, 0xd8, 0x17, 0x5b, 0x94, 0xc3, 0xc, 0x40, 0x8f, 0xee, 0x21, 0x6d, 0xa2, 0xf5, 0x3a, 0x76, 0xb9, 0xb4, 0x7b, 0x37, 0xf8, 0xaf, 0x60, 0x2c, 0xe3, 0x82, 0x4d, 0x1, 0xce, 0x99, 0x56, 0x1a, 0xd5, 0xad, 0x62, 0x2e, 0xe1, 0xb6, 0x79, 0x35, 0xfa, 0x9b, 0x54, 0x18, 0xd7, 0x80, 0x4f, 0x3, 0xcc, 0xc1, 0xe, 0x42, 0x8d, 0xda, 0x15, 0x59, 0x96, 0xf7, 0x38, 0x74, 0xbb, 0xec, 0x23, 0x6f, 0xa0, 0x75, 0xba, 0xf6, 0x39, 0x6e, 0xa1, 0xed, 0x22, 0x43, 0x8c, 0xc0, 0xf, 0x58, 0x97, 0xdb, 0x14, 0x19, 0xd6, 0x9a, 0x55, 0x2, 0xcd, 0x81, 0x4e, 0x2f, 0xe0, 0xac, 0x63, 0x34, 0xfb, 0xb7, 0x78, 0x47, 0x88, 0xc4, 0xb, 0x5c, 0x93, 0xdf, 0x10, 0x71, 0xbe, 0xf2, 0x3d, 0x6a, 0xa5, 0xe9, 0x26, 0x2b, 0xe4, 0xa8, 0x67, 0x30, 0xff, 0xb3, 0x7c, 0x1d, 0xd2, 0x9e, 0x51, 0x6, 0xc9, 0x85, 0x4a, 0x9f, 0x50, 0x1c, 0xd3, 0x84, 0x4b, 0x7, 0xc8, 0xa9, 0x66, 0x2a, 0xe5, 0xb2, 0x7d, 0x31, 0xfe, 0xf3, 0x3c, 0x70, 0xbf, 0xe8, 0x27, 0x6b, 0xa4, 0xc5, 0xa, 0x46, 0x89, 0xde, 0x11, 0x5d, 0x92, 0xea, 0x25, 0x69, 0xa6, 0xf1, 0x3e, 0x72, 0xbd, 0xdc, 0x13, 0x5f, 0x90, 0xc7, 0x8, 0x44, 0x8b, 0x86, 0x49, 0x5, 0xca, 0x9d, 0x52, 0x1e, 0xd1, 0xb0, 0x7f, 0x33, 0xfc, 0xab, 0x64, 0x28, 0xe7, 0x32, 0xfd, 0xb1, 0x7e, 0x29, 0xe6, 0xaa, 0x65, 0x4, 0xcb, 0x87, 0x48, 0x1f, 0xd0, 0x9c, 0x53, 0x5e, 0x91, 0xdd, 0x12, 0x45, 0x8a, 0xc6, 0x9, 0x68, 0xa7, 0xeb, 0x24, 0x73, 0xbc, 0xf0, 0x3f},
+ {0x0, 0xd0, 0xbd, 0x6d, 0x67, 0xb7, 0xda, 0xa, 0xce, 0x1e, 0x73, 0xa3, 0xa9, 0x79, 0x14, 0xc4, 0x81, 0x51, 0x3c, 0xec, 0xe6, 0x36, 0x5b, 0x8b, 0x4f, 0x9f, 0xf2, 0x22, 0x28, 0xf8, 0x95, 0x45, 0x1f, 0xcf, 0xa2, 0x72, 0x78, 0xa8, 0xc5, 0x15, 0xd1, 0x1, 0x6c, 0xbc, 0xb6, 0x66, 0xb, 0xdb, 0x9e, 0x4e, 0x23, 0xf3, 0xf9, 0x29, 0x44, 0x94, 0x50, 0x80, 0xed, 0x3d, 0x37, 0xe7, 0x8a, 0x5a, 0x3e, 0xee, 0x83, 0x53, 0x59, 0x89, 0xe4, 0x34, 0xf0, 0x20, 0x4d, 0x9d, 0x97, 0x47, 0x2a, 0xfa, 0xbf, 0x6f, 0x2, 0xd2, 0xd8, 0x8, 0x65, 0xb5, 0x71, 0xa1, 0xcc, 0x1c, 0x16, 0xc6, 0xab, 0x7b, 0x21, 0xf1, 0x9c, 0x4c, 0x46, 0x96, 0xfb, 0x2b, 0xef, 0x3f, 0x52, 0x82, 0x88, 0x58, 0x35, 0xe5, 0xa0, 0x70, 0x1d, 0xcd, 0xc7, 0x17, 0x7a, 0xaa, 0x6e, 0xbe, 0xd3, 0x3, 0x9, 0xd9, 0xb4, 0x64, 0x7c, 0xac, 0xc1, 0x11, 0x1b, 0xcb, 0xa6, 0x76, 0xb2, 0x62, 0xf, 0xdf, 0xd5, 0x5, 0x68, 0xb8, 0xfd, 0x2d, 0x40, 0x90, 0x9a, 0x4a, 0x27, 0xf7, 0x33, 0xe3, 0x8e, 0x5e, 0x54, 0x84, 0xe9, 0x39, 0x63, 0xb3, 0xde, 0xe, 0x4, 0xd4, 0xb9, 0x69, 0xad, 0x7d, 0x10, 0xc0, 0xca, 0x1a, 0x77, 0xa7, 0xe2, 0x32, 0x5f, 0x8f, 0x85, 0x55, 0x38, 0xe8, 0x2c, 0xfc, 0x91, 0x41, 0x4b, 0x9b, 0xf6, 0x26, 0x42, 0x92, 0xff, 0x2f, 0x25, 0xf5, 0x98, 0x48, 0x8c, 0x5c, 0x31, 0xe1, 0xeb, 0x3b, 0x56, 0x86, 0xc3, 0x13, 0x7e, 0xae, 0xa4, 0x74, 0x19, 0xc9, 0xd, 0xdd, 0xb0, 0x60, 0x6a, 0xba, 0xd7, 0x7, 0x5d, 0x8d, 0xe0, 0x30, 0x3a, 0xea, 0x87, 0x57, 0x93, 0x43, 0x2e, 0xfe, 0xf4, 0x24, 0x49, 0x99, 0xdc, 0xc, 0x61, 0xb1, 0xbb, 0x6b, 0x6, 0xd6, 0x12, 0xc2, 0xaf, 0x7f, 0x75, 0xa5, 0xc8, 0x18},
+ {0x0, 0xd1, 0xbf, 0x6e, 0x63, 0xb2, 0xdc, 0xd, 0xc6, 0x17, 0x79, 0xa8, 0xa5, 0x74, 0x1a, 0xcb, 0x91, 0x40, 0x2e, 0xff, 0xf2, 0x23, 0x4d, 0x9c, 0x57, 0x86, 0xe8, 0x39, 0x34, 0xe5, 0x8b, 0x5a, 0x3f, 0xee, 0x80, 0x51, 0x5c, 0x8d, 0xe3, 0x32, 0xf9, 0x28, 0x46, 0x97, 0x9a, 0x4b, 0x25, 0xf4, 0xae, 0x7f, 0x11, 0xc0, 0xcd, 0x1c, 0x72, 0xa3, 0x68, 0xb9, 0xd7, 0x6, 0xb, 0xda, 0xb4, 0x65, 0x7e, 0xaf, 0xc1, 0x10, 0x1d, 0xcc, 0xa2, 0x73, 0xb8, 0x69, 0x7, 0xd6, 0xdb, 0xa, 0x64, 0xb5, 0xef, 0x3e, 0x50, 0x81, 0x8c, 0x5d, 0x33, 0xe2, 0x29, 0xf8, 0x96, 0x47, 0x4a, 0x9b, 0xf5, 0x24, 0x41, 0x90, 0xfe, 0x2f, 0x22, 0xf3, 0x9d, 0x4c, 0x87, 0x56, 0x38, 0xe9, 0xe4, 0x35, 0x5b, 0x8a, 0xd0, 0x1, 0x6f, 0xbe, 0xb3, 0x62, 0xc, 0xdd, 0x16, 0xc7, 0xa9, 0x78, 0x75, 0xa4, 0xca, 0x1b, 0xfc, 0x2d, 0x43, 0x92, 0x9f, 0x4e, 0x20, 0xf1, 0x3a, 0xeb, 0x85, 0x54, 0x59, 0x88, 0xe6, 0x37, 0x6d, 0xbc, 0xd2, 0x3, 0xe, 0xdf, 0xb1, 0x60, 0xab, 0x7a, 0x14, 0xc5, 0xc8, 0x19, 0x77, 0xa6, 0xc3, 0x12, 0x7c, 0xad, 0xa0, 0x71, 0x1f, 0xce, 0x5, 0xd4, 0xba, 0x6b, 0x66, 0xb7, 0xd9, 0x8, 0x52, 0x83, 0xed, 0x3c, 0x31, 0xe0, 0x8e, 0x5f, 0x94, 0x45, 0x2b, 0xfa, 0xf7, 0x26, 0x48, 0x99, 0x82, 0x53, 0x3d, 0xec, 0xe1, 0x30, 0x5e, 0x8f, 0x44, 0x95, 0xfb, 0x2a, 0x27, 0xf6, 0x98, 0x49, 0x13, 0xc2, 0xac, 0x7d, 0x70, 0xa1, 0xcf, 0x1e, 0xd5, 0x4, 0x6a, 0xbb, 0xb6, 0x67, 0x9, 0xd8, 0xbd, 0x6c, 0x2, 0xd3, 0xde, 0xf, 0x61, 0xb0, 0x7b, 0xaa, 0xc4, 0x15, 0x18, 0xc9, 0xa7, 0x76, 0x2c, 0xfd, 0x93, 0x42, 0x4f, 0x9e, 0xf0, 0x21, 0xea, 0x3b, 0x55, 0x84, 0x89, 0x58, 0x36, 0xe7},
+ {0x0, 0xd2, 0xb9, 0x6b, 0x6f, 0xbd, 0xd6, 0x4, 0xde, 0xc, 0x67, 0xb5, 0xb1, 0x63, 0x8, 0xda, 0xa1, 0x73, 0x18, 0xca, 0xce, 0x1c, 0x77, 0xa5, 0x7f, 0xad, 0xc6, 0x14, 0x10, 0xc2, 0xa9, 0x7b, 0x5f, 0x8d, 0xe6, 0x34, 0x30, 0xe2, 0x89, 0x5b, 0x81, 0x53, 0x38, 0xea, 0xee, 0x3c, 0x57, 0x85, 0xfe, 0x2c, 0x47, 0x95, 0x91, 0x43, 0x28, 0xfa, 0x20, 0xf2, 0x99, 0x4b, 0x4f, 0x9d, 0xf6, 0x24, 0xbe, 0x6c, 0x7, 0xd5, 0xd1, 0x3, 0x68, 0xba, 0x60, 0xb2, 0xd9, 0xb, 0xf, 0xdd, 0xb6, 0x64, 0x1f, 0xcd, 0xa6, 0x74, 0x70, 0xa2, 0xc9, 0x1b, 0xc1, 0x13, 0x78, 0xaa, 0xae, 0x7c, 0x17, 0xc5, 0xe1, 0x33, 0x58, 0x8a, 0x8e, 0x5c, 0x37, 0xe5, 0x3f, 0xed, 0x86, 0x54, 0x50, 0x82, 0xe9, 0x3b, 0x40, 0x92, 0xf9, 0x2b, 0x2f, 0xfd, 0x96, 0x44, 0x9e, 0x4c, 0x27, 0xf5, 0xf1, 0x23, 0x48, 0x9a, 0x61, 0xb3, 0xd8, 0xa, 0xe, 0xdc, 0xb7, 0x65, 0xbf, 0x6d, 0x6, 0xd4, 0xd0, 0x2, 0x69, 0xbb, 0xc0, 0x12, 0x79, 0xab, 0xaf, 0x7d, 0x16, 0xc4, 0x1e, 0xcc, 0xa7, 0x75, 0x71, 0xa3, 0xc8, 0x1a, 0x3e, 0xec, 0x87, 0x55, 0x51, 0x83, 0xe8, 0x3a, 0xe0, 0x32, 0x59, 0x8b, 0x8f, 0x5d, 0x36, 0xe4, 0x9f, 0x4d, 0x26, 0xf4, 0xf0, 0x22, 0x49, 0x9b, 0x41, 0x93, 0xf8, 0x2a, 0x2e, 0xfc, 0x97, 0x45, 0xdf, 0xd, 0x66, 0xb4, 0xb0, 0x62, 0x9, 0xdb, 0x1, 0xd3, 0xb8, 0x6a, 0x6e, 0xbc, 0xd7, 0x5, 0x7e, 0xac, 0xc7, 0x15, 0x11, 0xc3, 0xa8, 0x7a, 0xa0, 0x72, 0x19, 0xcb, 0xcf, 0x1d, 0x76, 0xa4, 0x80, 0x52, 0x39, 0xeb, 0xef, 0x3d, 0x56, 0x84, 0x5e, 0x8c, 0xe7, 0x35, 0x31, 0xe3, 0x88, 0x5a, 0x21, 0xf3, 0x98, 0x4a, 0x4e, 0x9c, 0xf7, 0x25, 0xff, 0x2d, 0x46, 0x94, 0x90, 0x42, 0x29, 0xfb},
+ {0x0, 0xd3, 0xbb, 0x68, 0x6b, 0xb8, 0xd0, 0x3, 0xd6, 0x5, 0x6d, 0xbe, 0xbd, 0x6e, 0x6, 0xd5, 0xb1, 0x62, 0xa, 0xd9, 0xda, 0x9, 0x61, 0xb2, 0x67, 0xb4, 0xdc, 0xf, 0xc, 0xdf, 0xb7, 0x64, 0x7f, 0xac, 0xc4, 0x17, 0x14, 0xc7, 0xaf, 0x7c, 0xa9, 0x7a, 0x12, 0xc1, 0xc2, 0x11, 0x79, 0xaa, 0xce, 0x1d, 0x75, 0xa6, 0xa5, 0x76, 0x1e, 0xcd, 0x18, 0xcb, 0xa3, 0x70, 0x73, 0xa0, 0xc8, 0x1b, 0xfe, 0x2d, 0x45, 0x96, 0x95, 0x46, 0x2e, 0xfd, 0x28, 0xfb, 0x93, 0x40, 0x43, 0x90, 0xf8, 0x2b, 0x4f, 0x9c, 0xf4, 0x27, 0x24, 0xf7, 0x9f, 0x4c, 0x99, 0x4a, 0x22, 0xf1, 0xf2, 0x21, 0x49, 0x9a, 0x81, 0x52, 0x3a, 0xe9, 0xea, 0x39, 0x51, 0x82, 0x57, 0x84, 0xec, 0x3f, 0x3c, 0xef, 0x87, 0x54, 0x30, 0xe3, 0x8b, 0x58, 0x5b, 0x88, 0xe0, 0x33, 0xe6, 0x35, 0x5d, 0x8e, 0x8d, 0x5e, 0x36, 0xe5, 0xe1, 0x32, 0x5a, 0x89, 0x8a, 0x59, 0x31, 0xe2, 0x37, 0xe4, 0x8c, 0x5f, 0x5c, 0x8f, 0xe7, 0x34, 0x50, 0x83, 0xeb, 0x38, 0x3b, 0xe8, 0x80, 0x53, 0x86, 0x55, 0x3d, 0xee, 0xed, 0x3e, 0x56, 0x85, 0x9e, 0x4d, 0x25, 0xf6, 0xf5, 0x26, 0x4e, 0x9d, 0x48, 0x9b, 0xf3, 0x20, 0x23, 0xf0, 0x98, 0x4b, 0x2f, 0xfc, 0x94, 0x47, 0x44, 0x97, 0xff, 0x2c, 0xf9, 0x2a, 0x42, 0x91, 0x92, 0x41, 0x29, 0xfa, 0x1f, 0xcc, 0xa4, 0x77, 0x74, 0xa7, 0xcf, 0x1c, 0xc9, 0x1a, 0x72, 0xa1, 0xa2, 0x71, 0x19, 0xca, 0xae, 0x7d, 0x15, 0xc6, 0xc5, 0x16, 0x7e, 0xad, 0x78, 0xab, 0xc3, 0x10, 0x13, 0xc0, 0xa8, 0x7b, 0x60, 0xb3, 0xdb, 0x8, 0xb, 0xd8, 0xb0, 0x63, 0xb6, 0x65, 0xd, 0xde, 0xdd, 0xe, 0x66, 0xb5, 0xd1, 0x2, 0x6a, 0xb9, 0xba, 0x69, 0x1, 0xd2, 0x7, 0xd4, 0xbc, 0x6f, 0x6c, 0xbf, 0xd7, 0x4},
+ {0x0, 0xd4, 0xb5, 0x61, 0x77, 0xa3, 0xc2, 0x16, 0xee, 0x3a, 0x5b, 0x8f, 0x99, 0x4d, 0x2c, 0xf8, 0xc1, 0x15, 0x74, 0xa0, 0xb6, 0x62, 0x3, 0xd7, 0x2f, 0xfb, 0x9a, 0x4e, 0x58, 0x8c, 0xed, 0x39, 0x9f, 0x4b, 0x2a, 0xfe, 0xe8, 0x3c, 0x5d, 0x89, 0x71, 0xa5, 0xc4, 0x10, 0x6, 0xd2, 0xb3, 0x67, 0x5e, 0x8a, 0xeb, 0x3f, 0x29, 0xfd, 0x9c, 0x48, 0xb0, 0x64, 0x5, 0xd1, 0xc7, 0x13, 0x72, 0xa6, 0x23, 0xf7, 0x96, 0x42, 0x54, 0x80, 0xe1, 0x35, 0xcd, 0x19, 0x78, 0xac, 0xba, 0x6e, 0xf, 0xdb, 0xe2, 0x36, 0x57, 0x83, 0x95, 0x41, 0x20, 0xf4, 0xc, 0xd8, 0xb9, 0x6d, 0x7b, 0xaf, 0xce, 0x1a, 0xbc, 0x68, 0x9, 0xdd, 0xcb, 0x1f, 0x7e, 0xaa, 0x52, 0x86, 0xe7, 0x33, 0x25, 0xf1, 0x90, 0x44, 0x7d, 0xa9, 0xc8, 0x1c, 0xa, 0xde, 0xbf, 0x6b, 0x93, 0x47, 0x26, 0xf2, 0xe4, 0x30, 0x51, 0x85, 0x46, 0x92, 0xf3, 0x27, 0x31, 0xe5, 0x84, 0x50, 0xa8, 0x7c, 0x1d, 0xc9, 0xdf, 0xb, 0x6a, 0xbe, 0x87, 0x53, 0x32, 0xe6, 0xf0, 0x24, 0x45, 0x91, 0x69, 0xbd, 0xdc, 0x8, 0x1e, 0xca, 0xab, 0x7f, 0xd9, 0xd, 0x6c, 0xb8, 0xae, 0x7a, 0x1b, 0xcf, 0x37, 0xe3, 0x82, 0x56, 0x40, 0x94, 0xf5, 0x21, 0x18, 0xcc, 0xad, 0x79, 0x6f, 0xbb, 0xda, 0xe, 0xf6, 0x22, 0x43, 0x97, 0x81, 0x55, 0x34, 0xe0, 0x65, 0xb1, 0xd0, 0x4, 0x12, 0xc6, 0xa7, 0x73, 0x8b, 0x5f, 0x3e, 0xea, 0xfc, 0x28, 0x49, 0x9d, 0xa4, 0x70, 0x11, 0xc5, 0xd3, 0x7, 0x66, 0xb2, 0x4a, 0x9e, 0xff, 0x2b, 0x3d, 0xe9, 0x88, 0x5c, 0xfa, 0x2e, 0x4f, 0x9b, 0x8d, 0x59, 0x38, 0xec, 0x14, 0xc0, 0xa1, 0x75, 0x63, 0xb7, 0xd6, 0x2, 0x3b, 0xef, 0x8e, 0x5a, 0x4c, 0x98, 0xf9, 0x2d, 0xd5, 0x1, 0x60, 0xb4, 0xa2, 0x76, 0x17, 0xc3},
+ {0x0, 0xd5, 0xb7, 0x62, 0x73, 0xa6, 0xc4, 0x11, 0xe6, 0x33, 0x51, 0x84, 0x95, 0x40, 0x22, 0xf7, 0xd1, 0x4, 0x66, 0xb3, 0xa2, 0x77, 0x15, 0xc0, 0x37, 0xe2, 0x80, 0x55, 0x44, 0x91, 0xf3, 0x26, 0xbf, 0x6a, 0x8, 0xdd, 0xcc, 0x19, 0x7b, 0xae, 0x59, 0x8c, 0xee, 0x3b, 0x2a, 0xff, 0x9d, 0x48, 0x6e, 0xbb, 0xd9, 0xc, 0x1d, 0xc8, 0xaa, 0x7f, 0x88, 0x5d, 0x3f, 0xea, 0xfb, 0x2e, 0x4c, 0x99, 0x63, 0xb6, 0xd4, 0x1, 0x10, 0xc5, 0xa7, 0x72, 0x85, 0x50, 0x32, 0xe7, 0xf6, 0x23, 0x41, 0x94, 0xb2, 0x67, 0x5, 0xd0, 0xc1, 0x14, 0x76, 0xa3, 0x54, 0x81, 0xe3, 0x36, 0x27, 0xf2, 0x90, 0x45, 0xdc, 0x9, 0x6b, 0xbe, 0xaf, 0x7a, 0x18, 0xcd, 0x3a, 0xef, 0x8d, 0x58, 0x49, 0x9c, 0xfe, 0x2b, 0xd, 0xd8, 0xba, 0x6f, 0x7e, 0xab, 0xc9, 0x1c, 0xeb, 0x3e, 0x5c, 0x89, 0x98, 0x4d, 0x2f, 0xfa, 0xc6, 0x13, 0x71, 0xa4, 0xb5, 0x60, 0x2, 0xd7, 0x20, 0xf5, 0x97, 0x42, 0x53, 0x86, 0xe4, 0x31, 0x17, 0xc2, 0xa0, 0x75, 0x64, 0xb1, 0xd3, 0x6, 0xf1, 0x24, 0x46, 0x93, 0x82, 0x57, 0x35, 0xe0, 0x79, 0xac, 0xce, 0x1b, 0xa, 0xdf, 0xbd, 0x68, 0x9f, 0x4a, 0x28, 0xfd, 0xec, 0x39, 0x5b, 0x8e, 0xa8, 0x7d, 0x1f, 0xca, 0xdb, 0xe, 0x6c, 0xb9, 0x4e, 0x9b, 0xf9, 0x2c, 0x3d, 0xe8, 0x8a, 0x5f, 0xa5, 0x70, 0x12, 0xc7, 0xd6, 0x3, 0x61, 0xb4, 0x43, 0x96, 0xf4, 0x21, 0x30, 0xe5, 0x87, 0x52, 0x74, 0xa1, 0xc3, 0x16, 0x7, 0xd2, 0xb0, 0x65, 0x92, 0x47, 0x25, 0xf0, 0xe1, 0x34, 0x56, 0x83, 0x1a, 0xcf, 0xad, 0x78, 0x69, 0xbc, 0xde, 0xb, 0xfc, 0x29, 0x4b, 0x9e, 0x8f, 0x5a, 0x38, 0xed, 0xcb, 0x1e, 0x7c, 0xa9, 0xb8, 0x6d, 0xf, 0xda, 0x2d, 0xf8, 0x9a, 0x4f, 0x5e, 0x8b, 0xe9, 0x3c},
+ {0x0, 0xd6, 0xb1, 0x67, 0x7f, 0xa9, 0xce, 0x18, 0xfe, 0x28, 0x4f, 0x99, 0x81, 0x57, 0x30, 0xe6, 0xe1, 0x37, 0x50, 0x86, 0x9e, 0x48, 0x2f, 0xf9, 0x1f, 0xc9, 0xae, 0x78, 0x60, 0xb6, 0xd1, 0x7, 0xdf, 0x9, 0x6e, 0xb8, 0xa0, 0x76, 0x11, 0xc7, 0x21, 0xf7, 0x90, 0x46, 0x5e, 0x88, 0xef, 0x39, 0x3e, 0xe8, 0x8f, 0x59, 0x41, 0x97, 0xf0, 0x26, 0xc0, 0x16, 0x71, 0xa7, 0xbf, 0x69, 0xe, 0xd8, 0xa3, 0x75, 0x12, 0xc4, 0xdc, 0xa, 0x6d, 0xbb, 0x5d, 0x8b, 0xec, 0x3a, 0x22, 0xf4, 0x93, 0x45, 0x42, 0x94, 0xf3, 0x25, 0x3d, 0xeb, 0x8c, 0x5a, 0xbc, 0x6a, 0xd, 0xdb, 0xc3, 0x15, 0x72, 0xa4, 0x7c, 0xaa, 0xcd, 0x1b, 0x3, 0xd5, 0xb2, 0x64, 0x82, 0x54, 0x33, 0xe5, 0xfd, 0x2b, 0x4c, 0x9a, 0x9d, 0x4b, 0x2c, 0xfa, 0xe2, 0x34, 0x53, 0x85, 0x63, 0xb5, 0xd2, 0x4, 0x1c, 0xca, 0xad, 0x7b, 0x5b, 0x8d, 0xea, 0x3c, 0x24, 0xf2, 0x95, 0x43, 0xa5, 0x73, 0x14, 0xc2, 0xda, 0xc, 0x6b, 0xbd, 0xba, 0x6c, 0xb, 0xdd, 0xc5, 0x13, 0x74, 0xa2, 0x44, 0x92, 0xf5, 0x23, 0x3b, 0xed, 0x8a, 0x5c, 0x84, 0x52, 0x35, 0xe3, 0xfb, 0x2d, 0x4a, 0x9c, 0x7a, 0xac, 0xcb, 0x1d, 0x5, 0xd3, 0xb4, 0x62, 0x65, 0xb3, 0xd4, 0x2, 0x1a, 0xcc, 0xab, 0x7d, 0x9b, 0x4d, 0x2a, 0xfc, 0xe4, 0x32, 0x55, 0x83, 0xf8, 0x2e, 0x49, 0x9f, 0x87, 0x51, 0x36, 0xe0, 0x6, 0xd0, 0xb7, 0x61, 0x79, 0xaf, 0xc8, 0x1e, 0x19, 0xcf, 0xa8, 0x7e, 0x66, 0xb0, 0xd7, 0x1, 0xe7, 0x31, 0x56, 0x80, 0x98, 0x4e, 0x29, 0xff, 0x27, 0xf1, 0x96, 0x40, 0x58, 0x8e, 0xe9, 0x3f, 0xd9, 0xf, 0x68, 0xbe, 0xa6, 0x70, 0x17, 0xc1, 0xc6, 0x10, 0x77, 0xa1, 0xb9, 0x6f, 0x8, 0xde, 0x38, 0xee, 0x89, 0x5f, 0x47, 0x91, 0xf6, 0x20},
+ {0x0, 0xd7, 0xb3, 0x64, 0x7b, 0xac, 0xc8, 0x1f, 0xf6, 0x21, 0x45, 0x92, 0x8d, 0x5a, 0x3e, 0xe9, 0xf1, 0x26, 0x42, 0x95, 0x8a, 0x5d, 0x39, 0xee, 0x7, 0xd0, 0xb4, 0x63, 0x7c, 0xab, 0xcf, 0x18, 0xff, 0x28, 0x4c, 0x9b, 0x84, 0x53, 0x37, 0xe0, 0x9, 0xde, 0xba, 0x6d, 0x72, 0xa5, 0xc1, 0x16, 0xe, 0xd9, 0xbd, 0x6a, 0x75, 0xa2, 0xc6, 0x11, 0xf8, 0x2f, 0x4b, 0x9c, 0x83, 0x54, 0x30, 0xe7, 0xe3, 0x34, 0x50, 0x87, 0x98, 0x4f, 0x2b, 0xfc, 0x15, 0xc2, 0xa6, 0x71, 0x6e, 0xb9, 0xdd, 0xa, 0x12, 0xc5, 0xa1, 0x76, 0x69, 0xbe, 0xda, 0xd, 0xe4, 0x33, 0x57, 0x80, 0x9f, 0x48, 0x2c, 0xfb, 0x1c, 0xcb, 0xaf, 0x78, 0x67, 0xb0, 0xd4, 0x3, 0xea, 0x3d, 0x59, 0x8e, 0x91, 0x46, 0x22, 0xf5, 0xed, 0x3a, 0x5e, 0x89, 0x96, 0x41, 0x25, 0xf2, 0x1b, 0xcc, 0xa8, 0x7f, 0x60, 0xb7, 0xd3, 0x4, 0xdb, 0xc, 0x68, 0xbf, 0xa0, 0x77, 0x13, 0xc4, 0x2d, 0xfa, 0x9e, 0x49, 0x56, 0x81, 0xe5, 0x32, 0x2a, 0xfd, 0x99, 0x4e, 0x51, 0x86, 0xe2, 0x35, 0xdc, 0xb, 0x6f, 0xb8, 0xa7, 0x70, 0x14, 0xc3, 0x24, 0xf3, 0x97, 0x40, 0x5f, 0x88, 0xec, 0x3b, 0xd2, 0x5, 0x61, 0xb6, 0xa9, 0x7e, 0x1a, 0xcd, 0xd5, 0x2, 0x66, 0xb1, 0xae, 0x79, 0x1d, 0xca, 0x23, 0xf4, 0x90, 0x47, 0x58, 0x8f, 0xeb, 0x3c, 0x38, 0xef, 0x8b, 0x5c, 0x43, 0x94, 0xf0, 0x27, 0xce, 0x19, 0x7d, 0xaa, 0xb5, 0x62, 0x6, 0xd1, 0xc9, 0x1e, 0x7a, 0xad, 0xb2, 0x65, 0x1, 0xd6, 0x3f, 0xe8, 0x8c, 0x5b, 0x44, 0x93, 0xf7, 0x20, 0xc7, 0x10, 0x74, 0xa3, 0xbc, 0x6b, 0xf, 0xd8, 0x31, 0xe6, 0x82, 0x55, 0x4a, 0x9d, 0xf9, 0x2e, 0x36, 0xe1, 0x85, 0x52, 0x4d, 0x9a, 0xfe, 0x29, 0xc0, 0x17, 0x73, 0xa4, 0xbb, 0x6c, 0x8, 0xdf},
+ {0x0, 0xd8, 0xad, 0x75, 0x47, 0x9f, 0xea, 0x32, 0x8e, 0x56, 0x23, 0xfb, 0xc9, 0x11, 0x64, 0xbc, 0x1, 0xd9, 0xac, 0x74, 0x46, 0x9e, 0xeb, 0x33, 0x8f, 0x57, 0x22, 0xfa, 0xc8, 0x10, 0x65, 0xbd, 0x2, 0xda, 0xaf, 0x77, 0x45, 0x9d, 0xe8, 0x30, 0x8c, 0x54, 0x21, 0xf9, 0xcb, 0x13, 0x66, 0xbe, 0x3, 0xdb, 0xae, 0x76, 0x44, 0x9c, 0xe9, 0x31, 0x8d, 0x55, 0x20, 0xf8, 0xca, 0x12, 0x67, 0xbf, 0x4, 0xdc, 0xa9, 0x71, 0x43, 0x9b, 0xee, 0x36, 0x8a, 0x52, 0x27, 0xff, 0xcd, 0x15, 0x60, 0xb8, 0x5, 0xdd, 0xa8, 0x70, 0x42, 0x9a, 0xef, 0x37, 0x8b, 0x53, 0x26, 0xfe, 0xcc, 0x14, 0x61, 0xb9, 0x6, 0xde, 0xab, 0x73, 0x41, 0x99, 0xec, 0x34, 0x88, 0x50, 0x25, 0xfd, 0xcf, 0x17, 0x62, 0xba, 0x7, 0xdf, 0xaa, 0x72, 0x40, 0x98, 0xed, 0x35, 0x89, 0x51, 0x24, 0xfc, 0xce, 0x16, 0x63, 0xbb, 0x8, 0xd0, 0xa5, 0x7d, 0x4f, 0x97, 0xe2, 0x3a, 0x86, 0x5e, 0x2b, 0xf3, 0xc1, 0x19, 0x6c, 0xb4, 0x9, 0xd1, 0xa4, 0x7c, 0x4e, 0x96, 0xe3, 0x3b, 0x87, 0x5f, 0x2a, 0xf2, 0xc0, 0x18, 0x6d, 0xb5, 0xa, 0xd2, 0xa7, 0x7f, 0x4d, 0x95, 0xe0, 0x38, 0x84, 0x5c, 0x29, 0xf1, 0xc3, 0x1b, 0x6e, 0xb6, 0xb, 0xd3, 0xa6, 0x7e, 0x4c, 0x94, 0xe1, 0x39, 0x85, 0x5d, 0x28, 0xf0, 0xc2, 0x1a, 0x6f, 0xb7, 0xc, 0xd4, 0xa1, 0x79, 0x4b, 0x93, 0xe6, 0x3e, 0x82, 0x5a, 0x2f, 0xf7, 0xc5, 0x1d, 0x68, 0xb0, 0xd, 0xd5, 0xa0, 0x78, 0x4a, 0x92, 0xe7, 0x3f, 0x83, 0x5b, 0x2e, 0xf6, 0xc4, 0x1c, 0x69, 0xb1, 0xe, 0xd6, 0xa3, 0x7b, 0x49, 0x91, 0xe4, 0x3c, 0x80, 0x58, 0x2d, 0xf5, 0xc7, 0x1f, 0x6a, 0xb2, 0xf, 0xd7, 0xa2, 0x7a, 0x48, 0x90, 0xe5, 0x3d, 0x81, 0x59, 0x2c, 0xf4, 0xc6, 0x1e, 0x6b, 0xb3},
+ {0x0, 0xd9, 0xaf, 0x76, 0x43, 0x9a, 0xec, 0x35, 0x86, 0x5f, 0x29, 0xf0, 0xc5, 0x1c, 0x6a, 0xb3, 0x11, 0xc8, 0xbe, 0x67, 0x52, 0x8b, 0xfd, 0x24, 0x97, 0x4e, 0x38, 0xe1, 0xd4, 0xd, 0x7b, 0xa2, 0x22, 0xfb, 0x8d, 0x54, 0x61, 0xb8, 0xce, 0x17, 0xa4, 0x7d, 0xb, 0xd2, 0xe7, 0x3e, 0x48, 0x91, 0x33, 0xea, 0x9c, 0x45, 0x70, 0xa9, 0xdf, 0x6, 0xb5, 0x6c, 0x1a, 0xc3, 0xf6, 0x2f, 0x59, 0x80, 0x44, 0x9d, 0xeb, 0x32, 0x7, 0xde, 0xa8, 0x71, 0xc2, 0x1b, 0x6d, 0xb4, 0x81, 0x58, 0x2e, 0xf7, 0x55, 0x8c, 0xfa, 0x23, 0x16, 0xcf, 0xb9, 0x60, 0xd3, 0xa, 0x7c, 0xa5, 0x90, 0x49, 0x3f, 0xe6, 0x66, 0xbf, 0xc9, 0x10, 0x25, 0xfc, 0x8a, 0x53, 0xe0, 0x39, 0x4f, 0x96, 0xa3, 0x7a, 0xc, 0xd5, 0x77, 0xae, 0xd8, 0x1, 0x34, 0xed, 0x9b, 0x42, 0xf1, 0x28, 0x5e, 0x87, 0xb2, 0x6b, 0x1d, 0xc4, 0x88, 0x51, 0x27, 0xfe, 0xcb, 0x12, 0x64, 0xbd, 0xe, 0xd7, 0xa1, 0x78, 0x4d, 0x94, 0xe2, 0x3b, 0x99, 0x40, 0x36, 0xef, 0xda, 0x3, 0x75, 0xac, 0x1f, 0xc6, 0xb0, 0x69, 0x5c, 0x85, 0xf3, 0x2a, 0xaa, 0x73, 0x5, 0xdc, 0xe9, 0x30, 0x46, 0x9f, 0x2c, 0xf5, 0x83, 0x5a, 0x6f, 0xb6, 0xc0, 0x19, 0xbb, 0x62, 0x14, 0xcd, 0xf8, 0x21, 0x57, 0x8e, 0x3d, 0xe4, 0x92, 0x4b, 0x7e, 0xa7, 0xd1, 0x8, 0xcc, 0x15, 0x63, 0xba, 0x8f, 0x56, 0x20, 0xf9, 0x4a, 0x93, 0xe5, 0x3c, 0x9, 0xd0, 0xa6, 0x7f, 0xdd, 0x4, 0x72, 0xab, 0x9e, 0x47, 0x31, 0xe8, 0x5b, 0x82, 0xf4, 0x2d, 0x18, 0xc1, 0xb7, 0x6e, 0xee, 0x37, 0x41, 0x98, 0xad, 0x74, 0x2, 0xdb, 0x68, 0xb1, 0xc7, 0x1e, 0x2b, 0xf2, 0x84, 0x5d, 0xff, 0x26, 0x50, 0x89, 0xbc, 0x65, 0x13, 0xca, 0x79, 0xa0, 0xd6, 0xf, 0x3a, 0xe3, 0x95, 0x4c},
+ {0x0, 0xda, 0xa9, 0x73, 0x4f, 0x95, 0xe6, 0x3c, 0x9e, 0x44, 0x37, 0xed, 0xd1, 0xb, 0x78, 0xa2, 0x21, 0xfb, 0x88, 0x52, 0x6e, 0xb4, 0xc7, 0x1d, 0xbf, 0x65, 0x16, 0xcc, 0xf0, 0x2a, 0x59, 0x83, 0x42, 0x98, 0xeb, 0x31, 0xd, 0xd7, 0xa4, 0x7e, 0xdc, 0x6, 0x75, 0xaf, 0x93, 0x49, 0x3a, 0xe0, 0x63, 0xb9, 0xca, 0x10, 0x2c, 0xf6, 0x85, 0x5f, 0xfd, 0x27, 0x54, 0x8e, 0xb2, 0x68, 0x1b, 0xc1, 0x84, 0x5e, 0x2d, 0xf7, 0xcb, 0x11, 0x62, 0xb8, 0x1a, 0xc0, 0xb3, 0x69, 0x55, 0x8f, 0xfc, 0x26, 0xa5, 0x7f, 0xc, 0xd6, 0xea, 0x30, 0x43, 0x99, 0x3b, 0xe1, 0x92, 0x48, 0x74, 0xae, 0xdd, 0x7, 0xc6, 0x1c, 0x6f, 0xb5, 0x89, 0x53, 0x20, 0xfa, 0x58, 0x82, 0xf1, 0x2b, 0x17, 0xcd, 0xbe, 0x64, 0xe7, 0x3d, 0x4e, 0x94, 0xa8, 0x72, 0x1, 0xdb, 0x79, 0xa3, 0xd0, 0xa, 0x36, 0xec, 0x9f, 0x45, 0x15, 0xcf, 0xbc, 0x66, 0x5a, 0x80, 0xf3, 0x29, 0x8b, 0x51, 0x22, 0xf8, 0xc4, 0x1e, 0x6d, 0xb7, 0x34, 0xee, 0x9d, 0x47, 0x7b, 0xa1, 0xd2, 0x8, 0xaa, 0x70, 0x3, 0xd9, 0xe5, 0x3f, 0x4c, 0x96, 0x57, 0x8d, 0xfe, 0x24, 0x18, 0xc2, 0xb1, 0x6b, 0xc9, 0x13, 0x60, 0xba, 0x86, 0x5c, 0x2f, 0xf5, 0x76, 0xac, 0xdf, 0x5, 0x39, 0xe3, 0x90, 0x4a, 0xe8, 0x32, 0x41, 0x9b, 0xa7, 0x7d, 0xe, 0xd4, 0x91, 0x4b, 0x38, 0xe2, 0xde, 0x4, 0x77, 0xad, 0xf, 0xd5, 0xa6, 0x7c, 0x40, 0x9a, 0xe9, 0x33, 0xb0, 0x6a, 0x19, 0xc3, 0xff, 0x25, 0x56, 0x8c, 0x2e, 0xf4, 0x87, 0x5d, 0x61, 0xbb, 0xc8, 0x12, 0xd3, 0x9, 0x7a, 0xa0, 0x9c, 0x46, 0x35, 0xef, 0x4d, 0x97, 0xe4, 0x3e, 0x2, 0xd8, 0xab, 0x71, 0xf2, 0x28, 0x5b, 0x81, 0xbd, 0x67, 0x14, 0xce, 0x6c, 0xb6, 0xc5, 0x1f, 0x23, 0xf9, 0x8a, 0x50},
+ {0x0, 0xdb, 0xab, 0x70, 0x4b, 0x90, 0xe0, 0x3b, 0x96, 0x4d, 0x3d, 0xe6, 0xdd, 0x6, 0x76, 0xad, 0x31, 0xea, 0x9a, 0x41, 0x7a, 0xa1, 0xd1, 0xa, 0xa7, 0x7c, 0xc, 0xd7, 0xec, 0x37, 0x47, 0x9c, 0x62, 0xb9, 0xc9, 0x12, 0x29, 0xf2, 0x82, 0x59, 0xf4, 0x2f, 0x5f, 0x84, 0xbf, 0x64, 0x14, 0xcf, 0x53, 0x88, 0xf8, 0x23, 0x18, 0xc3, 0xb3, 0x68, 0xc5, 0x1e, 0x6e, 0xb5, 0x8e, 0x55, 0x25, 0xfe, 0xc4, 0x1f, 0x6f, 0xb4, 0x8f, 0x54, 0x24, 0xff, 0x52, 0x89, 0xf9, 0x22, 0x19, 0xc2, 0xb2, 0x69, 0xf5, 0x2e, 0x5e, 0x85, 0xbe, 0x65, 0x15, 0xce, 0x63, 0xb8, 0xc8, 0x13, 0x28, 0xf3, 0x83, 0x58, 0xa6, 0x7d, 0xd, 0xd6, 0xed, 0x36, 0x46, 0x9d, 0x30, 0xeb, 0x9b, 0x40, 0x7b, 0xa0, 0xd0, 0xb, 0x97, 0x4c, 0x3c, 0xe7, 0xdc, 0x7, 0x77, 0xac, 0x1, 0xda, 0xaa, 0x71, 0x4a, 0x91, 0xe1, 0x3a, 0x95, 0x4e, 0x3e, 0xe5, 0xde, 0x5, 0x75, 0xae, 0x3, 0xd8, 0xa8, 0x73, 0x48, 0x93, 0xe3, 0x38, 0xa4, 0x7f, 0xf, 0xd4, 0xef, 0x34, 0x44, 0x9f, 0x32, 0xe9, 0x99, 0x42, 0x79, 0xa2, 0xd2, 0x9, 0xf7, 0x2c, 0x5c, 0x87, 0xbc, 0x67, 0x17, 0xcc, 0x61, 0xba, 0xca, 0x11, 0x2a, 0xf1, 0x81, 0x5a, 0xc6, 0x1d, 0x6d, 0xb6, 0x8d, 0x56, 0x26, 0xfd, 0x50, 0x8b, 0xfb, 0x20, 0x1b, 0xc0, 0xb0, 0x6b, 0x51, 0x8a, 0xfa, 0x21, 0x1a, 0xc1, 0xb1, 0x6a, 0xc7, 0x1c, 0x6c, 0xb7, 0x8c, 0x57, 0x27, 0xfc, 0x60, 0xbb, 0xcb, 0x10, 0x2b, 0xf0, 0x80, 0x5b, 0xf6, 0x2d, 0x5d, 0x86, 0xbd, 0x66, 0x16, 0xcd, 0x33, 0xe8, 0x98, 0x43, 0x78, 0xa3, 0xd3, 0x8, 0xa5, 0x7e, 0xe, 0xd5, 0xee, 0x35, 0x45, 0x9e, 0x2, 0xd9, 0xa9, 0x72, 0x49, 0x92, 0xe2, 0x39, 0x94, 0x4f, 0x3f, 0xe4, 0xdf, 0x4, 0x74, 0xaf},
+ {0x0, 0xdc, 0xa5, 0x79, 0x57, 0x8b, 0xf2, 0x2e, 0xae, 0x72, 0xb, 0xd7, 0xf9, 0x25, 0x5c, 0x80, 0x41, 0x9d, 0xe4, 0x38, 0x16, 0xca, 0xb3, 0x6f, 0xef, 0x33, 0x4a, 0x96, 0xb8, 0x64, 0x1d, 0xc1, 0x82, 0x5e, 0x27, 0xfb, 0xd5, 0x9, 0x70, 0xac, 0x2c, 0xf0, 0x89, 0x55, 0x7b, 0xa7, 0xde, 0x2, 0xc3, 0x1f, 0x66, 0xba, 0x94, 0x48, 0x31, 0xed, 0x6d, 0xb1, 0xc8, 0x14, 0x3a, 0xe6, 0x9f, 0x43, 0x19, 0xc5, 0xbc, 0x60, 0x4e, 0x92, 0xeb, 0x37, 0xb7, 0x6b, 0x12, 0xce, 0xe0, 0x3c, 0x45, 0x99, 0x58, 0x84, 0xfd, 0x21, 0xf, 0xd3, 0xaa, 0x76, 0xf6, 0x2a, 0x53, 0x8f, 0xa1, 0x7d, 0x4, 0xd8, 0x9b, 0x47, 0x3e, 0xe2, 0xcc, 0x10, 0x69, 0xb5, 0x35, 0xe9, 0x90, 0x4c, 0x62, 0xbe, 0xc7, 0x1b, 0xda, 0x6, 0x7f, 0xa3, 0x8d, 0x51, 0x28, 0xf4, 0x74, 0xa8, 0xd1, 0xd, 0x23, 0xff, 0x86, 0x5a, 0x32, 0xee, 0x97, 0x4b, 0x65, 0xb9, 0xc0, 0x1c, 0x9c, 0x40, 0x39, 0xe5, 0xcb, 0x17, 0x6e, 0xb2, 0x73, 0xaf, 0xd6, 0xa, 0x24, 0xf8, 0x81, 0x5d, 0xdd, 0x1, 0x78, 0xa4, 0x8a, 0x56, 0x2f, 0xf3, 0xb0, 0x6c, 0x15, 0xc9, 0xe7, 0x3b, 0x42, 0x9e, 0x1e, 0xc2, 0xbb, 0x67, 0x49, 0x95, 0xec, 0x30, 0xf1, 0x2d, 0x54, 0x88, 0xa6, 0x7a, 0x3, 0xdf, 0x5f, 0x83, 0xfa, 0x26, 0x8, 0xd4, 0xad, 0x71, 0x2b, 0xf7, 0x8e, 0x52, 0x7c, 0xa0, 0xd9, 0x5, 0x85, 0x59, 0x20, 0xfc, 0xd2, 0xe, 0x77, 0xab, 0x6a, 0xb6, 0xcf, 0x13, 0x3d, 0xe1, 0x98, 0x44, 0xc4, 0x18, 0x61, 0xbd, 0x93, 0x4f, 0x36, 0xea, 0xa9, 0x75, 0xc, 0xd0, 0xfe, 0x22, 0x5b, 0x87, 0x7, 0xdb, 0xa2, 0x7e, 0x50, 0x8c, 0xf5, 0x29, 0xe8, 0x34, 0x4d, 0x91, 0xbf, 0x63, 0x1a, 0xc6, 0x46, 0x9a, 0xe3, 0x3f, 0x11, 0xcd, 0xb4, 0x68},
+ {0x0, 0xdd, 0xa7, 0x7a, 0x53, 0x8e, 0xf4, 0x29, 0xa6, 0x7b, 0x1, 0xdc, 0xf5, 0x28, 0x52, 0x8f, 0x51, 0x8c, 0xf6, 0x2b, 0x2, 0xdf, 0xa5, 0x78, 0xf7, 0x2a, 0x50, 0x8d, 0xa4, 0x79, 0x3, 0xde, 0xa2, 0x7f, 0x5, 0xd8, 0xf1, 0x2c, 0x56, 0x8b, 0x4, 0xd9, 0xa3, 0x7e, 0x57, 0x8a, 0xf0, 0x2d, 0xf3, 0x2e, 0x54, 0x89, 0xa0, 0x7d, 0x7, 0xda, 0x55, 0x88, 0xf2, 0x2f, 0x6, 0xdb, 0xa1, 0x7c, 0x59, 0x84, 0xfe, 0x23, 0xa, 0xd7, 0xad, 0x70, 0xff, 0x22, 0x58, 0x85, 0xac, 0x71, 0xb, 0xd6, 0x8, 0xd5, 0xaf, 0x72, 0x5b, 0x86, 0xfc, 0x21, 0xae, 0x73, 0x9, 0xd4, 0xfd, 0x20, 0x5a, 0x87, 0xfb, 0x26, 0x5c, 0x81, 0xa8, 0x75, 0xf, 0xd2, 0x5d, 0x80, 0xfa, 0x27, 0xe, 0xd3, 0xa9, 0x74, 0xaa, 0x77, 0xd, 0xd0, 0xf9, 0x24, 0x5e, 0x83, 0xc, 0xd1, 0xab, 0x76, 0x5f, 0x82, 0xf8, 0x25, 0xb2, 0x6f, 0x15, 0xc8, 0xe1, 0x3c, 0x46, 0x9b, 0x14, 0xc9, 0xb3, 0x6e, 0x47, 0x9a, 0xe0, 0x3d, 0xe3, 0x3e, 0x44, 0x99, 0xb0, 0x6d, 0x17, 0xca, 0x45, 0x98, 0xe2, 0x3f, 0x16, 0xcb, 0xb1, 0x6c, 0x10, 0xcd, 0xb7, 0x6a, 0x43, 0x9e, 0xe4, 0x39, 0xb6, 0x6b, 0x11, 0xcc, 0xe5, 0x38, 0x42, 0x9f, 0x41, 0x9c, 0xe6, 0x3b, 0x12, 0xcf, 0xb5, 0x68, 0xe7, 0x3a, 0x40, 0x9d, 0xb4, 0x69, 0x13, 0xce, 0xeb, 0x36, 0x4c, 0x91, 0xb8, 0x65, 0x1f, 0xc2, 0x4d, 0x90, 0xea, 0x37, 0x1e, 0xc3, 0xb9, 0x64, 0xba, 0x67, 0x1d, 0xc0, 0xe9, 0x34, 0x4e, 0x93, 0x1c, 0xc1, 0xbb, 0x66, 0x4f, 0x92, 0xe8, 0x35, 0x49, 0x94, 0xee, 0x33, 0x1a, 0xc7, 0xbd, 0x60, 0xef, 0x32, 0x48, 0x95, 0xbc, 0x61, 0x1b, 0xc6, 0x18, 0xc5, 0xbf, 0x62, 0x4b, 0x96, 0xec, 0x31, 0xbe, 0x63, 0x19, 0xc4, 0xed, 0x30, 0x4a, 0x97},
+ {0x0, 0xde, 0xa1, 0x7f, 0x5f, 0x81, 0xfe, 0x20, 0xbe, 0x60, 0x1f, 0xc1, 0xe1, 0x3f, 0x40, 0x9e, 0x61, 0xbf, 0xc0, 0x1e, 0x3e, 0xe0, 0x9f, 0x41, 0xdf, 0x1, 0x7e, 0xa0, 0x80, 0x5e, 0x21, 0xff, 0xc2, 0x1c, 0x63, 0xbd, 0x9d, 0x43, 0x3c, 0xe2, 0x7c, 0xa2, 0xdd, 0x3, 0x23, 0xfd, 0x82, 0x5c, 0xa3, 0x7d, 0x2, 0xdc, 0xfc, 0x22, 0x5d, 0x83, 0x1d, 0xc3, 0xbc, 0x62, 0x42, 0x9c, 0xe3, 0x3d, 0x99, 0x47, 0x38, 0xe6, 0xc6, 0x18, 0x67, 0xb9, 0x27, 0xf9, 0x86, 0x58, 0x78, 0xa6, 0xd9, 0x7, 0xf8, 0x26, 0x59, 0x87, 0xa7, 0x79, 0x6, 0xd8, 0x46, 0x98, 0xe7, 0x39, 0x19, 0xc7, 0xb8, 0x66, 0x5b, 0x85, 0xfa, 0x24, 0x4, 0xda, 0xa5, 0x7b, 0xe5, 0x3b, 0x44, 0x9a, 0xba, 0x64, 0x1b, 0xc5, 0x3a, 0xe4, 0x9b, 0x45, 0x65, 0xbb, 0xc4, 0x1a, 0x84, 0x5a, 0x25, 0xfb, 0xdb, 0x5, 0x7a, 0xa4, 0x2f, 0xf1, 0x8e, 0x50, 0x70, 0xae, 0xd1, 0xf, 0x91, 0x4f, 0x30, 0xee, 0xce, 0x10, 0x6f, 0xb1, 0x4e, 0x90, 0xef, 0x31, 0x11, 0xcf, 0xb0, 0x6e, 0xf0, 0x2e, 0x51, 0x8f, 0xaf, 0x71, 0xe, 0xd0, 0xed, 0x33, 0x4c, 0x92, 0xb2, 0x6c, 0x13, 0xcd, 0x53, 0x8d, 0xf2, 0x2c, 0xc, 0xd2, 0xad, 0x73, 0x8c, 0x52, 0x2d, 0xf3, 0xd3, 0xd, 0x72, 0xac, 0x32, 0xec, 0x93, 0x4d, 0x6d, 0xb3, 0xcc, 0x12, 0xb6, 0x68, 0x17, 0xc9, 0xe9, 0x37, 0x48, 0x96, 0x8, 0xd6, 0xa9, 0x77, 0x57, 0x89, 0xf6, 0x28, 0xd7, 0x9, 0x76, 0xa8, 0x88, 0x56, 0x29, 0xf7, 0x69, 0xb7, 0xc8, 0x16, 0x36, 0xe8, 0x97, 0x49, 0x74, 0xaa, 0xd5, 0xb, 0x2b, 0xf5, 0x8a, 0x54, 0xca, 0x14, 0x6b, 0xb5, 0x95, 0x4b, 0x34, 0xea, 0x15, 0xcb, 0xb4, 0x6a, 0x4a, 0x94, 0xeb, 0x35, 0xab, 0x75, 0xa, 0xd4, 0xf4, 0x2a, 0x55, 0x8b},
+ {0x0, 0xdf, 0xa3, 0x7c, 0x5b, 0x84, 0xf8, 0x27, 0xb6, 0x69, 0x15, 0xca, 0xed, 0x32, 0x4e, 0x91, 0x71, 0xae, 0xd2, 0xd, 0x2a, 0xf5, 0x89, 0x56, 0xc7, 0x18, 0x64, 0xbb, 0x9c, 0x43, 0x3f, 0xe0, 0xe2, 0x3d, 0x41, 0x9e, 0xb9, 0x66, 0x1a, 0xc5, 0x54, 0x8b, 0xf7, 0x28, 0xf, 0xd0, 0xac, 0x73, 0x93, 0x4c, 0x30, 0xef, 0xc8, 0x17, 0x6b, 0xb4, 0x25, 0xfa, 0x86, 0x59, 0x7e, 0xa1, 0xdd, 0x2, 0xd9, 0x6, 0x7a, 0xa5, 0x82, 0x5d, 0x21, 0xfe, 0x6f, 0xb0, 0xcc, 0x13, 0x34, 0xeb, 0x97, 0x48, 0xa8, 0x77, 0xb, 0xd4, 0xf3, 0x2c, 0x50, 0x8f, 0x1e, 0xc1, 0xbd, 0x62, 0x45, 0x9a, 0xe6, 0x39, 0x3b, 0xe4, 0x98, 0x47, 0x60, 0xbf, 0xc3, 0x1c, 0x8d, 0x52, 0x2e, 0xf1, 0xd6, 0x9, 0x75, 0xaa, 0x4a, 0x95, 0xe9, 0x36, 0x11, 0xce, 0xb2, 0x6d, 0xfc, 0x23, 0x5f, 0x80, 0xa7, 0x78, 0x4, 0xdb, 0xaf, 0x70, 0xc, 0xd3, 0xf4, 0x2b, 0x57, 0x88, 0x19, 0xc6, 0xba, 0x65, 0x42, 0x9d, 0xe1, 0x3e, 0xde, 0x1, 0x7d, 0xa2, 0x85, 0x5a, 0x26, 0xf9, 0x68, 0xb7, 0xcb, 0x14, 0x33, 0xec, 0x90, 0x4f, 0x4d, 0x92, 0xee, 0x31, 0x16, 0xc9, 0xb5, 0x6a, 0xfb, 0x24, 0x58, 0x87, 0xa0, 0x7f, 0x3, 0xdc, 0x3c, 0xe3, 0x9f, 0x40, 0x67, 0xb8, 0xc4, 0x1b, 0x8a, 0x55, 0x29, 0xf6, 0xd1, 0xe, 0x72, 0xad, 0x76, 0xa9, 0xd5, 0xa, 0x2d, 0xf2, 0x8e, 0x51, 0xc0, 0x1f, 0x63, 0xbc, 0x9b, 0x44, 0x38, 0xe7, 0x7, 0xd8, 0xa4, 0x7b, 0x5c, 0x83, 0xff, 0x20, 0xb1, 0x6e, 0x12, 0xcd, 0xea, 0x35, 0x49, 0x96, 0x94, 0x4b, 0x37, 0xe8, 0xcf, 0x10, 0x6c, 0xb3, 0x22, 0xfd, 0x81, 0x5e, 0x79, 0xa6, 0xda, 0x5, 0xe5, 0x3a, 0x46, 0x99, 0xbe, 0x61, 0x1d, 0xc2, 0x53, 0x8c, 0xf0, 0x2f, 0x8, 0xd7, 0xab, 0x74},
+ {0x0, 0xe0, 0xdd, 0x3d, 0xa7, 0x47, 0x7a, 0x9a, 0x53, 0xb3, 0x8e, 0x6e, 0xf4, 0x14, 0x29, 0xc9, 0xa6, 0x46, 0x7b, 0x9b, 0x1, 0xe1, 0xdc, 0x3c, 0xf5, 0x15, 0x28, 0xc8, 0x52, 0xb2, 0x8f, 0x6f, 0x51, 0xb1, 0x8c, 0x6c, 0xf6, 0x16, 0x2b, 0xcb, 0x2, 0xe2, 0xdf, 0x3f, 0xa5, 0x45, 0x78, 0x98, 0xf7, 0x17, 0x2a, 0xca, 0x50, 0xb0, 0x8d, 0x6d, 0xa4, 0x44, 0x79, 0x99, 0x3, 0xe3, 0xde, 0x3e, 0xa2, 0x42, 0x7f, 0x9f, 0x5, 0xe5, 0xd8, 0x38, 0xf1, 0x11, 0x2c, 0xcc, 0x56, 0xb6, 0x8b, 0x6b, 0x4, 0xe4, 0xd9, 0x39, 0xa3, 0x43, 0x7e, 0x9e, 0x57, 0xb7, 0x8a, 0x6a, 0xf0, 0x10, 0x2d, 0xcd, 0xf3, 0x13, 0x2e, 0xce, 0x54, 0xb4, 0x89, 0x69, 0xa0, 0x40, 0x7d, 0x9d, 0x7, 0xe7, 0xda, 0x3a, 0x55, 0xb5, 0x88, 0x68, 0xf2, 0x12, 0x2f, 0xcf, 0x6, 0xe6, 0xdb, 0x3b, 0xa1, 0x41, 0x7c, 0x9c, 0x59, 0xb9, 0x84, 0x64, 0xfe, 0x1e, 0x23, 0xc3, 0xa, 0xea, 0xd7, 0x37, 0xad, 0x4d, 0x70, 0x90, 0xff, 0x1f, 0x22, 0xc2, 0x58, 0xb8, 0x85, 0x65, 0xac, 0x4c, 0x71, 0x91, 0xb, 0xeb, 0xd6, 0x36, 0x8, 0xe8, 0xd5, 0x35, 0xaf, 0x4f, 0x72, 0x92, 0x5b, 0xbb, 0x86, 0x66, 0xfc, 0x1c, 0x21, 0xc1, 0xae, 0x4e, 0x73, 0x93, 0x9, 0xe9, 0xd4, 0x34, 0xfd, 0x1d, 0x20, 0xc0, 0x5a, 0xba, 0x87, 0x67, 0xfb, 0x1b, 0x26, 0xc6, 0x5c, 0xbc, 0x81, 0x61, 0xa8, 0x48, 0x75, 0x95, 0xf, 0xef, 0xd2, 0x32, 0x5d, 0xbd, 0x80, 0x60, 0xfa, 0x1a, 0x27, 0xc7, 0xe, 0xee, 0xd3, 0x33, 0xa9, 0x49, 0x74, 0x94, 0xaa, 0x4a, 0x77, 0x97, 0xd, 0xed, 0xd0, 0x30, 0xf9, 0x19, 0x24, 0xc4, 0x5e, 0xbe, 0x83, 0x63, 0xc, 0xec, 0xd1, 0x31, 0xab, 0x4b, 0x76, 0x96, 0x5f, 0xbf, 0x82, 0x62, 0xf8, 0x18, 0x25, 0xc5},
+ {0x0, 0xe1, 0xdf, 0x3e, 0xa3, 0x42, 0x7c, 0x9d, 0x5b, 0xba, 0x84, 0x65, 0xf8, 0x19, 0x27, 0xc6, 0xb6, 0x57, 0x69, 0x88, 0x15, 0xf4, 0xca, 0x2b, 0xed, 0xc, 0x32, 0xd3, 0x4e, 0xaf, 0x91, 0x70, 0x71, 0x90, 0xae, 0x4f, 0xd2, 0x33, 0xd, 0xec, 0x2a, 0xcb, 0xf5, 0x14, 0x89, 0x68, 0x56, 0xb7, 0xc7, 0x26, 0x18, 0xf9, 0x64, 0x85, 0xbb, 0x5a, 0x9c, 0x7d, 0x43, 0xa2, 0x3f, 0xde, 0xe0, 0x1, 0xe2, 0x3, 0x3d, 0xdc, 0x41, 0xa0, 0x9e, 0x7f, 0xb9, 0x58, 0x66, 0x87, 0x1a, 0xfb, 0xc5, 0x24, 0x54, 0xb5, 0x8b, 0x6a, 0xf7, 0x16, 0x28, 0xc9, 0xf, 0xee, 0xd0, 0x31, 0xac, 0x4d, 0x73, 0x92, 0x93, 0x72, 0x4c, 0xad, 0x30, 0xd1, 0xef, 0xe, 0xc8, 0x29, 0x17, 0xf6, 0x6b, 0x8a, 0xb4, 0x55, 0x25, 0xc4, 0xfa, 0x1b, 0x86, 0x67, 0x59, 0xb8, 0x7e, 0x9f, 0xa1, 0x40, 0xdd, 0x3c, 0x2, 0xe3, 0xd9, 0x38, 0x6, 0xe7, 0x7a, 0x9b, 0xa5, 0x44, 0x82, 0x63, 0x5d, 0xbc, 0x21, 0xc0, 0xfe, 0x1f, 0x6f, 0x8e, 0xb0, 0x51, 0xcc, 0x2d, 0x13, 0xf2, 0x34, 0xd5, 0xeb, 0xa, 0x97, 0x76, 0x48, 0xa9, 0xa8, 0x49, 0x77, 0x96, 0xb, 0xea, 0xd4, 0x35, 0xf3, 0x12, 0x2c, 0xcd, 0x50, 0xb1, 0x8f, 0x6e, 0x1e, 0xff, 0xc1, 0x20, 0xbd, 0x5c, 0x62, 0x83, 0x45, 0xa4, 0x9a, 0x7b, 0xe6, 0x7, 0x39, 0xd8, 0x3b, 0xda, 0xe4, 0x5, 0x98, 0x79, 0x47, 0xa6, 0x60, 0x81, 0xbf, 0x5e, 0xc3, 0x22, 0x1c, 0xfd, 0x8d, 0x6c, 0x52, 0xb3, 0x2e, 0xcf, 0xf1, 0x10, 0xd6, 0x37, 0x9, 0xe8, 0x75, 0x94, 0xaa, 0x4b, 0x4a, 0xab, 0x95, 0x74, 0xe9, 0x8, 0x36, 0xd7, 0x11, 0xf0, 0xce, 0x2f, 0xb2, 0x53, 0x6d, 0x8c, 0xfc, 0x1d, 0x23, 0xc2, 0x5f, 0xbe, 0x80, 0x61, 0xa7, 0x46, 0x78, 0x99, 0x4, 0xe5, 0xdb, 0x3a},
+ {0x0, 0xe2, 0xd9, 0x3b, 0xaf, 0x4d, 0x76, 0x94, 0x43, 0xa1, 0x9a, 0x78, 0xec, 0xe, 0x35, 0xd7, 0x86, 0x64, 0x5f, 0xbd, 0x29, 0xcb, 0xf0, 0x12, 0xc5, 0x27, 0x1c, 0xfe, 0x6a, 0x88, 0xb3, 0x51, 0x11, 0xf3, 0xc8, 0x2a, 0xbe, 0x5c, 0x67, 0x85, 0x52, 0xb0, 0x8b, 0x69, 0xfd, 0x1f, 0x24, 0xc6, 0x97, 0x75, 0x4e, 0xac, 0x38, 0xda, 0xe1, 0x3, 0xd4, 0x36, 0xd, 0xef, 0x7b, 0x99, 0xa2, 0x40, 0x22, 0xc0, 0xfb, 0x19, 0x8d, 0x6f, 0x54, 0xb6, 0x61, 0x83, 0xb8, 0x5a, 0xce, 0x2c, 0x17, 0xf5, 0xa4, 0x46, 0x7d, 0x9f, 0xb, 0xe9, 0xd2, 0x30, 0xe7, 0x5, 0x3e, 0xdc, 0x48, 0xaa, 0x91, 0x73, 0x33, 0xd1, 0xea, 0x8, 0x9c, 0x7e, 0x45, 0xa7, 0x70, 0x92, 0xa9, 0x4b, 0xdf, 0x3d, 0x6, 0xe4, 0xb5, 0x57, 0x6c, 0x8e, 0x1a, 0xf8, 0xc3, 0x21, 0xf6, 0x14, 0x2f, 0xcd, 0x59, 0xbb, 0x80, 0x62, 0x44, 0xa6, 0x9d, 0x7f, 0xeb, 0x9, 0x32, 0xd0, 0x7, 0xe5, 0xde, 0x3c, 0xa8, 0x4a, 0x71, 0x93, 0xc2, 0x20, 0x1b, 0xf9, 0x6d, 0x8f, 0xb4, 0x56, 0x81, 0x63, 0x58, 0xba, 0x2e, 0xcc, 0xf7, 0x15, 0x55, 0xb7, 0x8c, 0x6e, 0xfa, 0x18, 0x23, 0xc1, 0x16, 0xf4, 0xcf, 0x2d, 0xb9, 0x5b, 0x60, 0x82, 0xd3, 0x31, 0xa, 0xe8, 0x7c, 0x9e, 0xa5, 0x47, 0x90, 0x72, 0x49, 0xab, 0x3f, 0xdd, 0xe6, 0x4, 0x66, 0x84, 0xbf, 0x5d, 0xc9, 0x2b, 0x10, 0xf2, 0x25, 0xc7, 0xfc, 0x1e, 0x8a, 0x68, 0x53, 0xb1, 0xe0, 0x2, 0x39, 0xdb, 0x4f, 0xad, 0x96, 0x74, 0xa3, 0x41, 0x7a, 0x98, 0xc, 0xee, 0xd5, 0x37, 0x77, 0x95, 0xae, 0x4c, 0xd8, 0x3a, 0x1, 0xe3, 0x34, 0xd6, 0xed, 0xf, 0x9b, 0x79, 0x42, 0xa0, 0xf1, 0x13, 0x28, 0xca, 0x5e, 0xbc, 0x87, 0x65, 0xb2, 0x50, 0x6b, 0x89, 0x1d, 0xff, 0xc4, 0x26},
+ {0x0, 0xe3, 0xdb, 0x38, 0xab, 0x48, 0x70, 0x93, 0x4b, 0xa8, 0x90, 0x73, 0xe0, 0x3, 0x3b, 0xd8, 0x96, 0x75, 0x4d, 0xae, 0x3d, 0xde, 0xe6, 0x5, 0xdd, 0x3e, 0x6, 0xe5, 0x76, 0x95, 0xad, 0x4e, 0x31, 0xd2, 0xea, 0x9, 0x9a, 0x79, 0x41, 0xa2, 0x7a, 0x99, 0xa1, 0x42, 0xd1, 0x32, 0xa, 0xe9, 0xa7, 0x44, 0x7c, 0x9f, 0xc, 0xef, 0xd7, 0x34, 0xec, 0xf, 0x37, 0xd4, 0x47, 0xa4, 0x9c, 0x7f, 0x62, 0x81, 0xb9, 0x5a, 0xc9, 0x2a, 0x12, 0xf1, 0x29, 0xca, 0xf2, 0x11, 0x82, 0x61, 0x59, 0xba, 0xf4, 0x17, 0x2f, 0xcc, 0x5f, 0xbc, 0x84, 0x67, 0xbf, 0x5c, 0x64, 0x87, 0x14, 0xf7, 0xcf, 0x2c, 0x53, 0xb0, 0x88, 0x6b, 0xf8, 0x1b, 0x23, 0xc0, 0x18, 0xfb, 0xc3, 0x20, 0xb3, 0x50, 0x68, 0x8b, 0xc5, 0x26, 0x1e, 0xfd, 0x6e, 0x8d, 0xb5, 0x56, 0x8e, 0x6d, 0x55, 0xb6, 0x25, 0xc6, 0xfe, 0x1d, 0xc4, 0x27, 0x1f, 0xfc, 0x6f, 0x8c, 0xb4, 0x57, 0x8f, 0x6c, 0x54, 0xb7, 0x24, 0xc7, 0xff, 0x1c, 0x52, 0xb1, 0x89, 0x6a, 0xf9, 0x1a, 0x22, 0xc1, 0x19, 0xfa, 0xc2, 0x21, 0xb2, 0x51, 0x69, 0x8a, 0xf5, 0x16, 0x2e, 0xcd, 0x5e, 0xbd, 0x85, 0x66, 0xbe, 0x5d, 0x65, 0x86, 0x15, 0xf6, 0xce, 0x2d, 0x63, 0x80, 0xb8, 0x5b, 0xc8, 0x2b, 0x13, 0xf0, 0x28, 0xcb, 0xf3, 0x10, 0x83, 0x60, 0x58, 0xbb, 0xa6, 0x45, 0x7d, 0x9e, 0xd, 0xee, 0xd6, 0x35, 0xed, 0xe, 0x36, 0xd5, 0x46, 0xa5, 0x9d, 0x7e, 0x30, 0xd3, 0xeb, 0x8, 0x9b, 0x78, 0x40, 0xa3, 0x7b, 0x98, 0xa0, 0x43, 0xd0, 0x33, 0xb, 0xe8, 0x97, 0x74, 0x4c, 0xaf, 0x3c, 0xdf, 0xe7, 0x4, 0xdc, 0x3f, 0x7, 0xe4, 0x77, 0x94, 0xac, 0x4f, 0x1, 0xe2, 0xda, 0x39, 0xaa, 0x49, 0x71, 0x92, 0x4a, 0xa9, 0x91, 0x72, 0xe1, 0x2, 0x3a, 0xd9},
+ {0x0, 0xe4, 0xd5, 0x31, 0xb7, 0x53, 0x62, 0x86, 0x73, 0x97, 0xa6, 0x42, 0xc4, 0x20, 0x11, 0xf5, 0xe6, 0x2, 0x33, 0xd7, 0x51, 0xb5, 0x84, 0x60, 0x95, 0x71, 0x40, 0xa4, 0x22, 0xc6, 0xf7, 0x13, 0xd1, 0x35, 0x4, 0xe0, 0x66, 0x82, 0xb3, 0x57, 0xa2, 0x46, 0x77, 0x93, 0x15, 0xf1, 0xc0, 0x24, 0x37, 0xd3, 0xe2, 0x6, 0x80, 0x64, 0x55, 0xb1, 0x44, 0xa0, 0x91, 0x75, 0xf3, 0x17, 0x26, 0xc2, 0xbf, 0x5b, 0x6a, 0x8e, 0x8, 0xec, 0xdd, 0x39, 0xcc, 0x28, 0x19, 0xfd, 0x7b, 0x9f, 0xae, 0x4a, 0x59, 0xbd, 0x8c, 0x68, 0xee, 0xa, 0x3b, 0xdf, 0x2a, 0xce, 0xff, 0x1b, 0x9d, 0x79, 0x48, 0xac, 0x6e, 0x8a, 0xbb, 0x5f, 0xd9, 0x3d, 0xc, 0xe8, 0x1d, 0xf9, 0xc8, 0x2c, 0xaa, 0x4e, 0x7f, 0x9b, 0x88, 0x6c, 0x5d, 0xb9, 0x3f, 0xdb, 0xea, 0xe, 0xfb, 0x1f, 0x2e, 0xca, 0x4c, 0xa8, 0x99, 0x7d, 0x63, 0x87, 0xb6, 0x52, 0xd4, 0x30, 0x1, 0xe5, 0x10, 0xf4, 0xc5, 0x21, 0xa7, 0x43, 0x72, 0x96, 0x85, 0x61, 0x50, 0xb4, 0x32, 0xd6, 0xe7, 0x3, 0xf6, 0x12, 0x23, 0xc7, 0x41, 0xa5, 0x94, 0x70, 0xb2, 0x56, 0x67, 0x83, 0x5, 0xe1, 0xd0, 0x34, 0xc1, 0x25, 0x14, 0xf0, 0x76, 0x92, 0xa3, 0x47, 0x54, 0xb0, 0x81, 0x65, 0xe3, 0x7, 0x36, 0xd2, 0x27, 0xc3, 0xf2, 0x16, 0x90, 0x74, 0x45, 0xa1, 0xdc, 0x38, 0x9, 0xed, 0x6b, 0x8f, 0xbe, 0x5a, 0xaf, 0x4b, 0x7a, 0x9e, 0x18, 0xfc, 0xcd, 0x29, 0x3a, 0xde, 0xef, 0xb, 0x8d, 0x69, 0x58, 0xbc, 0x49, 0xad, 0x9c, 0x78, 0xfe, 0x1a, 0x2b, 0xcf, 0xd, 0xe9, 0xd8, 0x3c, 0xba, 0x5e, 0x6f, 0x8b, 0x7e, 0x9a, 0xab, 0x4f, 0xc9, 0x2d, 0x1c, 0xf8, 0xeb, 0xf, 0x3e, 0xda, 0x5c, 0xb8, 0x89, 0x6d, 0x98, 0x7c, 0x4d, 0xa9, 0x2f, 0xcb, 0xfa, 0x1e},
+ {0x0, 0xe5, 0xd7, 0x32, 0xb3, 0x56, 0x64, 0x81, 0x7b, 0x9e, 0xac, 0x49, 0xc8, 0x2d, 0x1f, 0xfa, 0xf6, 0x13, 0x21, 0xc4, 0x45, 0xa0, 0x92, 0x77, 0x8d, 0x68, 0x5a, 0xbf, 0x3e, 0xdb, 0xe9, 0xc, 0xf1, 0x14, 0x26, 0xc3, 0x42, 0xa7, 0x95, 0x70, 0x8a, 0x6f, 0x5d, 0xb8, 0x39, 0xdc, 0xee, 0xb, 0x7, 0xe2, 0xd0, 0x35, 0xb4, 0x51, 0x63, 0x86, 0x7c, 0x99, 0xab, 0x4e, 0xcf, 0x2a, 0x18, 0xfd, 0xff, 0x1a, 0x28, 0xcd, 0x4c, 0xa9, 0x9b, 0x7e, 0x84, 0x61, 0x53, 0xb6, 0x37, 0xd2, 0xe0, 0x5, 0x9, 0xec, 0xde, 0x3b, 0xba, 0x5f, 0x6d, 0x88, 0x72, 0x97, 0xa5, 0x40, 0xc1, 0x24, 0x16, 0xf3, 0xe, 0xeb, 0xd9, 0x3c, 0xbd, 0x58, 0x6a, 0x8f, 0x75, 0x90, 0xa2, 0x47, 0xc6, 0x23, 0x11, 0xf4, 0xf8, 0x1d, 0x2f, 0xca, 0x4b, 0xae, 0x9c, 0x79, 0x83, 0x66, 0x54, 0xb1, 0x30, 0xd5, 0xe7, 0x2, 0xe3, 0x6, 0x34, 0xd1, 0x50, 0xb5, 0x87, 0x62, 0x98, 0x7d, 0x4f, 0xaa, 0x2b, 0xce, 0xfc, 0x19, 0x15, 0xf0, 0xc2, 0x27, 0xa6, 0x43, 0x71, 0x94, 0x6e, 0x8b, 0xb9, 0x5c, 0xdd, 0x38, 0xa, 0xef, 0x12, 0xf7, 0xc5, 0x20, 0xa1, 0x44, 0x76, 0x93, 0x69, 0x8c, 0xbe, 0x5b, 0xda, 0x3f, 0xd, 0xe8, 0xe4, 0x1, 0x33, 0xd6, 0x57, 0xb2, 0x80, 0x65, 0x9f, 0x7a, 0x48, 0xad, 0x2c, 0xc9, 0xfb, 0x1e, 0x1c, 0xf9, 0xcb, 0x2e, 0xaf, 0x4a, 0x78, 0x9d, 0x67, 0x82, 0xb0, 0x55, 0xd4, 0x31, 0x3, 0xe6, 0xea, 0xf, 0x3d, 0xd8, 0x59, 0xbc, 0x8e, 0x6b, 0x91, 0x74, 0x46, 0xa3, 0x22, 0xc7, 0xf5, 0x10, 0xed, 0x8, 0x3a, 0xdf, 0x5e, 0xbb, 0x89, 0x6c, 0x96, 0x73, 0x41, 0xa4, 0x25, 0xc0, 0xf2, 0x17, 0x1b, 0xfe, 0xcc, 0x29, 0xa8, 0x4d, 0x7f, 0x9a, 0x60, 0x85, 0xb7, 0x52, 0xd3, 0x36, 0x4, 0xe1},
+ {0x0, 0xe6, 0xd1, 0x37, 0xbf, 0x59, 0x6e, 0x88, 0x63, 0x85, 0xb2, 0x54, 0xdc, 0x3a, 0xd, 0xeb, 0xc6, 0x20, 0x17, 0xf1, 0x79, 0x9f, 0xa8, 0x4e, 0xa5, 0x43, 0x74, 0x92, 0x1a, 0xfc, 0xcb, 0x2d, 0x91, 0x77, 0x40, 0xa6, 0x2e, 0xc8, 0xff, 0x19, 0xf2, 0x14, 0x23, 0xc5, 0x4d, 0xab, 0x9c, 0x7a, 0x57, 0xb1, 0x86, 0x60, 0xe8, 0xe, 0x39, 0xdf, 0x34, 0xd2, 0xe5, 0x3, 0x8b, 0x6d, 0x5a, 0xbc, 0x3f, 0xd9, 0xee, 0x8, 0x80, 0x66, 0x51, 0xb7, 0x5c, 0xba, 0x8d, 0x6b, 0xe3, 0x5, 0x32, 0xd4, 0xf9, 0x1f, 0x28, 0xce, 0x46, 0xa0, 0x97, 0x71, 0x9a, 0x7c, 0x4b, 0xad, 0x25, 0xc3, 0xf4, 0x12, 0xae, 0x48, 0x7f, 0x99, 0x11, 0xf7, 0xc0, 0x26, 0xcd, 0x2b, 0x1c, 0xfa, 0x72, 0x94, 0xa3, 0x45, 0x68, 0x8e, 0xb9, 0x5f, 0xd7, 0x31, 0x6, 0xe0, 0xb, 0xed, 0xda, 0x3c, 0xb4, 0x52, 0x65, 0x83, 0x7e, 0x98, 0xaf, 0x49, 0xc1, 0x27, 0x10, 0xf6, 0x1d, 0xfb, 0xcc, 0x2a, 0xa2, 0x44, 0x73, 0x95, 0xb8, 0x5e, 0x69, 0x8f, 0x7, 0xe1, 0xd6, 0x30, 0xdb, 0x3d, 0xa, 0xec, 0x64, 0x82, 0xb5, 0x53, 0xef, 0x9, 0x3e, 0xd8, 0x50, 0xb6, 0x81, 0x67, 0x8c, 0x6a, 0x5d, 0xbb, 0x33, 0xd5, 0xe2, 0x4, 0x29, 0xcf, 0xf8, 0x1e, 0x96, 0x70, 0x47, 0xa1, 0x4a, 0xac, 0x9b, 0x7d, 0xf5, 0x13, 0x24, 0xc2, 0x41, 0xa7, 0x90, 0x76, 0xfe, 0x18, 0x2f, 0xc9, 0x22, 0xc4, 0xf3, 0x15, 0x9d, 0x7b, 0x4c, 0xaa, 0x87, 0x61, 0x56, 0xb0, 0x38, 0xde, 0xe9, 0xf, 0xe4, 0x2, 0x35, 0xd3, 0x5b, 0xbd, 0x8a, 0x6c, 0xd0, 0x36, 0x1, 0xe7, 0x6f, 0x89, 0xbe, 0x58, 0xb3, 0x55, 0x62, 0x84, 0xc, 0xea, 0xdd, 0x3b, 0x16, 0xf0, 0xc7, 0x21, 0xa9, 0x4f, 0x78, 0x9e, 0x75, 0x93, 0xa4, 0x42, 0xca, 0x2c, 0x1b, 0xfd},
+ {0x0, 0xe7, 0xd3, 0x34, 0xbb, 0x5c, 0x68, 0x8f, 0x6b, 0x8c, 0xb8, 0x5f, 0xd0, 0x37, 0x3, 0xe4, 0xd6, 0x31, 0x5, 0xe2, 0x6d, 0x8a, 0xbe, 0x59, 0xbd, 0x5a, 0x6e, 0x89, 0x6, 0xe1, 0xd5, 0x32, 0xb1, 0x56, 0x62, 0x85, 0xa, 0xed, 0xd9, 0x3e, 0xda, 0x3d, 0x9, 0xee, 0x61, 0x86, 0xb2, 0x55, 0x67, 0x80, 0xb4, 0x53, 0xdc, 0x3b, 0xf, 0xe8, 0xc, 0xeb, 0xdf, 0x38, 0xb7, 0x50, 0x64, 0x83, 0x7f, 0x98, 0xac, 0x4b, 0xc4, 0x23, 0x17, 0xf0, 0x14, 0xf3, 0xc7, 0x20, 0xaf, 0x48, 0x7c, 0x9b, 0xa9, 0x4e, 0x7a, 0x9d, 0x12, 0xf5, 0xc1, 0x26, 0xc2, 0x25, 0x11, 0xf6, 0x79, 0x9e, 0xaa, 0x4d, 0xce, 0x29, 0x1d, 0xfa, 0x75, 0x92, 0xa6, 0x41, 0xa5, 0x42, 0x76, 0x91, 0x1e, 0xf9, 0xcd, 0x2a, 0x18, 0xff, 0xcb, 0x2c, 0xa3, 0x44, 0x70, 0x97, 0x73, 0x94, 0xa0, 0x47, 0xc8, 0x2f, 0x1b, 0xfc, 0xfe, 0x19, 0x2d, 0xca, 0x45, 0xa2, 0x96, 0x71, 0x95, 0x72, 0x46, 0xa1, 0x2e, 0xc9, 0xfd, 0x1a, 0x28, 0xcf, 0xfb, 0x1c, 0x93, 0x74, 0x40, 0xa7, 0x43, 0xa4, 0x90, 0x77, 0xf8, 0x1f, 0x2b, 0xcc, 0x4f, 0xa8, 0x9c, 0x7b, 0xf4, 0x13, 0x27, 0xc0, 0x24, 0xc3, 0xf7, 0x10, 0x9f, 0x78, 0x4c, 0xab, 0x99, 0x7e, 0x4a, 0xad, 0x22, 0xc5, 0xf1, 0x16, 0xf2, 0x15, 0x21, 0xc6, 0x49, 0xae, 0x9a, 0x7d, 0x81, 0x66, 0x52, 0xb5, 0x3a, 0xdd, 0xe9, 0xe, 0xea, 0xd, 0x39, 0xde, 0x51, 0xb6, 0x82, 0x65, 0x57, 0xb0, 0x84, 0x63, 0xec, 0xb, 0x3f, 0xd8, 0x3c, 0xdb, 0xef, 0x8, 0x87, 0x60, 0x54, 0xb3, 0x30, 0xd7, 0xe3, 0x4, 0x8b, 0x6c, 0x58, 0xbf, 0x5b, 0xbc, 0x88, 0x6f, 0xe0, 0x7, 0x33, 0xd4, 0xe6, 0x1, 0x35, 0xd2, 0x5d, 0xba, 0x8e, 0x69, 0x8d, 0x6a, 0x5e, 0xb9, 0x36, 0xd1, 0xe5, 0x2},
+ {0x0, 0xe8, 0xcd, 0x25, 0x87, 0x6f, 0x4a, 0xa2, 0x13, 0xfb, 0xde, 0x36, 0x94, 0x7c, 0x59, 0xb1, 0x26, 0xce, 0xeb, 0x3, 0xa1, 0x49, 0x6c, 0x84, 0x35, 0xdd, 0xf8, 0x10, 0xb2, 0x5a, 0x7f, 0x97, 0x4c, 0xa4, 0x81, 0x69, 0xcb, 0x23, 0x6, 0xee, 0x5f, 0xb7, 0x92, 0x7a, 0xd8, 0x30, 0x15, 0xfd, 0x6a, 0x82, 0xa7, 0x4f, 0xed, 0x5, 0x20, 0xc8, 0x79, 0x91, 0xb4, 0x5c, 0xfe, 0x16, 0x33, 0xdb, 0x98, 0x70, 0x55, 0xbd, 0x1f, 0xf7, 0xd2, 0x3a, 0x8b, 0x63, 0x46, 0xae, 0xc, 0xe4, 0xc1, 0x29, 0xbe, 0x56, 0x73, 0x9b, 0x39, 0xd1, 0xf4, 0x1c, 0xad, 0x45, 0x60, 0x88, 0x2a, 0xc2, 0xe7, 0xf, 0xd4, 0x3c, 0x19, 0xf1, 0x53, 0xbb, 0x9e, 0x76, 0xc7, 0x2f, 0xa, 0xe2, 0x40, 0xa8, 0x8d, 0x65, 0xf2, 0x1a, 0x3f, 0xd7, 0x75, 0x9d, 0xb8, 0x50, 0xe1, 0x9, 0x2c, 0xc4, 0x66, 0x8e, 0xab, 0x43, 0x2d, 0xc5, 0xe0, 0x8, 0xaa, 0x42, 0x67, 0x8f, 0x3e, 0xd6, 0xf3, 0x1b, 0xb9, 0x51, 0x74, 0x9c, 0xb, 0xe3, 0xc6, 0x2e, 0x8c, 0x64, 0x41, 0xa9, 0x18, 0xf0, 0xd5, 0x3d, 0x9f, 0x77, 0x52, 0xba, 0x61, 0x89, 0xac, 0x44, 0xe6, 0xe, 0x2b, 0xc3, 0x72, 0x9a, 0xbf, 0x57, 0xf5, 0x1d, 0x38, 0xd0, 0x47, 0xaf, 0x8a, 0x62, 0xc0, 0x28, 0xd, 0xe5, 0x54, 0xbc, 0x99, 0x71, 0xd3, 0x3b, 0x1e, 0xf6, 0xb5, 0x5d, 0x78, 0x90, 0x32, 0xda, 0xff, 0x17, 0xa6, 0x4e, 0x6b, 0x83, 0x21, 0xc9, 0xec, 0x4, 0x93, 0x7b, 0x5e, 0xb6, 0x14, 0xfc, 0xd9, 0x31, 0x80, 0x68, 0x4d, 0xa5, 0x7, 0xef, 0xca, 0x22, 0xf9, 0x11, 0x34, 0xdc, 0x7e, 0x96, 0xb3, 0x5b, 0xea, 0x2, 0x27, 0xcf, 0x6d, 0x85, 0xa0, 0x48, 0xdf, 0x37, 0x12, 0xfa, 0x58, 0xb0, 0x95, 0x7d, 0xcc, 0x24, 0x1, 0xe9, 0x4b, 0xa3, 0x86, 0x6e},
+ {0x0, 0xe9, 0xcf, 0x26, 0x83, 0x6a, 0x4c, 0xa5, 0x1b, 0xf2, 0xd4, 0x3d, 0x98, 0x71, 0x57, 0xbe, 0x36, 0xdf, 0xf9, 0x10, 0xb5, 0x5c, 0x7a, 0x93, 0x2d, 0xc4, 0xe2, 0xb, 0xae, 0x47, 0x61, 0x88, 0x6c, 0x85, 0xa3, 0x4a, 0xef, 0x6, 0x20, 0xc9, 0x77, 0x9e, 0xb8, 0x51, 0xf4, 0x1d, 0x3b, 0xd2, 0x5a, 0xb3, 0x95, 0x7c, 0xd9, 0x30, 0x16, 0xff, 0x41, 0xa8, 0x8e, 0x67, 0xc2, 0x2b, 0xd, 0xe4, 0xd8, 0x31, 0x17, 0xfe, 0x5b, 0xb2, 0x94, 0x7d, 0xc3, 0x2a, 0xc, 0xe5, 0x40, 0xa9, 0x8f, 0x66, 0xee, 0x7, 0x21, 0xc8, 0x6d, 0x84, 0xa2, 0x4b, 0xf5, 0x1c, 0x3a, 0xd3, 0x76, 0x9f, 0xb9, 0x50, 0xb4, 0x5d, 0x7b, 0x92, 0x37, 0xde, 0xf8, 0x11, 0xaf, 0x46, 0x60, 0x89, 0x2c, 0xc5, 0xe3, 0xa, 0x82, 0x6b, 0x4d, 0xa4, 0x1, 0xe8, 0xce, 0x27, 0x99, 0x70, 0x56, 0xbf, 0x1a, 0xf3, 0xd5, 0x3c, 0xad, 0x44, 0x62, 0x8b, 0x2e, 0xc7, 0xe1, 0x8, 0xb6, 0x5f, 0x79, 0x90, 0x35, 0xdc, 0xfa, 0x13, 0x9b, 0x72, 0x54, 0xbd, 0x18, 0xf1, 0xd7, 0x3e, 0x80, 0x69, 0x4f, 0xa6, 0x3, 0xea, 0xcc, 0x25, 0xc1, 0x28, 0xe, 0xe7, 0x42, 0xab, 0x8d, 0x64, 0xda, 0x33, 0x15, 0xfc, 0x59, 0xb0, 0x96, 0x7f, 0xf7, 0x1e, 0x38, 0xd1, 0x74, 0x9d, 0xbb, 0x52, 0xec, 0x5, 0x23, 0xca, 0x6f, 0x86, 0xa0, 0x49, 0x75, 0x9c, 0xba, 0x53, 0xf6, 0x1f, 0x39, 0xd0, 0x6e, 0x87, 0xa1, 0x48, 0xed, 0x4, 0x22, 0xcb, 0x43, 0xaa, 0x8c, 0x65, 0xc0, 0x29, 0xf, 0xe6, 0x58, 0xb1, 0x97, 0x7e, 0xdb, 0x32, 0x14, 0xfd, 0x19, 0xf0, 0xd6, 0x3f, 0x9a, 0x73, 0x55, 0xbc, 0x2, 0xeb, 0xcd, 0x24, 0x81, 0x68, 0x4e, 0xa7, 0x2f, 0xc6, 0xe0, 0x9, 0xac, 0x45, 0x63, 0x8a, 0x34, 0xdd, 0xfb, 0x12, 0xb7, 0x5e, 0x78, 0x91},
+ {0x0, 0xea, 0xc9, 0x23, 0x8f, 0x65, 0x46, 0xac, 0x3, 0xe9, 0xca, 0x20, 0x8c, 0x66, 0x45, 0xaf, 0x6, 0xec, 0xcf, 0x25, 0x89, 0x63, 0x40, 0xaa, 0x5, 0xef, 0xcc, 0x26, 0x8a, 0x60, 0x43, 0xa9, 0xc, 0xe6, 0xc5, 0x2f, 0x83, 0x69, 0x4a, 0xa0, 0xf, 0xe5, 0xc6, 0x2c, 0x80, 0x6a, 0x49, 0xa3, 0xa, 0xe0, 0xc3, 0x29, 0x85, 0x6f, 0x4c, 0xa6, 0x9, 0xe3, 0xc0, 0x2a, 0x86, 0x6c, 0x4f, 0xa5, 0x18, 0xf2, 0xd1, 0x3b, 0x97, 0x7d, 0x5e, 0xb4, 0x1b, 0xf1, 0xd2, 0x38, 0x94, 0x7e, 0x5d, 0xb7, 0x1e, 0xf4, 0xd7, 0x3d, 0x91, 0x7b, 0x58, 0xb2, 0x1d, 0xf7, 0xd4, 0x3e, 0x92, 0x78, 0x5b, 0xb1, 0x14, 0xfe, 0xdd, 0x37, 0x9b, 0x71, 0x52, 0xb8, 0x17, 0xfd, 0xde, 0x34, 0x98, 0x72, 0x51, 0xbb, 0x12, 0xf8, 0xdb, 0x31, 0x9d, 0x77, 0x54, 0xbe, 0x11, 0xfb, 0xd8, 0x32, 0x9e, 0x74, 0x57, 0xbd, 0x30, 0xda, 0xf9, 0x13, 0xbf, 0x55, 0x76, 0x9c, 0x33, 0xd9, 0xfa, 0x10, 0xbc, 0x56, 0x75, 0x9f, 0x36, 0xdc, 0xff, 0x15, 0xb9, 0x53, 0x70, 0x9a, 0x35, 0xdf, 0xfc, 0x16, 0xba, 0x50, 0x73, 0x99, 0x3c, 0xd6, 0xf5, 0x1f, 0xb3, 0x59, 0x7a, 0x90, 0x3f, 0xd5, 0xf6, 0x1c, 0xb0, 0x5a, 0x79, 0x93, 0x3a, 0xd0, 0xf3, 0x19, 0xb5, 0x5f, 0x7c, 0x96, 0x39, 0xd3, 0xf0, 0x1a, 0xb6, 0x5c, 0x7f, 0x95, 0x28, 0xc2, 0xe1, 0xb, 0xa7, 0x4d, 0x6e, 0x84, 0x2b, 0xc1, 0xe2, 0x8, 0xa4, 0x4e, 0x6d, 0x87, 0x2e, 0xc4, 0xe7, 0xd, 0xa1, 0x4b, 0x68, 0x82, 0x2d, 0xc7, 0xe4, 0xe, 0xa2, 0x48, 0x6b, 0x81, 0x24, 0xce, 0xed, 0x7, 0xab, 0x41, 0x62, 0x88, 0x27, 0xcd, 0xee, 0x4, 0xa8, 0x42, 0x61, 0x8b, 0x22, 0xc8, 0xeb, 0x1, 0xad, 0x47, 0x64, 0x8e, 0x21, 0xcb, 0xe8, 0x2, 0xae, 0x44, 0x67, 0x8d},
+ {0x0, 0xeb, 0xcb, 0x20, 0x8b, 0x60, 0x40, 0xab, 0xb, 0xe0, 0xc0, 0x2b, 0x80, 0x6b, 0x4b, 0xa0, 0x16, 0xfd, 0xdd, 0x36, 0x9d, 0x76, 0x56, 0xbd, 0x1d, 0xf6, 0xd6, 0x3d, 0x96, 0x7d, 0x5d, 0xb6, 0x2c, 0xc7, 0xe7, 0xc, 0xa7, 0x4c, 0x6c, 0x87, 0x27, 0xcc, 0xec, 0x7, 0xac, 0x47, 0x67, 0x8c, 0x3a, 0xd1, 0xf1, 0x1a, 0xb1, 0x5a, 0x7a, 0x91, 0x31, 0xda, 0xfa, 0x11, 0xba, 0x51, 0x71, 0x9a, 0x58, 0xb3, 0x93, 0x78, 0xd3, 0x38, 0x18, 0xf3, 0x53, 0xb8, 0x98, 0x73, 0xd8, 0x33, 0x13, 0xf8, 0x4e, 0xa5, 0x85, 0x6e, 0xc5, 0x2e, 0xe, 0xe5, 0x45, 0xae, 0x8e, 0x65, 0xce, 0x25, 0x5, 0xee, 0x74, 0x9f, 0xbf, 0x54, 0xff, 0x14, 0x34, 0xdf, 0x7f, 0x94, 0xb4, 0x5f, 0xf4, 0x1f, 0x3f, 0xd4, 0x62, 0x89, 0xa9, 0x42, 0xe9, 0x2, 0x22, 0xc9, 0x69, 0x82, 0xa2, 0x49, 0xe2, 0x9, 0x29, 0xc2, 0xb0, 0x5b, 0x7b, 0x90, 0x3b, 0xd0, 0xf0, 0x1b, 0xbb, 0x50, 0x70, 0x9b, 0x30, 0xdb, 0xfb, 0x10, 0xa6, 0x4d, 0x6d, 0x86, 0x2d, 0xc6, 0xe6, 0xd, 0xad, 0x46, 0x66, 0x8d, 0x26, 0xcd, 0xed, 0x6, 0x9c, 0x77, 0x57, 0xbc, 0x17, 0xfc, 0xdc, 0x37, 0x97, 0x7c, 0x5c, 0xb7, 0x1c, 0xf7, 0xd7, 0x3c, 0x8a, 0x61, 0x41, 0xaa, 0x1, 0xea, 0xca, 0x21, 0x81, 0x6a, 0x4a, 0xa1, 0xa, 0xe1, 0xc1, 0x2a, 0xe8, 0x3, 0x23, 0xc8, 0x63, 0x88, 0xa8, 0x43, 0xe3, 0x8, 0x28, 0xc3, 0x68, 0x83, 0xa3, 0x48, 0xfe, 0x15, 0x35, 0xde, 0x75, 0x9e, 0xbe, 0x55, 0xf5, 0x1e, 0x3e, 0xd5, 0x7e, 0x95, 0xb5, 0x5e, 0xc4, 0x2f, 0xf, 0xe4, 0x4f, 0xa4, 0x84, 0x6f, 0xcf, 0x24, 0x4, 0xef, 0x44, 0xaf, 0x8f, 0x64, 0xd2, 0x39, 0x19, 0xf2, 0x59, 0xb2, 0x92, 0x79, 0xd9, 0x32, 0x12, 0xf9, 0x52, 0xb9, 0x99, 0x72},
+ {0x0, 0xec, 0xc5, 0x29, 0x97, 0x7b, 0x52, 0xbe, 0x33, 0xdf, 0xf6, 0x1a, 0xa4, 0x48, 0x61, 0x8d, 0x66, 0x8a, 0xa3, 0x4f, 0xf1, 0x1d, 0x34, 0xd8, 0x55, 0xb9, 0x90, 0x7c, 0xc2, 0x2e, 0x7, 0xeb, 0xcc, 0x20, 0x9, 0xe5, 0x5b, 0xb7, 0x9e, 0x72, 0xff, 0x13, 0x3a, 0xd6, 0x68, 0x84, 0xad, 0x41, 0xaa, 0x46, 0x6f, 0x83, 0x3d, 0xd1, 0xf8, 0x14, 0x99, 0x75, 0x5c, 0xb0, 0xe, 0xe2, 0xcb, 0x27, 0x85, 0x69, 0x40, 0xac, 0x12, 0xfe, 0xd7, 0x3b, 0xb6, 0x5a, 0x73, 0x9f, 0x21, 0xcd, 0xe4, 0x8, 0xe3, 0xf, 0x26, 0xca, 0x74, 0x98, 0xb1, 0x5d, 0xd0, 0x3c, 0x15, 0xf9, 0x47, 0xab, 0x82, 0x6e, 0x49, 0xa5, 0x8c, 0x60, 0xde, 0x32, 0x1b, 0xf7, 0x7a, 0x96, 0xbf, 0x53, 0xed, 0x1, 0x28, 0xc4, 0x2f, 0xc3, 0xea, 0x6, 0xb8, 0x54, 0x7d, 0x91, 0x1c, 0xf0, 0xd9, 0x35, 0x8b, 0x67, 0x4e, 0xa2, 0x17, 0xfb, 0xd2, 0x3e, 0x80, 0x6c, 0x45, 0xa9, 0x24, 0xc8, 0xe1, 0xd, 0xb3, 0x5f, 0x76, 0x9a, 0x71, 0x9d, 0xb4, 0x58, 0xe6, 0xa, 0x23, 0xcf, 0x42, 0xae, 0x87, 0x6b, 0xd5, 0x39, 0x10, 0xfc, 0xdb, 0x37, 0x1e, 0xf2, 0x4c, 0xa0, 0x89, 0x65, 0xe8, 0x4, 0x2d, 0xc1, 0x7f, 0x93, 0xba, 0x56, 0xbd, 0x51, 0x78, 0x94, 0x2a, 0xc6, 0xef, 0x3, 0x8e, 0x62, 0x4b, 0xa7, 0x19, 0xf5, 0xdc, 0x30, 0x92, 0x7e, 0x57, 0xbb, 0x5, 0xe9, 0xc0, 0x2c, 0xa1, 0x4d, 0x64, 0x88, 0x36, 0xda, 0xf3, 0x1f, 0xf4, 0x18, 0x31, 0xdd, 0x63, 0x8f, 0xa6, 0x4a, 0xc7, 0x2b, 0x2, 0xee, 0x50, 0xbc, 0x95, 0x79, 0x5e, 0xb2, 0x9b, 0x77, 0xc9, 0x25, 0xc, 0xe0, 0x6d, 0x81, 0xa8, 0x44, 0xfa, 0x16, 0x3f, 0xd3, 0x38, 0xd4, 0xfd, 0x11, 0xaf, 0x43, 0x6a, 0x86, 0xb, 0xe7, 0xce, 0x22, 0x9c, 0x70, 0x59, 0xb5},
+ {0x0, 0xed, 0xc7, 0x2a, 0x93, 0x7e, 0x54, 0xb9, 0x3b, 0xd6, 0xfc, 0x11, 0xa8, 0x45, 0x6f, 0x82, 0x76, 0x9b, 0xb1, 0x5c, 0xe5, 0x8, 0x22, 0xcf, 0x4d, 0xa0, 0x8a, 0x67, 0xde, 0x33, 0x19, 0xf4, 0xec, 0x1, 0x2b, 0xc6, 0x7f, 0x92, 0xb8, 0x55, 0xd7, 0x3a, 0x10, 0xfd, 0x44, 0xa9, 0x83, 0x6e, 0x9a, 0x77, 0x5d, 0xb0, 0x9, 0xe4, 0xce, 0x23, 0xa1, 0x4c, 0x66, 0x8b, 0x32, 0xdf, 0xf5, 0x18, 0xc5, 0x28, 0x2, 0xef, 0x56, 0xbb, 0x91, 0x7c, 0xfe, 0x13, 0x39, 0xd4, 0x6d, 0x80, 0xaa, 0x47, 0xb3, 0x5e, 0x74, 0x99, 0x20, 0xcd, 0xe7, 0xa, 0x88, 0x65, 0x4f, 0xa2, 0x1b, 0xf6, 0xdc, 0x31, 0x29, 0xc4, 0xee, 0x3, 0xba, 0x57, 0x7d, 0x90, 0x12, 0xff, 0xd5, 0x38, 0x81, 0x6c, 0x46, 0xab, 0x5f, 0xb2, 0x98, 0x75, 0xcc, 0x21, 0xb, 0xe6, 0x64, 0x89, 0xa3, 0x4e, 0xf7, 0x1a, 0x30, 0xdd, 0x97, 0x7a, 0x50, 0xbd, 0x4, 0xe9, 0xc3, 0x2e, 0xac, 0x41, 0x6b, 0x86, 0x3f, 0xd2, 0xf8, 0x15, 0xe1, 0xc, 0x26, 0xcb, 0x72, 0x9f, 0xb5, 0x58, 0xda, 0x37, 0x1d, 0xf0, 0x49, 0xa4, 0x8e, 0x63, 0x7b, 0x96, 0xbc, 0x51, 0xe8, 0x5, 0x2f, 0xc2, 0x40, 0xad, 0x87, 0x6a, 0xd3, 0x3e, 0x14, 0xf9, 0xd, 0xe0, 0xca, 0x27, 0x9e, 0x73, 0x59, 0xb4, 0x36, 0xdb, 0xf1, 0x1c, 0xa5, 0x48, 0x62, 0x8f, 0x52, 0xbf, 0x95, 0x78, 0xc1, 0x2c, 0x6, 0xeb, 0x69, 0x84, 0xae, 0x43, 0xfa, 0x17, 0x3d, 0xd0, 0x24, 0xc9, 0xe3, 0xe, 0xb7, 0x5a, 0x70, 0x9d, 0x1f, 0xf2, 0xd8, 0x35, 0x8c, 0x61, 0x4b, 0xa6, 0xbe, 0x53, 0x79, 0x94, 0x2d, 0xc0, 0xea, 0x7, 0x85, 0x68, 0x42, 0xaf, 0x16, 0xfb, 0xd1, 0x3c, 0xc8, 0x25, 0xf, 0xe2, 0x5b, 0xb6, 0x9c, 0x71, 0xf3, 0x1e, 0x34, 0xd9, 0x60, 0x8d, 0xa7, 0x4a},
+ {0x0, 0xee, 0xc1, 0x2f, 0x9f, 0x71, 0x5e, 0xb0, 0x23, 0xcd, 0xe2, 0xc, 0xbc, 0x52, 0x7d, 0x93, 0x46, 0xa8, 0x87, 0x69, 0xd9, 0x37, 0x18, 0xf6, 0x65, 0x8b, 0xa4, 0x4a, 0xfa, 0x14, 0x3b, 0xd5, 0x8c, 0x62, 0x4d, 0xa3, 0x13, 0xfd, 0xd2, 0x3c, 0xaf, 0x41, 0x6e, 0x80, 0x30, 0xde, 0xf1, 0x1f, 0xca, 0x24, 0xb, 0xe5, 0x55, 0xbb, 0x94, 0x7a, 0xe9, 0x7, 0x28, 0xc6, 0x76, 0x98, 0xb7, 0x59, 0x5, 0xeb, 0xc4, 0x2a, 0x9a, 0x74, 0x5b, 0xb5, 0x26, 0xc8, 0xe7, 0x9, 0xb9, 0x57, 0x78, 0x96, 0x43, 0xad, 0x82, 0x6c, 0xdc, 0x32, 0x1d, 0xf3, 0x60, 0x8e, 0xa1, 0x4f, 0xff, 0x11, 0x3e, 0xd0, 0x89, 0x67, 0x48, 0xa6, 0x16, 0xf8, 0xd7, 0x39, 0xaa, 0x44, 0x6b, 0x85, 0x35, 0xdb, 0xf4, 0x1a, 0xcf, 0x21, 0xe, 0xe0, 0x50, 0xbe, 0x91, 0x7f, 0xec, 0x2, 0x2d, 0xc3, 0x73, 0x9d, 0xb2, 0x5c, 0xa, 0xe4, 0xcb, 0x25, 0x95, 0x7b, 0x54, 0xba, 0x29, 0xc7, 0xe8, 0x6, 0xb6, 0x58, 0x77, 0x99, 0x4c, 0xa2, 0x8d, 0x63, 0xd3, 0x3d, 0x12, 0xfc, 0x6f, 0x81, 0xae, 0x40, 0xf0, 0x1e, 0x31, 0xdf, 0x86, 0x68, 0x47, 0xa9, 0x19, 0xf7, 0xd8, 0x36, 0xa5, 0x4b, 0x64, 0x8a, 0x3a, 0xd4, 0xfb, 0x15, 0xc0, 0x2e, 0x1, 0xef, 0x5f, 0xb1, 0x9e, 0x70, 0xe3, 0xd, 0x22, 0xcc, 0x7c, 0x92, 0xbd, 0x53, 0xf, 0xe1, 0xce, 0x20, 0x90, 0x7e, 0x51, 0xbf, 0x2c, 0xc2, 0xed, 0x3, 0xb3, 0x5d, 0x72, 0x9c, 0x49, 0xa7, 0x88, 0x66, 0xd6, 0x38, 0x17, 0xf9, 0x6a, 0x84, 0xab, 0x45, 0xf5, 0x1b, 0x34, 0xda, 0x83, 0x6d, 0x42, 0xac, 0x1c, 0xf2, 0xdd, 0x33, 0xa0, 0x4e, 0x61, 0x8f, 0x3f, 0xd1, 0xfe, 0x10, 0xc5, 0x2b, 0x4, 0xea, 0x5a, 0xb4, 0x9b, 0x75, 0xe6, 0x8, 0x27, 0xc9, 0x79, 0x97, 0xb8, 0x56},
+ {0x0, 0xef, 0xc3, 0x2c, 0x9b, 0x74, 0x58, 0xb7, 0x2b, 0xc4, 0xe8, 0x7, 0xb0, 0x5f, 0x73, 0x9c, 0x56, 0xb9, 0x95, 0x7a, 0xcd, 0x22, 0xe, 0xe1, 0x7d, 0x92, 0xbe, 0x51, 0xe6, 0x9, 0x25, 0xca, 0xac, 0x43, 0x6f, 0x80, 0x37, 0xd8, 0xf4, 0x1b, 0x87, 0x68, 0x44, 0xab, 0x1c, 0xf3, 0xdf, 0x30, 0xfa, 0x15, 0x39, 0xd6, 0x61, 0x8e, 0xa2, 0x4d, 0xd1, 0x3e, 0x12, 0xfd, 0x4a, 0xa5, 0x89, 0x66, 0x45, 0xaa, 0x86, 0x69, 0xde, 0x31, 0x1d, 0xf2, 0x6e, 0x81, 0xad, 0x42, 0xf5, 0x1a, 0x36, 0xd9, 0x13, 0xfc, 0xd0, 0x3f, 0x88, 0x67, 0x4b, 0xa4, 0x38, 0xd7, 0xfb, 0x14, 0xa3, 0x4c, 0x60, 0x8f, 0xe9, 0x6, 0x2a, 0xc5, 0x72, 0x9d, 0xb1, 0x5e, 0xc2, 0x2d, 0x1, 0xee, 0x59, 0xb6, 0x9a, 0x75, 0xbf, 0x50, 0x7c, 0x93, 0x24, 0xcb, 0xe7, 0x8, 0x94, 0x7b, 0x57, 0xb8, 0xf, 0xe0, 0xcc, 0x23, 0x8a, 0x65, 0x49, 0xa6, 0x11, 0xfe, 0xd2, 0x3d, 0xa1, 0x4e, 0x62, 0x8d, 0x3a, 0xd5, 0xf9, 0x16, 0xdc, 0x33, 0x1f, 0xf0, 0x47, 0xa8, 0x84, 0x6b, 0xf7, 0x18, 0x34, 0xdb, 0x6c, 0x83, 0xaf, 0x40, 0x26, 0xc9, 0xe5, 0xa, 0xbd, 0x52, 0x7e, 0x91, 0xd, 0xe2, 0xce, 0x21, 0x96, 0x79, 0x55, 0xba, 0x70, 0x9f, 0xb3, 0x5c, 0xeb, 0x4, 0x28, 0xc7, 0x5b, 0xb4, 0x98, 0x77, 0xc0, 0x2f, 0x3, 0xec, 0xcf, 0x20, 0xc, 0xe3, 0x54, 0xbb, 0x97, 0x78, 0xe4, 0xb, 0x27, 0xc8, 0x7f, 0x90, 0xbc, 0x53, 0x99, 0x76, 0x5a, 0xb5, 0x2, 0xed, 0xc1, 0x2e, 0xb2, 0x5d, 0x71, 0x9e, 0x29, 0xc6, 0xea, 0x5, 0x63, 0x8c, 0xa0, 0x4f, 0xf8, 0x17, 0x3b, 0xd4, 0x48, 0xa7, 0x8b, 0x64, 0xd3, 0x3c, 0x10, 0xff, 0x35, 0xda, 0xf6, 0x19, 0xae, 0x41, 0x6d, 0x82, 0x1e, 0xf1, 0xdd, 0x32, 0x85, 0x6a, 0x46, 0xa9},
+ {0x0, 0xf0, 0xfd, 0xd, 0xe7, 0x17, 0x1a, 0xea, 0xd3, 0x23, 0x2e, 0xde, 0x34, 0xc4, 0xc9, 0x39, 0xbb, 0x4b, 0x46, 0xb6, 0x5c, 0xac, 0xa1, 0x51, 0x68, 0x98, 0x95, 0x65, 0x8f, 0x7f, 0x72, 0x82, 0x6b, 0x9b, 0x96, 0x66, 0x8c, 0x7c, 0x71, 0x81, 0xb8, 0x48, 0x45, 0xb5, 0x5f, 0xaf, 0xa2, 0x52, 0xd0, 0x20, 0x2d, 0xdd, 0x37, 0xc7, 0xca, 0x3a, 0x3, 0xf3, 0xfe, 0xe, 0xe4, 0x14, 0x19, 0xe9, 0xd6, 0x26, 0x2b, 0xdb, 0x31, 0xc1, 0xcc, 0x3c, 0x5, 0xf5, 0xf8, 0x8, 0xe2, 0x12, 0x1f, 0xef, 0x6d, 0x9d, 0x90, 0x60, 0x8a, 0x7a, 0x77, 0x87, 0xbe, 0x4e, 0x43, 0xb3, 0x59, 0xa9, 0xa4, 0x54, 0xbd, 0x4d, 0x40, 0xb0, 0x5a, 0xaa, 0xa7, 0x57, 0x6e, 0x9e, 0x93, 0x63, 0x89, 0x79, 0x74, 0x84, 0x6, 0xf6, 0xfb, 0xb, 0xe1, 0x11, 0x1c, 0xec, 0xd5, 0x25, 0x28, 0xd8, 0x32, 0xc2, 0xcf, 0x3f, 0xb1, 0x41, 0x4c, 0xbc, 0x56, 0xa6, 0xab, 0x5b, 0x62, 0x92, 0x9f, 0x6f, 0x85, 0x75, 0x78, 0x88, 0xa, 0xfa, 0xf7, 0x7, 0xed, 0x1d, 0x10, 0xe0, 0xd9, 0x29, 0x24, 0xd4, 0x3e, 0xce, 0xc3, 0x33, 0xda, 0x2a, 0x27, 0xd7, 0x3d, 0xcd, 0xc0, 0x30, 0x9, 0xf9, 0xf4, 0x4, 0xee, 0x1e, 0x13, 0xe3, 0x61, 0x91, 0x9c, 0x6c, 0x86, 0x76, 0x7b, 0x8b, 0xb2, 0x42, 0x4f, 0xbf, 0x55, 0xa5, 0xa8, 0x58, 0x67, 0x97, 0x9a, 0x6a, 0x80, 0x70, 0x7d, 0x8d, 0xb4, 0x44, 0x49, 0xb9, 0x53, 0xa3, 0xae, 0x5e, 0xdc, 0x2c, 0x21, 0xd1, 0x3b, 0xcb, 0xc6, 0x36, 0xf, 0xff, 0xf2, 0x2, 0xe8, 0x18, 0x15, 0xe5, 0xc, 0xfc, 0xf1, 0x1, 0xeb, 0x1b, 0x16, 0xe6, 0xdf, 0x2f, 0x22, 0xd2, 0x38, 0xc8, 0xc5, 0x35, 0xb7, 0x47, 0x4a, 0xba, 0x50, 0xa0, 0xad, 0x5d, 0x64, 0x94, 0x99, 0x69, 0x83, 0x73, 0x7e, 0x8e},
+ {0x0, 0xf1, 0xff, 0xe, 0xe3, 0x12, 0x1c, 0xed, 0xdb, 0x2a, 0x24, 0xd5, 0x38, 0xc9, 0xc7, 0x36, 0xab, 0x5a, 0x54, 0xa5, 0x48, 0xb9, 0xb7, 0x46, 0x70, 0x81, 0x8f, 0x7e, 0x93, 0x62, 0x6c, 0x9d, 0x4b, 0xba, 0xb4, 0x45, 0xa8, 0x59, 0x57, 0xa6, 0x90, 0x61, 0x6f, 0x9e, 0x73, 0x82, 0x8c, 0x7d, 0xe0, 0x11, 0x1f, 0xee, 0x3, 0xf2, 0xfc, 0xd, 0x3b, 0xca, 0xc4, 0x35, 0xd8, 0x29, 0x27, 0xd6, 0x96, 0x67, 0x69, 0x98, 0x75, 0x84, 0x8a, 0x7b, 0x4d, 0xbc, 0xb2, 0x43, 0xae, 0x5f, 0x51, 0xa0, 0x3d, 0xcc, 0xc2, 0x33, 0xde, 0x2f, 0x21, 0xd0, 0xe6, 0x17, 0x19, 0xe8, 0x5, 0xf4, 0xfa, 0xb, 0xdd, 0x2c, 0x22, 0xd3, 0x3e, 0xcf, 0xc1, 0x30, 0x6, 0xf7, 0xf9, 0x8, 0xe5, 0x14, 0x1a, 0xeb, 0x76, 0x87, 0x89, 0x78, 0x95, 0x64, 0x6a, 0x9b, 0xad, 0x5c, 0x52, 0xa3, 0x4e, 0xbf, 0xb1, 0x40, 0x31, 0xc0, 0xce, 0x3f, 0xd2, 0x23, 0x2d, 0xdc, 0xea, 0x1b, 0x15, 0xe4, 0x9, 0xf8, 0xf6, 0x7, 0x9a, 0x6b, 0x65, 0x94, 0x79, 0x88, 0x86, 0x77, 0x41, 0xb0, 0xbe, 0x4f, 0xa2, 0x53, 0x5d, 0xac, 0x7a, 0x8b, 0x85, 0x74, 0x99, 0x68, 0x66, 0x97, 0xa1, 0x50, 0x5e, 0xaf, 0x42, 0xb3, 0xbd, 0x4c, 0xd1, 0x20, 0x2e, 0xdf, 0x32, 0xc3, 0xcd, 0x3c, 0xa, 0xfb, 0xf5, 0x4, 0xe9, 0x18, 0x16, 0xe7, 0xa7, 0x56, 0x58, 0xa9, 0x44, 0xb5, 0xbb, 0x4a, 0x7c, 0x8d, 0x83, 0x72, 0x9f, 0x6e, 0x60, 0x91, 0xc, 0xfd, 0xf3, 0x2, 0xef, 0x1e, 0x10, 0xe1, 0xd7, 0x26, 0x28, 0xd9, 0x34, 0xc5, 0xcb, 0x3a, 0xec, 0x1d, 0x13, 0xe2, 0xf, 0xfe, 0xf0, 0x1, 0x37, 0xc6, 0xc8, 0x39, 0xd4, 0x25, 0x2b, 0xda, 0x47, 0xb6, 0xb8, 0x49, 0xa4, 0x55, 0x5b, 0xaa, 0x9c, 0x6d, 0x63, 0x92, 0x7f, 0x8e, 0x80, 0x71},
+ {0x0, 0xf2, 0xf9, 0xb, 0xef, 0x1d, 0x16, 0xe4, 0xc3, 0x31, 0x3a, 0xc8, 0x2c, 0xde, 0xd5, 0x27, 0x9b, 0x69, 0x62, 0x90, 0x74, 0x86, 0x8d, 0x7f, 0x58, 0xaa, 0xa1, 0x53, 0xb7, 0x45, 0x4e, 0xbc, 0x2b, 0xd9, 0xd2, 0x20, 0xc4, 0x36, 0x3d, 0xcf, 0xe8, 0x1a, 0x11, 0xe3, 0x7, 0xf5, 0xfe, 0xc, 0xb0, 0x42, 0x49, 0xbb, 0x5f, 0xad, 0xa6, 0x54, 0x73, 0x81, 0x8a, 0x78, 0x9c, 0x6e, 0x65, 0x97, 0x56, 0xa4, 0xaf, 0x5d, 0xb9, 0x4b, 0x40, 0xb2, 0x95, 0x67, 0x6c, 0x9e, 0x7a, 0x88, 0x83, 0x71, 0xcd, 0x3f, 0x34, 0xc6, 0x22, 0xd0, 0xdb, 0x29, 0xe, 0xfc, 0xf7, 0x5, 0xe1, 0x13, 0x18, 0xea, 0x7d, 0x8f, 0x84, 0x76, 0x92, 0x60, 0x6b, 0x99, 0xbe, 0x4c, 0x47, 0xb5, 0x51, 0xa3, 0xa8, 0x5a, 0xe6, 0x14, 0x1f, 0xed, 0x9, 0xfb, 0xf0, 0x2, 0x25, 0xd7, 0xdc, 0x2e, 0xca, 0x38, 0x33, 0xc1, 0xac, 0x5e, 0x55, 0xa7, 0x43, 0xb1, 0xba, 0x48, 0x6f, 0x9d, 0x96, 0x64, 0x80, 0x72, 0x79, 0x8b, 0x37, 0xc5, 0xce, 0x3c, 0xd8, 0x2a, 0x21, 0xd3, 0xf4, 0x6, 0xd, 0xff, 0x1b, 0xe9, 0xe2, 0x10, 0x87, 0x75, 0x7e, 0x8c, 0x68, 0x9a, 0x91, 0x63, 0x44, 0xb6, 0xbd, 0x4f, 0xab, 0x59, 0x52, 0xa0, 0x1c, 0xee, 0xe5, 0x17, 0xf3, 0x1, 0xa, 0xf8, 0xdf, 0x2d, 0x26, 0xd4, 0x30, 0xc2, 0xc9, 0x3b, 0xfa, 0x8, 0x3, 0xf1, 0x15, 0xe7, 0xec, 0x1e, 0x39, 0xcb, 0xc0, 0x32, 0xd6, 0x24, 0x2f, 0xdd, 0x61, 0x93, 0x98, 0x6a, 0x8e, 0x7c, 0x77, 0x85, 0xa2, 0x50, 0x5b, 0xa9, 0x4d, 0xbf, 0xb4, 0x46, 0xd1, 0x23, 0x28, 0xda, 0x3e, 0xcc, 0xc7, 0x35, 0x12, 0xe0, 0xeb, 0x19, 0xfd, 0xf, 0x4, 0xf6, 0x4a, 0xb8, 0xb3, 0x41, 0xa5, 0x57, 0x5c, 0xae, 0x89, 0x7b, 0x70, 0x82, 0x66, 0x94, 0x9f, 0x6d},
+ {0x0, 0xf3, 0xfb, 0x8, 0xeb, 0x18, 0x10, 0xe3, 0xcb, 0x38, 0x30, 0xc3, 0x20, 0xd3, 0xdb, 0x28, 0x8b, 0x78, 0x70, 0x83, 0x60, 0x93, 0x9b, 0x68, 0x40, 0xb3, 0xbb, 0x48, 0xab, 0x58, 0x50, 0xa3, 0xb, 0xf8, 0xf0, 0x3, 0xe0, 0x13, 0x1b, 0xe8, 0xc0, 0x33, 0x3b, 0xc8, 0x2b, 0xd8, 0xd0, 0x23, 0x80, 0x73, 0x7b, 0x88, 0x6b, 0x98, 0x90, 0x63, 0x4b, 0xb8, 0xb0, 0x43, 0xa0, 0x53, 0x5b, 0xa8, 0x16, 0xe5, 0xed, 0x1e, 0xfd, 0xe, 0x6, 0xf5, 0xdd, 0x2e, 0x26, 0xd5, 0x36, 0xc5, 0xcd, 0x3e, 0x9d, 0x6e, 0x66, 0x95, 0x76, 0x85, 0x8d, 0x7e, 0x56, 0xa5, 0xad, 0x5e, 0xbd, 0x4e, 0x46, 0xb5, 0x1d, 0xee, 0xe6, 0x15, 0xf6, 0x5, 0xd, 0xfe, 0xd6, 0x25, 0x2d, 0xde, 0x3d, 0xce, 0xc6, 0x35, 0x96, 0x65, 0x6d, 0x9e, 0x7d, 0x8e, 0x86, 0x75, 0x5d, 0xae, 0xa6, 0x55, 0xb6, 0x45, 0x4d, 0xbe, 0x2c, 0xdf, 0xd7, 0x24, 0xc7, 0x34, 0x3c, 0xcf, 0xe7, 0x14, 0x1c, 0xef, 0xc, 0xff, 0xf7, 0x4, 0xa7, 0x54, 0x5c, 0xaf, 0x4c, 0xbf, 0xb7, 0x44, 0x6c, 0x9f, 0x97, 0x64, 0x87, 0x74, 0x7c, 0x8f, 0x27, 0xd4, 0xdc, 0x2f, 0xcc, 0x3f, 0x37, 0xc4, 0xec, 0x1f, 0x17, 0xe4, 0x7, 0xf4, 0xfc, 0xf, 0xac, 0x5f, 0x57, 0xa4, 0x47, 0xb4, 0xbc, 0x4f, 0x67, 0x94, 0x9c, 0x6f, 0x8c, 0x7f, 0x77, 0x84, 0x3a, 0xc9, 0xc1, 0x32, 0xd1, 0x22, 0x2a, 0xd9, 0xf1, 0x2, 0xa, 0xf9, 0x1a, 0xe9, 0xe1, 0x12, 0xb1, 0x42, 0x4a, 0xb9, 0x5a, 0xa9, 0xa1, 0x52, 0x7a, 0x89, 0x81, 0x72, 0x91, 0x62, 0x6a, 0x99, 0x31, 0xc2, 0xca, 0x39, 0xda, 0x29, 0x21, 0xd2, 0xfa, 0x9, 0x1, 0xf2, 0x11, 0xe2, 0xea, 0x19, 0xba, 0x49, 0x41, 0xb2, 0x51, 0xa2, 0xaa, 0x59, 0x71, 0x82, 0x8a, 0x79, 0x9a, 0x69, 0x61, 0x92},
+ {0x0, 0xf4, 0xf5, 0x1, 0xf7, 0x3, 0x2, 0xf6, 0xf3, 0x7, 0x6, 0xf2, 0x4, 0xf0, 0xf1, 0x5, 0xfb, 0xf, 0xe, 0xfa, 0xc, 0xf8, 0xf9, 0xd, 0x8, 0xfc, 0xfd, 0x9, 0xff, 0xb, 0xa, 0xfe, 0xeb, 0x1f, 0x1e, 0xea, 0x1c, 0xe8, 0xe9, 0x1d, 0x18, 0xec, 0xed, 0x19, 0xef, 0x1b, 0x1a, 0xee, 0x10, 0xe4, 0xe5, 0x11, 0xe7, 0x13, 0x12, 0xe6, 0xe3, 0x17, 0x16, 0xe2, 0x14, 0xe0, 0xe1, 0x15, 0xcb, 0x3f, 0x3e, 0xca, 0x3c, 0xc8, 0xc9, 0x3d, 0x38, 0xcc, 0xcd, 0x39, 0xcf, 0x3b, 0x3a, 0xce, 0x30, 0xc4, 0xc5, 0x31, 0xc7, 0x33, 0x32, 0xc6, 0xc3, 0x37, 0x36, 0xc2, 0x34, 0xc0, 0xc1, 0x35, 0x20, 0xd4, 0xd5, 0x21, 0xd7, 0x23, 0x22, 0xd6, 0xd3, 0x27, 0x26, 0xd2, 0x24, 0xd0, 0xd1, 0x25, 0xdb, 0x2f, 0x2e, 0xda, 0x2c, 0xd8, 0xd9, 0x2d, 0x28, 0xdc, 0xdd, 0x29, 0xdf, 0x2b, 0x2a, 0xde, 0x8b, 0x7f, 0x7e, 0x8a, 0x7c, 0x88, 0x89, 0x7d, 0x78, 0x8c, 0x8d, 0x79, 0x8f, 0x7b, 0x7a, 0x8e, 0x70, 0x84, 0x85, 0x71, 0x87, 0x73, 0x72, 0x86, 0x83, 0x77, 0x76, 0x82, 0x74, 0x80, 0x81, 0x75, 0x60, 0x94, 0x95, 0x61, 0x97, 0x63, 0x62, 0x96, 0x93, 0x67, 0x66, 0x92, 0x64, 0x90, 0x91, 0x65, 0x9b, 0x6f, 0x6e, 0x9a, 0x6c, 0x98, 0x99, 0x6d, 0x68, 0x9c, 0x9d, 0x69, 0x9f, 0x6b, 0x6a, 0x9e, 0x40, 0xb4, 0xb5, 0x41, 0xb7, 0x43, 0x42, 0xb6, 0xb3, 0x47, 0x46, 0xb2, 0x44, 0xb0, 0xb1, 0x45, 0xbb, 0x4f, 0x4e, 0xba, 0x4c, 0xb8, 0xb9, 0x4d, 0x48, 0xbc, 0xbd, 0x49, 0xbf, 0x4b, 0x4a, 0xbe, 0xab, 0x5f, 0x5e, 0xaa, 0x5c, 0xa8, 0xa9, 0x5d, 0x58, 0xac, 0xad, 0x59, 0xaf, 0x5b, 0x5a, 0xae, 0x50, 0xa4, 0xa5, 0x51, 0xa7, 0x53, 0x52, 0xa6, 0xa3, 0x57, 0x56, 0xa2, 0x54, 0xa0, 0xa1, 0x55},
+ {0x0, 0xf5, 0xf7, 0x2, 0xf3, 0x6, 0x4, 0xf1, 0xfb, 0xe, 0xc, 0xf9, 0x8, 0xfd, 0xff, 0xa, 0xeb, 0x1e, 0x1c, 0xe9, 0x18, 0xed, 0xef, 0x1a, 0x10, 0xe5, 0xe7, 0x12, 0xe3, 0x16, 0x14, 0xe1, 0xcb, 0x3e, 0x3c, 0xc9, 0x38, 0xcd, 0xcf, 0x3a, 0x30, 0xc5, 0xc7, 0x32, 0xc3, 0x36, 0x34, 0xc1, 0x20, 0xd5, 0xd7, 0x22, 0xd3, 0x26, 0x24, 0xd1, 0xdb, 0x2e, 0x2c, 0xd9, 0x28, 0xdd, 0xdf, 0x2a, 0x8b, 0x7e, 0x7c, 0x89, 0x78, 0x8d, 0x8f, 0x7a, 0x70, 0x85, 0x87, 0x72, 0x83, 0x76, 0x74, 0x81, 0x60, 0x95, 0x97, 0x62, 0x93, 0x66, 0x64, 0x91, 0x9b, 0x6e, 0x6c, 0x99, 0x68, 0x9d, 0x9f, 0x6a, 0x40, 0xb5, 0xb7, 0x42, 0xb3, 0x46, 0x44, 0xb1, 0xbb, 0x4e, 0x4c, 0xb9, 0x48, 0xbd, 0xbf, 0x4a, 0xab, 0x5e, 0x5c, 0xa9, 0x58, 0xad, 0xaf, 0x5a, 0x50, 0xa5, 0xa7, 0x52, 0xa3, 0x56, 0x54, 0xa1, 0xb, 0xfe, 0xfc, 0x9, 0xf8, 0xd, 0xf, 0xfa, 0xf0, 0x5, 0x7, 0xf2, 0x3, 0xf6, 0xf4, 0x1, 0xe0, 0x15, 0x17, 0xe2, 0x13, 0xe6, 0xe4, 0x11, 0x1b, 0xee, 0xec, 0x19, 0xe8, 0x1d, 0x1f, 0xea, 0xc0, 0x35, 0x37, 0xc2, 0x33, 0xc6, 0xc4, 0x31, 0x3b, 0xce, 0xcc, 0x39, 0xc8, 0x3d, 0x3f, 0xca, 0x2b, 0xde, 0xdc, 0x29, 0xd8, 0x2d, 0x2f, 0xda, 0xd0, 0x25, 0x27, 0xd2, 0x23, 0xd6, 0xd4, 0x21, 0x80, 0x75, 0x77, 0x82, 0x73, 0x86, 0x84, 0x71, 0x7b, 0x8e, 0x8c, 0x79, 0x88, 0x7d, 0x7f, 0x8a, 0x6b, 0x9e, 0x9c, 0x69, 0x98, 0x6d, 0x6f, 0x9a, 0x90, 0x65, 0x67, 0x92, 0x63, 0x96, 0x94, 0x61, 0x4b, 0xbe, 0xbc, 0x49, 0xb8, 0x4d, 0x4f, 0xba, 0xb0, 0x45, 0x47, 0xb2, 0x43, 0xb6, 0xb4, 0x41, 0xa0, 0x55, 0x57, 0xa2, 0x53, 0xa6, 0xa4, 0x51, 0x5b, 0xae, 0xac, 0x59, 0xa8, 0x5d, 0x5f, 0xaa},
+ {0x0, 0xf6, 0xf1, 0x7, 0xff, 0x9, 0xe, 0xf8, 0xe3, 0x15, 0x12, 0xe4, 0x1c, 0xea, 0xed, 0x1b, 0xdb, 0x2d, 0x2a, 0xdc, 0x24, 0xd2, 0xd5, 0x23, 0x38, 0xce, 0xc9, 0x3f, 0xc7, 0x31, 0x36, 0xc0, 0xab, 0x5d, 0x5a, 0xac, 0x54, 0xa2, 0xa5, 0x53, 0x48, 0xbe, 0xb9, 0x4f, 0xb7, 0x41, 0x46, 0xb0, 0x70, 0x86, 0x81, 0x77, 0x8f, 0x79, 0x7e, 0x88, 0x93, 0x65, 0x62, 0x94, 0x6c, 0x9a, 0x9d, 0x6b, 0x4b, 0xbd, 0xba, 0x4c, 0xb4, 0x42, 0x45, 0xb3, 0xa8, 0x5e, 0x59, 0xaf, 0x57, 0xa1, 0xa6, 0x50, 0x90, 0x66, 0x61, 0x97, 0x6f, 0x99, 0x9e, 0x68, 0x73, 0x85, 0x82, 0x74, 0x8c, 0x7a, 0x7d, 0x8b, 0xe0, 0x16, 0x11, 0xe7, 0x1f, 0xe9, 0xee, 0x18, 0x3, 0xf5, 0xf2, 0x4, 0xfc, 0xa, 0xd, 0xfb, 0x3b, 0xcd, 0xca, 0x3c, 0xc4, 0x32, 0x35, 0xc3, 0xd8, 0x2e, 0x29, 0xdf, 0x27, 0xd1, 0xd6, 0x20, 0x96, 0x60, 0x67, 0x91, 0x69, 0x9f, 0x98, 0x6e, 0x75, 0x83, 0x84, 0x72, 0x8a, 0x7c, 0x7b, 0x8d, 0x4d, 0xbb, 0xbc, 0x4a, 0xb2, 0x44, 0x43, 0xb5, 0xae, 0x58, 0x5f, 0xa9, 0x51, 0xa7, 0xa0, 0x56, 0x3d, 0xcb, 0xcc, 0x3a, 0xc2, 0x34, 0x33, 0xc5, 0xde, 0x28, 0x2f, 0xd9, 0x21, 0xd7, 0xd0, 0x26, 0xe6, 0x10, 0x17, 0xe1, 0x19, 0xef, 0xe8, 0x1e, 0x5, 0xf3, 0xf4, 0x2, 0xfa, 0xc, 0xb, 0xfd, 0xdd, 0x2b, 0x2c, 0xda, 0x22, 0xd4, 0xd3, 0x25, 0x3e, 0xc8, 0xcf, 0x39, 0xc1, 0x37, 0x30, 0xc6, 0x6, 0xf0, 0xf7, 0x1, 0xf9, 0xf, 0x8, 0xfe, 0xe5, 0x13, 0x14, 0xe2, 0x1a, 0xec, 0xeb, 0x1d, 0x76, 0x80, 0x87, 0x71, 0x89, 0x7f, 0x78, 0x8e, 0x95, 0x63, 0x64, 0x92, 0x6a, 0x9c, 0x9b, 0x6d, 0xad, 0x5b, 0x5c, 0xaa, 0x52, 0xa4, 0xa3, 0x55, 0x4e, 0xb8, 0xbf, 0x49, 0xb1, 0x47, 0x40, 0xb6},
+ {0x0, 0xf7, 0xf3, 0x4, 0xfb, 0xc, 0x8, 0xff, 0xeb, 0x1c, 0x18, 0xef, 0x10, 0xe7, 0xe3, 0x14, 0xcb, 0x3c, 0x38, 0xcf, 0x30, 0xc7, 0xc3, 0x34, 0x20, 0xd7, 0xd3, 0x24, 0xdb, 0x2c, 0x28, 0xdf, 0x8b, 0x7c, 0x78, 0x8f, 0x70, 0x87, 0x83, 0x74, 0x60, 0x97, 0x93, 0x64, 0x9b, 0x6c, 0x68, 0x9f, 0x40, 0xb7, 0xb3, 0x44, 0xbb, 0x4c, 0x48, 0xbf, 0xab, 0x5c, 0x58, 0xaf, 0x50, 0xa7, 0xa3, 0x54, 0xb, 0xfc, 0xf8, 0xf, 0xf0, 0x7, 0x3, 0xf4, 0xe0, 0x17, 0x13, 0xe4, 0x1b, 0xec, 0xe8, 0x1f, 0xc0, 0x37, 0x33, 0xc4, 0x3b, 0xcc, 0xc8, 0x3f, 0x2b, 0xdc, 0xd8, 0x2f, 0xd0, 0x27, 0x23, 0xd4, 0x80, 0x77, 0x73, 0x84, 0x7b, 0x8c, 0x88, 0x7f, 0x6b, 0x9c, 0x98, 0x6f, 0x90, 0x67, 0x63, 0x94, 0x4b, 0xbc, 0xb8, 0x4f, 0xb0, 0x47, 0x43, 0xb4, 0xa0, 0x57, 0x53, 0xa4, 0x5b, 0xac, 0xa8, 0x5f, 0x16, 0xe1, 0xe5, 0x12, 0xed, 0x1a, 0x1e, 0xe9, 0xfd, 0xa, 0xe, 0xf9, 0x6, 0xf1, 0xf5, 0x2, 0xdd, 0x2a, 0x2e, 0xd9, 0x26, 0xd1, 0xd5, 0x22, 0x36, 0xc1, 0xc5, 0x32, 0xcd, 0x3a, 0x3e, 0xc9, 0x9d, 0x6a, 0x6e, 0x99, 0x66, 0x91, 0x95, 0x62, 0x76, 0x81, 0x85, 0x72, 0x8d, 0x7a, 0x7e, 0x89, 0x56, 0xa1, 0xa5, 0x52, 0xad, 0x5a, 0x5e, 0xa9, 0xbd, 0x4a, 0x4e, 0xb9, 0x46, 0xb1, 0xb5, 0x42, 0x1d, 0xea, 0xee, 0x19, 0xe6, 0x11, 0x15, 0xe2, 0xf6, 0x1, 0x5, 0xf2, 0xd, 0xfa, 0xfe, 0x9, 0xd6, 0x21, 0x25, 0xd2, 0x2d, 0xda, 0xde, 0x29, 0x3d, 0xca, 0xce, 0x39, 0xc6, 0x31, 0x35, 0xc2, 0x96, 0x61, 0x65, 0x92, 0x6d, 0x9a, 0x9e, 0x69, 0x7d, 0x8a, 0x8e, 0x79, 0x86, 0x71, 0x75, 0x82, 0x5d, 0xaa, 0xae, 0x59, 0xa6, 0x51, 0x55, 0xa2, 0xb6, 0x41, 0x45, 0xb2, 0x4d, 0xba, 0xbe, 0x49},
+ {0x0, 0xf8, 0xed, 0x15, 0xc7, 0x3f, 0x2a, 0xd2, 0x93, 0x6b, 0x7e, 0x86, 0x54, 0xac, 0xb9, 0x41, 0x3b, 0xc3, 0xd6, 0x2e, 0xfc, 0x4, 0x11, 0xe9, 0xa8, 0x50, 0x45, 0xbd, 0x6f, 0x97, 0x82, 0x7a, 0x76, 0x8e, 0x9b, 0x63, 0xb1, 0x49, 0x5c, 0xa4, 0xe5, 0x1d, 0x8, 0xf0, 0x22, 0xda, 0xcf, 0x37, 0x4d, 0xb5, 0xa0, 0x58, 0x8a, 0x72, 0x67, 0x9f, 0xde, 0x26, 0x33, 0xcb, 0x19, 0xe1, 0xf4, 0xc, 0xec, 0x14, 0x1, 0xf9, 0x2b, 0xd3, 0xc6, 0x3e, 0x7f, 0x87, 0x92, 0x6a, 0xb8, 0x40, 0x55, 0xad, 0xd7, 0x2f, 0x3a, 0xc2, 0x10, 0xe8, 0xfd, 0x5, 0x44, 0xbc, 0xa9, 0x51, 0x83, 0x7b, 0x6e, 0x96, 0x9a, 0x62, 0x77, 0x8f, 0x5d, 0xa5, 0xb0, 0x48, 0x9, 0xf1, 0xe4, 0x1c, 0xce, 0x36, 0x23, 0xdb, 0xa1, 0x59, 0x4c, 0xb4, 0x66, 0x9e, 0x8b, 0x73, 0x32, 0xca, 0xdf, 0x27, 0xf5, 0xd, 0x18, 0xe0, 0xc5, 0x3d, 0x28, 0xd0, 0x2, 0xfa, 0xef, 0x17, 0x56, 0xae, 0xbb, 0x43, 0x91, 0x69, 0x7c, 0x84, 0xfe, 0x6, 0x13, 0xeb, 0x39, 0xc1, 0xd4, 0x2c, 0x6d, 0x95, 0x80, 0x78, 0xaa, 0x52, 0x47, 0xbf, 0xb3, 0x4b, 0x5e, 0xa6, 0x74, 0x8c, 0x99, 0x61, 0x20, 0xd8, 0xcd, 0x35, 0xe7, 0x1f, 0xa, 0xf2, 0x88, 0x70, 0x65, 0x9d, 0x4f, 0xb7, 0xa2, 0x5a, 0x1b, 0xe3, 0xf6, 0xe, 0xdc, 0x24, 0x31, 0xc9, 0x29, 0xd1, 0xc4, 0x3c, 0xee, 0x16, 0x3, 0xfb, 0xba, 0x42, 0x57, 0xaf, 0x7d, 0x85, 0x90, 0x68, 0x12, 0xea, 0xff, 0x7, 0xd5, 0x2d, 0x38, 0xc0, 0x81, 0x79, 0x6c, 0x94, 0x46, 0xbe, 0xab, 0x53, 0x5f, 0xa7, 0xb2, 0x4a, 0x98, 0x60, 0x75, 0x8d, 0xcc, 0x34, 0x21, 0xd9, 0xb, 0xf3, 0xe6, 0x1e, 0x64, 0x9c, 0x89, 0x71, 0xa3, 0x5b, 0x4e, 0xb6, 0xf7, 0xf, 0x1a, 0xe2, 0x30, 0xc8, 0xdd, 0x25},
+ {0x0, 0xf9, 0xef, 0x16, 0xc3, 0x3a, 0x2c, 0xd5, 0x9b, 0x62, 0x74, 0x8d, 0x58, 0xa1, 0xb7, 0x4e, 0x2b, 0xd2, 0xc4, 0x3d, 0xe8, 0x11, 0x7, 0xfe, 0xb0, 0x49, 0x5f, 0xa6, 0x73, 0x8a, 0x9c, 0x65, 0x56, 0xaf, 0xb9, 0x40, 0x95, 0x6c, 0x7a, 0x83, 0xcd, 0x34, 0x22, 0xdb, 0xe, 0xf7, 0xe1, 0x18, 0x7d, 0x84, 0x92, 0x6b, 0xbe, 0x47, 0x51, 0xa8, 0xe6, 0x1f, 0x9, 0xf0, 0x25, 0xdc, 0xca, 0x33, 0xac, 0x55, 0x43, 0xba, 0x6f, 0x96, 0x80, 0x79, 0x37, 0xce, 0xd8, 0x21, 0xf4, 0xd, 0x1b, 0xe2, 0x87, 0x7e, 0x68, 0x91, 0x44, 0xbd, 0xab, 0x52, 0x1c, 0xe5, 0xf3, 0xa, 0xdf, 0x26, 0x30, 0xc9, 0xfa, 0x3, 0x15, 0xec, 0x39, 0xc0, 0xd6, 0x2f, 0x61, 0x98, 0x8e, 0x77, 0xa2, 0x5b, 0x4d, 0xb4, 0xd1, 0x28, 0x3e, 0xc7, 0x12, 0xeb, 0xfd, 0x4, 0x4a, 0xb3, 0xa5, 0x5c, 0x89, 0x70, 0x66, 0x9f, 0x45, 0xbc, 0xaa, 0x53, 0x86, 0x7f, 0x69, 0x90, 0xde, 0x27, 0x31, 0xc8, 0x1d, 0xe4, 0xf2, 0xb, 0x6e, 0x97, 0x81, 0x78, 0xad, 0x54, 0x42, 0xbb, 0xf5, 0xc, 0x1a, 0xe3, 0x36, 0xcf, 0xd9, 0x20, 0x13, 0xea, 0xfc, 0x5, 0xd0, 0x29, 0x3f, 0xc6, 0x88, 0x71, 0x67, 0x9e, 0x4b, 0xb2, 0xa4, 0x5d, 0x38, 0xc1, 0xd7, 0x2e, 0xfb, 0x2, 0x14, 0xed, 0xa3, 0x5a, 0x4c, 0xb5, 0x60, 0x99, 0x8f, 0x76, 0xe9, 0x10, 0x6, 0xff, 0x2a, 0xd3, 0xc5, 0x3c, 0x72, 0x8b, 0x9d, 0x64, 0xb1, 0x48, 0x5e, 0xa7, 0xc2, 0x3b, 0x2d, 0xd4, 0x1, 0xf8, 0xee, 0x17, 0x59, 0xa0, 0xb6, 0x4f, 0x9a, 0x63, 0x75, 0x8c, 0xbf, 0x46, 0x50, 0xa9, 0x7c, 0x85, 0x93, 0x6a, 0x24, 0xdd, 0xcb, 0x32, 0xe7, 0x1e, 0x8, 0xf1, 0x94, 0x6d, 0x7b, 0x82, 0x57, 0xae, 0xb8, 0x41, 0xf, 0xf6, 0xe0, 0x19, 0xcc, 0x35, 0x23, 0xda},
+ {0x0, 0xfa, 0xe9, 0x13, 0xcf, 0x35, 0x26, 0xdc, 0x83, 0x79, 0x6a, 0x90, 0x4c, 0xb6, 0xa5, 0x5f, 0x1b, 0xe1, 0xf2, 0x8, 0xd4, 0x2e, 0x3d, 0xc7, 0x98, 0x62, 0x71, 0x8b, 0x57, 0xad, 0xbe, 0x44, 0x36, 0xcc, 0xdf, 0x25, 0xf9, 0x3, 0x10, 0xea, 0xb5, 0x4f, 0x5c, 0xa6, 0x7a, 0x80, 0x93, 0x69, 0x2d, 0xd7, 0xc4, 0x3e, 0xe2, 0x18, 0xb, 0xf1, 0xae, 0x54, 0x47, 0xbd, 0x61, 0x9b, 0x88, 0x72, 0x6c, 0x96, 0x85, 0x7f, 0xa3, 0x59, 0x4a, 0xb0, 0xef, 0x15, 0x6, 0xfc, 0x20, 0xda, 0xc9, 0x33, 0x77, 0x8d, 0x9e, 0x64, 0xb8, 0x42, 0x51, 0xab, 0xf4, 0xe, 0x1d, 0xe7, 0x3b, 0xc1, 0xd2, 0x28, 0x5a, 0xa0, 0xb3, 0x49, 0x95, 0x6f, 0x7c, 0x86, 0xd9, 0x23, 0x30, 0xca, 0x16, 0xec, 0xff, 0x5, 0x41, 0xbb, 0xa8, 0x52, 0x8e, 0x74, 0x67, 0x9d, 0xc2, 0x38, 0x2b, 0xd1, 0xd, 0xf7, 0xe4, 0x1e, 0xd8, 0x22, 0x31, 0xcb, 0x17, 0xed, 0xfe, 0x4, 0x5b, 0xa1, 0xb2, 0x48, 0x94, 0x6e, 0x7d, 0x87, 0xc3, 0x39, 0x2a, 0xd0, 0xc, 0xf6, 0xe5, 0x1f, 0x40, 0xba, 0xa9, 0x53, 0x8f, 0x75, 0x66, 0x9c, 0xee, 0x14, 0x7, 0xfd, 0x21, 0xdb, 0xc8, 0x32, 0x6d, 0x97, 0x84, 0x7e, 0xa2, 0x58, 0x4b, 0xb1, 0xf5, 0xf, 0x1c, 0xe6, 0x3a, 0xc0, 0xd3, 0x29, 0x76, 0x8c, 0x9f, 0x65, 0xb9, 0x43, 0x50, 0xaa, 0xb4, 0x4e, 0x5d, 0xa7, 0x7b, 0x81, 0x92, 0x68, 0x37, 0xcd, 0xde, 0x24, 0xf8, 0x2, 0x11, 0xeb, 0xaf, 0x55, 0x46, 0xbc, 0x60, 0x9a, 0x89, 0x73, 0x2c, 0xd6, 0xc5, 0x3f, 0xe3, 0x19, 0xa, 0xf0, 0x82, 0x78, 0x6b, 0x91, 0x4d, 0xb7, 0xa4, 0x5e, 0x1, 0xfb, 0xe8, 0x12, 0xce, 0x34, 0x27, 0xdd, 0x99, 0x63, 0x70, 0x8a, 0x56, 0xac, 0xbf, 0x45, 0x1a, 0xe0, 0xf3, 0x9, 0xd5, 0x2f, 0x3c, 0xc6},
+ {0x0, 0xfb, 0xeb, 0x10, 0xcb, 0x30, 0x20, 0xdb, 0x8b, 0x70, 0x60, 0x9b, 0x40, 0xbb, 0xab, 0x50, 0xb, 0xf0, 0xe0, 0x1b, 0xc0, 0x3b, 0x2b, 0xd0, 0x80, 0x7b, 0x6b, 0x90, 0x4b, 0xb0, 0xa0, 0x5b, 0x16, 0xed, 0xfd, 0x6, 0xdd, 0x26, 0x36, 0xcd, 0x9d, 0x66, 0x76, 0x8d, 0x56, 0xad, 0xbd, 0x46, 0x1d, 0xe6, 0xf6, 0xd, 0xd6, 0x2d, 0x3d, 0xc6, 0x96, 0x6d, 0x7d, 0x86, 0x5d, 0xa6, 0xb6, 0x4d, 0x2c, 0xd7, 0xc7, 0x3c, 0xe7, 0x1c, 0xc, 0xf7, 0xa7, 0x5c, 0x4c, 0xb7, 0x6c, 0x97, 0x87, 0x7c, 0x27, 0xdc, 0xcc, 0x37, 0xec, 0x17, 0x7, 0xfc, 0xac, 0x57, 0x47, 0xbc, 0x67, 0x9c, 0x8c, 0x77, 0x3a, 0xc1, 0xd1, 0x2a, 0xf1, 0xa, 0x1a, 0xe1, 0xb1, 0x4a, 0x5a, 0xa1, 0x7a, 0x81, 0x91, 0x6a, 0x31, 0xca, 0xda, 0x21, 0xfa, 0x1, 0x11, 0xea, 0xba, 0x41, 0x51, 0xaa, 0x71, 0x8a, 0x9a, 0x61, 0x58, 0xa3, 0xb3, 0x48, 0x93, 0x68, 0x78, 0x83, 0xd3, 0x28, 0x38, 0xc3, 0x18, 0xe3, 0xf3, 0x8, 0x53, 0xa8, 0xb8, 0x43, 0x98, 0x63, 0x73, 0x88, 0xd8, 0x23, 0x33, 0xc8, 0x13, 0xe8, 0xf8, 0x3, 0x4e, 0xb5, 0xa5, 0x5e, 0x85, 0x7e, 0x6e, 0x95, 0xc5, 0x3e, 0x2e, 0xd5, 0xe, 0xf5, 0xe5, 0x1e, 0x45, 0xbe, 0xae, 0x55, 0x8e, 0x75, 0x65, 0x9e, 0xce, 0x35, 0x25, 0xde, 0x5, 0xfe, 0xee, 0x15, 0x74, 0x8f, 0x9f, 0x64, 0xbf, 0x44, 0x54, 0xaf, 0xff, 0x4, 0x14, 0xef, 0x34, 0xcf, 0xdf, 0x24, 0x7f, 0x84, 0x94, 0x6f, 0xb4, 0x4f, 0x5f, 0xa4, 0xf4, 0xf, 0x1f, 0xe4, 0x3f, 0xc4, 0xd4, 0x2f, 0x62, 0x99, 0x89, 0x72, 0xa9, 0x52, 0x42, 0xb9, 0xe9, 0x12, 0x2, 0xf9, 0x22, 0xd9, 0xc9, 0x32, 0x69, 0x92, 0x82, 0x79, 0xa2, 0x59, 0x49, 0xb2, 0xe2, 0x19, 0x9, 0xf2, 0x29, 0xd2, 0xc2, 0x39},
+ {0x0, 0xfc, 0xe5, 0x19, 0xd7, 0x2b, 0x32, 0xce, 0xb3, 0x4f, 0x56, 0xaa, 0x64, 0x98, 0x81, 0x7d, 0x7b, 0x87, 0x9e, 0x62, 0xac, 0x50, 0x49, 0xb5, 0xc8, 0x34, 0x2d, 0xd1, 0x1f, 0xe3, 0xfa, 0x6, 0xf6, 0xa, 0x13, 0xef, 0x21, 0xdd, 0xc4, 0x38, 0x45, 0xb9, 0xa0, 0x5c, 0x92, 0x6e, 0x77, 0x8b, 0x8d, 0x71, 0x68, 0x94, 0x5a, 0xa6, 0xbf, 0x43, 0x3e, 0xc2, 0xdb, 0x27, 0xe9, 0x15, 0xc, 0xf0, 0xf1, 0xd, 0x14, 0xe8, 0x26, 0xda, 0xc3, 0x3f, 0x42, 0xbe, 0xa7, 0x5b, 0x95, 0x69, 0x70, 0x8c, 0x8a, 0x76, 0x6f, 0x93, 0x5d, 0xa1, 0xb8, 0x44, 0x39, 0xc5, 0xdc, 0x20, 0xee, 0x12, 0xb, 0xf7, 0x7, 0xfb, 0xe2, 0x1e, 0xd0, 0x2c, 0x35, 0xc9, 0xb4, 0x48, 0x51, 0xad, 0x63, 0x9f, 0x86, 0x7a, 0x7c, 0x80, 0x99, 0x65, 0xab, 0x57, 0x4e, 0xb2, 0xcf, 0x33, 0x2a, 0xd6, 0x18, 0xe4, 0xfd, 0x1, 0xff, 0x3, 0x1a, 0xe6, 0x28, 0xd4, 0xcd, 0x31, 0x4c, 0xb0, 0xa9, 0x55, 0x9b, 0x67, 0x7e, 0x82, 0x84, 0x78, 0x61, 0x9d, 0x53, 0xaf, 0xb6, 0x4a, 0x37, 0xcb, 0xd2, 0x2e, 0xe0, 0x1c, 0x5, 0xf9, 0x9, 0xf5, 0xec, 0x10, 0xde, 0x22, 0x3b, 0xc7, 0xba, 0x46, 0x5f, 0xa3, 0x6d, 0x91, 0x88, 0x74, 0x72, 0x8e, 0x97, 0x6b, 0xa5, 0x59, 0x40, 0xbc, 0xc1, 0x3d, 0x24, 0xd8, 0x16, 0xea, 0xf3, 0xf, 0xe, 0xf2, 0xeb, 0x17, 0xd9, 0x25, 0x3c, 0xc0, 0xbd, 0x41, 0x58, 0xa4, 0x6a, 0x96, 0x8f, 0x73, 0x75, 0x89, 0x90, 0x6c, 0xa2, 0x5e, 0x47, 0xbb, 0xc6, 0x3a, 0x23, 0xdf, 0x11, 0xed, 0xf4, 0x8, 0xf8, 0x4, 0x1d, 0xe1, 0x2f, 0xd3, 0xca, 0x36, 0x4b, 0xb7, 0xae, 0x52, 0x9c, 0x60, 0x79, 0x85, 0x83, 0x7f, 0x66, 0x9a, 0x54, 0xa8, 0xb1, 0x4d, 0x30, 0xcc, 0xd5, 0x29, 0xe7, 0x1b, 0x2, 0xfe},
+ {0x0, 0xfd, 0xe7, 0x1a, 0xd3, 0x2e, 0x34, 0xc9, 0xbb, 0x46, 0x5c, 0xa1, 0x68, 0x95, 0x8f, 0x72, 0x6b, 0x96, 0x8c, 0x71, 0xb8, 0x45, 0x5f, 0xa2, 0xd0, 0x2d, 0x37, 0xca, 0x3, 0xfe, 0xe4, 0x19, 0xd6, 0x2b, 0x31, 0xcc, 0x5, 0xf8, 0xe2, 0x1f, 0x6d, 0x90, 0x8a, 0x77, 0xbe, 0x43, 0x59, 0xa4, 0xbd, 0x40, 0x5a, 0xa7, 0x6e, 0x93, 0x89, 0x74, 0x6, 0xfb, 0xe1, 0x1c, 0xd5, 0x28, 0x32, 0xcf, 0xb1, 0x4c, 0x56, 0xab, 0x62, 0x9f, 0x85, 0x78, 0xa, 0xf7, 0xed, 0x10, 0xd9, 0x24, 0x3e, 0xc3, 0xda, 0x27, 0x3d, 0xc0, 0x9, 0xf4, 0xee, 0x13, 0x61, 0x9c, 0x86, 0x7b, 0xb2, 0x4f, 0x55, 0xa8, 0x67, 0x9a, 0x80, 0x7d, 0xb4, 0x49, 0x53, 0xae, 0xdc, 0x21, 0x3b, 0xc6, 0xf, 0xf2, 0xe8, 0x15, 0xc, 0xf1, 0xeb, 0x16, 0xdf, 0x22, 0x38, 0xc5, 0xb7, 0x4a, 0x50, 0xad, 0x64, 0x99, 0x83, 0x7e, 0x7f, 0x82, 0x98, 0x65, 0xac, 0x51, 0x4b, 0xb6, 0xc4, 0x39, 0x23, 0xde, 0x17, 0xea, 0xf0, 0xd, 0x14, 0xe9, 0xf3, 0xe, 0xc7, 0x3a, 0x20, 0xdd, 0xaf, 0x52, 0x48, 0xb5, 0x7c, 0x81, 0x9b, 0x66, 0xa9, 0x54, 0x4e, 0xb3, 0x7a, 0x87, 0x9d, 0x60, 0x12, 0xef, 0xf5, 0x8, 0xc1, 0x3c, 0x26, 0xdb, 0xc2, 0x3f, 0x25, 0xd8, 0x11, 0xec, 0xf6, 0xb, 0x79, 0x84, 0x9e, 0x63, 0xaa, 0x57, 0x4d, 0xb0, 0xce, 0x33, 0x29, 0xd4, 0x1d, 0xe0, 0xfa, 0x7, 0x75, 0x88, 0x92, 0x6f, 0xa6, 0x5b, 0x41, 0xbc, 0xa5, 0x58, 0x42, 0xbf, 0x76, 0x8b, 0x91, 0x6c, 0x1e, 0xe3, 0xf9, 0x4, 0xcd, 0x30, 0x2a, 0xd7, 0x18, 0xe5, 0xff, 0x2, 0xcb, 0x36, 0x2c, 0xd1, 0xa3, 0x5e, 0x44, 0xb9, 0x70, 0x8d, 0x97, 0x6a, 0x73, 0x8e, 0x94, 0x69, 0xa0, 0x5d, 0x47, 0xba, 0xc8, 0x35, 0x2f, 0xd2, 0x1b, 0xe6, 0xfc, 0x1},
+ {0x0, 0xfe, 0xe1, 0x1f, 0xdf, 0x21, 0x3e, 0xc0, 0xa3, 0x5d, 0x42, 0xbc, 0x7c, 0x82, 0x9d, 0x63, 0x5b, 0xa5, 0xba, 0x44, 0x84, 0x7a, 0x65, 0x9b, 0xf8, 0x6, 0x19, 0xe7, 0x27, 0xd9, 0xc6, 0x38, 0xb6, 0x48, 0x57, 0xa9, 0x69, 0x97, 0x88, 0x76, 0x15, 0xeb, 0xf4, 0xa, 0xca, 0x34, 0x2b, 0xd5, 0xed, 0x13, 0xc, 0xf2, 0x32, 0xcc, 0xd3, 0x2d, 0x4e, 0xb0, 0xaf, 0x51, 0x91, 0x6f, 0x70, 0x8e, 0x71, 0x8f, 0x90, 0x6e, 0xae, 0x50, 0x4f, 0xb1, 0xd2, 0x2c, 0x33, 0xcd, 0xd, 0xf3, 0xec, 0x12, 0x2a, 0xd4, 0xcb, 0x35, 0xf5, 0xb, 0x14, 0xea, 0x89, 0x77, 0x68, 0x96, 0x56, 0xa8, 0xb7, 0x49, 0xc7, 0x39, 0x26, 0xd8, 0x18, 0xe6, 0xf9, 0x7, 0x64, 0x9a, 0x85, 0x7b, 0xbb, 0x45, 0x5a, 0xa4, 0x9c, 0x62, 0x7d, 0x83, 0x43, 0xbd, 0xa2, 0x5c, 0x3f, 0xc1, 0xde, 0x20, 0xe0, 0x1e, 0x1, 0xff, 0xe2, 0x1c, 0x3, 0xfd, 0x3d, 0xc3, 0xdc, 0x22, 0x41, 0xbf, 0xa0, 0x5e, 0x9e, 0x60, 0x7f, 0x81, 0xb9, 0x47, 0x58, 0xa6, 0x66, 0x98, 0x87, 0x79, 0x1a, 0xe4, 0xfb, 0x5, 0xc5, 0x3b, 0x24, 0xda, 0x54, 0xaa, 0xb5, 0x4b, 0x8b, 0x75, 0x6a, 0x94, 0xf7, 0x9, 0x16, 0xe8, 0x28, 0xd6, 0xc9, 0x37, 0xf, 0xf1, 0xee, 0x10, 0xd0, 0x2e, 0x31, 0xcf, 0xac, 0x52, 0x4d, 0xb3, 0x73, 0x8d, 0x92, 0x6c, 0x93, 0x6d, 0x72, 0x8c, 0x4c, 0xb2, 0xad, 0x53, 0x30, 0xce, 0xd1, 0x2f, 0xef, 0x11, 0xe, 0xf0, 0xc8, 0x36, 0x29, 0xd7, 0x17, 0xe9, 0xf6, 0x8, 0x6b, 0x95, 0x8a, 0x74, 0xb4, 0x4a, 0x55, 0xab, 0x25, 0xdb, 0xc4, 0x3a, 0xfa, 0x4, 0x1b, 0xe5, 0x86, 0x78, 0x67, 0x99, 0x59, 0xa7, 0xb8, 0x46, 0x7e, 0x80, 0x9f, 0x61, 0xa1, 0x5f, 0x40, 0xbe, 0xdd, 0x23, 0x3c, 0xc2, 0x2, 0xfc, 0xe3, 0x1d},
+ {0x0, 0xff, 0xe3, 0x1c, 0xdb, 0x24, 0x38, 0xc7, 0xab, 0x54, 0x48, 0xb7, 0x70, 0x8f, 0x93, 0x6c, 0x4b, 0xb4, 0xa8, 0x57, 0x90, 0x6f, 0x73, 0x8c, 0xe0, 0x1f, 0x3, 0xfc, 0x3b, 0xc4, 0xd8, 0x27, 0x96, 0x69, 0x75, 0x8a, 0x4d, 0xb2, 0xae, 0x51, 0x3d, 0xc2, 0xde, 0x21, 0xe6, 0x19, 0x5, 0xfa, 0xdd, 0x22, 0x3e, 0xc1, 0x6, 0xf9, 0xe5, 0x1a, 0x76, 0x89, 0x95, 0x6a, 0xad, 0x52, 0x4e, 0xb1, 0x31, 0xce, 0xd2, 0x2d, 0xea, 0x15, 0x9, 0xf6, 0x9a, 0x65, 0x79, 0x86, 0x41, 0xbe, 0xa2, 0x5d, 0x7a, 0x85, 0x99, 0x66, 0xa1, 0x5e, 0x42, 0xbd, 0xd1, 0x2e, 0x32, 0xcd, 0xa, 0xf5, 0xe9, 0x16, 0xa7, 0x58, 0x44, 0xbb, 0x7c, 0x83, 0x9f, 0x60, 0xc, 0xf3, 0xef, 0x10, 0xd7, 0x28, 0x34, 0xcb, 0xec, 0x13, 0xf, 0xf0, 0x37, 0xc8, 0xd4, 0x2b, 0x47, 0xb8, 0xa4, 0x5b, 0x9c, 0x63, 0x7f, 0x80, 0x62, 0x9d, 0x81, 0x7e, 0xb9, 0x46, 0x5a, 0xa5, 0xc9, 0x36, 0x2a, 0xd5, 0x12, 0xed, 0xf1, 0xe, 0x29, 0xd6, 0xca, 0x35, 0xf2, 0xd, 0x11, 0xee, 0x82, 0x7d, 0x61, 0x9e, 0x59, 0xa6, 0xba, 0x45, 0xf4, 0xb, 0x17, 0xe8, 0x2f, 0xd0, 0xcc, 0x33, 0x5f, 0xa0, 0xbc, 0x43, 0x84, 0x7b, 0x67, 0x98, 0xbf, 0x40, 0x5c, 0xa3, 0x64, 0x9b, 0x87, 0x78, 0x14, 0xeb, 0xf7, 0x8, 0xcf, 0x30, 0x2c, 0xd3, 0x53, 0xac, 0xb0, 0x4f, 0x88, 0x77, 0x6b, 0x94, 0xf8, 0x7, 0x1b, 0xe4, 0x23, 0xdc, 0xc0, 0x3f, 0x18, 0xe7, 0xfb, 0x4, 0xc3, 0x3c, 0x20, 0xdf, 0xb3, 0x4c, 0x50, 0xaf, 0x68, 0x97, 0x8b, 0x74, 0xc5, 0x3a, 0x26, 0xd9, 0x1e, 0xe1, 0xfd, 0x2, 0x6e, 0x91, 0x8d, 0x72, 0xb5, 0x4a, 0x56, 0xa9, 0x8e, 0x71, 0x6d, 0x92, 0x55, 0xaa, 0xb6, 0x49, 0x25, 0xda, 0xc6, 0x39, 0xfe, 0x1, 0x1d, 0xe2}}
+
+var mulTableLow = [256][16]uint8{{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
+ {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf},
+ {0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e},
+ {0x0, 0x3, 0x6, 0x5, 0xc, 0xf, 0xa, 0x9, 0x18, 0x1b, 0x1e, 0x1d, 0x14, 0x17, 0x12, 0x11},
+ {0x0, 0x4, 0x8, 0xc, 0x10, 0x14, 0x18, 0x1c, 0x20, 0x24, 0x28, 0x2c, 0x30, 0x34, 0x38, 0x3c},
+ {0x0, 0x5, 0xa, 0xf, 0x14, 0x11, 0x1e, 0x1b, 0x28, 0x2d, 0x22, 0x27, 0x3c, 0x39, 0x36, 0x33},
+ {0x0, 0x6, 0xc, 0xa, 0x18, 0x1e, 0x14, 0x12, 0x30, 0x36, 0x3c, 0x3a, 0x28, 0x2e, 0x24, 0x22},
+ {0x0, 0x7, 0xe, 0x9, 0x1c, 0x1b, 0x12, 0x15, 0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d},
+ {0x0, 0x8, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78},
+ {0x0, 0x9, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f, 0x48, 0x41, 0x5a, 0x53, 0x6c, 0x65, 0x7e, 0x77},
+ {0x0, 0xa, 0x14, 0x1e, 0x28, 0x22, 0x3c, 0x36, 0x50, 0x5a, 0x44, 0x4e, 0x78, 0x72, 0x6c, 0x66},
+ {0x0, 0xb, 0x16, 0x1d, 0x2c, 0x27, 0x3a, 0x31, 0x58, 0x53, 0x4e, 0x45, 0x74, 0x7f, 0x62, 0x69},
+ {0x0, 0xc, 0x18, 0x14, 0x30, 0x3c, 0x28, 0x24, 0x60, 0x6c, 0x78, 0x74, 0x50, 0x5c, 0x48, 0x44},
+ {0x0, 0xd, 0x1a, 0x17, 0x34, 0x39, 0x2e, 0x23, 0x68, 0x65, 0x72, 0x7f, 0x5c, 0x51, 0x46, 0x4b},
+ {0x0, 0xe, 0x1c, 0x12, 0x38, 0x36, 0x24, 0x2a, 0x70, 0x7e, 0x6c, 0x62, 0x48, 0x46, 0x54, 0x5a},
+ {0x0, 0xf, 0x1e, 0x11, 0x3c, 0x33, 0x22, 0x2d, 0x78, 0x77, 0x66, 0x69, 0x44, 0x4b, 0x5a, 0x55},
+ {0x0, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, 0x90, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0},
+ {0x0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff},
+ {0x0, 0x12, 0x24, 0x36, 0x48, 0x5a, 0x6c, 0x7e, 0x90, 0x82, 0xb4, 0xa6, 0xd8, 0xca, 0xfc, 0xee},
+ {0x0, 0x13, 0x26, 0x35, 0x4c, 0x5f, 0x6a, 0x79, 0x98, 0x8b, 0xbe, 0xad, 0xd4, 0xc7, 0xf2, 0xe1},
+ {0x0, 0x14, 0x28, 0x3c, 0x50, 0x44, 0x78, 0x6c, 0xa0, 0xb4, 0x88, 0x9c, 0xf0, 0xe4, 0xd8, 0xcc},
+ {0x0, 0x15, 0x2a, 0x3f, 0x54, 0x41, 0x7e, 0x6b, 0xa8, 0xbd, 0x82, 0x97, 0xfc, 0xe9, 0xd6, 0xc3},
+ {0x0, 0x16, 0x2c, 0x3a, 0x58, 0x4e, 0x74, 0x62, 0xb0, 0xa6, 0x9c, 0x8a, 0xe8, 0xfe, 0xc4, 0xd2},
+ {0x0, 0x17, 0x2e, 0x39, 0x5c, 0x4b, 0x72, 0x65, 0xb8, 0xaf, 0x96, 0x81, 0xe4, 0xf3, 0xca, 0xdd},
+ {0x0, 0x18, 0x30, 0x28, 0x60, 0x78, 0x50, 0x48, 0xc0, 0xd8, 0xf0, 0xe8, 0xa0, 0xb8, 0x90, 0x88},
+ {0x0, 0x19, 0x32, 0x2b, 0x64, 0x7d, 0x56, 0x4f, 0xc8, 0xd1, 0xfa, 0xe3, 0xac, 0xb5, 0x9e, 0x87},
+ {0x0, 0x1a, 0x34, 0x2e, 0x68, 0x72, 0x5c, 0x46, 0xd0, 0xca, 0xe4, 0xfe, 0xb8, 0xa2, 0x8c, 0x96},
+ {0x0, 0x1b, 0x36, 0x2d, 0x6c, 0x77, 0x5a, 0x41, 0xd8, 0xc3, 0xee, 0xf5, 0xb4, 0xaf, 0x82, 0x99},
+ {0x0, 0x1c, 0x38, 0x24, 0x70, 0x6c, 0x48, 0x54, 0xe0, 0xfc, 0xd8, 0xc4, 0x90, 0x8c, 0xa8, 0xb4},
+ {0x0, 0x1d, 0x3a, 0x27, 0x74, 0x69, 0x4e, 0x53, 0xe8, 0xf5, 0xd2, 0xcf, 0x9c, 0x81, 0xa6, 0xbb},
+ {0x0, 0x1e, 0x3c, 0x22, 0x78, 0x66, 0x44, 0x5a, 0xf0, 0xee, 0xcc, 0xd2, 0x88, 0x96, 0xb4, 0xaa},
+ {0x0, 0x1f, 0x3e, 0x21, 0x7c, 0x63, 0x42, 0x5d, 0xf8, 0xe7, 0xc6, 0xd9, 0x84, 0x9b, 0xba, 0xa5},
+ {0x0, 0x20, 0x40, 0x60, 0x80, 0xa0, 0xc0, 0xe0, 0x1d, 0x3d, 0x5d, 0x7d, 0x9d, 0xbd, 0xdd, 0xfd},
+ {0x0, 0x21, 0x42, 0x63, 0x84, 0xa5, 0xc6, 0xe7, 0x15, 0x34, 0x57, 0x76, 0x91, 0xb0, 0xd3, 0xf2},
+ {0x0, 0x22, 0x44, 0x66, 0x88, 0xaa, 0xcc, 0xee, 0xd, 0x2f, 0x49, 0x6b, 0x85, 0xa7, 0xc1, 0xe3},
+ {0x0, 0x23, 0x46, 0x65, 0x8c, 0xaf, 0xca, 0xe9, 0x5, 0x26, 0x43, 0x60, 0x89, 0xaa, 0xcf, 0xec},
+ {0x0, 0x24, 0x48, 0x6c, 0x90, 0xb4, 0xd8, 0xfc, 0x3d, 0x19, 0x75, 0x51, 0xad, 0x89, 0xe5, 0xc1},
+ {0x0, 0x25, 0x4a, 0x6f, 0x94, 0xb1, 0xde, 0xfb, 0x35, 0x10, 0x7f, 0x5a, 0xa1, 0x84, 0xeb, 0xce},
+ {0x0, 0x26, 0x4c, 0x6a, 0x98, 0xbe, 0xd4, 0xf2, 0x2d, 0xb, 0x61, 0x47, 0xb5, 0x93, 0xf9, 0xdf},
+ {0x0, 0x27, 0x4e, 0x69, 0x9c, 0xbb, 0xd2, 0xf5, 0x25, 0x2, 0x6b, 0x4c, 0xb9, 0x9e, 0xf7, 0xd0},
+ {0x0, 0x28, 0x50, 0x78, 0xa0, 0x88, 0xf0, 0xd8, 0x5d, 0x75, 0xd, 0x25, 0xfd, 0xd5, 0xad, 0x85},
+ {0x0, 0x29, 0x52, 0x7b, 0xa4, 0x8d, 0xf6, 0xdf, 0x55, 0x7c, 0x7, 0x2e, 0xf1, 0xd8, 0xa3, 0x8a},
+ {0x0, 0x2a, 0x54, 0x7e, 0xa8, 0x82, 0xfc, 0xd6, 0x4d, 0x67, 0x19, 0x33, 0xe5, 0xcf, 0xb1, 0x9b},
+ {0x0, 0x2b, 0x56, 0x7d, 0xac, 0x87, 0xfa, 0xd1, 0x45, 0x6e, 0x13, 0x38, 0xe9, 0xc2, 0xbf, 0x94},
+ {0x0, 0x2c, 0x58, 0x74, 0xb0, 0x9c, 0xe8, 0xc4, 0x7d, 0x51, 0x25, 0x9, 0xcd, 0xe1, 0x95, 0xb9},
+ {0x0, 0x2d, 0x5a, 0x77, 0xb4, 0x99, 0xee, 0xc3, 0x75, 0x58, 0x2f, 0x2, 0xc1, 0xec, 0x9b, 0xb6},
+ {0x0, 0x2e, 0x5c, 0x72, 0xb8, 0x96, 0xe4, 0xca, 0x6d, 0x43, 0x31, 0x1f, 0xd5, 0xfb, 0x89, 0xa7},
+ {0x0, 0x2f, 0x5e, 0x71, 0xbc, 0x93, 0xe2, 0xcd, 0x65, 0x4a, 0x3b, 0x14, 0xd9, 0xf6, 0x87, 0xa8},
+ {0x0, 0x30, 0x60, 0x50, 0xc0, 0xf0, 0xa0, 0x90, 0x9d, 0xad, 0xfd, 0xcd, 0x5d, 0x6d, 0x3d, 0xd},
+ {0x0, 0x31, 0x62, 0x53, 0xc4, 0xf5, 0xa6, 0x97, 0x95, 0xa4, 0xf7, 0xc6, 0x51, 0x60, 0x33, 0x2},
+ {0x0, 0x32, 0x64, 0x56, 0xc8, 0xfa, 0xac, 0x9e, 0x8d, 0xbf, 0xe9, 0xdb, 0x45, 0x77, 0x21, 0x13},
+ {0x0, 0x33, 0x66, 0x55, 0xcc, 0xff, 0xaa, 0x99, 0x85, 0xb6, 0xe3, 0xd0, 0x49, 0x7a, 0x2f, 0x1c},
+ {0x0, 0x34, 0x68, 0x5c, 0xd0, 0xe4, 0xb8, 0x8c, 0xbd, 0x89, 0xd5, 0xe1, 0x6d, 0x59, 0x5, 0x31},
+ {0x0, 0x35, 0x6a, 0x5f, 0xd4, 0xe1, 0xbe, 0x8b, 0xb5, 0x80, 0xdf, 0xea, 0x61, 0x54, 0xb, 0x3e},
+ {0x0, 0x36, 0x6c, 0x5a, 0xd8, 0xee, 0xb4, 0x82, 0xad, 0x9b, 0xc1, 0xf7, 0x75, 0x43, 0x19, 0x2f},
+ {0x0, 0x37, 0x6e, 0x59, 0xdc, 0xeb, 0xb2, 0x85, 0xa5, 0x92, 0xcb, 0xfc, 0x79, 0x4e, 0x17, 0x20},
+ {0x0, 0x38, 0x70, 0x48, 0xe0, 0xd8, 0x90, 0xa8, 0xdd, 0xe5, 0xad, 0x95, 0x3d, 0x5, 0x4d, 0x75},
+ {0x0, 0x39, 0x72, 0x4b, 0xe4, 0xdd, 0x96, 0xaf, 0xd5, 0xec, 0xa7, 0x9e, 0x31, 0x8, 0x43, 0x7a},
+ {0x0, 0x3a, 0x74, 0x4e, 0xe8, 0xd2, 0x9c, 0xa6, 0xcd, 0xf7, 0xb9, 0x83, 0x25, 0x1f, 0x51, 0x6b},
+ {0x0, 0x3b, 0x76, 0x4d, 0xec, 0xd7, 0x9a, 0xa1, 0xc5, 0xfe, 0xb3, 0x88, 0x29, 0x12, 0x5f, 0x64},
+ {0x0, 0x3c, 0x78, 0x44, 0xf0, 0xcc, 0x88, 0xb4, 0xfd, 0xc1, 0x85, 0xb9, 0xd, 0x31, 0x75, 0x49},
+ {0x0, 0x3d, 0x7a, 0x47, 0xf4, 0xc9, 0x8e, 0xb3, 0xf5, 0xc8, 0x8f, 0xb2, 0x1, 0x3c, 0x7b, 0x46},
+ {0x0, 0x3e, 0x7c, 0x42, 0xf8, 0xc6, 0x84, 0xba, 0xed, 0xd3, 0x91, 0xaf, 0x15, 0x2b, 0x69, 0x57},
+ {0x0, 0x3f, 0x7e, 0x41, 0xfc, 0xc3, 0x82, 0xbd, 0xe5, 0xda, 0x9b, 0xa4, 0x19, 0x26, 0x67, 0x58},
+ {0x0, 0x40, 0x80, 0xc0, 0x1d, 0x5d, 0x9d, 0xdd, 0x3a, 0x7a, 0xba, 0xfa, 0x27, 0x67, 0xa7, 0xe7},
+ {0x0, 0x41, 0x82, 0xc3, 0x19, 0x58, 0x9b, 0xda, 0x32, 0x73, 0xb0, 0xf1, 0x2b, 0x6a, 0xa9, 0xe8},
+ {0x0, 0x42, 0x84, 0xc6, 0x15, 0x57, 0x91, 0xd3, 0x2a, 0x68, 0xae, 0xec, 0x3f, 0x7d, 0xbb, 0xf9},
+ {0x0, 0x43, 0x86, 0xc5, 0x11, 0x52, 0x97, 0xd4, 0x22, 0x61, 0xa4, 0xe7, 0x33, 0x70, 0xb5, 0xf6},
+ {0x0, 0x44, 0x88, 0xcc, 0xd, 0x49, 0x85, 0xc1, 0x1a, 0x5e, 0x92, 0xd6, 0x17, 0x53, 0x9f, 0xdb},
+ {0x0, 0x45, 0x8a, 0xcf, 0x9, 0x4c, 0x83, 0xc6, 0x12, 0x57, 0x98, 0xdd, 0x1b, 0x5e, 0x91, 0xd4},
+ {0x0, 0x46, 0x8c, 0xca, 0x5, 0x43, 0x89, 0xcf, 0xa, 0x4c, 0x86, 0xc0, 0xf, 0x49, 0x83, 0xc5},
+ {0x0, 0x47, 0x8e, 0xc9, 0x1, 0x46, 0x8f, 0xc8, 0x2, 0x45, 0x8c, 0xcb, 0x3, 0x44, 0x8d, 0xca},
+ {0x0, 0x48, 0x90, 0xd8, 0x3d, 0x75, 0xad, 0xe5, 0x7a, 0x32, 0xea, 0xa2, 0x47, 0xf, 0xd7, 0x9f},
+ {0x0, 0x49, 0x92, 0xdb, 0x39, 0x70, 0xab, 0xe2, 0x72, 0x3b, 0xe0, 0xa9, 0x4b, 0x2, 0xd9, 0x90},
+ {0x0, 0x4a, 0x94, 0xde, 0x35, 0x7f, 0xa1, 0xeb, 0x6a, 0x20, 0xfe, 0xb4, 0x5f, 0x15, 0xcb, 0x81},
+ {0x0, 0x4b, 0x96, 0xdd, 0x31, 0x7a, 0xa7, 0xec, 0x62, 0x29, 0xf4, 0xbf, 0x53, 0x18, 0xc5, 0x8e},
+ {0x0, 0x4c, 0x98, 0xd4, 0x2d, 0x61, 0xb5, 0xf9, 0x5a, 0x16, 0xc2, 0x8e, 0x77, 0x3b, 0xef, 0xa3},
+ {0x0, 0x4d, 0x9a, 0xd7, 0x29, 0x64, 0xb3, 0xfe, 0x52, 0x1f, 0xc8, 0x85, 0x7b, 0x36, 0xe1, 0xac},
+ {0x0, 0x4e, 0x9c, 0xd2, 0x25, 0x6b, 0xb9, 0xf7, 0x4a, 0x4, 0xd6, 0x98, 0x6f, 0x21, 0xf3, 0xbd},
+ {0x0, 0x4f, 0x9e, 0xd1, 0x21, 0x6e, 0xbf, 0xf0, 0x42, 0xd, 0xdc, 0x93, 0x63, 0x2c, 0xfd, 0xb2},
+ {0x0, 0x50, 0xa0, 0xf0, 0x5d, 0xd, 0xfd, 0xad, 0xba, 0xea, 0x1a, 0x4a, 0xe7, 0xb7, 0x47, 0x17},
+ {0x0, 0x51, 0xa2, 0xf3, 0x59, 0x8, 0xfb, 0xaa, 0xb2, 0xe3, 0x10, 0x41, 0xeb, 0xba, 0x49, 0x18},
+ {0x0, 0x52, 0xa4, 0xf6, 0x55, 0x7, 0xf1, 0xa3, 0xaa, 0xf8, 0xe, 0x5c, 0xff, 0xad, 0x5b, 0x9},
+ {0x0, 0x53, 0xa6, 0xf5, 0x51, 0x2, 0xf7, 0xa4, 0xa2, 0xf1, 0x4, 0x57, 0xf3, 0xa0, 0x55, 0x6},
+ {0x0, 0x54, 0xa8, 0xfc, 0x4d, 0x19, 0xe5, 0xb1, 0x9a, 0xce, 0x32, 0x66, 0xd7, 0x83, 0x7f, 0x2b},
+ {0x0, 0x55, 0xaa, 0xff, 0x49, 0x1c, 0xe3, 0xb6, 0x92, 0xc7, 0x38, 0x6d, 0xdb, 0x8e, 0x71, 0x24},
+ {0x0, 0x56, 0xac, 0xfa, 0x45, 0x13, 0xe9, 0xbf, 0x8a, 0xdc, 0x26, 0x70, 0xcf, 0x99, 0x63, 0x35},
+ {0x0, 0x57, 0xae, 0xf9, 0x41, 0x16, 0xef, 0xb8, 0x82, 0xd5, 0x2c, 0x7b, 0xc3, 0x94, 0x6d, 0x3a},
+ {0x0, 0x58, 0xb0, 0xe8, 0x7d, 0x25, 0xcd, 0x95, 0xfa, 0xa2, 0x4a, 0x12, 0x87, 0xdf, 0x37, 0x6f},
+ {0x0, 0x59, 0xb2, 0xeb, 0x79, 0x20, 0xcb, 0x92, 0xf2, 0xab, 0x40, 0x19, 0x8b, 0xd2, 0x39, 0x60},
+ {0x0, 0x5a, 0xb4, 0xee, 0x75, 0x2f, 0xc1, 0x9b, 0xea, 0xb0, 0x5e, 0x4, 0x9f, 0xc5, 0x2b, 0x71},
+ {0x0, 0x5b, 0xb6, 0xed, 0x71, 0x2a, 0xc7, 0x9c, 0xe2, 0xb9, 0x54, 0xf, 0x93, 0xc8, 0x25, 0x7e},
+ {0x0, 0x5c, 0xb8, 0xe4, 0x6d, 0x31, 0xd5, 0x89, 0xda, 0x86, 0x62, 0x3e, 0xb7, 0xeb, 0xf, 0x53},
+ {0x0, 0x5d, 0xba, 0xe7, 0x69, 0x34, 0xd3, 0x8e, 0xd2, 0x8f, 0x68, 0x35, 0xbb, 0xe6, 0x1, 0x5c},
+ {0x0, 0x5e, 0xbc, 0xe2, 0x65, 0x3b, 0xd9, 0x87, 0xca, 0x94, 0x76, 0x28, 0xaf, 0xf1, 0x13, 0x4d},
+ {0x0, 0x5f, 0xbe, 0xe1, 0x61, 0x3e, 0xdf, 0x80, 0xc2, 0x9d, 0x7c, 0x23, 0xa3, 0xfc, 0x1d, 0x42},
+ {0x0, 0x60, 0xc0, 0xa0, 0x9d, 0xfd, 0x5d, 0x3d, 0x27, 0x47, 0xe7, 0x87, 0xba, 0xda, 0x7a, 0x1a},
+ {0x0, 0x61, 0xc2, 0xa3, 0x99, 0xf8, 0x5b, 0x3a, 0x2f, 0x4e, 0xed, 0x8c, 0xb6, 0xd7, 0x74, 0x15},
+ {0x0, 0x62, 0xc4, 0xa6, 0x95, 0xf7, 0x51, 0x33, 0x37, 0x55, 0xf3, 0x91, 0xa2, 0xc0, 0x66, 0x4},
+ {0x0, 0x63, 0xc6, 0xa5, 0x91, 0xf2, 0x57, 0x34, 0x3f, 0x5c, 0xf9, 0x9a, 0xae, 0xcd, 0x68, 0xb},
+ {0x0, 0x64, 0xc8, 0xac, 0x8d, 0xe9, 0x45, 0x21, 0x7, 0x63, 0xcf, 0xab, 0x8a, 0xee, 0x42, 0x26},
+ {0x0, 0x65, 0xca, 0xaf, 0x89, 0xec, 0x43, 0x26, 0xf, 0x6a, 0xc5, 0xa0, 0x86, 0xe3, 0x4c, 0x29},
+ {0x0, 0x66, 0xcc, 0xaa, 0x85, 0xe3, 0x49, 0x2f, 0x17, 0x71, 0xdb, 0xbd, 0x92, 0xf4, 0x5e, 0x38},
+ {0x0, 0x67, 0xce, 0xa9, 0x81, 0xe6, 0x4f, 0x28, 0x1f, 0x78, 0xd1, 0xb6, 0x9e, 0xf9, 0x50, 0x37},
+ {0x0, 0x68, 0xd0, 0xb8, 0xbd, 0xd5, 0x6d, 0x5, 0x67, 0xf, 0xb7, 0xdf, 0xda, 0xb2, 0xa, 0x62},
+ {0x0, 0x69, 0xd2, 0xbb, 0xb9, 0xd0, 0x6b, 0x2, 0x6f, 0x6, 0xbd, 0xd4, 0xd6, 0xbf, 0x4, 0x6d},
+ {0x0, 0x6a, 0xd4, 0xbe, 0xb5, 0xdf, 0x61, 0xb, 0x77, 0x1d, 0xa3, 0xc9, 0xc2, 0xa8, 0x16, 0x7c},
+ {0x0, 0x6b, 0xd6, 0xbd, 0xb1, 0xda, 0x67, 0xc, 0x7f, 0x14, 0xa9, 0xc2, 0xce, 0xa5, 0x18, 0x73},
+ {0x0, 0x6c, 0xd8, 0xb4, 0xad, 0xc1, 0x75, 0x19, 0x47, 0x2b, 0x9f, 0xf3, 0xea, 0x86, 0x32, 0x5e},
+ {0x0, 0x6d, 0xda, 0xb7, 0xa9, 0xc4, 0x73, 0x1e, 0x4f, 0x22, 0x95, 0xf8, 0xe6, 0x8b, 0x3c, 0x51},
+ {0x0, 0x6e, 0xdc, 0xb2, 0xa5, 0xcb, 0x79, 0x17, 0x57, 0x39, 0x8b, 0xe5, 0xf2, 0x9c, 0x2e, 0x40},
+ {0x0, 0x6f, 0xde, 0xb1, 0xa1, 0xce, 0x7f, 0x10, 0x5f, 0x30, 0x81, 0xee, 0xfe, 0x91, 0x20, 0x4f},
+ {0x0, 0x70, 0xe0, 0x90, 0xdd, 0xad, 0x3d, 0x4d, 0xa7, 0xd7, 0x47, 0x37, 0x7a, 0xa, 0x9a, 0xea},
+ {0x0, 0x71, 0xe2, 0x93, 0xd9, 0xa8, 0x3b, 0x4a, 0xaf, 0xde, 0x4d, 0x3c, 0x76, 0x7, 0x94, 0xe5},
+ {0x0, 0x72, 0xe4, 0x96, 0xd5, 0xa7, 0x31, 0x43, 0xb7, 0xc5, 0x53, 0x21, 0x62, 0x10, 0x86, 0xf4},
+ {0x0, 0x73, 0xe6, 0x95, 0xd1, 0xa2, 0x37, 0x44, 0xbf, 0xcc, 0x59, 0x2a, 0x6e, 0x1d, 0x88, 0xfb},
+ {0x0, 0x74, 0xe8, 0x9c, 0xcd, 0xb9, 0x25, 0x51, 0x87, 0xf3, 0x6f, 0x1b, 0x4a, 0x3e, 0xa2, 0xd6},
+ {0x0, 0x75, 0xea, 0x9f, 0xc9, 0xbc, 0x23, 0x56, 0x8f, 0xfa, 0x65, 0x10, 0x46, 0x33, 0xac, 0xd9},
+ {0x0, 0x76, 0xec, 0x9a, 0xc5, 0xb3, 0x29, 0x5f, 0x97, 0xe1, 0x7b, 0xd, 0x52, 0x24, 0xbe, 0xc8},
+ {0x0, 0x77, 0xee, 0x99, 0xc1, 0xb6, 0x2f, 0x58, 0x9f, 0xe8, 0x71, 0x6, 0x5e, 0x29, 0xb0, 0xc7},
+ {0x0, 0x78, 0xf0, 0x88, 0xfd, 0x85, 0xd, 0x75, 0xe7, 0x9f, 0x17, 0x6f, 0x1a, 0x62, 0xea, 0x92},
+ {0x0, 0x79, 0xf2, 0x8b, 0xf9, 0x80, 0xb, 0x72, 0xef, 0x96, 0x1d, 0x64, 0x16, 0x6f, 0xe4, 0x9d},
+ {0x0, 0x7a, 0xf4, 0x8e, 0xf5, 0x8f, 0x1, 0x7b, 0xf7, 0x8d, 0x3, 0x79, 0x2, 0x78, 0xf6, 0x8c},
+ {0x0, 0x7b, 0xf6, 0x8d, 0xf1, 0x8a, 0x7, 0x7c, 0xff, 0x84, 0x9, 0x72, 0xe, 0x75, 0xf8, 0x83},
+ {0x0, 0x7c, 0xf8, 0x84, 0xed, 0x91, 0x15, 0x69, 0xc7, 0xbb, 0x3f, 0x43, 0x2a, 0x56, 0xd2, 0xae},
+ {0x0, 0x7d, 0xfa, 0x87, 0xe9, 0x94, 0x13, 0x6e, 0xcf, 0xb2, 0x35, 0x48, 0x26, 0x5b, 0xdc, 0xa1},
+ {0x0, 0x7e, 0xfc, 0x82, 0xe5, 0x9b, 0x19, 0x67, 0xd7, 0xa9, 0x2b, 0x55, 0x32, 0x4c, 0xce, 0xb0},
+ {0x0, 0x7f, 0xfe, 0x81, 0xe1, 0x9e, 0x1f, 0x60, 0xdf, 0xa0, 0x21, 0x5e, 0x3e, 0x41, 0xc0, 0xbf},
+ {0x0, 0x80, 0x1d, 0x9d, 0x3a, 0xba, 0x27, 0xa7, 0x74, 0xf4, 0x69, 0xe9, 0x4e, 0xce, 0x53, 0xd3},
+ {0x0, 0x81, 0x1f, 0x9e, 0x3e, 0xbf, 0x21, 0xa0, 0x7c, 0xfd, 0x63, 0xe2, 0x42, 0xc3, 0x5d, 0xdc},
+ {0x0, 0x82, 0x19, 0x9b, 0x32, 0xb0, 0x2b, 0xa9, 0x64, 0xe6, 0x7d, 0xff, 0x56, 0xd4, 0x4f, 0xcd},
+ {0x0, 0x83, 0x1b, 0x98, 0x36, 0xb5, 0x2d, 0xae, 0x6c, 0xef, 0x77, 0xf4, 0x5a, 0xd9, 0x41, 0xc2},
+ {0x0, 0x84, 0x15, 0x91, 0x2a, 0xae, 0x3f, 0xbb, 0x54, 0xd0, 0x41, 0xc5, 0x7e, 0xfa, 0x6b, 0xef},
+ {0x0, 0x85, 0x17, 0x92, 0x2e, 0xab, 0x39, 0xbc, 0x5c, 0xd9, 0x4b, 0xce, 0x72, 0xf7, 0x65, 0xe0},
+ {0x0, 0x86, 0x11, 0x97, 0x22, 0xa4, 0x33, 0xb5, 0x44, 0xc2, 0x55, 0xd3, 0x66, 0xe0, 0x77, 0xf1},
+ {0x0, 0x87, 0x13, 0x94, 0x26, 0xa1, 0x35, 0xb2, 0x4c, 0xcb, 0x5f, 0xd8, 0x6a, 0xed, 0x79, 0xfe},
+ {0x0, 0x88, 0xd, 0x85, 0x1a, 0x92, 0x17, 0x9f, 0x34, 0xbc, 0x39, 0xb1, 0x2e, 0xa6, 0x23, 0xab},
+ {0x0, 0x89, 0xf, 0x86, 0x1e, 0x97, 0x11, 0x98, 0x3c, 0xb5, 0x33, 0xba, 0x22, 0xab, 0x2d, 0xa4},
+ {0x0, 0x8a, 0x9, 0x83, 0x12, 0x98, 0x1b, 0x91, 0x24, 0xae, 0x2d, 0xa7, 0x36, 0xbc, 0x3f, 0xb5},
+ {0x0, 0x8b, 0xb, 0x80, 0x16, 0x9d, 0x1d, 0x96, 0x2c, 0xa7, 0x27, 0xac, 0x3a, 0xb1, 0x31, 0xba},
+ {0x0, 0x8c, 0x5, 0x89, 0xa, 0x86, 0xf, 0x83, 0x14, 0x98, 0x11, 0x9d, 0x1e, 0x92, 0x1b, 0x97},
+ {0x0, 0x8d, 0x7, 0x8a, 0xe, 0x83, 0x9, 0x84, 0x1c, 0x91, 0x1b, 0x96, 0x12, 0x9f, 0x15, 0x98},
+ {0x0, 0x8e, 0x1, 0x8f, 0x2, 0x8c, 0x3, 0x8d, 0x4, 0x8a, 0x5, 0x8b, 0x6, 0x88, 0x7, 0x89},
+ {0x0, 0x8f, 0x3, 0x8c, 0x6, 0x89, 0x5, 0x8a, 0xc, 0x83, 0xf, 0x80, 0xa, 0x85, 0x9, 0x86},
+ {0x0, 0x90, 0x3d, 0xad, 0x7a, 0xea, 0x47, 0xd7, 0xf4, 0x64, 0xc9, 0x59, 0x8e, 0x1e, 0xb3, 0x23},
+ {0x0, 0x91, 0x3f, 0xae, 0x7e, 0xef, 0x41, 0xd0, 0xfc, 0x6d, 0xc3, 0x52, 0x82, 0x13, 0xbd, 0x2c},
+ {0x0, 0x92, 0x39, 0xab, 0x72, 0xe0, 0x4b, 0xd9, 0xe4, 0x76, 0xdd, 0x4f, 0x96, 0x4, 0xaf, 0x3d},
+ {0x0, 0x93, 0x3b, 0xa8, 0x76, 0xe5, 0x4d, 0xde, 0xec, 0x7f, 0xd7, 0x44, 0x9a, 0x9, 0xa1, 0x32},
+ {0x0, 0x94, 0x35, 0xa1, 0x6a, 0xfe, 0x5f, 0xcb, 0xd4, 0x40, 0xe1, 0x75, 0xbe, 0x2a, 0x8b, 0x1f},
+ {0x0, 0x95, 0x37, 0xa2, 0x6e, 0xfb, 0x59, 0xcc, 0xdc, 0x49, 0xeb, 0x7e, 0xb2, 0x27, 0x85, 0x10},
+ {0x0, 0x96, 0x31, 0xa7, 0x62, 0xf4, 0x53, 0xc5, 0xc4, 0x52, 0xf5, 0x63, 0xa6, 0x30, 0x97, 0x1},
+ {0x0, 0x97, 0x33, 0xa4, 0x66, 0xf1, 0x55, 0xc2, 0xcc, 0x5b, 0xff, 0x68, 0xaa, 0x3d, 0x99, 0xe},
+ {0x0, 0x98, 0x2d, 0xb5, 0x5a, 0xc2, 0x77, 0xef, 0xb4, 0x2c, 0x99, 0x1, 0xee, 0x76, 0xc3, 0x5b},
+ {0x0, 0x99, 0x2f, 0xb6, 0x5e, 0xc7, 0x71, 0xe8, 0xbc, 0x25, 0x93, 0xa, 0xe2, 0x7b, 0xcd, 0x54},
+ {0x0, 0x9a, 0x29, 0xb3, 0x52, 0xc8, 0x7b, 0xe1, 0xa4, 0x3e, 0x8d, 0x17, 0xf6, 0x6c, 0xdf, 0x45},
+ {0x0, 0x9b, 0x2b, 0xb0, 0x56, 0xcd, 0x7d, 0xe6, 0xac, 0x37, 0x87, 0x1c, 0xfa, 0x61, 0xd1, 0x4a},
+ {0x0, 0x9c, 0x25, 0xb9, 0x4a, 0xd6, 0x6f, 0xf3, 0x94, 0x8, 0xb1, 0x2d, 0xde, 0x42, 0xfb, 0x67},
+ {0x0, 0x9d, 0x27, 0xba, 0x4e, 0xd3, 0x69, 0xf4, 0x9c, 0x1, 0xbb, 0x26, 0xd2, 0x4f, 0xf5, 0x68},
+ {0x0, 0x9e, 0x21, 0xbf, 0x42, 0xdc, 0x63, 0xfd, 0x84, 0x1a, 0xa5, 0x3b, 0xc6, 0x58, 0xe7, 0x79},
+ {0x0, 0x9f, 0x23, 0xbc, 0x46, 0xd9, 0x65, 0xfa, 0x8c, 0x13, 0xaf, 0x30, 0xca, 0x55, 0xe9, 0x76},
+ {0x0, 0xa0, 0x5d, 0xfd, 0xba, 0x1a, 0xe7, 0x47, 0x69, 0xc9, 0x34, 0x94, 0xd3, 0x73, 0x8e, 0x2e},
+ {0x0, 0xa1, 0x5f, 0xfe, 0xbe, 0x1f, 0xe1, 0x40, 0x61, 0xc0, 0x3e, 0x9f, 0xdf, 0x7e, 0x80, 0x21},
+ {0x0, 0xa2, 0x59, 0xfb, 0xb2, 0x10, 0xeb, 0x49, 0x79, 0xdb, 0x20, 0x82, 0xcb, 0x69, 0x92, 0x30},
+ {0x0, 0xa3, 0x5b, 0xf8, 0xb6, 0x15, 0xed, 0x4e, 0x71, 0xd2, 0x2a, 0x89, 0xc7, 0x64, 0x9c, 0x3f},
+ {0x0, 0xa4, 0x55, 0xf1, 0xaa, 0xe, 0xff, 0x5b, 0x49, 0xed, 0x1c, 0xb8, 0xe3, 0x47, 0xb6, 0x12},
+ {0x0, 0xa5, 0x57, 0xf2, 0xae, 0xb, 0xf9, 0x5c, 0x41, 0xe4, 0x16, 0xb3, 0xef, 0x4a, 0xb8, 0x1d},
+ {0x0, 0xa6, 0x51, 0xf7, 0xa2, 0x4, 0xf3, 0x55, 0x59, 0xff, 0x8, 0xae, 0xfb, 0x5d, 0xaa, 0xc},
+ {0x0, 0xa7, 0x53, 0xf4, 0xa6, 0x1, 0xf5, 0x52, 0x51, 0xf6, 0x2, 0xa5, 0xf7, 0x50, 0xa4, 0x3},
+ {0x0, 0xa8, 0x4d, 0xe5, 0x9a, 0x32, 0xd7, 0x7f, 0x29, 0x81, 0x64, 0xcc, 0xb3, 0x1b, 0xfe, 0x56},
+ {0x0, 0xa9, 0x4f, 0xe6, 0x9e, 0x37, 0xd1, 0x78, 0x21, 0x88, 0x6e, 0xc7, 0xbf, 0x16, 0xf0, 0x59},
+ {0x0, 0xaa, 0x49, 0xe3, 0x92, 0x38, 0xdb, 0x71, 0x39, 0x93, 0x70, 0xda, 0xab, 0x1, 0xe2, 0x48},
+ {0x0, 0xab, 0x4b, 0xe0, 0x96, 0x3d, 0xdd, 0x76, 0x31, 0x9a, 0x7a, 0xd1, 0xa7, 0xc, 0xec, 0x47},
+ {0x0, 0xac, 0x45, 0xe9, 0x8a, 0x26, 0xcf, 0x63, 0x9, 0xa5, 0x4c, 0xe0, 0x83, 0x2f, 0xc6, 0x6a},
+ {0x0, 0xad, 0x47, 0xea, 0x8e, 0x23, 0xc9, 0x64, 0x1, 0xac, 0x46, 0xeb, 0x8f, 0x22, 0xc8, 0x65},
+ {0x0, 0xae, 0x41, 0xef, 0x82, 0x2c, 0xc3, 0x6d, 0x19, 0xb7, 0x58, 0xf6, 0x9b, 0x35, 0xda, 0x74},
+ {0x0, 0xaf, 0x43, 0xec, 0x86, 0x29, 0xc5, 0x6a, 0x11, 0xbe, 0x52, 0xfd, 0x97, 0x38, 0xd4, 0x7b},
+ {0x0, 0xb0, 0x7d, 0xcd, 0xfa, 0x4a, 0x87, 0x37, 0xe9, 0x59, 0x94, 0x24, 0x13, 0xa3, 0x6e, 0xde},
+ {0x0, 0xb1, 0x7f, 0xce, 0xfe, 0x4f, 0x81, 0x30, 0xe1, 0x50, 0x9e, 0x2f, 0x1f, 0xae, 0x60, 0xd1},
+ {0x0, 0xb2, 0x79, 0xcb, 0xf2, 0x40, 0x8b, 0x39, 0xf9, 0x4b, 0x80, 0x32, 0xb, 0xb9, 0x72, 0xc0},
+ {0x0, 0xb3, 0x7b, 0xc8, 0xf6, 0x45, 0x8d, 0x3e, 0xf1, 0x42, 0x8a, 0x39, 0x7, 0xb4, 0x7c, 0xcf},
+ {0x0, 0xb4, 0x75, 0xc1, 0xea, 0x5e, 0x9f, 0x2b, 0xc9, 0x7d, 0xbc, 0x8, 0x23, 0x97, 0x56, 0xe2},
+ {0x0, 0xb5, 0x77, 0xc2, 0xee, 0x5b, 0x99, 0x2c, 0xc1, 0x74, 0xb6, 0x3, 0x2f, 0x9a, 0x58, 0xed},
+ {0x0, 0xb6, 0x71, 0xc7, 0xe2, 0x54, 0x93, 0x25, 0xd9, 0x6f, 0xa8, 0x1e, 0x3b, 0x8d, 0x4a, 0xfc},
+ {0x0, 0xb7, 0x73, 0xc4, 0xe6, 0x51, 0x95, 0x22, 0xd1, 0x66, 0xa2, 0x15, 0x37, 0x80, 0x44, 0xf3},
+ {0x0, 0xb8, 0x6d, 0xd5, 0xda, 0x62, 0xb7, 0xf, 0xa9, 0x11, 0xc4, 0x7c, 0x73, 0xcb, 0x1e, 0xa6},
+ {0x0, 0xb9, 0x6f, 0xd6, 0xde, 0x67, 0xb1, 0x8, 0xa1, 0x18, 0xce, 0x77, 0x7f, 0xc6, 0x10, 0xa9},
+ {0x0, 0xba, 0x69, 0xd3, 0xd2, 0x68, 0xbb, 0x1, 0xb9, 0x3, 0xd0, 0x6a, 0x6b, 0xd1, 0x2, 0xb8},
+ {0x0, 0xbb, 0x6b, 0xd0, 0xd6, 0x6d, 0xbd, 0x6, 0xb1, 0xa, 0xda, 0x61, 0x67, 0xdc, 0xc, 0xb7},
+ {0x0, 0xbc, 0x65, 0xd9, 0xca, 0x76, 0xaf, 0x13, 0x89, 0x35, 0xec, 0x50, 0x43, 0xff, 0x26, 0x9a},
+ {0x0, 0xbd, 0x67, 0xda, 0xce, 0x73, 0xa9, 0x14, 0x81, 0x3c, 0xe6, 0x5b, 0x4f, 0xf2, 0x28, 0x95},
+ {0x0, 0xbe, 0x61, 0xdf, 0xc2, 0x7c, 0xa3, 0x1d, 0x99, 0x27, 0xf8, 0x46, 0x5b, 0xe5, 0x3a, 0x84},
+ {0x0, 0xbf, 0x63, 0xdc, 0xc6, 0x79, 0xa5, 0x1a, 0x91, 0x2e, 0xf2, 0x4d, 0x57, 0xe8, 0x34, 0x8b},
+ {0x0, 0xc0, 0x9d, 0x5d, 0x27, 0xe7, 0xba, 0x7a, 0x4e, 0x8e, 0xd3, 0x13, 0x69, 0xa9, 0xf4, 0x34},
+ {0x0, 0xc1, 0x9f, 0x5e, 0x23, 0xe2, 0xbc, 0x7d, 0x46, 0x87, 0xd9, 0x18, 0x65, 0xa4, 0xfa, 0x3b},
+ {0x0, 0xc2, 0x99, 0x5b, 0x2f, 0xed, 0xb6, 0x74, 0x5e, 0x9c, 0xc7, 0x5, 0x71, 0xb3, 0xe8, 0x2a},
+ {0x0, 0xc3, 0x9b, 0x58, 0x2b, 0xe8, 0xb0, 0x73, 0x56, 0x95, 0xcd, 0xe, 0x7d, 0xbe, 0xe6, 0x25},
+ {0x0, 0xc4, 0x95, 0x51, 0x37, 0xf3, 0xa2, 0x66, 0x6e, 0xaa, 0xfb, 0x3f, 0x59, 0x9d, 0xcc, 0x8},
+ {0x0, 0xc5, 0x97, 0x52, 0x33, 0xf6, 0xa4, 0x61, 0x66, 0xa3, 0xf1, 0x34, 0x55, 0x90, 0xc2, 0x7},
+ {0x0, 0xc6, 0x91, 0x57, 0x3f, 0xf9, 0xae, 0x68, 0x7e, 0xb8, 0xef, 0x29, 0x41, 0x87, 0xd0, 0x16},
+ {0x0, 0xc7, 0x93, 0x54, 0x3b, 0xfc, 0xa8, 0x6f, 0x76, 0xb1, 0xe5, 0x22, 0x4d, 0x8a, 0xde, 0x19},
+ {0x0, 0xc8, 0x8d, 0x45, 0x7, 0xcf, 0x8a, 0x42, 0xe, 0xc6, 0x83, 0x4b, 0x9, 0xc1, 0x84, 0x4c},
+ {0x0, 0xc9, 0x8f, 0x46, 0x3, 0xca, 0x8c, 0x45, 0x6, 0xcf, 0x89, 0x40, 0x5, 0xcc, 0x8a, 0x43},
+ {0x0, 0xca, 0x89, 0x43, 0xf, 0xc5, 0x86, 0x4c, 0x1e, 0xd4, 0x97, 0x5d, 0x11, 0xdb, 0x98, 0x52},
+ {0x0, 0xcb, 0x8b, 0x40, 0xb, 0xc0, 0x80, 0x4b, 0x16, 0xdd, 0x9d, 0x56, 0x1d, 0xd6, 0x96, 0x5d},
+ {0x0, 0xcc, 0x85, 0x49, 0x17, 0xdb, 0x92, 0x5e, 0x2e, 0xe2, 0xab, 0x67, 0x39, 0xf5, 0xbc, 0x70},
+ {0x0, 0xcd, 0x87, 0x4a, 0x13, 0xde, 0x94, 0x59, 0x26, 0xeb, 0xa1, 0x6c, 0x35, 0xf8, 0xb2, 0x7f},
+ {0x0, 0xce, 0x81, 0x4f, 0x1f, 0xd1, 0x9e, 0x50, 0x3e, 0xf0, 0xbf, 0x71, 0x21, 0xef, 0xa0, 0x6e},
+ {0x0, 0xcf, 0x83, 0x4c, 0x1b, 0xd4, 0x98, 0x57, 0x36, 0xf9, 0xb5, 0x7a, 0x2d, 0xe2, 0xae, 0x61},
+ {0x0, 0xd0, 0xbd, 0x6d, 0x67, 0xb7, 0xda, 0xa, 0xce, 0x1e, 0x73, 0xa3, 0xa9, 0x79, 0x14, 0xc4},
+ {0x0, 0xd1, 0xbf, 0x6e, 0x63, 0xb2, 0xdc, 0xd, 0xc6, 0x17, 0x79, 0xa8, 0xa5, 0x74, 0x1a, 0xcb},
+ {0x0, 0xd2, 0xb9, 0x6b, 0x6f, 0xbd, 0xd6, 0x4, 0xde, 0xc, 0x67, 0xb5, 0xb1, 0x63, 0x8, 0xda},
+ {0x0, 0xd3, 0xbb, 0x68, 0x6b, 0xb8, 0xd0, 0x3, 0xd6, 0x5, 0x6d, 0xbe, 0xbd, 0x6e, 0x6, 0xd5},
+ {0x0, 0xd4, 0xb5, 0x61, 0x77, 0xa3, 0xc2, 0x16, 0xee, 0x3a, 0x5b, 0x8f, 0x99, 0x4d, 0x2c, 0xf8},
+ {0x0, 0xd5, 0xb7, 0x62, 0x73, 0xa6, 0xc4, 0x11, 0xe6, 0x33, 0x51, 0x84, 0x95, 0x40, 0x22, 0xf7},
+ {0x0, 0xd6, 0xb1, 0x67, 0x7f, 0xa9, 0xce, 0x18, 0xfe, 0x28, 0x4f, 0x99, 0x81, 0x57, 0x30, 0xe6},
+ {0x0, 0xd7, 0xb3, 0x64, 0x7b, 0xac, 0xc8, 0x1f, 0xf6, 0x21, 0x45, 0x92, 0x8d, 0x5a, 0x3e, 0xe9},
+ {0x0, 0xd8, 0xad, 0x75, 0x47, 0x9f, 0xea, 0x32, 0x8e, 0x56, 0x23, 0xfb, 0xc9, 0x11, 0x64, 0xbc},
+ {0x0, 0xd9, 0xaf, 0x76, 0x43, 0x9a, 0xec, 0x35, 0x86, 0x5f, 0x29, 0xf0, 0xc5, 0x1c, 0x6a, 0xb3},
+ {0x0, 0xda, 0xa9, 0x73, 0x4f, 0x95, 0xe6, 0x3c, 0x9e, 0x44, 0x37, 0xed, 0xd1, 0xb, 0x78, 0xa2},
+ {0x0, 0xdb, 0xab, 0x70, 0x4b, 0x90, 0xe0, 0x3b, 0x96, 0x4d, 0x3d, 0xe6, 0xdd, 0x6, 0x76, 0xad},
+ {0x0, 0xdc, 0xa5, 0x79, 0x57, 0x8b, 0xf2, 0x2e, 0xae, 0x72, 0xb, 0xd7, 0xf9, 0x25, 0x5c, 0x80},
+ {0x0, 0xdd, 0xa7, 0x7a, 0x53, 0x8e, 0xf4, 0x29, 0xa6, 0x7b, 0x1, 0xdc, 0xf5, 0x28, 0x52, 0x8f},
+ {0x0, 0xde, 0xa1, 0x7f, 0x5f, 0x81, 0xfe, 0x20, 0xbe, 0x60, 0x1f, 0xc1, 0xe1, 0x3f, 0x40, 0x9e},
+ {0x0, 0xdf, 0xa3, 0x7c, 0x5b, 0x84, 0xf8, 0x27, 0xb6, 0x69, 0x15, 0xca, 0xed, 0x32, 0x4e, 0x91},
+ {0x0, 0xe0, 0xdd, 0x3d, 0xa7, 0x47, 0x7a, 0x9a, 0x53, 0xb3, 0x8e, 0x6e, 0xf4, 0x14, 0x29, 0xc9},
+ {0x0, 0xe1, 0xdf, 0x3e, 0xa3, 0x42, 0x7c, 0x9d, 0x5b, 0xba, 0x84, 0x65, 0xf8, 0x19, 0x27, 0xc6},
+ {0x0, 0xe2, 0xd9, 0x3b, 0xaf, 0x4d, 0x76, 0x94, 0x43, 0xa1, 0x9a, 0x78, 0xec, 0xe, 0x35, 0xd7},
+ {0x0, 0xe3, 0xdb, 0x38, 0xab, 0x48, 0x70, 0x93, 0x4b, 0xa8, 0x90, 0x73, 0xe0, 0x3, 0x3b, 0xd8},
+ {0x0, 0xe4, 0xd5, 0x31, 0xb7, 0x53, 0x62, 0x86, 0x73, 0x97, 0xa6, 0x42, 0xc4, 0x20, 0x11, 0xf5},
+ {0x0, 0xe5, 0xd7, 0x32, 0xb3, 0x56, 0x64, 0x81, 0x7b, 0x9e, 0xac, 0x49, 0xc8, 0x2d, 0x1f, 0xfa},
+ {0x0, 0xe6, 0xd1, 0x37, 0xbf, 0x59, 0x6e, 0x88, 0x63, 0x85, 0xb2, 0x54, 0xdc, 0x3a, 0xd, 0xeb},
+ {0x0, 0xe7, 0xd3, 0x34, 0xbb, 0x5c, 0x68, 0x8f, 0x6b, 0x8c, 0xb8, 0x5f, 0xd0, 0x37, 0x3, 0xe4},
+ {0x0, 0xe8, 0xcd, 0x25, 0x87, 0x6f, 0x4a, 0xa2, 0x13, 0xfb, 0xde, 0x36, 0x94, 0x7c, 0x59, 0xb1},
+ {0x0, 0xe9, 0xcf, 0x26, 0x83, 0x6a, 0x4c, 0xa5, 0x1b, 0xf2, 0xd4, 0x3d, 0x98, 0x71, 0x57, 0xbe},
+ {0x0, 0xea, 0xc9, 0x23, 0x8f, 0x65, 0x46, 0xac, 0x3, 0xe9, 0xca, 0x20, 0x8c, 0x66, 0x45, 0xaf},
+ {0x0, 0xeb, 0xcb, 0x20, 0x8b, 0x60, 0x40, 0xab, 0xb, 0xe0, 0xc0, 0x2b, 0x80, 0x6b, 0x4b, 0xa0},
+ {0x0, 0xec, 0xc5, 0x29, 0x97, 0x7b, 0x52, 0xbe, 0x33, 0xdf, 0xf6, 0x1a, 0xa4, 0x48, 0x61, 0x8d},
+ {0x0, 0xed, 0xc7, 0x2a, 0x93, 0x7e, 0x54, 0xb9, 0x3b, 0xd6, 0xfc, 0x11, 0xa8, 0x45, 0x6f, 0x82},
+ {0x0, 0xee, 0xc1, 0x2f, 0x9f, 0x71, 0x5e, 0xb0, 0x23, 0xcd, 0xe2, 0xc, 0xbc, 0x52, 0x7d, 0x93},
+ {0x0, 0xef, 0xc3, 0x2c, 0x9b, 0x74, 0x58, 0xb7, 0x2b, 0xc4, 0xe8, 0x7, 0xb0, 0x5f, 0x73, 0x9c},
+ {0x0, 0xf0, 0xfd, 0xd, 0xe7, 0x17, 0x1a, 0xea, 0xd3, 0x23, 0x2e, 0xde, 0x34, 0xc4, 0xc9, 0x39},
+ {0x0, 0xf1, 0xff, 0xe, 0xe3, 0x12, 0x1c, 0xed, 0xdb, 0x2a, 0x24, 0xd5, 0x38, 0xc9, 0xc7, 0x36},
+ {0x0, 0xf2, 0xf9, 0xb, 0xef, 0x1d, 0x16, 0xe4, 0xc3, 0x31, 0x3a, 0xc8, 0x2c, 0xde, 0xd5, 0x27},
+ {0x0, 0xf3, 0xfb, 0x8, 0xeb, 0x18, 0x10, 0xe3, 0xcb, 0x38, 0x30, 0xc3, 0x20, 0xd3, 0xdb, 0x28},
+ {0x0, 0xf4, 0xf5, 0x1, 0xf7, 0x3, 0x2, 0xf6, 0xf3, 0x7, 0x6, 0xf2, 0x4, 0xf0, 0xf1, 0x5},
+ {0x0, 0xf5, 0xf7, 0x2, 0xf3, 0x6, 0x4, 0xf1, 0xfb, 0xe, 0xc, 0xf9, 0x8, 0xfd, 0xff, 0xa},
+ {0x0, 0xf6, 0xf1, 0x7, 0xff, 0x9, 0xe, 0xf8, 0xe3, 0x15, 0x12, 0xe4, 0x1c, 0xea, 0xed, 0x1b},
+ {0x0, 0xf7, 0xf3, 0x4, 0xfb, 0xc, 0x8, 0xff, 0xeb, 0x1c, 0x18, 0xef, 0x10, 0xe7, 0xe3, 0x14},
+ {0x0, 0xf8, 0xed, 0x15, 0xc7, 0x3f, 0x2a, 0xd2, 0x93, 0x6b, 0x7e, 0x86, 0x54, 0xac, 0xb9, 0x41},
+ {0x0, 0xf9, 0xef, 0x16, 0xc3, 0x3a, 0x2c, 0xd5, 0x9b, 0x62, 0x74, 0x8d, 0x58, 0xa1, 0xb7, 0x4e},
+ {0x0, 0xfa, 0xe9, 0x13, 0xcf, 0x35, 0x26, 0xdc, 0x83, 0x79, 0x6a, 0x90, 0x4c, 0xb6, 0xa5, 0x5f},
+ {0x0, 0xfb, 0xeb, 0x10, 0xcb, 0x30, 0x20, 0xdb, 0x8b, 0x70, 0x60, 0x9b, 0x40, 0xbb, 0xab, 0x50},
+ {0x0, 0xfc, 0xe5, 0x19, 0xd7, 0x2b, 0x32, 0xce, 0xb3, 0x4f, 0x56, 0xaa, 0x64, 0x98, 0x81, 0x7d},
+ {0x0, 0xfd, 0xe7, 0x1a, 0xd3, 0x2e, 0x34, 0xc9, 0xbb, 0x46, 0x5c, 0xa1, 0x68, 0x95, 0x8f, 0x72},
+ {0x0, 0xfe, 0xe1, 0x1f, 0xdf, 0x21, 0x3e, 0xc0, 0xa3, 0x5d, 0x42, 0xbc, 0x7c, 0x82, 0x9d, 0x63},
+ {0x0, 0xff, 0xe3, 0x1c, 0xdb, 0x24, 0x38, 0xc7, 0xab, 0x54, 0x48, 0xb7, 0x70, 0x8f, 0x93, 0x6c}}
+var mulTableHigh = [256][16]uint8{{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
+ {0x0, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, 0x90, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0},
+ {0x0, 0x20, 0x40, 0x60, 0x80, 0xa0, 0xc0, 0xe0, 0x1d, 0x3d, 0x5d, 0x7d, 0x9d, 0xbd, 0xdd, 0xfd},
+ {0x0, 0x30, 0x60, 0x50, 0xc0, 0xf0, 0xa0, 0x90, 0x9d, 0xad, 0xfd, 0xcd, 0x5d, 0x6d, 0x3d, 0xd},
+ {0x0, 0x40, 0x80, 0xc0, 0x1d, 0x5d, 0x9d, 0xdd, 0x3a, 0x7a, 0xba, 0xfa, 0x27, 0x67, 0xa7, 0xe7},
+ {0x0, 0x50, 0xa0, 0xf0, 0x5d, 0xd, 0xfd, 0xad, 0xba, 0xea, 0x1a, 0x4a, 0xe7, 0xb7, 0x47, 0x17},
+ {0x0, 0x60, 0xc0, 0xa0, 0x9d, 0xfd, 0x5d, 0x3d, 0x27, 0x47, 0xe7, 0x87, 0xba, 0xda, 0x7a, 0x1a},
+ {0x0, 0x70, 0xe0, 0x90, 0xdd, 0xad, 0x3d, 0x4d, 0xa7, 0xd7, 0x47, 0x37, 0x7a, 0xa, 0x9a, 0xea},
+ {0x0, 0x80, 0x1d, 0x9d, 0x3a, 0xba, 0x27, 0xa7, 0x74, 0xf4, 0x69, 0xe9, 0x4e, 0xce, 0x53, 0xd3},
+ {0x0, 0x90, 0x3d, 0xad, 0x7a, 0xea, 0x47, 0xd7, 0xf4, 0x64, 0xc9, 0x59, 0x8e, 0x1e, 0xb3, 0x23},
+ {0x0, 0xa0, 0x5d, 0xfd, 0xba, 0x1a, 0xe7, 0x47, 0x69, 0xc9, 0x34, 0x94, 0xd3, 0x73, 0x8e, 0x2e},
+ {0x0, 0xb0, 0x7d, 0xcd, 0xfa, 0x4a, 0x87, 0x37, 0xe9, 0x59, 0x94, 0x24, 0x13, 0xa3, 0x6e, 0xde},
+ {0x0, 0xc0, 0x9d, 0x5d, 0x27, 0xe7, 0xba, 0x7a, 0x4e, 0x8e, 0xd3, 0x13, 0x69, 0xa9, 0xf4, 0x34},
+ {0x0, 0xd0, 0xbd, 0x6d, 0x67, 0xb7, 0xda, 0xa, 0xce, 0x1e, 0x73, 0xa3, 0xa9, 0x79, 0x14, 0xc4},
+ {0x0, 0xe0, 0xdd, 0x3d, 0xa7, 0x47, 0x7a, 0x9a, 0x53, 0xb3, 0x8e, 0x6e, 0xf4, 0x14, 0x29, 0xc9},
+ {0x0, 0xf0, 0xfd, 0xd, 0xe7, 0x17, 0x1a, 0xea, 0xd3, 0x23, 0x2e, 0xde, 0x34, 0xc4, 0xc9, 0x39},
+ {0x0, 0x1d, 0x3a, 0x27, 0x74, 0x69, 0x4e, 0x53, 0xe8, 0xf5, 0xd2, 0xcf, 0x9c, 0x81, 0xa6, 0xbb},
+ {0x0, 0xd, 0x1a, 0x17, 0x34, 0x39, 0x2e, 0x23, 0x68, 0x65, 0x72, 0x7f, 0x5c, 0x51, 0x46, 0x4b},
+ {0x0, 0x3d, 0x7a, 0x47, 0xf4, 0xc9, 0x8e, 0xb3, 0xf5, 0xc8, 0x8f, 0xb2, 0x1, 0x3c, 0x7b, 0x46},
+ {0x0, 0x2d, 0x5a, 0x77, 0xb4, 0x99, 0xee, 0xc3, 0x75, 0x58, 0x2f, 0x2, 0xc1, 0xec, 0x9b, 0xb6},
+ {0x0, 0x5d, 0xba, 0xe7, 0x69, 0x34, 0xd3, 0x8e, 0xd2, 0x8f, 0x68, 0x35, 0xbb, 0xe6, 0x1, 0x5c},
+ {0x0, 0x4d, 0x9a, 0xd7, 0x29, 0x64, 0xb3, 0xfe, 0x52, 0x1f, 0xc8, 0x85, 0x7b, 0x36, 0xe1, 0xac},
+ {0x0, 0x7d, 0xfa, 0x87, 0xe9, 0x94, 0x13, 0x6e, 0xcf, 0xb2, 0x35, 0x48, 0x26, 0x5b, 0xdc, 0xa1},
+ {0x0, 0x6d, 0xda, 0xb7, 0xa9, 0xc4, 0x73, 0x1e, 0x4f, 0x22, 0x95, 0xf8, 0xe6, 0x8b, 0x3c, 0x51},
+ {0x0, 0x9d, 0x27, 0xba, 0x4e, 0xd3, 0x69, 0xf4, 0x9c, 0x1, 0xbb, 0x26, 0xd2, 0x4f, 0xf5, 0x68},
+ {0x0, 0x8d, 0x7, 0x8a, 0xe, 0x83, 0x9, 0x84, 0x1c, 0x91, 0x1b, 0x96, 0x12, 0x9f, 0x15, 0x98},
+ {0x0, 0xbd, 0x67, 0xda, 0xce, 0x73, 0xa9, 0x14, 0x81, 0x3c, 0xe6, 0x5b, 0x4f, 0xf2, 0x28, 0x95},
+ {0x0, 0xad, 0x47, 0xea, 0x8e, 0x23, 0xc9, 0x64, 0x1, 0xac, 0x46, 0xeb, 0x8f, 0x22, 0xc8, 0x65},
+ {0x0, 0xdd, 0xa7, 0x7a, 0x53, 0x8e, 0xf4, 0x29, 0xa6, 0x7b, 0x1, 0xdc, 0xf5, 0x28, 0x52, 0x8f},
+ {0x0, 0xcd, 0x87, 0x4a, 0x13, 0xde, 0x94, 0x59, 0x26, 0xeb, 0xa1, 0x6c, 0x35, 0xf8, 0xb2, 0x7f},
+ {0x0, 0xfd, 0xe7, 0x1a, 0xd3, 0x2e, 0x34, 0xc9, 0xbb, 0x46, 0x5c, 0xa1, 0x68, 0x95, 0x8f, 0x72},
+ {0x0, 0xed, 0xc7, 0x2a, 0x93, 0x7e, 0x54, 0xb9, 0x3b, 0xd6, 0xfc, 0x11, 0xa8, 0x45, 0x6f, 0x82},
+ {0x0, 0x3a, 0x74, 0x4e, 0xe8, 0xd2, 0x9c, 0xa6, 0xcd, 0xf7, 0xb9, 0x83, 0x25, 0x1f, 0x51, 0x6b},
+ {0x0, 0x2a, 0x54, 0x7e, 0xa8, 0x82, 0xfc, 0xd6, 0x4d, 0x67, 0x19, 0x33, 0xe5, 0xcf, 0xb1, 0x9b},
+ {0x0, 0x1a, 0x34, 0x2e, 0x68, 0x72, 0x5c, 0x46, 0xd0, 0xca, 0xe4, 0xfe, 0xb8, 0xa2, 0x8c, 0x96},
+ {0x0, 0xa, 0x14, 0x1e, 0x28, 0x22, 0x3c, 0x36, 0x50, 0x5a, 0x44, 0x4e, 0x78, 0x72, 0x6c, 0x66},
+ {0x0, 0x7a, 0xf4, 0x8e, 0xf5, 0x8f, 0x1, 0x7b, 0xf7, 0x8d, 0x3, 0x79, 0x2, 0x78, 0xf6, 0x8c},
+ {0x0, 0x6a, 0xd4, 0xbe, 0xb5, 0xdf, 0x61, 0xb, 0x77, 0x1d, 0xa3, 0xc9, 0xc2, 0xa8, 0x16, 0x7c},
+ {0x0, 0x5a, 0xb4, 0xee, 0x75, 0x2f, 0xc1, 0x9b, 0xea, 0xb0, 0x5e, 0x4, 0x9f, 0xc5, 0x2b, 0x71},
+ {0x0, 0x4a, 0x94, 0xde, 0x35, 0x7f, 0xa1, 0xeb, 0x6a, 0x20, 0xfe, 0xb4, 0x5f, 0x15, 0xcb, 0x81},
+ {0x0, 0xba, 0x69, 0xd3, 0xd2, 0x68, 0xbb, 0x1, 0xb9, 0x3, 0xd0, 0x6a, 0x6b, 0xd1, 0x2, 0xb8},
+ {0x0, 0xaa, 0x49, 0xe3, 0x92, 0x38, 0xdb, 0x71, 0x39, 0x93, 0x70, 0xda, 0xab, 0x1, 0xe2, 0x48},
+ {0x0, 0x9a, 0x29, 0xb3, 0x52, 0xc8, 0x7b, 0xe1, 0xa4, 0x3e, 0x8d, 0x17, 0xf6, 0x6c, 0xdf, 0x45},
+ {0x0, 0x8a, 0x9, 0x83, 0x12, 0x98, 0x1b, 0x91, 0x24, 0xae, 0x2d, 0xa7, 0x36, 0xbc, 0x3f, 0xb5},
+ {0x0, 0xfa, 0xe9, 0x13, 0xcf, 0x35, 0x26, 0xdc, 0x83, 0x79, 0x6a, 0x90, 0x4c, 0xb6, 0xa5, 0x5f},
+ {0x0, 0xea, 0xc9, 0x23, 0x8f, 0x65, 0x46, 0xac, 0x3, 0xe9, 0xca, 0x20, 0x8c, 0x66, 0x45, 0xaf},
+ {0x0, 0xda, 0xa9, 0x73, 0x4f, 0x95, 0xe6, 0x3c, 0x9e, 0x44, 0x37, 0xed, 0xd1, 0xb, 0x78, 0xa2},
+ {0x0, 0xca, 0x89, 0x43, 0xf, 0xc5, 0x86, 0x4c, 0x1e, 0xd4, 0x97, 0x5d, 0x11, 0xdb, 0x98, 0x52},
+ {0x0, 0x27, 0x4e, 0x69, 0x9c, 0xbb, 0xd2, 0xf5, 0x25, 0x2, 0x6b, 0x4c, 0xb9, 0x9e, 0xf7, 0xd0},
+ {0x0, 0x37, 0x6e, 0x59, 0xdc, 0xeb, 0xb2, 0x85, 0xa5, 0x92, 0xcb, 0xfc, 0x79, 0x4e, 0x17, 0x20},
+ {0x0, 0x7, 0xe, 0x9, 0x1c, 0x1b, 0x12, 0x15, 0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d},
+ {0x0, 0x17, 0x2e, 0x39, 0x5c, 0x4b, 0x72, 0x65, 0xb8, 0xaf, 0x96, 0x81, 0xe4, 0xf3, 0xca, 0xdd},
+ {0x0, 0x67, 0xce, 0xa9, 0x81, 0xe6, 0x4f, 0x28, 0x1f, 0x78, 0xd1, 0xb6, 0x9e, 0xf9, 0x50, 0x37},
+ {0x0, 0x77, 0xee, 0x99, 0xc1, 0xb6, 0x2f, 0x58, 0x9f, 0xe8, 0x71, 0x6, 0x5e, 0x29, 0xb0, 0xc7},
+ {0x0, 0x47, 0x8e, 0xc9, 0x1, 0x46, 0x8f, 0xc8, 0x2, 0x45, 0x8c, 0xcb, 0x3, 0x44, 0x8d, 0xca},
+ {0x0, 0x57, 0xae, 0xf9, 0x41, 0x16, 0xef, 0xb8, 0x82, 0xd5, 0x2c, 0x7b, 0xc3, 0x94, 0x6d, 0x3a},
+ {0x0, 0xa7, 0x53, 0xf4, 0xa6, 0x1, 0xf5, 0x52, 0x51, 0xf6, 0x2, 0xa5, 0xf7, 0x50, 0xa4, 0x3},
+ {0x0, 0xb7, 0x73, 0xc4, 0xe6, 0x51, 0x95, 0x22, 0xd1, 0x66, 0xa2, 0x15, 0x37, 0x80, 0x44, 0xf3},
+ {0x0, 0x87, 0x13, 0x94, 0x26, 0xa1, 0x35, 0xb2, 0x4c, 0xcb, 0x5f, 0xd8, 0x6a, 0xed, 0x79, 0xfe},
+ {0x0, 0x97, 0x33, 0xa4, 0x66, 0xf1, 0x55, 0xc2, 0xcc, 0x5b, 0xff, 0x68, 0xaa, 0x3d, 0x99, 0xe},
+ {0x0, 0xe7, 0xd3, 0x34, 0xbb, 0x5c, 0x68, 0x8f, 0x6b, 0x8c, 0xb8, 0x5f, 0xd0, 0x37, 0x3, 0xe4},
+ {0x0, 0xf7, 0xf3, 0x4, 0xfb, 0xc, 0x8, 0xff, 0xeb, 0x1c, 0x18, 0xef, 0x10, 0xe7, 0xe3, 0x14},
+ {0x0, 0xc7, 0x93, 0x54, 0x3b, 0xfc, 0xa8, 0x6f, 0x76, 0xb1, 0xe5, 0x22, 0x4d, 0x8a, 0xde, 0x19},
+ {0x0, 0xd7, 0xb3, 0x64, 0x7b, 0xac, 0xc8, 0x1f, 0xf6, 0x21, 0x45, 0x92, 0x8d, 0x5a, 0x3e, 0xe9},
+ {0x0, 0x74, 0xe8, 0x9c, 0xcd, 0xb9, 0x25, 0x51, 0x87, 0xf3, 0x6f, 0x1b, 0x4a, 0x3e, 0xa2, 0xd6},
+ {0x0, 0x64, 0xc8, 0xac, 0x8d, 0xe9, 0x45, 0x21, 0x7, 0x63, 0xcf, 0xab, 0x8a, 0xee, 0x42, 0x26},
+ {0x0, 0x54, 0xa8, 0xfc, 0x4d, 0x19, 0xe5, 0xb1, 0x9a, 0xce, 0x32, 0x66, 0xd7, 0x83, 0x7f, 0x2b},
+ {0x0, 0x44, 0x88, 0xcc, 0xd, 0x49, 0x85, 0xc1, 0x1a, 0x5e, 0x92, 0xd6, 0x17, 0x53, 0x9f, 0xdb},
+ {0x0, 0x34, 0x68, 0x5c, 0xd0, 0xe4, 0xb8, 0x8c, 0xbd, 0x89, 0xd5, 0xe1, 0x6d, 0x59, 0x5, 0x31},
+ {0x0, 0x24, 0x48, 0x6c, 0x90, 0xb4, 0xd8, 0xfc, 0x3d, 0x19, 0x75, 0x51, 0xad, 0x89, 0xe5, 0xc1},
+ {0x0, 0x14, 0x28, 0x3c, 0x50, 0x44, 0x78, 0x6c, 0xa0, 0xb4, 0x88, 0x9c, 0xf0, 0xe4, 0xd8, 0xcc},
+ {0x0, 0x4, 0x8, 0xc, 0x10, 0x14, 0x18, 0x1c, 0x20, 0x24, 0x28, 0x2c, 0x30, 0x34, 0x38, 0x3c},
+ {0x0, 0xf4, 0xf5, 0x1, 0xf7, 0x3, 0x2, 0xf6, 0xf3, 0x7, 0x6, 0xf2, 0x4, 0xf0, 0xf1, 0x5},
+ {0x0, 0xe4, 0xd5, 0x31, 0xb7, 0x53, 0x62, 0x86, 0x73, 0x97, 0xa6, 0x42, 0xc4, 0x20, 0x11, 0xf5},
+ {0x0, 0xd4, 0xb5, 0x61, 0x77, 0xa3, 0xc2, 0x16, 0xee, 0x3a, 0x5b, 0x8f, 0x99, 0x4d, 0x2c, 0xf8},
+ {0x0, 0xc4, 0x95, 0x51, 0x37, 0xf3, 0xa2, 0x66, 0x6e, 0xaa, 0xfb, 0x3f, 0x59, 0x9d, 0xcc, 0x8},
+ {0x0, 0xb4, 0x75, 0xc1, 0xea, 0x5e, 0x9f, 0x2b, 0xc9, 0x7d, 0xbc, 0x8, 0x23, 0x97, 0x56, 0xe2},
+ {0x0, 0xa4, 0x55, 0xf1, 0xaa, 0xe, 0xff, 0x5b, 0x49, 0xed, 0x1c, 0xb8, 0xe3, 0x47, 0xb6, 0x12},
+ {0x0, 0x94, 0x35, 0xa1, 0x6a, 0xfe, 0x5f, 0xcb, 0xd4, 0x40, 0xe1, 0x75, 0xbe, 0x2a, 0x8b, 0x1f},
+ {0x0, 0x84, 0x15, 0x91, 0x2a, 0xae, 0x3f, 0xbb, 0x54, 0xd0, 0x41, 0xc5, 0x7e, 0xfa, 0x6b, 0xef},
+ {0x0, 0x69, 0xd2, 0xbb, 0xb9, 0xd0, 0x6b, 0x2, 0x6f, 0x6, 0xbd, 0xd4, 0xd6, 0xbf, 0x4, 0x6d},
+ {0x0, 0x79, 0xf2, 0x8b, 0xf9, 0x80, 0xb, 0x72, 0xef, 0x96, 0x1d, 0x64, 0x16, 0x6f, 0xe4, 0x9d},
+ {0x0, 0x49, 0x92, 0xdb, 0x39, 0x70, 0xab, 0xe2, 0x72, 0x3b, 0xe0, 0xa9, 0x4b, 0x2, 0xd9, 0x90},
+ {0x0, 0x59, 0xb2, 0xeb, 0x79, 0x20, 0xcb, 0x92, 0xf2, 0xab, 0x40, 0x19, 0x8b, 0xd2, 0x39, 0x60},
+ {0x0, 0x29, 0x52, 0x7b, 0xa4, 0x8d, 0xf6, 0xdf, 0x55, 0x7c, 0x7, 0x2e, 0xf1, 0xd8, 0xa3, 0x8a},
+ {0x0, 0x39, 0x72, 0x4b, 0xe4, 0xdd, 0x96, 0xaf, 0xd5, 0xec, 0xa7, 0x9e, 0x31, 0x8, 0x43, 0x7a},
+ {0x0, 0x9, 0x12, 0x1b, 0x24, 0x2d, 0x36, 0x3f, 0x48, 0x41, 0x5a, 0x53, 0x6c, 0x65, 0x7e, 0x77},
+ {0x0, 0x19, 0x32, 0x2b, 0x64, 0x7d, 0x56, 0x4f, 0xc8, 0xd1, 0xfa, 0xe3, 0xac, 0xb5, 0x9e, 0x87},
+ {0x0, 0xe9, 0xcf, 0x26, 0x83, 0x6a, 0x4c, 0xa5, 0x1b, 0xf2, 0xd4, 0x3d, 0x98, 0x71, 0x57, 0xbe},
+ {0x0, 0xf9, 0xef, 0x16, 0xc3, 0x3a, 0x2c, 0xd5, 0x9b, 0x62, 0x74, 0x8d, 0x58, 0xa1, 0xb7, 0x4e},
+ {0x0, 0xc9, 0x8f, 0x46, 0x3, 0xca, 0x8c, 0x45, 0x6, 0xcf, 0x89, 0x40, 0x5, 0xcc, 0x8a, 0x43},
+ {0x0, 0xd9, 0xaf, 0x76, 0x43, 0x9a, 0xec, 0x35, 0x86, 0x5f, 0x29, 0xf0, 0xc5, 0x1c, 0x6a, 0xb3},
+ {0x0, 0xa9, 0x4f, 0xe6, 0x9e, 0x37, 0xd1, 0x78, 0x21, 0x88, 0x6e, 0xc7, 0xbf, 0x16, 0xf0, 0x59},
+ {0x0, 0xb9, 0x6f, 0xd6, 0xde, 0x67, 0xb1, 0x8, 0xa1, 0x18, 0xce, 0x77, 0x7f, 0xc6, 0x10, 0xa9},
+ {0x0, 0x89, 0xf, 0x86, 0x1e, 0x97, 0x11, 0x98, 0x3c, 0xb5, 0x33, 0xba, 0x22, 0xab, 0x2d, 0xa4},
+ {0x0, 0x99, 0x2f, 0xb6, 0x5e, 0xc7, 0x71, 0xe8, 0xbc, 0x25, 0x93, 0xa, 0xe2, 0x7b, 0xcd, 0x54},
+ {0x0, 0x4e, 0x9c, 0xd2, 0x25, 0x6b, 0xb9, 0xf7, 0x4a, 0x4, 0xd6, 0x98, 0x6f, 0x21, 0xf3, 0xbd},
+ {0x0, 0x5e, 0xbc, 0xe2, 0x65, 0x3b, 0xd9, 0x87, 0xca, 0x94, 0x76, 0x28, 0xaf, 0xf1, 0x13, 0x4d},
+ {0x0, 0x6e, 0xdc, 0xb2, 0xa5, 0xcb, 0x79, 0x17, 0x57, 0x39, 0x8b, 0xe5, 0xf2, 0x9c, 0x2e, 0x40},
+ {0x0, 0x7e, 0xfc, 0x82, 0xe5, 0x9b, 0x19, 0x67, 0xd7, 0xa9, 0x2b, 0x55, 0x32, 0x4c, 0xce, 0xb0},
+ {0x0, 0xe, 0x1c, 0x12, 0x38, 0x36, 0x24, 0x2a, 0x70, 0x7e, 0x6c, 0x62, 0x48, 0x46, 0x54, 0x5a},
+ {0x0, 0x1e, 0x3c, 0x22, 0x78, 0x66, 0x44, 0x5a, 0xf0, 0xee, 0xcc, 0xd2, 0x88, 0x96, 0xb4, 0xaa},
+ {0x0, 0x2e, 0x5c, 0x72, 0xb8, 0x96, 0xe4, 0xca, 0x6d, 0x43, 0x31, 0x1f, 0xd5, 0xfb, 0x89, 0xa7},
+ {0x0, 0x3e, 0x7c, 0x42, 0xf8, 0xc6, 0x84, 0xba, 0xed, 0xd3, 0x91, 0xaf, 0x15, 0x2b, 0x69, 0x57},
+ {0x0, 0xce, 0x81, 0x4f, 0x1f, 0xd1, 0x9e, 0x50, 0x3e, 0xf0, 0xbf, 0x71, 0x21, 0xef, 0xa0, 0x6e},
+ {0x0, 0xde, 0xa1, 0x7f, 0x5f, 0x81, 0xfe, 0x20, 0xbe, 0x60, 0x1f, 0xc1, 0xe1, 0x3f, 0x40, 0x9e},
+ {0x0, 0xee, 0xc1, 0x2f, 0x9f, 0x71, 0x5e, 0xb0, 0x23, 0xcd, 0xe2, 0xc, 0xbc, 0x52, 0x7d, 0x93},
+ {0x0, 0xfe, 0xe1, 0x1f, 0xdf, 0x21, 0x3e, 0xc0, 0xa3, 0x5d, 0x42, 0xbc, 0x7c, 0x82, 0x9d, 0x63},
+ {0x0, 0x8e, 0x1, 0x8f, 0x2, 0x8c, 0x3, 0x8d, 0x4, 0x8a, 0x5, 0x8b, 0x6, 0x88, 0x7, 0x89},
+ {0x0, 0x9e, 0x21, 0xbf, 0x42, 0xdc, 0x63, 0xfd, 0x84, 0x1a, 0xa5, 0x3b, 0xc6, 0x58, 0xe7, 0x79},
+ {0x0, 0xae, 0x41, 0xef, 0x82, 0x2c, 0xc3, 0x6d, 0x19, 0xb7, 0x58, 0xf6, 0x9b, 0x35, 0xda, 0x74},
+ {0x0, 0xbe, 0x61, 0xdf, 0xc2, 0x7c, 0xa3, 0x1d, 0x99, 0x27, 0xf8, 0x46, 0x5b, 0xe5, 0x3a, 0x84},
+ {0x0, 0x53, 0xa6, 0xf5, 0x51, 0x2, 0xf7, 0xa4, 0xa2, 0xf1, 0x4, 0x57, 0xf3, 0xa0, 0x55, 0x6},
+ {0x0, 0x43, 0x86, 0xc5, 0x11, 0x52, 0x97, 0xd4, 0x22, 0x61, 0xa4, 0xe7, 0x33, 0x70, 0xb5, 0xf6},
+ {0x0, 0x73, 0xe6, 0x95, 0xd1, 0xa2, 0x37, 0x44, 0xbf, 0xcc, 0x59, 0x2a, 0x6e, 0x1d, 0x88, 0xfb},
+ {0x0, 0x63, 0xc6, 0xa5, 0x91, 0xf2, 0x57, 0x34, 0x3f, 0x5c, 0xf9, 0x9a, 0xae, 0xcd, 0x68, 0xb},
+ {0x0, 0x13, 0x26, 0x35, 0x4c, 0x5f, 0x6a, 0x79, 0x98, 0x8b, 0xbe, 0xad, 0xd4, 0xc7, 0xf2, 0xe1},
+ {0x0, 0x3, 0x6, 0x5, 0xc, 0xf, 0xa, 0x9, 0x18, 0x1b, 0x1e, 0x1d, 0x14, 0x17, 0x12, 0x11},
+ {0x0, 0x33, 0x66, 0x55, 0xcc, 0xff, 0xaa, 0x99, 0x85, 0xb6, 0xe3, 0xd0, 0x49, 0x7a, 0x2f, 0x1c},
+ {0x0, 0x23, 0x46, 0x65, 0x8c, 0xaf, 0xca, 0xe9, 0x5, 0x26, 0x43, 0x60, 0x89, 0xaa, 0xcf, 0xec},
+ {0x0, 0xd3, 0xbb, 0x68, 0x6b, 0xb8, 0xd0, 0x3, 0xd6, 0x5, 0x6d, 0xbe, 0xbd, 0x6e, 0x6, 0xd5},
+ {0x0, 0xc3, 0x9b, 0x58, 0x2b, 0xe8, 0xb0, 0x73, 0x56, 0x95, 0xcd, 0xe, 0x7d, 0xbe, 0xe6, 0x25},
+ {0x0, 0xf3, 0xfb, 0x8, 0xeb, 0x18, 0x10, 0xe3, 0xcb, 0x38, 0x30, 0xc3, 0x20, 0xd3, 0xdb, 0x28},
+ {0x0, 0xe3, 0xdb, 0x38, 0xab, 0x48, 0x70, 0x93, 0x4b, 0xa8, 0x90, 0x73, 0xe0, 0x3, 0x3b, 0xd8},
+ {0x0, 0x93, 0x3b, 0xa8, 0x76, 0xe5, 0x4d, 0xde, 0xec, 0x7f, 0xd7, 0x44, 0x9a, 0x9, 0xa1, 0x32},
+ {0x0, 0x83, 0x1b, 0x98, 0x36, 0xb5, 0x2d, 0xae, 0x6c, 0xef, 0x77, 0xf4, 0x5a, 0xd9, 0x41, 0xc2},
+ {0x0, 0xb3, 0x7b, 0xc8, 0xf6, 0x45, 0x8d, 0x3e, 0xf1, 0x42, 0x8a, 0x39, 0x7, 0xb4, 0x7c, 0xcf},
+ {0x0, 0xa3, 0x5b, 0xf8, 0xb6, 0x15, 0xed, 0x4e, 0x71, 0xd2, 0x2a, 0x89, 0xc7, 0x64, 0x9c, 0x3f},
+ {0x0, 0xe8, 0xcd, 0x25, 0x87, 0x6f, 0x4a, 0xa2, 0x13, 0xfb, 0xde, 0x36, 0x94, 0x7c, 0x59, 0xb1},
+ {0x0, 0xf8, 0xed, 0x15, 0xc7, 0x3f, 0x2a, 0xd2, 0x93, 0x6b, 0x7e, 0x86, 0x54, 0xac, 0xb9, 0x41},
+ {0x0, 0xc8, 0x8d, 0x45, 0x7, 0xcf, 0x8a, 0x42, 0xe, 0xc6, 0x83, 0x4b, 0x9, 0xc1, 0x84, 0x4c},
+ {0x0, 0xd8, 0xad, 0x75, 0x47, 0x9f, 0xea, 0x32, 0x8e, 0x56, 0x23, 0xfb, 0xc9, 0x11, 0x64, 0xbc},
+ {0x0, 0xa8, 0x4d, 0xe5, 0x9a, 0x32, 0xd7, 0x7f, 0x29, 0x81, 0x64, 0xcc, 0xb3, 0x1b, 0xfe, 0x56},
+ {0x0, 0xb8, 0x6d, 0xd5, 0xda, 0x62, 0xb7, 0xf, 0xa9, 0x11, 0xc4, 0x7c, 0x73, 0xcb, 0x1e, 0xa6},
+ {0x0, 0x88, 0xd, 0x85, 0x1a, 0x92, 0x17, 0x9f, 0x34, 0xbc, 0x39, 0xb1, 0x2e, 0xa6, 0x23, 0xab},
+ {0x0, 0x98, 0x2d, 0xb5, 0x5a, 0xc2, 0x77, 0xef, 0xb4, 0x2c, 0x99, 0x1, 0xee, 0x76, 0xc3, 0x5b},
+ {0x0, 0x68, 0xd0, 0xb8, 0xbd, 0xd5, 0x6d, 0x5, 0x67, 0xf, 0xb7, 0xdf, 0xda, 0xb2, 0xa, 0x62},
+ {0x0, 0x78, 0xf0, 0x88, 0xfd, 0x85, 0xd, 0x75, 0xe7, 0x9f, 0x17, 0x6f, 0x1a, 0x62, 0xea, 0x92},
+ {0x0, 0x48, 0x90, 0xd8, 0x3d, 0x75, 0xad, 0xe5, 0x7a, 0x32, 0xea, 0xa2, 0x47, 0xf, 0xd7, 0x9f},
+ {0x0, 0x58, 0xb0, 0xe8, 0x7d, 0x25, 0xcd, 0x95, 0xfa, 0xa2, 0x4a, 0x12, 0x87, 0xdf, 0x37, 0x6f},
+ {0x0, 0x28, 0x50, 0x78, 0xa0, 0x88, 0xf0, 0xd8, 0x5d, 0x75, 0xd, 0x25, 0xfd, 0xd5, 0xad, 0x85},
+ {0x0, 0x38, 0x70, 0x48, 0xe0, 0xd8, 0x90, 0xa8, 0xdd, 0xe5, 0xad, 0x95, 0x3d, 0x5, 0x4d, 0x75},
+ {0x0, 0x8, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38, 0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78},
+ {0x0, 0x18, 0x30, 0x28, 0x60, 0x78, 0x50, 0x48, 0xc0, 0xd8, 0xf0, 0xe8, 0xa0, 0xb8, 0x90, 0x88},
+ {0x0, 0xf5, 0xf7, 0x2, 0xf3, 0x6, 0x4, 0xf1, 0xfb, 0xe, 0xc, 0xf9, 0x8, 0xfd, 0xff, 0xa},
+ {0x0, 0xe5, 0xd7, 0x32, 0xb3, 0x56, 0x64, 0x81, 0x7b, 0x9e, 0xac, 0x49, 0xc8, 0x2d, 0x1f, 0xfa},
+ {0x0, 0xd5, 0xb7, 0x62, 0x73, 0xa6, 0xc4, 0x11, 0xe6, 0x33, 0x51, 0x84, 0x95, 0x40, 0x22, 0xf7},
+ {0x0, 0xc5, 0x97, 0x52, 0x33, 0xf6, 0xa4, 0x61, 0x66, 0xa3, 0xf1, 0x34, 0x55, 0x90, 0xc2, 0x7},
+ {0x0, 0xb5, 0x77, 0xc2, 0xee, 0x5b, 0x99, 0x2c, 0xc1, 0x74, 0xb6, 0x3, 0x2f, 0x9a, 0x58, 0xed},
+ {0x0, 0xa5, 0x57, 0xf2, 0xae, 0xb, 0xf9, 0x5c, 0x41, 0xe4, 0x16, 0xb3, 0xef, 0x4a, 0xb8, 0x1d},
+ {0x0, 0x95, 0x37, 0xa2, 0x6e, 0xfb, 0x59, 0xcc, 0xdc, 0x49, 0xeb, 0x7e, 0xb2, 0x27, 0x85, 0x10},
+ {0x0, 0x85, 0x17, 0x92, 0x2e, 0xab, 0x39, 0xbc, 0x5c, 0xd9, 0x4b, 0xce, 0x72, 0xf7, 0x65, 0xe0},
+ {0x0, 0x75, 0xea, 0x9f, 0xc9, 0xbc, 0x23, 0x56, 0x8f, 0xfa, 0x65, 0x10, 0x46, 0x33, 0xac, 0xd9},
+ {0x0, 0x65, 0xca, 0xaf, 0x89, 0xec, 0x43, 0x26, 0xf, 0x6a, 0xc5, 0xa0, 0x86, 0xe3, 0x4c, 0x29},
+ {0x0, 0x55, 0xaa, 0xff, 0x49, 0x1c, 0xe3, 0xb6, 0x92, 0xc7, 0x38, 0x6d, 0xdb, 0x8e, 0x71, 0x24},
+ {0x0, 0x45, 0x8a, 0xcf, 0x9, 0x4c, 0x83, 0xc6, 0x12, 0x57, 0x98, 0xdd, 0x1b, 0x5e, 0x91, 0xd4},
+ {0x0, 0x35, 0x6a, 0x5f, 0xd4, 0xe1, 0xbe, 0x8b, 0xb5, 0x80, 0xdf, 0xea, 0x61, 0x54, 0xb, 0x3e},
+ {0x0, 0x25, 0x4a, 0x6f, 0x94, 0xb1, 0xde, 0xfb, 0x35, 0x10, 0x7f, 0x5a, 0xa1, 0x84, 0xeb, 0xce},
+ {0x0, 0x15, 0x2a, 0x3f, 0x54, 0x41, 0x7e, 0x6b, 0xa8, 0xbd, 0x82, 0x97, 0xfc, 0xe9, 0xd6, 0xc3},
+ {0x0, 0x5, 0xa, 0xf, 0x14, 0x11, 0x1e, 0x1b, 0x28, 0x2d, 0x22, 0x27, 0x3c, 0x39, 0x36, 0x33},
+ {0x0, 0xd2, 0xb9, 0x6b, 0x6f, 0xbd, 0xd6, 0x4, 0xde, 0xc, 0x67, 0xb5, 0xb1, 0x63, 0x8, 0xda},
+ {0x0, 0xc2, 0x99, 0x5b, 0x2f, 0xed, 0xb6, 0x74, 0x5e, 0x9c, 0xc7, 0x5, 0x71, 0xb3, 0xe8, 0x2a},
+ {0x0, 0xf2, 0xf9, 0xb, 0xef, 0x1d, 0x16, 0xe4, 0xc3, 0x31, 0x3a, 0xc8, 0x2c, 0xde, 0xd5, 0x27},
+ {0x0, 0xe2, 0xd9, 0x3b, 0xaf, 0x4d, 0x76, 0x94, 0x43, 0xa1, 0x9a, 0x78, 0xec, 0xe, 0x35, 0xd7},
+ {0x0, 0x92, 0x39, 0xab, 0x72, 0xe0, 0x4b, 0xd9, 0xe4, 0x76, 0xdd, 0x4f, 0x96, 0x4, 0xaf, 0x3d},
+ {0x0, 0x82, 0x19, 0x9b, 0x32, 0xb0, 0x2b, 0xa9, 0x64, 0xe6, 0x7d, 0xff, 0x56, 0xd4, 0x4f, 0xcd},
+ {0x0, 0xb2, 0x79, 0xcb, 0xf2, 0x40, 0x8b, 0x39, 0xf9, 0x4b, 0x80, 0x32, 0xb, 0xb9, 0x72, 0xc0},
+ {0x0, 0xa2, 0x59, 0xfb, 0xb2, 0x10, 0xeb, 0x49, 0x79, 0xdb, 0x20, 0x82, 0xcb, 0x69, 0x92, 0x30},
+ {0x0, 0x52, 0xa4, 0xf6, 0x55, 0x7, 0xf1, 0xa3, 0xaa, 0xf8, 0xe, 0x5c, 0xff, 0xad, 0x5b, 0x9},
+ {0x0, 0x42, 0x84, 0xc6, 0x15, 0x57, 0x91, 0xd3, 0x2a, 0x68, 0xae, 0xec, 0x3f, 0x7d, 0xbb, 0xf9},
+ {0x0, 0x72, 0xe4, 0x96, 0xd5, 0xa7, 0x31, 0x43, 0xb7, 0xc5, 0x53, 0x21, 0x62, 0x10, 0x86, 0xf4},
+ {0x0, 0x62, 0xc4, 0xa6, 0x95, 0xf7, 0x51, 0x33, 0x37, 0x55, 0xf3, 0x91, 0xa2, 0xc0, 0x66, 0x4},
+ {0x0, 0x12, 0x24, 0x36, 0x48, 0x5a, 0x6c, 0x7e, 0x90, 0x82, 0xb4, 0xa6, 0xd8, 0xca, 0xfc, 0xee},
+ {0x0, 0x2, 0x4, 0x6, 0x8, 0xa, 0xc, 0xe, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e},
+ {0x0, 0x32, 0x64, 0x56, 0xc8, 0xfa, 0xac, 0x9e, 0x8d, 0xbf, 0xe9, 0xdb, 0x45, 0x77, 0x21, 0x13},
+ {0x0, 0x22, 0x44, 0x66, 0x88, 0xaa, 0xcc, 0xee, 0xd, 0x2f, 0x49, 0x6b, 0x85, 0xa7, 0xc1, 0xe3},
+ {0x0, 0xcf, 0x83, 0x4c, 0x1b, 0xd4, 0x98, 0x57, 0x36, 0xf9, 0xb5, 0x7a, 0x2d, 0xe2, 0xae, 0x61},
+ {0x0, 0xdf, 0xa3, 0x7c, 0x5b, 0x84, 0xf8, 0x27, 0xb6, 0x69, 0x15, 0xca, 0xed, 0x32, 0x4e, 0x91},
+ {0x0, 0xef, 0xc3, 0x2c, 0x9b, 0x74, 0x58, 0xb7, 0x2b, 0xc4, 0xe8, 0x7, 0xb0, 0x5f, 0x73, 0x9c},
+ {0x0, 0xff, 0xe3, 0x1c, 0xdb, 0x24, 0x38, 0xc7, 0xab, 0x54, 0x48, 0xb7, 0x70, 0x8f, 0x93, 0x6c},
+ {0x0, 0x8f, 0x3, 0x8c, 0x6, 0x89, 0x5, 0x8a, 0xc, 0x83, 0xf, 0x80, 0xa, 0x85, 0x9, 0x86},
+ {0x0, 0x9f, 0x23, 0xbc, 0x46, 0xd9, 0x65, 0xfa, 0x8c, 0x13, 0xaf, 0x30, 0xca, 0x55, 0xe9, 0x76},
+ {0x0, 0xaf, 0x43, 0xec, 0x86, 0x29, 0xc5, 0x6a, 0x11, 0xbe, 0x52, 0xfd, 0x97, 0x38, 0xd4, 0x7b},
+ {0x0, 0xbf, 0x63, 0xdc, 0xc6, 0x79, 0xa5, 0x1a, 0x91, 0x2e, 0xf2, 0x4d, 0x57, 0xe8, 0x34, 0x8b},
+ {0x0, 0x4f, 0x9e, 0xd1, 0x21, 0x6e, 0xbf, 0xf0, 0x42, 0xd, 0xdc, 0x93, 0x63, 0x2c, 0xfd, 0xb2},
+ {0x0, 0x5f, 0xbe, 0xe1, 0x61, 0x3e, 0xdf, 0x80, 0xc2, 0x9d, 0x7c, 0x23, 0xa3, 0xfc, 0x1d, 0x42},
+ {0x0, 0x6f, 0xde, 0xb1, 0xa1, 0xce, 0x7f, 0x10, 0x5f, 0x30, 0x81, 0xee, 0xfe, 0x91, 0x20, 0x4f},
+ {0x0, 0x7f, 0xfe, 0x81, 0xe1, 0x9e, 0x1f, 0x60, 0xdf, 0xa0, 0x21, 0x5e, 0x3e, 0x41, 0xc0, 0xbf},
+ {0x0, 0xf, 0x1e, 0x11, 0x3c, 0x33, 0x22, 0x2d, 0x78, 0x77, 0x66, 0x69, 0x44, 0x4b, 0x5a, 0x55},
+ {0x0, 0x1f, 0x3e, 0x21, 0x7c, 0x63, 0x42, 0x5d, 0xf8, 0xe7, 0xc6, 0xd9, 0x84, 0x9b, 0xba, 0xa5},
+ {0x0, 0x2f, 0x5e, 0x71, 0xbc, 0x93, 0xe2, 0xcd, 0x65, 0x4a, 0x3b, 0x14, 0xd9, 0xf6, 0x87, 0xa8},
+ {0x0, 0x3f, 0x7e, 0x41, 0xfc, 0xc3, 0x82, 0xbd, 0xe5, 0xda, 0x9b, 0xa4, 0x19, 0x26, 0x67, 0x58},
+ {0x0, 0x9c, 0x25, 0xb9, 0x4a, 0xd6, 0x6f, 0xf3, 0x94, 0x8, 0xb1, 0x2d, 0xde, 0x42, 0xfb, 0x67},
+ {0x0, 0x8c, 0x5, 0x89, 0xa, 0x86, 0xf, 0x83, 0x14, 0x98, 0x11, 0x9d, 0x1e, 0x92, 0x1b, 0x97},
+ {0x0, 0xbc, 0x65, 0xd9, 0xca, 0x76, 0xaf, 0x13, 0x89, 0x35, 0xec, 0x50, 0x43, 0xff, 0x26, 0x9a},
+ {0x0, 0xac, 0x45, 0xe9, 0x8a, 0x26, 0xcf, 0x63, 0x9, 0xa5, 0x4c, 0xe0, 0x83, 0x2f, 0xc6, 0x6a},
+ {0x0, 0xdc, 0xa5, 0x79, 0x57, 0x8b, 0xf2, 0x2e, 0xae, 0x72, 0xb, 0xd7, 0xf9, 0x25, 0x5c, 0x80},
+ {0x0, 0xcc, 0x85, 0x49, 0x17, 0xdb, 0x92, 0x5e, 0x2e, 0xe2, 0xab, 0x67, 0x39, 0xf5, 0xbc, 0x70},
+ {0x0, 0xfc, 0xe5, 0x19, 0xd7, 0x2b, 0x32, 0xce, 0xb3, 0x4f, 0x56, 0xaa, 0x64, 0x98, 0x81, 0x7d},
+ {0x0, 0xec, 0xc5, 0x29, 0x97, 0x7b, 0x52, 0xbe, 0x33, 0xdf, 0xf6, 0x1a, 0xa4, 0x48, 0x61, 0x8d},
+ {0x0, 0x1c, 0x38, 0x24, 0x70, 0x6c, 0x48, 0x54, 0xe0, 0xfc, 0xd8, 0xc4, 0x90, 0x8c, 0xa8, 0xb4},
+ {0x0, 0xc, 0x18, 0x14, 0x30, 0x3c, 0x28, 0x24, 0x60, 0x6c, 0x78, 0x74, 0x50, 0x5c, 0x48, 0x44},
+ {0x0, 0x3c, 0x78, 0x44, 0xf0, 0xcc, 0x88, 0xb4, 0xfd, 0xc1, 0x85, 0xb9, 0xd, 0x31, 0x75, 0x49},
+ {0x0, 0x2c, 0x58, 0x74, 0xb0, 0x9c, 0xe8, 0xc4, 0x7d, 0x51, 0x25, 0x9, 0xcd, 0xe1, 0x95, 0xb9},
+ {0x0, 0x5c, 0xb8, 0xe4, 0x6d, 0x31, 0xd5, 0x89, 0xda, 0x86, 0x62, 0x3e, 0xb7, 0xeb, 0xf, 0x53},
+ {0x0, 0x4c, 0x98, 0xd4, 0x2d, 0x61, 0xb5, 0xf9, 0x5a, 0x16, 0xc2, 0x8e, 0x77, 0x3b, 0xef, 0xa3},
+ {0x0, 0x7c, 0xf8, 0x84, 0xed, 0x91, 0x15, 0x69, 0xc7, 0xbb, 0x3f, 0x43, 0x2a, 0x56, 0xd2, 0xae},
+ {0x0, 0x6c, 0xd8, 0xb4, 0xad, 0xc1, 0x75, 0x19, 0x47, 0x2b, 0x9f, 0xf3, 0xea, 0x86, 0x32, 0x5e},
+ {0x0, 0x81, 0x1f, 0x9e, 0x3e, 0xbf, 0x21, 0xa0, 0x7c, 0xfd, 0x63, 0xe2, 0x42, 0xc3, 0x5d, 0xdc},
+ {0x0, 0x91, 0x3f, 0xae, 0x7e, 0xef, 0x41, 0xd0, 0xfc, 0x6d, 0xc3, 0x52, 0x82, 0x13, 0xbd, 0x2c},
+ {0x0, 0xa1, 0x5f, 0xfe, 0xbe, 0x1f, 0xe1, 0x40, 0x61, 0xc0, 0x3e, 0x9f, 0xdf, 0x7e, 0x80, 0x21},
+ {0x0, 0xb1, 0x7f, 0xce, 0xfe, 0x4f, 0x81, 0x30, 0xe1, 0x50, 0x9e, 0x2f, 0x1f, 0xae, 0x60, 0xd1},
+ {0x0, 0xc1, 0x9f, 0x5e, 0x23, 0xe2, 0xbc, 0x7d, 0x46, 0x87, 0xd9, 0x18, 0x65, 0xa4, 0xfa, 0x3b},
+ {0x0, 0xd1, 0xbf, 0x6e, 0x63, 0xb2, 0xdc, 0xd, 0xc6, 0x17, 0x79, 0xa8, 0xa5, 0x74, 0x1a, 0xcb},
+ {0x0, 0xe1, 0xdf, 0x3e, 0xa3, 0x42, 0x7c, 0x9d, 0x5b, 0xba, 0x84, 0x65, 0xf8, 0x19, 0x27, 0xc6},
+ {0x0, 0xf1, 0xff, 0xe, 0xe3, 0x12, 0x1c, 0xed, 0xdb, 0x2a, 0x24, 0xd5, 0x38, 0xc9, 0xc7, 0x36},
+ {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf},
+ {0x0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff},
+ {0x0, 0x21, 0x42, 0x63, 0x84, 0xa5, 0xc6, 0xe7, 0x15, 0x34, 0x57, 0x76, 0x91, 0xb0, 0xd3, 0xf2},
+ {0x0, 0x31, 0x62, 0x53, 0xc4, 0xf5, 0xa6, 0x97, 0x95, 0xa4, 0xf7, 0xc6, 0x51, 0x60, 0x33, 0x2},
+ {0x0, 0x41, 0x82, 0xc3, 0x19, 0x58, 0x9b, 0xda, 0x32, 0x73, 0xb0, 0xf1, 0x2b, 0x6a, 0xa9, 0xe8},
+ {0x0, 0x51, 0xa2, 0xf3, 0x59, 0x8, 0xfb, 0xaa, 0xb2, 0xe3, 0x10, 0x41, 0xeb, 0xba, 0x49, 0x18},
+ {0x0, 0x61, 0xc2, 0xa3, 0x99, 0xf8, 0x5b, 0x3a, 0x2f, 0x4e, 0xed, 0x8c, 0xb6, 0xd7, 0x74, 0x15},
+ {0x0, 0x71, 0xe2, 0x93, 0xd9, 0xa8, 0x3b, 0x4a, 0xaf, 0xde, 0x4d, 0x3c, 0x76, 0x7, 0x94, 0xe5},
+ {0x0, 0xa6, 0x51, 0xf7, 0xa2, 0x4, 0xf3, 0x55, 0x59, 0xff, 0x8, 0xae, 0xfb, 0x5d, 0xaa, 0xc},
+ {0x0, 0xb6, 0x71, 0xc7, 0xe2, 0x54, 0x93, 0x25, 0xd9, 0x6f, 0xa8, 0x1e, 0x3b, 0x8d, 0x4a, 0xfc},
+ {0x0, 0x86, 0x11, 0x97, 0x22, 0xa4, 0x33, 0xb5, 0x44, 0xc2, 0x55, 0xd3, 0x66, 0xe0, 0x77, 0xf1},
+ {0x0, 0x96, 0x31, 0xa7, 0x62, 0xf4, 0x53, 0xc5, 0xc4, 0x52, 0xf5, 0x63, 0xa6, 0x30, 0x97, 0x1},
+ {0x0, 0xe6, 0xd1, 0x37, 0xbf, 0x59, 0x6e, 0x88, 0x63, 0x85, 0xb2, 0x54, 0xdc, 0x3a, 0xd, 0xeb},
+ {0x0, 0xf6, 0xf1, 0x7, 0xff, 0x9, 0xe, 0xf8, 0xe3, 0x15, 0x12, 0xe4, 0x1c, 0xea, 0xed, 0x1b},
+ {0x0, 0xc6, 0x91, 0x57, 0x3f, 0xf9, 0xae, 0x68, 0x7e, 0xb8, 0xef, 0x29, 0x41, 0x87, 0xd0, 0x16},
+ {0x0, 0xd6, 0xb1, 0x67, 0x7f, 0xa9, 0xce, 0x18, 0xfe, 0x28, 0x4f, 0x99, 0x81, 0x57, 0x30, 0xe6},
+ {0x0, 0x26, 0x4c, 0x6a, 0x98, 0xbe, 0xd4, 0xf2, 0x2d, 0xb, 0x61, 0x47, 0xb5, 0x93, 0xf9, 0xdf},
+ {0x0, 0x36, 0x6c, 0x5a, 0xd8, 0xee, 0xb4, 0x82, 0xad, 0x9b, 0xc1, 0xf7, 0x75, 0x43, 0x19, 0x2f},
+ {0x0, 0x6, 0xc, 0xa, 0x18, 0x1e, 0x14, 0x12, 0x30, 0x36, 0x3c, 0x3a, 0x28, 0x2e, 0x24, 0x22},
+ {0x0, 0x16, 0x2c, 0x3a, 0x58, 0x4e, 0x74, 0x62, 0xb0, 0xa6, 0x9c, 0x8a, 0xe8, 0xfe, 0xc4, 0xd2},
+ {0x0, 0x66, 0xcc, 0xaa, 0x85, 0xe3, 0x49, 0x2f, 0x17, 0x71, 0xdb, 0xbd, 0x92, 0xf4, 0x5e, 0x38},
+ {0x0, 0x76, 0xec, 0x9a, 0xc5, 0xb3, 0x29, 0x5f, 0x97, 0xe1, 0x7b, 0xd, 0x52, 0x24, 0xbe, 0xc8},
+ {0x0, 0x46, 0x8c, 0xca, 0x5, 0x43, 0x89, 0xcf, 0xa, 0x4c, 0x86, 0xc0, 0xf, 0x49, 0x83, 0xc5},
+ {0x0, 0x56, 0xac, 0xfa, 0x45, 0x13, 0xe9, 0xbf, 0x8a, 0xdc, 0x26, 0x70, 0xcf, 0x99, 0x63, 0x35},
+ {0x0, 0xbb, 0x6b, 0xd0, 0xd6, 0x6d, 0xbd, 0x6, 0xb1, 0xa, 0xda, 0x61, 0x67, 0xdc, 0xc, 0xb7},
+ {0x0, 0xab, 0x4b, 0xe0, 0x96, 0x3d, 0xdd, 0x76, 0x31, 0x9a, 0x7a, 0xd1, 0xa7, 0xc, 0xec, 0x47},
+ {0x0, 0x9b, 0x2b, 0xb0, 0x56, 0xcd, 0x7d, 0xe6, 0xac, 0x37, 0x87, 0x1c, 0xfa, 0x61, 0xd1, 0x4a},
+ {0x0, 0x8b, 0xb, 0x80, 0x16, 0x9d, 0x1d, 0x96, 0x2c, 0xa7, 0x27, 0xac, 0x3a, 0xb1, 0x31, 0xba},
+ {0x0, 0xfb, 0xeb, 0x10, 0xcb, 0x30, 0x20, 0xdb, 0x8b, 0x70, 0x60, 0x9b, 0x40, 0xbb, 0xab, 0x50},
+ {0x0, 0xeb, 0xcb, 0x20, 0x8b, 0x60, 0x40, 0xab, 0xb, 0xe0, 0xc0, 0x2b, 0x80, 0x6b, 0x4b, 0xa0},
+ {0x0, 0xdb, 0xab, 0x70, 0x4b, 0x90, 0xe0, 0x3b, 0x96, 0x4d, 0x3d, 0xe6, 0xdd, 0x6, 0x76, 0xad},
+ {0x0, 0xcb, 0x8b, 0x40, 0xb, 0xc0, 0x80, 0x4b, 0x16, 0xdd, 0x9d, 0x56, 0x1d, 0xd6, 0x96, 0x5d},
+ {0x0, 0x3b, 0x76, 0x4d, 0xec, 0xd7, 0x9a, 0xa1, 0xc5, 0xfe, 0xb3, 0x88, 0x29, 0x12, 0x5f, 0x64},
+ {0x0, 0x2b, 0x56, 0x7d, 0xac, 0x87, 0xfa, 0xd1, 0x45, 0x6e, 0x13, 0x38, 0xe9, 0xc2, 0xbf, 0x94},
+ {0x0, 0x1b, 0x36, 0x2d, 0x6c, 0x77, 0x5a, 0x41, 0xd8, 0xc3, 0xee, 0xf5, 0xb4, 0xaf, 0x82, 0x99},
+ {0x0, 0xb, 0x16, 0x1d, 0x2c, 0x27, 0x3a, 0x31, 0x58, 0x53, 0x4e, 0x45, 0x74, 0x7f, 0x62, 0x69},
+ {0x0, 0x7b, 0xf6, 0x8d, 0xf1, 0x8a, 0x7, 0x7c, 0xff, 0x84, 0x9, 0x72, 0xe, 0x75, 0xf8, 0x83},
+ {0x0, 0x6b, 0xd6, 0xbd, 0xb1, 0xda, 0x67, 0xc, 0x7f, 0x14, 0xa9, 0xc2, 0xce, 0xa5, 0x18, 0x73},
+ {0x0, 0x5b, 0xb6, 0xed, 0x71, 0x2a, 0xc7, 0x9c, 0xe2, 0xb9, 0x54, 0xf, 0x93, 0xc8, 0x25, 0x7e},
+ {0x0, 0x4b, 0x96, 0xdd, 0x31, 0x7a, 0xa7, 0xec, 0x62, 0x29, 0xf4, 0xbf, 0x53, 0x18, 0xc5, 0x8e}}
+
+// galMultiply multiplies to elements of the field.
+// Uses lookup table ~40% faster
+func galMultiply(a, b byte) byte {
+ return mulTable[a][b]
+}
+
+// Original function:
+/*
+// galMultiply multiplies to elements of the field.
+func galMultiply(a, b byte) byte {
+ if a == 0 || b == 0 {
+ return 0
+ }
+ logA := int(logTable[a])
+ logB := int(logTable[b])
+ return expTable[logA+logB]
+}
+*/
+
+// galDivide is inverse of galMultiply.
+func galDivide(a, b byte) byte {
+ if a == 0 {
+ return 0
+ }
+ if b == 0 {
+ panic("Argument 'divisor' is 0")
+ }
+ logA := int(logTable[a])
+ logB := int(logTable[b])
+ logResult := logA - logB
+ if logResult < 0 {
+ logResult += 255
+ }
+ return expTable[logResult]
+}
+
+// Computes a**n.
+//
+// The result will be the same as multiplying a times itself n times.
+func galExp(a byte, n int) byte {
+ if n == 0 {
+ return 1
+ }
+ if a == 0 {
+ return 0
+ }
+
+ logA := logTable[a]
+ logResult := int(logA) * n
+ for logResult >= 255 {
+ logResult -= 255
+ }
+ return expTable[logResult]
+}
+
+func genAvx2Matrix(matrixRows [][]byte, inputs, outputs int, dst []byte) []byte {
+ if !avx2CodeGen {
+ panic("codegen not enabled")
+ }
+ total := inputs * outputs
+
+ // Duplicated in+out
+ wantBytes := total * 32 * 2
+ if cap(dst) < wantBytes {
+ dst = make([]byte, wantBytes)
+ } else {
+ dst = dst[:wantBytes]
+ }
+ for i, row := range matrixRows[:outputs] {
+ for j, idx := range row[:inputs] {
+ dstIdx := (j*outputs + i) * 64
+ lo := mulTableLow[idx][:]
+ hi := mulTableHigh[idx][:]
+ copy(dst[dstIdx:], lo)
+ copy(dst[dstIdx+16:], lo)
+ copy(dst[dstIdx+32:], hi)
+ copy(dst[dstIdx+48:], hi)
+ }
+ }
+ return dst
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/galoisAvx512_amd64.go b/vendor/github.com/klauspost/reedsolomon/galoisAvx512_amd64.go
new file mode 100644
index 0000000..720196f
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galoisAvx512_amd64.go
@@ -0,0 +1,338 @@
+//+build !noasm
+//+build !appengine
+//+build !gccgo
+
+// Copyright 2015, Klaus Post, see LICENSE for details.
+// Copyright 2019, Minio, Inc.
+
+package reedsolomon
+
+import (
+ "sync"
+)
+
+//go:noescape
+func _galMulAVX512Parallel81(in, out [][]byte, matrix *[matrixSize81]byte, addTo bool)
+
+//go:noescape
+func _galMulAVX512Parallel82(in, out [][]byte, matrix *[matrixSize82]byte, addTo bool)
+
+//go:noescape
+func _galMulAVX512Parallel84(in, out [][]byte, matrix *[matrixSize84]byte, addTo bool)
+
+const (
+ dimIn = 8 // Number of input rows processed simultaneously
+ dimOut81 = 1 // Number of output rows processed simultaneously for x1 routine
+ dimOut82 = 2 // Number of output rows processed simultaneously for x2 routine
+ dimOut84 = 4 // Number of output rows processed simultaneously for x4 routine
+ matrixSize81 = (16 + 16) * dimIn * dimOut81 // Dimension of slice of matrix coefficient passed into x1 routine
+ matrixSize82 = (16 + 16) * dimIn * dimOut82 // Dimension of slice of matrix coefficient passed into x2 routine
+ matrixSize84 = (16 + 16) * dimIn * dimOut84 // Dimension of slice of matrix coefficient passed into x4 routine
+)
+
+// Construct block of matrix coefficients for single output row in parallel
+func setupMatrix81(matrixRows [][]byte, inputOffset, outputOffset int, matrix *[matrixSize81]byte) {
+ offset := 0
+ for c := inputOffset; c < inputOffset+dimIn; c++ {
+ for iRow := outputOffset; iRow < outputOffset+dimOut81; iRow++ {
+ if c < len(matrixRows[iRow]) {
+ coeff := matrixRows[iRow][c]
+ copy(matrix[offset*32:], mulTableLow[coeff][:])
+ copy(matrix[offset*32+16:], mulTableHigh[coeff][:])
+ } else {
+ // coefficients not used for this input shard (so null out)
+ v := matrix[offset*32 : offset*32+32]
+ for i := range v {
+ v[i] = 0
+ }
+ }
+ offset += dimIn
+ if offset >= dimIn*dimOut81 {
+ offset -= dimIn*dimOut81 - 1
+ }
+ }
+ }
+}
+
+// Construct block of matrix coefficients for 2 output rows in parallel
+func setupMatrix82(matrixRows [][]byte, inputOffset, outputOffset int, matrix *[matrixSize82]byte) {
+ offset := 0
+ for c := inputOffset; c < inputOffset+dimIn; c++ {
+ for iRow := outputOffset; iRow < outputOffset+dimOut82; iRow++ {
+ if c < len(matrixRows[iRow]) {
+ coeff := matrixRows[iRow][c]
+ copy(matrix[offset*32:], mulTableLow[coeff][:])
+ copy(matrix[offset*32+16:], mulTableHigh[coeff][:])
+ } else {
+ // coefficients not used for this input shard (so null out)
+ v := matrix[offset*32 : offset*32+32]
+ for i := range v {
+ v[i] = 0
+ }
+ }
+ offset += dimIn
+ if offset >= dimIn*dimOut82 {
+ offset -= dimIn*dimOut82 - 1
+ }
+ }
+ }
+}
+
+// Construct block of matrix coefficients for 4 output rows in parallel
+func setupMatrix84(matrixRows [][]byte, inputOffset, outputOffset int, matrix *[matrixSize84]byte) {
+ offset := 0
+ for c := inputOffset; c < inputOffset+dimIn; c++ {
+ for iRow := outputOffset; iRow < outputOffset+dimOut84; iRow++ {
+ if c < len(matrixRows[iRow]) {
+ coeff := matrixRows[iRow][c]
+ copy(matrix[offset*32:], mulTableLow[coeff][:])
+ copy(matrix[offset*32+16:], mulTableHigh[coeff][:])
+ } else {
+ // coefficients not used for this input shard (so null out)
+ v := matrix[offset*32 : offset*32+32]
+ for i := range v {
+ v[i] = 0
+ }
+ }
+ offset += dimIn
+ if offset >= dimIn*dimOut84 {
+ offset -= dimIn*dimOut84 - 1
+ }
+ }
+ }
+}
+
+// Invoke AVX512 routine for single output row in parallel
+func galMulAVX512Parallel81(in, out [][]byte, matrixRows [][]byte, inputOffset, outputOffset, start, stop int, matrix81 *[matrixSize81]byte) {
+ done := stop - start
+ if done <= 0 {
+ return
+ }
+
+ inputEnd := inputOffset + dimIn
+ if inputEnd > len(in) {
+ inputEnd = len(in)
+ }
+ outputEnd := outputOffset + dimOut81
+ if outputEnd > len(out) {
+ outputEnd = len(out)
+ }
+
+ // We know the max size, alloc temp array.
+ var inTmp [dimIn][]byte
+ for i, v := range in[inputOffset:inputEnd] {
+ inTmp[i] = v[start:stop]
+ }
+ var outTmp [dimOut81][]byte
+ for i, v := range out[outputOffset:outputEnd] {
+ outTmp[i] = v[start:stop]
+ }
+
+ addTo := inputOffset != 0 // Except for the first input column, add to previous results
+ _galMulAVX512Parallel81(inTmp[:inputEnd-inputOffset], outTmp[:outputEnd-outputOffset], matrix81, addTo)
+
+ done = start + ((done >> 6) << 6)
+ if done < stop {
+ galMulAVX512LastInput(inputOffset, inputEnd, outputOffset, outputEnd, matrixRows, done, stop, out, in)
+ }
+}
+
+// Invoke AVX512 routine for 2 output rows in parallel
+func galMulAVX512Parallel82(in, out [][]byte, matrixRows [][]byte, inputOffset, outputOffset, start, stop int, matrix82 *[matrixSize82]byte) {
+ done := stop - start
+ if done <= 0 {
+ return
+ }
+
+ inputEnd := inputOffset + dimIn
+ if inputEnd > len(in) {
+ inputEnd = len(in)
+ }
+ outputEnd := outputOffset + dimOut82
+ if outputEnd > len(out) {
+ outputEnd = len(out)
+ }
+
+ // We know the max size, alloc temp array.
+ var inTmp [dimIn][]byte
+ for i, v := range in[inputOffset:inputEnd] {
+ inTmp[i] = v[start:stop]
+ }
+ var outTmp [dimOut82][]byte
+ for i, v := range out[outputOffset:outputEnd] {
+ outTmp[i] = v[start:stop]
+ }
+
+ addTo := inputOffset != 0 // Except for the first input column, add to previous results
+ _galMulAVX512Parallel82(inTmp[:inputEnd-inputOffset], outTmp[:outputEnd-outputOffset], matrix82, addTo)
+
+ done = start + ((done >> 6) << 6)
+ if done < stop {
+ galMulAVX512LastInput(inputOffset, inputEnd, outputOffset, outputEnd, matrixRows, done, stop, out, in)
+ }
+}
+
+// Invoke AVX512 routine for 4 output rows in parallel
+func galMulAVX512Parallel84(in, out [][]byte, matrixRows [][]byte, inputOffset, outputOffset, start, stop int, matrix84 *[matrixSize84]byte) {
+ done := stop - start
+ if done <= 0 {
+ return
+ }
+
+ inputEnd := inputOffset + dimIn
+ if inputEnd > len(in) {
+ inputEnd = len(in)
+ }
+ outputEnd := outputOffset + dimOut84
+ if outputEnd > len(out) {
+ outputEnd = len(out)
+ }
+
+ // We know the max size, alloc temp array.
+ var inTmp [dimIn][]byte
+ for i, v := range in[inputOffset:inputEnd] {
+ inTmp[i] = v[start:stop]
+ }
+ var outTmp [dimOut84][]byte
+ for i, v := range out[outputOffset:outputEnd] {
+ outTmp[i] = v[start:stop]
+ }
+
+ addTo := inputOffset != 0 // Except for the first input column, add to previous results
+ _galMulAVX512Parallel84(inTmp[:inputEnd-inputOffset], outTmp[:outputEnd-outputOffset], matrix84, addTo)
+
+ done = start + ((done >> 6) << 6)
+ if done < stop {
+ galMulAVX512LastInput(inputOffset, inputEnd, outputOffset, outputEnd, matrixRows, done, stop, out, in)
+ }
+}
+
+func galMulAVX512LastInput(inputOffset int, inputEnd int, outputOffset int, outputEnd int, matrixRows [][]byte, done int, stop int, out [][]byte, in [][]byte) {
+ for c := inputOffset; c < inputEnd; c++ {
+ for iRow := outputOffset; iRow < outputEnd; iRow++ {
+ if c < len(matrixRows[iRow]) {
+ mt := mulTable[matrixRows[iRow][c]][:256]
+ for i := done; i < stop; i++ {
+ if c == 0 { // only set value for first input column
+ out[iRow][i] = mt[in[c][i]]
+ } else { // and add for all others
+ out[iRow][i] ^= mt[in[c][i]]
+ }
+ }
+ }
+ }
+ }
+}
+
+// Perform the same as codeSomeShards, but taking advantage of
+// AVX512 parallelism for up to 4x faster execution as compared to AVX2
+func (r *reedSolomon) codeSomeShardsAvx512(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
+ // Process using no goroutines
+ start, end := 0, r.o.perRound
+ if end > byteCount {
+ end = byteCount
+ }
+ for start < byteCount {
+ matrix84 := [matrixSize84]byte{}
+ matrix82 := [matrixSize82]byte{}
+ matrix81 := [matrixSize81]byte{}
+
+ outputRow := 0
+ // First process (multiple) batches of 4 output rows in parallel
+ if outputRow+dimOut84 <= outputCount {
+ for ; outputRow+dimOut84 <= outputCount; outputRow += dimOut84 {
+ for inputRow := 0; inputRow < len(inputs); inputRow += dimIn {
+ setupMatrix84(matrixRows, inputRow, outputRow, &matrix84)
+ galMulAVX512Parallel84(inputs, outputs, matrixRows, inputRow, outputRow, start, end, &matrix84)
+ }
+ }
+ }
+ // Then process a (single) batch of 2 output rows in parallel
+ if outputRow+dimOut82 <= outputCount {
+ for inputRow := 0; inputRow < len(inputs); inputRow += dimIn {
+ setupMatrix82(matrixRows, inputRow, outputRow, &matrix82)
+ galMulAVX512Parallel82(inputs, outputs, matrixRows, inputRow, outputRow, start, end, &matrix82)
+ }
+ outputRow += dimOut82
+ }
+ // Lastly, we may have a single output row left (for uneven parity)
+ if outputRow < outputCount {
+ for inputRow := 0; inputRow < len(inputs); inputRow += dimIn {
+ setupMatrix81(matrixRows, inputRow, outputRow, &matrix81)
+ galMulAVX512Parallel81(inputs, outputs, matrixRows, inputRow, outputRow, start, end, &matrix81)
+ }
+ }
+
+ start = end
+ end += r.o.perRound
+ if end > byteCount {
+ end = byteCount
+ }
+ }
+}
+
+// Perform the same as codeSomeShards, but taking advantage of
+// AVX512 parallelism for up to 4x faster execution as compared to AVX2
+func (r *reedSolomon) codeSomeShardsAvx512P(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
+ var wg sync.WaitGroup
+ do := byteCount / r.o.maxGoroutines
+ if do < r.o.minSplitSize {
+ do = r.o.minSplitSize
+ }
+ // Make sizes divisible by 64
+ do = (do + 63) & (^63)
+ start := 0
+ for start < byteCount {
+ if start+do > byteCount {
+ do = byteCount - start
+ }
+ wg.Add(1)
+ go func(grStart, grStop int) {
+ start, stop := grStart, grStart+r.o.perRound
+ if stop > grStop {
+ stop = grStop
+ }
+ // Loop for each round.
+ matrix84 := [matrixSize84]byte{}
+ matrix82 := [matrixSize82]byte{}
+ matrix81 := [matrixSize81]byte{}
+ for start < grStop {
+ outputRow := 0
+ // First process (multiple) batches of 4 output rows in parallel
+ if outputRow+dimOut84 <= outputCount {
+ // 1K matrix buffer
+ for ; outputRow+dimOut84 <= outputCount; outputRow += dimOut84 {
+ for inputRow := 0; inputRow < len(inputs); inputRow += dimIn {
+ setupMatrix84(matrixRows, inputRow, outputRow, &matrix84)
+ galMulAVX512Parallel84(inputs, outputs, matrixRows, inputRow, outputRow, start, stop, &matrix84)
+ }
+ }
+ }
+ // Then process a (single) batch of 2 output rows in parallel
+ if outputRow+dimOut82 <= outputCount {
+ // 512B matrix buffer
+ for inputRow := 0; inputRow < len(inputs); inputRow += dimIn {
+ setupMatrix82(matrixRows, inputRow, outputRow, &matrix82)
+ galMulAVX512Parallel82(inputs, outputs, matrixRows, inputRow, outputRow, start, stop, &matrix82)
+ }
+ outputRow += dimOut82
+ }
+ // Lastly, we may have a single output row left (for uneven parity)
+ if outputRow < outputCount {
+ for inputRow := 0; inputRow < len(inputs); inputRow += dimIn {
+ setupMatrix81(matrixRows, inputRow, outputRow, &matrix81)
+ galMulAVX512Parallel81(inputs, outputs, matrixRows, inputRow, outputRow, start, stop, &matrix81)
+ }
+ }
+ start = stop
+ stop += r.o.perRound
+ if stop > grStop {
+ stop = grStop
+ }
+ }
+ wg.Done()
+ }(start, start+do)
+ start += do
+ }
+ wg.Wait()
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/galoisAvx512_amd64.s b/vendor/github.com/klauspost/reedsolomon/galoisAvx512_amd64.s
new file mode 100644
index 0000000..97ad420
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galoisAvx512_amd64.s
@@ -0,0 +1,400 @@
+//+build !noasm !appengine !gccgo
+
+// Copyright 2015, Klaus Post, see LICENSE for details.
+// Copyright 2019, Minio, Inc.
+
+#define LOAD(OFFSET) \
+ MOVQ OFFSET(SI), BX \
+ VMOVDQU64 (BX)(R11*1), Z0 \
+ VPSRLQ $4, Z0, Z1 \ // high input
+ VPANDQ Z2, Z0, Z0 \ // low input
+ VPANDQ Z2, Z1, Z1 // high input
+
+#define GALOIS_MUL(MUL_LO, MUL_HI, LO, HI, OUT) \
+ VPSHUFB Z0, MUL_LO, LO \ // mul low part
+ VPSHUFB Z1, MUL_HI, HI \ // mul high part
+ VPTERNLOGD $0x96, LO, HI, OUT
+
+#define GALOIS(C1, C2, IN, LO, HI, OUT) \
+ VSHUFI64X2 $C1, IN, IN, LO \
+ VSHUFI64X2 $C2, IN, IN, HI \
+ GALOIS_MUL(LO, HI, LO, HI, OUT)
+
+//
+// Process single output row from a total of 8 input rows
+//
+// func _galMulAVX512Parallel81(in, out [][]byte, matrix *[matrixSize81]byte, addTo bool)
+TEXT ·_galMulAVX512Parallel81(SB), 7, $0
+ MOVQ in+0(FP), SI
+ MOVQ 8(SI), R9 // R9: len(in)
+ SHRQ $6, R9 // len(in) / 64
+ TESTQ R9, R9
+ JZ done_avx512_parallel81
+
+ MOVQ matrix+48(FP), SI
+ VMOVDQU64 0x000(SI), Z16
+ VMOVDQU64 0x040(SI), Z17
+ VMOVDQU64 0x080(SI), Z18
+ VMOVDQU64 0x0c0(SI), Z19
+
+ // Initialize multiplication constants
+ VSHUFI64X2 $0x55, Z16, Z16, Z20
+ VSHUFI64X2 $0xaa, Z16, Z16, Z24
+ VSHUFI64X2 $0xff, Z16, Z16, Z28
+ VSHUFI64X2 $0x00, Z16, Z16, Z16
+
+ VSHUFI64X2 $0x55, Z17, Z17, Z21
+ VSHUFI64X2 $0xaa, Z17, Z17, Z25
+ VSHUFI64X2 $0xff, Z17, Z17, Z29
+ VSHUFI64X2 $0x00, Z17, Z17, Z17
+
+ VSHUFI64X2 $0x55, Z18, Z18, Z22
+ VSHUFI64X2 $0xaa, Z18, Z18, Z26
+ VSHUFI64X2 $0xff, Z18, Z18, Z30
+ VSHUFI64X2 $0x00, Z18, Z18, Z18
+
+ VSHUFI64X2 $0x55, Z19, Z19, Z23
+ VSHUFI64X2 $0xaa, Z19, Z19, Z27
+ VSHUFI64X2 $0xff, Z19, Z19, Z31
+ VSHUFI64X2 $0x00, Z19, Z19, Z19
+
+ MOVQ $15, BX
+ VPBROADCASTB BX, Z2
+
+ MOVB addTo+56(FP), AX
+ IMULQ $-0x1, AX
+ KMOVQ AX, K1
+ MOVQ in+0(FP), SI // SI: &in
+ MOVQ in_len+8(FP), AX // number of inputs
+ XORQ R11, R11
+ MOVQ out+24(FP), DX
+ MOVQ (DX), DX // DX: &out[0][0]
+
+loopback_avx512_parallel81:
+ VMOVDQU64.Z (DX), K1, Z4
+
+ LOAD(0x00) // &in[0][0]
+ GALOIS_MUL(Z16, Z20, Z14, Z15, Z4)
+
+ CMPQ AX, $1
+ JE skip_avx512_parallel81
+
+ LOAD(0x18) // &in[1][0]
+ GALOIS_MUL(Z24, Z28, Z14, Z15, Z4)
+
+ CMPQ AX, $2
+ JE skip_avx512_parallel81
+
+ LOAD(0x30) // &in[2][0]
+ GALOIS_MUL(Z17, Z21, Z14, Z15, Z4)
+
+ CMPQ AX, $3
+ JE skip_avx512_parallel81
+
+ LOAD(0x48) // &in[3][0]
+ GALOIS_MUL(Z25, Z29, Z14, Z15, Z4)
+
+ CMPQ AX, $4
+ JE skip_avx512_parallel81
+
+ LOAD(0x60) // &in[4][0]
+ GALOIS_MUL(Z18, Z22, Z14, Z15, Z4)
+
+ CMPQ AX, $5
+ JE skip_avx512_parallel81
+
+ LOAD(0x78) // &in[5][0]
+ GALOIS_MUL(Z26, Z30, Z14, Z15, Z4)
+
+ CMPQ AX, $6
+ JE skip_avx512_parallel81
+
+ LOAD(0x90) // &in[6][0]
+ GALOIS_MUL(Z19, Z23, Z14, Z15, Z4)
+
+ CMPQ AX, $7
+ JE skip_avx512_parallel81
+
+ LOAD(0xa8) // &in[7][0]
+ GALOIS_MUL(Z27, Z31, Z14, Z15, Z4)
+
+skip_avx512_parallel81:
+ VMOVDQU64 Z4, (DX)
+
+ ADDQ $64, R11 // in4+=64
+
+ ADDQ $64, DX // out+=64
+
+ SUBQ $1, R9
+ JNZ loopback_avx512_parallel81
+
+done_avx512_parallel81:
+ VZEROUPPER
+ RET
+
+//
+// Process 2 output rows in parallel from a total of 8 input rows
+//
+// func _galMulAVX512Parallel82(in, out [][]byte, matrix *[matrixSize82]byte, addTo bool)
+TEXT ·_galMulAVX512Parallel82(SB), 7, $0
+ MOVQ in+0(FP), SI
+ MOVQ 8(SI), R9 // R9: len(in)
+ SHRQ $6, R9 // len(in) / 64
+ TESTQ R9, R9
+ JZ done_avx512_parallel82
+
+ MOVQ matrix+48(FP), SI
+ VMOVDQU64 0x000(SI), Z16
+ VMOVDQU64 0x040(SI), Z17
+ VMOVDQU64 0x080(SI), Z18
+ VMOVDQU64 0x0c0(SI), Z19
+ VMOVDQU64 0x100(SI), Z20
+ VMOVDQU64 0x140(SI), Z21
+ VMOVDQU64 0x180(SI), Z22
+ VMOVDQU64 0x1c0(SI), Z23
+
+ // Initialize multiplication constants
+ VSHUFI64X2 $0x55, Z16, Z16, Z24
+ VSHUFI64X2 $0xaa, Z16, Z16, Z25
+ VSHUFI64X2 $0xff, Z16, Z16, Z26
+ VSHUFI64X2 $0x00, Z16, Z16, Z16
+
+ VSHUFI64X2 $0x55, Z20, Z20, Z27
+ VSHUFI64X2 $0xaa, Z20, Z20, Z28
+ VSHUFI64X2 $0xff, Z20, Z20, Z29
+ VSHUFI64X2 $0x00, Z20, Z20, Z20
+
+ VSHUFI64X2 $0x55, Z17, Z17, Z30
+ VSHUFI64X2 $0xaa, Z17, Z17, Z31
+ VSHUFI64X2 $0xff, Z17, Z17, Z11
+ VSHUFI64X2 $0x00, Z17, Z17, Z17
+
+ VSHUFI64X2 $0x55, Z21, Z21, Z8
+ VSHUFI64X2 $0xaa, Z21, Z21, Z9
+ VSHUFI64X2 $0xff, Z21, Z21, Z10
+ VSHUFI64X2 $0x00, Z21, Z21, Z21
+
+ MOVQ $15, BX
+ VPBROADCASTB BX, Z2
+
+ MOVB addTo+56(FP), AX
+ IMULQ $-0x1, AX
+ KMOVQ AX, K1
+ MOVQ in+0(FP), SI // SI: &in
+ MOVQ in_len+8(FP), AX // number of inputs
+ XORQ R11, R11
+ MOVQ out+24(FP), DX
+ MOVQ 24(DX), CX // CX: &out[1][0]
+ MOVQ (DX), DX // DX: &out[0][0]
+
+loopback_avx512_parallel82:
+ VMOVDQU64.Z (DX), K1, Z4
+ VMOVDQU64.Z (CX), K1, Z5
+
+ LOAD(0x00) // &in[0][0]
+ GALOIS_MUL(Z16, Z24, Z14, Z15, Z4)
+ GALOIS_MUL(Z20, Z27, Z12, Z13, Z5)
+
+ CMPQ AX, $1
+ JE skip_avx512_parallel82
+
+ LOAD(0x18) // &in[1][0]
+ GALOIS_MUL(Z25, Z26, Z14, Z15, Z4)
+ GALOIS_MUL(Z28, Z29, Z12, Z13, Z5)
+
+ CMPQ AX, $2
+ JE skip_avx512_parallel82
+
+ LOAD(0x30) // &in[2][0]
+ GALOIS_MUL(Z17, Z30, Z14, Z15, Z4)
+ GALOIS_MUL(Z21, Z8, Z12, Z13, Z5)
+
+ CMPQ AX, $3
+ JE skip_avx512_parallel82
+
+ LOAD(0x48) // &in[3][0]
+ GALOIS_MUL(Z31, Z11, Z14, Z15, Z4)
+ GALOIS_MUL(Z9, Z10, Z12, Z13, Z5)
+
+ CMPQ AX, $4
+ JE skip_avx512_parallel82
+
+ LOAD(0x60) // &in[4][0]
+ GALOIS(0x00, 0x55, Z18, Z14, Z15, Z4)
+ GALOIS(0x00, 0x55, Z22, Z12, Z13, Z5)
+
+ CMPQ AX, $5
+ JE skip_avx512_parallel82
+
+ LOAD(0x78) // &in[5][0]
+ GALOIS(0xaa, 0xff, Z18, Z14, Z15, Z4)
+ GALOIS(0xaa, 0xff, Z22, Z12, Z13, Z5)
+
+ CMPQ AX, $6
+ JE skip_avx512_parallel82
+
+ LOAD(0x90) // &in[6][0]
+ GALOIS(0x00, 0x55, Z19, Z14, Z15, Z4)
+ GALOIS(0x00, 0x55, Z23, Z12, Z13, Z5)
+
+ CMPQ AX, $7
+ JE skip_avx512_parallel82
+
+ LOAD(0xa8) // &in[7][0]
+ GALOIS(0xaa, 0xff, Z19, Z14, Z15, Z4)
+ GALOIS(0xaa, 0xff, Z23, Z12, Z13, Z5)
+
+skip_avx512_parallel82:
+ VMOVDQU64 Z4, (DX)
+ VMOVDQU64 Z5, (CX)
+
+ ADDQ $64, R11 // in4+=64
+
+ ADDQ $64, DX // out+=64
+ ADDQ $64, CX // out2+=64
+
+ SUBQ $1, R9
+ JNZ loopback_avx512_parallel82
+
+done_avx512_parallel82:
+ VZEROUPPER
+ RET
+
+//
+// Process 4 output rows in parallel from a total of 8 input rows
+//
+// func _galMulAVX512Parallel84(in, out [][]byte, matrix *[matrixSize84]byte, addTo bool)
+TEXT ·_galMulAVX512Parallel84(SB), 7, $0
+ MOVQ in+0(FP), SI
+ MOVQ 8(SI), R9 // R9: len(in)
+ SHRQ $6, R9 // len(in) / 64
+ TESTQ R9, R9
+ JZ done_avx512_parallel84
+
+ MOVQ matrix+48(FP), SI
+ VMOVDQU64 0x000(SI), Z16
+ VMOVDQU64 0x040(SI), Z17
+ VMOVDQU64 0x080(SI), Z18
+ VMOVDQU64 0x0c0(SI), Z19
+ VMOVDQU64 0x100(SI), Z20
+ VMOVDQU64 0x140(SI), Z21
+ VMOVDQU64 0x180(SI), Z22
+ VMOVDQU64 0x1c0(SI), Z23
+ VMOVDQU64 0x200(SI), Z24
+ VMOVDQU64 0x240(SI), Z25
+ VMOVDQU64 0x280(SI), Z26
+ VMOVDQU64 0x2c0(SI), Z27
+ VMOVDQU64 0x300(SI), Z28
+ VMOVDQU64 0x340(SI), Z29
+ VMOVDQU64 0x380(SI), Z30
+ VMOVDQU64 0x3c0(SI), Z31
+
+ MOVQ $15, BX
+ VPBROADCASTB BX, Z2
+
+ MOVB addTo+56(FP), AX
+ IMULQ $-0x1, AX
+ KMOVQ AX, K1
+ MOVQ in+0(FP), SI // SI: &in
+ MOVQ in_len+8(FP), AX // number of inputs
+ XORQ R11, R11
+ MOVQ out+24(FP), DX
+ MOVQ 24(DX), CX // CX: &out[1][0]
+ MOVQ 48(DX), R10 // R10: &out[2][0]
+ MOVQ 72(DX), R12 // R12: &out[3][0]
+ MOVQ (DX), DX // DX: &out[0][0]
+
+loopback_avx512_parallel84:
+ VMOVDQU64.Z (DX), K1, Z4
+ VMOVDQU64.Z (CX), K1, Z5
+ VMOVDQU64.Z (R10), K1, Z6
+ VMOVDQU64.Z (R12), K1, Z7
+
+ LOAD(0x00) // &in[0][0]
+ GALOIS(0x00, 0x55, Z16, Z14, Z15, Z4)
+ GALOIS(0x00, 0x55, Z20, Z12, Z13, Z5)
+ GALOIS(0x00, 0x55, Z24, Z10, Z11, Z6)
+ GALOIS(0x00, 0x55, Z28, Z8, Z9, Z7)
+
+ CMPQ AX, $1
+ JE skip_avx512_parallel84
+
+ LOAD(0x18) // &in[1][0]
+ GALOIS(0xaa, 0xff, Z16, Z14, Z15, Z4)
+ GALOIS(0xaa, 0xff, Z20, Z12, Z13, Z5)
+ GALOIS(0xaa, 0xff, Z24, Z10, Z11, Z6)
+ GALOIS(0xaa, 0xff, Z28, Z8, Z9, Z7)
+
+ CMPQ AX, $2
+ JE skip_avx512_parallel84
+
+ LOAD(0x30) // &in[2][0]
+ GALOIS(0x00, 0x55, Z17, Z14, Z15, Z4)
+ GALOIS(0x00, 0x55, Z21, Z12, Z13, Z5)
+ GALOIS(0x00, 0x55, Z25, Z10, Z11, Z6)
+ GALOIS(0x00, 0x55, Z29, Z8, Z9, Z7)
+
+ CMPQ AX, $3
+ JE skip_avx512_parallel84
+
+ LOAD(0x48) // &in[3][0]
+ GALOIS(0xaa, 0xff, Z17, Z14, Z15, Z4)
+ GALOIS(0xaa, 0xff, Z21, Z12, Z13, Z5)
+ GALOIS(0xaa, 0xff, Z25, Z10, Z11, Z6)
+ GALOIS(0xaa, 0xff, Z29, Z8, Z9, Z7)
+
+ CMPQ AX, $4
+ JE skip_avx512_parallel84
+
+ LOAD(0x60) // &in[4][0]
+ GALOIS(0x00, 0x55, Z18, Z14, Z15, Z4)
+ GALOIS(0x00, 0x55, Z22, Z12, Z13, Z5)
+ GALOIS(0x00, 0x55, Z26, Z10, Z11, Z6)
+ GALOIS(0x00, 0x55, Z30, Z8, Z9, Z7)
+
+ CMPQ AX, $5
+ JE skip_avx512_parallel84
+
+ LOAD(0x78) // &in[5][0]
+ GALOIS(0xaa, 0xff, Z18, Z14, Z15, Z4)
+ GALOIS(0xaa, 0xff, Z22, Z12, Z13, Z5)
+ GALOIS(0xaa, 0xff, Z26, Z10, Z11, Z6)
+ GALOIS(0xaa, 0xff, Z30, Z8, Z9, Z7)
+
+ CMPQ AX, $6
+ JE skip_avx512_parallel84
+
+ LOAD(0x90) // &in[6][0]
+ GALOIS(0x00, 0x55, Z19, Z14, Z15, Z4)
+ GALOIS(0x00, 0x55, Z23, Z12, Z13, Z5)
+ GALOIS(0x00, 0x55, Z27, Z10, Z11, Z6)
+ GALOIS(0x00, 0x55, Z31, Z8, Z9, Z7)
+
+ CMPQ AX, $7
+ JE skip_avx512_parallel84
+
+ LOAD(0xa8) // &in[7][0]
+ GALOIS(0xaa, 0xff, Z19, Z14, Z15, Z4)
+ GALOIS(0xaa, 0xff, Z23, Z12, Z13, Z5)
+ GALOIS(0xaa, 0xff, Z27, Z10, Z11, Z6)
+ GALOIS(0xaa, 0xff, Z31, Z8, Z9, Z7)
+
+skip_avx512_parallel84:
+ VMOVDQU64 Z4, (DX)
+ VMOVDQU64 Z5, (CX)
+ VMOVDQU64 Z6, (R10)
+ VMOVDQU64 Z7, (R12)
+
+ ADDQ $64, R11 // in4+=64
+
+ ADDQ $64, DX // out+=64
+ ADDQ $64, CX // out2+=64
+ ADDQ $64, R10 // out3+=64
+ ADDQ $64, R12 // out4+=64
+
+ SUBQ $1, R9
+ JNZ loopback_avx512_parallel84
+
+done_avx512_parallel84:
+ VZEROUPPER
+ RET
diff --git a/vendor/github.com/klauspost/reedsolomon/galois_amd64.go b/vendor/github.com/klauspost/reedsolomon/galois_amd64.go
new file mode 100644
index 0000000..f757f9d
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galois_amd64.go
@@ -0,0 +1,138 @@
+//+build !noasm
+//+build !appengine
+//+build !gccgo
+
+// Copyright 2015, Klaus Post, see LICENSE for details.
+
+package reedsolomon
+
+//go:noescape
+func galMulSSSE3(low, high, in, out []byte)
+
+//go:noescape
+func galMulSSSE3Xor(low, high, in, out []byte)
+
+//go:noescape
+func galMulAVX2Xor(low, high, in, out []byte)
+
+//go:noescape
+func galMulAVX2(low, high, in, out []byte)
+
+//go:noescape
+func sSE2XorSlice(in, out []byte)
+
+//go:noescape
+func galMulAVX2Xor_64(low, high, in, out []byte)
+
+//go:noescape
+func galMulAVX2_64(low, high, in, out []byte)
+
+//go:noescape
+func sSE2XorSlice_64(in, out []byte)
+
+// This is what the assembler routines do in blocks of 16 bytes:
+/*
+func galMulSSSE3(low, high, in, out []byte) {
+ for n, input := range in {
+ l := input & 0xf
+ h := input >> 4
+ out[n] = low[l] ^ high[h]
+ }
+}
+
+func galMulSSSE3Xor(low, high, in, out []byte) {
+ for n, input := range in {
+ l := input & 0xf
+ h := input >> 4
+ out[n] ^= low[l] ^ high[h]
+ }
+}
+*/
+
+// bigSwitchover is the size where 64 bytes are processed per loop.
+const bigSwitchover = 128
+
+func galMulSlice(c byte, in, out []byte, o *options) {
+ if c == 1 {
+ copy(out, in)
+ return
+ }
+ if o.useAVX2 {
+ if len(in) >= bigSwitchover {
+ galMulAVX2_64(mulTableLow[c][:], mulTableHigh[c][:], in, out)
+ done := (len(in) >> 6) << 6
+ in = in[done:]
+ out = out[done:]
+ }
+ if len(in) > 32 {
+ galMulAVX2(mulTableLow[c][:], mulTableHigh[c][:], in, out)
+ done := (len(in) >> 5) << 5
+ in = in[done:]
+ out = out[done:]
+ }
+ } else if o.useSSSE3 {
+ galMulSSSE3(mulTableLow[c][:], mulTableHigh[c][:], in, out)
+ done := (len(in) >> 4) << 4
+ in = in[done:]
+ out = out[done:]
+ }
+ out = out[:len(in)]
+ mt := mulTable[c][:256]
+ for i := range in {
+ out[i] = mt[in[i]]
+ }
+}
+
+func galMulSliceXor(c byte, in, out []byte, o *options) {
+ if c == 1 {
+ sliceXor(in, out, o)
+ return
+ }
+
+ if o.useAVX2 {
+ if len(in) >= bigSwitchover {
+ galMulAVX2Xor_64(mulTableLow[c][:], mulTableHigh[c][:], in, out)
+ done := (len(in) >> 6) << 6
+ in = in[done:]
+ out = out[done:]
+ }
+ if len(in) >= 32 {
+ galMulAVX2Xor(mulTableLow[c][:], mulTableHigh[c][:], in, out)
+ done := (len(in) >> 5) << 5
+ in = in[done:]
+ out = out[done:]
+ }
+ } else if o.useSSSE3 {
+ galMulSSSE3Xor(mulTableLow[c][:], mulTableHigh[c][:], in, out)
+ done := (len(in) >> 4) << 4
+ in = in[done:]
+ out = out[done:]
+ }
+ out = out[:len(in)]
+ mt := mulTable[c][:256]
+ for i := range in {
+ out[i] ^= mt[in[i]]
+ }
+}
+
+// slice galois add
+func sliceXor(in, out []byte, o *options) {
+ if o.useSSE2 {
+ if len(in) >= bigSwitchover {
+ sSE2XorSlice_64(in, out)
+ done := (len(in) >> 6) << 6
+ in = in[done:]
+ out = out[done:]
+ }
+ if len(in) >= 16 {
+ sSE2XorSlice(in, out)
+ done := (len(in) >> 4) << 4
+ in = in[done:]
+ out = out[done:]
+ }
+ }
+ out = out[:len(in)]
+ for i := range in {
+ out[i] ^= in[i]
+ }
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/galois_amd64.s b/vendor/github.com/klauspost/reedsolomon/galois_amd64.s
new file mode 100644
index 0000000..3501110
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galois_amd64.s
@@ -0,0 +1,368 @@
+//+build !noasm !appengine !gccgo
+
+// Copyright 2015, Klaus Post, see LICENSE for details.
+
+// Based on http://www.snia.org/sites/default/files2/SDC2013/presentations/NewThinking/EthanMiller_Screaming_Fast_Galois_Field%20Arithmetic_SIMD%20Instructions.pdf
+// and http://jerasure.org/jerasure/gf-complete/tree/master
+
+// func galMulSSSE3Xor(low, high, in, out []byte)
+TEXT ·galMulSSSE3Xor(SB), 7, $0
+ MOVQ low+0(FP), SI // SI: &low
+ MOVQ high+24(FP), DX // DX: &high
+ MOVOU (SI), X6 // X6 low
+ MOVOU (DX), X7 // X7: high
+ MOVQ $15, BX // BX: low mask
+ MOVQ BX, X8
+ PXOR X5, X5
+ MOVQ in+48(FP), SI // R11: &in
+ MOVQ in_len+56(FP), R9 // R9: len(in)
+ MOVQ out+72(FP), DX // DX: &out
+ PSHUFB X5, X8 // X8: lomask (unpacked)
+ SHRQ $4, R9 // len(in) / 16
+ MOVQ SI, AX
+ MOVQ DX, BX
+ ANDQ $15, AX
+ ANDQ $15, BX
+ CMPQ R9, $0
+ JEQ done_xor
+ ORQ AX, BX
+ CMPQ BX, $0
+ JNZ loopback_xor
+
+loopback_xor_aligned:
+ MOVOA (SI), X0 // in[x]
+ MOVOA (DX), X4 // out[x]
+ MOVOA X0, X1 // in[x]
+ MOVOA X6, X2 // low copy
+ MOVOA X7, X3 // high copy
+ PSRLQ $4, X1 // X1: high input
+ PAND X8, X0 // X0: low input
+ PAND X8, X1 // X0: high input
+ PSHUFB X0, X2 // X2: mul low part
+ PSHUFB X1, X3 // X3: mul high part
+ PXOR X2, X3 // X3: Result
+ PXOR X4, X3 // X3: Result xor existing out
+ MOVOA X3, (DX) // Store
+ ADDQ $16, SI // in+=16
+ ADDQ $16, DX // out+=16
+ SUBQ $1, R9
+ JNZ loopback_xor_aligned
+ JMP done_xor
+
+loopback_xor:
+ MOVOU (SI), X0 // in[x]
+ MOVOU (DX), X4 // out[x]
+ MOVOU X0, X1 // in[x]
+ MOVOU X6, X2 // low copy
+ MOVOU X7, X3 // high copy
+ PSRLQ $4, X1 // X1: high input
+ PAND X8, X0 // X0: low input
+ PAND X8, X1 // X0: high input
+ PSHUFB X0, X2 // X2: mul low part
+ PSHUFB X1, X3 // X3: mul high part
+ PXOR X2, X3 // X3: Result
+ PXOR X4, X3 // X3: Result xor existing out
+ MOVOU X3, (DX) // Store
+ ADDQ $16, SI // in+=16
+ ADDQ $16, DX // out+=16
+ SUBQ $1, R9
+ JNZ loopback_xor
+
+done_xor:
+ RET
+
+// func galMulSSSE3(low, high, in, out []byte)
+TEXT ·galMulSSSE3(SB), 7, $0
+ MOVQ low+0(FP), SI // SI: &low
+ MOVQ high+24(FP), DX // DX: &high
+ MOVOU (SI), X6 // X6 low
+ MOVOU (DX), X7 // X7: high
+ MOVQ $15, BX // BX: low mask
+ MOVQ BX, X8
+ PXOR X5, X5
+ MOVQ in+48(FP), SI // R11: &in
+ MOVQ in_len+56(FP), R9 // R9: len(in)
+ MOVQ out+72(FP), DX // DX: &out
+ PSHUFB X5, X8 // X8: lomask (unpacked)
+ MOVQ SI, AX
+ MOVQ DX, BX
+ SHRQ $4, R9 // len(in) / 16
+ ANDQ $15, AX
+ ANDQ $15, BX
+ CMPQ R9, $0
+ JEQ done
+ ORQ AX, BX
+ CMPQ BX, $0
+ JNZ loopback
+
+loopback_aligned:
+ MOVOA (SI), X0 // in[x]
+ MOVOA X0, X1 // in[x]
+ MOVOA X6, X2 // low copy
+ MOVOA X7, X3 // high copy
+ PSRLQ $4, X1 // X1: high input
+ PAND X8, X0 // X0: low input
+ PAND X8, X1 // X0: high input
+ PSHUFB X0, X2 // X2: mul low part
+ PSHUFB X1, X3 // X3: mul high part
+ PXOR X2, X3 // X3: Result
+ MOVOA X3, (DX) // Store
+ ADDQ $16, SI // in+=16
+ ADDQ $16, DX // out+=16
+ SUBQ $1, R9
+ JNZ loopback_aligned
+ JMP done
+
+loopback:
+ MOVOU (SI), X0 // in[x]
+ MOVOU X0, X1 // in[x]
+ MOVOA X6, X2 // low copy
+ MOVOA X7, X3 // high copy
+ PSRLQ $4, X1 // X1: high input
+ PAND X8, X0 // X0: low input
+ PAND X8, X1 // X0: high input
+ PSHUFB X0, X2 // X2: mul low part
+ PSHUFB X1, X3 // X3: mul high part
+ PXOR X2, X3 // X3: Result
+ MOVOU X3, (DX) // Store
+ ADDQ $16, SI // in+=16
+ ADDQ $16, DX // out+=16
+ SUBQ $1, R9
+ JNZ loopback
+
+done:
+ RET
+
+// func galMulAVX2Xor(low, high, in, out []byte)
+TEXT ·galMulAVX2Xor(SB), 7, $0
+ MOVQ low+0(FP), SI // SI: &low
+ MOVQ high+24(FP), DX // DX: &high
+ MOVQ $15, BX // BX: low mask
+ MOVQ BX, X5
+ MOVOU (SI), X6 // X6: low
+ MOVOU (DX), X7 // X7: high
+ MOVQ in_len+56(FP), R9 // R9: len(in)
+
+ VINSERTI128 $1, X6, Y6, Y6 // low
+ VINSERTI128 $1, X7, Y7, Y7 // high
+ VPBROADCASTB X5, Y8 // Y8: lomask (unpacked)
+
+ SHRQ $5, R9 // len(in) / 32
+ MOVQ out+72(FP), DX // DX: &out
+ MOVQ in+48(FP), SI // SI: &in
+ TESTQ R9, R9
+ JZ done_xor_avx2
+
+loopback_xor_avx2:
+ VMOVDQU (SI), Y0
+ VMOVDQU (DX), Y4
+ VPSRLQ $4, Y0, Y1 // Y1: high input
+ VPAND Y8, Y0, Y0 // Y0: low input
+ VPAND Y8, Y1, Y1 // Y1: high input
+ VPSHUFB Y0, Y6, Y2 // Y2: mul low part
+ VPSHUFB Y1, Y7, Y3 // Y3: mul high part
+ VPXOR Y3, Y2, Y3 // Y3: Result
+ VPXOR Y4, Y3, Y4 // Y4: Result
+ VMOVDQU Y4, (DX)
+
+ ADDQ $32, SI // in+=32
+ ADDQ $32, DX // out+=32
+ SUBQ $1, R9
+ JNZ loopback_xor_avx2
+
+done_xor_avx2:
+ VZEROUPPER
+ RET
+
+// func galMulAVX2(low, high, in, out []byte)
+TEXT ·galMulAVX2(SB), 7, $0
+ MOVQ low+0(FP), SI // SI: &low
+ MOVQ high+24(FP), DX // DX: &high
+ MOVQ $15, BX // BX: low mask
+ MOVQ BX, X5
+ MOVOU (SI), X6 // X6: low
+ MOVOU (DX), X7 // X7: high
+ MOVQ in_len+56(FP), R9 // R9: len(in)
+
+ VINSERTI128 $1, X6, Y6, Y6 // low
+ VINSERTI128 $1, X7, Y7, Y7 // high
+ VPBROADCASTB X5, Y8 // Y8: lomask (unpacked)
+
+ SHRQ $5, R9 // len(in) / 32
+ MOVQ out+72(FP), DX // DX: &out
+ MOVQ in+48(FP), SI // SI: &in
+ TESTQ R9, R9
+ JZ done_avx2
+
+loopback_avx2:
+ VMOVDQU (SI), Y0
+ VPSRLQ $4, Y0, Y1 // Y1: high input
+ VPAND Y8, Y0, Y0 // Y0: low input
+ VPAND Y8, Y1, Y1 // Y1: high input
+ VPSHUFB Y0, Y6, Y2 // Y2: mul low part
+ VPSHUFB Y1, Y7, Y3 // Y3: mul high part
+ VPXOR Y3, Y2, Y4 // Y4: Result
+ VMOVDQU Y4, (DX)
+
+ ADDQ $32, SI // in+=32
+ ADDQ $32, DX // out+=32
+ SUBQ $1, R9
+ JNZ loopback_avx2
+
+done_avx2:
+ VZEROUPPER
+ RET
+
+// func sSE2XorSlice(in, out []byte)
+TEXT ·sSE2XorSlice(SB), 7, $0
+ MOVQ in+0(FP), SI // SI: &in
+ MOVQ in_len+8(FP), R9 // R9: len(in)
+ MOVQ out+24(FP), DX // DX: &out
+ SHRQ $4, R9 // len(in) / 16
+ CMPQ R9, $0
+ JEQ done_xor_sse2
+
+loopback_xor_sse2:
+ MOVOU (SI), X0 // in[x]
+ MOVOU (DX), X1 // out[x]
+ PXOR X0, X1
+ MOVOU X1, (DX)
+ ADDQ $16, SI // in+=16
+ ADDQ $16, DX // out+=16
+ SUBQ $1, R9
+ JNZ loopback_xor_sse2
+
+done_xor_sse2:
+ RET
+
+// func galMulAVX2Xor_64(low, high, in, out []byte)
+TEXT ·galMulAVX2Xor_64(SB), 7, $0
+ MOVQ low+0(FP), SI // SI: &low
+ MOVQ high+24(FP), DX // DX: &high
+ MOVQ $15, BX // BX: low mask
+ MOVQ BX, X5
+ MOVOU (SI), X6 // X6: low
+ MOVOU (DX), X7 // X7: high
+ MOVQ in_len+56(FP), R9 // R9: len(in)
+
+ VINSERTI128 $1, X6, Y6, Y6 // low
+ VINSERTI128 $1, X7, Y7, Y7 // high
+ VPBROADCASTB X5, Y8 // Y8: lomask (unpacked)
+
+ SHRQ $6, R9 // len(in) / 64
+ MOVQ out+72(FP), DX // DX: &out
+ MOVQ in+48(FP), SI // SI: &in
+ TESTQ R9, R9
+ JZ done_xor_avx2_64
+
+loopback_xor_avx2_64:
+ VMOVDQU (SI), Y0
+ VMOVDQU 32(SI), Y10
+ VMOVDQU (DX), Y4
+ VMOVDQU 32(DX), Y14
+ VPSRLQ $4, Y0, Y1 // Y1: high input
+ VPSRLQ $4, Y10, Y11 // Y11: high input 2
+ VPAND Y8, Y0, Y0 // Y0: low input
+ VPAND Y8, Y10, Y10 // Y10: low input 2
+ VPAND Y8, Y1, Y1 // Y11: high input
+ VPAND Y8, Y11, Y11 // Y11: high input 2
+ VPSHUFB Y0, Y6, Y2 // Y2: mul low part
+ VPSHUFB Y10, Y6, Y12 // Y12: mul low part 2
+ VPSHUFB Y1, Y7, Y3 // Y3: mul high part
+ VPSHUFB Y11, Y7, Y13 // Y13: mul high part 2
+ VPXOR Y3, Y2, Y3 // Y3: Result
+ VPXOR Y13, Y12, Y13 // Y13: Result 2
+ VPXOR Y4, Y3, Y4 // Y4: Result
+ VPXOR Y14, Y13, Y14 // Y4: Result 2
+ VMOVDQU Y4, (DX)
+ VMOVDQU Y14, 32(DX)
+
+ ADDQ $64, SI // in+=64
+ ADDQ $64, DX // out+=64
+ SUBQ $1, R9
+ JNZ loopback_xor_avx2_64
+
+done_xor_avx2_64:
+ VZEROUPPER
+ RET
+
+// func galMulAVX2_64(low, high, in, out []byte)
+TEXT ·galMulAVX2_64(SB), 7, $0
+ MOVQ low+0(FP), SI // SI: &low
+ MOVQ high+24(FP), DX // DX: &high
+ MOVQ $15, BX // BX: low mask
+ MOVQ BX, X5
+ MOVOU (SI), X6 // X6: low
+ MOVOU (DX), X7 // X7: high
+ MOVQ in_len+56(FP), R9 // R9: len(in)
+
+ VINSERTI128 $1, X6, Y6, Y6 // low
+ VINSERTI128 $1, X7, Y7, Y7 // high
+ VPBROADCASTB X5, Y8 // Y8: lomask (unpacked)
+
+ SHRQ $6, R9 // len(in) / 64
+ MOVQ out+72(FP), DX // DX: &out
+ MOVQ in+48(FP), SI // SI: &in
+ TESTQ R9, R9
+ JZ done_avx2_64
+
+loopback_avx2_64:
+ VMOVDQU (SI), Y0
+ VMOVDQU 32(SI), Y10
+ VPSRLQ $4, Y0, Y1 // Y1: high input
+ VPSRLQ $4, Y10, Y11 // Y11: high input 2
+ VPAND Y8, Y0, Y0 // Y0: low input
+ VPAND Y8, Y10, Y10 // Y10: low input
+ VPAND Y8, Y1, Y1 // Y1: high input
+ VPAND Y8, Y11, Y11 // Y11: high input 2
+ VPSHUFB Y0, Y6, Y2 // Y2: mul low part
+ VPSHUFB Y10, Y6, Y12 // Y12: mul low part 2
+ VPSHUFB Y1, Y7, Y3 // Y3: mul high part
+ VPSHUFB Y11, Y7, Y13 // Y13: mul high part 2
+ VPXOR Y3, Y2, Y4 // Y4: Result
+ VPXOR Y13, Y12, Y14 // Y14: Result 2
+ VMOVDQU Y4, (DX)
+ VMOVDQU Y14, 32(DX)
+
+ ADDQ $64, SI // in+=64
+ ADDQ $64, DX // out+=64
+ SUBQ $1, R9
+ JNZ loopback_avx2_64
+
+done_avx2_64:
+ VZEROUPPER
+ RET
+
+// func sSE2XorSlice_64(in, out []byte)
+TEXT ·sSE2XorSlice_64(SB), 7, $0
+ MOVQ in+0(FP), SI // SI: &in
+ MOVQ in_len+8(FP), R9 // R9: len(in)
+ MOVQ out+24(FP), DX // DX: &out
+ SHRQ $6, R9 // len(in) / 64
+ CMPQ R9, $0
+ JEQ done_xor_sse2_64
+
+loopback_xor_sse2_64:
+ MOVOU (SI), X0 // in[x]
+ MOVOU 16(SI), X2 // in[x]
+ MOVOU 32(SI), X4 // in[x]
+ MOVOU 48(SI), X6 // in[x]
+ MOVOU (DX), X1 // out[x]
+ MOVOU 16(DX), X3 // out[x]
+ MOVOU 32(DX), X5 // out[x]
+ MOVOU 48(DX), X7 // out[x]
+ PXOR X0, X1
+ PXOR X2, X3
+ PXOR X4, X5
+ PXOR X6, X7
+ MOVOU X1, (DX)
+ MOVOU X3, 16(DX)
+ MOVOU X5, 32(DX)
+ MOVOU X7, 48(DX)
+ ADDQ $64, SI // in+=64
+ ADDQ $64, DX // out+=64
+ SUBQ $1, R9
+ JNZ loopback_xor_sse2_64
+
+done_xor_sse2_64:
+ RET
diff --git a/vendor/github.com/klauspost/reedsolomon/galois_arm64.go b/vendor/github.com/klauspost/reedsolomon/galois_arm64.go
new file mode 100644
index 0000000..23a1dd2
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galois_arm64.go
@@ -0,0 +1,67 @@
+//+build !noasm
+//+build !appengine
+//+build !gccgo
+
+// Copyright 2015, Klaus Post, see LICENSE for details.
+// Copyright 2017, Minio, Inc.
+
+package reedsolomon
+
+//go:noescape
+func galMulNEON(low, high, in, out []byte)
+
+//go:noescape
+func galMulXorNEON(low, high, in, out []byte)
+
+//go:noescape
+func galXorNEON(in, out []byte)
+
+func galMulSlice(c byte, in, out []byte, o *options) {
+ if c == 1 {
+ copy(out, in)
+ return
+ }
+ var done int
+ galMulNEON(mulTableLow[c][:], mulTableHigh[c][:], in, out)
+ done = (len(in) >> 5) << 5
+
+ remain := len(in) - done
+ if remain > 0 {
+ mt := mulTable[c][:256]
+ for i := done; i < len(in); i++ {
+ out[i] = mt[in[i]]
+ }
+ }
+}
+
+func galMulSliceXor(c byte, in, out []byte, o *options) {
+ if c == 1 {
+ sliceXor(in, out, o)
+ return
+ }
+ var done int
+ galMulXorNEON(mulTableLow[c][:], mulTableHigh[c][:], in, out)
+ done = (len(in) >> 5) << 5
+
+ remain := len(in) - done
+ if remain > 0 {
+ mt := mulTable[c][:256]
+ for i := done; i < len(in); i++ {
+ out[i] ^= mt[in[i]]
+ }
+ }
+}
+
+// slice galois add
+func sliceXor(in, out []byte, o *options) {
+
+ galXorNEON(in, out)
+ done := (len(in) >> 5) << 5
+
+ remain := len(in) - done
+ if remain > 0 {
+ for i := done; i < len(in); i++ {
+ out[i] ^= in[i]
+ }
+ }
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/galois_arm64.s b/vendor/github.com/klauspost/reedsolomon/galois_arm64.s
new file mode 100644
index 0000000..d2cac2c
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galois_arm64.s
@@ -0,0 +1,125 @@
+//+build !noasm !appengine !gccgo
+
+// Copyright 2015, Klaus Post, see LICENSE for details.
+// Copyright 2017, Minio, Inc.
+
+#define LOAD(LO1, LO2, HI1, HI2) \
+ VLD1.P 32(R1), [LO1.B16, LO2.B16] \
+ \
+ \ // Get low input and high input
+ VUSHR $4, LO1.B16, HI1.B16 \
+ VUSHR $4, LO2.B16, HI2.B16 \
+ VAND V8.B16, LO1.B16, LO1.B16 \
+ VAND V8.B16, LO2.B16, LO2.B16
+
+#define GALOIS_MUL(MUL_LO, MUL_HI, OUT1, OUT2, TMP1, TMP2) \
+ \ // Mul low part and mul high part
+ VTBL V0.B16, [MUL_LO.B16], OUT1.B16 \
+ VTBL V10.B16, [MUL_HI.B16], OUT2.B16 \
+ VTBL V1.B16, [MUL_LO.B16], TMP1.B16 \
+ VTBL V11.B16, [MUL_HI.B16], TMP2.B16 \
+ \
+ \ // Combine results
+ VEOR OUT2.B16, OUT1.B16, OUT1.B16 \
+ VEOR TMP2.B16, TMP1.B16, OUT2.B16
+
+// func galMulNEON(low, high, in, out []byte)
+TEXT ·galMulNEON(SB), 7, $0
+ MOVD in_base+48(FP), R1
+ MOVD in_len+56(FP), R2 // length of message
+ MOVD out_base+72(FP), R5
+ SUBS $32, R2
+ BMI complete
+
+ MOVD low+0(FP), R10 // R10: &low
+ MOVD high+24(FP), R11 // R11: &high
+ VLD1 (R10), [V6.B16]
+ VLD1 (R11), [V7.B16]
+
+ //
+ // Use an extra instruction below since `VDUP R3, V8.B16` generates assembler error
+ // WORD $0x4e010c68 // dup v8.16b, w3
+ //
+ MOVD $0x0f, R3
+ VMOV R3, V8.B[0]
+ VDUP V8.B[0], V8.B16
+
+loop:
+ // Main loop
+ LOAD(V0, V1, V10, V11)
+ GALOIS_MUL(V6, V7, V4, V5, V14, V15)
+
+ // Store result
+ VST1.P [V4.D2, V5.D2], 32(R5)
+
+ SUBS $32, R2
+ BPL loop
+
+complete:
+ RET
+
+// func galMulXorNEON(low, high, in, out []byte)
+TEXT ·galMulXorNEON(SB), 7, $0
+ MOVD in_base+48(FP), R1
+ MOVD in_len+56(FP), R2 // length of message
+ MOVD out_base+72(FP), R5
+ SUBS $32, R2
+ BMI completeXor
+
+ MOVD low+0(FP), R10 // R10: &low
+ MOVD high+24(FP), R11 // R11: &high
+ VLD1 (R10), [V6.B16]
+ VLD1 (R11), [V7.B16]
+
+ //
+ // Use an extra instruction below since `VDUP R3, V8.B16` generates assembler error
+ // WORD $0x4e010c68 // dup v8.16b, w3
+ //
+ MOVD $0x0f, R3
+ VMOV R3, V8.B[0]
+ VDUP V8.B[0], V8.B16
+
+loopXor:
+ // Main loop
+ VLD1 (R5), [V20.B16, V21.B16]
+
+ LOAD(V0, V1, V10, V11)
+ GALOIS_MUL(V6, V7, V4, V5, V14, V15)
+
+ VEOR V20.B16, V4.B16, V4.B16
+ VEOR V21.B16, V5.B16, V5.B16
+
+ // Store result
+ VST1.P [V4.D2, V5.D2], 32(R5)
+
+ SUBS $32, R2
+ BPL loopXor
+
+completeXor:
+ RET
+
+// func galXorNEON(in, out []byte)
+TEXT ·galXorNEON(SB), 7, $0
+ MOVD in_base+0(FP), R1
+ MOVD in_len+8(FP), R2 // length of message
+ MOVD out_base+24(FP), R5
+ SUBS $32, R2
+ BMI completeXor
+
+loopXor:
+ // Main loop
+ VLD1.P 32(R1), [V0.B16, V1.B16]
+ VLD1 (R5), [V20.B16, V21.B16]
+
+ VEOR V20.B16, V0.B16, V4.B16
+ VEOR V21.B16, V1.B16, V5.B16
+
+ // Store result
+ VST1.P [V4.D2, V5.D2], 32(R5)
+
+ SUBS $32, R2
+ BPL loopXor
+
+completeXor:
+ RET
+
diff --git a/vendor/github.com/klauspost/reedsolomon/galois_gen_amd64.go b/vendor/github.com/klauspost/reedsolomon/galois_gen_amd64.go
new file mode 100644
index 0000000..edd6376
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galois_gen_amd64.go
@@ -0,0 +1,408 @@
+// Code generated by command: go run gen.go -out galois_gen_amd64.s -stubs galois_gen_amd64.go. DO NOT EDIT.
+
+// +build !appengine
+// +build !noasm
+// +build !nogen
+// +build gc
+
+package reedsolomon
+
+// mulAvxTwo_1x1 takes 1 inputs and produces 1 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_1x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_1x2 takes 1 inputs and produces 2 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_1x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_1x3 takes 1 inputs and produces 3 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_1x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_1x4 takes 1 inputs and produces 4 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_1x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_1x5 takes 1 inputs and produces 5 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_1x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_1x6 takes 1 inputs and produces 6 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_1x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_1x7 takes 1 inputs and produces 7 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_1x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_1x8 takes 1 inputs and produces 8 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_1x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_2x1 takes 2 inputs and produces 1 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_2x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_2x2 takes 2 inputs and produces 2 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_2x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_2x3 takes 2 inputs and produces 3 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_2x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_2x4 takes 2 inputs and produces 4 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_2x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_2x5 takes 2 inputs and produces 5 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_2x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_2x6 takes 2 inputs and produces 6 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_2x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_2x7 takes 2 inputs and produces 7 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_2x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_2x8 takes 2 inputs and produces 8 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_2x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_3x1 takes 3 inputs and produces 1 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_3x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_3x2 takes 3 inputs and produces 2 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_3x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_3x3 takes 3 inputs and produces 3 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_3x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_3x4 takes 3 inputs and produces 4 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_3x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_3x5 takes 3 inputs and produces 5 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_3x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_3x6 takes 3 inputs and produces 6 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_3x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_3x7 takes 3 inputs and produces 7 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_3x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_3x8 takes 3 inputs and produces 8 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_3x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_4x1 takes 4 inputs and produces 1 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_4x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_4x2 takes 4 inputs and produces 2 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_4x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_4x3 takes 4 inputs and produces 3 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_4x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_4x4 takes 4 inputs and produces 4 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_4x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_4x5 takes 4 inputs and produces 5 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_4x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_4x6 takes 4 inputs and produces 6 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_4x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_4x7 takes 4 inputs and produces 7 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_4x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_4x8 takes 4 inputs and produces 8 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_4x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_5x1 takes 5 inputs and produces 1 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_5x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_5x2 takes 5 inputs and produces 2 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_5x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_5x3 takes 5 inputs and produces 3 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_5x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_5x4 takes 5 inputs and produces 4 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_5x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_5x5 takes 5 inputs and produces 5 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_5x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_5x6 takes 5 inputs and produces 6 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_5x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_5x7 takes 5 inputs and produces 7 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_5x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_5x8 takes 5 inputs and produces 8 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_5x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_6x1 takes 6 inputs and produces 1 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_6x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_6x2 takes 6 inputs and produces 2 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_6x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_6x3 takes 6 inputs and produces 3 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_6x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_6x4 takes 6 inputs and produces 4 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_6x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_6x5 takes 6 inputs and produces 5 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_6x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_6x6 takes 6 inputs and produces 6 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_6x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_6x7 takes 6 inputs and produces 7 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_6x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_6x8 takes 6 inputs and produces 8 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_6x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_7x1 takes 7 inputs and produces 1 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_7x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_7x2 takes 7 inputs and produces 2 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_7x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_7x3 takes 7 inputs and produces 3 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_7x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_7x4 takes 7 inputs and produces 4 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_7x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_7x5 takes 7 inputs and produces 5 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_7x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_7x6 takes 7 inputs and produces 6 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_7x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_7x7 takes 7 inputs and produces 7 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_7x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_7x8 takes 7 inputs and produces 8 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_7x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_8x1 takes 8 inputs and produces 1 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_8x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_8x2 takes 8 inputs and produces 2 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_8x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_8x3 takes 8 inputs and produces 3 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_8x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_8x4 takes 8 inputs and produces 4 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_8x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_8x5 takes 8 inputs and produces 5 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_8x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_8x6 takes 8 inputs and produces 6 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_8x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_8x7 takes 8 inputs and produces 7 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_8x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_8x8 takes 8 inputs and produces 8 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_8x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_9x1 takes 9 inputs and produces 1 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_9x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_9x2 takes 9 inputs and produces 2 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_9x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_9x3 takes 9 inputs and produces 3 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_9x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_9x4 takes 9 inputs and produces 4 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_9x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_9x5 takes 9 inputs and produces 5 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_9x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_9x6 takes 9 inputs and produces 6 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_9x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_9x7 takes 9 inputs and produces 7 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_9x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_9x8 takes 9 inputs and produces 8 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_9x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_10x1 takes 10 inputs and produces 1 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_10x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_10x2 takes 10 inputs and produces 2 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_10x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_10x3 takes 10 inputs and produces 3 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_10x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_10x4 takes 10 inputs and produces 4 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_10x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_10x5 takes 10 inputs and produces 5 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_10x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_10x6 takes 10 inputs and produces 6 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_10x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_10x7 takes 10 inputs and produces 7 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_10x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+
+// mulAvxTwo_10x8 takes 10 inputs and produces 8 outputs.
+// The output is initialized to 0.
+//go:noescape
+func mulAvxTwo_10x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
diff --git a/vendor/github.com/klauspost/reedsolomon/galois_gen_amd64.s b/vendor/github.com/klauspost/reedsolomon/galois_gen_amd64.s
new file mode 100644
index 0000000..c76db3c
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galois_gen_amd64.s
@@ -0,0 +1,18526 @@
+// Code generated by command: go run gen.go -out galois_gen_amd64.s -stubs galois_gen_amd64.go. DO NOT EDIT.
+
+// +build !appengine
+// +build !noasm
+// +build !nogen
+// +build gc
+
+// func mulAvxTwo_1x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_1x1(SB), $0-88
+ // Loading all tables to registers
+ // Full registers estimated 6 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_1x1_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), DX
+ VMOVDQU (CX), Y1
+ VMOVDQU 32(CX), Y2
+ MOVQ in_base+24(FP), CX
+ MOVQ (CX), CX
+ MOVQ $0x0000000f, BX
+ MOVQ BX, X3
+ VPBROADCASTB X3, Y3
+ MOVQ start+72(FP), BX
+
+mulAvxTwo_1x1_loop:
+ // Clear 1 outputs
+ VPXOR Y0, Y0, Y0
+
+ // Load and process 32 bytes from input 0 to 1 outputs
+ VMOVDQU (CX)(BX*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y3, Y4, Y4
+ VPAND Y3, Y5, Y5
+ VPSHUFB Y4, Y1, Y4
+ VPSHUFB Y5, Y2, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+
+ // Store 1 outputs
+ VMOVDQU Y0, (DX)(BX*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, BX
+ DECQ AX
+ JNZ mulAvxTwo_1x1_loop
+ VZEROUPPER
+
+mulAvxTwo_1x1_end:
+ RET
+
+// func mulAvxTwo_1x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_1x2(SB), $0-88
+ // Loading all tables to registers
+ // Full registers estimated 11 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_1x2_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), DX
+ VMOVDQU (CX), Y2
+ VMOVDQU 32(CX), Y3
+ VMOVDQU 64(CX), Y4
+ VMOVDQU 96(CX), Y5
+ MOVQ in_base+24(FP), CX
+ MOVQ (CX), CX
+ MOVQ $0x0000000f, BP
+ MOVQ BP, X6
+ VPBROADCASTB X6, Y6
+ MOVQ start+72(FP), BP
+
+mulAvxTwo_1x2_loop:
+ // Clear 2 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+
+ // Load and process 32 bytes from input 0 to 2 outputs
+ VMOVDQU (CX)(BP*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VPSHUFB Y9, Y2, Y7
+ VPSHUFB Y10, Y3, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VPSHUFB Y9, Y4, Y7
+ VPSHUFB Y10, Y5, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+
+ // Store 2 outputs
+ VMOVDQU Y0, (BX)(BP*1)
+ VMOVDQU Y1, (DX)(BP*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, BP
+ DECQ AX
+ JNZ mulAvxTwo_1x2_loop
+ VZEROUPPER
+
+mulAvxTwo_1x2_end:
+ RET
+
+// func mulAvxTwo_1x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_1x3(SB), $0-88
+ // Loading all tables to registers
+ // Full registers estimated 14 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_1x3_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), DX
+ VMOVDQU (CX), Y3
+ VMOVDQU 32(CX), Y4
+ VMOVDQU 64(CX), Y5
+ VMOVDQU 96(CX), Y6
+ VMOVDQU 128(CX), Y7
+ VMOVDQU 160(CX), Y8
+ MOVQ in_base+24(FP), CX
+ MOVQ (CX), CX
+ MOVQ $0x0000000f, SI
+ MOVQ SI, X9
+ VPBROADCASTB X9, Y9
+ MOVQ start+72(FP), SI
+
+mulAvxTwo_1x3_loop:
+ // Clear 3 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+
+ // Load and process 32 bytes from input 0 to 3 outputs
+ VMOVDQU (CX)(SI*1), Y12
+ VPSRLQ $0x04, Y12, Y13
+ VPAND Y9, Y12, Y12
+ VPAND Y9, Y13, Y13
+ VPSHUFB Y12, Y3, Y10
+ VPSHUFB Y13, Y4, Y11
+ VPXOR Y10, Y11, Y10
+ VPXOR Y10, Y0, Y0
+ VPSHUFB Y12, Y5, Y10
+ VPSHUFB Y13, Y6, Y11
+ VPXOR Y10, Y11, Y10
+ VPXOR Y10, Y1, Y1
+ VPSHUFB Y12, Y7, Y10
+ VPSHUFB Y13, Y8, Y11
+ VPXOR Y10, Y11, Y10
+ VPXOR Y10, Y2, Y2
+
+ // Store 3 outputs
+ VMOVDQU Y0, (BX)(SI*1)
+ VMOVDQU Y1, (BP)(SI*1)
+ VMOVDQU Y2, (DX)(SI*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, SI
+ DECQ AX
+ JNZ mulAvxTwo_1x3_loop
+ VZEROUPPER
+
+mulAvxTwo_1x3_end:
+ RET
+
+// func mulAvxTwo_1x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_1x4(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 17 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_1x4_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DX
+ MOVQ in_base+24(FP), DI
+ MOVQ (DI), DI
+ MOVQ $0x0000000f, R8
+ MOVQ R8, X4
+ VPBROADCASTB X4, Y4
+ MOVQ start+72(FP), R8
+
+mulAvxTwo_1x4_loop:
+ // Clear 4 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+
+ // Load and process 32 bytes from input 0 to 4 outputs
+ VMOVDQU (DI)(R8*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU (CX), Y5
+ VMOVDQU 32(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 64(CX), Y5
+ VMOVDQU 96(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 192(CX), Y5
+ VMOVDQU 224(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Store 4 outputs
+ VMOVDQU Y0, (BX)(R8*1)
+ VMOVDQU Y1, (BP)(R8*1)
+ VMOVDQU Y2, (SI)(R8*1)
+ VMOVDQU Y3, (DX)(R8*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R8
+ DECQ AX
+ JNZ mulAvxTwo_1x4_loop
+ VZEROUPPER
+
+mulAvxTwo_1x4_end:
+ RET
+
+// func mulAvxTwo_1x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_1x5(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 20 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_1x5_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), DX
+ MOVQ in_base+24(FP), R8
+ MOVQ (R8), R8
+ MOVQ $0x0000000f, R9
+ MOVQ R9, X5
+ VPBROADCASTB X5, Y5
+ MOVQ start+72(FP), R9
+
+mulAvxTwo_1x5_loop:
+ // Clear 5 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+
+ // Load and process 32 bytes from input 0 to 5 outputs
+ VMOVDQU (R8)(R9*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU (CX), Y6
+ VMOVDQU 32(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 64(CX), Y6
+ VMOVDQU 96(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 128(CX), Y6
+ VMOVDQU 160(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 192(CX), Y6
+ VMOVDQU 224(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 256(CX), Y6
+ VMOVDQU 288(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Store 5 outputs
+ VMOVDQU Y0, (BX)(R9*1)
+ VMOVDQU Y1, (BP)(R9*1)
+ VMOVDQU Y2, (SI)(R9*1)
+ VMOVDQU Y3, (DI)(R9*1)
+ VMOVDQU Y4, (DX)(R9*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R9
+ DECQ AX
+ JNZ mulAvxTwo_1x5_loop
+ VZEROUPPER
+
+mulAvxTwo_1x5_end:
+ RET
+
+// func mulAvxTwo_1x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_1x6(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 23 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_1x6_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), DX
+ MOVQ in_base+24(FP), R9
+ MOVQ (R9), R9
+ MOVQ $0x0000000f, R10
+ MOVQ R10, X6
+ VPBROADCASTB X6, Y6
+ MOVQ start+72(FP), R10
+
+mulAvxTwo_1x6_loop:
+ // Clear 6 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+
+ // Load and process 32 bytes from input 0 to 6 outputs
+ VMOVDQU (R9)(R10*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU (CX), Y7
+ VMOVDQU 32(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 64(CX), Y7
+ VMOVDQU 96(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 128(CX), Y7
+ VMOVDQU 160(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 192(CX), Y7
+ VMOVDQU 224(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 256(CX), Y7
+ VMOVDQU 288(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 320(CX), Y7
+ VMOVDQU 352(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Store 6 outputs
+ VMOVDQU Y0, (BX)(R10*1)
+ VMOVDQU Y1, (BP)(R10*1)
+ VMOVDQU Y2, (SI)(R10*1)
+ VMOVDQU Y3, (DI)(R10*1)
+ VMOVDQU Y4, (R8)(R10*1)
+ VMOVDQU Y5, (DX)(R10*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R10
+ DECQ AX
+ JNZ mulAvxTwo_1x6_loop
+ VZEROUPPER
+
+mulAvxTwo_1x6_end:
+ RET
+
+// func mulAvxTwo_1x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_1x7(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 26 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_1x7_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), R9
+ MOVQ 144(DX), DX
+ MOVQ in_base+24(FP), R10
+ MOVQ (R10), R10
+ MOVQ $0x0000000f, R11
+ MOVQ R11, X7
+ VPBROADCASTB X7, Y7
+ MOVQ start+72(FP), R11
+
+mulAvxTwo_1x7_loop:
+ // Clear 7 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+
+ // Load and process 32 bytes from input 0 to 7 outputs
+ VMOVDQU (R10)(R11*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU (CX), Y8
+ VMOVDQU 32(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 64(CX), Y8
+ VMOVDQU 96(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 128(CX), Y8
+ VMOVDQU 160(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 192(CX), Y8
+ VMOVDQU 224(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 256(CX), Y8
+ VMOVDQU 288(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 320(CX), Y8
+ VMOVDQU 352(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 384(CX), Y8
+ VMOVDQU 416(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Store 7 outputs
+ VMOVDQU Y0, (BX)(R11*1)
+ VMOVDQU Y1, (BP)(R11*1)
+ VMOVDQU Y2, (SI)(R11*1)
+ VMOVDQU Y3, (DI)(R11*1)
+ VMOVDQU Y4, (R8)(R11*1)
+ VMOVDQU Y5, (R9)(R11*1)
+ VMOVDQU Y6, (DX)(R11*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R11
+ DECQ AX
+ JNZ mulAvxTwo_1x7_loop
+ VZEROUPPER
+
+mulAvxTwo_1x7_end:
+ RET
+
+// func mulAvxTwo_1x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_1x8(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 29 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_1x8_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), R9
+ MOVQ 144(DX), R10
+ MOVQ 168(DX), DX
+ MOVQ in_base+24(FP), R11
+ MOVQ (R11), R11
+ MOVQ $0x0000000f, R12
+ MOVQ R12, X8
+ VPBROADCASTB X8, Y8
+ MOVQ start+72(FP), R12
+
+mulAvxTwo_1x8_loop:
+ // Clear 8 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+ VPXOR Y7, Y7, Y7
+
+ // Load and process 32 bytes from input 0 to 8 outputs
+ VMOVDQU (R11)(R12*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU (CX), Y9
+ VMOVDQU 32(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 64(CX), Y9
+ VMOVDQU 96(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 128(CX), Y9
+ VMOVDQU 160(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 192(CX), Y9
+ VMOVDQU 224(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 256(CX), Y9
+ VMOVDQU 288(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 320(CX), Y9
+ VMOVDQU 352(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 384(CX), Y9
+ VMOVDQU 416(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 448(CX), Y9
+ VMOVDQU 480(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Store 8 outputs
+ VMOVDQU Y0, (BX)(R12*1)
+ VMOVDQU Y1, (BP)(R12*1)
+ VMOVDQU Y2, (SI)(R12*1)
+ VMOVDQU Y3, (DI)(R12*1)
+ VMOVDQU Y4, (R8)(R12*1)
+ VMOVDQU Y5, (R9)(R12*1)
+ VMOVDQU Y6, (R10)(R12*1)
+ VMOVDQU Y7, (DX)(R12*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R12
+ DECQ AX
+ JNZ mulAvxTwo_1x8_loop
+ VZEROUPPER
+
+mulAvxTwo_1x8_end:
+ RET
+
+// func mulAvxTwo_2x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_2x1(SB), $0-88
+ // Loading all tables to registers
+ // Full registers estimated 8 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_2x1_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), DX
+ VMOVDQU (CX), Y1
+ VMOVDQU 32(CX), Y2
+ VMOVDQU 64(CX), Y3
+ VMOVDQU 96(CX), Y4
+ MOVQ in_base+24(FP), CX
+ MOVQ (CX), BX
+ MOVQ 24(CX), CX
+ MOVQ $0x0000000f, BP
+ MOVQ BP, X5
+ VPBROADCASTB X5, Y5
+ MOVQ start+72(FP), BP
+
+mulAvxTwo_2x1_loop:
+ // Clear 1 outputs
+ VPXOR Y0, Y0, Y0
+
+ // Load and process 32 bytes from input 0 to 1 outputs
+ VMOVDQU (BX)(BP*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y5, Y6, Y6
+ VPAND Y5, Y7, Y7
+ VPSHUFB Y6, Y1, Y6
+ VPSHUFB Y7, Y2, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+
+ // Load and process 32 bytes from input 1 to 1 outputs
+ VMOVDQU (CX)(BP*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y5, Y6, Y6
+ VPAND Y5, Y7, Y7
+ VPSHUFB Y6, Y3, Y6
+ VPSHUFB Y7, Y4, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+
+ // Store 1 outputs
+ VMOVDQU Y0, (DX)(BP*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, BP
+ DECQ AX
+ JNZ mulAvxTwo_2x1_loop
+ VZEROUPPER
+
+mulAvxTwo_2x1_end:
+ RET
+
+// func mulAvxTwo_2x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_2x2(SB), $0-88
+ // Loading all tables to registers
+ // Full registers estimated 15 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_2x2_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), DX
+ VMOVDQU (CX), Y2
+ VMOVDQU 32(CX), Y3
+ VMOVDQU 64(CX), Y4
+ VMOVDQU 96(CX), Y5
+ VMOVDQU 128(CX), Y6
+ VMOVDQU 160(CX), Y7
+ VMOVDQU 192(CX), Y8
+ VMOVDQU 224(CX), Y9
+ MOVQ in_base+24(FP), CX
+ MOVQ (CX), BP
+ MOVQ 24(CX), CX
+ MOVQ $0x0000000f, SI
+ MOVQ SI, X10
+ VPBROADCASTB X10, Y10
+ MOVQ start+72(FP), SI
+
+mulAvxTwo_2x2_loop:
+ // Clear 2 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+
+ // Load and process 32 bytes from input 0 to 2 outputs
+ VMOVDQU (BP)(SI*1), Y13
+ VPSRLQ $0x04, Y13, Y14
+ VPAND Y10, Y13, Y13
+ VPAND Y10, Y14, Y14
+ VPSHUFB Y13, Y2, Y11
+ VPSHUFB Y14, Y3, Y12
+ VPXOR Y11, Y12, Y11
+ VPXOR Y11, Y0, Y0
+ VPSHUFB Y13, Y4, Y11
+ VPSHUFB Y14, Y5, Y12
+ VPXOR Y11, Y12, Y11
+ VPXOR Y11, Y1, Y1
+
+ // Load and process 32 bytes from input 1 to 2 outputs
+ VMOVDQU (CX)(SI*1), Y13
+ VPSRLQ $0x04, Y13, Y14
+ VPAND Y10, Y13, Y13
+ VPAND Y10, Y14, Y14
+ VPSHUFB Y13, Y6, Y11
+ VPSHUFB Y14, Y7, Y12
+ VPXOR Y11, Y12, Y11
+ VPXOR Y11, Y0, Y0
+ VPSHUFB Y13, Y8, Y11
+ VPSHUFB Y14, Y9, Y12
+ VPXOR Y11, Y12, Y11
+ VPXOR Y11, Y1, Y1
+
+ // Store 2 outputs
+ VMOVDQU Y0, (BX)(SI*1)
+ VMOVDQU Y1, (DX)(SI*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, SI
+ DECQ AX
+ JNZ mulAvxTwo_2x2_loop
+ VZEROUPPER
+
+mulAvxTwo_2x2_end:
+ RET
+
+// func mulAvxTwo_2x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_2x3(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 20 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_2x3_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), DX
+ MOVQ in_base+24(FP), SI
+ MOVQ (SI), DI
+ MOVQ 24(SI), SI
+ MOVQ $0x0000000f, R8
+ MOVQ R8, X3
+ VPBROADCASTB X3, Y3
+ MOVQ start+72(FP), R8
+
+mulAvxTwo_2x3_loop:
+ // Clear 3 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+
+ // Load and process 32 bytes from input 0 to 3 outputs
+ VMOVDQU (DI)(R8*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU (CX), Y4
+ VMOVDQU 32(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 64(CX), Y4
+ VMOVDQU 96(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 128(CX), Y4
+ VMOVDQU 160(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 1 to 3 outputs
+ VMOVDQU (SI)(R8*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 192(CX), Y4
+ VMOVDQU 224(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 256(CX), Y4
+ VMOVDQU 288(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 320(CX), Y4
+ VMOVDQU 352(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Store 3 outputs
+ VMOVDQU Y0, (BX)(R8*1)
+ VMOVDQU Y1, (BP)(R8*1)
+ VMOVDQU Y2, (DX)(R8*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R8
+ DECQ AX
+ JNZ mulAvxTwo_2x3_loop
+ VZEROUPPER
+
+mulAvxTwo_2x3_end:
+ RET
+
+// func mulAvxTwo_2x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_2x4(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 25 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_2x4_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DX
+ MOVQ in_base+24(FP), DI
+ MOVQ (DI), R8
+ MOVQ 24(DI), DI
+ MOVQ $0x0000000f, R9
+ MOVQ R9, X4
+ VPBROADCASTB X4, Y4
+ MOVQ start+72(FP), R9
+
+mulAvxTwo_2x4_loop:
+ // Clear 4 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+
+ // Load and process 32 bytes from input 0 to 4 outputs
+ VMOVDQU (R8)(R9*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU (CX), Y5
+ VMOVDQU 32(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 64(CX), Y5
+ VMOVDQU 96(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 192(CX), Y5
+ VMOVDQU 224(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 1 to 4 outputs
+ VMOVDQU (DI)(R9*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 256(CX), Y5
+ VMOVDQU 288(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 320(CX), Y5
+ VMOVDQU 352(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 384(CX), Y5
+ VMOVDQU 416(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 448(CX), Y5
+ VMOVDQU 480(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Store 4 outputs
+ VMOVDQU Y0, (BX)(R9*1)
+ VMOVDQU Y1, (BP)(R9*1)
+ VMOVDQU Y2, (SI)(R9*1)
+ VMOVDQU Y3, (DX)(R9*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R9
+ DECQ AX
+ JNZ mulAvxTwo_2x4_loop
+ VZEROUPPER
+
+mulAvxTwo_2x4_end:
+ RET
+
+// func mulAvxTwo_2x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_2x5(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 30 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_2x5_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), DX
+ MOVQ in_base+24(FP), R8
+ MOVQ (R8), R9
+ MOVQ 24(R8), R8
+ MOVQ $0x0000000f, R10
+ MOVQ R10, X5
+ VPBROADCASTB X5, Y5
+ MOVQ start+72(FP), R10
+
+mulAvxTwo_2x5_loop:
+ // Clear 5 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+
+ // Load and process 32 bytes from input 0 to 5 outputs
+ VMOVDQU (R9)(R10*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU (CX), Y6
+ VMOVDQU 32(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 64(CX), Y6
+ VMOVDQU 96(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 128(CX), Y6
+ VMOVDQU 160(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 192(CX), Y6
+ VMOVDQU 224(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 256(CX), Y6
+ VMOVDQU 288(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 1 to 5 outputs
+ VMOVDQU (R8)(R10*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 320(CX), Y6
+ VMOVDQU 352(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 384(CX), Y6
+ VMOVDQU 416(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 448(CX), Y6
+ VMOVDQU 480(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 512(CX), Y6
+ VMOVDQU 544(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 576(CX), Y6
+ VMOVDQU 608(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Store 5 outputs
+ VMOVDQU Y0, (BX)(R10*1)
+ VMOVDQU Y1, (BP)(R10*1)
+ VMOVDQU Y2, (SI)(R10*1)
+ VMOVDQU Y3, (DI)(R10*1)
+ VMOVDQU Y4, (DX)(R10*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R10
+ DECQ AX
+ JNZ mulAvxTwo_2x5_loop
+ VZEROUPPER
+
+mulAvxTwo_2x5_end:
+ RET
+
+// func mulAvxTwo_2x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_2x6(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 35 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_2x6_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), DX
+ MOVQ in_base+24(FP), R9
+ MOVQ (R9), R10
+ MOVQ 24(R9), R9
+ MOVQ $0x0000000f, R11
+ MOVQ R11, X6
+ VPBROADCASTB X6, Y6
+ MOVQ start+72(FP), R11
+
+mulAvxTwo_2x6_loop:
+ // Clear 6 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+
+ // Load and process 32 bytes from input 0 to 6 outputs
+ VMOVDQU (R10)(R11*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU (CX), Y7
+ VMOVDQU 32(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 64(CX), Y7
+ VMOVDQU 96(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 128(CX), Y7
+ VMOVDQU 160(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 192(CX), Y7
+ VMOVDQU 224(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 256(CX), Y7
+ VMOVDQU 288(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 320(CX), Y7
+ VMOVDQU 352(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 1 to 6 outputs
+ VMOVDQU (R9)(R11*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 384(CX), Y7
+ VMOVDQU 416(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 448(CX), Y7
+ VMOVDQU 480(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 512(CX), Y7
+ VMOVDQU 544(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 576(CX), Y7
+ VMOVDQU 608(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 640(CX), Y7
+ VMOVDQU 672(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 704(CX), Y7
+ VMOVDQU 736(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Store 6 outputs
+ VMOVDQU Y0, (BX)(R11*1)
+ VMOVDQU Y1, (BP)(R11*1)
+ VMOVDQU Y2, (SI)(R11*1)
+ VMOVDQU Y3, (DI)(R11*1)
+ VMOVDQU Y4, (R8)(R11*1)
+ VMOVDQU Y5, (DX)(R11*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R11
+ DECQ AX
+ JNZ mulAvxTwo_2x6_loop
+ VZEROUPPER
+
+mulAvxTwo_2x6_end:
+ RET
+
+// func mulAvxTwo_2x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_2x7(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 40 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_2x7_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), R9
+ MOVQ 144(DX), DX
+ MOVQ in_base+24(FP), R10
+ MOVQ (R10), R11
+ MOVQ 24(R10), R10
+ MOVQ $0x0000000f, R12
+ MOVQ R12, X7
+ VPBROADCASTB X7, Y7
+ MOVQ start+72(FP), R12
+
+mulAvxTwo_2x7_loop:
+ // Clear 7 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+
+ // Load and process 32 bytes from input 0 to 7 outputs
+ VMOVDQU (R11)(R12*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU (CX), Y8
+ VMOVDQU 32(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 64(CX), Y8
+ VMOVDQU 96(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 128(CX), Y8
+ VMOVDQU 160(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 192(CX), Y8
+ VMOVDQU 224(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 256(CX), Y8
+ VMOVDQU 288(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 320(CX), Y8
+ VMOVDQU 352(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 384(CX), Y8
+ VMOVDQU 416(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 1 to 7 outputs
+ VMOVDQU (R10)(R12*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 448(CX), Y8
+ VMOVDQU 480(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 512(CX), Y8
+ VMOVDQU 544(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 576(CX), Y8
+ VMOVDQU 608(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 640(CX), Y8
+ VMOVDQU 672(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 704(CX), Y8
+ VMOVDQU 736(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 768(CX), Y8
+ VMOVDQU 800(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 832(CX), Y8
+ VMOVDQU 864(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Store 7 outputs
+ VMOVDQU Y0, (BX)(R12*1)
+ VMOVDQU Y1, (BP)(R12*1)
+ VMOVDQU Y2, (SI)(R12*1)
+ VMOVDQU Y3, (DI)(R12*1)
+ VMOVDQU Y4, (R8)(R12*1)
+ VMOVDQU Y5, (R9)(R12*1)
+ VMOVDQU Y6, (DX)(R12*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R12
+ DECQ AX
+ JNZ mulAvxTwo_2x7_loop
+ VZEROUPPER
+
+mulAvxTwo_2x7_end:
+ RET
+
+// func mulAvxTwo_2x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_2x8(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 45 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_2x8_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), R9
+ MOVQ 144(DX), R10
+ MOVQ 168(DX), DX
+ MOVQ in_base+24(FP), R11
+ MOVQ (R11), R12
+ MOVQ 24(R11), R11
+ MOVQ $0x0000000f, R13
+ MOVQ R13, X8
+ VPBROADCASTB X8, Y8
+ MOVQ start+72(FP), R13
+
+mulAvxTwo_2x8_loop:
+ // Clear 8 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+ VPXOR Y7, Y7, Y7
+
+ // Load and process 32 bytes from input 0 to 8 outputs
+ VMOVDQU (R12)(R13*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU (CX), Y9
+ VMOVDQU 32(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 64(CX), Y9
+ VMOVDQU 96(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 128(CX), Y9
+ VMOVDQU 160(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 192(CX), Y9
+ VMOVDQU 224(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 256(CX), Y9
+ VMOVDQU 288(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 320(CX), Y9
+ VMOVDQU 352(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 384(CX), Y9
+ VMOVDQU 416(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 448(CX), Y9
+ VMOVDQU 480(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 1 to 8 outputs
+ VMOVDQU (R11)(R13*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 512(CX), Y9
+ VMOVDQU 544(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 576(CX), Y9
+ VMOVDQU 608(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 640(CX), Y9
+ VMOVDQU 672(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 704(CX), Y9
+ VMOVDQU 736(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 768(CX), Y9
+ VMOVDQU 800(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 832(CX), Y9
+ VMOVDQU 864(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 896(CX), Y9
+ VMOVDQU 928(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 960(CX), Y9
+ VMOVDQU 992(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Store 8 outputs
+ VMOVDQU Y0, (BX)(R13*1)
+ VMOVDQU Y1, (BP)(R13*1)
+ VMOVDQU Y2, (SI)(R13*1)
+ VMOVDQU Y3, (DI)(R13*1)
+ VMOVDQU Y4, (R8)(R13*1)
+ VMOVDQU Y5, (R9)(R13*1)
+ VMOVDQU Y6, (R10)(R13*1)
+ VMOVDQU Y7, (DX)(R13*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R13
+ DECQ AX
+ JNZ mulAvxTwo_2x8_loop
+ VZEROUPPER
+
+mulAvxTwo_2x8_end:
+ RET
+
+// func mulAvxTwo_3x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_3x1(SB), $0-88
+ // Loading all tables to registers
+ // Full registers estimated 10 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_3x1_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), DX
+ VMOVDQU (CX), Y1
+ VMOVDQU 32(CX), Y2
+ VMOVDQU 64(CX), Y3
+ VMOVDQU 96(CX), Y4
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ MOVQ in_base+24(FP), CX
+ MOVQ (CX), BX
+ MOVQ 24(CX), BP
+ MOVQ 48(CX), CX
+ MOVQ $0x0000000f, SI
+ MOVQ SI, X7
+ VPBROADCASTB X7, Y7
+ MOVQ start+72(FP), SI
+
+mulAvxTwo_3x1_loop:
+ // Clear 1 outputs
+ VPXOR Y0, Y0, Y0
+
+ // Load and process 32 bytes from input 0 to 1 outputs
+ VMOVDQU (BX)(SI*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y7, Y8, Y8
+ VPAND Y7, Y9, Y9
+ VPSHUFB Y8, Y1, Y8
+ VPSHUFB Y9, Y2, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+
+ // Load and process 32 bytes from input 1 to 1 outputs
+ VMOVDQU (BP)(SI*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y7, Y8, Y8
+ VPAND Y7, Y9, Y9
+ VPSHUFB Y8, Y3, Y8
+ VPSHUFB Y9, Y4, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+
+ // Load and process 32 bytes from input 2 to 1 outputs
+ VMOVDQU (CX)(SI*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y7, Y8, Y8
+ VPAND Y7, Y9, Y9
+ VPSHUFB Y8, Y5, Y8
+ VPSHUFB Y9, Y6, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+
+ // Store 1 outputs
+ VMOVDQU Y0, (DX)(SI*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, SI
+ DECQ AX
+ JNZ mulAvxTwo_3x1_loop
+ VZEROUPPER
+
+mulAvxTwo_3x1_end:
+ RET
+
+// func mulAvxTwo_3x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_3x2(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 19 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_3x2_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), DX
+ MOVQ in_base+24(FP), BP
+ MOVQ (BP), SI
+ MOVQ 24(BP), DI
+ MOVQ 48(BP), BP
+ MOVQ $0x0000000f, R8
+ MOVQ R8, X2
+ VPBROADCASTB X2, Y2
+ MOVQ start+72(FP), R8
+
+mulAvxTwo_3x2_loop:
+ // Clear 2 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+
+ // Load and process 32 bytes from input 0 to 2 outputs
+ VMOVDQU (SI)(R8*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU (CX), Y3
+ VMOVDQU 32(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 64(CX), Y3
+ VMOVDQU 96(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 1 to 2 outputs
+ VMOVDQU (DI)(R8*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 128(CX), Y3
+ VMOVDQU 160(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 192(CX), Y3
+ VMOVDQU 224(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 2 to 2 outputs
+ VMOVDQU (BP)(R8*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 256(CX), Y3
+ VMOVDQU 288(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 320(CX), Y3
+ VMOVDQU 352(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Store 2 outputs
+ VMOVDQU Y0, (BX)(R8*1)
+ VMOVDQU Y1, (DX)(R8*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R8
+ DECQ AX
+ JNZ mulAvxTwo_3x2_loop
+ VZEROUPPER
+
+mulAvxTwo_3x2_end:
+ RET
+
+// func mulAvxTwo_3x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_3x3(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 26 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_3x3_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), DX
+ MOVQ in_base+24(FP), SI
+ MOVQ (SI), DI
+ MOVQ 24(SI), R8
+ MOVQ 48(SI), SI
+ MOVQ $0x0000000f, R9
+ MOVQ R9, X3
+ VPBROADCASTB X3, Y3
+ MOVQ start+72(FP), R9
+
+mulAvxTwo_3x3_loop:
+ // Clear 3 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+
+ // Load and process 32 bytes from input 0 to 3 outputs
+ VMOVDQU (DI)(R9*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU (CX), Y4
+ VMOVDQU 32(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 64(CX), Y4
+ VMOVDQU 96(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 128(CX), Y4
+ VMOVDQU 160(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 1 to 3 outputs
+ VMOVDQU (R8)(R9*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 192(CX), Y4
+ VMOVDQU 224(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 256(CX), Y4
+ VMOVDQU 288(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 320(CX), Y4
+ VMOVDQU 352(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 2 to 3 outputs
+ VMOVDQU (SI)(R9*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 384(CX), Y4
+ VMOVDQU 416(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 448(CX), Y4
+ VMOVDQU 480(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 512(CX), Y4
+ VMOVDQU 544(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Store 3 outputs
+ VMOVDQU Y0, (BX)(R9*1)
+ VMOVDQU Y1, (BP)(R9*1)
+ VMOVDQU Y2, (DX)(R9*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R9
+ DECQ AX
+ JNZ mulAvxTwo_3x3_loop
+ VZEROUPPER
+
+mulAvxTwo_3x3_end:
+ RET
+
+// func mulAvxTwo_3x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_3x4(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 33 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_3x4_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DX
+ MOVQ in_base+24(FP), DI
+ MOVQ (DI), R8
+ MOVQ 24(DI), R9
+ MOVQ 48(DI), DI
+ MOVQ $0x0000000f, R10
+ MOVQ R10, X4
+ VPBROADCASTB X4, Y4
+ MOVQ start+72(FP), R10
+
+mulAvxTwo_3x4_loop:
+ // Clear 4 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+
+ // Load and process 32 bytes from input 0 to 4 outputs
+ VMOVDQU (R8)(R10*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU (CX), Y5
+ VMOVDQU 32(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 64(CX), Y5
+ VMOVDQU 96(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 192(CX), Y5
+ VMOVDQU 224(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 1 to 4 outputs
+ VMOVDQU (R9)(R10*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 256(CX), Y5
+ VMOVDQU 288(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 320(CX), Y5
+ VMOVDQU 352(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 384(CX), Y5
+ VMOVDQU 416(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 448(CX), Y5
+ VMOVDQU 480(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 2 to 4 outputs
+ VMOVDQU (DI)(R10*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 512(CX), Y5
+ VMOVDQU 544(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 576(CX), Y5
+ VMOVDQU 608(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 640(CX), Y5
+ VMOVDQU 672(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 704(CX), Y5
+ VMOVDQU 736(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Store 4 outputs
+ VMOVDQU Y0, (BX)(R10*1)
+ VMOVDQU Y1, (BP)(R10*1)
+ VMOVDQU Y2, (SI)(R10*1)
+ VMOVDQU Y3, (DX)(R10*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R10
+ DECQ AX
+ JNZ mulAvxTwo_3x4_loop
+ VZEROUPPER
+
+mulAvxTwo_3x4_end:
+ RET
+
+// func mulAvxTwo_3x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_3x5(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 40 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_3x5_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), DX
+ MOVQ in_base+24(FP), R8
+ MOVQ (R8), R9
+ MOVQ 24(R8), R10
+ MOVQ 48(R8), R8
+ MOVQ $0x0000000f, R11
+ MOVQ R11, X5
+ VPBROADCASTB X5, Y5
+ MOVQ start+72(FP), R11
+
+mulAvxTwo_3x5_loop:
+ // Clear 5 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+
+ // Load and process 32 bytes from input 0 to 5 outputs
+ VMOVDQU (R9)(R11*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU (CX), Y6
+ VMOVDQU 32(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 64(CX), Y6
+ VMOVDQU 96(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 128(CX), Y6
+ VMOVDQU 160(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 192(CX), Y6
+ VMOVDQU 224(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 256(CX), Y6
+ VMOVDQU 288(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 1 to 5 outputs
+ VMOVDQU (R10)(R11*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 320(CX), Y6
+ VMOVDQU 352(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 384(CX), Y6
+ VMOVDQU 416(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 448(CX), Y6
+ VMOVDQU 480(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 512(CX), Y6
+ VMOVDQU 544(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 576(CX), Y6
+ VMOVDQU 608(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 2 to 5 outputs
+ VMOVDQU (R8)(R11*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 640(CX), Y6
+ VMOVDQU 672(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 704(CX), Y6
+ VMOVDQU 736(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 768(CX), Y6
+ VMOVDQU 800(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 832(CX), Y6
+ VMOVDQU 864(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 896(CX), Y6
+ VMOVDQU 928(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Store 5 outputs
+ VMOVDQU Y0, (BX)(R11*1)
+ VMOVDQU Y1, (BP)(R11*1)
+ VMOVDQU Y2, (SI)(R11*1)
+ VMOVDQU Y3, (DI)(R11*1)
+ VMOVDQU Y4, (DX)(R11*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R11
+ DECQ AX
+ JNZ mulAvxTwo_3x5_loop
+ VZEROUPPER
+
+mulAvxTwo_3x5_end:
+ RET
+
+// func mulAvxTwo_3x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_3x6(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 47 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_3x6_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), DX
+ MOVQ in_base+24(FP), R9
+ MOVQ (R9), R10
+ MOVQ 24(R9), R11
+ MOVQ 48(R9), R9
+ MOVQ $0x0000000f, R12
+ MOVQ R12, X6
+ VPBROADCASTB X6, Y6
+ MOVQ start+72(FP), R12
+
+mulAvxTwo_3x6_loop:
+ // Clear 6 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+
+ // Load and process 32 bytes from input 0 to 6 outputs
+ VMOVDQU (R10)(R12*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU (CX), Y7
+ VMOVDQU 32(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 64(CX), Y7
+ VMOVDQU 96(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 128(CX), Y7
+ VMOVDQU 160(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 192(CX), Y7
+ VMOVDQU 224(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 256(CX), Y7
+ VMOVDQU 288(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 320(CX), Y7
+ VMOVDQU 352(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 1 to 6 outputs
+ VMOVDQU (R11)(R12*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 384(CX), Y7
+ VMOVDQU 416(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 448(CX), Y7
+ VMOVDQU 480(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 512(CX), Y7
+ VMOVDQU 544(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 576(CX), Y7
+ VMOVDQU 608(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 640(CX), Y7
+ VMOVDQU 672(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 704(CX), Y7
+ VMOVDQU 736(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 2 to 6 outputs
+ VMOVDQU (R9)(R12*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 768(CX), Y7
+ VMOVDQU 800(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 832(CX), Y7
+ VMOVDQU 864(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 896(CX), Y7
+ VMOVDQU 928(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 960(CX), Y7
+ VMOVDQU 992(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1024(CX), Y7
+ VMOVDQU 1056(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1088(CX), Y7
+ VMOVDQU 1120(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Store 6 outputs
+ VMOVDQU Y0, (BX)(R12*1)
+ VMOVDQU Y1, (BP)(R12*1)
+ VMOVDQU Y2, (SI)(R12*1)
+ VMOVDQU Y3, (DI)(R12*1)
+ VMOVDQU Y4, (R8)(R12*1)
+ VMOVDQU Y5, (DX)(R12*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R12
+ DECQ AX
+ JNZ mulAvxTwo_3x6_loop
+ VZEROUPPER
+
+mulAvxTwo_3x6_end:
+ RET
+
+// func mulAvxTwo_3x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_3x7(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 54 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_3x7_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), R9
+ MOVQ 144(DX), DX
+ MOVQ in_base+24(FP), R10
+ MOVQ (R10), R11
+ MOVQ 24(R10), R12
+ MOVQ 48(R10), R10
+ MOVQ $0x0000000f, R13
+ MOVQ R13, X7
+ VPBROADCASTB X7, Y7
+ MOVQ start+72(FP), R13
+
+mulAvxTwo_3x7_loop:
+ // Clear 7 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+
+ // Load and process 32 bytes from input 0 to 7 outputs
+ VMOVDQU (R11)(R13*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU (CX), Y8
+ VMOVDQU 32(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 64(CX), Y8
+ VMOVDQU 96(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 128(CX), Y8
+ VMOVDQU 160(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 192(CX), Y8
+ VMOVDQU 224(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 256(CX), Y8
+ VMOVDQU 288(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 320(CX), Y8
+ VMOVDQU 352(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 384(CX), Y8
+ VMOVDQU 416(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 1 to 7 outputs
+ VMOVDQU (R12)(R13*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 448(CX), Y8
+ VMOVDQU 480(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 512(CX), Y8
+ VMOVDQU 544(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 576(CX), Y8
+ VMOVDQU 608(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 640(CX), Y8
+ VMOVDQU 672(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 704(CX), Y8
+ VMOVDQU 736(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 768(CX), Y8
+ VMOVDQU 800(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 832(CX), Y8
+ VMOVDQU 864(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 2 to 7 outputs
+ VMOVDQU (R10)(R13*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 896(CX), Y8
+ VMOVDQU 928(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 960(CX), Y8
+ VMOVDQU 992(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1024(CX), Y8
+ VMOVDQU 1056(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1088(CX), Y8
+ VMOVDQU 1120(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1152(CX), Y8
+ VMOVDQU 1184(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1216(CX), Y8
+ VMOVDQU 1248(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1280(CX), Y8
+ VMOVDQU 1312(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Store 7 outputs
+ VMOVDQU Y0, (BX)(R13*1)
+ VMOVDQU Y1, (BP)(R13*1)
+ VMOVDQU Y2, (SI)(R13*1)
+ VMOVDQU Y3, (DI)(R13*1)
+ VMOVDQU Y4, (R8)(R13*1)
+ VMOVDQU Y5, (R9)(R13*1)
+ VMOVDQU Y6, (DX)(R13*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R13
+ DECQ AX
+ JNZ mulAvxTwo_3x7_loop
+ VZEROUPPER
+
+mulAvxTwo_3x7_end:
+ RET
+
+// func mulAvxTwo_3x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_3x8(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 61 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_3x8_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), R9
+ MOVQ 144(DX), R10
+ MOVQ 168(DX), DX
+ MOVQ in_base+24(FP), R11
+ MOVQ (R11), R12
+ MOVQ 24(R11), R13
+ MOVQ 48(R11), R11
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X8
+ VPBROADCASTB X8, Y8
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_3x8_loop:
+ // Clear 8 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+ VPXOR Y7, Y7, Y7
+
+ // Load and process 32 bytes from input 0 to 8 outputs
+ VMOVDQU (R12)(R14*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU (CX), Y9
+ VMOVDQU 32(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 64(CX), Y9
+ VMOVDQU 96(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 128(CX), Y9
+ VMOVDQU 160(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 192(CX), Y9
+ VMOVDQU 224(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 256(CX), Y9
+ VMOVDQU 288(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 320(CX), Y9
+ VMOVDQU 352(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 384(CX), Y9
+ VMOVDQU 416(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 448(CX), Y9
+ VMOVDQU 480(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 1 to 8 outputs
+ VMOVDQU (R13)(R14*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 512(CX), Y9
+ VMOVDQU 544(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 576(CX), Y9
+ VMOVDQU 608(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 640(CX), Y9
+ VMOVDQU 672(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 704(CX), Y9
+ VMOVDQU 736(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 768(CX), Y9
+ VMOVDQU 800(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 832(CX), Y9
+ VMOVDQU 864(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 896(CX), Y9
+ VMOVDQU 928(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 960(CX), Y9
+ VMOVDQU 992(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 2 to 8 outputs
+ VMOVDQU (R11)(R14*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1024(CX), Y9
+ VMOVDQU 1056(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1088(CX), Y9
+ VMOVDQU 1120(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1152(CX), Y9
+ VMOVDQU 1184(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1216(CX), Y9
+ VMOVDQU 1248(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1280(CX), Y9
+ VMOVDQU 1312(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1344(CX), Y9
+ VMOVDQU 1376(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1408(CX), Y9
+ VMOVDQU 1440(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1472(CX), Y9
+ VMOVDQU 1504(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Store 8 outputs
+ VMOVDQU Y0, (BX)(R14*1)
+ VMOVDQU Y1, (BP)(R14*1)
+ VMOVDQU Y2, (SI)(R14*1)
+ VMOVDQU Y3, (DI)(R14*1)
+ VMOVDQU Y4, (R8)(R14*1)
+ VMOVDQU Y5, (R9)(R14*1)
+ VMOVDQU Y6, (R10)(R14*1)
+ VMOVDQU Y7, (DX)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_3x8_loop
+ VZEROUPPER
+
+mulAvxTwo_3x8_end:
+ RET
+
+// func mulAvxTwo_4x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_4x1(SB), $0-88
+ // Loading all tables to registers
+ // Full registers estimated 12 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_4x1_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), DX
+ VMOVDQU (CX), Y1
+ VMOVDQU 32(CX), Y2
+ VMOVDQU 64(CX), Y3
+ VMOVDQU 96(CX), Y4
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ VMOVDQU 192(CX), Y7
+ VMOVDQU 224(CX), Y8
+ MOVQ in_base+24(FP), CX
+ MOVQ (CX), BX
+ MOVQ 24(CX), BP
+ MOVQ 48(CX), SI
+ MOVQ 72(CX), CX
+ MOVQ $0x0000000f, DI
+ MOVQ DI, X9
+ VPBROADCASTB X9, Y9
+ MOVQ start+72(FP), DI
+
+mulAvxTwo_4x1_loop:
+ // Clear 1 outputs
+ VPXOR Y0, Y0, Y0
+
+ // Load and process 32 bytes from input 0 to 1 outputs
+ VMOVDQU (BX)(DI*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y9, Y10, Y10
+ VPAND Y9, Y11, Y11
+ VPSHUFB Y10, Y1, Y10
+ VPSHUFB Y11, Y2, Y11
+ VPXOR Y10, Y11, Y10
+ VPXOR Y10, Y0, Y0
+
+ // Load and process 32 bytes from input 1 to 1 outputs
+ VMOVDQU (BP)(DI*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y9, Y10, Y10
+ VPAND Y9, Y11, Y11
+ VPSHUFB Y10, Y3, Y10
+ VPSHUFB Y11, Y4, Y11
+ VPXOR Y10, Y11, Y10
+ VPXOR Y10, Y0, Y0
+
+ // Load and process 32 bytes from input 2 to 1 outputs
+ VMOVDQU (SI)(DI*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y9, Y10, Y10
+ VPAND Y9, Y11, Y11
+ VPSHUFB Y10, Y5, Y10
+ VPSHUFB Y11, Y6, Y11
+ VPXOR Y10, Y11, Y10
+ VPXOR Y10, Y0, Y0
+
+ // Load and process 32 bytes from input 3 to 1 outputs
+ VMOVDQU (CX)(DI*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y9, Y10, Y10
+ VPAND Y9, Y11, Y11
+ VPSHUFB Y10, Y7, Y10
+ VPSHUFB Y11, Y8, Y11
+ VPXOR Y10, Y11, Y10
+ VPXOR Y10, Y0, Y0
+
+ // Store 1 outputs
+ VMOVDQU Y0, (DX)(DI*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, DI
+ DECQ AX
+ JNZ mulAvxTwo_4x1_loop
+ VZEROUPPER
+
+mulAvxTwo_4x1_end:
+ RET
+
+// func mulAvxTwo_4x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_4x2(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 23 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_4x2_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), DX
+ MOVQ in_base+24(FP), BP
+ MOVQ (BP), SI
+ MOVQ 24(BP), DI
+ MOVQ 48(BP), R8
+ MOVQ 72(BP), BP
+ MOVQ $0x0000000f, R9
+ MOVQ R9, X2
+ VPBROADCASTB X2, Y2
+ MOVQ start+72(FP), R9
+
+mulAvxTwo_4x2_loop:
+ // Clear 2 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+
+ // Load and process 32 bytes from input 0 to 2 outputs
+ VMOVDQU (SI)(R9*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU (CX), Y3
+ VMOVDQU 32(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 64(CX), Y3
+ VMOVDQU 96(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 1 to 2 outputs
+ VMOVDQU (DI)(R9*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 128(CX), Y3
+ VMOVDQU 160(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 192(CX), Y3
+ VMOVDQU 224(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 2 to 2 outputs
+ VMOVDQU (R8)(R9*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 256(CX), Y3
+ VMOVDQU 288(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 320(CX), Y3
+ VMOVDQU 352(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 3 to 2 outputs
+ VMOVDQU (BP)(R9*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 384(CX), Y3
+ VMOVDQU 416(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 448(CX), Y3
+ VMOVDQU 480(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Store 2 outputs
+ VMOVDQU Y0, (BX)(R9*1)
+ VMOVDQU Y1, (DX)(R9*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R9
+ DECQ AX
+ JNZ mulAvxTwo_4x2_loop
+ VZEROUPPER
+
+mulAvxTwo_4x2_end:
+ RET
+
+// func mulAvxTwo_4x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_4x3(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 32 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_4x3_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), DX
+ MOVQ in_base+24(FP), SI
+ MOVQ (SI), DI
+ MOVQ 24(SI), R8
+ MOVQ 48(SI), R9
+ MOVQ 72(SI), SI
+ MOVQ $0x0000000f, R10
+ MOVQ R10, X3
+ VPBROADCASTB X3, Y3
+ MOVQ start+72(FP), R10
+
+mulAvxTwo_4x3_loop:
+ // Clear 3 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+
+ // Load and process 32 bytes from input 0 to 3 outputs
+ VMOVDQU (DI)(R10*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU (CX), Y4
+ VMOVDQU 32(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 64(CX), Y4
+ VMOVDQU 96(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 128(CX), Y4
+ VMOVDQU 160(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 1 to 3 outputs
+ VMOVDQU (R8)(R10*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 192(CX), Y4
+ VMOVDQU 224(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 256(CX), Y4
+ VMOVDQU 288(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 320(CX), Y4
+ VMOVDQU 352(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 2 to 3 outputs
+ VMOVDQU (R9)(R10*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 384(CX), Y4
+ VMOVDQU 416(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 448(CX), Y4
+ VMOVDQU 480(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 512(CX), Y4
+ VMOVDQU 544(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 3 to 3 outputs
+ VMOVDQU (SI)(R10*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 576(CX), Y4
+ VMOVDQU 608(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 640(CX), Y4
+ VMOVDQU 672(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 704(CX), Y4
+ VMOVDQU 736(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Store 3 outputs
+ VMOVDQU Y0, (BX)(R10*1)
+ VMOVDQU Y1, (BP)(R10*1)
+ VMOVDQU Y2, (DX)(R10*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R10
+ DECQ AX
+ JNZ mulAvxTwo_4x3_loop
+ VZEROUPPER
+
+mulAvxTwo_4x3_end:
+ RET
+
+// func mulAvxTwo_4x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_4x4(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 41 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_4x4_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DX
+ MOVQ in_base+24(FP), DI
+ MOVQ (DI), R8
+ MOVQ 24(DI), R9
+ MOVQ 48(DI), R10
+ MOVQ 72(DI), DI
+ MOVQ $0x0000000f, R11
+ MOVQ R11, X4
+ VPBROADCASTB X4, Y4
+ MOVQ start+72(FP), R11
+
+mulAvxTwo_4x4_loop:
+ // Clear 4 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+
+ // Load and process 32 bytes from input 0 to 4 outputs
+ VMOVDQU (R8)(R11*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU (CX), Y5
+ VMOVDQU 32(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 64(CX), Y5
+ VMOVDQU 96(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 192(CX), Y5
+ VMOVDQU 224(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 1 to 4 outputs
+ VMOVDQU (R9)(R11*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 256(CX), Y5
+ VMOVDQU 288(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 320(CX), Y5
+ VMOVDQU 352(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 384(CX), Y5
+ VMOVDQU 416(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 448(CX), Y5
+ VMOVDQU 480(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 2 to 4 outputs
+ VMOVDQU (R10)(R11*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 512(CX), Y5
+ VMOVDQU 544(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 576(CX), Y5
+ VMOVDQU 608(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 640(CX), Y5
+ VMOVDQU 672(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 704(CX), Y5
+ VMOVDQU 736(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 3 to 4 outputs
+ VMOVDQU (DI)(R11*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 768(CX), Y5
+ VMOVDQU 800(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 832(CX), Y5
+ VMOVDQU 864(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 896(CX), Y5
+ VMOVDQU 928(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 960(CX), Y5
+ VMOVDQU 992(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Store 4 outputs
+ VMOVDQU Y0, (BX)(R11*1)
+ VMOVDQU Y1, (BP)(R11*1)
+ VMOVDQU Y2, (SI)(R11*1)
+ VMOVDQU Y3, (DX)(R11*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R11
+ DECQ AX
+ JNZ mulAvxTwo_4x4_loop
+ VZEROUPPER
+
+mulAvxTwo_4x4_end:
+ RET
+
+// func mulAvxTwo_4x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_4x5(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 50 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_4x5_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), DX
+ MOVQ in_base+24(FP), R8
+ MOVQ (R8), R9
+ MOVQ 24(R8), R10
+ MOVQ 48(R8), R11
+ MOVQ 72(R8), R8
+ MOVQ $0x0000000f, R12
+ MOVQ R12, X5
+ VPBROADCASTB X5, Y5
+ MOVQ start+72(FP), R12
+
+mulAvxTwo_4x5_loop:
+ // Clear 5 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+
+ // Load and process 32 bytes from input 0 to 5 outputs
+ VMOVDQU (R9)(R12*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU (CX), Y6
+ VMOVDQU 32(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 64(CX), Y6
+ VMOVDQU 96(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 128(CX), Y6
+ VMOVDQU 160(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 192(CX), Y6
+ VMOVDQU 224(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 256(CX), Y6
+ VMOVDQU 288(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 1 to 5 outputs
+ VMOVDQU (R10)(R12*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 320(CX), Y6
+ VMOVDQU 352(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 384(CX), Y6
+ VMOVDQU 416(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 448(CX), Y6
+ VMOVDQU 480(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 512(CX), Y6
+ VMOVDQU 544(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 576(CX), Y6
+ VMOVDQU 608(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 2 to 5 outputs
+ VMOVDQU (R11)(R12*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 640(CX), Y6
+ VMOVDQU 672(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 704(CX), Y6
+ VMOVDQU 736(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 768(CX), Y6
+ VMOVDQU 800(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 832(CX), Y6
+ VMOVDQU 864(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 896(CX), Y6
+ VMOVDQU 928(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 3 to 5 outputs
+ VMOVDQU (R8)(R12*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 960(CX), Y6
+ VMOVDQU 992(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1024(CX), Y6
+ VMOVDQU 1056(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1088(CX), Y6
+ VMOVDQU 1120(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1152(CX), Y6
+ VMOVDQU 1184(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1216(CX), Y6
+ VMOVDQU 1248(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Store 5 outputs
+ VMOVDQU Y0, (BX)(R12*1)
+ VMOVDQU Y1, (BP)(R12*1)
+ VMOVDQU Y2, (SI)(R12*1)
+ VMOVDQU Y3, (DI)(R12*1)
+ VMOVDQU Y4, (DX)(R12*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R12
+ DECQ AX
+ JNZ mulAvxTwo_4x5_loop
+ VZEROUPPER
+
+mulAvxTwo_4x5_end:
+ RET
+
+// func mulAvxTwo_4x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_4x6(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 59 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_4x6_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), DX
+ MOVQ in_base+24(FP), R9
+ MOVQ (R9), R10
+ MOVQ 24(R9), R11
+ MOVQ 48(R9), R12
+ MOVQ 72(R9), R9
+ MOVQ $0x0000000f, R13
+ MOVQ R13, X6
+ VPBROADCASTB X6, Y6
+ MOVQ start+72(FP), R13
+
+mulAvxTwo_4x6_loop:
+ // Clear 6 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+
+ // Load and process 32 bytes from input 0 to 6 outputs
+ VMOVDQU (R10)(R13*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU (CX), Y7
+ VMOVDQU 32(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 64(CX), Y7
+ VMOVDQU 96(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 128(CX), Y7
+ VMOVDQU 160(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 192(CX), Y7
+ VMOVDQU 224(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 256(CX), Y7
+ VMOVDQU 288(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 320(CX), Y7
+ VMOVDQU 352(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 1 to 6 outputs
+ VMOVDQU (R11)(R13*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 384(CX), Y7
+ VMOVDQU 416(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 448(CX), Y7
+ VMOVDQU 480(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 512(CX), Y7
+ VMOVDQU 544(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 576(CX), Y7
+ VMOVDQU 608(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 640(CX), Y7
+ VMOVDQU 672(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 704(CX), Y7
+ VMOVDQU 736(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 2 to 6 outputs
+ VMOVDQU (R12)(R13*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 768(CX), Y7
+ VMOVDQU 800(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 832(CX), Y7
+ VMOVDQU 864(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 896(CX), Y7
+ VMOVDQU 928(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 960(CX), Y7
+ VMOVDQU 992(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1024(CX), Y7
+ VMOVDQU 1056(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1088(CX), Y7
+ VMOVDQU 1120(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 3 to 6 outputs
+ VMOVDQU (R9)(R13*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1152(CX), Y7
+ VMOVDQU 1184(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1216(CX), Y7
+ VMOVDQU 1248(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 1280(CX), Y7
+ VMOVDQU 1312(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 1344(CX), Y7
+ VMOVDQU 1376(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1408(CX), Y7
+ VMOVDQU 1440(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1472(CX), Y7
+ VMOVDQU 1504(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Store 6 outputs
+ VMOVDQU Y0, (BX)(R13*1)
+ VMOVDQU Y1, (BP)(R13*1)
+ VMOVDQU Y2, (SI)(R13*1)
+ VMOVDQU Y3, (DI)(R13*1)
+ VMOVDQU Y4, (R8)(R13*1)
+ VMOVDQU Y5, (DX)(R13*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R13
+ DECQ AX
+ JNZ mulAvxTwo_4x6_loop
+ VZEROUPPER
+
+mulAvxTwo_4x6_end:
+ RET
+
+// func mulAvxTwo_4x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_4x7(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 68 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_4x7_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), R9
+ MOVQ 144(DX), DX
+ MOVQ in_base+24(FP), R10
+ MOVQ (R10), R11
+ MOVQ 24(R10), R12
+ MOVQ 48(R10), R13
+ MOVQ 72(R10), R10
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X7
+ VPBROADCASTB X7, Y7
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_4x7_loop:
+ // Clear 7 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+
+ // Load and process 32 bytes from input 0 to 7 outputs
+ VMOVDQU (R11)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU (CX), Y8
+ VMOVDQU 32(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 64(CX), Y8
+ VMOVDQU 96(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 128(CX), Y8
+ VMOVDQU 160(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 192(CX), Y8
+ VMOVDQU 224(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 256(CX), Y8
+ VMOVDQU 288(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 320(CX), Y8
+ VMOVDQU 352(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 384(CX), Y8
+ VMOVDQU 416(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 1 to 7 outputs
+ VMOVDQU (R12)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 448(CX), Y8
+ VMOVDQU 480(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 512(CX), Y8
+ VMOVDQU 544(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 576(CX), Y8
+ VMOVDQU 608(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 640(CX), Y8
+ VMOVDQU 672(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 704(CX), Y8
+ VMOVDQU 736(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 768(CX), Y8
+ VMOVDQU 800(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 832(CX), Y8
+ VMOVDQU 864(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 2 to 7 outputs
+ VMOVDQU (R13)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 896(CX), Y8
+ VMOVDQU 928(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 960(CX), Y8
+ VMOVDQU 992(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1024(CX), Y8
+ VMOVDQU 1056(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1088(CX), Y8
+ VMOVDQU 1120(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1152(CX), Y8
+ VMOVDQU 1184(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1216(CX), Y8
+ VMOVDQU 1248(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1280(CX), Y8
+ VMOVDQU 1312(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 3 to 7 outputs
+ VMOVDQU (R10)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 1344(CX), Y8
+ VMOVDQU 1376(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 1408(CX), Y8
+ VMOVDQU 1440(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1472(CX), Y8
+ VMOVDQU 1504(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1536(CX), Y8
+ VMOVDQU 1568(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1600(CX), Y8
+ VMOVDQU 1632(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1664(CX), Y8
+ VMOVDQU 1696(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1728(CX), Y8
+ VMOVDQU 1760(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Store 7 outputs
+ VMOVDQU Y0, (BX)(R14*1)
+ VMOVDQU Y1, (BP)(R14*1)
+ VMOVDQU Y2, (SI)(R14*1)
+ VMOVDQU Y3, (DI)(R14*1)
+ VMOVDQU Y4, (R8)(R14*1)
+ VMOVDQU Y5, (R9)(R14*1)
+ VMOVDQU Y6, (DX)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_4x7_loop
+ VZEROUPPER
+
+mulAvxTwo_4x7_end:
+ RET
+
+// func mulAvxTwo_4x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_4x8(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 77 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_4x8_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), R9
+ MOVQ 144(DX), R10
+ MOVQ 168(DX), DX
+ MOVQ in_base+24(FP), R11
+ MOVQ (R11), R12
+ MOVQ 24(R11), R13
+ MOVQ 48(R11), R14
+ MOVQ 72(R11), R11
+ MOVQ $0x0000000f, R15
+ MOVQ R15, X8
+ VPBROADCASTB X8, Y8
+ MOVQ start+72(FP), R15
+
+mulAvxTwo_4x8_loop:
+ // Clear 8 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+ VPXOR Y7, Y7, Y7
+
+ // Load and process 32 bytes from input 0 to 8 outputs
+ VMOVDQU (R12)(R15*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU (CX), Y9
+ VMOVDQU 32(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 64(CX), Y9
+ VMOVDQU 96(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 128(CX), Y9
+ VMOVDQU 160(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 192(CX), Y9
+ VMOVDQU 224(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 256(CX), Y9
+ VMOVDQU 288(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 320(CX), Y9
+ VMOVDQU 352(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 384(CX), Y9
+ VMOVDQU 416(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 448(CX), Y9
+ VMOVDQU 480(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 1 to 8 outputs
+ VMOVDQU (R13)(R15*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 512(CX), Y9
+ VMOVDQU 544(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 576(CX), Y9
+ VMOVDQU 608(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 640(CX), Y9
+ VMOVDQU 672(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 704(CX), Y9
+ VMOVDQU 736(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 768(CX), Y9
+ VMOVDQU 800(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 832(CX), Y9
+ VMOVDQU 864(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 896(CX), Y9
+ VMOVDQU 928(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 960(CX), Y9
+ VMOVDQU 992(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 2 to 8 outputs
+ VMOVDQU (R14)(R15*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1024(CX), Y9
+ VMOVDQU 1056(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1088(CX), Y9
+ VMOVDQU 1120(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1152(CX), Y9
+ VMOVDQU 1184(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1216(CX), Y9
+ VMOVDQU 1248(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1280(CX), Y9
+ VMOVDQU 1312(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1344(CX), Y9
+ VMOVDQU 1376(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1408(CX), Y9
+ VMOVDQU 1440(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1472(CX), Y9
+ VMOVDQU 1504(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 3 to 8 outputs
+ VMOVDQU (R11)(R15*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1536(CX), Y9
+ VMOVDQU 1568(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1600(CX), Y9
+ VMOVDQU 1632(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1664(CX), Y9
+ VMOVDQU 1696(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1728(CX), Y9
+ VMOVDQU 1760(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1792(CX), Y9
+ VMOVDQU 1824(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1856(CX), Y9
+ VMOVDQU 1888(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1920(CX), Y9
+ VMOVDQU 1952(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1984(CX), Y9
+ VMOVDQU 2016(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Store 8 outputs
+ VMOVDQU Y0, (BX)(R15*1)
+ VMOVDQU Y1, (BP)(R15*1)
+ VMOVDQU Y2, (SI)(R15*1)
+ VMOVDQU Y3, (DI)(R15*1)
+ VMOVDQU Y4, (R8)(R15*1)
+ VMOVDQU Y5, (R9)(R15*1)
+ VMOVDQU Y6, (R10)(R15*1)
+ VMOVDQU Y7, (DX)(R15*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R15
+ DECQ AX
+ JNZ mulAvxTwo_4x8_loop
+ VZEROUPPER
+
+mulAvxTwo_4x8_end:
+ RET
+
+// func mulAvxTwo_5x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_5x1(SB), $0-88
+ // Loading all tables to registers
+ // Full registers estimated 14 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_5x1_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), DX
+ VMOVDQU (CX), Y1
+ VMOVDQU 32(CX), Y2
+ VMOVDQU 64(CX), Y3
+ VMOVDQU 96(CX), Y4
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ VMOVDQU 192(CX), Y7
+ VMOVDQU 224(CX), Y8
+ VMOVDQU 256(CX), Y9
+ VMOVDQU 288(CX), Y10
+ MOVQ in_base+24(FP), CX
+ MOVQ (CX), BX
+ MOVQ 24(CX), BP
+ MOVQ 48(CX), SI
+ MOVQ 72(CX), DI
+ MOVQ 96(CX), CX
+ MOVQ $0x0000000f, R8
+ MOVQ R8, X11
+ VPBROADCASTB X11, Y11
+ MOVQ start+72(FP), R8
+
+mulAvxTwo_5x1_loop:
+ // Clear 1 outputs
+ VPXOR Y0, Y0, Y0
+
+ // Load and process 32 bytes from input 0 to 1 outputs
+ VMOVDQU (BX)(R8*1), Y12
+ VPSRLQ $0x04, Y12, Y13
+ VPAND Y11, Y12, Y12
+ VPAND Y11, Y13, Y13
+ VPSHUFB Y12, Y1, Y12
+ VPSHUFB Y13, Y2, Y13
+ VPXOR Y12, Y13, Y12
+ VPXOR Y12, Y0, Y0
+
+ // Load and process 32 bytes from input 1 to 1 outputs
+ VMOVDQU (BP)(R8*1), Y12
+ VPSRLQ $0x04, Y12, Y13
+ VPAND Y11, Y12, Y12
+ VPAND Y11, Y13, Y13
+ VPSHUFB Y12, Y3, Y12
+ VPSHUFB Y13, Y4, Y13
+ VPXOR Y12, Y13, Y12
+ VPXOR Y12, Y0, Y0
+
+ // Load and process 32 bytes from input 2 to 1 outputs
+ VMOVDQU (SI)(R8*1), Y12
+ VPSRLQ $0x04, Y12, Y13
+ VPAND Y11, Y12, Y12
+ VPAND Y11, Y13, Y13
+ VPSHUFB Y12, Y5, Y12
+ VPSHUFB Y13, Y6, Y13
+ VPXOR Y12, Y13, Y12
+ VPXOR Y12, Y0, Y0
+
+ // Load and process 32 bytes from input 3 to 1 outputs
+ VMOVDQU (DI)(R8*1), Y12
+ VPSRLQ $0x04, Y12, Y13
+ VPAND Y11, Y12, Y12
+ VPAND Y11, Y13, Y13
+ VPSHUFB Y12, Y7, Y12
+ VPSHUFB Y13, Y8, Y13
+ VPXOR Y12, Y13, Y12
+ VPXOR Y12, Y0, Y0
+
+ // Load and process 32 bytes from input 4 to 1 outputs
+ VMOVDQU (CX)(R8*1), Y12
+ VPSRLQ $0x04, Y12, Y13
+ VPAND Y11, Y12, Y12
+ VPAND Y11, Y13, Y13
+ VPSHUFB Y12, Y9, Y12
+ VPSHUFB Y13, Y10, Y13
+ VPXOR Y12, Y13, Y12
+ VPXOR Y12, Y0, Y0
+
+ // Store 1 outputs
+ VMOVDQU Y0, (DX)(R8*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R8
+ DECQ AX
+ JNZ mulAvxTwo_5x1_loop
+ VZEROUPPER
+
+mulAvxTwo_5x1_end:
+ RET
+
+// func mulAvxTwo_5x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_5x2(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 27 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_5x2_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), DX
+ MOVQ in_base+24(FP), BP
+ MOVQ (BP), SI
+ MOVQ 24(BP), DI
+ MOVQ 48(BP), R8
+ MOVQ 72(BP), R9
+ MOVQ 96(BP), BP
+ MOVQ $0x0000000f, R10
+ MOVQ R10, X2
+ VPBROADCASTB X2, Y2
+ MOVQ start+72(FP), R10
+
+mulAvxTwo_5x2_loop:
+ // Clear 2 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+
+ // Load and process 32 bytes from input 0 to 2 outputs
+ VMOVDQU (SI)(R10*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU (CX), Y3
+ VMOVDQU 32(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 64(CX), Y3
+ VMOVDQU 96(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 1 to 2 outputs
+ VMOVDQU (DI)(R10*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 128(CX), Y3
+ VMOVDQU 160(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 192(CX), Y3
+ VMOVDQU 224(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 2 to 2 outputs
+ VMOVDQU (R8)(R10*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 256(CX), Y3
+ VMOVDQU 288(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 320(CX), Y3
+ VMOVDQU 352(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 3 to 2 outputs
+ VMOVDQU (R9)(R10*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 384(CX), Y3
+ VMOVDQU 416(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 448(CX), Y3
+ VMOVDQU 480(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 4 to 2 outputs
+ VMOVDQU (BP)(R10*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 512(CX), Y3
+ VMOVDQU 544(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 576(CX), Y3
+ VMOVDQU 608(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Store 2 outputs
+ VMOVDQU Y0, (BX)(R10*1)
+ VMOVDQU Y1, (DX)(R10*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R10
+ DECQ AX
+ JNZ mulAvxTwo_5x2_loop
+ VZEROUPPER
+
+mulAvxTwo_5x2_end:
+ RET
+
+// func mulAvxTwo_5x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_5x3(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 38 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_5x3_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), DX
+ MOVQ in_base+24(FP), SI
+ MOVQ (SI), DI
+ MOVQ 24(SI), R8
+ MOVQ 48(SI), R9
+ MOVQ 72(SI), R10
+ MOVQ 96(SI), SI
+ MOVQ $0x0000000f, R11
+ MOVQ R11, X3
+ VPBROADCASTB X3, Y3
+ MOVQ start+72(FP), R11
+
+mulAvxTwo_5x3_loop:
+ // Clear 3 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+
+ // Load and process 32 bytes from input 0 to 3 outputs
+ VMOVDQU (DI)(R11*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU (CX), Y4
+ VMOVDQU 32(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 64(CX), Y4
+ VMOVDQU 96(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 128(CX), Y4
+ VMOVDQU 160(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 1 to 3 outputs
+ VMOVDQU (R8)(R11*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 192(CX), Y4
+ VMOVDQU 224(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 256(CX), Y4
+ VMOVDQU 288(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 320(CX), Y4
+ VMOVDQU 352(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 2 to 3 outputs
+ VMOVDQU (R9)(R11*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 384(CX), Y4
+ VMOVDQU 416(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 448(CX), Y4
+ VMOVDQU 480(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 512(CX), Y4
+ VMOVDQU 544(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 3 to 3 outputs
+ VMOVDQU (R10)(R11*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 576(CX), Y4
+ VMOVDQU 608(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 640(CX), Y4
+ VMOVDQU 672(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 704(CX), Y4
+ VMOVDQU 736(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 4 to 3 outputs
+ VMOVDQU (SI)(R11*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 768(CX), Y4
+ VMOVDQU 800(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 832(CX), Y4
+ VMOVDQU 864(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 896(CX), Y4
+ VMOVDQU 928(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Store 3 outputs
+ VMOVDQU Y0, (BX)(R11*1)
+ VMOVDQU Y1, (BP)(R11*1)
+ VMOVDQU Y2, (DX)(R11*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R11
+ DECQ AX
+ JNZ mulAvxTwo_5x3_loop
+ VZEROUPPER
+
+mulAvxTwo_5x3_end:
+ RET
+
+// func mulAvxTwo_5x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_5x4(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 49 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_5x4_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DX
+ MOVQ in_base+24(FP), DI
+ MOVQ (DI), R8
+ MOVQ 24(DI), R9
+ MOVQ 48(DI), R10
+ MOVQ 72(DI), R11
+ MOVQ 96(DI), DI
+ MOVQ $0x0000000f, R12
+ MOVQ R12, X4
+ VPBROADCASTB X4, Y4
+ MOVQ start+72(FP), R12
+
+mulAvxTwo_5x4_loop:
+ // Clear 4 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+
+ // Load and process 32 bytes from input 0 to 4 outputs
+ VMOVDQU (R8)(R12*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU (CX), Y5
+ VMOVDQU 32(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 64(CX), Y5
+ VMOVDQU 96(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 192(CX), Y5
+ VMOVDQU 224(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 1 to 4 outputs
+ VMOVDQU (R9)(R12*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 256(CX), Y5
+ VMOVDQU 288(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 320(CX), Y5
+ VMOVDQU 352(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 384(CX), Y5
+ VMOVDQU 416(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 448(CX), Y5
+ VMOVDQU 480(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 2 to 4 outputs
+ VMOVDQU (R10)(R12*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 512(CX), Y5
+ VMOVDQU 544(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 576(CX), Y5
+ VMOVDQU 608(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 640(CX), Y5
+ VMOVDQU 672(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 704(CX), Y5
+ VMOVDQU 736(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 3 to 4 outputs
+ VMOVDQU (R11)(R12*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 768(CX), Y5
+ VMOVDQU 800(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 832(CX), Y5
+ VMOVDQU 864(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 896(CX), Y5
+ VMOVDQU 928(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 960(CX), Y5
+ VMOVDQU 992(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 4 to 4 outputs
+ VMOVDQU (DI)(R12*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1024(CX), Y5
+ VMOVDQU 1056(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1088(CX), Y5
+ VMOVDQU 1120(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1152(CX), Y5
+ VMOVDQU 1184(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1216(CX), Y5
+ VMOVDQU 1248(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Store 4 outputs
+ VMOVDQU Y0, (BX)(R12*1)
+ VMOVDQU Y1, (BP)(R12*1)
+ VMOVDQU Y2, (SI)(R12*1)
+ VMOVDQU Y3, (DX)(R12*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R12
+ DECQ AX
+ JNZ mulAvxTwo_5x4_loop
+ VZEROUPPER
+
+mulAvxTwo_5x4_end:
+ RET
+
+// func mulAvxTwo_5x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_5x5(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 60 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_5x5_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), DX
+ MOVQ in_base+24(FP), R8
+ MOVQ (R8), R9
+ MOVQ 24(R8), R10
+ MOVQ 48(R8), R11
+ MOVQ 72(R8), R12
+ MOVQ 96(R8), R8
+ MOVQ $0x0000000f, R13
+ MOVQ R13, X5
+ VPBROADCASTB X5, Y5
+ MOVQ start+72(FP), R13
+
+mulAvxTwo_5x5_loop:
+ // Clear 5 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+
+ // Load and process 32 bytes from input 0 to 5 outputs
+ VMOVDQU (R9)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU (CX), Y6
+ VMOVDQU 32(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 64(CX), Y6
+ VMOVDQU 96(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 128(CX), Y6
+ VMOVDQU 160(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 192(CX), Y6
+ VMOVDQU 224(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 256(CX), Y6
+ VMOVDQU 288(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 1 to 5 outputs
+ VMOVDQU (R10)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 320(CX), Y6
+ VMOVDQU 352(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 384(CX), Y6
+ VMOVDQU 416(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 448(CX), Y6
+ VMOVDQU 480(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 512(CX), Y6
+ VMOVDQU 544(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 576(CX), Y6
+ VMOVDQU 608(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 2 to 5 outputs
+ VMOVDQU (R11)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 640(CX), Y6
+ VMOVDQU 672(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 704(CX), Y6
+ VMOVDQU 736(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 768(CX), Y6
+ VMOVDQU 800(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 832(CX), Y6
+ VMOVDQU 864(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 896(CX), Y6
+ VMOVDQU 928(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 3 to 5 outputs
+ VMOVDQU (R12)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 960(CX), Y6
+ VMOVDQU 992(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1024(CX), Y6
+ VMOVDQU 1056(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1088(CX), Y6
+ VMOVDQU 1120(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1152(CX), Y6
+ VMOVDQU 1184(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1216(CX), Y6
+ VMOVDQU 1248(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 4 to 5 outputs
+ VMOVDQU (R8)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1280(CX), Y6
+ VMOVDQU 1312(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1344(CX), Y6
+ VMOVDQU 1376(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1408(CX), Y6
+ VMOVDQU 1440(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1472(CX), Y6
+ VMOVDQU 1504(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1536(CX), Y6
+ VMOVDQU 1568(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Store 5 outputs
+ VMOVDQU Y0, (BX)(R13*1)
+ VMOVDQU Y1, (BP)(R13*1)
+ VMOVDQU Y2, (SI)(R13*1)
+ VMOVDQU Y3, (DI)(R13*1)
+ VMOVDQU Y4, (DX)(R13*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R13
+ DECQ AX
+ JNZ mulAvxTwo_5x5_loop
+ VZEROUPPER
+
+mulAvxTwo_5x5_end:
+ RET
+
+// func mulAvxTwo_5x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_5x6(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 71 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_5x6_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), DX
+ MOVQ in_base+24(FP), R9
+ MOVQ (R9), R10
+ MOVQ 24(R9), R11
+ MOVQ 48(R9), R12
+ MOVQ 72(R9), R13
+ MOVQ 96(R9), R9
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X6
+ VPBROADCASTB X6, Y6
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_5x6_loop:
+ // Clear 6 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+
+ // Load and process 32 bytes from input 0 to 6 outputs
+ VMOVDQU (R10)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU (CX), Y7
+ VMOVDQU 32(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 64(CX), Y7
+ VMOVDQU 96(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 128(CX), Y7
+ VMOVDQU 160(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 192(CX), Y7
+ VMOVDQU 224(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 256(CX), Y7
+ VMOVDQU 288(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 320(CX), Y7
+ VMOVDQU 352(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 1 to 6 outputs
+ VMOVDQU (R11)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 384(CX), Y7
+ VMOVDQU 416(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 448(CX), Y7
+ VMOVDQU 480(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 512(CX), Y7
+ VMOVDQU 544(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 576(CX), Y7
+ VMOVDQU 608(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 640(CX), Y7
+ VMOVDQU 672(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 704(CX), Y7
+ VMOVDQU 736(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 2 to 6 outputs
+ VMOVDQU (R12)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 768(CX), Y7
+ VMOVDQU 800(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 832(CX), Y7
+ VMOVDQU 864(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 896(CX), Y7
+ VMOVDQU 928(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 960(CX), Y7
+ VMOVDQU 992(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1024(CX), Y7
+ VMOVDQU 1056(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1088(CX), Y7
+ VMOVDQU 1120(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 3 to 6 outputs
+ VMOVDQU (R13)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1152(CX), Y7
+ VMOVDQU 1184(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1216(CX), Y7
+ VMOVDQU 1248(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 1280(CX), Y7
+ VMOVDQU 1312(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 1344(CX), Y7
+ VMOVDQU 1376(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1408(CX), Y7
+ VMOVDQU 1440(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1472(CX), Y7
+ VMOVDQU 1504(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 4 to 6 outputs
+ VMOVDQU (R9)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1536(CX), Y7
+ VMOVDQU 1568(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1600(CX), Y7
+ VMOVDQU 1632(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 1664(CX), Y7
+ VMOVDQU 1696(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 1728(CX), Y7
+ VMOVDQU 1760(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1792(CX), Y7
+ VMOVDQU 1824(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1856(CX), Y7
+ VMOVDQU 1888(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Store 6 outputs
+ VMOVDQU Y0, (BX)(R14*1)
+ VMOVDQU Y1, (BP)(R14*1)
+ VMOVDQU Y2, (SI)(R14*1)
+ VMOVDQU Y3, (DI)(R14*1)
+ VMOVDQU Y4, (R8)(R14*1)
+ VMOVDQU Y5, (DX)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_5x6_loop
+ VZEROUPPER
+
+mulAvxTwo_5x6_end:
+ RET
+
+// func mulAvxTwo_5x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_5x7(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 82 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_5x7_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), R9
+ MOVQ 144(DX), DX
+ MOVQ in_base+24(FP), R10
+ MOVQ (R10), R11
+ MOVQ 24(R10), R12
+ MOVQ 48(R10), R13
+ MOVQ 72(R10), R14
+ MOVQ 96(R10), R10
+ MOVQ $0x0000000f, R15
+ MOVQ R15, X7
+ VPBROADCASTB X7, Y7
+ MOVQ start+72(FP), R15
+
+mulAvxTwo_5x7_loop:
+ // Clear 7 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+
+ // Load and process 32 bytes from input 0 to 7 outputs
+ VMOVDQU (R11)(R15*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU (CX), Y8
+ VMOVDQU 32(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 64(CX), Y8
+ VMOVDQU 96(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 128(CX), Y8
+ VMOVDQU 160(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 192(CX), Y8
+ VMOVDQU 224(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 256(CX), Y8
+ VMOVDQU 288(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 320(CX), Y8
+ VMOVDQU 352(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 384(CX), Y8
+ VMOVDQU 416(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 1 to 7 outputs
+ VMOVDQU (R12)(R15*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 448(CX), Y8
+ VMOVDQU 480(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 512(CX), Y8
+ VMOVDQU 544(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 576(CX), Y8
+ VMOVDQU 608(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 640(CX), Y8
+ VMOVDQU 672(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 704(CX), Y8
+ VMOVDQU 736(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 768(CX), Y8
+ VMOVDQU 800(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 832(CX), Y8
+ VMOVDQU 864(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 2 to 7 outputs
+ VMOVDQU (R13)(R15*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 896(CX), Y8
+ VMOVDQU 928(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 960(CX), Y8
+ VMOVDQU 992(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1024(CX), Y8
+ VMOVDQU 1056(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1088(CX), Y8
+ VMOVDQU 1120(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1152(CX), Y8
+ VMOVDQU 1184(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1216(CX), Y8
+ VMOVDQU 1248(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1280(CX), Y8
+ VMOVDQU 1312(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 3 to 7 outputs
+ VMOVDQU (R14)(R15*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 1344(CX), Y8
+ VMOVDQU 1376(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 1408(CX), Y8
+ VMOVDQU 1440(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1472(CX), Y8
+ VMOVDQU 1504(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1536(CX), Y8
+ VMOVDQU 1568(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1600(CX), Y8
+ VMOVDQU 1632(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1664(CX), Y8
+ VMOVDQU 1696(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1728(CX), Y8
+ VMOVDQU 1760(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 4 to 7 outputs
+ VMOVDQU (R10)(R15*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 1792(CX), Y8
+ VMOVDQU 1824(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 1856(CX), Y8
+ VMOVDQU 1888(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1920(CX), Y8
+ VMOVDQU 1952(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1984(CX), Y8
+ VMOVDQU 2016(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2048(CX), Y8
+ VMOVDQU 2080(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 2112(CX), Y8
+ VMOVDQU 2144(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 2176(CX), Y8
+ VMOVDQU 2208(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Store 7 outputs
+ VMOVDQU Y0, (BX)(R15*1)
+ VMOVDQU Y1, (BP)(R15*1)
+ VMOVDQU Y2, (SI)(R15*1)
+ VMOVDQU Y3, (DI)(R15*1)
+ VMOVDQU Y4, (R8)(R15*1)
+ VMOVDQU Y5, (R9)(R15*1)
+ VMOVDQU Y6, (DX)(R15*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R15
+ DECQ AX
+ JNZ mulAvxTwo_5x7_loop
+ VZEROUPPER
+
+mulAvxTwo_5x7_end:
+ RET
+
+// func mulAvxTwo_5x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_5x8(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 93 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_5x8_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), BX
+ MOVQ $0x0000000f, R9
+ MOVQ R9, X8
+ VPBROADCASTB X8, Y8
+ MOVQ start+72(FP), R9
+
+mulAvxTwo_5x8_loop:
+ // Clear 8 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+ VPXOR Y7, Y7, Y7
+
+ // Load and process 32 bytes from input 0 to 8 outputs
+ VMOVDQU (BP)(R9*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU (CX), Y9
+ VMOVDQU 32(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 64(CX), Y9
+ VMOVDQU 96(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 128(CX), Y9
+ VMOVDQU 160(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 192(CX), Y9
+ VMOVDQU 224(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 256(CX), Y9
+ VMOVDQU 288(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 320(CX), Y9
+ VMOVDQU 352(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 384(CX), Y9
+ VMOVDQU 416(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 448(CX), Y9
+ VMOVDQU 480(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 1 to 8 outputs
+ VMOVDQU (SI)(R9*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 512(CX), Y9
+ VMOVDQU 544(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 576(CX), Y9
+ VMOVDQU 608(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 640(CX), Y9
+ VMOVDQU 672(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 704(CX), Y9
+ VMOVDQU 736(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 768(CX), Y9
+ VMOVDQU 800(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 832(CX), Y9
+ VMOVDQU 864(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 896(CX), Y9
+ VMOVDQU 928(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 960(CX), Y9
+ VMOVDQU 992(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 2 to 8 outputs
+ VMOVDQU (DI)(R9*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1024(CX), Y9
+ VMOVDQU 1056(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1088(CX), Y9
+ VMOVDQU 1120(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1152(CX), Y9
+ VMOVDQU 1184(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1216(CX), Y9
+ VMOVDQU 1248(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1280(CX), Y9
+ VMOVDQU 1312(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1344(CX), Y9
+ VMOVDQU 1376(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1408(CX), Y9
+ VMOVDQU 1440(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1472(CX), Y9
+ VMOVDQU 1504(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 3 to 8 outputs
+ VMOVDQU (R8)(R9*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1536(CX), Y9
+ VMOVDQU 1568(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1600(CX), Y9
+ VMOVDQU 1632(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1664(CX), Y9
+ VMOVDQU 1696(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1728(CX), Y9
+ VMOVDQU 1760(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1792(CX), Y9
+ VMOVDQU 1824(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1856(CX), Y9
+ VMOVDQU 1888(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1920(CX), Y9
+ VMOVDQU 1952(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1984(CX), Y9
+ VMOVDQU 2016(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 4 to 8 outputs
+ VMOVDQU (BX)(R9*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 2048(CX), Y9
+ VMOVDQU 2080(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 2112(CX), Y9
+ VMOVDQU 2144(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 2176(CX), Y9
+ VMOVDQU 2208(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 2240(CX), Y9
+ VMOVDQU 2272(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 2304(CX), Y9
+ VMOVDQU 2336(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 2368(CX), Y9
+ VMOVDQU 2400(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 2432(CX), Y9
+ VMOVDQU 2464(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 2496(CX), Y9
+ VMOVDQU 2528(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Store 8 outputs
+ MOVQ (DX), R10
+ VMOVDQU Y0, (R10)(R9*1)
+ MOVQ 24(DX), R10
+ VMOVDQU Y1, (R10)(R9*1)
+ MOVQ 48(DX), R10
+ VMOVDQU Y2, (R10)(R9*1)
+ MOVQ 72(DX), R10
+ VMOVDQU Y3, (R10)(R9*1)
+ MOVQ 96(DX), R10
+ VMOVDQU Y4, (R10)(R9*1)
+ MOVQ 120(DX), R10
+ VMOVDQU Y5, (R10)(R9*1)
+ MOVQ 144(DX), R10
+ VMOVDQU Y6, (R10)(R9*1)
+ MOVQ 168(DX), R10
+ VMOVDQU Y7, (R10)(R9*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R9
+ DECQ AX
+ JNZ mulAvxTwo_5x8_loop
+ VZEROUPPER
+
+mulAvxTwo_5x8_end:
+ RET
+
+// func mulAvxTwo_6x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_6x1(SB), $0-88
+ // Loading all tables to registers
+ // Full registers estimated 16 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_6x1_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), DX
+ VMOVDQU (CX), Y1
+ VMOVDQU 32(CX), Y2
+ VMOVDQU 64(CX), Y3
+ VMOVDQU 96(CX), Y4
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ VMOVDQU 192(CX), Y7
+ VMOVDQU 224(CX), Y8
+ VMOVDQU 256(CX), Y9
+ VMOVDQU 288(CX), Y10
+ VMOVDQU 320(CX), Y11
+ VMOVDQU 352(CX), Y12
+ MOVQ in_base+24(FP), CX
+ MOVQ (CX), BX
+ MOVQ 24(CX), BP
+ MOVQ 48(CX), SI
+ MOVQ 72(CX), DI
+ MOVQ 96(CX), R8
+ MOVQ 120(CX), CX
+ MOVQ $0x0000000f, R9
+ MOVQ R9, X13
+ VPBROADCASTB X13, Y13
+ MOVQ start+72(FP), R9
+
+mulAvxTwo_6x1_loop:
+ // Clear 1 outputs
+ VPXOR Y0, Y0, Y0
+
+ // Load and process 32 bytes from input 0 to 1 outputs
+ VMOVDQU (BX)(R9*1), Y14
+ VPSRLQ $0x04, Y14, Y15
+ VPAND Y13, Y14, Y14
+ VPAND Y13, Y15, Y15
+ VPSHUFB Y14, Y1, Y14
+ VPSHUFB Y15, Y2, Y15
+ VPXOR Y14, Y15, Y14
+ VPXOR Y14, Y0, Y0
+
+ // Load and process 32 bytes from input 1 to 1 outputs
+ VMOVDQU (BP)(R9*1), Y14
+ VPSRLQ $0x04, Y14, Y15
+ VPAND Y13, Y14, Y14
+ VPAND Y13, Y15, Y15
+ VPSHUFB Y14, Y3, Y14
+ VPSHUFB Y15, Y4, Y15
+ VPXOR Y14, Y15, Y14
+ VPXOR Y14, Y0, Y0
+
+ // Load and process 32 bytes from input 2 to 1 outputs
+ VMOVDQU (SI)(R9*1), Y14
+ VPSRLQ $0x04, Y14, Y15
+ VPAND Y13, Y14, Y14
+ VPAND Y13, Y15, Y15
+ VPSHUFB Y14, Y5, Y14
+ VPSHUFB Y15, Y6, Y15
+ VPXOR Y14, Y15, Y14
+ VPXOR Y14, Y0, Y0
+
+ // Load and process 32 bytes from input 3 to 1 outputs
+ VMOVDQU (DI)(R9*1), Y14
+ VPSRLQ $0x04, Y14, Y15
+ VPAND Y13, Y14, Y14
+ VPAND Y13, Y15, Y15
+ VPSHUFB Y14, Y7, Y14
+ VPSHUFB Y15, Y8, Y15
+ VPXOR Y14, Y15, Y14
+ VPXOR Y14, Y0, Y0
+
+ // Load and process 32 bytes from input 4 to 1 outputs
+ VMOVDQU (R8)(R9*1), Y14
+ VPSRLQ $0x04, Y14, Y15
+ VPAND Y13, Y14, Y14
+ VPAND Y13, Y15, Y15
+ VPSHUFB Y14, Y9, Y14
+ VPSHUFB Y15, Y10, Y15
+ VPXOR Y14, Y15, Y14
+ VPXOR Y14, Y0, Y0
+
+ // Load and process 32 bytes from input 5 to 1 outputs
+ VMOVDQU (CX)(R9*1), Y14
+ VPSRLQ $0x04, Y14, Y15
+ VPAND Y13, Y14, Y14
+ VPAND Y13, Y15, Y15
+ VPSHUFB Y14, Y11, Y14
+ VPSHUFB Y15, Y12, Y15
+ VPXOR Y14, Y15, Y14
+ VPXOR Y14, Y0, Y0
+
+ // Store 1 outputs
+ VMOVDQU Y0, (DX)(R9*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R9
+ DECQ AX
+ JNZ mulAvxTwo_6x1_loop
+ VZEROUPPER
+
+mulAvxTwo_6x1_end:
+ RET
+
+// func mulAvxTwo_6x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_6x2(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 31 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_6x2_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), DX
+ MOVQ in_base+24(FP), BP
+ MOVQ (BP), SI
+ MOVQ 24(BP), DI
+ MOVQ 48(BP), R8
+ MOVQ 72(BP), R9
+ MOVQ 96(BP), R10
+ MOVQ 120(BP), BP
+ MOVQ $0x0000000f, R11
+ MOVQ R11, X2
+ VPBROADCASTB X2, Y2
+ MOVQ start+72(FP), R11
+
+mulAvxTwo_6x2_loop:
+ // Clear 2 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+
+ // Load and process 32 bytes from input 0 to 2 outputs
+ VMOVDQU (SI)(R11*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU (CX), Y3
+ VMOVDQU 32(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 64(CX), Y3
+ VMOVDQU 96(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 1 to 2 outputs
+ VMOVDQU (DI)(R11*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 128(CX), Y3
+ VMOVDQU 160(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 192(CX), Y3
+ VMOVDQU 224(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 2 to 2 outputs
+ VMOVDQU (R8)(R11*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 256(CX), Y3
+ VMOVDQU 288(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 320(CX), Y3
+ VMOVDQU 352(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 3 to 2 outputs
+ VMOVDQU (R9)(R11*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 384(CX), Y3
+ VMOVDQU 416(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 448(CX), Y3
+ VMOVDQU 480(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 4 to 2 outputs
+ VMOVDQU (R10)(R11*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 512(CX), Y3
+ VMOVDQU 544(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 576(CX), Y3
+ VMOVDQU 608(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 5 to 2 outputs
+ VMOVDQU (BP)(R11*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 640(CX), Y3
+ VMOVDQU 672(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 704(CX), Y3
+ VMOVDQU 736(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Store 2 outputs
+ VMOVDQU Y0, (BX)(R11*1)
+ VMOVDQU Y1, (DX)(R11*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R11
+ DECQ AX
+ JNZ mulAvxTwo_6x2_loop
+ VZEROUPPER
+
+mulAvxTwo_6x2_end:
+ RET
+
+// func mulAvxTwo_6x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_6x3(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 44 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_6x3_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), DX
+ MOVQ in_base+24(FP), SI
+ MOVQ (SI), DI
+ MOVQ 24(SI), R8
+ MOVQ 48(SI), R9
+ MOVQ 72(SI), R10
+ MOVQ 96(SI), R11
+ MOVQ 120(SI), SI
+ MOVQ $0x0000000f, R12
+ MOVQ R12, X3
+ VPBROADCASTB X3, Y3
+ MOVQ start+72(FP), R12
+
+mulAvxTwo_6x3_loop:
+ // Clear 3 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+
+ // Load and process 32 bytes from input 0 to 3 outputs
+ VMOVDQU (DI)(R12*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU (CX), Y4
+ VMOVDQU 32(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 64(CX), Y4
+ VMOVDQU 96(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 128(CX), Y4
+ VMOVDQU 160(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 1 to 3 outputs
+ VMOVDQU (R8)(R12*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 192(CX), Y4
+ VMOVDQU 224(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 256(CX), Y4
+ VMOVDQU 288(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 320(CX), Y4
+ VMOVDQU 352(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 2 to 3 outputs
+ VMOVDQU (R9)(R12*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 384(CX), Y4
+ VMOVDQU 416(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 448(CX), Y4
+ VMOVDQU 480(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 512(CX), Y4
+ VMOVDQU 544(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 3 to 3 outputs
+ VMOVDQU (R10)(R12*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 576(CX), Y4
+ VMOVDQU 608(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 640(CX), Y4
+ VMOVDQU 672(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 704(CX), Y4
+ VMOVDQU 736(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 4 to 3 outputs
+ VMOVDQU (R11)(R12*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 768(CX), Y4
+ VMOVDQU 800(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 832(CX), Y4
+ VMOVDQU 864(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 896(CX), Y4
+ VMOVDQU 928(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 5 to 3 outputs
+ VMOVDQU (SI)(R12*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 960(CX), Y4
+ VMOVDQU 992(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1024(CX), Y4
+ VMOVDQU 1056(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1088(CX), Y4
+ VMOVDQU 1120(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Store 3 outputs
+ VMOVDQU Y0, (BX)(R12*1)
+ VMOVDQU Y1, (BP)(R12*1)
+ VMOVDQU Y2, (DX)(R12*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R12
+ DECQ AX
+ JNZ mulAvxTwo_6x3_loop
+ VZEROUPPER
+
+mulAvxTwo_6x3_end:
+ RET
+
+// func mulAvxTwo_6x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_6x4(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 57 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_6x4_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DX
+ MOVQ in_base+24(FP), DI
+ MOVQ (DI), R8
+ MOVQ 24(DI), R9
+ MOVQ 48(DI), R10
+ MOVQ 72(DI), R11
+ MOVQ 96(DI), R12
+ MOVQ 120(DI), DI
+ MOVQ $0x0000000f, R13
+ MOVQ R13, X4
+ VPBROADCASTB X4, Y4
+ MOVQ start+72(FP), R13
+
+mulAvxTwo_6x4_loop:
+ // Clear 4 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+
+ // Load and process 32 bytes from input 0 to 4 outputs
+ VMOVDQU (R8)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU (CX), Y5
+ VMOVDQU 32(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 64(CX), Y5
+ VMOVDQU 96(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 192(CX), Y5
+ VMOVDQU 224(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 1 to 4 outputs
+ VMOVDQU (R9)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 256(CX), Y5
+ VMOVDQU 288(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 320(CX), Y5
+ VMOVDQU 352(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 384(CX), Y5
+ VMOVDQU 416(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 448(CX), Y5
+ VMOVDQU 480(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 2 to 4 outputs
+ VMOVDQU (R10)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 512(CX), Y5
+ VMOVDQU 544(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 576(CX), Y5
+ VMOVDQU 608(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 640(CX), Y5
+ VMOVDQU 672(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 704(CX), Y5
+ VMOVDQU 736(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 3 to 4 outputs
+ VMOVDQU (R11)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 768(CX), Y5
+ VMOVDQU 800(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 832(CX), Y5
+ VMOVDQU 864(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 896(CX), Y5
+ VMOVDQU 928(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 960(CX), Y5
+ VMOVDQU 992(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 4 to 4 outputs
+ VMOVDQU (R12)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1024(CX), Y5
+ VMOVDQU 1056(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1088(CX), Y5
+ VMOVDQU 1120(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1152(CX), Y5
+ VMOVDQU 1184(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1216(CX), Y5
+ VMOVDQU 1248(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 5 to 4 outputs
+ VMOVDQU (DI)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1280(CX), Y5
+ VMOVDQU 1312(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1344(CX), Y5
+ VMOVDQU 1376(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1408(CX), Y5
+ VMOVDQU 1440(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1472(CX), Y5
+ VMOVDQU 1504(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Store 4 outputs
+ VMOVDQU Y0, (BX)(R13*1)
+ VMOVDQU Y1, (BP)(R13*1)
+ VMOVDQU Y2, (SI)(R13*1)
+ VMOVDQU Y3, (DX)(R13*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R13
+ DECQ AX
+ JNZ mulAvxTwo_6x4_loop
+ VZEROUPPER
+
+mulAvxTwo_6x4_end:
+ RET
+
+// func mulAvxTwo_6x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_6x5(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 70 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_6x5_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), DX
+ MOVQ in_base+24(FP), R8
+ MOVQ (R8), R9
+ MOVQ 24(R8), R10
+ MOVQ 48(R8), R11
+ MOVQ 72(R8), R12
+ MOVQ 96(R8), R13
+ MOVQ 120(R8), R8
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X5
+ VPBROADCASTB X5, Y5
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_6x5_loop:
+ // Clear 5 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+
+ // Load and process 32 bytes from input 0 to 5 outputs
+ VMOVDQU (R9)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU (CX), Y6
+ VMOVDQU 32(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 64(CX), Y6
+ VMOVDQU 96(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 128(CX), Y6
+ VMOVDQU 160(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 192(CX), Y6
+ VMOVDQU 224(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 256(CX), Y6
+ VMOVDQU 288(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 1 to 5 outputs
+ VMOVDQU (R10)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 320(CX), Y6
+ VMOVDQU 352(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 384(CX), Y6
+ VMOVDQU 416(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 448(CX), Y6
+ VMOVDQU 480(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 512(CX), Y6
+ VMOVDQU 544(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 576(CX), Y6
+ VMOVDQU 608(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 2 to 5 outputs
+ VMOVDQU (R11)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 640(CX), Y6
+ VMOVDQU 672(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 704(CX), Y6
+ VMOVDQU 736(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 768(CX), Y6
+ VMOVDQU 800(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 832(CX), Y6
+ VMOVDQU 864(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 896(CX), Y6
+ VMOVDQU 928(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 3 to 5 outputs
+ VMOVDQU (R12)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 960(CX), Y6
+ VMOVDQU 992(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1024(CX), Y6
+ VMOVDQU 1056(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1088(CX), Y6
+ VMOVDQU 1120(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1152(CX), Y6
+ VMOVDQU 1184(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1216(CX), Y6
+ VMOVDQU 1248(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 4 to 5 outputs
+ VMOVDQU (R13)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1280(CX), Y6
+ VMOVDQU 1312(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1344(CX), Y6
+ VMOVDQU 1376(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1408(CX), Y6
+ VMOVDQU 1440(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1472(CX), Y6
+ VMOVDQU 1504(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1536(CX), Y6
+ VMOVDQU 1568(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 5 to 5 outputs
+ VMOVDQU (R8)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1600(CX), Y6
+ VMOVDQU 1632(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1664(CX), Y6
+ VMOVDQU 1696(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1728(CX), Y6
+ VMOVDQU 1760(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1792(CX), Y6
+ VMOVDQU 1824(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1856(CX), Y6
+ VMOVDQU 1888(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Store 5 outputs
+ VMOVDQU Y0, (BX)(R14*1)
+ VMOVDQU Y1, (BP)(R14*1)
+ VMOVDQU Y2, (SI)(R14*1)
+ VMOVDQU Y3, (DI)(R14*1)
+ VMOVDQU Y4, (DX)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_6x5_loop
+ VZEROUPPER
+
+mulAvxTwo_6x5_end:
+ RET
+
+// func mulAvxTwo_6x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_6x6(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 83 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_6x6_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), R8
+ MOVQ 120(DX), DX
+ MOVQ in_base+24(FP), R9
+ MOVQ (R9), R10
+ MOVQ 24(R9), R11
+ MOVQ 48(R9), R12
+ MOVQ 72(R9), R13
+ MOVQ 96(R9), R14
+ MOVQ 120(R9), R9
+ MOVQ $0x0000000f, R15
+ MOVQ R15, X6
+ VPBROADCASTB X6, Y6
+ MOVQ start+72(FP), R15
+
+mulAvxTwo_6x6_loop:
+ // Clear 6 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+
+ // Load and process 32 bytes from input 0 to 6 outputs
+ VMOVDQU (R10)(R15*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU (CX), Y7
+ VMOVDQU 32(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 64(CX), Y7
+ VMOVDQU 96(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 128(CX), Y7
+ VMOVDQU 160(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 192(CX), Y7
+ VMOVDQU 224(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 256(CX), Y7
+ VMOVDQU 288(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 320(CX), Y7
+ VMOVDQU 352(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 1 to 6 outputs
+ VMOVDQU (R11)(R15*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 384(CX), Y7
+ VMOVDQU 416(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 448(CX), Y7
+ VMOVDQU 480(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 512(CX), Y7
+ VMOVDQU 544(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 576(CX), Y7
+ VMOVDQU 608(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 640(CX), Y7
+ VMOVDQU 672(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 704(CX), Y7
+ VMOVDQU 736(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 2 to 6 outputs
+ VMOVDQU (R12)(R15*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 768(CX), Y7
+ VMOVDQU 800(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 832(CX), Y7
+ VMOVDQU 864(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 896(CX), Y7
+ VMOVDQU 928(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 960(CX), Y7
+ VMOVDQU 992(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1024(CX), Y7
+ VMOVDQU 1056(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1088(CX), Y7
+ VMOVDQU 1120(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 3 to 6 outputs
+ VMOVDQU (R13)(R15*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1152(CX), Y7
+ VMOVDQU 1184(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1216(CX), Y7
+ VMOVDQU 1248(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 1280(CX), Y7
+ VMOVDQU 1312(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 1344(CX), Y7
+ VMOVDQU 1376(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1408(CX), Y7
+ VMOVDQU 1440(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1472(CX), Y7
+ VMOVDQU 1504(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 4 to 6 outputs
+ VMOVDQU (R14)(R15*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1536(CX), Y7
+ VMOVDQU 1568(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1600(CX), Y7
+ VMOVDQU 1632(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 1664(CX), Y7
+ VMOVDQU 1696(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 1728(CX), Y7
+ VMOVDQU 1760(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1792(CX), Y7
+ VMOVDQU 1824(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1856(CX), Y7
+ VMOVDQU 1888(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 5 to 6 outputs
+ VMOVDQU (R9)(R15*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1920(CX), Y7
+ VMOVDQU 1952(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1984(CX), Y7
+ VMOVDQU 2016(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 2048(CX), Y7
+ VMOVDQU 2080(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 2112(CX), Y7
+ VMOVDQU 2144(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 2176(CX), Y7
+ VMOVDQU 2208(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 2240(CX), Y7
+ VMOVDQU 2272(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Store 6 outputs
+ VMOVDQU Y0, (BX)(R15*1)
+ VMOVDQU Y1, (BP)(R15*1)
+ VMOVDQU Y2, (SI)(R15*1)
+ VMOVDQU Y3, (DI)(R15*1)
+ VMOVDQU Y4, (R8)(R15*1)
+ VMOVDQU Y5, (DX)(R15*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R15
+ DECQ AX
+ JNZ mulAvxTwo_6x6_loop
+ VZEROUPPER
+
+mulAvxTwo_6x6_end:
+ RET
+
+// func mulAvxTwo_6x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_6x7(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 96 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_6x7_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), BX
+ MOVQ $0x0000000f, R10
+ MOVQ R10, X7
+ VPBROADCASTB X7, Y7
+ MOVQ start+72(FP), R10
+
+mulAvxTwo_6x7_loop:
+ // Clear 7 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+
+ // Load and process 32 bytes from input 0 to 7 outputs
+ VMOVDQU (BP)(R10*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU (CX), Y8
+ VMOVDQU 32(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 64(CX), Y8
+ VMOVDQU 96(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 128(CX), Y8
+ VMOVDQU 160(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 192(CX), Y8
+ VMOVDQU 224(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 256(CX), Y8
+ VMOVDQU 288(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 320(CX), Y8
+ VMOVDQU 352(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 384(CX), Y8
+ VMOVDQU 416(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 1 to 7 outputs
+ VMOVDQU (SI)(R10*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 448(CX), Y8
+ VMOVDQU 480(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 512(CX), Y8
+ VMOVDQU 544(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 576(CX), Y8
+ VMOVDQU 608(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 640(CX), Y8
+ VMOVDQU 672(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 704(CX), Y8
+ VMOVDQU 736(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 768(CX), Y8
+ VMOVDQU 800(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 832(CX), Y8
+ VMOVDQU 864(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 2 to 7 outputs
+ VMOVDQU (DI)(R10*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 896(CX), Y8
+ VMOVDQU 928(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 960(CX), Y8
+ VMOVDQU 992(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1024(CX), Y8
+ VMOVDQU 1056(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1088(CX), Y8
+ VMOVDQU 1120(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1152(CX), Y8
+ VMOVDQU 1184(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1216(CX), Y8
+ VMOVDQU 1248(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1280(CX), Y8
+ VMOVDQU 1312(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 3 to 7 outputs
+ VMOVDQU (R8)(R10*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 1344(CX), Y8
+ VMOVDQU 1376(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 1408(CX), Y8
+ VMOVDQU 1440(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1472(CX), Y8
+ VMOVDQU 1504(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1536(CX), Y8
+ VMOVDQU 1568(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1600(CX), Y8
+ VMOVDQU 1632(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1664(CX), Y8
+ VMOVDQU 1696(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1728(CX), Y8
+ VMOVDQU 1760(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 4 to 7 outputs
+ VMOVDQU (R9)(R10*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 1792(CX), Y8
+ VMOVDQU 1824(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 1856(CX), Y8
+ VMOVDQU 1888(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1920(CX), Y8
+ VMOVDQU 1952(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1984(CX), Y8
+ VMOVDQU 2016(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2048(CX), Y8
+ VMOVDQU 2080(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 2112(CX), Y8
+ VMOVDQU 2144(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 2176(CX), Y8
+ VMOVDQU 2208(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 5 to 7 outputs
+ VMOVDQU (BX)(R10*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 2240(CX), Y8
+ VMOVDQU 2272(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 2304(CX), Y8
+ VMOVDQU 2336(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 2368(CX), Y8
+ VMOVDQU 2400(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 2432(CX), Y8
+ VMOVDQU 2464(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2496(CX), Y8
+ VMOVDQU 2528(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 2560(CX), Y8
+ VMOVDQU 2592(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 2624(CX), Y8
+ VMOVDQU 2656(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Store 7 outputs
+ MOVQ (DX), R11
+ VMOVDQU Y0, (R11)(R10*1)
+ MOVQ 24(DX), R11
+ VMOVDQU Y1, (R11)(R10*1)
+ MOVQ 48(DX), R11
+ VMOVDQU Y2, (R11)(R10*1)
+ MOVQ 72(DX), R11
+ VMOVDQU Y3, (R11)(R10*1)
+ MOVQ 96(DX), R11
+ VMOVDQU Y4, (R11)(R10*1)
+ MOVQ 120(DX), R11
+ VMOVDQU Y5, (R11)(R10*1)
+ MOVQ 144(DX), R11
+ VMOVDQU Y6, (R11)(R10*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R10
+ DECQ AX
+ JNZ mulAvxTwo_6x7_loop
+ VZEROUPPER
+
+mulAvxTwo_6x7_end:
+ RET
+
+// func mulAvxTwo_6x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_6x8(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 109 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_6x8_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), BX
+ MOVQ $0x0000000f, R10
+ MOVQ R10, X8
+ VPBROADCASTB X8, Y8
+ MOVQ start+72(FP), R10
+
+mulAvxTwo_6x8_loop:
+ // Clear 8 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+ VPXOR Y7, Y7, Y7
+
+ // Load and process 32 bytes from input 0 to 8 outputs
+ VMOVDQU (BP)(R10*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU (CX), Y9
+ VMOVDQU 32(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 64(CX), Y9
+ VMOVDQU 96(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 128(CX), Y9
+ VMOVDQU 160(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 192(CX), Y9
+ VMOVDQU 224(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 256(CX), Y9
+ VMOVDQU 288(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 320(CX), Y9
+ VMOVDQU 352(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 384(CX), Y9
+ VMOVDQU 416(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 448(CX), Y9
+ VMOVDQU 480(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 1 to 8 outputs
+ VMOVDQU (SI)(R10*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 512(CX), Y9
+ VMOVDQU 544(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 576(CX), Y9
+ VMOVDQU 608(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 640(CX), Y9
+ VMOVDQU 672(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 704(CX), Y9
+ VMOVDQU 736(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 768(CX), Y9
+ VMOVDQU 800(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 832(CX), Y9
+ VMOVDQU 864(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 896(CX), Y9
+ VMOVDQU 928(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 960(CX), Y9
+ VMOVDQU 992(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 2 to 8 outputs
+ VMOVDQU (DI)(R10*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1024(CX), Y9
+ VMOVDQU 1056(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1088(CX), Y9
+ VMOVDQU 1120(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1152(CX), Y9
+ VMOVDQU 1184(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1216(CX), Y9
+ VMOVDQU 1248(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1280(CX), Y9
+ VMOVDQU 1312(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1344(CX), Y9
+ VMOVDQU 1376(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1408(CX), Y9
+ VMOVDQU 1440(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1472(CX), Y9
+ VMOVDQU 1504(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 3 to 8 outputs
+ VMOVDQU (R8)(R10*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1536(CX), Y9
+ VMOVDQU 1568(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1600(CX), Y9
+ VMOVDQU 1632(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1664(CX), Y9
+ VMOVDQU 1696(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1728(CX), Y9
+ VMOVDQU 1760(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1792(CX), Y9
+ VMOVDQU 1824(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1856(CX), Y9
+ VMOVDQU 1888(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1920(CX), Y9
+ VMOVDQU 1952(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1984(CX), Y9
+ VMOVDQU 2016(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 4 to 8 outputs
+ VMOVDQU (R9)(R10*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 2048(CX), Y9
+ VMOVDQU 2080(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 2112(CX), Y9
+ VMOVDQU 2144(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 2176(CX), Y9
+ VMOVDQU 2208(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 2240(CX), Y9
+ VMOVDQU 2272(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 2304(CX), Y9
+ VMOVDQU 2336(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 2368(CX), Y9
+ VMOVDQU 2400(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 2432(CX), Y9
+ VMOVDQU 2464(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 2496(CX), Y9
+ VMOVDQU 2528(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 5 to 8 outputs
+ VMOVDQU (BX)(R10*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 2560(CX), Y9
+ VMOVDQU 2592(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 2624(CX), Y9
+ VMOVDQU 2656(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 2688(CX), Y9
+ VMOVDQU 2720(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 2752(CX), Y9
+ VMOVDQU 2784(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 2816(CX), Y9
+ VMOVDQU 2848(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 2880(CX), Y9
+ VMOVDQU 2912(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 2944(CX), Y9
+ VMOVDQU 2976(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 3008(CX), Y9
+ VMOVDQU 3040(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Store 8 outputs
+ MOVQ (DX), R11
+ VMOVDQU Y0, (R11)(R10*1)
+ MOVQ 24(DX), R11
+ VMOVDQU Y1, (R11)(R10*1)
+ MOVQ 48(DX), R11
+ VMOVDQU Y2, (R11)(R10*1)
+ MOVQ 72(DX), R11
+ VMOVDQU Y3, (R11)(R10*1)
+ MOVQ 96(DX), R11
+ VMOVDQU Y4, (R11)(R10*1)
+ MOVQ 120(DX), R11
+ VMOVDQU Y5, (R11)(R10*1)
+ MOVQ 144(DX), R11
+ VMOVDQU Y6, (R11)(R10*1)
+ MOVQ 168(DX), R11
+ VMOVDQU Y7, (R11)(R10*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R10
+ DECQ AX
+ JNZ mulAvxTwo_6x8_loop
+ VZEROUPPER
+
+mulAvxTwo_6x8_end:
+ RET
+
+// func mulAvxTwo_7x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_7x1(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 18 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_7x1_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), BX
+ MOVQ $0x0000000f, R11
+ MOVQ R11, X1
+ VPBROADCASTB X1, Y1
+ MOVQ start+72(FP), R11
+
+mulAvxTwo_7x1_loop:
+ // Clear 1 outputs
+ VPXOR Y0, Y0, Y0
+
+ // Load and process 32 bytes from input 0 to 1 outputs
+ VMOVDQU (BP)(R11*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU (CX), Y2
+ VMOVDQU 32(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 1 to 1 outputs
+ VMOVDQU (SI)(R11*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 64(CX), Y2
+ VMOVDQU 96(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 2 to 1 outputs
+ VMOVDQU (DI)(R11*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 128(CX), Y2
+ VMOVDQU 160(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 3 to 1 outputs
+ VMOVDQU (R8)(R11*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 192(CX), Y2
+ VMOVDQU 224(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 4 to 1 outputs
+ VMOVDQU (R9)(R11*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 256(CX), Y2
+ VMOVDQU 288(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 5 to 1 outputs
+ VMOVDQU (R10)(R11*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 320(CX), Y2
+ VMOVDQU 352(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 6 to 1 outputs
+ VMOVDQU (BX)(R11*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 384(CX), Y2
+ VMOVDQU 416(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Store 1 outputs
+ VMOVDQU Y0, (DX)(R11*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R11
+ DECQ AX
+ JNZ mulAvxTwo_7x1_loop
+ VZEROUPPER
+
+mulAvxTwo_7x1_end:
+ RET
+
+// func mulAvxTwo_7x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_7x2(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 35 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_7x2_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), DX
+ MOVQ in_base+24(FP), BP
+ MOVQ (BP), SI
+ MOVQ 24(BP), DI
+ MOVQ 48(BP), R8
+ MOVQ 72(BP), R9
+ MOVQ 96(BP), R10
+ MOVQ 120(BP), R11
+ MOVQ 144(BP), BP
+ MOVQ $0x0000000f, R12
+ MOVQ R12, X2
+ VPBROADCASTB X2, Y2
+ MOVQ start+72(FP), R12
+
+mulAvxTwo_7x2_loop:
+ // Clear 2 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+
+ // Load and process 32 bytes from input 0 to 2 outputs
+ VMOVDQU (SI)(R12*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU (CX), Y3
+ VMOVDQU 32(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 64(CX), Y3
+ VMOVDQU 96(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 1 to 2 outputs
+ VMOVDQU (DI)(R12*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 128(CX), Y3
+ VMOVDQU 160(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 192(CX), Y3
+ VMOVDQU 224(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 2 to 2 outputs
+ VMOVDQU (R8)(R12*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 256(CX), Y3
+ VMOVDQU 288(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 320(CX), Y3
+ VMOVDQU 352(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 3 to 2 outputs
+ VMOVDQU (R9)(R12*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 384(CX), Y3
+ VMOVDQU 416(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 448(CX), Y3
+ VMOVDQU 480(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 4 to 2 outputs
+ VMOVDQU (R10)(R12*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 512(CX), Y3
+ VMOVDQU 544(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 576(CX), Y3
+ VMOVDQU 608(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 5 to 2 outputs
+ VMOVDQU (R11)(R12*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 640(CX), Y3
+ VMOVDQU 672(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 704(CX), Y3
+ VMOVDQU 736(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 6 to 2 outputs
+ VMOVDQU (BP)(R12*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 768(CX), Y3
+ VMOVDQU 800(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 832(CX), Y3
+ VMOVDQU 864(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Store 2 outputs
+ VMOVDQU Y0, (BX)(R12*1)
+ VMOVDQU Y1, (DX)(R12*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R12
+ DECQ AX
+ JNZ mulAvxTwo_7x2_loop
+ VZEROUPPER
+
+mulAvxTwo_7x2_end:
+ RET
+
+// func mulAvxTwo_7x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_7x3(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 50 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_7x3_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), DX
+ MOVQ in_base+24(FP), SI
+ MOVQ (SI), DI
+ MOVQ 24(SI), R8
+ MOVQ 48(SI), R9
+ MOVQ 72(SI), R10
+ MOVQ 96(SI), R11
+ MOVQ 120(SI), R12
+ MOVQ 144(SI), SI
+ MOVQ $0x0000000f, R13
+ MOVQ R13, X3
+ VPBROADCASTB X3, Y3
+ MOVQ start+72(FP), R13
+
+mulAvxTwo_7x3_loop:
+ // Clear 3 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+
+ // Load and process 32 bytes from input 0 to 3 outputs
+ VMOVDQU (DI)(R13*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU (CX), Y4
+ VMOVDQU 32(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 64(CX), Y4
+ VMOVDQU 96(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 128(CX), Y4
+ VMOVDQU 160(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 1 to 3 outputs
+ VMOVDQU (R8)(R13*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 192(CX), Y4
+ VMOVDQU 224(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 256(CX), Y4
+ VMOVDQU 288(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 320(CX), Y4
+ VMOVDQU 352(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 2 to 3 outputs
+ VMOVDQU (R9)(R13*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 384(CX), Y4
+ VMOVDQU 416(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 448(CX), Y4
+ VMOVDQU 480(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 512(CX), Y4
+ VMOVDQU 544(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 3 to 3 outputs
+ VMOVDQU (R10)(R13*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 576(CX), Y4
+ VMOVDQU 608(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 640(CX), Y4
+ VMOVDQU 672(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 704(CX), Y4
+ VMOVDQU 736(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 4 to 3 outputs
+ VMOVDQU (R11)(R13*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 768(CX), Y4
+ VMOVDQU 800(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 832(CX), Y4
+ VMOVDQU 864(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 896(CX), Y4
+ VMOVDQU 928(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 5 to 3 outputs
+ VMOVDQU (R12)(R13*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 960(CX), Y4
+ VMOVDQU 992(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1024(CX), Y4
+ VMOVDQU 1056(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1088(CX), Y4
+ VMOVDQU 1120(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 6 to 3 outputs
+ VMOVDQU (SI)(R13*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 1152(CX), Y4
+ VMOVDQU 1184(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1216(CX), Y4
+ VMOVDQU 1248(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1280(CX), Y4
+ VMOVDQU 1312(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Store 3 outputs
+ VMOVDQU Y0, (BX)(R13*1)
+ VMOVDQU Y1, (BP)(R13*1)
+ VMOVDQU Y2, (DX)(R13*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R13
+ DECQ AX
+ JNZ mulAvxTwo_7x3_loop
+ VZEROUPPER
+
+mulAvxTwo_7x3_end:
+ RET
+
+// func mulAvxTwo_7x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_7x4(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 65 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_7x4_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DX
+ MOVQ in_base+24(FP), DI
+ MOVQ (DI), R8
+ MOVQ 24(DI), R9
+ MOVQ 48(DI), R10
+ MOVQ 72(DI), R11
+ MOVQ 96(DI), R12
+ MOVQ 120(DI), R13
+ MOVQ 144(DI), DI
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X4
+ VPBROADCASTB X4, Y4
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_7x4_loop:
+ // Clear 4 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+
+ // Load and process 32 bytes from input 0 to 4 outputs
+ VMOVDQU (R8)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU (CX), Y5
+ VMOVDQU 32(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 64(CX), Y5
+ VMOVDQU 96(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 192(CX), Y5
+ VMOVDQU 224(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 1 to 4 outputs
+ VMOVDQU (R9)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 256(CX), Y5
+ VMOVDQU 288(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 320(CX), Y5
+ VMOVDQU 352(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 384(CX), Y5
+ VMOVDQU 416(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 448(CX), Y5
+ VMOVDQU 480(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 2 to 4 outputs
+ VMOVDQU (R10)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 512(CX), Y5
+ VMOVDQU 544(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 576(CX), Y5
+ VMOVDQU 608(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 640(CX), Y5
+ VMOVDQU 672(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 704(CX), Y5
+ VMOVDQU 736(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 3 to 4 outputs
+ VMOVDQU (R11)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 768(CX), Y5
+ VMOVDQU 800(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 832(CX), Y5
+ VMOVDQU 864(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 896(CX), Y5
+ VMOVDQU 928(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 960(CX), Y5
+ VMOVDQU 992(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 4 to 4 outputs
+ VMOVDQU (R12)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1024(CX), Y5
+ VMOVDQU 1056(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1088(CX), Y5
+ VMOVDQU 1120(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1152(CX), Y5
+ VMOVDQU 1184(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1216(CX), Y5
+ VMOVDQU 1248(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 5 to 4 outputs
+ VMOVDQU (R13)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1280(CX), Y5
+ VMOVDQU 1312(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1344(CX), Y5
+ VMOVDQU 1376(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1408(CX), Y5
+ VMOVDQU 1440(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1472(CX), Y5
+ VMOVDQU 1504(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 6 to 4 outputs
+ VMOVDQU (DI)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1536(CX), Y5
+ VMOVDQU 1568(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1600(CX), Y5
+ VMOVDQU 1632(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1664(CX), Y5
+ VMOVDQU 1696(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1728(CX), Y5
+ VMOVDQU 1760(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Store 4 outputs
+ VMOVDQU Y0, (BX)(R14*1)
+ VMOVDQU Y1, (BP)(R14*1)
+ VMOVDQU Y2, (SI)(R14*1)
+ VMOVDQU Y3, (DX)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_7x4_loop
+ VZEROUPPER
+
+mulAvxTwo_7x4_end:
+ RET
+
+// func mulAvxTwo_7x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_7x5(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 80 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_7x5_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DI
+ MOVQ 96(DX), DX
+ MOVQ in_base+24(FP), R8
+ MOVQ (R8), R9
+ MOVQ 24(R8), R10
+ MOVQ 48(R8), R11
+ MOVQ 72(R8), R12
+ MOVQ 96(R8), R13
+ MOVQ 120(R8), R14
+ MOVQ 144(R8), R8
+ MOVQ $0x0000000f, R15
+ MOVQ R15, X5
+ VPBROADCASTB X5, Y5
+ MOVQ start+72(FP), R15
+
+mulAvxTwo_7x5_loop:
+ // Clear 5 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+
+ // Load and process 32 bytes from input 0 to 5 outputs
+ VMOVDQU (R9)(R15*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU (CX), Y6
+ VMOVDQU 32(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 64(CX), Y6
+ VMOVDQU 96(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 128(CX), Y6
+ VMOVDQU 160(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 192(CX), Y6
+ VMOVDQU 224(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 256(CX), Y6
+ VMOVDQU 288(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 1 to 5 outputs
+ VMOVDQU (R10)(R15*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 320(CX), Y6
+ VMOVDQU 352(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 384(CX), Y6
+ VMOVDQU 416(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 448(CX), Y6
+ VMOVDQU 480(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 512(CX), Y6
+ VMOVDQU 544(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 576(CX), Y6
+ VMOVDQU 608(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 2 to 5 outputs
+ VMOVDQU (R11)(R15*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 640(CX), Y6
+ VMOVDQU 672(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 704(CX), Y6
+ VMOVDQU 736(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 768(CX), Y6
+ VMOVDQU 800(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 832(CX), Y6
+ VMOVDQU 864(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 896(CX), Y6
+ VMOVDQU 928(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 3 to 5 outputs
+ VMOVDQU (R12)(R15*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 960(CX), Y6
+ VMOVDQU 992(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1024(CX), Y6
+ VMOVDQU 1056(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1088(CX), Y6
+ VMOVDQU 1120(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1152(CX), Y6
+ VMOVDQU 1184(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1216(CX), Y6
+ VMOVDQU 1248(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 4 to 5 outputs
+ VMOVDQU (R13)(R15*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1280(CX), Y6
+ VMOVDQU 1312(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1344(CX), Y6
+ VMOVDQU 1376(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1408(CX), Y6
+ VMOVDQU 1440(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1472(CX), Y6
+ VMOVDQU 1504(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1536(CX), Y6
+ VMOVDQU 1568(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 5 to 5 outputs
+ VMOVDQU (R14)(R15*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1600(CX), Y6
+ VMOVDQU 1632(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1664(CX), Y6
+ VMOVDQU 1696(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1728(CX), Y6
+ VMOVDQU 1760(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1792(CX), Y6
+ VMOVDQU 1824(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1856(CX), Y6
+ VMOVDQU 1888(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 6 to 5 outputs
+ VMOVDQU (R8)(R15*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1920(CX), Y6
+ VMOVDQU 1952(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1984(CX), Y6
+ VMOVDQU 2016(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 2048(CX), Y6
+ VMOVDQU 2080(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 2112(CX), Y6
+ VMOVDQU 2144(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 2176(CX), Y6
+ VMOVDQU 2208(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Store 5 outputs
+ VMOVDQU Y0, (BX)(R15*1)
+ VMOVDQU Y1, (BP)(R15*1)
+ VMOVDQU Y2, (SI)(R15*1)
+ VMOVDQU Y3, (DI)(R15*1)
+ VMOVDQU Y4, (DX)(R15*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R15
+ DECQ AX
+ JNZ mulAvxTwo_7x5_loop
+ VZEROUPPER
+
+mulAvxTwo_7x5_end:
+ RET
+
+// func mulAvxTwo_7x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_7x6(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 95 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_7x6_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), BX
+ MOVQ $0x0000000f, R11
+ MOVQ R11, X6
+ VPBROADCASTB X6, Y6
+ MOVQ start+72(FP), R11
+
+mulAvxTwo_7x6_loop:
+ // Clear 6 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+
+ // Load and process 32 bytes from input 0 to 6 outputs
+ VMOVDQU (BP)(R11*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU (CX), Y7
+ VMOVDQU 32(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 64(CX), Y7
+ VMOVDQU 96(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 128(CX), Y7
+ VMOVDQU 160(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 192(CX), Y7
+ VMOVDQU 224(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 256(CX), Y7
+ VMOVDQU 288(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 320(CX), Y7
+ VMOVDQU 352(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 1 to 6 outputs
+ VMOVDQU (SI)(R11*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 384(CX), Y7
+ VMOVDQU 416(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 448(CX), Y7
+ VMOVDQU 480(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 512(CX), Y7
+ VMOVDQU 544(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 576(CX), Y7
+ VMOVDQU 608(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 640(CX), Y7
+ VMOVDQU 672(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 704(CX), Y7
+ VMOVDQU 736(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 2 to 6 outputs
+ VMOVDQU (DI)(R11*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 768(CX), Y7
+ VMOVDQU 800(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 832(CX), Y7
+ VMOVDQU 864(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 896(CX), Y7
+ VMOVDQU 928(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 960(CX), Y7
+ VMOVDQU 992(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1024(CX), Y7
+ VMOVDQU 1056(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1088(CX), Y7
+ VMOVDQU 1120(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 3 to 6 outputs
+ VMOVDQU (R8)(R11*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1152(CX), Y7
+ VMOVDQU 1184(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1216(CX), Y7
+ VMOVDQU 1248(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 1280(CX), Y7
+ VMOVDQU 1312(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 1344(CX), Y7
+ VMOVDQU 1376(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1408(CX), Y7
+ VMOVDQU 1440(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1472(CX), Y7
+ VMOVDQU 1504(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 4 to 6 outputs
+ VMOVDQU (R9)(R11*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1536(CX), Y7
+ VMOVDQU 1568(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1600(CX), Y7
+ VMOVDQU 1632(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 1664(CX), Y7
+ VMOVDQU 1696(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 1728(CX), Y7
+ VMOVDQU 1760(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1792(CX), Y7
+ VMOVDQU 1824(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1856(CX), Y7
+ VMOVDQU 1888(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 5 to 6 outputs
+ VMOVDQU (R10)(R11*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1920(CX), Y7
+ VMOVDQU 1952(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1984(CX), Y7
+ VMOVDQU 2016(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 2048(CX), Y7
+ VMOVDQU 2080(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 2112(CX), Y7
+ VMOVDQU 2144(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 2176(CX), Y7
+ VMOVDQU 2208(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 2240(CX), Y7
+ VMOVDQU 2272(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 6 to 6 outputs
+ VMOVDQU (BX)(R11*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 2304(CX), Y7
+ VMOVDQU 2336(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 2368(CX), Y7
+ VMOVDQU 2400(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 2432(CX), Y7
+ VMOVDQU 2464(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 2496(CX), Y7
+ VMOVDQU 2528(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 2560(CX), Y7
+ VMOVDQU 2592(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 2624(CX), Y7
+ VMOVDQU 2656(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Store 6 outputs
+ MOVQ (DX), R12
+ VMOVDQU Y0, (R12)(R11*1)
+ MOVQ 24(DX), R12
+ VMOVDQU Y1, (R12)(R11*1)
+ MOVQ 48(DX), R12
+ VMOVDQU Y2, (R12)(R11*1)
+ MOVQ 72(DX), R12
+ VMOVDQU Y3, (R12)(R11*1)
+ MOVQ 96(DX), R12
+ VMOVDQU Y4, (R12)(R11*1)
+ MOVQ 120(DX), R12
+ VMOVDQU Y5, (R12)(R11*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R11
+ DECQ AX
+ JNZ mulAvxTwo_7x6_loop
+ VZEROUPPER
+
+mulAvxTwo_7x6_end:
+ RET
+
+// func mulAvxTwo_7x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_7x7(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 110 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_7x7_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), BX
+ MOVQ $0x0000000f, R11
+ MOVQ R11, X7
+ VPBROADCASTB X7, Y7
+ MOVQ start+72(FP), R11
+
+mulAvxTwo_7x7_loop:
+ // Clear 7 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+
+ // Load and process 32 bytes from input 0 to 7 outputs
+ VMOVDQU (BP)(R11*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU (CX), Y8
+ VMOVDQU 32(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 64(CX), Y8
+ VMOVDQU 96(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 128(CX), Y8
+ VMOVDQU 160(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 192(CX), Y8
+ VMOVDQU 224(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 256(CX), Y8
+ VMOVDQU 288(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 320(CX), Y8
+ VMOVDQU 352(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 384(CX), Y8
+ VMOVDQU 416(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 1 to 7 outputs
+ VMOVDQU (SI)(R11*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 448(CX), Y8
+ VMOVDQU 480(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 512(CX), Y8
+ VMOVDQU 544(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 576(CX), Y8
+ VMOVDQU 608(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 640(CX), Y8
+ VMOVDQU 672(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 704(CX), Y8
+ VMOVDQU 736(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 768(CX), Y8
+ VMOVDQU 800(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 832(CX), Y8
+ VMOVDQU 864(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 2 to 7 outputs
+ VMOVDQU (DI)(R11*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 896(CX), Y8
+ VMOVDQU 928(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 960(CX), Y8
+ VMOVDQU 992(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1024(CX), Y8
+ VMOVDQU 1056(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1088(CX), Y8
+ VMOVDQU 1120(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1152(CX), Y8
+ VMOVDQU 1184(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1216(CX), Y8
+ VMOVDQU 1248(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1280(CX), Y8
+ VMOVDQU 1312(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 3 to 7 outputs
+ VMOVDQU (R8)(R11*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 1344(CX), Y8
+ VMOVDQU 1376(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 1408(CX), Y8
+ VMOVDQU 1440(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1472(CX), Y8
+ VMOVDQU 1504(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1536(CX), Y8
+ VMOVDQU 1568(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1600(CX), Y8
+ VMOVDQU 1632(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1664(CX), Y8
+ VMOVDQU 1696(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1728(CX), Y8
+ VMOVDQU 1760(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 4 to 7 outputs
+ VMOVDQU (R9)(R11*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 1792(CX), Y8
+ VMOVDQU 1824(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 1856(CX), Y8
+ VMOVDQU 1888(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1920(CX), Y8
+ VMOVDQU 1952(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1984(CX), Y8
+ VMOVDQU 2016(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2048(CX), Y8
+ VMOVDQU 2080(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 2112(CX), Y8
+ VMOVDQU 2144(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 2176(CX), Y8
+ VMOVDQU 2208(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 5 to 7 outputs
+ VMOVDQU (R10)(R11*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 2240(CX), Y8
+ VMOVDQU 2272(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 2304(CX), Y8
+ VMOVDQU 2336(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 2368(CX), Y8
+ VMOVDQU 2400(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 2432(CX), Y8
+ VMOVDQU 2464(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2496(CX), Y8
+ VMOVDQU 2528(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 2560(CX), Y8
+ VMOVDQU 2592(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 2624(CX), Y8
+ VMOVDQU 2656(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 6 to 7 outputs
+ VMOVDQU (BX)(R11*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 2688(CX), Y8
+ VMOVDQU 2720(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 2752(CX), Y8
+ VMOVDQU 2784(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 2816(CX), Y8
+ VMOVDQU 2848(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 2880(CX), Y8
+ VMOVDQU 2912(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2944(CX), Y8
+ VMOVDQU 2976(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 3008(CX), Y8
+ VMOVDQU 3040(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 3072(CX), Y8
+ VMOVDQU 3104(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Store 7 outputs
+ MOVQ (DX), R12
+ VMOVDQU Y0, (R12)(R11*1)
+ MOVQ 24(DX), R12
+ VMOVDQU Y1, (R12)(R11*1)
+ MOVQ 48(DX), R12
+ VMOVDQU Y2, (R12)(R11*1)
+ MOVQ 72(DX), R12
+ VMOVDQU Y3, (R12)(R11*1)
+ MOVQ 96(DX), R12
+ VMOVDQU Y4, (R12)(R11*1)
+ MOVQ 120(DX), R12
+ VMOVDQU Y5, (R12)(R11*1)
+ MOVQ 144(DX), R12
+ VMOVDQU Y6, (R12)(R11*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R11
+ DECQ AX
+ JNZ mulAvxTwo_7x7_loop
+ VZEROUPPER
+
+mulAvxTwo_7x7_end:
+ RET
+
+// func mulAvxTwo_7x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_7x8(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 125 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_7x8_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), BX
+ MOVQ $0x0000000f, R11
+ MOVQ R11, X8
+ VPBROADCASTB X8, Y8
+ MOVQ start+72(FP), R11
+
+mulAvxTwo_7x8_loop:
+ // Clear 8 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+ VPXOR Y7, Y7, Y7
+
+ // Load and process 32 bytes from input 0 to 8 outputs
+ VMOVDQU (BP)(R11*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU (CX), Y9
+ VMOVDQU 32(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 64(CX), Y9
+ VMOVDQU 96(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 128(CX), Y9
+ VMOVDQU 160(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 192(CX), Y9
+ VMOVDQU 224(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 256(CX), Y9
+ VMOVDQU 288(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 320(CX), Y9
+ VMOVDQU 352(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 384(CX), Y9
+ VMOVDQU 416(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 448(CX), Y9
+ VMOVDQU 480(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 1 to 8 outputs
+ VMOVDQU (SI)(R11*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 512(CX), Y9
+ VMOVDQU 544(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 576(CX), Y9
+ VMOVDQU 608(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 640(CX), Y9
+ VMOVDQU 672(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 704(CX), Y9
+ VMOVDQU 736(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 768(CX), Y9
+ VMOVDQU 800(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 832(CX), Y9
+ VMOVDQU 864(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 896(CX), Y9
+ VMOVDQU 928(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 960(CX), Y9
+ VMOVDQU 992(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 2 to 8 outputs
+ VMOVDQU (DI)(R11*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1024(CX), Y9
+ VMOVDQU 1056(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1088(CX), Y9
+ VMOVDQU 1120(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1152(CX), Y9
+ VMOVDQU 1184(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1216(CX), Y9
+ VMOVDQU 1248(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1280(CX), Y9
+ VMOVDQU 1312(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1344(CX), Y9
+ VMOVDQU 1376(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1408(CX), Y9
+ VMOVDQU 1440(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1472(CX), Y9
+ VMOVDQU 1504(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 3 to 8 outputs
+ VMOVDQU (R8)(R11*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1536(CX), Y9
+ VMOVDQU 1568(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1600(CX), Y9
+ VMOVDQU 1632(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1664(CX), Y9
+ VMOVDQU 1696(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1728(CX), Y9
+ VMOVDQU 1760(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1792(CX), Y9
+ VMOVDQU 1824(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1856(CX), Y9
+ VMOVDQU 1888(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1920(CX), Y9
+ VMOVDQU 1952(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1984(CX), Y9
+ VMOVDQU 2016(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 4 to 8 outputs
+ VMOVDQU (R9)(R11*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 2048(CX), Y9
+ VMOVDQU 2080(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 2112(CX), Y9
+ VMOVDQU 2144(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 2176(CX), Y9
+ VMOVDQU 2208(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 2240(CX), Y9
+ VMOVDQU 2272(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 2304(CX), Y9
+ VMOVDQU 2336(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 2368(CX), Y9
+ VMOVDQU 2400(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 2432(CX), Y9
+ VMOVDQU 2464(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 2496(CX), Y9
+ VMOVDQU 2528(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 5 to 8 outputs
+ VMOVDQU (R10)(R11*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 2560(CX), Y9
+ VMOVDQU 2592(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 2624(CX), Y9
+ VMOVDQU 2656(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 2688(CX), Y9
+ VMOVDQU 2720(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 2752(CX), Y9
+ VMOVDQU 2784(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 2816(CX), Y9
+ VMOVDQU 2848(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 2880(CX), Y9
+ VMOVDQU 2912(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 2944(CX), Y9
+ VMOVDQU 2976(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 3008(CX), Y9
+ VMOVDQU 3040(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 6 to 8 outputs
+ VMOVDQU (BX)(R11*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 3072(CX), Y9
+ VMOVDQU 3104(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 3136(CX), Y9
+ VMOVDQU 3168(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 3200(CX), Y9
+ VMOVDQU 3232(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 3264(CX), Y9
+ VMOVDQU 3296(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 3328(CX), Y9
+ VMOVDQU 3360(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 3392(CX), Y9
+ VMOVDQU 3424(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 3456(CX), Y9
+ VMOVDQU 3488(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 3520(CX), Y9
+ VMOVDQU 3552(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Store 8 outputs
+ MOVQ (DX), R12
+ VMOVDQU Y0, (R12)(R11*1)
+ MOVQ 24(DX), R12
+ VMOVDQU Y1, (R12)(R11*1)
+ MOVQ 48(DX), R12
+ VMOVDQU Y2, (R12)(R11*1)
+ MOVQ 72(DX), R12
+ VMOVDQU Y3, (R12)(R11*1)
+ MOVQ 96(DX), R12
+ VMOVDQU Y4, (R12)(R11*1)
+ MOVQ 120(DX), R12
+ VMOVDQU Y5, (R12)(R11*1)
+ MOVQ 144(DX), R12
+ VMOVDQU Y6, (R12)(R11*1)
+ MOVQ 168(DX), R12
+ VMOVDQU Y7, (R12)(R11*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R11
+ DECQ AX
+ JNZ mulAvxTwo_7x8_loop
+ VZEROUPPER
+
+mulAvxTwo_7x8_end:
+ RET
+
+// func mulAvxTwo_8x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_8x1(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 20 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_8x1_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), BX
+ MOVQ $0x0000000f, R12
+ MOVQ R12, X1
+ VPBROADCASTB X1, Y1
+ MOVQ start+72(FP), R12
+
+mulAvxTwo_8x1_loop:
+ // Clear 1 outputs
+ VPXOR Y0, Y0, Y0
+
+ // Load and process 32 bytes from input 0 to 1 outputs
+ VMOVDQU (BP)(R12*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU (CX), Y2
+ VMOVDQU 32(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 1 to 1 outputs
+ VMOVDQU (SI)(R12*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 64(CX), Y2
+ VMOVDQU 96(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 2 to 1 outputs
+ VMOVDQU (DI)(R12*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 128(CX), Y2
+ VMOVDQU 160(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 3 to 1 outputs
+ VMOVDQU (R8)(R12*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 192(CX), Y2
+ VMOVDQU 224(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 4 to 1 outputs
+ VMOVDQU (R9)(R12*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 256(CX), Y2
+ VMOVDQU 288(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 5 to 1 outputs
+ VMOVDQU (R10)(R12*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 320(CX), Y2
+ VMOVDQU 352(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 6 to 1 outputs
+ VMOVDQU (R11)(R12*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 384(CX), Y2
+ VMOVDQU 416(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 7 to 1 outputs
+ VMOVDQU (BX)(R12*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 448(CX), Y2
+ VMOVDQU 480(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Store 1 outputs
+ VMOVDQU Y0, (DX)(R12*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R12
+ DECQ AX
+ JNZ mulAvxTwo_8x1_loop
+ VZEROUPPER
+
+mulAvxTwo_8x1_end:
+ RET
+
+// func mulAvxTwo_8x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_8x2(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 39 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_8x2_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), DX
+ MOVQ in_base+24(FP), BP
+ MOVQ (BP), SI
+ MOVQ 24(BP), DI
+ MOVQ 48(BP), R8
+ MOVQ 72(BP), R9
+ MOVQ 96(BP), R10
+ MOVQ 120(BP), R11
+ MOVQ 144(BP), R12
+ MOVQ 168(BP), BP
+ MOVQ $0x0000000f, R13
+ MOVQ R13, X2
+ VPBROADCASTB X2, Y2
+ MOVQ start+72(FP), R13
+
+mulAvxTwo_8x2_loop:
+ // Clear 2 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+
+ // Load and process 32 bytes from input 0 to 2 outputs
+ VMOVDQU (SI)(R13*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU (CX), Y3
+ VMOVDQU 32(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 64(CX), Y3
+ VMOVDQU 96(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 1 to 2 outputs
+ VMOVDQU (DI)(R13*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 128(CX), Y3
+ VMOVDQU 160(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 192(CX), Y3
+ VMOVDQU 224(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 2 to 2 outputs
+ VMOVDQU (R8)(R13*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 256(CX), Y3
+ VMOVDQU 288(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 320(CX), Y3
+ VMOVDQU 352(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 3 to 2 outputs
+ VMOVDQU (R9)(R13*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 384(CX), Y3
+ VMOVDQU 416(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 448(CX), Y3
+ VMOVDQU 480(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 4 to 2 outputs
+ VMOVDQU (R10)(R13*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 512(CX), Y3
+ VMOVDQU 544(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 576(CX), Y3
+ VMOVDQU 608(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 5 to 2 outputs
+ VMOVDQU (R11)(R13*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 640(CX), Y3
+ VMOVDQU 672(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 704(CX), Y3
+ VMOVDQU 736(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 6 to 2 outputs
+ VMOVDQU (R12)(R13*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 768(CX), Y3
+ VMOVDQU 800(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 832(CX), Y3
+ VMOVDQU 864(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 7 to 2 outputs
+ VMOVDQU (BP)(R13*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 896(CX), Y3
+ VMOVDQU 928(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 960(CX), Y3
+ VMOVDQU 992(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Store 2 outputs
+ VMOVDQU Y0, (BX)(R13*1)
+ VMOVDQU Y1, (DX)(R13*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R13
+ DECQ AX
+ JNZ mulAvxTwo_8x2_loop
+ VZEROUPPER
+
+mulAvxTwo_8x2_end:
+ RET
+
+// func mulAvxTwo_8x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_8x3(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 56 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_8x3_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), DX
+ MOVQ in_base+24(FP), SI
+ MOVQ (SI), DI
+ MOVQ 24(SI), R8
+ MOVQ 48(SI), R9
+ MOVQ 72(SI), R10
+ MOVQ 96(SI), R11
+ MOVQ 120(SI), R12
+ MOVQ 144(SI), R13
+ MOVQ 168(SI), SI
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X3
+ VPBROADCASTB X3, Y3
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_8x3_loop:
+ // Clear 3 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+
+ // Load and process 32 bytes from input 0 to 3 outputs
+ VMOVDQU (DI)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU (CX), Y4
+ VMOVDQU 32(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 64(CX), Y4
+ VMOVDQU 96(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 128(CX), Y4
+ VMOVDQU 160(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 1 to 3 outputs
+ VMOVDQU (R8)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 192(CX), Y4
+ VMOVDQU 224(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 256(CX), Y4
+ VMOVDQU 288(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 320(CX), Y4
+ VMOVDQU 352(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 2 to 3 outputs
+ VMOVDQU (R9)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 384(CX), Y4
+ VMOVDQU 416(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 448(CX), Y4
+ VMOVDQU 480(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 512(CX), Y4
+ VMOVDQU 544(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 3 to 3 outputs
+ VMOVDQU (R10)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 576(CX), Y4
+ VMOVDQU 608(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 640(CX), Y4
+ VMOVDQU 672(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 704(CX), Y4
+ VMOVDQU 736(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 4 to 3 outputs
+ VMOVDQU (R11)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 768(CX), Y4
+ VMOVDQU 800(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 832(CX), Y4
+ VMOVDQU 864(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 896(CX), Y4
+ VMOVDQU 928(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 5 to 3 outputs
+ VMOVDQU (R12)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 960(CX), Y4
+ VMOVDQU 992(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1024(CX), Y4
+ VMOVDQU 1056(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1088(CX), Y4
+ VMOVDQU 1120(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 6 to 3 outputs
+ VMOVDQU (R13)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 1152(CX), Y4
+ VMOVDQU 1184(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1216(CX), Y4
+ VMOVDQU 1248(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1280(CX), Y4
+ VMOVDQU 1312(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 7 to 3 outputs
+ VMOVDQU (SI)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 1344(CX), Y4
+ VMOVDQU 1376(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1408(CX), Y4
+ VMOVDQU 1440(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1472(CX), Y4
+ VMOVDQU 1504(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Store 3 outputs
+ VMOVDQU Y0, (BX)(R14*1)
+ VMOVDQU Y1, (BP)(R14*1)
+ VMOVDQU Y2, (DX)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_8x3_loop
+ VZEROUPPER
+
+mulAvxTwo_8x3_end:
+ RET
+
+// func mulAvxTwo_8x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_8x4(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 73 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_8x4_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), SI
+ MOVQ 72(DX), DX
+ MOVQ in_base+24(FP), DI
+ MOVQ (DI), R8
+ MOVQ 24(DI), R9
+ MOVQ 48(DI), R10
+ MOVQ 72(DI), R11
+ MOVQ 96(DI), R12
+ MOVQ 120(DI), R13
+ MOVQ 144(DI), R14
+ MOVQ 168(DI), DI
+ MOVQ $0x0000000f, R15
+ MOVQ R15, X4
+ VPBROADCASTB X4, Y4
+ MOVQ start+72(FP), R15
+
+mulAvxTwo_8x4_loop:
+ // Clear 4 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+
+ // Load and process 32 bytes from input 0 to 4 outputs
+ VMOVDQU (R8)(R15*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU (CX), Y5
+ VMOVDQU 32(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 64(CX), Y5
+ VMOVDQU 96(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 192(CX), Y5
+ VMOVDQU 224(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 1 to 4 outputs
+ VMOVDQU (R9)(R15*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 256(CX), Y5
+ VMOVDQU 288(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 320(CX), Y5
+ VMOVDQU 352(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 384(CX), Y5
+ VMOVDQU 416(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 448(CX), Y5
+ VMOVDQU 480(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 2 to 4 outputs
+ VMOVDQU (R10)(R15*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 512(CX), Y5
+ VMOVDQU 544(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 576(CX), Y5
+ VMOVDQU 608(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 640(CX), Y5
+ VMOVDQU 672(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 704(CX), Y5
+ VMOVDQU 736(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 3 to 4 outputs
+ VMOVDQU (R11)(R15*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 768(CX), Y5
+ VMOVDQU 800(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 832(CX), Y5
+ VMOVDQU 864(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 896(CX), Y5
+ VMOVDQU 928(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 960(CX), Y5
+ VMOVDQU 992(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 4 to 4 outputs
+ VMOVDQU (R12)(R15*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1024(CX), Y5
+ VMOVDQU 1056(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1088(CX), Y5
+ VMOVDQU 1120(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1152(CX), Y5
+ VMOVDQU 1184(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1216(CX), Y5
+ VMOVDQU 1248(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 5 to 4 outputs
+ VMOVDQU (R13)(R15*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1280(CX), Y5
+ VMOVDQU 1312(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1344(CX), Y5
+ VMOVDQU 1376(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1408(CX), Y5
+ VMOVDQU 1440(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1472(CX), Y5
+ VMOVDQU 1504(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 6 to 4 outputs
+ VMOVDQU (R14)(R15*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1536(CX), Y5
+ VMOVDQU 1568(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1600(CX), Y5
+ VMOVDQU 1632(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1664(CX), Y5
+ VMOVDQU 1696(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1728(CX), Y5
+ VMOVDQU 1760(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 7 to 4 outputs
+ VMOVDQU (DI)(R15*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1792(CX), Y5
+ VMOVDQU 1824(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1856(CX), Y5
+ VMOVDQU 1888(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1920(CX), Y5
+ VMOVDQU 1952(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1984(CX), Y5
+ VMOVDQU 2016(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Store 4 outputs
+ VMOVDQU Y0, (BX)(R15*1)
+ VMOVDQU Y1, (BP)(R15*1)
+ VMOVDQU Y2, (SI)(R15*1)
+ VMOVDQU Y3, (DX)(R15*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R15
+ DECQ AX
+ JNZ mulAvxTwo_8x4_loop
+ VZEROUPPER
+
+mulAvxTwo_8x4_end:
+ RET
+
+// func mulAvxTwo_8x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_8x5(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 90 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_8x5_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), BX
+ MOVQ $0x0000000f, R12
+ MOVQ R12, X5
+ VPBROADCASTB X5, Y5
+ MOVQ start+72(FP), R12
+
+mulAvxTwo_8x5_loop:
+ // Clear 5 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+
+ // Load and process 32 bytes from input 0 to 5 outputs
+ VMOVDQU (BP)(R12*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU (CX), Y6
+ VMOVDQU 32(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 64(CX), Y6
+ VMOVDQU 96(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 128(CX), Y6
+ VMOVDQU 160(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 192(CX), Y6
+ VMOVDQU 224(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 256(CX), Y6
+ VMOVDQU 288(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 1 to 5 outputs
+ VMOVDQU (SI)(R12*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 320(CX), Y6
+ VMOVDQU 352(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 384(CX), Y6
+ VMOVDQU 416(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 448(CX), Y6
+ VMOVDQU 480(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 512(CX), Y6
+ VMOVDQU 544(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 576(CX), Y6
+ VMOVDQU 608(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 2 to 5 outputs
+ VMOVDQU (DI)(R12*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 640(CX), Y6
+ VMOVDQU 672(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 704(CX), Y6
+ VMOVDQU 736(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 768(CX), Y6
+ VMOVDQU 800(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 832(CX), Y6
+ VMOVDQU 864(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 896(CX), Y6
+ VMOVDQU 928(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 3 to 5 outputs
+ VMOVDQU (R8)(R12*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 960(CX), Y6
+ VMOVDQU 992(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1024(CX), Y6
+ VMOVDQU 1056(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1088(CX), Y6
+ VMOVDQU 1120(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1152(CX), Y6
+ VMOVDQU 1184(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1216(CX), Y6
+ VMOVDQU 1248(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 4 to 5 outputs
+ VMOVDQU (R9)(R12*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1280(CX), Y6
+ VMOVDQU 1312(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1344(CX), Y6
+ VMOVDQU 1376(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1408(CX), Y6
+ VMOVDQU 1440(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1472(CX), Y6
+ VMOVDQU 1504(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1536(CX), Y6
+ VMOVDQU 1568(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 5 to 5 outputs
+ VMOVDQU (R10)(R12*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1600(CX), Y6
+ VMOVDQU 1632(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1664(CX), Y6
+ VMOVDQU 1696(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1728(CX), Y6
+ VMOVDQU 1760(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1792(CX), Y6
+ VMOVDQU 1824(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1856(CX), Y6
+ VMOVDQU 1888(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 6 to 5 outputs
+ VMOVDQU (R11)(R12*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1920(CX), Y6
+ VMOVDQU 1952(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1984(CX), Y6
+ VMOVDQU 2016(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 2048(CX), Y6
+ VMOVDQU 2080(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 2112(CX), Y6
+ VMOVDQU 2144(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 2176(CX), Y6
+ VMOVDQU 2208(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 7 to 5 outputs
+ VMOVDQU (BX)(R12*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 2240(CX), Y6
+ VMOVDQU 2272(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 2304(CX), Y6
+ VMOVDQU 2336(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 2368(CX), Y6
+ VMOVDQU 2400(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 2432(CX), Y6
+ VMOVDQU 2464(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 2496(CX), Y6
+ VMOVDQU 2528(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Store 5 outputs
+ MOVQ (DX), R13
+ VMOVDQU Y0, (R13)(R12*1)
+ MOVQ 24(DX), R13
+ VMOVDQU Y1, (R13)(R12*1)
+ MOVQ 48(DX), R13
+ VMOVDQU Y2, (R13)(R12*1)
+ MOVQ 72(DX), R13
+ VMOVDQU Y3, (R13)(R12*1)
+ MOVQ 96(DX), R13
+ VMOVDQU Y4, (R13)(R12*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R12
+ DECQ AX
+ JNZ mulAvxTwo_8x5_loop
+ VZEROUPPER
+
+mulAvxTwo_8x5_end:
+ RET
+
+// func mulAvxTwo_8x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_8x6(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 107 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_8x6_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), BX
+ MOVQ $0x0000000f, R12
+ MOVQ R12, X6
+ VPBROADCASTB X6, Y6
+ MOVQ start+72(FP), R12
+
+mulAvxTwo_8x6_loop:
+ // Clear 6 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+
+ // Load and process 32 bytes from input 0 to 6 outputs
+ VMOVDQU (BP)(R12*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU (CX), Y7
+ VMOVDQU 32(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 64(CX), Y7
+ VMOVDQU 96(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 128(CX), Y7
+ VMOVDQU 160(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 192(CX), Y7
+ VMOVDQU 224(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 256(CX), Y7
+ VMOVDQU 288(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 320(CX), Y7
+ VMOVDQU 352(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 1 to 6 outputs
+ VMOVDQU (SI)(R12*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 384(CX), Y7
+ VMOVDQU 416(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 448(CX), Y7
+ VMOVDQU 480(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 512(CX), Y7
+ VMOVDQU 544(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 576(CX), Y7
+ VMOVDQU 608(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 640(CX), Y7
+ VMOVDQU 672(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 704(CX), Y7
+ VMOVDQU 736(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 2 to 6 outputs
+ VMOVDQU (DI)(R12*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 768(CX), Y7
+ VMOVDQU 800(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 832(CX), Y7
+ VMOVDQU 864(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 896(CX), Y7
+ VMOVDQU 928(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 960(CX), Y7
+ VMOVDQU 992(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1024(CX), Y7
+ VMOVDQU 1056(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1088(CX), Y7
+ VMOVDQU 1120(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 3 to 6 outputs
+ VMOVDQU (R8)(R12*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1152(CX), Y7
+ VMOVDQU 1184(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1216(CX), Y7
+ VMOVDQU 1248(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 1280(CX), Y7
+ VMOVDQU 1312(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 1344(CX), Y7
+ VMOVDQU 1376(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1408(CX), Y7
+ VMOVDQU 1440(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1472(CX), Y7
+ VMOVDQU 1504(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 4 to 6 outputs
+ VMOVDQU (R9)(R12*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1536(CX), Y7
+ VMOVDQU 1568(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1600(CX), Y7
+ VMOVDQU 1632(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 1664(CX), Y7
+ VMOVDQU 1696(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 1728(CX), Y7
+ VMOVDQU 1760(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1792(CX), Y7
+ VMOVDQU 1824(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1856(CX), Y7
+ VMOVDQU 1888(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 5 to 6 outputs
+ VMOVDQU (R10)(R12*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1920(CX), Y7
+ VMOVDQU 1952(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1984(CX), Y7
+ VMOVDQU 2016(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 2048(CX), Y7
+ VMOVDQU 2080(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 2112(CX), Y7
+ VMOVDQU 2144(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 2176(CX), Y7
+ VMOVDQU 2208(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 2240(CX), Y7
+ VMOVDQU 2272(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 6 to 6 outputs
+ VMOVDQU (R11)(R12*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 2304(CX), Y7
+ VMOVDQU 2336(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 2368(CX), Y7
+ VMOVDQU 2400(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 2432(CX), Y7
+ VMOVDQU 2464(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 2496(CX), Y7
+ VMOVDQU 2528(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 2560(CX), Y7
+ VMOVDQU 2592(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 2624(CX), Y7
+ VMOVDQU 2656(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 7 to 6 outputs
+ VMOVDQU (BX)(R12*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 2688(CX), Y7
+ VMOVDQU 2720(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 2752(CX), Y7
+ VMOVDQU 2784(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 2816(CX), Y7
+ VMOVDQU 2848(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 2880(CX), Y7
+ VMOVDQU 2912(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 2944(CX), Y7
+ VMOVDQU 2976(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 3008(CX), Y7
+ VMOVDQU 3040(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Store 6 outputs
+ MOVQ (DX), R13
+ VMOVDQU Y0, (R13)(R12*1)
+ MOVQ 24(DX), R13
+ VMOVDQU Y1, (R13)(R12*1)
+ MOVQ 48(DX), R13
+ VMOVDQU Y2, (R13)(R12*1)
+ MOVQ 72(DX), R13
+ VMOVDQU Y3, (R13)(R12*1)
+ MOVQ 96(DX), R13
+ VMOVDQU Y4, (R13)(R12*1)
+ MOVQ 120(DX), R13
+ VMOVDQU Y5, (R13)(R12*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R12
+ DECQ AX
+ JNZ mulAvxTwo_8x6_loop
+ VZEROUPPER
+
+mulAvxTwo_8x6_end:
+ RET
+
+// func mulAvxTwo_8x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_8x7(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 124 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_8x7_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), BX
+ MOVQ $0x0000000f, R12
+ MOVQ R12, X7
+ VPBROADCASTB X7, Y7
+ MOVQ start+72(FP), R12
+
+mulAvxTwo_8x7_loop:
+ // Clear 7 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+
+ // Load and process 32 bytes from input 0 to 7 outputs
+ VMOVDQU (BP)(R12*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU (CX), Y8
+ VMOVDQU 32(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 64(CX), Y8
+ VMOVDQU 96(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 128(CX), Y8
+ VMOVDQU 160(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 192(CX), Y8
+ VMOVDQU 224(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 256(CX), Y8
+ VMOVDQU 288(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 320(CX), Y8
+ VMOVDQU 352(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 384(CX), Y8
+ VMOVDQU 416(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 1 to 7 outputs
+ VMOVDQU (SI)(R12*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 448(CX), Y8
+ VMOVDQU 480(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 512(CX), Y8
+ VMOVDQU 544(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 576(CX), Y8
+ VMOVDQU 608(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 640(CX), Y8
+ VMOVDQU 672(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 704(CX), Y8
+ VMOVDQU 736(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 768(CX), Y8
+ VMOVDQU 800(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 832(CX), Y8
+ VMOVDQU 864(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 2 to 7 outputs
+ VMOVDQU (DI)(R12*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 896(CX), Y8
+ VMOVDQU 928(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 960(CX), Y8
+ VMOVDQU 992(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1024(CX), Y8
+ VMOVDQU 1056(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1088(CX), Y8
+ VMOVDQU 1120(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1152(CX), Y8
+ VMOVDQU 1184(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1216(CX), Y8
+ VMOVDQU 1248(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1280(CX), Y8
+ VMOVDQU 1312(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 3 to 7 outputs
+ VMOVDQU (R8)(R12*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 1344(CX), Y8
+ VMOVDQU 1376(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 1408(CX), Y8
+ VMOVDQU 1440(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1472(CX), Y8
+ VMOVDQU 1504(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1536(CX), Y8
+ VMOVDQU 1568(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1600(CX), Y8
+ VMOVDQU 1632(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1664(CX), Y8
+ VMOVDQU 1696(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1728(CX), Y8
+ VMOVDQU 1760(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 4 to 7 outputs
+ VMOVDQU (R9)(R12*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 1792(CX), Y8
+ VMOVDQU 1824(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 1856(CX), Y8
+ VMOVDQU 1888(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1920(CX), Y8
+ VMOVDQU 1952(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1984(CX), Y8
+ VMOVDQU 2016(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2048(CX), Y8
+ VMOVDQU 2080(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 2112(CX), Y8
+ VMOVDQU 2144(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 2176(CX), Y8
+ VMOVDQU 2208(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 5 to 7 outputs
+ VMOVDQU (R10)(R12*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 2240(CX), Y8
+ VMOVDQU 2272(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 2304(CX), Y8
+ VMOVDQU 2336(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 2368(CX), Y8
+ VMOVDQU 2400(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 2432(CX), Y8
+ VMOVDQU 2464(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2496(CX), Y8
+ VMOVDQU 2528(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 2560(CX), Y8
+ VMOVDQU 2592(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 2624(CX), Y8
+ VMOVDQU 2656(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 6 to 7 outputs
+ VMOVDQU (R11)(R12*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 2688(CX), Y8
+ VMOVDQU 2720(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 2752(CX), Y8
+ VMOVDQU 2784(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 2816(CX), Y8
+ VMOVDQU 2848(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 2880(CX), Y8
+ VMOVDQU 2912(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2944(CX), Y8
+ VMOVDQU 2976(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 3008(CX), Y8
+ VMOVDQU 3040(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 3072(CX), Y8
+ VMOVDQU 3104(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 7 to 7 outputs
+ VMOVDQU (BX)(R12*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 3136(CX), Y8
+ VMOVDQU 3168(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 3200(CX), Y8
+ VMOVDQU 3232(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 3264(CX), Y8
+ VMOVDQU 3296(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 3328(CX), Y8
+ VMOVDQU 3360(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 3392(CX), Y8
+ VMOVDQU 3424(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 3456(CX), Y8
+ VMOVDQU 3488(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 3520(CX), Y8
+ VMOVDQU 3552(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Store 7 outputs
+ MOVQ (DX), R13
+ VMOVDQU Y0, (R13)(R12*1)
+ MOVQ 24(DX), R13
+ VMOVDQU Y1, (R13)(R12*1)
+ MOVQ 48(DX), R13
+ VMOVDQU Y2, (R13)(R12*1)
+ MOVQ 72(DX), R13
+ VMOVDQU Y3, (R13)(R12*1)
+ MOVQ 96(DX), R13
+ VMOVDQU Y4, (R13)(R12*1)
+ MOVQ 120(DX), R13
+ VMOVDQU Y5, (R13)(R12*1)
+ MOVQ 144(DX), R13
+ VMOVDQU Y6, (R13)(R12*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R12
+ DECQ AX
+ JNZ mulAvxTwo_8x7_loop
+ VZEROUPPER
+
+mulAvxTwo_8x7_end:
+ RET
+
+// func mulAvxTwo_8x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_8x8(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 141 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_8x8_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), BX
+ MOVQ $0x0000000f, R12
+ MOVQ R12, X8
+ VPBROADCASTB X8, Y8
+ MOVQ start+72(FP), R12
+
+mulAvxTwo_8x8_loop:
+ // Clear 8 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+ VPXOR Y7, Y7, Y7
+
+ // Load and process 32 bytes from input 0 to 8 outputs
+ VMOVDQU (BP)(R12*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU (CX), Y9
+ VMOVDQU 32(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 64(CX), Y9
+ VMOVDQU 96(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 128(CX), Y9
+ VMOVDQU 160(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 192(CX), Y9
+ VMOVDQU 224(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 256(CX), Y9
+ VMOVDQU 288(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 320(CX), Y9
+ VMOVDQU 352(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 384(CX), Y9
+ VMOVDQU 416(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 448(CX), Y9
+ VMOVDQU 480(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 1 to 8 outputs
+ VMOVDQU (SI)(R12*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 512(CX), Y9
+ VMOVDQU 544(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 576(CX), Y9
+ VMOVDQU 608(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 640(CX), Y9
+ VMOVDQU 672(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 704(CX), Y9
+ VMOVDQU 736(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 768(CX), Y9
+ VMOVDQU 800(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 832(CX), Y9
+ VMOVDQU 864(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 896(CX), Y9
+ VMOVDQU 928(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 960(CX), Y9
+ VMOVDQU 992(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 2 to 8 outputs
+ VMOVDQU (DI)(R12*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1024(CX), Y9
+ VMOVDQU 1056(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1088(CX), Y9
+ VMOVDQU 1120(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1152(CX), Y9
+ VMOVDQU 1184(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1216(CX), Y9
+ VMOVDQU 1248(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1280(CX), Y9
+ VMOVDQU 1312(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1344(CX), Y9
+ VMOVDQU 1376(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1408(CX), Y9
+ VMOVDQU 1440(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1472(CX), Y9
+ VMOVDQU 1504(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 3 to 8 outputs
+ VMOVDQU (R8)(R12*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1536(CX), Y9
+ VMOVDQU 1568(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1600(CX), Y9
+ VMOVDQU 1632(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1664(CX), Y9
+ VMOVDQU 1696(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1728(CX), Y9
+ VMOVDQU 1760(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1792(CX), Y9
+ VMOVDQU 1824(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1856(CX), Y9
+ VMOVDQU 1888(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1920(CX), Y9
+ VMOVDQU 1952(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1984(CX), Y9
+ VMOVDQU 2016(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 4 to 8 outputs
+ VMOVDQU (R9)(R12*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 2048(CX), Y9
+ VMOVDQU 2080(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 2112(CX), Y9
+ VMOVDQU 2144(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 2176(CX), Y9
+ VMOVDQU 2208(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 2240(CX), Y9
+ VMOVDQU 2272(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 2304(CX), Y9
+ VMOVDQU 2336(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 2368(CX), Y9
+ VMOVDQU 2400(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 2432(CX), Y9
+ VMOVDQU 2464(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 2496(CX), Y9
+ VMOVDQU 2528(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 5 to 8 outputs
+ VMOVDQU (R10)(R12*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 2560(CX), Y9
+ VMOVDQU 2592(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 2624(CX), Y9
+ VMOVDQU 2656(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 2688(CX), Y9
+ VMOVDQU 2720(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 2752(CX), Y9
+ VMOVDQU 2784(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 2816(CX), Y9
+ VMOVDQU 2848(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 2880(CX), Y9
+ VMOVDQU 2912(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 2944(CX), Y9
+ VMOVDQU 2976(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 3008(CX), Y9
+ VMOVDQU 3040(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 6 to 8 outputs
+ VMOVDQU (R11)(R12*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 3072(CX), Y9
+ VMOVDQU 3104(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 3136(CX), Y9
+ VMOVDQU 3168(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 3200(CX), Y9
+ VMOVDQU 3232(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 3264(CX), Y9
+ VMOVDQU 3296(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 3328(CX), Y9
+ VMOVDQU 3360(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 3392(CX), Y9
+ VMOVDQU 3424(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 3456(CX), Y9
+ VMOVDQU 3488(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 3520(CX), Y9
+ VMOVDQU 3552(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 7 to 8 outputs
+ VMOVDQU (BX)(R12*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 3584(CX), Y9
+ VMOVDQU 3616(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 3648(CX), Y9
+ VMOVDQU 3680(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 3712(CX), Y9
+ VMOVDQU 3744(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 3776(CX), Y9
+ VMOVDQU 3808(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 3840(CX), Y9
+ VMOVDQU 3872(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 3904(CX), Y9
+ VMOVDQU 3936(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 3968(CX), Y9
+ VMOVDQU 4000(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 4032(CX), Y9
+ VMOVDQU 4064(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Store 8 outputs
+ MOVQ (DX), R13
+ VMOVDQU Y0, (R13)(R12*1)
+ MOVQ 24(DX), R13
+ VMOVDQU Y1, (R13)(R12*1)
+ MOVQ 48(DX), R13
+ VMOVDQU Y2, (R13)(R12*1)
+ MOVQ 72(DX), R13
+ VMOVDQU Y3, (R13)(R12*1)
+ MOVQ 96(DX), R13
+ VMOVDQU Y4, (R13)(R12*1)
+ MOVQ 120(DX), R13
+ VMOVDQU Y5, (R13)(R12*1)
+ MOVQ 144(DX), R13
+ VMOVDQU Y6, (R13)(R12*1)
+ MOVQ 168(DX), R13
+ VMOVDQU Y7, (R13)(R12*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R12
+ DECQ AX
+ JNZ mulAvxTwo_8x8_loop
+ VZEROUPPER
+
+mulAvxTwo_8x8_end:
+ RET
+
+// func mulAvxTwo_9x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_9x1(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 22 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_9x1_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), R12
+ MOVQ 192(BX), BX
+ MOVQ $0x0000000f, R13
+ MOVQ R13, X1
+ VPBROADCASTB X1, Y1
+ MOVQ start+72(FP), R13
+
+mulAvxTwo_9x1_loop:
+ // Clear 1 outputs
+ VPXOR Y0, Y0, Y0
+
+ // Load and process 32 bytes from input 0 to 1 outputs
+ VMOVDQU (BP)(R13*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU (CX), Y2
+ VMOVDQU 32(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 1 to 1 outputs
+ VMOVDQU (SI)(R13*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 64(CX), Y2
+ VMOVDQU 96(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 2 to 1 outputs
+ VMOVDQU (DI)(R13*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 128(CX), Y2
+ VMOVDQU 160(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 3 to 1 outputs
+ VMOVDQU (R8)(R13*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 192(CX), Y2
+ VMOVDQU 224(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 4 to 1 outputs
+ VMOVDQU (R9)(R13*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 256(CX), Y2
+ VMOVDQU 288(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 5 to 1 outputs
+ VMOVDQU (R10)(R13*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 320(CX), Y2
+ VMOVDQU 352(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 6 to 1 outputs
+ VMOVDQU (R11)(R13*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 384(CX), Y2
+ VMOVDQU 416(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 7 to 1 outputs
+ VMOVDQU (R12)(R13*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 448(CX), Y2
+ VMOVDQU 480(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 8 to 1 outputs
+ VMOVDQU (BX)(R13*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 512(CX), Y2
+ VMOVDQU 544(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Store 1 outputs
+ VMOVDQU Y0, (DX)(R13*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R13
+ DECQ AX
+ JNZ mulAvxTwo_9x1_loop
+ VZEROUPPER
+
+mulAvxTwo_9x1_end:
+ RET
+
+// func mulAvxTwo_9x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_9x2(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 43 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_9x2_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), DX
+ MOVQ in_base+24(FP), BP
+ MOVQ (BP), SI
+ MOVQ 24(BP), DI
+ MOVQ 48(BP), R8
+ MOVQ 72(BP), R9
+ MOVQ 96(BP), R10
+ MOVQ 120(BP), R11
+ MOVQ 144(BP), R12
+ MOVQ 168(BP), R13
+ MOVQ 192(BP), BP
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X2
+ VPBROADCASTB X2, Y2
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_9x2_loop:
+ // Clear 2 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+
+ // Load and process 32 bytes from input 0 to 2 outputs
+ VMOVDQU (SI)(R14*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU (CX), Y3
+ VMOVDQU 32(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 64(CX), Y3
+ VMOVDQU 96(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 1 to 2 outputs
+ VMOVDQU (DI)(R14*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 128(CX), Y3
+ VMOVDQU 160(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 192(CX), Y3
+ VMOVDQU 224(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 2 to 2 outputs
+ VMOVDQU (R8)(R14*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 256(CX), Y3
+ VMOVDQU 288(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 320(CX), Y3
+ VMOVDQU 352(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 3 to 2 outputs
+ VMOVDQU (R9)(R14*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 384(CX), Y3
+ VMOVDQU 416(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 448(CX), Y3
+ VMOVDQU 480(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 4 to 2 outputs
+ VMOVDQU (R10)(R14*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 512(CX), Y3
+ VMOVDQU 544(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 576(CX), Y3
+ VMOVDQU 608(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 5 to 2 outputs
+ VMOVDQU (R11)(R14*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 640(CX), Y3
+ VMOVDQU 672(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 704(CX), Y3
+ VMOVDQU 736(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 6 to 2 outputs
+ VMOVDQU (R12)(R14*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 768(CX), Y3
+ VMOVDQU 800(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 832(CX), Y3
+ VMOVDQU 864(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 7 to 2 outputs
+ VMOVDQU (R13)(R14*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 896(CX), Y3
+ VMOVDQU 928(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 960(CX), Y3
+ VMOVDQU 992(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 8 to 2 outputs
+ VMOVDQU (BP)(R14*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 1024(CX), Y3
+ VMOVDQU 1056(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 1088(CX), Y3
+ VMOVDQU 1120(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Store 2 outputs
+ VMOVDQU Y0, (BX)(R14*1)
+ VMOVDQU Y1, (DX)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_9x2_loop
+ VZEROUPPER
+
+mulAvxTwo_9x2_end:
+ RET
+
+// func mulAvxTwo_9x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_9x3(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 62 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_9x3_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), BP
+ MOVQ 48(DX), DX
+ MOVQ in_base+24(FP), SI
+ MOVQ (SI), DI
+ MOVQ 24(SI), R8
+ MOVQ 48(SI), R9
+ MOVQ 72(SI), R10
+ MOVQ 96(SI), R11
+ MOVQ 120(SI), R12
+ MOVQ 144(SI), R13
+ MOVQ 168(SI), R14
+ MOVQ 192(SI), SI
+ MOVQ $0x0000000f, R15
+ MOVQ R15, X3
+ VPBROADCASTB X3, Y3
+ MOVQ start+72(FP), R15
+
+mulAvxTwo_9x3_loop:
+ // Clear 3 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+
+ // Load and process 32 bytes from input 0 to 3 outputs
+ VMOVDQU (DI)(R15*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU (CX), Y4
+ VMOVDQU 32(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 64(CX), Y4
+ VMOVDQU 96(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 128(CX), Y4
+ VMOVDQU 160(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 1 to 3 outputs
+ VMOVDQU (R8)(R15*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 192(CX), Y4
+ VMOVDQU 224(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 256(CX), Y4
+ VMOVDQU 288(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 320(CX), Y4
+ VMOVDQU 352(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 2 to 3 outputs
+ VMOVDQU (R9)(R15*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 384(CX), Y4
+ VMOVDQU 416(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 448(CX), Y4
+ VMOVDQU 480(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 512(CX), Y4
+ VMOVDQU 544(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 3 to 3 outputs
+ VMOVDQU (R10)(R15*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 576(CX), Y4
+ VMOVDQU 608(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 640(CX), Y4
+ VMOVDQU 672(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 704(CX), Y4
+ VMOVDQU 736(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 4 to 3 outputs
+ VMOVDQU (R11)(R15*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 768(CX), Y4
+ VMOVDQU 800(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 832(CX), Y4
+ VMOVDQU 864(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 896(CX), Y4
+ VMOVDQU 928(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 5 to 3 outputs
+ VMOVDQU (R12)(R15*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 960(CX), Y4
+ VMOVDQU 992(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1024(CX), Y4
+ VMOVDQU 1056(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1088(CX), Y4
+ VMOVDQU 1120(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 6 to 3 outputs
+ VMOVDQU (R13)(R15*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 1152(CX), Y4
+ VMOVDQU 1184(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1216(CX), Y4
+ VMOVDQU 1248(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1280(CX), Y4
+ VMOVDQU 1312(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 7 to 3 outputs
+ VMOVDQU (R14)(R15*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 1344(CX), Y4
+ VMOVDQU 1376(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1408(CX), Y4
+ VMOVDQU 1440(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1472(CX), Y4
+ VMOVDQU 1504(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 8 to 3 outputs
+ VMOVDQU (SI)(R15*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 1536(CX), Y4
+ VMOVDQU 1568(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1600(CX), Y4
+ VMOVDQU 1632(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1664(CX), Y4
+ VMOVDQU 1696(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Store 3 outputs
+ VMOVDQU Y0, (BX)(R15*1)
+ VMOVDQU Y1, (BP)(R15*1)
+ VMOVDQU Y2, (DX)(R15*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R15
+ DECQ AX
+ JNZ mulAvxTwo_9x3_loop
+ VZEROUPPER
+
+mulAvxTwo_9x3_end:
+ RET
+
+// func mulAvxTwo_9x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_9x4(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 81 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_9x4_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), R12
+ MOVQ 192(BX), BX
+ MOVQ $0x0000000f, R13
+ MOVQ R13, X4
+ VPBROADCASTB X4, Y4
+ MOVQ start+72(FP), R13
+
+mulAvxTwo_9x4_loop:
+ // Clear 4 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+
+ // Load and process 32 bytes from input 0 to 4 outputs
+ VMOVDQU (BP)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU (CX), Y5
+ VMOVDQU 32(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 64(CX), Y5
+ VMOVDQU 96(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 192(CX), Y5
+ VMOVDQU 224(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 1 to 4 outputs
+ VMOVDQU (SI)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 256(CX), Y5
+ VMOVDQU 288(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 320(CX), Y5
+ VMOVDQU 352(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 384(CX), Y5
+ VMOVDQU 416(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 448(CX), Y5
+ VMOVDQU 480(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 2 to 4 outputs
+ VMOVDQU (DI)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 512(CX), Y5
+ VMOVDQU 544(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 576(CX), Y5
+ VMOVDQU 608(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 640(CX), Y5
+ VMOVDQU 672(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 704(CX), Y5
+ VMOVDQU 736(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 3 to 4 outputs
+ VMOVDQU (R8)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 768(CX), Y5
+ VMOVDQU 800(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 832(CX), Y5
+ VMOVDQU 864(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 896(CX), Y5
+ VMOVDQU 928(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 960(CX), Y5
+ VMOVDQU 992(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 4 to 4 outputs
+ VMOVDQU (R9)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1024(CX), Y5
+ VMOVDQU 1056(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1088(CX), Y5
+ VMOVDQU 1120(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1152(CX), Y5
+ VMOVDQU 1184(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1216(CX), Y5
+ VMOVDQU 1248(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 5 to 4 outputs
+ VMOVDQU (R10)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1280(CX), Y5
+ VMOVDQU 1312(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1344(CX), Y5
+ VMOVDQU 1376(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1408(CX), Y5
+ VMOVDQU 1440(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1472(CX), Y5
+ VMOVDQU 1504(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 6 to 4 outputs
+ VMOVDQU (R11)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1536(CX), Y5
+ VMOVDQU 1568(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1600(CX), Y5
+ VMOVDQU 1632(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1664(CX), Y5
+ VMOVDQU 1696(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1728(CX), Y5
+ VMOVDQU 1760(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 7 to 4 outputs
+ VMOVDQU (R12)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1792(CX), Y5
+ VMOVDQU 1824(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1856(CX), Y5
+ VMOVDQU 1888(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1920(CX), Y5
+ VMOVDQU 1952(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1984(CX), Y5
+ VMOVDQU 2016(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 8 to 4 outputs
+ VMOVDQU (BX)(R13*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 2048(CX), Y5
+ VMOVDQU 2080(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 2112(CX), Y5
+ VMOVDQU 2144(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 2176(CX), Y5
+ VMOVDQU 2208(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 2240(CX), Y5
+ VMOVDQU 2272(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Store 4 outputs
+ MOVQ (DX), R14
+ VMOVDQU Y0, (R14)(R13*1)
+ MOVQ 24(DX), R14
+ VMOVDQU Y1, (R14)(R13*1)
+ MOVQ 48(DX), R14
+ VMOVDQU Y2, (R14)(R13*1)
+ MOVQ 72(DX), R14
+ VMOVDQU Y3, (R14)(R13*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R13
+ DECQ AX
+ JNZ mulAvxTwo_9x4_loop
+ VZEROUPPER
+
+mulAvxTwo_9x4_end:
+ RET
+
+// func mulAvxTwo_9x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_9x5(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 100 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_9x5_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), R12
+ MOVQ 192(BX), BX
+ MOVQ $0x0000000f, R13
+ MOVQ R13, X5
+ VPBROADCASTB X5, Y5
+ MOVQ start+72(FP), R13
+
+mulAvxTwo_9x5_loop:
+ // Clear 5 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+
+ // Load and process 32 bytes from input 0 to 5 outputs
+ VMOVDQU (BP)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU (CX), Y6
+ VMOVDQU 32(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 64(CX), Y6
+ VMOVDQU 96(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 128(CX), Y6
+ VMOVDQU 160(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 192(CX), Y6
+ VMOVDQU 224(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 256(CX), Y6
+ VMOVDQU 288(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 1 to 5 outputs
+ VMOVDQU (SI)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 320(CX), Y6
+ VMOVDQU 352(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 384(CX), Y6
+ VMOVDQU 416(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 448(CX), Y6
+ VMOVDQU 480(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 512(CX), Y6
+ VMOVDQU 544(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 576(CX), Y6
+ VMOVDQU 608(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 2 to 5 outputs
+ VMOVDQU (DI)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 640(CX), Y6
+ VMOVDQU 672(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 704(CX), Y6
+ VMOVDQU 736(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 768(CX), Y6
+ VMOVDQU 800(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 832(CX), Y6
+ VMOVDQU 864(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 896(CX), Y6
+ VMOVDQU 928(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 3 to 5 outputs
+ VMOVDQU (R8)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 960(CX), Y6
+ VMOVDQU 992(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1024(CX), Y6
+ VMOVDQU 1056(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1088(CX), Y6
+ VMOVDQU 1120(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1152(CX), Y6
+ VMOVDQU 1184(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1216(CX), Y6
+ VMOVDQU 1248(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 4 to 5 outputs
+ VMOVDQU (R9)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1280(CX), Y6
+ VMOVDQU 1312(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1344(CX), Y6
+ VMOVDQU 1376(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1408(CX), Y6
+ VMOVDQU 1440(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1472(CX), Y6
+ VMOVDQU 1504(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1536(CX), Y6
+ VMOVDQU 1568(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 5 to 5 outputs
+ VMOVDQU (R10)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1600(CX), Y6
+ VMOVDQU 1632(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1664(CX), Y6
+ VMOVDQU 1696(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1728(CX), Y6
+ VMOVDQU 1760(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1792(CX), Y6
+ VMOVDQU 1824(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1856(CX), Y6
+ VMOVDQU 1888(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 6 to 5 outputs
+ VMOVDQU (R11)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1920(CX), Y6
+ VMOVDQU 1952(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1984(CX), Y6
+ VMOVDQU 2016(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 2048(CX), Y6
+ VMOVDQU 2080(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 2112(CX), Y6
+ VMOVDQU 2144(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 2176(CX), Y6
+ VMOVDQU 2208(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 7 to 5 outputs
+ VMOVDQU (R12)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 2240(CX), Y6
+ VMOVDQU 2272(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 2304(CX), Y6
+ VMOVDQU 2336(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 2368(CX), Y6
+ VMOVDQU 2400(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 2432(CX), Y6
+ VMOVDQU 2464(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 2496(CX), Y6
+ VMOVDQU 2528(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 8 to 5 outputs
+ VMOVDQU (BX)(R13*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 2560(CX), Y6
+ VMOVDQU 2592(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 2624(CX), Y6
+ VMOVDQU 2656(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 2688(CX), Y6
+ VMOVDQU 2720(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 2752(CX), Y6
+ VMOVDQU 2784(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 2816(CX), Y6
+ VMOVDQU 2848(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Store 5 outputs
+ MOVQ (DX), R14
+ VMOVDQU Y0, (R14)(R13*1)
+ MOVQ 24(DX), R14
+ VMOVDQU Y1, (R14)(R13*1)
+ MOVQ 48(DX), R14
+ VMOVDQU Y2, (R14)(R13*1)
+ MOVQ 72(DX), R14
+ VMOVDQU Y3, (R14)(R13*1)
+ MOVQ 96(DX), R14
+ VMOVDQU Y4, (R14)(R13*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R13
+ DECQ AX
+ JNZ mulAvxTwo_9x5_loop
+ VZEROUPPER
+
+mulAvxTwo_9x5_end:
+ RET
+
+// func mulAvxTwo_9x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_9x6(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 119 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_9x6_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), R12
+ MOVQ 192(BX), BX
+ MOVQ $0x0000000f, R13
+ MOVQ R13, X6
+ VPBROADCASTB X6, Y6
+ MOVQ start+72(FP), R13
+
+mulAvxTwo_9x6_loop:
+ // Clear 6 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+
+ // Load and process 32 bytes from input 0 to 6 outputs
+ VMOVDQU (BP)(R13*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU (CX), Y7
+ VMOVDQU 32(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 64(CX), Y7
+ VMOVDQU 96(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 128(CX), Y7
+ VMOVDQU 160(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 192(CX), Y7
+ VMOVDQU 224(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 256(CX), Y7
+ VMOVDQU 288(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 320(CX), Y7
+ VMOVDQU 352(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 1 to 6 outputs
+ VMOVDQU (SI)(R13*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 384(CX), Y7
+ VMOVDQU 416(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 448(CX), Y7
+ VMOVDQU 480(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 512(CX), Y7
+ VMOVDQU 544(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 576(CX), Y7
+ VMOVDQU 608(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 640(CX), Y7
+ VMOVDQU 672(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 704(CX), Y7
+ VMOVDQU 736(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 2 to 6 outputs
+ VMOVDQU (DI)(R13*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 768(CX), Y7
+ VMOVDQU 800(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 832(CX), Y7
+ VMOVDQU 864(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 896(CX), Y7
+ VMOVDQU 928(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 960(CX), Y7
+ VMOVDQU 992(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1024(CX), Y7
+ VMOVDQU 1056(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1088(CX), Y7
+ VMOVDQU 1120(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 3 to 6 outputs
+ VMOVDQU (R8)(R13*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1152(CX), Y7
+ VMOVDQU 1184(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1216(CX), Y7
+ VMOVDQU 1248(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 1280(CX), Y7
+ VMOVDQU 1312(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 1344(CX), Y7
+ VMOVDQU 1376(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1408(CX), Y7
+ VMOVDQU 1440(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1472(CX), Y7
+ VMOVDQU 1504(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 4 to 6 outputs
+ VMOVDQU (R9)(R13*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1536(CX), Y7
+ VMOVDQU 1568(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1600(CX), Y7
+ VMOVDQU 1632(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 1664(CX), Y7
+ VMOVDQU 1696(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 1728(CX), Y7
+ VMOVDQU 1760(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1792(CX), Y7
+ VMOVDQU 1824(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1856(CX), Y7
+ VMOVDQU 1888(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 5 to 6 outputs
+ VMOVDQU (R10)(R13*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1920(CX), Y7
+ VMOVDQU 1952(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1984(CX), Y7
+ VMOVDQU 2016(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 2048(CX), Y7
+ VMOVDQU 2080(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 2112(CX), Y7
+ VMOVDQU 2144(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 2176(CX), Y7
+ VMOVDQU 2208(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 2240(CX), Y7
+ VMOVDQU 2272(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 6 to 6 outputs
+ VMOVDQU (R11)(R13*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 2304(CX), Y7
+ VMOVDQU 2336(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 2368(CX), Y7
+ VMOVDQU 2400(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 2432(CX), Y7
+ VMOVDQU 2464(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 2496(CX), Y7
+ VMOVDQU 2528(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 2560(CX), Y7
+ VMOVDQU 2592(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 2624(CX), Y7
+ VMOVDQU 2656(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 7 to 6 outputs
+ VMOVDQU (R12)(R13*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 2688(CX), Y7
+ VMOVDQU 2720(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 2752(CX), Y7
+ VMOVDQU 2784(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 2816(CX), Y7
+ VMOVDQU 2848(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 2880(CX), Y7
+ VMOVDQU 2912(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 2944(CX), Y7
+ VMOVDQU 2976(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 3008(CX), Y7
+ VMOVDQU 3040(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 8 to 6 outputs
+ VMOVDQU (BX)(R13*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 3072(CX), Y7
+ VMOVDQU 3104(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 3136(CX), Y7
+ VMOVDQU 3168(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 3200(CX), Y7
+ VMOVDQU 3232(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 3264(CX), Y7
+ VMOVDQU 3296(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 3328(CX), Y7
+ VMOVDQU 3360(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 3392(CX), Y7
+ VMOVDQU 3424(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Store 6 outputs
+ MOVQ (DX), R14
+ VMOVDQU Y0, (R14)(R13*1)
+ MOVQ 24(DX), R14
+ VMOVDQU Y1, (R14)(R13*1)
+ MOVQ 48(DX), R14
+ VMOVDQU Y2, (R14)(R13*1)
+ MOVQ 72(DX), R14
+ VMOVDQU Y3, (R14)(R13*1)
+ MOVQ 96(DX), R14
+ VMOVDQU Y4, (R14)(R13*1)
+ MOVQ 120(DX), R14
+ VMOVDQU Y5, (R14)(R13*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R13
+ DECQ AX
+ JNZ mulAvxTwo_9x6_loop
+ VZEROUPPER
+
+mulAvxTwo_9x6_end:
+ RET
+
+// func mulAvxTwo_9x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_9x7(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 138 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_9x7_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), R12
+ MOVQ 192(BX), BX
+ MOVQ $0x0000000f, R13
+ MOVQ R13, X7
+ VPBROADCASTB X7, Y7
+ MOVQ start+72(FP), R13
+
+mulAvxTwo_9x7_loop:
+ // Clear 7 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+
+ // Load and process 32 bytes from input 0 to 7 outputs
+ VMOVDQU (BP)(R13*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU (CX), Y8
+ VMOVDQU 32(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 64(CX), Y8
+ VMOVDQU 96(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 128(CX), Y8
+ VMOVDQU 160(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 192(CX), Y8
+ VMOVDQU 224(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 256(CX), Y8
+ VMOVDQU 288(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 320(CX), Y8
+ VMOVDQU 352(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 384(CX), Y8
+ VMOVDQU 416(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 1 to 7 outputs
+ VMOVDQU (SI)(R13*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 448(CX), Y8
+ VMOVDQU 480(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 512(CX), Y8
+ VMOVDQU 544(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 576(CX), Y8
+ VMOVDQU 608(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 640(CX), Y8
+ VMOVDQU 672(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 704(CX), Y8
+ VMOVDQU 736(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 768(CX), Y8
+ VMOVDQU 800(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 832(CX), Y8
+ VMOVDQU 864(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 2 to 7 outputs
+ VMOVDQU (DI)(R13*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 896(CX), Y8
+ VMOVDQU 928(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 960(CX), Y8
+ VMOVDQU 992(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1024(CX), Y8
+ VMOVDQU 1056(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1088(CX), Y8
+ VMOVDQU 1120(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1152(CX), Y8
+ VMOVDQU 1184(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1216(CX), Y8
+ VMOVDQU 1248(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1280(CX), Y8
+ VMOVDQU 1312(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 3 to 7 outputs
+ VMOVDQU (R8)(R13*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 1344(CX), Y8
+ VMOVDQU 1376(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 1408(CX), Y8
+ VMOVDQU 1440(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1472(CX), Y8
+ VMOVDQU 1504(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1536(CX), Y8
+ VMOVDQU 1568(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1600(CX), Y8
+ VMOVDQU 1632(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1664(CX), Y8
+ VMOVDQU 1696(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1728(CX), Y8
+ VMOVDQU 1760(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 4 to 7 outputs
+ VMOVDQU (R9)(R13*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 1792(CX), Y8
+ VMOVDQU 1824(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 1856(CX), Y8
+ VMOVDQU 1888(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1920(CX), Y8
+ VMOVDQU 1952(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1984(CX), Y8
+ VMOVDQU 2016(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2048(CX), Y8
+ VMOVDQU 2080(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 2112(CX), Y8
+ VMOVDQU 2144(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 2176(CX), Y8
+ VMOVDQU 2208(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 5 to 7 outputs
+ VMOVDQU (R10)(R13*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 2240(CX), Y8
+ VMOVDQU 2272(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 2304(CX), Y8
+ VMOVDQU 2336(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 2368(CX), Y8
+ VMOVDQU 2400(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 2432(CX), Y8
+ VMOVDQU 2464(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2496(CX), Y8
+ VMOVDQU 2528(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 2560(CX), Y8
+ VMOVDQU 2592(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 2624(CX), Y8
+ VMOVDQU 2656(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 6 to 7 outputs
+ VMOVDQU (R11)(R13*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 2688(CX), Y8
+ VMOVDQU 2720(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 2752(CX), Y8
+ VMOVDQU 2784(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 2816(CX), Y8
+ VMOVDQU 2848(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 2880(CX), Y8
+ VMOVDQU 2912(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2944(CX), Y8
+ VMOVDQU 2976(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 3008(CX), Y8
+ VMOVDQU 3040(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 3072(CX), Y8
+ VMOVDQU 3104(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 7 to 7 outputs
+ VMOVDQU (R12)(R13*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 3136(CX), Y8
+ VMOVDQU 3168(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 3200(CX), Y8
+ VMOVDQU 3232(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 3264(CX), Y8
+ VMOVDQU 3296(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 3328(CX), Y8
+ VMOVDQU 3360(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 3392(CX), Y8
+ VMOVDQU 3424(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 3456(CX), Y8
+ VMOVDQU 3488(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 3520(CX), Y8
+ VMOVDQU 3552(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 8 to 7 outputs
+ VMOVDQU (BX)(R13*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 3584(CX), Y8
+ VMOVDQU 3616(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 3648(CX), Y8
+ VMOVDQU 3680(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 3712(CX), Y8
+ VMOVDQU 3744(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 3776(CX), Y8
+ VMOVDQU 3808(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 3840(CX), Y8
+ VMOVDQU 3872(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 3904(CX), Y8
+ VMOVDQU 3936(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 3968(CX), Y8
+ VMOVDQU 4000(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Store 7 outputs
+ MOVQ (DX), R14
+ VMOVDQU Y0, (R14)(R13*1)
+ MOVQ 24(DX), R14
+ VMOVDQU Y1, (R14)(R13*1)
+ MOVQ 48(DX), R14
+ VMOVDQU Y2, (R14)(R13*1)
+ MOVQ 72(DX), R14
+ VMOVDQU Y3, (R14)(R13*1)
+ MOVQ 96(DX), R14
+ VMOVDQU Y4, (R14)(R13*1)
+ MOVQ 120(DX), R14
+ VMOVDQU Y5, (R14)(R13*1)
+ MOVQ 144(DX), R14
+ VMOVDQU Y6, (R14)(R13*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R13
+ DECQ AX
+ JNZ mulAvxTwo_9x7_loop
+ VZEROUPPER
+
+mulAvxTwo_9x7_end:
+ RET
+
+// func mulAvxTwo_9x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_9x8(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 157 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_9x8_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), R12
+ MOVQ 192(BX), BX
+ MOVQ $0x0000000f, R13
+ MOVQ R13, X8
+ VPBROADCASTB X8, Y8
+ MOVQ start+72(FP), R13
+
+mulAvxTwo_9x8_loop:
+ // Clear 8 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+ VPXOR Y7, Y7, Y7
+
+ // Load and process 32 bytes from input 0 to 8 outputs
+ VMOVDQU (BP)(R13*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU (CX), Y9
+ VMOVDQU 32(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 64(CX), Y9
+ VMOVDQU 96(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 128(CX), Y9
+ VMOVDQU 160(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 192(CX), Y9
+ VMOVDQU 224(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 256(CX), Y9
+ VMOVDQU 288(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 320(CX), Y9
+ VMOVDQU 352(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 384(CX), Y9
+ VMOVDQU 416(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 448(CX), Y9
+ VMOVDQU 480(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 1 to 8 outputs
+ VMOVDQU (SI)(R13*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 512(CX), Y9
+ VMOVDQU 544(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 576(CX), Y9
+ VMOVDQU 608(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 640(CX), Y9
+ VMOVDQU 672(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 704(CX), Y9
+ VMOVDQU 736(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 768(CX), Y9
+ VMOVDQU 800(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 832(CX), Y9
+ VMOVDQU 864(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 896(CX), Y9
+ VMOVDQU 928(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 960(CX), Y9
+ VMOVDQU 992(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 2 to 8 outputs
+ VMOVDQU (DI)(R13*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1024(CX), Y9
+ VMOVDQU 1056(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1088(CX), Y9
+ VMOVDQU 1120(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1152(CX), Y9
+ VMOVDQU 1184(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1216(CX), Y9
+ VMOVDQU 1248(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1280(CX), Y9
+ VMOVDQU 1312(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1344(CX), Y9
+ VMOVDQU 1376(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1408(CX), Y9
+ VMOVDQU 1440(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1472(CX), Y9
+ VMOVDQU 1504(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 3 to 8 outputs
+ VMOVDQU (R8)(R13*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1536(CX), Y9
+ VMOVDQU 1568(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1600(CX), Y9
+ VMOVDQU 1632(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1664(CX), Y9
+ VMOVDQU 1696(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1728(CX), Y9
+ VMOVDQU 1760(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1792(CX), Y9
+ VMOVDQU 1824(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1856(CX), Y9
+ VMOVDQU 1888(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1920(CX), Y9
+ VMOVDQU 1952(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1984(CX), Y9
+ VMOVDQU 2016(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 4 to 8 outputs
+ VMOVDQU (R9)(R13*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 2048(CX), Y9
+ VMOVDQU 2080(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 2112(CX), Y9
+ VMOVDQU 2144(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 2176(CX), Y9
+ VMOVDQU 2208(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 2240(CX), Y9
+ VMOVDQU 2272(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 2304(CX), Y9
+ VMOVDQU 2336(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 2368(CX), Y9
+ VMOVDQU 2400(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 2432(CX), Y9
+ VMOVDQU 2464(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 2496(CX), Y9
+ VMOVDQU 2528(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 5 to 8 outputs
+ VMOVDQU (R10)(R13*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 2560(CX), Y9
+ VMOVDQU 2592(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 2624(CX), Y9
+ VMOVDQU 2656(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 2688(CX), Y9
+ VMOVDQU 2720(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 2752(CX), Y9
+ VMOVDQU 2784(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 2816(CX), Y9
+ VMOVDQU 2848(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 2880(CX), Y9
+ VMOVDQU 2912(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 2944(CX), Y9
+ VMOVDQU 2976(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 3008(CX), Y9
+ VMOVDQU 3040(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 6 to 8 outputs
+ VMOVDQU (R11)(R13*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 3072(CX), Y9
+ VMOVDQU 3104(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 3136(CX), Y9
+ VMOVDQU 3168(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 3200(CX), Y9
+ VMOVDQU 3232(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 3264(CX), Y9
+ VMOVDQU 3296(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 3328(CX), Y9
+ VMOVDQU 3360(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 3392(CX), Y9
+ VMOVDQU 3424(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 3456(CX), Y9
+ VMOVDQU 3488(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 3520(CX), Y9
+ VMOVDQU 3552(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 7 to 8 outputs
+ VMOVDQU (R12)(R13*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 3584(CX), Y9
+ VMOVDQU 3616(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 3648(CX), Y9
+ VMOVDQU 3680(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 3712(CX), Y9
+ VMOVDQU 3744(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 3776(CX), Y9
+ VMOVDQU 3808(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 3840(CX), Y9
+ VMOVDQU 3872(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 3904(CX), Y9
+ VMOVDQU 3936(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 3968(CX), Y9
+ VMOVDQU 4000(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 4032(CX), Y9
+ VMOVDQU 4064(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 8 to 8 outputs
+ VMOVDQU (BX)(R13*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 4096(CX), Y9
+ VMOVDQU 4128(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 4160(CX), Y9
+ VMOVDQU 4192(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 4224(CX), Y9
+ VMOVDQU 4256(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 4288(CX), Y9
+ VMOVDQU 4320(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 4352(CX), Y9
+ VMOVDQU 4384(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 4416(CX), Y9
+ VMOVDQU 4448(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 4480(CX), Y9
+ VMOVDQU 4512(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 4544(CX), Y9
+ VMOVDQU 4576(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Store 8 outputs
+ MOVQ (DX), R14
+ VMOVDQU Y0, (R14)(R13*1)
+ MOVQ 24(DX), R14
+ VMOVDQU Y1, (R14)(R13*1)
+ MOVQ 48(DX), R14
+ VMOVDQU Y2, (R14)(R13*1)
+ MOVQ 72(DX), R14
+ VMOVDQU Y3, (R14)(R13*1)
+ MOVQ 96(DX), R14
+ VMOVDQU Y4, (R14)(R13*1)
+ MOVQ 120(DX), R14
+ VMOVDQU Y5, (R14)(R13*1)
+ MOVQ 144(DX), R14
+ VMOVDQU Y6, (R14)(R13*1)
+ MOVQ 168(DX), R14
+ VMOVDQU Y7, (R14)(R13*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R13
+ DECQ AX
+ JNZ mulAvxTwo_9x8_loop
+ VZEROUPPER
+
+mulAvxTwo_9x8_end:
+ RET
+
+// func mulAvxTwo_10x1(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_10x1(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 24 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_10x1_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), R12
+ MOVQ 192(BX), R13
+ MOVQ 216(BX), BX
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X1
+ VPBROADCASTB X1, Y1
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_10x1_loop:
+ // Clear 1 outputs
+ VPXOR Y0, Y0, Y0
+
+ // Load and process 32 bytes from input 0 to 1 outputs
+ VMOVDQU (BP)(R14*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU (CX), Y2
+ VMOVDQU 32(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 1 to 1 outputs
+ VMOVDQU (SI)(R14*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 64(CX), Y2
+ VMOVDQU 96(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 2 to 1 outputs
+ VMOVDQU (DI)(R14*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 128(CX), Y2
+ VMOVDQU 160(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 3 to 1 outputs
+ VMOVDQU (R8)(R14*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 192(CX), Y2
+ VMOVDQU 224(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 4 to 1 outputs
+ VMOVDQU (R9)(R14*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 256(CX), Y2
+ VMOVDQU 288(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 5 to 1 outputs
+ VMOVDQU (R10)(R14*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 320(CX), Y2
+ VMOVDQU 352(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 6 to 1 outputs
+ VMOVDQU (R11)(R14*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 384(CX), Y2
+ VMOVDQU 416(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 7 to 1 outputs
+ VMOVDQU (R12)(R14*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 448(CX), Y2
+ VMOVDQU 480(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 8 to 1 outputs
+ VMOVDQU (R13)(R14*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 512(CX), Y2
+ VMOVDQU 544(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Load and process 32 bytes from input 9 to 1 outputs
+ VMOVDQU (BX)(R14*1), Y4
+ VPSRLQ $0x04, Y4, Y5
+ VPAND Y1, Y4, Y4
+ VPAND Y1, Y5, Y5
+ VMOVDQU 576(CX), Y2
+ VMOVDQU 608(CX), Y3
+ VPSHUFB Y4, Y2, Y2
+ VPSHUFB Y5, Y3, Y3
+ VPXOR Y2, Y3, Y2
+ VPXOR Y2, Y0, Y0
+
+ // Store 1 outputs
+ VMOVDQU Y0, (DX)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_10x1_loop
+ VZEROUPPER
+
+mulAvxTwo_10x1_end:
+ RET
+
+// func mulAvxTwo_10x2(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_10x2(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 47 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_10x2_end
+ MOVQ out_base+48(FP), DX
+ MOVQ (DX), BX
+ MOVQ 24(DX), DX
+ MOVQ in_base+24(FP), BP
+ MOVQ (BP), SI
+ MOVQ 24(BP), DI
+ MOVQ 48(BP), R8
+ MOVQ 72(BP), R9
+ MOVQ 96(BP), R10
+ MOVQ 120(BP), R11
+ MOVQ 144(BP), R12
+ MOVQ 168(BP), R13
+ MOVQ 192(BP), R14
+ MOVQ 216(BP), BP
+ MOVQ $0x0000000f, R15
+ MOVQ R15, X2
+ VPBROADCASTB X2, Y2
+ MOVQ start+72(FP), R15
+
+mulAvxTwo_10x2_loop:
+ // Clear 2 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+
+ // Load and process 32 bytes from input 0 to 2 outputs
+ VMOVDQU (SI)(R15*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU (CX), Y3
+ VMOVDQU 32(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 64(CX), Y3
+ VMOVDQU 96(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 1 to 2 outputs
+ VMOVDQU (DI)(R15*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 128(CX), Y3
+ VMOVDQU 160(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 192(CX), Y3
+ VMOVDQU 224(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 2 to 2 outputs
+ VMOVDQU (R8)(R15*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 256(CX), Y3
+ VMOVDQU 288(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 320(CX), Y3
+ VMOVDQU 352(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 3 to 2 outputs
+ VMOVDQU (R9)(R15*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 384(CX), Y3
+ VMOVDQU 416(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 448(CX), Y3
+ VMOVDQU 480(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 4 to 2 outputs
+ VMOVDQU (R10)(R15*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 512(CX), Y3
+ VMOVDQU 544(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 576(CX), Y3
+ VMOVDQU 608(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 5 to 2 outputs
+ VMOVDQU (R11)(R15*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 640(CX), Y3
+ VMOVDQU 672(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 704(CX), Y3
+ VMOVDQU 736(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 6 to 2 outputs
+ VMOVDQU (R12)(R15*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 768(CX), Y3
+ VMOVDQU 800(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 832(CX), Y3
+ VMOVDQU 864(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 7 to 2 outputs
+ VMOVDQU (R13)(R15*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 896(CX), Y3
+ VMOVDQU 928(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 960(CX), Y3
+ VMOVDQU 992(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 8 to 2 outputs
+ VMOVDQU (R14)(R15*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 1024(CX), Y3
+ VMOVDQU 1056(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 1088(CX), Y3
+ VMOVDQU 1120(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Load and process 32 bytes from input 9 to 2 outputs
+ VMOVDQU (BP)(R15*1), Y5
+ VPSRLQ $0x04, Y5, Y6
+ VPAND Y2, Y5, Y5
+ VPAND Y2, Y6, Y6
+ VMOVDQU 1152(CX), Y3
+ VMOVDQU 1184(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y0, Y0
+ VMOVDQU 1216(CX), Y3
+ VMOVDQU 1248(CX), Y4
+ VPSHUFB Y5, Y3, Y3
+ VPSHUFB Y6, Y4, Y4
+ VPXOR Y3, Y4, Y3
+ VPXOR Y3, Y1, Y1
+
+ // Store 2 outputs
+ VMOVDQU Y0, (BX)(R15*1)
+ VMOVDQU Y1, (DX)(R15*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R15
+ DECQ AX
+ JNZ mulAvxTwo_10x2_loop
+ VZEROUPPER
+
+mulAvxTwo_10x2_end:
+ RET
+
+// func mulAvxTwo_10x3(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_10x3(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 68 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_10x3_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), R12
+ MOVQ 192(BX), R13
+ MOVQ 216(BX), BX
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X3
+ VPBROADCASTB X3, Y3
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_10x3_loop:
+ // Clear 3 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+
+ // Load and process 32 bytes from input 0 to 3 outputs
+ VMOVDQU (BP)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU (CX), Y4
+ VMOVDQU 32(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 64(CX), Y4
+ VMOVDQU 96(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 128(CX), Y4
+ VMOVDQU 160(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 1 to 3 outputs
+ VMOVDQU (SI)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 192(CX), Y4
+ VMOVDQU 224(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 256(CX), Y4
+ VMOVDQU 288(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 320(CX), Y4
+ VMOVDQU 352(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 2 to 3 outputs
+ VMOVDQU (DI)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 384(CX), Y4
+ VMOVDQU 416(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 448(CX), Y4
+ VMOVDQU 480(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 512(CX), Y4
+ VMOVDQU 544(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 3 to 3 outputs
+ VMOVDQU (R8)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 576(CX), Y4
+ VMOVDQU 608(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 640(CX), Y4
+ VMOVDQU 672(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 704(CX), Y4
+ VMOVDQU 736(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 4 to 3 outputs
+ VMOVDQU (R9)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 768(CX), Y4
+ VMOVDQU 800(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 832(CX), Y4
+ VMOVDQU 864(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 896(CX), Y4
+ VMOVDQU 928(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 5 to 3 outputs
+ VMOVDQU (R10)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 960(CX), Y4
+ VMOVDQU 992(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1024(CX), Y4
+ VMOVDQU 1056(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1088(CX), Y4
+ VMOVDQU 1120(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 6 to 3 outputs
+ VMOVDQU (R11)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 1152(CX), Y4
+ VMOVDQU 1184(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1216(CX), Y4
+ VMOVDQU 1248(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1280(CX), Y4
+ VMOVDQU 1312(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 7 to 3 outputs
+ VMOVDQU (R12)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 1344(CX), Y4
+ VMOVDQU 1376(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1408(CX), Y4
+ VMOVDQU 1440(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1472(CX), Y4
+ VMOVDQU 1504(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 8 to 3 outputs
+ VMOVDQU (R13)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 1536(CX), Y4
+ VMOVDQU 1568(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1600(CX), Y4
+ VMOVDQU 1632(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1664(CX), Y4
+ VMOVDQU 1696(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Load and process 32 bytes from input 9 to 3 outputs
+ VMOVDQU (BX)(R14*1), Y6
+ VPSRLQ $0x04, Y6, Y7
+ VPAND Y3, Y6, Y6
+ VPAND Y3, Y7, Y7
+ VMOVDQU 1728(CX), Y4
+ VMOVDQU 1760(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y0, Y0
+ VMOVDQU 1792(CX), Y4
+ VMOVDQU 1824(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y1, Y1
+ VMOVDQU 1856(CX), Y4
+ VMOVDQU 1888(CX), Y5
+ VPSHUFB Y6, Y4, Y4
+ VPSHUFB Y7, Y5, Y5
+ VPXOR Y4, Y5, Y4
+ VPXOR Y4, Y2, Y2
+
+ // Store 3 outputs
+ MOVQ (DX), R15
+ VMOVDQU Y0, (R15)(R14*1)
+ MOVQ 24(DX), R15
+ VMOVDQU Y1, (R15)(R14*1)
+ MOVQ 48(DX), R15
+ VMOVDQU Y2, (R15)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_10x3_loop
+ VZEROUPPER
+
+mulAvxTwo_10x3_end:
+ RET
+
+// func mulAvxTwo_10x4(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_10x4(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 89 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_10x4_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), R12
+ MOVQ 192(BX), R13
+ MOVQ 216(BX), BX
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X4
+ VPBROADCASTB X4, Y4
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_10x4_loop:
+ // Clear 4 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+
+ // Load and process 32 bytes from input 0 to 4 outputs
+ VMOVDQU (BP)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU (CX), Y5
+ VMOVDQU 32(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 64(CX), Y5
+ VMOVDQU 96(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 128(CX), Y5
+ VMOVDQU 160(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 192(CX), Y5
+ VMOVDQU 224(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 1 to 4 outputs
+ VMOVDQU (SI)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 256(CX), Y5
+ VMOVDQU 288(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 320(CX), Y5
+ VMOVDQU 352(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 384(CX), Y5
+ VMOVDQU 416(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 448(CX), Y5
+ VMOVDQU 480(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 2 to 4 outputs
+ VMOVDQU (DI)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 512(CX), Y5
+ VMOVDQU 544(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 576(CX), Y5
+ VMOVDQU 608(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 640(CX), Y5
+ VMOVDQU 672(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 704(CX), Y5
+ VMOVDQU 736(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 3 to 4 outputs
+ VMOVDQU (R8)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 768(CX), Y5
+ VMOVDQU 800(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 832(CX), Y5
+ VMOVDQU 864(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 896(CX), Y5
+ VMOVDQU 928(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 960(CX), Y5
+ VMOVDQU 992(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 4 to 4 outputs
+ VMOVDQU (R9)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1024(CX), Y5
+ VMOVDQU 1056(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1088(CX), Y5
+ VMOVDQU 1120(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1152(CX), Y5
+ VMOVDQU 1184(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1216(CX), Y5
+ VMOVDQU 1248(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 5 to 4 outputs
+ VMOVDQU (R10)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1280(CX), Y5
+ VMOVDQU 1312(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1344(CX), Y5
+ VMOVDQU 1376(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1408(CX), Y5
+ VMOVDQU 1440(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1472(CX), Y5
+ VMOVDQU 1504(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 6 to 4 outputs
+ VMOVDQU (R11)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1536(CX), Y5
+ VMOVDQU 1568(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1600(CX), Y5
+ VMOVDQU 1632(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1664(CX), Y5
+ VMOVDQU 1696(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1728(CX), Y5
+ VMOVDQU 1760(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 7 to 4 outputs
+ VMOVDQU (R12)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 1792(CX), Y5
+ VMOVDQU 1824(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 1856(CX), Y5
+ VMOVDQU 1888(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 1920(CX), Y5
+ VMOVDQU 1952(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 1984(CX), Y5
+ VMOVDQU 2016(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 8 to 4 outputs
+ VMOVDQU (R13)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 2048(CX), Y5
+ VMOVDQU 2080(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 2112(CX), Y5
+ VMOVDQU 2144(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 2176(CX), Y5
+ VMOVDQU 2208(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 2240(CX), Y5
+ VMOVDQU 2272(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Load and process 32 bytes from input 9 to 4 outputs
+ VMOVDQU (BX)(R14*1), Y7
+ VPSRLQ $0x04, Y7, Y8
+ VPAND Y4, Y7, Y7
+ VPAND Y4, Y8, Y8
+ VMOVDQU 2304(CX), Y5
+ VMOVDQU 2336(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y0, Y0
+ VMOVDQU 2368(CX), Y5
+ VMOVDQU 2400(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y1, Y1
+ VMOVDQU 2432(CX), Y5
+ VMOVDQU 2464(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y2, Y2
+ VMOVDQU 2496(CX), Y5
+ VMOVDQU 2528(CX), Y6
+ VPSHUFB Y7, Y5, Y5
+ VPSHUFB Y8, Y6, Y6
+ VPXOR Y5, Y6, Y5
+ VPXOR Y5, Y3, Y3
+
+ // Store 4 outputs
+ MOVQ (DX), R15
+ VMOVDQU Y0, (R15)(R14*1)
+ MOVQ 24(DX), R15
+ VMOVDQU Y1, (R15)(R14*1)
+ MOVQ 48(DX), R15
+ VMOVDQU Y2, (R15)(R14*1)
+ MOVQ 72(DX), R15
+ VMOVDQU Y3, (R15)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_10x4_loop
+ VZEROUPPER
+
+mulAvxTwo_10x4_end:
+ RET
+
+// func mulAvxTwo_10x5(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_10x5(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 110 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_10x5_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), R12
+ MOVQ 192(BX), R13
+ MOVQ 216(BX), BX
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X5
+ VPBROADCASTB X5, Y5
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_10x5_loop:
+ // Clear 5 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+
+ // Load and process 32 bytes from input 0 to 5 outputs
+ VMOVDQU (BP)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU (CX), Y6
+ VMOVDQU 32(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 64(CX), Y6
+ VMOVDQU 96(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 128(CX), Y6
+ VMOVDQU 160(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 192(CX), Y6
+ VMOVDQU 224(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 256(CX), Y6
+ VMOVDQU 288(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 1 to 5 outputs
+ VMOVDQU (SI)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 320(CX), Y6
+ VMOVDQU 352(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 384(CX), Y6
+ VMOVDQU 416(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 448(CX), Y6
+ VMOVDQU 480(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 512(CX), Y6
+ VMOVDQU 544(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 576(CX), Y6
+ VMOVDQU 608(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 2 to 5 outputs
+ VMOVDQU (DI)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 640(CX), Y6
+ VMOVDQU 672(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 704(CX), Y6
+ VMOVDQU 736(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 768(CX), Y6
+ VMOVDQU 800(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 832(CX), Y6
+ VMOVDQU 864(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 896(CX), Y6
+ VMOVDQU 928(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 3 to 5 outputs
+ VMOVDQU (R8)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 960(CX), Y6
+ VMOVDQU 992(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1024(CX), Y6
+ VMOVDQU 1056(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1088(CX), Y6
+ VMOVDQU 1120(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1152(CX), Y6
+ VMOVDQU 1184(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1216(CX), Y6
+ VMOVDQU 1248(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 4 to 5 outputs
+ VMOVDQU (R9)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1280(CX), Y6
+ VMOVDQU 1312(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1344(CX), Y6
+ VMOVDQU 1376(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1408(CX), Y6
+ VMOVDQU 1440(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1472(CX), Y6
+ VMOVDQU 1504(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1536(CX), Y6
+ VMOVDQU 1568(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 5 to 5 outputs
+ VMOVDQU (R10)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1600(CX), Y6
+ VMOVDQU 1632(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1664(CX), Y6
+ VMOVDQU 1696(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 1728(CX), Y6
+ VMOVDQU 1760(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 1792(CX), Y6
+ VMOVDQU 1824(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 1856(CX), Y6
+ VMOVDQU 1888(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 6 to 5 outputs
+ VMOVDQU (R11)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 1920(CX), Y6
+ VMOVDQU 1952(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 1984(CX), Y6
+ VMOVDQU 2016(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 2048(CX), Y6
+ VMOVDQU 2080(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 2112(CX), Y6
+ VMOVDQU 2144(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 2176(CX), Y6
+ VMOVDQU 2208(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 7 to 5 outputs
+ VMOVDQU (R12)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 2240(CX), Y6
+ VMOVDQU 2272(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 2304(CX), Y6
+ VMOVDQU 2336(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 2368(CX), Y6
+ VMOVDQU 2400(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 2432(CX), Y6
+ VMOVDQU 2464(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 2496(CX), Y6
+ VMOVDQU 2528(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 8 to 5 outputs
+ VMOVDQU (R13)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 2560(CX), Y6
+ VMOVDQU 2592(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 2624(CX), Y6
+ VMOVDQU 2656(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 2688(CX), Y6
+ VMOVDQU 2720(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 2752(CX), Y6
+ VMOVDQU 2784(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 2816(CX), Y6
+ VMOVDQU 2848(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Load and process 32 bytes from input 9 to 5 outputs
+ VMOVDQU (BX)(R14*1), Y8
+ VPSRLQ $0x04, Y8, Y9
+ VPAND Y5, Y8, Y8
+ VPAND Y5, Y9, Y9
+ VMOVDQU 2880(CX), Y6
+ VMOVDQU 2912(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y0, Y0
+ VMOVDQU 2944(CX), Y6
+ VMOVDQU 2976(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y1, Y1
+ VMOVDQU 3008(CX), Y6
+ VMOVDQU 3040(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y2, Y2
+ VMOVDQU 3072(CX), Y6
+ VMOVDQU 3104(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y3, Y3
+ VMOVDQU 3136(CX), Y6
+ VMOVDQU 3168(CX), Y7
+ VPSHUFB Y8, Y6, Y6
+ VPSHUFB Y9, Y7, Y7
+ VPXOR Y6, Y7, Y6
+ VPXOR Y6, Y4, Y4
+
+ // Store 5 outputs
+ MOVQ (DX), R15
+ VMOVDQU Y0, (R15)(R14*1)
+ MOVQ 24(DX), R15
+ VMOVDQU Y1, (R15)(R14*1)
+ MOVQ 48(DX), R15
+ VMOVDQU Y2, (R15)(R14*1)
+ MOVQ 72(DX), R15
+ VMOVDQU Y3, (R15)(R14*1)
+ MOVQ 96(DX), R15
+ VMOVDQU Y4, (R15)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_10x5_loop
+ VZEROUPPER
+
+mulAvxTwo_10x5_end:
+ RET
+
+// func mulAvxTwo_10x6(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_10x6(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 131 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_10x6_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), R12
+ MOVQ 192(BX), R13
+ MOVQ 216(BX), BX
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X6
+ VPBROADCASTB X6, Y6
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_10x6_loop:
+ // Clear 6 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+
+ // Load and process 32 bytes from input 0 to 6 outputs
+ VMOVDQU (BP)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU (CX), Y7
+ VMOVDQU 32(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 64(CX), Y7
+ VMOVDQU 96(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 128(CX), Y7
+ VMOVDQU 160(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 192(CX), Y7
+ VMOVDQU 224(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 256(CX), Y7
+ VMOVDQU 288(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 320(CX), Y7
+ VMOVDQU 352(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 1 to 6 outputs
+ VMOVDQU (SI)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 384(CX), Y7
+ VMOVDQU 416(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 448(CX), Y7
+ VMOVDQU 480(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 512(CX), Y7
+ VMOVDQU 544(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 576(CX), Y7
+ VMOVDQU 608(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 640(CX), Y7
+ VMOVDQU 672(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 704(CX), Y7
+ VMOVDQU 736(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 2 to 6 outputs
+ VMOVDQU (DI)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 768(CX), Y7
+ VMOVDQU 800(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 832(CX), Y7
+ VMOVDQU 864(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 896(CX), Y7
+ VMOVDQU 928(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 960(CX), Y7
+ VMOVDQU 992(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1024(CX), Y7
+ VMOVDQU 1056(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1088(CX), Y7
+ VMOVDQU 1120(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 3 to 6 outputs
+ VMOVDQU (R8)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1152(CX), Y7
+ VMOVDQU 1184(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1216(CX), Y7
+ VMOVDQU 1248(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 1280(CX), Y7
+ VMOVDQU 1312(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 1344(CX), Y7
+ VMOVDQU 1376(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1408(CX), Y7
+ VMOVDQU 1440(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1472(CX), Y7
+ VMOVDQU 1504(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 4 to 6 outputs
+ VMOVDQU (R9)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1536(CX), Y7
+ VMOVDQU 1568(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1600(CX), Y7
+ VMOVDQU 1632(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 1664(CX), Y7
+ VMOVDQU 1696(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 1728(CX), Y7
+ VMOVDQU 1760(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 1792(CX), Y7
+ VMOVDQU 1824(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 1856(CX), Y7
+ VMOVDQU 1888(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 5 to 6 outputs
+ VMOVDQU (R10)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 1920(CX), Y7
+ VMOVDQU 1952(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 1984(CX), Y7
+ VMOVDQU 2016(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 2048(CX), Y7
+ VMOVDQU 2080(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 2112(CX), Y7
+ VMOVDQU 2144(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 2176(CX), Y7
+ VMOVDQU 2208(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 2240(CX), Y7
+ VMOVDQU 2272(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 6 to 6 outputs
+ VMOVDQU (R11)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 2304(CX), Y7
+ VMOVDQU 2336(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 2368(CX), Y7
+ VMOVDQU 2400(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 2432(CX), Y7
+ VMOVDQU 2464(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 2496(CX), Y7
+ VMOVDQU 2528(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 2560(CX), Y7
+ VMOVDQU 2592(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 2624(CX), Y7
+ VMOVDQU 2656(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 7 to 6 outputs
+ VMOVDQU (R12)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 2688(CX), Y7
+ VMOVDQU 2720(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 2752(CX), Y7
+ VMOVDQU 2784(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 2816(CX), Y7
+ VMOVDQU 2848(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 2880(CX), Y7
+ VMOVDQU 2912(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 2944(CX), Y7
+ VMOVDQU 2976(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 3008(CX), Y7
+ VMOVDQU 3040(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 8 to 6 outputs
+ VMOVDQU (R13)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 3072(CX), Y7
+ VMOVDQU 3104(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 3136(CX), Y7
+ VMOVDQU 3168(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 3200(CX), Y7
+ VMOVDQU 3232(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 3264(CX), Y7
+ VMOVDQU 3296(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 3328(CX), Y7
+ VMOVDQU 3360(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 3392(CX), Y7
+ VMOVDQU 3424(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Load and process 32 bytes from input 9 to 6 outputs
+ VMOVDQU (BX)(R14*1), Y9
+ VPSRLQ $0x04, Y9, Y10
+ VPAND Y6, Y9, Y9
+ VPAND Y6, Y10, Y10
+ VMOVDQU 3456(CX), Y7
+ VMOVDQU 3488(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y0, Y0
+ VMOVDQU 3520(CX), Y7
+ VMOVDQU 3552(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y1, Y1
+ VMOVDQU 3584(CX), Y7
+ VMOVDQU 3616(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y2, Y2
+ VMOVDQU 3648(CX), Y7
+ VMOVDQU 3680(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y3, Y3
+ VMOVDQU 3712(CX), Y7
+ VMOVDQU 3744(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y4, Y4
+ VMOVDQU 3776(CX), Y7
+ VMOVDQU 3808(CX), Y8
+ VPSHUFB Y9, Y7, Y7
+ VPSHUFB Y10, Y8, Y8
+ VPXOR Y7, Y8, Y7
+ VPXOR Y7, Y5, Y5
+
+ // Store 6 outputs
+ MOVQ (DX), R15
+ VMOVDQU Y0, (R15)(R14*1)
+ MOVQ 24(DX), R15
+ VMOVDQU Y1, (R15)(R14*1)
+ MOVQ 48(DX), R15
+ VMOVDQU Y2, (R15)(R14*1)
+ MOVQ 72(DX), R15
+ VMOVDQU Y3, (R15)(R14*1)
+ MOVQ 96(DX), R15
+ VMOVDQU Y4, (R15)(R14*1)
+ MOVQ 120(DX), R15
+ VMOVDQU Y5, (R15)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_10x6_loop
+ VZEROUPPER
+
+mulAvxTwo_10x6_end:
+ RET
+
+// func mulAvxTwo_10x7(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_10x7(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 152 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_10x7_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), R12
+ MOVQ 192(BX), R13
+ MOVQ 216(BX), BX
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X7
+ VPBROADCASTB X7, Y7
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_10x7_loop:
+ // Clear 7 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+
+ // Load and process 32 bytes from input 0 to 7 outputs
+ VMOVDQU (BP)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU (CX), Y8
+ VMOVDQU 32(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 64(CX), Y8
+ VMOVDQU 96(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 128(CX), Y8
+ VMOVDQU 160(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 192(CX), Y8
+ VMOVDQU 224(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 256(CX), Y8
+ VMOVDQU 288(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 320(CX), Y8
+ VMOVDQU 352(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 384(CX), Y8
+ VMOVDQU 416(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 1 to 7 outputs
+ VMOVDQU (SI)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 448(CX), Y8
+ VMOVDQU 480(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 512(CX), Y8
+ VMOVDQU 544(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 576(CX), Y8
+ VMOVDQU 608(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 640(CX), Y8
+ VMOVDQU 672(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 704(CX), Y8
+ VMOVDQU 736(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 768(CX), Y8
+ VMOVDQU 800(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 832(CX), Y8
+ VMOVDQU 864(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 2 to 7 outputs
+ VMOVDQU (DI)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 896(CX), Y8
+ VMOVDQU 928(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 960(CX), Y8
+ VMOVDQU 992(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1024(CX), Y8
+ VMOVDQU 1056(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1088(CX), Y8
+ VMOVDQU 1120(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1152(CX), Y8
+ VMOVDQU 1184(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1216(CX), Y8
+ VMOVDQU 1248(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1280(CX), Y8
+ VMOVDQU 1312(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 3 to 7 outputs
+ VMOVDQU (R8)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 1344(CX), Y8
+ VMOVDQU 1376(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 1408(CX), Y8
+ VMOVDQU 1440(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1472(CX), Y8
+ VMOVDQU 1504(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1536(CX), Y8
+ VMOVDQU 1568(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 1600(CX), Y8
+ VMOVDQU 1632(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 1664(CX), Y8
+ VMOVDQU 1696(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 1728(CX), Y8
+ VMOVDQU 1760(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 4 to 7 outputs
+ VMOVDQU (R9)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 1792(CX), Y8
+ VMOVDQU 1824(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 1856(CX), Y8
+ VMOVDQU 1888(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 1920(CX), Y8
+ VMOVDQU 1952(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 1984(CX), Y8
+ VMOVDQU 2016(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2048(CX), Y8
+ VMOVDQU 2080(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 2112(CX), Y8
+ VMOVDQU 2144(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 2176(CX), Y8
+ VMOVDQU 2208(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 5 to 7 outputs
+ VMOVDQU (R10)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 2240(CX), Y8
+ VMOVDQU 2272(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 2304(CX), Y8
+ VMOVDQU 2336(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 2368(CX), Y8
+ VMOVDQU 2400(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 2432(CX), Y8
+ VMOVDQU 2464(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2496(CX), Y8
+ VMOVDQU 2528(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 2560(CX), Y8
+ VMOVDQU 2592(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 2624(CX), Y8
+ VMOVDQU 2656(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 6 to 7 outputs
+ VMOVDQU (R11)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 2688(CX), Y8
+ VMOVDQU 2720(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 2752(CX), Y8
+ VMOVDQU 2784(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 2816(CX), Y8
+ VMOVDQU 2848(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 2880(CX), Y8
+ VMOVDQU 2912(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 2944(CX), Y8
+ VMOVDQU 2976(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 3008(CX), Y8
+ VMOVDQU 3040(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 3072(CX), Y8
+ VMOVDQU 3104(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 7 to 7 outputs
+ VMOVDQU (R12)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 3136(CX), Y8
+ VMOVDQU 3168(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 3200(CX), Y8
+ VMOVDQU 3232(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 3264(CX), Y8
+ VMOVDQU 3296(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 3328(CX), Y8
+ VMOVDQU 3360(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 3392(CX), Y8
+ VMOVDQU 3424(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 3456(CX), Y8
+ VMOVDQU 3488(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 3520(CX), Y8
+ VMOVDQU 3552(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 8 to 7 outputs
+ VMOVDQU (R13)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 3584(CX), Y8
+ VMOVDQU 3616(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 3648(CX), Y8
+ VMOVDQU 3680(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 3712(CX), Y8
+ VMOVDQU 3744(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 3776(CX), Y8
+ VMOVDQU 3808(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 3840(CX), Y8
+ VMOVDQU 3872(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 3904(CX), Y8
+ VMOVDQU 3936(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 3968(CX), Y8
+ VMOVDQU 4000(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Load and process 32 bytes from input 9 to 7 outputs
+ VMOVDQU (BX)(R14*1), Y10
+ VPSRLQ $0x04, Y10, Y11
+ VPAND Y7, Y10, Y10
+ VPAND Y7, Y11, Y11
+ VMOVDQU 4032(CX), Y8
+ VMOVDQU 4064(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y0, Y0
+ VMOVDQU 4096(CX), Y8
+ VMOVDQU 4128(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y1, Y1
+ VMOVDQU 4160(CX), Y8
+ VMOVDQU 4192(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y2, Y2
+ VMOVDQU 4224(CX), Y8
+ VMOVDQU 4256(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y3, Y3
+ VMOVDQU 4288(CX), Y8
+ VMOVDQU 4320(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y4, Y4
+ VMOVDQU 4352(CX), Y8
+ VMOVDQU 4384(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y5, Y5
+ VMOVDQU 4416(CX), Y8
+ VMOVDQU 4448(CX), Y9
+ VPSHUFB Y10, Y8, Y8
+ VPSHUFB Y11, Y9, Y9
+ VPXOR Y8, Y9, Y8
+ VPXOR Y8, Y6, Y6
+
+ // Store 7 outputs
+ MOVQ (DX), R15
+ VMOVDQU Y0, (R15)(R14*1)
+ MOVQ 24(DX), R15
+ VMOVDQU Y1, (R15)(R14*1)
+ MOVQ 48(DX), R15
+ VMOVDQU Y2, (R15)(R14*1)
+ MOVQ 72(DX), R15
+ VMOVDQU Y3, (R15)(R14*1)
+ MOVQ 96(DX), R15
+ VMOVDQU Y4, (R15)(R14*1)
+ MOVQ 120(DX), R15
+ VMOVDQU Y5, (R15)(R14*1)
+ MOVQ 144(DX), R15
+ VMOVDQU Y6, (R15)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_10x7_loop
+ VZEROUPPER
+
+mulAvxTwo_10x7_end:
+ RET
+
+// func mulAvxTwo_10x8(matrix []byte, in [][]byte, out [][]byte, start int, n int)
+// Requires: AVX, AVX2, SSE2
+TEXT ·mulAvxTwo_10x8(SB), $0-88
+ // Loading no tables to registers
+ // Full registers estimated 173 YMM used
+ MOVQ n+80(FP), AX
+ MOVQ matrix_base+0(FP), CX
+ SHRQ $0x05, AX
+ TESTQ AX, AX
+ JZ mulAvxTwo_10x8_end
+ MOVQ out_base+48(FP), DX
+ MOVQ in_base+24(FP), BX
+ MOVQ (BX), BP
+ MOVQ 24(BX), SI
+ MOVQ 48(BX), DI
+ MOVQ 72(BX), R8
+ MOVQ 96(BX), R9
+ MOVQ 120(BX), R10
+ MOVQ 144(BX), R11
+ MOVQ 168(BX), R12
+ MOVQ 192(BX), R13
+ MOVQ 216(BX), BX
+ MOVQ $0x0000000f, R14
+ MOVQ R14, X8
+ VPBROADCASTB X8, Y8
+ MOVQ start+72(FP), R14
+
+mulAvxTwo_10x8_loop:
+ // Clear 8 outputs
+ VPXOR Y0, Y0, Y0
+ VPXOR Y1, Y1, Y1
+ VPXOR Y2, Y2, Y2
+ VPXOR Y3, Y3, Y3
+ VPXOR Y4, Y4, Y4
+ VPXOR Y5, Y5, Y5
+ VPXOR Y6, Y6, Y6
+ VPXOR Y7, Y7, Y7
+
+ // Load and process 32 bytes from input 0 to 8 outputs
+ VMOVDQU (BP)(R14*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU (CX), Y9
+ VMOVDQU 32(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 64(CX), Y9
+ VMOVDQU 96(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 128(CX), Y9
+ VMOVDQU 160(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 192(CX), Y9
+ VMOVDQU 224(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 256(CX), Y9
+ VMOVDQU 288(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 320(CX), Y9
+ VMOVDQU 352(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 384(CX), Y9
+ VMOVDQU 416(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 448(CX), Y9
+ VMOVDQU 480(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 1 to 8 outputs
+ VMOVDQU (SI)(R14*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 512(CX), Y9
+ VMOVDQU 544(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 576(CX), Y9
+ VMOVDQU 608(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 640(CX), Y9
+ VMOVDQU 672(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 704(CX), Y9
+ VMOVDQU 736(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 768(CX), Y9
+ VMOVDQU 800(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 832(CX), Y9
+ VMOVDQU 864(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 896(CX), Y9
+ VMOVDQU 928(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 960(CX), Y9
+ VMOVDQU 992(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 2 to 8 outputs
+ VMOVDQU (DI)(R14*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1024(CX), Y9
+ VMOVDQU 1056(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1088(CX), Y9
+ VMOVDQU 1120(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1152(CX), Y9
+ VMOVDQU 1184(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1216(CX), Y9
+ VMOVDQU 1248(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1280(CX), Y9
+ VMOVDQU 1312(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1344(CX), Y9
+ VMOVDQU 1376(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1408(CX), Y9
+ VMOVDQU 1440(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1472(CX), Y9
+ VMOVDQU 1504(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 3 to 8 outputs
+ VMOVDQU (R8)(R14*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 1536(CX), Y9
+ VMOVDQU 1568(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 1600(CX), Y9
+ VMOVDQU 1632(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 1664(CX), Y9
+ VMOVDQU 1696(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 1728(CX), Y9
+ VMOVDQU 1760(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 1792(CX), Y9
+ VMOVDQU 1824(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 1856(CX), Y9
+ VMOVDQU 1888(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 1920(CX), Y9
+ VMOVDQU 1952(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 1984(CX), Y9
+ VMOVDQU 2016(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 4 to 8 outputs
+ VMOVDQU (R9)(R14*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 2048(CX), Y9
+ VMOVDQU 2080(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 2112(CX), Y9
+ VMOVDQU 2144(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 2176(CX), Y9
+ VMOVDQU 2208(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 2240(CX), Y9
+ VMOVDQU 2272(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 2304(CX), Y9
+ VMOVDQU 2336(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 2368(CX), Y9
+ VMOVDQU 2400(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 2432(CX), Y9
+ VMOVDQU 2464(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 2496(CX), Y9
+ VMOVDQU 2528(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 5 to 8 outputs
+ VMOVDQU (R10)(R14*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 2560(CX), Y9
+ VMOVDQU 2592(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 2624(CX), Y9
+ VMOVDQU 2656(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 2688(CX), Y9
+ VMOVDQU 2720(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 2752(CX), Y9
+ VMOVDQU 2784(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 2816(CX), Y9
+ VMOVDQU 2848(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 2880(CX), Y9
+ VMOVDQU 2912(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 2944(CX), Y9
+ VMOVDQU 2976(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 3008(CX), Y9
+ VMOVDQU 3040(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 6 to 8 outputs
+ VMOVDQU (R11)(R14*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 3072(CX), Y9
+ VMOVDQU 3104(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 3136(CX), Y9
+ VMOVDQU 3168(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 3200(CX), Y9
+ VMOVDQU 3232(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 3264(CX), Y9
+ VMOVDQU 3296(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 3328(CX), Y9
+ VMOVDQU 3360(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 3392(CX), Y9
+ VMOVDQU 3424(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 3456(CX), Y9
+ VMOVDQU 3488(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 3520(CX), Y9
+ VMOVDQU 3552(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 7 to 8 outputs
+ VMOVDQU (R12)(R14*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 3584(CX), Y9
+ VMOVDQU 3616(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 3648(CX), Y9
+ VMOVDQU 3680(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 3712(CX), Y9
+ VMOVDQU 3744(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 3776(CX), Y9
+ VMOVDQU 3808(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 3840(CX), Y9
+ VMOVDQU 3872(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 3904(CX), Y9
+ VMOVDQU 3936(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 3968(CX), Y9
+ VMOVDQU 4000(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 4032(CX), Y9
+ VMOVDQU 4064(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 8 to 8 outputs
+ VMOVDQU (R13)(R14*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 4096(CX), Y9
+ VMOVDQU 4128(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 4160(CX), Y9
+ VMOVDQU 4192(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 4224(CX), Y9
+ VMOVDQU 4256(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 4288(CX), Y9
+ VMOVDQU 4320(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 4352(CX), Y9
+ VMOVDQU 4384(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 4416(CX), Y9
+ VMOVDQU 4448(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 4480(CX), Y9
+ VMOVDQU 4512(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 4544(CX), Y9
+ VMOVDQU 4576(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Load and process 32 bytes from input 9 to 8 outputs
+ VMOVDQU (BX)(R14*1), Y11
+ VPSRLQ $0x04, Y11, Y12
+ VPAND Y8, Y11, Y11
+ VPAND Y8, Y12, Y12
+ VMOVDQU 4608(CX), Y9
+ VMOVDQU 4640(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y0, Y0
+ VMOVDQU 4672(CX), Y9
+ VMOVDQU 4704(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y1, Y1
+ VMOVDQU 4736(CX), Y9
+ VMOVDQU 4768(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y2, Y2
+ VMOVDQU 4800(CX), Y9
+ VMOVDQU 4832(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y3, Y3
+ VMOVDQU 4864(CX), Y9
+ VMOVDQU 4896(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y4, Y4
+ VMOVDQU 4928(CX), Y9
+ VMOVDQU 4960(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y5, Y5
+ VMOVDQU 4992(CX), Y9
+ VMOVDQU 5024(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y6, Y6
+ VMOVDQU 5056(CX), Y9
+ VMOVDQU 5088(CX), Y10
+ VPSHUFB Y11, Y9, Y9
+ VPSHUFB Y12, Y10, Y10
+ VPXOR Y9, Y10, Y9
+ VPXOR Y9, Y7, Y7
+
+ // Store 8 outputs
+ MOVQ (DX), R15
+ VMOVDQU Y0, (R15)(R14*1)
+ MOVQ 24(DX), R15
+ VMOVDQU Y1, (R15)(R14*1)
+ MOVQ 48(DX), R15
+ VMOVDQU Y2, (R15)(R14*1)
+ MOVQ 72(DX), R15
+ VMOVDQU Y3, (R15)(R14*1)
+ MOVQ 96(DX), R15
+ VMOVDQU Y4, (R15)(R14*1)
+ MOVQ 120(DX), R15
+ VMOVDQU Y5, (R15)(R14*1)
+ MOVQ 144(DX), R15
+ VMOVDQU Y6, (R15)(R14*1)
+ MOVQ 168(DX), R15
+ VMOVDQU Y7, (R15)(R14*1)
+
+ // Prepare for next loop
+ ADDQ $0x20, R14
+ DECQ AX
+ JNZ mulAvxTwo_10x8_loop
+ VZEROUPPER
+
+mulAvxTwo_10x8_end:
+ RET
diff --git a/vendor/github.com/klauspost/reedsolomon/galois_gen_none.go b/vendor/github.com/klauspost/reedsolomon/galois_gen_none.go
new file mode 100644
index 0000000..b4917bc
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galois_gen_none.go
@@ -0,0 +1,11 @@
+//+build !amd64 noasm appengine gccgo nogen
+
+package reedsolomon
+
+const maxAvx2Inputs = 0
+const maxAvx2Outputs = 0
+const avx2CodeGen = false
+
+func galMulSlicesAvx2(matrix []byte, in, out [][]byte, start, stop int) int {
+ panic("avx2 codegen not available")
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/galois_gen_switch_amd64.go b/vendor/github.com/klauspost/reedsolomon/galois_gen_switch_amd64.go
new file mode 100644
index 0000000..0b49a1e
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galois_gen_switch_amd64.go
@@ -0,0 +1,293 @@
+// Code generated by command: go generate gen.go. DO NOT EDIT.
+
+// +build !appengine
+// +build !noasm
+// +build gc
+// +build !nogen
+
+package reedsolomon
+
+import "fmt"
+
+const avx2CodeGen = true
+const maxAvx2Inputs = 10
+const maxAvx2Outputs = 8
+
+func galMulSlicesAvx2(matrix []byte, in, out [][]byte, start, stop int) int {
+ n := stop - start
+ n = (n >> 5) << 5
+
+ switch len(in) {
+ case 1:
+ switch len(out) {
+ case 1:
+ mulAvxTwo_1x1(matrix, in, out, start, n)
+ return n
+ case 2:
+ mulAvxTwo_1x2(matrix, in, out, start, n)
+ return n
+ case 3:
+ mulAvxTwo_1x3(matrix, in, out, start, n)
+ return n
+ case 4:
+ mulAvxTwo_1x4(matrix, in, out, start, n)
+ return n
+ case 5:
+ mulAvxTwo_1x5(matrix, in, out, start, n)
+ return n
+ case 6:
+ mulAvxTwo_1x6(matrix, in, out, start, n)
+ return n
+ case 7:
+ mulAvxTwo_1x7(matrix, in, out, start, n)
+ return n
+ case 8:
+ mulAvxTwo_1x8(matrix, in, out, start, n)
+ return n
+ }
+ case 2:
+ switch len(out) {
+ case 1:
+ mulAvxTwo_2x1(matrix, in, out, start, n)
+ return n
+ case 2:
+ mulAvxTwo_2x2(matrix, in, out, start, n)
+ return n
+ case 3:
+ mulAvxTwo_2x3(matrix, in, out, start, n)
+ return n
+ case 4:
+ mulAvxTwo_2x4(matrix, in, out, start, n)
+ return n
+ case 5:
+ mulAvxTwo_2x5(matrix, in, out, start, n)
+ return n
+ case 6:
+ mulAvxTwo_2x6(matrix, in, out, start, n)
+ return n
+ case 7:
+ mulAvxTwo_2x7(matrix, in, out, start, n)
+ return n
+ case 8:
+ mulAvxTwo_2x8(matrix, in, out, start, n)
+ return n
+ }
+ case 3:
+ switch len(out) {
+ case 1:
+ mulAvxTwo_3x1(matrix, in, out, start, n)
+ return n
+ case 2:
+ mulAvxTwo_3x2(matrix, in, out, start, n)
+ return n
+ case 3:
+ mulAvxTwo_3x3(matrix, in, out, start, n)
+ return n
+ case 4:
+ mulAvxTwo_3x4(matrix, in, out, start, n)
+ return n
+ case 5:
+ mulAvxTwo_3x5(matrix, in, out, start, n)
+ return n
+ case 6:
+ mulAvxTwo_3x6(matrix, in, out, start, n)
+ return n
+ case 7:
+ mulAvxTwo_3x7(matrix, in, out, start, n)
+ return n
+ case 8:
+ mulAvxTwo_3x8(matrix, in, out, start, n)
+ return n
+ }
+ case 4:
+ switch len(out) {
+ case 1:
+ mulAvxTwo_4x1(matrix, in, out, start, n)
+ return n
+ case 2:
+ mulAvxTwo_4x2(matrix, in, out, start, n)
+ return n
+ case 3:
+ mulAvxTwo_4x3(matrix, in, out, start, n)
+ return n
+ case 4:
+ mulAvxTwo_4x4(matrix, in, out, start, n)
+ return n
+ case 5:
+ mulAvxTwo_4x5(matrix, in, out, start, n)
+ return n
+ case 6:
+ mulAvxTwo_4x6(matrix, in, out, start, n)
+ return n
+ case 7:
+ mulAvxTwo_4x7(matrix, in, out, start, n)
+ return n
+ case 8:
+ mulAvxTwo_4x8(matrix, in, out, start, n)
+ return n
+ }
+ case 5:
+ switch len(out) {
+ case 1:
+ mulAvxTwo_5x1(matrix, in, out, start, n)
+ return n
+ case 2:
+ mulAvxTwo_5x2(matrix, in, out, start, n)
+ return n
+ case 3:
+ mulAvxTwo_5x3(matrix, in, out, start, n)
+ return n
+ case 4:
+ mulAvxTwo_5x4(matrix, in, out, start, n)
+ return n
+ case 5:
+ mulAvxTwo_5x5(matrix, in, out, start, n)
+ return n
+ case 6:
+ mulAvxTwo_5x6(matrix, in, out, start, n)
+ return n
+ case 7:
+ mulAvxTwo_5x7(matrix, in, out, start, n)
+ return n
+ case 8:
+ mulAvxTwo_5x8(matrix, in, out, start, n)
+ return n
+ }
+ case 6:
+ switch len(out) {
+ case 1:
+ mulAvxTwo_6x1(matrix, in, out, start, n)
+ return n
+ case 2:
+ mulAvxTwo_6x2(matrix, in, out, start, n)
+ return n
+ case 3:
+ mulAvxTwo_6x3(matrix, in, out, start, n)
+ return n
+ case 4:
+ mulAvxTwo_6x4(matrix, in, out, start, n)
+ return n
+ case 5:
+ mulAvxTwo_6x5(matrix, in, out, start, n)
+ return n
+ case 6:
+ mulAvxTwo_6x6(matrix, in, out, start, n)
+ return n
+ case 7:
+ mulAvxTwo_6x7(matrix, in, out, start, n)
+ return n
+ case 8:
+ mulAvxTwo_6x8(matrix, in, out, start, n)
+ return n
+ }
+ case 7:
+ switch len(out) {
+ case 1:
+ mulAvxTwo_7x1(matrix, in, out, start, n)
+ return n
+ case 2:
+ mulAvxTwo_7x2(matrix, in, out, start, n)
+ return n
+ case 3:
+ mulAvxTwo_7x3(matrix, in, out, start, n)
+ return n
+ case 4:
+ mulAvxTwo_7x4(matrix, in, out, start, n)
+ return n
+ case 5:
+ mulAvxTwo_7x5(matrix, in, out, start, n)
+ return n
+ case 6:
+ mulAvxTwo_7x6(matrix, in, out, start, n)
+ return n
+ case 7:
+ mulAvxTwo_7x7(matrix, in, out, start, n)
+ return n
+ case 8:
+ mulAvxTwo_7x8(matrix, in, out, start, n)
+ return n
+ }
+ case 8:
+ switch len(out) {
+ case 1:
+ mulAvxTwo_8x1(matrix, in, out, start, n)
+ return n
+ case 2:
+ mulAvxTwo_8x2(matrix, in, out, start, n)
+ return n
+ case 3:
+ mulAvxTwo_8x3(matrix, in, out, start, n)
+ return n
+ case 4:
+ mulAvxTwo_8x4(matrix, in, out, start, n)
+ return n
+ case 5:
+ mulAvxTwo_8x5(matrix, in, out, start, n)
+ return n
+ case 6:
+ mulAvxTwo_8x6(matrix, in, out, start, n)
+ return n
+ case 7:
+ mulAvxTwo_8x7(matrix, in, out, start, n)
+ return n
+ case 8:
+ mulAvxTwo_8x8(matrix, in, out, start, n)
+ return n
+ }
+ case 9:
+ switch len(out) {
+ case 1:
+ mulAvxTwo_9x1(matrix, in, out, start, n)
+ return n
+ case 2:
+ mulAvxTwo_9x2(matrix, in, out, start, n)
+ return n
+ case 3:
+ mulAvxTwo_9x3(matrix, in, out, start, n)
+ return n
+ case 4:
+ mulAvxTwo_9x4(matrix, in, out, start, n)
+ return n
+ case 5:
+ mulAvxTwo_9x5(matrix, in, out, start, n)
+ return n
+ case 6:
+ mulAvxTwo_9x6(matrix, in, out, start, n)
+ return n
+ case 7:
+ mulAvxTwo_9x7(matrix, in, out, start, n)
+ return n
+ case 8:
+ mulAvxTwo_9x8(matrix, in, out, start, n)
+ return n
+ }
+ case 10:
+ switch len(out) {
+ case 1:
+ mulAvxTwo_10x1(matrix, in, out, start, n)
+ return n
+ case 2:
+ mulAvxTwo_10x2(matrix, in, out, start, n)
+ return n
+ case 3:
+ mulAvxTwo_10x3(matrix, in, out, start, n)
+ return n
+ case 4:
+ mulAvxTwo_10x4(matrix, in, out, start, n)
+ return n
+ case 5:
+ mulAvxTwo_10x5(matrix, in, out, start, n)
+ return n
+ case 6:
+ mulAvxTwo_10x6(matrix, in, out, start, n)
+ return n
+ case 7:
+ mulAvxTwo_10x7(matrix, in, out, start, n)
+ return n
+ case 8:
+ mulAvxTwo_10x8(matrix, in, out, start, n)
+ return n
+ }
+ }
+ panic(fmt.Sprintf("unhandled size: %dx%d", len(in), len(out)))
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/galois_noasm.go b/vendor/github.com/klauspost/reedsolomon/galois_noasm.go
new file mode 100644
index 0000000..1d00e06
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galois_noasm.go
@@ -0,0 +1,44 @@
+//+build !amd64 noasm appengine gccgo
+//+build !arm64 noasm appengine gccgo
+//+build !ppc64le noasm appengine gccgo
+
+// Copyright 2015, Klaus Post, see LICENSE for details.
+
+package reedsolomon
+
+func galMulSlice(c byte, in, out []byte, o *options) {
+ out = out[:len(in)]
+ if c == 1 {
+ copy(out, in)
+ return
+ }
+ mt := mulTable[c][:256]
+ for n, input := range in {
+ out[n] = mt[input]
+ }
+}
+
+func galMulSliceXor(c byte, in, out []byte, o *options) {
+ out = out[:len(in)]
+ if c == 1 {
+ for n, input := range in {
+ out[n] ^= input
+ }
+ return
+ }
+ mt := mulTable[c][:256]
+ for n, input := range in {
+ out[n] ^= mt[input]
+ }
+}
+
+// slice galois add
+func sliceXor(in, out []byte, o *options) {
+ for n, input := range in {
+ out[n] ^= input
+ }
+}
+
+func init() {
+ defaultOptions.useAVX512 = false
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/galois_notamd64.go b/vendor/github.com/klauspost/reedsolomon/galois_notamd64.go
new file mode 100644
index 0000000..bd15e3a
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galois_notamd64.go
@@ -0,0 +1,13 @@
+//+build !amd64 noasm appengine gccgo
+
+// Copyright 2020, Klaus Post, see LICENSE for details.
+
+package reedsolomon
+
+func (r *reedSolomon) codeSomeShardsAvx512(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
+ panic("codeSomeShardsAvx512 should not be called if built without asm")
+}
+
+func (r *reedSolomon) codeSomeShardsAvx512P(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
+ panic("codeSomeShardsAvx512P should not be called if built without asm")
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/galois_ppc64le.go b/vendor/github.com/klauspost/reedsolomon/galois_ppc64le.go
new file mode 100644
index 0000000..70f93d6
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galois_ppc64le.go
@@ -0,0 +1,75 @@
+//+build !noasm
+//+build !appengine
+//+build !gccgo
+
+// Copyright 2015, Klaus Post, see LICENSE for details.
+// Copyright 2018, Minio, Inc.
+
+package reedsolomon
+
+//go:noescape
+func galMulPpc(low, high, in, out []byte)
+
+//go:noescape
+func galMulPpcXor(low, high, in, out []byte)
+
+// This is what the assembler routines do in blocks of 16 bytes:
+/*
+func galMulPpc(low, high, in, out []byte) {
+ for n, input := range in {
+ l := input & 0xf
+ h := input >> 4
+ out[n] = low[l] ^ high[h]
+ }
+}
+func galMulPpcXor(low, high, in, out []byte) {
+ for n, input := range in {
+ l := input & 0xf
+ h := input >> 4
+ out[n] ^= low[l] ^ high[h]
+ }
+}
+*/
+
+func galMulSlice(c byte, in, out []byte, o *options) {
+ if c == 1 {
+ copy(out, in)
+ return
+ }
+ done := (len(in) >> 4) << 4
+ if done > 0 {
+ galMulPpc(mulTableLow[c][:], mulTableHigh[c][:], in[:done], out)
+ }
+ remain := len(in) - done
+ if remain > 0 {
+ mt := mulTable[c][:256]
+ for i := done; i < len(in); i++ {
+ out[i] = mt[in[i]]
+ }
+ }
+}
+
+func galMulSliceXor(c byte, in, out []byte, o *options) {
+ if c == 1 {
+ sliceXor(in, out, o)
+ return
+ }
+ done := (len(in) >> 4) << 4
+ if done > 0 {
+ galMulPpcXor(mulTableLow[c][:], mulTableHigh[c][:], in[:done], out)
+ }
+ remain := len(in) - done
+ if remain > 0 {
+ mt := mulTable[c][:256]
+ for i := done; i < len(in); i++ {
+ out[i] ^= mt[in[i]]
+ }
+ }
+}
+
+// slice galois add
+func sliceXor(in, out []byte, o *options) {
+ for n, input := range in {
+ out[n] ^= input
+ }
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/galois_ppc64le.s b/vendor/github.com/klauspost/reedsolomon/galois_ppc64le.s
new file mode 100644
index 0000000..8838f0c
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/galois_ppc64le.s
@@ -0,0 +1,124 @@
+//+build !noasm !appengine !gccgo
+
+// Copyright 2015, Klaus Post, see LICENSE for details.
+// Copyright 2018, Minio, Inc.
+
+#include "textflag.h"
+
+#define LOW R3
+#define HIGH R4
+#define IN R5
+#define LEN R6
+#define OUT R7
+#define CONSTANTS R8
+#define OFFSET R9
+#define OFFSET1 R10
+#define OFFSET2 R11
+
+#define X6 VS34
+#define X6_ V2
+#define X7 VS35
+#define X7_ V3
+#define MSG VS36
+#define MSG_ V4
+#define MSG_HI VS37
+#define MSG_HI_ V5
+#define RESULT VS38
+#define RESULT_ V6
+#define ROTATE VS39
+#define ROTATE_ V7
+#define MASK VS40
+#define MASK_ V8
+#define FLIP VS41
+#define FLIP_ V9
+
+// func galMulPpc(low, high, in, out []byte)
+TEXT ·galMulPpc(SB), NOFRAME|NOSPLIT, $0-96
+ MOVD low+0(FP), LOW
+ MOVD high+24(FP), HIGH
+ MOVD in+48(FP), IN
+ MOVD in_len+56(FP), LEN
+ MOVD out+72(FP), OUT
+
+ MOVD $16, OFFSET1
+ MOVD $32, OFFSET2
+
+ MOVD $·constants(SB), CONSTANTS
+ LXVD2X (CONSTANTS)(R0), ROTATE
+ LXVD2X (CONSTANTS)(OFFSET1), MASK
+ LXVD2X (CONSTANTS)(OFFSET2), FLIP
+
+ LXVD2X (LOW)(R0), X6
+ LXVD2X (HIGH)(R0), X7
+ VPERM X6_, V31, FLIP_, X6_
+ VPERM X7_, V31, FLIP_, X7_
+
+ MOVD $0, OFFSET
+
+loop:
+ LXVD2X (IN)(OFFSET), MSG
+
+ VSRB MSG_, ROTATE_, MSG_HI_
+ VAND MSG_, MASK_, MSG_
+ VPERM X6_, V31, MSG_, MSG_
+ VPERM X7_, V31, MSG_HI_, MSG_HI_
+
+ VXOR MSG_, MSG_HI_, MSG_
+
+ STXVD2X MSG, (OUT)(OFFSET)
+
+ ADD $16, OFFSET, OFFSET
+ CMP LEN, OFFSET
+ BGT loop
+ RET
+
+// func galMulPpcXorlow, high, in, out []byte)
+TEXT ·galMulPpcXor(SB), NOFRAME|NOSPLIT, $0-96
+ MOVD low+0(FP), LOW
+ MOVD high+24(FP), HIGH
+ MOVD in+48(FP), IN
+ MOVD in_len+56(FP), LEN
+ MOVD out+72(FP), OUT
+
+ MOVD $16, OFFSET1
+ MOVD $32, OFFSET2
+
+ MOVD $·constants(SB), CONSTANTS
+ LXVD2X (CONSTANTS)(R0), ROTATE
+ LXVD2X (CONSTANTS)(OFFSET1), MASK
+ LXVD2X (CONSTANTS)(OFFSET2), FLIP
+
+ LXVD2X (LOW)(R0), X6
+ LXVD2X (HIGH)(R0), X7
+ VPERM X6_, V31, FLIP_, X6_
+ VPERM X7_, V31, FLIP_, X7_
+
+ MOVD $0, OFFSET
+
+loopXor:
+ LXVD2X (IN)(OFFSET), MSG
+ LXVD2X (OUT)(OFFSET), RESULT
+
+ VSRB MSG_, ROTATE_, MSG_HI_
+ VAND MSG_, MASK_, MSG_
+ VPERM X6_, V31, MSG_, MSG_
+ VPERM X7_, V31, MSG_HI_, MSG_HI_
+
+ VXOR MSG_, MSG_HI_, MSG_
+ VXOR MSG_, RESULT_, RESULT_
+
+ STXVD2X RESULT, (OUT)(OFFSET)
+
+ ADD $16, OFFSET, OFFSET
+ CMP LEN, OFFSET
+ BGT loopXor
+ RET
+
+DATA ·constants+0x0(SB)/8, $0x0404040404040404
+DATA ·constants+0x8(SB)/8, $0x0404040404040404
+DATA ·constants+0x10(SB)/8, $0x0f0f0f0f0f0f0f0f
+DATA ·constants+0x18(SB)/8, $0x0f0f0f0f0f0f0f0f
+DATA ·constants+0x20(SB)/8, $0x0706050403020100
+DATA ·constants+0x28(SB)/8, $0x0f0e0d0c0b0a0908
+
+GLOBL ·constants(SB), 8, $48
diff --git a/vendor/github.com/klauspost/reedsolomon/gen.go b/vendor/github.com/klauspost/reedsolomon/gen.go
new file mode 100644
index 0000000..6fc545c
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/gen.go
@@ -0,0 +1,249 @@
+//+build generate
+
+//go:generate go run gen.go -out galois_gen_amd64.s -stubs galois_gen_amd64.go
+//go:generate gofmt -w galois_gen_switch_amd64.go
+
+package main
+
+import (
+ "bufio"
+ "fmt"
+ "os"
+
+ . "github.com/mmcloughlin/avo/build"
+ "github.com/mmcloughlin/avo/buildtags"
+ . "github.com/mmcloughlin/avo/operand"
+ "github.com/mmcloughlin/avo/reg"
+)
+
+// Technically we can do slightly bigger, but we stay reasonable.
+const inputMax = 10
+const outputMax = 8
+
+var switchDefs [inputMax][outputMax]string
+var switchDefsX [inputMax][outputMax]string
+
+const perLoopBits = 5
+const perLoop = 1 << perLoopBits
+
+func main() {
+ Constraint(buildtags.Not("appengine").ToConstraint())
+ Constraint(buildtags.Not("noasm").ToConstraint())
+ Constraint(buildtags.Not("nogen").ToConstraint())
+ Constraint(buildtags.Term("gc").ToConstraint())
+
+ for i := 1; i <= inputMax; i++ {
+ for j := 1; j <= outputMax; j++ {
+ //genMulAvx2(fmt.Sprintf("mulAvxTwoXor_%dx%d", i, j), i, j, true)
+ genMulAvx2(fmt.Sprintf("mulAvxTwo_%dx%d", i, j), i, j, false)
+ }
+ }
+ f, err := os.Create("galois_gen_switch_amd64.go")
+ if err != nil {
+ panic(err)
+ }
+ defer f.Close()
+ w := bufio.NewWriter(f)
+ defer w.Flush()
+ w.WriteString(`// Code generated by command: go generate ` + os.Getenv("GOFILE") + `. DO NOT EDIT.
+
+// +build !appengine
+// +build !noasm
+// +build gc
+// +build !nogen
+
+package reedsolomon
+
+import "fmt"
+
+`)
+
+ w.WriteString("const avx2CodeGen = true\n")
+ w.WriteString(fmt.Sprintf("const maxAvx2Inputs = %d\nconst maxAvx2Outputs = %d\n", inputMax, outputMax))
+ w.WriteString(`
+
+func galMulSlicesAvx2(matrix []byte, in, out [][]byte, start, stop int) int {
+ n := stop-start
+`)
+
+ w.WriteString(fmt.Sprintf("n = (n>>%d)<<%d\n\n", perLoopBits, perLoopBits))
+ w.WriteString(`switch len(in) {
+`)
+ for in, defs := range switchDefs[:] {
+ w.WriteString(fmt.Sprintf(" case %d:\n switch len(out) {\n", in+1))
+ for out, def := range defs[:] {
+ w.WriteString(fmt.Sprintf(" case %d:\n", out+1))
+ w.WriteString(def)
+ }
+ w.WriteString("}\n")
+ }
+ w.WriteString(`}
+ panic(fmt.Sprintf("unhandled size: %dx%d", len(in), len(out)))
+}
+`)
+ Generate()
+}
+
+func genMulAvx2(name string, inputs int, outputs int, xor bool) {
+ total := inputs * outputs
+
+ doc := []string{
+ fmt.Sprintf("%s takes %d inputs and produces %d outputs.", name, inputs, outputs),
+ }
+ if !xor {
+ doc = append(doc, "The output is initialized to 0.")
+ }
+
+ // Load shuffle masks on every use.
+ var loadNone bool
+ // Use registers for destination registers.
+ var regDst = true
+
+ // lo, hi, 1 in, 1 out, 2 tmp, 1 mask
+ est := total*2 + outputs + 5
+ if outputs == 1 {
+ // We don't need to keep a copy of the input if only 1 output.
+ est -= 2
+ }
+
+ if est > 16 {
+ loadNone = true
+ // We run out of GP registers first, now.
+ if inputs+outputs > 12 {
+ regDst = false
+ }
+ }
+
+ TEXT(name, 0, fmt.Sprintf("func(matrix []byte, in [][]byte, out [][]byte, start, n int)"))
+
+ // SWITCH DEFINITION:
+ s := fmt.Sprintf(" mulAvxTwo_%dx%d(matrix, in, out, start, n)\n", inputs, outputs)
+ s += fmt.Sprintf("\t\t\t\treturn n\n")
+ switchDefs[inputs-1][outputs-1] = s
+
+ if loadNone {
+ Comment("Loading no tables to registers")
+ } else {
+ // loadNone == false
+ Comment("Loading all tables to registers")
+ }
+
+ Doc(doc...)
+ Pragma("noescape")
+ Commentf("Full registers estimated %d YMM used", est)
+
+ length := Load(Param("n"), GP64())
+ matrixBase := GP64()
+ MOVQ(Param("matrix").Base().MustAddr(), matrixBase)
+ SHRQ(U8(perLoopBits), length)
+ TESTQ(length, length)
+ JZ(LabelRef(name + "_end"))
+
+ dst := make([]reg.VecVirtual, outputs)
+ dstPtr := make([]reg.GPVirtual, outputs)
+ outBase := Param("out").Base().MustAddr()
+ outSlicePtr := GP64()
+ MOVQ(outBase, outSlicePtr)
+ for i := range dst {
+ dst[i] = YMM()
+ if !regDst {
+ continue
+ }
+ ptr := GP64()
+ MOVQ(Mem{Base: outSlicePtr, Disp: i * 24}, ptr)
+ dstPtr[i] = ptr
+ }
+
+ inLo := make([]reg.VecVirtual, total)
+ inHi := make([]reg.VecVirtual, total)
+
+ for i := range inLo {
+ if loadNone {
+ break
+ }
+ tableLo := YMM()
+ tableHi := YMM()
+ VMOVDQU(Mem{Base: matrixBase, Disp: i * 64}, tableLo)
+ VMOVDQU(Mem{Base: matrixBase, Disp: i*64 + 32}, tableHi)
+ inLo[i] = tableLo
+ inHi[i] = tableHi
+ }
+
+ inPtrs := make([]reg.GPVirtual, inputs)
+ inSlicePtr := GP64()
+ MOVQ(Param("in").Base().MustAddr(), inSlicePtr)
+ for i := range inPtrs {
+ ptr := GP64()
+ MOVQ(Mem{Base: inSlicePtr, Disp: i * 24}, ptr)
+ inPtrs[i] = ptr
+ }
+
+ tmpMask := GP64()
+ MOVQ(U32(15), tmpMask)
+ lowMask := YMM()
+ MOVQ(tmpMask, lowMask.AsX())
+ VPBROADCASTB(lowMask.AsX(), lowMask)
+
+ offset := GP64()
+ MOVQ(Param("start").MustAddr(), offset)
+ Label(name + "_loop")
+ if xor {
+ Commentf("Load %d outputs", outputs)
+ } else {
+ Commentf("Clear %d outputs", outputs)
+ }
+ for i := range dst {
+ if xor {
+ if regDst {
+ VMOVDQU(Mem{Base: dstPtr[i], Index: offset, Scale: 1}, dst[i])
+ continue
+ }
+ ptr := GP64()
+ MOVQ(outBase, ptr)
+ VMOVDQU(Mem{Base: ptr, Index: offset, Scale: 1}, dst[i])
+ } else {
+ VPXOR(dst[i], dst[i], dst[i])
+ }
+ }
+
+ lookLow, lookHigh := YMM(), YMM()
+ inLow, inHigh := YMM(), YMM()
+ for i := range inPtrs {
+ Commentf("Load and process 32 bytes from input %d to %d outputs", i, outputs)
+ VMOVDQU(Mem{Base: inPtrs[i], Index: offset, Scale: 1}, inLow)
+ VPSRLQ(U8(4), inLow, inHigh)
+ VPAND(lowMask, inLow, inLow)
+ VPAND(lowMask, inHigh, inHigh)
+ for j := range dst {
+ if loadNone {
+ VMOVDQU(Mem{Base: matrixBase, Disp: 64 * (i*outputs + j)}, lookLow)
+ VMOVDQU(Mem{Base: matrixBase, Disp: 32 + 64*(i*outputs+j)}, lookHigh)
+ VPSHUFB(inLow, lookLow, lookLow)
+ VPSHUFB(inHigh, lookHigh, lookHigh)
+ } else {
+ VPSHUFB(inLow, inLo[i*outputs+j], lookLow)
+ VPSHUFB(inHigh, inHi[i*outputs+j], lookHigh)
+ }
+ VPXOR(lookLow, lookHigh, lookLow)
+ VPXOR(lookLow, dst[j], dst[j])
+ }
+ }
+ Commentf("Store %d outputs", outputs)
+ for i := range dst {
+ if regDst {
+ VMOVDQU(dst[i], Mem{Base: dstPtr[i], Index: offset, Scale: 1})
+ continue
+ }
+ ptr := GP64()
+ MOVQ(Mem{Base: outSlicePtr, Disp: i * 24}, ptr)
+ VMOVDQU(dst[i], Mem{Base: ptr, Index: offset, Scale: 1})
+ }
+ Comment("Prepare for next loop")
+ ADDQ(U8(perLoop), offset)
+ DECQ(length)
+ JNZ(LabelRef(name + "_loop"))
+ VZEROUPPER()
+
+ Label(name + "_end")
+ RET()
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/go.mod b/vendor/github.com/klauspost/reedsolomon/go.mod
new file mode 100644
index 0000000..a059d86
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/go.mod
@@ -0,0 +1,7 @@
+module github.com/klauspost/reedsolomon
+
+go 1.14
+
+require (
+ github.com/klauspost/cpuid v1.2.4
+)
diff --git a/vendor/github.com/klauspost/reedsolomon/go.sum b/vendor/github.com/klauspost/reedsolomon/go.sum
new file mode 100644
index 0000000..5a44d81
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/go.sum
@@ -0,0 +1,2 @@
+github.com/klauspost/cpuid v1.2.4 h1:EBfaK0SWSwk+fgk6efYFWdzl8MwRWoOO1gkmiaTXPW4=
+github.com/klauspost/cpuid v1.2.4/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
diff --git a/vendor/github.com/klauspost/reedsolomon/inversion_tree.go b/vendor/github.com/klauspost/reedsolomon/inversion_tree.go
new file mode 100644
index 0000000..c9d8ab2
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/inversion_tree.go
@@ -0,0 +1,160 @@
+/**
+ * A thread-safe tree which caches inverted matrices.
+ *
+ * Copyright 2016, Peter Collins
+ */
+
+package reedsolomon
+
+import (
+ "errors"
+ "sync"
+)
+
+// The tree uses a Reader-Writer mutex to make it thread-safe
+// when accessing cached matrices and inserting new ones.
+type inversionTree struct {
+ mutex *sync.RWMutex
+ root inversionNode
+}
+
+type inversionNode struct {
+ matrix matrix
+ children []*inversionNode
+}
+
+// newInversionTree initializes a tree for storing inverted matrices.
+// Note that the root node is the identity matrix as it implies
+// there were no errors with the original data.
+func newInversionTree(dataShards, parityShards int) inversionTree {
+ identity, _ := identityMatrix(dataShards)
+ root := inversionNode{
+ matrix: identity,
+ children: make([]*inversionNode, dataShards+parityShards),
+ }
+ return inversionTree{
+ mutex: &sync.RWMutex{},
+ root: root,
+ }
+}
+
+// GetInvertedMatrix returns the cached inverted matrix or nil if it
+// is not found in the tree keyed on the indices of invalid rows.
+func (t inversionTree) GetInvertedMatrix(invalidIndices []int) matrix {
+ // Lock the tree for reading before accessing the tree.
+ t.mutex.RLock()
+ defer t.mutex.RUnlock()
+
+ // If no invalid indices were give we should return the root
+ // identity matrix.
+ if len(invalidIndices) == 0 {
+ return t.root.matrix
+ }
+
+ // Recursively search for the inverted matrix in the tree, passing in
+ // 0 as the parent index as we start at the root of the tree.
+ return t.root.getInvertedMatrix(invalidIndices, 0)
+}
+
+// errAlreadySet is returned if the root node matrix is overwritten
+var errAlreadySet = errors.New("the root node identity matrix is already set")
+
+// InsertInvertedMatrix inserts a new inverted matrix into the tree
+// keyed by the indices of invalid rows. The total number of shards
+// is required for creating the proper length lists of child nodes for
+// each node.
+func (t inversionTree) InsertInvertedMatrix(invalidIndices []int, matrix matrix, shards int) error {
+ // If no invalid indices were given then we are done because the
+ // root node is already set with the identity matrix.
+ if len(invalidIndices) == 0 {
+ return errAlreadySet
+ }
+
+ if !matrix.IsSquare() {
+ return errNotSquare
+ }
+
+ // Lock the tree for writing and reading before accessing the tree.
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
+
+ // Recursively create nodes for the inverted matrix in the tree until
+ // we reach the node to insert the matrix to. We start by passing in
+ // 0 as the parent index as we start at the root of the tree.
+ t.root.insertInvertedMatrix(invalidIndices, matrix, shards, 0)
+
+ return nil
+}
+
+func (n inversionNode) getInvertedMatrix(invalidIndices []int, parent int) matrix {
+ // Get the child node to search next from the list of children. The
+ // list of children starts relative to the parent index passed in
+ // because the indices of invalid rows is sorted (by default). As we
+ // search recursively, the first invalid index gets popped off the list,
+ // so when searching through the list of children, use that first invalid
+ // index to find the child node.
+ firstIndex := invalidIndices[0]
+ node := n.children[firstIndex-parent]
+
+ // If the child node doesn't exist in the list yet, fail fast by
+ // returning, so we can construct and insert the proper inverted matrix.
+ if node == nil {
+ return nil
+ }
+
+ // If there's more than one invalid index left in the list we should
+ // keep searching recursively.
+ if len(invalidIndices) > 1 {
+ // Search recursively on the child node by passing in the invalid indices
+ // with the first index popped off the front. Also the parent index to
+ // pass down is the first index plus one.
+ return node.getInvertedMatrix(invalidIndices[1:], firstIndex+1)
+ }
+ // If there aren't any more invalid indices to search, we've found our
+ // node. Return it, however keep in mind that the matrix could still be
+ // nil because intermediary nodes in the tree are created sometimes with
+ // their inversion matrices uninitialized.
+ return node.matrix
+}
+
+func (n inversionNode) insertInvertedMatrix(invalidIndices []int, matrix matrix, shards, parent int) {
+ // As above, get the child node to search next from the list of children.
+ // The list of children starts relative to the parent index passed in
+ // because the indices of invalid rows is sorted (by default). As we
+ // search recursively, the first invalid index gets popped off the list,
+ // so when searching through the list of children, use that first invalid
+ // index to find the child node.
+ firstIndex := invalidIndices[0]
+ node := n.children[firstIndex-parent]
+
+ // If the child node doesn't exist in the list yet, create a new
+ // node because we have the writer lock and add it to the list
+ // of children.
+ if node == nil {
+ // Make the length of the list of children equal to the number
+ // of shards minus the first invalid index because the list of
+ // invalid indices is sorted, so only this length of errors
+ // are possible in the tree.
+ node = &inversionNode{
+ children: make([]*inversionNode, shards-firstIndex),
+ }
+ // Insert the new node into the tree at the first index relative
+ // to the parent index that was given in this recursive call.
+ n.children[firstIndex-parent] = node
+ }
+
+ // If there's more than one invalid index left in the list we should
+ // keep searching recursively in order to find the node to add our
+ // matrix.
+ if len(invalidIndices) > 1 {
+ // As above, search recursively on the child node by passing in
+ // the invalid indices with the first index popped off the front.
+ // Also the total number of shards and parent index are passed down
+ // which is equal to the first index plus one.
+ node.insertInvertedMatrix(invalidIndices[1:], matrix, shards, firstIndex+1)
+ } else {
+ // If there aren't any more invalid indices to search, we've found our
+ // node. Cache the inverted matrix in this node.
+ node.matrix = matrix
+ }
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/matrix.go b/vendor/github.com/klauspost/reedsolomon/matrix.go
new file mode 100644
index 0000000..a6b9730
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/matrix.go
@@ -0,0 +1,279 @@
+/**
+ * Matrix Algebra over an 8-bit Galois Field
+ *
+ * Copyright 2015, Klaus Post
+ * Copyright 2015, Backblaze, Inc.
+ */
+
+package reedsolomon
+
+import (
+ "errors"
+ "fmt"
+ "strconv"
+ "strings"
+)
+
+// byte[row][col]
+type matrix [][]byte
+
+// newMatrix returns a matrix of zeros.
+func newMatrix(rows, cols int) (matrix, error) {
+ if rows <= 0 {
+ return nil, errInvalidRowSize
+ }
+ if cols <= 0 {
+ return nil, errInvalidColSize
+ }
+
+ m := matrix(make([][]byte, rows))
+ for i := range m {
+ m[i] = make([]byte, cols)
+ }
+ return m, nil
+}
+
+// NewMatrixData initializes a matrix with the given row-major data.
+// Note that data is not copied from input.
+func newMatrixData(data [][]byte) (matrix, error) {
+ m := matrix(data)
+ err := m.Check()
+ if err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+// IdentityMatrix returns an identity matrix of the given size.
+func identityMatrix(size int) (matrix, error) {
+ m, err := newMatrix(size, size)
+ if err != nil {
+ return nil, err
+ }
+ for i := range m {
+ m[i][i] = 1
+ }
+ return m, nil
+}
+
+// errInvalidRowSize will be returned if attempting to create a matrix with negative or zero row number.
+var errInvalidRowSize = errors.New("invalid row size")
+
+// errInvalidColSize will be returned if attempting to create a matrix with negative or zero column number.
+var errInvalidColSize = errors.New("invalid column size")
+
+// errColSizeMismatch is returned if the size of matrix columns mismatch.
+var errColSizeMismatch = errors.New("column size is not the same for all rows")
+
+func (m matrix) Check() error {
+ rows := len(m)
+ if rows <= 0 {
+ return errInvalidRowSize
+ }
+ cols := len(m[0])
+ if cols <= 0 {
+ return errInvalidColSize
+ }
+
+ for _, col := range m {
+ if len(col) != cols {
+ return errColSizeMismatch
+ }
+ }
+ return nil
+}
+
+// String returns a human-readable string of the matrix contents.
+//
+// Example: [[1, 2], [3, 4]]
+func (m matrix) String() string {
+ rowOut := make([]string, 0, len(m))
+ for _, row := range m {
+ colOut := make([]string, 0, len(row))
+ for _, col := range row {
+ colOut = append(colOut, strconv.Itoa(int(col)))
+ }
+ rowOut = append(rowOut, "["+strings.Join(colOut, ", ")+"]")
+ }
+ return "[" + strings.Join(rowOut, ", ") + "]"
+}
+
+// Multiply multiplies this matrix (the one on the left) by another
+// matrix (the one on the right) and returns a new matrix with the result.
+func (m matrix) Multiply(right matrix) (matrix, error) {
+ if len(m[0]) != len(right) {
+ return nil, fmt.Errorf("columns on left (%d) is different than rows on right (%d)", len(m[0]), len(right))
+ }
+ result, _ := newMatrix(len(m), len(right[0]))
+ for r, row := range result {
+ for c := range row {
+ var value byte
+ for i := range m[0] {
+ value ^= galMultiply(m[r][i], right[i][c])
+ }
+ result[r][c] = value
+ }
+ }
+ return result, nil
+}
+
+// Augment returns the concatenation of this matrix and the matrix on the right.
+func (m matrix) Augment(right matrix) (matrix, error) {
+ if len(m) != len(right) {
+ return nil, errMatrixSize
+ }
+
+ result, _ := newMatrix(len(m), len(m[0])+len(right[0]))
+ for r, row := range m {
+ for c := range row {
+ result[r][c] = m[r][c]
+ }
+ cols := len(m[0])
+ for c := range right[0] {
+ result[r][cols+c] = right[r][c]
+ }
+ }
+ return result, nil
+}
+
+// errMatrixSize is returned if matrix dimensions are doesn't match.
+var errMatrixSize = errors.New("matrix sizes do not match")
+
+func (m matrix) SameSize(n matrix) error {
+ if len(m) != len(n) {
+ return errMatrixSize
+ }
+ for i := range m {
+ if len(m[i]) != len(n[i]) {
+ return errMatrixSize
+ }
+ }
+ return nil
+}
+
+// SubMatrix returns a part of this matrix. Data is copied.
+func (m matrix) SubMatrix(rmin, cmin, rmax, cmax int) (matrix, error) {
+ result, err := newMatrix(rmax-rmin, cmax-cmin)
+ if err != nil {
+ return nil, err
+ }
+ // OPTME: If used heavily, use copy function to copy slice
+ for r := rmin; r < rmax; r++ {
+ for c := cmin; c < cmax; c++ {
+ result[r-rmin][c-cmin] = m[r][c]
+ }
+ }
+ return result, nil
+}
+
+// SwapRows Exchanges two rows in the matrix.
+func (m matrix) SwapRows(r1, r2 int) error {
+ if r1 < 0 || len(m) <= r1 || r2 < 0 || len(m) <= r2 {
+ return errInvalidRowSize
+ }
+ m[r2], m[r1] = m[r1], m[r2]
+ return nil
+}
+
+// IsSquare will return true if the matrix is square
+// and nil if the matrix is square
+func (m matrix) IsSquare() bool {
+ return len(m) == len(m[0])
+}
+
+// errSingular is returned if the matrix is singular and cannot be inversed
+var errSingular = errors.New("matrix is singular")
+
+// errNotSquare is returned if attempting to inverse a non-square matrix.
+var errNotSquare = errors.New("only square matrices can be inverted")
+
+// Invert returns the inverse of this matrix.
+// Returns ErrSingular when the matrix is singular and doesn't have an inverse.
+// The matrix must be square, otherwise ErrNotSquare is returned.
+func (m matrix) Invert() (matrix, error) {
+ if !m.IsSquare() {
+ return nil, errNotSquare
+ }
+
+ size := len(m)
+ work, _ := identityMatrix(size)
+ work, _ = m.Augment(work)
+
+ err := work.gaussianElimination()
+ if err != nil {
+ return nil, err
+ }
+
+ return work.SubMatrix(0, size, size, size*2)
+}
+
+func (m matrix) gaussianElimination() error {
+ rows := len(m)
+ columns := len(m[0])
+ // Clear out the part below the main diagonal and scale the main
+ // diagonal to be 1.
+ for r := 0; r < rows; r++ {
+ // If the element on the diagonal is 0, find a row below
+ // that has a non-zero and swap them.
+ if m[r][r] == 0 {
+ for rowBelow := r + 1; rowBelow < rows; rowBelow++ {
+ if m[rowBelow][r] != 0 {
+ m.SwapRows(r, rowBelow)
+ break
+ }
+ }
+ }
+ // If we couldn't find one, the matrix is singular.
+ if m[r][r] == 0 {
+ return errSingular
+ }
+ // Scale to 1.
+ if m[r][r] != 1 {
+ scale := galDivide(1, m[r][r])
+ for c := 0; c < columns; c++ {
+ m[r][c] = galMultiply(m[r][c], scale)
+ }
+ }
+ // Make everything below the 1 be a 0 by subtracting
+ // a multiple of it. (Subtraction and addition are
+ // both exclusive or in the Galois field.)
+ for rowBelow := r + 1; rowBelow < rows; rowBelow++ {
+ if m[rowBelow][r] != 0 {
+ scale := m[rowBelow][r]
+ for c := 0; c < columns; c++ {
+ m[rowBelow][c] ^= galMultiply(scale, m[r][c])
+ }
+ }
+ }
+ }
+
+ // Now clear the part above the main diagonal.
+ for d := 0; d < rows; d++ {
+ for rowAbove := 0; rowAbove < d; rowAbove++ {
+ if m[rowAbove][d] != 0 {
+ scale := m[rowAbove][d]
+ for c := 0; c < columns; c++ {
+ m[rowAbove][c] ^= galMultiply(scale, m[d][c])
+ }
+
+ }
+ }
+ }
+ return nil
+}
+
+// Create a Vandermonde matrix, which is guaranteed to have the
+// property that any subset of rows that forms a square matrix
+// is invertible.
+func vandermonde(rows, cols int) (matrix, error) {
+ result, err := newMatrix(rows, cols)
+ if err != nil {
+ return nil, err
+ }
+ for r, row := range result {
+ for c := range row {
+ result[r][c] = galExp(byte(r), c)
+ }
+ }
+ return result, nil
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/options.go b/vendor/github.com/klauspost/reedsolomon/options.go
new file mode 100644
index 0000000..b4adc2a
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/options.go
@@ -0,0 +1,175 @@
+package reedsolomon
+
+import (
+ "runtime"
+
+ "github.com/klauspost/cpuid"
+)
+
+// Option allows to override processing parameters.
+type Option func(*options)
+
+type options struct {
+ maxGoroutines int
+ minSplitSize int
+ shardSize int
+ perRound int
+
+ useAVX512, useAVX2, useSSSE3, useSSE2 bool
+ usePAR1Matrix bool
+ useCauchy bool
+ fastOneParity bool
+
+ // stream options
+ concReads bool
+ concWrites bool
+ streamBS int
+}
+
+var defaultOptions = options{
+ maxGoroutines: 384,
+ minSplitSize: -1,
+ fastOneParity: false,
+
+ // Detect CPU capabilities.
+ useSSSE3: cpuid.CPU.SSSE3(),
+ useSSE2: cpuid.CPU.SSE2(),
+ useAVX2: cpuid.CPU.AVX2(),
+ useAVX512: cpuid.CPU.AVX512F() && cpuid.CPU.AVX512BW(),
+}
+
+func init() {
+ if runtime.GOMAXPROCS(0) <= 1 {
+ defaultOptions.maxGoroutines = 1
+ }
+}
+
+// WithMaxGoroutines is the maximum number of goroutines number for encoding & decoding.
+// Jobs will be split into this many parts, unless each goroutine would have to process
+// less than minSplitSize bytes (set with WithMinSplitSize).
+// For the best speed, keep this well above the GOMAXPROCS number for more fine grained
+// scheduling.
+// If n <= 0, it is ignored.
+func WithMaxGoroutines(n int) Option {
+ return func(o *options) {
+ if n > 0 {
+ o.maxGoroutines = n
+ }
+ }
+}
+
+// WithAutoGoroutines will adjust the number of goroutines for optimal speed with a
+// specific shard size.
+// Send in the shard size you expect to send. Other shard sizes will work, but may not
+// run at the optimal speed.
+// Overwrites WithMaxGoroutines.
+// If shardSize <= 0, it is ignored.
+func WithAutoGoroutines(shardSize int) Option {
+ return func(o *options) {
+ o.shardSize = shardSize
+ }
+}
+
+// WithMinSplitSize is the minimum encoding size in bytes per goroutine.
+// By default this parameter is determined by CPU cache characteristics.
+// See WithMaxGoroutines on how jobs are split.
+// If n <= 0, it is ignored.
+func WithMinSplitSize(n int) Option {
+ return func(o *options) {
+ if n > 0 {
+ o.minSplitSize = n
+ }
+ }
+}
+
+// WithConcurrentStreams will enable concurrent reads and writes on the streams.
+// Default: Disabled, meaning only one stream will be read/written at the time.
+// Ignored if not used on a stream input.
+func WithConcurrentStreams(enabled bool) Option {
+ return func(o *options) {
+ o.concReads, o.concWrites = enabled, enabled
+ }
+}
+
+// WithConcurrentStreamReads will enable concurrent reads from the input streams.
+// Default: Disabled, meaning only one stream will be read at the time.
+// Ignored if not used on a stream input.
+func WithConcurrentStreamReads(enabled bool) Option {
+ return func(o *options) {
+ o.concReads = enabled
+ }
+}
+
+// WithConcurrentStreamWrites will enable concurrent writes to the the output streams.
+// Default: Disabled, meaning only one stream will be written at the time.
+// Ignored if not used on a stream input.
+func WithConcurrentStreamWrites(enabled bool) Option {
+ return func(o *options) {
+ o.concWrites = enabled
+ }
+}
+
+// WithStreamBlockSize allows to set a custom block size per round of reads/writes.
+// If not set, any shard size set with WithAutoGoroutines will be used.
+// If WithAutoGoroutines is also unset, 4MB will be used.
+// Ignored if not used on stream.
+func WithStreamBlockSize(n int) Option {
+ return func(o *options) {
+ o.streamBS = n
+ }
+}
+
+func withSSSE3(enabled bool) Option {
+ return func(o *options) {
+ o.useSSSE3 = enabled
+ }
+}
+
+func withAVX2(enabled bool) Option {
+ return func(o *options) {
+ o.useAVX2 = enabled
+ }
+}
+
+func withSSE2(enabled bool) Option {
+ return func(o *options) {
+ o.useSSE2 = enabled
+ }
+}
+
+func withAVX512(enabled bool) Option {
+ return func(o *options) {
+ o.useAVX512 = enabled
+ }
+}
+
+// WithPAR1Matrix causes the encoder to build the matrix how PARv1
+// does. Note that the method they use is buggy, and may lead to cases
+// where recovery is impossible, even if there are enough parity
+// shards.
+func WithPAR1Matrix() Option {
+ return func(o *options) {
+ o.usePAR1Matrix = true
+ o.useCauchy = false
+ }
+}
+
+// WithCauchyMatrix will make the encoder build a Cauchy style matrix.
+// The output of this is not compatible with the standard output.
+// A Cauchy matrix is faster to generate. This does not affect data throughput,
+// but will result in slightly faster start-up time.
+func WithCauchyMatrix() Option {
+ return func(o *options) {
+ o.useCauchy = true
+ o.usePAR1Matrix = false
+ }
+}
+
+// WithFastOneParityMatrix will switch the matrix to a simple xor
+// if there is only one parity shard.
+// The PAR1 matrix already has this property so it has little effect there.
+func WithFastOneParityMatrix() Option {
+ return func(o *options) {
+ o.fastOneParity = true
+ }
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/reedsolomon.go b/vendor/github.com/klauspost/reedsolomon/reedsolomon.go
new file mode 100644
index 0000000..13a35d2
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/reedsolomon.go
@@ -0,0 +1,1011 @@
+/**
+ * Reed-Solomon Coding over 8-bit values.
+ *
+ * Copyright 2015, Klaus Post
+ * Copyright 2015, Backblaze, Inc.
+ */
+
+// Package reedsolomon enables Erasure Coding in Go
+//
+// For usage and examples, see https://github.com/klauspost/reedsolomon
+//
+package reedsolomon
+
+import (
+ "bytes"
+ "errors"
+ "io"
+ "runtime"
+ "sync"
+
+ "github.com/klauspost/cpuid"
+)
+
+// Encoder is an interface to encode Reed-Salomon parity sets for your data.
+type Encoder interface {
+ // Encode parity for a set of data shards.
+ // Input is 'shards' containing data shards followed by parity shards.
+ // The number of shards must match the number given to New().
+ // Each shard is a byte array, and they must all be the same size.
+ // The parity shards will always be overwritten and the data shards
+ // will remain the same, so it is safe for you to read from the
+ // data shards while this is running.
+ Encode(shards [][]byte) error
+
+ // Verify returns true if the parity shards contain correct data.
+ // The data is the same format as Encode. No data is modified, so
+ // you are allowed to read from data while this is running.
+ Verify(shards [][]byte) (bool, error)
+
+ // Reconstruct will recreate the missing shards if possible.
+ //
+ // Given a list of shards, some of which contain data, fills in the
+ // ones that don't have data.
+ //
+ // The length of the array must be equal to the total number of shards.
+ // You indicate that a shard is missing by setting it to nil or zero-length.
+ // If a shard is zero-length but has sufficient capacity, that memory will
+ // be used, otherwise a new []byte will be allocated.
+ //
+ // If there are too few shards to reconstruct the missing
+ // ones, ErrTooFewShards will be returned.
+ //
+ // The reconstructed shard set is complete, but integrity is not verified.
+ // Use the Verify function to check if data set is ok.
+ Reconstruct(shards [][]byte) error
+
+ // ReconstructData will recreate any missing data shards, if possible.
+ //
+ // Given a list of shards, some of which contain data, fills in the
+ // data shards that don't have data.
+ //
+ // The length of the array must be equal to Shards.
+ // You indicate that a shard is missing by setting it to nil or zero-length.
+ // If a shard is zero-length but has sufficient capacity, that memory will
+ // be used, otherwise a new []byte will be allocated.
+ //
+ // If there are too few shards to reconstruct the missing
+ // ones, ErrTooFewShards will be returned.
+ //
+ // As the reconstructed shard set may contain missing parity shards,
+ // calling the Verify function is likely to fail.
+ ReconstructData(shards [][]byte) error
+
+ // Update parity is use for change a few data shards and update it's parity.
+ // Input 'newDatashards' containing data shards changed.
+ // Input 'shards' containing old data shards (if data shard not changed, it can be nil) and old parity shards.
+ // new parity shards will in shards[DataShards:]
+ // Update is very useful if DataShards much larger than ParityShards and changed data shards is few. It will
+ // faster than Encode and not need read all data shards to encode.
+ Update(shards [][]byte, newDatashards [][]byte) error
+
+ // Split a data slice into the number of shards given to the encoder,
+ // and create empty parity shards.
+ //
+ // The data will be split into equally sized shards.
+ // If the data size isn't dividable by the number of shards,
+ // the last shard will contain extra zeros.
+ //
+ // There must be at least 1 byte otherwise ErrShortData will be
+ // returned.
+ //
+ // The data will not be copied, except for the last shard, so you
+ // should not modify the data of the input slice afterwards.
+ Split(data []byte) ([][]byte, error)
+
+ // Join the shards and write the data segment to dst.
+ //
+ // Only the data shards are considered.
+ // You must supply the exact output size you want.
+ // If there are to few shards given, ErrTooFewShards will be returned.
+ // If the total data size is less than outSize, ErrShortData will be returned.
+ Join(dst io.Writer, shards [][]byte, outSize int) error
+}
+
+// reedSolomon contains a matrix for a specific
+// distribution of datashards and parity shards.
+// Construct if using New()
+type reedSolomon struct {
+ DataShards int // Number of data shards, should not be modified.
+ ParityShards int // Number of parity shards, should not be modified.
+ Shards int // Total number of shards. Calculated, and should not be modified.
+ m matrix
+ tree inversionTree
+ parity [][]byte
+ o options
+ mPool sync.Pool
+}
+
+// ErrInvShardNum will be returned by New, if you attempt to create
+// an Encoder where either data or parity shards is zero or less.
+var ErrInvShardNum = errors.New("cannot create Encoder with zero or less data/parity shards")
+
+// ErrMaxShardNum will be returned by New, if you attempt to create an
+// Encoder where data and parity shards are bigger than the order of
+// GF(2^8).
+var ErrMaxShardNum = errors.New("cannot create Encoder with more than 256 data+parity shards")
+
+// buildMatrix creates the matrix to use for encoding, given the
+// number of data shards and the number of total shards.
+//
+// The top square of the matrix is guaranteed to be an identity
+// matrix, which means that the data shards are unchanged after
+// encoding.
+func buildMatrix(dataShards, totalShards int) (matrix, error) {
+ // Start with a Vandermonde matrix. This matrix would work,
+ // in theory, but doesn't have the property that the data
+ // shards are unchanged after encoding.
+ vm, err := vandermonde(totalShards, dataShards)
+ if err != nil {
+ return nil, err
+ }
+
+ // Multiply by the inverse of the top square of the matrix.
+ // This will make the top square be the identity matrix, but
+ // preserve the property that any square subset of rows is
+ // invertible.
+ top, err := vm.SubMatrix(0, 0, dataShards, dataShards)
+ if err != nil {
+ return nil, err
+ }
+
+ topInv, err := top.Invert()
+ if err != nil {
+ return nil, err
+ }
+
+ return vm.Multiply(topInv)
+}
+
+// buildMatrixPAR1 creates the matrix to use for encoding according to
+// the PARv1 spec, given the number of data shards and the number of
+// total shards. Note that the method they use is buggy, and may lead
+// to cases where recovery is impossible, even if there are enough
+// parity shards.
+//
+// The top square of the matrix is guaranteed to be an identity
+// matrix, which means that the data shards are unchanged after
+// encoding.
+func buildMatrixPAR1(dataShards, totalShards int) (matrix, error) {
+ result, err := newMatrix(totalShards, dataShards)
+ if err != nil {
+ return nil, err
+ }
+
+ for r, row := range result {
+ // The top portion of the matrix is the identity
+ // matrix, and the bottom is a transposed Vandermonde
+ // matrix starting at 1 instead of 0.
+ if r < dataShards {
+ result[r][r] = 1
+ } else {
+ for c := range row {
+ result[r][c] = galExp(byte(c+1), r-dataShards)
+ }
+ }
+ }
+ return result, nil
+}
+
+func buildMatrixCauchy(dataShards, totalShards int) (matrix, error) {
+ result, err := newMatrix(totalShards, dataShards)
+ if err != nil {
+ return nil, err
+ }
+
+ for r, row := range result {
+ // The top portion of the matrix is the identity
+ // matrix, and the bottom is a transposed Cauchy matrix.
+ if r < dataShards {
+ result[r][r] = 1
+ } else {
+ for c := range row {
+ result[r][c] = invTable[(byte(r ^ c))]
+ }
+ }
+ }
+ return result, nil
+}
+
+// buildXorMatrix can be used to build a matrix with pure XOR
+// operations if there is only one parity shard.
+func buildXorMatrix(dataShards, totalShards int) (matrix, error) {
+ if dataShards+1 != totalShards {
+ return nil, errors.New("internal error")
+ }
+ result, err := newMatrix(totalShards, dataShards)
+ if err != nil {
+ return nil, err
+ }
+
+ for r, row := range result {
+ // The top portion of the matrix is the identity
+ // matrix.
+ if r < dataShards {
+ result[r][r] = 1
+ } else {
+ // Set all values to 1 (XOR)
+ for c := range row {
+ result[r][c] = 1
+ }
+ }
+ }
+ return result, nil
+}
+
+// New creates a new encoder and initializes it to
+// the number of data shards and parity shards that
+// you want to use. You can reuse this encoder.
+// Note that the maximum number of total shards is 256.
+// If no options are supplied, default options are used.
+func New(dataShards, parityShards int, opts ...Option) (Encoder, error) {
+ r := reedSolomon{
+ DataShards: dataShards,
+ ParityShards: parityShards,
+ Shards: dataShards + parityShards,
+ o: defaultOptions,
+ }
+
+ for _, opt := range opts {
+ opt(&r.o)
+ }
+ if dataShards <= 0 || parityShards <= 0 {
+ return nil, ErrInvShardNum
+ }
+
+ if dataShards+parityShards > 256 {
+ return nil, ErrMaxShardNum
+ }
+
+ var err error
+ switch {
+ case r.o.fastOneParity && parityShards == 1:
+ r.m, err = buildXorMatrix(dataShards, r.Shards)
+ case r.o.useCauchy:
+ r.m, err = buildMatrixCauchy(dataShards, r.Shards)
+ case r.o.usePAR1Matrix:
+ r.m, err = buildMatrixPAR1(dataShards, r.Shards)
+ default:
+ r.m, err = buildMatrix(dataShards, r.Shards)
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ // Calculate what we want per round
+ r.o.perRound = cpuid.CPU.Cache.L2
+ if r.o.perRound <= 0 {
+ // Set to 128K if undetectable.
+ r.o.perRound = 128 << 10
+ }
+
+ if cpuid.CPU.ThreadsPerCore > 1 && r.o.maxGoroutines > cpuid.CPU.PhysicalCores {
+ // If multiple threads per core, make sure they don't contend for cache.
+ r.o.perRound /= cpuid.CPU.ThreadsPerCore
+ }
+ // 1 input + parity must fit in cache, and we add one more to be safer.
+ r.o.perRound = r.o.perRound / (1 + parityShards)
+ // Align to 64 bytes.
+ r.o.perRound = ((r.o.perRound + 63) / 64) * 64
+
+ if r.o.minSplitSize <= 0 {
+ // Set minsplit as high as we can, but still have parity in L1.
+ cacheSize := cpuid.CPU.Cache.L1D
+ if cacheSize <= 0 {
+ cacheSize = 32 << 10
+ }
+
+ r.o.minSplitSize = cacheSize / (parityShards + 1)
+ // Min 1K
+ if r.o.minSplitSize < 1024 {
+ r.o.minSplitSize = 1024
+ }
+ }
+
+ if r.o.perRound < r.o.minSplitSize {
+ r.o.perRound = r.o.minSplitSize
+ }
+
+ if r.o.shardSize > 0 {
+ p := runtime.GOMAXPROCS(0)
+ if p == 1 || r.o.shardSize <= r.o.minSplitSize*2 {
+ // Not worth it.
+ r.o.maxGoroutines = 1
+ } else {
+ g := r.o.shardSize / r.o.perRound
+
+ // Overprovision by a factor of 2.
+ if g < p*2 && r.o.perRound > r.o.minSplitSize*2 {
+ g = p * 2
+ r.o.perRound /= 2
+ }
+
+ // Have g be multiple of p
+ g += p - 1
+ g -= g % p
+
+ r.o.maxGoroutines = g
+ }
+ }
+
+ // Inverted matrices are cached in a tree keyed by the indices
+ // of the invalid rows of the data to reconstruct.
+ // The inversion root node will have the identity matrix as
+ // its inversion matrix because it implies there are no errors
+ // with the original data.
+ r.tree = newInversionTree(dataShards, parityShards)
+
+ r.parity = make([][]byte, parityShards)
+ for i := range r.parity {
+ r.parity[i] = r.m[dataShards+i]
+ }
+
+ if avx2CodeGen && r.o.useAVX2 {
+ r.mPool.New = func() interface{} {
+ return make([]byte, r.Shards*2*32)
+ }
+ }
+ return &r, err
+}
+
+// ErrTooFewShards is returned if too few shards where given to
+// Encode/Verify/Reconstruct/Update. It will also be returned from Reconstruct
+// if there were too few shards to reconstruct the missing data.
+var ErrTooFewShards = errors.New("too few shards given")
+
+// Encodes parity for a set of data shards.
+// An array 'shards' containing data shards followed by parity shards.
+// The number of shards must match the number given to New.
+// Each shard is a byte array, and they must all be the same size.
+// The parity shards will always be overwritten and the data shards
+// will remain the same.
+func (r *reedSolomon) Encode(shards [][]byte) error {
+ if len(shards) != r.Shards {
+ return ErrTooFewShards
+ }
+
+ err := checkShards(shards, false)
+ if err != nil {
+ return err
+ }
+
+ // Get the slice of output buffers.
+ output := shards[r.DataShards:]
+
+ // Do the coding.
+ r.codeSomeShards(r.parity, shards[0:r.DataShards], output, r.ParityShards, len(shards[0]))
+ return nil
+}
+
+// ErrInvalidInput is returned if invalid input parameter of Update.
+var ErrInvalidInput = errors.New("invalid input")
+
+func (r *reedSolomon) Update(shards [][]byte, newDatashards [][]byte) error {
+ if len(shards) != r.Shards {
+ return ErrTooFewShards
+ }
+
+ if len(newDatashards) != r.DataShards {
+ return ErrTooFewShards
+ }
+
+ err := checkShards(shards, true)
+ if err != nil {
+ return err
+ }
+
+ err = checkShards(newDatashards, true)
+ if err != nil {
+ return err
+ }
+
+ for i := range newDatashards {
+ if newDatashards[i] != nil && shards[i] == nil {
+ return ErrInvalidInput
+ }
+ }
+ for _, p := range shards[r.DataShards:] {
+ if p == nil {
+ return ErrInvalidInput
+ }
+ }
+
+ shardSize := shardSize(shards)
+
+ // Get the slice of output buffers.
+ output := shards[r.DataShards:]
+
+ // Do the coding.
+ r.updateParityShards(r.parity, shards[0:r.DataShards], newDatashards[0:r.DataShards], output, r.ParityShards, shardSize)
+ return nil
+}
+
+func (r *reedSolomon) updateParityShards(matrixRows, oldinputs, newinputs, outputs [][]byte, outputCount, byteCount int) {
+ if r.o.maxGoroutines > 1 && byteCount > r.o.minSplitSize {
+ r.updateParityShardsP(matrixRows, oldinputs, newinputs, outputs, outputCount, byteCount)
+ return
+ }
+
+ for c := 0; c < r.DataShards; c++ {
+ in := newinputs[c]
+ if in == nil {
+ continue
+ }
+ oldin := oldinputs[c]
+ // oldinputs data will be change
+ sliceXor(in, oldin, &r.o)
+ for iRow := 0; iRow < outputCount; iRow++ {
+ galMulSliceXor(matrixRows[iRow][c], oldin, outputs[iRow], &r.o)
+ }
+ }
+}
+
+func (r *reedSolomon) updateParityShardsP(matrixRows, oldinputs, newinputs, outputs [][]byte, outputCount, byteCount int) {
+ var wg sync.WaitGroup
+ do := byteCount / r.o.maxGoroutines
+ if do < r.o.minSplitSize {
+ do = r.o.minSplitSize
+ }
+ start := 0
+ for start < byteCount {
+ if start+do > byteCount {
+ do = byteCount - start
+ }
+ wg.Add(1)
+ go func(start, stop int) {
+ for c := 0; c < r.DataShards; c++ {
+ in := newinputs[c]
+ if in == nil {
+ continue
+ }
+ oldin := oldinputs[c]
+ // oldinputs data will be change
+ sliceXor(in[start:stop], oldin[start:stop], &r.o)
+ for iRow := 0; iRow < outputCount; iRow++ {
+ galMulSliceXor(matrixRows[iRow][c], oldin[start:stop], outputs[iRow][start:stop], &r.o)
+ }
+ }
+ wg.Done()
+ }(start, start+do)
+ start += do
+ }
+ wg.Wait()
+}
+
+// Verify returns true if the parity shards contain the right data.
+// The data is the same format as Encode. No data is modified.
+func (r *reedSolomon) Verify(shards [][]byte) (bool, error) {
+ if len(shards) != r.Shards {
+ return false, ErrTooFewShards
+ }
+ err := checkShards(shards, false)
+ if err != nil {
+ return false, err
+ }
+
+ // Slice of buffers being checked.
+ toCheck := shards[r.DataShards:]
+
+ // Do the checking.
+ return r.checkSomeShards(r.parity, shards[0:r.DataShards], toCheck, r.ParityShards, len(shards[0])), nil
+}
+
+// Multiplies a subset of rows from a coding matrix by a full set of
+// input shards to produce some output shards.
+// 'matrixRows' is The rows from the matrix to use.
+// 'inputs' An array of byte arrays, each of which is one input shard.
+// The number of inputs used is determined by the length of each matrix row.
+// outputs Byte arrays where the computed shards are stored.
+// The number of outputs computed, and the
+// number of matrix rows used, is determined by
+// outputCount, which is the number of outputs to compute.
+func (r *reedSolomon) codeSomeShards(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
+ if len(outputs) == 0 {
+ return
+ }
+ switch {
+ case r.o.useAVX512 && r.o.maxGoroutines > 1 && byteCount > r.o.minSplitSize && len(inputs) >= 4 && len(outputs) >= 2:
+ r.codeSomeShardsAvx512P(matrixRows, inputs, outputs, outputCount, byteCount)
+ return
+ case r.o.useAVX512 && len(inputs) >= 4 && len(outputs) >= 2:
+ r.codeSomeShardsAvx512(matrixRows, inputs, outputs, outputCount, byteCount)
+ return
+ case r.o.maxGoroutines > 1 && byteCount > r.o.minSplitSize:
+ r.codeSomeShardsP(matrixRows, inputs, outputs, outputCount, byteCount)
+ return
+ }
+
+ // Process using no goroutines
+ start, end := 0, r.o.perRound
+ if end > len(inputs[0]) {
+ end = len(inputs[0])
+ }
+ if avx2CodeGen && r.o.useAVX2 && byteCount >= 32 && len(inputs) > 1 && len(outputs) > 1 && len(inputs) <= maxAvx2Inputs && len(outputs) <= maxAvx2Outputs {
+ m := genAvx2Matrix(matrixRows, len(inputs), len(outputs), r.mPool.Get().([]byte))
+ start += galMulSlicesAvx2(m, inputs, outputs, 0, byteCount)
+ r.mPool.Put(m)
+ end = len(inputs[0])
+ }
+
+ for start < len(inputs[0]) {
+ for c := 0; c < r.DataShards; c++ {
+ in := inputs[c][start:end]
+ for iRow := 0; iRow < outputCount; iRow++ {
+ if c == 0 {
+ galMulSlice(matrixRows[iRow][c], in, outputs[iRow][start:end], &r.o)
+ } else {
+ galMulSliceXor(matrixRows[iRow][c], in, outputs[iRow][start:end], &r.o)
+ }
+ }
+ }
+ start = end
+ end += r.o.perRound
+ if end > len(inputs[0]) {
+ end = len(inputs[0])
+ }
+ }
+}
+
+// Perform the same as codeSomeShards, but split the workload into
+// several goroutines.
+func (r *reedSolomon) codeSomeShardsP(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
+ var wg sync.WaitGroup
+ do := byteCount / r.o.maxGoroutines
+ if do < r.o.minSplitSize {
+ do = r.o.minSplitSize
+ }
+ // Make sizes divisible by 64
+ do = (do + 63) & (^63)
+ start := 0
+ var avx2Matrix []byte
+ if avx2CodeGen && r.o.useAVX2 && byteCount >= 32 && len(inputs) > 1 && len(outputs) > 1 && len(inputs) <= maxAvx2Inputs && len(outputs) <= maxAvx2Outputs {
+ avx2Matrix = genAvx2Matrix(matrixRows, len(inputs), len(outputs), r.mPool.Get().([]byte))
+ defer r.mPool.Put(avx2Matrix)
+ }
+ for start < byteCount {
+ if start+do > byteCount {
+ do = byteCount - start
+ }
+
+ wg.Add(1)
+ go func(start, stop int) {
+ if avx2CodeGen && r.o.useAVX2 && stop-start >= 32 && len(inputs) > 1 && len(outputs) > 1 && len(inputs) <= maxAvx2Inputs && len(outputs) <= maxAvx2Outputs {
+ start += galMulSlicesAvx2(avx2Matrix, inputs, outputs, start, stop)
+ }
+
+ lstart, lstop := start, start+r.o.perRound
+ if lstop > stop {
+ lstop = stop
+ }
+ for lstart < stop {
+ for c := 0; c < r.DataShards; c++ {
+ in := inputs[c][lstart:lstop]
+ for iRow := 0; iRow < outputCount; iRow++ {
+ if c == 0 {
+ galMulSlice(matrixRows[iRow][c], in, outputs[iRow][lstart:lstop], &r.o)
+ } else {
+ galMulSliceXor(matrixRows[iRow][c], in, outputs[iRow][lstart:lstop], &r.o)
+ }
+ }
+ }
+ lstart = lstop
+ lstop += r.o.perRound
+ if lstop > stop {
+ lstop = stop
+ }
+ }
+ wg.Done()
+ }(start, start+do)
+ start += do
+ }
+ wg.Wait()
+}
+
+// checkSomeShards is mostly the same as codeSomeShards,
+// except this will check values and return
+// as soon as a difference is found.
+func (r *reedSolomon) checkSomeShards(matrixRows, inputs, toCheck [][]byte, outputCount, byteCount int) bool {
+ if r.o.maxGoroutines > 1 && byteCount > r.o.minSplitSize {
+ return r.checkSomeShardsP(matrixRows, inputs, toCheck, outputCount, byteCount)
+ }
+ outputs := make([][]byte, len(toCheck))
+ for i := range outputs {
+ outputs[i] = make([]byte, byteCount)
+ }
+ for c := 0; c < r.DataShards; c++ {
+ in := inputs[c]
+ for iRow := 0; iRow < outputCount; iRow++ {
+ galMulSliceXor(matrixRows[iRow][c], in, outputs[iRow], &r.o)
+ }
+ }
+
+ for i, calc := range outputs {
+ if !bytes.Equal(calc, toCheck[i]) {
+ return false
+ }
+ }
+ return true
+}
+
+func (r *reedSolomon) checkSomeShardsP(matrixRows, inputs, toCheck [][]byte, outputCount, byteCount int) bool {
+ same := true
+ var mu sync.RWMutex // For above
+
+ var wg sync.WaitGroup
+ do := byteCount / r.o.maxGoroutines
+ if do < r.o.minSplitSize {
+ do = r.o.minSplitSize
+ }
+ // Make sizes divisible by 64
+ do = (do + 63) & (^63)
+ start := 0
+ for start < byteCount {
+ if start+do > byteCount {
+ do = byteCount - start
+ }
+ wg.Add(1)
+ go func(start, do int) {
+ defer wg.Done()
+ outputs := make([][]byte, len(toCheck))
+ for i := range outputs {
+ outputs[i] = make([]byte, do)
+ }
+ for c := 0; c < r.DataShards; c++ {
+ mu.RLock()
+ if !same {
+ mu.RUnlock()
+ return
+ }
+ mu.RUnlock()
+ in := inputs[c][start : start+do]
+ for iRow := 0; iRow < outputCount; iRow++ {
+ galMulSliceXor(matrixRows[iRow][c], in, outputs[iRow], &r.o)
+ }
+ }
+
+ for i, calc := range outputs {
+ if !bytes.Equal(calc, toCheck[i][start:start+do]) {
+ mu.Lock()
+ same = false
+ mu.Unlock()
+ return
+ }
+ }
+ }(start, do)
+ start += do
+ }
+ wg.Wait()
+ return same
+}
+
+// ErrShardNoData will be returned if there are no shards,
+// or if the length of all shards is zero.
+var ErrShardNoData = errors.New("no shard data")
+
+// ErrShardSize is returned if shard length isn't the same for all
+// shards.
+var ErrShardSize = errors.New("shard sizes do not match")
+
+// checkShards will check if shards are the same size
+// or 0, if allowed. An error is returned if this fails.
+// An error is also returned if all shards are size 0.
+func checkShards(shards [][]byte, nilok bool) error {
+ size := shardSize(shards)
+ if size == 0 {
+ return ErrShardNoData
+ }
+ for _, shard := range shards {
+ if len(shard) != size {
+ if len(shard) != 0 || !nilok {
+ return ErrShardSize
+ }
+ }
+ }
+ return nil
+}
+
+// shardSize return the size of a single shard.
+// The first non-zero size is returned,
+// or 0 if all shards are size 0.
+func shardSize(shards [][]byte) int {
+ for _, shard := range shards {
+ if len(shard) != 0 {
+ return len(shard)
+ }
+ }
+ return 0
+}
+
+// Reconstruct will recreate the missing shards, if possible.
+//
+// Given a list of shards, some of which contain data, fills in the
+// ones that don't have data.
+//
+// The length of the array must be equal to Shards.
+// You indicate that a shard is missing by setting it to nil or zero-length.
+// If a shard is zero-length but has sufficient capacity, that memory will
+// be used, otherwise a new []byte will be allocated.
+//
+// If there are too few shards to reconstruct the missing
+// ones, ErrTooFewShards will be returned.
+//
+// The reconstructed shard set is complete, but integrity is not verified.
+// Use the Verify function to check if data set is ok.
+func (r *reedSolomon) Reconstruct(shards [][]byte) error {
+ return r.reconstruct(shards, false)
+}
+
+// ReconstructData will recreate any missing data shards, if possible.
+//
+// Given a list of shards, some of which contain data, fills in the
+// data shards that don't have data.
+//
+// The length of the array must be equal to Shards.
+// You indicate that a shard is missing by setting it to nil or zero-length.
+// If a shard is zero-length but has sufficient capacity, that memory will
+// be used, otherwise a new []byte will be allocated.
+//
+// If there are too few shards to reconstruct the missing
+// ones, ErrTooFewShards will be returned.
+//
+// As the reconstructed shard set may contain missing parity shards,
+// calling the Verify function is likely to fail.
+func (r *reedSolomon) ReconstructData(shards [][]byte) error {
+ return r.reconstruct(shards, true)
+}
+
+// reconstruct will recreate the missing data shards, and unless
+// dataOnly is true, also the missing parity shards
+//
+// The length of the array must be equal to Shards.
+// You indicate that a shard is missing by setting it to nil.
+//
+// If there are too few shards to reconstruct the missing
+// ones, ErrTooFewShards will be returned.
+func (r *reedSolomon) reconstruct(shards [][]byte, dataOnly bool) error {
+ if len(shards) != r.Shards {
+ return ErrTooFewShards
+ }
+ // Check arguments.
+ err := checkShards(shards, true)
+ if err != nil {
+ return err
+ }
+
+ shardSize := shardSize(shards)
+
+ // Quick check: are all of the shards present? If so, there's
+ // nothing to do.
+ numberPresent := 0
+ dataPresent := 0
+ for i := 0; i < r.Shards; i++ {
+ if len(shards[i]) != 0 {
+ numberPresent++
+ if i < r.DataShards {
+ dataPresent++
+ }
+ }
+ }
+ if numberPresent == r.Shards || dataOnly && dataPresent == r.DataShards {
+ // Cool. All of the shards data data. We don't
+ // need to do anything.
+ return nil
+ }
+
+ // More complete sanity check
+ if numberPresent < r.DataShards {
+ return ErrTooFewShards
+ }
+
+ // Pull out an array holding just the shards that
+ // correspond to the rows of the submatrix. These shards
+ // will be the input to the decoding process that re-creates
+ // the missing data shards.
+ //
+ // Also, create an array of indices of the valid rows we do have
+ // and the invalid rows we don't have up until we have enough valid rows.
+ subShards := make([][]byte, r.DataShards)
+ validIndices := make([]int, r.DataShards)
+ invalidIndices := make([]int, 0)
+ subMatrixRow := 0
+ for matrixRow := 0; matrixRow < r.Shards && subMatrixRow < r.DataShards; matrixRow++ {
+ if len(shards[matrixRow]) != 0 {
+ subShards[subMatrixRow] = shards[matrixRow]
+ validIndices[subMatrixRow] = matrixRow
+ subMatrixRow++
+ } else {
+ invalidIndices = append(invalidIndices, matrixRow)
+ }
+ }
+
+ // Attempt to get the cached inverted matrix out of the tree
+ // based on the indices of the invalid rows.
+ dataDecodeMatrix := r.tree.GetInvertedMatrix(invalidIndices)
+
+ // If the inverted matrix isn't cached in the tree yet we must
+ // construct it ourselves and insert it into the tree for the
+ // future. In this way the inversion tree is lazily loaded.
+ if dataDecodeMatrix == nil {
+ // Pull out the rows of the matrix that correspond to the
+ // shards that we have and build a square matrix. This
+ // matrix could be used to generate the shards that we have
+ // from the original data.
+ subMatrix, _ := newMatrix(r.DataShards, r.DataShards)
+ for subMatrixRow, validIndex := range validIndices {
+ for c := 0; c < r.DataShards; c++ {
+ subMatrix[subMatrixRow][c] = r.m[validIndex][c]
+ }
+ }
+ // Invert the matrix, so we can go from the encoded shards
+ // back to the original data. Then pull out the row that
+ // generates the shard that we want to decode. Note that
+ // since this matrix maps back to the original data, it can
+ // be used to create a data shard, but not a parity shard.
+ dataDecodeMatrix, err = subMatrix.Invert()
+ if err != nil {
+ return err
+ }
+
+ // Cache the inverted matrix in the tree for future use keyed on the
+ // indices of the invalid rows.
+ err = r.tree.InsertInvertedMatrix(invalidIndices, dataDecodeMatrix, r.Shards)
+ if err != nil {
+ return err
+ }
+ }
+
+ // Re-create any data shards that were missing.
+ //
+ // The input to the coding is all of the shards we actually
+ // have, and the output is the missing data shards. The computation
+ // is done using the special decode matrix we just built.
+ outputs := make([][]byte, r.ParityShards)
+ matrixRows := make([][]byte, r.ParityShards)
+ outputCount := 0
+
+ for iShard := 0; iShard < r.DataShards; iShard++ {
+ if len(shards[iShard]) == 0 {
+ if cap(shards[iShard]) >= shardSize {
+ shards[iShard] = shards[iShard][0:shardSize]
+ } else {
+ shards[iShard] = make([]byte, shardSize)
+ }
+ outputs[outputCount] = shards[iShard]
+ matrixRows[outputCount] = dataDecodeMatrix[iShard]
+ outputCount++
+ }
+ }
+ r.codeSomeShards(matrixRows, subShards, outputs[:outputCount], outputCount, shardSize)
+
+ if dataOnly {
+ // Exit out early if we are only interested in the data shards
+ return nil
+ }
+
+ // Now that we have all of the data shards intact, we can
+ // compute any of the parity that is missing.
+ //
+ // The input to the coding is ALL of the data shards, including
+ // any that we just calculated. The output is whichever of the
+ // data shards were missing.
+ outputCount = 0
+ for iShard := r.DataShards; iShard < r.Shards; iShard++ {
+ if len(shards[iShard]) == 0 {
+ if cap(shards[iShard]) >= shardSize {
+ shards[iShard] = shards[iShard][0:shardSize]
+ } else {
+ shards[iShard] = make([]byte, shardSize)
+ }
+ outputs[outputCount] = shards[iShard]
+ matrixRows[outputCount] = r.parity[iShard-r.DataShards]
+ outputCount++
+ }
+ }
+ r.codeSomeShards(matrixRows, shards[:r.DataShards], outputs[:outputCount], outputCount, shardSize)
+ return nil
+}
+
+// ErrShortData will be returned by Split(), if there isn't enough data
+// to fill the number of shards.
+var ErrShortData = errors.New("not enough data to fill the number of requested shards")
+
+// Split a data slice into the number of shards given to the encoder,
+// and create empty parity shards if necessary.
+//
+// The data will be split into equally sized shards.
+// If the data size isn't divisible by the number of shards,
+// the last shard will contain extra zeros.
+//
+// There must be at least 1 byte otherwise ErrShortData will be
+// returned.
+//
+// The data will not be copied, except for the last shard, so you
+// should not modify the data of the input slice afterwards.
+func (r *reedSolomon) Split(data []byte) ([][]byte, error) {
+ if len(data) == 0 {
+ return nil, ErrShortData
+ }
+ // Calculate number of bytes per data shard.
+ perShard := (len(data) + r.DataShards - 1) / r.DataShards
+
+ if cap(data) > len(data) {
+ data = data[:cap(data)]
+ }
+
+ // Only allocate memory if necessary
+ var padding []byte
+ if len(data) < (r.Shards * perShard) {
+ // calculate maximum number of full shards in `data` slice
+ fullShards := len(data) / perShard
+ padding = make([]byte, r.Shards*perShard-perShard*fullShards)
+ copy(padding, data[perShard*fullShards:])
+ data = data[0 : perShard*fullShards]
+ }
+
+ // Split into equal-length shards.
+ dst := make([][]byte, r.Shards)
+ i := 0
+ for ; i < len(dst) && len(data) >= perShard; i++ {
+ dst[i] = data[:perShard:perShard]
+ data = data[perShard:]
+ }
+
+ for j := 0; i+j < len(dst); j++ {
+ dst[i+j] = padding[:perShard:perShard]
+ padding = padding[perShard:]
+ }
+
+ return dst, nil
+}
+
+// ErrReconstructRequired is returned if too few data shards are intact and a
+// reconstruction is required before you can successfully join the shards.
+var ErrReconstructRequired = errors.New("reconstruction required as one or more required data shards are nil")
+
+// Join the shards and write the data segment to dst.
+//
+// Only the data shards are considered.
+// You must supply the exact output size you want.
+//
+// If there are to few shards given, ErrTooFewShards will be returned.
+// If the total data size is less than outSize, ErrShortData will be returned.
+// If one or more required data shards are nil, ErrReconstructRequired will be returned.
+func (r *reedSolomon) Join(dst io.Writer, shards [][]byte, outSize int) error {
+ // Do we have enough shards?
+ if len(shards) < r.DataShards {
+ return ErrTooFewShards
+ }
+ shards = shards[:r.DataShards]
+
+ // Do we have enough data?
+ size := 0
+ for _, shard := range shards {
+ if shard == nil {
+ return ErrReconstructRequired
+ }
+ size += len(shard)
+
+ // Do we have enough data already?
+ if size >= outSize {
+ break
+ }
+ }
+ if size < outSize {
+ return ErrShortData
+ }
+
+ // Copy data to dst
+ write := outSize
+ for _, shard := range shards {
+ if write < len(shard) {
+ _, err := dst.Write(shard[:write])
+ return err
+ }
+ n, err := dst.Write(shard)
+ if err != nil {
+ return err
+ }
+ write -= n
+ }
+ return nil
+}
diff --git a/vendor/github.com/klauspost/reedsolomon/streaming.go b/vendor/github.com/klauspost/reedsolomon/streaming.go
new file mode 100644
index 0000000..d048ba0
--- /dev/null
+++ b/vendor/github.com/klauspost/reedsolomon/streaming.go
@@ -0,0 +1,603 @@
+/**
+ * Reed-Solomon Coding over 8-bit values.
+ *
+ * Copyright 2015, Klaus Post
+ * Copyright 2015, Backblaze, Inc.
+ */
+
+package reedsolomon
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "io"
+ "sync"
+)
+
+// StreamEncoder is an interface to encode Reed-Salomon parity sets for your data.
+// It provides a fully streaming interface, and processes data in blocks of up to 4MB.
+//
+// For small shard sizes, 10MB and below, it is recommended to use the in-memory interface,
+// since the streaming interface has a start up overhead.
+//
+// For all operations, no readers and writers should not assume any order/size of
+// individual reads/writes.
+//
+// For usage examples, see "stream-encoder.go" and "streamdecoder.go" in the examples
+// folder.
+type StreamEncoder interface {
+ // Encode parity shards for a set of data shards.
+ //
+ // Input is 'shards' containing readers for data shards followed by parity shards
+ // io.Writer.
+ //
+ // The number of shards must match the number given to NewStream().
+ //
+ // Each reader must supply the same number of bytes.
+ //
+ // The parity shards will be written to the writer.
+ // The number of bytes written will match the input size.
+ //
+ // If a data stream returns an error, a StreamReadError type error
+ // will be returned. If a parity writer returns an error, a
+ // StreamWriteError will be returned.
+ Encode(data []io.Reader, parity []io.Writer) error
+
+ // Verify returns true if the parity shards contain correct data.
+ //
+ // The number of shards must match the number total data+parity shards
+ // given to NewStream().
+ //
+ // Each reader must supply the same number of bytes.
+ // If a shard stream returns an error, a StreamReadError type error
+ // will be returned.
+ Verify(shards []io.Reader) (bool, error)
+
+ // Reconstruct will recreate the missing shards if possible.
+ //
+ // Given a list of valid shards (to read) and invalid shards (to write)
+ //
+ // You indicate that a shard is missing by setting it to nil in the 'valid'
+ // slice and at the same time setting a non-nil writer in "fill".
+ // An index cannot contain both non-nil 'valid' and 'fill' entry.
+ // If both are provided 'ErrReconstructMismatch' is returned.
+ //
+ // If there are too few shards to reconstruct the missing
+ // ones, ErrTooFewShards will be returned.
+ //
+ // The reconstructed shard set is complete, but integrity is not verified.
+ // Use the Verify function to check if data set is ok.
+ Reconstruct(valid []io.Reader, fill []io.Writer) error
+
+ // Split a an input stream into the number of shards given to the encoder.
+ //
+ // The data will be split into equally sized shards.
+ // If the data size isn't dividable by the number of shards,
+ // the last shard will contain extra zeros.
+ //
+ // You must supply the total size of your input.
+ // 'ErrShortData' will be returned if it is unable to retrieve the
+ // number of bytes indicated.
+ Split(data io.Reader, dst []io.Writer, size int64) (err error)
+
+ // Join the shards and write the data segment to dst.
+ //
+ // Only the data shards are considered.
+ //
+ // You must supply the exact output size you want.
+ // If there are to few shards given, ErrTooFewShards will be returned.
+ // If the total data size is less than outSize, ErrShortData will be returned.
+ Join(dst io.Writer, shards []io.Reader, outSize int64) error
+}
+
+// StreamReadError is returned when a read error is encountered
+// that relates to a supplied stream.
+// This will allow you to find out which reader has failed.
+type StreamReadError struct {
+ Err error // The error
+ Stream int // The stream number on which the error occurred
+}
+
+// Error returns the error as a string
+func (s StreamReadError) Error() string {
+ return fmt.Sprintf("error reading stream %d: %s", s.Stream, s.Err)
+}
+
+// String returns the error as a string
+func (s StreamReadError) String() string {
+ return s.Error()
+}
+
+// StreamWriteError is returned when a write error is encountered
+// that relates to a supplied stream. This will allow you to
+// find out which reader has failed.
+type StreamWriteError struct {
+ Err error // The error
+ Stream int // The stream number on which the error occurred
+}
+
+// Error returns the error as a string
+func (s StreamWriteError) Error() string {
+ return fmt.Sprintf("error writing stream %d: %s", s.Stream, s.Err)
+}
+
+// String returns the error as a string
+func (s StreamWriteError) String() string {
+ return s.Error()
+}
+
+// rsStream contains a matrix for a specific
+// distribution of datashards and parity shards.
+// Construct if using NewStream()
+type rsStream struct {
+ r *reedSolomon
+ o options
+
+ // Shard reader
+ readShards func(dst [][]byte, in []io.Reader) error
+ // Shard writer
+ writeShards func(out []io.Writer, in [][]byte) error
+
+ blockPool sync.Pool
+}
+
+// NewStream creates a new encoder and initializes it to
+// the number of data shards and parity shards that
+// you want to use. You can reuse this encoder.
+// Note that the maximum number of data shards is 256.
+func NewStream(dataShards, parityShards int, o ...Option) (StreamEncoder, error) {
+ r := rsStream{o: defaultOptions}
+ for _, opt := range o {
+ opt(&r.o)
+ }
+ // Override block size if shard size is set.
+ if r.o.streamBS == 0 && r.o.shardSize > 0 {
+ r.o.streamBS = r.o.shardSize
+ }
+ if r.o.streamBS <= 0 {
+ r.o.streamBS = 4 << 20
+ }
+ if r.o.shardSize == 0 && r.o.maxGoroutines == defaultOptions.maxGoroutines {
+ o = append(o, WithAutoGoroutines(r.o.streamBS))
+ }
+
+ enc, err := New(dataShards, parityShards, o...)
+ if err != nil {
+ return nil, err
+ }
+ r.r = enc.(*reedSolomon)
+
+ r.blockPool.New = func() interface{} {
+ out := make([][]byte, dataShards+parityShards)
+ for i := range out {
+ out[i] = make([]byte, r.o.streamBS)
+ }
+ return out
+ }
+ r.readShards = readShards
+ r.writeShards = writeShards
+ if r.o.concReads {
+ r.readShards = cReadShards
+ }
+ if r.o.concWrites {
+ r.writeShards = cWriteShards
+ }
+
+ return &r, err
+}
+
+// NewStreamC creates a new encoder and initializes it to
+// the number of data shards and parity shards given.
+//
+// This functions as 'NewStream', but allows you to enable CONCURRENT reads and writes.
+func NewStreamC(dataShards, parityShards int, conReads, conWrites bool, o ...Option) (StreamEncoder, error) {
+ return NewStream(dataShards, parityShards, append(o, WithConcurrentStreamReads(conReads), WithConcurrentStreamWrites(conWrites))...)
+}
+
+func (r *rsStream) createSlice() [][]byte {
+ out := r.blockPool.Get().([][]byte)
+ for i := range out {
+ out[i] = out[i][:r.o.streamBS]
+ }
+ return out
+}
+
+// Encodes parity shards for a set of data shards.
+//
+// Input is 'shards' containing readers for data shards followed by parity shards
+// io.Writer.
+//
+// The number of shards must match the number given to NewStream().
+//
+// Each reader must supply the same number of bytes.
+//
+// The parity shards will be written to the writer.
+// The number of bytes written will match the input size.
+//
+// If a data stream returns an error, a StreamReadError type error
+// will be returned. If a parity writer returns an error, a
+// StreamWriteError will be returned.
+func (r *rsStream) Encode(data []io.Reader, parity []io.Writer) error {
+ if len(data) != r.r.DataShards {
+ return ErrTooFewShards
+ }
+
+ if len(parity) != r.r.ParityShards {
+ return ErrTooFewShards
+ }
+
+ all := r.createSlice()
+ defer r.blockPool.Put(all)
+ in := all[:r.r.DataShards]
+ out := all[r.r.DataShards:]
+ read := 0
+
+ for {
+ err := r.readShards(in, data)
+ switch err {
+ case nil:
+ case io.EOF:
+ if read == 0 {
+ return ErrShardNoData
+ }
+ return nil
+ default:
+ return err
+ }
+ out = trimShards(out, shardSize(in))
+ read += shardSize(in)
+ err = r.r.Encode(all)
+ if err != nil {
+ return err
+ }
+ err = r.writeShards(parity, out)
+ if err != nil {
+ return err
+ }
+ }
+}
+
+// Trim the shards so they are all the same size
+func trimShards(in [][]byte, size int) [][]byte {
+ for i := range in {
+ if len(in[i]) != 0 {
+ in[i] = in[i][0:size]
+ }
+ if len(in[i]) < size {
+ in[i] = in[i][:0]
+ }
+ }
+ return in
+}
+
+func readShards(dst [][]byte, in []io.Reader) error {
+ if len(in) != len(dst) {
+ panic("internal error: in and dst size do not match")
+ }
+ size := -1
+ for i := range in {
+ if in[i] == nil {
+ dst[i] = dst[i][:0]
+ continue
+ }
+ n, err := io.ReadFull(in[i], dst[i])
+ // The error is EOF only if no bytes were read.
+ // If an EOF happens after reading some but not all the bytes,
+ // ReadFull returns ErrUnexpectedEOF.
+ switch err {
+ case io.ErrUnexpectedEOF, io.EOF:
+ if size < 0 {
+ size = n
+ } else if n != size {
+ // Shard sizes must match.
+ return ErrShardSize
+ }
+ dst[i] = dst[i][0:n]
+ case nil:
+ continue
+ default:
+ return StreamReadError{Err: err, Stream: i}
+ }
+ }
+ if size == 0 {
+ return io.EOF
+ }
+ return nil
+}
+
+func writeShards(out []io.Writer, in [][]byte) error {
+ if len(out) != len(in) {
+ panic("internal error: in and out size do not match")
+ }
+ for i := range in {
+ if out[i] == nil {
+ continue
+ }
+ n, err := out[i].Write(in[i])
+ if err != nil {
+ return StreamWriteError{Err: err, Stream: i}
+ }
+ //
+ if n != len(in[i]) {
+ return StreamWriteError{Err: io.ErrShortWrite, Stream: i}
+ }
+ }
+ return nil
+}
+
+type readResult struct {
+ n int
+ size int
+ err error
+}
+
+// cReadShards reads shards concurrently
+func cReadShards(dst [][]byte, in []io.Reader) error {
+ if len(in) != len(dst) {
+ panic("internal error: in and dst size do not match")
+ }
+ var wg sync.WaitGroup
+ wg.Add(len(in))
+ res := make(chan readResult, len(in))
+ for i := range in {
+ if in[i] == nil {
+ dst[i] = dst[i][:0]
+ wg.Done()
+ continue
+ }
+ go func(i int) {
+ defer wg.Done()
+ n, err := io.ReadFull(in[i], dst[i])
+ // The error is EOF only if no bytes were read.
+ // If an EOF happens after reading some but not all the bytes,
+ // ReadFull returns ErrUnexpectedEOF.
+ res <- readResult{size: n, err: err, n: i}
+
+ }(i)
+ }
+ wg.Wait()
+ close(res)
+ size := -1
+ for r := range res {
+ switch r.err {
+ case io.ErrUnexpectedEOF, io.EOF:
+ if size < 0 {
+ size = r.size
+ } else if r.size != size {
+ // Shard sizes must match.
+ return ErrShardSize
+ }
+ dst[r.n] = dst[r.n][0:r.size]
+ case nil:
+ default:
+ return StreamReadError{Err: r.err, Stream: r.n}
+ }
+ }
+ if size == 0 {
+ return io.EOF
+ }
+ return nil
+}
+
+// cWriteShards writes shards concurrently
+func cWriteShards(out []io.Writer, in [][]byte) error {
+ if len(out) != len(in) {
+ panic("internal error: in and out size do not match")
+ }
+ var errs = make(chan error, len(out))
+ var wg sync.WaitGroup
+ wg.Add(len(out))
+ for i := range in {
+ go func(i int) {
+ defer wg.Done()
+ if out[i] == nil {
+ errs <- nil
+ return
+ }
+ n, err := out[i].Write(in[i])
+ if err != nil {
+ errs <- StreamWriteError{Err: err, Stream: i}
+ return
+ }
+ if n != len(in[i]) {
+ errs <- StreamWriteError{Err: io.ErrShortWrite, Stream: i}
+ }
+ }(i)
+ }
+ wg.Wait()
+ close(errs)
+ for err := range errs {
+ if err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+// Verify returns true if the parity shards contain correct data.
+//
+// The number of shards must match the number total data+parity shards
+// given to NewStream().
+//
+// Each reader must supply the same number of bytes.
+// If a shard stream returns an error, a StreamReadError type error
+// will be returned.
+func (r *rsStream) Verify(shards []io.Reader) (bool, error) {
+ if len(shards) != r.r.Shards {
+ return false, ErrTooFewShards
+ }
+
+ read := 0
+ all := r.createSlice()
+ defer r.blockPool.Put(all)
+ for {
+ err := r.readShards(all, shards)
+ if err == io.EOF {
+ if read == 0 {
+ return false, ErrShardNoData
+ }
+ return true, nil
+ }
+ if err != nil {
+ return false, err
+ }
+ read += shardSize(all)
+ ok, err := r.r.Verify(all)
+ if !ok || err != nil {
+ return ok, err
+ }
+ }
+}
+
+// ErrReconstructMismatch is returned by the StreamEncoder, if you supply
+// "valid" and "fill" streams on the same index.
+// Therefore it is impossible to see if you consider the shard valid
+// or would like to have it reconstructed.
+var ErrReconstructMismatch = errors.New("valid shards and fill shards are mutually exclusive")
+
+// Reconstruct will recreate the missing shards if possible.
+//
+// Given a list of valid shards (to read) and invalid shards (to write)
+//
+// You indicate that a shard is missing by setting it to nil in the 'valid'
+// slice and at the same time setting a non-nil writer in "fill".
+// An index cannot contain both non-nil 'valid' and 'fill' entry.
+//
+// If there are too few shards to reconstruct the missing
+// ones, ErrTooFewShards will be returned.
+//
+// The reconstructed shard set is complete when explicitly asked for all missing shards.
+// However its integrity is not automatically verified.
+// Use the Verify function to check in case the data set is complete.
+func (r *rsStream) Reconstruct(valid []io.Reader, fill []io.Writer) error {
+ if len(valid) != r.r.Shards {
+ return ErrTooFewShards
+ }
+ if len(fill) != r.r.Shards {
+ return ErrTooFewShards
+ }
+
+ all := r.createSlice()
+ defer r.blockPool.Put(all)
+ reconDataOnly := true
+ for i := range valid {
+ if valid[i] != nil && fill[i] != nil {
+ return ErrReconstructMismatch
+ }
+ if i >= r.r.DataShards && fill[i] != nil {
+ reconDataOnly = false
+ }
+ }
+
+ read := 0
+ for {
+ err := r.readShards(all, valid)
+ if err == io.EOF {
+ if read == 0 {
+ return ErrShardNoData
+ }
+ return nil
+ }
+ if err != nil {
+ return err
+ }
+ read += shardSize(all)
+ all = trimShards(all, shardSize(all))
+
+ if reconDataOnly {
+ err = r.r.ReconstructData(all) // just reconstruct missing data shards
+ } else {
+ err = r.r.Reconstruct(all) // reconstruct all missing shards
+ }
+ if err != nil {
+ return err
+ }
+ err = r.writeShards(fill, all)
+ if err != nil {
+ return err
+ }
+ }
+}
+
+// Join the shards and write the data segment to dst.
+//
+// Only the data shards are considered.
+//
+// You must supply the exact output size you want.
+// If there are to few shards given, ErrTooFewShards will be returned.
+// If the total data size is less than outSize, ErrShortData will be returned.
+func (r *rsStream) Join(dst io.Writer, shards []io.Reader, outSize int64) error {
+ // Do we have enough shards?
+ if len(shards) < r.r.DataShards {
+ return ErrTooFewShards
+ }
+
+ // Trim off parity shards if any
+ shards = shards[:r.r.DataShards]
+ for i := range shards {
+ if shards[i] == nil {
+ return StreamReadError{Err: ErrShardNoData, Stream: i}
+ }
+ }
+ // Join all shards
+ src := io.MultiReader(shards...)
+
+ // Copy data to dst
+ n, err := io.CopyN(dst, src, outSize)
+ if err == io.EOF {
+ return ErrShortData
+ }
+ if err != nil {
+ return err
+ }
+ if n != outSize {
+ return ErrShortData
+ }
+ return nil
+}
+
+// Split a an input stream into the number of shards given to the encoder.
+//
+// The data will be split into equally sized shards.
+// If the data size isn't dividable by the number of shards,
+// the last shard will contain extra zeros.
+//
+// You must supply the total size of your input.
+// 'ErrShortData' will be returned if it is unable to retrieve the
+// number of bytes indicated.
+func (r *rsStream) Split(data io.Reader, dst []io.Writer, size int64) error {
+ if size == 0 {
+ return ErrShortData
+ }
+ if len(dst) != r.r.DataShards {
+ return ErrInvShardNum
+ }
+
+ for i := range dst {
+ if dst[i] == nil {
+ return StreamWriteError{Err: ErrShardNoData, Stream: i}
+ }
+ }
+
+ // Calculate number of bytes per shard.
+ perShard := (size + int64(r.r.DataShards) - 1) / int64(r.r.DataShards)
+
+ // Pad data to r.Shards*perShard.
+ padding := make([]byte, (int64(r.r.Shards)*perShard)-size)
+ data = io.MultiReader(data, bytes.NewBuffer(padding))
+
+ // Split into equal-length shards and copy.
+ for i := range dst {
+ n, err := io.CopyN(dst[i], data, perShard)
+ if err != io.EOF && err != nil {
+ return err
+ }
+ if n != perShard {
+ return ErrShortData
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/mmcloughlin/avo/LICENSE b/vendor/github.com/mmcloughlin/avo/LICENSE
new file mode 100644
index 0000000..c986d80
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2018, Michael McLoughlin
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/mmcloughlin/avo/attr/attr.go b/vendor/github.com/mmcloughlin/avo/attr/attr.go
new file mode 100644
index 0000000..016e0a4
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/attr/attr.go
@@ -0,0 +1,102 @@
+// Package attr provides attributes for text and data sections.
+package attr
+
+import (
+ "fmt"
+ "math/bits"
+ "strings"
+)
+
+// Attribute represents TEXT or DATA flags.
+type Attribute uint16
+
+// Reference: https://github.com/golang/go/blob/aafe257390cc9048e8b5df898fabd79a9e0d4c39/src/runtime/textflag.h#L11-L37
+//
+// // Don't profile the marked routine. This flag is deprecated.
+// #define NOPROF 1
+// // It is ok for the linker to get multiple of these symbols. It will
+// // pick one of the duplicates to use.
+// #define DUPOK 2
+// // Don't insert stack check preamble.
+// #define NOSPLIT 4
+// // Put this data in a read-only section.
+// #define RODATA 8
+// // This data contains no pointers.
+// #define NOPTR 16
+// // This is a wrapper function and should not count as disabling 'recover'.
+// #define WRAPPER 32
+// // This function uses its incoming context register.
+// #define NEEDCTXT 64
+// // Allocate a word of thread local storage and store the offset from the
+// // thread local base to the thread local storage in this variable.
+// #define TLSBSS 256
+// // Do not insert instructions to allocate a stack frame for this function.
+// // Only valid on functions that declare a frame size of 0.
+// // TODO(mwhudson): only implemented for ppc64x at present.
+// #define NOFRAME 512
+// // Function can call reflect.Type.Method or reflect.Type.MethodByName.
+// #define REFLECTMETHOD 1024
+// // Function is the top of the call stack. Call stack unwinders should stop
+// // at this function.
+// #define TOPFRAME 2048
+//
+const (
+ NOPROF Attribute = 1 << iota
+ DUPOK
+ NOSPLIT
+ RODATA
+ NOPTR
+ WRAPPER
+ NEEDCTXT
+ _
+ TLSBSS
+ NOFRAME
+ REFLECTMETHOD
+ TOPFRAME
+)
+
+// Asm returns a representation of the attributes in assembly syntax. This may use macros from "textflags.h"; see ContainsTextFlags() to determine if this header is required.
+func (a Attribute) Asm() string {
+ parts, rest := a.split()
+ if len(parts) == 0 || rest != 0 {
+ parts = append(parts, fmt.Sprintf("%d", rest))
+ }
+ return strings.Join(parts, "|")
+}
+
+// ContainsTextFlags returns whether the Asm() representation requires macros in "textflags.h".
+func (a Attribute) ContainsTextFlags() bool {
+ flags, _ := a.split()
+ return len(flags) > 0
+}
+
+// split splits a into known flags and any remaining bits.
+func (a Attribute) split() ([]string, Attribute) {
+ var flags []string
+ var rest Attribute
+ for a != 0 {
+ i := uint(bits.TrailingZeros16(uint16(a)))
+ bit := Attribute(1) << i
+ if flag := attrname[bit]; flag != "" {
+ flags = append(flags, flag)
+ } else {
+ rest |= bit
+ }
+ a ^= bit
+ }
+ return flags, rest
+}
+
+var attrname = map[Attribute]string{
+ NOPROF: "NOPROF",
+ DUPOK: "DUPOK",
+ NOSPLIT: "NOSPLIT",
+ RODATA: "RODATA",
+ NOPTR: "NOPTR",
+ WRAPPER: "WRAPPER",
+ NEEDCTXT: "NEEDCTXT",
+ TLSBSS: "TLSBSS",
+ NOFRAME: "NOFRAME",
+ REFLECTMETHOD: "REFLECTMETHOD",
+ TOPFRAME: "TOPFRAME",
+}
diff --git a/vendor/github.com/mmcloughlin/avo/buildtags/buildtags.go b/vendor/github.com/mmcloughlin/avo/buildtags/buildtags.go
new file mode 100644
index 0000000..8fd61e1
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/buildtags/buildtags.go
@@ -0,0 +1,312 @@
+// Package buildtags provides types for representing and manipulating build constraints.
+//
+// In Go, build constraints are represented as comments in source code together with file naming conventions. For example
+//
+// // +build linux,386 darwin,!cgo
+// // +build !purego
+//
+// Any terms provided in the filename can be thought of as an implicit extra
+// constraint comment line. Collectively, these are referred to as
+// ``constraints''. Each line is a ``constraint''. Within each constraint the
+// space-separated terms are ``options'', and within that the comma-separated
+// items are ``terms'' which may be negated with at most one exclaimation mark.
+//
+// These represent a boolean formulae. The constraints are evaluated as the AND
+// of constraint lines; a constraint is evaluated as the OR of its options and
+// an option is evaluated as the AND of its terms. Overall build constraints are
+// a boolean formula that is an AND of ORs of ANDs.
+//
+// This level of complexity is rarely used in Go programs. Therefore this
+// package aims to provide access to all these layers of nesting if required,
+// but make it easy to forget about for basic use cases too.
+package buildtags
+
+import (
+ "errors"
+ "fmt"
+ "strings"
+ "unicode"
+)
+
+// Reference: https://github.com/golang/go/blob/204a8f55dc2e0ac8d27a781dab0da609b98560da/src/go/build/doc.go#L73-L92
+//
+// // A build constraint is evaluated as the OR of space-separated options;
+// // each option evaluates as the AND of its comma-separated terms;
+// // and each term is an alphanumeric word or, preceded by !, its negation.
+// // That is, the build constraint:
+// //
+// // // +build linux,386 darwin,!cgo
+// //
+// // corresponds to the boolean formula:
+// //
+// // (linux AND 386) OR (darwin AND (NOT cgo))
+// //
+// // A file may have multiple build constraints. The overall constraint is the AND
+// // of the individual constraints. That is, the build constraints:
+// //
+// // // +build linux darwin
+// // // +build 386
+// //
+// // corresponds to the boolean formula:
+// //
+// // (linux OR darwin) AND 386
+//
+
+// Interface represents a build constraint.
+type Interface interface {
+ ConstraintsConvertable
+ fmt.GoStringer
+ Evaluate(v map[string]bool) bool
+ Validate() error
+}
+
+// ConstraintsConvertable can be converted to a Constraints object.
+type ConstraintsConvertable interface {
+ ToConstraints() Constraints
+}
+
+// ConstraintConvertable can be converted to a Constraint.
+type ConstraintConvertable interface {
+ ToConstraint() Constraint
+}
+
+// OptionConvertable can be converted to an Option.
+type OptionConvertable interface {
+ ToOption() Option
+}
+
+// Constraints represents the AND of a list of Constraint lines.
+type Constraints []Constraint
+
+// And builds Constraints that will be true if all of its constraints are true.
+func And(cs ...ConstraintConvertable) Constraints {
+ constraints := Constraints{}
+ for _, c := range cs {
+ constraints = append(constraints, c.ToConstraint())
+ }
+ return constraints
+}
+
+// ToConstraints returns cs.
+func (cs Constraints) ToConstraints() Constraints { return cs }
+
+// Validate validates the constraints set.
+func (cs Constraints) Validate() error {
+ for _, c := range cs {
+ if err := c.Validate(); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// Evaluate the boolean formula represented by cs under the given assignment of
+// tag values. This is the AND of the values of the constituent Constraints.
+func (cs Constraints) Evaluate(v map[string]bool) bool {
+ r := true
+ for _, c := range cs {
+ r = r && c.Evaluate(v)
+ }
+ return r
+}
+
+// GoString represents Constraints as +build comment lines.
+func (cs Constraints) GoString() string {
+ s := ""
+ for _, c := range cs {
+ s += c.GoString()
+ }
+ return s
+}
+
+// Constraint represents the OR of a list of Options.
+type Constraint []Option
+
+// Any builds a Constraint that will be true if any of its options are true.
+func Any(opts ...OptionConvertable) Constraint {
+ c := Constraint{}
+ for _, opt := range opts {
+ c = append(c, opt.ToOption())
+ }
+ return c
+}
+
+// ParseConstraint parses a space-separated list of options.
+func ParseConstraint(expr string) (Constraint, error) {
+ c := Constraint{}
+ for _, field := range strings.Fields(expr) {
+ opt, err := ParseOption(field)
+ if err != nil {
+ return c, err
+ }
+ c = append(c, opt)
+ }
+ return c, nil
+}
+
+// ToConstraints returns the list of constraints containing just c.
+func (c Constraint) ToConstraints() Constraints { return Constraints{c} }
+
+// ToConstraint returns c.
+func (c Constraint) ToConstraint() Constraint { return c }
+
+// Validate validates the constraint.
+func (c Constraint) Validate() error {
+ for _, o := range c {
+ if err := o.Validate(); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// Evaluate the boolean formula represented by c under the given assignment of
+// tag values. This is the OR of the values of the constituent Options.
+func (c Constraint) Evaluate(v map[string]bool) bool {
+ r := false
+ for _, o := range c {
+ r = r || o.Evaluate(v)
+ }
+ return r
+}
+
+// GoString represents the Constraint as one +build comment line.
+func (c Constraint) GoString() string {
+ s := "// +build"
+ for _, o := range c {
+ s += " " + o.GoString()
+ }
+ return s + "\n"
+}
+
+// Option represents the AND of a list of Terms.
+type Option []Term
+
+// Opt builds an Option from the list of Terms.
+func Opt(terms ...Term) Option {
+ return Option(terms)
+}
+
+// ParseOption parses a comma-separated list of terms.
+func ParseOption(expr string) (Option, error) {
+ opt := Option{}
+ for _, t := range strings.Split(expr, ",") {
+ opt = append(opt, Term(t))
+ }
+ return opt, opt.Validate()
+}
+
+// ToConstraints returns Constraints containing just this option.
+func (o Option) ToConstraints() Constraints { return o.ToConstraint().ToConstraints() }
+
+// ToConstraint returns a Constraint containing just this option.
+func (o Option) ToConstraint() Constraint { return Constraint{o} }
+
+// ToOption returns o.
+func (o Option) ToOption() Option { return o }
+
+// Validate validates o.
+func (o Option) Validate() error {
+ for _, t := range o {
+ if err := t.Validate(); err != nil {
+ return fmt.Errorf("invalid term \"%s\": %s", t, err)
+ }
+ }
+ return nil
+}
+
+// Evaluate the boolean formula represented by o under the given assignment of
+// tag values. This is the AND of the values of the constituent Terms.
+func (o Option) Evaluate(v map[string]bool) bool {
+ r := true
+ for _, t := range o {
+ r = r && t.Evaluate(v)
+ }
+ return r
+}
+
+// GoString represents the Option as a comma-separated list of terms.
+func (o Option) GoString() string {
+ var ts []string
+ for _, t := range o {
+ ts = append(ts, t.GoString())
+ }
+ return strings.Join(ts, ",")
+}
+
+// Term is an atomic term in a build constraint: an identifier or its negation.
+type Term string
+
+// Not returns a term for the negation of ident.
+func Not(ident string) Term {
+ return Term("!" + ident)
+}
+
+// ToConstraints returns Constraints containing just this term.
+func (t Term) ToConstraints() Constraints { return t.ToOption().ToConstraints() }
+
+// ToConstraint returns a Constraint containing just this term.
+func (t Term) ToConstraint() Constraint { return t.ToOption().ToConstraint() }
+
+// ToOption returns an Option containing just this term.
+func (t Term) ToOption() Option { return Option{t} }
+
+// IsNegated reports whether t is the negation of an identifier.
+func (t Term) IsNegated() bool { return strings.HasPrefix(string(t), "!") }
+
+// Name returns the identifier for this term.
+func (t Term) Name() string {
+ return strings.TrimPrefix(string(t), "!")
+}
+
+// Validate the term.
+func (t Term) Validate() error {
+ // Reference: https://github.com/golang/go/blob/204a8f55dc2e0ac8d27a781dab0da609b98560da/src/cmd/go/internal/imports/build.go#L110-L112
+ //
+ // if strings.HasPrefix(name, "!!") { // bad syntax, reject always
+ // return false
+ // }
+ //
+ if strings.HasPrefix(string(t), "!!") {
+ return errors.New("at most one '!' allowed")
+ }
+
+ if len(t.Name()) == 0 {
+ return errors.New("empty tag name")
+ }
+
+ // Reference: https://github.com/golang/go/blob/204a8f55dc2e0ac8d27a781dab0da609b98560da/src/cmd/go/internal/imports/build.go#L121-L127
+ //
+ // // Tags must be letters, digits, underscores or dots.
+ // // Unlike in Go identifiers, all digits are fine (e.g., "386").
+ // for _, c := range name {
+ // if !unicode.IsLetter(c) && !unicode.IsDigit(c) && c != '_' && c != '.' {
+ // return false
+ // }
+ // }
+ //
+ for _, c := range t.Name() {
+ if !unicode.IsLetter(c) && !unicode.IsDigit(c) && c != '_' && c != '.' {
+ return fmt.Errorf("character '%c' disallowed in tags", c)
+ }
+ }
+
+ return nil
+}
+
+// Evaluate the term under the given set of identifier values.
+func (t Term) Evaluate(v map[string]bool) bool {
+ return (t.Validate() == nil) && (v[t.Name()] == !t.IsNegated())
+}
+
+// GoString returns t.
+func (t Term) GoString() string { return string(t) }
+
+// SetTags builds a set where the given list of identifiers are true.
+func SetTags(idents ...string) map[string]bool {
+ v := map[string]bool{}
+ for _, ident := range idents {
+ v[ident] = true
+ }
+ return v
+}
diff --git a/vendor/github.com/mmcloughlin/avo/gotypes/components.go b/vendor/github.com/mmcloughlin/avo/gotypes/components.go
new file mode 100644
index 0000000..2206afa
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/gotypes/components.go
@@ -0,0 +1,253 @@
+package gotypes
+
+import (
+ "errors"
+ "fmt"
+ "go/token"
+ "go/types"
+ "strconv"
+
+ "github.com/mmcloughlin/avo/reg"
+
+ "github.com/mmcloughlin/avo/operand"
+)
+
+// Sizes provides type sizes used by the standard Go compiler on amd64.
+var Sizes = types.SizesFor("gc", "amd64")
+
+// Basic represents a primitive/basic type at a given memory address.
+type Basic struct {
+ Addr operand.Mem
+ Type *types.Basic
+}
+
+// Component provides access to sub-components of a Go type.
+type Component interface {
+ // When the component has no further sub-components, Resolve will return a
+ // reference to the components type and memory address. If there was an error
+ // during any previous calls to Component methods, they will be returned at
+ // resolution time.
+ Resolve() (*Basic, error)
+
+ Dereference(r reg.Register) Component // dereference a pointer
+ Base() Component // base pointer of a string or slice
+ Len() Component // length of a string or slice
+ Cap() Component // capacity of a slice
+ Real() Component // real part of a complex value
+ Imag() Component // imaginary part of a complex value
+ Index(int) Component // index into an array
+ Field(string) Component // access a struct field
+}
+
+// componenterr is an error that also provides a null implementation of the
+// Component interface. This enables us to return an error from Component
+// methods whilst also allowing method chaining to continue.
+type componenterr string
+
+func errorf(format string, args ...interface{}) Component {
+ return componenterr(fmt.Sprintf(format, args...))
+}
+
+func (c componenterr) Error() string { return string(c) }
+func (c componenterr) Resolve() (*Basic, error) { return nil, c }
+func (c componenterr) Dereference(r reg.Register) Component { return c }
+func (c componenterr) Base() Component { return c }
+func (c componenterr) Len() Component { return c }
+func (c componenterr) Cap() Component { return c }
+func (c componenterr) Real() Component { return c }
+func (c componenterr) Imag() Component { return c }
+func (c componenterr) Index(int) Component { return c }
+func (c componenterr) Field(string) Component { return c }
+
+type component struct {
+ typ types.Type
+ addr operand.Mem
+}
+
+// NewComponent builds a component for the named type at the given address.
+func NewComponent(t types.Type, addr operand.Mem) Component {
+ return &component{
+ typ: t,
+ addr: addr,
+ }
+}
+
+func (c *component) Resolve() (*Basic, error) {
+ b := toprimitive(c.typ)
+ if b == nil {
+ return nil, errors.New("component is not primitive")
+ }
+ return &Basic{
+ Addr: c.addr,
+ Type: b,
+ }, nil
+}
+
+func (c *component) Dereference(r reg.Register) Component {
+ p, ok := c.typ.Underlying().(*types.Pointer)
+ if !ok {
+ return errorf("not pointer type")
+ }
+ return NewComponent(p.Elem(), operand.Mem{Base: r})
+}
+
+// Reference: https://github.com/golang/go/blob/50bd1c4d4eb4fac8ddeb5f063c099daccfb71b26/src/reflect/value.go#L1800-L1804
+//
+// type SliceHeader struct {
+// Data uintptr
+// Len int
+// Cap int
+// }
+//
+var slicehdroffsets = Sizes.Offsetsof([]*types.Var{
+ types.NewField(token.NoPos, nil, "Data", types.Typ[types.Uintptr], false),
+ types.NewField(token.NoPos, nil, "Len", types.Typ[types.Int], false),
+ types.NewField(token.NoPos, nil, "Cap", types.Typ[types.Int], false),
+})
+
+func (c *component) Base() Component {
+ if !isslice(c.typ) && !isstring(c.typ) {
+ return errorf("only slices and strings have base pointers")
+ }
+ return c.sub("_base", int(slicehdroffsets[0]), types.Typ[types.Uintptr])
+}
+
+func (c *component) Len() Component {
+ if !isslice(c.typ) && !isstring(c.typ) {
+ return errorf("only slices and strings have length fields")
+ }
+ return c.sub("_len", int(slicehdroffsets[1]), types.Typ[types.Int])
+}
+
+func (c *component) Cap() Component {
+ if !isslice(c.typ) {
+ return errorf("only slices have capacity fields")
+ }
+ return c.sub("_cap", int(slicehdroffsets[2]), types.Typ[types.Int])
+}
+
+func (c *component) Real() Component {
+ if !iscomplex(c.typ) {
+ return errorf("only complex types have real values")
+ }
+ f := complextofloat(c.typ)
+ return c.sub("_real", 0, f)
+}
+
+func (c *component) Imag() Component {
+ if !iscomplex(c.typ) {
+ return errorf("only complex types have imaginary values")
+ }
+ f := complextofloat(c.typ)
+ return c.sub("_imag", int(Sizes.Sizeof(f)), f)
+}
+
+func (c *component) Index(i int) Component {
+ a, ok := c.typ.Underlying().(*types.Array)
+ if !ok {
+ return errorf("not array type")
+ }
+ if int64(i) >= a.Len() {
+ return errorf("array index out of bounds")
+ }
+ // Reference: https://github.com/golang/tools/blob/bcd4e47d02889ebbc25c9f4bf3d27e4124b0bf9d/go/analysis/passes/asmdecl/asmdecl.go#L482-L494
+ //
+ // case asmArray:
+ // tu := t.Underlying().(*types.Array)
+ // elem := tu.Elem()
+ // // Calculate offset of each element array.
+ // fields := []*types.Var{
+ // types.NewVar(token.NoPos, nil, "fake0", elem),
+ // types.NewVar(token.NoPos, nil, "fake1", elem),
+ // }
+ // offsets := arch.sizes.Offsetsof(fields)
+ // elemoff := int(offsets[1])
+ // for i := 0; i < int(tu.Len()); i++ {
+ // cc = appendComponentsRecursive(arch, elem, cc, suffix+"_"+strconv.Itoa(i), i*elemoff)
+ // }
+ //
+ elem := a.Elem()
+ elemsize := int(Sizes.Sizeof(types.NewArray(elem, 2)) - Sizes.Sizeof(types.NewArray(elem, 1)))
+ return c.sub("_"+strconv.Itoa(i), i*elemsize, elem)
+}
+
+func (c *component) Field(n string) Component {
+ s, ok := c.typ.Underlying().(*types.Struct)
+ if !ok {
+ return errorf("not struct type")
+ }
+ // Reference: https://github.com/golang/tools/blob/13ba8ad772dfbf0f451b5dd0679e9c5605afc05d/go/analysis/passes/asmdecl/asmdecl.go#L471-L480
+ //
+ // case asmStruct:
+ // tu := t.Underlying().(*types.Struct)
+ // fields := make([]*types.Var, tu.NumFields())
+ // for i := 0; i < tu.NumFields(); i++ {
+ // fields[i] = tu.Field(i)
+ // }
+ // offsets := arch.sizes.Offsetsof(fields)
+ // for i, f := range fields {
+ // cc = appendComponentsRecursive(arch, f.Type(), cc, suffix+"_"+f.Name(), off+int(offsets[i]))
+ // }
+ //
+ fields := make([]*types.Var, s.NumFields())
+ for i := 0; i < s.NumFields(); i++ {
+ fields[i] = s.Field(i)
+ }
+ offsets := Sizes.Offsetsof(fields)
+ for i, f := range fields {
+ if f.Name() == n {
+ return c.sub("_"+n, int(offsets[i]), f.Type())
+ }
+ }
+ return errorf("struct does not have field '%s'", n)
+}
+
+func (c *component) sub(suffix string, offset int, t types.Type) *component {
+ s := *c
+ if s.addr.Symbol.Name != "" {
+ s.addr.Symbol.Name += suffix
+ }
+ s.addr = s.addr.Offset(offset)
+ s.typ = t
+ return &s
+}
+
+func isslice(t types.Type) bool {
+ _, ok := t.Underlying().(*types.Slice)
+ return ok
+}
+
+func isstring(t types.Type) bool {
+ b, ok := t.Underlying().(*types.Basic)
+ return ok && b.Kind() == types.String
+}
+
+func iscomplex(t types.Type) bool {
+ b, ok := t.Underlying().(*types.Basic)
+ return ok && (b.Info()&types.IsComplex) != 0
+}
+
+func complextofloat(t types.Type) types.Type {
+ switch Sizes.Sizeof(t) {
+ case 16:
+ return types.Typ[types.Float64]
+ case 8:
+ return types.Typ[types.Float32]
+ }
+ panic("bad")
+}
+
+// toprimitive determines whether t is primitive (cannot be reduced into
+// components). If it is, it returns the basic type for t, otherwise returns
+// nil.
+func toprimitive(t types.Type) *types.Basic {
+ switch b := t.(type) {
+ case *types.Basic:
+ if (b.Info() & (types.IsString | types.IsComplex)) == 0 {
+ return b
+ }
+ case *types.Pointer:
+ return types.Typ[types.Uintptr]
+ }
+ return nil
+}
diff --git a/vendor/github.com/mmcloughlin/avo/gotypes/doc.go b/vendor/github.com/mmcloughlin/avo/gotypes/doc.go
new file mode 100644
index 0000000..fa8f078
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/gotypes/doc.go
@@ -0,0 +1,2 @@
+// Package gotypes provides helpers for interacting with Go types within avo functions.
+package gotypes
diff --git a/vendor/github.com/mmcloughlin/avo/gotypes/signature.go b/vendor/github.com/mmcloughlin/avo/gotypes/signature.go
new file mode 100644
index 0000000..e000020
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/gotypes/signature.go
@@ -0,0 +1,177 @@
+package gotypes
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "go/token"
+ "go/types"
+ "strconv"
+
+ "github.com/mmcloughlin/avo/operand"
+)
+
+// Signature represents a Go function signature.
+type Signature struct {
+ pkg *types.Package
+ sig *types.Signature
+ params *Tuple
+ results *Tuple
+}
+
+// NewSignature constructs a Signature.
+func NewSignature(pkg *types.Package, sig *types.Signature) *Signature {
+ s := &Signature{
+ pkg: pkg,
+ sig: sig,
+ }
+ s.init()
+ return s
+}
+
+// NewSignatureVoid builds the void signature "func()".
+func NewSignatureVoid() *Signature {
+ return NewSignature(nil, types.NewSignature(nil, nil, nil, false))
+}
+
+// LookupSignature returns the signature of the named function in the provided package.
+func LookupSignature(pkg *types.Package, name string) (*Signature, error) {
+ scope := pkg.Scope()
+ obj := scope.Lookup(name)
+ if obj == nil {
+ return nil, fmt.Errorf("could not find function \"%s\"", name)
+ }
+ s, ok := obj.Type().(*types.Signature)
+ if !ok {
+ return nil, fmt.Errorf("object \"%s\" does not have signature type", name)
+ }
+ return NewSignature(pkg, s), nil
+}
+
+// ParseSignature builds a Signature by parsing a Go function type expression.
+// The function type must reference builtin types only; see
+// ParseSignatureInPackage if custom types are required.
+func ParseSignature(expr string) (*Signature, error) {
+ return ParseSignatureInPackage(nil, expr)
+}
+
+// ParseSignatureInPackage builds a Signature by parsing a Go function type
+// expression. The expression may reference types in the provided package.
+func ParseSignatureInPackage(pkg *types.Package, expr string) (*Signature, error) {
+ tv, err := types.Eval(token.NewFileSet(), pkg, token.NoPos, expr)
+ if err != nil {
+ return nil, err
+ }
+ if tv.Value != nil {
+ return nil, errors.New("signature expression should have nil value")
+ }
+ s, ok := tv.Type.(*types.Signature)
+ if !ok {
+ return nil, errors.New("provided type is not a function signature")
+ }
+ return NewSignature(pkg, s), nil
+}
+
+// Params returns the function signature argument types.
+func (s *Signature) Params() *Tuple { return s.params }
+
+// Results returns the function return types.
+func (s *Signature) Results() *Tuple { return s.results }
+
+// Bytes returns the total size of the function arguments and return values.
+func (s *Signature) Bytes() int { return s.Params().Bytes() + s.Results().Bytes() }
+
+// String writes Signature as a string. This does not include the "func" keyword.
+func (s *Signature) String() string {
+ var buf bytes.Buffer
+ types.WriteSignature(&buf, s.sig, func(pkg *types.Package) string {
+ if pkg == s.pkg {
+ return ""
+ }
+ return pkg.Name()
+ })
+ return buf.String()
+}
+
+func (s *Signature) init() {
+ p := s.sig.Params()
+ r := s.sig.Results()
+
+ // Compute parameter offsets.
+ vs := tuplevars(p)
+ vs = append(vs, types.NewParam(token.NoPos, nil, "sentinel", types.Typ[types.Uint64]))
+ paramsoffsets := Sizes.Offsetsof(vs)
+ paramssize := paramsoffsets[p.Len()]
+ s.params = newTuple(p, paramsoffsets, paramssize, "arg")
+
+ // Result offsets.
+ vs = tuplevars(r)
+ resultsoffsets := Sizes.Offsetsof(vs)
+ var resultssize int64
+ if n := len(vs); n > 0 {
+ resultssize = resultsoffsets[n-1] + Sizes.Sizeof(vs[n-1].Type())
+ }
+ for i := range resultsoffsets {
+ resultsoffsets[i] += paramssize
+ }
+ s.results = newTuple(r, resultsoffsets, resultssize, "ret")
+}
+
+// Tuple represents a tuple of variables, such as function arguments or results.
+type Tuple struct {
+ components []Component
+ byname map[string]Component
+ size int
+}
+
+func newTuple(t *types.Tuple, offsets []int64, size int64, defaultprefix string) *Tuple {
+ tuple := &Tuple{
+ byname: map[string]Component{},
+ size: int(size),
+ }
+ for i := 0; i < t.Len(); i++ {
+ v := t.At(i)
+ name := v.Name()
+ if name == "" {
+ name = defaultprefix
+ if i > 0 {
+ name += strconv.Itoa(i)
+ }
+ }
+ addr := operand.NewParamAddr(name, int(offsets[i]))
+ c := NewComponent(v.Type(), addr)
+ tuple.components = append(tuple.components, c)
+ if v.Name() != "" {
+ tuple.byname[v.Name()] = c
+ }
+ }
+ return tuple
+}
+
+// Lookup returns the variable with the given name.
+func (t *Tuple) Lookup(name string) Component {
+ e := t.byname[name]
+ if e == nil {
+ return errorf("unknown variable \"%s\"", name)
+ }
+ return e
+}
+
+// At returns the variable at index i.
+func (t *Tuple) At(i int) Component {
+ if i >= len(t.components) {
+ return errorf("index out of range")
+ }
+ return t.components[i]
+}
+
+// Bytes returns the size of the Tuple. This may include additional padding.
+func (t *Tuple) Bytes() int { return t.size }
+
+func tuplevars(t *types.Tuple) []*types.Var {
+ vs := make([]*types.Var, t.Len())
+ for i := 0; i < t.Len(); i++ {
+ vs[i] = t.At(i)
+ }
+ return vs
+}
diff --git a/vendor/github.com/mmcloughlin/avo/internal/prnt/printer.go b/vendor/github.com/mmcloughlin/avo/internal/prnt/printer.go
new file mode 100644
index 0000000..410895c
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/internal/prnt/printer.go
@@ -0,0 +1,60 @@
+// Package prnt provides common functionality for code generators.
+package prnt
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "strings"
+)
+
+// Generator provides convenience methods for code generators. In particular it
+// provides fmt-like methods which print to an internal buffer. It also allows
+// any errors to be stored so they can be checked at the end, rather than having
+// error checks obscuring the code generation.
+type Generator struct {
+ buf bytes.Buffer
+ err error
+}
+
+// Raw provides direct access to the underlying output stream.
+func (g *Generator) Raw() io.Writer {
+ return &g.buf
+}
+
+// Printf prints to the internal buffer.
+func (g *Generator) Printf(format string, args ...interface{}) {
+ if g.err != nil {
+ return
+ }
+ _, err := fmt.Fprintf(&g.buf, format, args...)
+ g.AddError(err)
+}
+
+// NL prints a new line.
+func (g *Generator) NL() {
+ g.Printf("\n")
+}
+
+// Comment writes comment lines prefixed with "// ".
+func (g *Generator) Comment(lines ...string) {
+ for _, line := range lines {
+ line = strings.TrimSpace("// " + line)
+ g.Printf("%s\n", line)
+ }
+}
+
+// AddError records an error in code generation. The first non-nil error will
+// prevent printing operations from writing anything else, and the error will be
+// returned from Result().
+func (g *Generator) AddError(err error) {
+ if err != nil && g.err == nil {
+ g.err = err
+ }
+}
+
+// Result returns the printed bytes. If any error was recorded with AddError
+// during code generation, the first such error will be returned here.
+func (g *Generator) Result() ([]byte, error) {
+ return g.buf.Bytes(), g.err
+}
diff --git a/vendor/github.com/mmcloughlin/avo/internal/stack/stack.go b/vendor/github.com/mmcloughlin/avo/internal/stack/stack.go
new file mode 100644
index 0000000..1d327d9
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/internal/stack/stack.go
@@ -0,0 +1,73 @@
+// Package stack provides helpers for querying the callstack.
+package stack
+
+import (
+ "path"
+ "runtime"
+ "strings"
+)
+
+// Frames returns at most max callstack Frames, starting with its caller and
+// skipping skip Frames.
+func Frames(skip, max int) []runtime.Frame {
+ pc := make([]uintptr, max)
+ n := runtime.Callers(skip+2, pc)
+ if n == 0 {
+ return nil
+ }
+ pc = pc[:n]
+ frames := runtime.CallersFrames(pc)
+ var fs []runtime.Frame
+ for {
+ f, more := frames.Next()
+ fs = append(fs, f)
+ if !more {
+ break
+ }
+ }
+ return fs
+}
+
+// Match returns the first stack frame for which the predicate function returns
+// true. Returns nil if no match is found. Starts matching after skip frames,
+// starting with its caller.
+func Match(skip int, predicate func(runtime.Frame) bool) *runtime.Frame {
+ i, n := skip+1, 16
+ for {
+ fs := Frames(i, n)
+ for j, f := range fs {
+ if predicate(f) {
+ return &fs[j]
+ }
+ }
+ if len(fs) < n {
+ break
+ }
+ i += n
+ }
+ return nil
+}
+
+// Main returns the main() function Frame.
+func Main() *runtime.Frame {
+ return Match(1, func(f runtime.Frame) bool {
+ return f.Function == "main.main"
+ })
+}
+
+// ExternalCaller returns the first frame outside the callers package.
+func ExternalCaller() *runtime.Frame {
+ var first *runtime.Frame
+ return Match(1, func(f runtime.Frame) bool {
+ if first == nil {
+ first = &f
+ }
+ return pkg(first.Function) != pkg(f.Function)
+ })
+}
+
+func pkg(ident string) string {
+ dir, name := path.Split(ident)
+ parts := strings.Split(name, ".")
+ return dir + parts[0]
+}
diff --git a/vendor/github.com/mmcloughlin/avo/ir/doc.go b/vendor/github.com/mmcloughlin/avo/ir/doc.go
new file mode 100644
index 0000000..de02f46
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/ir/doc.go
@@ -0,0 +1,2 @@
+// Package ir provides the intermediate representation of avo programs.
+package ir
diff --git a/vendor/github.com/mmcloughlin/avo/ir/ir.go b/vendor/github.com/mmcloughlin/avo/ir/ir.go
new file mode 100644
index 0000000..6fb9216
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/ir/ir.go
@@ -0,0 +1,355 @@
+package ir
+
+import (
+ "errors"
+
+ "github.com/mmcloughlin/avo/attr"
+ "github.com/mmcloughlin/avo/buildtags"
+ "github.com/mmcloughlin/avo/gotypes"
+ "github.com/mmcloughlin/avo/operand"
+ "github.com/mmcloughlin/avo/reg"
+)
+
+// Node is a part of a Function.
+type Node interface {
+ node()
+}
+
+// Label within a function.
+type Label string
+
+func (l Label) node() {}
+
+// Comment represents a multi-line comment.
+type Comment struct {
+ Lines []string
+}
+
+func (c *Comment) node() {}
+
+// NewComment builds a Comment consisting of the provided lines.
+func NewComment(lines ...string) *Comment {
+ return &Comment{
+ Lines: lines,
+ }
+}
+
+// Instruction is a single instruction in a function.
+type Instruction struct {
+ Opcode string
+ Operands []operand.Op
+
+ Inputs []operand.Op
+ Outputs []operand.Op
+
+ IsTerminal bool
+ IsBranch bool
+ IsConditional bool
+ CancellingInputs bool
+
+ // ISA is the list of required instruction set extensions.
+ ISA []string
+
+ // CFG.
+ Pred []*Instruction
+ Succ []*Instruction
+
+ // LiveIn/LiveOut are sets of live register IDs pre/post execution.
+ LiveIn reg.MaskSet
+ LiveOut reg.MaskSet
+}
+
+func (i *Instruction) node() {}
+
+// IsUnconditionalBranch reports whether i is an unconditional branch.
+func (i Instruction) IsUnconditionalBranch() bool {
+ return i.IsBranch && !i.IsConditional
+}
+
+// TargetLabel returns the label referenced by this instruction. Returns nil if
+// no label is referenced.
+func (i Instruction) TargetLabel() *Label {
+ if !i.IsBranch {
+ return nil
+ }
+ if len(i.Operands) == 0 {
+ return nil
+ }
+ if ref, ok := i.Operands[0].(operand.LabelRef); ok {
+ lbl := Label(ref)
+ return &lbl
+ }
+ return nil
+}
+
+// Registers returns all registers involved in the instruction.
+func (i Instruction) Registers() []reg.Register {
+ var rs []reg.Register
+ for _, op := range i.Operands {
+ rs = append(rs, operand.Registers(op)...)
+ }
+ return rs
+}
+
+// InputRegisters returns all registers read by this instruction.
+func (i Instruction) InputRegisters() []reg.Register {
+ var rs []reg.Register
+ for _, op := range i.Inputs {
+ rs = append(rs, operand.Registers(op)...)
+ }
+ if i.CancellingInputs && rs[0] == rs[1] {
+ rs = []reg.Register{}
+ }
+ for _, op := range i.Outputs {
+ if operand.IsMem(op) {
+ rs = append(rs, operand.Registers(op)...)
+ }
+ }
+ return rs
+}
+
+// OutputRegisters returns all registers written by this instruction.
+func (i Instruction) OutputRegisters() []reg.Register {
+ var rs []reg.Register
+ for _, op := range i.Outputs {
+ if r, ok := op.(reg.Register); ok {
+ rs = append(rs, r)
+ }
+ }
+ return rs
+}
+
+// Section is a part of a file.
+type Section interface {
+ section()
+}
+
+// File represents an assembly file.
+type File struct {
+ Constraints buildtags.Constraints
+ Includes []string
+ Sections []Section
+}
+
+// NewFile initializes an empty file.
+func NewFile() *File {
+ return &File{}
+}
+
+// AddSection appends a Section to the file.
+func (f *File) AddSection(s Section) {
+ f.Sections = append(f.Sections, s)
+}
+
+// Functions returns all functions in the file.
+func (f *File) Functions() []*Function {
+ var fns []*Function
+ for _, s := range f.Sections {
+ if fn, ok := s.(*Function); ok {
+ fns = append(fns, fn)
+ }
+ }
+ return fns
+}
+
+// Pragma represents a function compiler directive.
+type Pragma struct {
+ Directive string
+ Arguments []string
+}
+
+// Function represents an assembly function.
+type Function struct {
+ Name string
+ Attributes attr.Attribute
+ Pragmas []Pragma
+ Doc []string
+ Signature *gotypes.Signature
+ LocalSize int
+
+ Nodes []Node
+
+ // LabelTarget maps from label name to the following instruction.
+ LabelTarget map[Label]*Instruction
+
+ // Register allocation.
+ Allocation reg.Allocation
+
+ // ISA is the list of required instruction set extensions.
+ ISA []string
+}
+
+func (f *Function) section() {}
+
+// NewFunction builds an empty function of the given name.
+func NewFunction(name string) *Function {
+ return &Function{
+ Name: name,
+ Signature: gotypes.NewSignatureVoid(),
+ }
+}
+
+// AddPragma adds a pragma to this function.
+func (f *Function) AddPragma(directive string, args ...string) {
+ f.Pragmas = append(f.Pragmas, Pragma{
+ Directive: directive,
+ Arguments: args,
+ })
+}
+
+// SetSignature sets the function signature.
+func (f *Function) SetSignature(s *gotypes.Signature) {
+ f.Signature = s
+}
+
+// AllocLocal allocates size bytes in this function's stack.
+// Returns a reference to the base pointer for the newly allocated region.
+func (f *Function) AllocLocal(size int) operand.Mem {
+ ptr := operand.NewStackAddr(f.LocalSize)
+ f.LocalSize += size
+ return ptr
+}
+
+// AddInstruction appends an instruction to f.
+func (f *Function) AddInstruction(i *Instruction) {
+ f.AddNode(i)
+}
+
+// AddLabel appends a label to f.
+func (f *Function) AddLabel(l Label) {
+ f.AddNode(l)
+}
+
+// AddComment adds comment lines to f.
+func (f *Function) AddComment(lines ...string) {
+ f.AddNode(NewComment(lines...))
+}
+
+// AddNode appends a Node to f.
+func (f *Function) AddNode(n Node) {
+ f.Nodes = append(f.Nodes, n)
+}
+
+// Instructions returns just the list of instruction nodes.
+func (f *Function) Instructions() []*Instruction {
+ var is []*Instruction
+ for _, n := range f.Nodes {
+ i, ok := n.(*Instruction)
+ if ok {
+ is = append(is, i)
+ }
+ }
+ return is
+}
+
+// Labels returns just the list of label nodes.
+func (f *Function) Labels() []Label {
+ var lbls []Label
+ for _, n := range f.Nodes {
+ lbl, ok := n.(Label)
+ if ok {
+ lbls = append(lbls, lbl)
+ }
+ }
+ return lbls
+}
+
+// Stub returns the Go function declaration.
+func (f *Function) Stub() string {
+ return "func " + f.Name + f.Signature.String()
+}
+
+// FrameBytes returns the size of the stack frame in bytes.
+func (f *Function) FrameBytes() int {
+ return f.LocalSize
+}
+
+// ArgumentBytes returns the size of the arguments in bytes.
+func (f *Function) ArgumentBytes() int {
+ return f.Signature.Bytes()
+}
+
+// Datum represents a data element at a particular offset of a data section.
+type Datum struct {
+ Offset int
+ Value operand.Constant
+}
+
+// NewDatum builds a Datum from the given constant.
+func NewDatum(offset int, v operand.Constant) Datum {
+ return Datum{
+ Offset: offset,
+ Value: v,
+ }
+}
+
+// Interval returns the range of bytes this datum will occupy within its section.
+func (d Datum) Interval() (int, int) {
+ return d.Offset, d.Offset + d.Value.Bytes()
+}
+
+// Overlaps returns true
+func (d Datum) Overlaps(other Datum) bool {
+ s, e := d.Interval()
+ so, eo := other.Interval()
+ return !(eo <= s || e <= so)
+}
+
+// Global represents a DATA section.
+type Global struct {
+ Symbol operand.Symbol
+ Attributes attr.Attribute
+ Data []Datum
+ Size int
+}
+
+// NewGlobal constructs an empty DATA section.
+func NewGlobal(sym operand.Symbol) *Global {
+ return &Global{
+ Symbol: sym,
+ }
+}
+
+// NewStaticGlobal is a convenience for building a static DATA section.
+func NewStaticGlobal(name string) *Global {
+ return NewGlobal(operand.NewStaticSymbol(name))
+}
+
+func (g *Global) section() {}
+
+// Base returns a pointer to the start of the data section.
+func (g *Global) Base() operand.Mem {
+ return operand.NewDataAddr(g.Symbol, 0)
+}
+
+// Grow ensures that the data section has at least the given size.
+func (g *Global) Grow(size int) {
+ if g.Size < size {
+ g.Size = size
+ }
+}
+
+// AddDatum adds d to this data section, growing it if necessary. Errors if the datum overlaps with existing data.
+func (g *Global) AddDatum(d Datum) error {
+ for _, other := range g.Data {
+ if d.Overlaps(other) {
+ return errors.New("overlaps existing datum")
+ }
+ }
+ g.add(d)
+ return nil
+}
+
+// Append the constant to the end of the data section.
+func (g *Global) Append(v operand.Constant) {
+ g.add(Datum{
+ Offset: g.Size,
+ Value: v,
+ })
+}
+
+func (g *Global) add(d Datum) {
+ _, end := d.Interval()
+ g.Grow(end)
+ g.Data = append(g.Data, d)
+}
diff --git a/vendor/github.com/mmcloughlin/avo/operand/checks.go b/vendor/github.com/mmcloughlin/avo/operand/checks.go
new file mode 100644
index 0000000..2585479
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/operand/checks.go
@@ -0,0 +1,247 @@
+package operand
+
+import "github.com/mmcloughlin/avo/reg"
+
+// Pure type assertion checks:
+
+// IsRegister returns whether op has type reg.Register.
+func IsRegister(op Op) bool { _, ok := op.(reg.Register); return ok }
+
+// IsMem returns whether op has type Mem.
+func IsMem(op Op) bool { _, ok := op.(Mem); return ok }
+
+// IsRel returns whether op has type Rel.
+func IsRel(op Op) bool { _, ok := op.(Rel); return ok }
+
+// Checks corresponding to specific operand types in the Intel Manual:
+
+// Is1 returns true if op is the immediate constant 1.
+func Is1(op Op) bool {
+ i, ok := op.(U8)
+ return ok && i == 1
+}
+
+// Is3 returns true if op is the immediate constant 3.
+func Is3(op Op) bool {
+ i, ok := op.(U8)
+ return ok && i == 3
+}
+
+// IsIMM2U returns true if op is a 2-bit unsigned immediate (less than 4).
+func IsIMM2U(op Op) bool {
+ i, ok := op.(U8)
+ return ok && i < 4
+}
+
+// IsIMM8 returns true is op is an 8-bit immediate.
+func IsIMM8(op Op) bool {
+ _, ok := op.(U8)
+ return ok
+}
+
+// IsIMM16 returns true is op is a 16-bit immediate.
+func IsIMM16(op Op) bool {
+ _, ok := op.(U16)
+ return ok
+}
+
+// IsIMM32 returns true is op is a 32-bit immediate.
+func IsIMM32(op Op) bool {
+ _, ok := op.(U32)
+ return ok
+}
+
+// IsIMM64 returns true is op is a 64-bit immediate.
+func IsIMM64(op Op) bool {
+ _, ok := op.(U64)
+ return ok
+}
+
+// IsAL returns true if op is the AL register.
+func IsAL(op Op) bool {
+ return op == reg.AL
+}
+
+// IsCL returns true if op is the CL register.
+func IsCL(op Op) bool {
+ return op == reg.CL
+}
+
+// IsAX returns true if op is the 16-bit AX register.
+func IsAX(op Op) bool {
+ return op == reg.AX
+}
+
+// IsEAX returns true if op is the 32-bit EAX register.
+func IsEAX(op Op) bool {
+ return op == reg.EAX
+}
+
+// IsRAX returns true if op is the 64-bit RAX register.
+func IsRAX(op Op) bool {
+ return op == reg.RAX
+}
+
+// IsR8 returns true if op is an 8-bit general-purpose register.
+func IsR8(op Op) bool {
+ return IsGP(op, 1)
+}
+
+// IsR16 returns true if op is a 16-bit general-purpose register.
+func IsR16(op Op) bool {
+ return IsGP(op, 2)
+}
+
+// IsR32 returns true if op is a 32-bit general-purpose register.
+func IsR32(op Op) bool {
+ return IsGP(op, 4)
+}
+
+// IsR64 returns true if op is a 64-bit general-purpose register.
+func IsR64(op Op) bool {
+ return IsGP(op, 8)
+}
+
+// IsPseudo returns true if op is a pseudo register.
+func IsPseudo(op Op) bool {
+ return IsRegisterKind(op, reg.KindPseudo)
+}
+
+// IsGP returns true if op is a general-purpose register of size n bytes.
+func IsGP(op Op, n uint) bool {
+ return IsRegisterKindSize(op, reg.KindGP, n)
+}
+
+// IsXMM0 returns true if op is the X0 register.
+func IsXMM0(op Op) bool {
+ return op == reg.X0
+}
+
+// IsXMM returns true if op is a 128-bit XMM register.
+func IsXMM(op Op) bool {
+ return IsRegisterKindSize(op, reg.KindVector, 16)
+}
+
+// IsYMM returns true if op is a 256-bit YMM register.
+func IsYMM(op Op) bool {
+ return IsRegisterKindSize(op, reg.KindVector, 32)
+}
+
+// IsRegisterKindSize returns true if op is a register of the given kind and size in bytes.
+func IsRegisterKindSize(op Op, k reg.Kind, n uint) bool {
+ r, ok := op.(reg.Register)
+ return ok && r.Kind() == k && r.Size() == n
+}
+
+// IsRegisterKind returns true if op is a register of the given kind.
+func IsRegisterKind(op Op, k reg.Kind) bool {
+ r, ok := op.(reg.Register)
+ return ok && r.Kind() == k
+}
+
+// IsM returns true if op is a 16-, 32- or 64-bit memory operand.
+func IsM(op Op) bool {
+ // TODO(mbm): confirm "m" check is defined correctly
+ // Intel manual: "A 16-, 32- or 64-bit operand in memory."
+ return IsM16(op) || IsM32(op) || IsM64(op)
+}
+
+// IsM8 returns true if op is an 8-bit memory operand.
+func IsM8(op Op) bool {
+ // TODO(mbm): confirm "m8" check is defined correctly
+ // Intel manual: "A byte operand in memory, usually expressed as a variable or
+ // array name, but pointed to by the DS:(E)SI or ES:(E)DI registers. In 64-bit
+ // mode, it is pointed to by the RSI or RDI registers."
+ return IsMSize(op, 1)
+}
+
+// IsM16 returns true if op is a 16-bit memory operand.
+func IsM16(op Op) bool {
+ return IsMSize(op, 2)
+}
+
+// IsM32 returns true if op is a 16-bit memory operand.
+func IsM32(op Op) bool {
+ return IsMSize(op, 4)
+}
+
+// IsM64 returns true if op is a 64-bit memory operand.
+func IsM64(op Op) bool {
+ return IsMSize(op, 8)
+}
+
+// IsMSize returns true if op is a memory operand using general-purpose address
+// registers of the given size in bytes.
+func IsMSize(op Op, n uint) bool {
+ // TODO(mbm): should memory operands have a size attribute as well?
+ // TODO(mbm): m8,m16,m32,m64 checks do not actually check size
+ m, ok := op.(Mem)
+ return ok && IsMReg(m.Base) && (m.Index == nil || IsMReg(m.Index))
+}
+
+// IsMReg returns true if op is a register that can be used in a memory operand.
+func IsMReg(op Op) bool {
+ return IsPseudo(op) || IsRegisterKind(op, reg.KindGP)
+}
+
+// IsM128 returns true if op is a 128-bit memory operand.
+func IsM128(op Op) bool {
+ // TODO(mbm): should "m128" be the same as "m64"?
+ return IsM64(op)
+}
+
+// IsM256 returns true if op is a 256-bit memory operand.
+func IsM256(op Op) bool {
+ // TODO(mbm): should "m256" be the same as "m64"?
+ return IsM64(op)
+}
+
+// IsVM32X returns true if op is a vector memory operand with 32-bit XMM index.
+func IsVM32X(op Op) bool {
+ return IsVmx(op)
+}
+
+// IsVM64X returns true if op is a vector memory operand with 64-bit XMM index.
+func IsVM64X(op Op) bool {
+ return IsVmx(op)
+}
+
+// IsVmx returns true if op is a vector memory operand with XMM index.
+func IsVmx(op Op) bool {
+ return isvm(op, IsXMM)
+}
+
+// IsVM32Y returns true if op is a vector memory operand with 32-bit YMM index.
+func IsVM32Y(op Op) bool {
+ return IsVmy(op)
+}
+
+// IsVM64Y returns true if op is a vector memory operand with 64-bit YMM index.
+func IsVM64Y(op Op) bool {
+ return IsVmy(op)
+}
+
+// IsVmy returns true if op is a vector memory operand with YMM index.
+func IsVmy(op Op) bool {
+ return isvm(op, IsYMM)
+}
+
+func isvm(op Op, idx func(Op) bool) bool {
+ m, ok := op.(Mem)
+ return ok && IsR64(m.Base) && idx(m.Index)
+}
+
+// IsREL8 returns true if op is an 8-bit offset relative to instruction pointer.
+func IsREL8(op Op) bool {
+ r, ok := op.(Rel)
+ return ok && r == Rel(int8(r))
+}
+
+// IsREL32 returns true if op is an offset relative to instruction pointer, or a
+// label reference.
+func IsREL32(op Op) bool {
+ // TODO(mbm): should labels be considered separately?
+ _, rel := op.(Rel)
+ _, label := op.(LabelRef)
+ return rel || label
+}
diff --git a/vendor/github.com/mmcloughlin/avo/operand/const.go b/vendor/github.com/mmcloughlin/avo/operand/const.go
new file mode 100644
index 0000000..b2c6a6f
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/operand/const.go
@@ -0,0 +1,36 @@
+package operand
+
+import "fmt"
+
+// Constant represents a constant literal.
+type Constant interface {
+ Op
+ Bytes() int
+ constant()
+}
+
+//go:generate go run make_const.go -output zconst.go
+
+// String is a string constant.
+type String string
+
+// Asm returns an assembly syntax representation of the string s.
+func (s String) Asm() string { return fmt.Sprintf("$%q", s) }
+
+// Bytes returns the length of s.
+func (s String) Bytes() int { return len(s) }
+
+func (s String) constant() {}
+
+// Imm returns an unsigned integer constant with size guessed from x.
+func Imm(x uint64) Constant {
+ switch {
+ case uint64(uint8(x)) == x:
+ return U8(x)
+ case uint64(uint16(x)) == x:
+ return U16(x)
+ case uint64(uint32(x)) == x:
+ return U32(x)
+ }
+ return U64(x)
+}
diff --git a/vendor/github.com/mmcloughlin/avo/operand/doc.go b/vendor/github.com/mmcloughlin/avo/operand/doc.go
new file mode 100644
index 0000000..51c44df
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/operand/doc.go
@@ -0,0 +1,2 @@
+// Package operand provides types for instruction operands.
+package operand
diff --git a/vendor/github.com/mmcloughlin/avo/operand/types.go b/vendor/github.com/mmcloughlin/avo/operand/types.go
new file mode 100644
index 0000000..878425e
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/operand/types.go
@@ -0,0 +1,151 @@
+package operand
+
+import (
+ "fmt"
+
+ "github.com/mmcloughlin/avo/reg"
+)
+
+// Op is an operand.
+type Op interface {
+ Asm() string
+}
+
+// Symbol represents a symbol name.
+type Symbol struct {
+ Name string
+ Static bool // only visible in current source file
+}
+
+// NewStaticSymbol builds a static Symbol. Static symbols are only visible in the current source file.
+func NewStaticSymbol(name string) Symbol {
+ return Symbol{Name: name, Static: true}
+}
+
+func (s Symbol) String() string {
+ n := s.Name
+ if s.Static {
+ n += "<>"
+ }
+ return n
+}
+
+// Mem represents a memory reference.
+type Mem struct {
+ Symbol Symbol
+ Disp int
+ Base reg.Register
+ Index reg.Register
+ Scale uint8
+}
+
+// NewParamAddr is a convenience to build a Mem operand pointing to a function
+// parameter, which is a named offset from the frame pointer pseudo register.
+func NewParamAddr(name string, offset int) Mem {
+ return Mem{
+ Symbol: Symbol{
+ Name: name,
+ Static: false,
+ },
+ Disp: offset,
+ Base: reg.FramePointer,
+ }
+}
+
+// NewStackAddr returns a memory reference relative to the stack pointer.
+func NewStackAddr(offset int) Mem {
+ return Mem{
+ Disp: offset,
+ Base: reg.StackPointer,
+ }
+}
+
+// NewDataAddr returns a memory reference relative to the named data symbol.
+func NewDataAddr(sym Symbol, offset int) Mem {
+ return Mem{
+ Symbol: sym,
+ Disp: offset,
+ Base: reg.StaticBase,
+ }
+}
+
+// Offset returns a reference to m plus idx bytes.
+func (m Mem) Offset(idx int) Mem {
+ a := m
+ a.Disp += idx
+ return a
+}
+
+// Idx returns a new memory reference with (Index, Scale) set to (r, s).
+func (m Mem) Idx(r reg.Register, s uint8) Mem {
+ a := m
+ a.Index = r
+ a.Scale = s
+ return a
+}
+
+// Asm returns an assembly syntax representation of m.
+func (m Mem) Asm() string {
+ a := m.Symbol.String()
+ if a != "" {
+ a += fmt.Sprintf("%+d", m.Disp)
+ } else if m.Disp != 0 {
+ a += fmt.Sprintf("%d", m.Disp)
+ }
+ if m.Base != nil {
+ a += fmt.Sprintf("(%s)", m.Base.Asm())
+ }
+ if m.Index != nil && m.Scale != 0 {
+ a += fmt.Sprintf("(%s*%d)", m.Index.Asm(), m.Scale)
+ }
+ return a
+}
+
+// Rel is an offset relative to the instruction pointer.
+type Rel int32
+
+// Asm returns an assembly syntax representation of r.
+func (r Rel) Asm() string {
+ return fmt.Sprintf(".%+d", r)
+}
+
+// LabelRef is a reference to a label.
+type LabelRef string
+
+// Asm returns an assembly syntax representation of l.
+func (l LabelRef) Asm() string {
+ return string(l)
+}
+
+// Registers returns the list of all operands involved in the given operand.
+func Registers(op Op) []reg.Register {
+ switch op := op.(type) {
+ case reg.Register:
+ return []reg.Register{op}
+ case Mem:
+ var r []reg.Register
+ if op.Base != nil {
+ r = append(r, op.Base)
+ }
+ if op.Index != nil {
+ r = append(r, op.Index)
+ }
+ return r
+ case Constant, Rel, LabelRef:
+ return nil
+ }
+ panic("unknown operand type")
+}
+
+// ApplyAllocation returns an operand with allocated registers replaced. Registers missing from the allocation are left alone.
+func ApplyAllocation(op Op, a reg.Allocation) Op {
+ switch op := op.(type) {
+ case reg.Register:
+ return a.LookupRegisterDefault(op)
+ case Mem:
+ op.Base = a.LookupRegisterDefault(op.Base)
+ op.Index = a.LookupRegisterDefault(op.Index)
+ return op
+ }
+ return op
+}
diff --git a/vendor/github.com/mmcloughlin/avo/operand/zconst.go b/vendor/github.com/mmcloughlin/avo/operand/zconst.go
new file mode 100644
index 0000000..324b4a9
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/operand/zconst.go
@@ -0,0 +1,75 @@
+// Code generated by make_const.go. DO NOT EDIT.
+
+package operand
+
+import "fmt"
+
+// I8 is a 8-bit signed integer constant.
+type I8 int8
+
+func (i I8) Asm() string { return fmt.Sprintf("$%+d", i) }
+func (i I8) Bytes() int { return 1 }
+func (i I8) constant() {}
+
+// U8 is a 8-bit unsigned integer constant.
+type U8 uint8
+
+func (u U8) Asm() string { return fmt.Sprintf("$%#02x", u) }
+func (u U8) Bytes() int { return 1 }
+func (u U8) constant() {}
+
+// I16 is a 16-bit signed integer constant.
+type I16 int16
+
+func (i I16) Asm() string { return fmt.Sprintf("$%+d", i) }
+func (i I16) Bytes() int { return 2 }
+func (i I16) constant() {}
+
+// U16 is a 16-bit unsigned integer constant.
+type U16 uint16
+
+func (u U16) Asm() string { return fmt.Sprintf("$%#04x", u) }
+func (u U16) Bytes() int { return 2 }
+func (u U16) constant() {}
+
+// F32 is a 32-bit floating point constant.
+type F32 float32
+
+func (f F32) Asm() string { return fmt.Sprintf("$(%#v)", f) }
+func (f F32) Bytes() int { return 4 }
+func (f F32) constant() {}
+
+// I32 is a 32-bit signed integer constant.
+type I32 int32
+
+func (i I32) Asm() string { return fmt.Sprintf("$%+d", i) }
+func (i I32) Bytes() int { return 4 }
+func (i I32) constant() {}
+
+// U32 is a 32-bit unsigned integer constant.
+type U32 uint32
+
+func (u U32) Asm() string { return fmt.Sprintf("$%#08x", u) }
+func (u U32) Bytes() int { return 4 }
+func (u U32) constant() {}
+
+// F64 is a 64-bit floating point constant.
+type F64 float64
+
+func (f F64) Asm() string { return fmt.Sprintf("$(%#v)", f) }
+func (f F64) Bytes() int { return 8 }
+func (f F64) constant() {}
+
+// I64 is a 64-bit signed integer constant.
+type I64 int64
+
+func (i I64) Asm() string { return fmt.Sprintf("$%+d", i) }
+func (i I64) Bytes() int { return 8 }
+func (i I64) constant() {}
+
+// U64 is a 64-bit unsigned integer constant.
+type U64 uint64
+
+func (u U64) Asm() string { return fmt.Sprintf("$%#016x", u) }
+func (u U64) Bytes() int { return 8 }
+func (u U64) constant() {}
diff --git a/vendor/github.com/mmcloughlin/avo/pass/alloc.go b/vendor/github.com/mmcloughlin/avo/pass/alloc.go
new file mode 100644
index 0000000..fc7773a
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/pass/alloc.go
@@ -0,0 +1,190 @@
+package pass
+
+import (
+ "errors"
+ "math"
+ "sort"
+
+ "github.com/mmcloughlin/avo/reg"
+)
+
+// edge is an edge of the interference graph, indicating that registers X and Y
+// must be in non-conflicting registers.
+type edge struct {
+ X, Y reg.ID
+}
+
+// Allocator is a graph-coloring register allocator.
+type Allocator struct {
+ registers []reg.ID
+ allocation reg.Allocation
+ edges []*edge
+ possible map[reg.ID][]reg.ID
+}
+
+// NewAllocator builds an allocator for the given physical registers.
+func NewAllocator(rs []reg.Physical) (*Allocator, error) {
+ // Set of IDs, excluding restricted registers.
+ idset := map[reg.ID]bool{}
+ for _, r := range rs {
+ if (r.Info() & reg.Restricted) != 0 {
+ continue
+ }
+ idset[r.ID()] = true
+ }
+
+ if len(idset) == 0 {
+ return nil, errors.New("no allocatable registers")
+ }
+
+ // Produce slice of unique register IDs.
+ var ids []reg.ID
+ for id := range idset {
+ ids = append(ids, id)
+ }
+ sort.Slice(ids, func(i, j int) bool { return ids[i] < ids[j] })
+
+ return &Allocator{
+ registers: ids,
+ allocation: reg.NewEmptyAllocation(),
+ possible: map[reg.ID][]reg.ID{},
+ }, nil
+}
+
+// NewAllocatorForKind builds an allocator for the given kind of registers.
+func NewAllocatorForKind(k reg.Kind) (*Allocator, error) {
+ f := reg.FamilyOfKind(k)
+ if f == nil {
+ return nil, errors.New("unknown register family")
+ }
+ return NewAllocator(f.Registers())
+}
+
+// AddInterferenceSet records that r interferes with every register in s. Convenience wrapper around AddInterference.
+func (a *Allocator) AddInterferenceSet(r reg.Register, s reg.MaskSet) {
+ for id, mask := range s {
+ if (r.Mask() & mask) != 0 {
+ a.AddInterference(r.ID(), id)
+ }
+ }
+}
+
+// AddInterference records that x and y must be assigned to non-conflicting physical registers.
+func (a *Allocator) AddInterference(x, y reg.ID) {
+ a.Add(x)
+ a.Add(y)
+ a.edges = append(a.edges, &edge{X: x, Y: y})
+}
+
+// Add adds a register to be allocated. Does nothing if the register has already been added.
+func (a *Allocator) Add(v reg.ID) {
+ if !v.IsVirtual() {
+ return
+ }
+ if _, found := a.possible[v]; found {
+ return
+ }
+ a.possible[v] = a.possibleregisters(v)
+}
+
+// Allocate allocates physical registers.
+func (a *Allocator) Allocate() (reg.Allocation, error) {
+ for {
+ if err := a.update(); err != nil {
+ return nil, err
+ }
+
+ if a.remaining() == 0 {
+ break
+ }
+
+ v := a.mostrestricted()
+ if err := a.alloc(v); err != nil {
+ return nil, err
+ }
+ }
+ return a.allocation, nil
+}
+
+// update possible allocations based on edges.
+func (a *Allocator) update() error {
+ var rem []*edge
+ for _, e := range a.edges {
+ x := a.allocation.LookupDefault(e.X)
+ y := a.allocation.LookupDefault(e.Y)
+ switch {
+ case x.IsVirtual() && y.IsVirtual():
+ rem = append(rem, e)
+ continue
+ case x.IsPhysical() && y.IsPhysical():
+ if x == y {
+ return errors.New("impossible register allocation")
+ }
+ case x.IsPhysical() && y.IsVirtual():
+ a.discardconflicting(y, x)
+ case x.IsVirtual() && y.IsPhysical():
+ a.discardconflicting(x, y)
+ default:
+ panic("unreachable")
+ }
+ }
+ a.edges = rem
+
+ return nil
+}
+
+// mostrestricted returns the virtual register with the least possibilities.
+func (a *Allocator) mostrestricted() reg.ID {
+ n := int(math.MaxInt32)
+ var v reg.ID
+ for w, p := range a.possible {
+ // On a tie, choose the smallest ID in numeric order. This avoids
+ // non-deterministic allocations due to map iteration order.
+ if len(p) < n || (len(p) == n && w < v) {
+ n = len(p)
+ v = w
+ }
+ }
+ return v
+}
+
+// discardconflicting removes registers from vs possible list that conflict with p.
+func (a *Allocator) discardconflicting(v, p reg.ID) {
+ a.possible[v] = filterregisters(a.possible[v], func(r reg.ID) bool {
+ return r != p
+ })
+}
+
+// alloc attempts to allocate a register to v.
+func (a *Allocator) alloc(v reg.ID) error {
+ ps := a.possible[v]
+ if len(ps) == 0 {
+ return errors.New("failed to allocate registers")
+ }
+ p := ps[0]
+ a.allocation[v] = p
+ delete(a.possible, v)
+ return nil
+}
+
+// remaining returns the number of unallocated registers.
+func (a *Allocator) remaining() int {
+ return len(a.possible)
+}
+
+// possibleregisters returns all allocate-able registers for the given virtual.
+func (a *Allocator) possibleregisters(v reg.ID) []reg.ID {
+ return filterregisters(a.registers, func(r reg.ID) bool {
+ return v.Kind() == r.Kind()
+ })
+}
+
+func filterregisters(in []reg.ID, predicate func(reg.ID) bool) []reg.ID {
+ var rs []reg.ID
+ for _, r := range in {
+ if predicate(r) {
+ rs = append(rs, r)
+ }
+ }
+ return rs
+}
diff --git a/vendor/github.com/mmcloughlin/avo/pass/cfg.go b/vendor/github.com/mmcloughlin/avo/pass/cfg.go
new file mode 100644
index 0000000..d5f6ea4
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/pass/cfg.go
@@ -0,0 +1,81 @@
+package pass
+
+import (
+ "errors"
+ "fmt"
+
+ "github.com/mmcloughlin/avo/ir"
+)
+
+// LabelTarget populates the LabelTarget of the given function. This maps from
+// label name to the following instruction.
+func LabelTarget(fn *ir.Function) error {
+ target := map[ir.Label]*ir.Instruction{}
+ var pending []ir.Label
+ for _, node := range fn.Nodes {
+ switch n := node.(type) {
+ case ir.Label:
+ if _, found := target[n]; found {
+ return fmt.Errorf("duplicate label \"%s\"", n)
+ }
+ pending = append(pending, n)
+ case *ir.Instruction:
+ for _, label := range pending {
+ target[label] = n
+ }
+ pending = nil
+ }
+ }
+ if len(pending) != 0 {
+ return errors.New("function ends with label")
+ }
+ fn.LabelTarget = target
+ return nil
+}
+
+// CFG constructs the call-flow-graph for the function.
+func CFG(fn *ir.Function) error {
+ is := fn.Instructions()
+ n := len(is)
+
+ // Populate successors.
+ for i := 0; i < n; i++ {
+ cur := is[i]
+ var nxt *ir.Instruction
+ if i+1 < n {
+ nxt = is[i+1]
+ }
+
+ // If it's a branch, locate the target.
+ if cur.IsBranch {
+ lbl := cur.TargetLabel()
+ if lbl == nil {
+ return errors.New("no label for branch instruction")
+ }
+ target, found := fn.LabelTarget[*lbl]
+ if !found {
+ return fmt.Errorf("unknown label %q", *lbl)
+ }
+ cur.Succ = append(cur.Succ, target)
+ }
+
+ // Otherwise, could continue to the following instruction.
+ switch {
+ case cur.IsTerminal:
+ case cur.IsUnconditionalBranch():
+ default:
+ cur.Succ = append(cur.Succ, nxt)
+ }
+ }
+
+ // Populate predecessors.
+ for _, i := range is {
+ for _, s := range i.Succ {
+ if s != nil {
+ s.Pred = append(s.Pred, i)
+ }
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/mmcloughlin/avo/pass/cleanup.go b/vendor/github.com/mmcloughlin/avo/pass/cleanup.go
new file mode 100644
index 0000000..d91250f
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/pass/cleanup.go
@@ -0,0 +1,123 @@
+package pass
+
+import (
+ "github.com/mmcloughlin/avo/ir"
+ "github.com/mmcloughlin/avo/operand"
+)
+
+// PruneJumpToFollowingLabel removes jump instructions that target an
+// immediately following label.
+func PruneJumpToFollowingLabel(fn *ir.Function) error {
+ for i := 0; i+1 < len(fn.Nodes); i++ {
+ node := fn.Nodes[i]
+ next := fn.Nodes[i+1]
+
+ // This node is an unconditional jump.
+ inst, ok := node.(*ir.Instruction)
+ if !ok || !inst.IsBranch || inst.IsConditional {
+ continue
+ }
+
+ target := inst.TargetLabel()
+ if target == nil {
+ continue
+ }
+
+ // And the jump target is the immediately following node.
+ lbl, ok := next.(ir.Label)
+ if !ok || lbl != *target {
+ continue
+ }
+
+ // Then the jump is unnecessary and can be removed.
+ fn.Nodes = deletenode(fn.Nodes, i)
+ i--
+ }
+
+ return nil
+}
+
+// PruneDanglingLabels removes labels that are not referenced by any branches.
+func PruneDanglingLabels(fn *ir.Function) error {
+ // Count label references.
+ count := map[ir.Label]int{}
+ for _, n := range fn.Nodes {
+ i, ok := n.(*ir.Instruction)
+ if !ok || !i.IsBranch {
+ continue
+ }
+
+ target := i.TargetLabel()
+ if target == nil {
+ continue
+ }
+
+ count[*target]++
+ }
+
+ // Look for labels with no references.
+ for i := 0; i < len(fn.Nodes); i++ {
+ node := fn.Nodes[i]
+ lbl, ok := node.(ir.Label)
+ if !ok {
+ continue
+ }
+
+ if count[lbl] == 0 {
+ fn.Nodes = deletenode(fn.Nodes, i)
+ i--
+ }
+ }
+
+ return nil
+}
+
+// PruneSelfMoves removes move instructions from one register to itself.
+func PruneSelfMoves(fn *ir.Function) error {
+ return removeinstructions(fn, func(i *ir.Instruction) bool {
+ switch i.Opcode {
+ case "MOVB", "MOVW", "MOVL", "MOVQ":
+ default:
+ return false
+ }
+
+ return operand.IsRegister(i.Operands[0]) && operand.IsRegister(i.Operands[1]) && i.Operands[0] == i.Operands[1]
+ })
+}
+
+// removeinstructions deletes instructions from the given function which match predicate.
+func removeinstructions(fn *ir.Function, predicate func(*ir.Instruction) bool) error {
+ // Removal of instructions has the potential to invalidate CFG structures.
+ // Clear them to prevent accidental use of stale structures after this pass.
+ invalidatecfg(fn)
+
+ for i := 0; i < len(fn.Nodes); i++ {
+ n := fn.Nodes[i]
+
+ inst, ok := n.(*ir.Instruction)
+ if !ok || !predicate(inst) {
+ continue
+ }
+
+ fn.Nodes = deletenode(fn.Nodes, i)
+ }
+
+ return nil
+}
+
+// deletenode deletes node i from nodes and returns the resulting slice.
+func deletenode(nodes []ir.Node, i int) []ir.Node {
+ n := len(nodes)
+ copy(nodes[i:], nodes[i+1:])
+ nodes[n-1] = nil
+ return nodes[:n-1]
+}
+
+// invalidatecfg clears CFG structures.
+func invalidatecfg(fn *ir.Function) {
+ fn.LabelTarget = nil
+ for _, i := range fn.Instructions() {
+ i.Pred = nil
+ i.Succ = nil
+ }
+}
diff --git a/vendor/github.com/mmcloughlin/avo/pass/isa.go b/vendor/github.com/mmcloughlin/avo/pass/isa.go
new file mode 100644
index 0000000..951834d
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/pass/isa.go
@@ -0,0 +1,31 @@
+package pass
+
+import (
+ "sort"
+
+ "github.com/mmcloughlin/avo/ir"
+)
+
+// RequiredISAExtensions determines ISA extensions required for the given
+// function. Populates the ISA field.
+func RequiredISAExtensions(fn *ir.Function) error {
+ // Collect ISA set.
+ set := map[string]bool{}
+ for _, i := range fn.Instructions() {
+ for _, isa := range i.ISA {
+ set[isa] = true
+ }
+ }
+
+ if len(set) == 0 {
+ return nil
+ }
+
+ // Populate the function's ISA field with the unique sorted list.
+ for isa := range set {
+ fn.ISA = append(fn.ISA, isa)
+ }
+ sort.Strings(fn.ISA)
+
+ return nil
+}
diff --git a/vendor/github.com/mmcloughlin/avo/pass/pass.go b/vendor/github.com/mmcloughlin/avo/pass/pass.go
new file mode 100644
index 0000000..62f37b1
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/pass/pass.go
@@ -0,0 +1,100 @@
+// Package pass implements processing passes on avo Files.
+package pass
+
+import (
+ "io"
+
+ "github.com/mmcloughlin/avo/ir"
+ "github.com/mmcloughlin/avo/printer"
+)
+
+// Compile pass compiles an avo file. Upon successful completion the avo file
+// may be printed to Go assembly.
+var Compile = Concat(
+ Verify,
+ FunctionPass(PruneJumpToFollowingLabel),
+ FunctionPass(PruneDanglingLabels),
+ FunctionPass(LabelTarget),
+ FunctionPass(CFG),
+ InstructionPass(ZeroExtend32BitOutputs),
+ FunctionPass(Liveness),
+ FunctionPass(AllocateRegisters),
+ FunctionPass(BindRegisters),
+ FunctionPass(VerifyAllocation),
+ Func(IncludeTextFlagHeader),
+ FunctionPass(PruneSelfMoves),
+ FunctionPass(RequiredISAExtensions),
+)
+
+// Interface for a processing pass.
+type Interface interface {
+ Execute(*ir.File) error
+}
+
+// Func adapts a function to the pass Interface.
+type Func func(*ir.File) error
+
+// Execute calls p.
+func (p Func) Execute(f *ir.File) error {
+ return p(f)
+}
+
+// FunctionPass is a convenience for implementing a full file pass with a
+// function that operates on each avo Function independently.
+type FunctionPass func(*ir.Function) error
+
+// Execute calls p on every function in the file. Exits on the first error.
+func (p FunctionPass) Execute(f *ir.File) error {
+ for _, fn := range f.Functions() {
+ if err := p(fn); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// InstructionPass is a convenience for implementing a full file pass with a
+// function that operates on each Instruction independently.
+type InstructionPass func(*ir.Instruction) error
+
+// Execute calls p on every instruction in the file. Exits on the first error.
+func (p InstructionPass) Execute(f *ir.File) error {
+ for _, fn := range f.Functions() {
+ for _, i := range fn.Instructions() {
+ if err := p(i); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+// Concat returns a pass that executes the given passes in order, stopping on the first error.
+func Concat(passes ...Interface) Interface {
+ return Func(func(f *ir.File) error {
+ for _, p := range passes {
+ if err := p.Execute(f); err != nil {
+ return err
+ }
+ }
+ return nil
+ })
+}
+
+// Output pass prints a file.
+type Output struct {
+ Writer io.WriteCloser
+ Printer printer.Printer
+}
+
+// Execute prints f with the configured Printer and writes output to Writer.
+func (o *Output) Execute(f *ir.File) error {
+ b, err := o.Printer.Print(f)
+ if err != nil {
+ return err
+ }
+ if _, err = o.Writer.Write(b); err != nil {
+ return err
+ }
+ return o.Writer.Close()
+}
diff --git a/vendor/github.com/mmcloughlin/avo/pass/reg.go b/vendor/github.com/mmcloughlin/avo/pass/reg.go
new file mode 100644
index 0000000..79147b0
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/pass/reg.go
@@ -0,0 +1,139 @@
+package pass
+
+import (
+ "errors"
+
+ "github.com/mmcloughlin/avo/ir"
+ "github.com/mmcloughlin/avo/operand"
+ "github.com/mmcloughlin/avo/reg"
+)
+
+// ZeroExtend32BitOutputs applies the rule that "32-bit operands generate a
+// 32-bit result, zero-extended to a 64-bit result in the destination
+// general-purpose register" (Intel Software Developer’s Manual, Volume 1,
+// 3.4.1.1).
+func ZeroExtend32BitOutputs(i *ir.Instruction) error {
+ for j, op := range i.Outputs {
+ if !operand.IsR32(op) {
+ continue
+ }
+ r, ok := op.(reg.GP)
+ if !ok {
+ panic("r32 operand should satisfy reg.GP")
+ }
+ i.Outputs[j] = r.As64()
+ }
+ return nil
+}
+
+// Liveness computes register liveness.
+func Liveness(fn *ir.Function) error {
+ // Note this implementation is initially naive so as to be "obviously correct".
+ // There are a well-known optimizations we can apply if necessary.
+
+ is := fn.Instructions()
+
+ // Process instructions in reverse: poor approximation to topological sort.
+ // TODO(mbm): process instructions in topological sort order
+ for l, r := 0, len(is)-1; l < r; l, r = l+1, r-1 {
+ is[l], is[r] = is[r], is[l]
+ }
+
+ // Initialize.
+ for _, i := range is {
+ i.LiveIn = reg.NewMaskSetFromRegisters(i.InputRegisters())
+ i.LiveOut = reg.NewEmptyMaskSet()
+ }
+
+ // Iterative dataflow analysis.
+ for {
+ changes := false
+
+ for _, i := range is {
+ // out[n] = UNION[s IN succ[n]] in[s]
+ for _, s := range i.Succ {
+ if s == nil {
+ continue
+ }
+ changes = i.LiveOut.Update(s.LiveIn) || changes
+ }
+
+ // in[n] = use[n] UNION (out[n] - def[n])
+ def := reg.NewMaskSetFromRegisters(i.OutputRegisters())
+ changes = i.LiveIn.Update(i.LiveOut.Difference(def)) || changes
+ }
+
+ if !changes {
+ break
+ }
+ }
+
+ return nil
+}
+
+// AllocateRegisters performs register allocation.
+func AllocateRegisters(fn *ir.Function) error {
+ // Populate allocators (one per kind).
+ as := map[reg.Kind]*Allocator{}
+ for _, i := range fn.Instructions() {
+ for _, r := range i.Registers() {
+ k := r.Kind()
+ if _, found := as[k]; !found {
+ a, err := NewAllocatorForKind(k)
+ if err != nil {
+ return err
+ }
+ as[k] = a
+ }
+ as[k].Add(r.ID())
+ }
+ }
+
+ // Record register interferences.
+ for _, i := range fn.Instructions() {
+ for _, d := range i.OutputRegisters() {
+ k := d.Kind()
+ out := i.LiveOut.OfKind(k)
+ out.DiscardRegister(d)
+ as[k].AddInterferenceSet(d, out)
+ }
+ }
+
+ // Execute register allocation.
+ fn.Allocation = reg.NewEmptyAllocation()
+ for _, a := range as {
+ al, err := a.Allocate()
+ if err != nil {
+ return err
+ }
+ if err := fn.Allocation.Merge(al); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+// BindRegisters applies the result of register allocation, replacing all virtual registers with their assigned physical registers.
+func BindRegisters(fn *ir.Function) error {
+ for _, i := range fn.Instructions() {
+ for idx := range i.Operands {
+ i.Operands[idx] = operand.ApplyAllocation(i.Operands[idx], fn.Allocation)
+ }
+ }
+ return nil
+}
+
+// VerifyAllocation performs sanity checks following register allocation.
+func VerifyAllocation(fn *ir.Function) error {
+ // All registers should be physical.
+ for _, i := range fn.Instructions() {
+ for _, r := range i.Registers() {
+ if reg.ToPhysical(r) == nil {
+ return errors.New("non physical register found")
+ }
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/mmcloughlin/avo/pass/textflag.go b/vendor/github.com/mmcloughlin/avo/pass/textflag.go
new file mode 100644
index 0000000..35a848b
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/pass/textflag.go
@@ -0,0 +1,42 @@
+package pass
+
+import (
+ "github.com/mmcloughlin/avo/attr"
+ "github.com/mmcloughlin/avo/ir"
+)
+
+// IncludeTextFlagHeader includes textflag.h if necessary.
+func IncludeTextFlagHeader(f *ir.File) error {
+ const textflagheader = "textflag.h"
+
+ // Check if we already have it.
+ for _, path := range f.Includes {
+ if path == textflagheader {
+ return nil
+ }
+ }
+
+ // Add it if necessary.
+ if requirestextflags(f) {
+ f.Includes = append(f.Includes, textflagheader)
+ }
+
+ return nil
+}
+
+// requirestextflags returns whether the file uses flags in the textflags.h header.
+func requirestextflags(f *ir.File) bool {
+ for _, s := range f.Sections {
+ var a attr.Attribute
+ switch s := s.(type) {
+ case *ir.Function:
+ a = s.Attributes
+ case *ir.Global:
+ a = s.Attributes
+ }
+ if a.ContainsTextFlags() {
+ return true
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/mmcloughlin/avo/pass/verify.go b/vendor/github.com/mmcloughlin/avo/pass/verify.go
new file mode 100644
index 0000000..1e7b368
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/pass/verify.go
@@ -0,0 +1,32 @@
+package pass
+
+import (
+ "errors"
+
+ "github.com/mmcloughlin/avo/ir"
+ "github.com/mmcloughlin/avo/operand"
+)
+
+// Verify pass validates an avo file.
+var Verify = Concat(
+ InstructionPass(VerifyMemOperands),
+)
+
+// VerifyMemOperands checks the instruction's memory operands.
+func VerifyMemOperands(i *ir.Instruction) error {
+ for _, op := range i.Operands {
+ m, ok := op.(operand.Mem)
+ if !ok {
+ continue
+ }
+
+ if m.Base == nil {
+ return errors.New("bad memory operand: missing base register")
+ }
+
+ if m.Index != nil && m.Scale == 0 {
+ return errors.New("bad memory operand: index register with scale 0")
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/mmcloughlin/avo/printer/goasm.go b/vendor/github.com/mmcloughlin/avo/printer/goasm.go
new file mode 100644
index 0000000..0d8a12c
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/printer/goasm.go
@@ -0,0 +1,186 @@
+package printer
+
+import (
+ "strconv"
+ "strings"
+
+ "github.com/mmcloughlin/avo/internal/prnt"
+ "github.com/mmcloughlin/avo/ir"
+ "github.com/mmcloughlin/avo/operand"
+)
+
+// dot is the pesky unicode dot used in Go assembly.
+const dot = "\u00b7"
+
+type goasm struct {
+ cfg Config
+ prnt.Generator
+
+ instructions []*ir.Instruction
+ clear bool
+}
+
+// NewGoAsm constructs a printer for writing Go assembly files.
+func NewGoAsm(cfg Config) Printer {
+ return &goasm{cfg: cfg}
+}
+
+func (p *goasm) Print(f *ir.File) ([]byte, error) {
+ p.header(f)
+ for _, s := range f.Sections {
+ switch s := s.(type) {
+ case *ir.Function:
+ p.function(s)
+ case *ir.Global:
+ p.global(s)
+ default:
+ panic("unknown section type")
+ }
+ }
+ return p.Result()
+}
+
+func (p *goasm) header(f *ir.File) {
+ p.Comment(p.cfg.GeneratedWarning())
+
+ if len(f.Constraints) > 0 {
+ p.NL()
+ p.Printf(f.Constraints.GoString())
+ }
+
+ if len(f.Includes) > 0 {
+ p.NL()
+ p.includes(f.Includes)
+ }
+}
+
+func (p *goasm) includes(paths []string) {
+ for _, path := range paths {
+ p.Printf("#include \"%s\"\n", path)
+ }
+}
+
+func (p *goasm) function(f *ir.Function) {
+ p.NL()
+ p.Comment(f.Stub())
+
+ if len(f.ISA) > 0 {
+ p.Comment("Requires: " + strings.Join(f.ISA, ", "))
+ }
+
+ // Reference: https://github.com/golang/go/blob/b115207baf6c2decc3820ada4574ef4e5ad940ec/src/cmd/internal/obj/util.go#L166-L176
+ //
+ // if p.As == ATEXT {
+ // // If there are attributes, print them. Otherwise, skip the comma.
+ // // In short, print one of these two:
+ // // TEXT foo(SB), DUPOK|NOSPLIT, $0
+ // // TEXT foo(SB), $0
+ // s := p.From.Sym.Attribute.TextAttrString()
+ // if s != "" {
+ // fmt.Fprintf(&buf, "%s%s", sep, s)
+ // sep = ", "
+ // }
+ // }
+ //
+ p.Printf("TEXT %s%s(SB)", dot, f.Name)
+ if f.Attributes != 0 {
+ p.Printf(", %s", f.Attributes.Asm())
+ }
+ p.Printf(", %s\n", textsize(f))
+
+ p.clear = true
+ for _, node := range f.Nodes {
+ switch n := node.(type) {
+ case *ir.Instruction:
+ p.instruction(n)
+ if n.IsTerminal || n.IsUnconditionalBranch() {
+ p.flush()
+ }
+ case ir.Label:
+ p.flush()
+ p.ensureclear()
+ p.Printf("%s:\n", n)
+ case *ir.Comment:
+ p.flush()
+ p.ensureclear()
+ for _, line := range n.Lines {
+ p.Printf("\t// %s\n", line)
+ }
+ default:
+ panic("unexpected node type")
+ }
+ }
+ p.flush()
+}
+
+func (p *goasm) instruction(i *ir.Instruction) {
+ p.instructions = append(p.instructions, i)
+ p.clear = false
+}
+
+func (p *goasm) flush() {
+ if len(p.instructions) == 0 {
+ return
+ }
+
+ // Determine instruction width. Instructions with no operands are not
+ // considered in this calculation.
+ width := 0
+ for _, i := range p.instructions {
+ if len(i.Operands) > 0 && len(i.Opcode) > width {
+ width = len(i.Opcode)
+ }
+ }
+
+ // Output instruction block.
+ for _, i := range p.instructions {
+ if len(i.Operands) > 0 {
+ p.Printf("\t%-*s%s\n", width+1, i.Opcode, joinOperands(i.Operands))
+ } else {
+ p.Printf("\t%s\n", i.Opcode)
+ }
+ }
+
+ p.instructions = nil
+}
+
+func (p *goasm) ensureclear() {
+ if !p.clear {
+ p.NL()
+ p.clear = true
+ }
+}
+
+func (p *goasm) global(g *ir.Global) {
+ p.NL()
+ for _, d := range g.Data {
+ a := operand.NewDataAddr(g.Symbol, d.Offset)
+ p.Printf("DATA %s/%d, %s\n", a.Asm(), d.Value.Bytes(), d.Value.Asm())
+ }
+ p.Printf("GLOBL %s(SB), %s, $%d\n", g.Symbol, g.Attributes.Asm(), g.Size)
+}
+
+func textsize(f *ir.Function) string {
+ // Reference: https://github.com/golang/go/blob/b115207baf6c2decc3820ada4574ef4e5ad940ec/src/cmd/internal/obj/util.go#L260-L265
+ //
+ // case TYPE_TEXTSIZE:
+ // if a.Val.(int32) == objabi.ArgsSizeUnknown {
+ // str = fmt.Sprintf("$%d", a.Offset)
+ // } else {
+ // str = fmt.Sprintf("$%d-%d", a.Offset, a.Val.(int32))
+ // }
+ //
+ s := "$" + strconv.Itoa(f.FrameBytes())
+ if argsize := f.ArgumentBytes(); argsize > 0 {
+ return s + "-" + strconv.Itoa(argsize)
+ }
+ return s
+}
+
+func joinOperands(operands []operand.Op) string {
+ asm := make([]string, len(operands))
+ for i, op := range operands {
+ asm[i] = op.Asm()
+ }
+ return strings.Join(asm, ", ")
+}
diff --git a/vendor/github.com/mmcloughlin/avo/printer/printer.go b/vendor/github.com/mmcloughlin/avo/printer/printer.go
new file mode 100644
index 0000000..b562c74
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/printer/printer.go
@@ -0,0 +1,98 @@
+// Package printer implements printing of avo files in various formats.
+package printer
+
+import (
+ "fmt"
+ "os"
+ "path/filepath"
+ "strings"
+
+ "github.com/mmcloughlin/avo/internal/stack"
+ "github.com/mmcloughlin/avo/ir"
+)
+
+// Printer can produce output for an avo File.
+type Printer interface {
+ Print(*ir.File) ([]byte, error)
+}
+
+// Builder can construct a printer.
+type Builder func(Config) Printer
+
+// Config represents general printing configuration.
+type Config struct {
+ // Command-line arguments passed to the generator. If provided, this will be
+ // included in a code generation warning.
+ Argv []string
+
+ // Name of the code generator.
+ Name string
+
+ // Name of Go package the generated code will belong to.
+ Pkg string
+}
+
+// NewDefaultConfig produces a config with Name "avo".
+// The package name is guessed from the current directory.
+func NewDefaultConfig() Config {
+ return Config{
+ Name: "avo",
+ Pkg: pkg(),
+ }
+}
+
+// NewArgvConfig constructs a Config from os.Args.
+// The package name is guessed from the current directory.
+func NewArgvConfig() Config {
+ return Config{
+ Argv: os.Args,
+ Pkg: pkg(),
+ }
+}
+
+// NewGoRunConfig produces a Config for a generator that's expected to be
+// executed via "go run ...".
+func NewGoRunConfig() Config {
+ path := mainfile()
+ if path == "" {
+ return NewDefaultConfig()
+ }
+ argv := []string{"go", "run", filepath.Base(path)}
+ if len(os.Args) > 1 {
+ argv = append(argv, os.Args[1:]...)
+ }
+ return Config{
+ Argv: argv,
+ Pkg: pkg(),
+ }
+}
+
+// GeneratedBy returns a description of the code generator.
+func (c Config) GeneratedBy() string {
+ if c.Argv == nil {
+ return c.Name
+ }
+ return fmt.Sprintf("command: %s", strings.Join(c.Argv, " "))
+}
+
+// GeneratedWarning returns text for a code generation warning. Conforms to https://golang.org/s/generatedcode.
+func (c Config) GeneratedWarning() string {
+ return fmt.Sprintf("Code generated by %s. DO NOT EDIT.", c.GeneratedBy())
+}
+
+// mainfile attempts to determine the file path of the main function by
+// inspecting the stack. Returns empty string on failure.
+func mainfile() string {
+ if m := stack.Main(); m != nil {
+ return m.File
+ }
+ return ""
+}
+
+// pkg guesses the name of the package from the working directory.
+func pkg() string {
+ if cwd, err := os.Getwd(); err == nil {
+ return filepath.Base(cwd)
+ }
+ return ""
+}
diff --git a/vendor/github.com/mmcloughlin/avo/printer/stubs.go b/vendor/github.com/mmcloughlin/avo/printer/stubs.go
new file mode 100644
index 0000000..171bc62
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/printer/stubs.go
@@ -0,0 +1,45 @@
+package printer
+
+import (
+ "github.com/mmcloughlin/avo/internal/prnt"
+ "github.com/mmcloughlin/avo/ir"
+)
+
+type stubs struct {
+ cfg Config
+ prnt.Generator
+}
+
+// NewStubs constructs a printer for writing stub function declarations.
+func NewStubs(cfg Config) Printer {
+ return &stubs{cfg: cfg}
+}
+
+func (s *stubs) Print(f *ir.File) ([]byte, error) {
+ s.Comment(s.cfg.GeneratedWarning())
+
+ if len(f.Constraints) > 0 {
+ s.NL()
+ s.Printf(f.Constraints.GoString())
+ }
+
+ s.NL()
+ s.Printf("package %s\n", s.cfg.Pkg)
+ for _, fn := range f.Functions() {
+ s.NL()
+ s.Comment(fn.Doc...)
+ for _, pragma := range fn.Pragmas {
+ s.pragma(pragma)
+ }
+ s.Printf("%s\n", fn.Stub())
+ }
+ return s.Result()
+}
+
+func (s *stubs) pragma(p ir.Pragma) {
+ s.Printf("//go:%s", p.Directive)
+ for _, arg := range p.Arguments {
+ s.Printf(" %s", arg)
+ }
+ s.NL()
+}
diff --git a/vendor/github.com/mmcloughlin/avo/reg/collection.go b/vendor/github.com/mmcloughlin/avo/reg/collection.go
new file mode 100644
index 0000000..d35c3a0
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/reg/collection.go
@@ -0,0 +1,54 @@
+package reg
+
+// Collection represents a collection of virtual registers. This is primarily
+// useful for allocating virtual registers with distinct IDs.
+type Collection struct {
+ idx map[Kind]Index
+}
+
+// NewCollection builds an empty register collection.
+func NewCollection() *Collection {
+ return &Collection{
+ idx: map[Kind]Index{},
+ }
+}
+
+// VirtualRegister allocates and returns a new virtual register of the given kind and width.
+func (c *Collection) VirtualRegister(k Kind, s Spec) Virtual {
+ idx := c.idx[k]
+ c.idx[k]++
+ return NewVirtual(idx, k, s)
+}
+
+// GP8L allocates and returns a general-purpose 8-bit register (low byte).
+func (c *Collection) GP8L() GPVirtual { return c.GP(S8L) }
+
+// GP8H allocates and returns a general-purpose 8-bit register (high byte).
+func (c *Collection) GP8H() GPVirtual { return c.GP(S8H) }
+
+// GP8 allocates and returns a general-purpose 8-bit register (low byte).
+func (c *Collection) GP8() GPVirtual { return c.GP8L() }
+
+// GP16 allocates and returns a general-purpose 16-bit register.
+func (c *Collection) GP16() GPVirtual { return c.GP(S16) }
+
+// GP32 allocates and returns a general-purpose 32-bit register.
+func (c *Collection) GP32() GPVirtual { return c.GP(S32) }
+
+// GP64 allocates and returns a general-purpose 64-bit register.
+func (c *Collection) GP64() GPVirtual { return c.GP(S64) }
+
+// GP allocates and returns a general-purpose register of the given width.
+func (c *Collection) GP(s Spec) GPVirtual { return newgpv(c.VirtualRegister(KindGP, s)) }
+
+// XMM allocates and returns a 128-bit vector register.
+func (c *Collection) XMM() VecVirtual { return c.Vec(S128) }
+
+// YMM allocates and returns a 256-bit vector register.
+func (c *Collection) YMM() VecVirtual { return c.Vec(S256) }
+
+// ZMM allocates and returns a 512-bit vector register.
+func (c *Collection) ZMM() VecVirtual { return c.Vec(S512) }
+
+// Vec allocates and returns a vector register of the given width.
+func (c *Collection) Vec(s Spec) VecVirtual { return newvecv(c.VirtualRegister(KindVector, s)) }
diff --git a/vendor/github.com/mmcloughlin/avo/reg/doc.go b/vendor/github.com/mmcloughlin/avo/reg/doc.go
new file mode 100644
index 0000000..1c0aee3
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/reg/doc.go
@@ -0,0 +1,2 @@
+// Package reg provides types for physical and virtual registers, and definitions of x86-64 register families.
+package reg
diff --git a/vendor/github.com/mmcloughlin/avo/reg/set.go b/vendor/github.com/mmcloughlin/avo/reg/set.go
new file mode 100644
index 0000000..2cf8814
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/reg/set.go
@@ -0,0 +1,112 @@
+package reg
+
+// MaskSet maps register IDs to masks.
+type MaskSet map[ID]uint16
+
+// NewEmptyMaskSet builds an empty register mask set.
+func NewEmptyMaskSet() MaskSet {
+ return MaskSet{}
+}
+
+// NewMaskSetFromRegisters forms a mask set from the given register list.
+func NewMaskSetFromRegisters(rs []Register) MaskSet {
+ s := NewEmptyMaskSet()
+ for _, r := range rs {
+ s.AddRegister(r)
+ }
+ return s
+}
+
+// Clone returns a copy of s.
+func (s MaskSet) Clone() MaskSet {
+ c := NewEmptyMaskSet()
+ for id, mask := range s {
+ c.Add(id, mask)
+ }
+ return c
+}
+
+// Add mask to the given register ID.
+// Reports whether this made any change to the set.
+func (s MaskSet) Add(id ID, mask uint16) bool {
+ if (s[id] & mask) == mask {
+ return false
+ }
+ s[id] |= mask
+ return true
+}
+
+// AddRegister is a convenience for adding the register's (ID, mask) to the set.
+// Reports whether this made any change to the set.
+func (s MaskSet) AddRegister(r Register) bool {
+ return s.Add(r.ID(), r.Mask())
+}
+
+// Discard clears masked bits from register ID.
+// Reports whether this made any change to the set.
+func (s MaskSet) Discard(id ID, mask uint16) bool {
+ if curr, found := s[id]; !found || (curr&mask) == 0 {
+ return false
+ }
+ s[id] &^= mask
+ if s[id] == 0 {
+ delete(s, id)
+ }
+ return true
+}
+
+// DiscardRegister is a convenience for discarding the register's (ID, mask) from the set.
+// Reports whether this made any change to the set.
+func (s MaskSet) DiscardRegister(r Register) bool {
+ return s.Discard(r.ID(), r.Mask())
+}
+
+// Update adds masks in t to s.
+// Reports whether this made any change to the set.
+func (s MaskSet) Update(t MaskSet) bool {
+ change := false
+ for id, mask := range t {
+ change = s.Add(id, mask) || change
+ }
+ return change
+}
+
+// Difference returns the set of registers in s but not t.
+func (s MaskSet) Difference(t MaskSet) MaskSet {
+ d := s.Clone()
+ d.DifferenceUpdate(t)
+ return d
+}
+
+// DifferenceUpdate removes every element of t from s.
+func (s MaskSet) DifferenceUpdate(t MaskSet) bool {
+ change := false
+ for id, mask := range t {
+ change = s.Discard(id, mask) || change
+ }
+ return change
+}
+
+// Equals returns true if s and t contain the same masks.
+func (s MaskSet) Equals(t MaskSet) bool {
+ if len(s) != len(t) {
+ return false
+ }
+ for id, mask := range s {
+ if _, found := t[id]; !found || mask != t[id] {
+ return false
+ }
+ }
+ return true
+}
+
+// OfKind returns the set of elements of s with kind k.
+func (s MaskSet) OfKind(k Kind) MaskSet {
+ t := NewEmptyMaskSet()
+ for id, mask := range s {
+ if id.Kind() == k {
+ t.Add(id, mask)
+ }
+ }
+ return t
+}
diff --git a/vendor/github.com/mmcloughlin/avo/reg/types.go b/vendor/github.com/mmcloughlin/avo/reg/types.go
new file mode 100644
index 0000000..9f69e91
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/reg/types.go
@@ -0,0 +1,304 @@
+package reg
+
+import (
+ "errors"
+ "fmt"
+)
+
+// Kind is a class of registers.
+type Kind uint8
+
+// Index of a register within a kind.
+type Index uint16
+
+// Family is a collection of Physical registers of a common kind.
+type Family struct {
+ Kind Kind
+ registers []Physical
+}
+
+// define builds a register and adds it to the Family.
+func (f *Family) define(s Spec, idx Index, name string, flags ...Info) Physical {
+ r := newregister(f, s, idx, name, flags...)
+ f.add(r)
+ return r
+}
+
+// add r to the family.
+func (f *Family) add(r Physical) {
+ if r.Kind() != f.Kind {
+ panic("bad kind")
+ }
+ f.registers = append(f.registers, r)
+}
+
+// Virtual returns a virtual register from this family's kind.
+func (f *Family) Virtual(idx Index, s Spec) Virtual {
+ return NewVirtual(idx, f.Kind, s)
+}
+
+// Registers returns the registers in this family.
+func (f *Family) Registers() []Physical {
+ return append([]Physical(nil), f.registers...)
+}
+
+// Lookup returns the register with given physical index and spec. Returns nil if no such register exists.
+func (f *Family) Lookup(idx Index, s Spec) Physical {
+ for _, r := range f.registers {
+ if r.PhysicalIndex() == idx && r.Mask() == s.Mask() {
+ return r
+ }
+ }
+ return nil
+}
+
+// ID is a register identifier.
+type ID uint32
+
+// newid builds a new register ID from the virtual flag v, kind and index.
+func newid(v uint8, kind Kind, idx Index) ID {
+ return ID(v) | (ID(kind) << 8) | (ID(idx) << 16)
+}
+
+// IsVirtual reports whether this is an ID for a virtual register.
+func (id ID) IsVirtual() bool { return (id & 1) == 1 }
+
+// IsPhysical reports whether this is an ID for a physical register.
+func (id ID) IsPhysical() bool { return !id.IsVirtual() }
+
+// Kind extracts the kind from the register ID.
+func (id ID) Kind() Kind { return Kind(id >> 8) }
+
+// Index extracts the index from the register ID.
+func (id ID) Index() Index { return Index(id >> 16) }
+
+// Register represents a virtual or physical register.
+type Register interface {
+ ID() ID
+ Kind() Kind
+ Size() uint
+ Mask() uint16
+ Asm() string
+ as(Spec) Register
+ spec() Spec
+ register()
+}
+
+// Equal reports whether a and b are equal registers.
+func Equal(a, b Register) bool {
+ return (a.ID() == b.ID()) && (a.Mask() == b.Mask())
+}
+
+// Virtual is a register of a given type and size, not yet allocated to a physical register.
+type Virtual interface {
+ VirtualIndex() Index
+ Register
+}
+
+// ToVirtual converts r to Virtual if possible, otherwise returns nil.
+func ToVirtual(r Register) Virtual {
+ if v, ok := r.(Virtual); ok {
+ return v
+ }
+ return nil
+}
+
+type virtual struct {
+ idx Index
+ kind Kind
+ Spec
+}
+
+// NewVirtual builds a Virtual register.
+func NewVirtual(idx Index, k Kind, s Spec) Virtual {
+ return virtual{
+ idx: idx,
+ kind: k,
+ Spec: s,
+ }
+}
+
+func (v virtual) ID() ID { return newid(1, v.kind, v.idx) }
+func (v virtual) VirtualIndex() Index { return v.idx }
+func (v virtual) Kind() Kind { return v.kind }
+
+func (v virtual) Asm() string {
+ // TODO(mbm): decide on virtual register syntax
+ return fmt.Sprintf("<virtual:%v:%v:%v>", v.idx, v.Kind(), v.Size())
+}
+
+func (v virtual) as(s Spec) Register {
+ return virtual{
+ idx: v.idx,
+ kind: v.kind,
+ Spec: s,
+ }
+}
+
+func (v virtual) spec() Spec { return v.Spec }
+func (v virtual) register() {}
+
+// Info is a bitmask of register properties.
+type Info uint8
+
+// Defined register Info flags.
+const (
+ None Info = 0
+ Restricted Info = 1 << iota
+)
+
+// Physical is a concrete register.
+type Physical interface {
+ PhysicalIndex() Index
+ Info() Info
+ Register
+}
+
+// ToPhysical converts r to Physical if possible, otherwise returns nil.
+func ToPhysical(r Register) Physical {
+ if p, ok := r.(Physical); ok {
+ return p
+ }
+ return nil
+}
+
+// register implements Physical.
+type register struct {
+ family *Family
+ idx Index
+ name string
+ info Info
+ Spec
+}
+
+func newregister(f *Family, s Spec, idx Index, name string, flags ...Info) register {
+ r := register{
+ family: f,
+ idx: idx,
+ name: name,
+ info: None,
+ Spec: s,
+ }
+ for _, flag := range flags {
+ r.info |= flag
+ }
+ return r
+}
+
+func (r register) ID() ID { return newid(0, r.Kind(), r.idx) }
+func (r register) PhysicalIndex() Index { return r.idx }
+func (r register) Kind() Kind { return r.family.Kind }
+func (r register) Asm() string { return r.name }
+func (r register) Info() Info { return r.info }
+
+func (r register) as(s Spec) Register {
+ return r.family.Lookup(r.PhysicalIndex(), s)
+}
+
+func (r register) spec() Spec { return r.Spec }
+func (r register) register() {}
+
+// Spec defines the size of a register as well as the bit ranges it occupies in
+// an underlying physical register.
+type Spec uint16
+
+// Spec values required for x86-64.
+const (
+ S0 Spec = 0x0 // zero value reserved for pseudo registers
+ S8L Spec = 0x1
+ S8H Spec = 0x2
+ S8 = S8L
+ S16 Spec = 0x3
+ S32 Spec = 0x7
+ S64 Spec = 0xf
+ S128 Spec = 0x1f
+ S256 Spec = 0x3f
+ S512 Spec = 0x7f
+)
+
+// Mask returns a mask representing which bytes of an underlying register are
+// used by this register. This is almost always the low bytes, except for the
+// case of the high-byte registers. If bit n of the mask is set, this means
+// bytes 2^(n-1) to 2^n-1 are used.
+func (s Spec) Mask() uint16 {
+ return uint16(s)
+}
+
+// Size returns the register width in bytes.
+func (s Spec) Size() uint {
+ x := uint(s)
+ return (x >> 1) + (x & 1)
+}
+
+// LookupPhysical returns the physical register with the given parameters, or nil if not found.
+func LookupPhysical(k Kind, idx Index, s Spec) Physical {
+ f := FamilyOfKind(k)
+ if f == nil {
+ return nil
+ }
+ return f.Lookup(idx, s)
+}
+
+// LookupID returns the physical register with the given id and spec, or nil if not found.
+func LookupID(id ID, s Spec) Physical {
+ if id.IsVirtual() {
+ return nil
+ }
+ return LookupPhysical(id.Kind(), id.Index(), s)
+}
+
+// Allocation records a register allocation.
+type Allocation map[ID]ID
+
+// NewEmptyAllocation builds an empty register allocation.
+func NewEmptyAllocation() Allocation {
+ return Allocation{}
+}
+
+// Merge allocations from b into a. Errors if there is disagreement on a common
+// register.
+func (a Allocation) Merge(b Allocation) error {
+ for id, p := range b {
+ if alt, found := a[id]; found && alt != p {
+ return errors.New("disagreement on overlapping register")
+ }
+ a[id] = p
+ }
+ return nil
+}
+
+// LookupDefault returns the register ID assigned by this allocation, returning
+// id if none is found.
+func (a Allocation) LookupDefault(id ID) ID {
+ if _, found := a[id]; found {
+ return a[id]
+ }
+ return id
+}
+
+// LookupRegister the allocation for register r, or return nil if there is none.
+func (a Allocation) LookupRegister(r Register) Physical {
+ // Return immediately if it is already a physical register.
+ if p := ToPhysical(r); p != nil {
+ return p
+ }
+
+ // Lookup an allocation for this virtual ID.
+ id, found := a[r.ID()]
+ if !found {
+ return nil
+ }
+
+ return LookupID(id, r.spec())
+}
+
+// LookupRegisterDefault returns the register assigned to r, or r itself if there is none.
+func (a Allocation) LookupRegisterDefault(r Register) Register {
+ if r == nil {
+ return nil
+ }
+ if p := a.LookupRegister(r); p != nil {
+ return p
+ }
+ return r
+}
diff --git a/vendor/github.com/mmcloughlin/avo/reg/x86.go b/vendor/github.com/mmcloughlin/avo/reg/x86.go
new file mode 100644
index 0000000..a1ec94c
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/reg/x86.go
@@ -0,0 +1,331 @@
+package reg
+
+// Register kinds.
+const (
+ KindPseudo Kind = iota
+ KindGP
+ KindVector
+)
+
+// Declare register families.
+var (
+ Pseudo = &Family{Kind: KindPseudo}
+ GeneralPurpose = &Family{Kind: KindGP}
+ Vector = &Family{Kind: KindVector}
+
+ Families = []*Family{
+ Pseudo,
+ GeneralPurpose,
+ Vector,
+ }
+)
+
+var familiesByKind = map[Kind]*Family{}
+
+func init() {
+ for _, f := range Families {
+ familiesByKind[f.Kind] = f
+ }
+}
+
+// FamilyOfKind returns the Family of registers of the given kind, or nil if not found.
+func FamilyOfKind(k Kind) *Family {
+ return familiesByKind[k]
+}
+
+// Pseudo registers.
+var (
+ FramePointer = Pseudo.define(S0, 0, "FP")
+ ProgramCounter = Pseudo.define(S0, 0, "PC")
+ StaticBase = Pseudo.define(S0, 0, "SB")
+ StackPointer = Pseudo.define(S0, 0, "SP")
+)
+
+// GP provides additional methods for general purpose registers.
+type GP interface {
+ As8() Register
+ As8L() Register
+ As8H() Register
+ As16() Register
+ As32() Register
+ As64() Register
+}
+
+// GPPhysical is a general-purpose physical register.
+type GPPhysical interface {
+ Physical
+ GP
+}
+
+type gpp struct {
+ Physical
+}
+
+func newgpp(r Physical) GPPhysical { return gpp{Physical: r} }
+
+func (p gpp) As8() Register { return newgpp(p.as(S8).(Physical)) }
+func (p gpp) As8L() Register { return newgpp(p.as(S8L).(Physical)) }
+func (p gpp) As8H() Register { return newgpp(p.as(S8H).(Physical)) }
+func (p gpp) As16() Register { return newgpp(p.as(S16).(Physical)) }
+func (p gpp) As32() Register { return newgpp(p.as(S32).(Physical)) }
+func (p gpp) As64() Register { return newgpp(p.as(S64).(Physical)) }
+
+// GPVirtual is a general-purpose virtual register.
+type GPVirtual interface {
+ Virtual
+ GP
+}
+
+type gpv struct {
+ Virtual
+}
+
+func newgpv(v Virtual) GPVirtual { return gpv{Virtual: v} }
+
+func (v gpv) As8() Register { return newgpv(v.as(S8).(Virtual)) }
+func (v gpv) As8L() Register { return newgpv(v.as(S8L).(Virtual)) }
+func (v gpv) As8H() Register { return newgpv(v.as(S8H).(Virtual)) }
+func (v gpv) As16() Register { return newgpv(v.as(S16).(Virtual)) }
+func (v gpv) As32() Register { return newgpv(v.as(S32).(Virtual)) }
+func (v gpv) As64() Register { return newgpv(v.as(S64).(Virtual)) }
+
+func gp(s Spec, id Index, name string, flags ...Info) GPPhysical {
+ r := newgpp(newregister(GeneralPurpose, s, id, name, flags...))
+ GeneralPurpose.add(r)
+ return r
+}
+
+// General purpose registers.
+var (
+ // Low byte
+ AL = gp(S8L, 0, "AL")
+ CL = gp(S8L, 1, "CL")
+ DL = gp(S8L, 2, "DL")
+ BL = gp(S8L, 3, "BL")
+
+ // High byte
+ AH = gp(S8H, 0, "AH")
+ CH = gp(S8H, 1, "CH")
+ DH = gp(S8H, 2, "DH")
+ BH = gp(S8H, 3, "BH")
+
+ // 8-bit
+ SPB = gp(S8, 4, "SP", Restricted)
+ BPB = gp(S8, 5, "BP")
+ SIB = gp(S8, 6, "SI")
+ DIB = gp(S8, 7, "DI")
+ R8B = gp(S8, 8, "R8")
+ R9B = gp(S8, 9, "R9")
+ R10B = gp(S8, 10, "R10")
+ R11B = gp(S8, 11, "R11")
+ R12B = gp(S8, 12, "R12")
+ R13B = gp(S8, 13, "R13")
+ R14B = gp(S8, 14, "R14")
+ R15B = gp(S8, 15, "R15")
+
+ // 16-bit
+ AX = gp(S16, 0, "AX")
+ CX = gp(S16, 1, "CX")
+ DX = gp(S16, 2, "DX")
+ BX = gp(S16, 3, "BX")
+ SP = gp(S16, 4, "SP", Restricted)
+ BP = gp(S16, 5, "BP")
+ SI = gp(S16, 6, "SI")
+ DI = gp(S16, 7, "DI")
+ R8W = gp(S16, 8, "R8")
+ R9W = gp(S16, 9, "R9")
+ R10W = gp(S16, 10, "R10")
+ R11W = gp(S16, 11, "R11")
+ R12W = gp(S16, 12, "R12")
+ R13W = gp(S16, 13, "R13")
+ R14W = gp(S16, 14, "R14")
+ R15W = gp(S16, 15, "R15")
+
+ // 32-bit
+ EAX = gp(S32, 0, "AX")
+ ECX = gp(S32, 1, "CX")
+ EDX = gp(S32, 2, "DX")
+ EBX = gp(S32, 3, "BX")
+ ESP = gp(S32, 4, "SP", Restricted)
+ EBP = gp(S32, 5, "BP")
+ ESI = gp(S32, 6, "SI")
+ EDI = gp(S32, 7, "DI")
+ R8L = gp(S32, 8, "R8")
+ R9L = gp(S32, 9, "R9")
+ R10L = gp(S32, 10, "R10")
+ R11L = gp(S32, 11, "R11")
+ R12L = gp(S32, 12, "R12")
+ R13L = gp(S32, 13, "R13")
+ R14L = gp(S32, 14, "R14")
+ R15L = gp(S32, 15, "R15")
+
+ // 64-bit
+ RAX = gp(S64, 0, "AX")
+ RCX = gp(S64, 1, "CX")
+ RDX = gp(S64, 2, "DX")
+ RBX = gp(S64, 3, "BX")
+ RSP = gp(S64, 4, "SP", Restricted)
+ RBP = gp(S64, 5, "BP")
+ RSI = gp(S64, 6, "SI")
+ RDI = gp(S64, 7, "DI")
+ R8 = gp(S64, 8, "R8")
+ R9 = gp(S64, 9, "R9")
+ R10 = gp(S64, 10, "R10")
+ R11 = gp(S64, 11, "R11")
+ R12 = gp(S64, 12, "R12")
+ R13 = gp(S64, 13, "R13")
+ R14 = gp(S64, 14, "R14")
+ R15 = gp(S64, 15, "R15")
+)
+
+// Vec provides methods for vector registers.
+type Vec interface {
+ AsX() Register
+ AsY() Register
+ AsZ() Register
+}
+
+// VecPhysical is a physical vector register.
+type VecPhysical interface {
+ Physical
+ Vec
+}
+
+type vecp struct {
+ Physical
+ Vec
+}
+
+func newvecp(r Physical) VecPhysical { return vecp{Physical: r} }
+
+func (p vecp) AsX() Register { return newvecp(p.as(S128).(Physical)) }
+func (p vecp) AsY() Register { return newvecp(p.as(S256).(Physical)) }
+func (p vecp) AsZ() Register { return newvecp(p.as(S512).(Physical)) }
+
+// VecVirtual is a virtual vector register.
+type VecVirtual interface {
+ Virtual
+ Vec
+}
+
+type vecv struct {
+ Virtual
+ Vec
+}
+
+func newvecv(v Virtual) VecVirtual { return vecv{Virtual: v} }
+
+func (v vecv) AsX() Register { return newvecv(v.as(S128).(Virtual)) }
+func (v vecv) AsY() Register { return newvecv(v.as(S256).(Virtual)) }
+func (v vecv) AsZ() Register { return newvecv(v.as(S512).(Virtual)) }
+
+func vec(s Spec, id Index, name string, flags ...Info) VecPhysical {
+ r := newvecp(newregister(Vector, s, id, name, flags...))
+ Vector.add(r)
+ return r
+}
+
+// Vector registers.
+var (
+ // 128-bit
+ X0 = vec(S128, 0, "X0")
+ X1 = vec(S128, 1, "X1")
+ X2 = vec(S128, 2, "X2")
+ X3 = vec(S128, 3, "X3")
+ X4 = vec(S128, 4, "X4")
+ X5 = vec(S128, 5, "X5")
+ X6 = vec(S128, 6, "X6")
+ X7 = vec(S128, 7, "X7")
+ X8 = vec(S128, 8, "X8")
+ X9 = vec(S128, 9, "X9")
+ X10 = vec(S128, 10, "X10")
+ X11 = vec(S128, 11, "X11")
+ X12 = vec(S128, 12, "X12")
+ X13 = vec(S128, 13, "X13")
+ X14 = vec(S128, 14, "X14")
+ X15 = vec(S128, 15, "X15")
+ X16 = vec(S128, 16, "X16")
+ X17 = vec(S128, 17, "X17")
+ X18 = vec(S128, 18, "X18")
+ X19 = vec(S128, 19, "X19")
+ X20 = vec(S128, 20, "X20")
+ X21 = vec(S128, 21, "X21")
+ X22 = vec(S128, 22, "X22")
+ X23 = vec(S128, 23, "X23")
+ X24 = vec(S128, 24, "X24")
+ X25 = vec(S128, 25, "X25")
+ X26 = vec(S128, 26, "X26")
+ X27 = vec(S128, 27, "X27")
+ X28 = vec(S128, 28, "X28")
+ X29 = vec(S128, 29, "X29")
+ X30 = vec(S128, 30, "X30")
+ X31 = vec(S128, 31, "X31")
+
+ // 256-bit
+ Y0 = vec(S256, 0, "Y0")
+ Y1 = vec(S256, 1, "Y1")
+ Y2 = vec(S256, 2, "Y2")
+ Y3 = vec(S256, 3, "Y3")
+ Y4 = vec(S256, 4, "Y4")
+ Y5 = vec(S256, 5, "Y5")
+ Y6 = vec(S256, 6, "Y6")
+ Y7 = vec(S256, 7, "Y7")
+ Y8 = vec(S256, 8, "Y8")
+ Y9 = vec(S256, 9, "Y9")
+ Y10 = vec(S256, 10, "Y10")
+ Y11 = vec(S256, 11, "Y11")
+ Y12 = vec(S256, 12, "Y12")
+ Y13 = vec(S256, 13, "Y13")
+ Y14 = vec(S256, 14, "Y14")
+ Y15 = vec(S256, 15, "Y15")
+ Y16 = vec(S256, 16, "Y16")
+ Y17 = vec(S256, 17, "Y17")
+ Y18 = vec(S256, 18, "Y18")
+ Y19 = vec(S256, 19, "Y19")
+ Y20 = vec(S256, 20, "Y20")
+ Y21 = vec(S256, 21, "Y21")
+ Y22 = vec(S256, 22, "Y22")
+ Y23 = vec(S256, 23, "Y23")
+ Y24 = vec(S256, 24, "Y24")
+ Y25 = vec(S256, 25, "Y25")
+ Y26 = vec(S256, 26, "Y26")
+ Y27 = vec(S256, 27, "Y27")
+ Y28 = vec(S256, 28, "Y28")
+ Y29 = vec(S256, 29, "Y29")
+ Y30 = vec(S256, 30, "Y30")
+ Y31 = vec(S256, 31, "Y31")
+
+ // 512-bit
+ Z0 = vec(S512, 0, "Z0")
+ Z1 = vec(S512, 1, "Z1")
+ Z2 = vec(S512, 2, "Z2")
+ Z3 = vec(S512, 3, "Z3")
+ Z4 = vec(S512, 4, "Z4")
+ Z5 = vec(S512, 5, "Z5")
+ Z6 = vec(S512, 6, "Z6")
+ Z7 = vec(S512, 7, "Z7")
+ Z8 = vec(S512, 8, "Z8")
+ Z9 = vec(S512, 9, "Z9")
+ Z10 = vec(S512, 10, "Z10")
+ Z11 = vec(S512, 11, "Z11")
+ Z12 = vec(S512, 12, "Z12")
+ Z13 = vec(S512, 13, "Z13")
+ Z14 = vec(S512, 14, "Z14")
+ Z15 = vec(S512, 15, "Z15")
+ Z16 = vec(S512, 16, "Z16")
+ Z17 = vec(S512, 17, "Z17")
+ Z18 = vec(S512, 18, "Z18")
+ Z19 = vec(S512, 19, "Z19")
+ Z20 = vec(S512, 20, "Z20")
+ Z21 = vec(S512, 21, "Z21")
+ Z22 = vec(S512, 22, "Z22")
+ Z23 = vec(S512, 23, "Z23")
+ Z24 = vec(S512, 24, "Z24")
+ Z25 = vec(S512, 25, "Z25")
+ Z26 = vec(S512, 26, "Z26")
+ Z27 = vec(S512, 27, "Z27")
+ Z28 = vec(S512, 28, "Z28")
+ Z29 = vec(S512, 29, "Z29")
+ Z30 = vec(S512, 30, "Z30")
+ Z31 = vec(S512, 31, "Z31")
+)
diff --git a/vendor/github.com/mmcloughlin/avo/src/src.go b/vendor/github.com/mmcloughlin/avo/src/src.go
new file mode 100644
index 0000000..3a47886
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/src/src.go
@@ -0,0 +1,62 @@
+// Package src provides types for working with source files.
+package src
+
+import (
+ "os"
+ "path/filepath"
+ "runtime"
+ "strconv"
+)
+
+// Position represents a position in a source file.
+type Position struct {
+ Filename string
+ Line int // 1-up
+}
+
+// FramePosition returns the Position of the given stack frame.
+func FramePosition(f runtime.Frame) Position {
+ return Position{
+ Filename: f.File,
+ Line: f.Line,
+ }
+}
+
+// IsValid reports whether the position is valid: Line must be positive, but
+// Filename may be empty.
+func (p Position) IsValid() bool {
+ return p.Line > 0
+}
+
+// String represents Position as a string.
+func (p Position) String() string {
+ if !p.IsValid() {
+ return "-"
+ }
+ var s string
+ if p.Filename != "" {
+ s += p.Filename + ":"
+ }
+ s += strconv.Itoa(p.Line)
+ return s
+}
+
+// Rel returns Position relative to basepath. If the given filename cannot be
+// expressed relative to basepath the position will be returned unchanged.
+func (p Position) Rel(basepath string) Position {
+ q := p
+ if rel, err := filepath.Rel(basepath, q.Filename); err == nil {
+ q.Filename = rel
+ }
+ return q
+}
+
+// Relwd returns Position relative to the current working directory. Returns p
+// unchanged if the working directory cannot be determined, or the filename
+// cannot be expressed relative to the working directory.
+func (p Position) Relwd() Position {
+ if wd, err := os.Getwd(); err == nil {
+ return p.Rel(wd)
+ }
+ return p
+}
diff --git a/vendor/github.com/mmcloughlin/avo/x86/doc.go b/vendor/github.com/mmcloughlin/avo/x86/doc.go
new file mode 100644
index 0000000..6e4c8ee
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/x86/doc.go
@@ -0,0 +1,2 @@
+// Package x86 provides constructors for all x86-64 instructions.
+package x86
diff --git a/vendor/github.com/mmcloughlin/avo/x86/gen.go b/vendor/github.com/mmcloughlin/avo/x86/gen.go
new file mode 100644
index 0000000..25d15fa
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/x86/gen.go
@@ -0,0 +1,4 @@
+package x86
+
+//go:generate avogen -output zctors.go ctors
+//go:generate avogen -output zctors_test.go ctorstest
diff --git a/vendor/github.com/mmcloughlin/avo/x86/zctors.go b/vendor/github.com/mmcloughlin/avo/x86/zctors.go
new file mode 100644
index 0000000..447c0a1
--- /dev/null
+++ b/vendor/github.com/mmcloughlin/avo/x86/zctors.go
@@ -0,0 +1,34629 @@
+// Code generated by command: avogen -output zctors.go ctors. DO NOT EDIT.
+
+package x86
+
+import (
+ "errors"
+
+ intrep "github.com/mmcloughlin/avo/ir"
+ "github.com/mmcloughlin/avo/operand"
+ "github.com/mmcloughlin/avo/reg"
+)
+
+// ADCB: Add with Carry.
+//
+// Forms:
+//
+// ADCB imm8 al
+// ADCB imm8 r8
+// ADCB r8 r8
+// ADCB m8 r8
+// ADCB imm8 m8
+// ADCB r8 m8
+func ADCB(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imr) && operand.IsAL(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("ADCB: bad operands")
+}
+
+// ADCL: Add with Carry.
+//
+// Forms:
+//
+// ADCL imm32 eax
+// ADCL imm8 r32
+// ADCL imm32 r32
+// ADCL r32 r32
+// ADCL m32 r32
+// ADCL imm8 m32
+// ADCL imm32 m32
+// ADCL r32 m32
+func ADCL(imr, emr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsEAX(emr):
+ return &intrep.Instruction{
+ Opcode: "ADCL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADCL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADCL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADCL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADCL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADCL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADCL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADCL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ }
+ return nil, errors.New("ADCL: bad operands")
+}
+
+// ADCQ: Add with Carry.
+//
+// Forms:
+//
+// ADCQ imm32 rax
+// ADCQ imm8 r64
+// ADCQ imm32 r64
+// ADCQ r64 r64
+// ADCQ m64 r64
+// ADCQ imm8 m64
+// ADCQ imm32 m64
+// ADCQ r64 m64
+func ADCQ(imr, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsRAX(mr):
+ return &intrep.Instruction{
+ Opcode: "ADCQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADCQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADCQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADCQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADCQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADCQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADCQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADCQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("ADCQ: bad operands")
+}
+
+// ADCW: Add with Carry.
+//
+// Forms:
+//
+// ADCW imm16 ax
+// ADCW imm8 r16
+// ADCW imm16 r16
+// ADCW r16 r16
+// ADCW m16 r16
+// ADCW imm8 m16
+// ADCW imm16 m16
+// ADCW r16 m16
+func ADCW(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM16(imr) && operand.IsAX(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADCW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("ADCW: bad operands")
+}
+
+// ADCXL: Unsigned Integer Addition of Two Operands with Carry Flag.
+//
+// Forms:
+//
+// ADCXL r32 r32
+// ADCXL m32 r32
+func ADCXL(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "ADCXL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"ADX"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "ADCXL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"ADX"},
+ }, nil
+ }
+ return nil, errors.New("ADCXL: bad operands")
+}
+
+// ADCXQ: Unsigned Integer Addition of Two Operands with Carry Flag.
+//
+// Forms:
+//
+// ADCXQ r64 r64
+// ADCXQ m64 r64
+func ADCXQ(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "ADCXQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"ADX"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "ADCXQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"ADX"},
+ }, nil
+ }
+ return nil, errors.New("ADCXQ: bad operands")
+}
+
+// ADDB: Add.
+//
+// Forms:
+//
+// ADDB imm8 al
+// ADDB imm8 r8
+// ADDB r8 r8
+// ADDB m8 r8
+// ADDB imm8 m8
+// ADDB r8 m8
+func ADDB(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imr) && operand.IsAL(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("ADDB: bad operands")
+}
+
+// ADDL: Add.
+//
+// Forms:
+//
+// ADDL imm32 eax
+// ADDL imm8 r32
+// ADDL imm32 r32
+// ADDL r32 r32
+// ADDL m32 r32
+// ADDL imm8 m32
+// ADDL imm32 m32
+// ADDL r32 m32
+func ADDL(imr, emr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsEAX(emr):
+ return &intrep.Instruction{
+ Opcode: "ADDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "ADDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ }
+ return nil, errors.New("ADDL: bad operands")
+}
+
+// ADDPD: Add Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// ADDPD xmm xmm
+// ADDPD m128 xmm
+func ADDPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ADDPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ADDPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("ADDPD: bad operands")
+}
+
+// ADDPS: Add Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// ADDPS xmm xmm
+// ADDPS m128 xmm
+func ADDPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ADDPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ADDPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("ADDPS: bad operands")
+}
+
+// ADDQ: Add.
+//
+// Forms:
+//
+// ADDQ imm32 rax
+// ADDQ imm8 r64
+// ADDQ imm32 r64
+// ADDQ r64 r64
+// ADDQ m64 r64
+// ADDQ imm8 m64
+// ADDQ imm32 m64
+// ADDQ r64 m64
+func ADDQ(imr, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsRAX(mr):
+ return &intrep.Instruction{
+ Opcode: "ADDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ADDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("ADDQ: bad operands")
+}
+
+// ADDSD: Add Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// ADDSD xmm xmm
+// ADDSD m64 xmm
+func ADDSD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ADDSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ADDSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("ADDSD: bad operands")
+}
+
+// ADDSS: Add Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// ADDSS xmm xmm
+// ADDSS m32 xmm
+func ADDSS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ADDSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ADDSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("ADDSS: bad operands")
+}
+
+// ADDSUBPD: Packed Double-FP Add/Subtract.
+//
+// Forms:
+//
+// ADDSUBPD xmm xmm
+// ADDSUBPD m128 xmm
+func ADDSUBPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ADDSUBPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ADDSUBPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ }
+ return nil, errors.New("ADDSUBPD: bad operands")
+}
+
+// ADDSUBPS: Packed Single-FP Add/Subtract.
+//
+// Forms:
+//
+// ADDSUBPS xmm xmm
+// ADDSUBPS m128 xmm
+func ADDSUBPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ADDSUBPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ADDSUBPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ }
+ return nil, errors.New("ADDSUBPS: bad operands")
+}
+
+// ADDW: Add.
+//
+// Forms:
+//
+// ADDW imm16 ax
+// ADDW imm8 r16
+// ADDW imm16 r16
+// ADDW r16 r16
+// ADDW m16 r16
+// ADDW imm8 m16
+// ADDW imm16 m16
+// ADDW r16 m16
+func ADDW(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM16(imr) && operand.IsAX(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "ADDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("ADDW: bad operands")
+}
+
+// ADOXL: Unsigned Integer Addition of Two Operands with Overflow Flag.
+//
+// Forms:
+//
+// ADOXL r32 r32
+// ADOXL m32 r32
+func ADOXL(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "ADOXL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"ADX"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "ADOXL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"ADX"},
+ }, nil
+ }
+ return nil, errors.New("ADOXL: bad operands")
+}
+
+// ADOXQ: Unsigned Integer Addition of Two Operands with Overflow Flag.
+//
+// Forms:
+//
+// ADOXQ r64 r64
+// ADOXQ m64 r64
+func ADOXQ(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "ADOXQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"ADX"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "ADOXQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"ADX"},
+ }, nil
+ }
+ return nil, errors.New("ADOXQ: bad operands")
+}
+
+// AESDEC: Perform One Round of an AES Decryption Flow.
+//
+// Forms:
+//
+// AESDEC xmm xmm
+// AESDEC m128 xmm
+func AESDEC(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "AESDEC",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AES"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "AESDEC",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AES"},
+ }, nil
+ }
+ return nil, errors.New("AESDEC: bad operands")
+}
+
+// AESDECLAST: Perform Last Round of an AES Decryption Flow.
+//
+// Forms:
+//
+// AESDECLAST xmm xmm
+// AESDECLAST m128 xmm
+func AESDECLAST(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "AESDECLAST",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AES"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "AESDECLAST",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AES"},
+ }, nil
+ }
+ return nil, errors.New("AESDECLAST: bad operands")
+}
+
+// AESENC: Perform One Round of an AES Encryption Flow.
+//
+// Forms:
+//
+// AESENC xmm xmm
+// AESENC m128 xmm
+func AESENC(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "AESENC",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AES"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "AESENC",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AES"},
+ }, nil
+ }
+ return nil, errors.New("AESENC: bad operands")
+}
+
+// AESENCLAST: Perform Last Round of an AES Encryption Flow.
+//
+// Forms:
+//
+// AESENCLAST xmm xmm
+// AESENCLAST m128 xmm
+func AESENCLAST(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "AESENCLAST",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AES"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "AESENCLAST",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AES"},
+ }, nil
+ }
+ return nil, errors.New("AESENCLAST: bad operands")
+}
+
+// AESIMC: Perform the AES InvMixColumn Transformation.
+//
+// Forms:
+//
+// AESIMC xmm xmm
+// AESIMC m128 xmm
+func AESIMC(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "AESIMC",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AES"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "AESIMC",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AES"},
+ }, nil
+ }
+ return nil, errors.New("AESIMC: bad operands")
+}
+
+// AESKEYGENASSIST: AES Round Key Generation Assist.
+//
+// Forms:
+//
+// AESKEYGENASSIST imm8 xmm xmm
+// AESKEYGENASSIST imm8 m128 xmm
+func AESKEYGENASSIST(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "AESKEYGENASSIST",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AES"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "AESKEYGENASSIST",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AES"},
+ }, nil
+ }
+ return nil, errors.New("AESKEYGENASSIST: bad operands")
+}
+
+// ANDB: Logical AND.
+//
+// Forms:
+//
+// ANDB imm8 al
+// ANDB imm8 r8
+// ANDB r8 r8
+// ANDB m8 r8
+// ANDB imm8 m8
+// ANDB r8 m8
+func ANDB(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imr) && operand.IsAL(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("ANDB: bad operands")
+}
+
+// ANDL: Logical AND.
+//
+// Forms:
+//
+// ANDL imm32 eax
+// ANDL imm8 r32
+// ANDL imm32 r32
+// ANDL r32 r32
+// ANDL m32 r32
+// ANDL imm8 m32
+// ANDL imm32 m32
+// ANDL r32 m32
+func ANDL(imr, emr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsEAX(emr):
+ return &intrep.Instruction{
+ Opcode: "ANDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ANDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ANDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ANDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ANDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "ANDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "ANDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "ANDL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ }
+ return nil, errors.New("ANDL: bad operands")
+}
+
+// ANDNL: Logical AND NOT.
+//
+// Forms:
+//
+// ANDNL r32 r32 r32
+// ANDNL m32 r32 r32
+func ANDNL(mr, r, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "ANDNL",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "ANDNL",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI"},
+ }, nil
+ }
+ return nil, errors.New("ANDNL: bad operands")
+}
+
+// ANDNPD: Bitwise Logical AND NOT of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// ANDNPD xmm xmm
+// ANDNPD m128 xmm
+func ANDNPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ANDNPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ANDNPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("ANDNPD: bad operands")
+}
+
+// ANDNPS: Bitwise Logical AND NOT of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// ANDNPS xmm xmm
+// ANDNPS m128 xmm
+func ANDNPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ANDNPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ANDNPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("ANDNPS: bad operands")
+}
+
+// ANDNQ: Logical AND NOT.
+//
+// Forms:
+//
+// ANDNQ r64 r64 r64
+// ANDNQ m64 r64 r64
+func ANDNQ(mr, r, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "ANDNQ",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "ANDNQ",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI"},
+ }, nil
+ }
+ return nil, errors.New("ANDNQ: bad operands")
+}
+
+// ANDPD: Bitwise Logical AND of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// ANDPD xmm xmm
+// ANDPD m128 xmm
+func ANDPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ANDPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ANDPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("ANDPD: bad operands")
+}
+
+// ANDPS: Bitwise Logical AND of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// ANDPS xmm xmm
+// ANDPS m128 xmm
+func ANDPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ANDPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ANDPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("ANDPS: bad operands")
+}
+
+// ANDQ: Logical AND.
+//
+// Forms:
+//
+// ANDQ imm32 rax
+// ANDQ imm8 r64
+// ANDQ imm32 r64
+// ANDQ r64 r64
+// ANDQ m64 r64
+// ANDQ imm8 m64
+// ANDQ imm32 m64
+// ANDQ r64 m64
+func ANDQ(imr, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsRAX(mr):
+ return &intrep.Instruction{
+ Opcode: "ANDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ANDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ANDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ANDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ANDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ANDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ANDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ANDQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("ANDQ: bad operands")
+}
+
+// ANDW: Logical AND.
+//
+// Forms:
+//
+// ANDW imm16 ax
+// ANDW imm8 r16
+// ANDW imm16 r16
+// ANDW r16 r16
+// ANDW m16 r16
+// ANDW imm8 m16
+// ANDW imm16 m16
+// ANDW r16 m16
+func ANDW(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM16(imr) && operand.IsAX(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "ANDW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("ANDW: bad operands")
+}
+
+// BEXTRL: Bit Field Extract.
+//
+// Forms:
+//
+// BEXTRL r32 r32 r32
+// BEXTRL r32 m32 r32
+func BEXTRL(r, mr, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(r) && operand.IsR32(mr) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "BEXTRL",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI"},
+ }, nil
+ case operand.IsR32(r) && operand.IsM32(mr) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "BEXTRL",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI"},
+ }, nil
+ }
+ return nil, errors.New("BEXTRL: bad operands")
+}
+
+// BEXTRQ: Bit Field Extract.
+//
+// Forms:
+//
+// BEXTRQ r64 r64 r64
+// BEXTRQ r64 m64 r64
+func BEXTRQ(r, mr, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(r) && operand.IsR64(mr) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "BEXTRQ",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI"},
+ }, nil
+ case operand.IsR64(r) && operand.IsM64(mr) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "BEXTRQ",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI"},
+ }, nil
+ }
+ return nil, errors.New("BEXTRQ: bad operands")
+}
+
+// BLENDPD: Blend Packed Double Precision Floating-Point Values.
+//
+// Forms:
+//
+// BLENDPD imm8 xmm xmm
+// BLENDPD imm8 m128 xmm
+func BLENDPD(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "BLENDPD",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "BLENDPD",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("BLENDPD: bad operands")
+}
+
+// BLENDPS: Blend Packed Single Precision Floating-Point Values.
+//
+// Forms:
+//
+// BLENDPS imm8 xmm xmm
+// BLENDPS imm8 m128 xmm
+func BLENDPS(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "BLENDPS",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "BLENDPS",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("BLENDPS: bad operands")
+}
+
+// BLENDVPD: Variable Blend Packed Double Precision Floating-Point Values.
+//
+// Forms:
+//
+// BLENDVPD xmm0 xmm xmm
+// BLENDVPD xmm0 m128 xmm
+func BLENDVPD(x, mx, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM0(x) && operand.IsXMM(mx) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "BLENDVPD",
+ Operands: []operand.Op{x, mx, x1},
+ Inputs: []operand.Op{x, mx, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsXMM0(x) && operand.IsM128(mx) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "BLENDVPD",
+ Operands: []operand.Op{x, mx, x1},
+ Inputs: []operand.Op{x, mx, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("BLENDVPD: bad operands")
+}
+
+// BLENDVPS: Variable Blend Packed Single Precision Floating-Point Values.
+//
+// Forms:
+//
+// BLENDVPS xmm0 xmm xmm
+// BLENDVPS xmm0 m128 xmm
+func BLENDVPS(x, mx, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM0(x) && operand.IsXMM(mx) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "BLENDVPS",
+ Operands: []operand.Op{x, mx, x1},
+ Inputs: []operand.Op{x, mx, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsXMM0(x) && operand.IsM128(mx) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "BLENDVPS",
+ Operands: []operand.Op{x, mx, x1},
+ Inputs: []operand.Op{x, mx, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("BLENDVPS: bad operands")
+}
+
+// BLSIL: Isolate Lowest Set Bit.
+//
+// Forms:
+//
+// BLSIL r32 r32
+// BLSIL m32 r32
+func BLSIL(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "BLSIL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "BLSIL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ }
+ return nil, errors.New("BLSIL: bad operands")
+}
+
+// BLSIQ: Isolate Lowest Set Bit.
+//
+// Forms:
+//
+// BLSIQ r64 r64
+// BLSIQ m64 r64
+func BLSIQ(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "BLSIQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "BLSIQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ }
+ return nil, errors.New("BLSIQ: bad operands")
+}
+
+// BLSMSKL: Mask From Lowest Set Bit.
+//
+// Forms:
+//
+// BLSMSKL r32 r32
+// BLSMSKL m32 r32
+func BLSMSKL(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "BLSMSKL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "BLSMSKL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ }
+ return nil, errors.New("BLSMSKL: bad operands")
+}
+
+// BLSMSKQ: Mask From Lowest Set Bit.
+//
+// Forms:
+//
+// BLSMSKQ r64 r64
+// BLSMSKQ m64 r64
+func BLSMSKQ(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "BLSMSKQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "BLSMSKQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ }
+ return nil, errors.New("BLSMSKQ: bad operands")
+}
+
+// BLSRL: Reset Lowest Set Bit.
+//
+// Forms:
+//
+// BLSRL r32 r32
+// BLSRL m32 r32
+func BLSRL(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "BLSRL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "BLSRL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ }
+ return nil, errors.New("BLSRL: bad operands")
+}
+
+// BLSRQ: Reset Lowest Set Bit.
+//
+// Forms:
+//
+// BLSRQ r64 r64
+// BLSRQ m64 r64
+func BLSRQ(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "BLSRQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "BLSRQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ }
+ return nil, errors.New("BLSRQ: bad operands")
+}
+
+// BSFL: Bit Scan Forward.
+//
+// Forms:
+//
+// BSFL r32 r32
+// BSFL m32 r32
+func BSFL(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "BSFL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "BSFL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("BSFL: bad operands")
+}
+
+// BSFQ: Bit Scan Forward.
+//
+// Forms:
+//
+// BSFQ r64 r64
+// BSFQ m64 r64
+func BSFQ(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "BSFQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "BSFQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("BSFQ: bad operands")
+}
+
+// BSFW: Bit Scan Forward.
+//
+// Forms:
+//
+// BSFW r16 r16
+// BSFW m16 r16
+func BSFW(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "BSFW",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "BSFW",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("BSFW: bad operands")
+}
+
+// BSRL: Bit Scan Reverse.
+//
+// Forms:
+//
+// BSRL r32 r32
+// BSRL m32 r32
+func BSRL(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "BSRL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "BSRL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("BSRL: bad operands")
+}
+
+// BSRQ: Bit Scan Reverse.
+//
+// Forms:
+//
+// BSRQ r64 r64
+// BSRQ m64 r64
+func BSRQ(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "BSRQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "BSRQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("BSRQ: bad operands")
+}
+
+// BSRW: Bit Scan Reverse.
+//
+// Forms:
+//
+// BSRW r16 r16
+// BSRW m16 r16
+func BSRW(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "BSRW",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "BSRW",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("BSRW: bad operands")
+}
+
+// BSWAPL: Byte Swap.
+//
+// Forms:
+//
+// BSWAPL r32
+func BSWAPL(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "BSWAPL",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{r},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("BSWAPL: bad operands")
+}
+
+// BSWAPQ: Byte Swap.
+//
+// Forms:
+//
+// BSWAPQ r64
+func BSWAPQ(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "BSWAPQ",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{r},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("BSWAPQ: bad operands")
+}
+
+// BTCL: Bit Test and Complement.
+//
+// Forms:
+//
+// BTCL imm8 r32
+// BTCL r32 r32
+// BTCL imm8 m32
+// BTCL r32 m32
+func BTCL(ir, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(ir) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTCL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR32(ir) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTCL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTCL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR32(ir) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTCL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("BTCL: bad operands")
+}
+
+// BTCQ: Bit Test and Complement.
+//
+// Forms:
+//
+// BTCQ imm8 r64
+// BTCQ r64 r64
+// BTCQ imm8 m64
+// BTCQ r64 m64
+func BTCQ(ir, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(ir) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTCQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(ir) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTCQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTCQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(ir) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTCQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("BTCQ: bad operands")
+}
+
+// BTCW: Bit Test and Complement.
+//
+// Forms:
+//
+// BTCW imm8 r16
+// BTCW r16 r16
+// BTCW imm8 m16
+// BTCW r16 m16
+func BTCW(ir, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(ir) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTCW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR16(ir) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTCW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTCW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR16(ir) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTCW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("BTCW: bad operands")
+}
+
+// BTL: Bit Test.
+//
+// Forms:
+//
+// BTL imm8 r32
+// BTL r32 r32
+// BTL imm8 m32
+// BTL r32 m32
+func BTL(ir, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(ir) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR32(ir) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR32(ir) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("BTL: bad operands")
+}
+
+// BTQ: Bit Test.
+//
+// Forms:
+//
+// BTQ imm8 r64
+// BTQ r64 r64
+// BTQ imm8 m64
+// BTQ r64 m64
+func BTQ(ir, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(ir) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR64(ir) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR64(ir) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("BTQ: bad operands")
+}
+
+// BTRL: Bit Test and Reset.
+//
+// Forms:
+//
+// BTRL imm8 r32
+// BTRL r32 r32
+// BTRL imm8 m32
+// BTRL r32 m32
+func BTRL(ir, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(ir) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTRL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR32(ir) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTRL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTRL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR32(ir) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTRL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("BTRL: bad operands")
+}
+
+// BTRQ: Bit Test and Reset.
+//
+// Forms:
+//
+// BTRQ imm8 r64
+// BTRQ r64 r64
+// BTRQ imm8 m64
+// BTRQ r64 m64
+func BTRQ(ir, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(ir) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTRQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(ir) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTRQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTRQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(ir) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTRQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("BTRQ: bad operands")
+}
+
+// BTRW: Bit Test and Reset.
+//
+// Forms:
+//
+// BTRW imm8 r16
+// BTRW r16 r16
+// BTRW imm8 m16
+// BTRW r16 m16
+func BTRW(ir, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(ir) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTRW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR16(ir) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTRW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTRW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR16(ir) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTRW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("BTRW: bad operands")
+}
+
+// BTSL: Bit Test and Set.
+//
+// Forms:
+//
+// BTSL imm8 r32
+// BTSL r32 r32
+// BTSL imm8 m32
+// BTSL r32 m32
+func BTSL(ir, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(ir) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTSL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR32(ir) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTSL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTSL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR32(ir) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "BTSL",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("BTSL: bad operands")
+}
+
+// BTSQ: Bit Test and Set.
+//
+// Forms:
+//
+// BTSQ imm8 r64
+// BTSQ r64 r64
+// BTSQ imm8 m64
+// BTSQ r64 m64
+func BTSQ(ir, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(ir) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTSQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(ir) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTSQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTSQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(ir) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "BTSQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("BTSQ: bad operands")
+}
+
+// BTSW: Bit Test and Set.
+//
+// Forms:
+//
+// BTSW imm8 r16
+// BTSW r16 r16
+// BTSW imm8 m16
+// BTSW r16 m16
+func BTSW(ir, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(ir) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTSW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR16(ir) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTSW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTSW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR16(ir) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTSW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("BTSW: bad operands")
+}
+
+// BTW: Bit Test.
+//
+// Forms:
+//
+// BTW imm8 r16
+// BTW r16 r16
+// BTW imm8 m16
+// BTW r16 m16
+func BTW(ir, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(ir) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR16(ir) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR16(ir) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "BTW",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("BTW: bad operands")
+}
+
+// BZHIL: Zero High Bits Starting with Specified Bit Position.
+//
+// Forms:
+//
+// BZHIL r32 r32 r32
+// BZHIL r32 m32 r32
+func BZHIL(r, mr, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(r) && operand.IsR32(mr) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "BZHIL",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsR32(r) && operand.IsM32(mr) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "BZHIL",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("BZHIL: bad operands")
+}
+
+// BZHIQ: Zero High Bits Starting with Specified Bit Position.
+//
+// Forms:
+//
+// BZHIQ r64 r64 r64
+// BZHIQ r64 m64 r64
+func BZHIQ(r, mr, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(r) && operand.IsR64(mr) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "BZHIQ",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsR64(r) && operand.IsM64(mr) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "BZHIQ",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("BZHIQ: bad operands")
+}
+
+// CALL: Call Procedure.
+//
+// Forms:
+//
+// CALL rel32
+func CALL(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "CALL",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("CALL: bad operands")
+}
+
+// CBW: Convert Byte to Word.
+//
+// Forms:
+//
+// CBW
+func CBW() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "CBW",
+ Operands: nil,
+ Inputs: []operand.Op{reg.AL},
+ Outputs: []operand.Op{reg.AX},
+ }, nil
+}
+
+// CDQ: Convert Doubleword to Quadword.
+//
+// Forms:
+//
+// CDQ
+func CDQ() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "CDQ",
+ Operands: nil,
+ Inputs: []operand.Op{reg.EAX},
+ Outputs: []operand.Op{reg.EDX},
+ }, nil
+}
+
+// CDQE: Convert Doubleword to Quadword.
+//
+// Forms:
+//
+// CDQE
+func CDQE() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "CDQE",
+ Operands: nil,
+ Inputs: []operand.Op{reg.EAX},
+ Outputs: []operand.Op{reg.RAX},
+ }, nil
+}
+
+// CLC: Clear Carry Flag.
+//
+// Forms:
+//
+// CLC
+func CLC() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "CLC",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+}
+
+// CLD: Clear Direction Flag.
+//
+// Forms:
+//
+// CLD
+func CLD() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "CLD",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+}
+
+// CLFLUSH: Flush Cache Line.
+//
+// Forms:
+//
+// CLFLUSH m8
+func CLFLUSH(m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM8(m):
+ return &intrep.Instruction{
+ Opcode: "CLFLUSH",
+ Operands: []operand.Op{m},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{},
+ ISA: []string{"CLFLUSH"},
+ }, nil
+ }
+ return nil, errors.New("CLFLUSH: bad operands")
+}
+
+// CLFLUSHOPT: Flush Cache Line Optimized.
+//
+// Forms:
+//
+// CLFLUSHOPT m8
+func CLFLUSHOPT(m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM8(m):
+ return &intrep.Instruction{
+ Opcode: "CLFLUSHOPT",
+ Operands: []operand.Op{m},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{},
+ ISA: []string{"CLFLUSHOPT"},
+ }, nil
+ }
+ return nil, errors.New("CLFLUSHOPT: bad operands")
+}
+
+// CMC: Complement Carry Flag.
+//
+// Forms:
+//
+// CMC
+func CMC() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "CMC",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+}
+
+// CMOVLCC: Move if above or equal (CF == 0).
+//
+// Forms:
+//
+// CMOVLCC r32 r32
+// CMOVLCC m32 r32
+func CMOVLCC(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLCC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLCC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLCC: bad operands")
+}
+
+// CMOVLCS: Move if below (CF == 1).
+//
+// Forms:
+//
+// CMOVLCS r32 r32
+// CMOVLCS m32 r32
+func CMOVLCS(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLCS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLCS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLCS: bad operands")
+}
+
+// CMOVLEQ: Move if equal (ZF == 1).
+//
+// Forms:
+//
+// CMOVLEQ r32 r32
+// CMOVLEQ m32 r32
+func CMOVLEQ(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLEQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLEQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLEQ: bad operands")
+}
+
+// CMOVLGE: Move if greater or equal (SF == OF).
+//
+// Forms:
+//
+// CMOVLGE r32 r32
+// CMOVLGE m32 r32
+func CMOVLGE(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLGE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLGE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLGE: bad operands")
+}
+
+// CMOVLGT: Move if greater (ZF == 0 and SF == OF).
+//
+// Forms:
+//
+// CMOVLGT r32 r32
+// CMOVLGT m32 r32
+func CMOVLGT(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLGT",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLGT",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLGT: bad operands")
+}
+
+// CMOVLHI: Move if above (CF == 0 and ZF == 0).
+//
+// Forms:
+//
+// CMOVLHI r32 r32
+// CMOVLHI m32 r32
+func CMOVLHI(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLHI",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLHI",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLHI: bad operands")
+}
+
+// CMOVLLE: Move if less or equal (ZF == 1 or SF != OF).
+//
+// Forms:
+//
+// CMOVLLE r32 r32
+// CMOVLLE m32 r32
+func CMOVLLE(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLLE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLLE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLLE: bad operands")
+}
+
+// CMOVLLS: Move if below or equal (CF == 1 or ZF == 1).
+//
+// Forms:
+//
+// CMOVLLS r32 r32
+// CMOVLLS m32 r32
+func CMOVLLS(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLLS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLLS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLLS: bad operands")
+}
+
+// CMOVLLT: Move if less (SF != OF).
+//
+// Forms:
+//
+// CMOVLLT r32 r32
+// CMOVLLT m32 r32
+func CMOVLLT(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLLT",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLLT",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLLT: bad operands")
+}
+
+// CMOVLMI: Move if sign (SF == 1).
+//
+// Forms:
+//
+// CMOVLMI r32 r32
+// CMOVLMI m32 r32
+func CMOVLMI(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLMI",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLMI",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLMI: bad operands")
+}
+
+// CMOVLNE: Move if not equal (ZF == 0).
+//
+// Forms:
+//
+// CMOVLNE r32 r32
+// CMOVLNE m32 r32
+func CMOVLNE(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLNE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLNE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLNE: bad operands")
+}
+
+// CMOVLOC: Move if not overflow (OF == 0).
+//
+// Forms:
+//
+// CMOVLOC r32 r32
+// CMOVLOC m32 r32
+func CMOVLOC(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLOC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLOC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLOC: bad operands")
+}
+
+// CMOVLOS: Move if overflow (OF == 1).
+//
+// Forms:
+//
+// CMOVLOS r32 r32
+// CMOVLOS m32 r32
+func CMOVLOS(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLOS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLOS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLOS: bad operands")
+}
+
+// CMOVLPC: Move if not parity (PF == 0).
+//
+// Forms:
+//
+// CMOVLPC r32 r32
+// CMOVLPC m32 r32
+func CMOVLPC(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLPC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLPC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLPC: bad operands")
+}
+
+// CMOVLPL: Move if not sign (SF == 0).
+//
+// Forms:
+//
+// CMOVLPL r32 r32
+// CMOVLPL m32 r32
+func CMOVLPL(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLPL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLPL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLPL: bad operands")
+}
+
+// CMOVLPS: Move if parity (PF == 1).
+//
+// Forms:
+//
+// CMOVLPS r32 r32
+// CMOVLPS m32 r32
+func CMOVLPS(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLPS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVLPS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVLPS: bad operands")
+}
+
+// CMOVQCC: Move if above or equal (CF == 0).
+//
+// Forms:
+//
+// CMOVQCC r64 r64
+// CMOVQCC m64 r64
+func CMOVQCC(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQCC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQCC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQCC: bad operands")
+}
+
+// CMOVQCS: Move if below (CF == 1).
+//
+// Forms:
+//
+// CMOVQCS r64 r64
+// CMOVQCS m64 r64
+func CMOVQCS(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQCS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQCS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQCS: bad operands")
+}
+
+// CMOVQEQ: Move if equal (ZF == 1).
+//
+// Forms:
+//
+// CMOVQEQ r64 r64
+// CMOVQEQ m64 r64
+func CMOVQEQ(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQEQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQEQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQEQ: bad operands")
+}
+
+// CMOVQGE: Move if greater or equal (SF == OF).
+//
+// Forms:
+//
+// CMOVQGE r64 r64
+// CMOVQGE m64 r64
+func CMOVQGE(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQGE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQGE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQGE: bad operands")
+}
+
+// CMOVQGT: Move if greater (ZF == 0 and SF == OF).
+//
+// Forms:
+//
+// CMOVQGT r64 r64
+// CMOVQGT m64 r64
+func CMOVQGT(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQGT",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQGT",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQGT: bad operands")
+}
+
+// CMOVQHI: Move if above (CF == 0 and ZF == 0).
+//
+// Forms:
+//
+// CMOVQHI r64 r64
+// CMOVQHI m64 r64
+func CMOVQHI(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQHI",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQHI",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQHI: bad operands")
+}
+
+// CMOVQLE: Move if less or equal (ZF == 1 or SF != OF).
+//
+// Forms:
+//
+// CMOVQLE r64 r64
+// CMOVQLE m64 r64
+func CMOVQLE(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQLE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQLE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQLE: bad operands")
+}
+
+// CMOVQLS: Move if below or equal (CF == 1 or ZF == 1).
+//
+// Forms:
+//
+// CMOVQLS r64 r64
+// CMOVQLS m64 r64
+func CMOVQLS(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQLS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQLS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQLS: bad operands")
+}
+
+// CMOVQLT: Move if less (SF != OF).
+//
+// Forms:
+//
+// CMOVQLT r64 r64
+// CMOVQLT m64 r64
+func CMOVQLT(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQLT",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQLT",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQLT: bad operands")
+}
+
+// CMOVQMI: Move if sign (SF == 1).
+//
+// Forms:
+//
+// CMOVQMI r64 r64
+// CMOVQMI m64 r64
+func CMOVQMI(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQMI",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQMI",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQMI: bad operands")
+}
+
+// CMOVQNE: Move if not equal (ZF == 0).
+//
+// Forms:
+//
+// CMOVQNE r64 r64
+// CMOVQNE m64 r64
+func CMOVQNE(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQNE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQNE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQNE: bad operands")
+}
+
+// CMOVQOC: Move if not overflow (OF == 0).
+//
+// Forms:
+//
+// CMOVQOC r64 r64
+// CMOVQOC m64 r64
+func CMOVQOC(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQOC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQOC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQOC: bad operands")
+}
+
+// CMOVQOS: Move if overflow (OF == 1).
+//
+// Forms:
+//
+// CMOVQOS r64 r64
+// CMOVQOS m64 r64
+func CMOVQOS(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQOS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQOS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQOS: bad operands")
+}
+
+// CMOVQPC: Move if not parity (PF == 0).
+//
+// Forms:
+//
+// CMOVQPC r64 r64
+// CMOVQPC m64 r64
+func CMOVQPC(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQPC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQPC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQPC: bad operands")
+}
+
+// CMOVQPL: Move if not sign (SF == 0).
+//
+// Forms:
+//
+// CMOVQPL r64 r64
+// CMOVQPL m64 r64
+func CMOVQPL(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQPL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQPL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQPL: bad operands")
+}
+
+// CMOVQPS: Move if parity (PF == 1).
+//
+// Forms:
+//
+// CMOVQPS r64 r64
+// CMOVQPS m64 r64
+func CMOVQPS(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQPS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVQPS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVQPS: bad operands")
+}
+
+// CMOVWCC: Move if above or equal (CF == 0).
+//
+// Forms:
+//
+// CMOVWCC r16 r16
+// CMOVWCC m16 r16
+func CMOVWCC(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWCC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWCC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWCC: bad operands")
+}
+
+// CMOVWCS: Move if below (CF == 1).
+//
+// Forms:
+//
+// CMOVWCS r16 r16
+// CMOVWCS m16 r16
+func CMOVWCS(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWCS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWCS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWCS: bad operands")
+}
+
+// CMOVWEQ: Move if equal (ZF == 1).
+//
+// Forms:
+//
+// CMOVWEQ r16 r16
+// CMOVWEQ m16 r16
+func CMOVWEQ(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWEQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWEQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWEQ: bad operands")
+}
+
+// CMOVWGE: Move if greater or equal (SF == OF).
+//
+// Forms:
+//
+// CMOVWGE r16 r16
+// CMOVWGE m16 r16
+func CMOVWGE(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWGE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWGE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWGE: bad operands")
+}
+
+// CMOVWGT: Move if greater (ZF == 0 and SF == OF).
+//
+// Forms:
+//
+// CMOVWGT r16 r16
+// CMOVWGT m16 r16
+func CMOVWGT(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWGT",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWGT",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWGT: bad operands")
+}
+
+// CMOVWHI: Move if above (CF == 0 and ZF == 0).
+//
+// Forms:
+//
+// CMOVWHI r16 r16
+// CMOVWHI m16 r16
+func CMOVWHI(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWHI",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWHI",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWHI: bad operands")
+}
+
+// CMOVWLE: Move if less or equal (ZF == 1 or SF != OF).
+//
+// Forms:
+//
+// CMOVWLE r16 r16
+// CMOVWLE m16 r16
+func CMOVWLE(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWLE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWLE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWLE: bad operands")
+}
+
+// CMOVWLS: Move if below or equal (CF == 1 or ZF == 1).
+//
+// Forms:
+//
+// CMOVWLS r16 r16
+// CMOVWLS m16 r16
+func CMOVWLS(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWLS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWLS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWLS: bad operands")
+}
+
+// CMOVWLT: Move if less (SF != OF).
+//
+// Forms:
+//
+// CMOVWLT r16 r16
+// CMOVWLT m16 r16
+func CMOVWLT(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWLT",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWLT",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWLT: bad operands")
+}
+
+// CMOVWMI: Move if sign (SF == 1).
+//
+// Forms:
+//
+// CMOVWMI r16 r16
+// CMOVWMI m16 r16
+func CMOVWMI(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWMI",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWMI",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWMI: bad operands")
+}
+
+// CMOVWNE: Move if not equal (ZF == 0).
+//
+// Forms:
+//
+// CMOVWNE r16 r16
+// CMOVWNE m16 r16
+func CMOVWNE(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWNE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWNE",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWNE: bad operands")
+}
+
+// CMOVWOC: Move if not overflow (OF == 0).
+//
+// Forms:
+//
+// CMOVWOC r16 r16
+// CMOVWOC m16 r16
+func CMOVWOC(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWOC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWOC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWOC: bad operands")
+}
+
+// CMOVWOS: Move if overflow (OF == 1).
+//
+// Forms:
+//
+// CMOVWOS r16 r16
+// CMOVWOS m16 r16
+func CMOVWOS(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWOS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWOS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWOS: bad operands")
+}
+
+// CMOVWPC: Move if not parity (PF == 0).
+//
+// Forms:
+//
+// CMOVWPC r16 r16
+// CMOVWPC m16 r16
+func CMOVWPC(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWPC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWPC",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWPC: bad operands")
+}
+
+// CMOVWPL: Move if not sign (SF == 0).
+//
+// Forms:
+//
+// CMOVWPL r16 r16
+// CMOVWPL m16 r16
+func CMOVWPL(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWPL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWPL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWPL: bad operands")
+}
+
+// CMOVWPS: Move if parity (PF == 1).
+//
+// Forms:
+//
+// CMOVWPS r16 r16
+// CMOVWPS m16 r16
+func CMOVWPS(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWPS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "CMOVWPS",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"CMOV"},
+ }, nil
+ }
+ return nil, errors.New("CMOVWPS: bad operands")
+}
+
+// CMPB: Compare Two Operands.
+//
+// Forms:
+//
+// CMPB al imm8
+// CMPB r8 imm8
+// CMPB r8 r8
+// CMPB r8 m8
+// CMPB m8 imm8
+// CMPB m8 r8
+func CMPB(amr, imr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsAL(amr) && operand.IsIMM8(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPB",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR8(amr) && operand.IsIMM8(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPB",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR8(amr) && operand.IsR8(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPB",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr, imr},
+ Outputs: []operand.Op{},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsR8(amr) && operand.IsM8(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPB",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr, imr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsM8(amr) && operand.IsIMM8(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPB",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsM8(amr) && operand.IsR8(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPB",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr, imr},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("CMPB: bad operands")
+}
+
+// CMPL: Compare Two Operands.
+//
+// Forms:
+//
+// CMPL eax imm32
+// CMPL r32 imm8
+// CMPL r32 imm32
+// CMPL r32 r32
+// CMPL r32 m32
+// CMPL m32 imm8
+// CMPL m32 imm32
+// CMPL m32 r32
+func CMPL(emr, imr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsEAX(emr) && operand.IsIMM32(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPL",
+ Operands: []operand.Op{emr, imr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR32(emr) && operand.IsIMM8(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPL",
+ Operands: []operand.Op{emr, imr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR32(emr) && operand.IsIMM32(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPL",
+ Operands: []operand.Op{emr, imr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR32(emr) && operand.IsR32(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPL",
+ Operands: []operand.Op{emr, imr},
+ Inputs: []operand.Op{emr, imr},
+ Outputs: []operand.Op{},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsR32(emr) && operand.IsM32(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPL",
+ Operands: []operand.Op{emr, imr},
+ Inputs: []operand.Op{emr, imr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsM32(emr) && operand.IsIMM8(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPL",
+ Operands: []operand.Op{emr, imr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsM32(emr) && operand.IsIMM32(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPL",
+ Operands: []operand.Op{emr, imr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsM32(emr) && operand.IsR32(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPL",
+ Operands: []operand.Op{emr, imr},
+ Inputs: []operand.Op{emr, imr},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("CMPL: bad operands")
+}
+
+// CMPPD: Compare Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// CMPPD xmm xmm imm8
+// CMPPD m128 xmm imm8
+func CMPPD(mx, x, i operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsIMM8(i):
+ return &intrep.Instruction{
+ Opcode: "CMPPD",
+ Operands: []operand.Op{mx, x, i},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x) && operand.IsIMM8(i):
+ return &intrep.Instruction{
+ Opcode: "CMPPD",
+ Operands: []operand.Op{mx, x, i},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CMPPD: bad operands")
+}
+
+// CMPPS: Compare Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// CMPPS xmm xmm imm8
+// CMPPS m128 xmm imm8
+func CMPPS(mx, x, i operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsIMM8(i):
+ return &intrep.Instruction{
+ Opcode: "CMPPS",
+ Operands: []operand.Op{mx, x, i},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x) && operand.IsIMM8(i):
+ return &intrep.Instruction{
+ Opcode: "CMPPS",
+ Operands: []operand.Op{mx, x, i},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("CMPPS: bad operands")
+}
+
+// CMPQ: Compare Two Operands.
+//
+// Forms:
+//
+// CMPQ rax imm32
+// CMPQ r64 imm8
+// CMPQ r64 imm32
+// CMPQ r64 r64
+// CMPQ r64 m64
+// CMPQ m64 imm8
+// CMPQ m64 imm32
+// CMPQ m64 r64
+func CMPQ(mr, imr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsRAX(mr) && operand.IsIMM32(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPQ",
+ Operands: []operand.Op{mr, imr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR64(mr) && operand.IsIMM8(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPQ",
+ Operands: []operand.Op{mr, imr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR64(mr) && operand.IsIMM32(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPQ",
+ Operands: []operand.Op{mr, imr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR64(mr) && operand.IsR64(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPQ",
+ Operands: []operand.Op{mr, imr},
+ Inputs: []operand.Op{mr, imr},
+ Outputs: []operand.Op{},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsR64(mr) && operand.IsM64(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPQ",
+ Operands: []operand.Op{mr, imr},
+ Inputs: []operand.Op{mr, imr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsM64(mr) && operand.IsIMM8(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPQ",
+ Operands: []operand.Op{mr, imr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsM64(mr) && operand.IsIMM32(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPQ",
+ Operands: []operand.Op{mr, imr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPQ",
+ Operands: []operand.Op{mr, imr},
+ Inputs: []operand.Op{mr, imr},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("CMPQ: bad operands")
+}
+
+// CMPSD: Compare Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// CMPSD xmm xmm imm8
+// CMPSD m64 xmm imm8
+func CMPSD(mx, x, i operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsIMM8(i):
+ return &intrep.Instruction{
+ Opcode: "CMPSD",
+ Operands: []operand.Op{mx, x, i},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsIMM8(i):
+ return &intrep.Instruction{
+ Opcode: "CMPSD",
+ Operands: []operand.Op{mx, x, i},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CMPSD: bad operands")
+}
+
+// CMPSS: Compare Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// CMPSS xmm xmm imm8
+// CMPSS m32 xmm imm8
+func CMPSS(mx, x, i operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsIMM8(i):
+ return &intrep.Instruction{
+ Opcode: "CMPSS",
+ Operands: []operand.Op{mx, x, i},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsIMM8(i):
+ return &intrep.Instruction{
+ Opcode: "CMPSS",
+ Operands: []operand.Op{mx, x, i},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("CMPSS: bad operands")
+}
+
+// CMPW: Compare Two Operands.
+//
+// Forms:
+//
+// CMPW ax imm16
+// CMPW r16 imm8
+// CMPW r16 imm16
+// CMPW r16 r16
+// CMPW r16 m16
+// CMPW m16 imm8
+// CMPW m16 imm16
+// CMPW m16 r16
+func CMPW(amr, imr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsAX(amr) && operand.IsIMM16(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPW",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR16(amr) && operand.IsIMM8(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPW",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR16(amr) && operand.IsIMM16(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPW",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR16(amr) && operand.IsR16(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPW",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr, imr},
+ Outputs: []operand.Op{},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsR16(amr) && operand.IsM16(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPW",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr, imr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsM16(amr) && operand.IsIMM8(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPW",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsM16(amr) && operand.IsIMM16(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPW",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsM16(amr) && operand.IsR16(imr):
+ return &intrep.Instruction{
+ Opcode: "CMPW",
+ Operands: []operand.Op{amr, imr},
+ Inputs: []operand.Op{amr, imr},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("CMPW: bad operands")
+}
+
+// CMPXCHG16B: Compare and Exchange 16 Bytes.
+//
+// Forms:
+//
+// CMPXCHG16B m128
+func CMPXCHG16B(m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM128(m):
+ return &intrep.Instruction{
+ Opcode: "CMPXCHG16B",
+ Operands: []operand.Op{m},
+ Inputs: []operand.Op{m, reg.RAX, reg.RBX, reg.RCX, reg.RDX},
+ Outputs: []operand.Op{reg.RAX, reg.RDX},
+ }, nil
+ }
+ return nil, errors.New("CMPXCHG16B: bad operands")
+}
+
+// CMPXCHG8B: Compare and Exchange 8 Bytes.
+//
+// Forms:
+//
+// CMPXCHG8B m64
+func CMPXCHG8B(m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM64(m):
+ return &intrep.Instruction{
+ Opcode: "CMPXCHG8B",
+ Operands: []operand.Op{m},
+ Inputs: []operand.Op{m, reg.EAX, reg.EBX, reg.ECX, reg.EDX},
+ Outputs: []operand.Op{reg.EAX, reg.EDX},
+ }, nil
+ }
+ return nil, errors.New("CMPXCHG8B: bad operands")
+}
+
+// CMPXCHGB: Compare and Exchange.
+//
+// Forms:
+//
+// CMPXCHGB r8 r8
+// CMPXCHGB r8 m8
+func CMPXCHGB(r, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(r) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "CMPXCHGB",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR8(r) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "CMPXCHGB",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("CMPXCHGB: bad operands")
+}
+
+// CMPXCHGL: Compare and Exchange.
+//
+// Forms:
+//
+// CMPXCHGL r32 r32
+// CMPXCHGL r32 m32
+func CMPXCHGL(r, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(r) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "CMPXCHGL",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR32(r) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "CMPXCHGL",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("CMPXCHGL: bad operands")
+}
+
+// CMPXCHGQ: Compare and Exchange.
+//
+// Forms:
+//
+// CMPXCHGQ r64 r64
+// CMPXCHGQ r64 m64
+func CMPXCHGQ(r, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(r) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "CMPXCHGQ",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(r) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "CMPXCHGQ",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("CMPXCHGQ: bad operands")
+}
+
+// CMPXCHGW: Compare and Exchange.
+//
+// Forms:
+//
+// CMPXCHGW r16 r16
+// CMPXCHGW r16 m16
+func CMPXCHGW(r, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(r) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "CMPXCHGW",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR16(r) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "CMPXCHGW",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("CMPXCHGW: bad operands")
+}
+
+// COMISD: Compare Scalar Ordered Double-Precision Floating-Point Values and Set EFLAGS.
+//
+// Forms:
+//
+// COMISD xmm xmm
+// COMISD m64 xmm
+func COMISD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "COMISD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "COMISD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("COMISD: bad operands")
+}
+
+// COMISS: Compare Scalar Ordered Single-Precision Floating-Point Values and Set EFLAGS.
+//
+// Forms:
+//
+// COMISS xmm xmm
+// COMISS m32 xmm
+func COMISS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "COMISS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "COMISS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("COMISS: bad operands")
+}
+
+// CPUID: CPU Identification.
+//
+// Forms:
+//
+// CPUID
+func CPUID() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "CPUID",
+ Operands: nil,
+ Inputs: []operand.Op{reg.EAX, reg.ECX},
+ Outputs: []operand.Op{reg.EAX, reg.EBX, reg.ECX, reg.EDX},
+ ISA: []string{"CPUID"},
+ }, nil
+}
+
+// CQO: Convert Quadword to Octaword.
+//
+// Forms:
+//
+// CQO
+func CQO() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "CQO",
+ Operands: nil,
+ Inputs: []operand.Op{reg.RAX},
+ Outputs: []operand.Op{reg.RDX},
+ }, nil
+}
+
+// CRC32B: Accumulate CRC32 Value.
+//
+// Forms:
+//
+// CRC32B r8 r32
+// CRC32B m8 r32
+// CRC32B r8 r64
+// CRC32B m8 r64
+func CRC32B(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CRC32B",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ case operand.IsM8(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CRC32B",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ case operand.IsR8(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CRC32B",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ case operand.IsM8(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CRC32B",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ }
+ return nil, errors.New("CRC32B: bad operands")
+}
+
+// CRC32L: Accumulate CRC32 Value.
+//
+// Forms:
+//
+// CRC32L r32 r32
+// CRC32L m32 r32
+func CRC32L(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CRC32L",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CRC32L",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ }
+ return nil, errors.New("CRC32L: bad operands")
+}
+
+// CRC32Q: Accumulate CRC32 Value.
+//
+// Forms:
+//
+// CRC32Q r64 r64
+// CRC32Q m64 r64
+func CRC32Q(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CRC32Q",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CRC32Q",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ }
+ return nil, errors.New("CRC32Q: bad operands")
+}
+
+// CRC32W: Accumulate CRC32 Value.
+//
+// Forms:
+//
+// CRC32W r16 r32
+// CRC32W m16 r32
+func CRC32W(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CRC32W",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CRC32W",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ }
+ return nil, errors.New("CRC32W: bad operands")
+}
+
+// CVTPD2PL: Convert Packed Double-Precision FP Values to Packed Dword Integers.
+//
+// Forms:
+//
+// CVTPD2PL xmm xmm
+// CVTPD2PL m128 xmm
+func CVTPD2PL(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTPD2PL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTPD2PL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTPD2PL: bad operands")
+}
+
+// CVTPD2PS: Convert Packed Double-Precision FP Values to Packed Single-Precision FP Values.
+//
+// Forms:
+//
+// CVTPD2PS xmm xmm
+// CVTPD2PS m128 xmm
+func CVTPD2PS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTPD2PS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTPD2PS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTPD2PS: bad operands")
+}
+
+// CVTPL2PD: Convert Packed Dword Integers to Packed Double-Precision FP Values.
+//
+// Forms:
+//
+// CVTPL2PD xmm xmm
+// CVTPL2PD m64 xmm
+func CVTPL2PD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTPL2PD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTPL2PD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTPL2PD: bad operands")
+}
+
+// CVTPL2PS: Convert Packed Dword Integers to Packed Single-Precision FP Values.
+//
+// Forms:
+//
+// CVTPL2PS xmm xmm
+// CVTPL2PS m128 xmm
+func CVTPL2PS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTPL2PS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTPL2PS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTPL2PS: bad operands")
+}
+
+// CVTPS2PD: Convert Packed Single-Precision FP Values to Packed Double-Precision FP Values.
+//
+// Forms:
+//
+// CVTPS2PD xmm xmm
+// CVTPS2PD m64 xmm
+func CVTPS2PD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTPS2PD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTPS2PD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTPS2PD: bad operands")
+}
+
+// CVTPS2PL: Convert Packed Single-Precision FP Values to Packed Dword Integers.
+//
+// Forms:
+//
+// CVTPS2PL xmm xmm
+// CVTPS2PL m128 xmm
+func CVTPS2PL(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTPS2PL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTPS2PL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTPS2PL: bad operands")
+}
+
+// CVTSD2SL: Convert Scalar Double-Precision FP Value to Integer.
+//
+// Forms:
+//
+// CVTSD2SL xmm r32
+// CVTSD2SL m64 r32
+// CVTSD2SL xmm r64
+// CVTSD2SL m64 r64
+func CVTSD2SL(mx, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CVTSD2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CVTSD2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CVTSD2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CVTSD2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTSD2SL: bad operands")
+}
+
+// CVTSD2SS: Convert Scalar Double-Precision FP Value to Scalar Single-Precision FP Value.
+//
+// Forms:
+//
+// CVTSD2SS xmm xmm
+// CVTSD2SS m64 xmm
+func CVTSD2SS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTSD2SS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTSD2SS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTSD2SS: bad operands")
+}
+
+// CVTSL2SD: Convert Dword Integer to Scalar Double-Precision FP Value.
+//
+// Forms:
+//
+// CVTSL2SD r32 xmm
+// CVTSL2SD m32 xmm
+func CVTSL2SD(mr, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTSL2SD",
+ Operands: []operand.Op{mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTSL2SD",
+ Operands: []operand.Op{mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTSL2SD: bad operands")
+}
+
+// CVTSL2SS: Convert Dword Integer to Scalar Single-Precision FP Value.
+//
+// Forms:
+//
+// CVTSL2SS r32 xmm
+// CVTSL2SS m32 xmm
+func CVTSL2SS(mr, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTSL2SS",
+ Operands: []operand.Op{mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTSL2SS",
+ Operands: []operand.Op{mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("CVTSL2SS: bad operands")
+}
+
+// CVTSQ2SD: Convert Dword Integer to Scalar Double-Precision FP Value.
+//
+// Forms:
+//
+// CVTSQ2SD r64 xmm
+// CVTSQ2SD m64 xmm
+func CVTSQ2SD(mr, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTSQ2SD",
+ Operands: []operand.Op{mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTSQ2SD",
+ Operands: []operand.Op{mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTSQ2SD: bad operands")
+}
+
+// CVTSQ2SS: Convert Dword Integer to Scalar Single-Precision FP Value.
+//
+// Forms:
+//
+// CVTSQ2SS r64 xmm
+// CVTSQ2SS m64 xmm
+func CVTSQ2SS(mr, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTSQ2SS",
+ Operands: []operand.Op{mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTSQ2SS",
+ Operands: []operand.Op{mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("CVTSQ2SS: bad operands")
+}
+
+// CVTSS2SD: Convert Scalar Single-Precision FP Value to Scalar Double-Precision FP Value.
+//
+// Forms:
+//
+// CVTSS2SD xmm xmm
+// CVTSS2SD m32 xmm
+func CVTSS2SD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTSS2SD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTSS2SD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTSS2SD: bad operands")
+}
+
+// CVTSS2SL: Convert Scalar Single-Precision FP Value to Dword Integer.
+//
+// Forms:
+//
+// CVTSS2SL xmm r32
+// CVTSS2SL m32 r32
+// CVTSS2SL xmm r64
+// CVTSS2SL m32 r64
+func CVTSS2SL(mx, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CVTSS2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CVTSS2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CVTSS2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CVTSS2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("CVTSS2SL: bad operands")
+}
+
+// CVTTPD2PL: Convert with Truncation Packed Double-Precision FP Values to Packed Dword Integers.
+//
+// Forms:
+//
+// CVTTPD2PL xmm xmm
+// CVTTPD2PL m128 xmm
+func CVTTPD2PL(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTTPD2PL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTTPD2PL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTTPD2PL: bad operands")
+}
+
+// CVTTPS2PL: Convert with Truncation Packed Single-Precision FP Values to Packed Dword Integers.
+//
+// Forms:
+//
+// CVTTPS2PL xmm xmm
+// CVTTPS2PL m128 xmm
+func CVTTPS2PL(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTTPS2PL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "CVTTPS2PL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTTPS2PL: bad operands")
+}
+
+// CVTTSD2SL: Convert with Truncation Scalar Double-Precision FP Value to Signed Integer.
+//
+// Forms:
+//
+// CVTTSD2SL xmm r32
+// CVTTSD2SL m64 r32
+func CVTTSD2SL(mx, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CVTTSD2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CVTTSD2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTTSD2SL: bad operands")
+}
+
+// CVTTSD2SQ: Convert with Truncation Scalar Double-Precision FP Value to Signed Integer.
+//
+// Forms:
+//
+// CVTTSD2SQ xmm r64
+// CVTTSD2SQ m64 r64
+func CVTTSD2SQ(mx, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CVTTSD2SQ",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CVTTSD2SQ",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("CVTTSD2SQ: bad operands")
+}
+
+// CVTTSS2SL: Convert with Truncation Scalar Single-Precision FP Value to Dword Integer.
+//
+// Forms:
+//
+// CVTTSS2SL xmm r32
+// CVTTSS2SL m32 r32
+// CVTTSS2SL xmm r64
+// CVTTSS2SL m32 r64
+func CVTTSS2SL(mx, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CVTTSS2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "CVTTSS2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CVTTSS2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "CVTTSS2SL",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("CVTTSS2SL: bad operands")
+}
+
+// CWD: Convert Word to Doubleword.
+//
+// Forms:
+//
+// CWD
+func CWD() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "CWD",
+ Operands: nil,
+ Inputs: []operand.Op{reg.AX},
+ Outputs: []operand.Op{reg.DX},
+ }, nil
+}
+
+// CWDE: Convert Word to Doubleword.
+//
+// Forms:
+//
+// CWDE
+func CWDE() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "CWDE",
+ Operands: nil,
+ Inputs: []operand.Op{reg.AX},
+ Outputs: []operand.Op{reg.EAX},
+ }, nil
+}
+
+// DECB: Decrement by 1.
+//
+// Forms:
+//
+// DECB r8
+// DECB m8
+func DECB(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "DECB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "DECB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("DECB: bad operands")
+}
+
+// DECL: Decrement by 1.
+//
+// Forms:
+//
+// DECL r32
+// DECL m32
+func DECL(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "DECL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "DECL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("DECL: bad operands")
+}
+
+// DECQ: Decrement by 1.
+//
+// Forms:
+//
+// DECQ r64
+// DECQ m64
+func DECQ(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "DECQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "DECQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("DECQ: bad operands")
+}
+
+// DECW: Decrement by 1.
+//
+// Forms:
+//
+// DECW r16
+// DECW m16
+func DECW(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "DECW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "DECW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("DECW: bad operands")
+}
+
+// DIVB: Unsigned Divide.
+//
+// Forms:
+//
+// DIVB r8
+// DIVB m8
+func DIVB(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "DIVB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AX},
+ Outputs: []operand.Op{reg.AX},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "DIVB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AX},
+ Outputs: []operand.Op{reg.AX},
+ }, nil
+ }
+ return nil, errors.New("DIVB: bad operands")
+}
+
+// DIVL: Unsigned Divide.
+//
+// Forms:
+//
+// DIVL r32
+// DIVL m32
+func DIVL(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "DIVL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.EAX, reg.EDX},
+ Outputs: []operand.Op{reg.EAX, reg.EDX},
+ }, nil
+ case operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "DIVL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.EAX, reg.EDX},
+ Outputs: []operand.Op{reg.EAX, reg.EDX},
+ }, nil
+ }
+ return nil, errors.New("DIVL: bad operands")
+}
+
+// DIVPD: Divide Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// DIVPD xmm xmm
+// DIVPD m128 xmm
+func DIVPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "DIVPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "DIVPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("DIVPD: bad operands")
+}
+
+// DIVPS: Divide Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// DIVPS xmm xmm
+// DIVPS m128 xmm
+func DIVPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "DIVPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "DIVPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("DIVPS: bad operands")
+}
+
+// DIVQ: Unsigned Divide.
+//
+// Forms:
+//
+// DIVQ r64
+// DIVQ m64
+func DIVQ(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "DIVQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.RAX, reg.RDX},
+ Outputs: []operand.Op{reg.RAX, reg.RDX},
+ }, nil
+ case operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "DIVQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.RAX, reg.RDX},
+ Outputs: []operand.Op{reg.RAX, reg.RDX},
+ }, nil
+ }
+ return nil, errors.New("DIVQ: bad operands")
+}
+
+// DIVSD: Divide Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// DIVSD xmm xmm
+// DIVSD m64 xmm
+func DIVSD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "DIVSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "DIVSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("DIVSD: bad operands")
+}
+
+// DIVSS: Divide Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// DIVSS xmm xmm
+// DIVSS m32 xmm
+func DIVSS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "DIVSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "DIVSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("DIVSS: bad operands")
+}
+
+// DIVW: Unsigned Divide.
+//
+// Forms:
+//
+// DIVW r16
+// DIVW m16
+func DIVW(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "DIVW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AX, reg.DX},
+ Outputs: []operand.Op{reg.AX, reg.DX},
+ }, nil
+ case operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "DIVW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AX, reg.DX},
+ Outputs: []operand.Op{reg.AX, reg.DX},
+ }, nil
+ }
+ return nil, errors.New("DIVW: bad operands")
+}
+
+// DPPD: Dot Product of Packed Double Precision Floating-Point Values.
+//
+// Forms:
+//
+// DPPD imm8 xmm xmm
+// DPPD imm8 m128 xmm
+func DPPD(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "DPPD",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "DPPD",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("DPPD: bad operands")
+}
+
+// DPPS: Dot Product of Packed Single Precision Floating-Point Values.
+//
+// Forms:
+//
+// DPPS imm8 xmm xmm
+// DPPS imm8 m128 xmm
+func DPPS(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "DPPS",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "DPPS",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("DPPS: bad operands")
+}
+
+// EXTRACTPS: Extract Packed Single Precision Floating-Point Value.
+//
+// Forms:
+//
+// EXTRACTPS imm2u xmm r32
+// EXTRACTPS imm2u xmm m32
+func EXTRACTPS(i, x, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM2U(i) && operand.IsXMM(x) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "EXTRACTPS",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM2U(i) && operand.IsXMM(x) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "EXTRACTPS",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("EXTRACTPS: bad operands")
+}
+
+// HADDPD: Packed Double-FP Horizontal Add.
+//
+// Forms:
+//
+// HADDPD xmm xmm
+// HADDPD m128 xmm
+func HADDPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "HADDPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "HADDPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ }
+ return nil, errors.New("HADDPD: bad operands")
+}
+
+// HADDPS: Packed Single-FP Horizontal Add.
+//
+// Forms:
+//
+// HADDPS xmm xmm
+// HADDPS m128 xmm
+func HADDPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "HADDPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "HADDPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ }
+ return nil, errors.New("HADDPS: bad operands")
+}
+
+// HSUBPD: Packed Double-FP Horizontal Subtract.
+//
+// Forms:
+//
+// HSUBPD xmm xmm
+// HSUBPD m128 xmm
+func HSUBPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "HSUBPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "HSUBPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ }
+ return nil, errors.New("HSUBPD: bad operands")
+}
+
+// HSUBPS: Packed Single-FP Horizontal Subtract.
+//
+// Forms:
+//
+// HSUBPS xmm xmm
+// HSUBPS m128 xmm
+func HSUBPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "HSUBPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "HSUBPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ }
+ return nil, errors.New("HSUBPS: bad operands")
+}
+
+// IDIVB: Signed Divide.
+//
+// Forms:
+//
+// IDIVB r8
+// IDIVB m8
+func IDIVB(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "IDIVB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AX},
+ Outputs: []operand.Op{reg.AX},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "IDIVB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AX},
+ Outputs: []operand.Op{reg.AX},
+ }, nil
+ }
+ return nil, errors.New("IDIVB: bad operands")
+}
+
+// IDIVL: Signed Divide.
+//
+// Forms:
+//
+// IDIVL r32
+// IDIVL m32
+func IDIVL(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "IDIVL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.EAX, reg.EDX},
+ Outputs: []operand.Op{reg.EAX, reg.EDX},
+ }, nil
+ case operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "IDIVL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.EAX, reg.EDX},
+ Outputs: []operand.Op{reg.EAX, reg.EDX},
+ }, nil
+ }
+ return nil, errors.New("IDIVL: bad operands")
+}
+
+// IDIVQ: Signed Divide.
+//
+// Forms:
+//
+// IDIVQ r64
+// IDIVQ m64
+func IDIVQ(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "IDIVQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.RAX, reg.RDX},
+ Outputs: []operand.Op{reg.RAX, reg.RDX},
+ }, nil
+ case operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "IDIVQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.RAX, reg.RDX},
+ Outputs: []operand.Op{reg.RAX, reg.RDX},
+ }, nil
+ }
+ return nil, errors.New("IDIVQ: bad operands")
+}
+
+// IDIVW: Signed Divide.
+//
+// Forms:
+//
+// IDIVW r16
+// IDIVW m16
+func IDIVW(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "IDIVW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AX, reg.DX},
+ Outputs: []operand.Op{reg.AX, reg.DX},
+ }, nil
+ case operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "IDIVW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AX, reg.DX},
+ Outputs: []operand.Op{reg.AX, reg.DX},
+ }, nil
+ }
+ return nil, errors.New("IDIVW: bad operands")
+}
+
+// IMUL3L: Signed Multiply.
+//
+// Forms:
+//
+// IMUL3L imm8 r32 r32
+// IMUL3L imm32 r32 r32
+// IMUL3L imm8 m32 r32
+// IMUL3L imm32 m32 r32
+func IMUL3L(i, mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "IMUL3L",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsIMM32(i) && operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "IMUL3L",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "IMUL3L",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsIMM32(i) && operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "IMUL3L",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("IMUL3L: bad operands")
+}
+
+// IMUL3Q: Signed Multiply.
+//
+// Forms:
+//
+// IMUL3Q imm8 r64 r64
+// IMUL3Q imm32 r64 r64
+// IMUL3Q imm8 m64 r64
+// IMUL3Q imm32 m64 r64
+func IMUL3Q(i, mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "IMUL3Q",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsIMM32(i) && operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "IMUL3Q",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "IMUL3Q",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsIMM32(i) && operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "IMUL3Q",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("IMUL3Q: bad operands")
+}
+
+// IMUL3W: Signed Multiply.
+//
+// Forms:
+//
+// IMUL3W imm8 r16 r16
+// IMUL3W imm16 r16 r16
+// IMUL3W imm8 m16 r16
+// IMUL3W imm16 m16 r16
+func IMUL3W(i, mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "IMUL3W",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsIMM16(i) && operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "IMUL3W",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "IMUL3W",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsIMM16(i) && operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "IMUL3W",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("IMUL3W: bad operands")
+}
+
+// IMULB: Signed Multiply.
+//
+// Forms:
+//
+// IMULB r8
+// IMULB m8
+func IMULB(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "IMULB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AL},
+ Outputs: []operand.Op{reg.AX},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "IMULB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AL},
+ Outputs: []operand.Op{reg.AX},
+ }, nil
+ }
+ return nil, errors.New("IMULB: bad operands")
+}
+
+// IMULL: Signed Multiply.
+//
+// Forms:
+//
+// IMULL r32
+// IMULL m32
+// IMULL r32 r32
+// IMULL m32 r32
+func IMULL(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 1 && operand.IsR32(ops[0]):
+ return &intrep.Instruction{
+ Opcode: "IMULL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], reg.EAX},
+ Outputs: []operand.Op{reg.EAX, reg.EDX},
+ }, nil
+ case len(ops) == 1 && operand.IsM32(ops[0]):
+ return &intrep.Instruction{
+ Opcode: "IMULL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], reg.EAX},
+ Outputs: []operand.Op{reg.EAX, reg.EDX},
+ }, nil
+ case len(ops) == 2 && operand.IsR32(ops[0]) && operand.IsR32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "IMULL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsM32(ops[0]) && operand.IsR32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "IMULL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ }
+ return nil, errors.New("IMULL: bad operands")
+}
+
+// IMULQ: Signed Multiply.
+//
+// Forms:
+//
+// IMULQ r64
+// IMULQ m64
+// IMULQ r64 r64
+// IMULQ m64 r64
+func IMULQ(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 1 && operand.IsR64(ops[0]):
+ return &intrep.Instruction{
+ Opcode: "IMULQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], reg.RAX},
+ Outputs: []operand.Op{reg.RAX, reg.RDX},
+ }, nil
+ case len(ops) == 1 && operand.IsM64(ops[0]):
+ return &intrep.Instruction{
+ Opcode: "IMULQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], reg.RAX},
+ Outputs: []operand.Op{reg.RAX, reg.RDX},
+ }, nil
+ case len(ops) == 2 && operand.IsR64(ops[0]) && operand.IsR64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "IMULQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsM64(ops[0]) && operand.IsR64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "IMULQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ }
+ return nil, errors.New("IMULQ: bad operands")
+}
+
+// IMULW: Signed Multiply.
+//
+// Forms:
+//
+// IMULW r16
+// IMULW m16
+// IMULW r16 r16
+// IMULW m16 r16
+func IMULW(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 1 && operand.IsR16(ops[0]):
+ return &intrep.Instruction{
+ Opcode: "IMULW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], reg.AX},
+ Outputs: []operand.Op{reg.AX, reg.DX},
+ }, nil
+ case len(ops) == 1 && operand.IsM16(ops[0]):
+ return &intrep.Instruction{
+ Opcode: "IMULW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], reg.AX},
+ Outputs: []operand.Op{reg.AX, reg.DX},
+ }, nil
+ case len(ops) == 2 && operand.IsR16(ops[0]) && operand.IsR16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "IMULW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsM16(ops[0]) && operand.IsR16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "IMULW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ }
+ return nil, errors.New("IMULW: bad operands")
+}
+
+// INCB: Increment by 1.
+//
+// Forms:
+//
+// INCB r8
+// INCB m8
+func INCB(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "INCB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "INCB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("INCB: bad operands")
+}
+
+// INCL: Increment by 1.
+//
+// Forms:
+//
+// INCL r32
+// INCL m32
+func INCL(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "INCL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "INCL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("INCL: bad operands")
+}
+
+// INCQ: Increment by 1.
+//
+// Forms:
+//
+// INCQ r64
+// INCQ m64
+func INCQ(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "INCQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "INCQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("INCQ: bad operands")
+}
+
+// INCW: Increment by 1.
+//
+// Forms:
+//
+// INCW r16
+// INCW m16
+func INCW(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "INCW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "INCW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("INCW: bad operands")
+}
+
+// INSERTPS: Insert Packed Single Precision Floating-Point Value.
+//
+// Forms:
+//
+// INSERTPS imm8 xmm xmm
+// INSERTPS imm8 m32 xmm
+func INSERTPS(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "INSERTPS",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "INSERTPS",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("INSERTPS: bad operands")
+}
+
+// INT: Call to Interrupt Procedure.
+//
+// Forms:
+//
+// INT 3
+// INT imm8
+func INT(i operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is3(i):
+ return &intrep.Instruction{
+ Opcode: "INT",
+ Operands: []operand.Op{i},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsIMM8(i):
+ return &intrep.Instruction{
+ Opcode: "INT",
+ Operands: []operand.Op{i},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("INT: bad operands")
+}
+
+// JA: Jump if above (CF == 0 and ZF == 0).
+//
+// Forms:
+//
+// JA rel8
+// JA rel32
+func JA(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JA",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JA",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JA: bad operands")
+}
+
+// JAE: Jump if above or equal (CF == 0).
+//
+// Forms:
+//
+// JAE rel8
+// JAE rel32
+func JAE(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JAE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JAE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JAE: bad operands")
+}
+
+// JB: Jump if below (CF == 1).
+//
+// Forms:
+//
+// JB rel8
+// JB rel32
+func JB(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JB",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JB",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JB: bad operands")
+}
+
+// JBE: Jump if below or equal (CF == 1 or ZF == 1).
+//
+// Forms:
+//
+// JBE rel8
+// JBE rel32
+func JBE(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JBE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JBE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JBE: bad operands")
+}
+
+// JC: Jump if below (CF == 1).
+//
+// Forms:
+//
+// JC rel8
+// JC rel32
+func JC(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JC",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JC",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JC: bad operands")
+}
+
+// JCC: Jump if above or equal (CF == 0).
+//
+// Forms:
+//
+// JCC rel8
+// JCC rel32
+func JCC(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JCC",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JCC",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JCC: bad operands")
+}
+
+// JCS: Jump if below (CF == 1).
+//
+// Forms:
+//
+// JCS rel8
+// JCS rel32
+func JCS(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JCS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JCS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JCS: bad operands")
+}
+
+// JCXZL: Jump if ECX register is 0.
+//
+// Forms:
+//
+// JCXZL rel8
+func JCXZL(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JCXZL",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{reg.ECX},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JCXZL: bad operands")
+}
+
+// JCXZQ: Jump if RCX register is 0.
+//
+// Forms:
+//
+// JCXZQ rel8
+func JCXZQ(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JCXZQ",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{reg.RCX},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JCXZQ: bad operands")
+}
+
+// JE: Jump if equal (ZF == 1).
+//
+// Forms:
+//
+// JE rel8
+// JE rel32
+func JE(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JE: bad operands")
+}
+
+// JEQ: Jump if equal (ZF == 1).
+//
+// Forms:
+//
+// JEQ rel8
+// JEQ rel32
+func JEQ(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JEQ",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JEQ",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JEQ: bad operands")
+}
+
+// JG: Jump if greater (ZF == 0 and SF == OF).
+//
+// Forms:
+//
+// JG rel8
+// JG rel32
+func JG(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JG",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JG",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JG: bad operands")
+}
+
+// JGE: Jump if greater or equal (SF == OF).
+//
+// Forms:
+//
+// JGE rel8
+// JGE rel32
+func JGE(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JGE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JGE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JGE: bad operands")
+}
+
+// JGT: Jump if greater (ZF == 0 and SF == OF).
+//
+// Forms:
+//
+// JGT rel8
+// JGT rel32
+func JGT(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JGT",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JGT",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JGT: bad operands")
+}
+
+// JHI: Jump if above (CF == 0 and ZF == 0).
+//
+// Forms:
+//
+// JHI rel8
+// JHI rel32
+func JHI(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JHI",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JHI",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JHI: bad operands")
+}
+
+// JHS: Jump if above or equal (CF == 0).
+//
+// Forms:
+//
+// JHS rel8
+// JHS rel32
+func JHS(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JHS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JHS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JHS: bad operands")
+}
+
+// JL: Jump if less (SF != OF).
+//
+// Forms:
+//
+// JL rel8
+// JL rel32
+func JL(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JL",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JL",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JL: bad operands")
+}
+
+// JLE: Jump if less or equal (ZF == 1 or SF != OF).
+//
+// Forms:
+//
+// JLE rel8
+// JLE rel32
+func JLE(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JLE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JLE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JLE: bad operands")
+}
+
+// JLO: Jump if below (CF == 1).
+//
+// Forms:
+//
+// JLO rel8
+// JLO rel32
+func JLO(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JLO",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JLO",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JLO: bad operands")
+}
+
+// JLS: Jump if below or equal (CF == 1 or ZF == 1).
+//
+// Forms:
+//
+// JLS rel8
+// JLS rel32
+func JLS(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JLS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JLS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JLS: bad operands")
+}
+
+// JLT: Jump if less (SF != OF).
+//
+// Forms:
+//
+// JLT rel8
+// JLT rel32
+func JLT(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JLT",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JLT",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JLT: bad operands")
+}
+
+// JMI: Jump if sign (SF == 1).
+//
+// Forms:
+//
+// JMI rel8
+// JMI rel32
+func JMI(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JMI",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JMI",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JMI: bad operands")
+}
+
+// JMP: Jump Unconditionally.
+//
+// Forms:
+//
+// JMP rel8
+// JMP rel32
+// JMP r64
+// JMP m64
+func JMP(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(mr):
+ return &intrep.Instruction{
+ Opcode: "JMP",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: false,
+ }, nil
+ case operand.IsREL32(mr):
+ return &intrep.Instruction{
+ Opcode: "JMP",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: false,
+ }, nil
+ case operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "JMP",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: false,
+ }, nil
+ case operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "JMP",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: false,
+ }, nil
+ }
+ return nil, errors.New("JMP: bad operands")
+}
+
+// JNA: Jump if below or equal (CF == 1 or ZF == 1).
+//
+// Forms:
+//
+// JNA rel8
+// JNA rel32
+func JNA(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNA",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNA",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNA: bad operands")
+}
+
+// JNAE: Jump if below (CF == 1).
+//
+// Forms:
+//
+// JNAE rel8
+// JNAE rel32
+func JNAE(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNAE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNAE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNAE: bad operands")
+}
+
+// JNB: Jump if above or equal (CF == 0).
+//
+// Forms:
+//
+// JNB rel8
+// JNB rel32
+func JNB(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNB",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNB",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNB: bad operands")
+}
+
+// JNBE: Jump if above (CF == 0 and ZF == 0).
+//
+// Forms:
+//
+// JNBE rel8
+// JNBE rel32
+func JNBE(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNBE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNBE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNBE: bad operands")
+}
+
+// JNC: Jump if above or equal (CF == 0).
+//
+// Forms:
+//
+// JNC rel8
+// JNC rel32
+func JNC(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNC",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNC",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNC: bad operands")
+}
+
+// JNE: Jump if not equal (ZF == 0).
+//
+// Forms:
+//
+// JNE rel8
+// JNE rel32
+func JNE(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNE: bad operands")
+}
+
+// JNG: Jump if less or equal (ZF == 1 or SF != OF).
+//
+// Forms:
+//
+// JNG rel8
+// JNG rel32
+func JNG(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNG",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNG",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNG: bad operands")
+}
+
+// JNGE: Jump if less (SF != OF).
+//
+// Forms:
+//
+// JNGE rel8
+// JNGE rel32
+func JNGE(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNGE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNGE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNGE: bad operands")
+}
+
+// JNL: Jump if greater or equal (SF == OF).
+//
+// Forms:
+//
+// JNL rel8
+// JNL rel32
+func JNL(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNL",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNL",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNL: bad operands")
+}
+
+// JNLE: Jump if greater (ZF == 0 and SF == OF).
+//
+// Forms:
+//
+// JNLE rel8
+// JNLE rel32
+func JNLE(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNLE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNLE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNLE: bad operands")
+}
+
+// JNO: Jump if not overflow (OF == 0).
+//
+// Forms:
+//
+// JNO rel8
+// JNO rel32
+func JNO(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNO",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNO",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNO: bad operands")
+}
+
+// JNP: Jump if not parity (PF == 0).
+//
+// Forms:
+//
+// JNP rel8
+// JNP rel32
+func JNP(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNP",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNP",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNP: bad operands")
+}
+
+// JNS: Jump if not sign (SF == 0).
+//
+// Forms:
+//
+// JNS rel8
+// JNS rel32
+func JNS(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNS: bad operands")
+}
+
+// JNZ: Jump if not equal (ZF == 0).
+//
+// Forms:
+//
+// JNZ rel8
+// JNZ rel32
+func JNZ(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JNZ",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JNZ",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JNZ: bad operands")
+}
+
+// JO: Jump if overflow (OF == 1).
+//
+// Forms:
+//
+// JO rel8
+// JO rel32
+func JO(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JO",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JO",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JO: bad operands")
+}
+
+// JOC: Jump if not overflow (OF == 0).
+//
+// Forms:
+//
+// JOC rel8
+// JOC rel32
+func JOC(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JOC",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JOC",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JOC: bad operands")
+}
+
+// JOS: Jump if overflow (OF == 1).
+//
+// Forms:
+//
+// JOS rel8
+// JOS rel32
+func JOS(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JOS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JOS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JOS: bad operands")
+}
+
+// JP: Jump if parity (PF == 1).
+//
+// Forms:
+//
+// JP rel8
+// JP rel32
+func JP(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JP",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JP",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JP: bad operands")
+}
+
+// JPC: Jump if not parity (PF == 0).
+//
+// Forms:
+//
+// JPC rel8
+// JPC rel32
+func JPC(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JPC",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JPC",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JPC: bad operands")
+}
+
+// JPE: Jump if parity (PF == 1).
+//
+// Forms:
+//
+// JPE rel8
+// JPE rel32
+func JPE(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JPE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JPE",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JPE: bad operands")
+}
+
+// JPL: Jump if not sign (SF == 0).
+//
+// Forms:
+//
+// JPL rel8
+// JPL rel32
+func JPL(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JPL",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JPL",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JPL: bad operands")
+}
+
+// JPO: Jump if not parity (PF == 0).
+//
+// Forms:
+//
+// JPO rel8
+// JPO rel32
+func JPO(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JPO",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JPO",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JPO: bad operands")
+}
+
+// JPS: Jump if parity (PF == 1).
+//
+// Forms:
+//
+// JPS rel8
+// JPS rel32
+func JPS(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JPS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JPS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JPS: bad operands")
+}
+
+// JS: Jump if sign (SF == 1).
+//
+// Forms:
+//
+// JS rel8
+// JS rel32
+func JS(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JS",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JS: bad operands")
+}
+
+// JZ: Jump if equal (ZF == 1).
+//
+// Forms:
+//
+// JZ rel8
+// JZ rel32
+func JZ(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsREL8(r):
+ return &intrep.Instruction{
+ Opcode: "JZ",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ case operand.IsREL32(r):
+ return &intrep.Instruction{
+ Opcode: "JZ",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsBranch: true,
+ IsConditional: true,
+ }, nil
+ }
+ return nil, errors.New("JZ: bad operands")
+}
+
+// LDDQU: Load Unaligned Integer 128 Bits.
+//
+// Forms:
+//
+// LDDQU m128 xmm
+func LDDQU(m, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM128(m) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "LDDQU",
+ Operands: []operand.Op{m, x},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ }
+ return nil, errors.New("LDDQU: bad operands")
+}
+
+// LDMXCSR: Load MXCSR Register.
+//
+// Forms:
+//
+// LDMXCSR m32
+func LDMXCSR(m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM32(m):
+ return &intrep.Instruction{
+ Opcode: "LDMXCSR",
+ Operands: []operand.Op{m},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("LDMXCSR: bad operands")
+}
+
+// LEAL: Load Effective Address.
+//
+// Forms:
+//
+// LEAL m r32
+func LEAL(m, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM(m) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "LEAL",
+ Operands: []operand.Op{m, r},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("LEAL: bad operands")
+}
+
+// LEAQ: Load Effective Address.
+//
+// Forms:
+//
+// LEAQ m r64
+func LEAQ(m, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM(m) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "LEAQ",
+ Operands: []operand.Op{m, r},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("LEAQ: bad operands")
+}
+
+// LEAW: Load Effective Address.
+//
+// Forms:
+//
+// LEAW m r16
+func LEAW(m, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM(m) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "LEAW",
+ Operands: []operand.Op{m, r},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("LEAW: bad operands")
+}
+
+// LFENCE: Load Fence.
+//
+// Forms:
+//
+// LFENCE
+func LFENCE() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "LFENCE",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE2"},
+ }, nil
+}
+
+// LZCNTL: Count the Number of Leading Zero Bits.
+//
+// Forms:
+//
+// LZCNTL r32 r32
+// LZCNTL m32 r32
+func LZCNTL(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "LZCNTL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"LZCNT"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "LZCNTL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"LZCNT"},
+ }, nil
+ }
+ return nil, errors.New("LZCNTL: bad operands")
+}
+
+// LZCNTQ: Count the Number of Leading Zero Bits.
+//
+// Forms:
+//
+// LZCNTQ r64 r64
+// LZCNTQ m64 r64
+func LZCNTQ(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "LZCNTQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"LZCNT"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "LZCNTQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"LZCNT"},
+ }, nil
+ }
+ return nil, errors.New("LZCNTQ: bad operands")
+}
+
+// LZCNTW: Count the Number of Leading Zero Bits.
+//
+// Forms:
+//
+// LZCNTW r16 r16
+// LZCNTW m16 r16
+func LZCNTW(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "LZCNTW",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"LZCNT"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "LZCNTW",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"LZCNT"},
+ }, nil
+ }
+ return nil, errors.New("LZCNTW: bad operands")
+}
+
+// MASKMOVDQU: Store Selected Bytes of Double Quadword.
+//
+// Forms:
+//
+// MASKMOVDQU xmm xmm
+func MASKMOVDQU(x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "MASKMOVDQU",
+ Operands: []operand.Op{x, x1},
+ Inputs: []operand.Op{x, x1, reg.RDI},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MASKMOVDQU: bad operands")
+}
+
+// MASKMOVOU: Store Selected Bytes of Double Quadword.
+//
+// Forms:
+//
+// MASKMOVOU xmm xmm
+func MASKMOVOU(x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "MASKMOVOU",
+ Operands: []operand.Op{x, x1},
+ Inputs: []operand.Op{x, x1, reg.RDI},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MASKMOVOU: bad operands")
+}
+
+// MAXPD: Return Maximum Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MAXPD xmm xmm
+// MAXPD m128 xmm
+func MAXPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MAXPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MAXPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MAXPD: bad operands")
+}
+
+// MAXPS: Return Maximum Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MAXPS xmm xmm
+// MAXPS m128 xmm
+func MAXPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MAXPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MAXPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MAXPS: bad operands")
+}
+
+// MAXSD: Return Maximum Scalar Double-Precision Floating-Point Value.
+//
+// Forms:
+//
+// MAXSD xmm xmm
+// MAXSD m64 xmm
+func MAXSD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MAXSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MAXSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MAXSD: bad operands")
+}
+
+// MAXSS: Return Maximum Scalar Single-Precision Floating-Point Value.
+//
+// Forms:
+//
+// MAXSS xmm xmm
+// MAXSS m32 xmm
+func MAXSS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MAXSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MAXSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MAXSS: bad operands")
+}
+
+// MFENCE: Memory Fence.
+//
+// Forms:
+//
+// MFENCE
+func MFENCE() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "MFENCE",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE2"},
+ }, nil
+}
+
+// MINPD: Return Minimum Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MINPD xmm xmm
+// MINPD m128 xmm
+func MINPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MINPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MINPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MINPD: bad operands")
+}
+
+// MINPS: Return Minimum Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MINPS xmm xmm
+// MINPS m128 xmm
+func MINPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MINPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MINPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MINPS: bad operands")
+}
+
+// MINSD: Return Minimum Scalar Double-Precision Floating-Point Value.
+//
+// Forms:
+//
+// MINSD xmm xmm
+// MINSD m64 xmm
+func MINSD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MINSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MINSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MINSD: bad operands")
+}
+
+// MINSS: Return Minimum Scalar Single-Precision Floating-Point Value.
+//
+// Forms:
+//
+// MINSS xmm xmm
+// MINSS m32 xmm
+func MINSS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MINSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MINSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MINSS: bad operands")
+}
+
+// MONITOR: Monitor a Linear Address Range.
+//
+// Forms:
+//
+// MONITOR
+func MONITOR() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "MONITOR",
+ Operands: nil,
+ Inputs: []operand.Op{reg.RAX, reg.ECX, reg.EDX},
+ Outputs: []operand.Op{},
+ ISA: []string{"MONITOR"},
+ }, nil
+}
+
+// MOVAPD: Move Aligned Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MOVAPD xmm xmm
+// MOVAPD m128 xmm
+// MOVAPD xmm m128
+func MOVAPD(mx, mx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVAPD",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVAPD",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsM128(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVAPD",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVAPD: bad operands")
+}
+
+// MOVAPS: Move Aligned Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MOVAPS xmm xmm
+// MOVAPS m128 xmm
+// MOVAPS xmm m128
+func MOVAPS(mx, mx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVAPS",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVAPS",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsM128(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVAPS",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MOVAPS: bad operands")
+}
+
+// MOVB: Move.
+//
+// Forms:
+//
+// MOVB imm8 r8
+// MOVB r8 r8
+// MOVB m8 r8
+// MOVB imm8 m8
+// MOVB r8 m8
+func MOVB(imr, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imr) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVB",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVB",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(imr) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVB",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVB",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVB",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("MOVB: bad operands")
+}
+
+// MOVBELL: Move Data After Swapping Bytes.
+//
+// Forms:
+//
+// MOVBELL m32 r32
+// MOVBELL r32 m32
+func MOVBELL(mr, mr1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM32(mr) && operand.IsR32(mr1):
+ return &intrep.Instruction{
+ Opcode: "MOVBELL",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr1},
+ ISA: []string{"MOVBE"},
+ }, nil
+ case operand.IsR32(mr) && operand.IsM32(mr1):
+ return &intrep.Instruction{
+ Opcode: "MOVBELL",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr1},
+ ISA: []string{"MOVBE"},
+ }, nil
+ }
+ return nil, errors.New("MOVBELL: bad operands")
+}
+
+// MOVBEQQ: Move Data After Swapping Bytes.
+//
+// Forms:
+//
+// MOVBEQQ m64 r64
+// MOVBEQQ r64 m64
+func MOVBEQQ(mr, mr1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM64(mr) && operand.IsR64(mr1):
+ return &intrep.Instruction{
+ Opcode: "MOVBEQQ",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr1},
+ ISA: []string{"MOVBE"},
+ }, nil
+ case operand.IsR64(mr) && operand.IsM64(mr1):
+ return &intrep.Instruction{
+ Opcode: "MOVBEQQ",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr1},
+ ISA: []string{"MOVBE"},
+ }, nil
+ }
+ return nil, errors.New("MOVBEQQ: bad operands")
+}
+
+// MOVBEWW: Move Data After Swapping Bytes.
+//
+// Forms:
+//
+// MOVBEWW m16 r16
+// MOVBEWW r16 m16
+func MOVBEWW(mr, mr1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM16(mr) && operand.IsR16(mr1):
+ return &intrep.Instruction{
+ Opcode: "MOVBEWW",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr1},
+ ISA: []string{"MOVBE"},
+ }, nil
+ case operand.IsR16(mr) && operand.IsM16(mr1):
+ return &intrep.Instruction{
+ Opcode: "MOVBEWW",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr1},
+ ISA: []string{"MOVBE"},
+ }, nil
+ }
+ return nil, errors.New("MOVBEWW: bad operands")
+}
+
+// MOVBLSX: Move with Sign-Extension.
+//
+// Forms:
+//
+// MOVBLSX r8 r32
+// MOVBLSX m8 r32
+func MOVBLSX(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "MOVBLSX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM8(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "MOVBLSX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("MOVBLSX: bad operands")
+}
+
+// MOVBLZX: Move with Zero-Extend.
+//
+// Forms:
+//
+// MOVBLZX r8 r32
+// MOVBLZX m8 r32
+func MOVBLZX(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "MOVBLZX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM8(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "MOVBLZX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("MOVBLZX: bad operands")
+}
+
+// MOVBQSX: Move with Sign-Extension.
+//
+// Forms:
+//
+// MOVBQSX r8 r64
+// MOVBQSX m8 r64
+func MOVBQSX(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "MOVBQSX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM8(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "MOVBQSX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("MOVBQSX: bad operands")
+}
+
+// MOVBQZX: Move with Zero-Extend.
+//
+// Forms:
+//
+// MOVBQZX r8 r64
+// MOVBQZX m8 r64
+func MOVBQZX(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "MOVBQZX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM8(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "MOVBQZX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("MOVBQZX: bad operands")
+}
+
+// MOVBWSX: Move with Sign-Extension.
+//
+// Forms:
+//
+// MOVBWSX r8 r16
+// MOVBWSX m8 r16
+func MOVBWSX(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "MOVBWSX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM8(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "MOVBWSX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("MOVBWSX: bad operands")
+}
+
+// MOVBWZX: Move with Zero-Extend.
+//
+// Forms:
+//
+// MOVBWZX r8 r16
+// MOVBWZX m8 r16
+func MOVBWZX(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "MOVBWZX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM8(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "MOVBWZX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("MOVBWZX: bad operands")
+}
+
+// MOVD: Move.
+//
+// Forms:
+//
+// MOVD imm32 r64
+// MOVD imm64 r64
+// MOVD r64 r64
+// MOVD m64 r64
+// MOVD imm32 m64
+// MOVD r64 m64
+// MOVD xmm r64
+// MOVD r64 xmm
+// MOVD xmm xmm
+// MOVD m64 xmm
+// MOVD xmm m64
+// MOVD xmm r32
+// MOVD r32 xmm
+// MOVD m32 xmm
+// MOVD xmm m32
+func MOVD(imrx, mrx operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsIMM64(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsR64(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsM64(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsIMM32(imrx) && operand.IsM64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsR64(imrx) && operand.IsM64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsR64(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsM64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsR32(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsR32(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM32(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsM32(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVD",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVD: bad operands")
+}
+
+// MOVDDUP: Move One Double-FP and Duplicate.
+//
+// Forms:
+//
+// MOVDDUP xmm xmm
+// MOVDDUP m64 xmm
+func MOVDDUP(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MOVDDUP",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MOVDDUP",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ }
+ return nil, errors.New("MOVDDUP: bad operands")
+}
+
+// MOVDQ2Q: Move.
+//
+// Forms:
+//
+// MOVDQ2Q imm32 r64
+// MOVDQ2Q imm64 r64
+// MOVDQ2Q r64 r64
+// MOVDQ2Q m64 r64
+// MOVDQ2Q imm32 m64
+// MOVDQ2Q r64 m64
+// MOVDQ2Q xmm r64
+// MOVDQ2Q r64 xmm
+// MOVDQ2Q xmm xmm
+// MOVDQ2Q m64 xmm
+// MOVDQ2Q xmm m64
+// MOVDQ2Q xmm r32
+// MOVDQ2Q r32 xmm
+// MOVDQ2Q m32 xmm
+// MOVDQ2Q xmm m32
+func MOVDQ2Q(imrx, mrx operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsIMM64(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsR64(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsM64(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsIMM32(imrx) && operand.IsM64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsR64(imrx) && operand.IsM64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsR64(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsM64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsR32(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsR32(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM32(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsM32(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVDQ2Q",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVDQ2Q: bad operands")
+}
+
+// MOVHLPS: Move Packed Single-Precision Floating-Point Values High to Low.
+//
+// Forms:
+//
+// MOVHLPS xmm xmm
+func MOVHLPS(x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "MOVHLPS",
+ Operands: []operand.Op{x, x1},
+ Inputs: []operand.Op{x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MOVHLPS: bad operands")
+}
+
+// MOVHPD: Move High Packed Double-Precision Floating-Point Value.
+//
+// Forms:
+//
+// MOVHPD m64 xmm
+// MOVHPD xmm m64
+func MOVHPD(mx, mx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM64(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVHPD",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx, mx1},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsM64(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVHPD",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVHPD: bad operands")
+}
+
+// MOVHPS: Move High Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MOVHPS m64 xmm
+// MOVHPS xmm m64
+func MOVHPS(mx, mx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM64(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVHPS",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx, mx1},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsM64(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVHPS",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MOVHPS: bad operands")
+}
+
+// MOVL: Move.
+//
+// Forms:
+//
+// MOVL imm32 r32
+// MOVL r32 r32
+// MOVL m32 r32
+// MOVL imm32 m32
+// MOVL r32 m32
+func MOVL(imr, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVL",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVL",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM32(imr) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVL",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVL",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVL",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("MOVL: bad operands")
+}
+
+// MOVLHPS: Move Packed Single-Precision Floating-Point Values Low to High.
+//
+// Forms:
+//
+// MOVLHPS xmm xmm
+func MOVLHPS(x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "MOVLHPS",
+ Operands: []operand.Op{x, x1},
+ Inputs: []operand.Op{x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MOVLHPS: bad operands")
+}
+
+// MOVLPD: Move Low Packed Double-Precision Floating-Point Value.
+//
+// Forms:
+//
+// MOVLPD m64 xmm
+// MOVLPD xmm m64
+func MOVLPD(mx, mx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM64(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVLPD",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx, mx1},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsM64(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVLPD",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVLPD: bad operands")
+}
+
+// MOVLPS: Move Low Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MOVLPS m64 xmm
+// MOVLPS xmm m64
+func MOVLPS(mx, mx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM64(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVLPS",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx, mx1},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsM64(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVLPS",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MOVLPS: bad operands")
+}
+
+// MOVLQSX: Move Doubleword to Quadword with Sign-Extension.
+//
+// Forms:
+//
+// MOVLQSX r32 r64
+// MOVLQSX m32 r64
+func MOVLQSX(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "MOVLQSX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "MOVLQSX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("MOVLQSX: bad operands")
+}
+
+// MOVLQZX: Move with Zero-Extend.
+//
+// Forms:
+//
+// MOVLQZX m32 r64
+func MOVLQZX(m, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM32(m) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "MOVLQZX",
+ Operands: []operand.Op{m, r},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("MOVLQZX: bad operands")
+}
+
+// MOVMSKPD: Extract Packed Double-Precision Floating-Point Sign Mask.
+//
+// Forms:
+//
+// MOVMSKPD xmm r32
+func MOVMSKPD(x, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "MOVMSKPD",
+ Operands: []operand.Op{x, r},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVMSKPD: bad operands")
+}
+
+// MOVMSKPS: Extract Packed Single-Precision Floating-Point Sign Mask.
+//
+// Forms:
+//
+// MOVMSKPS xmm r32
+func MOVMSKPS(x, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "MOVMSKPS",
+ Operands: []operand.Op{x, r},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MOVMSKPS: bad operands")
+}
+
+// MOVNTDQ: Store Double Quadword Using Non-Temporal Hint.
+//
+// Forms:
+//
+// MOVNTDQ xmm m128
+func MOVNTDQ(x, m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsM128(m):
+ return &intrep.Instruction{
+ Opcode: "MOVNTDQ",
+ Operands: []operand.Op{x, m},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{m},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVNTDQ: bad operands")
+}
+
+// MOVNTDQA: Load Double Quadword Non-Temporal Aligned Hint.
+//
+// Forms:
+//
+// MOVNTDQA m128 xmm
+func MOVNTDQA(m, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM128(m) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MOVNTDQA",
+ Operands: []operand.Op{m, x},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("MOVNTDQA: bad operands")
+}
+
+// MOVNTIL: Store Doubleword Using Non-Temporal Hint.
+//
+// Forms:
+//
+// MOVNTIL r32 m32
+func MOVNTIL(r, m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(r) && operand.IsM32(m):
+ return &intrep.Instruction{
+ Opcode: "MOVNTIL",
+ Operands: []operand.Op{r, m},
+ Inputs: []operand.Op{r},
+ Outputs: []operand.Op{m},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVNTIL: bad operands")
+}
+
+// MOVNTIQ: Store Doubleword Using Non-Temporal Hint.
+//
+// Forms:
+//
+// MOVNTIQ r64 m64
+func MOVNTIQ(r, m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(r) && operand.IsM64(m):
+ return &intrep.Instruction{
+ Opcode: "MOVNTIQ",
+ Operands: []operand.Op{r, m},
+ Inputs: []operand.Op{r},
+ Outputs: []operand.Op{m},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVNTIQ: bad operands")
+}
+
+// MOVNTO: Store Double Quadword Using Non-Temporal Hint.
+//
+// Forms:
+//
+// MOVNTO xmm m128
+func MOVNTO(x, m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsM128(m):
+ return &intrep.Instruction{
+ Opcode: "MOVNTO",
+ Operands: []operand.Op{x, m},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{m},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVNTO: bad operands")
+}
+
+// MOVNTPD: Store Packed Double-Precision Floating-Point Values Using Non-Temporal Hint.
+//
+// Forms:
+//
+// MOVNTPD xmm m128
+func MOVNTPD(x, m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsM128(m):
+ return &intrep.Instruction{
+ Opcode: "MOVNTPD",
+ Operands: []operand.Op{x, m},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{m},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVNTPD: bad operands")
+}
+
+// MOVNTPS: Store Packed Single-Precision Floating-Point Values Using Non-Temporal Hint.
+//
+// Forms:
+//
+// MOVNTPS xmm m128
+func MOVNTPS(x, m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsM128(m):
+ return &intrep.Instruction{
+ Opcode: "MOVNTPS",
+ Operands: []operand.Op{x, m},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{m},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MOVNTPS: bad operands")
+}
+
+// MOVO: Move Aligned Double Quadword.
+//
+// Forms:
+//
+// MOVO xmm xmm
+// MOVO m128 xmm
+// MOVO xmm m128
+func MOVO(mx, mx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVO",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVO",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsM128(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVO",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVO: bad operands")
+}
+
+// MOVOA: Move Aligned Double Quadword.
+//
+// Forms:
+//
+// MOVOA xmm xmm
+// MOVOA m128 xmm
+// MOVOA xmm m128
+func MOVOA(mx, mx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVOA",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVOA",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsM128(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVOA",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVOA: bad operands")
+}
+
+// MOVOU: Move Unaligned Double Quadword.
+//
+// Forms:
+//
+// MOVOU xmm xmm
+// MOVOU m128 xmm
+// MOVOU xmm m128
+func MOVOU(mx, mx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVOU",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVOU",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsM128(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVOU",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVOU: bad operands")
+}
+
+// MOVQ: Move.
+//
+// Forms:
+//
+// MOVQ imm32 r64
+// MOVQ imm64 r64
+// MOVQ r64 r64
+// MOVQ m64 r64
+// MOVQ imm32 m64
+// MOVQ r64 m64
+// MOVQ xmm r64
+// MOVQ r64 xmm
+// MOVQ xmm xmm
+// MOVQ m64 xmm
+// MOVQ xmm m64
+// MOVQ xmm r32
+// MOVQ r32 xmm
+// MOVQ m32 xmm
+// MOVQ xmm m32
+func MOVQ(imrx, mrx operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsIMM64(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsR64(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsM64(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsIMM32(imrx) && operand.IsM64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsR64(imrx) && operand.IsM64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsR64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsR64(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsM64(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsR32(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsR32(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM32(imrx) && operand.IsXMM(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imrx) && operand.IsM32(mrx):
+ return &intrep.Instruction{
+ Opcode: "MOVQ",
+ Operands: []operand.Op{imrx, mrx},
+ Inputs: []operand.Op{imrx},
+ Outputs: []operand.Op{mrx},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVQ: bad operands")
+}
+
+// MOVSD: Move Scalar Double-Precision Floating-Point Value.
+//
+// Forms:
+//
+// MOVSD xmm xmm
+// MOVSD m64 xmm
+// MOVSD xmm m64
+func MOVSD(mx, mx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVSD",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx, mx1},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVSD",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsM64(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVSD",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVSD: bad operands")
+}
+
+// MOVSHDUP: Move Packed Single-FP High and Duplicate.
+//
+// Forms:
+//
+// MOVSHDUP xmm xmm
+// MOVSHDUP m128 xmm
+func MOVSHDUP(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MOVSHDUP",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MOVSHDUP",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ }
+ return nil, errors.New("MOVSHDUP: bad operands")
+}
+
+// MOVSLDUP: Move Packed Single-FP Low and Duplicate.
+//
+// Forms:
+//
+// MOVSLDUP xmm xmm
+// MOVSLDUP m128 xmm
+func MOVSLDUP(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MOVSLDUP",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MOVSLDUP",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE3"},
+ }, nil
+ }
+ return nil, errors.New("MOVSLDUP: bad operands")
+}
+
+// MOVSS: Move Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MOVSS xmm xmm
+// MOVSS m32 xmm
+// MOVSS xmm m32
+func MOVSS(mx, mx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVSS",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx, mx1},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVSS",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsM32(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVSS",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MOVSS: bad operands")
+}
+
+// MOVUPD: Move Unaligned Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MOVUPD xmm xmm
+// MOVUPD m128 xmm
+// MOVUPD xmm m128
+func MOVUPD(mx, mx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVUPD",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVUPD",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsM128(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVUPD",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MOVUPD: bad operands")
+}
+
+// MOVUPS: Move Unaligned Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MOVUPS xmm xmm
+// MOVUPS m128 xmm
+// MOVUPS xmm m128
+func MOVUPS(mx, mx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVUPS",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVUPS",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsM128(mx1):
+ return &intrep.Instruction{
+ Opcode: "MOVUPS",
+ Operands: []operand.Op{mx, mx1},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{mx1},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MOVUPS: bad operands")
+}
+
+// MOVW: Move.
+//
+// Forms:
+//
+// MOVW imm16 r16
+// MOVW r16 r16
+// MOVW m16 r16
+// MOVW imm16 m16
+// MOVW r16 m16
+func MOVW(imr, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM16(imr) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVW",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVW",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM16(imr) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVW",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVW",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "MOVW",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("MOVW: bad operands")
+}
+
+// MOVWLSX: Move with Sign-Extension.
+//
+// Forms:
+//
+// MOVWLSX r16 r32
+// MOVWLSX m16 r32
+func MOVWLSX(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "MOVWLSX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "MOVWLSX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("MOVWLSX: bad operands")
+}
+
+// MOVWLZX: Move with Zero-Extend.
+//
+// Forms:
+//
+// MOVWLZX r16 r32
+// MOVWLZX m16 r32
+func MOVWLZX(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "MOVWLZX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "MOVWLZX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("MOVWLZX: bad operands")
+}
+
+// MOVWQSX: Move with Sign-Extension.
+//
+// Forms:
+//
+// MOVWQSX r16 r64
+// MOVWQSX m16 r64
+func MOVWQSX(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "MOVWQSX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "MOVWQSX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("MOVWQSX: bad operands")
+}
+
+// MOVWQZX: Move with Zero-Extend.
+//
+// Forms:
+//
+// MOVWQZX r16 r64
+// MOVWQZX m16 r64
+func MOVWQZX(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "MOVWQZX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "MOVWQZX",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ }, nil
+ }
+ return nil, errors.New("MOVWQZX: bad operands")
+}
+
+// MPSADBW: Compute Multiple Packed Sums of Absolute Difference.
+//
+// Forms:
+//
+// MPSADBW imm8 xmm xmm
+// MPSADBW imm8 m128 xmm
+func MPSADBW(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MPSADBW",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MPSADBW",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("MPSADBW: bad operands")
+}
+
+// MULB: Unsigned Multiply.
+//
+// Forms:
+//
+// MULB r8
+// MULB m8
+func MULB(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "MULB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AL},
+ Outputs: []operand.Op{reg.AX},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "MULB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AL},
+ Outputs: []operand.Op{reg.AX},
+ }, nil
+ }
+ return nil, errors.New("MULB: bad operands")
+}
+
+// MULL: Unsigned Multiply.
+//
+// Forms:
+//
+// MULL r32
+// MULL m32
+func MULL(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "MULL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.EAX},
+ Outputs: []operand.Op{reg.EAX, reg.EDX},
+ }, nil
+ case operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "MULL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.EAX},
+ Outputs: []operand.Op{reg.EAX, reg.EDX},
+ }, nil
+ }
+ return nil, errors.New("MULL: bad operands")
+}
+
+// MULPD: Multiply Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MULPD xmm xmm
+// MULPD m128 xmm
+func MULPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MULPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MULPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MULPD: bad operands")
+}
+
+// MULPS: Multiply Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MULPS xmm xmm
+// MULPS m128 xmm
+func MULPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MULPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MULPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MULPS: bad operands")
+}
+
+// MULQ: Unsigned Multiply.
+//
+// Forms:
+//
+// MULQ r64
+// MULQ m64
+func MULQ(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "MULQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.RAX},
+ Outputs: []operand.Op{reg.RAX, reg.RDX},
+ }, nil
+ case operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "MULQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.RAX},
+ Outputs: []operand.Op{reg.RAX, reg.RDX},
+ }, nil
+ }
+ return nil, errors.New("MULQ: bad operands")
+}
+
+// MULSD: Multiply Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MULSD xmm xmm
+// MULSD m64 xmm
+func MULSD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MULSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MULSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("MULSD: bad operands")
+}
+
+// MULSS: Multiply Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// MULSS xmm xmm
+// MULSS m32 xmm
+func MULSS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MULSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "MULSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("MULSS: bad operands")
+}
+
+// MULW: Unsigned Multiply.
+//
+// Forms:
+//
+// MULW r16
+// MULW m16
+func MULW(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "MULW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AX},
+ Outputs: []operand.Op{reg.AX, reg.DX},
+ }, nil
+ case operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "MULW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr, reg.AX},
+ Outputs: []operand.Op{reg.AX, reg.DX},
+ }, nil
+ }
+ return nil, errors.New("MULW: bad operands")
+}
+
+// MULXL: Unsigned Multiply Without Affecting Flags.
+//
+// Forms:
+//
+// MULXL r32 r32 r32
+// MULXL m32 r32 r32
+func MULXL(mr, r, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "MULXL",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, reg.EDX},
+ Outputs: []operand.Op{r, r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "MULXL",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, reg.EDX},
+ Outputs: []operand.Op{r, r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("MULXL: bad operands")
+}
+
+// MULXQ: Unsigned Multiply Without Affecting Flags.
+//
+// Forms:
+//
+// MULXQ r64 r64 r64
+// MULXQ m64 r64 r64
+func MULXQ(mr, r, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "MULXQ",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, reg.RDX},
+ Outputs: []operand.Op{r, r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "MULXQ",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, reg.RDX},
+ Outputs: []operand.Op{r, r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("MULXQ: bad operands")
+}
+
+// MWAIT: Monitor Wait.
+//
+// Forms:
+//
+// MWAIT
+func MWAIT() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "MWAIT",
+ Operands: nil,
+ Inputs: []operand.Op{reg.EAX, reg.ECX},
+ Outputs: []operand.Op{},
+ ISA: []string{"MONITOR"},
+ }, nil
+}
+
+// NEGB: Two's Complement Negation.
+//
+// Forms:
+//
+// NEGB r8
+// NEGB m8
+func NEGB(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "NEGB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "NEGB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("NEGB: bad operands")
+}
+
+// NEGL: Two's Complement Negation.
+//
+// Forms:
+//
+// NEGL r32
+// NEGL m32
+func NEGL(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "NEGL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "NEGL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("NEGL: bad operands")
+}
+
+// NEGQ: Two's Complement Negation.
+//
+// Forms:
+//
+// NEGQ r64
+// NEGQ m64
+func NEGQ(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "NEGQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "NEGQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("NEGQ: bad operands")
+}
+
+// NEGW: Two's Complement Negation.
+//
+// Forms:
+//
+// NEGW r16
+// NEGW m16
+func NEGW(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "NEGW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "NEGW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("NEGW: bad operands")
+}
+
+// NOP: No Operation.
+//
+// Forms:
+//
+// NOP
+func NOP() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "NOP",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+}
+
+// NOTB: One's Complement Negation.
+//
+// Forms:
+//
+// NOTB r8
+// NOTB m8
+func NOTB(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "NOTB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "NOTB",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("NOTB: bad operands")
+}
+
+// NOTL: One's Complement Negation.
+//
+// Forms:
+//
+// NOTL r32
+// NOTL m32
+func NOTL(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "NOTL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "NOTL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("NOTL: bad operands")
+}
+
+// NOTQ: One's Complement Negation.
+//
+// Forms:
+//
+// NOTQ r64
+// NOTQ m64
+func NOTQ(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "NOTQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "NOTQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("NOTQ: bad operands")
+}
+
+// NOTW: One's Complement Negation.
+//
+// Forms:
+//
+// NOTW r16
+// NOTW m16
+func NOTW(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "NOTW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "NOTW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("NOTW: bad operands")
+}
+
+// ORB: Logical Inclusive OR.
+//
+// Forms:
+//
+// ORB imm8 al
+// ORB imm8 r8
+// ORB r8 r8
+// ORB m8 r8
+// ORB imm8 m8
+// ORB r8 m8
+func ORB(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imr) && operand.IsAL(amr):
+ return &intrep.Instruction{
+ Opcode: "ORB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "ORB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "ORB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "ORB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "ORB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "ORB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("ORB: bad operands")
+}
+
+// ORL: Logical Inclusive OR.
+//
+// Forms:
+//
+// ORL imm32 eax
+// ORL imm8 r32
+// ORL imm32 r32
+// ORL r32 r32
+// ORL m32 r32
+// ORL imm8 m32
+// ORL imm32 m32
+// ORL r32 m32
+func ORL(imr, emr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsEAX(emr):
+ return &intrep.Instruction{
+ Opcode: "ORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "ORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "ORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "ORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "ORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ }
+ return nil, errors.New("ORL: bad operands")
+}
+
+// ORPD: Bitwise Logical OR of Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// ORPD xmm xmm
+// ORPD m128 xmm
+func ORPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ORPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ORPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("ORPD: bad operands")
+}
+
+// ORPS: Bitwise Logical OR of Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// ORPS xmm xmm
+// ORPS m128 xmm
+func ORPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ORPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ORPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("ORPS: bad operands")
+}
+
+// ORQ: Logical Inclusive OR.
+//
+// Forms:
+//
+// ORQ imm32 rax
+// ORQ imm8 r64
+// ORQ imm32 r64
+// ORQ r64 r64
+// ORQ m64 r64
+// ORQ imm8 m64
+// ORQ imm32 m64
+// ORQ r64 m64
+func ORQ(imr, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsRAX(mr):
+ return &intrep.Instruction{
+ Opcode: "ORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("ORQ: bad operands")
+}
+
+// ORW: Logical Inclusive OR.
+//
+// Forms:
+//
+// ORW imm16 ax
+// ORW imm8 r16
+// ORW imm16 r16
+// ORW r16 r16
+// ORW m16 r16
+// ORW imm8 m16
+// ORW imm16 m16
+// ORW r16 m16
+func ORW(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM16(imr) && operand.IsAX(amr):
+ return &intrep.Instruction{
+ Opcode: "ORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "ORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "ORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "ORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "ORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("ORW: bad operands")
+}
+
+// PABSB: Packed Absolute Value of Byte Integers.
+//
+// Forms:
+//
+// PABSB xmm xmm
+// PABSB m128 xmm
+func PABSB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PABSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PABSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PABSB: bad operands")
+}
+
+// PABSD: Packed Absolute Value of Doubleword Integers.
+//
+// Forms:
+//
+// PABSD xmm xmm
+// PABSD m128 xmm
+func PABSD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PABSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PABSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PABSD: bad operands")
+}
+
+// PABSW: Packed Absolute Value of Word Integers.
+//
+// Forms:
+//
+// PABSW xmm xmm
+// PABSW m128 xmm
+func PABSW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PABSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PABSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PABSW: bad operands")
+}
+
+// PACKSSLW: Pack Doublewords into Words with Signed Saturation.
+//
+// Forms:
+//
+// PACKSSLW xmm xmm
+// PACKSSLW m128 xmm
+func PACKSSLW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PACKSSLW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PACKSSLW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PACKSSLW: bad operands")
+}
+
+// PACKSSWB: Pack Words into Bytes with Signed Saturation.
+//
+// Forms:
+//
+// PACKSSWB xmm xmm
+// PACKSSWB m128 xmm
+func PACKSSWB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PACKSSWB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PACKSSWB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PACKSSWB: bad operands")
+}
+
+// PACKUSDW: Pack Doublewords into Words with Unsigned Saturation.
+//
+// Forms:
+//
+// PACKUSDW xmm xmm
+// PACKUSDW m128 xmm
+func PACKUSDW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PACKUSDW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PACKUSDW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PACKUSDW: bad operands")
+}
+
+// PACKUSWB: Pack Words into Bytes with Unsigned Saturation.
+//
+// Forms:
+//
+// PACKUSWB xmm xmm
+// PACKUSWB m128 xmm
+func PACKUSWB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PACKUSWB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PACKUSWB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PACKUSWB: bad operands")
+}
+
+// PADDB: Add Packed Byte Integers.
+//
+// Forms:
+//
+// PADDB xmm xmm
+// PADDB m128 xmm
+func PADDB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PADDB: bad operands")
+}
+
+// PADDD: Add Packed Doubleword Integers.
+//
+// Forms:
+//
+// PADDD xmm xmm
+// PADDD m128 xmm
+func PADDD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PADDD: bad operands")
+}
+
+// PADDL: Add Packed Doubleword Integers.
+//
+// Forms:
+//
+// PADDL xmm xmm
+// PADDL m128 xmm
+func PADDL(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PADDL: bad operands")
+}
+
+// PADDQ: Add Packed Quadword Integers.
+//
+// Forms:
+//
+// PADDQ xmm xmm
+// PADDQ m128 xmm
+func PADDQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PADDQ: bad operands")
+}
+
+// PADDSB: Add Packed Signed Byte Integers with Signed Saturation.
+//
+// Forms:
+//
+// PADDSB xmm xmm
+// PADDSB m128 xmm
+func PADDSB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PADDSB: bad operands")
+}
+
+// PADDSW: Add Packed Signed Word Integers with Signed Saturation.
+//
+// Forms:
+//
+// PADDSW xmm xmm
+// PADDSW m128 xmm
+func PADDSW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PADDSW: bad operands")
+}
+
+// PADDUSB: Add Packed Unsigned Byte Integers with Unsigned Saturation.
+//
+// Forms:
+//
+// PADDUSB xmm xmm
+// PADDUSB m128 xmm
+func PADDUSB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDUSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDUSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PADDUSB: bad operands")
+}
+
+// PADDUSW: Add Packed Unsigned Word Integers with Unsigned Saturation.
+//
+// Forms:
+//
+// PADDUSW xmm xmm
+// PADDUSW m128 xmm
+func PADDUSW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDUSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDUSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PADDUSW: bad operands")
+}
+
+// PADDW: Add Packed Word Integers.
+//
+// Forms:
+//
+// PADDW xmm xmm
+// PADDW m128 xmm
+func PADDW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PADDW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PADDW: bad operands")
+}
+
+// PALIGNR: Packed Align Right.
+//
+// Forms:
+//
+// PALIGNR imm8 xmm xmm
+// PALIGNR imm8 m128 xmm
+func PALIGNR(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PALIGNR",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PALIGNR",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PALIGNR: bad operands")
+}
+
+// PAND: Packed Bitwise Logical AND.
+//
+// Forms:
+//
+// PAND xmm xmm
+// PAND m128 xmm
+func PAND(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PAND",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PAND",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PAND: bad operands")
+}
+
+// PANDN: Packed Bitwise Logical AND NOT.
+//
+// Forms:
+//
+// PANDN xmm xmm
+// PANDN m128 xmm
+func PANDN(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PANDN",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PANDN",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PANDN: bad operands")
+}
+
+// PAUSE: Spin Loop Hint.
+//
+// Forms:
+//
+// PAUSE
+func PAUSE() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "PAUSE",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+}
+
+// PAVGB: Average Packed Byte Integers.
+//
+// Forms:
+//
+// PAVGB xmm xmm
+// PAVGB m128 xmm
+func PAVGB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PAVGB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PAVGB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PAVGB: bad operands")
+}
+
+// PAVGW: Average Packed Word Integers.
+//
+// Forms:
+//
+// PAVGW xmm xmm
+// PAVGW m128 xmm
+func PAVGW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PAVGW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PAVGW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PAVGW: bad operands")
+}
+
+// PBLENDVB: Variable Blend Packed Bytes.
+//
+// Forms:
+//
+// PBLENDVB xmm0 xmm xmm
+// PBLENDVB xmm0 m128 xmm
+func PBLENDVB(x, mx, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM0(x) && operand.IsXMM(mx) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "PBLENDVB",
+ Operands: []operand.Op{x, mx, x1},
+ Inputs: []operand.Op{x, mx, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsXMM0(x) && operand.IsM128(mx) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "PBLENDVB",
+ Operands: []operand.Op{x, mx, x1},
+ Inputs: []operand.Op{x, mx, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PBLENDVB: bad operands")
+}
+
+// PBLENDW: Blend Packed Words.
+//
+// Forms:
+//
+// PBLENDW imm8 xmm xmm
+// PBLENDW imm8 m128 xmm
+func PBLENDW(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PBLENDW",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PBLENDW",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PBLENDW: bad operands")
+}
+
+// PCLMULQDQ: Carry-Less Quadword Multiplication.
+//
+// Forms:
+//
+// PCLMULQDQ imm8 xmm xmm
+// PCLMULQDQ imm8 m128 xmm
+func PCLMULQDQ(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCLMULQDQ",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"PCLMULQDQ"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCLMULQDQ",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"PCLMULQDQ"},
+ }, nil
+ }
+ return nil, errors.New("PCLMULQDQ: bad operands")
+}
+
+// PCMPEQB: Compare Packed Byte Data for Equality.
+//
+// Forms:
+//
+// PCMPEQB xmm xmm
+// PCMPEQB m128 xmm
+func PCMPEQB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPEQB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPEQB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PCMPEQB: bad operands")
+}
+
+// PCMPEQL: Compare Packed Doubleword Data for Equality.
+//
+// Forms:
+//
+// PCMPEQL xmm xmm
+// PCMPEQL m128 xmm
+func PCMPEQL(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPEQL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPEQL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PCMPEQL: bad operands")
+}
+
+// PCMPEQQ: Compare Packed Quadword Data for Equality.
+//
+// Forms:
+//
+// PCMPEQQ xmm xmm
+// PCMPEQQ m128 xmm
+func PCMPEQQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPEQQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPEQQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PCMPEQQ: bad operands")
+}
+
+// PCMPEQW: Compare Packed Word Data for Equality.
+//
+// Forms:
+//
+// PCMPEQW xmm xmm
+// PCMPEQW m128 xmm
+func PCMPEQW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPEQW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPEQW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PCMPEQW: bad operands")
+}
+
+// PCMPESTRI: Packed Compare Explicit Length Strings, Return Index.
+//
+// Forms:
+//
+// PCMPESTRI imm8 xmm xmm
+// PCMPESTRI imm8 m128 xmm
+func PCMPESTRI(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPESTRI",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x, reg.EAX, reg.EDX},
+ Outputs: []operand.Op{reg.ECX},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPESTRI",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x, reg.EAX, reg.EDX},
+ Outputs: []operand.Op{reg.ECX},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ }
+ return nil, errors.New("PCMPESTRI: bad operands")
+}
+
+// PCMPESTRM: Packed Compare Explicit Length Strings, Return Mask.
+//
+// Forms:
+//
+// PCMPESTRM imm8 xmm xmm
+// PCMPESTRM imm8 m128 xmm
+func PCMPESTRM(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPESTRM",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x, reg.EAX, reg.EDX},
+ Outputs: []operand.Op{reg.X0},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPESTRM",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x, reg.EAX, reg.EDX},
+ Outputs: []operand.Op{reg.X0},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ }
+ return nil, errors.New("PCMPESTRM: bad operands")
+}
+
+// PCMPGTB: Compare Packed Signed Byte Integers for Greater Than.
+//
+// Forms:
+//
+// PCMPGTB xmm xmm
+// PCMPGTB m128 xmm
+func PCMPGTB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPGTB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPGTB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PCMPGTB: bad operands")
+}
+
+// PCMPGTL: Compare Packed Signed Doubleword Integers for Greater Than.
+//
+// Forms:
+//
+// PCMPGTL xmm xmm
+// PCMPGTL m128 xmm
+func PCMPGTL(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPGTL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPGTL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PCMPGTL: bad operands")
+}
+
+// PCMPGTQ: Compare Packed Data for Greater Than.
+//
+// Forms:
+//
+// PCMPGTQ xmm xmm
+// PCMPGTQ m128 xmm
+func PCMPGTQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPGTQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPGTQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ }
+ return nil, errors.New("PCMPGTQ: bad operands")
+}
+
+// PCMPGTW: Compare Packed Signed Word Integers for Greater Than.
+//
+// Forms:
+//
+// PCMPGTW xmm xmm
+// PCMPGTW m128 xmm
+func PCMPGTW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPGTW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPGTW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PCMPGTW: bad operands")
+}
+
+// PCMPISTRI: Packed Compare Implicit Length Strings, Return Index.
+//
+// Forms:
+//
+// PCMPISTRI imm8 xmm xmm
+// PCMPISTRI imm8 m128 xmm
+func PCMPISTRI(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPISTRI",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{reg.ECX},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPISTRI",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{reg.ECX},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ }
+ return nil, errors.New("PCMPISTRI: bad operands")
+}
+
+// PCMPISTRM: Packed Compare Implicit Length Strings, Return Mask.
+//
+// Forms:
+//
+// PCMPISTRM imm8 xmm xmm
+// PCMPISTRM imm8 m128 xmm
+func PCMPISTRM(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPISTRM",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{reg.X0},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PCMPISTRM",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{reg.X0},
+ ISA: []string{"SSE4.2"},
+ }, nil
+ }
+ return nil, errors.New("PCMPISTRM: bad operands")
+}
+
+// PDEPL: Parallel Bits Deposit.
+//
+// Forms:
+//
+// PDEPL r32 r32 r32
+// PDEPL m32 r32 r32
+func PDEPL(mr, r, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "PDEPL",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "PDEPL",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("PDEPL: bad operands")
+}
+
+// PDEPQ: Parallel Bits Deposit.
+//
+// Forms:
+//
+// PDEPQ r64 r64 r64
+// PDEPQ m64 r64 r64
+func PDEPQ(mr, r, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "PDEPQ",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "PDEPQ",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("PDEPQ: bad operands")
+}
+
+// PEXTL: Parallel Bits Extract.
+//
+// Forms:
+//
+// PEXTL r32 r32 r32
+// PEXTL m32 r32 r32
+func PEXTL(mr, r, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "PEXTL",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "PEXTL",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("PEXTL: bad operands")
+}
+
+// PEXTQ: Parallel Bits Extract.
+//
+// Forms:
+//
+// PEXTQ r64 r64 r64
+// PEXTQ m64 r64 r64
+func PEXTQ(mr, r, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "PEXTQ",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "PEXTQ",
+ Operands: []operand.Op{mr, r, r1},
+ Inputs: []operand.Op{mr, r},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("PEXTQ: bad operands")
+}
+
+// PEXTRB: Extract Byte.
+//
+// Forms:
+//
+// PEXTRB imm8 xmm r32
+// PEXTRB imm8 xmm m8
+func PEXTRB(i, x, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "PEXTRB",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "PEXTRB",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PEXTRB: bad operands")
+}
+
+// PEXTRD: Extract Doubleword.
+//
+// Forms:
+//
+// PEXTRD imm8 xmm r32
+// PEXTRD imm8 xmm m32
+func PEXTRD(i, x, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "PEXTRD",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "PEXTRD",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PEXTRD: bad operands")
+}
+
+// PEXTRQ: Extract Quadword.
+//
+// Forms:
+//
+// PEXTRQ imm8 xmm r64
+// PEXTRQ imm8 xmm m64
+func PEXTRQ(i, x, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "PEXTRQ",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "PEXTRQ",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PEXTRQ: bad operands")
+}
+
+// PEXTRW: Extract Word.
+//
+// Forms:
+//
+// PEXTRW imm8 xmm r32
+// PEXTRW imm8 xmm m16
+func PEXTRW(i, x, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "PEXTRW",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "PEXTRW",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PEXTRW: bad operands")
+}
+
+// PHADDD: Packed Horizontal Add Doubleword Integer.
+//
+// Forms:
+//
+// PHADDD xmm xmm
+// PHADDD m128 xmm
+func PHADDD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHADDD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHADDD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PHADDD: bad operands")
+}
+
+// PHADDSW: Packed Horizontal Add Signed Word Integers with Signed Saturation.
+//
+// Forms:
+//
+// PHADDSW xmm xmm
+// PHADDSW m128 xmm
+func PHADDSW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHADDSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHADDSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PHADDSW: bad operands")
+}
+
+// PHADDW: Packed Horizontal Add Word Integers.
+//
+// Forms:
+//
+// PHADDW xmm xmm
+// PHADDW m128 xmm
+func PHADDW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHADDW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHADDW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PHADDW: bad operands")
+}
+
+// PHMINPOSUW: Packed Horizontal Minimum of Unsigned Word Integers.
+//
+// Forms:
+//
+// PHMINPOSUW xmm xmm
+// PHMINPOSUW m128 xmm
+func PHMINPOSUW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHMINPOSUW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHMINPOSUW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PHMINPOSUW: bad operands")
+}
+
+// PHSUBD: Packed Horizontal Subtract Doubleword Integers.
+//
+// Forms:
+//
+// PHSUBD xmm xmm
+// PHSUBD m128 xmm
+func PHSUBD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHSUBD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHSUBD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PHSUBD: bad operands")
+}
+
+// PHSUBSW: Packed Horizontal Subtract Signed Word Integers with Signed Saturation.
+//
+// Forms:
+//
+// PHSUBSW xmm xmm
+// PHSUBSW m128 xmm
+func PHSUBSW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHSUBSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHSUBSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PHSUBSW: bad operands")
+}
+
+// PHSUBW: Packed Horizontal Subtract Word Integers.
+//
+// Forms:
+//
+// PHSUBW xmm xmm
+// PHSUBW m128 xmm
+func PHSUBW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHSUBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PHSUBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PHSUBW: bad operands")
+}
+
+// PINSRB: Insert Byte.
+//
+// Forms:
+//
+// PINSRB imm8 r32 xmm
+// PINSRB imm8 m8 xmm
+func PINSRB(i, mr, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsR32(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PINSRB",
+ Operands: []operand.Op{i, mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM8(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PINSRB",
+ Operands: []operand.Op{i, mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PINSRB: bad operands")
+}
+
+// PINSRD: Insert Doubleword.
+//
+// Forms:
+//
+// PINSRD imm8 r32 xmm
+// PINSRD imm8 m32 xmm
+func PINSRD(i, mr, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsR32(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PINSRD",
+ Operands: []operand.Op{i, mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM32(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PINSRD",
+ Operands: []operand.Op{i, mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PINSRD: bad operands")
+}
+
+// PINSRQ: Insert Quadword.
+//
+// Forms:
+//
+// PINSRQ imm8 r64 xmm
+// PINSRQ imm8 m64 xmm
+func PINSRQ(i, mr, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsR64(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PINSRQ",
+ Operands: []operand.Op{i, mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM64(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PINSRQ",
+ Operands: []operand.Op{i, mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PINSRQ: bad operands")
+}
+
+// PINSRW: Insert Word.
+//
+// Forms:
+//
+// PINSRW imm8 r32 xmm
+// PINSRW imm8 m16 xmm
+func PINSRW(i, mr, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsR32(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PINSRW",
+ Operands: []operand.Op{i, mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM16(mr) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PINSRW",
+ Operands: []operand.Op{i, mr, x},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PINSRW: bad operands")
+}
+
+// PMADDUBSW: Multiply and Add Packed Signed and Unsigned Byte Integers.
+//
+// Forms:
+//
+// PMADDUBSW xmm xmm
+// PMADDUBSW m128 xmm
+func PMADDUBSW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMADDUBSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMADDUBSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PMADDUBSW: bad operands")
+}
+
+// PMADDWL: Multiply and Add Packed Signed Word Integers.
+//
+// Forms:
+//
+// PMADDWL xmm xmm
+// PMADDWL m128 xmm
+func PMADDWL(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMADDWL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMADDWL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PMADDWL: bad operands")
+}
+
+// PMAXSB: Maximum of Packed Signed Byte Integers.
+//
+// Forms:
+//
+// PMAXSB xmm xmm
+// PMAXSB m128 xmm
+func PMAXSB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMAXSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMAXSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMAXSB: bad operands")
+}
+
+// PMAXSD: Maximum of Packed Signed Doubleword Integers.
+//
+// Forms:
+//
+// PMAXSD xmm xmm
+// PMAXSD m128 xmm
+func PMAXSD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMAXSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMAXSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMAXSD: bad operands")
+}
+
+// PMAXSW: Maximum of Packed Signed Word Integers.
+//
+// Forms:
+//
+// PMAXSW xmm xmm
+// PMAXSW m128 xmm
+func PMAXSW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMAXSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMAXSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PMAXSW: bad operands")
+}
+
+// PMAXUB: Maximum of Packed Unsigned Byte Integers.
+//
+// Forms:
+//
+// PMAXUB xmm xmm
+// PMAXUB m128 xmm
+func PMAXUB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMAXUB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMAXUB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PMAXUB: bad operands")
+}
+
+// PMAXUD: Maximum of Packed Unsigned Doubleword Integers.
+//
+// Forms:
+//
+// PMAXUD xmm xmm
+// PMAXUD m128 xmm
+func PMAXUD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMAXUD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMAXUD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMAXUD: bad operands")
+}
+
+// PMAXUW: Maximum of Packed Unsigned Word Integers.
+//
+// Forms:
+//
+// PMAXUW xmm xmm
+// PMAXUW m128 xmm
+func PMAXUW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMAXUW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMAXUW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMAXUW: bad operands")
+}
+
+// PMINSB: Minimum of Packed Signed Byte Integers.
+//
+// Forms:
+//
+// PMINSB xmm xmm
+// PMINSB m128 xmm
+func PMINSB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMINSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMINSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMINSB: bad operands")
+}
+
+// PMINSD: Minimum of Packed Signed Doubleword Integers.
+//
+// Forms:
+//
+// PMINSD xmm xmm
+// PMINSD m128 xmm
+func PMINSD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMINSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMINSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMINSD: bad operands")
+}
+
+// PMINSW: Minimum of Packed Signed Word Integers.
+//
+// Forms:
+//
+// PMINSW xmm xmm
+// PMINSW m128 xmm
+func PMINSW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMINSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMINSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PMINSW: bad operands")
+}
+
+// PMINUB: Minimum of Packed Unsigned Byte Integers.
+//
+// Forms:
+//
+// PMINUB xmm xmm
+// PMINUB m128 xmm
+func PMINUB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMINUB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMINUB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PMINUB: bad operands")
+}
+
+// PMINUD: Minimum of Packed Unsigned Doubleword Integers.
+//
+// Forms:
+//
+// PMINUD xmm xmm
+// PMINUD m128 xmm
+func PMINUD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMINUD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMINUD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMINUD: bad operands")
+}
+
+// PMINUW: Minimum of Packed Unsigned Word Integers.
+//
+// Forms:
+//
+// PMINUW xmm xmm
+// PMINUW m128 xmm
+func PMINUW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMINUW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMINUW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMINUW: bad operands")
+}
+
+// PMOVMSKB: Move Byte Mask.
+//
+// Forms:
+//
+// PMOVMSKB xmm r32
+func PMOVMSKB(x, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "PMOVMSKB",
+ Operands: []operand.Op{x, r},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{r},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PMOVMSKB: bad operands")
+}
+
+// PMOVSXBD: Move Packed Byte Integers to Doubleword Integers with Sign Extension.
+//
+// Forms:
+//
+// PMOVSXBD xmm xmm
+// PMOVSXBD m32 xmm
+func PMOVSXBD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVSXBD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVSXBD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMOVSXBD: bad operands")
+}
+
+// PMOVSXBQ: Move Packed Byte Integers to Quadword Integers with Sign Extension.
+//
+// Forms:
+//
+// PMOVSXBQ xmm xmm
+// PMOVSXBQ m16 xmm
+func PMOVSXBQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVSXBQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM16(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVSXBQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMOVSXBQ: bad operands")
+}
+
+// PMOVSXBW: Move Packed Byte Integers to Word Integers with Sign Extension.
+//
+// Forms:
+//
+// PMOVSXBW xmm xmm
+// PMOVSXBW m64 xmm
+func PMOVSXBW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVSXBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVSXBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMOVSXBW: bad operands")
+}
+
+// PMOVSXDQ: Move Packed Doubleword Integers to Quadword Integers with Sign Extension.
+//
+// Forms:
+//
+// PMOVSXDQ xmm xmm
+// PMOVSXDQ m64 xmm
+func PMOVSXDQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVSXDQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVSXDQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMOVSXDQ: bad operands")
+}
+
+// PMOVSXWD: Move Packed Word Integers to Doubleword Integers with Sign Extension.
+//
+// Forms:
+//
+// PMOVSXWD xmm xmm
+// PMOVSXWD m64 xmm
+func PMOVSXWD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVSXWD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVSXWD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMOVSXWD: bad operands")
+}
+
+// PMOVSXWQ: Move Packed Word Integers to Quadword Integers with Sign Extension.
+//
+// Forms:
+//
+// PMOVSXWQ xmm xmm
+// PMOVSXWQ m32 xmm
+func PMOVSXWQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVSXWQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVSXWQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMOVSXWQ: bad operands")
+}
+
+// PMOVZXBD: Move Packed Byte Integers to Doubleword Integers with Zero Extension.
+//
+// Forms:
+//
+// PMOVZXBD xmm xmm
+// PMOVZXBD m32 xmm
+func PMOVZXBD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVZXBD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVZXBD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMOVZXBD: bad operands")
+}
+
+// PMOVZXBQ: Move Packed Byte Integers to Quadword Integers with Zero Extension.
+//
+// Forms:
+//
+// PMOVZXBQ xmm xmm
+// PMOVZXBQ m16 xmm
+func PMOVZXBQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVZXBQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM16(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVZXBQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMOVZXBQ: bad operands")
+}
+
+// PMOVZXBW: Move Packed Byte Integers to Word Integers with Zero Extension.
+//
+// Forms:
+//
+// PMOVZXBW xmm xmm
+// PMOVZXBW m64 xmm
+func PMOVZXBW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVZXBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVZXBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMOVZXBW: bad operands")
+}
+
+// PMOVZXDQ: Move Packed Doubleword Integers to Quadword Integers with Zero Extension.
+//
+// Forms:
+//
+// PMOVZXDQ xmm xmm
+// PMOVZXDQ m64 xmm
+func PMOVZXDQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVZXDQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVZXDQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMOVZXDQ: bad operands")
+}
+
+// PMOVZXWD: Move Packed Word Integers to Doubleword Integers with Zero Extension.
+//
+// Forms:
+//
+// PMOVZXWD xmm xmm
+// PMOVZXWD m64 xmm
+func PMOVZXWD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVZXWD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVZXWD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMOVZXWD: bad operands")
+}
+
+// PMOVZXWQ: Move Packed Word Integers to Quadword Integers with Zero Extension.
+//
+// Forms:
+//
+// PMOVZXWQ xmm xmm
+// PMOVZXWQ m32 xmm
+func PMOVZXWQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVZXWQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMOVZXWQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMOVZXWQ: bad operands")
+}
+
+// PMULDQ: Multiply Packed Signed Doubleword Integers and Store Quadword Result.
+//
+// Forms:
+//
+// PMULDQ xmm xmm
+// PMULDQ m128 xmm
+func PMULDQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULDQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULDQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMULDQ: bad operands")
+}
+
+// PMULHRSW: Packed Multiply Signed Word Integers and Store High Result with Round and Scale.
+//
+// Forms:
+//
+// PMULHRSW xmm xmm
+// PMULHRSW m128 xmm
+func PMULHRSW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULHRSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULHRSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PMULHRSW: bad operands")
+}
+
+// PMULHUW: Multiply Packed Unsigned Word Integers and Store High Result.
+//
+// Forms:
+//
+// PMULHUW xmm xmm
+// PMULHUW m128 xmm
+func PMULHUW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULHUW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULHUW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PMULHUW: bad operands")
+}
+
+// PMULHW: Multiply Packed Signed Word Integers and Store High Result.
+//
+// Forms:
+//
+// PMULHW xmm xmm
+// PMULHW m128 xmm
+func PMULHW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULHW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULHW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PMULHW: bad operands")
+}
+
+// PMULLD: Multiply Packed Signed Doubleword Integers and Store Low Result.
+//
+// Forms:
+//
+// PMULLD xmm xmm
+// PMULLD m128 xmm
+func PMULLD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULLD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULLD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PMULLD: bad operands")
+}
+
+// PMULLW: Multiply Packed Signed Word Integers and Store Low Result.
+//
+// Forms:
+//
+// PMULLW xmm xmm
+// PMULLW m128 xmm
+func PMULLW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULLW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULLW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PMULLW: bad operands")
+}
+
+// PMULULQ: Multiply Packed Unsigned Doubleword Integers.
+//
+// Forms:
+//
+// PMULULQ xmm xmm
+// PMULULQ m128 xmm
+func PMULULQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULULQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PMULULQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PMULULQ: bad operands")
+}
+
+// POPCNTL: Count of Number of Bits Set to 1.
+//
+// Forms:
+//
+// POPCNTL r32 r32
+// POPCNTL m32 r32
+func POPCNTL(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "POPCNTL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"POPCNT"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "POPCNTL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"POPCNT"},
+ }, nil
+ }
+ return nil, errors.New("POPCNTL: bad operands")
+}
+
+// POPCNTQ: Count of Number of Bits Set to 1.
+//
+// Forms:
+//
+// POPCNTQ r64 r64
+// POPCNTQ m64 r64
+func POPCNTQ(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "POPCNTQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"POPCNT"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "POPCNTQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"POPCNT"},
+ }, nil
+ }
+ return nil, errors.New("POPCNTQ: bad operands")
+}
+
+// POPCNTW: Count of Number of Bits Set to 1.
+//
+// Forms:
+//
+// POPCNTW r16 r16
+// POPCNTW m16 r16
+func POPCNTW(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "POPCNTW",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"POPCNT"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "POPCNTW",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"POPCNT"},
+ }, nil
+ }
+ return nil, errors.New("POPCNTW: bad operands")
+}
+
+// POPQ: Pop a Value from the Stack.
+//
+// Forms:
+//
+// POPQ r64
+// POPQ m64
+func POPQ(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "POPQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "POPQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("POPQ: bad operands")
+}
+
+// POPW: Pop a Value from the Stack.
+//
+// Forms:
+//
+// POPW r16
+// POPW m16
+func POPW(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "POPW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "POPW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("POPW: bad operands")
+}
+
+// POR: Packed Bitwise Logical OR.
+//
+// Forms:
+//
+// POR xmm xmm
+// POR m128 xmm
+func POR(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "POR",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "POR",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("POR: bad operands")
+}
+
+// PREFETCHNTA: Prefetch Data Into Caches using NTA Hint.
+//
+// Forms:
+//
+// PREFETCHNTA m8
+func PREFETCHNTA(m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM8(m):
+ return &intrep.Instruction{
+ Opcode: "PREFETCHNTA",
+ Operands: []operand.Op{m},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{},
+ ISA: []string{"MMX+"},
+ }, nil
+ }
+ return nil, errors.New("PREFETCHNTA: bad operands")
+}
+
+// PREFETCHT0: Prefetch Data Into Caches using T0 Hint.
+//
+// Forms:
+//
+// PREFETCHT0 m8
+func PREFETCHT0(m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM8(m):
+ return &intrep.Instruction{
+ Opcode: "PREFETCHT0",
+ Operands: []operand.Op{m},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{},
+ ISA: []string{"MMX+"},
+ }, nil
+ }
+ return nil, errors.New("PREFETCHT0: bad operands")
+}
+
+// PREFETCHT1: Prefetch Data Into Caches using T1 Hint.
+//
+// Forms:
+//
+// PREFETCHT1 m8
+func PREFETCHT1(m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM8(m):
+ return &intrep.Instruction{
+ Opcode: "PREFETCHT1",
+ Operands: []operand.Op{m},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{},
+ ISA: []string{"MMX+"},
+ }, nil
+ }
+ return nil, errors.New("PREFETCHT1: bad operands")
+}
+
+// PREFETCHT2: Prefetch Data Into Caches using T2 Hint.
+//
+// Forms:
+//
+// PREFETCHT2 m8
+func PREFETCHT2(m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM8(m):
+ return &intrep.Instruction{
+ Opcode: "PREFETCHT2",
+ Operands: []operand.Op{m},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{},
+ ISA: []string{"MMX+"},
+ }, nil
+ }
+ return nil, errors.New("PREFETCHT2: bad operands")
+}
+
+// PSADBW: Compute Sum of Absolute Differences.
+//
+// Forms:
+//
+// PSADBW xmm xmm
+// PSADBW m128 xmm
+func PSADBW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSADBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSADBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSADBW: bad operands")
+}
+
+// PSHUFB: Packed Shuffle Bytes.
+//
+// Forms:
+//
+// PSHUFB xmm xmm
+// PSHUFB m128 xmm
+func PSHUFB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSHUFB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSHUFB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PSHUFB: bad operands")
+}
+
+// PSHUFD: Shuffle Packed Doublewords.
+//
+// Forms:
+//
+// PSHUFD imm8 xmm xmm
+// PSHUFD imm8 m128 xmm
+func PSHUFD(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSHUFD",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSHUFD",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSHUFD: bad operands")
+}
+
+// PSHUFHW: Shuffle Packed High Words.
+//
+// Forms:
+//
+// PSHUFHW imm8 xmm xmm
+// PSHUFHW imm8 m128 xmm
+func PSHUFHW(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSHUFHW",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSHUFHW",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSHUFHW: bad operands")
+}
+
+// PSHUFL: Shuffle Packed Doublewords.
+//
+// Forms:
+//
+// PSHUFL imm8 xmm xmm
+// PSHUFL imm8 m128 xmm
+func PSHUFL(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSHUFL",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSHUFL",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSHUFL: bad operands")
+}
+
+// PSHUFLW: Shuffle Packed Low Words.
+//
+// Forms:
+//
+// PSHUFLW imm8 xmm xmm
+// PSHUFLW imm8 m128 xmm
+func PSHUFLW(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSHUFLW",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSHUFLW",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSHUFLW: bad operands")
+}
+
+// PSIGNB: Packed Sign of Byte Integers.
+//
+// Forms:
+//
+// PSIGNB xmm xmm
+// PSIGNB m128 xmm
+func PSIGNB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSIGNB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSIGNB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PSIGNB: bad operands")
+}
+
+// PSIGND: Packed Sign of Doubleword Integers.
+//
+// Forms:
+//
+// PSIGND xmm xmm
+// PSIGND m128 xmm
+func PSIGND(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSIGND",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSIGND",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PSIGND: bad operands")
+}
+
+// PSIGNW: Packed Sign of Word Integers.
+//
+// Forms:
+//
+// PSIGNW xmm xmm
+// PSIGNW m128 xmm
+func PSIGNW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSIGNW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSIGNW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSSE3"},
+ }, nil
+ }
+ return nil, errors.New("PSIGNW: bad operands")
+}
+
+// PSLLDQ: Shift Packed Double Quadword Left Logical.
+//
+// Forms:
+//
+// PSLLDQ imm8 xmm
+func PSLLDQ(i, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSLLDQ",
+ Operands: []operand.Op{i, x},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSLLDQ: bad operands")
+}
+
+// PSLLL: Shift Packed Doubleword Data Left Logical.
+//
+// Forms:
+//
+// PSLLL imm8 xmm
+// PSLLL xmm xmm
+// PSLLL m128 xmm
+func PSLLL(imx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSLLL",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSLLL",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSLLL",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSLLL: bad operands")
+}
+
+// PSLLO: Shift Packed Double Quadword Left Logical.
+//
+// Forms:
+//
+// PSLLO imm8 xmm
+func PSLLO(i, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSLLO",
+ Operands: []operand.Op{i, x},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSLLO: bad operands")
+}
+
+// PSLLQ: Shift Packed Quadword Data Left Logical.
+//
+// Forms:
+//
+// PSLLQ imm8 xmm
+// PSLLQ xmm xmm
+// PSLLQ m128 xmm
+func PSLLQ(imx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSLLQ",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSLLQ",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSLLQ",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSLLQ: bad operands")
+}
+
+// PSLLW: Shift Packed Word Data Left Logical.
+//
+// Forms:
+//
+// PSLLW imm8 xmm
+// PSLLW xmm xmm
+// PSLLW m128 xmm
+func PSLLW(imx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSLLW",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSLLW",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSLLW",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSLLW: bad operands")
+}
+
+// PSRAL: Shift Packed Doubleword Data Right Arithmetic.
+//
+// Forms:
+//
+// PSRAL imm8 xmm
+// PSRAL xmm xmm
+// PSRAL m128 xmm
+func PSRAL(imx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRAL",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRAL",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRAL",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSRAL: bad operands")
+}
+
+// PSRAW: Shift Packed Word Data Right Arithmetic.
+//
+// Forms:
+//
+// PSRAW imm8 xmm
+// PSRAW xmm xmm
+// PSRAW m128 xmm
+func PSRAW(imx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRAW",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRAW",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRAW",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSRAW: bad operands")
+}
+
+// PSRLDQ: Shift Packed Double Quadword Right Logical.
+//
+// Forms:
+//
+// PSRLDQ imm8 xmm
+func PSRLDQ(i, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRLDQ",
+ Operands: []operand.Op{i, x},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSRLDQ: bad operands")
+}
+
+// PSRLL: Shift Packed Doubleword Data Right Logical.
+//
+// Forms:
+//
+// PSRLL imm8 xmm
+// PSRLL xmm xmm
+// PSRLL m128 xmm
+func PSRLL(imx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRLL",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRLL",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRLL",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSRLL: bad operands")
+}
+
+// PSRLO: Shift Packed Double Quadword Right Logical.
+//
+// Forms:
+//
+// PSRLO imm8 xmm
+func PSRLO(i, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRLO",
+ Operands: []operand.Op{i, x},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSRLO: bad operands")
+}
+
+// PSRLQ: Shift Packed Quadword Data Right Logical.
+//
+// Forms:
+//
+// PSRLQ imm8 xmm
+// PSRLQ xmm xmm
+// PSRLQ m128 xmm
+func PSRLQ(imx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRLQ",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRLQ",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRLQ",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSRLQ: bad operands")
+}
+
+// PSRLW: Shift Packed Word Data Right Logical.
+//
+// Forms:
+//
+// PSRLW imm8 xmm
+// PSRLW xmm xmm
+// PSRLW m128 xmm
+func PSRLW(imx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRLW",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRLW",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSRLW",
+ Operands: []operand.Op{imx, x},
+ Inputs: []operand.Op{imx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSRLW: bad operands")
+}
+
+// PSUBB: Subtract Packed Byte Integers.
+//
+// Forms:
+//
+// PSUBB xmm xmm
+// PSUBB m128 xmm
+func PSUBB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSUBB: bad operands")
+}
+
+// PSUBL: Subtract Packed Doubleword Integers.
+//
+// Forms:
+//
+// PSUBL xmm xmm
+// PSUBL m128 xmm
+func PSUBL(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSUBL: bad operands")
+}
+
+// PSUBQ: Subtract Packed Quadword Integers.
+//
+// Forms:
+//
+// PSUBQ xmm xmm
+// PSUBQ m128 xmm
+func PSUBQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSUBQ: bad operands")
+}
+
+// PSUBSB: Subtract Packed Signed Byte Integers with Signed Saturation.
+//
+// Forms:
+//
+// PSUBSB xmm xmm
+// PSUBSB m128 xmm
+func PSUBSB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSUBSB: bad operands")
+}
+
+// PSUBSW: Subtract Packed Signed Word Integers with Signed Saturation.
+//
+// Forms:
+//
+// PSUBSW xmm xmm
+// PSUBSW m128 xmm
+func PSUBSW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSUBSW: bad operands")
+}
+
+// PSUBUSB: Subtract Packed Unsigned Byte Integers with Unsigned Saturation.
+//
+// Forms:
+//
+// PSUBUSB xmm xmm
+// PSUBUSB m128 xmm
+func PSUBUSB(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBUSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBUSB",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSUBUSB: bad operands")
+}
+
+// PSUBUSW: Subtract Packed Unsigned Word Integers with Unsigned Saturation.
+//
+// Forms:
+//
+// PSUBUSW xmm xmm
+// PSUBUSW m128 xmm
+func PSUBUSW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBUSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBUSW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSUBUSW: bad operands")
+}
+
+// PSUBW: Subtract Packed Word Integers.
+//
+// Forms:
+//
+// PSUBW xmm xmm
+// PSUBW m128 xmm
+func PSUBW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PSUBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PSUBW: bad operands")
+}
+
+// PTEST: Packed Logical Compare.
+//
+// Forms:
+//
+// PTEST xmm xmm
+// PTEST m128 xmm
+func PTEST(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PTEST",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PTEST",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("PTEST: bad operands")
+}
+
+// PUNPCKHBW: Unpack and Interleave High-Order Bytes into Words.
+//
+// Forms:
+//
+// PUNPCKHBW xmm xmm
+// PUNPCKHBW m128 xmm
+func PUNPCKHBW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKHBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKHBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PUNPCKHBW: bad operands")
+}
+
+// PUNPCKHLQ: Unpack and Interleave High-Order Doublewords into Quadwords.
+//
+// Forms:
+//
+// PUNPCKHLQ xmm xmm
+// PUNPCKHLQ m128 xmm
+func PUNPCKHLQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKHLQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKHLQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PUNPCKHLQ: bad operands")
+}
+
+// PUNPCKHQDQ: Unpack and Interleave High-Order Quadwords into Double Quadwords.
+//
+// Forms:
+//
+// PUNPCKHQDQ xmm xmm
+// PUNPCKHQDQ m128 xmm
+func PUNPCKHQDQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKHQDQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKHQDQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PUNPCKHQDQ: bad operands")
+}
+
+// PUNPCKHWL: Unpack and Interleave High-Order Words into Doublewords.
+//
+// Forms:
+//
+// PUNPCKHWL xmm xmm
+// PUNPCKHWL m128 xmm
+func PUNPCKHWL(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKHWL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKHWL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PUNPCKHWL: bad operands")
+}
+
+// PUNPCKLBW: Unpack and Interleave Low-Order Bytes into Words.
+//
+// Forms:
+//
+// PUNPCKLBW xmm xmm
+// PUNPCKLBW m128 xmm
+func PUNPCKLBW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKLBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKLBW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PUNPCKLBW: bad operands")
+}
+
+// PUNPCKLLQ: Unpack and Interleave Low-Order Doublewords into Quadwords.
+//
+// Forms:
+//
+// PUNPCKLLQ xmm xmm
+// PUNPCKLLQ m128 xmm
+func PUNPCKLLQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKLLQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKLLQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PUNPCKLLQ: bad operands")
+}
+
+// PUNPCKLQDQ: Unpack and Interleave Low-Order Quadwords into Double Quadwords.
+//
+// Forms:
+//
+// PUNPCKLQDQ xmm xmm
+// PUNPCKLQDQ m128 xmm
+func PUNPCKLQDQ(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKLQDQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKLQDQ",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PUNPCKLQDQ: bad operands")
+}
+
+// PUNPCKLWL: Unpack and Interleave Low-Order Words into Doublewords.
+//
+// Forms:
+//
+// PUNPCKLWL xmm xmm
+// PUNPCKLWL m128 xmm
+func PUNPCKLWL(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKLWL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PUNPCKLWL",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PUNPCKLWL: bad operands")
+}
+
+// PUSHQ: Push Value Onto the Stack.
+//
+// Forms:
+//
+// PUSHQ imm8
+// PUSHQ imm32
+// PUSHQ r64
+// PUSHQ m64
+func PUSHQ(imr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imr):
+ return &intrep.Instruction{
+ Opcode: "PUSHQ",
+ Operands: []operand.Op{imr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsIMM32(imr):
+ return &intrep.Instruction{
+ Opcode: "PUSHQ",
+ Operands: []operand.Op{imr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR64(imr):
+ return &intrep.Instruction{
+ Opcode: "PUSHQ",
+ Operands: []operand.Op{imr},
+ Inputs: []operand.Op{imr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsM64(imr):
+ return &intrep.Instruction{
+ Opcode: "PUSHQ",
+ Operands: []operand.Op{imr},
+ Inputs: []operand.Op{imr},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("PUSHQ: bad operands")
+}
+
+// PUSHW: Push Value Onto the Stack.
+//
+// Forms:
+//
+// PUSHW r16
+// PUSHW m16
+func PUSHW(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "PUSHW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "PUSHW",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("PUSHW: bad operands")
+}
+
+// PXOR: Packed Bitwise Logical Exclusive OR.
+//
+// Forms:
+//
+// PXOR xmm xmm
+// PXOR m128 xmm
+func PXOR(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PXOR",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "PXOR",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("PXOR: bad operands")
+}
+
+// RCLB: Rotate Left through Carry Flag.
+//
+// Forms:
+//
+// RCLB 1 r8
+// RCLB imm8 r8
+// RCLB cl r8
+// RCLB 1 m8
+// RCLB imm8 m8
+// RCLB cl m8
+func RCLB(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("RCLB: bad operands")
+}
+
+// RCLL: Rotate Left through Carry Flag.
+//
+// Forms:
+//
+// RCLL 1 r32
+// RCLL imm8 r32
+// RCLL cl r32
+// RCLL 1 m32
+// RCLL imm8 m32
+// RCLL cl m32
+func RCLL(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("RCLL: bad operands")
+}
+
+// RCLQ: Rotate Left through Carry Flag.
+//
+// Forms:
+//
+// RCLQ 1 r64
+// RCLQ imm8 r64
+// RCLQ cl r64
+// RCLQ 1 m64
+// RCLQ imm8 m64
+// RCLQ cl m64
+func RCLQ(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("RCLQ: bad operands")
+}
+
+// RCLW: Rotate Left through Carry Flag.
+//
+// Forms:
+//
+// RCLW 1 r16
+// RCLW imm8 r16
+// RCLW cl r16
+// RCLW 1 m16
+// RCLW imm8 m16
+// RCLW cl m16
+func RCLW(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "RCLW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("RCLW: bad operands")
+}
+
+// RCPPS: Compute Approximate Reciprocals of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// RCPPS xmm xmm
+// RCPPS m128 xmm
+func RCPPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "RCPPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "RCPPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("RCPPS: bad operands")
+}
+
+// RCPSS: Compute Approximate Reciprocal of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// RCPSS xmm xmm
+// RCPSS m32 xmm
+func RCPSS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "RCPSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "RCPSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("RCPSS: bad operands")
+}
+
+// RCRB: Rotate Right through Carry Flag.
+//
+// Forms:
+//
+// RCRB 1 r8
+// RCRB imm8 r8
+// RCRB cl r8
+// RCRB 1 m8
+// RCRB imm8 m8
+// RCRB cl m8
+func RCRB(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("RCRB: bad operands")
+}
+
+// RCRL: Rotate Right through Carry Flag.
+//
+// Forms:
+//
+// RCRL 1 r32
+// RCRL imm8 r32
+// RCRL cl r32
+// RCRL 1 m32
+// RCRL imm8 m32
+// RCRL cl m32
+func RCRL(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("RCRL: bad operands")
+}
+
+// RCRQ: Rotate Right through Carry Flag.
+//
+// Forms:
+//
+// RCRQ 1 r64
+// RCRQ imm8 r64
+// RCRQ cl r64
+// RCRQ 1 m64
+// RCRQ imm8 m64
+// RCRQ cl m64
+func RCRQ(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("RCRQ: bad operands")
+}
+
+// RCRW: Rotate Right through Carry Flag.
+//
+// Forms:
+//
+// RCRW 1 r16
+// RCRW imm8 r16
+// RCRW cl r16
+// RCRW 1 m16
+// RCRW imm8 m16
+// RCRW cl m16
+func RCRW(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "RCRW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("RCRW: bad operands")
+}
+
+// RDRANDL: Read Random Number.
+//
+// Forms:
+//
+// RDRANDL r32
+func RDRANDL(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "RDRANDL",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{r},
+ ISA: []string{"RDRAND"},
+ }, nil
+ }
+ return nil, errors.New("RDRANDL: bad operands")
+}
+
+// RDRANDQ: Read Random Number.
+//
+// Forms:
+//
+// RDRANDQ r64
+func RDRANDQ(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "RDRANDQ",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{r},
+ ISA: []string{"RDRAND"},
+ }, nil
+ }
+ return nil, errors.New("RDRANDQ: bad operands")
+}
+
+// RDRANDW: Read Random Number.
+//
+// Forms:
+//
+// RDRANDW r16
+func RDRANDW(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "RDRANDW",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{r},
+ ISA: []string{"RDRAND"},
+ }, nil
+ }
+ return nil, errors.New("RDRANDW: bad operands")
+}
+
+// RDSEEDL: Read Random SEED.
+//
+// Forms:
+//
+// RDSEEDL r32
+func RDSEEDL(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "RDSEEDL",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{r},
+ ISA: []string{"RDSEED"},
+ }, nil
+ }
+ return nil, errors.New("RDSEEDL: bad operands")
+}
+
+// RDSEEDQ: Read Random SEED.
+//
+// Forms:
+//
+// RDSEEDQ r64
+func RDSEEDQ(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "RDSEEDQ",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{r},
+ ISA: []string{"RDSEED"},
+ }, nil
+ }
+ return nil, errors.New("RDSEEDQ: bad operands")
+}
+
+// RDSEEDW: Read Random SEED.
+//
+// Forms:
+//
+// RDSEEDW r16
+func RDSEEDW(r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "RDSEEDW",
+ Operands: []operand.Op{r},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{r},
+ ISA: []string{"RDSEED"},
+ }, nil
+ }
+ return nil, errors.New("RDSEEDW: bad operands")
+}
+
+// RDTSC: Read Time-Stamp Counter.
+//
+// Forms:
+//
+// RDTSC
+func RDTSC() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "RDTSC",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{reg.EAX, reg.EDX},
+ ISA: []string{"RDTSC"},
+ }, nil
+}
+
+// RDTSCP: Read Time-Stamp Counter and Processor ID.
+//
+// Forms:
+//
+// RDTSCP
+func RDTSCP() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "RDTSCP",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{reg.EAX, reg.ECX, reg.EDX},
+ ISA: []string{"RDTSCP"},
+ }, nil
+}
+
+// RET: Return from Procedure.
+//
+// Forms:
+//
+// RET
+func RET() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "RET",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ IsTerminal: true,
+ }, nil
+}
+
+// RETFL: Return from Procedure.
+//
+// Forms:
+//
+// RETFL imm16
+func RETFL(i operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM16(i):
+ return &intrep.Instruction{
+ Opcode: "RETFL",
+ Operands: []operand.Op{i},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("RETFL: bad operands")
+}
+
+// RETFQ: Return from Procedure.
+//
+// Forms:
+//
+// RETFQ imm16
+func RETFQ(i operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM16(i):
+ return &intrep.Instruction{
+ Opcode: "RETFQ",
+ Operands: []operand.Op{i},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("RETFQ: bad operands")
+}
+
+// RETFW: Return from Procedure.
+//
+// Forms:
+//
+// RETFW imm16
+func RETFW(i operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM16(i):
+ return &intrep.Instruction{
+ Opcode: "RETFW",
+ Operands: []operand.Op{i},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("RETFW: bad operands")
+}
+
+// ROLB: Rotate Left.
+//
+// Forms:
+//
+// ROLB 1 r8
+// ROLB imm8 r8
+// ROLB cl r8
+// ROLB 1 m8
+// ROLB imm8 m8
+// ROLB cl m8
+func ROLB(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("ROLB: bad operands")
+}
+
+// ROLL: Rotate Left.
+//
+// Forms:
+//
+// ROLL 1 r32
+// ROLL imm8 r32
+// ROLL cl r32
+// ROLL 1 m32
+// ROLL imm8 m32
+// ROLL cl m32
+func ROLL(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("ROLL: bad operands")
+}
+
+// ROLQ: Rotate Left.
+//
+// Forms:
+//
+// ROLQ 1 r64
+// ROLQ imm8 r64
+// ROLQ cl r64
+// ROLQ 1 m64
+// ROLQ imm8 m64
+// ROLQ cl m64
+func ROLQ(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("ROLQ: bad operands")
+}
+
+// ROLW: Rotate Left.
+//
+// Forms:
+//
+// ROLW 1 r16
+// ROLW imm8 r16
+// ROLW cl r16
+// ROLW 1 m16
+// ROLW imm8 m16
+// ROLW cl m16
+func ROLW(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "ROLW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("ROLW: bad operands")
+}
+
+// RORB: Rotate Right.
+//
+// Forms:
+//
+// RORB 1 r8
+// RORB imm8 r8
+// RORB cl r8
+// RORB 1 m8
+// RORB imm8 m8
+// RORB cl m8
+func RORB(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "RORB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "RORB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "RORB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "RORB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "RORB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "RORB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("RORB: bad operands")
+}
+
+// RORL: Rotate Right.
+//
+// Forms:
+//
+// RORL 1 r32
+// RORL imm8 r32
+// RORL cl r32
+// RORL 1 m32
+// RORL imm8 m32
+// RORL cl m32
+func RORL(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "RORL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "RORL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "RORL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "RORL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "RORL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "RORL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("RORL: bad operands")
+}
+
+// RORQ: Rotate Right.
+//
+// Forms:
+//
+// RORQ 1 r64
+// RORQ imm8 r64
+// RORQ cl r64
+// RORQ 1 m64
+// RORQ imm8 m64
+// RORQ cl m64
+func RORQ(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "RORQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "RORQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "RORQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "RORQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "RORQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "RORQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("RORQ: bad operands")
+}
+
+// RORW: Rotate Right.
+//
+// Forms:
+//
+// RORW 1 r16
+// RORW imm8 r16
+// RORW cl r16
+// RORW 1 m16
+// RORW imm8 m16
+// RORW cl m16
+func RORW(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "RORW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "RORW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "RORW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "RORW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "RORW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "RORW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("RORW: bad operands")
+}
+
+// RORXL: Rotate Right Logical Without Affecting Flags.
+//
+// Forms:
+//
+// RORXL imm8 r32 r32
+// RORXL imm8 m32 r32
+func RORXL(i, mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "RORXL",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "RORXL",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("RORXL: bad operands")
+}
+
+// RORXQ: Rotate Right Logical Without Affecting Flags.
+//
+// Forms:
+//
+// RORXQ imm8 r64 r64
+// RORXQ imm8 m64 r64
+func RORXQ(i, mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "RORXQ",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "RORXQ",
+ Operands: []operand.Op{i, mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("RORXQ: bad operands")
+}
+
+// ROUNDPD: Round Packed Double Precision Floating-Point Values.
+//
+// Forms:
+//
+// ROUNDPD imm8 xmm xmm
+// ROUNDPD imm8 m128 xmm
+func ROUNDPD(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ROUNDPD",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ROUNDPD",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("ROUNDPD: bad operands")
+}
+
+// ROUNDPS: Round Packed Single Precision Floating-Point Values.
+//
+// Forms:
+//
+// ROUNDPS imm8 xmm xmm
+// ROUNDPS imm8 m128 xmm
+func ROUNDPS(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ROUNDPS",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ROUNDPS",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("ROUNDPS: bad operands")
+}
+
+// ROUNDSD: Round Scalar Double Precision Floating-Point Values.
+//
+// Forms:
+//
+// ROUNDSD imm8 xmm xmm
+// ROUNDSD imm8 m64 xmm
+func ROUNDSD(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ROUNDSD",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ROUNDSD",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("ROUNDSD: bad operands")
+}
+
+// ROUNDSS: Round Scalar Single Precision Floating-Point Values.
+//
+// Forms:
+//
+// ROUNDSS imm8 xmm xmm
+// ROUNDSS imm8 m32 xmm
+func ROUNDSS(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ROUNDSS",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "ROUNDSS",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE4.1"},
+ }, nil
+ }
+ return nil, errors.New("ROUNDSS: bad operands")
+}
+
+// RSQRTPS: Compute Reciprocals of Square Roots of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// RSQRTPS xmm xmm
+// RSQRTPS m128 xmm
+func RSQRTPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "RSQRTPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "RSQRTPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("RSQRTPS: bad operands")
+}
+
+// RSQRTSS: Compute Reciprocal of Square Root of Scalar Single-Precision Floating-Point Value.
+//
+// Forms:
+//
+// RSQRTSS xmm xmm
+// RSQRTSS m32 xmm
+func RSQRTSS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "RSQRTSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "RSQRTSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("RSQRTSS: bad operands")
+}
+
+// SALB: Arithmetic Shift Left.
+//
+// Forms:
+//
+// SALB 1 r8
+// SALB imm8 r8
+// SALB cl r8
+// SALB 1 m8
+// SALB imm8 m8
+// SALB cl m8
+func SALB(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SALB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SALB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SALB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SALB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SALB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SALB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SALB: bad operands")
+}
+
+// SALL: Arithmetic Shift Left.
+//
+// Forms:
+//
+// SALL 1 r32
+// SALL imm8 r32
+// SALL cl r32
+// SALL 1 m32
+// SALL imm8 m32
+// SALL cl m32
+func SALL(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "SALL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "SALL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "SALL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "SALL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "SALL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "SALL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SALL: bad operands")
+}
+
+// SALQ: Arithmetic Shift Left.
+//
+// Forms:
+//
+// SALQ 1 r64
+// SALQ imm8 r64
+// SALQ cl r64
+// SALQ 1 m64
+// SALQ imm8 m64
+// SALQ cl m64
+func SALQ(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SALQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SALQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SALQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "SALQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "SALQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "SALQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SALQ: bad operands")
+}
+
+// SALW: Arithmetic Shift Left.
+//
+// Forms:
+//
+// SALW 1 r16
+// SALW imm8 r16
+// SALW cl r16
+// SALW 1 m16
+// SALW imm8 m16
+// SALW cl m16
+func SALW(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "SALW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "SALW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "SALW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "SALW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "SALW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "SALW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SALW: bad operands")
+}
+
+// SARB: Arithmetic Shift Right.
+//
+// Forms:
+//
+// SARB 1 r8
+// SARB imm8 r8
+// SARB cl r8
+// SARB 1 m8
+// SARB imm8 m8
+// SARB cl m8
+func SARB(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SARB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SARB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SARB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SARB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SARB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SARB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SARB: bad operands")
+}
+
+// SARL: Arithmetic Shift Right.
+//
+// Forms:
+//
+// SARL 1 r32
+// SARL imm8 r32
+// SARL cl r32
+// SARL 1 m32
+// SARL imm8 m32
+// SARL cl m32
+func SARL(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "SARL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "SARL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "SARL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "SARL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "SARL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "SARL",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SARL: bad operands")
+}
+
+// SARQ: Arithmetic Shift Right.
+//
+// Forms:
+//
+// SARQ 1 r64
+// SARQ imm8 r64
+// SARQ cl r64
+// SARQ 1 m64
+// SARQ imm8 m64
+// SARQ cl m64
+func SARQ(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SARQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SARQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SARQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "SARQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "SARQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "SARQ",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SARQ: bad operands")
+}
+
+// SARW: Arithmetic Shift Right.
+//
+// Forms:
+//
+// SARW 1 r16
+// SARW imm8 r16
+// SARW cl r16
+// SARW 1 m16
+// SARW imm8 m16
+// SARW cl m16
+func SARW(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "SARW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "SARW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "SARW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "SARW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "SARW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "SARW",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SARW: bad operands")
+}
+
+// SARXL: Arithmetic Shift Right Without Affecting Flags.
+//
+// Forms:
+//
+// SARXL r32 r32 r32
+// SARXL r32 m32 r32
+func SARXL(r, mr, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(r) && operand.IsR32(mr) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "SARXL",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsR32(r) && operand.IsM32(mr) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "SARXL",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("SARXL: bad operands")
+}
+
+// SARXQ: Arithmetic Shift Right Without Affecting Flags.
+//
+// Forms:
+//
+// SARXQ r64 r64 r64
+// SARXQ r64 m64 r64
+func SARXQ(r, mr, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(r) && operand.IsR64(mr) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "SARXQ",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsR64(r) && operand.IsM64(mr) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "SARXQ",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("SARXQ: bad operands")
+}
+
+// SBBB: Subtract with Borrow.
+//
+// Forms:
+//
+// SBBB imm8 al
+// SBBB imm8 r8
+// SBBB r8 r8
+// SBBB m8 r8
+// SBBB imm8 m8
+// SBBB r8 m8
+func SBBB(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imr) && operand.IsAL(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("SBBB: bad operands")
+}
+
+// SBBL: Subtract with Borrow.
+//
+// Forms:
+//
+// SBBL imm32 eax
+// SBBL imm8 r32
+// SBBL imm32 r32
+// SBBL r32 r32
+// SBBL m32 r32
+// SBBL imm8 m32
+// SBBL imm32 m32
+// SBBL r32 m32
+func SBBL(imr, emr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsEAX(emr):
+ return &intrep.Instruction{
+ Opcode: "SBBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "SBBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "SBBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "SBBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "SBBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "SBBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "SBBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "SBBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ }
+ return nil, errors.New("SBBL: bad operands")
+}
+
+// SBBQ: Subtract with Borrow.
+//
+// Forms:
+//
+// SBBQ imm32 rax
+// SBBQ imm8 r64
+// SBBQ imm32 r64
+// SBBQ r64 r64
+// SBBQ m64 r64
+// SBBQ imm8 m64
+// SBBQ imm32 m64
+// SBBQ r64 m64
+func SBBQ(imr, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsRAX(mr):
+ return &intrep.Instruction{
+ Opcode: "SBBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SBBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SBBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SBBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SBBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "SBBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "SBBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "SBBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SBBQ: bad operands")
+}
+
+// SBBW: Subtract with Borrow.
+//
+// Forms:
+//
+// SBBW imm16 ax
+// SBBW imm8 r16
+// SBBW imm16 r16
+// SBBW r16 r16
+// SBBW m16 r16
+// SBBW imm8 m16
+// SBBW imm16 m16
+// SBBW r16 m16
+func SBBW(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM16(imr) && operand.IsAX(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "SBBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("SBBW: bad operands")
+}
+
+// SETCC: Set byte if above or equal (CF == 0).
+//
+// Forms:
+//
+// SETCC r8
+// SETCC m8
+func SETCC(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETCC",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETCC",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETCC: bad operands")
+}
+
+// SETCS: Set byte if below (CF == 1).
+//
+// Forms:
+//
+// SETCS r8
+// SETCS m8
+func SETCS(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETCS",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETCS",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETCS: bad operands")
+}
+
+// SETEQ: Set byte if equal (ZF == 1).
+//
+// Forms:
+//
+// SETEQ r8
+// SETEQ m8
+func SETEQ(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETEQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETEQ",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETEQ: bad operands")
+}
+
+// SETGE: Set byte if greater or equal (SF == OF).
+//
+// Forms:
+//
+// SETGE r8
+// SETGE m8
+func SETGE(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETGE",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETGE",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETGE: bad operands")
+}
+
+// SETGT: Set byte if greater (ZF == 0 and SF == OF).
+//
+// Forms:
+//
+// SETGT r8
+// SETGT m8
+func SETGT(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETGT",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETGT",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETGT: bad operands")
+}
+
+// SETHI: Set byte if above (CF == 0 and ZF == 0).
+//
+// Forms:
+//
+// SETHI r8
+// SETHI m8
+func SETHI(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETHI",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETHI",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETHI: bad operands")
+}
+
+// SETLE: Set byte if less or equal (ZF == 1 or SF != OF).
+//
+// Forms:
+//
+// SETLE r8
+// SETLE m8
+func SETLE(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETLE",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETLE",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETLE: bad operands")
+}
+
+// SETLS: Set byte if below or equal (CF == 1 or ZF == 1).
+//
+// Forms:
+//
+// SETLS r8
+// SETLS m8
+func SETLS(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETLS",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETLS",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETLS: bad operands")
+}
+
+// SETLT: Set byte if less (SF != OF).
+//
+// Forms:
+//
+// SETLT r8
+// SETLT m8
+func SETLT(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETLT",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETLT",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETLT: bad operands")
+}
+
+// SETMI: Set byte if sign (SF == 1).
+//
+// Forms:
+//
+// SETMI r8
+// SETMI m8
+func SETMI(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETMI",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETMI",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETMI: bad operands")
+}
+
+// SETNE: Set byte if not equal (ZF == 0).
+//
+// Forms:
+//
+// SETNE r8
+// SETNE m8
+func SETNE(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETNE",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETNE",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETNE: bad operands")
+}
+
+// SETOC: Set byte if not overflow (OF == 0).
+//
+// Forms:
+//
+// SETOC r8
+// SETOC m8
+func SETOC(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETOC",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETOC",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETOC: bad operands")
+}
+
+// SETOS: Set byte if overflow (OF == 1).
+//
+// Forms:
+//
+// SETOS r8
+// SETOS m8
+func SETOS(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETOS",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETOS",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETOS: bad operands")
+}
+
+// SETPC: Set byte if not parity (PF == 0).
+//
+// Forms:
+//
+// SETPC r8
+// SETPC m8
+func SETPC(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETPC",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETPC",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETPC: bad operands")
+}
+
+// SETPL: Set byte if not sign (SF == 0).
+//
+// Forms:
+//
+// SETPL r8
+// SETPL m8
+func SETPL(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETPL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETPL",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETPL: bad operands")
+}
+
+// SETPS: Set byte if parity (PF == 1).
+//
+// Forms:
+//
+// SETPS r8
+// SETPS m8
+func SETPS(mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETPS",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SETPS",
+ Operands: []operand.Op{mr},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SETPS: bad operands")
+}
+
+// SFENCE: Store Fence.
+//
+// Forms:
+//
+// SFENCE
+func SFENCE() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "SFENCE",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ ISA: []string{"MMX+"},
+ }, nil
+}
+
+// SHA1MSG1: Perform an Intermediate Calculation for the Next Four SHA1 Message Doublewords.
+//
+// Forms:
+//
+// SHA1MSG1 xmm xmm
+// SHA1MSG1 m128 xmm
+func SHA1MSG1(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHA1MSG1",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SHA"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHA1MSG1",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SHA"},
+ }, nil
+ }
+ return nil, errors.New("SHA1MSG1: bad operands")
+}
+
+// SHA1MSG2: Perform a Final Calculation for the Next Four SHA1 Message Doublewords.
+//
+// Forms:
+//
+// SHA1MSG2 xmm xmm
+// SHA1MSG2 m128 xmm
+func SHA1MSG2(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHA1MSG2",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SHA"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHA1MSG2",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SHA"},
+ }, nil
+ }
+ return nil, errors.New("SHA1MSG2: bad operands")
+}
+
+// SHA1NEXTE: Calculate SHA1 State Variable E after Four Rounds.
+//
+// Forms:
+//
+// SHA1NEXTE xmm xmm
+// SHA1NEXTE m128 xmm
+func SHA1NEXTE(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHA1NEXTE",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SHA"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHA1NEXTE",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SHA"},
+ }, nil
+ }
+ return nil, errors.New("SHA1NEXTE: bad operands")
+}
+
+// SHA1RNDS4: Perform Four Rounds of SHA1 Operation.
+//
+// Forms:
+//
+// SHA1RNDS4 imm2u xmm xmm
+// SHA1RNDS4 imm2u m128 xmm
+func SHA1RNDS4(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM2U(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHA1RNDS4",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SHA"},
+ }, nil
+ case operand.IsIMM2U(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHA1RNDS4",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SHA"},
+ }, nil
+ }
+ return nil, errors.New("SHA1RNDS4: bad operands")
+}
+
+// SHA256MSG1: Perform an Intermediate Calculation for the Next Four SHA256 Message Doublewords.
+//
+// Forms:
+//
+// SHA256MSG1 xmm xmm
+// SHA256MSG1 m128 xmm
+func SHA256MSG1(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHA256MSG1",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SHA"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHA256MSG1",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SHA"},
+ }, nil
+ }
+ return nil, errors.New("SHA256MSG1: bad operands")
+}
+
+// SHA256MSG2: Perform a Final Calculation for the Next Four SHA256 Message Doublewords.
+//
+// Forms:
+//
+// SHA256MSG2 xmm xmm
+// SHA256MSG2 m128 xmm
+func SHA256MSG2(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHA256MSG2",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SHA"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHA256MSG2",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SHA"},
+ }, nil
+ }
+ return nil, errors.New("SHA256MSG2: bad operands")
+}
+
+// SHA256RNDS2: Perform Two Rounds of SHA256 Operation.
+//
+// Forms:
+//
+// SHA256RNDS2 xmm0 xmm xmm
+// SHA256RNDS2 xmm0 m128 xmm
+func SHA256RNDS2(x, mx, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM0(x) && operand.IsXMM(mx) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "SHA256RNDS2",
+ Operands: []operand.Op{x, mx, x1},
+ Inputs: []operand.Op{x, mx, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"SHA"},
+ }, nil
+ case operand.IsXMM0(x) && operand.IsM128(mx) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "SHA256RNDS2",
+ Operands: []operand.Op{x, mx, x1},
+ Inputs: []operand.Op{x, mx, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"SHA"},
+ }, nil
+ }
+ return nil, errors.New("SHA256RNDS2: bad operands")
+}
+
+// SHLB: Logical Shift Left.
+//
+// Forms:
+//
+// SHLB 1 r8
+// SHLB imm8 r8
+// SHLB cl r8
+// SHLB 1 m8
+// SHLB imm8 m8
+// SHLB cl m8
+func SHLB(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SHLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SHLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SHLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SHLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SHLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SHLB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SHLB: bad operands")
+}
+
+// SHLL: Logical Shift Left.
+//
+// Forms:
+//
+// SHLL 1 r32
+// SHLL imm8 r32
+// SHLL cl r32
+// SHLL 1 m32
+// SHLL imm8 m32
+// SHLL cl m32
+// SHLL imm8 r32 r32
+// SHLL cl r32 r32
+// SHLL imm8 r32 m32
+// SHLL cl r32 m32
+func SHLL(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsR32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsIMM8(ops[0]) && operand.IsR32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsCL(ops[0]) && operand.IsR32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsM32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsIMM8(ops[0]) && operand.IsM32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsCL(ops[0]) && operand.IsM32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 3 && operand.IsIMM8(ops[0]) && operand.IsR32(ops[1]) && operand.IsR32(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHLL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsCL(ops[0]) && operand.IsR32(ops[1]) && operand.IsR32(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHLL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsIMM8(ops[0]) && operand.IsR32(ops[1]) && operand.IsM32(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHLL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsCL(ops[0]) && operand.IsR32(ops[1]) && operand.IsM32(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHLL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ }
+ return nil, errors.New("SHLL: bad operands")
+}
+
+// SHLQ: Logical Shift Left.
+//
+// Forms:
+//
+// SHLQ 1 r64
+// SHLQ imm8 r64
+// SHLQ cl r64
+// SHLQ 1 m64
+// SHLQ imm8 m64
+// SHLQ cl m64
+// SHLQ imm8 r64 r64
+// SHLQ cl r64 r64
+// SHLQ imm8 r64 m64
+// SHLQ cl r64 m64
+func SHLQ(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsR64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsIMM8(ops[0]) && operand.IsR64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsCL(ops[0]) && operand.IsR64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsM64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsIMM8(ops[0]) && operand.IsM64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsCL(ops[0]) && operand.IsM64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 3 && operand.IsIMM8(ops[0]) && operand.IsR64(ops[1]) && operand.IsR64(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHLQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsCL(ops[0]) && operand.IsR64(ops[1]) && operand.IsR64(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHLQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsIMM8(ops[0]) && operand.IsR64(ops[1]) && operand.IsM64(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHLQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsCL(ops[0]) && operand.IsR64(ops[1]) && operand.IsM64(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHLQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ }
+ return nil, errors.New("SHLQ: bad operands")
+}
+
+// SHLW: Logical Shift Left.
+//
+// Forms:
+//
+// SHLW 1 r16
+// SHLW imm8 r16
+// SHLW cl r16
+// SHLW 1 m16
+// SHLW imm8 m16
+// SHLW cl m16
+// SHLW imm8 r16 r16
+// SHLW cl r16 r16
+// SHLW imm8 r16 m16
+// SHLW cl r16 m16
+func SHLW(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsR16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsIMM8(ops[0]) && operand.IsR16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsCL(ops[0]) && operand.IsR16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsM16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsIMM8(ops[0]) && operand.IsM16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsCL(ops[0]) && operand.IsM16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHLW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 3 && operand.IsIMM8(ops[0]) && operand.IsR16(ops[1]) && operand.IsR16(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHLW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsCL(ops[0]) && operand.IsR16(ops[1]) && operand.IsR16(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHLW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsIMM8(ops[0]) && operand.IsR16(ops[1]) && operand.IsM16(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHLW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsCL(ops[0]) && operand.IsR16(ops[1]) && operand.IsM16(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHLW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ }
+ return nil, errors.New("SHLW: bad operands")
+}
+
+// SHLXL: Logical Shift Left Without Affecting Flags.
+//
+// Forms:
+//
+// SHLXL r32 r32 r32
+// SHLXL r32 m32 r32
+func SHLXL(r, mr, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(r) && operand.IsR32(mr) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "SHLXL",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsR32(r) && operand.IsM32(mr) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "SHLXL",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("SHLXL: bad operands")
+}
+
+// SHLXQ: Logical Shift Left Without Affecting Flags.
+//
+// Forms:
+//
+// SHLXQ r64 r64 r64
+// SHLXQ r64 m64 r64
+func SHLXQ(r, mr, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(r) && operand.IsR64(mr) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "SHLXQ",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsR64(r) && operand.IsM64(mr) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "SHLXQ",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("SHLXQ: bad operands")
+}
+
+// SHRB: Logical Shift Right.
+//
+// Forms:
+//
+// SHRB 1 r8
+// SHRB imm8 r8
+// SHRB cl r8
+// SHRB 1 m8
+// SHRB imm8 m8
+// SHRB cl m8
+func SHRB(ci, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.Is1(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SHRB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SHRB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "SHRB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.Is1(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SHRB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SHRB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsCL(ci) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "SHRB",
+ Operands: []operand.Op{ci, mr},
+ Inputs: []operand.Op{ci, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SHRB: bad operands")
+}
+
+// SHRL: Logical Shift Right.
+//
+// Forms:
+//
+// SHRL 1 r32
+// SHRL imm8 r32
+// SHRL cl r32
+// SHRL 1 m32
+// SHRL imm8 m32
+// SHRL cl m32
+// SHRL imm8 r32 r32
+// SHRL cl r32 r32
+// SHRL imm8 r32 m32
+// SHRL cl r32 m32
+func SHRL(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsR32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsIMM8(ops[0]) && operand.IsR32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsCL(ops[0]) && operand.IsR32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsM32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsIMM8(ops[0]) && operand.IsM32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsCL(ops[0]) && operand.IsM32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 3 && operand.IsIMM8(ops[0]) && operand.IsR32(ops[1]) && operand.IsR32(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHRL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsCL(ops[0]) && operand.IsR32(ops[1]) && operand.IsR32(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHRL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsIMM8(ops[0]) && operand.IsR32(ops[1]) && operand.IsM32(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHRL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsCL(ops[0]) && operand.IsR32(ops[1]) && operand.IsM32(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHRL",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ }
+ return nil, errors.New("SHRL: bad operands")
+}
+
+// SHRQ: Logical Shift Right.
+//
+// Forms:
+//
+// SHRQ 1 r64
+// SHRQ imm8 r64
+// SHRQ cl r64
+// SHRQ 1 m64
+// SHRQ imm8 m64
+// SHRQ cl m64
+// SHRQ imm8 r64 r64
+// SHRQ cl r64 r64
+// SHRQ imm8 r64 m64
+// SHRQ cl r64 m64
+func SHRQ(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsR64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsIMM8(ops[0]) && operand.IsR64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsCL(ops[0]) && operand.IsR64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsM64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsIMM8(ops[0]) && operand.IsM64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsCL(ops[0]) && operand.IsM64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 3 && operand.IsIMM8(ops[0]) && operand.IsR64(ops[1]) && operand.IsR64(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHRQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsCL(ops[0]) && operand.IsR64(ops[1]) && operand.IsR64(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHRQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsIMM8(ops[0]) && operand.IsR64(ops[1]) && operand.IsM64(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHRQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsCL(ops[0]) && operand.IsR64(ops[1]) && operand.IsM64(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHRQ",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ }
+ return nil, errors.New("SHRQ: bad operands")
+}
+
+// SHRW: Logical Shift Right.
+//
+// Forms:
+//
+// SHRW 1 r16
+// SHRW imm8 r16
+// SHRW cl r16
+// SHRW 1 m16
+// SHRW imm8 m16
+// SHRW cl m16
+// SHRW imm8 r16 r16
+// SHRW cl r16 r16
+// SHRW imm8 r16 m16
+// SHRW cl r16 m16
+func SHRW(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsR16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsIMM8(ops[0]) && operand.IsR16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsCL(ops[0]) && operand.IsR16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.Is1(ops[0]) && operand.IsM16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsIMM8(ops[0]) && operand.IsM16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 2 && operand.IsCL(ops[0]) && operand.IsM16(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "SHRW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[1]},
+ }, nil
+ case len(ops) == 3 && operand.IsIMM8(ops[0]) && operand.IsR16(ops[1]) && operand.IsR16(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHRW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsCL(ops[0]) && operand.IsR16(ops[1]) && operand.IsR16(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHRW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsIMM8(ops[0]) && operand.IsR16(ops[1]) && operand.IsM16(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHRW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ case len(ops) == 3 && operand.IsCL(ops[0]) && operand.IsR16(ops[1]) && operand.IsM16(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "SHRW",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1], ops[2]},
+ Outputs: []operand.Op{ops[2]},
+ }, nil
+ }
+ return nil, errors.New("SHRW: bad operands")
+}
+
+// SHRXL: Logical Shift Right Without Affecting Flags.
+//
+// Forms:
+//
+// SHRXL r32 r32 r32
+// SHRXL r32 m32 r32
+func SHRXL(r, mr, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(r) && operand.IsR32(mr) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "SHRXL",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsR32(r) && operand.IsM32(mr) && operand.IsR32(r1):
+ return &intrep.Instruction{
+ Opcode: "SHRXL",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("SHRXL: bad operands")
+}
+
+// SHRXQ: Logical Shift Right Without Affecting Flags.
+//
+// Forms:
+//
+// SHRXQ r64 r64 r64
+// SHRXQ r64 m64 r64
+func SHRXQ(r, mr, r1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(r) && operand.IsR64(mr) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "SHRXQ",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ case operand.IsR64(r) && operand.IsM64(mr) && operand.IsR64(r1):
+ return &intrep.Instruction{
+ Opcode: "SHRXQ",
+ Operands: []operand.Op{r, mr, r1},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r1},
+ ISA: []string{"BMI2"},
+ }, nil
+ }
+ return nil, errors.New("SHRXQ: bad operands")
+}
+
+// SHUFPD: Shuffle Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// SHUFPD imm8 xmm xmm
+// SHUFPD imm8 m128 xmm
+func SHUFPD(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHUFPD",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHUFPD",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("SHUFPD: bad operands")
+}
+
+// SHUFPS: Shuffle Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// SHUFPS imm8 xmm xmm
+// SHUFPS imm8 m128 xmm
+func SHUFPS(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHUFPS",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SHUFPS",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("SHUFPS: bad operands")
+}
+
+// SQRTPD: Compute Square Roots of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// SQRTPD xmm xmm
+// SQRTPD m128 xmm
+func SQRTPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SQRTPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SQRTPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("SQRTPD: bad operands")
+}
+
+// SQRTPS: Compute Square Roots of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// SQRTPS xmm xmm
+// SQRTPS m128 xmm
+func SQRTPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SQRTPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SQRTPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("SQRTPS: bad operands")
+}
+
+// SQRTSD: Compute Square Root of Scalar Double-Precision Floating-Point Value.
+//
+// Forms:
+//
+// SQRTSD xmm xmm
+// SQRTSD m64 xmm
+func SQRTSD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SQRTSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SQRTSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("SQRTSD: bad operands")
+}
+
+// SQRTSS: Compute Square Root of Scalar Single-Precision Floating-Point Value.
+//
+// Forms:
+//
+// SQRTSS xmm xmm
+// SQRTSS m32 xmm
+func SQRTSS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SQRTSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SQRTSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("SQRTSS: bad operands")
+}
+
+// STC: Set Carry Flag.
+//
+// Forms:
+//
+// STC
+func STC() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "STC",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+}
+
+// STD: Set Direction Flag.
+//
+// Forms:
+//
+// STD
+func STD() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "STD",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+}
+
+// STMXCSR: Store MXCSR Register State.
+//
+// Forms:
+//
+// STMXCSR m32
+func STMXCSR(m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM32(m):
+ return &intrep.Instruction{
+ Opcode: "STMXCSR",
+ Operands: []operand.Op{m},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{m},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("STMXCSR: bad operands")
+}
+
+// SUBB: Subtract.
+//
+// Forms:
+//
+// SUBB imm8 al
+// SUBB imm8 r8
+// SUBB r8 r8
+// SUBB m8 r8
+// SUBB imm8 m8
+// SUBB r8 m8
+func SUBB(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imr) && operand.IsAL(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("SUBB: bad operands")
+}
+
+// SUBL: Subtract.
+//
+// Forms:
+//
+// SUBL imm32 eax
+// SUBL imm8 r32
+// SUBL imm32 r32
+// SUBL r32 r32
+// SUBL m32 r32
+// SUBL imm8 m32
+// SUBL imm32 m32
+// SUBL r32 m32
+func SUBL(imr, emr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsEAX(emr):
+ return &intrep.Instruction{
+ Opcode: "SUBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "SUBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "SUBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "SUBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "SUBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "SUBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "SUBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "SUBL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ }
+ return nil, errors.New("SUBL: bad operands")
+}
+
+// SUBPD: Subtract Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// SUBPD xmm xmm
+// SUBPD m128 xmm
+func SUBPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SUBPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SUBPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("SUBPD: bad operands")
+}
+
+// SUBPS: Subtract Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// SUBPS xmm xmm
+// SUBPS m128 xmm
+func SUBPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SUBPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SUBPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("SUBPS: bad operands")
+}
+
+// SUBQ: Subtract.
+//
+// Forms:
+//
+// SUBQ imm32 rax
+// SUBQ imm8 r64
+// SUBQ imm32 r64
+// SUBQ r64 r64
+// SUBQ m64 r64
+// SUBQ imm8 m64
+// SUBQ imm32 m64
+// SUBQ r64 m64
+func SUBQ(imr, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsRAX(mr):
+ return &intrep.Instruction{
+ Opcode: "SUBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SUBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SUBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SUBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "SUBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "SUBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "SUBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "SUBQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("SUBQ: bad operands")
+}
+
+// SUBSD: Subtract Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// SUBSD xmm xmm
+// SUBSD m64 xmm
+func SUBSD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SUBSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SUBSD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("SUBSD: bad operands")
+}
+
+// SUBSS: Subtract Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// SUBSS xmm xmm
+// SUBSS m32 xmm
+func SUBSS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SUBSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "SUBSS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("SUBSS: bad operands")
+}
+
+// SUBW: Subtract.
+//
+// Forms:
+//
+// SUBW imm16 ax
+// SUBW imm8 r16
+// SUBW imm16 r16
+// SUBW r16 r16
+// SUBW m16 r16
+// SUBW imm8 m16
+// SUBW imm16 m16
+// SUBW r16 m16
+func SUBW(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM16(imr) && operand.IsAX(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "SUBW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("SUBW: bad operands")
+}
+
+// SYSCALL: Fast System Call.
+//
+// Forms:
+//
+// SYSCALL
+func SYSCALL() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "SYSCALL",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{reg.R11, reg.RCX},
+ }, nil
+}
+
+// TESTB: Logical Compare.
+//
+// Forms:
+//
+// TESTB imm8 al
+// TESTB imm8 r8
+// TESTB r8 r8
+// TESTB imm8 m8
+// TESTB r8 m8
+func TESTB(ir, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(ir) && operand.IsAL(amr):
+ return &intrep.Instruction{
+ Opcode: "TESTB",
+ Operands: []operand.Op{ir, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "TESTB",
+ Operands: []operand.Op{ir, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR8(ir) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "TESTB",
+ Operands: []operand.Op{ir, amr},
+ Inputs: []operand.Op{ir, amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsIMM8(ir) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "TESTB",
+ Operands: []operand.Op{ir, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR8(ir) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "TESTB",
+ Operands: []operand.Op{ir, amr},
+ Inputs: []operand.Op{ir, amr},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("TESTB: bad operands")
+}
+
+// TESTL: Logical Compare.
+//
+// Forms:
+//
+// TESTL imm32 eax
+// TESTL imm32 r32
+// TESTL r32 r32
+// TESTL imm32 m32
+// TESTL r32 m32
+func TESTL(ir, emr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(ir) && operand.IsEAX(emr):
+ return &intrep.Instruction{
+ Opcode: "TESTL",
+ Operands: []operand.Op{ir, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsIMM32(ir) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "TESTL",
+ Operands: []operand.Op{ir, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR32(ir) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "TESTL",
+ Operands: []operand.Op{ir, emr},
+ Inputs: []operand.Op{ir, emr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsIMM32(ir) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "TESTL",
+ Operands: []operand.Op{ir, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR32(ir) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "TESTL",
+ Operands: []operand.Op{ir, emr},
+ Inputs: []operand.Op{ir, emr},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("TESTL: bad operands")
+}
+
+// TESTQ: Logical Compare.
+//
+// Forms:
+//
+// TESTQ imm32 rax
+// TESTQ imm32 r64
+// TESTQ r64 r64
+// TESTQ imm32 m64
+// TESTQ r64 m64
+func TESTQ(ir, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(ir) && operand.IsRAX(mr):
+ return &intrep.Instruction{
+ Opcode: "TESTQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsIMM32(ir) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "TESTQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR64(ir) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "TESTQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsIMM32(ir) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "TESTQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR64(ir) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "TESTQ",
+ Operands: []operand.Op{ir, mr},
+ Inputs: []operand.Op{ir, mr},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("TESTQ: bad operands")
+}
+
+// TESTW: Logical Compare.
+//
+// Forms:
+//
+// TESTW imm16 ax
+// TESTW imm16 r16
+// TESTW r16 r16
+// TESTW imm16 m16
+// TESTW r16 m16
+func TESTW(ir, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM16(ir) && operand.IsAX(amr):
+ return &intrep.Instruction{
+ Opcode: "TESTW",
+ Operands: []operand.Op{ir, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsIMM16(ir) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "TESTW",
+ Operands: []operand.Op{ir, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR16(ir) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "TESTW",
+ Operands: []operand.Op{ir, amr},
+ Inputs: []operand.Op{ir, amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsIMM16(ir) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "TESTW",
+ Operands: []operand.Op{ir, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{},
+ }, nil
+ case operand.IsR16(ir) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "TESTW",
+ Operands: []operand.Op{ir, amr},
+ Inputs: []operand.Op{ir, amr},
+ Outputs: []operand.Op{},
+ }, nil
+ }
+ return nil, errors.New("TESTW: bad operands")
+}
+
+// TZCNTL: Count the Number of Trailing Zero Bits.
+//
+// Forms:
+//
+// TZCNTL r32 r32
+// TZCNTL m32 r32
+func TZCNTL(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "TZCNTL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "TZCNTL",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ }
+ return nil, errors.New("TZCNTL: bad operands")
+}
+
+// TZCNTQ: Count the Number of Trailing Zero Bits.
+//
+// Forms:
+//
+// TZCNTQ r64 r64
+// TZCNTQ m64 r64
+func TZCNTQ(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "TZCNTQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "TZCNTQ",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ }
+ return nil, errors.New("TZCNTQ: bad operands")
+}
+
+// TZCNTW: Count the Number of Trailing Zero Bits.
+//
+// Forms:
+//
+// TZCNTW r16 r16
+// TZCNTW m16 r16
+func TZCNTW(mr, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "TZCNTW",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ case operand.IsM16(mr) && operand.IsR16(r):
+ return &intrep.Instruction{
+ Opcode: "TZCNTW",
+ Operands: []operand.Op{mr, r},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{r},
+ ISA: []string{"BMI"},
+ }, nil
+ }
+ return nil, errors.New("TZCNTW: bad operands")
+}
+
+// UCOMISD: Unordered Compare Scalar Double-Precision Floating-Point Values and Set EFLAGS.
+//
+// Forms:
+//
+// UCOMISD xmm xmm
+// UCOMISD m64 xmm
+func UCOMISD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "UCOMISD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "UCOMISD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("UCOMISD: bad operands")
+}
+
+// UCOMISS: Unordered Compare Scalar Single-Precision Floating-Point Values and Set EFLAGS.
+//
+// Forms:
+//
+// UCOMISS xmm xmm
+// UCOMISS m32 xmm
+func UCOMISS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "UCOMISS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "UCOMISS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("UCOMISS: bad operands")
+}
+
+// UD2: Undefined Instruction.
+//
+// Forms:
+//
+// UD2
+func UD2() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "UD2",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ }, nil
+}
+
+// UNPCKHPD: Unpack and Interleave High Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// UNPCKHPD xmm xmm
+// UNPCKHPD m128 xmm
+func UNPCKHPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "UNPCKHPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "UNPCKHPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("UNPCKHPD: bad operands")
+}
+
+// UNPCKHPS: Unpack and Interleave High Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// UNPCKHPS xmm xmm
+// UNPCKHPS m128 xmm
+func UNPCKHPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "UNPCKHPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "UNPCKHPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("UNPCKHPS: bad operands")
+}
+
+// UNPCKLPD: Unpack and Interleave Low Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// UNPCKLPD xmm xmm
+// UNPCKLPD m128 xmm
+func UNPCKLPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "UNPCKLPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "UNPCKLPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("UNPCKLPD: bad operands")
+}
+
+// UNPCKLPS: Unpack and Interleave Low Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// UNPCKLPS xmm xmm
+// UNPCKLPS m128 xmm
+func UNPCKLPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "UNPCKLPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "UNPCKLPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("UNPCKLPS: bad operands")
+}
+
+// VADDPD: Add Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VADDPD xmm xmm xmm
+// VADDPD m128 xmm xmm
+// VADDPD ymm ymm ymm
+// VADDPD m256 ymm ymm
+func VADDPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VADDPD: bad operands")
+}
+
+// VADDPS: Add Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VADDPS xmm xmm xmm
+// VADDPS m128 xmm xmm
+// VADDPS ymm ymm ymm
+// VADDPS m256 ymm ymm
+func VADDPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VADDPS: bad operands")
+}
+
+// VADDSD: Add Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VADDSD xmm xmm xmm
+// VADDSD m64 xmm xmm
+func VADDSD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VADDSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VADDSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VADDSD: bad operands")
+}
+
+// VADDSS: Add Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VADDSS xmm xmm xmm
+// VADDSS m32 xmm xmm
+func VADDSS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VADDSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VADDSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VADDSS: bad operands")
+}
+
+// VADDSUBPD: Packed Double-FP Add/Subtract.
+//
+// Forms:
+//
+// VADDSUBPD xmm xmm xmm
+// VADDSUBPD m128 xmm xmm
+// VADDSUBPD ymm ymm ymm
+// VADDSUBPD m256 ymm ymm
+func VADDSUBPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDSUBPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDSUBPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDSUBPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDSUBPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VADDSUBPD: bad operands")
+}
+
+// VADDSUBPS: Packed Single-FP Add/Subtract.
+//
+// Forms:
+//
+// VADDSUBPS xmm xmm xmm
+// VADDSUBPS m128 xmm xmm
+// VADDSUBPS ymm ymm ymm
+// VADDSUBPS m256 ymm ymm
+func VADDSUBPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDSUBPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDSUBPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDSUBPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VADDSUBPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VADDSUBPS: bad operands")
+}
+
+// VAESDEC: Perform One Round of an AES Decryption Flow.
+//
+// Forms:
+//
+// VAESDEC xmm xmm xmm
+// VAESDEC m128 xmm xmm
+func VAESDEC(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VAESDEC",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX", "AES"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VAESDEC",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX", "AES"},
+ }, nil
+ }
+ return nil, errors.New("VAESDEC: bad operands")
+}
+
+// VAESDECLAST: Perform Last Round of an AES Decryption Flow.
+//
+// Forms:
+//
+// VAESDECLAST xmm xmm xmm
+// VAESDECLAST m128 xmm xmm
+func VAESDECLAST(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VAESDECLAST",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX", "AES"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VAESDECLAST",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX", "AES"},
+ }, nil
+ }
+ return nil, errors.New("VAESDECLAST: bad operands")
+}
+
+// VAESENC: Perform One Round of an AES Encryption Flow.
+//
+// Forms:
+//
+// VAESENC xmm xmm xmm
+// VAESENC m128 xmm xmm
+func VAESENC(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VAESENC",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX", "AES"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VAESENC",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX", "AES"},
+ }, nil
+ }
+ return nil, errors.New("VAESENC: bad operands")
+}
+
+// VAESENCLAST: Perform Last Round of an AES Encryption Flow.
+//
+// Forms:
+//
+// VAESENCLAST xmm xmm xmm
+// VAESENCLAST m128 xmm xmm
+func VAESENCLAST(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VAESENCLAST",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX", "AES"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VAESENCLAST",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX", "AES"},
+ }, nil
+ }
+ return nil, errors.New("VAESENCLAST: bad operands")
+}
+
+// VAESIMC: Perform the AES InvMixColumn Transformation.
+//
+// Forms:
+//
+// VAESIMC xmm xmm
+// VAESIMC m128 xmm
+func VAESIMC(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VAESIMC",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX", "AES"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VAESIMC",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX", "AES"},
+ }, nil
+ }
+ return nil, errors.New("VAESIMC: bad operands")
+}
+
+// VAESKEYGENASSIST: AES Round Key Generation Assist.
+//
+// Forms:
+//
+// VAESKEYGENASSIST imm8 xmm xmm
+// VAESKEYGENASSIST imm8 m128 xmm
+func VAESKEYGENASSIST(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VAESKEYGENASSIST",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX", "AES"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VAESKEYGENASSIST",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX", "AES"},
+ }, nil
+ }
+ return nil, errors.New("VAESKEYGENASSIST: bad operands")
+}
+
+// VANDNPD: Bitwise Logical AND NOT of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VANDNPD xmm xmm xmm
+// VANDNPD m128 xmm xmm
+// VANDNPD ymm ymm ymm
+// VANDNPD m256 ymm ymm
+func VANDNPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDNPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDNPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDNPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDNPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VANDNPD: bad operands")
+}
+
+// VANDNPS: Bitwise Logical AND NOT of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VANDNPS xmm xmm xmm
+// VANDNPS m128 xmm xmm
+// VANDNPS ymm ymm ymm
+// VANDNPS m256 ymm ymm
+func VANDNPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDNPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDNPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDNPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDNPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VANDNPS: bad operands")
+}
+
+// VANDPD: Bitwise Logical AND of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VANDPD xmm xmm xmm
+// VANDPD m128 xmm xmm
+// VANDPD ymm ymm ymm
+// VANDPD m256 ymm ymm
+func VANDPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VANDPD: bad operands")
+}
+
+// VANDPS: Bitwise Logical AND of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VANDPS xmm xmm xmm
+// VANDPS m128 xmm xmm
+// VANDPS ymm ymm ymm
+// VANDPS m256 ymm ymm
+func VANDPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VANDPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VANDPS: bad operands")
+}
+
+// VBLENDPD: Blend Packed Double Precision Floating-Point Values.
+//
+// Forms:
+//
+// VBLENDPD imm8 xmm xmm xmm
+// VBLENDPD imm8 m128 xmm xmm
+// VBLENDPD imm8 ymm ymm ymm
+// VBLENDPD imm8 m256 ymm ymm
+func VBLENDPD(i, mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VBLENDPD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VBLENDPD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VBLENDPD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VBLENDPD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VBLENDPD: bad operands")
+}
+
+// VBLENDPS: Blend Packed Single Precision Floating-Point Values.
+//
+// Forms:
+//
+// VBLENDPS imm8 xmm xmm xmm
+// VBLENDPS imm8 m128 xmm xmm
+// VBLENDPS imm8 ymm ymm ymm
+// VBLENDPS imm8 m256 ymm ymm
+func VBLENDPS(i, mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VBLENDPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VBLENDPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VBLENDPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VBLENDPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VBLENDPS: bad operands")
+}
+
+// VBLENDVPD: Variable Blend Packed Double Precision Floating-Point Values.
+//
+// Forms:
+//
+// VBLENDVPD xmm xmm xmm xmm
+// VBLENDVPD xmm m128 xmm xmm
+// VBLENDVPD ymm ymm ymm ymm
+// VBLENDVPD ymm m256 ymm ymm
+func VBLENDVPD(xy, mxy, xy1, xy2 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsXMM(mxy) && operand.IsXMM(xy1) && operand.IsXMM(xy2):
+ return &intrep.Instruction{
+ Opcode: "VBLENDVPD",
+ Operands: []operand.Op{xy, mxy, xy1, xy2},
+ Inputs: []operand.Op{xy, mxy, xy1},
+ Outputs: []operand.Op{xy2},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(xy) && operand.IsM128(mxy) && operand.IsXMM(xy1) && operand.IsXMM(xy2):
+ return &intrep.Instruction{
+ Opcode: "VBLENDVPD",
+ Operands: []operand.Op{xy, mxy, xy1, xy2},
+ Inputs: []operand.Op{xy, mxy, xy1},
+ Outputs: []operand.Op{xy2},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsYMM(mxy) && operand.IsYMM(xy1) && operand.IsYMM(xy2):
+ return &intrep.Instruction{
+ Opcode: "VBLENDVPD",
+ Operands: []operand.Op{xy, mxy, xy1, xy2},
+ Inputs: []operand.Op{xy, mxy, xy1},
+ Outputs: []operand.Op{xy2},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsM256(mxy) && operand.IsYMM(xy1) && operand.IsYMM(xy2):
+ return &intrep.Instruction{
+ Opcode: "VBLENDVPD",
+ Operands: []operand.Op{xy, mxy, xy1, xy2},
+ Inputs: []operand.Op{xy, mxy, xy1},
+ Outputs: []operand.Op{xy2},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VBLENDVPD: bad operands")
+}
+
+// VBLENDVPS: Variable Blend Packed Single Precision Floating-Point Values.
+//
+// Forms:
+//
+// VBLENDVPS xmm xmm xmm xmm
+// VBLENDVPS xmm m128 xmm xmm
+// VBLENDVPS ymm ymm ymm ymm
+// VBLENDVPS ymm m256 ymm ymm
+func VBLENDVPS(xy, mxy, xy1, xy2 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsXMM(mxy) && operand.IsXMM(xy1) && operand.IsXMM(xy2):
+ return &intrep.Instruction{
+ Opcode: "VBLENDVPS",
+ Operands: []operand.Op{xy, mxy, xy1, xy2},
+ Inputs: []operand.Op{xy, mxy, xy1},
+ Outputs: []operand.Op{xy2},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(xy) && operand.IsM128(mxy) && operand.IsXMM(xy1) && operand.IsXMM(xy2):
+ return &intrep.Instruction{
+ Opcode: "VBLENDVPS",
+ Operands: []operand.Op{xy, mxy, xy1, xy2},
+ Inputs: []operand.Op{xy, mxy, xy1},
+ Outputs: []operand.Op{xy2},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsYMM(mxy) && operand.IsYMM(xy1) && operand.IsYMM(xy2):
+ return &intrep.Instruction{
+ Opcode: "VBLENDVPS",
+ Operands: []operand.Op{xy, mxy, xy1, xy2},
+ Inputs: []operand.Op{xy, mxy, xy1},
+ Outputs: []operand.Op{xy2},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsM256(mxy) && operand.IsYMM(xy1) && operand.IsYMM(xy2):
+ return &intrep.Instruction{
+ Opcode: "VBLENDVPS",
+ Operands: []operand.Op{xy, mxy, xy1, xy2},
+ Inputs: []operand.Op{xy, mxy, xy1},
+ Outputs: []operand.Op{xy2},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VBLENDVPS: bad operands")
+}
+
+// VBROADCASTF128: Broadcast 128 Bit of Floating-Point Data.
+//
+// Forms:
+//
+// VBROADCASTF128 m128 ymm
+func VBROADCASTF128(m, y operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM128(m) && operand.IsYMM(y):
+ return &intrep.Instruction{
+ Opcode: "VBROADCASTF128",
+ Operands: []operand.Op{m, y},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{y},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VBROADCASTF128: bad operands")
+}
+
+// VBROADCASTI128: Broadcast 128 Bits of Integer Data.
+//
+// Forms:
+//
+// VBROADCASTI128 m128 ymm
+func VBROADCASTI128(m, y operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM128(m) && operand.IsYMM(y):
+ return &intrep.Instruction{
+ Opcode: "VBROADCASTI128",
+ Operands: []operand.Op{m, y},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{y},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VBROADCASTI128: bad operands")
+}
+
+// VBROADCASTSD: Broadcast Double-Precision Floating-Point Element.
+//
+// Forms:
+//
+// VBROADCASTSD xmm ymm
+// VBROADCASTSD m64 ymm
+func VBROADCASTSD(mx, y operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsYMM(y):
+ return &intrep.Instruction{
+ Opcode: "VBROADCASTSD",
+ Operands: []operand.Op{mx, y},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{y},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsYMM(y):
+ return &intrep.Instruction{
+ Opcode: "VBROADCASTSD",
+ Operands: []operand.Op{mx, y},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{y},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VBROADCASTSD: bad operands")
+}
+
+// VBROADCASTSS: Broadcast Single-Precision Floating-Point Element.
+//
+// Forms:
+//
+// VBROADCASTSS xmm xmm
+// VBROADCASTSS m32 xmm
+// VBROADCASTSS xmm ymm
+// VBROADCASTSS m32 ymm
+func VBROADCASTSS(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VBROADCASTSS",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VBROADCASTSS",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VBROADCASTSS",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VBROADCASTSS",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VBROADCASTSS: bad operands")
+}
+
+// VCMPPD: Compare Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VCMPPD imm8 xmm xmm xmm
+// VCMPPD imm8 m128 xmm xmm
+// VCMPPD imm8 ymm ymm ymm
+// VCMPPD imm8 m256 ymm ymm
+func VCMPPD(i, mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VCMPPD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VCMPPD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VCMPPD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VCMPPD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCMPPD: bad operands")
+}
+
+// VCMPPS: Compare Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VCMPPS imm8 xmm xmm xmm
+// VCMPPS imm8 m128 xmm xmm
+// VCMPPS imm8 ymm ymm ymm
+// VCMPPS imm8 m256 ymm ymm
+func VCMPPS(i, mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VCMPPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VCMPPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VCMPPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VCMPPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCMPPS: bad operands")
+}
+
+// VCMPSD: Compare Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VCMPSD imm8 xmm xmm xmm
+// VCMPSD imm8 m64 xmm xmm
+func VCMPSD(i, mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCMPSD",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCMPSD",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCMPSD: bad operands")
+}
+
+// VCMPSS: Compare Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VCMPSS imm8 xmm xmm xmm
+// VCMPSS imm8 m32 xmm xmm
+func VCMPSS(i, mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCMPSS",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCMPSS",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCMPSS: bad operands")
+}
+
+// VCOMISD: Compare Scalar Ordered Double-Precision Floating-Point Values and Set EFLAGS.
+//
+// Forms:
+//
+// VCOMISD xmm xmm
+// VCOMISD m64 xmm
+func VCOMISD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCOMISD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCOMISD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCOMISD: bad operands")
+}
+
+// VCOMISS: Compare Scalar Ordered Single-Precision Floating-Point Values and Set EFLAGS.
+//
+// Forms:
+//
+// VCOMISS xmm xmm
+// VCOMISS m32 xmm
+func VCOMISS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCOMISS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCOMISS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCOMISS: bad operands")
+}
+
+// VCVTDQ2PD: Convert Packed Dword Integers to Packed Double-Precision FP Values.
+//
+// Forms:
+//
+// VCVTDQ2PD xmm xmm
+// VCVTDQ2PD m64 xmm
+// VCVTDQ2PD xmm ymm
+// VCVTDQ2PD m128 ymm
+func VCVTDQ2PD(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTDQ2PD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTDQ2PD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTDQ2PD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTDQ2PD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTDQ2PD: bad operands")
+}
+
+// VCVTDQ2PS: Convert Packed Dword Integers to Packed Single-Precision FP Values.
+//
+// Forms:
+//
+// VCVTDQ2PS xmm xmm
+// VCVTDQ2PS m128 xmm
+// VCVTDQ2PS ymm ymm
+// VCVTDQ2PS m256 ymm
+func VCVTDQ2PS(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTDQ2PS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTDQ2PS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTDQ2PS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTDQ2PS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTDQ2PS: bad operands")
+}
+
+// VCVTPD2DQX: Convert Packed Double-Precision FP Values to Packed Dword Integers.
+//
+// Forms:
+//
+// VCVTPD2DQX xmm xmm
+// VCVTPD2DQX m128 xmm
+func VCVTPD2DQX(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCVTPD2DQX",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCVTPD2DQX",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTPD2DQX: bad operands")
+}
+
+// VCVTPD2DQY: Convert Packed Double-Precision FP Values to Packed Dword Integers.
+//
+// Forms:
+//
+// VCVTPD2DQY ymm xmm
+// VCVTPD2DQY m256 xmm
+func VCVTPD2DQY(my, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsYMM(my) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCVTPD2DQY",
+ Operands: []operand.Op{my, x},
+ Inputs: []operand.Op{my},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(my) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCVTPD2DQY",
+ Operands: []operand.Op{my, x},
+ Inputs: []operand.Op{my},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTPD2DQY: bad operands")
+}
+
+// VCVTPD2PSX: Convert Packed Double-Precision FP Values to Packed Single-Precision FP Values.
+//
+// Forms:
+//
+// VCVTPD2PSX xmm xmm
+// VCVTPD2PSX m128 xmm
+func VCVTPD2PSX(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCVTPD2PSX",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCVTPD2PSX",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTPD2PSX: bad operands")
+}
+
+// VCVTPD2PSY: Convert Packed Double-Precision FP Values to Packed Single-Precision FP Values.
+//
+// Forms:
+//
+// VCVTPD2PSY ymm xmm
+// VCVTPD2PSY m256 xmm
+func VCVTPD2PSY(my, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsYMM(my) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCVTPD2PSY",
+ Operands: []operand.Op{my, x},
+ Inputs: []operand.Op{my},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(my) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCVTPD2PSY",
+ Operands: []operand.Op{my, x},
+ Inputs: []operand.Op{my},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTPD2PSY: bad operands")
+}
+
+// VCVTPH2PS: Convert Half-Precision FP Values to Single-Precision FP Values.
+//
+// Forms:
+//
+// VCVTPH2PS xmm xmm
+// VCVTPH2PS m64 xmm
+// VCVTPH2PS xmm ymm
+// VCVTPH2PS m128 ymm
+func VCVTPH2PS(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTPH2PS",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"F16C"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTPH2PS",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"F16C"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTPH2PS",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"F16C"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTPH2PS",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"F16C"},
+ }, nil
+ }
+ return nil, errors.New("VCVTPH2PS: bad operands")
+}
+
+// VCVTPS2DQ: Convert Packed Single-Precision FP Values to Packed Dword Integers.
+//
+// Forms:
+//
+// VCVTPS2DQ xmm xmm
+// VCVTPS2DQ m128 xmm
+// VCVTPS2DQ ymm ymm
+// VCVTPS2DQ m256 ymm
+func VCVTPS2DQ(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTPS2DQ",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTPS2DQ",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTPS2DQ",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTPS2DQ",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTPS2DQ: bad operands")
+}
+
+// VCVTPS2PD: Convert Packed Single-Precision FP Values to Packed Double-Precision FP Values.
+//
+// Forms:
+//
+// VCVTPS2PD xmm xmm
+// VCVTPS2PD m64 xmm
+// VCVTPS2PD xmm ymm
+// VCVTPS2PD m128 ymm
+func VCVTPS2PD(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTPS2PD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTPS2PD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTPS2PD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTPS2PD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTPS2PD: bad operands")
+}
+
+// VCVTPS2PH: Convert Single-Precision FP value to Half-Precision FP value.
+//
+// Forms:
+//
+// VCVTPS2PH imm8 xmm xmm
+// VCVTPS2PH imm8 ymm xmm
+// VCVTPS2PH imm8 xmm m64
+// VCVTPS2PH imm8 ymm m128
+func VCVTPS2PH(i, xy, mx operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(xy) && operand.IsXMM(mx):
+ return &intrep.Instruction{
+ Opcode: "VCVTPS2PH",
+ Operands: []operand.Op{i, xy, mx},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{mx},
+ ISA: []string{"F16C"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(xy) && operand.IsXMM(mx):
+ return &intrep.Instruction{
+ Opcode: "VCVTPS2PH",
+ Operands: []operand.Op{i, xy, mx},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{mx},
+ ISA: []string{"F16C"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsXMM(xy) && operand.IsM64(mx):
+ return &intrep.Instruction{
+ Opcode: "VCVTPS2PH",
+ Operands: []operand.Op{i, xy, mx},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{mx},
+ ISA: []string{"F16C"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(xy) && operand.IsM128(mx):
+ return &intrep.Instruction{
+ Opcode: "VCVTPS2PH",
+ Operands: []operand.Op{i, xy, mx},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{mx},
+ ISA: []string{"F16C"},
+ }, nil
+ }
+ return nil, errors.New("VCVTPS2PH: bad operands")
+}
+
+// VCVTSD2SI: Convert Scalar Double-Precision FP Value to Integer.
+//
+// Forms:
+//
+// VCVTSD2SI xmm r32
+// VCVTSD2SI m64 r32
+func VCVTSD2SI(mx, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTSD2SI",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTSD2SI",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTSD2SI: bad operands")
+}
+
+// VCVTSD2SIQ: Convert Scalar Double-Precision FP Value to Integer.
+//
+// Forms:
+//
+// VCVTSD2SIQ xmm r64
+// VCVTSD2SIQ m64 r64
+func VCVTSD2SIQ(mx, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTSD2SIQ",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTSD2SIQ",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTSD2SIQ: bad operands")
+}
+
+// VCVTSD2SS: Convert Scalar Double-Precision FP Value to Scalar Single-Precision FP Value.
+//
+// Forms:
+//
+// VCVTSD2SS xmm xmm xmm
+// VCVTSD2SS m64 xmm xmm
+func VCVTSD2SS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCVTSD2SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCVTSD2SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTSD2SS: bad operands")
+}
+
+// VCVTSI2SDL: Convert Dword Integer to Scalar Double-Precision FP Value.
+//
+// Forms:
+//
+// VCVTSI2SDL r32 xmm xmm
+// VCVTSI2SDL m32 xmm xmm
+func VCVTSI2SDL(mr, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCVTSI2SDL",
+ Operands: []operand.Op{mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCVTSI2SDL",
+ Operands: []operand.Op{mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTSI2SDL: bad operands")
+}
+
+// VCVTSI2SDQ: Convert Dword Integer to Scalar Double-Precision FP Value.
+//
+// Forms:
+//
+// VCVTSI2SDQ r64 xmm xmm
+// VCVTSI2SDQ m64 xmm xmm
+func VCVTSI2SDQ(mr, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCVTSI2SDQ",
+ Operands: []operand.Op{mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCVTSI2SDQ",
+ Operands: []operand.Op{mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTSI2SDQ: bad operands")
+}
+
+// VCVTSI2SSL: Convert Dword Integer to Scalar Single-Precision FP Value.
+//
+// Forms:
+//
+// VCVTSI2SSL r32 xmm xmm
+// VCVTSI2SSL m32 xmm xmm
+func VCVTSI2SSL(mr, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCVTSI2SSL",
+ Operands: []operand.Op{mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCVTSI2SSL",
+ Operands: []operand.Op{mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTSI2SSL: bad operands")
+}
+
+// VCVTSI2SSQ: Convert Dword Integer to Scalar Single-Precision FP Value.
+//
+// Forms:
+//
+// VCVTSI2SSQ r64 xmm xmm
+// VCVTSI2SSQ m64 xmm xmm
+func VCVTSI2SSQ(mr, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCVTSI2SSQ",
+ Operands: []operand.Op{mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCVTSI2SSQ",
+ Operands: []operand.Op{mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTSI2SSQ: bad operands")
+}
+
+// VCVTSS2SD: Convert Scalar Single-Precision FP Value to Scalar Double-Precision FP Value.
+//
+// Forms:
+//
+// VCVTSS2SD xmm xmm xmm
+// VCVTSS2SD m32 xmm xmm
+func VCVTSS2SD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCVTSS2SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VCVTSS2SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTSS2SD: bad operands")
+}
+
+// VCVTSS2SI: Convert Scalar Single-Precision FP Value to Dword Integer.
+//
+// Forms:
+//
+// VCVTSS2SI xmm r32
+// VCVTSS2SI m32 r32
+func VCVTSS2SI(mx, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTSS2SI",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTSS2SI",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTSS2SI: bad operands")
+}
+
+// VCVTSS2SIQ: Convert Scalar Single-Precision FP Value to Dword Integer.
+//
+// Forms:
+//
+// VCVTSS2SIQ xmm r64
+// VCVTSS2SIQ m32 r64
+func VCVTSS2SIQ(mx, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTSS2SIQ",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTSS2SIQ",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTSS2SIQ: bad operands")
+}
+
+// VCVTTPD2DQX: Convert with Truncation Packed Double-Precision FP Values to Packed Dword Integers.
+//
+// Forms:
+//
+// VCVTTPD2DQX xmm xmm
+// VCVTTPD2DQX m128 xmm
+func VCVTTPD2DQX(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCVTTPD2DQX",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCVTTPD2DQX",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTTPD2DQX: bad operands")
+}
+
+// VCVTTPD2DQY: Convert with Truncation Packed Double-Precision FP Values to Packed Dword Integers.
+//
+// Forms:
+//
+// VCVTTPD2DQY ymm xmm
+// VCVTTPD2DQY m256 xmm
+func VCVTTPD2DQY(my, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsYMM(my) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCVTTPD2DQY",
+ Operands: []operand.Op{my, x},
+ Inputs: []operand.Op{my},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(my) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VCVTTPD2DQY",
+ Operands: []operand.Op{my, x},
+ Inputs: []operand.Op{my},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTTPD2DQY: bad operands")
+}
+
+// VCVTTPS2DQ: Convert with Truncation Packed Single-Precision FP Values to Packed Dword Integers.
+//
+// Forms:
+//
+// VCVTTPS2DQ xmm xmm
+// VCVTTPS2DQ m128 xmm
+// VCVTTPS2DQ ymm ymm
+// VCVTTPS2DQ m256 ymm
+func VCVTTPS2DQ(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTTPS2DQ",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTTPS2DQ",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTTPS2DQ",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VCVTTPS2DQ",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTTPS2DQ: bad operands")
+}
+
+// VCVTTSD2SI: Convert with Truncation Scalar Double-Precision FP Value to Signed Integer.
+//
+// Forms:
+//
+// VCVTTSD2SI xmm r32
+// VCVTTSD2SI m64 r32
+func VCVTTSD2SI(mx, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTTSD2SI",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTTSD2SI",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTTSD2SI: bad operands")
+}
+
+// VCVTTSD2SIQ: Convert with Truncation Scalar Double-Precision FP Value to Signed Integer.
+//
+// Forms:
+//
+// VCVTTSD2SIQ xmm r64
+// VCVTTSD2SIQ m64 r64
+func VCVTTSD2SIQ(mx, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTTSD2SIQ",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTTSD2SIQ",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTTSD2SIQ: bad operands")
+}
+
+// VCVTTSS2SI: Convert with Truncation Scalar Single-Precision FP Value to Dword Integer.
+//
+// Forms:
+//
+// VCVTTSS2SI xmm r32
+// VCVTTSS2SI m32 r32
+func VCVTTSS2SI(mx, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTTSS2SI",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTTSS2SI",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTTSS2SI: bad operands")
+}
+
+// VCVTTSS2SIQ: Convert with Truncation Scalar Single-Precision FP Value to Dword Integer.
+//
+// Forms:
+//
+// VCVTTSS2SIQ xmm r64
+// VCVTTSS2SIQ m32 r64
+func VCVTTSS2SIQ(mx, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTTSS2SIQ",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsR64(r):
+ return &intrep.Instruction{
+ Opcode: "VCVTTSS2SIQ",
+ Operands: []operand.Op{mx, r},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VCVTTSS2SIQ: bad operands")
+}
+
+// VDIVPD: Divide Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VDIVPD xmm xmm xmm
+// VDIVPD m128 xmm xmm
+// VDIVPD ymm ymm ymm
+// VDIVPD m256 ymm ymm
+func VDIVPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VDIVPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VDIVPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VDIVPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VDIVPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VDIVPD: bad operands")
+}
+
+// VDIVPS: Divide Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VDIVPS xmm xmm xmm
+// VDIVPS m128 xmm xmm
+// VDIVPS ymm ymm ymm
+// VDIVPS m256 ymm ymm
+func VDIVPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VDIVPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VDIVPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VDIVPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VDIVPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VDIVPS: bad operands")
+}
+
+// VDIVSD: Divide Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VDIVSD xmm xmm xmm
+// VDIVSD m64 xmm xmm
+func VDIVSD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VDIVSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VDIVSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VDIVSD: bad operands")
+}
+
+// VDIVSS: Divide Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VDIVSS xmm xmm xmm
+// VDIVSS m32 xmm xmm
+func VDIVSS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VDIVSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VDIVSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VDIVSS: bad operands")
+}
+
+// VDPPD: Dot Product of Packed Double Precision Floating-Point Values.
+//
+// Forms:
+//
+// VDPPD imm8 xmm xmm xmm
+// VDPPD imm8 m128 xmm xmm
+func VDPPD(i, mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VDPPD",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VDPPD",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VDPPD: bad operands")
+}
+
+// VDPPS: Dot Product of Packed Single Precision Floating-Point Values.
+//
+// Forms:
+//
+// VDPPS imm8 xmm xmm xmm
+// VDPPS imm8 m128 xmm xmm
+// VDPPS imm8 ymm ymm ymm
+// VDPPS imm8 m256 ymm ymm
+func VDPPS(i, mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VDPPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VDPPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VDPPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VDPPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VDPPS: bad operands")
+}
+
+// VEXTRACTF128: Extract Packed Floating-Point Values.
+//
+// Forms:
+//
+// VEXTRACTF128 imm8 ymm xmm
+// VEXTRACTF128 imm8 ymm m128
+func VEXTRACTF128(i, y, mx operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsYMM(y) && operand.IsXMM(mx):
+ return &intrep.Instruction{
+ Opcode: "VEXTRACTF128",
+ Operands: []operand.Op{i, y, mx},
+ Inputs: []operand.Op{y},
+ Outputs: []operand.Op{mx},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(y) && operand.IsM128(mx):
+ return &intrep.Instruction{
+ Opcode: "VEXTRACTF128",
+ Operands: []operand.Op{i, y, mx},
+ Inputs: []operand.Op{y},
+ Outputs: []operand.Op{mx},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VEXTRACTF128: bad operands")
+}
+
+// VEXTRACTI128: Extract Packed Integer Values.
+//
+// Forms:
+//
+// VEXTRACTI128 imm8 ymm xmm
+// VEXTRACTI128 imm8 ymm m128
+func VEXTRACTI128(i, y, mx operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsYMM(y) && operand.IsXMM(mx):
+ return &intrep.Instruction{
+ Opcode: "VEXTRACTI128",
+ Operands: []operand.Op{i, y, mx},
+ Inputs: []operand.Op{y},
+ Outputs: []operand.Op{mx},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(y) && operand.IsM128(mx):
+ return &intrep.Instruction{
+ Opcode: "VEXTRACTI128",
+ Operands: []operand.Op{i, y, mx},
+ Inputs: []operand.Op{y},
+ Outputs: []operand.Op{mx},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VEXTRACTI128: bad operands")
+}
+
+// VEXTRACTPS: Extract Packed Single Precision Floating-Point Value.
+//
+// Forms:
+//
+// VEXTRACTPS imm8 xmm r32
+// VEXTRACTPS imm8 xmm m32
+func VEXTRACTPS(i, x, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "VEXTRACTPS",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "VEXTRACTPS",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VEXTRACTPS: bad operands")
+}
+
+// VFMADD132PD: Fused Multiply-Add of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADD132PD xmm xmm xmm
+// VFMADD132PD m128 xmm xmm
+// VFMADD132PD ymm ymm ymm
+// VFMADD132PD m256 ymm ymm
+func VFMADD132PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADD132PD: bad operands")
+}
+
+// VFMADD132PS: Fused Multiply-Add of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADD132PS xmm xmm xmm
+// VFMADD132PS m128 xmm xmm
+// VFMADD132PS ymm ymm ymm
+// VFMADD132PS m256 ymm ymm
+func VFMADD132PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADD132PS: bad operands")
+}
+
+// VFMADD132SD: Fused Multiply-Add of Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADD132SD xmm xmm xmm
+// VFMADD132SD m64 xmm xmm
+func VFMADD132SD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD132SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD132SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADD132SD: bad operands")
+}
+
+// VFMADD132SS: Fused Multiply-Add of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADD132SS xmm xmm xmm
+// VFMADD132SS m32 xmm xmm
+func VFMADD132SS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD132SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD132SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADD132SS: bad operands")
+}
+
+// VFMADD213PD: Fused Multiply-Add of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADD213PD xmm xmm xmm
+// VFMADD213PD m128 xmm xmm
+// VFMADD213PD ymm ymm ymm
+// VFMADD213PD m256 ymm ymm
+func VFMADD213PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADD213PD: bad operands")
+}
+
+// VFMADD213PS: Fused Multiply-Add of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADD213PS xmm xmm xmm
+// VFMADD213PS m128 xmm xmm
+// VFMADD213PS ymm ymm ymm
+// VFMADD213PS m256 ymm ymm
+func VFMADD213PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADD213PS: bad operands")
+}
+
+// VFMADD213SD: Fused Multiply-Add of Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADD213SD xmm xmm xmm
+// VFMADD213SD m64 xmm xmm
+func VFMADD213SD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD213SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD213SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADD213SD: bad operands")
+}
+
+// VFMADD213SS: Fused Multiply-Add of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADD213SS xmm xmm xmm
+// VFMADD213SS m32 xmm xmm
+func VFMADD213SS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD213SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD213SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADD213SS: bad operands")
+}
+
+// VFMADD231PD: Fused Multiply-Add of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADD231PD xmm xmm xmm
+// VFMADD231PD m128 xmm xmm
+// VFMADD231PD ymm ymm ymm
+// VFMADD231PD m256 ymm ymm
+func VFMADD231PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADD231PD: bad operands")
+}
+
+// VFMADD231PS: Fused Multiply-Add of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADD231PS xmm xmm xmm
+// VFMADD231PS m128 xmm xmm
+// VFMADD231PS ymm ymm ymm
+// VFMADD231PS m256 ymm ymm
+func VFMADD231PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADD231PS: bad operands")
+}
+
+// VFMADD231SD: Fused Multiply-Add of Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADD231SD xmm xmm xmm
+// VFMADD231SD m64 xmm xmm
+func VFMADD231SD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD231SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD231SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADD231SD: bad operands")
+}
+
+// VFMADD231SS: Fused Multiply-Add of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADD231SS xmm xmm xmm
+// VFMADD231SS m32 xmm xmm
+func VFMADD231SS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD231SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMADD231SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADD231SS: bad operands")
+}
+
+// VFMADDSUB132PD: Fused Multiply-Alternating Add/Subtract of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADDSUB132PD xmm xmm xmm
+// VFMADDSUB132PD m128 xmm xmm
+// VFMADDSUB132PD ymm ymm ymm
+// VFMADDSUB132PD m256 ymm ymm
+func VFMADDSUB132PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADDSUB132PD: bad operands")
+}
+
+// VFMADDSUB132PS: Fused Multiply-Alternating Add/Subtract of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADDSUB132PS xmm xmm xmm
+// VFMADDSUB132PS m128 xmm xmm
+// VFMADDSUB132PS ymm ymm ymm
+// VFMADDSUB132PS m256 ymm ymm
+func VFMADDSUB132PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADDSUB132PS: bad operands")
+}
+
+// VFMADDSUB213PD: Fused Multiply-Alternating Add/Subtract of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADDSUB213PD xmm xmm xmm
+// VFMADDSUB213PD m128 xmm xmm
+// VFMADDSUB213PD ymm ymm ymm
+// VFMADDSUB213PD m256 ymm ymm
+func VFMADDSUB213PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADDSUB213PD: bad operands")
+}
+
+// VFMADDSUB213PS: Fused Multiply-Alternating Add/Subtract of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADDSUB213PS xmm xmm xmm
+// VFMADDSUB213PS m128 xmm xmm
+// VFMADDSUB213PS ymm ymm ymm
+// VFMADDSUB213PS m256 ymm ymm
+func VFMADDSUB213PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADDSUB213PS: bad operands")
+}
+
+// VFMADDSUB231PD: Fused Multiply-Alternating Add/Subtract of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADDSUB231PD xmm xmm xmm
+// VFMADDSUB231PD m128 xmm xmm
+// VFMADDSUB231PD ymm ymm ymm
+// VFMADDSUB231PD m256 ymm ymm
+func VFMADDSUB231PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADDSUB231PD: bad operands")
+}
+
+// VFMADDSUB231PS: Fused Multiply-Alternating Add/Subtract of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMADDSUB231PS xmm xmm xmm
+// VFMADDSUB231PS m128 xmm xmm
+// VFMADDSUB231PS ymm ymm ymm
+// VFMADDSUB231PS m256 ymm ymm
+func VFMADDSUB231PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMADDSUB231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMADDSUB231PS: bad operands")
+}
+
+// VFMSUB132PD: Fused Multiply-Subtract of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUB132PD xmm xmm xmm
+// VFMSUB132PD m128 xmm xmm
+// VFMSUB132PD ymm ymm ymm
+// VFMSUB132PD m256 ymm ymm
+func VFMSUB132PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUB132PD: bad operands")
+}
+
+// VFMSUB132PS: Fused Multiply-Subtract of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUB132PS xmm xmm xmm
+// VFMSUB132PS m128 xmm xmm
+// VFMSUB132PS ymm ymm ymm
+// VFMSUB132PS m256 ymm ymm
+func VFMSUB132PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUB132PS: bad operands")
+}
+
+// VFMSUB132SD: Fused Multiply-Subtract of Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUB132SD xmm xmm xmm
+// VFMSUB132SD m64 xmm xmm
+func VFMSUB132SD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB132SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB132SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUB132SD: bad operands")
+}
+
+// VFMSUB132SS: Fused Multiply-Subtract of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUB132SS xmm xmm xmm
+// VFMSUB132SS m32 xmm xmm
+func VFMSUB132SS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB132SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB132SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUB132SS: bad operands")
+}
+
+// VFMSUB213PD: Fused Multiply-Subtract of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUB213PD xmm xmm xmm
+// VFMSUB213PD m128 xmm xmm
+// VFMSUB213PD ymm ymm ymm
+// VFMSUB213PD m256 ymm ymm
+func VFMSUB213PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUB213PD: bad operands")
+}
+
+// VFMSUB213PS: Fused Multiply-Subtract of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUB213PS xmm xmm xmm
+// VFMSUB213PS m128 xmm xmm
+// VFMSUB213PS ymm ymm ymm
+// VFMSUB213PS m256 ymm ymm
+func VFMSUB213PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUB213PS: bad operands")
+}
+
+// VFMSUB213SD: Fused Multiply-Subtract of Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUB213SD xmm xmm xmm
+// VFMSUB213SD m64 xmm xmm
+func VFMSUB213SD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB213SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB213SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUB213SD: bad operands")
+}
+
+// VFMSUB213SS: Fused Multiply-Subtract of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUB213SS xmm xmm xmm
+// VFMSUB213SS m32 xmm xmm
+func VFMSUB213SS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB213SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB213SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUB213SS: bad operands")
+}
+
+// VFMSUB231PD: Fused Multiply-Subtract of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUB231PD xmm xmm xmm
+// VFMSUB231PD m128 xmm xmm
+// VFMSUB231PD ymm ymm ymm
+// VFMSUB231PD m256 ymm ymm
+func VFMSUB231PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUB231PD: bad operands")
+}
+
+// VFMSUB231PS: Fused Multiply-Subtract of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUB231PS xmm xmm xmm
+// VFMSUB231PS m128 xmm xmm
+// VFMSUB231PS ymm ymm ymm
+// VFMSUB231PS m256 ymm ymm
+func VFMSUB231PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUB231PS: bad operands")
+}
+
+// VFMSUB231SD: Fused Multiply-Subtract of Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUB231SD xmm xmm xmm
+// VFMSUB231SD m64 xmm xmm
+func VFMSUB231SD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB231SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB231SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUB231SD: bad operands")
+}
+
+// VFMSUB231SS: Fused Multiply-Subtract of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUB231SS xmm xmm xmm
+// VFMSUB231SS m32 xmm xmm
+func VFMSUB231SS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB231SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUB231SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUB231SS: bad operands")
+}
+
+// VFMSUBADD132PD: Fused Multiply-Alternating Subtract/Add of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUBADD132PD xmm xmm xmm
+// VFMSUBADD132PD m128 xmm xmm
+// VFMSUBADD132PD ymm ymm ymm
+// VFMSUBADD132PD m256 ymm ymm
+func VFMSUBADD132PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUBADD132PD: bad operands")
+}
+
+// VFMSUBADD132PS: Fused Multiply-Alternating Subtract/Add of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUBADD132PS xmm xmm xmm
+// VFMSUBADD132PS m128 xmm xmm
+// VFMSUBADD132PS ymm ymm ymm
+// VFMSUBADD132PS m256 ymm ymm
+func VFMSUBADD132PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUBADD132PS: bad operands")
+}
+
+// VFMSUBADD213PD: Fused Multiply-Alternating Subtract/Add of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUBADD213PD xmm xmm xmm
+// VFMSUBADD213PD m128 xmm xmm
+// VFMSUBADD213PD ymm ymm ymm
+// VFMSUBADD213PD m256 ymm ymm
+func VFMSUBADD213PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUBADD213PD: bad operands")
+}
+
+// VFMSUBADD213PS: Fused Multiply-Alternating Subtract/Add of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUBADD213PS xmm xmm xmm
+// VFMSUBADD213PS m128 xmm xmm
+// VFMSUBADD213PS ymm ymm ymm
+// VFMSUBADD213PS m256 ymm ymm
+func VFMSUBADD213PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUBADD213PS: bad operands")
+}
+
+// VFMSUBADD231PD: Fused Multiply-Alternating Subtract/Add of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUBADD231PD xmm xmm xmm
+// VFMSUBADD231PD m128 xmm xmm
+// VFMSUBADD231PD ymm ymm ymm
+// VFMSUBADD231PD m256 ymm ymm
+func VFMSUBADD231PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUBADD231PD: bad operands")
+}
+
+// VFMSUBADD231PS: Fused Multiply-Alternating Subtract/Add of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFMSUBADD231PS xmm xmm xmm
+// VFMSUBADD231PS m128 xmm xmm
+// VFMSUBADD231PS ymm ymm ymm
+// VFMSUBADD231PS m256 ymm ymm
+func VFMSUBADD231PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFMSUBADD231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFMSUBADD231PS: bad operands")
+}
+
+// VFNMADD132PD: Fused Negative Multiply-Add of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMADD132PD xmm xmm xmm
+// VFNMADD132PD m128 xmm xmm
+// VFNMADD132PD ymm ymm ymm
+// VFNMADD132PD m256 ymm ymm
+func VFNMADD132PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMADD132PD: bad operands")
+}
+
+// VFNMADD132PS: Fused Negative Multiply-Add of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMADD132PS xmm xmm xmm
+// VFNMADD132PS m128 xmm xmm
+// VFNMADD132PS ymm ymm ymm
+// VFNMADD132PS m256 ymm ymm
+func VFNMADD132PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMADD132PS: bad operands")
+}
+
+// VFNMADD132SD: Fused Negative Multiply-Add of Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMADD132SD xmm xmm xmm
+// VFNMADD132SD m64 xmm xmm
+func VFNMADD132SD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD132SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD132SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMADD132SD: bad operands")
+}
+
+// VFNMADD132SS: Fused Negative Multiply-Add of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMADD132SS xmm xmm xmm
+// VFNMADD132SS m32 xmm xmm
+func VFNMADD132SS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD132SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD132SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMADD132SS: bad operands")
+}
+
+// VFNMADD213PD: Fused Negative Multiply-Add of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMADD213PD xmm xmm xmm
+// VFNMADD213PD m128 xmm xmm
+// VFNMADD213PD ymm ymm ymm
+// VFNMADD213PD m256 ymm ymm
+func VFNMADD213PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMADD213PD: bad operands")
+}
+
+// VFNMADD213PS: Fused Negative Multiply-Add of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMADD213PS xmm xmm xmm
+// VFNMADD213PS m128 xmm xmm
+// VFNMADD213PS ymm ymm ymm
+// VFNMADD213PS m256 ymm ymm
+func VFNMADD213PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMADD213PS: bad operands")
+}
+
+// VFNMADD213SD: Fused Negative Multiply-Add of Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMADD213SD xmm xmm xmm
+// VFNMADD213SD m64 xmm xmm
+func VFNMADD213SD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD213SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD213SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMADD213SD: bad operands")
+}
+
+// VFNMADD213SS: Fused Negative Multiply-Add of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMADD213SS xmm xmm xmm
+// VFNMADD213SS m32 xmm xmm
+func VFNMADD213SS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD213SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD213SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMADD213SS: bad operands")
+}
+
+// VFNMADD231PD: Fused Negative Multiply-Add of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMADD231PD xmm xmm xmm
+// VFNMADD231PD m128 xmm xmm
+// VFNMADD231PD ymm ymm ymm
+// VFNMADD231PD m256 ymm ymm
+func VFNMADD231PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMADD231PD: bad operands")
+}
+
+// VFNMADD231PS: Fused Negative Multiply-Add of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMADD231PS xmm xmm xmm
+// VFNMADD231PS m128 xmm xmm
+// VFNMADD231PS ymm ymm ymm
+// VFNMADD231PS m256 ymm ymm
+func VFNMADD231PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMADD231PS: bad operands")
+}
+
+// VFNMADD231SD: Fused Negative Multiply-Add of Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMADD231SD xmm xmm xmm
+// VFNMADD231SD m64 xmm xmm
+func VFNMADD231SD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD231SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD231SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMADD231SD: bad operands")
+}
+
+// VFNMADD231SS: Fused Negative Multiply-Add of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMADD231SS xmm xmm xmm
+// VFNMADD231SS m32 xmm xmm
+func VFNMADD231SS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD231SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMADD231SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMADD231SS: bad operands")
+}
+
+// VFNMSUB132PD: Fused Negative Multiply-Subtract of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMSUB132PD xmm xmm xmm
+// VFNMSUB132PD m128 xmm xmm
+// VFNMSUB132PD ymm ymm ymm
+// VFNMSUB132PD m256 ymm ymm
+func VFNMSUB132PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB132PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMSUB132PD: bad operands")
+}
+
+// VFNMSUB132PS: Fused Negative Multiply-Subtract of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMSUB132PS xmm xmm xmm
+// VFNMSUB132PS m128 xmm xmm
+// VFNMSUB132PS ymm ymm ymm
+// VFNMSUB132PS m256 ymm ymm
+func VFNMSUB132PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB132PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMSUB132PS: bad operands")
+}
+
+// VFNMSUB132SD: Fused Negative Multiply-Subtract of Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMSUB132SD xmm xmm xmm
+// VFNMSUB132SD m64 xmm xmm
+func VFNMSUB132SD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB132SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB132SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMSUB132SD: bad operands")
+}
+
+// VFNMSUB132SS: Fused Negative Multiply-Subtract of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMSUB132SS xmm xmm xmm
+// VFNMSUB132SS m32 xmm xmm
+func VFNMSUB132SS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB132SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB132SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMSUB132SS: bad operands")
+}
+
+// VFNMSUB213PD: Fused Negative Multiply-Subtract of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMSUB213PD xmm xmm xmm
+// VFNMSUB213PD m128 xmm xmm
+// VFNMSUB213PD ymm ymm ymm
+// VFNMSUB213PD m256 ymm ymm
+func VFNMSUB213PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB213PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMSUB213PD: bad operands")
+}
+
+// VFNMSUB213PS: Fused Negative Multiply-Subtract of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMSUB213PS xmm xmm xmm
+// VFNMSUB213PS m128 xmm xmm
+// VFNMSUB213PS ymm ymm ymm
+// VFNMSUB213PS m256 ymm ymm
+func VFNMSUB213PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB213PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMSUB213PS: bad operands")
+}
+
+// VFNMSUB213SD: Fused Negative Multiply-Subtract of Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMSUB213SD xmm xmm xmm
+// VFNMSUB213SD m64 xmm xmm
+func VFNMSUB213SD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB213SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB213SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMSUB213SD: bad operands")
+}
+
+// VFNMSUB213SS: Fused Negative Multiply-Subtract of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMSUB213SS xmm xmm xmm
+// VFNMSUB213SS m32 xmm xmm
+func VFNMSUB213SS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB213SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB213SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMSUB213SS: bad operands")
+}
+
+// VFNMSUB231PD: Fused Negative Multiply-Subtract of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMSUB231PD xmm xmm xmm
+// VFNMSUB231PD m128 xmm xmm
+// VFNMSUB231PD ymm ymm ymm
+// VFNMSUB231PD m256 ymm ymm
+func VFNMSUB231PD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB231PD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMSUB231PD: bad operands")
+}
+
+// VFNMSUB231PS: Fused Negative Multiply-Subtract of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMSUB231PS xmm xmm xmm
+// VFNMSUB231PS m128 xmm xmm
+// VFNMSUB231PS ymm ymm ymm
+// VFNMSUB231PS m256 ymm ymm
+func VFNMSUB231PS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB231PS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy, xy1},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMSUB231PS: bad operands")
+}
+
+// VFNMSUB231SD: Fused Negative Multiply-Subtract of Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMSUB231SD xmm xmm xmm
+// VFNMSUB231SD m64 xmm xmm
+func VFNMSUB231SD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB231SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB231SD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMSUB231SD: bad operands")
+}
+
+// VFNMSUB231SS: Fused Negative Multiply-Subtract of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VFNMSUB231SS xmm xmm xmm
+// VFNMSUB231SS m32 xmm xmm
+func VFNMSUB231SS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB231SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VFNMSUB231SS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x, x1},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"FMA3"},
+ }, nil
+ }
+ return nil, errors.New("VFNMSUB231SS: bad operands")
+}
+
+// VGATHERDPD: Gather Packed Double-Precision Floating-Point Values Using Signed Doubleword Indices.
+//
+// Forms:
+//
+// VGATHERDPD xmm vm32x xmm
+// VGATHERDPD ymm vm32x ymm
+func VGATHERDPD(xy, v, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsVM32X(v) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VGATHERDPD",
+ Operands: []operand.Op{xy, v, xy1},
+ Inputs: []operand.Op{xy, v, xy1},
+ Outputs: []operand.Op{xy, xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsVM32X(v) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VGATHERDPD",
+ Operands: []operand.Op{xy, v, xy1},
+ Inputs: []operand.Op{xy, v, xy1},
+ Outputs: []operand.Op{xy, xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VGATHERDPD: bad operands")
+}
+
+// VGATHERDPS: Gather Packed Single-Precision Floating-Point Values Using Signed Doubleword Indices.
+//
+// Forms:
+//
+// VGATHERDPS xmm vm32x xmm
+// VGATHERDPS ymm vm32y ymm
+func VGATHERDPS(xy, v, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsVM32X(v) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VGATHERDPS",
+ Operands: []operand.Op{xy, v, xy1},
+ Inputs: []operand.Op{xy, v, xy1},
+ Outputs: []operand.Op{xy, xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsVM32Y(v) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VGATHERDPS",
+ Operands: []operand.Op{xy, v, xy1},
+ Inputs: []operand.Op{xy, v, xy1},
+ Outputs: []operand.Op{xy, xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VGATHERDPS: bad operands")
+}
+
+// VGATHERQPD: Gather Packed Double-Precision Floating-Point Values Using Signed Quadword Indices.
+//
+// Forms:
+//
+// VGATHERQPD xmm vm64x xmm
+// VGATHERQPD ymm vm64y ymm
+func VGATHERQPD(xy, v, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsVM64X(v) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VGATHERQPD",
+ Operands: []operand.Op{xy, v, xy1},
+ Inputs: []operand.Op{xy, v, xy1},
+ Outputs: []operand.Op{xy, xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsVM64Y(v) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VGATHERQPD",
+ Operands: []operand.Op{xy, v, xy1},
+ Inputs: []operand.Op{xy, v, xy1},
+ Outputs: []operand.Op{xy, xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VGATHERQPD: bad operands")
+}
+
+// VGATHERQPS: Gather Packed Single-Precision Floating-Point Values Using Signed Quadword Indices.
+//
+// Forms:
+//
+// VGATHERQPS xmm vm64x xmm
+// VGATHERQPS xmm vm64y xmm
+func VGATHERQPS(x, v, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsVM64X(v) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VGATHERQPS",
+ Operands: []operand.Op{x, v, x1},
+ Inputs: []operand.Op{x, v, x1},
+ Outputs: []operand.Op{x, x1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(x) && operand.IsVM64Y(v) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VGATHERQPS",
+ Operands: []operand.Op{x, v, x1},
+ Inputs: []operand.Op{x, v, x1},
+ Outputs: []operand.Op{x, x1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VGATHERQPS: bad operands")
+}
+
+// VHADDPD: Packed Double-FP Horizontal Add.
+//
+// Forms:
+//
+// VHADDPD xmm xmm xmm
+// VHADDPD m128 xmm xmm
+// VHADDPD ymm ymm ymm
+// VHADDPD m256 ymm ymm
+func VHADDPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHADDPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHADDPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHADDPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHADDPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VHADDPD: bad operands")
+}
+
+// VHADDPS: Packed Single-FP Horizontal Add.
+//
+// Forms:
+//
+// VHADDPS xmm xmm xmm
+// VHADDPS m128 xmm xmm
+// VHADDPS ymm ymm ymm
+// VHADDPS m256 ymm ymm
+func VHADDPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHADDPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHADDPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHADDPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHADDPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VHADDPS: bad operands")
+}
+
+// VHSUBPD: Packed Double-FP Horizontal Subtract.
+//
+// Forms:
+//
+// VHSUBPD xmm xmm xmm
+// VHSUBPD m128 xmm xmm
+// VHSUBPD ymm ymm ymm
+// VHSUBPD m256 ymm ymm
+func VHSUBPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHSUBPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHSUBPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHSUBPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHSUBPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VHSUBPD: bad operands")
+}
+
+// VHSUBPS: Packed Single-FP Horizontal Subtract.
+//
+// Forms:
+//
+// VHSUBPS xmm xmm xmm
+// VHSUBPS m128 xmm xmm
+// VHSUBPS ymm ymm ymm
+// VHSUBPS m256 ymm ymm
+func VHSUBPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHSUBPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHSUBPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHSUBPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VHSUBPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VHSUBPS: bad operands")
+}
+
+// VINSERTF128: Insert Packed Floating-Point Values.
+//
+// Forms:
+//
+// VINSERTF128 imm8 xmm ymm ymm
+// VINSERTF128 imm8 m128 ymm ymm
+func VINSERTF128(i, mx, y, y1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsYMM(y) && operand.IsYMM(y1):
+ return &intrep.Instruction{
+ Opcode: "VINSERTF128",
+ Operands: []operand.Op{i, mx, y, y1},
+ Inputs: []operand.Op{mx, y},
+ Outputs: []operand.Op{y1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsYMM(y) && operand.IsYMM(y1):
+ return &intrep.Instruction{
+ Opcode: "VINSERTF128",
+ Operands: []operand.Op{i, mx, y, y1},
+ Inputs: []operand.Op{mx, y},
+ Outputs: []operand.Op{y1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VINSERTF128: bad operands")
+}
+
+// VINSERTI128: Insert Packed Integer Values.
+//
+// Forms:
+//
+// VINSERTI128 imm8 xmm ymm ymm
+// VINSERTI128 imm8 m128 ymm ymm
+func VINSERTI128(i, mx, y, y1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsYMM(y) && operand.IsYMM(y1):
+ return &intrep.Instruction{
+ Opcode: "VINSERTI128",
+ Operands: []operand.Op{i, mx, y, y1},
+ Inputs: []operand.Op{mx, y},
+ Outputs: []operand.Op{y1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsYMM(y) && operand.IsYMM(y1):
+ return &intrep.Instruction{
+ Opcode: "VINSERTI128",
+ Operands: []operand.Op{i, mx, y, y1},
+ Inputs: []operand.Op{mx, y},
+ Outputs: []operand.Op{y1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VINSERTI128: bad operands")
+}
+
+// VINSERTPS: Insert Packed Single Precision Floating-Point Value.
+//
+// Forms:
+//
+// VINSERTPS imm8 xmm xmm xmm
+// VINSERTPS imm8 m32 xmm xmm
+func VINSERTPS(i, mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VINSERTPS",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VINSERTPS",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VINSERTPS: bad operands")
+}
+
+// VLDDQU: Load Unaligned Integer 128 Bits.
+//
+// Forms:
+//
+// VLDDQU m128 xmm
+// VLDDQU m256 ymm
+func VLDDQU(m, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM128(m) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VLDDQU",
+ Operands: []operand.Op{m, xy},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(m) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VLDDQU",
+ Operands: []operand.Op{m, xy},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VLDDQU: bad operands")
+}
+
+// VLDMXCSR: Load MXCSR Register.
+//
+// Forms:
+//
+// VLDMXCSR m32
+func VLDMXCSR(m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM32(m):
+ return &intrep.Instruction{
+ Opcode: "VLDMXCSR",
+ Operands: []operand.Op{m},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VLDMXCSR: bad operands")
+}
+
+// VMASKMOVDQU: Store Selected Bytes of Double Quadword.
+//
+// Forms:
+//
+// VMASKMOVDQU xmm xmm
+func VMASKMOVDQU(x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VMASKMOVDQU",
+ Operands: []operand.Op{x, x1},
+ Inputs: []operand.Op{x, x1, reg.RDI},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMASKMOVDQU: bad operands")
+}
+
+// VMASKMOVPD: Conditional Move Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMASKMOVPD m128 xmm xmm
+// VMASKMOVPD m256 ymm ymm
+// VMASKMOVPD xmm xmm m128
+// VMASKMOVPD ymm ymm m256
+func VMASKMOVPD(mxy, xy, mxy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMASKMOVPD",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMASKMOVPD",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsM128(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMASKMOVPD",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsM256(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMASKMOVPD",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMASKMOVPD: bad operands")
+}
+
+// VMASKMOVPS: Conditional Move Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMASKMOVPS m128 xmm xmm
+// VMASKMOVPS m256 ymm ymm
+// VMASKMOVPS xmm xmm m128
+// VMASKMOVPS ymm ymm m256
+func VMASKMOVPS(mxy, xy, mxy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMASKMOVPS",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMASKMOVPS",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsM128(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMASKMOVPS",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsM256(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMASKMOVPS",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMASKMOVPS: bad operands")
+}
+
+// VMAXPD: Return Maximum Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMAXPD xmm xmm xmm
+// VMAXPD m128 xmm xmm
+// VMAXPD ymm ymm ymm
+// VMAXPD m256 ymm ymm
+func VMAXPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMAXPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMAXPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMAXPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMAXPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMAXPD: bad operands")
+}
+
+// VMAXPS: Return Maximum Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMAXPS xmm xmm xmm
+// VMAXPS m128 xmm xmm
+// VMAXPS ymm ymm ymm
+// VMAXPS m256 ymm ymm
+func VMAXPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMAXPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMAXPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMAXPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMAXPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMAXPS: bad operands")
+}
+
+// VMAXSD: Return Maximum Scalar Double-Precision Floating-Point Value.
+//
+// Forms:
+//
+// VMAXSD xmm xmm xmm
+// VMAXSD m64 xmm xmm
+func VMAXSD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VMAXSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VMAXSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMAXSD: bad operands")
+}
+
+// VMAXSS: Return Maximum Scalar Single-Precision Floating-Point Value.
+//
+// Forms:
+//
+// VMAXSS xmm xmm xmm
+// VMAXSS m32 xmm xmm
+func VMAXSS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VMAXSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VMAXSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMAXSS: bad operands")
+}
+
+// VMINPD: Return Minimum Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMINPD xmm xmm xmm
+// VMINPD m128 xmm xmm
+// VMINPD ymm ymm ymm
+// VMINPD m256 ymm ymm
+func VMINPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMINPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMINPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMINPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMINPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMINPD: bad operands")
+}
+
+// VMINPS: Return Minimum Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMINPS xmm xmm xmm
+// VMINPS m128 xmm xmm
+// VMINPS ymm ymm ymm
+// VMINPS m256 ymm ymm
+func VMINPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMINPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMINPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMINPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMINPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMINPS: bad operands")
+}
+
+// VMINSD: Return Minimum Scalar Double-Precision Floating-Point Value.
+//
+// Forms:
+//
+// VMINSD xmm xmm xmm
+// VMINSD m64 xmm xmm
+func VMINSD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VMINSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VMINSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMINSD: bad operands")
+}
+
+// VMINSS: Return Minimum Scalar Single-Precision Floating-Point Value.
+//
+// Forms:
+//
+// VMINSS xmm xmm xmm
+// VMINSS m32 xmm xmm
+func VMINSS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VMINSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VMINSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMINSS: bad operands")
+}
+
+// VMOVAPD: Move Aligned Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMOVAPD xmm xmm
+// VMOVAPD m128 xmm
+// VMOVAPD ymm ymm
+// VMOVAPD m256 ymm
+// VMOVAPD xmm m128
+// VMOVAPD ymm m256
+func VMOVAPD(mxy, mxy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVAPD",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVAPD",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVAPD",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVAPD",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mxy) && operand.IsM128(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVAPD",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsM256(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVAPD",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVAPD: bad operands")
+}
+
+// VMOVAPS: Move Aligned Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMOVAPS xmm xmm
+// VMOVAPS m128 xmm
+// VMOVAPS ymm ymm
+// VMOVAPS m256 ymm
+// VMOVAPS xmm m128
+// VMOVAPS ymm m256
+func VMOVAPS(mxy, mxy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVAPS",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVAPS",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVAPS",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVAPS",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mxy) && operand.IsM128(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVAPS",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsM256(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVAPS",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVAPS: bad operands")
+}
+
+// VMOVD: Move Doubleword.
+//
+// Forms:
+//
+// VMOVD xmm r32
+// VMOVD r32 xmm
+// VMOVD m32 xmm
+// VMOVD xmm m32
+func VMOVD(mrx, mrx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mrx) && operand.IsR32(mrx1):
+ return &intrep.Instruction{
+ Opcode: "VMOVD",
+ Operands: []operand.Op{mrx, mrx1},
+ Inputs: []operand.Op{mrx},
+ Outputs: []operand.Op{mrx1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsR32(mrx) && operand.IsXMM(mrx1):
+ return &intrep.Instruction{
+ Opcode: "VMOVD",
+ Operands: []operand.Op{mrx, mrx1},
+ Inputs: []operand.Op{mrx},
+ Outputs: []operand.Op{mrx1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mrx) && operand.IsXMM(mrx1):
+ return &intrep.Instruction{
+ Opcode: "VMOVD",
+ Operands: []operand.Op{mrx, mrx1},
+ Inputs: []operand.Op{mrx},
+ Outputs: []operand.Op{mrx1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mrx) && operand.IsM32(mrx1):
+ return &intrep.Instruction{
+ Opcode: "VMOVD",
+ Operands: []operand.Op{mrx, mrx1},
+ Inputs: []operand.Op{mrx},
+ Outputs: []operand.Op{mrx1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVD: bad operands")
+}
+
+// VMOVDDUP: Move One Double-FP and Duplicate.
+//
+// Forms:
+//
+// VMOVDDUP xmm xmm
+// VMOVDDUP m64 xmm
+// VMOVDDUP ymm ymm
+// VMOVDDUP m256 ymm
+func VMOVDDUP(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVDDUP",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVDDUP",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVDDUP",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVDDUP",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVDDUP: bad operands")
+}
+
+// VMOVDQA: Move Aligned Double Quadword.
+//
+// Forms:
+//
+// VMOVDQA xmm xmm
+// VMOVDQA m128 xmm
+// VMOVDQA ymm ymm
+// VMOVDQA m256 ymm
+// VMOVDQA xmm m128
+// VMOVDQA ymm m256
+func VMOVDQA(mxy, mxy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVDQA",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVDQA",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVDQA",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVDQA",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mxy) && operand.IsM128(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVDQA",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsM256(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVDQA",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVDQA: bad operands")
+}
+
+// VMOVDQU: Move Unaligned Double Quadword.
+//
+// Forms:
+//
+// VMOVDQU xmm xmm
+// VMOVDQU m128 xmm
+// VMOVDQU ymm ymm
+// VMOVDQU m256 ymm
+// VMOVDQU xmm m128
+// VMOVDQU ymm m256
+func VMOVDQU(mxy, mxy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVDQU",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVDQU",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVDQU",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVDQU",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mxy) && operand.IsM128(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVDQU",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsM256(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVDQU",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVDQU: bad operands")
+}
+
+// VMOVHLPS: Move Packed Single-Precision Floating-Point Values High to Low.
+//
+// Forms:
+//
+// VMOVHLPS xmm xmm xmm
+func VMOVHLPS(x, x1, x2 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsXMM(x1) && operand.IsXMM(x2):
+ return &intrep.Instruction{
+ Opcode: "VMOVHLPS",
+ Operands: []operand.Op{x, x1, x2},
+ Inputs: []operand.Op{x, x1},
+ Outputs: []operand.Op{x2},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVHLPS: bad operands")
+}
+
+// VMOVHPD: Move High Packed Double-Precision Floating-Point Value.
+//
+// Forms:
+//
+// VMOVHPD xmm m64
+// VMOVHPD m64 xmm xmm
+func VMOVHPD(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 2 && operand.IsXMM(ops[0]) && operand.IsM64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "VMOVHPD",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0]},
+ Outputs: []operand.Op{ops[1]},
+ ISA: []string{"AVX"},
+ }, nil
+ case len(ops) == 3 && operand.IsM64(ops[0]) && operand.IsXMM(ops[1]) && operand.IsXMM(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "VMOVHPD",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[2]},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVHPD: bad operands")
+}
+
+// VMOVHPS: Move High Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMOVHPS xmm m64
+// VMOVHPS m64 xmm xmm
+func VMOVHPS(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 2 && operand.IsXMM(ops[0]) && operand.IsM64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "VMOVHPS",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0]},
+ Outputs: []operand.Op{ops[1]},
+ ISA: []string{"AVX"},
+ }, nil
+ case len(ops) == 3 && operand.IsM64(ops[0]) && operand.IsXMM(ops[1]) && operand.IsXMM(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "VMOVHPS",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[2]},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVHPS: bad operands")
+}
+
+// VMOVLHPS: Move Packed Single-Precision Floating-Point Values Low to High.
+//
+// Forms:
+//
+// VMOVLHPS xmm xmm xmm
+func VMOVLHPS(x, x1, x2 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsXMM(x1) && operand.IsXMM(x2):
+ return &intrep.Instruction{
+ Opcode: "VMOVLHPS",
+ Operands: []operand.Op{x, x1, x2},
+ Inputs: []operand.Op{x, x1},
+ Outputs: []operand.Op{x2},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVLHPS: bad operands")
+}
+
+// VMOVLPD: Move Low Packed Double-Precision Floating-Point Value.
+//
+// Forms:
+//
+// VMOVLPD xmm m64
+// VMOVLPD m64 xmm xmm
+func VMOVLPD(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 2 && operand.IsXMM(ops[0]) && operand.IsM64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "VMOVLPD",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0]},
+ Outputs: []operand.Op{ops[1]},
+ ISA: []string{"AVX"},
+ }, nil
+ case len(ops) == 3 && operand.IsM64(ops[0]) && operand.IsXMM(ops[1]) && operand.IsXMM(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "VMOVLPD",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[2]},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVLPD: bad operands")
+}
+
+// VMOVLPS: Move Low Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMOVLPS xmm m64
+// VMOVLPS m64 xmm xmm
+func VMOVLPS(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 2 && operand.IsXMM(ops[0]) && operand.IsM64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "VMOVLPS",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0]},
+ Outputs: []operand.Op{ops[1]},
+ ISA: []string{"AVX"},
+ }, nil
+ case len(ops) == 3 && operand.IsM64(ops[0]) && operand.IsXMM(ops[1]) && operand.IsXMM(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "VMOVLPS",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[2]},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVLPS: bad operands")
+}
+
+// VMOVMSKPD: Extract Packed Double-Precision Floating-Point Sign Mask.
+//
+// Forms:
+//
+// VMOVMSKPD xmm r32
+// VMOVMSKPD ymm r32
+func VMOVMSKPD(xy, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VMOVMSKPD",
+ Operands: []operand.Op{xy, r},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VMOVMSKPD",
+ Operands: []operand.Op{xy, r},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVMSKPD: bad operands")
+}
+
+// VMOVMSKPS: Extract Packed Single-Precision Floating-Point Sign Mask.
+//
+// Forms:
+//
+// VMOVMSKPS xmm r32
+// VMOVMSKPS ymm r32
+func VMOVMSKPS(xy, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VMOVMSKPS",
+ Operands: []operand.Op{xy, r},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VMOVMSKPS",
+ Operands: []operand.Op{xy, r},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVMSKPS: bad operands")
+}
+
+// VMOVNTDQ: Store Double Quadword Using Non-Temporal Hint.
+//
+// Forms:
+//
+// VMOVNTDQ xmm m128
+// VMOVNTDQ ymm m256
+func VMOVNTDQ(xy, m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsM128(m):
+ return &intrep.Instruction{
+ Opcode: "VMOVNTDQ",
+ Operands: []operand.Op{xy, m},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{m},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsM256(m):
+ return &intrep.Instruction{
+ Opcode: "VMOVNTDQ",
+ Operands: []operand.Op{xy, m},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{m},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVNTDQ: bad operands")
+}
+
+// VMOVNTDQA: Load Double Quadword Non-Temporal Aligned Hint.
+//
+// Forms:
+//
+// VMOVNTDQA m128 xmm
+// VMOVNTDQA m256 ymm
+func VMOVNTDQA(m, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM128(m) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVNTDQA",
+ Operands: []operand.Op{m, xy},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(m) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVNTDQA",
+ Operands: []operand.Op{m, xy},
+ Inputs: []operand.Op{m},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VMOVNTDQA: bad operands")
+}
+
+// VMOVNTPD: Store Packed Double-Precision Floating-Point Values Using Non-Temporal Hint.
+//
+// Forms:
+//
+// VMOVNTPD xmm m128
+// VMOVNTPD ymm m256
+func VMOVNTPD(xy, m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsM128(m):
+ return &intrep.Instruction{
+ Opcode: "VMOVNTPD",
+ Operands: []operand.Op{xy, m},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{m},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsM256(m):
+ return &intrep.Instruction{
+ Opcode: "VMOVNTPD",
+ Operands: []operand.Op{xy, m},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{m},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVNTPD: bad operands")
+}
+
+// VMOVNTPS: Store Packed Single-Precision Floating-Point Values Using Non-Temporal Hint.
+//
+// Forms:
+//
+// VMOVNTPS xmm m128
+// VMOVNTPS ymm m256
+func VMOVNTPS(xy, m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsM128(m):
+ return &intrep.Instruction{
+ Opcode: "VMOVNTPS",
+ Operands: []operand.Op{xy, m},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{m},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsM256(m):
+ return &intrep.Instruction{
+ Opcode: "VMOVNTPS",
+ Operands: []operand.Op{xy, m},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{m},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVNTPS: bad operands")
+}
+
+// VMOVQ: Move Quadword.
+//
+// Forms:
+//
+// VMOVQ xmm r64
+// VMOVQ r64 xmm
+// VMOVQ xmm xmm
+// VMOVQ m64 xmm
+// VMOVQ xmm m64
+func VMOVQ(mrx, mrx1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mrx) && operand.IsR64(mrx1):
+ return &intrep.Instruction{
+ Opcode: "VMOVQ",
+ Operands: []operand.Op{mrx, mrx1},
+ Inputs: []operand.Op{mrx},
+ Outputs: []operand.Op{mrx1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsR64(mrx) && operand.IsXMM(mrx1):
+ return &intrep.Instruction{
+ Opcode: "VMOVQ",
+ Operands: []operand.Op{mrx, mrx1},
+ Inputs: []operand.Op{mrx},
+ Outputs: []operand.Op{mrx1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mrx) && operand.IsXMM(mrx1):
+ return &intrep.Instruction{
+ Opcode: "VMOVQ",
+ Operands: []operand.Op{mrx, mrx1},
+ Inputs: []operand.Op{mrx},
+ Outputs: []operand.Op{mrx1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mrx) && operand.IsXMM(mrx1):
+ return &intrep.Instruction{
+ Opcode: "VMOVQ",
+ Operands: []operand.Op{mrx, mrx1},
+ Inputs: []operand.Op{mrx},
+ Outputs: []operand.Op{mrx1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mrx) && operand.IsM64(mrx1):
+ return &intrep.Instruction{
+ Opcode: "VMOVQ",
+ Operands: []operand.Op{mrx, mrx1},
+ Inputs: []operand.Op{mrx},
+ Outputs: []operand.Op{mrx1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVQ: bad operands")
+}
+
+// VMOVSD: Move Scalar Double-Precision Floating-Point Value.
+//
+// Forms:
+//
+// VMOVSD m64 xmm
+// VMOVSD xmm m64
+// VMOVSD xmm xmm xmm
+func VMOVSD(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 2 && operand.IsM64(ops[0]) && operand.IsXMM(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "VMOVSD",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0]},
+ Outputs: []operand.Op{ops[1]},
+ ISA: []string{"AVX"},
+ }, nil
+ case len(ops) == 2 && operand.IsXMM(ops[0]) && operand.IsM64(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "VMOVSD",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0]},
+ Outputs: []operand.Op{ops[1]},
+ ISA: []string{"AVX"},
+ }, nil
+ case len(ops) == 3 && operand.IsXMM(ops[0]) && operand.IsXMM(ops[1]) && operand.IsXMM(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "VMOVSD",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[2]},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVSD: bad operands")
+}
+
+// VMOVSHDUP: Move Packed Single-FP High and Duplicate.
+//
+// Forms:
+//
+// VMOVSHDUP xmm xmm
+// VMOVSHDUP m128 xmm
+// VMOVSHDUP ymm ymm
+// VMOVSHDUP m256 ymm
+func VMOVSHDUP(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVSHDUP",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVSHDUP",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVSHDUP",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVSHDUP",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVSHDUP: bad operands")
+}
+
+// VMOVSLDUP: Move Packed Single-FP Low and Duplicate.
+//
+// Forms:
+//
+// VMOVSLDUP xmm xmm
+// VMOVSLDUP m128 xmm
+// VMOVSLDUP ymm ymm
+// VMOVSLDUP m256 ymm
+func VMOVSLDUP(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVSLDUP",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVSLDUP",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVSLDUP",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VMOVSLDUP",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVSLDUP: bad operands")
+}
+
+// VMOVSS: Move Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMOVSS m32 xmm
+// VMOVSS xmm m32
+// VMOVSS xmm xmm xmm
+func VMOVSS(ops ...operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case len(ops) == 2 && operand.IsM32(ops[0]) && operand.IsXMM(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "VMOVSS",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0]},
+ Outputs: []operand.Op{ops[1]},
+ ISA: []string{"AVX"},
+ }, nil
+ case len(ops) == 2 && operand.IsXMM(ops[0]) && operand.IsM32(ops[1]):
+ return &intrep.Instruction{
+ Opcode: "VMOVSS",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0]},
+ Outputs: []operand.Op{ops[1]},
+ ISA: []string{"AVX"},
+ }, nil
+ case len(ops) == 3 && operand.IsXMM(ops[0]) && operand.IsXMM(ops[1]) && operand.IsXMM(ops[2]):
+ return &intrep.Instruction{
+ Opcode: "VMOVSS",
+ Operands: ops,
+ Inputs: []operand.Op{ops[0], ops[1]},
+ Outputs: []operand.Op{ops[2]},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVSS: bad operands")
+}
+
+// VMOVUPD: Move Unaligned Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMOVUPD xmm xmm
+// VMOVUPD m128 xmm
+// VMOVUPD ymm ymm
+// VMOVUPD m256 ymm
+// VMOVUPD xmm m128
+// VMOVUPD ymm m256
+func VMOVUPD(mxy, mxy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVUPD",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVUPD",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVUPD",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVUPD",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mxy) && operand.IsM128(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVUPD",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsM256(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVUPD",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVUPD: bad operands")
+}
+
+// VMOVUPS: Move Unaligned Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMOVUPS xmm xmm
+// VMOVUPS m128 xmm
+// VMOVUPS ymm ymm
+// VMOVUPS m256 ymm
+// VMOVUPS xmm m128
+// VMOVUPS ymm m256
+func VMOVUPS(mxy, mxy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVUPS",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVUPS",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVUPS",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVUPS",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mxy) && operand.IsM128(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVUPS",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsM256(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VMOVUPS",
+ Operands: []operand.Op{mxy, mxy1},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMOVUPS: bad operands")
+}
+
+// VMPSADBW: Compute Multiple Packed Sums of Absolute Difference.
+//
+// Forms:
+//
+// VMPSADBW imm8 xmm xmm xmm
+// VMPSADBW imm8 m128 xmm xmm
+// VMPSADBW imm8 ymm ymm ymm
+// VMPSADBW imm8 m256 ymm ymm
+func VMPSADBW(i, mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMPSADBW",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMPSADBW",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMPSADBW",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMPSADBW",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VMPSADBW: bad operands")
+}
+
+// VMULPD: Multiply Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMULPD xmm xmm xmm
+// VMULPD m128 xmm xmm
+// VMULPD ymm ymm ymm
+// VMULPD m256 ymm ymm
+func VMULPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMULPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMULPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMULPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMULPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMULPD: bad operands")
+}
+
+// VMULPS: Multiply Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMULPS xmm xmm xmm
+// VMULPS m128 xmm xmm
+// VMULPS ymm ymm ymm
+// VMULPS m256 ymm ymm
+func VMULPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMULPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMULPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMULPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VMULPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMULPS: bad operands")
+}
+
+// VMULSD: Multiply Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMULSD xmm xmm xmm
+// VMULSD m64 xmm xmm
+func VMULSD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VMULSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VMULSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMULSD: bad operands")
+}
+
+// VMULSS: Multiply Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VMULSS xmm xmm xmm
+// VMULSS m32 xmm xmm
+func VMULSS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VMULSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VMULSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VMULSS: bad operands")
+}
+
+// VORPD: Bitwise Logical OR of Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VORPD xmm xmm xmm
+// VORPD m128 xmm xmm
+// VORPD ymm ymm ymm
+// VORPD m256 ymm ymm
+func VORPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VORPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VORPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VORPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VORPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VORPD: bad operands")
+}
+
+// VORPS: Bitwise Logical OR of Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VORPS xmm xmm xmm
+// VORPS m128 xmm xmm
+// VORPS ymm ymm ymm
+// VORPS m256 ymm ymm
+func VORPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VORPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VORPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VORPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VORPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VORPS: bad operands")
+}
+
+// VPABSB: Packed Absolute Value of Byte Integers.
+//
+// Forms:
+//
+// VPABSB xmm xmm
+// VPABSB m128 xmm
+// VPABSB ymm ymm
+// VPABSB m256 ymm
+func VPABSB(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPABSB",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPABSB",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPABSB",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPABSB",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPABSB: bad operands")
+}
+
+// VPABSD: Packed Absolute Value of Doubleword Integers.
+//
+// Forms:
+//
+// VPABSD xmm xmm
+// VPABSD m128 xmm
+// VPABSD ymm ymm
+// VPABSD m256 ymm
+func VPABSD(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPABSD",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPABSD",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPABSD",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPABSD",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPABSD: bad operands")
+}
+
+// VPABSW: Packed Absolute Value of Word Integers.
+//
+// Forms:
+//
+// VPABSW xmm xmm
+// VPABSW m128 xmm
+// VPABSW ymm ymm
+// VPABSW m256 ymm
+func VPABSW(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPABSW",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPABSW",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPABSW",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPABSW",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPABSW: bad operands")
+}
+
+// VPACKSSDW: Pack Doublewords into Words with Signed Saturation.
+//
+// Forms:
+//
+// VPACKSSDW xmm xmm xmm
+// VPACKSSDW m128 xmm xmm
+// VPACKSSDW ymm ymm ymm
+// VPACKSSDW m256 ymm ymm
+func VPACKSSDW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKSSDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKSSDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKSSDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKSSDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPACKSSDW: bad operands")
+}
+
+// VPACKSSWB: Pack Words into Bytes with Signed Saturation.
+//
+// Forms:
+//
+// VPACKSSWB xmm xmm xmm
+// VPACKSSWB m128 xmm xmm
+// VPACKSSWB ymm ymm ymm
+// VPACKSSWB m256 ymm ymm
+func VPACKSSWB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKSSWB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKSSWB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKSSWB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKSSWB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPACKSSWB: bad operands")
+}
+
+// VPACKUSDW: Pack Doublewords into Words with Unsigned Saturation.
+//
+// Forms:
+//
+// VPACKUSDW xmm xmm xmm
+// VPACKUSDW m128 xmm xmm
+// VPACKUSDW ymm ymm ymm
+// VPACKUSDW m256 ymm ymm
+func VPACKUSDW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKUSDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKUSDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKUSDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKUSDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPACKUSDW: bad operands")
+}
+
+// VPACKUSWB: Pack Words into Bytes with Unsigned Saturation.
+//
+// Forms:
+//
+// VPACKUSWB xmm xmm xmm
+// VPACKUSWB m128 xmm xmm
+// VPACKUSWB ymm ymm ymm
+// VPACKUSWB m256 ymm ymm
+func VPACKUSWB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKUSWB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKUSWB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKUSWB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPACKUSWB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPACKUSWB: bad operands")
+}
+
+// VPADDB: Add Packed Byte Integers.
+//
+// Forms:
+//
+// VPADDB xmm xmm xmm
+// VPADDB m128 xmm xmm
+// VPADDB ymm ymm ymm
+// VPADDB m256 ymm ymm
+func VPADDB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPADDB: bad operands")
+}
+
+// VPADDD: Add Packed Doubleword Integers.
+//
+// Forms:
+//
+// VPADDD xmm xmm xmm
+// VPADDD m128 xmm xmm
+// VPADDD ymm ymm ymm
+// VPADDD m256 ymm ymm
+func VPADDD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPADDD: bad operands")
+}
+
+// VPADDQ: Add Packed Quadword Integers.
+//
+// Forms:
+//
+// VPADDQ xmm xmm xmm
+// VPADDQ m128 xmm xmm
+// VPADDQ ymm ymm ymm
+// VPADDQ m256 ymm ymm
+func VPADDQ(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPADDQ: bad operands")
+}
+
+// VPADDSB: Add Packed Signed Byte Integers with Signed Saturation.
+//
+// Forms:
+//
+// VPADDSB xmm xmm xmm
+// VPADDSB m128 xmm xmm
+// VPADDSB ymm ymm ymm
+// VPADDSB m256 ymm ymm
+func VPADDSB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPADDSB: bad operands")
+}
+
+// VPADDSW: Add Packed Signed Word Integers with Signed Saturation.
+//
+// Forms:
+//
+// VPADDSW xmm xmm xmm
+// VPADDSW m128 xmm xmm
+// VPADDSW ymm ymm ymm
+// VPADDSW m256 ymm ymm
+func VPADDSW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPADDSW: bad operands")
+}
+
+// VPADDUSB: Add Packed Unsigned Byte Integers with Unsigned Saturation.
+//
+// Forms:
+//
+// VPADDUSB xmm xmm xmm
+// VPADDUSB m128 xmm xmm
+// VPADDUSB ymm ymm ymm
+// VPADDUSB m256 ymm ymm
+func VPADDUSB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDUSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDUSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDUSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDUSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPADDUSB: bad operands")
+}
+
+// VPADDUSW: Add Packed Unsigned Word Integers with Unsigned Saturation.
+//
+// Forms:
+//
+// VPADDUSW xmm xmm xmm
+// VPADDUSW m128 xmm xmm
+// VPADDUSW ymm ymm ymm
+// VPADDUSW m256 ymm ymm
+func VPADDUSW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDUSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDUSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDUSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDUSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPADDUSW: bad operands")
+}
+
+// VPADDW: Add Packed Word Integers.
+//
+// Forms:
+//
+// VPADDW xmm xmm xmm
+// VPADDW m128 xmm xmm
+// VPADDW ymm ymm ymm
+// VPADDW m256 ymm ymm
+func VPADDW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPADDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPADDW: bad operands")
+}
+
+// VPALIGNR: Packed Align Right.
+//
+// Forms:
+//
+// VPALIGNR imm8 xmm xmm xmm
+// VPALIGNR imm8 m128 xmm xmm
+// VPALIGNR imm8 ymm ymm ymm
+// VPALIGNR imm8 m256 ymm ymm
+func VPALIGNR(i, mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPALIGNR",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPALIGNR",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPALIGNR",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPALIGNR",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPALIGNR: bad operands")
+}
+
+// VPAND: Packed Bitwise Logical AND.
+//
+// Forms:
+//
+// VPAND xmm xmm xmm
+// VPAND m128 xmm xmm
+// VPAND ymm ymm ymm
+// VPAND m256 ymm ymm
+func VPAND(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPAND",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPAND",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPAND",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPAND",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPAND: bad operands")
+}
+
+// VPANDN: Packed Bitwise Logical AND NOT.
+//
+// Forms:
+//
+// VPANDN xmm xmm xmm
+// VPANDN m128 xmm xmm
+// VPANDN ymm ymm ymm
+// VPANDN m256 ymm ymm
+func VPANDN(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPANDN",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPANDN",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPANDN",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPANDN",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPANDN: bad operands")
+}
+
+// VPAVGB: Average Packed Byte Integers.
+//
+// Forms:
+//
+// VPAVGB xmm xmm xmm
+// VPAVGB m128 xmm xmm
+// VPAVGB ymm ymm ymm
+// VPAVGB m256 ymm ymm
+func VPAVGB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPAVGB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPAVGB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPAVGB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPAVGB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPAVGB: bad operands")
+}
+
+// VPAVGW: Average Packed Word Integers.
+//
+// Forms:
+//
+// VPAVGW xmm xmm xmm
+// VPAVGW m128 xmm xmm
+// VPAVGW ymm ymm ymm
+// VPAVGW m256 ymm ymm
+func VPAVGW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPAVGW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPAVGW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPAVGW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPAVGW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPAVGW: bad operands")
+}
+
+// VPBLENDD: Blend Packed Doublewords.
+//
+// Forms:
+//
+// VPBLENDD imm8 xmm xmm xmm
+// VPBLENDD imm8 m128 xmm xmm
+// VPBLENDD imm8 ymm ymm ymm
+// VPBLENDD imm8 m256 ymm ymm
+func VPBLENDD(i, mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPBLENDD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPBLENDD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPBLENDD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPBLENDD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPBLENDD: bad operands")
+}
+
+// VPBLENDVB: Variable Blend Packed Bytes.
+//
+// Forms:
+//
+// VPBLENDVB xmm xmm xmm xmm
+// VPBLENDVB xmm m128 xmm xmm
+// VPBLENDVB ymm ymm ymm ymm
+// VPBLENDVB ymm m256 ymm ymm
+func VPBLENDVB(xy, mxy, xy1, xy2 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsXMM(mxy) && operand.IsXMM(xy1) && operand.IsXMM(xy2):
+ return &intrep.Instruction{
+ Opcode: "VPBLENDVB",
+ Operands: []operand.Op{xy, mxy, xy1, xy2},
+ Inputs: []operand.Op{xy, mxy, xy1},
+ Outputs: []operand.Op{xy2},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(xy) && operand.IsM128(mxy) && operand.IsXMM(xy1) && operand.IsXMM(xy2):
+ return &intrep.Instruction{
+ Opcode: "VPBLENDVB",
+ Operands: []operand.Op{xy, mxy, xy1, xy2},
+ Inputs: []operand.Op{xy, mxy, xy1},
+ Outputs: []operand.Op{xy2},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsYMM(mxy) && operand.IsYMM(xy1) && operand.IsYMM(xy2):
+ return &intrep.Instruction{
+ Opcode: "VPBLENDVB",
+ Operands: []operand.Op{xy, mxy, xy1, xy2},
+ Inputs: []operand.Op{xy, mxy, xy1},
+ Outputs: []operand.Op{xy2},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsM256(mxy) && operand.IsYMM(xy1) && operand.IsYMM(xy2):
+ return &intrep.Instruction{
+ Opcode: "VPBLENDVB",
+ Operands: []operand.Op{xy, mxy, xy1, xy2},
+ Inputs: []operand.Op{xy, mxy, xy1},
+ Outputs: []operand.Op{xy2},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPBLENDVB: bad operands")
+}
+
+// VPBLENDW: Blend Packed Words.
+//
+// Forms:
+//
+// VPBLENDW imm8 xmm xmm xmm
+// VPBLENDW imm8 m128 xmm xmm
+// VPBLENDW imm8 ymm ymm ymm
+// VPBLENDW imm8 m256 ymm ymm
+func VPBLENDW(i, mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPBLENDW",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPBLENDW",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPBLENDW",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPBLENDW",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPBLENDW: bad operands")
+}
+
+// VPBROADCASTB: Broadcast Byte Integer.
+//
+// Forms:
+//
+// VPBROADCASTB xmm xmm
+// VPBROADCASTB m8 xmm
+// VPBROADCASTB xmm ymm
+// VPBROADCASTB m8 ymm
+func VPBROADCASTB(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTB",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM8(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTB",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTB",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM8(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTB",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPBROADCASTB: bad operands")
+}
+
+// VPBROADCASTD: Broadcast Doubleword Integer.
+//
+// Forms:
+//
+// VPBROADCASTD xmm xmm
+// VPBROADCASTD m32 xmm
+// VPBROADCASTD xmm ymm
+// VPBROADCASTD m32 ymm
+func VPBROADCASTD(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPBROADCASTD: bad operands")
+}
+
+// VPBROADCASTQ: Broadcast Quadword Integer.
+//
+// Forms:
+//
+// VPBROADCASTQ xmm xmm
+// VPBROADCASTQ m64 xmm
+// VPBROADCASTQ xmm ymm
+// VPBROADCASTQ m64 ymm
+func VPBROADCASTQ(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPBROADCASTQ: bad operands")
+}
+
+// VPBROADCASTW: Broadcast Word Integer.
+//
+// Forms:
+//
+// VPBROADCASTW xmm xmm
+// VPBROADCASTW m16 xmm
+// VPBROADCASTW xmm ymm
+// VPBROADCASTW m16 ymm
+func VPBROADCASTW(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTW",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM16(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTW",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTW",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM16(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPBROADCASTW",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPBROADCASTW: bad operands")
+}
+
+// VPCLMULQDQ: Carry-Less Quadword Multiplication.
+//
+// Forms:
+//
+// VPCLMULQDQ imm8 xmm xmm xmm
+// VPCLMULQDQ imm8 m128 xmm xmm
+func VPCLMULQDQ(i, mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VPCLMULQDQ",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX", "PCLMULQDQ"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VPCLMULQDQ",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX", "PCLMULQDQ"},
+ }, nil
+ }
+ return nil, errors.New("VPCLMULQDQ: bad operands")
+}
+
+// VPCMPEQB: Compare Packed Byte Data for Equality.
+//
+// Forms:
+//
+// VPCMPEQB xmm xmm xmm
+// VPCMPEQB m128 xmm xmm
+// VPCMPEQB ymm ymm ymm
+// VPCMPEQB m256 ymm ymm
+func VPCMPEQB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPCMPEQB: bad operands")
+}
+
+// VPCMPEQD: Compare Packed Doubleword Data for Equality.
+//
+// Forms:
+//
+// VPCMPEQD xmm xmm xmm
+// VPCMPEQD m128 xmm xmm
+// VPCMPEQD ymm ymm ymm
+// VPCMPEQD m256 ymm ymm
+func VPCMPEQD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPCMPEQD: bad operands")
+}
+
+// VPCMPEQQ: Compare Packed Quadword Data for Equality.
+//
+// Forms:
+//
+// VPCMPEQQ xmm xmm xmm
+// VPCMPEQQ m128 xmm xmm
+// VPCMPEQQ ymm ymm ymm
+// VPCMPEQQ m256 ymm ymm
+func VPCMPEQQ(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPCMPEQQ: bad operands")
+}
+
+// VPCMPEQW: Compare Packed Word Data for Equality.
+//
+// Forms:
+//
+// VPCMPEQW xmm xmm xmm
+// VPCMPEQW m128 xmm xmm
+// VPCMPEQW ymm ymm ymm
+// VPCMPEQW m256 ymm ymm
+func VPCMPEQW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPEQW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPCMPEQW: bad operands")
+}
+
+// VPCMPESTRI: Packed Compare Explicit Length Strings, Return Index.
+//
+// Forms:
+//
+// VPCMPESTRI imm8 xmm xmm
+// VPCMPESTRI imm8 m128 xmm
+func VPCMPESTRI(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VPCMPESTRI",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x, reg.EAX, reg.EDX},
+ Outputs: []operand.Op{reg.ECX},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VPCMPESTRI",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x, reg.EAX, reg.EDX},
+ Outputs: []operand.Op{reg.ECX},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPCMPESTRI: bad operands")
+}
+
+// VPCMPESTRM: Packed Compare Explicit Length Strings, Return Mask.
+//
+// Forms:
+//
+// VPCMPESTRM imm8 xmm xmm
+// VPCMPESTRM imm8 m128 xmm
+func VPCMPESTRM(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VPCMPESTRM",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x, reg.EAX, reg.EDX},
+ Outputs: []operand.Op{reg.X0},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VPCMPESTRM",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x, reg.EAX, reg.EDX},
+ Outputs: []operand.Op{reg.X0},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPCMPESTRM: bad operands")
+}
+
+// VPCMPGTB: Compare Packed Signed Byte Integers for Greater Than.
+//
+// Forms:
+//
+// VPCMPGTB xmm xmm xmm
+// VPCMPGTB m128 xmm xmm
+// VPCMPGTB ymm ymm ymm
+// VPCMPGTB m256 ymm ymm
+func VPCMPGTB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPCMPGTB: bad operands")
+}
+
+// VPCMPGTD: Compare Packed Signed Doubleword Integers for Greater Than.
+//
+// Forms:
+//
+// VPCMPGTD xmm xmm xmm
+// VPCMPGTD m128 xmm xmm
+// VPCMPGTD ymm ymm ymm
+// VPCMPGTD m256 ymm ymm
+func VPCMPGTD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPCMPGTD: bad operands")
+}
+
+// VPCMPGTQ: Compare Packed Data for Greater Than.
+//
+// Forms:
+//
+// VPCMPGTQ xmm xmm xmm
+// VPCMPGTQ m128 xmm xmm
+// VPCMPGTQ ymm ymm ymm
+// VPCMPGTQ m256 ymm ymm
+func VPCMPGTQ(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPCMPGTQ: bad operands")
+}
+
+// VPCMPGTW: Compare Packed Signed Word Integers for Greater Than.
+//
+// Forms:
+//
+// VPCMPGTW xmm xmm xmm
+// VPCMPGTW m128 xmm xmm
+// VPCMPGTW ymm ymm ymm
+// VPCMPGTW m256 ymm ymm
+func VPCMPGTW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPCMPGTW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPCMPGTW: bad operands")
+}
+
+// VPCMPISTRI: Packed Compare Implicit Length Strings, Return Index.
+//
+// Forms:
+//
+// VPCMPISTRI imm8 xmm xmm
+// VPCMPISTRI imm8 m128 xmm
+func VPCMPISTRI(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VPCMPISTRI",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{reg.ECX},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VPCMPISTRI",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{reg.ECX},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPCMPISTRI: bad operands")
+}
+
+// VPCMPISTRM: Packed Compare Implicit Length Strings, Return Mask.
+//
+// Forms:
+//
+// VPCMPISTRM imm8 xmm xmm
+// VPCMPISTRM imm8 m128 xmm
+func VPCMPISTRM(i, mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VPCMPISTRM",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{reg.X0},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VPCMPISTRM",
+ Operands: []operand.Op{i, mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{reg.X0},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPCMPISTRM: bad operands")
+}
+
+// VPERM2F128: Permute Floating-Point Values.
+//
+// Forms:
+//
+// VPERM2F128 imm8 ymm ymm ymm
+// VPERM2F128 imm8 m256 ymm ymm
+func VPERM2F128(i, my, y, y1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsYMM(my) && operand.IsYMM(y) && operand.IsYMM(y1):
+ return &intrep.Instruction{
+ Opcode: "VPERM2F128",
+ Operands: []operand.Op{i, my, y, y1},
+ Inputs: []operand.Op{my, y},
+ Outputs: []operand.Op{y1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(my) && operand.IsYMM(y) && operand.IsYMM(y1):
+ return &intrep.Instruction{
+ Opcode: "VPERM2F128",
+ Operands: []operand.Op{i, my, y, y1},
+ Inputs: []operand.Op{my, y},
+ Outputs: []operand.Op{y1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPERM2F128: bad operands")
+}
+
+// VPERM2I128: Permute 128-Bit Integer Values.
+//
+// Forms:
+//
+// VPERM2I128 imm8 ymm ymm ymm
+// VPERM2I128 imm8 m256 ymm ymm
+func VPERM2I128(i, my, y, y1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsYMM(my) && operand.IsYMM(y) && operand.IsYMM(y1):
+ return &intrep.Instruction{
+ Opcode: "VPERM2I128",
+ Operands: []operand.Op{i, my, y, y1},
+ Inputs: []operand.Op{my, y},
+ Outputs: []operand.Op{y1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(my) && operand.IsYMM(y) && operand.IsYMM(y1):
+ return &intrep.Instruction{
+ Opcode: "VPERM2I128",
+ Operands: []operand.Op{i, my, y, y1},
+ Inputs: []operand.Op{my, y},
+ Outputs: []operand.Op{y1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPERM2I128: bad operands")
+}
+
+// VPERMD: Permute Doubleword Integers.
+//
+// Forms:
+//
+// VPERMD ymm ymm ymm
+// VPERMD m256 ymm ymm
+func VPERMD(my, y, y1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsYMM(my) && operand.IsYMM(y) && operand.IsYMM(y1):
+ return &intrep.Instruction{
+ Opcode: "VPERMD",
+ Operands: []operand.Op{my, y, y1},
+ Inputs: []operand.Op{my, y},
+ Outputs: []operand.Op{y1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(my) && operand.IsYMM(y) && operand.IsYMM(y1):
+ return &intrep.Instruction{
+ Opcode: "VPERMD",
+ Operands: []operand.Op{my, y, y1},
+ Inputs: []operand.Op{my, y},
+ Outputs: []operand.Op{y1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPERMD: bad operands")
+}
+
+// VPERMILPD: Permute Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VPERMILPD imm8 xmm xmm
+// VPERMILPD xmm xmm xmm
+// VPERMILPD m128 xmm xmm
+// VPERMILPD imm8 m128 xmm
+// VPERMILPD imm8 ymm ymm
+// VPERMILPD ymm ymm ymm
+// VPERMILPD m256 ymm ymm
+// VPERMILPD imm8 m256 ymm
+func VPERMILPD(imxy, mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imxy) && operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPD",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(imxy) && operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPD",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{imxy, mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(imxy) && operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPD",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{imxy, mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imxy) && operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPD",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imxy) && operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPD",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(imxy) && operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPD",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{imxy, mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(imxy) && operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPD",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{imxy, mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imxy) && operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPD",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPERMILPD: bad operands")
+}
+
+// VPERMILPS: Permute Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VPERMILPS imm8 xmm xmm
+// VPERMILPS xmm xmm xmm
+// VPERMILPS m128 xmm xmm
+// VPERMILPS imm8 m128 xmm
+// VPERMILPS imm8 ymm ymm
+// VPERMILPS ymm ymm ymm
+// VPERMILPS m256 ymm ymm
+// VPERMILPS imm8 m256 ymm
+func VPERMILPS(imxy, mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imxy) && operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPS",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(imxy) && operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPS",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{imxy, mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(imxy) && operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPS",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{imxy, mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imxy) && operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPS",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imxy) && operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPS",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(imxy) && operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPS",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{imxy, mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(imxy) && operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPS",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{imxy, mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imxy) && operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPERMILPS",
+ Operands: []operand.Op{imxy, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPERMILPS: bad operands")
+}
+
+// VPERMPD: Permute Double-Precision Floating-Point Elements.
+//
+// Forms:
+//
+// VPERMPD imm8 ymm ymm
+// VPERMPD imm8 m256 ymm
+func VPERMPD(i, my, y operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsYMM(my) && operand.IsYMM(y):
+ return &intrep.Instruction{
+ Opcode: "VPERMPD",
+ Operands: []operand.Op{i, my, y},
+ Inputs: []operand.Op{my},
+ Outputs: []operand.Op{y},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(my) && operand.IsYMM(y):
+ return &intrep.Instruction{
+ Opcode: "VPERMPD",
+ Operands: []operand.Op{i, my, y},
+ Inputs: []operand.Op{my},
+ Outputs: []operand.Op{y},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPERMPD: bad operands")
+}
+
+// VPERMPS: Permute Single-Precision Floating-Point Elements.
+//
+// Forms:
+//
+// VPERMPS ymm ymm ymm
+// VPERMPS m256 ymm ymm
+func VPERMPS(my, y, y1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsYMM(my) && operand.IsYMM(y) && operand.IsYMM(y1):
+ return &intrep.Instruction{
+ Opcode: "VPERMPS",
+ Operands: []operand.Op{my, y, y1},
+ Inputs: []operand.Op{my, y},
+ Outputs: []operand.Op{y1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(my) && operand.IsYMM(y) && operand.IsYMM(y1):
+ return &intrep.Instruction{
+ Opcode: "VPERMPS",
+ Operands: []operand.Op{my, y, y1},
+ Inputs: []operand.Op{my, y},
+ Outputs: []operand.Op{y1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPERMPS: bad operands")
+}
+
+// VPERMQ: Permute Quadword Integers.
+//
+// Forms:
+//
+// VPERMQ imm8 ymm ymm
+// VPERMQ imm8 m256 ymm
+func VPERMQ(i, my, y operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsYMM(my) && operand.IsYMM(y):
+ return &intrep.Instruction{
+ Opcode: "VPERMQ",
+ Operands: []operand.Op{i, my, y},
+ Inputs: []operand.Op{my},
+ Outputs: []operand.Op{y},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(my) && operand.IsYMM(y):
+ return &intrep.Instruction{
+ Opcode: "VPERMQ",
+ Operands: []operand.Op{i, my, y},
+ Inputs: []operand.Op{my},
+ Outputs: []operand.Op{y},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPERMQ: bad operands")
+}
+
+// VPEXTRB: Extract Byte.
+//
+// Forms:
+//
+// VPEXTRB imm8 xmm r32
+// VPEXTRB imm8 xmm m8
+func VPEXTRB(i, x, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "VPEXTRB",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "VPEXTRB",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPEXTRB: bad operands")
+}
+
+// VPEXTRD: Extract Doubleword.
+//
+// Forms:
+//
+// VPEXTRD imm8 xmm r32
+// VPEXTRD imm8 xmm m32
+func VPEXTRD(i, x, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "VPEXTRD",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "VPEXTRD",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPEXTRD: bad operands")
+}
+
+// VPEXTRQ: Extract Quadword.
+//
+// Forms:
+//
+// VPEXTRQ imm8 xmm r64
+// VPEXTRQ imm8 xmm m64
+func VPEXTRQ(i, x, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "VPEXTRQ",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "VPEXTRQ",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPEXTRQ: bad operands")
+}
+
+// VPEXTRW: Extract Word.
+//
+// Forms:
+//
+// VPEXTRW imm8 xmm r32
+// VPEXTRW imm8 xmm m16
+func VPEXTRW(i, x, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "VPEXTRW",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsXMM(x) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "VPEXTRW",
+ Operands: []operand.Op{i, x, mr},
+ Inputs: []operand.Op{x},
+ Outputs: []operand.Op{mr},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPEXTRW: bad operands")
+}
+
+// VPGATHERDD: Gather Packed Doubleword Values Using Signed Doubleword Indices.
+//
+// Forms:
+//
+// VPGATHERDD xmm vm32x xmm
+// VPGATHERDD ymm vm32y ymm
+func VPGATHERDD(xy, v, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsVM32X(v) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPGATHERDD",
+ Operands: []operand.Op{xy, v, xy1},
+ Inputs: []operand.Op{xy, v, xy1},
+ Outputs: []operand.Op{xy, xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsVM32Y(v) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPGATHERDD",
+ Operands: []operand.Op{xy, v, xy1},
+ Inputs: []operand.Op{xy, v, xy1},
+ Outputs: []operand.Op{xy, xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPGATHERDD: bad operands")
+}
+
+// VPGATHERDQ: Gather Packed Quadword Values Using Signed Doubleword Indices.
+//
+// Forms:
+//
+// VPGATHERDQ xmm vm32x xmm
+// VPGATHERDQ ymm vm32x ymm
+func VPGATHERDQ(xy, v, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsVM32X(v) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPGATHERDQ",
+ Operands: []operand.Op{xy, v, xy1},
+ Inputs: []operand.Op{xy, v, xy1},
+ Outputs: []operand.Op{xy, xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsVM32X(v) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPGATHERDQ",
+ Operands: []operand.Op{xy, v, xy1},
+ Inputs: []operand.Op{xy, v, xy1},
+ Outputs: []operand.Op{xy, xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPGATHERDQ: bad operands")
+}
+
+// VPGATHERQD: Gather Packed Doubleword Values Using Signed Quadword Indices.
+//
+// Forms:
+//
+// VPGATHERQD xmm vm64x xmm
+// VPGATHERQD xmm vm64y xmm
+func VPGATHERQD(x, v, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(x) && operand.IsVM64X(v) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VPGATHERQD",
+ Operands: []operand.Op{x, v, x1},
+ Inputs: []operand.Op{x, v, x1},
+ Outputs: []operand.Op{x, x1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(x) && operand.IsVM64Y(v) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VPGATHERQD",
+ Operands: []operand.Op{x, v, x1},
+ Inputs: []operand.Op{x, v, x1},
+ Outputs: []operand.Op{x, x1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPGATHERQD: bad operands")
+}
+
+// VPGATHERQQ: Gather Packed Quadword Values Using Signed Quadword Indices.
+//
+// Forms:
+//
+// VPGATHERQQ xmm vm64x xmm
+// VPGATHERQQ ymm vm64y ymm
+func VPGATHERQQ(xy, v, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsVM64X(v) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPGATHERQQ",
+ Operands: []operand.Op{xy, v, xy1},
+ Inputs: []operand.Op{xy, v, xy1},
+ Outputs: []operand.Op{xy, xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsVM64Y(v) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPGATHERQQ",
+ Operands: []operand.Op{xy, v, xy1},
+ Inputs: []operand.Op{xy, v, xy1},
+ Outputs: []operand.Op{xy, xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPGATHERQQ: bad operands")
+}
+
+// VPHADDD: Packed Horizontal Add Doubleword Integer.
+//
+// Forms:
+//
+// VPHADDD xmm xmm xmm
+// VPHADDD m128 xmm xmm
+// VPHADDD ymm ymm ymm
+// VPHADDD m256 ymm ymm
+func VPHADDD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHADDD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHADDD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHADDD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHADDD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPHADDD: bad operands")
+}
+
+// VPHADDSW: Packed Horizontal Add Signed Word Integers with Signed Saturation.
+//
+// Forms:
+//
+// VPHADDSW xmm xmm xmm
+// VPHADDSW m128 xmm xmm
+// VPHADDSW ymm ymm ymm
+// VPHADDSW m256 ymm ymm
+func VPHADDSW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHADDSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHADDSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHADDSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHADDSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPHADDSW: bad operands")
+}
+
+// VPHADDW: Packed Horizontal Add Word Integers.
+//
+// Forms:
+//
+// VPHADDW xmm xmm xmm
+// VPHADDW m128 xmm xmm
+// VPHADDW ymm ymm ymm
+// VPHADDW m256 ymm ymm
+func VPHADDW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHADDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHADDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHADDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHADDW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPHADDW: bad operands")
+}
+
+// VPHMINPOSUW: Packed Horizontal Minimum of Unsigned Word Integers.
+//
+// Forms:
+//
+// VPHMINPOSUW xmm xmm
+// VPHMINPOSUW m128 xmm
+func VPHMINPOSUW(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VPHMINPOSUW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VPHMINPOSUW",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{x},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPHMINPOSUW: bad operands")
+}
+
+// VPHSUBD: Packed Horizontal Subtract Doubleword Integers.
+//
+// Forms:
+//
+// VPHSUBD xmm xmm xmm
+// VPHSUBD m128 xmm xmm
+// VPHSUBD ymm ymm ymm
+// VPHSUBD m256 ymm ymm
+func VPHSUBD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHSUBD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHSUBD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHSUBD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHSUBD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPHSUBD: bad operands")
+}
+
+// VPHSUBSW: Packed Horizontal Subtract Signed Word Integers with Signed Saturation.
+//
+// Forms:
+//
+// VPHSUBSW xmm xmm xmm
+// VPHSUBSW m128 xmm xmm
+// VPHSUBSW ymm ymm ymm
+// VPHSUBSW m256 ymm ymm
+func VPHSUBSW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHSUBSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHSUBSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHSUBSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHSUBSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPHSUBSW: bad operands")
+}
+
+// VPHSUBW: Packed Horizontal Subtract Word Integers.
+//
+// Forms:
+//
+// VPHSUBW xmm xmm xmm
+// VPHSUBW m128 xmm xmm
+// VPHSUBW ymm ymm ymm
+// VPHSUBW m256 ymm ymm
+func VPHSUBW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHSUBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHSUBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHSUBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPHSUBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPHSUBW: bad operands")
+}
+
+// VPINSRB: Insert Byte.
+//
+// Forms:
+//
+// VPINSRB imm8 r32 xmm xmm
+// VPINSRB imm8 m8 xmm xmm
+func VPINSRB(i, mr, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsR32(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VPINSRB",
+ Operands: []operand.Op{i, mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM8(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VPINSRB",
+ Operands: []operand.Op{i, mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPINSRB: bad operands")
+}
+
+// VPINSRD: Insert Doubleword.
+//
+// Forms:
+//
+// VPINSRD imm8 r32 xmm xmm
+// VPINSRD imm8 m32 xmm xmm
+func VPINSRD(i, mr, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsR32(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VPINSRD",
+ Operands: []operand.Op{i, mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM32(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VPINSRD",
+ Operands: []operand.Op{i, mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPINSRD: bad operands")
+}
+
+// VPINSRQ: Insert Quadword.
+//
+// Forms:
+//
+// VPINSRQ imm8 r64 xmm xmm
+// VPINSRQ imm8 m64 xmm xmm
+func VPINSRQ(i, mr, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsR64(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VPINSRQ",
+ Operands: []operand.Op{i, mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM64(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VPINSRQ",
+ Operands: []operand.Op{i, mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPINSRQ: bad operands")
+}
+
+// VPINSRW: Insert Word.
+//
+// Forms:
+//
+// VPINSRW imm8 r32 xmm xmm
+// VPINSRW imm8 m16 xmm xmm
+func VPINSRW(i, mr, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsR32(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VPINSRW",
+ Operands: []operand.Op{i, mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM16(mr) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VPINSRW",
+ Operands: []operand.Op{i, mr, x, x1},
+ Inputs: []operand.Op{mr, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPINSRW: bad operands")
+}
+
+// VPMADDUBSW: Multiply and Add Packed Signed and Unsigned Byte Integers.
+//
+// Forms:
+//
+// VPMADDUBSW xmm xmm xmm
+// VPMADDUBSW m128 xmm xmm
+// VPMADDUBSW ymm ymm ymm
+// VPMADDUBSW m256 ymm ymm
+func VPMADDUBSW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMADDUBSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMADDUBSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMADDUBSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMADDUBSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMADDUBSW: bad operands")
+}
+
+// VPMADDWD: Multiply and Add Packed Signed Word Integers.
+//
+// Forms:
+//
+// VPMADDWD xmm xmm xmm
+// VPMADDWD m128 xmm xmm
+// VPMADDWD ymm ymm ymm
+// VPMADDWD m256 ymm ymm
+func VPMADDWD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMADDWD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMADDWD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMADDWD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMADDWD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMADDWD: bad operands")
+}
+
+// VPMASKMOVD: Conditional Move Packed Doubleword Integers.
+//
+// Forms:
+//
+// VPMASKMOVD m128 xmm xmm
+// VPMASKMOVD m256 ymm ymm
+// VPMASKMOVD xmm xmm m128
+// VPMASKMOVD ymm ymm m256
+func VPMASKMOVD(mxy, xy, mxy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VPMASKMOVD",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VPMASKMOVD",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsM128(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VPMASKMOVD",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsM256(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VPMASKMOVD",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMASKMOVD: bad operands")
+}
+
+// VPMASKMOVQ: Conditional Move Packed Quadword Integers.
+//
+// Forms:
+//
+// VPMASKMOVQ m128 xmm xmm
+// VPMASKMOVQ m256 ymm ymm
+// VPMASKMOVQ xmm xmm m128
+// VPMASKMOVQ ymm ymm m256
+func VPMASKMOVQ(mxy, xy, mxy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VPMASKMOVQ",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VPMASKMOVQ",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsM128(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VPMASKMOVQ",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsM256(mxy1):
+ return &intrep.Instruction{
+ Opcode: "VPMASKMOVQ",
+ Operands: []operand.Op{mxy, xy, mxy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{mxy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMASKMOVQ: bad operands")
+}
+
+// VPMAXSB: Maximum of Packed Signed Byte Integers.
+//
+// Forms:
+//
+// VPMAXSB xmm xmm xmm
+// VPMAXSB m128 xmm xmm
+// VPMAXSB ymm ymm ymm
+// VPMAXSB m256 ymm ymm
+func VPMAXSB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMAXSB: bad operands")
+}
+
+// VPMAXSD: Maximum of Packed Signed Doubleword Integers.
+//
+// Forms:
+//
+// VPMAXSD xmm xmm xmm
+// VPMAXSD m128 xmm xmm
+// VPMAXSD ymm ymm ymm
+// VPMAXSD m256 ymm ymm
+func VPMAXSD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXSD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXSD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXSD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXSD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMAXSD: bad operands")
+}
+
+// VPMAXSW: Maximum of Packed Signed Word Integers.
+//
+// Forms:
+//
+// VPMAXSW xmm xmm xmm
+// VPMAXSW m128 xmm xmm
+// VPMAXSW ymm ymm ymm
+// VPMAXSW m256 ymm ymm
+func VPMAXSW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMAXSW: bad operands")
+}
+
+// VPMAXUB: Maximum of Packed Unsigned Byte Integers.
+//
+// Forms:
+//
+// VPMAXUB xmm xmm xmm
+// VPMAXUB m128 xmm xmm
+// VPMAXUB ymm ymm ymm
+// VPMAXUB m256 ymm ymm
+func VPMAXUB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXUB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXUB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXUB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXUB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMAXUB: bad operands")
+}
+
+// VPMAXUD: Maximum of Packed Unsigned Doubleword Integers.
+//
+// Forms:
+//
+// VPMAXUD xmm xmm xmm
+// VPMAXUD m128 xmm xmm
+// VPMAXUD ymm ymm ymm
+// VPMAXUD m256 ymm ymm
+func VPMAXUD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXUD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXUD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXUD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXUD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMAXUD: bad operands")
+}
+
+// VPMAXUW: Maximum of Packed Unsigned Word Integers.
+//
+// Forms:
+//
+// VPMAXUW xmm xmm xmm
+// VPMAXUW m128 xmm xmm
+// VPMAXUW ymm ymm ymm
+// VPMAXUW m256 ymm ymm
+func VPMAXUW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXUW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXUW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXUW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMAXUW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMAXUW: bad operands")
+}
+
+// VPMINSB: Minimum of Packed Signed Byte Integers.
+//
+// Forms:
+//
+// VPMINSB xmm xmm xmm
+// VPMINSB m128 xmm xmm
+// VPMINSB ymm ymm ymm
+// VPMINSB m256 ymm ymm
+func VPMINSB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMINSB: bad operands")
+}
+
+// VPMINSD: Minimum of Packed Signed Doubleword Integers.
+//
+// Forms:
+//
+// VPMINSD xmm xmm xmm
+// VPMINSD m128 xmm xmm
+// VPMINSD ymm ymm ymm
+// VPMINSD m256 ymm ymm
+func VPMINSD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINSD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINSD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINSD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINSD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMINSD: bad operands")
+}
+
+// VPMINSW: Minimum of Packed Signed Word Integers.
+//
+// Forms:
+//
+// VPMINSW xmm xmm xmm
+// VPMINSW m128 xmm xmm
+// VPMINSW ymm ymm ymm
+// VPMINSW m256 ymm ymm
+func VPMINSW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMINSW: bad operands")
+}
+
+// VPMINUB: Minimum of Packed Unsigned Byte Integers.
+//
+// Forms:
+//
+// VPMINUB xmm xmm xmm
+// VPMINUB m128 xmm xmm
+// VPMINUB ymm ymm ymm
+// VPMINUB m256 ymm ymm
+func VPMINUB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINUB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINUB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINUB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINUB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMINUB: bad operands")
+}
+
+// VPMINUD: Minimum of Packed Unsigned Doubleword Integers.
+//
+// Forms:
+//
+// VPMINUD xmm xmm xmm
+// VPMINUD m128 xmm xmm
+// VPMINUD ymm ymm ymm
+// VPMINUD m256 ymm ymm
+func VPMINUD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINUD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINUD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINUD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINUD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMINUD: bad operands")
+}
+
+// VPMINUW: Minimum of Packed Unsigned Word Integers.
+//
+// Forms:
+//
+// VPMINUW xmm xmm xmm
+// VPMINUW m128 xmm xmm
+// VPMINUW ymm ymm ymm
+// VPMINUW m256 ymm ymm
+func VPMINUW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINUW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINUW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINUW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMINUW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMINUW: bad operands")
+}
+
+// VPMOVMSKB: Move Byte Mask.
+//
+// Forms:
+//
+// VPMOVMSKB xmm r32
+// VPMOVMSKB ymm r32
+func VPMOVMSKB(xy, r operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(xy) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VPMOVMSKB",
+ Operands: []operand.Op{xy, r},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(xy) && operand.IsR32(r):
+ return &intrep.Instruction{
+ Opcode: "VPMOVMSKB",
+ Operands: []operand.Op{xy, r},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{r},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMOVMSKB: bad operands")
+}
+
+// VPMOVSXBD: Move Packed Byte Integers to Doubleword Integers with Sign Extension.
+//
+// Forms:
+//
+// VPMOVSXBD xmm xmm
+// VPMOVSXBD m32 xmm
+// VPMOVSXBD xmm ymm
+// VPMOVSXBD m64 ymm
+func VPMOVSXBD(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXBD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXBD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXBD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXBD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMOVSXBD: bad operands")
+}
+
+// VPMOVSXBQ: Move Packed Byte Integers to Quadword Integers with Sign Extension.
+//
+// Forms:
+//
+// VPMOVSXBQ xmm xmm
+// VPMOVSXBQ m16 xmm
+// VPMOVSXBQ xmm ymm
+// VPMOVSXBQ m32 ymm
+func VPMOVSXBQ(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXBQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM16(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXBQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXBQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXBQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMOVSXBQ: bad operands")
+}
+
+// VPMOVSXBW: Move Packed Byte Integers to Word Integers with Sign Extension.
+//
+// Forms:
+//
+// VPMOVSXBW xmm xmm
+// VPMOVSXBW m64 xmm
+// VPMOVSXBW xmm ymm
+// VPMOVSXBW m128 ymm
+func VPMOVSXBW(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXBW",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXBW",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXBW",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXBW",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMOVSXBW: bad operands")
+}
+
+// VPMOVSXDQ: Move Packed Doubleword Integers to Quadword Integers with Sign Extension.
+//
+// Forms:
+//
+// VPMOVSXDQ xmm xmm
+// VPMOVSXDQ m64 xmm
+// VPMOVSXDQ xmm ymm
+// VPMOVSXDQ m128 ymm
+func VPMOVSXDQ(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXDQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXDQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXDQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXDQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMOVSXDQ: bad operands")
+}
+
+// VPMOVSXWD: Move Packed Word Integers to Doubleword Integers with Sign Extension.
+//
+// Forms:
+//
+// VPMOVSXWD xmm xmm
+// VPMOVSXWD m64 xmm
+// VPMOVSXWD xmm ymm
+// VPMOVSXWD m128 ymm
+func VPMOVSXWD(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXWD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXWD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXWD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXWD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMOVSXWD: bad operands")
+}
+
+// VPMOVSXWQ: Move Packed Word Integers to Quadword Integers with Sign Extension.
+//
+// Forms:
+//
+// VPMOVSXWQ xmm xmm
+// VPMOVSXWQ m32 xmm
+// VPMOVSXWQ xmm ymm
+// VPMOVSXWQ m64 ymm
+func VPMOVSXWQ(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXWQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXWQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXWQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVSXWQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMOVSXWQ: bad operands")
+}
+
+// VPMOVZXBD: Move Packed Byte Integers to Doubleword Integers with Zero Extension.
+//
+// Forms:
+//
+// VPMOVZXBD xmm xmm
+// VPMOVZXBD m32 xmm
+// VPMOVZXBD xmm ymm
+// VPMOVZXBD m64 ymm
+func VPMOVZXBD(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXBD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXBD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXBD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXBD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMOVZXBD: bad operands")
+}
+
+// VPMOVZXBQ: Move Packed Byte Integers to Quadword Integers with Zero Extension.
+//
+// Forms:
+//
+// VPMOVZXBQ xmm xmm
+// VPMOVZXBQ m16 xmm
+// VPMOVZXBQ xmm ymm
+// VPMOVZXBQ m32 ymm
+func VPMOVZXBQ(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXBQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM16(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXBQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXBQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXBQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMOVZXBQ: bad operands")
+}
+
+// VPMOVZXBW: Move Packed Byte Integers to Word Integers with Zero Extension.
+//
+// Forms:
+//
+// VPMOVZXBW xmm xmm
+// VPMOVZXBW m64 xmm
+// VPMOVZXBW xmm ymm
+// VPMOVZXBW m128 ymm
+func VPMOVZXBW(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXBW",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXBW",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXBW",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXBW",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMOVZXBW: bad operands")
+}
+
+// VPMOVZXDQ: Move Packed Doubleword Integers to Quadword Integers with Zero Extension.
+//
+// Forms:
+//
+// VPMOVZXDQ xmm xmm
+// VPMOVZXDQ m64 xmm
+// VPMOVZXDQ xmm ymm
+// VPMOVZXDQ m128 ymm
+func VPMOVZXDQ(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXDQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXDQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXDQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXDQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMOVZXDQ: bad operands")
+}
+
+// VPMOVZXWD: Move Packed Word Integers to Doubleword Integers with Zero Extension.
+//
+// Forms:
+//
+// VPMOVZXWD xmm xmm
+// VPMOVZXWD m64 xmm
+// VPMOVZXWD xmm ymm
+// VPMOVZXWD m128 ymm
+func VPMOVZXWD(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXWD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXWD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXWD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXWD",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMOVZXWD: bad operands")
+}
+
+// VPMOVZXWQ: Move Packed Word Integers to Quadword Integers with Zero Extension.
+//
+// Forms:
+//
+// VPMOVZXWQ xmm xmm
+// VPMOVZXWQ m32 xmm
+// VPMOVZXWQ xmm ymm
+// VPMOVZXWQ m64 ymm
+func VPMOVZXWQ(mx, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXWQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXWQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXWQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPMOVZXWQ",
+ Operands: []operand.Op{mx, xy},
+ Inputs: []operand.Op{mx},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMOVZXWQ: bad operands")
+}
+
+// VPMULDQ: Multiply Packed Signed Doubleword Integers and Store Quadword Result.
+//
+// Forms:
+//
+// VPMULDQ xmm xmm xmm
+// VPMULDQ m128 xmm xmm
+// VPMULDQ ymm ymm ymm
+// VPMULDQ m256 ymm ymm
+func VPMULDQ(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMULDQ: bad operands")
+}
+
+// VPMULHRSW: Packed Multiply Signed Word Integers and Store High Result with Round and Scale.
+//
+// Forms:
+//
+// VPMULHRSW xmm xmm xmm
+// VPMULHRSW m128 xmm xmm
+// VPMULHRSW ymm ymm ymm
+// VPMULHRSW m256 ymm ymm
+func VPMULHRSW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULHRSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULHRSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULHRSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULHRSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMULHRSW: bad operands")
+}
+
+// VPMULHUW: Multiply Packed Unsigned Word Integers and Store High Result.
+//
+// Forms:
+//
+// VPMULHUW xmm xmm xmm
+// VPMULHUW m128 xmm xmm
+// VPMULHUW ymm ymm ymm
+// VPMULHUW m256 ymm ymm
+func VPMULHUW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULHUW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULHUW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULHUW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULHUW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMULHUW: bad operands")
+}
+
+// VPMULHW: Multiply Packed Signed Word Integers and Store High Result.
+//
+// Forms:
+//
+// VPMULHW xmm xmm xmm
+// VPMULHW m128 xmm xmm
+// VPMULHW ymm ymm ymm
+// VPMULHW m256 ymm ymm
+func VPMULHW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULHW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULHW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULHW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULHW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMULHW: bad operands")
+}
+
+// VPMULLD: Multiply Packed Signed Doubleword Integers and Store Low Result.
+//
+// Forms:
+//
+// VPMULLD xmm xmm xmm
+// VPMULLD m128 xmm xmm
+// VPMULLD ymm ymm ymm
+// VPMULLD m256 ymm ymm
+func VPMULLD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULLD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULLD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULLD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULLD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMULLD: bad operands")
+}
+
+// VPMULLW: Multiply Packed Signed Word Integers and Store Low Result.
+//
+// Forms:
+//
+// VPMULLW xmm xmm xmm
+// VPMULLW m128 xmm xmm
+// VPMULLW ymm ymm ymm
+// VPMULLW m256 ymm ymm
+func VPMULLW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULLW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULLW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULLW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULLW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMULLW: bad operands")
+}
+
+// VPMULUDQ: Multiply Packed Unsigned Doubleword Integers.
+//
+// Forms:
+//
+// VPMULUDQ xmm xmm xmm
+// VPMULUDQ m128 xmm xmm
+// VPMULUDQ ymm ymm ymm
+// VPMULUDQ m256 ymm ymm
+func VPMULUDQ(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULUDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULUDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULUDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPMULUDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPMULUDQ: bad operands")
+}
+
+// VPOR: Packed Bitwise Logical OR.
+//
+// Forms:
+//
+// VPOR xmm xmm xmm
+// VPOR m128 xmm xmm
+// VPOR ymm ymm ymm
+// VPOR m256 ymm ymm
+func VPOR(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPOR",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPOR",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPOR",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPOR",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPOR: bad operands")
+}
+
+// VPSADBW: Compute Sum of Absolute Differences.
+//
+// Forms:
+//
+// VPSADBW xmm xmm xmm
+// VPSADBW m128 xmm xmm
+// VPSADBW ymm ymm ymm
+// VPSADBW m256 ymm ymm
+func VPSADBW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSADBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSADBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSADBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSADBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSADBW: bad operands")
+}
+
+// VPSHUFB: Packed Shuffle Bytes.
+//
+// Forms:
+//
+// VPSHUFB xmm xmm xmm
+// VPSHUFB m128 xmm xmm
+// VPSHUFB ymm ymm ymm
+// VPSHUFB m256 ymm ymm
+func VPSHUFB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSHUFB: bad operands")
+}
+
+// VPSHUFD: Shuffle Packed Doublewords.
+//
+// Forms:
+//
+// VPSHUFD imm8 xmm xmm
+// VPSHUFD imm8 m128 xmm
+// VPSHUFD imm8 ymm ymm
+// VPSHUFD imm8 m256 ymm
+func VPSHUFD(i, mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFD",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFD",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFD",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFD",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSHUFD: bad operands")
+}
+
+// VPSHUFHW: Shuffle Packed High Words.
+//
+// Forms:
+//
+// VPSHUFHW imm8 xmm xmm
+// VPSHUFHW imm8 m128 xmm
+// VPSHUFHW imm8 ymm ymm
+// VPSHUFHW imm8 m256 ymm
+func VPSHUFHW(i, mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFHW",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFHW",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFHW",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFHW",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSHUFHW: bad operands")
+}
+
+// VPSHUFLW: Shuffle Packed Low Words.
+//
+// Forms:
+//
+// VPSHUFLW imm8 xmm xmm
+// VPSHUFLW imm8 m128 xmm
+// VPSHUFLW imm8 ymm ymm
+// VPSHUFLW imm8 m256 ymm
+func VPSHUFLW(i, mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFLW",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFLW",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFLW",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPSHUFLW",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSHUFLW: bad operands")
+}
+
+// VPSIGNB: Packed Sign of Byte Integers.
+//
+// Forms:
+//
+// VPSIGNB xmm xmm xmm
+// VPSIGNB m128 xmm xmm
+// VPSIGNB ymm ymm ymm
+// VPSIGNB m256 ymm ymm
+func VPSIGNB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSIGNB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSIGNB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSIGNB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSIGNB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSIGNB: bad operands")
+}
+
+// VPSIGND: Packed Sign of Doubleword Integers.
+//
+// Forms:
+//
+// VPSIGND xmm xmm xmm
+// VPSIGND m128 xmm xmm
+// VPSIGND ymm ymm ymm
+// VPSIGND m256 ymm ymm
+func VPSIGND(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSIGND",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSIGND",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSIGND",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSIGND",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSIGND: bad operands")
+}
+
+// VPSIGNW: Packed Sign of Word Integers.
+//
+// Forms:
+//
+// VPSIGNW xmm xmm xmm
+// VPSIGNW m128 xmm xmm
+// VPSIGNW ymm ymm ymm
+// VPSIGNW m256 ymm ymm
+func VPSIGNW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSIGNW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSIGNW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSIGNW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSIGNW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSIGNW: bad operands")
+}
+
+// VPSLLD: Shift Packed Doubleword Data Left Logical.
+//
+// Forms:
+//
+// VPSLLD imm8 xmm xmm
+// VPSLLD xmm xmm xmm
+// VPSLLD m128 xmm xmm
+// VPSLLD imm8 ymm ymm
+// VPSLLD xmm ymm ymm
+// VPSLLD m128 ymm ymm
+func VPSLLD(imx, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSLLD: bad operands")
+}
+
+// VPSLLDQ: Shift Packed Double Quadword Left Logical.
+//
+// Forms:
+//
+// VPSLLDQ imm8 xmm xmm
+// VPSLLDQ imm8 ymm ymm
+func VPSLLDQ(i, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLDQ",
+ Operands: []operand.Op{i, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLDQ",
+ Operands: []operand.Op{i, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSLLDQ: bad operands")
+}
+
+// VPSLLQ: Shift Packed Quadword Data Left Logical.
+//
+// Forms:
+//
+// VPSLLQ imm8 xmm xmm
+// VPSLLQ xmm xmm xmm
+// VPSLLQ m128 xmm xmm
+// VPSLLQ imm8 ymm ymm
+// VPSLLQ xmm ymm ymm
+// VPSLLQ m128 ymm ymm
+func VPSLLQ(imx, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLQ",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLQ",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLQ",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLQ",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLQ",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLQ",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSLLQ: bad operands")
+}
+
+// VPSLLVD: Variable Shift Packed Doubleword Data Left Logical.
+//
+// Forms:
+//
+// VPSLLVD xmm xmm xmm
+// VPSLLVD m128 xmm xmm
+// VPSLLVD ymm ymm ymm
+// VPSLLVD m256 ymm ymm
+func VPSLLVD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLVD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLVD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLVD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLVD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSLLVD: bad operands")
+}
+
+// VPSLLVQ: Variable Shift Packed Quadword Data Left Logical.
+//
+// Forms:
+//
+// VPSLLVQ xmm xmm xmm
+// VPSLLVQ m128 xmm xmm
+// VPSLLVQ ymm ymm ymm
+// VPSLLVQ m256 ymm ymm
+func VPSLLVQ(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLVQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLVQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLVQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLVQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSLLVQ: bad operands")
+}
+
+// VPSLLW: Shift Packed Word Data Left Logical.
+//
+// Forms:
+//
+// VPSLLW imm8 xmm xmm
+// VPSLLW xmm xmm xmm
+// VPSLLW m128 xmm xmm
+// VPSLLW imm8 ymm ymm
+// VPSLLW xmm ymm ymm
+// VPSLLW m128 ymm ymm
+func VPSLLW(imx, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSLLW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSLLW: bad operands")
+}
+
+// VPSRAD: Shift Packed Doubleword Data Right Arithmetic.
+//
+// Forms:
+//
+// VPSRAD imm8 xmm xmm
+// VPSRAD xmm xmm xmm
+// VPSRAD m128 xmm xmm
+// VPSRAD imm8 ymm ymm
+// VPSRAD xmm ymm ymm
+// VPSRAD m128 ymm ymm
+func VPSRAD(imx, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSRAD: bad operands")
+}
+
+// VPSRAVD: Variable Shift Packed Doubleword Data Right Arithmetic.
+//
+// Forms:
+//
+// VPSRAVD xmm xmm xmm
+// VPSRAVD m128 xmm xmm
+// VPSRAVD ymm ymm ymm
+// VPSRAVD m256 ymm ymm
+func VPSRAVD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAVD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAVD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAVD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAVD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSRAVD: bad operands")
+}
+
+// VPSRAW: Shift Packed Word Data Right Arithmetic.
+//
+// Forms:
+//
+// VPSRAW imm8 xmm xmm
+// VPSRAW xmm xmm xmm
+// VPSRAW m128 xmm xmm
+// VPSRAW imm8 ymm ymm
+// VPSRAW xmm ymm ymm
+// VPSRAW m128 ymm ymm
+func VPSRAW(imx, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRAW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSRAW: bad operands")
+}
+
+// VPSRLD: Shift Packed Doubleword Data Right Logical.
+//
+// Forms:
+//
+// VPSRLD imm8 xmm xmm
+// VPSRLD xmm xmm xmm
+// VPSRLD m128 xmm xmm
+// VPSRLD imm8 ymm ymm
+// VPSRLD xmm ymm ymm
+// VPSRLD m128 ymm ymm
+func VPSRLD(imx, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLD",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSRLD: bad operands")
+}
+
+// VPSRLDQ: Shift Packed Double Quadword Right Logical.
+//
+// Forms:
+//
+// VPSRLDQ imm8 xmm xmm
+// VPSRLDQ imm8 ymm ymm
+func VPSRLDQ(i, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLDQ",
+ Operands: []operand.Op{i, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLDQ",
+ Operands: []operand.Op{i, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSRLDQ: bad operands")
+}
+
+// VPSRLQ: Shift Packed Quadword Data Right Logical.
+//
+// Forms:
+//
+// VPSRLQ imm8 xmm xmm
+// VPSRLQ xmm xmm xmm
+// VPSRLQ m128 xmm xmm
+// VPSRLQ imm8 ymm ymm
+// VPSRLQ xmm ymm ymm
+// VPSRLQ m128 ymm ymm
+func VPSRLQ(imx, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLQ",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLQ",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLQ",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLQ",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLQ",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLQ",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSRLQ: bad operands")
+}
+
+// VPSRLVD: Variable Shift Packed Doubleword Data Right Logical.
+//
+// Forms:
+//
+// VPSRLVD xmm xmm xmm
+// VPSRLVD m128 xmm xmm
+// VPSRLVD ymm ymm ymm
+// VPSRLVD m256 ymm ymm
+func VPSRLVD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLVD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLVD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLVD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLVD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSRLVD: bad operands")
+}
+
+// VPSRLVQ: Variable Shift Packed Quadword Data Right Logical.
+//
+// Forms:
+//
+// VPSRLVQ xmm xmm xmm
+// VPSRLVQ m128 xmm xmm
+// VPSRLVQ ymm ymm ymm
+// VPSRLVQ m256 ymm ymm
+func VPSRLVQ(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLVQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLVQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLVQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLVQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSRLVQ: bad operands")
+}
+
+// VPSRLW: Shift Packed Word Data Right Logical.
+//
+// Forms:
+//
+// VPSRLW imm8 xmm xmm
+// VPSRLW xmm xmm xmm
+// VPSRLW m128 xmm xmm
+// VPSRLW imm8 ymm ymm
+// VPSRLW xmm ymm ymm
+// VPSRLW m128 ymm ymm
+func VPSRLW(imx, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsXMM(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM128(imx) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSRLW",
+ Operands: []operand.Op{imx, xy, xy1},
+ Inputs: []operand.Op{imx, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSRLW: bad operands")
+}
+
+// VPSUBB: Subtract Packed Byte Integers.
+//
+// Forms:
+//
+// VPSUBB xmm xmm xmm
+// VPSUBB m128 xmm xmm
+// VPSUBB ymm ymm ymm
+// VPSUBB m256 ymm ymm
+func VPSUBB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSUBB: bad operands")
+}
+
+// VPSUBD: Subtract Packed Doubleword Integers.
+//
+// Forms:
+//
+// VPSUBD xmm xmm xmm
+// VPSUBD m128 xmm xmm
+// VPSUBD ymm ymm ymm
+// VPSUBD m256 ymm ymm
+func VPSUBD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSUBD: bad operands")
+}
+
+// VPSUBQ: Subtract Packed Quadword Integers.
+//
+// Forms:
+//
+// VPSUBQ xmm xmm xmm
+// VPSUBQ m128 xmm xmm
+// VPSUBQ ymm ymm ymm
+// VPSUBQ m256 ymm ymm
+func VPSUBQ(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSUBQ: bad operands")
+}
+
+// VPSUBSB: Subtract Packed Signed Byte Integers with Signed Saturation.
+//
+// Forms:
+//
+// VPSUBSB xmm xmm xmm
+// VPSUBSB m128 xmm xmm
+// VPSUBSB ymm ymm ymm
+// VPSUBSB m256 ymm ymm
+func VPSUBSB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSUBSB: bad operands")
+}
+
+// VPSUBSW: Subtract Packed Signed Word Integers with Signed Saturation.
+//
+// Forms:
+//
+// VPSUBSW xmm xmm xmm
+// VPSUBSW m128 xmm xmm
+// VPSUBSW ymm ymm ymm
+// VPSUBSW m256 ymm ymm
+func VPSUBSW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSUBSW: bad operands")
+}
+
+// VPSUBUSB: Subtract Packed Unsigned Byte Integers with Unsigned Saturation.
+//
+// Forms:
+//
+// VPSUBUSB xmm xmm xmm
+// VPSUBUSB m128 xmm xmm
+// VPSUBUSB ymm ymm ymm
+// VPSUBUSB m256 ymm ymm
+func VPSUBUSB(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBUSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBUSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBUSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBUSB",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSUBUSB: bad operands")
+}
+
+// VPSUBUSW: Subtract Packed Unsigned Word Integers with Unsigned Saturation.
+//
+// Forms:
+//
+// VPSUBUSW xmm xmm xmm
+// VPSUBUSW m128 xmm xmm
+// VPSUBUSW ymm ymm ymm
+// VPSUBUSW m256 ymm ymm
+func VPSUBUSW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBUSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBUSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBUSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBUSW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSUBUSW: bad operands")
+}
+
+// VPSUBW: Subtract Packed Word Integers.
+//
+// Forms:
+//
+// VPSUBW xmm xmm xmm
+// VPSUBW m128 xmm xmm
+// VPSUBW ymm ymm ymm
+// VPSUBW m256 ymm ymm
+func VPSUBW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPSUBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPSUBW: bad operands")
+}
+
+// VPTEST: Packed Logical Compare.
+//
+// Forms:
+//
+// VPTEST xmm xmm
+// VPTEST m128 xmm
+// VPTEST ymm ymm
+// VPTEST m256 ymm
+func VPTEST(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPTEST",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPTEST",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPTEST",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VPTEST",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VPTEST: bad operands")
+}
+
+// VPUNPCKHBW: Unpack and Interleave High-Order Bytes into Words.
+//
+// Forms:
+//
+// VPUNPCKHBW xmm xmm xmm
+// VPUNPCKHBW m128 xmm xmm
+// VPUNPCKHBW ymm ymm ymm
+// VPUNPCKHBW m256 ymm ymm
+func VPUNPCKHBW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPUNPCKHBW: bad operands")
+}
+
+// VPUNPCKHDQ: Unpack and Interleave High-Order Doublewords into Quadwords.
+//
+// Forms:
+//
+// VPUNPCKHDQ xmm xmm xmm
+// VPUNPCKHDQ m128 xmm xmm
+// VPUNPCKHDQ ymm ymm ymm
+// VPUNPCKHDQ m256 ymm ymm
+func VPUNPCKHDQ(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPUNPCKHDQ: bad operands")
+}
+
+// VPUNPCKHQDQ: Unpack and Interleave High-Order Quadwords into Double Quadwords.
+//
+// Forms:
+//
+// VPUNPCKHQDQ xmm xmm xmm
+// VPUNPCKHQDQ m128 xmm xmm
+// VPUNPCKHQDQ ymm ymm ymm
+// VPUNPCKHQDQ m256 ymm ymm
+func VPUNPCKHQDQ(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHQDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHQDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHQDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHQDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPUNPCKHQDQ: bad operands")
+}
+
+// VPUNPCKHWD: Unpack and Interleave High-Order Words into Doublewords.
+//
+// Forms:
+//
+// VPUNPCKHWD xmm xmm xmm
+// VPUNPCKHWD m128 xmm xmm
+// VPUNPCKHWD ymm ymm ymm
+// VPUNPCKHWD m256 ymm ymm
+func VPUNPCKHWD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHWD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHWD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHWD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKHWD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPUNPCKHWD: bad operands")
+}
+
+// VPUNPCKLBW: Unpack and Interleave Low-Order Bytes into Words.
+//
+// Forms:
+//
+// VPUNPCKLBW xmm xmm xmm
+// VPUNPCKLBW m128 xmm xmm
+// VPUNPCKLBW ymm ymm ymm
+// VPUNPCKLBW m256 ymm ymm
+func VPUNPCKLBW(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLBW",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPUNPCKLBW: bad operands")
+}
+
+// VPUNPCKLDQ: Unpack and Interleave Low-Order Doublewords into Quadwords.
+//
+// Forms:
+//
+// VPUNPCKLDQ xmm xmm xmm
+// VPUNPCKLDQ m128 xmm xmm
+// VPUNPCKLDQ ymm ymm ymm
+// VPUNPCKLDQ m256 ymm ymm
+func VPUNPCKLDQ(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPUNPCKLDQ: bad operands")
+}
+
+// VPUNPCKLQDQ: Unpack and Interleave Low-Order Quadwords into Double Quadwords.
+//
+// Forms:
+//
+// VPUNPCKLQDQ xmm xmm xmm
+// VPUNPCKLQDQ m128 xmm xmm
+// VPUNPCKLQDQ ymm ymm ymm
+// VPUNPCKLQDQ m256 ymm ymm
+func VPUNPCKLQDQ(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLQDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLQDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLQDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLQDQ",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPUNPCKLQDQ: bad operands")
+}
+
+// VPUNPCKLWD: Unpack and Interleave Low-Order Words into Doublewords.
+//
+// Forms:
+//
+// VPUNPCKLWD xmm xmm xmm
+// VPUNPCKLWD m128 xmm xmm
+// VPUNPCKLWD ymm ymm ymm
+// VPUNPCKLWD m256 ymm ymm
+func VPUNPCKLWD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLWD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLWD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLWD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPUNPCKLWD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPUNPCKLWD: bad operands")
+}
+
+// VPXOR: Packed Bitwise Logical Exclusive OR.
+//
+// Forms:
+//
+// VPXOR xmm xmm xmm
+// VPXOR m128 xmm xmm
+// VPXOR ymm ymm ymm
+// VPXOR m256 ymm ymm
+func VPXOR(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPXOR",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPXOR",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPXOR",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VPXOR",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX2"},
+ }, nil
+ }
+ return nil, errors.New("VPXOR: bad operands")
+}
+
+// VRCPPS: Compute Approximate Reciprocals of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VRCPPS xmm xmm
+// VRCPPS m128 xmm
+// VRCPPS ymm ymm
+// VRCPPS m256 ymm
+func VRCPPS(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VRCPPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VRCPPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VRCPPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VRCPPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VRCPPS: bad operands")
+}
+
+// VRCPSS: Compute Approximate Reciprocal of Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VRCPSS xmm xmm xmm
+// VRCPSS m32 xmm xmm
+func VRCPSS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VRCPSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VRCPSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VRCPSS: bad operands")
+}
+
+// VROUNDPD: Round Packed Double Precision Floating-Point Values.
+//
+// Forms:
+//
+// VROUNDPD imm8 xmm xmm
+// VROUNDPD imm8 m128 xmm
+// VROUNDPD imm8 ymm ymm
+// VROUNDPD imm8 m256 ymm
+func VROUNDPD(i, mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VROUNDPD",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VROUNDPD",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VROUNDPD",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VROUNDPD",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VROUNDPD: bad operands")
+}
+
+// VROUNDPS: Round Packed Single Precision Floating-Point Values.
+//
+// Forms:
+//
+// VROUNDPS imm8 xmm xmm
+// VROUNDPS imm8 m128 xmm
+// VROUNDPS imm8 ymm ymm
+// VROUNDPS imm8 m256 ymm
+func VROUNDPS(i, mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VROUNDPS",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VROUNDPS",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VROUNDPS",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VROUNDPS",
+ Operands: []operand.Op{i, mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VROUNDPS: bad operands")
+}
+
+// VROUNDSD: Round Scalar Double Precision Floating-Point Values.
+//
+// Forms:
+//
+// VROUNDSD imm8 xmm xmm xmm
+// VROUNDSD imm8 m64 xmm xmm
+func VROUNDSD(i, mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VROUNDSD",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VROUNDSD",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VROUNDSD: bad operands")
+}
+
+// VROUNDSS: Round Scalar Single Precision Floating-Point Values.
+//
+// Forms:
+//
+// VROUNDSS imm8 xmm xmm xmm
+// VROUNDSS imm8 m32 xmm xmm
+func VROUNDSS(i, mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VROUNDSS",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VROUNDSS",
+ Operands: []operand.Op{i, mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VROUNDSS: bad operands")
+}
+
+// VRSQRTPS: Compute Reciprocals of Square Roots of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VRSQRTPS xmm xmm
+// VRSQRTPS m128 xmm
+// VRSQRTPS ymm ymm
+// VRSQRTPS m256 ymm
+func VRSQRTPS(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VRSQRTPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VRSQRTPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VRSQRTPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VRSQRTPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VRSQRTPS: bad operands")
+}
+
+// VRSQRTSS: Compute Reciprocal of Square Root of Scalar Single-Precision Floating-Point Value.
+//
+// Forms:
+//
+// VRSQRTSS xmm xmm xmm
+// VRSQRTSS m32 xmm xmm
+func VRSQRTSS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VRSQRTSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VRSQRTSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VRSQRTSS: bad operands")
+}
+
+// VSHUFPD: Shuffle Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VSHUFPD imm8 xmm xmm xmm
+// VSHUFPD imm8 m128 xmm xmm
+// VSHUFPD imm8 ymm ymm ymm
+// VSHUFPD imm8 m256 ymm ymm
+func VSHUFPD(i, mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSHUFPD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSHUFPD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSHUFPD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSHUFPD",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VSHUFPD: bad operands")
+}
+
+// VSHUFPS: Shuffle Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VSHUFPS imm8 xmm xmm xmm
+// VSHUFPS imm8 m128 xmm xmm
+// VSHUFPS imm8 ymm ymm ymm
+// VSHUFPS imm8 m256 ymm ymm
+func VSHUFPS(i, mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(i) && operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSHUFPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSHUFPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSHUFPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsIMM8(i) && operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSHUFPS",
+ Operands: []operand.Op{i, mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VSHUFPS: bad operands")
+}
+
+// VSQRTPD: Compute Square Roots of Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VSQRTPD xmm xmm
+// VSQRTPD m128 xmm
+// VSQRTPD ymm ymm
+// VSQRTPD m256 ymm
+func VSQRTPD(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VSQRTPD",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VSQRTPD",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VSQRTPD",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VSQRTPD",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VSQRTPD: bad operands")
+}
+
+// VSQRTPS: Compute Square Roots of Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VSQRTPS xmm xmm
+// VSQRTPS m128 xmm
+// VSQRTPS ymm ymm
+// VSQRTPS m256 ymm
+func VSQRTPS(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VSQRTPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VSQRTPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VSQRTPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VSQRTPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy},
+ Outputs: []operand.Op{xy},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VSQRTPS: bad operands")
+}
+
+// VSQRTSD: Compute Square Root of Scalar Double-Precision Floating-Point Value.
+//
+// Forms:
+//
+// VSQRTSD xmm xmm xmm
+// VSQRTSD m64 xmm xmm
+func VSQRTSD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VSQRTSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VSQRTSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VSQRTSD: bad operands")
+}
+
+// VSQRTSS: Compute Square Root of Scalar Single-Precision Floating-Point Value.
+//
+// Forms:
+//
+// VSQRTSS xmm xmm xmm
+// VSQRTSS m32 xmm xmm
+func VSQRTSS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VSQRTSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VSQRTSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VSQRTSS: bad operands")
+}
+
+// VSTMXCSR: Store MXCSR Register State.
+//
+// Forms:
+//
+// VSTMXCSR m32
+func VSTMXCSR(m operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsM32(m):
+ return &intrep.Instruction{
+ Opcode: "VSTMXCSR",
+ Operands: []operand.Op{m},
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{m},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VSTMXCSR: bad operands")
+}
+
+// VSUBPD: Subtract Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VSUBPD xmm xmm xmm
+// VSUBPD m128 xmm xmm
+// VSUBPD ymm ymm ymm
+// VSUBPD m256 ymm ymm
+func VSUBPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSUBPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSUBPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSUBPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSUBPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VSUBPD: bad operands")
+}
+
+// VSUBPS: Subtract Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VSUBPS xmm xmm xmm
+// VSUBPS m128 xmm xmm
+// VSUBPS ymm ymm ymm
+// VSUBPS m256 ymm ymm
+func VSUBPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSUBPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSUBPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSUBPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VSUBPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VSUBPS: bad operands")
+}
+
+// VSUBSD: Subtract Scalar Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VSUBSD xmm xmm xmm
+// VSUBSD m64 xmm xmm
+func VSUBSD(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VSUBSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VSUBSD",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VSUBSD: bad operands")
+}
+
+// VSUBSS: Subtract Scalar Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VSUBSS xmm xmm xmm
+// VSUBSS m32 xmm xmm
+func VSUBSS(mx, x, x1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VSUBSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x) && operand.IsXMM(x1):
+ return &intrep.Instruction{
+ Opcode: "VSUBSS",
+ Operands: []operand.Op{mx, x, x1},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VSUBSS: bad operands")
+}
+
+// VTESTPD: Packed Double-Precision Floating-Point Bit Test.
+//
+// Forms:
+//
+// VTESTPD xmm xmm
+// VTESTPD m128 xmm
+// VTESTPD ymm ymm
+// VTESTPD m256 ymm
+func VTESTPD(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VTESTPD",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VTESTPD",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VTESTPD",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VTESTPD",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VTESTPD: bad operands")
+}
+
+// VTESTPS: Packed Single-Precision Floating-Point Bit Test.
+//
+// Forms:
+//
+// VTESTPS xmm xmm
+// VTESTPS m128 xmm
+// VTESTPS ymm ymm
+// VTESTPS m256 ymm
+func VTESTPS(mxy, xy operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VTESTPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VTESTPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VTESTPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy):
+ return &intrep.Instruction{
+ Opcode: "VTESTPS",
+ Operands: []operand.Op{mxy, xy},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VTESTPS: bad operands")
+}
+
+// VUCOMISD: Unordered Compare Scalar Double-Precision Floating-Point Values and Set EFLAGS.
+//
+// Forms:
+//
+// VUCOMISD xmm xmm
+// VUCOMISD m64 xmm
+func VUCOMISD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VUCOMISD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM64(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VUCOMISD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VUCOMISD: bad operands")
+}
+
+// VUCOMISS: Unordered Compare Scalar Single-Precision Floating-Point Values and Set EFLAGS.
+//
+// Forms:
+//
+// VUCOMISS xmm xmm
+// VUCOMISS m32 xmm
+func VUCOMISS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VUCOMISS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM32(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "VUCOMISS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VUCOMISS: bad operands")
+}
+
+// VUNPCKHPD: Unpack and Interleave High Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VUNPCKHPD xmm xmm xmm
+// VUNPCKHPD m128 xmm xmm
+// VUNPCKHPD ymm ymm ymm
+// VUNPCKHPD m256 ymm ymm
+func VUNPCKHPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKHPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKHPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKHPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKHPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VUNPCKHPD: bad operands")
+}
+
+// VUNPCKHPS: Unpack and Interleave High Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VUNPCKHPS xmm xmm xmm
+// VUNPCKHPS m128 xmm xmm
+// VUNPCKHPS ymm ymm ymm
+// VUNPCKHPS m256 ymm ymm
+func VUNPCKHPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKHPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKHPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKHPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKHPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VUNPCKHPS: bad operands")
+}
+
+// VUNPCKLPD: Unpack and Interleave Low Packed Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VUNPCKLPD xmm xmm xmm
+// VUNPCKLPD m128 xmm xmm
+// VUNPCKLPD ymm ymm ymm
+// VUNPCKLPD m256 ymm ymm
+func VUNPCKLPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKLPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKLPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKLPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKLPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VUNPCKLPD: bad operands")
+}
+
+// VUNPCKLPS: Unpack and Interleave Low Packed Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VUNPCKLPS xmm xmm xmm
+// VUNPCKLPS m128 xmm xmm
+// VUNPCKLPS ymm ymm ymm
+// VUNPCKLPS m256 ymm ymm
+func VUNPCKLPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKLPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKLPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKLPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VUNPCKLPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VUNPCKLPS: bad operands")
+}
+
+// VXORPD: Bitwise Logical XOR for Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VXORPD xmm xmm xmm
+// VXORPD m128 xmm xmm
+// VXORPD ymm ymm ymm
+// VXORPD m256 ymm ymm
+func VXORPD(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VXORPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VXORPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VXORPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VXORPD",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VXORPD: bad operands")
+}
+
+// VXORPS: Bitwise Logical XOR for Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// VXORPS xmm xmm xmm
+// VXORPS m128 xmm xmm
+// VXORPS ymm ymm ymm
+// VXORPS m256 ymm ymm
+func VXORPS(mxy, xy, xy1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VXORPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mxy) && operand.IsXMM(xy) && operand.IsXMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VXORPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ case operand.IsYMM(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VXORPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM256(mxy) && operand.IsYMM(xy) && operand.IsYMM(xy1):
+ return &intrep.Instruction{
+ Opcode: "VXORPS",
+ Operands: []operand.Op{mxy, xy, xy1},
+ Inputs: []operand.Op{mxy, xy},
+ Outputs: []operand.Op{xy1},
+ ISA: []string{"AVX"},
+ }, nil
+ }
+ return nil, errors.New("VXORPS: bad operands")
+}
+
+// VZEROALL: Zero All YMM Registers.
+//
+// Forms:
+//
+// VZEROALL
+func VZEROALL() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "VZEROALL",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+}
+
+// VZEROUPPER: Zero Upper Bits of YMM Registers.
+//
+// Forms:
+//
+// VZEROUPPER
+func VZEROUPPER() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "VZEROUPPER",
+ Operands: nil,
+ Inputs: []operand.Op{},
+ Outputs: []operand.Op{},
+ ISA: []string{"AVX"},
+ }, nil
+}
+
+// XADDB: Exchange and Add.
+//
+// Forms:
+//
+// XADDB r8 r8
+// XADDB r8 m8
+func XADDB(r, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(r) && operand.IsR8(mr):
+ return &intrep.Instruction{
+ Opcode: "XADDB",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r, mr},
+ }, nil
+ case operand.IsR8(r) && operand.IsM8(mr):
+ return &intrep.Instruction{
+ Opcode: "XADDB",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r, mr},
+ }, nil
+ }
+ return nil, errors.New("XADDB: bad operands")
+}
+
+// XADDL: Exchange and Add.
+//
+// Forms:
+//
+// XADDL r32 r32
+// XADDL r32 m32
+func XADDL(r, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(r) && operand.IsR32(mr):
+ return &intrep.Instruction{
+ Opcode: "XADDL",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r, mr},
+ }, nil
+ case operand.IsR32(r) && operand.IsM32(mr):
+ return &intrep.Instruction{
+ Opcode: "XADDL",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r, mr},
+ }, nil
+ }
+ return nil, errors.New("XADDL: bad operands")
+}
+
+// XADDQ: Exchange and Add.
+//
+// Forms:
+//
+// XADDQ r64 r64
+// XADDQ r64 m64
+func XADDQ(r, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(r) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "XADDQ",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r, mr},
+ }, nil
+ case operand.IsR64(r) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "XADDQ",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r, mr},
+ }, nil
+ }
+ return nil, errors.New("XADDQ: bad operands")
+}
+
+// XADDW: Exchange and Add.
+//
+// Forms:
+//
+// XADDW r16 r16
+// XADDW r16 m16
+func XADDW(r, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(r) && operand.IsR16(mr):
+ return &intrep.Instruction{
+ Opcode: "XADDW",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r, mr},
+ }, nil
+ case operand.IsR16(r) && operand.IsM16(mr):
+ return &intrep.Instruction{
+ Opcode: "XADDW",
+ Operands: []operand.Op{r, mr},
+ Inputs: []operand.Op{r, mr},
+ Outputs: []operand.Op{r, mr},
+ }, nil
+ }
+ return nil, errors.New("XADDW: bad operands")
+}
+
+// XCHGB: Exchange Register/Memory with Register.
+//
+// Forms:
+//
+// XCHGB r8 r8
+// XCHGB m8 r8
+// XCHGB r8 m8
+func XCHGB(mr, mr1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR8(mr) && operand.IsR8(mr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGB",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr, mr1},
+ Outputs: []operand.Op{mr, mr1},
+ }, nil
+ case operand.IsM8(mr) && operand.IsR8(mr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGB",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr, mr1},
+ Outputs: []operand.Op{mr, mr1},
+ }, nil
+ case operand.IsR8(mr) && operand.IsM8(mr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGB",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr, mr1},
+ Outputs: []operand.Op{mr, mr1},
+ }, nil
+ }
+ return nil, errors.New("XCHGB: bad operands")
+}
+
+// XCHGL: Exchange Register/Memory with Register.
+//
+// Forms:
+//
+// XCHGL r32 eax
+// XCHGL eax r32
+// XCHGL r32 r32
+// XCHGL m32 r32
+// XCHGL r32 m32
+func XCHGL(emr, emr1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR32(emr) && operand.IsEAX(emr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGL",
+ Operands: []operand.Op{emr, emr1},
+ Inputs: []operand.Op{emr, emr1},
+ Outputs: []operand.Op{emr, emr1},
+ }, nil
+ case operand.IsEAX(emr) && operand.IsR32(emr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGL",
+ Operands: []operand.Op{emr, emr1},
+ Inputs: []operand.Op{emr, emr1},
+ Outputs: []operand.Op{emr, emr1},
+ }, nil
+ case operand.IsR32(emr) && operand.IsR32(emr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGL",
+ Operands: []operand.Op{emr, emr1},
+ Inputs: []operand.Op{emr, emr1},
+ Outputs: []operand.Op{emr, emr1},
+ }, nil
+ case operand.IsM32(emr) && operand.IsR32(emr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGL",
+ Operands: []operand.Op{emr, emr1},
+ Inputs: []operand.Op{emr, emr1},
+ Outputs: []operand.Op{emr, emr1},
+ }, nil
+ case operand.IsR32(emr) && operand.IsM32(emr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGL",
+ Operands: []operand.Op{emr, emr1},
+ Inputs: []operand.Op{emr, emr1},
+ Outputs: []operand.Op{emr, emr1},
+ }, nil
+ }
+ return nil, errors.New("XCHGL: bad operands")
+}
+
+// XCHGQ: Exchange Register/Memory with Register.
+//
+// Forms:
+//
+// XCHGQ r64 rax
+// XCHGQ rax r64
+// XCHGQ r64 r64
+// XCHGQ m64 r64
+// XCHGQ r64 m64
+func XCHGQ(mr, mr1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR64(mr) && operand.IsRAX(mr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGQ",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr, mr1},
+ Outputs: []operand.Op{mr, mr1},
+ }, nil
+ case operand.IsRAX(mr) && operand.IsR64(mr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGQ",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr, mr1},
+ Outputs: []operand.Op{mr, mr1},
+ }, nil
+ case operand.IsR64(mr) && operand.IsR64(mr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGQ",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr, mr1},
+ Outputs: []operand.Op{mr, mr1},
+ }, nil
+ case operand.IsM64(mr) && operand.IsR64(mr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGQ",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr, mr1},
+ Outputs: []operand.Op{mr, mr1},
+ }, nil
+ case operand.IsR64(mr) && operand.IsM64(mr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGQ",
+ Operands: []operand.Op{mr, mr1},
+ Inputs: []operand.Op{mr, mr1},
+ Outputs: []operand.Op{mr, mr1},
+ }, nil
+ }
+ return nil, errors.New("XCHGQ: bad operands")
+}
+
+// XCHGW: Exchange Register/Memory with Register.
+//
+// Forms:
+//
+// XCHGW r16 ax
+// XCHGW ax r16
+// XCHGW r16 r16
+// XCHGW m16 r16
+// XCHGW r16 m16
+func XCHGW(amr, amr1 operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsR16(amr) && operand.IsAX(amr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGW",
+ Operands: []operand.Op{amr, amr1},
+ Inputs: []operand.Op{amr, amr1},
+ Outputs: []operand.Op{amr, amr1},
+ }, nil
+ case operand.IsAX(amr) && operand.IsR16(amr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGW",
+ Operands: []operand.Op{amr, amr1},
+ Inputs: []operand.Op{amr, amr1},
+ Outputs: []operand.Op{amr, amr1},
+ }, nil
+ case operand.IsR16(amr) && operand.IsR16(amr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGW",
+ Operands: []operand.Op{amr, amr1},
+ Inputs: []operand.Op{amr, amr1},
+ Outputs: []operand.Op{amr, amr1},
+ }, nil
+ case operand.IsM16(amr) && operand.IsR16(amr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGW",
+ Operands: []operand.Op{amr, amr1},
+ Inputs: []operand.Op{amr, amr1},
+ Outputs: []operand.Op{amr, amr1},
+ }, nil
+ case operand.IsR16(amr) && operand.IsM16(amr1):
+ return &intrep.Instruction{
+ Opcode: "XCHGW",
+ Operands: []operand.Op{amr, amr1},
+ Inputs: []operand.Op{amr, amr1},
+ Outputs: []operand.Op{amr, amr1},
+ }, nil
+ }
+ return nil, errors.New("XCHGW: bad operands")
+}
+
+// XGETBV: Get Value of Extended Control Register.
+//
+// Forms:
+//
+// XGETBV
+func XGETBV() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "XGETBV",
+ Operands: nil,
+ Inputs: []operand.Op{reg.ECX},
+ Outputs: []operand.Op{reg.EAX, reg.EDX},
+ }, nil
+}
+
+// XLAT: Table Look-up Translation.
+//
+// Forms:
+//
+// XLAT
+func XLAT() (*intrep.Instruction, error) {
+ return &intrep.Instruction{
+ Opcode: "XLAT",
+ Operands: nil,
+ Inputs: []operand.Op{reg.AL, reg.EBX},
+ Outputs: []operand.Op{reg.AL},
+ }, nil
+}
+
+// XORB: Logical Exclusive OR.
+//
+// Forms:
+//
+// XORB imm8 al
+// XORB imm8 r8
+// XORB r8 r8
+// XORB m8 r8
+// XORB imm8 m8
+// XORB r8 m8
+func XORB(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM8(imr) && operand.IsAL(amr):
+ return &intrep.Instruction{
+ Opcode: "XORB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "XORB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "XORB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM8(imr) && operand.IsR8(amr):
+ return &intrep.Instruction{
+ Opcode: "XORB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "XORB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR8(imr) && operand.IsM8(amr):
+ return &intrep.Instruction{
+ Opcode: "XORB",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("XORB: bad operands")
+}
+
+// XORL: Logical Exclusive OR.
+//
+// Forms:
+//
+// XORL imm32 eax
+// XORL imm8 r32
+// XORL imm32 r32
+// XORL r32 r32
+// XORL m32 r32
+// XORL imm8 m32
+// XORL imm32 m32
+// XORL r32 m32
+func XORL(imr, emr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsEAX(emr):
+ return &intrep.Instruction{
+ Opcode: "XORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "XORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "XORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "XORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM32(imr) && operand.IsR32(emr):
+ return &intrep.Instruction{
+ Opcode: "XORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "XORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "XORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ case operand.IsR32(imr) && operand.IsM32(emr):
+ return &intrep.Instruction{
+ Opcode: "XORL",
+ Operands: []operand.Op{imr, emr},
+ Inputs: []operand.Op{imr, emr},
+ Outputs: []operand.Op{emr},
+ }, nil
+ }
+ return nil, errors.New("XORL: bad operands")
+}
+
+// XORPD: Bitwise Logical XOR for Double-Precision Floating-Point Values.
+//
+// Forms:
+//
+// XORPD xmm xmm
+// XORPD m128 xmm
+func XORPD(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "XORPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "XORPD",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE2"},
+ }, nil
+ }
+ return nil, errors.New("XORPD: bad operands")
+}
+
+// XORPS: Bitwise Logical XOR for Single-Precision Floating-Point Values.
+//
+// Forms:
+//
+// XORPS xmm xmm
+// XORPS m128 xmm
+func XORPS(mx, x operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsXMM(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "XORPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM128(mx) && operand.IsXMM(x):
+ return &intrep.Instruction{
+ Opcode: "XORPS",
+ Operands: []operand.Op{mx, x},
+ Inputs: []operand.Op{mx, x},
+ Outputs: []operand.Op{x},
+ ISA: []string{"SSE"},
+ }, nil
+ }
+ return nil, errors.New("XORPS: bad operands")
+}
+
+// XORQ: Logical Exclusive OR.
+//
+// Forms:
+//
+// XORQ imm32 rax
+// XORQ imm8 r64
+// XORQ imm32 r64
+// XORQ r64 r64
+// XORQ m64 r64
+// XORQ imm8 m64
+// XORQ imm32 m64
+// XORQ r64 m64
+func XORQ(imr, mr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM32(imr) && operand.IsRAX(mr):
+ return &intrep.Instruction{
+ Opcode: "XORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "XORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "XORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "XORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM64(imr) && operand.IsR64(mr):
+ return &intrep.Instruction{
+ Opcode: "XORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "XORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsIMM32(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "XORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ case operand.IsR64(imr) && operand.IsM64(mr):
+ return &intrep.Instruction{
+ Opcode: "XORQ",
+ Operands: []operand.Op{imr, mr},
+ Inputs: []operand.Op{imr, mr},
+ Outputs: []operand.Op{mr},
+ }, nil
+ }
+ return nil, errors.New("XORQ: bad operands")
+}
+
+// XORW: Logical Exclusive OR.
+//
+// Forms:
+//
+// XORW imm16 ax
+// XORW imm8 r16
+// XORW imm16 r16
+// XORW r16 r16
+// XORW m16 r16
+// XORW imm8 m16
+// XORW imm16 m16
+// XORW r16 m16
+func XORW(imr, amr operand.Op) (*intrep.Instruction, error) {
+ switch {
+ case operand.IsIMM16(imr) && operand.IsAX(amr):
+ return &intrep.Instruction{
+ Opcode: "XORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "XORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "XORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "XORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ CancellingInputs: true,
+ }, nil
+ case operand.IsM16(imr) && operand.IsR16(amr):
+ return &intrep.Instruction{
+ Opcode: "XORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM8(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "XORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsIMM16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "XORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ case operand.IsR16(imr) && operand.IsM16(amr):
+ return &intrep.Instruction{
+ Opcode: "XORW",
+ Operands: []operand.Op{imr, amr},
+ Inputs: []operand.Op{imr, amr},
+ Outputs: []operand.Op{amr},
+ }, nil
+ }
+ return nil, errors.New("XORW: bad operands")
+}
diff --git a/vendor/github.com/pion/datachannel/.gitignore b/vendor/github.com/pion/datachannel/.gitignore
new file mode 100644
index 0000000..23501a3
--- /dev/null
+++ b/vendor/github.com/pion/datachannel/.gitignore
@@ -0,0 +1,2 @@
+# vim temporary files
+*.sw[poe]
diff --git a/vendor/github.com/pion/datachannel/.golangci.yml b/vendor/github.com/pion/datachannel/.golangci.yml
new file mode 100644
index 0000000..570f17b
--- /dev/null
+++ b/vendor/github.com/pion/datachannel/.golangci.yml
@@ -0,0 +1,8 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+
+run:
+ skip-dirs-use-default: false
diff --git a/vendor/github.com/pion/datachannel/DESIGN.md b/vendor/github.com/pion/datachannel/DESIGN.md
new file mode 100644
index 0000000..55d6c8f
--- /dev/null
+++ b/vendor/github.com/pion/datachannel/DESIGN.md
@@ -0,0 +1,20 @@
+<h1 align="center">
+ Design
+</h1>
+
+### Portable
+Pion Data Channels is written in Go and extremely portable. Anywhere Golang runs, Pion Data Channels should work as well! Instead of dealing with complicated
+cross-compiling of multiple libraries, you now can run anywhere with one `go build`
+
+### Simple API
+The API is based on an io.ReadWriteCloser.
+
+### Readable
+If code comes from an RFC we try to make sure everything is commented with a link to the spec.
+This makes learning and debugging easier, this library was written to also serve as a guide for others.
+
+### Tested
+Every commit is tested via travis-ci Go provides fantastic facilities for testing, and more will be added as time goes on.
+
+### Shared libraries
+Every pion product is built using shared libraries, allowing others to review and reuse our libraries.
diff --git a/vendor/github.com/pion/datachannel/LICENSE b/vendor/github.com/pion/datachannel/LICENSE
new file mode 100644
index 0000000..ab60297
--- /dev/null
+++ b/vendor/github.com/pion/datachannel/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/datachannel/README.md b/vendor/github.com/pion/datachannel/README.md
new file mode 100644
index 0000000..1132f62
--- /dev/null
+++ b/vendor/github.com/pion/datachannel/README.md
@@ -0,0 +1,45 @@
+<h1 align="center">
+ <br>
+ Pion Data Channels
+ <br>
+</h1>
+<h4 align="center">A Go implementation of WebRTC Data Channels</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-datachannel-gray.svg?longCache=true&colorB=brightgreen" alt="Pion Data Channels"></a>
+ <!--<a href="https://sourcegraph.com/github.com/pion/webrtc?badge"><img src="https://sourcegraph.com/github.com/pion/webrtc/-/badge.svg" alt="Sourcegraph Widget"></a>-->
+ <a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/datachannel"><img src="https://travis-ci.org/pion/datachannel.svg?branch=master" alt="Build Status"></a>
+ <a href="https://pkg.go.dev/github.com/pion/datachannel"><img src="https://godoc.org/github.com/pion/datachannel?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/datachannel"><img src="https://codecov.io/gh/pion/datachannel/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/datachannel"><img src="https://goreportcard.com/badge/github.com/pion/datachannel" alt="Go Report Card"></a>
+ <!--<a href="https://www.codacy.com/app/Sean-Der/webrtc"><img src="https://api.codacy.com/project/badge/Grade/18f4aec384894e6aac0b94effe51961d" alt="Codacy Badge"></a>-->
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+See [DESIGN.md](DESIGN.md) for an overview of features and future goals.
+
+### Roadmap
+The library is used as a part of our WebRTC implementation. Please refer to that [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
+
+### Community
+Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [John Bradley](https://github.com/kc5nra) - *Original Author*
+* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
+* [Michiel De Backker](https://github.com/backkem) - *Public API*
+* [Yutaka Takeda](https://github.com/enobufs) - *PR-SCTP*
+* [Hugo Arregui](https://github.com/hugoArregui)
+* [Atsushi Watanabe](https://github.com/at-wat)
+* [Norman Rasmussen](https://github.com/normanr) - *Fix Empty DataChannel messages*
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/datachannel/codecov.yml b/vendor/github.com/pion/datachannel/codecov.yml
new file mode 100644
index 0000000..085200a
--- /dev/null
+++ b/vendor/github.com/pion/datachannel/codecov.yml
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+
+coverage:
+ status:
+ project:
+ default:
+ # Allow decreasing 2% of total coverage to avoid noise.
+ threshold: 2%
+ patch:
+ default:
+ target: 70%
+ only_pulls: true
+
+ignore:
+ - "examples/*"
+ - "examples/**/*"
diff --git a/vendor/github.com/pion/datachannel/datachannel.go b/vendor/github.com/pion/datachannel/datachannel.go
new file mode 100644
index 0000000..237ad72
--- /dev/null
+++ b/vendor/github.com/pion/datachannel/datachannel.go
@@ -0,0 +1,378 @@
+// Package datachannel implements WebRTC Data Channels
+package datachannel
+
+import (
+ "fmt"
+ "io"
+ "sync/atomic"
+
+ "github.com/pion/logging"
+ "github.com/pion/sctp"
+ "github.com/pkg/errors"
+)
+
+const receiveMTU = 8192
+
+// Reader is an extended io.Reader
+// that also returns if the message is text.
+type Reader interface {
+ ReadDataChannel([]byte) (int, bool, error)
+}
+
+// Writer is an extended io.Writer
+// that also allows indicating if a message is text.
+type Writer interface {
+ WriteDataChannel([]byte, bool) (int, error)
+}
+
+// ReadWriteCloser is an extended io.ReadWriteCloser
+// that also implements our Reader and Writer.
+type ReadWriteCloser interface {
+ io.Reader
+ io.Writer
+ Reader
+ Writer
+ io.Closer
+}
+
+// DataChannel represents a data channel
+type DataChannel struct {
+ Config
+
+ // stats
+ messagesSent uint32
+ messagesReceived uint32
+ bytesSent uint64
+ bytesReceived uint64
+
+ stream *sctp.Stream
+ log logging.LeveledLogger
+}
+
+// Config is used to configure the data channel.
+type Config struct {
+ ChannelType ChannelType
+ Negotiated bool
+ Priority uint16
+ ReliabilityParameter uint32
+ Label string
+ Protocol string
+ LoggerFactory logging.LoggerFactory
+}
+
+func newDataChannel(stream *sctp.Stream, config *Config) (*DataChannel, error) {
+ return &DataChannel{
+ Config: *config,
+ stream: stream,
+ log: config.LoggerFactory.NewLogger("datachannel"),
+ }, nil
+}
+
+// Dial opens a data channels over SCTP
+func Dial(a *sctp.Association, id uint16, config *Config) (*DataChannel, error) {
+ stream, err := a.OpenStream(id, sctp.PayloadTypeWebRTCBinary)
+ if err != nil {
+ return nil, err
+ }
+
+ dc, err := Client(stream, config)
+ if err != nil {
+ return nil, err
+ }
+
+ return dc, nil
+}
+
+// Client opens a data channel over an SCTP stream
+func Client(stream *sctp.Stream, config *Config) (*DataChannel, error) {
+ msg := &channelOpen{
+ ChannelType: config.ChannelType,
+ Priority: config.Priority,
+ ReliabilityParameter: config.ReliabilityParameter,
+
+ Label: []byte(config.Label),
+ Protocol: []byte(config.Protocol),
+ }
+
+ if !config.Negotiated {
+ rawMsg, err := msg.Marshal()
+ if err != nil {
+ return nil, fmt.Errorf("failed to marshal ChannelOpen %v", err)
+ }
+
+ if _, err = stream.WriteSCTP(rawMsg, sctp.PayloadTypeWebRTCDCEP); err != nil {
+ return nil, fmt.Errorf("failed to send ChannelOpen %v", err)
+ }
+ }
+ return newDataChannel(stream, config)
+}
+
+// Accept is used to accept incoming data channels over SCTP
+func Accept(a *sctp.Association, config *Config) (*DataChannel, error) {
+ stream, err := a.AcceptStream()
+ if err != nil {
+ return nil, err
+ }
+
+ stream.SetDefaultPayloadType(sctp.PayloadTypeWebRTCBinary)
+
+ dc, err := Server(stream, config)
+ if err != nil {
+ return nil, err
+ }
+
+ return dc, nil
+}
+
+// Server accepts a data channel over an SCTP stream
+func Server(stream *sctp.Stream, config *Config) (*DataChannel, error) {
+ buffer := make([]byte, receiveMTU) // TODO: Can probably be smaller
+ n, ppi, err := stream.ReadSCTP(buffer)
+ if err != nil {
+ return nil, err
+ }
+
+ if ppi != sctp.PayloadTypeWebRTCDCEP {
+ return nil, fmt.Errorf("unexpected packet type: %s", ppi)
+ }
+
+ openMsg, err := parseExpectDataChannelOpen(buffer[:n])
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to parse DataChannelOpen packet")
+ }
+
+ config.ChannelType = openMsg.ChannelType
+ config.Priority = openMsg.Priority
+ config.ReliabilityParameter = openMsg.ReliabilityParameter
+ config.Label = string(openMsg.Label)
+ config.Protocol = string(openMsg.Protocol)
+
+ dataChannel, err := newDataChannel(stream, config)
+ if err != nil {
+ return nil, err
+ }
+
+ err = dataChannel.writeDataChannelAck()
+ if err != nil {
+ return nil, err
+ }
+
+ err = dataChannel.commitReliabilityParams()
+ if err != nil {
+ return nil, err
+ }
+ return dataChannel, nil
+}
+
+// Read reads a packet of len(p) bytes as binary data
+func (c *DataChannel) Read(p []byte) (int, error) {
+ n, _, err := c.ReadDataChannel(p)
+ return n, err
+}
+
+// ReadDataChannel reads a packet of len(p) bytes
+func (c *DataChannel) ReadDataChannel(p []byte) (int, bool, error) {
+ for {
+ n, ppi, err := c.stream.ReadSCTP(p)
+ if err == io.EOF {
+ // When the peer sees that an incoming stream was
+ // reset, it also resets its corresponding outgoing stream.
+ closeErr := c.stream.Close()
+ if closeErr != nil {
+ return 0, false, closeErr
+ }
+ }
+ if err != nil {
+ return 0, false, err
+ }
+
+ var isString bool
+ switch ppi {
+ case sctp.PayloadTypeWebRTCDCEP:
+ err = c.handleDCEP(p[:n])
+ if err != nil {
+ c.log.Errorf("Failed to handle DCEP: %s", err.Error())
+ continue
+ }
+ continue
+ case sctp.PayloadTypeWebRTCString, sctp.PayloadTypeWebRTCStringEmpty:
+ isString = true
+ }
+ switch ppi {
+ case sctp.PayloadTypeWebRTCBinaryEmpty, sctp.PayloadTypeWebRTCStringEmpty:
+ n = 0
+ }
+
+ atomic.AddUint32(&c.messagesReceived, 1)
+ atomic.AddUint64(&c.bytesReceived, uint64(n))
+
+ return n, isString, err
+ }
+}
+
+// MessagesSent returns the number of messages sent
+func (c *DataChannel) MessagesSent() uint32 {
+ return atomic.LoadUint32(&c.messagesSent)
+}
+
+// MessagesReceived returns the number of messages received
+func (c *DataChannel) MessagesReceived() uint32 {
+ return atomic.LoadUint32(&c.messagesReceived)
+}
+
+// BytesSent returns the number of bytes sent
+func (c *DataChannel) BytesSent() uint64 {
+ return atomic.LoadUint64(&c.bytesSent)
+}
+
+// BytesReceived returns the number of bytes received
+func (c *DataChannel) BytesReceived() uint64 {
+ return atomic.LoadUint64(&c.bytesReceived)
+}
+
+// StreamIdentifier returns the Stream identifier associated to the stream.
+func (c *DataChannel) StreamIdentifier() uint16 {
+ return c.stream.StreamIdentifier()
+}
+
+func (c *DataChannel) handleDCEP(data []byte) error {
+ msg, err := parse(data)
+ if err != nil {
+ return errors.Wrap(err, "Failed to parse DataChannel packet")
+ }
+
+ switch msg := msg.(type) {
+ case *channelOpen:
+ c.log.Debug("Received DATA_CHANNEL_OPEN")
+ err = c.writeDataChannelAck()
+ if err != nil {
+ return fmt.Errorf("failed to ACK channel open: %v", err)
+ }
+ // Note: DATA_CHANNEL_OPEN message is handled inside Server() method.
+ // Therefore, the message will not reach here.
+
+ case *channelAck:
+ c.log.Debug("Received DATA_CHANNEL_ACK")
+ err = c.commitReliabilityParams()
+ if err != nil {
+ return err
+ }
+ // TODO: handle ChannelAck (https://tools.ietf.org/html/draft-ietf-rtcweb-data-protocol-09#section-5.2)
+
+ default:
+ return fmt.Errorf("unhandled DataChannel message %v", msg)
+ }
+
+ return nil
+}
+
+// Write writes len(p) bytes from p as binary data
+func (c *DataChannel) Write(p []byte) (n int, err error) {
+ return c.WriteDataChannel(p, false)
+}
+
+// WriteDataChannel writes len(p) bytes from p
+func (c *DataChannel) WriteDataChannel(p []byte, isString bool) (n int, err error) {
+ // https://tools.ietf.org/html/draft-ietf-rtcweb-data-channel-12#section-6.6
+ // SCTP does not support the sending of empty user messages. Therefore,
+ // if an empty message has to be sent, the appropriate PPID (WebRTC
+ // String Empty or WebRTC Binary Empty) is used and the SCTP user
+ // message of one zero byte is sent. When receiving an SCTP user
+ // message with one of these PPIDs, the receiver MUST ignore the SCTP
+ // user message and process it as an empty message.
+ var ppi sctp.PayloadProtocolIdentifier
+ switch {
+ case !isString && len(p) > 0:
+ ppi = sctp.PayloadTypeWebRTCBinary
+ case !isString && len(p) == 0:
+ ppi = sctp.PayloadTypeWebRTCBinaryEmpty
+ case isString && len(p) > 0:
+ ppi = sctp.PayloadTypeWebRTCString
+ case isString && len(p) == 0:
+ ppi = sctp.PayloadTypeWebRTCStringEmpty
+ }
+
+ atomic.AddUint32(&c.messagesSent, 1)
+ atomic.AddUint64(&c.bytesSent, uint64(len(p)))
+
+ if len(p) == 0 {
+ _, err := c.stream.WriteSCTP([]byte{0}, ppi)
+ return 0, err
+ }
+ return c.stream.WriteSCTP(p, ppi)
+}
+
+func (c *DataChannel) writeDataChannelAck() error {
+ ack := channelAck{}
+ ackMsg, err := ack.Marshal()
+ if err != nil {
+ return fmt.Errorf("failed to marshal ChannelOpen ACK: %v", err)
+ }
+
+ _, err = c.stream.WriteSCTP(ackMsg, sctp.PayloadTypeWebRTCDCEP)
+ if err != nil {
+ return fmt.Errorf("failed to send ChannelOpen ACK: %v", err)
+ }
+
+ return err
+}
+
+// Close closes the DataChannel and the underlying SCTP stream.
+func (c *DataChannel) Close() error {
+ // https://tools.ietf.org/html/draft-ietf-rtcweb-data-channel-13#section-6.7
+ // Closing of a data channel MUST be signaled by resetting the
+ // corresponding outgoing streams [RFC6525]. This means that if one
+ // side decides to close the data channel, it resets the corresponding
+ // outgoing stream. When the peer sees that an incoming stream was
+ // reset, it also resets its corresponding outgoing stream. Once this
+ // is completed, the data channel is closed. Resetting a stream sets
+ // the Stream Sequence Numbers (SSNs) of the stream back to 'zero' with
+ // a corresponding notification to the application layer that the reset
+ // has been performed. Streams are available for reuse after a reset
+ // has been performed.
+ return c.stream.Close()
+}
+
+// BufferedAmount returns the number of bytes of data currently queued to be
+// sent over this stream.
+func (c *DataChannel) BufferedAmount() uint64 {
+ return c.stream.BufferedAmount()
+}
+
+// BufferedAmountLowThreshold returns the number of bytes of buffered outgoing
+// data that is considered "low." Defaults to 0.
+func (c *DataChannel) BufferedAmountLowThreshold() uint64 {
+ return c.stream.BufferedAmountLowThreshold()
+}
+
+// SetBufferedAmountLowThreshold is used to update the threshold.
+// See BufferedAmountLowThreshold().
+func (c *DataChannel) SetBufferedAmountLowThreshold(th uint64) {
+ c.stream.SetBufferedAmountLowThreshold(th)
+}
+
+// OnBufferedAmountLow sets the callback handler which would be called when the
+// number of bytes of outgoing data buffered is lower than the threshold.
+func (c *DataChannel) OnBufferedAmountLow(f func()) {
+ c.stream.OnBufferedAmountLow(f)
+}
+
+func (c *DataChannel) commitReliabilityParams() error {
+ switch c.Config.ChannelType {
+ case ChannelTypeReliable:
+ c.stream.SetReliabilityParams(false, sctp.ReliabilityTypeReliable, c.Config.ReliabilityParameter)
+ case ChannelTypeReliableUnordered:
+ c.stream.SetReliabilityParams(true, sctp.ReliabilityTypeReliable, c.Config.ReliabilityParameter)
+ case ChannelTypePartialReliableRexmit:
+ c.stream.SetReliabilityParams(false, sctp.ReliabilityTypeRexmit, c.Config.ReliabilityParameter)
+ case ChannelTypePartialReliableRexmitUnordered:
+ c.stream.SetReliabilityParams(true, sctp.ReliabilityTypeRexmit, c.Config.ReliabilityParameter)
+ case ChannelTypePartialReliableTimed:
+ c.stream.SetReliabilityParams(false, sctp.ReliabilityTypeTimed, c.Config.ReliabilityParameter)
+ case ChannelTypePartialReliableTimedUnordered:
+ c.stream.SetReliabilityParams(true, sctp.ReliabilityTypeTimed, c.Config.ReliabilityParameter)
+ default:
+ return fmt.Errorf("invalid ChannelType: %v ", c.Config.ChannelType)
+ }
+ return nil
+}
diff --git a/vendor/github.com/pion/datachannel/go.mod b/vendor/github.com/pion/datachannel/go.mod
new file mode 100644
index 0000000..e635596
--- /dev/null
+++ b/vendor/github.com/pion/datachannel/go.mod
@@ -0,0 +1,11 @@
+module github.com/pion/datachannel
+
+require (
+ github.com/pion/logging v0.2.2
+ github.com/pion/sctp v1.7.10
+ github.com/pion/transport v0.10.1
+ github.com/pkg/errors v0.9.1
+ github.com/stretchr/testify v1.6.1
+)
+
+go 1.13
diff --git a/vendor/github.com/pion/datachannel/go.sum b/vendor/github.com/pion/datachannel/go.sum
new file mode 100644
index 0000000..f9ede08
--- /dev/null
+++ b/vendor/github.com/pion/datachannel/go.sum
@@ -0,0 +1,38 @@
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
+github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
+github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
+github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
+github.com/pion/sctp v1.7.10 h1:o3p3/hZB5Cx12RMGyWmItevJtZ6o2cpuxaw6GOS4x+8=
+github.com/pion/sctp v1.7.10/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0=
+github.com/pion/transport v0.10.1 h1:2W+yJT+0mOQ160ThZYUx5Zp2skzshiNgxrNE9GUfhJM=
+github.com/pion/transport v0.10.1/go.mod h1:PBis1stIILMiis0PewDw91WJeLJkyIMcEk+DwKOzf4A=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/pion/datachannel/message.go b/vendor/github.com/pion/datachannel/message.go
new file mode 100644
index 0000000..84665cb
--- /dev/null
+++ b/vendor/github.com/pion/datachannel/message.go
@@ -0,0 +1,94 @@
+package datachannel
+
+import (
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+// message is a parsed DataChannel message
+type message interface {
+ Marshal() ([]byte, error)
+ Unmarshal([]byte) error
+}
+
+// messageType is the first byte in a DataChannel message that specifies type
+type messageType byte
+
+// DataChannel Message Types
+const (
+ dataChannelAck messageType = 0x02
+ dataChannelOpen messageType = 0x03
+)
+
+func (t messageType) String() string {
+ switch t {
+ case dataChannelAck:
+ return "DataChannelAck"
+ case dataChannelOpen:
+ return "DataChannelOpen"
+ default:
+ return fmt.Sprintf("Unknown MessageType: %d", t)
+ }
+}
+
+// parse accepts raw input and returns a DataChannel message
+func parse(raw []byte) (message, error) {
+ if len(raw) == 0 {
+ return nil, errors.Errorf("DataChannel message is not long enough to determine type ")
+ }
+
+ var msg message
+ switch messageType(raw[0]) {
+ case dataChannelOpen:
+ msg = &channelOpen{}
+ case dataChannelAck:
+ msg = &channelAck{}
+ default:
+ return nil, errors.Errorf("Unknown MessageType %v", messageType(raw[0]))
+ }
+
+ if err := msg.Unmarshal(raw); err != nil {
+ return nil, err
+ }
+
+ return msg, nil
+}
+
+// parseExpectDataChannelOpen parses a DataChannelOpen message
+// or throws an error
+func parseExpectDataChannelOpen(raw []byte) (*channelOpen, error) {
+ if len(raw) == 0 {
+ return nil, errors.Errorf("the DataChannel message is not long enough to determine type")
+ }
+
+ if actualTyp := messageType(raw[0]); actualTyp != dataChannelOpen {
+ return nil, errors.Errorf("expected DataChannelOpen but got %s", actualTyp)
+ }
+
+ msg := &channelOpen{}
+ if err := msg.Unmarshal(raw); err != nil {
+ return nil, err
+ }
+
+ return msg, nil
+}
+
+// parseExpectDataChannelAck parses a DataChannelAck message
+// or throws an error
+// func parseExpectDataChannelAck(raw []byte) (*channelAck, error) {
+// if len(raw) == 0 {
+// return nil, errors.Errorf("the DataChannel message is not long enough to determine type")
+// }
+//
+// if actualTyp := messageType(raw[0]); actualTyp != dataChannelAck {
+// return nil, errors.Errorf("expected DataChannelAck but got %s", actualTyp)
+// }
+//
+// msg := &channelAck{}
+// if err := msg.Unmarshal(raw); err != nil {
+// return nil, err
+// }
+//
+// return msg, nil
+// }
diff --git a/vendor/github.com/pion/datachannel/message_channel_ack.go b/vendor/github.com/pion/datachannel/message_channel_ack.go
new file mode 100644
index 0000000..fd20757
--- /dev/null
+++ b/vendor/github.com/pion/datachannel/message_channel_ack.go
@@ -0,0 +1,22 @@
+package datachannel
+
+// channelAck is used to ACK a DataChannel open
+type channelAck struct{}
+
+const (
+ channelOpenAckLength = 4
+)
+
+// Marshal returns raw bytes for the given message
+func (c *channelAck) Marshal() ([]byte, error) {
+ raw := make([]byte, channelOpenAckLength)
+ raw[0] = uint8(dataChannelAck)
+
+ return raw, nil
+}
+
+// Unmarshal populates the struct with the given raw data
+func (c *channelAck) Unmarshal(raw []byte) error {
+ // Message type already checked in Parse and there is no further data
+ return nil
+}
diff --git a/vendor/github.com/pion/datachannel/message_channel_open.go b/vendor/github.com/pion/datachannel/message_channel_open.go
new file mode 100644
index 0000000..9dce036
--- /dev/null
+++ b/vendor/github.com/pion/datachannel/message_channel_open.go
@@ -0,0 +1,123 @@
+package datachannel
+
+import (
+ "encoding/binary"
+
+ "github.com/pkg/errors"
+)
+
+/*
+channelOpen represents a DATA_CHANNEL_OPEN Message
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Message Type | Channel Type | Priority |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Reliability Parameter |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Label Length | Protocol Length |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| |
+| Label |
+| |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| |
+| Protocol |
+| |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+*/
+type channelOpen struct {
+ ChannelType ChannelType
+ Priority uint16
+ ReliabilityParameter uint32
+
+ Label []byte
+ Protocol []byte
+}
+
+const (
+ channelOpenHeaderLength = 12
+)
+
+// ChannelType determines the reliability of the WebRTC DataChannel
+type ChannelType byte
+
+// ChannelType enums
+const (
+ // ChannelTypeReliable determines the Data Channel provides a
+ // reliable in-order bi-directional communication.
+ ChannelTypeReliable ChannelType = 0x00
+ // ChannelTypeReliableUnordered determines the Data Channel
+ // provides a reliable unordered bi-directional communication.
+ ChannelTypeReliableUnordered ChannelType = 0x80
+ // ChannelTypePartialReliableRexmit determines the Data Channel
+ // provides a partially-reliable in-order bi-directional communication.
+ // User messages will not be retransmitted more times than specified in the Reliability Parameter.
+ ChannelTypePartialReliableRexmit ChannelType = 0x01
+ // ChannelTypePartialReliableRexmitUnordered determines
+ // the Data Channel provides a partial reliable unordered bi-directional communication.
+ // User messages will not be retransmitted more times than specified in the Reliability Parameter.
+ ChannelTypePartialReliableRexmitUnordered ChannelType = 0x81
+ // ChannelTypePartialReliableTimed determines the Data Channel
+ // provides a partial reliable in-order bi-directional communication.
+ // User messages might not be transmitted or retransmitted after
+ // a specified life-time given in milli- seconds in the Reliability Parameter.
+ // This life-time starts when providing the user message to the protocol stack.
+ ChannelTypePartialReliableTimed ChannelType = 0x02
+ // The Data Channel provides a partial reliable unordered bi-directional
+ // communication. User messages might not be transmitted or retransmitted
+ // after a specified life-time given in milli- seconds in the Reliability Parameter.
+ // This life-time starts when providing the user message to the protocol stack.
+ ChannelTypePartialReliableTimedUnordered ChannelType = 0x82
+)
+
+// ChannelPriority enums
+const (
+ ChannelPriorityBelowNormal uint16 = 128
+ ChannelPriorityNormal uint16 = 256
+ ChannelPriorityHigh uint16 = 512
+ ChannelPriorityExtraHigh uint16 = 1024
+)
+
+// Marshal returns raw bytes for the given message
+func (c *channelOpen) Marshal() ([]byte, error) {
+ labelLength := len(c.Label)
+ protocolLength := len(c.Protocol)
+
+ totalLen := channelOpenHeaderLength + labelLength + protocolLength
+ raw := make([]byte, totalLen)
+
+ raw[0] = uint8(dataChannelOpen)
+ raw[1] = byte(c.ChannelType)
+ binary.BigEndian.PutUint16(raw[2:], c.Priority)
+ binary.BigEndian.PutUint32(raw[4:], c.ReliabilityParameter)
+ binary.BigEndian.PutUint16(raw[8:], uint16(labelLength))
+ binary.BigEndian.PutUint16(raw[10:], uint16(protocolLength))
+ endLabel := channelOpenHeaderLength + labelLength
+ copy(raw[channelOpenHeaderLength:endLabel], c.Label)
+ copy(raw[endLabel:endLabel+protocolLength], c.Protocol)
+
+ return raw, nil
+}
+
+// Unmarshal populates the struct with the given raw data
+func (c *channelOpen) Unmarshal(raw []byte) error {
+ if len(raw) < channelOpenHeaderLength {
+ return errors.Errorf("Length of input is not long enough to satisfy header %d", len(raw))
+ }
+ c.ChannelType = ChannelType(raw[1])
+ c.Priority = binary.BigEndian.Uint16(raw[2:])
+ c.ReliabilityParameter = binary.BigEndian.Uint32(raw[4:])
+
+ labelLength := binary.BigEndian.Uint16(raw[8:])
+ protocolLength := binary.BigEndian.Uint16(raw[10:])
+
+ if len(raw) != int(channelOpenHeaderLength+labelLength+protocolLength) {
+ return errors.Errorf("Label + Protocol length don't match full packet length")
+ }
+
+ c.Label = raw[channelOpenHeaderLength : channelOpenHeaderLength+labelLength]
+ c.Protocol = raw[channelOpenHeaderLength+labelLength : channelOpenHeaderLength+labelLength+protocolLength]
+ return nil
+}
diff --git a/vendor/github.com/pion/datachannel/renovate.json b/vendor/github.com/pion/datachannel/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/datachannel/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/dtls/v2/.editorconfig b/vendor/github.com/pion/dtls/v2/.editorconfig
new file mode 100644
index 0000000..d2b3206
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/.editorconfig
@@ -0,0 +1,21 @@
+# http://editorconfig.org/
+
+root = true
+
+[*]
+charset = utf-8
+insert_final_newline = true
+trim_trailing_whitespace = true
+end_of_line = lf
+
+[*.go]
+indent_style = tab
+indent_size = 4
+
+[{*.yml,*.yaml}]
+indent_style = space
+indent_size = 2
+
+# Makefiles always use tabs for indentation
+[Makefile]
+indent_style = tab
diff --git a/vendor/github.com/pion/dtls/v2/.gitignore b/vendor/github.com/pion/dtls/v2/.gitignore
new file mode 100644
index 0000000..83db74b
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/.gitignore
@@ -0,0 +1,24 @@
+### JetBrains IDE ###
+#####################
+.idea/
+
+### Emacs Temporary Files ###
+#############################
+*~
+
+### Folders ###
+###############
+bin/
+vendor/
+node_modules/
+
+### Files ###
+#############
+*.ivf
+*.ogg
+tags
+cover.out
+*.sw[poe]
+*.wasm
+examples/sfu-ws/cert.pem
+examples/sfu-ws/key.pem
diff --git a/vendor/github.com/pion/dtls/v2/.golangci.yml b/vendor/github.com/pion/dtls/v2/.golangci.yml
new file mode 100644
index 0000000..d6162c9
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/.golangci.yml
@@ -0,0 +1,89 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+ exhaustive:
+ default-signifies-exhaustive: true
+ gomodguard:
+ blocked:
+ modules:
+ - github.com/pkg/errors:
+ recommendations:
+ - errors
+
+linters:
+ enable:
+ - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
+ - bodyclose # checks whether HTTP response body is closed successfully
+ - deadcode # Finds unused code
+ - depguard # Go linter that checks if package imports are in a list of acceptable packages
+ - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
+ - dupl # Tool for code clone detection
+ - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
+ - exhaustive # check exhaustiveness of enum switch statements
+ - exportloopref # checks for pointers to enclosing loop variables
+ - gci # Gci control golang package import order and make it always deterministic.
+ - gochecknoglobals # Checks that no globals are present in Go code
+ - gochecknoinits # Checks that no init functions are present in Go code
+ - gocognit # Computes and checks the cognitive complexity of functions
+ - goconst # Finds repeated strings that could be replaced by a constant
+ - gocritic # The most opinionated Go source code linter
+ - godox # Tool for detection of FIXME, TODO and other comment keywords
+ - goerr113 # Golang linter to check the errors handling expressions
+ - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
+ - gofumpt # Gofumpt checks whether code was gofumpt-ed.
+ - goheader # Checks is file header matches to pattern
+ - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
+ - golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
+ - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.
+ - goprintffuncname # Checks that printf-like functions are named with `f` at the end
+ - gosec # Inspects source code for security problems
+ - gosimple # Linter for Go source code that specializes in simplifying a code
+ - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
+ - ineffassign # Detects when assignments to existing variables are not used
+ - misspell # Finds commonly misspelled English words in comments
+ - nakedret # Finds naked returns in functions greater than a specified function length
+ - noctx # noctx finds sending http request without context.Context
+ - scopelint # Scopelint checks for unpinned variables in go programs
+ - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
+ - structcheck # Finds unused struct fields
+ - stylecheck # Stylecheck is a replacement for golint
+ - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
+ - unconvert # Remove unnecessary type conversions
+ - unparam # Reports unused function parameters
+ - unused # Checks Go code for unused constants, variables, functions and types
+ - varcheck # Finds unused global variables and constants
+ - whitespace # Tool for detection of leading and trailing whitespace
+ disable:
+ - funlen # Tool for detection of long functions
+ - gocyclo # Computes and checks the cyclomatic complexity of functions
+ - godot # Check if comments end in a period
+ - gomnd # An analyzer to detect magic numbers.
+ - lll # Reports long lines
+ - maligned # Tool to detect Go structs that would take less memory if their fields were sorted
+ - nestif # Reports deeply nested if statements
+ - nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
+ - nolintlint # Reports ill-formed or insufficient nolint directives
+ - prealloc # Finds slice declarations that could potentially be preallocated
+ - rowserrcheck # checks whether Err of rows is checked successfully
+ - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
+ - testpackage # linter that makes you use a separate _test package
+ - wsl # Whitespace Linter - Forces you to use empty lines!
+
+issues:
+ exclude-use-default: false
+ exclude-rules:
+ # Allow complex tests, better to be self contained
+ - path: _test\.go
+ linters:
+ - gocognit
+
+ # Allow complex main function in examples
+ - path: examples
+ text: "of func `main` is high"
+ linters:
+ - gocognit
+
+run:
+ skip-dirs-use-default: false
diff --git a/vendor/github.com/pion/dtls/v2/LICENSE b/vendor/github.com/pion/dtls/v2/LICENSE
new file mode 100644
index 0000000..ab60297
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/dtls/v2/Makefile b/vendor/github.com/pion/dtls/v2/Makefile
new file mode 100644
index 0000000..1df38b2
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/Makefile
@@ -0,0 +1,6 @@
+fuzz-build-record-layer: fuzz-prepare
+ go-fuzz-build -tags gofuzz -func FuzzRecordLayer
+fuzz-run-record-layer:
+ go-fuzz -bin dtls-fuzz.zip -workdir fuzz
+fuzz-prepare:
+ @GO111MODULE=on go mod vendor
diff --git a/vendor/github.com/pion/dtls/v2/README.md b/vendor/github.com/pion/dtls/v2/README.md
new file mode 100644
index 0000000..62cac7c
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/README.md
@@ -0,0 +1,155 @@
+<h1 align="center">
+ <br>
+ Pion DTLS
+ <br>
+</h1>
+<h4 align="center">A Go implementation of DTLS</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-dtls-gray.svg?longCache=true&colorB=brightgreen" alt="Pion DTLS"></a>
+ <a href="https://sourcegraph.com/github.com/pion/dtls"><img src="https://sourcegraph.com/github.com/pion/dtls/-/badge.svg" alt="Sourcegraph Widget"></a>
+ <a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/dtls"><img src="https://travis-ci.org/pion/dtls.svg?branch=master" alt="Build Status"></a>
+ <a href="https://pkg.go.dev/github.com/pion/dtls"><img src="https://godoc.org/github.com/pion/dtls?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/dtls"><img src="https://codecov.io/gh/pion/dtls/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/dtls"><img src="https://goreportcard.com/badge/github.com/pion/dtls" alt="Go Report Card"></a>
+ <a href="https://www.codacy.com/app/Sean-Der/dtls"><img src="https://api.codacy.com/project/badge/Grade/18f4aec384894e6aac0b94effe51961d" alt="Codacy Badge"></a>
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+Native [DTLS 1.2][rfc6347] implementation in the Go programming language.
+
+A long term goal is a professional security review, and maye inclusion in stdlib.
+
+[rfc6347]: https://tools.ietf.org/html/rfc6347
+
+### Goals/Progress
+This will only be targeting DTLS 1.2, and the most modern/common cipher suites.
+We would love contributes that fall under the 'Planned Features' and fixing any bugs!
+
+#### Current features
+* DTLS 1.2 Client/Server
+* Key Exchange via ECDHE(curve25519, nistp256, nistp384) and PSK
+* Packet loss and re-ordering is handled during handshaking
+* Key export ([RFC 5705][rfc5705])
+* Serialization and Resumption of sessions
+* Extended Master Secret extension ([RFC 7627][rfc7627])
+
+[rfc5705]: https://tools.ietf.org/html/rfc5705
+[rfc7627]: https://tools.ietf.org/html/rfc7627
+
+#### Supported ciphers
+
+##### ECDHE
+* TLS_ECDHE_ECDSA_WITH_AES_128_CCM ([RFC 6655][rfc6655])
+* TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 ([RFC 6655][rfc6655])
+* TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ([RFC 5289][rfc5289])
+* TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 ([RFC 5289][rfc5289])
+* TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA ([RFC 8422][rfc8422])
+* TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA ([RFC 8422][rfc8422])
+
+##### PSK
+* TLS_PSK_WITH_AES_128_CCM ([RFC 6655][rfc6655])
+* TLS_PSK_WITH_AES_128_CCM_8 ([RFC 6655][rfc6655])
+* TLS_PSK_WITH_AES_128_GCM_SHA256 ([RFC 5487][rfc5487])
+* TLS_PSK_WITH_AES_128_CBC_SHA256 ([RFC 5487][rfc5487])
+
+[rfc5289]: https://tools.ietf.org/html/rfc5289
+[rfc8422]: https://tools.ietf.org/html/rfc8422
+[rfc6655]: https://tools.ietf.org/html/rfc6655
+[rfc5487]: https://tools.ietf.org/html/rfc5487
+
+#### Planned Features
+* Chacha20Poly1305
+
+#### Excluded Features
+* DTLS 1.0
+* Renegotiation
+* Compression
+
+### Using
+
+This library needs at least Go 1.13, and you should have [Go modules
+enabled](https://github.com/golang/go/wiki/Modules).
+
+#### Pion DTLS
+For a DTLS 1.2 Server that listens on 127.0.0.1:4444
+```sh
+go run examples/listen/selfsign/main.go
+```
+
+For a DTLS 1.2 Client that connects to 127.0.0.1:4444
+```sh
+go run examples/dial/selfsign/main.go
+```
+
+#### OpenSSL
+Pion DTLS can connect to itself and OpenSSL.
+```
+ // Generate a certificate
+ openssl ecparam -out key.pem -name prime256v1 -genkey
+ openssl req -new -sha256 -key key.pem -out server.csr
+ openssl x509 -req -sha256 -days 365 -in server.csr -signkey key.pem -out cert.pem
+
+ // Use with examples/dial/selfsign/main.go
+ openssl s_server -dtls1_2 -cert cert.pem -key key.pem -accept 4444
+
+ // Use with examples/listen/selfsign/main.go
+ openssl s_client -dtls1_2 -connect 127.0.0.1:4444 -debug -cert cert.pem -key key.pem
+```
+
+### Using with PSK
+Pion DTLS also comes with examples that do key exchange via PSK
+
+
+#### Pion DTLS
+```sh
+go run examples/listen/psk/main.go
+```
+
+```sh
+go run examples/dial/psk/main.go
+```
+
+#### OpenSSL
+```
+ // Use with examples/dial/psk/main.go
+ openssl s_server -dtls1_2 -accept 4444 -nocert -psk abc123 -cipher PSK-AES128-CCM8
+
+ // Use with examples/listen/psk/main.go
+ openssl s_client -dtls1_2 -connect 127.0.0.1:4444 -psk abc123 -cipher PSK-AES128-CCM8
+```
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
+* [Michiel De Backker](https://github.com/backkem) - *Public API*
+* [Chris Hiszpanski](https://github.com/thinkski) - *Support Signature Algorithms Extension*
+* [Iñigo Garcia Olaizola](https://github.com/igolaizola) - *Serialization & resumption, cert verification, E2E*
+* [Daniele Sluijters](https://github.com/daenney) - *AES-CCM support*
+* [Jin Lei](https://github.com/jinleileiking) - *Logging*
+* [Hugo Arregui](https://github.com/hugoArregui)
+* [Lander Noterman](https://github.com/LanderN)
+* [Aleksandr Razumov](https://github.com/ernado) - *Fuzzing*
+* [Ryan Gordon](https://github.com/ryangordon)
+* [Stefan Tatschner](https://rumpelsepp.org/contact.html)
+* [Hayden James](https://github.com/hjames9)
+* [Jozef Kralik](https://github.com/jkralik)
+* [Robert Eperjesi](https://github.com/epes)
+* [Atsushi Watanabe](https://github.com/at-wat)
+* [Julien Salleyron](https://github.com/juliens) - *Server Name Indication*
+* [Jeroen de Bruijn](https://github.com/vidavidorra)
+* [bjdgyc](https://github.com/bjdgyc)
+* [Jeffrey Stoke (Jeff Ctor)](https://github.com/jeffreystoke) - *Fragmentbuffer Fix*
+* [Frank Olbricht](https://github.com/folbricht)
+* [ZHENK](https://github.com/scorpionknifes)
+* [Carson Hoffman](https://github.com/CarsonHoffman)
+* [Vadim Filimonov](https://github.com/fffilimonov)
+* [Jim Wert](https://github.com/bocajim)
+* [Alvaro Viebrantz](https://github.com/alvarowolfx)
+* [Kegan Dougal](https://github.com/Kegsay)
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/dtls/v2/certificate.go b/vendor/github.com/pion/dtls/v2/certificate.go
new file mode 100644
index 0000000..c99e1c9
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/certificate.go
@@ -0,0 +1,67 @@
+package dtls
+
+import (
+ "crypto/tls"
+ "crypto/x509"
+ "strings"
+)
+
+func (c *handshakeConfig) getCertificate(serverName string) (*tls.Certificate, error) {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+
+ if c.nameToCertificate == nil {
+ nameToCertificate := make(map[string]*tls.Certificate)
+ for i := range c.localCertificates {
+ cert := &c.localCertificates[i]
+ x509Cert := cert.Leaf
+ if x509Cert == nil {
+ var parseErr error
+ x509Cert, parseErr = x509.ParseCertificate(cert.Certificate[0])
+ if parseErr != nil {
+ continue
+ }
+ }
+ if len(x509Cert.Subject.CommonName) > 0 {
+ nameToCertificate[strings.ToLower(x509Cert.Subject.CommonName)] = cert
+ }
+ for _, san := range x509Cert.DNSNames {
+ nameToCertificate[strings.ToLower(san)] = cert
+ }
+ }
+ c.nameToCertificate = nameToCertificate
+ }
+
+ if len(c.localCertificates) == 0 {
+ return nil, errNoCertificates
+ }
+
+ if len(c.localCertificates) == 1 {
+ // There's only one choice, so no point doing any work.
+ return &c.localCertificates[0], nil
+ }
+
+ if len(serverName) == 0 {
+ return &c.localCertificates[0], nil
+ }
+
+ name := strings.TrimRight(strings.ToLower(serverName), ".")
+
+ if cert, ok := c.nameToCertificate[name]; ok {
+ return cert, nil
+ }
+
+ // try replacing labels in the name with wildcards until we get a
+ // match.
+ labels := strings.Split(name, ".")
+ for i := range labels {
+ labels[i] = "*"
+ candidate := strings.Join(labels, ".")
+ if cert, ok := c.nameToCertificate[candidate]; ok {
+ return cert, nil
+ }
+ }
+
+ // If nothing matches, return the first certificate.
+ return &c.localCertificates[0], nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/cipher_suite.go b/vendor/github.com/pion/dtls/v2/cipher_suite.go
new file mode 100644
index 0000000..ed10609
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/cipher_suite.go
@@ -0,0 +1,213 @@
+package dtls
+
+import (
+ "fmt"
+ "hash"
+
+ "github.com/pion/dtls/v2/internal/ciphersuite"
+ "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+// CipherSuiteID is an ID for our supported CipherSuites
+type CipherSuiteID = ciphersuite.ID
+
+// Supported Cipher Suites
+const (
+ // AES-128-CCM
+ TLS_ECDHE_ECDSA_WITH_AES_128_CCM CipherSuiteID = ciphersuite.TLS_ECDHE_ECDSA_WITH_AES_128_CCM //nolint:golint,stylecheck
+ TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 CipherSuiteID = ciphersuite.TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 //nolint:golint,stylecheck
+
+ // AES-128-GCM-SHA256
+ TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 CipherSuiteID = ciphersuite.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 //nolint:golint,stylecheck
+ TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 CipherSuiteID = ciphersuite.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 //nolint:golint,stylecheck
+
+ // AES-256-CBC-SHA
+ TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA CipherSuiteID = ciphersuite.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA //nolint:golint,stylecheck
+ TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA CipherSuiteID = ciphersuite.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA //nolint:golint,stylecheck
+
+ TLS_PSK_WITH_AES_128_CCM CipherSuiteID = ciphersuite.TLS_PSK_WITH_AES_128_CCM //nolint:golint,stylecheck
+ TLS_PSK_WITH_AES_128_CCM_8 CipherSuiteID = ciphersuite.TLS_PSK_WITH_AES_128_CCM_8 //nolint:golint,stylecheck
+ TLS_PSK_WITH_AES_128_GCM_SHA256 CipherSuiteID = ciphersuite.TLS_PSK_WITH_AES_128_GCM_SHA256 //nolint:golint,stylecheck
+ TLS_PSK_WITH_AES_128_CBC_SHA256 CipherSuiteID = ciphersuite.TLS_PSK_WITH_AES_128_CBC_SHA256 //nolint:golint,stylecheck
+)
+
+// CipherSuiteAuthenticationType controls what authentication method is using during the handshake for a CipherSuite
+type CipherSuiteAuthenticationType = ciphersuite.AuthenticationType
+
+// AuthenticationType Enums
+const (
+ CipherSuiteAuthenticationTypeCertificate CipherSuiteAuthenticationType = ciphersuite.AuthenticationTypeCertificate
+ CipherSuiteAuthenticationTypePreSharedKey CipherSuiteAuthenticationType = ciphersuite.AuthenticationTypePreSharedKey
+ CipherSuiteAuthenticationTypeAnonymous CipherSuiteAuthenticationType = ciphersuite.AuthenticationTypeAnonymous
+)
+
+var _ = allCipherSuites() // Necessary until this function isn't only used by Go 1.14
+
+// CipherSuite is an interface that all DTLS CipherSuites must satisfy
+type CipherSuite interface {
+ // String of CipherSuite, only used for logging
+ String() string
+
+ // ID of CipherSuite.
+ ID() CipherSuiteID
+
+ // What type of Certificate does this CipherSuite use
+ CertificateType() clientcertificate.Type
+
+ // What Hash function is used during verification
+ HashFunc() func() hash.Hash
+
+ // AuthenticationType controls what authentication method is using during the handshake
+ AuthenticationType() CipherSuiteAuthenticationType
+
+ // Called when keying material has been generated, should initialize the internal cipher
+ Init(masterSecret, clientRandom, serverRandom []byte, isClient bool) error
+ IsInitialized() bool
+
+ Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error)
+ Decrypt(in []byte) ([]byte, error)
+}
+
+// CipherSuiteName provides the same functionality as tls.CipherSuiteName
+// that appeared first in Go 1.14.
+//
+// Our implementation differs slightly in that it takes in a CiperSuiteID,
+// like the rest of our library, instead of a uint16 like crypto/tls.
+func CipherSuiteName(id CipherSuiteID) string {
+ suite := cipherSuiteForID(id, nil)
+ if suite != nil {
+ return suite.String()
+ }
+ return fmt.Sprintf("0x%04X", uint16(id))
+}
+
+// Taken from https://www.iana.org/assignments/tls-parameters/tls-parameters.xml
+// A cipherSuite is a specific combination of key agreement, cipher and MAC
+// function.
+func cipherSuiteForID(id CipherSuiteID, customCiphers func() []CipherSuite) CipherSuite {
+ switch id { //nolint:exhaustive
+ case TLS_ECDHE_ECDSA_WITH_AES_128_CCM:
+ return ciphersuite.NewTLSEcdheEcdsaWithAes128Ccm()
+ case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
+ return ciphersuite.NewTLSEcdheEcdsaWithAes128Ccm8()
+ case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:
+ return &ciphersuite.TLSEcdheEcdsaWithAes128GcmSha256{}
+ case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:
+ return &ciphersuite.TLSEcdheRsaWithAes128GcmSha256{}
+ case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:
+ return &ciphersuite.TLSEcdheEcdsaWithAes256CbcSha{}
+ case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:
+ return &ciphersuite.TLSEcdheRsaWithAes256CbcSha{}
+ case TLS_PSK_WITH_AES_128_CCM:
+ return ciphersuite.NewTLSPskWithAes128Ccm()
+ case TLS_PSK_WITH_AES_128_CCM_8:
+ return ciphersuite.NewTLSPskWithAes128Ccm8()
+ case TLS_PSK_WITH_AES_128_GCM_SHA256:
+ return &ciphersuite.TLSPskWithAes128GcmSha256{}
+ case TLS_PSK_WITH_AES_128_CBC_SHA256:
+ return &ciphersuite.TLSPskWithAes128CbcSha256{}
+ }
+
+ if customCiphers != nil {
+ for _, c := range customCiphers() {
+ if c.ID() == id {
+ return c
+ }
+ }
+ }
+
+ return nil
+}
+
+// CipherSuites we support in order of preference
+func defaultCipherSuites() []CipherSuite {
+ return []CipherSuite{
+ &ciphersuite.TLSEcdheEcdsaWithAes128GcmSha256{},
+ &ciphersuite.TLSEcdheRsaWithAes128GcmSha256{},
+ &ciphersuite.TLSEcdheEcdsaWithAes256CbcSha{},
+ &ciphersuite.TLSEcdheRsaWithAes256CbcSha{},
+ }
+}
+
+func allCipherSuites() []CipherSuite {
+ return []CipherSuite{
+ ciphersuite.NewTLSEcdheEcdsaWithAes128Ccm(),
+ ciphersuite.NewTLSEcdheEcdsaWithAes128Ccm8(),
+ &ciphersuite.TLSEcdheEcdsaWithAes128GcmSha256{},
+ &ciphersuite.TLSEcdheRsaWithAes128GcmSha256{},
+ &ciphersuite.TLSEcdheEcdsaWithAes256CbcSha{},
+ &ciphersuite.TLSEcdheRsaWithAes256CbcSha{},
+ ciphersuite.NewTLSPskWithAes128Ccm(),
+ ciphersuite.NewTLSPskWithAes128Ccm8(),
+ &ciphersuite.TLSPskWithAes128GcmSha256{},
+ }
+}
+
+func cipherSuiteIDs(cipherSuites []CipherSuite) []uint16 {
+ rtrn := []uint16{}
+ for _, c := range cipherSuites {
+ rtrn = append(rtrn, uint16(c.ID()))
+ }
+ return rtrn
+}
+
+func parseCipherSuites(userSelectedSuites []CipherSuiteID, customCipherSuites func() []CipherSuite, includeCertificateSuites, includePSKSuites bool) ([]CipherSuite, error) {
+ cipherSuitesForIDs := func(ids []CipherSuiteID) ([]CipherSuite, error) {
+ cipherSuites := []CipherSuite{}
+ for _, id := range ids {
+ c := cipherSuiteForID(id, nil)
+ if c == nil {
+ return nil, &invalidCipherSuite{id}
+ }
+ cipherSuites = append(cipherSuites, c)
+ }
+ return cipherSuites, nil
+ }
+
+ var (
+ cipherSuites []CipherSuite
+ err error
+ i int
+ )
+ if userSelectedSuites != nil {
+ cipherSuites, err = cipherSuitesForIDs(userSelectedSuites)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ cipherSuites = defaultCipherSuites()
+ }
+
+ // Put CustomCipherSuites before ID selected suites
+ if customCipherSuites != nil {
+ cipherSuites = append(customCipherSuites(), cipherSuites...)
+ }
+
+ var foundCertificateSuite, foundPSKSuite, foundAnonymousSuite bool
+ for _, c := range cipherSuites {
+ switch {
+ case includeCertificateSuites && c.AuthenticationType() == CipherSuiteAuthenticationTypeCertificate:
+ foundCertificateSuite = true
+ case includePSKSuites && c.AuthenticationType() == CipherSuiteAuthenticationTypePreSharedKey:
+ foundPSKSuite = true
+ case c.AuthenticationType() == CipherSuiteAuthenticationTypeAnonymous:
+ foundAnonymousSuite = true
+ default:
+ continue
+ }
+ cipherSuites[i] = c
+ i++
+ }
+
+ switch {
+ case includeCertificateSuites && !foundCertificateSuite && !foundAnonymousSuite:
+ return nil, errNoAvailableCertificateCipherSuite
+ case includePSKSuites && !foundPSKSuite:
+ return nil, errNoAvailablePSKCipherSuite
+ case i == 0:
+ return nil, errNoAvailableCipherSuites
+ }
+
+ return cipherSuites[:i], nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/cipher_suite_go114.go b/vendor/github.com/pion/dtls/v2/cipher_suite_go114.go
new file mode 100644
index 0000000..7bba16e
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/cipher_suite_go114.go
@@ -0,0 +1,40 @@
+// +build go1.14
+
+package dtls
+
+import (
+ "crypto/tls"
+)
+
+// VersionDTLS12 is the DTLS version in the same style as
+// VersionTLSXX from crypto/tls
+const VersionDTLS12 = 0xfefd
+
+// Convert from our cipherSuite interface to a tls.CipherSuite struct
+func toTLSCipherSuite(c CipherSuite) *tls.CipherSuite {
+ return &tls.CipherSuite{
+ ID: uint16(c.ID()),
+ Name: c.String(),
+ SupportedVersions: []uint16{VersionDTLS12},
+ Insecure: false,
+ }
+}
+
+// CipherSuites returns a list of cipher suites currently implemented by this
+// package, excluding those with security issues, which are returned by
+// InsecureCipherSuites.
+func CipherSuites() []*tls.CipherSuite {
+ suites := allCipherSuites()
+ res := make([]*tls.CipherSuite, len(suites))
+ for i, c := range suites {
+ res[i] = toTLSCipherSuite(c)
+ }
+ return res
+}
+
+// InsecureCipherSuites returns a list of cipher suites currently implemented by
+// this package and which have security issues.
+func InsecureCipherSuites() []*tls.CipherSuite {
+ var res []*tls.CipherSuite
+ return res
+}
diff --git a/vendor/github.com/pion/dtls/v2/codecov.yml b/vendor/github.com/pion/dtls/v2/codecov.yml
new file mode 100644
index 0000000..085200a
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/codecov.yml
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+
+coverage:
+ status:
+ project:
+ default:
+ # Allow decreasing 2% of total coverage to avoid noise.
+ threshold: 2%
+ patch:
+ default:
+ target: 70%
+ only_pulls: true
+
+ignore:
+ - "examples/*"
+ - "examples/**/*"
diff --git a/vendor/github.com/pion/dtls/v2/compression_method.go b/vendor/github.com/pion/dtls/v2/compression_method.go
new file mode 100644
index 0000000..693eb7a
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/compression_method.go
@@ -0,0 +1,9 @@
+package dtls
+
+import "github.com/pion/dtls/v2/pkg/protocol"
+
+func defaultCompressionMethods() []*protocol.CompressionMethod {
+ return []*protocol.CompressionMethod{
+ {},
+ }
+}
diff --git a/vendor/github.com/pion/dtls/v2/config.go b/vendor/github.com/pion/dtls/v2/config.go
new file mode 100644
index 0000000..5ad42da
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/config.go
@@ -0,0 +1,193 @@
+package dtls
+
+import (
+ "context"
+ "crypto/ecdsa"
+ "crypto/ed25519"
+ "crypto/tls"
+ "crypto/x509"
+ "io"
+ "time"
+
+ "github.com/pion/logging"
+)
+
+const keyLogLabelTLS12 = "CLIENT_RANDOM"
+
+// Config is used to configure a DTLS client or server.
+// After a Config is passed to a DTLS function it must not be modified.
+type Config struct {
+ // Certificates contains certificate chain to present to the other side of the connection.
+ // Server MUST set this if PSK is non-nil
+ // client SHOULD sets this so CertificateRequests can be handled if PSK is non-nil
+ Certificates []tls.Certificate
+
+ // CipherSuites is a list of supported cipher suites.
+ // If CipherSuites is nil, a default list is used
+ CipherSuites []CipherSuiteID
+
+ // CustomCipherSuites is a list of CipherSuites that can be
+ // provided by the user. This allow users to user Ciphers that are reserved
+ // for private usage.
+ CustomCipherSuites func() []CipherSuite
+
+ // SignatureSchemes contains the signature and hash schemes that the peer requests to verify.
+ SignatureSchemes []tls.SignatureScheme
+
+ // SRTPProtectionProfiles are the supported protection profiles
+ // Clients will send this via use_srtp and assert that the server properly responds
+ // Servers will assert that clients send one of these profiles and will respond as needed
+ SRTPProtectionProfiles []SRTPProtectionProfile
+
+ // ClientAuth determines the server's policy for
+ // TLS Client Authentication. The default is NoClientCert.
+ ClientAuth ClientAuthType
+
+ // RequireExtendedMasterSecret determines if the "Extended Master Secret" extension
+ // should be disabled, requested, or required (default requested).
+ ExtendedMasterSecret ExtendedMasterSecretType
+
+ // FlightInterval controls how often we send outbound handshake messages
+ // defaults to time.Second
+ FlightInterval time.Duration
+
+ // PSK sets the pre-shared key used by this DTLS connection
+ // If PSK is non-nil only PSK CipherSuites will be used
+ PSK PSKCallback
+ PSKIdentityHint []byte
+
+ // InsecureSkipVerify controls whether a client verifies the
+ // server's certificate chain and host name.
+ // If InsecureSkipVerify is true, TLS accepts any certificate
+ // presented by the server and any host name in that certificate.
+ // In this mode, TLS is susceptible to man-in-the-middle attacks.
+ // This should be used only for testing.
+ InsecureSkipVerify bool
+
+ // InsecureHashes allows the use of hashing algorithms that are known
+ // to be vulnerable.
+ InsecureHashes bool
+
+ // VerifyPeerCertificate, if not nil, is called after normal
+ // certificate verification by either a client or server. It
+ // receives the certificate provided by the peer and also a flag
+ // that tells if normal verification has succeedded. If it returns a
+ // non-nil error, the handshake is aborted and that error results.
+ //
+ // If normal verification fails then the handshake will abort before
+ // considering this callback. If normal verification is disabled by
+ // setting InsecureSkipVerify, or (for a server) when ClientAuth is
+ // RequestClientCert or RequireAnyClientCert, then this callback will
+ // be considered but the verifiedChains will always be nil.
+ VerifyPeerCertificate func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error
+
+ // RootCAs defines the set of root certificate authorities
+ // that one peer uses when verifying the other peer's certificates.
+ // If RootCAs is nil, TLS uses the host's root CA set.
+ RootCAs *x509.CertPool
+
+ // ClientCAs defines the set of root certificate authorities
+ // that servers use if required to verify a client certificate
+ // by the policy in ClientAuth.
+ ClientCAs *x509.CertPool
+
+ // ServerName is used to verify the hostname on the returned
+ // certificates unless InsecureSkipVerify is given.
+ ServerName string
+
+ LoggerFactory logging.LoggerFactory
+
+ // ConnectContextMaker is a function to make a context used in Dial(),
+ // Client(), Server(), and Accept(). If nil, the default ConnectContextMaker
+ // is used. It can be implemented as following.
+ //
+ // func ConnectContextMaker() (context.Context, func()) {
+ // return context.WithTimeout(context.Background(), 30*time.Second)
+ // }
+ ConnectContextMaker func() (context.Context, func())
+
+ // MTU is the length at which handshake messages will be fragmented to
+ // fit within the maximum transmission unit (default is 1200 bytes)
+ MTU int
+
+ // ReplayProtectionWindow is the size of the replay attack protection window.
+ // Duplication of the sequence number is checked in this window size.
+ // Packet with sequence number older than this value compared to the latest
+ // accepted packet will be discarded. (default is 64)
+ ReplayProtectionWindow int
+
+ // KeyLogWriter optionally specifies a destination for TLS master secrets
+ // in NSS key log format that can be used to allow external programs
+ // such as Wireshark to decrypt TLS connections.
+ // See https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format.
+ // Use of KeyLogWriter compromises security and should only be
+ // used for debugging.
+ KeyLogWriter io.Writer
+}
+
+func defaultConnectContextMaker() (context.Context, func()) {
+ return context.WithTimeout(context.Background(), 30*time.Second)
+}
+
+func (c *Config) connectContextMaker() (context.Context, func()) {
+ if c.ConnectContextMaker == nil {
+ return defaultConnectContextMaker()
+ }
+ return c.ConnectContextMaker()
+}
+
+const defaultMTU = 1200 // bytes
+
+// PSKCallback is called once we have the remote's PSKIdentityHint.
+// If the remote provided none it will be nil
+type PSKCallback func([]byte) ([]byte, error)
+
+// ClientAuthType declares the policy the server will follow for
+// TLS Client Authentication.
+type ClientAuthType int
+
+// ClientAuthType enums
+const (
+ NoClientCert ClientAuthType = iota
+ RequestClientCert
+ RequireAnyClientCert
+ VerifyClientCertIfGiven
+ RequireAndVerifyClientCert
+)
+
+// ExtendedMasterSecretType declares the policy the client and server
+// will follow for the Extended Master Secret extension
+type ExtendedMasterSecretType int
+
+// ExtendedMasterSecretType enums
+const (
+ RequestExtendedMasterSecret ExtendedMasterSecretType = iota
+ RequireExtendedMasterSecret
+ DisableExtendedMasterSecret
+)
+
+func validateConfig(config *Config) error {
+ switch {
+ case config == nil:
+ return errNoConfigProvided
+ case config.PSKIdentityHint != nil && config.PSK == nil:
+ return errIdentityNoPSK
+ }
+
+ for _, cert := range config.Certificates {
+ if cert.Certificate == nil {
+ return errInvalidCertificate
+ }
+ if cert.PrivateKey != nil {
+ switch cert.PrivateKey.(type) {
+ case ed25519.PrivateKey:
+ case *ecdsa.PrivateKey:
+ default:
+ return errInvalidPrivateKey
+ }
+ }
+ }
+
+ _, err := parseCipherSuites(config.CipherSuites, config.CustomCipherSuites, config.PSK == nil || len(config.Certificates) > 0, config.PSK != nil)
+ return err
+}
diff --git a/vendor/github.com/pion/dtls/v2/conn.go b/vendor/github.com/pion/dtls/v2/conn.go
new file mode 100644
index 0000000..42d732f
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/conn.go
@@ -0,0 +1,978 @@
+package dtls
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "net"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/pion/dtls/v2/internal/closer"
+ "github.com/pion/dtls/v2/pkg/crypto/elliptic"
+ "github.com/pion/dtls/v2/pkg/crypto/signaturehash"
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/alert"
+ "github.com/pion/dtls/v2/pkg/protocol/handshake"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+ "github.com/pion/logging"
+ "github.com/pion/transport/connctx"
+ "github.com/pion/transport/deadline"
+ "github.com/pion/transport/replaydetector"
+)
+
+const (
+ initialTickerInterval = time.Second
+ cookieLength = 20
+ defaultNamedCurve = elliptic.X25519
+ inboundBufferSize = 8192
+ // Default replay protection window is specified by RFC 6347 Section 4.1.2.6
+ defaultReplayProtectionWindow = 64
+)
+
+func invalidKeyingLabels() map[string]bool {
+ return map[string]bool{
+ "client finished": true,
+ "server finished": true,
+ "master secret": true,
+ "key expansion": true,
+ }
+}
+
+// Conn represents a DTLS connection
+type Conn struct {
+ lock sync.RWMutex // Internal lock (must not be public)
+ nextConn connctx.ConnCtx // Embedded Conn, typically a udpconn we read/write from
+ fragmentBuffer *fragmentBuffer // out-of-order and missing fragment handling
+ handshakeCache *handshakeCache // caching of handshake messages for verifyData generation
+ decrypted chan interface{} // Decrypted Application Data or error, pull by calling `Read`
+
+ state State // Internal state
+
+ maximumTransmissionUnit int
+
+ handshakeCompletedSuccessfully atomic.Value
+
+ encryptedPackets [][]byte
+
+ connectionClosedByUser bool
+ closeLock sync.Mutex
+ closed *closer.Closer
+ handshakeLoopsFinished sync.WaitGroup
+
+ readDeadline *deadline.Deadline
+ writeDeadline *deadline.Deadline
+
+ log logging.LeveledLogger
+
+ reading chan struct{}
+ handshakeRecv chan chan struct{}
+ cancelHandshaker func()
+ cancelHandshakeReader func()
+
+ fsm *handshakeFSM
+
+ replayProtectionWindow uint
+}
+
+func createConn(ctx context.Context, nextConn net.Conn, config *Config, isClient bool, initialState *State) (*Conn, error) {
+ err := validateConfig(config)
+ if err != nil {
+ return nil, err
+ }
+
+ if nextConn == nil {
+ return nil, errNilNextConn
+ }
+
+ cipherSuites, err := parseCipherSuites(config.CipherSuites, config.CustomCipherSuites, config.PSK == nil || len(config.Certificates) > 0, config.PSK != nil)
+ if err != nil {
+ return nil, err
+ }
+
+ signatureSchemes, err := signaturehash.ParseSignatureSchemes(config.SignatureSchemes, config.InsecureHashes)
+ if err != nil {
+ return nil, err
+ }
+
+ workerInterval := initialTickerInterval
+ if config.FlightInterval != 0 {
+ workerInterval = config.FlightInterval
+ }
+
+ loggerFactory := config.LoggerFactory
+ if loggerFactory == nil {
+ loggerFactory = logging.NewDefaultLoggerFactory()
+ }
+
+ logger := loggerFactory.NewLogger("dtls")
+
+ mtu := config.MTU
+ if mtu <= 0 {
+ mtu = defaultMTU
+ }
+
+ replayProtectionWindow := config.ReplayProtectionWindow
+ if replayProtectionWindow <= 0 {
+ replayProtectionWindow = defaultReplayProtectionWindow
+ }
+
+ c := &Conn{
+ nextConn: connctx.New(nextConn),
+ fragmentBuffer: newFragmentBuffer(),
+ handshakeCache: newHandshakeCache(),
+ maximumTransmissionUnit: mtu,
+
+ decrypted: make(chan interface{}, 1),
+ log: logger,
+
+ readDeadline: deadline.New(),
+ writeDeadline: deadline.New(),
+
+ reading: make(chan struct{}, 1),
+ handshakeRecv: make(chan chan struct{}),
+ closed: closer.NewCloser(),
+ cancelHandshaker: func() {},
+
+ replayProtectionWindow: uint(replayProtectionWindow),
+
+ state: State{
+ isClient: isClient,
+ },
+ }
+
+ c.setRemoteEpoch(0)
+ c.setLocalEpoch(0)
+
+ serverName := config.ServerName
+ // Use host from conn address when serverName is not provided
+ if isClient && serverName == "" && nextConn.RemoteAddr() != nil {
+ remoteAddr := nextConn.RemoteAddr().String()
+ var host string
+ host, _, err = net.SplitHostPort(remoteAddr)
+ if err != nil {
+ serverName = remoteAddr
+ } else {
+ serverName = host
+ }
+ }
+
+ hsCfg := &handshakeConfig{
+ localPSKCallback: config.PSK,
+ localPSKIdentityHint: config.PSKIdentityHint,
+ localCipherSuites: cipherSuites,
+ localSignatureSchemes: signatureSchemes,
+ extendedMasterSecret: config.ExtendedMasterSecret,
+ localSRTPProtectionProfiles: config.SRTPProtectionProfiles,
+ serverName: serverName,
+ clientAuth: config.ClientAuth,
+ localCertificates: config.Certificates,
+ insecureSkipVerify: config.InsecureSkipVerify,
+ verifyPeerCertificate: config.VerifyPeerCertificate,
+ rootCAs: config.RootCAs,
+ clientCAs: config.ClientCAs,
+ customCipherSuites: config.CustomCipherSuites,
+ retransmitInterval: workerInterval,
+ log: logger,
+ initialEpoch: 0,
+ keyLogWriter: config.KeyLogWriter,
+ }
+
+ var initialFlight flightVal
+ var initialFSMState handshakeState
+
+ if initialState != nil {
+ if c.state.isClient {
+ initialFlight = flight5
+ } else {
+ initialFlight = flight6
+ }
+ initialFSMState = handshakeFinished
+
+ c.state = *initialState
+ } else {
+ if c.state.isClient {
+ initialFlight = flight1
+ } else {
+ initialFlight = flight0
+ }
+ initialFSMState = handshakePreparing
+ }
+ // Do handshake
+ if err := c.handshake(ctx, hsCfg, initialFlight, initialFSMState); err != nil {
+ return nil, err
+ }
+
+ c.log.Trace("Handshake Completed")
+
+ return c, nil
+}
+
+// Dial connects to the given network address and establishes a DTLS connection on top.
+// Connection handshake will timeout using ConnectContextMaker in the Config.
+// If you want to specify the timeout duration, use DialWithContext() instead.
+func Dial(network string, raddr *net.UDPAddr, config *Config) (*Conn, error) {
+ ctx, cancel := config.connectContextMaker()
+ defer cancel()
+
+ return DialWithContext(ctx, network, raddr, config)
+}
+
+// Client establishes a DTLS connection over an existing connection.
+// Connection handshake will timeout using ConnectContextMaker in the Config.
+// If you want to specify the timeout duration, use ClientWithContext() instead.
+func Client(conn net.Conn, config *Config) (*Conn, error) {
+ ctx, cancel := config.connectContextMaker()
+ defer cancel()
+
+ return ClientWithContext(ctx, conn, config)
+}
+
+// Server listens for incoming DTLS connections.
+// Connection handshake will timeout using ConnectContextMaker in the Config.
+// If you want to specify the timeout duration, use ServerWithContext() instead.
+func Server(conn net.Conn, config *Config) (*Conn, error) {
+ ctx, cancel := config.connectContextMaker()
+ defer cancel()
+
+ return ServerWithContext(ctx, conn, config)
+}
+
+// DialWithContext connects to the given network address and establishes a DTLS connection on top.
+func DialWithContext(ctx context.Context, network string, raddr *net.UDPAddr, config *Config) (*Conn, error) {
+ pConn, err := net.DialUDP(network, nil, raddr)
+ if err != nil {
+ return nil, err
+ }
+ return ClientWithContext(ctx, pConn, config)
+}
+
+// ClientWithContext establishes a DTLS connection over an existing connection.
+func ClientWithContext(ctx context.Context, conn net.Conn, config *Config) (*Conn, error) {
+ switch {
+ case config == nil:
+ return nil, errNoConfigProvided
+ case config.PSK != nil && config.PSKIdentityHint == nil:
+ return nil, errPSKAndIdentityMustBeSetForClient
+ }
+
+ return createConn(ctx, conn, config, true, nil)
+}
+
+// ServerWithContext listens for incoming DTLS connections.
+func ServerWithContext(ctx context.Context, conn net.Conn, config *Config) (*Conn, error) {
+ if config == nil {
+ return nil, errNoConfigProvided
+ }
+
+ return createConn(ctx, conn, config, false, nil)
+}
+
+// Read reads data from the connection.
+func (c *Conn) Read(p []byte) (n int, err error) {
+ if !c.isHandshakeCompletedSuccessfully() {
+ return 0, errHandshakeInProgress
+ }
+
+ select {
+ case <-c.readDeadline.Done():
+ return 0, errDeadlineExceeded
+ default:
+ }
+
+ for {
+ select {
+ case <-c.readDeadline.Done():
+ return 0, errDeadlineExceeded
+ case out, ok := <-c.decrypted:
+ if !ok {
+ return 0, io.EOF
+ }
+ switch val := out.(type) {
+ case ([]byte):
+ if len(p) < len(val) {
+ return 0, errBufferTooSmall
+ }
+ copy(p, val)
+ return len(val), nil
+ case (error):
+ return 0, val
+ }
+ }
+ }
+}
+
+// Write writes len(p) bytes from p to the DTLS connection
+func (c *Conn) Write(p []byte) (int, error) {
+ if c.isConnectionClosed() {
+ return 0, ErrConnClosed
+ }
+
+ select {
+ case <-c.writeDeadline.Done():
+ return 0, errDeadlineExceeded
+ default:
+ }
+
+ if !c.isHandshakeCompletedSuccessfully() {
+ return 0, errHandshakeInProgress
+ }
+
+ return len(p), c.writePackets(c.writeDeadline, []*packet{
+ {
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Epoch: c.getLocalEpoch(),
+ Version: protocol.Version1_2,
+ },
+ Content: &protocol.ApplicationData{
+ Data: p,
+ },
+ },
+ shouldEncrypt: true,
+ },
+ })
+}
+
+// Close closes the connection.
+func (c *Conn) Close() error {
+ err := c.close(true)
+ c.handshakeLoopsFinished.Wait()
+ return err
+}
+
+// ConnectionState returns basic DTLS details about the connection.
+// Note that this replaced the `Export` function of v1.
+func (c *Conn) ConnectionState() State {
+ c.lock.RLock()
+ defer c.lock.RUnlock()
+ return *c.state.clone()
+}
+
+// SelectedSRTPProtectionProfile returns the selected SRTPProtectionProfile
+func (c *Conn) SelectedSRTPProtectionProfile() (SRTPProtectionProfile, bool) {
+ c.lock.RLock()
+ defer c.lock.RUnlock()
+
+ if c.state.srtpProtectionProfile == 0 {
+ return 0, false
+ }
+
+ return c.state.srtpProtectionProfile, true
+}
+
+func (c *Conn) writePackets(ctx context.Context, pkts []*packet) error {
+ c.lock.Lock()
+ defer c.lock.Unlock()
+
+ var rawPackets [][]byte
+
+ for _, p := range pkts {
+ if h, ok := p.record.Content.(*handshake.Handshake); ok {
+ handshakeRaw, err := p.record.Marshal()
+ if err != nil {
+ return err
+ }
+
+ c.log.Tracef("[handshake:%v] -> %s (epoch: %d, seq: %d)",
+ srvCliStr(c.state.isClient), h.Header.Type.String(),
+ p.record.Header.Epoch, h.Header.MessageSequence)
+ c.handshakeCache.push(handshakeRaw[recordlayer.HeaderSize:], p.record.Header.Epoch, h.Header.MessageSequence, h.Header.Type, c.state.isClient)
+
+ rawHandshakePackets, err := c.processHandshakePacket(p, h)
+ if err != nil {
+ return err
+ }
+ rawPackets = append(rawPackets, rawHandshakePackets...)
+ } else {
+ rawPacket, err := c.processPacket(p)
+ if err != nil {
+ return err
+ }
+ rawPackets = append(rawPackets, rawPacket)
+ }
+ }
+ if len(rawPackets) == 0 {
+ return nil
+ }
+ compactedRawPackets := c.compactRawPackets(rawPackets)
+
+ for _, compactedRawPackets := range compactedRawPackets {
+ if _, err := c.nextConn.WriteContext(ctx, compactedRawPackets); err != nil {
+ return netError(err)
+ }
+ }
+
+ return nil
+}
+
+func (c *Conn) compactRawPackets(rawPackets [][]byte) [][]byte {
+ combinedRawPackets := make([][]byte, 0)
+ currentCombinedRawPacket := make([]byte, 0)
+
+ for _, rawPacket := range rawPackets {
+ if len(currentCombinedRawPacket) > 0 && len(currentCombinedRawPacket)+len(rawPacket) >= c.maximumTransmissionUnit {
+ combinedRawPackets = append(combinedRawPackets, currentCombinedRawPacket)
+ currentCombinedRawPacket = []byte{}
+ }
+ currentCombinedRawPacket = append(currentCombinedRawPacket, rawPacket...)
+ }
+
+ combinedRawPackets = append(combinedRawPackets, currentCombinedRawPacket)
+
+ return combinedRawPackets
+}
+
+func (c *Conn) processPacket(p *packet) ([]byte, error) {
+ epoch := p.record.Header.Epoch
+ for len(c.state.localSequenceNumber) <= int(epoch) {
+ c.state.localSequenceNumber = append(c.state.localSequenceNumber, uint64(0))
+ }
+ seq := atomic.AddUint64(&c.state.localSequenceNumber[epoch], 1) - 1
+ if seq > recordlayer.MaxSequenceNumber {
+ // RFC 6347 Section 4.1.0
+ // The implementation must either abandon an association or rehandshake
+ // prior to allowing the sequence number to wrap.
+ return nil, errSequenceNumberOverflow
+ }
+ p.record.Header.SequenceNumber = seq
+
+ rawPacket, err := p.record.Marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ if p.shouldEncrypt {
+ var err error
+ rawPacket, err = c.state.cipherSuite.Encrypt(p.record, rawPacket)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ return rawPacket, nil
+}
+
+func (c *Conn) processHandshakePacket(p *packet, h *handshake.Handshake) ([][]byte, error) {
+ rawPackets := make([][]byte, 0)
+
+ handshakeFragments, err := c.fragmentHandshake(h)
+ if err != nil {
+ return nil, err
+ }
+ epoch := p.record.Header.Epoch
+ for len(c.state.localSequenceNumber) <= int(epoch) {
+ c.state.localSequenceNumber = append(c.state.localSequenceNumber, uint64(0))
+ }
+
+ for _, handshakeFragment := range handshakeFragments {
+ seq := atomic.AddUint64(&c.state.localSequenceNumber[epoch], 1) - 1
+ if seq > recordlayer.MaxSequenceNumber {
+ return nil, errSequenceNumberOverflow
+ }
+
+ recordlayerHeader := &recordlayer.Header{
+ Version: p.record.Header.Version,
+ ContentType: p.record.Header.ContentType,
+ ContentLen: uint16(len(handshakeFragment)),
+ Epoch: p.record.Header.Epoch,
+ SequenceNumber: seq,
+ }
+
+ recordlayerHeaderBytes, err := recordlayerHeader.Marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ p.record.Header = *recordlayerHeader
+
+ rawPacket := append(recordlayerHeaderBytes, handshakeFragment...)
+ if p.shouldEncrypt {
+ var err error
+ rawPacket, err = c.state.cipherSuite.Encrypt(p.record, rawPacket)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ rawPackets = append(rawPackets, rawPacket)
+ }
+
+ return rawPackets, nil
+}
+
+func (c *Conn) fragmentHandshake(h *handshake.Handshake) ([][]byte, error) {
+ content, err := h.Message.Marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ fragmentedHandshakes := make([][]byte, 0)
+
+ contentFragments := splitBytes(content, c.maximumTransmissionUnit)
+ if len(contentFragments) == 0 {
+ contentFragments = [][]byte{
+ {},
+ }
+ }
+
+ offset := 0
+ for _, contentFragment := range contentFragments {
+ contentFragmentLen := len(contentFragment)
+
+ headerFragment := &handshake.Header{
+ Type: h.Header.Type,
+ Length: h.Header.Length,
+ MessageSequence: h.Header.MessageSequence,
+ FragmentOffset: uint32(offset),
+ FragmentLength: uint32(contentFragmentLen),
+ }
+
+ offset += contentFragmentLen
+
+ headerFragmentRaw, err := headerFragment.Marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ fragmentedHandshake := append(headerFragmentRaw, contentFragment...)
+ fragmentedHandshakes = append(fragmentedHandshakes, fragmentedHandshake)
+ }
+
+ return fragmentedHandshakes, nil
+}
+
+var poolReadBuffer = sync.Pool{ //nolint:gochecknoglobals
+ New: func() interface{} {
+ b := make([]byte, inboundBufferSize)
+ return &b
+ },
+}
+
+func (c *Conn) readAndBuffer(ctx context.Context) error {
+ bufptr := poolReadBuffer.Get().(*[]byte)
+ defer poolReadBuffer.Put(bufptr)
+
+ b := *bufptr
+ i, err := c.nextConn.ReadContext(ctx, b)
+ if err != nil {
+ return netError(err)
+ }
+
+ pkts, err := recordlayer.UnpackDatagram(b[:i])
+ if err != nil {
+ return err
+ }
+
+ var hasHandshake bool
+ for _, p := range pkts {
+ hs, alert, err := c.handleIncomingPacket(p, true)
+ if alert != nil {
+ if alertErr := c.notify(ctx, alert.Level, alert.Description); alertErr != nil {
+ if err == nil {
+ err = alertErr
+ }
+ }
+ }
+ if hs {
+ hasHandshake = true
+ }
+ switch e := err.(type) {
+ case nil:
+ case *errAlert:
+ if e.IsFatalOrCloseNotify() {
+ return e
+ }
+ default:
+ return e
+ }
+ }
+ if hasHandshake {
+ done := make(chan struct{})
+ select {
+ case c.handshakeRecv <- done:
+ // If the other party may retransmit the flight,
+ // we should respond even if it not a new message.
+ <-done
+ case <-c.fsm.Done():
+ }
+ }
+ return nil
+}
+
+func (c *Conn) handleQueuedPackets(ctx context.Context) error {
+ pkts := c.encryptedPackets
+ c.encryptedPackets = nil
+
+ for _, p := range pkts {
+ _, alert, err := c.handleIncomingPacket(p, false) // don't re-enqueue
+ if alert != nil {
+ if alertErr := c.notify(ctx, alert.Level, alert.Description); alertErr != nil {
+ if err == nil {
+ err = alertErr
+ }
+ }
+ }
+ switch e := err.(type) {
+ case nil:
+ case *errAlert:
+ if e.IsFatalOrCloseNotify() {
+ return e
+ }
+ default:
+ return e
+ }
+ }
+ return nil
+}
+
+func (c *Conn) handleIncomingPacket(buf []byte, enqueue bool) (bool, *alert.Alert, error) { //nolint:gocognit
+ h := &recordlayer.Header{}
+ if err := h.Unmarshal(buf); err != nil {
+ // Decode error must be silently discarded
+ // [RFC6347 Section-4.1.2.7]
+ c.log.Debugf("discarded broken packet: %v", err)
+ return false, nil, nil
+ }
+
+ // Validate epoch
+ remoteEpoch := c.getRemoteEpoch()
+ if h.Epoch > remoteEpoch {
+ if h.Epoch > remoteEpoch+1 {
+ c.log.Debugf("discarded future packet (epoch: %d, seq: %d)",
+ h.Epoch, h.SequenceNumber,
+ )
+ return false, nil, nil
+ }
+ if enqueue {
+ c.log.Debug("received packet of next epoch, queuing packet")
+ c.encryptedPackets = append(c.encryptedPackets, buf)
+ }
+ return false, nil, nil
+ }
+
+ // Anti-replay protection
+ for len(c.state.replayDetector) <= int(h.Epoch) {
+ c.state.replayDetector = append(c.state.replayDetector,
+ replaydetector.New(c.replayProtectionWindow, recordlayer.MaxSequenceNumber),
+ )
+ }
+ markPacketAsValid, ok := c.state.replayDetector[int(h.Epoch)].Check(h.SequenceNumber)
+ if !ok {
+ c.log.Debugf("discarded duplicated packet (epoch: %d, seq: %d)",
+ h.Epoch, h.SequenceNumber,
+ )
+ return false, nil, nil
+ }
+
+ // Decrypt
+ if h.Epoch != 0 {
+ if c.state.cipherSuite == nil || !c.state.cipherSuite.IsInitialized() {
+ if enqueue {
+ c.encryptedPackets = append(c.encryptedPackets, buf)
+ c.log.Debug("handshake not finished, queuing packet")
+ }
+ return false, nil, nil
+ }
+
+ var err error
+ buf, err = c.state.cipherSuite.Decrypt(buf)
+ if err != nil {
+ c.log.Debugf("%s: decrypt failed: %s", srvCliStr(c.state.isClient), err)
+ return false, nil, nil
+ }
+ }
+
+ isHandshake, err := c.fragmentBuffer.push(append([]byte{}, buf...))
+ if err != nil {
+ // Decode error must be silently discarded
+ // [RFC6347 Section-4.1.2.7]
+ c.log.Debugf("defragment failed: %s", err)
+ return false, nil, nil
+ } else if isHandshake {
+ markPacketAsValid()
+ for out, epoch := c.fragmentBuffer.pop(); out != nil; out, epoch = c.fragmentBuffer.pop() {
+ rawHandshake := &handshake.Handshake{}
+ if err := rawHandshake.Unmarshal(out); err != nil {
+ c.log.Debugf("%s: handshake parse failed: %s", srvCliStr(c.state.isClient), err)
+ continue
+ }
+
+ _ = c.handshakeCache.push(out, epoch, rawHandshake.Header.MessageSequence, rawHandshake.Header.Type, !c.state.isClient)
+ }
+
+ return true, nil, nil
+ }
+
+ r := &recordlayer.RecordLayer{}
+ if err := r.Unmarshal(buf); err != nil {
+ return false, &alert.Alert{Level: alert.Fatal, Description: alert.DecodeError}, err
+ }
+
+ switch content := r.Content.(type) {
+ case *alert.Alert:
+ c.log.Tracef("%s: <- %s", srvCliStr(c.state.isClient), content.String())
+ var a *alert.Alert
+ if content.Description == alert.CloseNotify {
+ // Respond with a close_notify [RFC5246 Section 7.2.1]
+ a = &alert.Alert{Level: alert.Warning, Description: alert.CloseNotify}
+ }
+ markPacketAsValid()
+ return false, a, &errAlert{content}
+ case *protocol.ChangeCipherSpec:
+ if c.state.cipherSuite == nil || !c.state.cipherSuite.IsInitialized() {
+ if enqueue {
+ c.encryptedPackets = append(c.encryptedPackets, buf)
+ c.log.Debugf("CipherSuite not initialized, queuing packet")
+ }
+ return false, nil, nil
+ }
+
+ newRemoteEpoch := h.Epoch + 1
+ c.log.Tracef("%s: <- ChangeCipherSpec (epoch: %d)", srvCliStr(c.state.isClient), newRemoteEpoch)
+
+ if c.getRemoteEpoch()+1 == newRemoteEpoch {
+ c.setRemoteEpoch(newRemoteEpoch)
+ markPacketAsValid()
+ }
+ case *protocol.ApplicationData:
+ if h.Epoch == 0 {
+ return false, &alert.Alert{Level: alert.Fatal, Description: alert.UnexpectedMessage}, errApplicationDataEpochZero
+ }
+
+ markPacketAsValid()
+
+ select {
+ case c.decrypted <- content.Data:
+ case <-c.closed.Done():
+ }
+
+ default:
+ return false, &alert.Alert{Level: alert.Fatal, Description: alert.UnexpectedMessage}, fmt.Errorf("%w: %d", errUnhandledContextType, content.ContentType())
+ }
+ return false, nil, nil
+}
+
+func (c *Conn) recvHandshake() <-chan chan struct{} {
+ return c.handshakeRecv
+}
+
+func (c *Conn) notify(ctx context.Context, level alert.Level, desc alert.Description) error {
+ return c.writePackets(ctx, []*packet{
+ {
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Epoch: c.getLocalEpoch(),
+ Version: protocol.Version1_2,
+ },
+ Content: &alert.Alert{
+ Level: level,
+ Description: desc,
+ },
+ },
+ shouldEncrypt: c.isHandshakeCompletedSuccessfully(),
+ },
+ })
+}
+
+func (c *Conn) setHandshakeCompletedSuccessfully() {
+ c.handshakeCompletedSuccessfully.Store(struct{ bool }{true})
+}
+
+func (c *Conn) isHandshakeCompletedSuccessfully() bool {
+ boolean, _ := c.handshakeCompletedSuccessfully.Load().(struct{ bool })
+ return boolean.bool
+}
+
+func (c *Conn) handshake(ctx context.Context, cfg *handshakeConfig, initialFlight flightVal, initialState handshakeState) error { //nolint:gocognit
+ c.fsm = newHandshakeFSM(&c.state, c.handshakeCache, cfg, initialFlight)
+
+ done := make(chan struct{})
+ ctxRead, cancelRead := context.WithCancel(context.Background())
+ c.cancelHandshakeReader = cancelRead
+ cfg.onFlightState = func(f flightVal, s handshakeState) {
+ if s == handshakeFinished && !c.isHandshakeCompletedSuccessfully() {
+ c.setHandshakeCompletedSuccessfully()
+ close(done)
+ }
+ }
+
+ ctxHs, cancel := context.WithCancel(context.Background())
+ c.cancelHandshaker = cancel
+
+ firstErr := make(chan error, 1)
+
+ c.handshakeLoopsFinished.Add(2)
+
+ // Handshake routine should be live until close.
+ // The other party may request retransmission of the last flight to cope with packet drop.
+ go func() {
+ defer c.handshakeLoopsFinished.Done()
+ err := c.fsm.Run(ctxHs, c, initialState)
+ if !errors.Is(err, context.Canceled) {
+ select {
+ case firstErr <- err:
+ default:
+ }
+ }
+ }()
+ go func() {
+ defer func() {
+ // Escaping read loop.
+ // It's safe to close decrypted channnel now.
+ close(c.decrypted)
+
+ // Force stop handshaker when the underlying connection is closed.
+ cancel()
+ }()
+ defer c.handshakeLoopsFinished.Done()
+ for {
+ if err := c.readAndBuffer(ctxRead); err != nil {
+ switch e := err.(type) {
+ case *errAlert:
+ if !e.IsFatalOrCloseNotify() {
+ if c.isHandshakeCompletedSuccessfully() {
+ // Pass the error to Read()
+ select {
+ case c.decrypted <- err:
+ case <-c.closed.Done():
+ }
+ }
+ continue // non-fatal alert must not stop read loop
+ }
+ case error:
+ switch err {
+ case context.DeadlineExceeded, context.Canceled, io.EOF:
+ default:
+ if c.isHandshakeCompletedSuccessfully() {
+ // Keep read loop and pass the read error to Read()
+ select {
+ case c.decrypted <- err:
+ case <-c.closed.Done():
+ }
+ continue // non-fatal alert must not stop read loop
+ }
+ }
+ }
+ select {
+ case firstErr <- err:
+ default:
+ }
+
+ if e, ok := err.(*errAlert); ok {
+ if e.IsFatalOrCloseNotify() {
+ _ = c.close(false)
+ }
+ }
+ return
+ }
+ }
+ }()
+
+ select {
+ case err := <-firstErr:
+ cancelRead()
+ cancel()
+ return c.translateHandshakeCtxError(err)
+ case <-ctx.Done():
+ cancelRead()
+ cancel()
+ return c.translateHandshakeCtxError(ctx.Err())
+ case <-done:
+ return nil
+ }
+}
+
+func (c *Conn) translateHandshakeCtxError(err error) error {
+ if err == nil {
+ return nil
+ }
+ if errors.Is(err, context.Canceled) && c.isHandshakeCompletedSuccessfully() {
+ return nil
+ }
+ return &HandshakeError{Err: err}
+}
+
+func (c *Conn) close(byUser bool) error {
+ c.cancelHandshaker()
+ c.cancelHandshakeReader()
+
+ if c.isHandshakeCompletedSuccessfully() && byUser {
+ // Discard error from notify() to return non-error on the first user call of Close()
+ // even if the underlying connection is already closed.
+ _ = c.notify(context.Background(), alert.Warning, alert.CloseNotify)
+ }
+
+ c.closeLock.Lock()
+ // Don't return ErrConnClosed at the first time of the call from user.
+ closedByUser := c.connectionClosedByUser
+ if byUser {
+ c.connectionClosedByUser = true
+ }
+ c.closed.Close()
+ c.closeLock.Unlock()
+
+ if closedByUser {
+ return ErrConnClosed
+ }
+
+ return c.nextConn.Close()
+}
+
+func (c *Conn) isConnectionClosed() bool {
+ select {
+ case <-c.closed.Done():
+ return true
+ default:
+ return false
+ }
+}
+
+func (c *Conn) setLocalEpoch(epoch uint16) {
+ c.state.localEpoch.Store(epoch)
+}
+
+func (c *Conn) getLocalEpoch() uint16 {
+ return c.state.localEpoch.Load().(uint16)
+}
+
+func (c *Conn) setRemoteEpoch(epoch uint16) {
+ c.state.remoteEpoch.Store(epoch)
+}
+
+func (c *Conn) getRemoteEpoch() uint16 {
+ return c.state.remoteEpoch.Load().(uint16)
+}
+
+// LocalAddr implements net.Conn.LocalAddr
+func (c *Conn) LocalAddr() net.Addr {
+ return c.nextConn.LocalAddr()
+}
+
+// RemoteAddr implements net.Conn.RemoteAddr
+func (c *Conn) RemoteAddr() net.Addr {
+ return c.nextConn.RemoteAddr()
+}
+
+// SetDeadline implements net.Conn.SetDeadline
+func (c *Conn) SetDeadline(t time.Time) error {
+ c.readDeadline.Set(t)
+ return c.SetWriteDeadline(t)
+}
+
+// SetReadDeadline implements net.Conn.SetReadDeadline
+func (c *Conn) SetReadDeadline(t time.Time) error {
+ c.readDeadline.Set(t)
+ // Read deadline is fully managed by this layer.
+ // Don't set read deadline to underlying connection.
+ return nil
+}
+
+// SetWriteDeadline implements net.Conn.SetWriteDeadline
+func (c *Conn) SetWriteDeadline(t time.Time) error {
+ c.writeDeadline.Set(t)
+ // Write deadline is also fully managed by this layer.
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/crypto.go b/vendor/github.com/pion/dtls/v2/crypto.go
new file mode 100644
index 0000000..768ee47
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/crypto.go
@@ -0,0 +1,221 @@
+package dtls
+
+import (
+ "crypto"
+ "crypto/ecdsa"
+ "crypto/ed25519"
+ "crypto/rand"
+ "crypto/rsa"
+ "crypto/sha256"
+ "crypto/x509"
+ "encoding/asn1"
+ "encoding/binary"
+ "math/big"
+ "time"
+
+ "github.com/pion/dtls/v2/pkg/crypto/elliptic"
+ "github.com/pion/dtls/v2/pkg/crypto/hash"
+)
+
+type ecdsaSignature struct {
+ R, S *big.Int
+}
+
+func valueKeyMessage(clientRandom, serverRandom, publicKey []byte, namedCurve elliptic.Curve) []byte {
+ serverECDHParams := make([]byte, 4)
+ serverECDHParams[0] = 3 // named curve
+ binary.BigEndian.PutUint16(serverECDHParams[1:], uint16(namedCurve))
+ serverECDHParams[3] = byte(len(publicKey))
+
+ plaintext := []byte{}
+ plaintext = append(plaintext, clientRandom...)
+ plaintext = append(plaintext, serverRandom...)
+ plaintext = append(plaintext, serverECDHParams...)
+ plaintext = append(plaintext, publicKey...)
+
+ return plaintext
+}
+
+// If the client provided a "signature_algorithms" extension, then all
+// certificates provided by the server MUST be signed by a
+// hash/signature algorithm pair that appears in that extension
+//
+// https://tools.ietf.org/html/rfc5246#section-7.4.2
+func generateKeySignature(clientRandom, serverRandom, publicKey []byte, namedCurve elliptic.Curve, privateKey crypto.PrivateKey, hashAlgorithm hash.Algorithm) ([]byte, error) {
+ msg := valueKeyMessage(clientRandom, serverRandom, publicKey, namedCurve)
+ switch p := privateKey.(type) {
+ case ed25519.PrivateKey:
+ // https://crypto.stackexchange.com/a/55483
+ return p.Sign(rand.Reader, msg, crypto.Hash(0))
+ case *ecdsa.PrivateKey:
+ hashed := hashAlgorithm.Digest(msg)
+ return p.Sign(rand.Reader, hashed, hashAlgorithm.CryptoHash())
+ case *rsa.PrivateKey:
+ hashed := hashAlgorithm.Digest(msg)
+ return p.Sign(rand.Reader, hashed, hashAlgorithm.CryptoHash())
+ }
+
+ return nil, errKeySignatureGenerateUnimplemented
+}
+
+func verifyKeySignature(message, remoteKeySignature []byte, hashAlgorithm hash.Algorithm, rawCertificates [][]byte) error { //nolint:dupl
+ if len(rawCertificates) == 0 {
+ return errLengthMismatch
+ }
+ certificate, err := x509.ParseCertificate(rawCertificates[0])
+ if err != nil {
+ return err
+ }
+
+ switch p := certificate.PublicKey.(type) {
+ case ed25519.PublicKey:
+ if ok := ed25519.Verify(p, message, remoteKeySignature); !ok {
+ return errKeySignatureMismatch
+ }
+ return nil
+ case *ecdsa.PublicKey:
+ ecdsaSig := &ecdsaSignature{}
+ if _, err := asn1.Unmarshal(remoteKeySignature, ecdsaSig); err != nil {
+ return err
+ }
+ if ecdsaSig.R.Sign() <= 0 || ecdsaSig.S.Sign() <= 0 {
+ return errInvalidECDSASignature
+ }
+ hashed := hashAlgorithm.Digest(message)
+ if !ecdsa.Verify(p, hashed, ecdsaSig.R, ecdsaSig.S) {
+ return errKeySignatureMismatch
+ }
+ return nil
+ case *rsa.PublicKey:
+ switch certificate.SignatureAlgorithm {
+ case x509.SHA1WithRSA, x509.SHA256WithRSA, x509.SHA384WithRSA, x509.SHA512WithRSA:
+ hashed := hashAlgorithm.Digest(message)
+ return rsa.VerifyPKCS1v15(p, hashAlgorithm.CryptoHash(), hashed, remoteKeySignature)
+ default:
+ return errKeySignatureVerifyUnimplemented
+ }
+ }
+
+ return errKeySignatureVerifyUnimplemented
+}
+
+// If the server has sent a CertificateRequest message, the client MUST send the Certificate
+// message. The ClientKeyExchange message is now sent, and the content
+// of that message will depend on the public key algorithm selected
+// between the ClientHello and the ServerHello. If the client has sent
+// a certificate with signing ability, a digitally-signed
+// CertificateVerify message is sent to explicitly verify possession of
+// the private key in the certificate.
+// https://tools.ietf.org/html/rfc5246#section-7.3
+func generateCertificateVerify(handshakeBodies []byte, privateKey crypto.PrivateKey, hashAlgorithm hash.Algorithm) ([]byte, error) {
+ h := sha256.New()
+ if _, err := h.Write(handshakeBodies); err != nil {
+ return nil, err
+ }
+ hashed := h.Sum(nil)
+
+ switch p := privateKey.(type) {
+ case ed25519.PrivateKey:
+ // https://crypto.stackexchange.com/a/55483
+ return p.Sign(rand.Reader, hashed, crypto.Hash(0))
+ case *ecdsa.PrivateKey:
+ return p.Sign(rand.Reader, hashed, hashAlgorithm.CryptoHash())
+ case *rsa.PrivateKey:
+ return p.Sign(rand.Reader, hashed, hashAlgorithm.CryptoHash())
+ }
+
+ return nil, errInvalidSignatureAlgorithm
+}
+
+func verifyCertificateVerify(handshakeBodies []byte, hashAlgorithm hash.Algorithm, remoteKeySignature []byte, rawCertificates [][]byte) error { //nolint:dupl
+ if len(rawCertificates) == 0 {
+ return errLengthMismatch
+ }
+ certificate, err := x509.ParseCertificate(rawCertificates[0])
+ if err != nil {
+ return err
+ }
+
+ switch p := certificate.PublicKey.(type) {
+ case ed25519.PublicKey:
+ if ok := ed25519.Verify(p, handshakeBodies, remoteKeySignature); !ok {
+ return errKeySignatureMismatch
+ }
+ return nil
+ case *ecdsa.PublicKey:
+ ecdsaSig := &ecdsaSignature{}
+ if _, err := asn1.Unmarshal(remoteKeySignature, ecdsaSig); err != nil {
+ return err
+ }
+ if ecdsaSig.R.Sign() <= 0 || ecdsaSig.S.Sign() <= 0 {
+ return errInvalidECDSASignature
+ }
+ hash := hashAlgorithm.Digest(handshakeBodies)
+ if !ecdsa.Verify(p, hash, ecdsaSig.R, ecdsaSig.S) {
+ return errKeySignatureMismatch
+ }
+ return nil
+ case *rsa.PublicKey:
+ switch certificate.SignatureAlgorithm {
+ case x509.SHA1WithRSA, x509.SHA256WithRSA, x509.SHA384WithRSA, x509.SHA512WithRSA:
+ hash := hashAlgorithm.Digest(handshakeBodies)
+ return rsa.VerifyPKCS1v15(p, hashAlgorithm.CryptoHash(), hash, remoteKeySignature)
+ default:
+ return errKeySignatureVerifyUnimplemented
+ }
+ }
+
+ return errKeySignatureVerifyUnimplemented
+}
+
+func loadCerts(rawCertificates [][]byte) ([]*x509.Certificate, error) {
+ if len(rawCertificates) == 0 {
+ return nil, errLengthMismatch
+ }
+
+ certs := make([]*x509.Certificate, 0, len(rawCertificates))
+ for _, rawCert := range rawCertificates {
+ cert, err := x509.ParseCertificate(rawCert)
+ if err != nil {
+ return nil, err
+ }
+ certs = append(certs, cert)
+ }
+ return certs, nil
+}
+
+func verifyClientCert(rawCertificates [][]byte, roots *x509.CertPool) (chains [][]*x509.Certificate, err error) {
+ certificate, err := loadCerts(rawCertificates)
+ if err != nil {
+ return nil, err
+ }
+ intermediateCAPool := x509.NewCertPool()
+ for _, cert := range certificate[1:] {
+ intermediateCAPool.AddCert(cert)
+ }
+ opts := x509.VerifyOptions{
+ Roots: roots,
+ CurrentTime: time.Now(),
+ Intermediates: intermediateCAPool,
+ KeyUsages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},
+ }
+ return certificate[0].Verify(opts)
+}
+
+func verifyServerCert(rawCertificates [][]byte, roots *x509.CertPool, serverName string) (chains [][]*x509.Certificate, err error) {
+ certificate, err := loadCerts(rawCertificates)
+ if err != nil {
+ return nil, err
+ }
+ intermediateCAPool := x509.NewCertPool()
+ for _, cert := range certificate[1:] {
+ intermediateCAPool.AddCert(cert)
+ }
+ opts := x509.VerifyOptions{
+ Roots: roots,
+ CurrentTime: time.Now(),
+ DNSName: serverName,
+ Intermediates: intermediateCAPool,
+ }
+ return certificate[0].Verify(opts)
+}
diff --git a/vendor/github.com/pion/dtls/v2/dtls.go b/vendor/github.com/pion/dtls/v2/dtls.go
new file mode 100644
index 0000000..125b904
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/dtls.go
@@ -0,0 +1,2 @@
+// Package dtls implements Datagram Transport Layer Security (DTLS) 1.2
+package dtls
diff --git a/vendor/github.com/pion/dtls/v2/errors.go b/vendor/github.com/pion/dtls/v2/errors.go
new file mode 100644
index 0000000..2e16388
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/errors.go
@@ -0,0 +1,141 @@
+package dtls
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "net"
+ "os"
+
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/alert"
+ "golang.org/x/xerrors"
+)
+
+// Typed errors
+var (
+ ErrConnClosed = &FatalError{Err: errors.New("conn is closed")} //nolint:goerr113
+
+ errDeadlineExceeded = &TimeoutError{Err: xerrors.Errorf("read/write timeout: %w", context.DeadlineExceeded)}
+ errInvalidContentType = &TemporaryError{Err: errors.New("invalid content type")} //nolint:goerr113
+
+ errBufferTooSmall = &TemporaryError{Err: errors.New("buffer is too small")} //nolint:goerr113
+ errContextUnsupported = &TemporaryError{Err: errors.New("context is not supported for ExportKeyingMaterial")} //nolint:goerr113
+ errHandshakeInProgress = &TemporaryError{Err: errors.New("handshake is in progress")} //nolint:goerr113
+ errReservedExportKeyingMaterial = &TemporaryError{Err: errors.New("ExportKeyingMaterial can not be used with a reserved label")} //nolint:goerr113
+ errApplicationDataEpochZero = &TemporaryError{Err: errors.New("ApplicationData with epoch of 0")} //nolint:goerr113
+ errUnhandledContextType = &TemporaryError{Err: errors.New("unhandled contentType")} //nolint:goerr113
+
+ errCertificateVerifyNoCertificate = &FatalError{Err: errors.New("client sent certificate verify but we have no certificate to verify")} //nolint:goerr113
+ errCipherSuiteNoIntersection = &FatalError{Err: errors.New("client+server do not support any shared cipher suites")} //nolint:goerr113
+ errClientCertificateNotVerified = &FatalError{Err: errors.New("client sent certificate but did not verify it")} //nolint:goerr113
+ errClientCertificateRequired = &FatalError{Err: errors.New("server required client verification, but got none")} //nolint:goerr113
+ errClientNoMatchingSRTPProfile = &FatalError{Err: errors.New("server responded with SRTP Profile we do not support")} //nolint:goerr113
+ errClientRequiredButNoServerEMS = &FatalError{Err: errors.New("client required Extended Master Secret extension, but server does not support it")} //nolint:goerr113
+ errCookieMismatch = &FatalError{Err: errors.New("client+server cookie does not match")} //nolint:goerr113
+ errIdentityNoPSK = &FatalError{Err: errors.New("PSK Identity Hint provided but PSK is nil")} //nolint:goerr113
+ errInvalidCertificate = &FatalError{Err: errors.New("no certificate provided")} //nolint:goerr113
+ errInvalidCipherSuite = &FatalError{Err: errors.New("invalid or unknown cipher suite")} //nolint:goerr113
+ errInvalidECDSASignature = &FatalError{Err: errors.New("ECDSA signature contained zero or negative values")} //nolint:goerr113
+ errInvalidPrivateKey = &FatalError{Err: errors.New("invalid private key type")} //nolint:goerr113
+ errInvalidSignatureAlgorithm = &FatalError{Err: errors.New("invalid signature algorithm")} //nolint:goerr113
+ errKeySignatureMismatch = &FatalError{Err: errors.New("expected and actual key signature do not match")} //nolint:goerr113
+ errNilNextConn = &FatalError{Err: errors.New("Conn can not be created with a nil nextConn")} //nolint:goerr113
+ errNoAvailableCipherSuites = &FatalError{Err: errors.New("connection can not be created, no CipherSuites satisfy this Config")} //nolint:goerr113
+ errNoAvailablePSKCipherSuite = &FatalError{Err: errors.New("connection can not be created, pre-shared key present but no compatible CipherSuite")} //nolint:goerr113
+ errNoAvailableCertificateCipherSuite = &FatalError{Err: errors.New("connection can not be created, certificate present but no compatible CipherSuite")} //nolint:goerr113
+ errNoAvailableSignatureSchemes = &FatalError{Err: errors.New("connection can not be created, no SignatureScheme satisfy this Config")} //nolint:goerr113
+ errNoCertificates = &FatalError{Err: errors.New("no certificates configured")} //nolint:goerr113
+ errNoConfigProvided = &FatalError{Err: errors.New("no config provided")} //nolint:goerr113
+ errNoSupportedEllipticCurves = &FatalError{Err: errors.New("client requested zero or more elliptic curves that are not supported by the server")} //nolint:goerr113
+ errUnsupportedProtocolVersion = &FatalError{Err: errors.New("unsupported protocol version")} //nolint:goerr113
+ errPSKAndIdentityMustBeSetForClient = &FatalError{Err: errors.New("PSK and PSK Identity Hint must both be set for client")} //nolint:goerr113
+ errRequestedButNoSRTPExtension = &FatalError{Err: errors.New("SRTP support was requested but server did not respond with use_srtp extension")} //nolint:goerr113
+ errServerNoMatchingSRTPProfile = &FatalError{Err: errors.New("client requested SRTP but we have no matching profiles")} //nolint:goerr113
+ errServerRequiredButNoClientEMS = &FatalError{Err: errors.New("server requires the Extended Master Secret extension, but the client does not support it")} //nolint:goerr113
+ errVerifyDataMismatch = &FatalError{Err: errors.New("expected and actual verify data does not match")} //nolint:goerr113
+
+ errInvalidFlight = &InternalError{Err: errors.New("invalid flight number")} //nolint:goerr113
+ errKeySignatureGenerateUnimplemented = &InternalError{Err: errors.New("unable to generate key signature, unimplemented")} //nolint:goerr113
+ errKeySignatureVerifyUnimplemented = &InternalError{Err: errors.New("unable to verify key signature, unimplemented")} //nolint:goerr113
+ errLengthMismatch = &InternalError{Err: errors.New("data length and declared length do not match")} //nolint:goerr113
+ errSequenceNumberOverflow = &InternalError{Err: errors.New("sequence number overflow")} //nolint:goerr113
+ errInvalidFSMTransition = &InternalError{Err: errors.New("invalid state machine transition")} //nolint:goerr113
+)
+
+// FatalError indicates that the DTLS connection is no longer available.
+// It is mainly caused by wrong configuration of server or client.
+type FatalError = protocol.FatalError
+
+// InternalError indicates and internal error caused by the implementation, and the DTLS connection is no longer available.
+// It is mainly caused by bugs or tried to use unimplemented features.
+type InternalError = protocol.InternalError
+
+// TemporaryError indicates that the DTLS connection is still available, but the request was failed temporary.
+type TemporaryError = protocol.TemporaryError
+
+// TimeoutError indicates that the request was timed out.
+type TimeoutError = protocol.TimeoutError
+
+// HandshakeError indicates that the handshake failed.
+type HandshakeError = protocol.HandshakeError
+
+// invalidCipherSuite indicates an attempt at using an unsupported cipher suite.
+type invalidCipherSuite struct {
+ id CipherSuiteID
+}
+
+func (e *invalidCipherSuite) Error() string {
+ return fmt.Sprintf("CipherSuite with id(%d) is not valid", e.id)
+}
+
+func (e *invalidCipherSuite) Is(err error) bool {
+ if other, ok := err.(*invalidCipherSuite); ok {
+ return e.id == other.id
+ }
+ return false
+}
+
+// errAlert wraps DTLS alert notification as an error
+type errAlert struct {
+ *alert.Alert
+}
+
+func (e *errAlert) Error() string {
+ return fmt.Sprintf("alert: %s", e.Alert.String())
+}
+
+func (e *errAlert) IsFatalOrCloseNotify() bool {
+ return e.Level == alert.Fatal || e.Description == alert.CloseNotify
+}
+
+func (e *errAlert) Is(err error) bool {
+ if other, ok := err.(*errAlert); ok {
+ return e.Level == other.Level && e.Description == other.Description
+ }
+ return false
+}
+
+// netError translates an error from underlying Conn to corresponding net.Error.
+func netError(err error) error {
+ switch err {
+ case io.EOF, context.Canceled, context.DeadlineExceeded:
+ // Return io.EOF and context errors as is.
+ return err
+ }
+ switch e := err.(type) {
+ case (*net.OpError):
+ if se, ok := e.Err.(*os.SyscallError); ok {
+ if se.Timeout() {
+ return &TimeoutError{Err: err}
+ }
+ if isOpErrorTemporary(se) {
+ return &TemporaryError{Err: err}
+ }
+ }
+ case (net.Error):
+ return err
+ }
+ return &FatalError{Err: err}
+}
diff --git a/vendor/github.com/pion/dtls/v2/errors_errno.go b/vendor/github.com/pion/dtls/v2/errors_errno.go
new file mode 100644
index 0000000..a9a439b
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/errors_errno.go
@@ -0,0 +1,25 @@
+// +build aix darwin dragonfly freebsd linux nacl nacljs netbsd openbsd solaris windows
+
+// For systems having syscall.Errno.
+// Update build targets by following command:
+// $ grep -R ECONN $(go env GOROOT)/src/syscall/zerrors_*.go \
+// | tr "." "_" | cut -d"_" -f"2" | sort | uniq
+
+package dtls
+
+import (
+ "os"
+ "syscall"
+)
+
+func isOpErrorTemporary(err *os.SyscallError) bool {
+ if ne, ok := err.Err.(syscall.Errno); ok {
+ switch ne {
+ case syscall.ECONNREFUSED:
+ return true
+ default:
+ return false
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/pion/dtls/v2/errors_noerrno.go b/vendor/github.com/pion/dtls/v2/errors_noerrno.go
new file mode 100644
index 0000000..fcc37ce
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/errors_noerrno.go
@@ -0,0 +1,14 @@
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!nacl,!nacljs,!netbsd,!openbsd,!solaris,!windows
+
+// For systems without syscall.Errno.
+// Build targets must be inverse of errors_errno.go
+
+package dtls
+
+import (
+ "os"
+)
+
+func isOpErrorTemporary(err *os.SyscallError) bool {
+ return false
+}
diff --git a/vendor/github.com/pion/dtls/v2/flight.go b/vendor/github.com/pion/dtls/v2/flight.go
new file mode 100644
index 0000000..580ee48
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/flight.go
@@ -0,0 +1,75 @@
+package dtls
+
+/*
+ DTLS messages are grouped into a series of message flights, according
+ to the diagrams below. Although each flight of messages may consist
+ of a number of messages, they should be viewed as monolithic for the
+ purpose of timeout and retransmission.
+ https://tools.ietf.org/html/rfc4347#section-4.2.4
+ Client Server
+ ------ ------
+ Waiting Flight 0
+
+ ClientHello --------> Flight 1
+
+ <------- HelloVerifyRequest Flight 2
+
+ ClientHello --------> Flight 3
+
+ ServerHello \
+ Certificate* \
+ ServerKeyExchange* Flight 4
+ CertificateRequest* /
+ <-------- ServerHelloDone /
+
+ Certificate* \
+ ClientKeyExchange \
+ CertificateVerify* Flight 5
+ [ChangeCipherSpec] /
+ Finished --------> /
+
+ [ChangeCipherSpec] \ Flight 6
+ <-------- Finished /
+
+*/
+
+type flightVal uint8
+
+const (
+ flight0 flightVal = iota + 1
+ flight1
+ flight2
+ flight3
+ flight4
+ flight5
+ flight6
+)
+
+func (f flightVal) String() string {
+ switch f {
+ case flight0:
+ return "Flight 0"
+ case flight1:
+ return "Flight 1"
+ case flight2:
+ return "Flight 2"
+ case flight3:
+ return "Flight 3"
+ case flight4:
+ return "Flight 4"
+ case flight5:
+ return "Flight 5"
+ case flight6:
+ return "Flight 6"
+ default:
+ return "Invalid Flight"
+ }
+}
+
+func (f flightVal) isLastSendFlight() bool {
+ return f == flight6
+}
+
+func (f flightVal) isLastRecvFlight() bool {
+ return f == flight5
+}
diff --git a/vendor/github.com/pion/dtls/v2/flight0handler.go b/vendor/github.com/pion/dtls/v2/flight0handler.go
new file mode 100644
index 0000000..949d7c0
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/flight0handler.go
@@ -0,0 +1,102 @@
+package dtls
+
+import (
+ "context"
+ "crypto/rand"
+
+ "github.com/pion/dtls/v2/pkg/crypto/elliptic"
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/alert"
+ "github.com/pion/dtls/v2/pkg/protocol/extension"
+ "github.com/pion/dtls/v2/pkg/protocol/handshake"
+)
+
+func flight0Parse(ctx context.Context, c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) (flightVal, *alert.Alert, error) {
+ seq, msgs, ok := cache.fullPullMap(0,
+ handshakeCachePullRule{handshake.TypeClientHello, cfg.initialEpoch, true, false},
+ )
+ if !ok {
+ // No valid message received. Keep reading
+ return 0, nil, nil
+ }
+ state.handshakeRecvSequence = seq
+
+ var clientHello *handshake.MessageClientHello
+
+ // Validate type
+ if clientHello, ok = msgs[handshake.TypeClientHello].(*handshake.MessageClientHello); !ok {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, nil
+ }
+
+ if !clientHello.Version.Equal(protocol.Version1_2) {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.ProtocolVersion}, errUnsupportedProtocolVersion
+ }
+
+ state.remoteRandom = clientHello.Random
+
+ cipherSuites := []CipherSuite{}
+ for _, id := range clientHello.CipherSuiteIDs {
+ if c := cipherSuiteForID(CipherSuiteID(id), cfg.customCipherSuites); c != nil {
+ cipherSuites = append(cipherSuites, c)
+ }
+ }
+
+ if state.cipherSuite, ok = findMatchingCipherSuite(cipherSuites, cfg.localCipherSuites); !ok {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}, errCipherSuiteNoIntersection
+ }
+
+ for _, val := range clientHello.Extensions {
+ switch e := val.(type) {
+ case *extension.SupportedEllipticCurves:
+ if len(e.EllipticCurves) == 0 {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}, errNoSupportedEllipticCurves
+ }
+ state.namedCurve = e.EllipticCurves[0]
+ case *extension.UseSRTP:
+ profile, ok := findMatchingSRTPProfile(e.ProtectionProfiles, cfg.localSRTPProtectionProfiles)
+ if !ok {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}, errServerNoMatchingSRTPProfile
+ }
+ state.srtpProtectionProfile = profile
+ case *extension.UseExtendedMasterSecret:
+ if cfg.extendedMasterSecret != DisableExtendedMasterSecret {
+ state.extendedMasterSecret = true
+ }
+ case *extension.ServerName:
+ state.serverName = e.ServerName // remote server name
+ }
+ }
+
+ if cfg.extendedMasterSecret == RequireExtendedMasterSecret && !state.extendedMasterSecret {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}, errServerRequiredButNoClientEMS
+ }
+
+ if state.localKeypair == nil {
+ var err error
+ state.localKeypair, err = elliptic.GenerateKeypair(state.namedCurve)
+ if err != nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.IllegalParameter}, err
+ }
+ }
+
+ return flight2, nil, nil
+}
+
+func flight0Generate(c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) ([]*packet, *alert.Alert, error) {
+ // Initialize
+ state.cookie = make([]byte, cookieLength)
+ if _, err := rand.Read(state.cookie); err != nil {
+ return nil, nil, err
+ }
+
+ var zeroEpoch uint16
+ state.localEpoch.Store(zeroEpoch)
+ state.remoteEpoch.Store(zeroEpoch)
+ state.namedCurve = defaultNamedCurve
+
+ if err := state.localRandom.Populate(); err != nil {
+ return nil, nil, err
+ }
+
+ return nil, nil, nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/flight1handler.go b/vendor/github.com/pion/dtls/v2/flight1handler.go
new file mode 100644
index 0000000..9229292
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/flight1handler.go
@@ -0,0 +1,112 @@
+package dtls
+
+import (
+ "context"
+
+ "github.com/pion/dtls/v2/pkg/crypto/elliptic"
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/alert"
+ "github.com/pion/dtls/v2/pkg/protocol/extension"
+ "github.com/pion/dtls/v2/pkg/protocol/handshake"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+func flight1Parse(ctx context.Context, c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) (flightVal, *alert.Alert, error) {
+ // HelloVerifyRequest can be skipped by the server,
+ // so allow ServerHello during flight1 also
+ seq, msgs, ok := cache.fullPullMap(state.handshakeRecvSequence,
+ handshakeCachePullRule{handshake.TypeHelloVerifyRequest, cfg.initialEpoch, false, true},
+ handshakeCachePullRule{handshake.TypeServerHello, cfg.initialEpoch, false, true},
+ )
+ if !ok {
+ // No valid message received. Keep reading
+ return 0, nil, nil
+ }
+
+ if _, ok := msgs[handshake.TypeServerHello]; ok {
+ // Flight1 and flight2 were skipped.
+ // Parse as flight3.
+ return flight3Parse(ctx, c, state, cache, cfg)
+ }
+
+ if h, ok := msgs[handshake.TypeHelloVerifyRequest].(*handshake.MessageHelloVerifyRequest); ok {
+ // DTLS 1.2 clients must not assume that the server will use the protocol version
+ // specified in HelloVerifyRequest message. RFC 6347 Section 4.2.1
+ if !h.Version.Equal(protocol.Version1_0) && !h.Version.Equal(protocol.Version1_2) {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.ProtocolVersion}, errUnsupportedProtocolVersion
+ }
+ state.cookie = append([]byte{}, h.Cookie...)
+ state.handshakeRecvSequence = seq
+ return flight3, nil, nil
+ }
+
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, nil
+}
+
+func flight1Generate(c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) ([]*packet, *alert.Alert, error) {
+ var zeroEpoch uint16
+ state.localEpoch.Store(zeroEpoch)
+ state.remoteEpoch.Store(zeroEpoch)
+ state.namedCurve = defaultNamedCurve
+ state.cookie = nil
+
+ if err := state.localRandom.Populate(); err != nil {
+ return nil, nil, err
+ }
+
+ extensions := []extension.Extension{
+ &extension.SupportedSignatureAlgorithms{
+ SignatureHashAlgorithms: cfg.localSignatureSchemes,
+ },
+ &extension.RenegotiationInfo{
+ RenegotiatedConnection: 0,
+ },
+ }
+ if cfg.localPSKCallback == nil {
+ extensions = append(extensions, []extension.Extension{
+ &extension.SupportedEllipticCurves{
+ EllipticCurves: []elliptic.Curve{elliptic.X25519, elliptic.P256, elliptic.P384},
+ },
+ &extension.SupportedPointFormats{
+ PointFormats: []elliptic.CurvePointFormat{elliptic.CurvePointFormatUncompressed},
+ },
+ }...)
+ }
+
+ if len(cfg.localSRTPProtectionProfiles) > 0 {
+ extensions = append(extensions, &extension.UseSRTP{
+ ProtectionProfiles: cfg.localSRTPProtectionProfiles,
+ })
+ }
+
+ if cfg.extendedMasterSecret == RequestExtendedMasterSecret ||
+ cfg.extendedMasterSecret == RequireExtendedMasterSecret {
+ extensions = append(extensions, &extension.UseExtendedMasterSecret{
+ Supported: true,
+ })
+ }
+
+ if len(cfg.serverName) > 0 {
+ extensions = append(extensions, &extension.ServerName{ServerName: cfg.serverName})
+ }
+
+ return []*packet{
+ {
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageClientHello{
+ Version: protocol.Version1_2,
+ Cookie: state.cookie,
+ Random: state.localRandom,
+ CipherSuiteIDs: cipherSuiteIDs(cfg.localCipherSuites),
+ CompressionMethods: defaultCompressionMethods(),
+ Extensions: extensions,
+ },
+ },
+ },
+ },
+ }, nil, nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/flight2handler.go b/vendor/github.com/pion/dtls/v2/flight2handler.go
new file mode 100644
index 0000000..bb8e91d
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/flight2handler.go
@@ -0,0 +1,61 @@
+package dtls
+
+import (
+ "bytes"
+ "context"
+
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/alert"
+ "github.com/pion/dtls/v2/pkg/protocol/handshake"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+func flight2Parse(ctx context.Context, c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) (flightVal, *alert.Alert, error) {
+ seq, msgs, ok := cache.fullPullMap(state.handshakeRecvSequence,
+ handshakeCachePullRule{handshake.TypeClientHello, cfg.initialEpoch, true, false},
+ )
+ if !ok {
+ // Client may retransmit the first ClientHello when HelloVerifyRequest is dropped.
+ // Parse as flight 0 in this case.
+ return flight0Parse(ctx, c, state, cache, cfg)
+ }
+ state.handshakeRecvSequence = seq
+
+ var clientHello *handshake.MessageClientHello
+
+ // Validate type
+ if clientHello, ok = msgs[handshake.TypeClientHello].(*handshake.MessageClientHello); !ok {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, nil
+ }
+
+ if !clientHello.Version.Equal(protocol.Version1_2) {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.ProtocolVersion}, errUnsupportedProtocolVersion
+ }
+
+ if len(clientHello.Cookie) == 0 {
+ return 0, nil, nil
+ }
+ if !bytes.Equal(state.cookie, clientHello.Cookie) {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.AccessDenied}, errCookieMismatch
+ }
+ return flight4, nil, nil
+}
+
+func flight2Generate(c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) ([]*packet, *alert.Alert, error) {
+ state.handshakeSendSequence = 0
+ return []*packet{
+ {
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageHelloVerifyRequest{
+ Version: protocol.Version1_2,
+ Cookie: state.cookie,
+ },
+ },
+ },
+ },
+ }, nil, nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/flight3handler.go b/vendor/github.com/pion/dtls/v2/flight3handler.go
new file mode 100644
index 0000000..f953be8
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/flight3handler.go
@@ -0,0 +1,194 @@
+package dtls
+
+import (
+ "context"
+
+ "github.com/pion/dtls/v2/pkg/crypto/elliptic"
+ "github.com/pion/dtls/v2/pkg/crypto/prf"
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/alert"
+ "github.com/pion/dtls/v2/pkg/protocol/extension"
+ "github.com/pion/dtls/v2/pkg/protocol/handshake"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+func flight3Parse(ctx context.Context, c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) (flightVal, *alert.Alert, error) { //nolint:gocognit
+ // Clients may receive multiple HelloVerifyRequest messages with different cookies.
+ // Clients SHOULD handle this by sending a new ClientHello with a cookie in response
+ // to the new HelloVerifyRequest. RFC 6347 Section 4.2.1
+ seq, msgs, ok := cache.fullPullMap(state.handshakeRecvSequence,
+ handshakeCachePullRule{handshake.TypeHelloVerifyRequest, cfg.initialEpoch, false, true},
+ )
+ if ok {
+ if h, msgOk := msgs[handshake.TypeHelloVerifyRequest].(*handshake.MessageHelloVerifyRequest); msgOk {
+ // DTLS 1.2 clients must not assume that the server will use the protocol version
+ // specified in HelloVerifyRequest message. RFC 6347 Section 4.2.1
+ if !h.Version.Equal(protocol.Version1_0) && !h.Version.Equal(protocol.Version1_2) {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.ProtocolVersion}, errUnsupportedProtocolVersion
+ }
+ state.cookie = append([]byte{}, h.Cookie...)
+ state.handshakeRecvSequence = seq
+ return flight3, nil, nil
+ }
+ }
+
+ if cfg.localPSKCallback != nil {
+ seq, msgs, ok = cache.fullPullMap(state.handshakeRecvSequence,
+ handshakeCachePullRule{handshake.TypeServerHello, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeServerKeyExchange, cfg.initialEpoch, false, true},
+ handshakeCachePullRule{handshake.TypeServerHelloDone, cfg.initialEpoch, false, false},
+ )
+ } else {
+ seq, msgs, ok = cache.fullPullMap(state.handshakeRecvSequence,
+ handshakeCachePullRule{handshake.TypeServerHello, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificate, cfg.initialEpoch, false, true},
+ handshakeCachePullRule{handshake.TypeServerKeyExchange, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificateRequest, cfg.initialEpoch, false, true},
+ handshakeCachePullRule{handshake.TypeServerHelloDone, cfg.initialEpoch, false, false},
+ )
+ }
+ if !ok {
+ // Don't have enough messages. Keep reading
+ return 0, nil, nil
+ }
+ state.handshakeRecvSequence = seq
+
+ if h, ok := msgs[handshake.TypeServerHello].(*handshake.MessageServerHello); ok {
+ if !h.Version.Equal(protocol.Version1_2) {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.ProtocolVersion}, errUnsupportedProtocolVersion
+ }
+ for _, v := range h.Extensions {
+ switch e := v.(type) {
+ case *extension.UseSRTP:
+ profile, ok := findMatchingSRTPProfile(e.ProtectionProfiles, cfg.localSRTPProtectionProfiles)
+ if !ok {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.IllegalParameter}, errClientNoMatchingSRTPProfile
+ }
+ state.srtpProtectionProfile = profile
+ case *extension.UseExtendedMasterSecret:
+ if cfg.extendedMasterSecret != DisableExtendedMasterSecret {
+ state.extendedMasterSecret = true
+ }
+ }
+ }
+ if cfg.extendedMasterSecret == RequireExtendedMasterSecret && !state.extendedMasterSecret {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}, errClientRequiredButNoServerEMS
+ }
+ if len(cfg.localSRTPProtectionProfiles) > 0 && state.srtpProtectionProfile == 0 {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}, errRequestedButNoSRTPExtension
+ }
+
+ remoteCipherSuite := cipherSuiteForID(CipherSuiteID(*h.CipherSuiteID), cfg.customCipherSuites)
+ if remoteCipherSuite == nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}, errCipherSuiteNoIntersection
+ }
+
+ selectedCipherSuite, ok := findMatchingCipherSuite([]CipherSuite{remoteCipherSuite}, cfg.localCipherSuites)
+ if !ok {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}, errInvalidCipherSuite
+ }
+
+ state.cipherSuite = selectedCipherSuite
+ state.remoteRandom = h.Random
+ cfg.log.Tracef("[handshake] use cipher suite: %s", selectedCipherSuite.String())
+ }
+
+ if h, ok := msgs[handshake.TypeCertificate].(*handshake.MessageCertificate); ok {
+ state.PeerCertificates = h.Certificate
+ } else if state.cipherSuite.AuthenticationType() == CipherSuiteAuthenticationTypeCertificate {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.NoCertificate}, errInvalidCertificate
+ }
+
+ if h, ok := msgs[handshake.TypeServerKeyExchange].(*handshake.MessageServerKeyExchange); ok {
+ alertPtr, err := handleServerKeyExchange(c, state, cfg, h)
+ if err != nil {
+ return 0, alertPtr, err
+ }
+ }
+
+ if _, ok := msgs[handshake.TypeCertificateRequest].(*handshake.MessageCertificateRequest); ok {
+ state.remoteRequestedCertificate = true
+ }
+
+ return flight5, nil, nil
+}
+
+func handleServerKeyExchange(_ flightConn, state *State, cfg *handshakeConfig, h *handshake.MessageServerKeyExchange) (*alert.Alert, error) {
+ var err error
+ if cfg.localPSKCallback != nil {
+ var psk []byte
+ if psk, err = cfg.localPSKCallback(h.IdentityHint); err != nil {
+ return &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ state.IdentityHint = h.IdentityHint
+ state.preMasterSecret = prf.PSKPreMasterSecret(psk)
+ } else {
+ if state.localKeypair, err = elliptic.GenerateKeypair(h.NamedCurve); err != nil {
+ return &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+
+ if state.preMasterSecret, err = prf.PreMasterSecret(h.PublicKey, state.localKeypair.PrivateKey, state.localKeypair.Curve); err != nil {
+ return &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ }
+
+ return nil, nil
+}
+
+func flight3Generate(c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) ([]*packet, *alert.Alert, error) {
+ extensions := []extension.Extension{
+ &extension.SupportedSignatureAlgorithms{
+ SignatureHashAlgorithms: cfg.localSignatureSchemes,
+ },
+ &extension.RenegotiationInfo{
+ RenegotiatedConnection: 0,
+ },
+ }
+ if cfg.localPSKCallback == nil {
+ extensions = append(extensions, []extension.Extension{
+ &extension.SupportedEllipticCurves{
+ EllipticCurves: []elliptic.Curve{elliptic.X25519, elliptic.P256, elliptic.P384},
+ },
+ &extension.SupportedPointFormats{
+ PointFormats: []elliptic.CurvePointFormat{elliptic.CurvePointFormatUncompressed},
+ },
+ }...)
+ }
+
+ if len(cfg.localSRTPProtectionProfiles) > 0 {
+ extensions = append(extensions, &extension.UseSRTP{
+ ProtectionProfiles: cfg.localSRTPProtectionProfiles,
+ })
+ }
+
+ if cfg.extendedMasterSecret == RequestExtendedMasterSecret ||
+ cfg.extendedMasterSecret == RequireExtendedMasterSecret {
+ extensions = append(extensions, &extension.UseExtendedMasterSecret{
+ Supported: true,
+ })
+ }
+
+ if len(cfg.serverName) > 0 {
+ extensions = append(extensions, &extension.ServerName{ServerName: cfg.serverName})
+ }
+
+ return []*packet{
+ {
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageClientHello{
+ Version: protocol.Version1_2,
+ Cookie: state.cookie,
+ Random: state.localRandom,
+ CipherSuiteIDs: cipherSuiteIDs(cfg.localCipherSuites),
+ CompressionMethods: defaultCompressionMethods(),
+ Extensions: extensions,
+ },
+ },
+ },
+ },
+ }, nil, nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/flight4handler.go b/vendor/github.com/pion/dtls/v2/flight4handler.go
new file mode 100644
index 0000000..d791c9d
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/flight4handler.go
@@ -0,0 +1,337 @@
+package dtls
+
+import (
+ "context"
+ "crypto/x509"
+
+ "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+ "github.com/pion/dtls/v2/pkg/crypto/elliptic"
+ "github.com/pion/dtls/v2/pkg/crypto/prf"
+ "github.com/pion/dtls/v2/pkg/crypto/signaturehash"
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/alert"
+ "github.com/pion/dtls/v2/pkg/protocol/extension"
+ "github.com/pion/dtls/v2/pkg/protocol/handshake"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+func flight4Parse(ctx context.Context, c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) (flightVal, *alert.Alert, error) { //nolint:gocognit
+ seq, msgs, ok := cache.fullPullMap(state.handshakeRecvSequence,
+ handshakeCachePullRule{handshake.TypeCertificate, cfg.initialEpoch, true, true},
+ handshakeCachePullRule{handshake.TypeClientKeyExchange, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeCertificateVerify, cfg.initialEpoch, true, true},
+ )
+ if !ok {
+ // No valid message received. Keep reading
+ return 0, nil, nil
+ }
+
+ // Validate type
+ var clientKeyExchange *handshake.MessageClientKeyExchange
+ if clientKeyExchange, ok = msgs[handshake.TypeClientKeyExchange].(*handshake.MessageClientKeyExchange); !ok {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, nil
+ }
+
+ if h, hasCert := msgs[handshake.TypeCertificate].(*handshake.MessageCertificate); hasCert {
+ state.PeerCertificates = h.Certificate
+ }
+
+ if h, hasCertVerify := msgs[handshake.TypeCertificateVerify].(*handshake.MessageCertificateVerify); hasCertVerify {
+ if state.PeerCertificates == nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.NoCertificate}, errCertificateVerifyNoCertificate
+ }
+
+ plainText := cache.pullAndMerge(
+ handshakeCachePullRule{handshake.TypeClientHello, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeServerHello, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificate, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeServerKeyExchange, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificateRequest, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeServerHelloDone, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificate, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeClientKeyExchange, cfg.initialEpoch, true, false},
+ )
+
+ // Verify that the pair of hash algorithm and signiture is listed.
+ var validSignatureScheme bool
+ for _, ss := range cfg.localSignatureSchemes {
+ if ss.Hash == h.HashAlgorithm && ss.Signature == h.SignatureAlgorithm {
+ validSignatureScheme = true
+ break
+ }
+ }
+ if !validSignatureScheme {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}, errNoAvailableSignatureSchemes
+ }
+
+ if err := verifyCertificateVerify(plainText, h.HashAlgorithm, h.Signature, state.PeerCertificates); err != nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.BadCertificate}, err
+ }
+ var chains [][]*x509.Certificate
+ var err error
+ var verified bool
+ if cfg.clientAuth >= VerifyClientCertIfGiven {
+ if chains, err = verifyClientCert(state.PeerCertificates, cfg.clientCAs); err != nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.BadCertificate}, err
+ }
+ verified = true
+ }
+ if cfg.verifyPeerCertificate != nil {
+ if err := cfg.verifyPeerCertificate(state.PeerCertificates, chains); err != nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.BadCertificate}, err
+ }
+ }
+ state.peerCertificatesVerified = verified
+ }
+
+ if !state.cipherSuite.IsInitialized() {
+ serverRandom := state.localRandom.MarshalFixed()
+ clientRandom := state.remoteRandom.MarshalFixed()
+
+ var err error
+ var preMasterSecret []byte
+ if state.cipherSuite.AuthenticationType() == CipherSuiteAuthenticationTypePreSharedKey {
+ var psk []byte
+ if psk, err = cfg.localPSKCallback(clientKeyExchange.IdentityHint); err != nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ state.IdentityHint = clientKeyExchange.IdentityHint
+ preMasterSecret = prf.PSKPreMasterSecret(psk)
+ } else {
+ preMasterSecret, err = prf.PreMasterSecret(clientKeyExchange.PublicKey, state.localKeypair.PrivateKey, state.localKeypair.Curve)
+ if err != nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.IllegalParameter}, err
+ }
+ }
+
+ if state.extendedMasterSecret {
+ var sessionHash []byte
+ sessionHash, err = cache.sessionHash(state.cipherSuite.HashFunc(), cfg.initialEpoch)
+ if err != nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+
+ state.masterSecret, err = prf.ExtendedMasterSecret(preMasterSecret, sessionHash, state.cipherSuite.HashFunc())
+ if err != nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ } else {
+ state.masterSecret, err = prf.MasterSecret(preMasterSecret, clientRandom[:], serverRandom[:], state.cipherSuite.HashFunc())
+ if err != nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ }
+
+ if err := state.cipherSuite.Init(state.masterSecret, clientRandom[:], serverRandom[:], false); err != nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ cfg.writeKeyLog(keyLogLabelTLS12, clientRandom[:], state.masterSecret)
+ }
+
+ // Now, encrypted packets can be handled
+ if err := c.handleQueuedPackets(ctx); err != nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+
+ seq, msgs, ok = cache.fullPullMap(seq,
+ handshakeCachePullRule{handshake.TypeFinished, cfg.initialEpoch + 1, true, false},
+ )
+ if !ok {
+ // No valid message received. Keep reading
+ return 0, nil, nil
+ }
+ state.handshakeRecvSequence = seq
+
+ if _, ok = msgs[handshake.TypeFinished].(*handshake.MessageFinished); !ok {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, nil
+ }
+
+ if state.cipherSuite.AuthenticationType() == CipherSuiteAuthenticationTypeAnonymous {
+ return flight6, nil, nil
+ }
+
+ switch cfg.clientAuth {
+ case RequireAnyClientCert:
+ if state.PeerCertificates == nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.NoCertificate}, errClientCertificateRequired
+ }
+ case VerifyClientCertIfGiven:
+ if state.PeerCertificates != nil && !state.peerCertificatesVerified {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.BadCertificate}, errClientCertificateNotVerified
+ }
+ case RequireAndVerifyClientCert:
+ if state.PeerCertificates == nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.NoCertificate}, errClientCertificateRequired
+ }
+ if !state.peerCertificatesVerified {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.BadCertificate}, errClientCertificateNotVerified
+ }
+ case NoClientCert, RequestClientCert:
+ return flight6, nil, nil
+ }
+
+ return flight6, nil, nil
+}
+
+func flight4Generate(c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) ([]*packet, *alert.Alert, error) {
+ extensions := []extension.Extension{&extension.RenegotiationInfo{
+ RenegotiatedConnection: 0,
+ }}
+ if (cfg.extendedMasterSecret == RequestExtendedMasterSecret ||
+ cfg.extendedMasterSecret == RequireExtendedMasterSecret) && state.extendedMasterSecret {
+ extensions = append(extensions, &extension.UseExtendedMasterSecret{
+ Supported: true,
+ })
+ }
+ if state.srtpProtectionProfile != 0 {
+ extensions = append(extensions, &extension.UseSRTP{
+ ProtectionProfiles: []SRTPProtectionProfile{state.srtpProtectionProfile},
+ })
+ }
+ if state.cipherSuite.AuthenticationType() == CipherSuiteAuthenticationTypeCertificate {
+ extensions = append(extensions, []extension.Extension{
+ &extension.SupportedEllipticCurves{
+ EllipticCurves: []elliptic.Curve{elliptic.X25519, elliptic.P256, elliptic.P384},
+ },
+ &extension.SupportedPointFormats{
+ PointFormats: []elliptic.CurvePointFormat{elliptic.CurvePointFormatUncompressed},
+ },
+ }...)
+ }
+
+ var pkts []*packet
+ cipherSuiteID := uint16(state.cipherSuite.ID())
+
+ pkts = append(pkts, &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageServerHello{
+ Version: protocol.Version1_2,
+ Random: state.localRandom,
+ CipherSuiteID: &cipherSuiteID,
+ CompressionMethod: defaultCompressionMethods()[0],
+ Extensions: extensions,
+ },
+ },
+ },
+ })
+
+ switch {
+ case state.cipherSuite.AuthenticationType() == CipherSuiteAuthenticationTypeCertificate:
+ certificate, err := cfg.getCertificate(cfg.serverName)
+ if err != nil {
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.HandshakeFailure}, err
+ }
+
+ pkts = append(pkts, &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageCertificate{
+ Certificate: certificate.Certificate,
+ },
+ },
+ },
+ })
+
+ serverRandom := state.localRandom.MarshalFixed()
+ clientRandom := state.remoteRandom.MarshalFixed()
+
+ // Find compatible signature scheme
+ signatureHashAlgo, err := signaturehash.SelectSignatureScheme(cfg.localSignatureSchemes, certificate.PrivateKey)
+ if err != nil {
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}, err
+ }
+
+ signature, err := generateKeySignature(clientRandom[:], serverRandom[:], state.localKeypair.PublicKey, state.namedCurve, certificate.PrivateKey, signatureHashAlgo.Hash)
+ if err != nil {
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ state.localKeySignature = signature
+
+ pkts = append(pkts, &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageServerKeyExchange{
+ EllipticCurveType: elliptic.CurveTypeNamedCurve,
+ NamedCurve: state.namedCurve,
+ PublicKey: state.localKeypair.PublicKey,
+ HashAlgorithm: signatureHashAlgo.Hash,
+ SignatureAlgorithm: signatureHashAlgo.Signature,
+ Signature: state.localKeySignature,
+ },
+ },
+ },
+ })
+
+ if cfg.clientAuth > NoClientCert {
+ pkts = append(pkts, &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageCertificateRequest{
+ CertificateTypes: []clientcertificate.Type{clientcertificate.RSASign, clientcertificate.ECDSASign},
+ SignatureHashAlgorithms: cfg.localSignatureSchemes,
+ },
+ },
+ },
+ })
+ }
+ case cfg.localPSKIdentityHint != nil:
+ // To help the client in selecting which identity to use, the server
+ // can provide a "PSK identity hint" in the ServerKeyExchange message.
+ // If no hint is provided, the ServerKeyExchange message is omitted.
+ //
+ // https://tools.ietf.org/html/rfc4279#section-2
+ pkts = append(pkts, &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageServerKeyExchange{
+ IdentityHint: cfg.localPSKIdentityHint,
+ },
+ },
+ },
+ })
+ case state.cipherSuite.AuthenticationType() == CipherSuiteAuthenticationTypeAnonymous:
+ pkts = append(pkts, &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageServerKeyExchange{
+ EllipticCurveType: elliptic.CurveTypeNamedCurve,
+ NamedCurve: state.namedCurve,
+ PublicKey: state.localKeypair.PublicKey,
+ },
+ },
+ },
+ })
+ }
+
+ pkts = append(pkts, &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageServerHelloDone{},
+ },
+ },
+ })
+
+ return pkts, nil, nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/flight5handler.go b/vendor/github.com/pion/dtls/v2/flight5handler.go
new file mode 100644
index 0000000..baa1d5c
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/flight5handler.go
@@ -0,0 +1,323 @@
+package dtls
+
+import (
+ "bytes"
+ "context"
+ "crypto"
+ "crypto/x509"
+
+ "github.com/pion/dtls/v2/pkg/crypto/prf"
+ "github.com/pion/dtls/v2/pkg/crypto/signaturehash"
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/alert"
+ "github.com/pion/dtls/v2/pkg/protocol/handshake"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+func flight5Parse(ctx context.Context, c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) (flightVal, *alert.Alert, error) {
+ _, msgs, ok := cache.fullPullMap(state.handshakeRecvSequence,
+ handshakeCachePullRule{handshake.TypeFinished, cfg.initialEpoch + 1, false, false},
+ )
+ if !ok {
+ // No valid message received. Keep reading
+ return 0, nil, nil
+ }
+
+ var finished *handshake.MessageFinished
+ if finished, ok = msgs[handshake.TypeFinished].(*handshake.MessageFinished); !ok {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, nil
+ }
+ plainText := cache.pullAndMerge(
+ handshakeCachePullRule{handshake.TypeClientHello, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeServerHello, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificate, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeServerKeyExchange, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificateRequest, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeServerHelloDone, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificate, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeClientKeyExchange, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeCertificateVerify, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeFinished, cfg.initialEpoch + 1, true, false},
+ )
+
+ expectedVerifyData, err := prf.VerifyDataServer(state.masterSecret, plainText, state.cipherSuite.HashFunc())
+ if err != nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ if !bytes.Equal(expectedVerifyData, finished.VerifyData) {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.HandshakeFailure}, errVerifyDataMismatch
+ }
+
+ return flight5, nil, nil
+}
+
+func flight5Generate(c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) ([]*packet, *alert.Alert, error) { //nolint:gocognit
+ var certBytes [][]byte
+ var privateKey crypto.PrivateKey
+ if len(cfg.localCertificates) > 0 {
+ certificate, err := cfg.getCertificate(cfg.serverName)
+ if err != nil {
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.HandshakeFailure}, err
+ }
+ certBytes = certificate.Certificate
+ privateKey = certificate.PrivateKey
+ }
+
+ var pkts []*packet
+
+ if state.remoteRequestedCertificate {
+ pkts = append(pkts,
+ &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageCertificate{
+ Certificate: certBytes,
+ },
+ },
+ },
+ })
+ }
+
+ clientKeyExchange := &handshake.MessageClientKeyExchange{}
+ if cfg.localPSKCallback == nil {
+ clientKeyExchange.PublicKey = state.localKeypair.PublicKey
+ } else {
+ clientKeyExchange.IdentityHint = cfg.localPSKIdentityHint
+ }
+
+ pkts = append(pkts,
+ &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &handshake.Handshake{
+ Message: clientKeyExchange,
+ },
+ },
+ })
+
+ serverKeyExchangeData := cache.pullAndMerge(
+ handshakeCachePullRule{handshake.TypeServerKeyExchange, cfg.initialEpoch, false, false},
+ )
+
+ serverKeyExchange := &handshake.MessageServerKeyExchange{}
+
+ // handshakeMessageServerKeyExchange is optional for PSK
+ if len(serverKeyExchangeData) == 0 {
+ alertPtr, err := handleServerKeyExchange(c, state, cfg, &handshake.MessageServerKeyExchange{})
+ if err != nil {
+ return nil, alertPtr, err
+ }
+ } else {
+ rawHandshake := &handshake.Handshake{}
+ err := rawHandshake.Unmarshal(serverKeyExchangeData)
+ if err != nil {
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.UnexpectedMessage}, err
+ }
+
+ switch h := rawHandshake.Message.(type) {
+ case *handshake.MessageServerKeyExchange:
+ serverKeyExchange = h
+ default:
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.UnexpectedMessage}, errInvalidContentType
+ }
+ }
+
+ // Append not-yet-sent packets
+ merged := []byte{}
+ seqPred := uint16(state.handshakeSendSequence)
+ for _, p := range pkts {
+ h, ok := p.record.Content.(*handshake.Handshake)
+ if !ok {
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, errInvalidContentType
+ }
+ h.Header.MessageSequence = seqPred
+ seqPred++
+ raw, err := h.Marshal()
+ if err != nil {
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ merged = append(merged, raw...)
+ }
+
+ if alertPtr, err := initalizeCipherSuite(state, cache, cfg, serverKeyExchange, merged); err != nil {
+ return nil, alertPtr, err
+ }
+
+ // If the client has sent a certificate with signing ability, a digitally-signed
+ // CertificateVerify message is sent to explicitly verify possession of the
+ // private key in the certificate.
+ if state.remoteRequestedCertificate && len(cfg.localCertificates) > 0 {
+ plainText := append(cache.pullAndMerge(
+ handshakeCachePullRule{handshake.TypeClientHello, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeServerHello, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificate, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeServerKeyExchange, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificateRequest, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeServerHelloDone, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificate, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeClientKeyExchange, cfg.initialEpoch, true, false},
+ ), merged...)
+
+ // Find compatible signature scheme
+ signatureHashAlgo, err := signaturehash.SelectSignatureScheme(cfg.localSignatureSchemes, privateKey)
+ if err != nil {
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}, err
+ }
+
+ certVerify, err := generateCertificateVerify(plainText, privateKey, signatureHashAlgo.Hash)
+ if err != nil {
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ state.localCertificatesVerify = certVerify
+
+ p := &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageCertificateVerify{
+ HashAlgorithm: signatureHashAlgo.Hash,
+ SignatureAlgorithm: signatureHashAlgo.Signature,
+ Signature: state.localCertificatesVerify,
+ },
+ },
+ },
+ }
+ pkts = append(pkts, p)
+
+ h, ok := p.record.Content.(*handshake.Handshake)
+ if !ok {
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, errInvalidContentType
+ }
+ h.Header.MessageSequence = seqPred
+ // seqPred++ // this is the last use of seqPred
+ raw, err := h.Marshal()
+ if err != nil {
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ merged = append(merged, raw...)
+ }
+
+ pkts = append(pkts,
+ &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &protocol.ChangeCipherSpec{},
+ },
+ })
+
+ if len(state.localVerifyData) == 0 {
+ plainText := cache.pullAndMerge(
+ handshakeCachePullRule{handshake.TypeClientHello, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeServerHello, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificate, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeServerKeyExchange, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificateRequest, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeServerHelloDone, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificate, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeClientKeyExchange, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeCertificateVerify, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeFinished, cfg.initialEpoch + 1, true, false},
+ )
+
+ var err error
+ state.localVerifyData, err = prf.VerifyDataClient(state.masterSecret, append(plainText, merged...), state.cipherSuite.HashFunc())
+ if err != nil {
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ }
+
+ pkts = append(pkts,
+ &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ Epoch: 1,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageFinished{
+ VerifyData: state.localVerifyData,
+ },
+ },
+ },
+ shouldEncrypt: true,
+ resetLocalSequenceNumber: true,
+ })
+
+ return pkts, nil, nil
+}
+
+func initalizeCipherSuite(state *State, cache *handshakeCache, cfg *handshakeConfig, h *handshake.MessageServerKeyExchange, sendingPlainText []byte) (*alert.Alert, error) { //nolint:gocognit
+ if state.cipherSuite.IsInitialized() {
+ return nil, nil
+ }
+
+ clientRandom := state.localRandom.MarshalFixed()
+ serverRandom := state.remoteRandom.MarshalFixed()
+
+ var err error
+
+ if state.extendedMasterSecret {
+ var sessionHash []byte
+ sessionHash, err = cache.sessionHash(state.cipherSuite.HashFunc(), cfg.initialEpoch, sendingPlainText)
+ if err != nil {
+ return &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+
+ state.masterSecret, err = prf.ExtendedMasterSecret(state.preMasterSecret, sessionHash, state.cipherSuite.HashFunc())
+ if err != nil {
+ return &alert.Alert{Level: alert.Fatal, Description: alert.IllegalParameter}, err
+ }
+ } else {
+ state.masterSecret, err = prf.MasterSecret(state.preMasterSecret, clientRandom[:], serverRandom[:], state.cipherSuite.HashFunc())
+ if err != nil {
+ return &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ }
+
+ if state.cipherSuite.AuthenticationType() == CipherSuiteAuthenticationTypeCertificate {
+ // Verify that the pair of hash algorithm and signiture is listed.
+ var validSignatureScheme bool
+ for _, ss := range cfg.localSignatureSchemes {
+ if ss.Hash == h.HashAlgorithm && ss.Signature == h.SignatureAlgorithm {
+ validSignatureScheme = true
+ break
+ }
+ }
+ if !validSignatureScheme {
+ return &alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}, errNoAvailableSignatureSchemes
+ }
+
+ expectedMsg := valueKeyMessage(clientRandom[:], serverRandom[:], h.PublicKey, h.NamedCurve)
+ if err = verifyKeySignature(expectedMsg, h.Signature, h.HashAlgorithm, state.PeerCertificates); err != nil {
+ return &alert.Alert{Level: alert.Fatal, Description: alert.BadCertificate}, err
+ }
+ var chains [][]*x509.Certificate
+ if !cfg.insecureSkipVerify {
+ if chains, err = verifyServerCert(state.PeerCertificates, cfg.rootCAs, cfg.serverName); err != nil {
+ return &alert.Alert{Level: alert.Fatal, Description: alert.BadCertificate}, err
+ }
+ }
+ if cfg.verifyPeerCertificate != nil {
+ if err = cfg.verifyPeerCertificate(state.PeerCertificates, chains); err != nil {
+ return &alert.Alert{Level: alert.Fatal, Description: alert.BadCertificate}, err
+ }
+ }
+ }
+
+ if err = state.cipherSuite.Init(state.masterSecret, clientRandom[:], serverRandom[:], true); err != nil {
+ return &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+
+ cfg.writeKeyLog(keyLogLabelTLS12, clientRandom[:], state.masterSecret)
+
+ return nil, nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/flight6handler.go b/vendor/github.com/pion/dtls/v2/flight6handler.go
new file mode 100644
index 0000000..10de5ad
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/flight6handler.go
@@ -0,0 +1,82 @@
+package dtls
+
+import (
+ "context"
+
+ "github.com/pion/dtls/v2/pkg/crypto/prf"
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/alert"
+ "github.com/pion/dtls/v2/pkg/protocol/handshake"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+func flight6Parse(ctx context.Context, c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) (flightVal, *alert.Alert, error) {
+ _, msgs, ok := cache.fullPullMap(state.handshakeRecvSequence-1,
+ handshakeCachePullRule{handshake.TypeFinished, cfg.initialEpoch + 1, true, false},
+ )
+ if !ok {
+ // No valid message received. Keep reading
+ return 0, nil, nil
+ }
+
+ if _, ok = msgs[handshake.TypeFinished].(*handshake.MessageFinished); !ok {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, nil
+ }
+
+ // Other party retransmitted the last flight.
+ return flight6, nil, nil
+}
+
+func flight6Generate(c flightConn, state *State, cache *handshakeCache, cfg *handshakeConfig) ([]*packet, *alert.Alert, error) {
+ var pkts []*packet
+
+ pkts = append(pkts,
+ &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ },
+ Content: &protocol.ChangeCipherSpec{},
+ },
+ })
+
+ if len(state.localVerifyData) == 0 {
+ plainText := cache.pullAndMerge(
+ handshakeCachePullRule{handshake.TypeClientHello, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeServerHello, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificate, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeServerKeyExchange, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificateRequest, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeServerHelloDone, cfg.initialEpoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificate, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeClientKeyExchange, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeCertificateVerify, cfg.initialEpoch, true, false},
+ handshakeCachePullRule{handshake.TypeFinished, cfg.initialEpoch + 1, true, false},
+ )
+
+ var err error
+ state.localVerifyData, err = prf.VerifyDataServer(state.masterSecret, plainText, state.cipherSuite.HashFunc())
+ if err != nil {
+ return nil, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ }
+
+ pkts = append(pkts,
+ &packet{
+ record: &recordlayer.RecordLayer{
+ Header: recordlayer.Header{
+ Version: protocol.Version1_2,
+ Epoch: 1,
+ },
+ Content: &handshake.Handshake{
+ Message: &handshake.MessageFinished{
+ VerifyData: state.localVerifyData,
+ },
+ },
+ },
+ shouldEncrypt: true,
+ resetLocalSequenceNumber: true,
+ },
+ )
+ return pkts, nil, nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/flighthandler.go b/vendor/github.com/pion/dtls/v2/flighthandler.go
new file mode 100644
index 0000000..b364c09
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/flighthandler.go
@@ -0,0 +1,57 @@
+package dtls
+
+import (
+ "context"
+
+ "github.com/pion/dtls/v2/pkg/protocol/alert"
+)
+
+// Parse received handshakes and return next flightVal
+type flightParser func(context.Context, flightConn, *State, *handshakeCache, *handshakeConfig) (flightVal, *alert.Alert, error)
+
+// Generate flights
+type flightGenerator func(flightConn, *State, *handshakeCache, *handshakeConfig) ([]*packet, *alert.Alert, error)
+
+func (f flightVal) getFlightParser() (flightParser, error) {
+ switch f {
+ case flight0:
+ return flight0Parse, nil
+ case flight1:
+ return flight1Parse, nil
+ case flight2:
+ return flight2Parse, nil
+ case flight3:
+ return flight3Parse, nil
+ case flight4:
+ return flight4Parse, nil
+ case flight5:
+ return flight5Parse, nil
+ case flight6:
+ return flight6Parse, nil
+ default:
+ return nil, errInvalidFlight
+ }
+}
+
+func (f flightVal) getFlightGenerator() (gen flightGenerator, retransmit bool, err error) {
+ switch f {
+ case flight0:
+ return flight0Generate, true, nil
+ case flight1:
+ return flight1Generate, true, nil
+ case flight2:
+ // https://tools.ietf.org/html/rfc6347#section-3.2.1
+ // HelloVerifyRequests must not be retransmitted.
+ return flight2Generate, false, nil
+ case flight3:
+ return flight3Generate, true, nil
+ case flight4:
+ return flight4Generate, true, nil
+ case flight5:
+ return flight5Generate, true, nil
+ case flight6:
+ return flight6Generate, true, nil
+ default:
+ return nil, false, errInvalidFlight
+ }
+}
diff --git a/vendor/github.com/pion/dtls/v2/fragment_buffer.go b/vendor/github.com/pion/dtls/v2/fragment_buffer.go
new file mode 100644
index 0000000..0274993
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/fragment_buffer.go
@@ -0,0 +1,111 @@
+package dtls
+
+import (
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/handshake"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+type fragment struct {
+ recordLayerHeader recordlayer.Header
+ handshakeHeader handshake.Header
+ data []byte
+}
+
+type fragmentBuffer struct {
+ // map of MessageSequenceNumbers that hold slices of fragments
+ cache map[uint16][]*fragment
+
+ currentMessageSequenceNumber uint16
+}
+
+func newFragmentBuffer() *fragmentBuffer {
+ return &fragmentBuffer{cache: map[uint16][]*fragment{}}
+}
+
+// Attempts to push a DTLS packet to the fragmentBuffer
+// when it returns true it means the fragmentBuffer has inserted and the buffer shouldn't be handled
+// when an error returns it is fatal, and the DTLS connection should be stopped
+func (f *fragmentBuffer) push(buf []byte) (bool, error) {
+ frag := new(fragment)
+ if err := frag.recordLayerHeader.Unmarshal(buf); err != nil {
+ return false, err
+ }
+
+ // fragment isn't a handshake, we don't need to handle it
+ if frag.recordLayerHeader.ContentType != protocol.ContentTypeHandshake {
+ return false, nil
+ }
+
+ for buf = buf[recordlayer.HeaderSize:]; len(buf) != 0; frag = new(fragment) {
+ if err := frag.handshakeHeader.Unmarshal(buf); err != nil {
+ return false, err
+ }
+
+ if _, ok := f.cache[frag.handshakeHeader.MessageSequence]; !ok {
+ f.cache[frag.handshakeHeader.MessageSequence] = []*fragment{}
+ }
+
+ // end index should be the length of handshake header but if the handshake
+ // was fragmented, we should keep them all
+ end := int(handshake.HeaderLength + frag.handshakeHeader.Length)
+ if size := len(buf); end > size {
+ end = size
+ }
+
+ // Discard all headers, when rebuilding the packet we will re-build
+ frag.data = append([]byte{}, buf[handshake.HeaderLength:end]...)
+ f.cache[frag.handshakeHeader.MessageSequence] = append(f.cache[frag.handshakeHeader.MessageSequence], frag)
+ buf = buf[end:]
+ }
+
+ return true, nil
+}
+
+func (f *fragmentBuffer) pop() (content []byte, epoch uint16) {
+ frags, ok := f.cache[f.currentMessageSequenceNumber]
+ if !ok {
+ return nil, 0
+ }
+
+ // Go doesn't support recursive lambdas
+ var appendMessage func(targetOffset uint32) bool
+
+ rawMessage := []byte{}
+ appendMessage = func(targetOffset uint32) bool {
+ for _, f := range frags {
+ if f.handshakeHeader.FragmentOffset == targetOffset {
+ fragmentEnd := (f.handshakeHeader.FragmentOffset + f.handshakeHeader.FragmentLength)
+ if fragmentEnd != f.handshakeHeader.Length {
+ if !appendMessage(fragmentEnd) {
+ return false
+ }
+ }
+
+ rawMessage = append(f.data, rawMessage...)
+ return true
+ }
+ }
+ return false
+ }
+
+ // Recursively collect up
+ if !appendMessage(0) {
+ return nil, 0
+ }
+
+ firstHeader := frags[0].handshakeHeader
+ firstHeader.FragmentOffset = 0
+ firstHeader.FragmentLength = firstHeader.Length
+
+ rawHeader, err := firstHeader.Marshal()
+ if err != nil {
+ return nil, 0
+ }
+
+ messageEpoch := frags[0].recordLayerHeader.Epoch
+
+ delete(f.cache, f.currentMessageSequenceNumber)
+ f.currentMessageSequenceNumber++
+ return append(rawHeader, rawMessage...), messageEpoch
+}
diff --git a/vendor/github.com/pion/dtls/v2/fuzz.go b/vendor/github.com/pion/dtls/v2/fuzz.go
new file mode 100644
index 0000000..56c1bf2
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/fuzz.go
@@ -0,0 +1,38 @@
+// +build gofuzz
+
+package dtls
+
+import "fmt"
+
+func partialHeaderMismatch(a, b recordlayer.Header) bool {
+ // Ignoring content length for now.
+ a.contentLen = b.contentLen
+ return a != b
+}
+
+func FuzzRecordLayer(data []byte) int {
+ var r recordLayer
+ if err := r.Unmarshal(data); err != nil {
+ return 0
+ }
+ buf, err := r.Marshal()
+ if err != nil {
+ return 1
+ }
+ if len(buf) == 0 {
+ panic("zero buff") // nolint
+ }
+ var nr recordLayer
+ if err = nr.Unmarshal(data); err != nil {
+ panic(err) // nolint
+ }
+ if partialHeaderMismatch(nr.recordlayer.Header, r.recordlayer.Header) {
+ panic( // nolint
+ fmt.Sprintf("header mismatch: %+v != %+v",
+ nr.recordlayer.Header, r.recordlayer.Header,
+ ),
+ )
+ }
+
+ return 1
+}
diff --git a/vendor/github.com/pion/dtls/v2/go.mod b/vendor/github.com/pion/dtls/v2/go.mod
new file mode 100644
index 0000000..33b60e0
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/go.mod
@@ -0,0 +1,12 @@
+module github.com/pion/dtls/v2
+
+require (
+ github.com/pion/logging v0.2.2
+ github.com/pion/transport v0.12.2
+ github.com/pion/udp v0.1.0
+ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
+ golang.org/x/net v0.0.0-20210119194325-5f4716e94777
+ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
+)
+
+go 1.13
diff --git a/vendor/github.com/pion/dtls/v2/go.sum b/vendor/github.com/pion/dtls/v2/go.sum
new file mode 100644
index 0000000..fa7c410
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/go.sum
@@ -0,0 +1,48 @@
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
+github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
+github.com/pion/transport v0.10.0 h1:9M12BSneJm6ggGhJyWpDveFOstJsTiQjkLf4M44rm80=
+github.com/pion/transport v0.10.0/go.mod h1:BnHnUipd0rZQyTVB2SBGojFHT9CBt5C5TcsJSQGkvSE=
+github.com/pion/transport v0.12.2 h1:WYEjhloRHt1R86LhUKjC5y+P52Y11/QqEUalvtzVoys=
+github.com/pion/transport v0.12.2/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q=
+github.com/pion/udp v0.1.0 h1:uGxQsNyrqG3GLINv36Ff60covYmfrLoxzwnCsIYspXI=
+github.com/pion/udp v0.1.0/go.mod h1:BPELIjbwE9PRbd/zxI/KYBnbo7B6+oA6YuEaNE8lths=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY=
+golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7 h1:3uJsdck53FDIpWwLeAXlia9p4C8j0BO2xZrqzKpL0D8=
+golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew=
+golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/pion/dtls/v2/handshake_cache.go b/vendor/github.com/pion/dtls/v2/handshake_cache.go
new file mode 100644
index 0000000..063a858
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/handshake_cache.go
@@ -0,0 +1,171 @@
+package dtls
+
+import (
+ "sync"
+
+ "github.com/pion/dtls/v2/pkg/crypto/prf"
+ "github.com/pion/dtls/v2/pkg/protocol/handshake"
+)
+
+type handshakeCacheItem struct {
+ typ handshake.Type
+ isClient bool
+ epoch uint16
+ messageSequence uint16
+ data []byte
+}
+
+type handshakeCachePullRule struct {
+ typ handshake.Type
+ epoch uint16
+ isClient bool
+ optional bool
+}
+
+type handshakeCache struct {
+ cache []*handshakeCacheItem
+ mu sync.Mutex
+}
+
+func newHandshakeCache() *handshakeCache {
+ return &handshakeCache{}
+}
+
+func (h *handshakeCache) push(data []byte, epoch, messageSequence uint16, typ handshake.Type, isClient bool) bool { //nolint
+ h.mu.Lock()
+ defer h.mu.Unlock()
+
+ for _, i := range h.cache {
+ if i.messageSequence == messageSequence &&
+ i.isClient == isClient {
+ return false
+ }
+ }
+
+ h.cache = append(h.cache, &handshakeCacheItem{
+ data: append([]byte{}, data...),
+ epoch: epoch,
+ messageSequence: messageSequence,
+ typ: typ,
+ isClient: isClient,
+ })
+ return true
+}
+
+// returns a list handshakes that match the requested rules
+// the list will contain null entries for rules that can't be satisfied
+// multiple entries may match a rule, but only the last match is returned (ie ClientHello with cookies)
+func (h *handshakeCache) pull(rules ...handshakeCachePullRule) []*handshakeCacheItem {
+ h.mu.Lock()
+ defer h.mu.Unlock()
+
+ out := make([]*handshakeCacheItem, len(rules))
+ for i, r := range rules {
+ for _, c := range h.cache {
+ if c.typ == r.typ && c.isClient == r.isClient && c.epoch == r.epoch {
+ switch {
+ case out[i] == nil:
+ out[i] = c
+ case out[i].messageSequence < c.messageSequence:
+ out[i] = c
+ }
+ }
+ }
+ }
+
+ return out
+}
+
+// fullPullMap pulls all handshakes between rules[0] to rules[len(rules)-1] as map.
+func (h *handshakeCache) fullPullMap(startSeq int, rules ...handshakeCachePullRule) (int, map[handshake.Type]handshake.Message, bool) {
+ h.mu.Lock()
+ defer h.mu.Unlock()
+
+ ci := make(map[handshake.Type]*handshakeCacheItem)
+ for _, r := range rules {
+ var item *handshakeCacheItem
+ for _, c := range h.cache {
+ if c.typ == r.typ && c.isClient == r.isClient && c.epoch == r.epoch {
+ switch {
+ case item == nil:
+ item = c
+ case item.messageSequence < c.messageSequence:
+ item = c
+ }
+ }
+ }
+ if !r.optional && item == nil {
+ // Missing mandatory message.
+ return startSeq, nil, false
+ }
+ ci[r.typ] = item
+ }
+ out := make(map[handshake.Type]handshake.Message)
+ seq := startSeq
+ for _, r := range rules {
+ t := r.typ
+ i := ci[t]
+ if i == nil {
+ continue
+ }
+ rawHandshake := &handshake.Handshake{}
+ if err := rawHandshake.Unmarshal(i.data); err != nil {
+ return startSeq, nil, false
+ }
+ if uint16(seq) != rawHandshake.Header.MessageSequence {
+ // There is a gap. Some messages are not arrived.
+ return startSeq, nil, false
+ }
+ seq++
+ out[t] = rawHandshake.Message
+ }
+ return seq, out, true
+}
+
+// pullAndMerge calls pull and then merges the results, ignoring any null entries
+func (h *handshakeCache) pullAndMerge(rules ...handshakeCachePullRule) []byte {
+ merged := []byte{}
+
+ for _, p := range h.pull(rules...) {
+ if p != nil {
+ merged = append(merged, p.data...)
+ }
+ }
+ return merged
+}
+
+// sessionHash returns the session hash for Extended Master Secret support
+// https://tools.ietf.org/html/draft-ietf-tls-session-hash-06#section-4
+func (h *handshakeCache) sessionHash(hf prf.HashFunc, epoch uint16, additional ...[]byte) ([]byte, error) {
+ merged := []byte{}
+
+ // Order defined by https://tools.ietf.org/html/rfc5246#section-7.3
+ handshakeBuffer := h.pull(
+ handshakeCachePullRule{handshake.TypeClientHello, epoch, true, false},
+ handshakeCachePullRule{handshake.TypeServerHello, epoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificate, epoch, false, false},
+ handshakeCachePullRule{handshake.TypeServerKeyExchange, epoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificateRequest, epoch, false, false},
+ handshakeCachePullRule{handshake.TypeServerHelloDone, epoch, false, false},
+ handshakeCachePullRule{handshake.TypeCertificate, epoch, true, false},
+ handshakeCachePullRule{handshake.TypeClientKeyExchange, epoch, true, false},
+ )
+
+ for _, p := range handshakeBuffer {
+ if p == nil {
+ continue
+ }
+
+ merged = append(merged, p.data...)
+ }
+ for _, a := range additional {
+ merged = append(merged, a...)
+ }
+
+ hash := hf()
+ if _, err := hash.Write(merged); err != nil {
+ return []byte{}, err
+ }
+
+ return hash.Sum(nil), nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/handshaker.go b/vendor/github.com/pion/dtls/v2/handshaker.go
new file mode 100644
index 0000000..0f5077e
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/handshaker.go
@@ -0,0 +1,334 @@
+package dtls
+
+import (
+ "context"
+ "crypto/tls"
+ "crypto/x509"
+ "fmt"
+ "io"
+ "sync"
+ "time"
+
+ "github.com/pion/dtls/v2/pkg/crypto/signaturehash"
+ "github.com/pion/dtls/v2/pkg/protocol/alert"
+ "github.com/pion/dtls/v2/pkg/protocol/handshake"
+ "github.com/pion/logging"
+)
+
+// [RFC6347 Section-4.2.4]
+// +-----------+
+// +---> | PREPARING | <--------------------+
+// | +-----------+ |
+// | | |
+// | | Buffer next flight |
+// | | |
+// | \|/ |
+// | +-----------+ |
+// | | SENDING |<------------------+ | Send
+// | +-----------+ | | HelloRequest
+// Receive | | | |
+// next | | Send flight | | or
+// flight | +--------+ | |
+// | | | Set retransmit timer | | Receive
+// | | \|/ | | HelloRequest
+// | | +-----------+ | | Send
+// +--)--| WAITING |-------------------+ | ClientHello
+// | | +-----------+ Timer expires | |
+// | | | | |
+// | | +------------------------+ |
+// Receive | | Send Read retransmit |
+// last | | last |
+// flight | | flight |
+// | | |
+// \|/\|/ |
+// +-----------+ |
+// | FINISHED | -------------------------------+
+// +-----------+
+// | /|\
+// | |
+// +---+
+// Read retransmit
+// Retransmit last flight
+
+type handshakeState uint8
+
+const (
+ handshakeErrored handshakeState = iota
+ handshakePreparing
+ handshakeSending
+ handshakeWaiting
+ handshakeFinished
+)
+
+func (s handshakeState) String() string {
+ switch s {
+ case handshakeErrored:
+ return "Errored"
+ case handshakePreparing:
+ return "Preparing"
+ case handshakeSending:
+ return "Sending"
+ case handshakeWaiting:
+ return "Waiting"
+ case handshakeFinished:
+ return "Finished"
+ default:
+ return "Unknown"
+ }
+}
+
+type handshakeFSM struct {
+ currentFlight flightVal
+ flights []*packet
+ retransmit bool
+ state *State
+ cache *handshakeCache
+ cfg *handshakeConfig
+ closed chan struct{}
+}
+
+type handshakeConfig struct {
+ localPSKCallback PSKCallback
+ localPSKIdentityHint []byte
+ localCipherSuites []CipherSuite // Available CipherSuites
+ localSignatureSchemes []signaturehash.Algorithm // Available signature schemes
+ extendedMasterSecret ExtendedMasterSecretType // Policy for the Extended Master Support extension
+ localSRTPProtectionProfiles []SRTPProtectionProfile // Available SRTPProtectionProfiles, if empty no SRTP support
+ serverName string
+ clientAuth ClientAuthType // If we are a client should we request a client certificate
+ localCertificates []tls.Certificate
+ nameToCertificate map[string]*tls.Certificate
+ insecureSkipVerify bool
+ verifyPeerCertificate func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error
+ rootCAs *x509.CertPool
+ clientCAs *x509.CertPool
+ retransmitInterval time.Duration
+ customCipherSuites func() []CipherSuite
+
+ onFlightState func(flightVal, handshakeState)
+ log logging.LeveledLogger
+ keyLogWriter io.Writer
+
+ initialEpoch uint16
+
+ mu sync.Mutex
+}
+
+type flightConn interface {
+ notify(ctx context.Context, level alert.Level, desc alert.Description) error
+ writePackets(context.Context, []*packet) error
+ recvHandshake() <-chan chan struct{}
+ setLocalEpoch(epoch uint16)
+ handleQueuedPackets(context.Context) error
+}
+
+func (c *handshakeConfig) writeKeyLog(label string, clientRandom, secret []byte) {
+ if c.keyLogWriter == nil {
+ return
+ }
+ c.mu.Lock()
+ defer c.mu.Unlock()
+ _, err := c.keyLogWriter.Write([]byte(fmt.Sprintf("%s %x %x\n", label, clientRandom, secret)))
+ if err != nil {
+ c.log.Debugf("failed to write key log file: %s", err)
+ }
+}
+
+func srvCliStr(isClient bool) string {
+ if isClient {
+ return "client"
+ }
+ return "server"
+}
+
+func newHandshakeFSM(
+ s *State, cache *handshakeCache, cfg *handshakeConfig,
+ initialFlight flightVal,
+) *handshakeFSM {
+ return &handshakeFSM{
+ currentFlight: initialFlight,
+ state: s,
+ cache: cache,
+ cfg: cfg,
+ closed: make(chan struct{}),
+ }
+}
+
+func (s *handshakeFSM) Run(ctx context.Context, c flightConn, initialState handshakeState) error {
+ state := initialState
+ defer func() {
+ close(s.closed)
+ }()
+ for {
+ s.cfg.log.Tracef("[handshake:%s] %s: %s", srvCliStr(s.state.isClient), s.currentFlight.String(), state.String())
+ if s.cfg.onFlightState != nil {
+ s.cfg.onFlightState(s.currentFlight, state)
+ }
+ var err error
+ switch state {
+ case handshakePreparing:
+ state, err = s.prepare(ctx, c)
+ case handshakeSending:
+ state, err = s.send(ctx, c)
+ case handshakeWaiting:
+ state, err = s.wait(ctx, c)
+ case handshakeFinished:
+ state, err = s.finish(ctx, c)
+ default:
+ return errInvalidFSMTransition
+ }
+ if err != nil {
+ return err
+ }
+ }
+}
+
+func (s *handshakeFSM) Done() <-chan struct{} {
+ return s.closed
+}
+
+func (s *handshakeFSM) prepare(ctx context.Context, c flightConn) (handshakeState, error) {
+ s.flights = nil
+ // Prepare flights
+ var (
+ a *alert.Alert
+ err error
+ pkts []*packet
+ )
+ gen, retransmit, errFlight := s.currentFlight.getFlightGenerator()
+ if errFlight != nil {
+ err = errFlight
+ a = &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}
+ } else {
+ pkts, a, err = gen(c, s.state, s.cache, s.cfg)
+ s.retransmit = retransmit
+ }
+ if a != nil {
+ if alertErr := c.notify(ctx, a.Level, a.Description); alertErr != nil {
+ if err != nil {
+ err = alertErr
+ }
+ }
+ }
+ if err != nil {
+ return handshakeErrored, err
+ }
+
+ s.flights = pkts
+ epoch := s.cfg.initialEpoch
+ nextEpoch := epoch
+ for _, p := range s.flights {
+ p.record.Header.Epoch += epoch
+ if p.record.Header.Epoch > nextEpoch {
+ nextEpoch = p.record.Header.Epoch
+ }
+ if h, ok := p.record.Content.(*handshake.Handshake); ok {
+ h.Header.MessageSequence = uint16(s.state.handshakeSendSequence)
+ s.state.handshakeSendSequence++
+ }
+ }
+ if epoch != nextEpoch {
+ s.cfg.log.Tracef("[handshake:%s] -> changeCipherSpec (epoch: %d)", srvCliStr(s.state.isClient), nextEpoch)
+ c.setLocalEpoch(nextEpoch)
+ }
+ return handshakeSending, nil
+}
+
+func (s *handshakeFSM) send(ctx context.Context, c flightConn) (handshakeState, error) {
+ // Send flights
+ if err := c.writePackets(ctx, s.flights); err != nil {
+ return handshakeErrored, err
+ }
+
+ if s.currentFlight.isLastSendFlight() {
+ return handshakeFinished, nil
+ }
+ return handshakeWaiting, nil
+}
+
+func (s *handshakeFSM) wait(ctx context.Context, c flightConn) (handshakeState, error) { //nolint:gocognit
+ parse, errFlight := s.currentFlight.getFlightParser()
+ if errFlight != nil {
+ if alertErr := c.notify(ctx, alert.Fatal, alert.InternalError); alertErr != nil {
+ if errFlight != nil {
+ return handshakeErrored, alertErr
+ }
+ }
+ return handshakeErrored, errFlight
+ }
+
+ retransmitTimer := time.NewTimer(s.cfg.retransmitInterval)
+ for {
+ select {
+ case done := <-c.recvHandshake():
+ nextFlight, alert, err := parse(ctx, c, s.state, s.cache, s.cfg)
+ close(done)
+ if alert != nil {
+ if alertErr := c.notify(ctx, alert.Level, alert.Description); alertErr != nil {
+ if err != nil {
+ err = alertErr
+ }
+ }
+ }
+ if err != nil {
+ return handshakeErrored, err
+ }
+ if nextFlight == 0 {
+ break
+ }
+ s.cfg.log.Tracef("[handshake:%s] %s -> %s", srvCliStr(s.state.isClient), s.currentFlight.String(), nextFlight.String())
+ if nextFlight.isLastRecvFlight() && s.currentFlight == nextFlight {
+ return handshakeFinished, nil
+ }
+ s.currentFlight = nextFlight
+ return handshakePreparing, nil
+
+ case <-retransmitTimer.C:
+ if !s.retransmit {
+ return handshakeWaiting, nil
+ }
+ return handshakeSending, nil
+ case <-ctx.Done():
+ return handshakeErrored, ctx.Err()
+ }
+ }
+}
+
+func (s *handshakeFSM) finish(ctx context.Context, c flightConn) (handshakeState, error) {
+ parse, errFlight := s.currentFlight.getFlightParser()
+ if errFlight != nil {
+ if alertErr := c.notify(ctx, alert.Fatal, alert.InternalError); alertErr != nil {
+ if errFlight != nil {
+ return handshakeErrored, alertErr
+ }
+ }
+ return handshakeErrored, errFlight
+ }
+
+ retransmitTimer := time.NewTimer(s.cfg.retransmitInterval)
+ select {
+ case done := <-c.recvHandshake():
+ nextFlight, alert, err := parse(ctx, c, s.state, s.cache, s.cfg)
+ close(done)
+ if alert != nil {
+ if alertErr := c.notify(ctx, alert.Level, alert.Description); alertErr != nil {
+ if err != nil {
+ err = alertErr
+ }
+ }
+ }
+ if err != nil {
+ return handshakeErrored, err
+ }
+ if nextFlight == 0 {
+ break
+ }
+ <-retransmitTimer.C
+ // Retransmit last flight
+ return handshakeSending, nil
+
+ case <-ctx.Done():
+ return handshakeErrored, ctx.Err()
+ }
+ return handshakeFinished, nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/internal/ciphersuite/aes_128_ccm.go b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/aes_128_ccm.go
new file mode 100644
index 0000000..dcc5379
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/aes_128_ccm.go
@@ -0,0 +1,108 @@
+package ciphersuite
+
+import (
+ "crypto/sha256"
+ "fmt"
+ "hash"
+ "sync/atomic"
+
+ "github.com/pion/dtls/v2/pkg/crypto/ciphersuite"
+ "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+ "github.com/pion/dtls/v2/pkg/crypto/prf"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+// Aes128Ccm is a base class used by multiple AES-CCM Ciphers
+type Aes128Ccm struct {
+ ccm atomic.Value // *cryptoCCM
+ clientCertificateType clientcertificate.Type
+ id ID
+ psk bool
+ cryptoCCMTagLen ciphersuite.CCMTagLen
+}
+
+func newAes128Ccm(clientCertificateType clientcertificate.Type, id ID, psk bool, cryptoCCMTagLen ciphersuite.CCMTagLen) *Aes128Ccm {
+ return &Aes128Ccm{
+ clientCertificateType: clientCertificateType,
+ id: id,
+ psk: psk,
+ cryptoCCMTagLen: cryptoCCMTagLen,
+ }
+}
+
+// CertificateType returns what type of certificate this CipherSuite exchanges
+func (c *Aes128Ccm) CertificateType() clientcertificate.Type {
+ return c.clientCertificateType
+}
+
+// ID returns the ID of the CipherSuite
+func (c *Aes128Ccm) ID() ID {
+ return c.id
+}
+
+func (c *Aes128Ccm) String() string {
+ return c.id.String()
+}
+
+// HashFunc returns the hashing func for this CipherSuite
+func (c *Aes128Ccm) HashFunc() func() hash.Hash {
+ return sha256.New
+}
+
+// AuthenticationType controls what authentication method is using during the handshake
+func (c *Aes128Ccm) AuthenticationType() AuthenticationType {
+ if c.psk {
+ return AuthenticationTypePreSharedKey
+ }
+ return AuthenticationTypeCertificate
+}
+
+// IsInitialized returns if the CipherSuite has keying material and can
+// encrypt/decrypt packets
+func (c *Aes128Ccm) IsInitialized() bool {
+ return c.ccm.Load() != nil
+}
+
+// Init initializes the internal Cipher with keying material
+func (c *Aes128Ccm) Init(masterSecret, clientRandom, serverRandom []byte, isClient bool) error {
+ const (
+ prfMacLen = 0
+ prfKeyLen = 16
+ prfIvLen = 4
+ )
+
+ keys, err := prf.GenerateEncryptionKeys(masterSecret, clientRandom, serverRandom, prfMacLen, prfKeyLen, prfIvLen, c.HashFunc())
+ if err != nil {
+ return err
+ }
+
+ var ccm *ciphersuite.CCM
+ if isClient {
+ ccm, err = ciphersuite.NewCCM(c.cryptoCCMTagLen, keys.ClientWriteKey, keys.ClientWriteIV, keys.ServerWriteKey, keys.ServerWriteIV)
+ } else {
+ ccm, err = ciphersuite.NewCCM(c.cryptoCCMTagLen, keys.ServerWriteKey, keys.ServerWriteIV, keys.ClientWriteKey, keys.ClientWriteIV)
+ }
+ c.ccm.Store(ccm)
+
+ return err
+}
+
+// Encrypt encrypts a single TLS RecordLayer
+func (c *Aes128Ccm) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error) {
+ ccm := c.ccm.Load()
+ if ccm == nil {
+ return nil, fmt.Errorf("%w, unable to encrypt", errCipherSuiteNotInit)
+ }
+
+ return ccm.(*ciphersuite.CCM).Encrypt(pkt, raw)
+}
+
+// Decrypt decrypts a single TLS RecordLayer
+func (c *Aes128Ccm) Decrypt(raw []byte) ([]byte, error) {
+ ccm := c.ccm.Load()
+ if ccm == nil {
+ return nil, fmt.Errorf("%w, unable to decrypt", errCipherSuiteNotInit)
+ }
+
+ return ccm.(*ciphersuite.CCM).Decrypt(raw)
+}
diff --git a/vendor/github.com/pion/dtls/v2/internal/ciphersuite/ciphersuite.go b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/ciphersuite.go
new file mode 100644
index 0000000..3a4fb43
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/ciphersuite.go
@@ -0,0 +1,71 @@
+// Package ciphersuite provides TLS Ciphers as registered with the IANA https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4
+package ciphersuite
+
+import (
+ "errors"
+ "fmt"
+
+ "github.com/pion/dtls/v2/pkg/protocol"
+)
+
+var errCipherSuiteNotInit = &protocol.TemporaryError{Err: errors.New("CipherSuite has not been initialized")} //nolint:goerr113
+
+// ID is an ID for our supported CipherSuites
+type ID uint16
+
+func (i ID) String() string {
+ switch i {
+ case TLS_ECDHE_ECDSA_WITH_AES_128_CCM:
+ return "TLS_ECDHE_ECDSA_WITH_AES_128_CCM"
+ case TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8:
+ return "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8"
+ case TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:
+ return "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
+ case TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:
+ return "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
+ case TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:
+ return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"
+ case TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:
+ return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"
+ case TLS_PSK_WITH_AES_128_CCM:
+ return "TLS_PSK_WITH_AES_128_CCM"
+ case TLS_PSK_WITH_AES_128_CCM_8:
+ return "TLS_PSK_WITH_AES_128_CCM_8"
+ case TLS_PSK_WITH_AES_128_GCM_SHA256:
+ return "TLS_PSK_WITH_AES_128_GCM_SHA256"
+ case TLS_PSK_WITH_AES_128_CBC_SHA256:
+ return "TLS_PSK_WITH_AES_128_CBC_SHA256"
+ default:
+ return fmt.Sprintf("unknown(%v)", uint16(i))
+ }
+}
+
+// Supported Cipher Suites
+const (
+ // AES-128-CCM
+ TLS_ECDHE_ECDSA_WITH_AES_128_CCM ID = 0xc0ac //nolint:golint,stylecheck
+ TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 ID = 0xc0ae //nolint:golint,stylecheck
+
+ // AES-128-GCM-SHA256
+ TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ID = 0xc02b //nolint:golint,stylecheck
+ TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 ID = 0xc02f //nolint:golint,stylecheck
+
+ // AES-256-CBC-SHA
+ TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA ID = 0xc00a //nolint:golint,stylecheck
+ TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA ID = 0xc014 //nolint:golint,stylecheck
+
+ TLS_PSK_WITH_AES_128_CCM ID = 0xc0a4 //nolint:golint,stylecheck
+ TLS_PSK_WITH_AES_128_CCM_8 ID = 0xc0a8 //nolint:golint,stylecheck
+ TLS_PSK_WITH_AES_128_GCM_SHA256 ID = 0x00a8 //nolint:golint,stylecheck
+ TLS_PSK_WITH_AES_128_CBC_SHA256 ID = 0x00ae //nolint:golint,stylecheck
+)
+
+// AuthenticationType controls what authentication method is using during the handshake
+type AuthenticationType int
+
+// AuthenticationType Enums
+const (
+ AuthenticationTypeCertificate AuthenticationType = iota + 1
+ AuthenticationTypePreSharedKey
+ AuthenticationTypeAnonymous
+)
diff --git a/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_128_ccm.go b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_128_ccm.go
new file mode 100644
index 0000000..ac73556
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_128_ccm.go
@@ -0,0 +1,11 @@
+package ciphersuite
+
+import (
+ "github.com/pion/dtls/v2/pkg/crypto/ciphersuite"
+ "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+)
+
+// NewTLSEcdheEcdsaWithAes128Ccm constructs a TLS_ECDHE_ECDSA_WITH_AES_128_CCM Cipher
+func NewTLSEcdheEcdsaWithAes128Ccm() *Aes128Ccm {
+ return newAes128Ccm(clientcertificate.ECDSASign, TLS_ECDHE_ECDSA_WITH_AES_128_CCM, false, ciphersuite.CCMTagLength)
+}
diff --git a/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_128_ccm8.go b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_128_ccm8.go
new file mode 100644
index 0000000..49b1a83
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_128_ccm8.go
@@ -0,0 +1,11 @@
+package ciphersuite
+
+import (
+ "github.com/pion/dtls/v2/pkg/crypto/ciphersuite"
+ "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+)
+
+// NewTLSEcdheEcdsaWithAes128Ccm8 creates a new TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 CipherSuite
+func NewTLSEcdheEcdsaWithAes128Ccm8() *Aes128Ccm {
+ return newAes128Ccm(clientcertificate.ECDSASign, TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, false, ciphersuite.CCMTagLength8)
+}
diff --git a/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_128_gcm_sha256.go b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_128_gcm_sha256.go
new file mode 100644
index 0000000..b491320
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_128_gcm_sha256.go
@@ -0,0 +1,92 @@
+package ciphersuite
+
+import (
+ "crypto/sha256"
+ "fmt"
+ "hash"
+ "sync/atomic"
+
+ "github.com/pion/dtls/v2/pkg/crypto/ciphersuite"
+ "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+ "github.com/pion/dtls/v2/pkg/crypto/prf"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+// TLSEcdheEcdsaWithAes128GcmSha256 represents a TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 CipherSuite
+type TLSEcdheEcdsaWithAes128GcmSha256 struct {
+ gcm atomic.Value // *cryptoGCM
+}
+
+// CertificateType returns what type of certficate this CipherSuite exchanges
+func (c *TLSEcdheEcdsaWithAes128GcmSha256) CertificateType() clientcertificate.Type {
+ return clientcertificate.ECDSASign
+}
+
+// ID returns the ID of the CipherSuite
+func (c *TLSEcdheEcdsaWithAes128GcmSha256) ID() ID {
+ return TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
+}
+
+func (c *TLSEcdheEcdsaWithAes128GcmSha256) String() string {
+ return "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
+}
+
+// HashFunc returns the hashing func for this CipherSuite
+func (c *TLSEcdheEcdsaWithAes128GcmSha256) HashFunc() func() hash.Hash {
+ return sha256.New
+}
+
+// AuthenticationType controls what authentication method is using during the handshake
+func (c *TLSEcdheEcdsaWithAes128GcmSha256) AuthenticationType() AuthenticationType {
+ return AuthenticationTypeCertificate
+}
+
+// IsInitialized returns if the CipherSuite has keying material and can
+// encrypt/decrypt packets
+func (c *TLSEcdheEcdsaWithAes128GcmSha256) IsInitialized() bool {
+ return c.gcm.Load() != nil
+}
+
+// Init initializes the internal Cipher with keying material
+func (c *TLSEcdheEcdsaWithAes128GcmSha256) Init(masterSecret, clientRandom, serverRandom []byte, isClient bool) error {
+ const (
+ prfMacLen = 0
+ prfKeyLen = 16
+ prfIvLen = 4
+ )
+
+ keys, err := prf.GenerateEncryptionKeys(masterSecret, clientRandom, serverRandom, prfMacLen, prfKeyLen, prfIvLen, c.HashFunc())
+ if err != nil {
+ return err
+ }
+
+ var gcm *ciphersuite.GCM
+ if isClient {
+ gcm, err = ciphersuite.NewGCM(keys.ClientWriteKey, keys.ClientWriteIV, keys.ServerWriteKey, keys.ServerWriteIV)
+ } else {
+ gcm, err = ciphersuite.NewGCM(keys.ServerWriteKey, keys.ServerWriteIV, keys.ClientWriteKey, keys.ClientWriteIV)
+ }
+ c.gcm.Store(gcm)
+
+ return err
+}
+
+// Encrypt encrypts a single TLS RecordLayer
+func (c *TLSEcdheEcdsaWithAes128GcmSha256) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error) {
+ gcm := c.gcm.Load()
+ if gcm == nil {
+ return nil, fmt.Errorf("%w, unable to encrypt", errCipherSuiteNotInit)
+ }
+
+ return gcm.(*ciphersuite.GCM).Encrypt(pkt, raw)
+}
+
+// Decrypt decrypts a single TLS RecordLayer
+func (c *TLSEcdheEcdsaWithAes128GcmSha256) Decrypt(raw []byte) ([]byte, error) {
+ gcm := c.gcm.Load()
+ if gcm == nil {
+ return nil, fmt.Errorf("%w, unable to decrypt", errCipherSuiteNotInit)
+ }
+
+ return gcm.(*ciphersuite.GCM).Decrypt(raw)
+}
diff --git a/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_256_cbc_sha.go b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_256_cbc_sha.go
new file mode 100644
index 0000000..f7a33ad
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_ecdsa_with_aes_256_cbc_sha.go
@@ -0,0 +1,101 @@
+package ciphersuite
+
+import (
+ "crypto/sha1" //nolint: gosec,gci
+ "crypto/sha256"
+ "fmt"
+ "hash"
+ "sync/atomic"
+
+ "github.com/pion/dtls/v2/pkg/crypto/ciphersuite"
+ "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+ "github.com/pion/dtls/v2/pkg/crypto/prf"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+// TLSEcdheEcdsaWithAes256CbcSha represents a TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA CipherSuite
+type TLSEcdheEcdsaWithAes256CbcSha struct {
+ cbc atomic.Value // *cryptoCBC
+}
+
+// CertificateType returns what type of certficate this CipherSuite exchanges
+func (c *TLSEcdheEcdsaWithAes256CbcSha) CertificateType() clientcertificate.Type {
+ return clientcertificate.ECDSASign
+}
+
+// ID returns the ID of the CipherSuite
+func (c *TLSEcdheEcdsaWithAes256CbcSha) ID() ID {
+ return TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
+}
+
+func (c *TLSEcdheEcdsaWithAes256CbcSha) String() string {
+ return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"
+}
+
+// HashFunc returns the hashing func for this CipherSuite
+func (c *TLSEcdheEcdsaWithAes256CbcSha) HashFunc() func() hash.Hash {
+ return sha256.New
+}
+
+// AuthenticationType controls what authentication method is using during the handshake
+func (c *TLSEcdheEcdsaWithAes256CbcSha) AuthenticationType() AuthenticationType {
+ return AuthenticationTypeCertificate
+}
+
+// IsInitialized returns if the CipherSuite has keying material and can
+// encrypt/decrypt packets
+func (c *TLSEcdheEcdsaWithAes256CbcSha) IsInitialized() bool {
+ return c.cbc.Load() != nil
+}
+
+// Init initializes the internal Cipher with keying material
+func (c *TLSEcdheEcdsaWithAes256CbcSha) Init(masterSecret, clientRandom, serverRandom []byte, isClient bool) error {
+ const (
+ prfMacLen = 20
+ prfKeyLen = 32
+ prfIvLen = 16
+ )
+
+ keys, err := prf.GenerateEncryptionKeys(masterSecret, clientRandom, serverRandom, prfMacLen, prfKeyLen, prfIvLen, c.HashFunc())
+ if err != nil {
+ return err
+ }
+
+ var cbc *ciphersuite.CBC
+ if isClient {
+ cbc, err = ciphersuite.NewCBC(
+ keys.ClientWriteKey, keys.ClientWriteIV, keys.ClientMACKey,
+ keys.ServerWriteKey, keys.ServerWriteIV, keys.ServerMACKey,
+ sha1.New,
+ )
+ } else {
+ cbc, err = ciphersuite.NewCBC(
+ keys.ServerWriteKey, keys.ServerWriteIV, keys.ServerMACKey,
+ keys.ClientWriteKey, keys.ClientWriteIV, keys.ClientMACKey,
+ sha1.New,
+ )
+ }
+ c.cbc.Store(cbc)
+
+ return err
+}
+
+// Encrypt encrypts a single TLS RecordLayer
+func (c *TLSEcdheEcdsaWithAes256CbcSha) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error) {
+ cbc := c.cbc.Load()
+ if cbc == nil { // !c.isInitialized()
+ return nil, fmt.Errorf("%w, unable to encrypt", errCipherSuiteNotInit)
+ }
+
+ return cbc.(*ciphersuite.CBC).Encrypt(pkt, raw)
+}
+
+// Decrypt decrypts a single TLS RecordLayer
+func (c *TLSEcdheEcdsaWithAes256CbcSha) Decrypt(raw []byte) ([]byte, error) {
+ cbc := c.cbc.Load()
+ if cbc == nil { // !c.isInitialized()
+ return nil, fmt.Errorf("%w, unable to decrypt", errCipherSuiteNotInit)
+ }
+
+ return cbc.(*ciphersuite.CBC).Decrypt(raw)
+}
diff --git a/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_rsa_with_aes_128_gcm_sha256.go b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_rsa_with_aes_128_gcm_sha256.go
new file mode 100644
index 0000000..70400c3
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_rsa_with_aes_128_gcm_sha256.go
@@ -0,0 +1,22 @@
+package ciphersuite
+
+import "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+
+// TLSEcdheRsaWithAes128GcmSha256 implements the TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 CipherSuite
+type TLSEcdheRsaWithAes128GcmSha256 struct {
+ TLSEcdheEcdsaWithAes128GcmSha256
+}
+
+// CertificateType returns what type of certificate this CipherSuite exchanges
+func (c *TLSEcdheRsaWithAes128GcmSha256) CertificateType() clientcertificate.Type {
+ return clientcertificate.RSASign
+}
+
+// ID returns the ID of the CipherSuite
+func (c *TLSEcdheRsaWithAes128GcmSha256) ID() ID {
+ return TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
+}
+
+func (c *TLSEcdheRsaWithAes128GcmSha256) String() string {
+ return "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
+}
diff --git a/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_rsa_with_aes_256_cbc_sha.go b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_rsa_with_aes_256_cbc_sha.go
new file mode 100644
index 0000000..0d82dc3
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_ecdhe_rsa_with_aes_256_cbc_sha.go
@@ -0,0 +1,22 @@
+package ciphersuite
+
+import "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+
+// TLSEcdheRsaWithAes256CbcSha implements the TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA CipherSuite
+type TLSEcdheRsaWithAes256CbcSha struct {
+ TLSEcdheEcdsaWithAes256CbcSha
+}
+
+// CertificateType returns what type of certificate this CipherSuite exchanges
+func (c *TLSEcdheRsaWithAes256CbcSha) CertificateType() clientcertificate.Type {
+ return clientcertificate.RSASign
+}
+
+// ID returns the ID of the CipherSuite
+func (c *TLSEcdheRsaWithAes256CbcSha) ID() ID {
+ return TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
+}
+
+func (c *TLSEcdheRsaWithAes256CbcSha) String() string {
+ return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"
+}
diff --git a/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_cbc_sha256.go b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_cbc_sha256.go
new file mode 100644
index 0000000..43e5e38
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_cbc_sha256.go
@@ -0,0 +1,100 @@
+package ciphersuite
+
+import (
+ "crypto/sha256"
+ "fmt"
+ "hash"
+ "sync/atomic"
+
+ "github.com/pion/dtls/v2/pkg/crypto/ciphersuite"
+ "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+ "github.com/pion/dtls/v2/pkg/crypto/prf"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+// TLSPskWithAes128CbcSha256 implements the TLS_PSK_WITH_AES_128_CBC_SHA256 CipherSuite
+type TLSPskWithAes128CbcSha256 struct {
+ cbc atomic.Value // *cryptoCBC
+}
+
+// CertificateType returns what type of certificate this CipherSuite exchanges
+func (c *TLSPskWithAes128CbcSha256) CertificateType() clientcertificate.Type {
+ return clientcertificate.Type(0)
+}
+
+// ID returns the ID of the CipherSuite
+func (c *TLSPskWithAes128CbcSha256) ID() ID {
+ return TLS_PSK_WITH_AES_128_CBC_SHA256
+}
+
+func (c *TLSPskWithAes128CbcSha256) String() string {
+ return "TLS_PSK_WITH_AES_128_CBC_SHA256"
+}
+
+// HashFunc returns the hashing func for this CipherSuite
+func (c *TLSPskWithAes128CbcSha256) HashFunc() func() hash.Hash {
+ return sha256.New
+}
+
+// AuthenticationType controls what authentication method is using during the handshake
+func (c *TLSPskWithAes128CbcSha256) AuthenticationType() AuthenticationType {
+ return AuthenticationTypePreSharedKey
+}
+
+// IsInitialized returns if the CipherSuite has keying material and can
+// encrypt/decrypt packets
+func (c *TLSPskWithAes128CbcSha256) IsInitialized() bool {
+ return c.cbc.Load() != nil
+}
+
+// Init initializes the internal Cipher with keying material
+func (c *TLSPskWithAes128CbcSha256) Init(masterSecret, clientRandom, serverRandom []byte, isClient bool) error {
+ const (
+ prfMacLen = 32
+ prfKeyLen = 16
+ prfIvLen = 16
+ )
+
+ keys, err := prf.GenerateEncryptionKeys(masterSecret, clientRandom, serverRandom, prfMacLen, prfKeyLen, prfIvLen, c.HashFunc())
+ if err != nil {
+ return err
+ }
+
+ var cbc *ciphersuite.CBC
+ if isClient {
+ cbc, err = ciphersuite.NewCBC(
+ keys.ClientWriteKey, keys.ClientWriteIV, keys.ClientMACKey,
+ keys.ServerWriteKey, keys.ServerWriteIV, keys.ServerMACKey,
+ c.HashFunc(),
+ )
+ } else {
+ cbc, err = ciphersuite.NewCBC(
+ keys.ServerWriteKey, keys.ServerWriteIV, keys.ServerMACKey,
+ keys.ClientWriteKey, keys.ClientWriteIV, keys.ClientMACKey,
+ c.HashFunc(),
+ )
+ }
+ c.cbc.Store(cbc)
+
+ return err
+}
+
+// Encrypt encrypts a single TLS RecordLayer
+func (c *TLSPskWithAes128CbcSha256) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error) {
+ cbc := c.cbc.Load()
+ if cbc == nil { // !c.isInitialized()
+ return nil, fmt.Errorf("%w, unable to decrypt", errCipherSuiteNotInit)
+ }
+
+ return cbc.(*ciphersuite.CBC).Encrypt(pkt, raw)
+}
+
+// Decrypt decrypts a single TLS RecordLayer
+func (c *TLSPskWithAes128CbcSha256) Decrypt(raw []byte) ([]byte, error) {
+ cbc := c.cbc.Load()
+ if cbc == nil { // !c.isInitialized()
+ return nil, fmt.Errorf("%w, unable to decrypt", errCipherSuiteNotInit)
+ }
+
+ return cbc.(*ciphersuite.CBC).Decrypt(raw)
+}
diff --git a/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_ccm.go b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_ccm.go
new file mode 100644
index 0000000..8c13bb1
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_ccm.go
@@ -0,0 +1,11 @@
+package ciphersuite
+
+import (
+ "github.com/pion/dtls/v2/pkg/crypto/ciphersuite"
+ "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+)
+
+// NewTLSPskWithAes128Ccm returns the TLS_PSK_WITH_AES_128_CCM CipherSuite
+func NewTLSPskWithAes128Ccm() *Aes128Ccm {
+ return newAes128Ccm(clientcertificate.Type(0), TLS_PSK_WITH_AES_128_CCM, true, ciphersuite.CCMTagLength)
+}
diff --git a/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_ccm8.go b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_ccm8.go
new file mode 100644
index 0000000..d04abb4
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_ccm8.go
@@ -0,0 +1,11 @@
+package ciphersuite
+
+import (
+ "github.com/pion/dtls/v2/pkg/crypto/ciphersuite"
+ "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+)
+
+// NewTLSPskWithAes128Ccm8 returns the TLS_PSK_WITH_AES_128_CCM_8 CipherSuite
+func NewTLSPskWithAes128Ccm8() *Aes128Ccm {
+ return newAes128Ccm(clientcertificate.Type(0), TLS_PSK_WITH_AES_128_CCM_8, true, ciphersuite.CCMTagLength8)
+}
diff --git a/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_gcm_sha256.go b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_gcm_sha256.go
new file mode 100644
index 0000000..5f10335
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/ciphersuite/tls_psk_with_aes_128_gcm_sha256.go
@@ -0,0 +1,27 @@
+package ciphersuite
+
+import "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+
+// TLSPskWithAes128GcmSha256 implements the TLS_PSK_WITH_AES_128_GCM_SHA256 CipherSuite
+type TLSPskWithAes128GcmSha256 struct {
+ TLSEcdheEcdsaWithAes128GcmSha256
+}
+
+// CertificateType returns what type of certificate this CipherSuite exchanges
+func (c *TLSPskWithAes128GcmSha256) CertificateType() clientcertificate.Type {
+ return clientcertificate.Type(0)
+}
+
+// ID returns the ID of the CipherSuite
+func (c *TLSPskWithAes128GcmSha256) ID() ID {
+ return TLS_PSK_WITH_AES_128_GCM_SHA256
+}
+
+func (c *TLSPskWithAes128GcmSha256) String() string {
+ return "TLS_PSK_WITH_AES_128_GCM_SHA256"
+}
+
+// AuthenticationType controls what authentication method is using during the handshake
+func (c *TLSPskWithAes128GcmSha256) AuthenticationType() AuthenticationType {
+ return AuthenticationTypePreSharedKey
+}
diff --git a/vendor/github.com/pion/dtls/v2/internal/closer/closer.go b/vendor/github.com/pion/dtls/v2/internal/closer/closer.go
new file mode 100644
index 0000000..b99e13e
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/closer/closer.go
@@ -0,0 +1,45 @@
+// Package closer provides signaling channel for shutdown
+package closer
+
+import (
+ "context"
+)
+
+// Closer allows for each signaling a channel for shutdown
+type Closer struct {
+ ctx context.Context
+ closeFunc func()
+}
+
+// NewCloser creates a new instance of Closer
+func NewCloser() *Closer {
+ ctx, closeFunc := context.WithCancel(context.Background())
+ return &Closer{
+ ctx: ctx,
+ closeFunc: closeFunc,
+ }
+}
+
+// NewCloserWithParent creates a new instance of Closer with a parent context
+func NewCloserWithParent(ctx context.Context) *Closer {
+ ctx, closeFunc := context.WithCancel(ctx)
+ return &Closer{
+ ctx: ctx,
+ closeFunc: closeFunc,
+ }
+}
+
+// Done returns a channel signaling when it is done
+func (c *Closer) Done() <-chan struct{} {
+ return c.ctx.Done()
+}
+
+// Err returns an error of the context
+func (c *Closer) Err() error {
+ return c.ctx.Err()
+}
+
+// Close sends a signal to trigger the ctx done channel
+func (c *Closer) Close() {
+ c.closeFunc()
+}
diff --git a/vendor/github.com/pion/dtls/v2/internal/util/util.go b/vendor/github.com/pion/dtls/v2/internal/util/util.go
new file mode 100644
index 0000000..746a670
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/internal/util/util.go
@@ -0,0 +1,39 @@
+// Package util contains small helpers used across the repo
+package util
+
+import (
+ "encoding/binary"
+)
+
+// BigEndianUint24 returns the value of a big endian uint24
+func BigEndianUint24(raw []byte) uint32 {
+ if len(raw) < 3 {
+ return 0
+ }
+
+ rawCopy := make([]byte, 4)
+ copy(rawCopy[1:], raw)
+ return binary.BigEndian.Uint32(rawCopy)
+}
+
+// PutBigEndianUint24 encodes a uint24 and places into out
+func PutBigEndianUint24(out []byte, in uint32) {
+ tmp := make([]byte, 4)
+ binary.BigEndian.PutUint32(tmp, in)
+ copy(out, tmp[1:])
+}
+
+// PutBigEndianUint48 encodes a uint64 and places into out
+func PutBigEndianUint48(out []byte, in uint64) {
+ tmp := make([]byte, 8)
+ binary.BigEndian.PutUint64(tmp, in)
+ copy(out, tmp[2:])
+}
+
+// Max returns the larger value
+func Max(a, b int) int {
+ if a > b {
+ return a
+ }
+ return b
+}
diff --git a/vendor/github.com/pion/dtls/v2/listener.go b/vendor/github.com/pion/dtls/v2/listener.go
new file mode 100644
index 0000000..bf80345
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/listener.go
@@ -0,0 +1,80 @@
+package dtls
+
+import (
+ "net"
+
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+ "github.com/pion/udp"
+)
+
+// Listen creates a DTLS listener
+func Listen(network string, laddr *net.UDPAddr, config *Config) (net.Listener, error) {
+ if err := validateConfig(config); err != nil {
+ return nil, err
+ }
+
+ lc := udp.ListenConfig{
+ AcceptFilter: func(packet []byte) bool {
+ pkts, err := recordlayer.UnpackDatagram(packet)
+ if err != nil || len(pkts) < 1 {
+ return false
+ }
+ h := &recordlayer.Header{}
+ if err := h.Unmarshal(pkts[0]); err != nil {
+ return false
+ }
+ return h.ContentType == protocol.ContentTypeHandshake
+ },
+ }
+ parent, err := lc.Listen(network, laddr)
+ if err != nil {
+ return nil, err
+ }
+ return &listener{
+ config: config,
+ parent: parent,
+ }, nil
+}
+
+// NewListener creates a DTLS listener which accepts connections from an inner Listener.
+func NewListener(inner net.Listener, config *Config) (net.Listener, error) {
+ if err := validateConfig(config); err != nil {
+ return nil, err
+ }
+
+ return &listener{
+ config: config,
+ parent: inner,
+ }, nil
+}
+
+// listener represents a DTLS listener
+type listener struct {
+ config *Config
+ parent net.Listener
+}
+
+// Accept waits for and returns the next connection to the listener.
+// You have to either close or read on all connection that are created.
+// Connection handshake will timeout using ConnectContextMaker in the Config.
+// If you want to specify the timeout duration, set ConnectContextMaker.
+func (l *listener) Accept() (net.Conn, error) {
+ c, err := l.parent.Accept()
+ if err != nil {
+ return nil, err
+ }
+ return Server(c, l.config)
+}
+
+// Close closes the listener.
+// Any blocked Accept operations will be unblocked and return errors.
+// Already Accepted connections are not closed.
+func (l *listener) Close() error {
+ return l.parent.Close()
+}
+
+// Addr returns the listener's network address.
+func (l *listener) Addr() net.Addr {
+ return l.parent.Addr()
+}
diff --git a/vendor/github.com/pion/dtls/v2/packet.go b/vendor/github.com/pion/dtls/v2/packet.go
new file mode 100644
index 0000000..8366a3c
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/packet.go
@@ -0,0 +1,9 @@
+package dtls
+
+import "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+
+type packet struct {
+ record *recordlayer.RecordLayer
+ shouldEncrypt bool
+ resetLocalSequenceNumber bool
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/ccm/ccm.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/ccm/ccm.go
new file mode 100644
index 0000000..20e3436
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/ccm/ccm.go
@@ -0,0 +1,251 @@
+// Package ccm implements a CCM, Counter with CBC-MAC
+// as per RFC 3610.
+//
+// See https://tools.ietf.org/html/rfc3610
+//
+// This code was lifted from https://github.com/bocajim/dtls/blob/a3300364a283fcb490d28a93d7fcfa7ba437fbbe/ccm/ccm.go
+// and as such was not written by the Pions authors. Like Pions this
+// code is licensed under MIT.
+//
+// A request for including CCM into the Go standard library
+// can be found as issue #27484 on the https://github.com/golang/go/
+// repository.
+package ccm
+
+import (
+ "crypto/cipher"
+ "crypto/subtle"
+ "encoding/binary"
+ "errors"
+ "math"
+)
+
+// ccm represents a Counter with CBC-MAC with a specific key.
+type ccm struct {
+ b cipher.Block
+ M uint8
+ L uint8
+}
+
+const ccmBlockSize = 16
+
+// CCM is a block cipher in Counter with CBC-MAC mode.
+// Providing authenticated encryption with associated data via the cipher.AEAD interface.
+type CCM interface {
+ cipher.AEAD
+ // MaxLength returns the maxium length of plaintext in calls to Seal.
+ // The maximum length of ciphertext in calls to Open is MaxLength()+Overhead().
+ // The maximum length is related to CCM's `L` parameter (15-noncesize) and
+ // is 1<<(8*L) - 1 (but also limited by the maxium size of an int).
+ MaxLength() int
+}
+
+var (
+ errInvalidBlockSize = errors.New("ccm: NewCCM requires 128-bit block cipher")
+ errInvalidTagSize = errors.New("ccm: tagsize must be 4, 6, 8, 10, 12, 14, or 16")
+ errInvalidNonceSize = errors.New("ccm: invalid nonce size")
+)
+
+// NewCCM returns the given 128-bit block cipher wrapped in CCM.
+// The tagsize must be an even integer between 4 and 16 inclusive
+// and is used as CCM's `M` parameter.
+// The noncesize must be an integer between 7 and 13 inclusive,
+// 15-noncesize is used as CCM's `L` parameter.
+func NewCCM(b cipher.Block, tagsize, noncesize int) (CCM, error) {
+ if b.BlockSize() != ccmBlockSize {
+ return nil, errInvalidBlockSize
+ }
+ if tagsize < 4 || tagsize > 16 || tagsize&1 != 0 {
+ return nil, errInvalidTagSize
+ }
+ lensize := 15 - noncesize
+ if lensize < 2 || lensize > 8 {
+ return nil, errInvalidNonceSize
+ }
+ c := &ccm{b: b, M: uint8(tagsize), L: uint8(lensize)}
+ return c, nil
+}
+
+func (c *ccm) NonceSize() int { return 15 - int(c.L) }
+func (c *ccm) Overhead() int { return int(c.M) }
+func (c *ccm) MaxLength() int { return maxlen(c.L, c.Overhead()) }
+
+func maxlen(l uint8, tagsize int) int {
+ max := (uint64(1) << (8 * l)) - 1
+ if m64 := uint64(math.MaxInt64) - uint64(tagsize); l > 8 || max > m64 {
+ max = m64 // The maximum lentgh on a 64bit arch
+ }
+ if max != uint64(int(max)) {
+ return math.MaxInt32 - tagsize // We have only 32bit int's
+ }
+ return int(max)
+}
+
+// MaxNonceLength returns the maximum nonce length for a given plaintext length.
+// A return value <= 0 indicates that plaintext length is too large for
+// any nonce length.
+func MaxNonceLength(pdatalen int) int {
+ const tagsize = 16
+ for L := 2; L <= 8; L++ {
+ if maxlen(uint8(L), tagsize) >= pdatalen {
+ return 15 - L
+ }
+ }
+ return 0
+}
+
+func (c *ccm) cbcRound(mac, data []byte) {
+ for i := 0; i < ccmBlockSize; i++ {
+ mac[i] ^= data[i]
+ }
+ c.b.Encrypt(mac, mac)
+}
+
+func (c *ccm) cbcData(mac, data []byte) {
+ for len(data) >= ccmBlockSize {
+ c.cbcRound(mac, data[:ccmBlockSize])
+ data = data[ccmBlockSize:]
+ }
+ if len(data) > 0 {
+ var block [ccmBlockSize]byte
+ copy(block[:], data)
+ c.cbcRound(mac, block[:])
+ }
+}
+
+var errPlaintextTooLong = errors.New("ccm: plaintext too large")
+
+func (c *ccm) tag(nonce, plaintext, adata []byte) ([]byte, error) {
+ var mac [ccmBlockSize]byte
+
+ if len(adata) > 0 {
+ mac[0] |= 1 << 6
+ }
+ mac[0] |= (c.M - 2) << 2
+ mac[0] |= c.L - 1
+ if len(nonce) != c.NonceSize() {
+ return nil, errInvalidNonceSize
+ }
+ if len(plaintext) > c.MaxLength() {
+ return nil, errPlaintextTooLong
+ }
+ binary.BigEndian.PutUint64(mac[ccmBlockSize-8:], uint64(len(plaintext)))
+ copy(mac[1:ccmBlockSize-c.L], nonce)
+ c.b.Encrypt(mac[:], mac[:])
+
+ var block [ccmBlockSize]byte
+ if n := uint64(len(adata)); n > 0 {
+ // First adata block includes adata length
+ i := 2
+ if n <= 0xfeff {
+ binary.BigEndian.PutUint16(block[:i], uint16(n))
+ } else {
+ block[0] = 0xfe
+ block[1] = 0xff
+ if n < uint64(1<<32) {
+ i = 2 + 4
+ binary.BigEndian.PutUint32(block[2:i], uint32(n))
+ } else {
+ i = 2 + 8
+ binary.BigEndian.PutUint64(block[2:i], n)
+ }
+ }
+ i = copy(block[i:], adata)
+ c.cbcRound(mac[:], block[:])
+ c.cbcData(mac[:], adata[i:])
+ }
+
+ if len(plaintext) > 0 {
+ c.cbcData(mac[:], plaintext)
+ }
+
+ return mac[:c.M], nil
+}
+
+// sliceForAppend takes a slice and a requested number of bytes. It returns a
+// slice with the contents of the given slice followed by that many bytes and a
+// second slice that aliases into it and contains only the extra bytes. If the
+// original slice has sufficient capacity then no allocation is performed.
+// From crypto/cipher/gcm.go
+func sliceForAppend(in []byte, n int) (head, tail []byte) {
+ if total := len(in) + n; cap(in) >= total {
+ head = in[:total]
+ } else {
+ head = make([]byte, total)
+ copy(head, in)
+ }
+ tail = head[len(in):]
+ return
+}
+
+// Seal encrypts and authenticates plaintext, authenticates the
+// additional data and appends the result to dst, returning the updated
+// slice. The nonce must be NonceSize() bytes long and unique for all
+// time, for a given key.
+// The plaintext must be no longer than MaxLength() bytes long.
+//
+// The plaintext and dst may alias exactly or not at all.
+func (c *ccm) Seal(dst, nonce, plaintext, adata []byte) []byte {
+ tag, err := c.tag(nonce, plaintext, adata)
+ if err != nil {
+ // The cipher.AEAD interface doesn't allow for an error return.
+ panic(err) // nolint
+ }
+
+ var iv, s0 [ccmBlockSize]byte
+ iv[0] = c.L - 1
+ copy(iv[1:ccmBlockSize-c.L], nonce)
+ c.b.Encrypt(s0[:], iv[:])
+ for i := 0; i < int(c.M); i++ {
+ tag[i] ^= s0[i]
+ }
+ iv[len(iv)-1] |= 1
+ stream := cipher.NewCTR(c.b, iv[:])
+ ret, out := sliceForAppend(dst, len(plaintext)+int(c.M))
+ stream.XORKeyStream(out, plaintext)
+ copy(out[len(plaintext):], tag)
+ return ret
+}
+
+var (
+ errOpen = errors.New("ccm: message authentication failed")
+ errCiphertextTooShort = errors.New("ccm: ciphertext too short")
+ errCiphertextTooLong = errors.New("ccm: ciphertext too long")
+)
+
+func (c *ccm) Open(dst, nonce, ciphertext, adata []byte) ([]byte, error) {
+ if len(ciphertext) < int(c.M) {
+ return nil, errCiphertextTooShort
+ }
+ if len(ciphertext) > c.MaxLength()+c.Overhead() {
+ return nil, errCiphertextTooLong
+ }
+
+ tag := make([]byte, int(c.M))
+ copy(tag, ciphertext[len(ciphertext)-int(c.M):])
+ ciphertextWithoutTag := ciphertext[:len(ciphertext)-int(c.M)]
+
+ var iv, s0 [ccmBlockSize]byte
+ iv[0] = c.L - 1
+ copy(iv[1:ccmBlockSize-c.L], nonce)
+ c.b.Encrypt(s0[:], iv[:])
+ for i := 0; i < int(c.M); i++ {
+ tag[i] ^= s0[i]
+ }
+ iv[len(iv)-1] |= 1
+ stream := cipher.NewCTR(c.b, iv[:])
+
+ // Cannot decrypt directly to dst since we're not supposed to
+ // reveal the plaintext to the caller if authentication fails.
+ plaintext := make([]byte, len(ciphertextWithoutTag))
+ stream.XORKeyStream(plaintext, ciphertextWithoutTag)
+ expectedTag, err := c.tag(nonce, plaintext, adata)
+ if err != nil {
+ return nil, err
+ }
+
+ if subtle.ConstantTimeCompare(tag, expectedTag) != 1 {
+ return nil, errOpen
+ }
+ return append(dst, plaintext...), nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/cbc.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/cbc.go
new file mode 100644
index 0000000..8ff1634
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/cbc.go
@@ -0,0 +1,164 @@
+package ciphersuite
+
+import ( //nolint:gci
+ "crypto/aes"
+ "crypto/cipher"
+ "crypto/hmac"
+ "crypto/rand"
+ "encoding/binary"
+ "hash"
+
+ "github.com/pion/dtls/v2/internal/util"
+ "github.com/pion/dtls/v2/pkg/crypto/prf"
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+// block ciphers using cipher block chaining.
+type cbcMode interface {
+ cipher.BlockMode
+ SetIV([]byte)
+}
+
+// CBC Provides an API to Encrypt/Decrypt DTLS 1.2 Packets
+type CBC struct {
+ writeCBC, readCBC cbcMode
+ writeMac, readMac []byte
+ h prf.HashFunc
+}
+
+// NewCBC creates a DTLS CBC Cipher
+func NewCBC(localKey, localWriteIV, localMac, remoteKey, remoteWriteIV, remoteMac []byte, h prf.HashFunc) (*CBC, error) {
+ writeBlock, err := aes.NewCipher(localKey)
+ if err != nil {
+ return nil, err
+ }
+
+ readBlock, err := aes.NewCipher(remoteKey)
+ if err != nil {
+ return nil, err
+ }
+
+ return &CBC{
+ writeCBC: cipher.NewCBCEncrypter(writeBlock, localWriteIV).(cbcMode),
+ writeMac: localMac,
+
+ readCBC: cipher.NewCBCDecrypter(readBlock, remoteWriteIV).(cbcMode),
+ readMac: remoteMac,
+ h: h,
+ }, nil
+}
+
+// Encrypt encrypt a DTLS RecordLayer message
+func (c *CBC) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error) {
+ payload := raw[recordlayer.HeaderSize:]
+ raw = raw[:recordlayer.HeaderSize]
+ blockSize := c.writeCBC.BlockSize()
+
+ // Generate + Append MAC
+ h := pkt.Header
+
+ MAC, err := c.hmac(h.Epoch, h.SequenceNumber, h.ContentType, h.Version, payload, c.writeMac, c.h)
+ if err != nil {
+ return nil, err
+ }
+ payload = append(payload, MAC...)
+
+ // Generate + Append padding
+ padding := make([]byte, blockSize-len(payload)%blockSize)
+ paddingLen := len(padding)
+ for i := 0; i < paddingLen; i++ {
+ padding[i] = byte(paddingLen - 1)
+ }
+ payload = append(payload, padding...)
+
+ // Generate IV
+ iv := make([]byte, blockSize)
+ if _, err := rand.Read(iv); err != nil {
+ return nil, err
+ }
+
+ // Set IV + Encrypt + Prepend IV
+ c.writeCBC.SetIV(iv)
+ c.writeCBC.CryptBlocks(payload, payload)
+ payload = append(iv, payload...)
+
+ // Prepend unencrypte header with encrypted payload
+ raw = append(raw, payload...)
+
+ // Update recordLayer size to include IV+MAC+Padding
+ binary.BigEndian.PutUint16(raw[recordlayer.HeaderSize-2:], uint16(len(raw)-recordlayer.HeaderSize))
+
+ return raw, nil
+}
+
+// Decrypt decrypts a DTLS RecordLayer message
+func (c *CBC) Decrypt(in []byte) ([]byte, error) {
+ body := in[recordlayer.HeaderSize:]
+ blockSize := c.readCBC.BlockSize()
+ mac := c.h()
+
+ var h recordlayer.Header
+ err := h.Unmarshal(in)
+ switch {
+ case err != nil:
+ return nil, err
+ case h.ContentType == protocol.ContentTypeChangeCipherSpec:
+ // Nothing to encrypt with ChangeCipherSpec
+ return in, nil
+ case len(body)%blockSize != 0 || len(body) < blockSize+util.Max(mac.Size()+1, blockSize):
+ return nil, errNotEnoughRoomForNonce
+ }
+
+ // Set + remove per record IV
+ c.readCBC.SetIV(body[:blockSize])
+ body = body[blockSize:]
+
+ // Decrypt
+ c.readCBC.CryptBlocks(body, body)
+
+ // Padding+MAC needs to be checked in constant time
+ // Otherwise we reveal information about the level of correctness
+ paddingLen, paddingGood := examinePadding(body)
+ if paddingGood != 255 {
+ return nil, errInvalidMAC
+ }
+
+ macSize := mac.Size()
+ if len(body) < macSize {
+ return nil, errInvalidMAC
+ }
+
+ dataEnd := len(body) - macSize - paddingLen
+
+ expectedMAC := body[dataEnd : dataEnd+macSize]
+ actualMAC, err := c.hmac(h.Epoch, h.SequenceNumber, h.ContentType, h.Version, body[:dataEnd], c.readMac, c.h)
+
+ // Compute Local MAC and compare
+ if err != nil || !hmac.Equal(actualMAC, expectedMAC) {
+ return nil, errInvalidMAC
+ }
+
+ return append(in[:recordlayer.HeaderSize], body[:dataEnd]...), nil
+}
+
+func (c *CBC) hmac(epoch uint16, sequenceNumber uint64, contentType protocol.ContentType, protocolVersion protocol.Version, payload []byte, key []byte, hf func() hash.Hash) ([]byte, error) {
+ h := hmac.New(hf, key)
+
+ msg := make([]byte, 13)
+
+ binary.BigEndian.PutUint16(msg, epoch)
+ util.PutBigEndianUint48(msg[2:], sequenceNumber)
+ msg[8] = byte(contentType)
+ msg[9] = protocolVersion.Major
+ msg[10] = protocolVersion.Minor
+ binary.BigEndian.PutUint16(msg[11:], uint16(len(payload)))
+
+ if _, err := h.Write(msg); err != nil {
+ return nil, err
+ } else if _, err := h.Write(payload); err != nil {
+ return nil, err
+ }
+
+ return h.Sum(nil), nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/ccm.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/ccm.go
new file mode 100644
index 0000000..354b1cc
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/ccm.go
@@ -0,0 +1,104 @@
+package ciphersuite
+
+import (
+ "crypto/aes"
+ "crypto/rand"
+ "encoding/binary"
+ "fmt"
+
+ "github.com/pion/dtls/v2/pkg/crypto/ccm"
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+// CCMTagLen is the length of Authentication Tag
+type CCMTagLen int
+
+// CCM Enums
+const (
+ CCMTagLength8 CCMTagLen = 8
+ CCMTagLength CCMTagLen = 16
+ ccmNonceLength = 12
+)
+
+// CCM Provides an API to Encrypt/Decrypt DTLS 1.2 Packets
+type CCM struct {
+ localCCM, remoteCCM ccm.CCM
+ localWriteIV, remoteWriteIV []byte
+ tagLen CCMTagLen
+}
+
+// NewCCM creates a DTLS GCM Cipher
+func NewCCM(tagLen CCMTagLen, localKey, localWriteIV, remoteKey, remoteWriteIV []byte) (*CCM, error) {
+ localBlock, err := aes.NewCipher(localKey)
+ if err != nil {
+ return nil, err
+ }
+ localCCM, err := ccm.NewCCM(localBlock, int(tagLen), ccmNonceLength)
+ if err != nil {
+ return nil, err
+ }
+
+ remoteBlock, err := aes.NewCipher(remoteKey)
+ if err != nil {
+ return nil, err
+ }
+ remoteCCM, err := ccm.NewCCM(remoteBlock, int(tagLen), ccmNonceLength)
+ if err != nil {
+ return nil, err
+ }
+
+ return &CCM{
+ localCCM: localCCM,
+ localWriteIV: localWriteIV,
+ remoteCCM: remoteCCM,
+ remoteWriteIV: remoteWriteIV,
+ tagLen: tagLen,
+ }, nil
+}
+
+// Encrypt encrypt a DTLS RecordLayer message
+func (c *CCM) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error) {
+ payload := raw[recordlayer.HeaderSize:]
+ raw = raw[:recordlayer.HeaderSize]
+
+ nonce := append(append([]byte{}, c.localWriteIV[:4]...), make([]byte, 8)...)
+ if _, err := rand.Read(nonce[4:]); err != nil {
+ return nil, err
+ }
+
+ additionalData := generateAEADAdditionalData(&pkt.Header, len(payload))
+ encryptedPayload := c.localCCM.Seal(nil, nonce, payload, additionalData)
+
+ encryptedPayload = append(nonce[4:], encryptedPayload...)
+ raw = append(raw, encryptedPayload...)
+
+ // Update recordLayer size to include explicit nonce
+ binary.BigEndian.PutUint16(raw[recordlayer.HeaderSize-2:], uint16(len(raw)-recordlayer.HeaderSize))
+ return raw, nil
+}
+
+// Decrypt decrypts a DTLS RecordLayer message
+func (c *CCM) Decrypt(in []byte) ([]byte, error) {
+ var h recordlayer.Header
+ err := h.Unmarshal(in)
+ switch {
+ case err != nil:
+ return nil, err
+ case h.ContentType == protocol.ContentTypeChangeCipherSpec:
+ // Nothing to encrypt with ChangeCipherSpec
+ return in, nil
+ case len(in) <= (8 + recordlayer.HeaderSize):
+ return nil, errNotEnoughRoomForNonce
+ }
+
+ nonce := append(append([]byte{}, c.remoteWriteIV[:4]...), in[recordlayer.HeaderSize:recordlayer.HeaderSize+8]...)
+ out := in[recordlayer.HeaderSize+8:]
+
+ additionalData := generateAEADAdditionalData(&h, len(out)-int(c.tagLen))
+ out, err = c.remoteCCM.Open(out[:0], nonce, out, additionalData)
+ if err != nil {
+ return nil, fmt.Errorf("%w: %v", errDecryptPacket, err)
+ }
+ return append(in[:recordlayer.HeaderSize], out...), nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/ciphersuite.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/ciphersuite.go
new file mode 100644
index 0000000..72beffd
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/ciphersuite.go
@@ -0,0 +1,72 @@
+// Package ciphersuite provides the crypto operations needed for a DTLS CipherSuite
+package ciphersuite
+
+import (
+ "encoding/binary"
+ "errors"
+
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+var (
+ errNotEnoughRoomForNonce = &protocol.InternalError{Err: errors.New("buffer not long enough to contain nonce")} //nolint:goerr113
+ errDecryptPacket = &protocol.TemporaryError{Err: errors.New("failed to decrypt packet")} //nolint:goerr113
+ errInvalidMAC = &protocol.TemporaryError{Err: errors.New("invalid mac")} //nolint:goerr113
+)
+
+func generateAEADAdditionalData(h *recordlayer.Header, payloadLen int) []byte {
+ var additionalData [13]byte
+ // SequenceNumber MUST be set first
+ // we only want uint48, clobbering an extra 2 (using uint64, Golang doesn't have uint48)
+ binary.BigEndian.PutUint64(additionalData[:], h.SequenceNumber)
+ binary.BigEndian.PutUint16(additionalData[:], h.Epoch)
+ additionalData[8] = byte(h.ContentType)
+ additionalData[9] = h.Version.Major
+ additionalData[10] = h.Version.Minor
+ binary.BigEndian.PutUint16(additionalData[len(additionalData)-2:], uint16(payloadLen))
+
+ return additionalData[:]
+}
+
+// examinePadding returns, in constant time, the length of the padding to remove
+// from the end of payload. It also returns a byte which is equal to 255 if the
+// padding was valid and 0 otherwise. See RFC 2246, Section 6.2.3.2.
+//
+// https://github.com/golang/go/blob/039c2081d1178f90a8fa2f4e6958693129f8de33/src/crypto/tls/conn.go#L245
+func examinePadding(payload []byte) (toRemove int, good byte) {
+ if len(payload) < 1 {
+ return 0, 0
+ }
+
+ paddingLen := payload[len(payload)-1]
+ t := uint(len(payload)-1) - uint(paddingLen)
+ // if len(payload) >= (paddingLen - 1) then the MSB of t is zero
+ good = byte(int32(^t) >> 31)
+
+ // The maximum possible padding length plus the actual length field
+ toCheck := 256
+ // The length of the padded data is public, so we can use an if here
+ if toCheck > len(payload) {
+ toCheck = len(payload)
+ }
+
+ for i := 0; i < toCheck; i++ {
+ t := uint(paddingLen) - uint(i)
+ // if i <= paddingLen then the MSB of t is zero
+ mask := byte(int32(^t) >> 31)
+ b := payload[len(payload)-1-i]
+ good &^= mask&paddingLen ^ mask&b
+ }
+
+ // We AND together the bits of good and replicate the result across
+ // all the bits.
+ good &= good << 4
+ good &= good << 2
+ good &= good << 1
+ good = uint8(int8(good) >> 7)
+
+ toRemove = int(paddingLen) + 1
+
+ return toRemove, good
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/gcm.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/gcm.go
new file mode 100644
index 0000000..af986d4
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/ciphersuite/gcm.go
@@ -0,0 +1,100 @@
+package ciphersuite
+
+import (
+ "crypto/aes"
+ "crypto/cipher"
+ "crypto/rand"
+ "encoding/binary"
+ "fmt"
+
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/recordlayer"
+)
+
+const (
+ gcmTagLength = 16
+ gcmNonceLength = 12
+)
+
+// GCM Provides an API to Encrypt/Decrypt DTLS 1.2 Packets
+type GCM struct {
+ localGCM, remoteGCM cipher.AEAD
+ localWriteIV, remoteWriteIV []byte
+}
+
+// NewGCM creates a DTLS GCM Cipher
+func NewGCM(localKey, localWriteIV, remoteKey, remoteWriteIV []byte) (*GCM, error) {
+ localBlock, err := aes.NewCipher(localKey)
+ if err != nil {
+ return nil, err
+ }
+ localGCM, err := cipher.NewGCM(localBlock)
+ if err != nil {
+ return nil, err
+ }
+
+ remoteBlock, err := aes.NewCipher(remoteKey)
+ if err != nil {
+ return nil, err
+ }
+ remoteGCM, err := cipher.NewGCM(remoteBlock)
+ if err != nil {
+ return nil, err
+ }
+
+ return &GCM{
+ localGCM: localGCM,
+ localWriteIV: localWriteIV,
+ remoteGCM: remoteGCM,
+ remoteWriteIV: remoteWriteIV,
+ }, nil
+}
+
+// Encrypt encrypt a DTLS RecordLayer message
+func (g *GCM) Encrypt(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error) {
+ payload := raw[recordlayer.HeaderSize:]
+ raw = raw[:recordlayer.HeaderSize]
+
+ nonce := make([]byte, gcmNonceLength)
+ copy(nonce, g.localWriteIV[:4])
+ if _, err := rand.Read(nonce[4:]); err != nil {
+ return nil, err
+ }
+
+ additionalData := generateAEADAdditionalData(&pkt.Header, len(payload))
+ encryptedPayload := g.localGCM.Seal(nil, nonce, payload, additionalData)
+ r := make([]byte, len(raw)+len(nonce[4:])+len(encryptedPayload))
+ copy(r, raw)
+ copy(r[len(raw):], nonce[4:])
+ copy(r[len(raw)+len(nonce[4:]):], encryptedPayload)
+
+ // Update recordLayer size to include explicit nonce
+ binary.BigEndian.PutUint16(r[recordlayer.HeaderSize-2:], uint16(len(r)-recordlayer.HeaderSize))
+ return r, nil
+}
+
+// Decrypt decrypts a DTLS RecordLayer message
+func (g *GCM) Decrypt(in []byte) ([]byte, error) {
+ var h recordlayer.Header
+ err := h.Unmarshal(in)
+ switch {
+ case err != nil:
+ return nil, err
+ case h.ContentType == protocol.ContentTypeChangeCipherSpec:
+ // Nothing to encrypt with ChangeCipherSpec
+ return in, nil
+ case len(in) <= (8 + recordlayer.HeaderSize):
+ return nil, errNotEnoughRoomForNonce
+ }
+
+ nonce := make([]byte, 0, gcmNonceLength)
+ nonce = append(append(nonce, g.remoteWriteIV[:4]...), in[recordlayer.HeaderSize:recordlayer.HeaderSize+8]...)
+ out := in[recordlayer.HeaderSize+8:]
+
+ additionalData := generateAEADAdditionalData(&h, len(out)-gcmTagLength)
+ out, err = g.remoteGCM.Open(out[:0], nonce, out, additionalData)
+ if err != nil {
+ return nil, fmt.Errorf("%w: %v", errDecryptPacket, err)
+ }
+ return append(in[:recordlayer.HeaderSize], out...), nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/clientcertificate/client_certificate.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/clientcertificate/client_certificate.go
new file mode 100644
index 0000000..c222c01
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/clientcertificate/client_certificate.go
@@ -0,0 +1,22 @@
+// Package clientcertificate provides all the support Client Certificate types
+package clientcertificate
+
+// Type is used to communicate what
+// type of certificate is being transported
+//
+//https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-2
+type Type byte
+
+// ClientCertificateType enums
+const (
+ RSASign Type = 1
+ ECDSASign Type = 64
+)
+
+// Types returns all valid ClientCertificate Types
+func Types() map[Type]bool {
+ return map[Type]bool{
+ RSASign: true,
+ ECDSASign: true,
+ }
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/elliptic/elliptic.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/elliptic/elliptic.go
new file mode 100644
index 0000000..5b0e4fa
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/elliptic/elliptic.go
@@ -0,0 +1,99 @@
+// Package elliptic provides elliptic curve cryptography for DTLS
+package elliptic
+
+import (
+ "crypto/elliptic"
+ "crypto/rand"
+ "errors"
+
+ "golang.org/x/crypto/curve25519"
+)
+
+var errInvalidNamedCurve = errors.New("invalid named curve")
+
+// CurvePointFormat is used to represent the IANA registered curve points
+//
+// https://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-9
+type CurvePointFormat byte
+
+// CurvePointFormat enums
+const (
+ CurvePointFormatUncompressed CurvePointFormat = 0
+)
+
+// Keypair is a Curve with a Private/Public Keypair
+type Keypair struct {
+ Curve Curve
+ PublicKey []byte
+ PrivateKey []byte
+}
+
+// CurveType is used to represent the IANA registered curve types for TLS
+//
+// https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-10
+type CurveType byte
+
+// CurveType enums
+const (
+ CurveTypeNamedCurve CurveType = 0x03
+)
+
+// CurveTypes returns all known curves
+func CurveTypes() map[CurveType]struct{} {
+ return map[CurveType]struct{}{
+ CurveTypeNamedCurve: {},
+ }
+}
+
+// Curve is used to represent the IANA registered curves for TLS
+//
+// https://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-8
+type Curve uint16
+
+// Curve enums
+const (
+ P256 Curve = 0x0017
+ P384 Curve = 0x0018
+ X25519 Curve = 0x001d
+)
+
+// Curves returns all curves we implement
+func Curves() map[Curve]bool {
+ return map[Curve]bool{
+ X25519: true,
+ P256: true,
+ P384: true,
+ }
+}
+
+// GenerateKeypair generates a keypair for the given Curve
+func GenerateKeypair(c Curve) (*Keypair, error) {
+ switch c { //nolint:golint
+ case X25519:
+ tmp := make([]byte, 32)
+ if _, err := rand.Read(tmp); err != nil {
+ return nil, err
+ }
+
+ var public, private [32]byte
+ copy(private[:], tmp)
+
+ curve25519.ScalarBaseMult(&public, &private)
+ return &Keypair{X25519, public[:], private[:]}, nil
+ case P256:
+ return ellipticCurveKeypair(P256, elliptic.P256(), elliptic.P256())
+ case P384:
+ return ellipticCurveKeypair(P384, elliptic.P384(), elliptic.P384())
+ default:
+ return nil, errInvalidNamedCurve
+ }
+}
+
+func ellipticCurveKeypair(nc Curve, c1, c2 elliptic.Curve) (*Keypair, error) {
+ privateKey, x, y, err := elliptic.GenerateKey(c1, rand.Reader)
+ if err != nil {
+ return nil, err
+ }
+
+ return &Keypair{nc, elliptic.Marshal(c2, x, y), privateKey}, nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/fingerprint/fingerprint.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/fingerprint/fingerprint.go
new file mode 100644
index 0000000..215b44e
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/fingerprint/fingerprint.go
@@ -0,0 +1,50 @@
+// Package fingerprint provides a helper to create fingerprint string from certificate
+package fingerprint
+
+import (
+ "crypto"
+ "crypto/x509"
+ "errors"
+ "fmt"
+)
+
+var (
+ errHashUnavailable = errors.New("fingerprint: hash algorithm is not linked into the binary")
+ errInvalidFingerprintLength = errors.New("fingerprint: invalid fingerprint length")
+)
+
+// Fingerprint creates a fingerprint for a certificate using the specified hash algorithm
+func Fingerprint(cert *x509.Certificate, algo crypto.Hash) (string, error) {
+ if !algo.Available() {
+ return "", errHashUnavailable
+ }
+ h := algo.New()
+ for i := 0; i < len(cert.Raw); {
+ n, _ := h.Write(cert.Raw[i:])
+ // Hash.Writer is specified to be never returning an error.
+ // https://golang.org/pkg/hash/#Hash
+ i += n
+ }
+ digest := []byte(fmt.Sprintf("%x", h.Sum(nil)))
+
+ digestlen := len(digest)
+ if digestlen == 0 {
+ return "", nil
+ }
+ if digestlen%2 != 0 {
+ return "", errInvalidFingerprintLength
+ }
+ res := make([]byte, digestlen>>1+digestlen-1)
+
+ pos := 0
+ for i, c := range digest {
+ res[pos] = c
+ pos++
+ if (i)%2 != 0 && i < digestlen-1 {
+ res[pos] = byte(':')
+ pos++
+ }
+ }
+
+ return string(res), nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/fingerprint/hash.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/fingerprint/hash.go
new file mode 100644
index 0000000..09107db
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/fingerprint/hash.go
@@ -0,0 +1,37 @@
+package fingerprint
+
+import (
+ "crypto"
+ "errors"
+)
+
+var errInvalidHashAlgorithm = errors.New("fingerprint: invalid hash algorithm")
+
+func nameToHash() map[string]crypto.Hash {
+ return map[string]crypto.Hash{
+ "md5": crypto.MD5, // [RFC3279]
+ "sha-1": crypto.SHA1, // [RFC3279]
+ "sha-224": crypto.SHA224, // [RFC4055]
+ "sha-256": crypto.SHA256, // [RFC4055]
+ "sha-384": crypto.SHA384, // [RFC4055]
+ "sha-512": crypto.SHA512, // [RFC4055]
+ }
+}
+
+// HashFromString allows looking up a hash algorithm by it's string representation
+func HashFromString(s string) (crypto.Hash, error) {
+ if h, ok := nameToHash()[s]; ok {
+ return h, nil
+ }
+ return 0, errInvalidHashAlgorithm
+}
+
+// StringFromHash allows looking up a string representation of the crypto.Hash.
+func StringFromHash(hash crypto.Hash) (string, error) {
+ for s, h := range nameToHash() {
+ if h == hash {
+ return s, nil
+ }
+ }
+ return "", errInvalidHashAlgorithm
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/hash/hash.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/hash/hash.go
new file mode 100644
index 0000000..660326f
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/hash/hash.go
@@ -0,0 +1,126 @@
+// Package hash provides TLS HashAlgorithm as defined in TLS 1.2
+package hash
+
+import ( //nolint:gci
+ "crypto"
+ "crypto/md5" //nolint:gosec
+ "crypto/sha1" //nolint:gosec
+ "crypto/sha256"
+ "crypto/sha512"
+)
+
+// Algorithm is used to indicate the hash algorithm used
+// https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-18
+type Algorithm uint16
+
+// Supported hash algorithms
+const (
+ None Algorithm = 0 // Blacklisted
+ MD5 Algorithm = 1 // Blacklisted
+ SHA1 Algorithm = 2 // Blacklisted
+ SHA224 Algorithm = 3
+ SHA256 Algorithm = 4
+ SHA384 Algorithm = 5
+ SHA512 Algorithm = 6
+ Ed25519 Algorithm = 8
+)
+
+// String makes hashAlgorithm printable
+func (a Algorithm) String() string {
+ switch a {
+ case None:
+ return "none"
+ case MD5:
+ return "md5" // [RFC3279]
+ case SHA1:
+ return "sha-1" // [RFC3279]
+ case SHA224:
+ return "sha-224" // [RFC4055]
+ case SHA256:
+ return "sha-256" // [RFC4055]
+ case SHA384:
+ return "sha-384" // [RFC4055]
+ case SHA512:
+ return "sha-512" // [RFC4055]
+ case Ed25519:
+ return "null"
+ default:
+ return "unknown or unsupported hash algorithm"
+ }
+}
+
+// Digest performs a digest on the passed value
+func (a Algorithm) Digest(b []byte) []byte {
+ switch a {
+ case None:
+ return nil
+ case MD5:
+ hash := md5.Sum(b) // #nosec
+ return hash[:]
+ case SHA1:
+ hash := sha1.Sum(b) // #nosec
+ return hash[:]
+ case SHA224:
+ hash := sha256.Sum224(b)
+ return hash[:]
+ case SHA256:
+ hash := sha256.Sum256(b)
+ return hash[:]
+ case SHA384:
+ hash := sha512.Sum384(b)
+ return hash[:]
+ case SHA512:
+ hash := sha512.Sum512(b)
+ return hash[:]
+ default:
+ return nil
+ }
+}
+
+// Insecure returns if the given HashAlgorithm is considered secure in DTLS 1.2
+func (a Algorithm) Insecure() bool {
+ switch a {
+ case None, MD5, SHA1:
+ return true
+ default:
+ return false
+ }
+}
+
+// CryptoHash returns the crypto.Hash implementation for the given HashAlgorithm
+func (a Algorithm) CryptoHash() crypto.Hash {
+ switch a {
+ case None:
+ return crypto.Hash(0)
+ case MD5:
+ return crypto.MD5
+ case SHA1:
+ return crypto.SHA1
+ case SHA224:
+ return crypto.SHA224
+ case SHA256:
+ return crypto.SHA256
+ case SHA384:
+ return crypto.SHA384
+ case SHA512:
+ return crypto.SHA512
+ case Ed25519:
+ return crypto.Hash(0)
+ default:
+ return crypto.Hash(0)
+ }
+}
+
+// Algorithms returns all the supported Hash Algorithms
+func Algorithms() map[Algorithm]struct{} {
+ return map[Algorithm]struct{}{
+ None: {},
+ MD5: {},
+ SHA1: {},
+ SHA224: {},
+ SHA256: {},
+ SHA384: {},
+ SHA512: {},
+ Ed25519: {},
+ }
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/prf/prf.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/prf/prf.go
new file mode 100644
index 0000000..d33df19
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/prf/prf.go
@@ -0,0 +1,224 @@
+// Package prf implements TLS 1.2 Pseudorandom functions
+package prf
+
+import ( //nolint:gci
+ ellipticStdlib "crypto/elliptic"
+ "crypto/hmac"
+ "encoding/binary"
+ "errors"
+ "fmt"
+ "hash"
+ "math"
+
+ "github.com/pion/dtls/v2/pkg/crypto/elliptic"
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "golang.org/x/crypto/curve25519"
+)
+
+const (
+ masterSecretLabel = "master secret"
+ extendedMasterSecretLabel = "extended master secret"
+ keyExpansionLabel = "key expansion"
+ verifyDataClientLabel = "client finished"
+ verifyDataServerLabel = "server finished"
+)
+
+// HashFunc allows callers to decide what hash is used in PRF
+type HashFunc func() hash.Hash
+
+// EncryptionKeys is all the state needed for a TLS CipherSuite
+type EncryptionKeys struct {
+ MasterSecret []byte
+ ClientMACKey []byte
+ ServerMACKey []byte
+ ClientWriteKey []byte
+ ServerWriteKey []byte
+ ClientWriteIV []byte
+ ServerWriteIV []byte
+}
+
+var errInvalidNamedCurve = &protocol.FatalError{Err: errors.New("invalid named curve")} //nolint:goerr113
+
+func (e *EncryptionKeys) String() string {
+ return fmt.Sprintf(`encryptionKeys:
+- masterSecret: %#v
+- clientMACKey: %#v
+- serverMACKey: %#v
+- clientWriteKey: %#v
+- serverWriteKey: %#v
+- clientWriteIV: %#v
+- serverWriteIV: %#v
+`,
+ e.MasterSecret,
+ e.ClientMACKey,
+ e.ServerMACKey,
+ e.ClientWriteKey,
+ e.ServerWriteKey,
+ e.ClientWriteIV,
+ e.ServerWriteIV)
+}
+
+// PSKPreMasterSecret generates the PSK Premaster Secret
+// The premaster secret is formed as follows: if the PSK is N octets
+// long, concatenate a uint16 with the value N, N zero octets, a second
+// uint16 with the value N, and the PSK itself.
+//
+// https://tools.ietf.org/html/rfc4279#section-2
+func PSKPreMasterSecret(psk []byte) []byte {
+ pskLen := uint16(len(psk))
+
+ out := append(make([]byte, 2+pskLen+2), psk...)
+ binary.BigEndian.PutUint16(out, pskLen)
+ binary.BigEndian.PutUint16(out[2+pskLen:], pskLen)
+
+ return out
+}
+
+// PreMasterSecret implements TLS 1.2 Premaster Secret generation given a keypair and a curve
+func PreMasterSecret(publicKey, privateKey []byte, curve elliptic.Curve) ([]byte, error) {
+ switch curve {
+ case elliptic.X25519:
+ return curve25519.X25519(privateKey, publicKey)
+ case elliptic.P256:
+ return ellipticCurvePreMasterSecret(publicKey, privateKey, ellipticStdlib.P256(), ellipticStdlib.P256())
+ case elliptic.P384:
+ return ellipticCurvePreMasterSecret(publicKey, privateKey, ellipticStdlib.P384(), ellipticStdlib.P384())
+ default:
+ return nil, errInvalidNamedCurve
+ }
+}
+
+func ellipticCurvePreMasterSecret(publicKey, privateKey []byte, c1, c2 ellipticStdlib.Curve) ([]byte, error) {
+ x, y := ellipticStdlib.Unmarshal(c1, publicKey)
+ if x == nil || y == nil {
+ return nil, errInvalidNamedCurve
+ }
+
+ result, _ := c2.ScalarMult(x, y, privateKey)
+ preMasterSecret := make([]byte, (c2.Params().BitSize+7)>>3)
+ resultBytes := result.Bytes()
+ copy(preMasterSecret[len(preMasterSecret)-len(resultBytes):], resultBytes)
+ return preMasterSecret, nil
+}
+
+// PHash is PRF is the SHA-256 hash function is used for all cipher suites
+// defined in this TLS 1.2 document and in TLS documents published prior to this
+// document when TLS 1.2 is negotiated. New cipher suites MUST explicitly
+// specify a PRF and, in general, SHOULD use the TLS PRF with SHA-256 or a
+// stronger standard hash function.
+//
+// P_hash(secret, seed) = HMAC_hash(secret, A(1) + seed) +
+// HMAC_hash(secret, A(2) + seed) +
+// HMAC_hash(secret, A(3) + seed) + ...
+//
+// A() is defined as:
+//
+// A(0) = seed
+// A(i) = HMAC_hash(secret, A(i-1))
+//
+// P_hash can be iterated as many times as necessary to produce the
+// required quantity of data. For example, if P_SHA256 is being used to
+// create 80 bytes of data, it will have to be iterated three times
+// (through A(3)), creating 96 bytes of output data; the last 16 bytes
+// of the final iteration will then be discarded, leaving 80 bytes of
+// output data.
+//
+// https://tools.ietf.org/html/rfc4346w
+func PHash(secret, seed []byte, requestedLength int, h HashFunc) ([]byte, error) {
+ hmacSHA256 := func(key, data []byte) ([]byte, error) {
+ mac := hmac.New(h, key)
+ if _, err := mac.Write(data); err != nil {
+ return nil, err
+ }
+ return mac.Sum(nil), nil
+ }
+
+ var err error
+ lastRound := seed
+ out := []byte{}
+
+ iterations := int(math.Ceil(float64(requestedLength) / float64(h().Size())))
+ for i := 0; i < iterations; i++ {
+ lastRound, err = hmacSHA256(secret, lastRound)
+ if err != nil {
+ return nil, err
+ }
+ withSecret, err := hmacSHA256(secret, append(lastRound, seed...))
+ if err != nil {
+ return nil, err
+ }
+ out = append(out, withSecret...)
+ }
+
+ return out[:requestedLength], nil
+}
+
+// ExtendedMasterSecret generates a Extended MasterSecret as defined in
+// https://tools.ietf.org/html/rfc7627
+func ExtendedMasterSecret(preMasterSecret, sessionHash []byte, h HashFunc) ([]byte, error) {
+ seed := append([]byte(extendedMasterSecretLabel), sessionHash...)
+ return PHash(preMasterSecret, seed, 48, h)
+}
+
+// MasterSecret generates a TLS 1.2 MasterSecret
+func MasterSecret(preMasterSecret, clientRandom, serverRandom []byte, h HashFunc) ([]byte, error) {
+ seed := append(append([]byte(masterSecretLabel), clientRandom...), serverRandom...)
+ return PHash(preMasterSecret, seed, 48, h)
+}
+
+// GenerateEncryptionKeys is the final step TLS 1.2 PRF. Given all state generated so far generates
+// the final keys need for encryption
+func GenerateEncryptionKeys(masterSecret, clientRandom, serverRandom []byte, macLen, keyLen, ivLen int, h HashFunc) (*EncryptionKeys, error) {
+ seed := append(append([]byte(keyExpansionLabel), serverRandom...), clientRandom...)
+ keyMaterial, err := PHash(masterSecret, seed, (2*macLen)+(2*keyLen)+(2*ivLen), h)
+ if err != nil {
+ return nil, err
+ }
+
+ clientMACKey := keyMaterial[:macLen]
+ keyMaterial = keyMaterial[macLen:]
+
+ serverMACKey := keyMaterial[:macLen]
+ keyMaterial = keyMaterial[macLen:]
+
+ clientWriteKey := keyMaterial[:keyLen]
+ keyMaterial = keyMaterial[keyLen:]
+
+ serverWriteKey := keyMaterial[:keyLen]
+ keyMaterial = keyMaterial[keyLen:]
+
+ clientWriteIV := keyMaterial[:ivLen]
+ keyMaterial = keyMaterial[ivLen:]
+
+ serverWriteIV := keyMaterial[:ivLen]
+
+ return &EncryptionKeys{
+ MasterSecret: masterSecret,
+ ClientMACKey: clientMACKey,
+ ServerMACKey: serverMACKey,
+ ClientWriteKey: clientWriteKey,
+ ServerWriteKey: serverWriteKey,
+ ClientWriteIV: clientWriteIV,
+ ServerWriteIV: serverWriteIV,
+ }, nil
+}
+
+func prfVerifyData(masterSecret, handshakeBodies []byte, label string, hashFunc HashFunc) ([]byte, error) {
+ h := hashFunc()
+ if _, err := h.Write(handshakeBodies); err != nil {
+ return nil, err
+ }
+
+ seed := append([]byte(label), h.Sum(nil)...)
+ return PHash(masterSecret, seed, 12, hashFunc)
+}
+
+// VerifyDataClient is caled on the Client Side to either verify or generate the VerifyData message
+func VerifyDataClient(masterSecret, handshakeBodies []byte, h HashFunc) ([]byte, error) {
+ return prfVerifyData(masterSecret, handshakeBodies, verifyDataClientLabel, h)
+}
+
+// VerifyDataServer is caled on the Server Side to either verify or generate the VerifyData message
+func VerifyDataServer(masterSecret, handshakeBodies []byte, h HashFunc) ([]byte, error) {
+ return prfVerifyData(masterSecret, handshakeBodies, verifyDataServerLabel, h)
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/signature/signature.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/signature/signature.go
new file mode 100644
index 0000000..d9150eb
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/signature/signature.go
@@ -0,0 +1,24 @@
+// Package signature provides our implemented Signature Algorithms
+package signature
+
+// Algorithm as defined in TLS 1.2
+// https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-16
+type Algorithm uint16
+
+// SignatureAlgorithm enums
+const (
+ Anonymous Algorithm = 0
+ RSA Algorithm = 1
+ ECDSA Algorithm = 3
+ Ed25519 Algorithm = 7
+)
+
+// Algorithms returns all implemented Signature Algorithms
+func Algorithms() map[Algorithm]struct{} {
+ return map[Algorithm]struct{}{
+ Anonymous: {},
+ RSA: {},
+ ECDSA: {},
+ Ed25519: {},
+ }
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/signaturehash/errors.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/signaturehash/errors.go
new file mode 100644
index 0000000..9d9d3b3
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/signaturehash/errors.go
@@ -0,0 +1,9 @@
+package signaturehash
+
+import "errors"
+
+var (
+ errNoAvailableSignatureSchemes = errors.New("connection can not be created, no SignatureScheme satisfy this Config")
+ errInvalidSignatureAlgorithm = errors.New("invalid signature algorithm")
+ errInvalidHashAlgorithm = errors.New("invalid hash algorithm")
+)
diff --git a/vendor/github.com/pion/dtls/v2/pkg/crypto/signaturehash/signaturehash.go b/vendor/github.com/pion/dtls/v2/pkg/crypto/signaturehash/signaturehash.go
new file mode 100644
index 0000000..f2017bc
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/crypto/signaturehash/signaturehash.go
@@ -0,0 +1,93 @@
+// Package signaturehash provides the SignatureHashAlgorithm as defined in TLS 1.2
+package signaturehash
+
+import (
+ "crypto"
+ "crypto/ecdsa"
+ "crypto/ed25519"
+ "crypto/rsa"
+ "crypto/tls"
+
+ "github.com/pion/dtls/v2/pkg/crypto/hash"
+ "github.com/pion/dtls/v2/pkg/crypto/signature"
+ "golang.org/x/xerrors"
+)
+
+// Algorithm is a signature/hash algorithm pairs which may be used in
+// digital signatures.
+//
+// https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1
+type Algorithm struct {
+ Hash hash.Algorithm
+ Signature signature.Algorithm
+}
+
+// Algorithms are all the know SignatureHash Algorithms
+func Algorithms() []Algorithm {
+ return []Algorithm{
+ {hash.SHA256, signature.ECDSA},
+ {hash.SHA384, signature.ECDSA},
+ {hash.SHA512, signature.ECDSA},
+ {hash.SHA256, signature.RSA},
+ {hash.SHA384, signature.RSA},
+ {hash.SHA512, signature.RSA},
+ {hash.Ed25519, signature.Ed25519},
+ }
+}
+
+// SelectSignatureScheme returns most preferred and compatible scheme.
+func SelectSignatureScheme(sigs []Algorithm, privateKey crypto.PrivateKey) (Algorithm, error) {
+ for _, ss := range sigs {
+ if ss.isCompatible(privateKey) {
+ return ss, nil
+ }
+ }
+ return Algorithm{}, errNoAvailableSignatureSchemes
+}
+
+// isCompatible checks that given private key is compatible with the signature scheme.
+func (a *Algorithm) isCompatible(privateKey crypto.PrivateKey) bool {
+ switch privateKey.(type) {
+ case ed25519.PrivateKey:
+ return a.Signature == signature.Ed25519
+ case *ecdsa.PrivateKey:
+ return a.Signature == signature.ECDSA
+ case *rsa.PrivateKey:
+ return a.Signature == signature.RSA
+ default:
+ return false
+ }
+}
+
+// ParseSignatureSchemes translates []tls.SignatureScheme to []signatureHashAlgorithm.
+// It returns default signature scheme list if no SignatureScheme is passed.
+func ParseSignatureSchemes(sigs []tls.SignatureScheme, insecureHashes bool) ([]Algorithm, error) {
+ if len(sigs) == 0 {
+ return Algorithms(), nil
+ }
+ out := []Algorithm{}
+ for _, ss := range sigs {
+ sig := signature.Algorithm(ss & 0xFF)
+ if _, ok := signature.Algorithms()[sig]; !ok {
+ return nil,
+ xerrors.Errorf("SignatureScheme %04x: %w", ss, errInvalidSignatureAlgorithm)
+ }
+ h := hash.Algorithm(ss >> 8)
+ if _, ok := hash.Algorithms()[h]; !ok || (ok && h == hash.None) {
+ return nil, xerrors.Errorf("SignatureScheme %04x: %w", ss, errInvalidHashAlgorithm)
+ }
+ if h.Insecure() && !insecureHashes {
+ continue
+ }
+ out = append(out, Algorithm{
+ Hash: h,
+ Signature: sig,
+ })
+ }
+
+ if len(out) == 0 {
+ return nil, errNoAvailableSignatureSchemes
+ }
+
+ return out, nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/alert/alert.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/alert/alert.go
new file mode 100644
index 0000000..9eb2e6a
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/alert/alert.go
@@ -0,0 +1,160 @@
+// Package alert implements TLS alert protocol https://tools.ietf.org/html/rfc5246#section-7.2
+package alert
+
+import (
+ "errors"
+ "fmt"
+
+ "github.com/pion/dtls/v2/pkg/protocol"
+)
+
+var errBufferTooSmall = &protocol.TemporaryError{Err: errors.New("buffer is too small")} //nolint:goerr113
+
+// Level is the level of the TLS Alert
+type Level byte
+
+// Level enums
+const (
+ Warning Level = 1
+ Fatal Level = 2
+)
+
+func (l Level) String() string {
+ switch l {
+ case Warning:
+ return "Warning"
+ case Fatal:
+ return "Fatal"
+ default:
+ return "Invalid alert level"
+ }
+}
+
+// Description is the extended info of the TLS Alert
+type Description byte
+
+// Description enums
+const (
+ CloseNotify Description = 0
+ UnexpectedMessage Description = 10
+ BadRecordMac Description = 20
+ DecryptionFailed Description = 21
+ RecordOverflow Description = 22
+ DecompressionFailure Description = 30
+ HandshakeFailure Description = 40
+ NoCertificate Description = 41
+ BadCertificate Description = 42
+ UnsupportedCertificate Description = 43
+ CertificateRevoked Description = 44
+ CertificateExpired Description = 45
+ CertificateUnknown Description = 46
+ IllegalParameter Description = 47
+ UnknownCA Description = 48
+ AccessDenied Description = 49
+ DecodeError Description = 50
+ DecryptError Description = 51
+ ExportRestriction Description = 60
+ ProtocolVersion Description = 70
+ InsufficientSecurity Description = 71
+ InternalError Description = 80
+ UserCanceled Description = 90
+ NoRenegotiation Description = 100
+ UnsupportedExtension Description = 110
+)
+
+func (d Description) String() string {
+ switch d {
+ case CloseNotify:
+ return "CloseNotify"
+ case UnexpectedMessage:
+ return "UnexpectedMessage"
+ case BadRecordMac:
+ return "BadRecordMac"
+ case DecryptionFailed:
+ return "DecryptionFailed"
+ case RecordOverflow:
+ return "RecordOverflow"
+ case DecompressionFailure:
+ return "DecompressionFailure"
+ case HandshakeFailure:
+ return "HandshakeFailure"
+ case NoCertificate:
+ return "NoCertificate"
+ case BadCertificate:
+ return "BadCertificate"
+ case UnsupportedCertificate:
+ return "UnsupportedCertificate"
+ case CertificateRevoked:
+ return "CertificateRevoked"
+ case CertificateExpired:
+ return "CertificateExpired"
+ case CertificateUnknown:
+ return "CertificateUnknown"
+ case IllegalParameter:
+ return "IllegalParameter"
+ case UnknownCA:
+ return "UnknownCA"
+ case AccessDenied:
+ return "AccessDenied"
+ case DecodeError:
+ return "DecodeError"
+ case DecryptError:
+ return "DecryptError"
+ case ExportRestriction:
+ return "ExportRestriction"
+ case ProtocolVersion:
+ return "ProtocolVersion"
+ case InsufficientSecurity:
+ return "InsufficientSecurity"
+ case InternalError:
+ return "InternalError"
+ case UserCanceled:
+ return "UserCanceled"
+ case NoRenegotiation:
+ return "NoRenegotiation"
+ case UnsupportedExtension:
+ return "UnsupportedExtension"
+ default:
+ return "Invalid alert description"
+ }
+}
+
+// Alert is one of the content types supported by the TLS record layer.
+// Alert messages convey the severity of the message
+// (warning or fatal) and a description of the alert. Alert messages
+// with a level of fatal result in the immediate termination of the
+// connection. In this case, other connections corresponding to the
+// session may continue, but the session identifier MUST be invalidated,
+// preventing the failed session from being used to establish new
+// connections. Like other messages, alert messages are encrypted and
+// compressed, as specified by the current connection state.
+// https://tools.ietf.org/html/rfc5246#section-7.2
+type Alert struct {
+ Level Level
+ Description Description
+}
+
+// ContentType returns the ContentType of this Content
+func (a Alert) ContentType() protocol.ContentType {
+ return protocol.ContentTypeAlert
+}
+
+// Marshal returns the encoded alert
+func (a *Alert) Marshal() ([]byte, error) {
+ return []byte{byte(a.Level), byte(a.Description)}, nil
+}
+
+// Unmarshal populates the alert from binary data
+func (a *Alert) Unmarshal(data []byte) error {
+ if len(data) != 2 {
+ return errBufferTooSmall
+ }
+
+ a.Level = Level(data[0])
+ a.Description = Description(data[1])
+ return nil
+}
+
+func (a *Alert) String() string {
+ return fmt.Sprintf("Alert %s: %s", a.Level, a.Description)
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/application_data.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/application_data.go
new file mode 100644
index 0000000..e5fd6f5
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/application_data.go
@@ -0,0 +1,26 @@
+package protocol
+
+// ApplicationData messages are carried by the record layer and are
+// fragmented, compressed, and encrypted based on the current connection
+// state. The messages are treated as transparent data to the record
+// layer.
+// https://tools.ietf.org/html/rfc5246#section-10
+type ApplicationData struct {
+ Data []byte
+}
+
+// ContentType returns the ContentType of this content
+func (a ApplicationData) ContentType() ContentType {
+ return ContentTypeApplicationData
+}
+
+// Marshal encodes the ApplicationData to binary
+func (a *ApplicationData) Marshal() ([]byte, error) {
+ return append([]byte{}, a.Data...), nil
+}
+
+// Unmarshal populates the ApplicationData from binary
+func (a *ApplicationData) Unmarshal(data []byte) error {
+ a.Data = append([]byte{}, data...)
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/change_cipher_spec.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/change_cipher_spec.go
new file mode 100644
index 0000000..67b0052
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/change_cipher_spec.go
@@ -0,0 +1,28 @@
+package protocol
+
+// ChangeCipherSpec protocol exists to signal transitions in
+// ciphering strategies. The protocol consists of a single message,
+// which is encrypted and compressed under the current (not the pending)
+// connection state. The message consists of a single byte of value 1.
+// https://tools.ietf.org/html/rfc5246#section-7.1
+type ChangeCipherSpec struct {
+}
+
+// ContentType returns the ContentType of this content
+func (c ChangeCipherSpec) ContentType() ContentType {
+ return ContentTypeChangeCipherSpec
+}
+
+// Marshal encodes the ChangeCipherSpec to binary
+func (c *ChangeCipherSpec) Marshal() ([]byte, error) {
+ return []byte{0x01}, nil
+}
+
+// Unmarshal populates the ChangeCipherSpec from binary
+func (c *ChangeCipherSpec) Unmarshal(data []byte) error {
+ if len(data) == 1 && data[0] == 0x01 {
+ return nil
+ }
+
+ return errInvalidCipherSpec
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/compression_method.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/compression_method.go
new file mode 100644
index 0000000..678e816
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/compression_method.go
@@ -0,0 +1,48 @@
+package protocol
+
+// CompressionMethodID is the ID for a CompressionMethod
+type CompressionMethodID byte
+
+const (
+ compressionMethodNull CompressionMethodID = 0
+)
+
+// CompressionMethod represents a TLS Compression Method
+type CompressionMethod struct {
+ ID CompressionMethodID
+}
+
+// CompressionMethods returns all supported CompressionMethods
+func CompressionMethods() map[CompressionMethodID]*CompressionMethod {
+ return map[CompressionMethodID]*CompressionMethod{
+ compressionMethodNull: {ID: compressionMethodNull},
+ }
+}
+
+// DecodeCompressionMethods the given compression methods
+func DecodeCompressionMethods(buf []byte) ([]*CompressionMethod, error) {
+ if len(buf) < 1 {
+ return nil, errBufferTooSmall
+ }
+ compressionMethodsCount := int(buf[0])
+ c := []*CompressionMethod{}
+ for i := 0; i < compressionMethodsCount; i++ {
+ if len(buf) <= i+1 {
+ return nil, errBufferTooSmall
+ }
+ id := CompressionMethodID(buf[i+1])
+ if compressionMethod, ok := CompressionMethods()[id]; ok {
+ c = append(c, compressionMethod)
+ }
+ }
+ return c, nil
+}
+
+// EncodeCompressionMethods the given compression methods
+func EncodeCompressionMethods(c []*CompressionMethod) []byte {
+ out := []byte{byte(len(c))}
+ for i := len(c); i > 0; i-- {
+ out = append(out, byte(c[i-1].ID))
+ }
+ return out
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/content.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/content.go
new file mode 100644
index 0000000..47e5c96
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/content.go
@@ -0,0 +1,21 @@
+package protocol
+
+// ContentType represents the IANA Registered ContentTypes
+//
+// https://tools.ietf.org/html/rfc4346#section-6.2.1
+type ContentType uint8
+
+// ContentType enums
+const (
+ ContentTypeChangeCipherSpec ContentType = 20
+ ContentTypeAlert ContentType = 21
+ ContentTypeHandshake ContentType = 22
+ ContentTypeApplicationData ContentType = 23
+)
+
+// Content is the top level distinguisher for a DTLS Datagram
+type Content interface {
+ ContentType() ContentType
+ Marshal() ([]byte, error)
+ Unmarshal(data []byte) error
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/errors.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/errors.go
new file mode 100644
index 0000000..e52014a
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/errors.go
@@ -0,0 +1,104 @@
+package protocol
+
+import (
+ "errors"
+ "fmt"
+ "net"
+)
+
+var (
+ errBufferTooSmall = &TemporaryError{Err: errors.New("buffer is too small")} //nolint:goerr113
+ errInvalidCipherSpec = &FatalError{Err: errors.New("cipher spec invalid")} //nolint:goerr113
+)
+
+// FatalError indicates that the DTLS connection is no longer available.
+// It is mainly caused by wrong configuration of server or client.
+type FatalError struct {
+ Err error
+}
+
+// InternalError indicates and internal error caused by the implementation, and the DTLS connection is no longer available.
+// It is mainly caused by bugs or tried to use unimplemented features.
+type InternalError struct {
+ Err error
+}
+
+// TemporaryError indicates that the DTLS connection is still available, but the request was failed temporary.
+type TemporaryError struct {
+ Err error
+}
+
+// TimeoutError indicates that the request was timed out.
+type TimeoutError struct {
+ Err error
+}
+
+// HandshakeError indicates that the handshake failed.
+type HandshakeError struct {
+ Err error
+}
+
+// Timeout implements net.Error.Timeout()
+func (*FatalError) Timeout() bool { return false }
+
+// Temporary implements net.Error.Temporary()
+func (*FatalError) Temporary() bool { return false }
+
+// Unwrap implements Go1.13 error unwrapper.
+func (e *FatalError) Unwrap() error { return e.Err }
+
+func (e *FatalError) Error() string { return fmt.Sprintf("dtls fatal: %v", e.Err) }
+
+// Timeout implements net.Error.Timeout()
+func (*InternalError) Timeout() bool { return false }
+
+// Temporary implements net.Error.Temporary()
+func (*InternalError) Temporary() bool { return false }
+
+// Unwrap implements Go1.13 error unwrapper.
+func (e *InternalError) Unwrap() error { return e.Err }
+
+func (e *InternalError) Error() string { return fmt.Sprintf("dtls internal: %v", e.Err) }
+
+// Timeout implements net.Error.Timeout()
+func (*TemporaryError) Timeout() bool { return false }
+
+// Temporary implements net.Error.Temporary()
+func (*TemporaryError) Temporary() bool { return true }
+
+// Unwrap implements Go1.13 error unwrapper.
+func (e *TemporaryError) Unwrap() error { return e.Err }
+
+func (e *TemporaryError) Error() string { return fmt.Sprintf("dtls temporary: %v", e.Err) }
+
+// Timeout implements net.Error.Timeout()
+func (*TimeoutError) Timeout() bool { return true }
+
+// Temporary implements net.Error.Temporary()
+func (*TimeoutError) Temporary() bool { return true }
+
+// Unwrap implements Go1.13 error unwrapper.
+func (e *TimeoutError) Unwrap() error { return e.Err }
+
+func (e *TimeoutError) Error() string { return fmt.Sprintf("dtls timeout: %v", e.Err) }
+
+// Timeout implements net.Error.Timeout()
+func (e *HandshakeError) Timeout() bool {
+ if netErr, ok := e.Err.(net.Error); ok {
+ return netErr.Timeout()
+ }
+ return false
+}
+
+// Temporary implements net.Error.Temporary()
+func (e *HandshakeError) Temporary() bool {
+ if netErr, ok := e.Err.(net.Error); ok {
+ return netErr.Temporary()
+ }
+ return false
+}
+
+// Unwrap implements Go1.13 error unwrapper.
+func (e *HandshakeError) Unwrap() error { return e.Err }
+
+func (e *HandshakeError) Error() string { return fmt.Sprintf("handshake error: %v", e.Err) }
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/errors.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/errors.go
new file mode 100644
index 0000000..23ed9b2
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/errors.go
@@ -0,0 +1,14 @@
+package extension
+
+import (
+ "errors"
+
+ "github.com/pion/dtls/v2/pkg/protocol"
+)
+
+var (
+ errBufferTooSmall = &protocol.TemporaryError{Err: errors.New("buffer is too small")} //nolint:goerr113
+ errInvalidExtensionType = &protocol.FatalError{Err: errors.New("invalid extension type")} //nolint:goerr113
+ errInvalidSNIFormat = &protocol.FatalError{Err: errors.New("invalid server name format")} //nolint:goerr113
+ errLengthMismatch = &protocol.InternalError{Err: errors.New("data length and declared length do not match")} //nolint:goerr113
+)
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/extension.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/extension.go
new file mode 100644
index 0000000..39b1fc8
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/extension.go
@@ -0,0 +1,96 @@
+// Package extension implements the extension values in the ClientHello/ServerHello
+package extension
+
+import "encoding/binary"
+
+// TypeValue is the 2 byte value for a TLS Extension as registered in the IANA
+//
+// https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml
+type TypeValue uint16
+
+// TypeValue constants
+const (
+ ServerNameTypeValue TypeValue = 0
+ SupportedEllipticCurvesTypeValue TypeValue = 10
+ SupportedPointFormatsTypeValue TypeValue = 11
+ SupportedSignatureAlgorithmsTypeValue TypeValue = 13
+ UseSRTPTypeValue TypeValue = 14
+ UseExtendedMasterSecretTypeValue TypeValue = 23
+ RenegotiationInfoTypeValue TypeValue = 65281
+)
+
+// Extension represents a single TLS extension
+type Extension interface {
+ Marshal() ([]byte, error)
+ Unmarshal(data []byte) error
+ TypeValue() TypeValue
+}
+
+// Unmarshal many extensions at once
+func Unmarshal(buf []byte) ([]Extension, error) {
+ switch {
+ case len(buf) == 0:
+ return []Extension{}, nil
+ case len(buf) < 2:
+ return nil, errBufferTooSmall
+ }
+
+ declaredLen := binary.BigEndian.Uint16(buf)
+ if len(buf)-2 != int(declaredLen) {
+ return nil, errLengthMismatch
+ }
+
+ extensions := []Extension{}
+ unmarshalAndAppend := func(data []byte, e Extension) error {
+ err := e.Unmarshal(data)
+ if err != nil {
+ return err
+ }
+ extensions = append(extensions, e)
+ return nil
+ }
+
+ for offset := 2; offset < len(buf); {
+ if len(buf) < (offset + 2) {
+ return nil, errBufferTooSmall
+ }
+ var err error
+ switch TypeValue(binary.BigEndian.Uint16(buf[offset:])) {
+ case ServerNameTypeValue:
+ err = unmarshalAndAppend(buf[offset:], &ServerName{})
+ case SupportedEllipticCurvesTypeValue:
+ err = unmarshalAndAppend(buf[offset:], &SupportedEllipticCurves{})
+ case UseSRTPTypeValue:
+ err = unmarshalAndAppend(buf[offset:], &UseSRTP{})
+ case UseExtendedMasterSecretTypeValue:
+ err = unmarshalAndAppend(buf[offset:], &UseExtendedMasterSecret{})
+ case RenegotiationInfoTypeValue:
+ err = unmarshalAndAppend(buf[offset:], &RenegotiationInfo{})
+ default:
+ }
+ if err != nil {
+ return nil, err
+ }
+ if len(buf) < (offset + 4) {
+ return nil, errBufferTooSmall
+ }
+ extensionLength := binary.BigEndian.Uint16(buf[offset+2:])
+ offset += (4 + int(extensionLength))
+ }
+ return extensions, nil
+}
+
+// Marshal many extensions at once
+func Marshal(e []Extension) ([]byte, error) {
+ extensions := []byte{}
+ for _, e := range e {
+ raw, err := e.Marshal()
+ if err != nil {
+ return nil, err
+ }
+ extensions = append(extensions, raw...)
+ }
+ out := []byte{0x00, 0x00}
+ binary.BigEndian.PutUint16(out, uint16(len(extensions)))
+ return append(out, extensions...), nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/renegotiation_info.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/renegotiation_info.go
new file mode 100644
index 0000000..8378c3d
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/renegotiation_info.go
@@ -0,0 +1,43 @@
+package extension
+
+import "encoding/binary"
+
+const (
+ renegotiationInfoHeaderSize = 5
+)
+
+// RenegotiationInfo allows a Client/Server to
+// communicate their renegotation support
+//
+// https://tools.ietf.org/html/rfc5746
+type RenegotiationInfo struct {
+ RenegotiatedConnection uint8
+}
+
+// TypeValue returns the extension TypeValue
+func (r RenegotiationInfo) TypeValue() TypeValue {
+ return RenegotiationInfoTypeValue
+}
+
+// Marshal encodes the extension
+func (r *RenegotiationInfo) Marshal() ([]byte, error) {
+ out := make([]byte, renegotiationInfoHeaderSize)
+
+ binary.BigEndian.PutUint16(out, uint16(r.TypeValue()))
+ binary.BigEndian.PutUint16(out[2:], uint16(1)) // length
+ out[4] = r.RenegotiatedConnection
+ return out, nil
+}
+
+// Unmarshal populates the extension from encoded data
+func (r *RenegotiationInfo) Unmarshal(data []byte) error {
+ if len(data) < renegotiationInfoHeaderSize {
+ return errBufferTooSmall
+ } else if TypeValue(binary.BigEndian.Uint16(data)) != r.TypeValue() {
+ return errInvalidExtensionType
+ }
+
+ r.RenegotiatedConnection = data[4]
+
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/server_name.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/server_name.go
new file mode 100644
index 0000000..a08033f
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/server_name.go
@@ -0,0 +1,78 @@
+package extension
+
+import (
+ "strings"
+
+ "golang.org/x/crypto/cryptobyte"
+)
+
+const serverNameTypeDNSHostName = 0
+
+// ServerName allows the client to inform the server the specific
+// name it wishs to contact. Useful if multiple DNS names resolve
+// to one IP
+//
+// https://tools.ietf.org/html/rfc6066#section-3
+type ServerName struct {
+ ServerName string
+}
+
+// TypeValue returns the extension TypeValue
+func (s ServerName) TypeValue() TypeValue {
+ return ServerNameTypeValue
+}
+
+// Marshal encodes the extension
+func (s *ServerName) Marshal() ([]byte, error) {
+ var b cryptobyte.Builder
+ b.AddUint16(uint16(s.TypeValue()))
+ b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) {
+ b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) {
+ b.AddUint8(serverNameTypeDNSHostName)
+ b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) {
+ b.AddBytes([]byte(s.ServerName))
+ })
+ })
+ })
+ return b.Bytes()
+}
+
+// Unmarshal populates the extension from encoded data
+func (s *ServerName) Unmarshal(data []byte) error {
+ val := cryptobyte.String(data)
+ var extension uint16
+ val.ReadUint16(&extension)
+ if TypeValue(extension) != s.TypeValue() {
+ return errInvalidExtensionType
+ }
+
+ var extData cryptobyte.String
+ val.ReadUint16LengthPrefixed(&extData)
+
+ var nameList cryptobyte.String
+ if !extData.ReadUint16LengthPrefixed(&nameList) || nameList.Empty() {
+ return errInvalidSNIFormat
+ }
+ for !nameList.Empty() {
+ var nameType uint8
+ var serverName cryptobyte.String
+ if !nameList.ReadUint8(&nameType) ||
+ !nameList.ReadUint16LengthPrefixed(&serverName) ||
+ serverName.Empty() {
+ return errInvalidSNIFormat
+ }
+ if nameType != serverNameTypeDNSHostName {
+ continue
+ }
+ if len(s.ServerName) != 0 {
+ // Multiple names of the same name_type are prohibited.
+ return errInvalidSNIFormat
+ }
+ s.ServerName = string(serverName)
+ // An SNI value may not include a trailing dot.
+ if strings.HasSuffix(s.ServerName, ".") {
+ return errInvalidSNIFormat
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/srtp_protection_profile.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/srtp_protection_profile.go
new file mode 100644
index 0000000..2c4d1d4
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/srtp_protection_profile.go
@@ -0,0 +1,21 @@
+package extension
+
+// SRTPProtectionProfile defines the parameters and options that are in effect for the SRTP processing
+// https://tools.ietf.org/html/rfc5764#section-4.1.2
+type SRTPProtectionProfile uint16
+
+const (
+ SRTP_AES128_CM_HMAC_SHA1_80 SRTPProtectionProfile = 0x0001 // nolint
+ SRTP_AES128_CM_HMAC_SHA1_32 SRTPProtectionProfile = 0x0002 // nolint
+ SRTP_AEAD_AES_128_GCM SRTPProtectionProfile = 0x0007 // nolint
+ SRTP_AEAD_AES_256_GCM SRTPProtectionProfile = 0x0008 // nolint
+)
+
+func srtpProtectionProfiles() map[SRTPProtectionProfile]bool {
+ return map[SRTPProtectionProfile]bool{
+ SRTP_AES128_CM_HMAC_SHA1_80: true,
+ SRTP_AES128_CM_HMAC_SHA1_32: true,
+ SRTP_AEAD_AES_128_GCM: true,
+ SRTP_AEAD_AES_256_GCM: true,
+ }
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/supported_elliptic_curves.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/supported_elliptic_curves.go
new file mode 100644
index 0000000..8f077fc
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/supported_elliptic_curves.go
@@ -0,0 +1,62 @@
+package extension
+
+import (
+ "encoding/binary"
+
+ "github.com/pion/dtls/v2/pkg/crypto/elliptic"
+)
+
+const (
+ supportedGroupsHeaderSize = 6
+)
+
+// SupportedEllipticCurves allows a Client/Server to communicate
+// what curves they both support
+//
+// https://tools.ietf.org/html/rfc8422#section-5.1.1
+type SupportedEllipticCurves struct {
+ EllipticCurves []elliptic.Curve
+}
+
+// TypeValue returns the extension TypeValue
+func (s SupportedEllipticCurves) TypeValue() TypeValue {
+ return SupportedEllipticCurvesTypeValue
+}
+
+// Marshal encodes the extension
+func (s *SupportedEllipticCurves) Marshal() ([]byte, error) {
+ out := make([]byte, supportedGroupsHeaderSize)
+
+ binary.BigEndian.PutUint16(out, uint16(s.TypeValue()))
+ binary.BigEndian.PutUint16(out[2:], uint16(2+(len(s.EllipticCurves)*2)))
+ binary.BigEndian.PutUint16(out[4:], uint16(len(s.EllipticCurves)*2))
+
+ for _, v := range s.EllipticCurves {
+ out = append(out, []byte{0x00, 0x00}...)
+ binary.BigEndian.PutUint16(out[len(out)-2:], uint16(v))
+ }
+
+ return out, nil
+}
+
+// Unmarshal populates the extension from encoded data
+func (s *SupportedEllipticCurves) Unmarshal(data []byte) error {
+ if len(data) <= supportedGroupsHeaderSize {
+ return errBufferTooSmall
+ } else if TypeValue(binary.BigEndian.Uint16(data)) != s.TypeValue() {
+ return errInvalidExtensionType
+ }
+
+ groupCount := int(binary.BigEndian.Uint16(data[4:]) / 2)
+ if supportedGroupsHeaderSize+(groupCount*2) > len(data) {
+ return errLengthMismatch
+ }
+
+ for i := 0; i < groupCount; i++ {
+ supportedGroupID := elliptic.Curve(binary.BigEndian.Uint16(data[(supportedGroupsHeaderSize + (i * 2)):]))
+ if _, ok := elliptic.Curves()[supportedGroupID]; ok {
+ s.EllipticCurves = append(s.EllipticCurves, supportedGroupID)
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/supported_point_formats.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/supported_point_formats.go
new file mode 100644
index 0000000..873d078
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/supported_point_formats.go
@@ -0,0 +1,62 @@
+package extension
+
+import (
+ "encoding/binary"
+
+ "github.com/pion/dtls/v2/pkg/crypto/elliptic"
+)
+
+const (
+ supportedPointFormatsSize = 5
+)
+
+// SupportedPointFormats allows a Client/Server to negotiate
+// the EllipticCurvePointFormats
+//
+// https://tools.ietf.org/html/rfc4492#section-5.1.2
+type SupportedPointFormats struct {
+ PointFormats []elliptic.CurvePointFormat
+}
+
+// TypeValue returns the extension TypeValue
+func (s SupportedPointFormats) TypeValue() TypeValue {
+ return SupportedPointFormatsTypeValue
+}
+
+// Marshal encodes the extension
+func (s *SupportedPointFormats) Marshal() ([]byte, error) {
+ out := make([]byte, supportedPointFormatsSize)
+
+ binary.BigEndian.PutUint16(out, uint16(s.TypeValue()))
+ binary.BigEndian.PutUint16(out[2:], uint16(1+(len(s.PointFormats))))
+ out[4] = byte(len(s.PointFormats))
+
+ for _, v := range s.PointFormats {
+ out = append(out, byte(v))
+ }
+ return out, nil
+}
+
+// Unmarshal populates the extension from encoded data
+func (s *SupportedPointFormats) Unmarshal(data []byte) error {
+ if len(data) <= supportedPointFormatsSize {
+ return errBufferTooSmall
+ } else if TypeValue(binary.BigEndian.Uint16(data)) != s.TypeValue() {
+ return errInvalidExtensionType
+ }
+
+ pointFormatCount := int(binary.BigEndian.Uint16(data[4:]))
+ if supportedGroupsHeaderSize+(pointFormatCount) > len(data) {
+ return errLengthMismatch
+ }
+
+ for i := 0; i < pointFormatCount; i++ {
+ p := elliptic.CurvePointFormat(data[supportedPointFormatsSize+i])
+ switch p {
+ case elliptic.CurvePointFormatUncompressed:
+ s.PointFormats = append(s.PointFormats, p)
+ default:
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/supported_signature_algorithms.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/supported_signature_algorithms.go
new file mode 100644
index 0000000..ee284f6
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/supported_signature_algorithms.go
@@ -0,0 +1,70 @@
+package extension
+
+import (
+ "encoding/binary"
+
+ "github.com/pion/dtls/v2/pkg/crypto/hash"
+ "github.com/pion/dtls/v2/pkg/crypto/signature"
+ "github.com/pion/dtls/v2/pkg/crypto/signaturehash"
+)
+
+const (
+ supportedSignatureAlgorithmsHeaderSize = 6
+)
+
+// SupportedSignatureAlgorithms allows a Client/Server to
+// negotiate what SignatureHash Algorithms they both support
+//
+// https://tools.ietf.org/html/rfc5246#section-7.4.1.4.1
+type SupportedSignatureAlgorithms struct {
+ SignatureHashAlgorithms []signaturehash.Algorithm
+}
+
+// TypeValue returns the extension TypeValue
+func (s SupportedSignatureAlgorithms) TypeValue() TypeValue {
+ return SupportedSignatureAlgorithmsTypeValue
+}
+
+// Marshal encodes the extension
+func (s *SupportedSignatureAlgorithms) Marshal() ([]byte, error) {
+ out := make([]byte, supportedSignatureAlgorithmsHeaderSize)
+
+ binary.BigEndian.PutUint16(out, uint16(s.TypeValue()))
+ binary.BigEndian.PutUint16(out[2:], uint16(2+(len(s.SignatureHashAlgorithms)*2)))
+ binary.BigEndian.PutUint16(out[4:], uint16(len(s.SignatureHashAlgorithms)*2))
+ for _, v := range s.SignatureHashAlgorithms {
+ out = append(out, []byte{0x00, 0x00}...)
+ out[len(out)-2] = byte(v.Hash)
+ out[len(out)-1] = byte(v.Signature)
+ }
+
+ return out, nil
+}
+
+// Unmarshal populates the extension from encoded data
+func (s *SupportedSignatureAlgorithms) Unmarshal(data []byte) error {
+ if len(data) <= supportedSignatureAlgorithmsHeaderSize {
+ return errBufferTooSmall
+ } else if TypeValue(binary.BigEndian.Uint16(data)) != s.TypeValue() {
+ return errInvalidExtensionType
+ }
+
+ algorithmCount := int(binary.BigEndian.Uint16(data[4:]) / 2)
+ if supportedSignatureAlgorithmsHeaderSize+(algorithmCount*2) > len(data) {
+ return errLengthMismatch
+ }
+ for i := 0; i < algorithmCount; i++ {
+ supportedHashAlgorithm := hash.Algorithm(data[supportedSignatureAlgorithmsHeaderSize+(i*2)])
+ supportedSignatureAlgorithm := signature.Algorithm(data[supportedSignatureAlgorithmsHeaderSize+(i*2)+1])
+ if _, ok := hash.Algorithms()[supportedHashAlgorithm]; ok {
+ if _, ok := signature.Algorithms()[supportedSignatureAlgorithm]; ok {
+ s.SignatureHashAlgorithms = append(s.SignatureHashAlgorithms, signaturehash.Algorithm{
+ Hash: supportedHashAlgorithm,
+ Signature: supportedSignatureAlgorithm,
+ })
+ }
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/use_master_secret.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/use_master_secret.go
new file mode 100644
index 0000000..04ddc95
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/use_master_secret.go
@@ -0,0 +1,45 @@
+package extension
+
+import "encoding/binary"
+
+const (
+ useExtendedMasterSecretHeaderSize = 4
+)
+
+// UseExtendedMasterSecret defines a TLS extension that contextually binds the
+// master secret to a log of the full handshake that computes it, thus
+// preventing MITM attacks.
+type UseExtendedMasterSecret struct {
+ Supported bool
+}
+
+// TypeValue returns the extension TypeValue
+func (u UseExtendedMasterSecret) TypeValue() TypeValue {
+ return UseExtendedMasterSecretTypeValue
+}
+
+// Marshal encodes the extension
+func (u *UseExtendedMasterSecret) Marshal() ([]byte, error) {
+ if !u.Supported {
+ return []byte{}, nil
+ }
+
+ out := make([]byte, useExtendedMasterSecretHeaderSize)
+
+ binary.BigEndian.PutUint16(out, uint16(u.TypeValue()))
+ binary.BigEndian.PutUint16(out[2:], uint16(0)) // length
+ return out, nil
+}
+
+// Unmarshal populates the extension from encoded data
+func (u *UseExtendedMasterSecret) Unmarshal(data []byte) error {
+ if len(data) < useExtendedMasterSecretHeaderSize {
+ return errBufferTooSmall
+ } else if TypeValue(binary.BigEndian.Uint16(data)) != u.TypeValue() {
+ return errInvalidExtensionType
+ }
+
+ u.Supported = true
+
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/use_srtp.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/use_srtp.go
new file mode 100644
index 0000000..729fa3a
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/extension/use_srtp.go
@@ -0,0 +1,59 @@
+package extension
+
+import "encoding/binary"
+
+const (
+ useSRTPHeaderSize = 6
+)
+
+// UseSRTP allows a Client/Server to negotiate what SRTPProtectionProfiles
+// they both support
+//
+// https://tools.ietf.org/html/rfc8422
+type UseSRTP struct {
+ ProtectionProfiles []SRTPProtectionProfile
+}
+
+// TypeValue returns the extension TypeValue
+func (u UseSRTP) TypeValue() TypeValue {
+ return UseSRTPTypeValue
+}
+
+// Marshal encodes the extension
+func (u *UseSRTP) Marshal() ([]byte, error) {
+ out := make([]byte, useSRTPHeaderSize)
+
+ binary.BigEndian.PutUint16(out, uint16(u.TypeValue()))
+ binary.BigEndian.PutUint16(out[2:], uint16(2+(len(u.ProtectionProfiles)*2)+ /* MKI Length */ 1))
+ binary.BigEndian.PutUint16(out[4:], uint16(len(u.ProtectionProfiles)*2))
+
+ for _, v := range u.ProtectionProfiles {
+ out = append(out, []byte{0x00, 0x00}...)
+ binary.BigEndian.PutUint16(out[len(out)-2:], uint16(v))
+ }
+
+ out = append(out, 0x00) /* MKI Length */
+ return out, nil
+}
+
+// Unmarshal populates the extension from encoded data
+func (u *UseSRTP) Unmarshal(data []byte) error {
+ if len(data) <= useSRTPHeaderSize {
+ return errBufferTooSmall
+ } else if TypeValue(binary.BigEndian.Uint16(data)) != u.TypeValue() {
+ return errInvalidExtensionType
+ }
+
+ profileCount := int(binary.BigEndian.Uint16(data[4:]) / 2)
+ if supportedGroupsHeaderSize+(profileCount*2) > len(data) {
+ return errLengthMismatch
+ }
+
+ for i := 0; i < profileCount; i++ {
+ supportedProfile := SRTPProtectionProfile(binary.BigEndian.Uint16(data[(useSRTPHeaderSize + (i * 2)):]))
+ if _, ok := srtpProtectionProfiles()[supportedProfile]; ok {
+ u.ProtectionProfiles = append(u.ProtectionProfiles, supportedProfile)
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/cipher_suite.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/cipher_suite.go
new file mode 100644
index 0000000..e8fbdea
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/cipher_suite.go
@@ -0,0 +1,29 @@
+package handshake
+
+import "encoding/binary"
+
+func decodeCipherSuiteIDs(buf []byte) ([]uint16, error) {
+ if len(buf) < 2 {
+ return nil, errBufferTooSmall
+ }
+ cipherSuitesCount := int(binary.BigEndian.Uint16(buf[0:])) / 2
+ rtrn := make([]uint16, cipherSuitesCount)
+ for i := 0; i < cipherSuitesCount; i++ {
+ if len(buf) < (i*2 + 4) {
+ return nil, errBufferTooSmall
+ }
+
+ rtrn[i] = binary.BigEndian.Uint16(buf[(i*2)+2:])
+ }
+ return rtrn, nil
+}
+
+func encodeCipherSuiteIDs(cipherSuiteIDs []uint16) []byte {
+ out := []byte{0x00, 0x00}
+ binary.BigEndian.PutUint16(out[len(out)-2:], uint16(len(cipherSuiteIDs)*2))
+ for _, id := range cipherSuiteIDs {
+ out = append(out, []byte{0x00, 0x00}...)
+ binary.BigEndian.PutUint16(out[len(out)-2:], id)
+ }
+ return out
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/errors.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/errors.go
new file mode 100644
index 0000000..ac77c04
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/errors.go
@@ -0,0 +1,25 @@
+package handshake
+
+import (
+ "errors"
+
+ "github.com/pion/dtls/v2/pkg/protocol"
+)
+
+// Typed errors
+var (
+ errUnableToMarshalFragmented = &protocol.InternalError{Err: errors.New("unable to marshal fragmented handshakes")} //nolint:goerr113
+ errHandshakeMessageUnset = &protocol.InternalError{Err: errors.New("handshake message unset, unable to marshal")} //nolint:goerr113
+ errBufferTooSmall = &protocol.TemporaryError{Err: errors.New("buffer is too small")} //nolint:goerr113
+ errLengthMismatch = &protocol.InternalError{Err: errors.New("data length and declared length do not match")} //nolint:goerr113
+ errInvalidClientKeyExchange = &protocol.FatalError{Err: errors.New("unable to determine if ClientKeyExchange is a public key or PSK Identity")} //nolint:goerr113
+ errInvalidHashAlgorithm = &protocol.FatalError{Err: errors.New("invalid hash algorithm")} //nolint:goerr113
+ errInvalidSignatureAlgorithm = &protocol.FatalError{Err: errors.New("invalid signature algorithm")} //nolint:goerr113
+ errCookieTooLong = &protocol.FatalError{Err: errors.New("cookie must not be longer then 255 bytes")} //nolint:goerr113
+ errInvalidEllipticCurveType = &protocol.FatalError{Err: errors.New("invalid or unknown elliptic curve type")} //nolint:goerr113
+ errInvalidNamedCurve = &protocol.FatalError{Err: errors.New("invalid named curve")} //nolint:goerr113
+ errCipherSuiteUnset = &protocol.FatalError{Err: errors.New("server hello can not be created without a cipher suite")} //nolint:goerr113
+ errCompressionMethodUnset = &protocol.FatalError{Err: errors.New("server hello can not be created without a compression method")} //nolint:goerr113
+ errInvalidCompressionMethod = &protocol.FatalError{Err: errors.New("invalid or unknown compression method")} //nolint:goerr113
+ errNotImplemented = &protocol.InternalError{Err: errors.New("feature has not been implemented yet")} //nolint:goerr113
+)
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/handshake.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/handshake.go
new file mode 100644
index 0000000..4aa493e
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/handshake.go
@@ -0,0 +1,145 @@
+// Package handshake provides the DTLS wire protocol for handshakes
+package handshake
+
+import (
+ "github.com/pion/dtls/v2/internal/util"
+ "github.com/pion/dtls/v2/pkg/protocol"
+)
+
+// Type is the unique identifier for each handshake message
+// https://tools.ietf.org/html/rfc5246#section-7.4
+type Type uint8
+
+// Types of DTLS Handshake messages we know about
+const (
+ TypeHelloRequest Type = 0
+ TypeClientHello Type = 1
+ TypeServerHello Type = 2
+ TypeHelloVerifyRequest Type = 3
+ TypeCertificate Type = 11
+ TypeServerKeyExchange Type = 12
+ TypeCertificateRequest Type = 13
+ TypeServerHelloDone Type = 14
+ TypeCertificateVerify Type = 15
+ TypeClientKeyExchange Type = 16
+ TypeFinished Type = 20
+)
+
+// String returns the string representation of this type
+func (t Type) String() string {
+ switch t {
+ case TypeHelloRequest:
+ return "HelloRequest"
+ case TypeClientHello:
+ return "ClientHello"
+ case TypeServerHello:
+ return "ServerHello"
+ case TypeHelloVerifyRequest:
+ return "HelloVerifyRequest"
+ case TypeCertificate:
+ return "TypeCertificate"
+ case TypeServerKeyExchange:
+ return "ServerKeyExchange"
+ case TypeCertificateRequest:
+ return "CertificateRequest"
+ case TypeServerHelloDone:
+ return "ServerHelloDone"
+ case TypeCertificateVerify:
+ return "CertificateVerify"
+ case TypeClientKeyExchange:
+ return "ClientKeyExchange"
+ case TypeFinished:
+ return "Finished"
+ }
+ return ""
+}
+
+// Message is the body of a Handshake datagram
+type Message interface {
+ Marshal() ([]byte, error)
+ Unmarshal(data []byte) error
+
+ Type() Type
+}
+
+// Handshake protocol is responsible for selecting a cipher spec and
+// generating a master secret, which together comprise the primary
+// cryptographic parameters associated with a secure session. The
+// handshake protocol can also optionally authenticate parties who have
+// certificates signed by a trusted certificate authority.
+// https://tools.ietf.org/html/rfc5246#section-7.3
+type Handshake struct {
+ Header Header
+ Message Message
+}
+
+// ContentType returns what kind of content this message is carying
+func (h Handshake) ContentType() protocol.ContentType {
+ return protocol.ContentTypeHandshake
+}
+
+// Marshal encodes a handshake into a binary message
+func (h *Handshake) Marshal() ([]byte, error) {
+ if h.Message == nil {
+ return nil, errHandshakeMessageUnset
+ } else if h.Header.FragmentOffset != 0 {
+ return nil, errUnableToMarshalFragmented
+ }
+
+ msg, err := h.Message.Marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ h.Header.Length = uint32(len(msg))
+ h.Header.FragmentLength = h.Header.Length
+ h.Header.Type = h.Message.Type()
+ header, err := h.Header.Marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ return append(header, msg...), nil
+}
+
+// Unmarshal decodes a handshake from a binary message
+func (h *Handshake) Unmarshal(data []byte) error {
+ if err := h.Header.Unmarshal(data); err != nil {
+ return err
+ }
+
+ reportedLen := util.BigEndianUint24(data[1:])
+ if uint32(len(data)-HeaderLength) != reportedLen {
+ return errLengthMismatch
+ } else if reportedLen != h.Header.FragmentLength {
+ return errLengthMismatch
+ }
+
+ switch Type(data[0]) {
+ case TypeHelloRequest:
+ return errNotImplemented
+ case TypeClientHello:
+ h.Message = &MessageClientHello{}
+ case TypeHelloVerifyRequest:
+ h.Message = &MessageHelloVerifyRequest{}
+ case TypeServerHello:
+ h.Message = &MessageServerHello{}
+ case TypeCertificate:
+ h.Message = &MessageCertificate{}
+ case TypeServerKeyExchange:
+ h.Message = &MessageServerKeyExchange{}
+ case TypeCertificateRequest:
+ h.Message = &MessageCertificateRequest{}
+ case TypeServerHelloDone:
+ h.Message = &MessageServerHelloDone{}
+ case TypeClientKeyExchange:
+ h.Message = &MessageClientKeyExchange{}
+ case TypeFinished:
+ h.Message = &MessageFinished{}
+ case TypeCertificateVerify:
+ h.Message = &MessageCertificateVerify{}
+ default:
+ return errNotImplemented
+ }
+ return h.Message.Unmarshal(data[HeaderLength:])
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/header.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/header.go
new file mode 100644
index 0000000..cb6a224
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/header.go
@@ -0,0 +1,50 @@
+package handshake
+
+import (
+ "encoding/binary"
+
+ "github.com/pion/dtls/v2/internal/util"
+)
+
+// HeaderLength msg_len for Handshake messages assumes an extra
+// 12 bytes for sequence, fragment and version information vs TLS
+const HeaderLength = 12
+
+// Header is the static first 12 bytes of each RecordLayer
+// of type Handshake. These fields allow us to support message loss, reordering, and
+// message fragmentation,
+//
+// https://tools.ietf.org/html/rfc6347#section-4.2.2
+type Header struct {
+ Type Type
+ Length uint32 // uint24 in spec
+ MessageSequence uint16
+ FragmentOffset uint32 // uint24 in spec
+ FragmentLength uint32 // uint24 in spec
+}
+
+// Marshal encodes the Header
+func (h *Header) Marshal() ([]byte, error) {
+ out := make([]byte, HeaderLength)
+
+ out[0] = byte(h.Type)
+ util.PutBigEndianUint24(out[1:], h.Length)
+ binary.BigEndian.PutUint16(out[4:], h.MessageSequence)
+ util.PutBigEndianUint24(out[6:], h.FragmentOffset)
+ util.PutBigEndianUint24(out[9:], h.FragmentLength)
+ return out, nil
+}
+
+// Unmarshal populates the header from encoded data
+func (h *Header) Unmarshal(data []byte) error {
+ if len(data) < HeaderLength {
+ return errBufferTooSmall
+ }
+
+ h.Type = Type(data[0])
+ h.Length = util.BigEndianUint24(data[1:])
+ h.MessageSequence = binary.BigEndian.Uint16(data[4:])
+ h.FragmentOffset = util.BigEndianUint24(data[6:])
+ h.FragmentLength = util.BigEndianUint24(data[9:])
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_certificate.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_certificate.go
new file mode 100644
index 0000000..05fb746
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_certificate.go
@@ -0,0 +1,66 @@
+package handshake
+
+import (
+ "github.com/pion/dtls/v2/internal/util"
+)
+
+// MessageCertificate is a DTLS Handshake Message
+// it can contain either a Client or Server Certificate
+//
+// https://tools.ietf.org/html/rfc5246#section-7.4.2
+type MessageCertificate struct {
+ Certificate [][]byte
+}
+
+// Type returns the Handshake Type
+func (m MessageCertificate) Type() Type {
+ return TypeCertificate
+}
+
+const (
+ handshakeMessageCertificateLengthFieldSize = 3
+)
+
+// Marshal encodes the Handshake
+func (m *MessageCertificate) Marshal() ([]byte, error) {
+ out := make([]byte, handshakeMessageCertificateLengthFieldSize)
+
+ for _, r := range m.Certificate {
+ // Certificate Length
+ out = append(out, make([]byte, handshakeMessageCertificateLengthFieldSize)...)
+ util.PutBigEndianUint24(out[len(out)-handshakeMessageCertificateLengthFieldSize:], uint32(len(r)))
+
+ // Certificate body
+ out = append(out, append([]byte{}, r...)...)
+ }
+
+ // Total Payload Size
+ util.PutBigEndianUint24(out[0:], uint32(len(out[handshakeMessageCertificateLengthFieldSize:])))
+ return out, nil
+}
+
+// Unmarshal populates the message from encoded data
+func (m *MessageCertificate) Unmarshal(data []byte) error {
+ if len(data) < handshakeMessageCertificateLengthFieldSize {
+ return errBufferTooSmall
+ }
+
+ if certificateBodyLen := int(util.BigEndianUint24(data)); certificateBodyLen+handshakeMessageCertificateLengthFieldSize != len(data) {
+ return errLengthMismatch
+ }
+
+ offset := handshakeMessageCertificateLengthFieldSize
+ for offset < len(data) {
+ certificateLen := int(util.BigEndianUint24(data[offset:]))
+ offset += handshakeMessageCertificateLengthFieldSize
+
+ if offset+certificateLen > len(data) {
+ return errLengthMismatch
+ }
+
+ m.Certificate = append(m.Certificate, append([]byte{}, data[offset:offset+certificateLen]...))
+ offset += certificateLen
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_certificate_request.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_certificate_request.go
new file mode 100644
index 0000000..e711f39
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_certificate_request.go
@@ -0,0 +1,100 @@
+package handshake
+
+import (
+ "encoding/binary"
+
+ "github.com/pion/dtls/v2/pkg/crypto/clientcertificate"
+ "github.com/pion/dtls/v2/pkg/crypto/hash"
+ "github.com/pion/dtls/v2/pkg/crypto/signature"
+ "github.com/pion/dtls/v2/pkg/crypto/signaturehash"
+)
+
+/*
+MessageCertificateRequest is so a non-anonymous server can optionally
+request a certificate from the client, if appropriate for the selected cipher
+suite. This message, if sent, will immediately follow the ServerKeyExchange
+message (if it is sent; otherwise, this message follows the
+server's Certificate message).
+
+https://tools.ietf.org/html/rfc5246#section-7.4.4
+*/
+type MessageCertificateRequest struct {
+ CertificateTypes []clientcertificate.Type
+ SignatureHashAlgorithms []signaturehash.Algorithm
+}
+
+const (
+ messageCertificateRequestMinLength = 5
+)
+
+// Type returns the Handshake Type
+func (m MessageCertificateRequest) Type() Type {
+ return TypeCertificateRequest
+}
+
+// Marshal encodes the Handshake
+func (m *MessageCertificateRequest) Marshal() ([]byte, error) {
+ out := []byte{byte(len(m.CertificateTypes))}
+ for _, v := range m.CertificateTypes {
+ out = append(out, byte(v))
+ }
+
+ out = append(out, []byte{0x00, 0x00}...)
+ binary.BigEndian.PutUint16(out[len(out)-2:], uint16(len(m.SignatureHashAlgorithms)*2))
+ for _, v := range m.SignatureHashAlgorithms {
+ out = append(out, byte(v.Hash))
+ out = append(out, byte(v.Signature))
+ }
+
+ out = append(out, []byte{0x00, 0x00}...) // Distinguished Names Length
+ return out, nil
+}
+
+// Unmarshal populates the message from encoded data
+func (m *MessageCertificateRequest) Unmarshal(data []byte) error {
+ if len(data) < messageCertificateRequestMinLength {
+ return errBufferTooSmall
+ }
+
+ offset := 0
+ certificateTypesLength := int(data[0])
+ offset++
+
+ if (offset + certificateTypesLength) > len(data) {
+ return errBufferTooSmall
+ }
+
+ for i := 0; i < certificateTypesLength; i++ {
+ certType := clientcertificate.Type(data[offset+i])
+ if _, ok := clientcertificate.Types()[certType]; ok {
+ m.CertificateTypes = append(m.CertificateTypes, certType)
+ }
+ }
+ offset += certificateTypesLength
+ if len(data) < offset+2 {
+ return errBufferTooSmall
+ }
+ signatureHashAlgorithmsLength := int(binary.BigEndian.Uint16(data[offset:]))
+ offset += 2
+
+ if (offset + signatureHashAlgorithmsLength) > len(data) {
+ return errBufferTooSmall
+ }
+
+ for i := 0; i < signatureHashAlgorithmsLength; i += 2 {
+ if len(data) < (offset + i + 2) {
+ return errBufferTooSmall
+ }
+ h := hash.Algorithm(data[offset+i])
+ s := signature.Algorithm(data[offset+i+1])
+
+ if _, ok := hash.Algorithms()[h]; !ok {
+ continue
+ } else if _, ok := signature.Algorithms()[s]; !ok {
+ continue
+ }
+ m.SignatureHashAlgorithms = append(m.SignatureHashAlgorithms, signaturehash.Algorithm{Signature: s, Hash: h})
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_certificate_verify.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_certificate_verify.go
new file mode 100644
index 0000000..fb5e463
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_certificate_verify.go
@@ -0,0 +1,61 @@
+package handshake
+
+import (
+ "encoding/binary"
+
+ "github.com/pion/dtls/v2/pkg/crypto/hash"
+ "github.com/pion/dtls/v2/pkg/crypto/signature"
+)
+
+// MessageCertificateVerify provide explicit verification of a
+// client certificate.
+//
+// https://tools.ietf.org/html/rfc5246#section-7.4.8
+type MessageCertificateVerify struct {
+ HashAlgorithm hash.Algorithm
+ SignatureAlgorithm signature.Algorithm
+ Signature []byte
+}
+
+const handshakeMessageCertificateVerifyMinLength = 4
+
+// Type returns the Handshake Type
+func (m MessageCertificateVerify) Type() Type {
+ return TypeCertificateVerify
+}
+
+// Marshal encodes the Handshake
+func (m *MessageCertificateVerify) Marshal() ([]byte, error) {
+ out := make([]byte, 1+1+2+len(m.Signature))
+
+ out[0] = byte(m.HashAlgorithm)
+ out[1] = byte(m.SignatureAlgorithm)
+ binary.BigEndian.PutUint16(out[2:], uint16(len(m.Signature)))
+ copy(out[4:], m.Signature)
+ return out, nil
+}
+
+// Unmarshal populates the message from encoded data
+func (m *MessageCertificateVerify) Unmarshal(data []byte) error {
+ if len(data) < handshakeMessageCertificateVerifyMinLength {
+ return errBufferTooSmall
+ }
+
+ m.HashAlgorithm = hash.Algorithm(data[0])
+ if _, ok := hash.Algorithms()[m.HashAlgorithm]; !ok {
+ return errInvalidHashAlgorithm
+ }
+
+ m.SignatureAlgorithm = signature.Algorithm(data[1])
+ if _, ok := signature.Algorithms()[m.SignatureAlgorithm]; !ok {
+ return errInvalidSignatureAlgorithm
+ }
+
+ signatureLength := int(binary.BigEndian.Uint16(data[2:]))
+ if (signatureLength + 4) != len(data) {
+ return errBufferTooSmall
+ }
+
+ m.Signature = append([]byte{}, data[4:]...)
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_client_hello.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_client_hello.go
new file mode 100644
index 0000000..cb8a100
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_client_hello.go
@@ -0,0 +1,125 @@
+package handshake
+
+import (
+ "encoding/binary"
+
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/extension"
+)
+
+/*
+MessageClientHello is for when a client first connects to a server it is
+required to send the client hello as its first message. The client can also send a
+client hello in response to a hello request or on its own
+initiative in order to renegotiate the security parameters in an
+existing connection.
+*/
+type MessageClientHello struct {
+ Version protocol.Version
+ Random Random
+ Cookie []byte
+
+ CipherSuiteIDs []uint16
+ CompressionMethods []*protocol.CompressionMethod
+ Extensions []extension.Extension
+}
+
+const handshakeMessageClientHelloVariableWidthStart = 34
+
+// Type returns the Handshake Type
+func (m MessageClientHello) Type() Type {
+ return TypeClientHello
+}
+
+// Marshal encodes the Handshake
+func (m *MessageClientHello) Marshal() ([]byte, error) {
+ if len(m.Cookie) > 255 {
+ return nil, errCookieTooLong
+ }
+
+ out := make([]byte, handshakeMessageClientHelloVariableWidthStart)
+ out[0] = m.Version.Major
+ out[1] = m.Version.Minor
+
+ rand := m.Random.MarshalFixed()
+ copy(out[2:], rand[:])
+
+ out = append(out, 0x00) // SessionID
+
+ out = append(out, byte(len(m.Cookie)))
+ out = append(out, m.Cookie...)
+ out = append(out, encodeCipherSuiteIDs(m.CipherSuiteIDs)...)
+ out = append(out, protocol.EncodeCompressionMethods(m.CompressionMethods)...)
+
+ extensions, err := extension.Marshal(m.Extensions)
+ if err != nil {
+ return nil, err
+ }
+
+ return append(out, extensions...), nil
+}
+
+// Unmarshal populates the message from encoded data
+func (m *MessageClientHello) Unmarshal(data []byte) error {
+ if len(data) < 2+RandomLength {
+ return errBufferTooSmall
+ }
+
+ m.Version.Major = data[0]
+ m.Version.Minor = data[1]
+
+ var random [RandomLength]byte
+ copy(random[:], data[2:])
+ m.Random.UnmarshalFixed(random)
+
+ // rest of packet has variable width sections
+ currOffset := handshakeMessageClientHelloVariableWidthStart
+ currOffset += int(data[currOffset]) + 1 // SessionID
+
+ currOffset++
+ if len(data) <= currOffset {
+ return errBufferTooSmall
+ }
+ n := int(data[currOffset-1])
+ if len(data) <= currOffset+n {
+ return errBufferTooSmall
+ }
+ m.Cookie = append([]byte{}, data[currOffset:currOffset+n]...)
+ currOffset += len(m.Cookie)
+
+ // Cipher Suites
+ if len(data) < currOffset {
+ return errBufferTooSmall
+ }
+ cipherSuiteIDs, err := decodeCipherSuiteIDs(data[currOffset:])
+ if err != nil {
+ return err
+ }
+ m.CipherSuiteIDs = cipherSuiteIDs
+ if len(data) < currOffset+2 {
+ return errBufferTooSmall
+ }
+ currOffset += int(binary.BigEndian.Uint16(data[currOffset:])) + 2
+
+ // Compression Methods
+ if len(data) < currOffset {
+ return errBufferTooSmall
+ }
+ compressionMethods, err := protocol.DecodeCompressionMethods(data[currOffset:])
+ if err != nil {
+ return err
+ }
+ m.CompressionMethods = compressionMethods
+ if len(data) < currOffset {
+ return errBufferTooSmall
+ }
+ currOffset += int(data[currOffset]) + 1
+
+ // Extensions
+ extensions, err := extension.Unmarshal(data[currOffset:])
+ if err != nil {
+ return err
+ }
+ m.Extensions = extensions
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_client_key_exchange.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_client_key_exchange.go
new file mode 100644
index 0000000..f8fc369
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_client_key_exchange.go
@@ -0,0 +1,56 @@
+package handshake
+
+import (
+ "encoding/binary"
+)
+
+// MessageClientKeyExchange is a DTLS Handshake Message
+// With this message, the premaster secret is set, either by direct
+// transmission of the RSA-encrypted secret or by the transmission of
+// Diffie-Hellman parameters that will allow each side to agree upon
+// the same premaster secret.
+//
+// https://tools.ietf.org/html/rfc5246#section-7.4.7
+type MessageClientKeyExchange struct {
+ IdentityHint []byte
+ PublicKey []byte
+}
+
+// Type returns the Handshake Type
+func (m MessageClientKeyExchange) Type() Type {
+ return TypeClientKeyExchange
+}
+
+// Marshal encodes the Handshake
+func (m *MessageClientKeyExchange) Marshal() ([]byte, error) {
+ switch {
+ case (m.IdentityHint != nil && m.PublicKey != nil) || (m.IdentityHint == nil && m.PublicKey == nil):
+ return nil, errInvalidClientKeyExchange
+ case m.PublicKey != nil:
+ return append([]byte{byte(len(m.PublicKey))}, m.PublicKey...), nil
+ default:
+ out := append([]byte{0x00, 0x00}, m.IdentityHint...)
+ binary.BigEndian.PutUint16(out, uint16(len(out)-2))
+ return out, nil
+ }
+}
+
+// Unmarshal populates the message from encoded data
+func (m *MessageClientKeyExchange) Unmarshal(data []byte) error {
+ if len(data) < 2 {
+ return errBufferTooSmall
+ }
+
+ // If parsed as PSK return early and only populate PSK Identity Hint
+ if pskLength := binary.BigEndian.Uint16(data); len(data) == int(pskLength+2) {
+ m.IdentityHint = append([]byte{}, data[2:]...)
+ return nil
+ }
+
+ if publicKeyLength := int(data[0]); len(data) != publicKeyLength+1 {
+ return errBufferTooSmall
+ }
+
+ m.PublicKey = append([]byte{}, data[1:]...)
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_finished.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_finished.go
new file mode 100644
index 0000000..c65d42a
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_finished.go
@@ -0,0 +1,27 @@
+package handshake
+
+// MessageFinished is a DTLS Handshake Message
+// this message is the first one protected with the just
+// negotiated algorithms, keys, and secrets. Recipients of Finished
+// messages MUST verify that the contents are correct.
+//
+// https://tools.ietf.org/html/rfc5246#section-7.4.9
+type MessageFinished struct {
+ VerifyData []byte
+}
+
+// Type returns the Handshake Type
+func (m MessageFinished) Type() Type {
+ return TypeFinished
+}
+
+// Marshal encodes the Handshake
+func (m *MessageFinished) Marshal() ([]byte, error) {
+ return append([]byte{}, m.VerifyData...), nil
+}
+
+// Unmarshal populates the message from encoded data
+func (m *MessageFinished) Unmarshal(data []byte) error {
+ m.VerifyData = append([]byte{}, data...)
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_hello_verify_request.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_hello_verify_request.go
new file mode 100644
index 0000000..ef834dc
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_hello_verify_request.go
@@ -0,0 +1,62 @@
+package handshake
+
+import (
+ "github.com/pion/dtls/v2/pkg/protocol"
+)
+
+// MessageHelloVerifyRequest is as follows:
+//
+// struct {
+// ProtocolVersion server_version;
+// opaque cookie<0..2^8-1>;
+// } HelloVerifyRequest;
+//
+// The HelloVerifyRequest message type is hello_verify_request(3).
+//
+// When the client sends its ClientHello message to the server, the server
+// MAY respond with a HelloVerifyRequest message. This message contains
+// a stateless cookie generated using the technique of [PHOTURIS]. The
+// client MUST retransmit the ClientHello with the cookie added.
+//
+// https://tools.ietf.org/html/rfc6347#section-4.2.1
+type MessageHelloVerifyRequest struct {
+ Version protocol.Version
+ Cookie []byte
+}
+
+// Type returns the Handshake Type
+func (m MessageHelloVerifyRequest) Type() Type {
+ return TypeHelloVerifyRequest
+}
+
+// Marshal encodes the Handshake
+func (m *MessageHelloVerifyRequest) Marshal() ([]byte, error) {
+ if len(m.Cookie) > 255 {
+ return nil, errCookieTooLong
+ }
+
+ out := make([]byte, 3+len(m.Cookie))
+ out[0] = m.Version.Major
+ out[1] = m.Version.Minor
+ out[2] = byte(len(m.Cookie))
+ copy(out[3:], m.Cookie)
+
+ return out, nil
+}
+
+// Unmarshal populates the message from encoded data
+func (m *MessageHelloVerifyRequest) Unmarshal(data []byte) error {
+ if len(data) < 3 {
+ return errBufferTooSmall
+ }
+ m.Version.Major = data[0]
+ m.Version.Minor = data[1]
+ cookieLength := data[2]
+ if len(data) < (int(cookieLength) + 3) {
+ return errBufferTooSmall
+ }
+ m.Cookie = make([]byte, cookieLength)
+
+ copy(m.Cookie, data[3:3+cookieLength])
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_server_hello.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_server_hello.go
new file mode 100644
index 0000000..c4b181f
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_server_hello.go
@@ -0,0 +1,106 @@
+package handshake
+
+import (
+ "encoding/binary"
+
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/extension"
+)
+
+// MessageServerHello is sent in response to a ClientHello
+// message when it was able to find an acceptable set of algorithms.
+// If it cannot find such a match, it will respond with a handshake
+// failure alert.
+//
+// https://tools.ietf.org/html/rfc5246#section-7.4.1.3
+type MessageServerHello struct {
+ Version protocol.Version
+ Random Random
+
+ CipherSuiteID *uint16
+ CompressionMethod *protocol.CompressionMethod
+ Extensions []extension.Extension
+}
+
+const messageServerHelloVariableWidthStart = 2 + RandomLength
+
+// Type returns the Handshake Type
+func (m MessageServerHello) Type() Type {
+ return TypeServerHello
+}
+
+// Marshal encodes the Handshake
+func (m *MessageServerHello) Marshal() ([]byte, error) {
+ if m.CipherSuiteID == nil {
+ return nil, errCipherSuiteUnset
+ } else if m.CompressionMethod == nil {
+ return nil, errCompressionMethodUnset
+ }
+
+ out := make([]byte, messageServerHelloVariableWidthStart)
+ out[0] = m.Version.Major
+ out[1] = m.Version.Minor
+
+ rand := m.Random.MarshalFixed()
+ copy(out[2:], rand[:])
+
+ out = append(out, 0x00) // SessionID
+
+ out = append(out, []byte{0x00, 0x00}...)
+ binary.BigEndian.PutUint16(out[len(out)-2:], *m.CipherSuiteID)
+
+ out = append(out, byte(m.CompressionMethod.ID))
+
+ extensions, err := extension.Marshal(m.Extensions)
+ if err != nil {
+ return nil, err
+ }
+
+ return append(out, extensions...), nil
+}
+
+// Unmarshal populates the message from encoded data
+func (m *MessageServerHello) Unmarshal(data []byte) error {
+ if len(data) < 2+RandomLength {
+ return errBufferTooSmall
+ }
+
+ m.Version.Major = data[0]
+ m.Version.Minor = data[1]
+
+ var random [RandomLength]byte
+ copy(random[:], data[2:])
+ m.Random.UnmarshalFixed(random)
+
+ currOffset := messageServerHelloVariableWidthStart
+ currOffset += int(data[currOffset]) + 1 // SessionID
+ if len(data) < (currOffset + 2) {
+ return errBufferTooSmall
+ }
+
+ m.CipherSuiteID = new(uint16)
+ *m.CipherSuiteID = binary.BigEndian.Uint16(data[currOffset:])
+ currOffset += 2
+
+ if len(data) < currOffset {
+ return errBufferTooSmall
+ }
+ if compressionMethod, ok := protocol.CompressionMethods()[protocol.CompressionMethodID(data[currOffset])]; ok {
+ m.CompressionMethod = compressionMethod
+ currOffset++
+ } else {
+ return errInvalidCompressionMethod
+ }
+
+ if len(data) <= currOffset {
+ m.Extensions = []extension.Extension{}
+ return nil
+ }
+
+ extensions, err := extension.Unmarshal(data[currOffset:])
+ if err != nil {
+ return err
+ }
+ m.Extensions = extensions
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_server_hello_done.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_server_hello_done.go
new file mode 100644
index 0000000..a004802
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_server_hello_done.go
@@ -0,0 +1,22 @@
+package handshake
+
+// MessageServerHelloDone is final non-encrypted message from server
+// this communicates server has sent all its handshake messages and next
+// should be MessageFinished
+type MessageServerHelloDone struct {
+}
+
+// Type returns the Handshake Type
+func (m MessageServerHelloDone) Type() Type {
+ return TypeServerHelloDone
+}
+
+// Marshal encodes the Handshake
+func (m *MessageServerHelloDone) Marshal() ([]byte, error) {
+ return []byte{}, nil
+}
+
+// Unmarshal populates the message from encoded data
+func (m *MessageServerHelloDone) Unmarshal(data []byte) error {
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_server_key_exchange.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_server_key_exchange.go
new file mode 100644
index 0000000..4148fe0
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/message_server_key_exchange.go
@@ -0,0 +1,119 @@
+package handshake
+
+import (
+ "encoding/binary"
+
+ "github.com/pion/dtls/v2/pkg/crypto/elliptic"
+ "github.com/pion/dtls/v2/pkg/crypto/hash"
+ "github.com/pion/dtls/v2/pkg/crypto/signature"
+)
+
+// MessageServerKeyExchange supports ECDH and PSK
+type MessageServerKeyExchange struct {
+ IdentityHint []byte
+
+ EllipticCurveType elliptic.CurveType
+ NamedCurve elliptic.Curve
+ PublicKey []byte
+ HashAlgorithm hash.Algorithm
+ SignatureAlgorithm signature.Algorithm
+ Signature []byte
+}
+
+// Type returns the Handshake Type
+func (m MessageServerKeyExchange) Type() Type {
+ return TypeServerKeyExchange
+}
+
+// Marshal encodes the Handshake
+func (m *MessageServerKeyExchange) Marshal() ([]byte, error) {
+ if m.IdentityHint != nil {
+ out := append([]byte{0x00, 0x00}, m.IdentityHint...)
+ binary.BigEndian.PutUint16(out, uint16(len(out)-2))
+ return out, nil
+ }
+
+ out := []byte{byte(m.EllipticCurveType), 0x00, 0x00}
+ binary.BigEndian.PutUint16(out[1:], uint16(m.NamedCurve))
+
+ out = append(out, byte(len(m.PublicKey)))
+ out = append(out, m.PublicKey...)
+
+ if m.HashAlgorithm == hash.None && m.SignatureAlgorithm == signature.Anonymous && len(m.Signature) == 0 {
+ return out, nil
+ }
+
+ out = append(out, []byte{byte(m.HashAlgorithm), byte(m.SignatureAlgorithm), 0x00, 0x00}...)
+ binary.BigEndian.PutUint16(out[len(out)-2:], uint16(len(m.Signature)))
+ out = append(out, m.Signature...)
+
+ return out, nil
+}
+
+// Unmarshal populates the message from encoded data
+func (m *MessageServerKeyExchange) Unmarshal(data []byte) error {
+ if len(data) < 2 {
+ return errBufferTooSmall
+ }
+
+ // If parsed as PSK return early and only populate PSK Identity Hint
+ if pskLength := binary.BigEndian.Uint16(data); len(data) == int(pskLength+2) {
+ m.IdentityHint = append([]byte{}, data[2:]...)
+ return nil
+ }
+
+ if _, ok := elliptic.CurveTypes()[elliptic.CurveType(data[0])]; ok {
+ m.EllipticCurveType = elliptic.CurveType(data[0])
+ } else {
+ return errInvalidEllipticCurveType
+ }
+
+ if len(data[1:]) < 2 {
+ return errBufferTooSmall
+ }
+ m.NamedCurve = elliptic.Curve(binary.BigEndian.Uint16(data[1:3]))
+ if _, ok := elliptic.Curves()[m.NamedCurve]; !ok {
+ return errInvalidNamedCurve
+ }
+ if len(data) < 4 {
+ return errBufferTooSmall
+ }
+
+ publicKeyLength := int(data[3])
+ offset := 4 + publicKeyLength
+ if len(data) < offset {
+ return errBufferTooSmall
+ }
+ m.PublicKey = append([]byte{}, data[4:offset]...)
+
+ // Anon connection doesn't contains hashAlgorithm, signatureAlgorithm, signature
+ if len(data) == offset {
+ return nil
+ } else if len(data) <= offset {
+ return errBufferTooSmall
+ }
+
+ m.HashAlgorithm = hash.Algorithm(data[offset])
+ if _, ok := hash.Algorithms()[m.HashAlgorithm]; !ok {
+ return errInvalidHashAlgorithm
+ }
+ offset++
+ if len(data) <= offset {
+ return errBufferTooSmall
+ }
+ m.SignatureAlgorithm = signature.Algorithm(data[offset])
+ if _, ok := signature.Algorithms()[m.SignatureAlgorithm]; !ok {
+ return errInvalidSignatureAlgorithm
+ }
+ offset++
+ if len(data) < offset+2 {
+ return errBufferTooSmall
+ }
+ signatureLength := int(binary.BigEndian.Uint16(data[offset:]))
+ offset += 2
+ if len(data) < offset+signatureLength {
+ return errBufferTooSmall
+ }
+ m.Signature = append([]byte{}, data[offset:offset+signatureLength]...)
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/random.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/random.go
new file mode 100644
index 0000000..0ade936
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/handshake/random.go
@@ -0,0 +1,49 @@
+package handshake
+
+import (
+ "crypto/rand"
+ "encoding/binary"
+ "time"
+)
+
+// Consts for Random in Handshake
+const (
+ RandomBytesLength = 28
+ RandomLength = RandomBytesLength + 4
+)
+
+// Random value that is used in ClientHello and ServerHello
+//
+// https://tools.ietf.org/html/rfc4346#section-7.4.1.2
+type Random struct {
+ GMTUnixTime time.Time
+ RandomBytes [RandomBytesLength]byte
+}
+
+// MarshalFixed encodes the Handshake
+func (r *Random) MarshalFixed() [RandomLength]byte {
+ var out [RandomLength]byte
+
+ binary.BigEndian.PutUint32(out[0:], uint32(r.GMTUnixTime.Unix()))
+ copy(out[4:], r.RandomBytes[:])
+
+ return out
+}
+
+// UnmarshalFixed populates the message from encoded data
+func (r *Random) UnmarshalFixed(data [RandomLength]byte) {
+ r.GMTUnixTime = time.Unix(int64(binary.BigEndian.Uint32(data[0:])), 0)
+ copy(r.RandomBytes[:], data[4:])
+}
+
+// Populate fills the handshakeRandom with random values
+// may be called multiple times
+func (r *Random) Populate() error {
+ r.GMTUnixTime = time.Now()
+
+ tmp := make([]byte, RandomBytesLength)
+ _, err := rand.Read(tmp)
+ copy(r.RandomBytes[:], tmp)
+
+ return err
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/recordlayer/errors.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/recordlayer/errors.go
new file mode 100644
index 0000000..7033d40
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/recordlayer/errors.go
@@ -0,0 +1,16 @@
+// Package recordlayer implements the TLS Record Layer https://tools.ietf.org/html/rfc5246#section-6
+package recordlayer
+
+import (
+ "errors"
+
+ "github.com/pion/dtls/v2/pkg/protocol"
+)
+
+var (
+ errBufferTooSmall = &protocol.TemporaryError{Err: errors.New("buffer is too small")} //nolint:goerr113
+ errInvalidPacketLength = &protocol.TemporaryError{Err: errors.New("packet length and declared length do not match")} //nolint:goerr113
+ errSequenceNumberOverflow = &protocol.InternalError{Err: errors.New("sequence number overflow")} //nolint:goerr113
+ errUnsupportedProtocolVersion = &protocol.FatalError{Err: errors.New("unsupported protocol version")} //nolint:goerr113
+ errInvalidContentType = &protocol.TemporaryError{Err: errors.New("invalid content type")} //nolint:goerr113
+)
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/recordlayer/header.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/recordlayer/header.go
new file mode 100644
index 0000000..65047d7
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/recordlayer/header.go
@@ -0,0 +1,61 @@
+package recordlayer
+
+import (
+ "encoding/binary"
+
+ "github.com/pion/dtls/v2/internal/util"
+ "github.com/pion/dtls/v2/pkg/protocol"
+)
+
+// Header implements a TLS RecordLayer header
+type Header struct {
+ ContentType protocol.ContentType
+ ContentLen uint16
+ Version protocol.Version
+ Epoch uint16
+ SequenceNumber uint64 // uint48 in spec
+}
+
+// RecordLayer enums
+const (
+ HeaderSize = 13
+ MaxSequenceNumber = 0x0000FFFFFFFFFFFF
+)
+
+// Marshal encodes a TLS RecordLayer Header to binary
+func (h *Header) Marshal() ([]byte, error) {
+ if h.SequenceNumber > MaxSequenceNumber {
+ return nil, errSequenceNumberOverflow
+ }
+
+ out := make([]byte, HeaderSize)
+ out[0] = byte(h.ContentType)
+ out[1] = h.Version.Major
+ out[2] = h.Version.Minor
+ binary.BigEndian.PutUint16(out[3:], h.Epoch)
+ util.PutBigEndianUint48(out[5:], h.SequenceNumber)
+ binary.BigEndian.PutUint16(out[HeaderSize-2:], h.ContentLen)
+ return out, nil
+}
+
+// Unmarshal populates a TLS RecordLayer Header from binary
+func (h *Header) Unmarshal(data []byte) error {
+ if len(data) < HeaderSize {
+ return errBufferTooSmall
+ }
+ h.ContentType = protocol.ContentType(data[0])
+ h.Version.Major = data[1]
+ h.Version.Minor = data[2]
+ h.Epoch = binary.BigEndian.Uint16(data[3:])
+
+ // SequenceNumber is stored as uint48, make into uint64
+ seqCopy := make([]byte, 8)
+ copy(seqCopy[2:], data[5:11])
+ h.SequenceNumber = binary.BigEndian.Uint64(seqCopy)
+
+ if !h.Version.Equal(protocol.Version1_0) && !h.Version.Equal(protocol.Version1_2) {
+ return errUnsupportedProtocolVersion
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/recordlayer/recordlayer.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/recordlayer/recordlayer.go
new file mode 100644
index 0000000..67e5a72
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/recordlayer/recordlayer.go
@@ -0,0 +1,99 @@
+package recordlayer
+
+import (
+ "encoding/binary"
+
+ "github.com/pion/dtls/v2/pkg/protocol"
+ "github.com/pion/dtls/v2/pkg/protocol/alert"
+ "github.com/pion/dtls/v2/pkg/protocol/handshake"
+)
+
+// RecordLayer which handles all data transport.
+// The record layer is assumed to sit directly on top of some
+// reliable transport such as TCP. The record layer can carry four types of content:
+//
+// 1. Handshake messages—used for algorithm negotiation and key establishment.
+// 2. ChangeCipherSpec messages—really part of the handshake but technically a separate kind of message.
+// 3. Alert messages—used to signal that errors have occurred
+// 4. Application layer data
+//
+// The DTLS record layer is extremely similar to that of TLS 1.1. The
+// only change is the inclusion of an explicit sequence number in the
+// record. This sequence number allows the recipient to correctly
+// verify the TLS MAC.
+//
+// https://tools.ietf.org/html/rfc4347#section-4.1
+type RecordLayer struct {
+ Header Header
+ Content protocol.Content
+}
+
+// Marshal encodes the RecordLayer to binary
+func (r *RecordLayer) Marshal() ([]byte, error) {
+ contentRaw, err := r.Content.Marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ r.Header.ContentLen = uint16(len(contentRaw))
+ r.Header.ContentType = r.Content.ContentType()
+
+ headerRaw, err := r.Header.Marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ return append(headerRaw, contentRaw...), nil
+}
+
+// Unmarshal populates the RecordLayer from binary
+func (r *RecordLayer) Unmarshal(data []byte) error {
+ if len(data) < HeaderSize {
+ return errBufferTooSmall
+ }
+ if err := r.Header.Unmarshal(data); err != nil {
+ return err
+ }
+
+ switch protocol.ContentType(data[0]) {
+ case protocol.ContentTypeChangeCipherSpec:
+ r.Content = &protocol.ChangeCipherSpec{}
+ case protocol.ContentTypeAlert:
+ r.Content = &alert.Alert{}
+ case protocol.ContentTypeHandshake:
+ r.Content = &handshake.Handshake{}
+ case protocol.ContentTypeApplicationData:
+ r.Content = &protocol.ApplicationData{}
+ default:
+ return errInvalidContentType
+ }
+
+ return r.Content.Unmarshal(data[HeaderSize:])
+}
+
+// UnpackDatagram extracts all RecordLayer messages from a single datagram.
+// Note that as with TLS, multiple handshake messages may be placed in
+// the same DTLS record, provided that there is room and that they are
+// part of the same flight. Thus, there are two acceptable ways to pack
+// two DTLS messages into the same datagram: in the same record or in
+// separate records.
+// https://tools.ietf.org/html/rfc6347#section-4.2.3
+func UnpackDatagram(buf []byte) ([][]byte, error) {
+ out := [][]byte{}
+
+ for offset := 0; len(buf) != offset; {
+ if len(buf)-offset <= HeaderSize {
+ return nil, errInvalidPacketLength
+ }
+
+ pktLen := (HeaderSize + int(binary.BigEndian.Uint16(buf[offset+11:])))
+ if offset+pktLen > len(buf) {
+ return nil, errInvalidPacketLength
+ }
+
+ out = append(out, buf[offset:offset+pktLen])
+ offset += pktLen
+ }
+
+ return out, nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/pkg/protocol/version.go b/vendor/github.com/pion/dtls/v2/pkg/protocol/version.go
new file mode 100644
index 0000000..d5ddb1d
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/pkg/protocol/version.go
@@ -0,0 +1,21 @@
+// Package protocol provides the DTLS wire format
+package protocol
+
+// Version enums
+var (
+ Version1_0 = Version{Major: 0xfe, Minor: 0xff} //nolint:gochecknoglobals
+ Version1_2 = Version{Major: 0xfe, Minor: 0xfd} //nolint:gochecknoglobals
+)
+
+// Version is the minor/major value in the RecordLayer
+// and ClientHello/ServerHello
+//
+// https://tools.ietf.org/html/rfc4346#section-6.2.1
+type Version struct {
+ Major, Minor uint8
+}
+
+// Equal determines if two protocol versions are equal
+func (v Version) Equal(x Version) bool {
+ return v.Major == x.Major && v.Minor == x.Minor
+}
diff --git a/vendor/github.com/pion/dtls/v2/renovate.json b/vendor/github.com/pion/dtls/v2/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/dtls/v2/resume.go b/vendor/github.com/pion/dtls/v2/resume.go
new file mode 100644
index 0000000..40e55e4
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/resume.go
@@ -0,0 +1,19 @@
+package dtls
+
+import (
+ "context"
+ "net"
+)
+
+// Resume imports an already established dtls connection using a specific dtls state
+func Resume(state *State, conn net.Conn, config *Config) (*Conn, error) {
+ if err := state.initCipherSuite(); err != nil {
+ return nil, err
+ }
+ c, err := createConn(context.Background(), conn, config, state.isClient, state)
+ if err != nil {
+ return nil, err
+ }
+
+ return c, nil
+}
diff --git a/vendor/github.com/pion/dtls/v2/srtp_protection_profile.go b/vendor/github.com/pion/dtls/v2/srtp_protection_profile.go
new file mode 100644
index 0000000..1c3ae55
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/srtp_protection_profile.go
@@ -0,0 +1,14 @@
+package dtls
+
+import "github.com/pion/dtls/v2/pkg/protocol/extension"
+
+// SRTPProtectionProfile defines the parameters and options that are in effect for the SRTP processing
+// https://tools.ietf.org/html/rfc5764#section-4.1.2
+type SRTPProtectionProfile = extension.SRTPProtectionProfile
+
+const (
+ SRTP_AES128_CM_HMAC_SHA1_80 SRTPProtectionProfile = extension.SRTP_AES128_CM_HMAC_SHA1_80 // nolint
+ SRTP_AES128_CM_HMAC_SHA1_32 SRTPProtectionProfile = extension.SRTP_AES128_CM_HMAC_SHA1_32 // nolint
+ SRTP_AEAD_AES_128_GCM SRTPProtectionProfile = extension.SRTP_AEAD_AES_128_GCM // nolint
+ SRTP_AEAD_AES_256_GCM SRTPProtectionProfile = extension.SRTP_AEAD_AES_256_GCM // nolint
+)
diff --git a/vendor/github.com/pion/dtls/v2/state.go b/vendor/github.com/pion/dtls/v2/state.go
new file mode 100644
index 0000000..53fca6a
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/state.go
@@ -0,0 +1,194 @@
+package dtls
+
+import (
+ "bytes"
+ "encoding/gob"
+ "sync/atomic"
+
+ "github.com/pion/dtls/v2/pkg/crypto/elliptic"
+ "github.com/pion/dtls/v2/pkg/crypto/prf"
+ "github.com/pion/dtls/v2/pkg/protocol/handshake"
+ "github.com/pion/transport/replaydetector"
+)
+
+// State holds the dtls connection state and implements both encoding.BinaryMarshaler and encoding.BinaryUnmarshaler
+type State struct {
+ localEpoch, remoteEpoch atomic.Value
+ localSequenceNumber []uint64 // uint48
+ localRandom, remoteRandom handshake.Random
+ masterSecret []byte
+ cipherSuite CipherSuite // nil if a cipherSuite hasn't been chosen
+
+ srtpProtectionProfile SRTPProtectionProfile // Negotiated SRTPProtectionProfile
+ PeerCertificates [][]byte
+ IdentityHint []byte
+
+ isClient bool
+
+ preMasterSecret []byte
+ extendedMasterSecret bool
+
+ namedCurve elliptic.Curve
+ localKeypair *elliptic.Keypair
+ cookie []byte
+ handshakeSendSequence int
+ handshakeRecvSequence int
+ serverName string
+ remoteRequestedCertificate bool // Did we get a CertificateRequest
+ localCertificatesVerify []byte // cache CertificateVerify
+ localVerifyData []byte // cached VerifyData
+ localKeySignature []byte // cached keySignature
+ peerCertificatesVerified bool
+
+ replayDetector []replaydetector.ReplayDetector
+}
+
+type serializedState struct {
+ LocalEpoch uint16
+ RemoteEpoch uint16
+ LocalRandom [handshake.RandomLength]byte
+ RemoteRandom [handshake.RandomLength]byte
+ CipherSuiteID uint16
+ MasterSecret []byte
+ SequenceNumber uint64
+ SRTPProtectionProfile uint16
+ PeerCertificates [][]byte
+ IdentityHint []byte
+ IsClient bool
+}
+
+func (s *State) clone() *State {
+ serialized := s.serialize()
+ state := &State{}
+ state.deserialize(*serialized)
+
+ return state
+}
+
+func (s *State) serialize() *serializedState {
+ // Marshal random values
+ localRnd := s.localRandom.MarshalFixed()
+ remoteRnd := s.remoteRandom.MarshalFixed()
+
+ epoch := s.localEpoch.Load().(uint16)
+ return &serializedState{
+ LocalEpoch: epoch,
+ RemoteEpoch: s.remoteEpoch.Load().(uint16),
+ CipherSuiteID: uint16(s.cipherSuite.ID()),
+ MasterSecret: s.masterSecret,
+ SequenceNumber: atomic.LoadUint64(&s.localSequenceNumber[epoch]),
+ LocalRandom: localRnd,
+ RemoteRandom: remoteRnd,
+ SRTPProtectionProfile: uint16(s.srtpProtectionProfile),
+ PeerCertificates: s.PeerCertificates,
+ IdentityHint: s.IdentityHint,
+ IsClient: s.isClient,
+ }
+}
+
+func (s *State) deserialize(serialized serializedState) {
+ // Set epoch values
+ epoch := serialized.LocalEpoch
+ s.localEpoch.Store(serialized.LocalEpoch)
+ s.remoteEpoch.Store(serialized.RemoteEpoch)
+
+ for len(s.localSequenceNumber) <= int(epoch) {
+ s.localSequenceNumber = append(s.localSequenceNumber, uint64(0))
+ }
+
+ // Set random values
+ localRandom := &handshake.Random{}
+ localRandom.UnmarshalFixed(serialized.LocalRandom)
+ s.localRandom = *localRandom
+
+ remoteRandom := &handshake.Random{}
+ remoteRandom.UnmarshalFixed(serialized.RemoteRandom)
+ s.remoteRandom = *remoteRandom
+
+ s.isClient = serialized.IsClient
+
+ // Set master secret
+ s.masterSecret = serialized.MasterSecret
+
+ // Set cipher suite
+ s.cipherSuite = cipherSuiteForID(CipherSuiteID(serialized.CipherSuiteID), nil)
+
+ atomic.StoreUint64(&s.localSequenceNumber[epoch], serialized.SequenceNumber)
+ s.srtpProtectionProfile = SRTPProtectionProfile(serialized.SRTPProtectionProfile)
+
+ // Set remote certificate
+ s.PeerCertificates = serialized.PeerCertificates
+ s.IdentityHint = serialized.IdentityHint
+}
+
+func (s *State) initCipherSuite() error {
+ if s.cipherSuite.IsInitialized() {
+ return nil
+ }
+
+ localRandom := s.localRandom.MarshalFixed()
+ remoteRandom := s.remoteRandom.MarshalFixed()
+
+ var err error
+ if s.isClient {
+ err = s.cipherSuite.Init(s.masterSecret, localRandom[:], remoteRandom[:], true)
+ } else {
+ err = s.cipherSuite.Init(s.masterSecret, remoteRandom[:], localRandom[:], false)
+ }
+ if err != nil {
+ return err
+ }
+ return nil
+}
+
+// MarshalBinary is a binary.BinaryMarshaler.MarshalBinary implementation
+func (s *State) MarshalBinary() ([]byte, error) {
+ serialized := s.serialize()
+
+ var buf bytes.Buffer
+ enc := gob.NewEncoder(&buf)
+ if err := enc.Encode(*serialized); err != nil {
+ return nil, err
+ }
+ return buf.Bytes(), nil
+}
+
+// UnmarshalBinary is a binary.BinaryUnmarshaler.UnmarshalBinary implementation
+func (s *State) UnmarshalBinary(data []byte) error {
+ enc := gob.NewDecoder(bytes.NewBuffer(data))
+ var serialized serializedState
+ if err := enc.Decode(&serialized); err != nil {
+ return err
+ }
+
+ s.deserialize(serialized)
+ if err := s.initCipherSuite(); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ExportKeyingMaterial returns length bytes of exported key material in a new
+// slice as defined in RFC 5705.
+// This allows protocols to use DTLS for key establishment, but
+// then use some of the keying material for their own purposes
+func (s *State) ExportKeyingMaterial(label string, context []byte, length int) ([]byte, error) {
+ if s.localEpoch.Load().(uint16) == 0 {
+ return nil, errHandshakeInProgress
+ } else if len(context) != 0 {
+ return nil, errContextUnsupported
+ } else if _, ok := invalidKeyingLabels()[label]; ok {
+ return nil, errReservedExportKeyingMaterial
+ }
+
+ localRandom := s.localRandom.MarshalFixed()
+ remoteRandom := s.remoteRandom.MarshalFixed()
+
+ seed := []byte(label)
+ if s.isClient {
+ seed = append(append(seed, localRandom[:]...), remoteRandom[:]...)
+ } else {
+ seed = append(append(seed, remoteRandom[:]...), localRandom[:]...)
+ }
+ return prf.PHash(s.masterSecret, seed, length, s.cipherSuite.HashFunc())
+}
diff --git a/vendor/github.com/pion/dtls/v2/util.go b/vendor/github.com/pion/dtls/v2/util.go
new file mode 100644
index 0000000..745182d
--- /dev/null
+++ b/vendor/github.com/pion/dtls/v2/util.go
@@ -0,0 +1,38 @@
+package dtls
+
+func findMatchingSRTPProfile(a, b []SRTPProtectionProfile) (SRTPProtectionProfile, bool) {
+ for _, aProfile := range a {
+ for _, bProfile := range b {
+ if aProfile == bProfile {
+ return aProfile, true
+ }
+ }
+ }
+ return 0, false
+}
+
+func findMatchingCipherSuite(a, b []CipherSuite) (CipherSuite, bool) { //nolint
+ for _, aSuite := range a {
+ for _, bSuite := range b {
+ if aSuite.ID() == bSuite.ID() {
+ return aSuite, true
+ }
+ }
+ }
+ return nil, false
+}
+
+func splitBytes(bytes []byte, splitLen int) [][]byte {
+ splitBytes := make([][]byte, 0)
+ numBytes := len(bytes)
+ for i := 0; i < numBytes; i += splitLen {
+ j := i + splitLen
+ if j > numBytes {
+ j = numBytes
+ }
+
+ splitBytes = append(splitBytes, bytes[i:j])
+ }
+
+ return splitBytes
+}
diff --git a/vendor/github.com/pion/ice/v2/.gitignore b/vendor/github.com/pion/ice/v2/.gitignore
new file mode 100644
index 0000000..83db74b
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/.gitignore
@@ -0,0 +1,24 @@
+### JetBrains IDE ###
+#####################
+.idea/
+
+### Emacs Temporary Files ###
+#############################
+*~
+
+### Folders ###
+###############
+bin/
+vendor/
+node_modules/
+
+### Files ###
+#############
+*.ivf
+*.ogg
+tags
+cover.out
+*.sw[poe]
+*.wasm
+examples/sfu-ws/cert.pem
+examples/sfu-ws/key.pem
diff --git a/vendor/github.com/pion/ice/v2/.golangci.yml b/vendor/github.com/pion/ice/v2/.golangci.yml
new file mode 100644
index 0000000..d6162c9
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/.golangci.yml
@@ -0,0 +1,89 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+ exhaustive:
+ default-signifies-exhaustive: true
+ gomodguard:
+ blocked:
+ modules:
+ - github.com/pkg/errors:
+ recommendations:
+ - errors
+
+linters:
+ enable:
+ - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
+ - bodyclose # checks whether HTTP response body is closed successfully
+ - deadcode # Finds unused code
+ - depguard # Go linter that checks if package imports are in a list of acceptable packages
+ - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
+ - dupl # Tool for code clone detection
+ - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
+ - exhaustive # check exhaustiveness of enum switch statements
+ - exportloopref # checks for pointers to enclosing loop variables
+ - gci # Gci control golang package import order and make it always deterministic.
+ - gochecknoglobals # Checks that no globals are present in Go code
+ - gochecknoinits # Checks that no init functions are present in Go code
+ - gocognit # Computes and checks the cognitive complexity of functions
+ - goconst # Finds repeated strings that could be replaced by a constant
+ - gocritic # The most opinionated Go source code linter
+ - godox # Tool for detection of FIXME, TODO and other comment keywords
+ - goerr113 # Golang linter to check the errors handling expressions
+ - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
+ - gofumpt # Gofumpt checks whether code was gofumpt-ed.
+ - goheader # Checks is file header matches to pattern
+ - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
+ - golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
+ - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.
+ - goprintffuncname # Checks that printf-like functions are named with `f` at the end
+ - gosec # Inspects source code for security problems
+ - gosimple # Linter for Go source code that specializes in simplifying a code
+ - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
+ - ineffassign # Detects when assignments to existing variables are not used
+ - misspell # Finds commonly misspelled English words in comments
+ - nakedret # Finds naked returns in functions greater than a specified function length
+ - noctx # noctx finds sending http request without context.Context
+ - scopelint # Scopelint checks for unpinned variables in go programs
+ - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
+ - structcheck # Finds unused struct fields
+ - stylecheck # Stylecheck is a replacement for golint
+ - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
+ - unconvert # Remove unnecessary type conversions
+ - unparam # Reports unused function parameters
+ - unused # Checks Go code for unused constants, variables, functions and types
+ - varcheck # Finds unused global variables and constants
+ - whitespace # Tool for detection of leading and trailing whitespace
+ disable:
+ - funlen # Tool for detection of long functions
+ - gocyclo # Computes and checks the cyclomatic complexity of functions
+ - godot # Check if comments end in a period
+ - gomnd # An analyzer to detect magic numbers.
+ - lll # Reports long lines
+ - maligned # Tool to detect Go structs that would take less memory if their fields were sorted
+ - nestif # Reports deeply nested if statements
+ - nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
+ - nolintlint # Reports ill-formed or insufficient nolint directives
+ - prealloc # Finds slice declarations that could potentially be preallocated
+ - rowserrcheck # checks whether Err of rows is checked successfully
+ - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
+ - testpackage # linter that makes you use a separate _test package
+ - wsl # Whitespace Linter - Forces you to use empty lines!
+
+issues:
+ exclude-use-default: false
+ exclude-rules:
+ # Allow complex tests, better to be self contained
+ - path: _test\.go
+ linters:
+ - gocognit
+
+ # Allow complex main function in examples
+ - path: examples
+ text: "of func `main` is high"
+ linters:
+ - gocognit
+
+run:
+ skip-dirs-use-default: false
diff --git a/vendor/github.com/pion/ice/v2/LICENSE b/vendor/github.com/pion/ice/v2/LICENSE
new file mode 100644
index 0000000..ab60297
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/ice/v2/README.md b/vendor/github.com/pion/ice/v2/README.md
new file mode 100644
index 0000000..cbb55fd
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/README.md
@@ -0,0 +1,67 @@
+<h1 align="center">
+ <br>
+ Pion ICE
+ <br>
+</h1>
+<h4 align="center">A Go implementation of ICE</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-ice-gray.svg?longCache=true&colorB=brightgreen" alt="Pion transport"></a>
+ <a href="http://gophers.slack.com/messages/pion"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/ice"><img src="https://travis-ci.org/pion/ice.svg?branch=master" alt="Build Status"></a>
+ <a href="https://pkg.go.dev/github.com/pion/ice"><img src="https://godoc.org/github.com/pion/ice?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/ice"><img src="https://codecov.io/gh/pion/ice/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/ice"><img src="https://goreportcard.com/badge/github.com/pion/ice" alt="Go Report Card"></a>
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+### Roadmap
+The library is used as a part of our WebRTC implementation. Please refer to that [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
+
+### Community
+Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [John Bradley](https://github.com/kc5nra) - *Original Author*
+* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
+* [Michael MacDonald](https://github.com/mjmac) - *Original Author*
+* [Michiel De Backker](https://github.com/backkem) - *Original Author*
+* [Konstantin Itskov](https://github.com/trivigy) - *Original Author*
+* [Luke Curley](https://github.com/kixelated)
+* [Hugo Arregui](https://github.com/hugoArregui)
+* [Adam Kiss](https://github.com/masterada)
+* [Aleksandr Razumov](https://github.com/ernado)
+* [Yutaka Takeda](https://github.com/enobufs)
+* [Atsushi Watanabe](https://github.com/at-wat)
+* [Robert Eperjesi](https://github.com/epes)
+* [Sebastian Waisbrot](https://github.com/seppo0010)
+* [Zizheng Tai](https://github.com/ZizhengTai)
+* [Aaron France](https://github.com/AeroNotix)
+* [Chao Yuan](https://github.com/yuanchao0310)
+* [Jason Maldonis](https://github.com/jjmaldonis)
+* [Nevio Vesic](https://github.com/0x19)
+* [David Hamilton](https://github.com/dihamilton)
+* [adwpc](https://github.com/adwpc)
+* [Ori Bernstein](https://eigenstate.org)
+* [Sam Lancia](https://github.com/nerd2)
+* [Lander Noterman](https://github.com/LanderN)
+* [BUPTCZQ](https://github.com/buptczq)
+* [Henry](https://github.com/cryptix)
+* [Jerko Steiner](https://github.com/jeremija)
+* [Sidney San Martín](https://github.com/s4y)
+* [JooYoung Lim](https://github.com/DevRockstarZ)
+* [Kory Miller](https://github.com/korymiller1489)
+* [ZHENK](https://github.com/scorpionknifes)
+* [Assad Obaid](https://github.com/assadobaid)
+* [Antoine Baché](https://github.com/Antonito)
+* [Will Forcey](https://github.com/wawesomeNOGUI)
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/ice/v2/agent.go b/vendor/github.com/pion/ice/v2/agent.go
new file mode 100644
index 0000000..9f1ac6a
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/agent.go
@@ -0,0 +1,1233 @@
+// Package ice implements the Interactive Connectivity Establishment (ICE)
+// protocol defined in rfc5245.
+package ice
+
+import (
+ "context"
+ "net"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/mdns"
+ "github.com/pion/stun"
+ "github.com/pion/transport/packetio"
+ "github.com/pion/transport/vnet"
+ "golang.org/x/net/proxy"
+)
+
+type bindingRequest struct {
+ timestamp time.Time
+ transactionID [stun.TransactionIDSize]byte
+ destination net.Addr
+ isUseCandidate bool
+}
+
+// Agent represents the ICE agent
+type Agent struct {
+ chanTask chan task
+ afterRunFn []func(ctx context.Context)
+ muAfterRun sync.Mutex
+
+ onConnectionStateChangeHdlr atomic.Value // func(ConnectionState)
+ onSelectedCandidatePairChangeHdlr atomic.Value // func(Candidate, Candidate)
+ onCandidateHdlr atomic.Value // func(Candidate)
+
+ // State owned by the taskLoop
+ onConnected chan struct{}
+ onConnectedOnce sync.Once
+
+ // force candidate to be contacted immediately (instead of waiting for task ticker)
+ forceCandidateContact chan bool
+
+ tieBreaker uint64
+ lite bool
+
+ connectionState ConnectionState
+ gatheringState GatheringState
+
+ mDNSMode MulticastDNSMode
+ mDNSName string
+ mDNSConn *mdns.Conn
+
+ muHaveStarted sync.Mutex
+ startedCh <-chan struct{}
+ startedFn func()
+ isControlling bool
+
+ maxBindingRequests uint16
+
+ hostAcceptanceMinWait time.Duration
+ srflxAcceptanceMinWait time.Duration
+ prflxAcceptanceMinWait time.Duration
+ relayAcceptanceMinWait time.Duration
+
+ portmin uint16
+ portmax uint16
+
+ candidateTypes []CandidateType
+
+ // How long connectivity checks can fail before the ICE Agent
+ // goes to disconnected
+ disconnectedTimeout time.Duration
+
+ // How long connectivity checks can fail before the ICE Agent
+ // goes to failed
+ failedTimeout time.Duration
+
+ // How often should we send keepalive packets?
+ // 0 means never
+ keepaliveInterval time.Duration
+
+ // How often should we run our internal taskLoop to check for state changes when connecting
+ checkInterval time.Duration
+
+ localUfrag string
+ localPwd string
+ localCandidates map[NetworkType][]Candidate
+
+ remoteUfrag string
+ remotePwd string
+ remoteCandidates map[NetworkType][]Candidate
+
+ checklist []*candidatePair
+ selector pairCandidateSelector
+
+ selectedPair atomic.Value // *candidatePair
+
+ urls []*URL
+ networkTypes []NetworkType
+
+ buffer *packetio.Buffer
+
+ // LRU of outbound Binding request Transaction IDs
+ pendingBindingRequests []bindingRequest
+
+ // 1:1 D-NAT IP address mapping
+ extIPMapper *externalIPMapper
+
+ // State for closing
+ done chan struct{}
+ err atomicError
+
+ gatherCandidateCancel func()
+
+ chanCandidate chan Candidate
+ chanCandidatePair chan *candidatePair
+ chanState chan ConnectionState
+
+ loggerFactory logging.LoggerFactory
+ log logging.LeveledLogger
+
+ net *vnet.Net
+ tcpMux TCPMux
+
+ interfaceFilter func(string) bool
+
+ insecureSkipVerify bool
+
+ proxyDialer proxy.Dialer
+}
+
+type task struct {
+ fn func(context.Context, *Agent)
+ done chan struct{}
+}
+
+// afterRun registers function to be run after the task.
+func (a *Agent) afterRun(f func(context.Context)) {
+ a.muAfterRun.Lock()
+ a.afterRunFn = append(a.afterRunFn, f)
+ a.muAfterRun.Unlock()
+}
+
+func (a *Agent) getAfterRunFn() []func(context.Context) {
+ a.muAfterRun.Lock()
+ defer a.muAfterRun.Unlock()
+ fns := a.afterRunFn
+ a.afterRunFn = nil
+ return fns
+}
+
+func (a *Agent) ok() error {
+ select {
+ case <-a.done:
+ return a.getErr()
+ default:
+ }
+ return nil
+}
+
+func (a *Agent) getErr() error {
+ if err := a.err.Load(); err != nil {
+ return err
+ }
+ return ErrClosed
+}
+
+// Run task in serial. Blocking tasks must be cancelable by context.
+func (a *Agent) run(ctx context.Context, t func(context.Context, *Agent)) error {
+ if err := a.ok(); err != nil {
+ return err
+ }
+ done := make(chan struct{})
+ select {
+ case <-ctx.Done():
+ return ctx.Err()
+ case a.chanTask <- task{t, done}:
+ <-done
+ return nil
+ }
+}
+
+// taskLoop handles registered tasks and agent close.
+func (a *Agent) taskLoop() {
+ after := func() {
+ for {
+ // Get and run func registered by afterRun().
+ fns := a.getAfterRunFn()
+ if len(fns) == 0 {
+ break
+ }
+ for _, fn := range fns {
+ fn(a.context())
+ }
+ }
+ }
+ defer func() {
+ a.deleteAllCandidates()
+ a.startedFn()
+
+ if err := a.buffer.Close(); err != nil {
+ a.log.Warnf("failed to close buffer: %v", err)
+ }
+
+ a.closeMulticastConn()
+ a.updateConnectionState(ConnectionStateClosed)
+
+ after()
+
+ close(a.chanState)
+ close(a.chanCandidate)
+ close(a.chanCandidatePair)
+ }()
+
+ for {
+ select {
+ case <-a.done:
+ return
+ case t := <-a.chanTask:
+ t.fn(a.context(), a)
+ close(t.done)
+ after()
+ }
+ }
+}
+
+// NewAgent creates a new Agent
+func NewAgent(config *AgentConfig) (*Agent, error) { //nolint:gocognit
+ var err error
+ if config.PortMax < config.PortMin {
+ return nil, ErrPort
+ }
+
+ mDNSName := config.MulticastDNSHostName
+ if mDNSName == "" {
+ if mDNSName, err = generateMulticastDNSName(); err != nil {
+ return nil, err
+ }
+ }
+
+ if !strings.HasSuffix(mDNSName, ".local") || len(strings.Split(mDNSName, ".")) != 2 {
+ return nil, ErrInvalidMulticastDNSHostName
+ }
+
+ mDNSMode := config.MulticastDNSMode
+ if mDNSMode == 0 {
+ mDNSMode = MulticastDNSModeQueryOnly
+ }
+
+ loggerFactory := config.LoggerFactory
+ if loggerFactory == nil {
+ loggerFactory = logging.NewDefaultLoggerFactory()
+ }
+ log := loggerFactory.NewLogger("ice")
+
+ var mDNSConn *mdns.Conn
+ mDNSConn, mDNSMode, err = createMulticastDNS(mDNSMode, mDNSName, log)
+ // Opportunistic mDNS: If we can't open the connection, that's ok: we
+ // can continue without it.
+ if err != nil {
+ log.Warnf("Failed to initialize mDNS %s: %v", mDNSName, err)
+ }
+ closeMDNSConn := func() {
+ if mDNSConn != nil {
+ if mdnsCloseErr := mDNSConn.Close(); mdnsCloseErr != nil {
+ log.Warnf("Failed to close mDNS: %v", mdnsCloseErr)
+ }
+ }
+ }
+
+ startedCtx, startedFn := context.WithCancel(context.Background())
+
+ a := &Agent{
+ chanTask: make(chan task),
+ chanState: make(chan ConnectionState),
+ chanCandidate: make(chan Candidate),
+ chanCandidatePair: make(chan *candidatePair),
+ tieBreaker: globalMathRandomGenerator.Uint64(),
+ lite: config.Lite,
+ gatheringState: GatheringStateNew,
+ connectionState: ConnectionStateNew,
+ localCandidates: make(map[NetworkType][]Candidate),
+ remoteCandidates: make(map[NetworkType][]Candidate),
+ urls: config.Urls,
+ networkTypes: config.NetworkTypes,
+ onConnected: make(chan struct{}),
+ buffer: packetio.NewBuffer(),
+ done: make(chan struct{}),
+ startedCh: startedCtx.Done(),
+ startedFn: startedFn,
+ portmin: config.PortMin,
+ portmax: config.PortMax,
+ loggerFactory: loggerFactory,
+ log: log,
+ net: config.Net,
+ proxyDialer: config.ProxyDialer,
+
+ mDNSMode: mDNSMode,
+ mDNSName: mDNSName,
+ mDNSConn: mDNSConn,
+
+ gatherCandidateCancel: func() {},
+
+ forceCandidateContact: make(chan bool, 1),
+
+ interfaceFilter: config.InterfaceFilter,
+
+ insecureSkipVerify: config.InsecureSkipVerify,
+ }
+
+ a.tcpMux = config.TCPMux
+ if a.tcpMux == nil {
+ a.tcpMux = newInvalidTCPMux()
+ }
+
+ if a.net == nil {
+ a.net = vnet.NewNet(nil)
+ } else if a.net.IsVirtual() {
+ a.log.Warn("vnet is enabled")
+ if a.mDNSMode != MulticastDNSModeDisabled {
+ a.log.Warn("vnet does not support mDNS yet")
+ }
+ }
+
+ config.initWithDefaults(a)
+
+ // Make sure the buffer doesn't grow indefinitely.
+ // NOTE: We actually won't get anywhere close to this limit.
+ // SRTP will constantly read from the endpoint and drop packets if it's full.
+ a.buffer.SetLimitSize(maxBufferSize)
+
+ if a.lite && (len(a.candidateTypes) != 1 || a.candidateTypes[0] != CandidateTypeHost) {
+ closeMDNSConn()
+ return nil, ErrLiteUsingNonHostCandidates
+ }
+
+ if config.Urls != nil && len(config.Urls) > 0 && !containsCandidateType(CandidateTypeServerReflexive, a.candidateTypes) && !containsCandidateType(CandidateTypeRelay, a.candidateTypes) {
+ closeMDNSConn()
+ return nil, ErrUselessUrlsProvided
+ }
+
+ if err = config.initExtIPMapping(a); err != nil {
+ closeMDNSConn()
+ return nil, err
+ }
+
+ go a.taskLoop()
+ a.startOnConnectionStateChangeRoutine()
+
+ // Restart is also used to initialize the agent for the first time
+ if err := a.Restart(config.LocalUfrag, config.LocalPwd); err != nil {
+ closeMDNSConn()
+ _ = a.Close()
+ return nil, err
+ }
+
+ return a, nil
+}
+
+// OnConnectionStateChange sets a handler that is fired when the connection state changes
+func (a *Agent) OnConnectionStateChange(f func(ConnectionState)) error {
+ a.onConnectionStateChangeHdlr.Store(f)
+ return nil
+}
+
+// OnSelectedCandidatePairChange sets a handler that is fired when the final candidate
+// pair is selected
+func (a *Agent) OnSelectedCandidatePairChange(f func(Candidate, Candidate)) error {
+ a.onSelectedCandidatePairChangeHdlr.Store(f)
+ return nil
+}
+
+// OnCandidate sets a handler that is fired when new candidates gathered. When
+// the gathering process complete the last candidate is nil.
+func (a *Agent) OnCandidate(f func(Candidate)) error {
+ a.onCandidateHdlr.Store(f)
+ return nil
+}
+
+func (a *Agent) onSelectedCandidatePairChange(p *candidatePair) {
+ if h, ok := a.onSelectedCandidatePairChangeHdlr.Load().(func(Candidate, Candidate)); ok {
+ h(p.local, p.remote)
+ }
+}
+
+func (a *Agent) onCandidate(c Candidate) {
+ if onCandidateHdlr, ok := a.onCandidateHdlr.Load().(func(Candidate)); ok {
+ onCandidateHdlr(c)
+ }
+}
+
+func (a *Agent) onConnectionStateChange(s ConnectionState) {
+ if hdlr, ok := a.onConnectionStateChangeHdlr.Load().(func(ConnectionState)); ok {
+ hdlr(s)
+ }
+}
+
+func (a *Agent) startOnConnectionStateChangeRoutine() {
+ go func() {
+ for {
+ // CandidatePair and ConnectionState are usually changed at once.
+ // Blocking one by the other one causes deadlock.
+ p, isOpen := <-a.chanCandidatePair
+ if !isOpen {
+ return
+ }
+ a.onSelectedCandidatePairChange(p)
+ }
+ }()
+ go func() {
+ for {
+ select {
+ case s, isOpen := <-a.chanState:
+ if !isOpen {
+ for c := range a.chanCandidate {
+ a.onCandidate(c)
+ }
+ return
+ }
+ a.onConnectionStateChange(s)
+
+ case c, isOpen := <-a.chanCandidate:
+ if !isOpen {
+ for s := range a.chanState {
+ a.onConnectionStateChange(s)
+ }
+ return
+ }
+ a.onCandidate(c)
+ }
+ }
+ }()
+}
+
+func (a *Agent) startConnectivityChecks(isControlling bool, remoteUfrag, remotePwd string) error {
+ a.muHaveStarted.Lock()
+ defer a.muHaveStarted.Unlock()
+ select {
+ case <-a.startedCh:
+ return ErrMultipleStart
+ default:
+ }
+ if err := a.SetRemoteCredentials(remoteUfrag, remotePwd); err != nil {
+ return err
+ }
+
+ a.log.Debugf("Started agent: isControlling? %t, remoteUfrag: %q, remotePwd: %q", isControlling, remoteUfrag, remotePwd)
+
+ return a.run(a.context(), func(ctx context.Context, agent *Agent) {
+ agent.isControlling = isControlling
+ agent.remoteUfrag = remoteUfrag
+ agent.remotePwd = remotePwd
+
+ if isControlling {
+ a.selector = &controllingSelector{agent: a, log: a.log}
+ } else {
+ a.selector = &controlledSelector{agent: a, log: a.log}
+ }
+
+ if a.lite {
+ a.selector = &liteSelector{pairCandidateSelector: a.selector}
+ }
+
+ a.selector.Start()
+ a.startedFn()
+
+ agent.updateConnectionState(ConnectionStateChecking)
+
+ a.requestConnectivityCheck()
+ go a.connectivityChecks()
+ })
+}
+
+func (a *Agent) connectivityChecks() {
+ lastConnectionState := ConnectionState(0)
+ checkingDuration := time.Time{}
+
+ contact := func() {
+ if err := a.run(a.context(), func(ctx context.Context, a *Agent) {
+ defer func() {
+ lastConnectionState = a.connectionState
+ }()
+
+ switch a.connectionState {
+ case ConnectionStateFailed:
+ // The connection is currently failed so don't send any checks
+ // In the future it may be restarted though
+ return
+ case ConnectionStateChecking:
+ // We have just entered checking for the first time so update our checking timer
+ if lastConnectionState != a.connectionState {
+ checkingDuration = time.Now()
+ }
+
+ // We have been in checking longer then Disconnect+Failed timeout, set the connection to Failed
+ if time.Since(checkingDuration) > a.disconnectedTimeout+a.failedTimeout {
+ a.updateConnectionState(ConnectionStateFailed)
+ return
+ }
+ }
+
+ a.selector.ContactCandidates()
+ }); err != nil {
+ a.log.Warnf("taskLoop failed: %v", err)
+ }
+ }
+
+ for {
+ interval := defaultKeepaliveInterval
+
+ updateInterval := func(x time.Duration) {
+ if x != 0 && (interval == 0 || interval > x) {
+ interval = x
+ }
+ }
+
+ switch lastConnectionState {
+ case ConnectionStateNew, ConnectionStateChecking: // While connecting, check candidates more frequently
+ updateInterval(a.checkInterval)
+ case ConnectionStateConnected, ConnectionStateDisconnected:
+ updateInterval(a.keepaliveInterval)
+ default:
+ }
+ // Ensure we run our task loop as quickly as the minimum of our various configured timeouts
+ updateInterval(a.disconnectedTimeout)
+ updateInterval(a.failedTimeout)
+
+ t := time.NewTimer(interval)
+ select {
+ case <-a.forceCandidateContact:
+ t.Stop()
+ contact()
+ case <-t.C:
+ contact()
+ case <-a.done:
+ t.Stop()
+ return
+ }
+ }
+}
+
+func (a *Agent) updateConnectionState(newState ConnectionState) {
+ if a.connectionState != newState {
+ // Connection has gone to failed, release all gathered candidates
+ if newState == ConnectionStateFailed {
+ a.deleteAllCandidates()
+ }
+
+ a.log.Infof("Setting new connection state: %s", newState)
+ a.connectionState = newState
+
+ // Call handler after finishing current task since we may be holding the agent lock
+ // and the handler may also require it
+ a.afterRun(func(ctx context.Context) {
+ a.chanState <- newState
+ })
+ }
+}
+
+func (a *Agent) setSelectedPair(p *candidatePair) {
+ a.log.Tracef("Set selected candidate pair: %s", p)
+
+ if p == nil {
+ var nilPair *candidatePair
+ a.selectedPair.Store(nilPair)
+ return
+ }
+
+ p.nominated = true
+ a.selectedPair.Store(p)
+
+ a.updateConnectionState(ConnectionStateConnected)
+
+ // Notify when the selected pair changes
+ if p != nil {
+ a.afterRun(func(ctx context.Context) {
+ select {
+ case a.chanCandidatePair <- p:
+ case <-ctx.Done():
+ }
+ })
+ }
+
+ // Signal connected
+ a.onConnectedOnce.Do(func() { close(a.onConnected) })
+}
+
+func (a *Agent) pingAllCandidates() {
+ a.log.Trace("pinging all candidates")
+
+ if len(a.checklist) == 0 {
+ a.log.Warn("pingAllCandidates called with no candidate pairs. Connection is not possible yet.")
+ }
+
+ for _, p := range a.checklist {
+ if p.state == CandidatePairStateWaiting {
+ p.state = CandidatePairStateInProgress
+ } else if p.state != CandidatePairStateInProgress {
+ continue
+ }
+
+ if p.bindingRequestCount > a.maxBindingRequests {
+ a.log.Tracef("max requests reached for pair %s, marking it as failed\n", p)
+ p.state = CandidatePairStateFailed
+ } else {
+ a.selector.PingCandidate(p.local, p.remote)
+ p.bindingRequestCount++
+ }
+ }
+}
+
+func (a *Agent) getBestAvailableCandidatePair() *candidatePair {
+ var best *candidatePair
+ for _, p := range a.checklist {
+ if p.state == CandidatePairStateFailed {
+ continue
+ }
+
+ if best == nil {
+ best = p
+ } else if best.Priority() < p.Priority() {
+ best = p
+ }
+ }
+ return best
+}
+
+func (a *Agent) getBestValidCandidatePair() *candidatePair {
+ var best *candidatePair
+ for _, p := range a.checklist {
+ if p.state != CandidatePairStateSucceeded {
+ continue
+ }
+
+ if best == nil {
+ best = p
+ } else if best.Priority() < p.Priority() {
+ best = p
+ }
+ }
+ return best
+}
+
+func (a *Agent) addPair(local, remote Candidate) *candidatePair {
+ p := newCandidatePair(local, remote, a.isControlling)
+ a.checklist = append(a.checklist, p)
+ return p
+}
+
+func (a *Agent) findPair(local, remote Candidate) *candidatePair {
+ for _, p := range a.checklist {
+ if p.local.Equal(local) && p.remote.Equal(remote) {
+ return p
+ }
+ }
+ return nil
+}
+
+// validateSelectedPair checks if the selected pair is (still) valid
+// Note: the caller should hold the agent lock.
+func (a *Agent) validateSelectedPair() bool {
+ selectedPair := a.getSelectedPair()
+ if selectedPair == nil {
+ return false
+ }
+
+ disconnectedTime := time.Since(selectedPair.remote.LastReceived())
+
+ // Only allow transitions to failed if a.failedTimeout is non-zero
+ totalTimeToFailure := a.failedTimeout
+ if totalTimeToFailure != 0 {
+ totalTimeToFailure += a.disconnectedTimeout
+ }
+
+ switch {
+ case totalTimeToFailure != 0 && disconnectedTime > totalTimeToFailure:
+ a.updateConnectionState(ConnectionStateFailed)
+ case a.disconnectedTimeout != 0 && disconnectedTime > a.disconnectedTimeout:
+ a.updateConnectionState(ConnectionStateDisconnected)
+ default:
+ a.updateConnectionState(ConnectionStateConnected)
+ }
+
+ return true
+}
+
+// checkKeepalive sends STUN Binding Indications to the selected pair
+// if no packet has been sent on that pair in the last keepaliveInterval
+// Note: the caller should hold the agent lock.
+func (a *Agent) checkKeepalive() {
+ selectedPair := a.getSelectedPair()
+ if selectedPair == nil {
+ return
+ }
+
+ if (a.keepaliveInterval != 0) &&
+ ((time.Since(selectedPair.local.LastSent()) > a.keepaliveInterval) ||
+ (time.Since(selectedPair.remote.LastReceived()) > a.keepaliveInterval)) {
+ // we use binding request instead of indication to support refresh consent schemas
+ // see https://tools.ietf.org/html/rfc7675
+ a.selector.PingCandidate(selectedPair.local, selectedPair.remote)
+ }
+}
+
+// AddRemoteCandidate adds a new remote candidate
+func (a *Agent) AddRemoteCandidate(c Candidate) error {
+ if c == nil {
+ return nil
+ }
+
+ // cannot check for network yet because it might not be applied
+ // when mDNS hostame is used.
+ if c.TCPType() == TCPTypeActive {
+ // TCP Candidates with tcptype active will probe server passive ones, so
+ // no need to do anything with them.
+ a.log.Infof("Ignoring remote candidate with tcpType active: %s", c)
+ return nil
+ }
+
+ // If we have a mDNS Candidate lets fully resolve it before adding it locally
+ if c.Type() == CandidateTypeHost && strings.HasSuffix(c.Address(), ".local") {
+ if a.mDNSMode == MulticastDNSModeDisabled {
+ a.log.Warnf("remote mDNS candidate added, but mDNS is disabled: (%s)", c.Address())
+ return nil
+ }
+
+ hostCandidate, ok := c.(*CandidateHost)
+ if !ok {
+ return ErrAddressParseFailed
+ }
+
+ go a.resolveAndAddMulticastCandidate(hostCandidate)
+ return nil
+ }
+
+ go func() {
+ if err := a.run(a.context(), func(ctx context.Context, agent *Agent) {
+ agent.addRemoteCandidate(c)
+ }); err != nil {
+ a.log.Warnf("Failed to add remote candidate %s: %v", c.Address(), err)
+ return
+ }
+ }()
+ return nil
+}
+
+func (a *Agent) resolveAndAddMulticastCandidate(c *CandidateHost) {
+ if a.mDNSConn == nil {
+ return
+ }
+ _, src, err := a.mDNSConn.Query(c.context(), c.Address())
+ if err != nil {
+ a.log.Warnf("Failed to discover mDNS candidate %s: %v", c.Address(), err)
+ return
+ }
+
+ ip, _, _, _ := parseAddr(src) //nolint:dogsled
+ if ip == nil {
+ a.log.Warnf("Failed to discover mDNS candidate %s: failed to parse IP", c.Address())
+ return
+ }
+
+ if err = c.setIP(ip); err != nil {
+ a.log.Warnf("Failed to discover mDNS candidate %s: %v", c.Address(), err)
+ return
+ }
+
+ if err = a.run(a.context(), func(ctx context.Context, agent *Agent) {
+ agent.addRemoteCandidate(c)
+ }); err != nil {
+ a.log.Warnf("Failed to add mDNS candidate %s: %v", c.Address(), err)
+ return
+ }
+}
+
+func (a *Agent) requestConnectivityCheck() {
+ select {
+ case a.forceCandidateContact <- true:
+ default:
+ }
+}
+
+// addRemoteCandidate assumes you are holding the lock (must be execute using a.run)
+func (a *Agent) addRemoteCandidate(c Candidate) {
+ set := a.remoteCandidates[c.NetworkType()]
+
+ for _, candidate := range set {
+ if candidate.Equal(c) {
+ return
+ }
+ }
+
+ set = append(set, c)
+ a.remoteCandidates[c.NetworkType()] = set
+
+ if localCandidates, ok := a.localCandidates[c.NetworkType()]; ok {
+ for _, localCandidate := range localCandidates {
+ a.addPair(localCandidate, c)
+ }
+ }
+
+ a.requestConnectivityCheck()
+}
+
+func (a *Agent) addCandidate(ctx context.Context, c Candidate, candidateConn net.PacketConn) error {
+ return a.run(ctx, func(ctx context.Context, agent *Agent) {
+ c.start(a, candidateConn, a.startedCh)
+
+ set := a.localCandidates[c.NetworkType()]
+ for _, candidate := range set {
+ if candidate.Equal(c) {
+ if err := c.close(); err != nil {
+ a.log.Warnf("Failed to close duplicate candidate: %v", err)
+ }
+ return
+ }
+ }
+
+ set = append(set, c)
+ a.localCandidates[c.NetworkType()] = set
+
+ if remoteCandidates, ok := a.remoteCandidates[c.NetworkType()]; ok {
+ for _, remoteCandidate := range remoteCandidates {
+ a.addPair(c, remoteCandidate)
+ }
+ }
+
+ a.requestConnectivityCheck()
+
+ a.chanCandidate <- c
+ })
+}
+
+// GetLocalCandidates returns the local candidates
+func (a *Agent) GetLocalCandidates() ([]Candidate, error) {
+ var res []Candidate
+
+ err := a.run(a.context(), func(ctx context.Context, agent *Agent) {
+ var candidates []Candidate
+ for _, set := range agent.localCandidates {
+ candidates = append(candidates, set...)
+ }
+ res = candidates
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ return res, nil
+}
+
+// GetLocalUserCredentials returns the local user credentials
+func (a *Agent) GetLocalUserCredentials() (frag string, pwd string, err error) {
+ valSet := make(chan struct{})
+ err = a.run(a.context(), func(ctx context.Context, agent *Agent) {
+ frag = agent.localUfrag
+ pwd = agent.localPwd
+ close(valSet)
+ })
+
+ if err == nil {
+ <-valSet
+ }
+ return
+}
+
+// GetRemoteUserCredentials returns the remote user credentials
+func (a *Agent) GetRemoteUserCredentials() (frag string, pwd string, err error) {
+ valSet := make(chan struct{})
+ err = a.run(a.context(), func(ctx context.Context, agent *Agent) {
+ frag = agent.remoteUfrag
+ pwd = agent.remotePwd
+ close(valSet)
+ })
+
+ if err == nil {
+ <-valSet
+ }
+ return
+}
+
+// Close cleans up the Agent
+func (a *Agent) Close() error {
+ if err := a.ok(); err != nil {
+ return err
+ }
+
+ done := make(chan struct{})
+
+ a.afterRun(func(context.Context) {
+ close(done)
+ })
+
+ a.gatherCandidateCancel()
+ a.err.Store(ErrClosed)
+
+ a.tcpMux.RemoveConnByUfrag(a.localUfrag)
+
+ close(a.done)
+
+ <-done
+ return nil
+}
+
+// Remove all candidates. This closes any listening sockets
+// and removes both the local and remote candidate lists.
+//
+// This is used for restarts, failures and on close
+func (a *Agent) deleteAllCandidates() {
+ for net, cs := range a.localCandidates {
+ for _, c := range cs {
+ if err := c.close(); err != nil {
+ a.log.Warnf("Failed to close candidate %s: %v", c, err)
+ }
+ }
+ delete(a.localCandidates, net)
+ }
+ for net, cs := range a.remoteCandidates {
+ for _, c := range cs {
+ if err := c.close(); err != nil {
+ a.log.Warnf("Failed to close candidate %s: %v", c, err)
+ }
+ }
+ delete(a.remoteCandidates, net)
+ }
+}
+
+func (a *Agent) findRemoteCandidate(networkType NetworkType, addr net.Addr) Candidate {
+ ip, port, _, ok := parseAddr(addr)
+ if !ok {
+ a.log.Warnf("Error parsing addr: %s", addr)
+ return nil
+ }
+
+ set := a.remoteCandidates[networkType]
+ for _, c := range set {
+ if c.Address() == ip.String() && c.Port() == port {
+ return c
+ }
+ }
+ return nil
+}
+
+func (a *Agent) sendBindingRequest(m *stun.Message, local, remote Candidate) {
+ a.log.Tracef("ping STUN from %s to %s\n", local.String(), remote.String())
+
+ a.invalidatePendingBindingRequests(time.Now())
+ a.pendingBindingRequests = append(a.pendingBindingRequests, bindingRequest{
+ timestamp: time.Now(),
+ transactionID: m.TransactionID,
+ destination: remote.addr(),
+ isUseCandidate: m.Contains(stun.AttrUseCandidate),
+ })
+
+ a.sendSTUN(m, local, remote)
+}
+
+func (a *Agent) sendBindingSuccess(m *stun.Message, local, remote Candidate) {
+ base := remote
+
+ ip, port, _, ok := parseAddr(base.addr())
+ if !ok {
+ a.log.Warnf("Error parsing addr: %s", base.addr())
+ return
+ }
+
+ if out, err := stun.Build(m, stun.BindingSuccess,
+ &stun.XORMappedAddress{
+ IP: ip,
+ Port: port,
+ },
+ stun.NewShortTermIntegrity(a.localPwd),
+ stun.Fingerprint,
+ ); err != nil {
+ a.log.Warnf("Failed to handle inbound ICE from: %s to: %s error: %s", local, remote, err)
+ } else {
+ a.sendSTUN(out, local, remote)
+ }
+}
+
+/* Removes pending binding requests that are over maxBindingRequestTimeout old
+
+ Let HTO be the transaction timeout, which SHOULD be 2*RTT if
+ RTT is known or 500 ms otherwise.
+ https://tools.ietf.org/html/rfc8445#appendix-B.1
+*/
+func (a *Agent) invalidatePendingBindingRequests(filterTime time.Time) {
+ initialSize := len(a.pendingBindingRequests)
+
+ temp := a.pendingBindingRequests[:0]
+ for _, bindingRequest := range a.pendingBindingRequests {
+ if filterTime.Sub(bindingRequest.timestamp) < maxBindingRequestTimeout {
+ temp = append(temp, bindingRequest)
+ }
+ }
+
+ a.pendingBindingRequests = temp
+ if bindRequestsRemoved := initialSize - len(a.pendingBindingRequests); bindRequestsRemoved > 0 {
+ a.log.Tracef("Discarded %d binding requests because they expired", bindRequestsRemoved)
+ }
+}
+
+// Assert that the passed TransactionID is in our pendingBindingRequests and returns the destination
+// If the bindingRequest was valid remove it from our pending cache
+func (a *Agent) handleInboundBindingSuccess(id [stun.TransactionIDSize]byte) (bool, *bindingRequest) {
+ a.invalidatePendingBindingRequests(time.Now())
+ for i := range a.pendingBindingRequests {
+ if a.pendingBindingRequests[i].transactionID == id {
+ validBindingRequest := a.pendingBindingRequests[i]
+ a.pendingBindingRequests = append(a.pendingBindingRequests[:i], a.pendingBindingRequests[i+1:]...)
+ return true, &validBindingRequest
+ }
+ }
+ return false, nil
+}
+
+// handleInbound processes STUN traffic from a remote candidate
+func (a *Agent) handleInbound(m *stun.Message, local Candidate, remote net.Addr) { //nolint:gocognit
+ var err error
+ if m == nil || local == nil {
+ return
+ }
+
+ if m.Type.Method != stun.MethodBinding ||
+ !(m.Type.Class == stun.ClassSuccessResponse ||
+ m.Type.Class == stun.ClassRequest ||
+ m.Type.Class == stun.ClassIndication) {
+ a.log.Tracef("unhandled STUN from %s to %s class(%s) method(%s)", remote, local, m.Type.Class, m.Type.Method)
+ return
+ }
+
+ if a.isControlling {
+ if m.Contains(stun.AttrICEControlling) {
+ a.log.Debug("inbound isControlling && a.isControlling == true")
+ return
+ } else if m.Contains(stun.AttrUseCandidate) {
+ a.log.Debug("useCandidate && a.isControlling == true")
+ return
+ }
+ } else {
+ if m.Contains(stun.AttrICEControlled) {
+ a.log.Debug("inbound isControlled && a.isControlling == false")
+ return
+ }
+ }
+
+ remoteCandidate := a.findRemoteCandidate(local.NetworkType(), remote)
+ if m.Type.Class == stun.ClassSuccessResponse {
+ if err = assertInboundMessageIntegrity(m, []byte(a.remotePwd)); err != nil {
+ a.log.Warnf("discard message from (%s), %v", remote, err)
+ return
+ }
+
+ if remoteCandidate == nil {
+ a.log.Warnf("discard success message from (%s), no such remote", remote)
+ return
+ }
+
+ a.selector.HandleSuccessResponse(m, local, remoteCandidate, remote)
+ } else if m.Type.Class == stun.ClassRequest {
+ if err = assertInboundUsername(m, a.localUfrag+":"+a.remoteUfrag); err != nil {
+ a.log.Warnf("discard message from (%s), %v", remote, err)
+ return
+ } else if err = assertInboundMessageIntegrity(m, []byte(a.localPwd)); err != nil {
+ a.log.Warnf("discard message from (%s), %v", remote, err)
+ return
+ }
+
+ if remoteCandidate == nil {
+ ip, port, networkType, ok := parseAddr(remote)
+ if !ok {
+ a.log.Errorf("Failed to create parse remote net.Addr when creating remote prflx candidate")
+ return
+ }
+
+ prflxCandidateConfig := CandidatePeerReflexiveConfig{
+ Network: networkType.String(),
+ Address: ip.String(),
+ Port: port,
+ Component: local.Component(),
+ RelAddr: "",
+ RelPort: 0,
+ }
+
+ prflxCandidate, err := NewCandidatePeerReflexive(&prflxCandidateConfig)
+ if err != nil {
+ a.log.Errorf("Failed to create new remote prflx candidate (%s)", err)
+ return
+ }
+ remoteCandidate = prflxCandidate
+
+ a.log.Debugf("adding a new peer-reflexive candidate: %s ", remote)
+ a.addRemoteCandidate(remoteCandidate)
+ }
+
+ a.log.Tracef("inbound STUN (Request) from %s to %s", remote.String(), local.String())
+
+ a.selector.HandleBindingRequest(m, local, remoteCandidate)
+ }
+
+ if remoteCandidate != nil {
+ remoteCandidate.seen(false)
+ }
+}
+
+// validateNonSTUNTraffic processes non STUN traffic from a remote candidate,
+// and returns true if it is an actual remote candidate
+func (a *Agent) validateNonSTUNTraffic(local Candidate, remote net.Addr) bool {
+ var isValidCandidate uint64
+ if err := a.run(local.context(), func(ctx context.Context, agent *Agent) {
+ remoteCandidate := a.findRemoteCandidate(local.NetworkType(), remote)
+ if remoteCandidate != nil {
+ remoteCandidate.seen(false)
+ atomic.AddUint64(&isValidCandidate, 1)
+ }
+ }); err != nil {
+ a.log.Warnf("failed to validate remote candidate: %v", err)
+ }
+
+ return atomic.LoadUint64(&isValidCandidate) == 1
+}
+
+func (a *Agent) getSelectedPair() *candidatePair {
+ selectedPair := a.selectedPair.Load()
+
+ if selectedPair == nil {
+ return nil
+ }
+
+ return selectedPair.(*candidatePair)
+}
+
+func (a *Agent) closeMulticastConn() {
+ if a.mDNSConn != nil {
+ if err := a.mDNSConn.Close(); err != nil {
+ a.log.Warnf("failed to close mDNS Conn: %v", err)
+ }
+ }
+}
+
+// SetRemoteCredentials sets the credentials of the remote agent
+func (a *Agent) SetRemoteCredentials(remoteUfrag, remotePwd string) error {
+ switch {
+ case remoteUfrag == "":
+ return ErrRemoteUfragEmpty
+ case remotePwd == "":
+ return ErrRemotePwdEmpty
+ }
+
+ return a.run(a.context(), func(ctx context.Context, agent *Agent) {
+ agent.remoteUfrag = remoteUfrag
+ agent.remotePwd = remotePwd
+ })
+}
+
+// Restart restarts the ICE Agent with the provided ufrag/pwd
+// If no ufrag/pwd is provided the Agent will generate one itself
+//
+// Restart must only be called when GatheringState is GatheringStateComplete
+// a user must then call GatherCandidates explicitly to start generating new ones
+func (a *Agent) Restart(ufrag, pwd string) error {
+ if ufrag == "" {
+ var err error
+ ufrag, err = generateUFrag()
+ if err != nil {
+ return err
+ }
+ }
+ if pwd == "" {
+ var err error
+ pwd, err = generatePwd()
+ if err != nil {
+ return err
+ }
+ }
+
+ if len([]rune(ufrag))*8 < 24 {
+ return ErrLocalUfragInsufficientBits
+ }
+ if len([]rune(pwd))*8 < 128 {
+ return ErrLocalPwdInsufficientBits
+ }
+
+ var err error
+ if runErr := a.run(a.context(), func(ctx context.Context, agent *Agent) {
+ if agent.gatheringState == GatheringStateGathering {
+ err = ErrRestartWhenGathering
+ return
+ }
+
+ // Clear all agent needed to take back to fresh state
+ agent.localUfrag = ufrag
+ agent.localPwd = pwd
+ agent.remoteUfrag = ""
+ agent.remotePwd = ""
+ a.gatheringState = GatheringStateNew
+ a.checklist = make([]*candidatePair, 0)
+ a.pendingBindingRequests = make([]bindingRequest, 0)
+ a.setSelectedPair(nil)
+ a.deleteAllCandidates()
+ if a.selector != nil {
+ a.selector.Start()
+ }
+
+ // Restart is used by NewAgent. Accept/Connect should be used to move to checking
+ // for new Agents
+ if a.connectionState != ConnectionStateNew {
+ a.updateConnectionState(ConnectionStateChecking)
+ }
+ }); runErr != nil {
+ return runErr
+ }
+ return err
+}
+
+func (a *Agent) setGatheringState(newState GatheringState) error {
+ done := make(chan struct{})
+ if err := a.run(a.context(), func(ctx context.Context, agent *Agent) {
+ if a.gatheringState != newState && newState == GatheringStateComplete {
+ a.chanCandidate <- nil
+ }
+
+ a.gatheringState = newState
+ close(done)
+ }); err != nil {
+ return err
+ }
+
+ <-done
+ return nil
+}
diff --git a/vendor/github.com/pion/ice/v2/agent_config.go b/vendor/github.com/pion/ice/v2/agent_config.go
new file mode 100644
index 0000000..e09ad76
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/agent_config.go
@@ -0,0 +1,252 @@
+package ice
+
+import (
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/transport/vnet"
+ "golang.org/x/net/proxy"
+)
+
+const (
+ // defaultCheckInterval is the interval at which the agent performs candidate checks in the connecting phase
+ defaultCheckInterval = 200 * time.Millisecond
+
+ // keepaliveInterval used to keep candidates alive
+ defaultKeepaliveInterval = 2 * time.Second
+
+ // defaultDisconnectedTimeout is the default time till an Agent transitions disconnected
+ defaultDisconnectedTimeout = 5 * time.Second
+
+ // defaultFailedTimeout is the default time till an Agent transitions to failed after disconnected
+ defaultFailedTimeout = 25 * time.Second
+
+ // wait time before nominating a host candidate
+ defaultHostAcceptanceMinWait = 0
+
+ // wait time before nominating a srflx candidate
+ defaultSrflxAcceptanceMinWait = 500 * time.Millisecond
+
+ // wait time before nominating a prflx candidate
+ defaultPrflxAcceptanceMinWait = 1000 * time.Millisecond
+
+ // wait time before nominating a relay candidate
+ defaultRelayAcceptanceMinWait = 2000 * time.Millisecond
+
+ // max binding request before considering a pair failed
+ defaultMaxBindingRequests = 7
+
+ // the number of bytes that can be buffered before we start to error
+ maxBufferSize = 1000 * 1000 // 1MB
+
+ // wait time before binding requests can be deleted
+ maxBindingRequestTimeout = 4000 * time.Millisecond
+)
+
+func defaultCandidateTypes() []CandidateType {
+ return []CandidateType{CandidateTypeHost, CandidateTypeServerReflexive, CandidateTypeRelay}
+}
+
+// AgentConfig collects the arguments to ice.Agent construction into
+// a single structure, for future-proofness of the interface
+type AgentConfig struct {
+ Urls []*URL
+
+ // PortMin and PortMax are optional. Leave them 0 for the default UDP port allocation strategy.
+ PortMin uint16
+ PortMax uint16
+
+ // LocalUfrag and LocalPwd values used to perform connectivity
+ // checks. The values MUST be unguessable, with at least 128 bits of
+ // random number generator output used to generate the password, and
+ // at least 24 bits of output to generate the username fragment.
+ LocalUfrag string
+ LocalPwd string
+
+ // MulticastDNSMode controls mDNS behavior for the ICE agent
+ MulticastDNSMode MulticastDNSMode
+
+ // MulticastDNSHostName controls the hostname for this agent. If none is specified a random one will be generated
+ MulticastDNSHostName string
+
+ // DisconnectedTimeout defaults to 5 seconds when this property is nil.
+ // If the duration is 0, the ICE Agent will never go to disconnected
+ DisconnectedTimeout *time.Duration
+
+ // FailedTimeout defaults to 25 seconds when this property is nil.
+ // If the duration is 0, we will never go to failed.
+ FailedTimeout *time.Duration
+
+ // KeepaliveInterval determines how often should we send ICE
+ // keepalives (should be less then connectiontimeout above)
+ // when this is nil, it defaults to 10 seconds.
+ // A keepalive interval of 0 means we never send keepalive packets
+ KeepaliveInterval *time.Duration
+
+ // NetworkTypes is an optional configuration for disabling or enabling
+ // support for specific network types.
+ NetworkTypes []NetworkType
+
+ // CandidateTypes is an optional configuration for disabling or enabling
+ // support for specific candidate types.
+ CandidateTypes []CandidateType
+
+ LoggerFactory logging.LoggerFactory
+
+ // checkInterval controls how often our internal task loop runs when
+ // in the connecting state. Only useful for testing.
+ checkInterval time.Duration
+
+ // MaxBindingRequests is the max amount of binding requests the agent will send
+ // over a candidate pair for validation or nomination, if after MaxBindingRequests
+ // the candidate is yet to answer a binding request or a nomination we set the pair as failed
+ MaxBindingRequests *uint16
+
+ // Lite agents do not perform connectivity check and only provide host candidates.
+ Lite bool
+
+ // NAT1To1IPCandidateType is used along with NAT1To1IPs to specify which candidate type
+ // the 1:1 NAT IP addresses should be mapped to.
+ // If unspecified or CandidateTypeHost, NAT1To1IPs are used to replace host candidate IPs.
+ // If CandidateTypeServerReflexive, it will insert a srflx candidate (as if it was dervied
+ // from a STUN server) with its port number being the one for the actual host candidate.
+ // Other values will result in an error.
+ NAT1To1IPCandidateType CandidateType
+
+ // NAT1To1IPs contains a list of public IP addresses that are to be used as a host
+ // candidate or srflx candidate. This is used typically for servers that are behind
+ // 1:1 D-NAT (e.g. AWS EC2 instances) and to eliminate the need of server reflexisive
+ // candidate gathering.
+ NAT1To1IPs []string
+
+ // HostAcceptanceMinWait specify a minimum wait time before selecting host candidates
+ HostAcceptanceMinWait *time.Duration
+ // HostAcceptanceMinWait specify a minimum wait time before selecting srflx candidates
+ SrflxAcceptanceMinWait *time.Duration
+ // HostAcceptanceMinWait specify a minimum wait time before selecting prflx candidates
+ PrflxAcceptanceMinWait *time.Duration
+ // HostAcceptanceMinWait specify a minimum wait time before selecting relay candidates
+ RelayAcceptanceMinWait *time.Duration
+
+ // Net is the our abstracted network interface for internal development purpose only
+ // (see github.com/pion/transport/vnet)
+ Net *vnet.Net
+
+ // InterfaceFilter is a function that you can use in order to whitelist or blacklist
+ // the interfaces which are used to gather ICE candidates.
+ InterfaceFilter func(string) bool
+
+ // InsecureSkipVerify controls if self-signed certificates are accepted when connecting
+ // to TURN servers via TLS or DTLS
+ InsecureSkipVerify bool
+
+ // TCPMux will be used for multiplexing incoming TCP connections for ICE TCP.
+ // Currently only passive candidates are supported. This functionality is
+ // experimental and the API might change in the future.
+ TCPMux TCPMux
+
+ // Proxy Dialer is a dialer that should be implemented by the user based on golang.org/x/net/proxy
+ // dial interface in order to support corporate proxies
+ ProxyDialer proxy.Dialer
+}
+
+// initWithDefaults populates an agent and falls back to defaults if fields are unset
+func (config *AgentConfig) initWithDefaults(a *Agent) {
+ if config.MaxBindingRequests == nil {
+ a.maxBindingRequests = defaultMaxBindingRequests
+ } else {
+ a.maxBindingRequests = *config.MaxBindingRequests
+ }
+
+ if config.HostAcceptanceMinWait == nil {
+ a.hostAcceptanceMinWait = defaultHostAcceptanceMinWait
+ } else {
+ a.hostAcceptanceMinWait = *config.HostAcceptanceMinWait
+ }
+
+ if config.SrflxAcceptanceMinWait == nil {
+ a.srflxAcceptanceMinWait = defaultSrflxAcceptanceMinWait
+ } else {
+ a.srflxAcceptanceMinWait = *config.SrflxAcceptanceMinWait
+ }
+
+ if config.PrflxAcceptanceMinWait == nil {
+ a.prflxAcceptanceMinWait = defaultPrflxAcceptanceMinWait
+ } else {
+ a.prflxAcceptanceMinWait = *config.PrflxAcceptanceMinWait
+ }
+
+ if config.RelayAcceptanceMinWait == nil {
+ a.relayAcceptanceMinWait = defaultRelayAcceptanceMinWait
+ } else {
+ a.relayAcceptanceMinWait = *config.RelayAcceptanceMinWait
+ }
+
+ if config.DisconnectedTimeout == nil {
+ a.disconnectedTimeout = defaultDisconnectedTimeout
+ } else {
+ a.disconnectedTimeout = *config.DisconnectedTimeout
+ }
+
+ if config.FailedTimeout == nil {
+ a.failedTimeout = defaultFailedTimeout
+ } else {
+ a.failedTimeout = *config.FailedTimeout
+ }
+
+ if config.KeepaliveInterval == nil {
+ a.keepaliveInterval = defaultKeepaliveInterval
+ } else {
+ a.keepaliveInterval = *config.KeepaliveInterval
+ }
+
+ if config.checkInterval == 0 {
+ a.checkInterval = defaultCheckInterval
+ } else {
+ a.checkInterval = config.checkInterval
+ }
+
+ if config.CandidateTypes == nil || len(config.CandidateTypes) == 0 {
+ a.candidateTypes = defaultCandidateTypes()
+ } else {
+ a.candidateTypes = config.CandidateTypes
+ }
+}
+
+func (config *AgentConfig) initExtIPMapping(a *Agent) error {
+ var err error
+ a.extIPMapper, err = newExternalIPMapper(config.NAT1To1IPCandidateType, config.NAT1To1IPs)
+ if err != nil {
+ return err
+ }
+ if a.extIPMapper == nil {
+ return nil // this may happen when config.NAT1To1IPs is an empty array
+ }
+ if a.extIPMapper.candidateType == CandidateTypeHost {
+ if a.mDNSMode == MulticastDNSModeQueryAndGather {
+ return ErrMulticastDNSWithNAT1To1IPMapping
+ }
+ candiHostEnabled := false
+ for _, candiType := range a.candidateTypes {
+ if candiType == CandidateTypeHost {
+ candiHostEnabled = true
+ break
+ }
+ }
+ if !candiHostEnabled {
+ return ErrIneffectiveNAT1To1IPMappingHost
+ }
+ } else if a.extIPMapper.candidateType == CandidateTypeServerReflexive {
+ candiSrflxEnabled := false
+ for _, candiType := range a.candidateTypes {
+ if candiType == CandidateTypeServerReflexive {
+ candiSrflxEnabled = true
+ break
+ }
+ }
+ if !candiSrflxEnabled {
+ return ErrIneffectiveNAT1To1IPMappingSrflx
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/pion/ice/v2/agent_stats.go b/vendor/github.com/pion/ice/v2/agent_stats.go
new file mode 100644
index 0000000..18d9ed8
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/agent_stats.go
@@ -0,0 +1,113 @@
+package ice
+
+import (
+ "context"
+ "time"
+)
+
+// GetCandidatePairsStats returns a list of candidate pair stats
+func (a *Agent) GetCandidatePairsStats() []CandidatePairStats {
+ var res []CandidatePairStats
+ err := a.run(a.context(), func(ctx context.Context, agent *Agent) {
+ result := make([]CandidatePairStats, 0, len(agent.checklist))
+ for _, cp := range agent.checklist {
+ stat := CandidatePairStats{
+ Timestamp: time.Now(),
+ LocalCandidateID: cp.local.ID(),
+ RemoteCandidateID: cp.remote.ID(),
+ State: cp.state,
+ Nominated: cp.nominated,
+ // PacketsSent uint32
+ // PacketsReceived uint32
+ // BytesSent uint64
+ // BytesReceived uint64
+ // LastPacketSentTimestamp time.Time
+ // LastPacketReceivedTimestamp time.Time
+ // FirstRequestTimestamp time.Time
+ // LastRequestTimestamp time.Time
+ // LastResponseTimestamp time.Time
+ // TotalRoundTripTime float64
+ // CurrentRoundTripTime float64
+ // AvailableOutgoingBitrate float64
+ // AvailableIncomingBitrate float64
+ // CircuitBreakerTriggerCount uint32
+ // RequestsReceived uint64
+ // RequestsSent uint64
+ // ResponsesReceived uint64
+ // ResponsesSent uint64
+ // RetransmissionsReceived uint64
+ // RetransmissionsSent uint64
+ // ConsentRequestsSent uint64
+ // ConsentExpiredTimestamp time.Time
+ }
+ result = append(result, stat)
+ }
+ res = result
+ })
+ if err != nil {
+ a.log.Errorf("error getting candidate pairs stats %v", err)
+ return []CandidatePairStats{}
+ }
+ return res
+}
+
+// GetLocalCandidatesStats returns a list of local candidates stats
+func (a *Agent) GetLocalCandidatesStats() []CandidateStats {
+ var res []CandidateStats
+ err := a.run(a.context(), func(ctx context.Context, agent *Agent) {
+ result := make([]CandidateStats, 0, len(agent.localCandidates))
+ for networkType, localCandidates := range agent.localCandidates {
+ for _, c := range localCandidates {
+ stat := CandidateStats{
+ Timestamp: time.Now(),
+ ID: c.ID(),
+ NetworkType: networkType,
+ IP: c.Address(),
+ Port: c.Port(),
+ CandidateType: c.Type(),
+ Priority: c.Priority(),
+ // URL string
+ RelayProtocol: "udp",
+ // Deleted bool
+ }
+ result = append(result, stat)
+ }
+ }
+ res = result
+ })
+ if err != nil {
+ a.log.Errorf("error getting candidate pairs stats %v", err)
+ return []CandidateStats{}
+ }
+ return res
+}
+
+// GetRemoteCandidatesStats returns a list of remote candidates stats
+func (a *Agent) GetRemoteCandidatesStats() []CandidateStats {
+ var res []CandidateStats
+ err := a.run(a.context(), func(ctx context.Context, agent *Agent) {
+ result := make([]CandidateStats, 0, len(agent.remoteCandidates))
+ for networkType, localCandidates := range agent.remoteCandidates {
+ for _, c := range localCandidates {
+ stat := CandidateStats{
+ Timestamp: time.Now(),
+ ID: c.ID(),
+ NetworkType: networkType,
+ IP: c.Address(),
+ Port: c.Port(),
+ CandidateType: c.Type(),
+ Priority: c.Priority(),
+ // URL string
+ RelayProtocol: "udp",
+ }
+ result = append(result, stat)
+ }
+ }
+ res = result
+ })
+ if err != nil {
+ a.log.Errorf("error getting candidate pairs stats %v", err)
+ return []CandidateStats{}
+ }
+ return res
+}
diff --git a/vendor/github.com/pion/ice/v2/candidate.go b/vendor/github.com/pion/ice/v2/candidate.go
new file mode 100644
index 0000000..701f8f8
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/candidate.go
@@ -0,0 +1,68 @@
+package ice
+
+import (
+ "context"
+ "net"
+ "time"
+)
+
+const (
+ receiveMTU = 8192
+ defaultLocalPreference = 65535
+
+ // ComponentRTP indicates that the candidate is used for RTP
+ ComponentRTP uint16 = 1
+ // ComponentRTCP indicates that the candidate is used for RTCP
+ ComponentRTCP
+)
+
+// Candidate represents an ICE candidate
+type Candidate interface {
+ // An arbitrary string used in the freezing algorithm to
+ // group similar candidates. It is the same for two candidates that
+ // have the same type, base IP address, protocol (UDP, TCP, etc.),
+ // and STUN or TURN server.
+ Foundation() string
+
+ // ID is a unique identifier for just this candidate
+ // Unlike the foundation this is different for each candidate
+ ID() string
+
+ // A component is a piece of a data stream.
+ // An example is one for RTP, and one for RTCP
+ Component() uint16
+ SetComponent(uint16)
+
+ // The last time this candidate received traffic
+ LastReceived() time.Time
+
+ // The last time this candidate sent traffic
+ LastSent() time.Time
+
+ NetworkType() NetworkType
+ Address() string
+ Port() int
+
+ Priority() uint32
+
+ // A transport address related to a
+ // candidate, which is useful for diagnostics and other purposes
+ RelatedAddress() *CandidateRelatedAddress
+
+ String() string
+ Type() CandidateType
+ TCPType() TCPType
+
+ Equal(other Candidate) bool
+
+ Marshal() string
+
+ addr() net.Addr
+ agent() *Agent
+ context() context.Context
+
+ close() error
+ seen(outbound bool)
+ start(a *Agent, conn net.PacketConn, initializedCh <-chan struct{})
+ writeTo(raw []byte, dst Candidate) (int, error)
+}
diff --git a/vendor/github.com/pion/ice/v2/candidate_base.go b/vendor/github.com/pion/ice/v2/candidate_base.go
new file mode 100644
index 0000000..2f16a8a
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/candidate_base.go
@@ -0,0 +1,496 @@
+package ice
+
+import (
+ "context"
+ "fmt"
+ "hash/crc32"
+ "net"
+ "strconv"
+ "strings"
+ "sync/atomic"
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/stun"
+)
+
+type candidateBase struct {
+ id string
+ networkType NetworkType
+ candidateType CandidateType
+
+ component uint16
+ address string
+ port int
+ relatedAddress *CandidateRelatedAddress
+ tcpType TCPType
+
+ resolvedAddr net.Addr
+
+ lastSent atomic.Value
+ lastReceived atomic.Value
+ conn net.PacketConn
+
+ currAgent *Agent
+ closeCh chan struct{}
+ closedCh chan struct{}
+
+ foundationOverride string
+ priorityOverride uint32
+}
+
+// Done implements context.Context
+func (c *candidateBase) Done() <-chan struct{} {
+ return c.closeCh
+}
+
+// Err implements context.Context
+func (c *candidateBase) Err() error {
+ select {
+ case <-c.closedCh:
+ return ErrRunCanceled
+ default:
+ return nil
+ }
+}
+
+// Deadline implements context.Context
+func (c *candidateBase) Deadline() (deadline time.Time, ok bool) {
+ return time.Time{}, false
+}
+
+// Value implements context.Context
+func (c *candidateBase) Value(key interface{}) interface{} {
+ return nil
+}
+
+// ID returns Candidate ID
+func (c *candidateBase) ID() string {
+ return c.id
+}
+
+func (c *candidateBase) Foundation() string {
+ if c.foundationOverride != "" {
+ return c.foundationOverride
+ }
+
+ return fmt.Sprintf("%d", crc32.ChecksumIEEE([]byte(c.Type().String()+c.address+c.networkType.String())))
+}
+
+// Address returns Candidate Address
+func (c *candidateBase) Address() string {
+ return c.address
+}
+
+// Port returns Candidate Port
+func (c *candidateBase) Port() int {
+ return c.port
+}
+
+// Type returns candidate type
+func (c *candidateBase) Type() CandidateType {
+ return c.candidateType
+}
+
+// NetworkType returns candidate NetworkType
+func (c *candidateBase) NetworkType() NetworkType {
+ return c.networkType
+}
+
+// Component returns candidate component
+func (c *candidateBase) Component() uint16 {
+ return c.component
+}
+
+func (c *candidateBase) SetComponent(component uint16) {
+ c.component = component
+}
+
+// LocalPreference returns the local preference for this candidate
+func (c *candidateBase) LocalPreference() uint16 {
+ if c.NetworkType().IsTCP() {
+ // RFC 6544, section 4.2
+ //
+ // In Section 4.1.2.1 of [RFC5245], a recommended formula for UDP ICE
+ // candidate prioritization is defined. For TCP candidates, the same
+ // formula and candidate type preferences SHOULD be used, and the
+ // RECOMMENDED type preferences for the new candidate types defined in
+ // this document (see Section 5) are 105 for NAT-assisted candidates and
+ // 75 for UDP-tunneled candidates.
+ //
+ // (...)
+ //
+ // With TCP candidates, the local preference part of the recommended
+ // priority formula is updated to also include the directionality
+ // (active, passive, or simultaneous-open) of the TCP connection. The
+ // RECOMMENDED local preference is then defined as:
+ //
+ // local preference = (2^13) * direction-pref + other-pref
+ //
+ // The direction-pref MUST be between 0 and 7 (both inclusive), with 7
+ // being the most preferred. The other-pref MUST be between 0 and 8191
+ // (both inclusive), with 8191 being the most preferred. It is
+ // RECOMMENDED that the host, UDP-tunneled, and relayed TCP candidates
+ // have the direction-pref assigned as follows: 6 for active, 4 for
+ // passive, and 2 for S-O. For the NAT-assisted and server reflexive
+ // candidates, the RECOMMENDED values are: 6 for S-O, 4 for active, and
+ // 2 for passive.
+ //
+ // (...)
+ //
+ // If any two candidates have the same type-preference and direction-
+ // pref, they MUST have a unique other-pref. With this specification,
+ // this usually only happens with multi-homed hosts, in which case
+ // other-pref is the preference for the particular IP address from which
+ // the candidate was obtained. When there is only a single IP address,
+ // this value SHOULD be set to the maximum allowed value (8191).
+ var otherPref uint16 = 8191
+
+ directionPref := func() uint16 {
+ switch c.Type() {
+ case CandidateTypeHost, CandidateTypeRelay:
+ switch c.tcpType {
+ case TCPTypeActive:
+ return 6
+ case TCPTypePassive:
+ return 4
+ case TCPTypeSimultaneousOpen:
+ return 2
+ case TCPTypeUnspecified:
+ return 0
+ }
+ case CandidateTypePeerReflexive, CandidateTypeServerReflexive:
+ switch c.tcpType {
+ case TCPTypeSimultaneousOpen:
+ return 6
+ case TCPTypeActive:
+ return 4
+ case TCPTypePassive:
+ return 2
+ case TCPTypeUnspecified:
+ return 0
+ }
+ case CandidateTypeUnspecified:
+ return 0
+ }
+ return 0
+ }()
+
+ return (1<<13)*directionPref + otherPref
+ }
+
+ return defaultLocalPreference
+}
+
+// RelatedAddress returns *CandidateRelatedAddress
+func (c *candidateBase) RelatedAddress() *CandidateRelatedAddress {
+ return c.relatedAddress
+}
+
+func (c *candidateBase) TCPType() TCPType {
+ return c.tcpType
+}
+
+// start runs the candidate using the provided connection
+func (c *candidateBase) start(a *Agent, conn net.PacketConn, initializedCh <-chan struct{}) {
+ if c.conn != nil {
+ c.agent().log.Warn("Can't start already started candidateBase")
+ return
+ }
+ c.currAgent = a
+ c.conn = conn
+ c.closeCh = make(chan struct{})
+ c.closedCh = make(chan struct{})
+
+ go c.recvLoop(initializedCh)
+}
+
+func (c *candidateBase) recvLoop(initializedCh <-chan struct{}) {
+ defer func() {
+ close(c.closedCh)
+ }()
+
+ select {
+ case <-initializedCh:
+ case <-c.closeCh:
+ return
+ }
+
+ log := c.agent().log
+ buffer := make([]byte, receiveMTU)
+ for {
+ n, srcAddr, err := c.conn.ReadFrom(buffer)
+ if err != nil {
+ return
+ }
+
+ handleInboundCandidateMsg(c, c, buffer[:n], srcAddr, log)
+ }
+}
+
+func handleInboundCandidateMsg(ctx context.Context, c Candidate, buffer []byte, srcAddr net.Addr, log logging.LeveledLogger) {
+ if stun.IsMessage(buffer) {
+ m := &stun.Message{
+ Raw: make([]byte, len(buffer)),
+ }
+ // Explicitly copy raw buffer so Message can own the memory.
+ copy(m.Raw, buffer)
+ if err := m.Decode(); err != nil {
+ log.Warnf("Failed to handle decode ICE from %s to %s: %v", c.addr(), srcAddr, err)
+ return
+ }
+ err := c.agent().run(ctx, func(ctx context.Context, agent *Agent) {
+ agent.handleInbound(m, c, srcAddr)
+ })
+ if err != nil {
+ log.Warnf("Failed to handle message: %v", err)
+ }
+
+ return
+ }
+
+ if !c.agent().validateNonSTUNTraffic(c, srcAddr) {
+ log.Warnf("Discarded message from %s, not a valid remote candidate", c.addr())
+ return
+ }
+
+ // NOTE This will return packetio.ErrFull if the buffer ever manages to fill up.
+ if _, err := c.agent().buffer.Write(buffer); err != nil {
+ log.Warnf("failed to write packet")
+ }
+}
+
+// close stops the recvLoop
+func (c *candidateBase) close() error {
+ // If conn has never been started will be nil
+ if c.Done() == nil {
+ return nil
+ }
+
+ // Assert that conn has not already been closed
+ select {
+ case <-c.Done():
+ return nil
+ default:
+ }
+
+ var firstErr error
+
+ // Unblock recvLoop
+ close(c.closeCh)
+ if err := c.conn.SetDeadline(time.Now()); err != nil {
+ firstErr = err
+ }
+
+ // Close the conn
+ if err := c.conn.Close(); err != nil && firstErr == nil {
+ firstErr = err
+ }
+
+ if firstErr != nil {
+ return firstErr
+ }
+
+ // Wait until the recvLoop is closed
+ <-c.closedCh
+
+ return nil
+}
+
+func (c *candidateBase) writeTo(raw []byte, dst Candidate) (int, error) {
+ n, err := c.conn.WriteTo(raw, dst.addr())
+ if err != nil {
+ c.agent().log.Warnf("%s: %v", errSendPacket, err)
+ return n, nil
+ }
+ c.seen(true)
+ return n, nil
+}
+
+// Priority computes the priority for this ICE Candidate
+func (c *candidateBase) Priority() uint32 {
+ if c.priorityOverride != 0 {
+ return c.priorityOverride
+ }
+
+ // The local preference MUST be an integer from 0 (lowest preference) to
+ // 65535 (highest preference) inclusive. When there is only a single IP
+ // address, this value SHOULD be set to 65535. If there are multiple
+ // candidates for a particular component for a particular data stream
+ // that have the same type, the local preference MUST be unique for each
+ // one.
+ return (1<<24)*uint32(c.Type().Preference()) +
+ (1<<8)*uint32(c.LocalPreference()) +
+ uint32(256-c.Component())
+}
+
+// Equal is used to compare two candidateBases
+func (c *candidateBase) Equal(other Candidate) bool {
+ return c.NetworkType() == other.NetworkType() &&
+ c.Type() == other.Type() &&
+ c.Address() == other.Address() &&
+ c.Port() == other.Port() &&
+ c.TCPType() == other.TCPType() &&
+ c.RelatedAddress().Equal(other.RelatedAddress())
+}
+
+// String makes the candidateBase printable
+func (c *candidateBase) String() string {
+ return fmt.Sprintf("%s %s %s:%d%s", c.NetworkType(), c.Type(), c.Address(), c.Port(), c.relatedAddress)
+}
+
+// LastReceived returns a time.Time indicating the last time
+// this candidate was received
+func (c *candidateBase) LastReceived() time.Time {
+ lastReceived := c.lastReceived.Load()
+ if lastReceived == nil {
+ return time.Time{}
+ }
+ return lastReceived.(time.Time)
+}
+
+func (c *candidateBase) setLastReceived(t time.Time) {
+ c.lastReceived.Store(t)
+}
+
+// LastSent returns a time.Time indicating the last time
+// this candidate was sent
+func (c *candidateBase) LastSent() time.Time {
+ lastSent := c.lastSent.Load()
+ if lastSent == nil {
+ return time.Time{}
+ }
+ return lastSent.(time.Time)
+}
+
+func (c *candidateBase) setLastSent(t time.Time) {
+ c.lastSent.Store(t)
+}
+
+func (c *candidateBase) seen(outbound bool) {
+ if outbound {
+ c.setLastSent(time.Now())
+ } else {
+ c.setLastReceived(time.Now())
+ }
+}
+
+func (c *candidateBase) addr() net.Addr {
+ return c.resolvedAddr
+}
+
+func (c *candidateBase) agent() *Agent {
+ return c.currAgent
+}
+
+func (c *candidateBase) context() context.Context {
+ return c
+}
+
+// Marshal returns the string representation of the ICECandidate
+func (c *candidateBase) Marshal() string {
+ val := fmt.Sprintf("%s %d %s %d %s %d typ %s",
+ c.Foundation(),
+ c.Component(),
+ c.NetworkType().NetworkShort(),
+ c.Priority(),
+ c.Address(),
+ c.Port(),
+ c.Type())
+
+ if c.tcpType != TCPTypeUnspecified {
+ val += fmt.Sprintf(" tcptype %s", c.tcpType.String())
+ }
+
+ if c.RelatedAddress() != nil {
+ val = fmt.Sprintf("%s raddr %s rport %d",
+ val,
+ c.RelatedAddress().Address,
+ c.RelatedAddress().Port)
+ }
+
+ return val
+}
+
+// UnmarshalCandidate creates a Candidate from its string representation
+func UnmarshalCandidate(raw string) (Candidate, error) {
+ split := strings.Fields(raw)
+ if len(split) < 8 {
+ return nil, fmt.Errorf("%w (%d)", errAttributeTooShortICECandidate, len(split))
+ }
+
+ // Foundation
+ foundation := split[0]
+
+ // Component
+ rawComponent, err := strconv.ParseUint(split[1], 10, 16)
+ if err != nil {
+ return nil, fmt.Errorf("%w: %v", errParseComponent, err)
+ }
+ component := uint16(rawComponent)
+
+ // Protocol
+ protocol := split[2]
+
+ // Priority
+ priorityRaw, err := strconv.ParseUint(split[3], 10, 32)
+ if err != nil {
+ return nil, fmt.Errorf("%w: %v", errParsePriority, err)
+ }
+ priority := uint32(priorityRaw)
+
+ // Address
+ address := split[4]
+
+ // Port
+ rawPort, err := strconv.ParseUint(split[5], 10, 16)
+ if err != nil {
+ return nil, fmt.Errorf("%w: %v", errParsePort, err)
+ }
+ port := int(rawPort)
+ typ := split[7]
+
+ relatedAddress := ""
+ relatedPort := 0
+ tcpType := TCPTypeUnspecified
+
+ if len(split) > 8 {
+ split = split[8:]
+
+ if split[0] == "raddr" {
+ if len(split) < 4 {
+ return nil, fmt.Errorf("%w: incorrect length", errParseRelatedAddr)
+ }
+
+ // RelatedAddress
+ relatedAddress = split[1]
+
+ // RelatedPort
+ rawRelatedPort, parseErr := strconv.ParseUint(split[3], 10, 16)
+ if parseErr != nil {
+ return nil, fmt.Errorf("%w: %v", errParsePort, parseErr)
+ }
+ relatedPort = int(rawRelatedPort)
+ } else if split[0] == "tcptype" {
+ if len(split) < 2 {
+ return nil, fmt.Errorf("%w: incorrect length", errParseTypType)
+ }
+
+ tcpType = NewTCPType(split[1])
+ }
+ }
+
+ switch typ {
+ case "host":
+ return NewCandidateHost(&CandidateHostConfig{"", protocol, address, port, component, priority, foundation, tcpType})
+ case "srflx":
+ return NewCandidateServerReflexive(&CandidateServerReflexiveConfig{"", protocol, address, port, component, priority, foundation, relatedAddress, relatedPort})
+ case "prflx":
+ return NewCandidatePeerReflexive(&CandidatePeerReflexiveConfig{"", protocol, address, port, component, priority, foundation, relatedAddress, relatedPort})
+ case "relay":
+ return NewCandidateRelay(&CandidateRelayConfig{"", protocol, address, port, component, priority, foundation, relatedAddress, relatedPort, nil})
+ default:
+ }
+
+ return nil, fmt.Errorf("%w (%s)", errUnknownCandidateTyp, typ)
+}
diff --git a/vendor/github.com/pion/ice/v2/candidate_host.go b/vendor/github.com/pion/ice/v2/candidate_host.go
new file mode 100644
index 0000000..b03dbdb
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/candidate_host.go
@@ -0,0 +1,76 @@
+package ice
+
+import (
+ "net"
+ "strings"
+)
+
+// CandidateHost is a candidate of type host
+type CandidateHost struct {
+ candidateBase
+
+ network string
+}
+
+// CandidateHostConfig is the config required to create a new CandidateHost
+type CandidateHostConfig struct {
+ CandidateID string
+ Network string
+ Address string
+ Port int
+ Component uint16
+ Priority uint32
+ Foundation string
+ TCPType TCPType
+}
+
+// NewCandidateHost creates a new host candidate
+func NewCandidateHost(config *CandidateHostConfig) (*CandidateHost, error) {
+ candidateID := config.CandidateID
+
+ if candidateID == "" {
+ candidateID = globalCandidateIDGenerator.Generate()
+ }
+
+ c := &CandidateHost{
+ candidateBase: candidateBase{
+ id: candidateID,
+ address: config.Address,
+ candidateType: CandidateTypeHost,
+ component: config.Component,
+ port: config.Port,
+ tcpType: config.TCPType,
+ foundationOverride: config.Foundation,
+ priorityOverride: config.Priority,
+ },
+ network: config.Network,
+ }
+
+ if !strings.HasSuffix(config.Address, ".local") {
+ ip := net.ParseIP(config.Address)
+ if ip == nil {
+ return nil, ErrAddressParseFailed
+ }
+
+ if err := c.setIP(ip); err != nil {
+ return nil, err
+ }
+ } else {
+ // Until mDNS candidate is resolved assume it is UDPv4
+ c.candidateBase.networkType = NetworkTypeUDP4
+ }
+
+ return c, nil
+}
+
+func (c *CandidateHost) setIP(ip net.IP) error {
+ networkType, err := determineNetworkType(c.network, ip)
+ if err != nil {
+ return err
+ }
+
+ c.candidateBase.networkType = networkType
+ c.candidateBase.resolvedAddr = createAddr(networkType, ip, c.port)
+
+ return nil
+}
diff --git a/vendor/github.com/pion/ice/v2/candidate_peer_reflexive.go b/vendor/github.com/pion/ice/v2/candidate_peer_reflexive.go
new file mode 100644
index 0000000..0b330d1
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/candidate_peer_reflexive.go
@@ -0,0 +1,60 @@
+// Package ice ...
+//nolint:dupl
+package ice
+
+import "net"
+
+// CandidatePeerReflexive ...
+type CandidatePeerReflexive struct {
+ candidateBase
+}
+
+// CandidatePeerReflexiveConfig is the config required to create a new CandidatePeerReflexive
+type CandidatePeerReflexiveConfig struct {
+ CandidateID string
+ Network string
+ Address string
+ Port int
+ Component uint16
+ Priority uint32
+ Foundation string
+ RelAddr string
+ RelPort int
+}
+
+// NewCandidatePeerReflexive creates a new peer reflective candidate
+func NewCandidatePeerReflexive(config *CandidatePeerReflexiveConfig) (*CandidatePeerReflexive, error) {
+ ip := net.ParseIP(config.Address)
+ if ip == nil {
+ return nil, ErrAddressParseFailed
+ }
+
+ networkType, err := determineNetworkType(config.Network, ip)
+ if err != nil {
+ return nil, err
+ }
+
+ candidateID := config.CandidateID
+ candidateIDGenerator := newCandidateIDGenerator()
+ if candidateID == "" {
+ candidateID = candidateIDGenerator.Generate()
+ }
+
+ return &CandidatePeerReflexive{
+ candidateBase: candidateBase{
+ id: candidateID,
+ networkType: networkType,
+ candidateType: CandidateTypePeerReflexive,
+ address: config.Address,
+ port: config.Port,
+ resolvedAddr: createAddr(networkType, ip, config.Port),
+ component: config.Component,
+ foundationOverride: config.Foundation,
+ priorityOverride: config.Priority,
+ relatedAddress: &CandidateRelatedAddress{
+ Address: config.RelAddr,
+ Port: config.RelPort,
+ },
+ },
+ }, nil
+}
diff --git a/vendor/github.com/pion/ice/v2/candidate_relay.go b/vendor/github.com/pion/ice/v2/candidate_relay.go
new file mode 100644
index 0000000..44762f7
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/candidate_relay.go
@@ -0,0 +1,73 @@
+package ice
+
+import (
+ "net"
+)
+
+// CandidateRelay ...
+type CandidateRelay struct {
+ candidateBase
+
+ onClose func() error
+}
+
+// CandidateRelayConfig is the config required to create a new CandidateRelay
+type CandidateRelayConfig struct {
+ CandidateID string
+ Network string
+ Address string
+ Port int
+ Component uint16
+ Priority uint32
+ Foundation string
+ RelAddr string
+ RelPort int
+ OnClose func() error
+}
+
+// NewCandidateRelay creates a new relay candidate
+func NewCandidateRelay(config *CandidateRelayConfig) (*CandidateRelay, error) {
+ candidateID := config.CandidateID
+
+ if candidateID == "" {
+ candidateID = globalCandidateIDGenerator.Generate()
+ }
+
+ ip := net.ParseIP(config.Address)
+ if ip == nil {
+ return nil, ErrAddressParseFailed
+ }
+
+ networkType, err := determineNetworkType(config.Network, ip)
+ if err != nil {
+ return nil, err
+ }
+
+ return &CandidateRelay{
+ candidateBase: candidateBase{
+ id: candidateID,
+ networkType: networkType,
+ candidateType: CandidateTypeRelay,
+ address: config.Address,
+ port: config.Port,
+ resolvedAddr: &net.UDPAddr{IP: ip, Port: config.Port},
+ component: config.Component,
+ foundationOverride: config.Foundation,
+ priorityOverride: config.Priority,
+ relatedAddress: &CandidateRelatedAddress{
+ Address: config.RelAddr,
+ Port: config.RelPort,
+ },
+ },
+ onClose: config.OnClose,
+ }, nil
+}
+
+func (c *CandidateRelay) close() error {
+ err := c.candidateBase.close()
+ if c.onClose != nil {
+ err = c.onClose()
+ c.onClose = nil
+ }
+ return err
+}
diff --git a/vendor/github.com/pion/ice/v2/candidate_server_reflexive.go b/vendor/github.com/pion/ice/v2/candidate_server_reflexive.go
new file mode 100644
index 0000000..125a537
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/candidate_server_reflexive.go
@@ -0,0 +1,59 @@
+// Package ice ...
+//nolint:dupl
+package ice
+
+import "net"
+
+// CandidateServerReflexive ...
+type CandidateServerReflexive struct {
+ candidateBase
+}
+
+// CandidateServerReflexiveConfig is the config required to create a new CandidateServerReflexive
+type CandidateServerReflexiveConfig struct {
+ CandidateID string
+ Network string
+ Address string
+ Port int
+ Component uint16
+ Priority uint32
+ Foundation string
+ RelAddr string
+ RelPort int
+}
+
+// NewCandidateServerReflexive creates a new server reflective candidate
+func NewCandidateServerReflexive(config *CandidateServerReflexiveConfig) (*CandidateServerReflexive, error) {
+ ip := net.ParseIP(config.Address)
+ if ip == nil {
+ return nil, ErrAddressParseFailed
+ }
+
+ networkType, err := determineNetworkType(config.Network, ip)
+ if err != nil {
+ return nil, err
+ }
+
+ candidateID := config.CandidateID
+ if candidateID == "" {
+ candidateID = globalCandidateIDGenerator.Generate()
+ }
+
+ return &CandidateServerReflexive{
+ candidateBase: candidateBase{
+ id: candidateID,
+ networkType: networkType,
+ candidateType: CandidateTypeServerReflexive,
+ address: config.Address,
+ port: config.Port,
+ resolvedAddr: &net.UDPAddr{IP: ip, Port: config.Port},
+ component: config.Component,
+ foundationOverride: config.Foundation,
+ priorityOverride: config.Priority,
+ relatedAddress: &CandidateRelatedAddress{
+ Address: config.RelAddr,
+ Port: config.RelPort,
+ },
+ },
+ }, nil
+}
diff --git a/vendor/github.com/pion/ice/v2/candidatepair.go b/vendor/github.com/pion/ice/v2/candidatepair.go
new file mode 100644
index 0000000..49dec37
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/candidatepair.go
@@ -0,0 +1,98 @@
+package ice
+
+import (
+ "fmt"
+
+ "github.com/pion/stun"
+)
+
+func newCandidatePair(local, remote Candidate, controlling bool) *candidatePair {
+ return &candidatePair{
+ iceRoleControlling: controlling,
+ remote: remote,
+ local: local,
+ state: CandidatePairStateWaiting,
+ }
+}
+
+// candidatePair represents a combination of a local and remote candidate
+type candidatePair struct {
+ iceRoleControlling bool
+ remote Candidate
+ local Candidate
+ bindingRequestCount uint16
+ state CandidatePairState
+ nominated bool
+}
+
+func (p *candidatePair) String() string {
+ if p == nil {
+ return ""
+ }
+
+ return fmt.Sprintf("prio %d (local, prio %d) %s <-> %s (remote, prio %d)",
+ p.Priority(), p.local.Priority(), p.local, p.remote, p.remote.Priority())
+}
+
+func (p *candidatePair) Equal(other *candidatePair) bool {
+ if p == nil && other == nil {
+ return true
+ }
+ if p == nil || other == nil {
+ return false
+ }
+ return p.local.Equal(other.local) && p.remote.Equal(other.remote)
+}
+
+// RFC 5245 - 5.7.2. Computing Pair Priority and Ordering Pairs
+// Let G be the priority for the candidate provided by the controlling
+// agent. Let D be the priority for the candidate provided by the
+// controlled agent.
+// pair priority = 2^32*MIN(G,D) + 2*MAX(G,D) + (G>D?1:0)
+func (p *candidatePair) Priority() uint64 {
+ var g uint32
+ var d uint32
+ if p.iceRoleControlling {
+ g = p.local.Priority()
+ d = p.remote.Priority()
+ } else {
+ g = p.remote.Priority()
+ d = p.local.Priority()
+ }
+
+ // Just implement these here rather
+ // than fooling around with the math package
+ min := func(x, y uint32) uint64 {
+ if x < y {
+ return uint64(x)
+ }
+ return uint64(y)
+ }
+ max := func(x, y uint32) uint64 {
+ if x > y {
+ return uint64(x)
+ }
+ return uint64(y)
+ }
+ cmp := func(x, y uint32) uint64 {
+ if x > y {
+ return uint64(1)
+ }
+ return uint64(0)
+ }
+
+ // 1<<32 overflows uint32; and if both g && d are
+ // maxUint32, this result would overflow uint64
+ return (1<<32-1)*min(g, d) + 2*max(g, d) + cmp(g, d)
+}
+
+func (p *candidatePair) Write(b []byte) (int, error) {
+ return p.local.writeTo(b, p.remote)
+}
+
+func (a *Agent) sendSTUN(msg *stun.Message, local, remote Candidate) {
+ _, err := local.writeTo(msg.Raw, remote)
+ if err != nil {
+ a.log.Tracef("failed to send STUN message: %s", err)
+ }
+}
diff --git a/vendor/github.com/pion/ice/v2/candidatepair_state.go b/vendor/github.com/pion/ice/v2/candidatepair_state.go
new file mode 100644
index 0000000..28c7187
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/candidatepair_state.go
@@ -0,0 +1,37 @@
+package ice
+
+// CandidatePairState represent the ICE candidate pair state
+type CandidatePairState int
+
+const (
+ // CandidatePairStateWaiting means a check has not been performed for
+ // this pair
+ CandidatePairStateWaiting = iota + 1
+
+ // CandidatePairStateInProgress means a check has been sent for this pair,
+ // but the transaction is in progress.
+ CandidatePairStateInProgress
+
+ // CandidatePairStateFailed means a check for this pair was already done
+ // and failed, either never producing any response or producing an unrecoverable
+ // failure response.
+ CandidatePairStateFailed
+
+ // CandidatePairStateSucceeded means a check for this pair was already
+ // done and produced a successful result.
+ CandidatePairStateSucceeded
+)
+
+func (c CandidatePairState) String() string {
+ switch c {
+ case CandidatePairStateWaiting:
+ return "waiting"
+ case CandidatePairStateInProgress:
+ return "in-progress"
+ case CandidatePairStateFailed:
+ return "failed"
+ case CandidatePairStateSucceeded:
+ return "succeeded"
+ }
+ return "Unknown candidate pair state"
+}
diff --git a/vendor/github.com/pion/ice/v2/candidaterelatedaddress.go b/vendor/github.com/pion/ice/v2/candidaterelatedaddress.go
new file mode 100644
index 0000000..18cf318
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/candidaterelatedaddress.go
@@ -0,0 +1,30 @@
+package ice
+
+import "fmt"
+
+// CandidateRelatedAddress convey transport addresses related to the
+// candidate, useful for diagnostics and other purposes.
+type CandidateRelatedAddress struct {
+ Address string
+ Port int
+}
+
+// String makes CandidateRelatedAddress printable
+func (c *CandidateRelatedAddress) String() string {
+ if c == nil {
+ return ""
+ }
+
+ return fmt.Sprintf(" related %s:%d", c.Address, c.Port)
+}
+
+// Equal allows comparing two CandidateRelatedAddresses.
+// The CandidateRelatedAddress are allowed to be nil.
+func (c *CandidateRelatedAddress) Equal(other *CandidateRelatedAddress) bool {
+ if c == nil && other == nil {
+ return true
+ }
+ return c != nil && other != nil &&
+ c.Address == other.Address &&
+ c.Port == other.Port
+}
diff --git a/vendor/github.com/pion/ice/v2/candidatetype.go b/vendor/github.com/pion/ice/v2/candidatetype.go
new file mode 100644
index 0000000..376c408
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/candidatetype.go
@@ -0,0 +1,62 @@
+package ice
+
+// CandidateType represents the type of candidate
+type CandidateType byte
+
+// CandidateType enum
+const (
+ CandidateTypeUnspecified CandidateType = iota
+ CandidateTypeHost
+ CandidateTypeServerReflexive
+ CandidateTypePeerReflexive
+ CandidateTypeRelay
+)
+
+// String makes CandidateType printable
+func (c CandidateType) String() string {
+ switch c {
+ case CandidateTypeHost:
+ return "host"
+ case CandidateTypeServerReflexive:
+ return "srflx"
+ case CandidateTypePeerReflexive:
+ return "prflx"
+ case CandidateTypeRelay:
+ return "relay"
+ case CandidateTypeUnspecified:
+ return "Unknown candidate type"
+ }
+ return "Unknown candidate type"
+}
+
+// Preference returns the preference weight of a CandidateType
+//
+// 4.1.2.2. Guidelines for Choosing Type and Local Preferences
+// The RECOMMENDED values are 126 for host candidates, 100
+// for server reflexive candidates, 110 for peer reflexive candidates,
+// and 0 for relayed candidates.
+func (c CandidateType) Preference() uint16 {
+ switch c {
+ case CandidateTypeHost:
+ return 126
+ case CandidateTypePeerReflexive:
+ return 110
+ case CandidateTypeServerReflexive:
+ return 100
+ case CandidateTypeRelay, CandidateTypeUnspecified:
+ return 0
+ }
+ return 0
+}
+
+func containsCandidateType(candidateType CandidateType, candidateTypeList []CandidateType) bool {
+ if candidateTypeList == nil {
+ return false
+ }
+ for _, ct := range candidateTypeList {
+ if ct == candidateType {
+ return true
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/pion/ice/v2/codecov.yml b/vendor/github.com/pion/ice/v2/codecov.yml
new file mode 100644
index 0000000..085200a
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/codecov.yml
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+
+coverage:
+ status:
+ project:
+ default:
+ # Allow decreasing 2% of total coverage to avoid noise.
+ threshold: 2%
+ patch:
+ default:
+ target: 70%
+ only_pulls: true
+
+ignore:
+ - "examples/*"
+ - "examples/**/*"
diff --git a/vendor/github.com/pion/ice/v2/context.go b/vendor/github.com/pion/ice/v2/context.go
new file mode 100644
index 0000000..627d81e
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/context.go
@@ -0,0 +1,37 @@
+package ice
+
+import (
+ "context"
+ "time"
+)
+
+func (a *Agent) context() context.Context {
+ return agentContext(a.done)
+}
+
+type agentContext chan struct{}
+
+// Done implements context.Context
+func (a agentContext) Done() <-chan struct{} {
+ return (chan struct{})(a)
+}
+
+// Err implements context.Context
+func (a agentContext) Err() error {
+ select {
+ case <-(chan struct{})(a):
+ return ErrRunCanceled
+ default:
+ return nil
+ }
+}
+
+// Deadline implements context.Context
+func (a agentContext) Deadline() (deadline time.Time, ok bool) {
+ return time.Time{}, false
+}
+
+// Value implements context.Context
+func (a agentContext) Value(key interface{}) interface{} {
+ return nil
+}
diff --git a/vendor/github.com/pion/ice/v2/errors.go b/vendor/github.com/pion/ice/v2/errors.go
new file mode 100644
index 0000000..e7dd625
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/errors.go
@@ -0,0 +1,132 @@
+package ice
+
+import "errors"
+
+var (
+ // ErrUnknownType indicates an error with Unknown info.
+ ErrUnknownType = errors.New("Unknown")
+
+ // ErrSchemeType indicates the scheme type could not be parsed.
+ ErrSchemeType = errors.New("unknown scheme type")
+
+ // ErrSTUNQuery indicates query arguments are provided in a STUN URL.
+ ErrSTUNQuery = errors.New("queries not supported in stun address")
+
+ // ErrInvalidQuery indicates an malformed query is provided.
+ ErrInvalidQuery = errors.New("invalid query")
+
+ // ErrHost indicates malformed hostname is provided.
+ ErrHost = errors.New("invalid hostname")
+
+ // ErrPort indicates malformed port is provided.
+ ErrPort = errors.New("invalid port")
+
+ // ErrLocalUfragInsufficientBits indicates local username fragment insufficient bits are provided.
+ // Have to be at least 24 bits long
+ ErrLocalUfragInsufficientBits = errors.New("local username fragment is less than 24 bits long")
+
+ // ErrLocalPwdInsufficientBits indicates local passoword insufficient bits are provided.
+ // Have to be at least 128 bits long
+ ErrLocalPwdInsufficientBits = errors.New("local password is less than 128 bits long")
+
+ // ErrProtoType indicates an unsupported transport type was provided.
+ ErrProtoType = errors.New("invalid transport protocol type")
+
+ // ErrClosed indicates the agent is closed
+ ErrClosed = errors.New("the agent is closed")
+
+ // ErrNoCandidatePairs indicates agent does not have a valid candidate pair
+ ErrNoCandidatePairs = errors.New("no candidate pairs available")
+
+ // ErrCanceledByCaller indicates agent connection was canceled by the caller
+ ErrCanceledByCaller = errors.New("connecting canceled by caller")
+
+ // ErrMultipleStart indicates agent was started twice
+ ErrMultipleStart = errors.New("attempted to start agent twice")
+
+ // ErrRemoteUfragEmpty indicates agent was started with an empty remote ufrag
+ ErrRemoteUfragEmpty = errors.New("remote ufrag is empty")
+
+ // ErrRemotePwdEmpty indicates agent was started with an empty remote pwd
+ ErrRemotePwdEmpty = errors.New("remote pwd is empty")
+
+ // ErrNoOnCandidateHandler indicates agent was started without OnCandidate
+ ErrNoOnCandidateHandler = errors.New("no OnCandidate provided")
+
+ // ErrMultipleGatherAttempted indicates GatherCandidates has been called multiple times
+ ErrMultipleGatherAttempted = errors.New("attempting to gather candidates during gathering state")
+
+ // ErrUsernameEmpty indicates agent was give TURN URL with an empty Username
+ ErrUsernameEmpty = errors.New("username is empty")
+
+ // ErrPasswordEmpty indicates agent was give TURN URL with an empty Password
+ ErrPasswordEmpty = errors.New("password is empty")
+
+ // ErrAddressParseFailed indicates we were unable to parse a candidate address
+ ErrAddressParseFailed = errors.New("failed to parse address")
+
+ // ErrLiteUsingNonHostCandidates indicates non host candidates were selected for a lite agent
+ ErrLiteUsingNonHostCandidates = errors.New("lite agents must only use host candidates")
+
+ // ErrUselessUrlsProvided indicates that one or more URL was provided to the agent but no host
+ // candidate required them
+ ErrUselessUrlsProvided = errors.New("agent does not need URL with selected candidate types")
+
+ // ErrUnsupportedNAT1To1IPCandidateType indicates that the specified NAT1To1IPCandidateType is
+ // unsupported
+ ErrUnsupportedNAT1To1IPCandidateType = errors.New("unsupported 1:1 NAT IP candidate type")
+
+ // ErrInvalidNAT1To1IPMapping indicates that the given 1:1 NAT IP mapping is invalid
+ ErrInvalidNAT1To1IPMapping = errors.New("invalid 1:1 NAT IP mapping")
+
+ // ErrExternalMappedIPNotFound in NAT1To1IPMapping
+ ErrExternalMappedIPNotFound = errors.New("external mapped IP not found")
+
+ // ErrMulticastDNSWithNAT1To1IPMapping indicates that the mDNS gathering cannot be used along
+ // with 1:1 NAT IP mapping for host candidate.
+ ErrMulticastDNSWithNAT1To1IPMapping = errors.New("mDNS gathering cannot be used with 1:1 NAT IP mapping for host candidate")
+
+ // ErrIneffectiveNAT1To1IPMappingHost indicates that 1:1 NAT IP mapping for host candidate is
+ // requested, but the host candidate type is disabled.
+ ErrIneffectiveNAT1To1IPMappingHost = errors.New("1:1 NAT IP mapping for host candidate ineffective")
+
+ // ErrIneffectiveNAT1To1IPMappingSrflx indicates that 1:1 NAT IP mapping for srflx candidate is
+ // requested, but the srflx candidate type is disabled.
+ ErrIneffectiveNAT1To1IPMappingSrflx = errors.New("1:1 NAT IP mapping for srflx candidate ineffective")
+
+ // ErrInvalidMulticastDNSHostName indicates an invalid MulticastDNSHostName
+ ErrInvalidMulticastDNSHostName = errors.New("invalid mDNS HostName, must end with .local and can only contain a single '.'")
+
+ // ErrRestartWhenGathering indicates Restart was called when Agent is in GatheringStateGathering
+ ErrRestartWhenGathering = errors.New("ICE Agent can not be restarted when gathering")
+
+ // ErrRunCanceled indicates a run operation was canceled by its individual done
+ ErrRunCanceled = errors.New("run was canceled by done")
+
+ // ErrTCPMuxNotInitialized indicates TCPMux is not initialized and that invalidTCPMux is used.
+ ErrTCPMuxNotInitialized = errors.New("TCPMux is not initialized")
+
+ // ErrTCPRemoteAddrAlreadyExists indicates we already have the connection with same remote addr.
+ ErrTCPRemoteAddrAlreadyExists = errors.New("conn with same remote addr already exists")
+
+ errSendPacket = errors.New("failed to send packet")
+ errAttributeTooShortICECandidate = errors.New("attribute not long enough to be ICE candidate")
+ errParseComponent = errors.New("could not parse component")
+ errParsePriority = errors.New("could not parse priority")
+ errParsePort = errors.New("could not parse port")
+ errParseRelatedAddr = errors.New("could not parse related addresses")
+ errParseTypType = errors.New("could not parse typtype")
+ errUnknownCandidateTyp = errors.New("unknown candidate typ")
+ errGetXorMappedAddrResponse = errors.New("failed to get XOR-MAPPED-ADDRESS response")
+ errConnectionAddrAlreadyExist = errors.New("connection with same remote address already exists")
+ errReadingStreamingPacket = errors.New("error reading streaming packet")
+ errWriting = errors.New("error writing to")
+ errClosingConnection = errors.New("error closing connection")
+ errDetermineNetworkType = errors.New("unable to determine networkType")
+ errMissingProtocolScheme = errors.New("missing protocol scheme")
+ errTooManyColonsAddr = errors.New("too many colons in address")
+ errRead = errors.New("unexpected error trying to read")
+ errUnknownRole = errors.New("unknown role")
+ errMismatchUsername = errors.New("username mismatch")
+ errICEWriteSTUNMessage = errors.New("the ICE conn can't write STUN messages")
+)
diff --git a/vendor/github.com/pion/ice/v2/external_ip_mapper.go b/vendor/github.com/pion/ice/v2/external_ip_mapper.go
new file mode 100644
index 0000000..5310cc0
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/external_ip_mapper.go
@@ -0,0 +1,143 @@
+package ice
+
+import (
+ "net"
+ "strings"
+)
+
+func validateIPString(ipStr string) (net.IP, bool, error) {
+ ip := net.ParseIP(ipStr)
+ if ip == nil {
+ return nil, false, ErrInvalidNAT1To1IPMapping
+ }
+ return ip, (ip.To4() != nil), nil
+}
+
+// ipMapping holds the mapping of local and external IP address for a particular IP family
+type ipMapping struct {
+ ipSole net.IP // when non-nil, this is the sole external IP for one local IP assumed
+ ipMap map[string]net.IP // local-to-external IP mapping (k: local, v: external)
+}
+
+func (m *ipMapping) setSoleIP(ip net.IP) error {
+ if m.ipSole != nil || len(m.ipMap) > 0 {
+ return ErrInvalidNAT1To1IPMapping
+ }
+
+ m.ipSole = ip
+
+ return nil
+}
+
+func (m *ipMapping) addIPMapping(locIP, extIP net.IP) error {
+ if m.ipSole != nil {
+ return ErrInvalidNAT1To1IPMapping
+ }
+
+ locIPStr := locIP.String()
+
+ // check if dup of local IP
+ if _, ok := m.ipMap[locIPStr]; ok {
+ return ErrInvalidNAT1To1IPMapping
+ }
+
+ m.ipMap[locIPStr] = extIP
+
+ return nil
+}
+
+func (m *ipMapping) findExternalIP(locIP net.IP) (net.IP, error) {
+ if m.ipSole != nil {
+ return m.ipSole, nil
+ }
+
+ extIP, ok := m.ipMap[locIP.String()]
+ if !ok {
+ return nil, ErrExternalMappedIPNotFound
+ }
+
+ return extIP, nil
+}
+
+type externalIPMapper struct {
+ ipv4Mapping ipMapping
+ ipv6Mapping ipMapping
+ candidateType CandidateType
+}
+
+func newExternalIPMapper(candidateType CandidateType, ips []string) (*externalIPMapper, error) { //nolint:gocognit
+ if len(ips) == 0 {
+ return nil, nil
+ }
+ if candidateType == CandidateTypeUnspecified {
+ candidateType = CandidateTypeHost // defaults to host
+ } else if candidateType != CandidateTypeHost && candidateType != CandidateTypeServerReflexive {
+ return nil, ErrUnsupportedNAT1To1IPCandidateType
+ }
+
+ m := &externalIPMapper{
+ ipv4Mapping: ipMapping{ipMap: map[string]net.IP{}},
+ ipv6Mapping: ipMapping{ipMap: map[string]net.IP{}},
+ candidateType: candidateType,
+ }
+
+ for _, extIPStr := range ips {
+ ipPair := strings.Split(extIPStr, "/")
+ if len(ipPair) == 0 || len(ipPair) > 2 {
+ return nil, ErrInvalidNAT1To1IPMapping
+ }
+
+ extIP, isExtIPv4, err := validateIPString(ipPair[0])
+ if err != nil {
+ return nil, err
+ }
+ if len(ipPair) == 1 {
+ if isExtIPv4 {
+ if err := m.ipv4Mapping.setSoleIP(extIP); err != nil {
+ return nil, err
+ }
+ } else {
+ if err := m.ipv6Mapping.setSoleIP(extIP); err != nil {
+ return nil, err
+ }
+ }
+ } else {
+ locIP, isLocIPv4, err := validateIPString(ipPair[1])
+ if err != nil {
+ return nil, err
+ }
+ if isExtIPv4 {
+ if !isLocIPv4 {
+ return nil, ErrInvalidNAT1To1IPMapping
+ }
+
+ if err := m.ipv4Mapping.addIPMapping(locIP, extIP); err != nil {
+ return nil, err
+ }
+ } else {
+ if isLocIPv4 {
+ return nil, ErrInvalidNAT1To1IPMapping
+ }
+
+ if err := m.ipv6Mapping.addIPMapping(locIP, extIP); err != nil {
+ return nil, err
+ }
+ }
+ }
+ }
+
+ return m, nil
+}
+
+func (m *externalIPMapper) findExternalIP(localIPStr string) (net.IP, error) {
+ locIP, isLocIPv4, err := validateIPString(localIPStr)
+ if err != nil {
+ return nil, err
+ }
+
+ if isLocIPv4 {
+ return m.ipv4Mapping.findExternalIP(locIP)
+ }
+
+ return m.ipv6Mapping.findExternalIP(locIP)
+}
diff --git a/vendor/github.com/pion/ice/v2/gather.go b/vendor/github.com/pion/ice/v2/gather.go
new file mode 100644
index 0000000..3bc3d77
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/gather.go
@@ -0,0 +1,497 @@
+package ice
+
+import (
+ "context"
+ "crypto/tls"
+ "errors"
+ "fmt"
+ "net"
+ "reflect"
+ "sync"
+ "time"
+
+ "github.com/pion/dtls/v2"
+ "github.com/pion/logging"
+ "github.com/pion/turn/v2"
+)
+
+const (
+ stunGatherTimeout = time.Second * 5
+)
+
+type closeable interface {
+ Close() error
+}
+
+// Close a net.Conn and log if we have a failure
+func closeConnAndLog(c closeable, log logging.LeveledLogger, msg string) {
+ if c == nil || (reflect.ValueOf(c).Kind() == reflect.Ptr && reflect.ValueOf(c).IsNil()) {
+ log.Warnf("Conn is not allocated (%s)", msg)
+ return
+ }
+
+ log.Warnf(msg)
+ if err := c.Close(); err != nil {
+ log.Warnf("Failed to close conn: %v", err)
+ }
+}
+
+// fakePacketConn wraps a net.Conn and emulates net.PacketConn
+type fakePacketConn struct {
+ nextConn net.Conn
+}
+
+func (f *fakePacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error) {
+ n, err = f.nextConn.Read(p)
+ addr = f.nextConn.RemoteAddr()
+ return
+}
+func (f *fakePacketConn) Close() error { return f.nextConn.Close() }
+func (f *fakePacketConn) LocalAddr() net.Addr { return f.nextConn.LocalAddr() }
+func (f *fakePacketConn) SetDeadline(t time.Time) error { return f.nextConn.SetDeadline(t) }
+func (f *fakePacketConn) SetReadDeadline(t time.Time) error { return f.nextConn.SetReadDeadline(t) }
+func (f *fakePacketConn) SetWriteDeadline(t time.Time) error { return f.nextConn.SetWriteDeadline(t) }
+func (f *fakePacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error) {
+ return f.nextConn.Write(p)
+}
+
+// GatherCandidates initiates the trickle based gathering process.
+func (a *Agent) GatherCandidates() error {
+ var gatherErr error
+
+ if runErr := a.run(a.context(), func(ctx context.Context, agent *Agent) {
+ if a.gatheringState != GatheringStateNew {
+ gatherErr = ErrMultipleGatherAttempted
+ return
+ } else if a.onCandidateHdlr.Load() == nil {
+ gatherErr = ErrNoOnCandidateHandler
+ return
+ }
+
+ a.gatherCandidateCancel() // Cancel previous gathering routine
+ ctx, cancel := context.WithCancel(ctx)
+ a.gatherCandidateCancel = cancel
+
+ go a.gatherCandidates(ctx)
+ }); runErr != nil {
+ return runErr
+ }
+ return gatherErr
+}
+
+func (a *Agent) gatherCandidates(ctx context.Context) {
+ if err := a.setGatheringState(GatheringStateGathering); err != nil {
+ a.log.Warnf("failed to set gatheringState to GatheringStateGathering: %v", err)
+ return
+ }
+
+ var wg sync.WaitGroup
+ for _, t := range a.candidateTypes {
+ switch t {
+ case CandidateTypeHost:
+ wg.Add(1)
+ go func() {
+ a.gatherCandidatesLocal(ctx, a.networkTypes)
+ wg.Done()
+ }()
+ case CandidateTypeServerReflexive:
+ wg.Add(1)
+ go func() {
+ a.gatherCandidatesSrflx(ctx, a.urls, a.networkTypes)
+ wg.Done()
+ }()
+ if a.extIPMapper != nil && a.extIPMapper.candidateType == CandidateTypeServerReflexive {
+ wg.Add(1)
+ go func() {
+ a.gatherCandidatesSrflxMapped(ctx, a.networkTypes)
+ wg.Done()
+ }()
+ }
+ case CandidateTypeRelay:
+ wg.Add(1)
+ go func() {
+ a.gatherCandidatesRelay(ctx, a.urls)
+ wg.Done()
+ }()
+ case CandidateTypePeerReflexive, CandidateTypeUnspecified:
+ }
+ }
+ // Block until all STUN and TURN URLs have been gathered (or timed out)
+ wg.Wait()
+
+ if err := a.setGatheringState(GatheringStateComplete); err != nil {
+ a.log.Warnf("failed to set gatheringState to GatheringStateComplete: %v", err)
+ }
+}
+
+func (a *Agent) gatherCandidatesLocal(ctx context.Context, networkTypes []NetworkType) { //nolint:gocognit
+ networks := map[string]struct{}{}
+ for _, networkType := range networkTypes {
+ if networkType.IsTCP() {
+ networks[tcp] = struct{}{}
+ } else {
+ networks[udp] = struct{}{}
+ }
+ }
+
+ localIPs, err := localInterfaces(a.net, a.interfaceFilter, networkTypes)
+ if err != nil {
+ a.log.Warnf("failed to iterate local interfaces, host candidates will not be gathered %s", err)
+ return
+ }
+
+ for _, ip := range localIPs {
+ mappedIP := ip
+ if a.mDNSMode != MulticastDNSModeQueryAndGather && a.extIPMapper != nil && a.extIPMapper.candidateType == CandidateTypeHost {
+ if _mappedIP, err := a.extIPMapper.findExternalIP(ip.String()); err == nil {
+ mappedIP = _mappedIP
+ } else {
+ a.log.Warnf("1:1 NAT mapping is enabled but no external IP is found for %s\n", ip.String())
+ }
+ }
+
+ address := mappedIP.String()
+ if a.mDNSMode == MulticastDNSModeQueryAndGather {
+ address = a.mDNSName
+ }
+
+ for network := range networks {
+ var port int
+ var conn net.PacketConn
+ var err error
+
+ var tcpType TCPType
+ switch network {
+ case tcp:
+ // Handle ICE TCP passive mode
+
+ a.log.Debugf("GetConn by ufrag: %s\n", a.localUfrag)
+ conn, err = a.tcpMux.GetConnByUfrag(a.localUfrag)
+ if err != nil {
+ if !errors.Is(err, ErrTCPMuxNotInitialized) {
+ a.log.Warnf("error getting tcp conn by ufrag: %s %s %s\n", network, ip, a.localUfrag)
+ }
+ continue
+ }
+ port = conn.LocalAddr().(*net.TCPAddr).Port
+ tcpType = TCPTypePassive
+ // is there a way to verify that the listen address is even
+ // accessible from the current interface.
+ case udp:
+ conn, err = listenUDPInPortRange(a.net, a.log, int(a.portmax), int(a.portmin), network, &net.UDPAddr{IP: ip, Port: 0})
+ if err != nil {
+ a.log.Warnf("could not listen %s %s\n", network, ip)
+ continue
+ }
+
+ port = conn.LocalAddr().(*net.UDPAddr).Port
+ }
+ hostConfig := CandidateHostConfig{
+ Network: network,
+ Address: address,
+ Port: port,
+ Component: ComponentRTP,
+ TCPType: tcpType,
+ }
+
+ c, err := NewCandidateHost(&hostConfig)
+ if err != nil {
+ closeConnAndLog(conn, a.log, fmt.Sprintf("Failed to create host candidate: %s %s %d: %v\n", network, mappedIP, port, err))
+ continue
+ }
+
+ if a.mDNSMode == MulticastDNSModeQueryAndGather {
+ if err = c.setIP(ip); err != nil {
+ closeConnAndLog(conn, a.log, fmt.Sprintf("Failed to create host candidate: %s %s %d: %v\n", network, mappedIP, port, err))
+ continue
+ }
+ }
+
+ if err := a.addCandidate(ctx, c, conn); err != nil {
+ if closeErr := c.close(); closeErr != nil {
+ a.log.Warnf("Failed to close candidate: %v", closeErr)
+ }
+ a.log.Warnf("Failed to append to localCandidates and run onCandidateHdlr: %v\n", err)
+ }
+ }
+ }
+}
+
+func (a *Agent) gatherCandidatesSrflxMapped(ctx context.Context, networkTypes []NetworkType) {
+ var wg sync.WaitGroup
+ defer wg.Wait()
+
+ for _, networkType := range networkTypes {
+ if networkType.IsTCP() {
+ continue
+ }
+
+ network := networkType.String()
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ conn, err := listenUDPInPortRange(a.net, a.log, int(a.portmax), int(a.portmin), network, &net.UDPAddr{IP: nil, Port: 0})
+ if err != nil {
+ a.log.Warnf("Failed to listen %s: %v\n", network, err)
+ return
+ }
+
+ laddr := conn.LocalAddr().(*net.UDPAddr)
+ mappedIP, err := a.extIPMapper.findExternalIP(laddr.IP.String())
+ if err != nil {
+ closeConnAndLog(conn, a.log, fmt.Sprintf("1:1 NAT mapping is enabled but no external IP is found for %s\n", laddr.IP.String()))
+ return
+ }
+
+ srflxConfig := CandidateServerReflexiveConfig{
+ Network: network,
+ Address: mappedIP.String(),
+ Port: laddr.Port,
+ Component: ComponentRTP,
+ RelAddr: laddr.IP.String(),
+ RelPort: laddr.Port,
+ }
+ c, err := NewCandidateServerReflexive(&srflxConfig)
+ if err != nil {
+ closeConnAndLog(conn, a.log, fmt.Sprintf("Failed to create server reflexive candidate: %s %s %d: %v\n",
+ network,
+ mappedIP.String(),
+ laddr.Port,
+ err))
+ return
+ }
+
+ if err := a.addCandidate(ctx, c, conn); err != nil {
+ if closeErr := c.close(); closeErr != nil {
+ a.log.Warnf("Failed to close candidate: %v", closeErr)
+ }
+ a.log.Warnf("Failed to append to localCandidates and run onCandidateHdlr: %v\n", err)
+ }
+ }()
+ }
+}
+
+func (a *Agent) gatherCandidatesSrflx(ctx context.Context, urls []*URL, networkTypes []NetworkType) {
+ var wg sync.WaitGroup
+ defer wg.Wait()
+
+ for _, networkType := range networkTypes {
+ if networkType.IsTCP() {
+ continue
+ }
+
+ for i := range urls {
+ wg.Add(1)
+ go func(url URL, network string) {
+ defer wg.Done()
+ hostPort := fmt.Sprintf("%s:%d", url.Host, url.Port)
+ serverAddr, err := a.net.ResolveUDPAddr(network, hostPort)
+ if err != nil {
+ a.log.Warnf("failed to resolve stun host: %s: %v", hostPort, err)
+ return
+ }
+
+ conn, err := listenUDPInPortRange(a.net, a.log, int(a.portmax), int(a.portmin), network, &net.UDPAddr{IP: nil, Port: 0})
+ if err != nil {
+ closeConnAndLog(conn, a.log, fmt.Sprintf("Failed to listen for %s: %v\n", serverAddr.String(), err))
+ return
+ }
+
+ xoraddr, err := getXORMappedAddr(conn, serverAddr, stunGatherTimeout)
+ if err != nil {
+ closeConnAndLog(conn, a.log, fmt.Sprintf("could not get server reflexive address %s %s: %v\n", network, url, err))
+ return
+ }
+
+ ip := xoraddr.IP
+ port := xoraddr.Port
+
+ laddr := conn.LocalAddr().(*net.UDPAddr)
+ srflxConfig := CandidateServerReflexiveConfig{
+ Network: network,
+ Address: ip.String(),
+ Port: port,
+ Component: ComponentRTP,
+ RelAddr: laddr.IP.String(),
+ RelPort: laddr.Port,
+ }
+ c, err := NewCandidateServerReflexive(&srflxConfig)
+ if err != nil {
+ closeConnAndLog(conn, a.log, fmt.Sprintf("Failed to create server reflexive candidate: %s %s %d: %v\n", network, ip, port, err))
+ return
+ }
+
+ if err := a.addCandidate(ctx, c, conn); err != nil {
+ if closeErr := c.close(); closeErr != nil {
+ a.log.Warnf("Failed to close candidate: %v", closeErr)
+ }
+ a.log.Warnf("Failed to append to localCandidates and run onCandidateHdlr: %v\n", err)
+ }
+ }(*urls[i], networkType.String())
+ }
+ }
+}
+
+func (a *Agent) gatherCandidatesRelay(ctx context.Context, urls []*URL) { //nolint:gocognit
+ var wg sync.WaitGroup
+ defer wg.Wait()
+
+ network := NetworkTypeUDP4.String()
+ for i := range urls {
+ switch {
+ case urls[i].Scheme != SchemeTypeTURN && urls[i].Scheme != SchemeTypeTURNS:
+ continue
+ case urls[i].Username == "":
+ a.log.Errorf("Failed to gather relay candidates: %v", ErrUsernameEmpty)
+ return
+ case urls[i].Password == "":
+ a.log.Errorf("Failed to gather relay candidates: %v", ErrPasswordEmpty)
+ return
+ }
+
+ wg.Add(1)
+ go func(url URL) {
+ defer wg.Done()
+ TURNServerAddr := fmt.Sprintf("%s:%d", url.Host, url.Port)
+ var (
+ locConn net.PacketConn
+ err error
+ RelAddr string
+ RelPort int
+ )
+
+ switch {
+ case url.Proto == ProtoTypeUDP && url.Scheme == SchemeTypeTURN:
+ if locConn, err = a.net.ListenPacket(network, "0.0.0.0:0"); err != nil {
+ a.log.Warnf("Failed to listen %s: %v\n", network, err)
+ return
+ }
+
+ RelAddr = locConn.LocalAddr().(*net.UDPAddr).IP.String()
+ RelPort = locConn.LocalAddr().(*net.UDPAddr).Port
+ case a.proxyDialer != nil && url.Proto == ProtoTypeTCP &&
+ (url.Scheme == SchemeTypeTURN || url.Scheme == SchemeTypeTURNS):
+ conn, connectErr := a.proxyDialer.Dial(NetworkTypeTCP4.String(), TURNServerAddr)
+ if connectErr != nil {
+ a.log.Warnf("Failed to Dial TCP Addr %s via proxy dialer: %v\n", TURNServerAddr, connectErr)
+ return
+ }
+
+ RelAddr = conn.LocalAddr().(*net.TCPAddr).IP.String()
+ RelPort = conn.LocalAddr().(*net.TCPAddr).Port
+ locConn = turn.NewSTUNConn(conn)
+
+ case url.Proto == ProtoTypeTCP && url.Scheme == SchemeTypeTURN:
+ tcpAddr, connectErr := net.ResolveTCPAddr(NetworkTypeTCP4.String(), TURNServerAddr)
+ if connectErr != nil {
+ a.log.Warnf("Failed to resolve TCP Addr %s: %v\n", TURNServerAddr, connectErr)
+ return
+ }
+
+ conn, connectErr := net.DialTCP(NetworkTypeTCP4.String(), nil, tcpAddr)
+ if connectErr != nil {
+ a.log.Warnf("Failed to Dial TCP Addr %s: %v\n", TURNServerAddr, connectErr)
+ return
+ }
+
+ RelAddr = conn.LocalAddr().(*net.TCPAddr).IP.String()
+ RelPort = conn.LocalAddr().(*net.TCPAddr).Port
+ locConn = turn.NewSTUNConn(conn)
+ case url.Proto == ProtoTypeUDP && url.Scheme == SchemeTypeTURNS:
+ udpAddr, connectErr := net.ResolveUDPAddr(network, TURNServerAddr)
+ if connectErr != nil {
+ a.log.Warnf("Failed to resolve UDP Addr %s: %v\n", TURNServerAddr, connectErr)
+ return
+ }
+
+ conn, connectErr := dtls.Dial(network, udpAddr, &dtls.Config{
+ InsecureSkipVerify: a.insecureSkipVerify, //nolint:gosec
+ })
+ if connectErr != nil {
+ a.log.Warnf("Failed to Dial DTLS Addr %s: %v\n", TURNServerAddr, connectErr)
+ return
+ }
+
+ RelAddr = conn.LocalAddr().(*net.UDPAddr).IP.String()
+ RelPort = conn.LocalAddr().(*net.UDPAddr).Port
+ locConn = &fakePacketConn{conn}
+ case url.Proto == ProtoTypeTCP && url.Scheme == SchemeTypeTURNS:
+ conn, connectErr := tls.Dial(NetworkTypeTCP4.String(), TURNServerAddr, &tls.Config{
+ InsecureSkipVerify: a.insecureSkipVerify, //nolint:gosec
+ })
+ if connectErr != nil {
+ a.log.Warnf("Failed to Dial TLS Addr %s: %v\n", TURNServerAddr, connectErr)
+ return
+ }
+ RelAddr = conn.LocalAddr().(*net.TCPAddr).IP.String()
+ RelPort = conn.LocalAddr().(*net.TCPAddr).Port
+ locConn = turn.NewSTUNConn(conn)
+ default:
+ a.log.Warnf("Unable to handle URL in gatherCandidatesRelay %v\n", url)
+ return
+ }
+
+ client, err := turn.NewClient(&turn.ClientConfig{
+ TURNServerAddr: TURNServerAddr,
+ Conn: locConn,
+ Username: url.Username,
+ Password: url.Password,
+ LoggerFactory: a.loggerFactory,
+ Net: a.net,
+ })
+ if err != nil {
+ closeConnAndLog(locConn, a.log, fmt.Sprintf("Failed to build new turn.Client %s %s\n", TURNServerAddr, err))
+ return
+ }
+
+ if err = client.Listen(); err != nil {
+ client.Close()
+ closeConnAndLog(locConn, a.log, fmt.Sprintf("Failed to listen on turn.Client %s %s\n", TURNServerAddr, err))
+ return
+ }
+
+ relayConn, err := client.Allocate()
+ if err != nil {
+ client.Close()
+ closeConnAndLog(locConn, a.log, fmt.Sprintf("Failed to allocate on turn.Client %s %s\n", TURNServerAddr, err))
+ return
+ }
+
+ raddr := relayConn.LocalAddr().(*net.UDPAddr)
+ relayConfig := CandidateRelayConfig{
+ Network: network,
+ Component: ComponentRTP,
+ Address: raddr.IP.String(),
+ Port: raddr.Port,
+ RelAddr: RelAddr,
+ RelPort: RelPort,
+ OnClose: func() error {
+ client.Close()
+ return locConn.Close()
+ },
+ }
+ relayConnClose := func() {
+ if relayConErr := relayConn.Close(); relayConErr != nil {
+ a.log.Warnf("Failed to close relay %v", relayConErr)
+ }
+ }
+ candidate, err := NewCandidateRelay(&relayConfig)
+ if err != nil {
+ relayConnClose()
+
+ client.Close()
+ closeConnAndLog(locConn, a.log, fmt.Sprintf("Failed to create relay candidate: %s %s: %v\n", network, raddr.String(), err))
+ return
+ }
+
+ if err := a.addCandidate(ctx, candidate, relayConn); err != nil {
+ relayConnClose()
+
+ if closeErr := candidate.close(); closeErr != nil {
+ a.log.Warnf("Failed to close candidate: %v", closeErr)
+ }
+ a.log.Warnf("Failed to append to localCandidates and run onCandidateHdlr: %v\n", err)
+ }
+ }(*urls[i])
+ }
+}
diff --git a/vendor/github.com/pion/ice/v2/go.mod b/vendor/github.com/pion/ice/v2/go.mod
new file mode 100644
index 0000000..410c2e3
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/go.mod
@@ -0,0 +1,16 @@
+module github.com/pion/ice/v2
+
+go 1.13
+
+require (
+ github.com/google/uuid v1.1.5
+ github.com/pion/dtls/v2 v2.0.4
+ github.com/pion/logging v0.2.2
+ github.com/pion/mdns v0.0.4
+ github.com/pion/randutil v0.1.0
+ github.com/pion/stun v0.3.5
+ github.com/pion/transport v0.12.1
+ github.com/pion/turn/v2 v2.0.5
+ github.com/stretchr/testify v1.6.1
+ golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7
+)
diff --git a/vendor/github.com/pion/ice/v2/go.sum b/vendor/github.com/pion/ice/v2/go.sum
new file mode 100644
index 0000000..7e8981a
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/go.sum
@@ -0,0 +1,60 @@
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/google/uuid v1.1.5 h1:kxhtnfFVi+rYdOALN0B3k9UT86zVJKfBimRaciULW4I=
+github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/pion/dtls/v2 v2.0.4 h1:WuUcqi6oYMu/noNTz92QrF1DaFj4eXbhQ6dzaaAwOiI=
+github.com/pion/dtls/v2 v2.0.4/go.mod h1:qAkFscX0ZHoI1E07RfYPoRw3manThveu+mlTDdOxoGI=
+github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
+github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
+github.com/pion/mdns v0.0.4 h1:O4vvVqr4DGX63vzmO6Fw9vpy3lfztVWHGCQfyw0ZLSY=
+github.com/pion/mdns v0.0.4/go.mod h1:R1sL0p50l42S5lJs91oNdUL58nm0QHrhxnSegr++qC0=
+github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
+github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
+github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg=
+github.com/pion/stun v0.3.5/go.mod h1:gDMim+47EeEtfWogA37n6qXZS88L5V6LqFcf+DZA2UA=
+github.com/pion/transport v0.8.10/go.mod h1:tBmha/UCjpum5hqTWhfAEs3CO4/tHSg0MYRhSzR+CZ8=
+github.com/pion/transport v0.10.0/go.mod h1:BnHnUipd0rZQyTVB2SBGojFHT9CBt5C5TcsJSQGkvSE=
+github.com/pion/transport v0.10.1 h1:2W+yJT+0mOQ160ThZYUx5Zp2skzshiNgxrNE9GUfhJM=
+github.com/pion/transport v0.10.1/go.mod h1:PBis1stIILMiis0PewDw91WJeLJkyIMcEk+DwKOzf4A=
+github.com/pion/transport v0.12.1 h1:6v8lxQGVZpwSICEZjhl/CCv6aErINZlrm3O5ncFXj/c=
+github.com/pion/transport v0.12.1/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q=
+github.com/pion/turn/v2 v2.0.5 h1:iwMHqDfPEDEOFzwWKT56eFmh6DYC6o/+xnLAEzgISbA=
+github.com/pion/turn/v2 v2.0.5/go.mod h1:APg43CFyt/14Uy7heYUOGWdkem/Wu4PhCO/bjyrTqMw=
+github.com/pion/udp v0.1.0 h1:uGxQsNyrqG3GLINv36Ff60covYmfrLoxzwnCsIYspXI=
+github.com/pion/udp v0.1.0/go.mod h1:BPELIjbwE9PRbd/zxI/KYBnbo7B6+oA6YuEaNE8lths=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E=
+golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20201031054903-ff519b6c9102 h1:42cLlJJdEh+ySyeUUbEQ5bsTiq8voBeTuweGVkY6Puw=
+golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7 h1:3uJsdck53FDIpWwLeAXlia9p4C8j0BO2xZrqzKpL0D8=
+golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/pion/ice/v2/ice.go b/vendor/github.com/pion/ice/v2/ice.go
new file mode 100644
index 0000000..d7094f6
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/ice.go
@@ -0,0 +1,76 @@
+package ice
+
+// ConnectionState is an enum showing the state of a ICE Connection
+type ConnectionState int
+
+// List of supported States
+const (
+ // ConnectionStateNew ICE agent is gathering addresses
+ ConnectionStateNew = iota + 1
+
+ // ConnectionStateChecking ICE agent has been given local and remote candidates, and is attempting to find a match
+ ConnectionStateChecking
+
+ // ConnectionStateConnected ICE agent has a pairing, but is still checking other pairs
+ ConnectionStateConnected
+
+ // ConnectionStateCompleted ICE agent has finished
+ ConnectionStateCompleted
+
+ // ConnectionStateFailed ICE agent never could successfully connect
+ ConnectionStateFailed
+
+ // ConnectionStateDisconnected ICE agent connected successfully, but has entered a failed state
+ ConnectionStateDisconnected
+
+ // ConnectionStateClosed ICE agent has finished and is no longer handling requests
+ ConnectionStateClosed
+)
+
+func (c ConnectionState) String() string {
+ switch c {
+ case ConnectionStateNew:
+ return "New"
+ case ConnectionStateChecking:
+ return "Checking"
+ case ConnectionStateConnected:
+ return "Connected"
+ case ConnectionStateCompleted:
+ return "Completed"
+ case ConnectionStateFailed:
+ return "Failed"
+ case ConnectionStateDisconnected:
+ return "Disconnected"
+ case ConnectionStateClosed:
+ return "Closed"
+ default:
+ return "Invalid"
+ }
+}
+
+// GatheringState describes the state of the candidate gathering process
+type GatheringState int
+
+const (
+ // GatheringStateNew indicates candidate gatering is not yet started
+ GatheringStateNew GatheringState = iota + 1
+
+ // GatheringStateGathering indicates candidate gatering is ongoing
+ GatheringStateGathering
+
+ // GatheringStateComplete indicates candidate gatering has been completed
+ GatheringStateComplete
+)
+
+func (t GatheringState) String() string {
+ switch t {
+ case GatheringStateNew:
+ return "new"
+ case GatheringStateGathering:
+ return "gathering"
+ case GatheringStateComplete:
+ return "complete"
+ default:
+ return ErrUnknownType.Error()
+ }
+}
diff --git a/vendor/github.com/pion/ice/v2/icecontrol.go b/vendor/github.com/pion/ice/v2/icecontrol.go
new file mode 100644
index 0000000..ede2e09
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/icecontrol.go
@@ -0,0 +1,87 @@
+package ice
+
+import (
+ "encoding/binary"
+
+ "github.com/pion/stun"
+)
+
+// tiebreaker is common helper for ICE-{CONTROLLED,CONTROLLING}
+// and represents the so-called tiebreaker number.
+type tiebreaker uint64
+
+const tiebreakerSize = 8 // 64 bit
+
+// AddToAs adds tiebreaker value to m as t attribute.
+func (a tiebreaker) AddToAs(m *stun.Message, t stun.AttrType) error {
+ v := make([]byte, tiebreakerSize)
+ binary.BigEndian.PutUint64(v, uint64(a))
+ m.Add(t, v)
+ return nil
+}
+
+// GetFromAs decodes tiebreaker value in message getting it as for t type.
+func (a *tiebreaker) GetFromAs(m *stun.Message, t stun.AttrType) error {
+ v, err := m.Get(t)
+ if err != nil {
+ return err
+ }
+ if err = stun.CheckSize(t, len(v), tiebreakerSize); err != nil {
+ return err
+ }
+ *a = tiebreaker(binary.BigEndian.Uint64(v))
+ return nil
+}
+
+// AttrControlled represents ICE-CONTROLLED attribute.
+type AttrControlled uint64
+
+// AddTo adds ICE-CONTROLLED to message.
+func (c AttrControlled) AddTo(m *stun.Message) error {
+ return tiebreaker(c).AddToAs(m, stun.AttrICEControlled)
+}
+
+// GetFrom decodes ICE-CONTROLLED from message.
+func (c *AttrControlled) GetFrom(m *stun.Message) error {
+ return (*tiebreaker)(c).GetFromAs(m, stun.AttrICEControlled)
+}
+
+// AttrControlling represents ICE-CONTROLLING attribute.
+type AttrControlling uint64
+
+// AddTo adds ICE-CONTROLLING to message.
+func (c AttrControlling) AddTo(m *stun.Message) error {
+ return tiebreaker(c).AddToAs(m, stun.AttrICEControlling)
+}
+
+// GetFrom decodes ICE-CONTROLLING from message.
+func (c *AttrControlling) GetFrom(m *stun.Message) error {
+ return (*tiebreaker)(c).GetFromAs(m, stun.AttrICEControlling)
+}
+
+// AttrControl is helper that wraps ICE-{CONTROLLED,CONTROLLING}.
+type AttrControl struct {
+ Role Role
+ Tiebreaker uint64
+}
+
+// AddTo adds ICE-CONTROLLED or ICE-CONTROLLING attribute depending on Role.
+func (c AttrControl) AddTo(m *stun.Message) error {
+ if c.Role == Controlling {
+ return tiebreaker(c.Tiebreaker).AddToAs(m, stun.AttrICEControlling)
+ }
+ return tiebreaker(c.Tiebreaker).AddToAs(m, stun.AttrICEControlled)
+}
+
+// GetFrom decodes Role and Tiebreaker value from message.
+func (c *AttrControl) GetFrom(m *stun.Message) error {
+ if m.Contains(stun.AttrICEControlling) {
+ c.Role = Controlling
+ return (*tiebreaker)(&c.Tiebreaker).GetFromAs(m, stun.AttrICEControlling)
+ }
+ if m.Contains(stun.AttrICEControlled) {
+ c.Role = Controlled
+ return (*tiebreaker)(&c.Tiebreaker).GetFromAs(m, stun.AttrICEControlled)
+ }
+ return stun.ErrAttributeNotFound
+}
diff --git a/vendor/github.com/pion/ice/v2/mdns.go b/vendor/github.com/pion/ice/v2/mdns.go
new file mode 100644
index 0000000..5a431d1
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/mdns.go
@@ -0,0 +1,63 @@
+package ice
+
+import (
+ "net"
+
+ "github.com/google/uuid"
+ "github.com/pion/logging"
+ "github.com/pion/mdns"
+ "golang.org/x/net/ipv4"
+)
+
+// MulticastDNSMode represents the different Multicast modes ICE can run in
+type MulticastDNSMode byte
+
+// MulticastDNSMode enum
+const (
+ // MulticastDNSModeDisabled means remote mDNS candidates will be discarded, and local host candidates will use IPs
+ MulticastDNSModeDisabled MulticastDNSMode = iota + 1
+
+ // MulticastDNSModeQueryOnly means remote mDNS candidates will be accepted, and local host candidates will use IPs
+ MulticastDNSModeQueryOnly
+
+ // MulticastDNSModeQueryAndGather means remote mDNS candidates will be accepted, and local host candidates will use mDNS
+ MulticastDNSModeQueryAndGather
+)
+
+func generateMulticastDNSName() (string, error) {
+ // https://tools.ietf.org/id/draft-ietf-rtcweb-mdns-ice-candidates-02.html#gathering
+ // The unique name MUST consist of a version 4 UUID as defined in [RFC4122], followed by “.local”.
+ u, err := uuid.NewRandom()
+ return u.String() + ".local", err
+}
+
+func createMulticastDNS(mDNSMode MulticastDNSMode, mDNSName string, log logging.LeveledLogger) (*mdns.Conn, MulticastDNSMode, error) {
+ if mDNSMode == MulticastDNSModeDisabled {
+ return nil, mDNSMode, nil
+ }
+
+ addr, mdnsErr := net.ResolveUDPAddr("udp4", mdns.DefaultAddress)
+ if mdnsErr != nil {
+ return nil, mDNSMode, mdnsErr
+ }
+
+ l, mdnsErr := net.ListenUDP("udp4", addr)
+ if mdnsErr != nil {
+ // If ICE fails to start MulticastDNS server just warn the user and continue
+ log.Errorf("Failed to enable mDNS, continuing in mDNS disabled mode: (%s)", mdnsErr)
+ return nil, MulticastDNSModeDisabled, nil
+ }
+
+ switch mDNSMode {
+ case MulticastDNSModeQueryOnly:
+ conn, err := mdns.Server(ipv4.NewPacketConn(l), &mdns.Config{})
+ return conn, mDNSMode, err
+ case MulticastDNSModeQueryAndGather:
+ conn, err := mdns.Server(ipv4.NewPacketConn(l), &mdns.Config{
+ LocalNames: []string{mDNSName},
+ })
+ return conn, mDNSMode, err
+ default:
+ return nil, mDNSMode, nil
+ }
+}
diff --git a/vendor/github.com/pion/ice/v2/networktype.go b/vendor/github.com/pion/ice/v2/networktype.go
new file mode 100644
index 0000000..462ff2d
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/networktype.go
@@ -0,0 +1,130 @@
+package ice
+
+import (
+ "fmt"
+ "net"
+ "strings"
+)
+
+const (
+ udp = "udp"
+ tcp = "tcp"
+)
+
+func supportedNetworkTypes() []NetworkType {
+ return []NetworkType{
+ NetworkTypeUDP4,
+ NetworkTypeUDP6,
+ NetworkTypeTCP4,
+ NetworkTypeTCP6,
+ }
+}
+
+// NetworkType represents the type of network
+type NetworkType int
+
+const (
+ // NetworkTypeUDP4 indicates UDP over IPv4.
+ NetworkTypeUDP4 NetworkType = iota + 1
+
+ // NetworkTypeUDP6 indicates UDP over IPv6.
+ NetworkTypeUDP6
+
+ // NetworkTypeTCP4 indicates TCP over IPv4.
+ NetworkTypeTCP4
+
+ // NetworkTypeTCP6 indicates TCP over IPv6.
+ NetworkTypeTCP6
+)
+
+func (t NetworkType) String() string {
+ switch t {
+ case NetworkTypeUDP4:
+ return "udp4"
+ case NetworkTypeUDP6:
+ return "udp6"
+ case NetworkTypeTCP4:
+ return "tcp4"
+ case NetworkTypeTCP6:
+ return "tcp6"
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// IsUDP returns true when network is UDP4 or UDP6.
+func (t NetworkType) IsUDP() bool {
+ return t == NetworkTypeUDP4 || t == NetworkTypeUDP6
+}
+
+// IsTCP returns true when network is TCP4 or TCP6.
+func (t NetworkType) IsTCP() bool {
+ return t == NetworkTypeTCP4 || t == NetworkTypeTCP6
+}
+
+// NetworkShort returns the short network description
+func (t NetworkType) NetworkShort() string {
+ switch t {
+ case NetworkTypeUDP4, NetworkTypeUDP6:
+ return udp
+ case NetworkTypeTCP4, NetworkTypeTCP6:
+ return tcp
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// IsReliable returns true if the network is reliable
+func (t NetworkType) IsReliable() bool {
+ switch t {
+ case NetworkTypeUDP4, NetworkTypeUDP6:
+ return false
+ case NetworkTypeTCP4, NetworkTypeTCP6:
+ return true
+ }
+ return false
+}
+
+// IsIPv4 returns whether the network type is IPv4 or not.
+func (t NetworkType) IsIPv4() bool {
+ switch t {
+ case NetworkTypeUDP4, NetworkTypeTCP4:
+ return true
+ case NetworkTypeUDP6, NetworkTypeTCP6:
+ return false
+ }
+ return false
+}
+
+// IsIPv6 returns whether the network type is IPv6 or not.
+func (t NetworkType) IsIPv6() bool {
+ switch t {
+ case NetworkTypeUDP4, NetworkTypeTCP4:
+ return false
+ case NetworkTypeUDP6, NetworkTypeTCP6:
+ return true
+ }
+ return false
+}
+
+// determineNetworkType determines the type of network based on
+// the short network string and an IP address.
+func determineNetworkType(network string, ip net.IP) (NetworkType, error) {
+ ipv4 := ip.To4() != nil
+
+ switch {
+ case strings.HasPrefix(strings.ToLower(network), udp):
+ if ipv4 {
+ return NetworkTypeUDP4, nil
+ }
+ return NetworkTypeUDP6, nil
+
+ case strings.HasPrefix(strings.ToLower(network), tcp):
+ if ipv4 {
+ return NetworkTypeTCP4, nil
+ }
+ return NetworkTypeTCP6, nil
+ }
+
+ return NetworkType(0), fmt.Errorf("%w from %s %s", errDetermineNetworkType, network, ip)
+}
diff --git a/vendor/github.com/pion/ice/v2/priority.go b/vendor/github.com/pion/ice/v2/priority.go
new file mode 100644
index 0000000..4218299
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/priority.go
@@ -0,0 +1,33 @@
+package ice
+
+import (
+ "encoding/binary"
+
+ "github.com/pion/stun"
+)
+
+// PriorityAttr represents PRIORITY attribute.
+type PriorityAttr uint32
+
+const prioritySize = 4 // 32 bit
+
+// AddTo adds PRIORITY attribute to message.
+func (p PriorityAttr) AddTo(m *stun.Message) error {
+ v := make([]byte, prioritySize)
+ binary.BigEndian.PutUint32(v, uint32(p))
+ m.Add(stun.AttrPriority, v)
+ return nil
+}
+
+// GetFrom decodes PRIORITY attribute from message.
+func (p *PriorityAttr) GetFrom(m *stun.Message) error {
+ v, err := m.Get(stun.AttrPriority)
+ if err != nil {
+ return err
+ }
+ if err = stun.CheckSize(stun.AttrPriority, len(v), prioritySize); err != nil {
+ return err
+ }
+ *p = PriorityAttr(binary.BigEndian.Uint32(v))
+ return nil
+}
diff --git a/vendor/github.com/pion/ice/v2/rand.go b/vendor/github.com/pion/ice/v2/rand.go
new file mode 100644
index 0000000..918783e
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/rand.go
@@ -0,0 +1,53 @@
+package ice
+
+import "github.com/pion/randutil"
+
+const (
+ runesAlpha = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ runesDigit = "0123456789"
+ runesCandidateIDFoundation = runesAlpha + runesDigit + "+/"
+
+ lenUFrag = 16
+ lenPwd = 32
+)
+
+// Seeding random generator each time limits number of generated sequence to 31-bits,
+// and causes collision on low time accuracy environments.
+// Use global random generator seeded by crypto grade random.
+var (
+ globalMathRandomGenerator = randutil.NewMathRandomGenerator() //nolint:gochecknoglobals
+ globalCandidateIDGenerator = candidateIDGenerator{globalMathRandomGenerator} //nolint:gochecknoglobals
+)
+
+// candidateIDGenerator is a random candidate ID generator.
+// Candidate ID is used in SDP and always shared to the other peer.
+// It doesn't require cryptographic random.
+type candidateIDGenerator struct {
+ randutil.MathRandomGenerator
+}
+
+func newCandidateIDGenerator() *candidateIDGenerator {
+ return &candidateIDGenerator{
+ randutil.NewMathRandomGenerator(),
+ }
+}
+
+func (g *candidateIDGenerator) Generate() string {
+ // https://tools.ietf.org/html/rfc5245#section-15.1
+ // candidate-id = "candidate" ":" foundation
+ // foundation = 1*32ice-char
+ // ice-char = ALPHA / DIGIT / "+" / "/"
+ return "candidate:" + g.MathRandomGenerator.GenerateString(32, runesCandidateIDFoundation)
+}
+
+// generatePwd generates ICE pwd.
+// This internally uses generateCryptoRandomString.
+func generatePwd() (string, error) {
+ return randutil.GenerateCryptoRandomString(lenPwd, runesAlpha)
+}
+
+// generateUFrag generates ICE user fragment.
+// This internally uses generateCryptoRandomString.
+func generateUFrag() (string, error) {
+ return randutil.GenerateCryptoRandomString(lenUFrag, runesAlpha)
+}
diff --git a/vendor/github.com/pion/ice/v2/renovate.json b/vendor/github.com/pion/ice/v2/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/ice/v2/role.go b/vendor/github.com/pion/ice/v2/role.go
new file mode 100644
index 0000000..7a8bc06
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/role.go
@@ -0,0 +1,43 @@
+package ice
+
+import (
+ "fmt"
+)
+
+// Role represents ICE agent role, which can be controlling or controlled.
+type Role byte
+
+// Possible ICE agent roles.
+const (
+ Controlling Role = iota
+ Controlled
+)
+
+// UnmarshalText implements TextUnmarshaler.
+func (r *Role) UnmarshalText(text []byte) error {
+ switch string(text) {
+ case "controlling":
+ *r = Controlling
+ case "controlled":
+ *r = Controlled
+ default:
+ return fmt.Errorf("%w %q", errUnknownRole, text)
+ }
+ return nil
+}
+
+// MarshalText implements TextMarshaler.
+func (r Role) MarshalText() (text []byte, err error) {
+ return []byte(r.String()), nil
+}
+
+func (r Role) String() string {
+ switch r {
+ case Controlling:
+ return "controlling"
+ case Controlled:
+ return "controlled"
+ default:
+ return "unknown"
+ }
+}
diff --git a/vendor/github.com/pion/ice/v2/selection.go b/vendor/github.com/pion/ice/v2/selection.go
new file mode 100644
index 0000000..e0cfb10
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/selection.go
@@ -0,0 +1,287 @@
+package ice
+
+import (
+ "net"
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/stun"
+)
+
+type pairCandidateSelector interface {
+ Start()
+ ContactCandidates()
+ PingCandidate(local, remote Candidate)
+ HandleSuccessResponse(m *stun.Message, local, remote Candidate, remoteAddr net.Addr)
+ HandleBindingRequest(m *stun.Message, local, remote Candidate)
+}
+
+type controllingSelector struct {
+ startTime time.Time
+ agent *Agent
+ nominatedPair *candidatePair
+ log logging.LeveledLogger
+}
+
+func (s *controllingSelector) Start() {
+ s.startTime = time.Now()
+ s.nominatedPair = nil
+}
+
+func (s *controllingSelector) isNominatable(c Candidate) bool {
+ switch {
+ case c.Type() == CandidateTypeHost:
+ return time.Since(s.startTime).Nanoseconds() > s.agent.hostAcceptanceMinWait.Nanoseconds()
+ case c.Type() == CandidateTypeServerReflexive:
+ return time.Since(s.startTime).Nanoseconds() > s.agent.srflxAcceptanceMinWait.Nanoseconds()
+ case c.Type() == CandidateTypePeerReflexive:
+ return time.Since(s.startTime).Nanoseconds() > s.agent.prflxAcceptanceMinWait.Nanoseconds()
+ case c.Type() == CandidateTypeRelay:
+ return time.Since(s.startTime).Nanoseconds() > s.agent.relayAcceptanceMinWait.Nanoseconds()
+ }
+
+ s.log.Errorf("isNominatable invalid candidate type %s", c.Type().String())
+ return false
+}
+
+func (s *controllingSelector) ContactCandidates() {
+ switch {
+ case s.agent.getSelectedPair() != nil:
+ if s.agent.validateSelectedPair() {
+ s.log.Trace("checking keepalive")
+ s.agent.checkKeepalive()
+ }
+ case s.nominatedPair != nil:
+ s.nominatePair(s.nominatedPair)
+ default:
+ p := s.agent.getBestValidCandidatePair()
+ if p != nil && s.isNominatable(p.local) && s.isNominatable(p.remote) {
+ s.log.Tracef("Nominatable pair found, nominating (%s, %s)", p.local.String(), p.remote.String())
+ p.nominated = true
+ s.nominatedPair = p
+ s.nominatePair(p)
+ return
+ }
+ s.agent.pingAllCandidates()
+ }
+}
+
+func (s *controllingSelector) nominatePair(pair *candidatePair) {
+ // The controlling agent MUST include the USE-CANDIDATE attribute in
+ // order to nominate a candidate pair (Section 8.1.1). The controlled
+ // agent MUST NOT include the USE-CANDIDATE attribute in a Binding
+ // request.
+ msg, err := stun.Build(stun.BindingRequest, stun.TransactionID,
+ stun.NewUsername(s.agent.remoteUfrag+":"+s.agent.localUfrag),
+ UseCandidate(),
+ AttrControlling(s.agent.tieBreaker),
+ PriorityAttr(pair.local.Priority()),
+ stun.NewShortTermIntegrity(s.agent.remotePwd),
+ stun.Fingerprint,
+ )
+ if err != nil {
+ s.log.Error(err.Error())
+ return
+ }
+
+ s.log.Tracef("ping STUN (nominate candidate pair) from %s to %s\n", pair.local.String(), pair.remote.String())
+ s.agent.sendBindingRequest(msg, pair.local, pair.remote)
+}
+
+func (s *controllingSelector) HandleBindingRequest(m *stun.Message, local, remote Candidate) {
+ s.agent.sendBindingSuccess(m, local, remote)
+
+ p := s.agent.findPair(local, remote)
+
+ if p == nil {
+ s.agent.addPair(local, remote)
+ return
+ }
+
+ if p.state == CandidatePairStateSucceeded && s.nominatedPair == nil && s.agent.getSelectedPair() == nil {
+ bestPair := s.agent.getBestAvailableCandidatePair()
+ if bestPair == nil {
+ s.log.Tracef("No best pair available\n")
+ } else if bestPair.Equal(p) && s.isNominatable(p.local) && s.isNominatable(p.remote) {
+ s.log.Tracef("The candidate (%s, %s) is the best candidate available, marking it as nominated\n",
+ p.local.String(), p.remote.String())
+ s.nominatedPair = p
+ s.nominatePair(p)
+ }
+ }
+}
+
+func (s *controllingSelector) HandleSuccessResponse(m *stun.Message, local, remote Candidate, remoteAddr net.Addr) {
+ ok, pendingRequest := s.agent.handleInboundBindingSuccess(m.TransactionID)
+ if !ok {
+ s.log.Warnf("discard message from (%s), unknown TransactionID 0x%x", remote, m.TransactionID)
+ return
+ }
+
+ transactionAddr := pendingRequest.destination
+
+ // Assert that NAT is not symmetric
+ // https://tools.ietf.org/html/rfc8445#section-7.2.5.2.1
+ if !addrEqual(transactionAddr, remoteAddr) {
+ s.log.Debugf("discard message: transaction source and destination does not match expected(%s), actual(%s)", transactionAddr, remote)
+ return
+ }
+
+ s.log.Tracef("inbound STUN (SuccessResponse) from %s to %s", remote.String(), local.String())
+ p := s.agent.findPair(local, remote)
+
+ if p == nil {
+ // This shouldn't happen
+ s.log.Error("Success response from invalid candidate pair")
+ return
+ }
+
+ p.state = CandidatePairStateSucceeded
+ s.log.Tracef("Found valid candidate pair: %s", p)
+ if pendingRequest.isUseCandidate && s.agent.getSelectedPair() == nil {
+ s.agent.setSelectedPair(p)
+ }
+}
+
+func (s *controllingSelector) PingCandidate(local, remote Candidate) {
+ msg, err := stun.Build(stun.BindingRequest, stun.TransactionID,
+ stun.NewUsername(s.agent.remoteUfrag+":"+s.agent.localUfrag),
+ AttrControlling(s.agent.tieBreaker),
+ PriorityAttr(local.Priority()),
+ stun.NewShortTermIntegrity(s.agent.remotePwd),
+ stun.Fingerprint,
+ )
+ if err != nil {
+ s.log.Error(err.Error())
+ return
+ }
+
+ s.agent.sendBindingRequest(msg, local, remote)
+}
+
+type controlledSelector struct {
+ agent *Agent
+ log logging.LeveledLogger
+}
+
+func (s *controlledSelector) Start() {
+}
+
+func (s *controlledSelector) ContactCandidates() {
+ if s.agent.getSelectedPair() != nil {
+ if s.agent.validateSelectedPair() {
+ s.log.Trace("checking keepalive")
+ s.agent.checkKeepalive()
+ }
+ } else {
+ s.agent.pingAllCandidates()
+ }
+}
+
+func (s *controlledSelector) PingCandidate(local, remote Candidate) {
+ msg, err := stun.Build(stun.BindingRequest, stun.TransactionID,
+ stun.NewUsername(s.agent.remoteUfrag+":"+s.agent.localUfrag),
+ AttrControlled(s.agent.tieBreaker),
+ PriorityAttr(local.Priority()),
+ stun.NewShortTermIntegrity(s.agent.remotePwd),
+ stun.Fingerprint,
+ )
+ if err != nil {
+ s.log.Error(err.Error())
+ return
+ }
+
+ s.agent.sendBindingRequest(msg, local, remote)
+}
+
+func (s *controlledSelector) HandleSuccessResponse(m *stun.Message, local, remote Candidate, remoteAddr net.Addr) {
+ // nolint:godox
+ // TODO according to the standard we should specifically answer a failed nomination:
+ // https://tools.ietf.org/html/rfc8445#section-7.3.1.5
+ // If the controlled agent does not accept the request from the
+ // controlling agent, the controlled agent MUST reject the nomination
+ // request with an appropriate error code response (e.g., 400)
+ // [RFC5389].
+
+ ok, pendingRequest := s.agent.handleInboundBindingSuccess(m.TransactionID)
+ if !ok {
+ s.log.Warnf("discard message from (%s), unknown TransactionID 0x%x", remote, m.TransactionID)
+ return
+ }
+
+ transactionAddr := pendingRequest.destination
+
+ // Assert that NAT is not symmetric
+ // https://tools.ietf.org/html/rfc8445#section-7.2.5.2.1
+ if !addrEqual(transactionAddr, remoteAddr) {
+ s.log.Debugf("discard message: transaction source and destination does not match expected(%s), actual(%s)", transactionAddr, remote)
+ return
+ }
+
+ s.log.Tracef("inbound STUN (SuccessResponse) from %s to %s", remote.String(), local.String())
+
+ p := s.agent.findPair(local, remote)
+ if p == nil {
+ // This shouldn't happen
+ s.log.Error("Success response from invalid candidate pair")
+ return
+ }
+
+ p.state = CandidatePairStateSucceeded
+ s.log.Tracef("Found valid candidate pair: %s", p)
+}
+
+func (s *controlledSelector) HandleBindingRequest(m *stun.Message, local, remote Candidate) {
+ useCandidate := m.Contains(stun.AttrUseCandidate)
+
+ p := s.agent.findPair(local, remote)
+
+ if p == nil {
+ p = s.agent.addPair(local, remote)
+ }
+
+ if useCandidate {
+ // https://tools.ietf.org/html/rfc8445#section-7.3.1.5
+
+ if p.state == CandidatePairStateSucceeded {
+ // If the state of this pair is Succeeded, it means that the check
+ // previously sent by this pair produced a successful response and
+ // generated a valid pair (Section 7.2.5.3.2). The agent sets the
+ // nominated flag value of the valid pair to true.
+ if selectedPair := s.agent.getSelectedPair(); selectedPair == nil {
+ s.agent.setSelectedPair(p)
+ }
+ s.agent.sendBindingSuccess(m, local, remote)
+ } else {
+ // If the received Binding request triggered a new check to be
+ // enqueued in the triggered-check queue (Section 7.3.1.4), once the
+ // check is sent and if it generates a successful response, and
+ // generates a valid pair, the agent sets the nominated flag of the
+ // pair to true. If the request fails (Section 7.2.5.2), the agent
+ // MUST remove the candidate pair from the valid list, set the
+ // candidate pair state to Failed, and set the checklist state to
+ // Failed.
+ s.PingCandidate(local, remote)
+ }
+ } else {
+ s.agent.sendBindingSuccess(m, local, remote)
+ s.PingCandidate(local, remote)
+ }
+}
+
+type liteSelector struct {
+ pairCandidateSelector
+}
+
+// A lite selector should not contact candidates
+func (s *liteSelector) ContactCandidates() {
+ if _, ok := s.pairCandidateSelector.(*controllingSelector); ok {
+ // nolint:godox
+ // pion/ice#96
+ // TODO: implement lite controlling agent. For now falling back to full agent.
+ // This only happens if both peers are lite. See RFC 8445 S6.1.1 and S6.2
+ s.pairCandidateSelector.ContactCandidates()
+ } else if v, ok := s.pairCandidateSelector.(*controlledSelector); ok {
+ v.agent.validateSelectedPair()
+ }
+}
diff --git a/vendor/github.com/pion/ice/v2/stats.go b/vendor/github.com/pion/ice/v2/stats.go
new file mode 100644
index 0000000..f59d89f
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/stats.go
@@ -0,0 +1,177 @@
+package ice
+
+import (
+ "time"
+)
+
+// CandidatePairStats contains ICE candidate pair statistics
+type CandidatePairStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp time.Time
+
+ // LocalCandidateID is the ID of the local candidate
+ LocalCandidateID string
+
+ // RemoteCandidateID is the ID of the remote candidate
+ RemoteCandidateID string
+
+ // State represents the state of the checklist for the local and remote
+ // candidates in a pair.
+ State CandidatePairState
+
+ // Nominated is true when this valid pair that should be used for media
+ // if it is the highest-priority one amongst those whose nominated flag is set
+ Nominated bool
+
+ // PacketsSent represents the total number of packets sent on this candidate pair.
+ PacketsSent uint32
+
+ // PacketsReceived represents the total number of packets received on this candidate pair.
+ PacketsReceived uint32
+
+ // BytesSent represents the total number of payload bytes sent on this candidate pair
+ // not including headers or padding.
+ BytesSent uint64
+
+ // BytesReceived represents the total number of payload bytes received on this candidate pair
+ // not including headers or padding.
+ BytesReceived uint64
+
+ // LastPacketSentTimestamp represents the timestamp at which the last packet was
+ // sent on this particular candidate pair, excluding STUN packets.
+ LastPacketSentTimestamp time.Time
+
+ // LastPacketReceivedTimestamp represents the timestamp at which the last packet
+ // was received on this particular candidate pair, excluding STUN packets.
+ LastPacketReceivedTimestamp time.Time
+
+ // FirstRequestTimestamp represents the timestamp at which the first STUN request
+ // was sent on this particular candidate pair.
+ FirstRequestTimestamp time.Time
+
+ // LastRequestTimestamp represents the timestamp at which the last STUN request
+ // was sent on this particular candidate pair. The average interval between two
+ // consecutive connectivity checks sent can be calculated with
+ // (LastRequestTimestamp - FirstRequestTimestamp) / RequestsSent.
+ LastRequestTimestamp time.Time
+
+ // LastResponseTimestamp represents the timestamp at which the last STUN response
+ // was received on this particular candidate pair.
+ LastResponseTimestamp time.Time
+
+ // TotalRoundTripTime represents the sum of all round trip time measurements
+ // in seconds since the beginning of the session, based on STUN connectivity
+ // check responses (ResponsesReceived), including those that reply to requests
+ // that are sent in order to verify consent. The average round trip time can
+ // be computed from TotalRoundTripTime by dividing it by ResponsesReceived.
+ TotalRoundTripTime float64
+
+ // CurrentRoundTripTime represents the latest round trip time measured in seconds,
+ // computed from both STUN connectivity checks, including those that are sent
+ // for consent verification.
+ CurrentRoundTripTime float64
+
+ // AvailableOutgoingBitrate is calculated by the underlying congestion control
+ // by combining the available bitrate for all the outgoing RTP streams using
+ // this candidate pair. The bitrate measurement does not count the size of the
+ // IP or other transport layers like TCP or UDP. It is similar to the TIAS defined
+ // in RFC 3890, i.e., it is measured in bits per second and the bitrate is calculated
+ // over a 1 second window.
+ AvailableOutgoingBitrate float64
+
+ // AvailableIncomingBitrate is calculated by the underlying congestion control
+ // by combining the available bitrate for all the incoming RTP streams using
+ // this candidate pair. The bitrate measurement does not count the size of the
+ // IP or other transport layers like TCP or UDP. It is similar to the TIAS defined
+ // in RFC 3890, i.e., it is measured in bits per second and the bitrate is
+ // calculated over a 1 second window.
+ AvailableIncomingBitrate float64
+
+ // CircuitBreakerTriggerCount represents the number of times the circuit breaker
+ // is triggered for this particular 5-tuple, ceasing transmission.
+ CircuitBreakerTriggerCount uint32
+
+ // RequestsReceived represents the total number of connectivity check requests
+ // received (including retransmissions). It is impossible for the receiver to
+ // tell whether the request was sent in order to check connectivity or check
+ // consent, so all connectivity checks requests are counted here.
+ RequestsReceived uint64
+
+ // RequestsSent represents the total number of connectivity check requests
+ // sent (not including retransmissions).
+ RequestsSent uint64
+
+ // ResponsesReceived represents the total number of connectivity check responses received.
+ ResponsesReceived uint64
+
+ // ResponsesSent epresents the total number of connectivity check responses sent.
+ // Since we cannot distinguish connectivity check requests and consent requests,
+ // all responses are counted.
+ ResponsesSent uint64
+
+ // RetransmissionsReceived represents the total number of connectivity check
+ // request retransmissions received.
+ RetransmissionsReceived uint64
+
+ // RetransmissionsSent represents the total number of connectivity check
+ // request retransmissions sent.
+ RetransmissionsSent uint64
+
+ // ConsentRequestsSent represents the total number of consent requests sent.
+ ConsentRequestsSent uint64
+
+ // ConsentExpiredTimestamp represents the timestamp at which the latest valid
+ // STUN binding response expired.
+ ConsentExpiredTimestamp time.Time
+}
+
+// CandidateStats contains ICE candidate statistics related to the ICETransport objects.
+type CandidateStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp time.Time
+
+ // ID is the candidate ID
+ ID string
+
+ // NetworkType represents the type of network interface used by the base of a
+ // local candidate (the address the ICE agent sends from). Only present for
+ // local candidates; it's not possible to know what type of network interface
+ // a remote candidate is using.
+ //
+ // Note:
+ // This stat only tells you about the network interface used by the first "hop";
+ // it's possible that a connection will be bottlenecked by another type of network.
+ // For example, when using Wi-Fi tethering, the networkType of the relevant candidate
+ // would be "wifi", even when the next hop is over a cellular connection.
+ NetworkType NetworkType
+
+ // IP is the IP address of the candidate, allowing for IPv4 addresses and
+ // IPv6 addresses, but fully qualified domain names (FQDNs) are not allowed.
+ IP string
+
+ // Port is the port number of the candidate.
+ Port int
+
+ // CandidateType is the "Type" field of the ICECandidate.
+ CandidateType CandidateType
+
+ // Priority is the "Priority" field of the ICECandidate.
+ Priority uint32
+
+ // URL is the URL of the TURN or STUN server indicated in the that translated
+ // this IP address. It is the URL address surfaced in an PeerConnectionICEEvent.
+ URL string
+
+ // RelayProtocol is the protocol used by the endpoint to communicate with the
+ // TURN server. This is only present for local candidates. Valid values for
+ // the TURN URL protocol is one of udp, tcp, or tls.
+ RelayProtocol string
+
+ // Deleted is true if the candidate has been deleted/freed. For host candidates,
+ // this means that any network resources (typically a socket) associated with the
+ // candidate have been released. For TURN candidates, this means the TURN allocation
+ // is no longer active.
+ //
+ // Only defined for local candidates. For remote candidates, this property is not applicable.
+ Deleted bool
+}
diff --git a/vendor/github.com/pion/ice/v2/stun.go b/vendor/github.com/pion/ice/v2/stun.go
new file mode 100644
index 0000000..bef7c87
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/stun.go
@@ -0,0 +1,24 @@
+package ice
+
+import (
+ "fmt"
+
+ "github.com/pion/stun"
+)
+
+func assertInboundUsername(m *stun.Message, expectedUsername string) error {
+ var username stun.Username
+ if err := username.GetFrom(m); err != nil {
+ return err
+ }
+ if string(username) != expectedUsername {
+ return fmt.Errorf("%w expected(%x) actual(%x)", errMismatchUsername, expectedUsername, string(username))
+ }
+
+ return nil
+}
+
+func assertInboundMessageIntegrity(m *stun.Message, key []byte) error {
+ messageIntegrityAttr := stun.MessageIntegrity(key)
+ return messageIntegrityAttr.Check(m)
+}
diff --git a/vendor/github.com/pion/ice/v2/tcp_mux.go b/vendor/github.com/pion/ice/v2/tcp_mux.go
new file mode 100644
index 0000000..1a9a797
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/tcp_mux.go
@@ -0,0 +1,295 @@
+package ice
+
+import (
+ "encoding/binary"
+ "io"
+ "net"
+ "strings"
+ "sync"
+
+ "github.com/pion/logging"
+ "github.com/pion/stun"
+)
+
+// TCPMux is allows grouping multiple TCP net.Conns and using them like UDP
+// net.PacketConns. The main implementation of this is TCPMuxDefault, and this
+// interface exists to:
+// 1. prevent SEGV panics when TCPMuxDefault is not initialized by using the
+// invalidTCPMux implementation, and
+// 2. allow mocking in tests.
+type TCPMux interface {
+ io.Closer
+ GetConnByUfrag(ufrag string) (net.PacketConn, error)
+ RemoveConnByUfrag(ufrag string)
+}
+
+// invalidTCPMux is an implementation of TCPMux that always returns ErroTCPMuxNotInitialized.
+type invalidTCPMux struct {
+}
+
+func newInvalidTCPMux() *invalidTCPMux {
+ return &invalidTCPMux{}
+}
+
+// Close implements TCPMux interface.
+func (m *invalidTCPMux) Close() error {
+ return ErrTCPMuxNotInitialized
+}
+
+// GetConnByUfrag implements TCPMux interface.
+func (m *invalidTCPMux) GetConnByUfrag(ufrag string) (net.PacketConn, error) {
+ return nil, ErrTCPMuxNotInitialized
+}
+
+// RemoveConnByUfrag implements TCPMux interface.
+func (m *invalidTCPMux) RemoveConnByUfrag(ufrag string) {}
+
+// TCPMuxDefault muxes TCP net.Conns into net.PacketConns and groups them by
+// Ufrag. It is a default implementation of TCPMux interface.
+type TCPMuxDefault struct {
+ params *TCPMuxParams
+ closed bool
+
+ // conns is a map of all tcpPacketConns indexed by ufrag
+ conns map[string]*tcpPacketConn
+
+ mu sync.Mutex
+ wg sync.WaitGroup
+}
+
+// TCPMuxParams are parameters for TCPMux.
+type TCPMuxParams struct {
+ Listener net.Listener
+ Logger logging.LeveledLogger
+ ReadBufferSize int
+}
+
+// NewTCPMuxDefault creates a new instance of TCPMuxDefault.
+func NewTCPMuxDefault(params TCPMuxParams) *TCPMuxDefault {
+ if params.Logger == nil {
+ params.Logger = logging.NewDefaultLoggerFactory().NewLogger("ice")
+ }
+
+ m := &TCPMuxDefault{
+ params: &params,
+
+ conns: map[string]*tcpPacketConn{},
+ }
+
+ m.wg.Add(1)
+ go func() {
+ defer m.wg.Done()
+ m.start()
+ }()
+
+ return m
+}
+
+func (m *TCPMuxDefault) start() {
+ m.params.Logger.Infof("Listening TCP on %s\n", m.params.Listener.Addr())
+ for {
+ conn, err := m.params.Listener.Accept()
+ if err != nil {
+ m.params.Logger.Infof("Error accepting connection: %s\n", err)
+ return
+ }
+
+ m.params.Logger.Debugf("Accepted connection from: %s to %s", conn.RemoteAddr(), conn.LocalAddr())
+
+ m.wg.Add(1)
+ go func() {
+ defer m.wg.Done()
+ m.handleConn(conn)
+ }()
+ }
+}
+
+// LocalAddr returns the listening address of this TCPMuxDefault.
+func (m *TCPMuxDefault) LocalAddr() net.Addr {
+ return m.params.Listener.Addr()
+}
+
+// GetConnByUfrag retrieves an existing or creates a new net.PacketConn.
+func (m *TCPMuxDefault) GetConnByUfrag(ufrag string) (net.PacketConn, error) {
+ m.mu.Lock()
+ defer m.mu.Unlock()
+
+ if m.closed {
+ return nil, io.ErrClosedPipe
+ }
+
+ conn, ok := m.conns[ufrag]
+
+ if ok {
+ return conn, nil
+ // return nil, fmt.Errorf("duplicate ufrag %v", ufrag)
+ }
+
+ conn = m.createConn(ufrag, m.LocalAddr())
+
+ return conn, nil
+}
+
+func (m *TCPMuxDefault) createConn(ufrag string, localAddr net.Addr) *tcpPacketConn {
+ conn := newTCPPacketConn(tcpPacketParams{
+ ReadBuffer: m.params.ReadBufferSize,
+ LocalAddr: localAddr,
+ Logger: m.params.Logger,
+ })
+ m.conns[ufrag] = conn
+
+ m.wg.Add(1)
+ go func() {
+ defer m.wg.Done()
+ <-conn.CloseChannel()
+ m.RemoveConnByUfrag(ufrag)
+ }()
+
+ return conn
+}
+
+func (m *TCPMuxDefault) closeAndLogError(closer io.Closer) {
+ err := closer.Close()
+ if err != nil {
+ m.params.Logger.Warnf("Error closing connection: %s", err)
+ }
+}
+
+func (m *TCPMuxDefault) handleConn(conn net.Conn) {
+ buf := make([]byte, receiveMTU)
+
+ n, err := readStreamingPacket(conn, buf)
+ if err != nil {
+ m.params.Logger.Warnf("Error reading first packet: %s", err)
+ return
+ }
+
+ buf = buf[:n]
+
+ msg := &stun.Message{
+ Raw: make([]byte, len(buf)),
+ }
+ // Explicitly copy raw buffer so Message can own the memory.
+ copy(msg.Raw, buf)
+ if err = msg.Decode(); err != nil {
+ m.closeAndLogError(conn)
+ m.params.Logger.Warnf("Failed to handle decode ICE from %s to %s: %v\n", conn.RemoteAddr(), conn.LocalAddr(), err)
+ return
+ }
+
+ if m == nil || msg.Type.Method != stun.MethodBinding { // not a stun
+ m.closeAndLogError(conn)
+ m.params.Logger.Warnf("Not a STUN message from %s to %s\n", conn.RemoteAddr(), conn.LocalAddr())
+ return
+ }
+
+ for _, attr := range msg.Attributes {
+ m.params.Logger.Debugf("msg attr: %s\n", attr.String())
+ }
+
+ attr, err := msg.Get(stun.AttrUsername)
+ if err != nil {
+ m.closeAndLogError(conn)
+ m.params.Logger.Warnf("No Username attribute in STUN message from %s to %s\n", conn.RemoteAddr(), conn.LocalAddr())
+ return
+ }
+
+ ufrag := strings.Split(string(attr), ":")[0]
+ m.params.Logger.Debugf("Ufrag: %s\n", ufrag)
+
+ m.mu.Lock()
+ defer m.mu.Unlock()
+
+ packetConn, ok := m.conns[ufrag]
+ if !ok {
+ packetConn = m.createConn(ufrag, conn.LocalAddr())
+ }
+
+ if err := packetConn.AddConn(conn, buf); err != nil {
+ m.closeAndLogError(conn)
+ m.params.Logger.Warnf("Error adding conn to tcpPacketConn from %s to %s: %s\n", conn.RemoteAddr(), conn.LocalAddr(), err)
+ return
+ }
+}
+
+// Close closes the listener and waits for all goroutines to exit.
+func (m *TCPMuxDefault) Close() error {
+ m.mu.Lock()
+ m.closed = true
+
+ for _, conn := range m.conns {
+ m.closeAndLogError(conn)
+ }
+ m.conns = map[string]*tcpPacketConn{}
+
+ err := m.params.Listener.Close()
+
+ m.mu.Unlock()
+
+ m.wg.Wait()
+
+ return err
+}
+
+// RemoveConnByUfrag closes and removes a net.PacketConn by Ufrag.
+func (m *TCPMuxDefault) RemoveConnByUfrag(ufrag string) {
+ m.mu.Lock()
+ defer m.mu.Unlock()
+
+ if conn, ok := m.conns[ufrag]; ok {
+ m.closeAndLogError(conn)
+ delete(m.conns, ufrag)
+ }
+}
+
+const streamingPacketHeaderLen = 2
+
+// readStreamingPacket reads 1 packet from stream
+// read packet bytes https://tools.ietf.org/html/rfc4571#section-2
+// 2-byte length header prepends each packet:
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// -----------------------------------------------------------------
+// | LENGTH | RTP or RTCP packet ... |
+// -----------------------------------------------------------------
+func readStreamingPacket(conn net.Conn, buf []byte) (int, error) {
+ header := make([]byte, streamingPacketHeaderLen)
+ var bytesRead, n int
+ var err error
+
+ for bytesRead < streamingPacketHeaderLen {
+ if n, err = conn.Read(header[bytesRead:streamingPacketHeaderLen]); err != nil {
+ return 0, err
+ }
+ bytesRead += n
+ }
+
+ length := int(binary.BigEndian.Uint16(header))
+
+ if length > cap(buf) {
+ return length, io.ErrShortBuffer
+ }
+
+ bytesRead = 0
+ for bytesRead < length {
+ if n, err = conn.Read(buf[bytesRead:length]); err != nil {
+ return 0, err
+ }
+ bytesRead += n
+ }
+
+ return bytesRead, nil
+}
+
+func writeStreamingPacket(conn net.Conn, buf []byte) (int, error) {
+ bufferCopy := make([]byte, streamingPacketHeaderLen+len(buf))
+ binary.BigEndian.PutUint16(bufferCopy, uint16(len(buf)))
+ copy(bufferCopy[2:], buf)
+
+ n, err := conn.Write(bufferCopy)
+ if err != nil {
+ return 0, err
+ }
+
+ return n - streamingPacketHeaderLen, nil
+}
diff --git a/vendor/github.com/pion/ice/v2/tcp_packet_conn.go b/vendor/github.com/pion/ice/v2/tcp_packet_conn.go
new file mode 100644
index 0000000..dc4eaf0
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/tcp_packet_conn.go
@@ -0,0 +1,240 @@
+package ice
+
+import (
+ "fmt"
+ "io"
+ "net"
+ "sync"
+ "time"
+
+ "github.com/pion/logging"
+)
+
+type tcpPacketConn struct {
+ params *tcpPacketParams
+
+ // conns is a map of net.Conns indexed by remote net.Addr.String()
+ conns map[string]net.Conn
+
+ recvChan chan streamingPacket
+
+ mu sync.Mutex
+ wg sync.WaitGroup
+ closedChan chan struct{}
+ closeOnce sync.Once
+}
+
+type streamingPacket struct {
+ Data []byte
+ RAddr net.Addr
+ Err error
+}
+
+type tcpPacketParams struct {
+ ReadBuffer int
+ LocalAddr net.Addr
+ Logger logging.LeveledLogger
+}
+
+func newTCPPacketConn(params tcpPacketParams) *tcpPacketConn {
+ p := &tcpPacketConn{
+ params: &params,
+
+ conns: map[string]net.Conn{},
+
+ recvChan: make(chan streamingPacket, params.ReadBuffer),
+ closedChan: make(chan struct{}),
+ }
+
+ return p
+}
+
+func (t *tcpPacketConn) AddConn(conn net.Conn, firstPacketData []byte) error {
+ t.params.Logger.Infof("AddConn: %s %s", conn.RemoteAddr().Network(), conn.RemoteAddr())
+
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ select {
+ case <-t.closedChan:
+ return io.ErrClosedPipe
+ default:
+ }
+
+ if _, ok := t.conns[conn.RemoteAddr().String()]; ok {
+ return fmt.Errorf("%w: %s", errConnectionAddrAlreadyExist, conn.RemoteAddr().String())
+ }
+
+ t.conns[conn.RemoteAddr().String()] = conn
+
+ t.wg.Add(1)
+ go func() {
+ if firstPacketData != nil {
+ t.recvChan <- streamingPacket{firstPacketData, conn.RemoteAddr(), nil}
+ }
+ defer t.wg.Done()
+ t.startReading(conn)
+ }()
+
+ return nil
+}
+
+func (t *tcpPacketConn) startReading(conn net.Conn) {
+ buf := make([]byte, receiveMTU)
+
+ for {
+ n, err := readStreamingPacket(conn, buf)
+ // t.params.Logger.Infof("readStreamingPacket read %d bytes", n)
+ if err != nil {
+ t.params.Logger.Infof("%w: %s\n", errReadingStreamingPacket, err)
+ t.handleRecv(streamingPacket{nil, conn.RemoteAddr(), err})
+ t.removeConn(conn)
+ return
+ }
+
+ data := make([]byte, n)
+ copy(data, buf[:n])
+
+ // t.params.Logger.Infof("Writing read streaming packet to recvChan: %d bytes", len(data))
+ t.handleRecv(streamingPacket{data, conn.RemoteAddr(), nil})
+ }
+}
+
+func (t *tcpPacketConn) handleRecv(pkt streamingPacket) {
+ t.mu.Lock()
+
+ recvChan := t.recvChan
+ if t.isClosed() {
+ recvChan = nil
+ }
+
+ t.mu.Unlock()
+
+ select {
+ case recvChan <- pkt:
+ case <-t.closedChan:
+ }
+}
+
+func (t *tcpPacketConn) isClosed() bool {
+ select {
+ case <-t.closedChan:
+ return true
+ default:
+ return false
+ }
+}
+
+// WriteTo is for passive and s-o candidates.
+func (t *tcpPacketConn) ReadFrom(b []byte) (n int, raddr net.Addr, err error) {
+ pkt, ok := <-t.recvChan
+
+ if !ok {
+ return 0, nil, io.ErrClosedPipe
+ }
+
+ if pkt.Err != nil {
+ return 0, pkt.RAddr, pkt.Err
+ }
+
+ if cap(b) < len(pkt.Data) {
+ return 0, pkt.RAddr, io.ErrShortBuffer
+ }
+
+ n = len(pkt.Data)
+ copy(b, pkt.Data[:n])
+ return n, pkt.RAddr, err
+}
+
+// WriteTo is for active and s-o candidates.
+func (t *tcpPacketConn) WriteTo(buf []byte, raddr net.Addr) (n int, err error) {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ conn, ok := t.conns[raddr.String()]
+ if !ok {
+ return 0, io.ErrClosedPipe
+ // conn, err := net.DialTCP(tcp, nil, raddr.(*net.TCPAddr))
+
+ // if err != nil {
+ // t.params.Logger.Tracef("DialTCP error: %s", err)
+ // return 0, err
+ // }
+
+ // go t.startReading(conn)
+ // t.conns[raddr.String()] = conn
+ }
+
+ n, err = writeStreamingPacket(conn, buf)
+ if err != nil {
+ t.params.Logger.Tracef("%w %s\n", errWriting, raddr)
+ return n, err
+ }
+
+ return n, err
+}
+
+func (t *tcpPacketConn) closeAndLogError(closer io.Closer) {
+ err := closer.Close()
+ if err != nil {
+ t.params.Logger.Warnf("%w: %s", errClosingConnection, err)
+ }
+}
+
+func (t *tcpPacketConn) removeConn(conn net.Conn) {
+ t.mu.Lock()
+ defer t.mu.Unlock()
+
+ t.closeAndLogError(conn)
+
+ delete(t.conns, conn.RemoteAddr().String())
+}
+
+func (t *tcpPacketConn) Close() error {
+ t.mu.Lock()
+
+ var shouldCloseRecvChan bool
+ t.closeOnce.Do(func() {
+ close(t.closedChan)
+ shouldCloseRecvChan = true
+ })
+
+ for _, conn := range t.conns {
+ t.closeAndLogError(conn)
+ delete(t.conns, conn.RemoteAddr().String())
+ }
+
+ t.mu.Unlock()
+
+ t.wg.Wait()
+
+ if shouldCloseRecvChan {
+ close(t.recvChan)
+ }
+
+ return nil
+}
+
+func (t *tcpPacketConn) LocalAddr() net.Addr {
+ return t.params.LocalAddr
+}
+
+func (t *tcpPacketConn) SetDeadline(tm time.Time) error {
+ return nil
+}
+
+func (t *tcpPacketConn) SetReadDeadline(tm time.Time) error {
+ return nil
+}
+
+func (t *tcpPacketConn) SetWriteDeadline(tm time.Time) error {
+ return nil
+}
+
+func (t *tcpPacketConn) CloseChannel() <-chan struct{} {
+ return t.closedChan
+}
+
+func (t *tcpPacketConn) String() string {
+ return fmt.Sprintf("tcpPacketConn{LocalAddr: %s}", t.params.LocalAddr)
+}
diff --git a/vendor/github.com/pion/ice/v2/tcptype.go b/vendor/github.com/pion/ice/v2/tcptype.go
new file mode 100644
index 0000000..6700fe5
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/tcptype.go
@@ -0,0 +1,48 @@
+package ice
+
+import "strings"
+
+// TCPType is the type of ICE TCP candidate as described in
+// ttps://tools.ietf.org/html/rfc6544#section-4.5
+type TCPType int
+
+const (
+ // TCPTypeUnspecified is the default value. For example UDP candidates do not
+ // need this field.
+ TCPTypeUnspecified TCPType = iota
+ // TCPTypeActive is active TCP candidate, which initiates TCP connections.
+ TCPTypeActive
+ // TCPTypePassive is passive TCP candidate, only accepts TCP connections.
+ TCPTypePassive
+ // TCPTypeSimultaneousOpen is like active and passive at the same time.
+ TCPTypeSimultaneousOpen
+)
+
+// NewTCPType creates a new TCPType from string.
+func NewTCPType(value string) TCPType {
+ switch strings.ToLower(value) {
+ case "active":
+ return TCPTypeActive
+ case "passive":
+ return TCPTypePassive
+ case "so":
+ return TCPTypeSimultaneousOpen
+ default:
+ return TCPTypeUnspecified
+ }
+}
+
+func (t TCPType) String() string {
+ switch t {
+ case TCPTypeUnspecified:
+ return ""
+ case TCPTypeActive:
+ return "active"
+ case TCPTypePassive:
+ return "passive"
+ case TCPTypeSimultaneousOpen:
+ return "so"
+ default:
+ return ErrUnknownType.Error()
+ }
+}
diff --git a/vendor/github.com/pion/ice/v2/transport.go b/vendor/github.com/pion/ice/v2/transport.go
new file mode 100644
index 0000000..d1c82ff
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/transport.go
@@ -0,0 +1,145 @@
+package ice
+
+import (
+ "context"
+ "net"
+ "sync/atomic"
+ "time"
+
+ "github.com/pion/stun"
+)
+
+// Dial connects to the remote agent, acting as the controlling ice agent.
+// Dial blocks until at least one ice candidate pair has successfully connected.
+func (a *Agent) Dial(ctx context.Context, remoteUfrag, remotePwd string) (*Conn, error) {
+ return a.connect(ctx, true, remoteUfrag, remotePwd)
+}
+
+// Accept connects to the remote agent, acting as the controlled ice agent.
+// Accept blocks until at least one ice candidate pair has successfully connected.
+func (a *Agent) Accept(ctx context.Context, remoteUfrag, remotePwd string) (*Conn, error) {
+ return a.connect(ctx, false, remoteUfrag, remotePwd)
+}
+
+// Conn represents the ICE connection.
+// At the moment the lifetime of the Conn is equal to the Agent.
+type Conn struct {
+ bytesReceived uint64
+ bytesSent uint64
+ agent *Agent
+}
+
+// BytesSent returns the number of bytes sent
+func (c *Conn) BytesSent() uint64 {
+ return atomic.LoadUint64(&c.bytesSent)
+}
+
+// BytesReceived returns the number of bytes received
+func (c *Conn) BytesReceived() uint64 {
+ return atomic.LoadUint64(&c.bytesReceived)
+}
+
+func (a *Agent) connect(ctx context.Context, isControlling bool, remoteUfrag, remotePwd string) (*Conn, error) {
+ err := a.ok()
+ if err != nil {
+ return nil, err
+ }
+ err = a.startConnectivityChecks(isControlling, remoteUfrag, remotePwd)
+ if err != nil {
+ return nil, err
+ }
+
+ // block until pair selected
+ select {
+ case <-a.done:
+ return nil, a.getErr()
+ case <-ctx.Done():
+ return nil, ErrCanceledByCaller
+ case <-a.onConnected:
+ }
+
+ return &Conn{
+ agent: a,
+ }, nil
+}
+
+// Read implements the Conn Read method.
+func (c *Conn) Read(p []byte) (int, error) {
+ err := c.agent.ok()
+ if err != nil {
+ return 0, err
+ }
+
+ n, err := c.agent.buffer.Read(p)
+ atomic.AddUint64(&c.bytesReceived, uint64(n))
+ return n, err
+}
+
+// Write implements the Conn Write method.
+func (c *Conn) Write(p []byte) (int, error) {
+ err := c.agent.ok()
+ if err != nil {
+ return 0, err
+ }
+
+ if stun.IsMessage(p) {
+ return 0, errICEWriteSTUNMessage
+ }
+
+ pair := c.agent.getSelectedPair()
+ if pair == nil {
+ if err = c.agent.run(c.agent.context(), func(ctx context.Context, a *Agent) {
+ pair = a.getBestValidCandidatePair()
+ }); err != nil {
+ return 0, err
+ }
+
+ if pair == nil {
+ return 0, err
+ }
+ }
+
+ atomic.AddUint64(&c.bytesSent, uint64(len(p)))
+ return pair.Write(p)
+}
+
+// Close implements the Conn Close method. It is used to close
+// the connection. Any calls to Read and Write will be unblocked and return an error.
+func (c *Conn) Close() error {
+ return c.agent.Close()
+}
+
+// LocalAddr returns the local address of the current selected pair or nil if there is none.
+func (c *Conn) LocalAddr() net.Addr {
+ pair := c.agent.getSelectedPair()
+ if pair == nil {
+ return nil
+ }
+
+ return pair.local.addr()
+}
+
+// RemoteAddr returns the remote address of the current selected pair or nil if there is none.
+func (c *Conn) RemoteAddr() net.Addr {
+ pair := c.agent.getSelectedPair()
+ if pair == nil {
+ return nil
+ }
+
+ return pair.remote.addr()
+}
+
+// SetDeadline is a stub
+func (c *Conn) SetDeadline(t time.Time) error {
+ return nil
+}
+
+// SetReadDeadline is a stub
+func (c *Conn) SetReadDeadline(t time.Time) error {
+ return nil
+}
+
+// SetWriteDeadline is a stub
+func (c *Conn) SetWriteDeadline(t time.Time) error {
+ return nil
+}
diff --git a/vendor/github.com/pion/ice/v2/url.go b/vendor/github.com/pion/ice/v2/url.go
new file mode 100644
index 0000000..390591e
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/url.go
@@ -0,0 +1,225 @@
+package ice
+
+import (
+ "net"
+ "net/url"
+ "strconv"
+)
+
+// SchemeType indicates the type of server used in the ice.URL structure.
+type SchemeType int
+
+// Unknown defines default public constant to use for "enum" like struct
+// comparisons when no value was defined.
+const Unknown = iota
+
+const (
+ // SchemeTypeSTUN indicates the URL represents a STUN server.
+ SchemeTypeSTUN SchemeType = iota + 1
+
+ // SchemeTypeSTUNS indicates the URL represents a STUNS (secure) server.
+ SchemeTypeSTUNS
+
+ // SchemeTypeTURN indicates the URL represents a TURN server.
+ SchemeTypeTURN
+
+ // SchemeTypeTURNS indicates the URL represents a TURNS (secure) server.
+ SchemeTypeTURNS
+)
+
+// NewSchemeType defines a procedure for creating a new SchemeType from a raw
+// string naming the scheme type.
+func NewSchemeType(raw string) SchemeType {
+ switch raw {
+ case "stun":
+ return SchemeTypeSTUN
+ case "stuns":
+ return SchemeTypeSTUNS
+ case "turn":
+ return SchemeTypeTURN
+ case "turns":
+ return SchemeTypeTURNS
+ default:
+ return SchemeType(Unknown)
+ }
+}
+
+func (t SchemeType) String() string {
+ switch t {
+ case SchemeTypeSTUN:
+ return "stun"
+ case SchemeTypeSTUNS:
+ return "stuns"
+ case SchemeTypeTURN:
+ return "turn"
+ case SchemeTypeTURNS:
+ return "turns"
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// ProtoType indicates the transport protocol type that is used in the ice.URL
+// structure.
+type ProtoType int
+
+const (
+ // ProtoTypeUDP indicates the URL uses a UDP transport.
+ ProtoTypeUDP ProtoType = iota + 1
+
+ // ProtoTypeTCP indicates the URL uses a TCP transport.
+ ProtoTypeTCP
+)
+
+// NewProtoType defines a procedure for creating a new ProtoType from a raw
+// string naming the transport protocol type.
+func NewProtoType(raw string) ProtoType {
+ switch raw {
+ case "udp":
+ return ProtoTypeUDP
+ case "tcp":
+ return ProtoTypeTCP
+ default:
+ return ProtoType(Unknown)
+ }
+}
+
+func (t ProtoType) String() string {
+ switch t {
+ case ProtoTypeUDP:
+ return "udp"
+ case ProtoTypeTCP:
+ return "tcp"
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// URL represents a STUN (rfc7064) or TURN (rfc7065) URL
+type URL struct {
+ Scheme SchemeType
+ Host string
+ Port int
+ Username string
+ Password string
+ Proto ProtoType
+}
+
+// ParseURL parses a STUN or TURN urls following the ABNF syntax described in
+// https://tools.ietf.org/html/rfc7064 and https://tools.ietf.org/html/rfc7065
+// respectively.
+func ParseURL(raw string) (*URL, error) { //nolint:gocognit
+ rawParts, err := url.Parse(raw)
+ if err != nil {
+ return nil, err
+ }
+
+ var u URL
+ u.Scheme = NewSchemeType(rawParts.Scheme)
+ if u.Scheme == SchemeType(Unknown) {
+ return nil, ErrSchemeType
+ }
+
+ var rawPort string
+ if u.Host, rawPort, err = net.SplitHostPort(rawParts.Opaque); err != nil {
+ if e, ok := err.(*net.AddrError); ok {
+ if e.Err == "missing port in address" {
+ nextRawURL := u.Scheme.String() + ":" + rawParts.Opaque
+ switch {
+ case u.Scheme == SchemeTypeSTUN || u.Scheme == SchemeTypeTURN:
+ nextRawURL += ":3478"
+ if rawParts.RawQuery != "" {
+ nextRawURL += "?" + rawParts.RawQuery
+ }
+ return ParseURL(nextRawURL)
+ case u.Scheme == SchemeTypeSTUNS || u.Scheme == SchemeTypeTURNS:
+ nextRawURL += ":5349"
+ if rawParts.RawQuery != "" {
+ nextRawURL += "?" + rawParts.RawQuery
+ }
+ return ParseURL(nextRawURL)
+ }
+ }
+ }
+ return nil, err
+ }
+
+ if u.Host == "" {
+ return nil, ErrHost
+ }
+
+ if u.Port, err = strconv.Atoi(rawPort); err != nil {
+ return nil, ErrPort
+ }
+
+ switch u.Scheme {
+ case SchemeTypeSTUN:
+ qArgs, err := url.ParseQuery(rawParts.RawQuery)
+ if err != nil || len(qArgs) > 0 {
+ return nil, ErrSTUNQuery
+ }
+ u.Proto = ProtoTypeUDP
+ case SchemeTypeSTUNS:
+ qArgs, err := url.ParseQuery(rawParts.RawQuery)
+ if err != nil || len(qArgs) > 0 {
+ return nil, ErrSTUNQuery
+ }
+ u.Proto = ProtoTypeTCP
+ case SchemeTypeTURN:
+ proto, err := parseProto(rawParts.RawQuery)
+ if err != nil {
+ return nil, err
+ }
+
+ u.Proto = proto
+ if u.Proto == ProtoType(Unknown) {
+ u.Proto = ProtoTypeUDP
+ }
+ case SchemeTypeTURNS:
+ proto, err := parseProto(rawParts.RawQuery)
+ if err != nil {
+ return nil, err
+ }
+
+ u.Proto = proto
+ if u.Proto == ProtoType(Unknown) {
+ u.Proto = ProtoTypeTCP
+ }
+ }
+
+ return &u, nil
+}
+
+func parseProto(raw string) (ProtoType, error) {
+ qArgs, err := url.ParseQuery(raw)
+ if err != nil || len(qArgs) > 1 {
+ return ProtoType(Unknown), ErrInvalidQuery
+ }
+
+ var proto ProtoType
+ if rawProto := qArgs.Get("transport"); rawProto != "" {
+ if proto = NewProtoType(rawProto); proto == ProtoType(0) {
+ return ProtoType(Unknown), ErrProtoType
+ }
+ return proto, nil
+ }
+
+ if len(qArgs) > 0 {
+ return ProtoType(Unknown), ErrInvalidQuery
+ }
+
+ return proto, nil
+}
+
+func (u URL) String() string {
+ rawURL := u.Scheme.String() + ":" + net.JoinHostPort(u.Host, strconv.Itoa(u.Port))
+ if u.Scheme == SchemeTypeTURN || u.Scheme == SchemeTypeTURNS {
+ rawURL += "?transport=" + u.Proto.String()
+ }
+ return rawURL
+}
+
+// IsSecure returns whether the this URL's scheme describes secure scheme or not.
+func (u URL) IsSecure() bool {
+ return u.Scheme == SchemeTypeSTUNS || u.Scheme == SchemeTypeTURNS
+}
diff --git a/vendor/github.com/pion/ice/v2/usecandidate.go b/vendor/github.com/pion/ice/v2/usecandidate.go
new file mode 100644
index 0000000..f168c08
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/usecandidate.go
@@ -0,0 +1,23 @@
+package ice
+
+import "github.com/pion/stun"
+
+// UseCandidateAttr represents USE-CANDIDATE attribute.
+type UseCandidateAttr struct{}
+
+// AddTo adds USE-CANDIDATE attribute to message.
+func (UseCandidateAttr) AddTo(m *stun.Message) error {
+ m.Add(stun.AttrUseCandidate, nil)
+ return nil
+}
+
+// IsSet returns true if USE-CANDIDATE attribute is set.
+func (UseCandidateAttr) IsSet(m *stun.Message) bool {
+ _, err := m.Get(stun.AttrUseCandidate)
+ return err == nil
+}
+
+// UseCandidate is shorthand for UseCandidateAttr.
+func UseCandidate() UseCandidateAttr {
+ return UseCandidateAttr{}
+}
diff --git a/vendor/github.com/pion/ice/v2/util.go b/vendor/github.com/pion/ice/v2/util.go
new file mode 100644
index 0000000..7eb13c8
--- /dev/null
+++ b/vendor/github.com/pion/ice/v2/util.go
@@ -0,0 +1,233 @@
+package ice
+
+import (
+ "fmt"
+ "net"
+ "sync/atomic"
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/stun"
+ "github.com/pion/transport/vnet"
+)
+
+type atomicError struct{ v atomic.Value }
+
+func (a *atomicError) Store(err error) {
+ a.v.Store(struct{ error }{err})
+}
+
+func (a *atomicError) Load() error {
+ err, _ := a.v.Load().(struct{ error })
+ return err.error
+}
+
+// The conditions of invalidation written below are defined in
+// https://tools.ietf.org/html/rfc8445#section-5.1.1.1
+func isSupportedIPv6(ip net.IP) bool {
+ if len(ip) != net.IPv6len ||
+ isZeros(ip[0:12]) || // !(IPv4-compatible IPv6)
+ ip[0] == 0xfe && ip[1]&0xc0 == 0xc0 || // !(IPv6 site-local unicast)
+ ip.IsLinkLocalUnicast() ||
+ ip.IsLinkLocalMulticast() {
+ return false
+ }
+ return true
+}
+
+func isZeros(ip net.IP) bool {
+ for i := 0; i < len(ip); i++ {
+ if ip[i] != 0 {
+ return false
+ }
+ }
+ return true
+}
+
+func parseAddr(in net.Addr) (net.IP, int, NetworkType, bool) {
+ switch addr := in.(type) {
+ case *net.UDPAddr:
+ return addr.IP, addr.Port, NetworkTypeUDP4, true
+ case *net.TCPAddr:
+ return addr.IP, addr.Port, NetworkTypeTCP4, true
+ }
+ return nil, 0, 0, false
+}
+
+func createAddr(network NetworkType, ip net.IP, port int) net.Addr {
+ switch {
+ case network.IsTCP():
+ return &net.TCPAddr{IP: ip, Port: port}
+ default:
+ return &net.UDPAddr{IP: ip, Port: port}
+ }
+}
+
+func addrEqual(a, b net.Addr) bool {
+ aIP, aPort, aType, aOk := parseAddr(a)
+ if !aOk {
+ return false
+ }
+
+ bIP, bPort, bType, bOk := parseAddr(b)
+ if !bOk {
+ return false
+ }
+
+ return aType == bType && aIP.Equal(bIP) && aPort == bPort
+}
+
+// getXORMappedAddr initiates a stun requests to serverAddr using conn, reads the response and returns
+// the XORMappedAddress returned by the stun server.
+//
+// Adapted from stun v0.2.
+func getXORMappedAddr(conn net.PacketConn, serverAddr net.Addr, deadline time.Duration) (*stun.XORMappedAddress, error) {
+ if deadline > 0 {
+ if err := conn.SetReadDeadline(time.Now().Add(deadline)); err != nil {
+ return nil, err
+ }
+ }
+ defer func() {
+ if deadline > 0 {
+ _ = conn.SetReadDeadline(time.Time{})
+ }
+ }()
+ resp, err := stunRequest(
+ func(p []byte) (int, error) {
+ n, _, errr := conn.ReadFrom(p)
+ return n, errr
+ },
+ func(b []byte) (int, error) {
+ return conn.WriteTo(b, serverAddr)
+ },
+ )
+ if err != nil {
+ return nil, err
+ }
+ var addr stun.XORMappedAddress
+ if err = addr.GetFrom(resp); err != nil {
+ return nil, fmt.Errorf("%w: %v", errGetXorMappedAddrResponse, err)
+ }
+ return &addr, nil
+}
+
+func stunRequest(read func([]byte) (int, error), write func([]byte) (int, error)) (*stun.Message, error) {
+ req, err := stun.Build(stun.BindingRequest, stun.TransactionID)
+ if err != nil {
+ return nil, err
+ }
+ if _, err = write(req.Raw); err != nil {
+ return nil, err
+ }
+ const maxMessageSize = 1280
+ bs := make([]byte, maxMessageSize)
+ n, err := read(bs)
+ if err != nil {
+ return nil, err
+ }
+ res := &stun.Message{Raw: bs[:n]}
+ if err := res.Decode(); err != nil {
+ return nil, err
+ }
+ return res, nil
+}
+
+func localInterfaces(vnet *vnet.Net, interfaceFilter func(string) bool, networkTypes []NetworkType) ([]net.IP, error) { //nolint:gocognit
+ ips := []net.IP{}
+ ifaces, err := vnet.Interfaces()
+ if err != nil {
+ return ips, err
+ }
+
+ var IPv4Requested, IPv6Requested bool
+ for _, typ := range networkTypes {
+ if typ.IsIPv4() {
+ IPv4Requested = true
+ }
+
+ if typ.IsIPv6() {
+ IPv6Requested = true
+ }
+ }
+
+ for _, iface := range ifaces {
+ if iface.Flags&net.FlagUp == 0 {
+ continue // interface down
+ }
+ if iface.Flags&net.FlagLoopback != 0 {
+ continue // loopback interface
+ }
+
+ if interfaceFilter != nil && !interfaceFilter(iface.Name) {
+ continue
+ }
+
+ addrs, err := iface.Addrs()
+ if err != nil {
+ continue
+ }
+
+ for _, addr := range addrs {
+ var ip net.IP
+ switch addr := addr.(type) {
+ case *net.IPNet:
+ ip = addr.IP
+ case *net.IPAddr:
+ ip = addr.IP
+ }
+ if ip == nil || ip.IsLoopback() {
+ continue
+ }
+
+ if ipv4 := ip.To4(); ipv4 == nil {
+ if !IPv6Requested {
+ continue
+ } else if !isSupportedIPv6(ip) {
+ continue
+ }
+ } else if !IPv4Requested {
+ continue
+ }
+
+ ips = append(ips, ip)
+ }
+ }
+ return ips, nil
+}
+
+func listenUDPInPortRange(vnet *vnet.Net, log logging.LeveledLogger, portMax, portMin int, network string, laddr *net.UDPAddr) (vnet.UDPPacketConn, error) {
+ if (laddr.Port != 0) || ((portMin == 0) && (portMax == 0)) {
+ return vnet.ListenUDP(network, laddr)
+ }
+ var i, j int
+ i = portMin
+ if i == 0 {
+ i = 1
+ }
+ j = portMax
+ if j == 0 {
+ j = 0xFFFF
+ }
+ if i > j {
+ return nil, ErrPort
+ }
+
+ portStart := globalMathRandomGenerator.Intn(j-i+1) + i
+ portCurrent := portStart
+ for {
+ laddr = &net.UDPAddr{IP: laddr.IP, Port: portCurrent}
+ c, e := vnet.ListenUDP(network, laddr)
+ if e == nil {
+ return c, e
+ }
+ log.Debugf("failed to listen %s: %v", laddr.String(), e)
+ portCurrent++
+ if portCurrent > j {
+ portCurrent = i
+ }
+ if portCurrent == portStart {
+ break
+ }
+ }
+ return nil, ErrPort
+}
diff --git a/vendor/github.com/pion/interceptor/.gitignore b/vendor/github.com/pion/interceptor/.gitignore
new file mode 100644
index 0000000..83db74b
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/.gitignore
@@ -0,0 +1,24 @@
+### JetBrains IDE ###
+#####################
+.idea/
+
+### Emacs Temporary Files ###
+#############################
+*~
+
+### Folders ###
+###############
+bin/
+vendor/
+node_modules/
+
+### Files ###
+#############
+*.ivf
+*.ogg
+tags
+cover.out
+*.sw[poe]
+*.wasm
+examples/sfu-ws/cert.pem
+examples/sfu-ws/key.pem
diff --git a/vendor/github.com/pion/interceptor/.golangci.yml b/vendor/github.com/pion/interceptor/.golangci.yml
new file mode 100644
index 0000000..d6162c9
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/.golangci.yml
@@ -0,0 +1,89 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+ exhaustive:
+ default-signifies-exhaustive: true
+ gomodguard:
+ blocked:
+ modules:
+ - github.com/pkg/errors:
+ recommendations:
+ - errors
+
+linters:
+ enable:
+ - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
+ - bodyclose # checks whether HTTP response body is closed successfully
+ - deadcode # Finds unused code
+ - depguard # Go linter that checks if package imports are in a list of acceptable packages
+ - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
+ - dupl # Tool for code clone detection
+ - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
+ - exhaustive # check exhaustiveness of enum switch statements
+ - exportloopref # checks for pointers to enclosing loop variables
+ - gci # Gci control golang package import order and make it always deterministic.
+ - gochecknoglobals # Checks that no globals are present in Go code
+ - gochecknoinits # Checks that no init functions are present in Go code
+ - gocognit # Computes and checks the cognitive complexity of functions
+ - goconst # Finds repeated strings that could be replaced by a constant
+ - gocritic # The most opinionated Go source code linter
+ - godox # Tool for detection of FIXME, TODO and other comment keywords
+ - goerr113 # Golang linter to check the errors handling expressions
+ - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
+ - gofumpt # Gofumpt checks whether code was gofumpt-ed.
+ - goheader # Checks is file header matches to pattern
+ - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
+ - golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
+ - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.
+ - goprintffuncname # Checks that printf-like functions are named with `f` at the end
+ - gosec # Inspects source code for security problems
+ - gosimple # Linter for Go source code that specializes in simplifying a code
+ - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
+ - ineffassign # Detects when assignments to existing variables are not used
+ - misspell # Finds commonly misspelled English words in comments
+ - nakedret # Finds naked returns in functions greater than a specified function length
+ - noctx # noctx finds sending http request without context.Context
+ - scopelint # Scopelint checks for unpinned variables in go programs
+ - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
+ - structcheck # Finds unused struct fields
+ - stylecheck # Stylecheck is a replacement for golint
+ - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
+ - unconvert # Remove unnecessary type conversions
+ - unparam # Reports unused function parameters
+ - unused # Checks Go code for unused constants, variables, functions and types
+ - varcheck # Finds unused global variables and constants
+ - whitespace # Tool for detection of leading and trailing whitespace
+ disable:
+ - funlen # Tool for detection of long functions
+ - gocyclo # Computes and checks the cyclomatic complexity of functions
+ - godot # Check if comments end in a period
+ - gomnd # An analyzer to detect magic numbers.
+ - lll # Reports long lines
+ - maligned # Tool to detect Go structs that would take less memory if their fields were sorted
+ - nestif # Reports deeply nested if statements
+ - nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
+ - nolintlint # Reports ill-formed or insufficient nolint directives
+ - prealloc # Finds slice declarations that could potentially be preallocated
+ - rowserrcheck # checks whether Err of rows is checked successfully
+ - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
+ - testpackage # linter that makes you use a separate _test package
+ - wsl # Whitespace Linter - Forces you to use empty lines!
+
+issues:
+ exclude-use-default: false
+ exclude-rules:
+ # Allow complex tests, better to be self contained
+ - path: _test\.go
+ linters:
+ - gocognit
+
+ # Allow complex main function in examples
+ - path: examples
+ text: "of func `main` is high"
+ linters:
+ - gocognit
+
+run:
+ skip-dirs-use-default: false
diff --git a/vendor/github.com/pion/interceptor/LICENSE b/vendor/github.com/pion/interceptor/LICENSE
new file mode 100644
index 0000000..ab60297
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/interceptor/README.md b/vendor/github.com/pion/interceptor/README.md
new file mode 100644
index 0000000..007c340
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/README.md
@@ -0,0 +1,81 @@
+<h1 align="center">
+ <br>
+ Pion Interceptor
+ <br>
+</h1>
+<h4 align="center">RTCP and RTCP processors for building real time communications</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-interceptor-gray.svg?longCache=true&colorB=brightgreen" alt="Pion Interceptor"></a>
+ <a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <br>
+ <a href="https://pkg.go.dev/github.com/pion/interceptor"><img src="https://godoc.org/github.com/pion/interceptor?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/interceptor"><img src="https://codecov.io/gh/pion/interceptor/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/interceptor"><img src="https://goreportcard.com/badge/github.com/pion/interceptor" alt="Go Report Card"></a>
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+Interceptor is a framework for building RTP/RTCP communication software. This framework defines
+a interface that each interceptor must satisfy. These interceptors are then run sequentially. We
+also then provide common interceptors that will be useful for building RTC software.
+
+This package was built for [pion/webrtc](https://github.com/pion/webrtc), but we designed it to be consumable
+by anyone. With the following tenets in mind.
+
+* Useful defaults. Each interceptor will be configured to give you a good default experience.
+* Unblock unique use cases. New use cases are what is driving WebRTC, we want to empower them.
+* Encourage modification. Add your own interceptors without forking. Mixing with the ones we provide.
+* Empower learning. This code base should be useful to read and learn even if you aren't using Pion.
+
+#### Current Interceptors
+* NACK Generator/Responder
+
+#### Planned Interceptors
+* [Sender and Receiver Reports](https://tools.ietf.org/html/rfc3550#section-6.4)
+ - Bandwidth Estimation from Receiver Reports
+* [Transport Wide Congestion Control Feedback](https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01)
+ - [NADA](https://tools.ietf.org/html/rfc8698)
+ - [Google Congestion Control](https://tools.ietf.org/html/draft-ietf-rmcat-gcc-02)
+* JitterBuffer, re-order packets and wait for arrival
+* [FlexFec](https://tools.ietf.org/html/draft-ietf-payload-flexible-fec-scheme-20)
+* [webrtc-stats](https://www.w3.org/TR/webrtc-stats/) compliant statistics generation
+
+### Interceptor Public API
+The public interface is defined in [interceptor.go](https://github.com/pion/interceptor/blob/master/interceptor.go).
+The methods you need to satisy are broken up into 4 groups.
+
+* `BindRTCPWriter` and `BindRTCPReader` allow you to inspect/modify RTCP traffic.
+* `BindLocalStream` and `BindRemoteStream` notify you of a new SSRC stream and allow you to inspect/modify.
+* `UnbindLocalStream` and `UnbindRemoteStream` notify you when a SSRC stream has been removed
+* `Close` called when the interceptor is closed.
+
+Interceptors also pass Attributes between each other. These are a collection of key/value pairs and are useful for storing metadata
+or caching.
+
+[noop.go](https://github.com/pion/interceptor/blob/master/noop.go) is an interceptor that satisfies this interface, but does nothing.
+You can embed this interceptor as a starting point so you only need to define exactly what you need.
+
+[chain.go]( https://github.com/pion/interceptor/blob/master/chain.go) is used to combine multiple interceptors into one. They are called
+sequentially as the packet moves through them.
+
+### Examples
+The [examples](https://github.com/pion/interceptor/blob/master/examples) directory provides some basic examples. If you need more please file an issue!
+You should also look in [pion/webrtc](https://github.com/pion/webrtc) for real world examples.
+
+### Community
+Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [Adam Kiss](https://github.com/masterada) - *Original Author*
+* [Sean DuBois](https://github.com/sean-der) - *Original Author*
+* [Atsushi Watanabe](https://github.com/at-wat)
+* [Alessandro Ros](https://github.com/aler9)
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/interceptor/chain.go b/vendor/github.com/pion/interceptor/chain.go
new file mode 100644
index 0000000..d53c307
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/chain.go
@@ -0,0 +1,75 @@
+package interceptor
+
+// Chain is an interceptor that runs all child interceptors in order.
+type Chain struct {
+ interceptors []Interceptor
+}
+
+// NewChain returns a new Chain interceptor.
+func NewChain(interceptors []Interceptor) *Chain {
+ return &Chain{interceptors: interceptors}
+}
+
+// BindRTCPReader lets you modify any incoming RTCP packets. It is called once per sender/receiver, however this might
+// change in the future. The returned method will be called once per packet batch.
+func (i *Chain) BindRTCPReader(reader RTCPReader) RTCPReader {
+ for _, interceptor := range i.interceptors {
+ reader = interceptor.BindRTCPReader(reader)
+ }
+
+ return reader
+}
+
+// BindRTCPWriter lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method
+// will be called once per packet batch.
+func (i *Chain) BindRTCPWriter(writer RTCPWriter) RTCPWriter {
+ for _, interceptor := range i.interceptors {
+ writer = interceptor.BindRTCPWriter(writer)
+ }
+
+ return writer
+}
+
+// BindLocalStream lets you modify any outgoing RTP packets. It is called once for per LocalStream. The returned method
+// will be called once per rtp packet.
+func (i *Chain) BindLocalStream(ctx *StreamInfo, writer RTPWriter) RTPWriter {
+ for _, interceptor := range i.interceptors {
+ writer = interceptor.BindLocalStream(ctx, writer)
+ }
+
+ return writer
+}
+
+// UnbindLocalStream is called when the Stream is removed. It can be used to clean up any data related to that track.
+func (i *Chain) UnbindLocalStream(ctx *StreamInfo) {
+ for _, interceptor := range i.interceptors {
+ interceptor.UnbindLocalStream(ctx)
+ }
+}
+
+// BindRemoteStream lets you modify any incoming RTP packets. It is called once for per RemoteStream. The returned method
+// will be called once per rtp packet.
+func (i *Chain) BindRemoteStream(ctx *StreamInfo, reader RTPReader) RTPReader {
+ for _, interceptor := range i.interceptors {
+ reader = interceptor.BindRemoteStream(ctx, reader)
+ }
+
+ return reader
+}
+
+// UnbindRemoteStream is called when the Stream is removed. It can be used to clean up any data related to that track.
+func (i *Chain) UnbindRemoteStream(ctx *StreamInfo) {
+ for _, interceptor := range i.interceptors {
+ interceptor.UnbindRemoteStream(ctx)
+ }
+}
+
+// Close closes the Interceptor, cleaning up any data if necessary.
+func (i *Chain) Close() error {
+ var errs []error
+ for _, interceptor := range i.interceptors {
+ errs = append(errs, interceptor.Close())
+ }
+
+ return flattenErrs(errs)
+}
diff --git a/vendor/github.com/pion/interceptor/codecov.yml b/vendor/github.com/pion/interceptor/codecov.yml
new file mode 100644
index 0000000..085200a
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/codecov.yml
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+
+coverage:
+ status:
+ project:
+ default:
+ # Allow decreasing 2% of total coverage to avoid noise.
+ threshold: 2%
+ patch:
+ default:
+ target: 70%
+ only_pulls: true
+
+ignore:
+ - "examples/*"
+ - "examples/**/*"
diff --git a/vendor/github.com/pion/interceptor/errors.go b/vendor/github.com/pion/interceptor/errors.go
new file mode 100644
index 0000000..45e1252
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/errors.go
@@ -0,0 +1,51 @@
+package interceptor
+
+import (
+ "errors"
+ "strings"
+)
+
+func flattenErrs(errs []error) error {
+ errs2 := []error{}
+ for _, e := range errs {
+ if e != nil {
+ errs2 = append(errs2, e)
+ }
+ }
+ if len(errs2) == 0 {
+ return nil
+ }
+ return multiError(errs2)
+}
+
+type multiError []error
+
+func (me multiError) Error() string {
+ var errstrings []string
+
+ for _, err := range me {
+ if err != nil {
+ errstrings = append(errstrings, err.Error())
+ }
+ }
+
+ if len(errstrings) == 0 {
+ return "multiError must contain multiple error but is empty"
+ }
+
+ return strings.Join(errstrings, "\n")
+}
+
+func (me multiError) Is(err error) bool {
+ for _, e := range me {
+ if errors.Is(e, err) {
+ return true
+ }
+ if me2, ok := e.(multiError); ok {
+ if me2.Is(err) {
+ return true
+ }
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/pion/interceptor/go.mod b/vendor/github.com/pion/interceptor/go.mod
new file mode 100644
index 0000000..1370bc9
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/go.mod
@@ -0,0 +1,10 @@
+module github.com/pion/interceptor
+
+go 1.15
+
+require (
+ github.com/pion/logging v0.2.2
+ github.com/pion/rtcp v1.2.6
+ github.com/pion/rtp v1.6.2
+ github.com/stretchr/testify v1.7.0
+)
diff --git a/vendor/github.com/pion/interceptor/go.sum b/vendor/github.com/pion/interceptor/go.sum
new file mode 100644
index 0000000..104d018
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/go.sum
@@ -0,0 +1,21 @@
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
+github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
+github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
+github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
+github.com/pion/rtcp v1.2.6 h1:1zvwBbyd0TeEuuWftrd/4d++m+/kZSeiguxU61LFWpo=
+github.com/pion/rtcp v1.2.6/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE0=
+github.com/pion/rtp v1.6.2 h1:iGBerLX6JiDjB9NXuaPzHyxHFG9JsIEdgwTC0lp5n/U=
+github.com/pion/rtp v1.6.2/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/pion/interceptor/interceptor.go b/vendor/github.com/pion/interceptor/interceptor.go
new file mode 100644
index 0000000..2d1b97e
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/interceptor.go
@@ -0,0 +1,108 @@
+// Package interceptor contains the Interceptor interface, with some useful interceptors that should be safe to use
+// in most cases.
+package interceptor
+
+import (
+ "io"
+
+ "github.com/pion/rtcp"
+ "github.com/pion/rtp"
+)
+
+// Interceptor can be used to add functionality to you PeerConnections by modifying any incoming/outgoing rtp/rtcp
+// packets, or sending your own packets as needed.
+type Interceptor interface {
+
+ // BindRTCPReader lets you modify any incoming RTCP packets. It is called once per sender/receiver, however this might
+ // change in the future. The returned method will be called once per packet batch.
+ BindRTCPReader(reader RTCPReader) RTCPReader
+
+ // BindRTCPWriter lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method
+ // will be called once per packet batch.
+ BindRTCPWriter(writer RTCPWriter) RTCPWriter
+
+ // BindLocalStream lets you modify any outgoing RTP packets. It is called once for per LocalStream. The returned method
+ // will be called once per rtp packet.
+ BindLocalStream(info *StreamInfo, writer RTPWriter) RTPWriter
+
+ // UnbindLocalStream is called when the Stream is removed. It can be used to clean up any data related to that track.
+ UnbindLocalStream(info *StreamInfo)
+
+ // BindRemoteStream lets you modify any incoming RTP packets. It is called once for per RemoteStream. The returned method
+ // will be called once per rtp packet.
+ BindRemoteStream(info *StreamInfo, reader RTPReader) RTPReader
+
+ // UnbindRemoteStream is called when the Stream is removed. It can be used to clean up any data related to that track.
+ UnbindRemoteStream(info *StreamInfo)
+
+ io.Closer
+}
+
+// RTPWriter is used by Interceptor.BindLocalStream.
+type RTPWriter interface {
+ // Write a rtp packet
+ Write(header *rtp.Header, payload []byte, attributes Attributes) (int, error)
+}
+
+// RTPReader is used by Interceptor.BindRemoteStream.
+type RTPReader interface {
+ // Read a rtp packet
+ Read([]byte, Attributes) (int, Attributes, error)
+}
+
+// RTCPWriter is used by Interceptor.BindRTCPWriter.
+type RTCPWriter interface {
+ // Write a batch of rtcp packets
+ Write(pkts []rtcp.Packet, attributes Attributes) (int, error)
+}
+
+// RTCPReader is used by Interceptor.BindRTCPReader.
+type RTCPReader interface {
+ // Read a batch of rtcp packets
+ Read([]byte, Attributes) (int, Attributes, error)
+}
+
+// Attributes are a generic key/value store used by interceptors
+type Attributes map[interface{}]interface{}
+
+// RTPWriterFunc is an adapter for RTPWrite interface
+type RTPWriterFunc func(header *rtp.Header, payload []byte, attributes Attributes) (int, error)
+
+// RTPReaderFunc is an adapter for RTPReader interface
+type RTPReaderFunc func([]byte, Attributes) (int, Attributes, error)
+
+// RTCPWriterFunc is an adapter for RTCPWriter interface
+type RTCPWriterFunc func(pkts []rtcp.Packet, attributes Attributes) (int, error)
+
+// RTCPReaderFunc is an adapter for RTCPReader interface
+type RTCPReaderFunc func([]byte, Attributes) (int, Attributes, error)
+
+// Write a rtp packet
+func (f RTPWriterFunc) Write(header *rtp.Header, payload []byte, attributes Attributes) (int, error) {
+ return f(header, payload, attributes)
+}
+
+// Read a rtp packet
+func (f RTPReaderFunc) Read(b []byte, a Attributes) (int, Attributes, error) {
+ return f(b, a)
+}
+
+// Write a batch of rtcp packets
+func (f RTCPWriterFunc) Write(pkts []rtcp.Packet, attributes Attributes) (int, error) {
+ return f(pkts, attributes)
+}
+
+// Read a batch of rtcp packets
+func (f RTCPReaderFunc) Read(b []byte, a Attributes) (int, Attributes, error) {
+ return f(b, a)
+}
+
+// Get returns the attribute associated with key.
+func (a Attributes) Get(key interface{}) interface{} {
+ return a[key]
+}
+
+// Set sets the attribute associated with key to the given value.
+func (a Attributes) Set(key interface{}, val interface{}) {
+ a[key] = val
+}
diff --git a/vendor/github.com/pion/interceptor/noop.go b/vendor/github.com/pion/interceptor/noop.go
new file mode 100644
index 0000000..2dc4e8e
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/noop.go
@@ -0,0 +1,40 @@
+package interceptor
+
+// NoOp is an Interceptor that does not modify any packets. It can embedded in other interceptors, so it's
+// possible to implement only a subset of the methods.
+type NoOp struct{}
+
+// BindRTCPReader lets you modify any incoming RTCP packets. It is called once per sender/receiver, however this might
+// change in the future. The returned method will be called once per packet batch.
+func (i *NoOp) BindRTCPReader(reader RTCPReader) RTCPReader {
+ return reader
+}
+
+// BindRTCPWriter lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method
+// will be called once per packet batch.
+func (i *NoOp) BindRTCPWriter(writer RTCPWriter) RTCPWriter {
+ return writer
+}
+
+// BindLocalStream lets you modify any outgoing RTP packets. It is called once for per LocalStream. The returned method
+// will be called once per rtp packet.
+func (i *NoOp) BindLocalStream(_ *StreamInfo, writer RTPWriter) RTPWriter {
+ return writer
+}
+
+// UnbindLocalStream is called when the Stream is removed. It can be used to clean up any data related to that track.
+func (i *NoOp) UnbindLocalStream(_ *StreamInfo) {}
+
+// BindRemoteStream lets you modify any incoming RTP packets. It is called once for per RemoteStream. The returned method
+// will be called once per rtp packet.
+func (i *NoOp) BindRemoteStream(_ *StreamInfo, reader RTPReader) RTPReader {
+ return reader
+}
+
+// UnbindRemoteStream is called when the Stream is removed. It can be used to clean up any data related to that track.
+func (i *NoOp) UnbindRemoteStream(_ *StreamInfo) {}
+
+// Close closes the Interceptor, cleaning up any data if necessary.
+func (i *NoOp) Close() error {
+ return nil
+}
diff --git a/vendor/github.com/pion/interceptor/pkg/nack/errors.go b/vendor/github.com/pion/interceptor/pkg/nack/errors.go
new file mode 100644
index 0000000..bbfc773
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/nack/errors.go
@@ -0,0 +1,6 @@
+package nack
+
+import "errors"
+
+// ErrInvalidSize is returned by newReceiveLog/newSendBuffer, when an incorrect buffer size is supplied.
+var ErrInvalidSize = errors.New("invalid buffer size")
diff --git a/vendor/github.com/pion/interceptor/pkg/nack/generator_interceptor.go b/vendor/github.com/pion/interceptor/pkg/nack/generator_interceptor.go
new file mode 100644
index 0000000..447a949
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/nack/generator_interceptor.go
@@ -0,0 +1,162 @@
+package nack
+
+import (
+ "math/rand"
+ "sync"
+ "time"
+
+ "github.com/pion/interceptor"
+ "github.com/pion/logging"
+ "github.com/pion/rtcp"
+ "github.com/pion/rtp"
+)
+
+// GeneratorInterceptor interceptor generates nack feedback messages.
+type GeneratorInterceptor struct {
+ interceptor.NoOp
+ size uint16
+ skipLastN uint16
+ interval time.Duration
+ m sync.Mutex
+ wg sync.WaitGroup
+ close chan struct{}
+ log logging.LeveledLogger
+
+ receiveLogs map[uint32]*receiveLog
+ receiveLogsMu sync.Mutex
+}
+
+// NewGeneratorInterceptor returns a new GeneratorInterceptor interceptor
+func NewGeneratorInterceptor(opts ...GeneratorOption) (*GeneratorInterceptor, error) {
+ r := &GeneratorInterceptor{
+ size: 8192,
+ skipLastN: 0,
+ interval: time.Millisecond * 100,
+ receiveLogs: map[uint32]*receiveLog{},
+ close: make(chan struct{}),
+ log: logging.NewDefaultLoggerFactory().NewLogger("nack_generator"),
+ }
+
+ for _, opt := range opts {
+ if err := opt(r); err != nil {
+ return nil, err
+ }
+ }
+
+ if _, err := newReceiveLog(r.size); err != nil {
+ return nil, err
+ }
+
+ return r, nil
+}
+
+// BindRTCPWriter lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method
+// will be called once per packet batch.
+func (n *GeneratorInterceptor) BindRTCPWriter(writer interceptor.RTCPWriter) interceptor.RTCPWriter {
+ n.m.Lock()
+ defer n.m.Unlock()
+
+ if n.isClosed() {
+ return writer
+ }
+
+ n.wg.Add(1)
+
+ go n.loop(writer)
+
+ return writer
+}
+
+// BindRemoteStream lets you modify any incoming RTP packets. It is called once for per RemoteStream. The returned method
+// will be called once per rtp packet.
+func (n *GeneratorInterceptor) BindRemoteStream(info *interceptor.StreamInfo, reader interceptor.RTPReader) interceptor.RTPReader {
+ if !streamSupportNack(info) {
+ return reader
+ }
+
+ // error is already checked in NewGeneratorInterceptor
+ receiveLog, _ := newReceiveLog(n.size)
+ n.receiveLogsMu.Lock()
+ n.receiveLogs[info.SSRC] = receiveLog
+ n.receiveLogsMu.Unlock()
+
+ return interceptor.RTPReaderFunc(func(b []byte, a interceptor.Attributes) (int, interceptor.Attributes, error) {
+ i, attr, err := reader.Read(b, a)
+ if err != nil {
+ return 0, nil, err
+ }
+
+ pkt := rtp.Packet{}
+ if err = pkt.Unmarshal(b[:i]); err != nil {
+ return 0, nil, err
+ }
+ receiveLog.add(pkt.Header.SequenceNumber)
+
+ return i, attr, nil
+ })
+}
+
+// UnbindLocalStream is called when the Stream is removed. It can be used to clean up any data related to that track.
+func (n *GeneratorInterceptor) UnbindLocalStream(info *interceptor.StreamInfo) {
+ n.receiveLogsMu.Lock()
+ delete(n.receiveLogs, info.SSRC)
+ n.receiveLogsMu.Unlock()
+}
+
+// Close closes the interceptor
+func (n *GeneratorInterceptor) Close() error {
+ defer n.wg.Wait()
+ n.m.Lock()
+ defer n.m.Unlock()
+
+ if !n.isClosed() {
+ close(n.close)
+ }
+
+ return nil
+}
+
+func (n *GeneratorInterceptor) loop(rtcpWriter interceptor.RTCPWriter) {
+ defer n.wg.Done()
+
+ senderSSRC := rand.Uint32() // #nosec
+
+ ticker := time.NewTicker(n.interval)
+ for {
+ select {
+ case <-ticker.C:
+ func() {
+ n.receiveLogsMu.Lock()
+ defer n.receiveLogsMu.Unlock()
+
+ for ssrc, receiveLog := range n.receiveLogs {
+ missing := receiveLog.missingSeqNumbers(n.skipLastN)
+ if len(missing) == 0 {
+ continue
+ }
+
+ nack := &rtcp.TransportLayerNack{
+ SenderSSRC: senderSSRC,
+ MediaSSRC: ssrc,
+ Nacks: rtcp.NackPairsFromSequenceNumbers(missing),
+ }
+
+ if _, err := rtcpWriter.Write([]rtcp.Packet{nack}, interceptor.Attributes{}); err != nil {
+ n.log.Warnf("failed sending nack: %+v", err)
+ }
+ }
+ }()
+ case <-n.close:
+ return
+ }
+ }
+}
+
+func (n *GeneratorInterceptor) isClosed() bool {
+ select {
+ case <-n.close:
+ return true
+ default:
+ return false
+ }
+}
diff --git a/vendor/github.com/pion/interceptor/pkg/nack/generator_option.go b/vendor/github.com/pion/interceptor/pkg/nack/generator_option.go
new file mode 100644
index 0000000..092f5db
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/nack/generator_option.go
@@ -0,0 +1,44 @@
+package nack
+
+import (
+ "time"
+
+ "github.com/pion/logging"
+)
+
+// GeneratorOption can be used to configure GeneratorInterceptor
+type GeneratorOption func(r *GeneratorInterceptor) error
+
+// GeneratorSize sets the size of the interceptor.
+// Size must be one of: 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768
+func GeneratorSize(size uint16) GeneratorOption {
+ return func(r *GeneratorInterceptor) error {
+ r.size = size
+ return nil
+ }
+}
+
+// GeneratorSkipLastN sets the number of packets (n-1 packets before the last received packets) to ignore when generating
+// nack requests.
+func GeneratorSkipLastN(skipLastN uint16) GeneratorOption {
+ return func(r *GeneratorInterceptor) error {
+ r.skipLastN = skipLastN
+ return nil
+ }
+}
+
+// GeneratorLog sets a logger for the interceptor
+func GeneratorLog(log logging.LeveledLogger) GeneratorOption {
+ return func(r *GeneratorInterceptor) error {
+ r.log = log
+ return nil
+ }
+}
+
+// GeneratorInterval sets the nack send interval for the interceptor
+func GeneratorInterval(interval time.Duration) GeneratorOption {
+ return func(r *GeneratorInterceptor) error {
+ r.interval = interval
+ return nil
+ }
+}
diff --git a/vendor/github.com/pion/interceptor/pkg/nack/nack.go b/vendor/github.com/pion/interceptor/pkg/nack/nack.go
new file mode 100644
index 0000000..a658e7f
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/nack/nack.go
@@ -0,0 +1,14 @@
+// Package nack provides interceptors to implement sending and receiving negative acknowledgements
+package nack
+
+import "github.com/pion/interceptor"
+
+func streamSupportNack(info *interceptor.StreamInfo) bool {
+ for _, fb := range info.RTCPFeedback {
+ if fb.Type == "nack" && fb.Parameter == "" {
+ return true
+ }
+ }
+
+ return false
+}
diff --git a/vendor/github.com/pion/interceptor/pkg/nack/receive_log.go b/vendor/github.com/pion/interceptor/pkg/nack/receive_log.go
new file mode 100644
index 0000000..8107f59
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/nack/receive_log.go
@@ -0,0 +1,134 @@
+package nack
+
+import (
+ "fmt"
+ "sync"
+)
+
+type receiveLog struct {
+ packets []uint64
+ size uint16
+ end uint16
+ started bool
+ lastConsecutive uint16
+ m sync.RWMutex
+}
+
+func newReceiveLog(size uint16) (*receiveLog, error) {
+ allowedSizes := make([]uint16, 0)
+ correctSize := false
+ for i := 6; i < 16; i++ {
+ if size == 1<<i {
+ correctSize = true
+ break
+ }
+ allowedSizes = append(allowedSizes, 1<<i)
+ }
+
+ if !correctSize {
+ return nil, fmt.Errorf("%w: %d is not a valid size, allowed sizes: %v", ErrInvalidSize, size, allowedSizes)
+ }
+
+ return &receiveLog{
+ packets: make([]uint64, size/64),
+ size: size,
+ }, nil
+}
+
+func (s *receiveLog) add(seq uint16) {
+ s.m.Lock()
+ defer s.m.Unlock()
+
+ if !s.started {
+ s.setReceived(seq)
+ s.end = seq
+ s.started = true
+ s.lastConsecutive = seq
+ return
+ }
+
+ diff := seq - s.end
+ switch {
+ case diff == 0:
+ return
+ case diff < uint16SizeHalf:
+ // this means a positive diff, in other words seq > end (with counting for rollovers)
+ for i := s.end + 1; i != seq; i++ {
+ // clear packets between end and seq (these may contain packets from a "size" ago)
+ s.delReceived(i)
+ }
+ s.end = seq
+
+ if s.lastConsecutive+1 == seq {
+ s.lastConsecutive = seq
+ } else if seq-s.lastConsecutive > s.size {
+ s.lastConsecutive = seq - s.size
+ s.fixLastConsecutive() // there might be valid packets at the beginning of the buffer now
+ }
+ case s.lastConsecutive+1 == seq:
+ // negative diff, seq < end (with counting for rollovers)
+ s.lastConsecutive = seq
+ s.fixLastConsecutive() // there might be other valid packets after seq
+ }
+
+ s.setReceived(seq)
+}
+
+func (s *receiveLog) get(seq uint16) bool {
+ s.m.RLock()
+ defer s.m.RUnlock()
+
+ diff := s.end - seq
+ if diff >= uint16SizeHalf {
+ return false
+ }
+
+ if diff >= s.size {
+ return false
+ }
+
+ return s.getReceived(seq)
+}
+
+func (s *receiveLog) missingSeqNumbers(skipLastN uint16) []uint16 {
+ s.m.RLock()
+ defer s.m.RUnlock()
+
+ until := s.end - skipLastN
+ if until-s.lastConsecutive >= uint16SizeHalf {
+ // until < s.lastConsecutive (counting for rollover)
+ return nil
+ }
+
+ missingPacketSeqNums := make([]uint16, 0)
+ for i := s.lastConsecutive + 1; i != until+1; i++ {
+ if !s.getReceived(i) {
+ missingPacketSeqNums = append(missingPacketSeqNums, i)
+ }
+ }
+
+ return missingPacketSeqNums
+}
+
+func (s *receiveLog) setReceived(seq uint16) {
+ pos := seq % s.size
+ s.packets[pos/64] |= 1 << (pos % 64)
+}
+
+func (s *receiveLog) delReceived(seq uint16) {
+ pos := seq % s.size
+ s.packets[pos/64] &^= 1 << (pos % 64)
+}
+
+func (s *receiveLog) getReceived(seq uint16) bool {
+ pos := seq % s.size
+ return (s.packets[pos/64] & (1 << (pos % 64))) != 0
+}
+
+func (s *receiveLog) fixLastConsecutive() {
+ i := s.lastConsecutive + 1
+ for ; i != s.end+1 && s.getReceived(i); i++ {
+ // find all consecutive packets
+ }
+ s.lastConsecutive = i - 1
+}
diff --git a/vendor/github.com/pion/interceptor/pkg/nack/responder_interceptor.go b/vendor/github.com/pion/interceptor/pkg/nack/responder_interceptor.go
new file mode 100644
index 0000000..121657e
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/nack/responder_interceptor.go
@@ -0,0 +1,119 @@
+package nack
+
+import (
+ "sync"
+
+ "github.com/pion/interceptor"
+ "github.com/pion/logging"
+ "github.com/pion/rtcp"
+ "github.com/pion/rtp"
+)
+
+// ResponderInterceptor responds to nack feedback messages
+type ResponderInterceptor struct {
+ interceptor.NoOp
+ size uint16
+ log logging.LeveledLogger
+
+ streams map[uint32]*localStream
+ streamsMu sync.Mutex
+}
+
+type localStream struct {
+ sendBuffer *sendBuffer
+ rtpWriter interceptor.RTPWriter
+}
+
+// NewResponderInterceptor returns a new GeneratorInterceptor interceptor
+func NewResponderInterceptor(opts ...ResponderOption) (*ResponderInterceptor, error) {
+ r := &ResponderInterceptor{
+ size: 8192,
+ log: logging.NewDefaultLoggerFactory().NewLogger("nack_responder"),
+ streams: map[uint32]*localStream{},
+ }
+
+ for _, opt := range opts {
+ if err := opt(r); err != nil {
+ return nil, err
+ }
+ }
+
+ if _, err := newSendBuffer(r.size); err != nil {
+ return nil, err
+ }
+
+ return r, nil
+}
+
+// BindRTCPReader lets you modify any incoming RTCP packets. It is called once per sender/receiver, however this might
+// change in the future. The returned method will be called once per packet batch.
+func (n *ResponderInterceptor) BindRTCPReader(reader interceptor.RTCPReader) interceptor.RTCPReader {
+ return interceptor.RTCPReaderFunc(func(b []byte, a interceptor.Attributes) (int, interceptor.Attributes, error) {
+ i, attr, err := reader.Read(b, a)
+ if err != nil {
+ return 0, nil, err
+ }
+
+ pkts, err := rtcp.Unmarshal(b[:i])
+ if err != nil {
+ return 0, nil, err
+ }
+ for _, rtcpPacket := range pkts {
+ nack, ok := rtcpPacket.(*rtcp.TransportLayerNack)
+ if !ok {
+ continue
+ }
+
+ go n.resendPackets(nack)
+ }
+
+ return i, attr, err
+ })
+}
+
+// BindLocalStream lets you modify any outgoing RTP packets. It is called once for per LocalStream. The returned method
+// will be called once per rtp packet.
+func (n *ResponderInterceptor) BindLocalStream(info *interceptor.StreamInfo, writer interceptor.RTPWriter) interceptor.RTPWriter {
+ if !streamSupportNack(info) {
+ return writer
+ }
+
+ // error is already checked in NewGeneratorInterceptor
+ sendBuffer, _ := newSendBuffer(n.size)
+ n.streamsMu.Lock()
+ n.streams[info.SSRC] = &localStream{sendBuffer: sendBuffer, rtpWriter: writer}
+ n.streamsMu.Unlock()
+
+ return interceptor.RTPWriterFunc(func(header *rtp.Header, payload []byte, attributes interceptor.Attributes) (int, error) {
+ sendBuffer.add(&rtp.Packet{Header: *header, Payload: payload})
+ return writer.Write(header, payload, attributes)
+ })
+}
+
+// UnbindLocalStream is called when the Stream is removed. It can be used to clean up any data related to that track.
+func (n *ResponderInterceptor) UnbindLocalStream(info *interceptor.StreamInfo) {
+ n.streamsMu.Lock()
+ delete(n.streams, info.SSRC)
+ n.streamsMu.Unlock()
+}
+
+func (n *ResponderInterceptor) resendPackets(nack *rtcp.TransportLayerNack) {
+ n.streamsMu.Lock()
+ stream, ok := n.streams[nack.MediaSSRC]
+ n.streamsMu.Unlock()
+ if !ok {
+ return
+ }
+
+ for i := range nack.Nacks {
+ nack.Nacks[i].Range(func(seq uint16) bool {
+ if p := stream.sendBuffer.get(seq); p != nil {
+ if _, err := stream.rtpWriter.Write(&p.Header, p.Payload, interceptor.Attributes{}); err != nil {
+ n.log.Warnf("failed resending nacked packet: %+v", err)
+ }
+ }
+
+ return true
+ })
+ }
+}
diff --git a/vendor/github.com/pion/interceptor/pkg/nack/responder_option.go b/vendor/github.com/pion/interceptor/pkg/nack/responder_option.go
new file mode 100644
index 0000000..7ad52c8
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/nack/responder_option.go
@@ -0,0 +1,23 @@
+package nack
+
+import "github.com/pion/logging"
+
+// ResponderOption can be used to configure ResponderInterceptor
+type ResponderOption func(s *ResponderInterceptor) error
+
+// ResponderSize sets the size of the interceptor.
+// Size must be one of: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768
+func ResponderSize(size uint16) ResponderOption {
+ return func(r *ResponderInterceptor) error {
+ r.size = size
+ return nil
+ }
+}
+
+// ResponderLog sets a logger for the interceptor
+func ResponderLog(log logging.LeveledLogger) ResponderOption {
+ return func(r *ResponderInterceptor) error {
+ r.log = log
+ return nil
+ }
+}
diff --git a/vendor/github.com/pion/interceptor/pkg/nack/send_buffer.go b/vendor/github.com/pion/interceptor/pkg/nack/send_buffer.go
new file mode 100644
index 0000000..cf3f020
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/nack/send_buffer.go
@@ -0,0 +1,74 @@
+package nack
+
+import (
+ "fmt"
+
+ "github.com/pion/rtp"
+)
+
+const (
+ uint16SizeHalf = 1 << 15
+)
+
+type sendBuffer struct {
+ packets []*rtp.Packet
+ size uint16
+ lastAdded uint16
+ started bool
+}
+
+func newSendBuffer(size uint16) (*sendBuffer, error) {
+ allowedSizes := make([]uint16, 0)
+ correctSize := false
+ for i := 0; i < 16; i++ {
+ if size == 1<<i {
+ correctSize = true
+ break
+ }
+ allowedSizes = append(allowedSizes, 1<<i)
+ }
+
+ if !correctSize {
+ return nil, fmt.Errorf("%w: %d is not a valid size, allowed sizes: %v", ErrInvalidSize, size, allowedSizes)
+ }
+
+ return &sendBuffer{
+ packets: make([]*rtp.Packet, size),
+ size: size,
+ }, nil
+}
+
+func (s *sendBuffer) add(packet *rtp.Packet) {
+ seq := packet.SequenceNumber
+ if !s.started {
+ s.packets[seq%s.size] = packet
+ s.lastAdded = seq
+ s.started = true
+ return
+ }
+
+ diff := seq - s.lastAdded
+ if diff == 0 {
+ return
+ } else if diff < uint16SizeHalf {
+ for i := s.lastAdded + 1; i != seq; i++ {
+ s.packets[i%s.size] = nil
+ }
+ }
+
+ s.packets[seq%s.size] = packet
+ s.lastAdded = seq
+}
+
+func (s *sendBuffer) get(seq uint16) *rtp.Packet {
+ diff := s.lastAdded - seq
+ if diff >= uint16SizeHalf {
+ return nil
+ }
+
+ if diff >= s.size {
+ return nil
+ }
+
+ return s.packets[seq%s.size]
+}
diff --git a/vendor/github.com/pion/interceptor/pkg/report/receiver_interceptor.go b/vendor/github.com/pion/interceptor/pkg/report/receiver_interceptor.go
new file mode 100644
index 0000000..5235b99
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/report/receiver_interceptor.go
@@ -0,0 +1,166 @@
+package report
+
+import (
+ "sync"
+ "time"
+
+ "github.com/pion/interceptor"
+ "github.com/pion/logging"
+ "github.com/pion/rtcp"
+ "github.com/pion/rtp"
+)
+
+// ReceiverInterceptor interceptor generates receiver reports.
+type ReceiverInterceptor struct {
+ interceptor.NoOp
+ interval time.Duration
+ now func() time.Time
+ streams sync.Map
+ log logging.LeveledLogger
+ m sync.Mutex
+ wg sync.WaitGroup
+ close chan struct{}
+}
+
+// NewReceiverInterceptor returns a new ReceiverInterceptor interceptor.
+func NewReceiverInterceptor(opts ...ReceiverOption) (*ReceiverInterceptor, error) {
+ r := &ReceiverInterceptor{
+ interval: 1 * time.Second,
+ now: time.Now,
+ log: logging.NewDefaultLoggerFactory().NewLogger("receiver_interceptor"),
+ close: make(chan struct{}),
+ }
+
+ for _, opt := range opts {
+ if err := opt(r); err != nil {
+ return nil, err
+ }
+ }
+
+ return r, nil
+}
+
+func (r *ReceiverInterceptor) isClosed() bool {
+ select {
+ case <-r.close:
+ return true
+ default:
+ return false
+ }
+}
+
+// Close closes the interceptor.
+func (r *ReceiverInterceptor) Close() error {
+ defer r.wg.Wait()
+ r.m.Lock()
+ defer r.m.Unlock()
+
+ if !r.isClosed() {
+ close(r.close)
+ }
+
+ return nil
+}
+
+// BindRTCPWriter lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method
+// will be called once per packet batch.
+func (r *ReceiverInterceptor) BindRTCPWriter(writer interceptor.RTCPWriter) interceptor.RTCPWriter {
+ r.m.Lock()
+ defer r.m.Unlock()
+
+ if r.isClosed() {
+ return writer
+ }
+
+ r.wg.Add(1)
+
+ go r.loop(writer)
+
+ return writer
+}
+
+func (r *ReceiverInterceptor) loop(rtcpWriter interceptor.RTCPWriter) {
+ defer r.wg.Done()
+
+ ticker := time.NewTicker(r.interval)
+ for {
+ select {
+ case <-ticker.C:
+ now := r.now()
+ r.streams.Range(func(key, value interface{}) bool {
+ stream := value.(*receiverStream)
+
+ var pkts []rtcp.Packet
+
+ pkts = append(pkts, stream.generateReport(now))
+
+ if _, err := rtcpWriter.Write(pkts, interceptor.Attributes{}); err != nil {
+ r.log.Warnf("failed sending: %+v", err)
+ }
+
+ return true
+ })
+
+ case <-r.close:
+ return
+ }
+ }
+}
+
+// BindRemoteStream lets you modify any incoming RTP packets. It is called once for per RemoteStream. The returned method
+// will be called once per rtp packet.
+func (r *ReceiverInterceptor) BindRemoteStream(info *interceptor.StreamInfo, reader interceptor.RTPReader) interceptor.RTPReader {
+ stream := newReceiverStream(info.SSRC, info.ClockRate)
+ r.streams.Store(info.SSRC, stream)
+
+ return interceptor.RTPReaderFunc(func(b []byte, a interceptor.Attributes) (int, interceptor.Attributes, error) {
+ i, attr, err := reader.Read(b, a)
+ if err != nil {
+ return 0, nil, err
+ }
+
+ pkt := rtp.Packet{}
+ if err = pkt.Unmarshal(b[:i]); err != nil {
+ return 0, nil, err
+ }
+
+ stream.processRTP(r.now(), &pkt)
+
+ return i, attr, nil
+ })
+}
+
+// UnbindLocalStream is called when the Stream is removed. It can be used to clean up any data related to that track.
+func (r *ReceiverInterceptor) UnbindLocalStream(info *interceptor.StreamInfo) {
+ r.streams.Delete(info.SSRC)
+}
+
+// BindRTCPReader lets you modify any incoming RTCP packets. It is called once per sender/receiver, however this might
+// change in the future. The returned method will be called once per packet batch.
+func (r *ReceiverInterceptor) BindRTCPReader(reader interceptor.RTCPReader) interceptor.RTCPReader {
+ return interceptor.RTCPReaderFunc(func(b []byte, a interceptor.Attributes) (int, interceptor.Attributes, error) {
+ i, attr, err := reader.Read(b, a)
+ if err != nil {
+ return 0, nil, err
+ }
+
+ pkts, err := rtcp.Unmarshal(b[:i])
+ if err != nil {
+ return 0, nil, err
+ }
+
+ for _, pkt := range pkts {
+ if sr, ok := (pkt).(*rtcp.SenderReport); ok {
+ value, ok := r.streams.Load(sr.SSRC)
+ if !ok {
+ continue
+ }
+
+ stream := value.(*receiverStream)
+ stream.processSenderReport(r.now(), sr)
+ }
+ }
+
+ return i, attr, nil
+ })
+}
diff --git a/vendor/github.com/pion/interceptor/pkg/report/receiver_option.go b/vendor/github.com/pion/interceptor/pkg/report/receiver_option.go
new file mode 100644
index 0000000..0467dc5
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/report/receiver_option.go
@@ -0,0 +1,34 @@
+package report
+
+import (
+ "time"
+
+ "github.com/pion/logging"
+)
+
+// ReceiverOption can be used to configure ReceiverInterceptor.
+type ReceiverOption func(r *ReceiverInterceptor) error
+
+// ReceiverLog sets a logger for the interceptor.
+func ReceiverLog(log logging.LeveledLogger) ReceiverOption {
+ return func(r *ReceiverInterceptor) error {
+ r.log = log
+ return nil
+ }
+}
+
+// ReceiverInterval sets send interval for the interceptor.
+func ReceiverInterval(interval time.Duration) ReceiverOption {
+ return func(r *ReceiverInterceptor) error {
+ r.interval = interval
+ return nil
+ }
+}
+
+// ReceiverNow sets an alternative for the time.Now function.
+func ReceiverNow(f func() time.Time) ReceiverOption {
+ return func(r *ReceiverInterceptor) error {
+ r.now = f
+ return nil
+ }
+}
diff --git a/vendor/github.com/pion/interceptor/pkg/report/receiver_stream.go b/vendor/github.com/pion/interceptor/pkg/report/receiver_stream.go
new file mode 100644
index 0000000..569715d
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/report/receiver_stream.go
@@ -0,0 +1,159 @@
+package report
+
+import (
+ "math/rand"
+ "sync"
+ "time"
+
+ "github.com/pion/rtcp"
+ "github.com/pion/rtp"
+)
+
+type receiverStream struct {
+ ssrc uint32
+ receiverSSRC uint32
+ clockRate float64
+
+ m sync.Mutex
+ size uint16
+ packets []uint64
+ started bool
+ seqnumCycles uint16
+ lastSeqnum uint16
+ lastReportSeqnum uint16
+ lastRTPTimeRTP uint32
+ lastRTPTimeTime time.Time
+ jitter float64
+ lastSenderReport uint32
+ lastSenderReportTime time.Time
+ totalLost uint32
+}
+
+func newReceiverStream(ssrc uint32, clockRate uint32) *receiverStream {
+ receiverSSRC := rand.Uint32() // #nosec
+ return &receiverStream{
+ ssrc: ssrc,
+ receiverSSRC: receiverSSRC,
+ clockRate: float64(clockRate),
+ size: 128,
+ packets: make([]uint64, 128),
+ }
+}
+
+func (stream *receiverStream) processRTP(now time.Time, pkt *rtp.Packet) {
+ stream.m.Lock()
+ defer stream.m.Unlock()
+
+ if !stream.started { // first frame
+ stream.started = true
+ stream.setReceived(pkt.SequenceNumber)
+ stream.lastSeqnum = pkt.SequenceNumber
+ stream.lastReportSeqnum = pkt.SequenceNumber - 1
+ stream.lastRTPTimeRTP = pkt.Timestamp
+ stream.lastRTPTimeTime = now
+ } else { // following frames
+ stream.setReceived(pkt.SequenceNumber)
+
+ diff := int32(pkt.SequenceNumber) - int32(stream.lastSeqnum)
+ if diff > 0 || diff < -0x0FFF {
+ // overflow
+ if diff < -0x0FFF {
+ stream.seqnumCycles++
+ }
+
+ // set missing packets as missing
+ for i := stream.lastSeqnum + 1; i != pkt.SequenceNumber; i++ {
+ stream.delReceived(i)
+ }
+
+ stream.lastSeqnum = pkt.SequenceNumber
+ }
+
+ // compute jitter
+ // https://tools.ietf.org/html/rfc3550#page-39
+ D := now.Sub(stream.lastRTPTimeTime).Seconds()*stream.clockRate -
+ (float64(pkt.Timestamp) - float64(stream.lastRTPTimeRTP))
+ if D < 0 {
+ D = -D
+ }
+ stream.jitter += (D - stream.jitter) / 16
+ stream.lastRTPTimeRTP = pkt.Timestamp
+ stream.lastRTPTimeTime = now
+ }
+}
+
+func (stream *receiverStream) setReceived(seq uint16) {
+ pos := seq % stream.size
+ stream.packets[pos/64] |= 1 << (pos % 64)
+}
+
+func (stream *receiverStream) delReceived(seq uint16) {
+ pos := seq % stream.size
+ stream.packets[pos/64] &^= 1 << (pos % 64)
+}
+
+func (stream *receiverStream) getReceived(seq uint16) bool {
+ pos := seq % stream.size
+ return (stream.packets[pos/64] & (1 << (pos % 64))) != 0
+}
+
+func (stream *receiverStream) processSenderReport(now time.Time, sr *rtcp.SenderReport) {
+ stream.m.Lock()
+ defer stream.m.Unlock()
+
+ stream.lastSenderReport = uint32(sr.NTPTime >> 16)
+ stream.lastSenderReportTime = now
+}
+
+func (stream *receiverStream) generateReport(now time.Time) *rtcp.ReceiverReport {
+ stream.m.Lock()
+ defer stream.m.Unlock()
+
+ totalSinceReport := stream.lastSeqnum - stream.lastReportSeqnum
+ totalLostSinceReport := func() uint32 {
+ if stream.lastSeqnum == stream.lastReportSeqnum {
+ return 0
+ }
+
+ ret := uint32(0)
+ for i := stream.lastReportSeqnum + 1; i != stream.lastSeqnum; i++ {
+ if !stream.getReceived(i) {
+ ret++
+ }
+ }
+ return ret
+ }()
+ stream.totalLost += totalLostSinceReport
+
+ // allow up to 24 bits
+ if totalLostSinceReport > 0xFFFFFF {
+ totalLostSinceReport = 0xFFFFFF
+ }
+ if stream.totalLost > 0xFFFFFF {
+ stream.totalLost = 0xFFFFFF
+ }
+
+ r := &rtcp.ReceiverReport{
+ SSRC: stream.receiverSSRC,
+ Reports: []rtcp.ReceptionReport{
+ {
+ SSRC: stream.ssrc,
+ LastSequenceNumber: uint32(stream.seqnumCycles)<<16 | uint32(stream.lastSeqnum),
+ LastSenderReport: stream.lastSenderReport,
+ FractionLost: uint8(float64(totalLostSinceReport*256) / float64(totalSinceReport)),
+ TotalLost: stream.totalLost,
+ Delay: func() uint32 {
+ if stream.lastSenderReportTime.IsZero() {
+ return 0
+ }
+ return uint32(now.Sub(stream.lastSenderReportTime).Seconds() * 65536)
+ }(),
+ Jitter: uint32(stream.jitter),
+ },
+ },
+ }
+
+ stream.lastReportSeqnum = stream.lastSeqnum
+
+ return r
+}
diff --git a/vendor/github.com/pion/interceptor/pkg/report/report.go b/vendor/github.com/pion/interceptor/pkg/report/report.go
new file mode 100644
index 0000000..0a3034c
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/report/report.go
@@ -0,0 +1,2 @@
+// Package report provides interceptors to implement sending sender and receiver reports.
+package report
diff --git a/vendor/github.com/pion/interceptor/pkg/report/sender_interceptor.go b/vendor/github.com/pion/interceptor/pkg/report/sender_interceptor.go
new file mode 100644
index 0000000..e56fd8c
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/report/sender_interceptor.go
@@ -0,0 +1,139 @@
+package report
+
+import (
+ "sync"
+ "time"
+
+ "github.com/pion/interceptor"
+ "github.com/pion/logging"
+ "github.com/pion/rtcp"
+ "github.com/pion/rtp"
+)
+
+func ntpTime(t time.Time) uint64 {
+ // seconds since 1st January 1900
+ s := (float64(t.UnixNano()) / 1000000000) + 2208988800
+
+ // higher 32 bits are the integer part, lower 32 bits are the fractional part
+ integerPart := uint32(s)
+ fractionalPart := uint32((s - float64(integerPart)) * 0xFFFFFFFF)
+ return uint64(integerPart)<<32 | uint64(fractionalPart)
+}
+
+// SenderInterceptor interceptor generates sender reports.
+type SenderInterceptor struct {
+ interceptor.NoOp
+ interval time.Duration
+ now func() time.Time
+ streams sync.Map
+ log logging.LeveledLogger
+ m sync.Mutex
+ wg sync.WaitGroup
+ close chan struct{}
+}
+
+// NewSenderInterceptor returns a new SenderInterceptor interceptor.
+func NewSenderInterceptor(opts ...SenderOption) (*SenderInterceptor, error) {
+ s := &SenderInterceptor{
+ interval: 1 * time.Second,
+ now: time.Now,
+ log: logging.NewDefaultLoggerFactory().NewLogger("sender_interceptor"),
+ close: make(chan struct{}),
+ }
+
+ for _, opt := range opts {
+ if err := opt(s); err != nil {
+ return nil, err
+ }
+ }
+
+ return s, nil
+}
+
+func (s *SenderInterceptor) isClosed() bool {
+ select {
+ case <-s.close:
+ return true
+ default:
+ return false
+ }
+}
+
+// Close closes the interceptor.
+func (s *SenderInterceptor) Close() error {
+ defer s.wg.Wait()
+ s.m.Lock()
+ defer s.m.Unlock()
+
+ if !s.isClosed() {
+ close(s.close)
+ }
+
+ return nil
+}
+
+// BindRTCPWriter lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method
+// will be called once per packet batch.
+func (s *SenderInterceptor) BindRTCPWriter(writer interceptor.RTCPWriter) interceptor.RTCPWriter {
+ s.m.Lock()
+ defer s.m.Unlock()
+
+ if s.isClosed() {
+ return writer
+ }
+
+ s.wg.Add(1)
+
+ go s.loop(writer)
+
+ return writer
+}
+
+func (s *SenderInterceptor) loop(rtcpWriter interceptor.RTCPWriter) {
+ defer s.wg.Done()
+
+ ticker := time.NewTicker(s.interval)
+ for {
+ select {
+ case <-ticker.C:
+ now := s.now()
+ s.streams.Range(func(key, value interface{}) bool {
+ ssrc := key.(uint32)
+ stream := value.(*senderStream)
+
+ stream.m.Lock()
+ defer stream.m.Unlock()
+
+ sr := &rtcp.SenderReport{
+ SSRC: ssrc,
+ NTPTime: ntpTime(now),
+ RTPTime: stream.lastRTPTimeRTP + uint32(now.Sub(stream.lastRTPTimeTime).Seconds()*stream.clockRate),
+ PacketCount: stream.packetCount,
+ OctetCount: stream.octetCount,
+ }
+
+ if _, err := rtcpWriter.Write([]rtcp.Packet{sr}, interceptor.Attributes{}); err != nil {
+ s.log.Warnf("failed sending: %+v", err)
+ }
+
+ return true
+ })
+
+ case <-s.close:
+ return
+ }
+ }
+}
+
+// BindLocalStream lets you modify any outgoing RTP packets. It is called once for per LocalStream. The returned method
+// will be called once per rtp packet.
+func (s *SenderInterceptor) BindLocalStream(info *interceptor.StreamInfo, writer interceptor.RTPWriter) interceptor.RTPWriter {
+ stream := newSenderStream(info.ClockRate)
+ s.streams.Store(info.SSRC, stream)
+
+ return interceptor.RTPWriterFunc(func(header *rtp.Header, payload []byte, a interceptor.Attributes) (int, error) {
+ stream.processRTP(s.now(), header, payload)
+
+ return writer.Write(header, payload, a)
+ })
+}
diff --git a/vendor/github.com/pion/interceptor/pkg/report/sender_option.go b/vendor/github.com/pion/interceptor/pkg/report/sender_option.go
new file mode 100644
index 0000000..4cb161a
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/report/sender_option.go
@@ -0,0 +1,34 @@
+package report
+
+import (
+ "time"
+
+ "github.com/pion/logging"
+)
+
+// SenderOption can be used to configure SenderInterceptor.
+type SenderOption func(r *SenderInterceptor) error
+
+// SenderLog sets a logger for the interceptor.
+func SenderLog(log logging.LeveledLogger) SenderOption {
+ return func(r *SenderInterceptor) error {
+ r.log = log
+ return nil
+ }
+}
+
+// SenderInterval sets send interval for the interceptor.
+func SenderInterval(interval time.Duration) SenderOption {
+ return func(r *SenderInterceptor) error {
+ r.interval = interval
+ return nil
+ }
+}
+
+// SenderNow sets an alternative for the time.Now function.
+func SenderNow(f func() time.Time) SenderOption {
+ return func(r *SenderInterceptor) error {
+ r.now = f
+ return nil
+ }
+}
diff --git a/vendor/github.com/pion/interceptor/pkg/report/sender_stream.go b/vendor/github.com/pion/interceptor/pkg/report/sender_stream.go
new file mode 100644
index 0000000..851d70e
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/pkg/report/sender_stream.go
@@ -0,0 +1,37 @@
+package report
+
+import (
+ "sync"
+ "time"
+
+ "github.com/pion/rtp"
+)
+
+type senderStream struct {
+ clockRate float64
+ m sync.Mutex
+
+ // data from rtp packets
+ lastRTPTimeRTP uint32
+ lastRTPTimeTime time.Time
+ packetCount uint32
+ octetCount uint32
+}
+
+func newSenderStream(clockRate uint32) *senderStream {
+ return &senderStream{
+ clockRate: float64(clockRate),
+ }
+}
+
+func (stream *senderStream) processRTP(now time.Time, header *rtp.Header, payload []byte) {
+ stream.m.Lock()
+ defer stream.m.Unlock()
+
+ // always update time to minimize errors
+ stream.lastRTPTimeRTP = header.Timestamp
+ stream.lastRTPTimeTime = now
+
+ stream.packetCount++
+ stream.octetCount += uint32(len(payload))
+}
diff --git a/vendor/github.com/pion/interceptor/registry.go b/vendor/github.com/pion/interceptor/registry.go
new file mode 100644
index 0000000..d3eed3b
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/registry.go
@@ -0,0 +1,20 @@
+package interceptor
+
+// Registry is a collector for interceptors.
+type Registry struct {
+ interceptors []Interceptor
+}
+
+// Add adds a new Interceptor to the registry.
+func (i *Registry) Add(icpr Interceptor) {
+ i.interceptors = append(i.interceptors, icpr)
+}
+
+// Build constructs a single Interceptor from a InterceptorRegistry
+func (i *Registry) Build() Interceptor {
+ if len(i.interceptors) == 0 {
+ return &NoOp{}
+ }
+
+ return NewChain(i.interceptors)
+}
diff --git a/vendor/github.com/pion/interceptor/renovate.json b/vendor/github.com/pion/interceptor/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/interceptor/streaminfo.go b/vendor/github.com/pion/interceptor/streaminfo.go
new file mode 100644
index 0000000..956fa53
--- /dev/null
+++ b/vendor/github.com/pion/interceptor/streaminfo.go
@@ -0,0 +1,34 @@
+package interceptor
+
+// RTPHeaderExtension represents a negotiated RFC5285 RTP header extension.
+type RTPHeaderExtension struct {
+ URI string
+ ID int
+}
+
+// StreamInfo is the Context passed when a StreamLocal or StreamRemote has been Binded or Unbinded
+type StreamInfo struct {
+ ID string
+ Attributes Attributes
+ SSRC uint32
+ PayloadType uint8
+ RTPHeaderExtensions []RTPHeaderExtension
+ MimeType string
+ ClockRate uint32
+ Channels uint16
+ SDPFmtpLine string
+ RTCPFeedback []RTCPFeedback
+}
+
+// RTCPFeedback signals the connection to use additional RTCP packet types.
+// https://draft.ortc.org/#dom-rtcrtcpfeedback
+type RTCPFeedback struct {
+ // Type is the type of feedback.
+ // see: https://draft.ortc.org/#dom-rtcrtcpfeedback
+ // valid: ack, ccm, nack, goog-remb, transport-cc
+ Type string
+
+ // The parameter value depends on the type.
+ // For example, type="nack" parameter="pli" will send Picture Loss Indicator packets.
+ Parameter string
+}
diff --git a/vendor/github.com/pion/logging/.golangci.yml b/vendor/github.com/pion/logging/.golangci.yml
new file mode 100644
index 0000000..ffb0058
--- /dev/null
+++ b/vendor/github.com/pion/logging/.golangci.yml
@@ -0,0 +1,13 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+
+linters:
+ enable-all: true
+
+issues:
+ exclude-use-default: false
+ max-per-linter: 0
+ max-same-issues: 50
diff --git a/vendor/github.com/pion/logging/.travis.yml b/vendor/github.com/pion/logging/.travis.yml
new file mode 100644
index 0000000..b96a1ed
--- /dev/null
+++ b/vendor/github.com/pion/logging/.travis.yml
@@ -0,0 +1,19 @@
+language: go
+
+go:
+ - "1.x" # use the latest Go release
+
+env:
+ - GO111MODULE=on
+
+before_script:
+ - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.15.0
+
+script:
+ - golangci-lint run ./...
+# - rm -rf examples # Remove examples, no test coverage for them
+ - go test -coverpkg=$(go list ./... | tr '\n' ',') -coverprofile=cover.out -v -race -covermode=atomic ./...
+ - bash <(curl -s https://codecov.io/bash)
+ - bash .github/assert-contributors.sh
+ - bash .github/lint-disallowed-functions-in-library.sh
+ - bash .github/lint-commit-message.sh
diff --git a/vendor/github.com/pion/logging/LICENSE b/vendor/github.com/pion/logging/LICENSE
new file mode 100644
index 0000000..ab60297
--- /dev/null
+++ b/vendor/github.com/pion/logging/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/logging/README.md b/vendor/github.com/pion/logging/README.md
new file mode 100644
index 0000000..c15471d
--- /dev/null
+++ b/vendor/github.com/pion/logging/README.md
@@ -0,0 +1,41 @@
+<h1 align="center">
+ <br>
+ Pion Logging
+ <br>
+</h1>
+<h4 align="center">The Pion logging library</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-logging-gray.svg?longCache=true&colorB=brightgreen" alt="Pion transport"></a>
+ <a href="http://gophers.slack.com/messages/pion"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/logging"><img src="https://travis-ci.org/pion/logging.svg?branch=master" alt="Build Status"></a>
+ <a href="https://godoc.org/github.com/pion/logging"><img src="https://godoc.org/github.com/pion/logging?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/logging"><img src="https://codecov.io/gh/pion/logging/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/logging"><img src="https://goreportcard.com/badge/github.com/pion/logging" alt="Go Report Card"></a>
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+### Roadmap
+The library is used as a part of our WebRTC implementation. Please refer to that [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
+
+### Community
+Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [John Bradley](https://github.com/kc5nra) - *Original Author*
+* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
+* [Michael MacDonald](https://github.com/mjmac) - *Original Author*
+* [Woodrow Douglass](https://github.com/wdouglass) - *Test coverage*
+* [Michiel De Backker](https://github.com/backkem) - *Docs*
+* [Hugo Arregui](https://github.com/hugoArregui) - *Custom Logs*
+* [Justin Okamoto](https://github.com/justinokamoto) - *Disabled Logs Update*
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/logging/go.mod b/vendor/github.com/pion/logging/go.mod
new file mode 100644
index 0000000..a1b849b
--- /dev/null
+++ b/vendor/github.com/pion/logging/go.mod
@@ -0,0 +1,3 @@
+module github.com/pion/logging
+
+go 1.12
diff --git a/vendor/github.com/pion/logging/go.sum b/vendor/github.com/pion/logging/go.sum
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vendor/github.com/pion/logging/go.sum
diff --git a/vendor/github.com/pion/logging/logger.go b/vendor/github.com/pion/logging/logger.go
new file mode 100644
index 0000000..35f6505
--- /dev/null
+++ b/vendor/github.com/pion/logging/logger.go
@@ -0,0 +1,228 @@
+package logging
+
+import (
+ "fmt"
+ "io"
+ "log"
+ "os"
+ "strings"
+ "sync"
+)
+
+// Use this abstraction to ensure thread-safe access to the logger's io.Writer
+// (which could change at runtime)
+type loggerWriter struct {
+ sync.RWMutex
+ output io.Writer
+}
+
+func (lw *loggerWriter) SetOutput(output io.Writer) {
+ lw.Lock()
+ defer lw.Unlock()
+ lw.output = output
+}
+
+func (lw *loggerWriter) Write(data []byte) (int, error) {
+ lw.RLock()
+ defer lw.RUnlock()
+ return lw.output.Write(data)
+}
+
+// DefaultLeveledLogger encapsulates functionality for providing logging at
+// user-defined levels
+type DefaultLeveledLogger struct {
+ level LogLevel
+ writer *loggerWriter
+ trace *log.Logger
+ debug *log.Logger
+ info *log.Logger
+ warn *log.Logger
+ err *log.Logger
+}
+
+// WithTraceLogger is a chainable configuration function which sets the
+// Trace-level logger
+func (ll *DefaultLeveledLogger) WithTraceLogger(log *log.Logger) *DefaultLeveledLogger {
+ ll.trace = log
+ return ll
+}
+
+// WithDebugLogger is a chainable configuration function which sets the
+// Debug-level logger
+func (ll *DefaultLeveledLogger) WithDebugLogger(log *log.Logger) *DefaultLeveledLogger {
+ ll.debug = log
+ return ll
+}
+
+// WithInfoLogger is a chainable configuration function which sets the
+// Info-level logger
+func (ll *DefaultLeveledLogger) WithInfoLogger(log *log.Logger) *DefaultLeveledLogger {
+ ll.info = log
+ return ll
+}
+
+// WithWarnLogger is a chainable configuration function which sets the
+// Warn-level logger
+func (ll *DefaultLeveledLogger) WithWarnLogger(log *log.Logger) *DefaultLeveledLogger {
+ ll.warn = log
+ return ll
+}
+
+// WithErrorLogger is a chainable configuration function which sets the
+// Error-level logger
+func (ll *DefaultLeveledLogger) WithErrorLogger(log *log.Logger) *DefaultLeveledLogger {
+ ll.err = log
+ return ll
+}
+
+// WithOutput is a chainable configuration function which sets the logger's
+// logging output to the supplied io.Writer
+func (ll *DefaultLeveledLogger) WithOutput(output io.Writer) *DefaultLeveledLogger {
+ ll.writer.SetOutput(output)
+ return ll
+}
+
+func (ll *DefaultLeveledLogger) logf(logger *log.Logger, level LogLevel, format string, args ...interface{}) {
+ if ll.level.Get() < level {
+ return
+ }
+
+ callDepth := 3 // this frame + wrapper func + caller
+ msg := fmt.Sprintf(format, args...)
+ if err := logger.Output(callDepth, msg); err != nil {
+ fmt.Fprintf(os.Stderr, "Unable to log: %s", err)
+ }
+}
+
+// SetLevel sets the logger's logging level
+func (ll *DefaultLeveledLogger) SetLevel(newLevel LogLevel) {
+ ll.level.Set(newLevel)
+}
+
+// Trace emits the preformatted message if the logger is at or below LogLevelTrace
+func (ll *DefaultLeveledLogger) Trace(msg string) {
+ ll.logf(ll.trace, LogLevelTrace, msg)
+}
+
+// Tracef formats and emits a message if the logger is at or below LogLevelTrace
+func (ll *DefaultLeveledLogger) Tracef(format string, args ...interface{}) {
+ ll.logf(ll.trace, LogLevelTrace, format, args...)
+}
+
+// Debug emits the preformatted message if the logger is at or below LogLevelDebug
+func (ll *DefaultLeveledLogger) Debug(msg string) {
+ ll.logf(ll.debug, LogLevelDebug, msg)
+}
+
+// Debugf formats and emits a message if the logger is at or below LogLevelDebug
+func (ll *DefaultLeveledLogger) Debugf(format string, args ...interface{}) {
+ ll.logf(ll.debug, LogLevelDebug, format, args...)
+}
+
+// Info emits the preformatted message if the logger is at or below LogLevelInfo
+func (ll *DefaultLeveledLogger) Info(msg string) {
+ ll.logf(ll.info, LogLevelInfo, msg)
+}
+
+// Infof formats and emits a message if the logger is at or below LogLevelInfo
+func (ll *DefaultLeveledLogger) Infof(format string, args ...interface{}) {
+ ll.logf(ll.info, LogLevelInfo, format, args...)
+}
+
+// Warn emits the preformatted message if the logger is at or below LogLevelWarn
+func (ll *DefaultLeveledLogger) Warn(msg string) {
+ ll.logf(ll.warn, LogLevelWarn, msg)
+}
+
+// Warnf formats and emits a message if the logger is at or below LogLevelWarn
+func (ll *DefaultLeveledLogger) Warnf(format string, args ...interface{}) {
+ ll.logf(ll.warn, LogLevelWarn, format, args...)
+}
+
+// Error emits the preformatted message if the logger is at or below LogLevelError
+func (ll *DefaultLeveledLogger) Error(msg string) {
+ ll.logf(ll.err, LogLevelError, msg)
+}
+
+// Errorf formats and emits a message if the logger is at or below LogLevelError
+func (ll *DefaultLeveledLogger) Errorf(format string, args ...interface{}) {
+ ll.logf(ll.err, LogLevelError, format, args...)
+}
+
+// NewDefaultLeveledLoggerForScope returns a configured LeveledLogger
+func NewDefaultLeveledLoggerForScope(scope string, level LogLevel, writer io.Writer) *DefaultLeveledLogger {
+ if writer == nil {
+ writer = os.Stdout
+ }
+ logger := &DefaultLeveledLogger{
+ writer: &loggerWriter{output: writer},
+ level: level,
+ }
+ return logger.
+ WithTraceLogger(log.New(logger.writer, fmt.Sprintf("%s TRACE: ", scope), log.Lmicroseconds|log.Lshortfile)).
+ WithDebugLogger(log.New(logger.writer, fmt.Sprintf("%s DEBUG: ", scope), log.Lmicroseconds|log.Lshortfile)).
+ WithInfoLogger(log.New(logger.writer, fmt.Sprintf("%s INFO: ", scope), log.LstdFlags)).
+ WithWarnLogger(log.New(logger.writer, fmt.Sprintf("%s WARNING: ", scope), log.LstdFlags)).
+ WithErrorLogger(log.New(logger.writer, fmt.Sprintf("%s ERROR: ", scope), log.LstdFlags))
+}
+
+// DefaultLoggerFactory define levels by scopes and creates new DefaultLeveledLogger
+type DefaultLoggerFactory struct {
+ Writer io.Writer
+ DefaultLogLevel LogLevel
+ ScopeLevels map[string]LogLevel
+}
+
+// NewDefaultLoggerFactory creates a new DefaultLoggerFactory
+func NewDefaultLoggerFactory() *DefaultLoggerFactory {
+ factory := DefaultLoggerFactory{}
+ factory.DefaultLogLevel = LogLevelError
+ factory.ScopeLevels = make(map[string]LogLevel)
+ factory.Writer = os.Stdout
+
+ logLevels := map[string]LogLevel{
+ "DISABLE": LogLevelDisabled,
+ "ERROR": LogLevelError,
+ "WARN": LogLevelWarn,
+ "INFO": LogLevelInfo,
+ "DEBUG": LogLevelDebug,
+ "TRACE": LogLevelTrace,
+ }
+
+ for name, level := range logLevels {
+ env := os.Getenv(fmt.Sprintf("PION_LOG_%s", name))
+
+ if env == "" {
+ env = os.Getenv(fmt.Sprintf("PIONS_LOG_%s", name))
+ }
+
+ if env == "" {
+ continue
+ }
+
+ if strings.ToLower(env) == "all" {
+ factory.DefaultLogLevel = level
+ continue
+ }
+
+ scopes := strings.Split(strings.ToLower(env), ",")
+ for _, scope := range scopes {
+ factory.ScopeLevels[scope] = level
+ }
+ }
+
+ return &factory
+}
+
+// NewLogger returns a configured LeveledLogger for the given , argsscope
+func (f *DefaultLoggerFactory) NewLogger(scope string) LeveledLogger {
+ logLevel := f.DefaultLogLevel
+ if f.ScopeLevels != nil {
+ scopeLevel, found := f.ScopeLevels[scope]
+
+ if found {
+ logLevel = scopeLevel
+ }
+ }
+ return NewDefaultLeveledLoggerForScope(scope, logLevel, f.Writer)
+}
diff --git a/vendor/github.com/pion/logging/scoped.go b/vendor/github.com/pion/logging/scoped.go
new file mode 100644
index 0000000..678bab4
--- /dev/null
+++ b/vendor/github.com/pion/logging/scoped.go
@@ -0,0 +1,72 @@
+package logging
+
+import (
+ "sync/atomic"
+)
+
+// LogLevel represents the level at which the logger will emit log messages
+type LogLevel int32
+
+// Set updates the LogLevel to the supplied value
+func (ll *LogLevel) Set(newLevel LogLevel) {
+ atomic.StoreInt32((*int32)(ll), int32(newLevel))
+}
+
+// Get retrieves the current LogLevel value
+func (ll *LogLevel) Get() LogLevel {
+ return LogLevel(atomic.LoadInt32((*int32)(ll)))
+}
+
+func (ll LogLevel) String() string {
+ switch ll {
+ case LogLevelDisabled:
+ return "Disabled"
+ case LogLevelError:
+ return "Error"
+ case LogLevelWarn:
+ return "Warn"
+ case LogLevelInfo:
+ return "Info"
+ case LogLevelDebug:
+ return "Debug"
+ case LogLevelTrace:
+ return "Trace"
+ default:
+ return "UNKNOWN"
+ }
+}
+
+const (
+ // LogLevelDisabled completely disables logging of any events
+ LogLevelDisabled LogLevel = iota
+ // LogLevelError is for fatal errors which should be handled by user code,
+ // but are logged to ensure that they are seen
+ LogLevelError
+ // LogLevelWarn is for logging abnormal, but non-fatal library operation
+ LogLevelWarn
+ // LogLevelInfo is for logging normal library operation (e.g. state transitions, etc.)
+ LogLevelInfo
+ // LogLevelDebug is for logging low-level library information (e.g. internal operations)
+ LogLevelDebug
+ // LogLevelTrace is for logging very low-level library information (e.g. network traces)
+ LogLevelTrace
+)
+
+// LeveledLogger is the basic pion Logger interface
+type LeveledLogger interface {
+ Trace(msg string)
+ Tracef(format string, args ...interface{})
+ Debug(msg string)
+ Debugf(format string, args ...interface{})
+ Info(msg string)
+ Infof(format string, args ...interface{})
+ Warn(msg string)
+ Warnf(format string, args ...interface{})
+ Error(msg string)
+ Errorf(format string, args ...interface{})
+}
+
+// LoggerFactory is the basic pion LoggerFactory interface
+type LoggerFactory interface {
+ NewLogger(scope string) LeveledLogger
+}
diff --git a/vendor/github.com/pion/mdns/.golangci.yml b/vendor/github.com/pion/mdns/.golangci.yml
new file mode 100644
index 0000000..fb2ff86
--- /dev/null
+++ b/vendor/github.com/pion/mdns/.golangci.yml
@@ -0,0 +1,13 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+
+linters:
+ enable-all: true
+ disable:
+ - funlen
+
+issues:
+ exclude-use-default: false
diff --git a/vendor/github.com/pion/mdns/.travis.yml b/vendor/github.com/pion/mdns/.travis.yml
new file mode 100644
index 0000000..5efedaf
--- /dev/null
+++ b/vendor/github.com/pion/mdns/.travis.yml
@@ -0,0 +1,19 @@
+language: go
+
+go:
+ - "1.x" # use the latest Go release
+
+env:
+ - GO111MODULE=on
+
+before_script:
+ - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.18.0
+
+script:
+ - golangci-lint run ./...
+ - rm -rf examples # Remove examples, no test coverage for them
+ - go test -coverpkg=$(go list ./... | tr '\n' ',') -coverprofile=cover.out -v -race -covermode=atomic ./...
+ - bash <(curl -s https://codecov.io/bash)
+ - bash .github/assert-contributors.sh
+ - bash .github/lint-disallowed-functions-in-library.sh
+ - bash .github/lint-commit-message.sh
diff --git a/vendor/github.com/pion/mdns/LICENSE b/vendor/github.com/pion/mdns/LICENSE
new file mode 100644
index 0000000..ab60297
--- /dev/null
+++ b/vendor/github.com/pion/mdns/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/mdns/README.md b/vendor/github.com/pion/mdns/README.md
new file mode 100644
index 0000000..0be76a7
--- /dev/null
+++ b/vendor/github.com/pion/mdns/README.md
@@ -0,0 +1,63 @@
+<h1 align="center">
+ <br>
+ Pion mDNS
+ <br>
+</h1>
+<h4 align="center">A Go implementation of mDNS</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-mdns-gray.svg?longCache=true&colorB=brightgreen" alt="Pion mDNS"></a>
+ <a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/mdns"><img src="https://travis-ci.org/pion/mdns.svg?branch=master" alt="Build Status"></a>
+ <a href="https://godoc.org/github.com/pion/mdns"><img src="https://godoc.org/github.com/pion/mdns?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/mdns"><img src="https://codecov.io/gh/pion/mdns/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/mdns"><img src="https://goreportcard.com/badge/github.com/pion/mdns" alt="Go Report Card"></a>
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+Go mDNS implementation. The original user is Pion WebRTC, but we would love to see it work for everyone.
+
+### Running Server
+For a mDNS server that responds to queries for `pion-test.local`
+```sh
+go run examples/listen/main.go
+```
+
+
+### Running Client
+To query using Pion you can run the `query` example
+```sh
+go run examples/query/main.go
+```
+
+You can use the macOS client
+```
+dns-sd -q pion-test.local
+```
+
+Or the avahi client
+```
+avahi-resolve -a pion-test.local
+```
+
+### References
+https://tools.ietf.org/html/rfc6762
+https://tools.ietf.org/id/draft-ietf-rtcweb-mdns-ice-candidates-02.html
+
+### Community
+Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
+* [Konstantin Itskov](https://github.com/trivigy) - Contributor
+* [Hugo Arregui](https://github.com/hugoArregui)
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/mdns/config.go b/vendor/github.com/pion/mdns/config.go
new file mode 100644
index 0000000..ebfa4e5
--- /dev/null
+++ b/vendor/github.com/pion/mdns/config.go
@@ -0,0 +1,27 @@
+package mdns
+
+import (
+ "time"
+
+ "github.com/pion/logging"
+)
+
+const (
+ // DefaultAddress is the default used by mDNS
+ // and in most cases should be the address that the
+ // net.Conn passed to Server is bound to
+ DefaultAddress = "224.0.0.0:5353"
+)
+
+// Config is used to configure a mDNS client or server.
+type Config struct {
+ // QueryInterval controls how ofter we sends Queries until we
+ // get a response for the requested name
+ QueryInterval time.Duration
+
+ // LocalNames are the names that we will generate answers for
+ // when we get questions
+ LocalNames []string
+
+ LoggerFactory logging.LoggerFactory
+}
diff --git a/vendor/github.com/pion/mdns/conn.go b/vendor/github.com/pion/mdns/conn.go
new file mode 100644
index 0000000..a8aafb2
--- /dev/null
+++ b/vendor/github.com/pion/mdns/conn.go
@@ -0,0 +1,316 @@
+package mdns
+
+import (
+ "context"
+ "math/big"
+ "net"
+ "sync"
+ "time"
+
+ "github.com/pion/logging"
+ "golang.org/x/net/dns/dnsmessage"
+ "golang.org/x/net/ipv4"
+)
+
+// Conn represents a mDNS Server
+type Conn struct {
+ mu sync.RWMutex
+ log logging.LeveledLogger
+
+ socket *ipv4.PacketConn
+ dstAddr *net.UDPAddr
+
+ queryInterval time.Duration
+ localNames []string
+ queries []query
+
+ closed chan interface{}
+}
+
+type query struct {
+ nameWithSuffix string
+ queryResultChan chan queryResult
+}
+
+type queryResult struct {
+ answer dnsmessage.ResourceHeader
+ addr net.Addr
+}
+
+const (
+ inboundBufferSize = 512
+ defaultQueryInterval = time.Second
+ destinationAddress = "224.0.0.251:5353"
+ maxMessageRecords = 3
+ responseTTL = 120
+)
+
+// Server establishes a mDNS connection over an existing conn
+func Server(conn *ipv4.PacketConn, config *Config) (*Conn, error) {
+ if config == nil {
+ return nil, errNilConfig
+ }
+
+ ifaces, err := net.Interfaces()
+ if err != nil {
+ return nil, err
+ }
+
+ joinErrCount := 0
+ for i := range ifaces {
+ if err = conn.JoinGroup(&ifaces[i], &net.UDPAddr{IP: net.IPv4(224, 0, 0, 251)}); err != nil {
+ joinErrCount++
+ }
+ }
+ if joinErrCount >= len(ifaces) {
+ return nil, errJoiningMulticastGroup
+ }
+
+ dstAddr, err := net.ResolveUDPAddr("udp", destinationAddress)
+ if err != nil {
+ return nil, err
+
+ }
+
+ loggerFactory := config.LoggerFactory
+ if loggerFactory == nil {
+ loggerFactory = logging.NewDefaultLoggerFactory()
+ }
+
+ localNames := []string{}
+ for _, l := range config.LocalNames {
+ localNames = append(localNames, l+".")
+ }
+
+ c := &Conn{
+ queryInterval: defaultQueryInterval,
+ queries: []query{},
+ socket: conn,
+ dstAddr: dstAddr,
+ localNames: localNames,
+ log: loggerFactory.NewLogger("mdns"),
+ closed: make(chan interface{}),
+ }
+ if config.QueryInterval != 0 {
+ c.queryInterval = config.QueryInterval
+ }
+
+ go c.start()
+ return c, nil
+}
+
+// Close closes the mDNS Conn
+func (c *Conn) Close() error {
+ select {
+ case <-c.closed:
+ return nil
+ default:
+ }
+
+ if err := c.socket.Close(); err != nil {
+ return err
+ }
+
+ <-c.closed
+ return nil
+}
+
+// Query sends mDNS Queries for the following name until
+// either the Context is canceled/expires or we get a result
+func (c *Conn) Query(ctx context.Context, name string) (dnsmessage.ResourceHeader, net.Addr, error) {
+ select {
+ case <-c.closed:
+ return dnsmessage.ResourceHeader{}, nil, errConnectionClosed
+ default:
+ }
+
+ nameWithSuffix := name + "."
+
+ queryChan := make(chan queryResult, 1)
+ c.mu.Lock()
+ c.queries = append(c.queries, query{nameWithSuffix, queryChan})
+ ticker := time.NewTicker(c.queryInterval)
+ c.mu.Unlock()
+
+ c.sendQuestion(nameWithSuffix)
+ for {
+ select {
+ case <-ticker.C:
+ c.sendQuestion(nameWithSuffix)
+ case <-c.closed:
+ return dnsmessage.ResourceHeader{}, nil, errConnectionClosed
+ case res := <-queryChan:
+ return res.answer, res.addr, nil
+ case <-ctx.Done():
+ return dnsmessage.ResourceHeader{}, nil, errContextElapsed
+ }
+ }
+}
+
+func ipToBytes(ip net.IP) (out [4]byte) {
+ rawIP := ip.To4()
+ if rawIP == nil {
+ return
+ }
+
+ ipInt := big.NewInt(0)
+ ipInt.SetBytes(rawIP)
+ copy(out[:], ipInt.Bytes())
+ return
+}
+
+func interfaceForRemote(remote string) (net.IP, error) {
+ conn, err := net.Dial("udp", remote)
+ if err != nil {
+ return nil, err
+ }
+
+ localAddr := conn.LocalAddr().(*net.UDPAddr)
+ if err := conn.Close(); err != nil {
+ return nil, err
+ }
+
+ return localAddr.IP, nil
+}
+
+func (c *Conn) sendQuestion(name string) {
+ packedName, err := dnsmessage.NewName(name)
+ if err != nil {
+ c.log.Warnf("Failed to construct mDNS packet %v", err)
+ return
+ }
+
+ msg := dnsmessage.Message{
+ Header: dnsmessage.Header{},
+ Questions: []dnsmessage.Question{
+ {
+ Type: dnsmessage.TypeA,
+ Class: dnsmessage.ClassINET,
+ Name: packedName,
+ },
+ },
+ }
+
+ rawQuery, err := msg.Pack()
+ if err != nil {
+ c.log.Warnf("Failed to construct mDNS packet %v", err)
+ return
+ }
+
+ if _, err := c.socket.WriteTo(rawQuery, nil, c.dstAddr); err != nil {
+ c.log.Warnf("Failed to send mDNS packet %v", err)
+ return
+ }
+}
+
+func (c *Conn) sendAnswer(name string, dst net.IP) {
+ packedName, err := dnsmessage.NewName(name)
+ if err != nil {
+ c.log.Warnf("Failed to construct mDNS packet %v", err)
+ return
+ }
+
+ msg := dnsmessage.Message{
+ Header: dnsmessage.Header{
+ Response: true,
+ Authoritative: true,
+ },
+ Answers: []dnsmessage.Resource{
+ {
+ Header: dnsmessage.ResourceHeader{
+ Type: dnsmessage.TypeA,
+ Class: dnsmessage.ClassINET,
+ Name: packedName,
+ TTL: responseTTL,
+ },
+ Body: &dnsmessage.AResource{
+ A: ipToBytes(dst),
+ },
+ },
+ },
+ }
+
+ rawAnswer, err := msg.Pack()
+ if err != nil {
+ c.log.Warnf("Failed to construct mDNS packet %v", err)
+ return
+ }
+
+ if _, err := c.socket.WriteTo(rawAnswer, nil, c.dstAddr); err != nil {
+ c.log.Warnf("Failed to send mDNS packet %v", err)
+ return
+ }
+}
+
+func (c *Conn) start() {
+ defer func() {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+ close(c.closed)
+ }()
+
+ b := make([]byte, inboundBufferSize)
+ p := dnsmessage.Parser{}
+
+ for {
+ n, _, src, err := c.socket.ReadFrom(b)
+ if err != nil {
+ return
+ }
+
+ func() {
+ c.mu.RLock()
+ defer c.mu.RUnlock()
+
+ if _, err := p.Start(b[:n]); err != nil {
+ c.log.Warnf("Failed to parse mDNS packet %v", err)
+ return
+ }
+
+ for i := 0; i <= maxMessageRecords; i++ {
+ q, err := p.Question()
+ if err == dnsmessage.ErrSectionDone {
+ break
+ } else if err != nil {
+ c.log.Warnf("Failed to parse mDNS packet %v", err)
+ return
+ }
+
+ for _, localName := range c.localNames {
+ if localName == q.Name.String() {
+
+ localAddress, err := interfaceForRemote(src.String())
+ if err != nil {
+ c.log.Warnf("Failed to get local interface to communicate with %s: %v", src.String(), err)
+ continue
+ }
+
+ c.sendAnswer(q.Name.String(), localAddress)
+ }
+ }
+ }
+
+ for i := 0; i <= maxMessageRecords; i++ {
+ a, err := p.AnswerHeader()
+ if err == dnsmessage.ErrSectionDone {
+ return
+ }
+ if err != nil {
+ c.log.Warnf("Failed to parse mDNS packet %v", err)
+ return
+ }
+
+ if a.Type != dnsmessage.TypeA && a.Type != dnsmessage.TypeAAAA {
+ continue
+ }
+
+ for i := len(c.queries) - 1; i >= 0; i-- {
+ if c.queries[i].nameWithSuffix == a.Name.String() {
+ c.queries[i].queryResultChan <- queryResult{a, src}
+ c.queries = append(c.queries[:i], c.queries[i+1:]...)
+ }
+ }
+ }
+ }()
+ }
+}
diff --git a/vendor/github.com/pion/mdns/errors.go b/vendor/github.com/pion/mdns/errors.go
new file mode 100644
index 0000000..2f8dc92
--- /dev/null
+++ b/vendor/github.com/pion/mdns/errors.go
@@ -0,0 +1,10 @@
+package mdns
+
+import "errors"
+
+var (
+ errJoiningMulticastGroup = errors.New("mDNS: failed to join multicast group")
+ errConnectionClosed = errors.New("mDNS: connection is closed")
+ errContextElapsed = errors.New("mDNS: context has elapsed")
+ errNilConfig = errors.New("mDNS: config must not be nil")
+)
diff --git a/vendor/github.com/pion/mdns/go.mod b/vendor/github.com/pion/mdns/go.mod
new file mode 100644
index 0000000..8359ed9
--- /dev/null
+++ b/vendor/github.com/pion/mdns/go.mod
@@ -0,0 +1,9 @@
+module github.com/pion/mdns
+
+go 1.12
+
+require (
+ github.com/pion/logging v0.2.2
+ github.com/pion/transport v0.8.10
+ golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933
+)
diff --git a/vendor/github.com/pion/mdns/go.sum b/vendor/github.com/pion/mdns/go.sum
new file mode 100644
index 0000000..047fa8b
--- /dev/null
+++ b/vendor/github.com/pion/mdns/go.sum
@@ -0,0 +1,16 @@
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
+github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
+github.com/pion/transport v0.8.10 h1:lTiobMEw2PG6BH/mgIVqTV2mBp/mPT+IJLaN8ZxgdHk=
+github.com/pion/transport v0.8.10/go.mod h1:tBmha/UCjpum5hqTWhfAEs3CO4/tHSg0MYRhSzR+CZ8=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933 h1:e6HwijUxhDe+hPNjZQQn9bA5PW3vNmnN64U2ZW759Lk=
+golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/pion/mdns/renovate.json b/vendor/github.com/pion/mdns/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/mdns/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/randutil/.travis.yml b/vendor/github.com/pion/randutil/.travis.yml
new file mode 100644
index 0000000..f04a896
--- /dev/null
+++ b/vendor/github.com/pion/randutil/.travis.yml
@@ -0,0 +1,142 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+# If this repository should have package specific CI config,
+# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
+#
+# If you want to update the shared CI config, send a PR to
+# https://github.com/pion/.goassets instead of this repository.
+#
+
+dist: bionic
+language: go
+
+
+branches:
+ only:
+ - master
+
+env:
+ global:
+ - GO111MODULE=on
+ - GOLANGCI_LINT_VERSION=1.19.1
+
+cache:
+ directories:
+ - ${HOME}/.cache/go-build
+ - ${GOPATH}/pkg/mod
+ npm: true
+ yarn: true
+
+_lint_job: &lint_job
+ env: CACHE_NAME=lint
+ before_install:
+ - if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
+ install: skip
+ before_script:
+ - |
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
+ | bash -s - -b $GOPATH/bin v${GOLANGCI_LINT_VERSION}
+ script:
+ - bash .github/assert-contributors.sh
+ - bash .github/lint-disallowed-functions-in-library.sh
+ - bash .github/lint-commit-message.sh
+ - bash .github/lint-filename.sh
+ - golangci-lint run ./...
+_test_job: &test_job
+ env: CACHE_NAME=test
+ before_install:
+ - if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
+ - go mod download
+ install:
+ - go build ./...
+ script:
+ # If you want to specify repository specific test packages rule,
+ # add `TEST_PACKAGES=$(command to list test target packages)` to .github/.ci.conf
+ - testpkgs=${TEST_PACKAGES:-$(go list ./... | grep -v examples)}
+ - coverpkgs=$(echo "${testpkgs}" | paste -s -d ',')
+ - |
+ go test \
+ -coverpkg=${coverpkgs} -coverprofile=cover.out -covermode=atomic \
+ ${TEST_EXTRA_ARGS:-} \
+ -v -race ${testpkgs}
+ - if [ -n "${TEST_HOOK}" ]; then ${TEST_HOOK}; fi
+ after_success:
+ - travis_retry bash <(curl -s https://codecov.io/bash) -c -F go
+_test_i386_job: &test_i386_job
+ env: CACHE_NAME=test386
+ services: docker
+ before_install:
+ - if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
+ script:
+ - testpkgs=${TEST_PACKAGES:-$(go list ./... | grep -v examples)}
+ - |
+ docker run \
+ -u $(id -u):$(id -g) \
+ -e "GO111MODULE=on" \
+ -e "CGO_ENABLED=0" \
+ -v ${PWD}:/go/src/github.com/pion/$(basename ${PWD}) \
+ -v ${HOME}/gopath/pkg/mod:/go/pkg/mod \
+ -v ${HOME}/.cache/go-build:/.cache/go-build \
+ -w /go/src/github.com/pion/$(basename ${PWD}) \
+ -it i386/golang:${GO_VERSION}-alpine \
+ /usr/local/go/bin/go test \
+ ${TEST_EXTRA_ARGS:-} \
+ -v ${testpkgs}
+_test_wasm_job: &test_wasm_job
+ env: CACHE_NAME=wasm
+ language: node_js
+ node_js: 12
+ before_install:
+ - if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
+ - if ${SKIP_WASM_TEST:-false}; then exit 0; fi
+ install:
+ # Manually download and install Go instead of using gimme.
+ # It looks like gimme Go causes some errors on go-test for Wasm.
+ - curl -sSfL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz | tar -C ~ -xzf -
+ - export GOROOT=${HOME}/go
+ - export PATH=${GOROOT}/bin:${PATH}
+ - yarn install
+ - export GO_JS_WASM_EXEC=${GO_JS_WASM_EXEC:-${GOROOT}/misc/wasm/go_js_wasm_exec}
+ script:
+ - testpkgs=${TEST_PACKAGES:-$(go list ./... | grep -v examples)}
+ - coverpkgs=$(echo "${testpkgs}" | paste -s -d ',')
+ - |
+ GOOS=js GOARCH=wasm go test \
+ -coverpkg=${coverpkgs} -coverprofile=cover.out -covermode=atomic \
+ -exec="${GO_JS_WASM_EXEC}" \
+ -v ${testpkgs}
+ after_success:
+ - travis_retry bash <(curl -s https://codecov.io/bash) -c -F wasm
+
+jobs:
+ include:
+ - <<: *lint_job
+ name: Lint 1.14
+ go: 1.14
+ - <<: *test_job
+ name: Test 1.13
+ go: 1.13
+ - <<: *test_job
+ name: Test 1.14
+ go: 1.14
+ - <<: *test_i386_job
+ name: Test i386 1.13
+ env: GO_VERSION=1.13
+ go: 1.14 # Go version for host environment only for `go list`.
+ # All tests are done on the version specified by GO_VERSION.
+ - <<: *test_i386_job
+ name: Test i386 1.14
+ env: GO_VERSION=1.14
+ go: 1.14 # Go version for host environment only for `go list`.
+ # All tests are done on the version specified by GO_VERSION.
+ - <<: *test_wasm_job
+ name: Test WASM 1.13
+ env: GO_VERSION=1.13
+ - <<: *test_wasm_job
+ name: Test WASM 1.14
+ env: GO_VERSION=1.14
+
+notifications:
+ email: false
diff --git a/vendor/github.com/pion/randutil/LICENSE b/vendor/github.com/pion/randutil/LICENSE
new file mode 100644
index 0000000..5b5a394
--- /dev/null
+++ b/vendor/github.com/pion/randutil/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Pion
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/randutil/README.md b/vendor/github.com/pion/randutil/README.md
new file mode 100644
index 0000000..94baf77
--- /dev/null
+++ b/vendor/github.com/pion/randutil/README.md
@@ -0,0 +1,14 @@
+# randutil
+Helper library for cryptographic and mathmatical randoms
+
+### Community
+Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [Atsushi Watanabe](https://github.com/at-wat) - *Original Author*
diff --git a/vendor/github.com/pion/randutil/codecov.yml b/vendor/github.com/pion/randutil/codecov.yml
new file mode 100644
index 0000000..085200a
--- /dev/null
+++ b/vendor/github.com/pion/randutil/codecov.yml
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+
+coverage:
+ status:
+ project:
+ default:
+ # Allow decreasing 2% of total coverage to avoid noise.
+ threshold: 2%
+ patch:
+ default:
+ target: 70%
+ only_pulls: true
+
+ignore:
+ - "examples/*"
+ - "examples/**/*"
diff --git a/vendor/github.com/pion/randutil/crypto.go b/vendor/github.com/pion/randutil/crypto.go
new file mode 100644
index 0000000..d10df98
--- /dev/null
+++ b/vendor/github.com/pion/randutil/crypto.go
@@ -0,0 +1,30 @@
+package randutil
+
+import (
+ crand "crypto/rand"
+ "encoding/binary"
+ "math/big"
+)
+
+// GenerateCryptoRandomString generates a random string for cryptographic usage.
+func GenerateCryptoRandomString(n int, runes string) (string, error) {
+ letters := []rune(runes)
+ b := make([]rune, n)
+ for i := range b {
+ v, err := crand.Int(crand.Reader, big.NewInt(int64(len(letters))))
+ if err != nil {
+ return "", err
+ }
+ b[i] = letters[v.Int64()]
+ }
+ return string(b), nil
+}
+
+// CryptoUint64 returns cryptographic random uint64.
+func CryptoUint64() (uint64, error) {
+ var v uint64
+ if err := binary.Read(crand.Reader, binary.LittleEndian, &v); err != nil {
+ return 0, err
+ }
+ return v, nil
+}
diff --git a/vendor/github.com/pion/randutil/go.mod b/vendor/github.com/pion/randutil/go.mod
new file mode 100644
index 0000000..2a824e0
--- /dev/null
+++ b/vendor/github.com/pion/randutil/go.mod
@@ -0,0 +1,3 @@
+module github.com/pion/randutil
+
+go 1.14
diff --git a/vendor/github.com/pion/randutil/math.go b/vendor/github.com/pion/randutil/math.go
new file mode 100644
index 0000000..fbbf460
--- /dev/null
+++ b/vendor/github.com/pion/randutil/math.go
@@ -0,0 +1,72 @@
+package randutil
+
+import (
+ mrand "math/rand" // used for non-crypto unique ID and random port selection
+ "sync"
+ "time"
+)
+
+// MathRandomGenerator is a random generator for non-crypto usage.
+type MathRandomGenerator interface {
+ // Intn returns random integer within [0:n).
+ Intn(n int) int
+
+ // Uint32 returns random 32-bit unsigned integer.
+ Uint32() uint32
+
+ // Uint64 returns random 64-bit unsigned integer.
+ Uint64() uint64
+
+ // GenerateString returns ranom string using given set of runes.
+ // It can be used for generating unique ID to avoid name collision.
+ //
+ // Caution: DO NOT use this for cryptographic usage.
+ GenerateString(n int, runes string) string
+}
+
+type mathRandomGenerator struct {
+ r *mrand.Rand
+ mu sync.Mutex
+}
+
+// NewMathRandomGenerator creates new mathmatical random generator.
+// Random generator is seeded by crypto random.
+func NewMathRandomGenerator() MathRandomGenerator {
+ seed, err := CryptoUint64()
+ if err != nil {
+ // crypto/rand is unavailable. Fallback to seed by time.
+ seed = uint64(time.Now().UnixNano())
+ }
+
+ return &mathRandomGenerator{r: mrand.New(mrand.NewSource(int64(seed)))}
+}
+
+func (g *mathRandomGenerator) Intn(n int) int {
+ g.mu.Lock()
+ v := g.r.Intn(n)
+ g.mu.Unlock()
+ return v
+}
+
+func (g *mathRandomGenerator) Uint32() uint32 {
+ g.mu.Lock()
+ v := g.r.Uint32()
+ g.mu.Unlock()
+ return v
+}
+
+func (g *mathRandomGenerator) Uint64() uint64 {
+ g.mu.Lock()
+ v := g.r.Uint64()
+ g.mu.Unlock()
+ return v
+}
+
+func (g *mathRandomGenerator) GenerateString(n int, runes string) string {
+ letters := []rune(runes)
+ b := make([]rune, n)
+ for i := range b {
+ b[i] = letters[g.Intn(len(letters))]
+ }
+ return string(b)
+}
diff --git a/vendor/github.com/pion/randutil/renovate.json b/vendor/github.com/pion/randutil/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/randutil/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/rtcp/.gitignore b/vendor/github.com/pion/rtcp/.gitignore
new file mode 100644
index 0000000..83db74b
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/.gitignore
@@ -0,0 +1,24 @@
+### JetBrains IDE ###
+#####################
+.idea/
+
+### Emacs Temporary Files ###
+#############################
+*~
+
+### Folders ###
+###############
+bin/
+vendor/
+node_modules/
+
+### Files ###
+#############
+*.ivf
+*.ogg
+tags
+cover.out
+*.sw[poe]
+*.wasm
+examples/sfu-ws/cert.pem
+examples/sfu-ws/key.pem
diff --git a/vendor/github.com/pion/rtcp/.golangci.yml b/vendor/github.com/pion/rtcp/.golangci.yml
new file mode 100644
index 0000000..d6162c9
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/.golangci.yml
@@ -0,0 +1,89 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+ exhaustive:
+ default-signifies-exhaustive: true
+ gomodguard:
+ blocked:
+ modules:
+ - github.com/pkg/errors:
+ recommendations:
+ - errors
+
+linters:
+ enable:
+ - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
+ - bodyclose # checks whether HTTP response body is closed successfully
+ - deadcode # Finds unused code
+ - depguard # Go linter that checks if package imports are in a list of acceptable packages
+ - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
+ - dupl # Tool for code clone detection
+ - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
+ - exhaustive # check exhaustiveness of enum switch statements
+ - exportloopref # checks for pointers to enclosing loop variables
+ - gci # Gci control golang package import order and make it always deterministic.
+ - gochecknoglobals # Checks that no globals are present in Go code
+ - gochecknoinits # Checks that no init functions are present in Go code
+ - gocognit # Computes and checks the cognitive complexity of functions
+ - goconst # Finds repeated strings that could be replaced by a constant
+ - gocritic # The most opinionated Go source code linter
+ - godox # Tool for detection of FIXME, TODO and other comment keywords
+ - goerr113 # Golang linter to check the errors handling expressions
+ - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
+ - gofumpt # Gofumpt checks whether code was gofumpt-ed.
+ - goheader # Checks is file header matches to pattern
+ - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
+ - golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
+ - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.
+ - goprintffuncname # Checks that printf-like functions are named with `f` at the end
+ - gosec # Inspects source code for security problems
+ - gosimple # Linter for Go source code that specializes in simplifying a code
+ - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
+ - ineffassign # Detects when assignments to existing variables are not used
+ - misspell # Finds commonly misspelled English words in comments
+ - nakedret # Finds naked returns in functions greater than a specified function length
+ - noctx # noctx finds sending http request without context.Context
+ - scopelint # Scopelint checks for unpinned variables in go programs
+ - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
+ - structcheck # Finds unused struct fields
+ - stylecheck # Stylecheck is a replacement for golint
+ - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
+ - unconvert # Remove unnecessary type conversions
+ - unparam # Reports unused function parameters
+ - unused # Checks Go code for unused constants, variables, functions and types
+ - varcheck # Finds unused global variables and constants
+ - whitespace # Tool for detection of leading and trailing whitespace
+ disable:
+ - funlen # Tool for detection of long functions
+ - gocyclo # Computes and checks the cyclomatic complexity of functions
+ - godot # Check if comments end in a period
+ - gomnd # An analyzer to detect magic numbers.
+ - lll # Reports long lines
+ - maligned # Tool to detect Go structs that would take less memory if their fields were sorted
+ - nestif # Reports deeply nested if statements
+ - nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
+ - nolintlint # Reports ill-formed or insufficient nolint directives
+ - prealloc # Finds slice declarations that could potentially be preallocated
+ - rowserrcheck # checks whether Err of rows is checked successfully
+ - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
+ - testpackage # linter that makes you use a separate _test package
+ - wsl # Whitespace Linter - Forces you to use empty lines!
+
+issues:
+ exclude-use-default: false
+ exclude-rules:
+ # Allow complex tests, better to be self contained
+ - path: _test\.go
+ linters:
+ - gocognit
+
+ # Allow complex main function in examples
+ - path: examples
+ text: "of func `main` is high"
+ linters:
+ - gocognit
+
+run:
+ skip-dirs-use-default: false
diff --git a/vendor/github.com/pion/rtcp/LICENSE b/vendor/github.com/pion/rtcp/LICENSE
new file mode 100644
index 0000000..ab60297
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/rtcp/README.md b/vendor/github.com/pion/rtcp/README.md
new file mode 100644
index 0000000..a054dae
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/README.md
@@ -0,0 +1,49 @@
+<h1 align="center">
+ <br>
+ Pion RTCP
+ <br>
+</h1>
+<h4 align="center">A Go implementation of RTCP</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-rtcp-gray.svg?longCache=true&colorB=brightgreen" alt="Pion RTCP"></a>
+ <a href="https://sourcegraph.com/github.com/pion/rtcp?badge"><img src="https://sourcegraph.com/github.com/pion/rtcp/-/badge.svg" alt="Sourcegraph Widget"></a>
+ <a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/rtcp"><img src="https://travis-ci.org/pion/rtcp.svg?branch=master" alt="Build Status"></a>
+ <a href="https://pkg.go.dev/github.com/pion/rtcp"><img src="https://godoc.org/github.com/pion/rtcp?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/rtcp"><img src="https://codecov.io/gh/pion/rtcp/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/rtcp"><img src="https://goreportcard.com/badge/github.com/pion/rtcp" alt="Go Report Card"></a>
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+See [DESIGN.md](DESIGN.md) for an overview of features and future goals.
+
+### Roadmap
+The library is used as a part of our WebRTC implementation. Please refer to that [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
+
+### Community
+Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [Max Hawkins](https://github.com/maxhawkins) - *Original Author*
+* [Woodrow Douglass](https://github.com/wdouglass) *RTCP, RTP improvements, G.722 support, Bugfixes*
+* [Sean DuBois](https://github.com/Sean-Der) - *Linter fixes*
+* [adwpc](https://github.com/adwpc)
+* [Luke Curley](https://github.com/kixelated)
+* [Hugo Arregui](https://github.com/hugoArregui)
+* [Atsushi Watanabe](https://github.com/at-wat)
+* [Juliusz Chroboczek](https://github.com/jech)
+* [Gabor Pongracz](https://github.com/pongraczgabor87)
+* [Simone Gotti](https://github.com/sgotti)
+* [lllf](https://github.com/LittleLightLittleFire)
+* [cnderrauber](https://github.com/cnderrauber)
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/rtcp/codecov.yml b/vendor/github.com/pion/rtcp/codecov.yml
new file mode 100644
index 0000000..085200a
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/codecov.yml
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+
+coverage:
+ status:
+ project:
+ default:
+ # Allow decreasing 2% of total coverage to avoid noise.
+ threshold: 2%
+ patch:
+ default:
+ target: 70%
+ only_pulls: true
+
+ignore:
+ - "examples/*"
+ - "examples/**/*"
diff --git a/vendor/github.com/pion/rtcp/compound_packet.go b/vendor/github.com/pion/rtcp/compound_packet.go
new file mode 100644
index 0000000..2c74279
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/compound_packet.go
@@ -0,0 +1,136 @@
+package rtcp
+
+// A CompoundPacket is a collection of RTCP packets transmitted as a single packet with
+// the underlying protocol (for example UDP).
+//
+// To maximize the resolution of receiption statistics, the first Packet in a CompoundPacket
+// must always be either a SenderReport or a ReceiverReport. This is true even if no data
+// has been sent or received, in which case an empty ReceiverReport must be sent, and even
+// if the only other RTCP packet in the compound packet is a Goodbye.
+//
+// Next, a SourceDescription containing a CNAME item must be included in each CompoundPacket
+// to identify the source and to begin associating media for purposes such as lip-sync.
+//
+// Other RTCP packet types may follow in any order. Packet types may appear more than once.
+type CompoundPacket []Packet
+
+var _ Packet = (*CompoundPacket)(nil) // assert is a Packet
+
+// Validate returns an error if this is not an RFC-compliant CompoundPacket.
+func (c CompoundPacket) Validate() error {
+ if len(c) == 0 {
+ return errEmptyCompound
+ }
+
+ // SenderReport and ReceiverReport are the only types that
+ // are allowed to be the first packet in a compound datagram
+ switch c[0].(type) {
+ case *SenderReport, *ReceiverReport:
+ // ok
+ default:
+ return errBadFirstPacket
+ }
+
+ for _, pkt := range c[1:] {
+ switch p := pkt.(type) {
+ // If the number of RecetpionReports exceeds 31 additional ReceiverReports
+ // can be included here.
+ case *ReceiverReport:
+ continue
+
+ // A SourceDescription containing a CNAME must be included in every
+ // CompoundPacket.
+ case *SourceDescription:
+ var hasCNAME bool
+ for _, c := range p.Chunks {
+ for _, it := range c.Items {
+ if it.Type == SDESCNAME {
+ hasCNAME = true
+ }
+ }
+ }
+
+ if !hasCNAME {
+ return errMissingCNAME
+ }
+
+ return nil
+
+ // Other packets are not permitted before the CNAME
+ default:
+ return errPacketBeforeCNAME
+ }
+ }
+
+ // CNAME never reached
+ return errMissingCNAME
+}
+
+// CNAME returns the CNAME that *must* be present in every CompoundPacket
+func (c CompoundPacket) CNAME() (string, error) {
+ var err error
+
+ if len(c) < 1 {
+ return "", errEmptyCompound
+ }
+
+ for _, pkt := range c[1:] {
+ sdes, ok := pkt.(*SourceDescription)
+ if ok {
+ for _, c := range sdes.Chunks {
+ for _, it := range c.Items {
+ if it.Type == SDESCNAME {
+ return it.Text, err
+ }
+ }
+ }
+ } else {
+ _, ok := pkt.(*ReceiverReport)
+ if !ok {
+ err = errPacketBeforeCNAME
+ }
+ }
+ }
+ return "", errMissingCNAME
+}
+
+// Marshal encodes the CompoundPacket as binary.
+func (c CompoundPacket) Marshal() ([]byte, error) {
+ if err := c.Validate(); err != nil {
+ return nil, err
+ }
+
+ p := []Packet(c)
+ return Marshal(p)
+}
+
+// Unmarshal decodes a CompoundPacket from binary.
+func (c *CompoundPacket) Unmarshal(rawData []byte) error {
+ out := make(CompoundPacket, 0)
+ for len(rawData) != 0 {
+ p, processed, err := unmarshal(rawData)
+ if err != nil {
+ return err
+ }
+
+ out = append(out, p)
+ rawData = rawData[processed:]
+ }
+ *c = out
+
+ if err := c.Validate(); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// DestinationSSRC returns the synchronization sources associated with this
+// CompoundPacket's reception report.
+func (c CompoundPacket) DestinationSSRC() []uint32 {
+ if len(c) == 0 {
+ return nil
+ }
+
+ return c[0].DestinationSSRC()
+}
diff --git a/vendor/github.com/pion/rtcp/doc.go b/vendor/github.com/pion/rtcp/doc.go
new file mode 100644
index 0000000..fa948df
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/doc.go
@@ -0,0 +1,39 @@
+/*
+Package rtcp implements encoding and decoding of RTCP packets according to RFCs 3550 and 5506.
+
+RTCP is a sister protocol of the Real-time Transport Protocol (RTP). Its basic functionality
+and packet structure is defined in RFC 3550. RTCP provides out-of-band statistics and control
+information for an RTP session. It partners with RTP in the delivery and packaging of multimedia data,
+but does not transport any media data itself.
+
+The primary function of RTCP is to provide feedback on the quality of service (QoS)
+in media distribution by periodically sending statistics information such as transmitted octet
+and packet counts, packet loss, packet delay variation, and round-trip delay time to participants
+in a streaming multimedia session. An application may use this information to control quality of
+service parameters, perhaps by limiting flow, or using a different codec.
+
+Decoding RTCP packets:
+
+ pkt, err := rtcp.Unmarshal(rtcpData)
+ // ...
+
+ switch p := pkt.(type) {
+ case *rtcp.CompoundPacket:
+ ...
+ case *rtcp.PictureLossIndication:
+ ...
+ default:
+ ...
+ }
+
+Encoding RTCP packets:
+
+ pkt := &rtcp.PictureLossIndication{
+ SenderSSRC: senderSSRC,
+ MediaSSRC: mediaSSRC
+ }
+ pliData, err := pkt.Marshal()
+ // ...
+
+*/
+package rtcp
diff --git a/vendor/github.com/pion/rtcp/errors.go b/vendor/github.com/pion/rtcp/errors.go
new file mode 100644
index 0000000..d1b00c5
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/errors.go
@@ -0,0 +1,30 @@
+package rtcp
+
+import "errors"
+
+var (
+ errWrongMarshalSize = errors.New("rtcp: wrong marshal size")
+ errInvalidTotalLost = errors.New("rtcp: invalid total lost count")
+ errInvalidHeader = errors.New("rtcp: invalid header")
+ errEmptyCompound = errors.New("rtcp: empty compound packet")
+ errBadFirstPacket = errors.New("rtcp: first packet in compound must be SR or RR")
+ errMissingCNAME = errors.New("rtcp: compound missing SourceDescription with CNAME")
+ errPacketBeforeCNAME = errors.New("rtcp: feedback packet seen before CNAME")
+ errTooManyReports = errors.New("rtcp: too many reports")
+ errTooManyChunks = errors.New("rtcp: too many chunks")
+ errTooManySources = errors.New("rtcp: too many sources")
+ errPacketTooShort = errors.New("rtcp: packet too short")
+ errWrongType = errors.New("rtcp: wrong packet type")
+ errSDESTextTooLong = errors.New("rtcp: sdes must be < 255 octets long")
+ errSDESMissingType = errors.New("rtcp: sdes item missing type")
+ errReasonTooLong = errors.New("rtcp: reason must be < 255 octets long")
+ errBadVersion = errors.New("rtcp: invalid packet version")
+ errWrongPadding = errors.New("rtcp: invalid padding value")
+ errWrongFeedbackType = errors.New("rtcp: wrong feedback message type")
+ errWrongPayloadType = errors.New("rtcp: wrong payload type")
+ errHeaderTooSmall = errors.New("rtcp: header length is too small")
+ errSSRCMustBeZero = errors.New("rtcp: media SSRC must be 0")
+ errMissingREMBidentifier = errors.New("missing REMB identifier")
+ errSSRCNumAndLengthMismatch = errors.New("SSRC num and length do not match")
+ errInvalidSizeOrStartIndex = errors.New("invalid size or startIndex")
+)
diff --git a/vendor/github.com/pion/rtcp/full_intra_request.go b/vendor/github.com/pion/rtcp/full_intra_request.go
new file mode 100644
index 0000000..74ca928
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/full_intra_request.go
@@ -0,0 +1,107 @@
+package rtcp
+
+import (
+ "encoding/binary"
+ "fmt"
+)
+
+// A FIREntry is a (SSRC, seqno) pair, as carried by FullIntraRequest.
+type FIREntry struct {
+ SSRC uint32
+ SequenceNumber uint8
+}
+
+// The FullIntraRequest packet is used to reliably request an Intra frame
+// in a video stream. See RFC 5104 Section 3.5.1. This is not for loss
+// recovery, which should use PictureLossIndication (PLI) instead.
+type FullIntraRequest struct {
+ SenderSSRC uint32
+ MediaSSRC uint32
+
+ FIR []FIREntry
+}
+
+const (
+ firOffset = 8
+)
+
+var _ Packet = (*FullIntraRequest)(nil)
+
+// Marshal encodes the FullIntraRequest
+func (p FullIntraRequest) Marshal() ([]byte, error) {
+ rawPacket := make([]byte, firOffset+(len(p.FIR)*8))
+ binary.BigEndian.PutUint32(rawPacket, p.SenderSSRC)
+ binary.BigEndian.PutUint32(rawPacket[4:], p.MediaSSRC)
+ for i, fir := range p.FIR {
+ binary.BigEndian.PutUint32(rawPacket[firOffset+8*i:], fir.SSRC)
+ rawPacket[firOffset+8*i+4] = fir.SequenceNumber
+ }
+ h := p.Header()
+ hData, err := h.Marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ return append(hData, rawPacket...), nil
+}
+
+// Unmarshal decodes the TransportLayerNack
+func (p *FullIntraRequest) Unmarshal(rawPacket []byte) error {
+ if len(rawPacket) < (headerLength + ssrcLength) {
+ return errPacketTooShort
+ }
+
+ var h Header
+ if err := h.Unmarshal(rawPacket); err != nil {
+ return err
+ }
+
+ if len(rawPacket) < (headerLength + int(4*h.Length)) {
+ return errPacketTooShort
+ }
+
+ if h.Type != TypePayloadSpecificFeedback || h.Count != FormatFIR {
+ return errWrongType
+ }
+
+ p.SenderSSRC = binary.BigEndian.Uint32(rawPacket[headerLength:])
+ p.MediaSSRC = binary.BigEndian.Uint32(rawPacket[headerLength+ssrcLength:])
+ for i := headerLength + firOffset; i < (headerLength + int(h.Length*4)); i += 8 {
+ p.FIR = append(p.FIR, FIREntry{
+ binary.BigEndian.Uint32(rawPacket[i:]),
+ rawPacket[i+4],
+ })
+ }
+ return nil
+}
+
+// Header returns the Header associated with this packet.
+func (p *FullIntraRequest) Header() Header {
+ return Header{
+ Count: FormatFIR,
+ Type: TypePayloadSpecificFeedback,
+ Length: uint16((p.len() / 4) - 1),
+ }
+}
+
+func (p *FullIntraRequest) len() int {
+ return headerLength + firOffset + len(p.FIR)*8
+}
+
+func (p *FullIntraRequest) String() string {
+ out := fmt.Sprintf("FullIntraRequest %x %x",
+ p.SenderSSRC, p.MediaSSRC)
+ for _, e := range p.FIR {
+ out += fmt.Sprintf(" (%x %v)", e.SSRC, e.SequenceNumber)
+ }
+ return out
+}
+
+// DestinationSSRC returns an array of SSRC values that this packet refers to.
+func (p *FullIntraRequest) DestinationSSRC() []uint32 {
+ ssrcs := make([]uint32, 0, len(p.FIR))
+ for _, entry := range p.FIR {
+ ssrcs = append(ssrcs, entry.SSRC)
+ }
+ return ssrcs
+}
diff --git a/vendor/github.com/pion/rtcp/fuzz.go b/vendor/github.com/pion/rtcp/fuzz.go
new file mode 100644
index 0000000..2ea4fb1
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/fuzz.go
@@ -0,0 +1,51 @@
+// +build gofuzz
+
+package rtcp
+
+import (
+ "bytes"
+ "io"
+)
+
+// Fuzz implements a randomized fuzz test of the rtcp
+// parser using go-fuzz.
+//
+// To run the fuzzer, first download go-fuzz:
+// `go get github.com/dvyukov/go-fuzz/...`
+//
+// Then build the testing package:
+// `go-fuzz-build github.com/pion/webrtc`
+//
+// And run the fuzzer on the corpus:
+// ```
+// mkdir workdir
+//
+// # optionally add a starter corpus of valid rtcp packets.
+// # the corpus should be as compact and diverse as possible.
+// cp -r ~/my-rtcp-packets workdir/corpus
+//
+// go-fuzz -bin=ase-fuzz.zip -workdir=workdir
+// ````
+func Fuzz(data []byte) int {
+ r := NewReader(bytes.NewReader(data))
+ for {
+ _, data, err := r.ReadPacket()
+ if err == io.EOF {
+ break
+ }
+ if err != nil {
+ return 0
+ }
+
+ packet, err := Unmarshal(data)
+ if err != nil {
+ return 0
+ }
+
+ if _, err := packet.Marshal(); err != nil {
+ return 0
+ }
+ }
+
+ return 1
+}
diff --git a/vendor/github.com/pion/rtcp/go.mod b/vendor/github.com/pion/rtcp/go.mod
new file mode 100644
index 0000000..28b6e9d
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/go.mod
@@ -0,0 +1,5 @@
+module github.com/pion/rtcp
+
+go 1.13
+
+require github.com/stretchr/testify v1.6.1
diff --git a/vendor/github.com/pion/rtcp/go.sum b/vendor/github.com/pion/rtcp/go.sum
new file mode 100644
index 0000000..afe7890
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/go.sum
@@ -0,0 +1,11 @@
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/pion/rtcp/goodbye.go b/vendor/github.com/pion/rtcp/goodbye.go
new file mode 100644
index 0000000..b8718b3
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/goodbye.go
@@ -0,0 +1,146 @@
+package rtcp
+
+import (
+ "encoding/binary"
+)
+
+// The Goodbye packet indicates that one or more sources are no longer active.
+type Goodbye struct {
+ // The SSRC/CSRC identifiers that are no longer active
+ Sources []uint32
+ // Optional text indicating the reason for leaving, e.g., "camera malfunction" or "RTP loop detected"
+ Reason string
+}
+
+var _ Packet = (*Goodbye)(nil) // assert is a Packet
+
+// Marshal encodes the Goodbye packet in binary
+func (g Goodbye) Marshal() ([]byte, error) {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |V=2|P| SC | PT=BYE=203 | length |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | SSRC/CSRC |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * : ... :
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * (opt) | length | reason for leaving ...
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+ rawPacket := make([]byte, g.len())
+ packetBody := rawPacket[headerLength:]
+
+ if len(g.Sources) > countMax {
+ return nil, errTooManySources
+ }
+
+ for i, s := range g.Sources {
+ binary.BigEndian.PutUint32(packetBody[i*ssrcLength:], s)
+ }
+
+ if g.Reason != "" {
+ reason := []byte(g.Reason)
+
+ if len(reason) > sdesMaxOctetCount {
+ return nil, errReasonTooLong
+ }
+
+ reasonOffset := len(g.Sources) * ssrcLength
+ packetBody[reasonOffset] = uint8(len(reason))
+ copy(packetBody[reasonOffset+1:], reason)
+ }
+
+ hData, err := g.Header().Marshal()
+ if err != nil {
+ return nil, err
+ }
+ copy(rawPacket, hData)
+
+ return rawPacket, nil
+}
+
+// Unmarshal decodes the Goodbye packet from binary
+func (g *Goodbye) Unmarshal(rawPacket []byte) error {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |V=2|P| SC | PT=BYE=203 | length |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | SSRC/CSRC |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * : ... :
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * (opt) | length | reason for leaving ...
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+ var header Header
+ if err := header.Unmarshal(rawPacket); err != nil {
+ return err
+ }
+
+ if header.Type != TypeGoodbye {
+ return errWrongType
+ }
+
+ if getPadding(len(rawPacket)) != 0 {
+ return errPacketTooShort
+ }
+
+ g.Sources = make([]uint32, header.Count)
+
+ reasonOffset := int(headerLength + header.Count*ssrcLength)
+ if reasonOffset > len(rawPacket) {
+ return errPacketTooShort
+ }
+
+ for i := 0; i < int(header.Count); i++ {
+ offset := headerLength + i*ssrcLength
+
+ g.Sources[i] = binary.BigEndian.Uint32(rawPacket[offset:])
+ }
+
+ if reasonOffset < len(rawPacket) {
+ reasonLen := int(rawPacket[reasonOffset])
+ reasonEnd := reasonOffset + 1 + reasonLen
+
+ if reasonEnd > len(rawPacket) {
+ return errPacketTooShort
+ }
+
+ g.Reason = string(rawPacket[reasonOffset+1 : reasonEnd])
+ }
+
+ return nil
+}
+
+// Header returns the Header associated with this packet.
+func (g *Goodbye) Header() Header {
+ return Header{
+ Padding: false,
+ Count: uint8(len(g.Sources)),
+ Type: TypeGoodbye,
+ Length: uint16((g.len() / 4) - 1),
+ }
+}
+
+func (g *Goodbye) len() int {
+ srcsLength := len(g.Sources) * ssrcLength
+ reasonLength := len(g.Reason) + 1
+
+ l := headerLength + srcsLength + reasonLength
+
+ // align to 32-bit boundary
+ return l + getPadding(l)
+}
+
+// DestinationSSRC returns an array of SSRC values that this packet refers to.
+func (g *Goodbye) DestinationSSRC() []uint32 {
+ out := make([]uint32, len(g.Sources))
+ copy(out, g.Sources)
+ return out
+}
diff --git a/vendor/github.com/pion/rtcp/header.go b/vendor/github.com/pion/rtcp/header.go
new file mode 100644
index 0000000..055ca18
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/header.go
@@ -0,0 +1,140 @@
+package rtcp
+
+import (
+ "encoding/binary"
+)
+
+// PacketType specifies the type of an RTCP packet
+type PacketType uint8
+
+// RTCP packet types registered with IANA. See: https://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-4
+const (
+ TypeSenderReport PacketType = 200 // RFC 3550, 6.4.1
+ TypeReceiverReport PacketType = 201 // RFC 3550, 6.4.2
+ TypeSourceDescription PacketType = 202 // RFC 3550, 6.5
+ TypeGoodbye PacketType = 203 // RFC 3550, 6.6
+ TypeApplicationDefined PacketType = 204 // RFC 3550, 6.7 (unimplemented)
+ TypeTransportSpecificFeedback PacketType = 205 // RFC 4585, 6051
+ TypePayloadSpecificFeedback PacketType = 206 // RFC 4585, 6.3
+
+)
+
+// Transport and Payload specific feedback messages overload the count field to act as a message type. those are listed here
+const (
+ FormatSLI uint8 = 2
+ FormatPLI uint8 = 1
+ FormatFIR uint8 = 4
+ FormatTLN uint8 = 1
+ FormatRRR uint8 = 5
+ FormatREMB uint8 = 15
+
+ //https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01#page-5
+ FormatTCC uint8 = 15
+)
+
+func (p PacketType) String() string {
+ switch p {
+ case TypeSenderReport:
+ return "SR"
+ case TypeReceiverReport:
+ return "RR"
+ case TypeSourceDescription:
+ return "SDES"
+ case TypeGoodbye:
+ return "BYE"
+ case TypeApplicationDefined:
+ return "APP"
+ case TypeTransportSpecificFeedback:
+ return "TSFB"
+ case TypePayloadSpecificFeedback:
+ return "PSFB"
+ default:
+ return string(p)
+ }
+}
+
+const rtpVersion = 2
+
+// A Header is the common header shared by all RTCP packets
+type Header struct {
+ // If the padding bit is set, this individual RTCP packet contains
+ // some additional padding octets at the end which are not part of
+ // the control information but are included in the length field.
+ Padding bool
+ // The number of reception reports, sources contained or FMT in this packet (depending on the Type)
+ Count uint8
+ // The RTCP packet type for this packet
+ Type PacketType
+ // The length of this RTCP packet in 32-bit words minus one,
+ // including the header and any padding.
+ Length uint16
+}
+
+const (
+ headerLength = 4
+ versionShift = 6
+ versionMask = 0x3
+ paddingShift = 5
+ paddingMask = 0x1
+ countShift = 0
+ countMask = 0x1f
+ countMax = (1 << 5) - 1
+)
+
+// Marshal encodes the Header in binary
+func (h Header) Marshal() ([]byte, error) {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |V=2|P| RC | PT=SR=200 | length |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+ rawPacket := make([]byte, headerLength)
+
+ rawPacket[0] |= rtpVersion << versionShift
+
+ if h.Padding {
+ rawPacket[0] |= 1 << paddingShift
+ }
+
+ if h.Count > 31 {
+ return nil, errInvalidHeader
+ }
+ rawPacket[0] |= h.Count << countShift
+
+ rawPacket[1] = uint8(h.Type)
+
+ binary.BigEndian.PutUint16(rawPacket[2:], h.Length)
+
+ return rawPacket, nil
+}
+
+// Unmarshal decodes the Header from binary
+func (h *Header) Unmarshal(rawPacket []byte) error {
+ if len(rawPacket) < headerLength {
+ return errPacketTooShort
+ }
+
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |V=2|P| RC | PT | length |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+ version := rawPacket[0] >> versionShift & versionMask
+ if version != rtpVersion {
+ return errBadVersion
+ }
+
+ h.Padding = (rawPacket[0] >> paddingShift & paddingMask) > 0
+ h.Count = rawPacket[0] >> countShift & countMask
+
+ h.Type = PacketType(rawPacket[1])
+
+ h.Length = binary.BigEndian.Uint16(rawPacket[2:])
+
+ return nil
+}
diff --git a/vendor/github.com/pion/rtcp/packet.go b/vendor/github.com/pion/rtcp/packet.go
new file mode 100644
index 0000000..de08003
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/packet.go
@@ -0,0 +1,115 @@
+package rtcp
+
+// Packet represents an RTCP packet, a protocol used for out-of-band statistics and control information for an RTP session
+type Packet interface {
+ // DestinationSSRC returns an array of SSRC values that this packet refers to.
+ DestinationSSRC() []uint32
+
+ Marshal() ([]byte, error)
+ Unmarshal(rawPacket []byte) error
+}
+
+// Unmarshal takes an entire udp datagram (which may consist of multiple RTCP packets) and
+// returns the unmarshaled packets it contains.
+//
+// If this is a reduced-size RTCP packet a feedback packet (Goodbye, SliceLossIndication, etc)
+// will be returned. Otherwise, the underlying type of the returned packet will be
+// CompoundPacket.
+func Unmarshal(rawData []byte) ([]Packet, error) {
+ var packets []Packet
+ for len(rawData) != 0 {
+ p, processed, err := unmarshal(rawData)
+ if err != nil {
+ return nil, err
+ }
+
+ packets = append(packets, p)
+ rawData = rawData[processed:]
+ }
+
+ switch len(packets) {
+ // Empty packet
+ case 0:
+ return nil, errInvalidHeader
+ // Multiple Packets
+ default:
+ return packets, nil
+ }
+}
+
+// Marshal takes an array of Packets and serializes them to a single buffer
+func Marshal(packets []Packet) ([]byte, error) {
+ out := make([]byte, 0)
+ for _, p := range packets {
+ data, err := p.Marshal()
+ if err != nil {
+ return nil, err
+ }
+ out = append(out, data...)
+ }
+ return out, nil
+}
+
+// unmarshal is a factory which pulls the first RTCP packet from a bytestream,
+// and returns it's parsed representation, and the amount of data that was processed.
+func unmarshal(rawData []byte) (packet Packet, bytesprocessed int, err error) {
+ var h Header
+
+ err = h.Unmarshal(rawData)
+ if err != nil {
+ return nil, 0, err
+ }
+
+ bytesprocessed = int(h.Length+1) * 4
+ if bytesprocessed > len(rawData) {
+ return nil, 0, errPacketTooShort
+ }
+ inPacket := rawData[:bytesprocessed]
+
+ switch h.Type {
+ case TypeSenderReport:
+ packet = new(SenderReport)
+
+ case TypeReceiverReport:
+ packet = new(ReceiverReport)
+
+ case TypeSourceDescription:
+ packet = new(SourceDescription)
+
+ case TypeGoodbye:
+ packet = new(Goodbye)
+
+ case TypeTransportSpecificFeedback:
+ switch h.Count {
+ case FormatTLN:
+ packet = new(TransportLayerNack)
+ case FormatRRR:
+ packet = new(RapidResynchronizationRequest)
+ case FormatTCC:
+ packet = new(TransportLayerCC)
+ default:
+ packet = new(RawPacket)
+ }
+
+ case TypePayloadSpecificFeedback:
+ switch h.Count {
+ case FormatPLI:
+ packet = new(PictureLossIndication)
+ case FormatSLI:
+ packet = new(SliceLossIndication)
+ case FormatREMB:
+ packet = new(ReceiverEstimatedMaximumBitrate)
+ case FormatFIR:
+ packet = new(FullIntraRequest)
+ default:
+ packet = new(RawPacket)
+ }
+
+ default:
+ packet = new(RawPacket)
+ }
+
+ err = packet.Unmarshal(inPacket)
+
+ return packet, bytesprocessed, err
+}
diff --git a/vendor/github.com/pion/rtcp/picture_loss_indication.go b/vendor/github.com/pion/rtcp/picture_loss_indication.go
new file mode 100644
index 0000000..7216ecd
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/picture_loss_indication.go
@@ -0,0 +1,91 @@
+package rtcp
+
+import (
+ "encoding/binary"
+ "fmt"
+)
+
+// The PictureLossIndication packet informs the encoder about the loss of an undefined amount of coded video data belonging to one or more pictures
+type PictureLossIndication struct {
+ // SSRC of sender
+ SenderSSRC uint32
+
+ // SSRC where the loss was experienced
+ MediaSSRC uint32
+}
+
+var _ Packet = (*PictureLossIndication)(nil) // assert is a Packet
+
+const (
+ pliLength = 2
+)
+
+// Marshal encodes the PictureLossIndication in binary
+func (p PictureLossIndication) Marshal() ([]byte, error) {
+ /*
+ * PLI does not require parameters. Therefore, the length field MUST be
+ * 2, and there MUST NOT be any Feedback Control Information.
+ *
+ * The semantics of this FB message is independent of the payload type.
+ */
+ rawPacket := make([]byte, p.len())
+ packetBody := rawPacket[headerLength:]
+
+ binary.BigEndian.PutUint32(packetBody, p.SenderSSRC)
+ binary.BigEndian.PutUint32(packetBody[4:], p.MediaSSRC)
+
+ h := Header{
+ Count: FormatPLI,
+ Type: TypePayloadSpecificFeedback,
+ Length: pliLength,
+ }
+ hData, err := h.Marshal()
+ if err != nil {
+ return nil, err
+ }
+ copy(rawPacket, hData)
+
+ return rawPacket, nil
+}
+
+// Unmarshal decodes the PictureLossIndication from binary
+func (p *PictureLossIndication) Unmarshal(rawPacket []byte) error {
+ if len(rawPacket) < (headerLength + (ssrcLength * 2)) {
+ return errPacketTooShort
+ }
+
+ var h Header
+ if err := h.Unmarshal(rawPacket); err != nil {
+ return err
+ }
+
+ if h.Type != TypePayloadSpecificFeedback || h.Count != FormatPLI {
+ return errWrongType
+ }
+
+ p.SenderSSRC = binary.BigEndian.Uint32(rawPacket[headerLength:])
+ p.MediaSSRC = binary.BigEndian.Uint32(rawPacket[headerLength+ssrcLength:])
+ return nil
+}
+
+// Header returns the Header associated with this packet.
+func (p *PictureLossIndication) Header() Header {
+ return Header{
+ Count: FormatPLI,
+ Type: TypePayloadSpecificFeedback,
+ Length: pliLength,
+ }
+}
+
+func (p *PictureLossIndication) len() int {
+ return headerLength + ssrcLength*2
+}
+
+func (p *PictureLossIndication) String() string {
+ return fmt.Sprintf("PictureLossIndication %x %x", p.SenderSSRC, p.MediaSSRC)
+}
+
+// DestinationSSRC returns an array of SSRC values that this packet refers to.
+func (p *PictureLossIndication) DestinationSSRC() []uint32 {
+ return []uint32{p.MediaSSRC}
+}
diff --git a/vendor/github.com/pion/rtcp/rapid_resynchronization_request.go b/vendor/github.com/pion/rtcp/rapid_resynchronization_request.go
new file mode 100644
index 0000000..5d27055
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/rapid_resynchronization_request.go
@@ -0,0 +1,88 @@
+package rtcp
+
+import (
+ "encoding/binary"
+ "fmt"
+)
+
+// The RapidResynchronizationRequest packet informs the encoder about the loss of an undefined amount of coded video data belonging to one or more pictures
+type RapidResynchronizationRequest struct {
+ // SSRC of sender
+ SenderSSRC uint32
+
+ // SSRC of the media source
+ MediaSSRC uint32
+}
+
+var _ Packet = (*RapidResynchronizationRequest)(nil) // assert is a Packet
+
+const (
+ rrrLength = 2
+ rrrHeaderLength = ssrcLength * 2
+ rrrMediaOffset = 4
+)
+
+// Marshal encodes the RapidResynchronizationRequest in binary
+func (p RapidResynchronizationRequest) Marshal() ([]byte, error) {
+ /*
+ * RRR does not require parameters. Therefore, the length field MUST be
+ * 2, and there MUST NOT be any Feedback Control Information.
+ *
+ * The semantics of this FB message is independent of the payload type.
+ */
+ rawPacket := make([]byte, p.len())
+ packetBody := rawPacket[headerLength:]
+
+ binary.BigEndian.PutUint32(packetBody, p.SenderSSRC)
+ binary.BigEndian.PutUint32(packetBody[rrrMediaOffset:], p.MediaSSRC)
+
+ hData, err := p.Header().Marshal()
+ if err != nil {
+ return nil, err
+ }
+ copy(rawPacket, hData)
+
+ return rawPacket, nil
+}
+
+// Unmarshal decodes the RapidResynchronizationRequest from binary
+func (p *RapidResynchronizationRequest) Unmarshal(rawPacket []byte) error {
+ if len(rawPacket) < (headerLength + (ssrcLength * 2)) {
+ return errPacketTooShort
+ }
+
+ var h Header
+ if err := h.Unmarshal(rawPacket); err != nil {
+ return err
+ }
+
+ if h.Type != TypeTransportSpecificFeedback || h.Count != FormatRRR {
+ return errWrongType
+ }
+
+ p.SenderSSRC = binary.BigEndian.Uint32(rawPacket[headerLength:])
+ p.MediaSSRC = binary.BigEndian.Uint32(rawPacket[headerLength+ssrcLength:])
+ return nil
+}
+
+func (p *RapidResynchronizationRequest) len() int {
+ return headerLength + rrrHeaderLength
+}
+
+// Header returns the Header associated with this packet.
+func (p *RapidResynchronizationRequest) Header() Header {
+ return Header{
+ Count: FormatRRR,
+ Type: TypeTransportSpecificFeedback,
+ Length: rrrLength,
+ }
+}
+
+// DestinationSSRC returns an array of SSRC values that this packet refers to.
+func (p *RapidResynchronizationRequest) DestinationSSRC() []uint32 {
+ return []uint32{p.MediaSSRC}
+}
+
+func (p *RapidResynchronizationRequest) String() string {
+ return fmt.Sprintf("RapidResynchronizationRequest %x %x", p.SenderSSRC, p.MediaSSRC)
+}
diff --git a/vendor/github.com/pion/rtcp/raw_packet.go b/vendor/github.com/pion/rtcp/raw_packet.go
new file mode 100644
index 0000000..3cb6eaf
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/raw_packet.go
@@ -0,0 +1,44 @@
+package rtcp
+
+import "fmt"
+
+// RawPacket represents an unparsed RTCP packet. It's returned by Unmarshal when
+// a packet with an unknown type is encountered.
+type RawPacket []byte
+
+var _ Packet = (*RawPacket)(nil) // assert is a Packet
+
+// Marshal encodes the packet in binary.
+func (r RawPacket) Marshal() ([]byte, error) {
+ return r, nil
+}
+
+// Unmarshal decodes the packet from binary.
+func (r *RawPacket) Unmarshal(b []byte) error {
+ if len(b) < (headerLength) {
+ return errPacketTooShort
+ }
+ *r = b
+
+ var h Header
+ return h.Unmarshal(b)
+}
+
+// Header returns the Header associated with this packet.
+func (r RawPacket) Header() Header {
+ var h Header
+ if err := h.Unmarshal(r); err != nil {
+ return Header{}
+ }
+ return h
+}
+
+// DestinationSSRC returns an array of SSRC values that this packet refers to.
+func (r *RawPacket) DestinationSSRC() []uint32 {
+ return []uint32{}
+}
+
+func (r RawPacket) String() string {
+ out := fmt.Sprintf("RawPacket: %v", ([]byte)(r))
+ return out
+}
diff --git a/vendor/github.com/pion/rtcp/receiver_estimated_maximum_bitrate.go b/vendor/github.com/pion/rtcp/receiver_estimated_maximum_bitrate.go
new file mode 100644
index 0000000..d37f49e
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/receiver_estimated_maximum_bitrate.go
@@ -0,0 +1,284 @@
+package rtcp
+
+import (
+ "bytes"
+ "encoding/binary"
+ "fmt"
+ "math/bits"
+)
+
+// ReceiverEstimatedMaximumBitrate contains the receiver's estimated maximum bitrate.
+// see: https://tools.ietf.org/html/draft-alvestrand-rmcat-remb-03
+type ReceiverEstimatedMaximumBitrate struct {
+ // SSRC of sender
+ SenderSSRC uint32
+
+ // Estimated maximum bitrate
+ Bitrate uint64
+
+ // SSRC entries which this packet applies to
+ SSRCs []uint32
+}
+
+var _ Packet = (*ReceiverEstimatedMaximumBitrate)(nil) // assert is a Packet
+
+// Marshal serializes the packet and returns a byte slice.
+func (p ReceiverEstimatedMaximumBitrate) Marshal() (buf []byte, err error) {
+ // Allocate a buffer of the exact output size.
+ buf = make([]byte, p.MarshalSize())
+
+ // Write to our buffer.
+ n, err := p.MarshalTo(buf)
+ if err != nil {
+ return nil, err
+ }
+
+ // This will always be true but just to be safe.
+ if n != len(buf) {
+ return nil, errWrongMarshalSize
+ }
+
+ return buf, nil
+}
+
+// MarshalSize returns the size of the packet when marshaled.
+// This can be used in conjunction with `MarshalTo` to avoid allocations.
+func (p ReceiverEstimatedMaximumBitrate) MarshalSize() (n int) {
+ return 20 + 4*len(p.SSRCs)
+}
+
+// MarshalTo serializes the packet to the given byte slice.
+func (p ReceiverEstimatedMaximumBitrate) MarshalTo(buf []byte) (n int, err error) {
+ /*
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ |V=2|P| FMT=15 | PT=206 | length |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | SSRC of packet sender |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | SSRC of media source |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Unique identifier 'R' 'E' 'M' 'B' |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Num SSRC | BR Exp | BR Mantissa |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | SSRC feedback |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | ... |
+ */
+
+ size := p.MarshalSize()
+ if len(buf) < size {
+ return 0, errPacketTooShort
+ }
+
+ buf[0] = 143 // v=2, p=0, fmt=15
+ buf[1] = 206
+
+ // Length of this packet in 32-bit words minus one.
+ length := uint16((p.MarshalSize() / 4) - 1)
+ binary.BigEndian.PutUint16(buf[2:4], length)
+
+ binary.BigEndian.PutUint32(buf[4:8], p.SenderSSRC)
+ binary.BigEndian.PutUint32(buf[8:12], 0) // always zero
+
+ // ALL HAIL REMB
+ buf[12] = 'R'
+ buf[13] = 'E'
+ buf[14] = 'M'
+ buf[15] = 'B'
+
+ // Write the length of the ssrcs to follow at the end
+ buf[16] = byte(len(p.SSRCs))
+
+ // We can only encode 18 bits of information in the mantissa.
+ // The exponent lets us shift to the left up to 64 places (6-bits).
+ // We actually need a uint82 to encode the largest possible number,
+ // but uint64 should be good enough for 2.3 exabytes per second.
+
+ // So we need to truncate the bitrate and use the exponent for the shift.
+ // bitrate = mantissa * (1 << exp)
+
+ // Calculate the total shift based on the leading number of zeroes.
+ // This will be negative if there is no shift required.
+ shift := uint(64 - bits.LeadingZeros64(p.Bitrate))
+
+ var mantissa uint
+ var exp uint
+
+ if shift <= 18 {
+ // Fit everything in the mantissa because we can.
+ mantissa = uint(p.Bitrate)
+ exp = 0
+ } else {
+ // We can only use 18 bits of precision, so truncate.
+ mantissa = uint(p.Bitrate >> (shift - 18))
+ exp = shift - 18
+ }
+
+ // We can't quite use the binary package because
+ // a) it's a uint24 and b) the exponent is only 6-bits
+ // Just trust me; this is big-endian encoding.
+ buf[17] = byte((exp << 2) | (mantissa >> 16))
+ buf[18] = byte(mantissa >> 8)
+ buf[19] = byte(mantissa)
+
+ // Write the SSRCs at the very end.
+ n = 20
+ for _, ssrc := range p.SSRCs {
+ binary.BigEndian.PutUint32(buf[n:n+4], ssrc)
+ n += 4
+ }
+
+ return n, nil
+}
+
+// Unmarshal reads a REMB packet from the given byte slice.
+func (p *ReceiverEstimatedMaximumBitrate) Unmarshal(buf []byte) (err error) {
+ /*
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ |V=2|P| FMT=15 | PT=206 | length |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | SSRC of packet sender |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | SSRC of media source |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Unique identifier 'R' 'E' 'M' 'B' |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Num SSRC | BR Exp | BR Mantissa |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | SSRC feedback |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | ... |
+ */
+
+ // 20 bytes is the size of the packet with no SSRCs
+ if len(buf) < 20 {
+ return errPacketTooShort
+ }
+
+ // version must be 2
+ version := buf[0] >> 6
+ if version != 2 {
+ return fmt.Errorf("%w expected(2) actual(%d)", errBadVersion, version)
+ }
+
+ // padding must be unset
+ padding := (buf[0] >> 5) & 1
+ if padding != 0 {
+ return fmt.Errorf("%w expected(0) actual(%d)", errWrongPadding, padding)
+ }
+
+ // fmt must be 15
+ fmtVal := buf[0] & 31
+ if fmtVal != 15 {
+ return fmt.Errorf("%w expected(15) actual(%d)", errWrongFeedbackType, fmtVal)
+ }
+
+ // Must be payload specific feedback
+ if buf[1] != 206 {
+ return fmt.Errorf("%w expected(206) actual(%d)", errWrongPayloadType, buf[1])
+ }
+
+ // length is the number of 32-bit words, minus 1
+ length := binary.BigEndian.Uint16(buf[2:4])
+ size := int((length + 1) * 4)
+
+ // There's not way this could be legit
+ if size < 20 {
+ return errHeaderTooSmall
+ }
+
+ // Make sure the buffer is large enough.
+ if len(buf) < size {
+ return errPacketTooShort
+ }
+
+ // The sender SSRC is 32-bits
+ p.SenderSSRC = binary.BigEndian.Uint32(buf[4:8])
+
+ // The destination SSRC must be 0
+ media := binary.BigEndian.Uint32(buf[8:12])
+ if media != 0 {
+ return errSSRCMustBeZero
+ }
+
+ // REMB rules all around me
+ if !bytes.Equal(buf[12:16], []byte{'R', 'E', 'M', 'B'}) {
+ return errMissingREMBidentifier
+ }
+
+ // The next byte is the number of SSRC entries at the end.
+ num := int(buf[16])
+
+ // Now we know the expected size, make sure they match.
+ if size != 20+4*num {
+ return errSSRCNumAndLengthMismatch
+ }
+
+ // Get the 6-bit exponent value.
+ exp := buf[17] >> 2
+
+ // The remaining 2-bits plus the next 16-bits are the mantissa.
+ mantissa := uint64(buf[17]&3)<<16 | uint64(buf[18])<<8 | uint64(buf[19])
+
+ // bitrate = mantissa * 2^exp
+
+ if exp > 46 {
+ // NOTE: We intentionally truncate values so they fit in a uint64.
+ // Otherwise we would need a uint82.
+ // This is 2.3 exabytes per second, which should be good enough.
+ p.Bitrate = ^uint64(0)
+ } else {
+ p.Bitrate = mantissa << exp
+ }
+
+ // Clear any existing SSRCs
+ p.SSRCs = nil
+
+ // Loop over and parse the SSRC entires at the end.
+ // We already verified that size == num * 4
+ for n := 20; n < size; n += 4 {
+ ssrc := binary.BigEndian.Uint32(buf[n : n+4])
+ p.SSRCs = append(p.SSRCs, ssrc)
+ }
+
+ return nil
+}
+
+// Header returns the Header associated with this packet.
+func (p *ReceiverEstimatedMaximumBitrate) Header() Header {
+ return Header{
+ Count: FormatREMB,
+ Type: TypePayloadSpecificFeedback,
+ Length: uint16((p.MarshalSize() / 4) - 1),
+ }
+}
+
+// String prints the REMB packet in a human-readable format.
+func (p *ReceiverEstimatedMaximumBitrate) String() string {
+ // Keep a table of powers to units for fast conversion.
+ bitUnits := []string{"b", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb"}
+
+ // Do some unit conversions because b/s is far too difficult to read.
+ bitrate := float64(p.Bitrate)
+ powers := 0
+
+ // Keep dividing the bitrate until it's under 1000
+ for bitrate >= 1000.0 && powers < len(bitUnits) {
+ bitrate /= 1000.0
+ powers++
+ }
+
+ unit := bitUnits[powers]
+
+ return fmt.Sprintf("ReceiverEstimatedMaximumBitrate %x %.2f %s/s", p.SenderSSRC, bitrate, unit)
+}
+
+// DestinationSSRC returns an array of SSRC values that this packet refers to.
+func (p *ReceiverEstimatedMaximumBitrate) DestinationSSRC() []uint32 {
+ return p.SSRCs
+}
diff --git a/vendor/github.com/pion/rtcp/receiver_report.go b/vendor/github.com/pion/rtcp/receiver_report.go
new file mode 100644
index 0000000..cf28d39
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/receiver_report.go
@@ -0,0 +1,193 @@
+package rtcp
+
+import (
+ "encoding/binary"
+ "fmt"
+)
+
+// A ReceiverReport (RR) packet provides reception quality feedback for an RTP stream
+type ReceiverReport struct {
+ // The synchronization source identifier for the originator of this RR packet.
+ SSRC uint32
+ // Zero or more reception report blocks depending on the number of other
+ // sources heard by this sender since the last report. Each reception report
+ // block conveys statistics on the reception of RTP packets from a
+ // single synchronization source.
+ Reports []ReceptionReport
+ // Extension contains additional, payload-specific information that needs to
+ // be reported regularly about the receiver.
+ ProfileExtensions []byte
+}
+
+var _ Packet = (*ReceiverReport)(nil) // assert is a Packet
+
+const (
+ ssrcLength = 4
+ rrSSRCOffset = headerLength
+ rrReportOffset = rrSSRCOffset + ssrcLength
+)
+
+// Marshal encodes the ReceiverReport in binary
+func (r ReceiverReport) Marshal() ([]byte, error) {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * header |V=2|P| RC | PT=RR=201 | length |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | SSRC of packet sender |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * report | SSRC_1 (SSRC of first source) |
+ * block +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * 1 | fraction lost | cumulative number of packets lost |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | extended highest sequence number received |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | interarrival jitter |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | last SR (LSR) |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | delay since last SR (DLSR) |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * report | SSRC_2 (SSRC of second source) |
+ * block +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * 2 : ... :
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * | profile-specific extensions |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+ rawPacket := make([]byte, r.len())
+ packetBody := rawPacket[headerLength:]
+
+ binary.BigEndian.PutUint32(packetBody, r.SSRC)
+
+ for i, rp := range r.Reports {
+ data, err := rp.Marshal()
+ if err != nil {
+ return nil, err
+ }
+ offset := ssrcLength + receptionReportLength*i
+ copy(packetBody[offset:], data)
+ }
+
+ if len(r.Reports) > countMax {
+ return nil, errTooManyReports
+ }
+
+ pe := make([]byte, len(r.ProfileExtensions))
+ copy(pe, r.ProfileExtensions)
+
+ // if the length of the profile extensions isn't devisible
+ // by 4, we need to pad the end.
+ for (len(pe) & 0x3) != 0 {
+ pe = append(pe, 0)
+ }
+
+ rawPacket = append(rawPacket, pe...)
+
+ hData, err := r.Header().Marshal()
+ if err != nil {
+ return nil, err
+ }
+ copy(rawPacket, hData)
+
+ return rawPacket, nil
+}
+
+// Unmarshal decodes the ReceiverReport from binary
+func (r *ReceiverReport) Unmarshal(rawPacket []byte) error {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * header |V=2|P| RC | PT=RR=201 | length |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | SSRC of packet sender |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * report | SSRC_1 (SSRC of first source) |
+ * block +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * 1 | fraction lost | cumulative number of packets lost |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | extended highest sequence number received |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | interarrival jitter |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | last SR (LSR) |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | delay since last SR (DLSR) |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * report | SSRC_2 (SSRC of second source) |
+ * block +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * 2 : ... :
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * | profile-specific extensions |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+ if len(rawPacket) < (headerLength + ssrcLength) {
+ return errPacketTooShort
+ }
+
+ var h Header
+ if err := h.Unmarshal(rawPacket); err != nil {
+ return err
+ }
+
+ if h.Type != TypeReceiverReport {
+ return errWrongType
+ }
+
+ r.SSRC = binary.BigEndian.Uint32(rawPacket[rrSSRCOffset:])
+
+ for i := rrReportOffset; i < len(rawPacket) && len(r.Reports) < int(h.Count); i += receptionReportLength {
+ var rr ReceptionReport
+ if err := rr.Unmarshal(rawPacket[i:]); err != nil {
+ return err
+ }
+ r.Reports = append(r.Reports, rr)
+ }
+ r.ProfileExtensions = rawPacket[rrReportOffset+(len(r.Reports)*receptionReportLength):]
+
+ if uint8(len(r.Reports)) != h.Count {
+ return errInvalidHeader
+ }
+
+ return nil
+}
+
+func (r *ReceiverReport) len() int {
+ repsLength := 0
+ for _, rep := range r.Reports {
+ repsLength += rep.len()
+ }
+ return headerLength + ssrcLength + repsLength
+}
+
+// Header returns the Header associated with this packet.
+func (r *ReceiverReport) Header() Header {
+ return Header{
+ Count: uint8(len(r.Reports)),
+ Type: TypeReceiverReport,
+ Length: uint16((r.len()/4)-1) + uint16(getPadding(len(r.ProfileExtensions))),
+ }
+}
+
+// DestinationSSRC returns an array of SSRC values that this packet refers to.
+func (r *ReceiverReport) DestinationSSRC() []uint32 {
+ out := make([]uint32, len(r.Reports))
+ for i, v := range r.Reports {
+ out[i] = v.SSRC
+ }
+ return out
+}
+
+func (r ReceiverReport) String() string {
+ out := fmt.Sprintf("ReceiverReport from %x\n", r.SSRC)
+ out += "\tSSRC \tLost\tLastSequence\n"
+ for _, i := range r.Reports {
+ out += fmt.Sprintf("\t%x\t%d/%d\t%d\n", i.SSRC, i.FractionLost, i.TotalLost, i.LastSequenceNumber)
+ }
+ out += fmt.Sprintf("\tProfile Extension Data: %v\n", r.ProfileExtensions)
+ return out
+}
diff --git a/vendor/github.com/pion/rtcp/reception_report.go b/vendor/github.com/pion/rtcp/reception_report.go
new file mode 100644
index 0000000..5bff8f2
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/reception_report.go
@@ -0,0 +1,130 @@
+package rtcp
+
+import "encoding/binary"
+
+// A ReceptionReport block conveys statistics on the reception of RTP packets
+// from a single synchronization source.
+type ReceptionReport struct {
+ // The SSRC identifier of the source to which the information in this
+ // reception report block pertains.
+ SSRC uint32
+ // The fraction of RTP data packets from source SSRC lost since the
+ // previous SR or RR packet was sent, expressed as a fixed point
+ // number with the binary point at the left edge of the field.
+ FractionLost uint8
+ // The total number of RTP data packets from source SSRC that have
+ // been lost since the beginning of reception.
+ TotalLost uint32
+ // The low 16 bits contain the highest sequence number received in an
+ // RTP data packet from source SSRC, and the most significant 16
+ // bits extend that sequence number with the corresponding count of
+ // sequence number cycles.
+ LastSequenceNumber uint32
+ // An estimate of the statistical variance of the RTP data packet
+ // interarrival time, measured in timestamp units and expressed as an
+ // unsigned integer.
+ Jitter uint32
+ // The middle 32 bits out of 64 in the NTP timestamp received as part of
+ // the most recent RTCP sender report (SR) packet from source SSRC. If no
+ // SR has been received yet, the field is set to zero.
+ LastSenderReport uint32
+ // The delay, expressed in units of 1/65536 seconds, between receiving the
+ // last SR packet from source SSRC and sending this reception report block.
+ // If no SR packet has been received yet from SSRC, the field is set to zero.
+ Delay uint32
+}
+
+const (
+ receptionReportLength = 24
+ fractionLostOffset = 4
+ totalLostOffset = 5
+ lastSeqOffset = 8
+ jitterOffset = 12
+ lastSROffset = 16
+ delayOffset = 20
+)
+
+// Marshal encodes the ReceptionReport in binary
+func (r ReceptionReport) Marshal() ([]byte, error) {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * | SSRC |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | fraction lost | cumulative number of packets lost |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | extended highest sequence number received |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | interarrival jitter |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | last SR (LSR) |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | delay since last SR (DLSR) |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ */
+
+ rawPacket := make([]byte, receptionReportLength)
+
+ binary.BigEndian.PutUint32(rawPacket, r.SSRC)
+
+ rawPacket[fractionLostOffset] = r.FractionLost
+
+ // pack TotalLost into 24 bits
+ if r.TotalLost >= (1 << 25) {
+ return nil, errInvalidTotalLost
+ }
+ tlBytes := rawPacket[totalLostOffset:]
+ tlBytes[0] = byte(r.TotalLost >> 16)
+ tlBytes[1] = byte(r.TotalLost >> 8)
+ tlBytes[2] = byte(r.TotalLost)
+
+ binary.BigEndian.PutUint32(rawPacket[lastSeqOffset:], r.LastSequenceNumber)
+ binary.BigEndian.PutUint32(rawPacket[jitterOffset:], r.Jitter)
+ binary.BigEndian.PutUint32(rawPacket[lastSROffset:], r.LastSenderReport)
+ binary.BigEndian.PutUint32(rawPacket[delayOffset:], r.Delay)
+
+ return rawPacket, nil
+}
+
+// Unmarshal decodes the ReceptionReport from binary
+func (r *ReceptionReport) Unmarshal(rawPacket []byte) error {
+ if len(rawPacket) < receptionReportLength {
+ return errPacketTooShort
+ }
+
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * | SSRC |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | fraction lost | cumulative number of packets lost |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | extended highest sequence number received |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | interarrival jitter |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | last SR (LSR) |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | delay since last SR (DLSR) |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ */
+
+ r.SSRC = binary.BigEndian.Uint32(rawPacket)
+ r.FractionLost = rawPacket[fractionLostOffset]
+
+ tlBytes := rawPacket[totalLostOffset:]
+ r.TotalLost = uint32(tlBytes[2]) | uint32(tlBytes[1])<<8 | uint32(tlBytes[0])<<16
+
+ r.LastSequenceNumber = binary.BigEndian.Uint32(rawPacket[lastSeqOffset:])
+ r.Jitter = binary.BigEndian.Uint32(rawPacket[jitterOffset:])
+ r.LastSenderReport = binary.BigEndian.Uint32(rawPacket[lastSROffset:])
+ r.Delay = binary.BigEndian.Uint32(rawPacket[delayOffset:])
+
+ return nil
+}
+
+func (r *ReceptionReport) len() int {
+ return receptionReportLength
+}
diff --git a/vendor/github.com/pion/rtcp/renovate.json b/vendor/github.com/pion/rtcp/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/rtcp/sender_report.go b/vendor/github.com/pion/rtcp/sender_report.go
new file mode 100644
index 0000000..1b16380
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/sender_report.go
@@ -0,0 +1,260 @@
+package rtcp
+
+import (
+ "encoding/binary"
+ "fmt"
+)
+
+// A SenderReport (SR) packet provides reception quality feedback for an RTP stream
+type SenderReport struct {
+ // The synchronization source identifier for the originator of this SR packet.
+ SSRC uint32
+ // The wallclock time when this report was sent so that it may be used in
+ // combination with timestamps returned in reception reports from other
+ // receivers to measure round-trip propagation to those receivers.
+ NTPTime uint64
+ // Corresponds to the same time as the NTP timestamp (above), but in
+ // the same units and with the same random offset as the RTP
+ // timestamps in data packets. This correspondence may be used for
+ // intra- and inter-media synchronization for sources whose NTP
+ // timestamps are synchronized, and may be used by media-independent
+ // receivers to estimate the nominal RTP clock frequency.
+ RTPTime uint32
+ // The total number of RTP data packets transmitted by the sender
+ // since starting transmission up until the time this SR packet was
+ // generated.
+ PacketCount uint32
+ // The total number of payload octets (i.e., not including header or
+ // padding) transmitted in RTP data packets by the sender since
+ // starting transmission up until the time this SR packet was
+ // generated.
+ OctetCount uint32
+ // Zero or more reception report blocks depending on the number of other
+ // sources heard by this sender since the last report. Each reception report
+ // block conveys statistics on the reception of RTP packets from a
+ // single synchronization source.
+ Reports []ReceptionReport
+ // ProfileExtensions contains additional, payload-specific information that needs to
+ // be reported regularly about the sender.
+ ProfileExtensions []byte
+}
+
+var _ Packet = (*SenderReport)(nil) // assert is a Packet
+
+const (
+ srHeaderLength = 24
+ srSSRCOffset = 0
+ srNTPOffset = srSSRCOffset + ssrcLength
+ ntpTimeLength = 8
+ srRTPOffset = srNTPOffset + ntpTimeLength
+ rtpTimeLength = 4
+ srPacketCountOffset = srRTPOffset + rtpTimeLength
+ srPacketCountLength = 4
+ srOctetCountOffset = srPacketCountOffset + srPacketCountLength
+ srOctetCountLength = 4
+ srReportOffset = srOctetCountOffset + srOctetCountLength
+)
+
+// Marshal encodes the SenderReport in binary
+func (r SenderReport) Marshal() ([]byte, error) {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * header |V=2|P| RC | PT=SR=200 | length |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | SSRC of sender |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * sender | NTP timestamp, most significant word |
+ * info +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | NTP timestamp, least significant word |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | RTP timestamp |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | sender's packet count |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | sender's octet count |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * report | SSRC_1 (SSRC of first source) |
+ * block +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * 1 | fraction lost | cumulative number of packets lost |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | extended highest sequence number received |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | interarrival jitter |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | last SR (LSR) |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | delay since last SR (DLSR) |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * report | SSRC_2 (SSRC of second source) |
+ * block +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * 2 : ... :
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * | profile-specific extensions |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+ rawPacket := make([]byte, r.len())
+ packetBody := rawPacket[headerLength:]
+
+ binary.BigEndian.PutUint32(packetBody[srSSRCOffset:], r.SSRC)
+ binary.BigEndian.PutUint64(packetBody[srNTPOffset:], r.NTPTime)
+ binary.BigEndian.PutUint32(packetBody[srRTPOffset:], r.RTPTime)
+ binary.BigEndian.PutUint32(packetBody[srPacketCountOffset:], r.PacketCount)
+ binary.BigEndian.PutUint32(packetBody[srOctetCountOffset:], r.OctetCount)
+
+ offset := srHeaderLength
+ for _, rp := range r.Reports {
+ data, err := rp.Marshal()
+ if err != nil {
+ return nil, err
+ }
+ copy(packetBody[offset:], data)
+ offset += receptionReportLength
+ }
+
+ if len(r.Reports) > countMax {
+ return nil, errTooManyReports
+ }
+
+ copy(packetBody[offset:], r.ProfileExtensions)
+
+ hData, err := r.Header().Marshal()
+ if err != nil {
+ return nil, err
+ }
+ copy(rawPacket, hData)
+
+ return rawPacket, nil
+}
+
+// Unmarshal decodes the SenderReport from binary
+func (r *SenderReport) Unmarshal(rawPacket []byte) error {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * header |V=2|P| RC | PT=SR=200 | length |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | SSRC of sender |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * sender | NTP timestamp, most significant word |
+ * info +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | NTP timestamp, least significant word |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | RTP timestamp |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | sender's packet count |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | sender's octet count |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * report | SSRC_1 (SSRC of first source) |
+ * block +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * 1 | fraction lost | cumulative number of packets lost |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | extended highest sequence number received |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | interarrival jitter |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | last SR (LSR) |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | delay since last SR (DLSR) |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * report | SSRC_2 (SSRC of second source) |
+ * block +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * 2 : ... :
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * | profile-specific extensions |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+ if len(rawPacket) < (headerLength + srHeaderLength) {
+ return errPacketTooShort
+ }
+
+ var h Header
+ if err := h.Unmarshal(rawPacket); err != nil {
+ return err
+ }
+
+ if h.Type != TypeSenderReport {
+ return errWrongType
+ }
+
+ packetBody := rawPacket[headerLength:]
+
+ r.SSRC = binary.BigEndian.Uint32(packetBody[srSSRCOffset:])
+ r.NTPTime = binary.BigEndian.Uint64(packetBody[srNTPOffset:])
+ r.RTPTime = binary.BigEndian.Uint32(packetBody[srRTPOffset:])
+ r.PacketCount = binary.BigEndian.Uint32(packetBody[srPacketCountOffset:])
+ r.OctetCount = binary.BigEndian.Uint32(packetBody[srOctetCountOffset:])
+
+ offset := srReportOffset
+ for i := 0; i < int(h.Count); i++ {
+ rrEnd := offset + receptionReportLength
+ if rrEnd > len(packetBody) {
+ return errPacketTooShort
+ }
+ rrBody := packetBody[offset : offset+receptionReportLength]
+ offset = rrEnd
+
+ var rr ReceptionReport
+ if err := rr.Unmarshal(rrBody); err != nil {
+ return err
+ }
+ r.Reports = append(r.Reports, rr)
+ }
+
+ if offset < len(packetBody) {
+ r.ProfileExtensions = packetBody[offset:]
+ }
+
+ if uint8(len(r.Reports)) != h.Count {
+ return errInvalidHeader
+ }
+
+ return nil
+}
+
+// DestinationSSRC returns an array of SSRC values that this packet refers to.
+func (r *SenderReport) DestinationSSRC() []uint32 {
+ out := make([]uint32, len(r.Reports)+1)
+ for i, v := range r.Reports {
+ out[i] = v.SSRC
+ }
+ out[len(r.Reports)] = r.SSRC
+ return out
+}
+
+func (r *SenderReport) len() int {
+ repsLength := 0
+ for _, rep := range r.Reports {
+ repsLength += rep.len()
+ }
+ return headerLength + srHeaderLength + repsLength + len(r.ProfileExtensions)
+}
+
+// Header returns the Header associated with this packet.
+func (r *SenderReport) Header() Header {
+ return Header{
+ Count: uint8(len(r.Reports)),
+ Type: TypeSenderReport,
+ Length: uint16((r.len() / 4) - 1),
+ }
+}
+
+func (r SenderReport) String() string {
+ out := fmt.Sprintf("SenderReport from %x\n", r.SSRC)
+ out += fmt.Sprintf("\tNTPTime:\t%d\n", r.NTPTime)
+ out += fmt.Sprintf("\tRTPTIme:\t%d\n", r.RTPTime)
+ out += fmt.Sprintf("\tPacketCount:\t%d\n", r.PacketCount)
+ out += fmt.Sprintf("\tOctetCount:\t%d\n", r.OctetCount)
+
+ out += "\tSSRC \tLost\tLastSequence\n"
+ for _, i := range r.Reports {
+ out += fmt.Sprintf("\t%x\t%d/%d\t%d\n", i.SSRC, i.FractionLost, i.TotalLost, i.LastSequenceNumber)
+ }
+ out += fmt.Sprintf("\tProfile Extension Data: %v\n", r.ProfileExtensions)
+ return out
+}
diff --git a/vendor/github.com/pion/rtcp/slice_loss_indication.go b/vendor/github.com/pion/rtcp/slice_loss_indication.go
new file mode 100644
index 0000000..7689309
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/slice_loss_indication.go
@@ -0,0 +1,115 @@
+package rtcp
+
+import (
+ "encoding/binary"
+ "fmt"
+ "math"
+)
+
+// SLIEntry represents a single entry to the SLI packet's
+// list of lost slices.
+type SLIEntry struct {
+ // ID of first lost slice
+ First uint16
+
+ // Number of lost slices
+ Number uint16
+
+ // ID of related picture
+ Picture uint8
+}
+
+// The SliceLossIndication packet informs the encoder about the loss of a picture slice
+type SliceLossIndication struct {
+ // SSRC of sender
+ SenderSSRC uint32
+
+ // SSRC of the media source
+ MediaSSRC uint32
+
+ SLI []SLIEntry
+}
+
+var _ Packet = (*SliceLossIndication)(nil) // assert is a Packet
+
+const (
+ sliLength = 2
+ sliOffset = 8
+)
+
+// Marshal encodes the SliceLossIndication in binary
+func (p SliceLossIndication) Marshal() ([]byte, error) {
+ if len(p.SLI)+sliLength > math.MaxUint8 {
+ return nil, errTooManyReports
+ }
+
+ rawPacket := make([]byte, sliOffset+(len(p.SLI)*4))
+ binary.BigEndian.PutUint32(rawPacket, p.SenderSSRC)
+ binary.BigEndian.PutUint32(rawPacket[4:], p.MediaSSRC)
+ for i, s := range p.SLI {
+ sli := ((uint32(s.First) & 0x1FFF) << 19) |
+ ((uint32(s.Number) & 0x1FFF) << 6) |
+ (uint32(s.Picture) & 0x3F)
+ binary.BigEndian.PutUint32(rawPacket[sliOffset+(4*i):], sli)
+ }
+ hData, err := p.Header().Marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ return append(hData, rawPacket...), nil
+}
+
+// Unmarshal decodes the SliceLossIndication from binary
+func (p *SliceLossIndication) Unmarshal(rawPacket []byte) error {
+ if len(rawPacket) < (headerLength + ssrcLength) {
+ return errPacketTooShort
+ }
+
+ var h Header
+ if err := h.Unmarshal(rawPacket); err != nil {
+ return err
+ }
+
+ if len(rawPacket) < (headerLength + int(4*h.Length)) {
+ return errPacketTooShort
+ }
+
+ if h.Type != TypeTransportSpecificFeedback || h.Count != FormatSLI {
+ return errWrongType
+ }
+
+ p.SenderSSRC = binary.BigEndian.Uint32(rawPacket[headerLength:])
+ p.MediaSSRC = binary.BigEndian.Uint32(rawPacket[headerLength+ssrcLength:])
+ for i := headerLength + sliOffset; i < (headerLength + int(h.Length*4)); i += 4 {
+ sli := binary.BigEndian.Uint32(rawPacket[i:])
+ p.SLI = append(p.SLI, SLIEntry{
+ First: uint16((sli >> 19) & 0x1FFF),
+ Number: uint16((sli >> 6) & 0x1FFF),
+ Picture: uint8(sli & 0x3F),
+ })
+ }
+ return nil
+}
+
+func (p *SliceLossIndication) len() int {
+ return headerLength + sliOffset + (len(p.SLI) * 4)
+}
+
+// Header returns the Header associated with this packet.
+func (p *SliceLossIndication) Header() Header {
+ return Header{
+ Count: FormatSLI,
+ Type: TypeTransportSpecificFeedback,
+ Length: uint16((p.len() / 4) - 1),
+ }
+}
+
+func (p *SliceLossIndication) String() string {
+ return fmt.Sprintf("SliceLossIndication %x %x %+v", p.SenderSSRC, p.MediaSSRC, p.SLI)
+}
+
+// DestinationSSRC returns an array of SSRC values that this packet refers to.
+func (p *SliceLossIndication) DestinationSSRC() []uint32 {
+ return []uint32{p.MediaSSRC}
+}
diff --git a/vendor/github.com/pion/rtcp/source_description.go b/vendor/github.com/pion/rtcp/source_description.go
new file mode 100644
index 0000000..4306b66
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/source_description.go
@@ -0,0 +1,352 @@
+package rtcp
+
+import (
+ "encoding/binary"
+ "fmt"
+)
+
+// SDESType is the item type used in the RTCP SDES control packet.
+type SDESType uint8
+
+// RTP SDES item types registered with IANA. See: https://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-5
+const (
+ SDESEnd SDESType = iota // end of SDES list RFC 3550, 6.5
+ SDESCNAME // canonical name RFC 3550, 6.5.1
+ SDESName // user name RFC 3550, 6.5.2
+ SDESEmail // user's electronic mail address RFC 3550, 6.5.3
+ SDESPhone // user's phone number RFC 3550, 6.5.4
+ SDESLocation // geographic user location RFC 3550, 6.5.5
+ SDESTool // name of application or tool RFC 3550, 6.5.6
+ SDESNote // notice about the source RFC 3550, 6.5.7
+ SDESPrivate // private extensions RFC 3550, 6.5.8 (not implemented)
+)
+
+func (s SDESType) String() string {
+ switch s {
+ case SDESEnd:
+ return "END"
+ case SDESCNAME:
+ return "CNAME"
+ case SDESName:
+ return "NAME"
+ case SDESEmail:
+ return "EMAIL"
+ case SDESPhone:
+ return "PHONE"
+ case SDESLocation:
+ return "LOC"
+ case SDESTool:
+ return "TOOL"
+ case SDESNote:
+ return "NOTE"
+ case SDESPrivate:
+ return "PRIV"
+ default:
+ return string(s)
+ }
+}
+
+const (
+ sdesSourceLen = 4
+ sdesTypeLen = 1
+ sdesTypeOffset = 0
+ sdesOctetCountLen = 1
+ sdesOctetCountOffset = 1
+ sdesMaxOctetCount = (1 << 8) - 1
+ sdesTextOffset = 2
+)
+
+// A SourceDescription (SDES) packet describes the sources in an RTP stream.
+type SourceDescription struct {
+ Chunks []SourceDescriptionChunk
+}
+
+var _ Packet = (*SourceDescription)(nil) // assert is a Packet
+
+// Marshal encodes the SourceDescription in binary
+func (s SourceDescription) Marshal() ([]byte, error) {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * header |V=2|P| SC | PT=SDES=202 | length |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * chunk | SSRC/CSRC_1 |
+ * 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | SDES items |
+ * | ... |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * chunk | SSRC/CSRC_2 |
+ * 2 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | SDES items |
+ * | ... |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ */
+
+ rawPacket := make([]byte, s.len())
+ packetBody := rawPacket[headerLength:]
+
+ chunkOffset := 0
+ for _, c := range s.Chunks {
+ data, err := c.Marshal()
+ if err != nil {
+ return nil, err
+ }
+ copy(packetBody[chunkOffset:], data)
+ chunkOffset += len(data)
+ }
+
+ if len(s.Chunks) > countMax {
+ return nil, errTooManyChunks
+ }
+
+ hData, err := s.Header().Marshal()
+ if err != nil {
+ return nil, err
+ }
+ copy(rawPacket, hData)
+
+ return rawPacket, nil
+}
+
+// Unmarshal decodes the SourceDescription from binary
+func (s *SourceDescription) Unmarshal(rawPacket []byte) error {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * header |V=2|P| SC | PT=SDES=202 | length |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * chunk | SSRC/CSRC_1 |
+ * 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | SDES items |
+ * | ... |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * chunk | SSRC/CSRC_2 |
+ * 2 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | SDES items |
+ * | ... |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ */
+
+ var h Header
+ if err := h.Unmarshal(rawPacket); err != nil {
+ return err
+ }
+
+ if h.Type != TypeSourceDescription {
+ return errWrongType
+ }
+
+ for i := headerLength; i < len(rawPacket); {
+ var chunk SourceDescriptionChunk
+ if err := chunk.Unmarshal(rawPacket[i:]); err != nil {
+ return err
+ }
+ s.Chunks = append(s.Chunks, chunk)
+
+ i += chunk.len()
+ }
+
+ if len(s.Chunks) != int(h.Count) {
+ return errInvalidHeader
+ }
+
+ return nil
+}
+
+func (s *SourceDescription) len() int {
+ chunksLength := 0
+ for _, c := range s.Chunks {
+ chunksLength += c.len()
+ }
+ return headerLength + chunksLength
+}
+
+// Header returns the Header associated with this packet.
+func (s *SourceDescription) Header() Header {
+ return Header{
+ Count: uint8(len(s.Chunks)),
+ Type: TypeSourceDescription,
+ Length: uint16((s.len() / 4) - 1),
+ }
+}
+
+// A SourceDescriptionChunk contains items describing a single RTP source
+type SourceDescriptionChunk struct {
+ // The source (ssrc) or contributing source (csrc) identifier this packet describes
+ Source uint32
+ Items []SourceDescriptionItem
+}
+
+// Marshal encodes the SourceDescriptionChunk in binary
+func (s SourceDescriptionChunk) Marshal() ([]byte, error) {
+ /*
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * | SSRC/CSRC_1 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | SDES items |
+ * | ... |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ */
+
+ rawPacket := make([]byte, sdesSourceLen)
+ binary.BigEndian.PutUint32(rawPacket, s.Source)
+
+ for _, it := range s.Items {
+ data, err := it.Marshal()
+ if err != nil {
+ return nil, err
+ }
+ rawPacket = append(rawPacket, data...)
+ }
+
+ // The list of items in each chunk MUST be terminated by one or more null octets
+ rawPacket = append(rawPacket, uint8(SDESEnd))
+
+ // additional null octets MUST be included if needed to pad until the next 32-bit boundary
+ rawPacket = append(rawPacket, make([]byte, getPadding(len(rawPacket)))...)
+
+ return rawPacket, nil
+}
+
+// Unmarshal decodes the SourceDescriptionChunk from binary
+func (s *SourceDescriptionChunk) Unmarshal(rawPacket []byte) error {
+ /*
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * | SSRC/CSRC_1 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | SDES items |
+ * | ... |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ */
+
+ if len(rawPacket) < (sdesSourceLen + sdesTypeLen) {
+ return errPacketTooShort
+ }
+
+ s.Source = binary.BigEndian.Uint32(rawPacket)
+
+ for i := 4; i < len(rawPacket); {
+ if pktType := SDESType(rawPacket[i]); pktType == SDESEnd {
+ return nil
+ }
+
+ var it SourceDescriptionItem
+ if err := it.Unmarshal(rawPacket[i:]); err != nil {
+ return err
+ }
+ s.Items = append(s.Items, it)
+ i += it.len()
+ }
+
+ return errPacketTooShort
+}
+
+func (s SourceDescriptionChunk) len() int {
+ len := sdesSourceLen
+ for _, it := range s.Items {
+ len += it.len()
+ }
+ len += sdesTypeLen // for terminating null octet
+
+ // align to 32-bit boundary
+ len += getPadding(len)
+
+ return len
+}
+
+// A SourceDescriptionItem is a part of a SourceDescription that describes a stream.
+type SourceDescriptionItem struct {
+ // The type identifier for this item. eg, SDESCNAME for canonical name description.
+ //
+ // Type zero or SDESEnd is interpreted as the end of an item list and cannot be used.
+ Type SDESType
+ // Text is a unicode text blob associated with the item. Its meaning varies based on the item's Type.
+ Text string
+}
+
+func (s SourceDescriptionItem) len() int {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | CNAME=1 | length | user and domain name ...
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+ return sdesTypeLen + sdesOctetCountLen + len([]byte(s.Text))
+}
+
+// Marshal encodes the SourceDescriptionItem in binary
+func (s SourceDescriptionItem) Marshal() ([]byte, error) {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | CNAME=1 | length | user and domain name ...
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+ if s.Type == SDESEnd {
+ return nil, errSDESMissingType
+ }
+
+ rawPacket := make([]byte, sdesTypeLen+sdesOctetCountLen)
+
+ rawPacket[sdesTypeOffset] = uint8(s.Type)
+
+ txtBytes := []byte(s.Text)
+ octetCount := len(txtBytes)
+ if octetCount > sdesMaxOctetCount {
+ return nil, errSDESTextTooLong
+ }
+ rawPacket[sdesOctetCountOffset] = uint8(octetCount)
+
+ rawPacket = append(rawPacket, txtBytes...)
+
+ return rawPacket, nil
+}
+
+// Unmarshal decodes the SourceDescriptionItem from binary
+func (s *SourceDescriptionItem) Unmarshal(rawPacket []byte) error {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | CNAME=1 | length | user and domain name ...
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+ if len(rawPacket) < (sdesTypeLen + sdesOctetCountLen) {
+ return errPacketTooShort
+ }
+
+ s.Type = SDESType(rawPacket[sdesTypeOffset])
+
+ octetCount := int(rawPacket[sdesOctetCountOffset])
+ if sdesTextOffset+octetCount > len(rawPacket) {
+ return errPacketTooShort
+ }
+
+ txtBytes := rawPacket[sdesTextOffset : sdesTextOffset+octetCount]
+ s.Text = string(txtBytes)
+
+ return nil
+}
+
+// DestinationSSRC returns an array of SSRC values that this packet refers to.
+func (s *SourceDescription) DestinationSSRC() []uint32 {
+ out := make([]uint32, len(s.Chunks))
+ for i, v := range s.Chunks {
+ out[i] = v.Source
+ }
+ return out
+}
+
+func (s *SourceDescription) String() string {
+ out := "Source Description:\n"
+ for _, c := range s.Chunks {
+ out += fmt.Sprintf("\t%x: %s\n", c.Source, c.Items)
+ }
+ return out
+}
diff --git a/vendor/github.com/pion/rtcp/transport_layer_cc.go b/vendor/github.com/pion/rtcp/transport_layer_cc.go
new file mode 100644
index 0000000..9606581
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/transport_layer_cc.go
@@ -0,0 +1,560 @@
+package rtcp
+
+// Author: adwpc
+
+import (
+ "encoding/binary"
+ "errors"
+ "fmt"
+ "math"
+)
+
+// https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01#page-5
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// |V=2|P| FMT=15 | PT=205 | length |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC of packet sender |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | SSRC of media source |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | base sequence number | packet status count |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | reference time | fb pkt. count |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | packet chunk | packet chunk |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// . .
+// . .
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | packet chunk | recv delta | recv delta |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// . .
+// . .
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | recv delta | recv delta | zero padding |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+// for packet status chunk
+const (
+ // type of packet status chunk
+ TypeTCCRunLengthChunk = 0
+ TypeTCCStatusVectorChunk = 1
+
+ // len of packet status chunk
+ packetStatusChunkLength = 2
+)
+
+// type of packet status symbol and recv delta
+const (
+ // https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01#section-3.1.1
+ TypeTCCPacketNotReceived = uint16(iota)
+ TypeTCCPacketReceivedSmallDelta
+ TypeTCCPacketReceivedLargeDelta
+ // https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01#page-7
+ // see Example 2: "packet received, w/o recv delta"
+ TypeTCCPacketReceivedWithoutDelta
+)
+
+// for status vector chunk
+const (
+ // https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01#section-3.1.4
+ TypeTCCSymbolSizeOneBit = 0
+ TypeTCCSymbolSizeTwoBit = 1
+
+ // Notice: RFC is wrong: "packet received" (0) and "packet not received" (1)
+ // if S == TypeTCCSymbolSizeOneBit, symbol list will be: TypeTCCPacketNotReceived TypeTCCPacketReceivedSmallDelta
+ // if S == TypeTCCSymbolSizeTwoBit, symbol list will be same as above:
+)
+
+func numOfBitsOfSymbolSize() map[uint16]uint16 {
+ return map[uint16]uint16{
+ TypeTCCSymbolSizeOneBit: 1,
+ TypeTCCSymbolSizeTwoBit: 2,
+ }
+}
+
+var _ Packet = (*TransportLayerCC)(nil) // assert is a Packet
+
+var (
+ errPacketStatusChunkLength = errors.New("packet status chunk must be 2 bytes")
+ errDeltaExceedLimit = errors.New("delta exceed limit")
+)
+
+// PacketStatusChunk has two kinds:
+// RunLengthChunk and StatusVectorChunk
+type PacketStatusChunk interface {
+ Marshal() ([]byte, error)
+ Unmarshal(rawPacket []byte) error
+}
+
+// RunLengthChunk T=TypeTCCRunLengthChunk
+// 0 1
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// |T| S | Run Length |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+type RunLengthChunk struct {
+ PacketStatusChunk
+
+ // T = TypeTCCRunLengthChunk
+ Type uint16
+
+ // S: type of packet status
+ // kind: TypeTCCPacketNotReceived or...
+ PacketStatusSymbol uint16
+
+ // RunLength: count of S
+ RunLength uint16
+}
+
+// Marshal ..
+func (r RunLengthChunk) Marshal() ([]byte, error) {
+ chunk := make([]byte, 2)
+
+ // append 1 bit '0'
+ dst, err := setNBitsOfUint16(0, 1, 0, 0)
+ if err != nil {
+ return nil, err
+ }
+
+ // append 2 bit PacketStatusSymbol
+ dst, err = setNBitsOfUint16(dst, 2, 1, r.PacketStatusSymbol)
+ if err != nil {
+ return nil, err
+ }
+
+ // append 13 bit RunLength
+ dst, err = setNBitsOfUint16(dst, 13, 3, r.RunLength)
+ if err != nil {
+ return nil, err
+ }
+
+ binary.BigEndian.PutUint16(chunk, dst)
+ return chunk, nil
+}
+
+// Unmarshal ..
+func (r *RunLengthChunk) Unmarshal(rawPacket []byte) error {
+ if len(rawPacket) != packetStatusChunkLength {
+ return errPacketStatusChunkLength
+ }
+
+ // record type
+ r.Type = TypeTCCRunLengthChunk
+
+ // get PacketStatusSymbol
+ // r.PacketStatusSymbol = uint16(rawPacket[0] >> 5 & 0x03)
+ r.PacketStatusSymbol = getNBitsFromByte(rawPacket[0], 1, 2)
+
+ // get RunLength
+ // r.RunLength = uint16(rawPacket[0]&0x1F)*256 + uint16(rawPacket[1])
+ r.RunLength = getNBitsFromByte(rawPacket[0], 3, 5)<<8 + uint16(rawPacket[1])
+ return nil
+}
+
+// StatusVectorChunk T=typeStatusVecotrChunk
+// 0 1
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// |T|S| symbol list |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+type StatusVectorChunk struct {
+ PacketStatusChunk
+ // T = TypeTCCRunLengthChunk
+ Type uint16
+
+ // TypeTCCSymbolSizeOneBit or TypeTCCSymbolSizeTwoBit
+ SymbolSize uint16
+
+ // when SymbolSize = TypeTCCSymbolSizeOneBit, SymbolList is 14*1bit:
+ // TypeTCCSymbolListPacketReceived or TypeTCCSymbolListPacketNotReceived
+ // when SymbolSize = TypeTCCSymbolSizeTwoBit, SymbolList is 7*2bit:
+ // TypeTCCPacketNotReceived TypeTCCPacketReceivedSmallDelta TypeTCCPacketReceivedLargeDelta or typePacketReserved
+ SymbolList []uint16
+}
+
+// Marshal ..
+func (r StatusVectorChunk) Marshal() ([]byte, error) {
+ chunk := make([]byte, 2)
+
+ // set first bit '1'
+ dst, err := setNBitsOfUint16(0, 1, 0, 1)
+ if err != nil {
+ return nil, err
+ }
+
+ // set second bit SymbolSize
+ dst, err = setNBitsOfUint16(dst, 1, 1, r.SymbolSize)
+ if err != nil {
+ return nil, err
+ }
+
+ numOfBits := numOfBitsOfSymbolSize()[r.SymbolSize]
+ // append 14 bit SymbolList
+ for i, s := range r.SymbolList {
+ index := numOfBits*uint16(i) + 2
+ dst, err = setNBitsOfUint16(dst, numOfBits, index, s)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ binary.BigEndian.PutUint16(chunk, dst)
+ // set SymbolList(bit8-15)
+ // chunk[1] = uint8(r.SymbolList) & 0x0f
+ return chunk, nil
+}
+
+// Unmarshal ..
+func (r *StatusVectorChunk) Unmarshal(rawPacket []byte) error {
+ if len(rawPacket) != packetStatusChunkLength {
+ return errPacketStatusChunkLength
+ }
+
+ r.Type = TypeTCCStatusVectorChunk
+ r.SymbolSize = getNBitsFromByte(rawPacket[0], 1, 1)
+
+ if r.SymbolSize == TypeTCCSymbolSizeOneBit {
+ for i := uint16(0); i < 6; i++ {
+ r.SymbolList = append(r.SymbolList, getNBitsFromByte(rawPacket[0], 2+i, 1))
+ }
+ for i := uint16(0); i < 8; i++ {
+ r.SymbolList = append(r.SymbolList, getNBitsFromByte(rawPacket[1], i, 1))
+ }
+ return nil
+ }
+ if r.SymbolSize == TypeTCCSymbolSizeTwoBit {
+ for i := uint16(0); i < 3; i++ {
+ r.SymbolList = append(r.SymbolList, getNBitsFromByte(rawPacket[0], 2+i*2, 2))
+ }
+ for i := uint16(0); i < 4; i++ {
+ r.SymbolList = append(r.SymbolList, getNBitsFromByte(rawPacket[1], i*2, 2))
+ }
+ return nil
+ }
+
+ r.SymbolSize = getNBitsFromByte(rawPacket[0], 2, 6)<<8 + uint16(rawPacket[1])
+ return nil
+}
+
+const (
+ // TypeTCCDeltaScaleFactor https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01#section-3.1.5
+ TypeTCCDeltaScaleFactor = 250
+)
+
+// RecvDelta are represented as multiples of 250us
+// small delta is 1 byte: [0,63.75]ms = [0, 63750]us = [0, 255]*250us
+// big delta is 2 bytes: [-8192.0, 8191.75]ms = [-8192000, 8191750]us = [-32768, 32767]*250us
+// https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01#section-3.1.5
+type RecvDelta struct {
+ Type uint16
+ // us
+ Delta int64
+}
+
+// Marshal ..
+func (r RecvDelta) Marshal() ([]byte, error) {
+ delta := r.Delta / TypeTCCDeltaScaleFactor
+
+ // small delta
+ if r.Type == TypeTCCPacketReceivedSmallDelta && delta >= 0 && delta <= math.MaxUint8 {
+ deltaChunk := make([]byte, 1)
+ deltaChunk[0] = byte(delta)
+ return deltaChunk, nil
+ }
+
+ // big delta
+ if r.Type == TypeTCCPacketReceivedLargeDelta && delta >= math.MinInt16 && delta <= math.MaxInt16 {
+ deltaChunk := make([]byte, 2)
+ binary.BigEndian.PutUint16(deltaChunk, uint16(delta))
+ return deltaChunk, nil
+ }
+
+ // overflow
+ return nil, errDeltaExceedLimit
+}
+
+// Unmarshal ..
+func (r *RecvDelta) Unmarshal(rawPacket []byte) error {
+ chunkLen := len(rawPacket)
+
+ // must be 1 or 2 bytes
+ if chunkLen != 1 && chunkLen != 2 {
+ return errDeltaExceedLimit
+ }
+
+ if chunkLen == 1 {
+ r.Type = TypeTCCPacketReceivedSmallDelta
+ r.Delta = TypeTCCDeltaScaleFactor * int64(rawPacket[0])
+ return nil
+ }
+
+ r.Type = TypeTCCPacketReceivedLargeDelta
+ r.Delta = TypeTCCDeltaScaleFactor * int64(int16(binary.BigEndian.Uint16(rawPacket)))
+ return nil
+}
+
+const (
+ // the offset after header
+ baseSequenceNumberOffset = 8
+ packetStatusCountOffset = 10
+ referenceTimeOffset = 12
+ fbPktCountOffset = 15
+ packetChunkOffset = 16
+)
+
+// TransportLayerCC for sender-BWE
+// https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01#page-5
+type TransportLayerCC struct {
+ // header
+ Header Header
+
+ // SSRC of sender
+ SenderSSRC uint32
+
+ // SSRC of the media source
+ MediaSSRC uint32
+
+ // Transport wide sequence of rtp extension
+ BaseSequenceNumber uint16
+
+ // PacketStatusCount
+ PacketStatusCount uint16
+
+ // ReferenceTime
+ ReferenceTime uint32
+
+ // FbPktCount
+ FbPktCount uint8
+
+ // PacketChunks
+ PacketChunks []PacketStatusChunk
+
+ // RecvDeltas
+ RecvDeltas []*RecvDelta
+}
+
+// Header returns the Header associated with this packet.
+// func (t *TransportLayerCC) Header() Header {
+// return t.Header
+// return Header{
+// Padding: true,
+// Count: FormatTCC,
+// Type: TypeTCCTransportSpecificFeedback,
+// // https://tools.ietf.org/html/rfc4585#page-33
+// Length: uint16((t.len() / 4) - 1),
+// }
+// }
+
+func (t *TransportLayerCC) packetLen() uint16 {
+ n := uint16(headerLength + packetChunkOffset + len(t.PacketChunks)*2)
+ for _, d := range t.RecvDeltas {
+ delta := d.Delta / TypeTCCDeltaScaleFactor
+
+ // small delta
+ if delta >= 0 && delta <= math.MaxUint8 {
+ n++
+ } else {
+ n += 2
+ }
+ }
+ return n
+}
+
+// Len return total bytes with padding
+func (t *TransportLayerCC) Len() uint16 {
+ n := t.packetLen()
+ // has padding
+ if n%4 != 0 {
+ n = (n/4 + 1) * 4
+ }
+
+ return n
+}
+
+func (t TransportLayerCC) String() string {
+ out := fmt.Sprintf("TransportLayerCC:\n\tHeader %v\n", t.Header)
+ out += fmt.Sprintf("TransportLayerCC:\n\tSender Ssrc %d\n", t.SenderSSRC)
+ out += fmt.Sprintf("\tMedia Ssrc %d\n", t.MediaSSRC)
+ out += fmt.Sprintf("\tBase Sequence Number %d\n", t.BaseSequenceNumber)
+ out += fmt.Sprintf("\tStatus Count %d\n", t.PacketStatusCount)
+ out += fmt.Sprintf("\tReference Time %d\n", t.ReferenceTime)
+ out += fmt.Sprintf("\tFeedback Packet Count %d\n", t.FbPktCount)
+ out += "\tPacketChunks "
+ for _, chunk := range t.PacketChunks {
+ out += fmt.Sprintf("%+v ", chunk)
+ }
+ out += "\n\tRecvDeltas "
+ for _, delta := range t.RecvDeltas {
+ out += fmt.Sprintf("%+v ", delta)
+ }
+ out += "\n"
+ return out
+}
+
+// Marshal encodes the TransportLayerCC in binary
+func (t TransportLayerCC) Marshal() ([]byte, error) {
+ header, err := t.Header.Marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ payload := make([]byte, t.Len()-headerLength)
+ binary.BigEndian.PutUint32(payload, t.SenderSSRC)
+ binary.BigEndian.PutUint32(payload[4:], t.MediaSSRC)
+ binary.BigEndian.PutUint16(payload[baseSequenceNumberOffset:], t.BaseSequenceNumber)
+ binary.BigEndian.PutUint16(payload[packetStatusCountOffset:], t.PacketStatusCount)
+ ReferenceTimeAndFbPktCount := appendNBitsToUint32(0, 24, t.ReferenceTime)
+ ReferenceTimeAndFbPktCount = appendNBitsToUint32(ReferenceTimeAndFbPktCount, 8, uint32(t.FbPktCount))
+ binary.BigEndian.PutUint32(payload[referenceTimeOffset:], ReferenceTimeAndFbPktCount)
+
+ for i, chunk := range t.PacketChunks {
+ b, err := chunk.Marshal()
+ if err != nil {
+ return nil, err
+ }
+ copy(payload[packetChunkOffset+i*2:], b)
+ }
+
+ recvDeltaOffset := packetChunkOffset + len(t.PacketChunks)*2
+ var i int
+ for _, delta := range t.RecvDeltas {
+ b, err := delta.Marshal()
+ if err == nil {
+ copy(payload[recvDeltaOffset+i:], b)
+ i++
+ if delta.Type == TypeTCCPacketReceivedLargeDelta {
+ i++
+ }
+ }
+ }
+
+ if t.Header.Padding {
+ payload[len(payload)-1] = uint8(t.Len() - t.packetLen())
+ }
+
+ return append(header, payload...), nil
+}
+
+// Unmarshal ..
+func (t *TransportLayerCC) Unmarshal(rawPacket []byte) error { //nolint:gocognit
+ if len(rawPacket) < (headerLength + ssrcLength) {
+ return errPacketTooShort
+ }
+
+ if err := t.Header.Unmarshal(rawPacket); err != nil {
+ return err
+ }
+
+ // https://tools.ietf.org/html/rfc4585#page-33
+ // header's length + payload's length
+ totalLength := 4 * (t.Header.Length + 1)
+
+ if totalLength <= headerLength+packetChunkOffset {
+ return errPacketTooShort
+ }
+
+ if len(rawPacket) < int(totalLength) {
+ return errPacketTooShort
+ }
+
+ if t.Header.Type != TypeTransportSpecificFeedback || t.Header.Count != FormatTCC {
+ return errWrongType
+ }
+
+ t.SenderSSRC = binary.BigEndian.Uint32(rawPacket[headerLength:])
+ t.MediaSSRC = binary.BigEndian.Uint32(rawPacket[headerLength+ssrcLength:])
+ t.BaseSequenceNumber = binary.BigEndian.Uint16(rawPacket[headerLength+baseSequenceNumberOffset:])
+ t.PacketStatusCount = binary.BigEndian.Uint16(rawPacket[headerLength+packetStatusCountOffset:])
+ t.ReferenceTime = get24BitsFromBytes(rawPacket[headerLength+referenceTimeOffset : headerLength+referenceTimeOffset+3])
+ t.FbPktCount = rawPacket[headerLength+fbPktCountOffset]
+
+ packetStatusPos := uint16(headerLength + packetChunkOffset)
+ var processedPacketNum uint16
+ for processedPacketNum < t.PacketStatusCount {
+ if packetStatusPos+packetStatusChunkLength >= totalLength {
+ return errPacketTooShort
+ }
+ typ := getNBitsFromByte(rawPacket[packetStatusPos : packetStatusPos+1][0], 0, 1)
+ var iPacketStatus PacketStatusChunk
+ switch typ {
+ case TypeTCCRunLengthChunk:
+ packetStatus := &RunLengthChunk{Type: typ}
+ iPacketStatus = packetStatus
+ err := packetStatus.Unmarshal(rawPacket[packetStatusPos : packetStatusPos+2])
+ if err != nil {
+ return err
+ }
+
+ packetNumberToProcess := min(t.PacketStatusCount-processedPacketNum, packetStatus.RunLength)
+ if packetStatus.PacketStatusSymbol == TypeTCCPacketReceivedSmallDelta ||
+ packetStatus.PacketStatusSymbol == TypeTCCPacketReceivedLargeDelta {
+ for j := uint16(0); j < packetNumberToProcess; j++ {
+ t.RecvDeltas = append(t.RecvDeltas, &RecvDelta{Type: packetStatus.PacketStatusSymbol})
+ }
+ }
+ processedPacketNum += packetNumberToProcess
+ case TypeTCCStatusVectorChunk:
+ packetStatus := &StatusVectorChunk{Type: typ}
+ iPacketStatus = packetStatus
+ err := packetStatus.Unmarshal(rawPacket[packetStatusPos : packetStatusPos+2])
+ if err != nil {
+ return err
+ }
+ if packetStatus.SymbolSize == TypeTCCSymbolSizeOneBit {
+ for j := 0; j < len(packetStatus.SymbolList); j++ {
+ if packetStatus.SymbolList[j] == TypeTCCPacketReceivedSmallDelta {
+ t.RecvDeltas = append(t.RecvDeltas, &RecvDelta{Type: TypeTCCPacketReceivedSmallDelta})
+ }
+ }
+ }
+ if packetStatus.SymbolSize == TypeTCCSymbolSizeTwoBit {
+ for j := 0; j < len(packetStatus.SymbolList); j++ {
+ if packetStatus.SymbolList[j] == TypeTCCPacketReceivedSmallDelta || packetStatus.SymbolList[j] == TypeTCCPacketReceivedLargeDelta {
+ t.RecvDeltas = append(t.RecvDeltas, &RecvDelta{Type: packetStatus.SymbolList[j]})
+ }
+ }
+ }
+ processedPacketNum += uint16(len(packetStatus.SymbolList))
+ }
+ packetStatusPos += packetStatusChunkLength
+ t.PacketChunks = append(t.PacketChunks, iPacketStatus)
+ }
+
+ recvDeltasPos := packetStatusPos
+ for _, delta := range t.RecvDeltas {
+ if recvDeltasPos >= totalLength {
+ return errPacketTooShort
+ }
+ if delta.Type == TypeTCCPacketReceivedSmallDelta {
+ err := delta.Unmarshal(rawPacket[recvDeltasPos : recvDeltasPos+1])
+ if err != nil {
+ return err
+ }
+ recvDeltasPos++
+ }
+ if delta.Type == TypeTCCPacketReceivedLargeDelta {
+ err := delta.Unmarshal(rawPacket[recvDeltasPos : recvDeltasPos+2])
+ if err != nil {
+ return err
+ }
+ recvDeltasPos += 2
+ }
+ }
+
+ return nil
+}
+
+// DestinationSSRC returns an array of SSRC values that this packet refers to.
+func (t TransportLayerCC) DestinationSSRC() []uint32 {
+ return []uint32{t.MediaSSRC}
+}
+
+func min(x, y uint16) uint16 {
+ if x < y {
+ return x
+ }
+ return y
+}
diff --git a/vendor/github.com/pion/rtcp/transport_layer_nack.go b/vendor/github.com/pion/rtcp/transport_layer_nack.go
new file mode 100644
index 0000000..f7ab803
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/transport_layer_nack.go
@@ -0,0 +1,174 @@
+package rtcp
+
+import (
+ "encoding/binary"
+ "fmt"
+ "math"
+)
+
+// PacketBitmap shouldn't be used like a normal integral,
+// so it's type is masked here. Access it with PacketList().
+type PacketBitmap uint16
+
+// NackPair is a wire-representation of a collection of
+// Lost RTP packets
+type NackPair struct {
+ // ID of lost packets
+ PacketID uint16
+
+ // Bitmask of following lost packets
+ LostPackets PacketBitmap
+}
+
+// The TransportLayerNack packet informs the encoder about the loss of a transport packet
+// IETF RFC 4585, Section 6.2.1
+// https://tools.ietf.org/html/rfc4585#section-6.2.1
+type TransportLayerNack struct {
+ // SSRC of sender
+ SenderSSRC uint32
+
+ // SSRC of the media source
+ MediaSSRC uint32
+
+ Nacks []NackPair
+}
+
+var _ Packet = (*TransportLayerNack)(nil) // assert is a Packet
+
+// NackPairsFromSequenceNumbers generates a slice of NackPair from a list of SequenceNumbers
+// This handles generating the proper values for PacketID/LostPackets
+func NackPairsFromSequenceNumbers(sequenceNumbers []uint16) (pairs []NackPair) {
+ if len(sequenceNumbers) == 0 {
+ return []NackPair{}
+ }
+
+ nackPair := &NackPair{PacketID: sequenceNumbers[0]}
+ for i := 1; i < len(sequenceNumbers); i++ {
+ m := sequenceNumbers[i]
+
+ if m-nackPair.PacketID > 16 {
+ pairs = append(pairs, *nackPair)
+ nackPair = &NackPair{PacketID: m}
+ continue
+ }
+
+ nackPair.LostPackets |= 1 << (m - nackPair.PacketID - 1)
+ }
+ pairs = append(pairs, *nackPair)
+ return
+}
+
+// Range calls f sequentially for each sequence number covered by n.
+// If f returns false, Range stops the iteration.
+func (n *NackPair) Range(f func(seqno uint16) bool) {
+ more := f(n.PacketID)
+ if !more {
+ return
+ }
+
+ b := n.LostPackets
+ for i := uint16(0); b != 0; i++ {
+ if (b & (1 << i)) != 0 {
+ b &^= (1 << i)
+ more = f(n.PacketID + i + 1)
+ if !more {
+ return
+ }
+ }
+ }
+}
+
+// PacketList returns a list of Nack'd packets that's referenced by a NackPair
+func (n *NackPair) PacketList() []uint16 {
+ out := make([]uint16, 0, 17)
+ n.Range(func(seqno uint16) bool {
+ out = append(out, seqno)
+ return true
+ })
+ return out
+}
+
+const (
+ tlnLength = 2
+ nackOffset = 8
+)
+
+// Marshal encodes the TransportLayerNack in binary
+func (p TransportLayerNack) Marshal() ([]byte, error) {
+ if len(p.Nacks)+tlnLength > math.MaxUint8 {
+ return nil, errTooManyReports
+ }
+
+ rawPacket := make([]byte, nackOffset+(len(p.Nacks)*4))
+ binary.BigEndian.PutUint32(rawPacket, p.SenderSSRC)
+ binary.BigEndian.PutUint32(rawPacket[4:], p.MediaSSRC)
+ for i := 0; i < len(p.Nacks); i++ {
+ binary.BigEndian.PutUint16(rawPacket[nackOffset+(4*i):], p.Nacks[i].PacketID)
+ binary.BigEndian.PutUint16(rawPacket[nackOffset+(4*i)+2:], uint16(p.Nacks[i].LostPackets))
+ }
+ h := p.Header()
+ hData, err := h.Marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ return append(hData, rawPacket...), nil
+}
+
+// Unmarshal decodes the TransportLayerNack from binary
+func (p *TransportLayerNack) Unmarshal(rawPacket []byte) error {
+ if len(rawPacket) < (headerLength + ssrcLength) {
+ return errPacketTooShort
+ }
+
+ var h Header
+ if err := h.Unmarshal(rawPacket); err != nil {
+ return err
+ }
+
+ if len(rawPacket) < (headerLength + int(4*h.Length)) {
+ return errPacketTooShort
+ }
+
+ if h.Type != TypeTransportSpecificFeedback || h.Count != FormatTLN {
+ return errWrongType
+ }
+
+ p.SenderSSRC = binary.BigEndian.Uint32(rawPacket[headerLength:])
+ p.MediaSSRC = binary.BigEndian.Uint32(rawPacket[headerLength+ssrcLength:])
+ for i := headerLength + nackOffset; i < (headerLength + int(h.Length*4)); i += 4 {
+ p.Nacks = append(p.Nacks, NackPair{
+ binary.BigEndian.Uint16(rawPacket[i:]),
+ PacketBitmap(binary.BigEndian.Uint16(rawPacket[i+2:])),
+ })
+ }
+ return nil
+}
+
+func (p *TransportLayerNack) len() int {
+ return headerLength + nackOffset + (len(p.Nacks) * 4)
+}
+
+// Header returns the Header associated with this packet.
+func (p *TransportLayerNack) Header() Header {
+ return Header{
+ Count: FormatTLN,
+ Type: TypeTransportSpecificFeedback,
+ Length: uint16((p.len() / 4) - 1),
+ }
+}
+
+func (p TransportLayerNack) String() string {
+ out := fmt.Sprintf("TransportLayerNack from %x\n", p.SenderSSRC)
+ out += fmt.Sprintf("\tMedia Ssrc %x\n", p.MediaSSRC)
+ out += "\tID\tLostPackets\n"
+ for _, i := range p.Nacks {
+ out += fmt.Sprintf("\t%d\t%b\n", i.PacketID, i.LostPackets)
+ }
+ return out
+}
+
+// DestinationSSRC returns an array of SSRC values that this packet refers to.
+func (p *TransportLayerNack) DestinationSSRC() []uint32 {
+ return []uint32{p.MediaSSRC}
+}
diff --git a/vendor/github.com/pion/rtcp/util.go b/vendor/github.com/pion/rtcp/util.go
new file mode 100644
index 0000000..5702d35
--- /dev/null
+++ b/vendor/github.com/pion/rtcp/util.go
@@ -0,0 +1,38 @@
+package rtcp
+
+// getPadding Returns the padding required to make the length a multiple of 4
+func getPadding(len int) int {
+ if len%4 == 0 {
+ return 0
+ }
+ return 4 - (len % 4)
+}
+
+// setNBitsOfUint16 will truncate the value to size, left-shift to startIndex position and set
+func setNBitsOfUint16(src, size, startIndex, val uint16) (uint16, error) {
+ if startIndex+size > 16 {
+ return 0, errInvalidSizeOrStartIndex
+ }
+
+ // truncate val to size bits
+ val &= (1 << size) - 1
+
+ return src | (val << (16 - size - startIndex)), nil
+}
+
+// appendBit32 will left-shift and append n bits of val
+func appendNBitsToUint32(src, n, val uint32) uint32 {
+ return (src << n) | (val & (0xFFFFFFFF >> (32 - n)))
+}
+
+// getNBit get n bits from 1 byte, begin with a position
+func getNBitsFromByte(b byte, begin, n uint16) uint16 {
+ endShift := 8 - (begin + n)
+ mask := (0xFF >> begin) & uint8(0xFF<<endShift)
+ return uint16(b&mask) >> endShift
+}
+
+// get24BitFromBytes get 24bits from `[3]byte` slice
+func get24BitsFromBytes(b []byte) uint32 {
+ return uint32(b[0])<<16 + uint32(b[1])<<8 + uint32(b[2])
+}
diff --git a/vendor/github.com/pion/rtp/.gitignore b/vendor/github.com/pion/rtp/.gitignore
new file mode 100644
index 0000000..83db74b
--- /dev/null
+++ b/vendor/github.com/pion/rtp/.gitignore
@@ -0,0 +1,24 @@
+### JetBrains IDE ###
+#####################
+.idea/
+
+### Emacs Temporary Files ###
+#############################
+*~
+
+### Folders ###
+###############
+bin/
+vendor/
+node_modules/
+
+### Files ###
+#############
+*.ivf
+*.ogg
+tags
+cover.out
+*.sw[poe]
+*.wasm
+examples/sfu-ws/cert.pem
+examples/sfu-ws/key.pem
diff --git a/vendor/github.com/pion/rtp/.golangci.yml b/vendor/github.com/pion/rtp/.golangci.yml
new file mode 100644
index 0000000..d6162c9
--- /dev/null
+++ b/vendor/github.com/pion/rtp/.golangci.yml
@@ -0,0 +1,89 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+ exhaustive:
+ default-signifies-exhaustive: true
+ gomodguard:
+ blocked:
+ modules:
+ - github.com/pkg/errors:
+ recommendations:
+ - errors
+
+linters:
+ enable:
+ - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
+ - bodyclose # checks whether HTTP response body is closed successfully
+ - deadcode # Finds unused code
+ - depguard # Go linter that checks if package imports are in a list of acceptable packages
+ - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
+ - dupl # Tool for code clone detection
+ - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
+ - exhaustive # check exhaustiveness of enum switch statements
+ - exportloopref # checks for pointers to enclosing loop variables
+ - gci # Gci control golang package import order and make it always deterministic.
+ - gochecknoglobals # Checks that no globals are present in Go code
+ - gochecknoinits # Checks that no init functions are present in Go code
+ - gocognit # Computes and checks the cognitive complexity of functions
+ - goconst # Finds repeated strings that could be replaced by a constant
+ - gocritic # The most opinionated Go source code linter
+ - godox # Tool for detection of FIXME, TODO and other comment keywords
+ - goerr113 # Golang linter to check the errors handling expressions
+ - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
+ - gofumpt # Gofumpt checks whether code was gofumpt-ed.
+ - goheader # Checks is file header matches to pattern
+ - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
+ - golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
+ - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.
+ - goprintffuncname # Checks that printf-like functions are named with `f` at the end
+ - gosec # Inspects source code for security problems
+ - gosimple # Linter for Go source code that specializes in simplifying a code
+ - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
+ - ineffassign # Detects when assignments to existing variables are not used
+ - misspell # Finds commonly misspelled English words in comments
+ - nakedret # Finds naked returns in functions greater than a specified function length
+ - noctx # noctx finds sending http request without context.Context
+ - scopelint # Scopelint checks for unpinned variables in go programs
+ - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
+ - structcheck # Finds unused struct fields
+ - stylecheck # Stylecheck is a replacement for golint
+ - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
+ - unconvert # Remove unnecessary type conversions
+ - unparam # Reports unused function parameters
+ - unused # Checks Go code for unused constants, variables, functions and types
+ - varcheck # Finds unused global variables and constants
+ - whitespace # Tool for detection of leading and trailing whitespace
+ disable:
+ - funlen # Tool for detection of long functions
+ - gocyclo # Computes and checks the cyclomatic complexity of functions
+ - godot # Check if comments end in a period
+ - gomnd # An analyzer to detect magic numbers.
+ - lll # Reports long lines
+ - maligned # Tool to detect Go structs that would take less memory if their fields were sorted
+ - nestif # Reports deeply nested if statements
+ - nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
+ - nolintlint # Reports ill-formed or insufficient nolint directives
+ - prealloc # Finds slice declarations that could potentially be preallocated
+ - rowserrcheck # checks whether Err of rows is checked successfully
+ - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
+ - testpackage # linter that makes you use a separate _test package
+ - wsl # Whitespace Linter - Forces you to use empty lines!
+
+issues:
+ exclude-use-default: false
+ exclude-rules:
+ # Allow complex tests, better to be self contained
+ - path: _test\.go
+ linters:
+ - gocognit
+
+ # Allow complex main function in examples
+ - path: examples
+ text: "of func `main` is high"
+ linters:
+ - gocognit
+
+run:
+ skip-dirs-use-default: false
diff --git a/vendor/github.com/pion/rtp/LICENSE b/vendor/github.com/pion/rtp/LICENSE
new file mode 100644
index 0000000..ab60297
--- /dev/null
+++ b/vendor/github.com/pion/rtp/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/rtp/README.md b/vendor/github.com/pion/rtp/README.md
new file mode 100644
index 0000000..b17709e
--- /dev/null
+++ b/vendor/github.com/pion/rtp/README.md
@@ -0,0 +1,53 @@
+<h1 align="center">
+ <br>
+ Pion RTP
+ <br>
+</h1>
+<h4 align="center">A Go implementation of RTP</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-rtp-gray.svg?longCache=true&colorB=brightgreen" alt="Pion RTP"></a>
+ <a href="https://sourcegraph.com/github.com/pion/rtp?badge"><img src="https://sourcegraph.com/github.com/pion/rtp/-/badge.svg" alt="Sourcegraph Widget"></a>
+ <a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/rtp"><img src="https://travis-ci.org/pion/rtp.svg?branch=master" alt="Build Status"></a>
+ <a href="https://pkg.go.dev/github.com/pion/rtp"><img src="https://godoc.org/github.com/pion/rtp?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/rtp"><img src="https://codecov.io/gh/pion/rtp/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/rtp"><img src="https://goreportcard.com/badge/github.com/pion/rtp" alt="Go Report Card"></a>
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+### Roadmap
+The library is used as a part of our WebRTC implementation. Please refer to that [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
+
+### Community
+Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [John Bradley](https://github.com/kc5nra) - *Original Author*
+* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
+* [Woodrow Douglass](https://github.com/wdouglass) *RTCP, RTP improvements, G.722 support, Bugfixes*
+* [Michael MacDonald](https://github.com/mjmac)
+* [Luke Curley](https://github.com/kixelated) *Performance*
+* [Antoine Baché](https://github.com/Antonito) *Fixed crashes*
+* [Hugo Arregui](https://github.com/hugoArregui)
+* [Raphael Derosso Pereira](https://github.com/raphaelpereira)
+* [Atsushi Watanabe](https://github.com/at-wat)
+* [adwpc](https://github.com/adwpc) *add transport-cc extension*
+* [Bao Nguyen](https://github.com/sysbot) *add VP9 noop, bug fixes.
+* [Tarrence van As](https://github.com/tarrencev) *add audio level extension*
+* [Simone Gotti](https://github.com/sgotti)
+* [Guilherme Souza](https://github.com/gqgs)
+* [Rob Lofthouse](https://github.com/roblofthouse)
+* [Kazuyuki Honda](https://github.com/hakobera)
+* [Haiyang Wang](https://github.com/ocean2811)
+* [lxb](https://github.com/lxb531)
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/rtp/abssendtimeextension.go b/vendor/github.com/pion/rtp/abssendtimeextension.go
new file mode 100644
index 0000000..fc9731d
--- /dev/null
+++ b/vendor/github.com/pion/rtp/abssendtimeextension.go
@@ -0,0 +1,78 @@
+package rtp
+
+import (
+ "time"
+)
+
+const (
+ absSendTimeExtensionSize = 3
+)
+
+// AbsSendTimeExtension is a extension payload format in
+// http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
+type AbsSendTimeExtension struct {
+ Timestamp uint64
+}
+
+// Marshal serializes the members to buffer.
+func (t *AbsSendTimeExtension) Marshal() ([]byte, error) {
+ return []byte{
+ byte(t.Timestamp & 0xFF0000 >> 16),
+ byte(t.Timestamp & 0xFF00 >> 8),
+ byte(t.Timestamp & 0xFF),
+ }, nil
+}
+
+// Unmarshal parses the passed byte slice and stores the result in the members.
+func (t *AbsSendTimeExtension) Unmarshal(rawData []byte) error {
+ if len(rawData) < absSendTimeExtensionSize {
+ return errTooSmall
+ }
+ t.Timestamp = uint64(rawData[0])<<16 | uint64(rawData[1])<<8 | uint64(rawData[2])
+ return nil
+}
+
+// Estimate absolute send time according to the receive time.
+// Note that if the transmission delay is larger than 64 seconds, estimated time will be wrong.
+func (t *AbsSendTimeExtension) Estimate(receive time.Time) time.Time {
+ receiveNTP := toNtpTime(receive)
+ ntp := receiveNTP&0xFFFFFFC000000000 | (t.Timestamp&0xFFFFFF)<<14
+ if receiveNTP < ntp {
+ // Receive time must be always later than send time
+ ntp -= 0x1000000 << 14
+ }
+
+ return toTime(ntp)
+}
+
+// NewAbsSendTimeExtension makes new AbsSendTimeExtension from time.Time.
+func NewAbsSendTimeExtension(sendTime time.Time) *AbsSendTimeExtension {
+ return &AbsSendTimeExtension{
+ Timestamp: toNtpTime(sendTime) >> 14,
+ }
+}
+
+func toNtpTime(t time.Time) uint64 {
+ var s uint64
+ var f uint64
+ u := uint64(t.UnixNano())
+ s = u / 1e9
+ s += 0x83AA7E80 // offset in seconds between unix epoch and ntp epoch
+ f = u % 1e9
+ f <<= 32
+ f /= 1e9
+ s <<= 32
+
+ return s | f
+}
+
+func toTime(t uint64) time.Time {
+ s := t >> 32
+ f := t & 0xFFFFFFFF
+ f *= 1e9
+ f >>= 32
+ s -= 0x83AA7E80
+ u := s*1e9 + f
+
+ return time.Unix(0, int64(u))
+}
diff --git a/vendor/github.com/pion/rtp/audiolevelextension.go b/vendor/github.com/pion/rtp/audiolevelextension.go
new file mode 100644
index 0000000..f8701e1
--- /dev/null
+++ b/vendor/github.com/pion/rtp/audiolevelextension.go
@@ -0,0 +1,60 @@
+package rtp
+
+import (
+ "errors"
+)
+
+const (
+ // audioLevelExtensionSize One byte header size
+ audioLevelExtensionSize = 1
+)
+
+var errAudioLevelOverflow = errors.New("audio level overflow")
+
+// AudioLevelExtension is a extension payload format described in
+// https://tools.ietf.org/html/rfc6464
+//
+// Implementation based on:
+// https://chromium.googlesource.com/external/webrtc/+/e2a017725570ead5946a4ca8235af27470ca0df9/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc#49
+//
+// One byte format:
+// 0 1
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | ID | len=0 |V| level |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+//
+// Two byte format:
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | ID | len=1 |V| level | 0 (pad) |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+type AudioLevelExtension struct {
+ Level uint8
+ Voice bool
+}
+
+// Marshal serializes the members to buffer
+func (a *AudioLevelExtension) Marshal() ([]byte, error) {
+ if a.Level > 127 {
+ return nil, errAudioLevelOverflow
+ }
+ voice := uint8(0x00)
+ if a.Voice {
+ voice = 0x80
+ }
+ buf := make([]byte, audioLevelExtensionSize)
+ buf[0] = voice | a.Level
+ return buf, nil
+}
+
+// Unmarshal parses the passed byte slice and stores the result in the members
+func (a *AudioLevelExtension) Unmarshal(rawData []byte) error {
+ if len(rawData) < audioLevelExtensionSize {
+ return errTooSmall
+ }
+ a.Level = rawData[0] & 0x7F
+ a.Voice = rawData[0]&0x80 != 0
+ return nil
+}
diff --git a/vendor/github.com/pion/rtp/codecov.yml b/vendor/github.com/pion/rtp/codecov.yml
new file mode 100644
index 0000000..085200a
--- /dev/null
+++ b/vendor/github.com/pion/rtp/codecov.yml
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+
+coverage:
+ status:
+ project:
+ default:
+ # Allow decreasing 2% of total coverage to avoid noise.
+ threshold: 2%
+ patch:
+ default:
+ target: 70%
+ only_pulls: true
+
+ignore:
+ - "examples/*"
+ - "examples/**/*"
diff --git a/vendor/github.com/pion/rtp/codecs/codecs.go b/vendor/github.com/pion/rtp/codecs/codecs.go
new file mode 100644
index 0000000..0e07897
--- /dev/null
+++ b/vendor/github.com/pion/rtp/codecs/codecs.go
@@ -0,0 +1,2 @@
+// Package codecs implements codec specific RTP payloader/depayloaders
+package codecs
diff --git a/vendor/github.com/pion/rtp/codecs/common.go b/vendor/github.com/pion/rtp/codecs/common.go
new file mode 100644
index 0000000..39336d2
--- /dev/null
+++ b/vendor/github.com/pion/rtp/codecs/common.go
@@ -0,0 +1,8 @@
+package codecs
+
+func min(a, b int) int {
+ if a < b {
+ return a
+ }
+ return b
+}
diff --git a/vendor/github.com/pion/rtp/codecs/error.go b/vendor/github.com/pion/rtp/codecs/error.go
new file mode 100644
index 0000000..38ee907
--- /dev/null
+++ b/vendor/github.com/pion/rtp/codecs/error.go
@@ -0,0 +1,11 @@
+package codecs
+
+import "errors"
+
+var (
+ errShortPacket = errors.New("packet is not large enough")
+ errNilPacket = errors.New("invalid nil packet")
+ errTooManyPDiff = errors.New("too many PDiff")
+ errTooManySpatialLayers = errors.New("too many spatial layers")
+ errUnhandledNALUType = errors.New("NALU Type is unhandled")
+)
diff --git a/vendor/github.com/pion/rtp/codecs/g711_packet.go b/vendor/github.com/pion/rtp/codecs/g711_packet.go
new file mode 100644
index 0000000..a74876f
--- /dev/null
+++ b/vendor/github.com/pion/rtp/codecs/g711_packet.go
@@ -0,0 +1,22 @@
+package codecs
+
+// G711Payloader payloads G711 packets
+type G711Payloader struct{}
+
+// Payload fragments an G711 packet across one or more byte arrays
+func (p *G711Payloader) Payload(mtu int, payload []byte) [][]byte {
+ var out [][]byte
+ if payload == nil || mtu <= 0 {
+ return out
+ }
+
+ for len(payload) > mtu {
+ o := make([]byte, mtu)
+ copy(o, payload[:mtu])
+ payload = payload[mtu:]
+ out = append(out, o)
+ }
+ o := make([]byte, len(payload))
+ copy(o, payload)
+ return append(out, o)
+}
diff --git a/vendor/github.com/pion/rtp/codecs/g722_packet.go b/vendor/github.com/pion/rtp/codecs/g722_packet.go
new file mode 100644
index 0000000..70c9883
--- /dev/null
+++ b/vendor/github.com/pion/rtp/codecs/g722_packet.go
@@ -0,0 +1,22 @@
+package codecs
+
+// G722Payloader payloads G722 packets
+type G722Payloader struct{}
+
+// Payload fragments an G722 packet across one or more byte arrays
+func (p *G722Payloader) Payload(mtu int, payload []byte) [][]byte {
+ var out [][]byte
+ if payload == nil || mtu <= 0 {
+ return out
+ }
+
+ for len(payload) > mtu {
+ o := make([]byte, mtu)
+ copy(o, payload[:mtu])
+ payload = payload[mtu:]
+ out = append(out, o)
+ }
+ o := make([]byte, len(payload))
+ copy(o, payload)
+ return append(out, o)
+}
diff --git a/vendor/github.com/pion/rtp/codecs/h264_packet.go b/vendor/github.com/pion/rtp/codecs/h264_packet.go
new file mode 100644
index 0000000..3ee5926
--- /dev/null
+++ b/vendor/github.com/pion/rtp/codecs/h264_packet.go
@@ -0,0 +1,205 @@
+package codecs
+
+import (
+ "encoding/binary"
+ "fmt"
+)
+
+// H264Payloader payloads H264 packets
+type H264Payloader struct{}
+
+const (
+ stapaNALUType = 24
+ fuaNALUType = 28
+
+ fuaHeaderSize = 2
+ stapaHeaderSize = 1
+ stapaNALULengthSize = 2
+
+ naluTypeBitmask = 0x1F
+ naluRefIdcBitmask = 0x60
+ fuaStartBitmask = 0x80
+)
+
+func annexbNALUStartCode() []byte { return []byte{0x00, 0x00, 0x00, 0x01} }
+
+func emitNalus(nals []byte, emit func([]byte)) {
+ nextInd := func(nalu []byte, start int) (indStart int, indLen int) {
+ zeroCount := 0
+
+ for i, b := range nalu[start:] {
+ if b == 0 {
+ zeroCount++
+ continue
+ } else if b == 1 {
+ if zeroCount >= 2 {
+ return start + i - zeroCount, zeroCount + 1
+ }
+ }
+ zeroCount = 0
+ }
+ return -1, -1
+ }
+
+ nextIndStart, nextIndLen := nextInd(nals, 0)
+ if nextIndStart == -1 {
+ emit(nals)
+ } else {
+ for nextIndStart != -1 {
+ prevStart := nextIndStart + nextIndLen
+ nextIndStart, nextIndLen = nextInd(nals, prevStart)
+ if nextIndStart != -1 {
+ emit(nals[prevStart:nextIndStart])
+ } else {
+ // Emit until end of stream, no end indicator found
+ emit(nals[prevStart:])
+ }
+ }
+ }
+}
+
+// Payload fragments a H264 packet across one or more byte arrays
+func (p *H264Payloader) Payload(mtu int, payload []byte) [][]byte {
+ var payloads [][]byte
+ if len(payload) == 0 {
+ return payloads
+ }
+
+ emitNalus(payload, func(nalu []byte) {
+ if len(nalu) == 0 {
+ return
+ }
+
+ naluType := nalu[0] & naluTypeBitmask
+ naluRefIdc := nalu[0] & naluRefIdcBitmask
+
+ if naluType == 9 || naluType == 12 {
+ return
+ }
+
+ // Single NALU
+ if len(nalu) <= mtu {
+ out := make([]byte, len(nalu))
+ copy(out, nalu)
+ payloads = append(payloads, out)
+ return
+ }
+
+ // FU-A
+ maxFragmentSize := mtu - fuaHeaderSize
+
+ // The FU payload consists of fragments of the payload of the fragmented
+ // NAL unit so that if the fragmentation unit payloads of consecutive
+ // FUs are sequentially concatenated, the payload of the fragmented NAL
+ // unit can be reconstructed. The NAL unit type octet of the fragmented
+ // NAL unit is not included as such in the fragmentation unit payload,
+ // but rather the information of the NAL unit type octet of the
+ // fragmented NAL unit is conveyed in the F and NRI fields of the FU
+ // indicator octet of the fragmentation unit and in the type field of
+ // the FU header. An FU payload MAY have any number of octets and MAY
+ // be empty.
+
+ naluData := nalu
+ // According to the RFC, the first octet is skipped due to redundant information
+ naluDataIndex := 1
+ naluDataLength := len(nalu) - naluDataIndex
+ naluDataRemaining := naluDataLength
+
+ if min(maxFragmentSize, naluDataRemaining) <= 0 {
+ return
+ }
+
+ for naluDataRemaining > 0 {
+ currentFragmentSize := min(maxFragmentSize, naluDataRemaining)
+ out := make([]byte, fuaHeaderSize+currentFragmentSize)
+
+ // +---------------+
+ // |0|1|2|3|4|5|6|7|
+ // +-+-+-+-+-+-+-+-+
+ // |F|NRI| Type |
+ // +---------------+
+ out[0] = fuaNALUType
+ out[0] |= naluRefIdc
+
+ // +---------------+
+ // |0|1|2|3|4|5|6|7|
+ // +-+-+-+-+-+-+-+-+
+ // |S|E|R| Type |
+ // +---------------+
+
+ out[1] = naluType
+ if naluDataRemaining == naluDataLength {
+ // Set start bit
+ out[1] |= 1 << 7
+ } else if naluDataRemaining-currentFragmentSize == 0 {
+ // Set end bit
+ out[1] |= 1 << 6
+ }
+
+ copy(out[fuaHeaderSize:], naluData[naluDataIndex:naluDataIndex+currentFragmentSize])
+ payloads = append(payloads, out)
+
+ naluDataRemaining -= currentFragmentSize
+ naluDataIndex += currentFragmentSize
+ }
+ })
+
+ return payloads
+}
+
+// H264Packet represents the H264 header that is stored in the payload of an RTP Packet
+type H264Packet struct {
+}
+
+// Unmarshal parses the passed byte slice and stores the result in the H264Packet this method is called upon
+func (p *H264Packet) Unmarshal(payload []byte) ([]byte, error) {
+ if payload == nil {
+ return nil, errNilPacket
+ } else if len(payload) <= 2 {
+ return nil, fmt.Errorf("%w: %d <= 2", errShortPacket, len(payload))
+ }
+
+ // NALU Types
+ // https://tools.ietf.org/html/rfc6184#section-5.4
+ naluType := payload[0] & naluTypeBitmask
+ switch {
+ case naluType > 0 && naluType < 24:
+ return append(annexbNALUStartCode(), payload...), nil
+
+ case naluType == stapaNALUType:
+ currOffset := int(stapaHeaderSize)
+ result := []byte{}
+ for currOffset < len(payload) {
+ naluSize := int(binary.BigEndian.Uint16(payload[currOffset:]))
+ currOffset += stapaNALULengthSize
+
+ if len(payload) < currOffset+naluSize {
+ return nil, fmt.Errorf("%w STAP-A declared size(%d) is larger than buffer(%d)", errShortPacket, naluSize, len(payload)-currOffset)
+ }
+
+ result = append(result, annexbNALUStartCode()...)
+ result = append(result, payload[currOffset:currOffset+naluSize]...)
+ currOffset += naluSize
+ }
+ return result, nil
+
+ case naluType == fuaNALUType:
+ if len(payload) < fuaHeaderSize {
+ return nil, errShortPacket
+ }
+
+ if payload[1]&fuaStartBitmask != 0 {
+ naluRefIdc := payload[0] & naluRefIdcBitmask
+ fragmentedNaluType := payload[1] & naluTypeBitmask
+
+ // Take a copy of payload since we are mutating it.
+ payloadCopy := append([]byte{}, payload...)
+ payloadCopy[fuaHeaderSize-1] = naluRefIdc | fragmentedNaluType
+ return append(annexbNALUStartCode(), payloadCopy[fuaHeaderSize-1:]...), nil
+ }
+
+ return payload[fuaHeaderSize:], nil
+ }
+
+ return nil, fmt.Errorf("%w: %d", errUnhandledNALUType, naluType)
+}
diff --git a/vendor/github.com/pion/rtp/codecs/opus_packet.go b/vendor/github.com/pion/rtp/codecs/opus_packet.go
new file mode 100644
index 0000000..504741f
--- /dev/null
+++ b/vendor/github.com/pion/rtp/codecs/opus_packet.go
@@ -0,0 +1,44 @@
+package codecs
+
+// OpusPayloader payloads Opus packets
+type OpusPayloader struct{}
+
+// Payload fragments an Opus packet across one or more byte arrays
+func (p *OpusPayloader) Payload(mtu int, payload []byte) [][]byte {
+ if payload == nil {
+ return [][]byte{}
+ }
+
+ out := make([]byte, len(payload))
+ copy(out, payload)
+ return [][]byte{out}
+}
+
+// OpusPacket represents the Opus header that is stored in the payload of an RTP Packet
+type OpusPacket struct {
+ Payload []byte
+}
+
+// Unmarshal parses the passed byte slice and stores the result in the OpusPacket this method is called upon
+func (p *OpusPacket) Unmarshal(packet []byte) ([]byte, error) {
+ if packet == nil {
+ return nil, errNilPacket
+ } else if len(packet) == 0 {
+ return nil, errShortPacket
+ }
+
+ p.Payload = packet
+ return packet, nil
+}
+
+// OpusPartitionHeadChecker checks Opus partition head
+type OpusPartitionHeadChecker struct{}
+
+// IsPartitionHead checks whether if this is a head of the Opus partition
+func (*OpusPartitionHeadChecker) IsPartitionHead(packet []byte) bool {
+ p := &OpusPacket{}
+ if _, err := p.Unmarshal(packet); err != nil {
+ return false
+ }
+ return true
+}
diff --git a/vendor/github.com/pion/rtp/codecs/vp8_packet.go b/vendor/github.com/pion/rtp/codecs/vp8_packet.go
new file mode 100644
index 0000000..7ade7da
--- /dev/null
+++ b/vendor/github.com/pion/rtp/codecs/vp8_packet.go
@@ -0,0 +1,143 @@
+package codecs
+
+// VP8Payloader payloads VP8 packets
+type VP8Payloader struct{}
+
+const (
+ vp8HeaderSize = 1
+)
+
+// Payload fragments a VP8 packet across one or more byte arrays
+func (p *VP8Payloader) Payload(mtu int, payload []byte) [][]byte {
+ /*
+ * https://tools.ietf.org/html/rfc7741#section-4.2
+ *
+ * 0 1 2 3 4 5 6 7
+ * +-+-+-+-+-+-+-+-+
+ * |X|R|N|S|R| PID | (REQUIRED)
+ * +-+-+-+-+-+-+-+-+
+ * X: |I|L|T|K| RSV | (OPTIONAL)
+ * +-+-+-+-+-+-+-+-+
+ * I: |M| PictureID | (OPTIONAL)
+ * +-+-+-+-+-+-+-+-+
+ * L: | TL0PICIDX | (OPTIONAL)
+ * +-+-+-+-+-+-+-+-+
+ * T/K: |TID|Y| KEYIDX | (OPTIONAL)
+ * +-+-+-+-+-+-+-+-+
+ * S: Start of VP8 partition. SHOULD be set to 1 when the first payload
+ * octet of the RTP packet is the beginning of a new VP8 partition,
+ * and MUST NOT be 1 otherwise. The S bit MUST be set to 1 for the
+ * first packet of each encoded frame.
+ */
+
+ maxFragmentSize := mtu - vp8HeaderSize
+
+ payloadData := payload
+ payloadDataRemaining := len(payload)
+
+ payloadDataIndex := 0
+ var payloads [][]byte
+
+ // Make sure the fragment/payload size is correct
+ if min(maxFragmentSize, payloadDataRemaining) <= 0 {
+ return payloads
+ }
+ for payloadDataRemaining > 0 {
+ currentFragmentSize := min(maxFragmentSize, payloadDataRemaining)
+ out := make([]byte, vp8HeaderSize+currentFragmentSize)
+ if payloadDataRemaining == len(payload) {
+ out[0] = 0x10
+ }
+
+ copy(out[vp8HeaderSize:], payloadData[payloadDataIndex:payloadDataIndex+currentFragmentSize])
+ payloads = append(payloads, out)
+
+ payloadDataRemaining -= currentFragmentSize
+ payloadDataIndex += currentFragmentSize
+ }
+
+ return payloads
+}
+
+// VP8Packet represents the VP8 header that is stored in the payload of an RTP Packet
+type VP8Packet struct {
+ // Required Header
+ X uint8 /* extended controlbits present */
+ N uint8 /* (non-reference frame) when set to 1 this frame can be discarded */
+ S uint8 /* start of VP8 partition */
+ PID uint8 /* partition index */
+
+ // Optional Header
+ I uint8 /* 1 if PictureID is present */
+ L uint8 /* 1 if TL0PICIDX is present */
+ T uint8 /* 1 if TID is present */
+ K uint8 /* 1 if KEYIDX is present */
+ PictureID uint16 /* 8 or 16 bits, picture ID */
+ TL0PICIDX uint8 /* 8 bits temporal level zero index */
+
+ Payload []byte
+}
+
+// Unmarshal parses the passed byte slice and stores the result in the VP8Packet this method is called upon
+func (p *VP8Packet) Unmarshal(payload []byte) ([]byte, error) {
+ if payload == nil {
+ return nil, errNilPacket
+ }
+
+ payloadLen := len(payload)
+
+ if payloadLen < 4 {
+ return nil, errShortPacket
+ }
+
+ payloadIndex := 0
+
+ p.X = (payload[payloadIndex] & 0x80) >> 7
+ p.N = (payload[payloadIndex] & 0x20) >> 5
+ p.S = (payload[payloadIndex] & 0x10) >> 4
+ p.PID = payload[payloadIndex] & 0x07
+
+ payloadIndex++
+
+ if p.X == 1 {
+ p.I = (payload[payloadIndex] & 0x80) >> 7
+ p.L = (payload[payloadIndex] & 0x40) >> 6
+ p.T = (payload[payloadIndex] & 0x20) >> 5
+ p.K = (payload[payloadIndex] & 0x10) >> 4
+ payloadIndex++
+ }
+
+ if p.I == 1 { // PID present?
+ if payload[payloadIndex]&0x80 > 0 { // M == 1, PID is 16bit
+ payloadIndex += 2
+ } else {
+ payloadIndex++
+ }
+ }
+
+ if p.L == 1 {
+ payloadIndex++
+ }
+
+ if p.T == 1 || p.K == 1 {
+ payloadIndex++
+ }
+
+ if payloadIndex >= payloadLen {
+ return nil, errShortPacket
+ }
+ p.Payload = payload[payloadIndex:]
+ return p.Payload, nil
+}
+
+// VP8PartitionHeadChecker checks VP8 partition head
+type VP8PartitionHeadChecker struct{}
+
+// IsPartitionHead checks whether if this is a head of the VP8 partition
+func (*VP8PartitionHeadChecker) IsPartitionHead(packet []byte) bool {
+ p := &VP8Packet{}
+ if _, err := p.Unmarshal(packet); err != nil {
+ return false
+ }
+ return p.S == 1
+}
diff --git a/vendor/github.com/pion/rtp/codecs/vp9_packet.go b/vendor/github.com/pion/rtp/codecs/vp9_packet.go
new file mode 100644
index 0000000..5cb619b
--- /dev/null
+++ b/vendor/github.com/pion/rtp/codecs/vp9_packet.go
@@ -0,0 +1,385 @@
+package codecs
+
+import (
+ "github.com/pion/randutil"
+)
+
+// Use global random generator to properly seed by crypto grade random.
+var globalMathRandomGenerator = randutil.NewMathRandomGenerator() // nolint:gochecknoglobals
+
+// VP9Payloader payloads VP9 packets
+type VP9Payloader struct {
+ pictureID uint16
+ initialized bool
+
+ // InitialPictureIDFn is a function that returns random initial picture ID.
+ InitialPictureIDFn func() uint16
+}
+
+const (
+ vp9HeaderSize = 3 // Flexible mode 15 bit picture ID
+ maxSpatialLayers = 5
+ maxVP9RefPics = 3
+)
+
+// Payload fragments an VP9 packet across one or more byte arrays
+func (p *VP9Payloader) Payload(mtu int, payload []byte) [][]byte {
+ /*
+ * https://www.ietf.org/id/draft-ietf-payload-vp9-10.txt
+ *
+ * Flexible mode (F=1)
+ * 0 1 2 3 4 5 6 7
+ * +-+-+-+-+-+-+-+-+
+ * |I|P|L|F|B|E|V|-| (REQUIRED)
+ * +-+-+-+-+-+-+-+-+
+ * I: |M| PICTURE ID | (REQUIRED)
+ * +-+-+-+-+-+-+-+-+
+ * M: | EXTENDED PID | (RECOMMENDED)
+ * +-+-+-+-+-+-+-+-+
+ * L: | TID |U| SID |D| (CONDITIONALLY RECOMMENDED)
+ * +-+-+-+-+-+-+-+-+ -\
+ * P,F: | P_DIFF |N| (CONDITIONALLY REQUIRED) - up to 3 times
+ * +-+-+-+-+-+-+-+-+ -/
+ * V: | SS |
+ * | .. |
+ * +-+-+-+-+-+-+-+-+
+ *
+ * Non-flexible mode (F=0)
+ * 0 1 2 3 4 5 6 7
+ * +-+-+-+-+-+-+-+-+
+ * |I|P|L|F|B|E|V|-| (REQUIRED)
+ * +-+-+-+-+-+-+-+-+
+ * I: |M| PICTURE ID | (RECOMMENDED)
+ * +-+-+-+-+-+-+-+-+
+ * M: | EXTENDED PID | (RECOMMENDED)
+ * +-+-+-+-+-+-+-+-+
+ * L: | TID |U| SID |D| (CONDITIONALLY RECOMMENDED)
+ * +-+-+-+-+-+-+-+-+
+ * | TL0PICIDX | (CONDITIONALLY REQUIRED)
+ * +-+-+-+-+-+-+-+-+
+ * V: | SS |
+ * | .. |
+ * +-+-+-+-+-+-+-+-+
+ */
+
+ if !p.initialized {
+ if p.InitialPictureIDFn == nil {
+ p.InitialPictureIDFn = func() uint16 {
+ return uint16(globalMathRandomGenerator.Intn(0x7FFF))
+ }
+ }
+ p.pictureID = p.InitialPictureIDFn() & 0x7FFF
+ p.initialized = true
+ }
+ if payload == nil {
+ return [][]byte{}
+ }
+
+ maxFragmentSize := mtu - vp9HeaderSize
+ payloadDataRemaining := len(payload)
+ payloadDataIndex := 0
+
+ if min(maxFragmentSize, payloadDataRemaining) <= 0 {
+ return [][]byte{}
+ }
+
+ var payloads [][]byte
+ for payloadDataRemaining > 0 {
+ currentFragmentSize := min(maxFragmentSize, payloadDataRemaining)
+ out := make([]byte, vp9HeaderSize+currentFragmentSize)
+
+ out[0] = 0x90 // F=1 I=1
+ if payloadDataIndex == 0 {
+ out[0] |= 0x08 // B=1
+ }
+ if payloadDataRemaining == currentFragmentSize {
+ out[0] |= 0x04 // E=1
+ }
+ out[1] = byte(p.pictureID>>8) | 0x80
+ out[2] = byte(p.pictureID)
+ copy(out[vp9HeaderSize:], payload[payloadDataIndex:payloadDataIndex+currentFragmentSize])
+ payloads = append(payloads, out)
+
+ payloadDataRemaining -= currentFragmentSize
+ payloadDataIndex += currentFragmentSize
+ }
+ p.pictureID++
+ if p.pictureID >= 0x8000 {
+ p.pictureID = 0
+ }
+
+ return payloads
+}
+
+// VP9Packet represents the VP9 header that is stored in the payload of an RTP Packet
+type VP9Packet struct {
+ // Required header
+ I bool // PictureID is present
+ P bool // Inter-picture predicted frame
+ L bool // Layer indices is present
+ F bool // Flexible mode
+ B bool // Start of a frame
+ E bool // End of a frame
+ V bool // Scalability structure (SS) data present
+
+ // Recommended headers
+ PictureID uint16 // 7 or 16 bits, picture ID
+
+ // Conditionally recommended headers
+ TID uint8 // Temporal layer ID
+ U bool // Switching up point
+ SID uint8 // Spatial layer ID
+ D bool // Inter-layer dependency used
+
+ // Conditionally required headers
+ PDiff []uint8 // Reference index (F=1)
+ TL0PICIDX uint8 // Temporal layer zero index (F=0)
+
+ // Scalability structure headers
+ NS uint8 // N_S + 1 indicates the number of spatial layers present in the VP9 stream
+ Y bool // Each spatial layer's frame resolution present
+ G bool // PG description present flag.
+ NG uint8 // N_G indicates the number of pictures in a Picture Group (PG)
+ Width []uint16
+ Height []uint16
+ PGTID []uint8 // Temporal layer ID of pictures in a Picture Group
+ PGU []bool // Switching up point of pictures in a Picture Group
+ PGPDiff [][]uint8 // Reference indecies of pictures in a Picture Group
+
+ Payload []byte
+}
+
+// Unmarshal parses the passed byte slice and stores the result in the VP9Packet this method is called upon
+func (p *VP9Packet) Unmarshal(packet []byte) ([]byte, error) {
+ if packet == nil {
+ return nil, errNilPacket
+ }
+ if len(packet) < 1 {
+ return nil, errShortPacket
+ }
+
+ p.I = packet[0]&0x80 != 0
+ p.P = packet[0]&0x40 != 0
+ p.L = packet[0]&0x20 != 0
+ p.F = packet[0]&0x10 != 0
+ p.B = packet[0]&0x08 != 0
+ p.E = packet[0]&0x04 != 0
+ p.V = packet[0]&0x02 != 0
+
+ pos := 1
+ var err error
+
+ if p.I {
+ pos, err = p.parsePictureID(packet, pos)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ if p.L {
+ pos, err = p.parseLayerInfo(packet, pos)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ if p.F && p.P {
+ pos, err = p.parseRefIndices(packet, pos)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ if p.V {
+ pos, err = p.parseSSData(packet, pos)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ p.Payload = packet[pos:]
+ return p.Payload, nil
+}
+
+// Picture ID:
+//
+// +-+-+-+-+-+-+-+-+
+// I: |M| PICTURE ID | M:0 => picture id is 7 bits.
+// +-+-+-+-+-+-+-+-+ M:1 => picture id is 15 bits.
+// M: | EXTENDED PID |
+// +-+-+-+-+-+-+-+-+
+//
+func (p *VP9Packet) parsePictureID(packet []byte, pos int) (int, error) {
+ if len(packet) <= pos {
+ return pos, errShortPacket
+ }
+
+ p.PictureID = uint16(packet[pos] & 0x7F)
+ if packet[pos]&0x80 != 0 {
+ pos++
+ if len(packet) <= pos {
+ return pos, errShortPacket
+ }
+ p.PictureID = p.PictureID<<8 | uint16(packet[pos])
+ }
+ pos++
+ return pos, nil
+}
+
+func (p *VP9Packet) parseLayerInfo(packet []byte, pos int) (int, error) {
+ pos, err := p.parseLayerInfoCommon(packet, pos)
+ if err != nil {
+ return pos, err
+ }
+
+ if p.F {
+ return pos, nil
+ }
+
+ return p.parseLayerInfoNonFlexibleMode(packet, pos)
+}
+
+// Layer indices (flexible mode):
+//
+// +-+-+-+-+-+-+-+-+
+// L: | T |U| S |D|
+// +-+-+-+-+-+-+-+-+
+//
+func (p *VP9Packet) parseLayerInfoCommon(packet []byte, pos int) (int, error) {
+ if len(packet) <= pos {
+ return pos, errShortPacket
+ }
+
+ p.TID = packet[pos] >> 5
+ p.U = packet[pos]&0x10 != 0
+ p.SID = (packet[pos] >> 1) & 0x7
+ p.D = packet[pos]&0x01 != 0
+
+ if p.SID >= maxSpatialLayers {
+ return pos, errTooManySpatialLayers
+ }
+
+ pos++
+ return pos, nil
+}
+
+// Layer indices (non-flexible mode):
+//
+// +-+-+-+-+-+-+-+-+
+// L: | T |U| S |D|
+// +-+-+-+-+-+-+-+-+
+// | TL0PICIDX |
+// +-+-+-+-+-+-+-+-+
+//
+func (p *VP9Packet) parseLayerInfoNonFlexibleMode(packet []byte, pos int) (int, error) {
+ if len(packet) <= pos {
+ return pos, errShortPacket
+ }
+
+ p.TL0PICIDX = packet[pos]
+ pos++
+ return pos, nil
+}
+
+// Reference indices:
+//
+// +-+-+-+-+-+-+-+-+ P=1,F=1: At least one reference index
+// P,F: | P_DIFF |N| up to 3 times has to be specified.
+// +-+-+-+-+-+-+-+-+ N=1: An additional P_DIFF follows
+// current P_DIFF.
+//
+func (p *VP9Packet) parseRefIndices(packet []byte, pos int) (int, error) {
+ for {
+ if len(packet) <= pos {
+ return pos, errShortPacket
+ }
+ p.PDiff = append(p.PDiff, packet[pos]>>1)
+ if packet[pos]&0x01 == 0 {
+ break
+ }
+ if len(p.PDiff) >= maxVP9RefPics {
+ return pos, errTooManyPDiff
+ }
+ pos++
+ }
+ pos++
+
+ return pos, nil
+}
+
+// Scalability structure (SS):
+//
+// +-+-+-+-+-+-+-+-+
+// V: | N_S |Y|G|-|-|-|
+// +-+-+-+-+-+-+-+-+ -|
+// Y: | WIDTH | (OPTIONAL) .
+// + + .
+// | | (OPTIONAL) .
+// +-+-+-+-+-+-+-+-+ . N_S + 1 times
+// | HEIGHT | (OPTIONAL) .
+// + + .
+// | | (OPTIONAL) .
+// +-+-+-+-+-+-+-+-+ -|
+// G: | N_G | (OPTIONAL)
+// +-+-+-+-+-+-+-+-+ -|
+// N_G: | T |U| R |-|-| (OPTIONAL) .
+// +-+-+-+-+-+-+-+-+ -| . N_G times
+// | P_DIFF | (OPTIONAL) . R times .
+// +-+-+-+-+-+-+-+-+ -| -|
+//
+func (p *VP9Packet) parseSSData(packet []byte, pos int) (int, error) {
+ if len(packet) <= pos {
+ return pos, errShortPacket
+ }
+
+ p.NS = packet[pos] >> 5
+ p.Y = packet[pos]&0x10 != 0
+ p.G = (packet[pos]>>1)&0x7 != 0
+ pos++
+
+ NS := p.NS + 1
+ p.NG = 0
+
+ if p.Y {
+ p.Width = make([]uint16, NS)
+ p.Height = make([]uint16, NS)
+ for i := 0; i < int(NS); i++ {
+ p.Width[i] = uint16(packet[pos])<<8 | uint16(packet[pos+1])
+ pos += 2
+ p.Height[i] = uint16(packet[pos])<<8 | uint16(packet[pos+1])
+ pos += 2
+ }
+ }
+
+ if p.G {
+ p.NG = packet[pos]
+ pos++
+ }
+
+ for i := 0; i < int(p.NG); i++ {
+ p.PGTID = append(p.PGTID, packet[pos]>>5)
+ p.PGU = append(p.PGU, packet[pos]&0x10 != 0)
+ R := (packet[pos] >> 2) & 0x3
+ pos++
+
+ p.PGPDiff = append(p.PGPDiff, []uint8{})
+ for j := 0; j < int(R); j++ {
+ p.PGPDiff[i] = append(p.PGPDiff[i], packet[pos])
+ pos++
+ }
+ }
+
+ return pos, nil
+}
+
+// VP9PartitionHeadChecker checks VP9 partition head
+type VP9PartitionHeadChecker struct{}
+
+// IsPartitionHead checks whether if this is a head of the VP9 partition
+func (*VP9PartitionHeadChecker) IsPartitionHead(packet []byte) bool {
+ p := &VP9Packet{}
+ if _, err := p.Unmarshal(packet); err != nil {
+ return false
+ }
+ return p.B
+}
diff --git a/vendor/github.com/pion/rtp/depacketizer.go b/vendor/github.com/pion/rtp/depacketizer.go
new file mode 100644
index 0000000..b8c09da
--- /dev/null
+++ b/vendor/github.com/pion/rtp/depacketizer.go
@@ -0,0 +1,6 @@
+package rtp
+
+// Depacketizer depacketizes a RTP payload, removing any RTP specific data from the payload
+type Depacketizer interface {
+ Unmarshal(packet []byte) ([]byte, error)
+}
diff --git a/vendor/github.com/pion/rtp/error.go b/vendor/github.com/pion/rtp/error.go
new file mode 100644
index 0000000..5458c6f
--- /dev/null
+++ b/vendor/github.com/pion/rtp/error.go
@@ -0,0 +1,21 @@
+package rtp
+
+import (
+ "errors"
+)
+
+var (
+ errHeaderSizeInsufficient = errors.New("RTP header size insufficient")
+ errHeaderSizeInsufficientForExtension = errors.New("RTP header size insufficient for extension")
+ errTooSmall = errors.New("buffer too small")
+ errHeaderExtensionsNotEnabled = errors.New("h.Extension not enabled")
+ errHeaderExtensionNotFound = errors.New("extension not found")
+
+ errRFC8285OneByteHeaderIDRange = errors.New("header extension id must be between 1 and 14 for RFC 5285 one byte extensions")
+ errRFC8285OneByteHeaderSize = errors.New("header extension payload must be 16bytes or less for RFC 5285 one byte extensions")
+
+ errRFC8285TwoByteHeaderIDRange = errors.New("header extension id must be between 1 and 255 for RFC 5285 two byte extensions")
+ errRFC8285TwoByteHeaderSize = errors.New("header extension payload must be 255bytes or less for RFC 5285 two byte extensions")
+
+ errRFC3550HeaderIDRange = errors.New("header extension id must be 0 for non-RFC 5285 extensions")
+)
diff --git a/vendor/github.com/pion/rtp/go.mod b/vendor/github.com/pion/rtp/go.mod
new file mode 100644
index 0000000..412ae63
--- /dev/null
+++ b/vendor/github.com/pion/rtp/go.mod
@@ -0,0 +1,5 @@
+module github.com/pion/rtp
+
+go 1.13
+
+require github.com/pion/randutil v0.1.0
diff --git a/vendor/github.com/pion/rtp/go.sum b/vendor/github.com/pion/rtp/go.sum
new file mode 100644
index 0000000..401b903
--- /dev/null
+++ b/vendor/github.com/pion/rtp/go.sum
@@ -0,0 +1,2 @@
+github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
+github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
diff --git a/vendor/github.com/pion/rtp/packet.go b/vendor/github.com/pion/rtp/packet.go
new file mode 100644
index 0000000..b237b0a
--- /dev/null
+++ b/vendor/github.com/pion/rtp/packet.go
@@ -0,0 +1,490 @@
+package rtp
+
+import (
+ "encoding/binary"
+ "fmt"
+ "io"
+)
+
+// Extension RTP Header extension
+type Extension struct {
+ id uint8
+ payload []byte
+}
+
+// Header represents an RTP packet header
+// NOTE: PayloadOffset is populated by Marshal/Unmarshal and should not be modified
+type Header struct {
+ Version uint8
+ Padding bool
+ Extension bool
+ Marker bool
+ PayloadOffset int
+ PayloadType uint8
+ SequenceNumber uint16
+ Timestamp uint32
+ SSRC uint32
+ CSRC []uint32
+ ExtensionProfile uint16
+ Extensions []Extension
+}
+
+// Packet represents an RTP Packet
+// NOTE: Raw is populated by Marshal/Unmarshal and should not be modified
+type Packet struct {
+ Header
+ Raw []byte
+ Payload []byte
+}
+
+const (
+ headerLength = 4
+ versionShift = 6
+ versionMask = 0x3
+ paddingShift = 5
+ paddingMask = 0x1
+ extensionShift = 4
+ extensionMask = 0x1
+ extensionProfileOneByte = 0xBEDE
+ extensionProfileTwoByte = 0x1000
+ extensionIDReserved = 0xF
+ ccMask = 0xF
+ markerShift = 7
+ markerMask = 0x1
+ ptMask = 0x7F
+ seqNumOffset = 2
+ seqNumLength = 2
+ timestampOffset = 4
+ timestampLength = 4
+ ssrcOffset = 8
+ ssrcLength = 4
+ csrcOffset = 12
+ csrcLength = 4
+)
+
+// String helps with debugging by printing packet information in a readable way
+func (p Packet) String() string {
+ out := "RTP PACKET:\n"
+
+ out += fmt.Sprintf("\tVersion: %v\n", p.Version)
+ out += fmt.Sprintf("\tMarker: %v\n", p.Marker)
+ out += fmt.Sprintf("\tPayload Type: %d\n", p.PayloadType)
+ out += fmt.Sprintf("\tSequence Number: %d\n", p.SequenceNumber)
+ out += fmt.Sprintf("\tTimestamp: %d\n", p.Timestamp)
+ out += fmt.Sprintf("\tSSRC: %d (%x)\n", p.SSRC, p.SSRC)
+ out += fmt.Sprintf("\tPayload Length: %d\n", len(p.Payload))
+
+ return out
+}
+
+// Unmarshal parses the passed byte slice and stores the result in the Header this method is called upon
+func (h *Header) Unmarshal(rawPacket []byte) error { //nolint:gocognit
+ if len(rawPacket) < headerLength {
+ return fmt.Errorf("%w: %d < %d", errHeaderSizeInsufficient, len(rawPacket), headerLength)
+ }
+
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |V=2|P|X| CC |M| PT | sequence number |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | timestamp |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | synchronization source (SSRC) identifier |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * | contributing source (CSRC) identifiers |
+ * | .... |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+ h.Version = rawPacket[0] >> versionShift & versionMask
+ h.Padding = (rawPacket[0] >> paddingShift & paddingMask) > 0
+ h.Extension = (rawPacket[0] >> extensionShift & extensionMask) > 0
+ nCSRC := int(rawPacket[0] & ccMask)
+ if cap(h.CSRC) < nCSRC || h.CSRC == nil {
+ h.CSRC = make([]uint32, nCSRC)
+ } else {
+ h.CSRC = h.CSRC[:nCSRC]
+ }
+
+ currOffset := csrcOffset + (nCSRC * csrcLength)
+ if len(rawPacket) < currOffset {
+ return fmt.Errorf("size %d < %d: %w", len(rawPacket), currOffset, errHeaderSizeInsufficient)
+ }
+
+ h.Marker = (rawPacket[1] >> markerShift & markerMask) > 0
+ h.PayloadType = rawPacket[1] & ptMask
+
+ h.SequenceNumber = binary.BigEndian.Uint16(rawPacket[seqNumOffset : seqNumOffset+seqNumLength])
+ h.Timestamp = binary.BigEndian.Uint32(rawPacket[timestampOffset : timestampOffset+timestampLength])
+ h.SSRC = binary.BigEndian.Uint32(rawPacket[ssrcOffset : ssrcOffset+ssrcLength])
+
+ for i := range h.CSRC {
+ offset := csrcOffset + (i * csrcLength)
+ h.CSRC[i] = binary.BigEndian.Uint32(rawPacket[offset:])
+ }
+
+ if h.Extensions != nil {
+ h.Extensions = h.Extensions[:0]
+ }
+
+ if h.Extension {
+ if expected := currOffset + 4; len(rawPacket) < expected {
+ return fmt.Errorf("size %d < %d: %w",
+ len(rawPacket), expected,
+ errHeaderSizeInsufficientForExtension,
+ )
+ }
+
+ h.ExtensionProfile = binary.BigEndian.Uint16(rawPacket[currOffset:])
+ currOffset += 2
+ extensionLength := int(binary.BigEndian.Uint16(rawPacket[currOffset:])) * 4
+ currOffset += 2
+
+ if expected := currOffset + extensionLength; len(rawPacket) < expected {
+ return fmt.Errorf("size %d < %d: %w",
+ len(rawPacket), expected,
+ errHeaderSizeInsufficientForExtension,
+ )
+ }
+
+ switch h.ExtensionProfile {
+ // RFC 8285 RTP One Byte Header Extension
+ case extensionProfileOneByte:
+ end := currOffset + extensionLength
+ for currOffset < end {
+ if rawPacket[currOffset] == 0x00 { // padding
+ currOffset++
+ continue
+ }
+
+ extid := rawPacket[currOffset] >> 4
+ len := int(rawPacket[currOffset]&^0xF0 + 1)
+ currOffset++
+
+ if extid == extensionIDReserved {
+ break
+ }
+
+ extension := Extension{id: extid, payload: rawPacket[currOffset : currOffset+len]}
+ h.Extensions = append(h.Extensions, extension)
+ currOffset += len
+ }
+
+ // RFC 8285 RTP Two Byte Header Extension
+ case extensionProfileTwoByte:
+ end := currOffset + extensionLength
+ for currOffset < end {
+ if rawPacket[currOffset] == 0x00 { // padding
+ currOffset++
+ continue
+ }
+
+ extid := rawPacket[currOffset]
+ currOffset++
+
+ len := int(rawPacket[currOffset])
+ currOffset++
+
+ extension := Extension{id: extid, payload: rawPacket[currOffset : currOffset+len]}
+ h.Extensions = append(h.Extensions, extension)
+ currOffset += len
+ }
+
+ default: // RFC3550 Extension
+ if len(rawPacket) < currOffset+extensionLength {
+ return fmt.Errorf("%w: %d < %d", errHeaderSizeInsufficientForExtension, len(rawPacket), currOffset+extensionLength)
+ }
+
+ extension := Extension{id: 0, payload: rawPacket[currOffset : currOffset+extensionLength]}
+ h.Extensions = append(h.Extensions, extension)
+ currOffset += len(h.Extensions[0].payload)
+ }
+ }
+
+ h.PayloadOffset = currOffset
+
+ return nil
+}
+
+// Unmarshal parses the passed byte slice and stores the result in the Packet this method is called upon
+func (p *Packet) Unmarshal(rawPacket []byte) error {
+ if err := p.Header.Unmarshal(rawPacket); err != nil {
+ return err
+ }
+
+ p.Payload = rawPacket[p.PayloadOffset:]
+ p.Raw = rawPacket
+ return nil
+}
+
+// Marshal serializes the header into bytes.
+func (h *Header) Marshal() (buf []byte, err error) {
+ buf = make([]byte, h.MarshalSize())
+
+ n, err := h.MarshalTo(buf)
+ if err != nil {
+ return nil, err
+ }
+
+ return buf[:n], nil
+}
+
+// MarshalTo serializes the header and writes to the buffer.
+func (h *Header) MarshalTo(buf []byte) (n int, err error) {
+ /*
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |V=2|P|X| CC |M| PT | sequence number |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | timestamp |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | synchronization source (SSRC) identifier |
+ * +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+ * | contributing source (CSRC) identifiers |
+ * | .... |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+ size := h.MarshalSize()
+ if size > len(buf) {
+ return 0, io.ErrShortBuffer
+ }
+
+ // The first byte contains the version, padding bit, extension bit, and csrc size
+ buf[0] = (h.Version << versionShift) | uint8(len(h.CSRC))
+ if h.Padding {
+ buf[0] |= 1 << paddingShift
+ }
+
+ if h.Extension {
+ buf[0] |= 1 << extensionShift
+ }
+
+ // The second byte contains the marker bit and payload type.
+ buf[1] = h.PayloadType
+ if h.Marker {
+ buf[1] |= 1 << markerShift
+ }
+
+ binary.BigEndian.PutUint16(buf[2:4], h.SequenceNumber)
+ binary.BigEndian.PutUint32(buf[4:8], h.Timestamp)
+ binary.BigEndian.PutUint32(buf[8:12], h.SSRC)
+
+ n = 12
+ for _, csrc := range h.CSRC {
+ binary.BigEndian.PutUint32(buf[n:n+4], csrc)
+ n += 4
+ }
+
+ if h.Extension {
+ extHeaderPos := n
+ binary.BigEndian.PutUint16(buf[n+0:n+2], h.ExtensionProfile)
+ n += 4
+ startExtensionsPos := n
+
+ switch h.ExtensionProfile {
+ // RFC 8285 RTP One Byte Header Extension
+ case extensionProfileOneByte:
+ for _, extension := range h.Extensions {
+ buf[n] = extension.id<<4 | (uint8(len(extension.payload)) - 1)
+ n++
+ n += copy(buf[n:], extension.payload)
+ }
+ // RFC 8285 RTP Two Byte Header Extension
+ case extensionProfileTwoByte:
+ for _, extension := range h.Extensions {
+ buf[n] = extension.id
+ n++
+ buf[n] = uint8(len(extension.payload))
+ n++
+ n += copy(buf[n:], extension.payload)
+ }
+ default: // RFC3550 Extension
+ extlen := len(h.Extensions[0].payload)
+ if extlen%4 != 0 {
+ // the payload must be in 32-bit words.
+ return 0, io.ErrShortBuffer
+ }
+ n += copy(buf[n:], h.Extensions[0].payload)
+ }
+
+ // calculate extensions size and round to 4 bytes boundaries
+ extSize := n - startExtensionsPos
+ roundedExtSize := ((extSize + 3) / 4) * 4
+
+ binary.BigEndian.PutUint16(buf[extHeaderPos+2:extHeaderPos+4], uint16(roundedExtSize/4))
+
+ // add padding to reach 4 bytes boundaries
+ for i := 0; i < roundedExtSize-extSize; i++ {
+ buf[n] = 0
+ n++
+ }
+ }
+
+ h.PayloadOffset = n
+
+ return n, nil
+}
+
+// MarshalSize returns the size of the header once marshaled.
+func (h *Header) MarshalSize() int {
+ // NOTE: Be careful to match the MarshalTo() method.
+ size := 12 + (len(h.CSRC) * csrcLength)
+
+ if h.Extension {
+ extSize := 4
+
+ switch h.ExtensionProfile {
+ // RFC 8285 RTP One Byte Header Extension
+ case extensionProfileOneByte:
+ for _, extension := range h.Extensions {
+ extSize += 1 + len(extension.payload)
+ }
+ // RFC 8285 RTP Two Byte Header Extension
+ case extensionProfileTwoByte:
+ for _, extension := range h.Extensions {
+ extSize += 2 + len(extension.payload)
+ }
+ default:
+ extSize += len(h.Extensions[0].payload)
+ }
+
+ // extensions size must have 4 bytes boundaries
+ size += ((extSize + 3) / 4) * 4
+ }
+
+ return size
+}
+
+// SetExtension sets an RTP header extension
+func (h *Header) SetExtension(id uint8, payload []byte) error { //nolint:gocognit
+ if h.Extension {
+ switch h.ExtensionProfile {
+ // RFC 8285 RTP One Byte Header Extension
+ case extensionProfileOneByte:
+ if id < 1 || id > 14 {
+ return fmt.Errorf("%w actual(%d)", errRFC8285OneByteHeaderIDRange, id)
+ }
+ if len(payload) > 16 {
+ return fmt.Errorf("%w actual(%d)", errRFC8285OneByteHeaderSize, len(payload))
+ }
+ // RFC 8285 RTP Two Byte Header Extension
+ case extensionProfileTwoByte:
+ if id < 1 || id > 255 {
+ return fmt.Errorf("%w actual(%d)", errRFC8285TwoByteHeaderIDRange, id)
+ }
+ if len(payload) > 255 {
+ return fmt.Errorf("%w actual(%d)", errRFC8285TwoByteHeaderSize, len(payload))
+ }
+ default: // RFC3550 Extension
+ if id != 0 {
+ return fmt.Errorf("%w actual(%d)", errRFC3550HeaderIDRange, id)
+ }
+ }
+
+ // Update existing if it exists else add new extension
+ for i, extension := range h.Extensions {
+ if extension.id == id {
+ h.Extensions[i].payload = payload
+ return nil
+ }
+ }
+ h.Extensions = append(h.Extensions, Extension{id: id, payload: payload})
+ return nil
+ }
+
+ // No existing header extensions
+ h.Extension = true
+
+ switch len := len(payload); {
+ case len <= 16:
+ h.ExtensionProfile = extensionProfileOneByte
+ case len > 16 && len < 256:
+ h.ExtensionProfile = extensionProfileTwoByte
+ }
+
+ h.Extensions = append(h.Extensions, Extension{id: id, payload: payload})
+ return nil
+}
+
+// GetExtensionIDs returns an extension id array
+func (h *Header) GetExtensionIDs() []uint8 {
+ if !h.Extension {
+ return nil
+ }
+
+ if len(h.Extensions) == 0 {
+ return nil
+ }
+
+ ids := make([]uint8, 0, len(h.Extensions))
+ for _, extension := range h.Extensions {
+ ids = append(ids, extension.id)
+ }
+ return ids
+}
+
+// GetExtension returns an RTP header extension
+func (h *Header) GetExtension(id uint8) []byte {
+ if !h.Extension {
+ return nil
+ }
+ for _, extension := range h.Extensions {
+ if extension.id == id {
+ return extension.payload
+ }
+ }
+ return nil
+}
+
+// DelExtension Removes an RTP Header extension
+func (h *Header) DelExtension(id uint8) error {
+ if !h.Extension {
+ return errHeaderExtensionsNotEnabled
+ }
+ for i, extension := range h.Extensions {
+ if extension.id == id {
+ h.Extensions = append(h.Extensions[:i], h.Extensions[i+1:]...)
+ return nil
+ }
+ }
+ return errHeaderExtensionNotFound
+}
+
+// Marshal serializes the packet into bytes.
+func (p *Packet) Marshal() (buf []byte, err error) {
+ buf = make([]byte, p.MarshalSize())
+
+ n, err := p.MarshalTo(buf)
+ if err != nil {
+ return nil, err
+ }
+
+ return buf[:n], nil
+}
+
+// MarshalTo serializes the packet and writes to the buffer.
+func (p *Packet) MarshalTo(buf []byte) (n int, err error) {
+ n, err = p.Header.MarshalTo(buf)
+ if err != nil {
+ return 0, err
+ }
+
+ // Make sure the buffer is large enough to hold the packet.
+ if n+len(p.Payload) > len(buf) {
+ return 0, io.ErrShortBuffer
+ }
+
+ m := copy(buf[n:], p.Payload)
+ p.Raw = buf[:n+m]
+
+ return n + m, nil
+}
+
+// MarshalSize returns the size of the packet once marshaled.
+func (p *Packet) MarshalSize() int {
+ return p.Header.MarshalSize() + len(p.Payload)
+}
diff --git a/vendor/github.com/pion/rtp/packetizer.go b/vendor/github.com/pion/rtp/packetizer.go
new file mode 100644
index 0000000..5a8482f
--- /dev/null
+++ b/vendor/github.com/pion/rtp/packetizer.go
@@ -0,0 +1,91 @@
+package rtp
+
+import (
+ "time"
+)
+
+// Payloader payloads a byte array for use as rtp.Packet payloads
+type Payloader interface {
+ Payload(mtu int, payload []byte) [][]byte
+}
+
+// Packetizer packetizes a payload
+type Packetizer interface {
+ Packetize(payload []byte, samples uint32) []*Packet
+ EnableAbsSendTime(value int)
+}
+
+type packetizer struct {
+ MTU int
+ PayloadType uint8
+ SSRC uint32
+ Payloader Payloader
+ Sequencer Sequencer
+ Timestamp uint32
+ ClockRate uint32
+ extensionNumbers struct { // put extension numbers in here. If they're 0, the extension is disabled (0 is not a legal extension number)
+ AbsSendTime int // http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
+ }
+ timegen func() time.Time
+}
+
+// NewPacketizer returns a new instance of a Packetizer for a specific payloader
+func NewPacketizer(mtu int, pt uint8, ssrc uint32, payloader Payloader, sequencer Sequencer, clockRate uint32) Packetizer {
+ return &packetizer{
+ MTU: mtu,
+ PayloadType: pt,
+ SSRC: ssrc,
+ Payloader: payloader,
+ Sequencer: sequencer,
+ Timestamp: globalMathRandomGenerator.Uint32(),
+ ClockRate: clockRate,
+ timegen: time.Now,
+ }
+}
+
+func (p *packetizer) EnableAbsSendTime(value int) {
+ p.extensionNumbers.AbsSendTime = value
+}
+
+// Packetize packetizes the payload of an RTP packet and returns one or more RTP packets
+func (p *packetizer) Packetize(payload []byte, samples uint32) []*Packet {
+ // Guard against an empty payload
+ if len(payload) == 0 {
+ return nil
+ }
+
+ payloads := p.Payloader.Payload(p.MTU-12, payload)
+ packets := make([]*Packet, len(payloads))
+
+ for i, pp := range payloads {
+ packets[i] = &Packet{
+ Header: Header{
+ Version: 2,
+ Padding: false,
+ Extension: false,
+ Marker: i == len(payloads)-1,
+ PayloadType: p.PayloadType,
+ SequenceNumber: p.Sequencer.NextSequenceNumber(),
+ Timestamp: p.Timestamp, // Figure out how to do timestamps
+ SSRC: p.SSRC,
+ },
+ Payload: pp,
+ }
+ }
+ p.Timestamp += samples
+
+ if len(packets) != 0 && p.extensionNumbers.AbsSendTime != 0 {
+ sendTime := NewAbsSendTimeExtension(p.timegen())
+ // apply http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
+ b, err := sendTime.Marshal()
+ if err != nil {
+ return nil // never happens
+ }
+ err = packets[len(packets)-1].SetExtension(uint8(p.extensionNumbers.AbsSendTime), b)
+ if err != nil {
+ return nil // never happens
+ }
+ }
+
+ return packets
+}
diff --git a/vendor/github.com/pion/rtp/partitionheadchecker.go b/vendor/github.com/pion/rtp/partitionheadchecker.go
new file mode 100644
index 0000000..6ec2a76
--- /dev/null
+++ b/vendor/github.com/pion/rtp/partitionheadchecker.go
@@ -0,0 +1,6 @@
+package rtp
+
+// PartitionHeadChecker is the interface that checks whether the packet is keyframe or not
+type PartitionHeadChecker interface {
+ IsPartitionHead([]byte) bool
+}
diff --git a/vendor/github.com/pion/rtp/rand.go b/vendor/github.com/pion/rtp/rand.go
new file mode 100644
index 0000000..ee85523
--- /dev/null
+++ b/vendor/github.com/pion/rtp/rand.go
@@ -0,0 +1,8 @@
+package rtp
+
+import (
+ "github.com/pion/randutil"
+)
+
+// Use global random generator to properly seed by crypto grade random.
+var globalMathRandomGenerator = randutil.NewMathRandomGenerator() // nolint:gochecknoglobals
diff --git a/vendor/github.com/pion/rtp/renovate.json b/vendor/github.com/pion/rtp/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/rtp/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/rtp/rtp.go b/vendor/github.com/pion/rtp/rtp.go
new file mode 100644
index 0000000..b66b2e4
--- /dev/null
+++ b/vendor/github.com/pion/rtp/rtp.go
@@ -0,0 +1,2 @@
+// Package rtp provides RTP packetizer and depacketizer
+package rtp
diff --git a/vendor/github.com/pion/rtp/sequencer.go b/vendor/github.com/pion/rtp/sequencer.go
new file mode 100644
index 0000000..2b4a507
--- /dev/null
+++ b/vendor/github.com/pion/rtp/sequencer.go
@@ -0,0 +1,57 @@
+package rtp
+
+import (
+ "math"
+ "sync"
+)
+
+// Sequencer generates sequential sequence numbers for building RTP packets
+type Sequencer interface {
+ NextSequenceNumber() uint16
+ RollOverCount() uint64
+}
+
+// NewRandomSequencer returns a new sequencer starting from a random sequence
+// number
+func NewRandomSequencer() Sequencer {
+ return &sequencer{
+ sequenceNumber: uint16(globalMathRandomGenerator.Intn(math.MaxUint16)),
+ }
+}
+
+// NewFixedSequencer returns a new sequencer starting from a specific
+// sequence number
+func NewFixedSequencer(s uint16) Sequencer {
+ return &sequencer{
+ sequenceNumber: s - 1, // -1 because the first sequence number prepends 1
+ }
+}
+
+type sequencer struct {
+ sequenceNumber uint16
+ rollOverCount uint64
+ mutex sync.Mutex
+}
+
+// NextSequenceNumber increment and returns a new sequence number for
+// building RTP packets
+func (s *sequencer) NextSequenceNumber() uint16 {
+ s.mutex.Lock()
+ defer s.mutex.Unlock()
+
+ s.sequenceNumber++
+ if s.sequenceNumber == 0 {
+ s.rollOverCount++
+ }
+
+ return s.sequenceNumber
+}
+
+// RollOverCount returns the amount of times the 16bit sequence number
+// has wrapped
+func (s *sequencer) RollOverCount() uint64 {
+ s.mutex.Lock()
+ defer s.mutex.Unlock()
+
+ return s.rollOverCount
+}
diff --git a/vendor/github.com/pion/rtp/transportccextension.go b/vendor/github.com/pion/rtp/transportccextension.go
new file mode 100644
index 0000000..f9ffe4e
--- /dev/null
+++ b/vendor/github.com/pion/rtp/transportccextension.go
@@ -0,0 +1,39 @@
+package rtp
+
+import (
+ "encoding/binary"
+)
+
+const (
+ // transport-wide sequence
+ transportCCExtensionSize = 2
+)
+
+// TransportCCExtension is a extension payload format in
+// https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | 0xBE | 0xDE | length=1 |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | ID | L=1 |transport-wide sequence number | zero padding |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+type TransportCCExtension struct {
+ TransportSequence uint16
+}
+
+// Marshal serializes the members to buffer
+func (t *TransportCCExtension) Marshal() ([]byte, error) {
+ buf := make([]byte, transportCCExtensionSize)
+ binary.BigEndian.PutUint16(buf[0:2], t.TransportSequence)
+ return buf, nil
+}
+
+// Unmarshal parses the passed byte slice and stores the result in the members
+func (t *TransportCCExtension) Unmarshal(rawData []byte) error {
+ if len(rawData) < transportCCExtensionSize {
+ return errTooSmall
+ }
+ t.TransportSequence = binary.BigEndian.Uint16(rawData[0:2])
+ return nil
+}
diff --git a/vendor/github.com/pion/sctp/.gitignore b/vendor/github.com/pion/sctp/.gitignore
new file mode 100644
index 0000000..d39fb86
--- /dev/null
+++ b/vendor/github.com/pion/sctp/.gitignore
@@ -0,0 +1 @@
+*.sw[poe]
diff --git a/vendor/github.com/pion/sctp/.golangci.yml b/vendor/github.com/pion/sctp/.golangci.yml
new file mode 100644
index 0000000..4213697
--- /dev/null
+++ b/vendor/github.com/pion/sctp/.golangci.yml
@@ -0,0 +1,82 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+ exhaustive:
+ default-signifies-exhaustive: true
+
+linters:
+ enable:
+ - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
+ - bodyclose # checks whether HTTP response body is closed successfully
+ - deadcode # Finds unused code
+ - depguard # Go linter that checks if package imports are in a list of acceptable packages
+ - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
+ - dupl # Tool for code clone detection
+ - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
+ - exhaustive # check exhaustiveness of enum switch statements
+ - exportloopref # checks for pointers to enclosing loop variables
+ - gci # Gci control golang package import order and make it always deterministic.
+ - gochecknoglobals # Checks that no globals are present in Go code
+ - gochecknoinits # Checks that no init functions are present in Go code
+ - gocognit # Computes and checks the cognitive complexity of functions
+ - goconst # Finds repeated strings that could be replaced by a constant
+ - gocritic # The most opinionated Go source code linter
+ - godox # Tool for detection of FIXME, TODO and other comment keywords
+ - goerr113 # Golang linter to check the errors handling expressions
+ - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
+ - gofumpt # Gofumpt checks whether code was gofumpt-ed.
+ - goheader # Checks is file header matches to pattern
+ - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
+ - golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
+ - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.
+ - goprintffuncname # Checks that printf-like functions are named with `f` at the end
+ - gosec # Inspects source code for security problems
+ - gosimple # Linter for Go source code that specializes in simplifying a code
+ - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
+ - ineffassign # Detects when assignments to existing variables are not used
+ - misspell # Finds commonly misspelled English words in comments
+ - nakedret # Finds naked returns in functions greater than a specified function length
+ - noctx # noctx finds sending http request without context.Context
+ - scopelint # Scopelint checks for unpinned variables in go programs
+ - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
+ - structcheck # Finds unused struct fields
+ - stylecheck # Stylecheck is a replacement for golint
+ - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
+ - unconvert # Remove unnecessary type conversions
+ - unparam # Reports unused function parameters
+ - unused # Checks Go code for unused constants, variables, functions and types
+ - varcheck # Finds unused global variables and constants
+ - whitespace # Tool for detection of leading and trailing whitespace
+ disable:
+ - funlen # Tool for detection of long functions
+ - gocyclo # Computes and checks the cyclomatic complexity of functions
+ - godot # Check if comments end in a period
+ - gomnd # An analyzer to detect magic numbers.
+ - lll # Reports long lines
+ - maligned # Tool to detect Go structs that would take less memory if their fields were sorted
+ - nestif # Reports deeply nested if statements
+ - nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
+ - nolintlint # Reports ill-formed or insufficient nolint directives
+ - prealloc # Finds slice declarations that could potentially be preallocated
+ - rowserrcheck # checks whether Err of rows is checked successfully
+ - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
+ - testpackage # linter that makes you use a separate _test package
+ - wsl # Whitespace Linter - Forces you to use empty lines!
+
+issues:
+ exclude-rules:
+ # Allow complex tests, better to be self contained
+ - path: _test\.go
+ linters:
+ - gocognit
+
+ # Allow complex main function in examples
+ - path: examples
+ text: "of func `main` is high"
+ linters:
+ - gocognit
+
+run:
+ skip-dirs-use-default: false
diff --git a/vendor/github.com/pion/sctp/DESIGN.md b/vendor/github.com/pion/sctp/DESIGN.md
new file mode 100644
index 0000000..02ac161
--- /dev/null
+++ b/vendor/github.com/pion/sctp/DESIGN.md
@@ -0,0 +1,20 @@
+<h1 align="center">
+ Design
+</h1>
+
+### Portable
+Pion SCTP is written in Go and extremely portable. Anywhere Golang runs, Pion SCTP should work as well! Instead of dealing with complicated
+cross-compiling of multiple libraries, you now can run anywhere with one `go build`
+
+### Simple API
+The API is based on an io.ReadWriteCloser.
+
+### Readable
+If code comes from an RFC we try to make sure everything is commented with a link to the spec.
+This makes learning and debugging easier, this library was written to also serve as a guide for others.
+
+### Tested
+Every commit is tested via travis-ci Go provides fantastic facilities for testing, and more will be added as time goes on.
+
+### Shared libraries
+Every pion product is built using shared libraries, allowing others to review and reuse our libraries.
diff --git a/vendor/github.com/pion/sctp/LICENSE b/vendor/github.com/pion/sctp/LICENSE
new file mode 100644
index 0000000..ab60297
--- /dev/null
+++ b/vendor/github.com/pion/sctp/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/sctp/README.md b/vendor/github.com/pion/sctp/README.md
new file mode 100644
index 0000000..18b5693
--- /dev/null
+++ b/vendor/github.com/pion/sctp/README.md
@@ -0,0 +1,54 @@
+<h1 align="center">
+ <br>
+ Pion SCTP
+ <br>
+</h1>
+<h4 align="center">A Go implementation of SCTP</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-sctp-gray.svg?longCache=true&colorB=brightgreen" alt="Pion SCTP"></a>
+ <!--<a href="https://sourcegraph.com/github.com/pion/webrtc?badge"><img src="https://sourcegraph.com/github.com/pion/webrtc/-/badge.svg" alt="Sourcegraph Widget"></a>-->
+ <a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/sctp"><img src="https://travis-ci.org/pion/sctp.svg?branch=master" alt="Build Status"></a>
+ <a href="https://pkg.go.dev/github.com/pion/sctp"><img src="https://godoc.org/github.com/pion/sctp?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/sctp"><img src="https://codecov.io/gh/pion/sctp/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/sctp"><img src="https://goreportcard.com/badge/github.com/pion/sctp" alt="Go Report Card"></a>
+ <!--<a href="https://www.codacy.com/app/Sean-Der/webrtc"><img src="https://api.codacy.com/project/badge/Grade/18f4aec384894e6aac0b94effe51961d" alt="Codacy Badge"></a>-->
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+See [DESIGN.md](DESIGN.md) for an overview of features and future goals.
+
+### Roadmap
+The library is used as a part of our WebRTC implementation. Please refer to that [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
+
+### Community
+Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [John Bradley](https://github.com/kc5nra) - *Original Author*
+* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
+* [Michiel De Backker](https://github.com/backkem) - *Public API, Initialization*
+* [Konstantin Itskov](https://github.com/trivigy) - *Fix documentation*
+* [chenkaiC4](https://github.com/chenkaiC4) - *Fix GolangCI Linter*
+* [Ronan J](https://github.com/ronanj) - *Fix PPID*
+* [Michael MacDonald](https://github.com/mjmac) - *Fix races*
+* [Yutaka Takeda](https://github.com/enobufs) - *PR-SCTP, Retransmissions, Congestion Control*
+* [Antoine Baché](https://github.com/Antonito) - *SCTP Profiling*
+* [Cecylia Bocovich](https://github.com/cohosh) - *Fix SCTP reads*
+* [Hugo Arregui](https://github.com/hugoArregui)
+* [Atsushi Watanabe](https://github.com/at-wat)
+* [Lukas Herman](https://github.com/lherman-cs)
+* [Luke Curley](https://github.com/kixelated) - *Performance*
+* [Aaron France](https://github.com/AeroNotix)
+* [ZHENK](https://github.com/scorpionknifes)
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/sctp/ack_timer.go b/vendor/github.com/pion/sctp/ack_timer.go
new file mode 100644
index 0000000..ba23d54
--- /dev/null
+++ b/vendor/github.com/pion/sctp/ack_timer.go
@@ -0,0 +1,105 @@
+package sctp
+
+import (
+ "sync"
+ "time"
+)
+
+const (
+ ackInterval time.Duration = 200 * time.Millisecond
+)
+
+// ackTimerObserver is the inteface to an ack timer observer.
+type ackTimerObserver interface {
+ onAckTimeout()
+}
+
+// ackTimer provides the retnransmission timer conforms with RFC 4960 Sec 6.3.1
+type ackTimer struct {
+ observer ackTimerObserver
+ interval time.Duration
+ stopFunc stopAckTimerLoop
+ closed bool
+ mutex sync.RWMutex
+}
+
+type stopAckTimerLoop func()
+
+// newAckTimer creates a new acknowledgement timer used to enable delayed ack.
+func newAckTimer(observer ackTimerObserver) *ackTimer {
+ return &ackTimer{
+ observer: observer,
+ interval: ackInterval,
+ }
+}
+
+// start starts the timer.
+func (t *ackTimer) start() bool {
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
+
+ // this timer is already closed
+ if t.closed {
+ return false
+ }
+
+ // this is a noop if the timer is already running
+ if t.stopFunc != nil {
+ return false
+ }
+
+ cancelCh := make(chan struct{})
+
+ go func() {
+ timer := time.NewTimer(t.interval)
+
+ select {
+ case <-timer.C:
+ t.stop()
+ t.observer.onAckTimeout()
+ case <-cancelCh:
+ timer.Stop()
+ }
+ }()
+
+ t.stopFunc = func() {
+ close(cancelCh)
+ }
+
+ return true
+}
+
+// stops the timer. this is similar to stop() but subsequent start() call
+// will fail (the timer is no longer usable)
+func (t *ackTimer) stop() {
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
+
+ if t.stopFunc != nil {
+ t.stopFunc()
+ t.stopFunc = nil
+ }
+}
+
+// closes the timer. this is similar to stop() but subsequent start() call
+// will fail (the timer is no longer usable)
+func (t *ackTimer) close() {
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
+
+ if t.stopFunc != nil {
+ t.stopFunc()
+ t.stopFunc = nil
+ }
+
+ t.closed = true
+}
+
+// isRunning tests if the timer is running.
+// Debug purpose only
+func (t *ackTimer) isRunning() bool {
+ t.mutex.RLock()
+ defer t.mutex.RUnlock()
+
+ return (t.stopFunc != nil)
+}
diff --git a/vendor/github.com/pion/sctp/association.go b/vendor/github.com/pion/sctp/association.go
new file mode 100644
index 0000000..1393cb8
--- /dev/null
+++ b/vendor/github.com/pion/sctp/association.go
@@ -0,0 +1,2241 @@
+package sctp
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "math"
+ "net"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/randutil"
+ "github.com/pkg/errors"
+)
+
+// Use global random generator to properly seed by crypto grade random.
+var (
+ globalMathRandomGenerator = randutil.NewMathRandomGenerator() // nolint:gochecknoglobals
+ errChunk = errors.New("Abort chunk, with following errors")
+)
+
+const (
+ receiveMTU uint32 = 8192 // MTU for inbound packet (from DTLS)
+ initialMTU uint32 = 1228 // initial MTU for outgoing packets (to DTLS)
+ initialRecvBufSize uint32 = 1024 * 1024
+ commonHeaderSize uint32 = 12
+ dataChunkHeaderSize uint32 = 16
+ defaultMaxMessageSize uint32 = 65536
+)
+
+// association state enums
+const (
+ closed uint32 = iota
+ cookieWait
+ cookieEchoed
+ established
+ shutdownAckSent
+ shutdownPending
+ shutdownReceived
+ shutdownSent
+)
+
+// retransmission timer IDs
+const (
+ timerT1Init int = iota
+ timerT1Cookie
+ timerT3RTX
+ timerReconfig
+)
+
+// ack mode (for testing)
+const (
+ ackModeNormal int = iota
+ ackModeNoDelay
+ ackModeAlwaysDelay
+)
+
+// ack transmission state
+const (
+ ackStateIdle int = iota // ack timer is off
+ ackStateImmediate // ack timer is on (ack is being delayed)
+ ackStateDelay // will send ack immediately
+)
+
+// other constants
+const (
+ acceptChSize = 16
+)
+
+func getAssociationStateString(a uint32) string {
+ switch a {
+ case closed:
+ return "Closed"
+ case cookieWait:
+ return "CookieWait"
+ case cookieEchoed:
+ return "CookieEchoed"
+ case established:
+ return "Established"
+ case shutdownPending:
+ return "ShutdownPending"
+ case shutdownSent:
+ return "ShutdownSent"
+ case shutdownReceived:
+ return "ShutdownReceived"
+ case shutdownAckSent:
+ return "ShutdownAckSent"
+ default:
+ return fmt.Sprintf("Invalid association state %d", a)
+ }
+}
+
+// Association represents an SCTP association
+// 13.2. Parameters Necessary per Association (i.e., the TCB)
+// Peer : Tag value to be sent in every packet and is received
+// Verification: in the INIT or INIT ACK chunk.
+// Tag :
+//
+// My : Tag expected in every inbound packet and sent in the
+// Verification: INIT or INIT ACK chunk.
+//
+// Tag :
+// State : A state variable indicating what state the association
+// : is in, i.e., COOKIE-WAIT, COOKIE-ECHOED, ESTABLISHED,
+// : SHUTDOWN-PENDING, SHUTDOWN-SENT, SHUTDOWN-RECEIVED,
+// : SHUTDOWN-ACK-SENT.
+//
+// Note: No "CLOSED" state is illustrated since if a
+// association is "CLOSED" its TCB SHOULD be removed.
+type Association struct {
+ bytesReceived uint64
+ bytesSent uint64
+
+ lock sync.RWMutex
+
+ netConn net.Conn
+
+ peerVerificationTag uint32
+ myVerificationTag uint32
+ state uint32
+ myNextTSN uint32 // nextTSN
+ peerLastTSN uint32 // lastRcvdTSN
+ minTSN2MeasureRTT uint32 // for RTT measurement
+ willSendForwardTSN bool
+ willRetransmitFast bool
+ willRetransmitReconfig bool
+
+ // Reconfig
+ myNextRSN uint32
+ reconfigs map[uint32]*chunkReconfig
+ reconfigRequests map[uint32]*paramOutgoingResetRequest
+
+ // Non-RFC internal data
+ sourcePort uint16
+ destinationPort uint16
+ myMaxNumInboundStreams uint16
+ myMaxNumOutboundStreams uint16
+ myCookie *paramStateCookie
+ payloadQueue *payloadQueue
+ inflightQueue *payloadQueue
+ pendingQueue *pendingQueue
+ controlQueue *controlQueue
+ mtu uint32
+ maxPayloadSize uint32 // max DATA chunk payload size
+ cumulativeTSNAckPoint uint32
+ advancedPeerTSNAckPoint uint32
+ useForwardTSN bool
+
+ // Congestion control parameters
+ maxReceiveBufferSize uint32
+ maxMessageSize uint32
+ cwnd uint32 // my congestion window size
+ rwnd uint32 // calculated peer's receiver windows size
+ ssthresh uint32 // slow start threshold
+ partialBytesAcked uint32
+ inFastRecovery bool
+ fastRecoverExitPoint uint32
+
+ // RTX & Ack timer
+ rtoMgr *rtoManager
+ t1Init *rtxTimer
+ t1Cookie *rtxTimer
+ t3RTX *rtxTimer
+ tReconfig *rtxTimer
+ ackTimer *ackTimer
+
+ // Chunks stored for retransmission
+ storedInit *chunkInit
+ storedCookieEcho *chunkCookieEcho
+
+ streams map[uint16]*Stream
+ acceptCh chan *Stream
+ readLoopCloseCh chan struct{}
+ awakeWriteLoopCh chan struct{}
+ closeWriteLoopCh chan struct{}
+ handshakeCompletedCh chan error
+
+ closeWriteLoopOnce sync.Once
+
+ // local error
+ silentError error
+
+ ackState int
+ ackMode int // for testing
+
+ // stats
+ stats *associationStats
+
+ // per inbound packet context
+ delayedAckTriggered bool
+ immediateAckTriggered bool
+
+ name string
+ log logging.LeveledLogger
+}
+
+// Config collects the arguments to createAssociation construction into
+// a single structure
+type Config struct {
+ NetConn net.Conn
+ MaxReceiveBufferSize uint32
+ MaxMessageSize uint32
+ LoggerFactory logging.LoggerFactory
+}
+
+// Server accepts a SCTP stream over a conn
+func Server(config Config) (*Association, error) {
+ a := createAssociation(config)
+ a.init(false)
+
+ select {
+ case err := <-a.handshakeCompletedCh:
+ if err != nil {
+ return nil, err
+ }
+ return a, nil
+ case <-a.readLoopCloseCh:
+ return nil, errors.Errorf("association closed before connecting")
+ }
+}
+
+// Client opens a SCTP stream over a conn
+func Client(config Config) (*Association, error) {
+ a := createAssociation(config)
+ a.init(true)
+
+ select {
+ case err := <-a.handshakeCompletedCh:
+ if err != nil {
+ return nil, err
+ }
+ return a, nil
+ case <-a.readLoopCloseCh:
+ return nil, errors.Errorf("association closed before connecting")
+ }
+}
+
+func createAssociation(config Config) *Association {
+ var maxReceiveBufferSize uint32
+ if config.MaxReceiveBufferSize == 0 {
+ maxReceiveBufferSize = initialRecvBufSize
+ } else {
+ maxReceiveBufferSize = config.MaxReceiveBufferSize
+ }
+
+ var maxMessageSize uint32
+ if config.MaxMessageSize == 0 {
+ maxMessageSize = defaultMaxMessageSize
+ } else {
+ maxMessageSize = config.MaxMessageSize
+ }
+
+ tsn := globalMathRandomGenerator.Uint32()
+ a := &Association{
+ netConn: config.NetConn,
+ maxReceiveBufferSize: maxReceiveBufferSize,
+ maxMessageSize: maxMessageSize,
+ myMaxNumOutboundStreams: math.MaxUint16,
+ myMaxNumInboundStreams: math.MaxUint16,
+ payloadQueue: newPayloadQueue(),
+ inflightQueue: newPayloadQueue(),
+ pendingQueue: newPendingQueue(),
+ controlQueue: newControlQueue(),
+ mtu: initialMTU,
+ maxPayloadSize: initialMTU - (commonHeaderSize + dataChunkHeaderSize),
+ myVerificationTag: globalMathRandomGenerator.Uint32(),
+ myNextTSN: tsn,
+ myNextRSN: tsn,
+ minTSN2MeasureRTT: tsn,
+ state: closed,
+ rtoMgr: newRTOManager(),
+ streams: map[uint16]*Stream{},
+ reconfigs: map[uint32]*chunkReconfig{},
+ reconfigRequests: map[uint32]*paramOutgoingResetRequest{},
+ acceptCh: make(chan *Stream, acceptChSize),
+ readLoopCloseCh: make(chan struct{}),
+ awakeWriteLoopCh: make(chan struct{}, 1),
+ closeWriteLoopCh: make(chan struct{}),
+ handshakeCompletedCh: make(chan error),
+ cumulativeTSNAckPoint: tsn - 1,
+ advancedPeerTSNAckPoint: tsn - 1,
+ silentError: errors.Errorf("silently discard"),
+ stats: &associationStats{},
+ log: config.LoggerFactory.NewLogger("sctp"),
+ }
+
+ a.name = fmt.Sprintf("%p", a)
+
+ // RFC 4690 Sec 7.2.1
+ // o The initial cwnd before DATA transmission or after a sufficiently
+ // long idle period MUST be set to min(4*MTU, max (2*MTU, 4380
+ // bytes)).
+ a.cwnd = min32(4*a.mtu, max32(2*a.mtu, 4380))
+ a.log.Tracef("[%s] updated cwnd=%d ssthresh=%d inflight=%d (INI)",
+ a.name, a.cwnd, a.ssthresh, a.inflightQueue.getNumBytes())
+
+ a.t1Init = newRTXTimer(timerT1Init, a, maxInitRetrans)
+ a.t1Cookie = newRTXTimer(timerT1Cookie, a, maxInitRetrans)
+ a.t3RTX = newRTXTimer(timerT3RTX, a, noMaxRetrans) // retransmit forever
+ a.tReconfig = newRTXTimer(timerReconfig, a, noMaxRetrans) // retransmit forever
+ a.ackTimer = newAckTimer(a)
+
+ return a
+}
+
+func (a *Association) init(isClient bool) {
+ a.lock.Lock()
+ defer a.lock.Unlock()
+
+ go a.readLoop()
+ go a.writeLoop()
+
+ if isClient {
+ a.setState(cookieWait)
+ init := &chunkInit{}
+ init.initialTSN = a.myNextTSN
+ init.numOutboundStreams = a.myMaxNumOutboundStreams
+ init.numInboundStreams = a.myMaxNumInboundStreams
+ init.initiateTag = a.myVerificationTag
+ init.advertisedReceiverWindowCredit = a.maxReceiveBufferSize
+ setSupportedExtensions(&init.chunkInitCommon)
+ a.storedInit = init
+
+ err := a.sendInit()
+ if err != nil {
+ a.log.Errorf("[%s] failed to send init: %s", a.name, err.Error())
+ }
+
+ a.t1Init.start(a.rtoMgr.getRTO())
+ }
+}
+
+// caller must hold a.lock
+func (a *Association) sendInit() error {
+ a.log.Debugf("[%s] sending INIT", a.name)
+ if a.storedInit == nil {
+ return errors.Errorf("the init not stored to send")
+ }
+
+ outbound := &packet{}
+ outbound.verificationTag = a.peerVerificationTag
+ a.sourcePort = 5000 // Spec??
+ a.destinationPort = 5000 // Spec??
+ outbound.sourcePort = a.sourcePort
+ outbound.destinationPort = a.destinationPort
+
+ outbound.chunks = []chunk{a.storedInit}
+
+ a.controlQueue.push(outbound)
+ a.awakeWriteLoop()
+
+ return nil
+}
+
+// caller must hold a.lock
+func (a *Association) sendCookieEcho() error {
+ if a.storedCookieEcho == nil {
+ return errors.Errorf("cookieEcho not stored to send")
+ }
+
+ a.log.Debugf("[%s] sending COOKIE-ECHO", a.name)
+
+ outbound := &packet{}
+ outbound.verificationTag = a.peerVerificationTag
+ outbound.sourcePort = a.sourcePort
+ outbound.destinationPort = a.destinationPort
+ outbound.chunks = []chunk{a.storedCookieEcho}
+
+ a.controlQueue.push(outbound)
+ a.awakeWriteLoop()
+
+ return nil
+}
+
+// Close ends the SCTP Association and cleans up any state
+func (a *Association) Close() error {
+ a.log.Debugf("[%s] closing association..", a.name)
+
+ a.setState(closed)
+
+ err := a.netConn.Close()
+
+ a.closeAllTimers()
+
+ // awake writeLoop to exit
+ a.closeWriteLoopOnce.Do(func() { close(a.closeWriteLoopCh) })
+
+ // Wait for readLoop to end
+ <-a.readLoopCloseCh
+
+ a.log.Debugf("[%s] association closed", a.name)
+ a.log.Debugf("[%s] stats nDATAs (in) : %d", a.name, a.stats.getNumDATAs())
+ a.log.Debugf("[%s] stats nSACKs (in) : %d", a.name, a.stats.getNumSACKs())
+ a.log.Debugf("[%s] stats nT3Timeouts : %d", a.name, a.stats.getNumT3Timeouts())
+ a.log.Debugf("[%s] stats nAckTimeouts: %d", a.name, a.stats.getNumAckTimeouts())
+ a.log.Debugf("[%s] stats nFastRetrans: %d", a.name, a.stats.getNumFastRetrans())
+ return err
+}
+
+func (a *Association) closeAllTimers() {
+ // Close all retransmission & ack timers
+ a.t1Init.close()
+ a.t1Cookie.close()
+ a.t3RTX.close()
+ a.tReconfig.close()
+ a.ackTimer.close()
+}
+
+func (a *Association) readLoop() {
+ var closeErr error
+ defer func() {
+ // also stop writeLoop, otherwise writeLoop can be leaked
+ // if connection is lost when there is no writing packet.
+ a.closeWriteLoopOnce.Do(func() { close(a.closeWriteLoopCh) })
+
+ a.lock.Lock()
+ for _, s := range a.streams {
+ a.unregisterStream(s, closeErr)
+ }
+ a.lock.Unlock()
+ close(a.acceptCh)
+ close(a.readLoopCloseCh)
+ }()
+
+ a.log.Debugf("[%s] readLoop entered", a.name)
+ buffer := make([]byte, receiveMTU)
+
+ for {
+ n, err := a.netConn.Read(buffer)
+ if err != nil {
+ closeErr = err
+ break
+ }
+ // Make a buffer sized to what we read, then copy the data we
+ // read from the underlying transport. We do this because the
+ // user data is passed to the reassembly queue without
+ // copying.
+ inbound := make([]byte, n)
+ copy(inbound, buffer[:n])
+ atomic.AddUint64(&a.bytesReceived, uint64(n))
+ if err = a.handleInbound(inbound); err != nil {
+ closeErr = err
+ break
+ }
+ }
+
+ a.log.Debugf("[%s] readLoop exited %s", a.name, closeErr)
+}
+
+func (a *Association) writeLoop() {
+ a.log.Debugf("[%s] writeLoop entered", a.name)
+
+loop:
+ for {
+ rawPackets := a.gatherOutbound()
+
+ for _, raw := range rawPackets {
+ _, err := a.netConn.Write(raw)
+ if err != nil {
+ if err != io.EOF {
+ a.log.Warnf("[%s] failed to write packets on netConn: %v", a.name, err)
+ }
+ a.log.Debugf("[%s] writeLoop ended", a.name)
+ break loop
+ }
+ atomic.AddUint64(&a.bytesSent, uint64(len(raw)))
+ }
+
+ select {
+ case <-a.awakeWriteLoopCh:
+ case <-a.closeWriteLoopCh:
+ break loop
+ }
+ }
+
+ a.setState(closed)
+ a.closeAllTimers()
+
+ a.log.Debugf("[%s] writeLoop exited", a.name)
+}
+
+func (a *Association) awakeWriteLoop() {
+ select {
+ case a.awakeWriteLoopCh <- struct{}{}:
+ default:
+ }
+}
+
+// unregisterStream un-registers a stream from the association
+// The caller should hold the association write lock.
+func (a *Association) unregisterStream(s *Stream, err error) {
+ s.lock.Lock()
+ defer s.lock.Unlock()
+
+ delete(a.streams, s.streamIdentifier)
+ s.readErr = err
+ s.readNotifier.Broadcast()
+}
+
+// handleInbound parses incoming raw packets
+func (a *Association) handleInbound(raw []byte) error {
+ p := &packet{}
+ if err := p.unmarshal(raw); err != nil {
+ a.log.Warnf("[%s] unable to parse SCTP packet %s", a.name, err)
+ return nil
+ }
+
+ if err := checkPacket(p); err != nil {
+ a.log.Warnf("[%s] failed validating packet %s", a.name, err)
+ return nil
+ }
+
+ a.handleChunkStart()
+
+ for _, c := range p.chunks {
+ if err := a.handleChunk(p, c); err != nil {
+ return err
+ }
+ }
+
+ a.handleChunkEnd()
+
+ return nil
+}
+
+// The caller should hold the lock
+func (a *Association) gatherOutboundDataAndReconfigPackets(rawPackets [][]byte) [][]byte {
+ for _, p := range a.getDataPacketsToRetransmit() {
+ raw, err := p.marshal()
+ if err != nil {
+ a.log.Warnf("[%s] failed to serialize a DATA packet to be retransmitted", a.name)
+ continue
+ }
+ rawPackets = append(rawPackets, raw)
+ }
+
+ // Pop unsent data chunks from the pending queue to send as much as
+ // cwnd and rwnd allow.
+ chunks, sisToReset := a.popPendingDataChunksToSend()
+ if len(chunks) > 0 {
+ // Start timer. (noop if already started)
+ a.log.Tracef("[%s] T3-rtx timer start (pt1)", a.name)
+ a.t3RTX.start(a.rtoMgr.getRTO())
+ for _, p := range a.bundleDataChunksIntoPackets(chunks) {
+ raw, err := p.marshal()
+ if err != nil {
+ a.log.Warnf("[%s] failed to serialize a DATA packet", a.name)
+ continue
+ }
+ rawPackets = append(rawPackets, raw)
+ }
+ }
+
+ if len(sisToReset) > 0 || a.willRetransmitReconfig {
+ if a.willRetransmitReconfig {
+ a.willRetransmitReconfig = false
+ a.log.Debugf("[%s] retransmit %d RECONFIG chunk(s)", a.name, len(a.reconfigs))
+ for _, c := range a.reconfigs {
+ p := a.createPacket([]chunk{c})
+ raw, err := p.marshal()
+ if err != nil {
+ a.log.Warnf("[%s] failed to serialize a RECONFIG packet to be retransmitted", a.name)
+ } else {
+ rawPackets = append(rawPackets, raw)
+ }
+ }
+ }
+
+ if len(sisToReset) > 0 {
+ rsn := a.generateNextRSN()
+ tsn := a.myNextTSN - 1
+ c := &chunkReconfig{
+ paramA: &paramOutgoingResetRequest{
+ reconfigRequestSequenceNumber: rsn,
+ senderLastTSN: tsn,
+ streamIdentifiers: sisToReset,
+ },
+ }
+ a.reconfigs[rsn] = c // store in the map for retransmission
+ a.log.Debugf("[%s] sending RECONFIG: rsn=%d tsn=%d streams=%v",
+ a.name, rsn, a.myNextTSN-1, sisToReset)
+ p := a.createPacket([]chunk{c})
+ raw, err := p.marshal()
+ if err != nil {
+ a.log.Warnf("[%s] failed to serialize a RECONFIG packet to be transmitted", a.name)
+ } else {
+ rawPackets = append(rawPackets, raw)
+ }
+ }
+
+ if len(a.reconfigs) > 0 {
+ a.tReconfig.start(a.rtoMgr.getRTO())
+ }
+ }
+
+ return rawPackets
+}
+
+// The caller should hold the lock
+func (a *Association) gatherOutboundFrastRetransmissionPackets(rawPackets [][]byte) [][]byte {
+ if a.willRetransmitFast {
+ a.willRetransmitFast = false
+
+ toFastRetrans := []chunk{}
+ fastRetransSize := commonHeaderSize
+
+ for i := 0; ; i++ {
+ c, ok := a.inflightQueue.get(a.cumulativeTSNAckPoint + uint32(i) + 1)
+ if !ok {
+ break // end of pending data
+ }
+
+ if c.acked || c.abandoned() {
+ continue
+ }
+
+ if c.nSent > 1 || c.missIndicator < 3 {
+ continue
+ }
+
+ // RFC 4960 Sec 7.2.4 Fast Retransmit on Gap Reports
+ // 3) Determine how many of the earliest (i.e., lowest TSN) DATA chunks
+ // marked for retransmission will fit into a single packet, subject
+ // to constraint of the path MTU of the destination transport
+ // address to which the packet is being sent. Call this value K.
+ // Retransmit those K DATA chunks in a single packet. When a Fast
+ // Retransmit is being performed, the sender SHOULD ignore the value
+ // of cwnd and SHOULD NOT delay retransmission for this single
+ // packet.
+
+ dataChunkSize := dataChunkHeaderSize + uint32(len(c.userData))
+ if a.mtu < fastRetransSize+dataChunkSize {
+ break
+ }
+
+ fastRetransSize += dataChunkSize
+ a.stats.incFastRetrans()
+ c.nSent++
+ a.checkPartialReliabilityStatus(c)
+ toFastRetrans = append(toFastRetrans, c)
+ a.log.Tracef("[%s] fast-retransmit: tsn=%d sent=%d htna=%d",
+ a.name, c.tsn, c.nSent, a.fastRecoverExitPoint)
+ }
+
+ if len(toFastRetrans) > 0 {
+ raw, err := a.createPacket(toFastRetrans).marshal()
+ if err != nil {
+ a.log.Warnf("[%s] failed to serialize a DATA packet to be fast-retransmitted", a.name)
+ } else {
+ rawPackets = append(rawPackets, raw)
+ }
+ }
+ }
+
+ return rawPackets
+}
+
+// The caller should hold the lock
+func (a *Association) gatherOutboundSackPackets(rawPackets [][]byte) [][]byte {
+ if a.ackState == ackStateImmediate {
+ a.ackState = ackStateIdle
+ sack := a.createSelectiveAckChunk()
+ a.log.Debugf("[%s] sending SACK: %s", a.name, sack.String())
+ raw, err := a.createPacket([]chunk{sack}).marshal()
+ if err != nil {
+ a.log.Warnf("[%s] failed to serialize a SACK packet", a.name)
+ } else {
+ rawPackets = append(rawPackets, raw)
+ }
+ }
+
+ return rawPackets
+}
+
+// The caller should hold the lock
+func (a *Association) gatherOutboundForwardTSNPackets(rawPackets [][]byte) [][]byte {
+ if a.willSendForwardTSN {
+ a.willSendForwardTSN = false
+ if sna32GT(a.advancedPeerTSNAckPoint, a.cumulativeTSNAckPoint) {
+ fwdtsn := a.createForwardTSN()
+ raw, err := a.createPacket([]chunk{fwdtsn}).marshal()
+ if err != nil {
+ a.log.Warnf("[%s] failed to serialize a Forward TSN packet", a.name)
+ } else {
+ rawPackets = append(rawPackets, raw)
+ }
+ }
+ }
+
+ return rawPackets
+}
+
+// gatherOutbound gathers outgoing packets
+func (a *Association) gatherOutbound() [][]byte {
+ a.lock.Lock()
+ defer a.lock.Unlock()
+
+ rawPackets := [][]byte{}
+
+ if a.controlQueue.size() > 0 {
+ for _, p := range a.controlQueue.popAll() {
+ raw, err := p.marshal()
+ if err != nil {
+ a.log.Warnf("[%s] failed to serialize a control packet", a.name)
+ continue
+ }
+ rawPackets = append(rawPackets, raw)
+ }
+ }
+
+ state := a.getState()
+
+ if state == established {
+ rawPackets = a.gatherOutboundDataAndReconfigPackets(rawPackets)
+ rawPackets = a.gatherOutboundFrastRetransmissionPackets(rawPackets)
+ rawPackets = a.gatherOutboundSackPackets(rawPackets)
+ rawPackets = a.gatherOutboundForwardTSNPackets(rawPackets)
+ }
+
+ return rawPackets
+}
+
+func checkPacket(p *packet) error {
+ // All packets must adhere to these rules
+
+ // This is the SCTP sender's port number. It can be used by the
+ // receiver in combination with the source IP address, the SCTP
+ // destination port, and possibly the destination IP address to
+ // identify the association to which this packet belongs. The port
+ // number 0 MUST NOT be used.
+ if p.sourcePort == 0 {
+ return errors.Errorf("sctp packet must not have a source port of 0")
+ }
+
+ // This is the SCTP port number to which this packet is destined.
+ // The receiving host will use this port number to de-multiplex the
+ // SCTP packet to the correct receiving endpoint/application. The
+ // port number 0 MUST NOT be used.
+ if p.destinationPort == 0 {
+ return errors.Errorf("sctp packet must not have a destination port of 0")
+ }
+
+ // Check values on the packet that are specific to a particular chunk type
+ for _, c := range p.chunks {
+ switch c.(type) { // nolint:gocritic
+ case *chunkInit:
+ // An INIT or INIT ACK chunk MUST NOT be bundled with any other chunk.
+ // They MUST be the only chunks present in the SCTP packets that carry
+ // them.
+ if len(p.chunks) != 1 {
+ return errors.Errorf("init chunk must not be bundled with any other chunk")
+ }
+
+ // A packet containing an INIT chunk MUST have a zero Verification
+ // Tag.
+ if p.verificationTag != 0 {
+ return errors.Errorf("init chunk expects a verification tag of 0 on the packet when out-of-the-blue")
+ }
+ }
+ }
+
+ return nil
+}
+
+func min16(a, b uint16) uint16 {
+ if a < b {
+ return a
+ }
+ return b
+}
+
+func max32(a, b uint32) uint32 {
+ if a > b {
+ return a
+ }
+ return b
+}
+
+func min32(a, b uint32) uint32 {
+ if a < b {
+ return a
+ }
+ return b
+}
+
+// setState atomically sets the state of the Association.
+// The caller should hold the lock.
+func (a *Association) setState(newState uint32) {
+ oldState := atomic.SwapUint32(&a.state, newState)
+ if newState != oldState {
+ a.log.Debugf("[%s] state change: '%s' => '%s'",
+ a.name,
+ getAssociationStateString(oldState),
+ getAssociationStateString(newState))
+ }
+}
+
+// getState atomically returns the state of the Association.
+func (a *Association) getState() uint32 {
+ return atomic.LoadUint32(&a.state)
+}
+
+// BytesSent returns the number of bytes sent
+func (a *Association) BytesSent() uint64 {
+ return atomic.LoadUint64(&a.bytesSent)
+}
+
+// BytesReceived returns the number of bytes received
+func (a *Association) BytesReceived() uint64 {
+ return atomic.LoadUint64(&a.bytesReceived)
+}
+
+func setSupportedExtensions(init *chunkInitCommon) {
+ // nolint:godox
+ // TODO RFC5061 https://tools.ietf.org/html/rfc6525#section-5.2
+ // An implementation supporting this (Supported Extensions Parameter)
+ // extension MUST list the ASCONF, the ASCONF-ACK, and the AUTH chunks
+ // in its INIT and INIT-ACK parameters.
+ init.params = append(init.params, &paramSupportedExtensions{
+ ChunkTypes: []chunkType{ctReconfig, ctForwardTSN},
+ })
+}
+
+// The caller should hold the lock.
+func (a *Association) handleInit(p *packet, i *chunkInit) ([]*packet, error) {
+ state := a.getState()
+ a.log.Debugf("[%s] chunkInit received in state '%s'", a.name, getAssociationStateString(state))
+
+ // https://tools.ietf.org/html/rfc4960#section-5.2.1
+ // Upon receipt of an INIT in the COOKIE-WAIT state, an endpoint MUST
+ // respond with an INIT ACK using the same parameters it sent in its
+ // original INIT chunk (including its Initiate Tag, unchanged). When
+ // responding, the endpoint MUST send the INIT ACK back to the same
+ // address that the original INIT (sent by this endpoint) was sent.
+
+ if state != closed && state != cookieWait && state != cookieEchoed {
+ // 5.2.2. Unexpected INIT in States Other than CLOSED, COOKIE-ECHOED,
+ // COOKIE-WAIT, and SHUTDOWN-ACK-SENT
+ return nil, errors.Errorf("todo: handle Init when in state %s", getAssociationStateString(state))
+ }
+
+ // Should we be setting any of these permanently until we've ACKed further?
+ a.myMaxNumInboundStreams = min16(i.numInboundStreams, a.myMaxNumInboundStreams)
+ a.myMaxNumOutboundStreams = min16(i.numOutboundStreams, a.myMaxNumOutboundStreams)
+ a.peerVerificationTag = i.initiateTag
+ a.sourcePort = p.destinationPort
+ a.destinationPort = p.sourcePort
+
+ // 13.2 This is the last TSN received in sequence. This value
+ // is set initially by taking the peer's initial TSN,
+ // received in the INIT or INIT ACK chunk, and
+ // subtracting one from it.
+ a.peerLastTSN = i.initialTSN - 1
+
+ for _, param := range i.params {
+ switch v := param.(type) { // nolint:gocritic
+ case *paramSupportedExtensions:
+ for _, t := range v.ChunkTypes {
+ if t == ctForwardTSN {
+ a.log.Debugf("[%s] use ForwardTSN (on init)\n", a.name)
+ a.useForwardTSN = true
+ }
+ }
+ }
+ }
+ if !a.useForwardTSN {
+ a.log.Warnf("[%s] not using ForwardTSN (on init)\n", a.name)
+ }
+
+ outbound := &packet{}
+ outbound.verificationTag = a.peerVerificationTag
+ outbound.sourcePort = a.sourcePort
+ outbound.destinationPort = a.destinationPort
+
+ initAck := &chunkInitAck{}
+
+ initAck.initialTSN = a.myNextTSN
+ initAck.numOutboundStreams = a.myMaxNumOutboundStreams
+ initAck.numInboundStreams = a.myMaxNumInboundStreams
+ initAck.initiateTag = a.myVerificationTag
+ initAck.advertisedReceiverWindowCredit = a.maxReceiveBufferSize
+
+ if a.myCookie == nil {
+ var err error
+ if a.myCookie, err = newRandomStateCookie(); err != nil {
+ return nil, err
+ }
+ }
+
+ initAck.params = []param{a.myCookie}
+
+ setSupportedExtensions(&initAck.chunkInitCommon)
+
+ outbound.chunks = []chunk{initAck}
+
+ return pack(outbound), nil
+}
+
+// The caller should hold the lock.
+func (a *Association) handleInitAck(p *packet, i *chunkInitAck) error {
+ state := a.getState()
+ a.log.Debugf("[%s] chunkInitAck received in state '%s'", a.name, getAssociationStateString(state))
+ if state != cookieWait {
+ // RFC 4960
+ // 5.2.3. Unexpected INIT ACK
+ // If an INIT ACK is received by an endpoint in any state other than the
+ // COOKIE-WAIT state, the endpoint should discard the INIT ACK chunk.
+ // An unexpected INIT ACK usually indicates the processing of an old or
+ // duplicated INIT chunk.
+ return nil
+ }
+
+ a.myMaxNumInboundStreams = min16(i.numInboundStreams, a.myMaxNumInboundStreams)
+ a.myMaxNumOutboundStreams = min16(i.numOutboundStreams, a.myMaxNumOutboundStreams)
+ a.peerVerificationTag = i.initiateTag
+ a.peerLastTSN = i.initialTSN - 1
+ if a.sourcePort != p.destinationPort ||
+ a.destinationPort != p.sourcePort {
+ a.log.Warnf("[%s] handleInitAck: port mismatch", a.name)
+ return nil
+ }
+
+ a.rwnd = i.advertisedReceiverWindowCredit
+ a.log.Debugf("[%s] initial rwnd=%d", a.name, a.rwnd)
+
+ // RFC 4690 Sec 7.2.1
+ // o The initial value of ssthresh MAY be arbitrarily high (for
+ // example, implementations MAY use the size of the receiver
+ // advertised window).
+ a.ssthresh = a.rwnd
+ a.log.Tracef("[%s] updated cwnd=%d ssthresh=%d inflight=%d (INI)",
+ a.name, a.cwnd, a.ssthresh, a.inflightQueue.getNumBytes())
+
+ a.t1Init.stop()
+ a.storedInit = nil
+
+ var cookieParam *paramStateCookie
+ for _, param := range i.params {
+ switch v := param.(type) {
+ case *paramStateCookie:
+ cookieParam = v
+ case *paramSupportedExtensions:
+ for _, t := range v.ChunkTypes {
+ if t == ctForwardTSN {
+ a.log.Debugf("[%s] use ForwardTSN (on initAck)\n", a.name)
+ a.useForwardTSN = true
+ }
+ }
+ }
+ }
+ if !a.useForwardTSN {
+ a.log.Warnf("[%s] not using ForwardTSN (on initAck)\n", a.name)
+ }
+ if cookieParam == nil {
+ return errors.Errorf("no cookie in InitAck")
+ }
+
+ a.storedCookieEcho = &chunkCookieEcho{}
+ a.storedCookieEcho.cookie = cookieParam.cookie
+
+ err := a.sendCookieEcho()
+ if err != nil {
+ a.log.Errorf("[%s] failed to send init: %s", a.name, err.Error())
+ }
+
+ a.t1Cookie.start(a.rtoMgr.getRTO())
+ a.setState(cookieEchoed)
+ return nil
+}
+
+// The caller should hold the lock.
+func (a *Association) handleHeartbeat(c *chunkHeartbeat) []*packet {
+ a.log.Tracef("[%s] chunkHeartbeat", a.name)
+ hbi, ok := c.params[0].(*paramHeartbeatInfo)
+ if !ok {
+ a.log.Warnf("[%s] failed to handle Heartbeat, no ParamHeartbeatInfo", a.name)
+ }
+
+ return pack(&packet{
+ verificationTag: a.peerVerificationTag,
+ sourcePort: a.sourcePort,
+ destinationPort: a.destinationPort,
+ chunks: []chunk{&chunkHeartbeatAck{
+ params: []param{
+ &paramHeartbeatInfo{
+ heartbeatInformation: hbi.heartbeatInformation,
+ },
+ },
+ }},
+ })
+}
+
+// The caller should hold the lock.
+func (a *Association) handleCookieEcho(c *chunkCookieEcho) []*packet {
+ state := a.getState()
+ a.log.Debugf("[%s] COOKIE-ECHO received in state '%s'", a.name, getAssociationStateString(state))
+ switch state {
+ default:
+ return nil
+ case established:
+ if !bytes.Equal(a.myCookie.cookie, c.cookie) {
+ return nil
+ }
+ case closed, cookieWait, cookieEchoed:
+ if !bytes.Equal(a.myCookie.cookie, c.cookie) {
+ return nil
+ }
+
+ a.t1Init.stop()
+ a.storedInit = nil
+
+ a.t1Cookie.stop()
+ a.storedCookieEcho = nil
+
+ a.setState(established)
+ a.handshakeCompletedCh <- nil
+ }
+
+ p := &packet{
+ verificationTag: a.peerVerificationTag,
+ sourcePort: a.sourcePort,
+ destinationPort: a.destinationPort,
+ chunks: []chunk{&chunkCookieAck{}},
+ }
+ return pack(p)
+}
+
+// The caller should hold the lock.
+func (a *Association) handleCookieAck() {
+ state := a.getState()
+ a.log.Debugf("[%s] COOKIE-ACK received in state '%s'", a.name, getAssociationStateString(state))
+ if state != cookieEchoed {
+ // RFC 4960
+ // 5.2.5. Handle Duplicate COOKIE-ACK.
+ // At any state other than COOKIE-ECHOED, an endpoint should silently
+ // discard a received COOKIE ACK chunk.
+ return
+ }
+
+ a.t1Cookie.stop()
+ a.storedCookieEcho = nil
+
+ a.setState(established)
+ a.handshakeCompletedCh <- nil
+}
+
+// The caller should hold the lock.
+func (a *Association) handleData(d *chunkPayloadData) []*packet {
+ a.log.Tracef("[%s] DATA: tsn=%d immediateSack=%v len=%d",
+ a.name, d.tsn, d.immediateSack, len(d.userData))
+ a.stats.incDATAs()
+
+ canPush := a.payloadQueue.canPush(d, a.peerLastTSN)
+ if canPush {
+ s := a.getOrCreateStream(d.streamIdentifier)
+ if s == nil {
+ // silentely discard the data. (sender will retry on T3-rtx timeout)
+ // see pion/sctp#30
+ a.log.Debugf("discard %d", d.streamSequenceNumber)
+ return nil
+ }
+
+ if a.getMyReceiverWindowCredit() > 0 {
+ // Pass the new chunk to stream level as soon as it arrives
+ a.payloadQueue.push(d, a.peerLastTSN)
+ s.handleData(d)
+ } else {
+ // Receive buffer is full
+ lastTSN, ok := a.payloadQueue.getLastTSNReceived()
+ if ok && sna32LT(d.tsn, lastTSN) {
+ a.log.Debugf("[%s] receive buffer full, but accepted as this is a missing chunk with tsn=%d ssn=%d", a.name, d.tsn, d.streamSequenceNumber)
+ a.payloadQueue.push(d, a.peerLastTSN)
+ s.handleData(d)
+ } else {
+ a.log.Debugf("[%s] receive buffer full. dropping DATA with tsn=%d ssn=%d", a.name, d.tsn, d.streamSequenceNumber)
+ }
+ }
+ }
+
+ return a.handlePeerLastTSNAndAcknowledgement(d.immediateSack)
+}
+
+// A common routine for handleData and handleForwardTSN routines
+// The caller should hold the lock.
+func (a *Association) handlePeerLastTSNAndAcknowledgement(sackImmediately bool) []*packet {
+ var reply []*packet
+
+ // Try to advance peerLastTSN
+
+ // From RFC 3758 Sec 3.6:
+ // .. and then MUST further advance its cumulative TSN point locally
+ // if possible
+ // Meaning, if peerLastTSN+1 points to a chunk that is received,
+ // advance peerLastTSN until peerLastTSN+1 points to unreceived chunk.
+ for {
+ if _, popOk := a.payloadQueue.pop(a.peerLastTSN + 1); !popOk {
+ break
+ }
+ a.peerLastTSN++
+
+ for _, rstReq := range a.reconfigRequests {
+ resp := a.resetStreamsIfAny(rstReq)
+ if resp != nil {
+ a.log.Debugf("[%s] RESET RESPONSE: %+v", a.name, resp)
+ reply = append(reply, resp)
+ }
+ }
+ }
+
+ hasPacketLoss := (a.payloadQueue.size() > 0)
+ if hasPacketLoss {
+ a.log.Tracef("[%s] packetloss: %s", a.name, a.payloadQueue.getGapAckBlocksString(a.peerLastTSN))
+ }
+
+ if (a.ackState != ackStateImmediate && !sackImmediately && !hasPacketLoss && a.ackMode == ackModeNormal) || a.ackMode == ackModeAlwaysDelay {
+ if a.ackState == ackStateIdle {
+ a.delayedAckTriggered = true
+ } else {
+ a.immediateAckTriggered = true
+ }
+ } else {
+ a.immediateAckTriggered = true
+ }
+
+ return reply
+}
+
+// The caller should hold the lock.
+func (a *Association) getMyReceiverWindowCredit() uint32 {
+ var bytesQueued uint32
+ for _, s := range a.streams {
+ bytesQueued += uint32(s.getNumBytesInReassemblyQueue())
+ }
+
+ if bytesQueued >= a.maxReceiveBufferSize {
+ return 0
+ }
+ return a.maxReceiveBufferSize - bytesQueued
+}
+
+// OpenStream opens a stream
+func (a *Association) OpenStream(streamIdentifier uint16, defaultPayloadType PayloadProtocolIdentifier) (*Stream, error) {
+ a.lock.Lock()
+ defer a.lock.Unlock()
+
+ if _, ok := a.streams[streamIdentifier]; ok {
+ return nil, errors.Errorf("there already exists a stream with identifier %d", streamIdentifier)
+ }
+
+ s := a.createStream(streamIdentifier, false)
+ s.setDefaultPayloadType(defaultPayloadType)
+
+ return s, nil
+}
+
+// AcceptStream accepts a stream
+func (a *Association) AcceptStream() (*Stream, error) {
+ s, ok := <-a.acceptCh
+ if !ok {
+ return nil, io.EOF // no more incoming streams
+ }
+ return s, nil
+}
+
+// createStream creates a stream. The caller should hold the lock and check no stream exists for this id.
+func (a *Association) createStream(streamIdentifier uint16, accept bool) *Stream {
+ s := &Stream{
+ association: a,
+ streamIdentifier: streamIdentifier,
+ reassemblyQueue: newReassemblyQueue(streamIdentifier),
+ log: a.log,
+ name: fmt.Sprintf("%d:%s", streamIdentifier, a.name),
+ }
+
+ s.readNotifier = sync.NewCond(&s.lock)
+
+ if accept {
+ select {
+ case a.acceptCh <- s:
+ a.streams[streamIdentifier] = s
+ a.log.Debugf("[%s] accepted a new stream (streamIdentifier: %d)",
+ a.name, streamIdentifier)
+ default:
+ a.log.Debugf("[%s] dropped a new stream (acceptCh size: %d)",
+ a.name, len(a.acceptCh))
+ return nil
+ }
+ } else {
+ a.streams[streamIdentifier] = s
+ }
+
+ return s
+}
+
+// getOrCreateStream gets or creates a stream. The caller should hold the lock.
+func (a *Association) getOrCreateStream(streamIdentifier uint16) *Stream {
+ if s, ok := a.streams[streamIdentifier]; ok {
+ return s
+ }
+
+ return a.createStream(streamIdentifier, true)
+}
+
+// The caller should hold the lock.
+func (a *Association) processSelectiveAck(d *chunkSelectiveAck) (map[uint16]int, uint32, error) { // nolint:gocognit
+ bytesAckedPerStream := map[uint16]int{}
+
+ // New ack point, so pop all ACKed packets from inflightQueue
+ // We add 1 because the "currentAckPoint" has already been popped from the inflight queue
+ // For the first SACK we take care of this by setting the ackpoint to cumAck - 1
+ for i := a.cumulativeTSNAckPoint + 1; sna32LTE(i, d.cumulativeTSNAck); i++ {
+ c, ok := a.inflightQueue.pop(i)
+ if !ok {
+ return nil, 0, errors.Errorf("tsn %v unable to be popped from inflight queue", i)
+ }
+
+ if !c.acked {
+ // RFC 4096 sec 6.3.2. Retransmission Timer Rules
+ // R3) Whenever a SACK is received that acknowledges the DATA chunk
+ // with the earliest outstanding TSN for that address, restart the
+ // T3-rtx timer for that address with its current RTO (if there is
+ // still outstanding data on that address).
+ if i == a.cumulativeTSNAckPoint+1 {
+ // T3 timer needs to be reset. Stop it for now.
+ a.t3RTX.stop()
+ }
+
+ nBytesAcked := len(c.userData)
+
+ // Sum the number of bytes acknowledged per stream
+ if amount, ok := bytesAckedPerStream[c.streamIdentifier]; ok {
+ bytesAckedPerStream[c.streamIdentifier] = amount + nBytesAcked
+ } else {
+ bytesAckedPerStream[c.streamIdentifier] = nBytesAcked
+ }
+
+ // RFC 4960 sec 6.3.1. RTO Calculation
+ // C4) When data is in flight and when allowed by rule C5 below, a new
+ // RTT measurement MUST be made each round trip. Furthermore, new
+ // RTT measurements SHOULD be made no more than once per round trip
+ // for a given destination transport address.
+ // C5) Karn's algorithm: RTT measurements MUST NOT be made using
+ // packets that were retransmitted (and thus for which it is
+ // ambiguous whether the reply was for the first instance of the
+ // chunk or for a later instance)
+ if c.nSent == 1 && sna32GTE(c.tsn, a.minTSN2MeasureRTT) {
+ a.minTSN2MeasureRTT = a.myNextTSN
+ rtt := time.Since(c.since).Seconds() * 1000.0
+ srtt := a.rtoMgr.setNewRTT(rtt)
+ a.log.Tracef("[%s] SACK: measured-rtt=%f srtt=%f new-rto=%f",
+ a.name, rtt, srtt, a.rtoMgr.getRTO())
+ }
+ }
+
+ if a.inFastRecovery && c.tsn == a.fastRecoverExitPoint {
+ a.log.Debugf("[%s] exit fast-recovery", a.name)
+ a.inFastRecovery = false
+ }
+ }
+
+ htna := d.cumulativeTSNAck
+
+ // Mark selectively acknowledged chunks as "acked"
+ for _, g := range d.gapAckBlocks {
+ for i := g.start; i <= g.end; i++ {
+ tsn := d.cumulativeTSNAck + uint32(i)
+ c, ok := a.inflightQueue.get(tsn)
+ if !ok {
+ return nil, 0, errors.Errorf("requested non-existent TSN %v", tsn)
+ }
+
+ if !c.acked {
+ nBytesAcked := a.inflightQueue.markAsAcked(tsn)
+
+ // Sum the number of bytes acknowledged per stream
+ if amount, ok := bytesAckedPerStream[c.streamIdentifier]; ok {
+ bytesAckedPerStream[c.streamIdentifier] = amount + nBytesAcked
+ } else {
+ bytesAckedPerStream[c.streamIdentifier] = nBytesAcked
+ }
+
+ a.log.Tracef("[%s] tsn=%d has been sacked", a.name, c.tsn)
+
+ if c.nSent == 1 {
+ a.minTSN2MeasureRTT = a.myNextTSN
+ rtt := time.Since(c.since).Seconds() * 1000.0
+ srtt := a.rtoMgr.setNewRTT(rtt)
+ a.log.Tracef("[%s] SACK: measured-rtt=%f srtt=%f new-rto=%f",
+ a.name, rtt, srtt, a.rtoMgr.getRTO())
+ }
+
+ if sna32LT(htna, tsn) {
+ htna = tsn
+ }
+ }
+ }
+ }
+
+ return bytesAckedPerStream, htna, nil
+}
+
+// The caller should hold the lock.
+func (a *Association) onCumulativeTSNAckPointAdvanced(totalBytesAcked int) {
+ // RFC 4096, sec 6.3.2. Retransmission Timer Rules
+ // R2) Whenever all outstanding data sent to an address have been
+ // acknowledged, turn off the T3-rtx timer of that address.
+ if a.inflightQueue.size() == 0 {
+ a.log.Tracef("[%s] SACK: no more packet in-flight (pending=%d)", a.name, a.pendingQueue.size())
+ a.t3RTX.stop()
+ } else {
+ a.log.Tracef("[%s] T3-rtx timer start (pt2)", a.name)
+ a.t3RTX.start(a.rtoMgr.getRTO())
+ }
+
+ // Update congestion control parameters
+ if a.cwnd <= a.ssthresh {
+ // RFC 4096, sec 7.2.1. Slow-Start
+ // o When cwnd is less than or equal to ssthresh, an SCTP endpoint MUST
+ // use the slow-start algorithm to increase cwnd only if the current
+ // congestion window is being fully utilized, an incoming SACK
+ // advances the Cumulative TSN Ack Point, and the data sender is not
+ // in Fast Recovery. Only when these three conditions are met can
+ // the cwnd be increased; otherwise, the cwnd MUST not be increased.
+ // If these conditions are met, then cwnd MUST be increased by, at
+ // most, the lesser of 1) the total size of the previously
+ // outstanding DATA chunk(s) acknowledged, and 2) the destination's
+ // path MTU.
+ if !a.inFastRecovery &&
+ a.pendingQueue.size() > 0 {
+ a.cwnd += min32(uint32(totalBytesAcked), a.cwnd) // TCP way
+ // a.cwnd += min32(uint32(totalBytesAcked), a.mtu) // SCTP way (slow)
+ a.log.Tracef("[%s] updated cwnd=%d ssthresh=%d acked=%d (SS)",
+ a.name, a.cwnd, a.ssthresh, totalBytesAcked)
+ } else {
+ a.log.Tracef("[%s] cwnd did not grow: cwnd=%d ssthresh=%d acked=%d FR=%v pending=%d",
+ a.name, a.cwnd, a.ssthresh, totalBytesAcked, a.inFastRecovery, a.pendingQueue.size())
+ }
+ } else {
+ // RFC 4096, sec 7.2.2. Congestion Avoidance
+ // o Whenever cwnd is greater than ssthresh, upon each SACK arrival
+ // that advances the Cumulative TSN Ack Point, increase
+ // partial_bytes_acked by the total number of bytes of all new chunks
+ // acknowledged in that SACK including chunks acknowledged by the new
+ // Cumulative TSN Ack and by Gap Ack Blocks.
+ a.partialBytesAcked += uint32(totalBytesAcked)
+
+ // o When partial_bytes_acked is equal to or greater than cwnd and
+ // before the arrival of the SACK the sender had cwnd or more bytes
+ // of data outstanding (i.e., before arrival of the SACK, flight size
+ // was greater than or equal to cwnd), increase cwnd by MTU, and
+ // reset partial_bytes_acked to (partial_bytes_acked - cwnd).
+ if a.partialBytesAcked >= a.cwnd && a.pendingQueue.size() > 0 {
+ a.partialBytesAcked -= a.cwnd
+ a.cwnd += a.mtu
+ a.log.Tracef("[%s] updated cwnd=%d ssthresh=%d acked=%d (CA)",
+ a.name, a.cwnd, a.ssthresh, totalBytesAcked)
+ }
+ }
+}
+
+// The caller should hold the lock.
+func (a *Association) processFastRetransmission(cumTSNAckPoint, htna uint32, cumTSNAckPointAdvanced bool) error {
+ // HTNA algorithm - RFC 4960 Sec 7.2.4
+ // Increment missIndicator of each chunks that the SACK reported missing
+ // when either of the following is met:
+ // a) Not in fast-recovery
+ // miss indications are incremented only for missing TSNs prior to the
+ // highest TSN newly acknowledged in the SACK.
+ // b) In fast-recovery AND the Cumulative TSN Ack Point advanced
+ // the miss indications are incremented for all TSNs reported missing
+ // in the SACK.
+ if !a.inFastRecovery || (a.inFastRecovery && cumTSNAckPointAdvanced) {
+ var maxTSN uint32
+ if !a.inFastRecovery {
+ // a) increment only for missing TSNs prior to the HTNA
+ maxTSN = htna
+ } else {
+ // b) increment for all TSNs reported missing
+ maxTSN = cumTSNAckPoint + uint32(a.inflightQueue.size()) + 1
+ }
+
+ for tsn := cumTSNAckPoint + 1; sna32LT(tsn, maxTSN); tsn++ {
+ c, ok := a.inflightQueue.get(tsn)
+ if !ok {
+ return errors.Errorf("requested non-existent TSN %v", tsn)
+ }
+ if !c.acked && !c.abandoned() && c.missIndicator < 3 {
+ c.missIndicator++
+ if c.missIndicator == 3 {
+ if !a.inFastRecovery {
+ // 2) If not in Fast Recovery, adjust the ssthresh and cwnd of the
+ // destination address(es) to which the missing DATA chunks were
+ // last sent, according to the formula described in Section 7.2.3.
+ a.inFastRecovery = true
+ a.fastRecoverExitPoint = htna
+ a.ssthresh = max32(a.cwnd/2, 4*a.mtu)
+ a.cwnd = a.ssthresh
+ a.partialBytesAcked = 0
+ a.willRetransmitFast = true
+
+ a.log.Tracef("[%s] updated cwnd=%d ssthresh=%d inflight=%d (FR)",
+ a.name, a.cwnd, a.ssthresh, a.inflightQueue.getNumBytes())
+ }
+ }
+ }
+ }
+ }
+
+ if a.inFastRecovery && cumTSNAckPointAdvanced {
+ a.willRetransmitFast = true
+ }
+
+ return nil
+}
+
+// The caller should hold the lock.
+func (a *Association) handleSack(d *chunkSelectiveAck) error {
+ a.log.Tracef("[%s] SACK: cumTSN=%d a_rwnd=%d", a.name, d.cumulativeTSNAck, d.advertisedReceiverWindowCredit)
+ state := a.getState()
+ if state != established {
+ return nil
+ }
+
+ a.stats.incSACKs()
+
+ if sna32GT(a.cumulativeTSNAckPoint, d.cumulativeTSNAck) {
+ // RFC 4960 sec 6.2.1. Processing a Received SACK
+ // D)
+ // i) If Cumulative TSN Ack is less than the Cumulative TSN Ack
+ // Point, then drop the SACK. Since Cumulative TSN Ack is
+ // monotonically increasing, a SACK whose Cumulative TSN Ack is
+ // less than the Cumulative TSN Ack Point indicates an out-of-
+ // order SACK.
+
+ a.log.Debugf("[%s] SACK Cumulative ACK %v is older than ACK point %v",
+ a.name,
+ d.cumulativeTSNAck,
+ a.cumulativeTSNAckPoint)
+
+ return nil
+ }
+
+ // Process selective ack
+ bytesAckedPerStream, htna, err := a.processSelectiveAck(d)
+ if err != nil {
+ return err
+ }
+
+ var totalBytesAcked int
+ for _, nBytesAcked := range bytesAckedPerStream {
+ totalBytesAcked += nBytesAcked
+ }
+
+ cumTSNAckPointAdvanced := false
+ if sna32LT(a.cumulativeTSNAckPoint, d.cumulativeTSNAck) {
+ a.log.Tracef("[%s] SACK: cumTSN advanced: %d -> %d",
+ a.name,
+ a.cumulativeTSNAckPoint,
+ d.cumulativeTSNAck)
+
+ a.cumulativeTSNAckPoint = d.cumulativeTSNAck
+ cumTSNAckPointAdvanced = true
+ a.onCumulativeTSNAckPointAdvanced(totalBytesAcked)
+ }
+
+ for si, nBytesAcked := range bytesAckedPerStream {
+ if s, ok := a.streams[si]; ok {
+ a.lock.Unlock()
+ s.onBufferReleased(nBytesAcked)
+ a.lock.Lock()
+ }
+ }
+
+ // New rwnd value
+ // RFC 4960 sec 6.2.1. Processing a Received SACK
+ // D)
+ // ii) Set rwnd equal to the newly received a_rwnd minus the number
+ // of bytes still outstanding after processing the Cumulative
+ // TSN Ack and the Gap Ack Blocks.
+
+ // bytes acked were already subtracted by markAsAcked() method
+ bytesOutstanding := uint32(a.inflightQueue.getNumBytes())
+ if bytesOutstanding >= d.advertisedReceiverWindowCredit {
+ a.rwnd = 0
+ } else {
+ a.rwnd = d.advertisedReceiverWindowCredit - bytesOutstanding
+ }
+
+ err = a.processFastRetransmission(d.cumulativeTSNAck, htna, cumTSNAckPointAdvanced)
+ if err != nil {
+ return err
+ }
+
+ if a.useForwardTSN {
+ // RFC 3758 Sec 3.5 C1
+ if sna32LT(a.advancedPeerTSNAckPoint, a.cumulativeTSNAckPoint) {
+ a.advancedPeerTSNAckPoint = a.cumulativeTSNAckPoint
+ }
+
+ // RFC 3758 Sec 3.5 C2
+ for i := a.advancedPeerTSNAckPoint + 1; ; i++ {
+ c, ok := a.inflightQueue.get(i)
+ if !ok {
+ break
+ }
+ if !c.abandoned() {
+ break
+ }
+ a.advancedPeerTSNAckPoint = i
+ }
+
+ // RFC 3758 Sec 3.5 C3
+ if sna32GT(a.advancedPeerTSNAckPoint, a.cumulativeTSNAckPoint) {
+ a.willSendForwardTSN = true
+ }
+ a.awakeWriteLoop()
+ }
+
+ if a.inflightQueue.size() > 0 {
+ // Start timer. (noop if already started)
+ a.log.Tracef("[%s] T3-rtx timer start (pt3)", a.name)
+ a.t3RTX.start(a.rtoMgr.getRTO())
+ }
+
+ if cumTSNAckPointAdvanced {
+ a.awakeWriteLoop()
+ }
+
+ return nil
+}
+
+// createForwardTSN generates ForwardTSN chunk.
+// This method will be be called if useForwardTSN is set to false.
+// The caller should hold the lock.
+func (a *Association) createForwardTSN() *chunkForwardTSN {
+ // RFC 3758 Sec 3.5 C4
+ streamMap := map[uint16]uint16{} // to report only once per SI
+ for i := a.cumulativeTSNAckPoint + 1; sna32LTE(i, a.advancedPeerTSNAckPoint); i++ {
+ c, ok := a.inflightQueue.get(i)
+ if !ok {
+ break
+ }
+
+ ssn, ok := streamMap[c.streamIdentifier]
+ if !ok {
+ streamMap[c.streamIdentifier] = c.streamSequenceNumber
+ } else if sna16LT(ssn, c.streamSequenceNumber) {
+ // to report only once with greatest SSN
+ streamMap[c.streamIdentifier] = c.streamSequenceNumber
+ }
+ }
+
+ fwdtsn := &chunkForwardTSN{
+ newCumulativeTSN: a.advancedPeerTSNAckPoint,
+ streams: []chunkForwardTSNStream{},
+ }
+
+ var streamStr string
+ for si, ssn := range streamMap {
+ streamStr += fmt.Sprintf("(si=%d ssn=%d)", si, ssn)
+ fwdtsn.streams = append(fwdtsn.streams, chunkForwardTSNStream{
+ identifier: si,
+ sequence: ssn,
+ })
+ }
+ a.log.Tracef("[%s] building fwdtsn: newCumulativeTSN=%d cumTSN=%d - %s", a.name, fwdtsn.newCumulativeTSN, a.cumulativeTSNAckPoint, streamStr)
+
+ return fwdtsn
+}
+
+// createPacket wraps chunks in a packet.
+// The caller should hold the read lock.
+func (a *Association) createPacket(cs []chunk) *packet {
+ return &packet{
+ verificationTag: a.peerVerificationTag,
+ sourcePort: a.sourcePort,
+ destinationPort: a.destinationPort,
+ chunks: cs,
+ }
+}
+
+// The caller should hold the lock.
+func (a *Association) handleReconfig(c *chunkReconfig) ([]*packet, error) {
+ a.log.Tracef("[%s] handleReconfig", a.name)
+
+ pp := make([]*packet, 0)
+
+ p, err := a.handleReconfigParam(c.paramA)
+ if err != nil {
+ return nil, err
+ }
+ if p != nil {
+ pp = append(pp, p)
+ }
+
+ if c.paramB != nil {
+ p, err = a.handleReconfigParam(c.paramB)
+ if err != nil {
+ return nil, err
+ }
+ if p != nil {
+ pp = append(pp, p)
+ }
+ }
+ return pp, nil
+}
+
+// The caller should hold the lock.
+func (a *Association) handleForwardTSN(c *chunkForwardTSN) []*packet {
+ a.log.Tracef("[%s] FwdTSN: %s", a.name, c.String())
+
+ if !a.useForwardTSN {
+ a.log.Warn("[%s] received FwdTSN but not enabled")
+ // Return an error chunk
+ cerr := &chunkError{
+ errorCauses: []errorCause{&errorCauseUnrecognizedChunkType{}},
+ }
+ outbound := &packet{}
+ outbound.verificationTag = a.peerVerificationTag
+ outbound.sourcePort = a.sourcePort
+ outbound.destinationPort = a.destinationPort
+ outbound.chunks = []chunk{cerr}
+ return []*packet{outbound}
+ }
+
+ // From RFC 3758 Sec 3.6:
+ // Note, if the "New Cumulative TSN" value carried in the arrived
+ // FORWARD TSN chunk is found to be behind or at the current cumulative
+ // TSN point, the data receiver MUST treat this FORWARD TSN as out-of-
+ // date and MUST NOT update its Cumulative TSN. The receiver SHOULD
+ // send a SACK to its peer (the sender of the FORWARD TSN) since such a
+ // duplicate may indicate the previous SACK was lost in the network.
+
+ a.log.Tracef("[%s] should send ack? newCumTSN=%d peerLastTSN=%d\n",
+ a.name, c.newCumulativeTSN, a.peerLastTSN)
+ if sna32LTE(c.newCumulativeTSN, a.peerLastTSN) {
+ a.log.Tracef("[%s] sending ack on Forward TSN", a.name)
+ a.ackState = ackStateImmediate
+ a.ackTimer.stop()
+ a.awakeWriteLoop()
+ return nil
+ }
+
+ // From RFC 3758 Sec 3.6:
+ // the receiver MUST perform the same TSN handling, including duplicate
+ // detection, gap detection, SACK generation, cumulative TSN
+ // advancement, etc. as defined in RFC 2960 [2]---with the following
+ // exceptions and additions.
+
+ // When a FORWARD TSN chunk arrives, the data receiver MUST first update
+ // its cumulative TSN point to the value carried in the FORWARD TSN
+ // chunk,
+
+ // Advance peerLastTSN
+ for sna32LT(a.peerLastTSN, c.newCumulativeTSN) {
+ a.payloadQueue.pop(a.peerLastTSN + 1) // may not exist
+ a.peerLastTSN++
+ }
+
+ // Report new peerLastTSN value and abandoned largest SSN value to
+ // corresponding streams so that the abandoned chunks can be removed
+ // from the reassemblyQueue.
+ for _, forwarded := range c.streams {
+ if s, ok := a.streams[forwarded.identifier]; ok {
+ s.handleForwardTSNForOrdered(forwarded.sequence)
+ }
+ }
+
+ // TSN may be forewared for unordered chunks. ForwardTSN chunk does not
+ // report which stream identifier it skipped for unordered chunks.
+ // Therefore, we need to broadcast this event to all existing streams for
+ // unordered chunks.
+ // See https://github.com/pion/sctp/issues/106
+ for _, s := range a.streams {
+ s.handleForwardTSNForUnordered(c.newCumulativeTSN)
+ }
+
+ return a.handlePeerLastTSNAndAcknowledgement(false)
+}
+
+func (a *Association) sendResetRequest(streamIdentifier uint16) error {
+ a.lock.Lock()
+ defer a.lock.Unlock()
+
+ state := a.getState()
+ if state != established {
+ return errors.Errorf("sending reset packet in non-established state: state=%s",
+ getAssociationStateString(state))
+ }
+
+ // Create DATA chunk which only contains valid stream identifier with
+ // nil userData and use it as a EOS from the stream.
+ c := &chunkPayloadData{
+ streamIdentifier: streamIdentifier,
+ beginningFragment: true,
+ endingFragment: true,
+ userData: nil,
+ }
+
+ a.pendingQueue.push(c)
+ a.awakeWriteLoop()
+ return nil
+}
+
+// The caller should hold the lock.
+func (a *Association) handleReconfigParam(raw param) (*packet, error) {
+ switch p := raw.(type) {
+ case *paramOutgoingResetRequest:
+ a.reconfigRequests[p.reconfigRequestSequenceNumber] = p
+ resp := a.resetStreamsIfAny(p)
+ if resp != nil {
+ return resp, nil
+ }
+ return nil, nil
+
+ case *paramReconfigResponse:
+ delete(a.reconfigs, p.reconfigResponseSequenceNumber)
+ if len(a.reconfigs) == 0 {
+ a.tReconfig.stop()
+ }
+ return nil, nil
+ default:
+ return nil, errors.Errorf("unexpected parameter type %T", p)
+ }
+}
+
+// The caller should hold the lock.
+func (a *Association) resetStreamsIfAny(p *paramOutgoingResetRequest) *packet {
+ result := reconfigResultSuccessPerformed
+ if sna32LTE(p.senderLastTSN, a.peerLastTSN) {
+ a.log.Debugf("[%s] resetStream(): senderLastTSN=%d <= peerLastTSN=%d",
+ a.name, p.senderLastTSN, a.peerLastTSN)
+ for _, id := range p.streamIdentifiers {
+ s, ok := a.streams[id]
+ if !ok {
+ continue
+ }
+ a.unregisterStream(s, io.EOF)
+ }
+ delete(a.reconfigRequests, p.reconfigRequestSequenceNumber)
+ } else {
+ a.log.Debugf("[%s] resetStream(): senderLastTSN=%d > peerLastTSN=%d",
+ a.name, p.senderLastTSN, a.peerLastTSN)
+ result = reconfigResultInProgress
+ }
+
+ return a.createPacket([]chunk{&chunkReconfig{
+ paramA: &paramReconfigResponse{
+ reconfigResponseSequenceNumber: p.reconfigRequestSequenceNumber,
+ result: result,
+ },
+ }})
+}
+
+// Move the chunk peeked with a.pendingQueue.peek() to the inflightQueue.
+// The caller should hold the lock.
+func (a *Association) movePendingDataChunkToInflightQueue(c *chunkPayloadData) {
+ if err := a.pendingQueue.pop(c); err != nil {
+ a.log.Errorf("[%s] failed to pop from pending queue: %s", a.name, err.Error())
+ }
+
+ // Mark all fragements are in-flight now
+ if c.endingFragment {
+ c.setAllInflight()
+ }
+
+ // Assign TSN
+ c.tsn = a.generateNextTSN()
+
+ c.since = time.Now() // use to calculate RTT and also for maxPacketLifeTime
+ c.nSent = 1 // being sent for the first time
+
+ a.checkPartialReliabilityStatus(c)
+
+ a.log.Tracef("[%s] sending ppi=%d tsn=%d ssn=%d sent=%d len=%d (%v,%v)",
+ a.name, c.payloadType, c.tsn, c.streamSequenceNumber, c.nSent, len(c.userData), c.beginningFragment, c.endingFragment)
+
+ // Push it into the inflightQueue
+ a.inflightQueue.pushNoCheck(c)
+}
+
+// popPendingDataChunksToSend pops chunks from the pending queues as many as
+// the cwnd and rwnd allows to send.
+// The caller should hold the lock.
+func (a *Association) popPendingDataChunksToSend() ([]*chunkPayloadData, []uint16) {
+ chunks := []*chunkPayloadData{}
+ var sisToReset []uint16 // stream identifieres to reset
+
+ if a.pendingQueue.size() > 0 {
+ // RFC 4960 sec 6.1. Transmission of DATA Chunks
+ // A) At any given time, the data sender MUST NOT transmit new data to
+ // any destination transport address if its peer's rwnd indicates
+ // that the peer has no buffer space (i.e., rwnd is 0; see Section
+ // 6.2.1). However, regardless of the value of rwnd (including if it
+ // is 0), the data sender can always have one DATA chunk in flight to
+ // the receiver if allowed by cwnd (see rule B, below).
+
+ for {
+ c := a.pendingQueue.peek()
+ if c == nil {
+ break // no more pending data
+ }
+
+ dataLen := uint32(len(c.userData))
+ if dataLen == 0 {
+ sisToReset = append(sisToReset, c.streamIdentifier)
+ err := a.pendingQueue.pop(c)
+ if err != nil {
+ a.log.Errorf("failed to pop from pending queue: %s", err.Error())
+ }
+ continue
+ }
+
+ if uint32(a.inflightQueue.getNumBytes())+dataLen > a.cwnd {
+ break // would exceeds cwnd
+ }
+
+ if dataLen > a.rwnd {
+ break // no more rwnd
+ }
+
+ a.rwnd -= dataLen
+
+ a.movePendingDataChunkToInflightQueue(c)
+ chunks = append(chunks, c)
+ }
+
+ // the data sender can always have one DATA chunk in flight to the receiver
+ if len(chunks) == 0 && a.inflightQueue.size() == 0 {
+ // Send zero window probe
+ c := a.pendingQueue.peek()
+ if c != nil {
+ a.movePendingDataChunkToInflightQueue(c)
+ chunks = append(chunks, c)
+ }
+ }
+ }
+
+ return chunks, sisToReset
+}
+
+// bundleDataChunksIntoPackets packs DATA chunks into packets. It tries to bundle
+// DATA chunks into a packet so long as the resulting packet size does not exceed
+// the path MTU.
+// The caller should hold the lock.
+func (a *Association) bundleDataChunksIntoPackets(chunks []*chunkPayloadData) []*packet {
+ packets := []*packet{}
+ chunksToSend := []chunk{}
+ bytesInPacket := int(commonHeaderSize)
+
+ for _, c := range chunks {
+ // RFC 4960 sec 6.1. Transmission of DATA Chunks
+ // Multiple DATA chunks committed for transmission MAY be bundled in a
+ // single packet. Furthermore, DATA chunks being retransmitted MAY be
+ // bundled with new DATA chunks, as long as the resulting packet size
+ // does not exceed the path MTU.
+ if bytesInPacket+len(c.userData) > int(a.mtu) {
+ packets = append(packets, a.createPacket(chunksToSend))
+ chunksToSend = []chunk{}
+ bytesInPacket = int(commonHeaderSize)
+ }
+
+ chunksToSend = append(chunksToSend, c)
+ bytesInPacket += int(dataChunkHeaderSize) + len(c.userData)
+ }
+
+ if len(chunksToSend) > 0 {
+ packets = append(packets, a.createPacket(chunksToSend))
+ }
+
+ return packets
+}
+
+// sendPayloadData sends the data chunks.
+func (a *Association) sendPayloadData(chunks []*chunkPayloadData) error {
+ a.lock.Lock()
+ defer a.lock.Unlock()
+
+ state := a.getState()
+ if state != established {
+ return errors.Errorf("sending payload data in non-established state: state=%s",
+ getAssociationStateString(state))
+ }
+
+ // Push the chunks into the pending queue first.
+ for _, c := range chunks {
+ a.pendingQueue.push(c)
+ }
+
+ a.awakeWriteLoop()
+ return nil
+}
+
+// The caller should hold the lock.
+func (a *Association) checkPartialReliabilityStatus(c *chunkPayloadData) {
+ if !a.useForwardTSN {
+ return
+ }
+
+ // draft-ietf-rtcweb-data-protocol-09.txt section 6
+ // 6. Procedures
+ // All Data Channel Establishment Protocol messages MUST be sent using
+ // ordered delivery and reliable transmission.
+ //
+ if c.payloadType == PayloadTypeWebRTCDCEP {
+ return
+ }
+
+ // PR-SCTP
+ if s, ok := a.streams[c.streamIdentifier]; ok {
+ s.lock.RLock()
+ if s.reliabilityType == ReliabilityTypeRexmit {
+ if c.nSent >= s.reliabilityValue {
+ c.setAbandoned(true)
+ a.log.Tracef("[%s] marked as abandoned: tsn=%d ppi=%d (remix: %d)", a.name, c.tsn, c.payloadType, c.nSent)
+ }
+ } else if s.reliabilityType == ReliabilityTypeTimed {
+ elapsed := int64(time.Since(c.since).Seconds() * 1000)
+ if elapsed >= int64(s.reliabilityValue) {
+ c.setAbandoned(true)
+ a.log.Tracef("[%s] marked as abandoned: tsn=%d ppi=%d (timed: %d)", a.name, c.tsn, c.payloadType, elapsed)
+ }
+ }
+ s.lock.RUnlock()
+ } else {
+ a.log.Errorf("[%s] stream %d not found)", a.name, c.streamIdentifier)
+ }
+}
+
+// getDataPacketsToRetransmit is called when T3-rtx is timed out and retransmit outstanding data chunks
+// that are not acked or abandoned yet.
+// The caller should hold the lock.
+func (a *Association) getDataPacketsToRetransmit() []*packet {
+ awnd := min32(a.cwnd, a.rwnd)
+ chunks := []*chunkPayloadData{}
+ var bytesToSend int
+ var done bool
+
+ for i := 0; !done; i++ {
+ c, ok := a.inflightQueue.get(a.cumulativeTSNAckPoint + uint32(i) + 1)
+ if !ok {
+ break // end of pending data
+ }
+
+ if !c.retransmit {
+ continue
+ }
+
+ if i == 0 && int(a.rwnd) < len(c.userData) {
+ // Send it as a zero window probe
+ done = true
+ } else if bytesToSend+len(c.userData) > int(awnd) {
+ break
+ }
+
+ // reset the retransmit flag not to retransmit again before the next
+ // t3-rtx timer fires
+ c.retransmit = false
+ bytesToSend += len(c.userData)
+
+ c.nSent++
+
+ a.checkPartialReliabilityStatus(c)
+
+ a.log.Tracef("[%s] retransmitting tsn=%d ssn=%d sent=%d", a.name, c.tsn, c.streamSequenceNumber, c.nSent)
+
+ chunks = append(chunks, c)
+ }
+
+ return a.bundleDataChunksIntoPackets(chunks)
+}
+
+// generateNextTSN returns the myNextTSN and increases it. The caller should hold the lock.
+// The caller should hold the lock.
+func (a *Association) generateNextTSN() uint32 {
+ tsn := a.myNextTSN
+ a.myNextTSN++
+ return tsn
+}
+
+// generateNextRSN returns the myNextRSN and increases it. The caller should hold the lock.
+// The caller should hold the lock.
+func (a *Association) generateNextRSN() uint32 {
+ rsn := a.myNextRSN
+ a.myNextRSN++
+ return rsn
+}
+
+func (a *Association) createSelectiveAckChunk() *chunkSelectiveAck {
+ sack := &chunkSelectiveAck{}
+ sack.cumulativeTSNAck = a.peerLastTSN
+ sack.advertisedReceiverWindowCredit = a.getMyReceiverWindowCredit()
+ sack.duplicateTSN = a.payloadQueue.popDuplicates()
+ sack.gapAckBlocks = a.payloadQueue.getGapAckBlocks(a.peerLastTSN)
+ return sack
+}
+
+func pack(p *packet) []*packet {
+ return []*packet{p}
+}
+
+func (a *Association) handleChunkStart() {
+ a.lock.Lock()
+ defer a.lock.Unlock()
+
+ a.delayedAckTriggered = false
+ a.immediateAckTriggered = false
+}
+
+func (a *Association) handleChunkEnd() {
+ a.lock.Lock()
+ defer a.lock.Unlock()
+
+ if a.immediateAckTriggered {
+ // Send SACK now!
+ a.ackState = ackStateImmediate
+ a.ackTimer.stop()
+ a.awakeWriteLoop()
+ } else if a.delayedAckTriggered {
+ // Will send delayed ack in the next ack timeout
+ a.ackState = ackStateDelay
+ a.ackTimer.start()
+ }
+}
+
+func (a *Association) handleChunk(p *packet, c chunk) error {
+ a.lock.Lock()
+ defer a.lock.Unlock()
+
+ var packets []*packet
+ var err error
+
+ if _, err = c.check(); err != nil {
+ a.log.Errorf("[ %s ] failed validating chunk: %s ", a.name, err)
+ return nil
+ }
+
+ switch c := c.(type) {
+ case *chunkInit:
+ packets, err = a.handleInit(p, c)
+
+ case *chunkInitAck:
+ err = a.handleInitAck(p, c)
+
+ case *chunkAbort:
+ var errStr string
+ for _, e := range c.errorCauses {
+ errStr += fmt.Sprintf("(%s)", e)
+ }
+ return fmt.Errorf("[%s] %w: %s", a.name, errChunk, errStr)
+
+ case *chunkError:
+ var errStr string
+ for _, e := range c.errorCauses {
+ errStr += fmt.Sprintf("(%s)", e)
+ }
+ a.log.Debugf("[%s] Error chunk, with following errors: %s", a.name, errStr)
+
+ case *chunkHeartbeat:
+ packets = a.handleHeartbeat(c)
+
+ case *chunkCookieEcho:
+ packets = a.handleCookieEcho(c)
+
+ case *chunkCookieAck:
+ a.handleCookieAck()
+
+ case *chunkPayloadData:
+ packets = a.handleData(c)
+
+ case *chunkSelectiveAck:
+ err = a.handleSack(c)
+
+ case *chunkReconfig:
+ packets, err = a.handleReconfig(c)
+
+ case *chunkForwardTSN:
+ packets = a.handleForwardTSN(c)
+
+ default:
+ err = errors.Errorf("unhandled chunk type")
+ }
+
+ // Log and return, the only condition that is fatal is a ABORT chunk
+ if err != nil {
+ a.log.Errorf("Failed to handle chunk: %v", err)
+ return nil
+ }
+
+ if len(packets) > 0 {
+ a.controlQueue.pushAll(packets)
+ a.awakeWriteLoop()
+ }
+
+ return nil
+}
+
+func (a *Association) onRetransmissionTimeout(id int, nRtos uint) {
+ a.lock.Lock()
+ defer a.lock.Unlock()
+
+ if id == timerT1Init {
+ err := a.sendInit()
+ if err != nil {
+ a.log.Debugf("[%s] failed to retransmit init (nRtos=%d): %v", a.name, nRtos, err)
+ }
+ return
+ }
+
+ if id == timerT1Cookie {
+ err := a.sendCookieEcho()
+ if err != nil {
+ a.log.Debugf("[%s] failed to retransmit cookie-echo (nRtos=%d): %v", a.name, nRtos, err)
+ }
+ return
+ }
+
+ if id == timerT3RTX {
+ a.stats.incT3Timeouts()
+
+ // RFC 4960 sec 6.3.3
+ // E1) For the destination address for which the timer expires, adjust
+ // its ssthresh with rules defined in Section 7.2.3 and set the
+ // cwnd <- MTU.
+ // RFC 4960 sec 7.2.3
+ // When the T3-rtx timer expires on an address, SCTP should perform slow
+ // start by:
+ // ssthresh = max(cwnd/2, 4*MTU)
+ // cwnd = 1*MTU
+
+ a.ssthresh = max32(a.cwnd/2, 4*a.mtu)
+ a.cwnd = a.mtu
+ a.log.Tracef("[%s] updated cwnd=%d ssthresh=%d inflight=%d (RTO)",
+ a.name, a.cwnd, a.ssthresh, a.inflightQueue.getNumBytes())
+
+ // RFC 3758 sec 3.5
+ // A5) Any time the T3-rtx timer expires, on any destination, the sender
+ // SHOULD try to advance the "Advanced.Peer.Ack.Point" by following
+ // the procedures outlined in C2 - C5.
+ if a.useForwardTSN {
+ // RFC 3758 Sec 3.5 C2
+ for i := a.advancedPeerTSNAckPoint + 1; ; i++ {
+ c, ok := a.inflightQueue.get(i)
+ if !ok {
+ break
+ }
+ if !c.abandoned() {
+ break
+ }
+ a.advancedPeerTSNAckPoint = i
+ }
+
+ // RFC 3758 Sec 3.5 C3
+ if sna32GT(a.advancedPeerTSNAckPoint, a.cumulativeTSNAckPoint) {
+ a.willSendForwardTSN = true
+ }
+ }
+
+ a.log.Debugf("[%s] T3-rtx timed out: nRtos=%d cwnd=%d ssthresh=%d", a.name, nRtos, a.cwnd, a.ssthresh)
+
+ /*
+ a.log.Debugf(" - advancedPeerTSNAckPoint=%d", a.advancedPeerTSNAckPoint)
+ a.log.Debugf(" - cumulativeTSNAckPoint=%d", a.cumulativeTSNAckPoint)
+ a.inflightQueue.updateSortedKeys()
+ for i, tsn := range a.inflightQueue.sorted {
+ if c, ok := a.inflightQueue.get(tsn); ok {
+ a.log.Debugf(" - [%d] tsn=%d acked=%v abandoned=%v (%v,%v) len=%d",
+ i, c.tsn, c.acked, c.abandoned(), c.beginningFragment, c.endingFragment, len(c.userData))
+ }
+ }
+ */
+
+ a.inflightQueue.markAllToRetrasmit()
+ a.awakeWriteLoop()
+
+ return
+ }
+
+ if id == timerReconfig {
+ a.willRetransmitReconfig = true
+ a.awakeWriteLoop()
+ }
+}
+
+func (a *Association) onRetransmissionFailure(id int) {
+ a.lock.Lock()
+ defer a.lock.Unlock()
+
+ if id == timerT1Init {
+ a.log.Errorf("[%s] retransmission failure: T1-init", a.name)
+ a.handshakeCompletedCh <- errors.Errorf("handshake failed (INIT ACK)")
+ return
+ }
+
+ if id == timerT1Cookie {
+ a.log.Errorf("[%s] retransmission failure: T1-cookie", a.name)
+ a.handshakeCompletedCh <- errors.Errorf("handshake failed (COOKIE ECHO)")
+ return
+ }
+
+ if id == timerT3RTX {
+ // T3-rtx timer will not fail by design
+ // Justifications:
+ // * ICE would fail if the connectivity is lost
+ // * WebRTC spec is not clear how this incident should be reported to ULP
+ a.log.Errorf("[%s] retransmission failure: T3-rtx (DATA)", a.name)
+ return
+ }
+}
+
+func (a *Association) onAckTimeout() {
+ a.lock.Lock()
+ defer a.lock.Unlock()
+
+ a.log.Tracef("[%s] ack timed out (ackState: %d)", a.name, a.ackState)
+ a.stats.incAckTimeouts()
+
+ a.ackState = ackStateImmediate
+ a.awakeWriteLoop()
+}
+
+// bufferedAmount returns total amount (in bytes) of currently buffered user data.
+// This is used only by testing.
+func (a *Association) bufferedAmount() int {
+ a.lock.RLock()
+ defer a.lock.RUnlock()
+
+ return a.pendingQueue.getNumBytes() + a.inflightQueue.getNumBytes()
+}
+
+// MaxMessageSize returns the maximum message size you can send.
+func (a *Association) MaxMessageSize() uint32 {
+ return atomic.LoadUint32(&a.maxMessageSize)
+}
+
+// SetMaxMessageSize sets the maximum message size you can send.
+func (a *Association) SetMaxMessageSize(maxMsgSize uint32) {
+ atomic.StoreUint32(&a.maxMessageSize, maxMsgSize)
+}
diff --git a/vendor/github.com/pion/sctp/association_stats.go b/vendor/github.com/pion/sctp/association_stats.go
new file mode 100644
index 0000000..4ccb7be
--- /dev/null
+++ b/vendor/github.com/pion/sctp/association_stats.go
@@ -0,0 +1,61 @@
+package sctp
+
+import (
+ "sync/atomic"
+)
+
+type associationStats struct {
+ nDATAs uint64
+ nSACKs uint64
+ nT3Timeouts uint64
+ nAckTimeouts uint64
+ nFastRetrans uint64
+}
+
+func (s *associationStats) incDATAs() {
+ atomic.AddUint64(&s.nDATAs, 1)
+}
+
+func (s *associationStats) getNumDATAs() uint64 {
+ return atomic.LoadUint64(&s.nDATAs)
+}
+
+func (s *associationStats) incSACKs() {
+ atomic.AddUint64(&s.nSACKs, 1)
+}
+
+func (s *associationStats) getNumSACKs() uint64 {
+ return atomic.LoadUint64(&s.nSACKs)
+}
+
+func (s *associationStats) incT3Timeouts() {
+ atomic.AddUint64(&s.nT3Timeouts, 1)
+}
+
+func (s *associationStats) getNumT3Timeouts() uint64 {
+ return atomic.LoadUint64(&s.nT3Timeouts)
+}
+
+func (s *associationStats) incAckTimeouts() {
+ atomic.AddUint64(&s.nAckTimeouts, 1)
+}
+
+func (s *associationStats) getNumAckTimeouts() uint64 {
+ return atomic.LoadUint64(&s.nAckTimeouts)
+}
+
+func (s *associationStats) incFastRetrans() {
+ atomic.AddUint64(&s.nFastRetrans, 1)
+}
+
+func (s *associationStats) getNumFastRetrans() uint64 {
+ return atomic.LoadUint64(&s.nFastRetrans)
+}
+
+func (s *associationStats) reset() {
+ atomic.StoreUint64(&s.nDATAs, 0)
+ atomic.StoreUint64(&s.nSACKs, 0)
+ atomic.StoreUint64(&s.nT3Timeouts, 0)
+ atomic.StoreUint64(&s.nAckTimeouts, 0)
+ atomic.StoreUint64(&s.nFastRetrans, 0)
+}
diff --git a/vendor/github.com/pion/sctp/chunk.go b/vendor/github.com/pion/sctp/chunk.go
new file mode 100644
index 0000000..ec47da1
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk.go
@@ -0,0 +1,9 @@
+package sctp
+
+type chunk interface {
+ unmarshal(raw []byte) error
+ marshal() ([]byte, error)
+ check() (bool, error)
+
+ valueLength() int
+}
diff --git a/vendor/github.com/pion/sctp/chunk_abort.go b/vendor/github.com/pion/sctp/chunk_abort.go
new file mode 100644
index 0000000..9fd4692
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk_abort.go
@@ -0,0 +1,88 @@
+package sctp // nolint:dupl
+
+import (
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+/*
+Abort represents an SCTP Chunk of type ABORT
+
+The ABORT chunk is sent to the peer of an association to close the
+association. The ABORT chunk may contain Cause Parameters to inform
+the receiver about the reason of the abort. DATA chunks MUST NOT be
+bundled with ABORT. Control chunks (except for INIT, INIT ACK, and
+SHUTDOWN COMPLETE) MAY be bundled with an ABORT, but they MUST be
+placed before the ABORT in the SCTP packet or they will be ignored by
+the receiver.
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Type = 6 |Reserved |T| Length |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| |
+| zero or more Error Causes |
+| |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+*/
+type chunkAbort struct {
+ chunkHeader
+ errorCauses []errorCause
+}
+
+func (a *chunkAbort) unmarshal(raw []byte) error {
+ if err := a.chunkHeader.unmarshal(raw); err != nil {
+ return err
+ }
+
+ if a.typ != ctAbort {
+ return errors.Errorf("ChunkType is not of type ABORT, actually is %s", a.typ.String())
+ }
+
+ offset := chunkHeaderSize
+ for {
+ if len(raw)-offset < 4 {
+ break
+ }
+
+ e, err := buildErrorCause(raw[offset:])
+ if err != nil {
+ return errors.Wrap(err, "Failed build Abort Chunk")
+ }
+
+ offset += int(e.length())
+ a.errorCauses = append(a.errorCauses, e)
+ }
+ return nil
+}
+
+func (a *chunkAbort) marshal() ([]byte, error) {
+ a.chunkHeader.typ = ctAbort
+ a.flags = 0x00
+ a.raw = []byte{}
+ for _, ec := range a.errorCauses {
+ raw, err := ec.marshal()
+ if err != nil {
+ return nil, err
+ }
+ a.raw = append(a.raw, raw...)
+ }
+ return a.chunkHeader.marshal()
+}
+
+func (a *chunkAbort) check() (abort bool, err error) {
+ return false, nil
+}
+
+// String makes chunkAbort printable
+func (a *chunkAbort) String() string {
+ res := a.chunkHeader.String()
+
+ for _, cause := range a.errorCauses {
+ res += fmt.Sprintf("\n - %s", cause)
+ }
+
+ return res
+}
diff --git a/vendor/github.com/pion/sctp/chunk_cookie_ack.go b/vendor/github.com/pion/sctp/chunk_cookie_ack.go
new file mode 100644
index 0000000..83b6f71
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk_cookie_ack.go
@@ -0,0 +1,44 @@
+package sctp
+
+import (
+ "github.com/pkg/errors"
+)
+
+/*
+chunkCookieAck represents an SCTP Chunk of type chunkCookieAck
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Type = 11 |Chunk Flags | Length = 4 |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+*/
+type chunkCookieAck struct {
+ chunkHeader
+}
+
+func (c *chunkCookieAck) unmarshal(raw []byte) error {
+ if err := c.chunkHeader.unmarshal(raw); err != nil {
+ return err
+ }
+
+ if c.typ != ctCookieAck {
+ return errors.Errorf("ChunkType is not of type COOKIEACK, actually is %s", c.typ.String())
+ }
+
+ return nil
+}
+
+func (c *chunkCookieAck) marshal() ([]byte, error) {
+ c.chunkHeader.typ = ctCookieAck
+ return c.chunkHeader.marshal()
+}
+
+func (c *chunkCookieAck) check() (abort bool, err error) {
+ return false, nil
+}
+
+// String makes chunkCookieAck printable
+func (c *chunkCookieAck) String() string {
+ return c.chunkHeader.String()
+}
diff --git a/vendor/github.com/pion/sctp/chunk_cookie_echo.go b/vendor/github.com/pion/sctp/chunk_cookie_echo.go
new file mode 100644
index 0000000..3f0ed36
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk_cookie_echo.go
@@ -0,0 +1,46 @@
+package sctp
+
+import (
+ "github.com/pkg/errors"
+)
+
+/*
+CookieEcho represents an SCTP Chunk of type CookieEcho
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Type = 10 |Chunk Flags | Length |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Cookie |
+| |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+*/
+type chunkCookieEcho struct {
+ chunkHeader
+ cookie []byte
+}
+
+func (c *chunkCookieEcho) unmarshal(raw []byte) error {
+ if err := c.chunkHeader.unmarshal(raw); err != nil {
+ return err
+ }
+
+ if c.typ != ctCookieEcho {
+ return errors.Errorf("ChunkType is not of type COOKIEECHO, actually is %s", c.typ.String())
+ }
+ c.cookie = c.raw
+
+ return nil
+}
+
+func (c *chunkCookieEcho) marshal() ([]byte, error) {
+ c.chunkHeader.typ = ctCookieEcho
+ c.chunkHeader.raw = c.cookie
+ return c.chunkHeader.marshal()
+}
+
+func (c *chunkCookieEcho) check() (abort bool, err error) {
+ return false, nil
+}
diff --git a/vendor/github.com/pion/sctp/chunk_error.go b/vendor/github.com/pion/sctp/chunk_error.go
new file mode 100644
index 0000000..eb29324
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk_error.go
@@ -0,0 +1,95 @@
+package sctp // nolint:dupl
+
+import (
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+/*
+ Operation Error (ERROR) (9)
+
+ An endpoint sends this chunk to its peer endpoint to notify it of
+ certain error conditions. It contains one or more error causes. An
+ Operation Error is not considered fatal in and of itself, but may be
+ used with an ERROR chunk to report a fatal condition. It has the
+ following parameters:
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Type = 9 | Chunk Flags | Length |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ \ \
+ / one or more Error Causes /
+ \ \
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Chunk Flags: 8 bits
+
+ Set to 0 on transmit and ignored on receipt.
+
+ Length: 16 bits (unsigned integer)
+
+ Set to the size of the chunk in bytes, including the chunk header
+ and all the Error Cause fields present.
+*/
+type chunkError struct {
+ chunkHeader
+ errorCauses []errorCause
+}
+
+func (a *chunkError) unmarshal(raw []byte) error {
+ if err := a.chunkHeader.unmarshal(raw); err != nil {
+ return err
+ }
+
+ if a.typ != ctError {
+ return errors.Errorf("ChunkType is not of type ctError, actually is %s", a.typ.String())
+ }
+
+ offset := chunkHeaderSize
+ for {
+ if len(raw)-offset < 4 {
+ break
+ }
+
+ e, err := buildErrorCause(raw[offset:])
+ if err != nil {
+ return errors.Wrap(err, "Failed build Error Chunk")
+ }
+
+ offset += int(e.length())
+ a.errorCauses = append(a.errorCauses, e)
+ }
+ return nil
+}
+
+func (a *chunkError) marshal() ([]byte, error) {
+ a.chunkHeader.typ = ctError
+ a.flags = 0x00
+ a.raw = []byte{}
+ for _, ec := range a.errorCauses {
+ raw, err := ec.marshal()
+ if err != nil {
+ return nil, err
+ }
+ a.raw = append(a.raw, raw...)
+ }
+ return a.chunkHeader.marshal()
+}
+
+func (a *chunkError) check() (abort bool, err error) {
+ return false, nil
+}
+
+// String makes chunkError printable
+func (a *chunkError) String() string {
+ res := a.chunkHeader.String()
+
+ for _, cause := range a.errorCauses {
+ res += fmt.Sprintf("\n - %s", cause)
+ }
+
+ return res
+}
diff --git a/vendor/github.com/pion/sctp/chunk_forward_tsn.go b/vendor/github.com/pion/sctp/chunk_forward_tsn.go
new file mode 100644
index 0000000..f6ff357
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk_forward_tsn.go
@@ -0,0 +1,145 @@
+package sctp
+
+import (
+ "encoding/binary"
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+// This chunk shall be used by the data sender to inform the data
+// receiver to adjust its cumulative received TSN point forward because
+// some missing TSNs are associated with data chunks that SHOULD NOT be
+// transmitted or retransmitted by the sender.
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Type = 192 | Flags = 0x00 | Length = Variable |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | New Cumulative TSN |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Stream-1 | Stream Sequence-1 |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// \ /
+// / \
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Stream-N | Stream Sequence-N |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+type chunkForwardTSN struct {
+ chunkHeader
+
+ // This indicates the new cumulative TSN to the data receiver. Upon
+ // the reception of this value, the data receiver MUST consider
+ // any missing TSNs earlier than or equal to this value as received,
+ // and stop reporting them as gaps in any subsequent SACKs.
+ newCumulativeTSN uint32
+
+ streams []chunkForwardTSNStream
+}
+
+const (
+ newCumulativeTSNLength = 4
+ forwardTSNStreamLength = 4
+)
+
+var errMarshalStreamFailed = errors.New("failed to marshal stream")
+
+func (c *chunkForwardTSN) unmarshal(raw []byte) error {
+ if err := c.chunkHeader.unmarshal(raw); err != nil {
+ return err
+ }
+
+ if len(c.raw) < newCumulativeTSNLength {
+ return errors.New("chunk to short")
+ }
+
+ c.newCumulativeTSN = binary.BigEndian.Uint32(c.raw[0:])
+
+ offset := newCumulativeTSNLength
+ remaining := len(c.raw) - offset
+ for remaining > 0 {
+ s := chunkForwardTSNStream{}
+
+ if err := s.unmarshal(c.raw[offset:]); err != nil {
+ return fmt.Errorf("failed to unmarshal stream: %w", err)
+ }
+
+ c.streams = append(c.streams, s)
+
+ offset += s.length()
+ remaining -= s.length()
+ }
+
+ return nil
+}
+
+func (c *chunkForwardTSN) marshal() ([]byte, error) {
+ out := make([]byte, newCumulativeTSNLength)
+ binary.BigEndian.PutUint32(out[0:], c.newCumulativeTSN)
+
+ for _, s := range c.streams {
+ b, err := s.marshal()
+ if err != nil {
+ return nil, fmt.Errorf("%w: %v", errMarshalStreamFailed, err)
+ }
+ out = append(out, b...)
+ }
+
+ c.typ = ctForwardTSN
+ c.raw = out
+ return c.chunkHeader.marshal()
+}
+
+func (c *chunkForwardTSN) check() (abort bool, err error) {
+ return true, nil
+}
+
+// String makes chunkForwardTSN printable
+func (c *chunkForwardTSN) String() string {
+ res := fmt.Sprintf("New Cumulative TSN: %d\n", c.newCumulativeTSN)
+ for _, s := range c.streams {
+ res += fmt.Sprintf(" - si=%d, ssn=%d\n", s.identifier, s.sequence)
+ }
+ return res
+}
+
+type chunkForwardTSNStream struct {
+ // This field holds a stream number that was skipped by this
+ // FWD-TSN.
+ identifier uint16
+
+ // This field holds the sequence number associated with the stream
+ // that was skipped. The stream sequence field holds the largest
+ // stream sequence number in this stream being skipped. The receiver
+ // of the FWD-TSN's can use the Stream-N and Stream Sequence-N fields
+ // to enable delivery of any stranded TSN's that remain on the stream
+ // re-ordering queues. This field MUST NOT report TSN's corresponding
+ // to DATA chunks that are marked as unordered. For ordered DATA
+ // chunks this field MUST be filled in.
+ sequence uint16
+}
+
+func (s *chunkForwardTSNStream) length() int {
+ return forwardTSNStreamLength
+}
+
+func (s *chunkForwardTSNStream) unmarshal(raw []byte) error {
+ if len(raw) < forwardTSNStreamLength {
+ return errors.New("stream to short")
+ }
+ s.identifier = binary.BigEndian.Uint16(raw[0:])
+ s.sequence = binary.BigEndian.Uint16(raw[2:])
+
+ return nil
+}
+
+func (s *chunkForwardTSNStream) marshal() ([]byte, error) { // nolint:unparam
+ out := make([]byte, forwardTSNStreamLength)
+
+ binary.BigEndian.PutUint16(out[0:], s.identifier)
+ binary.BigEndian.PutUint16(out[2:], s.sequence)
+
+ return out, nil
+}
diff --git a/vendor/github.com/pion/sctp/chunk_heartbeat.go b/vendor/github.com/pion/sctp/chunk_heartbeat.go
new file mode 100644
index 0000000..f2026a4
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk_heartbeat.go
@@ -0,0 +1,75 @@
+package sctp
+
+import (
+ "github.com/pkg/errors"
+)
+
+/*
+chunkHeartbeat represents an SCTP Chunk of type HEARTBEAT
+
+An endpoint should send this chunk to its peer endpoint to probe the
+reachability of a particular destination transport address defined in
+the present association.
+
+The parameter field contains the Heartbeat Information, which is a
+variable-length opaque data structure understood only by the sender.
+
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Type = 4 | Chunk Flags | Heartbeat Length |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| |
+| Heartbeat Information TLV (Variable-Length) |
+| |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+Defined as a variable-length parameter using the format described
+in Section 3.2.1, i.e.:
+
+Variable Parameters Status Type Value
+-------------------------------------------------------------
+heartbeat Info Mandatory 1
+
+*/
+type chunkHeartbeat struct {
+ chunkHeader
+ params []param
+}
+
+func (h *chunkHeartbeat) unmarshal(raw []byte) error {
+ if err := h.chunkHeader.unmarshal(raw); err != nil {
+ return err
+ } else if h.typ != ctHeartbeat {
+ return errors.Errorf("ChunkType is not of type HEARTBEAT, actually is %s", h.typ.String())
+ }
+
+ if len(raw) <= chunkHeaderSize {
+ return errors.Errorf("Heartbeat is not long enough to contain Heartbeat Info %d", len(raw))
+ }
+
+ pType, err := parseParamType(raw[chunkHeaderSize:])
+ if err != nil {
+ return errors.Wrap(err, "failed to parse param type")
+ }
+ if pType != heartbeatInfo {
+ return errors.Errorf("Heartbeat should only have HEARTBEAT param, instead have %s", pType.String())
+ }
+
+ p, err := buildParam(pType, raw[chunkHeaderSize:])
+ if err != nil {
+ return errors.Wrap(err, "Failed unmarshalling param in Heartbeat Chunk")
+ }
+ h.params = append(h.params, p)
+
+ return nil
+}
+
+func (h *chunkHeartbeat) Marshal() ([]byte, error) {
+ return nil, errors.Errorf("Unimplemented")
+}
+
+func (h *chunkHeartbeat) check() (abort bool, err error) {
+ return false, nil
+}
diff --git a/vendor/github.com/pion/sctp/chunk_heartbeat_ack.go b/vendor/github.com/pion/sctp/chunk_heartbeat_ack.go
new file mode 100644
index 0000000..ff84090
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk_heartbeat_ack.go
@@ -0,0 +1,86 @@
+package sctp
+
+import (
+ "github.com/pkg/errors"
+)
+
+/*
+chunkHeartbeatAck represents an SCTP Chunk of type HEARTBEAT ACK
+
+An endpoint should send this chunk to its peer endpoint as a response
+to a HEARTBEAT chunk (see Section 8.3). A HEARTBEAT ACK is always
+sent to the source IP address of the IP datagram containing the
+HEARTBEAT chunk to which this ack is responding.
+
+The parameter field contains a variable-length opaque data structure.
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Type = 5 | Chunk Flags | Heartbeat Ack Length |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| |
+| Heartbeat Information TLV (Variable-Length) |
+| |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+
+Defined as a variable-length parameter using the format described
+in Section 3.2.1, i.e.:
+
+Variable Parameters Status Type Value
+-------------------------------------------------------------
+Heartbeat Info Mandatory 1
+
+*/
+type chunkHeartbeatAck struct {
+ chunkHeader
+ params []param
+}
+
+func (h *chunkHeartbeatAck) unmarshal(raw []byte) error {
+ return errors.Errorf("Unimplemented")
+}
+
+func (h *chunkHeartbeatAck) marshal() ([]byte, error) {
+ if len(h.params) != 1 {
+ return nil, errors.Errorf("Heartbeat Ack must have one param")
+ }
+
+ switch h.params[0].(type) {
+ case *paramHeartbeatInfo:
+ // ParamHeartbeatInfo is valid
+ default:
+ return nil, errors.Errorf("Heartbeat Ack must have one param, and it should be a HeartbeatInfo")
+ }
+
+ out := make([]byte, 0)
+ for idx, p := range h.params {
+ pp, err := p.marshal()
+ if err != nil {
+ return nil, errors.Wrap(err, "Unable to marshal parameter for Heartbeat Ack")
+ }
+
+ out = append(out, pp...)
+
+ // Chunks (including Type, Length, and Value fields) are padded out
+ // by the sender with all zero bytes to be a multiple of 4 bytes
+ // long. This padding MUST NOT be more than 3 bytes in total. The
+ // Chunk Length value does not include terminating padding of the
+ // chunk. *However, it does include padding of any variable-length
+ // parameter except the last parameter in the chunk.* The receiver
+ // MUST ignore the padding.
+ if idx != len(h.params)-1 {
+ out = padByte(out, getPadding(len(pp)))
+ }
+ }
+
+ h.chunkHeader.typ = ctHeartbeatAck
+ h.chunkHeader.raw = out
+
+ return h.chunkHeader.marshal()
+}
+
+func (h *chunkHeartbeatAck) check() (abort bool, err error) {
+ return false, nil
+}
diff --git a/vendor/github.com/pion/sctp/chunk_init.go b/vendor/github.com/pion/sctp/chunk_init.go
new file mode 100644
index 0000000..65b9b1a
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk_init.go
@@ -0,0 +1,123 @@
+package sctp // nolint:dupl
+
+import (
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+/*
+Init represents an SCTP Chunk of type INIT
+
+See chunkInitCommon for the fixed headers
+
+Variable Parameters Status Type Value
+-------------------------------------------------------------
+IPv4 IP (Note 1) Optional 5
+IPv6 IP (Note 1) Optional 6
+Cookie Preservative Optional 9
+Reserved for ECN Capable (Note 2) Optional 32768 (0x8000)
+Host Name IP (Note 3) Optional 11
+Supported IP Types (Note 4) Optional 12
+*/
+type chunkInit struct {
+ chunkHeader
+ chunkInitCommon
+}
+
+func (i *chunkInit) unmarshal(raw []byte) error {
+ if err := i.chunkHeader.unmarshal(raw); err != nil {
+ return err
+ }
+
+ if i.typ != ctInit {
+ return errors.Errorf("ChunkType is not of type INIT, actually is %s", i.typ.String())
+ } else if len(i.raw) < initChunkMinLength {
+ return errors.Errorf("Chunk Value isn't long enough for mandatory parameters exp: %d actual: %d", initChunkMinLength, len(i.raw))
+ }
+
+ // The Chunk Flags field in INIT is reserved, and all bits in it should
+ // be set to 0 by the sender and ignored by the receiver. The sequence
+ // of parameters within an INIT can be processed in any order.
+ if i.flags != 0 {
+ return errors.New("ChunkType of type INIT flags must be all 0")
+ }
+
+ if err := i.chunkInitCommon.unmarshal(i.raw); err != nil {
+ return errors.Wrap(err, "Failed to unmarshal INIT body")
+ }
+
+ return nil
+}
+
+func (i *chunkInit) marshal() ([]byte, error) {
+ initShared, err := i.chunkInitCommon.marshal()
+ if err != nil {
+ return nil, errors.Wrap(err, "Failed marshaling INIT common data")
+ }
+
+ i.chunkHeader.typ = ctInit
+ i.chunkHeader.raw = initShared
+ return i.chunkHeader.marshal()
+}
+
+func (i *chunkInit) check() (abort bool, err error) {
+ // The receiver of the INIT (the responding end) records the value of
+ // the Initiate Tag parameter. This value MUST be placed into the
+ // Verification Tag field of every SCTP packet that the receiver of
+ // the INIT transmits within this association.
+ //
+ // The Initiate Tag is allowed to have any value except 0. See
+ // Section 5.3.1 for more on the selection of the tag value.
+ //
+ // If the value of the Initiate Tag in a received INIT chunk is found
+ // to be 0, the receiver MUST treat it as an error and close the
+ // association by transmitting an ABORT.
+ if i.initiateTag == 0 {
+ abort = true
+ return abort, errors.New("ChunkType of type INIT InitiateTag must not be 0")
+ }
+
+ // Defines the maximum number of streams the sender of this INIT
+ // chunk allows the peer end to create in this association. The
+ // value 0 MUST NOT be used.
+ //
+ // Note: There is no negotiation of the actual number of streams but
+ // instead the two endpoints will use the min(requested, offered).
+ // See Section 5.1.1 for details.
+ //
+ // Note: A receiver of an INIT with the MIS value of 0 SHOULD abort
+ // the association.
+ if i.numInboundStreams == 0 {
+ abort = true
+ return abort, errors.New("INIT inbound stream request must be > 0")
+ }
+
+ // Defines the number of outbound streams the sender of this INIT
+ // chunk wishes to create in this association. The value of 0 MUST
+ // NOT be used.
+ //
+ // Note: A receiver of an INIT with the OS value set to 0 SHOULD
+ // abort the association.
+
+ if i.numOutboundStreams == 0 {
+ abort = true
+ return abort, errors.New("INIT outbound stream request must be > 0")
+ }
+
+ // An SCTP receiver MUST be able to receive a minimum of 1500 bytes in
+ // one SCTP packet. This means that an SCTP endpoint MUST NOT indicate
+ // less than 1500 bytes in its initial a_rwnd sent in the INIT or INIT
+ // ACK.
+ if i.advertisedReceiverWindowCredit < 1500 {
+ abort = true
+ return abort, errors.New("INIT Advertised Receiver Window Credit (a_rwnd) must be >= 1500")
+ }
+
+ return false, nil
+}
+
+// String makes chunkInit printable
+func (i *chunkInit) String() string {
+ return fmt.Sprintf("%s\n%s", i.chunkHeader, i.chunkInitCommon)
+}
diff --git a/vendor/github.com/pion/sctp/chunk_init_ack.go b/vendor/github.com/pion/sctp/chunk_init_ack.go
new file mode 100644
index 0000000..551bcea
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk_init_ack.go
@@ -0,0 +1,126 @@
+package sctp // nolint:dupl
+
+import (
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+/*
+chunkInitAck represents an SCTP Chunk of type INIT ACK
+
+See chunkInitCommon for the fixed headers
+
+Variable Parameters Status Type Value
+-------------------------------------------------------------
+State Cookie Mandatory 7
+IPv4 IP (Note 1) Optional 5
+IPv6 IP (Note 1) Optional 6
+Unrecognized Parameter Optional 8
+Reserved for ECN Capable (Note 2) Optional 32768 (0x8000)
+Host Name IP (Note 3) Optional 11<Paste>
+
+*/
+type chunkInitAck struct {
+ chunkHeader
+ chunkInitCommon
+}
+
+func (i *chunkInitAck) unmarshal(raw []byte) error {
+ if err := i.chunkHeader.unmarshal(raw); err != nil {
+ return err
+ }
+
+ if i.typ != ctInitAck {
+ return errors.Errorf("ChunkType is not of type INIT ACK, actually is %s", i.typ.String())
+ } else if len(i.raw) < initChunkMinLength {
+ return errors.Errorf("Chunk Value isn't long enough for mandatory parameters exp: %d actual: %d", initChunkMinLength, len(i.raw))
+ }
+
+ // The Chunk Flags field in INIT is reserved, and all bits in it should
+ // be set to 0 by the sender and ignored by the receiver. The sequence
+ // of parameters within an INIT can be processed in any order.
+ if i.flags != 0 {
+ return errors.New("ChunkType of type INIT ACK flags must be all 0")
+ }
+
+ if err := i.chunkInitCommon.unmarshal(i.raw); err != nil {
+ return errors.Wrap(err, "Failed to unmarshal INIT body")
+ }
+
+ return nil
+}
+
+func (i *chunkInitAck) marshal() ([]byte, error) {
+ initShared, err := i.chunkInitCommon.marshal()
+ if err != nil {
+ return nil, errors.Wrap(err, "Failed marshaling INIT common data")
+ }
+
+ i.chunkHeader.typ = ctInitAck
+ i.chunkHeader.raw = initShared
+ return i.chunkHeader.marshal()
+}
+
+func (i *chunkInitAck) check() (abort bool, err error) {
+ // The receiver of the INIT ACK records the value of the Initiate Tag
+ // parameter. This value MUST be placed into the Verification Tag
+ // field of every SCTP packet that the INIT ACK receiver transmits
+ // within this association.
+ //
+ // The Initiate Tag MUST NOT take the value 0. See Section 5.3.1 for
+ // more on the selection of the Initiate Tag value.
+ //
+ // If the value of the Initiate Tag in a received INIT ACK chunk is
+ // found to be 0, the receiver MUST destroy the association
+ // discarding its TCB. The receiver MAY send an ABORT for debugging
+ // purpose.
+ if i.initiateTag == 0 {
+ abort = true
+ return abort, errors.New("ChunkType of type INIT ACK InitiateTag must not be 0")
+ }
+
+ // Defines the maximum number of streams the sender of this INIT ACK
+ // chunk allows the peer end to create in this association. The
+ // value 0 MUST NOT be used.
+ //
+ // Note: There is no negotiation of the actual number of streams but
+ // instead the two endpoints will use the min(requested, offered).
+ // See Section 5.1.1 for details.
+ //
+ // Note: A receiver of an INIT ACK with the MIS value set to 0 SHOULD
+ // destroy the association discarding its TCB.
+ if i.numInboundStreams == 0 {
+ abort = true
+ return abort, errors.New("INIT ACK inbound stream request must be > 0")
+ }
+
+ // Defines the number of outbound streams the sender of this INIT ACK
+ // chunk wishes to create in this association. The value of 0 MUST
+ // NOT be used, and the value MUST NOT be greater than the MIS value
+ // sent in the INIT chunk.
+ //
+ // Note: A receiver of an INIT ACK with the OS value set to 0 SHOULD
+ // destroy the association discarding its TCB.
+
+ if i.numOutboundStreams == 0 {
+ abort = true
+ return abort, errors.New("INIT ACK outbound stream request must be > 0")
+ }
+
+ // An SCTP receiver MUST be able to receive a minimum of 1500 bytes in
+ // one SCTP packet. This means that an SCTP endpoint MUST NOT indicate
+ // less than 1500 bytes in its initial a_rwnd sent in the INIT or INIT
+ // ACK.
+ if i.advertisedReceiverWindowCredit < 1500 {
+ abort = true
+ return abort, errors.New("INIT ACK Advertised Receiver Window Credit (a_rwnd) must be >= 1500")
+ }
+
+ return false, nil
+}
+
+// String makes chunkInitAck printable
+func (i *chunkInitAck) String() string {
+ return fmt.Sprintf("%s\n%s", i.chunkHeader, i.chunkInitCommon)
+}
diff --git a/vendor/github.com/pion/sctp/chunk_init_common.go b/vendor/github.com/pion/sctp/chunk_init_common.go
new file mode 100644
index 0000000..f64be78
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk_init_common.go
@@ -0,0 +1,155 @@
+package sctp
+
+import (
+ "encoding/binary"
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+/*
+chunkInitCommon represents an SCTP Chunk body of type INIT and INIT ACK
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Type = 1 | Chunk Flags | Chunk Length |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Initiate Tag |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Advertised Receiver Window Credit (a_rwnd) |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Number of Outbound Streams | Number of Inbound Streams |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Initial TSN |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| |
+| Optional/Variable-Length Parameters |
+| |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+The INIT chunk contains the following parameters. Unless otherwise
+noted, each parameter MUST only be included once in the INIT chunk.
+
+Fixed Parameters Status
+----------------------------------------------
+Initiate Tag Mandatory
+Advertised Receiver Window Credit Mandatory
+Number of Outbound Streams Mandatory
+Number of Inbound Streams Mandatory
+Initial TSN Mandatory
+*/
+
+type chunkInitCommon struct {
+ initiateTag uint32
+ advertisedReceiverWindowCredit uint32
+ numOutboundStreams uint16
+ numInboundStreams uint16
+ initialTSN uint32
+ params []param
+}
+
+const (
+ initChunkMinLength = 16
+ initOptionalVarHeaderLength = 4
+)
+
+func (i *chunkInitCommon) unmarshal(raw []byte) error {
+ i.initiateTag = binary.BigEndian.Uint32(raw[0:])
+ i.advertisedReceiverWindowCredit = binary.BigEndian.Uint32(raw[4:])
+ i.numOutboundStreams = binary.BigEndian.Uint16(raw[8:])
+ i.numInboundStreams = binary.BigEndian.Uint16(raw[10:])
+ i.initialTSN = binary.BigEndian.Uint32(raw[12:])
+
+ // https://tools.ietf.org/html/rfc4960#section-3.2.1
+ //
+ // Chunk values of SCTP control chunks consist of a chunk-type-specific
+ // header of required fields, followed by zero or more parameters. The
+ // optional and variable-length parameters contained in a chunk are
+ // defined in a Type-Length-Value format as shown below.
+ //
+ // 0 1 2 3
+ // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ // | Parameter Type | Parameter Length |
+ // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ // | |
+ // | Parameter Value |
+ // | |
+ // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ offset := initChunkMinLength
+ remaining := len(raw) - offset
+ for remaining > 0 {
+ if remaining > initOptionalVarHeaderLength {
+ pType, err := parseParamType(raw[offset:])
+ if err != nil {
+ return errors.Wrap(err, "failed to parse param type")
+ }
+ p, err := buildParam(pType, raw[offset:])
+ if err != nil {
+ return errors.Wrap(err, "Failed unmarshalling param in Init Chunk")
+ }
+ i.params = append(i.params, p)
+ padding := getPadding(p.length())
+ offset += p.length() + padding
+ remaining -= p.length() + padding
+ } else {
+ break
+ }
+ }
+
+ return nil
+}
+
+func (i *chunkInitCommon) marshal() ([]byte, error) {
+ out := make([]byte, initChunkMinLength)
+ binary.BigEndian.PutUint32(out[0:], i.initiateTag)
+ binary.BigEndian.PutUint32(out[4:], i.advertisedReceiverWindowCredit)
+ binary.BigEndian.PutUint16(out[8:], i.numOutboundStreams)
+ binary.BigEndian.PutUint16(out[10:], i.numInboundStreams)
+ binary.BigEndian.PutUint32(out[12:], i.initialTSN)
+ for idx, p := range i.params {
+ pp, err := p.marshal()
+ if err != nil {
+ return nil, errors.Wrap(err, "Unable to marshal parameter for INIT/INITACK")
+ }
+
+ out = append(out, pp...)
+
+ // Chunks (including Type, Length, and Value fields) are padded out
+ // by the sender with all zero bytes to be a multiple of 4 bytes
+ // long. This padding MUST NOT be more than 3 bytes in total. The
+ // Chunk Length value does not include terminating padding of the
+ // chunk. *However, it does include padding of any variable-length
+ // parameter except the last parameter in the chunk.* The receiver
+ // MUST ignore the padding.
+ if idx != len(i.params)-1 {
+ out = padByte(out, getPadding(len(pp)))
+ }
+ }
+
+ return out, nil
+}
+
+// String makes chunkInitCommon printable
+func (i chunkInitCommon) String() string {
+ format := `initiateTag: %d
+ advertisedReceiverWindowCredit: %d
+ numOutboundStreams: %d
+ numInboundStreams: %d
+ initialTSN: %d`
+
+ res := fmt.Sprintf(format,
+ i.initiateTag,
+ i.advertisedReceiverWindowCredit,
+ i.numOutboundStreams,
+ i.numInboundStreams,
+ i.initialTSN,
+ )
+
+ for i, param := range i.params {
+ res += fmt.Sprintf("Param %d:\n %s", i, param)
+ }
+ return res
+}
diff --git a/vendor/github.com/pion/sctp/chunk_payload_data.go b/vendor/github.com/pion/sctp/chunk_payload_data.go
new file mode 100644
index 0000000..3e5e346
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk_payload_data.go
@@ -0,0 +1,195 @@
+package sctp
+
+import (
+ "encoding/binary"
+ "fmt"
+ "time"
+)
+
+/*
+chunkPayloadData represents an SCTP Chunk of type DATA
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Type = 0 | Reserved|U|B|E| Length |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| TSN |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Stream Identifier S | Stream Sequence Number n |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Payload Protocol Identifier |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| |
+| User Data (seq n of Stream S) |
+| |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+
+An unfragmented user message shall have both the B and E bits set to
+'1'. Setting both B and E bits to '0' indicates a middle fragment of
+a multi-fragment user message, as summarized in the following table:
+ B E Description
+============================================================
+| 1 0 | First piece of a fragmented user message |
++----------------------------------------------------------+
+| 0 0 | Middle piece of a fragmented user message |
++----------------------------------------------------------+
+| 0 1 | Last piece of a fragmented user message |
++----------------------------------------------------------+
+| 1 1 | Unfragmented message |
+============================================================
+| Table 1: Fragment Description Flags |
+============================================================
+*/
+type chunkPayloadData struct {
+ chunkHeader
+
+ unordered bool
+ beginningFragment bool
+ endingFragment bool
+ immediateSack bool
+
+ tsn uint32
+ streamIdentifier uint16
+ streamSequenceNumber uint16
+ payloadType PayloadProtocolIdentifier
+ userData []byte
+
+ // Whether this data chunk was acknowledged (received by peer)
+ acked bool
+ missIndicator uint32
+
+ // Partial-reliability parameters used only by sender
+ since time.Time
+ nSent uint32 // number of transmission made for this chunk
+ _abandoned bool
+ _allInflight bool // valid only with the first fragment
+
+ // Retransmission flag set when T1-RTX timeout occurred and this
+ // chunk is still in the inflight queue
+ retransmit bool
+
+ head *chunkPayloadData // link to the head of the fragment
+}
+
+const (
+ payloadDataEndingFragmentBitmask = 1
+ payloadDataBeginingFragmentBitmask = 2
+ payloadDataUnorderedBitmask = 4
+ payloadDataImmediateSACK = 8
+
+ payloadDataHeaderSize = 12
+)
+
+// PayloadProtocolIdentifier is an enum for DataChannel payload types
+type PayloadProtocolIdentifier uint32
+
+// PayloadProtocolIdentifier enums
+// https://www.iana.org/assignments/sctp-parameters/sctp-parameters.xhtml#sctp-parameters-25
+const (
+ PayloadTypeWebRTCDCEP PayloadProtocolIdentifier = 50
+ PayloadTypeWebRTCString PayloadProtocolIdentifier = 51
+ PayloadTypeWebRTCBinary PayloadProtocolIdentifier = 53
+ PayloadTypeWebRTCStringEmpty PayloadProtocolIdentifier = 56
+ PayloadTypeWebRTCBinaryEmpty PayloadProtocolIdentifier = 57
+)
+
+func (p PayloadProtocolIdentifier) String() string {
+ switch p {
+ case PayloadTypeWebRTCDCEP:
+ return "WebRTC DCEP"
+ case PayloadTypeWebRTCString:
+ return "WebRTC String"
+ case PayloadTypeWebRTCBinary:
+ return "WebRTC Binary"
+ case PayloadTypeWebRTCStringEmpty:
+ return "WebRTC String (Empty)"
+ case PayloadTypeWebRTCBinaryEmpty:
+ return "WebRTC Binary (Empty)"
+ default:
+ return fmt.Sprintf("Unknown Payload Protocol Identifier: %d", p)
+ }
+}
+
+func (p *chunkPayloadData) unmarshal(raw []byte) error {
+ if err := p.chunkHeader.unmarshal(raw); err != nil {
+ return err
+ }
+
+ p.immediateSack = p.flags&payloadDataImmediateSACK != 0
+ p.unordered = p.flags&payloadDataUnorderedBitmask != 0
+ p.beginningFragment = p.flags&payloadDataBeginingFragmentBitmask != 0
+ p.endingFragment = p.flags&payloadDataEndingFragmentBitmask != 0
+
+ p.tsn = binary.BigEndian.Uint32(p.raw[0:])
+ p.streamIdentifier = binary.BigEndian.Uint16(p.raw[4:])
+ p.streamSequenceNumber = binary.BigEndian.Uint16(p.raw[6:])
+ p.payloadType = PayloadProtocolIdentifier(binary.BigEndian.Uint32(p.raw[8:]))
+ p.userData = p.raw[payloadDataHeaderSize:]
+
+ return nil
+}
+
+func (p *chunkPayloadData) marshal() ([]byte, error) {
+ payRaw := make([]byte, payloadDataHeaderSize+len(p.userData))
+
+ binary.BigEndian.PutUint32(payRaw[0:], p.tsn)
+ binary.BigEndian.PutUint16(payRaw[4:], p.streamIdentifier)
+ binary.BigEndian.PutUint16(payRaw[6:], p.streamSequenceNumber)
+ binary.BigEndian.PutUint32(payRaw[8:], uint32(p.payloadType))
+ copy(payRaw[payloadDataHeaderSize:], p.userData)
+
+ flags := uint8(0)
+ if p.endingFragment {
+ flags = 1
+ }
+ if p.beginningFragment {
+ flags |= 1 << 1
+ }
+ if p.unordered {
+ flags |= 1 << 2
+ }
+ if p.immediateSack {
+ flags |= 1 << 3
+ }
+
+ p.chunkHeader.flags = flags
+ p.chunkHeader.typ = ctPayloadData
+ p.chunkHeader.raw = payRaw
+ return p.chunkHeader.marshal()
+}
+
+func (p *chunkPayloadData) check() (abort bool, err error) {
+ return false, nil
+}
+
+// String makes chunkPayloadData printable
+func (p *chunkPayloadData) String() string {
+ return fmt.Sprintf("%s\n%d", p.chunkHeader, p.tsn)
+}
+
+func (p *chunkPayloadData) abandoned() bool {
+ if p.head != nil {
+ return p.head._abandoned && p.head._allInflight
+ }
+ return p._abandoned && p._allInflight
+}
+
+func (p *chunkPayloadData) setAbandoned(abandoned bool) {
+ if p.head != nil {
+ p.head._abandoned = abandoned
+ return
+ }
+ p._abandoned = abandoned
+}
+
+func (p *chunkPayloadData) setAllInflight() {
+ if p.endingFragment {
+ if p.head != nil {
+ p.head._allInflight = true
+ } else {
+ p._allInflight = true
+ }
+ }
+}
diff --git a/vendor/github.com/pion/sctp/chunk_reconfig.go b/vendor/github.com/pion/sctp/chunk_reconfig.go
new file mode 100644
index 0000000..a53ad5e
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk_reconfig.go
@@ -0,0 +1,99 @@
+package sctp
+
+import (
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+// https://tools.ietf.org/html/rfc6525#section-3.1
+// chunkReconfig represents an SCTP Chunk used to reconfigure streams.
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Type = 130 | Chunk Flags | Chunk Length |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// \ \
+// / Re-configuration Parameter /
+// \ \
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// \ \
+// / Re-configuration Parameter (optional) /
+// \ \
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+type chunkReconfig struct {
+ chunkHeader
+ paramA param
+ paramB param
+}
+
+func (c *chunkReconfig) unmarshal(raw []byte) error {
+ if err := c.chunkHeader.unmarshal(raw); err != nil {
+ return err
+ }
+ pType, err := parseParamType(c.raw)
+ if err != nil {
+ return errors.Wrap(err, "failed to parse param type")
+ }
+ a, err := buildParam(pType, c.raw)
+ if err != nil {
+ return err
+ }
+ c.paramA = a
+
+ padding := getPadding(a.length())
+ offset := a.length() + padding
+ if len(c.raw) > offset {
+ pType, err := parseParamType(c.raw[offset:])
+ if err != nil {
+ return errors.Wrap(err, "failed to parse param type")
+ }
+ b, err := buildParam(pType, c.raw[offset:])
+ if err != nil {
+ return err
+ }
+ c.paramB = b
+ }
+
+ return nil
+}
+
+func (c *chunkReconfig) marshal() ([]byte, error) {
+ out, err := c.paramA.marshal()
+ if err != nil {
+ return nil, errors.Wrap(err, "Unable to marshal parameter A for reconfig")
+ }
+ if c.paramB != nil {
+ // Pad param A
+ out = padByte(out, getPadding(len(out)))
+
+ outB, err := c.paramB.marshal()
+ if err != nil {
+ return nil, errors.Wrap(err, "Unable to marshal parameter B for reconfig")
+ }
+
+ out = append(out, outB...)
+ }
+
+ c.typ = ctReconfig
+ c.raw = out
+ return c.chunkHeader.marshal()
+}
+
+func (c *chunkReconfig) check() (abort bool, err error) {
+ // nolint:godox
+ // TODO: check allowed combinations:
+ // https://tools.ietf.org/html/rfc6525#section-3.1
+ return true, nil
+}
+
+// String makes chunkReconfig printable
+func (c *chunkReconfig) String() string {
+ res := fmt.Sprintf("Param A:\n %s", c.paramA)
+ if c.paramB != nil {
+ res += fmt.Sprintf("Param B:\n %s", c.paramB)
+ }
+ return res
+}
diff --git a/vendor/github.com/pion/sctp/chunk_selective_ack.go b/vendor/github.com/pion/sctp/chunk_selective_ack.go
new file mode 100644
index 0000000..920d562
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunk_selective_ack.go
@@ -0,0 +1,142 @@
+package sctp
+
+import (
+ "encoding/binary"
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+/*
+chunkSelectiveAck represents an SCTP Chunk of type SACK
+
+This chunk is sent to the peer endpoint to acknowledge received DATA
+chunks and to inform the peer endpoint of gaps in the received
+subsequences of DATA chunks as represented by their TSNs.
+0 1 2 3
+0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Type = 3 |Chunk Flags | Chunk Length |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Cumulative TSN Ack |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Advertised Receiver Window Credit (a_rwnd) |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Number of Gap Ack Blocks = N | Number of Duplicate TSNs = X |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Gap Ack Block #1 Start | Gap Ack Block #1 End |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+/ /
+\ ... \
+/ /
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Gap Ack Block #N Start | Gap Ack Block #N End |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Duplicate TSN 1 |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+/ /
+\ ... \
+/ /
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Duplicate TSN X |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+*/
+
+type gapAckBlock struct {
+ start uint16
+ end uint16
+}
+
+// String makes gapAckBlock printable
+func (g gapAckBlock) String() string {
+ return fmt.Sprintf("%d - %d", g.start, g.end)
+}
+
+type chunkSelectiveAck struct {
+ chunkHeader
+ cumulativeTSNAck uint32
+ advertisedReceiverWindowCredit uint32
+ gapAckBlocks []gapAckBlock
+ duplicateTSN []uint32
+}
+
+const (
+ selectiveAckHeaderSize = 12
+)
+
+func (s *chunkSelectiveAck) unmarshal(raw []byte) error {
+ if err := s.chunkHeader.unmarshal(raw); err != nil {
+ return err
+ }
+
+ if s.typ != ctSack {
+ return errors.Errorf("ChunkType is not of type SACK, actually is %s", s.typ.String())
+ }
+
+ if len(s.raw) < selectiveAckHeaderSize {
+ return errors.Errorf("SACK Chunk size is not large enough to contain header (%v remaining, needs %v bytes)",
+ len(s.raw), selectiveAckHeaderSize)
+ }
+
+ s.cumulativeTSNAck = binary.BigEndian.Uint32(s.raw[0:])
+ s.advertisedReceiverWindowCredit = binary.BigEndian.Uint32(s.raw[4:])
+ s.gapAckBlocks = make([]gapAckBlock, binary.BigEndian.Uint16(s.raw[8:]))
+ s.duplicateTSN = make([]uint32, binary.BigEndian.Uint16(s.raw[10:]))
+
+ if len(s.raw) != selectiveAckHeaderSize+(4*len(s.gapAckBlocks)+(4*len(s.duplicateTSN))) {
+ return errors.Errorf("SACK Chunk size does not match predicted amount from header values")
+ }
+
+ offset := selectiveAckHeaderSize
+ for i := range s.gapAckBlocks {
+ s.gapAckBlocks[i].start = binary.BigEndian.Uint16(s.raw[offset:])
+ s.gapAckBlocks[i].end = binary.BigEndian.Uint16(s.raw[offset+2:])
+ offset += 4
+ }
+ for i := range s.duplicateTSN {
+ s.duplicateTSN[i] = binary.BigEndian.Uint32(s.raw[offset:])
+ offset += 4
+ }
+
+ return nil
+}
+
+func (s *chunkSelectiveAck) marshal() ([]byte, error) {
+ sackRaw := make([]byte, selectiveAckHeaderSize+(4*len(s.gapAckBlocks)+(4*len(s.duplicateTSN))))
+ binary.BigEndian.PutUint32(sackRaw[0:], s.cumulativeTSNAck)
+ binary.BigEndian.PutUint32(sackRaw[4:], s.advertisedReceiverWindowCredit)
+ binary.BigEndian.PutUint16(sackRaw[8:], uint16(len(s.gapAckBlocks)))
+ binary.BigEndian.PutUint16(sackRaw[10:], uint16(len(s.duplicateTSN)))
+ offset := selectiveAckHeaderSize
+ for _, g := range s.gapAckBlocks {
+ binary.BigEndian.PutUint16(sackRaw[offset:], g.start)
+ binary.BigEndian.PutUint16(sackRaw[offset+2:], g.end)
+ offset += 4
+ }
+ for _, t := range s.duplicateTSN {
+ binary.BigEndian.PutUint32(sackRaw[offset:], t)
+ offset += 4
+ }
+
+ s.chunkHeader.typ = ctSack
+ s.chunkHeader.raw = sackRaw
+ return s.chunkHeader.marshal()
+}
+
+func (s *chunkSelectiveAck) check() (abort bool, err error) {
+ return false, nil
+}
+
+// String makes chunkSelectiveAck printable
+func (s *chunkSelectiveAck) String() string {
+ res := fmt.Sprintf("SACK cumTsnAck=%d arwnd=%d dupTsn=%d",
+ s.cumulativeTSNAck,
+ s.advertisedReceiverWindowCredit,
+ s.duplicateTSN)
+
+ for _, gap := range s.gapAckBlocks {
+ res = fmt.Sprintf("%s\n gap ack: %s", res, gap)
+ }
+
+ return res
+}
diff --git a/vendor/github.com/pion/sctp/chunkheader.go b/vendor/github.com/pion/sctp/chunkheader.go
new file mode 100644
index 0000000..a4a78db
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunkheader.go
@@ -0,0 +1,90 @@
+package sctp
+
+import (
+ "encoding/binary"
+
+ "github.com/pkg/errors"
+)
+
+/*
+chunkHeader represents a SCTP Chunk header, defined in https://tools.ietf.org/html/rfc4960#section-3.2
+The figure below illustrates the field format for the chunks to be
+transmitted in the SCTP packet. Each chunk is formatted with a Chunk
+Type field, a chunk-specific Flag field, a Chunk Length field, and a
+Value field.
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Chunk Type | Chunk Flags | Chunk Length |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| |
+| Chunk Value |
+| |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+*/
+type chunkHeader struct {
+ typ chunkType
+ flags byte
+ raw []byte
+}
+
+const (
+ chunkHeaderSize = 4
+)
+
+func (c *chunkHeader) unmarshal(raw []byte) error {
+ if len(raw) < chunkHeaderSize {
+ return errors.Errorf("raw only %d bytes, %d is the minimum length for a SCTP chunk", len(raw), chunkHeaderSize)
+ }
+
+ c.typ = chunkType(raw[0])
+ c.flags = raw[1]
+ length := binary.BigEndian.Uint16(raw[2:])
+
+ // Length includes Chunk header
+ valueLength := int(length - chunkHeaderSize)
+ lengthAfterValue := len(raw) - (chunkHeaderSize + valueLength)
+
+ if lengthAfterValue < 0 {
+ return errors.Errorf("Not enough data left in SCTP packet to satisfy requested length remain %d req %d ", valueLength, len(raw)-chunkHeaderSize)
+ } else if lengthAfterValue < 4 {
+ // https://tools.ietf.org/html/rfc4960#section-3.2
+ // The Chunk Length field does not count any chunk padding.
+ // Chunks (including Type, Length, and Value fields) are padded out
+ // by the sender with all zero bytes to be a multiple of 4 bytes
+ // long. This padding MUST NOT be more than 3 bytes in total. The
+ // Chunk Length value does not include terminating padding of the
+ // chunk. However, it does include padding of any variable-length
+ // parameter except the last parameter in the chunk. The receiver
+ // MUST ignore the padding.
+ for i := lengthAfterValue; i > 0; i-- {
+ paddingOffset := chunkHeaderSize + valueLength + (i - 1)
+ if raw[paddingOffset] != 0 {
+ return errors.Errorf("Chunk padding is non-zero at offset %d ", paddingOffset)
+ }
+ }
+ }
+
+ c.raw = raw[chunkHeaderSize : chunkHeaderSize+valueLength]
+ return nil
+}
+
+func (c *chunkHeader) marshal() ([]byte, error) {
+ raw := make([]byte, 4+len(c.raw))
+
+ raw[0] = uint8(c.typ)
+ raw[1] = c.flags
+ binary.BigEndian.PutUint16(raw[2:], uint16(len(c.raw)+chunkHeaderSize))
+ copy(raw[4:], c.raw)
+ return raw, nil
+}
+
+func (c *chunkHeader) valueLength() int {
+ return len(c.raw)
+}
+
+// String makes chunkHeader printable
+func (c chunkHeader) String() string {
+ return c.typ.String()
+}
diff --git a/vendor/github.com/pion/sctp/chunktype.go b/vendor/github.com/pion/sctp/chunktype.go
new file mode 100644
index 0000000..65b57a4
--- /dev/null
+++ b/vendor/github.com/pion/sctp/chunktype.go
@@ -0,0 +1,67 @@
+package sctp
+
+import "fmt"
+
+// chunkType is an enum for SCTP Chunk Type field
+// This field identifies the type of information contained in the
+// Chunk Value field.
+type chunkType uint8
+
+// List of known chunkType enums
+const (
+ ctPayloadData chunkType = 0
+ ctInit chunkType = 1
+ ctInitAck chunkType = 2
+ ctSack chunkType = 3
+ ctHeartbeat chunkType = 4
+ ctHeartbeatAck chunkType = 5
+ ctAbort chunkType = 6
+ ctShutdown chunkType = 7
+ ctShutdownAck chunkType = 8
+ ctError chunkType = 9
+ ctCookieEcho chunkType = 10
+ ctCookieAck chunkType = 11
+ ctCWR chunkType = 13
+ ctShutdownComplete chunkType = 14
+ ctReconfig chunkType = 130
+ ctForwardTSN chunkType = 192
+)
+
+func (c chunkType) String() string {
+ switch c {
+ case ctPayloadData:
+ return "DATA"
+ case ctInit:
+ return "INIT"
+ case ctInitAck:
+ return "INIT-ACK"
+ case ctSack:
+ return "SACK"
+ case ctHeartbeat:
+ return "HEARTBEAT"
+ case ctHeartbeatAck:
+ return "HEARTBEAT-ACK"
+ case ctAbort:
+ return "ABORT"
+ case ctShutdown:
+ return "SHUTDOWN"
+ case ctShutdownAck:
+ return "SHUTDOWN-ACK"
+ case ctError:
+ return "ERROR"
+ case ctCookieEcho:
+ return "COOKIE-ECHO"
+ case ctCookieAck:
+ return "COOKIE-ACK"
+ case ctCWR:
+ return "ECNE" // Explicit Congestion Notification Echo
+ case ctShutdownComplete:
+ return "SHUTDOWN-COMPLETE"
+ case ctReconfig:
+ return "RECONFIG" // Re-configuration
+ case ctForwardTSN:
+ return "FORWARD-TSN"
+ default:
+ return fmt.Sprintf("Unknown ChunkType: %d", c)
+ }
+}
diff --git a/vendor/github.com/pion/sctp/codecov.yml b/vendor/github.com/pion/sctp/codecov.yml
new file mode 100644
index 0000000..085200a
--- /dev/null
+++ b/vendor/github.com/pion/sctp/codecov.yml
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+
+coverage:
+ status:
+ project:
+ default:
+ # Allow decreasing 2% of total coverage to avoid noise.
+ threshold: 2%
+ patch:
+ default:
+ target: 70%
+ only_pulls: true
+
+ignore:
+ - "examples/*"
+ - "examples/**/*"
diff --git a/vendor/github.com/pion/sctp/control_queue.go b/vendor/github.com/pion/sctp/control_queue.go
new file mode 100644
index 0000000..7e13469
--- /dev/null
+++ b/vendor/github.com/pion/sctp/control_queue.go
@@ -0,0 +1,29 @@
+package sctp
+
+// control queue
+
+type controlQueue struct {
+ queue []*packet
+}
+
+func newControlQueue() *controlQueue {
+ return &controlQueue{queue: []*packet{}}
+}
+
+func (q *controlQueue) push(c *packet) {
+ q.queue = append(q.queue, c)
+}
+
+func (q *controlQueue) pushAll(packets []*packet) {
+ q.queue = append(q.queue, packets...)
+}
+
+func (q *controlQueue) popAll() []*packet {
+ packets := q.queue
+ q.queue = []*packet{}
+ return packets
+}
+
+func (q *controlQueue) size() int {
+ return len(q.queue)
+}
diff --git a/vendor/github.com/pion/sctp/error_cause.go b/vendor/github.com/pion/sctp/error_cause.go
new file mode 100644
index 0000000..e94cc5c
--- /dev/null
+++ b/vendor/github.com/pion/sctp/error_cause.go
@@ -0,0 +1,91 @@
+package sctp
+
+import (
+ "encoding/binary"
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+// errorCauseCode is a cause code that appears in either a ERROR or ABORT chunk
+type errorCauseCode uint16
+
+type errorCause interface {
+ unmarshal([]byte) error
+ marshal() ([]byte, error)
+ length() uint16
+ String() string
+
+ errorCauseCode() errorCauseCode
+}
+
+// buildErrorCause delegates the building of a error cause from raw bytes to the correct structure
+func buildErrorCause(raw []byte) (errorCause, error) {
+ var e errorCause
+
+ c := errorCauseCode(binary.BigEndian.Uint16(raw[0:]))
+ switch c {
+ case invalidMandatoryParameter:
+ e = &errorCauseInvalidMandatoryParameter{}
+ case unrecognizedChunkType:
+ e = &errorCauseUnrecognizedChunkType{}
+ case protocolViolation:
+ e = &errorCauseProtocolViolation{}
+ default:
+ return nil, errors.Errorf("BuildErrorCause does not handle %s", c.String())
+ }
+
+ if err := e.unmarshal(raw); err != nil {
+ return nil, err
+ }
+ return e, nil
+}
+
+const (
+ invalidStreamIdentifier errorCauseCode = 1
+ missingMandatoryParameter errorCauseCode = 2
+ staleCookieError errorCauseCode = 3
+ outOfResource errorCauseCode = 4
+ unresolvableAddress errorCauseCode = 5
+ unrecognizedChunkType errorCauseCode = 6
+ invalidMandatoryParameter errorCauseCode = 7
+ unrecognizedParameters errorCauseCode = 8
+ noUserData errorCauseCode = 9
+ cookieReceivedWhileShuttingDown errorCauseCode = 10
+ restartOfAnAssociationWithNewAddresses errorCauseCode = 11
+ userInitiatedAbort errorCauseCode = 12
+ protocolViolation errorCauseCode = 13
+)
+
+func (e errorCauseCode) String() string {
+ switch e {
+ case invalidStreamIdentifier:
+ return "Invalid Stream Identifier"
+ case missingMandatoryParameter:
+ return "Missing Mandatory Parameter"
+ case staleCookieError:
+ return "Stale Cookie Error"
+ case outOfResource:
+ return "Out Of Resource"
+ case unresolvableAddress:
+ return "Unresolvable IP"
+ case unrecognizedChunkType:
+ return "Unrecognized Chunk Type"
+ case invalidMandatoryParameter:
+ return "Invalid Mandatory Parameter"
+ case unrecognizedParameters:
+ return "Unrecognized Parameters"
+ case noUserData:
+ return "No User Data"
+ case cookieReceivedWhileShuttingDown:
+ return "Cookie Received While Shutting Down"
+ case restartOfAnAssociationWithNewAddresses:
+ return "Restart Of An Association With New Addresses"
+ case userInitiatedAbort:
+ return "User Initiated Abort"
+ case protocolViolation:
+ return "Protocol Violation"
+ default:
+ return fmt.Sprintf("Unknown CauseCode: %d", e)
+ }
+}
diff --git a/vendor/github.com/pion/sctp/error_cause_header.go b/vendor/github.com/pion/sctp/error_cause_header.go
new file mode 100644
index 0000000..1ad6e1d
--- /dev/null
+++ b/vendor/github.com/pion/sctp/error_cause_header.go
@@ -0,0 +1,47 @@
+package sctp
+
+import (
+ "encoding/binary"
+)
+
+// errorCauseHeader represents the shared header that is shared by all error causes
+type errorCauseHeader struct {
+ code errorCauseCode
+ len uint16
+ raw []byte
+}
+
+const (
+ errorCauseHeaderLength = 4
+)
+
+func (e *errorCauseHeader) marshal() ([]byte, error) {
+ e.len = uint16(len(e.raw)) + uint16(errorCauseHeaderLength)
+ raw := make([]byte, e.len)
+ binary.BigEndian.PutUint16(raw[0:], uint16(e.code))
+ binary.BigEndian.PutUint16(raw[2:], e.len)
+ copy(raw[errorCauseHeaderLength:], e.raw)
+
+ return raw, nil
+}
+
+func (e *errorCauseHeader) unmarshal(raw []byte) error {
+ e.code = errorCauseCode(binary.BigEndian.Uint16(raw[0:]))
+ e.len = binary.BigEndian.Uint16(raw[2:])
+ valueLength := e.len - errorCauseHeaderLength
+ e.raw = raw[errorCauseHeaderLength : errorCauseHeaderLength+valueLength]
+ return nil
+}
+
+func (e *errorCauseHeader) length() uint16 {
+ return e.len
+}
+
+func (e *errorCauseHeader) errorCauseCode() errorCauseCode {
+ return e.code
+}
+
+// String makes errorCauseHeader printable
+func (e errorCauseHeader) String() string {
+ return e.code.String()
+}
diff --git a/vendor/github.com/pion/sctp/error_cause_invalid_mandatory_parameter.go b/vendor/github.com/pion/sctp/error_cause_invalid_mandatory_parameter.go
new file mode 100644
index 0000000..3da8b47
--- /dev/null
+++ b/vendor/github.com/pion/sctp/error_cause_invalid_mandatory_parameter.go
@@ -0,0 +1,19 @@
+package sctp
+
+// errorCauseInvalidMandatoryParameter represents an SCTP error cause
+type errorCauseInvalidMandatoryParameter struct {
+ errorCauseHeader
+}
+
+func (e *errorCauseInvalidMandatoryParameter) marshal() ([]byte, error) {
+ return e.errorCauseHeader.marshal()
+}
+
+func (e *errorCauseInvalidMandatoryParameter) unmarshal(raw []byte) error {
+ return e.errorCauseHeader.unmarshal(raw)
+}
+
+// String makes errorCauseInvalidMandatoryParameter printable
+func (e *errorCauseInvalidMandatoryParameter) String() string {
+ return e.errorCauseHeader.String()
+}
diff --git a/vendor/github.com/pion/sctp/error_cause_protocol_violation.go b/vendor/github.com/pion/sctp/error_cause_protocol_violation.go
new file mode 100644
index 0000000..8b457f4
--- /dev/null
+++ b/vendor/github.com/pion/sctp/error_cause_protocol_violation.go
@@ -0,0 +1,50 @@
+package sctp
+
+import (
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+/*
+ This error cause MAY be included in ABORT chunks that are sent
+ because an SCTP endpoint detects a protocol violation of the peer
+ that is not covered by the error causes described in Section 3.3.10.1
+ to Section 3.3.10.12. An implementation MAY provide additional
+ information specifying what kind of protocol violation has been
+ detected.
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Cause Code=13 | Cause Length=Variable |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ / Additional Information /
+ \ \
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+*/
+type errorCauseProtocolViolation struct {
+ errorCauseHeader
+ additionalInformation []byte
+}
+
+func (e *errorCauseProtocolViolation) marshal() ([]byte, error) {
+ e.raw = e.additionalInformation
+ return e.errorCauseHeader.marshal()
+}
+
+func (e *errorCauseProtocolViolation) unmarshal(raw []byte) error {
+ err := e.errorCauseHeader.unmarshal(raw)
+ if err != nil {
+ return errors.Wrap(err, "Unable to unmarshal Protocol Violation error")
+ }
+
+ e.additionalInformation = e.raw
+
+ return nil
+}
+
+// String makes errorCauseProtocolViolation printable
+func (e *errorCauseProtocolViolation) String() string {
+ return fmt.Sprintf("%s: %s", e.errorCauseHeader, e.additionalInformation)
+}
diff --git a/vendor/github.com/pion/sctp/error_cause_unrecognized_chunk_type.go b/vendor/github.com/pion/sctp/error_cause_unrecognized_chunk_type.go
new file mode 100644
index 0000000..fee9a36
--- /dev/null
+++ b/vendor/github.com/pion/sctp/error_cause_unrecognized_chunk_type.go
@@ -0,0 +1,28 @@
+package sctp
+
+// errorCauseUnrecognizedChunkType represents an SCTP error cause
+type errorCauseUnrecognizedChunkType struct {
+ errorCauseHeader
+ unrecognizedChunk []byte
+}
+
+func (e *errorCauseUnrecognizedChunkType) marshal() ([]byte, error) {
+ e.code = unrecognizedChunkType
+ e.errorCauseHeader.raw = e.unrecognizedChunk
+ return e.errorCauseHeader.marshal()
+}
+
+func (e *errorCauseUnrecognizedChunkType) unmarshal(raw []byte) error {
+ err := e.errorCauseHeader.unmarshal(raw)
+ if err != nil {
+ return err
+ }
+
+ e.unrecognizedChunk = e.errorCauseHeader.raw
+ return nil
+}
+
+// String makes errorCauseUnrecognizedChunkType printable
+func (e *errorCauseUnrecognizedChunkType) String() string {
+ return e.errorCauseHeader.String()
+}
diff --git a/vendor/github.com/pion/sctp/go.mod b/vendor/github.com/pion/sctp/go.mod
new file mode 100644
index 0000000..022e2fc
--- /dev/null
+++ b/vendor/github.com/pion/sctp/go.mod
@@ -0,0 +1,14 @@
+module github.com/pion/sctp
+
+require (
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/kr/pretty v0.1.0 // indirect
+ github.com/pion/logging v0.2.2
+ github.com/pion/randutil v0.1.0
+ github.com/pion/transport v0.10.1
+ github.com/pkg/errors v0.9.1
+ github.com/stretchr/testify v1.6.1
+ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
+)
+
+go 1.13
diff --git a/vendor/github.com/pion/sctp/go.sum b/vendor/github.com/pion/sctp/go.sum
new file mode 100644
index 0000000..3744262
--- /dev/null
+++ b/vendor/github.com/pion/sctp/go.sum
@@ -0,0 +1,36 @@
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
+github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
+github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
+github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
+github.com/pion/transport v0.10.1 h1:2W+yJT+0mOQ160ThZYUx5Zp2skzshiNgxrNE9GUfhJM=
+github.com/pion/transport v0.10.1/go.mod h1:PBis1stIILMiis0PewDw91WJeLJkyIMcEk+DwKOzf4A=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/pion/sctp/packet.go b/vendor/github.com/pion/sctp/packet.go
new file mode 100644
index 0000000..dcc650b
--- /dev/null
+++ b/vendor/github.com/pion/sctp/packet.go
@@ -0,0 +1,178 @@
+package sctp
+
+import (
+ "encoding/binary"
+ "fmt"
+ "hash/crc32"
+
+ "github.com/pkg/errors"
+)
+
+// Create the crc32 table we'll use for the checksum
+var castagnoliTable = crc32.MakeTable(crc32.Castagnoli) // nolint:gochecknoglobals
+
+// Allocate and zero this data once.
+// We need to use it for the checksum and don't want to allocate/clear each time.
+var fourZeroes [4]byte // nolint:gochecknoglobals
+
+/*
+Packet represents an SCTP packet, defined in https://tools.ietf.org/html/rfc4960#section-3
+An SCTP packet is composed of a common header and chunks. A chunk
+contains either control information or user data.
+
+
+ SCTP Packet Format
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Common Header |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Chunk #1 |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| ... |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Chunk #n |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+
+ SCTP Common Header Format
+
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Source Value Number | Destination Value Number |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Verification Tag |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Checksum |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+
+*/
+type packet struct {
+ sourcePort uint16
+ destinationPort uint16
+ verificationTag uint32
+ chunks []chunk
+}
+
+const (
+ packetHeaderSize = 12
+)
+
+func (p *packet) unmarshal(raw []byte) error {
+ if len(raw) < packetHeaderSize {
+ return errors.Errorf("raw only %d bytes, %d is the minimum length for a SCTP packet", len(raw), packetHeaderSize)
+ }
+
+ p.sourcePort = binary.BigEndian.Uint16(raw[0:])
+ p.destinationPort = binary.BigEndian.Uint16(raw[2:])
+ p.verificationTag = binary.BigEndian.Uint32(raw[4:])
+
+ offset := packetHeaderSize
+ for {
+ // Exact match, no more chunks
+ if offset == len(raw) {
+ break
+ } else if offset+chunkHeaderSize > len(raw) {
+ return errors.Errorf("Unable to parse SCTP chunk, not enough data for complete header: offset %d remaining %d", offset, len(raw))
+ }
+
+ var c chunk
+ switch chunkType(raw[offset]) {
+ case ctInit:
+ c = &chunkInit{}
+ case ctInitAck:
+ c = &chunkInitAck{}
+ case ctAbort:
+ c = &chunkAbort{}
+ case ctCookieEcho:
+ c = &chunkCookieEcho{}
+ case ctCookieAck:
+ c = &chunkCookieAck{}
+ case ctHeartbeat:
+ c = &chunkHeartbeat{}
+ case ctPayloadData:
+ c = &chunkPayloadData{}
+ case ctSack:
+ c = &chunkSelectiveAck{}
+ case ctReconfig:
+ c = &chunkReconfig{}
+ case ctForwardTSN:
+ c = &chunkForwardTSN{}
+ case ctError:
+ c = &chunkError{}
+ default:
+ return errors.Errorf("Failed to unmarshal, contains unknown chunk type %s", chunkType(raw[offset]).String())
+ }
+
+ if err := c.unmarshal(raw[offset:]); err != nil {
+ return err
+ }
+
+ p.chunks = append(p.chunks, c)
+ chunkValuePadding := getPadding(c.valueLength())
+ offset += chunkHeaderSize + c.valueLength() + chunkValuePadding
+ }
+ theirChecksum := binary.LittleEndian.Uint32(raw[8:])
+ ourChecksum := generatePacketChecksum(raw)
+ if theirChecksum != ourChecksum {
+ return errors.Errorf("Checksum mismatch theirs: %d ours: %d", theirChecksum, ourChecksum)
+ }
+ return nil
+}
+
+func (p *packet) marshal() ([]byte, error) {
+ raw := make([]byte, packetHeaderSize)
+
+ // Populate static headers
+ // 8-12 is Checksum which will be populated when packet is complete
+ binary.BigEndian.PutUint16(raw[0:], p.sourcePort)
+ binary.BigEndian.PutUint16(raw[2:], p.destinationPort)
+ binary.BigEndian.PutUint32(raw[4:], p.verificationTag)
+
+ // Populate chunks
+ for _, c := range p.chunks {
+ chunkRaw, err := c.marshal()
+ if err != nil {
+ return nil, err
+ }
+ raw = append(raw, chunkRaw...)
+
+ paddingNeeded := getPadding(len(raw))
+ if paddingNeeded != 0 {
+ raw = append(raw, make([]byte, paddingNeeded)...)
+ }
+ }
+
+ // Checksum is already in BigEndian
+ // Using LittleEndian.PutUint32 stops it from being flipped
+ binary.LittleEndian.PutUint32(raw[8:], generatePacketChecksum(raw))
+ return raw, nil
+}
+
+func generatePacketChecksum(raw []byte) (sum uint32) {
+ // Fastest way to do a crc32 without allocating.
+ sum = crc32.Update(sum, castagnoliTable, raw[0:8])
+ sum = crc32.Update(sum, castagnoliTable, fourZeroes[:])
+ sum = crc32.Update(sum, castagnoliTable, raw[12:])
+ return sum
+}
+
+// String makes packet printable
+func (p *packet) String() string {
+ format := `Packet:
+ sourcePort: %d
+ destinationPort: %d
+ verificationTag: %d
+ `
+ res := fmt.Sprintf(format,
+ p.sourcePort,
+ p.destinationPort,
+ p.verificationTag,
+ )
+ for i, chunk := range p.chunks {
+ res += fmt.Sprintf("Chunk %d:\n %s", i, chunk)
+ }
+ return res
+}
diff --git a/vendor/github.com/pion/sctp/param.go b/vendor/github.com/pion/sctp/param.go
new file mode 100644
index 0000000..08e46d1
--- /dev/null
+++ b/vendor/github.com/pion/sctp/param.go
@@ -0,0 +1,35 @@
+package sctp
+
+import (
+ "github.com/pkg/errors"
+)
+
+type param interface {
+ marshal() ([]byte, error)
+ length() int
+}
+
+func buildParam(t paramType, rawParam []byte) (param, error) {
+ switch t {
+ case forwardTSNSupp:
+ return (&paramForwardTSNSupported{}).unmarshal(rawParam)
+ case supportedExt:
+ return (&paramSupportedExtensions{}).unmarshal(rawParam)
+ case random:
+ return (&paramRandom{}).unmarshal(rawParam)
+ case reqHMACAlgo:
+ return (&paramRequestedHMACAlgorithm{}).unmarshal(rawParam)
+ case chunkList:
+ return (&paramChunkList{}).unmarshal(rawParam)
+ case stateCookie:
+ return (&paramStateCookie{}).unmarshal(rawParam)
+ case heartbeatInfo:
+ return (&paramHeartbeatInfo{}).unmarshal(rawParam)
+ case outSSNResetReq:
+ return (&paramOutgoingResetRequest{}).unmarshal(rawParam)
+ case reconfigResp:
+ return (&paramReconfigResponse{}).unmarshal(rawParam)
+ default:
+ return nil, errors.Errorf("Unhandled ParamType %v", t)
+ }
+}
diff --git a/vendor/github.com/pion/sctp/param_chunk_list.go b/vendor/github.com/pion/sctp/param_chunk_list.go
new file mode 100644
index 0000000..4ea484c
--- /dev/null
+++ b/vendor/github.com/pion/sctp/param_chunk_list.go
@@ -0,0 +1,28 @@
+package sctp
+
+type paramChunkList struct {
+ paramHeader
+ chunkTypes []chunkType
+}
+
+func (c *paramChunkList) marshal() ([]byte, error) {
+ c.typ = chunkList
+ c.raw = make([]byte, len(c.chunkTypes))
+ for i, t := range c.chunkTypes {
+ c.raw[i] = byte(t)
+ }
+
+ return c.paramHeader.marshal()
+}
+
+func (c *paramChunkList) unmarshal(raw []byte) (param, error) {
+ err := c.paramHeader.unmarshal(raw)
+ if err != nil {
+ return nil, err
+ }
+ for _, t := range c.raw {
+ c.chunkTypes = append(c.chunkTypes, chunkType(t))
+ }
+
+ return c, nil
+}
diff --git a/vendor/github.com/pion/sctp/param_forward_tsn_supported.go b/vendor/github.com/pion/sctp/param_forward_tsn_supported.go
new file mode 100644
index 0000000..62de155
--- /dev/null
+++ b/vendor/github.com/pion/sctp/param_forward_tsn_supported.go
@@ -0,0 +1,28 @@
+package sctp
+
+// At the initialization of the association, the sender of the INIT or
+// INIT ACK chunk MAY include this OPTIONAL parameter to inform its peer
+// that it is able to support the Forward TSN chunk
+//
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Parameter Type = 49152 | Parameter Length = 4 |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+type paramForwardTSNSupported struct {
+ paramHeader
+}
+
+func (f *paramForwardTSNSupported) marshal() ([]byte, error) {
+ f.typ = forwardTSNSupp
+ f.raw = []byte{}
+ return f.paramHeader.marshal()
+}
+
+func (f *paramForwardTSNSupported) unmarshal(raw []byte) (param, error) {
+ err := f.paramHeader.unmarshal(raw)
+ if err != nil {
+ return nil, err
+ }
+ return f, nil
+}
diff --git a/vendor/github.com/pion/sctp/param_heartbeat_info.go b/vendor/github.com/pion/sctp/param_heartbeat_info.go
new file mode 100644
index 0000000..47f64eb
--- /dev/null
+++ b/vendor/github.com/pion/sctp/param_heartbeat_info.go
@@ -0,0 +1,21 @@
+package sctp
+
+type paramHeartbeatInfo struct {
+ paramHeader
+ heartbeatInformation []byte
+}
+
+func (h *paramHeartbeatInfo) marshal() ([]byte, error) {
+ h.typ = heartbeatInfo
+ h.raw = h.heartbeatInformation
+ return h.paramHeader.marshal()
+}
+
+func (h *paramHeartbeatInfo) unmarshal(raw []byte) (param, error) {
+ err := h.paramHeader.unmarshal(raw)
+ if err != nil {
+ return nil, err
+ }
+ h.heartbeatInformation = h.raw
+ return h, nil
+}
diff --git a/vendor/github.com/pion/sctp/param_outgoing_reset_request.go b/vendor/github.com/pion/sctp/param_outgoing_reset_request.go
new file mode 100644
index 0000000..ceae178
--- /dev/null
+++ b/vendor/github.com/pion/sctp/param_outgoing_reset_request.go
@@ -0,0 +1,88 @@
+package sctp
+
+import (
+ "encoding/binary"
+ "errors"
+)
+
+const (
+ paramOutgoingResetRequestStreamIdentifiersOffset = 12
+)
+
+// This parameter is used by the sender to request the reset of some or
+// all outgoing streams.
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Parameter Type = 13 | Parameter Length = 16 + 2 * N |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Re-configuration Request Sequence Number |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Re-configuration Response Sequence Number |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Sender's Last Assigned TSN |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Stream Number 1 (optional) | Stream Number 2 (optional) |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// / ...... /
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Stream Number N-1 (optional) | Stream Number N (optional) |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+type paramOutgoingResetRequest struct {
+ paramHeader
+ // reconfigRequestSequenceNumber is used to identify the request. It is a monotonically
+ // increasing number that is initialized to the same value as the
+ // initial TSN. It is increased by 1 whenever sending a new Re-
+ // configuration Request Parameter.
+ reconfigRequestSequenceNumber uint32
+ // When this Outgoing SSN Reset Request Parameter is sent in response
+ // to an Incoming SSN Reset Request Parameter, this parameter is also
+ // an implicit response to the incoming request. This field then
+ // holds the Re-configuration Request Sequence Number of the incoming
+ // request. In other cases, it holds the next expected
+ // Re-configuration Request Sequence Number minus 1.
+ reconfigResponseSequenceNumber uint32
+ // This value holds the next TSN minus 1 -- in other words, the last
+ // TSN that this sender assigned.
+ senderLastTSN uint32
+ // This optional field, if included, is used to indicate specific
+ // streams that are to be reset. If no streams are listed, then all
+ // streams are to be reset.
+ streamIdentifiers []uint16
+}
+
+var errSSNResetRequestParamTooShort = errors.New("outgoing SSN reset request parameter too short")
+
+func (r *paramOutgoingResetRequest) marshal() ([]byte, error) {
+ r.typ = outSSNResetReq
+ r.raw = make([]byte, paramOutgoingResetRequestStreamIdentifiersOffset+2*len(r.streamIdentifiers))
+ binary.BigEndian.PutUint32(r.raw, r.reconfigRequestSequenceNumber)
+ binary.BigEndian.PutUint32(r.raw[4:], r.reconfigResponseSequenceNumber)
+ binary.BigEndian.PutUint32(r.raw[8:], r.senderLastTSN)
+ for i, sID := range r.streamIdentifiers {
+ binary.BigEndian.PutUint16(r.raw[paramOutgoingResetRequestStreamIdentifiersOffset+2*i:], sID)
+ }
+ return r.paramHeader.marshal()
+}
+
+func (r *paramOutgoingResetRequest) unmarshal(raw []byte) (param, error) {
+ err := r.paramHeader.unmarshal(raw)
+ if err != nil {
+ return nil, err
+ }
+ if len(r.raw) < paramOutgoingResetRequestStreamIdentifiersOffset {
+ return nil, errSSNResetRequestParamTooShort
+ }
+ r.reconfigRequestSequenceNumber = binary.BigEndian.Uint32(r.raw)
+ r.reconfigResponseSequenceNumber = binary.BigEndian.Uint32(r.raw[4:])
+ r.senderLastTSN = binary.BigEndian.Uint32(r.raw[8:])
+
+ lim := (len(r.raw) - paramOutgoingResetRequestStreamIdentifiersOffset) / 2
+ r.streamIdentifiers = make([]uint16, lim)
+ for i := 0; i < lim; i++ {
+ r.streamIdentifiers[i] = binary.BigEndian.Uint16(r.raw[paramOutgoingResetRequestStreamIdentifiersOffset+2*i:])
+ }
+
+ return r, nil
+}
diff --git a/vendor/github.com/pion/sctp/param_random.go b/vendor/github.com/pion/sctp/param_random.go
new file mode 100644
index 0000000..dc454b3
--- /dev/null
+++ b/vendor/github.com/pion/sctp/param_random.go
@@ -0,0 +1,21 @@
+package sctp
+
+type paramRandom struct {
+ paramHeader
+ randomData []byte
+}
+
+func (r *paramRandom) marshal() ([]byte, error) {
+ r.typ = random
+ r.raw = r.randomData
+ return r.paramHeader.marshal()
+}
+
+func (r *paramRandom) unmarshal(raw []byte) (param, error) {
+ err := r.paramHeader.unmarshal(raw)
+ if err != nil {
+ return nil, err
+ }
+ r.randomData = r.raw
+ return r, nil
+}
diff --git a/vendor/github.com/pion/sctp/param_reconfig_response.go b/vendor/github.com/pion/sctp/param_reconfig_response.go
new file mode 100644
index 0000000..d9eab55
--- /dev/null
+++ b/vendor/github.com/pion/sctp/param_reconfig_response.go
@@ -0,0 +1,92 @@
+package sctp
+
+import (
+ "encoding/binary"
+ "errors"
+ "fmt"
+)
+
+// This parameter is used by the receiver of a Re-configuration Request
+// Parameter to respond to the request.
+//
+// 0 1 2 3
+// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Parameter Type = 16 | Parameter Length |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Re-configuration Response Sequence Number |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Result |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Sender's Next TSN (optional) |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+// | Receiver's Next TSN (optional) |
+// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+type paramReconfigResponse struct {
+ paramHeader
+ // This value is copied from the request parameter and is used by the
+ // receiver of the Re-configuration Response Parameter to tie the
+ // response to the request.
+ reconfigResponseSequenceNumber uint32
+ // This value describes the result of the processing of the request.
+ result reconfigResult
+}
+
+type reconfigResult uint32
+
+const (
+ reconfigResultSuccessNOP reconfigResult = 0
+ reconfigResultSuccessPerformed reconfigResult = 1
+ reconfigResultDenied reconfigResult = 2
+ reconfigResultErrorWrongSSN reconfigResult = 3
+ reconfigResultErrorRequestAlreadyInProgress reconfigResult = 4
+ reconfigResultErrorBadSequenceNumber reconfigResult = 5
+ reconfigResultInProgress reconfigResult = 6
+)
+
+var errReconfigRespParamTooShort = errors.New("reconfig response parameter too short")
+
+func (t reconfigResult) String() string {
+ switch t {
+ case reconfigResultSuccessNOP:
+ return "0: Success - Nothing to do"
+ case reconfigResultSuccessPerformed:
+ return "1: Success - Performed"
+ case reconfigResultDenied:
+ return "2: Denied"
+ case reconfigResultErrorWrongSSN:
+ return "3: Error - Wrong SSN"
+ case reconfigResultErrorRequestAlreadyInProgress:
+ return "4: Error - Request already in progress"
+ case reconfigResultErrorBadSequenceNumber:
+ return "5: Error - Bad Sequence Number"
+ case reconfigResultInProgress:
+ return "6: In progress"
+ default:
+ return fmt.Sprintf("Unknown reconfigResult: %d", t)
+ }
+}
+
+func (r *paramReconfigResponse) marshal() ([]byte, error) {
+ r.typ = reconfigResp
+ r.raw = make([]byte, 8)
+ binary.BigEndian.PutUint32(r.raw, r.reconfigResponseSequenceNumber)
+ binary.BigEndian.PutUint32(r.raw[4:], uint32(r.result))
+
+ return r.paramHeader.marshal()
+}
+
+func (r *paramReconfigResponse) unmarshal(raw []byte) (param, error) {
+ err := r.paramHeader.unmarshal(raw)
+ if err != nil {
+ return nil, err
+ }
+ if len(r.raw) < 8 {
+ return nil, errReconfigRespParamTooShort
+ }
+ r.reconfigResponseSequenceNumber = binary.BigEndian.Uint32(r.raw)
+ r.result = reconfigResult(binary.BigEndian.Uint32(r.raw[4:]))
+
+ return r, nil
+}
diff --git a/vendor/github.com/pion/sctp/param_requested_hmac_algorithm.go b/vendor/github.com/pion/sctp/param_requested_hmac_algorithm.go
new file mode 100644
index 0000000..b520fe3
--- /dev/null
+++ b/vendor/github.com/pion/sctp/param_requested_hmac_algorithm.go
@@ -0,0 +1,73 @@
+package sctp
+
+import (
+ "encoding/binary"
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+type hmacAlgorithm uint16
+
+const (
+ hmacResv1 hmacAlgorithm = 0
+ hmacSHA128 = 1
+ hmacResv2 hmacAlgorithm = 2
+ hmacSHA256 hmacAlgorithm = 3
+)
+
+func (c hmacAlgorithm) String() string {
+ switch c {
+ case hmacResv1:
+ return "HMAC Reserved (0x00)"
+ case hmacSHA128:
+ return "HMAC SHA-128"
+ case hmacResv2:
+ return "HMAC Reserved (0x02)"
+ case hmacSHA256:
+ return "HMAC SHA-256"
+ default:
+ return fmt.Sprintf("Unknown HMAC Algorithm type: %d", c)
+ }
+}
+
+type paramRequestedHMACAlgorithm struct {
+ paramHeader
+ availableAlgorithms []hmacAlgorithm
+}
+
+func (r *paramRequestedHMACAlgorithm) marshal() ([]byte, error) {
+ r.typ = reqHMACAlgo
+ r.raw = make([]byte, len(r.availableAlgorithms)*2)
+ i := 0
+ for _, a := range r.availableAlgorithms {
+ binary.BigEndian.PutUint16(r.raw[i:], uint16(a))
+ i += 2
+ }
+
+ return r.paramHeader.marshal()
+}
+
+func (r *paramRequestedHMACAlgorithm) unmarshal(raw []byte) (param, error) {
+ err := r.paramHeader.unmarshal(raw)
+ if err != nil {
+ return nil, err
+ }
+
+ i := 0
+ for i < len(r.raw) {
+ a := hmacAlgorithm(binary.BigEndian.Uint16(r.raw[i:]))
+ switch a {
+ case hmacSHA128:
+ fallthrough
+ case hmacSHA256:
+ r.availableAlgorithms = append(r.availableAlgorithms, a)
+ default:
+ return nil, errors.Errorf("Invalid algorithm type '%v'", a)
+ }
+
+ i += 2
+ }
+
+ return r, nil
+}
diff --git a/vendor/github.com/pion/sctp/param_state_cookie.go b/vendor/github.com/pion/sctp/param_state_cookie.go
new file mode 100644
index 0000000..9681267
--- /dev/null
+++ b/vendor/github.com/pion/sctp/param_state_cookie.go
@@ -0,0 +1,46 @@
+package sctp
+
+import (
+ "crypto/rand"
+ "fmt"
+)
+
+type paramStateCookie struct {
+ paramHeader
+ cookie []byte
+}
+
+func newRandomStateCookie() (*paramStateCookie, error) {
+ randCookie := make([]byte, 32)
+ _, err := rand.Read(randCookie)
+ // crypto/rand.Read returns n == len(b) if and only if err == nil.
+ if err != nil {
+ return nil, err
+ }
+
+ s := &paramStateCookie{
+ cookie: randCookie,
+ }
+
+ return s, nil
+}
+
+func (s *paramStateCookie) marshal() ([]byte, error) {
+ s.typ = stateCookie
+ s.raw = s.cookie
+ return s.paramHeader.marshal()
+}
+
+func (s *paramStateCookie) unmarshal(raw []byte) (param, error) {
+ err := s.paramHeader.unmarshal(raw)
+ if err != nil {
+ return nil, err
+ }
+ s.cookie = s.raw
+ return s, nil
+}
+
+// String makes paramStateCookie printable
+func (s *paramStateCookie) String() string {
+ return fmt.Sprintf("%s: %s", s.paramHeader, s.cookie)
+}
diff --git a/vendor/github.com/pion/sctp/param_supported_extensions.go b/vendor/github.com/pion/sctp/param_supported_extensions.go
new file mode 100644
index 0000000..2935524
--- /dev/null
+++ b/vendor/github.com/pion/sctp/param_supported_extensions.go
@@ -0,0 +1,29 @@
+package sctp
+
+type paramSupportedExtensions struct {
+ paramHeader
+ ChunkTypes []chunkType
+}
+
+func (s *paramSupportedExtensions) marshal() ([]byte, error) {
+ s.typ = supportedExt
+ s.raw = make([]byte, len(s.ChunkTypes))
+ for i, c := range s.ChunkTypes {
+ s.raw[i] = byte(c)
+ }
+
+ return s.paramHeader.marshal()
+}
+
+func (s *paramSupportedExtensions) unmarshal(raw []byte) (param, error) {
+ err := s.paramHeader.unmarshal(raw)
+ if err != nil {
+ return nil, err
+ }
+
+ for _, t := range s.raw {
+ s.ChunkTypes = append(s.ChunkTypes, chunkType(t))
+ }
+
+ return s, nil
+}
diff --git a/vendor/github.com/pion/sctp/paramheader.go b/vendor/github.com/pion/sctp/paramheader.go
new file mode 100644
index 0000000..d88642b
--- /dev/null
+++ b/vendor/github.com/pion/sctp/paramheader.go
@@ -0,0 +1,63 @@
+package sctp
+
+import (
+ "encoding/binary"
+ "encoding/hex"
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+type paramHeader struct {
+ typ paramType
+ len int
+ raw []byte
+}
+
+const (
+ paramHeaderLength = 4
+)
+
+func (p *paramHeader) marshal() ([]byte, error) {
+ paramLengthPlusHeader := paramHeaderLength + len(p.raw)
+
+ rawParam := make([]byte, paramLengthPlusHeader)
+ binary.BigEndian.PutUint16(rawParam[0:], uint16(p.typ))
+ binary.BigEndian.PutUint16(rawParam[2:], uint16(paramLengthPlusHeader))
+ copy(rawParam[paramHeaderLength:], p.raw)
+
+ return rawParam, nil
+}
+
+func (p *paramHeader) unmarshal(raw []byte) error {
+ if len(raw) < paramHeaderLength {
+ return errors.New("param header too short")
+ }
+
+ paramLengthPlusHeader := binary.BigEndian.Uint16(raw[2:])
+ if int(paramLengthPlusHeader) < paramHeaderLength {
+ return errors.Errorf("param self reported length (%d) smaller than header length (%d)", int(paramLengthPlusHeader), paramHeaderLength)
+ }
+ if len(raw) < int(paramLengthPlusHeader) {
+ return errors.Errorf("param length (%d) shorter than its self reported length (%d)", len(raw), int(paramLengthPlusHeader))
+ }
+
+ typ, err := parseParamType(raw[0:])
+ if err != nil {
+ return errors.Wrap(err, "failed to parse param type")
+ }
+ p.typ = typ
+ p.raw = raw[paramHeaderLength:paramLengthPlusHeader]
+ p.len = int(paramLengthPlusHeader)
+
+ return nil
+}
+
+func (p *paramHeader) length() int {
+ return p.len
+}
+
+// String makes paramHeader printable
+func (p paramHeader) String() string {
+ return fmt.Sprintf("%s (%d): %s", p.typ, p.len, hex.Dump(p.raw))
+}
diff --git a/vendor/github.com/pion/sctp/paramtype.go b/vendor/github.com/pion/sctp/paramtype.go
new file mode 100644
index 0000000..bb0ee82
--- /dev/null
+++ b/vendor/github.com/pion/sctp/paramtype.go
@@ -0,0 +1,106 @@
+package sctp
+
+import (
+ "encoding/binary"
+ "fmt"
+
+ "github.com/pkg/errors"
+)
+
+// paramType represents a SCTP INIT/INITACK parameter
+type paramType uint16
+
+const (
+ heartbeatInfo paramType = 1 // Heartbeat Info [RFC4960]
+ ipV4Addr paramType = 5 // IPv4 IP [RFC4960]
+ ipV6Addr paramType = 6 // IPv6 IP [RFC4960]
+ stateCookie paramType = 7 // State Cookie [RFC4960]
+ unrecognizedParam paramType = 8 // Unrecognized Parameters [RFC4960]
+ cookiePreservative paramType = 9 // Cookie Preservative [RFC4960]
+ hostNameAddr paramType = 11 // Host Name IP [RFC4960]
+ supportedAddrTypes paramType = 12 // Supported IP Types [RFC4960]
+ outSSNResetReq paramType = 13 // Outgoing SSN Reset Request Parameter [RFC6525]
+ incSSNResetReq paramType = 14 // Incoming SSN Reset Request Parameter [RFC6525]
+ ssnTSNResetReq paramType = 15 // SSN/TSN Reset Request Parameter [RFC6525]
+ reconfigResp paramType = 16 // Re-configuration Response Parameter [RFC6525]
+ addOutStreamsReq paramType = 17 // Add Outgoing Streams Request Parameter [RFC6525]
+ addIncStreamsReq paramType = 18 // Add Incoming Streams Request Parameter [RFC6525]
+ random paramType = 32770 // Random (0x8002) [RFC4805]
+ chunkList paramType = 32771 // Chunk List (0x8003) [RFC4895]
+ reqHMACAlgo paramType = 32772 // Requested HMAC Algorithm Parameter (0x8004) [RFC4895]
+ padding paramType = 32773 // Padding (0x8005)
+ supportedExt paramType = 32776 // Supported Extensions (0x8008) [RFC5061]
+ forwardTSNSupp paramType = 49152 // Forward TSN supported (0xC000) [RFC3758]
+ addIPAddr paramType = 49153 // Add IP IP (0xC001) [RFC5061]
+ delIPAddr paramType = 49154 // Delete IP IP (0xC002) [RFC5061]
+ errClauseInd paramType = 49155 // Error Cause Indication (0xC003) [RFC5061]
+ setPriAddr paramType = 49156 // Set Primary IP (0xC004) [RFC5061]
+ successInd paramType = 49157 // Success Indication (0xC005) [RFC5061]
+ adaptLayerInd paramType = 49158 // Adaptation Layer Indication (0xC006) [RFC5061]
+)
+
+func parseParamType(raw []byte) (paramType, error) {
+ if len(raw) < 2 {
+ return paramType(0), errors.New("packet to short")
+ }
+ return paramType(binary.BigEndian.Uint16(raw)), nil
+}
+
+func (p paramType) String() string {
+ switch p {
+ case heartbeatInfo:
+ return "Heartbeat Info"
+ case ipV4Addr:
+ return "IPv4 IP"
+ case ipV6Addr:
+ return "IPv6 IP"
+ case stateCookie:
+ return "State Cookie"
+ case unrecognizedParam:
+ return "Unrecognized Parameters"
+ case cookiePreservative:
+ return "Cookie Preservative"
+ case hostNameAddr:
+ return "Host Name IP"
+ case supportedAddrTypes:
+ return "Supported IP Types"
+ case outSSNResetReq:
+ return "Outgoing SSN Reset Request Parameter"
+ case incSSNResetReq:
+ return "Incoming SSN Reset Request Parameter"
+ case ssnTSNResetReq:
+ return "SSN/TSN Reset Request Parameter"
+ case reconfigResp:
+ return "Re-configuration Response Parameter"
+ case addOutStreamsReq:
+ return "Add Outgoing Streams Request Parameter"
+ case addIncStreamsReq:
+ return "Add Incoming Streams Request Parameter"
+ case random:
+ return "Random"
+ case chunkList:
+ return "Chunk List"
+ case reqHMACAlgo:
+ return "Requested HMAC Algorithm Parameter"
+ case padding:
+ return "Padding"
+ case supportedExt:
+ return "Supported Extensions"
+ case forwardTSNSupp:
+ return "Forward TSN supported"
+ case addIPAddr:
+ return "Add IP IP"
+ case delIPAddr:
+ return "Delete IP IP"
+ case errClauseInd:
+ return "Error Cause Indication"
+ case setPriAddr:
+ return "Set Primary IP"
+ case successInd:
+ return "Success Indication"
+ case adaptLayerInd:
+ return "Adaptation Layer Indication"
+ default:
+ return fmt.Sprintf("Unknown ParamType: %d", p)
+ }
+}
diff --git a/vendor/github.com/pion/sctp/payload_queue.go b/vendor/github.com/pion/sctp/payload_queue.go
new file mode 100644
index 0000000..2d1a35a
--- /dev/null
+++ b/vendor/github.com/pion/sctp/payload_queue.go
@@ -0,0 +1,179 @@
+package sctp
+
+import (
+ "fmt"
+ "sort"
+)
+
+type payloadQueue struct {
+ chunkMap map[uint32]*chunkPayloadData
+ sorted []uint32
+ dupTSN []uint32
+ nBytes int
+}
+
+func newPayloadQueue() *payloadQueue {
+ return &payloadQueue{chunkMap: map[uint32]*chunkPayloadData{}}
+}
+
+func (q *payloadQueue) updateSortedKeys() {
+ if q.sorted != nil {
+ return
+ }
+
+ q.sorted = make([]uint32, len(q.chunkMap))
+ i := 0
+ for k := range q.chunkMap {
+ q.sorted[i] = k
+ i++
+ }
+
+ sort.Slice(q.sorted, func(i, j int) bool {
+ return sna32LT(q.sorted[i], q.sorted[j])
+ })
+}
+
+func (q *payloadQueue) canPush(p *chunkPayloadData, cumulativeTSN uint32) bool {
+ _, ok := q.chunkMap[p.tsn]
+ if ok || sna32LTE(p.tsn, cumulativeTSN) {
+ return false
+ }
+ return true
+}
+
+func (q *payloadQueue) pushNoCheck(p *chunkPayloadData) {
+ q.chunkMap[p.tsn] = p
+ q.nBytes += len(p.userData)
+ q.sorted = nil
+}
+
+// push pushes a payload data. If the payload data is already in our queue or
+// older than our cumulativeTSN marker, it will be recored as duplications,
+// which can later be retrieved using popDuplicates.
+func (q *payloadQueue) push(p *chunkPayloadData, cumulativeTSN uint32) bool {
+ _, ok := q.chunkMap[p.tsn]
+ if ok || sna32LTE(p.tsn, cumulativeTSN) {
+ // Found the packet, log in dups
+ q.dupTSN = append(q.dupTSN, p.tsn)
+ return false
+ }
+
+ q.chunkMap[p.tsn] = p
+ q.nBytes += len(p.userData)
+ q.sorted = nil
+ return true
+}
+
+// pop pops only if the oldest chunk's TSN matches the given TSN.
+func (q *payloadQueue) pop(tsn uint32) (*chunkPayloadData, bool) {
+ q.updateSortedKeys()
+
+ if len(q.chunkMap) > 0 && tsn == q.sorted[0] {
+ q.sorted = q.sorted[1:]
+ if c, ok := q.chunkMap[tsn]; ok {
+ delete(q.chunkMap, tsn)
+ q.nBytes -= len(c.userData)
+ return c, true
+ }
+ }
+
+ return nil, false
+}
+
+// get returns reference to chunkPayloadData with the given TSN value.
+func (q *payloadQueue) get(tsn uint32) (*chunkPayloadData, bool) {
+ c, ok := q.chunkMap[tsn]
+ return c, ok
+}
+
+// popDuplicates returns an array of TSN values that were found duplicate.
+func (q *payloadQueue) popDuplicates() []uint32 {
+ dups := q.dupTSN
+ q.dupTSN = []uint32{}
+ return dups
+}
+
+func (q *payloadQueue) getGapAckBlocks(cumulativeTSN uint32) (gapAckBlocks []gapAckBlock) {
+ var b gapAckBlock
+
+ if len(q.chunkMap) == 0 {
+ return []gapAckBlock{}
+ }
+
+ q.updateSortedKeys()
+
+ for i, tsn := range q.sorted {
+ if i == 0 {
+ b.start = uint16(tsn - cumulativeTSN)
+ b.end = b.start
+ continue
+ }
+ diff := uint16(tsn - cumulativeTSN)
+ if b.end+1 == diff {
+ b.end++
+ } else {
+ gapAckBlocks = append(gapAckBlocks, gapAckBlock{
+ start: b.start,
+ end: b.end,
+ })
+ b.start = diff
+ b.end = diff
+ }
+ }
+
+ gapAckBlocks = append(gapAckBlocks, gapAckBlock{
+ start: b.start,
+ end: b.end,
+ })
+
+ return gapAckBlocks
+}
+
+func (q *payloadQueue) getGapAckBlocksString(cumulativeTSN uint32) string {
+ gapAckBlocks := q.getGapAckBlocks(cumulativeTSN)
+ str := fmt.Sprintf("cumTSN=%d", cumulativeTSN)
+ for _, b := range gapAckBlocks {
+ str += fmt.Sprintf(",%d-%d", b.start, b.end)
+ }
+ return str
+}
+
+func (q *payloadQueue) markAsAcked(tsn uint32) int {
+ var nBytesAcked int
+ if c, ok := q.chunkMap[tsn]; ok {
+ c.acked = true
+ c.retransmit = false
+ nBytesAcked = len(c.userData)
+ q.nBytes -= nBytesAcked
+ c.userData = []byte{}
+ }
+
+ return nBytesAcked
+}
+
+func (q *payloadQueue) getLastTSNReceived() (uint32, bool) {
+ q.updateSortedKeys()
+
+ qlen := len(q.sorted)
+ if qlen == 0 {
+ return 0, false
+ }
+ return q.sorted[qlen-1], true
+}
+
+func (q *payloadQueue) markAllToRetrasmit() {
+ for _, c := range q.chunkMap {
+ if c.acked || c.abandoned() {
+ continue
+ }
+ c.retransmit = true
+ }
+}
+
+func (q *payloadQueue) getNumBytes() int {
+ return q.nBytes
+}
+
+func (q *payloadQueue) size() int {
+ return len(q.chunkMap)
+}
diff --git a/vendor/github.com/pion/sctp/pending_queue.go b/vendor/github.com/pion/sctp/pending_queue.go
new file mode 100644
index 0000000..5f204d3
--- /dev/null
+++ b/vendor/github.com/pion/sctp/pending_queue.go
@@ -0,0 +1,138 @@
+package sctp
+
+import (
+ "github.com/pkg/errors"
+)
+
+// pendingBaseQueue
+
+type pendingBaseQueue struct {
+ queue []*chunkPayloadData
+}
+
+func newPendingBaseQueue() *pendingBaseQueue {
+ return &pendingBaseQueue{queue: []*chunkPayloadData{}}
+}
+
+func (q *pendingBaseQueue) push(c *chunkPayloadData) {
+ q.queue = append(q.queue, c)
+}
+
+func (q *pendingBaseQueue) pop() *chunkPayloadData {
+ if len(q.queue) == 0 {
+ return nil
+ }
+ c := q.queue[0]
+ q.queue = q.queue[1:]
+ return c
+}
+
+func (q *pendingBaseQueue) get(i int) *chunkPayloadData {
+ if len(q.queue) == 0 || i < 0 || i >= len(q.queue) {
+ return nil
+ }
+ return q.queue[i]
+}
+
+func (q *pendingBaseQueue) size() int {
+ return len(q.queue)
+}
+
+// pendingQueue
+
+type pendingQueue struct {
+ unorderedQueue *pendingBaseQueue
+ orderedQueue *pendingBaseQueue
+ nBytes int
+ selected bool
+ unorderedIsSelected bool
+}
+
+var (
+ errUnexpectedChuckPoppedUnordered = errors.New("unexpected chunk popped (unordered)")
+ errUnexpectedChuckPoppedOrdered = errors.New("unexpected chunk popped (ordered)")
+ errUnexpectedQState = errors.New("unexpected q state (should've been selected)")
+)
+
+func newPendingQueue() *pendingQueue {
+ return &pendingQueue{
+ unorderedQueue: newPendingBaseQueue(),
+ orderedQueue: newPendingBaseQueue(),
+ }
+}
+
+func (q *pendingQueue) push(c *chunkPayloadData) {
+ if c.unordered {
+ q.unorderedQueue.push(c)
+ } else {
+ q.orderedQueue.push(c)
+ }
+ q.nBytes += len(c.userData)
+}
+
+func (q *pendingQueue) peek() *chunkPayloadData {
+ if q.selected {
+ if q.unorderedIsSelected {
+ return q.unorderedQueue.get(0)
+ }
+ return q.orderedQueue.get(0)
+ }
+
+ if c := q.unorderedQueue.get(0); c != nil {
+ return c
+ }
+ return q.orderedQueue.get(0)
+}
+
+func (q *pendingQueue) pop(c *chunkPayloadData) error {
+ if q.selected {
+ var popped *chunkPayloadData
+ if q.unorderedIsSelected {
+ popped = q.unorderedQueue.pop()
+ if popped != c {
+ return errUnexpectedChuckPoppedUnordered
+ }
+ } else {
+ popped = q.orderedQueue.pop()
+ if popped != c {
+ return errUnexpectedChuckPoppedOrdered
+ }
+ }
+ if popped.endingFragment {
+ q.selected = false
+ }
+ } else {
+ if !c.beginningFragment {
+ return errUnexpectedQState
+ }
+ if c.unordered {
+ popped := q.unorderedQueue.pop()
+ if popped != c {
+ return errUnexpectedChuckPoppedUnordered
+ }
+ if !popped.endingFragment {
+ q.selected = true
+ q.unorderedIsSelected = true
+ }
+ } else {
+ popped := q.orderedQueue.pop()
+ if popped != c {
+ return errUnexpectedChuckPoppedOrdered
+ }
+ if !popped.endingFragment {
+ q.selected = true
+ q.unorderedIsSelected = false
+ }
+ }
+ }
+ q.nBytes -= len(c.userData)
+ return nil
+}
+
+func (q *pendingQueue) getNumBytes() int {
+ return q.nBytes
+}
+
+func (q *pendingQueue) size() int {
+ return q.unorderedQueue.size() + q.orderedQueue.size()
+}
diff --git a/vendor/github.com/pion/sctp/reassembly_queue.go b/vendor/github.com/pion/sctp/reassembly_queue.go
new file mode 100644
index 0000000..f71d59c
--- /dev/null
+++ b/vendor/github.com/pion/sctp/reassembly_queue.go
@@ -0,0 +1,353 @@
+package sctp
+
+import (
+ "io"
+ "sort"
+ "sync/atomic"
+
+ "github.com/pkg/errors"
+)
+
+func sortChunksByTSN(a []*chunkPayloadData) {
+ sort.Slice(a, func(i, j int) bool {
+ return sna32LT(a[i].tsn, a[j].tsn)
+ })
+}
+
+func sortChunksBySSN(a []*chunkSet) {
+ sort.Slice(a, func(i, j int) bool {
+ return sna16LT(a[i].ssn, a[j].ssn)
+ })
+}
+
+// chunkSet is a set of chunks that share the same SSN
+type chunkSet struct {
+ ssn uint16 // used only with the ordered chunks
+ ppi PayloadProtocolIdentifier
+ chunks []*chunkPayloadData
+}
+
+func newChunkSet(ssn uint16, ppi PayloadProtocolIdentifier) *chunkSet {
+ return &chunkSet{
+ ssn: ssn,
+ ppi: ppi,
+ chunks: []*chunkPayloadData{},
+ }
+}
+
+func (set *chunkSet) push(chunk *chunkPayloadData) bool {
+ // check if dup
+ for _, c := range set.chunks {
+ if c.tsn == chunk.tsn {
+ return false
+ }
+ }
+
+ // append and sort
+ set.chunks = append(set.chunks, chunk)
+ sortChunksByTSN(set.chunks)
+
+ // Check if we now have a complete set
+ complete := set.isComplete()
+ return complete
+}
+
+func (set *chunkSet) isComplete() bool {
+ // Condition for complete set
+ // 0. Has at least one chunk.
+ // 1. Begins with beginningFragment set to true
+ // 2. Ends with endingFragment set to true
+ // 3. TSN monotinically increase by 1 from beginning to end
+
+ // 0.
+ nChunks := len(set.chunks)
+ if nChunks == 0 {
+ return false
+ }
+
+ // 1.
+ if !set.chunks[0].beginningFragment {
+ return false
+ }
+
+ // 2.
+ if !set.chunks[nChunks-1].endingFragment {
+ return false
+ }
+
+ // 3.
+ var lastTSN uint32
+ for i, c := range set.chunks {
+ if i > 0 {
+ // Fragments must have contiguous TSN
+ // From RFC 4960 Section 3.3.1:
+ // When a user message is fragmented into multiple chunks, the TSNs are
+ // used by the receiver to reassemble the message. This means that the
+ // TSNs for each fragment of a fragmented user message MUST be strictly
+ // sequential.
+ if c.tsn != lastTSN+1 {
+ // mid or end fragment is missing
+ return false
+ }
+ }
+
+ lastTSN = c.tsn
+ }
+
+ return true
+}
+
+type reassemblyQueue struct {
+ si uint16
+ nextSSN uint16 // expected SSN for next ordered chunk
+ ordered []*chunkSet
+ unordered []*chunkSet
+ unorderedChunks []*chunkPayloadData
+ nBytes uint64
+}
+
+var errTryAgain = errors.New("try again")
+
+func newReassemblyQueue(si uint16) *reassemblyQueue {
+ // From RFC 4960 Sec 6.5:
+ // The Stream Sequence Number in all the streams MUST start from 0 when
+ // the association is established. Also, when the Stream Sequence
+ // Number reaches the value 65535 the next Stream Sequence Number MUST
+ // be set to 0.
+ return &reassemblyQueue{
+ si: si,
+ nextSSN: 0, // From RFC 4960 Sec 6.5:
+ ordered: make([]*chunkSet, 0),
+ unordered: make([]*chunkSet, 0),
+ }
+}
+
+func (r *reassemblyQueue) push(chunk *chunkPayloadData) bool {
+ var cset *chunkSet
+
+ if chunk.streamIdentifier != r.si {
+ return false
+ }
+
+ if chunk.unordered {
+ // First, insert into unorderedChunks array
+ r.unorderedChunks = append(r.unorderedChunks, chunk)
+ atomic.AddUint64(&r.nBytes, uint64(len(chunk.userData)))
+ sortChunksByTSN(r.unorderedChunks)
+
+ // Scan unorderedChunks that are contiguous (in TSN)
+ cset = r.findCompleteUnorderedChunkSet()
+
+ // If found, append the complete set to the unordered array
+ if cset != nil {
+ r.unordered = append(r.unordered, cset)
+ return true
+ }
+
+ return false
+ }
+
+ // This is an ordered chunk
+
+ if sna16LT(chunk.streamSequenceNumber, r.nextSSN) {
+ return false
+ }
+
+ // Check if a chunkSet with the SSN already exists
+ for _, set := range r.ordered {
+ if set.ssn == chunk.streamSequenceNumber {
+ cset = set
+ break
+ }
+ }
+
+ // If not found, create a new chunkSet
+ if cset == nil {
+ cset = newChunkSet(chunk.streamSequenceNumber, chunk.payloadType)
+ r.ordered = append(r.ordered, cset)
+ if !chunk.unordered {
+ sortChunksBySSN(r.ordered)
+ }
+ }
+
+ atomic.AddUint64(&r.nBytes, uint64(len(chunk.userData)))
+
+ return cset.push(chunk)
+}
+
+func (r *reassemblyQueue) findCompleteUnorderedChunkSet() *chunkSet {
+ startIdx := -1
+ nChunks := 0
+ var lastTSN uint32
+ var found bool
+
+ for i, c := range r.unorderedChunks {
+ // seek beigining
+ if c.beginningFragment {
+ startIdx = i
+ nChunks = 1
+ lastTSN = c.tsn
+
+ if c.endingFragment {
+ found = true
+ break
+ }
+ continue
+ }
+
+ if startIdx < 0 {
+ continue
+ }
+
+ // Check if contiguous in TSN
+ if c.tsn != lastTSN+1 {
+ startIdx = -1
+ continue
+ }
+
+ lastTSN = c.tsn
+ nChunks++
+
+ if c.endingFragment {
+ found = true
+ break
+ }
+ }
+
+ if !found {
+ return nil
+ }
+
+ // Extract the range of chunks
+ var chunks []*chunkPayloadData
+ chunks = append(chunks, r.unorderedChunks[startIdx:startIdx+nChunks]...)
+
+ r.unorderedChunks = append(
+ r.unorderedChunks[:startIdx],
+ r.unorderedChunks[startIdx+nChunks:]...)
+
+ chunkSet := newChunkSet(0, chunks[0].payloadType)
+ chunkSet.chunks = chunks
+
+ return chunkSet
+}
+
+func (r *reassemblyQueue) isReadable() bool {
+ // Check unordered first
+ if len(r.unordered) > 0 {
+ // The chunk sets in r.unordered should all be complete.
+ return true
+ }
+
+ // Check ordered sets
+ if len(r.ordered) > 0 {
+ cset := r.ordered[0]
+ if cset.isComplete() {
+ if sna16LTE(cset.ssn, r.nextSSN) {
+ return true
+ }
+ }
+ }
+ return false
+}
+
+func (r *reassemblyQueue) read(buf []byte) (int, PayloadProtocolIdentifier, error) {
+ var cset *chunkSet
+ // Check unordered first
+ switch {
+ case len(r.unordered) > 0:
+ cset = r.unordered[0]
+ r.unordered = r.unordered[1:]
+ case len(r.ordered) > 0:
+ // Now, check ordered
+ cset = r.ordered[0]
+ if !cset.isComplete() {
+ return 0, 0, errTryAgain
+ }
+ if sna16GT(cset.ssn, r.nextSSN) {
+ return 0, 0, errTryAgain
+ }
+ r.ordered = r.ordered[1:]
+ if cset.ssn == r.nextSSN {
+ r.nextSSN++
+ }
+ default:
+ return 0, 0, errTryAgain
+ }
+
+ // Concat all fragments into the buffer
+ nWritten := 0
+ ppi := cset.ppi
+ var err error
+ for _, c := range cset.chunks {
+ toCopy := len(c.userData)
+ r.subtractNumBytes(toCopy)
+ if err == nil {
+ n := copy(buf[nWritten:], c.userData)
+ nWritten += n
+ if n < toCopy {
+ err = io.ErrShortBuffer
+ }
+ }
+ }
+
+ return nWritten, ppi, err
+}
+
+func (r *reassemblyQueue) forwardTSNForOrdered(lastSSN uint16) {
+ // Use lastSSN to locate a chunkSet then remove it if the set has
+ // not been complete
+ keep := []*chunkSet{}
+ for _, set := range r.ordered {
+ if sna16LTE(set.ssn, lastSSN) {
+ if !set.isComplete() {
+ // drop the set
+ for _, c := range set.chunks {
+ r.subtractNumBytes(len(c.userData))
+ }
+ continue
+ }
+ }
+ keep = append(keep, set)
+ }
+ r.ordered = keep
+
+ // Finally, forward nextSSN
+ if sna16LTE(r.nextSSN, lastSSN) {
+ r.nextSSN = lastSSN + 1
+ }
+}
+
+func (r *reassemblyQueue) forwardTSNForUnordered(newCumulativeTSN uint32) {
+ // Remove all fragments in the unordered sets that contains chunks
+ // equal to or older than `newCumulativeTSN`.
+ // We know all sets in the r.unordered are complete ones.
+ // Just remove chunks that are equal to or older than newCumulativeTSN
+ // from the unorderedChunks
+ lastIdx := -1
+ for i, c := range r.unorderedChunks {
+ if sna32GT(c.tsn, newCumulativeTSN) {
+ break
+ }
+ lastIdx = i
+ }
+ if lastIdx >= 0 {
+ for _, c := range r.unorderedChunks[0 : lastIdx+1] {
+ r.subtractNumBytes(len(c.userData))
+ }
+ r.unorderedChunks = r.unorderedChunks[lastIdx+1:]
+ }
+}
+
+func (r *reassemblyQueue) subtractNumBytes(nBytes int) {
+ cur := atomic.LoadUint64(&r.nBytes)
+ if int(cur) >= nBytes {
+ atomic.AddUint64(&r.nBytes, -uint64(nBytes))
+ } else {
+ atomic.StoreUint64(&r.nBytes, 0)
+ }
+}
+
+func (r *reassemblyQueue) getNumBytes() int {
+ return int(atomic.LoadUint64(&r.nBytes))
+}
diff --git a/vendor/github.com/pion/sctp/renovate.json b/vendor/github.com/pion/sctp/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/sctp/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/sctp/rtx_timer.go b/vendor/github.com/pion/sctp/rtx_timer.go
new file mode 100644
index 0000000..14bc39d
--- /dev/null
+++ b/vendor/github.com/pion/sctp/rtx_timer.go
@@ -0,0 +1,219 @@
+package sctp
+
+import (
+ "math"
+ "sync"
+ "time"
+)
+
+const (
+ rtoInitial float64 = 3.0 * 1000 // msec
+ rtoMin float64 = 1.0 * 1000 // msec
+ rtoMax float64 = 60.0 * 1000 // msec
+ rtoAlpha float64 = 0.125
+ rtoBeta float64 = 0.25
+ maxInitRetrans uint = 8
+ pathMaxRetrans uint = 5
+ noMaxRetrans uint = 0
+)
+
+// rtoManager manages Rtx timeout values.
+// This is an implementation of RFC 4960 sec 6.3.1.
+type rtoManager struct {
+ srtt float64
+ rttvar float64
+ rto float64
+ noUpdate bool
+ mutex sync.RWMutex
+}
+
+// newRTOManager creates a new rtoManager.
+func newRTOManager() *rtoManager {
+ return &rtoManager{
+ rto: rtoInitial,
+ }
+}
+
+// setNewRTT takes a newly measured RTT then adjust the RTO in msec.
+func (m *rtoManager) setNewRTT(rtt float64) float64 {
+ m.mutex.Lock()
+ defer m.mutex.Unlock()
+
+ if m.noUpdate {
+ return m.srtt
+ }
+
+ if m.srtt == 0 {
+ // First measurement
+ m.srtt = rtt
+ m.rttvar = rtt / 2
+ } else {
+ // Subsequent rtt measurement
+ m.rttvar = (1-rtoBeta)*m.rttvar + rtoBeta*(math.Abs(m.srtt-rtt))
+ m.srtt = (1-rtoAlpha)*m.srtt + rtoAlpha*rtt
+ }
+ m.rto = math.Min(math.Max(m.srtt+4*m.rttvar, rtoMin), rtoMax)
+ return m.srtt
+}
+
+// getRTO simply returns the current RTO in msec.
+func (m *rtoManager) getRTO() float64 {
+ m.mutex.RLock()
+ defer m.mutex.RUnlock()
+
+ return m.rto
+}
+
+// reset resets the RTO variables to the initial values.
+func (m *rtoManager) reset() {
+ m.mutex.Lock()
+ defer m.mutex.Unlock()
+
+ if m.noUpdate {
+ return
+ }
+
+ m.srtt = 0
+ m.rttvar = 0
+ m.rto = rtoInitial
+}
+
+// set RTO value for testing
+func (m *rtoManager) setRTO(rto float64, noUpdate bool) {
+ m.mutex.Lock()
+ defer m.mutex.Unlock()
+
+ m.rto = rto
+ m.noUpdate = noUpdate
+}
+
+// rtxTimerObserver is the inteface to a timer observer.
+// NOTE: Observers MUST NOT call start() or stop() method on rtxTimer
+// from within these callbacks.
+type rtxTimerObserver interface {
+ onRetransmissionTimeout(timerID int, n uint)
+ onRetransmissionFailure(timerID int)
+}
+
+// rtxTimer provides the retnransmission timer conforms with RFC 4960 Sec 6.3.1
+type rtxTimer struct {
+ id int
+ observer rtxTimerObserver
+ maxRetrans uint
+ stopFunc stopTimerLoop
+ closed bool
+ mutex sync.RWMutex
+}
+
+type stopTimerLoop func()
+
+// newRTXTimer creates a new retransmission timer.
+// if maxRetrans is set to 0, it will keep retransmitting until stop() is called.
+// (it will never make onRetransmissionFailure() callback.
+func newRTXTimer(id int, observer rtxTimerObserver, maxRetrans uint) *rtxTimer {
+ return &rtxTimer{
+ id: id,
+ observer: observer,
+ maxRetrans: maxRetrans,
+ }
+}
+
+// start starts the timer.
+func (t *rtxTimer) start(rto float64) bool {
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
+
+ // this timer is already closed
+ if t.closed {
+ return false
+ }
+
+ // this is a noop if the timer is always running
+ if t.stopFunc != nil {
+ return false
+ }
+
+ // Note: rto value is intentionally not capped by RTO.Min to allow
+ // fast timeout for the tests. Non-test code should pass in the
+ // rto generated by rtoManager getRTO() method which caps the
+ // value at RTO.Min or at RTO.Max.
+ var nRtos uint
+
+ cancelCh := make(chan struct{})
+
+ go func() {
+ canceling := false
+
+ for !canceling {
+ timeout := calculateNextTimeout(rto, nRtos)
+ timer := time.NewTimer(time.Duration(timeout) * time.Millisecond)
+
+ select {
+ case <-timer.C:
+ nRtos++
+ if t.maxRetrans == 0 || nRtos <= t.maxRetrans {
+ t.observer.onRetransmissionTimeout(t.id, nRtos)
+ } else {
+ t.stop()
+ t.observer.onRetransmissionFailure(t.id)
+ }
+ case <-cancelCh:
+ canceling = true
+ timer.Stop()
+ }
+ }
+ }()
+
+ t.stopFunc = func() {
+ close(cancelCh)
+ }
+
+ return true
+}
+
+// stop stops the timer.
+func (t *rtxTimer) stop() {
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
+
+ if t.stopFunc != nil {
+ t.stopFunc()
+ t.stopFunc = nil
+ }
+}
+
+// closes the timer. this is similar to stop() but subsequent start() call
+// will fail (the timer is no longer usable)
+func (t *rtxTimer) close() {
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
+
+ if t.stopFunc != nil {
+ t.stopFunc()
+ t.stopFunc = nil
+ }
+
+ t.closed = true
+}
+
+// isRunning tests if the timer is running.
+// Debug purpose only
+func (t *rtxTimer) isRunning() bool {
+ t.mutex.RLock()
+ defer t.mutex.RUnlock()
+
+ return (t.stopFunc != nil)
+}
+
+func calculateNextTimeout(rto float64, nRtos uint) float64 {
+ // RFC 4096 sec 6.3.3. Handle T3-rtx Expiration
+ // E2) For the destination address for which the timer expires, set RTO
+ // <- RTO * 2 ("back off the timer"). The maximum value discussed
+ // in rule C7 above (RTO.max) may be used to provide an upper bound
+ // to this doubling operation.
+ if nRtos < 31 {
+ m := 1 << nRtos
+ return math.Min(rto*float64(m), rtoMax)
+ }
+ return rtoMax
+}
diff --git a/vendor/github.com/pion/sctp/sctp.go b/vendor/github.com/pion/sctp/sctp.go
new file mode 100644
index 0000000..e601342
--- /dev/null
+++ b/vendor/github.com/pion/sctp/sctp.go
@@ -0,0 +1,2 @@
+// Package sctp implements the SCTP spec
+package sctp
diff --git a/vendor/github.com/pion/sctp/stream.go b/vendor/github.com/pion/sctp/stream.go
new file mode 100644
index 0000000..8a17b97
--- /dev/null
+++ b/vendor/github.com/pion/sctp/stream.go
@@ -0,0 +1,357 @@
+package sctp
+
+import (
+ "io"
+ "math"
+ "sync"
+
+ "github.com/pion/logging"
+ "github.com/pkg/errors"
+)
+
+const (
+ // ReliabilityTypeReliable is used for reliable transmission
+ ReliabilityTypeReliable byte = 0
+ // ReliabilityTypeRexmit is used for partial reliability by retransmission count
+ ReliabilityTypeRexmit byte = 1
+ // ReliabilityTypeTimed is used for partial reliability by retransmission duration
+ ReliabilityTypeTimed byte = 2
+)
+
+// Stream represents an SCTP stream
+type Stream struct {
+ association *Association
+ lock sync.RWMutex
+ streamIdentifier uint16
+ defaultPayloadType PayloadProtocolIdentifier
+ reassemblyQueue *reassemblyQueue
+ sequenceNumber uint16
+ readNotifier *sync.Cond
+ readErr error
+ writeErr error
+ unordered bool
+ reliabilityType byte
+ reliabilityValue uint32
+ bufferedAmount uint64
+ bufferedAmountLow uint64
+ onBufferedAmountLow func()
+ log logging.LeveledLogger
+ name string
+}
+
+// StreamIdentifier returns the Stream identifier associated to the stream.
+func (s *Stream) StreamIdentifier() uint16 {
+ s.lock.RLock()
+ defer s.lock.RUnlock()
+ return s.streamIdentifier
+}
+
+// SetDefaultPayloadType sets the default payload type used by Write.
+func (s *Stream) SetDefaultPayloadType(defaultPayloadType PayloadProtocolIdentifier) {
+ s.lock.Lock()
+ defer s.lock.Unlock()
+
+ s.setDefaultPayloadType(defaultPayloadType)
+}
+
+// setDefaultPayloadType sets the defaultPayloadType. The caller should hold the lock.
+func (s *Stream) setDefaultPayloadType(defaultPayloadType PayloadProtocolIdentifier) {
+ s.defaultPayloadType = defaultPayloadType
+}
+
+// SetReliabilityParams sets reliability parameters for this stream.
+func (s *Stream) SetReliabilityParams(unordered bool, relType byte, relVal uint32) {
+ s.lock.Lock()
+ defer s.lock.Unlock()
+
+ s.setReliabilityParams(unordered, relType, relVal)
+}
+
+// setReliabilityParams sets reliability parameters for this stream.
+// The caller should hold the lock.
+func (s *Stream) setReliabilityParams(unordered bool, relType byte, relVal uint32) {
+ s.log.Debugf("[%s] reliability params: ordered=%v type=%d value=%d",
+ s.name, !unordered, relType, relVal)
+ s.unordered = unordered
+ s.reliabilityType = relType
+ s.reliabilityValue = relVal
+}
+
+// Read reads a packet of len(p) bytes, dropping the Payload Protocol Identifier.
+// Returns EOF when the stream is reset or an error if the stream is closed
+// otherwise.
+func (s *Stream) Read(p []byte) (int, error) {
+ n, _, err := s.ReadSCTP(p)
+ return n, err
+}
+
+// ReadSCTP reads a packet of len(p) bytes and returns the associated Payload
+// Protocol Identifier.
+// Returns EOF when the stream is reset or an error if the stream is closed
+// otherwise.
+func (s *Stream) ReadSCTP(p []byte) (int, PayloadProtocolIdentifier, error) {
+ s.lock.Lock()
+ defer s.lock.Unlock()
+
+ for {
+ n, ppi, err := s.reassemblyQueue.read(p)
+ if err == nil {
+ return n, ppi, nil
+ } else if errors.Is(err, io.ErrShortBuffer) {
+ return 0, PayloadProtocolIdentifier(0), err
+ }
+
+ err = s.readErr
+ if err != nil {
+ return 0, PayloadProtocolIdentifier(0), err
+ }
+
+ s.readNotifier.Wait()
+ }
+}
+
+func (s *Stream) handleData(pd *chunkPayloadData) {
+ s.lock.Lock()
+ defer s.lock.Unlock()
+
+ var readable bool
+ if s.reassemblyQueue.push(pd) {
+ readable = s.reassemblyQueue.isReadable()
+ s.log.Debugf("[%s] reassemblyQueue readable=%v", s.name, readable)
+ if readable {
+ s.log.Debugf("[%s] readNotifier.signal()", s.name)
+ s.readNotifier.Signal()
+ s.log.Debugf("[%s] readNotifier.signal() done", s.name)
+ }
+ }
+}
+
+func (s *Stream) handleForwardTSNForOrdered(ssn uint16) {
+ var readable bool
+
+ func() {
+ s.lock.Lock()
+ defer s.lock.Unlock()
+
+ if s.unordered {
+ return // unordered chunks are handled by handleForwardUnordered method
+ }
+
+ // Remove all chunks older than or equal to the new TSN from
+ // the reassemblyQueue.
+ s.reassemblyQueue.forwardTSNForOrdered(ssn)
+ readable = s.reassemblyQueue.isReadable()
+ }()
+
+ // Notify the reader asynchronously if there's a data chunk to read.
+ if readable {
+ s.readNotifier.Signal()
+ }
+}
+
+func (s *Stream) handleForwardTSNForUnordered(newCumulativeTSN uint32) {
+ var readable bool
+
+ func() {
+ s.lock.Lock()
+ defer s.lock.Unlock()
+
+ if !s.unordered {
+ return // ordered chunks are handled by handleForwardTSNOrdered method
+ }
+
+ // Remove all chunks older than or equal to the new TSN from
+ // the reassemblyQueue.
+ s.reassemblyQueue.forwardTSNForUnordered(newCumulativeTSN)
+ readable = s.reassemblyQueue.isReadable()
+ }()
+
+ // Notify the reader asynchronously if there's a data chunk to read.
+ if readable {
+ s.readNotifier.Signal()
+ }
+}
+
+// Write writes len(p) bytes from p with the default Payload Protocol Identifier
+func (s *Stream) Write(p []byte) (n int, err error) {
+ return s.WriteSCTP(p, s.defaultPayloadType)
+}
+
+// WriteSCTP writes len(p) bytes from p to the DTLS connection
+func (s *Stream) WriteSCTP(p []byte, ppi PayloadProtocolIdentifier) (n int, err error) {
+ maxMessageSize := s.association.MaxMessageSize()
+ if len(p) > int(maxMessageSize) {
+ return 0, errors.Errorf("Outbound packet larger than maximum message size %v", math.MaxUint16)
+ }
+
+ s.lock.RLock()
+ err = s.writeErr
+ s.lock.RUnlock()
+ if err != nil {
+ return 0, err
+ }
+
+ chunks := s.packetize(p, ppi)
+
+ return len(p), s.association.sendPayloadData(chunks)
+}
+
+func (s *Stream) packetize(raw []byte, ppi PayloadProtocolIdentifier) []*chunkPayloadData {
+ s.lock.Lock()
+ defer s.lock.Unlock()
+
+ i := uint32(0)
+ remaining := uint32(len(raw))
+
+ // From draft-ietf-rtcweb-data-protocol-09, section 6:
+ // All Data Channel Establishment Protocol messages MUST be sent using
+ // ordered delivery and reliable transmission.
+ unordered := ppi != PayloadTypeWebRTCDCEP && s.unordered
+
+ var chunks []*chunkPayloadData
+ var head *chunkPayloadData
+ for remaining != 0 {
+ fragmentSize := min32(s.association.maxPayloadSize, remaining)
+
+ // Copy the userdata since we'll have to store it until acked
+ // and the caller may re-use the buffer in the mean time
+ userData := make([]byte, fragmentSize)
+ copy(userData, raw[i:i+fragmentSize])
+
+ chunk := &chunkPayloadData{
+ streamIdentifier: s.streamIdentifier,
+ userData: userData,
+ unordered: unordered,
+ beginningFragment: i == 0,
+ endingFragment: remaining-fragmentSize == 0,
+ immediateSack: false,
+ payloadType: ppi,
+ streamSequenceNumber: s.sequenceNumber,
+ head: head,
+ }
+
+ if head == nil {
+ head = chunk
+ }
+
+ chunks = append(chunks, chunk)
+
+ remaining -= fragmentSize
+ i += fragmentSize
+ }
+
+ // RFC 4960 Sec 6.6
+ // Note: When transmitting ordered and unordered data, an endpoint does
+ // not increment its Stream Sequence Number when transmitting a DATA
+ // chunk with U flag set to 1.
+ if !unordered {
+ s.sequenceNumber++
+ }
+
+ s.bufferedAmount += uint64(len(raw))
+ s.log.Tracef("[%s] bufferedAmount = %d", s.name, s.bufferedAmount)
+
+ return chunks
+}
+
+// Close closes the write-direction of the stream.
+// Future calls to Write are not permitted after calling Close.
+func (s *Stream) Close() error {
+ if sid, isOpen := func() (uint16, bool) {
+ s.lock.Lock()
+ defer s.lock.Unlock()
+
+ isOpen := true
+ if s.writeErr == nil {
+ s.writeErr = errors.New("Stream closed")
+ } else {
+ isOpen = false
+ }
+
+ if s.readErr == nil {
+ s.readErr = io.EOF
+ } else {
+ isOpen = false
+ }
+ s.readNotifier.Broadcast() // broadcast regardless
+
+ return s.streamIdentifier, isOpen
+ }(); isOpen {
+ // Reset the outgoing stream
+ // https://tools.ietf.org/html/rfc6525
+ return s.association.sendResetRequest(sid)
+ }
+
+ return nil
+}
+
+// BufferedAmount returns the number of bytes of data currently queued to be sent over this stream.
+func (s *Stream) BufferedAmount() uint64 {
+ s.lock.RLock()
+ defer s.lock.RUnlock()
+
+ return s.bufferedAmount
+}
+
+// BufferedAmountLowThreshold returns the number of bytes of buffered outgoing data that is
+// considered "low." Defaults to 0.
+func (s *Stream) BufferedAmountLowThreshold() uint64 {
+ s.lock.RLock()
+ defer s.lock.RUnlock()
+
+ return s.bufferedAmountLow
+}
+
+// SetBufferedAmountLowThreshold is used to update the threshold.
+// See BufferedAmountLowThreshold().
+func (s *Stream) SetBufferedAmountLowThreshold(th uint64) {
+ s.lock.Lock()
+ defer s.lock.Unlock()
+
+ s.bufferedAmountLow = th
+}
+
+// OnBufferedAmountLow sets the callback handler which would be called when the number of
+// bytes of outgoing data buffered is lower than the threshold.
+func (s *Stream) OnBufferedAmountLow(f func()) {
+ s.lock.Lock()
+ defer s.lock.Unlock()
+
+ s.onBufferedAmountLow = f
+}
+
+// This method is called by association's readLoop (go-)routine to notify this stream
+// of the specified amount of outgoing data has been delivered to the peer.
+func (s *Stream) onBufferReleased(nBytesReleased int) {
+ if nBytesReleased <= 0 {
+ return
+ }
+
+ s.lock.Lock()
+
+ fromAmount := s.bufferedAmount
+
+ if s.bufferedAmount < uint64(nBytesReleased) {
+ s.bufferedAmount = 0
+ s.log.Errorf("[%s] released buffer size %d should be <= %d",
+ s.name, nBytesReleased, s.bufferedAmount)
+ } else {
+ s.bufferedAmount -= uint64(nBytesReleased)
+ }
+
+ s.log.Tracef("[%s] bufferedAmount = %d", s.name, s.bufferedAmount)
+
+ if s.onBufferedAmountLow != nil && fromAmount > s.bufferedAmountLow && s.bufferedAmount <= s.bufferedAmountLow {
+ f := s.onBufferedAmountLow
+ s.lock.Unlock()
+ f()
+ return
+ }
+
+ s.lock.Unlock()
+}
+
+func (s *Stream) getNumBytesInReassemblyQueue() int {
+ // No lock is required as it reads the size with atomic load function.
+ return s.reassemblyQueue.getNumBytes()
+}
diff --git a/vendor/github.com/pion/sctp/util.go b/vendor/github.com/pion/sctp/util.go
new file mode 100644
index 0000000..e2e54ab
--- /dev/null
+++ b/vendor/github.com/pion/sctp/util.go
@@ -0,0 +1,58 @@
+package sctp
+
+const (
+ paddingMultiple = 4
+)
+
+func getPadding(len int) int {
+ return (paddingMultiple - (len % paddingMultiple)) % paddingMultiple
+}
+
+func padByte(in []byte, cnt int) []byte {
+ if cnt < 0 {
+ cnt = 0
+ }
+ padding := make([]byte, cnt)
+ return append(in, padding...)
+}
+
+// Serial Number Arithmetic (RFC 1982)
+func sna32LT(i1, i2 uint32) bool {
+ return (i1 < i2 && i2-i1 < 1<<31) || (i1 > i2 && i1-i2 > 1<<31)
+}
+
+func sna32LTE(i1, i2 uint32) bool {
+ return i1 == i2 || sna32LT(i1, i2)
+}
+
+func sna32GT(i1, i2 uint32) bool {
+ return (i1 < i2 && (i2-i1) >= 1<<31) || (i1 > i2 && (i1-i2) <= 1<<31)
+}
+
+func sna32GTE(i1, i2 uint32) bool {
+ return i1 == i2 || sna32GT(i1, i2)
+}
+
+func sna32EQ(i1, i2 uint32) bool {
+ return i1 == i2
+}
+
+func sna16LT(i1, i2 uint16) bool {
+ return (i1 < i2 && (i2-i1) < 1<<15) || (i1 > i2 && (i1-i2) > 1<<15)
+}
+
+func sna16LTE(i1, i2 uint16) bool {
+ return i1 == i2 || sna16LT(i1, i2)
+}
+
+func sna16GT(i1, i2 uint16) bool {
+ return (i1 < i2 && (i2-i1) >= 1<<15) || (i1 > i2 && (i1-i2) <= 1<<15)
+}
+
+func sna16GTE(i1, i2 uint16) bool {
+ return i1 == i2 || sna16GT(i1, i2)
+}
+
+func sna16EQ(i1, i2 uint16) bool {
+ return i1 == i2
+}
diff --git a/vendor/github.com/pion/sdp/v3/.gitignore b/vendor/github.com/pion/sdp/v3/.gitignore
new file mode 100644
index 0000000..83db74b
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/.gitignore
@@ -0,0 +1,24 @@
+### JetBrains IDE ###
+#####################
+.idea/
+
+### Emacs Temporary Files ###
+#############################
+*~
+
+### Folders ###
+###############
+bin/
+vendor/
+node_modules/
+
+### Files ###
+#############
+*.ivf
+*.ogg
+tags
+cover.out
+*.sw[poe]
+*.wasm
+examples/sfu-ws/cert.pem
+examples/sfu-ws/key.pem
diff --git a/vendor/github.com/pion/sdp/v3/.golangci.yml b/vendor/github.com/pion/sdp/v3/.golangci.yml
new file mode 100644
index 0000000..d6162c9
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/.golangci.yml
@@ -0,0 +1,89 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+ exhaustive:
+ default-signifies-exhaustive: true
+ gomodguard:
+ blocked:
+ modules:
+ - github.com/pkg/errors:
+ recommendations:
+ - errors
+
+linters:
+ enable:
+ - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
+ - bodyclose # checks whether HTTP response body is closed successfully
+ - deadcode # Finds unused code
+ - depguard # Go linter that checks if package imports are in a list of acceptable packages
+ - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
+ - dupl # Tool for code clone detection
+ - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
+ - exhaustive # check exhaustiveness of enum switch statements
+ - exportloopref # checks for pointers to enclosing loop variables
+ - gci # Gci control golang package import order and make it always deterministic.
+ - gochecknoglobals # Checks that no globals are present in Go code
+ - gochecknoinits # Checks that no init functions are present in Go code
+ - gocognit # Computes and checks the cognitive complexity of functions
+ - goconst # Finds repeated strings that could be replaced by a constant
+ - gocritic # The most opinionated Go source code linter
+ - godox # Tool for detection of FIXME, TODO and other comment keywords
+ - goerr113 # Golang linter to check the errors handling expressions
+ - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
+ - gofumpt # Gofumpt checks whether code was gofumpt-ed.
+ - goheader # Checks is file header matches to pattern
+ - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
+ - golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
+ - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.
+ - goprintffuncname # Checks that printf-like functions are named with `f` at the end
+ - gosec # Inspects source code for security problems
+ - gosimple # Linter for Go source code that specializes in simplifying a code
+ - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
+ - ineffassign # Detects when assignments to existing variables are not used
+ - misspell # Finds commonly misspelled English words in comments
+ - nakedret # Finds naked returns in functions greater than a specified function length
+ - noctx # noctx finds sending http request without context.Context
+ - scopelint # Scopelint checks for unpinned variables in go programs
+ - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
+ - structcheck # Finds unused struct fields
+ - stylecheck # Stylecheck is a replacement for golint
+ - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
+ - unconvert # Remove unnecessary type conversions
+ - unparam # Reports unused function parameters
+ - unused # Checks Go code for unused constants, variables, functions and types
+ - varcheck # Finds unused global variables and constants
+ - whitespace # Tool for detection of leading and trailing whitespace
+ disable:
+ - funlen # Tool for detection of long functions
+ - gocyclo # Computes and checks the cyclomatic complexity of functions
+ - godot # Check if comments end in a period
+ - gomnd # An analyzer to detect magic numbers.
+ - lll # Reports long lines
+ - maligned # Tool to detect Go structs that would take less memory if their fields were sorted
+ - nestif # Reports deeply nested if statements
+ - nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
+ - nolintlint # Reports ill-formed or insufficient nolint directives
+ - prealloc # Finds slice declarations that could potentially be preallocated
+ - rowserrcheck # checks whether Err of rows is checked successfully
+ - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
+ - testpackage # linter that makes you use a separate _test package
+ - wsl # Whitespace Linter - Forces you to use empty lines!
+
+issues:
+ exclude-use-default: false
+ exclude-rules:
+ # Allow complex tests, better to be self contained
+ - path: _test\.go
+ linters:
+ - gocognit
+
+ # Allow complex main function in examples
+ - path: examples
+ text: "of func `main` is high"
+ linters:
+ - gocognit
+
+run:
+ skip-dirs-use-default: false
diff --git a/vendor/github.com/pion/sdp/v3/LICENSE b/vendor/github.com/pion/sdp/v3/LICENSE
new file mode 100644
index 0000000..ab60297
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/sdp/v3/README.md b/vendor/github.com/pion/sdp/v3/README.md
new file mode 100644
index 0000000..e7d7ff6
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/README.md
@@ -0,0 +1,59 @@
+<h1 align="center">
+ <br>
+ Pion SDP
+ <br>
+</h1>
+<h4 align="center">A Go implementation of the SDP</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-sdp-gray.svg?longCache=true&colorB=brightgreen" alt="Pion SDP"></a>
+ <a href="https://sourcegraph.com/github.com/pion/sdp?badge"><img src="https://sourcegraph.com/github.com/pion/sdp/-/badge.svg" alt="Sourcegraph Widget"></a>
+ <a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/sdp"><img src="https://travis-ci.org/pion/sdp.svg?branch=master" alt="Build Status"></a>
+ <a href="https://pkg.go.dev/github.com/pion/sdp/v2"><img src="https://godoc.org/github.com/pion/sdp?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/sdp"><img src="https://codecov.io/gh/pion/sdp/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/sdp"><img src="https://goreportcard.com/badge/github.com/pion/sdp" alt="Go Report Card"></a>
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+See [DESIGN.md](DESIGN.md) for an overview of features and future goals.
+
+### Roadmap
+The library is used as a part of our WebRTC implementation. Please refer to that [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
+
+### Community
+Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [John Bradley](https://github.com/kc5nra) - *Original Author*
+* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
+* [Michiel De Backker](https://github.com/backkem) - *Public API, Initialization*
+* [Konstantin Itskov](https://github.com/trivigy) - *Fix documentation*
+* [chenkaiC4](https://github.com/chenkaiC4) - *Fix GolangCI Linter*
+* [Woodrow Douglass](https://github.com/wdouglass) *RTCP, RTP improvements, G.722 support, Bugfixes*
+* [Michael MacDonald](https://github.com/mjmac)
+* [Max Hawkins](https://github.com/maxhawkins)
+* [mchlrhw](https://github.com/mchlrhw)
+* [Hugo Arregui](https://github.com/hugoArregui)
+* [Guilherme Souza](https://github.com/gqgs)
+* [adwpc](https://github.com/adwpc) - *extmap add transport-cc*
+* [Atsushi Watanabe](https://github.com/at-wat)
+* [Luke S](https://github.com/encounter)
+* [Jerko Steiner](https://github.com/jeremija)
+* [Roman Romanenko](https://github.com/r-novel)
+* [Jason Brady](https://github.com/jbrady42)
+* [Kory Miller](https://github.com/jbrady42/korymiller1489)
+* [ZHENK](https://github.com/scorpionknifes)
+* [Tarrence van As](https://github.com/tarrencev)
+* [Maxim Oransky](https://github.com/sdfsdhgjkbmnmxc)
+* [Graham King](https://github.com/grahamking/)
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/sdp/v3/base_lexer.go b/vendor/github.com/pion/sdp/v3/base_lexer.go
new file mode 100644
index 0000000..45fe799
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/base_lexer.go
@@ -0,0 +1,231 @@
+package sdp
+
+import (
+ "errors"
+ "fmt"
+ "io"
+)
+
+var errDocumentStart = errors.New("already on document start")
+
+type syntaxError struct {
+ s string
+ i int
+}
+
+func (e syntaxError) Error() string {
+ if e.i < 0 {
+ e.i = 0
+ }
+ head, middle, tail := e.s[:e.i], e.s[e.i:e.i+1], e.s[e.i+1:]
+ return fmt.Sprintf("%s --> %s <-- %s", head, middle, tail)
+}
+
+type baseLexer struct {
+ value []byte
+ pos int
+}
+
+func (l baseLexer) syntaxError() error {
+ return syntaxError{s: string(l.value), i: l.pos - 1}
+}
+
+func (l *baseLexer) unreadByte() error {
+ if l.pos <= 0 {
+ return errDocumentStart
+ }
+ l.pos--
+ return nil
+}
+
+func (l *baseLexer) readByte() (byte, error) {
+ if l.pos >= len(l.value) {
+ return byte(0), io.EOF
+ }
+ ch := l.value[l.pos]
+ l.pos++
+ return ch, nil
+}
+
+func (l *baseLexer) nextLine() error {
+ for {
+ ch, err := l.readByte()
+ if err == io.EOF {
+ return nil
+ } else if err != nil {
+ return err
+ }
+ if !isNewline(ch) {
+ return l.unreadByte()
+ }
+ }
+}
+
+func (l *baseLexer) readWhitespace() error {
+ for {
+ ch, err := l.readByte()
+ if err == io.EOF {
+ return nil
+ } else if err != nil {
+ return err
+ }
+ if !isWhitespace(ch) {
+ return l.unreadByte()
+ }
+ }
+}
+
+func (l *baseLexer) readUint64Field() (i uint64, err error) {
+ for {
+ ch, err := l.readByte()
+ if err == io.EOF && i > 0 {
+ break
+ } else if err != nil {
+ return i, err
+ }
+
+ if isNewline(ch) {
+ if err := l.unreadByte(); err != nil {
+ return i, err
+ }
+ break
+ }
+
+ if isWhitespace(ch) {
+ if err := l.readWhitespace(); err != nil {
+ return i, err
+ }
+ break
+ }
+
+ switch ch {
+ case '0':
+ i *= 10
+ case '1':
+ i = i*10 + 1
+ case '2':
+ i = i*10 + 2
+ case '3':
+ i = i*10 + 3
+ case '4':
+ i = i*10 + 4
+ case '5':
+ i = i*10 + 5
+ case '6':
+ i = i*10 + 6
+ case '7':
+ i = i*10 + 7
+ case '8':
+ i = i*10 + 8
+ case '9':
+ i = i*10 + 9
+ default:
+ return i, l.syntaxError()
+ }
+ }
+
+ return i, nil
+}
+
+// Returns next field on this line or empty string if no more fields on line
+func (l *baseLexer) readField() (string, error) {
+ start := l.pos
+ stop := start
+ for {
+ stop = l.pos
+ ch, err := l.readByte()
+ if err == io.EOF && stop > start {
+ break
+ } else if err != nil {
+ return "", err
+ }
+
+ if isNewline(ch) {
+ if err := l.unreadByte(); err != nil {
+ return "", err
+ }
+ break
+ }
+
+ if isWhitespace(ch) {
+ if err := l.readWhitespace(); err != nil {
+ return "", err
+ }
+ break
+ }
+ }
+ return string(l.value[start:stop]), nil
+}
+
+// Returns symbols until line end
+func (l *baseLexer) readLine() (string, error) {
+ start := l.pos
+ trim := 1
+ for {
+ ch, err := l.readByte()
+ if err != nil {
+ return "", err
+ }
+ if ch == '\r' {
+ trim++
+ }
+ if ch == '\n' {
+ return string(l.value[start : l.pos-trim]), nil
+ }
+ }
+}
+
+func (l *baseLexer) readString(until byte) (string, error) {
+ start := l.pos
+ for {
+ ch, err := l.readByte()
+ if err != nil {
+ return "", err
+ }
+ if ch == until {
+ return string(l.value[start:l.pos]), nil
+ }
+ }
+}
+
+func (l *baseLexer) readType() (string, error) {
+ for {
+ b, err := l.readByte()
+ if err != nil {
+ return "", err
+ }
+
+ if isNewline(b) {
+ continue
+ }
+
+ err = l.unreadByte()
+ if err != nil {
+ return "", err
+ }
+
+ key, err := l.readString('=')
+ if err != nil {
+ return key, err
+ }
+
+ if len(key) == 2 {
+ return key, nil
+ }
+
+ return key, l.syntaxError()
+ }
+}
+
+func isNewline(ch byte) bool { return ch == '\n' || ch == '\r' }
+
+func isWhitespace(ch byte) bool { return ch == ' ' || ch == '\t' }
+
+func anyOf(element string, data ...string) bool {
+ for _, v := range data {
+ if element == v {
+ return true
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/pion/sdp/v3/codecov.yml b/vendor/github.com/pion/sdp/v3/codecov.yml
new file mode 100644
index 0000000..085200a
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/codecov.yml
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+
+coverage:
+ status:
+ project:
+ default:
+ # Allow decreasing 2% of total coverage to avoid noise.
+ threshold: 2%
+ patch:
+ default:
+ target: 70%
+ only_pulls: true
+
+ignore:
+ - "examples/*"
+ - "examples/**/*"
diff --git a/vendor/github.com/pion/sdp/v3/common_description.go b/vendor/github.com/pion/sdp/v3/common_description.go
new file mode 100644
index 0000000..1174be4
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/common_description.go
@@ -0,0 +1,110 @@
+package sdp
+
+import (
+ "strconv"
+ "strings"
+)
+
+// Information describes the "i=" field which provides textual information
+// about the session.
+type Information string
+
+func (i Information) String() string {
+ return string(i)
+}
+
+// ConnectionInformation defines the representation for the "c=" field
+// containing connection data.
+type ConnectionInformation struct {
+ NetworkType string
+ AddressType string
+ Address *Address
+}
+
+func (c ConnectionInformation) String() string {
+ parts := []string{c.NetworkType, c.AddressType}
+ if c.Address != nil && c.Address.String() != "" {
+ parts = append(parts, c.Address.String())
+ }
+ return strings.Join(parts, " ")
+}
+
+// Address desribes a structured address token from within the "c=" field.
+type Address struct {
+ Address string
+ TTL *int
+ Range *int
+}
+
+func (c *Address) String() string {
+ var parts []string
+ parts = append(parts, c.Address)
+ if c.TTL != nil {
+ parts = append(parts, strconv.Itoa(*c.TTL))
+ }
+
+ if c.Range != nil {
+ parts = append(parts, strconv.Itoa(*c.Range))
+ }
+
+ return strings.Join(parts, "/")
+}
+
+// Bandwidth describes an optional field which denotes the proposed bandwidth
+// to be used by the session or media.
+type Bandwidth struct {
+ Experimental bool
+ Type string
+ Bandwidth uint64
+}
+
+func (b Bandwidth) String() string {
+ var output string
+ if b.Experimental {
+ output += "X-"
+ }
+ output += b.Type + ":" + strconv.FormatUint(b.Bandwidth, 10)
+ return output
+}
+
+// EncryptionKey describes the "k=" which conveys encryption key information.
+type EncryptionKey string
+
+func (s EncryptionKey) String() string {
+ return string(s)
+}
+
+// Attribute describes the "a=" field which represents the primary means for
+// extending SDP.
+type Attribute struct {
+ Key string
+ Value string
+}
+
+// NewPropertyAttribute constructs a new attribute
+func NewPropertyAttribute(key string) Attribute {
+ return Attribute{
+ Key: key,
+ }
+}
+
+// NewAttribute constructs a new attribute
+func NewAttribute(key, value string) Attribute {
+ return Attribute{
+ Key: key,
+ Value: value,
+ }
+}
+
+func (a Attribute) String() string {
+ output := a.Key
+ if len(a.Value) > 0 {
+ output += ":" + a.Value
+ }
+ return output
+}
+
+// IsICECandidate returns true if the attribute key equals "candidate".
+func (a Attribute) IsICECandidate() bool {
+ return a.Key == "candidate"
+}
diff --git a/vendor/github.com/pion/sdp/v3/direction.go b/vendor/github.com/pion/sdp/v3/direction.go
new file mode 100644
index 0000000..19ea92d
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/direction.go
@@ -0,0 +1,59 @@
+package sdp
+
+import "errors"
+
+// Direction is a marker for transmission directon of an endpoint
+type Direction int
+
+const (
+ // DirectionSendRecv is for bidirectional communication
+ DirectionSendRecv Direction = iota + 1
+ // DirectionSendOnly is for outgoing communication
+ DirectionSendOnly
+ // DirectionRecvOnly is for incoming communication
+ DirectionRecvOnly
+ // DirectionInactive is for no communication
+ DirectionInactive
+)
+
+const (
+ directionSendRecvStr = "sendrecv"
+ directionSendOnlyStr = "sendonly"
+ directionRecvOnlyStr = "recvonly"
+ directionInactiveStr = "inactive"
+ directionUnknownStr = ""
+)
+
+var errDirectionString = errors.New("invalid direction string")
+
+// NewDirection defines a procedure for creating a new direction from a raw
+// string.
+func NewDirection(raw string) (Direction, error) {
+ switch raw {
+ case directionSendRecvStr:
+ return DirectionSendRecv, nil
+ case directionSendOnlyStr:
+ return DirectionSendOnly, nil
+ case directionRecvOnlyStr:
+ return DirectionRecvOnly, nil
+ case directionInactiveStr:
+ return DirectionInactive, nil
+ default:
+ return Direction(unknown), errDirectionString
+ }
+}
+
+func (t Direction) String() string {
+ switch t {
+ case DirectionSendRecv:
+ return directionSendRecvStr
+ case DirectionSendOnly:
+ return directionSendOnlyStr
+ case DirectionRecvOnly:
+ return directionRecvOnlyStr
+ case DirectionInactive:
+ return directionInactiveStr
+ default:
+ return directionUnknownStr
+ }
+}
diff --git a/vendor/github.com/pion/sdp/v3/extmap.go b/vendor/github.com/pion/sdp/v3/extmap.go
new file mode 100644
index 0000000..1242a8c
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/extmap.go
@@ -0,0 +1,108 @@
+package sdp
+
+import (
+ "fmt"
+ "net/url"
+ "strconv"
+ "strings"
+)
+
+// Default ext values
+const (
+ DefExtMapValueABSSendTime = 1
+ DefExtMapValueTransportCC = 2
+ DefExtMapValueSDESMid = 3
+ DefExtMapValueSDESRTPStreamID = 4
+
+ ABSSendTimeURI = "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"
+ TransportCCURI = "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01"
+ SDESMidURI = "urn:ietf:params:rtp-hdrext:sdes:mid"
+ SDESRTPStreamIDURI = "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id"
+ AudioLevelURI = "urn:ietf:params:rtp-hdrext:ssrc-audio-level"
+)
+
+// ExtMap represents the activation of a single RTP header extension
+type ExtMap struct {
+ Value int
+ Direction Direction
+ URI *url.URL
+ ExtAttr *string
+}
+
+// Clone converts this object to an Attribute
+func (e *ExtMap) Clone() Attribute {
+ return Attribute{Key: "extmap", Value: e.string()}
+}
+
+// Unmarshal creates an Extmap from a string
+func (e *ExtMap) Unmarshal(raw string) error {
+ parts := strings.SplitN(raw, ":", 2)
+ if len(parts) != 2 {
+ return fmt.Errorf("%w: %v", errSyntaxError, raw)
+ }
+
+ fields := strings.Fields(parts[1])
+ if len(fields) < 2 {
+ return fmt.Errorf("%w: %v", errSyntaxError, raw)
+ }
+
+ valdir := strings.Split(fields[0], "/")
+ value, err := strconv.ParseInt(valdir[0], 10, 64)
+ if (value < 1) || (value > 246) {
+ return fmt.Errorf("%w: %v -- extmap key must be in the range 1-256", errSyntaxError, valdir[0])
+ }
+ if err != nil {
+ return fmt.Errorf("%w: %v", errSyntaxError, valdir[0])
+ }
+
+ var direction Direction
+ if len(valdir) == 2 {
+ direction, err = NewDirection(valdir[1])
+ if err != nil {
+ return err
+ }
+ }
+
+ uri, err := url.Parse(fields[1])
+ if err != nil {
+ return err
+ }
+
+ if len(fields) == 3 {
+ tmp := fields[2]
+ e.ExtAttr = &tmp
+ }
+
+ e.Value = int(value)
+ e.Direction = direction
+ e.URI = uri
+ return nil
+}
+
+// Marshal creates a string from an ExtMap
+func (e *ExtMap) Marshal() string {
+ return e.Name() + ":" + e.string()
+}
+
+func (e *ExtMap) string() string {
+ output := fmt.Sprintf("%d", e.Value)
+ dirstring := e.Direction.String()
+ if dirstring != directionUnknownStr {
+ output += "/" + dirstring
+ }
+
+ if e.URI != nil {
+ output += " " + e.URI.String()
+ }
+
+ if e.ExtAttr != nil {
+ output += " " + *e.ExtAttr
+ }
+
+ return output
+}
+
+// Name returns the constant name of this object
+func (e *ExtMap) Name() string {
+ return "extmap"
+}
diff --git a/vendor/github.com/pion/sdp/v3/fuzz.go b/vendor/github.com/pion/sdp/v3/fuzz.go
new file mode 100644
index 0000000..f41ef78
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/fuzz.go
@@ -0,0 +1,31 @@
+// +build gofuzz
+
+package sdp
+
+// Fuzz implements a randomized fuzz test of the sdp
+// parser using go-fuzz.
+//
+// To run the fuzzer, first download go-fuzz:
+// `go get github.com/dvyukov/go-fuzz/...`
+//
+// Then build the testing package:
+// `go-fuzz-build`
+//
+// And run the fuzzer on the corpus:
+// `go-fuzz`
+func Fuzz(data []byte) int {
+ // Check that unmarshalling any byte slice does not panic.
+ var sd SessionDescription
+ if err := sd.Unmarshal(data); err != nil {
+ return 0
+ }
+ // Check that we can marshal anything we unmarshalled.
+ _, err := sd.Marshal()
+ if err != nil {
+ panic("failed to marshal") // nolint
+ }
+ // It'd be nice to check that if we round trip Marshal then Unmarshal,
+ // we get the original back. Right now, though, we frequently don't,
+ // and we'd need to fix that first.
+ return 1
+}
diff --git a/vendor/github.com/pion/sdp/v3/go.mod b/vendor/github.com/pion/sdp/v3/go.mod
new file mode 100644
index 0000000..da7ceaa
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/go.mod
@@ -0,0 +1,8 @@
+module github.com/pion/sdp/v3
+
+go 1.13
+
+require (
+ github.com/pion/randutil v0.1.0
+ github.com/stretchr/testify v1.6.1
+)
diff --git a/vendor/github.com/pion/sdp/v3/go.sum b/vendor/github.com/pion/sdp/v3/go.sum
new file mode 100644
index 0000000..43316cb
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/go.sum
@@ -0,0 +1,13 @@
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
+github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/pion/sdp/v3/jsep.go b/vendor/github.com/pion/sdp/v3/jsep.go
new file mode 100644
index 0000000..efdef03
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/jsep.go
@@ -0,0 +1,205 @@
+package sdp
+
+import (
+ "fmt"
+ "net/url"
+ "strconv"
+ "time"
+)
+
+// Constants for SDP attributes used in JSEP
+const (
+ AttrKeyCandidate = "candidate"
+ AttrKeyEndOfCandidates = "end-of-candidates"
+ AttrKeyIdentity = "identity"
+ AttrKeyGroup = "group"
+ AttrKeySSRC = "ssrc"
+ AttrKeySSRCGroup = "ssrc-group"
+ AttrKeyMsid = "msid"
+ AttrKeyMsidSemantic = "msid-semantic"
+ AttrKeyConnectionSetup = "setup"
+ AttrKeyMID = "mid"
+ AttrKeyICELite = "ice-lite"
+ AttrKeyRTCPMux = "rtcp-mux"
+ AttrKeyRTCPRsize = "rtcp-rsize"
+ AttrKeyInactive = "inactive"
+ AttrKeyRecvOnly = "recvonly"
+ AttrKeySendOnly = "sendonly"
+ AttrKeySendRecv = "sendrecv"
+ AttrKeyExtMap = "extmap"
+)
+
+// Constants for semantic tokens used in JSEP
+const (
+ SemanticTokenLipSynchronization = "LS"
+ SemanticTokenFlowIdentification = "FID"
+ SemanticTokenForwardErrorCorrection = "FEC"
+ SemanticTokenWebRTCMediaStreams = "WMS"
+)
+
+// Constants for extmap key
+const (
+ ExtMapValueTransportCC = 3
+)
+
+func extMapURI() map[int]string {
+ return map[int]string{
+ ExtMapValueTransportCC: "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01",
+ }
+}
+
+// API to match draft-ietf-rtcweb-jsep
+// Move to webrtc or its own package?
+
+// NewJSEPSessionDescription creates a new SessionDescription with
+// some settings that are required by the JSEP spec.
+//
+// Note: Since v2.4.0, session ID has been fixed to use crypto random according to
+// JSEP spec, so that NewJSEPSessionDescription now returns error as a second
+// return value.
+func NewJSEPSessionDescription(identity bool) (*SessionDescription, error) {
+ sid, err := newSessionID()
+ if err != nil {
+ return nil, err
+ }
+ d := &SessionDescription{
+ Version: 0,
+ Origin: Origin{
+ Username: "-",
+ SessionID: sid,
+ SessionVersion: uint64(time.Now().Unix()),
+ NetworkType: "IN",
+ AddressType: "IP4",
+ UnicastAddress: "0.0.0.0",
+ },
+ SessionName: "-",
+ TimeDescriptions: []TimeDescription{
+ {
+ Timing: Timing{
+ StartTime: 0,
+ StopTime: 0,
+ },
+ RepeatTimes: nil,
+ },
+ },
+ Attributes: []Attribute{
+ // "Attribute(ice-options:trickle)", // TODO: implement trickle ICE
+ },
+ }
+
+ if identity {
+ d.WithPropertyAttribute(AttrKeyIdentity)
+ }
+
+ return d, nil
+}
+
+// WithPropertyAttribute adds a property attribute 'a=key' to the session description
+func (s *SessionDescription) WithPropertyAttribute(key string) *SessionDescription {
+ s.Attributes = append(s.Attributes, NewPropertyAttribute(key))
+ return s
+}
+
+// WithValueAttribute adds a value attribute 'a=key:value' to the session description
+func (s *SessionDescription) WithValueAttribute(key, value string) *SessionDescription {
+ s.Attributes = append(s.Attributes, NewAttribute(key, value))
+ return s
+}
+
+// WithFingerprint adds a fingerprint to the session description
+func (s *SessionDescription) WithFingerprint(algorithm, value string) *SessionDescription {
+ return s.WithValueAttribute("fingerprint", algorithm+" "+value)
+}
+
+// WithMedia adds a media description to the session description
+func (s *SessionDescription) WithMedia(md *MediaDescription) *SessionDescription {
+ s.MediaDescriptions = append(s.MediaDescriptions, md)
+ return s
+}
+
+// NewJSEPMediaDescription creates a new MediaName with
+// some settings that are required by the JSEP spec.
+func NewJSEPMediaDescription(codecType string, codecPrefs []string) *MediaDescription {
+ return &MediaDescription{
+ MediaName: MediaName{
+ Media: codecType,
+ Port: RangedPort{Value: 9},
+ Protos: []string{"UDP", "TLS", "RTP", "SAVPF"},
+ },
+ ConnectionInformation: &ConnectionInformation{
+ NetworkType: "IN",
+ AddressType: "IP4",
+ Address: &Address{
+ Address: "0.0.0.0",
+ },
+ },
+ }
+}
+
+// WithPropertyAttribute adds a property attribute 'a=key' to the media description
+func (d *MediaDescription) WithPropertyAttribute(key string) *MediaDescription {
+ d.Attributes = append(d.Attributes, NewPropertyAttribute(key))
+ return d
+}
+
+// WithValueAttribute adds a value attribute 'a=key:value' to the media description
+func (d *MediaDescription) WithValueAttribute(key, value string) *MediaDescription {
+ d.Attributes = append(d.Attributes, NewAttribute(key, value))
+ return d
+}
+
+// WithFingerprint adds a fingerprint to the media description
+func (d *MediaDescription) WithFingerprint(algorithm, value string) *MediaDescription {
+ return d.WithValueAttribute("fingerprint", algorithm+" "+value)
+}
+
+// WithICECredentials adds ICE credentials to the media description
+func (d *MediaDescription) WithICECredentials(username, password string) *MediaDescription {
+ return d.
+ WithValueAttribute("ice-ufrag", username).
+ WithValueAttribute("ice-pwd", password)
+}
+
+// WithCodec adds codec information to the media description
+func (d *MediaDescription) WithCodec(payloadType uint8, name string, clockrate uint32, channels uint16, fmtp string) *MediaDescription {
+ d.MediaName.Formats = append(d.MediaName.Formats, strconv.Itoa(int(payloadType)))
+ rtpmap := fmt.Sprintf("%d %s/%d", payloadType, name, clockrate)
+ if channels > 0 {
+ rtpmap += fmt.Sprintf("/%d", channels)
+ }
+ d.WithValueAttribute("rtpmap", rtpmap)
+ if fmtp != "" {
+ d.WithValueAttribute("fmtp", fmt.Sprintf("%d %s", payloadType, fmtp))
+ }
+ return d
+}
+
+// WithMediaSource adds media source information to the media description
+func (d *MediaDescription) WithMediaSource(ssrc uint32, cname, streamLabel, label string) *MediaDescription {
+ return d.
+ WithValueAttribute("ssrc", fmt.Sprintf("%d cname:%s", ssrc, cname)). // Deprecated but not phased out?
+ WithValueAttribute("ssrc", fmt.Sprintf("%d msid:%s %s", ssrc, streamLabel, label)).
+ WithValueAttribute("ssrc", fmt.Sprintf("%d mslabel:%s", ssrc, streamLabel)). // Deprecated but not phased out?
+ WithValueAttribute("ssrc", fmt.Sprintf("%d label:%s", ssrc, label)) // Deprecated but not phased out?
+}
+
+// WithCandidate adds an ICE candidate to the media description
+// Deprecated: use WithICECandidate instead
+func (d *MediaDescription) WithCandidate(value string) *MediaDescription {
+ return d.WithValueAttribute("candidate", value)
+}
+
+// WithExtMap adds an extmap to the media description
+func (d *MediaDescription) WithExtMap(e ExtMap) *MediaDescription {
+ return d.WithPropertyAttribute(e.Marshal())
+}
+
+// WithTransportCCExtMap adds an extmap to the media description
+func (d *MediaDescription) WithTransportCCExtMap() *MediaDescription {
+ uri, _ := url.Parse(extMapURI()[ExtMapValueTransportCC])
+ e := ExtMap{
+ Value: ExtMapValueTransportCC,
+ URI: uri,
+ }
+ return d.WithExtMap(e)
+}
diff --git a/vendor/github.com/pion/sdp/v3/marshal.go b/vendor/github.com/pion/sdp/v3/marshal.go
new file mode 100644
index 0000000..f029c4e
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/marshal.go
@@ -0,0 +1,136 @@
+package sdp
+
+import (
+ "strings"
+)
+
+// Marshal takes a SDP struct to text
+// https://tools.ietf.org/html/rfc4566#section-5
+// Session description
+// v= (protocol version)
+// o= (originator and session identifier)
+// s= (session name)
+// i=* (session information)
+// u=* (URI of description)
+// e=* (email address)
+// p=* (phone number)
+// c=* (connection information -- not required if included in
+// all media)
+// b=* (zero or more bandwidth information lines)
+// One or more time descriptions ("t=" and "r=" lines; see below)
+// z=* (time zone adjustments)
+// k=* (encryption key)
+// a=* (zero or more session attribute lines)
+// Zero or more media descriptions
+//
+// Time description
+// t= (time the session is active)
+// r=* (zero or more repeat times)
+//
+// Media description, if present
+// m= (media name and transport address)
+// i=* (media title)
+// c=* (connection information -- optional if included at
+// session level)
+// b=* (zero or more bandwidth information lines)
+// k=* (encryption key)
+// a=* (zero or more media attribute lines)
+func (s *SessionDescription) Marshal() ([]byte, error) {
+ m := make(marshaller, 0, 1024)
+
+ m.addKeyValue("v=", s.Version.String())
+ m.addKeyValue("o=", s.Origin.String())
+ m.addKeyValue("s=", s.SessionName.String())
+
+ if s.SessionInformation != nil {
+ m.addKeyValue("i=", s.SessionInformation.String())
+ }
+
+ if s.URI != nil {
+ m.addKeyValue("u=", s.URI.String())
+ }
+
+ if s.EmailAddress != nil {
+ m.addKeyValue("e=", s.EmailAddress.String())
+ }
+
+ if s.PhoneNumber != nil {
+ m.addKeyValue("p=", s.PhoneNumber.String())
+ }
+
+ if s.ConnectionInformation != nil {
+ m.addKeyValue("c=", s.ConnectionInformation.String())
+ }
+
+ for _, b := range s.Bandwidth {
+ m.addKeyValue("b=", b.String())
+ }
+
+ for _, td := range s.TimeDescriptions {
+ m.addKeyValue("t=", td.Timing.String())
+ for _, r := range td.RepeatTimes {
+ m.addKeyValue("r=", r.String())
+ }
+ }
+
+ if len(s.TimeZones) > 0 {
+ var b strings.Builder
+ for i, z := range s.TimeZones {
+ if i > 0 {
+ b.WriteString(" ")
+ }
+ b.WriteString(z.String())
+ }
+ m.addKeyValue("z=", b.String())
+ }
+
+ if s.EncryptionKey != nil {
+ m.addKeyValue("k=", s.EncryptionKey.String())
+ }
+
+ for _, a := range s.Attributes {
+ m.addKeyValue("a=", a.String())
+ }
+
+ for _, md := range s.MediaDescriptions {
+ m.addKeyValue("m=", md.MediaName.String())
+
+ if md.MediaTitle != nil {
+ m.addKeyValue("i=", md.MediaTitle.String())
+ }
+
+ if md.ConnectionInformation != nil {
+ m.addKeyValue("c=", md.ConnectionInformation.String())
+ }
+
+ for _, b := range md.Bandwidth {
+ m.addKeyValue("b=", b.String())
+ }
+
+ if md.EncryptionKey != nil {
+ m.addKeyValue("k=", md.EncryptionKey.String())
+ }
+
+ for _, a := range md.Attributes {
+ m.addKeyValue("a=", a.String())
+ }
+ }
+
+ return m.bytes(), nil
+}
+
+// marshaller contains state during marshaling.
+type marshaller []byte
+
+func (m *marshaller) addKeyValue(key, value string) {
+ if value == "" {
+ return
+ }
+ *m = append(*m, key...)
+ *m = append(*m, value...)
+ *m = append(*m, "\r\n"...)
+}
+
+func (m *marshaller) bytes() []byte {
+ return *m
+}
diff --git a/vendor/github.com/pion/sdp/v3/media_description.go b/vendor/github.com/pion/sdp/v3/media_description.go
new file mode 100644
index 0000000..c088507
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/media_description.go
@@ -0,0 +1,80 @@
+package sdp
+
+import (
+ "strconv"
+ "strings"
+)
+
+// MediaDescription represents a media type.
+// https://tools.ietf.org/html/rfc4566#section-5.14
+type MediaDescription struct {
+ // m=<media> <port>/<number of ports> <proto> <fmt> ...
+ // https://tools.ietf.org/html/rfc4566#section-5.14
+ MediaName MediaName
+
+ // i=<session description>
+ // https://tools.ietf.org/html/rfc4566#section-5.4
+ MediaTitle *Information
+
+ // c=<nettype> <addrtype> <connection-address>
+ // https://tools.ietf.org/html/rfc4566#section-5.7
+ ConnectionInformation *ConnectionInformation
+
+ // b=<bwtype>:<bandwidth>
+ // https://tools.ietf.org/html/rfc4566#section-5.8
+ Bandwidth []Bandwidth
+
+ // k=<method>
+ // k=<method>:<encryption key>
+ // https://tools.ietf.org/html/rfc4566#section-5.12
+ EncryptionKey *EncryptionKey
+
+ // a=<attribute>
+ // a=<attribute>:<value>
+ // https://tools.ietf.org/html/rfc4566#section-5.13
+ Attributes []Attribute
+}
+
+// Attribute returns the value of an attribute and if it exists
+func (d *MediaDescription) Attribute(key string) (string, bool) {
+ for _, a := range d.Attributes {
+ if a.Key == key {
+ return a.Value, true
+ }
+ }
+ return "", false
+}
+
+// RangedPort supports special format for the media field "m=" port value. If
+// it may be necessary to specify multiple transport ports, the protocol allows
+// to write it as: <port>/<number of ports> where number of ports is a an
+// offsetting range.
+type RangedPort struct {
+ Value int
+ Range *int
+}
+
+func (p *RangedPort) String() string {
+ output := strconv.Itoa(p.Value)
+ if p.Range != nil {
+ output += "/" + strconv.Itoa(*p.Range)
+ }
+ return output
+}
+
+// MediaName describes the "m=" field storage structure.
+type MediaName struct {
+ Media string
+ Port RangedPort
+ Protos []string
+ Formats []string
+}
+
+func (m MediaName) String() string {
+ return strings.Join([]string{
+ m.Media,
+ m.Port.String(),
+ strings.Join(m.Protos, "/"),
+ strings.Join(m.Formats, " "),
+ }, " ")
+}
diff --git a/vendor/github.com/pion/sdp/v3/renovate.json b/vendor/github.com/pion/sdp/v3/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/sdp/v3/sdp.go b/vendor/github.com/pion/sdp/v3/sdp.go
new file mode 100644
index 0000000..c92ac1a
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/sdp.go
@@ -0,0 +1,2 @@
+// Package sdp implements Session Description Protocol (SDP)
+package sdp
diff --git a/vendor/github.com/pion/sdp/v3/session_description.go b/vendor/github.com/pion/sdp/v3/session_description.go
new file mode 100644
index 0000000..c4aaf5f
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/session_description.go
@@ -0,0 +1,146 @@
+package sdp
+
+import (
+ "fmt"
+ "net/url"
+ "strconv"
+)
+
+// SessionDescription is a a well-defined format for conveying sufficient
+// information to discover and participate in a multimedia session.
+type SessionDescription struct {
+ // v=0
+ // https://tools.ietf.org/html/rfc4566#section-5.1
+ Version Version
+
+ // o=<username> <sess-id> <sess-version> <nettype> <addrtype> <unicast-address>
+ // https://tools.ietf.org/html/rfc4566#section-5.2
+ Origin Origin
+
+ // s=<session name>
+ // https://tools.ietf.org/html/rfc4566#section-5.3
+ SessionName SessionName
+
+ // i=<session description>
+ // https://tools.ietf.org/html/rfc4566#section-5.4
+ SessionInformation *Information
+
+ // u=<uri>
+ // https://tools.ietf.org/html/rfc4566#section-5.5
+ URI *url.URL
+
+ // e=<email-address>
+ // https://tools.ietf.org/html/rfc4566#section-5.6
+ EmailAddress *EmailAddress
+
+ // p=<phone-number>
+ // https://tools.ietf.org/html/rfc4566#section-5.6
+ PhoneNumber *PhoneNumber
+
+ // c=<nettype> <addrtype> <connection-address>
+ // https://tools.ietf.org/html/rfc4566#section-5.7
+ ConnectionInformation *ConnectionInformation
+
+ // b=<bwtype>:<bandwidth>
+ // https://tools.ietf.org/html/rfc4566#section-5.8
+ Bandwidth []Bandwidth
+
+ // https://tools.ietf.org/html/rfc4566#section-5.9
+ // https://tools.ietf.org/html/rfc4566#section-5.10
+ TimeDescriptions []TimeDescription
+
+ // z=<adjustment time> <offset> <adjustment time> <offset> ...
+ // https://tools.ietf.org/html/rfc4566#section-5.11
+ TimeZones []TimeZone
+
+ // k=<method>
+ // k=<method>:<encryption key>
+ // https://tools.ietf.org/html/rfc4566#section-5.12
+ EncryptionKey *EncryptionKey
+
+ // a=<attribute>
+ // a=<attribute>:<value>
+ // https://tools.ietf.org/html/rfc4566#section-5.13
+ Attributes []Attribute
+
+ // https://tools.ietf.org/html/rfc4566#section-5.14
+ MediaDescriptions []*MediaDescription
+}
+
+// Attribute returns the value of an attribute and if it exists
+func (s *SessionDescription) Attribute(key string) (string, bool) {
+ for _, a := range s.Attributes {
+ if a.Key == key {
+ return a.Value, true
+ }
+ }
+ return "", false
+}
+
+// Version describes the value provided by the "v=" field which gives
+// the version of the Session Description Protocol.
+type Version int
+
+func (v Version) String() string {
+ return strconv.Itoa(int(v))
+}
+
+// Origin defines the structure for the "o=" field which provides the
+// originator of the session plus a session identifier and version number.
+type Origin struct {
+ Username string
+ SessionID uint64
+ SessionVersion uint64
+ NetworkType string
+ AddressType string
+ UnicastAddress string
+}
+
+func (o Origin) String() string {
+ return fmt.Sprintf(
+ "%v %d %d %v %v %v",
+ o.Username,
+ o.SessionID,
+ o.SessionVersion,
+ o.NetworkType,
+ o.AddressType,
+ o.UnicastAddress,
+ )
+}
+
+// SessionName describes a structured representations for the "s=" field
+// and is the textual session name.
+type SessionName string
+
+func (s SessionName) String() string {
+ return string(s)
+}
+
+// EmailAddress describes a structured representations for the "e=" line
+// which specifies email contact information for the person responsible for
+// the conference.
+type EmailAddress string
+
+func (e EmailAddress) String() string {
+ return string(e)
+}
+
+// PhoneNumber describes a structured representations for the "p=" line
+// specify phone contact information for the person responsible for the
+// conference.
+type PhoneNumber string
+
+func (p PhoneNumber) String() string {
+ return string(p)
+}
+
+// TimeZone defines the structured object for "z=" line which describes
+// repeated sessions scheduling.
+type TimeZone struct {
+ AdjustmentTime uint64
+ Offset int64
+}
+
+func (z TimeZone) String() string {
+ return strconv.FormatUint(z.AdjustmentTime, 10) + " " + strconv.FormatInt(z.Offset, 10)
+}
diff --git a/vendor/github.com/pion/sdp/v3/time_description.go b/vendor/github.com/pion/sdp/v3/time_description.go
new file mode 100644
index 0000000..8b24e13
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/time_description.go
@@ -0,0 +1,51 @@
+package sdp
+
+import (
+ "strconv"
+ "strings"
+)
+
+// TimeDescription describes "t=", "r=" fields of the session description
+// which are used to specify the start and stop times for a session as well as
+// repeat intervals and durations for the scheduled session.
+type TimeDescription struct {
+ // t=<start-time> <stop-time>
+ // https://tools.ietf.org/html/rfc4566#section-5.9
+ Timing Timing
+
+ // r=<repeat interval> <active duration> <offsets from start-time>
+ // https://tools.ietf.org/html/rfc4566#section-5.10
+ RepeatTimes []RepeatTime
+}
+
+// Timing defines the "t=" field's structured representation for the start and
+// stop times.
+type Timing struct {
+ StartTime uint64
+ StopTime uint64
+}
+
+func (t Timing) String() string {
+ output := strconv.FormatUint(t.StartTime, 10)
+ output += " " + strconv.FormatUint(t.StopTime, 10)
+ return output
+}
+
+// RepeatTime describes the "r=" fields of the session description which
+// represents the intervals and durations for repeated scheduled sessions.
+type RepeatTime struct {
+ Interval int64
+ Duration int64
+ Offsets []int64
+}
+
+func (r RepeatTime) String() string {
+ fields := make([]string, 0)
+ fields = append(fields, strconv.FormatInt(r.Interval, 10))
+ fields = append(fields, strconv.FormatInt(r.Duration, 10))
+ for _, value := range r.Offsets {
+ fields = append(fields, strconv.FormatInt(value, 10))
+ }
+
+ return strings.Join(fields, " ")
+}
diff --git a/vendor/github.com/pion/sdp/v3/unmarshal.go b/vendor/github.com/pion/sdp/v3/unmarshal.go
new file mode 100644
index 0000000..92e0dcf
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/unmarshal.go
@@ -0,0 +1,907 @@
+package sdp
+
+import (
+ "errors"
+ "fmt"
+ "net/url"
+ "strconv"
+ "strings"
+)
+
+var (
+ errSDPInvalidSyntax = errors.New("sdp: invalid syntax")
+ errSDPInvalidNumericValue = errors.New("sdp: invalid numeric value")
+ errSDPInvalidValue = errors.New("sdp: invalid value")
+ errSDPInvalidPortValue = errors.New("sdp: invalid port value")
+)
+
+// Unmarshal is the primary function that deserializes the session description
+// message and stores it inside of a structured SessionDescription object.
+//
+// The States Transition Table describes the computation flow between functions
+// (namely s1, s2, s3, ...) for a parsing procedure that complies with the
+// specifications laid out by the rfc4566#section-5 as well as by JavaScript
+// Session Establishment Protocol draft. Links:
+// https://tools.ietf.org/html/rfc4566#section-5
+// https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-24
+//
+// https://tools.ietf.org/html/rfc4566#section-5
+// Session description
+// v= (protocol version)
+// o= (originator and session identifier)
+// s= (session name)
+// i=* (session information)
+// u=* (URI of description)
+// e=* (email address)
+// p=* (phone number)
+// c=* (connection information -- not required if included in
+// all media)
+// b=* (zero or more bandwidth information lines)
+// One or more time descriptions ("t=" and "r=" lines; see below)
+// z=* (time zone adjustments)
+// k=* (encryption key)
+// a=* (zero or more session attribute lines)
+// Zero or more media descriptions
+//
+// Time description
+// t= (time the session is active)
+// r=* (zero or more repeat times)
+//
+// Media description, if present
+// m= (media name and transport address)
+// i=* (media title)
+// c=* (connection information -- optional if included at
+// session level)
+// b=* (zero or more bandwidth information lines)
+// k=* (encryption key)
+// a=* (zero or more media attribute lines)
+//
+// In order to generate the following state table and draw subsequent
+// deterministic finite-state automota ("DFA") the following regex was used to
+// derive the DFA:
+// vosi?u?e?p?c?b*(tr*)+z?k?a*(mi?c?b*k?a*)*
+// possible place and state to exit:
+// ** * * * ** * * * *
+// 99 1 1 1 11 1 1 1 1
+// 3 1 1 26 5 5 4 4
+//
+// Please pay close attention to the `k`, and `a` parsing states. In the table
+// below in order to distinguish between the states belonging to the media
+// description as opposed to the session description, the states are marked
+// with an asterisk ("a*", "k*").
+// +--------+----+-------+----+-----+----+-----+---+----+----+---+---+-----+---+---+----+---+----+
+// | STATES | a* | a*,k* | a | a,k | b | b,c | e | i | m | o | p | r,t | s | t | u | v | z |
+// +--------+----+-------+----+-----+----+-----+---+----+----+---+---+-----+---+---+----+---+----+
+// | s1 | | | | | | | | | | | | | | | | 2 | |
+// | s2 | | | | | | | | | | 3 | | | | | | | |
+// | s3 | | | | | | | | | | | | | 4 | | | | |
+// | s4 | | | | | | 5 | 6 | 7 | | | 8 | | | 9 | 10 | | |
+// | s5 | | | | | 5 | | | | | | | | | 9 | | | |
+// | s6 | | | | | | 5 | | | | | 8 | | | 9 | | | |
+// | s7 | | | | | | 5 | 6 | | | | 8 | | | 9 | 10 | | |
+// | s8 | | | | | | 5 | | | | | | | | 9 | | | |
+// | s9 | | | | 11 | | | | | 12 | | | 9 | | | | | 13 |
+// | s10 | | | | | | 5 | 6 | | | | 8 | | | 9 | | | |
+// | s11 | | | 11 | | | | | | 12 | | | | | | | | |
+// | s12 | | 14 | | | | 15 | | 16 | 12 | | | | | | | | |
+// | s13 | | | | 11 | | | | | 12 | | | | | | | | |
+// | s14 | 14 | | | | | | | | 12 | | | | | | | | |
+// | s15 | | 14 | | | 15 | | | | 12 | | | | | | | | |
+// | s16 | | 14 | | | | 15 | | | 12 | | | | | | | | |
+// +--------+----+-------+----+-----+----+-----+---+----+----+---+---+-----+---+---+----+---+----+
+func (s *SessionDescription) Unmarshal(value []byte) error {
+ l := new(lexer)
+ l.desc = s
+ l.value = value
+ for state := s1; state != nil; {
+ var err error
+ state, err = state(l)
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func s1(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ if key == "v=" {
+ return unmarshalProtocolVersion
+ }
+ return nil
+ })
+}
+
+func s2(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ if key == "o=" {
+ return unmarshalOrigin
+ }
+ return nil
+ })
+}
+
+func s3(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ if key == "s=" {
+ return unmarshalSessionName
+ }
+ return nil
+ })
+}
+
+func s4(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ switch key {
+ case "i=":
+ return unmarshalSessionInformation
+ case "u=":
+ return unmarshalURI
+ case "e=":
+ return unmarshalEmail
+ case "p=":
+ return unmarshalPhone
+ case "c=":
+ return unmarshalSessionConnectionInformation
+ case "b=":
+ return unmarshalSessionBandwidth
+ case "t=":
+ return unmarshalTiming
+ }
+ return nil
+ })
+}
+
+func s5(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ switch key {
+ case "b=":
+ return unmarshalSessionBandwidth
+ case "t=":
+ return unmarshalTiming
+ }
+ return nil
+ })
+}
+
+func s6(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ switch key {
+ case "p=":
+ return unmarshalPhone
+ case "c=":
+ return unmarshalSessionConnectionInformation
+ case "b=":
+ return unmarshalSessionBandwidth
+ case "t=":
+ return unmarshalTiming
+ }
+ return nil
+ })
+}
+
+func s7(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ switch key {
+ case "u=":
+ return unmarshalURI
+ case "e=":
+ return unmarshalEmail
+ case "p=":
+ return unmarshalPhone
+ case "c=":
+ return unmarshalSessionConnectionInformation
+ case "b=":
+ return unmarshalSessionBandwidth
+ case "t=":
+ return unmarshalTiming
+ }
+ return nil
+ })
+}
+
+func s8(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ switch key {
+ case "c=":
+ return unmarshalSessionConnectionInformation
+ case "b=":
+ return unmarshalSessionBandwidth
+ case "t=":
+ return unmarshalTiming
+ }
+ return nil
+ })
+}
+
+func s9(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ switch key {
+ case "z=":
+ return unmarshalTimeZones
+ case "k=":
+ return unmarshalSessionEncryptionKey
+ case "a=":
+ return unmarshalSessionAttribute
+ case "r=":
+ return unmarshalRepeatTimes
+ case "t=":
+ return unmarshalTiming
+ case "m=":
+ return unmarshalMediaDescription
+ }
+ return nil
+ })
+}
+
+func s10(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ switch key {
+ case "e=":
+ return unmarshalEmail
+ case "p=":
+ return unmarshalPhone
+ case "c=":
+ return unmarshalSessionConnectionInformation
+ case "b=":
+ return unmarshalSessionBandwidth
+ case "t=":
+ return unmarshalTiming
+ }
+ return nil
+ })
+}
+
+func s11(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ switch key {
+ case "a=":
+ return unmarshalSessionAttribute
+ case "m=":
+ return unmarshalMediaDescription
+ }
+ return nil
+ })
+}
+
+func s12(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ switch key {
+ case "a=":
+ return unmarshalMediaAttribute
+ case "k=":
+ return unmarshalMediaEncryptionKey
+ case "b=":
+ return unmarshalMediaBandwidth
+ case "c=":
+ return unmarshalMediaConnectionInformation
+ case "i=":
+ return unmarshalMediaTitle
+ case "m=":
+ return unmarshalMediaDescription
+ }
+ return nil
+ })
+}
+
+func s13(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ switch key {
+ case "a=":
+ return unmarshalSessionAttribute
+ case "k=":
+ return unmarshalSessionEncryptionKey
+ case "m=":
+ return unmarshalMediaDescription
+ }
+ return nil
+ })
+}
+
+func s14(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ switch key {
+ case "a=":
+ return unmarshalMediaAttribute
+ case "k=":
+ // Non-spec ordering
+ return unmarshalMediaEncryptionKey
+ case "b=":
+ // Non-spec ordering
+ return unmarshalMediaBandwidth
+ case "c=":
+ // Non-spec ordering
+ return unmarshalMediaConnectionInformation
+ case "i=":
+ // Non-spec ordering
+ return unmarshalMediaTitle
+ case "m=":
+ return unmarshalMediaDescription
+ }
+ return nil
+ })
+}
+
+func s15(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ switch key {
+ case "a=":
+ return unmarshalMediaAttribute
+ case "k=":
+ return unmarshalMediaEncryptionKey
+ case "b=":
+ return unmarshalMediaBandwidth
+ case "c=":
+ return unmarshalMediaConnectionInformation
+ case "i=":
+ // Non-spec ordering
+ return unmarshalMediaTitle
+ case "m=":
+ return unmarshalMediaDescription
+ }
+ return nil
+ })
+}
+
+func s16(l *lexer) (stateFn, error) {
+ return l.handleType(func(key string) stateFn {
+ switch key {
+ case "a=":
+ return unmarshalMediaAttribute
+ case "k=":
+ return unmarshalMediaEncryptionKey
+ case "c=":
+ return unmarshalMediaConnectionInformation
+ case "b=":
+ return unmarshalMediaBandwidth
+ case "i=":
+ // Non-spec ordering
+ return unmarshalMediaTitle
+ case "m=":
+ return unmarshalMediaDescription
+ }
+ return nil
+ })
+}
+
+func unmarshalProtocolVersion(l *lexer) (stateFn, error) {
+ version, err := l.readUint64Field()
+ if err != nil {
+ return nil, err
+ }
+
+ // As off the latest draft of the rfc this value is required to be 0.
+ // https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-24#section-5.8.1
+ if version != 0 {
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidValue, version)
+ }
+
+ if err := l.nextLine(); err != nil {
+ return nil, err
+ }
+
+ return s2, nil
+}
+
+func unmarshalOrigin(l *lexer) (stateFn, error) {
+ var err error
+
+ l.desc.Origin.Username, err = l.readField()
+ if err != nil {
+ return nil, err
+ }
+
+ l.desc.Origin.SessionID, err = l.readUint64Field()
+ if err != nil {
+ return nil, err
+ }
+
+ l.desc.Origin.SessionVersion, err = l.readUint64Field()
+ if err != nil {
+ return nil, err
+ }
+
+ l.desc.Origin.NetworkType, err = l.readField()
+ if err != nil {
+ return nil, err
+ }
+
+ // Set according to currently registered with IANA
+ // https://tools.ietf.org/html/rfc4566#section-8.2.6
+ if !anyOf(l.desc.Origin.NetworkType, "IN") {
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidValue, l.desc.Origin.NetworkType)
+ }
+
+ l.desc.Origin.AddressType, err = l.readField()
+ if err != nil {
+ return nil, err
+ }
+
+ // Set according to currently registered with IANA
+ // https://tools.ietf.org/html/rfc4566#section-8.2.7
+ if !anyOf(l.desc.Origin.AddressType, "IP4", "IP6") {
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidValue, l.desc.Origin.AddressType)
+ }
+
+ l.desc.Origin.UnicastAddress, err = l.readField()
+ if err != nil {
+ return nil, err
+ }
+
+ if err := l.nextLine(); err != nil {
+ return nil, err
+ }
+
+ return s3, nil
+}
+
+func unmarshalSessionName(l *lexer) (stateFn, error) {
+ value, err := l.readLine()
+ if err != nil {
+ return nil, err
+ }
+
+ l.desc.SessionName = SessionName(value)
+ return s4, nil
+}
+
+func unmarshalSessionInformation(l *lexer) (stateFn, error) {
+ value, err := l.readLine()
+ if err != nil {
+ return nil, err
+ }
+
+ sessionInformation := Information(value)
+ l.desc.SessionInformation = &sessionInformation
+ return s7, nil
+}
+
+func unmarshalURI(l *lexer) (stateFn, error) {
+ value, err := l.readLine()
+ if err != nil {
+ return nil, err
+ }
+
+ l.desc.URI, err = url.Parse(value)
+ if err != nil {
+ return nil, err
+ }
+
+ return s10, nil
+}
+
+func unmarshalEmail(l *lexer) (stateFn, error) {
+ value, err := l.readLine()
+ if err != nil {
+ return nil, err
+ }
+
+ emailAddress := EmailAddress(value)
+ l.desc.EmailAddress = &emailAddress
+ return s6, nil
+}
+
+func unmarshalPhone(l *lexer) (stateFn, error) {
+ value, err := l.readLine()
+ if err != nil {
+ return nil, err
+ }
+
+ phoneNumber := PhoneNumber(value)
+ l.desc.PhoneNumber = &phoneNumber
+ return s8, nil
+}
+
+func unmarshalSessionConnectionInformation(l *lexer) (stateFn, error) {
+ var err error
+ l.desc.ConnectionInformation, err = l.unmarshalConnectionInformation()
+ if err != nil {
+ return nil, err
+ }
+ return s5, nil
+}
+
+func (l *lexer) unmarshalConnectionInformation() (*ConnectionInformation, error) {
+ var err error
+ var c ConnectionInformation
+
+ c.NetworkType, err = l.readField()
+ if err != nil {
+ return nil, err
+ }
+
+ // Set according to currently registered with IANA
+ // https://tools.ietf.org/html/rfc4566#section-8.2.6
+ if !anyOf(c.NetworkType, "IN") {
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidValue, c.NetworkType)
+ }
+
+ c.AddressType, err = l.readField()
+ if err != nil {
+ return nil, err
+ }
+
+ // Set according to currently registered with IANA
+ // https://tools.ietf.org/html/rfc4566#section-8.2.7
+ if !anyOf(c.AddressType, "IP4", "IP6") {
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidValue, c.AddressType)
+ }
+
+ address, err := l.readField()
+ if err != nil {
+ return nil, err
+ }
+
+ if address != "" {
+ c.Address = new(Address)
+ c.Address.Address = address
+ }
+
+ if err := l.nextLine(); err != nil {
+ return nil, err
+ }
+
+ return &c, nil
+}
+
+func unmarshalSessionBandwidth(l *lexer) (stateFn, error) {
+ value, err := l.readLine()
+ if err != nil {
+ return nil, err
+ }
+
+ bandwidth, err := unmarshalBandwidth(value)
+ if err != nil {
+ return nil, fmt.Errorf("%w `b=%v`", errSDPInvalidValue, value)
+ }
+ l.desc.Bandwidth = append(l.desc.Bandwidth, *bandwidth)
+
+ return s5, nil
+}
+
+func unmarshalBandwidth(value string) (*Bandwidth, error) {
+ parts := strings.Split(value, ":")
+ if len(parts) != 2 {
+ return nil, fmt.Errorf("%w `b=%v`", errSDPInvalidValue, parts)
+ }
+
+ experimental := strings.HasPrefix(parts[0], "X-")
+ if experimental {
+ parts[0] = strings.TrimPrefix(parts[0], "X-")
+ } else if !anyOf(parts[0], "CT", "AS") {
+ // Set according to currently registered with IANA
+ // https://tools.ietf.org/html/rfc4566#section-5.8
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidValue, parts[0])
+ }
+
+ bandwidth, err := strconv.ParseUint(parts[1], 10, 64)
+ if err != nil {
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidNumericValue, parts[1])
+ }
+
+ return &Bandwidth{
+ Experimental: experimental,
+ Type: parts[0],
+ Bandwidth: bandwidth,
+ }, nil
+}
+
+func unmarshalTiming(l *lexer) (stateFn, error) {
+ var err error
+ var td TimeDescription
+
+ td.Timing.StartTime, err = l.readUint64Field()
+ if err != nil {
+ return nil, err
+ }
+
+ td.Timing.StopTime, err = l.readUint64Field()
+ if err != nil {
+ return nil, err
+ }
+
+ if err := l.nextLine(); err != nil {
+ return nil, err
+ }
+
+ l.desc.TimeDescriptions = append(l.desc.TimeDescriptions, td)
+ return s9, nil
+}
+
+func unmarshalRepeatTimes(l *lexer) (stateFn, error) {
+ var err error
+ var newRepeatTime RepeatTime
+
+ latestTimeDesc := &l.desc.TimeDescriptions[len(l.desc.TimeDescriptions)-1]
+
+ field, err := l.readField()
+ if err != nil {
+ return nil, err
+ }
+
+ newRepeatTime.Interval, err = parseTimeUnits(field)
+ if err != nil {
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidValue, field)
+ }
+
+ field, err = l.readField()
+ if err != nil {
+ return nil, err
+ }
+
+ newRepeatTime.Duration, err = parseTimeUnits(field)
+ if err != nil {
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidValue, field)
+ }
+
+ for {
+ field, err := l.readField()
+ if err != nil {
+ return nil, err
+ }
+ if field == "" {
+ break
+ }
+ offset, err := parseTimeUnits(field)
+ if err != nil {
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidValue, field)
+ }
+ newRepeatTime.Offsets = append(newRepeatTime.Offsets, offset)
+ }
+
+ if err := l.nextLine(); err != nil {
+ return nil, err
+ }
+
+ latestTimeDesc.RepeatTimes = append(latestTimeDesc.RepeatTimes, newRepeatTime)
+ return s9, nil
+}
+
+func unmarshalTimeZones(l *lexer) (stateFn, error) {
+ // These fields are transimitted in pairs
+ // z=<adjustment time> <offset> <adjustment time> <offset> ....
+ // so we are making sure that there are actually multiple of 2 total.
+ for {
+ var err error
+ var timeZone TimeZone
+
+ timeZone.AdjustmentTime, err = l.readUint64Field()
+ if err != nil {
+ return nil, err
+ }
+
+ offset, err := l.readField()
+ if err != nil {
+ return nil, err
+ }
+
+ if offset == "" {
+ break
+ }
+
+ timeZone.Offset, err = parseTimeUnits(offset)
+ if err != nil {
+ return nil, err
+ }
+
+ l.desc.TimeZones = append(l.desc.TimeZones, timeZone)
+ }
+
+ if err := l.nextLine(); err != nil {
+ return nil, err
+ }
+
+ return s13, nil
+}
+
+func unmarshalSessionEncryptionKey(l *lexer) (stateFn, error) {
+ value, err := l.readLine()
+ if err != nil {
+ return nil, err
+ }
+
+ encryptionKey := EncryptionKey(value)
+ l.desc.EncryptionKey = &encryptionKey
+ return s11, nil
+}
+
+func unmarshalSessionAttribute(l *lexer) (stateFn, error) {
+ value, err := l.readLine()
+ if err != nil {
+ return nil, err
+ }
+
+ i := strings.IndexRune(value, ':')
+ var a Attribute
+ if i > 0 {
+ a = NewAttribute(value[:i], value[i+1:])
+ } else {
+ a = NewPropertyAttribute(value)
+ }
+
+ l.desc.Attributes = append(l.desc.Attributes, a)
+ return s11, nil
+}
+
+func unmarshalMediaDescription(l *lexer) (stateFn, error) {
+ var newMediaDesc MediaDescription
+
+ // <media>
+ field, err := l.readField()
+ if err != nil {
+ return nil, err
+ }
+
+ // Set according to currently registered with IANA
+ // https://tools.ietf.org/html/rfc4566#section-5.14
+ if !anyOf(field, "audio", "video", "text", "application", "message") {
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidValue, field)
+ }
+ newMediaDesc.MediaName.Media = field
+
+ // <port>
+ field, err = l.readField()
+ if err != nil {
+ return nil, err
+ }
+ parts := strings.Split(field, "/")
+ newMediaDesc.MediaName.Port.Value, err = parsePort(parts[0])
+ if err != nil {
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidPortValue, parts[0])
+ }
+
+ if len(parts) > 1 {
+ var portRange int
+ portRange, err = strconv.Atoi(parts[1])
+ if err != nil {
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidValue, parts)
+ }
+ newMediaDesc.MediaName.Port.Range = &portRange
+ }
+
+ // <proto>
+ field, err = l.readField()
+ if err != nil {
+ return nil, err
+ }
+
+ // Set according to currently registered with IANA
+ // https://tools.ietf.org/html/rfc4566#section-5.14
+ for _, proto := range strings.Split(field, "/") {
+ if !anyOf(proto, "UDP", "RTP", "AVP", "SAVP", "SAVPF", "TLS", "DTLS", "SCTP", "AVPF") {
+ return nil, fmt.Errorf("%w `%v`", errSDPInvalidNumericValue, field)
+ }
+ newMediaDesc.MediaName.Protos = append(newMediaDesc.MediaName.Protos, proto)
+ }
+
+ // <fmt>...
+ for {
+ field, err = l.readField()
+ if err != nil {
+ return nil, err
+ }
+ if field == "" {
+ break
+ }
+ newMediaDesc.MediaName.Formats = append(newMediaDesc.MediaName.Formats, field)
+ }
+
+ if err := l.nextLine(); err != nil {
+ return nil, err
+ }
+
+ l.desc.MediaDescriptions = append(l.desc.MediaDescriptions, &newMediaDesc)
+ return s12, nil
+}
+
+func unmarshalMediaTitle(l *lexer) (stateFn, error) {
+ value, err := l.readLine()
+ if err != nil {
+ return nil, err
+ }
+
+ latestMediaDesc := l.desc.MediaDescriptions[len(l.desc.MediaDescriptions)-1]
+ mediaTitle := Information(value)
+ latestMediaDesc.MediaTitle = &mediaTitle
+ return s16, nil
+}
+
+func unmarshalMediaConnectionInformation(l *lexer) (stateFn, error) {
+ var err error
+ latestMediaDesc := l.desc.MediaDescriptions[len(l.desc.MediaDescriptions)-1]
+ latestMediaDesc.ConnectionInformation, err = l.unmarshalConnectionInformation()
+ if err != nil {
+ return nil, err
+ }
+ return s15, nil
+}
+
+func unmarshalMediaBandwidth(l *lexer) (stateFn, error) {
+ value, err := l.readLine()
+ if err != nil {
+ return nil, err
+ }
+
+ latestMediaDesc := l.desc.MediaDescriptions[len(l.desc.MediaDescriptions)-1]
+ bandwidth, err := unmarshalBandwidth(value)
+ if err != nil {
+ return nil, fmt.Errorf("%w `b=%v`", errSDPInvalidSyntax, value)
+ }
+ latestMediaDesc.Bandwidth = append(latestMediaDesc.Bandwidth, *bandwidth)
+ return s15, nil
+}
+
+func unmarshalMediaEncryptionKey(l *lexer) (stateFn, error) {
+ value, err := l.readLine()
+ if err != nil {
+ return nil, err
+ }
+
+ latestMediaDesc := l.desc.MediaDescriptions[len(l.desc.MediaDescriptions)-1]
+ encryptionKey := EncryptionKey(value)
+ latestMediaDesc.EncryptionKey = &encryptionKey
+ return s14, nil
+}
+
+func unmarshalMediaAttribute(l *lexer) (stateFn, error) {
+ value, err := l.readLine()
+ if err != nil {
+ return nil, err
+ }
+
+ i := strings.IndexRune(value, ':')
+ var a Attribute
+ if i > 0 {
+ a = NewAttribute(value[:i], value[i+1:])
+ } else {
+ a = NewPropertyAttribute(value)
+ }
+
+ latestMediaDesc := l.desc.MediaDescriptions[len(l.desc.MediaDescriptions)-1]
+ latestMediaDesc.Attributes = append(latestMediaDesc.Attributes, a)
+ return s14, nil
+}
+
+func parseTimeUnits(value string) (num int64, err error) {
+ k := timeShorthand(value[len(value)-1])
+ if k > 0 {
+ num, err = strconv.ParseInt(value[:len(value)-1], 10, 64)
+ } else {
+ k = 1
+ num, err = strconv.ParseInt(value, 10, 64)
+ }
+ if err != nil {
+ return 0, fmt.Errorf("%w `%v`", errSDPInvalidValue, value)
+ }
+ return num * k, nil
+}
+
+func timeShorthand(b byte) int64 {
+ // Some time offsets in the protocol can be provided with a shorthand
+ // notation. This code ensures to convert it to NTP timestamp format.
+ switch b {
+ case 'd': // days
+ return 86400
+ case 'h': // hours
+ return 3600
+ case 'm': // minutes
+ return 60
+ case 's': // seconds (allowed for completeness)
+ return 1
+ default:
+ return 0
+ }
+}
+
+func parsePort(value string) (int, error) {
+ port, err := strconv.Atoi(value)
+ if err != nil {
+ return 0, fmt.Errorf("%w `%v`", errSDPInvalidPortValue, port)
+ }
+
+ if port < 0 || port > 65536 {
+ return 0, fmt.Errorf("%w -- out of range `%v`", errSDPInvalidPortValue, port)
+ }
+
+ return port, nil
+}
diff --git a/vendor/github.com/pion/sdp/v3/util.go b/vendor/github.com/pion/sdp/v3/util.go
new file mode 100644
index 0000000..74f47ed
--- /dev/null
+++ b/vendor/github.com/pion/sdp/v3/util.go
@@ -0,0 +1,318 @@
+package sdp
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "sort"
+ "strconv"
+ "strings"
+
+ "github.com/pion/randutil"
+)
+
+const (
+ attributeKey = "a="
+)
+
+var (
+ errExtractCodecRtpmap = errors.New("could not extract codec from rtpmap")
+ errExtractCodecFmtp = errors.New("could not extract codec from fmtp")
+ errExtractCodecRtcpFb = errors.New("could not extract codec from rtcp-fb")
+ errPayloadTypeNotFound = errors.New("payload type not found")
+ errCodecNotFound = errors.New("codec not found")
+ errSyntaxError = errors.New("SyntaxError")
+)
+
+// ConnectionRole indicates which of the end points should initiate the connection establishment
+type ConnectionRole int
+
+const (
+ // ConnectionRoleActive indicates the endpoint will initiate an outgoing connection.
+ ConnectionRoleActive ConnectionRole = iota + 1
+
+ // ConnectionRolePassive indicates the endpoint will accept an incoming connection.
+ ConnectionRolePassive
+
+ // ConnectionRoleActpass indicates the endpoint is willing to accept an incoming connection or to initiate an outgoing connection.
+ ConnectionRoleActpass
+
+ // ConnectionRoleHoldconn indicates the endpoint does not want the connection to be established for the time being.
+ ConnectionRoleHoldconn
+)
+
+func (t ConnectionRole) String() string {
+ switch t {
+ case ConnectionRoleActive:
+ return "active"
+ case ConnectionRolePassive:
+ return "passive"
+ case ConnectionRoleActpass:
+ return "actpass"
+ case ConnectionRoleHoldconn:
+ return "holdconn"
+ default:
+ return "Unknown"
+ }
+}
+
+func newSessionID() (uint64, error) {
+ // https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-26#section-5.2.1
+ // Session ID is recommended to be constructed by generating a 64-bit
+ // quantity with the highest bit set to zero and the remaining 63-bits
+ // being cryptographically random.
+ id, err := randutil.CryptoUint64()
+ return id & (^(uint64(1) << 63)), err
+}
+
+// Codec represents a codec
+type Codec struct {
+ PayloadType uint8
+ Name string
+ ClockRate uint32
+ EncodingParameters string
+ Fmtp string
+ RTCPFeedback []string
+}
+
+const (
+ unknown = iota
+)
+
+func (c Codec) String() string {
+ return fmt.Sprintf("%d %s/%d/%s (%s) [%s]", c.PayloadType, c.Name, c.ClockRate, c.EncodingParameters, c.Fmtp, strings.Join(c.RTCPFeedback, ", "))
+}
+
+func parseRtpmap(rtpmap string) (Codec, error) {
+ var codec Codec
+ parsingFailed := errExtractCodecRtpmap
+
+ // a=rtpmap:<payload type> <encoding name>/<clock rate>[/<encoding parameters>]
+ split := strings.Split(rtpmap, " ")
+ if len(split) != 2 {
+ return codec, parsingFailed
+ }
+
+ ptSplit := strings.Split(split[0], ":")
+ if len(ptSplit) != 2 {
+ return codec, parsingFailed
+ }
+
+ ptInt, err := strconv.Atoi(ptSplit[1])
+ if err != nil {
+ return codec, parsingFailed
+ }
+
+ codec.PayloadType = uint8(ptInt)
+
+ split = strings.Split(split[1], "/")
+ codec.Name = split[0]
+ parts := len(split)
+ if parts > 1 {
+ rate, err := strconv.Atoi(split[1])
+ if err != nil {
+ return codec, parsingFailed
+ }
+ codec.ClockRate = uint32(rate)
+ }
+ if parts > 2 {
+ codec.EncodingParameters = split[2]
+ }
+
+ return codec, nil
+}
+
+func parseFmtp(fmtp string) (Codec, error) {
+ var codec Codec
+ parsingFailed := errExtractCodecFmtp
+
+ // a=fmtp:<format> <format specific parameters>
+ split := strings.Split(fmtp, " ")
+ if len(split) != 2 {
+ return codec, parsingFailed
+ }
+
+ formatParams := split[1]
+
+ split = strings.Split(split[0], ":")
+ if len(split) != 2 {
+ return codec, parsingFailed
+ }
+
+ ptInt, err := strconv.Atoi(split[1])
+ if err != nil {
+ return codec, parsingFailed
+ }
+
+ codec.PayloadType = uint8(ptInt)
+ codec.Fmtp = formatParams
+
+ return codec, nil
+}
+
+func parseRtcpFb(rtcpFb string) (Codec, error) {
+ var codec Codec
+ parsingFailed := errExtractCodecRtcpFb
+
+ // a=ftcp-fb:<payload type> <RTCP feedback type> [<RTCP feedback parameter>]
+ split := strings.SplitN(rtcpFb, " ", 2)
+ if len(split) != 2 {
+ return codec, parsingFailed
+ }
+
+ ptSplit := strings.Split(split[0], ":")
+ if len(ptSplit) != 2 {
+ return codec, parsingFailed
+ }
+
+ ptInt, err := strconv.Atoi(ptSplit[1])
+ if err != nil {
+ return codec, parsingFailed
+ }
+
+ codec.PayloadType = uint8(ptInt)
+ codec.RTCPFeedback = append(codec.RTCPFeedback, split[1])
+
+ return codec, nil
+}
+
+func mergeCodecs(codec Codec, codecs map[uint8]Codec) {
+ savedCodec := codecs[codec.PayloadType]
+
+ if savedCodec.PayloadType == 0 {
+ savedCodec.PayloadType = codec.PayloadType
+ }
+ if savedCodec.Name == "" {
+ savedCodec.Name = codec.Name
+ }
+ if savedCodec.ClockRate == 0 {
+ savedCodec.ClockRate = codec.ClockRate
+ }
+ if savedCodec.EncodingParameters == "" {
+ savedCodec.EncodingParameters = codec.EncodingParameters
+ }
+ if savedCodec.Fmtp == "" {
+ savedCodec.Fmtp = codec.Fmtp
+ }
+ savedCodec.RTCPFeedback = append(savedCodec.RTCPFeedback, codec.RTCPFeedback...)
+
+ codecs[savedCodec.PayloadType] = savedCodec
+}
+
+func (s *SessionDescription) buildCodecMap() map[uint8]Codec {
+ codecs := make(map[uint8]Codec)
+
+ for _, m := range s.MediaDescriptions {
+ for _, a := range m.Attributes {
+ attr := a.String()
+ switch {
+ case strings.HasPrefix(attr, "rtpmap:"):
+ codec, err := parseRtpmap(attr)
+ if err == nil {
+ mergeCodecs(codec, codecs)
+ }
+ case strings.HasPrefix(attr, "fmtp:"):
+ codec, err := parseFmtp(attr)
+ if err == nil {
+ mergeCodecs(codec, codecs)
+ }
+ case strings.HasPrefix(attr, "rtcp-fb:"):
+ codec, err := parseRtcpFb(attr)
+ if err == nil {
+ mergeCodecs(codec, codecs)
+ }
+ }
+ }
+ }
+
+ return codecs
+}
+
+func equivalentFmtp(want, got string) bool {
+ wantSplit := strings.Split(want, ";")
+ gotSplit := strings.Split(got, ";")
+
+ if len(wantSplit) != len(gotSplit) {
+ return false
+ }
+
+ sort.Strings(wantSplit)
+ sort.Strings(gotSplit)
+
+ for i, wantPart := range wantSplit {
+ wantPart = strings.TrimSpace(wantPart)
+ gotPart := strings.TrimSpace(gotSplit[i])
+ if gotPart != wantPart {
+ return false
+ }
+ }
+
+ return true
+}
+
+func codecsMatch(wanted, got Codec) bool {
+ if wanted.Name != "" && !strings.EqualFold(wanted.Name, got.Name) {
+ return false
+ }
+ if wanted.ClockRate != 0 && wanted.ClockRate != got.ClockRate {
+ return false
+ }
+ if wanted.EncodingParameters != "" && wanted.EncodingParameters != got.EncodingParameters {
+ return false
+ }
+ if wanted.Fmtp != "" && !equivalentFmtp(wanted.Fmtp, got.Fmtp) {
+ return false
+ }
+
+ return true
+}
+
+// GetCodecForPayloadType scans the SessionDescription for the given payload type and returns the codec
+func (s *SessionDescription) GetCodecForPayloadType(payloadType uint8) (Codec, error) {
+ codecs := s.buildCodecMap()
+
+ codec, ok := codecs[payloadType]
+ if ok {
+ return codec, nil
+ }
+
+ return codec, errPayloadTypeNotFound
+}
+
+// GetPayloadTypeForCodec scans the SessionDescription for a codec that matches the provided codec
+// as closely as possible and returns its payload type
+func (s *SessionDescription) GetPayloadTypeForCodec(wanted Codec) (uint8, error) {
+ codecs := s.buildCodecMap()
+
+ for payloadType, codec := range codecs {
+ if codecsMatch(wanted, codec) {
+ return payloadType, nil
+ }
+ }
+
+ return 0, errCodecNotFound
+}
+
+type stateFn func(*lexer) (stateFn, error)
+
+type lexer struct {
+ desc *SessionDescription
+ baseLexer
+}
+
+type keyToState func(key string) stateFn
+
+func (l *lexer) handleType(fn keyToState) (stateFn, error) {
+ key, err := l.readType()
+ if err == io.EOF && key == "" {
+ return nil, nil
+ } else if err != nil {
+ return nil, err
+ }
+
+ if res := fn(key); res != nil {
+ return res, nil
+ }
+
+ return nil, l.syntaxError()
+}
diff --git a/vendor/github.com/pion/srtp/v2/.gitignore b/vendor/github.com/pion/srtp/v2/.gitignore
new file mode 100644
index 0000000..83db74b
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/.gitignore
@@ -0,0 +1,24 @@
+### JetBrains IDE ###
+#####################
+.idea/
+
+### Emacs Temporary Files ###
+#############################
+*~
+
+### Folders ###
+###############
+bin/
+vendor/
+node_modules/
+
+### Files ###
+#############
+*.ivf
+*.ogg
+tags
+cover.out
+*.sw[poe]
+*.wasm
+examples/sfu-ws/cert.pem
+examples/sfu-ws/key.pem
diff --git a/vendor/github.com/pion/srtp/v2/.golangci.yml b/vendor/github.com/pion/srtp/v2/.golangci.yml
new file mode 100644
index 0000000..d6162c9
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/.golangci.yml
@@ -0,0 +1,89 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+ exhaustive:
+ default-signifies-exhaustive: true
+ gomodguard:
+ blocked:
+ modules:
+ - github.com/pkg/errors:
+ recommendations:
+ - errors
+
+linters:
+ enable:
+ - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
+ - bodyclose # checks whether HTTP response body is closed successfully
+ - deadcode # Finds unused code
+ - depguard # Go linter that checks if package imports are in a list of acceptable packages
+ - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
+ - dupl # Tool for code clone detection
+ - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
+ - exhaustive # check exhaustiveness of enum switch statements
+ - exportloopref # checks for pointers to enclosing loop variables
+ - gci # Gci control golang package import order and make it always deterministic.
+ - gochecknoglobals # Checks that no globals are present in Go code
+ - gochecknoinits # Checks that no init functions are present in Go code
+ - gocognit # Computes and checks the cognitive complexity of functions
+ - goconst # Finds repeated strings that could be replaced by a constant
+ - gocritic # The most opinionated Go source code linter
+ - godox # Tool for detection of FIXME, TODO and other comment keywords
+ - goerr113 # Golang linter to check the errors handling expressions
+ - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
+ - gofumpt # Gofumpt checks whether code was gofumpt-ed.
+ - goheader # Checks is file header matches to pattern
+ - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
+ - golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
+ - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.
+ - goprintffuncname # Checks that printf-like functions are named with `f` at the end
+ - gosec # Inspects source code for security problems
+ - gosimple # Linter for Go source code that specializes in simplifying a code
+ - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
+ - ineffassign # Detects when assignments to existing variables are not used
+ - misspell # Finds commonly misspelled English words in comments
+ - nakedret # Finds naked returns in functions greater than a specified function length
+ - noctx # noctx finds sending http request without context.Context
+ - scopelint # Scopelint checks for unpinned variables in go programs
+ - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
+ - structcheck # Finds unused struct fields
+ - stylecheck # Stylecheck is a replacement for golint
+ - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
+ - unconvert # Remove unnecessary type conversions
+ - unparam # Reports unused function parameters
+ - unused # Checks Go code for unused constants, variables, functions and types
+ - varcheck # Finds unused global variables and constants
+ - whitespace # Tool for detection of leading and trailing whitespace
+ disable:
+ - funlen # Tool for detection of long functions
+ - gocyclo # Computes and checks the cyclomatic complexity of functions
+ - godot # Check if comments end in a period
+ - gomnd # An analyzer to detect magic numbers.
+ - lll # Reports long lines
+ - maligned # Tool to detect Go structs that would take less memory if their fields were sorted
+ - nestif # Reports deeply nested if statements
+ - nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
+ - nolintlint # Reports ill-formed or insufficient nolint directives
+ - prealloc # Finds slice declarations that could potentially be preallocated
+ - rowserrcheck # checks whether Err of rows is checked successfully
+ - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
+ - testpackage # linter that makes you use a separate _test package
+ - wsl # Whitespace Linter - Forces you to use empty lines!
+
+issues:
+ exclude-use-default: false
+ exclude-rules:
+ # Allow complex tests, better to be self contained
+ - path: _test\.go
+ linters:
+ - gocognit
+
+ # Allow complex main function in examples
+ - path: examples
+ text: "of func `main` is high"
+ linters:
+ - gocognit
+
+run:
+ skip-dirs-use-default: false
diff --git a/vendor/github.com/pion/srtp/v2/DESIGN.md b/vendor/github.com/pion/srtp/v2/DESIGN.md
new file mode 100644
index 0000000..8742540
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/DESIGN.md
@@ -0,0 +1,20 @@
+<h1 align="center">
+ Design
+</h1>
+
+### Portable
+Pion SRTP is written in Go and extremely portable. Anywhere Golang runs, Pion SRTP should work as well! Instead of dealing with complicated
+cross-compiling of multiple libraries, you now can run anywhere with one `go build`
+
+### Simple API
+The API is based on an io.ReadWriteCloser.
+
+### Readable
+If code comes from an RFC we try to make sure everything is commented with a link to the spec.
+This makes learning and debugging easier, this library was written to also serve as a guide for others.
+
+### Tested
+Every commit is tested via travis-ci Go provides fantastic facilities for testing, and more will be added as time goes on.
+
+### Shared libraries
+Every pion product is built using shared libraries, allowing others to review and reuse our libraries.
diff --git a/vendor/github.com/pion/srtp/v2/LICENSE b/vendor/github.com/pion/srtp/v2/LICENSE
new file mode 100644
index 0000000..ab60297
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/srtp/v2/README.md b/vendor/github.com/pion/srtp/v2/README.md
new file mode 100644
index 0000000..19551e3
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/README.md
@@ -0,0 +1,54 @@
+<h1 align="center">
+ <br>
+ Pion SRTP
+ <br>
+</h1>
+<h4 align="center">A Go implementation of SRTP</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-srtp-gray.svg?longCache=true&colorB=brightgreen" alt="Pion SRTP"></a>
+ <a href="https://sourcegraph.com/github.com/pion/srtp?badge"><img src="https://sourcegraph.com/github.com/pion/srtp/-/badge.svg" alt="Sourcegraph Widget"></a>
+ <a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/srtp"><img src="https://travis-ci.org/pion/srtp.svg?branch=master" alt="Build Status"></a>
+ <a href="https://pkg.go.dev/github.com/pion/srtp"><img src="https://godoc.org/github.com/pion/srtp?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/srtp"><img src="https://codecov.io/gh/pion/srtp/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/srtp"><img src="https://goreportcard.com/badge/github.com/pion/srtp" alt="Go Report Card"></a>
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+See [DESIGN.md](DESIGN.md) for an overview of features and future goals.
+
+### Roadmap
+The library is used as a part of our WebRTC implementation. Please refer to that [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
+
+### Community
+Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
+* [Michiel De Backker](https://github.com/backkem) - *io.Writer interfaces*
+* [Tobias Fridén](https://github.com/tobiasfriden) *SRTP authentication verification*
+* [chenkaiC4](https://github.com/chenkaiC4) - *Fix GolangCI Linter*
+* [Luke Curley](https://github.com/kixelated) - *Performance*
+* [Chris Hiszpanski](https://github.com/thinkski) - *Fix out-of-bounds access*
+* [Yutaka Takeda](https://github.com/enobufs) - *Fix log messages*
+* [Max Hawkins](https://github.com/maxhawkins)
+* [Woodrow Douglass](https://github.com/wdouglass)
+* [Hugo Arregui](https://github.com/hugoArregui)
+* [Atsushi Watanabe](https://github.com/at-wat)
+* [Novel Corpse](https://github.com/NovelCorpse)
+* [Jerko Steiner](https://github.com/jeremija)
+* [Juliusz Chroboczek](https://github.com/jech)
+* [Mission Liao](https://github.com/mission-liao)
+* [Orlando](https://github.com/OrlandoCo)
+* [Tarrence van As](https://github.com/tarrencev)
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/srtp/v2/codecov.yml b/vendor/github.com/pion/srtp/v2/codecov.yml
new file mode 100644
index 0000000..085200a
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/codecov.yml
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+
+coverage:
+ status:
+ project:
+ default:
+ # Allow decreasing 2% of total coverage to avoid noise.
+ threshold: 2%
+ patch:
+ default:
+ target: 70%
+ only_pulls: true
+
+ignore:
+ - "examples/*"
+ - "examples/**/*"
diff --git a/vendor/github.com/pion/srtp/v2/context.go b/vendor/github.com/pion/srtp/v2/context.go
new file mode 100644
index 0000000..63566de
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/context.go
@@ -0,0 +1,196 @@
+package srtp
+
+import (
+ "fmt"
+
+ "github.com/pion/transport/replaydetector"
+)
+
+const (
+ labelSRTPEncryption = 0x00
+ labelSRTPAuthenticationTag = 0x01
+ labelSRTPSalt = 0x02
+
+ labelSRTCPEncryption = 0x03
+ labelSRTCPAuthenticationTag = 0x04
+ labelSRTCPSalt = 0x05
+
+ maxROCDisorder = 100
+ maxSequenceNumber = 65535
+
+ srtcpIndexSize = 4
+)
+
+// Encrypt/Decrypt state for a single SRTP SSRC
+type srtpSSRCState struct {
+ ssrc uint32
+ rolloverCounter uint32
+ rolloverHasProcessed bool
+ lastSequenceNumber uint16
+ replayDetector replaydetector.ReplayDetector
+}
+
+// Encrypt/Decrypt state for a single SRTCP SSRC
+type srtcpSSRCState struct {
+ srtcpIndex uint32
+ ssrc uint32
+ replayDetector replaydetector.ReplayDetector
+}
+
+// Context represents a SRTP cryptographic context.
+// Context can only be used for one-way operations.
+// it must either used ONLY for encryption or ONLY for decryption.
+type Context struct {
+ cipher srtpCipher
+
+ srtpSSRCStates map[uint32]*srtpSSRCState
+ srtcpSSRCStates map[uint32]*srtcpSSRCState
+
+ newSRTCPReplayDetector func() replaydetector.ReplayDetector
+ newSRTPReplayDetector func() replaydetector.ReplayDetector
+}
+
+// CreateContext creates a new SRTP Context.
+//
+// CreateContext receives variable number of ContextOption-s.
+// Passing multiple options which set the same parameter let the last one valid.
+// Following example create SRTP Context with replay protection with window size of 256.
+//
+// decCtx, err := srtp.CreateContext(key, salt, profile, srtp.SRTPReplayProtection(256))
+//
+func CreateContext(masterKey, masterSalt []byte, profile ProtectionProfile, opts ...ContextOption) (c *Context, err error) {
+ keyLen, err := profile.keyLen()
+ if err != nil {
+ return nil, err
+ }
+
+ saltLen, err := profile.saltLen()
+ if err != nil {
+ return nil, err
+ }
+
+ if masterKeyLen := len(masterKey); masterKeyLen != keyLen {
+ return c, fmt.Errorf("%w expected(%d) actual(%d)", errShortSrtpMasterKey, masterKey, keyLen)
+ } else if masterSaltLen := len(masterSalt); masterSaltLen != saltLen {
+ return c, fmt.Errorf("%w expected(%d) actual(%d)", errShortSrtpMasterSalt, saltLen, masterSaltLen)
+ }
+
+ c = &Context{
+ srtpSSRCStates: map[uint32]*srtpSSRCState{},
+ srtcpSSRCStates: map[uint32]*srtcpSSRCState{},
+ }
+
+ switch profile {
+ case ProtectionProfileAeadAes128Gcm:
+ c.cipher, err = newSrtpCipherAeadAesGcm(masterKey, masterSalt)
+ case ProtectionProfileAes128CmHmacSha1_80:
+ c.cipher, err = newSrtpCipherAesCmHmacSha1(masterKey, masterSalt)
+ default:
+ return nil, fmt.Errorf("%w: %#v", errNoSuchSRTPProfile, profile)
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ for _, o := range append(
+ []ContextOption{ // Default options
+ SRTPNoReplayProtection(),
+ SRTCPNoReplayProtection(),
+ },
+ opts..., // User specified options
+ ) {
+ if errOpt := o(c); errOpt != nil {
+ return nil, errOpt
+ }
+ }
+
+ return c, nil
+}
+
+// https://tools.ietf.org/html/rfc3550#appendix-A.1
+func (s *srtpSSRCState) nextRolloverCount(sequenceNumber uint16) (uint32, func()) {
+ roc := s.rolloverCounter
+
+ switch {
+ case !s.rolloverHasProcessed:
+ case sequenceNumber == 0: // We exactly hit the rollover count
+ // Only update rolloverCounter if lastSequenceNumber is greater then maxROCDisorder
+ // otherwise we already incremented for disorder
+ if s.lastSequenceNumber > maxROCDisorder {
+ roc++
+ }
+ case s.lastSequenceNumber < maxROCDisorder &&
+ sequenceNumber > (maxSequenceNumber-maxROCDisorder):
+ // Our last sequence number incremented because we crossed 0, but then our current number was within maxROCDisorder of the max
+ // So we fell behind, drop to account for jitter
+ roc--
+ case sequenceNumber < maxROCDisorder &&
+ s.lastSequenceNumber > (maxSequenceNumber-maxROCDisorder):
+ // our current is within a maxROCDisorder of 0
+ // and our last sequence number was a high sequence number, increment to account for jitter
+ roc++
+ }
+ return roc, func() {
+ s.rolloverHasProcessed = true
+ s.lastSequenceNumber = sequenceNumber
+ s.rolloverCounter = roc
+ }
+}
+
+func (c *Context) getSRTPSSRCState(ssrc uint32) *srtpSSRCState {
+ s, ok := c.srtpSSRCStates[ssrc]
+ if ok {
+ return s
+ }
+
+ s = &srtpSSRCState{
+ ssrc: ssrc,
+ replayDetector: c.newSRTPReplayDetector(),
+ }
+ c.srtpSSRCStates[ssrc] = s
+ return s
+}
+
+func (c *Context) getSRTCPSSRCState(ssrc uint32) *srtcpSSRCState {
+ s, ok := c.srtcpSSRCStates[ssrc]
+ if ok {
+ return s
+ }
+
+ s = &srtcpSSRCState{
+ ssrc: ssrc,
+ replayDetector: c.newSRTCPReplayDetector(),
+ }
+ c.srtcpSSRCStates[ssrc] = s
+ return s
+}
+
+// ROC returns SRTP rollover counter value of specified SSRC.
+func (c *Context) ROC(ssrc uint32) (uint32, bool) {
+ s, ok := c.srtpSSRCStates[ssrc]
+ if !ok {
+ return 0, false
+ }
+ return s.rolloverCounter, true
+}
+
+// SetROC sets SRTP rollover counter value of specified SSRC.
+func (c *Context) SetROC(ssrc uint32, roc uint32) {
+ s := c.getSRTPSSRCState(ssrc)
+ s.rolloverCounter = roc
+}
+
+// Index returns SRTCP index value of specified SSRC.
+func (c *Context) Index(ssrc uint32) (uint32, bool) {
+ s, ok := c.srtcpSSRCStates[ssrc]
+ if !ok {
+ return 0, false
+ }
+ return s.srtcpIndex, true
+}
+
+// SetIndex sets SRTCP index value of specified SSRC.
+func (c *Context) SetIndex(ssrc uint32, index uint32) {
+ s := c.getSRTCPSSRCState(ssrc)
+ s.srtcpIndex = index % (maxSRTCPIndex + 1)
+}
diff --git a/vendor/github.com/pion/srtp/v2/errors.go b/vendor/github.com/pion/srtp/v2/errors.go
new file mode 100644
index 0000000..a702621
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/errors.go
@@ -0,0 +1,40 @@
+package srtp
+
+import (
+ "errors"
+ "fmt"
+)
+
+var (
+ errDuplicated = errors.New("duplicated packet")
+ errShortSrtpMasterKey = errors.New("SRTP master key is not long enough")
+ errShortSrtpMasterSalt = errors.New("SRTP master salt is not long enough")
+ errNoSuchSRTPProfile = errors.New("no such SRTP Profile")
+ errNonZeroKDRNotSupported = errors.New("indexOverKdr > 0 is not supported yet")
+ errExporterWrongLabel = errors.New("exporter called with wrong label")
+ errNoConfig = errors.New("no config provided")
+ errNoConn = errors.New("no conn provided")
+ errFailedToVerifyAuthTag = errors.New("failed to verify auth tag")
+ errTooShortRTCP = errors.New("packet is too short to be rtcp packet")
+ errPayloadDiffers = errors.New("payload differs")
+ errStartedChannelUsedIncorrectly = errors.New("started channel used incorrectly, should only be closed")
+
+ errStreamNotInited = errors.New("stream has not been inited, unable to close")
+ errStreamAlreadyClosed = errors.New("stream is already closed")
+ errStreamAlreadyInited = errors.New("stream is already inited")
+ errFailedTypeAssertion = errors.New("failed to cast child")
+)
+
+type errorDuplicated struct {
+ Proto string // srtp or srtcp
+ SSRC uint32
+ Index uint32 // sequence number or index
+}
+
+func (e *errorDuplicated) Error() string {
+ return fmt.Sprintf("%s ssrc=%d index=%d: %v", e.Proto, e.SSRC, e.Index, errDuplicated)
+}
+
+func (e *errorDuplicated) Unwrap() error {
+ return errDuplicated
+}
diff --git a/vendor/github.com/pion/srtp/v2/go.mod b/vendor/github.com/pion/srtp/v2/go.mod
new file mode 100644
index 0000000..bc04f63
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/go.mod
@@ -0,0 +1,11 @@
+module github.com/pion/srtp/v2
+
+go 1.14
+
+require (
+ github.com/pion/logging v0.2.2
+ github.com/pion/rtcp v1.2.6
+ github.com/pion/rtp v1.6.2
+ github.com/pion/transport v0.12.2
+ github.com/stretchr/testify v1.7.0
+)
diff --git a/vendor/github.com/pion/srtp/v2/go.sum b/vendor/github.com/pion/srtp/v2/go.sum
new file mode 100644
index 0000000..6066df9
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/go.sum
@@ -0,0 +1,34 @@
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
+github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
+github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
+github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
+github.com/pion/rtcp v1.2.6 h1:1zvwBbyd0TeEuuWftrd/4d++m+/kZSeiguxU61LFWpo=
+github.com/pion/rtcp v1.2.6/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE0=
+github.com/pion/rtp v1.6.2 h1:iGBerLX6JiDjB9NXuaPzHyxHFG9JsIEdgwTC0lp5n/U=
+github.com/pion/rtp v1.6.2/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
+github.com/pion/transport v0.12.2 h1:WYEjhloRHt1R86LhUKjC5y+P52Y11/QqEUalvtzVoys=
+github.com/pion/transport v0.12.2/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7 h1:3uJsdck53FDIpWwLeAXlia9p4C8j0BO2xZrqzKpL0D8=
+golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/pion/srtp/v2/key_derivation.go b/vendor/github.com/pion/srtp/v2/key_derivation.go
new file mode 100644
index 0000000..5bbf3aa
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/key_derivation.go
@@ -0,0 +1,63 @@
+package srtp
+
+import (
+ "crypto/aes"
+ "encoding/binary"
+)
+
+func aesCmKeyDerivation(label byte, masterKey, masterSalt []byte, indexOverKdr int, outLen int) ([]byte, error) {
+ if indexOverKdr != 0 {
+ // 24-bit "index DIV kdr" must be xored to prf input.
+ return nil, errNonZeroKDRNotSupported
+ }
+
+ // https://tools.ietf.org/html/rfc3711#appendix-B.3
+ // The input block for AES-CM is generated by exclusive-oring the master salt with the
+ // concatenation of the encryption key label 0x00 with (index DIV kdr),
+ // - index is 'rollover count' and DIV is 'divided by'
+
+ nMasterKey := len(masterKey)
+ nMasterSalt := len(masterSalt)
+
+ prfIn := make([]byte, nMasterKey)
+ copy(prfIn[:nMasterSalt], masterSalt)
+
+ prfIn[7] ^= label
+
+ // The resulting value is then AES encrypted using the master key to get the cipher key.
+ block, err := aes.NewCipher(masterKey)
+ if err != nil {
+ return nil, err
+ }
+
+ out := make([]byte, ((outLen+nMasterKey)/nMasterKey)*nMasterKey)
+ var i uint16
+ for n := 0; n < outLen; n += nMasterKey {
+ binary.BigEndian.PutUint16(prfIn[nMasterKey-2:], i)
+ block.Encrypt(out[n:n+nMasterKey], prfIn)
+ i++
+ }
+ return out[:outLen], nil
+}
+
+// Generate IV https://tools.ietf.org/html/rfc3711#section-4.1.1
+// where the 128-bit integer value IV SHALL be defined by the SSRC, the
+// SRTP packet index i, and the SRTP session salting key k_s, as below.
+// - ROC = a 32-bit unsigned rollover counter (ROC), which records how many
+// - times the 16-bit RTP sequence number has been reset to zero after
+// - passing through 65,535
+// i = 2^16 * ROC + SEQ
+// IV = (salt*2 ^ 16) | (ssrc*2 ^ 64) | (i*2 ^ 16)
+func generateCounter(sequenceNumber uint16, rolloverCounter uint32, ssrc uint32, sessionSalt []byte) []byte {
+ counter := make([]byte, 16)
+
+ binary.BigEndian.PutUint32(counter[4:], ssrc)
+ binary.BigEndian.PutUint32(counter[8:], rolloverCounter)
+ binary.BigEndian.PutUint32(counter[12:], uint32(sequenceNumber)<<16)
+
+ for i := range sessionSalt {
+ counter[i] ^= sessionSalt[i]
+ }
+
+ return counter
+}
diff --git a/vendor/github.com/pion/srtp/v2/keying.go b/vendor/github.com/pion/srtp/v2/keying.go
new file mode 100644
index 0000000..82fd4d9
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/keying.go
@@ -0,0 +1,54 @@
+package srtp
+
+const labelExtractorDtlsSrtp = "EXTRACTOR-dtls_srtp"
+
+// KeyingMaterialExporter allows package SRTP to extract keying material
+type KeyingMaterialExporter interface {
+ ExportKeyingMaterial(label string, context []byte, length int) ([]byte, error)
+}
+
+// ExtractSessionKeysFromDTLS allows setting the Config SessionKeys by
+// extracting them from DTLS. This behavior is defined in RFC5764:
+// https://tools.ietf.org/html/rfc5764
+func (c *Config) ExtractSessionKeysFromDTLS(exporter KeyingMaterialExporter, isClient bool) error {
+ keyLen, err := c.Profile.keyLen()
+ if err != nil {
+ return err
+ }
+
+ saltLen, err := c.Profile.saltLen()
+ if err != nil {
+ return err
+ }
+
+ keyingMaterial, err := exporter.ExportKeyingMaterial(labelExtractorDtlsSrtp, nil, (keyLen*2)+(saltLen*2))
+ if err != nil {
+ return err
+ }
+
+ offset := 0
+ clientWriteKey := append([]byte{}, keyingMaterial[offset:offset+keyLen]...)
+ offset += keyLen
+
+ serverWriteKey := append([]byte{}, keyingMaterial[offset:offset+keyLen]...)
+ offset += keyLen
+
+ clientWriteKey = append(clientWriteKey, keyingMaterial[offset:offset+saltLen]...)
+ offset += saltLen
+
+ serverWriteKey = append(serverWriteKey, keyingMaterial[offset:offset+saltLen]...)
+
+ if isClient {
+ c.Keys.LocalMasterKey = clientWriteKey[0:keyLen]
+ c.Keys.LocalMasterSalt = clientWriteKey[keyLen:]
+ c.Keys.RemoteMasterKey = serverWriteKey[0:keyLen]
+ c.Keys.RemoteMasterSalt = serverWriteKey[keyLen:]
+ return nil
+ }
+
+ c.Keys.LocalMasterKey = serverWriteKey[0:keyLen]
+ c.Keys.LocalMasterSalt = serverWriteKey[keyLen:]
+ c.Keys.RemoteMasterKey = clientWriteKey[0:keyLen]
+ c.Keys.RemoteMasterSalt = clientWriteKey[keyLen:]
+ return nil
+}
diff --git a/vendor/github.com/pion/srtp/v2/option.go b/vendor/github.com/pion/srtp/v2/option.go
new file mode 100644
index 0000000..d6159f1
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/option.go
@@ -0,0 +1,54 @@
+package srtp
+
+import (
+ "github.com/pion/transport/replaydetector"
+)
+
+// ContextOption represents option of Context using the functional options pattern.
+type ContextOption func(*Context) error
+
+// SRTPReplayProtection sets SRTP replay protection window size.
+func SRTPReplayProtection(windowSize uint) ContextOption { // nolint:golint
+ return func(c *Context) error {
+ c.newSRTPReplayDetector = func() replaydetector.ReplayDetector {
+ return replaydetector.WithWrap(windowSize, maxSequenceNumber)
+ }
+ return nil
+ }
+}
+
+// SRTCPReplayProtection sets SRTCP replay protection window size.
+func SRTCPReplayProtection(windowSize uint) ContextOption {
+ return func(c *Context) error {
+ c.newSRTCPReplayDetector = func() replaydetector.ReplayDetector {
+ return replaydetector.WithWrap(windowSize, maxSRTCPIndex)
+ }
+ return nil
+ }
+}
+
+// SRTPNoReplayProtection disables SRTP replay protection.
+func SRTPNoReplayProtection() ContextOption { // nolint:golint
+ return func(c *Context) error {
+ c.newSRTPReplayDetector = func() replaydetector.ReplayDetector {
+ return &nopReplayDetector{}
+ }
+ return nil
+ }
+}
+
+// SRTCPNoReplayProtection disables SRTCP replay protection.
+func SRTCPNoReplayProtection() ContextOption {
+ return func(c *Context) error {
+ c.newSRTCPReplayDetector = func() replaydetector.ReplayDetector {
+ return &nopReplayDetector{}
+ }
+ return nil
+ }
+}
+
+type nopReplayDetector struct{}
+
+func (s *nopReplayDetector) Check(uint64) (func(), bool) {
+ return func() {}, true
+}
diff --git a/vendor/github.com/pion/srtp/v2/protection_profile.go b/vendor/github.com/pion/srtp/v2/protection_profile.go
new file mode 100644
index 0000000..94476ad
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/protection_profile.go
@@ -0,0 +1,67 @@
+package srtp
+
+import "fmt"
+
+// ProtectionProfile specifies Cipher and AuthTag details, similar to TLS cipher suite
+type ProtectionProfile uint16
+
+// Supported protection profiles
+const (
+ ProtectionProfileAes128CmHmacSha1_80 ProtectionProfile = 0x0001
+ ProtectionProfileAeadAes128Gcm ProtectionProfile = 0x0007
+)
+
+func (p ProtectionProfile) keyLen() (int, error) {
+ switch p {
+ case ProtectionProfileAes128CmHmacSha1_80:
+ fallthrough
+ case ProtectionProfileAeadAes128Gcm:
+ return 16, nil
+ default:
+ return 0, fmt.Errorf("%w: %#v", errNoSuchSRTPProfile, p)
+ }
+}
+
+func (p ProtectionProfile) saltLen() (int, error) {
+ switch p {
+ case ProtectionProfileAes128CmHmacSha1_80:
+ return 14, nil
+ case ProtectionProfileAeadAes128Gcm:
+ return 12, nil
+ default:
+ return 0, fmt.Errorf("%w: %#v", errNoSuchSRTPProfile, p)
+ }
+}
+
+func (p ProtectionProfile) authTagLen() (int, error) {
+ switch p {
+ case ProtectionProfileAes128CmHmacSha1_80:
+ return (&srtpCipherAesCmHmacSha1{}).authTagLen(), nil
+ case ProtectionProfileAeadAes128Gcm:
+ return (&srtpCipherAeadAesGcm{}).authTagLen(), nil
+ default:
+ return 0, fmt.Errorf("%w: %#v", errNoSuchSRTPProfile, p)
+ }
+}
+
+func (p ProtectionProfile) aeadAuthTagLen() (int, error) {
+ switch p {
+ case ProtectionProfileAes128CmHmacSha1_80:
+ return (&srtpCipherAesCmHmacSha1{}).aeadAuthTagLen(), nil
+ case ProtectionProfileAeadAes128Gcm:
+ return (&srtpCipherAeadAesGcm{}).aeadAuthTagLen(), nil
+ default:
+ return 0, fmt.Errorf("%w: %#v", errNoSuchSRTPProfile, p)
+ }
+}
+
+func (p ProtectionProfile) authKeyLen() (int, error) {
+ switch p {
+ case ProtectionProfileAes128CmHmacSha1_80:
+ return 20, nil
+ case ProtectionProfileAeadAes128Gcm:
+ return 0, nil
+ default:
+ return 0, fmt.Errorf("%w: %#v", errNoSuchSRTPProfile, p)
+ }
+}
diff --git a/vendor/github.com/pion/srtp/v2/renovate.json b/vendor/github.com/pion/srtp/v2/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/srtp/v2/session.go b/vendor/github.com/pion/srtp/v2/session.go
new file mode 100644
index 0000000..95520f7
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/session.go
@@ -0,0 +1,150 @@
+package srtp
+
+import (
+ "io"
+ "net"
+ "sync"
+
+ "github.com/pion/logging"
+ "github.com/pion/transport/packetio"
+)
+
+type streamSession interface {
+ Close() error
+ write([]byte) (int, error)
+ decrypt([]byte) error
+}
+
+type session struct {
+ localContextMutex sync.Mutex
+ localContext, remoteContext *Context
+ localOptions, remoteOptions []ContextOption
+
+ newStream chan readStream
+
+ started chan interface{}
+ closed chan interface{}
+
+ readStreamsClosed bool
+ readStreams map[uint32]readStream
+ readStreamsLock sync.Mutex
+
+ log logging.LeveledLogger
+ bufferFactory func(packetType packetio.BufferPacketType, ssrc uint32) io.ReadWriteCloser
+
+ nextConn net.Conn
+}
+
+// Config is used to configure a session.
+// You can provide either a KeyingMaterialExporter to export keys
+// or directly pass the keys themselves.
+// After a Config is passed to a session it must not be modified.
+type Config struct {
+ Keys SessionKeys
+ Profile ProtectionProfile
+ BufferFactory func(packetType packetio.BufferPacketType, ssrc uint32) io.ReadWriteCloser
+ LoggerFactory logging.LoggerFactory
+
+ // List of local/remote context options.
+ // ReplayProtection is enabled on remote context by default.
+ // Default replay protection window size is 64.
+ LocalOptions, RemoteOptions []ContextOption
+}
+
+// SessionKeys bundles the keys required to setup an SRTP session
+type SessionKeys struct {
+ LocalMasterKey []byte
+ LocalMasterSalt []byte
+ RemoteMasterKey []byte
+ RemoteMasterSalt []byte
+}
+
+func (s *session) getOrCreateReadStream(ssrc uint32, child streamSession, proto func() readStream) (readStream, bool) {
+ s.readStreamsLock.Lock()
+ defer s.readStreamsLock.Unlock()
+
+ if s.readStreamsClosed {
+ return nil, false
+ }
+
+ r, ok := s.readStreams[ssrc]
+ if ok {
+ return r, false
+ }
+
+ // Create the readStream.
+ r = proto()
+
+ if err := r.init(child, ssrc); err != nil {
+ return nil, false
+ }
+
+ s.readStreams[ssrc] = r
+ return r, true
+}
+
+func (s *session) removeReadStream(ssrc uint32) {
+ s.readStreamsLock.Lock()
+ defer s.readStreamsLock.Unlock()
+
+ if s.readStreamsClosed {
+ return
+ }
+
+ delete(s.readStreams, ssrc)
+}
+
+func (s *session) close() error {
+ if s.nextConn == nil {
+ return nil
+ } else if err := s.nextConn.Close(); err != nil {
+ return err
+ }
+
+ <-s.closed
+ return nil
+}
+
+func (s *session) start(localMasterKey, localMasterSalt, remoteMasterKey, remoteMasterSalt []byte, profile ProtectionProfile, child streamSession) error {
+ var err error
+ s.localContext, err = CreateContext(localMasterKey, localMasterSalt, profile, s.localOptions...)
+ if err != nil {
+ return err
+ }
+
+ s.remoteContext, err = CreateContext(remoteMasterKey, remoteMasterSalt, profile, s.remoteOptions...)
+ if err != nil {
+ return err
+ }
+
+ go func() {
+ defer func() {
+ close(s.newStream)
+
+ s.readStreamsLock.Lock()
+ s.readStreamsClosed = true
+ s.readStreamsLock.Unlock()
+ close(s.closed)
+ }()
+
+ b := make([]byte, 8192)
+ for {
+ var i int
+ i, err = s.nextConn.Read(b)
+ if err != nil {
+ if err != io.EOF {
+ s.log.Error(err.Error())
+ }
+ return
+ }
+
+ if err = child.decrypt(b[:i]); err != nil {
+ s.log.Info(err.Error())
+ }
+ }
+ }()
+
+ close(s.started)
+
+ return nil
+}
diff --git a/vendor/github.com/pion/srtp/v2/session_srtcp.go b/vendor/github.com/pion/srtp/v2/session_srtcp.go
new file mode 100644
index 0000000..a5fb656
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/session_srtcp.go
@@ -0,0 +1,180 @@
+package srtp
+
+import (
+ "net"
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/rtcp"
+)
+
+const defaultSessionSRTCPReplayProtectionWindow = 64
+
+// SessionSRTCP implements io.ReadWriteCloser and provides a bi-directional SRTCP session
+// SRTCP itself does not have a design like this, but it is common in most applications
+// for local/remote to each have their own keying material. This provides those patterns
+// instead of making everyone re-implement
+type SessionSRTCP struct {
+ session
+ writeStream *WriteStreamSRTCP
+}
+
+// NewSessionSRTCP creates a SRTCP session using conn as the underlying transport.
+func NewSessionSRTCP(conn net.Conn, config *Config) (*SessionSRTCP, error) { //nolint:dupl
+ if config == nil {
+ return nil, errNoConfig
+ } else if conn == nil {
+ return nil, errNoConn
+ }
+
+ loggerFactory := config.LoggerFactory
+ if loggerFactory == nil {
+ loggerFactory = logging.NewDefaultLoggerFactory()
+ }
+
+ localOpts := append(
+ []ContextOption{},
+ config.LocalOptions...,
+ )
+ remoteOpts := append(
+ []ContextOption{
+ // Default options
+ SRTCPReplayProtection(defaultSessionSRTCPReplayProtectionWindow),
+ },
+ config.RemoteOptions...,
+ )
+
+ s := &SessionSRTCP{
+ session: session{
+ nextConn: conn,
+ localOptions: localOpts,
+ remoteOptions: remoteOpts,
+ readStreams: map[uint32]readStream{},
+ newStream: make(chan readStream),
+ started: make(chan interface{}),
+ closed: make(chan interface{}),
+ bufferFactory: config.BufferFactory,
+ log: loggerFactory.NewLogger("srtp"),
+ },
+ }
+ s.writeStream = &WriteStreamSRTCP{s}
+
+ err := s.session.start(
+ config.Keys.LocalMasterKey, config.Keys.LocalMasterSalt,
+ config.Keys.RemoteMasterKey, config.Keys.RemoteMasterSalt,
+ config.Profile,
+ s,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return s, nil
+}
+
+// OpenWriteStream returns the global write stream for the Session
+func (s *SessionSRTCP) OpenWriteStream() (*WriteStreamSRTCP, error) {
+ return s.writeStream, nil
+}
+
+// OpenReadStream opens a read stream for the given SSRC, it can be used
+// if you want a certain SSRC, but don't want to wait for AcceptStream
+func (s *SessionSRTCP) OpenReadStream(ssrc uint32) (*ReadStreamSRTCP, error) {
+ r, _ := s.session.getOrCreateReadStream(ssrc, s, newReadStreamSRTCP)
+
+ if readStream, ok := r.(*ReadStreamSRTCP); ok {
+ return readStream, nil
+ }
+ return nil, errFailedTypeAssertion
+}
+
+// AcceptStream returns a stream to handle RTCP for a single SSRC
+func (s *SessionSRTCP) AcceptStream() (*ReadStreamSRTCP, uint32, error) {
+ stream, ok := <-s.newStream
+ if !ok {
+ return nil, 0, errStreamAlreadyClosed
+ }
+
+ readStream, ok := stream.(*ReadStreamSRTCP)
+ if !ok {
+ return nil, 0, errFailedTypeAssertion
+ }
+
+ return readStream, stream.GetSSRC(), nil
+}
+
+// Close ends the session
+func (s *SessionSRTCP) Close() error {
+ return s.session.close()
+}
+
+// Private
+
+func (s *SessionSRTCP) write(buf []byte) (int, error) {
+ if _, ok := <-s.session.started; ok {
+ return 0, errStartedChannelUsedIncorrectly
+ }
+
+ s.session.localContextMutex.Lock()
+ encrypted, err := s.localContext.EncryptRTCP(nil, buf, nil)
+ s.session.localContextMutex.Unlock()
+
+ if err != nil {
+ return 0, err
+ }
+ return s.session.nextConn.Write(encrypted)
+}
+
+func (s *SessionSRTCP) setWriteDeadline(t time.Time) error {
+ return s.session.nextConn.SetWriteDeadline(t)
+}
+
+// create a list of Destination SSRCs
+// that's a superset of all Destinations in the slice.
+func destinationSSRC(pkts []rtcp.Packet) []uint32 {
+ ssrcSet := make(map[uint32]struct{})
+ for _, p := range pkts {
+ for _, ssrc := range p.DestinationSSRC() {
+ ssrcSet[ssrc] = struct{}{}
+ }
+ }
+
+ out := make([]uint32, 0, len(ssrcSet))
+ for ssrc := range ssrcSet {
+ out = append(out, ssrc)
+ }
+
+ return out
+}
+
+func (s *SessionSRTCP) decrypt(buf []byte) error {
+ decrypted, err := s.remoteContext.DecryptRTCP(buf, buf, nil)
+ if err != nil {
+ return err
+ }
+
+ pkt, err := rtcp.Unmarshal(decrypted)
+ if err != nil {
+ return err
+ }
+
+ for _, ssrc := range destinationSSRC(pkt) {
+ r, isNew := s.session.getOrCreateReadStream(ssrc, s, newReadStreamSRTCP)
+ if r == nil {
+ return nil // Session has been closed
+ } else if isNew {
+ s.session.newStream <- r // Notify AcceptStream
+ }
+
+ readStream, ok := r.(*ReadStreamSRTCP)
+ if !ok {
+ return errFailedTypeAssertion
+ }
+
+ _, err = readStream.write(decrypted)
+ if err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/pion/srtp/v2/session_srtp.go b/vendor/github.com/pion/srtp/v2/session_srtp.go
new file mode 100644
index 0000000..dc815af
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/session_srtp.go
@@ -0,0 +1,171 @@
+package srtp
+
+import (
+ "net"
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/rtp"
+)
+
+const defaultSessionSRTPReplayProtectionWindow = 64
+
+// SessionSRTP implements io.ReadWriteCloser and provides a bi-directional SRTP session
+// SRTP itself does not have a design like this, but it is common in most applications
+// for local/remote to each have their own keying material. This provides those patterns
+// instead of making everyone re-implement
+type SessionSRTP struct {
+ session
+ writeStream *WriteStreamSRTP
+}
+
+// NewSessionSRTP creates a SRTP session using conn as the underlying transport.
+func NewSessionSRTP(conn net.Conn, config *Config) (*SessionSRTP, error) { //nolint:dupl
+ if config == nil {
+ return nil, errNoConfig
+ } else if conn == nil {
+ return nil, errNoConn
+ }
+
+ loggerFactory := config.LoggerFactory
+ if loggerFactory == nil {
+ loggerFactory = logging.NewDefaultLoggerFactory()
+ }
+
+ localOpts := append(
+ []ContextOption{},
+ config.LocalOptions...,
+ )
+ remoteOpts := append(
+ []ContextOption{
+ // Default options
+ SRTPReplayProtection(defaultSessionSRTPReplayProtectionWindow),
+ },
+ config.RemoteOptions...,
+ )
+
+ s := &SessionSRTP{
+ session: session{
+ nextConn: conn,
+ localOptions: localOpts,
+ remoteOptions: remoteOpts,
+ readStreams: map[uint32]readStream{},
+ newStream: make(chan readStream),
+ started: make(chan interface{}),
+ closed: make(chan interface{}),
+ bufferFactory: config.BufferFactory,
+ log: loggerFactory.NewLogger("srtp"),
+ },
+ }
+ s.writeStream = &WriteStreamSRTP{s}
+
+ err := s.session.start(
+ config.Keys.LocalMasterKey, config.Keys.LocalMasterSalt,
+ config.Keys.RemoteMasterKey, config.Keys.RemoteMasterSalt,
+ config.Profile,
+ s,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return s, nil
+}
+
+// OpenWriteStream returns the global write stream for the Session
+func (s *SessionSRTP) OpenWriteStream() (*WriteStreamSRTP, error) {
+ return s.writeStream, nil
+}
+
+// OpenReadStream opens a read stream for the given SSRC, it can be used
+// if you want a certain SSRC, but don't want to wait for AcceptStream
+func (s *SessionSRTP) OpenReadStream(ssrc uint32) (*ReadStreamSRTP, error) {
+ r, _ := s.session.getOrCreateReadStream(ssrc, s, newReadStreamSRTP)
+
+ if readStream, ok := r.(*ReadStreamSRTP); ok {
+ return readStream, nil
+ }
+
+ return nil, errFailedTypeAssertion
+}
+
+// AcceptStream returns a stream to handle RTCP for a single SSRC
+func (s *SessionSRTP) AcceptStream() (*ReadStreamSRTP, uint32, error) {
+ stream, ok := <-s.newStream
+ if !ok {
+ return nil, 0, errStreamAlreadyClosed
+ }
+
+ readStream, ok := stream.(*ReadStreamSRTP)
+ if !ok {
+ return nil, 0, errFailedTypeAssertion
+ }
+
+ return readStream, stream.GetSSRC(), nil
+}
+
+// Close ends the session
+func (s *SessionSRTP) Close() error {
+ return s.session.close()
+}
+
+func (s *SessionSRTP) write(b []byte) (int, error) {
+ packet := &rtp.Packet{}
+
+ err := packet.Unmarshal(b)
+ if err != nil {
+ return 0, nil
+ }
+
+ return s.writeRTP(&packet.Header, packet.Payload)
+}
+
+func (s *SessionSRTP) writeRTP(header *rtp.Header, payload []byte) (int, error) {
+ if _, ok := <-s.session.started; ok {
+ return 0, errStartedChannelUsedIncorrectly
+ }
+
+ s.session.localContextMutex.Lock()
+ encrypted, err := s.localContext.encryptRTP(nil, header, payload)
+ s.session.localContextMutex.Unlock()
+
+ if err != nil {
+ return 0, err
+ }
+
+ return s.session.nextConn.Write(encrypted)
+}
+
+func (s *SessionSRTP) setWriteDeadline(t time.Time) error {
+ return s.session.nextConn.SetWriteDeadline(t)
+}
+
+func (s *SessionSRTP) decrypt(buf []byte) error {
+ h := &rtp.Header{}
+ if err := h.Unmarshal(buf); err != nil {
+ return err
+ }
+
+ r, isNew := s.session.getOrCreateReadStream(h.SSRC, s, newReadStreamSRTP)
+ if r == nil {
+ return nil // Session has been closed
+ } else if isNew {
+ s.session.newStream <- r // Notify AcceptStream
+ }
+
+ readStream, ok := r.(*ReadStreamSRTP)
+ if !ok {
+ return errFailedTypeAssertion
+ }
+
+ decrypted, err := s.remoteContext.decryptRTP(buf, buf, h)
+ if err != nil {
+ return err
+ }
+
+ _, err = readStream.write(decrypted)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/pion/srtp/v2/srtcp.go b/vendor/github.com/pion/srtp/v2/srtcp.go
new file mode 100644
index 0000000..dbf5125
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/srtcp.go
@@ -0,0 +1,77 @@
+package srtp
+
+import (
+ "encoding/binary"
+ "fmt"
+
+ "github.com/pion/rtcp"
+)
+
+const maxSRTCPIndex = 0x7FFFFFFF
+
+func (c *Context) decryptRTCP(dst, encrypted []byte) ([]byte, error) {
+ out := allocateIfMismatch(dst, encrypted)
+ tailOffset := len(encrypted) - (c.cipher.authTagLen() + srtcpIndexSize)
+
+ if tailOffset < 0 {
+ return nil, fmt.Errorf("%w: %d", errTooShortRTCP, len(encrypted))
+ } else if isEncrypted := encrypted[tailOffset] >> 7; isEncrypted == 0 {
+ return out, nil
+ }
+
+ index := c.cipher.getRTCPIndex(encrypted)
+ ssrc := binary.BigEndian.Uint32(encrypted[4:])
+
+ s := c.getSRTCPSSRCState(ssrc)
+ markAsValid, ok := s.replayDetector.Check(uint64(index))
+ if !ok {
+ return nil, &errorDuplicated{Proto: "srtcp", SSRC: ssrc, Index: index}
+ }
+
+ out, err := c.cipher.decryptRTCP(out, encrypted, index, ssrc)
+ if err != nil {
+ return nil, err
+ }
+
+ markAsValid()
+ return out, nil
+}
+
+// DecryptRTCP decrypts a buffer that contains a RTCP packet
+func (c *Context) DecryptRTCP(dst, encrypted []byte, header *rtcp.Header) ([]byte, error) {
+ if header == nil {
+ header = &rtcp.Header{}
+ }
+
+ if err := header.Unmarshal(encrypted); err != nil {
+ return nil, err
+ }
+
+ return c.decryptRTCP(dst, encrypted)
+}
+
+func (c *Context) encryptRTCP(dst, decrypted []byte) ([]byte, error) {
+ ssrc := binary.BigEndian.Uint32(decrypted[4:])
+ s := c.getSRTCPSSRCState(ssrc)
+
+ // We roll over early because MSB is used for marking as encrypted
+ s.srtcpIndex++
+ if s.srtcpIndex > maxSRTCPIndex {
+ s.srtcpIndex = 0
+ }
+
+ return c.cipher.encryptRTCP(dst, decrypted, s.srtcpIndex, ssrc)
+}
+
+// EncryptRTCP Encrypts a RTCP packet
+func (c *Context) EncryptRTCP(dst, decrypted []byte, header *rtcp.Header) ([]byte, error) {
+ if header == nil {
+ header = &rtcp.Header{}
+ }
+
+ if err := header.Unmarshal(decrypted); err != nil {
+ return nil, err
+ }
+
+ return c.encryptRTCP(dst, decrypted)
+}
diff --git a/vendor/github.com/pion/srtp/v2/srtp.go b/vendor/github.com/pion/srtp/v2/srtp.go
new file mode 100644
index 0000000..c4ed3ac
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/srtp.go
@@ -0,0 +1,68 @@
+// Package srtp implements Secure Real-time Transport Protocol
+package srtp
+
+import (
+ "github.com/pion/rtp"
+)
+
+func (c *Context) decryptRTP(dst, ciphertext []byte, header *rtp.Header) ([]byte, error) {
+ s := c.getSRTPSSRCState(header.SSRC)
+
+ markAsValid, ok := s.replayDetector.Check(uint64(header.SequenceNumber))
+ if !ok {
+ return nil, &errorDuplicated{
+ Proto: "srtp", SSRC: header.SSRC, Index: uint32(header.SequenceNumber),
+ }
+ }
+
+ dst = growBufferSize(dst, len(ciphertext)-c.cipher.authTagLen())
+ roc, updateROC := s.nextRolloverCount(header.SequenceNumber)
+
+ dst, err := c.cipher.decryptRTP(dst, ciphertext, header, roc)
+ if err != nil {
+ return nil, err
+ }
+
+ markAsValid()
+ updateROC()
+ return dst, nil
+}
+
+// DecryptRTP decrypts a RTP packet with an encrypted payload
+func (c *Context) DecryptRTP(dst, encrypted []byte, header *rtp.Header) ([]byte, error) {
+ if header == nil {
+ header = &rtp.Header{}
+ }
+
+ if err := header.Unmarshal(encrypted); err != nil {
+ return nil, err
+ }
+
+ return c.decryptRTP(dst, encrypted, header)
+}
+
+// EncryptRTP marshals and encrypts an RTP packet, writing to the dst buffer provided.
+// If the dst buffer does not have the capacity to hold `len(plaintext) + 10` bytes, a new one will be allocated and returned.
+// If a rtp.Header is provided, it will be Unmarshaled using the plaintext.
+func (c *Context) EncryptRTP(dst []byte, plaintext []byte, header *rtp.Header) ([]byte, error) {
+ if header == nil {
+ header = &rtp.Header{}
+ }
+
+ if err := header.Unmarshal(plaintext); err != nil {
+ return nil, err
+ }
+
+ return c.encryptRTP(dst, header, plaintext[header.PayloadOffset:])
+}
+
+// encryptRTP marshals and encrypts an RTP packet, writing to the dst buffer provided.
+// If the dst buffer does not have the capacity, a new one will be allocated and returned.
+// Similar to above but faster because it can avoid unmarshaling the header and marshaling the payload.
+func (c *Context) encryptRTP(dst []byte, header *rtp.Header, payload []byte) (ciphertext []byte, err error) {
+ s := c.getSRTPSSRCState(header.SSRC)
+ roc, updateROC := s.nextRolloverCount(header.SequenceNumber)
+ updateROC()
+
+ return c.cipher.encryptRTP(dst, header, payload, roc)
+}
diff --git a/vendor/github.com/pion/srtp/v2/srtp_cipher.go b/vendor/github.com/pion/srtp/v2/srtp_cipher.go
new file mode 100644
index 0000000..4c5cd88
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/srtp_cipher.go
@@ -0,0 +1,46 @@
+package srtp
+
+import "github.com/pion/rtp"
+
+// cipher represents a implementation of one
+// of the SRTP Specific ciphers
+type srtpCipher interface {
+ // authTagLen returns auth key length of the cipher.
+ // See the note below.
+ authTagLen() int
+ // aeadAuthTagLen returns AEAD auth key length of the cipher.
+ // See the note below.
+ aeadAuthTagLen() int
+ getRTCPIndex([]byte) uint32
+
+ encryptRTP([]byte, *rtp.Header, []byte, uint32) ([]byte, error)
+ encryptRTCP([]byte, []byte, uint32, uint32) ([]byte, error)
+
+ decryptRTP([]byte, []byte, *rtp.Header, uint32) ([]byte, error)
+ decryptRTCP([]byte, []byte, uint32, uint32) ([]byte, error)
+}
+
+/*
+NOTE: Auth tag and AEAD auth tag are placed at the different position in SRTCP
+
+In non-AEAD cipher, the authentication tag is placed *after* the ESRTCP word
+(Encrypted-flag and SRTCP index).
+
+> AES_128_CM_HMAC_SHA1_80
+> | RTCP Header | Encrypted payload |E| SRTCP Index | Auth tag |
+> ^ |----------|
+> | ^
+> | authTagLen=10
+> aeadAuthTagLen=0
+
+In AEAD cipher, the AEAD authentication tag is embedded in the ciphertext.
+It is *before* the ESRTCP word (Encrypted-flag and SRTCP index).
+
+> AEAD_AES_128_GCM
+> | RTCP Header | Encrypted payload | AEAD auth tag |E| SRTCP Index |
+> |---------------| ^
+> ^ authTagLen=0
+> aeadAuthTagLen=16
+
+See https://tools.ietf.org/html/rfc7714 for the full specifications.
+*/
diff --git a/vendor/github.com/pion/srtp/v2/srtp_cipher_aead_aes_gcm.go b/vendor/github.com/pion/srtp/v2/srtp_cipher_aead_aes_gcm.go
new file mode 100644
index 0000000..2720679
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/srtp_cipher_aead_aes_gcm.go
@@ -0,0 +1,198 @@
+package srtp
+
+import (
+ "crypto/aes"
+ "crypto/cipher"
+ "encoding/binary"
+
+ "github.com/pion/rtp"
+)
+
+const (
+ rtcpEncryptionFlag = 0x80
+)
+
+type srtpCipherAeadAesGcm struct {
+ srtpCipher, srtcpCipher cipher.AEAD
+
+ srtpSessionSalt, srtcpSessionSalt []byte
+}
+
+func newSrtpCipherAeadAesGcm(masterKey, masterSalt []byte) (*srtpCipherAeadAesGcm, error) {
+ s := &srtpCipherAeadAesGcm{}
+
+ srtpSessionKey, err := aesCmKeyDerivation(labelSRTPEncryption, masterKey, masterSalt, 0, len(masterKey))
+ if err != nil {
+ return nil, err
+ }
+
+ srtpBlock, err := aes.NewCipher(srtpSessionKey)
+ if err != nil {
+ return nil, err
+ }
+
+ s.srtpCipher, err = cipher.NewGCM(srtpBlock)
+ if err != nil {
+ return nil, err
+ }
+
+ srtcpSessionKey, err := aesCmKeyDerivation(labelSRTCPEncryption, masterKey, masterSalt, 0, len(masterKey))
+ if err != nil {
+ return nil, err
+ }
+
+ srtcpBlock, err := aes.NewCipher(srtcpSessionKey)
+ if err != nil {
+ return nil, err
+ }
+
+ s.srtcpCipher, err = cipher.NewGCM(srtcpBlock)
+ if err != nil {
+ return nil, err
+ }
+
+ if s.srtpSessionSalt, err = aesCmKeyDerivation(labelSRTPSalt, masterKey, masterSalt, 0, len(masterSalt)); err != nil {
+ return nil, err
+ } else if s.srtcpSessionSalt, err = aesCmKeyDerivation(labelSRTCPSalt, masterKey, masterSalt, 0, len(masterSalt)); err != nil {
+ return nil, err
+ }
+
+ return s, nil
+}
+
+func (s *srtpCipherAeadAesGcm) authTagLen() int {
+ return 0
+}
+
+func (s *srtpCipherAeadAesGcm) aeadAuthTagLen() int {
+ return 16
+}
+
+func (s *srtpCipherAeadAesGcm) encryptRTP(dst []byte, header *rtp.Header, payload []byte, roc uint32) (ciphertext []byte, err error) {
+ // Grow the given buffer to fit the output.
+ dst = growBufferSize(dst, header.MarshalSize()+len(payload)+s.aeadAuthTagLen())
+
+ hdr, err := header.Marshal()
+ if err != nil {
+ return nil, err
+ }
+
+ iv := s.rtpInitializationVector(header, roc)
+ nHdr := len(hdr)
+ s.srtpCipher.Seal(dst[nHdr:nHdr], iv, payload, hdr)
+ copy(dst[:nHdr], hdr)
+ return dst, nil
+}
+
+func (s *srtpCipherAeadAesGcm) decryptRTP(dst, ciphertext []byte, header *rtp.Header, roc uint32) ([]byte, error) {
+ // Grow the given buffer to fit the output.
+ nDst := len(ciphertext) - s.aeadAuthTagLen()
+ if nDst < 0 {
+ // Size of ciphertext is shorter than AEAD auth tag len.
+ return nil, errFailedToVerifyAuthTag
+ }
+ dst = growBufferSize(dst, nDst)
+
+ iv := s.rtpInitializationVector(header, roc)
+
+ if _, err := s.srtpCipher.Open(
+ dst[header.PayloadOffset:header.PayloadOffset], iv, ciphertext[header.PayloadOffset:], ciphertext[:header.PayloadOffset],
+ ); err != nil {
+ return nil, err
+ }
+
+ copy(dst[:header.PayloadOffset], ciphertext[:header.PayloadOffset])
+ return dst, nil
+}
+
+func (s *srtpCipherAeadAesGcm) encryptRTCP(dst, decrypted []byte, srtcpIndex uint32, ssrc uint32) ([]byte, error) {
+ aadPos := len(decrypted) + s.aeadAuthTagLen()
+ // Grow the given buffer to fit the output.
+ dst = growBufferSize(dst, aadPos+srtcpIndexSize)
+
+ iv := s.rtcpInitializationVector(srtcpIndex, ssrc)
+ aad := s.rtcpAdditionalAuthenticatedData(decrypted, srtcpIndex)
+
+ s.srtcpCipher.Seal(dst[8:8], iv, decrypted[8:], aad)
+
+ copy(dst[:8], decrypted[:8])
+ copy(dst[aadPos:aadPos+4], aad[8:12])
+ return dst, nil
+}
+
+func (s *srtpCipherAeadAesGcm) decryptRTCP(dst, encrypted []byte, srtcpIndex, ssrc uint32) ([]byte, error) {
+ aadPos := len(encrypted) - srtcpIndexSize
+ // Grow the given buffer to fit the output.
+ nDst := aadPos - s.aeadAuthTagLen()
+ if nDst < 0 {
+ // Size of ciphertext is shorter than AEAD auth tag len.
+ return nil, errFailedToVerifyAuthTag
+ }
+ dst = growBufferSize(dst, nDst)
+
+ iv := s.rtcpInitializationVector(srtcpIndex, ssrc)
+ aad := s.rtcpAdditionalAuthenticatedData(encrypted, srtcpIndex)
+
+ if _, err := s.srtcpCipher.Open(dst[8:8], iv, encrypted[8:aadPos], aad); err != nil {
+ return nil, err
+ }
+
+ copy(dst[:8], encrypted[:8])
+ return dst, nil
+}
+
+// The 12-octet IV used by AES-GCM SRTP is formed by first concatenating
+// 2 octets of zeroes, the 4-octet SSRC, the 4-octet rollover counter
+// (ROC), and the 2-octet sequence number (SEQ). The resulting 12-octet
+// value is then XORed to the 12-octet salt to form the 12-octet IV.
+//
+// https://tools.ietf.org/html/rfc7714#section-8.1
+func (s *srtpCipherAeadAesGcm) rtpInitializationVector(header *rtp.Header, roc uint32) []byte {
+ iv := make([]byte, 12)
+ binary.BigEndian.PutUint32(iv[2:], header.SSRC)
+ binary.BigEndian.PutUint32(iv[6:], roc)
+ binary.BigEndian.PutUint16(iv[10:], header.SequenceNumber)
+
+ for i := range iv {
+ iv[i] ^= s.srtpSessionSalt[i]
+ }
+ return iv
+}
+
+// The 12-octet IV used by AES-GCM SRTCP is formed by first
+// concatenating 2 octets of zeroes, the 4-octet SSRC identifier,
+// 2 octets of zeroes, a single "0" bit, and the 31-bit SRTCP index.
+// The resulting 12-octet value is then XORed to the 12-octet salt to
+// form the 12-octet IV.
+//
+// https://tools.ietf.org/html/rfc7714#section-9.1
+func (s *srtpCipherAeadAesGcm) rtcpInitializationVector(srtcpIndex uint32, ssrc uint32) []byte {
+ iv := make([]byte, 12)
+
+ binary.BigEndian.PutUint32(iv[2:], ssrc)
+ binary.BigEndian.PutUint32(iv[8:], srtcpIndex)
+
+ for i := range iv {
+ iv[i] ^= s.srtcpSessionSalt[i]
+ }
+ return iv
+}
+
+// In an SRTCP packet, a 1-bit Encryption flag is prepended to the
+// 31-bit SRTCP index to form a 32-bit value we shall call the
+// "ESRTCP word"
+//
+// https://tools.ietf.org/html/rfc7714#section-17
+func (s *srtpCipherAeadAesGcm) rtcpAdditionalAuthenticatedData(rtcpPacket []byte, srtcpIndex uint32) []byte {
+ aad := make([]byte, 12)
+
+ copy(aad, rtcpPacket[:8])
+ binary.BigEndian.PutUint32(aad[8:], srtcpIndex)
+ aad[8] |= rtcpEncryptionFlag
+
+ return aad
+}
+
+func (s *srtpCipherAeadAesGcm) getRTCPIndex(in []byte) uint32 {
+ return binary.BigEndian.Uint32(in[len(in)-4:]) &^ (rtcpEncryptionFlag << 24)
+}
diff --git a/vendor/github.com/pion/srtp/v2/srtp_cipher_aes_cm_hmac_sha1.go b/vendor/github.com/pion/srtp/v2/srtp_cipher_aes_cm_hmac_sha1.go
new file mode 100644
index 0000000..9d783d1
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/srtp_cipher_aes_cm_hmac_sha1.go
@@ -0,0 +1,228 @@
+package srtp
+
+import ( //nolint:gci
+ "crypto/aes"
+ "crypto/cipher"
+ "crypto/hmac"
+ "crypto/sha1" //nolint:gosec
+ "crypto/subtle"
+ "encoding/binary"
+ "hash"
+
+ "github.com/pion/rtp"
+)
+
+type srtpCipherAesCmHmacSha1 struct {
+ srtpSessionSalt []byte
+ srtpSessionAuth hash.Hash
+ srtpBlock cipher.Block
+
+ srtcpSessionSalt []byte
+ srtcpSessionAuth hash.Hash
+ srtcpBlock cipher.Block
+}
+
+func newSrtpCipherAesCmHmacSha1(masterKey, masterSalt []byte) (*srtpCipherAesCmHmacSha1, error) {
+ s := &srtpCipherAesCmHmacSha1{}
+ srtpSessionKey, err := aesCmKeyDerivation(labelSRTPEncryption, masterKey, masterSalt, 0, len(masterKey))
+ if err != nil {
+ return nil, err
+ } else if s.srtpBlock, err = aes.NewCipher(srtpSessionKey); err != nil {
+ return nil, err
+ }
+
+ srtcpSessionKey, err := aesCmKeyDerivation(labelSRTCPEncryption, masterKey, masterSalt, 0, len(masterKey))
+ if err != nil {
+ return nil, err
+ } else if s.srtcpBlock, err = aes.NewCipher(srtcpSessionKey); err != nil {
+ return nil, err
+ }
+
+ if s.srtpSessionSalt, err = aesCmKeyDerivation(labelSRTPSalt, masterKey, masterSalt, 0, len(masterSalt)); err != nil {
+ return nil, err
+ } else if s.srtcpSessionSalt, err = aesCmKeyDerivation(labelSRTCPSalt, masterKey, masterSalt, 0, len(masterSalt)); err != nil {
+ return nil, err
+ }
+
+ authKeyLen, err := ProtectionProfileAes128CmHmacSha1_80.authKeyLen()
+ if err != nil {
+ return nil, err
+ }
+
+ srtpSessionAuthTag, err := aesCmKeyDerivation(labelSRTPAuthenticationTag, masterKey, masterSalt, 0, authKeyLen)
+ if err != nil {
+ return nil, err
+ }
+
+ srtcpSessionAuthTag, err := aesCmKeyDerivation(labelSRTCPAuthenticationTag, masterKey, masterSalt, 0, authKeyLen)
+ if err != nil {
+ return nil, err
+ }
+
+ s.srtcpSessionAuth = hmac.New(sha1.New, srtcpSessionAuthTag)
+ s.srtpSessionAuth = hmac.New(sha1.New, srtpSessionAuthTag)
+ return s, nil
+}
+
+func (s *srtpCipherAesCmHmacSha1) authTagLen() int {
+ return 10
+}
+
+func (s *srtpCipherAesCmHmacSha1) aeadAuthTagLen() int {
+ return 0
+}
+
+func (s *srtpCipherAesCmHmacSha1) encryptRTP(dst []byte, header *rtp.Header, payload []byte, roc uint32) (ciphertext []byte, err error) {
+ // Grow the given buffer to fit the output.
+ dst = growBufferSize(dst, header.MarshalSize()+len(payload)+s.authTagLen())
+
+ // Copy the header unencrypted.
+ n, err := header.MarshalTo(dst)
+ if err != nil {
+ return nil, err
+ }
+
+ // Encrypt the payload
+ counter := generateCounter(header.SequenceNumber, roc, header.SSRC, s.srtpSessionSalt)
+ stream := cipher.NewCTR(s.srtpBlock, counter)
+ stream.XORKeyStream(dst[n:], payload)
+ n += len(payload)
+
+ // Generate the auth tag.
+ authTag, err := s.generateSrtpAuthTag(dst[:n], roc)
+ if err != nil {
+ return nil, err
+ }
+
+ // Write the auth tag to the dest.
+ copy(dst[n:], authTag)
+
+ return dst, nil
+}
+
+func (s *srtpCipherAesCmHmacSha1) decryptRTP(dst, ciphertext []byte, header *rtp.Header, roc uint32) ([]byte, error) {
+ // Split the auth tag and the cipher text into two parts.
+ actualTag := ciphertext[len(ciphertext)-s.authTagLen():]
+ ciphertext = ciphertext[:len(ciphertext)-s.authTagLen()]
+
+ // Generate the auth tag we expect to see from the ciphertext.
+ expectedTag, err := s.generateSrtpAuthTag(ciphertext, roc)
+ if err != nil {
+ return nil, err
+ }
+
+ // See if the auth tag actually matches.
+ // We use a constant time comparison to prevent timing attacks.
+ if subtle.ConstantTimeCompare(actualTag, expectedTag) != 1 {
+ return nil, errFailedToVerifyAuthTag
+ }
+
+ // Write the plaintext header to the destination buffer.
+ copy(dst, ciphertext[:header.PayloadOffset])
+
+ // Decrypt the ciphertext for the payload.
+ counter := generateCounter(header.SequenceNumber, roc, header.SSRC, s.srtpSessionSalt)
+ stream := cipher.NewCTR(s.srtpBlock, counter)
+ stream.XORKeyStream(dst[header.PayloadOffset:], ciphertext[header.PayloadOffset:])
+ return dst, nil
+}
+
+func (s *srtpCipherAesCmHmacSha1) encryptRTCP(dst, decrypted []byte, srtcpIndex uint32, ssrc uint32) ([]byte, error) {
+ dst = allocateIfMismatch(dst, decrypted)
+
+ // Encrypt everything after header
+ stream := cipher.NewCTR(s.srtcpBlock, generateCounter(uint16(srtcpIndex&0xffff), srtcpIndex>>16, ssrc, s.srtcpSessionSalt))
+ stream.XORKeyStream(dst[8:], dst[8:])
+
+ // Add SRTCP Index and set Encryption bit
+ dst = append(dst, make([]byte, 4)...)
+ binary.BigEndian.PutUint32(dst[len(dst)-4:], srtcpIndex)
+ dst[len(dst)-4] |= 0x80
+
+ authTag, err := s.generateSrtcpAuthTag(dst)
+ if err != nil {
+ return nil, err
+ }
+ return append(dst, authTag...), nil
+}
+
+func (s *srtpCipherAesCmHmacSha1) decryptRTCP(out, encrypted []byte, index, ssrc uint32) ([]byte, error) {
+ tailOffset := len(encrypted) - (s.authTagLen() + srtcpIndexSize)
+ out = out[0:tailOffset]
+
+ expectedTag, err := s.generateSrtcpAuthTag(encrypted[:len(encrypted)-s.authTagLen()])
+ if err != nil {
+ return nil, err
+ }
+
+ actualTag := encrypted[len(encrypted)-s.authTagLen():]
+ if subtle.ConstantTimeCompare(actualTag, expectedTag) != 1 {
+ return nil, errFailedToVerifyAuthTag
+ }
+
+ stream := cipher.NewCTR(s.srtcpBlock, generateCounter(uint16(index&0xffff), index>>16, ssrc, s.srtcpSessionSalt))
+ stream.XORKeyStream(out[8:], out[8:])
+
+ return out, nil
+}
+
+func (s *srtpCipherAesCmHmacSha1) generateSrtpAuthTag(buf []byte, roc uint32) ([]byte, error) {
+ // https://tools.ietf.org/html/rfc3711#section-4.2
+ // In the case of SRTP, M SHALL consist of the Authenticated
+ // Portion of the packet (as specified in Figure 1) concatenated with
+ // the ROC, M = Authenticated Portion || ROC;
+ //
+ // The pre-defined authentication transform for SRTP is HMAC-SHA1
+ // [RFC2104]. With HMAC-SHA1, the SRTP_PREFIX_LENGTH (Figure 3) SHALL
+ // be 0. For SRTP (respectively SRTCP), the HMAC SHALL be applied to
+ // the session authentication key and M as specified above, i.e.,
+ // HMAC(k_a, M). The HMAC output SHALL then be truncated to the n_tag
+ // left-most bits.
+ // - Authenticated portion of the packet is everything BEFORE MKI
+ // - k_a is the session message authentication key
+ // - n_tag is the bit-length of the output authentication tag
+ s.srtpSessionAuth.Reset()
+
+ if _, err := s.srtpSessionAuth.Write(buf); err != nil {
+ return nil, err
+ }
+
+ // For SRTP only, we need to hash the rollover counter as well.
+ rocRaw := [4]byte{}
+ binary.BigEndian.PutUint32(rocRaw[:], roc)
+
+ _, err := s.srtpSessionAuth.Write(rocRaw[:])
+ if err != nil {
+ return nil, err
+ }
+
+ // Truncate the hash to the first 10 bytes.
+ return s.srtpSessionAuth.Sum(nil)[0:s.authTagLen()], nil
+}
+
+func (s *srtpCipherAesCmHmacSha1) generateSrtcpAuthTag(buf []byte) ([]byte, error) {
+ // https://tools.ietf.org/html/rfc3711#section-4.2
+ //
+ // The pre-defined authentication transform for SRTP is HMAC-SHA1
+ // [RFC2104]. With HMAC-SHA1, the SRTP_PREFIX_LENGTH (Figure 3) SHALL
+ // be 0. For SRTP (respectively SRTCP), the HMAC SHALL be applied to
+ // the session authentication key and M as specified above, i.e.,
+ // HMAC(k_a, M). The HMAC output SHALL then be truncated to the n_tag
+ // left-most bits.
+ // - Authenticated portion of the packet is everything BEFORE MKI
+ // - k_a is the session message authentication key
+ // - n_tag is the bit-length of the output authentication tag
+ s.srtcpSessionAuth.Reset()
+
+ if _, err := s.srtcpSessionAuth.Write(buf); err != nil {
+ return nil, err
+ }
+
+ return s.srtcpSessionAuth.Sum(nil)[0:s.authTagLen()], nil
+}
+
+func (s *srtpCipherAesCmHmacSha1) getRTCPIndex(in []byte) uint32 {
+ tailOffset := len(in) - (s.authTagLen() + srtcpIndexSize)
+ srtcpIndexBuffer := in[tailOffset : tailOffset+srtcpIndexSize]
+ return binary.BigEndian.Uint32(srtcpIndexBuffer) &^ (1 << 31)
+}
diff --git a/vendor/github.com/pion/srtp/v2/stream.go b/vendor/github.com/pion/srtp/v2/stream.go
new file mode 100644
index 0000000..7b7a0cf
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/stream.go
@@ -0,0 +1,8 @@
+package srtp
+
+type readStream interface {
+ init(child streamSession, ssrc uint32) error
+
+ Read(buf []byte) (int, error)
+ GetSSRC() uint32
+}
diff --git a/vendor/github.com/pion/srtp/v2/stream_srtcp.go b/vendor/github.com/pion/srtp/v2/stream_srtcp.go
new file mode 100644
index 0000000..e335937
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/stream_srtcp.go
@@ -0,0 +1,157 @@
+package srtp
+
+import (
+ "errors"
+ "io"
+ "sync"
+ "time"
+
+ "github.com/pion/rtcp"
+ "github.com/pion/transport/packetio"
+)
+
+// Limit the buffer size to 100KB
+const srtcpBufferSize = 100 * 1000
+
+// ReadStreamSRTCP handles decryption for a single RTCP SSRC
+type ReadStreamSRTCP struct {
+ mu sync.Mutex
+
+ isInited bool
+ isClosed chan bool
+
+ session *SessionSRTCP
+ ssrc uint32
+
+ buffer io.ReadWriteCloser
+}
+
+func (r *ReadStreamSRTCP) write(buf []byte) (n int, err error) {
+ n, err = r.buffer.Write(buf)
+
+ if errors.Is(err, packetio.ErrFull) {
+ // Silently drop data when the buffer is full.
+ return len(buf), nil
+ }
+
+ return n, err
+}
+
+// Used by getOrCreateReadStream
+func newReadStreamSRTCP() readStream {
+ return &ReadStreamSRTCP{}
+}
+
+// ReadRTCP reads and decrypts full RTCP packet and its header from the nextConn
+func (r *ReadStreamSRTCP) ReadRTCP(buf []byte) (int, *rtcp.Header, error) {
+ n, err := r.Read(buf)
+ if err != nil {
+ return 0, nil, err
+ }
+
+ header := &rtcp.Header{}
+ err = header.Unmarshal(buf[:n])
+ if err != nil {
+ return 0, nil, err
+ }
+
+ return n, header, nil
+}
+
+// Read reads and decrypts full RTCP packet from the nextConn
+func (r *ReadStreamSRTCP) Read(buf []byte) (int, error) {
+ return r.buffer.Read(buf)
+}
+
+// SetReadDeadline sets the deadline for the Read operation.
+// Setting to zero means no deadline.
+func (r *ReadStreamSRTCP) SetReadDeadline(t time.Time) error {
+ if b, ok := r.buffer.(interface {
+ SetReadDeadline(time.Time) error
+ }); ok {
+ return b.SetReadDeadline(t)
+ }
+ return nil
+}
+
+// Close removes the ReadStream from the session and cleans up any associated state
+func (r *ReadStreamSRTCP) Close() error {
+ r.mu.Lock()
+ defer r.mu.Unlock()
+
+ if !r.isInited {
+ return errStreamNotInited
+ }
+
+ select {
+ case <-r.isClosed:
+ return errStreamAlreadyClosed
+ default:
+ err := r.buffer.Close()
+ if err != nil {
+ return err
+ }
+
+ r.session.removeReadStream(r.ssrc)
+ return nil
+ }
+}
+
+func (r *ReadStreamSRTCP) init(child streamSession, ssrc uint32) error {
+ sessionSRTCP, ok := child.(*SessionSRTCP)
+
+ r.mu.Lock()
+ defer r.mu.Unlock()
+ if !ok {
+ return errFailedTypeAssertion
+ } else if r.isInited {
+ return errStreamAlreadyInited
+ }
+
+ r.session = sessionSRTCP
+ r.ssrc = ssrc
+ r.isInited = true
+ r.isClosed = make(chan bool)
+
+ if r.session.bufferFactory != nil {
+ r.buffer = r.session.bufferFactory(packetio.RTCPBufferPacket, ssrc)
+ } else {
+ // Create a buffer and limit it to 100KB
+ buff := packetio.NewBuffer()
+ buff.SetLimitSize(srtcpBufferSize)
+ r.buffer = buff
+ }
+
+ return nil
+}
+
+// GetSSRC returns the SSRC we are demuxing for
+func (r *ReadStreamSRTCP) GetSSRC() uint32 {
+ return r.ssrc
+}
+
+// WriteStreamSRTCP is stream for a single Session that is used to encrypt RTCP
+type WriteStreamSRTCP struct {
+ session *SessionSRTCP
+}
+
+// WriteRTCP encrypts a RTCP header and its payload to the nextConn
+func (w *WriteStreamSRTCP) WriteRTCP(header *rtcp.Header, payload []byte) (int, error) {
+ headerRaw, err := header.Marshal()
+ if err != nil {
+ return 0, err
+ }
+
+ return w.session.write(append(headerRaw, payload...))
+}
+
+// Write encrypts and writes a full RTCP packets to the nextConn
+func (w *WriteStreamSRTCP) Write(b []byte) (int, error) {
+ return w.session.write(b)
+}
+
+// SetWriteDeadline sets the deadline for the Write operation.
+// Setting to zero means no deadline.
+func (w *WriteStreamSRTCP) SetWriteDeadline(t time.Time) error {
+ return w.session.setWriteDeadline(t)
+}
diff --git a/vendor/github.com/pion/srtp/v2/stream_srtp.go b/vendor/github.com/pion/srtp/v2/stream_srtp.go
new file mode 100644
index 0000000..c391adb
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/stream_srtp.go
@@ -0,0 +1,154 @@
+package srtp
+
+import (
+ "errors"
+ "io"
+ "sync"
+ "time"
+
+ "github.com/pion/rtp"
+ "github.com/pion/transport/packetio"
+)
+
+// Limit the buffer size to 1MB
+const srtpBufferSize = 1000 * 1000
+
+// ReadStreamSRTP handles decryption for a single RTP SSRC
+type ReadStreamSRTP struct {
+ mu sync.Mutex
+
+ isInited bool
+ isClosed chan bool
+
+ session *SessionSRTP
+ ssrc uint32
+
+ buffer io.ReadWriteCloser
+}
+
+// Used by getOrCreateReadStream
+func newReadStreamSRTP() readStream {
+ return &ReadStreamSRTP{}
+}
+
+func (r *ReadStreamSRTP) init(child streamSession, ssrc uint32) error {
+ sessionSRTP, ok := child.(*SessionSRTP)
+
+ r.mu.Lock()
+ defer r.mu.Unlock()
+
+ if !ok {
+ return errFailedTypeAssertion
+ } else if r.isInited {
+ return errStreamAlreadyInited
+ }
+
+ r.session = sessionSRTP
+ r.ssrc = ssrc
+ r.isInited = true
+ r.isClosed = make(chan bool)
+
+ // Create a buffer with a 1MB limit
+ if r.session.bufferFactory != nil {
+ r.buffer = r.session.bufferFactory(packetio.RTPBufferPacket, ssrc)
+ } else {
+ buff := packetio.NewBuffer()
+ buff.SetLimitSize(srtpBufferSize)
+ r.buffer = buff
+ }
+
+ return nil
+}
+
+func (r *ReadStreamSRTP) write(buf []byte) (n int, err error) {
+ n, err = r.buffer.Write(buf)
+
+ if errors.Is(err, packetio.ErrFull) {
+ // Silently drop data when the buffer is full.
+ return len(buf), nil
+ }
+
+ return n, err
+}
+
+// Read reads and decrypts full RTP packet from the nextConn
+func (r *ReadStreamSRTP) Read(buf []byte) (int, error) {
+ return r.buffer.Read(buf)
+}
+
+// ReadRTP reads and decrypts full RTP packet and its header from the nextConn
+func (r *ReadStreamSRTP) ReadRTP(buf []byte) (int, *rtp.Header, error) {
+ n, err := r.Read(buf)
+ if err != nil {
+ return 0, nil, err
+ }
+
+ header := &rtp.Header{}
+
+ err = header.Unmarshal(buf[:n])
+ if err != nil {
+ return 0, nil, err
+ }
+
+ return n, header, nil
+}
+
+// SetReadDeadline sets the deadline for the Read operation.
+// Setting to zero means no deadline.
+func (r *ReadStreamSRTP) SetReadDeadline(t time.Time) error {
+ if b, ok := r.buffer.(interface {
+ SetReadDeadline(time.Time) error
+ }); ok {
+ return b.SetReadDeadline(t)
+ }
+ return nil
+}
+
+// Close removes the ReadStream from the session and cleans up any associated state
+func (r *ReadStreamSRTP) Close() error {
+ r.mu.Lock()
+ defer r.mu.Unlock()
+
+ if !r.isInited {
+ return errStreamNotInited
+ }
+
+ select {
+ case <-r.isClosed:
+ return errStreamAlreadyClosed
+ default:
+ err := r.buffer.Close()
+ if err != nil {
+ return err
+ }
+
+ r.session.removeReadStream(r.ssrc)
+ return nil
+ }
+}
+
+// GetSSRC returns the SSRC we are demuxing for
+func (r *ReadStreamSRTP) GetSSRC() uint32 {
+ return r.ssrc
+}
+
+// WriteStreamSRTP is stream for a single Session that is used to encrypt RTP
+type WriteStreamSRTP struct {
+ session *SessionSRTP
+}
+
+// WriteRTP encrypts a RTP packet and writes to the connection
+func (w *WriteStreamSRTP) WriteRTP(header *rtp.Header, payload []byte) (int, error) {
+ return w.session.writeRTP(header, payload)
+}
+
+// Write encrypts and writes a full RTP packets to the nextConn
+func (w *WriteStreamSRTP) Write(b []byte) (int, error) {
+ return w.session.write(b)
+}
+
+// SetWriteDeadline sets the deadline for the Write operation.
+// Setting to zero means no deadline.
+func (w *WriteStreamSRTP) SetWriteDeadline(t time.Time) error {
+ return w.session.setWriteDeadline(t)
+}
diff --git a/vendor/github.com/pion/srtp/v2/util.go b/vendor/github.com/pion/srtp/v2/util.go
new file mode 100644
index 0000000..1ae34a6
--- /dev/null
+++ b/vendor/github.com/pion/srtp/v2/util.go
@@ -0,0 +1,33 @@
+package srtp
+
+import "bytes"
+
+// Grow the buffer size to the given number of bytes.
+func growBufferSize(buf []byte, size int) []byte {
+ if size <= cap(buf) {
+ return buf[:size]
+ }
+
+ buf2 := make([]byte, size)
+ copy(buf2, buf)
+ return buf2
+}
+
+// Check if buffers match, if not allocate a new buffer and return it
+func allocateIfMismatch(dst, src []byte) []byte {
+ if dst == nil {
+ dst = make([]byte, len(src))
+ copy(dst, src)
+ } else if !bytes.Equal(dst, src) { // bytes.Equal returns on ref equality, no optimization needed
+ extraNeeded := len(src) - len(dst)
+ if extraNeeded > 0 {
+ dst = append(dst, make([]byte, extraNeeded)...)
+ } else if extraNeeded < 0 {
+ dst = dst[:len(dst)+extraNeeded]
+ }
+
+ copy(dst, src)
+ }
+
+ return dst
+}
diff --git a/vendor/github.com/pion/stun/.codecov.yml b/vendor/github.com/pion/stun/.codecov.yml
new file mode 100644
index 0000000..7fa67fe
--- /dev/null
+++ b/vendor/github.com/pion/stun/.codecov.yml
@@ -0,0 +1,9 @@
+coverage:
+ status:
+ patch: off
+ project:
+ default:
+ # basic
+ target: 98
+ threshold: null
+ base: auto
diff --git a/vendor/github.com/pion/stun/.gitignore b/vendor/github.com/pion/stun/.gitignore
new file mode 100644
index 0000000..b9420d9
--- /dev/null
+++ b/vendor/github.com/pion/stun/.gitignore
@@ -0,0 +1,17 @@
+*-fuzz.zip
+.idea
+benchmark.*.write
+*.test
+*.out
+*.sw[poe]
+bench.go-*
+PACKAGES
+cmd/stun-cli/stun-cli
+cmd/stun-decode/stun-decode
+cmd/stun-bench/stun-bench
+cmd/stun-nat-behaviour/stun-nat-behaviour
+
+coverage.txt
+
+e2e/dump.pcap
+e2e/log-*.txt
diff --git a/vendor/github.com/pion/stun/.golangci.yml b/vendor/github.com/pion/stun/.golangci.yml
new file mode 100644
index 0000000..40ca69c
--- /dev/null
+++ b/vendor/github.com/pion/stun/.golangci.yml
@@ -0,0 +1,93 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ golint:
+ min-confidence: 0
+ gocyclo:
+ min-complexity: 15
+ maligned:
+ suggest-new: true
+ dupl:
+ threshold: 100
+ goconst:
+ min-len: 2
+ min-occurrences: 2
+ misspell:
+ locale: US
+ lll:
+ line-length: 140
+ goimports:
+ local-prefixes: github.com/pion
+ gocritic:
+ enabled-tags:
+ - performance
+ - style
+ - experimental
+ disabled-checks:
+ - commentedOutCode
+ - sloppyReassign
+
+issues:
+ exclude:
+ - "`assertHMACSize` - `blocksize` always receives `64`"
+ exclude-rules:
+ - text: "string `<nil>`"
+ linters:
+ - goconst
+
+ # Exclude some linters from running on tests files.
+ - path: _test\.go
+ linters:
+ - gocyclo
+ - errcheck
+ - dupl
+ - gosec
+ - goconst
+
+ # Ease some gocritic warnings on test files.
+ - path: _test\.go
+ text: "(unnamedResult|exitAfterDefer|unlambda)"
+ linters:
+ - gocritic
+
+ # Exclude known linters from partially hard-vendored code,
+ # which is impossible to exclude via "nolint" comments.
+ - path: internal/hmac/
+ text: "weak cryptographic primitive"
+ linters:
+ - gosec
+ - path: internal/hmac/
+ text: "Write\\` is not checked"
+ linters:
+ - errcheck
+
+ # Ease linting on benchmarking code.
+ - path: cmd/stun-bench/
+ linters:
+ - gosec
+ - errcheck
+ - unparam
+
+ - path: ^cmd/
+ linters:
+ - gocyclo
+ - path: ^cmd/
+ text: "(unnamedResult|exitAfterDefer)"
+ linters:
+ - gocritic
+
+linters:
+ enable-all: true
+ disable:
+ - funlen
+ - gochecknoglobals
+ - godox
+ - prealloc
+ - scopelint
+
+run:
+ skip-dirs:
+ - e2e
+ - fuzz
+ - testdata
+ - api
diff --git a/vendor/github.com/pion/stun/.goreleaser.yml b/vendor/github.com/pion/stun/.goreleaser.yml
new file mode 100644
index 0000000..d72bde6
--- /dev/null
+++ b/vendor/github.com/pion/stun/.goreleaser.yml
@@ -0,0 +1,39 @@
+before:
+ hooks:
+ - go mod tidy
+
+archives:
+- replacements:
+ darwin: Darwin
+ linux: Linux
+ windows: Windows
+ 386: i386
+ amd64: x86_64
+
+checksum:
+ name_template: 'checksums.txt'
+
+snapshot:
+ name_template: "{{ .Tag }}-next"
+
+changelog:
+ sort: asc
+ filters:
+ exclude:
+ - '^docs:'
+ - '^test:'
+
+builds:
+ - binary: stun-not-behavior
+ id: stun-not-behavior
+ goos:
+ - darwin
+ - windows
+ - linux
+ - freebsd
+ goarch:
+ - amd64
+ - 386
+ env:
+ - CGO_ENABLED=0
+ main: ./cmd/stun-nat-behavior
diff --git a/vendor/github.com/pion/stun/.travis.yml b/vendor/github.com/pion/stun/.travis.yml
new file mode 100644
index 0000000..e464e84
--- /dev/null
+++ b/vendor/github.com/pion/stun/.travis.yml
@@ -0,0 +1,135 @@
+#
+# DO NOT EDIT THIS FILE DIRECTLY
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+# If this repository should have package specific CI config,
+# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
+#
+
+dist: bionic
+language: go
+
+
+branches:
+ only:
+ - master
+
+env:
+ global:
+ - GO111MODULE=on
+ - GOLANGCI_LINT_VERSION=1.19.1
+
+cache:
+ directories:
+ - ${HOME}/.cache/go-build
+ - ${GOPATH}/pkg/mod
+ npm: true
+ yarn: true
+
+_lint_job: &lint_job
+ env: CACHE_NAME=lint
+ before_install:
+ - if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
+ install: skip
+ before_script:
+ - |
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
+ | bash -s - -b $GOPATH/bin v${GOLANGCI_LINT_VERSION}
+ script:
+ - bash .github/assert-contributors.sh
+ - bash .github/lint-disallowed-functions-in-library.sh
+ - bash .github/lint-commit-message.sh
+ - bash .github/lint-filename.sh
+ - golangci-lint run ./...
+_test_job: &test_job
+ env: CACHE_NAME=test
+ before_install:
+ - if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
+ - go mod download
+ install:
+ - go build ./...
+ script:
+ - testpkgs=${TEST_PACKAGES:-$(go list ./... | grep -v examples)}
+ - coverpkgs=$(echo "${testpkgs}" | paste -s -d ',')
+ - |
+ go test \
+ -coverpkg=${coverpkgs} -coverprofile=cover.out -covermode=atomic \
+ ${TEST_EXTRA_ARGS:-} \
+ -v -race ${testpkgs}
+ - if [ -n "${TEST_HOOK}" ]; then ${TEST_HOOK}; fi
+ after_success:
+ - travis_retry bash <(curl -s https://codecov.io/bash) -c -F go
+_test_i386_job: &test_i386_job
+ env: CACHE_NAME=test386
+ services: docker
+ before_install:
+ - if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
+ script:
+ - testpkgs=${TEST_PACKAGES:-$(go list ./... | grep -v examples)}
+ - |
+ docker run \
+ -u $(id -u):$(id -g) \
+ -e "GO111MODULE=on" \
+ -e "CGO_ENABLED=0" \
+ -v ${PWD}:/go/src/github.com/pion/$(basename ${PWD}) \
+ -v ${HOME}/gopath/pkg/mod:/go/pkg/mod \
+ -v ${HOME}/.cache/go-build:/.cache/go-build \
+ -w /go/src/github.com/pion/$(basename ${PWD}) \
+ -it i386/golang:${GO_VERSION}-alpine \
+ /usr/local/go/bin/go test \
+ ${TEST_EXTRA_ARGS:-} \
+ -v ${testpkgs}
+_test_wasm_job: &test_wasm_job
+ env: CACHE_NAME=wasm
+ language: node_js
+ node_js: 12
+ before_install:
+ - if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
+ - if ${SKIP_WASM_TEST:-false}; then exit 0; fi
+ install:
+ # Manually download and install Go instead of using gimme.
+ # It looks like gimme Go causes some errors on go-test for Wasm.
+ - curl -sSfL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz | tar -C ~ -xzf -
+ - export GOROOT=${HOME}/go
+ - export PATH=${GOROOT}/bin:${PATH}
+ - yarn install
+ - export GO_JS_WASM_EXEC=${GO_JS_WASM_EXEC:-${GOROOT}/misc/wasm/go_js_wasm_exec}
+ script:
+ - testpkgs=${TEST_PACKAGES:-$(go list ./... | grep -v examples)}
+ - coverpkgs=$(echo "${testpkgs}" | paste -s -d ',')
+ - |
+ GOOS=js GOARCH=wasm go test \
+ -coverpkg=${coverpkgs} -coverprofile=cover.out -covermode=atomic \
+ -exec="${GO_JS_WASM_EXEC}" \
+ -v ${testpkgs}
+ after_success:
+ - travis_retry bash <(curl -s https://codecov.io/bash) -c -F wasm
+
+jobs:
+ include:
+ - <<: *lint_job
+ name: Lint 1.14
+ go: 1.14
+ - <<: *test_job
+ name: Test 1.13
+ go: 1.13
+ - <<: *test_job
+ name: Test 1.14
+ go: 1.14
+ - <<: *test_i386_job
+ name: Test i386 1.13
+ env: GO_VERSION=1.13
+ go: 1.14 # version for host environment used to go list
+ - <<: *test_i386_job
+ name: Test i386 1.14
+ env: GO_VERSION=1.14
+ go: 1.14 # version for host environment used to go list
+ - <<: *test_wasm_job
+ name: Test WASM 1.13
+ env: GO_VERSION=1.13
+ - <<: *test_wasm_job
+ name: Test WASM 1.14
+ env: GO_VERSION=1.14
+
+notifications:
+ email: false
diff --git a/vendor/github.com/pion/stun/AUTHORS b/vendor/github.com/pion/stun/AUTHORS
new file mode 100644
index 0000000..717af8f
--- /dev/null
+++ b/vendor/github.com/pion/stun/AUTHORS
@@ -0,0 +1,10 @@
+Sean DuBois <https://github.com/Sean-Der>
+Raphael Randschau <https://github.com/nicolai86>
+Aleksandr Razumov <ar@cydev.ru>
+Aliaksandr Valialkin <valyala@gmail.com>
+Michiel De Backker <https://github.com/backkem>
+Y.Horie <https://github.com/u5surf>
+songjiayang <https://github.com/songjiayang>
+The gortc project
+The IETF Trust
+The Go Authors
diff --git a/vendor/github.com/pion/stun/Dockerfile b/vendor/github.com/pion/stun/Dockerfile
new file mode 100644
index 0000000..429239a
--- /dev/null
+++ b/vendor/github.com/pion/stun/Dockerfile
@@ -0,0 +1,5 @@
+FROM golang:1.14
+
+COPY . /go/src/github.com/pion/stun
+
+RUN go test github.com/pion/stun
diff --git a/vendor/github.com/pion/stun/LICENSE.md b/vendor/github.com/pion/stun/LICENSE.md
new file mode 100644
index 0000000..5cc9cbd
--- /dev/null
+++ b/vendor/github.com/pion/stun/LICENSE.md
@@ -0,0 +1,7 @@
+Copyright 2018 Pion LLC
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/pion/stun/Makefile b/vendor/github.com/pion/stun/Makefile
new file mode 100644
index 0000000..43de8d0
--- /dev/null
+++ b/vendor/github.com/pion/stun/Makefile
@@ -0,0 +1,61 @@
+VERSION := $(shell git describe --tags | sed -e 's/^v//g' | awk -F "-" '{print $$1}')
+ITERATION := $(shell git describe --tags --long | awk -F "-" '{print $$2}')
+GO_VERSION=$(shell gobuild -v)
+GO := $(or $(GOROOT),/usr/lib/go)/bin/go
+PROCS := $(shell nproc)
+cores:
+ @echo "cores: $(PROCS)"
+bench:
+ go test -bench .
+bench-record:
+ $(GO) test -bench . > "benchmarks/stun-go-$(GO_VERSION).txt"
+fuzz-prepare-msg:
+ go-fuzz-build -func FuzzMessage -o stun-msg-fuzz.zip github.com/pion/stun
+fuzz-prepare-typ:
+ go-fuzz-build -func FuzzType -o stun-typ-fuzz.zip github.com/pion/stun
+fuzz-prepare-setters:
+ go-fuzz-build -func FuzzSetters -o stun-setters-fuzz.zip github.com/pion/stun
+fuzz-msg:
+ go-fuzz -bin=./stun-msg-fuzz.zip -workdir=fuzz/stun-msg
+fuzz-typ:
+ go-fuzz -bin=./stun-typ-fuzz.zip -workdir=fuzz/stun-typ
+fuzz-setters:
+ go-fuzz -bin=./stun-setters-fuzz.zip -workdir=fuzz/stun-setters
+fuzz-test:
+ go test -tags gofuzz -run TestFuzz -v .
+fuzz-reset-setters:
+ rm -f -v -r stun-setters-fuzz.zip fuzz/stun-setters
+lint:
+ @golangci-lint run ./...
+ @echo "ok"
+escape:
+ @echo "Not escapes, except autogenerated:"
+ @go build -gcflags '-m -l' 2>&1 \
+ | grep -v "<autogenerated>" \
+ | grep escapes
+format:
+ goimports -w .
+bench-compare:
+ go test -bench . > bench.go-16
+ go-tip test -bench . > bench.go-tip
+ @benchcmp bench.go-16 bench.go-tip
+install-fuzz:
+ go get -u github.com/dvyukov/go-fuzz/go-fuzz-build
+ go get github.com/dvyukov/go-fuzz/go-fuzz
+install:
+ go get gortc.io/api
+ go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
+docker-build:
+ docker build -t pion/stun .
+test-integration:
+ @cd e2e && bash ./test.sh
+prepush: assert test lint test-integration
+check-api:
+ @cd api && bash ./check.sh
+assert:
+ bash .github/assert-contributors.sh
+ bash .github/lint-disallowed-functions-in-library.sh
+ bash .github/lint-commit-message.sh
+test:
+ @./go.test.sh
+clean:
diff --git a/vendor/github.com/pion/stun/README.md b/vendor/github.com/pion/stun/README.md
new file mode 100644
index 0000000..6dd50d0
--- /dev/null
+++ b/vendor/github.com/pion/stun/README.md
@@ -0,0 +1,184 @@
+<h1 align="center">
+ <br>
+ Pion STUN
+ <br>
+</h1>
+<h4 align="center">A Go implementation of STUN</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-stun-gray.svg?longCache=true&colorB=brightgreen" alt="Pion stun"></a>
+ <!--<a href="https://sourcegraph.com/github.com/pion/webrtc?badge"><img src="https://sourcegraph.com/github.com/pion/webrtc/-/badge.svg" alt="Sourcegraph Widget"></a>-->
+ <a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/stun"><img src="https://travis-ci.org/pion/stun.svg?branch=master" alt="Build Status"></a>
+ <a href="https://pkg.go.dev/github.com/pion/stun"><img src="https://godoc.org/github.com/pion/stun?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/stun"><img src="https://codecov.io/gh/pion/stun/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/stun"><img src="https://goreportcard.com/badge/github.com/pion/stun" alt="Go Report Card"></a>
+ <!--<a href="https://www.codacy.com/app/Sean-Der/webrtc"><img src="https://api.codacy.com/project/badge/Grade/18f4aec384894e6aac0b94effe51961d" alt="Codacy Badge"></a>-->
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+### Roadmap
+The library is used as a part of our WebRTC implementation. Please refer to that [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
+
+### Community
+Pion has an active community on the [Golang Slack](https://invite.slack.golangbridge.org/). Sign up and join the **#pion** channel for discussions and support. You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
+* [Raphael Randschau](https://github.com/nicolai86) - *STUN client*
+* [Michiel De Backker](https://github.com/backkem) - *Minor fixes*
+* [Y.Horie](https://github.com/u5surf) - *Fix lint issues*
+* [Aleksandr Razumov](https://github.com/ernado) - *The v0.3 version*
+* [songjiayang](https://github.com/songjiayang)
+* [Adam Kiss](https://github.com/masterada)
+* [Moises Marangoni](https://github.com/Moisesbr)
+* [Yutaka Takeda](https://github.com/enobufs)
+* [Hugo Arregui](https://github.com/hugoArregui)
+* [Maanas Royy](https://github.com/maanas)
+* [Atsushi Watanabe](https://github.com/at-wat)
+* [Cecylia Bocovich](https://github.com/cohosh)
+* [Christian Muehlhaeuser](https://github.com/muesli)
+
+# STUN
+Package stun implements Session Traversal Utilities for NAT (STUN) [[RFC5389](https://tools.ietf.org/html/rfc5389)]
+protocol and [client](https://pkg.go.dev/github.com/pion/stun#Client) with no external dependencies and zero allocations in hot paths.
+Client [supports](https://pkg.go.dev/github.com/pion/stun#WithRTO) automatic request retransmissions.
+
+# Example
+You can get your current IP address from any STUN server by sending
+binding request. See more idiomatic example at `cmd/stun-client`.
+```go
+package main
+
+import (
+ "fmt"
+
+ "github.com/pion/stun"
+)
+
+func main() {
+ // Creating a "connection" to STUN server.
+ c, err := stun.Dial("udp", "stun.l.google.com:19302")
+ if err != nil {
+ panic(err)
+ }
+ // Building binding request with random transaction id.
+ message := stun.MustBuild(stun.TransactionID, stun.BindingRequest)
+ // Sending request to STUN server, waiting for response message.
+ if err := c.Do(message, func(res stun.Event) {
+ if res.Error != nil {
+ panic(res.Error)
+ }
+ // Decoding XOR-MAPPED-ADDRESS attribute from message.
+ var xorAddr stun.XORMappedAddress
+ if err := xorAddr.GetFrom(res.Message); err != nil {
+ panic(err)
+ }
+ fmt.Println("your IP is", xorAddr.IP)
+ }); err != nil {
+ panic(err)
+ }
+}
+```
+
+## Supported RFCs
+- [x] [RFC 5389](https://tools.ietf.org/html/rfc5389) — Session Traversal Utilities for NAT
+- [x] [RFC 5769](https://tools.ietf.org/html/rfc5769) — Test Vectors for STUN
+- [x] [RFC 6062](https://tools.ietf.org/html/rfc6062) — TURN extensions for TCP allocations
+- [x] [RFC 7064](https://tools.ietf.org/html/rfc7064) — STUN URI
+- [x] (TLS-over-)TCP client support
+- [ ] [ALTERNATE-SERVER](https://tools.ietf.org/html/rfc5389#section-11) support [#48](https://github.com/pion/stun/issues/48)
+- [ ] [RFC 5780](https://tools.ietf.org/html/rfc5780) — NAT Behavior Discovery Using STUN [#49](https://github.com/pion/stun/issues/49)
+
+# Stability
+Package is currently stable, no backward incompatible changes are expected
+with exception of critical bugs or security fixes.
+
+Additional attributes are unlikely to be implemented in scope of stun package,
+the only exception is constants for attribute or message types.
+
+# RFC 3489 notes
+RFC 5389 obsoletes RFC 3489, so implementation was ignored by purpose, however,
+RFC 3489 can be easily implemented as separate package.
+
+# Requirements
+Go 1.12 is currently supported and tested in CI.
+
+# Testing
+Client behavior is tested and verified in many ways:
+ * End-To-End with long-term credentials
+ * **coturn**: The coturn [server](https://github.com/coturn/coturn/wiki/turnserver) (linux)
+ * Bunch of code static checkers (linters)
+ * Standard unit-tests with coverage reporting (linux {amd64, **arm**64}, windows and darwin)
+ * Explicit API backward compatibility [check](https://github.com/gortc/api), see `api` directory
+
+See [TeamCity project](https://tc.gortc.io/project.html?projectId=stun&guest=1) and `e2e` directory
+for more information. Also the Wireshark `.pcap` files are available for e2e test in
+artifacts for build.
+
+# Benchmarks
+
+Intel(R) Core(TM) i7-8700K:
+
+```
+version: 1.16.5
+goos: linux
+goarch: amd64
+pkg: github.com/pion/stun
+PASS
+benchmark iter time/iter throughput bytes alloc allocs
+--------- ---- --------- ---------- ----------- ------
+BenchmarkMappedAddress_AddTo-12 30000000 36.40 ns/op 0 B/op 0 allocs/op
+BenchmarkAlternateServer_AddTo-12 50000000 36.70 ns/op 0 B/op 0 allocs/op
+BenchmarkAgent_GC-12 500000 2552.00 ns/op 0 B/op 0 allocs/op
+BenchmarkAgent_Process-12 50000000 38.00 ns/op 0 B/op 0 allocs/op
+BenchmarkMessage_GetNotFound-12 200000000 6.90 ns/op 0 B/op 0 allocs/op
+BenchmarkMessage_Get-12 200000000 7.61 ns/op 0 B/op 0 allocs/op
+BenchmarkClient_Do-12 2000000 1072.00 ns/op 0 B/op 0 allocs/op
+BenchmarkErrorCode_AddTo-12 20000000 67.00 ns/op 0 B/op 0 allocs/op
+BenchmarkErrorCodeAttribute_AddTo-12 30000000 52.20 ns/op 0 B/op 0 allocs/op
+BenchmarkErrorCodeAttribute_GetFrom-12 100000000 12.00 ns/op 0 B/op 0 allocs/op
+BenchmarkFingerprint_AddTo-12 20000000 102.00 ns/op 430.08 MB/s 0 B/op 0 allocs/op
+BenchmarkFingerprint_Check-12 30000000 54.80 ns/op 948.38 MB/s 0 B/op 0 allocs/op
+BenchmarkBuildOverhead/Build-12 5000000 333.00 ns/op 0 B/op 0 allocs/op
+BenchmarkBuildOverhead/BuildNonPointer-12 3000000 536.00 ns/op 100 B/op 4 allocs/op
+BenchmarkBuildOverhead/Raw-12 10000000 181.00 ns/op 0 B/op 0 allocs/op
+BenchmarkMessageIntegrity_AddTo-12 1000000 1053.00 ns/op 18.98 MB/s 0 B/op 0 allocs/op
+BenchmarkMessageIntegrity_Check-12 1000000 1135.00 ns/op 28.17 MB/s 0 B/op 0 allocs/op
+BenchmarkMessage_Write-12 100000000 27.70 ns/op 1011.09 MB/s 0 B/op 0 allocs/op
+BenchmarkMessageType_Value-12 2000000000 0.49 ns/op 0 B/op 0 allocs/op
+BenchmarkMessage_WriteTo-12 100000000 12.80 ns/op 0 B/op 0 allocs/op
+BenchmarkMessage_ReadFrom-12 50000000 25.00 ns/op 801.19 MB/s 0 B/op 0 allocs/op
+BenchmarkMessage_ReadBytes-12 100000000 18.00 ns/op 1113.03 MB/s 0 B/op 0 allocs/op
+BenchmarkIsMessage-12 2000000000 1.08 ns/op 18535.57 MB/s 0 B/op 0 allocs/op
+BenchmarkMessage_NewTransactionID-12 2000000 673.00 ns/op 0 B/op 0 allocs/op
+BenchmarkMessageFull-12 5000000 316.00 ns/op 0 B/op 0 allocs/op
+BenchmarkMessageFullHardcore-12 20000000 88.90 ns/op 0 B/op 0 allocs/op
+BenchmarkMessage_WriteHeader-12 200000000 8.18 ns/op 0 B/op 0 allocs/op
+BenchmarkMessage_CloneTo-12 30000000 37.90 ns/op 1795.32 MB/s 0 B/op 0 allocs/op
+BenchmarkMessage_AddTo-12 300000000 4.77 ns/op 0 B/op 0 allocs/op
+BenchmarkDecode-12 100000000 22.00 ns/op 0 B/op 0 allocs/op
+BenchmarkUsername_AddTo-12 50000000 23.20 ns/op 0 B/op 0 allocs/op
+BenchmarkUsername_GetFrom-12 100000000 17.90 ns/op 0 B/op 0 allocs/op
+BenchmarkNonce_AddTo-12 50000000 34.40 ns/op 0 B/op 0 allocs/op
+BenchmarkNonce_AddTo_BadLength-12 200000000 8.29 ns/op 0 B/op 0 allocs/op
+BenchmarkNonce_GetFrom-12 100000000 17.50 ns/op 0 B/op 0 allocs/op
+BenchmarkUnknownAttributes/AddTo-12 30000000 48.10 ns/op 0 B/op 0 allocs/op
+BenchmarkUnknownAttributes/GetFrom-12 100000000 20.90 ns/op 0 B/op 0 allocs/op
+BenchmarkXOR-12 50000000 25.80 ns/op 39652.86 MB/s 0 B/op 0 allocs/op
+BenchmarkXORSafe-12 3000000 515.00 ns/op 1988.04 MB/s 0 B/op 0 allocs/op
+BenchmarkXORFast-12 20000000 73.40 ns/op 13959.30 MB/s 0 B/op 0 allocs/op
+BenchmarkXORMappedAddress_AddTo-12 20000000 56.70 ns/op 0 B/op 0 allocs/op
+BenchmarkXORMappedAddress_GetFrom-12 50000000 37.40 ns/op 0 B/op 0 allocs/op
+ok github.com/pion/stun 76.868s
+```
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/stun/addr.go b/vendor/github.com/pion/stun/addr.go
new file mode 100644
index 0000000..c4d9653
--- /dev/null
+++ b/vendor/github.com/pion/stun/addr.go
@@ -0,0 +1,134 @@
+package stun
+
+import (
+ "fmt"
+ "io"
+ "net"
+ "strconv"
+)
+
+// MappedAddress represents MAPPED-ADDRESS attribute.
+//
+// This attribute is used only by servers for achieving backwards
+// compatibility with RFC 3489 clients.
+//
+// RFC 5389 Section 15.1
+type MappedAddress struct {
+ IP net.IP
+ Port int
+}
+
+// AlternateServer represents ALTERNATE-SERVER attribute.
+//
+// RFC 5389 Section 15.11
+type AlternateServer struct {
+ IP net.IP
+ Port int
+}
+
+// OtherAddress represents OTHER-ADDRESS attribute.
+//
+// RFC 5780 Section 7.4
+type OtherAddress struct {
+ IP net.IP
+ Port int
+}
+
+// AddTo adds ALTERNATE-SERVER attribute to message.
+func (s *AlternateServer) AddTo(m *Message) error {
+ a := (*MappedAddress)(s)
+ return a.addAs(m, AttrAlternateServer)
+}
+
+// GetFrom decodes ALTERNATE-SERVER from message.
+func (s *AlternateServer) GetFrom(m *Message) error {
+ a := (*MappedAddress)(s)
+ return a.getAs(m, AttrAlternateServer)
+}
+
+func (a MappedAddress) String() string {
+ return net.JoinHostPort(a.IP.String(), strconv.Itoa(a.Port))
+}
+
+func (a *MappedAddress) getAs(m *Message, t AttrType) error {
+ v, err := m.Get(t)
+ if err != nil {
+ return err
+ }
+ if len(v) <= 4 {
+ return io.ErrUnexpectedEOF
+ }
+ family := bin.Uint16(v[0:2])
+ if family != familyIPv6 && family != familyIPv4 {
+ return newDecodeErr("xor-mapped address", "family",
+ fmt.Sprintf("bad value %d", family),
+ )
+ }
+ ipLen := net.IPv4len
+ if family == familyIPv6 {
+ ipLen = net.IPv6len
+ }
+ // Ensuring len(a.IP) == ipLen and reusing a.IP.
+ if len(a.IP) < ipLen {
+ a.IP = a.IP[:cap(a.IP)]
+ for len(a.IP) < ipLen {
+ a.IP = append(a.IP, 0)
+ }
+ }
+ a.IP = a.IP[:ipLen]
+ for i := range a.IP {
+ a.IP[i] = 0
+ }
+ a.Port = int(bin.Uint16(v[2:4]))
+ copy(a.IP, v[4:])
+ return nil
+}
+
+func (a *MappedAddress) addAs(m *Message, t AttrType) error {
+ var (
+ family = familyIPv4
+ ip = a.IP
+ )
+ if len(a.IP) == net.IPv6len {
+ if isIPv4(ip) {
+ ip = ip[12:16] // like in ip.To4()
+ } else {
+ family = familyIPv6
+ }
+ } else if len(ip) != net.IPv4len {
+ return ErrBadIPLength
+ }
+ value := make([]byte, 128)
+ value[0] = 0 // first 8 bits are zeroes
+ bin.PutUint16(value[0:2], family)
+ bin.PutUint16(value[2:4], uint16(a.Port))
+ copy(value[4:], ip)
+ m.Add(t, value[:4+len(ip)])
+ return nil
+}
+
+// AddTo adds MAPPED-ADDRESS to message.
+func (a *MappedAddress) AddTo(m *Message) error {
+ return a.addAs(m, AttrMappedAddress)
+}
+
+// GetFrom decodes MAPPED-ADDRESS from message.
+func (a *MappedAddress) GetFrom(m *Message) error {
+ return a.getAs(m, AttrMappedAddress)
+}
+
+// AddTo adds OTHER-ADDRESS attribute to message.
+func (o *OtherAddress) AddTo(m *Message) error {
+ a := (*MappedAddress)(o)
+ return a.addAs(m, AttrOtherAddress)
+}
+
+// GetFrom decodes OTHER-ADDRESS from message.
+func (o *OtherAddress) GetFrom(m *Message) error {
+ a := (*MappedAddress)(o)
+ return a.getAs(m, AttrOtherAddress)
+}
+
+func (o OtherAddress) String() string {
+ return net.JoinHostPort(o.IP.String(), strconv.Itoa(o.Port))
+}
diff --git a/vendor/github.com/pion/stun/agent.go b/vendor/github.com/pion/stun/agent.go
new file mode 100644
index 0000000..6a8a473
--- /dev/null
+++ b/vendor/github.com/pion/stun/agent.go
@@ -0,0 +1,228 @@
+package stun
+
+import (
+ "errors"
+ "sync"
+ "time"
+)
+
+// NoopHandler just discards any event.
+var NoopHandler Handler = func(e Event) {}
+
+// NewAgent initializes and returns new Agent with provided handler.
+// If h is nil, the NoopHandler will be used.
+func NewAgent(h Handler) *Agent {
+ if h == nil {
+ h = NoopHandler
+ }
+ a := &Agent{
+ transactions: make(map[transactionID]agentTransaction),
+ handler: h,
+ }
+ return a
+}
+
+// Agent is low-level abstraction over transaction list that
+// handles concurrency (all calls are goroutine-safe) and
+// time outs (via Collect call).
+type Agent struct {
+ // transactions is map of transactions that are currently
+ // in progress. Event handling is done in such way when
+ // transaction is unregistered before agentTransaction access,
+ // minimizing mux lock and protecting agentTransaction from
+ // data races via unexpected concurrent access.
+ transactions map[transactionID]agentTransaction
+ closed bool // all calls are invalid if true
+ mux sync.Mutex // protects transactions and closed
+ handler Handler // handles transactions
+}
+
+// Handler handles state changes of transaction.
+//
+// Handler is called on transaction state change.
+// Usage of e is valid only during call, user must
+// copy needed fields explicitly.
+type Handler func(e Event)
+
+// Event is passed to Handler describing the transaction event.
+// Do not reuse outside Handler.
+type Event struct {
+ TransactionID [TransactionIDSize]byte
+ Message *Message
+ Error error
+}
+
+// agentTransaction represents transaction in progress.
+// Concurrent access is invalid.
+type agentTransaction struct {
+ id transactionID
+ deadline time.Time
+}
+
+var (
+ // ErrTransactionStopped indicates that transaction was manually stopped.
+ ErrTransactionStopped = errors.New("transaction is stopped")
+ // ErrTransactionNotExists indicates that agent failed to find transaction.
+ ErrTransactionNotExists = errors.New("transaction not exists")
+ // ErrTransactionExists indicates that transaction with same id is already
+ // registered.
+ ErrTransactionExists = errors.New("transaction exists with same id")
+)
+
+// StopWithError removes transaction from list and calls handler with
+// provided error. Can return ErrTransactionNotExists and ErrAgentClosed.
+func (a *Agent) StopWithError(id [TransactionIDSize]byte, err error) error {
+ a.mux.Lock()
+ if a.closed {
+ a.mux.Unlock()
+ return ErrAgentClosed
+ }
+ t, exists := a.transactions[id]
+ delete(a.transactions, id)
+ h := a.handler
+ a.mux.Unlock()
+ if !exists {
+ return ErrTransactionNotExists
+ }
+ h(Event{
+ TransactionID: t.id,
+ Error: err,
+ })
+ return nil
+}
+
+// Stop stops transaction by id with ErrTransactionStopped, blocking
+// until handler returns.
+func (a *Agent) Stop(id [TransactionIDSize]byte) error {
+ return a.StopWithError(id, ErrTransactionStopped)
+}
+
+// ErrAgentClosed indicates that agent is in closed state and is unable
+// to handle transactions.
+var ErrAgentClosed = errors.New("agent is closed")
+
+// Start registers transaction with provided id and deadline.
+// Could return ErrAgentClosed, ErrTransactionExists.
+//
+// Agent handler is guaranteed to be eventually called.
+func (a *Agent) Start(id [TransactionIDSize]byte, deadline time.Time) error {
+ a.mux.Lock()
+ defer a.mux.Unlock()
+ if a.closed {
+ return ErrAgentClosed
+ }
+ _, exists := a.transactions[id]
+ if exists {
+ return ErrTransactionExists
+ }
+ a.transactions[id] = agentTransaction{
+ id: id,
+ deadline: deadline,
+ }
+ return nil
+}
+
+// agentCollectCap is initial capacity for Agent.Collect slices,
+// sufficient to make function zero-alloc in most cases.
+const agentCollectCap = 100
+
+// ErrTransactionTimeOut indicates that transaction has reached deadline.
+var ErrTransactionTimeOut = errors.New("transaction is timed out")
+
+// Collect terminates all transactions that have deadline before provided
+// time, blocking until all handlers will process ErrTransactionTimeOut.
+// Will return ErrAgentClosed if agent is already closed.
+//
+// It is safe to call Collect concurrently but makes no sense.
+func (a *Agent) Collect(gcTime time.Time) error {
+ toRemove := make([]transactionID, 0, agentCollectCap)
+ a.mux.Lock()
+ if a.closed {
+ // Doing nothing if agent is closed.
+ // All transactions should be already closed
+ // during Close() call.
+ a.mux.Unlock()
+ return ErrAgentClosed
+ }
+ // Adding all transactions with deadline before gcTime
+ // to toCall and toRemove slices.
+ // No allocs if there are less than agentCollectCap
+ // timed out transactions.
+ for id, t := range a.transactions {
+ if t.deadline.Before(gcTime) {
+ toRemove = append(toRemove, id)
+ }
+ }
+ // Un-registering timed out transactions.
+ for _, id := range toRemove {
+ delete(a.transactions, id)
+ }
+ // Calling handler does not require locked mutex,
+ // reducing lock time.
+ h := a.handler
+ a.mux.Unlock()
+ // Sending ErrTransactionTimeOut to handler for all transactions,
+ // blocking until last one.
+ event := Event{
+ Error: ErrTransactionTimeOut,
+ }
+ for _, id := range toRemove {
+ event.TransactionID = id
+ h(event)
+ }
+ return nil
+}
+
+// Process incoming message, synchronously passing it to handler.
+func (a *Agent) Process(m *Message) error {
+ e := Event{
+ TransactionID: m.TransactionID,
+ Message: m,
+ }
+ a.mux.Lock()
+ if a.closed {
+ a.mux.Unlock()
+ return ErrAgentClosed
+ }
+ h := a.handler
+ delete(a.transactions, m.TransactionID)
+ a.mux.Unlock()
+ h(e)
+ return nil
+}
+
+// SetHandler sets agent handler to h.
+func (a *Agent) SetHandler(h Handler) error {
+ a.mux.Lock()
+ if a.closed {
+ a.mux.Unlock()
+ return ErrAgentClosed
+ }
+ a.handler = h
+ a.mux.Unlock()
+ return nil
+}
+
+// Close terminates all transactions with ErrAgentClosed and renders Agent to
+// closed state.
+func (a *Agent) Close() error {
+ e := Event{
+ Error: ErrAgentClosed,
+ }
+ a.mux.Lock()
+ if a.closed {
+ a.mux.Unlock()
+ return ErrAgentClosed
+ }
+ for _, t := range a.transactions {
+ e.TransactionID = t.id
+ a.handler(e)
+ }
+ a.transactions = nil
+ a.closed = true
+ a.handler = nil
+ a.mux.Unlock()
+ return nil
+}
+
+type transactionID [TransactionIDSize]byte
diff --git a/vendor/github.com/pion/stun/appveyor.yml b/vendor/github.com/pion/stun/appveyor.yml
new file mode 100644
index 0000000..664099d
--- /dev/null
+++ b/vendor/github.com/pion/stun/appveyor.yml
@@ -0,0 +1,22 @@
+version: "{build}"
+
+platform: x64
+
+branches:
+ only:
+ - master
+
+skip_tags: true
+
+clone_folder: c:\gopath\src\github.com\pion\stun
+
+environment:
+ GOPATH: c:\gopath
+ GOVERSION: 1.12
+
+install:
+ - go version
+ - go get -v -t .
+
+build_script:
+ - go test -v .
diff --git a/vendor/github.com/pion/stun/attributes.go b/vendor/github.com/pion/stun/attributes.go
new file mode 100644
index 0000000..7238234
--- /dev/null
+++ b/vendor/github.com/pion/stun/attributes.go
@@ -0,0 +1,226 @@
+package stun
+
+import (
+ "errors"
+ "fmt"
+)
+
+// Attributes is list of message attributes.
+type Attributes []RawAttribute
+
+// Get returns first attribute from list by the type.
+// If attribute is present the RawAttribute is returned and the
+// boolean is true. Otherwise the returned RawAttribute will be
+// empty and boolean will be false.
+func (a Attributes) Get(t AttrType) (RawAttribute, bool) {
+ for _, candidate := range a {
+ if candidate.Type == t {
+ return candidate, true
+ }
+ }
+ return RawAttribute{}, false
+}
+
+// AttrType is attribute type.
+type AttrType uint16
+
+// Required returns true if type is from comprehension-required range (0x0000-0x7FFF).
+func (t AttrType) Required() bool {
+ return t <= 0x7FFF
+}
+
+// Optional returns true if type is from comprehension-optional range (0x8000-0xFFFF).
+func (t AttrType) Optional() bool {
+ return t >= 0x8000
+}
+
+// Attributes from comprehension-required range (0x0000-0x7FFF).
+const (
+ AttrMappedAddress AttrType = 0x0001 // MAPPED-ADDRESS
+ AttrUsername AttrType = 0x0006 // USERNAME
+ AttrMessageIntegrity AttrType = 0x0008 // MESSAGE-INTEGRITY
+ AttrErrorCode AttrType = 0x0009 // ERROR-CODE
+ AttrUnknownAttributes AttrType = 0x000A // UNKNOWN-ATTRIBUTES
+ AttrRealm AttrType = 0x0014 // REALM
+ AttrNonce AttrType = 0x0015 // NONCE
+ AttrXORMappedAddress AttrType = 0x0020 // XOR-MAPPED-ADDRESS
+)
+
+// Attributes from comprehension-optional range (0x8000-0xFFFF).
+const (
+ AttrSoftware AttrType = 0x8022 // SOFTWARE
+ AttrAlternateServer AttrType = 0x8023 // ALTERNATE-SERVER
+ AttrFingerprint AttrType = 0x8028 // FINGERPRINT
+)
+
+// Attributes from RFC 5245 ICE.
+const (
+ AttrPriority AttrType = 0x0024 // PRIORITY
+ AttrUseCandidate AttrType = 0x0025 // USE-CANDIDATE
+ AttrICEControlled AttrType = 0x8029 // ICE-CONTROLLED
+ AttrICEControlling AttrType = 0x802A // ICE-CONTROLLING
+)
+
+// Attributes from RFC 5766 TURN.
+const (
+ AttrChannelNumber AttrType = 0x000C // CHANNEL-NUMBER
+ AttrLifetime AttrType = 0x000D // LIFETIME
+ AttrXORPeerAddress AttrType = 0x0012 // XOR-PEER-ADDRESS
+ AttrData AttrType = 0x0013 // DATA
+ AttrXORRelayedAddress AttrType = 0x0016 // XOR-RELAYED-ADDRESS
+ AttrEvenPort AttrType = 0x0018 // EVEN-PORT
+ AttrRequestedTransport AttrType = 0x0019 // REQUESTED-TRANSPORT
+ AttrDontFragment AttrType = 0x001A // DONT-FRAGMENT
+ AttrReservationToken AttrType = 0x0022 // RESERVATION-TOKEN
+)
+
+// Attributes from RFC 5780 NAT Behavior Discovery
+const (
+ AttrOtherAddress AttrType = 0x802C // OTHER-ADDRESS
+ AttrChangeRequest AttrType = 0x0003 // CHANGE-REQUEST
+)
+
+// Attributes from RFC 6062 TURN Extensions for TCP Allocations.
+const (
+ AttrConnectionID AttrType = 0x002a // CONNECTION-ID
+)
+
+// Attributes from RFC 6156 TURN IPv6.
+const (
+ AttrRequestedAddressFamily AttrType = 0x0017 // REQUESTED-ADDRESS-FAMILY
+)
+
+// Attributes from An Origin Attribute for the STUN Protocol.
+const (
+ AttrOrigin AttrType = 0x802F
+)
+
+// Value returns uint16 representation of attribute type.
+func (t AttrType) Value() uint16 {
+ return uint16(t)
+}
+
+var attrNames = map[AttrType]string{
+ AttrMappedAddress: "MAPPED-ADDRESS",
+ AttrUsername: "USERNAME",
+ AttrErrorCode: "ERROR-CODE",
+ AttrMessageIntegrity: "MESSAGE-INTEGRITY",
+ AttrUnknownAttributes: "UNKNOWN-ATTRIBUTES",
+ AttrRealm: "REALM",
+ AttrNonce: "NONCE",
+ AttrXORMappedAddress: "XOR-MAPPED-ADDRESS",
+ AttrSoftware: "SOFTWARE",
+ AttrAlternateServer: "ALTERNATE-SERVER",
+ AttrOtherAddress: "OTHER-ADDRESS",
+ AttrChangeRequest: "CHANGE-REQUEST",
+ AttrFingerprint: "FINGERPRINT",
+ AttrPriority: "PRIORITY",
+ AttrUseCandidate: "USE-CANDIDATE",
+ AttrICEControlled: "ICE-CONTROLLED",
+ AttrICEControlling: "ICE-CONTROLLING",
+ AttrChannelNumber: "CHANNEL-NUMBER",
+ AttrLifetime: "LIFETIME",
+ AttrXORPeerAddress: "XOR-PEER-ADDRESS",
+ AttrData: "DATA",
+ AttrXORRelayedAddress: "XOR-RELAYED-ADDRESS",
+ AttrEvenPort: "EVEN-PORT",
+ AttrRequestedTransport: "REQUESTED-TRANSPORT",
+ AttrDontFragment: "DONT-FRAGMENT",
+ AttrReservationToken: "RESERVATION-TOKEN",
+ AttrConnectionID: "CONNECTION-ID",
+ AttrRequestedAddressFamily: "REQUESTED-ADDRESS-FAMILY",
+ AttrOrigin: "ORIGIN",
+}
+
+func (t AttrType) String() string {
+ s, ok := attrNames[t]
+ if !ok {
+ // Just return hex representation of unknown attribute type.
+ return fmt.Sprintf("0x%x", uint16(t))
+ }
+ return s
+}
+
+// RawAttribute is a Type-Length-Value (TLV) object that
+// can be added to a STUN message. Attributes are divided into two
+// types: comprehension-required and comprehension-optional. STUN
+// agents can safely ignore comprehension-optional attributes they
+// don't understand, but cannot successfully process a message if it
+// contains comprehension-required attributes that are not
+// understood.
+type RawAttribute struct {
+ Type AttrType
+ Length uint16 // ignored while encoding
+ Value []byte
+}
+
+// AddTo implements Setter, adding attribute as a.Type with a.Value and ignoring
+// the Length field.
+func (a RawAttribute) AddTo(m *Message) error {
+ m.Add(a.Type, a.Value)
+ return nil
+}
+
+// Equal returns true if a == b.
+func (a RawAttribute) Equal(b RawAttribute) bool {
+ if a.Type != b.Type {
+ return false
+ }
+ if a.Length != b.Length {
+ return false
+ }
+ if len(b.Value) != len(a.Value) {
+ return false
+ }
+ for i, v := range a.Value {
+ if b.Value[i] != v {
+ return false
+ }
+ }
+ return true
+}
+
+func (a RawAttribute) String() string {
+ return fmt.Sprintf("%s: 0x%x", a.Type, a.Value)
+}
+
+// ErrAttributeNotFound means that attribute with provided attribute
+// type does not exist in message.
+var ErrAttributeNotFound = errors.New("attribute not found")
+
+// Get returns byte slice that represents attribute value,
+// if there is no attribute with such type,
+// ErrAttributeNotFound is returned.
+func (m *Message) Get(t AttrType) ([]byte, error) {
+ v, ok := m.Attributes.Get(t)
+ if !ok {
+ return nil, ErrAttributeNotFound
+ }
+ return v.Value, nil
+}
+
+// STUN aligns attributes on 32-bit boundaries, attributes whose content
+// is not a multiple of 4 bytes are padded with 1, 2, or 3 bytes of
+// padding so that its value contains a multiple of 4 bytes. The
+// padding bits are ignored, and may be any value.
+//
+// https://tools.ietf.org/html/rfc5389#section-15
+const padding = 4
+
+func nearestPaddedValueLength(l int) int {
+ n := padding * (l / padding)
+ if n < l {
+ n += padding
+ }
+ return n
+}
+
+// This method converts uint16 vlue to AttrType. If it finds an old attribute
+// type value, it also translates it to the new value to enable backward
+// compatibility. (See: https://github.com/pion/stun/issues/21)
+func compatAttrType(val uint16) AttrType {
+ if val == 0x8020 {
+ return AttrXORMappedAddress // new: 0x0020
+ }
+ return AttrType(val)
+}
diff --git a/vendor/github.com/pion/stun/attributes_debug.go b/vendor/github.com/pion/stun/attributes_debug.go
new file mode 100644
index 0000000..7bf09af
--- /dev/null
+++ b/vendor/github.com/pion/stun/attributes_debug.go
@@ -0,0 +1,33 @@
+// +build debug
+
+package stun
+
+import "fmt"
+
+// AttrOverflowErr occurs when len(v) > Max.
+type AttrOverflowErr struct {
+ Type AttrType
+ Max int
+ Got int
+}
+
+func (e AttrOverflowErr) Error() string {
+ return fmt.Sprintf("incorrect length of %s attribute: %d exceeds maximum %d",
+ e.Type, e.Got, e.Max,
+ )
+}
+
+// AttrLengthErr means that length for attribute is invalid.
+type AttrLengthErr struct {
+ Attr AttrType
+ Got int
+ Expected int
+}
+
+func (e AttrLengthErr) Error() string {
+ return fmt.Sprintf("incorrect length of %s attribute: got %d, expected %d",
+ e.Attr,
+ e.Got,
+ e.Expected,
+ )
+}
diff --git a/vendor/github.com/pion/stun/checks.go b/vendor/github.com/pion/stun/checks.go
new file mode 100644
index 0000000..a760997
--- /dev/null
+++ b/vendor/github.com/pion/stun/checks.go
@@ -0,0 +1,45 @@
+// +build !debug
+
+package stun
+
+import "github.com/pion/stun/internal/hmac"
+
+// CheckSize returns ErrAttrSizeInvalid if got is not equal to expected.
+func CheckSize(_ AttrType, got, expected int) error {
+ if got == expected {
+ return nil
+ }
+ return ErrAttributeSizeInvalid
+}
+
+func checkHMAC(got, expected []byte) error {
+ if hmac.Equal(got, expected) {
+ return nil
+ }
+ return ErrIntegrityMismatch
+}
+
+func checkFingerprint(got, expected uint32) error {
+ if got == expected {
+ return nil
+ }
+ return ErrFingerprintMismatch
+}
+
+// IsAttrSizeInvalid returns true if error means that attribute size is invalid.
+func IsAttrSizeInvalid(err error) bool {
+ return err == ErrAttributeSizeInvalid
+}
+
+// CheckOverflow returns ErrAttributeSizeOverflow if got is bigger that max.
+func CheckOverflow(_ AttrType, got, max int) error {
+ if got <= max {
+ return nil
+ }
+ return ErrAttributeSizeOverflow
+}
+
+// IsAttrSizeOverflow returns true if error means that attribute size is too big.
+func IsAttrSizeOverflow(err error) bool {
+ return err == ErrAttributeSizeOverflow
+}
diff --git a/vendor/github.com/pion/stun/checks_debug.go b/vendor/github.com/pion/stun/checks_debug.go
new file mode 100644
index 0000000..955f555
--- /dev/null
+++ b/vendor/github.com/pion/stun/checks_debug.go
@@ -0,0 +1,61 @@
+// +build debug
+
+package stun
+
+import "github.com/pion/stun/internal/hmac"
+
+// CheckSize returns *AttrLengthError if got is not equal to expected.
+func CheckSize(a AttrType, got, expected int) error {
+ if got == expected {
+ return nil
+ }
+ return &AttrLengthErr{
+ Got: got,
+ Expected: expected,
+ Attr: a,
+ }
+}
+
+func checkHMAC(got, expected []byte) error {
+ if hmac.Equal(got, expected) {
+ return nil
+ }
+ return &IntegrityErr{
+ Expected: expected,
+ Actual: got,
+ }
+}
+
+func checkFingerprint(got, expected uint32) error {
+ if got == expected {
+ return nil
+ }
+ return &CRCMismatch{
+ Actual: got,
+ Expected: expected,
+ }
+}
+
+// IsAttrSizeInvalid returns true if error means that attribute size is invalid.
+func IsAttrSizeInvalid(err error) bool {
+ _, ok := err.(*AttrLengthErr)
+ return ok
+}
+
+// CheckOverflow returns *AttrOverflowErr if got is bigger that max.
+func CheckOverflow(t AttrType, got, max int) error {
+ if got <= max {
+ return nil
+ }
+ return &AttrOverflowErr{
+ Type: t,
+ Got: got,
+ Max: max,
+ }
+}
+
+// IsAttrSizeOverflow returns true if error means that attribute size is too big.
+func IsAttrSizeOverflow(err error) bool {
+ _, ok := err.(*AttrOverflowErr)
+ return ok
+}
diff --git a/vendor/github.com/pion/stun/client.go b/vendor/github.com/pion/stun/client.go
new file mode 100644
index 0000000..62a0b6e
--- /dev/null
+++ b/vendor/github.com/pion/stun/client.go
@@ -0,0 +1,631 @@
+package stun
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "log"
+ "net"
+ "runtime"
+ "sync"
+ "sync/atomic"
+ "time"
+)
+
+// Dial connects to the address on the named network and then
+// initializes Client on that connection, returning error if any.
+func Dial(network, address string) (*Client, error) {
+ conn, err := net.Dial(network, address)
+ if err != nil {
+ return nil, err
+ }
+ return NewClient(conn)
+}
+
+// ErrNoConnection means that ClientOptions.Connection is nil.
+var ErrNoConnection = errors.New("no connection provided")
+
+// ClientOption sets some client option.
+type ClientOption func(c *Client)
+
+// WithHandler sets client handler which is called if Agent emits the Event
+// with TransactionID that is not currently registered by Client.
+// Useful for handling Data indications from TURN server.
+func WithHandler(h Handler) ClientOption {
+ return func(c *Client) {
+ c.handler = h
+ }
+}
+
+// WithRTO sets client RTO as defined in STUN RFC.
+func WithRTO(rto time.Duration) ClientOption {
+ return func(c *Client) {
+ c.rto = int64(rto)
+ }
+}
+
+// WithClock sets Clock of client, the source of current time.
+// Also clock is passed to default collector if set.
+func WithClock(clock Clock) ClientOption {
+ return func(c *Client) {
+ c.clock = clock
+ }
+}
+
+// WithTimeoutRate sets RTO timer minimum resolution.
+func WithTimeoutRate(d time.Duration) ClientOption {
+ return func(c *Client) {
+ c.rtoRate = d
+ }
+}
+
+// WithAgent sets client STUN agent.
+//
+// Defaults to agent implementation in current package,
+// see agent.go.
+func WithAgent(a ClientAgent) ClientOption {
+ return func(c *Client) {
+ c.a = a
+ }
+}
+
+// WithCollector rests client timeout collector, the implementation
+// of ticker which calls function on each tick.
+func WithCollector(coll Collector) ClientOption {
+ return func(c *Client) {
+ c.collector = coll
+ }
+}
+
+// WithNoConnClose prevents client from closing underlying connection when
+// the Close() method is called.
+var WithNoConnClose ClientOption = func(c *Client) {
+ c.closeConn = false
+}
+
+// WithNoRetransmit disables retransmissions and sets RTO to
+// defaultMaxAttempts * defaultRTO which will be effectively time out
+// if not set.
+//
+// Useful for TCP connections where transport handles RTO.
+func WithNoRetransmit(c *Client) {
+ c.maxAttempts = 0
+ if c.rto == 0 {
+ c.rto = defaultMaxAttempts * int64(defaultRTO)
+ }
+}
+
+const (
+ defaultTimeoutRate = time.Millisecond * 5
+ defaultRTO = time.Millisecond * 300
+ defaultMaxAttempts = 7
+)
+
+// NewClient initializes new Client from provided options,
+// starting internal goroutines and using default options fields
+// if necessary. Call Close method after using Client to close conn and
+// release resources.
+//
+// The conn will be closed on Close call. Use WithNoConnClose option to
+// prevent that.
+//
+// Note that user should handle the protocol multiplexing, client does not
+// provide any API for it, so if you need to read application data, wrap the
+// connection with your (de-)multiplexer and pass the wrapper as conn.
+func NewClient(conn Connection, options ...ClientOption) (*Client, error) {
+ c := &Client{
+ close: make(chan struct{}),
+ c: conn,
+ clock: systemClock,
+ rto: int64(defaultRTO),
+ rtoRate: defaultTimeoutRate,
+ t: make(map[transactionID]*clientTransaction, 100),
+ maxAttempts: defaultMaxAttempts,
+ closeConn: true,
+ }
+ for _, o := range options {
+ o(c)
+ }
+ if c.c == nil {
+ return nil, ErrNoConnection
+ }
+ if c.a == nil {
+ c.a = NewAgent(nil)
+ }
+ if err := c.a.SetHandler(c.handleAgentCallback); err != nil {
+ return nil, err
+ }
+ if c.collector == nil {
+ c.collector = &tickerCollector{
+ close: make(chan struct{}),
+ clock: c.clock,
+ }
+ }
+ if err := c.collector.Start(c.rtoRate, func(t time.Time) {
+ closedOrPanic(c.a.Collect(t))
+ }); err != nil {
+ return nil, err
+ }
+ c.wg.Add(1)
+ go c.readUntilClosed()
+ runtime.SetFinalizer(c, clientFinalizer)
+ return c, nil
+}
+
+func clientFinalizer(c *Client) {
+ if c == nil {
+ return
+ }
+ err := c.Close()
+ if err == ErrClientClosed {
+ return
+ }
+ if err == nil {
+ log.Println("client: called finalizer on non-closed client") // nolint
+ return
+ }
+ log.Println("client: called finalizer on non-closed client:", err) // nolint
+}
+
+// Connection wraps Reader, Writer and Closer interfaces.
+type Connection interface {
+ io.Reader
+ io.Writer
+ io.Closer
+}
+
+// ClientAgent is Agent implementation that is used by Client to
+// process transactions.
+type ClientAgent interface {
+ Process(*Message) error
+ Close() error
+ Start(id [TransactionIDSize]byte, deadline time.Time) error
+ Stop(id [TransactionIDSize]byte) error
+ Collect(time.Time) error
+ SetHandler(h Handler) error
+}
+
+// Client simulates "connection" to STUN server.
+type Client struct {
+ rto int64 // time.Duration
+ a ClientAgent
+ c Connection
+ close chan struct{}
+ rtoRate time.Duration
+ maxAttempts int32
+ closed bool
+ closeConn bool // should call c.Close() while closing
+ wg sync.WaitGroup
+ clock Clock
+ handler Handler
+ collector Collector
+ t map[transactionID]*clientTransaction
+
+ // mux guards closed and t
+ mux sync.RWMutex
+}
+
+// clientTransaction represents transaction in progress.
+// If transaction is succeed or failed, f will be called
+// provided by event.
+// Concurrent access is invalid.
+type clientTransaction struct {
+ id transactionID
+ attempt int32
+ calls int32
+ h Handler
+ start time.Time
+ rto time.Duration
+ raw []byte
+}
+
+func (t *clientTransaction) handle(e Event) {
+ if atomic.AddInt32(&t.calls, 1) == 1 {
+ t.h(e)
+ }
+}
+
+var clientTransactionPool = &sync.Pool{
+ New: func() interface{} {
+ return &clientTransaction{
+ raw: make([]byte, 1500),
+ }
+ },
+}
+
+func acquireClientTransaction() *clientTransaction {
+ return clientTransactionPool.Get().(*clientTransaction)
+}
+
+func putClientTransaction(t *clientTransaction) {
+ t.raw = t.raw[:0]
+ t.start = time.Time{}
+ t.attempt = 0
+ t.id = transactionID{}
+ clientTransactionPool.Put(t)
+}
+
+func (t *clientTransaction) nextTimeout(now time.Time) time.Time {
+ return now.Add(time.Duration(t.attempt+1) * t.rto)
+}
+
+// start registers transaction.
+//
+// Could return ErrClientClosed, ErrTransactionExists.
+func (c *Client) start(t *clientTransaction) error {
+ c.mux.Lock()
+ defer c.mux.Unlock()
+ if c.closed {
+ return ErrClientClosed
+ }
+ _, exists := c.t[t.id]
+ if exists {
+ return ErrTransactionExists
+ }
+ c.t[t.id] = t
+ return nil
+}
+
+// Clock abstracts the source of current time.
+type Clock interface {
+ Now() time.Time
+}
+
+type systemClockService struct{}
+
+func (systemClockService) Now() time.Time { return time.Now() }
+
+var systemClock = systemClockService{}
+
+// SetRTO sets current RTO value.
+func (c *Client) SetRTO(rto time.Duration) {
+ atomic.StoreInt64(&c.rto, int64(rto))
+}
+
+// StopErr occurs when Client fails to stop transaction while
+// processing error.
+type StopErr struct {
+ Err error // value returned by Stop()
+ Cause error // error that caused Stop() call
+}
+
+func (e StopErr) Error() string {
+ return fmt.Sprintf("error while stopping due to %s: %s", sprintErr(e.Cause), sprintErr(e.Err))
+}
+
+// CloseErr indicates client close failure.
+type CloseErr struct {
+ AgentErr error
+ ConnectionErr error
+}
+
+func sprintErr(err error) string {
+ if err == nil {
+ return "<nil>"
+ }
+ return err.Error()
+}
+
+func (c CloseErr) Error() string {
+ return fmt.Sprintf("failed to close: %s (connection), %s (agent)", sprintErr(c.ConnectionErr), sprintErr(c.AgentErr))
+}
+
+func (c *Client) readUntilClosed() {
+ defer c.wg.Done()
+ m := new(Message)
+ m.Raw = make([]byte, 1024)
+ for {
+ select {
+ case <-c.close:
+ return
+ default:
+ }
+ _, err := m.ReadFrom(c.c)
+ if err == nil {
+ if pErr := c.a.Process(m); pErr == ErrAgentClosed {
+ return
+ }
+ }
+ }
+}
+
+func closedOrPanic(err error) {
+ if err == nil || err == ErrAgentClosed {
+ return
+ }
+ panic(err) // nolint
+}
+
+type tickerCollector struct {
+ close chan struct{}
+ wg sync.WaitGroup
+ clock Clock
+}
+
+// Collector calls function f with constant rate.
+//
+// The simple Collector is ticker which calls function on each tick.
+type Collector interface {
+ Start(rate time.Duration, f func(now time.Time)) error
+ Close() error
+}
+
+func (a *tickerCollector) Start(rate time.Duration, f func(now time.Time)) error {
+ t := time.NewTicker(rate)
+ a.wg.Add(1)
+ go func() {
+ defer a.wg.Done()
+ for {
+ select {
+ case <-a.close:
+ t.Stop()
+ return
+ case <-t.C:
+ f(a.clock.Now())
+ }
+ }
+ }()
+ return nil
+}
+
+func (a *tickerCollector) Close() error {
+ close(a.close)
+ a.wg.Wait()
+ return nil
+}
+
+// ErrClientClosed indicates that client is closed.
+var ErrClientClosed = errors.New("client is closed")
+
+// Close stops internal connection and agent, returning CloseErr on error.
+func (c *Client) Close() error {
+ if err := c.checkInit(); err != nil {
+ return err
+ }
+ c.mux.Lock()
+ if c.closed {
+ c.mux.Unlock()
+ return ErrClientClosed
+ }
+ c.closed = true
+ c.mux.Unlock()
+ if closeErr := c.collector.Close(); closeErr != nil {
+ return closeErr
+ }
+ var connErr error
+ agentErr := c.a.Close()
+ if c.closeConn {
+ connErr = c.c.Close()
+ }
+ close(c.close)
+ c.wg.Wait()
+ if agentErr == nil && connErr == nil {
+ return nil
+ }
+ return CloseErr{
+ AgentErr: agentErr,
+ ConnectionErr: connErr,
+ }
+}
+
+// Indicate sends indication m to server. Shorthand to Start call
+// with zero deadline and callback.
+func (c *Client) Indicate(m *Message) error {
+ return c.Start(m, nil)
+}
+
+// callbackWaitHandler blocks on wait() call until callback is called.
+type callbackWaitHandler struct {
+ handler Handler
+ callback func(event Event)
+ cond *sync.Cond
+ processed bool
+}
+
+func (s *callbackWaitHandler) HandleEvent(e Event) {
+ s.cond.L.Lock()
+ if s.callback == nil {
+ panic("s.callback is nil") // nolint
+ }
+ s.callback(e)
+ s.processed = true
+ s.cond.Broadcast()
+ s.cond.L.Unlock()
+}
+
+func (s *callbackWaitHandler) wait() {
+ s.cond.L.Lock()
+ for !s.processed {
+ s.cond.Wait()
+ }
+ s.processed = false
+ s.callback = nil
+ s.cond.L.Unlock()
+}
+
+func (s *callbackWaitHandler) setCallback(f func(event Event)) {
+ if f == nil {
+ panic("f is nil") // nolint
+ }
+ s.cond.L.Lock()
+ s.callback = f
+ if s.handler == nil {
+ s.handler = s.HandleEvent
+ }
+ s.cond.L.Unlock()
+}
+
+var callbackWaitHandlerPool = sync.Pool{
+ New: func() interface{} {
+ return &callbackWaitHandler{
+ cond: sync.NewCond(new(sync.Mutex)),
+ }
+ },
+}
+
+// ErrClientNotInitialized means that client connection or agent is nil.
+var ErrClientNotInitialized = errors.New("client not initialized")
+
+func (c *Client) checkInit() error {
+ if c == nil || c.c == nil || c.a == nil || c.close == nil {
+ return ErrClientNotInitialized
+ }
+ return nil
+}
+
+// Do is Start wrapper that waits until callback is called. If no callback
+// provided, Indicate is called instead.
+//
+// Do has cpu overhead due to blocking, see BenchmarkClient_Do.
+// Use Start method for less overhead.
+func (c *Client) Do(m *Message, f func(Event)) error {
+ if err := c.checkInit(); err != nil {
+ return err
+ }
+ if f == nil {
+ return c.Indicate(m)
+ }
+ h := callbackWaitHandlerPool.Get().(*callbackWaitHandler)
+ h.setCallback(f)
+ defer func() {
+ callbackWaitHandlerPool.Put(h)
+ }()
+ if err := c.Start(m, h.handler); err != nil {
+ return err
+ }
+ h.wait()
+ return nil
+}
+
+func (c *Client) delete(id transactionID) {
+ c.mux.Lock()
+ if c.t != nil {
+ delete(c.t, id)
+ }
+ c.mux.Unlock()
+}
+
+type buffer struct {
+ buf []byte
+}
+
+var bufferPool = &sync.Pool{
+ New: func() interface{} {
+ return &buffer{buf: make([]byte, 2048)}
+ },
+}
+
+func (c *Client) handleAgentCallback(e Event) {
+ c.mux.Lock()
+ if c.closed {
+ c.mux.Unlock()
+ return
+ }
+ t, found := c.t[e.TransactionID]
+ if found {
+ delete(c.t, t.id)
+ }
+ c.mux.Unlock()
+ if !found {
+ if c.handler != nil && e.Error != ErrTransactionStopped {
+ c.handler(e)
+ }
+ // Ignoring.
+ return
+ }
+ if atomic.LoadInt32(&c.maxAttempts) <= t.attempt || e.Error == nil {
+ // Transaction completed.
+ t.handle(e)
+ putClientTransaction(t)
+ return
+ }
+ // Doing re-transmission.
+ t.attempt++
+ b := bufferPool.Get().(*buffer)
+ b.buf = b.buf[:copy(b.buf[:cap(b.buf)], t.raw)]
+ defer bufferPool.Put(b)
+ var (
+ now = c.clock.Now()
+ timeOut = t.nextTimeout(now)
+ id = t.id
+ )
+ // Starting client transaction.
+ if startErr := c.start(t); startErr != nil {
+ c.delete(id)
+ e.Error = startErr
+ t.handle(e)
+ putClientTransaction(t)
+ return
+ }
+ // Starting agent transaction.
+ if startErr := c.a.Start(id, timeOut); startErr != nil {
+ c.delete(id)
+ e.Error = startErr
+ t.handle(e)
+ putClientTransaction(t)
+ return
+ }
+ // Writing message to connection again.
+ _, writeErr := c.c.Write(b.buf)
+ if writeErr != nil {
+ c.delete(id)
+ e.Error = writeErr
+ // Stopping agent transaction instead of waiting until it's deadline.
+ // This will call handleAgentCallback with "ErrTransactionStopped" error
+ // which will be ignored.
+ if stopErr := c.a.Stop(id); stopErr != nil {
+ // Failed to stop agent transaction. Wrapping the error in StopError.
+ e.Error = StopErr{
+ Err: stopErr,
+ Cause: writeErr,
+ }
+ }
+ t.handle(e)
+ putClientTransaction(t)
+ return
+ }
+}
+
+// Start starts transaction (if h set) and writes message to server, handler
+// is called asynchronously.
+func (c *Client) Start(m *Message, h Handler) error {
+ if err := c.checkInit(); err != nil {
+ return err
+ }
+ c.mux.RLock()
+ closed := c.closed
+ c.mux.RUnlock()
+ if closed {
+ return ErrClientClosed
+ }
+ if h != nil {
+ // Starting transaction only if h is set. Useful for indications.
+ t := acquireClientTransaction()
+ t.id = m.TransactionID
+ t.start = c.clock.Now()
+ t.h = h
+ t.rto = time.Duration(atomic.LoadInt64(&c.rto))
+ t.attempt = 0
+ t.raw = append(t.raw[:0], m.Raw...)
+ t.calls = 0
+ d := t.nextTimeout(t.start)
+ if err := c.start(t); err != nil {
+ return err
+ }
+ if err := c.a.Start(m.TransactionID, d); err != nil {
+ return err
+ }
+ }
+ _, err := m.WriteTo(c.c)
+ if err != nil && h != nil {
+ c.delete(m.TransactionID)
+ // Stopping transaction instead of waiting until deadline.
+ if stopErr := c.a.Stop(m.TransactionID); stopErr != nil {
+ return StopErr{
+ Err: stopErr,
+ Cause: err,
+ }
+ }
+ }
+ return err
+}
diff --git a/vendor/github.com/pion/stun/errorcode.go b/vendor/github.com/pion/stun/errorcode.go
new file mode 100644
index 0000000..8095048
--- /dev/null
+++ b/vendor/github.com/pion/stun/errorcode.go
@@ -0,0 +1,158 @@
+package stun
+
+import (
+ "errors"
+ "fmt"
+ "io"
+)
+
+// ErrorCodeAttribute represents ERROR-CODE attribute.
+//
+// RFC 5389 Section 15.6
+type ErrorCodeAttribute struct {
+ Code ErrorCode
+ Reason []byte
+}
+
+func (c ErrorCodeAttribute) String() string {
+ return fmt.Sprintf("%d: %s", c.Code, c.Reason)
+}
+
+// constants for ERROR-CODE encoding.
+const (
+ errorCodeReasonStart = 4
+ errorCodeClassByte = 2
+ errorCodeNumberByte = 3
+ errorCodeReasonMaxB = 763
+ errorCodeModulo = 100
+)
+
+// AddTo adds ERROR-CODE to m.
+func (c ErrorCodeAttribute) AddTo(m *Message) error {
+ value := make([]byte, 0, errorCodeReasonMaxB)
+ if err := CheckOverflow(AttrErrorCode,
+ len(c.Reason)+errorCodeReasonStart,
+ errorCodeReasonMaxB+errorCodeReasonStart,
+ ); err != nil {
+ return err
+ }
+ value = value[:errorCodeReasonStart+len(c.Reason)]
+ number := byte(c.Code % errorCodeModulo) // error code modulo 100
+ class := byte(c.Code / errorCodeModulo) // hundred digit
+ value[errorCodeClassByte] = class
+ value[errorCodeNumberByte] = number
+ copy(value[errorCodeReasonStart:], c.Reason)
+ m.Add(AttrErrorCode, value)
+ return nil
+}
+
+// GetFrom decodes ERROR-CODE from m. Reason is valid until m.Raw is valid.
+func (c *ErrorCodeAttribute) GetFrom(m *Message) error {
+ v, err := m.Get(AttrErrorCode)
+ if err != nil {
+ return err
+ }
+ if len(v) < errorCodeReasonStart {
+ return io.ErrUnexpectedEOF
+ }
+ var (
+ class = uint16(v[errorCodeClassByte])
+ number = uint16(v[errorCodeNumberByte])
+ code = int(class*errorCodeModulo + number)
+ )
+ c.Code = ErrorCode(code)
+ c.Reason = v[errorCodeReasonStart:]
+ return nil
+}
+
+// ErrorCode is code for ERROR-CODE attribute.
+type ErrorCode int
+
+// ErrNoDefaultReason means that default reason for provided error code
+// is not defined in RFC.
+var ErrNoDefaultReason = errors.New("no default reason for ErrorCode")
+
+// AddTo adds ERROR-CODE with default reason to m. If there
+// is no default reason, returns ErrNoDefaultReason.
+func (c ErrorCode) AddTo(m *Message) error {
+ reason := errorReasons[c]
+ if reason == nil {
+ return ErrNoDefaultReason
+ }
+ a := &ErrorCodeAttribute{
+ Code: c,
+ Reason: reason,
+ }
+ return a.AddTo(m)
+}
+
+// Possible error codes.
+const (
+ CodeTryAlternate ErrorCode = 300
+ CodeBadRequest ErrorCode = 400
+ CodeUnauthorized ErrorCode = 401
+ CodeUnknownAttribute ErrorCode = 420
+ CodeStaleNonce ErrorCode = 438
+ CodeRoleConflict ErrorCode = 487
+ CodeServerError ErrorCode = 500
+)
+
+// DEPRECATED constants.
+const (
+ // DEPRECATED, use CodeUnauthorized.
+ CodeUnauthorised = CodeUnauthorized
+)
+
+// Error codes from RFC 5766.
+//
+// RFC 5766 Section 15
+const (
+ CodeForbidden ErrorCode = 403 // Forbidden
+ CodeAllocMismatch ErrorCode = 437 // Allocation Mismatch
+ CodeWrongCredentials ErrorCode = 441 // Wrong Credentials
+ CodeUnsupportedTransProto ErrorCode = 442 // Unsupported Transport Protocol
+ CodeAllocQuotaReached ErrorCode = 486 // Allocation Quota Reached
+ CodeInsufficientCapacity ErrorCode = 508 // Insufficient Capacity
+)
+
+// Error codes from RFC 6062.
+//
+// RFC 6062 Section 6.3
+const (
+ CodeConnAlreadyExists ErrorCode = 446
+ CodeConnTimeoutOrFailure ErrorCode = 447
+)
+
+// Error codes from RFC 6156.
+//
+// RFC 6156 Section 10.2
+const (
+ CodeAddrFamilyNotSupported ErrorCode = 440 // Address Family not Supported
+ CodePeerAddrFamilyMismatch ErrorCode = 443 // Peer Address Family Mismatch
+)
+
+var errorReasons = map[ErrorCode][]byte{
+ CodeTryAlternate: []byte("Try Alternate"),
+ CodeBadRequest: []byte("Bad Request"),
+ CodeUnauthorized: []byte("Unauthorized"),
+ CodeUnknownAttribute: []byte("Unknown Attribute"),
+ CodeStaleNonce: []byte("Stale Nonce"),
+ CodeServerError: []byte("Server Error"),
+ CodeRoleConflict: []byte("Role Conflict"),
+
+ // RFC 5766.
+ CodeForbidden: []byte("Forbidden"),
+ CodeAllocMismatch: []byte("Allocation Mismatch"),
+ CodeWrongCredentials: []byte("Wrong Credentials"),
+ CodeUnsupportedTransProto: []byte("Unsupported Transport Protocol"),
+ CodeAllocQuotaReached: []byte("Allocation Quota Reached"),
+ CodeInsufficientCapacity: []byte("Insufficient Capacity"),
+
+ // RFC 6062.
+ CodeConnAlreadyExists: []byte("Connection Already Exists"),
+ CodeConnTimeoutOrFailure: []byte("Connection Timeout or Failure"),
+
+ // RFC 6156.
+ CodeAddrFamilyNotSupported: []byte("Address Family not Supported"),
+ CodePeerAddrFamilyMismatch: []byte("Peer Address Family Mismatch"),
+}
diff --git a/vendor/github.com/pion/stun/errors.go b/vendor/github.com/pion/stun/errors.go
new file mode 100644
index 0000000..029c9e4
--- /dev/null
+++ b/vendor/github.com/pion/stun/errors.go
@@ -0,0 +1,62 @@
+package stun
+
+import "errors"
+
+// DecodeErr records an error and place when it is occurred.
+type DecodeErr struct {
+ Place DecodeErrPlace
+ Message string
+}
+
+// IsInvalidCookie returns true if error means that magic cookie
+// value is invalid.
+func (e DecodeErr) IsInvalidCookie() bool {
+ return e.Place == DecodeErrPlace{"message", "cookie"}
+}
+
+// IsPlaceParent reports if error place parent is p.
+func (e DecodeErr) IsPlaceParent(p string) bool {
+ return e.Place.Parent == p
+}
+
+// IsPlaceChildren reports if error place children is c.
+func (e DecodeErr) IsPlaceChildren(c string) bool {
+ return e.Place.Children == c
+}
+
+// IsPlace reports if error place is p.
+func (e DecodeErr) IsPlace(p DecodeErrPlace) bool {
+ return e.Place == p
+}
+
+// DecodeErrPlace records a place where error is occurred.
+type DecodeErrPlace struct {
+ Parent string
+ Children string
+}
+
+func (p DecodeErrPlace) String() string {
+ return p.Parent + "/" + p.Children
+}
+
+func (e DecodeErr) Error() string {
+ return "BadFormat for " + e.Place.String() + ": " + e.Message
+}
+
+func newDecodeErr(parent, children, message string) *DecodeErr {
+ return &DecodeErr{
+ Place: DecodeErrPlace{Parent: parent, Children: children},
+ Message: message,
+ }
+}
+
+// TODO(ar): rewrite errors to be more precise.
+func newAttrDecodeErr(children, message string) *DecodeErr {
+ return newDecodeErr("attribute", children, message)
+}
+
+// ErrAttributeSizeInvalid means that decoded attribute size is invalid.
+var ErrAttributeSizeInvalid = errors.New("attribute size is invalid")
+
+// ErrAttributeSizeOverflow means that decoded attribute size is too big.
+var ErrAttributeSizeOverflow = errors.New("attribute size overflow")
diff --git a/vendor/github.com/pion/stun/fingerprint.go b/vendor/github.com/pion/stun/fingerprint.go
new file mode 100644
index 0000000..aef80a2
--- /dev/null
+++ b/vendor/github.com/pion/stun/fingerprint.go
@@ -0,0 +1,67 @@
+package stun
+
+import (
+ "errors"
+ "hash/crc32"
+)
+
+// FingerprintAttr represents FINGERPRINT attribute.
+//
+// RFC 5389 Section 15.5
+type FingerprintAttr struct{}
+
+// ErrFingerprintMismatch means that computed fingerprint differs from expected.
+var ErrFingerprintMismatch = errors.New("fingerprint check failed")
+
+// Fingerprint is shorthand for FingerprintAttr.
+//
+// Example:
+//
+// m := New()
+// Fingerprint.AddTo(m)
+var Fingerprint FingerprintAttr
+
+const (
+ fingerprintXORValue uint32 = 0x5354554e //nolint:staticcheck
+ fingerprintSize = 4 // 32 bit
+)
+
+// FingerprintValue returns CRC-32 of b XOR-ed by 0x5354554e.
+//
+// The value of the attribute is computed as the CRC-32 of the STUN message
+// up to (but excluding) the FINGERPRINT attribute itself, XOR'ed with
+// the 32-bit value 0x5354554e (the XOR helps in cases where an
+// application packet is also using CRC-32 in it).
+func FingerprintValue(b []byte) uint32 {
+ return crc32.ChecksumIEEE(b) ^ fingerprintXORValue // XOR
+}
+
+// AddTo adds fingerprint to message.
+func (FingerprintAttr) AddTo(m *Message) error {
+ l := m.Length
+ // length in header should include size of fingerprint attribute
+ m.Length += fingerprintSize + attributeHeaderSize // increasing length
+ m.WriteLength() // writing Length to Raw
+ b := make([]byte, fingerprintSize)
+ val := FingerprintValue(m.Raw)
+ bin.PutUint32(b, val)
+ m.Length = l
+ m.Add(AttrFingerprint, b)
+ return nil
+}
+
+// Check reads fingerprint value from m and checks it, returning error if any.
+// Can return *AttrLengthErr, ErrAttributeNotFound, and *CRCMismatch.
+func (FingerprintAttr) Check(m *Message) error {
+ b, err := m.Get(AttrFingerprint)
+ if err != nil {
+ return err
+ }
+ if err = CheckSize(AttrFingerprint, len(b), fingerprintSize); err != nil {
+ return err
+ }
+ val := bin.Uint32(b)
+ attrStart := len(m.Raw) - (fingerprintSize + attributeHeaderSize)
+ expected := FingerprintValue(m.Raw[:attrStart])
+ return checkFingerprint(val, expected)
+}
diff --git a/vendor/github.com/pion/stun/fingerprint_debug.go b/vendor/github.com/pion/stun/fingerprint_debug.go
new file mode 100644
index 0000000..6da074c
--- /dev/null
+++ b/vendor/github.com/pion/stun/fingerprint_debug.go
@@ -0,0 +1,18 @@
+// +build debug
+
+package stun
+
+import "fmt"
+
+// CRCMismatch represents CRC check error.
+type CRCMismatch struct {
+ Expected uint32
+ Actual uint32
+}
+
+func (m CRCMismatch) Error() string {
+ return fmt.Sprintf("CRC mismatch: %x (expected) != %x (actual)",
+ m.Expected,
+ m.Actual,
+ )
+}
diff --git a/vendor/github.com/pion/stun/fuzz.go b/vendor/github.com/pion/stun/fuzz.go
new file mode 100644
index 0000000..debfa8d
--- /dev/null
+++ b/vendor/github.com/pion/stun/fuzz.go
@@ -0,0 +1,140 @@
+// +build gofuzz
+
+package stun
+
+import (
+ "encoding/binary"
+ "fmt"
+)
+
+var (
+ m = New()
+)
+
+// FuzzMessage is go-fuzz endpoint for message.
+func FuzzMessage(data []byte) int {
+ m.Reset()
+ // fuzzer dont know about cookies
+ binary.BigEndian.PutUint32(data[4:8], magicCookie)
+ // trying to read data as message
+ if _, err := m.Write(data); err != nil {
+ return 0
+ }
+ m2 := New()
+ if _, err := m2.Write(m.Raw); err != nil {
+ panic(err) // nolint
+ }
+ if m2.TransactionID != m.TransactionID {
+ panic("transaction ID mismatch") // nolint
+ }
+ if m2.Type != m.Type {
+ panic("type missmatch") // nolint
+ }
+ if len(m2.Attributes) != len(m.Attributes) {
+ panic("attributes length missmatch") // nolint
+ }
+ return 1
+}
+
+// FuzzType is go-fuzz endpoint for message type.
+func FuzzType(data []byte) int {
+ t := MessageType{}
+ vt, _ := binary.Uvarint(data)
+ v := uint16(vt) & 0x1fff // first 3 bits are empty
+ t.ReadValue(v)
+ v2 := t.Value()
+ if v != v2 {
+ panic("v != v2") // nolint
+ }
+ t2 := MessageType{}
+ t2.ReadValue(v2)
+ if t2 != t {
+ panic("t2 != t") // nolint
+ }
+ return 0
+}
+
+type attr interface {
+ Getter
+ Setter
+}
+
+type attrs []struct {
+ g attr
+ t AttrType
+}
+
+func (a attrs) pick(v byte) struct {
+ g attr
+ t AttrType
+} {
+ idx := int(v) % len(a)
+ return a[idx]
+}
+
+func FuzzSetters(data []byte) int {
+ var (
+ m1 = &Message{
+ Raw: make([]byte, 0, 2048),
+ }
+ m2 = &Message{
+ Raw: make([]byte, 0, 2048),
+ }
+ m3 = &Message{
+ Raw: make([]byte, 0, 2048),
+ }
+ )
+ attributes := attrs{
+ {new(Realm), AttrRealm},
+ {new(XORMappedAddress), AttrXORMappedAddress},
+ {new(Nonce), AttrNonce},
+ {new(Software), AttrSoftware},
+ {new(AlternateServer), AttrAlternateServer},
+ {new(ErrorCodeAttribute), AttrErrorCode},
+ {new(UnknownAttributes), AttrUnknownAttributes},
+ {new(Username), AttrUsername},
+ {new(MappedAddress), AttrMappedAddress},
+ {new(Realm), AttrRealm},
+ }
+ var firstByte = byte(0)
+ if len(data) > 0 {
+ firstByte = data[0]
+ }
+ a := attributes.pick(firstByte)
+ value := data
+ if len(data) > 1 {
+ value = value[1:]
+ }
+ m1.WriteHeader()
+ m1.Add(a.t, value)
+ err := a.g.GetFrom(m1)
+ if err == ErrAttributeNotFound {
+ fmt.Println("unexpected 404") // nolint
+ panic(err) // nolint
+ }
+ if err != nil {
+ return 1
+ }
+ m2.WriteHeader()
+ if err = a.g.AddTo(m2); err != nil {
+ // We allow decoding some text attributes
+ // when their length is too big, but
+ // not encoding.
+ if !IsAttrSizeOverflow(err) {
+ panic(err) // nolint
+ }
+ return 1
+ }
+ m3.WriteHeader()
+ v, err := m2.Get(a.t)
+ if err != nil {
+ panic(err) // nolint
+ }
+ m3.Add(a.t, v)
+
+ if !m2.Equal(m3) {
+ fmt.Println(m2, "not equal", m3) // nolint
+ panic("not equal") // nolint
+ }
+ return 1
+}
diff --git a/vendor/github.com/pion/stun/go.mod b/vendor/github.com/pion/stun/go.mod
new file mode 100644
index 0000000..72b5671
--- /dev/null
+++ b/vendor/github.com/pion/stun/go.mod
@@ -0,0 +1,3 @@
+module github.com/pion/stun
+
+go 1.12
diff --git a/vendor/github.com/pion/stun/go.sum b/vendor/github.com/pion/stun/go.sum
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vendor/github.com/pion/stun/go.sum
diff --git a/vendor/github.com/pion/stun/go.test.sh b/vendor/github.com/pion/stun/go.test.sh
new file mode 100644
index 0000000..25234e4
--- /dev/null
+++ b/vendor/github.com/pion/stun/go.test.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+set -e
+touch coverage.txt
+
+# test fuzz inputs
+go test -tags gofuzz -run TestFuzz -v .
+
+# quick-test without -race
+go test ./...
+
+# test with "debug" tag
+go test -tags debug ./...
+
+# test concurrency
+go test -race -cpu=1,2,4 -run TestClient_DoConcurrent
+
+for d in $(go list ./... | grep -v vendor); do
+ go test -race -coverprofile=profile.out -covermode=atomic "$d"
+ if [[ -f profile.out ]]; then
+ cat profile.out >> coverage.txt
+ rm profile.out
+ fi
+done
diff --git a/vendor/github.com/pion/stun/helpers.go b/vendor/github.com/pion/stun/helpers.go
new file mode 100644
index 0000000..158a51d
--- /dev/null
+++ b/vendor/github.com/pion/stun/helpers.go
@@ -0,0 +1,105 @@
+package stun
+
+// Interfaces that are implemented by message attributes, shorthands for them,
+// or helpers for message fields as type or transaction id.
+type (
+ // Setter sets *Message attribute.
+ Setter interface {
+ AddTo(m *Message) error
+ }
+ // Getter parses attribute from *Message.
+ Getter interface {
+ GetFrom(m *Message) error
+ }
+ // Checker checks *Message attribute.
+ Checker interface {
+ Check(m *Message) error
+ }
+)
+
+// Build resets message and applies setters to it in batch, returning on
+// first error. To prevent allocations, pass pointers to values.
+//
+// Example:
+// var (
+// t = BindingRequest
+// username = NewUsername("username")
+// nonce = NewNonce("nonce")
+// realm = NewRealm("example.org")
+// )
+// m := new(Message)
+// m.Build(t, username, nonce, realm) // 4 allocations
+// m.Build(&t, &username, &nonce, &realm) // 0 allocations
+//
+// See BenchmarkBuildOverhead.
+func (m *Message) Build(setters ...Setter) error {
+ m.Reset()
+ m.WriteHeader()
+ for _, s := range setters {
+ if err := s.AddTo(m); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// Check applies checkers to message in batch, returning on first error.
+func (m *Message) Check(checkers ...Checker) error {
+ for _, c := range checkers {
+ if err := c.Check(m); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// Parse applies getters to message in batch, returning on first error.
+func (m *Message) Parse(getters ...Getter) error {
+ for _, c := range getters {
+ if err := c.GetFrom(m); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// MustBuild wraps Build call and panics on error.
+func MustBuild(setters ...Setter) *Message {
+ m, err := Build(setters...)
+ if err != nil {
+ panic(err) // nolint
+ }
+ return m
+}
+
+// Build wraps Message.Build method.
+func Build(setters ...Setter) (*Message, error) {
+ m := new(Message)
+ if err := m.Build(setters...); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+// ForEach is helper that iterates over message attributes allowing to call
+// Getter in f callback to get all attributes of type t and returning on first
+// f error.
+//
+// The m.Get method inside f will be returning next attribute on each f call.
+// Does not error if there are no results.
+func (m *Message) ForEach(t AttrType, f func(m *Message) error) error {
+ attrs := m.Attributes
+ defer func() {
+ m.Attributes = attrs
+ }()
+ for i, a := range attrs {
+ if a.Type != t {
+ continue
+ }
+ m.Attributes = attrs[i:]
+ if err := f(m); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/pion/stun/integrity.go b/vendor/github.com/pion/stun/integrity.go
new file mode 100644
index 0000000..39b0d50
--- /dev/null
+++ b/vendor/github.com/pion/stun/integrity.go
@@ -0,0 +1,124 @@
+package stun
+
+import (
+ "crypto/md5" // #nosec
+ "crypto/sha1" // #nosec
+ "errors"
+ "fmt"
+ "strings"
+
+ "github.com/pion/stun/internal/hmac"
+)
+
+// separator for credentials.
+const credentialsSep = ":"
+
+// NewLongTermIntegrity returns new MessageIntegrity with key for long-term
+// credentials. Password, username, and realm must be SASL-prepared.
+func NewLongTermIntegrity(username, realm, password string) MessageIntegrity {
+ k := strings.Join([]string{username, realm, password}, credentialsSep)
+ // #nosec
+ h := md5.New()
+ fmt.Fprint(h, k)
+ return MessageIntegrity(h.Sum(nil))
+}
+
+// NewShortTermIntegrity returns new MessageIntegrity with key for short-term
+// credentials. Password must be SASL-prepared.
+func NewShortTermIntegrity(password string) MessageIntegrity {
+ return MessageIntegrity(password)
+}
+
+// MessageIntegrity represents MESSAGE-INTEGRITY attribute.
+//
+// AddTo and Check methods are using zero-allocation version of hmac, see
+// newHMAC function and internal/hmac/pool.go.
+//
+// RFC 5389 Section 15.4
+type MessageIntegrity []byte
+
+func newHMAC(key, message, buf []byte) []byte {
+ mac := hmac.AcquireSHA1(key)
+ writeOrPanic(mac, message)
+ defer hmac.PutSHA1(mac)
+ return mac.Sum(buf)
+}
+
+func (i MessageIntegrity) String() string {
+ return fmt.Sprintf("KEY: 0x%x", []byte(i))
+}
+
+const messageIntegritySize = 20
+
+// ErrFingerprintBeforeIntegrity means that FINGERPRINT attribute is already in
+// message, so MESSAGE-INTEGRITY attribute cannot be added.
+var ErrFingerprintBeforeIntegrity = errors.New("FINGERPRINT before MESSAGE-INTEGRITY attribute")
+
+// AddTo adds MESSAGE-INTEGRITY attribute to message.
+//
+// CPU costly, see BenchmarkMessageIntegrity_AddTo.
+func (i MessageIntegrity) AddTo(m *Message) error {
+ for _, a := range m.Attributes {
+ // Message should not contain FINGERPRINT attribute
+ // before MESSAGE-INTEGRITY.
+ if a.Type == AttrFingerprint {
+ return ErrFingerprintBeforeIntegrity
+ }
+ }
+ // The text used as input to HMAC is the STUN message,
+ // including the header, up to and including the attribute preceding the
+ // MESSAGE-INTEGRITY attribute.
+ length := m.Length
+ // Adjusting m.Length to contain MESSAGE-INTEGRITY TLV.
+ m.Length += messageIntegritySize + attributeHeaderSize
+ m.WriteLength() // writing length to m.Raw
+ v := newHMAC(i, m.Raw, m.Raw[len(m.Raw):]) // calculating HMAC for adjusted m.Raw
+ m.Length = length // changing m.Length back
+
+ // Copy hmac value to temporary variable to protect it from resetting
+ // while processing m.Add call.
+ vBuf := make([]byte, sha1.Size)
+ copy(vBuf, v)
+
+ m.Add(AttrMessageIntegrity, vBuf)
+ return nil
+}
+
+// ErrIntegrityMismatch means that computed HMAC differs from expected.
+var ErrIntegrityMismatch = errors.New("integrity check failed")
+
+// Check checks MESSAGE-INTEGRITY attribute.
+//
+// CPU costly, see BenchmarkMessageIntegrity_Check.
+func (i MessageIntegrity) Check(m *Message) error {
+ v, err := m.Get(AttrMessageIntegrity)
+ if err != nil {
+ return err
+ }
+
+ // Adjusting length in header to match m.Raw that was
+ // used when computing HMAC.
+ var (
+ length = m.Length
+ afterIntegrity = false
+ sizeReduced int
+ )
+ for _, a := range m.Attributes {
+ if afterIntegrity {
+ sizeReduced += nearestPaddedValueLength(int(a.Length))
+ sizeReduced += attributeHeaderSize
+ }
+ if a.Type == AttrMessageIntegrity {
+ afterIntegrity = true
+ }
+ }
+ m.Length -= uint32(sizeReduced)
+ m.WriteLength()
+ // startOfHMAC should be first byte of integrity attribute.
+ startOfHMAC := messageHeaderSize + m.Length - (attributeHeaderSize + messageIntegritySize)
+ b := m.Raw[:startOfHMAC] // data before integrity attribute
+ expected := newHMAC(i, b, m.Raw[len(m.Raw):])
+ m.Length = length
+ m.WriteLength() // writing length back
+ return checkHMAC(v, expected)
+}
diff --git a/vendor/github.com/pion/stun/integrity_debug.go b/vendor/github.com/pion/stun/integrity_debug.go
new file mode 100644
index 0000000..6b8a303
--- /dev/null
+++ b/vendor/github.com/pion/stun/integrity_debug.go
@@ -0,0 +1,18 @@
+// +build debug
+
+package stun
+
+import "fmt"
+
+// IntegrityErr occurs when computed HMAC differs from expected.
+type IntegrityErr struct {
+ Expected []byte
+ Actual []byte
+}
+
+func (i *IntegrityErr) Error() string {
+ return fmt.Sprintf(
+ "Integrity check failed: 0x%x (expected) !- 0x%x (actual)",
+ i.Expected, i.Actual,
+ )
+}
diff --git a/vendor/github.com/pion/stun/internal/hmac/hmac.go b/vendor/github.com/pion/stun/internal/hmac/hmac.go
new file mode 100644
index 0000000..801ece6
--- /dev/null
+++ b/vendor/github.com/pion/stun/internal/hmac/hmac.go
@@ -0,0 +1,101 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+/*
+Package hmac implements the Keyed-Hash Message Authentication Code (HMAC) as
+defined in U.S. Federal Information Processing Standards Publication 198.
+An HMAC is a cryptographic hash that uses a key to sign a message.
+The receiver verifies the hash by recomputing it using the same key.
+
+Receivers should be careful to use Equal to compare MACs in order to avoid
+timing side-channels:
+
+ // ValidMAC reports whether messageMAC is a valid HMAC tag for message.
+ func ValidMAC(message, messageMAC, key []byte) bool {
+ mac := hmac.New(sha256.New, key)
+ mac.Write(message)
+ expectedMAC := mac.Sum(nil)
+ return hmac.Equal(messageMAC, expectedMAC)
+ }
+*/
+package hmac
+
+import (
+ "crypto/subtle"
+ "hash"
+)
+
+// FIPS 198-1:
+// https://csrc.nist.gov/publications/fips/fips198-1/FIPS-198-1_final.pdf
+
+// key is zero padded to the block size of the hash function
+// ipad = 0x36 byte repeated for key length
+// opad = 0x5c byte repeated for key length
+// hmac = H([key ^ opad] H([key ^ ipad] text))
+
+type hmac struct {
+ size int
+ blocksize int
+ opad, ipad []byte
+ outer, inner hash.Hash
+}
+
+func (h *hmac) Sum(in []byte) []byte {
+ origLen := len(in)
+ in = h.inner.Sum(in)
+ h.outer.Reset()
+ h.outer.Write(h.opad)
+ h.outer.Write(in[origLen:])
+ return h.outer.Sum(in[:origLen])
+}
+
+func (h *hmac) Write(p []byte) (n int, err error) {
+ return h.inner.Write(p)
+}
+
+func (h *hmac) Size() int { return h.size }
+
+func (h *hmac) BlockSize() int { return h.blocksize }
+
+func (h *hmac) Reset() {
+ h.inner.Reset()
+ h.inner.Write(h.ipad)
+}
+
+// New returns a new HMAC hash using the given hash.Hash type and key.
+// Note that unlike other hash implementations in the standard library,
+// the returned Hash does not implement encoding.BinaryMarshaler
+// or encoding.BinaryUnmarshaler.
+func New(h func() hash.Hash, key []byte) hash.Hash {
+ hm := new(hmac)
+ hm.outer = h()
+ hm.inner = h()
+ hm.size = hm.inner.Size()
+ hm.blocksize = hm.inner.BlockSize()
+ hm.ipad = make([]byte, hm.blocksize)
+ hm.opad = make([]byte, hm.blocksize)
+ if len(key) > hm.blocksize {
+ // If key is too big, hash it.
+ hm.outer.Write(key)
+ key = hm.outer.Sum(nil)
+ }
+ copy(hm.ipad, key)
+ copy(hm.opad, key)
+ for i := range hm.ipad {
+ hm.ipad[i] ^= 0x36
+ }
+ for i := range hm.opad {
+ hm.opad[i] ^= 0x5c
+ }
+ hm.inner.Write(hm.ipad)
+ return hm
+}
+
+// Equal compares two MACs for equality without leaking timing information.
+func Equal(mac1, mac2 []byte) bool {
+ // We don't have to be constant time if the lengths of the MACs are
+ // different as that suggests that a completely different hash function
+ // was used.
+ return subtle.ConstantTimeCompare(mac1, mac2) == 1
+}
diff --git a/vendor/github.com/pion/stun/internal/hmac/pool.go b/vendor/github.com/pion/stun/internal/hmac/pool.go
new file mode 100644
index 0000000..4db61e5
--- /dev/null
+++ b/vendor/github.com/pion/stun/internal/hmac/pool.go
@@ -0,0 +1,92 @@
+package hmac
+
+import (
+ "crypto/sha1"
+ "crypto/sha256"
+ "hash"
+ "sync"
+)
+
+// setZeroes sets all bytes from b to zeroes.
+//
+// See https://github.com/golang/go/issues/5373
+func setZeroes(b []byte) {
+ for i := range b {
+ b[i] = 0
+ }
+}
+
+func (h *hmac) resetTo(key []byte) {
+ h.outer.Reset()
+ h.inner.Reset()
+ setZeroes(h.ipad)
+ setZeroes(h.opad)
+ if len(key) > h.blocksize {
+ // If key is too big, hash it.
+ h.outer.Write(key)
+ key = h.outer.Sum(nil)
+ }
+ copy(h.ipad, key)
+ copy(h.opad, key)
+ for i := range h.ipad {
+ h.ipad[i] ^= 0x36
+ }
+ for i := range h.opad {
+ h.opad[i] ^= 0x5c
+ }
+ h.inner.Write(h.ipad)
+}
+
+var hmacSHA1Pool = &sync.Pool{
+ New: func() interface{} {
+ h := New(sha1.New, make([]byte, sha1.BlockSize))
+ return h
+ },
+}
+
+// AcquireSHA1 returns new HMAC from pool.
+func AcquireSHA1(key []byte) hash.Hash {
+ h := hmacSHA1Pool.Get().(*hmac)
+ assertHMACSize(h, sha1.Size, sha1.BlockSize)
+ h.resetTo(key)
+ return h
+}
+
+// PutSHA1 puts h to pool.
+func PutSHA1(h hash.Hash) {
+ hm := h.(*hmac)
+ assertHMACSize(hm, sha1.Size, sha1.BlockSize)
+ hmacSHA1Pool.Put(hm)
+}
+
+var hmacSHA256Pool = &sync.Pool{
+ New: func() interface{} {
+ h := New(sha256.New, make([]byte, sha256.BlockSize))
+ return h
+ },
+}
+
+// AcquireSHA256 returns new HMAC from SHA256 pool.
+func AcquireSHA256(key []byte) hash.Hash {
+ h := hmacSHA256Pool.Get().(*hmac)
+ assertHMACSize(h, sha256.Size, sha256.BlockSize)
+ h.resetTo(key)
+ return h
+}
+
+// PutSHA256 puts h to SHA256 pool.
+func PutSHA256(h hash.Hash) {
+ hm := h.(*hmac)
+ assertHMACSize(hm, sha256.Size, sha256.BlockSize)
+ hmacSHA256Pool.Put(hm)
+}
+
+// assertHMACSize panics if h.size != size or h.blocksize != blocksize.
+//
+// Put and Acquire functions are internal functions to project, so
+// checking it via such assert is optimal.
+func assertHMACSize(h *hmac, size, blocksize int) {
+ if h.size != size || h.blocksize != blocksize {
+ panic("BUG: hmac size invalid") // nolint
+ }
+}
diff --git a/vendor/github.com/pion/stun/internal/hmac/vendor.sh b/vendor/github.com/pion/stun/internal/hmac/vendor.sh
new file mode 100644
index 0000000..83a2b32
--- /dev/null
+++ b/vendor/github.com/pion/stun/internal/hmac/vendor.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+cp -v $GOROOT/src/crypto/hmac/{hmac,hmac_test}.go .
+git diff {hmac,hmac_test}.go
+
diff --git a/vendor/github.com/pion/stun/message.go b/vendor/github.com/pion/stun/message.go
new file mode 100644
index 0000000..3819235
--- /dev/null
+++ b/vendor/github.com/pion/stun/message.go
@@ -0,0 +1,588 @@
+package stun
+
+import (
+ "crypto/rand"
+ "encoding/base64"
+ "errors"
+ "fmt"
+ "io"
+)
+
+const (
+ // magicCookie is fixed value that aids in distinguishing STUN packets
+ // from packets of other protocols when STUN is multiplexed with those
+ // other protocols on the same Port.
+ //
+ // The magic cookie field MUST contain the fixed value 0x2112A442 in
+ // network byte order.
+ //
+ // Defined in "STUN Message Structure", section 6.
+ magicCookie = 0x2112A442
+ attributeHeaderSize = 4
+ messageHeaderSize = 20
+
+ // TransactionIDSize is length of transaction id array (in bytes).
+ TransactionIDSize = 12 // 96 bit
+)
+
+// NewTransactionID returns new random transaction ID using crypto/rand
+// as source.
+func NewTransactionID() (b [TransactionIDSize]byte) {
+ readFullOrPanic(rand.Reader, b[:])
+ return b
+}
+
+// IsMessage returns true if b looks like STUN message.
+// Useful for multiplexing. IsMessage does not guarantee
+// that decoding will be successful.
+func IsMessage(b []byte) bool {
+ return len(b) >= messageHeaderSize && bin.Uint32(b[4:8]) == magicCookie
+}
+
+// New returns *Message with pre-allocated Raw.
+func New() *Message {
+ const defaultRawCapacity = 120
+ return &Message{
+ Raw: make([]byte, messageHeaderSize, defaultRawCapacity),
+ }
+}
+
+// ErrDecodeToNil occurs on Decode(data, nil) call.
+var ErrDecodeToNil = errors.New("attempt to decode to nil message")
+
+// Decode decodes Message from data to m, returning error if any.
+func Decode(data []byte, m *Message) error {
+ if m == nil {
+ return ErrDecodeToNil
+ }
+ m.Raw = append(m.Raw[:0], data...)
+ return m.Decode()
+}
+
+// Message represents a single STUN packet. It uses aggressive internal
+// buffering to enable zero-allocation encoding and decoding,
+// so there are some usage constraints:
+//
+// Message, its fields, results of m.Get or any attribute a.GetFrom
+// are valid only until Message.Raw is not modified.
+type Message struct {
+ Type MessageType
+ Length uint32 // len(Raw) not including header
+ TransactionID [TransactionIDSize]byte
+ Attributes Attributes
+ Raw []byte
+}
+
+// AddTo sets b.TransactionID to m.TransactionID.
+//
+// Implements Setter to aid in crafting responses.
+func (m *Message) AddTo(b *Message) error {
+ b.TransactionID = m.TransactionID
+ b.WriteTransactionID()
+ return nil
+}
+
+// NewTransactionID sets m.TransactionID to random value from crypto/rand
+// and returns error if any.
+func (m *Message) NewTransactionID() error {
+ _, err := io.ReadFull(rand.Reader, m.TransactionID[:])
+ if err == nil {
+ m.WriteTransactionID()
+ }
+ return err
+}
+
+func (m *Message) String() string {
+ tID := base64.StdEncoding.EncodeToString(m.TransactionID[:])
+ return fmt.Sprintf("%s l=%d attrs=%d id=%s", m.Type, m.Length, len(m.Attributes), tID)
+}
+
+// Reset resets Message, attributes and underlying buffer length.
+func (m *Message) Reset() {
+ m.Raw = m.Raw[:0]
+ m.Length = 0
+ m.Attributes = m.Attributes[:0]
+}
+
+// grow ensures that internal buffer has n length.
+func (m *Message) grow(n int) {
+ if len(m.Raw) >= n {
+ return
+ }
+ if cap(m.Raw) >= n {
+ m.Raw = m.Raw[:n]
+ return
+ }
+ m.Raw = append(m.Raw, make([]byte, n-len(m.Raw))...)
+}
+
+// Add appends new attribute to message. Not goroutine-safe.
+//
+// Value of attribute is copied to internal buffer so
+// it is safe to reuse v.
+func (m *Message) Add(t AttrType, v []byte) {
+ // Allocating buffer for TLV (type-length-value).
+ // T = t, L = len(v), V = v.
+ // m.Raw will look like:
+ // [0:20] <- message header
+ // [20:20+m.Length] <- existing message attributes
+ // [20+m.Length:20+m.Length+len(v) + 4] <- allocated buffer for new TLV
+ // [first:last] <- same as previous
+ // [0 1|2 3|4 4 + len(v)] <- mapping for allocated buffer
+ // T L V
+ allocSize := attributeHeaderSize + len(v) // ~ len(TLV) = len(TL) + len(V)
+ first := messageHeaderSize + int(m.Length) // first byte number
+ last := first + allocSize // last byte number
+ m.grow(last) // growing cap(Raw) to fit TLV
+ m.Raw = m.Raw[:last] // now len(Raw) = last
+ m.Length += uint32(allocSize) // rendering length change
+
+ // Sub-slicing internal buffer to simplify encoding.
+ buf := m.Raw[first:last] // slice for TLV
+ value := buf[attributeHeaderSize:] // slice for V
+ attr := RawAttribute{
+ Type: t, // T
+ Length: uint16(len(v)), // L
+ Value: value, // V
+ }
+
+ // Encoding attribute TLV to allocated buffer.
+ bin.PutUint16(buf[0:2], attr.Type.Value()) // T
+ bin.PutUint16(buf[2:4], attr.Length) // L
+ copy(value, v) // V
+
+ // Checking that attribute value needs padding.
+ if attr.Length%padding != 0 {
+ // Performing padding.
+ bytesToAdd := nearestPaddedValueLength(len(v)) - len(v)
+ last += bytesToAdd
+ m.grow(last)
+ // setting all padding bytes to zero
+ // to prevent data leak from previous
+ // data in next bytesToAdd bytes
+ buf = m.Raw[last-bytesToAdd : last]
+ for i := range buf {
+ buf[i] = 0
+ }
+ m.Raw = m.Raw[:last] // increasing buffer length
+ m.Length += uint32(bytesToAdd) // rendering length change
+ }
+ m.Attributes = append(m.Attributes, attr)
+ m.WriteLength()
+}
+
+func attrSliceEqual(a, b Attributes) bool {
+ for _, attr := range a {
+ found := false
+ for _, attrB := range b {
+ if attrB.Type != attr.Type {
+ continue
+ }
+ if attrB.Equal(attr) {
+ found = true
+ break
+ }
+ }
+ if !found {
+ return false
+ }
+ }
+ return true
+}
+
+func attrEqual(a, b Attributes) bool {
+ if a == nil && b == nil {
+ return true
+ }
+ if a == nil || b == nil {
+ return false
+ }
+ if len(a) != len(b) {
+ return false
+ }
+ if !attrSliceEqual(a, b) {
+ return false
+ }
+ if !attrSliceEqual(b, a) {
+ return false
+ }
+ return true
+}
+
+// Equal returns true if Message b equals to m.
+// Ignores m.Raw.
+func (m *Message) Equal(b *Message) bool {
+ if m == nil && b == nil {
+ return true
+ }
+ if m == nil || b == nil {
+ return false
+ }
+ if m.Type != b.Type {
+ return false
+ }
+ if m.TransactionID != b.TransactionID {
+ return false
+ }
+ if m.Length != b.Length {
+ return false
+ }
+ if !attrEqual(m.Attributes, b.Attributes) {
+ return false
+ }
+ return true
+}
+
+// WriteLength writes m.Length to m.Raw.
+func (m *Message) WriteLength() {
+ m.grow(4)
+ bin.PutUint16(m.Raw[2:4], uint16(m.Length))
+}
+
+// WriteHeader writes header to underlying buffer. Not goroutine-safe.
+func (m *Message) WriteHeader() {
+ m.grow(messageHeaderSize)
+ _ = m.Raw[:messageHeaderSize] // early bounds check to guarantee safety of writes below
+
+ m.WriteType()
+ m.WriteLength()
+ bin.PutUint32(m.Raw[4:8], magicCookie) // magic cookie
+ copy(m.Raw[8:messageHeaderSize], m.TransactionID[:]) // transaction ID
+}
+
+// WriteTransactionID writes m.TransactionID to m.Raw.
+func (m *Message) WriteTransactionID() {
+ copy(m.Raw[8:messageHeaderSize], m.TransactionID[:]) // transaction ID
+}
+
+// WriteAttributes encodes all m.Attributes to m.
+func (m *Message) WriteAttributes() {
+ attributes := m.Attributes
+ m.Attributes = attributes[:0]
+ for _, a := range attributes {
+ m.Add(a.Type, a.Value)
+ }
+ m.Attributes = attributes
+}
+
+// WriteType writes m.Type to m.Raw.
+func (m *Message) WriteType() {
+ m.grow(2)
+ bin.PutUint16(m.Raw[0:2], m.Type.Value()) // message type
+}
+
+// SetType sets m.Type and writes it to m.Raw.
+func (m *Message) SetType(t MessageType) {
+ m.Type = t
+ m.WriteType()
+}
+
+// Encode re-encodes message into m.Raw.
+func (m *Message) Encode() {
+ m.Raw = m.Raw[:0]
+ m.WriteHeader()
+ m.Length = 0
+ m.WriteAttributes()
+}
+
+// WriteTo implements WriterTo via calling Write(m.Raw) on w and returning
+// call result.
+func (m *Message) WriteTo(w io.Writer) (int64, error) {
+ n, err := w.Write(m.Raw)
+ return int64(n), err
+}
+
+// ReadFrom implements ReaderFrom. Reads message from r into m.Raw,
+// Decodes it and return error if any. If m.Raw is too small, will return
+// ErrUnexpectedEOF, ErrUnexpectedHeaderEOF or *DecodeErr.
+//
+// Can return *DecodeErr while decoding too.
+func (m *Message) ReadFrom(r io.Reader) (int64, error) {
+ tBuf := m.Raw[:cap(m.Raw)]
+ var (
+ n int
+ err error
+ )
+ if n, err = r.Read(tBuf); err != nil {
+ return int64(n), err
+ }
+ m.Raw = tBuf[:n]
+ return int64(n), m.Decode()
+}
+
+// ErrUnexpectedHeaderEOF means that there were not enough bytes in
+// m.Raw to read header.
+var ErrUnexpectedHeaderEOF = errors.New("unexpected EOF: not enough bytes to read header")
+
+// Decode decodes m.Raw into m.
+func (m *Message) Decode() error {
+ // decoding message header
+ buf := m.Raw
+ if len(buf) < messageHeaderSize {
+ return ErrUnexpectedHeaderEOF
+ }
+ var (
+ t = bin.Uint16(buf[0:2]) // first 2 bytes
+ size = int(bin.Uint16(buf[2:4])) // second 2 bytes
+ cookie = bin.Uint32(buf[4:8]) // last 4 bytes
+ fullSize = messageHeaderSize + size // len(m.Raw)
+ )
+ if cookie != magicCookie {
+ msg := fmt.Sprintf("%x is invalid magic cookie (should be %x)", cookie, magicCookie)
+ return newDecodeErr("message", "cookie", msg)
+ }
+ if len(buf) < fullSize {
+ msg := fmt.Sprintf("buffer length %d is less than %d (expected message size)", len(buf), fullSize)
+ return newAttrDecodeErr("message", msg)
+ }
+ // saving header data
+ m.Type.ReadValue(t)
+ m.Length = uint32(size)
+ copy(m.TransactionID[:], buf[8:messageHeaderSize])
+
+ m.Attributes = m.Attributes[:0]
+ var (
+ offset = 0
+ b = buf[messageHeaderSize:fullSize]
+ )
+ for offset < size {
+ // checking that we have enough bytes to read header
+ if len(b) < attributeHeaderSize {
+ msg := fmt.Sprintf("buffer length %d is less than %d (expected header size)", len(b), attributeHeaderSize)
+ return newAttrDecodeErr("header", msg)
+ }
+ var (
+ a = RawAttribute{
+ Type: compatAttrType(bin.Uint16(b[0:2])), // first 2 bytes
+ Length: bin.Uint16(b[2:4]), // second 2 bytes
+ }
+ aL = int(a.Length) // attribute length
+ aBuffL = nearestPaddedValueLength(aL) // expected buffer length (with padding)
+ )
+ b = b[attributeHeaderSize:] // slicing again to simplify value read
+ offset += attributeHeaderSize
+ if len(b) < aBuffL { // checking size
+ msg := fmt.Sprintf("buffer length %d is less than %d (expected value size for %s)", len(b), aBuffL, a.Type)
+ return newAttrDecodeErr("value", msg)
+ }
+ a.Value = b[:aL]
+ offset += aBuffL
+ b = b[aBuffL:]
+
+ m.Attributes = append(m.Attributes, a)
+ }
+ return nil
+}
+
+// Write decodes message and return error if any.
+//
+// Any error is unrecoverable, but message could be partially decoded.
+func (m *Message) Write(tBuf []byte) (int, error) {
+ m.Raw = append(m.Raw[:0], tBuf...)
+ return len(tBuf), m.Decode()
+}
+
+// CloneTo clones m to b securing any further m mutations.
+func (m *Message) CloneTo(b *Message) error {
+ // TODO(ar): implement low-level copy.
+ b.Raw = append(b.Raw[:0], m.Raw...)
+ return b.Decode()
+}
+
+// MessageClass is 8-bit representation of 2-bit class of STUN Message Class.
+type MessageClass byte
+
+// Possible values for message class in STUN Message Type.
+const (
+ ClassRequest MessageClass = 0x00 // 0b00
+ ClassIndication MessageClass = 0x01 // 0b01
+ ClassSuccessResponse MessageClass = 0x02 // 0b10
+ ClassErrorResponse MessageClass = 0x03 // 0b11
+)
+
+// Common STUN message types.
+var (
+ // Binding request message type.
+ BindingRequest = NewType(MethodBinding, ClassRequest)
+ // Binding success response message type
+ BindingSuccess = NewType(MethodBinding, ClassSuccessResponse)
+ // Binding error response message type.
+ BindingError = NewType(MethodBinding, ClassErrorResponse)
+)
+
+func (c MessageClass) String() string {
+ switch c {
+ case ClassRequest:
+ return "request"
+ case ClassIndication:
+ return "indication"
+ case ClassSuccessResponse:
+ return "success response"
+ case ClassErrorResponse:
+ return "error response"
+ default:
+ panic("unknown message class") // nolint: never happens unless wrongly casted
+ }
+}
+
+// Method is uint16 representation of 12-bit STUN method.
+type Method uint16
+
+// Possible methods for STUN Message.
+const (
+ MethodBinding Method = 0x001
+ MethodAllocate Method = 0x003
+ MethodRefresh Method = 0x004
+ MethodSend Method = 0x006
+ MethodData Method = 0x007
+ MethodCreatePermission Method = 0x008
+ MethodChannelBind Method = 0x009
+)
+
+// Methods from RFC 6062.
+const (
+ MethodConnect Method = 0x000a
+ MethodConnectionBind Method = 0x000b
+ MethodConnectionAttempt Method = 0x000c
+)
+
+var methodName = map[Method]string{
+ MethodBinding: "Binding",
+ MethodAllocate: "Allocate",
+ MethodRefresh: "Refresh",
+ MethodSend: "Send",
+ MethodData: "Data",
+ MethodCreatePermission: "CreatePermission",
+ MethodChannelBind: "ChannelBind",
+
+ // RFC 6062.
+ MethodConnect: "Connect",
+ MethodConnectionBind: "ConnectionBind",
+ MethodConnectionAttempt: "ConnectionAttempt",
+}
+
+func (m Method) String() string {
+ s, ok := methodName[m]
+ if !ok {
+ // Falling back to hex representation.
+ s = fmt.Sprintf("0x%x", uint16(m))
+ }
+ return s
+}
+
+// MessageType is STUN Message Type Field.
+type MessageType struct {
+ Method Method // e.g. binding
+ Class MessageClass // e.g. request
+}
+
+// AddTo sets m type to t.
+func (t MessageType) AddTo(m *Message) error {
+ m.SetType(t)
+ return nil
+}
+
+// NewType returns new message type with provided method and class.
+func NewType(method Method, class MessageClass) MessageType {
+ return MessageType{
+ Method: method,
+ Class: class,
+ }
+}
+
+const (
+ methodABits = 0xf // 0b0000000000001111
+ methodBBits = 0x70 // 0b0000000001110000
+ methodDBits = 0xf80 // 0b0000111110000000
+
+ methodBShift = 1
+ methodDShift = 2
+
+ firstBit = 0x1
+ secondBit = 0x2
+
+ c0Bit = firstBit
+ c1Bit = secondBit
+
+ classC0Shift = 4
+ classC1Shift = 7
+)
+
+// Value returns bit representation of messageType.
+func (t MessageType) Value() uint16 {
+ // 0 1
+ // 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+ // +--+--+-+-+-+-+-+-+-+-+-+-+-+-+
+ // |M |M |M|M|M|C|M|M|M|C|M|M|M|M|
+ // |11|10|9|8|7|1|6|5|4|0|3|2|1|0|
+ // +--+--+-+-+-+-+-+-+-+-+-+-+-+-+
+ // Figure 3: Format of STUN Message Type Field
+
+ // Warning: Abandon all hope ye who enter here.
+ // Splitting M into A(M0-M3), B(M4-M6), D(M7-M11).
+ m := uint16(t.Method)
+ a := m & methodABits // A = M * 0b0000000000001111 (right 4 bits)
+ b := m & methodBBits // B = M * 0b0000000001110000 (3 bits after A)
+ d := m & methodDBits // D = M * 0b0000111110000000 (5 bits after B)
+
+ // Shifting to add "holes" for C0 (at 4 bit) and C1 (8 bit).
+ m = a + (b << methodBShift) + (d << methodDShift)
+
+ // C0 is zero bit of C, C1 is first bit.
+ // C0 = C * 0b01, C1 = (C * 0b10) >> 1
+ // Ct = C0 << 4 + C1 << 8.
+ // Optimizations: "((C * 0b10) >> 1) << 8" as "(C * 0b10) << 7"
+ // We need C0 shifted by 4, and C1 by 8 to fit "11" and "7" positions
+ // (see figure 3).
+ c := uint16(t.Class)
+ c0 := (c & c0Bit) << classC0Shift
+ c1 := (c & c1Bit) << classC1Shift
+ class := c0 + c1
+
+ return m + class
+}
+
+// ReadValue decodes uint16 into MessageType.
+func (t *MessageType) ReadValue(v uint16) {
+ // Decoding class.
+ // We are taking first bit from v >> 4 and second from v >> 7.
+ c0 := (v >> classC0Shift) & c0Bit
+ c1 := (v >> classC1Shift) & c1Bit
+ class := c0 + c1
+ t.Class = MessageClass(class)
+
+ // Decoding method.
+ a := v & methodABits // A(M0-M3)
+ b := (v >> methodBShift) & methodBBits // B(M4-M6)
+ d := (v >> methodDShift) & methodDBits // D(M7-M11)
+ m := a + b + d
+ t.Method = Method(m)
+}
+
+func (t MessageType) String() string {
+ return fmt.Sprintf("%s %s", t.Method, t.Class)
+}
+
+// Contains return true if message contain t attribute.
+func (m *Message) Contains(t AttrType) bool {
+ for _, a := range m.Attributes {
+ if a.Type == t {
+ return true
+ }
+ }
+ return false
+}
+
+type transactionIDValueSetter [TransactionIDSize]byte
+
+// NewTransactionIDSetter returns new Setter that sets message transaction id
+// to provided value.
+func NewTransactionIDSetter(value [TransactionIDSize]byte) Setter {
+ return transactionIDValueSetter(value)
+}
+
+func (t transactionIDValueSetter) AddTo(m *Message) error {
+ m.TransactionID = t
+ m.WriteTransactionID()
+ return nil
+}
diff --git a/vendor/github.com/pion/stun/renovate.json b/vendor/github.com/pion/stun/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/stun/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/stun/stun.go b/vendor/github.com/pion/stun/stun.go
new file mode 100644
index 0000000..9f804d2
--- /dev/null
+++ b/vendor/github.com/pion/stun/stun.go
@@ -0,0 +1,51 @@
+// Package stun implements Session Traversal Utilities for NAT (STUN) RFC 5389.
+//
+// The stun package is intended to use by package that implements extension
+// to STUN (e.g. TURN) or client/server applications.
+//
+// Most methods are designed to be zero allocations. If it is not enough,
+// low-level methods are available. On other hand, there are helpers that
+// reduce code repeat.
+//
+// See examples for Message for basic usage, or https://github.com/pion/turn
+// package for example of stun extension implementation.
+package stun
+
+import (
+ "encoding/binary"
+ "io"
+)
+
+// bin is shorthand to binary.BigEndian.
+var bin = binary.BigEndian
+
+func readFullOrPanic(r io.Reader, v []byte) int {
+ n, err := io.ReadFull(r, v)
+ if err != nil {
+ panic(err) // nolint
+ }
+ return n
+}
+
+func writeOrPanic(w io.Writer, v []byte) int {
+ n, err := w.Write(v)
+ if err != nil {
+ panic(err) // nolint
+ }
+ return n
+}
+
+// IANA assigned ports for "stun" protocol.
+const (
+ DefaultPort = 3478
+ DefaultTLSPort = 5349
+)
+
+type transactionIDSetter struct{}
+
+func (transactionIDSetter) AddTo(m *Message) error {
+ return m.NewTransactionID()
+}
+
+// TransactionID is Setter for m.TransactionID.
+var TransactionID Setter = transactionIDSetter{}
diff --git a/vendor/github.com/pion/stun/textattrs.go b/vendor/github.com/pion/stun/textattrs.go
new file mode 100644
index 0000000..efdfbd9
--- /dev/null
+++ b/vendor/github.com/pion/stun/textattrs.go
@@ -0,0 +1,129 @@
+package stun
+
+// NewUsername returns Username with provided value.
+func NewUsername(username string) Username {
+ return Username(username)
+}
+
+// Username represents USERNAME attribute.
+//
+// RFC 5389 Section 15.3
+type Username []byte
+
+func (u Username) String() string {
+ return string(u)
+}
+
+const maxUsernameB = 513
+
+// AddTo adds USERNAME attribute to message.
+func (u Username) AddTo(m *Message) error {
+ return TextAttribute(u).AddToAs(m, AttrUsername, maxUsernameB)
+}
+
+// GetFrom gets USERNAME from message.
+func (u *Username) GetFrom(m *Message) error {
+ return (*TextAttribute)(u).GetFromAs(m, AttrUsername)
+}
+
+// NewRealm returns Realm with provided value.
+// Must be SASL-prepared.
+func NewRealm(realm string) Realm {
+ return Realm(realm)
+}
+
+// Realm represents REALM attribute.
+//
+// RFC 5389 Section 15.7
+type Realm []byte
+
+func (n Realm) String() string {
+ return string(n)
+}
+
+const maxRealmB = 763
+
+// AddTo adds NONCE to message.
+func (n Realm) AddTo(m *Message) error {
+ return TextAttribute(n).AddToAs(m, AttrRealm, maxRealmB)
+}
+
+// GetFrom gets REALM from message.
+func (n *Realm) GetFrom(m *Message) error {
+ return (*TextAttribute)(n).GetFromAs(m, AttrRealm)
+}
+
+const softwareRawMaxB = 763
+
+// Software is SOFTWARE attribute.
+//
+// RFC 5389 Section 15.10
+type Software []byte
+
+func (s Software) String() string {
+ return string(s)
+}
+
+// NewSoftware returns *Software from string.
+func NewSoftware(software string) Software {
+ return Software(software)
+}
+
+// AddTo adds Software attribute to m.
+func (s Software) AddTo(m *Message) error {
+ return TextAttribute(s).AddToAs(m, AttrSoftware, softwareRawMaxB)
+}
+
+// GetFrom decodes Software from m.
+func (s *Software) GetFrom(m *Message) error {
+ return (*TextAttribute)(s).GetFromAs(m, AttrSoftware)
+}
+
+// Nonce represents NONCE attribute.
+//
+// RFC 5389 Section 15.8
+type Nonce []byte
+
+// NewNonce returns new Nonce from string.
+func NewNonce(nonce string) Nonce {
+ return Nonce(nonce)
+}
+
+func (n Nonce) String() string {
+ return string(n)
+}
+
+const maxNonceB = 763
+
+// AddTo adds NONCE to message.
+func (n Nonce) AddTo(m *Message) error {
+ return TextAttribute(n).AddToAs(m, AttrNonce, maxNonceB)
+}
+
+// GetFrom gets NONCE from message.
+func (n *Nonce) GetFrom(m *Message) error {
+ return (*TextAttribute)(n).GetFromAs(m, AttrNonce)
+}
+
+// TextAttribute is helper for adding and getting text attributes.
+type TextAttribute []byte
+
+// AddToAs adds attribute with type t to m, checking maximum length. If maxLen
+// is less than 0, no check is performed.
+func (v TextAttribute) AddToAs(m *Message, t AttrType, maxLen int) error {
+ if err := CheckOverflow(t, len(v), maxLen); err != nil {
+ return err
+ }
+ m.Add(t, v)
+ return nil
+}
+
+// GetFromAs gets t attribute from m and appends its value to reseted v.
+func (v *TextAttribute) GetFromAs(m *Message, t AttrType) error {
+ a, err := m.Get(t)
+ if err != nil {
+ return err
+ }
+ *v = a
+ return nil
+}
diff --git a/vendor/github.com/pion/stun/uattrs.go b/vendor/github.com/pion/stun/uattrs.go
new file mode 100644
index 0000000..238d32d
--- /dev/null
+++ b/vendor/github.com/pion/stun/uattrs.go
@@ -0,0 +1,63 @@
+package stun
+
+import "errors"
+
+// UnknownAttributes represents UNKNOWN-ATTRIBUTES attribute.
+//
+// RFC 5389 Section 15.9
+type UnknownAttributes []AttrType
+
+func (a UnknownAttributes) String() string {
+ s := ""
+ if len(a) == 0 {
+ return "<nil>"
+ }
+ last := len(a) - 1
+ for i, t := range a {
+ s += t.String()
+ if i != last {
+ s += ", "
+ }
+ }
+ return s
+}
+
+// type size is 16 bit.
+const attrTypeSize = 4
+
+// AddTo adds UNKNOWN-ATTRIBUTES attribute to message.
+func (a UnknownAttributes) AddTo(m *Message) error {
+ v := make([]byte, 0, attrTypeSize*20) // 20 should be enough
+ // If len(a.Types) > 20, there will be allocations.
+ for i, t := range a {
+ v = append(v, 0, 0, 0, 0) // 4 times by 0 (16 bits)
+ first := attrTypeSize * i
+ last := first + attrTypeSize
+ bin.PutUint16(v[first:last], t.Value())
+ }
+ m.Add(AttrUnknownAttributes, v)
+ return nil
+}
+
+// ErrBadUnknownAttrsSize means that UNKNOWN-ATTRIBUTES attribute value
+// has invalid length.
+var ErrBadUnknownAttrsSize = errors.New("bad UNKNOWN-ATTRIBUTES size")
+
+// GetFrom parses UNKNOWN-ATTRIBUTES from message.
+func (a *UnknownAttributes) GetFrom(m *Message) error {
+ v, err := m.Get(AttrUnknownAttributes)
+ if err != nil {
+ return err
+ }
+ if len(v)%attrTypeSize != 0 {
+ return ErrBadUnknownAttrsSize
+ }
+ *a = (*a)[:0]
+ first := 0
+ for first < len(v) {
+ last := first + attrTypeSize
+ *a = append(*a, AttrType(bin.Uint16(v[first:last])))
+ first = last
+ }
+ return nil
+}
diff --git a/vendor/github.com/pion/stun/xor.go b/vendor/github.com/pion/stun/xor.go
new file mode 100644
index 0000000..34365eb
--- /dev/null
+++ b/vendor/github.com/pion/stun/xor.go
@@ -0,0 +1,62 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package stun
+
+import (
+ "runtime"
+ "unsafe"
+)
+
+// #nosec
+const wordSize = int(unsafe.Sizeof(uintptr(0)))
+
+var supportsUnaligned = runtime.GOARCH == "386" || runtime.GOARCH == "amd64"
+
+// fastXORBytes xors in bulk. It only works on architectures that
+// support unaligned read/writes.
+//
+// #nosec
+func fastXORBytes(dst, a, b []byte) int {
+ n := len(a)
+ if len(b) < n {
+ n = len(b)
+ }
+
+ w := n / wordSize
+ if w > 0 {
+ dw := *(*[]uintptr)(unsafe.Pointer(&dst))
+ aw := *(*[]uintptr)(unsafe.Pointer(&a))
+ bw := *(*[]uintptr)(unsafe.Pointer(&b))
+ for i := 0; i < w; i++ {
+ dw[i] = aw[i] ^ bw[i]
+ }
+ }
+
+ for i := n - n%wordSize; i < n; i++ {
+ dst[i] = a[i] ^ b[i]
+ }
+
+ return n
+}
+
+func safeXORBytes(dst, a, b []byte) int {
+ n := len(a)
+ if len(b) < n {
+ n = len(b)
+ }
+ for i := 0; i < n; i++ {
+ dst[i] = a[i] ^ b[i]
+ }
+ return n
+}
+
+// xorBytes xors the bytes in a and b. The destination is assumed to have enough
+// space. Returns the number of bytes xor'd.
+func xorBytes(dst, a, b []byte) int {
+ if supportsUnaligned {
+ return fastXORBytes(dst, a, b)
+ }
+ return safeXORBytes(dst, a, b)
+}
diff --git a/vendor/github.com/pion/stun/xoraddr.go b/vendor/github.com/pion/stun/xoraddr.go
new file mode 100644
index 0000000..23f7777
--- /dev/null
+++ b/vendor/github.com/pion/stun/xoraddr.go
@@ -0,0 +1,145 @@
+package stun
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "net"
+ "strconv"
+)
+
+const (
+ familyIPv4 uint16 = 0x01
+ familyIPv6 uint16 = 0x02
+)
+
+// XORMappedAddress implements XOR-MAPPED-ADDRESS attribute.
+//
+// RFC 5389 Section 15.2
+type XORMappedAddress struct {
+ IP net.IP
+ Port int
+}
+
+func (a XORMappedAddress) String() string {
+ return net.JoinHostPort(a.IP.String(), strconv.Itoa(a.Port))
+}
+
+// isIPv4 returns true if ip with len of net.IPv6Len seems to be ipv4.
+func isIPv4(ip net.IP) bool {
+ // Optimized for performance. Copied from net.IP.To4.
+ return isZeros(ip[0:10]) && ip[10] == 0xff && ip[11] == 0xff
+}
+
+// Is p all zeros?
+func isZeros(p net.IP) bool {
+ for i := 0; i < len(p); i++ {
+ if p[i] != 0 {
+ return false
+ }
+ }
+ return true
+}
+
+// ErrBadIPLength means that len(IP) is not net.{IPv6len,IPv4len}.
+var ErrBadIPLength = errors.New("invalid length of IP value")
+
+// AddToAs adds XOR-MAPPED-ADDRESS value to m as t attribute.
+func (a XORMappedAddress) AddToAs(m *Message, t AttrType) error {
+ var (
+ family = familyIPv4
+ ip = a.IP
+ )
+ if len(a.IP) == net.IPv6len {
+ if isIPv4(ip) {
+ ip = ip[12:16] // like in ip.To4()
+ } else {
+ family = familyIPv6
+ }
+ } else if len(ip) != net.IPv4len {
+ return ErrBadIPLength
+ }
+ value := make([]byte, 32+128)
+ value[0] = 0 // first 8 bits are zeroes
+ xorValue := make([]byte, net.IPv6len)
+ copy(xorValue[4:], m.TransactionID[:])
+ bin.PutUint32(xorValue[0:4], magicCookie)
+ bin.PutUint16(value[0:2], family)
+ bin.PutUint16(value[2:4], uint16(a.Port^magicCookie>>16))
+ xorBytes(value[4:4+len(ip)], ip, xorValue)
+ m.Add(t, value[:4+len(ip)])
+ return nil
+}
+
+// AddTo adds XOR-MAPPED-ADDRESS to m. Can return ErrBadIPLength
+// if len(a.IP) is invalid.
+func (a XORMappedAddress) AddTo(m *Message) error {
+ return a.AddToAs(m, AttrXORMappedAddress)
+}
+
+// GetFromAs decodes XOR-MAPPED-ADDRESS attribute value in message
+// getting it as for t type.
+func (a *XORMappedAddress) GetFromAs(m *Message, t AttrType) error {
+ v, err := m.Get(t)
+ if err != nil {
+ return err
+ }
+ family := bin.Uint16(v[0:2])
+ if family != familyIPv6 && family != familyIPv4 {
+ return newDecodeErr("xor-mapped address", "family",
+ fmt.Sprintf("bad value %d", family),
+ )
+ }
+ ipLen := net.IPv4len
+ if family == familyIPv6 {
+ ipLen = net.IPv6len
+ }
+ // Ensuring len(a.IP) == ipLen and reusing a.IP.
+ if len(a.IP) < ipLen {
+ a.IP = a.IP[:cap(a.IP)]
+ for len(a.IP) < ipLen {
+ a.IP = append(a.IP, 0)
+ }
+ }
+ a.IP = a.IP[:ipLen]
+ for i := range a.IP {
+ a.IP[i] = 0
+ }
+ if len(v) <= 4 {
+ return io.ErrUnexpectedEOF
+ }
+ if err := CheckOverflow(t, len(v[4:]), len(a.IP)); err != nil {
+ return err
+ }
+ a.Port = int(bin.Uint16(v[2:4])) ^ (magicCookie >> 16)
+ xorValue := make([]byte, 4+TransactionIDSize)
+ bin.PutUint32(xorValue[0:4], magicCookie)
+ copy(xorValue[4:], m.TransactionID[:])
+ xorBytes(a.IP, v[4:], xorValue)
+ return nil
+}
+
+// GetFrom decodes XOR-MAPPED-ADDRESS attribute in message and returns
+// error if any. While decoding, a.IP is reused if possible and can be
+// rendered to invalid state (e.g. if a.IP was set to IPv6 and then
+// IPv4 value were decoded into it), be careful.
+//
+// Example:
+//
+// expectedIP := net.ParseIP("213.141.156.236")
+// expectedIP.String() // 213.141.156.236, 16 bytes, first 12 of them are zeroes
+// expectedPort := 21254
+// addr := &XORMappedAddress{
+// IP: expectedIP,
+// Port: expectedPort,
+// }
+// // addr were added to message that is decoded as newMessage
+// // ...
+//
+// addr.GetFrom(newMessage)
+// addr.IP.String() // 213.141.156.236, net.IPv4Len
+// expectedIP.String() // d58d:9cec::ffff:d58d:9cec, 16 bytes, first 4 are IPv4
+// // now we have len(expectedIP) = 16 and len(addr.IP) = 4.
+func (a *XORMappedAddress) GetFrom(m *Message) error {
+ return a.GetFromAs(m, AttrXORMappedAddress)
+}
diff --git a/vendor/github.com/pion/transport/LICENSE b/vendor/github.com/pion/transport/LICENSE
new file mode 100644
index 0000000..ab60297
--- /dev/null
+++ b/vendor/github.com/pion/transport/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/transport/connctx/connctx.go b/vendor/github.com/pion/transport/connctx/connctx.go
new file mode 100644
index 0000000..20510f2
--- /dev/null
+++ b/vendor/github.com/pion/transport/connctx/connctx.go
@@ -0,0 +1,172 @@
+// Package connctx wraps net.Conn using context.Context.
+package connctx
+
+import (
+ "context"
+ "errors"
+ "io"
+ "net"
+ "sync"
+ "sync/atomic"
+ "time"
+)
+
+// ErrClosing is returned on Write to closed connection.
+var ErrClosing = errors.New("use of closed network connection")
+
+// Reader is an interface for context controlled reader.
+type Reader interface {
+ ReadContext(context.Context, []byte) (int, error)
+}
+
+// Writer is an interface for context controlled writer.
+type Writer interface {
+ WriteContext(context.Context, []byte) (int, error)
+}
+
+// ReadWriter is a composite of ReadWriter.
+type ReadWriter interface {
+ Reader
+ Writer
+}
+
+// ConnCtx is a wrapper of net.Conn using context.Context.
+type ConnCtx interface {
+ Reader
+ Writer
+ io.Closer
+ LocalAddr() net.Addr
+ RemoteAddr() net.Addr
+ Conn() net.Conn
+}
+
+type connCtx struct {
+ nextConn net.Conn
+ closed chan struct{}
+ closeOnce sync.Once
+ readMu sync.Mutex
+ writeMu sync.Mutex
+}
+
+var veryOld = time.Unix(0, 1) //nolint:gochecknoglobals
+
+// New creates a new ConnCtx wrapping given net.Conn.
+func New(conn net.Conn) ConnCtx {
+ c := &connCtx{
+ nextConn: conn,
+ closed: make(chan struct{}),
+ }
+ return c
+}
+
+func (c *connCtx) ReadContext(ctx context.Context, b []byte) (int, error) {
+ c.readMu.Lock()
+ defer c.readMu.Unlock()
+
+ select {
+ case <-c.closed:
+ return 0, io.EOF
+ default:
+ }
+
+ done := make(chan struct{})
+ var wg sync.WaitGroup
+ var errSetDeadline atomic.Value
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ select {
+ case <-ctx.Done():
+ // context canceled
+ if err := c.nextConn.SetReadDeadline(veryOld); err != nil {
+ errSetDeadline.Store(err)
+ return
+ }
+ <-done
+ if err := c.nextConn.SetReadDeadline(time.Time{}); err != nil {
+ errSetDeadline.Store(err)
+ }
+ case <-done:
+ }
+ }()
+
+ n, err := c.nextConn.Read(b)
+
+ close(done)
+ wg.Wait()
+ if e := ctx.Err(); e != nil && n == 0 {
+ err = e
+ }
+ if err2 := errSetDeadline.Load(); err == nil && err2 != nil {
+ err = err2.(error)
+ }
+ return n, err
+}
+
+func (c *connCtx) WriteContext(ctx context.Context, b []byte) (int, error) {
+ c.writeMu.Lock()
+ defer c.writeMu.Unlock()
+
+ select {
+ case <-c.closed:
+ return 0, ErrClosing
+ default:
+ }
+
+ done := make(chan struct{})
+ var wg sync.WaitGroup
+ var errSetDeadline atomic.Value
+ wg.Add(1)
+ go func() {
+ select {
+ case <-ctx.Done():
+ // context canceled
+ if err := c.nextConn.SetWriteDeadline(veryOld); err != nil {
+ errSetDeadline.Store(err)
+ return
+ }
+ <-done
+ if err := c.nextConn.SetWriteDeadline(time.Time{}); err != nil {
+ errSetDeadline.Store(err)
+ }
+ case <-done:
+ }
+ wg.Done()
+ }()
+
+ n, err := c.nextConn.Write(b)
+
+ close(done)
+ wg.Wait()
+ if e := ctx.Err(); e != nil && n == 0 {
+ err = e
+ }
+ if err2 := errSetDeadline.Load(); err == nil && err2 != nil {
+ err = err2.(error)
+ }
+ return n, err
+}
+
+func (c *connCtx) Close() error {
+ err := c.nextConn.Close()
+ c.closeOnce.Do(func() {
+ c.writeMu.Lock()
+ c.readMu.Lock()
+ close(c.closed)
+ c.readMu.Unlock()
+ c.writeMu.Unlock()
+ })
+ return err
+}
+
+func (c *connCtx) LocalAddr() net.Addr {
+ return c.nextConn.LocalAddr()
+}
+
+func (c *connCtx) RemoteAddr() net.Addr {
+ return c.nextConn.RemoteAddr()
+}
+
+func (c *connCtx) Conn() net.Conn {
+ return c.nextConn
+}
diff --git a/vendor/github.com/pion/transport/connctx/pipe.go b/vendor/github.com/pion/transport/connctx/pipe.go
new file mode 100644
index 0000000..e2f0409
--- /dev/null
+++ b/vendor/github.com/pion/transport/connctx/pipe.go
@@ -0,0 +1,11 @@
+package connctx
+
+import (
+ "net"
+)
+
+// Pipe creates piped pair of ConnCtx.
+func Pipe() (ConnCtx, ConnCtx) {
+ ca, cb := net.Pipe()
+ return New(ca), New(cb)
+}
diff --git a/vendor/github.com/pion/transport/deadline/deadline.go b/vendor/github.com/pion/transport/deadline/deadline.go
new file mode 100644
index 0000000..6f97386
--- /dev/null
+++ b/vendor/github.com/pion/transport/deadline/deadline.go
@@ -0,0 +1,110 @@
+// Package deadline provides deadline timer used to implement
+// net.Conn compatible connection
+package deadline
+
+import (
+ "context"
+ "sync"
+ "time"
+)
+
+// Deadline signals updatable deadline timer.
+// Also, it implements context.Context.
+type Deadline struct {
+ exceeded chan struct{}
+ stop chan struct{}
+ stopped chan bool
+ deadline time.Time
+ mu sync.RWMutex
+}
+
+// New creates new deadline timer.
+func New() *Deadline {
+ d := &Deadline{
+ exceeded: make(chan struct{}),
+ stop: make(chan struct{}),
+ stopped: make(chan bool, 1),
+ }
+ d.stopped <- true
+ return d
+}
+
+// Set new deadline. Zero value means no deadline.
+func (d *Deadline) Set(t time.Time) {
+ d.mu.Lock()
+ defer d.mu.Unlock()
+
+ d.deadline = t
+
+ close(d.stop)
+
+ select {
+ case <-d.exceeded:
+ d.exceeded = make(chan struct{})
+ default:
+ stopped := <-d.stopped
+ if !stopped {
+ d.exceeded = make(chan struct{})
+ }
+ }
+ d.stop = make(chan struct{})
+ d.stopped = make(chan bool, 1)
+
+ if t.IsZero() {
+ d.stopped <- true
+ return
+ }
+
+ if dur := time.Until(t); dur > 0 {
+ exceeded := d.exceeded
+ stopped := d.stopped
+ go func() {
+ select {
+ case <-time.After(dur):
+ close(exceeded)
+ stopped <- false
+ case <-d.stop:
+ stopped <- true
+ }
+ }()
+ return
+ }
+
+ close(d.exceeded)
+ d.stopped <- false
+}
+
+// Done receives deadline signal.
+func (d *Deadline) Done() <-chan struct{} {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+ return d.exceeded
+}
+
+// Err returns context.DeadlineExceeded if the deadline is exceeded.
+// Otherwise, it returns nil.
+func (d *Deadline) Err() error {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+ select {
+ case <-d.exceeded:
+ return context.DeadlineExceeded
+ default:
+ return nil
+ }
+}
+
+// Deadline returns current deadline.
+func (d *Deadline) Deadline() (time.Time, bool) {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+ if d.deadline.IsZero() {
+ return d.deadline, false
+ }
+ return d.deadline, true
+}
+
+// Value returns nil.
+func (d *Deadline) Value(interface{}) interface{} {
+ return nil
+}
diff --git a/vendor/github.com/pion/transport/packetio/buffer.go b/vendor/github.com/pion/transport/packetio/buffer.go
new file mode 100644
index 0000000..97d86f8
--- /dev/null
+++ b/vendor/github.com/pion/transport/packetio/buffer.go
@@ -0,0 +1,347 @@
+// Package packetio provides packet buffer
+package packetio
+
+import (
+ "errors"
+ "io"
+ "sync"
+ "time"
+
+ "github.com/pion/transport/deadline"
+)
+
+var errPacketTooBig = errors.New("packet too big")
+
+// BufferPacketType allow the Buffer to know which packet protocol is writing.
+type BufferPacketType int
+
+const (
+ // RTPBufferPacket indicates the Buffer that is handling RTP packets
+ RTPBufferPacket BufferPacketType = 1
+ // RTCPBufferPacket indicates the Buffer that is handling RTCP packets
+ RTCPBufferPacket BufferPacketType = 2
+)
+
+// Buffer allows writing packets to an intermediate buffer, which can then be read form.
+// This is verify similar to bytes.Buffer but avoids combining multiple writes into a single read.
+type Buffer struct {
+ mutex sync.Mutex
+
+ // this is a circular buffer. If head <= tail, then the useful
+ // data is in the interval [head, tail[. If tail < head, then
+ // the useful data is the union of [head, len[ and [0, tail[.
+ // In order to avoid ambiguity when head = tail, we always leave
+ // an unused byte in the buffer.
+ data []byte
+ head, tail int
+
+ notify chan struct{}
+ subs bool
+ closed bool
+
+ count int
+ limitCount, limitSize int
+
+ readDeadline *deadline.Deadline
+}
+
+const (
+ minSize = 2048
+ cutoffSize = 128 * 1024
+ maxSize = 4 * 1024 * 1024
+)
+
+// NewBuffer creates a new Buffer.
+func NewBuffer() *Buffer {
+ return &Buffer{
+ notify: make(chan struct{}),
+ readDeadline: deadline.New(),
+ }
+}
+
+// available returns true if the buffer is large enough to fit a packet
+// of the given size, taking overhead into account.
+func (b *Buffer) available(size int) bool {
+ available := b.head - b.tail
+ if available <= 0 {
+ available += len(b.data)
+ }
+ // we interpret head=tail as empty, so always keep a byte free
+ if size+2+1 > available {
+ return false
+ }
+
+ return true
+}
+
+// grow increases the size of the buffer. If it returns nil, then the
+// buffer has been grown. It returns ErrFull if hits a limit.
+func (b *Buffer) grow() error {
+ var newsize int
+ if len(b.data) < cutoffSize {
+ newsize = 2 * len(b.data)
+ } else {
+ newsize = 5 * len(b.data) / 4
+ }
+ if newsize < minSize {
+ newsize = minSize
+ }
+ if (b.limitSize <= 0 || sizeHardlimit) && newsize > maxSize {
+ newsize = maxSize
+ }
+
+ // one byte slack
+ if b.limitSize > 0 && newsize > b.limitSize+1 {
+ newsize = b.limitSize + 1
+ }
+
+ if newsize <= len(b.data) {
+ return ErrFull
+ }
+
+ newdata := make([]byte, newsize)
+
+ var n int
+ if b.head <= b.tail {
+ // data was contiguous
+ n = copy(newdata, b.data[b.head:b.tail])
+ } else {
+ // data was discontiguous
+ n = copy(newdata, b.data[b.head:])
+ n += copy(newdata[n:], b.data[:b.tail])
+ }
+ b.head = 0
+ b.tail = n
+ b.data = newdata
+
+ return nil
+}
+
+// Write appends a copy of the packet data to the buffer.
+// Returns ErrFull if the packet doesn't fit.
+//
+// Note that the packet size is limited to 65536 bytes since v0.11.0 due to the internal data structure.
+func (b *Buffer) Write(packet []byte) (int, error) {
+ if len(packet) >= 0x10000 {
+ return 0, errPacketTooBig
+ }
+
+ b.mutex.Lock()
+
+ if b.closed {
+ b.mutex.Unlock()
+ return 0, io.ErrClosedPipe
+ }
+
+ if (b.limitCount > 0 && b.count >= b.limitCount) ||
+ (b.limitSize > 0 && b.size()+2+len(packet) > b.limitSize) {
+ b.mutex.Unlock()
+ return 0, ErrFull
+ }
+
+ // grow the buffer until the packet fits
+ for !b.available(len(packet)) {
+ err := b.grow()
+ if err != nil {
+ b.mutex.Unlock()
+ return 0, err
+ }
+ }
+
+ var notify chan struct{}
+
+ if b.subs {
+ // readers are waiting. Prepare to notify, but only
+ // actually do it after we release the lock.
+ notify = b.notify
+ b.notify = make(chan struct{})
+ b.subs = false
+ }
+
+ // store the length of the packet
+ b.data[b.tail] = uint8(len(packet) >> 8)
+ b.tail++
+ if b.tail >= len(b.data) {
+ b.tail = 0
+ }
+ b.data[b.tail] = uint8(len(packet))
+ b.tail++
+ if b.tail >= len(b.data) {
+ b.tail = 0
+ }
+
+ // store the packet
+ n := copy(b.data[b.tail:], packet)
+ b.tail += n
+ if b.tail >= len(b.data) {
+ // we reached the end, wrap around
+ m := copy(b.data, packet[n:])
+ b.tail = m
+ }
+ b.count++
+ b.mutex.Unlock()
+
+ if notify != nil {
+ close(notify)
+ }
+
+ return len(packet), nil
+}
+
+// Read populates the given byte slice, returning the number of bytes read.
+// Blocks until data is available or the buffer is closed.
+// Returns io.ErrShortBuffer is the packet is too small to copy the Write.
+// Returns io.EOF if the buffer is closed.
+func (b *Buffer) Read(packet []byte) (n int, err error) {
+ // Return immediately if the deadline is already exceeded.
+ select {
+ case <-b.readDeadline.Done():
+ return 0, &netError{ErrTimeout, true, true}
+ default:
+ }
+
+ for {
+ b.mutex.Lock()
+
+ if b.head != b.tail {
+ // decode the packet size
+ n1 := b.data[b.head]
+ b.head++
+ if b.head >= len(b.data) {
+ b.head = 0
+ }
+ n2 := b.data[b.head]
+ b.head++
+ if b.head >= len(b.data) {
+ b.head = 0
+ }
+ count := int((uint16(n1) << 8) | uint16(n2))
+
+ // determine the number of bytes we'll actually copy
+ copied := count
+ if copied > len(packet) {
+ copied = len(packet)
+ }
+
+ // copy the data
+ if b.head+copied < len(b.data) {
+ copy(packet, b.data[b.head:b.head+copied])
+ } else {
+ k := copy(packet, b.data[b.head:])
+ copy(packet[k:], b.data[:copied-k])
+ }
+
+ // advance head, discarding any data that wasn't copied
+ b.head += count
+ if b.head >= len(b.data) {
+ b.head -= len(b.data)
+ }
+
+ if b.head == b.tail {
+ // the buffer is empty, reset to beginning
+ // in order to improve cache locality.
+ b.head = 0
+ b.tail = 0
+ }
+
+ b.count--
+
+ b.mutex.Unlock()
+
+ if copied < count {
+ return copied, io.ErrShortBuffer
+ }
+ return copied, nil
+ }
+
+ if b.closed {
+ b.mutex.Unlock()
+ return 0, io.EOF
+ }
+
+ notify := b.notify
+ b.subs = true
+ b.mutex.Unlock()
+
+ select {
+ case <-b.readDeadline.Done():
+ return 0, &netError{ErrTimeout, true, true}
+ case <-notify:
+ }
+ }
+}
+
+// Close the buffer, unblocking any pending reads.
+// Data in the buffer can still be read, Read will return io.EOF only when empty.
+func (b *Buffer) Close() (err error) {
+ b.mutex.Lock()
+
+ if b.closed {
+ b.mutex.Unlock()
+ return nil
+ }
+
+ notify := b.notify
+ b.closed = true
+
+ b.mutex.Unlock()
+
+ close(notify)
+
+ return nil
+}
+
+// Count returns the number of packets in the buffer.
+func (b *Buffer) Count() int {
+ b.mutex.Lock()
+ defer b.mutex.Unlock()
+ return b.count
+}
+
+// SetLimitCount controls the maximum number of packets that can be buffered.
+// Causes Write to return ErrFull when this limit is reached.
+// A zero value will disable this limit.
+func (b *Buffer) SetLimitCount(limit int) {
+ b.mutex.Lock()
+ defer b.mutex.Unlock()
+
+ b.limitCount = limit
+}
+
+// Size returns the total byte size of packets in the buffer, including
+// a small amount of administrative overhead.
+func (b *Buffer) Size() int {
+ b.mutex.Lock()
+ defer b.mutex.Unlock()
+
+ return b.size()
+}
+
+func (b *Buffer) size() int {
+ size := b.tail - b.head
+ if size < 0 {
+ size += len(b.data)
+ }
+ return size
+}
+
+// SetLimitSize controls the maximum number of bytes that can be buffered.
+// Causes Write to return ErrFull when this limit is reached.
+// A zero value means 4MB since v0.11.0.
+//
+// User can set packetioSizeHardlimit build tag to enable 4MB hardlimit.
+// When packetioSizeHardlimit build tag is set, SetLimitSize exceeding
+// the hardlimit will be silently discarded.
+func (b *Buffer) SetLimitSize(limit int) {
+ b.mutex.Lock()
+ defer b.mutex.Unlock()
+
+ b.limitSize = limit
+}
+
+// SetReadDeadline sets the deadline for the Read operation.
+// Setting to zero means no deadline.
+func (b *Buffer) SetReadDeadline(t time.Time) error {
+ b.readDeadline.Set(t)
+ return nil
+}
diff --git a/vendor/github.com/pion/transport/packetio/errors.go b/vendor/github.com/pion/transport/packetio/errors.go
new file mode 100644
index 0000000..06f1b9d
--- /dev/null
+++ b/vendor/github.com/pion/transport/packetio/errors.go
@@ -0,0 +1,27 @@
+package packetio
+
+import (
+ "errors"
+)
+
+// netError implements net.Error
+type netError struct {
+ error
+ timeout, temporary bool
+}
+
+func (e *netError) Timeout() bool {
+ return e.timeout
+}
+
+func (e *netError) Temporary() bool {
+ return e.temporary
+}
+
+var (
+ // ErrFull is returned when the buffer has hit the configured limits.
+ ErrFull = errors.New("packetio.Buffer is full, discarding write")
+
+ // ErrTimeout is returned when a deadline has expired
+ ErrTimeout = errors.New("i/o timeout")
+)
diff --git a/vendor/github.com/pion/transport/packetio/hardlimit.go b/vendor/github.com/pion/transport/packetio/hardlimit.go
new file mode 100644
index 0000000..5ddacc7
--- /dev/null
+++ b/vendor/github.com/pion/transport/packetio/hardlimit.go
@@ -0,0 +1,5 @@
+// +build packetioSizeHardlimit
+
+package packetio
+
+const sizeHardlimit = true
diff --git a/vendor/github.com/pion/transport/packetio/no_hardlimit.go b/vendor/github.com/pion/transport/packetio/no_hardlimit.go
new file mode 100644
index 0000000..55ea308
--- /dev/null
+++ b/vendor/github.com/pion/transport/packetio/no_hardlimit.go
@@ -0,0 +1,5 @@
+// +build !packetioSizeHardlimit
+
+package packetio
+
+const sizeHardlimit = false
diff --git a/vendor/github.com/pion/transport/replaydetector/fixedbig.go b/vendor/github.com/pion/transport/replaydetector/fixedbig.go
new file mode 100644
index 0000000..a571a1a
--- /dev/null
+++ b/vendor/github.com/pion/transport/replaydetector/fixedbig.go
@@ -0,0 +1,78 @@
+package replaydetector
+
+import (
+ "fmt"
+)
+
+// fixedBigInt is the fix-sized multi-word integer.
+type fixedBigInt struct {
+ bits []uint64
+ n uint
+ msbMask uint64
+}
+
+// newFixedBigInt creates a new fix-sized multi-word int.
+func newFixedBigInt(n uint) *fixedBigInt {
+ chunkSize := (n + 63) / 64
+ if chunkSize == 0 {
+ chunkSize = 1
+ }
+ return &fixedBigInt{
+ bits: make([]uint64, chunkSize),
+ n: n,
+ msbMask: (1 << (64 - n%64)) - 1,
+ }
+}
+
+// Lsh is the left shift operation.
+func (s *fixedBigInt) Lsh(n uint) {
+ if n == 0 {
+ return
+ }
+ nChunk := int(n / 64)
+ nN := n % 64
+
+ for i := len(s.bits) - 1; i >= 0; i-- {
+ var carry uint64
+ if i-nChunk >= 0 {
+ carry = s.bits[i-nChunk] << nN
+ if i-nChunk-1 >= 0 {
+ carry |= s.bits[i-nChunk-1] >> (64 - nN)
+ }
+ }
+ s.bits[i] = (s.bits[i] << n) | carry
+ }
+ s.bits[len(s.bits)-1] &= s.msbMask
+}
+
+// Bit returns i-th bit of the fixedBigInt.
+func (s *fixedBigInt) Bit(i uint) uint {
+ if i >= s.n {
+ return 0
+ }
+ chunk := i / 64
+ pos := i % 64
+ if s.bits[chunk]&(1<<pos) != 0 {
+ return 1
+ }
+ return 0
+}
+
+// SetBit sets i-th bit to 1.
+func (s *fixedBigInt) SetBit(i uint) {
+ if i >= s.n {
+ return
+ }
+ chunk := i / 64
+ pos := i % 64
+ s.bits[chunk] |= 1 << pos
+}
+
+// String returns string representation of fixedBigInt.
+func (s *fixedBigInt) String() string {
+ var out string
+ for i := len(s.bits) - 1; i >= 0; i-- {
+ out += fmt.Sprintf("%016X", s.bits[i])
+ }
+ return out
+}
diff --git a/vendor/github.com/pion/transport/replaydetector/replaydetector.go b/vendor/github.com/pion/transport/replaydetector/replaydetector.go
new file mode 100644
index 0000000..d942002
--- /dev/null
+++ b/vendor/github.com/pion/transport/replaydetector/replaydetector.go
@@ -0,0 +1,116 @@
+// Package replaydetector provides packet replay detection algorithm.
+package replaydetector
+
+// ReplayDetector is the interface of sequence replay detector.
+type ReplayDetector interface {
+ // Check returns true if given sequence number is not replayed.
+ // Call accept() to mark the packet is received properly.
+ Check(seq uint64) (accept func(), ok bool)
+}
+
+type slidingWindowDetector struct {
+ latestSeq uint64
+ maxSeq uint64
+ windowSize uint
+ mask *fixedBigInt
+}
+
+// New creates ReplayDetector.
+// Created ReplayDetector doesn't allow wrapping.
+// It can handle monotonically increasing sequence number up to
+// full 64bit number. It is suitable for DTLS replay protection.
+func New(windowSize uint, maxSeq uint64) ReplayDetector {
+ return &slidingWindowDetector{
+ maxSeq: maxSeq,
+ windowSize: windowSize,
+ mask: newFixedBigInt(windowSize),
+ }
+}
+
+func (d *slidingWindowDetector) Check(seq uint64) (accept func(), ok bool) {
+ if seq > d.maxSeq {
+ // Exceeded upper limit.
+ return func() {}, false
+ }
+
+ if seq <= d.latestSeq {
+ if d.latestSeq >= uint64(d.windowSize)+seq {
+ return func() {}, false
+ }
+ if d.mask.Bit(uint(d.latestSeq-seq)) != 0 {
+ // The sequence number is duplicated.
+ return func() {}, false
+ }
+ }
+
+ return func() {
+ if seq > d.latestSeq {
+ // Update the head of the window.
+ d.mask.Lsh(uint(seq - d.latestSeq))
+ d.latestSeq = seq
+ }
+ diff := (d.latestSeq - seq) % d.maxSeq
+ d.mask.SetBit(uint(diff))
+ }, true
+}
+
+// WithWrap creates ReplayDetector allowing sequence wrapping.
+// This is suitable for short bitwidth counter like SRTP and SRTCP.
+func WithWrap(windowSize uint, maxSeq uint64) ReplayDetector {
+ return &wrappedSlidingWindowDetector{
+ maxSeq: maxSeq,
+ windowSize: windowSize,
+ mask: newFixedBigInt(windowSize),
+ }
+}
+
+type wrappedSlidingWindowDetector struct {
+ latestSeq uint64
+ maxSeq uint64
+ windowSize uint
+ mask *fixedBigInt
+ init bool
+}
+
+func (d *wrappedSlidingWindowDetector) Check(seq uint64) (accept func(), ok bool) {
+ if seq > d.maxSeq {
+ // Exceeded upper limit.
+ return func() {}, false
+ }
+ if !d.init {
+ if seq != 0 {
+ d.latestSeq = seq - 1
+ } else {
+ d.latestSeq = d.maxSeq
+ }
+ d.init = true
+ }
+
+ diff := int64(d.latestSeq) - int64(seq)
+ // Wrap the number.
+ if diff > int64(d.maxSeq)/2 {
+ diff -= int64(d.maxSeq + 1)
+ } else if diff <= -int64(d.maxSeq)/2 {
+ diff += int64(d.maxSeq + 1)
+ }
+
+ if diff >= int64(d.windowSize) {
+ // Too old.
+ return func() {}, false
+ }
+ if diff >= 0 {
+ if d.mask.Bit(uint(diff)) != 0 {
+ // The sequence number is duplicated.
+ return func() {}, false
+ }
+ }
+
+ return func() {
+ if diff < 0 {
+ // Update the head of the window.
+ d.mask.Lsh(uint(-diff))
+ d.latestSeq = seq
+ }
+ d.mask.SetBit(uint(d.latestSeq - seq))
+ }, true
+}
diff --git a/vendor/github.com/pion/transport/vnet/.gitignore b/vendor/github.com/pion/transport/vnet/.gitignore
new file mode 100644
index 0000000..d39fb86
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/.gitignore
@@ -0,0 +1 @@
+*.sw[poe]
diff --git a/vendor/github.com/pion/transport/vnet/README.md b/vendor/github.com/pion/transport/vnet/README.md
new file mode 100644
index 0000000..b502f9f
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/README.md
@@ -0,0 +1,239 @@
+# vnet
+A virtual network layer for pion.
+
+## Overview
+
+### Goals
+* To make NAT traversal tests easy.
+* To emulate packet impairment at application level for testing.
+* To monitor packets at specified arbitrary interfaces.
+
+### Features
+* Configurable virtual LAN and WAN
+* Virtually hosted ICE servers
+
+### Virtual network components
+
+#### Top View
+```
+ ......................................
+ : Virtual Network (vnet) :
+ : :
+ +-------+ * 1 +----+ +--------+ :
+ | :App |------------>|:Net|--o<-----|:Router | :
+ +-------+ +----+ | | :
+ +-----------+ * 1 +----+ | | :
+ |:STUNServer|-------->|:Net|--o<-----| | :
+ +-----------+ +----+ | | :
+ +-----------+ * 1 +----+ | | :
+ |:TURNServer|-------->|:Net|--o<-----| | :
+ +-----------+ +----+ [1] | | :
+ : 1 | | 1 <<has>> :
+ : +---<>| |<>----+ [2] :
+ : | +--------+ | :
+ To form | *| v 0..1 :
+ a subnet tree | o [3] +-----+ :
+ : | ^ |:NAT | :
+ : | | +-----+ :
+ : +-------+ :
+ ......................................
+ Note:
+ o: NIC (Netork Interface Controller)
+ [1]: Net implments NIC interface.
+ [2]: Root router has no NAT. All child routers have a NAT always.
+ [3]: Router implements NIC interface for accesses from the
+ parent router.
+```
+
+#### Net
+Net provides 3 interfaces:
+* Configuration API (direct)
+* Network API via Net (equivalent to net.Xxx())
+* Router access via NIC interface
+```
+ (Pion module/app, ICE servers, etc.)
+ +-----------+
+ | :App |
+ +-----------+
+ * |
+ | <<uses>>
+ 1 v
+ +---------+ 1 * +-----------+ 1 * +-----------+ 1 * +------+
+ ..| :Router |----+------>o--| :Net |<>------|:Interface |<>------|:Addr |
+ +---------+ | NIC +-----------+ +-----------+ +------+
+ | <<interface>> (vnet.Interface) (net.Addr)
+ |
+ | * +-----------+ 1 * +-----------+ 1 * +------+
+ +------>o--| :Router |<>------|:Interface |<>------|:Addr |
+ NIC +-----------+ +-----------+ +------+
+ <<interface>> (vnet.Interface) (net.Addr)
+```
+
+> The instance of `Net` will be the one passed around the project.
+> Net class has public methods for configuration and for application use.
+
+
+## Implementation
+
+### Design Policy
+* Each pion package should have config object which has `Net` (of type vnet.Net) property. (just like how
+ we distribute `LoggerFactory` throughout the pion project.
+* DNS => a simple dictionary (global)?
+* Each Net has routing capability (a goroutine)
+* Use interface provided net package as much as possible
+* Routers are connected in a tree structure (no loop is allowed)
+ - To simplify routing
+ - Easy to control / monitor (stats, etc)
+* Root router has no NAT (== Internet / WAN)
+* Non-root router has a NAT always
+* When a Net is instantiated, it will automatically add `lo0` and `eth0` interface, and `lo0` will
+have one IP address, 127.0.0.1. (this is not used in pion/ice, however)
+* When a Net is added to a router, the router automatically assign an IP address for `eth0`
+interface.
+ - For simplicity
+* User data won't fragment, but optionally drop chunk larger than MTU
+* IPv6 is not supported
+
+### Basic steps for setting up virtual network
+1. Create a root router (WAN)
+1. Create child routers and add to its parent (forms a tree, don't create a loop!)
+1. Add instances of Net to each routers
+1. Call Stop(), or Stop(), on the top router, which propages all other routers
+
+#### Example: WAN with one endpoint (vnet)
+```go
+import (
+ "net"
+
+ "github.com/pion/transport/vnet"
+ "github.com/pion/logging"
+)
+
+// Create WAN (a root router).
+wan, err := vnet.NewRouter(&RouterConfig{
+ CIDR: "0.0.0.0/0",
+ LoggerFactory: logging.NewDefaultLoggerFactory(),
+})
+
+// Create a network.
+// You can specify a static IP for the instance of Net to use. If not specified,
+// router will assign an IP address that is contained in the router's CIDR.
+nw := vnet.NewNet(&vnet.NetConfig{
+ StaticIP: "27.1.2.3",
+})
+
+// Add the network to the router.
+// The router will assign an IP address to `nw`.
+if err = wan.AddNet(nw); err != nil {
+ // handle error
+}
+
+// Start router.
+// This will start internal goroutine to route packets.
+// If you set child routers (using AddRouter), the call on the root router
+// will start the rest of routers for you.
+if err = wan.Start(); err != nil {
+ // handle error
+}
+
+//
+// Your application runs here using `nw`.
+//
+
+// Stop the router.
+// This will stop all internal goroutines in the router tree.
+// (No need to call Stop() on child routers)
+if err = wan.Stop(); err != nil {
+ // handle error
+}
+```
+
+#### Example of how to pass around the instance of vnet.Net
+The instance of vnet.Net wraps a subset of net package to enable operations
+on the virtual network. Your project must be able to pass the instance to
+all your routines that do network operation with net package. A typical way
+is to use a config param to create your instances with the virtual network
+instance (`nw` in the above example) like this:
+
+```go
+type AgentConfig struct {
+ :
+ Net: *vnet.Net,
+}
+
+type Agent struct {
+ :
+ net: *vnet.Net,
+}
+
+func NetAgent(config *AgentConfig) *Agent {
+ if config.Net == nil {
+ config.Net = vnet.NewNet(nil) // defaults to native operation
+ }
+
+ return &Agent {
+ :
+ net: config.Net,
+ }
+}
+```
+
+```go
+// a.net is the instance of vnet.Net class
+func (a *Agent) listenUDP(...) error {
+ conn, err := a.net.ListenPacket(udpString, ...)
+ if err != nil {
+ return nil, err
+ }
+ :
+}
+```
+
+
+### Compatibility and Support Status
+
+|`net`<br>(built-in)|`vnet`|Note|
+|---|---|---|
+|net.Interfaces()|a.net.Interfaces()||
+|net.InterfaceByName()|a.net.InterfaceByName()||
+|net.ResolveUDPAddr()|a.net.ResolveUDPAddr()||
+|net.ListenPacket()|a.net.ListenPacket()||
+|net.ListenUDP()|a.net.ListenUDP()|(ListenPacket() is recommended)|
+|net.Listen()|a.net.Listen()|(TODO)|
+|net.ListenTCP()|(not supported)|(Listen() would be recommended)|
+|net.Dial()|a.net.Dial()||
+|net.DialUDP()|a.net.DialUDP()||
+|net.DialTCP()|(not supported)||
+|net.Interface|vnet.Interface||
+|net.PacketConn|(use it as-is)||
+|net.UDPConn|vnet.UDPConn|Use vnet.UDPPacketConn in your code|
+|net.TCPConn|vnet.TCPConn|(TODO)|Use net.Conn in your code|
+|net.Dialer|vnet.Dialer|Use a.net.CreateDialer() to create it.<br>The use of vnet.Dialer is currently experimental.|
+
+> `a.net` is an instance of Net class, and types are defined under the package name `vnet`
+
+> Most of other `interface` types in net package can be used as is.
+
+> Please post a github issue when other types/methods need to be added to vnet/vnet.Net.
+
+## TODO / Next Step
+* Implement TCP (TCPConn, Listen)
+* Support of IPv6
+* Write a bunch of examples for building virtual networks.
+* Add network impairment features (on Router)
+ - Introduce lantecy / jitter
+ - Packet filtering handler (allow selectively drop packets, etc.)
+* Add statistics data retrieval
+ - Total number of packets forward by each router
+ - Total number of packet loss
+ - Total number of connection failure (TCP)
+
+## References
+* [Comparing Simulated Packet Loss and RealWorld Network Congestion](https://www.riverbed.com/document/fpo/WhitePaper-Riverbed-SimulatedPacketLoss.pdf)
+
+### Code experiments
+* [CIDR and IPMask](https://play.golang.org/p/B7OBhkZqjmj)
+* [Test with net.IP](https://play.golang.org/p/AgXd23wKY4W)
+* [ListenPacket](https://play.golang.org/p/d4vasbnRimQ)
+* [isDottedIP()](https://play.golang.org/p/t4aZ47TgJfO)
+* [SplitHostPort](https://play.golang.org/p/JtvurlcMbhn)
diff --git a/vendor/github.com/pion/transport/vnet/chunk.go b/vendor/github.com/pion/transport/vnet/chunk.go
new file mode 100644
index 0000000..7a87a2f
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/chunk.go
@@ -0,0 +1,283 @@
+package vnet
+
+import (
+ "fmt"
+ "net"
+ "strconv"
+ "strings"
+ "sync/atomic"
+ "time"
+)
+
+type tcpFlag uint8
+
+const (
+ tcpFIN tcpFlag = 0x01
+ tcpSYN tcpFlag = 0x02
+ tcpRST tcpFlag = 0x04
+ tcpPSH tcpFlag = 0x08
+ tcpACK tcpFlag = 0x10
+)
+
+func (f tcpFlag) String() string {
+ var sa []string
+ if f&tcpFIN != 0 {
+ sa = append(sa, "FIN")
+ }
+ if f&tcpSYN != 0 {
+ sa = append(sa, "SYN")
+ }
+ if f&tcpRST != 0 {
+ sa = append(sa, "RST")
+ }
+ if f&tcpPSH != 0 {
+ sa = append(sa, "PSH")
+ }
+ if f&tcpACK != 0 {
+ sa = append(sa, "ACK")
+ }
+
+ return strings.Join(sa, "-")
+}
+
+// Generate a base36-encoded unique tag
+// See: https://play.golang.org/p/0ZaAID1q-HN
+var assignChunkTag = func() func() string { //nolint:gochecknoglobals
+ var tagCtr uint64
+
+ return func() string {
+ n := atomic.AddUint64(&tagCtr, 1)
+ return strconv.FormatUint(n, 36)
+ }
+}()
+
+// Chunk represents a packet passed around in the vnet
+type Chunk interface {
+ setTimestamp() time.Time // used by router
+ getTimestamp() time.Time // used by router
+ getSourceIP() net.IP // used by router
+ getDestinationIP() net.IP // used by router
+ setSourceAddr(address string) error // used by nat
+ setDestinationAddr(address string) error // used by nat
+
+ SourceAddr() net.Addr
+ DestinationAddr() net.Addr
+ UserData() []byte
+ Tag() string
+ Clone() Chunk
+ Network() string // returns "udp" or "tcp"
+ String() string
+}
+
+type chunkIP struct {
+ timestamp time.Time
+ sourceIP net.IP
+ destinationIP net.IP
+ tag string
+}
+
+func (c *chunkIP) setTimestamp() time.Time {
+ c.timestamp = time.Now()
+ return c.timestamp
+}
+
+func (c *chunkIP) getTimestamp() time.Time {
+ return c.timestamp
+}
+
+func (c *chunkIP) getDestinationIP() net.IP {
+ return c.destinationIP
+}
+
+func (c *chunkIP) getSourceIP() net.IP {
+ return c.sourceIP
+}
+
+func (c *chunkIP) Tag() string {
+ return c.tag
+}
+
+type chunkUDP struct {
+ chunkIP
+ sourcePort int
+ destinationPort int
+ userData []byte
+}
+
+func newChunkUDP(srcAddr, dstAddr *net.UDPAddr) *chunkUDP {
+ return &chunkUDP{
+ chunkIP: chunkIP{
+ sourceIP: srcAddr.IP,
+ destinationIP: dstAddr.IP,
+ tag: assignChunkTag(),
+ },
+ sourcePort: srcAddr.Port,
+ destinationPort: dstAddr.Port,
+ }
+}
+
+func (c *chunkUDP) SourceAddr() net.Addr {
+ return &net.UDPAddr{
+ IP: c.sourceIP,
+ Port: c.sourcePort,
+ }
+}
+
+func (c *chunkUDP) DestinationAddr() net.Addr {
+ return &net.UDPAddr{
+ IP: c.destinationIP,
+ Port: c.destinationPort,
+ }
+}
+
+func (c *chunkUDP) UserData() []byte {
+ return c.userData
+}
+
+func (c *chunkUDP) Clone() Chunk {
+ var userData []byte
+ if c.userData != nil {
+ userData = make([]byte, len(c.userData))
+ copy(userData, c.userData)
+ }
+
+ return &chunkUDP{
+ chunkIP: chunkIP{
+ timestamp: c.timestamp,
+ sourceIP: c.sourceIP,
+ destinationIP: c.destinationIP,
+ tag: c.tag,
+ },
+ sourcePort: c.sourcePort,
+ destinationPort: c.destinationPort,
+ userData: userData,
+ }
+}
+
+func (c *chunkUDP) Network() string {
+ return udpString
+}
+
+func (c *chunkUDP) String() string {
+ src := c.SourceAddr()
+ dst := c.DestinationAddr()
+ return fmt.Sprintf("%s chunk %s %s => %s",
+ src.Network(),
+ c.tag,
+ src.String(),
+ dst.String(),
+ )
+}
+
+func (c *chunkUDP) setSourceAddr(address string) error {
+ addr, err := net.ResolveUDPAddr(udpString, address)
+ if err != nil {
+ return err
+ }
+ c.sourceIP = addr.IP
+ c.sourcePort = addr.Port
+ return nil
+}
+
+func (c *chunkUDP) setDestinationAddr(address string) error {
+ addr, err := net.ResolveUDPAddr(udpString, address)
+ if err != nil {
+ return err
+ }
+ c.destinationIP = addr.IP
+ c.destinationPort = addr.Port
+ return nil
+}
+
+type chunkTCP struct {
+ chunkIP
+ sourcePort int
+ destinationPort int
+ flags tcpFlag // control bits
+ userData []byte // only with PSH flag
+ // seq uint32 // always starts with 0
+ // ack uint32 // always starts with 0
+}
+
+func newChunkTCP(srcAddr, dstAddr *net.TCPAddr, flags tcpFlag) *chunkTCP {
+ return &chunkTCP{
+ chunkIP: chunkIP{
+ sourceIP: srcAddr.IP,
+ destinationIP: dstAddr.IP,
+ tag: assignChunkTag(),
+ },
+ sourcePort: srcAddr.Port,
+ destinationPort: dstAddr.Port,
+ flags: flags,
+ }
+}
+
+func (c *chunkTCP) SourceAddr() net.Addr {
+ return &net.TCPAddr{
+ IP: c.sourceIP,
+ Port: c.sourcePort,
+ }
+}
+
+func (c *chunkTCP) DestinationAddr() net.Addr {
+ return &net.TCPAddr{
+ IP: c.destinationIP,
+ Port: c.destinationPort,
+ }
+}
+
+func (c *chunkTCP) UserData() []byte {
+ return c.userData
+}
+
+func (c *chunkTCP) Clone() Chunk {
+ userData := make([]byte, len(c.userData))
+ copy(userData, c.userData)
+
+ return &chunkTCP{
+ chunkIP: chunkIP{
+ timestamp: c.timestamp,
+ sourceIP: c.sourceIP,
+ destinationIP: c.destinationIP,
+ },
+ sourcePort: c.sourcePort,
+ destinationPort: c.destinationPort,
+ userData: userData,
+ }
+}
+
+func (c *chunkTCP) Network() string {
+ return "tcp"
+}
+
+func (c *chunkTCP) String() string {
+ src := c.SourceAddr()
+ dst := c.DestinationAddr()
+ return fmt.Sprintf("%s %s chunk %s %s => %s",
+ src.Network(),
+ c.flags.String(),
+ c.tag,
+ src.String(),
+ dst.String(),
+ )
+}
+
+func (c *chunkTCP) setSourceAddr(address string) error {
+ addr, err := net.ResolveTCPAddr("tcp", address)
+ if err != nil {
+ return err
+ }
+ c.sourceIP = addr.IP
+ c.sourcePort = addr.Port
+ return nil
+}
+
+func (c *chunkTCP) setDestinationAddr(address string) error {
+ addr, err := net.ResolveTCPAddr("tcp", address)
+ if err != nil {
+ return err
+ }
+ c.destinationIP = addr.IP
+ c.destinationPort = addr.Port
+ return nil
+}
diff --git a/vendor/github.com/pion/transport/vnet/chunk_queue.go b/vendor/github.com/pion/transport/vnet/chunk_queue.go
new file mode 100644
index 0000000..7b24462
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/chunk_queue.go
@@ -0,0 +1,52 @@
+package vnet
+
+import (
+ "sync"
+)
+
+type chunkQueue struct {
+ chunks []Chunk
+ maxSize int // 0 or negative value: unlimited
+ mutex sync.RWMutex
+}
+
+func newChunkQueue(maxSize int) *chunkQueue {
+ return &chunkQueue{maxSize: maxSize}
+}
+
+func (q *chunkQueue) push(c Chunk) bool {
+ q.mutex.Lock()
+ defer q.mutex.Unlock()
+
+ if q.maxSize > 0 && len(q.chunks) >= q.maxSize {
+ return false // dropped
+ }
+
+ q.chunks = append(q.chunks, c)
+ return true
+}
+
+func (q *chunkQueue) pop() (Chunk, bool) {
+ q.mutex.Lock()
+ defer q.mutex.Unlock()
+
+ if len(q.chunks) == 0 {
+ return nil, false
+ }
+
+ c := q.chunks[0]
+ q.chunks = q.chunks[1:]
+
+ return c, true
+}
+
+func (q *chunkQueue) peek() Chunk {
+ q.mutex.RLock()
+ defer q.mutex.RUnlock()
+
+ if len(q.chunks) == 0 {
+ return nil
+ }
+
+ return q.chunks[0]
+}
diff --git a/vendor/github.com/pion/transport/vnet/conn.go b/vendor/github.com/pion/transport/vnet/conn.go
new file mode 100644
index 0000000..f4b8b92
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/conn.go
@@ -0,0 +1,246 @@
+package vnet
+
+import (
+ "errors"
+ "io"
+ "math"
+ "net"
+ "sync"
+ "time"
+)
+
+const (
+ maxReadQueueSize = 1024
+)
+
+var (
+ errObsCannotBeNil = errors.New("obs cannot be nil")
+ errUseClosedNetworkConn = errors.New("use of closed network connection")
+ errAddrNotUDPAddr = errors.New("addr is not a net.UDPAddr")
+ errLocAddr = errors.New("something went wrong with locAddr")
+ errAlreadyClosed = errors.New("already closed")
+ errNoRemAddr = errors.New("no remAddr defined")
+)
+
+// UDPPacketConn is packet-oriented connection for UDP.
+type UDPPacketConn interface {
+ net.PacketConn
+ Read(b []byte) (int, error)
+ RemoteAddr() net.Addr
+ Write(b []byte) (int, error)
+}
+
+// vNet implements this
+type connObserver interface {
+ write(c Chunk) error
+ onClosed(addr net.Addr)
+ determineSourceIP(locIP, dstIP net.IP) net.IP
+}
+
+// UDPConn is the implementation of the Conn and PacketConn interfaces for UDP network connections.
+// comatible with net.PacketConn and net.Conn
+type UDPConn struct {
+ locAddr *net.UDPAddr // read-only
+ remAddr *net.UDPAddr // read-only
+ obs connObserver // read-only
+ readCh chan Chunk // thread-safe
+ closed bool // requires mutex
+ mu sync.Mutex // to mutex closed flag
+ readTimer *time.Timer // thread-safe
+}
+
+func newUDPConn(locAddr, remAddr *net.UDPAddr, obs connObserver) (*UDPConn, error) {
+ if obs == nil {
+ return nil, errObsCannotBeNil
+ }
+
+ return &UDPConn{
+ locAddr: locAddr,
+ remAddr: remAddr,
+ obs: obs,
+ readCh: make(chan Chunk, maxReadQueueSize),
+ readTimer: time.NewTimer(time.Duration(math.MaxInt64)),
+ }, nil
+}
+
+// ReadFrom reads a packet from the connection,
+// copying the payload into p. It returns the number of
+// bytes copied into p and the return address that
+// was on the packet.
+// It returns the number of bytes read (0 <= n <= len(p))
+// and any error encountered. Callers should always process
+// the n > 0 bytes returned before considering the error err.
+// ReadFrom can be made to time out and return
+// an Error with Timeout() == true after a fixed time limit;
+// see SetDeadline and SetReadDeadline.
+func (c *UDPConn) ReadFrom(p []byte) (n int, addr net.Addr, err error) {
+loop:
+ for {
+ select {
+ case chunk, ok := <-c.readCh:
+ if !ok {
+ break loop
+ }
+ var err error
+ n := copy(p, chunk.UserData())
+ addr := chunk.SourceAddr()
+ if n < len(chunk.UserData()) {
+ err = io.ErrShortBuffer
+ }
+
+ if c.remAddr != nil {
+ if addr.String() != c.remAddr.String() {
+ break // discard (shouldn't happen)
+ }
+ }
+ return n, addr, err
+
+ case <-c.readTimer.C:
+ return 0, nil, &net.OpError{
+ Op: "read",
+ Net: c.locAddr.Network(),
+ Addr: c.locAddr,
+ Err: newTimeoutError("i/o timeout"),
+ }
+ }
+ }
+
+ return 0, nil, &net.OpError{
+ Op: "read",
+ Net: c.locAddr.Network(),
+ Addr: c.locAddr,
+ Err: errUseClosedNetworkConn,
+ }
+}
+
+// WriteTo writes a packet with payload p to addr.
+// WriteTo can be made to time out and return
+// an Error with Timeout() == true after a fixed time limit;
+// see SetDeadline and SetWriteDeadline.
+// On packet-oriented connections, write timeouts are rare.
+func (c *UDPConn) WriteTo(p []byte, addr net.Addr) (n int, err error) {
+ dstAddr, ok := addr.(*net.UDPAddr)
+ if !ok {
+ return 0, errAddrNotUDPAddr
+ }
+
+ srcIP := c.obs.determineSourceIP(c.locAddr.IP, dstAddr.IP)
+ if srcIP == nil {
+ return 0, errLocAddr
+ }
+ srcAddr := &net.UDPAddr{
+ IP: srcIP,
+ Port: c.locAddr.Port,
+ }
+
+ chunk := newChunkUDP(srcAddr, dstAddr)
+ chunk.userData = make([]byte, len(p))
+ copy(chunk.userData, p)
+ if err := c.obs.write(chunk); err != nil {
+ return 0, err
+ }
+ return len(p), nil
+}
+
+// Close closes the connection.
+// Any blocked ReadFrom or WriteTo operations will be unblocked and return errors.
+func (c *UDPConn) Close() error {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+
+ if c.closed {
+ return errAlreadyClosed
+ }
+ c.closed = true
+ close(c.readCh)
+
+ c.obs.onClosed(c.locAddr)
+ return nil
+}
+
+// LocalAddr returns the local network address.
+func (c *UDPConn) LocalAddr() net.Addr {
+ return c.locAddr
+}
+
+// SetDeadline sets the read and write deadlines associated
+// with the connection. It is equivalent to calling both
+// SetReadDeadline and SetWriteDeadline.
+//
+// A deadline is an absolute time after which I/O operations
+// fail with a timeout (see type Error) instead of
+// blocking. The deadline applies to all future and pending
+// I/O, not just the immediately following call to ReadFrom or
+// WriteTo. After a deadline has been exceeded, the connection
+// can be refreshed by setting a deadline in the future.
+//
+// An idle timeout can be implemented by repeatedly extending
+// the deadline after successful ReadFrom or WriteTo calls.
+//
+// A zero value for t means I/O operations will not time out.
+func (c *UDPConn) SetDeadline(t time.Time) error {
+ return c.SetReadDeadline(t)
+}
+
+// SetReadDeadline sets the deadline for future ReadFrom calls
+// and any currently-blocked ReadFrom call.
+// A zero value for t means ReadFrom will not time out.
+func (c *UDPConn) SetReadDeadline(t time.Time) error {
+ var d time.Duration
+ var noDeadline time.Time
+ if t == noDeadline {
+ d = time.Duration(math.MaxInt64)
+ } else {
+ d = time.Until(t)
+ }
+ c.readTimer.Reset(d)
+ return nil
+}
+
+// SetWriteDeadline sets the deadline for future WriteTo calls
+// and any currently-blocked WriteTo call.
+// Even if write times out, it may return n > 0, indicating that
+// some of the data was successfully written.
+// A zero value for t means WriteTo will not time out.
+func (c *UDPConn) SetWriteDeadline(t time.Time) error {
+ // Write never blocks.
+ return nil
+}
+
+// Read reads data from the connection.
+// Read can be made to time out and return an Error with Timeout() == true
+// after a fixed time limit; see SetDeadline and SetReadDeadline.
+func (c *UDPConn) Read(b []byte) (int, error) {
+ n, _, err := c.ReadFrom(b)
+ return n, err
+}
+
+// RemoteAddr returns the remote network address.
+func (c *UDPConn) RemoteAddr() net.Addr {
+ return c.remAddr
+}
+
+// Write writes data to the connection.
+// Write can be made to time out and return an Error with Timeout() == true
+// after a fixed time limit; see SetDeadline and SetWriteDeadline.
+func (c *UDPConn) Write(b []byte) (int, error) {
+ if c.remAddr == nil {
+ return 0, errNoRemAddr
+ }
+
+ return c.WriteTo(b, c.remAddr)
+}
+
+func (c *UDPConn) onInboundChunk(chunk Chunk) {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+
+ if c.closed {
+ return
+ }
+
+ select {
+ case c.readCh <- chunk:
+ default:
+ }
+}
diff --git a/vendor/github.com/pion/transport/vnet/conn_map.go b/vendor/github.com/pion/transport/vnet/conn_map.go
new file mode 100644
index 0000000..d52818d
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/conn_map.go
@@ -0,0 +1,136 @@
+package vnet
+
+import (
+ "errors"
+ "net"
+ "sync"
+)
+
+var (
+ errAddressAlreadyInUse = errors.New("address already in use")
+ errNoSuchUDPConn = errors.New("no such UDPConn")
+ errCannotRemoveUnspecifiedIP = errors.New("cannot remove unspecified IP by the specified IP")
+)
+
+type udpConnMap struct {
+ portMap map[int][]*UDPConn
+ mutex sync.RWMutex
+}
+
+func newUDPConnMap() *udpConnMap {
+ return &udpConnMap{
+ portMap: map[int][]*UDPConn{},
+ }
+}
+
+func (m *udpConnMap) insert(conn *UDPConn) error {
+ m.mutex.Lock()
+ defer m.mutex.Unlock()
+
+ udpAddr := conn.LocalAddr().(*net.UDPAddr)
+
+ // check if the port has a listener
+ conns, ok := m.portMap[udpAddr.Port]
+ if ok {
+ if udpAddr.IP.IsUnspecified() {
+ return errAddressAlreadyInUse
+ }
+
+ for _, conn := range conns {
+ laddr := conn.LocalAddr().(*net.UDPAddr)
+ if laddr.IP.IsUnspecified() || laddr.IP.Equal(udpAddr.IP) {
+ return errAddressAlreadyInUse
+ }
+ }
+
+ conns = append(conns, conn)
+ } else {
+ conns = []*UDPConn{conn}
+ }
+
+ m.portMap[udpAddr.Port] = conns
+ return nil
+}
+
+func (m *udpConnMap) find(addr net.Addr) (*UDPConn, bool) {
+ m.mutex.Lock() // could be RLock, but we have delete() op
+ defer m.mutex.Unlock()
+
+ udpAddr := addr.(*net.UDPAddr)
+
+ if conns, ok := m.portMap[udpAddr.Port]; ok {
+ if udpAddr.IP.IsUnspecified() {
+ // pick the first one appears in the iteration
+ if len(conns) == 0 {
+ // This can't happen!
+ delete(m.portMap, udpAddr.Port)
+ return nil, false
+ }
+ return conns[0], true
+ }
+
+ for _, conn := range conns {
+ laddr := conn.LocalAddr().(*net.UDPAddr)
+ if laddr.IP.IsUnspecified() || laddr.IP.Equal(udpAddr.IP) {
+ return conn, ok
+ }
+ }
+ }
+
+ return nil, false
+}
+
+func (m *udpConnMap) delete(addr net.Addr) error {
+ m.mutex.Lock()
+ defer m.mutex.Unlock()
+
+ udpAddr := addr.(*net.UDPAddr)
+
+ conns, ok := m.portMap[udpAddr.Port]
+ if !ok {
+ return errNoSuchUDPConn
+ }
+
+ if udpAddr.IP.IsUnspecified() {
+ // remove all from this port
+ delete(m.portMap, udpAddr.Port)
+ return nil
+ }
+
+ newConns := []*UDPConn{}
+
+ for _, conn := range conns {
+ laddr := conn.LocalAddr().(*net.UDPAddr)
+ if laddr.IP.IsUnspecified() {
+ // This can't happen!
+ return errCannotRemoveUnspecifiedIP
+ }
+
+ if laddr.IP.Equal(udpAddr.IP) {
+ continue
+ }
+
+ newConns = append(newConns, conn)
+ }
+
+ if len(newConns) == 0 {
+ delete(m.portMap, udpAddr.Port)
+ } else {
+ m.portMap[udpAddr.Port] = newConns
+ }
+
+ return nil
+}
+
+// size returns the number of UDPConns (UDP listeners)
+func (m *udpConnMap) size() int {
+ m.mutex.RLock()
+ defer m.mutex.RUnlock()
+
+ n := 0
+ for _, conns := range m.portMap {
+ n += len(conns)
+ }
+
+ return n
+}
diff --git a/vendor/github.com/pion/transport/vnet/errors.go b/vendor/github.com/pion/transport/vnet/errors.go
new file mode 100644
index 0000000..d0e9394
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/errors.go
@@ -0,0 +1,19 @@
+package vnet
+
+type timeoutError struct {
+ msg string
+}
+
+func newTimeoutError(msg string) error {
+ return &timeoutError{
+ msg: msg,
+ }
+}
+
+func (e *timeoutError) Error() string {
+ return e.msg
+}
+
+func (e *timeoutError) Timeout() bool {
+ return true
+}
diff --git a/vendor/github.com/pion/transport/vnet/interface.go b/vendor/github.com/pion/transport/vnet/interface.go
new file mode 100644
index 0000000..ec80c0b
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/interface.go
@@ -0,0 +1,40 @@
+package vnet
+
+import (
+ "errors"
+ "net"
+)
+
+var errNoAddressAssigned = errors.New("no address assigned")
+
+// See: https://play.golang.org/p/nBO9KGYEziv
+
+// InterfaceBase ...
+type InterfaceBase net.Interface
+
+// Interface ...
+type Interface struct {
+ InterfaceBase
+ addrs []net.Addr
+}
+
+// NewInterface ...
+func NewInterface(ifc net.Interface) *Interface {
+ return &Interface{
+ InterfaceBase: InterfaceBase(ifc),
+ addrs: nil,
+ }
+}
+
+// AddAddr ...
+func (ifc *Interface) AddAddr(addr net.Addr) {
+ ifc.addrs = append(ifc.addrs, addr)
+}
+
+// Addrs ...
+func (ifc *Interface) Addrs() ([]net.Addr, error) {
+ if len(ifc.addrs) == 0 {
+ return nil, errNoAddressAssigned
+ }
+ return ifc.addrs, nil
+}
diff --git a/vendor/github.com/pion/transport/vnet/nat.go b/vendor/github.com/pion/transport/vnet/nat.go
new file mode 100644
index 0000000..4ece5fa
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/nat.go
@@ -0,0 +1,338 @@
+package vnet
+
+import (
+ "errors"
+ "fmt"
+ "net"
+ "sync"
+ "time"
+
+ "github.com/pion/logging"
+)
+
+var (
+ errNATRequriesMapping = errors.New("1:1 NAT requires more than one mapping")
+ errMismatchLengthIP = errors.New("length mismtach between mappedIPs and localIPs")
+ errNonUDPTranslationNotSupported = errors.New("non-udp translation is not supported yet")
+ errNoAssociatedLocalAddress = errors.New("no associated local address")
+ errNoNATBindingFound = errors.New("no NAT binding found")
+ errHasNoPermission = errors.New("has no permission")
+)
+
+// EndpointDependencyType defines a type of behavioral dependendency on the
+// remote endpoint's IP address or port number. This is used for the two
+// kinds of behaviors:
+// - Port mapping behavior
+// - Filtering behavior
+// See: https://tools.ietf.org/html/rfc4787
+type EndpointDependencyType uint8
+
+const (
+ // EndpointIndependent means the behavior is independent of the endpoint's address or port
+ EndpointIndependent EndpointDependencyType = iota
+ // EndpointAddrDependent means the behavior is dependent on the endpoint's address
+ EndpointAddrDependent
+ // EndpointAddrPortDependent means the behavior is dependent on the endpoint's address and port
+ EndpointAddrPortDependent
+)
+
+// NATMode defines basic behavior of the NAT
+type NATMode uint8
+
+const (
+ // NATModeNormal means the NAT behaves as a standard NAPT (RFC 2663).
+ NATModeNormal NATMode = iota
+ // NATModeNAT1To1 exhibits 1:1 DNAT where the external IP address is statically mapped to
+ // a specific local IP address with port number is preserved always between them.
+ // When this mode is selected, MappingBehavior, FilteringBehavior, PortPreservation and
+ // MappingLifeTime of NATType are ignored.
+ NATModeNAT1To1
+)
+
+const (
+ defaultNATMappingLifeTime = 30 * time.Second
+)
+
+// NATType has a set of parameters that define the behavior of NAT.
+type NATType struct {
+ Mode NATMode
+ MappingBehavior EndpointDependencyType
+ FilteringBehavior EndpointDependencyType
+ Hairpining bool // Not implemented yet
+ PortPreservation bool // Not implemented yet
+ MappingLifeTime time.Duration
+}
+
+type natConfig struct {
+ name string
+ natType NATType
+ mappedIPs []net.IP // mapped IPv4
+ localIPs []net.IP // local IPv4, required only when the mode is NATModeNAT1To1
+ loggerFactory logging.LoggerFactory
+}
+
+type mapping struct {
+ proto string // "udp" or "tcp"
+ local string // "<local-ip>:<local-port>"
+ mapped string // "<mapped-ip>:<mapped-port>"
+ bound string // key: "[<remote-ip>[:<remote-port>]]"
+ filters map[string]struct{} // key: "[<remote-ip>[:<remote-port>]]"
+ expires time.Time // time to expire
+}
+
+type networkAddressTranslator struct {
+ name string
+ natType NATType
+ mappedIPs []net.IP // mapped IPv4
+ localIPs []net.IP // local IPv4, required only when the mode is NATModeNAT1To1
+ outboundMap map[string]*mapping // key: "<proto>:<local-ip>:<local-port>[:remote-ip[:remote-port]]
+ inboundMap map[string]*mapping // key: "<proto>:<mapped-ip>:<mapped-port>"
+ udpPortCounter int
+ mutex sync.RWMutex
+ log logging.LeveledLogger
+}
+
+func newNAT(config *natConfig) (*networkAddressTranslator, error) {
+ natType := config.natType
+
+ if natType.Mode == NATModeNAT1To1 {
+ // 1:1 NAT behavior
+ natType.MappingBehavior = EndpointIndependent
+ natType.FilteringBehavior = EndpointIndependent
+ natType.PortPreservation = true
+ natType.MappingLifeTime = 0
+
+ if len(config.mappedIPs) == 0 {
+ return nil, errNATRequriesMapping
+ }
+ if len(config.mappedIPs) != len(config.localIPs) {
+ return nil, errMismatchLengthIP
+ }
+ } else {
+ // Normal (NAPT) behavior
+ natType.Mode = NATModeNormal
+ if natType.MappingLifeTime == 0 {
+ natType.MappingLifeTime = defaultNATMappingLifeTime
+ }
+ }
+
+ return &networkAddressTranslator{
+ name: config.name,
+ natType: natType,
+ mappedIPs: config.mappedIPs,
+ localIPs: config.localIPs,
+ outboundMap: map[string]*mapping{},
+ inboundMap: map[string]*mapping{},
+ log: config.loggerFactory.NewLogger("vnet"),
+ }, nil
+}
+
+func (n *networkAddressTranslator) getPairedMappedIP(locIP net.IP) net.IP {
+ for i, ip := range n.localIPs {
+ if ip.Equal(locIP) {
+ return n.mappedIPs[i]
+ }
+ }
+ return nil
+}
+
+func (n *networkAddressTranslator) getPairedLocalIP(mappedIP net.IP) net.IP {
+ for i, ip := range n.mappedIPs {
+ if ip.Equal(mappedIP) {
+ return n.localIPs[i]
+ }
+ }
+ return nil
+}
+
+func (n *networkAddressTranslator) translateOutbound(from Chunk) (Chunk, error) {
+ n.mutex.Lock()
+ defer n.mutex.Unlock()
+
+ to := from.Clone()
+
+ if from.Network() == udpString {
+ if n.natType.Mode == NATModeNAT1To1 {
+ // 1:1 NAT behavior
+ srcAddr := from.SourceAddr().(*net.UDPAddr)
+ srcIP := n.getPairedMappedIP(srcAddr.IP)
+ if srcIP == nil {
+ n.log.Debugf("[%s] drop outbound chunk %s with not route", n.name, from.String())
+ return nil, nil // silently discard
+ }
+ srcPort := srcAddr.Port
+ if err := to.setSourceAddr(fmt.Sprintf("%s:%d", srcIP.String(), srcPort)); err != nil {
+ return nil, err
+ }
+ } else {
+ // Normal (NAPT) behavior
+ var bound, filterKey string
+ switch n.natType.MappingBehavior {
+ case EndpointIndependent:
+ bound = ""
+ case EndpointAddrDependent:
+ bound = from.getDestinationIP().String()
+ case EndpointAddrPortDependent:
+ bound = from.DestinationAddr().String()
+ }
+
+ switch n.natType.FilteringBehavior {
+ case EndpointIndependent:
+ filterKey = ""
+ case EndpointAddrDependent:
+ filterKey = from.getDestinationIP().String()
+ case EndpointAddrPortDependent:
+ filterKey = from.DestinationAddr().String()
+ }
+
+ oKey := fmt.Sprintf("udp:%s:%s", from.SourceAddr().String(), bound)
+
+ m := n.findOutboundMapping(oKey)
+ if m == nil {
+ // Create a new mapping
+ mappedPort := 0xC000 + n.udpPortCounter
+ n.udpPortCounter++
+
+ m = &mapping{
+ proto: from.SourceAddr().Network(),
+ local: from.SourceAddr().String(),
+ bound: bound,
+ mapped: fmt.Sprintf("%s:%d", n.mappedIPs[0].String(), mappedPort),
+ filters: map[string]struct{}{},
+ expires: time.Now().Add(n.natType.MappingLifeTime),
+ }
+
+ n.outboundMap[oKey] = m
+
+ iKey := fmt.Sprintf("udp:%s", m.mapped)
+
+ n.log.Debugf("[%s] created a new NAT binding oKey=%s iKey=%s\n",
+ n.name,
+ oKey,
+ iKey)
+
+ m.filters[filterKey] = struct{}{}
+ n.log.Debugf("[%s] permit access from %s to %s\n", n.name, filterKey, m.mapped)
+ n.inboundMap[iKey] = m
+ } else if _, ok := m.filters[filterKey]; !ok {
+ n.log.Debugf("[%s] permit access from %s to %s\n", n.name, filterKey, m.mapped)
+ m.filters[filterKey] = struct{}{}
+ }
+
+ if err := to.setSourceAddr(m.mapped); err != nil {
+ return nil, err
+ }
+ }
+
+ n.log.Debugf("[%s] translate outbound chunk from %s to %s", n.name, from.String(), to.String())
+
+ return to, nil
+ }
+
+ return nil, errNonUDPTranslationNotSupported
+}
+
+func (n *networkAddressTranslator) translateInbound(from Chunk) (Chunk, error) {
+ n.mutex.Lock()
+ defer n.mutex.Unlock()
+
+ to := from.Clone()
+
+ if from.Network() == udpString {
+ if n.natType.Mode == NATModeNAT1To1 {
+ // 1:1 NAT behavior
+ dstAddr := from.DestinationAddr().(*net.UDPAddr)
+ dstIP := n.getPairedLocalIP(dstAddr.IP)
+ if dstIP == nil {
+ return nil, fmt.Errorf("drop %s as %w", from.String(), errNoAssociatedLocalAddress)
+ }
+ dstPort := from.DestinationAddr().(*net.UDPAddr).Port
+ if err := to.setDestinationAddr(fmt.Sprintf("%s:%d", dstIP, dstPort)); err != nil {
+ return nil, err
+ }
+ } else {
+ // Normal (NAPT) behavior
+ iKey := fmt.Sprintf("udp:%s", from.DestinationAddr().String())
+ m := n.findInboundMapping(iKey)
+ if m == nil {
+ return nil, fmt.Errorf("drop %s as %w", from.String(), errNoNATBindingFound)
+ }
+
+ var filterKey string
+ switch n.natType.FilteringBehavior {
+ case EndpointIndependent:
+ filterKey = ""
+ case EndpointAddrDependent:
+ filterKey = from.getSourceIP().String()
+ case EndpointAddrPortDependent:
+ filterKey = from.SourceAddr().String()
+ }
+
+ if _, ok := m.filters[filterKey]; !ok {
+ return nil, fmt.Errorf("drop %s as the remote %s %w", from.String(), filterKey, errHasNoPermission)
+ }
+
+ // See RFC 4847 Section 4.3. Mapping Refresh
+ // a) Inbound refresh may be useful for applications with no outgoing
+ // UDP traffic. However, allowing inbound refresh may allow an
+ // external attacker or misbehaving application to keep a mapping
+ // alive indefinitely. This may be a security risk. Also, if the
+ // process is repeated with different ports, over time, it could
+ // use up all the ports on the NAT.
+
+ if err := to.setDestinationAddr(m.local); err != nil {
+ return nil, err
+ }
+ }
+
+ n.log.Debugf("[%s] translate inbound chunk from %s to %s", n.name, from.String(), to.String())
+
+ return to, nil
+ }
+
+ return nil, errNonUDPTranslationNotSupported
+}
+
+// caller must hold the mutex
+func (n *networkAddressTranslator) findOutboundMapping(oKey string) *mapping {
+ now := time.Now()
+
+ m, ok := n.outboundMap[oKey]
+ if ok {
+ // check if this mapping is expired
+ if now.After(m.expires) {
+ n.removeMapping(m)
+ m = nil // expired
+ } else {
+ m.expires = time.Now().Add(n.natType.MappingLifeTime)
+ }
+ }
+
+ return m
+}
+
+// caller must hold the mutex
+func (n *networkAddressTranslator) findInboundMapping(iKey string) *mapping {
+ now := time.Now()
+ m, ok := n.inboundMap[iKey]
+ if !ok {
+ return nil
+ }
+
+ // check if this mapping is expired
+ if now.After(m.expires) {
+ n.removeMapping(m)
+ return nil
+ }
+
+ return m
+}
+
+// caller must hold the mutex
+func (n *networkAddressTranslator) removeMapping(m *mapping) {
+ oKey := fmt.Sprintf("%s:%s:%s", m.proto, m.local, m.bound)
+ iKey := fmt.Sprintf("%s:%s", m.proto, m.mapped)
+
+ delete(n.outboundMap, oKey)
+ delete(n.inboundMap, iKey)
+}
diff --git a/vendor/github.com/pion/transport/vnet/net.go b/vendor/github.com/pion/transport/vnet/net.go
new file mode 100644
index 0000000..4dc6a2a
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/net.go
@@ -0,0 +1,677 @@
+package vnet
+
+import (
+ "encoding/binary"
+ "errors"
+ "fmt"
+ "math/rand"
+ "net"
+ "strconv"
+ "strings"
+ "sync"
+)
+
+const (
+ lo0String = "lo0String"
+ udpString = "udp"
+)
+
+var (
+ macAddrCounter uint64 = 0xBEEFED910200 //nolint:gochecknoglobals
+ errNoInterface = errors.New("no interface is available")
+ errNotFound = errors.New("not found")
+ errUnexpectedNetwork = errors.New("unexpected network")
+ errCantAssignRequestedAddr = errors.New("can't assign requested address")
+ errUnknownNetwork = errors.New("unknown network")
+ errNoRouterLinked = errors.New("no router linked")
+ errInvalidPortNumber = errors.New("invalid port number")
+ errUnexpectedTypeSwitchFailure = errors.New("unexpected type-switch failure")
+ errBindFailerFor = errors.New("bind failed for")
+ errEndPortLessThanStart = errors.New("end port is less than the start")
+ errPortSpaceExhausted = errors.New("port space exhausted")
+ errVNetDisabled = errors.New("vnet is not enabled")
+)
+
+func newMACAddress() net.HardwareAddr {
+ b := make([]byte, 8)
+ binary.BigEndian.PutUint64(b, macAddrCounter)
+ macAddrCounter++
+ return b[2:]
+}
+
+type vNet struct {
+ interfaces []*Interface // read-only
+ staticIPs []net.IP // read-only
+ router *Router // read-only
+ udpConns *udpConnMap // read-only
+ mutex sync.RWMutex
+}
+
+func (v *vNet) _getInterfaces() ([]*Interface, error) {
+ if len(v.interfaces) == 0 {
+ return nil, errNoInterface
+ }
+
+ return v.interfaces, nil
+}
+
+func (v *vNet) getInterfaces() ([]*Interface, error) {
+ v.mutex.RLock()
+ defer v.mutex.RUnlock()
+
+ return v._getInterfaces()
+}
+
+// caller must hold the mutex (read)
+func (v *vNet) _getInterface(ifName string) (*Interface, error) {
+ ifs, err := v._getInterfaces()
+ if err != nil {
+ return nil, err
+ }
+ for _, ifc := range ifs {
+ if ifc.Name == ifName {
+ return ifc, nil
+ }
+ }
+
+ return nil, fmt.Errorf("interface %s %w", ifName, errNotFound)
+}
+
+func (v *vNet) getInterface(ifName string) (*Interface, error) {
+ v.mutex.RLock()
+ defer v.mutex.RUnlock()
+
+ return v._getInterface(ifName)
+}
+
+// caller must hold the mutex
+func (v *vNet) getAllIPAddrs(ipv6 bool) []net.IP {
+ ips := []net.IP{}
+
+ for _, ifc := range v.interfaces {
+ addrs, err := ifc.Addrs()
+ if err != nil {
+ continue
+ }
+
+ for _, addr := range addrs {
+ var ip net.IP
+ if ipNet, ok := addr.(*net.IPNet); ok {
+ ip = ipNet.IP
+ } else if ipAddr, ok := addr.(*net.IPAddr); ok {
+ ip = ipAddr.IP
+ } else {
+ continue
+ }
+
+ if !ipv6 {
+ if ip.To4() != nil {
+ ips = append(ips, ip)
+ }
+ }
+ }
+ }
+
+ return ips
+}
+
+func (v *vNet) setRouter(r *Router) error {
+ v.mutex.Lock()
+ defer v.mutex.Unlock()
+
+ v.router = r
+ return nil
+}
+
+func (v *vNet) onInboundChunk(c Chunk) {
+ v.mutex.Lock()
+ defer v.mutex.Unlock()
+
+ if c.Network() == udpString {
+ if conn, ok := v.udpConns.find(c.DestinationAddr()); ok {
+ conn.onInboundChunk(c)
+ }
+ }
+}
+
+// caller must hold the mutex
+func (v *vNet) _dialUDP(network string, locAddr, remAddr *net.UDPAddr) (UDPPacketConn, error) {
+ // validate network
+ if network != udpString && network != "udp4" {
+ return nil, fmt.Errorf("%w: %s", errUnexpectedNetwork, network)
+ }
+
+ if locAddr == nil {
+ locAddr = &net.UDPAddr{
+ IP: net.IPv4zero,
+ }
+ } else if locAddr.IP == nil {
+ locAddr.IP = net.IPv4zero
+ }
+
+ // validate address. do we have that address?
+ if !v.hasIPAddr(locAddr.IP) {
+ return nil, &net.OpError{
+ Op: "listen",
+ Net: network,
+ Addr: locAddr,
+ Err: fmt.Errorf("bind: %w", errCantAssignRequestedAddr),
+ }
+ }
+
+ if locAddr.Port == 0 {
+ // choose randomly from the range between 5000 and 5999
+ port, err := v.assignPort(locAddr.IP, 5000, 5999)
+ if err != nil {
+ return nil, &net.OpError{
+ Op: "listen",
+ Net: network,
+ Addr: locAddr,
+ Err: err,
+ }
+ }
+ locAddr.Port = port
+ } else if _, ok := v.udpConns.find(locAddr); ok {
+ return nil, &net.OpError{
+ Op: "listen",
+ Net: network,
+ Addr: locAddr,
+ Err: fmt.Errorf("bind: %w", errAddressAlreadyInUse),
+ }
+ }
+
+ conn, err := newUDPConn(locAddr, remAddr, v)
+ if err != nil {
+ return nil, err
+ }
+
+ err = v.udpConns.insert(conn)
+ if err != nil {
+ return nil, err
+ }
+
+ return conn, nil
+}
+
+func (v *vNet) listenPacket(network string, address string) (UDPPacketConn, error) {
+ v.mutex.Lock()
+ defer v.mutex.Unlock()
+
+ locAddr, err := v.resolveUDPAddr(network, address)
+ if err != nil {
+ return nil, err
+ }
+
+ return v._dialUDP(network, locAddr, nil)
+}
+
+func (v *vNet) listenUDP(network string, locAddr *net.UDPAddr) (UDPPacketConn, error) {
+ v.mutex.Lock()
+ defer v.mutex.Unlock()
+
+ return v._dialUDP(network, locAddr, nil)
+}
+
+func (v *vNet) dialUDP(network string, locAddr, remAddr *net.UDPAddr) (UDPPacketConn, error) {
+ v.mutex.Lock()
+ defer v.mutex.Unlock()
+
+ return v._dialUDP(network, locAddr, remAddr)
+}
+
+func (v *vNet) dial(network string, address string) (UDPPacketConn, error) {
+ v.mutex.Lock()
+ defer v.mutex.Unlock()
+
+ remAddr, err := v.resolveUDPAddr(network, address)
+ if err != nil {
+ return nil, err
+ }
+
+ // Determine source address
+ srcIP := v.determineSourceIP(nil, remAddr.IP)
+
+ locAddr := &net.UDPAddr{IP: srcIP, Port: 0}
+
+ return v._dialUDP(network, locAddr, remAddr)
+}
+
+func (v *vNet) resolveUDPAddr(network, address string) (*net.UDPAddr, error) {
+ if network != udpString && network != "udp4" {
+ return nil, fmt.Errorf("%w %s", errUnknownNetwork, network)
+ }
+
+ host, sPort, err := net.SplitHostPort(address)
+ if err != nil {
+ return nil, err
+ }
+
+ // Check if host is a domain name
+ ip := net.ParseIP(host)
+ if ip == nil {
+ host = strings.ToLower(host)
+ if host == "localhost" {
+ ip = net.IPv4(127, 0, 0, 1)
+ } else {
+ // host is a domain name. resolve IP address by the name
+ if v.router == nil {
+ return nil, errNoRouterLinked
+ }
+
+ ip, err = v.router.resolver.lookUp(host)
+ if err != nil {
+ return nil, err
+ }
+ }
+ }
+
+ port, err := strconv.Atoi(sPort)
+ if err != nil {
+ return nil, errInvalidPortNumber
+ }
+
+ udpAddr := &net.UDPAddr{
+ IP: ip,
+ Port: port,
+ }
+
+ return udpAddr, nil
+}
+
+func (v *vNet) write(c Chunk) error {
+ if c.Network() == udpString {
+ if udp, ok := c.(*chunkUDP); ok {
+ if c.getDestinationIP().IsLoopback() {
+ if conn, ok := v.udpConns.find(udp.DestinationAddr()); ok {
+ conn.onInboundChunk(udp)
+ }
+ return nil
+ }
+ } else {
+ return errUnexpectedTypeSwitchFailure
+ }
+ }
+
+ if v.router == nil {
+ return errNoRouterLinked
+ }
+
+ v.router.push(c)
+ return nil
+}
+
+func (v *vNet) onClosed(addr net.Addr) {
+ if addr.Network() == udpString {
+ //nolint:errcheck
+ v.udpConns.delete(addr) // #nosec
+ }
+}
+
+// This method determines the srcIP based on the dstIP when locIP
+// is any IP address ("0.0.0.0" or "::"). If locIP is a non-any addr,
+// this method simply returns locIP.
+// caller must hold the mutex
+func (v *vNet) determineSourceIP(locIP, dstIP net.IP) net.IP {
+ if locIP != nil && !locIP.IsUnspecified() {
+ return locIP
+ }
+
+ var srcIP net.IP
+
+ if dstIP.IsLoopback() {
+ srcIP = net.ParseIP("127.0.0.1")
+ } else {
+ ifc, err2 := v._getInterface("eth0")
+ if err2 != nil {
+ return nil
+ }
+
+ addrs, err2 := ifc.Addrs()
+ if err2 != nil {
+ return nil
+ }
+
+ if len(addrs) == 0 {
+ return nil
+ }
+
+ var findIPv4 bool
+ if locIP != nil {
+ findIPv4 = (locIP.To4() != nil)
+ } else {
+ findIPv4 = (dstIP.To4() != nil)
+ }
+
+ for _, addr := range addrs {
+ ip := addr.(*net.IPNet).IP
+ if findIPv4 {
+ if ip.To4() != nil {
+ srcIP = ip
+ break
+ }
+ } else {
+ if ip.To4() == nil {
+ srcIP = ip
+ break
+ }
+ }
+ }
+ }
+
+ return srcIP
+}
+
+// caller must hold the mutex
+func (v *vNet) hasIPAddr(ip net.IP) bool { //nolint:gocognit
+ for _, ifc := range v.interfaces {
+ if addrs, err := ifc.Addrs(); err == nil {
+ for _, addr := range addrs {
+ var locIP net.IP
+ if ipNet, ok := addr.(*net.IPNet); ok {
+ locIP = ipNet.IP
+ } else if ipAddr, ok := addr.(*net.IPAddr); ok {
+ locIP = ipAddr.IP
+ } else {
+ continue
+ }
+
+ switch ip.String() {
+ case "0.0.0.0":
+ if locIP.To4() != nil {
+ return true
+ }
+ case "::":
+ if locIP.To4() == nil {
+ return true
+ }
+ default:
+ if locIP.Equal(ip) {
+ return true
+ }
+ }
+ }
+ }
+ }
+
+ return false
+}
+
+// caller must hold the mutex
+func (v *vNet) allocateLocalAddr(ip net.IP, port int) error {
+ // gather local IP addresses to bind
+ var ips []net.IP
+ if ip.IsUnspecified() {
+ ips = v.getAllIPAddrs(ip.To4() == nil)
+ } else if v.hasIPAddr(ip) {
+ ips = []net.IP{ip}
+ }
+
+ if len(ips) == 0 {
+ return fmt.Errorf("%w %s", errBindFailerFor, ip.String())
+ }
+
+ // check if all these transport addresses are not in use
+ for _, ip2 := range ips {
+ addr := &net.UDPAddr{
+ IP: ip2,
+ Port: port,
+ }
+ if _, ok := v.udpConns.find(addr); ok {
+ return &net.OpError{
+ Op: "bind",
+ Net: udpString,
+ Addr: addr,
+ Err: fmt.Errorf("bind: %w", errAddressAlreadyInUse),
+ }
+ }
+ }
+
+ return nil
+}
+
+// caller must hold the mutex
+func (v *vNet) assignPort(ip net.IP, start, end int) (int, error) {
+ // choose randomly from the range between start and end (inclusive)
+ if end < start {
+ return -1, errEndPortLessThanStart
+ }
+
+ space := end + 1 - start
+ offset := rand.Intn(space) //nolint:gosec
+ for i := 0; i < space; i++ {
+ port := ((offset + i) % space) + start
+
+ err := v.allocateLocalAddr(ip, port)
+ if err == nil {
+ return port, nil
+ }
+ }
+
+ return -1, errPortSpaceExhausted
+}
+
+// NetConfig is a bag of configuration parameters passed to NewNet().
+type NetConfig struct {
+ // StaticIPs is an array of static IP addresses to be assigned for this Net.
+ // If no static IP address is given, the router will automatically assign
+ // an IP address.
+ StaticIPs []string
+
+ // StaticIP is deprecated. Use StaticIPs.
+ StaticIP string
+}
+
+// Net represents a local network stack euivalent to a set of layers from NIC
+// up to the transport (UDP / TCP) layer.
+type Net struct {
+ v *vNet
+ ifs []*Interface
+}
+
+// NewNet creates an instance of Net.
+// If config is nil, the virtual network is disabled. (uses corresponding
+// net.Xxxx() operations.
+// By design, it always have lo0 and eth0 interfaces.
+// The lo0 has the address 127.0.0.1 assigned by default.
+// IP address for eth0 will be assigned when this Net is added to a router.
+func NewNet(config *NetConfig) *Net {
+ if config == nil {
+ ifs := []*Interface{}
+ if orgIfs, err := net.Interfaces(); err == nil {
+ for _, orgIfc := range orgIfs {
+ ifc := NewInterface(orgIfc)
+ if addrs, err := orgIfc.Addrs(); err == nil {
+ for _, addr := range addrs {
+ ifc.AddAddr(addr)
+ }
+ }
+
+ ifs = append(ifs, ifc)
+ }
+ }
+
+ return &Net{ifs: ifs}
+ }
+
+ lo0 := NewInterface(net.Interface{
+ Index: 1,
+ MTU: 16384,
+ Name: lo0String,
+ HardwareAddr: nil,
+ Flags: net.FlagUp | net.FlagLoopback | net.FlagMulticast,
+ })
+ lo0.AddAddr(&net.IPNet{
+ IP: net.ParseIP("127.0.0.1"),
+ Mask: net.CIDRMask(8, 32),
+ })
+
+ eth0 := NewInterface(net.Interface{
+ Index: 2,
+ MTU: 1500,
+ Name: "eth0",
+ HardwareAddr: newMACAddress(),
+ Flags: net.FlagUp | net.FlagMulticast,
+ })
+
+ var staticIPs []net.IP
+ for _, ipStr := range config.StaticIPs {
+ if ip := net.ParseIP(ipStr); ip != nil {
+ staticIPs = append(staticIPs, ip)
+ }
+ }
+ if len(config.StaticIP) > 0 {
+ if ip := net.ParseIP(config.StaticIP); ip != nil {
+ staticIPs = append(staticIPs, ip)
+ }
+ }
+
+ v := &vNet{
+ interfaces: []*Interface{lo0, eth0},
+ staticIPs: staticIPs,
+ udpConns: newUDPConnMap(),
+ }
+
+ return &Net{
+ v: v,
+ }
+}
+
+// Interfaces returns a list of the system's network interfaces.
+func (n *Net) Interfaces() ([]*Interface, error) {
+ if n.v == nil {
+ return n.ifs, nil
+ }
+
+ return n.v.getInterfaces()
+}
+
+// InterfaceByName returns the interface specified by name.
+func (n *Net) InterfaceByName(name string) (*Interface, error) {
+ if n.v == nil {
+ for _, ifc := range n.ifs {
+ if ifc.Name == name {
+ return ifc, nil
+ }
+ }
+
+ return nil, fmt.Errorf("interface %s %w", name, errNotFound)
+ }
+
+ return n.v.getInterface(name)
+}
+
+// ListenPacket announces on the local network address.
+func (n *Net) ListenPacket(network string, address string) (net.PacketConn, error) {
+ if n.v == nil {
+ return net.ListenPacket(network, address)
+ }
+
+ return n.v.listenPacket(network, address)
+}
+
+// ListenUDP acts like ListenPacket for UDP networks.
+func (n *Net) ListenUDP(network string, locAddr *net.UDPAddr) (UDPPacketConn, error) {
+ if n.v == nil {
+ return net.ListenUDP(network, locAddr)
+ }
+
+ return n.v.listenUDP(network, locAddr)
+}
+
+// Dial connects to the address on the named network.
+func (n *Net) Dial(network, address string) (net.Conn, error) {
+ if n.v == nil {
+ return net.Dial(network, address)
+ }
+
+ return n.v.dial(network, address)
+}
+
+// CreateDialer creates an instance of vnet.Dialer
+func (n *Net) CreateDialer(dialer *net.Dialer) Dialer {
+ if n.v == nil {
+ return &vDialer{
+ dialer: dialer,
+ }
+ }
+
+ return &vDialer{
+ dialer: dialer,
+ v: n.v,
+ }
+}
+
+// DialUDP acts like Dial for UDP networks.
+func (n *Net) DialUDP(network string, laddr, raddr *net.UDPAddr) (UDPPacketConn, error) {
+ if n.v == nil {
+ return net.DialUDP(network, laddr, raddr)
+ }
+
+ return n.v.dialUDP(network, laddr, raddr)
+}
+
+// ResolveUDPAddr returns an address of UDP end point.
+func (n *Net) ResolveUDPAddr(network, address string) (*net.UDPAddr, error) {
+ if n.v == nil {
+ return net.ResolveUDPAddr(network, address)
+ }
+
+ return n.v.resolveUDPAddr(network, address)
+}
+
+func (n *Net) getInterface(ifName string) (*Interface, error) {
+ if n.v == nil {
+ return nil, errVNetDisabled
+ }
+
+ return n.v.getInterface(ifName)
+}
+
+func (n *Net) setRouter(r *Router) error {
+ if n.v == nil {
+ return errVNetDisabled
+ }
+
+ return n.v.setRouter(r)
+}
+
+func (n *Net) onInboundChunk(c Chunk) {
+ if n.v == nil {
+ return
+ }
+
+ n.v.onInboundChunk(c)
+}
+
+func (n *Net) getStaticIPs() []net.IP {
+ if n.v == nil {
+ return nil
+ }
+
+ return n.v.staticIPs
+}
+
+// IsVirtual tests if the virtual network is enabled.
+func (n *Net) IsVirtual() bool {
+ return n.v != nil
+}
+
+// Dialer is identical to net.Dialer excepts that its methods
+// (Dial, DialContext) are overridden to use virtual network.
+// Use vnet.CreateDialer() to create an instance of this Dialer.
+type Dialer interface {
+ Dial(network, address string) (net.Conn, error)
+}
+
+type vDialer struct {
+ dialer *net.Dialer
+ v *vNet
+}
+
+func (d *vDialer) Dial(network, address string) (net.Conn, error) {
+ if d.v == nil {
+ return d.dialer.Dial(network, address)
+ }
+
+ return d.v.dial(network, address)
+}
diff --git a/vendor/github.com/pion/transport/vnet/resolver.go b/vendor/github.com/pion/transport/vnet/resolver.go
new file mode 100644
index 0000000..e5166e3
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/resolver.go
@@ -0,0 +1,89 @@
+package vnet
+
+import (
+ "errors"
+ "fmt"
+ "net"
+ "sync"
+
+ "github.com/pion/logging"
+)
+
+var (
+ errHostnameEmpty = errors.New("host name must not be empty")
+ errFailedtoParseIPAddr = errors.New("failed to parse IP address")
+)
+
+type resolverConfig struct {
+ LoggerFactory logging.LoggerFactory
+}
+
+type resolver struct {
+ parent *resolver // read-only
+ hosts map[string]net.IP // requires mutex
+ mutex sync.RWMutex // thread-safe
+ log logging.LeveledLogger // read-only
+}
+
+func newResolver(config *resolverConfig) *resolver {
+ r := &resolver{
+ hosts: map[string]net.IP{},
+ log: config.LoggerFactory.NewLogger("vnet"),
+ }
+
+ if err := r.addHost("localhost", "127.0.0.1"); err != nil {
+ r.log.Warn("failed to add localhost to resolver")
+ }
+ return r
+}
+
+func (r *resolver) setParent(parent *resolver) {
+ r.mutex.Lock()
+ defer r.mutex.Unlock()
+
+ r.parent = parent
+}
+
+func (r *resolver) addHost(name string, ipAddr string) error {
+ r.mutex.Lock()
+ defer r.mutex.Unlock()
+
+ if len(name) == 0 {
+ return errHostnameEmpty
+ }
+ ip := net.ParseIP(ipAddr)
+ if ip == nil {
+ return fmt.Errorf("%w \"%s\"", errFailedtoParseIPAddr, ipAddr)
+ }
+ r.hosts[name] = ip
+ return nil
+}
+
+func (r *resolver) lookUp(hostName string) (net.IP, error) {
+ ip := func() net.IP {
+ r.mutex.RLock()
+ defer r.mutex.RUnlock()
+
+ if ip2, ok := r.hosts[hostName]; ok {
+ return ip2
+ }
+ return nil
+ }()
+ if ip != nil {
+ return ip, nil
+ }
+
+ // mutex must be unlocked before calling into parent resolver
+
+ if r.parent != nil {
+ return r.parent.lookUp(hostName)
+ }
+
+ return nil, &net.DNSError{
+ Err: "host not found",
+ Name: hostName,
+ Server: "vnet resolver",
+ IsTimeout: false,
+ IsTemporary: false,
+ }
+}
diff --git a/vendor/github.com/pion/transport/vnet/router.go b/vendor/github.com/pion/transport/vnet/router.go
new file mode 100644
index 0000000..616d2c9
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/router.go
@@ -0,0 +1,605 @@
+package vnet
+
+import (
+ "errors"
+ "fmt"
+ "math/rand"
+ "net"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/pion/logging"
+)
+
+const (
+ defaultRouterQueueSize = 0 // unlimited
+)
+
+var (
+ errInvalidLocalIPinStaticIPs = errors.New("invalid local IP in StaticIPs")
+ errLocalIPBeyondStaticIPsSubset = errors.New("mapped in StaticIPs is beyond subnet")
+ errLocalIPNoStaticsIPsAssociated = errors.New("all StaticIPs must have associated local IPs")
+ errRouterAlreadyStarted = errors.New("router already started")
+ errRouterAlreadyStopped = errors.New("router already stopped")
+ errStaticIPisBeyondSubnet = errors.New("static IP is beyond subnet")
+ errAddressSpaceExhausted = errors.New("address space exhausted")
+ errNoIPAddrEth0 = errors.New("no IP address is assigned for eth0")
+)
+
+// Generate a unique router name
+var assignRouterName = func() func() string { //nolint:gochecknoglobals
+ var routerIDCtr uint64
+
+ return func() string {
+ n := atomic.AddUint64(&routerIDCtr, 1)
+ return fmt.Sprintf("router%d", n)
+ }
+}()
+
+// RouterConfig ...
+type RouterConfig struct {
+ // Name of router. If not specified, a unique name will be assigned.
+ Name string
+ // CIDR notation, like "192.0.2.0/24"
+ CIDR string
+ // StaticIPs is an array of static IP addresses to be assigned for this router.
+ // If no static IP address is given, the router will automatically assign
+ // an IP address.
+ // This will be ignored if this router is the root.
+ StaticIPs []string
+ // StaticIP is deprecated. Use StaticIPs.
+ StaticIP string
+ // Internal queue size
+ QueueSize int
+ // Effective only when this router has a parent router
+ NATType *NATType
+ // Minimum Delay
+ MinDelay time.Duration
+ // Max Jitter
+ MaxJitter time.Duration
+ // Logger factory
+ LoggerFactory logging.LoggerFactory
+}
+
+// NIC is a nework inerface controller that interfaces Router
+type NIC interface {
+ getInterface(ifName string) (*Interface, error)
+ onInboundChunk(c Chunk)
+ getStaticIPs() []net.IP
+ setRouter(r *Router) error
+}
+
+// ChunkFilter is a handler users can add to filter chunks.
+// If the filter returns false, the packet will be dropped.
+type ChunkFilter func(c Chunk) bool
+
+// Router ...
+type Router struct {
+ name string // read-only
+ interfaces []*Interface // read-only
+ ipv4Net *net.IPNet // read-only
+ staticIPs []net.IP // read-only
+ staticLocalIPs map[string]net.IP // read-only,
+ lastID byte // requires mutex [x], used to assign the last digit of IPv4 address
+ queue *chunkQueue // read-only
+ parent *Router // read-only
+ children []*Router // read-only
+ natType *NATType // read-only
+ nat *networkAddressTranslator // read-only
+ nics map[string]NIC // read-only
+ stopFunc func() // requires mutex [x]
+ resolver *resolver // read-only
+ chunkFilters []ChunkFilter // requires mutex [x]
+ minDelay time.Duration // requires mutex [x]
+ maxJitter time.Duration // requires mutex [x]
+ mutex sync.RWMutex // thread-safe
+ pushCh chan struct{} // writer requires mutex
+ loggerFactory logging.LoggerFactory // read-only
+ log logging.LeveledLogger // read-only
+}
+
+// NewRouter ...
+func NewRouter(config *RouterConfig) (*Router, error) {
+ loggerFactory := config.LoggerFactory
+ log := loggerFactory.NewLogger("vnet")
+
+ _, ipv4Net, err := net.ParseCIDR(config.CIDR)
+ if err != nil {
+ return nil, err
+ }
+
+ queueSize := defaultRouterQueueSize
+ if config.QueueSize > 0 {
+ queueSize = config.QueueSize
+ }
+
+ // set up network interface, lo0
+ lo0 := NewInterface(net.Interface{
+ Index: 1,
+ MTU: 16384,
+ Name: lo0String,
+ HardwareAddr: nil,
+ Flags: net.FlagUp | net.FlagLoopback | net.FlagMulticast,
+ })
+ lo0.AddAddr(&net.IPAddr{IP: net.ParseIP("127.0.0.1"), Zone: ""})
+
+ // set up network interface, eth0
+ eth0 := NewInterface(net.Interface{
+ Index: 2,
+ MTU: 1500,
+ Name: "eth0",
+ HardwareAddr: newMACAddress(),
+ Flags: net.FlagUp | net.FlagMulticast,
+ })
+
+ // local host name resolver
+ resolver := newResolver(&resolverConfig{
+ LoggerFactory: config.LoggerFactory,
+ })
+
+ name := config.Name
+ if len(name) == 0 {
+ name = assignRouterName()
+ }
+
+ var staticIPs []net.IP
+ staticLocalIPs := map[string]net.IP{}
+ for _, ipStr := range config.StaticIPs {
+ ipPair := strings.Split(ipStr, "/")
+ if ip := net.ParseIP(ipPair[0]); ip != nil {
+ if len(ipPair) > 1 {
+ locIP := net.ParseIP(ipPair[1])
+ if locIP == nil {
+ return nil, errInvalidLocalIPinStaticIPs
+ }
+ if !ipv4Net.Contains(locIP) {
+ return nil, fmt.Errorf("local IP %s %w", locIP.String(), errLocalIPBeyondStaticIPsSubset)
+ }
+ staticLocalIPs[ip.String()] = locIP
+ }
+ staticIPs = append(staticIPs, ip)
+ }
+ }
+ if len(config.StaticIP) > 0 {
+ log.Warn("StaticIP is deprecated. Use StaticIPs instead")
+ if ip := net.ParseIP(config.StaticIP); ip != nil {
+ staticIPs = append(staticIPs, ip)
+ }
+ }
+
+ if nStaticLocal := len(staticLocalIPs); nStaticLocal > 0 {
+ if nStaticLocal != len(staticIPs) {
+ return nil, errLocalIPNoStaticsIPsAssociated
+ }
+ }
+
+ return &Router{
+ name: name,
+ interfaces: []*Interface{lo0, eth0},
+ ipv4Net: ipv4Net,
+ staticIPs: staticIPs,
+ staticLocalIPs: staticLocalIPs,
+ queue: newChunkQueue(queueSize),
+ natType: config.NATType,
+ nics: map[string]NIC{},
+ resolver: resolver,
+ minDelay: config.MinDelay,
+ maxJitter: config.MaxJitter,
+ pushCh: make(chan struct{}, 1),
+ loggerFactory: loggerFactory,
+ log: log,
+ }, nil
+}
+
+// caller must hold the mutex
+func (r *Router) getInterfaces() ([]*Interface, error) {
+ if len(r.interfaces) == 0 {
+ return nil, fmt.Errorf("%w is available", errNoInterface)
+ }
+
+ return r.interfaces, nil
+}
+
+func (r *Router) getInterface(ifName string) (*Interface, error) {
+ r.mutex.RLock()
+ defer r.mutex.RUnlock()
+
+ ifs, err := r.getInterfaces()
+ if err != nil {
+ return nil, err
+ }
+ for _, ifc := range ifs {
+ if ifc.Name == ifName {
+ return ifc, nil
+ }
+ }
+
+ return nil, fmt.Errorf("interface %s %w", ifName, errNotFound)
+}
+
+// Start ...
+func (r *Router) Start() error {
+ r.mutex.Lock()
+ defer r.mutex.Unlock()
+
+ if r.stopFunc != nil {
+ return errRouterAlreadyStarted
+ }
+
+ cancelCh := make(chan struct{})
+
+ go func() {
+ loop:
+ for {
+ d, err := r.processChunks()
+ if err != nil {
+ r.log.Errorf("[%s] %s", r.name, err.Error())
+ break
+ }
+
+ if d <= 0 {
+ select {
+ case <-r.pushCh:
+ case <-cancelCh:
+ break loop
+ }
+ } else {
+ t := time.NewTimer(d)
+ select {
+ case <-t.C:
+ case <-cancelCh:
+ break loop
+ }
+ }
+ }
+ }()
+
+ r.stopFunc = func() {
+ close(cancelCh)
+ }
+
+ for _, child := range r.children {
+ if err := child.Start(); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+// Stop ...
+func (r *Router) Stop() error {
+ r.mutex.Lock()
+ defer r.mutex.Unlock()
+
+ if r.stopFunc == nil {
+ return errRouterAlreadyStopped
+ }
+
+ for _, router := range r.children {
+ r.mutex.Unlock()
+ err := router.Stop()
+ r.mutex.Lock()
+
+ if err != nil {
+ return err
+ }
+ }
+
+ r.stopFunc()
+ r.stopFunc = nil
+ return nil
+}
+
+// caller must hold the mutex
+func (r *Router) addNIC(nic NIC) error {
+ ifc, err := nic.getInterface("eth0")
+ if err != nil {
+ return err
+ }
+
+ var ips []net.IP
+
+ if ips = nic.getStaticIPs(); len(ips) == 0 {
+ // assign an IP address
+ ip, err2 := r.assignIPAddress()
+ if err2 != nil {
+ return err2
+ }
+ ips = append(ips, ip)
+ }
+
+ for _, ip := range ips {
+ if !r.ipv4Net.Contains(ip) {
+ return fmt.Errorf("%w: %s", errStaticIPisBeyondSubnet, r.ipv4Net.String())
+ }
+
+ ifc.AddAddr(&net.IPNet{
+ IP: ip,
+ Mask: r.ipv4Net.Mask,
+ })
+
+ r.nics[ip.String()] = nic
+ }
+
+ if err = nic.setRouter(r); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// AddRouter adds a chile Router.
+func (r *Router) AddRouter(router *Router) error {
+ r.mutex.Lock()
+ defer r.mutex.Unlock()
+
+ // Router is a NIC. Add it as a NIC so that packets are routed to this child
+ // router.
+ err := r.addNIC(router)
+ if err != nil {
+ return err
+ }
+
+ if err = router.setRouter(r); err != nil {
+ return err
+ }
+
+ r.children = append(r.children, router)
+ return nil
+}
+
+// AddNet ...
+func (r *Router) AddNet(nic NIC) error {
+ r.mutex.Lock()
+ defer r.mutex.Unlock()
+
+ return r.addNIC(nic)
+}
+
+// AddHost adds a mapping of hostname and an IP address to the local resolver.
+func (r *Router) AddHost(hostName string, ipAddr string) error {
+ return r.resolver.addHost(hostName, ipAddr)
+}
+
+// AddChunkFilter adds a filter for chunks traversing this router.
+// You may add more than one filter. The filters are called in the order of this method call.
+// If a chunk is dropped by a filter, subsequent filter will not receive the chunk.
+func (r *Router) AddChunkFilter(filter ChunkFilter) {
+ r.mutex.Lock()
+ defer r.mutex.Unlock()
+
+ r.chunkFilters = append(r.chunkFilters, filter)
+}
+
+// caller should hold the mutex
+func (r *Router) assignIPAddress() (net.IP, error) {
+ // See: https://stackoverflow.com/questions/14915188/ip-address-ending-with-zero
+
+ if r.lastID == 0xfe {
+ return nil, errAddressSpaceExhausted
+ }
+
+ ip := make(net.IP, 4)
+ copy(ip, r.ipv4Net.IP[:3])
+ r.lastID++
+ ip[3] = r.lastID
+ return ip, nil
+}
+
+func (r *Router) push(c Chunk) {
+ r.mutex.Lock()
+ defer r.mutex.Unlock()
+
+ r.log.Debugf("[%s] route %s", r.name, c.String())
+ if r.stopFunc != nil {
+ c.setTimestamp()
+ if r.queue.push(c) {
+ select {
+ case r.pushCh <- struct{}{}:
+ default:
+ }
+ } else {
+ r.log.Warnf("[%s] queue was full. dropped a chunk", r.name)
+ }
+ }
+}
+
+func (r *Router) processChunks() (time.Duration, error) {
+ r.mutex.Lock()
+ defer r.mutex.Unlock()
+
+ // Introduce jitter by delaying the processing of chunks.
+ if r.maxJitter > 0 {
+ jitter := time.Duration(rand.Int63n(int64(r.maxJitter))) //nolint:gosec
+ time.Sleep(jitter)
+ }
+
+ // cutOff
+ // v min delay
+ // |<--->|
+ // +------------:--
+ // |OOOOOOXXXXX : --> time
+ // +------------:--
+ // |<--->| now
+ // due
+
+ enteredAt := time.Now()
+ cutOff := enteredAt.Add(-r.minDelay)
+
+ var d time.Duration // the next sleep duration
+
+ for {
+ d = 0
+
+ c := r.queue.peek()
+ if c == nil {
+ break // no more chunk in the queue
+ }
+
+ // check timestamp to find if the chunk is due
+ if c.getTimestamp().After(cutOff) {
+ // There is one or more chunk in the queue but none of them are due.
+ // Calculate the next sleep duration here.
+ nextExpire := c.getTimestamp().Add(r.minDelay)
+ d = nextExpire.Sub(enteredAt)
+ break
+ }
+
+ var ok bool
+ if c, ok = r.queue.pop(); !ok {
+ break // no more chunk in the queue
+ }
+
+ blocked := false
+ for i := 0; i < len(r.chunkFilters); i++ {
+ filter := r.chunkFilters[i]
+ if !filter(c) {
+ blocked = true
+ break
+ }
+ }
+ if blocked {
+ continue // discard
+ }
+
+ dstIP := c.getDestinationIP()
+
+ // check if the desination is in our subnet
+ if r.ipv4Net.Contains(dstIP) {
+ // search for the destination NIC
+ var nic NIC
+ if nic, ok = r.nics[dstIP.String()]; !ok {
+ // NIC not found. drop it.
+ r.log.Debugf("[%s] %s unreachable", r.name, c.String())
+ continue
+ }
+
+ // found the NIC, forward the chunk to the NIC.
+ // call to NIC must unlock mutex
+ r.mutex.Unlock()
+ nic.onInboundChunk(c)
+ r.mutex.Lock()
+ continue
+ }
+
+ // the destination is outside of this subnet
+ // is this WAN?
+ if r.parent == nil {
+ // this WAN. No route for this chunk
+ r.log.Debugf("[%s] no route found for %s", r.name, c.String())
+ continue
+ }
+
+ // Pass it to the parent via NAT
+ toParent, err := r.nat.translateOutbound(c)
+ if err != nil {
+ return 0, err
+ }
+
+ if toParent == nil {
+ continue
+ }
+
+ //nolint:godox
+ /* FIXME: this implementation would introduce a duplicate packet!
+ if r.nat.natType.Hairpining {
+ hairpinned, err := r.nat.translateInbound(toParent)
+ if err != nil {
+ r.log.Warnf("[%s] %s", r.name, err.Error())
+ } else {
+ go func() {
+ r.push(hairpinned)
+ }()
+ }
+ }
+ */
+
+ // call to parent router mutex unlock mutex
+ r.mutex.Unlock()
+ r.parent.push(toParent)
+ r.mutex.Lock()
+ }
+
+ return d, nil
+}
+
+// caller must hold the mutex
+func (r *Router) setRouter(parent *Router) error {
+ r.parent = parent
+ r.resolver.setParent(parent.resolver)
+
+ // when this method is called, one or more IP address has already been assigned by
+ // the parent router.
+ ifc, err := r.getInterface("eth0")
+ if err != nil {
+ return err
+ }
+
+ if len(ifc.addrs) == 0 {
+ return errNoIPAddrEth0
+ }
+
+ mappedIPs := []net.IP{}
+ localIPs := []net.IP{}
+
+ for _, ifcAddr := range ifc.addrs {
+ var ip net.IP
+ switch addr := ifcAddr.(type) {
+ case *net.IPNet:
+ ip = addr.IP
+ case *net.IPAddr: // Do we really need this case?
+ ip = addr.IP
+ default:
+ }
+
+ if ip == nil {
+ continue
+ }
+
+ mappedIPs = append(mappedIPs, ip)
+
+ if locIP := r.staticLocalIPs[ip.String()]; locIP != nil {
+ localIPs = append(localIPs, locIP)
+ }
+ }
+
+ // Set up NAT here
+ if r.natType == nil {
+ r.natType = &NATType{
+ MappingBehavior: EndpointIndependent,
+ FilteringBehavior: EndpointAddrPortDependent,
+ Hairpining: false,
+ PortPreservation: false,
+ MappingLifeTime: 30 * time.Second,
+ }
+ }
+ r.nat, err = newNAT(&natConfig{
+ name: r.name,
+ natType: *r.natType,
+ mappedIPs: mappedIPs,
+ localIPs: localIPs,
+ loggerFactory: r.loggerFactory,
+ })
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (r *Router) onInboundChunk(c Chunk) {
+ fromParent, err := r.nat.translateInbound(c)
+ if err != nil {
+ r.log.Warnf("[%s] %s", r.name, err.Error())
+ return
+ }
+
+ r.push(fromParent)
+}
+
+func (r *Router) getStaticIPs() []net.IP {
+ return r.staticIPs
+}
diff --git a/vendor/github.com/pion/transport/vnet/udpproxy.go b/vendor/github.com/pion/transport/vnet/udpproxy.go
new file mode 100644
index 0000000..c774955
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/udpproxy.go
@@ -0,0 +1,176 @@
+package vnet
+
+import (
+ "net"
+ "sync"
+ "time"
+)
+
+// UDPProxy is a proxy between real server(net.UDPConn) and vnet.UDPConn.
+//
+// High level design:
+// ..............................................
+// : Virtual Network (vnet) :
+// : :
+// +-------+ * 1 +----+ +--------+ :
+// | :App |------------>|:Net|--o<-----|:Router | .............................
+// +-------+ +----+ | | : UDPProxy :
+// : | | +----+ +---------+ +---------+ +--------+
+// : | |--->o--|:Net|-->o-| vnet. |-->o-| net. |--->-| :Real |
+// : | | +----+ | UDPConn | | UDPConn | | Server |
+// : | | : +---------+ +---------+ +--------+
+// : | | ............................:
+// : +--------+ :
+// ...............................................
+type UDPProxy struct {
+ // The router bind to.
+ router *Router
+
+ // Each vnet source, bind to a real socket to server.
+ // key is real server addr, which is net.Addr
+ // value is *aUDPProxyWorker
+ workers sync.Map
+
+ // For each endpoint, we never know when to start and stop proxy,
+ // so we stop the endpoint when timeout.
+ timeout time.Duration
+
+ // For utest, to mock the target real server.
+ // Optional, use the address of received client packet.
+ mockRealServerAddr *net.UDPAddr
+}
+
+// NewProxy create a proxy, the router for this proxy belongs/bind to. If need to proxy for
+// please create a new proxy for each router. For all addresses we proxy, we will create a
+// vnet.Net in this router and proxy all packets.
+func NewProxy(router *Router) (*UDPProxy, error) {
+ v := &UDPProxy{router: router, timeout: 2 * time.Minute}
+ return v, nil
+}
+
+// Close the proxy, stop all workers.
+func (v *UDPProxy) Close() error {
+ // nolint:godox // TODO: FIXME: Do cleanup.
+ return nil
+}
+
+// Proxy starts a worker for server, ignore if already started.
+func (v *UDPProxy) Proxy(client *Net, server *net.UDPAddr) error {
+ // Note that even if the worker exists, it's also ok to create a same worker,
+ // because the router will use the last one, and the real server will see a address
+ // change event after we switch to the next worker.
+ if _, ok := v.workers.Load(server.String()); ok {
+ // nolint:godox // TODO: Need to restart the stopped worker?
+ return nil
+ }
+
+ // Not exists, create a new one.
+ worker := &aUDPProxyWorker{
+ router: v.router, mockRealServerAddr: v.mockRealServerAddr,
+ }
+ v.workers.Store(server.String(), worker)
+
+ return worker.Proxy(client, server)
+}
+
+// A proxy worker for a specified proxy server.
+type aUDPProxyWorker struct {
+ router *Router
+ mockRealServerAddr *net.UDPAddr
+
+ // Each vnet source, bind to a real socket to server.
+ // key is vnet client addr, which is net.Addr
+ // value is *net.UDPConn
+ endpoints sync.Map
+}
+
+func (v *aUDPProxyWorker) Proxy(client *Net, serverAddr *net.UDPAddr) error { // nolint:gocognit
+ // Create vnet for real server by serverAddr.
+ nw := NewNet(&NetConfig{
+ StaticIP: serverAddr.IP.String(),
+ })
+ if err := v.router.AddNet(nw); err != nil {
+ return err
+ }
+
+ // We must create a "same" vnet.UDPConn as the net.UDPConn,
+ // which has the same ip:port, to copy packets between them.
+ vnetSocket, err := nw.ListenUDP("udp4", serverAddr)
+ if err != nil {
+ return err
+ }
+
+ // Got new vnet client, start a new endpoint.
+ findEndpointBy := func(addr net.Addr) (*net.UDPConn, error) {
+ // Exists binding.
+ if value, ok := v.endpoints.Load(addr.String()); ok {
+ // Exists endpoint, reuse it.
+ return value.(*net.UDPConn), nil
+ }
+
+ // The real server we proxy to, for utest to mock it.
+ realAddr := serverAddr
+ if v.mockRealServerAddr != nil {
+ realAddr = v.mockRealServerAddr
+ }
+
+ // Got new vnet client, create new endpoint.
+ realSocket, err := net.DialUDP("udp4", nil, realAddr)
+ if err != nil {
+ return nil, err
+ }
+
+ // Bind address.
+ v.endpoints.Store(addr.String(), realSocket)
+
+ // Got packet from real serverAddr, we should proxy it to vnet.
+ // nolint:godox // TODO: FIXME: Do cleanup.
+ go func(vnetClientAddr net.Addr) {
+ buf := make([]byte, 1500)
+ for {
+ n, _, err := realSocket.ReadFrom(buf)
+ if err != nil {
+ return
+ }
+
+ if n <= 0 {
+ continue // Drop packet
+ }
+
+ if _, err := vnetSocket.WriteTo(buf[:n], vnetClientAddr); err != nil {
+ return
+ }
+ }
+ }(addr)
+
+ return realSocket, nil
+ }
+
+ // Start a proxy goroutine.
+ // nolint:godox // TODO: FIXME: Do cleanup.
+ go func() {
+ buf := make([]byte, 1500)
+
+ for {
+ n, addr, err := vnetSocket.ReadFrom(buf)
+ if err != nil {
+ return
+ }
+
+ if n <= 0 || addr == nil {
+ continue // Drop packet
+ }
+
+ realSocket, err := findEndpointBy(addr)
+ if err != nil {
+ continue // Drop packet.
+ }
+
+ if _, err := realSocket.Write(buf[:n]); err != nil {
+ return
+ }
+ }
+ }()
+
+ return nil
+}
diff --git a/vendor/github.com/pion/transport/vnet/vnet.go b/vendor/github.com/pion/transport/vnet/vnet.go
new file mode 100644
index 0000000..bfe0f0f
--- /dev/null
+++ b/vendor/github.com/pion/transport/vnet/vnet.go
@@ -0,0 +1,2 @@
+// Package vnet provides a virtual network layer for pion
+package vnet
diff --git a/vendor/github.com/pion/turn/v2/.gitignore b/vendor/github.com/pion/turn/v2/.gitignore
new file mode 100644
index 0000000..98c12d9
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/.gitignore
@@ -0,0 +1,9 @@
+*.sw[poe]
+examples/turn-client/tcp/tcp
+examples/turn-client/udp/udp
+examples/turn-server/add-software-attribute/add-software-attribute
+examples/turn-server/log/log
+examples/turn-server/simple/simple
+examples/turn-server/tcp/tcp
+examples/lt-cred-generator/lt-cred-generator
+examples/turn-server/lt-cred/lt-cred
diff --git a/vendor/github.com/pion/turn/v2/.golangci.yml b/vendor/github.com/pion/turn/v2/.golangci.yml
new file mode 100644
index 0000000..8e4185a
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/.golangci.yml
@@ -0,0 +1,88 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+ exhaustive:
+ default-signifies-exhaustive: true
+ gomodguard:
+ blocked:
+ modules:
+ - github.com/pkg/errors:
+ recommendations:
+ - errors
+
+linters:
+ enable:
+ - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
+ - bodyclose # checks whether HTTP response body is closed successfully
+ - deadcode # Finds unused code
+ - depguard # Go linter that checks if package imports are in a list of acceptable packages
+ - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
+ - dupl # Tool for code clone detection
+ - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
+ - exhaustive # check exhaustiveness of enum switch statements
+ - exportloopref # checks for pointers to enclosing loop variables
+ - gci # Gci control golang package import order and make it always deterministic.
+ - gochecknoglobals # Checks that no globals are present in Go code
+ - gochecknoinits # Checks that no init functions are present in Go code
+ - gocognit # Computes and checks the cognitive complexity of functions
+ - goconst # Finds repeated strings that could be replaced by a constant
+ - gocritic # The most opinionated Go source code linter
+ - godox # Tool for detection of FIXME, TODO and other comment keywords
+ - goerr113 # Golang linter to check the errors handling expressions
+ - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
+ - gofumpt # Gofumpt checks whether code was gofumpt-ed.
+ - goheader # Checks is file header matches to pattern
+ - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
+ - golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
+ - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.
+ - goprintffuncname # Checks that printf-like functions are named with `f` at the end
+ - gosec # Inspects source code for security problems
+ - gosimple # Linter for Go source code that specializes in simplifying a code
+ - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
+ - ineffassign # Detects when assignments to existing variables are not used
+ - misspell # Finds commonly misspelled English words in comments
+ - nakedret # Finds naked returns in functions greater than a specified function length
+ - noctx # noctx finds sending http request without context.Context
+ - scopelint # Scopelint checks for unpinned variables in go programs
+ - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
+ - structcheck # Finds unused struct fields
+ - stylecheck # Stylecheck is a replacement for golint
+ - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
+ - unconvert # Remove unnecessary type conversions
+ - unparam # Reports unused function parameters
+ - unused # Checks Go code for unused constants, variables, functions and types
+ - varcheck # Finds unused global variables and constants
+ - whitespace # Tool for detection of leading and trailing whitespace
+ disable:
+ - funlen # Tool for detection of long functions
+ - gocyclo # Computes and checks the cyclomatic complexity of functions
+ - godot # Check if comments end in a period
+ - gomnd # An analyzer to detect magic numbers.
+ - lll # Reports long lines
+ - maligned # Tool to detect Go structs that would take less memory if their fields were sorted
+ - nestif # Reports deeply nested if statements
+ - nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
+ - nolintlint # Reports ill-formed or insufficient nolint directives
+ - prealloc # Finds slice declarations that could potentially be preallocated
+ - rowserrcheck # checks whether Err of rows is checked successfully
+ - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
+ - testpackage # linter that makes you use a separate _test package
+ - wsl # Whitespace Linter - Forces you to use empty lines!
+
+issues:
+ exclude-rules:
+ # Allow complex tests, better to be self contained
+ - path: _test\.go
+ linters:
+ - gocognit
+
+ # Allow complex main function in examples
+ - path: examples
+ text: "of func `main` is high"
+ linters:
+ - gocognit
+
+run:
+ skip-dirs-use-default: false
diff --git a/vendor/github.com/pion/turn/v2/.goreleaser.yml b/vendor/github.com/pion/turn/v2/.goreleaser.yml
new file mode 100644
index 0000000..c7f2efd
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/.goreleaser.yml
@@ -0,0 +1,109 @@
+before:
+ hooks:
+ - go mod tidy
+
+archives:
+- replacements:
+ darwin: Darwin
+ linux: Linux
+ windows: Windows
+ 386: i386
+ amd64: x86_64
+
+checksum:
+ name_template: 'checksums.txt'
+
+snapshot:
+ name_template: "{{ .Tag }}-next"
+
+changelog:
+ sort: asc
+ filters:
+ exclude:
+ - '^docs:'
+ - '^test:'
+
+builds:
+ - binary: turn-client-tcp
+ id: turn-client-tcp
+ goos:
+ - darwin
+ - windows
+ - linux
+ - freebsd
+ goarch:
+ - amd64
+ - 386
+ env:
+ - CGO_ENABLED=0
+ main: ./examples/turn-client/tcp
+
+ - binary: turn-client-udp
+ id: turn-client-udp
+ goos:
+ - darwin
+ - windows
+ - linux
+ - freebsd
+ goarch:
+ - amd64
+ - 386
+ env:
+ - CGO_ENABLED=0
+ main: ./examples/turn-client/udp
+
+ - binary: turn-server-add-software-attribute
+ id: turn-server-add-software-attribute
+ goos:
+ - darwin
+ - windows
+ - linux
+ - freebsd
+ goarch:
+ - amd64
+ - 386
+ env:
+ - CGO_ENABLED=0
+ main: ./examples/turn-server/add-software-attribute
+
+ - binary: turn-server-log
+ id: turn-server-log
+ goos:
+ - darwin
+ - windows
+ - linux
+ - freebsd
+ goarch:
+ - amd64
+ - 386
+ env:
+ - CGO_ENABLED=0
+ main: ./examples/turn-server/log
+
+ - binary: turn-server-simple
+ id: turn-server-simple
+ goos:
+ - darwin
+ - windows
+ - linux
+ - freebsd
+ goarch:
+ - amd64
+ - 386
+ env:
+ - CGO_ENABLED=0
+ main: ./examples/turn-server/simple/
+
+ - binary: turn-server-tcp
+ id: turn-server-tcp
+ goos:
+ - darwin
+ - windows
+ - linux
+ - freebsd
+ goarch:
+ - amd64
+ - 386
+ env:
+ - CGO_ENABLED=0
+ main: ./examples/turn-server/tcp/
diff --git a/vendor/github.com/pion/turn/v2/DESIGN.md b/vendor/github.com/pion/turn/v2/DESIGN.md
new file mode 100644
index 0000000..2c52466
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/DESIGN.md
@@ -0,0 +1,31 @@
+# Why Pion TURN
+TURN servers aren't exactly a hot technology, they are usually an after thought when building something. Most of the time
+beginners build an interesting WebRTC application, but at the very end realize they need a TURN server. It is really frustrating when you
+want to share your cool new project, only to realize you have to run another service.
+
+Then you find yourself building from source, fighting with config files and making changes you don't fully understand. Pion TURN was born
+hoping to solve these frustrations. These are the guiding principals/features that define pion-turn.
+
+## Easy setup
+simple-turn is a statically built TURN server, configured by environment variables. The entire install setup is 5 commands, on any platform!
+The goal is that anyone should be able to run a TURN server on any platform.
+
+## Integration first
+pion-turn makes no assumptions about how you authenticate users, how you log, or even your topology! Instead of running a dedicated TURN server you
+can inherit from github.com/pion/turn and set whatever logger you want.
+
+## Embeddable
+You can add this to an existing service. This means all your config files stay homogeneous instead of having the mismatch that makes it harder to manage your services.
+For small setups it is usually an overkill to deploy dedicated TURN servers, this makes it easier to solve the problems you care about.
+
+## Safe
+Golang provides a great foundation to build safe network services. Especially when running a networked service that is highly concurrent bugs can be devastating.
+
+## Readable
+All network interaction is commented with a link to the spec. This makes learning and debugging easier, the TURN server was written to also serve as a guide for others.
+
+## Tested
+Every commit is tested via travis-ci Go provides fantastic facilities for testing, and more will be added as time goes on.
+
+## Shared libraries
+Every pion product is built using shared libraries, allowing others to build things using existing tested STUN and TURN tools.
diff --git a/vendor/github.com/pion/turn/v2/LICENSE.md b/vendor/github.com/pion/turn/v2/LICENSE.md
new file mode 100644
index 0000000..5cc9cbd
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/LICENSE.md
@@ -0,0 +1,7 @@
+Copyright 2018 Pion LLC
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/pion/turn/v2/README.md b/vendor/github.com/pion/turn/v2/README.md
new file mode 100644
index 0000000..372b286
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/README.md
@@ -0,0 +1,96 @@
+<h1 align="center">
+ <a href="https://pion.ly"><img src="./.github/gopher-pion.png" alt="Pion TURN" height="250px"></a>
+ <br>
+ Pion TURN
+ <br>
+</h1>
+<h4 align="center">A toolkit for building TURN clients and servers in Go</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-turn-gray.svg?longCache=true&colorB=brightgreen" alt="Pion TURN"></a>
+ <a href="http://gophers.slack.com/messages/pion"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <a href="https://github.com/pion/awesome-pion" alt="Awesome Pion"><img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/turn"><img src="https://travis-ci.org/pion/turn.svg?branch=master" alt="Build Status"></a>
+ <a href="https://pkg.go.dev/github.com/pion/turn/v2"><img src="https://godoc.org/github.com/pion/turn?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/turn"><img src="https://codecov.io/gh/pion/turn/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/turn"><img src="https://goreportcard.com/badge/github.com/pion/turn" alt="Go Report Card"></a>
+ <a href="https://www.codacy.com/app/pion/turn"><img src="https://api.codacy.com/project/badge/Grade/d53ec6c70576476cb16c140c2964afde" alt="Codacy Badge"></a>
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+Pion TURN is a Go toolkit for building TURN servers and clients. We wrote it to solve problems we had when building RTC projects.
+
+* **Deployable** - Use modern tooling of the Go ecosystem. Stop generating config files.
+* **Embeddable** - Include `pion/turn` in your existing applications. No need to manage another service.
+* **Extendable** - TURN as an API so you can easily integrate with your existing monitoring and metrics.
+* **Maintainable** - `pion/turn` is simple and well documented. Designed for learning and easy debugging.
+* **Portable** - Quickly deploy to multiple architectures/platforms just by setting an environment variable.
+* **Safe** - Stability and safety is important for network services. Go provides everything we need.
+* **Scalable** - Create allocations and mutate state at runtime. Designed to make scaling easy.
+
+# Using
+`pion/turn` is an API for building STUN/TURN clients and servers, not a binary you deploy then configure. It may require copying our examples and
+making minor modifications to fit your need, no knowledge of Go is required however. You may be able to download the pre-made binaries of our examples
+if you wish to get started quickly.
+
+The advantage of this is that you don't need to deal with complicated config files, or custom APIs to modify the state of Pion TURN.
+After you instantiate an instance of a Pion TURN server or client you interact with it like any library. The quickest way to get started is to look at the
+[examples](examples) or [GoDoc](https://godoc.org/github.com/pion/turn)
+
+# Examples
+We try to cover most common use cases in [examples](examples). If more examples could be helpful please file an issue, we are always looking
+to expand and improve `pion/turn` to make it easier for developers.
+
+To build any example you just need to run `go build` in the directory of the example you care about.
+It is also very easy to [cross compile](https://dave.cheney.net/2015/08/22/cross-compilation-with-go-1-5) Go programs.
+
+You can also see `pion/turn` usage in [pion/ice](https://github.com/pion/ice)
+
+# [FAQ](https://github.com/pion/webrtc/wiki/FAQ)
+
+### RFCs
+#### Implemented
+* [RFC 5389: Session Traversal Utilities for NAT (STUN)](https://tools.ietf.org/html/rfc5389)
+* [RFC 5766: Traversal Using Relays around NAT (TURN)](https://tools.ietf.org/html/rfc5766)
+
+#### Planned
+* [RFC 6062: Traversal Using Relays around NAT (TURN) Extensions for TCP Allocations](https://tools.ietf.org/html/rfc6062)
+* [RFC 6156: Traversal Using Relays around NAT (TURN) Extension for IPv6](https://tools.ietf.org/html/rfc6156)
+
+### Community
+Pion has an active community on the [Golang Slack](https://pion.ly/slack). Sign up and join the **#pion** channel for discussions and support.
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+### Contributing
+Check out the [CONTRIBUTING.md](CONTRIBUTING.md) to join the group of amazing people making this project possible:
+
+* [Michiel De Backker](https://github.com/backkem) - *Documentation*
+* [Ingmar Wittkau](https://github.com/iwittkau) - *STUN client*
+* [John Bradley](https://github.com/kc5nra) - *Original Author*
+* [jose nazario](https://github.com/paralax) - *Documentation*
+* [Mészáros Mihály](https://github.com/misi) - *Documentation*
+* [Mike Santry](https://github.com/santrym) - *Mascot*
+* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
+* [winds2016](https://github.com/winds2016) - *Windows platform testing*
+* [songjiayang](https://github.com/songjiayang) - *SongJiaYang*
+* [Yutaka Takeda](https://github.com/enobufs) - *vnet*
+* [namreg](https://github.com/namreg) - *Igor German*
+* [Aleksandr Razumov](https://github.com/ernado) - *protocol*
+* [Robert Eperjesi](https://github.com/epes)
+* [Lukas Rezek](https://github.com/lrezek)
+* [Hugo Arregui](https://github.com/hugoArregui)
+* [Aaron France](https://github.com/AeroNotix)
+* [Atsushi Watanabe](https://github.com/at-wat)
+* [Tom Clift](https://github.com/tclift)
+* [lllf](https://github.com/LittleLightLittleFire)
+* nindolabs (Marouane)
+* [Onwuka Gideon](https://github.com/dongido001)
+* [Herman Banken](https://github.com/hermanbanken)
+* [Jannis Mattheis](https://github.com/jmattheis)
+
+### License
+MIT License - see [LICENSE.md](LICENSE.md) for full text
+
+
diff --git a/vendor/github.com/pion/turn/v2/client.go b/vendor/github.com/pion/turn/v2/client.go
new file mode 100644
index 0000000..b04e7d1
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/client.go
@@ -0,0 +1,569 @@
+package turn
+
+import (
+ b64 "encoding/base64"
+ "fmt"
+ "math"
+ "net"
+ "sync"
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/stun"
+ "github.com/pion/transport/vnet"
+ "github.com/pion/turn/v2/internal/client"
+ "github.com/pion/turn/v2/internal/proto"
+)
+
+const (
+ defaultRTO = 200 * time.Millisecond
+ maxRtxCount = 7 // total 7 requests (Rc)
+ maxDataBufferSize = math.MaxUint16 // message size limit for Chromium
+)
+
+// interval [msec]
+// 0: 0 ms +500
+// 1: 500 ms +1000
+// 2: 1500 ms +2000
+// 3: 3500 ms +4000
+// 4: 7500 ms +8000
+// 5: 15500 ms +16000
+// 6: 31500 ms +32000
+// -: 63500 ms failed
+
+// ClientConfig is a bag of config parameters for Client.
+type ClientConfig struct {
+ STUNServerAddr string // STUN server address (e.g. "stun.abc.com:3478")
+ TURNServerAddr string // TURN server addrees (e.g. "turn.abc.com:3478")
+ Username string
+ Password string
+ Realm string
+ Software string
+ RTO time.Duration
+ Conn net.PacketConn // Listening socket (net.PacketConn)
+ LoggerFactory logging.LoggerFactory
+ Net *vnet.Net
+}
+
+// Client is a STUN server client
+type Client struct {
+ conn net.PacketConn // read-only
+ stunServ net.Addr // read-only
+ turnServ net.Addr // read-only
+ stunServStr string // read-only, used for dmuxing
+ turnServStr string // read-only, used for dmuxing
+ username stun.Username // read-only
+ password string // read-only
+ realm stun.Realm // read-only
+ integrity stun.MessageIntegrity // read-only
+ software stun.Software // read-only
+ trMap *client.TransactionMap // thread-safe
+ rto time.Duration // read-only
+ relayedConn *client.UDPConn // protected by mutex ***
+ allocTryLock client.TryLock // thread-safe
+ listenTryLock client.TryLock // thread-safe
+ net *vnet.Net // read-only
+ mutex sync.RWMutex // thread-safe
+ mutexTrMap sync.Mutex // thread-safe
+ log logging.LeveledLogger // read-only
+}
+
+// NewClient returns a new Client instance. listeningAddress is the address and port to listen on, default "0.0.0.0:0"
+func NewClient(config *ClientConfig) (*Client, error) {
+ loggerFactory := config.LoggerFactory
+ if loggerFactory == nil {
+ loggerFactory = logging.NewDefaultLoggerFactory()
+ }
+
+ log := loggerFactory.NewLogger("turnc")
+
+ if config.Conn == nil {
+ return nil, errNilConn
+ }
+
+ if config.Net == nil {
+ config.Net = vnet.NewNet(nil) // defaults to native operation
+ } else if config.Net.IsVirtual() {
+ log.Warn("vnet is enabled")
+ }
+
+ var stunServ, turnServ net.Addr
+ var stunServStr, turnServStr string
+ var err error
+ if len(config.STUNServerAddr) > 0 {
+ log.Debugf("resolving %s", config.STUNServerAddr)
+ stunServ, err = config.Net.ResolveUDPAddr("udp4", config.STUNServerAddr)
+ if err != nil {
+ return nil, err
+ }
+ stunServStr = stunServ.String()
+ log.Debugf("stunServ: %s", stunServStr)
+ }
+ if len(config.TURNServerAddr) > 0 {
+ log.Debugf("resolving %s", config.TURNServerAddr)
+ turnServ, err = config.Net.ResolveUDPAddr("udp4", config.TURNServerAddr)
+ if err != nil {
+ return nil, err
+ }
+ turnServStr = turnServ.String()
+ log.Debugf("turnServ: %s", turnServStr)
+ }
+
+ rto := defaultRTO
+ if config.RTO > 0 {
+ rto = config.RTO
+ }
+
+ c := &Client{
+ conn: config.Conn,
+ stunServ: stunServ,
+ turnServ: turnServ,
+ stunServStr: stunServStr,
+ turnServStr: turnServStr,
+ username: stun.NewUsername(config.Username),
+ password: config.Password,
+ realm: stun.NewRealm(config.Realm),
+ software: stun.NewSoftware(config.Software),
+ net: config.Net,
+ trMap: client.NewTransactionMap(),
+ rto: rto,
+ log: log,
+ }
+
+ return c, nil
+}
+
+// TURNServerAddr return the TURN server address
+func (c *Client) TURNServerAddr() net.Addr {
+ return c.turnServ
+}
+
+// STUNServerAddr return the STUN server address
+func (c *Client) STUNServerAddr() net.Addr {
+ return c.stunServ
+}
+
+// Username returns username
+func (c *Client) Username() stun.Username {
+ return c.username
+}
+
+// Realm return realm
+func (c *Client) Realm() stun.Realm {
+ return c.realm
+}
+
+// WriteTo sends data to the specified destination using the base socket.
+func (c *Client) WriteTo(data []byte, to net.Addr) (int, error) {
+ return c.conn.WriteTo(data, to)
+}
+
+// Listen will have this client start listening on the conn provided via the config.
+// This is optional. If not used, you will need to call HandleInbound method
+// to supply incoming data, instead.
+func (c *Client) Listen() error {
+ if err := c.listenTryLock.Lock(); err != nil {
+ return fmt.Errorf("%w: %s", errAlreadyListening, err.Error())
+ }
+
+ go func() {
+ buf := make([]byte, maxDataBufferSize)
+ for {
+ n, from, err := c.conn.ReadFrom(buf)
+ if err != nil {
+ c.log.Debugf("exiting read loop: %s", err.Error())
+ break
+ }
+
+ _, err = c.HandleInbound(buf[:n], from)
+ if err != nil {
+ c.log.Debugf("exiting read loop: %s", err.Error())
+ break
+ }
+ }
+
+ c.listenTryLock.Unlock()
+ }()
+
+ return nil
+}
+
+// Close closes this client
+func (c *Client) Close() {
+ c.mutexTrMap.Lock()
+ defer c.mutexTrMap.Unlock()
+
+ c.trMap.CloseAndDeleteAll()
+}
+
+// TransactionID & Base64: https://play.golang.org/p/EEgmJDI971P
+
+// SendBindingRequestTo sends a new STUN request to the given transport address
+func (c *Client) SendBindingRequestTo(to net.Addr) (net.Addr, error) {
+ attrs := []stun.Setter{stun.TransactionID, stun.BindingRequest}
+ if len(c.software) > 0 {
+ attrs = append(attrs, c.software)
+ }
+
+ msg, err := stun.Build(attrs...)
+ if err != nil {
+ return nil, err
+ }
+ trRes, err := c.PerformTransaction(msg, to, false)
+ if err != nil {
+ return nil, err
+ }
+
+ var reflAddr stun.XORMappedAddress
+ if err := reflAddr.GetFrom(trRes.Msg); err != nil {
+ return nil, err
+ }
+
+ return &net.UDPAddr{
+ IP: reflAddr.IP,
+ Port: reflAddr.Port,
+ }, nil
+}
+
+// SendBindingRequest sends a new STUN request to the STUN server
+func (c *Client) SendBindingRequest() (net.Addr, error) {
+ if c.stunServ == nil {
+ return nil, errSTUNServerAddressNotSet
+ }
+ return c.SendBindingRequestTo(c.stunServ)
+}
+
+// Allocate sends a TURN allocation request to the given transport address
+func (c *Client) Allocate() (net.PacketConn, error) {
+ if err := c.allocTryLock.Lock(); err != nil {
+ return nil, fmt.Errorf("%w: %s", errOneAllocateOnly, err.Error())
+ }
+ defer c.allocTryLock.Unlock()
+
+ relayedConn := c.relayedUDPConn()
+ if relayedConn != nil {
+ return nil, fmt.Errorf("%w: %s", errAlreadyAllocated, relayedConn.LocalAddr().String())
+ }
+
+ msg, err := stun.Build(
+ stun.TransactionID,
+ stun.NewType(stun.MethodAllocate, stun.ClassRequest),
+ proto.RequestedTransport{Protocol: proto.ProtoUDP},
+ stun.Fingerprint,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ trRes, err := c.PerformTransaction(msg, c.turnServ, false)
+ if err != nil {
+ return nil, err
+ }
+
+ res := trRes.Msg
+
+ // Anonymous allocate failed, trying to authenticate.
+ var nonce stun.Nonce
+ if err = nonce.GetFrom(res); err != nil {
+ return nil, err
+ }
+ if err = c.realm.GetFrom(res); err != nil {
+ return nil, err
+ }
+ c.realm = append([]byte(nil), c.realm...)
+ c.integrity = stun.NewLongTermIntegrity(
+ c.username.String(), c.realm.String(), c.password,
+ )
+ // Trying to authorize.
+ msg, err = stun.Build(
+ stun.TransactionID,
+ stun.NewType(stun.MethodAllocate, stun.ClassRequest),
+ proto.RequestedTransport{Protocol: proto.ProtoUDP},
+ &c.username,
+ &c.realm,
+ &nonce,
+ &c.integrity,
+ stun.Fingerprint,
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ trRes, err = c.PerformTransaction(msg, c.turnServ, false)
+ if err != nil {
+ return nil, err
+ }
+ res = trRes.Msg
+
+ if res.Type.Class == stun.ClassErrorResponse {
+ var code stun.ErrorCodeAttribute
+ if err = code.GetFrom(res); err == nil {
+ return nil, fmt.Errorf("%s (error %s)", res.Type, code) //nolint:goerr113
+ }
+ return nil, fmt.Errorf("%s", res.Type) //nolint:goerr113
+ }
+
+ // Getting relayed addresses from response.
+ var relayed proto.RelayedAddress
+ if err := relayed.GetFrom(res); err != nil {
+ return nil, err
+ }
+ relayedAddr := &net.UDPAddr{
+ IP: relayed.IP,
+ Port: relayed.Port,
+ }
+
+ // Getting lifetime from response
+ var lifetime proto.Lifetime
+ if err := lifetime.GetFrom(res); err != nil {
+ return nil, err
+ }
+
+ relayedConn = client.NewUDPConn(&client.UDPConnConfig{
+ Observer: c,
+ RelayedAddr: relayedAddr,
+ Integrity: c.integrity,
+ Nonce: nonce,
+ Lifetime: lifetime.Duration,
+ Log: c.log,
+ })
+
+ c.setRelayedUDPConn(relayedConn)
+
+ return relayedConn, nil
+}
+
+// PerformTransaction performs STUN transaction
+func (c *Client) PerformTransaction(msg *stun.Message, to net.Addr, ignoreResult bool) (client.TransactionResult,
+ error) {
+ trKey := b64.StdEncoding.EncodeToString(msg.TransactionID[:])
+
+ raw := make([]byte, len(msg.Raw))
+ copy(raw, msg.Raw)
+
+ tr := client.NewTransaction(&client.TransactionConfig{
+ Key: trKey,
+ Raw: raw,
+ To: to,
+ Interval: c.rto,
+ IgnoreResult: ignoreResult,
+ })
+
+ c.trMap.Insert(trKey, tr)
+
+ c.log.Tracef("start %s transaction %s to %s", msg.Type, trKey, tr.To.String())
+ _, err := c.conn.WriteTo(tr.Raw, to)
+ if err != nil {
+ return client.TransactionResult{}, err
+ }
+
+ tr.StartRtxTimer(c.onRtxTimeout)
+
+ // If dontWait is true, get the transaction going and return immediately
+ if ignoreResult {
+ return client.TransactionResult{}, nil
+ }
+
+ res := tr.WaitForResult()
+ if res.Err != nil {
+ return res, res.Err
+ }
+ return res, nil
+}
+
+// OnDeallocated is called when deallocation of relay address has been complete.
+// (Called by UDPConn)
+func (c *Client) OnDeallocated(relayedAddr net.Addr) {
+ c.setRelayedUDPConn(nil)
+}
+
+// HandleInbound handles data received.
+// This method handles incoming packet demultiplex it by the source address
+// and the types of the message.
+// This return a booleen (handled or not) and if there was an error.
+// Caller should check if the packet was handled by this client or not.
+// If not handled, it is assumed that the packet is application data.
+// If an error is returned, the caller should discard the packet regardless.
+func (c *Client) HandleInbound(data []byte, from net.Addr) (bool, error) {
+ // +-------------------+-------------------------------+
+ // | Return Values | |
+ // +-------------------+ Meaning / Action |
+ // | handled | error | |
+ // |=========+=========+===============================+
+ // | false | nil | Handle the packet as app data |
+ // |---------+---------+-------------------------------+
+ // | true | nil | Nothing to do |
+ // |---------+---------+-------------------------------+
+ // | false | error | (shouldn't happen) |
+ // |---------+---------+-------------------------------+
+ // | true | error | Error occurred while handling |
+ // +---------+---------+-------------------------------+
+ // Possible causes of the error:
+ // - Malformed packet (parse error)
+ // - STUN message was a request
+ // - Non-STUN message from the STUN server
+
+ switch {
+ case stun.IsMessage(data):
+ return true, c.handleSTUNMessage(data, from)
+ case proto.IsChannelData(data):
+ return true, c.handleChannelData(data)
+ case len(c.stunServStr) != 0 && from.String() == c.stunServStr:
+ // received from STUN server but it is not a STUN message
+ return true, errNonSTUNMessage
+ default:
+ // assume, this is an application data
+ c.log.Tracef("non-STUN/TURN packect, unhandled")
+ }
+
+ return false, nil
+}
+
+func (c *Client) handleSTUNMessage(data []byte, from net.Addr) error {
+ raw := make([]byte, len(data))
+ copy(raw, data)
+
+ msg := &stun.Message{Raw: raw}
+ if err := msg.Decode(); err != nil {
+ return fmt.Errorf("%w: %s", errFailedToDecodeSTUN, err.Error())
+ }
+
+ if msg.Type.Class == stun.ClassRequest {
+ return fmt.Errorf("%w : %s", errUnexpectedSTUNRequestMessage, msg.String())
+ }
+
+ if msg.Type.Class == stun.ClassIndication {
+ if msg.Type.Method == stun.MethodData {
+ var peerAddr proto.PeerAddress
+ if err := peerAddr.GetFrom(msg); err != nil {
+ return err
+ }
+ from = &net.UDPAddr{
+ IP: peerAddr.IP,
+ Port: peerAddr.Port,
+ }
+
+ var data proto.Data
+ if err := data.GetFrom(msg); err != nil {
+ return err
+ }
+
+ c.log.Debugf("data indication received from %s", from.String())
+
+ relayedConn := c.relayedUDPConn()
+ if relayedConn == nil {
+ c.log.Debug("no relayed conn allocated")
+ return nil // silently discard
+ }
+
+ relayedConn.HandleInbound(data, from)
+ }
+ return nil
+ }
+
+ // This is a STUN response message (transactional)
+ // The type is either:
+ // - stun.ClassSuccessResponse
+ // - stun.ClassErrorResponse
+
+ trKey := b64.StdEncoding.EncodeToString(msg.TransactionID[:])
+
+ c.mutexTrMap.Lock()
+ tr, ok := c.trMap.Find(trKey)
+ if !ok {
+ c.mutexTrMap.Unlock()
+ // silently discard
+ c.log.Debugf("no transaction for %s", msg.String())
+ return nil
+ }
+
+ // End the transaction
+ tr.StopRtxTimer()
+ c.trMap.Delete(trKey)
+ c.mutexTrMap.Unlock()
+
+ if !tr.WriteResult(client.TransactionResult{
+ Msg: msg,
+ From: from,
+ Retries: tr.Retries(),
+ }) {
+ c.log.Debugf("no listener for %s", msg.String())
+ }
+
+ return nil
+}
+
+func (c *Client) handleChannelData(data []byte) error {
+ chData := &proto.ChannelData{
+ Raw: make([]byte, len(data)),
+ }
+ copy(chData.Raw, data)
+ if err := chData.Decode(); err != nil {
+ return err
+ }
+
+ relayedConn := c.relayedUDPConn()
+ if relayedConn == nil {
+ c.log.Debug("no relayed conn allocated")
+ return nil // silently discard
+ }
+
+ addr, ok := relayedConn.FindAddrByChannelNumber(uint16(chData.Number))
+ if !ok {
+ return fmt.Errorf("%w: %d", errChannelBindNotFound, int(chData.Number))
+ }
+
+ c.log.Tracef("channel data received from %s (ch=%d)", addr.String(), int(chData.Number))
+
+ relayedConn.HandleInbound(chData.Data, addr)
+ return nil
+}
+
+func (c *Client) onRtxTimeout(trKey string, nRtx int) {
+ c.mutexTrMap.Lock()
+ defer c.mutexTrMap.Unlock()
+
+ tr, ok := c.trMap.Find(trKey)
+ if !ok {
+ return // already gone
+ }
+
+ if nRtx == maxRtxCount {
+ // all retransmisstions failed
+ c.trMap.Delete(trKey)
+ if !tr.WriteResult(client.TransactionResult{
+ Err: fmt.Errorf("%w %s", errAllRetransmissionsFailed, trKey),
+ }) {
+ c.log.Debug("no listener for transaction")
+ }
+ return
+ }
+
+ c.log.Tracef("retransmitting transaction %s to %s (nRtx=%d)",
+ trKey, tr.To.String(), nRtx)
+ _, err := c.conn.WriteTo(tr.Raw, tr.To)
+ if err != nil {
+ c.trMap.Delete(trKey)
+ if !tr.WriteResult(client.TransactionResult{
+ Err: fmt.Errorf("%w %s", errFailedToRetransmitTransaction, trKey),
+ }) {
+ c.log.Debug("no listener for transaction")
+ }
+ return
+ }
+ tr.StartRtxTimer(c.onRtxTimeout)
+}
+
+func (c *Client) setRelayedUDPConn(conn *client.UDPConn) {
+ c.mutex.Lock()
+ defer c.mutex.Unlock()
+
+ c.relayedConn = conn
+}
+
+func (c *Client) relayedUDPConn() *client.UDPConn {
+ c.mutex.RLock()
+ defer c.mutex.RUnlock()
+
+ return c.relayedConn
+}
diff --git a/vendor/github.com/pion/turn/v2/codecov.yml b/vendor/github.com/pion/turn/v2/codecov.yml
new file mode 100644
index 0000000..085200a
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/codecov.yml
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+
+coverage:
+ status:
+ project:
+ default:
+ # Allow decreasing 2% of total coverage to avoid noise.
+ threshold: 2%
+ patch:
+ default:
+ target: 70%
+ only_pulls: true
+
+ignore:
+ - "examples/*"
+ - "examples/**/*"
diff --git a/vendor/github.com/pion/turn/v2/errors.go b/vendor/github.com/pion/turn/v2/errors.go
new file mode 100644
index 0000000..12d5e0e
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/errors.go
@@ -0,0 +1,28 @@
+package turn
+
+import "errors"
+
+var (
+ errRelayAddressInvalid = errors.New("turn: RelayAddress must be valid IP to use RelayAddressGeneratorStatic")
+ errNoAvailableConns = errors.New("turn: PacketConnConfigs and ConnConfigs are empty, unable to proceed")
+ errConnUnset = errors.New("turn: PacketConnConfig must have a non-nil Conn")
+ errListenerUnset = errors.New("turn: ListenerConfig must have a non-nil Listener")
+ errListeningAddressInvalid = errors.New("turn: RelayAddressGenerator has invalid ListeningAddress")
+ errRelayAddressGeneratorUnset = errors.New("turn: RelayAddressGenerator in RelayConfig is unset")
+ errMaxRetriesExceeded = errors.New("turn: max retries exceeded")
+ errMaxPortNotZero = errors.New("turn: MaxPort must be not 0")
+ errMinPortNotZero = errors.New("turn: MaxPort must be not 0")
+ errNilConn = errors.New("turn: conn cannot not be nil")
+ errTODO = errors.New("turn: TODO")
+ errAlreadyListening = errors.New("turn: already listening")
+ errFailedToClose = errors.New("turn: Server failed to close")
+ errFailedToRetransmitTransaction = errors.New("turn: failed to retransmit transaction")
+ errAllRetransmissionsFailed = errors.New("all retransmissions failed for")
+ errChannelBindNotFound = errors.New("no binding found for channel")
+ errSTUNServerAddressNotSet = errors.New("STUN server address is not set for the client")
+ errOneAllocateOnly = errors.New("only one Allocate() caller is allowed")
+ errAlreadyAllocated = errors.New("already allocated")
+ errNonSTUNMessage = errors.New("non-STUN message from STUN server")
+ errFailedToDecodeSTUN = errors.New("failed to decode STUN message")
+ errUnexpectedSTUNRequestMessage = errors.New("unexpected STUN request message")
+)
diff --git a/vendor/github.com/pion/turn/v2/go.mod b/vendor/github.com/pion/turn/v2/go.mod
new file mode 100644
index 0000000..de599c3
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/go.mod
@@ -0,0 +1,11 @@
+module github.com/pion/turn/v2
+
+go 1.13
+
+require (
+ github.com/pion/logging v0.2.2
+ github.com/pion/randutil v0.1.0
+ github.com/pion/stun v0.3.5
+ github.com/pion/transport v0.10.1
+ github.com/stretchr/testify v1.6.1
+)
diff --git a/vendor/github.com/pion/turn/v2/go.sum b/vendor/github.com/pion/turn/v2/go.sum
new file mode 100644
index 0000000..7756c37
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/go.sum
@@ -0,0 +1,28 @@
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
+github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
+github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
+github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
+github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg=
+github.com/pion/stun v0.3.5/go.mod h1:gDMim+47EeEtfWogA37n6qXZS88L5V6LqFcf+DZA2UA=
+github.com/pion/transport v0.10.1 h1:2W+yJT+0mOQ160ThZYUx5Zp2skzshiNgxrNE9GUfhJM=
+github.com/pion/transport v0.10.1/go.mod h1:PBis1stIILMiis0PewDw91WJeLJkyIMcEk+DwKOzf4A=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/pion/turn/v2/internal/allocation/allocation.go b/vendor/github.com/pion/turn/v2/internal/allocation/allocation.go
new file mode 100644
index 0000000..d1cb8c6
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/allocation/allocation.go
@@ -0,0 +1,259 @@
+// Package allocation contains all CRUD operations for allocations
+package allocation
+
+import (
+ "net"
+ "sync"
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/stun"
+ "github.com/pion/turn/v2/internal/ipnet"
+ "github.com/pion/turn/v2/internal/proto"
+)
+
+// Allocation is tied to a FiveTuple and relays traffic
+// use CreateAllocation and GetAllocation to operate
+type Allocation struct {
+ RelayAddr net.Addr
+ Protocol Protocol
+ TurnSocket net.PacketConn
+ RelaySocket net.PacketConn
+ fiveTuple *FiveTuple
+ permissionsLock sync.RWMutex
+ permissions map[string]*Permission
+ channelBindingsLock sync.RWMutex
+ channelBindings []*ChannelBind
+ lifetimeTimer *time.Timer
+ closed chan interface{}
+ log logging.LeveledLogger
+}
+
+func addr2IPFingerprint(addr net.Addr) string {
+ switch a := addr.(type) {
+ case *net.UDPAddr:
+ return a.IP.String()
+ case *net.TCPAddr: // Do we really need this case?
+ return a.IP.String()
+ }
+ return "" // shoud never happen
+}
+
+// NewAllocation creates a new instance of NewAllocation.
+func NewAllocation(turnSocket net.PacketConn, fiveTuple *FiveTuple, log logging.LeveledLogger) *Allocation {
+ return &Allocation{
+ TurnSocket: turnSocket,
+ fiveTuple: fiveTuple,
+ permissions: make(map[string]*Permission, 64),
+ closed: make(chan interface{}),
+ log: log,
+ }
+}
+
+// GetPermission gets the Permission from the allocation
+func (a *Allocation) GetPermission(addr net.Addr) *Permission {
+ a.permissionsLock.RLock()
+ defer a.permissionsLock.RUnlock()
+
+ return a.permissions[addr2IPFingerprint(addr)]
+}
+
+// AddPermission adds a new permission to the allocation
+func (a *Allocation) AddPermission(p *Permission) {
+ fingerprint := addr2IPFingerprint(p.Addr)
+
+ a.permissionsLock.RLock()
+ existedPermission, ok := a.permissions[fingerprint]
+ a.permissionsLock.RUnlock()
+
+ if ok {
+ existedPermission.refresh(permissionTimeout)
+ return
+ }
+
+ p.allocation = a
+ a.permissionsLock.Lock()
+ a.permissions[fingerprint] = p
+ a.permissionsLock.Unlock()
+
+ p.start(permissionTimeout)
+}
+
+// RemovePermission removes the net.Addr's fingerprint from the allocation's permissions
+func (a *Allocation) RemovePermission(addr net.Addr) {
+ a.permissionsLock.Lock()
+ defer a.permissionsLock.Unlock()
+ delete(a.permissions, addr2IPFingerprint(addr))
+}
+
+// AddChannelBind adds a new ChannelBind to the allocation, it also updates the
+// permissions needed for this ChannelBind
+func (a *Allocation) AddChannelBind(c *ChannelBind, lifetime time.Duration) error {
+ // Check that this channel id isn't bound to another transport address, and
+ // that this transport address isn't bound to another channel number.
+ channelByNumber := a.GetChannelByNumber(c.Number)
+
+ if channelByNumber != a.GetChannelByAddr(c.Peer) {
+ return errSameChannelDifferentPeer
+ }
+
+ // Add or refresh this channel.
+ if channelByNumber == nil {
+ a.channelBindingsLock.Lock()
+ defer a.channelBindingsLock.Unlock()
+
+ c.allocation = a
+ a.channelBindings = append(a.channelBindings, c)
+ c.start(lifetime)
+
+ // Channel binds also refresh permissions.
+ a.AddPermission(NewPermission(c.Peer, a.log))
+ } else {
+ channelByNumber.refresh(lifetime)
+
+ // Channel binds also refresh permissions.
+ a.AddPermission(NewPermission(channelByNumber.Peer, a.log))
+ }
+
+ return nil
+}
+
+// RemoveChannelBind removes the ChannelBind from this allocation by id
+func (a *Allocation) RemoveChannelBind(number proto.ChannelNumber) bool {
+ a.channelBindingsLock.Lock()
+ defer a.channelBindingsLock.Unlock()
+
+ for i := len(a.channelBindings) - 1; i >= 0; i-- {
+ if a.channelBindings[i].Number == number {
+ a.channelBindings = append(a.channelBindings[:i], a.channelBindings[i+1:]...)
+ return true
+ }
+ }
+
+ return false
+}
+
+// GetChannelByNumber gets the ChannelBind from this allocation by id
+func (a *Allocation) GetChannelByNumber(number proto.ChannelNumber) *ChannelBind {
+ a.channelBindingsLock.RLock()
+ defer a.channelBindingsLock.RUnlock()
+ for _, cb := range a.channelBindings {
+ if cb.Number == number {
+ return cb
+ }
+ }
+ return nil
+}
+
+// GetChannelByAddr gets the ChannelBind from this allocation by net.Addr
+func (a *Allocation) GetChannelByAddr(addr net.Addr) *ChannelBind {
+ a.channelBindingsLock.RLock()
+ defer a.channelBindingsLock.RUnlock()
+ for _, cb := range a.channelBindings {
+ if ipnet.AddrEqual(cb.Peer, addr) {
+ return cb
+ }
+ }
+ return nil
+}
+
+// Refresh updates the allocations lifetime
+func (a *Allocation) Refresh(lifetime time.Duration) {
+ if !a.lifetimeTimer.Reset(lifetime) {
+ a.log.Errorf("Failed to reset allocation timer for %v", a.fiveTuple)
+ }
+}
+
+// Close closes the allocation
+func (a *Allocation) Close() error {
+ select {
+ case <-a.closed:
+ return nil
+ default:
+ }
+ close(a.closed)
+
+ a.lifetimeTimer.Stop()
+
+ a.permissionsLock.RLock()
+ for _, p := range a.permissions {
+ p.lifetimeTimer.Stop()
+ }
+ a.permissionsLock.RUnlock()
+
+ a.channelBindingsLock.RLock()
+ for _, c := range a.channelBindings {
+ c.lifetimeTimer.Stop()
+ }
+ a.channelBindingsLock.RUnlock()
+
+ return a.RelaySocket.Close()
+}
+
+// https://tools.ietf.org/html/rfc5766#section-10.3
+// When the server receives a UDP datagram at a currently allocated
+// relayed transport address, the server looks up the allocation
+// associated with the relayed transport address. The server then
+// checks to see whether the set of permissions for the allocation allow
+// the relaying of the UDP datagram as described in Section 8.
+//
+// If relaying is permitted, then the server checks if there is a
+// channel bound to the peer that sent the UDP datagram (see
+// Section 11). If a channel is bound, then processing proceeds as
+// described in Section 11.7.
+//
+// If relaying is permitted but no channel is bound to the peer, then
+// the server forms and sends a Data indication. The Data indication
+// MUST contain both an XOR-PEER-ADDRESS and a DATA attribute. The DATA
+// attribute is set to the value of the 'data octets' field from the
+// datagram, and the XOR-PEER-ADDRESS attribute is set to the source
+// transport address of the received UDP datagram. The Data indication
+// is then sent on the 5-tuple associated with the allocation.
+
+const rtpMTU = 1500
+
+func (a *Allocation) packetHandler(m *Manager) {
+ buffer := make([]byte, rtpMTU)
+
+ for {
+ n, srcAddr, err := a.RelaySocket.ReadFrom(buffer)
+ if err != nil {
+ m.DeleteAllocation(a.fiveTuple)
+ return
+ }
+
+ a.log.Debugf("relay socket %s received %d bytes from %s",
+ a.RelaySocket.LocalAddr().String(),
+ n,
+ srcAddr.String())
+
+ if channel := a.GetChannelByAddr(srcAddr); channel != nil {
+ channelData := &proto.ChannelData{
+ Data: buffer[:n],
+ Number: channel.Number,
+ }
+ channelData.Encode()
+
+ if _, err = a.TurnSocket.WriteTo(channelData.Raw, a.fiveTuple.SrcAddr); err != nil {
+ a.log.Errorf("Failed to send ChannelData from allocation %v %v", srcAddr, err)
+ }
+ } else if p := a.GetPermission(srcAddr); p != nil {
+ udpAddr := srcAddr.(*net.UDPAddr)
+ peerAddressAttr := proto.PeerAddress{IP: udpAddr.IP, Port: udpAddr.Port}
+ dataAttr := proto.Data(buffer[:n])
+
+ msg, err := stun.Build(stun.TransactionID, stun.NewType(stun.MethodData, stun.ClassIndication), peerAddressAttr, dataAttr)
+ if err != nil {
+ a.log.Errorf("Failed to send DataIndication from allocation %v %v", srcAddr, err)
+ }
+ a.log.Debugf("relaying message from %s to client at %s",
+ srcAddr.String(),
+ a.fiveTuple.SrcAddr.String())
+ if _, err = a.TurnSocket.WriteTo(msg.Raw, a.fiveTuple.SrcAddr); err != nil {
+ a.log.Errorf("Failed to send DataIndication from allocation %v %v", srcAddr, err)
+ }
+ } else {
+ a.log.Infof("No Permission or Channel exists for %v on allocation %v", srcAddr, a.RelayAddr.String())
+ }
+ }
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/allocation/allocation_manager.go b/vendor/github.com/pion/turn/v2/internal/allocation/allocation_manager.go
new file mode 100644
index 0000000..9a1271a
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/allocation/allocation_manager.go
@@ -0,0 +1,186 @@
+package allocation
+
+import (
+ "fmt"
+ "net"
+ "sync"
+ "time"
+
+ "github.com/pion/logging"
+)
+
+// ManagerConfig a bag of config params for Manager.
+type ManagerConfig struct {
+ LeveledLogger logging.LeveledLogger
+ AllocatePacketConn func(network string, requestedPort int) (net.PacketConn, net.Addr, error)
+ AllocateConn func(network string, requestedPort int) (net.Conn, net.Addr, error)
+}
+
+type reservation struct {
+ token string
+ port int
+}
+
+// Manager is used to hold active allocations
+type Manager struct {
+ lock sync.RWMutex
+ log logging.LeveledLogger
+
+ allocations map[string]*Allocation
+ reservations []*reservation
+
+ allocatePacketConn func(network string, requestedPort int) (net.PacketConn, net.Addr, error)
+ allocateConn func(network string, requestedPort int) (net.Conn, net.Addr, error)
+}
+
+// NewManager creates a new instance of Manager.
+func NewManager(config ManagerConfig) (*Manager, error) {
+ switch {
+ case config.AllocatePacketConn == nil:
+ return nil, errAllocatePacketConnMustBeSet
+ case config.AllocateConn == nil:
+ return nil, errAllocateConnMustBeSet
+ case config.LeveledLogger == nil:
+ return nil, errLeveledLoggerMustBeSet
+ }
+
+ return &Manager{
+ log: config.LeveledLogger,
+ allocations: make(map[string]*Allocation, 64),
+ allocatePacketConn: config.AllocatePacketConn,
+ allocateConn: config.AllocateConn,
+ }, nil
+}
+
+// GetAllocation fetches the allocation matching the passed FiveTuple
+func (m *Manager) GetAllocation(fiveTuple *FiveTuple) *Allocation {
+ m.lock.RLock()
+ defer m.lock.RUnlock()
+ return m.allocations[fiveTuple.Fingerprint()]
+}
+
+// Close closes the manager and closes all allocations it manages
+func (m *Manager) Close() error {
+ m.lock.Lock()
+ defer m.lock.Unlock()
+
+ for _, a := range m.allocations {
+ if err := a.Close(); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// CreateAllocation creates a new allocation and starts relaying
+func (m *Manager) CreateAllocation(fiveTuple *FiveTuple, turnSocket net.PacketConn, requestedPort int, lifetime time.Duration) (*Allocation, error) {
+ switch {
+ case fiveTuple == nil:
+ return nil, errNilFiveTuple
+ case fiveTuple.SrcAddr == nil:
+ return nil, errNilFiveTupleSrcAddr
+ case fiveTuple.DstAddr == nil:
+ return nil, errNilFiveTupleDstAddr
+ case turnSocket == nil:
+ return nil, errNilTurnSocket
+ case lifetime == 0:
+ return nil, errLifetimeZero
+ }
+
+ if a := m.GetAllocation(fiveTuple); a != nil {
+ return nil, fmt.Errorf("%w: %v", errDupeFiveTuple, fiveTuple)
+ }
+ a := NewAllocation(turnSocket, fiveTuple, m.log)
+
+ conn, relayAddr, err := m.allocatePacketConn("udp4", requestedPort)
+ if err != nil {
+ return nil, err
+ }
+
+ a.RelaySocket = conn
+ a.RelayAddr = relayAddr
+
+ m.log.Debugf("listening on relay addr: %s", a.RelayAddr.String())
+
+ a.lifetimeTimer = time.AfterFunc(lifetime, func() {
+ m.DeleteAllocation(a.fiveTuple)
+ })
+
+ m.lock.Lock()
+ m.allocations[fiveTuple.Fingerprint()] = a
+ m.lock.Unlock()
+
+ go a.packetHandler(m)
+ return a, nil
+}
+
+// DeleteAllocation removes an allocation
+func (m *Manager) DeleteAllocation(fiveTuple *FiveTuple) {
+ fingerprint := fiveTuple.Fingerprint()
+
+ m.lock.Lock()
+ allocation := m.allocations[fingerprint]
+ delete(m.allocations, fingerprint)
+ m.lock.Unlock()
+
+ if allocation == nil {
+ return
+ }
+
+ if err := allocation.Close(); err != nil {
+ m.log.Errorf("Failed to close allocation: %v", err)
+ }
+}
+
+// CreateReservation stores the reservation for the token+port
+func (m *Manager) CreateReservation(reservationToken string, port int) {
+ time.AfterFunc(30*time.Second, func() {
+ m.lock.Lock()
+ defer m.lock.Unlock()
+ for i := len(m.reservations) - 1; i >= 0; i-- {
+ if m.reservations[i].token == reservationToken {
+ m.reservations = append(m.reservations[:i], m.reservations[i+1:]...)
+ return
+ }
+ }
+ })
+
+ m.lock.Lock()
+ m.reservations = append(m.reservations, &reservation{
+ token: reservationToken,
+ port: port,
+ })
+ m.lock.Unlock()
+}
+
+// GetReservation returns the port for a given reservation if it exists
+func (m *Manager) GetReservation(reservationToken string) (int, bool) {
+ m.lock.RLock()
+ defer m.lock.RUnlock()
+
+ for _, r := range m.reservations {
+ if r.token == reservationToken {
+ return r.port, true
+ }
+ }
+ return 0, false
+}
+
+// GetRandomEvenPort returns a random un-allocated udp4 port
+func (m *Manager) GetRandomEvenPort() (int, error) {
+ conn, addr, err := m.allocatePacketConn("udp4", 0)
+ if err != nil {
+ return 0, err
+ }
+
+ udpAddr, ok := addr.(*net.UDPAddr)
+ if !ok {
+ return 0, errFailedToCastUDPAddr
+ } else if err := conn.Close(); err != nil {
+ return 0, err
+ } else if udpAddr.Port%2 == 1 {
+ return m.GetRandomEvenPort()
+ }
+
+ return udpAddr.Port, nil
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/allocation/channel_bind.go b/vendor/github.com/pion/turn/v2/internal/allocation/channel_bind.go
new file mode 100644
index 0000000..6216369
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/allocation/channel_bind.go
@@ -0,0 +1,43 @@
+package allocation
+
+import (
+ "net"
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/turn/v2/internal/proto"
+)
+
+// ChannelBind represents a TURN Channel
+// https://tools.ietf.org/html/rfc5766#section-2.5
+type ChannelBind struct {
+ Peer net.Addr
+ Number proto.ChannelNumber
+
+ allocation *Allocation
+ lifetimeTimer *time.Timer
+ log logging.LeveledLogger
+}
+
+// NewChannelBind creates a new ChannelBind
+func NewChannelBind(number proto.ChannelNumber, peer net.Addr, log logging.LeveledLogger) *ChannelBind {
+ return &ChannelBind{
+ Number: number,
+ Peer: peer,
+ log: log,
+ }
+}
+
+func (c *ChannelBind) start(lifetime time.Duration) {
+ c.lifetimeTimer = time.AfterFunc(lifetime, func() {
+ if !c.allocation.RemoveChannelBind(c.Number) {
+ c.log.Errorf("Failed to remove ChannelBind for %v %x %v", c.Number, c.Peer, c.allocation.fiveTuple)
+ }
+ })
+}
+
+func (c *ChannelBind) refresh(lifetime time.Duration) {
+ if !c.lifetimeTimer.Reset(lifetime) {
+ c.log.Errorf("Failed to reset ChannelBind timer for %v %x %v", c.Number, c.Peer, c.allocation.fiveTuple)
+ }
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/allocation/errors.go b/vendor/github.com/pion/turn/v2/internal/allocation/errors.go
new file mode 100644
index 0000000..fdd8335
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/allocation/errors.go
@@ -0,0 +1,17 @@
+package allocation
+
+import "errors"
+
+var (
+ errAllocatePacketConnMustBeSet = errors.New("AllocatePacketConn must be set")
+ errAllocateConnMustBeSet = errors.New("AllocateConn must be set")
+ errLeveledLoggerMustBeSet = errors.New("LeveledLogger must be set")
+ errSameChannelDifferentPeer = errors.New("you cannot use the same channel number with different peer")
+ errNilFiveTuple = errors.New("allocations must not be created with nil FivTuple")
+ errNilFiveTupleSrcAddr = errors.New("allocations must not be created with nil FiveTuple.SrcAddr")
+ errNilFiveTupleDstAddr = errors.New("allocations must not be created with nil FiveTuple.DstAddr")
+ errNilTurnSocket = errors.New("allocations must not be created with nil turnSocket")
+ errLifetimeZero = errors.New("allocations must not be created with a lifetime of 0")
+ errDupeFiveTuple = errors.New("allocation attempt created with duplicate FiveTuple")
+ errFailedToCastUDPAddr = errors.New("failed to cast net.Addr to *net.UDPAddr")
+)
diff --git a/vendor/github.com/pion/turn/v2/internal/allocation/five_tuple.go b/vendor/github.com/pion/turn/v2/internal/allocation/five_tuple.go
new file mode 100644
index 0000000..1f2b3b5
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/allocation/five_tuple.go
@@ -0,0 +1,36 @@
+package allocation
+
+import (
+ "fmt"
+ "net"
+)
+
+// Protocol is an enum for relay protocol
+type Protocol uint8
+
+// Network protocols for relay
+const (
+ UDP Protocol = iota
+ TCP
+)
+
+// FiveTuple is the combination (client IP address and port, server IP
+// address and port, and transport protocol (currently one of UDP,
+// TCP, or TLS)) used to communicate between the client and the
+// server. The 5-tuple uniquely identifies this communication
+// stream. The 5-tuple also uniquely identifies the Allocation on
+// the server.
+type FiveTuple struct {
+ Protocol
+ SrcAddr, DstAddr net.Addr
+}
+
+// Equal asserts if two FiveTuples are equal
+func (f *FiveTuple) Equal(b *FiveTuple) bool {
+ return f.Fingerprint() == b.Fingerprint()
+}
+
+// Fingerprint is the identity of a FiveTuple
+func (f *FiveTuple) Fingerprint() string {
+ return fmt.Sprintf("%d_%s_%s", f.Protocol, f.SrcAddr.String(), f.DstAddr.String())
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/allocation/permission.go b/vendor/github.com/pion/turn/v2/internal/allocation/permission.go
new file mode 100644
index 0000000..03538eb
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/allocation/permission.go
@@ -0,0 +1,40 @@
+package allocation
+
+import (
+ "net"
+ "time"
+
+ "github.com/pion/logging"
+)
+
+const permissionTimeout = time.Duration(5) * time.Minute
+
+// Permission represents a TURN permission. TURN permissions mimic the address-restricted
+// filtering mechanism of NATs that comply with [RFC4787].
+// https://tools.ietf.org/html/rfc5766#section-2.3
+type Permission struct {
+ Addr net.Addr
+ allocation *Allocation
+ lifetimeTimer *time.Timer
+ log logging.LeveledLogger
+}
+
+// NewPermission create a new Permission
+func NewPermission(addr net.Addr, log logging.LeveledLogger) *Permission {
+ return &Permission{
+ Addr: addr,
+ log: log,
+ }
+}
+
+func (p *Permission) start(lifetime time.Duration) {
+ p.lifetimeTimer = time.AfterFunc(lifetime, func() {
+ p.allocation.RemovePermission(p.Addr)
+ })
+}
+
+func (p *Permission) refresh(lifetime time.Duration) {
+ if !p.lifetimeTimer.Reset(lifetime) {
+ p.log.Errorf("Failed to reset permission timer for %v %v", p.Addr, p.allocation.fiveTuple)
+ }
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/client/binding.go b/vendor/github.com/pion/turn/v2/internal/client/binding.go
new file mode 100644
index 0000000..ee52053
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/client/binding.go
@@ -0,0 +1,151 @@
+package client
+
+import (
+ "net"
+ "sync"
+ "sync/atomic"
+ "time"
+)
+
+// Chanel number:
+// 0x4000 through 0x7FFF: These values are the allowed channel
+// numbers (16,383 possible values).
+const (
+ minChannelNumber uint16 = 0x4000
+ maxChannelNumber uint16 = 0x7fff
+)
+
+type bindingState int32
+
+const (
+ bindingStateIdle bindingState = iota
+ bindingStateRequest
+ bindingStateReady
+ bindingStateRefresh
+ bindingStateFailed
+)
+
+type binding struct {
+ number uint16 // read-only
+ st bindingState // thread-safe (atomic op)
+ addr net.Addr // read-only
+ mgr *bindingManager // read-only
+ muBind sync.Mutex // thread-safe, for ChannelBind ops
+ _refreshedAt time.Time // protected by mutex
+ mutex sync.RWMutex // thread-safe
+}
+
+func (b *binding) setState(state bindingState) {
+ atomic.StoreInt32((*int32)(&b.st), int32(state))
+}
+
+func (b *binding) state() bindingState {
+ return bindingState(atomic.LoadInt32((*int32)(&b.st)))
+}
+
+func (b *binding) setRefreshedAt(at time.Time) {
+ b.mutex.Lock()
+ defer b.mutex.Unlock()
+
+ b._refreshedAt = at
+}
+
+func (b *binding) refreshedAt() time.Time {
+ b.mutex.RLock()
+ defer b.mutex.RUnlock()
+
+ return b._refreshedAt
+}
+
+// Thread-safe binding map
+type bindingManager struct {
+ chanMap map[uint16]*binding
+ addrMap map[string]*binding
+ next uint16
+ mutex sync.RWMutex
+}
+
+func newBindingManager() *bindingManager {
+ return &bindingManager{
+ chanMap: map[uint16]*binding{},
+ addrMap: map[string]*binding{},
+ next: minChannelNumber,
+ }
+}
+
+func (mgr *bindingManager) assignChannelNumber() uint16 {
+ n := mgr.next
+ if mgr.next == maxChannelNumber {
+ mgr.next = minChannelNumber
+ } else {
+ mgr.next++
+ }
+ return n
+}
+
+func (mgr *bindingManager) create(addr net.Addr) *binding {
+ mgr.mutex.Lock()
+ defer mgr.mutex.Unlock()
+
+ b := &binding{
+ number: mgr.assignChannelNumber(),
+ addr: addr,
+ mgr: mgr,
+ _refreshedAt: time.Now(),
+ }
+
+ mgr.chanMap[b.number] = b
+ mgr.addrMap[b.addr.String()] = b
+ return b
+}
+
+func (mgr *bindingManager) findByAddr(addr net.Addr) (*binding, bool) {
+ mgr.mutex.RLock()
+ defer mgr.mutex.RUnlock()
+
+ b, ok := mgr.addrMap[addr.String()]
+ return b, ok
+}
+
+func (mgr *bindingManager) findByNumber(number uint16) (*binding, bool) {
+ mgr.mutex.RLock()
+ defer mgr.mutex.RUnlock()
+
+ b, ok := mgr.chanMap[number]
+ return b, ok
+}
+
+func (mgr *bindingManager) deleteByAddr(addr net.Addr) bool {
+ mgr.mutex.Lock()
+ defer mgr.mutex.Unlock()
+
+ b, ok := mgr.addrMap[addr.String()]
+ if !ok {
+ return false
+ }
+
+ delete(mgr.addrMap, addr.String())
+ delete(mgr.chanMap, b.number)
+ return true
+}
+
+func (mgr *bindingManager) deleteByNumber(number uint16) bool {
+ mgr.mutex.Lock()
+ defer mgr.mutex.Unlock()
+
+ b, ok := mgr.chanMap[number]
+ if !ok {
+ return false
+ }
+
+ delete(mgr.addrMap, b.addr.String())
+ delete(mgr.chanMap, number)
+ return true
+}
+
+func (mgr *bindingManager) size() int {
+ mgr.mutex.RLock()
+ defer mgr.mutex.RUnlock()
+
+ return len(mgr.chanMap)
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/client/conn.go b/vendor/github.com/pion/turn/v2/internal/client/conn.go
new file mode 100644
index 0000000..8a2b1ae
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/client/conn.go
@@ -0,0 +1,613 @@
+// Package client implements the API for a TURN client
+package client
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "math"
+ "net"
+ "sync"
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/stun"
+ "github.com/pion/turn/v2/internal/proto"
+)
+
+const (
+ maxReadQueueSize = 1024
+ permRefreshInterval = 120 * time.Second
+ maxRetryAttempts = 3
+)
+
+const (
+ timerIDRefreshAlloc int = iota
+ timerIDRefreshPerms
+)
+
+func noDeadline() time.Time {
+ return time.Time{}
+}
+
+type inboundData struct {
+ data []byte
+ from net.Addr
+}
+
+// UDPConnObserver is an interface to UDPConn observer
+type UDPConnObserver interface {
+ TURNServerAddr() net.Addr
+ Username() stun.Username
+ Realm() stun.Realm
+ WriteTo(data []byte, to net.Addr) (int, error)
+ PerformTransaction(msg *stun.Message, to net.Addr, dontWait bool) (TransactionResult, error)
+ OnDeallocated(relayedAddr net.Addr)
+}
+
+// UDPConnConfig is a set of configuration params use by NewUDPConn
+type UDPConnConfig struct {
+ Observer UDPConnObserver
+ RelayedAddr net.Addr
+ Integrity stun.MessageIntegrity
+ Nonce stun.Nonce
+ Lifetime time.Duration
+ Log logging.LeveledLogger
+}
+
+// UDPConn is the implementation of the Conn and PacketConn interfaces for UDP network connections.
+// comatible with net.PacketConn and net.Conn
+type UDPConn struct {
+ obs UDPConnObserver // read-only
+ relayedAddr net.Addr // read-only
+ permMap *permissionMap // thread-safe
+ bindingMgr *bindingManager // thread-safe
+ integrity stun.MessageIntegrity // read-only
+ _nonce stun.Nonce // needs mutex x
+ _lifetime time.Duration // needs mutex x
+ readCh chan *inboundData // thread-safe
+ closeCh chan struct{} // thread-safe
+ readTimer *time.Timer // thread-safe
+ refreshAllocTimer *PeriodicTimer // thread-safe
+ refreshPermsTimer *PeriodicTimer // thread-safe
+ mutex sync.RWMutex // thread-safe
+ log logging.LeveledLogger // read-only
+}
+
+// NewUDPConn creates a new instance of UDPConn
+func NewUDPConn(config *UDPConnConfig) *UDPConn {
+ c := &UDPConn{
+ obs: config.Observer,
+ relayedAddr: config.RelayedAddr,
+ permMap: newPermissionMap(),
+ bindingMgr: newBindingManager(),
+ integrity: config.Integrity,
+ _nonce: config.Nonce,
+ _lifetime: config.Lifetime,
+ readCh: make(chan *inboundData, maxReadQueueSize),
+ closeCh: make(chan struct{}),
+ readTimer: time.NewTimer(time.Duration(math.MaxInt64)),
+ log: config.Log,
+ }
+
+ c.log.Debugf("initial lifetime: %d seconds", int(c.lifetime().Seconds()))
+
+ c.refreshAllocTimer = NewPeriodicTimer(
+ timerIDRefreshAlloc,
+ c.onRefreshTimers,
+ c.lifetime()/2,
+ )
+
+ c.refreshPermsTimer = NewPeriodicTimer(
+ timerIDRefreshPerms,
+ c.onRefreshTimers,
+ permRefreshInterval,
+ )
+
+ if c.refreshAllocTimer.Start() {
+ c.log.Debugf("refreshAllocTimer started")
+ }
+ if c.refreshPermsTimer.Start() {
+ c.log.Debugf("refreshPermsTimer started")
+ }
+
+ return c
+}
+
+// ReadFrom reads a packet from the connection,
+// copying the payload into p. It returns the number of
+// bytes copied into p and the return address that
+// was on the packet.
+// It returns the number of bytes read (0 <= n <= len(p))
+// and any error encountered. Callers should always process
+// the n > 0 bytes returned before considering the error err.
+// ReadFrom can be made to time out and return
+// an Error with Timeout() == true after a fixed time limit;
+// see SetDeadline and SetReadDeadline.
+func (c *UDPConn) ReadFrom(p []byte) (n int, addr net.Addr, err error) {
+ for {
+ select {
+ case ibData := <-c.readCh:
+ n := copy(p, ibData.data)
+ if n < len(ibData.data) {
+ return 0, nil, io.ErrShortBuffer
+ }
+ return n, ibData.from, nil
+
+ case <-c.readTimer.C:
+ return 0, nil, &net.OpError{
+ Op: "read",
+ Net: c.LocalAddr().Network(),
+ Addr: c.LocalAddr(),
+ Err: newTimeoutError("i/o timeout"),
+ }
+
+ case <-c.closeCh:
+ return 0, nil, &net.OpError{
+ Op: "read",
+ Net: c.LocalAddr().Network(),
+ Addr: c.LocalAddr(),
+ Err: errClosed,
+ }
+ }
+ }
+}
+
+// WriteTo writes a packet with payload p to addr.
+// WriteTo can be made to time out and return
+// an Error with Timeout() == true after a fixed time limit;
+// see SetDeadline and SetWriteDeadline.
+// On packet-oriented connections, write timeouts are rare.
+func (c *UDPConn) WriteTo(p []byte, addr net.Addr) (int, error) { //nolint: gocognit
+ var err error
+ _, ok := addr.(*net.UDPAddr)
+ if !ok {
+ return 0, errUDPAddrCast
+ }
+
+ // check if we have a permission for the destination IP addr
+ perm, ok := c.permMap.find(addr)
+ if !ok {
+ perm = &permission{}
+ c.permMap.insert(addr, perm)
+ }
+
+ // This func-block would block, per destination IP (, or perm), until
+ // the perm state becomes "requested". Purpose of this is to guarantee
+ // the order of packets (within the same perm).
+ // Note that CreatePermission transaction may not be complete before
+ // all the data transmission. This is done assuming that the request
+ // will be mostly likely successful and we can tolerate some loss of
+ // UDP packet (or reorder), inorder to minimize the latency in most cases.
+ createPermission := func() error {
+ perm.mutex.Lock()
+ defer perm.mutex.Unlock()
+
+ if perm.state() == permStateIdle {
+ // punch a hole! (this would block a bit..)
+ if err = c.createPermissions(addr); err != nil {
+ c.permMap.delete(addr)
+ return err
+ }
+ perm.setState(permStatePermitted)
+ }
+ return nil
+ }
+
+ for i := 0; i < maxRetryAttempts; i++ {
+ if err = createPermission(); !errors.Is(err, errTryAgain) {
+ break
+ }
+ }
+ if err != nil {
+ return 0, err
+ }
+
+ // bind channel
+ b, ok := c.bindingMgr.findByAddr(addr)
+ if !ok {
+ b = c.bindingMgr.create(addr)
+ }
+
+ bindSt := b.state()
+
+ if bindSt == bindingStateIdle || bindSt == bindingStateRequest || bindSt == bindingStateFailed {
+ func() {
+ // block only callers with the same binding until
+ // the binding transaction has been complete
+ b.muBind.Lock()
+ defer b.muBind.Unlock()
+
+ // binding state may have been changed while waiting. check again.
+ if b.state() == bindingStateIdle {
+ b.setState(bindingStateRequest)
+ go func() {
+ err2 := c.bind(b)
+ if err2 != nil {
+ c.log.Warnf("bind() failed: %s", err2.Error())
+ b.setState(bindingStateFailed)
+ // keep going...
+ } else {
+ b.setState(bindingStateReady)
+ }
+ }()
+ }
+ }()
+
+ // send data using SendIndication
+ peerAddr := addr2PeerAddress(addr)
+ var msg *stun.Message
+ msg, err = stun.Build(
+ stun.TransactionID,
+ stun.NewType(stun.MethodSend, stun.ClassIndication),
+ proto.Data(p),
+ peerAddr,
+ stun.Fingerprint,
+ )
+ if err != nil {
+ return 0, err
+ }
+
+ // indication has no transaction (fire-and-forget)
+
+ return c.obs.WriteTo(msg.Raw, c.obs.TURNServerAddr())
+ }
+
+ // binding is either ready
+
+ // check if the binding needs a refresh
+ func() {
+ b.muBind.Lock()
+ defer b.muBind.Unlock()
+
+ if b.state() == bindingStateReady && time.Since(b.refreshedAt()) > 5*time.Minute {
+ b.setState(bindingStateRefresh)
+ go func() {
+ err = c.bind(b)
+ if err != nil {
+ c.log.Warnf("bind() for refresh failed: %s", err.Error())
+ b.setState(bindingStateFailed)
+ // keep going...
+ } else {
+ b.setRefreshedAt(time.Now())
+ b.setState(bindingStateReady)
+ }
+ }()
+ }
+ }()
+
+ // send via ChannelData
+ return c.sendChannelData(p, b.number)
+}
+
+// Close closes the connection.
+// Any blocked ReadFrom or WriteTo operations will be unblocked and return errors.
+func (c *UDPConn) Close() error {
+ c.refreshAllocTimer.Stop()
+ c.refreshPermsTimer.Stop()
+
+ select {
+ case <-c.closeCh:
+ return errAlreadyClosed
+ default:
+ close(c.closeCh)
+ }
+
+ c.obs.OnDeallocated(c.relayedAddr)
+ return c.refreshAllocation(0, true /* dontWait=true */)
+}
+
+// LocalAddr returns the local network address.
+func (c *UDPConn) LocalAddr() net.Addr {
+ return c.relayedAddr
+}
+
+// SetDeadline sets the read and write deadlines associated
+// with the connection. It is equivalent to calling both
+// SetReadDeadline and SetWriteDeadline.
+//
+// A deadline is an absolute time after which I/O operations
+// fail with a timeout (see type Error) instead of
+// blocking. The deadline applies to all future and pending
+// I/O, not just the immediately following call to ReadFrom or
+// WriteTo. After a deadline has been exceeded, the connection
+// can be refreshed by setting a deadline in the future.
+//
+// An idle timeout can be implemented by repeatedly extending
+// the deadline after successful ReadFrom or WriteTo calls.
+//
+// A zero value for t means I/O operations will not time out.
+func (c *UDPConn) SetDeadline(t time.Time) error {
+ return c.SetReadDeadline(t)
+}
+
+// SetReadDeadline sets the deadline for future ReadFrom calls
+// and any currently-blocked ReadFrom call.
+// A zero value for t means ReadFrom will not time out.
+func (c *UDPConn) SetReadDeadline(t time.Time) error {
+ var d time.Duration
+ if t == noDeadline() {
+ d = time.Duration(math.MaxInt64)
+ } else {
+ d = time.Until(t)
+ }
+ c.readTimer.Reset(d)
+ return nil
+}
+
+// SetWriteDeadline sets the deadline for future WriteTo calls
+// and any currently-blocked WriteTo call.
+// Even if write times out, it may return n > 0, indicating that
+// some of the data was successfully written.
+// A zero value for t means WriteTo will not time out.
+func (c *UDPConn) SetWriteDeadline(t time.Time) error {
+ // Write never blocks.
+ return nil
+}
+
+func addr2PeerAddress(addr net.Addr) proto.PeerAddress {
+ var peerAddr proto.PeerAddress
+ switch a := addr.(type) {
+ case *net.UDPAddr:
+ peerAddr.IP = a.IP
+ peerAddr.Port = a.Port
+ case *net.TCPAddr:
+ peerAddr.IP = a.IP
+ peerAddr.Port = a.Port
+ }
+
+ return peerAddr
+}
+
+func (c *UDPConn) createPermissions(addrs ...net.Addr) error {
+ setters := []stun.Setter{
+ stun.TransactionID,
+ stun.NewType(stun.MethodCreatePermission, stun.ClassRequest),
+ }
+
+ for _, addr := range addrs {
+ setters = append(setters, addr2PeerAddress(addr))
+ }
+
+ setters = append(setters,
+ c.obs.Username(),
+ c.obs.Realm(),
+ c.nonce(),
+ c.integrity,
+ stun.Fingerprint)
+
+ msg, err := stun.Build(setters...)
+ if err != nil {
+ return err
+ }
+
+ trRes, err := c.obs.PerformTransaction(msg, c.obs.TURNServerAddr(), false)
+ if err != nil {
+ return err
+ }
+
+ res := trRes.Msg
+
+ if res.Type.Class == stun.ClassErrorResponse {
+ var code stun.ErrorCodeAttribute
+ if err = code.GetFrom(res); err == nil {
+ if code.Code == stun.CodeStaleNonce {
+ c.setNonceFromMsg(res)
+ return errTryAgain
+ }
+ return fmt.Errorf("%s (error %s)", res.Type, code) //nolint:goerr113
+ }
+
+ return fmt.Errorf("%s", res.Type) //nolint:goerr113
+ }
+
+ return nil
+}
+
+// HandleInbound passes inbound data in UDPConn
+func (c *UDPConn) HandleInbound(data []byte, from net.Addr) {
+ // copy data
+ copied := make([]byte, len(data))
+ copy(copied, data)
+
+ select {
+ case c.readCh <- &inboundData{data: copied, from: from}:
+ default:
+ c.log.Warnf("receive buffer full")
+ }
+}
+
+// FindAddrByChannelNumber returns a peer address associated with the
+// channel number on this UDPConn
+func (c *UDPConn) FindAddrByChannelNumber(chNum uint16) (net.Addr, bool) {
+ b, ok := c.bindingMgr.findByNumber(chNum)
+ if !ok {
+ return nil, false
+ }
+ return b.addr, true
+}
+
+func (c *UDPConn) setNonceFromMsg(msg *stun.Message) {
+ // Update nonce
+ var nonce stun.Nonce
+ if err := nonce.GetFrom(msg); err == nil {
+ c.setNonce(nonce)
+ c.log.Debug("refresh allocation: 438, got new nonce.")
+ } else {
+ c.log.Warn("refresh allocation: 438 but no nonce.")
+ }
+}
+
+func (c *UDPConn) refreshAllocation(lifetime time.Duration, dontWait bool) error {
+ msg, err := stun.Build(
+ stun.TransactionID,
+ stun.NewType(stun.MethodRefresh, stun.ClassRequest),
+ proto.Lifetime{Duration: lifetime},
+ c.obs.Username(),
+ c.obs.Realm(),
+ c.nonce(),
+ c.integrity,
+ stun.Fingerprint,
+ )
+ if err != nil {
+ return fmt.Errorf("%w: %s", errFailedToBuildRefreshRequest, err.Error())
+ }
+
+ c.log.Debugf("send refresh request (dontWait=%v)", dontWait)
+ trRes, err := c.obs.PerformTransaction(msg, c.obs.TURNServerAddr(), dontWait)
+ if err != nil {
+ return fmt.Errorf("%w: %s", errFailedToRefreshAllocation, err.Error())
+ }
+
+ if dontWait {
+ c.log.Debug("refresh request sent")
+ return nil
+ }
+
+ c.log.Debug("refresh request sent, and waiting response")
+
+ res := trRes.Msg
+ if res.Type.Class == stun.ClassErrorResponse {
+ var code stun.ErrorCodeAttribute
+ if err = code.GetFrom(res); err == nil {
+ if code.Code == stun.CodeStaleNonce {
+ c.setNonceFromMsg(res)
+ return errTryAgain
+ }
+ return err
+ }
+ return fmt.Errorf("%s", res.Type) //nolint:goerr113
+ }
+
+ // Getting lifetime from response
+ var updatedLifetime proto.Lifetime
+ if err := updatedLifetime.GetFrom(res); err != nil {
+ return fmt.Errorf("%w: %s", errFailedToGetLifetime, err.Error())
+ }
+
+ c.setLifetime(updatedLifetime.Duration)
+ c.log.Debugf("updated lifetime: %d seconds", int(c.lifetime().Seconds()))
+ return nil
+}
+
+func (c *UDPConn) refreshPermissions() error {
+ addrs := c.permMap.addrs()
+ if len(addrs) == 0 {
+ c.log.Debug("no permission to refresh")
+ return nil
+ }
+ if err := c.createPermissions(addrs...); err != nil {
+ if errors.Is(err, errTryAgain) {
+ return errTryAgain
+ }
+ c.log.Errorf("fail to refresh permissions: %s", err.Error())
+ return err
+ }
+ c.log.Debug("refresh permissions successful")
+ return nil
+}
+
+func (c *UDPConn) bind(b *binding) error {
+ setters := []stun.Setter{
+ stun.TransactionID,
+ stun.NewType(stun.MethodChannelBind, stun.ClassRequest),
+ addr2PeerAddress(b.addr),
+ proto.ChannelNumber(b.number),
+ c.obs.Username(),
+ c.obs.Realm(),
+ c.nonce(),
+ c.integrity,
+ stun.Fingerprint,
+ }
+
+ msg, err := stun.Build(setters...)
+ if err != nil {
+ return err
+ }
+
+ trRes, err := c.obs.PerformTransaction(msg, c.obs.TURNServerAddr(), false)
+ if err != nil {
+ c.bindingMgr.deleteByAddr(b.addr)
+ return err
+ }
+
+ res := trRes.Msg
+
+ if res.Type != stun.NewType(stun.MethodChannelBind, stun.ClassSuccessResponse) {
+ return fmt.Errorf("unexpected response type %s", res.Type) //nolint:goerr113
+ }
+
+ c.log.Debugf("channel binding successful: %s %d", b.addr.String(), b.number)
+
+ // Success.
+ return nil
+}
+
+func (c *UDPConn) sendChannelData(data []byte, chNum uint16) (int, error) {
+ chData := &proto.ChannelData{
+ Data: data,
+ Number: proto.ChannelNumber(chNum),
+ }
+ chData.Encode()
+ return c.obs.WriteTo(chData.Raw, c.obs.TURNServerAddr())
+}
+
+func (c *UDPConn) onRefreshTimers(id int) {
+ c.log.Debugf("refresh timer %d expired", id)
+ switch id {
+ case timerIDRefreshAlloc:
+ var err error
+ lifetime := c.lifetime()
+ // limit the max retries on errTryAgain to 3
+ // when stale nonce returns, sencond retry should succeed
+ for i := 0; i < maxRetryAttempts; i++ {
+ err = c.refreshAllocation(lifetime, false)
+ if !errors.Is(err, errTryAgain) {
+ break
+ }
+ }
+ if err != nil {
+ c.log.Warnf("refresh allocation failed")
+ }
+ case timerIDRefreshPerms:
+ var err error
+ for i := 0; i < maxRetryAttempts; i++ {
+ err = c.refreshPermissions()
+ if !errors.Is(err, errTryAgain) {
+ break
+ }
+ }
+ if err != nil {
+ c.log.Warnf("refresh permissions failed")
+ }
+ }
+}
+
+func (c *UDPConn) nonce() stun.Nonce {
+ c.mutex.RLock()
+ defer c.mutex.RUnlock()
+
+ return c._nonce
+}
+
+func (c *UDPConn) setNonce(nonce stun.Nonce) {
+ c.mutex.Lock()
+ defer c.mutex.Unlock()
+
+ c.log.Debugf("set new nonce with %d bytes", len(nonce))
+ c._nonce = nonce
+}
+
+func (c *UDPConn) lifetime() time.Duration {
+ c.mutex.RLock()
+ defer c.mutex.RUnlock()
+
+ return c._lifetime
+}
+
+func (c *UDPConn) setLifetime(lifetime time.Duration) {
+ c.mutex.Lock()
+ defer c.mutex.Unlock()
+
+ c._lifetime = lifetime
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/client/errors.go b/vendor/github.com/pion/turn/v2/internal/client/errors.go
new file mode 100644
index 0000000..2d4bd30
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/client/errors.go
@@ -0,0 +1,37 @@
+package client
+
+import (
+ "errors"
+)
+
+var (
+ errFakeErr = errors.New("fake error")
+ errTryAgain = errors.New("try again")
+ errClosed = errors.New("use of closed network connection")
+ errUDPAddrCast = errors.New("addr is not a net.UDPAddr")
+ errAlreadyClosed = errors.New("already closed")
+ errDoubleLock = errors.New("try-lock is already locked")
+ errTransactionClosed = errors.New("transaction closed")
+ errWaitForResultOnNonResultTransaction = errors.New("WaitForResult called on non-result transaction")
+ errFailedToBuildRefreshRequest = errors.New("failed to build refresh request")
+ errFailedToRefreshAllocation = errors.New("failed to refresh allocation")
+ errFailedToGetLifetime = errors.New("failed to get lifetime from refresh response")
+)
+
+type timeoutError struct {
+ msg string
+}
+
+func newTimeoutError(msg string) error {
+ return &timeoutError{
+ msg: msg,
+ }
+}
+
+func (e *timeoutError) Error() string {
+ return e.msg
+}
+
+func (e *timeoutError) Timeout() bool {
+ return true
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/client/periodic_timer.go b/vendor/github.com/pion/turn/v2/internal/client/periodic_timer.go
new file mode 100644
index 0000000..fcd5678
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/client/periodic_timer.go
@@ -0,0 +1,82 @@
+package client
+
+import (
+ "sync"
+ "time"
+)
+
+// PeriodicTimerTimeoutHandler is a handler called on timeout
+type PeriodicTimerTimeoutHandler func(timerID int)
+
+// PeriodicTimer is a periodic timer
+type PeriodicTimer struct {
+ id int
+ interval time.Duration
+ timeoutHandler PeriodicTimerTimeoutHandler
+ stopFunc func()
+ mutex sync.RWMutex
+}
+
+// NewPeriodicTimer create a new timer
+func NewPeriodicTimer(id int, timeoutHandler PeriodicTimerTimeoutHandler, interval time.Duration) *PeriodicTimer {
+ return &PeriodicTimer{
+ id: id,
+ interval: interval,
+ timeoutHandler: timeoutHandler,
+ }
+}
+
+// Start starts the timer.
+func (t *PeriodicTimer) Start() bool {
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
+
+ // this is a noop if the timer is always running
+ if t.stopFunc != nil {
+ return false
+ }
+
+ cancelCh := make(chan struct{})
+
+ go func() {
+ canceling := false
+
+ for !canceling {
+ timer := time.NewTimer(t.interval)
+
+ select {
+ case <-timer.C:
+ t.timeoutHandler(t.id)
+ case <-cancelCh:
+ canceling = true
+ timer.Stop()
+ }
+ }
+ }()
+
+ t.stopFunc = func() {
+ close(cancelCh)
+ }
+
+ return true
+}
+
+// Stop stops the timer.
+func (t *PeriodicTimer) Stop() {
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
+
+ if t.stopFunc != nil {
+ t.stopFunc()
+ t.stopFunc = nil
+ }
+}
+
+// IsRunning tests if the timer is running.
+// Debug purpose only
+func (t *PeriodicTimer) IsRunning() bool {
+ t.mutex.RLock()
+ defer t.mutex.RUnlock()
+
+ return (t.stopFunc != nil)
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/client/permission.go b/vendor/github.com/pion/turn/v2/internal/client/permission.go
new file mode 100644
index 0000000..5546a22
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/client/permission.go
@@ -0,0 +1,90 @@
+package client
+
+import (
+ "net"
+ "sync"
+ "sync/atomic"
+)
+
+type permState int32
+
+const (
+ permStateIdle permState = iota
+ permStatePermitted
+)
+
+type permission struct {
+ st permState // thread-safe (atomic op)
+ mutex sync.RWMutex // thread-safe
+}
+
+func (p *permission) setState(state permState) {
+ atomic.StoreInt32((*int32)(&p.st), int32(state))
+}
+
+func (p *permission) state() permState {
+ return permState(atomic.LoadInt32((*int32)(&p.st)))
+}
+
+// Thread-safe permission map
+type permissionMap struct {
+ permMap map[string]*permission
+ mutex sync.RWMutex
+}
+
+func (m *permissionMap) insert(addr net.Addr, p *permission) bool {
+ m.mutex.Lock()
+ defer m.mutex.Unlock()
+
+ udpAddr, ok := addr.(*net.UDPAddr)
+ if !ok {
+ return false
+ }
+
+ m.permMap[udpAddr.IP.String()] = p
+ return true
+}
+
+func (m *permissionMap) find(addr net.Addr) (*permission, bool) {
+ m.mutex.RLock()
+ defer m.mutex.RUnlock()
+
+ udpAddr, ok := addr.(*net.UDPAddr)
+ if !ok {
+ return nil, false
+ }
+
+ p, ok := m.permMap[udpAddr.IP.String()]
+ return p, ok
+}
+
+func (m *permissionMap) delete(addr net.Addr) {
+ m.mutex.Lock()
+ defer m.mutex.Unlock()
+
+ udpAddr, ok := addr.(*net.UDPAddr)
+ if !ok {
+ return
+ }
+
+ delete(m.permMap, udpAddr.IP.String())
+}
+
+func (m *permissionMap) addrs() []net.Addr {
+ m.mutex.RLock()
+ defer m.mutex.RUnlock()
+
+ addrs := []net.Addr{}
+ for k := range m.permMap {
+ addrs = append(addrs, &net.UDPAddr{
+ IP: net.ParseIP(k),
+ })
+ }
+ return addrs
+}
+
+func newPermissionMap() *permissionMap {
+ return &permissionMap{
+ permMap: map[string]*permission{},
+ }
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/client/transaction.go b/vendor/github.com/pion/turn/v2/internal/client/transaction.go
new file mode 100644
index 0000000..610a4d4
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/client/transaction.go
@@ -0,0 +1,185 @@
+package client
+
+import (
+ "net"
+ "sync"
+ "time"
+
+ "github.com/pion/stun"
+)
+
+const (
+ maxRtxInterval time.Duration = 1600 * time.Millisecond
+)
+
+// TransactionResult is a bag of result values of a transaction
+type TransactionResult struct {
+ Msg *stun.Message
+ From net.Addr
+ Retries int
+ Err error
+}
+
+// TransactionConfig is a set of config params used by NewTransaction
+type TransactionConfig struct {
+ Key string
+ Raw []byte
+ To net.Addr
+ Interval time.Duration
+ IgnoreResult bool // true to throw away the result of this transaction (it will not be readable using WaitForResult)
+}
+
+// Transaction represents a transaction
+type Transaction struct {
+ Key string // read-only
+ Raw []byte // read-only
+ To net.Addr // read-only
+ nRtx int // modified only by the timer thread
+ interval time.Duration // modified only by the timer thread
+ timer *time.Timer // thread-safe, set only by the creator, and stopper
+ resultCh chan TransactionResult // thread-safe
+ mutex sync.RWMutex
+}
+
+// NewTransaction creates a new instance of Transaction
+func NewTransaction(config *TransactionConfig) *Transaction {
+ var resultCh chan TransactionResult
+ if !config.IgnoreResult {
+ resultCh = make(chan TransactionResult)
+ }
+
+ return &Transaction{
+ Key: config.Key, // read-only
+ Raw: config.Raw, // read-only
+ To: config.To, // read-only
+ interval: config.Interval, // modified only by the timer thread
+ resultCh: resultCh, // thread-safe
+ }
+}
+
+// StartRtxTimer starts the transaction timer
+func (t *Transaction) StartRtxTimer(onTimeout func(trKey string, nRtx int)) {
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
+
+ t.timer = time.AfterFunc(t.interval, func() {
+ t.mutex.Lock()
+ t.nRtx++
+ nRtx := t.nRtx
+ t.interval *= 2
+ if t.interval > maxRtxInterval {
+ t.interval = maxRtxInterval
+ }
+ t.mutex.Unlock()
+ onTimeout(t.Key, nRtx)
+ })
+}
+
+// StopRtxTimer stop the transaction timer
+func (t *Transaction) StopRtxTimer() {
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
+
+ if t.timer != nil {
+ t.timer.Stop()
+ }
+}
+
+// WriteResult writes the result to the result channel
+func (t *Transaction) WriteResult(res TransactionResult) bool {
+ if t.resultCh == nil {
+ return false
+ }
+
+ t.resultCh <- res
+
+ return true
+}
+
+// WaitForResult waits for the transaction result
+func (t *Transaction) WaitForResult() TransactionResult {
+ if t.resultCh == nil {
+ return TransactionResult{
+ Err: errWaitForResultOnNonResultTransaction,
+ }
+ }
+
+ result, ok := <-t.resultCh
+ if !ok {
+ result.Err = errTransactionClosed
+ }
+ return result
+}
+
+// Close closes the transaction
+func (t *Transaction) Close() {
+ if t.resultCh != nil {
+ close(t.resultCh)
+ }
+}
+
+// Retries returns the number of retransmission it has made
+func (t *Transaction) Retries() int {
+ t.mutex.RLock()
+ defer t.mutex.RUnlock()
+
+ return t.nRtx
+}
+
+// TransactionMap is a thread-safe transaction map
+type TransactionMap struct {
+ trMap map[string]*Transaction
+ mutex sync.RWMutex
+}
+
+// NewTransactionMap create a new instance of the transaction map
+func NewTransactionMap() *TransactionMap {
+ return &TransactionMap{
+ trMap: map[string]*Transaction{},
+ }
+}
+
+// Insert inserts a trasaction to the map
+func (m *TransactionMap) Insert(key string, tr *Transaction) bool {
+ m.mutex.Lock()
+ defer m.mutex.Unlock()
+
+ m.trMap[key] = tr
+ return true
+}
+
+// Find looks up a transaction by its key
+func (m *TransactionMap) Find(key string) (*Transaction, bool) {
+ m.mutex.RLock()
+ defer m.mutex.RUnlock()
+
+ tr, ok := m.trMap[key]
+ return tr, ok
+}
+
+// Delete deletes a transaction by its key
+func (m *TransactionMap) Delete(key string) {
+ m.mutex.Lock()
+ defer m.mutex.Unlock()
+
+ delete(m.trMap, key)
+}
+
+// CloseAndDeleteAll closes and deletes all transactions
+func (m *TransactionMap) CloseAndDeleteAll() {
+ m.mutex.Lock()
+ defer m.mutex.Unlock()
+
+ for trKey, tr := range m.trMap {
+ tr.Close()
+ delete(m.trMap, trKey)
+ }
+}
+
+// Size returns the length of the transaction map
+func (m *TransactionMap) Size() int {
+ m.mutex.RLock()
+ defer m.mutex.RUnlock()
+
+ return len(m.trMap)
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/client/trylock.go b/vendor/github.com/pion/turn/v2/internal/client/trylock.go
new file mode 100644
index 0000000..48e25a0
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/client/trylock.go
@@ -0,0 +1,24 @@
+package client
+
+import (
+ "sync/atomic"
+)
+
+// TryLock implement the classic "try-lock" operation.
+type TryLock struct {
+ n int32
+}
+
+// Lock tries to lock the try-lock. If successful, it returns true.
+// Otherwise, it returns false immedidately.
+func (c *TryLock) Lock() error {
+ if !atomic.CompareAndSwapInt32(&c.n, 0, 1) {
+ return errDoubleLock
+ }
+ return nil
+}
+
+// Unlock unlocks the try-lock.
+func (c *TryLock) Unlock() {
+ atomic.StoreInt32(&c.n, 0)
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/ipnet/util.go b/vendor/github.com/pion/turn/v2/internal/ipnet/util.go
new file mode 100644
index 0000000..9df7f56
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/ipnet/util.go
@@ -0,0 +1,40 @@
+// Package ipnet contains helper functions around net and IP
+package ipnet
+
+import (
+ "errors"
+ "net"
+)
+
+var errFailedToCastAddr = errors.New("failed to cast net.Addr to *net.UDPAddr or *net.TCPAddr")
+
+// AddrIPPort extracts the IP and Port from a net.Addr
+func AddrIPPort(a net.Addr) (net.IP, int, error) {
+ aUDP, ok := a.(*net.UDPAddr)
+ if ok {
+ return aUDP.IP, aUDP.Port, nil
+ }
+
+ aTCP, ok := a.(*net.TCPAddr)
+ if ok {
+ return aTCP.IP, aTCP.Port, nil
+ }
+
+ return nil, 0, errFailedToCastAddr
+}
+
+// AddrEqual asserts that two net.Addrs are equal
+// Currently only supprots UDP but will be extended in the future to support others
+func AddrEqual(a, b net.Addr) bool {
+ aUDP, ok := a.(*net.UDPAddr)
+ if !ok {
+ return false
+ }
+
+ bUDP, ok := b.(*net.UDPAddr)
+ if !ok {
+ return false
+ }
+
+ return aUDP.IP.Equal(bUDP.IP) && aUDP.Port == bUDP.Port
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/addr.go b/vendor/github.com/pion/turn/v2/internal/proto/addr.go
new file mode 100644
index 0000000..b1d654d
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/addr.go
@@ -0,0 +1,65 @@
+package proto
+
+import (
+ "fmt"
+ "net"
+)
+
+// Addr is ip:port.
+type Addr struct {
+ IP net.IP
+ Port int
+}
+
+// Network implements net.Addr.
+func (Addr) Network() string { return "turn" }
+
+// FromUDPAddr sets addr to UDPAddr.
+func (a *Addr) FromUDPAddr(n *net.UDPAddr) {
+ a.IP = n.IP
+ a.Port = n.Port
+}
+
+// Equal returns true if b == a.
+func (a Addr) Equal(b Addr) bool {
+ if a.Port != b.Port {
+ return false
+ }
+ return a.IP.Equal(b.IP)
+}
+
+// EqualIP returns true if a and b have equal IP addresses.
+func (a Addr) EqualIP(b Addr) bool {
+ return a.IP.Equal(b.IP)
+}
+
+func (a Addr) String() string {
+ return fmt.Sprintf("%s:%d", a.IP, a.Port)
+}
+
+// FiveTuple represents 5-TUPLE value.
+type FiveTuple struct {
+ Client Addr
+ Server Addr
+ Proto Protocol
+}
+
+func (t FiveTuple) String() string {
+ return fmt.Sprintf("%s->%s (%s)",
+ t.Client, t.Server, t.Proto,
+ )
+}
+
+// Equal returns true if b == t.
+func (t FiveTuple) Equal(b FiveTuple) bool {
+ if t.Proto != b.Proto {
+ return false
+ }
+ if !t.Client.Equal(b.Client) {
+ return false
+ }
+ if !t.Server.Equal(b.Server) {
+ return false
+ }
+ return true
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/chandata.go b/vendor/github.com/pion/turn/v2/internal/proto/chandata.go
new file mode 100644
index 0000000..fb1295b
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/chandata.go
@@ -0,0 +1,140 @@
+package proto
+
+import (
+ "bytes"
+ "encoding/binary"
+ "errors"
+ "io"
+)
+
+// ChannelData represents The ChannelData Message.
+//
+// See RFC 5766 Section 11.4
+type ChannelData struct {
+ Data []byte // can be subslice of Raw
+ Length int // ignored while encoding, len(Data) is used
+ Number ChannelNumber
+ Raw []byte
+}
+
+// Equal returns true if b == c.
+func (c *ChannelData) Equal(b *ChannelData) bool {
+ if c == nil && b == nil {
+ return true
+ }
+ if c == nil || b == nil {
+ return false
+ }
+ if c.Number != b.Number {
+ return false
+ }
+ if len(c.Data) != len(b.Data) {
+ return false
+ }
+ return bytes.Equal(c.Data, b.Data)
+}
+
+// grow ensures that internal buffer will fit v more bytes and
+// increases it capacity if necessary.
+//
+// Similar to stun.Message.grow method.
+func (c *ChannelData) grow(v int) {
+ n := len(c.Raw) + v
+ for cap(c.Raw) < n {
+ c.Raw = append(c.Raw, 0)
+ }
+ c.Raw = c.Raw[:n]
+}
+
+// Reset resets Length, Data and Raw length.
+func (c *ChannelData) Reset() {
+ c.Raw = c.Raw[:0]
+ c.Length = 0
+ c.Data = c.Data[:0]
+}
+
+// Encode encodes ChannelData Message to Raw.
+func (c *ChannelData) Encode() {
+ c.Raw = c.Raw[:0]
+ c.WriteHeader()
+ c.Raw = append(c.Raw, c.Data...)
+ padded := nearestPaddedValueLength(len(c.Raw))
+ if bytesToAdd := padded - len(c.Raw); bytesToAdd > 0 {
+ for i := 0; i < bytesToAdd; i++ {
+ c.Raw = append(c.Raw, 0)
+ }
+ }
+}
+
+const padding = 4
+
+func nearestPaddedValueLength(l int) int {
+ n := padding * (l / padding)
+ if n < l {
+ n += padding
+ }
+ return n
+}
+
+// WriteHeader writes channel number and length.
+func (c *ChannelData) WriteHeader() {
+ if len(c.Raw) < channelDataHeaderSize {
+ // Making WriteHeader call valid even when c.Raw
+ // is nil or len(c.Raw) is less than needed for header.
+ c.grow(channelDataHeaderSize)
+ }
+ // Early bounds check to guarantee safety of writes below.
+ _ = c.Raw[:channelDataHeaderSize]
+ binary.BigEndian.PutUint16(c.Raw[:channelDataNumberSize], uint16(c.Number))
+ binary.BigEndian.PutUint16(c.Raw[channelDataNumberSize:channelDataHeaderSize],
+ uint16(len(c.Data)),
+ )
+}
+
+// ErrBadChannelDataLength means that channel data length is not equal
+// to actual data length.
+var ErrBadChannelDataLength = errors.New("channelData length != len(Data)")
+
+// Decode decodes The ChannelData Message from Raw.
+func (c *ChannelData) Decode() error {
+ buf := c.Raw
+ if len(buf) < channelDataHeaderSize {
+ return io.ErrUnexpectedEOF
+ }
+ num := binary.BigEndian.Uint16(buf[:channelDataNumberSize])
+ c.Number = ChannelNumber(num)
+ l := binary.BigEndian.Uint16(buf[channelDataNumberSize:channelDataHeaderSize])
+ c.Data = buf[channelDataHeaderSize:]
+ c.Length = int(l)
+ if !c.Number.Valid() {
+ return ErrInvalidChannelNumber
+ }
+ if int(l) < len(c.Data) {
+ c.Data = c.Data[:int(l)]
+ }
+ if int(l) > len(buf[channelDataHeaderSize:]) {
+ return ErrBadChannelDataLength
+ }
+ return nil
+}
+
+const (
+ channelDataLengthSize = 2
+ channelDataNumberSize = channelDataLengthSize
+ channelDataHeaderSize = channelDataLengthSize + channelDataNumberSize
+)
+
+// IsChannelData returns true if buf looks like the ChannelData Message.
+func IsChannelData(buf []byte) bool {
+ if len(buf) < channelDataHeaderSize {
+ return false
+ }
+
+ if int(binary.BigEndian.Uint16(buf[channelDataNumberSize:channelDataHeaderSize])) > len(buf[channelDataHeaderSize:]) {
+ return false
+ }
+
+ // Quick check for channel number.
+ num := binary.BigEndian.Uint16(buf[0:channelNumberSize])
+ return isChannelNumberValid(num)
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/chann.go b/vendor/github.com/pion/turn/v2/internal/proto/chann.go
new file mode 100644
index 0000000..d64ef73
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/chann.go
@@ -0,0 +1,67 @@
+package proto
+
+import (
+ "encoding/binary"
+ "errors"
+ "strconv"
+
+ "github.com/pion/stun"
+)
+
+// ChannelNumber represents CHANNEL-NUMBER attribute.
+//
+// The CHANNEL-NUMBER attribute contains the number of the channel.
+//
+// RFC 5766 Section 14.1
+type ChannelNumber uint16 // encoded as uint16
+
+func (n ChannelNumber) String() string { return strconv.Itoa(int(n)) }
+
+// 16 bits of uint + 16 bits of RFFU = 0.
+const channelNumberSize = 4
+
+// AddTo adds CHANNEL-NUMBER to message.
+func (n ChannelNumber) AddTo(m *stun.Message) error {
+ v := make([]byte, channelNumberSize)
+ binary.BigEndian.PutUint16(v[:2], uint16(n))
+ // v[2:4] are zeroes (RFFU = 0)
+ m.Add(stun.AttrChannelNumber, v)
+ return nil
+}
+
+// GetFrom decodes CHANNEL-NUMBER from message.
+func (n *ChannelNumber) GetFrom(m *stun.Message) error {
+ v, err := m.Get(stun.AttrChannelNumber)
+ if err != nil {
+ return err
+ }
+ if err = stun.CheckSize(stun.AttrChannelNumber, len(v), channelNumberSize); err != nil {
+ return err
+ }
+ _ = v[channelNumberSize-1] // asserting length
+ *n = ChannelNumber(binary.BigEndian.Uint16(v[:2]))
+ // v[2:4] is RFFU and equals to 0.
+ return nil
+}
+
+// See https://tools.ietf.org/html/rfc5766#section-11:
+//
+// 0x4000 through 0x7FFF: These values are the allowed channel
+// numbers (16,383 possible values).
+const (
+ MinChannelNumber = 0x4000
+ MaxChannelNumber = 0x7FFF
+)
+
+// ErrInvalidChannelNumber means that channel number is not valid as by RFC 5766 Section 11.
+var ErrInvalidChannelNumber = errors.New("channel number not in [0x4000, 0x7FFF]")
+
+// isChannelNumberValid returns true if c in [0x4000, 0x7FFF].
+func isChannelNumberValid(c uint16) bool {
+ return c >= MinChannelNumber && c <= MaxChannelNumber
+}
+
+// Valid returns true if channel number has correct value that complies RFC 5766 Section 11 range.
+func (n ChannelNumber) Valid() bool {
+ return isChannelNumberValid(uint16(n))
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/data.go b/vendor/github.com/pion/turn/v2/internal/proto/data.go
new file mode 100644
index 0000000..64243e0
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/data.go
@@ -0,0 +1,30 @@
+package proto
+
+import "github.com/pion/stun"
+
+// Data represents DATA attribute.
+//
+// The DATA attribute is present in all Send and Data indications. The
+// value portion of this attribute is variable length and consists of
+// the application data (that is, the data that would immediately follow
+// the UDP header if the data was been sent directly between the client
+// and the peer).
+//
+// RFC 5766 Section 14.4
+type Data []byte
+
+// AddTo adds DATA to message.
+func (d Data) AddTo(m *stun.Message) error {
+ m.Add(stun.AttrData, d)
+ return nil
+}
+
+// GetFrom decodes DATA from message.
+func (d *Data) GetFrom(m *stun.Message) error {
+ v, err := m.Get(stun.AttrData)
+ if err != nil {
+ return err
+ }
+ *d = v
+ return nil
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/dontfrag.go b/vendor/github.com/pion/turn/v2/internal/proto/dontfrag.go
new file mode 100644
index 0000000..eb4d8ca
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/dontfrag.go
@@ -0,0 +1,18 @@
+package proto
+
+import "github.com/pion/stun"
+
+// DontFragmentAttr represents DONT-FRAGMENT attribute.
+type DontFragmentAttr struct{}
+
+// AddTo adds DONT-FRAGMENT attribute to message.
+func (DontFragmentAttr) AddTo(m *stun.Message) error {
+ m.Add(stun.AttrDontFragment, nil)
+ return nil
+}
+
+// IsSet returns true if DONT-FRAGMENT attribute is set.
+func (DontFragmentAttr) IsSet(m *stun.Message) bool {
+ _, err := m.Get(stun.AttrDontFragment)
+ return err == nil
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/evenport.go b/vendor/github.com/pion/turn/v2/internal/proto/evenport.go
new file mode 100644
index 0000000..a5a3882
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/evenport.go
@@ -0,0 +1,55 @@
+package proto
+
+import "github.com/pion/stun"
+
+// EvenPort represents EVEN-PORT attribute.
+//
+// This attribute allows the client to request that the port in the
+// relayed transport address be even, and (optionally) that the server
+// reserve the next-higher port number.
+//
+// RFC 5766 Section 14.6
+type EvenPort struct {
+ // ReservePort means that the server is requested to reserve
+ // the next-higher port number (on the same IP address)
+ // for a subsequent allocation.
+ ReservePort bool
+}
+
+func (p EvenPort) String() string {
+ if p.ReservePort {
+ return "reserve: true"
+ }
+ return "reserve: false"
+}
+
+const (
+ evenPortSize = 1
+ firstBitSet = (1 << 8) - 1 // 0b100000000
+)
+
+// AddTo adds EVEN-PORT to message.
+func (p EvenPort) AddTo(m *stun.Message) error {
+ v := make([]byte, evenPortSize)
+ if p.ReservePort {
+ // Set first bit to 1.
+ v[0] = firstBitSet
+ }
+ m.Add(stun.AttrEvenPort, v)
+ return nil
+}
+
+// GetFrom decodes EVEN-PORT from message.
+func (p *EvenPort) GetFrom(m *stun.Message) error {
+ v, err := m.Get(stun.AttrEvenPort)
+ if err != nil {
+ return err
+ }
+ if err = stun.CheckSize(stun.AttrEvenPort, len(v), evenPortSize); err != nil {
+ return err
+ }
+ if v[0]&firstBitSet > 0 {
+ p.ReservePort = true
+ }
+ return nil
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/fuzz.go b/vendor/github.com/pion/turn/v2/internal/proto/fuzz.go
new file mode 100644
index 0000000..1a171fb
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/fuzz.go
@@ -0,0 +1,111 @@
+// +build gofuzz
+
+package proto
+
+import (
+ "fmt"
+
+ "github.com/pion/stun"
+)
+
+type attr interface {
+ stun.Getter
+ stun.Setter
+}
+
+type attrs []struct {
+ g attr
+ t stun.AttrType
+}
+
+func (a attrs) pick(v byte) struct {
+ g attr
+ t stun.AttrType
+} {
+ idx := int(v) % len(a)
+ return a[idx]
+}
+
+func FuzzSetters(data []byte) int {
+ var (
+ m1 = &stun.Message{
+ Raw: make([]byte, 0, 2048),
+ }
+ m2 = &stun.Message{
+ Raw: make([]byte, 0, 2048),
+ }
+ m3 = &stun.Message{
+ Raw: make([]byte, 0, 2048),
+ }
+ )
+ attributes := attrs{
+ {new(RequestedTransport), stun.AttrRequestedTransport},
+ {new(RelayedAddress), stun.AttrXORRelayedAddress},
+ {new(ChannelNumber), stun.AttrChannelNumber},
+ {new(Data), stun.AttrData},
+ {new(EvenPort), stun.AttrEvenPort},
+ {new(Lifetime), stun.AttrLifetime},
+ {new(ReservationToken), stun.AttrReservationToken},
+ }
+ var firstByte = byte(0)
+ if len(data) > 0 {
+ firstByte = data[0]
+ }
+ a := attributes.pick(firstByte)
+ value := data
+ if len(data) > 1 {
+ value = value[1:]
+ }
+ m1.WriteHeader()
+ m1.Add(a.t, value)
+ err := a.g.GetFrom(m1)
+ if err == stun.ErrAttributeNotFound {
+ fmt.Println("unexpected 404") // nolint
+ panic(err) // nolint
+ }
+ if err != nil {
+ return 1
+ }
+ m2.WriteHeader()
+ if err := a.g.AddTo(m2); err != nil {
+ fmt.Println("failed to add attribute to m2") // nolint
+ panic(err) // nolint
+ }
+ m3.WriteHeader()
+ v, err := m2.Get(a.t)
+ if err != nil {
+ panic(err) // nolint
+ }
+ m3.Add(a.t, v)
+
+ if !m2.Equal(m3) {
+ fmt.Println(m2, "not equal", m3) // nolint
+ panic("not equal") // nolint
+ }
+ return 1
+}
+
+var d = &ChannelData{}
+
+func FuzzChannelData(data []byte) int {
+ d.Reset()
+ if b := bin.Uint16(data[0:4]); b > 20000 {
+ bin.PutUint16(data[0:4], MinChannelNumber-1)
+ } else if b > 40000 {
+ bin.PutUint16(data[0:4], MinChannelNumber+(MaxChannelNumber-MinChannelNumber)%b)
+ }
+ d.Raw = append(d.Raw, data...)
+ if d.Decode() != nil {
+ return 0
+ }
+ d2 := &ChannelData{}
+ d.Encode()
+ if !d.Number.Valid() {
+ return 1
+ }
+ d2.Raw = d.Raw
+ if err := d2.Decode(); err != nil {
+ panic(err) //nolint
+ }
+ return 1
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/lifetime.go b/vendor/github.com/pion/turn/v2/internal/proto/lifetime.go
new file mode 100644
index 0000000..b781696
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/lifetime.go
@@ -0,0 +1,52 @@
+package proto
+
+import (
+ "encoding/binary"
+ "time"
+
+ "github.com/pion/stun"
+)
+
+// DefaultLifetime in RFC 5766 is 10 minutes.
+//
+// RFC 5766 Section 2.2
+const DefaultLifetime = time.Minute * 10
+
+// Lifetime represents LIFETIME attribute.
+//
+// The LIFETIME attribute represents the duration for which the server
+// will maintain an allocation in the absence of a refresh. The value
+// portion of this attribute is 4-bytes long and consists of a 32-bit
+// unsigned integral value representing the number of seconds remaining
+// until expiration.
+//
+// RFC 5766 Section 14.2
+type Lifetime struct {
+ time.Duration
+}
+
+// uint32 seconds
+const lifetimeSize = 4 // 4 bytes, 32 bits
+
+// AddTo adds LIFETIME to message.
+func (l Lifetime) AddTo(m *stun.Message) error {
+ v := make([]byte, lifetimeSize)
+ binary.BigEndian.PutUint32(v, uint32(l.Seconds()))
+ m.Add(stun.AttrLifetime, v)
+ return nil
+}
+
+// GetFrom decodes LIFETIME from message.
+func (l *Lifetime) GetFrom(m *stun.Message) error {
+ v, err := m.Get(stun.AttrLifetime)
+ if err != nil {
+ return err
+ }
+ if err = stun.CheckSize(stun.AttrLifetime, len(v), lifetimeSize); err != nil {
+ return err
+ }
+ _ = v[lifetimeSize-1] // asserting length
+ seconds := binary.BigEndian.Uint32(v)
+ l.Duration = time.Second * time.Duration(seconds)
+ return nil
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/peeraddr.go b/vendor/github.com/pion/turn/v2/internal/proto/peeraddr.go
new file mode 100644
index 0000000..b357b82
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/peeraddr.go
@@ -0,0 +1,42 @@
+package proto
+
+import (
+ "net"
+
+ "github.com/pion/stun"
+)
+
+// PeerAddress implements XOR-PEER-ADDRESS attribute.
+//
+// The XOR-PEER-ADDRESS specifies the address and port of the peer as
+// seen from the TURN server. (For example, the peer's server-reflexive
+// transport address if the peer is behind a NAT.)
+//
+// RFC 5766 Section 14.3
+type PeerAddress struct {
+ IP net.IP
+ Port int
+}
+
+func (a PeerAddress) String() string {
+ return stun.XORMappedAddress(a).String()
+}
+
+// AddTo adds XOR-PEER-ADDRESS to message.
+func (a PeerAddress) AddTo(m *stun.Message) error {
+ return stun.XORMappedAddress(a).AddToAs(m, stun.AttrXORPeerAddress)
+}
+
+// GetFrom decodes XOR-PEER-ADDRESS from message.
+func (a *PeerAddress) GetFrom(m *stun.Message) error {
+ return (*stun.XORMappedAddress)(a).GetFromAs(m, stun.AttrXORPeerAddress)
+}
+
+// XORPeerAddress implements XOR-PEER-ADDRESS attribute.
+//
+// The XOR-PEER-ADDRESS specifies the address and port of the peer as
+// seen from the TURN server. (For example, the peer's server-reflexive
+// transport address if the peer is behind a NAT.)
+//
+// RFC 5766 Section 14.3
+type XORPeerAddress = PeerAddress
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/proto.go b/vendor/github.com/pion/turn/v2/internal/proto/proto.go
new file mode 100644
index 0000000..4b08c76
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/proto.go
@@ -0,0 +1,30 @@
+// Package proto implements RFC 5766 Traversal Using Relays around NAT.
+//
+// Merged from gortc/turn v0.80.
+package proto
+
+import (
+ "github.com/pion/stun"
+)
+
+// Default ports for TURN from RFC 5766 Section 4.
+const (
+ // DefaultPort for TURN is same as STUN.
+ DefaultPort = stun.DefaultPort
+ // DefaultTLSPort is for TURN over TLS and is same as STUN.
+ DefaultTLSPort = stun.DefaultTLSPort
+)
+
+// CreatePermissionRequest is shorthand for create permission request type.
+func CreatePermissionRequest() stun.MessageType {
+ return stun.NewType(stun.MethodCreatePermission, stun.ClassRequest)
+}
+
+// AllocateRequest is shorthand for allocation request message type.
+func AllocateRequest() stun.MessageType { return stun.NewType(stun.MethodAllocate, stun.ClassRequest) }
+
+// SendIndication is shorthand for send indication message type.
+func SendIndication() stun.MessageType { return stun.NewType(stun.MethodSend, stun.ClassIndication) }
+
+// RefreshRequest is shorthand for refresh request message type.
+func RefreshRequest() stun.MessageType { return stun.NewType(stun.MethodRefresh, stun.ClassRequest) }
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/relayedaddr.go b/vendor/github.com/pion/turn/v2/internal/proto/relayedaddr.go
new file mode 100644
index 0000000..2169cb7
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/relayedaddr.go
@@ -0,0 +1,40 @@
+package proto
+
+import (
+ "net"
+
+ "github.com/pion/stun"
+)
+
+// RelayedAddress implements XOR-RELAYED-ADDRESS attribute.
+//
+// It specifies the address and port that the server allocated to the
+// client. It is encoded in the same way as XOR-MAPPED-ADDRESS.
+//
+// RFC 5766 Section 14.5
+type RelayedAddress struct {
+ IP net.IP
+ Port int
+}
+
+func (a RelayedAddress) String() string {
+ return stun.XORMappedAddress(a).String()
+}
+
+// AddTo adds XOR-PEER-ADDRESS to message.
+func (a RelayedAddress) AddTo(m *stun.Message) error {
+ return stun.XORMappedAddress(a).AddToAs(m, stun.AttrXORRelayedAddress)
+}
+
+// GetFrom decodes XOR-PEER-ADDRESS from message.
+func (a *RelayedAddress) GetFrom(m *stun.Message) error {
+ return (*stun.XORMappedAddress)(a).GetFromAs(m, stun.AttrXORRelayedAddress)
+}
+
+// XORRelayedAddress implements XOR-RELAYED-ADDRESS attribute.
+//
+// It specifies the address and port that the server allocated to the
+// client. It is encoded in the same way as XOR-MAPPED-ADDRESS.
+//
+// RFC 5766 Section 14.5
+type XORRelayedAddress = RelayedAddress
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/reqfamily.go b/vendor/github.com/pion/turn/v2/internal/proto/reqfamily.go
new file mode 100644
index 0000000..e83d6bb
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/reqfamily.go
@@ -0,0 +1,61 @@
+package proto
+
+import (
+ "errors"
+
+ "github.com/pion/stun"
+)
+
+// RequestedAddressFamily represents the REQUESTED-ADDRESS-FAMILY Attribute as
+// defined in RFC 6156 Section 4.1.1.
+type RequestedAddressFamily byte
+
+const requestedFamilySize = 4
+
+var errInvalidRequestedFamilyValue = errors.New("invalid value for requested family attribute")
+
+// GetFrom decodes REQUESTED-ADDRESS-FAMILY from message.
+func (f *RequestedAddressFamily) GetFrom(m *stun.Message) error {
+ v, err := m.Get(stun.AttrRequestedAddressFamily)
+ if err != nil {
+ return err
+ }
+ if err = stun.CheckSize(stun.AttrRequestedAddressFamily, len(v), requestedFamilySize); err != nil {
+ return err
+ }
+ switch v[0] {
+ case byte(RequestedFamilyIPv4), byte(RequestedFamilyIPv6):
+ *f = RequestedAddressFamily(v[0])
+ default:
+ return errInvalidRequestedFamilyValue
+ }
+ return nil
+}
+
+func (f RequestedAddressFamily) String() string {
+ switch f {
+ case RequestedFamilyIPv4:
+ return "IPv4"
+ case RequestedFamilyIPv6:
+ return "IPv6"
+ default:
+ return "unknown"
+ }
+}
+
+// AddTo adds REQUESTED-ADDRESS-FAMILY to message.
+func (f RequestedAddressFamily) AddTo(m *stun.Message) error {
+ v := make([]byte, requestedFamilySize)
+ v[0] = byte(f)
+ // b[1:4] is RFFU = 0.
+ // The RFFU field MUST be set to zero on transmission and MUST be
+ // ignored on reception. It is reserved for future uses.
+ m.Add(stun.AttrRequestedAddressFamily, v)
+ return nil
+}
+
+// Values for RequestedAddressFamily as defined in RFC 6156 Section 4.1.1.
+const (
+ RequestedFamilyIPv4 RequestedAddressFamily = 0x01
+ RequestedFamilyIPv6 RequestedAddressFamily = 0x02
+)
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/reqtrans.go b/vendor/github.com/pion/turn/v2/internal/proto/reqtrans.go
new file mode 100644
index 0000000..a4e4863
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/reqtrans.go
@@ -0,0 +1,65 @@
+package proto
+
+import (
+ "strconv"
+
+ "github.com/pion/stun"
+)
+
+// Protocol is IANA assigned protocol number.
+type Protocol byte
+
+const (
+ // ProtoUDP is IANA assigned protocol number for UDP.
+ ProtoUDP Protocol = 17
+)
+
+func (p Protocol) String() string {
+ switch p {
+ case ProtoUDP:
+ return "UDP"
+ default:
+ return strconv.Itoa(int(p))
+ }
+}
+
+// RequestedTransport represents REQUESTED-TRANSPORT attribute.
+//
+// This attribute is used by the client to request a specific transport
+// protocol for the allocated transport address. RFC 5766 only allows the use of
+// codepoint 17 (User Datagram Protocol).
+//
+// RFC 5766 Section 14.7
+type RequestedTransport struct {
+ Protocol Protocol
+}
+
+func (t RequestedTransport) String() string {
+ return "protocol: " + t.Protocol.String()
+}
+
+const requestedTransportSize = 4
+
+// AddTo adds REQUESTED-TRANSPORT to message.
+func (t RequestedTransport) AddTo(m *stun.Message) error {
+ v := make([]byte, requestedTransportSize)
+ v[0] = byte(t.Protocol)
+ // b[1:4] is RFFU = 0.
+ // The RFFU field MUST be set to zero on transmission and MUST be
+ // ignored on reception. It is reserved for future uses.
+ m.Add(stun.AttrRequestedTransport, v)
+ return nil
+}
+
+// GetFrom decodes REQUESTED-TRANSPORT from message.
+func (t *RequestedTransport) GetFrom(m *stun.Message) error {
+ v, err := m.Get(stun.AttrRequestedTransport)
+ if err != nil {
+ return err
+ }
+ if err = stun.CheckSize(stun.AttrRequestedTransport, len(v), requestedTransportSize); err != nil {
+ return err
+ }
+ t.Protocol = Protocol(v[0])
+ return nil
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/proto/rsrvtoken.go b/vendor/github.com/pion/turn/v2/internal/proto/rsrvtoken.go
new file mode 100644
index 0000000..6e2ed4d
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/proto/rsrvtoken.go
@@ -0,0 +1,39 @@
+package proto
+
+import "github.com/pion/stun"
+
+// ReservationToken represents RESERVATION-TOKEN attribute.
+//
+// The RESERVATION-TOKEN attribute contains a token that uniquely
+// identifies a relayed transport address being held in reserve by the
+// server. The server includes this attribute in a success response to
+// tell the client about the token, and the client includes this
+// attribute in a subsequent Allocate request to request the server use
+// that relayed transport address for the allocation.
+//
+// RFC 5766 Section 14.9
+type ReservationToken []byte
+
+const reservationTokenSize = 8 // 8 bytes
+
+// AddTo adds RESERVATION-TOKEN to message.
+func (t ReservationToken) AddTo(m *stun.Message) error {
+ if err := stun.CheckSize(stun.AttrReservationToken, len(t), reservationTokenSize); err != nil {
+ return err
+ }
+ m.Add(stun.AttrReservationToken, t)
+ return nil
+}
+
+// GetFrom decodes RESERVATION-TOKEN from message.
+func (t *ReservationToken) GetFrom(m *stun.Message) error {
+ v, err := m.Get(stun.AttrReservationToken)
+ if err != nil {
+ return err
+ }
+ if err = stun.CheckSize(stun.AttrReservationToken, len(v), reservationTokenSize); err != nil {
+ return err
+ }
+ *t = v
+ return nil
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/server/errors.go b/vendor/github.com/pion/turn/v2/internal/server/errors.go
new file mode 100644
index 0000000..13f8ee1
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/server/errors.go
@@ -0,0 +1,26 @@
+package server
+
+import "errors"
+
+var (
+ errFailedToGenerateNonce = errors.New("failed to generate nonce")
+ errFailedToSendError = errors.New("failed to send error message")
+ errDuplicatedNonce = errors.New("duplicated Nonce generated, discarding request")
+ errNoSuchUser = errors.New("no such user exists")
+ errUnexpectedClass = errors.New("unexpected class")
+ errUnexpectedMethod = errors.New("unexpected method")
+ errFailedToHandle = errors.New("failed to handle")
+ errUnhandledSTUNPacket = errors.New("unhandled STUN packet")
+ errUnableToHandleChannelData = errors.New("unable to handle ChannelData")
+ errFailedToCreateSTUNPacket = errors.New("failed to create stun message from packet")
+ errFailedToCreateChannelData = errors.New("failed to create channel data from packet")
+ errRelayAlreadyAllocatedForFiveTuple = errors.New("relay already allocated for 5-TUPLE")
+ errRequestedTransportMustBeUDP = errors.New("RequestedTransport must be UDP")
+ errNoDontFragmentSupport = errors.New("no support for DONT-FRAGMENT")
+ errRequestWithReservationTokenAndEvenPort = errors.New("Request must not contain RESERVATION-TOKEN and EVEN-PORT")
+ errNoAllocationFound = errors.New("no allocation found")
+ errNoPermission = errors.New("unable to handle send-indication, no permission added")
+ errShortWrite = errors.New("packet write smaller than packet")
+ errNoSuchChannelBind = errors.New("no such channel bind")
+ errFailedWriteSocket = errors.New("failed writing to socket")
+)
diff --git a/vendor/github.com/pion/turn/v2/internal/server/server.go b/vendor/github.com/pion/turn/v2/internal/server/server.go
new file mode 100644
index 0000000..27f3758
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/server/server.go
@@ -0,0 +1,109 @@
+// Package server implements the private API to implement a TURN server
+package server
+
+import (
+ "fmt"
+ "net"
+ "sync"
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/stun"
+ "github.com/pion/turn/v2/internal/allocation"
+ "github.com/pion/turn/v2/internal/proto"
+)
+
+// Request contains all the state needed to process a single incoming datagram
+type Request struct {
+ // Current Request State
+ Conn net.PacketConn
+ SrcAddr net.Addr
+ Buff []byte
+
+ // Server State
+ AllocationManager *allocation.Manager
+ Nonces *sync.Map
+
+ // User Configuration
+ AuthHandler func(username string, realm string, srcAddr net.Addr) (key []byte, ok bool)
+ Log logging.LeveledLogger
+ Realm string
+ ChannelBindTimeout time.Duration
+}
+
+// HandleRequest processes the give Request
+func HandleRequest(r Request) error {
+ r.Log.Debugf("received %d bytes of udp from %s on %s", len(r.Buff), r.SrcAddr.String(), r.Conn.LocalAddr().String())
+
+ if proto.IsChannelData(r.Buff) {
+ return handleDataPacket(r)
+ }
+
+ return handleTURNPacket(r)
+}
+
+func handleDataPacket(r Request) error {
+ r.Log.Debugf("received DataPacket from %s", r.SrcAddr.String())
+ c := proto.ChannelData{Raw: r.Buff}
+ if err := c.Decode(); err != nil {
+ return fmt.Errorf("%w: %v", errFailedToCreateChannelData, err)
+ }
+
+ err := handleChannelData(r, &c)
+ if err != nil {
+ err = fmt.Errorf("%w from %v: %v", errUnableToHandleChannelData, r.SrcAddr, err)
+ }
+
+ return err
+}
+
+func handleTURNPacket(r Request) error {
+ r.Log.Debug("handleTURNPacket")
+ m := &stun.Message{Raw: append([]byte{}, r.Buff...)}
+ if err := m.Decode(); err != nil {
+ return fmt.Errorf("%w: %v", errFailedToCreateSTUNPacket, err)
+ }
+
+ h, err := getMessageHandler(m.Type.Class, m.Type.Method)
+ if err != nil {
+ return fmt.Errorf("%w %v-%v from %v: %v", errUnhandledSTUNPacket, m.Type.Method, m.Type.Class, r.SrcAddr, err)
+ }
+
+ err = h(r, m)
+ if err != nil {
+ return fmt.Errorf("%w %v-%v from %v: %v", errFailedToHandle, m.Type.Method, m.Type.Class, r.SrcAddr, err)
+ }
+
+ return nil
+}
+
+func getMessageHandler(class stun.MessageClass, method stun.Method) (func(r Request, m *stun.Message) error, error) {
+ switch class {
+ case stun.ClassIndication:
+ switch method {
+ case stun.MethodSend:
+ return handleSendIndication, nil
+ default:
+ return nil, fmt.Errorf("%w: %s", errUnexpectedMethod, method)
+ }
+
+ case stun.ClassRequest:
+ switch method {
+ case stun.MethodAllocate:
+ return handleAllocateRequest, nil
+ case stun.MethodRefresh:
+ return handleRefreshRequest, nil
+ case stun.MethodCreatePermission:
+ return handleCreatePermissionRequest, nil
+ case stun.MethodChannelBind:
+ return handleChannelBindRequest, nil
+ case stun.MethodBinding:
+ return handleBindingRequest, nil
+ default:
+ return nil, fmt.Errorf("%w: %s", errUnexpectedMethod, method)
+ }
+
+ default:
+ return nil, fmt.Errorf("%w: %s", errUnexpectedClass, class)
+ }
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/server/stun.go b/vendor/github.com/pion/turn/v2/internal/server/stun.go
new file mode 100644
index 0000000..673e99f
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/server/stun.go
@@ -0,0 +1,22 @@
+package server
+
+import (
+ "github.com/pion/stun"
+ "github.com/pion/turn/v2/internal/ipnet"
+)
+
+func handleBindingRequest(r Request, m *stun.Message) error {
+ r.Log.Debugf("received BindingRequest from %s", r.SrcAddr.String())
+
+ ip, port, err := ipnet.AddrIPPort(r.SrcAddr)
+ if err != nil {
+ return err
+ }
+
+ attrs := buildMsg(m.TransactionID, stun.BindingSuccess, &stun.XORMappedAddress{
+ IP: ip,
+ Port: port,
+ }, stun.Fingerprint)
+
+ return buildAndSend(r.Conn, r.SrcAddr, attrs...)
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/server/turn.go b/vendor/github.com/pion/turn/v2/internal/server/turn.go
new file mode 100644
index 0000000..cbac09c
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/server/turn.go
@@ -0,0 +1,352 @@
+package server
+
+import (
+ "fmt"
+ "net"
+
+ "github.com/pion/stun"
+ "github.com/pion/turn/v2/internal/allocation"
+ "github.com/pion/turn/v2/internal/ipnet"
+ "github.com/pion/turn/v2/internal/proto"
+)
+
+// // https://tools.ietf.org/html/rfc5766#section-6.2
+func handleAllocateRequest(r Request, m *stun.Message) error {
+ r.Log.Debugf("received AllocateRequest from %s", r.SrcAddr.String())
+
+ // 1. The server MUST require that the request be authenticated. This
+ // authentication MUST be done using the long-term credential
+ // mechanism of [https://tools.ietf.org/html/rfc5389#section-10.2.2]
+ // unless the client and server agree to use another mechanism through
+ // some procedure outside the scope of this document.
+ messageIntegrity, hasAuth, err := authenticateRequest(r, m, stun.MethodAllocate)
+ if !hasAuth {
+ return err
+ }
+
+ fiveTuple := &allocation.FiveTuple{
+ SrcAddr: r.SrcAddr,
+ DstAddr: r.Conn.LocalAddr(),
+ Protocol: allocation.UDP,
+ }
+ requestedPort := 0
+ reservationToken := ""
+
+ badRequestMsg := buildMsg(m.TransactionID, stun.NewType(stun.MethodAllocate, stun.ClassErrorResponse), &stun.ErrorCodeAttribute{Code: stun.CodeBadRequest})
+ insufficentCapacityMsg := buildMsg(m.TransactionID, stun.NewType(stun.MethodAllocate, stun.ClassErrorResponse), &stun.ErrorCodeAttribute{Code: stun.CodeInsufficientCapacity})
+
+ // 2. The server checks if the 5-tuple is currently in use by an
+ // existing allocation. If yes, the server rejects the request with
+ // a 437 (Allocation Mismatch) error.
+ if alloc := r.AllocationManager.GetAllocation(fiveTuple); alloc != nil {
+ msg := buildMsg(m.TransactionID, stun.NewType(stun.MethodAllocate, stun.ClassErrorResponse), &stun.ErrorCodeAttribute{Code: stun.CodeAllocMismatch})
+ return buildAndSendErr(r.Conn, r.SrcAddr, errRelayAlreadyAllocatedForFiveTuple, msg...)
+ }
+
+ // 3. The server checks if the request contains a REQUESTED-TRANSPORT
+ // attribute. If the REQUESTED-TRANSPORT attribute is not included
+ // or is malformed, the server rejects the request with a 400 (Bad
+ // Request) error. Otherwise, if the attribute is included but
+ // specifies a protocol other that UDP, the server rejects the
+ // request with a 442 (Unsupported Transport Protocol) error.
+ var requestedTransport proto.RequestedTransport
+ if err = requestedTransport.GetFrom(m); err != nil {
+ return buildAndSendErr(r.Conn, r.SrcAddr, err, badRequestMsg...)
+ } else if requestedTransport.Protocol != proto.ProtoUDP {
+ msg := buildMsg(m.TransactionID, stun.NewType(stun.MethodAllocate, stun.ClassErrorResponse), &stun.ErrorCodeAttribute{Code: stun.CodeUnsupportedTransProto})
+ return buildAndSendErr(r.Conn, r.SrcAddr, errRequestedTransportMustBeUDP, msg...)
+ }
+
+ // 4. The request may contain a DONT-FRAGMENT attribute. If it does,
+ // but the server does not support sending UDP datagrams with the DF
+ // bit set to 1 (see Section 12), then the server treats the DONT-
+ // FRAGMENT attribute in the Allocate request as an unknown
+ // comprehension-required attribute.
+ if m.Contains(stun.AttrDontFragment) {
+ msg := buildMsg(m.TransactionID, stun.NewType(stun.MethodAllocate, stun.ClassErrorResponse), &stun.ErrorCodeAttribute{Code: stun.CodeUnknownAttribute}, &stun.UnknownAttributes{stun.AttrDontFragment})
+ return buildAndSendErr(r.Conn, r.SrcAddr, errNoDontFragmentSupport, msg...)
+ }
+
+ // 5. The server checks if the request contains a RESERVATION-TOKEN
+ // attribute. If yes, and the request also contains an EVEN-PORT
+ // attribute, then the server rejects the request with a 400 (Bad
+ // Request) error. Otherwise, it checks to see if the token is
+ // valid (i.e., the token is in range and has not expired and the
+ // corresponding relayed transport address is still available). If
+ // the token is not valid for some reason, the server rejects the
+ // request with a 508 (Insufficient Capacity) error.
+ var reservationTokenAttr proto.ReservationToken
+ if err = reservationTokenAttr.GetFrom(m); err == nil {
+ var evenPort proto.EvenPort
+ if err = evenPort.GetFrom(m); err == nil {
+ return buildAndSendErr(r.Conn, r.SrcAddr, errRequestWithReservationTokenAndEvenPort, badRequestMsg...)
+ }
+ }
+
+ // 6. The server checks if the request contains an EVEN-PORT attribute.
+ // If yes, then the server checks that it can satisfy the request
+ // (i.e., can allocate a relayed transport address as described
+ // below). If the server cannot satisfy the request, then the
+ // server rejects the request with a 508 (Insufficient Capacity)
+ // error.
+ var evenPort proto.EvenPort
+ if err = evenPort.GetFrom(m); err == nil {
+ randomPort := 0
+ randomPort, err = r.AllocationManager.GetRandomEvenPort()
+ if err != nil {
+ return buildAndSendErr(r.Conn, r.SrcAddr, err, insufficentCapacityMsg...)
+ }
+ requestedPort = randomPort
+ reservationToken = randSeq(8)
+ }
+
+ // 7. At any point, the server MAY choose to reject the request with a
+ // 486 (Allocation Quota Reached) error if it feels the client is
+ // trying to exceed some locally defined allocation quota. The
+ // server is free to define this allocation quota any way it wishes,
+ // but SHOULD define it based on the username used to authenticate
+ // the request, and not on the client's transport address.
+
+ // 8. Also at any point, the server MAY choose to reject the request
+ // with a 300 (Try Alternate) error if it wishes to redirect the
+ // client to a different server. The use of this error code and
+ // attribute follow the specification in [RFC5389].
+ lifetimeDuration := allocationLifeTime(m)
+ a, err := r.AllocationManager.CreateAllocation(
+ fiveTuple,
+ r.Conn,
+ requestedPort,
+ lifetimeDuration)
+ if err != nil {
+ return buildAndSendErr(r.Conn, r.SrcAddr, err, insufficentCapacityMsg...)
+ }
+
+ // Once the allocation is created, the server replies with a success
+ // response. The success response contains:
+ // * An XOR-RELAYED-ADDRESS attribute containing the relayed transport
+ // address.
+ // * A LIFETIME attribute containing the current value of the time-to-
+ // expiry timer.
+ // * A RESERVATION-TOKEN attribute (if a second relayed transport
+ // address was reserved).
+ // * An XOR-MAPPED-ADDRESS attribute containing the client's IP address
+ // and port (from the 5-tuple).
+
+ srcIP, srcPort, err := ipnet.AddrIPPort(r.SrcAddr)
+ if err != nil {
+ return buildAndSendErr(r.Conn, r.SrcAddr, err, badRequestMsg...)
+ }
+
+ relayIP, relayPort, err := ipnet.AddrIPPort(a.RelayAddr)
+ if err != nil {
+ return buildAndSendErr(r.Conn, r.SrcAddr, err, badRequestMsg...)
+ }
+
+ responseAttrs := []stun.Setter{
+ &proto.RelayedAddress{
+ IP: relayIP,
+ Port: relayPort,
+ },
+ &proto.Lifetime{
+ Duration: lifetimeDuration,
+ },
+ &stun.XORMappedAddress{
+ IP: srcIP,
+ Port: srcPort,
+ },
+ }
+
+ if reservationToken != "" {
+ r.AllocationManager.CreateReservation(reservationToken, relayPort)
+ responseAttrs = append(responseAttrs, proto.ReservationToken([]byte(reservationToken)))
+ }
+
+ msg := buildMsg(m.TransactionID, stun.NewType(stun.MethodAllocate, stun.ClassSuccessResponse), append(responseAttrs, messageIntegrity)...)
+ return buildAndSend(r.Conn, r.SrcAddr, msg...)
+}
+
+func handleRefreshRequest(r Request, m *stun.Message) error {
+ r.Log.Debugf("received RefreshRequest from %s", r.SrcAddr.String())
+
+ messageIntegrity, hasAuth, err := authenticateRequest(r, m, stun.MethodRefresh)
+ if !hasAuth {
+ return err
+ }
+
+ lifetimeDuration := allocationLifeTime(m)
+ fiveTuple := &allocation.FiveTuple{
+ SrcAddr: r.SrcAddr,
+ DstAddr: r.Conn.LocalAddr(),
+ Protocol: allocation.UDP,
+ }
+
+ if lifetimeDuration != 0 {
+ a := r.AllocationManager.GetAllocation(fiveTuple)
+
+ if a == nil {
+ return fmt.Errorf("%w %v:%v", errNoAllocationFound, r.SrcAddr, r.Conn.LocalAddr())
+ }
+ a.Refresh(lifetimeDuration)
+ } else {
+ r.AllocationManager.DeleteAllocation(fiveTuple)
+ }
+
+ return buildAndSend(r.Conn, r.SrcAddr, buildMsg(m.TransactionID, stun.NewType(stun.MethodRefresh, stun.ClassSuccessResponse), []stun.Setter{
+ &proto.Lifetime{
+ Duration: lifetimeDuration,
+ },
+ messageIntegrity,
+ }...)...)
+}
+
+func handleCreatePermissionRequest(r Request, m *stun.Message) error {
+ r.Log.Debugf("received CreatePermission from %s", r.SrcAddr.String())
+
+ a := r.AllocationManager.GetAllocation(&allocation.FiveTuple{
+ SrcAddr: r.SrcAddr,
+ DstAddr: r.Conn.LocalAddr(),
+ Protocol: allocation.UDP,
+ })
+ if a == nil {
+ return fmt.Errorf("%w %v:%v", errNoAllocationFound, r.SrcAddr, r.Conn.LocalAddr())
+ }
+
+ messageIntegrity, hasAuth, err := authenticateRequest(r, m, stun.MethodCreatePermission)
+ if !hasAuth {
+ return err
+ }
+
+ addCount := 0
+
+ if err := m.ForEach(stun.AttrXORPeerAddress, func(m *stun.Message) error {
+ var peerAddress proto.PeerAddress
+ if err := peerAddress.GetFrom(m); err != nil {
+ return err
+ }
+
+ r.Log.Debugf("adding permission for %s", fmt.Sprintf("%s:%d",
+ peerAddress.IP.String(), peerAddress.Port))
+ a.AddPermission(allocation.NewPermission(
+ &net.UDPAddr{
+ IP: peerAddress.IP,
+ Port: peerAddress.Port,
+ },
+ r.Log,
+ ))
+ addCount++
+ return nil
+ }); err != nil {
+ addCount = 0
+ }
+
+ respClass := stun.ClassSuccessResponse
+ if addCount == 0 {
+ respClass = stun.ClassErrorResponse
+ }
+
+ return buildAndSend(r.Conn, r.SrcAddr, buildMsg(m.TransactionID, stun.NewType(stun.MethodCreatePermission, respClass), []stun.Setter{messageIntegrity}...)...)
+}
+
+func handleSendIndication(r Request, m *stun.Message) error {
+ r.Log.Debugf("received SendIndication from %s", r.SrcAddr.String())
+ a := r.AllocationManager.GetAllocation(&allocation.FiveTuple{
+ SrcAddr: r.SrcAddr,
+ DstAddr: r.Conn.LocalAddr(),
+ Protocol: allocation.UDP,
+ })
+ if a == nil {
+ return fmt.Errorf("%w %v:%v", errNoAllocationFound, r.SrcAddr, r.Conn.LocalAddr())
+ }
+
+ dataAttr := proto.Data{}
+ if err := dataAttr.GetFrom(m); err != nil {
+ return err
+ }
+
+ peerAddress := proto.PeerAddress{}
+ if err := peerAddress.GetFrom(m); err != nil {
+ return err
+ }
+
+ msgDst := &net.UDPAddr{IP: peerAddress.IP, Port: peerAddress.Port}
+ if perm := a.GetPermission(msgDst); perm == nil {
+ return fmt.Errorf("%w: %v", errNoPermission, msgDst)
+ }
+
+ l, err := a.RelaySocket.WriteTo(dataAttr, msgDst)
+ if l != len(dataAttr) {
+ return fmt.Errorf("%w %d != %d (expected) err: %v", errShortWrite, l, len(dataAttr), err)
+ }
+ return err
+}
+
+func handleChannelBindRequest(r Request, m *stun.Message) error {
+ r.Log.Debugf("received ChannelBindRequest from %s", r.SrcAddr.String())
+
+ a := r.AllocationManager.GetAllocation(&allocation.FiveTuple{
+ SrcAddr: r.SrcAddr,
+ DstAddr: r.Conn.LocalAddr(),
+ Protocol: allocation.UDP,
+ })
+ if a == nil {
+ return fmt.Errorf("%w %v:%v", errNoAllocationFound, r.SrcAddr, r.Conn.LocalAddr())
+ }
+
+ badRequestMsg := buildMsg(m.TransactionID, stun.NewType(stun.MethodChannelBind, stun.ClassErrorResponse), &stun.ErrorCodeAttribute{Code: stun.CodeBadRequest})
+
+ messageIntegrity, hasAuth, err := authenticateRequest(r, m, stun.MethodChannelBind)
+ if !hasAuth {
+ return err
+ }
+
+ var channel proto.ChannelNumber
+ if err = channel.GetFrom(m); err != nil {
+ return buildAndSendErr(r.Conn, r.SrcAddr, err, badRequestMsg...)
+ }
+
+ peerAddr := proto.PeerAddress{}
+ if err = peerAddr.GetFrom(m); err != nil {
+ return buildAndSendErr(r.Conn, r.SrcAddr, err, badRequestMsg...)
+ }
+
+ r.Log.Debugf("binding channel %d to %s",
+ channel,
+ fmt.Sprintf("%s:%d", peerAddr.IP.String(), peerAddr.Port))
+ err = a.AddChannelBind(allocation.NewChannelBind(
+ channel,
+ &net.UDPAddr{IP: peerAddr.IP, Port: peerAddr.Port},
+ r.Log,
+ ), r.ChannelBindTimeout)
+ if err != nil {
+ return buildAndSendErr(r.Conn, r.SrcAddr, err, badRequestMsg...)
+ }
+
+ return buildAndSend(r.Conn, r.SrcAddr, buildMsg(m.TransactionID, stun.NewType(stun.MethodChannelBind, stun.ClassSuccessResponse), []stun.Setter{messageIntegrity}...)...)
+}
+
+func handleChannelData(r Request, c *proto.ChannelData) error {
+ r.Log.Debugf("received ChannelData from %s", r.SrcAddr.String())
+
+ a := r.AllocationManager.GetAllocation(&allocation.FiveTuple{
+ SrcAddr: r.SrcAddr,
+ DstAddr: r.Conn.LocalAddr(),
+ Protocol: allocation.UDP,
+ })
+ if a == nil {
+ return fmt.Errorf("%w %v:%v", errNoAllocationFound, r.SrcAddr, r.Conn.LocalAddr())
+ }
+
+ channel := a.GetChannelByNumber(c.Number)
+ if channel == nil {
+ return fmt.Errorf("%w %x", errNoSuchChannelBind, uint16(c.Number))
+ }
+
+ l, err := a.RelaySocket.WriteTo(c.Data, channel.Peer)
+ if err != nil {
+ return fmt.Errorf("%w: %s", errFailedWriteSocket, err.Error())
+ } else if l != len(c.Data) {
+ return fmt.Errorf("%w %d != %d (expected)", errShortWrite, l, len(c.Data))
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/pion/turn/v2/internal/server/util.go b/vendor/github.com/pion/turn/v2/internal/server/util.go
new file mode 100644
index 0000000..c6baffb
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/internal/server/util.go
@@ -0,0 +1,133 @@
+package server
+
+import (
+ "crypto/md5" //nolint:gosec,gci
+ "fmt"
+ "io"
+ "math/rand"
+ "net"
+ "strconv"
+ "time"
+
+ "github.com/pion/stun"
+ "github.com/pion/turn/v2/internal/proto"
+)
+
+const (
+ maximumAllocationLifetime = time.Hour // https://tools.ietf.org/html/rfc5766#section-6.2 defines 3600 seconds recommendation
+ nonceLifetime = time.Hour // https://tools.ietf.org/html/rfc5766#section-4
+
+)
+
+func randSeq(n int) string {
+ letters := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
+ b := make([]rune, n)
+ for i := range b {
+ b[i] = letters[rand.Intn(len(letters))] //nolint:gosec
+ }
+ return string(b)
+}
+
+func buildNonce() (string, error) {
+ /* #nosec */
+ h := md5.New()
+ if _, err := io.WriteString(h, strconv.FormatInt(time.Now().Unix(), 10)); err != nil {
+ return "", fmt.Errorf("%w: %v", errFailedToGenerateNonce, err)
+ }
+ if _, err := io.WriteString(h, strconv.FormatInt(rand.Int63(), 10)); err != nil { //nolint:gosec
+ return "", fmt.Errorf("%w: %v", errFailedToGenerateNonce, err)
+ }
+ return fmt.Sprintf("%x", h.Sum(nil)), nil
+}
+
+func buildAndSend(conn net.PacketConn, dst net.Addr, attrs ...stun.Setter) error {
+ msg, err := stun.Build(attrs...)
+ if err != nil {
+ return err
+ }
+ _, err = conn.WriteTo(msg.Raw, dst)
+ return err
+}
+
+// Send a STUN packet and return the original error to the caller
+func buildAndSendErr(conn net.PacketConn, dst net.Addr, err error, attrs ...stun.Setter) error {
+ if sendErr := buildAndSend(conn, dst, attrs...); sendErr != nil {
+ err = fmt.Errorf("%w %v %v", errFailedToSendError, sendErr, err)
+ }
+ return err
+}
+
+func buildMsg(transactionID [stun.TransactionIDSize]byte, msgType stun.MessageType, additional ...stun.Setter) []stun.Setter {
+ return append([]stun.Setter{&stun.Message{TransactionID: transactionID}, msgType}, additional...)
+}
+
+func authenticateRequest(r Request, m *stun.Message, callingMethod stun.Method) (stun.MessageIntegrity, bool, error) {
+ respondWithNonce := func(responseCode stun.ErrorCode) (stun.MessageIntegrity, bool, error) {
+ nonce, err := buildNonce()
+ if err != nil {
+ return nil, false, err
+ }
+
+ // Nonce has already been taken
+ if _, keyCollision := r.Nonces.LoadOrStore(nonce, time.Now()); keyCollision {
+ return nil, false, errDuplicatedNonce
+ }
+
+ return nil, false, buildAndSend(r.Conn, r.SrcAddr, buildMsg(m.TransactionID,
+ stun.NewType(callingMethod, stun.ClassErrorResponse),
+ &stun.ErrorCodeAttribute{Code: responseCode},
+ stun.NewNonce(nonce),
+ stun.NewRealm(r.Realm),
+ )...)
+ }
+
+ if !m.Contains(stun.AttrMessageIntegrity) {
+ return respondWithNonce(stun.CodeUnauthorized)
+ }
+
+ nonceAttr := &stun.Nonce{}
+ usernameAttr := &stun.Username{}
+ realmAttr := &stun.Realm{}
+ badRequestMsg := buildMsg(m.TransactionID, stun.NewType(callingMethod, stun.ClassErrorResponse), &stun.ErrorCodeAttribute{Code: stun.CodeBadRequest})
+
+ if err := nonceAttr.GetFrom(m); err != nil {
+ return nil, false, buildAndSendErr(r.Conn, r.SrcAddr, err, badRequestMsg...)
+ }
+
+ // Assert Nonce exists and is not expired
+ nonceCreationTime, ok := r.Nonces.Load(string(*nonceAttr))
+ if !ok || time.Since(nonceCreationTime.(time.Time)) >= nonceLifetime {
+ r.Nonces.Delete(nonceAttr)
+ return respondWithNonce(stun.CodeStaleNonce)
+ }
+
+ if err := realmAttr.GetFrom(m); err != nil {
+ return nil, false, buildAndSendErr(r.Conn, r.SrcAddr, err, badRequestMsg...)
+ } else if err := usernameAttr.GetFrom(m); err != nil {
+ return nil, false, buildAndSendErr(r.Conn, r.SrcAddr, err, badRequestMsg...)
+ }
+
+ ourKey, ok := r.AuthHandler(usernameAttr.String(), realmAttr.String(), r.SrcAddr)
+ if !ok {
+ return nil, false, buildAndSendErr(r.Conn, r.SrcAddr, fmt.Errorf("%w %s", errNoSuchUser, usernameAttr.String()), badRequestMsg...)
+ }
+
+ if err := stun.MessageIntegrity(ourKey).Check(m); err != nil {
+ return nil, false, buildAndSendErr(r.Conn, r.SrcAddr, err, badRequestMsg...)
+ }
+
+ return stun.MessageIntegrity(ourKey), true, nil
+}
+
+func allocationLifeTime(m *stun.Message) time.Duration {
+ lifetimeDuration := proto.DefaultLifetime
+
+ var lifetime proto.Lifetime
+ if err := lifetime.GetFrom(m); err == nil {
+ if lifetime.Duration < maximumAllocationLifetime {
+ lifetimeDuration = lifetime.Duration
+ }
+ }
+
+ return lifetimeDuration
+}
diff --git a/vendor/github.com/pion/turn/v2/lt_cred.go b/vendor/github.com/pion/turn/v2/lt_cred.go
new file mode 100644
index 0000000..07520b1
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/lt_cred.go
@@ -0,0 +1,56 @@
+package turn
+
+import ( //nolint:gci
+ "crypto/hmac"
+ "crypto/sha1" //nolint:gosec,gci
+ "encoding/base64"
+ "net"
+ "strconv"
+ "time"
+
+ "github.com/pion/logging"
+)
+
+// GenerateCredentials can be used to create credentials valid for [duration] time
+func GenerateLongTermCredentials(sharedSecret string, duration time.Duration) (string, string, error) {
+ t := time.Now().Add(duration).Unix()
+ username := strconv.FormatInt(t, 10)
+ password, err := longTermCredentials(username, sharedSecret)
+ return username, password, err
+}
+
+func longTermCredentials(username string, sharedSecret string) (string, error) {
+ mac := hmac.New(sha1.New, []byte(sharedSecret))
+ _, err := mac.Write([]byte(username))
+ if err != nil {
+ return "", err // Not sure if this will ever happen
+ }
+ password := mac.Sum(nil)
+ return base64.StdEncoding.EncodeToString(password), nil
+}
+
+// NewAuthHandler returns a turn.AuthAuthHandler used with Long Term (or Time Windowed) Credentials.
+// https://tools.ietf.org/search/rfc5389#section-10.2
+func NewLongTermAuthHandler(sharedSecret string, l logging.LeveledLogger) AuthHandler {
+ if l == nil {
+ l = logging.NewDefaultLoggerFactory().NewLogger("turn")
+ }
+ return func(username, realm string, srcAddr net.Addr) (key []byte, ok bool) {
+ l.Tracef("Authentication username=%q realm=%q srcAddr=%v\n", username, realm, srcAddr)
+ t, err := strconv.Atoi(username)
+ if err != nil {
+ l.Errorf("Invalid time-windowed username %q", username)
+ return nil, false
+ }
+ if int64(t) < time.Now().Unix() {
+ l.Errorf("Expired time-windowed username %q", username)
+ return nil, false
+ }
+ password, err := longTermCredentials(username, sharedSecret)
+ if err != nil {
+ l.Error(err.Error())
+ return nil, false
+ }
+ return GenerateAuthKey(username, realm, password), true
+ }
+}
diff --git a/vendor/github.com/pion/turn/v2/relay_address_generator_none.go b/vendor/github.com/pion/turn/v2/relay_address_generator_none.go
new file mode 100644
index 0000000..6fab061
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/relay_address_generator_none.go
@@ -0,0 +1,45 @@
+package turn
+
+import (
+ "net"
+ "strconv"
+
+ "github.com/pion/transport/vnet"
+)
+
+// RelayAddressGeneratorNone returns the listener with no modifications
+type RelayAddressGeneratorNone struct {
+ // Address is passed to Listen/ListenPacket when creating the Relay
+ Address string
+
+ Net *vnet.Net
+}
+
+// Validate is caled on server startup and confirms the RelayAddressGenerator is properly configured
+func (r *RelayAddressGeneratorNone) Validate() error {
+ if r.Net == nil {
+ r.Net = vnet.NewNet(nil)
+ }
+
+ switch {
+ case r.Address == "":
+ return errListeningAddressInvalid
+ default:
+ return nil
+ }
+}
+
+// AllocatePacketConn generates a new PacketConn to receive traffic on and the IP/Port to populate the allocation response with
+func (r *RelayAddressGeneratorNone) AllocatePacketConn(network string, requestedPort int) (net.PacketConn, net.Addr, error) {
+ conn, err := r.Net.ListenPacket(network, r.Address+":"+strconv.Itoa(requestedPort))
+ if err != nil {
+ return nil, nil, err
+ }
+
+ return conn, conn.LocalAddr(), nil
+}
+
+// AllocateConn generates a new Conn to receive traffic on and the IP/Port to populate the allocation response with
+func (r *RelayAddressGeneratorNone) AllocateConn(network string, requestedPort int) (net.Conn, net.Addr, error) {
+ return nil, nil, errTODO
+}
diff --git a/vendor/github.com/pion/turn/v2/relay_address_generator_range.go b/vendor/github.com/pion/turn/v2/relay_address_generator_range.go
new file mode 100644
index 0000000..9f95429
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/relay_address_generator_range.go
@@ -0,0 +1,92 @@
+package turn
+
+import (
+ "fmt"
+ "net"
+
+ "github.com/pion/randutil"
+ "github.com/pion/transport/vnet"
+)
+
+// RelayAddressGeneratorPortRange can be used to only allocate connections inside a defined port range.
+// Similar to the RelayAddressGeneratorStatic a static ip address can be set.
+type RelayAddressGeneratorPortRange struct {
+ // RelayAddress is the IP returned to the user when the relay is created
+ RelayAddress net.IP
+
+ // MinPort the minimum port to allocate
+ MinPort uint16
+ // MaxPort the maximum (inclusive) port to allocate
+ MaxPort uint16
+
+ // MaxRetries the amount of tries to allocate a random port in the defined range
+ MaxRetries int
+
+ // Rand the random source of numbers
+ Rand randutil.MathRandomGenerator
+
+ // Address is passed to Listen/ListenPacket when creating the Relay
+ Address string
+
+ Net *vnet.Net
+}
+
+// Validate is called on server startup and confirms the RelayAddressGenerator is properly configured
+func (r *RelayAddressGeneratorPortRange) Validate() error {
+ if r.Net == nil {
+ r.Net = vnet.NewNet(nil)
+ }
+
+ if r.Rand == nil {
+ r.Rand = randutil.NewMathRandomGenerator()
+ }
+
+ if r.MaxRetries == 0 {
+ r.MaxRetries = 10
+ }
+
+ switch {
+ case r.MinPort == 0:
+ return errMinPortNotZero
+ case r.MaxPort == 0:
+ return errMaxPortNotZero
+ case r.RelayAddress == nil:
+ return errRelayAddressInvalid
+ case r.Address == "":
+ return errListeningAddressInvalid
+ default:
+ return nil
+ }
+}
+
+// AllocatePacketConn generates a new PacketConn to receive traffic on and the IP/Port to populate the allocation response with
+func (r *RelayAddressGeneratorPortRange) AllocatePacketConn(network string, requestedPort int) (net.PacketConn, net.Addr, error) {
+ if requestedPort != 0 {
+ conn, err := r.Net.ListenPacket(network, fmt.Sprintf("%s:%d", r.Address, requestedPort))
+ if err != nil {
+ return nil, nil, err
+ }
+ relayAddr := conn.LocalAddr().(*net.UDPAddr)
+ relayAddr.IP = r.RelayAddress
+ return conn, relayAddr, nil
+ }
+
+ for try := 0; try < r.MaxRetries; try++ {
+ port := r.MinPort + uint16(r.Rand.Intn(int((r.MaxPort+1)-r.MinPort)))
+ conn, err := r.Net.ListenPacket(network, fmt.Sprintf("%s:%d", r.Address, port))
+ if err != nil {
+ continue
+ }
+
+ relayAddr := conn.LocalAddr().(*net.UDPAddr)
+ relayAddr.IP = r.RelayAddress
+ return conn, relayAddr, nil
+ }
+
+ return nil, nil, errMaxRetriesExceeded
+}
+
+// AllocateConn generates a new Conn to receive traffic on and the IP/Port to populate the allocation response with
+func (r *RelayAddressGeneratorPortRange) AllocateConn(network string, requestedPort int) (net.Conn, net.Addr, error) {
+ return nil, nil, errTODO
+}
diff --git a/vendor/github.com/pion/turn/v2/relay_address_generator_static.go b/vendor/github.com/pion/turn/v2/relay_address_generator_static.go
new file mode 100644
index 0000000..ae921e7
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/relay_address_generator_static.go
@@ -0,0 +1,55 @@
+package turn
+
+import (
+ "net"
+ "strconv"
+
+ "github.com/pion/transport/vnet"
+)
+
+// RelayAddressGeneratorStatic can be used to return static IP address each time a relay is created.
+// This can be used when you have a single static IP address that you want to use
+type RelayAddressGeneratorStatic struct {
+ // RelayAddress is the IP returned to the user when the relay is created
+ RelayAddress net.IP
+
+ // Address is passed to Listen/ListenPacket when creating the Relay
+ Address string
+
+ Net *vnet.Net
+}
+
+// Validate is caled on server startup and confirms the RelayAddressGenerator is properly configured
+func (r *RelayAddressGeneratorStatic) Validate() error {
+ if r.Net == nil {
+ r.Net = vnet.NewNet(nil)
+ }
+
+ switch {
+ case r.RelayAddress == nil:
+ return errRelayAddressInvalid
+ case r.Address == "":
+ return errListeningAddressInvalid
+ default:
+ return nil
+ }
+}
+
+// AllocatePacketConn generates a new PacketConn to receive traffic on and the IP/Port to populate the allocation response with
+func (r *RelayAddressGeneratorStatic) AllocatePacketConn(network string, requestedPort int) (net.PacketConn, net.Addr, error) {
+ conn, err := r.Net.ListenPacket(network, r.Address+":"+strconv.Itoa(requestedPort))
+ if err != nil {
+ return nil, nil, err
+ }
+
+ // Replace actual listening IP with the user requested one of RelayAddressGeneratorStatic
+ relayAddr := conn.LocalAddr().(*net.UDPAddr)
+ relayAddr.IP = r.RelayAddress
+
+ return conn, relayAddr, nil
+}
+
+// AllocateConn generates a new Conn to receive traffic on and the IP/Port to populate the allocation response with
+func (r *RelayAddressGeneratorStatic) AllocateConn(network string, requestedPort int) (net.Conn, net.Addr, error) {
+ return nil, nil, errTODO
+}
diff --git a/vendor/github.com/pion/turn/v2/renovate.json b/vendor/github.com/pion/turn/v2/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/turn/v2/server.go b/vendor/github.com/pion/turn/v2/server.go
new file mode 100644
index 0000000..c8deba8
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/server.go
@@ -0,0 +1,161 @@
+// Package turn contains the public API for pion/turn, a toolkit for building TURN clients and servers
+package turn
+
+import (
+ "fmt"
+ "net"
+ "sync"
+ "time"
+
+ "github.com/pion/logging"
+ "github.com/pion/turn/v2/internal/allocation"
+ "github.com/pion/turn/v2/internal/proto"
+ "github.com/pion/turn/v2/internal/server"
+)
+
+const (
+ inboundMTU = 1500
+)
+
+// Server is an instance of the Pion TURN Server
+type Server struct {
+ log logging.LeveledLogger
+ authHandler AuthHandler
+ realm string
+ channelBindTimeout time.Duration
+ nonces *sync.Map
+
+ packetConnConfigs []PacketConnConfig
+ listenerConfigs []ListenerConfig
+}
+
+// NewServer creates the Pion TURN server
+func NewServer(config ServerConfig) (*Server, error) {
+ if err := config.validate(); err != nil {
+ return nil, err
+ }
+
+ loggerFactory := config.LoggerFactory
+ if loggerFactory == nil {
+ loggerFactory = logging.NewDefaultLoggerFactory()
+ }
+
+ s := &Server{
+ log: loggerFactory.NewLogger("turn"),
+ authHandler: config.AuthHandler,
+ realm: config.Realm,
+ channelBindTimeout: config.ChannelBindTimeout,
+ packetConnConfigs: config.PacketConnConfigs,
+ listenerConfigs: config.ListenerConfigs,
+ nonces: &sync.Map{},
+ }
+
+ if s.channelBindTimeout == 0 {
+ s.channelBindTimeout = proto.DefaultLifetime
+ }
+
+ for i := range s.packetConnConfigs {
+ go func(p PacketConnConfig) {
+ allocationManager, err := allocation.NewManager(allocation.ManagerConfig{
+ AllocatePacketConn: p.RelayAddressGenerator.AllocatePacketConn,
+ AllocateConn: p.RelayAddressGenerator.AllocateConn,
+ LeveledLogger: s.log,
+ })
+ if err != nil {
+ s.log.Errorf("exit read loop on error: %s", err.Error())
+ return
+ }
+ defer func() {
+ if err := allocationManager.Close(); err != nil {
+ s.log.Errorf("Failed to close AllocationManager: %s", err.Error())
+ }
+ }()
+
+ s.readLoop(p.PacketConn, allocationManager)
+ }(s.packetConnConfigs[i])
+ }
+
+ for _, listener := range s.listenerConfigs {
+ go func(l ListenerConfig) {
+ allocationManager, err := allocation.NewManager(allocation.ManagerConfig{
+ AllocatePacketConn: l.RelayAddressGenerator.AllocatePacketConn,
+ AllocateConn: l.RelayAddressGenerator.AllocateConn,
+ LeveledLogger: s.log,
+ })
+ if err != nil {
+ s.log.Errorf("exit read loop on error: %s", err.Error())
+ return
+ }
+ defer func() {
+ if err := allocationManager.Close(); err != nil {
+ s.log.Errorf("Failed to close AllocationManager: %s", err.Error())
+ }
+ }()
+
+ for {
+ conn, err := l.Listener.Accept()
+ if err != nil {
+ s.log.Debugf("exit accept loop on error: %s", err.Error())
+ return
+ }
+
+ go s.readLoop(NewSTUNConn(conn), allocationManager)
+ }
+ }(listener)
+ }
+
+ return s, nil
+}
+
+// Close stops the TURN Server. It cleans up any associated state and closes all connections it is managing
+func (s *Server) Close() error {
+ var errors []error
+
+ for _, p := range s.packetConnConfigs {
+ if err := p.PacketConn.Close(); err != nil {
+ errors = append(errors, err)
+ }
+ }
+
+ for _, l := range s.listenerConfigs {
+ if err := l.Listener.Close(); err != nil {
+ errors = append(errors, err)
+ }
+ }
+
+ if len(errors) == 0 {
+ return nil
+ }
+
+ err := errFailedToClose
+ for _, e := range errors {
+ err = fmt.Errorf("%s; Close error (%v) ", err.Error(), e) //nolint:goerr113
+ }
+
+ return err
+}
+
+func (s *Server) readLoop(p net.PacketConn, allocationManager *allocation.Manager) {
+ buf := make([]byte, inboundMTU)
+ for {
+ n, addr, err := p.ReadFrom(buf)
+ if err != nil {
+ s.log.Debugf("exit read loop on error: %s", err.Error())
+ return
+ }
+
+ if err := server.HandleRequest(server.Request{
+ Conn: p,
+ SrcAddr: addr,
+ Buff: buf[:n],
+ Log: s.log,
+ AuthHandler: s.authHandler,
+ Realm: s.realm,
+ AllocationManager: allocationManager,
+ ChannelBindTimeout: s.channelBindTimeout,
+ Nonces: s.nonces,
+ }); err != nil {
+ s.log.Errorf("error when handling datagram: %v", err)
+ }
+ }
+}
diff --git a/vendor/github.com/pion/turn/v2/server_config.go b/vendor/github.com/pion/turn/v2/server_config.go
new file mode 100644
index 0000000..9ff3872
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/server_config.go
@@ -0,0 +1,116 @@
+package turn
+
+import (
+ "crypto/md5" //nolint:gosec,gci
+ "fmt"
+ "net"
+ "strings"
+ "time"
+
+ "github.com/pion/logging"
+)
+
+// RelayAddressGenerator is used to generate a RelayAddress when creating an allocation.
+// You can use one of the provided ones or provide your own.
+type RelayAddressGenerator interface {
+ // Validate confirms that the RelayAddressGenerator is properly initialized
+ Validate() error
+
+ // Allocate a PacketConn (UDP) RelayAddress
+ AllocatePacketConn(network string, requestedPort int) (net.PacketConn, net.Addr, error)
+
+ // Allocate a Conn (TCP) RelayAddress
+ AllocateConn(network string, requestedPort int) (net.Conn, net.Addr, error)
+}
+
+// PacketConnConfig is a single net.PacketConn to listen/write on. This will be used for UDP listeners
+type PacketConnConfig struct {
+ PacketConn net.PacketConn
+
+ // When an allocation is generated the RelayAddressGenerator
+ // creates the net.PacketConn and returns the IP/Port it is available at
+ RelayAddressGenerator RelayAddressGenerator
+}
+
+func (c *PacketConnConfig) validate() error {
+ if c.PacketConn == nil {
+ return errConnUnset
+ }
+ if c.RelayAddressGenerator == nil {
+ return errRelayAddressGeneratorUnset
+ }
+
+ return c.RelayAddressGenerator.Validate()
+}
+
+// ListenerConfig is a single net.Listener to accept connections on. This will be used for TCP, TLS and DTLS listeners
+type ListenerConfig struct {
+ Listener net.Listener
+
+ // When an allocation is generated the RelayAddressGenerator
+ // creates the net.PacketConn and returns the IP/Port it is available at
+ RelayAddressGenerator RelayAddressGenerator
+}
+
+func (c *ListenerConfig) validate() error {
+ if c.Listener == nil {
+ return errListenerUnset
+ }
+
+ if c.RelayAddressGenerator == nil {
+ return errRelayAddressGeneratorUnset
+ }
+
+ return c.RelayAddressGenerator.Validate()
+}
+
+// AuthHandler is a callback used to handle incoming auth requests, allowing users to customize Pion TURN with custom behavior
+type AuthHandler func(username, realm string, srcAddr net.Addr) (key []byte, ok bool)
+
+// GenerateAuthKey is a convince function to easily generate keys in the format used by AuthHandler
+func GenerateAuthKey(username, realm, password string) []byte {
+ // #nosec
+ h := md5.New()
+ fmt.Fprint(h, strings.Join([]string{username, realm, password}, ":"))
+ return h.Sum(nil)
+}
+
+// ServerConfig configures the Pion TURN Server
+type ServerConfig struct {
+ // PacketConnConfigs and ListenerConfigs are a list of all the turn listeners
+ // Each listener can have custom behavior around the creation of Relays
+ PacketConnConfigs []PacketConnConfig
+ ListenerConfigs []ListenerConfig
+
+ // LoggerFactory must be set for logging from this server.
+ LoggerFactory logging.LoggerFactory
+
+ // Realm sets the realm for this server
+ Realm string
+
+ // AuthHandler is a callback used to handle incoming auth requests, allowing users to customize Pion TURN with custom behavior
+ AuthHandler AuthHandler
+
+ // ChannelBindTimeout sets the lifetime of channel binding. Defaults to 10 minutes.
+ ChannelBindTimeout time.Duration
+}
+
+func (s *ServerConfig) validate() error {
+ if len(s.PacketConnConfigs) == 0 && len(s.ListenerConfigs) == 0 {
+ return errNoAvailableConns
+ }
+
+ for _, s := range s.PacketConnConfigs {
+ if err := s.validate(); err != nil {
+ return err
+ }
+ }
+
+ for _, s := range s.ListenerConfigs {
+ if err := s.validate(); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/pion/turn/v2/stun_conn.go b/vendor/github.com/pion/turn/v2/stun_conn.go
new file mode 100644
index 0000000..e1446bd
--- /dev/null
+++ b/vendor/github.com/pion/turn/v2/stun_conn.go
@@ -0,0 +1,121 @@
+package turn
+
+import (
+ "encoding/binary"
+ "errors"
+ "net"
+ "time"
+
+ "github.com/pion/stun"
+ "github.com/pion/turn/v2/internal/proto"
+)
+
+var (
+ errInvalidTURNFrame = errors.New("data is not a valid TURN frame, no STUN or ChannelData found")
+ errIncompleteTURNFrame = errors.New("data contains incomplete STUN or TURN frame")
+)
+
+// STUNConn wraps a net.Conn and implements
+// net.PacketConn by being STUN aware and
+// packetizing the stream
+type STUNConn struct {
+ nextConn net.Conn
+ buff []byte
+}
+
+const (
+ stunHeaderSize = 20
+
+ channelDataLengthSize = 2
+ channelDataNumberSize = channelDataLengthSize
+ channelDataHeaderSize = channelDataLengthSize + channelDataNumberSize
+ channelDataPadding = 4
+)
+
+// Given a buffer give the last offset of the TURN frame
+// If the buffer isn't a valid STUN or ChannelData packet
+// or the length doesn't match return false
+func consumeSingleTURNFrame(p []byte) (int, error) {
+ // Too short to determine if ChannelData or STUN
+ if len(p) < 9 {
+ return 0, errIncompleteTURNFrame
+ }
+
+ var datagramSize uint16
+ if stun.IsMessage(p) {
+ datagramSize = binary.BigEndian.Uint16(p[2:4]) + stunHeaderSize
+ } else if num := binary.BigEndian.Uint16(p[0:4]); proto.ChannelNumber(num).Valid() {
+ datagramSize = binary.BigEndian.Uint16(p[channelDataNumberSize:channelDataHeaderSize])
+ if paddingOverflow := (datagramSize + channelDataPadding) % channelDataPadding; paddingOverflow != 0 {
+ datagramSize = (datagramSize + channelDataPadding) - paddingOverflow
+ }
+
+ datagramSize += channelDataHeaderSize
+ } else {
+ return 0, errInvalidTURNFrame
+ }
+
+ if len(p) < int(datagramSize) {
+ return 0, errIncompleteTURNFrame
+ }
+
+ return int(datagramSize), nil
+}
+
+// ReadFrom implements ReadFrom from net.PacketConn
+func (s *STUNConn) ReadFrom(p []byte) (n int, addr net.Addr, err error) {
+ // First pass any buffered data from previous reads
+ n, err = consumeSingleTURNFrame(s.buff)
+ if errors.Is(err, errInvalidTURNFrame) {
+ return 0, nil, err
+ } else if err == nil {
+ copy(p, s.buff[:n])
+ s.buff = s.buff[n:]
+
+ return n, s.nextConn.RemoteAddr(), nil
+ }
+
+ // Then read from the nextConn, appending to our buff
+ n, err = s.nextConn.Read(p)
+ if err != nil {
+ return 0, nil, err
+ }
+
+ s.buff = append(s.buff, append([]byte{}, p[:n]...)...)
+ return s.ReadFrom(p)
+}
+
+// WriteTo implements WriteTo from net.PacketConn
+func (s *STUNConn) WriteTo(p []byte, addr net.Addr) (n int, err error) {
+ return s.nextConn.Write(p)
+}
+
+// Close implements Close from net.PacketConn
+func (s *STUNConn) Close() error {
+ return s.nextConn.Close()
+}
+
+// LocalAddr implements LocalAddr from net.PacketConn
+func (s *STUNConn) LocalAddr() net.Addr {
+ return s.nextConn.LocalAddr()
+}
+
+// SetDeadline implements SetDeadline from net.PacketConn
+func (s *STUNConn) SetDeadline(t time.Time) error {
+ return s.nextConn.SetDeadline(t)
+}
+
+// SetReadDeadline implements SetReadDeadline from net.PacketConn
+func (s *STUNConn) SetReadDeadline(t time.Time) error {
+ return s.nextConn.SetReadDeadline(t)
+}
+
+// SetWriteDeadline implements SetWriteDeadline from net.PacketConn
+func (s *STUNConn) SetWriteDeadline(t time.Time) error {
+ return s.nextConn.SetWriteDeadline(t)
+}
+
+// NewSTUNConn creates a STUNConn
+func NewSTUNConn(nextConn net.Conn) *STUNConn {
+ return &STUNConn{nextConn: nextConn}
+}
diff --git a/vendor/github.com/pion/udp/.gitignore b/vendor/github.com/pion/udp/.gitignore
new file mode 100644
index 0000000..f7b3492
--- /dev/null
+++ b/vendor/github.com/pion/udp/.gitignore
@@ -0,0 +1,15 @@
+# Binaries for programs and plugins
+*.exe
+*.exe~
+*.dll
+*.so
+*.dylib
+
+# Test binary, built with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
+
+# Dependency directories (remove the comment below to include it)
+# vendor/ \ No newline at end of file
diff --git a/vendor/github.com/pion/udp/.golangci.yml b/vendor/github.com/pion/udp/.golangci.yml
new file mode 100644
index 0000000..1387b55
--- /dev/null
+++ b/vendor/github.com/pion/udp/.golangci.yml
@@ -0,0 +1,12 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+
+linters:
+ enable-all: true
+ disable:
+
+issues:
+ exclude-use-default: false
diff --git a/vendor/github.com/pion/udp/LICENSE b/vendor/github.com/pion/udp/LICENSE
new file mode 100644
index 0000000..81f990d
--- /dev/null
+++ b/vendor/github.com/pion/udp/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/udp/README.md b/vendor/github.com/pion/udp/README.md
new file mode 100644
index 0000000..f96659f
--- /dev/null
+++ b/vendor/github.com/pion/udp/README.md
@@ -0,0 +1,39 @@
+<h1 align="center">
+ <br>
+ Pion UDP
+ <br>
+</h1>
+<h4 align="center">A connection-oriented listener over a UDP PacketConn</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-udp-gray.svg?longCache=true&colorB=brightgreen" alt="Pion UDP"></a>
+ <!--<a href="https://sourcegraph.com/github.com/pion/webrtc?badge"><img src="https://sourcegraph.com/github.com/pion/webrtc/-/badge.svg" alt="Sourcegraph Widget"></a>-->
+ <a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/udp"><img src="https://travis-ci.org/pion/udp.svg?branch=master" alt="Build Status"></a>
+ <a href="https://pkg.go.dev/github.com/pion/udp"><img src="https://godoc.org/github.com/pion/udp?status.svg" alt="GoDoc"></a>
+ <a href="https://codecov.io/gh/pion/udp"><img src="https://codecov.io/gh/pion/udp/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/udp"><img src="https://goreportcard.com/badge/github.com/pion/udp" alt="Go Report Card"></a>
+ <!--<a href="https://www.codacy.com/app/Sean-Der/webrtc"><img src="https://api.codacy.com/project/badge/Grade/18f4aec384894e6aac0b94effe51961d" alt="Codacy Badge"></a>-->
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+### Roadmap
+This package is used in the [DTLS](https://github.com/pion/dtls) and [SCTP](https://github.com/pion/sctp) transport to provide a connection-oriented listener over a UDP.
+
+### Community
+Pion has an active community on the [Golang Slack](https://pion.ly/slack/). You can also use [Pion mailing list](https://groups.google.com/forum/#!forum/pion).
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
+* [Michiel De Backker](https://github.com/backkem) - *Original Author*
+* [Atsushi Watanabe](https://github.com/at-wat) - *Original Author*
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/udp/conn.go b/vendor/github.com/pion/udp/conn.go
new file mode 100644
index 0000000..9f680e8
--- /dev/null
+++ b/vendor/github.com/pion/udp/conn.go
@@ -0,0 +1,296 @@
+// Package udp provides a connection-oriented listener over a UDP PacketConn
+package udp
+
+import (
+ "context"
+ "errors"
+ "net"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/pion/transport/deadline"
+ "github.com/pion/transport/packetio"
+)
+
+const receiveMTU = 8192
+const defaultListenBacklog = 128 // same as Linux default
+
+var errClosedListener = errors.New("udp: listener closed")
+var errListenQueueExceeded = errors.New("udp: listen queue exceeded")
+
+// listener augments a connection-oriented Listener over a UDP PacketConn
+type listener struct {
+ pConn *net.UDPConn
+
+ accepting atomic.Value // bool
+ acceptCh chan *Conn
+ doneCh chan struct{}
+ doneOnce sync.Once
+ acceptFilter func([]byte) bool
+
+ connLock sync.Mutex
+ conns map[string]*Conn
+ connWG sync.WaitGroup
+
+ readWG sync.WaitGroup
+ errClose atomic.Value // error
+}
+
+// Accept waits for and returns the next connection to the listener.
+func (l *listener) Accept() (net.Conn, error) {
+ select {
+ case c := <-l.acceptCh:
+ l.connWG.Add(1)
+ return c, nil
+
+ case <-l.doneCh:
+ return nil, errClosedListener
+ }
+}
+
+// Close closes the listener.
+// Any blocked Accept operations will be unblocked and return errors.
+func (l *listener) Close() error {
+ var err error
+ l.doneOnce.Do(func() {
+ l.accepting.Store(false)
+ close(l.doneCh)
+
+ l.connLock.Lock()
+ // Close unaccepted connections
+ L_CLOSE:
+ for {
+ select {
+ case c := <-l.acceptCh:
+ close(c.doneCh)
+ delete(l.conns, c.rAddr.String())
+
+ default:
+ break L_CLOSE
+ }
+ }
+ nConns := len(l.conns)
+ l.connLock.Unlock()
+
+ l.connWG.Done()
+
+ if nConns == 0 {
+ // Wait if this is the final connection
+ l.readWG.Wait()
+ if errClose, ok := l.errClose.Load().(error); ok {
+ err = errClose
+ }
+ } else {
+ err = nil
+ }
+ })
+
+ return err
+}
+
+// Addr returns the listener's network address.
+func (l *listener) Addr() net.Addr {
+ return l.pConn.LocalAddr()
+}
+
+// ListenConfig stores options for listening to an address.
+type ListenConfig struct {
+ // Backlog defines the maximum length of the queue of pending
+ // connections. It is equivalent of the backlog argument of
+ // POSIX listen function.
+ // If a connection request arrives when the queue is full,
+ // the request will be silently discarded, unlike TCP.
+ // Set zero to use default value 128 which is same as Linux default.
+ Backlog int
+
+ // AcceptFilter determines whether the new conn should be made for
+ // the incoming packet. If not set, any packet creates new conn.
+ AcceptFilter func([]byte) bool
+}
+
+// Listen creates a new listener based on the ListenConfig.
+func (lc *ListenConfig) Listen(network string, laddr *net.UDPAddr) (net.Listener, error) {
+ if lc.Backlog == 0 {
+ lc.Backlog = defaultListenBacklog
+ }
+
+ conn, err := net.ListenUDP(network, laddr)
+ if err != nil {
+ return nil, err
+ }
+
+ l := &listener{
+ pConn: conn,
+ acceptCh: make(chan *Conn, lc.Backlog),
+ conns: make(map[string]*Conn),
+ doneCh: make(chan struct{}),
+ acceptFilter: lc.AcceptFilter,
+ }
+ l.accepting.Store(true)
+ l.connWG.Add(1)
+ l.readWG.Add(2) // wait readLoop and Close execution routine
+
+ go l.readLoop()
+ go func() {
+ l.connWG.Wait()
+ if err := l.pConn.Close(); err != nil {
+ l.errClose.Store(err)
+ }
+ l.readWG.Done()
+ }()
+
+ return l, nil
+}
+
+// Listen creates a new listener using default ListenConfig.
+func Listen(network string, laddr *net.UDPAddr) (net.Listener, error) {
+ return (&ListenConfig{}).Listen(network, laddr)
+}
+
+var readBufferPool = &sync.Pool{
+ New: func() interface{} {
+ buf := make([]byte, receiveMTU)
+ return &buf
+ },
+}
+
+// readLoop has to tasks:
+// 1. Dispatching incoming packets to the correct Conn.
+// It can therefore not be ended until all Conns are closed.
+// 2. Creating a new Conn when receiving from a new remote.
+func (l *listener) readLoop() {
+ defer l.readWG.Done()
+
+ for {
+ buf := *(readBufferPool.Get().(*[]byte))
+ n, raddr, err := l.pConn.ReadFrom(buf)
+ if err != nil {
+ return
+ }
+ conn, ok, err := l.getConn(raddr, buf[:n])
+ if err != nil {
+ continue
+ }
+ if ok {
+ _, _ = conn.buffer.Write(buf[:n])
+ }
+ }
+}
+
+func (l *listener) getConn(raddr net.Addr, buf []byte) (*Conn, bool, error) {
+ l.connLock.Lock()
+ defer l.connLock.Unlock()
+ conn, ok := l.conns[raddr.String()]
+ if !ok {
+ if !l.accepting.Load().(bool) {
+ return nil, false, errClosedListener
+ }
+ if l.acceptFilter != nil {
+ if !l.acceptFilter(buf) {
+ return nil, false, nil
+ }
+ }
+ conn = l.newConn(raddr)
+ select {
+ case l.acceptCh <- conn:
+ l.conns[raddr.String()] = conn
+ default:
+ return nil, false, errListenQueueExceeded
+ }
+ }
+ return conn, true, nil
+}
+
+// Conn augments a connection-oriented connection over a UDP PacketConn
+type Conn struct {
+ listener *listener
+
+ rAddr net.Addr
+
+ buffer *packetio.Buffer
+
+ doneCh chan struct{}
+ doneOnce sync.Once
+
+ writeDeadline *deadline.Deadline
+}
+
+func (l *listener) newConn(rAddr net.Addr) *Conn {
+ return &Conn{
+ listener: l,
+ rAddr: rAddr,
+ buffer: packetio.NewBuffer(),
+ doneCh: make(chan struct{}),
+ writeDeadline: deadline.New(),
+ }
+}
+
+// Read
+func (c *Conn) Read(p []byte) (int, error) {
+ return c.buffer.Read(p)
+}
+
+// Write writes len(p) bytes from p to the DTLS connection
+func (c *Conn) Write(p []byte) (n int, err error) {
+ select {
+ case <-c.writeDeadline.Done():
+ return 0, context.DeadlineExceeded
+ default:
+ }
+ return c.listener.pConn.WriteTo(p, c.rAddr)
+}
+
+// Close closes the conn and releases any Read calls
+func (c *Conn) Close() error {
+ var err error
+ c.doneOnce.Do(func() {
+ c.listener.connWG.Done()
+ close(c.doneCh)
+ c.listener.connLock.Lock()
+ delete(c.listener.conns, c.rAddr.String())
+ nConns := len(c.listener.conns)
+ c.listener.connLock.Unlock()
+
+ if nConns == 0 && !c.listener.accepting.Load().(bool) {
+ // Wait if this is the final connection
+ c.listener.readWG.Wait()
+ if errClose, ok := c.listener.errClose.Load().(error); ok {
+ err = errClose
+ }
+ } else {
+ err = nil
+ }
+ })
+
+ return err
+}
+
+// LocalAddr implements net.Conn.LocalAddr
+func (c *Conn) LocalAddr() net.Addr {
+ return c.listener.pConn.LocalAddr()
+}
+
+// RemoteAddr implements net.Conn.RemoteAddr
+func (c *Conn) RemoteAddr() net.Addr {
+ return c.rAddr
+}
+
+// SetDeadline implements net.Conn.SetDeadline
+func (c *Conn) SetDeadline(t time.Time) error {
+ c.writeDeadline.Set(t)
+ return c.SetReadDeadline(t)
+}
+
+// SetReadDeadline implements net.Conn.SetDeadline
+func (c *Conn) SetReadDeadline(t time.Time) error {
+ return c.buffer.SetReadDeadline(t)
+}
+
+// SetWriteDeadline implements net.Conn.SetDeadline
+func (c *Conn) SetWriteDeadline(t time.Time) error {
+ c.writeDeadline.Set(t)
+ // Write deadline of underlying connection should not be changed
+ // since the connection can be shared.
+ return nil
+}
diff --git a/vendor/github.com/pion/udp/go.mod b/vendor/github.com/pion/udp/go.mod
new file mode 100644
index 0000000..59289b6
--- /dev/null
+++ b/vendor/github.com/pion/udp/go.mod
@@ -0,0 +1,5 @@
+module github.com/pion/udp
+
+go 1.14
+
+require github.com/pion/transport v0.10.0
diff --git a/vendor/github.com/pion/udp/go.sum b/vendor/github.com/pion/udp/go.sum
new file mode 100644
index 0000000..cd0abb2
--- /dev/null
+++ b/vendor/github.com/pion/udp/go.sum
@@ -0,0 +1,19 @@
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
+github.com/pion/transport v0.10.0 h1:9M12BSneJm6ggGhJyWpDveFOstJsTiQjkLf4M44rm80=
+github.com/pion/transport v0.10.0/go.mod h1:BnHnUipd0rZQyTVB2SBGojFHT9CBt5C5TcsJSQGkvSE=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/pion/webrtc/v3/.codacy.yaml b/vendor/github.com/pion/webrtc/v3/.codacy.yaml
new file mode 100644
index 0000000..a8c225b
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/.codacy.yaml
@@ -0,0 +1,3 @@
+---
+exclude_paths:
+ - examples/examples.json
diff --git a/vendor/github.com/pion/webrtc/v3/.eslintrc.json b/vendor/github.com/pion/webrtc/v3/.eslintrc.json
new file mode 100644
index 0000000..a755cdb
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/.eslintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": ["standard"]
+}
diff --git a/vendor/github.com/pion/webrtc/v3/.gitignore b/vendor/github.com/pion/webrtc/v3/.gitignore
new file mode 100644
index 0000000..83db74b
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/.gitignore
@@ -0,0 +1,24 @@
+### JetBrains IDE ###
+#####################
+.idea/
+
+### Emacs Temporary Files ###
+#############################
+*~
+
+### Folders ###
+###############
+bin/
+vendor/
+node_modules/
+
+### Files ###
+#############
+*.ivf
+*.ogg
+tags
+cover.out
+*.sw[poe]
+*.wasm
+examples/sfu-ws/cert.pem
+examples/sfu-ws/key.pem
diff --git a/vendor/github.com/pion/webrtc/v3/.golangci.yml b/vendor/github.com/pion/webrtc/v3/.golangci.yml
new file mode 100644
index 0000000..d6162c9
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/.golangci.yml
@@ -0,0 +1,89 @@
+linters-settings:
+ govet:
+ check-shadowing: true
+ misspell:
+ locale: US
+ exhaustive:
+ default-signifies-exhaustive: true
+ gomodguard:
+ blocked:
+ modules:
+ - github.com/pkg/errors:
+ recommendations:
+ - errors
+
+linters:
+ enable:
+ - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
+ - bodyclose # checks whether HTTP response body is closed successfully
+ - deadcode # Finds unused code
+ - depguard # Go linter that checks if package imports are in a list of acceptable packages
+ - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
+ - dupl # Tool for code clone detection
+ - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
+ - exhaustive # check exhaustiveness of enum switch statements
+ - exportloopref # checks for pointers to enclosing loop variables
+ - gci # Gci control golang package import order and make it always deterministic.
+ - gochecknoglobals # Checks that no globals are present in Go code
+ - gochecknoinits # Checks that no init functions are present in Go code
+ - gocognit # Computes and checks the cognitive complexity of functions
+ - goconst # Finds repeated strings that could be replaced by a constant
+ - gocritic # The most opinionated Go source code linter
+ - godox # Tool for detection of FIXME, TODO and other comment keywords
+ - goerr113 # Golang linter to check the errors handling expressions
+ - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
+ - gofumpt # Gofumpt checks whether code was gofumpt-ed.
+ - goheader # Checks is file header matches to pattern
+ - goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
+ - golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
+ - gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.
+ - goprintffuncname # Checks that printf-like functions are named with `f` at the end
+ - gosec # Inspects source code for security problems
+ - gosimple # Linter for Go source code that specializes in simplifying a code
+ - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
+ - ineffassign # Detects when assignments to existing variables are not used
+ - misspell # Finds commonly misspelled English words in comments
+ - nakedret # Finds naked returns in functions greater than a specified function length
+ - noctx # noctx finds sending http request without context.Context
+ - scopelint # Scopelint checks for unpinned variables in go programs
+ - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
+ - structcheck # Finds unused struct fields
+ - stylecheck # Stylecheck is a replacement for golint
+ - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
+ - unconvert # Remove unnecessary type conversions
+ - unparam # Reports unused function parameters
+ - unused # Checks Go code for unused constants, variables, functions and types
+ - varcheck # Finds unused global variables and constants
+ - whitespace # Tool for detection of leading and trailing whitespace
+ disable:
+ - funlen # Tool for detection of long functions
+ - gocyclo # Computes and checks the cyclomatic complexity of functions
+ - godot # Check if comments end in a period
+ - gomnd # An analyzer to detect magic numbers.
+ - lll # Reports long lines
+ - maligned # Tool to detect Go structs that would take less memory if their fields were sorted
+ - nestif # Reports deeply nested if statements
+ - nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity
+ - nolintlint # Reports ill-formed or insufficient nolint directives
+ - prealloc # Finds slice declarations that could potentially be preallocated
+ - rowserrcheck # checks whether Err of rows is checked successfully
+ - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
+ - testpackage # linter that makes you use a separate _test package
+ - wsl # Whitespace Linter - Forces you to use empty lines!
+
+issues:
+ exclude-use-default: false
+ exclude-rules:
+ # Allow complex tests, better to be self contained
+ - path: _test\.go
+ linters:
+ - gocognit
+
+ # Allow complex main function in examples
+ - path: examples
+ text: "of func `main` is high"
+ linters:
+ - gocognit
+
+run:
+ skip-dirs-use-default: false
diff --git a/vendor/github.com/pion/webrtc/v3/DESIGN.md b/vendor/github.com/pion/webrtc/v3/DESIGN.md
new file mode 100644
index 0000000..e22b08e
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/DESIGN.md
@@ -0,0 +1,43 @@
+<h1 align="center">
+ Design
+</h1>
+WebRTC is a powerful, but complicated technology you can build amazing things with, it comes with a steep learning curve though.
+Using WebRTC in the browser is easy, but outside the browser is more of a challenge. There are multiple libraries, and they all have
+varying levels of quality. Most are also difficult to build, and depend on libraries that aren't available in repos or portable.
+
+Pion WebRTC aims to solve all that! Built in native Go you should be able to send and receive media and text from anywhere with minimal headache.
+These are the design principals that drive Pion WebRTC and hopefully convince you it is worth a try.
+
+### Portable
+Pion WebRTC is written in Go and extremely portable. Anywhere Golang runs, Pion WebRTC should work as well! Instead of dealing with complicated
+cross-compiling of multiple libraries, you now can run anywhere with one `go build`
+
+### Flexible
+When possible we leave all decisions to the user. When choice is possible (like what logging library is used) we defer to the developer.
+
+### Simple API
+If you know how to use WebRTC in your browser, you know how to use Pion WebRTC.
+We try our best just to duplicate the Javascript API, so your code can look the same everywhere.
+
+If this is your first time using WebRTC, don't worry! We have multiple [examples](https://github.com/pion/webrtc/tree/master/examples) and [GoDoc](https://pkg.go.dev/github.com/pion/webrtc/v3)
+
+### Bring your own media
+Pion WebRTC doesn't make any assumptions about where your audio, video or text come from. You can use FFmpeg, GStreamer, MLT or just serve a video file.
+This library only serves to transport, not create media.
+
+### Safe
+Golang provides a great foundation to build safe network services.
+Especially when running a networked service that is highly concurrent bugs can be devastating.
+
+### Readable
+If code comes from an RFC we try to make sure everything is commented with a link to the spec.
+This makes learning and debugging easier, this WebRTC library was written to also serve as a guide for others.
+
+### Tested
+Every commit is tested via travis-ci Go provides fantastic facilities for testing, and more will be added as time goes on.
+
+### Shared libraries
+Every Pion project is built using shared libraries, allowing others to review and reuse our libraries.
+
+### Community
+The most important part of Pion is the community. This projects only exist because of individual contributions. We aim to be radically open and do everything we can to support those that make Pion possible.
diff --git a/vendor/github.com/pion/webrtc/v3/LICENSE b/vendor/github.com/pion/webrtc/v3/LICENSE
new file mode 100644
index 0000000..ab60297
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/pion/webrtc/v3/README.md b/vendor/github.com/pion/webrtc/v3/README.md
new file mode 100644
index 0000000..6fc98d5
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/README.md
@@ -0,0 +1,271 @@
+<h1 align="center">
+ <a href="https://pion.ly"><img src="./.github/pion-gopher-webrtc.png" alt="Pion WebRTC" height="250px"></a>
+ <br>
+ Pion WebRTC
+ <br>
+</h1>
+<h4 align="center">A pure Go implementation of the WebRTC API</h4>
+<p align="center">
+ <a href="https://pion.ly"><img src="https://img.shields.io/badge/pion-webrtc-gray.svg?longCache=true&colorB=brightgreen" alt="Pion webrtc"></a>
+ <a href="https://sourcegraph.com/github.com/pion/webrtc?badge"><img src="https://sourcegraph.com/github.com/pion/webrtc/-/badge.svg" alt="Sourcegraph Widget"></a>
+ <a href="https://pion.ly/slack"><img src="https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen" alt="Slack Widget"></a>
+ <a href="https://twitter.com/_pion?ref_src=twsrc%5Etfw"><img src="https://img.shields.io/twitter/url.svg?label=Follow%20%40_pion&style=social&url=https%3A%2F%2Ftwitter.com%2F_pion" alt="Twitter Widget"></a>
+ <a href="https://github.com/pion/awesome-pion" alt="Awesome Pion"><img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg"></a>
+ <br>
+ <a href="https://travis-ci.org/pion/webrtc"><img src="https://travis-ci.org/pion/webrtc.svg?branch=master" alt="Build Status"></a>
+ <a href="https://pkg.go.dev/github.com/pion/webrtc/v3"><img src="https://pkg.go.dev/badge/github.com/pion/webrtc/v3" alt="PkgGoDev"></a>
+ <a href="https://codecov.io/gh/pion/webrtc"><img src="https://codecov.io/gh/pion/webrtc/branch/master/graph/badge.svg" alt="Coverage Status"></a>
+ <a href="https://goreportcard.com/report/github.com/pion/webrtc"><img src="https://goreportcard.com/badge/github.com/pion/webrtc" alt="Go Report Card"></a>
+ <a href="https://www.codacy.com/app/Sean-Der/webrtc"><img src="https://api.codacy.com/project/badge/Grade/18f4aec384894e6aac0b94effe51961d" alt="Codacy Badge"></a>
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
+</p>
+<br>
+
+### New Release
+
+Pion WebRTC v3.0.0 has been released! See the [release notes](https://github.com/pion/webrtc/wiki/Release-WebRTC@v3.0.0) to learn about new features and breaking changes.
+
+If you aren't able to upgrade yet check the [tags](https://github.com/pion/webrtc/tags) for the latest `v2` release.
+
+We would love your feedback! Please create GitHub issues or join [the Slack channel](https://pion.ly/slack) to follow development and speak with the maintainers.
+
+----
+
+### Usage
+[Go Modules](https://blog.golang.org/using-go-modules) are mandatory for using Pion WebRTC. So make sure you set `export GO111MODULE=on`, and explicitly specify `/v2` or `/v3` when importing.
+
+
+**[example applications](examples/README.md)** contains code samples of common things people build with Pion WebRTC.
+
+**[example-webrtc-applications](https://github.com/pion/example-webrtc-applications)** contains more full featured examples that use 3rd party libraries.
+
+**[awesome-pion](https://github.com/pion/awesome-pion)** contains projects that have used Pion, and serve as real world examples of usage.
+
+**[GoDoc](https://pkg.go.dev/github.com/pion/webrtc/v3)** is an auto generated API reference. All our Public APIs are commented.
+
+**[FAQ](https://github.com/pion/webrtc/wiki/FAQ)** has answers to common questions. If you have a question not covered please ask in [Slack](https://pion.ly/slack) we are always looking to expand it.
+
+Now go build something awesome! Here are some **ideas** to get your creative juices flowing:
+* Send a video file to multiple browser in real time for perfectly synchronized movie watching.
+* Send a webcam on an embedded device to your browser with no additional server required!
+* Securely send data between two servers, without using pub/sub.
+* Record your webcam and do special effects server side.
+* Build a conferencing application that processes audio/video and make decisions off of it.
+* Remotely control a robots and stream its cameras in realtime.
+
+### Want to learn more about WebRTC?
+Check out [WebRTC for the Curious](https://webrtcforthecurious.com). A book about WebRTC in depth, not just about the APIs.
+Learn the full details of ICE, SCTP, DTLS, SRTP, and how they work together to make up the WebRTC stack.
+
+This is also a great resource if you are trying to debug. Learn the tools of the trade and how to approach WebRTC issues.
+
+This book is vendor agnostic and will not have any Pion specific information.
+
+### Features
+#### PeerConnection API
+* Go implementation of [webrtc-pc](https://w3c.github.io/webrtc-pc/) and [webrtc-stats](https://www.w3.org/TR/webrtc-stats/)
+* DataChannels
+* Send/Receive audio and video
+* Renegotiation
+* Plan-B and Unified Plan
+* [SettingEngine](https://pkg.go.dev/github.com/pion/webrtc/v3#SettingEngine) for Pion specific extensions
+
+
+#### Connectivity
+* Full ICE Agent
+* ICE Restart
+* Trickle ICE
+* STUN
+* TURN (UDP, TCP, DTLS and TLS)
+* mDNS candidates
+
+#### DataChannels
+* Ordered/Unordered
+* Lossy/Lossless
+
+#### Media
+* API with direct RTP/RTCP access
+* Opus, PCM, H264, VP8 and VP9 packetizer
+* API also allows developer to pass their own packetizer
+* IVF, Ogg, H264 and Matroska provided for easy sending and saving
+* [getUserMedia](https://github.com/pion/mediadevices) implementation (Requires Cgo)
+* Easy integration with x264, libvpx, GStreamer and ffmpeg.
+* [Simulcast](https://github.com/pion/webrtc/tree/master/examples/simulcast)
+* [SVC](https://github.com/pion/rtp/blob/master/codecs/vp9_packet.go#L138)
+* [NACK](https://github.com/pion/interceptor/pull/4)
+* Full loss recovery and congestion control is not complete, see [pion/interceptor](https://github.com/pion/interceptor) for progress
+ * See [ion](https://github.com/pion/ion-sfu/tree/master/pkg/buffer) for how an implementor can do it today
+
+#### Security
+* TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 and TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA for DTLS v1.2
+* SRTP_AEAD_AES_256_GCM and SRTP_AES128_CM_HMAC_SHA1_80 for SRTP
+* Hardware acceleration available for GCM suites
+
+#### Pure Go
+* No Cgo usage
+* Wide platform support
+ * Windows, macOS, Linux, FreeBSD
+ * iOS, Android
+ * [WASM](https://github.com/pion/webrtc/wiki/WebAssembly-Development-and-Testing) see [examples](examples/README.md#webassembly)
+ * 386, amd64, arm, mips, ppc64
+* Easy to build *Numbers generated on Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz*
+ * **Time to build examples/play-from-disk** - 0.66s user 0.20s system 306% cpu 0.279 total
+ * **Time to run entire test suite** - 25.60s user 9.40s system 45% cpu 1:16.69 total
+* Tools to measure performance [provided](https://github.com/pion/rtsp-bench)
+
+
+### Roadmap
+The library is in active development, please refer to the [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
+We also maintain a list of [Big Ideas](https://github.com/pion/webrtc/wiki/Big-Ideas) these are things we want to build but don't have a clear plan or the resources yet.
+If you are looking to get involved this is a great place to get started! We would also love to hear your ideas! Even if you can't implement it yourself, it could inspire others.
+
+### Community
+Pion has an active community on the [Slack](https://pion.ly/slack).
+
+Follow the [Pion Twitter](https://twitter.com/_pion) for project updates and important WebRTC news.
+
+We are always looking to support **your projects**. Please reach out if you have something to build!
+If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
+
+### Contributing
+Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contributing)** to join the group of amazing people making this project possible:
+
+* [John Bradley](https://github.com/kc5nra) - *Original Author*
+* [Michael Melvin Santry](https://github.com/santrym) - *Mascot*
+* [Raphael Randschau](https://github.com/nicolai86) - *STUN*
+* [Sean DuBois](https://github.com/Sean-Der) - *Original Author*
+* [Michiel De Backker](https://github.com/backkem) - *SDP, Public API, Project Management*
+* [Brendan Rius](https://github.com/brendanrius) - *Cleanup*
+* [Konstantin Itskov](https://github.com/trivigy) - *SDP Parsing*
+* [chenkaiC4](https://github.com/chenkaiC4) - *Fix GolangCI Linter*
+* [Ronan J](https://github.com/ronanj) - *Fix STCP PPID*
+* [wattanakorn495](https://github.com/wattanakorn495)
+* [Max Hawkins](https://github.com/maxhawkins) - *RTCP*
+* [Justin Okamoto](https://github.com/justinokamoto) - *Fix Docs*
+* [leeoxiang](https://github.com/notedit) - *Implement Janus examples*
+* [Denis](https://github.com/Hixon10) - *Adding docker-compose to pion-to-pion example*
+* [earle](https://github.com/aguilEA) - *Generate DTLS fingerprint in Go*
+* [Jake B](https://github.com/silbinarywolf) - *Fix Windows installation instructions*
+* [Michael MacDonald](https://github.com/mjmac) - *Plan B compatibility, Remote TURN/Trickle-ICE, Logging framework*
+* [Oleg Kovalov](https://github.com/cristaloleg) *Use wildcards instead of hardcoding travis-ci config*
+* [Woodrow Douglass](https://github.com/wdouglass) *RTCP, RTP improvements, G.722 support, Bugfixes*
+* [Tobias Fridén](https://github.com/tobiasfriden) *SRTP authentication verification*
+* [Yutaka Takeda](https://github.com/enobufs) *Fix ICE connection timeout*
+* [Hugo Arregui](https://github.com/hugoArregui) *Fix connection timeout*
+* [Rob Deutsch](https://github.com/rob-deutsch) *RTPReceiver graceful shutdown*
+* [Jin Lei](https://github.com/jinleileiking) - *SFU example use http*
+* [Will Watson](https://github.com/wwatson) - *Enable gocritic*
+* [Luke Curley](https://github.com/kixelated)
+* [Antoine Baché](https://github.com/Antonito) - *OGG Opus export*
+* [frank](https://github.com/feixiao) - *Building examples on OSX*
+* [mxmCherry](https://github.com/mxmCherry)
+* [Alex Browne](https://github.com/albrow) - *JavaScript/Wasm bindings*
+* [adwpc](https://github.com/adwpc) - *SFU example with websocket*
+* [imalic3](https://github.com/imalic3) - *SFU websocket example with datachannel broadcast*
+* [Žiga Željko](https://github.com/zigazeljko)
+* [Simonacca Fotokite](https://github.com/simonacca-fotokite)
+* [Marouane](https://github.com/nindolabs) *Fix Offer bundle generation*
+* [Christopher Fry](https://github.com/christopherfry)
+* [Adam Kiss](https://github.com/masterada)
+* [xsbchen](https://github.com/xsbchen)
+* [Alex Harford](https://github.com/alexjh)
+* [Aleksandr Razumov](https://github.com/ernado)
+* [mchlrhw](https://github.com/mchlrhw)
+* [AlexWoo(武杰)](https://github.com/AlexWoo) *Fix RemoteDescription parsing for certificate fingerprint*
+* [Cecylia Bocovich](https://github.com/cohosh)
+* [Slugalisk](https://github.com/slugalisk)
+* [Agugua Kenechukwu](https://github.com/spaceCh1mp)
+* [Ato Araki](https://github.com/atotto)
+* [Rafael Viscarra](https://github.com/rviscarra)
+* [Mike Coleman](https://github.com/fivebats)
+* [Suhas Gaddam](https://github.com/suhasgaddam)
+* [Atsushi Watanabe](https://github.com/at-wat)
+* [Robert Eperjesi](https://github.com/epes)
+* [Aaron France](https://github.com/AeroNotix)
+* [Gareth Hayes](https://github.com/gazhayes)
+* [Sebastian Waisbrot](https://github.com/seppo0010)
+* [Masataka Hisasue](https://github.com/sylba2050) - *Fix Docs*
+* [Hongchao Ma(马洪超)](https://github.com/hcm007)
+* [Aaron France](https://github.com/AeroNotix)
+* [Chris Hiszpanski](https://github.com/thinkski) - *Fix Answer bundle generation*
+* [Vicken Simonian](https://github.com/vsimon)
+* [Guilherme Souza](https://github.com/gqgs)
+* [Andrew N. Shalaev](https://github.com/isqad)
+* [David Hamilton](https://github.com/dihamilton)
+* [Ilya Mayorov](https://github.com/faroyam)
+* [Patrick Lange](https://github.com/langep)
+* [cyannuk](https://github.com/cyannuk)
+* [Lukas Herman](https://github.com/lherman-cs)
+* [Konstantin Chugalinskiy](https://github.com/kchugalinskiy)
+* [Bao Nguyen](https://github.com/sysbot)
+* [Luke S](https://github.com/encounter)
+* [Hendrik Hofstadt](https://github.com/hendrikhofstadt)
+* [Clayton McCray](https://github.com/ClaytonMcCray)
+* [lawl](https://github.com/lawl)
+* [Jorropo](https://github.com/Jorropo)
+* [Akil](https://github.com/akilude)
+* [Quentin Renard](https://github.com/asticode)
+* [opennota](https://github.com/opennota)
+* [Simon Eisenmann](https://github.com/longsleep)
+* [Ben Weitzman](https://github.com/benweitzman)
+* [Masahiro Nakamura](https://github.com/tsuu32)
+* [Tarrence van As](https://github.com/tarrencev)
+* [Yuki Igarashi](https://github.com/bonprosoft)
+* [Egon Elbre](https://github.com/egonelbre)
+* [Jerko Steiner](https://github.com/jeremija)
+* [Roman Romanenko](https://github.com/r-novel)
+* [YongXin SHI](https://github.com/a-wing)
+* [Magnus Wahlstrand](https://github.com/kyeett)
+* [Chad Retz](https://github.com/cretz)
+* [Simone Gotti](https://github.com/sgotti)
+* [Cedric Fung](https://github.com/cedricfung)
+* [Norman Rasmussen](https://github.com/normanr) - *Fix Empty DataChannel messages*
+* [salmān aljammāz](https://github.com/saljam)
+* [cnderrauber](https://github.com/cnderrauber)
+* [Juliusz Chroboczek](https://github.com/jech)
+* [John Berthels](https://github.com/jbert)
+* [Somers Matthews](https://github.com/somersbmatthews)
+* [Vitaliy F](https://github.com/funvit)
+* [Ivan Egorov](https://github.com/vany-egorov)
+* [Nick Mykins](https://github.com/nmyk)
+* [Jason Brady](https://github.com/jbrady42)
+* [krishna chiatanya](https://github.com/kittuov)
+* [JacobZwang](https://github.com/JacobZwang)
+* [박종훈](https://github.com/JonghunBok)
+* [Sam Lancia](https://github.com/nerd2)
+* [Henry](https://github.com/cryptix)
+* [Jeff Tchang](https://github.com/tachang)
+* [JooYoung Lim](https://github.com/DevRockstarZ)
+* [Sidney San Martín](https://github.com/s4y)
+* [soolaugust](https://github.com/soolaugust)
+* [Kuzmin Vladimir](https://github.com/tekig)
+* [Alessandro Ros](https://github.com/aler9)
+* [Thomas Miller](https://github.com/tmiv)
+* [yoko(q191201771)](https://github.com/q191201771)
+* [Joshua Obasaju](https://github.com/obasajujoshua31)
+* [Mission Liao](https://github.com/mission-liao)
+* [Hanjun Kim](https://github.com/hallazzang)
+* [ZHENK](https://github.com/scorpionknifes)
+* [Rahul Nakre](https://github.com/rahulnakre)
+* [OrlandoCo](https://github.com/OrlandoCo)
+* [Assad Obaid](https://github.com/assadobaid)
+* [Jamie Good](https://github.com/jamiegood) - *Bug fix in jsfiddle example*
+* [Artur Shellunts](https://github.com/ashellunts)
+* [Sean Knight](https://github.com/SeanKnight)
+* [o0olele](https://github.com/o0olele)
+* [Bo Shi](https://github.com/bshimc)
+* [Suzuki Takeo](https://github.com/BambooTuna)
+* [baiyufei](https://github.com/baiyufei)
+* [pascal-ace](https://github.com/pascal-ace)
+* [Threadnaught](https://github.com/Threadnaught)
+* [Dean Eigenmann](https://github.com/decanus)
+* [Cameron Elliott](https://github.com/cameronelliott)
+* [Pascal Benoit](https://github.com/pascal-ace)
+* [Mats](https://github.com/Mindgamesnl)
+* [donotanswer](https://github.com/f-viktor)
+* [Reese](https://github.com/figadore)
+* [David Zhao](https://github.com/davidzhao)
+* [Nam V. Do](https://github.com/namvdo)
+
+### License
+MIT License - see [LICENSE](LICENSE) for full text
diff --git a/vendor/github.com/pion/webrtc/v3/api.go b/vendor/github.com/pion/webrtc/v3/api.go
new file mode 100644
index 0000000..60ac728
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/api.go
@@ -0,0 +1,73 @@
+// +build !js
+
+package webrtc
+
+import (
+ "github.com/pion/interceptor"
+ "github.com/pion/logging"
+)
+
+// API bundles the global functions of the WebRTC and ORTC API.
+// Some of these functions are also exported globally using the
+// defaultAPI object. Note that the global version of the API
+// may be phased out in the future.
+type API struct {
+ settingEngine *SettingEngine
+ mediaEngine *MediaEngine
+ interceptor interceptor.Interceptor
+}
+
+// NewAPI Creates a new API object for keeping semi-global settings to WebRTC objects
+func NewAPI(options ...func(*API)) *API {
+ a := &API{}
+
+ for _, o := range options {
+ o(a)
+ }
+
+ if a.settingEngine == nil {
+ a.settingEngine = &SettingEngine{}
+ }
+
+ if a.settingEngine.LoggerFactory == nil {
+ a.settingEngine.LoggerFactory = logging.NewDefaultLoggerFactory()
+ }
+
+ if a.mediaEngine == nil {
+ a.mediaEngine = &MediaEngine{}
+ }
+
+ if a.interceptor == nil {
+ a.interceptor = &interceptor.NoOp{}
+ }
+
+ return a
+}
+
+// WithMediaEngine allows providing a MediaEngine to the API.
+// Settings can be changed after passing the engine to an API.
+func WithMediaEngine(m *MediaEngine) func(a *API) {
+ return func(a *API) {
+ if m != nil {
+ a.mediaEngine = m
+ } else {
+ a.mediaEngine = &MediaEngine{}
+ }
+ }
+}
+
+// WithSettingEngine allows providing a SettingEngine to the API.
+// Settings should not be changed after passing the engine to an API.
+func WithSettingEngine(s SettingEngine) func(a *API) {
+ return func(a *API) {
+ a.settingEngine = &s
+ }
+}
+
+// WithInterceptorRegistry allows providing Interceptors to the API.
+// Settings should not be changed after passing the registry to an API.
+func WithInterceptorRegistry(interceptorRegistry *interceptor.Registry) func(a *API) {
+ return func(a *API) {
+ a.interceptor = interceptorRegistry.Build()
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/api_js.go b/vendor/github.com/pion/webrtc/v3/api_js.go
new file mode 100644
index 0000000..964b7b0
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/api_js.go
@@ -0,0 +1,31 @@
+// +build js,wasm
+
+package webrtc
+
+// API bundles the global funcions of the WebRTC and ORTC API.
+type API struct {
+ settingEngine *SettingEngine
+}
+
+// NewAPI Creates a new API object for keeping semi-global settings to WebRTC objects
+func NewAPI(options ...func(*API)) *API {
+ a := &API{}
+
+ for _, o := range options {
+ o(a)
+ }
+
+ if a.settingEngine == nil {
+ a.settingEngine = &SettingEngine{}
+ }
+
+ return a
+}
+
+// WithSettingEngine allows providing a SettingEngine to the API.
+// Settings should not be changed after passing the engine to an API.
+func WithSettingEngine(s SettingEngine) func(a *API) {
+ return func(a *API) {
+ a.settingEngine = &s
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/atomicbool.go b/vendor/github.com/pion/webrtc/v3/atomicbool.go
new file mode 100644
index 0000000..c5ace62
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/atomicbool.go
@@ -0,0 +1,20 @@
+package webrtc
+
+import "sync/atomic"
+
+type atomicBool struct {
+ val int32
+}
+
+func (b *atomicBool) set(value bool) { // nolint: unparam
+ var i int32
+ if value {
+ i = 1
+ }
+
+ atomic.StoreInt32(&(b.val), i)
+}
+
+func (b *atomicBool) get() bool {
+ return atomic.LoadInt32(&(b.val)) != 0
+}
diff --git a/vendor/github.com/pion/webrtc/v3/bundlepolicy.go b/vendor/github.com/pion/webrtc/v3/bundlepolicy.go
new file mode 100644
index 0000000..6d39a27
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/bundlepolicy.go
@@ -0,0 +1,78 @@
+package webrtc
+
+import (
+ "encoding/json"
+)
+
+// BundlePolicy affects which media tracks are negotiated if the remote
+// endpoint is not bundle-aware, and what ICE candidates are gathered. If the
+// remote endpoint is bundle-aware, all media tracks and data channels are
+// bundled onto the same transport.
+type BundlePolicy int
+
+const (
+ // BundlePolicyBalanced indicates to gather ICE candidates for each
+ // media type in use (audio, video, and data). If the remote endpoint is
+ // not bundle-aware, negotiate only one audio and video track on separate
+ // transports.
+ BundlePolicyBalanced BundlePolicy = iota + 1
+
+ // BundlePolicyMaxCompat indicates to gather ICE candidates for each
+ // track. If the remote endpoint is not bundle-aware, negotiate all media
+ // tracks on separate transports.
+ BundlePolicyMaxCompat
+
+ // BundlePolicyMaxBundle indicates to gather ICE candidates for only
+ // one track. If the remote endpoint is not bundle-aware, negotiate only
+ // one media track.
+ BundlePolicyMaxBundle
+)
+
+// This is done this way because of a linter.
+const (
+ bundlePolicyBalancedStr = "balanced"
+ bundlePolicyMaxCompatStr = "max-compat"
+ bundlePolicyMaxBundleStr = "max-bundle"
+)
+
+func newBundlePolicy(raw string) BundlePolicy {
+ switch raw {
+ case bundlePolicyBalancedStr:
+ return BundlePolicyBalanced
+ case bundlePolicyMaxCompatStr:
+ return BundlePolicyMaxCompat
+ case bundlePolicyMaxBundleStr:
+ return BundlePolicyMaxBundle
+ default:
+ return BundlePolicy(Unknown)
+ }
+}
+
+func (t BundlePolicy) String() string {
+ switch t {
+ case BundlePolicyBalanced:
+ return bundlePolicyBalancedStr
+ case BundlePolicyMaxCompat:
+ return bundlePolicyMaxCompatStr
+ case BundlePolicyMaxBundle:
+ return bundlePolicyMaxBundleStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// UnmarshalJSON parses the JSON-encoded data and stores the result
+func (t *BundlePolicy) UnmarshalJSON(b []byte) error {
+ var val string
+ if err := json.Unmarshal(b, &val); err != nil {
+ return err
+ }
+
+ *t = newBundlePolicy(val)
+ return nil
+}
+
+// MarshalJSON returns the JSON encoding
+func (t BundlePolicy) MarshalJSON() ([]byte, error) {
+ return json.Marshal(t.String())
+}
diff --git a/vendor/github.com/pion/webrtc/v3/certificate.go b/vendor/github.com/pion/webrtc/v3/certificate.go
new file mode 100644
index 0000000..bf106d6
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/certificate.go
@@ -0,0 +1,185 @@
+// +build !js
+
+package webrtc
+
+import (
+ "crypto"
+ "crypto/ecdsa"
+ "crypto/rand"
+ "crypto/rsa"
+ "crypto/x509"
+ "crypto/x509/pkix"
+ "encoding/base64"
+ "encoding/hex"
+ "fmt"
+ "math/big"
+ "time"
+
+ "github.com/pion/dtls/v2/pkg/crypto/fingerprint"
+ "github.com/pion/webrtc/v3/pkg/rtcerr"
+)
+
+// Certificate represents a x509Cert used to authenticate WebRTC communications.
+type Certificate struct {
+ privateKey crypto.PrivateKey
+ x509Cert *x509.Certificate
+ statsID string
+}
+
+// NewCertificate generates a new x509 compliant Certificate to be used
+// by DTLS for encrypting data sent over the wire. This method differs from
+// GenerateCertificate by allowing to specify a template x509.Certificate to
+// be used in order to define certificate parameters.
+func NewCertificate(key crypto.PrivateKey, tpl x509.Certificate) (*Certificate, error) {
+ var err error
+ var certDER []byte
+ switch sk := key.(type) {
+ case *rsa.PrivateKey:
+ pk := sk.Public()
+ tpl.SignatureAlgorithm = x509.SHA256WithRSA
+ certDER, err = x509.CreateCertificate(rand.Reader, &tpl, &tpl, pk, sk)
+ if err != nil {
+ return nil, &rtcerr.UnknownError{Err: err}
+ }
+ case *ecdsa.PrivateKey:
+ pk := sk.Public()
+ tpl.SignatureAlgorithm = x509.ECDSAWithSHA256
+ certDER, err = x509.CreateCertificate(rand.Reader, &tpl, &tpl, pk, sk)
+ if err != nil {
+ return nil, &rtcerr.UnknownError{Err: err}
+ }
+ default:
+ return nil, &rtcerr.NotSupportedError{Err: ErrPrivateKeyType}
+ }
+
+ cert, err := x509.ParseCertificate(certDER)
+ if err != nil {
+ return nil, &rtcerr.UnknownError{Err: err}
+ }
+
+ return &Certificate{privateKey: key, x509Cert: cert, statsID: fmt.Sprintf("certificate-%d", time.Now().UnixNano())}, nil
+}
+
+// Equals determines if two certificates are identical by comparing both the
+// secretKeys and x509Certificates.
+func (c Certificate) Equals(o Certificate) bool {
+ switch cSK := c.privateKey.(type) {
+ case *rsa.PrivateKey:
+ if oSK, ok := o.privateKey.(*rsa.PrivateKey); ok {
+ if cSK.N.Cmp(oSK.N) != 0 {
+ return false
+ }
+ return c.x509Cert.Equal(o.x509Cert)
+ }
+ return false
+ case *ecdsa.PrivateKey:
+ if oSK, ok := o.privateKey.(*ecdsa.PrivateKey); ok {
+ if cSK.X.Cmp(oSK.X) != 0 || cSK.Y.Cmp(oSK.Y) != 0 {
+ return false
+ }
+ return c.x509Cert.Equal(o.x509Cert)
+ }
+ return false
+ default:
+ return false
+ }
+}
+
+// Expires returns the timestamp after which this certificate is no longer valid.
+func (c Certificate) Expires() time.Time {
+ if c.x509Cert == nil {
+ return time.Time{}
+ }
+ return c.x509Cert.NotAfter
+}
+
+// GetFingerprints returns the list of certificate fingerprints, one of which
+// is computed with the digest algorithm used in the certificate signature.
+func (c Certificate) GetFingerprints() ([]DTLSFingerprint, error) {
+ fingerprintAlgorithms := []crypto.Hash{crypto.SHA256}
+ res := make([]DTLSFingerprint, len(fingerprintAlgorithms))
+
+ i := 0
+ for _, algo := range fingerprintAlgorithms {
+ name, err := fingerprint.StringFromHash(algo)
+ if err != nil {
+ return nil, fmt.Errorf("%w: %v", ErrFailedToGenerateCertificateFingerprint, err)
+ }
+ value, err := fingerprint.Fingerprint(c.x509Cert, algo)
+ if err != nil {
+ return nil, fmt.Errorf("%w: %v", ErrFailedToGenerateCertificateFingerprint, err)
+ }
+ res[i] = DTLSFingerprint{
+ Algorithm: name,
+ Value: value,
+ }
+ }
+
+ return res[:i+1], nil
+}
+
+// GenerateCertificate causes the creation of an X.509 certificate and
+// corresponding private key.
+func GenerateCertificate(secretKey crypto.PrivateKey) (*Certificate, error) {
+ origin := make([]byte, 16)
+ /* #nosec */
+ if _, err := rand.Read(origin); err != nil {
+ return nil, &rtcerr.UnknownError{Err: err}
+ }
+
+ // Max random value, a 130-bits integer, i.e 2^130 - 1
+ maxBigInt := new(big.Int)
+ /* #nosec */
+ maxBigInt.Exp(big.NewInt(2), big.NewInt(130), nil).Sub(maxBigInt, big.NewInt(1))
+ /* #nosec */
+ serialNumber, err := rand.Int(rand.Reader, maxBigInt)
+ if err != nil {
+ return nil, &rtcerr.UnknownError{Err: err}
+ }
+
+ return NewCertificate(secretKey, x509.Certificate{
+ ExtKeyUsage: []x509.ExtKeyUsage{
+ x509.ExtKeyUsageClientAuth,
+ x509.ExtKeyUsageServerAuth,
+ },
+ BasicConstraintsValid: true,
+ NotBefore: time.Now(),
+ KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
+ NotAfter: time.Now().AddDate(0, 1, 0),
+ SerialNumber: serialNumber,
+ Version: 2,
+ Subject: pkix.Name{CommonName: hex.EncodeToString(origin)},
+ IsCA: true,
+ })
+}
+
+// CertificateFromX509 creates a new WebRTC Certificate from a given PrivateKey and Certificate
+//
+// This can be used if you want to share a certificate across multiple PeerConnections
+func CertificateFromX509(privateKey crypto.PrivateKey, certificate *x509.Certificate) Certificate {
+ return Certificate{privateKey, certificate, fmt.Sprintf("certificate-%d", time.Now().UnixNano())}
+}
+
+func (c Certificate) collectStats(report *statsReportCollector) error {
+ report.Collecting()
+
+ fingerPrintAlgo, err := c.GetFingerprints()
+ if err != nil {
+ return err
+ }
+
+ base64Certificate := base64.RawURLEncoding.EncodeToString(c.x509Cert.Raw)
+
+ stats := CertificateStats{
+ Timestamp: statsTimestampFrom(time.Now()),
+ Type: StatsTypeCertificate,
+ ID: c.statsID,
+ Fingerprint: fingerPrintAlgo[0].Value,
+ FingerprintAlgorithm: fingerPrintAlgo[0].Algorithm,
+ Base64Certificate: base64Certificate,
+ IssuerCertificateID: c.x509Cert.Issuer.String(),
+ }
+
+ report.Collect(stats.ID, stats)
+ return nil
+}
diff --git a/vendor/github.com/pion/webrtc/v3/codecov.yml b/vendor/github.com/pion/webrtc/v3/codecov.yml
new file mode 100644
index 0000000..085200a
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/codecov.yml
@@ -0,0 +1,20 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically copied from https://github.com/pion/.goassets repository.
+#
+
+coverage:
+ status:
+ project:
+ default:
+ # Allow decreasing 2% of total coverage to avoid noise.
+ threshold: 2%
+ patch:
+ default:
+ target: 70%
+ only_pulls: true
+
+ignore:
+ - "examples/*"
+ - "examples/**/*"
diff --git a/vendor/github.com/pion/webrtc/v3/configuration.go b/vendor/github.com/pion/webrtc/v3/configuration.go
new file mode 100644
index 0000000..712bab9
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/configuration.go
@@ -0,0 +1,51 @@
+// +build !js
+
+package webrtc
+
+// A Configuration defines how peer-to-peer communication via PeerConnection
+// is established or re-established.
+// Configurations may be set up once and reused across multiple connections.
+// Configurations are treated as readonly. As long as they are unmodified,
+// they are safe for concurrent use.
+type Configuration struct {
+ // ICEServers defines a slice describing servers available to be used by
+ // ICE, such as STUN and TURN servers.
+ ICEServers []ICEServer `json:"iceServers,omitempty"`
+
+ // ICETransportPolicy indicates which candidates the ICEAgent is allowed
+ // to use.
+ ICETransportPolicy ICETransportPolicy `json:"iceTransportPolicy,omitempty"`
+
+ // BundlePolicy indicates which media-bundling policy to use when gathering
+ // ICE candidates.
+ BundlePolicy BundlePolicy `json:"bundlePolicy,omitempty"`
+
+ // RTCPMuxPolicy indicates which rtcp-mux policy to use when gathering ICE
+ // candidates.
+ RTCPMuxPolicy RTCPMuxPolicy `json:"rtcpMuxPolicy,omitempty"`
+
+ // PeerIdentity sets the target peer identity for the PeerConnection.
+ // The PeerConnection will not establish a connection to a remote peer
+ // unless it can be successfully authenticated with the provided name.
+ PeerIdentity string `json:"peerIdentity,omitempty"`
+
+ // Certificates describes a set of certificates that the PeerConnection
+ // uses to authenticate. Valid values for this parameter are created
+ // through calls to the GenerateCertificate function. Although any given
+ // DTLS connection will use only one certificate, this attribute allows the
+ // caller to provide multiple certificates that support different
+ // algorithms. The final certificate will be selected based on the DTLS
+ // handshake, which establishes which certificates are allowed. The
+ // PeerConnection implementation selects which of the certificates is
+ // used for a given connection; how certificates are selected is outside
+ // the scope of this specification. If this value is absent, then a default
+ // set of certificates is generated for each PeerConnection instance.
+ Certificates []Certificate `json:"certificates,omitempty"`
+
+ // ICECandidatePoolSize describes the size of the prefetched ICE pool.
+ ICECandidatePoolSize uint8 `json:"iceCandidatePoolSize,omitempty"`
+
+ // SDPSemantics controls the type of SDP offers accepted by and
+ // SDP answers generated by the PeerConnection.
+ SDPSemantics SDPSemantics `json:"sdpSemantics,omitempty"`
+}
diff --git a/vendor/github.com/pion/webrtc/v3/configuration_common.go b/vendor/github.com/pion/webrtc/v3/configuration_common.go
new file mode 100644
index 0000000..92fc228
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/configuration_common.go
@@ -0,0 +1,24 @@
+package webrtc
+
+import "strings"
+
+// getICEServers side-steps the strict parsing mode of the ice package
+// (as defined in https://tools.ietf.org/html/rfc7064) by copying and then
+// stripping any erroneous queries from "stun(s):" URLs before parsing.
+func (c Configuration) getICEServers() []ICEServer {
+ iceServers := append([]ICEServer{}, c.ICEServers...)
+
+ for iceServersIndex := range iceServers {
+ iceServers[iceServersIndex].URLs = append([]string{}, iceServers[iceServersIndex].URLs...)
+
+ for urlsIndex, rawURL := range iceServers[iceServersIndex].URLs {
+ if strings.HasPrefix(rawURL, "stun") {
+ // strip the query from "stun(s):" if present
+ parts := strings.Split(rawURL, "?")
+ rawURL = parts[0]
+ }
+ iceServers[iceServersIndex].URLs[urlsIndex] = rawURL
+ }
+ }
+ return iceServers
+}
diff --git a/vendor/github.com/pion/webrtc/v3/configuration_js.go b/vendor/github.com/pion/webrtc/v3/configuration_js.go
new file mode 100644
index 0000000..44ab9f3
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/configuration_js.go
@@ -0,0 +1,35 @@
+// +build js,wasm
+
+package webrtc
+
+// Configuration defines a set of parameters to configure how the
+// peer-to-peer communication via PeerConnection is established or
+// re-established.
+type Configuration struct {
+ // ICEServers defines a slice describing servers available to be used by
+ // ICE, such as STUN and TURN servers.
+ ICEServers []ICEServer
+
+ // ICETransportPolicy indicates which candidates the ICEAgent is allowed
+ // to use.
+ ICETransportPolicy ICETransportPolicy
+
+ // BundlePolicy indicates which media-bundling policy to use when gathering
+ // ICE candidates.
+ BundlePolicy BundlePolicy
+
+ // RTCPMuxPolicy indicates which rtcp-mux policy to use when gathering ICE
+ // candidates.
+ RTCPMuxPolicy RTCPMuxPolicy
+
+ // PeerIdentity sets the target peer identity for the PeerConnection.
+ // The PeerConnection will not establish a connection to a remote peer
+ // unless it can be successfully authenticated with the provided name.
+ PeerIdentity string
+
+ // Certificates are not supported in the JavaScript/Wasm bindings.
+ // Certificates []Certificate
+
+ // ICECandidatePoolSize describes the size of the prefetched ICE pool.
+ ICECandidatePoolSize uint8
+}
diff --git a/vendor/github.com/pion/webrtc/v3/constants.go b/vendor/github.com/pion/webrtc/v3/constants.go
new file mode 100644
index 0000000..79d759a
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/constants.go
@@ -0,0 +1,25 @@
+package webrtc
+
+const (
+ // Unknown defines default public constant to use for "enum" like struct
+ // comparisons when no value was defined.
+ Unknown = iota
+ unknownStr = "unknown"
+ ssrcStr = "ssrc"
+
+ // Equal to UDP MTU
+ receiveMTU = 1460
+
+ // simulcastProbeCount is the amount of RTP Packets
+ // that handleUndeclaredSSRC will read and try to dispatch from
+ // mid and rid values
+ simulcastProbeCount = 10
+
+ // simulcastMaxProbeRoutines is how many active routines can be used to probe
+ // If the total amount of incoming SSRCes exceeds this new requests will be ignored
+ simulcastMaxProbeRoutines = 25
+
+ mediaSectionApplication = "application"
+
+ rtpOutboundMTU = 1200
+)
diff --git a/vendor/github.com/pion/webrtc/v3/datachannel.go b/vendor/github.com/pion/webrtc/v3/datachannel.go
new file mode 100644
index 0000000..f391e7f
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/datachannel.go
@@ -0,0 +1,597 @@
+// +build !js
+
+package webrtc
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "math"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/pion/datachannel"
+ "github.com/pion/logging"
+ "github.com/pion/webrtc/v3/pkg/rtcerr"
+)
+
+const dataChannelBufferSize = math.MaxUint16 // message size limit for Chromium
+var errSCTPNotEstablished = errors.New("SCTP not established")
+
+// DataChannel represents a WebRTC DataChannel
+// The DataChannel interface represents a network channel
+// which can be used for bidirectional peer-to-peer transfers of arbitrary data
+type DataChannel struct {
+ mu sync.RWMutex
+
+ statsID string
+ label string
+ ordered bool
+ maxPacketLifeTime *uint16
+ maxRetransmits *uint16
+ protocol string
+ negotiated bool
+ id *uint16
+ readyState atomic.Value // DataChannelState
+ bufferedAmountLowThreshold uint64
+ detachCalled bool
+
+ // The binaryType represents attribute MUST, on getting, return the value to
+ // which it was last set. On setting, if the new value is either the string
+ // "blob" or the string "arraybuffer", then set the IDL attribute to this
+ // new value. Otherwise, throw a SyntaxError. When an DataChannel object
+ // is created, the binaryType attribute MUST be initialized to the string
+ // "blob". This attribute controls how binary data is exposed to scripts.
+ // binaryType string
+
+ onMessageHandler func(DataChannelMessage)
+ openHandlerOnce sync.Once
+ onOpenHandler func()
+ onCloseHandler func()
+ onBufferedAmountLow func()
+ onErrorHandler func(error)
+
+ sctpTransport *SCTPTransport
+ dataChannel *datachannel.DataChannel
+
+ // A reference to the associated api object used by this datachannel
+ api *API
+ log logging.LeveledLogger
+}
+
+// NewDataChannel creates a new DataChannel.
+// This constructor is part of the ORTC API. It is not
+// meant to be used together with the basic WebRTC API.
+func (api *API) NewDataChannel(transport *SCTPTransport, params *DataChannelParameters) (*DataChannel, error) {
+ d, err := api.newDataChannel(params, api.settingEngine.LoggerFactory.NewLogger("ortc"))
+ if err != nil {
+ return nil, err
+ }
+
+ err = d.open(transport)
+ if err != nil {
+ return nil, err
+ }
+
+ return d, nil
+}
+
+// newDataChannel is an internal constructor for the data channel used to
+// create the DataChannel object before the networking is set up.
+func (api *API) newDataChannel(params *DataChannelParameters, log logging.LeveledLogger) (*DataChannel, error) {
+ // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api (Step #5)
+ if len(params.Label) > 65535 {
+ return nil, &rtcerr.TypeError{Err: ErrStringSizeLimit}
+ }
+
+ d := &DataChannel{
+ statsID: fmt.Sprintf("DataChannel-%d", time.Now().UnixNano()),
+ label: params.Label,
+ protocol: params.Protocol,
+ negotiated: params.Negotiated,
+ id: params.ID,
+ ordered: params.Ordered,
+ maxPacketLifeTime: params.MaxPacketLifeTime,
+ maxRetransmits: params.MaxRetransmits,
+ api: api,
+ log: log,
+ }
+
+ d.setReadyState(DataChannelStateConnecting)
+ return d, nil
+}
+
+// open opens the datachannel over the sctp transport
+func (d *DataChannel) open(sctpTransport *SCTPTransport) error {
+ d.mu.Lock()
+ if d.sctpTransport != nil {
+ // already open
+ d.mu.Unlock()
+ return nil
+ }
+ d.sctpTransport = sctpTransport
+
+ if err := d.ensureSCTP(); err != nil {
+ d.mu.Unlock()
+ return err
+ }
+
+ var channelType datachannel.ChannelType
+ var reliabilityParameter uint32
+
+ switch {
+ case d.maxPacketLifeTime == nil && d.maxRetransmits == nil:
+ if d.ordered {
+ channelType = datachannel.ChannelTypeReliable
+ } else {
+ channelType = datachannel.ChannelTypeReliableUnordered
+ }
+
+ case d.maxRetransmits != nil:
+ reliabilityParameter = uint32(*d.maxRetransmits)
+ if d.ordered {
+ channelType = datachannel.ChannelTypePartialReliableRexmit
+ } else {
+ channelType = datachannel.ChannelTypePartialReliableRexmitUnordered
+ }
+ default:
+ reliabilityParameter = uint32(*d.maxPacketLifeTime)
+ if d.ordered {
+ channelType = datachannel.ChannelTypePartialReliableTimed
+ } else {
+ channelType = datachannel.ChannelTypePartialReliableTimedUnordered
+ }
+ }
+
+ cfg := &datachannel.Config{
+ ChannelType: channelType,
+ Priority: datachannel.ChannelPriorityNormal,
+ ReliabilityParameter: reliabilityParameter,
+ Label: d.label,
+ Protocol: d.protocol,
+ Negotiated: d.negotiated,
+ LoggerFactory: d.api.settingEngine.LoggerFactory,
+ }
+
+ if d.id == nil {
+ err := d.sctpTransport.generateAndSetDataChannelID(d.sctpTransport.dtlsTransport.role(), &d.id)
+ if err != nil {
+ return err
+ }
+ }
+
+ dc, err := datachannel.Dial(d.sctpTransport.association, *d.id, cfg)
+ if err != nil {
+ d.mu.Unlock()
+ return err
+ }
+
+ // bufferedAmountLowThreshold and onBufferedAmountLow might be set earlier
+ dc.SetBufferedAmountLowThreshold(d.bufferedAmountLowThreshold)
+ dc.OnBufferedAmountLow(d.onBufferedAmountLow)
+ d.mu.Unlock()
+
+ d.handleOpen(dc)
+ return nil
+}
+
+func (d *DataChannel) ensureSCTP() error {
+ if d.sctpTransport == nil {
+ return errSCTPNotEstablished
+ }
+
+ d.sctpTransport.lock.RLock()
+ defer d.sctpTransport.lock.RUnlock()
+ if d.sctpTransport.association == nil {
+ return errSCTPNotEstablished
+ }
+ return nil
+}
+
+// Transport returns the SCTPTransport instance the DataChannel is sending over.
+func (d *DataChannel) Transport() *SCTPTransport {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+
+ return d.sctpTransport
+}
+
+// After onOpen is complete check that the user called detach
+// and provide an error message if the call was missed
+func (d *DataChannel) checkDetachAfterOpen() {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+
+ if d.api.settingEngine.detach.DataChannels && !d.detachCalled {
+ d.log.Warn("webrtc.DetachDataChannels() enabled but didn't Detach, call Detach from OnOpen")
+ }
+}
+
+// OnOpen sets an event handler which is invoked when
+// the underlying data transport has been established (or re-established).
+func (d *DataChannel) OnOpen(f func()) {
+ d.mu.Lock()
+ d.openHandlerOnce = sync.Once{}
+ d.onOpenHandler = f
+ d.mu.Unlock()
+
+ if d.ReadyState() == DataChannelStateOpen {
+ // If the data channel is already open, call the handler immediately.
+ go d.openHandlerOnce.Do(func() {
+ f()
+ d.checkDetachAfterOpen()
+ })
+ }
+}
+
+func (d *DataChannel) onOpen() {
+ d.mu.RLock()
+ handler := d.onOpenHandler
+ d.mu.RUnlock()
+
+ if handler != nil {
+ go d.openHandlerOnce.Do(func() {
+ handler()
+ d.checkDetachAfterOpen()
+ })
+ }
+}
+
+// OnClose sets an event handler which is invoked when
+// the underlying data transport has been closed.
+func (d *DataChannel) OnClose(f func()) {
+ d.mu.Lock()
+ defer d.mu.Unlock()
+ d.onCloseHandler = f
+}
+
+func (d *DataChannel) onClose() {
+ d.mu.RLock()
+ handler := d.onCloseHandler
+ d.mu.RUnlock()
+
+ if handler != nil {
+ go handler()
+ }
+}
+
+// OnMessage sets an event handler which is invoked on a binary
+// message arrival over the sctp transport from a remote peer.
+// OnMessage can currently receive messages up to 16384 bytes
+// in size. Check out the detach API if you want to use larger
+// message sizes. Note that browser support for larger messages
+// is also limited.
+func (d *DataChannel) OnMessage(f func(msg DataChannelMessage)) {
+ d.mu.Lock()
+ defer d.mu.Unlock()
+ d.onMessageHandler = f
+}
+
+func (d *DataChannel) onMessage(msg DataChannelMessage) {
+ d.mu.RLock()
+ handler := d.onMessageHandler
+ d.mu.RUnlock()
+
+ if handler == nil {
+ return
+ }
+ handler(msg)
+}
+
+func (d *DataChannel) handleOpen(dc *datachannel.DataChannel) {
+ d.mu.Lock()
+ d.dataChannel = dc
+ d.mu.Unlock()
+ d.setReadyState(DataChannelStateOpen)
+
+ d.onOpen()
+
+ d.mu.Lock()
+ defer d.mu.Unlock()
+
+ if !d.api.settingEngine.detach.DataChannels {
+ go d.readLoop()
+ }
+}
+
+// OnError sets an event handler which is invoked when
+// the underlying data transport cannot be read.
+func (d *DataChannel) OnError(f func(err error)) {
+ d.mu.Lock()
+ defer d.mu.Unlock()
+ d.onErrorHandler = f
+}
+
+func (d *DataChannel) onError(err error) {
+ d.mu.RLock()
+ handler := d.onErrorHandler
+ d.mu.RUnlock()
+
+ if handler != nil {
+ go handler(err)
+ }
+}
+
+// See https://github.com/pion/webrtc/issues/1516
+// nolint:gochecknoglobals
+var rlBufPool = sync.Pool{New: func() interface{} {
+ return make([]byte, dataChannelBufferSize)
+}}
+
+func (d *DataChannel) readLoop() {
+ for {
+ buffer := rlBufPool.Get().([]byte)
+ n, isString, err := d.dataChannel.ReadDataChannel(buffer)
+ if err != nil {
+ rlBufPool.Put(buffer) // nolint:staticcheck
+ d.setReadyState(DataChannelStateClosed)
+ if err != io.EOF {
+ d.onError(err)
+ }
+ d.onClose()
+ return
+ }
+
+ m := DataChannelMessage{Data: make([]byte, n), IsString: isString}
+ copy(m.Data, buffer[:n])
+ // The 'staticcheck' pragma is a false positive on the part of the CI linter.
+ rlBufPool.Put(buffer) // nolint:staticcheck
+
+ // NB: Why was DataChannelMessage not passed as a pointer value?
+ d.onMessage(m) // nolint:staticcheck
+ }
+}
+
+// Send sends the binary message to the DataChannel peer
+func (d *DataChannel) Send(data []byte) error {
+ err := d.ensureOpen()
+ if err != nil {
+ return err
+ }
+
+ _, err = d.dataChannel.WriteDataChannel(data, false)
+ return err
+}
+
+// SendText sends the text message to the DataChannel peer
+func (d *DataChannel) SendText(s string) error {
+ err := d.ensureOpen()
+ if err != nil {
+ return err
+ }
+
+ _, err = d.dataChannel.WriteDataChannel([]byte(s), true)
+ return err
+}
+
+func (d *DataChannel) ensureOpen() error {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+ if d.ReadyState() != DataChannelStateOpen {
+ return io.ErrClosedPipe
+ }
+ return nil
+}
+
+// Detach allows you to detach the underlying datachannel. This provides
+// an idiomatic API to work with, however it disables the OnMessage callback.
+// Before calling Detach you have to enable this behavior by calling
+// webrtc.DetachDataChannels(). Combining detached and normal data channels
+// is not supported.
+// Please refer to the data-channels-detach example and the
+// pion/datachannel documentation for the correct way to handle the
+// resulting DataChannel object.
+func (d *DataChannel) Detach() (datachannel.ReadWriteCloser, error) {
+ d.mu.Lock()
+ defer d.mu.Unlock()
+
+ if !d.api.settingEngine.detach.DataChannels {
+ return nil, errDetachNotEnabled
+ }
+
+ if d.dataChannel == nil {
+ return nil, errDetachBeforeOpened
+ }
+
+ d.detachCalled = true
+
+ return d.dataChannel, nil
+}
+
+// Close Closes the DataChannel. It may be called regardless of whether
+// the DataChannel object was created by this peer or the remote peer.
+func (d *DataChannel) Close() error {
+ d.mu.Lock()
+ haveSctpTransport := d.dataChannel != nil
+ d.mu.Unlock()
+
+ if d.ReadyState() == DataChannelStateClosed {
+ return nil
+ }
+
+ d.setReadyState(DataChannelStateClosing)
+ if !haveSctpTransport {
+ return nil
+ }
+
+ return d.dataChannel.Close()
+}
+
+// Label represents a label that can be used to distinguish this
+// DataChannel object from other DataChannel objects. Scripts are
+// allowed to create multiple DataChannel objects with the same label.
+func (d *DataChannel) Label() string {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+
+ return d.label
+}
+
+// Ordered represents if the DataChannel is ordered, and false if
+// out-of-order delivery is allowed.
+func (d *DataChannel) Ordered() bool {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+
+ return d.ordered
+}
+
+// MaxPacketLifeTime represents the length of the time window (msec) during
+// which transmissions and retransmissions may occur in unreliable mode.
+func (d *DataChannel) MaxPacketLifeTime() *uint16 {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+
+ return d.maxPacketLifeTime
+}
+
+// MaxRetransmits represents the maximum number of retransmissions that are
+// attempted in unreliable mode.
+func (d *DataChannel) MaxRetransmits() *uint16 {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+
+ return d.maxRetransmits
+}
+
+// Protocol represents the name of the sub-protocol used with this
+// DataChannel.
+func (d *DataChannel) Protocol() string {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+
+ return d.protocol
+}
+
+// Negotiated represents whether this DataChannel was negotiated by the
+// application (true), or not (false).
+func (d *DataChannel) Negotiated() bool {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+
+ return d.negotiated
+}
+
+// ID represents the ID for this DataChannel. The value is initially
+// null, which is what will be returned if the ID was not provided at
+// channel creation time, and the DTLS role of the SCTP transport has not
+// yet been negotiated. Otherwise, it will return the ID that was either
+// selected by the script or generated. After the ID is set to a non-null
+// value, it will not change.
+func (d *DataChannel) ID() *uint16 {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+
+ return d.id
+}
+
+// ReadyState represents the state of the DataChannel object.
+func (d *DataChannel) ReadyState() DataChannelState {
+ if v := d.readyState.Load(); v != nil {
+ return v.(DataChannelState)
+ }
+ return DataChannelState(0)
+}
+
+// BufferedAmount represents the number of bytes of application data
+// (UTF-8 text and binary data) that have been queued using send(). Even
+// though the data transmission can occur in parallel, the returned value
+// MUST NOT be decreased before the current task yielded back to the event
+// loop to prevent race conditions. The value does not include framing
+// overhead incurred by the protocol, or buffering done by the operating
+// system or network hardware. The value of BufferedAmount slot will only
+// increase with each call to the send() method as long as the ReadyState is
+// open; however, BufferedAmount does not reset to zero once the channel
+// closes.
+func (d *DataChannel) BufferedAmount() uint64 {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+
+ if d.dataChannel == nil {
+ return 0
+ }
+ return d.dataChannel.BufferedAmount()
+}
+
+// BufferedAmountLowThreshold represents the threshold at which the
+// bufferedAmount is considered to be low. When the bufferedAmount decreases
+// from above this threshold to equal or below it, the bufferedamountlow
+// event fires. BufferedAmountLowThreshold is initially zero on each new
+// DataChannel, but the application may change its value at any time.
+// The threshold is set to 0 by default.
+func (d *DataChannel) BufferedAmountLowThreshold() uint64 {
+ d.mu.RLock()
+ defer d.mu.RUnlock()
+
+ if d.dataChannel == nil {
+ return d.bufferedAmountLowThreshold
+ }
+ return d.dataChannel.BufferedAmountLowThreshold()
+}
+
+// SetBufferedAmountLowThreshold is used to update the threshold.
+// See BufferedAmountLowThreshold().
+func (d *DataChannel) SetBufferedAmountLowThreshold(th uint64) {
+ d.mu.Lock()
+ defer d.mu.Unlock()
+
+ d.bufferedAmountLowThreshold = th
+
+ if d.dataChannel != nil {
+ d.dataChannel.SetBufferedAmountLowThreshold(th)
+ }
+}
+
+// OnBufferedAmountLow sets an event handler which is invoked when
+// the number of bytes of outgoing data becomes lower than the
+// BufferedAmountLowThreshold.
+func (d *DataChannel) OnBufferedAmountLow(f func()) {
+ d.mu.Lock()
+ defer d.mu.Unlock()
+
+ d.onBufferedAmountLow = f
+ if d.dataChannel != nil {
+ d.dataChannel.OnBufferedAmountLow(f)
+ }
+}
+
+func (d *DataChannel) getStatsID() string {
+ d.mu.Lock()
+ defer d.mu.Unlock()
+ return d.statsID
+}
+
+func (d *DataChannel) collectStats(collector *statsReportCollector) {
+ collector.Collecting()
+
+ d.mu.Lock()
+ defer d.mu.Unlock()
+
+ stats := DataChannelStats{
+ Timestamp: statsTimestampNow(),
+ Type: StatsTypeDataChannel,
+ ID: d.statsID,
+ Label: d.label,
+ Protocol: d.protocol,
+ // TransportID string `json:"transportId"`
+ State: d.ReadyState(),
+ }
+
+ if d.id != nil {
+ stats.DataChannelIdentifier = int32(*d.id)
+ }
+
+ if d.dataChannel != nil {
+ stats.MessagesSent = d.dataChannel.MessagesSent()
+ stats.BytesSent = d.dataChannel.BytesSent()
+ stats.MessagesReceived = d.dataChannel.MessagesReceived()
+ stats.BytesReceived = d.dataChannel.BytesReceived()
+ }
+
+ collector.Collect(stats.ID, stats)
+}
+
+func (d *DataChannel) setReadyState(r DataChannelState) {
+ d.readyState.Store(r)
+}
diff --git a/vendor/github.com/pion/webrtc/v3/datachannel_js.go b/vendor/github.com/pion/webrtc/v3/datachannel_js.go
new file mode 100644
index 0000000..7aa6d99
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/datachannel_js.go
@@ -0,0 +1,319 @@
+// +build js,wasm
+
+package webrtc
+
+import (
+ "fmt"
+ "syscall/js"
+
+ "github.com/pion/datachannel"
+)
+
+const dataChannelBufferSize = 16384 // Lowest common denominator among browsers
+
+// DataChannel represents a WebRTC DataChannel
+// The DataChannel interface represents a network channel
+// which can be used for bidirectional peer-to-peer transfers of arbitrary data
+type DataChannel struct {
+ // Pointer to the underlying JavaScript RTCPeerConnection object.
+ underlying js.Value
+
+ // Keep track of handlers/callbacks so we can call Release as required by the
+ // syscall/js API. Initially nil.
+ onOpenHandler *js.Func
+ onCloseHandler *js.Func
+ onMessageHandler *js.Func
+ onBufferedAmountLow *js.Func
+
+ // A reference to the associated api object used by this datachannel
+ api *API
+}
+
+// OnOpen sets an event handler which is invoked when
+// the underlying data transport has been established (or re-established).
+func (d *DataChannel) OnOpen(f func()) {
+ if d.onOpenHandler != nil {
+ oldHandler := d.onOpenHandler
+ defer oldHandler.Release()
+ }
+ onOpenHandler := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ go f()
+ return js.Undefined()
+ })
+ d.onOpenHandler = &onOpenHandler
+ d.underlying.Set("onopen", onOpenHandler)
+}
+
+// OnClose sets an event handler which is invoked when
+// the underlying data transport has been closed.
+func (d *DataChannel) OnClose(f func()) {
+ if d.onCloseHandler != nil {
+ oldHandler := d.onCloseHandler
+ defer oldHandler.Release()
+ }
+ onCloseHandler := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ go f()
+ return js.Undefined()
+ })
+ d.onCloseHandler = &onCloseHandler
+ d.underlying.Set("onclose", onCloseHandler)
+}
+
+// OnMessage sets an event handler which is invoked on a binary message arrival
+// from a remote peer. Note that browsers may place limitations on message size.
+func (d *DataChannel) OnMessage(f func(msg DataChannelMessage)) {
+ if d.onMessageHandler != nil {
+ oldHandler := d.onMessageHandler
+ defer oldHandler.Release()
+ }
+ onMessageHandler := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ // pion/webrtc/projects/15
+ data := args[0].Get("data")
+ go func() {
+ // valueToDataChannelMessage may block when handling 'Blob' data
+ // so we need to call it from a new routine. See:
+ // https://pkg.go.dev/syscall/js#FuncOf
+ msg := valueToDataChannelMessage(data)
+ f(msg)
+ }()
+ return js.Undefined()
+ })
+ d.onMessageHandler = &onMessageHandler
+ d.underlying.Set("onmessage", onMessageHandler)
+}
+
+// Send sends the binary message to the DataChannel peer
+func (d *DataChannel) Send(data []byte) (err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ err = recoveryToError(e)
+ }
+ }()
+ array := js.Global().Get("Uint8Array").New(len(data))
+ js.CopyBytesToJS(array, data)
+ d.underlying.Call("send", array)
+ return nil
+}
+
+// SendText sends the text message to the DataChannel peer
+func (d *DataChannel) SendText(s string) (err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ err = recoveryToError(e)
+ }
+ }()
+ d.underlying.Call("send", s)
+ return nil
+}
+
+// Detach allows you to detach the underlying datachannel. This provides
+// an idiomatic API to work with, however it disables the OnMessage callback.
+// Before calling Detach you have to enable this behavior by calling
+// webrtc.DetachDataChannels(). Combining detached and normal data channels
+// is not supported.
+// Please reffer to the data-channels-detach example and the
+// pion/datachannel documentation for the correct way to handle the
+// resulting DataChannel object.
+func (d *DataChannel) Detach() (datachannel.ReadWriteCloser, error) {
+ if !d.api.settingEngine.detach.DataChannels {
+ return nil, fmt.Errorf("enable detaching by calling webrtc.DetachDataChannels()")
+ }
+
+ detached := newDetachedDataChannel(d)
+ return detached, nil
+}
+
+// Close Closes the DataChannel. It may be called regardless of whether
+// the DataChannel object was created by this peer or the remote peer.
+func (d *DataChannel) Close() (err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ err = recoveryToError(e)
+ }
+ }()
+
+ d.underlying.Call("close")
+
+ // Release any handlers as required by the syscall/js API.
+ if d.onOpenHandler != nil {
+ d.onOpenHandler.Release()
+ }
+ if d.onCloseHandler != nil {
+ d.onCloseHandler.Release()
+ }
+ if d.onMessageHandler != nil {
+ d.onMessageHandler.Release()
+ }
+ if d.onBufferedAmountLow != nil {
+ d.onBufferedAmountLow.Release()
+ }
+
+ return nil
+}
+
+// Label represents a label that can be used to distinguish this
+// DataChannel object from other DataChannel objects. Scripts are
+// allowed to create multiple DataChannel objects with the same label.
+func (d *DataChannel) Label() string {
+ return d.underlying.Get("label").String()
+}
+
+// Ordered represents if the DataChannel is ordered, and false if
+// out-of-order delivery is allowed.
+func (d *DataChannel) Ordered() bool {
+ ordered := d.underlying.Get("ordered")
+ if jsValueIsUndefined(ordered) {
+ return true // default is true
+ }
+ return ordered.Bool()
+}
+
+// MaxPacketLifeTime represents the length of the time window (msec) during
+// which transmissions and retransmissions may occur in unreliable mode.
+func (d *DataChannel) MaxPacketLifeTime() *uint16 {
+ if !jsValueIsUndefined(d.underlying.Get("maxPacketLifeTime")) {
+ return valueToUint16Pointer(d.underlying.Get("maxPacketLifeTime"))
+ } else {
+ // See https://bugs.chromium.org/p/chromium/issues/detail?id=696681
+ // Chrome calls this "maxRetransmitTime"
+ return valueToUint16Pointer(d.underlying.Get("maxRetransmitTime"))
+ }
+}
+
+// MaxRetransmits represents the maximum number of retransmissions that are
+// attempted in unreliable mode.
+func (d *DataChannel) MaxRetransmits() *uint16 {
+ return valueToUint16Pointer(d.underlying.Get("maxRetransmits"))
+}
+
+// Protocol represents the name of the sub-protocol used with this
+// DataChannel.
+func (d *DataChannel) Protocol() string {
+ return d.underlying.Get("protocol").String()
+}
+
+// Negotiated represents whether this DataChannel was negotiated by the
+// application (true), or not (false).
+func (d *DataChannel) Negotiated() bool {
+ return d.underlying.Get("negotiated").Bool()
+}
+
+// ID represents the ID for this DataChannel. The value is initially
+// null, which is what will be returned if the ID was not provided at
+// channel creation time. Otherwise, it will return the ID that was either
+// selected by the script or generated. After the ID is set to a non-null
+// value, it will not change.
+func (d *DataChannel) ID() *uint16 {
+ return valueToUint16Pointer(d.underlying.Get("id"))
+}
+
+// ReadyState represents the state of the DataChannel object.
+func (d *DataChannel) ReadyState() DataChannelState {
+ return newDataChannelState(d.underlying.Get("readyState").String())
+}
+
+// BufferedAmount represents the number of bytes of application data
+// (UTF-8 text and binary data) that have been queued using send(). Even
+// though the data transmission can occur in parallel, the returned value
+// MUST NOT be decreased before the current task yielded back to the event
+// loop to prevent race conditions. The value does not include framing
+// overhead incurred by the protocol, or buffering done by the operating
+// system or network hardware. The value of BufferedAmount slot will only
+// increase with each call to the send() method as long as the ReadyState is
+// open; however, BufferedAmount does not reset to zero once the channel
+// closes.
+func (d *DataChannel) BufferedAmount() uint64 {
+ return uint64(d.underlying.Get("bufferedAmount").Int())
+}
+
+// BufferedAmountLowThreshold represents the threshold at which the
+// bufferedAmount is considered to be low. When the bufferedAmount decreases
+// from above this threshold to equal or below it, the bufferedamountlow
+// event fires. BufferedAmountLowThreshold is initially zero on each new
+// DataChannel, but the application may change its value at any time.
+func (d *DataChannel) BufferedAmountLowThreshold() uint64 {
+ return uint64(d.underlying.Get("bufferedAmountLowThreshold").Int())
+}
+
+// SetBufferedAmountLowThreshold is used to update the threshold.
+// See BufferedAmountLowThreshold().
+func (d *DataChannel) SetBufferedAmountLowThreshold(th uint64) {
+ d.underlying.Set("bufferedAmountLowThreshold", th)
+}
+
+// OnBufferedAmountLow sets an event handler which is invoked when
+// the number of bytes of outgoing data becomes lower than the
+// BufferedAmountLowThreshold.
+func (d *DataChannel) OnBufferedAmountLow(f func()) {
+ if d.onBufferedAmountLow != nil {
+ oldHandler := d.onBufferedAmountLow
+ defer oldHandler.Release()
+ }
+ onBufferedAmountLow := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ go f()
+ return js.Undefined()
+ })
+ d.onBufferedAmountLow = &onBufferedAmountLow
+ d.underlying.Set("onbufferedamountlow", onBufferedAmountLow)
+}
+
+// valueToDataChannelMessage converts the given value to a DataChannelMessage.
+// val should be obtained from MessageEvent.data where MessageEvent is received
+// via the RTCDataChannel.onmessage callback.
+func valueToDataChannelMessage(val js.Value) DataChannelMessage {
+ // If val is of type string, the conversion is straightforward.
+ if val.Type() == js.TypeString {
+ return DataChannelMessage{
+ IsString: true,
+ Data: []byte(val.String()),
+ }
+ }
+
+ // For other types, we need to first determine val.constructor.name.
+ constructorName := val.Get("constructor").Get("name").String()
+ var data []byte
+ switch constructorName {
+ case "Uint8Array":
+ // We can easily convert Uint8Array to []byte
+ data = uint8ArrayValueToBytes(val)
+ case "Blob":
+ // Convert the Blob to an ArrayBuffer and then convert the ArrayBuffer
+ // to a Uint8Array.
+ // See: https://developer.mozilla.org/en-US/docs/Web/API/Blob
+
+ // The JavaScript API for reading from the Blob is asynchronous. We use a
+ // channel to signal when reading is done.
+ reader := js.Global().Get("FileReader").New()
+ doneChan := make(chan struct{})
+ reader.Call("addEventListener", "loadend", js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ go func() {
+ // Signal that the FileReader is done reading/loading by sending through
+ // the doneChan.
+ doneChan <- struct{}{}
+ }()
+ return js.Undefined()
+ }))
+
+ reader.Call("readAsArrayBuffer", val)
+
+ // Wait for the FileReader to finish reading/loading.
+ <-doneChan
+
+ // At this point buffer.result is a typed array, which we know how to
+ // handle.
+ buffer := reader.Get("result")
+ uint8Array := js.Global().Get("Uint8Array").New(buffer)
+ data = uint8ArrayValueToBytes(uint8Array)
+ default:
+ // Assume we have an ArrayBufferView type which we can convert to a
+ // Uint8Array in JavaScript.
+ // See: https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView
+ uint8Array := js.Global().Get("Uint8Array").New(val)
+ data = uint8ArrayValueToBytes(uint8Array)
+ }
+
+ return DataChannelMessage{
+ IsString: false,
+ Data: data,
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/datachannel_js_detach.go b/vendor/github.com/pion/webrtc/v3/datachannel_js_detach.go
new file mode 100644
index 0000000..dd0069e
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/datachannel_js_detach.go
@@ -0,0 +1,71 @@
+// +build js,wasm
+
+package webrtc
+
+import (
+ "errors"
+)
+
+type detachedDataChannel struct {
+ dc *DataChannel
+
+ read chan DataChannelMessage
+ done chan struct{}
+}
+
+func newDetachedDataChannel(dc *DataChannel) *detachedDataChannel {
+ read := make(chan DataChannelMessage)
+ done := make(chan struct{})
+
+ // Wire up callbacks
+ dc.OnMessage(func(msg DataChannelMessage) {
+ read <- msg // pion/webrtc/projects/15
+ })
+
+ // pion/webrtc/projects/15
+
+ return &detachedDataChannel{
+ dc: dc,
+ read: read,
+ done: done,
+ }
+}
+
+func (c *detachedDataChannel) Read(p []byte) (int, error) {
+ n, _, err := c.ReadDataChannel(p)
+ return n, err
+}
+
+func (c *detachedDataChannel) ReadDataChannel(p []byte) (int, bool, error) {
+ select {
+ case <-c.done:
+ return 0, false, errors.New("Reader closed")
+ case msg := <-c.read:
+ n := copy(p, msg.Data)
+ if n < len(msg.Data) {
+ return n, msg.IsString, errors.New("Read buffer to small")
+ }
+ return n, msg.IsString, nil
+ }
+}
+
+func (c *detachedDataChannel) Write(p []byte) (n int, err error) {
+ return c.WriteDataChannel(p, false)
+}
+
+func (c *detachedDataChannel) WriteDataChannel(p []byte, isString bool) (n int, err error) {
+ if isString {
+ err = c.dc.SendText(string(p))
+ return len(p), err
+ }
+
+ err = c.dc.Send(p)
+
+ return len(p), err
+}
+
+func (c *detachedDataChannel) Close() error {
+ close(c.done)
+
+ return c.dc.Close()
+}
diff --git a/vendor/github.com/pion/webrtc/v3/datachannelinit.go b/vendor/github.com/pion/webrtc/v3/datachannelinit.go
new file mode 100644
index 0000000..a4320e4
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/datachannelinit.go
@@ -0,0 +1,33 @@
+package webrtc
+
+// DataChannelInit can be used to configure properties of the underlying
+// channel such as data reliability.
+type DataChannelInit struct {
+ // Ordered indicates if data is allowed to be delivered out of order. The
+ // default value of true, guarantees that data will be delivered in order.
+ Ordered *bool
+
+ // MaxPacketLifeTime limits the time (in milliseconds) during which the
+ // channel will transmit or retransmit data if not acknowledged. This value
+ // may be clamped if it exceeds the maximum value supported.
+ MaxPacketLifeTime *uint16
+
+ // MaxRetransmits limits the number of times a channel will retransmit data
+ // if not successfully delivered. This value may be clamped if it exceeds
+ // the maximum value supported.
+ MaxRetransmits *uint16
+
+ // Protocol describes the subprotocol name used for this channel.
+ Protocol *string
+
+ // Negotiated describes if the data channel is created by the local peer or
+ // the remote peer. The default value of false tells the user agent to
+ // announce the channel in-band and instruct the other peer to dispatch a
+ // corresponding DataChannel. If set to true, it is up to the application
+ // to negotiate the channel and create an DataChannel with the same id
+ // at the other peer.
+ Negotiated *bool
+
+ // ID overrides the default selection of ID for this channel.
+ ID *uint16
+}
diff --git a/vendor/github.com/pion/webrtc/v3/datachannelmessage.go b/vendor/github.com/pion/webrtc/v3/datachannelmessage.go
new file mode 100644
index 0000000..1e3c63b
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/datachannelmessage.go
@@ -0,0 +1,10 @@
+package webrtc
+
+// DataChannelMessage represents a message received from the
+// data channel. IsString will be set to true if the incoming
+// message is of the string type. Otherwise the message is of
+// a binary type.
+type DataChannelMessage struct {
+ IsString bool
+ Data []byte
+}
diff --git a/vendor/github.com/pion/webrtc/v3/datachannelparameters.go b/vendor/github.com/pion/webrtc/v3/datachannelparameters.go
new file mode 100644
index 0000000..d67a63b
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/datachannelparameters.go
@@ -0,0 +1,12 @@
+package webrtc
+
+// DataChannelParameters describes the configuration of the DataChannel.
+type DataChannelParameters struct {
+ Label string `json:"label"`
+ Protocol string `json:"protocol"`
+ ID *uint16 `json:"id"`
+ Ordered bool `json:"ordered"`
+ MaxPacketLifeTime *uint16 `json:"maxPacketLifeTime"`
+ MaxRetransmits *uint16 `json:"maxRetransmits"`
+ Negotiated bool `json:"negotiated"`
+}
diff --git a/vendor/github.com/pion/webrtc/v3/datachannelstate.go b/vendor/github.com/pion/webrtc/v3/datachannelstate.go
new file mode 100644
index 0000000..a2c7b95
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/datachannelstate.go
@@ -0,0 +1,61 @@
+package webrtc
+
+// DataChannelState indicates the state of a data channel.
+type DataChannelState int
+
+const (
+ // DataChannelStateConnecting indicates that the data channel is being
+ // established. This is the initial state of DataChannel, whether created
+ // with CreateDataChannel, or dispatched as a part of an DataChannelEvent.
+ DataChannelStateConnecting DataChannelState = iota + 1
+
+ // DataChannelStateOpen indicates that the underlying data transport is
+ // established and communication is possible.
+ DataChannelStateOpen
+
+ // DataChannelStateClosing indicates that the procedure to close down the
+ // underlying data transport has started.
+ DataChannelStateClosing
+
+ // DataChannelStateClosed indicates that the underlying data transport
+ // has been closed or could not be established.
+ DataChannelStateClosed
+)
+
+// This is done this way because of a linter.
+const (
+ dataChannelStateConnectingStr = "connecting"
+ dataChannelStateOpenStr = "open"
+ dataChannelStateClosingStr = "closing"
+ dataChannelStateClosedStr = "closed"
+)
+
+func newDataChannelState(raw string) DataChannelState {
+ switch raw {
+ case dataChannelStateConnectingStr:
+ return DataChannelStateConnecting
+ case dataChannelStateOpenStr:
+ return DataChannelStateOpen
+ case dataChannelStateClosingStr:
+ return DataChannelStateClosing
+ case dataChannelStateClosedStr:
+ return DataChannelStateClosed
+ default:
+ return DataChannelState(Unknown)
+ }
+}
+
+func (t DataChannelState) String() string {
+ switch t {
+ case DataChannelStateConnecting:
+ return dataChannelStateConnectingStr
+ case DataChannelStateOpen:
+ return dataChannelStateOpenStr
+ case DataChannelStateClosing:
+ return dataChannelStateClosingStr
+ case DataChannelStateClosed:
+ return dataChannelStateClosedStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/dtlsfingerprint.go b/vendor/github.com/pion/webrtc/v3/dtlsfingerprint.go
new file mode 100644
index 0000000..db13d3e
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/dtlsfingerprint.go
@@ -0,0 +1,14 @@
+package webrtc
+
+// DTLSFingerprint specifies the hash function algorithm and certificate
+// fingerprint as described in https://tools.ietf.org/html/rfc4572.
+type DTLSFingerprint struct {
+ // Algorithm specifies one of the the hash function algorithms defined in
+ // the 'Hash function Textual Names' registry.
+ Algorithm string `json:"algorithm"`
+
+ // Value specifies the value of the certificate fingerprint in lowercase
+ // hex string as expressed utilizing the syntax of 'fingerprint' in
+ // https://tools.ietf.org/html/rfc4572#section-5.
+ Value string `json:"value"`
+}
diff --git a/vendor/github.com/pion/webrtc/v3/dtlsparameters.go b/vendor/github.com/pion/webrtc/v3/dtlsparameters.go
new file mode 100644
index 0000000..4b4b568
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/dtlsparameters.go
@@ -0,0 +1,7 @@
+package webrtc
+
+// DTLSParameters holds information relating to DTLS configuration.
+type DTLSParameters struct {
+ Role DTLSRole `json:"role"`
+ Fingerprints []DTLSFingerprint `json:"fingerprints"`
+}
diff --git a/vendor/github.com/pion/webrtc/v3/dtlsrole.go b/vendor/github.com/pion/webrtc/v3/dtlsrole.go
new file mode 100644
index 0000000..6e67f60
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/dtlsrole.go
@@ -0,0 +1,92 @@
+package webrtc
+
+import (
+ "github.com/pion/sdp/v3"
+)
+
+// DTLSRole indicates the role of the DTLS transport.
+type DTLSRole byte
+
+const (
+ // DTLSRoleAuto defines the DTLS role is determined based on
+ // the resolved ICE role: the ICE controlled role acts as the DTLS
+ // client and the ICE controlling role acts as the DTLS server.
+ DTLSRoleAuto DTLSRole = iota + 1
+
+ // DTLSRoleClient defines the DTLS client role.
+ DTLSRoleClient
+
+ // DTLSRoleServer defines the DTLS server role.
+ DTLSRoleServer
+)
+
+const (
+ // https://tools.ietf.org/html/rfc5763
+ /*
+ The answerer MUST use either a
+ setup attribute value of setup:active or setup:passive. Note that
+ if the answerer uses setup:passive, then the DTLS handshake will
+ not begin until the answerer is received, which adds additional
+ latency. setup:active allows the answer and the DTLS handshake to
+ occur in parallel. Thus, setup:active is RECOMMENDED.
+ */
+ defaultDtlsRoleAnswer = DTLSRoleClient
+ /*
+ The endpoint that is the offerer MUST use the setup attribute
+ value of setup:actpass and be prepared to receive a client_hello
+ before it receives the answer.
+ */
+ defaultDtlsRoleOffer = DTLSRoleAuto
+)
+
+func (r DTLSRole) String() string {
+ switch r {
+ case DTLSRoleAuto:
+ return "auto"
+ case DTLSRoleClient:
+ return "client"
+ case DTLSRoleServer:
+ return "server"
+ default:
+ return unknownStr
+ }
+}
+
+// Iterate a SessionDescription from a remote to determine if an explicit
+// role can been determined from it. The decision is made from the first role we we parse.
+// If no role can be found we return DTLSRoleAuto
+func dtlsRoleFromRemoteSDP(sessionDescription *sdp.SessionDescription) DTLSRole {
+ if sessionDescription == nil {
+ return DTLSRoleAuto
+ }
+
+ for _, mediaSection := range sessionDescription.MediaDescriptions {
+ for _, attribute := range mediaSection.Attributes {
+ if attribute.Key == "setup" {
+ switch attribute.Value {
+ case sdp.ConnectionRoleActive.String():
+ return DTLSRoleClient
+ case sdp.ConnectionRolePassive.String():
+ return DTLSRoleServer
+ default:
+ return DTLSRoleAuto
+ }
+ }
+ }
+ }
+
+ return DTLSRoleAuto
+}
+
+func connectionRoleFromDtlsRole(d DTLSRole) sdp.ConnectionRole {
+ switch d {
+ case DTLSRoleClient:
+ return sdp.ConnectionRoleActive
+ case DTLSRoleServer:
+ return sdp.ConnectionRolePassive
+ case DTLSRoleAuto:
+ return sdp.ConnectionRoleActpass
+ default:
+ return sdp.ConnectionRole(0)
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/dtlstransport.go b/vendor/github.com/pion/webrtc/v3/dtlstransport.go
new file mode 100644
index 0000000..cc25889
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/dtlstransport.go
@@ -0,0 +1,430 @@
+// +build !js
+
+package webrtc
+
+import (
+ "crypto/ecdsa"
+ "crypto/elliptic"
+ "crypto/rand"
+ "crypto/tls"
+ "crypto/x509"
+ "errors"
+ "fmt"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/pion/dtls/v2"
+ "github.com/pion/dtls/v2/pkg/crypto/fingerprint"
+ "github.com/pion/logging"
+ "github.com/pion/srtp/v2"
+ "github.com/pion/webrtc/v3/internal/mux"
+ "github.com/pion/webrtc/v3/internal/util"
+ "github.com/pion/webrtc/v3/pkg/rtcerr"
+)
+
+// DTLSTransport allows an application access to information about the DTLS
+// transport over which RTP and RTCP packets are sent and received by
+// RTPSender and RTPReceiver, as well other data such as SCTP packets sent
+// and received by data channels.
+type DTLSTransport struct {
+ lock sync.RWMutex
+
+ iceTransport *ICETransport
+ certificates []Certificate
+ remoteParameters DTLSParameters
+ remoteCertificate []byte
+ state DTLSTransportState
+ srtpProtectionProfile srtp.ProtectionProfile
+
+ onStateChangeHandler func(DTLSTransportState)
+
+ conn *dtls.Conn
+
+ srtpSession, srtcpSession atomic.Value
+ srtpEndpoint, srtcpEndpoint *mux.Endpoint
+ simulcastStreams []*srtp.ReadStreamSRTP
+ srtpReady chan struct{}
+
+ dtlsMatcher mux.MatchFunc
+
+ api *API
+ log logging.LeveledLogger
+}
+
+// NewDTLSTransport creates a new DTLSTransport.
+// This constructor is part of the ORTC API. It is not
+// meant to be used together with the basic WebRTC API.
+func (api *API) NewDTLSTransport(transport *ICETransport, certificates []Certificate) (*DTLSTransport, error) {
+ t := &DTLSTransport{
+ iceTransport: transport,
+ api: api,
+ state: DTLSTransportStateNew,
+ dtlsMatcher: mux.MatchDTLS,
+ srtpReady: make(chan struct{}),
+ log: api.settingEngine.LoggerFactory.NewLogger("DTLSTransport"),
+ }
+
+ if len(certificates) > 0 {
+ now := time.Now()
+ for _, x509Cert := range certificates {
+ if !x509Cert.Expires().IsZero() && now.After(x509Cert.Expires()) {
+ return nil, &rtcerr.InvalidAccessError{Err: ErrCertificateExpired}
+ }
+ t.certificates = append(t.certificates, x509Cert)
+ }
+ } else {
+ sk, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
+ if err != nil {
+ return nil, &rtcerr.UnknownError{Err: err}
+ }
+ certificate, err := GenerateCertificate(sk)
+ if err != nil {
+ return nil, err
+ }
+ t.certificates = []Certificate{*certificate}
+ }
+
+ return t, nil
+}
+
+// ICETransport returns the currently-configured *ICETransport or nil
+// if one has not been configured
+func (t *DTLSTransport) ICETransport() *ICETransport {
+ t.lock.RLock()
+ defer t.lock.RUnlock()
+ return t.iceTransport
+}
+
+// onStateChange requires the caller holds the lock
+func (t *DTLSTransport) onStateChange(state DTLSTransportState) {
+ t.state = state
+ handler := t.onStateChangeHandler
+ if handler != nil {
+ handler(state)
+ }
+}
+
+// OnStateChange sets a handler that is fired when the DTLS
+// connection state changes.
+func (t *DTLSTransport) OnStateChange(f func(DTLSTransportState)) {
+ t.lock.Lock()
+ defer t.lock.Unlock()
+ t.onStateChangeHandler = f
+}
+
+// State returns the current dtls transport state.
+func (t *DTLSTransport) State() DTLSTransportState {
+ t.lock.RLock()
+ defer t.lock.RUnlock()
+ return t.state
+}
+
+// GetLocalParameters returns the DTLS parameters of the local DTLSTransport upon construction.
+func (t *DTLSTransport) GetLocalParameters() (DTLSParameters, error) {
+ fingerprints := []DTLSFingerprint{}
+
+ for _, c := range t.certificates {
+ prints, err := c.GetFingerprints()
+ if err != nil {
+ return DTLSParameters{}, err
+ }
+
+ fingerprints = append(fingerprints, prints...)
+ }
+
+ return DTLSParameters{
+ Role: DTLSRoleAuto, // always returns the default role
+ Fingerprints: fingerprints,
+ }, nil
+}
+
+// GetRemoteCertificate returns the certificate chain in use by the remote side
+// returns an empty list prior to selection of the remote certificate
+func (t *DTLSTransport) GetRemoteCertificate() []byte {
+ t.lock.RLock()
+ defer t.lock.RUnlock()
+ return t.remoteCertificate
+}
+
+func (t *DTLSTransport) startSRTP() error {
+ srtpConfig := &srtp.Config{
+ Profile: t.srtpProtectionProfile,
+ BufferFactory: t.api.settingEngine.BufferFactory,
+ LoggerFactory: t.api.settingEngine.LoggerFactory,
+ }
+ if t.api.settingEngine.replayProtection.SRTP != nil {
+ srtpConfig.RemoteOptions = append(
+ srtpConfig.RemoteOptions,
+ srtp.SRTPReplayProtection(*t.api.settingEngine.replayProtection.SRTP),
+ )
+ }
+
+ if t.api.settingEngine.disableSRTPReplayProtection {
+ srtpConfig.RemoteOptions = append(
+ srtpConfig.RemoteOptions,
+ srtp.SRTPNoReplayProtection(),
+ )
+ }
+
+ if t.api.settingEngine.replayProtection.SRTCP != nil {
+ srtpConfig.RemoteOptions = append(
+ srtpConfig.RemoteOptions,
+ srtp.SRTCPReplayProtection(*t.api.settingEngine.replayProtection.SRTCP),
+ )
+ }
+
+ if t.api.settingEngine.disableSRTCPReplayProtection {
+ srtpConfig.RemoteOptions = append(
+ srtpConfig.RemoteOptions,
+ srtp.SRTCPNoReplayProtection(),
+ )
+ }
+
+ connState := t.conn.ConnectionState()
+ err := srtpConfig.ExtractSessionKeysFromDTLS(&connState, t.role() == DTLSRoleClient)
+ if err != nil {
+ return fmt.Errorf("%w: %v", errDtlsKeyExtractionFailed, err)
+ }
+
+ srtpSession, err := srtp.NewSessionSRTP(t.srtpEndpoint, srtpConfig)
+ if err != nil {
+ return fmt.Errorf("%w: %v", errFailedToStartSRTP, err)
+ }
+
+ srtcpSession, err := srtp.NewSessionSRTCP(t.srtcpEndpoint, srtpConfig)
+ if err != nil {
+ return fmt.Errorf("%w: %v", errFailedToStartSRTCP, err)
+ }
+
+ t.srtpSession.Store(srtpSession)
+ t.srtcpSession.Store(srtcpSession)
+ close(t.srtpReady)
+ return nil
+}
+
+func (t *DTLSTransport) getSRTPSession() (*srtp.SessionSRTP, error) {
+ if value := t.srtpSession.Load(); value != nil {
+ return value.(*srtp.SessionSRTP), nil
+ }
+
+ return nil, errDtlsTransportNotStarted
+}
+
+func (t *DTLSTransport) getSRTCPSession() (*srtp.SessionSRTCP, error) {
+ if value := t.srtcpSession.Load(); value != nil {
+ return value.(*srtp.SessionSRTCP), nil
+ }
+
+ return nil, errDtlsTransportNotStarted
+}
+
+func (t *DTLSTransport) role() DTLSRole {
+ // If remote has an explicit role use the inverse
+ switch t.remoteParameters.Role {
+ case DTLSRoleClient:
+ return DTLSRoleServer
+ case DTLSRoleServer:
+ return DTLSRoleClient
+ default:
+ }
+
+ // If SettingEngine has an explicit role
+ switch t.api.settingEngine.answeringDTLSRole {
+ case DTLSRoleServer:
+ return DTLSRoleServer
+ case DTLSRoleClient:
+ return DTLSRoleClient
+ default:
+ }
+
+ // Remote was auto and no explicit role was configured via SettingEngine
+ if t.iceTransport.Role() == ICERoleControlling {
+ return DTLSRoleServer
+ }
+ return defaultDtlsRoleAnswer
+}
+
+// Start DTLS transport negotiation with the parameters of the remote DTLS transport
+func (t *DTLSTransport) Start(remoteParameters DTLSParameters) error {
+ // Take lock and prepare connection, we must not hold the lock
+ // when connecting
+ prepareTransport := func() (DTLSRole, *dtls.Config, error) {
+ t.lock.Lock()
+ defer t.lock.Unlock()
+
+ if err := t.ensureICEConn(); err != nil {
+ return DTLSRole(0), nil, err
+ }
+
+ if t.state != DTLSTransportStateNew {
+ return DTLSRole(0), nil, &rtcerr.InvalidStateError{Err: fmt.Errorf("%w: %s", errInvalidDTLSStart, t.state)}
+ }
+
+ t.srtpEndpoint = t.iceTransport.NewEndpoint(mux.MatchSRTP)
+ t.srtcpEndpoint = t.iceTransport.NewEndpoint(mux.MatchSRTCP)
+ t.remoteParameters = remoteParameters
+
+ cert := t.certificates[0]
+ t.onStateChange(DTLSTransportStateConnecting)
+
+ return t.role(), &dtls.Config{
+ Certificates: []tls.Certificate{
+ {
+ Certificate: [][]byte{cert.x509Cert.Raw},
+ PrivateKey: cert.privateKey,
+ },
+ },
+ SRTPProtectionProfiles: []dtls.SRTPProtectionProfile{dtls.SRTP_AEAD_AES_128_GCM, dtls.SRTP_AES128_CM_HMAC_SHA1_80},
+ ClientAuth: dtls.RequireAnyClientCert,
+ LoggerFactory: t.api.settingEngine.LoggerFactory,
+ InsecureSkipVerify: true,
+ }, nil
+ }
+
+ var dtlsConn *dtls.Conn
+ dtlsEndpoint := t.iceTransport.NewEndpoint(mux.MatchDTLS)
+ role, dtlsConfig, err := prepareTransport()
+ if err != nil {
+ return err
+ }
+
+ if t.api.settingEngine.replayProtection.DTLS != nil {
+ dtlsConfig.ReplayProtectionWindow = int(*t.api.settingEngine.replayProtection.DTLS)
+ }
+
+ // Connect as DTLS Client/Server, function is blocking and we
+ // must not hold the DTLSTransport lock
+ if role == DTLSRoleClient {
+ dtlsConn, err = dtls.Client(dtlsEndpoint, dtlsConfig)
+ } else {
+ dtlsConn, err = dtls.Server(dtlsEndpoint, dtlsConfig)
+ }
+
+ // Re-take the lock, nothing beyond here is blocking
+ t.lock.Lock()
+ defer t.lock.Unlock()
+
+ if err != nil {
+ t.onStateChange(DTLSTransportStateFailed)
+ return err
+ }
+
+ srtpProfile, ok := dtlsConn.SelectedSRTPProtectionProfile()
+ if !ok {
+ t.onStateChange(DTLSTransportStateFailed)
+ return ErrNoSRTPProtectionProfile
+ }
+
+ switch srtpProfile {
+ case dtls.SRTP_AEAD_AES_128_GCM:
+ t.srtpProtectionProfile = srtp.ProtectionProfileAeadAes128Gcm
+ case dtls.SRTP_AES128_CM_HMAC_SHA1_80:
+ t.srtpProtectionProfile = srtp.ProtectionProfileAes128CmHmacSha1_80
+ default:
+ t.onStateChange(DTLSTransportStateFailed)
+ return ErrNoSRTPProtectionProfile
+ }
+
+ if t.api.settingEngine.disableCertificateFingerprintVerification {
+ return nil
+ }
+
+ // Check the fingerprint if a certificate was exchanged
+ remoteCerts := dtlsConn.ConnectionState().PeerCertificates
+ if len(remoteCerts) == 0 {
+ t.onStateChange(DTLSTransportStateFailed)
+ return errNoRemoteCertificate
+ }
+ t.remoteCertificate = remoteCerts[0]
+
+ parsedRemoteCert, err := x509.ParseCertificate(t.remoteCertificate)
+ if err != nil {
+ if closeErr := dtlsConn.Close(); closeErr != nil {
+ t.log.Error(err.Error())
+ }
+
+ t.onStateChange(DTLSTransportStateFailed)
+ return err
+ }
+
+ if err = t.validateFingerPrint(parsedRemoteCert); err != nil {
+ if closeErr := dtlsConn.Close(); closeErr != nil {
+ t.log.Error(err.Error())
+ }
+
+ t.onStateChange(DTLSTransportStateFailed)
+ return err
+ }
+
+ t.conn = dtlsConn
+ t.onStateChange(DTLSTransportStateConnected)
+
+ return t.startSRTP()
+}
+
+// Stop stops and closes the DTLSTransport object.
+func (t *DTLSTransport) Stop() error {
+ t.lock.Lock()
+ defer t.lock.Unlock()
+
+ // Try closing everything and collect the errors
+ var closeErrs []error
+
+ if srtpSessionValue := t.srtpSession.Load(); srtpSessionValue != nil {
+ closeErrs = append(closeErrs, srtpSessionValue.(*srtp.SessionSRTP).Close())
+ }
+
+ if srtcpSessionValue := t.srtcpSession.Load(); srtcpSessionValue != nil {
+ closeErrs = append(closeErrs, srtcpSessionValue.(*srtp.SessionSRTCP).Close())
+ }
+
+ for i := range t.simulcastStreams {
+ closeErrs = append(closeErrs, t.simulcastStreams[i].Close())
+ }
+
+ if t.conn != nil {
+ // dtls connection may be closed on sctp close.
+ if err := t.conn.Close(); err != nil && !errors.Is(err, dtls.ErrConnClosed) {
+ closeErrs = append(closeErrs, err)
+ }
+ }
+ t.onStateChange(DTLSTransportStateClosed)
+ return util.FlattenErrs(closeErrs)
+}
+
+func (t *DTLSTransport) validateFingerPrint(remoteCert *x509.Certificate) error {
+ for _, fp := range t.remoteParameters.Fingerprints {
+ hashAlgo, err := fingerprint.HashFromString(fp.Algorithm)
+ if err != nil {
+ return err
+ }
+
+ remoteValue, err := fingerprint.Fingerprint(remoteCert, hashAlgo)
+ if err != nil {
+ return err
+ }
+
+ if strings.EqualFold(remoteValue, fp.Value) {
+ return nil
+ }
+ }
+
+ return errNoMatchingCertificateFingerprint
+}
+
+func (t *DTLSTransport) ensureICEConn() error {
+ if t.iceTransport == nil || t.iceTransport.State() == ICETransportStateNew {
+ return errICEConnectionNotStarted
+ }
+
+ return nil
+}
+
+func (t *DTLSTransport) storeSimulcastStream(s *srtp.ReadStreamSRTP) {
+ t.lock.Lock()
+ defer t.lock.Unlock()
+
+ t.simulcastStreams = append(t.simulcastStreams, s)
+}
diff --git a/vendor/github.com/pion/webrtc/v3/dtlstransportstate.go b/vendor/github.com/pion/webrtc/v3/dtlstransportstate.go
new file mode 100644
index 0000000..900b50b
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/dtlstransportstate.go
@@ -0,0 +1,71 @@
+package webrtc
+
+// DTLSTransportState indicates the DTLS transport establishment state.
+type DTLSTransportState int
+
+const (
+ // DTLSTransportStateNew indicates that DTLS has not started negotiating
+ // yet.
+ DTLSTransportStateNew DTLSTransportState = iota + 1
+
+ // DTLSTransportStateConnecting indicates that DTLS is in the process of
+ // negotiating a secure connection and verifying the remote fingerprint.
+ DTLSTransportStateConnecting
+
+ // DTLSTransportStateConnected indicates that DTLS has completed
+ // negotiation of a secure connection and verified the remote fingerprint.
+ DTLSTransportStateConnected
+
+ // DTLSTransportStateClosed indicates that the transport has been closed
+ // intentionally as the result of receipt of a close_notify alert, or
+ // calling close().
+ DTLSTransportStateClosed
+
+ // DTLSTransportStateFailed indicates that the transport has failed as
+ // the result of an error (such as receipt of an error alert or failure to
+ // validate the remote fingerprint).
+ DTLSTransportStateFailed
+)
+
+// This is done this way because of a linter.
+const (
+ dtlsTransportStateNewStr = "new"
+ dtlsTransportStateConnectingStr = "connecting"
+ dtlsTransportStateConnectedStr = "connected"
+ dtlsTransportStateClosedStr = "closed"
+ dtlsTransportStateFailedStr = "failed"
+)
+
+func newDTLSTransportState(raw string) DTLSTransportState {
+ switch raw {
+ case dtlsTransportStateNewStr:
+ return DTLSTransportStateNew
+ case dtlsTransportStateConnectingStr:
+ return DTLSTransportStateConnecting
+ case dtlsTransportStateConnectedStr:
+ return DTLSTransportStateConnected
+ case dtlsTransportStateClosedStr:
+ return DTLSTransportStateClosed
+ case dtlsTransportStateFailedStr:
+ return DTLSTransportStateFailed
+ default:
+ return DTLSTransportState(Unknown)
+ }
+}
+
+func (t DTLSTransportState) String() string {
+ switch t {
+ case DTLSTransportStateNew:
+ return dtlsTransportStateNewStr
+ case DTLSTransportStateConnecting:
+ return dtlsTransportStateConnectingStr
+ case DTLSTransportStateConnected:
+ return dtlsTransportStateConnectedStr
+ case DTLSTransportStateClosed:
+ return dtlsTransportStateClosedStr
+ case DTLSTransportStateFailed:
+ return dtlsTransportStateFailedStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/errors.go b/vendor/github.com/pion/webrtc/v3/errors.go
new file mode 100644
index 0000000..a9daf16
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/errors.go
@@ -0,0 +1,220 @@
+package webrtc
+
+import (
+ "errors"
+)
+
+var (
+ // ErrUnknownType indicates an error with Unknown info.
+ ErrUnknownType = errors.New("unknown")
+
+ // ErrConnectionClosed indicates an operation executed after connection
+ // has already been closed.
+ ErrConnectionClosed = errors.New("connection closed")
+
+ // ErrDataChannelNotOpen indicates an operation executed when the data
+ // channel is not (yet) open.
+ ErrDataChannelNotOpen = errors.New("data channel not open")
+
+ // ErrCertificateExpired indicates that an x509 certificate has expired.
+ ErrCertificateExpired = errors.New("x509Cert expired")
+
+ // ErrNoTurnCredentials indicates that a TURN server URL was provided
+ // without required credentials.
+ ErrNoTurnCredentials = errors.New("turn server credentials required")
+
+ // ErrTurnCredentials indicates that provided TURN credentials are partial
+ // or malformed.
+ ErrTurnCredentials = errors.New("invalid turn server credentials")
+
+ // ErrExistingTrack indicates that a track already exists.
+ ErrExistingTrack = errors.New("track already exists")
+
+ // ErrPrivateKeyType indicates that a particular private key encryption
+ // chosen to generate a certificate is not supported.
+ ErrPrivateKeyType = errors.New("private key type not supported")
+
+ // ErrModifyingPeerIdentity indicates that an attempt to modify
+ // PeerIdentity was made after PeerConnection has been initialized.
+ ErrModifyingPeerIdentity = errors.New("peerIdentity cannot be modified")
+
+ // ErrModifyingCertificates indicates that an attempt to modify
+ // Certificates was made after PeerConnection has been initialized.
+ ErrModifyingCertificates = errors.New("certificates cannot be modified")
+
+ // ErrModifyingBundlePolicy indicates that an attempt to modify
+ // BundlePolicy was made after PeerConnection has been initialized.
+ ErrModifyingBundlePolicy = errors.New("bundle policy cannot be modified")
+
+ // ErrModifyingRTCPMuxPolicy indicates that an attempt to modify
+ // RTCPMuxPolicy was made after PeerConnection has been initialized.
+ ErrModifyingRTCPMuxPolicy = errors.New("rtcp mux policy cannot be modified")
+
+ // ErrModifyingICECandidatePoolSize indicates that an attempt to modify
+ // ICECandidatePoolSize was made after PeerConnection has been initialized.
+ ErrModifyingICECandidatePoolSize = errors.New("ice candidate pool size cannot be modified")
+
+ // ErrStringSizeLimit indicates that the character size limit of string is
+ // exceeded. The limit is hardcoded to 65535 according to specifications.
+ ErrStringSizeLimit = errors.New("data channel label exceeds size limit")
+
+ // ErrMaxDataChannelID indicates that the maximum number ID that could be
+ // specified for a data channel has been exceeded.
+ ErrMaxDataChannelID = errors.New("maximum number ID for datachannel specified")
+
+ // ErrNegotiatedWithoutID indicates that an attempt to create a data channel
+ // was made while setting the negotiated option to true without providing
+ // the negotiated channel ID.
+ ErrNegotiatedWithoutID = errors.New("negotiated set without channel id")
+
+ // ErrRetransmitsOrPacketLifeTime indicates that an attempt to create a data
+ // channel was made with both options MaxPacketLifeTime and MaxRetransmits
+ // set together. Such configuration is not supported by the specification
+ // and is mutually exclusive.
+ ErrRetransmitsOrPacketLifeTime = errors.New("both MaxPacketLifeTime and MaxRetransmits was set")
+
+ // ErrCodecNotFound is returned when a codec search to the Media Engine fails
+ ErrCodecNotFound = errors.New("codec not found")
+
+ // ErrNoRemoteDescription indicates that an operation was rejected because
+ // the remote description is not set
+ ErrNoRemoteDescription = errors.New("remote description is not set")
+
+ // ErrIncorrectSDPSemantics indicates that the PeerConnection was configured to
+ // generate SDP Answers with different SDP Semantics than the received Offer
+ ErrIncorrectSDPSemantics = errors.New("offer SDP semantics does not match configuration")
+
+ // ErrIncorrectSignalingState indicates that the signaling state of PeerConnection is not correct
+ ErrIncorrectSignalingState = errors.New("operation can not be run in current signaling state")
+
+ // ErrProtocolTooLarge indicates that value given for a DataChannelInit protocol is
+ // longer then 65535 bytes
+ ErrProtocolTooLarge = errors.New("protocol is larger then 65535 bytes")
+
+ // ErrSenderNotCreatedByConnection indicates RemoveTrack was called with a RtpSender not created
+ // by this PeerConnection
+ ErrSenderNotCreatedByConnection = errors.New("RtpSender not created by this PeerConnection")
+
+ // ErrSessionDescriptionNoFingerprint indicates SetRemoteDescription was called with a SessionDescription that has no
+ // fingerprint
+ ErrSessionDescriptionNoFingerprint = errors.New("SetRemoteDescription called with no fingerprint")
+
+ // ErrSessionDescriptionInvalidFingerprint indicates SetRemoteDescription was called with a SessionDescription that
+ // has an invalid fingerprint
+ ErrSessionDescriptionInvalidFingerprint = errors.New("SetRemoteDescription called with an invalid fingerprint")
+
+ // ErrSessionDescriptionConflictingFingerprints indicates SetRemoteDescription was called with a SessionDescription that
+ // has an conflicting fingerprints
+ ErrSessionDescriptionConflictingFingerprints = errors.New("SetRemoteDescription called with multiple conflicting fingerprint")
+
+ // ErrSessionDescriptionMissingIceUfrag indicates SetRemoteDescription was called with a SessionDescription that
+ // is missing an ice-ufrag value
+ ErrSessionDescriptionMissingIceUfrag = errors.New("SetRemoteDescription called with no ice-ufrag")
+
+ // ErrSessionDescriptionMissingIcePwd indicates SetRemoteDescription was called with a SessionDescription that
+ // is missing an ice-pwd value
+ ErrSessionDescriptionMissingIcePwd = errors.New("SetRemoteDescription called with no ice-pwd")
+
+ // ErrSessionDescriptionConflictingIceUfrag indicates SetRemoteDescription was called with a SessionDescription that
+ // contains multiple conflicting ice-ufrag values
+ ErrSessionDescriptionConflictingIceUfrag = errors.New("SetRemoteDescription called with multiple conflicting ice-ufrag values")
+
+ // ErrSessionDescriptionConflictingIcePwd indicates SetRemoteDescription was called with a SessionDescription that
+ // contains multiple conflicting ice-pwd values
+ ErrSessionDescriptionConflictingIcePwd = errors.New("SetRemoteDescription called with multiple conflicting ice-pwd values")
+
+ // ErrNoSRTPProtectionProfile indicates that the DTLS handshake completed and no SRTP Protection Profile was chosen
+ ErrNoSRTPProtectionProfile = errors.New("DTLS Handshake completed and no SRTP Protection Profile was chosen")
+
+ // ErrFailedToGenerateCertificateFingerprint indicates that we failed to generate the fingerprint used for comparing certificates
+ ErrFailedToGenerateCertificateFingerprint = errors.New("failed to generate certificate fingerprint")
+
+ // ErrNoCodecsAvailable indicates that operation isn't possible because the MediaEngine has no codecs available
+ ErrNoCodecsAvailable = errors.New("operation failed no codecs are available")
+
+ // ErrUnsupportedCodec indicates the remote peer doesn't support the requested codec
+ ErrUnsupportedCodec = errors.New("unable to start track, codec is not supported by remote")
+
+ // ErrUnbindFailed indicates that a TrackLocal was not able to be unbind
+ ErrUnbindFailed = errors.New("failed to unbind TrackLocal from PeerConnection")
+
+ // ErrNoPayloaderForCodec indicates that the requested codec does not have a payloader
+ ErrNoPayloaderForCodec = errors.New("the requested codec does not have a payloader")
+
+ // ErrRegisterHeaderExtensionInvalidDirection indicates that a extension was registered with a direction besides `sendonly` or `recvonly`
+ ErrRegisterHeaderExtensionInvalidDirection = errors.New("a header extension must be registered as 'recvonly', 'sendonly' or both")
+
+ // ErrSimulcastProbeOverflow indicates that too many Simulcast probe streams are in flight and the requested SSRC was ignored
+ ErrSimulcastProbeOverflow = errors.New("simulcast probe limit has been reached, new SSRC has been discarded")
+
+ errDetachNotEnabled = errors.New("enable detaching by calling webrtc.DetachDataChannels()")
+ errDetachBeforeOpened = errors.New("datachannel not opened yet, try calling Detach from OnOpen")
+ errDtlsTransportNotStarted = errors.New("the DTLS transport has not started yet")
+ errDtlsKeyExtractionFailed = errors.New("failed extracting keys from DTLS for SRTP")
+ errFailedToStartSRTP = errors.New("failed to start SRTP")
+ errFailedToStartSRTCP = errors.New("failed to start SRTCP")
+ errInvalidDTLSStart = errors.New("attempted to start DTLSTransport that is not in new state")
+ errNoRemoteCertificate = errors.New("peer didn't provide certificate via DTLS")
+ errIdentityProviderNotImplemented = errors.New("identity provider is not implemented")
+ errNoMatchingCertificateFingerprint = errors.New("remote certificate does not match any fingerprint")
+
+ errICEConnectionNotStarted = errors.New("ICE connection not started")
+ errICECandidateTypeUnknown = errors.New("unknown candidate type")
+ errICEInvalidConvertCandidateType = errors.New("cannot convert ice.CandidateType into webrtc.ICECandidateType, invalid type")
+ errICEAgentNotExist = errors.New("ICEAgent does not exist")
+ errICECandiatesCoversionFailed = errors.New("unable to convert ICE candidates to ICECandidates")
+ errICERoleUnknown = errors.New("unknown ICE Role")
+ errICEProtocolUnknown = errors.New("unknown protocol")
+ errICEGathererNotStarted = errors.New("gatherer not started")
+
+ errNetworkTypeUnknown = errors.New("unknown network type")
+
+ errSDPDoesNotMatchOffer = errors.New("new sdp does not match previous offer")
+ errSDPDoesNotMatchAnswer = errors.New("new sdp does not match previous answer")
+ errPeerConnSDPTypeInvalidValue = errors.New("provided value is not a valid enum value of type SDPType")
+ errPeerConnStateChangeInvalid = errors.New("invalid state change op")
+ errPeerConnStateChangeUnhandled = errors.New("unhandled state change op")
+ errPeerConnSDPTypeInvalidValueSetLocalDescription = errors.New("invalid SDP type supplied to SetLocalDescription()")
+ errPeerConnRemoteDescriptionWithoutMidValue = errors.New("remoteDescription contained media section without mid value")
+ errPeerConnRemoteDescriptionNil = errors.New("remoteDescription has not been set yet")
+ errPeerConnSingleMediaSectionHasExplicitSSRC = errors.New("single media section has an explicit SSRC")
+ errPeerConnRemoteSSRCAddTransceiver = errors.New("could not add transceiver for remote SSRC")
+ errPeerConnSimulcastMidRTPExtensionRequired = errors.New("mid RTP Extensions required for Simulcast")
+ errPeerConnSimulcastStreamIDRTPExtensionRequired = errors.New("stream id RTP Extensions required for Simulcast")
+ errPeerConnSimulcastIncomingSSRCFailed = errors.New("incoming SSRC failed Simulcast probing")
+ errPeerConnAddTransceiverFromKindOnlyAcceptsOne = errors.New("AddTransceiverFromKind only accepts one RtpTransceiverInit")
+ errPeerConnAddTransceiverFromTrackOnlyAcceptsOne = errors.New("AddTransceiverFromTrack only accepts one RtpTransceiverInit")
+ errPeerConnAddTransceiverFromKindSupport = errors.New("AddTransceiverFromKind currently only supports recvonly")
+ errPeerConnAddTransceiverFromTrackSupport = errors.New("AddTransceiverFromTrack currently only supports sendonly and sendrecv")
+ errPeerConnSetIdentityProviderNotImplemented = errors.New("TODO SetIdentityProvider")
+ errPeerConnWriteRTCPOpenWriteStream = errors.New("WriteRTCP failed to open WriteStream")
+ errPeerConnTranscieverMidNil = errors.New("cannot find transceiver with mid")
+
+ errRTPReceiverDTLSTransportNil = errors.New("DTLSTransport must not be nil")
+ errRTPReceiverReceiveAlreadyCalled = errors.New("Receive has already been called")
+ errRTPReceiverWithSSRCTrackStreamNotFound = errors.New("unable to find stream for Track with SSRC")
+ errRTPReceiverForSSRCTrackStreamNotFound = errors.New("no trackStreams found for SSRC")
+ errRTPReceiverForRIDTrackStreamNotFound = errors.New("no trackStreams found for RID")
+
+ errRTPSenderTrackNil = errors.New("Track must not be nil")
+ errRTPSenderDTLSTransportNil = errors.New("DTLSTransport must not be nil")
+ errRTPSenderSendAlreadyCalled = errors.New("Send has already been called")
+
+ errRTPTransceiverCannotChangeMid = errors.New("errRTPSenderTrackNil")
+ errRTPTransceiverSetSendingInvalidState = errors.New("invalid state change in RTPTransceiver.setSending")
+
+ errSCTPTransportDTLS = errors.New("DTLS not established")
+
+ errSDPZeroTransceivers = errors.New("addTransceiverSDP() called with 0 transceivers")
+ errSDPMediaSectionMediaDataChanInvalid = errors.New("invalid Media Section. Media + DataChannel both enabled")
+ errSDPMediaSectionMultipleTrackInvalid = errors.New("invalid Media Section. Can not have multiple tracks in one MediaSection in UnifiedPlan")
+
+ errSettingEngineSetAnsweringDTLSRole = errors.New("SetAnsweringDTLSRole must DTLSRoleClient or DTLSRoleServer")
+
+ errSignalingStateCannotRollback = errors.New("can't rollback from stable state")
+ errSignalingStateProposedTransitionInvalid = errors.New("invalid proposed signaling state transition")
+
+ errStatsICECandidateStateInvalid = errors.New("cannot convert to StatsICECandidatePairStateSucceeded invalid ice candidate state")
+
+ errICETransportNotInNew = errors.New("ICETransport can only be called in ICETransportStateNew")
+)
diff --git a/vendor/github.com/pion/webrtc/v3/gathering_complete_promise.go b/vendor/github.com/pion/webrtc/v3/gathering_complete_promise.go
new file mode 100644
index 0000000..a4d52f9
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/gathering_complete_promise.go
@@ -0,0 +1,24 @@
+package webrtc
+
+import (
+ "context"
+)
+
+// GatheringCompletePromise is a Pion specific helper function that returns a channel that is closed when gathering is complete.
+// This function may be helpful in cases where you are unable to trickle your ICE Candidates.
+//
+// It is better to not use this function, and instead trickle candidates. If you use this function you will see longer connection startup times.
+// When the call is connected you will see no impact however.
+func GatheringCompletePromise(pc *PeerConnection) (gatherComplete <-chan struct{}) {
+ gatheringComplete, done := context.WithCancel(context.Background())
+
+ // It's possible to miss the GatherComplete event since setGatherCompleteHandler is an atomic operation and the
+ // promise might have been created after the gathering is finished. Therefore, we need to check if the ICE gathering
+ // state has changed to complete so that we don't block the caller forever.
+ pc.setGatherCompleteHandler(func() { done() })
+ if pc.ICEGatheringState() == ICEGatheringStateComplete {
+ done()
+ }
+
+ return gatheringComplete.Done()
+}
diff --git a/vendor/github.com/pion/webrtc/v3/go.mod b/vendor/github.com/pion/webrtc/v3/go.mod
new file mode 100644
index 0000000..19d5a7e
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/go.mod
@@ -0,0 +1,23 @@
+module github.com/pion/webrtc/v3
+
+go 1.12
+
+require (
+ github.com/onsi/ginkgo v1.14.2 // indirect
+ github.com/onsi/gomega v1.10.3 // indirect
+ github.com/pion/datachannel v1.4.21
+ github.com/pion/dtls/v2 v2.0.8
+ github.com/pion/ice/v2 v2.0.15
+ github.com/pion/interceptor v0.0.10
+ github.com/pion/logging v0.2.2
+ github.com/pion/randutil v0.1.0
+ github.com/pion/rtcp v1.2.6
+ github.com/pion/rtp v1.6.2
+ github.com/pion/sctp v1.7.11
+ github.com/pion/sdp/v3 v3.0.4
+ github.com/pion/srtp/v2 v2.0.2
+ github.com/pion/transport v0.12.2
+ github.com/sclevine/agouti v3.0.0+incompatible
+ github.com/stretchr/testify v1.7.0
+ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
+)
diff --git a/vendor/github.com/pion/webrtc/v3/go.sum b/vendor/github.com/pion/webrtc/v3/go.sum
new file mode 100644
index 0000000..397bbfd
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/go.sum
@@ -0,0 +1,151 @@
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
+github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/uuid v1.1.5 h1:kxhtnfFVi+rYdOALN0B3k9UT86zVJKfBimRaciULW4I=
+github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
+github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
+github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M=
+github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
+github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
+github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
+github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA=
+github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
+github.com/pion/datachannel v1.4.21 h1:3ZvhNyfmxsAqltQrApLPQMhSFNA+aT87RqyCq4OXmf0=
+github.com/pion/datachannel v1.4.21/go.mod h1:oiNyP4gHx2DIwRzX/MFyH0Rz/Gz05OgBlayAI2hAWjg=
+github.com/pion/dtls/v2 v2.0.4 h1:WuUcqi6oYMu/noNTz92QrF1DaFj4eXbhQ6dzaaAwOiI=
+github.com/pion/dtls/v2 v2.0.4/go.mod h1:qAkFscX0ZHoI1E07RfYPoRw3manThveu+mlTDdOxoGI=
+github.com/pion/dtls/v2 v2.0.8 h1:reGe8rNIMfO/UAeFLqO61tl64t154Qfkr4U3Gzu1tsg=
+github.com/pion/dtls/v2 v2.0.8/go.mod h1:QuDII+8FVvk9Dp5t5vYIMTo7hh7uBkra+8QIm7QGm10=
+github.com/pion/ice/v2 v2.0.15 h1:KZrwa2ciL9od8+TUVJiYTNsCW9J5lktBjGwW1MacEnQ=
+github.com/pion/ice/v2 v2.0.15/go.mod h1:ZIiVGevpgAxF/cXiIVmuIUtCb3Xs4gCzCbXB6+nFkSI=
+github.com/pion/interceptor v0.0.10 h1:dXFyFWRJFwmzQqyn0U8dUAbOJu+JJnMVAqxmvTu30B4=
+github.com/pion/interceptor v0.0.10/go.mod h1:qzeuWuD/ZXvPqOnxNcnhWfkCZ2e1kwwslicyyPnhoK4=
+github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
+github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
+github.com/pion/mdns v0.0.4 h1:O4vvVqr4DGX63vzmO6Fw9vpy3lfztVWHGCQfyw0ZLSY=
+github.com/pion/mdns v0.0.4/go.mod h1:R1sL0p50l42S5lJs91oNdUL58nm0QHrhxnSegr++qC0=
+github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
+github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
+github.com/pion/rtcp v1.2.6 h1:1zvwBbyd0TeEuuWftrd/4d++m+/kZSeiguxU61LFWpo=
+github.com/pion/rtcp v1.2.6/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE0=
+github.com/pion/rtp v1.6.2 h1:iGBerLX6JiDjB9NXuaPzHyxHFG9JsIEdgwTC0lp5n/U=
+github.com/pion/rtp v1.6.2/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
+github.com/pion/sctp v1.7.10/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0=
+github.com/pion/sctp v1.7.11 h1:UCnj7MsobLKLuP/Hh+JMiI/6W5Bs/VF45lWKgHFjSIE=
+github.com/pion/sctp v1.7.11/go.mod h1:EhpTUQu1/lcK3xI+eriS6/96fWetHGCvBi9MSsnaBN0=
+github.com/pion/sdp/v3 v3.0.4 h1:2Kf+dgrzJflNCSw3TV5v2VLeI0s/qkzy2r5jlR0wzf8=
+github.com/pion/sdp/v3 v3.0.4/go.mod h1:bNiSknmJE0HYBprTHXKPQ3+JjacTv5uap92ueJZKsRk=
+github.com/pion/srtp/v2 v2.0.2 h1:664iGzVmaY7KYS5M0gleY0DscRo9ReDfTxQrq4UgGoU=
+github.com/pion/srtp/v2 v2.0.2/go.mod h1:VEyLv4CuxrwGY8cxM+Ng3bmVy8ckz/1t6A0q/msKOw0=
+github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg=
+github.com/pion/stun v0.3.5/go.mod h1:gDMim+47EeEtfWogA37n6qXZS88L5V6LqFcf+DZA2UA=
+github.com/pion/transport v0.8.10/go.mod h1:tBmha/UCjpum5hqTWhfAEs3CO4/tHSg0MYRhSzR+CZ8=
+github.com/pion/transport v0.10.0/go.mod h1:BnHnUipd0rZQyTVB2SBGojFHT9CBt5C5TcsJSQGkvSE=
+github.com/pion/transport v0.10.1/go.mod h1:PBis1stIILMiis0PewDw91WJeLJkyIMcEk+DwKOzf4A=
+github.com/pion/transport v0.12.1/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q=
+github.com/pion/transport v0.12.2 h1:WYEjhloRHt1R86LhUKjC5y+P52Y11/QqEUalvtzVoys=
+github.com/pion/transport v0.12.2/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q=
+github.com/pion/turn/v2 v2.0.5 h1:iwMHqDfPEDEOFzwWKT56eFmh6DYC6o/+xnLAEzgISbA=
+github.com/pion/turn/v2 v2.0.5/go.mod h1:APg43CFyt/14Uy7heYUOGWdkem/Wu4PhCO/bjyrTqMw=
+github.com/pion/udp v0.1.0 h1:uGxQsNyrqG3GLINv36Ff60covYmfrLoxzwnCsIYspXI=
+github.com/pion/udp v0.1.0/go.mod h1:BPELIjbwE9PRbd/zxI/KYBnbo7B6+oA6YuEaNE8lths=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/sclevine/agouti v3.0.0+incompatible h1:8IBJS6PWz3uTlMP3YBIR5f+KAldcGuOeFkFbUWfBgK4=
+github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E=
+golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad h1:DN0cp81fZ3njFcrLCytUHRSUkqBjfTo4Tx9RJTWs0EY=
+golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7 h1:3uJsdck53FDIpWwLeAXlia9p4C8j0BO2xZrqzKpL0D8=
+golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew=
+golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
+gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/pion/webrtc/v3/ice_go.go b/vendor/github.com/pion/webrtc/v3/ice_go.go
new file mode 100644
index 0000000..897ed0d
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/ice_go.go
@@ -0,0 +1,10 @@
+// +build !js
+
+package webrtc
+
+// NewICETransport creates a new NewICETransport.
+// This constructor is part of the ORTC API. It is not
+// meant to be used together with the basic WebRTC API.
+func (api *API) NewICETransport(gatherer *ICEGatherer) *ICETransport {
+ return NewICETransport(gatherer, api.settingEngine.LoggerFactory)
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icecandidate.go b/vendor/github.com/pion/webrtc/v3/icecandidate.go
new file mode 100644
index 0000000..1b0fbfc
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icecandidate.go
@@ -0,0 +1,169 @@
+package webrtc
+
+import (
+ "fmt"
+
+ "github.com/pion/ice/v2"
+)
+
+// ICECandidate represents a ice candidate
+type ICECandidate struct {
+ statsID string
+ Foundation string `json:"foundation"`
+ Priority uint32 `json:"priority"`
+ Address string `json:"address"`
+ Protocol ICEProtocol `json:"protocol"`
+ Port uint16 `json:"port"`
+ Typ ICECandidateType `json:"type"`
+ Component uint16 `json:"component"`
+ RelatedAddress string `json:"relatedAddress"`
+ RelatedPort uint16 `json:"relatedPort"`
+ TCPType string `json:"tcpType"`
+}
+
+// Conversion for package ice
+
+func newICECandidatesFromICE(iceCandidates []ice.Candidate) ([]ICECandidate, error) {
+ candidates := []ICECandidate{}
+
+ for _, i := range iceCandidates {
+ c, err := newICECandidateFromICE(i)
+ if err != nil {
+ return nil, err
+ }
+ candidates = append(candidates, c)
+ }
+
+ return candidates, nil
+}
+
+func newICECandidateFromICE(i ice.Candidate) (ICECandidate, error) {
+ typ, err := convertTypeFromICE(i.Type())
+ if err != nil {
+ return ICECandidate{}, err
+ }
+ protocol, err := NewICEProtocol(i.NetworkType().NetworkShort())
+ if err != nil {
+ return ICECandidate{}, err
+ }
+
+ c := ICECandidate{
+ statsID: i.ID(),
+ Foundation: i.Foundation(),
+ Priority: i.Priority(),
+ Address: i.Address(),
+ Protocol: protocol,
+ Port: uint16(i.Port()),
+ Component: i.Component(),
+ Typ: typ,
+ TCPType: i.TCPType().String(),
+ }
+
+ if i.RelatedAddress() != nil {
+ c.RelatedAddress = i.RelatedAddress().Address
+ c.RelatedPort = uint16(i.RelatedAddress().Port)
+ }
+
+ return c, nil
+}
+
+func (c ICECandidate) toICE() (ice.Candidate, error) {
+ candidateID := c.statsID
+ switch c.Typ {
+ case ICECandidateTypeHost:
+ config := ice.CandidateHostConfig{
+ CandidateID: candidateID,
+ Network: c.Protocol.String(),
+ Address: c.Address,
+ Port: int(c.Port),
+ Component: c.Component,
+ TCPType: ice.NewTCPType(c.TCPType),
+ Foundation: c.Foundation,
+ Priority: c.Priority,
+ }
+ return ice.NewCandidateHost(&config)
+ case ICECandidateTypeSrflx:
+ config := ice.CandidateServerReflexiveConfig{
+ CandidateID: candidateID,
+ Network: c.Protocol.String(),
+ Address: c.Address,
+ Port: int(c.Port),
+ Component: c.Component,
+ Foundation: c.Foundation,
+ Priority: c.Priority,
+ RelAddr: c.RelatedAddress,
+ RelPort: int(c.RelatedPort),
+ }
+ return ice.NewCandidateServerReflexive(&config)
+ case ICECandidateTypePrflx:
+ config := ice.CandidatePeerReflexiveConfig{
+ CandidateID: candidateID,
+ Network: c.Protocol.String(),
+ Address: c.Address,
+ Port: int(c.Port),
+ Component: c.Component,
+ Foundation: c.Foundation,
+ Priority: c.Priority,
+ RelAddr: c.RelatedAddress,
+ RelPort: int(c.RelatedPort),
+ }
+ return ice.NewCandidatePeerReflexive(&config)
+ case ICECandidateTypeRelay:
+ config := ice.CandidateRelayConfig{
+ CandidateID: candidateID,
+ Network: c.Protocol.String(),
+ Address: c.Address,
+ Port: int(c.Port),
+ Component: c.Component,
+ Foundation: c.Foundation,
+ Priority: c.Priority,
+ RelAddr: c.RelatedAddress,
+ RelPort: int(c.RelatedPort),
+ }
+ return ice.NewCandidateRelay(&config)
+ default:
+ return nil, fmt.Errorf("%w: %s", errICECandidateTypeUnknown, c.Typ)
+ }
+}
+
+func convertTypeFromICE(t ice.CandidateType) (ICECandidateType, error) {
+ switch t {
+ case ice.CandidateTypeHost:
+ return ICECandidateTypeHost, nil
+ case ice.CandidateTypeServerReflexive:
+ return ICECandidateTypeSrflx, nil
+ case ice.CandidateTypePeerReflexive:
+ return ICECandidateTypePrflx, nil
+ case ice.CandidateTypeRelay:
+ return ICECandidateTypeRelay, nil
+ default:
+ return ICECandidateType(t), fmt.Errorf("%w: %s", errICECandidateTypeUnknown, t)
+ }
+}
+
+func (c ICECandidate) String() string {
+ ic, err := c.toICE()
+ if err != nil {
+ return fmt.Sprintf("%#v failed to convert to ICE: %s", c, err)
+ }
+ return ic.String()
+}
+
+// ToJSON returns an ICECandidateInit
+// as indicated by the spec https://w3c.github.io/webrtc-pc/#dom-rtcicecandidate-tojson
+func (c ICECandidate) ToJSON() ICECandidateInit {
+ zeroVal := uint16(0)
+ emptyStr := ""
+ candidateStr := ""
+
+ candidate, err := c.toICE()
+ if err == nil {
+ candidateStr = candidate.Marshal()
+ }
+
+ return ICECandidateInit{
+ Candidate: fmt.Sprintf("candidate:%s", candidateStr),
+ SDPMid: &emptyStr,
+ SDPMLineIndex: &zeroVal,
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icecandidateinit.go b/vendor/github.com/pion/webrtc/v3/icecandidateinit.go
new file mode 100644
index 0000000..31ebb4b
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icecandidateinit.go
@@ -0,0 +1,9 @@
+package webrtc
+
+// ICECandidateInit is used to serialize ice candidates
+type ICECandidateInit struct {
+ Candidate string `json:"candidate"`
+ SDPMid *string `json:"sdpMid"`
+ SDPMLineIndex *uint16 `json:"sdpMLineIndex"`
+ UsernameFragment *string `json:"usernameFragment"`
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icecandidatepair.go b/vendor/github.com/pion/webrtc/v3/icecandidatepair.go
new file mode 100644
index 0000000..7350fbe
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icecandidatepair.go
@@ -0,0 +1,29 @@
+package webrtc
+
+import "fmt"
+
+// ICECandidatePair represents an ICE Candidate pair
+type ICECandidatePair struct {
+ statsID string
+ Local *ICECandidate
+ Remote *ICECandidate
+}
+
+func newICECandidatePairStatsID(localID, remoteID string) string {
+ return fmt.Sprintf("%s-%s", localID, remoteID)
+}
+
+func (p *ICECandidatePair) String() string {
+ return fmt.Sprintf("(local) %s <-> (remote) %s", p.Local, p.Remote)
+}
+
+// NewICECandidatePair returns an initialized *ICECandidatePair
+// for the given pair of ICECandidate instances
+func NewICECandidatePair(local, remote *ICECandidate) *ICECandidatePair {
+ statsID := newICECandidatePairStatsID(local.statsID, remote.statsID)
+ return &ICECandidatePair{
+ statsID: statsID,
+ Local: local,
+ Remote: remote,
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icecandidatetype.go b/vendor/github.com/pion/webrtc/v3/icecandidatetype.go
new file mode 100644
index 0000000..e57bf14
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icecandidatetype.go
@@ -0,0 +1,94 @@
+package webrtc
+
+import (
+ "fmt"
+
+ "github.com/pion/ice/v2"
+)
+
+// ICECandidateType represents the type of the ICE candidate used.
+type ICECandidateType int
+
+const (
+ // ICECandidateTypeHost indicates that the candidate is of Host type as
+ // described in https://tools.ietf.org/html/rfc8445#section-5.1.1.1. A
+ // candidate obtained by binding to a specific port from an IP address on
+ // the host. This includes IP addresses on physical interfaces and logical
+ // ones, such as ones obtained through VPNs.
+ ICECandidateTypeHost ICECandidateType = iota + 1
+
+ // ICECandidateTypeSrflx indicates the the candidate is of Server
+ // Reflexive type as described
+ // https://tools.ietf.org/html/rfc8445#section-5.1.1.2. A candidate type
+ // whose IP address and port are a binding allocated by a NAT for an ICE
+ // agent after it sends a packet through the NAT to a server, such as a
+ // STUN server.
+ ICECandidateTypeSrflx
+
+ // ICECandidateTypePrflx indicates that the candidate is of Peer
+ // Reflexive type. A candidate type whose IP address and port are a binding
+ // allocated by a NAT for an ICE agent after it sends a packet through the
+ // NAT to its peer.
+ ICECandidateTypePrflx
+
+ // ICECandidateTypeRelay indicates the the candidate is of Relay type as
+ // described in https://tools.ietf.org/html/rfc8445#section-5.1.1.2. A
+ // candidate type obtained from a relay server, such as a TURN server.
+ ICECandidateTypeRelay
+)
+
+// This is done this way because of a linter.
+const (
+ iceCandidateTypeHostStr = "host"
+ iceCandidateTypeSrflxStr = "srflx"
+ iceCandidateTypePrflxStr = "prflx"
+ iceCandidateTypeRelayStr = "relay"
+)
+
+// NewICECandidateType takes a string and converts it into ICECandidateType
+func NewICECandidateType(raw string) (ICECandidateType, error) {
+ switch raw {
+ case iceCandidateTypeHostStr:
+ return ICECandidateTypeHost, nil
+ case iceCandidateTypeSrflxStr:
+ return ICECandidateTypeSrflx, nil
+ case iceCandidateTypePrflxStr:
+ return ICECandidateTypePrflx, nil
+ case iceCandidateTypeRelayStr:
+ return ICECandidateTypeRelay, nil
+ default:
+ return ICECandidateType(Unknown), fmt.Errorf("%w: %s", errICECandidateTypeUnknown, raw)
+ }
+}
+
+func (t ICECandidateType) String() string {
+ switch t {
+ case ICECandidateTypeHost:
+ return iceCandidateTypeHostStr
+ case ICECandidateTypeSrflx:
+ return iceCandidateTypeSrflxStr
+ case ICECandidateTypePrflx:
+ return iceCandidateTypePrflxStr
+ case ICECandidateTypeRelay:
+ return iceCandidateTypeRelayStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+func getCandidateType(candidateType ice.CandidateType) (ICECandidateType, error) {
+ switch candidateType {
+ case ice.CandidateTypeHost:
+ return ICECandidateTypeHost, nil
+ case ice.CandidateTypeServerReflexive:
+ return ICECandidateTypeSrflx, nil
+ case ice.CandidateTypePeerReflexive:
+ return ICECandidateTypePrflx, nil
+ case ice.CandidateTypeRelay:
+ return ICECandidateTypeRelay, nil
+ default:
+ // NOTE: this should never happen[tm]
+ err := fmt.Errorf("%w: %s", errICEInvalidConvertCandidateType, candidateType.String())
+ return ICECandidateType(Unknown), err
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icecomponent.go b/vendor/github.com/pion/webrtc/v3/icecomponent.go
new file mode 100644
index 0000000..1f03ec5
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icecomponent.go
@@ -0,0 +1,47 @@
+package webrtc
+
+// ICEComponent describes if the ice transport is used for RTP
+// (or RTCP multiplexing).
+type ICEComponent int
+
+const (
+ // ICEComponentRTP indicates that the ICE Transport is used for RTP (or
+ // RTCP multiplexing), as defined in
+ // https://tools.ietf.org/html/rfc5245#section-4.1.1.1. Protocols
+ // multiplexed with RTP (e.g. data channel) share its component ID. This
+ // represents the component-id value 1 when encoded in candidate-attribute.
+ ICEComponentRTP ICEComponent = iota + 1
+
+ // ICEComponentRTCP indicates that the ICE Transport is used for RTCP as
+ // defined by https://tools.ietf.org/html/rfc5245#section-4.1.1.1. This
+ // represents the component-id value 2 when encoded in candidate-attribute.
+ ICEComponentRTCP
+)
+
+// This is done this way because of a linter.
+const (
+ iceComponentRTPStr = "rtp"
+ iceComponentRTCPStr = "rtcp"
+)
+
+func newICEComponent(raw string) ICEComponent {
+ switch raw {
+ case iceComponentRTPStr:
+ return ICEComponentRTP
+ case iceComponentRTCPStr:
+ return ICEComponentRTCP
+ default:
+ return ICEComponent(Unknown)
+ }
+}
+
+func (t ICEComponent) String() string {
+ switch t {
+ case ICEComponentRTP:
+ return iceComponentRTPStr
+ case ICEComponentRTCP:
+ return iceComponentRTCPStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/iceconnectionstate.go b/vendor/github.com/pion/webrtc/v3/iceconnectionstate.go
new file mode 100644
index 0000000..22fd269
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/iceconnectionstate.go
@@ -0,0 +1,94 @@
+package webrtc
+
+// ICEConnectionState indicates signaling state of the ICE Connection.
+type ICEConnectionState int
+
+const (
+ // ICEConnectionStateNew indicates that any of the ICETransports are
+ // in the "new" state and none of them are in the "checking", "disconnected"
+ // or "failed" state, or all ICETransports are in the "closed" state, or
+ // there are no transports.
+ ICEConnectionStateNew ICEConnectionState = iota + 1
+
+ // ICEConnectionStateChecking indicates that any of the ICETransports
+ // are in the "checking" state and none of them are in the "disconnected"
+ // or "failed" state.
+ ICEConnectionStateChecking
+
+ // ICEConnectionStateConnected indicates that all ICETransports are
+ // in the "connected", "completed" or "closed" state and at least one of
+ // them is in the "connected" state.
+ ICEConnectionStateConnected
+
+ // ICEConnectionStateCompleted indicates that all ICETransports are
+ // in the "completed" or "closed" state and at least one of them is in the
+ // "completed" state.
+ ICEConnectionStateCompleted
+
+ // ICEConnectionStateDisconnected indicates that any of the
+ // ICETransports are in the "disconnected" state and none of them are
+ // in the "failed" state.
+ ICEConnectionStateDisconnected
+
+ // ICEConnectionStateFailed indicates that any of the ICETransports
+ // are in the "failed" state.
+ ICEConnectionStateFailed
+
+ // ICEConnectionStateClosed indicates that the PeerConnection's
+ // isClosed is true.
+ ICEConnectionStateClosed
+)
+
+// This is done this way because of a linter.
+const (
+ iceConnectionStateNewStr = "new"
+ iceConnectionStateCheckingStr = "checking"
+ iceConnectionStateConnectedStr = "connected"
+ iceConnectionStateCompletedStr = "completed"
+ iceConnectionStateDisconnectedStr = "disconnected"
+ iceConnectionStateFailedStr = "failed"
+ iceConnectionStateClosedStr = "closed"
+)
+
+// NewICEConnectionState takes a string and converts it to ICEConnectionState
+func NewICEConnectionState(raw string) ICEConnectionState {
+ switch raw {
+ case iceConnectionStateNewStr:
+ return ICEConnectionStateNew
+ case iceConnectionStateCheckingStr:
+ return ICEConnectionStateChecking
+ case iceConnectionStateConnectedStr:
+ return ICEConnectionStateConnected
+ case iceConnectionStateCompletedStr:
+ return ICEConnectionStateCompleted
+ case iceConnectionStateDisconnectedStr:
+ return ICEConnectionStateDisconnected
+ case iceConnectionStateFailedStr:
+ return ICEConnectionStateFailed
+ case iceConnectionStateClosedStr:
+ return ICEConnectionStateClosed
+ default:
+ return ICEConnectionState(Unknown)
+ }
+}
+
+func (c ICEConnectionState) String() string {
+ switch c {
+ case ICEConnectionStateNew:
+ return iceConnectionStateNewStr
+ case ICEConnectionStateChecking:
+ return iceConnectionStateCheckingStr
+ case ICEConnectionStateConnected:
+ return iceConnectionStateConnectedStr
+ case ICEConnectionStateCompleted:
+ return iceConnectionStateCompletedStr
+ case ICEConnectionStateDisconnected:
+ return iceConnectionStateDisconnectedStr
+ case ICEConnectionStateFailed:
+ return iceConnectionStateFailedStr
+ case ICEConnectionStateClosed:
+ return iceConnectionStateClosedStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icecredentialtype.go b/vendor/github.com/pion/webrtc/v3/icecredentialtype.go
new file mode 100644
index 0000000..3967c16
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icecredentialtype.go
@@ -0,0 +1,43 @@
+package webrtc
+
+// ICECredentialType indicates the type of credentials used to connect to
+// an ICE server.
+type ICECredentialType int
+
+const (
+ // ICECredentialTypePassword describes username and password based
+ // credentials as described in https://tools.ietf.org/html/rfc5389.
+ ICECredentialTypePassword ICECredentialType = iota
+
+ // ICECredentialTypeOauth describes token based credential as described
+ // in https://tools.ietf.org/html/rfc7635.
+ ICECredentialTypeOauth
+)
+
+// This is done this way because of a linter.
+const (
+ iceCredentialTypePasswordStr = "password"
+ iceCredentialTypeOauthStr = "oauth"
+)
+
+func newICECredentialType(raw string) ICECredentialType {
+ switch raw {
+ case iceCredentialTypePasswordStr:
+ return ICECredentialTypePassword
+ case iceCredentialTypeOauthStr:
+ return ICECredentialTypeOauth
+ default:
+ return ICECredentialType(Unknown)
+ }
+}
+
+func (t ICECredentialType) String() string {
+ switch t {
+ case ICECredentialTypePassword:
+ return iceCredentialTypePasswordStr
+ case ICECredentialTypeOauth:
+ return iceCredentialTypeOauthStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icegatherer.go b/vendor/github.com/pion/webrtc/v3/icegatherer.go
new file mode 100644
index 0000000..31c64ee
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icegatherer.go
@@ -0,0 +1,367 @@
+// +build !js
+
+package webrtc
+
+import (
+ "sync"
+ "sync/atomic"
+
+ "github.com/pion/ice/v2"
+ "github.com/pion/logging"
+)
+
+// ICEGatherer gathers local host, server reflexive and relay
+// candidates, as well as enabling the retrieval of local Interactive
+// Connectivity Establishment (ICE) parameters which can be
+// exchanged in signaling.
+type ICEGatherer struct {
+ lock sync.RWMutex
+ log logging.LeveledLogger
+ state ICEGathererState
+
+ validatedServers []*ice.URL
+ gatherPolicy ICETransportPolicy
+
+ agent *ice.Agent
+
+ onLocalCandidateHandler atomic.Value // func(candidate *ICECandidate)
+ onStateChangeHandler atomic.Value // func(state ICEGathererState)
+
+ // Used for GatheringCompletePromise
+ onGatheringCompleteHandler atomic.Value // func()
+
+ api *API
+}
+
+// NewICEGatherer creates a new NewICEGatherer.
+// This constructor is part of the ORTC API. It is not
+// meant to be used together with the basic WebRTC API.
+func (api *API) NewICEGatherer(opts ICEGatherOptions) (*ICEGatherer, error) {
+ var validatedServers []*ice.URL
+ if len(opts.ICEServers) > 0 {
+ for _, server := range opts.ICEServers {
+ url, err := server.urls()
+ if err != nil {
+ return nil, err
+ }
+ validatedServers = append(validatedServers, url...)
+ }
+ }
+
+ return &ICEGatherer{
+ state: ICEGathererStateNew,
+ gatherPolicy: opts.ICEGatherPolicy,
+ validatedServers: validatedServers,
+ api: api,
+ log: api.settingEngine.LoggerFactory.NewLogger("ice"),
+ }, nil
+}
+
+func (g *ICEGatherer) createAgent() error {
+ g.lock.Lock()
+ defer g.lock.Unlock()
+
+ if g.agent != nil || g.State() != ICEGathererStateNew {
+ return nil
+ }
+
+ candidateTypes := []ice.CandidateType{}
+ if g.api.settingEngine.candidates.ICELite {
+ candidateTypes = append(candidateTypes, ice.CandidateTypeHost)
+ } else if g.gatherPolicy == ICETransportPolicyRelay {
+ candidateTypes = append(candidateTypes, ice.CandidateTypeRelay)
+ }
+
+ var nat1To1CandiTyp ice.CandidateType
+ switch g.api.settingEngine.candidates.NAT1To1IPCandidateType {
+ case ICECandidateTypeHost:
+ nat1To1CandiTyp = ice.CandidateTypeHost
+ case ICECandidateTypeSrflx:
+ nat1To1CandiTyp = ice.CandidateTypeServerReflexive
+ default:
+ nat1To1CandiTyp = ice.CandidateTypeUnspecified
+ }
+
+ mDNSMode := g.api.settingEngine.candidates.MulticastDNSMode
+ if mDNSMode != ice.MulticastDNSModeDisabled && mDNSMode != ice.MulticastDNSModeQueryAndGather {
+ // If enum is in state we don't recognized default to MulticastDNSModeQueryOnly
+ mDNSMode = ice.MulticastDNSModeQueryOnly
+ }
+
+ config := &ice.AgentConfig{
+ Lite: g.api.settingEngine.candidates.ICELite,
+ Urls: g.validatedServers,
+ PortMin: g.api.settingEngine.ephemeralUDP.PortMin,
+ PortMax: g.api.settingEngine.ephemeralUDP.PortMax,
+ DisconnectedTimeout: g.api.settingEngine.timeout.ICEDisconnectedTimeout,
+ FailedTimeout: g.api.settingEngine.timeout.ICEFailedTimeout,
+ KeepaliveInterval: g.api.settingEngine.timeout.ICEKeepaliveInterval,
+ LoggerFactory: g.api.settingEngine.LoggerFactory,
+ CandidateTypes: candidateTypes,
+ HostAcceptanceMinWait: g.api.settingEngine.timeout.ICEHostAcceptanceMinWait,
+ SrflxAcceptanceMinWait: g.api.settingEngine.timeout.ICESrflxAcceptanceMinWait,
+ PrflxAcceptanceMinWait: g.api.settingEngine.timeout.ICEPrflxAcceptanceMinWait,
+ RelayAcceptanceMinWait: g.api.settingEngine.timeout.ICERelayAcceptanceMinWait,
+ InterfaceFilter: g.api.settingEngine.candidates.InterfaceFilter,
+ NAT1To1IPs: g.api.settingEngine.candidates.NAT1To1IPs,
+ NAT1To1IPCandidateType: nat1To1CandiTyp,
+ Net: g.api.settingEngine.vnet,
+ MulticastDNSMode: mDNSMode,
+ MulticastDNSHostName: g.api.settingEngine.candidates.MulticastDNSHostName,
+ LocalUfrag: g.api.settingEngine.candidates.UsernameFragment,
+ LocalPwd: g.api.settingEngine.candidates.Password,
+ TCPMux: g.api.settingEngine.iceTCPMux,
+ ProxyDialer: g.api.settingEngine.iceProxyDialer,
+ }
+
+ requestedNetworkTypes := g.api.settingEngine.candidates.ICENetworkTypes
+ if len(requestedNetworkTypes) == 0 {
+ requestedNetworkTypes = supportedNetworkTypes()
+ }
+
+ for _, typ := range requestedNetworkTypes {
+ config.NetworkTypes = append(config.NetworkTypes, ice.NetworkType(typ))
+ }
+
+ agent, err := ice.NewAgent(config)
+ if err != nil {
+ return err
+ }
+
+ g.agent = agent
+ return nil
+}
+
+// Gather ICE candidates.
+func (g *ICEGatherer) Gather() error {
+ if err := g.createAgent(); err != nil {
+ return err
+ }
+
+ g.lock.Lock()
+ agent := g.agent
+ g.lock.Unlock()
+
+ g.setState(ICEGathererStateGathering)
+ if err := agent.OnCandidate(func(candidate ice.Candidate) {
+ onLocalCandidateHandler := func(*ICECandidate) {}
+ if handler, ok := g.onLocalCandidateHandler.Load().(func(candidate *ICECandidate)); ok && handler != nil {
+ onLocalCandidateHandler = handler
+ }
+
+ onGatheringCompleteHandler := func() {}
+ if handler, ok := g.onGatheringCompleteHandler.Load().(func()); ok && handler != nil {
+ onGatheringCompleteHandler = handler
+ }
+
+ if candidate != nil {
+ c, err := newICECandidateFromICE(candidate)
+ if err != nil {
+ g.log.Warnf("Failed to convert ice.Candidate: %s", err)
+ return
+ }
+ onLocalCandidateHandler(&c)
+ } else {
+ g.setState(ICEGathererStateComplete)
+
+ onGatheringCompleteHandler()
+ onLocalCandidateHandler(nil)
+ }
+ }); err != nil {
+ return err
+ }
+ return agent.GatherCandidates()
+}
+
+// Close prunes all local candidates, and closes the ports.
+func (g *ICEGatherer) Close() error {
+ g.lock.Lock()
+ defer g.lock.Unlock()
+
+ if g.agent == nil {
+ return nil
+ } else if err := g.agent.Close(); err != nil {
+ return err
+ }
+
+ g.agent = nil
+ g.setState(ICEGathererStateClosed)
+
+ return nil
+}
+
+// GetLocalParameters returns the ICE parameters of the ICEGatherer.
+func (g *ICEGatherer) GetLocalParameters() (ICEParameters, error) {
+ if err := g.createAgent(); err != nil {
+ return ICEParameters{}, err
+ }
+
+ frag, pwd, err := g.agent.GetLocalUserCredentials()
+ if err != nil {
+ return ICEParameters{}, err
+ }
+
+ return ICEParameters{
+ UsernameFragment: frag,
+ Password: pwd,
+ ICELite: false,
+ }, nil
+}
+
+// GetLocalCandidates returns the sequence of valid local candidates associated with the ICEGatherer.
+func (g *ICEGatherer) GetLocalCandidates() ([]ICECandidate, error) {
+ if err := g.createAgent(); err != nil {
+ return nil, err
+ }
+ iceCandidates, err := g.agent.GetLocalCandidates()
+ if err != nil {
+ return nil, err
+ }
+
+ return newICECandidatesFromICE(iceCandidates)
+}
+
+// OnLocalCandidate sets an event handler which fires when a new local ICE candidate is available
+// Take note that the handler is gonna be called with a nil pointer when gathering is finished.
+func (g *ICEGatherer) OnLocalCandidate(f func(*ICECandidate)) {
+ g.onLocalCandidateHandler.Store(f)
+}
+
+// OnStateChange fires any time the ICEGatherer changes
+func (g *ICEGatherer) OnStateChange(f func(ICEGathererState)) {
+ g.onStateChangeHandler.Store(f)
+}
+
+// State indicates the current state of the ICE gatherer.
+func (g *ICEGatherer) State() ICEGathererState {
+ return atomicLoadICEGathererState(&g.state)
+}
+
+func (g *ICEGatherer) setState(s ICEGathererState) {
+ atomicStoreICEGathererState(&g.state, s)
+
+ if handler, ok := g.onStateChangeHandler.Load().(func(state ICEGathererState)); ok && handler != nil {
+ handler(s)
+ }
+}
+
+func (g *ICEGatherer) getAgent() *ice.Agent {
+ g.lock.RLock()
+ defer g.lock.RUnlock()
+ return g.agent
+}
+
+func (g *ICEGatherer) collectStats(collector *statsReportCollector) {
+ agent := g.getAgent()
+ if agent == nil {
+ return
+ }
+
+ collector.Collecting()
+ go func(collector *statsReportCollector, agent *ice.Agent) {
+ for _, candidatePairStats := range agent.GetCandidatePairsStats() {
+ collector.Collecting()
+
+ state, err := toStatsICECandidatePairState(candidatePairStats.State)
+ if err != nil {
+ g.log.Error(err.Error())
+ }
+
+ pairID := newICECandidatePairStatsID(candidatePairStats.LocalCandidateID,
+ candidatePairStats.RemoteCandidateID)
+
+ stats := ICECandidatePairStats{
+ Timestamp: statsTimestampFrom(candidatePairStats.Timestamp),
+ Type: StatsTypeCandidatePair,
+ ID: pairID,
+ // TransportID:
+ LocalCandidateID: candidatePairStats.LocalCandidateID,
+ RemoteCandidateID: candidatePairStats.RemoteCandidateID,
+ State: state,
+ Nominated: candidatePairStats.Nominated,
+ PacketsSent: candidatePairStats.PacketsSent,
+ PacketsReceived: candidatePairStats.PacketsReceived,
+ BytesSent: candidatePairStats.BytesSent,
+ BytesReceived: candidatePairStats.BytesReceived,
+ LastPacketSentTimestamp: statsTimestampFrom(candidatePairStats.LastPacketSentTimestamp),
+ LastPacketReceivedTimestamp: statsTimestampFrom(candidatePairStats.LastPacketReceivedTimestamp),
+ FirstRequestTimestamp: statsTimestampFrom(candidatePairStats.FirstRequestTimestamp),
+ LastRequestTimestamp: statsTimestampFrom(candidatePairStats.LastRequestTimestamp),
+ LastResponseTimestamp: statsTimestampFrom(candidatePairStats.LastResponseTimestamp),
+ TotalRoundTripTime: candidatePairStats.TotalRoundTripTime,
+ CurrentRoundTripTime: candidatePairStats.CurrentRoundTripTime,
+ AvailableOutgoingBitrate: candidatePairStats.AvailableOutgoingBitrate,
+ AvailableIncomingBitrate: candidatePairStats.AvailableIncomingBitrate,
+ CircuitBreakerTriggerCount: candidatePairStats.CircuitBreakerTriggerCount,
+ RequestsReceived: candidatePairStats.RequestsReceived,
+ RequestsSent: candidatePairStats.RequestsSent,
+ ResponsesReceived: candidatePairStats.ResponsesReceived,
+ ResponsesSent: candidatePairStats.ResponsesSent,
+ RetransmissionsReceived: candidatePairStats.RetransmissionsReceived,
+ RetransmissionsSent: candidatePairStats.RetransmissionsSent,
+ ConsentRequestsSent: candidatePairStats.ConsentRequestsSent,
+ ConsentExpiredTimestamp: statsTimestampFrom(candidatePairStats.ConsentExpiredTimestamp),
+ }
+ collector.Collect(stats.ID, stats)
+ }
+
+ for _, candidateStats := range agent.GetLocalCandidatesStats() {
+ collector.Collecting()
+
+ networkType, err := getNetworkType(candidateStats.NetworkType)
+ if err != nil {
+ g.log.Error(err.Error())
+ }
+
+ candidateType, err := getCandidateType(candidateStats.CandidateType)
+ if err != nil {
+ g.log.Error(err.Error())
+ }
+
+ stats := ICECandidateStats{
+ Timestamp: statsTimestampFrom(candidateStats.Timestamp),
+ ID: candidateStats.ID,
+ Type: StatsTypeLocalCandidate,
+ NetworkType: networkType,
+ IP: candidateStats.IP,
+ Port: int32(candidateStats.Port),
+ Protocol: networkType.Protocol(),
+ CandidateType: candidateType,
+ Priority: int32(candidateStats.Priority),
+ URL: candidateStats.URL,
+ RelayProtocol: candidateStats.RelayProtocol,
+ Deleted: candidateStats.Deleted,
+ }
+ collector.Collect(stats.ID, stats)
+ }
+
+ for _, candidateStats := range agent.GetRemoteCandidatesStats() {
+ collector.Collecting()
+ networkType, err := getNetworkType(candidateStats.NetworkType)
+ if err != nil {
+ g.log.Error(err.Error())
+ }
+
+ candidateType, err := getCandidateType(candidateStats.CandidateType)
+ if err != nil {
+ g.log.Error(err.Error())
+ }
+
+ stats := ICECandidateStats{
+ Timestamp: statsTimestampFrom(candidateStats.Timestamp),
+ ID: candidateStats.ID,
+ Type: StatsTypeRemoteCandidate,
+ NetworkType: networkType,
+ IP: candidateStats.IP,
+ Port: int32(candidateStats.Port),
+ Protocol: networkType.Protocol(),
+ CandidateType: candidateType,
+ Priority: int32(candidateStats.Priority),
+ URL: candidateStats.URL,
+ RelayProtocol: candidateStats.RelayProtocol,
+ }
+ collector.Collect(stats.ID, stats)
+ }
+ collector.Done()
+ }(collector, agent)
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icegathererstate.go b/vendor/github.com/pion/webrtc/v3/icegathererstate.go
new file mode 100644
index 0000000..80dc77a
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icegathererstate.go
@@ -0,0 +1,48 @@
+package webrtc
+
+import (
+ "sync/atomic"
+)
+
+// ICEGathererState represents the current state of the ICE gatherer.
+type ICEGathererState uint32
+
+const (
+ // ICEGathererStateNew indicates object has been created but
+ // gather() has not been called.
+ ICEGathererStateNew ICEGathererState = iota + 1
+
+ // ICEGathererStateGathering indicates gather() has been called,
+ // and the ICEGatherer is in the process of gathering candidates.
+ ICEGathererStateGathering
+
+ // ICEGathererStateComplete indicates the ICEGatherer has completed gathering.
+ ICEGathererStateComplete
+
+ // ICEGathererStateClosed indicates the closed state can only be entered
+ // when the ICEGatherer has been closed intentionally by calling close().
+ ICEGathererStateClosed
+)
+
+func (s ICEGathererState) String() string {
+ switch s {
+ case ICEGathererStateNew:
+ return "new"
+ case ICEGathererStateGathering:
+ return "gathering"
+ case ICEGathererStateComplete:
+ return "complete"
+ case ICEGathererStateClosed:
+ return "closed"
+ default:
+ return unknownStr
+ }
+}
+
+func atomicStoreICEGathererState(state *ICEGathererState, newState ICEGathererState) {
+ atomic.StoreUint32((*uint32)(state), uint32(newState))
+}
+
+func atomicLoadICEGathererState(state *ICEGathererState) ICEGathererState {
+ return ICEGathererState(atomic.LoadUint32((*uint32)(state)))
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icegatheringstate.go b/vendor/github.com/pion/webrtc/v3/icegatheringstate.go
new file mode 100644
index 0000000..21361f9
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icegatheringstate.go
@@ -0,0 +1,53 @@
+package webrtc
+
+// ICEGatheringState describes the state of the candidate gathering process.
+type ICEGatheringState int
+
+const (
+ // ICEGatheringStateNew indicates that any of the ICETransports are
+ // in the "new" gathering state and none of the transports are in the
+ // "gathering" state, or there are no transports.
+ ICEGatheringStateNew ICEGatheringState = iota + 1
+
+ // ICEGatheringStateGathering indicates that any of the ICETransports
+ // are in the "gathering" state.
+ ICEGatheringStateGathering
+
+ // ICEGatheringStateComplete indicates that at least one ICETransport
+ // exists, and all ICETransports are in the "completed" gathering state.
+ ICEGatheringStateComplete
+)
+
+// This is done this way because of a linter.
+const (
+ iceGatheringStateNewStr = "new"
+ iceGatheringStateGatheringStr = "gathering"
+ iceGatheringStateCompleteStr = "complete"
+)
+
+// NewICEGatheringState takes a string and converts it to ICEGatheringState
+func NewICEGatheringState(raw string) ICEGatheringState {
+ switch raw {
+ case iceGatheringStateNewStr:
+ return ICEGatheringStateNew
+ case iceGatheringStateGatheringStr:
+ return ICEGatheringStateGathering
+ case iceGatheringStateCompleteStr:
+ return ICEGatheringStateComplete
+ default:
+ return ICEGatheringState(Unknown)
+ }
+}
+
+func (t ICEGatheringState) String() string {
+ switch t {
+ case ICEGatheringStateNew:
+ return iceGatheringStateNewStr
+ case ICEGatheringStateGathering:
+ return iceGatheringStateGatheringStr
+ case ICEGatheringStateComplete:
+ return iceGatheringStateCompleteStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icegatheroptions.go b/vendor/github.com/pion/webrtc/v3/icegatheroptions.go
new file mode 100644
index 0000000..88421c7
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icegatheroptions.go
@@ -0,0 +1,7 @@
+package webrtc
+
+// ICEGatherOptions provides options relating to the gathering of ICE candidates.
+type ICEGatherOptions struct {
+ ICEServers []ICEServer
+ ICEGatherPolicy ICETransportPolicy
+}
diff --git a/vendor/github.com/pion/webrtc/v3/iceparameters.go b/vendor/github.com/pion/webrtc/v3/iceparameters.go
new file mode 100644
index 0000000..0c03a88
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/iceparameters.go
@@ -0,0 +1,9 @@
+package webrtc
+
+// ICEParameters includes the ICE username fragment
+// and password and other ICE-related parameters.
+type ICEParameters struct {
+ UsernameFragment string `json:"usernameFragment"`
+ Password string `json:"password"`
+ ICELite bool `json:"iceLite"`
+}
diff --git a/vendor/github.com/pion/webrtc/v3/iceprotocol.go b/vendor/github.com/pion/webrtc/v3/iceprotocol.go
new file mode 100644
index 0000000..f9eb0cf
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/iceprotocol.go
@@ -0,0 +1,47 @@
+package webrtc
+
+import (
+ "fmt"
+ "strings"
+)
+
+// ICEProtocol indicates the transport protocol type that is used in the
+// ice.URL structure.
+type ICEProtocol int
+
+const (
+ // ICEProtocolUDP indicates the URL uses a UDP transport.
+ ICEProtocolUDP ICEProtocol = iota + 1
+
+ // ICEProtocolTCP indicates the URL uses a TCP transport.
+ ICEProtocolTCP
+)
+
+// This is done this way because of a linter.
+const (
+ iceProtocolUDPStr = "udp"
+ iceProtocolTCPStr = "tcp"
+)
+
+// NewICEProtocol takes a string and converts it to ICEProtocol
+func NewICEProtocol(raw string) (ICEProtocol, error) {
+ switch {
+ case strings.EqualFold(iceProtocolUDPStr, raw):
+ return ICEProtocolUDP, nil
+ case strings.EqualFold(iceProtocolTCPStr, raw):
+ return ICEProtocolTCP, nil
+ default:
+ return ICEProtocol(Unknown), fmt.Errorf("%w: %s", errICEProtocolUnknown, raw)
+ }
+}
+
+func (t ICEProtocol) String() string {
+ switch t {
+ case ICEProtocolUDP:
+ return iceProtocolUDPStr
+ case ICEProtocolTCP:
+ return iceProtocolTCPStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icerole.go b/vendor/github.com/pion/webrtc/v3/icerole.go
new file mode 100644
index 0000000..1118786
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icerole.go
@@ -0,0 +1,45 @@
+package webrtc
+
+// ICERole describes the role ice.Agent is playing in selecting the
+// preferred the candidate pair.
+type ICERole int
+
+const (
+ // ICERoleControlling indicates that the ICE agent that is responsible
+ // for selecting the final choice of candidate pairs and signaling them
+ // through STUN and an updated offer, if needed. In any session, one agent
+ // is always controlling. The other is the controlled agent.
+ ICERoleControlling ICERole = iota + 1
+
+ // ICERoleControlled indicates that an ICE agent that waits for the
+ // controlling agent to select the final choice of candidate pairs.
+ ICERoleControlled
+)
+
+// This is done this way because of a linter.
+const (
+ iceRoleControllingStr = "controlling"
+ iceRoleControlledStr = "controlled"
+)
+
+func newICERole(raw string) ICERole {
+ switch raw {
+ case iceRoleControllingStr:
+ return ICERoleControlling
+ case iceRoleControlledStr:
+ return ICERoleControlled
+ default:
+ return ICERole(Unknown)
+ }
+}
+
+func (t ICERole) String() string {
+ switch t {
+ case ICERoleControlling:
+ return iceRoleControllingStr
+ case ICERoleControlled:
+ return iceRoleControlledStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/iceserver.go b/vendor/github.com/pion/webrtc/v3/iceserver.go
new file mode 100644
index 0000000..76146ec
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/iceserver.go
@@ -0,0 +1,68 @@
+// +build !js
+
+package webrtc
+
+import (
+ "github.com/pion/ice/v2"
+ "github.com/pion/webrtc/v3/pkg/rtcerr"
+)
+
+// ICEServer describes a single STUN and TURN server that can be used by
+// the ICEAgent to establish a connection with a peer.
+type ICEServer struct {
+ URLs []string `json:"urls"`
+ Username string `json:"username,omitempty"`
+ Credential interface{} `json:"credential,omitempty"`
+ CredentialType ICECredentialType `json:"credentialType,omitempty"`
+}
+
+func (s ICEServer) parseURL(i int) (*ice.URL, error) {
+ return ice.ParseURL(s.URLs[i])
+}
+
+func (s ICEServer) validate() error {
+ _, err := s.urls()
+ return err
+}
+
+func (s ICEServer) urls() ([]*ice.URL, error) {
+ urls := []*ice.URL{}
+
+ for i := range s.URLs {
+ url, err := s.parseURL(i)
+ if err != nil {
+ return nil, &rtcerr.InvalidAccessError{Err: err}
+ }
+
+ if url.Scheme == ice.SchemeTypeTURN || url.Scheme == ice.SchemeTypeTURNS {
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #11.3.2)
+ if s.Username == "" || s.Credential == nil {
+ return nil, &rtcerr.InvalidAccessError{Err: ErrNoTurnCredentials}
+ }
+ url.Username = s.Username
+
+ switch s.CredentialType {
+ case ICECredentialTypePassword:
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #11.3.3)
+ password, ok := s.Credential.(string)
+ if !ok {
+ return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredentials}
+ }
+ url.Password = password
+
+ case ICECredentialTypeOauth:
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #11.3.4)
+ if _, ok := s.Credential.(OAuthCredential); !ok {
+ return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredentials}
+ }
+
+ default:
+ return nil, &rtcerr.InvalidAccessError{Err: ErrTurnCredentials}
+ }
+ }
+
+ urls = append(urls, url)
+ }
+
+ return urls, nil
+}
diff --git a/vendor/github.com/pion/webrtc/v3/iceserver_js.go b/vendor/github.com/pion/webrtc/v3/iceserver_js.go
new file mode 100644
index 0000000..07b2dcb
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/iceserver_js.go
@@ -0,0 +1,42 @@
+// +build js,wasm
+
+package webrtc
+
+import (
+ "errors"
+
+ "github.com/pion/ice/v2"
+)
+
+// ICEServer describes a single STUN and TURN server that can be used by
+// the ICEAgent to establish a connection with a peer.
+type ICEServer struct {
+ URLs []string
+ Username string
+ // Note: TURN is not supported in the WASM bindings yet
+ Credential interface{}
+ CredentialType ICECredentialType
+}
+
+func (s ICEServer) parseURL(i int) (*ice.URL, error) {
+ return ice.ParseURL(s.URLs[i])
+}
+
+func (s ICEServer) validate() ([]*ice.URL, error) {
+ urls := []*ice.URL{}
+
+ for i := range s.URLs {
+ url, err := s.parseURL(i)
+ if err != nil {
+ return nil, err
+ }
+
+ if url.Scheme == ice.SchemeTypeTURN || url.Scheme == ice.SchemeTypeTURNS {
+ return nil, errors.New("TURN is not currently supported in the JavaScript/Wasm bindings")
+ }
+
+ urls = append(urls, url)
+ }
+
+ return urls, nil
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icetcp.go b/vendor/github.com/pion/webrtc/v3/icetcp.go
new file mode 100644
index 0000000..a5f1d09
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icetcp.go
@@ -0,0 +1,18 @@
+package webrtc
+
+import (
+ "net"
+
+ "github.com/pion/ice/v2"
+ "github.com/pion/logging"
+)
+
+// NewICETCPMux creates a new instance of ice.TCPMuxDefault. It enables use of
+// passive ICE TCP candidates.
+func NewICETCPMux(logger logging.LeveledLogger, listener net.Listener, readBufferSize int) ice.TCPMux {
+ return ice.NewTCPMuxDefault(ice.TCPMuxParams{
+ Listener: listener,
+ Logger: logger,
+ ReadBufferSize: readBufferSize,
+ })
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icetransport.go b/vendor/github.com/pion/webrtc/v3/icetransport.go
new file mode 100644
index 0000000..ba20ec1
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icetransport.go
@@ -0,0 +1,368 @@
+// +build !js
+
+package webrtc
+
+import (
+ "context"
+ "fmt"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/pion/ice/v2"
+ "github.com/pion/logging"
+ "github.com/pion/webrtc/v3/internal/mux"
+)
+
+// ICETransport allows an application access to information about the ICE
+// transport over which packets are sent and received.
+type ICETransport struct {
+ lock sync.RWMutex
+
+ role ICERole
+ // Component ICEComponent
+ // State ICETransportState
+ // gatheringState ICEGathererState
+
+ onConnectionStateChangeHandler atomic.Value // func(ICETransportState)
+ onSelectedCandidatePairChangeHandler atomic.Value // func(*ICECandidatePair)
+
+ state atomic.Value // ICETransportState
+
+ gatherer *ICEGatherer
+ conn *ice.Conn
+ mux *mux.Mux
+
+ ctx context.Context
+ ctxCancel func()
+
+ loggerFactory logging.LoggerFactory
+
+ log logging.LeveledLogger
+}
+
+// func (t *ICETransport) GetLocalCandidates() []ICECandidate {
+//
+// }
+//
+// func (t *ICETransport) GetRemoteCandidates() []ICECandidate {
+//
+// }
+//
+// func (t *ICETransport) GetSelectedCandidatePair() ICECandidatePair {
+//
+// }
+//
+// func (t *ICETransport) GetLocalParameters() ICEParameters {
+//
+// }
+//
+// func (t *ICETransport) GetRemoteParameters() ICEParameters {
+//
+// }
+
+// NewICETransport creates a new NewICETransport.
+func NewICETransport(gatherer *ICEGatherer, loggerFactory logging.LoggerFactory) *ICETransport {
+ iceTransport := &ICETransport{
+ gatherer: gatherer,
+ loggerFactory: loggerFactory,
+ log: loggerFactory.NewLogger("ortc"),
+ }
+ iceTransport.setState(ICETransportStateNew)
+ return iceTransport
+}
+
+// Start incoming connectivity checks based on its configured role.
+func (t *ICETransport) Start(gatherer *ICEGatherer, params ICEParameters, role *ICERole) error {
+ t.lock.Lock()
+ defer t.lock.Unlock()
+
+ if t.State() != ICETransportStateNew {
+ return errICETransportNotInNew
+ }
+
+ if gatherer != nil {
+ t.gatherer = gatherer
+ }
+
+ if err := t.ensureGatherer(); err != nil {
+ return err
+ }
+
+ agent := t.gatherer.getAgent()
+ if agent == nil {
+ return fmt.Errorf("%w: unable to start ICETransport", errICEAgentNotExist)
+ }
+
+ if err := agent.OnConnectionStateChange(func(iceState ice.ConnectionState) {
+ state := newICETransportStateFromICE(iceState)
+
+ t.setState(state)
+ t.onConnectionStateChange(state)
+ }); err != nil {
+ return err
+ }
+ if err := agent.OnSelectedCandidatePairChange(func(local, remote ice.Candidate) {
+ candidates, err := newICECandidatesFromICE([]ice.Candidate{local, remote})
+ if err != nil {
+ t.log.Warnf("%w: %s", errICECandiatesCoversionFailed, err)
+ return
+ }
+ t.onSelectedCandidatePairChange(NewICECandidatePair(&candidates[0], &candidates[1]))
+ }); err != nil {
+ return err
+ }
+
+ if role == nil {
+ controlled := ICERoleControlled
+ role = &controlled
+ }
+ t.role = *role
+
+ t.ctx, t.ctxCancel = context.WithCancel(context.Background())
+
+ // Drop the lock here to allow ICE candidates to be
+ // added so that the agent can complete a connection
+ t.lock.Unlock()
+
+ var iceConn *ice.Conn
+ var err error
+ switch *role {
+ case ICERoleControlling:
+ iceConn, err = agent.Dial(t.ctx,
+ params.UsernameFragment,
+ params.Password)
+
+ case ICERoleControlled:
+ iceConn, err = agent.Accept(t.ctx,
+ params.UsernameFragment,
+ params.Password)
+
+ default:
+ err = errICERoleUnknown
+ }
+
+ // Reacquire the lock to set the connection/mux
+ t.lock.Lock()
+ if err != nil {
+ return err
+ }
+
+ t.conn = iceConn
+
+ config := mux.Config{
+ Conn: t.conn,
+ BufferSize: receiveMTU,
+ LoggerFactory: t.loggerFactory,
+ }
+ t.mux = mux.NewMux(config)
+
+ return nil
+}
+
+// restart is not exposed currently because ORTC has users create a whole new ICETransport
+// so for now lets keep it private so we don't cause ORTC users to depend on non-standard APIs
+func (t *ICETransport) restart() error {
+ t.lock.Lock()
+ defer t.lock.Unlock()
+
+ agent := t.gatherer.getAgent()
+ if agent == nil {
+ return fmt.Errorf("%w: unable to restart ICETransport", errICEAgentNotExist)
+ }
+
+ if err := agent.Restart(t.gatherer.api.settingEngine.candidates.UsernameFragment, t.gatherer.api.settingEngine.candidates.Password); err != nil {
+ return err
+ }
+ return t.gatherer.Gather()
+}
+
+// Stop irreversibly stops the ICETransport.
+func (t *ICETransport) Stop() error {
+ t.lock.Lock()
+ defer t.lock.Unlock()
+
+ t.setState(ICETransportStateClosed)
+
+ if t.ctxCancel != nil {
+ t.ctxCancel()
+ }
+
+ if t.mux != nil {
+ return t.mux.Close()
+ } else if t.gatherer != nil {
+ return t.gatherer.Close()
+ }
+ return nil
+}
+
+// OnSelectedCandidatePairChange sets a handler that is invoked when a new
+// ICE candidate pair is selected
+func (t *ICETransport) OnSelectedCandidatePairChange(f func(*ICECandidatePair)) {
+ t.onSelectedCandidatePairChangeHandler.Store(f)
+}
+
+func (t *ICETransport) onSelectedCandidatePairChange(pair *ICECandidatePair) {
+ handler := t.onSelectedCandidatePairChangeHandler.Load()
+ if handler != nil {
+ handler.(func(*ICECandidatePair))(pair)
+ }
+}
+
+// OnConnectionStateChange sets a handler that is fired when the ICE
+// connection state changes.
+func (t *ICETransport) OnConnectionStateChange(f func(ICETransportState)) {
+ t.onConnectionStateChangeHandler.Store(f)
+}
+
+func (t *ICETransport) onConnectionStateChange(state ICETransportState) {
+ handler := t.onConnectionStateChangeHandler.Load()
+ if handler != nil {
+ handler.(func(ICETransportState))(state)
+ }
+}
+
+// Role indicates the current role of the ICE transport.
+func (t *ICETransport) Role() ICERole {
+ t.lock.RLock()
+ defer t.lock.RUnlock()
+
+ return t.role
+}
+
+// SetRemoteCandidates sets the sequence of candidates associated with the remote ICETransport.
+func (t *ICETransport) SetRemoteCandidates(remoteCandidates []ICECandidate) error {
+ t.lock.RLock()
+ defer t.lock.RUnlock()
+
+ if err := t.ensureGatherer(); err != nil {
+ return err
+ }
+
+ agent := t.gatherer.getAgent()
+ if agent == nil {
+ return fmt.Errorf("%w: unable to set remote candidates", errICEAgentNotExist)
+ }
+
+ for _, c := range remoteCandidates {
+ i, err := c.toICE()
+ if err != nil {
+ return err
+ }
+
+ if err = agent.AddRemoteCandidate(i); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+// AddRemoteCandidate adds a candidate associated with the remote ICETransport.
+func (t *ICETransport) AddRemoteCandidate(remoteCandidate *ICECandidate) error {
+ t.lock.RLock()
+ defer t.lock.RUnlock()
+
+ var (
+ c ice.Candidate
+ err error
+ )
+
+ if err = t.ensureGatherer(); err != nil {
+ return err
+ }
+
+ if remoteCandidate != nil {
+ if c, err = remoteCandidate.toICE(); err != nil {
+ return err
+ }
+ }
+
+ agent := t.gatherer.getAgent()
+ if agent == nil {
+ return fmt.Errorf("%w: unable to add remote candidates", errICEAgentNotExist)
+ }
+
+ return agent.AddRemoteCandidate(c)
+}
+
+// State returns the current ice transport state.
+func (t *ICETransport) State() ICETransportState {
+ if v := t.state.Load(); v != nil {
+ return v.(ICETransportState)
+ }
+ return ICETransportState(0)
+}
+
+func (t *ICETransport) setState(i ICETransportState) {
+ t.state.Store(i)
+}
+
+// NewEndpoint registers a new endpoint on the underlying mux.
+func (t *ICETransport) NewEndpoint(f mux.MatchFunc) *mux.Endpoint {
+ t.lock.Lock()
+ defer t.lock.Unlock()
+ return t.mux.NewEndpoint(f)
+}
+
+func (t *ICETransport) ensureGatherer() error {
+ if t.gatherer == nil {
+ return errICEGathererNotStarted
+ } else if t.gatherer.getAgent() == nil {
+ if err := t.gatherer.createAgent(); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (t *ICETransport) collectStats(collector *statsReportCollector) {
+ t.lock.Lock()
+ conn := t.conn
+ t.lock.Unlock()
+
+ collector.Collecting()
+
+ stats := TransportStats{
+ Timestamp: statsTimestampFrom(time.Now()),
+ Type: StatsTypeTransport,
+ ID: "iceTransport",
+ }
+
+ if conn != nil {
+ stats.BytesSent = conn.BytesSent()
+ stats.BytesReceived = conn.BytesReceived()
+ }
+
+ collector.Collect(stats.ID, stats)
+}
+
+func (t *ICETransport) haveRemoteCredentialsChange(newUfrag, newPwd string) bool {
+ t.lock.Lock()
+ defer t.lock.Unlock()
+
+ agent := t.gatherer.getAgent()
+ if agent == nil {
+ return false
+ }
+
+ uFrag, uPwd, err := agent.GetRemoteUserCredentials()
+ if err != nil {
+ return false
+ }
+
+ return uFrag != newUfrag || uPwd != newPwd
+}
+
+func (t *ICETransport) setRemoteCredentials(newUfrag, newPwd string) error {
+ t.lock.Lock()
+ defer t.lock.Unlock()
+
+ agent := t.gatherer.getAgent()
+ if agent == nil {
+ return fmt.Errorf("%w: unable to SetRemoteCredentials", errICEAgentNotExist)
+ }
+
+ return agent.SetRemoteCredentials(newUfrag, newPwd)
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icetransportpolicy.go b/vendor/github.com/pion/webrtc/v3/icetransportpolicy.go
new file mode 100644
index 0000000..16273f5
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icetransportpolicy.go
@@ -0,0 +1,65 @@
+package webrtc
+
+import (
+ "encoding/json"
+)
+
+// ICETransportPolicy defines the ICE candidate policy surface the
+// permitted candidates. Only these candidates are used for connectivity checks.
+type ICETransportPolicy int
+
+// ICEGatherPolicy is the ORTC equivalent of ICETransportPolicy
+type ICEGatherPolicy = ICETransportPolicy
+
+const (
+ // ICETransportPolicyAll indicates any type of candidate is used.
+ ICETransportPolicyAll ICETransportPolicy = iota
+
+ // ICETransportPolicyRelay indicates only media relay candidates such
+ // as candidates passing through a TURN server are used.
+ ICETransportPolicyRelay
+)
+
+// This is done this way because of a linter.
+const (
+ iceTransportPolicyRelayStr = "relay"
+ iceTransportPolicyAllStr = "all"
+)
+
+// NewICETransportPolicy takes a string and converts it to ICETransportPolicy
+func NewICETransportPolicy(raw string) ICETransportPolicy {
+ switch raw {
+ case iceTransportPolicyRelayStr:
+ return ICETransportPolicyRelay
+ case iceTransportPolicyAllStr:
+ return ICETransportPolicyAll
+ default:
+ return ICETransportPolicy(Unknown)
+ }
+}
+
+func (t ICETransportPolicy) String() string {
+ switch t {
+ case ICETransportPolicyRelay:
+ return iceTransportPolicyRelayStr
+ case ICETransportPolicyAll:
+ return iceTransportPolicyAllStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// UnmarshalJSON parses the JSON-encoded data and stores the result
+func (t *ICETransportPolicy) UnmarshalJSON(b []byte) error {
+ var val string
+ if err := json.Unmarshal(b, &val); err != nil {
+ return err
+ }
+ *t = NewICETransportPolicy(val)
+ return nil
+}
+
+// MarshalJSON returns the JSON encoding
+func (t ICETransportPolicy) MarshalJSON() ([]byte, error) {
+ return json.Marshal(t.String())
+}
diff --git a/vendor/github.com/pion/webrtc/v3/icetransportstate.go b/vendor/github.com/pion/webrtc/v3/icetransportstate.go
new file mode 100644
index 0000000..da93e44
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/icetransportstate.go
@@ -0,0 +1,107 @@
+package webrtc
+
+import "github.com/pion/ice/v2"
+
+// ICETransportState represents the current state of the ICE transport.
+type ICETransportState int
+
+const (
+ // ICETransportStateNew indicates the ICETransport is waiting
+ // for remote candidates to be supplied.
+ ICETransportStateNew = iota + 1
+
+ // ICETransportStateChecking indicates the ICETransport has
+ // received at least one remote candidate, and a local and remote
+ // ICECandidateComplete dictionary was not added as the last candidate.
+ ICETransportStateChecking
+
+ // ICETransportStateConnected indicates the ICETransport has
+ // received a response to an outgoing connectivity check, or has
+ // received incoming DTLS/media after a successful response to an
+ // incoming connectivity check, but is still checking other candidate
+ // pairs to see if there is a better connection.
+ ICETransportStateConnected
+
+ // ICETransportStateCompleted indicates the ICETransport tested
+ // all appropriate candidate pairs and at least one functioning
+ // candidate pair has been found.
+ ICETransportStateCompleted
+
+ // ICETransportStateFailed indicates the ICETransport the last
+ // candidate was added and all appropriate candidate pairs have either
+ // failed connectivity checks or have lost consent.
+ ICETransportStateFailed
+
+ // ICETransportStateDisconnected indicates the ICETransport has received
+ // at least one local and remote candidate, but the final candidate was
+ // received yet and all appropriate candidate pairs thus far have been
+ // tested and failed.
+ ICETransportStateDisconnected
+
+ // ICETransportStateClosed indicates the ICETransport has shut down
+ // and is no longer responding to STUN requests.
+ ICETransportStateClosed
+)
+
+func (c ICETransportState) String() string {
+ switch c {
+ case ICETransportStateNew:
+ return "new"
+ case ICETransportStateChecking:
+ return "checking"
+ case ICETransportStateConnected:
+ return "connected"
+ case ICETransportStateCompleted:
+ return "completed"
+ case ICETransportStateFailed:
+ return "failed"
+ case ICETransportStateDisconnected:
+ return "disconnected"
+ case ICETransportStateClosed:
+ return "closed"
+ default:
+ return unknownStr
+ }
+}
+
+func newICETransportStateFromICE(i ice.ConnectionState) ICETransportState {
+ switch i {
+ case ice.ConnectionStateNew:
+ return ICETransportStateNew
+ case ice.ConnectionStateChecking:
+ return ICETransportStateChecking
+ case ice.ConnectionStateConnected:
+ return ICETransportStateConnected
+ case ice.ConnectionStateCompleted:
+ return ICETransportStateCompleted
+ case ice.ConnectionStateFailed:
+ return ICETransportStateFailed
+ case ice.ConnectionStateDisconnected:
+ return ICETransportStateDisconnected
+ case ice.ConnectionStateClosed:
+ return ICETransportStateClosed
+ default:
+ return ICETransportState(Unknown)
+ }
+}
+
+func (c ICETransportState) toICE() ice.ConnectionState {
+ switch c {
+ case ICETransportStateNew:
+ return ice.ConnectionStateNew
+ case ICETransportStateChecking:
+ return ice.ConnectionStateChecking
+ case ICETransportStateConnected:
+ return ice.ConnectionStateConnected
+ case ICETransportStateCompleted:
+ return ice.ConnectionStateCompleted
+ case ICETransportStateFailed:
+ return ice.ConnectionStateFailed
+ case ICETransportStateDisconnected:
+ return ice.ConnectionStateDisconnected
+ case ICETransportStateClosed:
+ return ice.ConnectionStateClosed
+ default:
+ return ice.ConnectionState(Unknown)
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/interceptor.go b/vendor/github.com/pion/webrtc/v3/interceptor.go
new file mode 100644
index 0000000..eff9496
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/interceptor.go
@@ -0,0 +1,107 @@
+// +build !js
+
+package webrtc
+
+import (
+ "sync/atomic"
+
+ "github.com/pion/interceptor"
+ "github.com/pion/interceptor/pkg/nack"
+ "github.com/pion/interceptor/pkg/report"
+ "github.com/pion/rtp"
+)
+
+// RegisterDefaultInterceptors will register some useful interceptors.
+// If you want to customize which interceptors are loaded, you should copy the
+// code from this method and remove unwanted interceptors.
+func RegisterDefaultInterceptors(mediaEngine *MediaEngine, interceptorRegistry *interceptor.Registry) error {
+ if err := ConfigureNack(mediaEngine, interceptorRegistry); err != nil {
+ return err
+ }
+
+ if err := ConfigureRTCPReports(interceptorRegistry); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ConfigureRTCPReports will setup everything necessary for generating Sender and Receiver Reports
+func ConfigureRTCPReports(interceptorRegistry *interceptor.Registry) error {
+ reciver, err := report.NewReceiverInterceptor()
+ if err != nil {
+ return err
+ }
+
+ sender, err := report.NewSenderInterceptor()
+ if err != nil {
+ return err
+ }
+
+ interceptorRegistry.Add(reciver)
+ interceptorRegistry.Add(sender)
+ return nil
+}
+
+// ConfigureNack will setup everything necessary for handling generating/responding to nack messages.
+func ConfigureNack(mediaEngine *MediaEngine, interceptorRegistry *interceptor.Registry) error {
+ generator, err := nack.NewGeneratorInterceptor()
+ if err != nil {
+ return err
+ }
+
+ responder, err := nack.NewResponderInterceptor()
+ if err != nil {
+ return err
+ }
+
+ mediaEngine.RegisterFeedback(RTCPFeedback{Type: "nack"}, RTPCodecTypeVideo)
+ mediaEngine.RegisterFeedback(RTCPFeedback{Type: "nack", Parameter: "pli"}, RTPCodecTypeVideo)
+ interceptorRegistry.Add(responder)
+ interceptorRegistry.Add(generator)
+ return nil
+}
+
+type interceptorToTrackLocalWriter struct{ interceptor atomic.Value } // interceptor.RTPWriter }
+
+func (i *interceptorToTrackLocalWriter) WriteRTP(header *rtp.Header, payload []byte) (int, error) {
+ if writer, ok := i.interceptor.Load().(interceptor.RTPWriter); ok && writer != nil {
+ return writer.Write(header, payload, interceptor.Attributes{})
+ }
+
+ return 0, nil
+}
+
+func (i *interceptorToTrackLocalWriter) Write(b []byte) (int, error) {
+ packet := &rtp.Packet{}
+ if err := packet.Unmarshal(b); err != nil {
+ return 0, err
+ }
+
+ return i.WriteRTP(&packet.Header, packet.Payload)
+}
+
+func createStreamInfo(id string, ssrc SSRC, payloadType PayloadType, codec RTPCodecCapability, webrtcHeaderExtensions []RTPHeaderExtensionParameter) interceptor.StreamInfo {
+ headerExtensions := make([]interceptor.RTPHeaderExtension, 0, len(webrtcHeaderExtensions))
+ for _, h := range webrtcHeaderExtensions {
+ headerExtensions = append(headerExtensions, interceptor.RTPHeaderExtension{ID: h.ID, URI: h.URI})
+ }
+
+ feedbacks := make([]interceptor.RTCPFeedback, 0, len(codec.RTCPFeedback))
+ for _, f := range codec.RTCPFeedback {
+ feedbacks = append(feedbacks, interceptor.RTCPFeedback{Type: f.Type, Parameter: f.Parameter})
+ }
+
+ return interceptor.StreamInfo{
+ ID: id,
+ Attributes: interceptor.Attributes{},
+ SSRC: uint32(ssrc),
+ PayloadType: uint8(payloadType),
+ RTPHeaderExtensions: headerExtensions,
+ MimeType: codec.MimeType,
+ ClockRate: codec.ClockRate,
+ Channels: codec.Channels,
+ SDPFmtpLine: codec.SDPFmtpLine,
+ RTCPFeedback: feedbacks,
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/internal/mux/endpoint.go b/vendor/github.com/pion/webrtc/v3/internal/mux/endpoint.go
new file mode 100644
index 0000000..afccc07
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/internal/mux/endpoint.go
@@ -0,0 +1,75 @@
+package mux
+
+import (
+ "errors"
+ "io"
+ "net"
+ "time"
+
+ "github.com/pion/ice/v2"
+ "github.com/pion/transport/packetio"
+)
+
+// Endpoint implements net.Conn. It is used to read muxed packets.
+type Endpoint struct {
+ mux *Mux
+ buffer *packetio.Buffer
+}
+
+// Close unregisters the endpoint from the Mux
+func (e *Endpoint) Close() (err error) {
+ err = e.close()
+ if err != nil {
+ return err
+ }
+
+ e.mux.RemoveEndpoint(e)
+ return nil
+}
+
+func (e *Endpoint) close() error {
+ return e.buffer.Close()
+}
+
+// Read reads a packet of len(p) bytes from the underlying conn
+// that are matched by the associated MuxFunc
+func (e *Endpoint) Read(p []byte) (int, error) {
+ return e.buffer.Read(p)
+}
+
+// Write writes len(p) bytes to the underlying conn
+func (e *Endpoint) Write(p []byte) (int, error) {
+ n, err := e.mux.nextConn.Write(p)
+ if errors.Is(err, ice.ErrNoCandidatePairs) {
+ return 0, nil
+ } else if errors.Is(err, ice.ErrClosed) {
+ return 0, io.ErrClosedPipe
+ }
+
+ return n, err
+}
+
+// LocalAddr is a stub
+func (e *Endpoint) LocalAddr() net.Addr {
+ return e.mux.nextConn.LocalAddr()
+}
+
+// RemoteAddr is a stub
+func (e *Endpoint) RemoteAddr() net.Addr {
+ return e.mux.nextConn.RemoteAddr()
+}
+
+// SetDeadline is a stub
+func (e *Endpoint) SetDeadline(t time.Time) error {
+ return nil
+}
+
+// SetReadDeadline is a stub
+func (e *Endpoint) SetReadDeadline(t time.Time) error {
+ return nil
+}
+
+// SetWriteDeadline is a stub
+func (e *Endpoint) SetWriteDeadline(t time.Time) error {
+ return nil
+}
diff --git a/vendor/github.com/pion/webrtc/v3/internal/mux/mux.go b/vendor/github.com/pion/webrtc/v3/internal/mux/mux.go
new file mode 100644
index 0000000..83aaa26
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/internal/mux/mux.go
@@ -0,0 +1,145 @@
+// Package mux multiplexes packets on a single socket (RFC7983)
+package mux
+
+import (
+ "net"
+ "sync"
+
+ "github.com/pion/logging"
+ "github.com/pion/transport/packetio"
+)
+
+// The maximum amount of data that can be buffered before returning errors.
+const maxBufferSize = 1000 * 1000 // 1MB
+
+// Config collects the arguments to mux.Mux construction into
+// a single structure
+type Config struct {
+ Conn net.Conn
+ BufferSize int
+ LoggerFactory logging.LoggerFactory
+}
+
+// Mux allows multiplexing
+type Mux struct {
+ lock sync.RWMutex
+ nextConn net.Conn
+ endpoints map[*Endpoint]MatchFunc
+ bufferSize int
+ closedCh chan struct{}
+
+ log logging.LeveledLogger
+}
+
+// NewMux creates a new Mux
+func NewMux(config Config) *Mux {
+ m := &Mux{
+ nextConn: config.Conn,
+ endpoints: make(map[*Endpoint]MatchFunc),
+ bufferSize: config.BufferSize,
+ closedCh: make(chan struct{}),
+ log: config.LoggerFactory.NewLogger("mux"),
+ }
+
+ go m.readLoop()
+
+ return m
+}
+
+// NewEndpoint creates a new Endpoint
+func (m *Mux) NewEndpoint(f MatchFunc) *Endpoint {
+ e := &Endpoint{
+ mux: m,
+ buffer: packetio.NewBuffer(),
+ }
+
+ // Set a maximum size of the buffer in bytes.
+ // NOTE: We actually won't get anywhere close to this limit.
+ // SRTP will constantly read from the endpoint and drop packets if it's full.
+ e.buffer.SetLimitSize(maxBufferSize)
+
+ m.lock.Lock()
+ m.endpoints[e] = f
+ m.lock.Unlock()
+
+ return e
+}
+
+// RemoveEndpoint removes an endpoint from the Mux
+func (m *Mux) RemoveEndpoint(e *Endpoint) {
+ m.lock.Lock()
+ defer m.lock.Unlock()
+ delete(m.endpoints, e)
+}
+
+// Close closes the Mux and all associated Endpoints.
+func (m *Mux) Close() error {
+ m.lock.Lock()
+ for e := range m.endpoints {
+ err := e.close()
+ if err != nil {
+ return err
+ }
+
+ delete(m.endpoints, e)
+ }
+ m.lock.Unlock()
+
+ err := m.nextConn.Close()
+ if err != nil {
+ return err
+ }
+
+ // Wait for readLoop to end
+ <-m.closedCh
+
+ return nil
+}
+
+func (m *Mux) readLoop() {
+ defer func() {
+ close(m.closedCh)
+ }()
+
+ buf := make([]byte, m.bufferSize)
+ for {
+ n, err := m.nextConn.Read(buf)
+ if err != nil {
+ return
+ }
+
+ err = m.dispatch(buf[:n])
+ if err != nil {
+ return
+ }
+ }
+}
+
+func (m *Mux) dispatch(buf []byte) error {
+ var endpoint *Endpoint
+
+ m.lock.Lock()
+ for e, f := range m.endpoints {
+ if f(buf) {
+ endpoint = e
+ break
+ }
+ }
+ m.lock.Unlock()
+
+ if endpoint == nil {
+ if len(buf) > 0 {
+ m.log.Warnf("Warning: mux: no endpoint for packet starting with %d\n", buf[0])
+ } else {
+ m.log.Warnf("Warning: mux: no endpoint for zero length packet")
+ }
+ return nil
+ }
+
+ _, err := endpoint.buffer.Write(buf)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/pion/webrtc/v3/internal/mux/muxfunc.go b/vendor/github.com/pion/webrtc/v3/internal/mux/muxfunc.go
new file mode 100644
index 0000000..2ab585b
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/internal/mux/muxfunc.go
@@ -0,0 +1,101 @@
+package mux
+
+import (
+ "bytes"
+ "encoding/binary"
+)
+
+// MatchFunc allows custom logic for mapping packets to an Endpoint
+type MatchFunc func([]byte) bool
+
+// MatchAll always returns true
+func MatchAll(b []byte) bool {
+ return true
+}
+
+// MatchNone always returns false
+func MatchNone(b []byte) bool {
+ return false
+}
+
+// MatchRange is a MatchFunc that accepts packets with the first byte in [lower..upper]
+func MatchRange(lower, upper byte) MatchFunc {
+ return func(buf []byte) bool {
+ if len(buf) < 1 {
+ return false
+ }
+ b := buf[0]
+ return b >= lower && b <= upper
+ }
+}
+
+// MatchFuncs as described in RFC7983
+// https://tools.ietf.org/html/rfc7983
+// +----------------+
+// | [0..3] -+--> forward to STUN
+// | |
+// | [16..19] -+--> forward to ZRTP
+// | |
+// packet --> | [20..63] -+--> forward to DTLS
+// | |
+// | [64..79] -+--> forward to TURN Channel
+// | |
+// | [128..191] -+--> forward to RTP/RTCP
+// +----------------+
+
+// MatchSTUN is a MatchFunc that accepts packets with the first byte in [0..3]
+// as defied in RFC7983
+func MatchSTUN(b []byte) bool {
+ return MatchRange(0, 3)(b)
+}
+
+// MatchZRTP is a MatchFunc that accepts packets with the first byte in [16..19]
+// as defied in RFC7983
+func MatchZRTP(b []byte) bool {
+ return MatchRange(16, 19)(b)
+}
+
+// MatchDTLS is a MatchFunc that accepts packets with the first byte in [20..63]
+// as defied in RFC7983
+func MatchDTLS(b []byte) bool {
+ return MatchRange(20, 63)(b)
+}
+
+// MatchTURN is a MatchFunc that accepts packets with the first byte in [64..79]
+// as defied in RFC7983
+func MatchTURN(b []byte) bool {
+ return MatchRange(64, 79)(b)
+}
+
+// MatchSRTPOrSRTCP is a MatchFunc that accepts packets with the first byte in [128..191]
+// as defied in RFC7983
+func MatchSRTPOrSRTCP(b []byte) bool {
+ return MatchRange(128, 191)(b)
+}
+
+func isRTCP(buf []byte) bool {
+ // Not long enough to determine RTP/RTCP
+ if len(buf) < 4 {
+ return false
+ }
+
+ var rtcpPacketType uint8
+ r := bytes.NewReader([]byte{buf[1]})
+ if err := binary.Read(r, binary.BigEndian, &rtcpPacketType); err != nil {
+ return false
+ } else if rtcpPacketType >= 192 && rtcpPacketType <= 223 {
+ return true
+ }
+
+ return false
+}
+
+// MatchSRTP is a MatchFunc that only matches SRTP and not SRTCP
+func MatchSRTP(buf []byte) bool {
+ return MatchSRTPOrSRTCP(buf) && !isRTCP(buf)
+}
+
+// MatchSRTCP is a MatchFunc that only matches SRTCP and not SRTP
+func MatchSRTCP(buf []byte) bool {
+ return MatchSRTPOrSRTCP(buf) && isRTCP(buf)
+}
diff --git a/vendor/github.com/pion/webrtc/v3/internal/util/util.go b/vendor/github.com/pion/webrtc/v3/internal/util/util.go
new file mode 100644
index 0000000..6e12b64
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/internal/util/util.go
@@ -0,0 +1,72 @@
+// Package util provides auxiliary functions internally used in webrtc package
+package util
+
+import (
+ "errors"
+ "strings"
+
+ "github.com/pion/randutil"
+)
+
+const (
+ runesAlpha = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+)
+
+// Use global random generator to properly seed by crypto grade random.
+var globalMathRandomGenerator = randutil.NewMathRandomGenerator() // nolint:gochecknoglobals
+
+// MathRandAlpha generates a mathmatical random alphabet sequence of the requested length.
+func MathRandAlpha(n int) string {
+ return globalMathRandomGenerator.GenerateString(n, runesAlpha)
+}
+
+// RandUint32 generates a mathmatical random uint32.
+func RandUint32() uint32 {
+ return globalMathRandomGenerator.Uint32()
+}
+
+// FlattenErrs flattens multiple errors into one
+func FlattenErrs(errs []error) error {
+ errs2 := []error{}
+ for _, e := range errs {
+ if e != nil {
+ errs2 = append(errs2, e)
+ }
+ }
+ if len(errs2) == 0 {
+ return nil
+ }
+ return multiError(errs2)
+}
+
+type multiError []error
+
+func (me multiError) Error() string {
+ var errstrings []string
+
+ for _, err := range me {
+ if err != nil {
+ errstrings = append(errstrings, err.Error())
+ }
+ }
+
+ if len(errstrings) == 0 {
+ return "multiError must contain multiple error but is empty"
+ }
+
+ return strings.Join(errstrings, "\n")
+}
+
+func (me multiError) Is(err error) bool {
+ for _, e := range me {
+ if errors.Is(e, err) {
+ return true
+ }
+ if me2, ok := e.(multiError); ok {
+ if me2.Is(err) {
+ return true
+ }
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/pion/webrtc/v3/js_compare.go b/vendor/github.com/pion/webrtc/v3/js_compare.go
new file mode 100644
index 0000000..31e3980
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/js_compare.go
@@ -0,0 +1,13 @@
+// +build js,go1.14
+
+package webrtc
+
+import "syscall/js"
+
+func jsValueIsUndefined(v js.Value) bool {
+ return v.IsUndefined()
+}
+
+func jsValueIsNull(v js.Value) bool {
+ return v.IsNull()
+}
diff --git a/vendor/github.com/pion/webrtc/v3/js_compare_legacy.go b/vendor/github.com/pion/webrtc/v3/js_compare_legacy.go
new file mode 100644
index 0000000..e2e247a
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/js_compare_legacy.go
@@ -0,0 +1,13 @@
+// +build js,!go1.14
+
+package webrtc
+
+import "syscall/js"
+
+func jsValueIsUndefined(v js.Value) bool {
+ return v == js.Undefined()
+}
+
+func jsValueIsNull(v js.Value) bool {
+ return v == js.Null()
+}
diff --git a/vendor/github.com/pion/webrtc/v3/js_utils.go b/vendor/github.com/pion/webrtc/v3/js_utils.go
new file mode 100644
index 0000000..25e8939
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/js_utils.go
@@ -0,0 +1,168 @@
+// +build js,wasm
+
+package webrtc
+
+import (
+ "fmt"
+ "syscall/js"
+)
+
+// awaitPromise accepts a js.Value representing a Promise. If the promise
+// resolves, it returns (result, nil). If the promise rejects, it returns
+// (js.Undefined, error). awaitPromise has a synchronous-like API but does not
+// block the JavaScript event loop.
+func awaitPromise(promise js.Value) (js.Value, error) {
+ resultsChan := make(chan js.Value)
+ errChan := make(chan js.Error)
+
+ thenFunc := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ go func() {
+ resultsChan <- args[0]
+ }()
+ return js.Undefined()
+ })
+ defer thenFunc.Release()
+ promise.Call("then", thenFunc)
+
+ catchFunc := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ go func() {
+ errChan <- js.Error{args[0]}
+ }()
+ return js.Undefined()
+ })
+ defer catchFunc.Release()
+ promise.Call("catch", catchFunc)
+
+ select {
+ case result := <-resultsChan:
+ return result, nil
+ case err := <-errChan:
+ return js.Undefined(), err
+ }
+}
+
+func valueToUint16Pointer(val js.Value) *uint16 {
+ if jsValueIsNull(val) || jsValueIsUndefined(val) {
+ return nil
+ }
+ convertedVal := uint16(val.Int())
+ return &convertedVal
+}
+
+func valueToStringPointer(val js.Value) *string {
+ if jsValueIsNull(val) || jsValueIsUndefined(val) {
+ return nil
+ }
+ stringVal := val.String()
+ return &stringVal
+}
+
+func stringToValueOrUndefined(val string) js.Value {
+ if val == "" {
+ return js.Undefined()
+ }
+ return js.ValueOf(val)
+}
+
+func uint8ToValueOrUndefined(val uint8) js.Value {
+ if val == 0 {
+ return js.Undefined()
+ }
+ return js.ValueOf(val)
+}
+
+func interfaceToValueOrUndefined(val interface{}) js.Value {
+ if val == nil {
+ return js.Undefined()
+ }
+ return js.ValueOf(val)
+}
+
+func valueToStringOrZero(val js.Value) string {
+ if jsValueIsUndefined(val) || jsValueIsNull(val) {
+ return ""
+ }
+ return val.String()
+}
+
+func valueToUint8OrZero(val js.Value) uint8 {
+ if jsValueIsUndefined(val) || jsValueIsNull(val) {
+ return 0
+ }
+ return uint8(val.Int())
+}
+
+func valueToUint16OrZero(val js.Value) uint16 {
+ if jsValueIsNull(val) || jsValueIsUndefined(val) {
+ return 0
+ }
+ return uint16(val.Int())
+}
+
+func valueToUint32OrZero(val js.Value) uint32 {
+ if jsValueIsNull(val) || jsValueIsUndefined(val) {
+ return 0
+ }
+ return uint32(val.Int())
+}
+
+func valueToStrings(val js.Value) []string {
+ result := make([]string, val.Length())
+ for i := 0; i < val.Length(); i++ {
+ result[i] = val.Index(i).String()
+ }
+ return result
+}
+
+func stringPointerToValue(val *string) js.Value {
+ if val == nil {
+ return js.Undefined()
+ }
+ return js.ValueOf(*val)
+}
+
+func uint16PointerToValue(val *uint16) js.Value {
+ if val == nil {
+ return js.Undefined()
+ }
+ return js.ValueOf(*val)
+}
+
+func boolPointerToValue(val *bool) js.Value {
+ if val == nil {
+ return js.Undefined()
+ }
+ return js.ValueOf(*val)
+}
+
+func stringsToValue(strings []string) js.Value {
+ val := make([]interface{}, len(strings))
+ for i, s := range strings {
+ val[i] = s
+ }
+ return js.ValueOf(val)
+}
+
+func stringEnumToValueOrUndefined(s string) js.Value {
+ if s == "unknown" {
+ return js.Undefined()
+ }
+ return js.ValueOf(s)
+}
+
+// Converts the return value of recover() to an error.
+func recoveryToError(e interface{}) error {
+ switch e := e.(type) {
+ case error:
+ return e
+ default:
+ return fmt.Errorf("recovered with non-error value: (%T) %s", e, e)
+ }
+}
+
+func uint8ArrayValueToBytes(val js.Value) []byte {
+ result := make([]byte, val.Length())
+ js.CopyBytesToGo(result, val)
+
+ return result
+}
diff --git a/vendor/github.com/pion/webrtc/v3/mediaengine.go b/vendor/github.com/pion/webrtc/v3/mediaengine.go
new file mode 100644
index 0000000..bc3ed99
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/mediaengine.go
@@ -0,0 +1,533 @@
+// +build !js
+
+package webrtc
+
+import (
+ "fmt"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/pion/rtp"
+ "github.com/pion/rtp/codecs"
+ "github.com/pion/sdp/v3"
+)
+
+const (
+ // MimeTypeH264 H264 MIME type.
+ // Note: Matching should be case insensitive.
+ MimeTypeH264 = "video/H264"
+ // MimeTypeOpus Opus MIME type
+ // Note: Matching should be case insensitive.
+ MimeTypeOpus = "audio/opus"
+ // MimeTypeVP8 VP8 MIME type
+ // Note: Matching should be case insensitive.
+ MimeTypeVP8 = "video/VP8"
+ // MimeTypeVP9 VP9 MIME type
+ // Note: Matching should be case insensitive.
+ MimeTypeVP9 = "video/VP9"
+ // MimeTypeG722 G722 MIME type
+ // Note: Matching should be case insensitive.
+ MimeTypeG722 = "audio/G722"
+ // MimeTypePCMU PCMU MIME type
+ // Note: Matching should be case insensitive.
+ MimeTypePCMU = "audio/PCMU"
+ // MimeTypePCMA PCMA MIME type
+ // Note: Matching should be case insensitive.
+ MimeTypePCMA = "audio/PCMA"
+)
+
+type mediaEngineHeaderExtension struct {
+ uri string
+ isAudio, isVideo bool
+
+ // If set only Transceivers of this direction are allowed
+ allowedDirections []RTPTransceiverDirection
+}
+
+// A MediaEngine defines the codecs supported by a PeerConnection, and the
+// configuration of those codecs. A MediaEngine must not be shared between
+// PeerConnections.
+type MediaEngine struct {
+ // If we have attempted to negotiate a codec type yet.
+ negotiatedVideo, negotiatedAudio bool
+
+ videoCodecs, audioCodecs []RTPCodecParameters
+ negotiatedVideoCodecs, negotiatedAudioCodecs []RTPCodecParameters
+
+ headerExtensions []mediaEngineHeaderExtension
+ negotiatedHeaderExtensions map[int]mediaEngineHeaderExtension
+}
+
+// RegisterDefaultCodecs registers the default codecs supported by Pion WebRTC.
+// RegisterDefaultCodecs is not safe for concurrent use.
+func (m *MediaEngine) RegisterDefaultCodecs() error {
+ // Default Pion Audio Codecs
+ for _, codec := range []RTPCodecParameters{
+ {
+ RTPCodecCapability: RTPCodecCapability{MimeTypeOpus, 48000, 2, "minptime=10;useinbandfec=1", nil},
+ PayloadType: 111,
+ },
+ {
+ RTPCodecCapability: RTPCodecCapability{MimeTypeG722, 8000, 0, "", nil},
+ PayloadType: 9,
+ },
+ {
+ RTPCodecCapability: RTPCodecCapability{MimeTypePCMU, 8000, 0, "", nil},
+ PayloadType: 0,
+ },
+ {
+ RTPCodecCapability: RTPCodecCapability{MimeTypePCMA, 8000, 0, "", nil},
+ PayloadType: 8,
+ },
+ } {
+ if err := m.RegisterCodec(codec, RTPCodecTypeAudio); err != nil {
+ return err
+ }
+ }
+
+ videoRTCPFeedback := []RTCPFeedback{{"goog-remb", ""}, {"ccm", "fir"}, {"nack", ""}, {"nack", "pli"}}
+ for _, codec := range []RTPCodecParameters{
+ {
+ RTPCodecCapability: RTPCodecCapability{MimeTypeVP8, 90000, 0, "", videoRTCPFeedback},
+ PayloadType: 96,
+ },
+ {
+ RTPCodecCapability: RTPCodecCapability{"video/rtx", 90000, 0, "apt=96", nil},
+ PayloadType: 97,
+ },
+
+ {
+ RTPCodecCapability: RTPCodecCapability{MimeTypeVP9, 90000, 0, "profile-id=0", videoRTCPFeedback},
+ PayloadType: 98,
+ },
+ {
+ RTPCodecCapability: RTPCodecCapability{"video/rtx", 90000, 0, "apt=98", nil},
+ PayloadType: 99,
+ },
+
+ {
+ RTPCodecCapability: RTPCodecCapability{MimeTypeVP9, 90000, 0, "profile-id=1", videoRTCPFeedback},
+ PayloadType: 100,
+ },
+ {
+ RTPCodecCapability: RTPCodecCapability{"video/rtx", 90000, 0, "apt=100", nil},
+ PayloadType: 101,
+ },
+
+ {
+ RTPCodecCapability: RTPCodecCapability{MimeTypeH264, 90000, 0, "level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f", videoRTCPFeedback},
+ PayloadType: 102,
+ },
+ {
+ RTPCodecCapability: RTPCodecCapability{"video/rtx", 90000, 0, "apt=102", nil},
+ PayloadType: 121,
+ },
+
+ {
+ RTPCodecCapability: RTPCodecCapability{MimeTypeH264, 90000, 0, "level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f", videoRTCPFeedback},
+ PayloadType: 127,
+ },
+ {
+ RTPCodecCapability: RTPCodecCapability{"video/rtx", 90000, 0, "apt=127", nil},
+ PayloadType: 120,
+ },
+
+ {
+ RTPCodecCapability: RTPCodecCapability{MimeTypeH264, 90000, 0, "level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f", videoRTCPFeedback},
+ PayloadType: 125,
+ },
+ {
+ RTPCodecCapability: RTPCodecCapability{"video/rtx", 90000, 0, "apt=125", nil},
+ PayloadType: 107,
+ },
+
+ {
+ RTPCodecCapability: RTPCodecCapability{MimeTypeH264, 90000, 0, "level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f", videoRTCPFeedback},
+ PayloadType: 108,
+ },
+ {
+ RTPCodecCapability: RTPCodecCapability{"video/rtx", 90000, 0, "apt=108", nil},
+ PayloadType: 109,
+ },
+
+ {
+ RTPCodecCapability: RTPCodecCapability{MimeTypeH264, 90000, 0, "level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f", videoRTCPFeedback},
+ PayloadType: 127,
+ },
+ {
+ RTPCodecCapability: RTPCodecCapability{"video/rtx", 90000, 0, "apt=127", nil},
+ PayloadType: 120,
+ },
+
+ {
+ RTPCodecCapability: RTPCodecCapability{MimeTypeH264, 90000, 0, "level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640032", videoRTCPFeedback},
+ PayloadType: 123,
+ },
+ {
+ RTPCodecCapability: RTPCodecCapability{"video/rtx", 90000, 0, "apt=123", nil},
+ PayloadType: 118,
+ },
+
+ {
+ RTPCodecCapability: RTPCodecCapability{"video/ulpfec", 90000, 0, "", nil},
+ PayloadType: 116,
+ },
+ } {
+ if err := m.RegisterCodec(codec, RTPCodecTypeVideo); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+// addCodec will append codec if it not exists
+func (m *MediaEngine) addCodec(codecs []RTPCodecParameters, codec RTPCodecParameters) []RTPCodecParameters {
+ for _, c := range codecs {
+ if c.MimeType == codec.MimeType && c.PayloadType == codec.PayloadType {
+ return codecs
+ }
+ }
+ return append(codecs, codec)
+}
+
+// RegisterCodec adds codec to the MediaEngine
+// These are the list of codecs supported by this PeerConnection.
+// RegisterCodec is not safe for concurrent use.
+func (m *MediaEngine) RegisterCodec(codec RTPCodecParameters, typ RTPCodecType) error {
+ codec.statsID = fmt.Sprintf("RTPCodec-%d", time.Now().UnixNano())
+ switch typ {
+ case RTPCodecTypeAudio:
+ m.audioCodecs = m.addCodec(m.audioCodecs, codec)
+ case RTPCodecTypeVideo:
+ m.videoCodecs = m.addCodec(m.videoCodecs, codec)
+ default:
+ return ErrUnknownType
+ }
+ return nil
+}
+
+// RegisterHeaderExtension adds a header extension to the MediaEngine
+// To determine the negotiated value use `GetHeaderExtensionID` after signaling is complete
+func (m *MediaEngine) RegisterHeaderExtension(extension RTPHeaderExtensionCapability, typ RTPCodecType, allowedDirections ...RTPTransceiverDirection) error {
+ if m.negotiatedHeaderExtensions == nil {
+ m.negotiatedHeaderExtensions = map[int]mediaEngineHeaderExtension{}
+ }
+
+ if len(allowedDirections) == 0 {
+ allowedDirections = []RTPTransceiverDirection{RTPTransceiverDirectionRecvonly, RTPTransceiverDirectionSendonly}
+ }
+
+ for _, direction := range allowedDirections {
+ if direction != RTPTransceiverDirectionRecvonly && direction != RTPTransceiverDirectionSendonly {
+ return ErrRegisterHeaderExtensionInvalidDirection
+ }
+ }
+
+ extensionIndex := -1
+ for i := range m.headerExtensions {
+ if extension.URI == m.headerExtensions[i].uri {
+ extensionIndex = i
+ }
+ }
+
+ if extensionIndex == -1 {
+ m.headerExtensions = append(m.headerExtensions, mediaEngineHeaderExtension{})
+ extensionIndex = len(m.headerExtensions) - 1
+ }
+
+ if typ == RTPCodecTypeAudio {
+ m.headerExtensions[extensionIndex].isAudio = true
+ } else if typ == RTPCodecTypeVideo {
+ m.headerExtensions[extensionIndex].isVideo = true
+ }
+
+ m.headerExtensions[extensionIndex].uri = extension.URI
+ m.headerExtensions[extensionIndex].allowedDirections = allowedDirections
+
+ return nil
+}
+
+// RegisterFeedback adds feedback mechanism to already registered codecs.
+func (m *MediaEngine) RegisterFeedback(feedback RTCPFeedback, typ RTPCodecType) {
+ switch typ {
+ case RTPCodecTypeVideo:
+ for i, v := range m.videoCodecs {
+ v.RTCPFeedback = append(v.RTCPFeedback, feedback)
+ m.videoCodecs[i] = v
+ }
+ case RTPCodecTypeAudio:
+ for i, v := range m.audioCodecs {
+ v.RTCPFeedback = append(v.RTCPFeedback, feedback)
+ m.audioCodecs[i] = v
+ }
+ }
+}
+
+// getHeaderExtensionID returns the negotiated ID for a header extension.
+// If the Header Extension isn't enabled ok will be false
+func (m *MediaEngine) getHeaderExtensionID(extension RTPHeaderExtensionCapability) (val int, audioNegotiated, videoNegotiated bool) {
+ if m.negotiatedHeaderExtensions == nil {
+ return 0, false, false
+ }
+
+ for id, h := range m.negotiatedHeaderExtensions {
+ if extension.URI == h.uri {
+ return id, h.isAudio, h.isVideo
+ }
+ }
+
+ return
+}
+
+// copy copies any user modifiable state of the MediaEngine
+// all internal state is reset
+func (m *MediaEngine) copy() *MediaEngine {
+ cloned := &MediaEngine{
+ videoCodecs: append([]RTPCodecParameters{}, m.videoCodecs...),
+ audioCodecs: append([]RTPCodecParameters{}, m.audioCodecs...),
+ headerExtensions: append([]mediaEngineHeaderExtension{}, m.headerExtensions...),
+ }
+ if len(m.headerExtensions) > 0 {
+ cloned.negotiatedHeaderExtensions = map[int]mediaEngineHeaderExtension{}
+ }
+ return cloned
+}
+
+func (m *MediaEngine) getCodecByPayload(payloadType PayloadType) (RTPCodecParameters, RTPCodecType, error) {
+ for _, codec := range m.negotiatedVideoCodecs {
+ if codec.PayloadType == payloadType {
+ return codec, RTPCodecTypeVideo, nil
+ }
+ }
+ for _, codec := range m.negotiatedAudioCodecs {
+ if codec.PayloadType == payloadType {
+ return codec, RTPCodecTypeAudio, nil
+ }
+ }
+
+ return RTPCodecParameters{}, 0, ErrCodecNotFound
+}
+
+func (m *MediaEngine) collectStats(collector *statsReportCollector) {
+ statsLoop := func(codecs []RTPCodecParameters) {
+ for _, codec := range codecs {
+ collector.Collecting()
+ stats := CodecStats{
+ Timestamp: statsTimestampFrom(time.Now()),
+ Type: StatsTypeCodec,
+ ID: codec.statsID,
+ PayloadType: codec.PayloadType,
+ MimeType: codec.MimeType,
+ ClockRate: codec.ClockRate,
+ Channels: uint8(codec.Channels),
+ SDPFmtpLine: codec.SDPFmtpLine,
+ }
+
+ collector.Collect(stats.ID, stats)
+ }
+ }
+
+ statsLoop(m.videoCodecs)
+ statsLoop(m.audioCodecs)
+}
+
+// Look up a codec and enable if it exists
+func (m *MediaEngine) matchRemoteCodec(remoteCodec RTPCodecParameters, typ RTPCodecType) (codecMatchType, error) {
+ codecs := m.videoCodecs
+ if typ == RTPCodecTypeAudio {
+ codecs = m.audioCodecs
+ }
+
+ if strings.HasPrefix(remoteCodec.RTPCodecCapability.SDPFmtpLine, "apt=") {
+ payloadType, err := strconv.Atoi(strings.TrimPrefix(remoteCodec.RTPCodecCapability.SDPFmtpLine, "apt="))
+ if err != nil {
+ return codecMatchNone, err
+ }
+
+ if _, _, err = m.getCodecByPayload(PayloadType(payloadType)); err != nil {
+ return codecMatchNone, nil // not an error, we just ignore this codec we don't support
+ }
+ }
+
+ _, matchType := codecParametersFuzzySearch(remoteCodec, codecs)
+ return matchType, nil
+}
+
+// Look up a header extension and enable if it exists
+func (m *MediaEngine) updateHeaderExtension(id int, extension string, typ RTPCodecType) error {
+ if m.negotiatedHeaderExtensions == nil {
+ return nil
+ }
+
+ for _, localExtension := range m.headerExtensions {
+ if localExtension.uri == extension {
+ h := mediaEngineHeaderExtension{uri: extension, allowedDirections: localExtension.allowedDirections}
+ if existingValue, ok := m.negotiatedHeaderExtensions[id]; ok {
+ h = existingValue
+ }
+
+ switch {
+ case localExtension.isAudio && typ == RTPCodecTypeAudio:
+ h.isAudio = true
+ case localExtension.isVideo && typ == RTPCodecTypeVideo:
+ h.isVideo = true
+ }
+
+ m.negotiatedHeaderExtensions[id] = h
+ }
+ }
+ return nil
+}
+
+func (m *MediaEngine) pushCodecs(codecs []RTPCodecParameters, typ RTPCodecType) {
+ for _, codec := range codecs {
+ if typ == RTPCodecTypeAudio {
+ m.negotiatedAudioCodecs = m.addCodec(m.negotiatedAudioCodecs, codec)
+ } else if typ == RTPCodecTypeVideo {
+ m.negotiatedVideoCodecs = m.addCodec(m.negotiatedVideoCodecs, codec)
+ }
+ }
+}
+
+// Update the MediaEngine from a remote description
+func (m *MediaEngine) updateFromRemoteDescription(desc sdp.SessionDescription) error {
+ for _, media := range desc.MediaDescriptions {
+ var typ RTPCodecType
+ switch {
+ case !m.negotiatedAudio && strings.EqualFold(media.MediaName.Media, "audio"):
+ m.negotiatedAudio = true
+ typ = RTPCodecTypeAudio
+ case !m.negotiatedVideo && strings.EqualFold(media.MediaName.Media, "video"):
+ m.negotiatedVideo = true
+ typ = RTPCodecTypeVideo
+ default:
+ continue
+ }
+
+ codecs, err := codecsFromMediaDescription(media)
+ if err != nil {
+ return err
+ }
+
+ exactMatches := make([]RTPCodecParameters, 0, len(codecs))
+ partialMatches := make([]RTPCodecParameters, 0, len(codecs))
+
+ for _, codec := range codecs {
+ matchType, mErr := m.matchRemoteCodec(codec, typ)
+ if mErr != nil {
+ return mErr
+ }
+
+ if matchType == codecMatchExact {
+ exactMatches = append(exactMatches, codec)
+ } else if matchType == codecMatchPartial {
+ partialMatches = append(partialMatches, codec)
+ }
+ }
+
+ // use exact matches when they exist, otherwise fall back to partial
+ switch {
+ case len(exactMatches) > 0:
+ m.pushCodecs(exactMatches, typ)
+ case len(partialMatches) > 0:
+ m.pushCodecs(partialMatches, typ)
+ default:
+ // no match, not negotiated
+ continue
+ }
+
+ extensions, err := rtpExtensionsFromMediaDescription(media)
+ if err != nil {
+ return err
+ }
+
+ for extension, id := range extensions {
+ if err = m.updateHeaderExtension(id, extension, typ); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func (m *MediaEngine) getCodecsByKind(typ RTPCodecType) []RTPCodecParameters {
+ if typ == RTPCodecTypeVideo {
+ if m.negotiatedVideo {
+ return m.negotiatedVideoCodecs
+ }
+
+ return m.videoCodecs
+ } else if typ == RTPCodecTypeAudio {
+ if m.negotiatedAudio {
+ return m.negotiatedAudioCodecs
+ }
+
+ return m.audioCodecs
+ }
+
+ return nil
+}
+
+func (m *MediaEngine) getRTPParametersByKind(typ RTPCodecType, directions []RTPTransceiverDirection) RTPParameters {
+ headerExtensions := make([]RTPHeaderExtensionParameter, 0)
+
+ if m.negotiatedVideo && typ == RTPCodecTypeVideo ||
+ m.negotiatedAudio && typ == RTPCodecTypeAudio {
+ for id, e := range m.negotiatedHeaderExtensions {
+ if haveRTPTransceiverDirectionIntersection(e.allowedDirections, directions) && (e.isAudio && typ == RTPCodecTypeAudio || e.isVideo && typ == RTPCodecTypeVideo) {
+ headerExtensions = append(headerExtensions, RTPHeaderExtensionParameter{ID: id, URI: e.uri})
+ }
+ }
+ } else {
+ for id, e := range m.headerExtensions {
+ if haveRTPTransceiverDirectionIntersection(e.allowedDirections, directions) && (e.isAudio && typ == RTPCodecTypeAudio || e.isVideo && typ == RTPCodecTypeVideo) {
+ headerExtensions = append(headerExtensions, RTPHeaderExtensionParameter{ID: id + 1, URI: e.uri})
+ }
+ }
+ }
+
+ return RTPParameters{
+ HeaderExtensions: headerExtensions,
+ Codecs: m.getCodecsByKind(typ),
+ }
+}
+
+func (m *MediaEngine) getRTPParametersByPayloadType(payloadType PayloadType) (RTPParameters, error) {
+ codec, typ, err := m.getCodecByPayload(payloadType)
+ if err != nil {
+ return RTPParameters{}, err
+ }
+
+ headerExtensions := make([]RTPHeaderExtensionParameter, 0)
+ for id, e := range m.negotiatedHeaderExtensions {
+ if e.isAudio && typ == RTPCodecTypeAudio || e.isVideo && typ == RTPCodecTypeVideo {
+ headerExtensions = append(headerExtensions, RTPHeaderExtensionParameter{ID: id, URI: e.uri})
+ }
+ }
+
+ return RTPParameters{
+ HeaderExtensions: headerExtensions,
+ Codecs: []RTPCodecParameters{codec},
+ }, nil
+}
+
+func payloaderForCodec(codec RTPCodecCapability) (rtp.Payloader, error) {
+ switch strings.ToLower(codec.MimeType) {
+ case strings.ToLower(MimeTypeH264):
+ return &codecs.H264Payloader{}, nil
+ case strings.ToLower(MimeTypeOpus):
+ return &codecs.OpusPayloader{}, nil
+ case strings.ToLower(MimeTypeVP8):
+ return &codecs.VP8Payloader{}, nil
+ case strings.ToLower(MimeTypeVP9):
+ return &codecs.VP9Payloader{}, nil
+ case strings.ToLower(MimeTypeG722):
+ return &codecs.G722Payloader{}, nil
+ case strings.ToLower(MimeTypePCMU), strings.ToLower(MimeTypePCMA):
+ return &codecs.G711Payloader{}, nil
+ default:
+ return nil, ErrNoPayloaderForCodec
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/networktype.go b/vendor/github.com/pion/webrtc/v3/networktype.go
new file mode 100644
index 0000000..e5dd840
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/networktype.go
@@ -0,0 +1,104 @@
+package webrtc
+
+import (
+ "fmt"
+
+ "github.com/pion/ice/v2"
+)
+
+func supportedNetworkTypes() []NetworkType {
+ return []NetworkType{
+ NetworkTypeUDP4,
+ NetworkTypeUDP6,
+ // NetworkTypeTCP4, // Not supported yet
+ // NetworkTypeTCP6, // Not supported yet
+ }
+}
+
+// NetworkType represents the type of network
+type NetworkType int
+
+const (
+ // NetworkTypeUDP4 indicates UDP over IPv4.
+ NetworkTypeUDP4 NetworkType = iota + 1
+
+ // NetworkTypeUDP6 indicates UDP over IPv6.
+ NetworkTypeUDP6
+
+ // NetworkTypeTCP4 indicates TCP over IPv4.
+ NetworkTypeTCP4
+
+ // NetworkTypeTCP6 indicates TCP over IPv6.
+ NetworkTypeTCP6
+)
+
+// This is done this way because of a linter.
+const (
+ networkTypeUDP4Str = "udp4"
+ networkTypeUDP6Str = "udp6"
+ networkTypeTCP4Str = "tcp4"
+ networkTypeTCP6Str = "tcp6"
+)
+
+func (t NetworkType) String() string {
+ switch t {
+ case NetworkTypeUDP4:
+ return networkTypeUDP4Str
+ case NetworkTypeUDP6:
+ return networkTypeUDP6Str
+ case NetworkTypeTCP4:
+ return networkTypeTCP4Str
+ case NetworkTypeTCP6:
+ return networkTypeTCP6Str
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// Protocol returns udp or tcp
+func (t NetworkType) Protocol() string {
+ switch t {
+ case NetworkTypeUDP4:
+ return "udp"
+ case NetworkTypeUDP6:
+ return "udp"
+ case NetworkTypeTCP4:
+ return "tcp"
+ case NetworkTypeTCP6:
+ return "tcp"
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// NewNetworkType allows create network type from string
+// It will be useful for getting custom network types from external config.
+func NewNetworkType(raw string) (NetworkType, error) {
+ switch raw {
+ case networkTypeUDP4Str:
+ return NetworkTypeUDP4, nil
+ case networkTypeUDP6Str:
+ return NetworkTypeUDP6, nil
+ case networkTypeTCP4Str:
+ return NetworkTypeTCP4, nil
+ case networkTypeTCP6Str:
+ return NetworkTypeTCP6, nil
+ default:
+ return NetworkType(Unknown), fmt.Errorf("%w: %s", errNetworkTypeUnknown, raw)
+ }
+}
+
+func getNetworkType(iceNetworkType ice.NetworkType) (NetworkType, error) {
+ switch iceNetworkType {
+ case ice.NetworkTypeUDP4:
+ return NetworkTypeUDP4, nil
+ case ice.NetworkTypeUDP6:
+ return NetworkTypeUDP6, nil
+ case ice.NetworkTypeTCP4:
+ return NetworkTypeTCP4, nil
+ case ice.NetworkTypeTCP6:
+ return NetworkTypeTCP6, nil
+ default:
+ return NetworkType(Unknown), fmt.Errorf("%w: %s", errNetworkTypeUnknown, iceNetworkType.String())
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/oauthcredential.go b/vendor/github.com/pion/webrtc/v3/oauthcredential.go
new file mode 100644
index 0000000..46170c7
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/oauthcredential.go
@@ -0,0 +1,15 @@
+package webrtc
+
+// OAuthCredential represents OAuth credential information which is used by
+// the STUN/TURN client to connect to an ICE server as defined in
+// https://tools.ietf.org/html/rfc7635. Note that the kid parameter is not
+// located in OAuthCredential, but in ICEServer's username member.
+type OAuthCredential struct {
+ // MACKey is a base64-url encoded format. It is used in STUN message
+ // integrity hash calculation.
+ MACKey string
+
+ // AccessToken is a base64-encoded format. This is an encrypted
+ // self-contained token that is opaque to the application.
+ AccessToken string
+}
diff --git a/vendor/github.com/pion/webrtc/v3/offeransweroptions.go b/vendor/github.com/pion/webrtc/v3/offeransweroptions.go
new file mode 100644
index 0000000..2a34aed
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/offeransweroptions.go
@@ -0,0 +1,26 @@
+package webrtc
+
+// OfferAnswerOptions is a base structure which describes the options that
+// can be used to control the offer/answer creation process.
+type OfferAnswerOptions struct {
+ // VoiceActivityDetection allows the application to provide information
+ // about whether it wishes voice detection feature to be enabled or disabled.
+ VoiceActivityDetection bool
+}
+
+// AnswerOptions structure describes the options used to control the answer
+// creation process.
+type AnswerOptions struct {
+ OfferAnswerOptions
+}
+
+// OfferOptions structure describes the options used to control the offer
+// creation process
+type OfferOptions struct {
+ OfferAnswerOptions
+
+ // ICERestart forces the underlying ice gathering process to be restarted.
+ // When this value is true, the generated description will have ICE
+ // credentials that are different from the current credentials
+ ICERestart bool
+}
diff --git a/vendor/github.com/pion/webrtc/v3/operations.go b/vendor/github.com/pion/webrtc/v3/operations.go
new file mode 100644
index 0000000..82bc832
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/operations.go
@@ -0,0 +1,87 @@
+package webrtc
+
+import (
+ "sync"
+)
+
+// Operation is a function
+type operation func()
+
+// Operations is a task executor.
+type operations struct {
+ mu sync.Mutex
+ busy bool
+ ops []operation
+}
+
+func newOperations() *operations {
+ return &operations{}
+}
+
+// Enqueue adds a new action to be executed. If there are no actions scheduled,
+// the execution will start immediately in a new goroutine.
+func (o *operations) Enqueue(op operation) {
+ if op == nil {
+ return
+ }
+
+ o.mu.Lock()
+ running := o.busy
+ o.ops = append(o.ops, op)
+ o.busy = true
+ o.mu.Unlock()
+
+ if !running {
+ go o.start()
+ }
+}
+
+// IsEmpty checks if there are tasks in the queue
+func (o *operations) IsEmpty() bool {
+ o.mu.Lock()
+ defer o.mu.Unlock()
+ return len(o.ops) == 0
+}
+
+// Done blocks until all currently enqueued operations are finished executing.
+// For more complex synchronization, use Enqueue directly.
+func (o *operations) Done() {
+ var wg sync.WaitGroup
+ wg.Add(1)
+ o.Enqueue(func() {
+ wg.Done()
+ })
+ wg.Wait()
+}
+
+func (o *operations) pop() func() {
+ o.mu.Lock()
+ defer o.mu.Unlock()
+ if len(o.ops) == 0 {
+ return nil
+ }
+
+ fn := o.ops[0]
+ o.ops = o.ops[1:]
+ return fn
+}
+
+func (o *operations) start() {
+ defer func() {
+ o.mu.Lock()
+ defer o.mu.Unlock()
+ if len(o.ops) == 0 {
+ o.busy = false
+ return
+ }
+ // either a new operation was enqueued while we
+ // were busy, or an operation panicked
+ go o.start()
+ }()
+
+ fn := o.pop()
+ for fn != nil {
+ fn()
+ fn = o.pop()
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/package.json b/vendor/github.com/pion/webrtc/v3/package.json
new file mode 100644
index 0000000..429f3ef
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/package.json
@@ -0,0 +1,11 @@
+{
+ "name": "webrtc",
+ "repository": "git@github.com:pion/webrtc.git",
+ "private": true,
+ "devDependencies": {
+ "wrtc": "0.4.7"
+ },
+ "dependencies": {
+ "request": "2.88.2"
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/peerconnection.go b/vendor/github.com/pion/webrtc/v3/peerconnection.go
new file mode 100644
index 0000000..3f02bba
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/peerconnection.go
@@ -0,0 +1,2323 @@
+// +build !js
+
+package webrtc
+
+import (
+ "crypto/ecdsa"
+ "crypto/elliptic"
+ "crypto/rand"
+ "errors"
+ "fmt"
+ "io"
+ "strconv"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/pion/ice/v2"
+ "github.com/pion/interceptor"
+ "github.com/pion/logging"
+ "github.com/pion/rtcp"
+ "github.com/pion/sdp/v3"
+ "github.com/pion/webrtc/v3/internal/util"
+ "github.com/pion/webrtc/v3/pkg/rtcerr"
+)
+
+// PeerConnection represents a WebRTC connection that establishes a
+// peer-to-peer communications with another PeerConnection instance in a
+// browser, or to another endpoint implementing the required protocols.
+type PeerConnection struct {
+ statsID string
+ mu sync.RWMutex
+
+ // ops is an operations queue which will ensure the enqueued actions are
+ // executed in order. It is used for asynchronously, but serially processing
+ // remote and local descriptions
+ ops *operations
+
+ configuration Configuration
+
+ currentLocalDescription *SessionDescription
+ pendingLocalDescription *SessionDescription
+ currentRemoteDescription *SessionDescription
+ pendingRemoteDescription *SessionDescription
+ signalingState SignalingState
+ iceConnectionState ICEConnectionState
+ connectionState PeerConnectionState
+
+ idpLoginURL *string
+
+ isClosed *atomicBool
+ isNegotiationNeeded *atomicBool
+ negotiationNeededState negotiationNeededState
+
+ lastOffer string
+ lastAnswer string
+
+ // a value containing the last known greater mid value
+ // we internally generate mids as numbers. Needed since JSEP
+ // requires that when reusing a media section a new unique mid
+ // should be defined (see JSEP 3.4.1).
+ greaterMid int
+
+ rtpTransceivers []*RTPTransceiver
+
+ onSignalingStateChangeHandler func(SignalingState)
+ onICEConnectionStateChangeHandler func(ICEConnectionState)
+ onConnectionStateChangeHandler func(PeerConnectionState)
+ onTrackHandler func(*TrackRemote, *RTPReceiver)
+ onDataChannelHandler func(*DataChannel)
+ onNegotiationNeededHandler atomic.Value // func()
+
+ iceGatherer *ICEGatherer
+ iceTransport *ICETransport
+ dtlsTransport *DTLSTransport
+ sctpTransport *SCTPTransport
+
+ // A reference to the associated API state used by this connection
+ api *API
+ log logging.LeveledLogger
+
+ interceptorRTCPWriter interceptor.RTCPWriter
+}
+
+// NewPeerConnection creates a PeerConnection with the default codecs and
+// interceptors. See RegisterDefaultCodecs and RegisterDefaultInterceptors.
+//
+// If you wish to customize the set of available codecs or the set of
+// active interceptors, create a MediaEngine and call api.NewPeerConnection
+// instead of this function.
+func NewPeerConnection(configuration Configuration) (*PeerConnection, error) {
+ m := &MediaEngine{}
+ if err := m.RegisterDefaultCodecs(); err != nil {
+ return nil, err
+ }
+
+ i := &interceptor.Registry{}
+ if err := RegisterDefaultInterceptors(m, i); err != nil {
+ return nil, err
+ }
+
+ api := NewAPI(WithMediaEngine(m), WithInterceptorRegistry(i))
+ return api.NewPeerConnection(configuration)
+}
+
+// NewPeerConnection creates a new PeerConnection with the provided configuration against the received API object
+func (api *API) NewPeerConnection(configuration Configuration) (*PeerConnection, error) {
+ // https://w3c.github.io/webrtc-pc/#constructor (Step #2)
+ // Some variables defined explicitly despite their implicit zero values to
+ // allow better readability to understand what is happening.
+ pc := &PeerConnection{
+ statsID: fmt.Sprintf("PeerConnection-%d", time.Now().UnixNano()),
+ configuration: Configuration{
+ ICEServers: []ICEServer{},
+ ICETransportPolicy: ICETransportPolicyAll,
+ BundlePolicy: BundlePolicyBalanced,
+ RTCPMuxPolicy: RTCPMuxPolicyRequire,
+ Certificates: []Certificate{},
+ ICECandidatePoolSize: 0,
+ },
+ ops: newOperations(),
+ isClosed: &atomicBool{},
+ isNegotiationNeeded: &atomicBool{},
+ negotiationNeededState: negotiationNeededStateEmpty,
+ lastOffer: "",
+ lastAnswer: "",
+ greaterMid: -1,
+ signalingState: SignalingStateStable,
+ iceConnectionState: ICEConnectionStateNew,
+ connectionState: PeerConnectionStateNew,
+
+ api: api,
+ log: api.settingEngine.LoggerFactory.NewLogger("pc"),
+ }
+
+ if !api.settingEngine.disableMediaEngineCopy {
+ pc.api = &API{
+ settingEngine: api.settingEngine,
+ mediaEngine: api.mediaEngine.copy(),
+ interceptor: api.interceptor,
+ }
+ }
+
+ var err error
+ if err = pc.initConfiguration(configuration); err != nil {
+ return nil, err
+ }
+
+ pc.iceGatherer, err = pc.createICEGatherer()
+ if err != nil {
+ return nil, err
+ }
+
+ // Create the ice transport
+ iceTransport := pc.createICETransport()
+ pc.iceTransport = iceTransport
+
+ // Create the DTLS transport
+ dtlsTransport, err := pc.api.NewDTLSTransport(pc.iceTransport, pc.configuration.Certificates)
+ if err != nil {
+ return nil, err
+ }
+ pc.dtlsTransport = dtlsTransport
+
+ // Create the SCTP transport
+ pc.sctpTransport = pc.api.NewSCTPTransport(pc.dtlsTransport)
+
+ // Wire up the on datachannel handler
+ pc.sctpTransport.OnDataChannel(func(d *DataChannel) {
+ pc.mu.RLock()
+ handler := pc.onDataChannelHandler
+ pc.mu.RUnlock()
+ if handler != nil {
+ handler(d)
+ }
+ })
+
+ pc.interceptorRTCPWriter = api.interceptor.BindRTCPWriter(interceptor.RTCPWriterFunc(pc.writeRTCP))
+
+ return pc, nil
+}
+
+// initConfiguration defines validation of the specified Configuration and
+// its assignment to the internal configuration variable. This function differs
+// from its SetConfiguration counterpart because most of the checks do not
+// include verification statements related to the existing state. Thus the
+// function describes only minor verification of some the struct variables.
+func (pc *PeerConnection) initConfiguration(configuration Configuration) error {
+ if configuration.PeerIdentity != "" {
+ pc.configuration.PeerIdentity = configuration.PeerIdentity
+ }
+
+ // https://www.w3.org/TR/webrtc/#constructor (step #3)
+ if len(configuration.Certificates) > 0 {
+ now := time.Now()
+ for _, x509Cert := range configuration.Certificates {
+ if !x509Cert.Expires().IsZero() && now.After(x509Cert.Expires()) {
+ return &rtcerr.InvalidAccessError{Err: ErrCertificateExpired}
+ }
+ pc.configuration.Certificates = append(pc.configuration.Certificates, x509Cert)
+ }
+ } else {
+ sk, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
+ if err != nil {
+ return &rtcerr.UnknownError{Err: err}
+ }
+ certificate, err := GenerateCertificate(sk)
+ if err != nil {
+ return err
+ }
+ pc.configuration.Certificates = []Certificate{*certificate}
+ }
+
+ if configuration.BundlePolicy != BundlePolicy(Unknown) {
+ pc.configuration.BundlePolicy = configuration.BundlePolicy
+ }
+
+ if configuration.RTCPMuxPolicy != RTCPMuxPolicy(Unknown) {
+ pc.configuration.RTCPMuxPolicy = configuration.RTCPMuxPolicy
+ }
+
+ if configuration.ICECandidatePoolSize != 0 {
+ pc.configuration.ICECandidatePoolSize = configuration.ICECandidatePoolSize
+ }
+
+ if configuration.ICETransportPolicy != ICETransportPolicy(Unknown) {
+ pc.configuration.ICETransportPolicy = configuration.ICETransportPolicy
+ }
+
+ if configuration.SDPSemantics != SDPSemantics(Unknown) {
+ pc.configuration.SDPSemantics = configuration.SDPSemantics
+ }
+
+ sanitizedICEServers := configuration.getICEServers()
+ if len(sanitizedICEServers) > 0 {
+ for _, server := range sanitizedICEServers {
+ if err := server.validate(); err != nil {
+ return err
+ }
+ }
+ pc.configuration.ICEServers = sanitizedICEServers
+ }
+
+ return nil
+}
+
+// OnSignalingStateChange sets an event handler which is invoked when the
+// peer connection's signaling state changes
+func (pc *PeerConnection) OnSignalingStateChange(f func(SignalingState)) {
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+ pc.onSignalingStateChangeHandler = f
+}
+
+func (pc *PeerConnection) onSignalingStateChange(newState SignalingState) {
+ pc.mu.RLock()
+ handler := pc.onSignalingStateChangeHandler
+ pc.mu.RUnlock()
+
+ pc.log.Infof("signaling state changed to %s", newState)
+ if handler != nil {
+ go handler(newState)
+ }
+}
+
+// OnDataChannel sets an event handler which is invoked when a data
+// channel message arrives from a remote peer.
+func (pc *PeerConnection) OnDataChannel(f func(*DataChannel)) {
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+ pc.onDataChannelHandler = f
+}
+
+// OnNegotiationNeeded sets an event handler which is invoked when
+// a change has occurred which requires session negotiation
+func (pc *PeerConnection) OnNegotiationNeeded(f func()) {
+ pc.onNegotiationNeededHandler.Store(f)
+}
+
+func (pc *PeerConnection) onNegotiationNeeded() {
+ // https://w3c.github.io/webrtc-pc/#updating-the-negotiation-needed-flag
+ // non-canon step 1
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+ if pc.negotiationNeededState == negotiationNeededStateRun {
+ pc.negotiationNeededState = negotiationNeededStateQueue
+ return
+ } else if pc.negotiationNeededState == negotiationNeededStateQueue {
+ return
+ }
+
+ pc.negotiationNeededState = negotiationNeededStateRun
+
+ pc.ops.Enqueue(pc.negotiationNeededOp)
+}
+
+func (pc *PeerConnection) negotiationNeededOp() {
+ // Don't run NegotiatedNeeded checks if OnNegotiationNeeded is not set
+ if handler := pc.onNegotiationNeededHandler.Load(); handler == nil {
+ return
+ }
+
+ // https://www.w3.org/TR/webrtc/#updating-the-negotiation-needed-flag
+ // Step 2.1
+ if pc.isClosed.get() {
+ return
+ }
+ // non-canon step 2.2
+ if !pc.ops.IsEmpty() {
+ pc.ops.Enqueue(pc.negotiationNeededOp)
+ return
+ }
+
+ // non-canon, run again if there was a request
+ defer func() {
+ pc.mu.Lock()
+ if pc.negotiationNeededState == negotiationNeededStateQueue {
+ defer pc.onNegotiationNeeded()
+ }
+ pc.negotiationNeededState = negotiationNeededStateEmpty
+ pc.mu.Unlock()
+ }()
+
+ // Step 2.3
+ if pc.SignalingState() != SignalingStateStable {
+ return
+ }
+
+ // Step 2.4
+ if !pc.checkNegotiationNeeded() {
+ pc.isNegotiationNeeded.set(false)
+ return
+ }
+
+ // Step 2.5
+ if pc.isNegotiationNeeded.get() {
+ return
+ }
+
+ // Step 2.6
+ pc.isNegotiationNeeded.set(true)
+
+ // Step 2.7
+ if handler, ok := pc.onNegotiationNeededHandler.Load().(func()); ok && handler != nil {
+ handler()
+ }
+}
+
+func (pc *PeerConnection) checkNegotiationNeeded() bool { //nolint:gocognit
+ // To check if negotiation is needed for connection, perform the following checks:
+ // Skip 1, 2 steps
+ // Step 3
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+
+ localDesc := pc.currentLocalDescription
+ remoteDesc := pc.currentRemoteDescription
+
+ if localDesc == nil {
+ return true
+ }
+
+ pc.sctpTransport.lock.Lock()
+ lenDataChannel := len(pc.sctpTransport.dataChannels)
+ pc.sctpTransport.lock.Unlock()
+
+ if lenDataChannel != 0 && haveDataChannel(localDesc) == nil {
+ return true
+ }
+
+ for _, t := range pc.rtpTransceivers {
+ // https://www.w3.org/TR/webrtc/#dfn-update-the-negotiation-needed-flag
+ // Step 5.1
+ // if t.stopping && !t.stopped {
+ // return true
+ // }
+ m := getByMid(t.Mid(), localDesc)
+ // Step 5.2
+ if !t.stopped && m == nil {
+ return true
+ }
+ if !t.stopped && m != nil {
+ // Step 5.3.1
+ if t.Direction() == RTPTransceiverDirectionSendrecv || t.Direction() == RTPTransceiverDirectionSendonly {
+ descMsid, okMsid := m.Attribute(sdp.AttrKeyMsid)
+ track := t.Sender().Track()
+ if !okMsid || descMsid != track.StreamID()+" "+track.ID() {
+ return true
+ }
+ }
+ switch localDesc.Type {
+ case SDPTypeOffer:
+ // Step 5.3.2
+ rm := getByMid(t.Mid(), remoteDesc)
+ if rm == nil {
+ return true
+ }
+
+ if getPeerDirection(m) != t.Direction() && getPeerDirection(rm) != t.Direction().Revers() {
+ return true
+ }
+ case SDPTypeAnswer:
+ // Step 5.3.3
+ if _, ok := m.Attribute(t.Direction().String()); !ok {
+ return true
+ }
+ default:
+ }
+ }
+ // Step 5.4
+ if t.stopped && t.Mid() != "" {
+ if getByMid(t.Mid(), localDesc) != nil || getByMid(t.Mid(), remoteDesc) != nil {
+ return true
+ }
+ }
+ }
+ // Step 6
+ return false
+}
+
+// OnICECandidate sets an event handler which is invoked when a new ICE
+// candidate is found.
+// Take note that the handler is gonna be called with a nil pointer when
+// gathering is finished.
+func (pc *PeerConnection) OnICECandidate(f func(*ICECandidate)) {
+ pc.iceGatherer.OnLocalCandidate(f)
+}
+
+// OnICEGatheringStateChange sets an event handler which is invoked when the
+// ICE candidate gathering state has changed.
+func (pc *PeerConnection) OnICEGatheringStateChange(f func(ICEGathererState)) {
+ pc.iceGatherer.OnStateChange(f)
+}
+
+// OnTrack sets an event handler which is called when remote track
+// arrives from a remote peer.
+func (pc *PeerConnection) OnTrack(f func(*TrackRemote, *RTPReceiver)) {
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+ pc.onTrackHandler = f
+}
+
+func (pc *PeerConnection) onTrack(t *TrackRemote, r *RTPReceiver) {
+ pc.mu.RLock()
+ handler := pc.onTrackHandler
+ pc.mu.RUnlock()
+
+ pc.log.Debugf("got new track: %+v", t)
+ if t != nil {
+ if handler != nil {
+ go handler(t, r)
+ } else {
+ pc.log.Warnf("OnTrack unset, unable to handle incoming media streams")
+ }
+ }
+}
+
+// OnICEConnectionStateChange sets an event handler which is called
+// when an ICE connection state is changed.
+func (pc *PeerConnection) OnICEConnectionStateChange(f func(ICEConnectionState)) {
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+ pc.onICEConnectionStateChangeHandler = f
+}
+
+func (pc *PeerConnection) onICEConnectionStateChange(cs ICEConnectionState) {
+ pc.mu.Lock()
+ pc.iceConnectionState = cs
+ handler := pc.onICEConnectionStateChangeHandler
+ pc.mu.Unlock()
+
+ pc.log.Infof("ICE connection state changed: %s", cs)
+ if handler != nil {
+ go handler(cs)
+ }
+}
+
+// OnConnectionStateChange sets an event handler which is called
+// when the PeerConnectionState has changed
+func (pc *PeerConnection) OnConnectionStateChange(f func(PeerConnectionState)) {
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+ pc.onConnectionStateChangeHandler = f
+}
+
+// SetConfiguration updates the configuration of this PeerConnection object.
+func (pc *PeerConnection) SetConfiguration(configuration Configuration) error { //nolint:gocognit
+ // https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-setconfiguration (step #2)
+ if pc.isClosed.get() {
+ return &rtcerr.InvalidStateError{Err: ErrConnectionClosed}
+ }
+
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #3)
+ if configuration.PeerIdentity != "" {
+ if configuration.PeerIdentity != pc.configuration.PeerIdentity {
+ return &rtcerr.InvalidModificationError{Err: ErrModifyingPeerIdentity}
+ }
+ pc.configuration.PeerIdentity = configuration.PeerIdentity
+ }
+
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #4)
+ if len(configuration.Certificates) > 0 {
+ if len(configuration.Certificates) != len(pc.configuration.Certificates) {
+ return &rtcerr.InvalidModificationError{Err: ErrModifyingCertificates}
+ }
+
+ for i, certificate := range configuration.Certificates {
+ if !pc.configuration.Certificates[i].Equals(certificate) {
+ return &rtcerr.InvalidModificationError{Err: ErrModifyingCertificates}
+ }
+ }
+ pc.configuration.Certificates = configuration.Certificates
+ }
+
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #5)
+ if configuration.BundlePolicy != BundlePolicy(Unknown) {
+ if configuration.BundlePolicy != pc.configuration.BundlePolicy {
+ return &rtcerr.InvalidModificationError{Err: ErrModifyingBundlePolicy}
+ }
+ pc.configuration.BundlePolicy = configuration.BundlePolicy
+ }
+
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #6)
+ if configuration.RTCPMuxPolicy != RTCPMuxPolicy(Unknown) {
+ if configuration.RTCPMuxPolicy != pc.configuration.RTCPMuxPolicy {
+ return &rtcerr.InvalidModificationError{Err: ErrModifyingRTCPMuxPolicy}
+ }
+ pc.configuration.RTCPMuxPolicy = configuration.RTCPMuxPolicy
+ }
+
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #7)
+ if configuration.ICECandidatePoolSize != 0 {
+ if pc.configuration.ICECandidatePoolSize != configuration.ICECandidatePoolSize &&
+ pc.LocalDescription() != nil {
+ return &rtcerr.InvalidModificationError{Err: ErrModifyingICECandidatePoolSize}
+ }
+ pc.configuration.ICECandidatePoolSize = configuration.ICECandidatePoolSize
+ }
+
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #8)
+ if configuration.ICETransportPolicy != ICETransportPolicy(Unknown) {
+ pc.configuration.ICETransportPolicy = configuration.ICETransportPolicy
+ }
+
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #11)
+ if len(configuration.ICEServers) > 0 {
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #11.3)
+ for _, server := range configuration.ICEServers {
+ if err := server.validate(); err != nil {
+ return err
+ }
+ }
+ pc.configuration.ICEServers = configuration.ICEServers
+ }
+ return nil
+}
+
+// GetConfiguration returns a Configuration object representing the current
+// configuration of this PeerConnection object. The returned object is a
+// copy and direct mutation on it will not take affect until SetConfiguration
+// has been called with Configuration passed as its only argument.
+// https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-getconfiguration
+func (pc *PeerConnection) GetConfiguration() Configuration {
+ return pc.configuration
+}
+
+func (pc *PeerConnection) getStatsID() string {
+ pc.mu.RLock()
+ defer pc.mu.RUnlock()
+ return pc.statsID
+}
+
+func (pc *PeerConnection) hasLocalDescriptionChanged(desc *SessionDescription) bool {
+ for _, t := range pc.GetTransceivers() {
+ m := getByMid(t.Mid(), desc)
+ if m == nil {
+ return true
+ }
+
+ if getPeerDirection(m) != t.Direction() {
+ return true
+ }
+ }
+
+ return false
+}
+
+var errExcessiveRetries = errors.New("excessive retries in CreateOffer")
+
+// CreateOffer starts the PeerConnection and generates the localDescription
+// https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-createoffer
+func (pc *PeerConnection) CreateOffer(options *OfferOptions) (SessionDescription, error) { //nolint:gocognit
+ useIdentity := pc.idpLoginURL != nil
+ switch {
+ case useIdentity:
+ return SessionDescription{}, errIdentityProviderNotImplemented
+ case pc.isClosed.get():
+ return SessionDescription{}, &rtcerr.InvalidStateError{Err: ErrConnectionClosed}
+ }
+
+ if options != nil && options.ICERestart {
+ if err := pc.iceTransport.restart(); err != nil {
+ return SessionDescription{}, err
+ }
+ }
+
+ var (
+ d *sdp.SessionDescription
+ offer SessionDescription
+ err error
+ )
+
+ // This may be necessary to recompute if, for example, createOffer was called when only an
+ // audio RTCRtpTransceiver was added to connection, but while performing the in-parallel
+ // steps to create an offer, a video RTCRtpTransceiver was added, requiring additional
+ // inspection of video system resources.
+ count := 0
+ for {
+ // We cache current transceivers to ensure they aren't
+ // mutated during offer generation. We later check if they have
+ // been mutated and recompute the offer if necessary.
+ currentTransceivers := pc.GetTransceivers()
+
+ // in-parallel steps to create an offer
+ // https://w3c.github.io/webrtc-pc/#dfn-in-parallel-steps-to-create-an-offer
+ isPlanB := pc.configuration.SDPSemantics == SDPSemanticsPlanB
+ if pc.currentRemoteDescription != nil {
+ isPlanB = descriptionIsPlanB(pc.RemoteDescription())
+ }
+
+ // include unmatched local transceivers
+ if !isPlanB {
+ // update the greater mid if the remote description provides a greater one
+ if pc.currentRemoteDescription != nil {
+ var numericMid int
+ for _, media := range pc.currentRemoteDescription.parsed.MediaDescriptions {
+ mid := getMidValue(media)
+ if mid == "" {
+ continue
+ }
+ numericMid, err = strconv.Atoi(mid)
+ if err != nil {
+ continue
+ }
+ if numericMid > pc.greaterMid {
+ pc.greaterMid = numericMid
+ }
+ }
+ }
+ for _, t := range currentTransceivers {
+ if t.Mid() != "" {
+ continue
+ }
+ pc.greaterMid++
+ err = t.setMid(strconv.Itoa(pc.greaterMid))
+ if err != nil {
+ return SessionDescription{}, err
+ }
+ }
+ }
+
+ if pc.currentRemoteDescription == nil {
+ d, err = pc.generateUnmatchedSDP(currentTransceivers, useIdentity)
+ } else {
+ d, err = pc.generateMatchedSDP(currentTransceivers, useIdentity, true /*includeUnmatched */, connectionRoleFromDtlsRole(defaultDtlsRoleOffer))
+ }
+
+ if err != nil {
+ return SessionDescription{}, err
+ }
+
+ sdpBytes, err := d.Marshal()
+ if err != nil {
+ return SessionDescription{}, err
+ }
+
+ offer = SessionDescription{
+ Type: SDPTypeOffer,
+ SDP: string(sdpBytes),
+ parsed: d,
+ }
+
+ // Verify local media hasn't changed during offer
+ // generation. Recompute if necessary
+ if isPlanB || !pc.hasLocalDescriptionChanged(&offer) {
+ break
+ }
+ count++
+ if count >= 128 {
+ return SessionDescription{}, errExcessiveRetries
+ }
+ }
+
+ pc.lastOffer = offer.SDP
+ return offer, nil
+}
+
+func (pc *PeerConnection) createICEGatherer() (*ICEGatherer, error) {
+ g, err := pc.api.NewICEGatherer(ICEGatherOptions{
+ ICEServers: pc.configuration.getICEServers(),
+ ICEGatherPolicy: pc.configuration.ICETransportPolicy,
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ return g, nil
+}
+
+// Update the PeerConnectionState given the state of relevant transports
+// https://www.w3.org/TR/webrtc/#rtcpeerconnectionstate-enum
+func (pc *PeerConnection) updateConnectionState(iceConnectionState ICEConnectionState, dtlsTransportState DTLSTransportState) {
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+
+ connectionState := PeerConnectionStateNew
+ switch {
+ // The RTCPeerConnection object's [[IsClosed]] slot is true.
+ case pc.isClosed.get():
+ connectionState = PeerConnectionStateClosed
+
+ // Any of the RTCIceTransports or RTCDtlsTransports are in a "failed" state.
+ case iceConnectionState == ICEConnectionStateFailed || dtlsTransportState == DTLSTransportStateFailed:
+ connectionState = PeerConnectionStateFailed
+
+ // Any of the RTCIceTransports or RTCDtlsTransports are in the "disconnected"
+ // state and none of them are in the "failed" or "connecting" or "checking" state. */
+ case iceConnectionState == ICEConnectionStateDisconnected:
+ connectionState = PeerConnectionStateDisconnected
+
+ // All RTCIceTransports and RTCDtlsTransports are in the "connected", "completed" or "closed"
+ // state and at least one of them is in the "connected" or "completed" state.
+ case iceConnectionState == ICEConnectionStateConnected && dtlsTransportState == DTLSTransportStateConnected:
+ connectionState = PeerConnectionStateConnected
+
+ // Any of the RTCIceTransports or RTCDtlsTransports are in the "connecting" or
+ // "checking" state and none of them is in the "failed" state.
+ case iceConnectionState == ICEConnectionStateChecking && dtlsTransportState == DTLSTransportStateConnecting:
+ connectionState = PeerConnectionStateConnecting
+ }
+
+ if pc.connectionState == connectionState {
+ return
+ }
+
+ pc.log.Infof("peer connection state changed: %s", connectionState)
+ pc.connectionState = connectionState
+ handler := pc.onConnectionStateChangeHandler
+ if handler != nil {
+ go handler(connectionState)
+ }
+}
+
+func (pc *PeerConnection) createICETransport() *ICETransport {
+ t := pc.api.NewICETransport(pc.iceGatherer)
+ t.OnConnectionStateChange(func(state ICETransportState) {
+ var cs ICEConnectionState
+ switch state {
+ case ICETransportStateNew:
+ cs = ICEConnectionStateNew
+ case ICETransportStateChecking:
+ cs = ICEConnectionStateChecking
+ case ICETransportStateConnected:
+ cs = ICEConnectionStateConnected
+ case ICETransportStateCompleted:
+ cs = ICEConnectionStateCompleted
+ case ICETransportStateFailed:
+ cs = ICEConnectionStateFailed
+ case ICETransportStateDisconnected:
+ cs = ICEConnectionStateDisconnected
+ case ICETransportStateClosed:
+ cs = ICEConnectionStateClosed
+ default:
+ pc.log.Warnf("OnConnectionStateChange: unhandled ICE state: %s", state)
+ return
+ }
+ pc.onICEConnectionStateChange(cs)
+ pc.updateConnectionState(cs, pc.dtlsTransport.State())
+ })
+
+ return t
+}
+
+// CreateAnswer starts the PeerConnection and generates the localDescription
+func (pc *PeerConnection) CreateAnswer(options *AnswerOptions) (SessionDescription, error) {
+ useIdentity := pc.idpLoginURL != nil
+ switch {
+ case pc.RemoteDescription() == nil:
+ return SessionDescription{}, &rtcerr.InvalidStateError{Err: ErrNoRemoteDescription}
+ case useIdentity:
+ return SessionDescription{}, errIdentityProviderNotImplemented
+ case pc.isClosed.get():
+ return SessionDescription{}, &rtcerr.InvalidStateError{Err: ErrConnectionClosed}
+ case pc.signalingState.Get() != SignalingStateHaveRemoteOffer && pc.signalingState.Get() != SignalingStateHaveLocalPranswer:
+ return SessionDescription{}, &rtcerr.InvalidStateError{Err: ErrIncorrectSignalingState}
+ }
+
+ connectionRole := connectionRoleFromDtlsRole(pc.api.settingEngine.answeringDTLSRole)
+ if connectionRole == sdp.ConnectionRole(0) {
+ connectionRole = connectionRoleFromDtlsRole(defaultDtlsRoleAnswer)
+ }
+
+ currentTransceivers := pc.GetTransceivers()
+ d, err := pc.generateMatchedSDP(currentTransceivers, useIdentity, false /*includeUnmatched */, connectionRole)
+ if err != nil {
+ return SessionDescription{}, err
+ }
+
+ sdpBytes, err := d.Marshal()
+ if err != nil {
+ return SessionDescription{}, err
+ }
+
+ desc := SessionDescription{
+ Type: SDPTypeAnswer,
+ SDP: string(sdpBytes),
+ parsed: d,
+ }
+ pc.lastAnswer = desc.SDP
+ return desc, nil
+}
+
+// 4.4.1.6 Set the SessionDescription
+func (pc *PeerConnection) setDescription(sd *SessionDescription, op stateChangeOp) error { //nolint:gocognit
+ switch {
+ case pc.isClosed.get():
+ return &rtcerr.InvalidStateError{Err: ErrConnectionClosed}
+ case NewSDPType(sd.Type.String()) == SDPType(Unknown):
+ return &rtcerr.TypeError{Err: fmt.Errorf("%w: '%d' is not a valid enum value of type SDPType", errPeerConnSDPTypeInvalidValue, sd.Type)}
+ }
+
+ nextState, err := func() (SignalingState, error) {
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+
+ cur := pc.SignalingState()
+ setLocal := stateChangeOpSetLocal
+ setRemote := stateChangeOpSetRemote
+ newSDPDoesNotMatchOffer := &rtcerr.InvalidModificationError{Err: errSDPDoesNotMatchOffer}
+ newSDPDoesNotMatchAnswer := &rtcerr.InvalidModificationError{Err: errSDPDoesNotMatchAnswer}
+
+ var nextState SignalingState
+ var err error
+ switch op {
+ case setLocal:
+ switch sd.Type {
+ // stable->SetLocal(offer)->have-local-offer
+ case SDPTypeOffer:
+ if sd.SDP != pc.lastOffer {
+ return nextState, newSDPDoesNotMatchOffer
+ }
+ nextState, err = checkNextSignalingState(cur, SignalingStateHaveLocalOffer, setLocal, sd.Type)
+ if err == nil {
+ pc.pendingLocalDescription = sd
+ }
+ // have-remote-offer->SetLocal(answer)->stable
+ // have-local-pranswer->SetLocal(answer)->stable
+ case SDPTypeAnswer:
+ if sd.SDP != pc.lastAnswer {
+ return nextState, newSDPDoesNotMatchAnswer
+ }
+ nextState, err = checkNextSignalingState(cur, SignalingStateStable, setLocal, sd.Type)
+ if err == nil {
+ pc.currentLocalDescription = sd
+ pc.currentRemoteDescription = pc.pendingRemoteDescription
+ pc.pendingRemoteDescription = nil
+ pc.pendingLocalDescription = nil
+ }
+ case SDPTypeRollback:
+ nextState, err = checkNextSignalingState(cur, SignalingStateStable, setLocal, sd.Type)
+ if err == nil {
+ pc.pendingLocalDescription = nil
+ }
+ // have-remote-offer->SetLocal(pranswer)->have-local-pranswer
+ case SDPTypePranswer:
+ if sd.SDP != pc.lastAnswer {
+ return nextState, newSDPDoesNotMatchAnswer
+ }
+ nextState, err = checkNextSignalingState(cur, SignalingStateHaveLocalPranswer, setLocal, sd.Type)
+ if err == nil {
+ pc.pendingLocalDescription = sd
+ }
+ default:
+ return nextState, &rtcerr.OperationError{Err: fmt.Errorf("%w: %s(%s)", errPeerConnStateChangeInvalid, op, sd.Type)}
+ }
+ case setRemote:
+ switch sd.Type {
+ // stable->SetRemote(offer)->have-remote-offer
+ case SDPTypeOffer:
+ nextState, err = checkNextSignalingState(cur, SignalingStateHaveRemoteOffer, setRemote, sd.Type)
+ if err == nil {
+ pc.pendingRemoteDescription = sd
+ }
+ // have-local-offer->SetRemote(answer)->stable
+ // have-remote-pranswer->SetRemote(answer)->stable
+ case SDPTypeAnswer:
+ nextState, err = checkNextSignalingState(cur, SignalingStateStable, setRemote, sd.Type)
+ if err == nil {
+ pc.currentRemoteDescription = sd
+ pc.currentLocalDescription = pc.pendingLocalDescription
+ pc.pendingRemoteDescription = nil
+ pc.pendingLocalDescription = nil
+ }
+ case SDPTypeRollback:
+ nextState, err = checkNextSignalingState(cur, SignalingStateStable, setRemote, sd.Type)
+ if err == nil {
+ pc.pendingRemoteDescription = nil
+ }
+ // have-local-offer->SetRemote(pranswer)->have-remote-pranswer
+ case SDPTypePranswer:
+ nextState, err = checkNextSignalingState(cur, SignalingStateHaveRemotePranswer, setRemote, sd.Type)
+ if err == nil {
+ pc.pendingRemoteDescription = sd
+ }
+ default:
+ return nextState, &rtcerr.OperationError{Err: fmt.Errorf("%w: %s(%s)", errPeerConnStateChangeInvalid, op, sd.Type)}
+ }
+ default:
+ return nextState, &rtcerr.OperationError{Err: fmt.Errorf("%w: %q", errPeerConnStateChangeUnhandled, op)}
+ }
+
+ return nextState, err
+ }()
+
+ if err == nil {
+ pc.signalingState.Set(nextState)
+ if pc.signalingState.Get() == SignalingStateStable {
+ pc.isNegotiationNeeded.set(false)
+ pc.onNegotiationNeeded()
+ }
+ pc.onSignalingStateChange(nextState)
+ }
+ return err
+}
+
+// SetLocalDescription sets the SessionDescription of the local peer
+func (pc *PeerConnection) SetLocalDescription(desc SessionDescription) error {
+ if pc.isClosed.get() {
+ return &rtcerr.InvalidStateError{Err: ErrConnectionClosed}
+ }
+
+ haveLocalDescription := pc.currentLocalDescription != nil
+
+ // JSEP 5.4
+ if desc.SDP == "" {
+ switch desc.Type {
+ case SDPTypeAnswer, SDPTypePranswer:
+ desc.SDP = pc.lastAnswer
+ case SDPTypeOffer:
+ desc.SDP = pc.lastOffer
+ default:
+ return &rtcerr.InvalidModificationError{
+ Err: fmt.Errorf("%w: %s", errPeerConnSDPTypeInvalidValueSetLocalDescription, desc.Type),
+ }
+ }
+ }
+
+ desc.parsed = &sdp.SessionDescription{}
+ if err := desc.parsed.Unmarshal([]byte(desc.SDP)); err != nil {
+ return err
+ }
+ if err := pc.setDescription(&desc, stateChangeOpSetLocal); err != nil {
+ return err
+ }
+
+ currentTransceivers := append([]*RTPTransceiver{}, pc.GetTransceivers()...)
+
+ weAnswer := desc.Type == SDPTypeAnswer
+ remoteDesc := pc.RemoteDescription()
+ if weAnswer && remoteDesc != nil {
+ if err := pc.startRTPSenders(currentTransceivers); err != nil {
+ return err
+ }
+ pc.ops.Enqueue(func() {
+ pc.startRTP(haveLocalDescription, remoteDesc, currentTransceivers)
+ })
+ }
+
+ if pc.iceGatherer.State() == ICEGathererStateNew {
+ return pc.iceGatherer.Gather()
+ }
+ return nil
+}
+
+// LocalDescription returns PendingLocalDescription if it is not null and
+// otherwise it returns CurrentLocalDescription. This property is used to
+// determine if SetLocalDescription has already been called.
+// https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-localdescription
+func (pc *PeerConnection) LocalDescription() *SessionDescription {
+ if pendingLocalDescription := pc.PendingLocalDescription(); pendingLocalDescription != nil {
+ return pendingLocalDescription
+ }
+ return pc.CurrentLocalDescription()
+}
+
+// SetRemoteDescription sets the SessionDescription of the remote peer
+// nolint: gocyclo
+func (pc *PeerConnection) SetRemoteDescription(desc SessionDescription) error { //nolint:gocognit
+ if pc.isClosed.get() {
+ return &rtcerr.InvalidStateError{Err: ErrConnectionClosed}
+ }
+
+ isRenegotation := pc.currentRemoteDescription != nil
+
+ if _, err := desc.Unmarshal(); err != nil {
+ return err
+ }
+ if err := pc.setDescription(&desc, stateChangeOpSetRemote); err != nil {
+ return err
+ }
+
+ if err := pc.api.mediaEngine.updateFromRemoteDescription(*desc.parsed); err != nil {
+ return err
+ }
+
+ var t *RTPTransceiver
+ localTransceivers := append([]*RTPTransceiver{}, pc.GetTransceivers()...)
+ detectedPlanB := descriptionIsPlanB(pc.RemoteDescription())
+ weOffer := desc.Type == SDPTypeAnswer
+
+ if !weOffer && !detectedPlanB {
+ for _, media := range pc.RemoteDescription().parsed.MediaDescriptions {
+ midValue := getMidValue(media)
+ if midValue == "" {
+ return errPeerConnRemoteDescriptionWithoutMidValue
+ }
+
+ if media.MediaName.Media == mediaSectionApplication {
+ continue
+ }
+
+ kind := NewRTPCodecType(media.MediaName.Media)
+ direction := getPeerDirection(media)
+ if kind == 0 || direction == RTPTransceiverDirection(Unknown) {
+ continue
+ }
+
+ t, localTransceivers = findByMid(midValue, localTransceivers)
+ if t == nil {
+ t, localTransceivers = satisfyTypeAndDirection(kind, direction, localTransceivers)
+ } else if direction == RTPTransceiverDirectionInactive {
+ if err := t.Stop(); err != nil {
+ return err
+ }
+ }
+
+ if t == nil {
+ receiver, err := pc.api.NewRTPReceiver(kind, pc.dtlsTransport)
+ if err != nil {
+ return err
+ }
+
+ localDirection := RTPTransceiverDirectionRecvonly
+ if direction == RTPTransceiverDirectionRecvonly {
+ localDirection = RTPTransceiverDirectionSendonly
+ }
+
+ t = pc.newRTPTransceiver(receiver, nil, localDirection, kind)
+
+ pc.onNegotiationNeeded()
+ } else if direction == RTPTransceiverDirectionRecvonly {
+ if t.Direction() == RTPTransceiverDirectionSendrecv {
+ t.setDirection(RTPTransceiverDirectionSendonly)
+ }
+ }
+
+ if t.Mid() == "" {
+ if err := t.setMid(midValue); err != nil {
+ return err
+ }
+ }
+ }
+ }
+
+ remoteUfrag, remotePwd, candidates, err := extractICEDetails(desc.parsed)
+ if err != nil {
+ return err
+ }
+
+ if isRenegotation && pc.iceTransport.haveRemoteCredentialsChange(remoteUfrag, remotePwd) {
+ // An ICE Restart only happens implicitly for a SetRemoteDescription of type offer
+ if !weOffer {
+ if err = pc.iceTransport.restart(); err != nil {
+ return err
+ }
+ }
+
+ if err = pc.iceTransport.setRemoteCredentials(remoteUfrag, remotePwd); err != nil {
+ return err
+ }
+ }
+
+ for i := range candidates {
+ if err = pc.iceTransport.AddRemoteCandidate(&candidates[i]); err != nil {
+ return err
+ }
+ }
+
+ currentTransceivers := append([]*RTPTransceiver{}, pc.GetTransceivers()...)
+
+ if isRenegotation {
+ if weOffer {
+ if err = pc.startRTPSenders(currentTransceivers); err != nil {
+ return err
+ }
+ pc.ops.Enqueue(func() {
+ pc.startRTP(true, &desc, currentTransceivers)
+ })
+ }
+ return nil
+ }
+
+ remoteIsLite := false
+ for _, a := range desc.parsed.Attributes {
+ if strings.TrimSpace(a.Key) == sdp.AttrKeyICELite {
+ remoteIsLite = true
+ }
+ }
+
+ fingerprint, fingerprintHash, err := extractFingerprint(desc.parsed)
+ if err != nil {
+ return err
+ }
+
+ iceRole := ICERoleControlled
+ // If one of the agents is lite and the other one is not, the lite agent must be the controlling agent.
+ // If both or neither agents are lite the offering agent is controlling.
+ // RFC 8445 S6.1.1
+ if (weOffer && remoteIsLite == pc.api.settingEngine.candidates.ICELite) || (remoteIsLite && !pc.api.settingEngine.candidates.ICELite) {
+ iceRole = ICERoleControlling
+ }
+
+ // Start the networking in a new routine since it will block until
+ // the connection is actually established.
+ if weOffer {
+ if err := pc.startRTPSenders(currentTransceivers); err != nil {
+ return err
+ }
+ }
+
+ pc.ops.Enqueue(func() {
+ pc.startTransports(iceRole, dtlsRoleFromRemoteSDP(desc.parsed), remoteUfrag, remotePwd, fingerprint, fingerprintHash)
+ if weOffer {
+ pc.startRTP(false, &desc, currentTransceivers)
+ }
+ })
+ return nil
+}
+
+func (pc *PeerConnection) startReceiver(incoming trackDetails, receiver *RTPReceiver) {
+ encodings := []RTPDecodingParameters{}
+ if incoming.ssrc != 0 {
+ encodings = append(encodings, RTPDecodingParameters{RTPCodingParameters{SSRC: incoming.ssrc}})
+ }
+ for _, rid := range incoming.rids {
+ encodings = append(encodings, RTPDecodingParameters{RTPCodingParameters{RID: rid}})
+ }
+
+ if err := receiver.Receive(RTPReceiveParameters{Encodings: encodings}); err != nil {
+ pc.log.Warnf("RTPReceiver Receive failed %s", err)
+ return
+ }
+
+ // set track id and label early so they can be set as new track information
+ // is received from the SDP.
+ for i := range receiver.tracks {
+ receiver.tracks[i].track.mu.Lock()
+ receiver.tracks[i].track.id = incoming.id
+ receiver.tracks[i].track.streamID = incoming.streamID
+ receiver.tracks[i].track.mu.Unlock()
+ }
+
+ // We can't block and wait for a single SSRC
+ if incoming.ssrc == 0 {
+ return
+ }
+
+ go func() {
+ if err := receiver.Track().determinePayloadType(); err != nil {
+ pc.log.Warnf("Could not determine PayloadType for SSRC %d", receiver.Track().SSRC())
+ return
+ }
+
+ params, err := pc.api.mediaEngine.getRTPParametersByPayloadType(receiver.Track().PayloadType())
+ if err != nil {
+ pc.log.Warnf("no codec could be found for payloadType %d", receiver.Track().PayloadType())
+ return
+ }
+
+ receiver.Track().mu.Lock()
+ receiver.Track().kind = receiver.kind
+ receiver.Track().codec = params.Codecs[0]
+ receiver.Track().params = params
+ receiver.Track().mu.Unlock()
+
+ pc.onTrack(receiver.Track(), receiver)
+ }()
+}
+
+// startRTPReceivers opens knows inbound SRTP streams from the RemoteDescription
+func (pc *PeerConnection) startRTPReceivers(incomingTracks []trackDetails, currentTransceivers []*RTPTransceiver) { //nolint:gocognit
+ localTransceivers := append([]*RTPTransceiver{}, currentTransceivers...)
+
+ remoteIsPlanB := false
+ switch pc.configuration.SDPSemantics {
+ case SDPSemanticsPlanB:
+ remoteIsPlanB = true
+ case SDPSemanticsUnifiedPlanWithFallback:
+ remoteIsPlanB = descriptionIsPlanB(pc.RemoteDescription())
+ default:
+ // none
+ }
+
+ // Ensure we haven't already started a transceiver for this ssrc
+ for i := range incomingTracks {
+ if len(incomingTracks) <= i {
+ break
+ }
+ incomingTrack := incomingTracks[i]
+
+ for _, t := range localTransceivers {
+ if (t.Receiver()) == nil || t.Receiver().Track() == nil || t.Receiver().Track().ssrc != incomingTrack.ssrc {
+ continue
+ }
+
+ incomingTracks = filterTrackWithSSRC(incomingTracks, incomingTrack.ssrc)
+ }
+ }
+
+ unhandledTracks := incomingTracks[:0]
+ for i := range incomingTracks {
+ trackHandled := false
+ for j := range localTransceivers {
+ t := localTransceivers[j]
+ incomingTrack := incomingTracks[i]
+
+ if t.Mid() != incomingTrack.mid {
+ continue
+ }
+
+ if (incomingTrack.kind != t.kind) ||
+ (t.Direction() != RTPTransceiverDirectionRecvonly && t.Direction() != RTPTransceiverDirectionSendrecv) ||
+ (t.Receiver()) == nil ||
+ (t.Receiver().haveReceived()) {
+ continue
+ }
+
+ pc.startReceiver(incomingTrack, t.Receiver())
+ trackHandled = true
+ break
+ }
+
+ if !trackHandled {
+ unhandledTracks = append(unhandledTracks, incomingTracks[i])
+ }
+ }
+
+ if remoteIsPlanB {
+ for _, incoming := range unhandledTracks {
+ t, err := pc.AddTransceiverFromKind(incoming.kind, RtpTransceiverInit{
+ Direction: RTPTransceiverDirectionSendrecv,
+ })
+ if err != nil {
+ pc.log.Warnf("Could not add transceiver for remote SSRC %d: %s", incoming.ssrc, err)
+ continue
+ }
+ pc.startReceiver(incoming, t.Receiver())
+ }
+ }
+}
+
+// startRTPSenders starts all outbound RTP streams
+func (pc *PeerConnection) startRTPSenders(currentTransceivers []*RTPTransceiver) error {
+ for _, transceiver := range currentTransceivers {
+ if transceiver.Sender() != nil && transceiver.Sender().isNegotiated() && !transceiver.Sender().hasSent() {
+ err := transceiver.Sender().Send(RTPSendParameters{
+ Encodings: []RTPEncodingParameters{
+ {
+ RTPCodingParameters{
+ SSRC: transceiver.Sender().ssrc,
+ PayloadType: transceiver.Sender().payloadType,
+ },
+ },
+ },
+ })
+ if err != nil {
+ return err
+ }
+ }
+ }
+
+ return nil
+}
+
+// Start SCTP subsystem
+func (pc *PeerConnection) startSCTP() {
+ // Start sctp
+ if err := pc.sctpTransport.Start(SCTPCapabilities{
+ MaxMessageSize: 0,
+ }); err != nil {
+ pc.log.Warnf("Failed to start SCTP: %s", err)
+ if err = pc.sctpTransport.Stop(); err != nil {
+ pc.log.Warnf("Failed to stop SCTPTransport: %s", err)
+ }
+
+ return
+ }
+
+ // DataChannels that need to be opened now that SCTP is available
+ // make a copy we may have incoming DataChannels mutating this while we open
+ pc.sctpTransport.lock.RLock()
+ dataChannels := append([]*DataChannel{}, pc.sctpTransport.dataChannels...)
+ pc.sctpTransport.lock.RUnlock()
+
+ var openedDCCount uint32
+ for _, d := range dataChannels {
+ if d.ReadyState() == DataChannelStateConnecting {
+ err := d.open(pc.sctpTransport)
+ if err != nil {
+ pc.log.Warnf("failed to open data channel: %s", err)
+ continue
+ }
+ openedDCCount++
+ }
+ }
+
+ pc.sctpTransport.lock.Lock()
+ pc.sctpTransport.dataChannelsOpened += openedDCCount
+ pc.sctpTransport.lock.Unlock()
+}
+
+func (pc *PeerConnection) handleUndeclaredSSRC(rtpStream io.Reader, ssrc SSRC) error { //nolint:gocognit
+ remoteDescription := pc.RemoteDescription()
+ if remoteDescription == nil {
+ return errPeerConnRemoteDescriptionNil
+ }
+
+ // If the remote SDP was only one media section the ssrc doesn't have to be explicitly declared
+ if len(remoteDescription.parsed.MediaDescriptions) == 1 {
+ onlyMediaSection := remoteDescription.parsed.MediaDescriptions[0]
+ for _, a := range onlyMediaSection.Attributes {
+ if a.Key == ssrcStr {
+ return errPeerConnSingleMediaSectionHasExplicitSSRC
+ }
+ }
+
+ incoming := trackDetails{
+ ssrc: ssrc,
+ kind: RTPCodecTypeVideo,
+ }
+ if onlyMediaSection.MediaName.Media == RTPCodecTypeAudio.String() {
+ incoming.kind = RTPCodecTypeAudio
+ }
+
+ t, err := pc.AddTransceiverFromKind(incoming.kind, RtpTransceiverInit{
+ Direction: RTPTransceiverDirectionSendrecv,
+ })
+ if err != nil {
+ return fmt.Errorf("%w: %d: %s", errPeerConnRemoteSSRCAddTransceiver, ssrc, err)
+ }
+ pc.startReceiver(incoming, t.Receiver())
+ return nil
+ }
+
+ midExtensionID, audioSupported, videoSupported := pc.api.mediaEngine.getHeaderExtensionID(RTPHeaderExtensionCapability{sdp.SDESMidURI})
+ if !audioSupported && !videoSupported {
+ return errPeerConnSimulcastMidRTPExtensionRequired
+ }
+
+ streamIDExtensionID, audioSupported, videoSupported := pc.api.mediaEngine.getHeaderExtensionID(RTPHeaderExtensionCapability{sdp.SDESRTPStreamIDURI})
+ if !audioSupported && !videoSupported {
+ return errPeerConnSimulcastStreamIDRTPExtensionRequired
+ }
+
+ b := make([]byte, receiveMTU)
+ var mid, rid string
+ for readCount := 0; readCount <= simulcastProbeCount; readCount++ {
+ i, err := rtpStream.Read(b)
+ if err != nil {
+ return err
+ }
+
+ maybeMid, maybeRid, payloadType, err := handleUnknownRTPPacket(b[:i], uint8(midExtensionID), uint8(streamIDExtensionID))
+ if err != nil {
+ return err
+ }
+
+ if maybeMid != "" {
+ mid = maybeMid
+ }
+ if maybeRid != "" {
+ rid = maybeRid
+ }
+
+ if mid == "" || rid == "" {
+ continue
+ }
+
+ params, err := pc.api.mediaEngine.getRTPParametersByPayloadType(payloadType)
+ if err != nil {
+ return err
+ }
+
+ for _, t := range pc.GetTransceivers() {
+ if t.Mid() != mid || t.Receiver() == nil {
+ continue
+ }
+
+ track, err := t.Receiver().receiveForRid(rid, params, ssrc)
+ if err != nil {
+ return err
+ }
+ pc.onTrack(track, t.Receiver())
+ return nil
+ }
+ }
+
+ return errPeerConnSimulcastIncomingSSRCFailed
+}
+
+// undeclaredMediaProcessor handles RTP/RTCP packets that don't match any a:ssrc lines
+func (pc *PeerConnection) undeclaredMediaProcessor() {
+ go func() {
+ var simulcastRoutineCount uint64
+ for {
+ srtpSession, err := pc.dtlsTransport.getSRTPSession()
+ if err != nil {
+ pc.log.Warnf("undeclaredMediaProcessor failed to open SrtpSession: %v", err)
+ return
+ }
+
+ stream, ssrc, err := srtpSession.AcceptStream()
+ if err != nil {
+ pc.log.Warnf("Failed to accept RTP %v", err)
+ return
+ }
+
+ if pc.isClosed.get() {
+ if err = stream.Close(); err != nil {
+ pc.log.Warnf("Failed to close RTP stream %v", err)
+ }
+ continue
+ }
+
+ if atomic.AddUint64(&simulcastRoutineCount, 1) >= simulcastMaxProbeRoutines {
+ atomic.AddUint64(&simulcastRoutineCount, ^uint64(0))
+ pc.log.Warn(ErrSimulcastProbeOverflow.Error())
+ continue
+ }
+
+ go func(rtpStream io.Reader, ssrc SSRC) {
+ pc.dtlsTransport.storeSimulcastStream(stream)
+
+ if err := pc.handleUndeclaredSSRC(rtpStream, ssrc); err != nil {
+ pc.log.Errorf("Incoming unhandled RTP ssrc(%d), OnTrack will not be fired. %v", ssrc, err)
+ }
+ atomic.AddUint64(&simulcastRoutineCount, ^uint64(0))
+ }(stream, SSRC(ssrc))
+ }
+ }()
+
+ go func() {
+ for {
+ srtcpSession, err := pc.dtlsTransport.getSRTCPSession()
+ if err != nil {
+ pc.log.Warnf("undeclaredMediaProcessor failed to open SrtcpSession: %v", err)
+ return
+ }
+
+ _, ssrc, err := srtcpSession.AcceptStream()
+ if err != nil {
+ pc.log.Warnf("Failed to accept RTCP %v", err)
+ return
+ }
+ pc.log.Warnf("Incoming unhandled RTCP ssrc(%d), OnTrack will not be fired", ssrc)
+ }
+ }()
+}
+
+// RemoteDescription returns pendingRemoteDescription if it is not null and
+// otherwise it returns currentRemoteDescription. This property is used to
+// determine if setRemoteDescription has already been called.
+// https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-remotedescription
+func (pc *PeerConnection) RemoteDescription() *SessionDescription {
+ pc.mu.RLock()
+ defer pc.mu.RUnlock()
+
+ if pc.pendingRemoteDescription != nil {
+ return pc.pendingRemoteDescription
+ }
+ return pc.currentRemoteDescription
+}
+
+// AddICECandidate accepts an ICE candidate string and adds it
+// to the existing set of candidates.
+func (pc *PeerConnection) AddICECandidate(candidate ICECandidateInit) error {
+ if pc.RemoteDescription() == nil {
+ return &rtcerr.InvalidStateError{Err: ErrNoRemoteDescription}
+ }
+
+ candidateValue := strings.TrimPrefix(candidate.Candidate, "candidate:")
+
+ var iceCandidate *ICECandidate
+ if candidateValue != "" {
+ candidate, err := ice.UnmarshalCandidate(candidateValue)
+ if err != nil {
+ return err
+ }
+
+ c, err := newICECandidateFromICE(candidate)
+ if err != nil {
+ return err
+ }
+ iceCandidate = &c
+ }
+
+ return pc.iceTransport.AddRemoteCandidate(iceCandidate)
+}
+
+// ICEConnectionState returns the ICE connection state of the
+// PeerConnection instance.
+func (pc *PeerConnection) ICEConnectionState() ICEConnectionState {
+ pc.mu.RLock()
+ defer pc.mu.RUnlock()
+
+ return pc.iceConnectionState
+}
+
+// GetSenders returns the RTPSender that are currently attached to this PeerConnection
+func (pc *PeerConnection) GetSenders() []*RTPSender {
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+
+ result := []*RTPSender{}
+ for _, transceiver := range pc.rtpTransceivers {
+ if transceiver.Sender() != nil {
+ result = append(result, transceiver.Sender())
+ }
+ }
+ return result
+}
+
+// GetReceivers returns the RTPReceivers that are currently attached to this PeerConnection
+func (pc *PeerConnection) GetReceivers() (receivers []*RTPReceiver) {
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+
+ for _, transceiver := range pc.rtpTransceivers {
+ if transceiver.Receiver() != nil {
+ receivers = append(receivers, transceiver.Receiver())
+ }
+ }
+ return
+}
+
+// GetTransceivers returns the RtpTransceiver that are currently attached to this PeerConnection
+func (pc *PeerConnection) GetTransceivers() []*RTPTransceiver {
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+
+ return pc.rtpTransceivers
+}
+
+// AddTrack adds a Track to the PeerConnection
+func (pc *PeerConnection) AddTrack(track TrackLocal) (*RTPSender, error) {
+ if pc.isClosed.get() {
+ return nil, &rtcerr.InvalidStateError{Err: ErrConnectionClosed}
+ }
+
+ var transceiver *RTPTransceiver
+ for _, t := range pc.GetTransceivers() {
+ if !t.stopped && t.kind == track.Kind() && t.Sender() == nil {
+ transceiver = t
+ break
+ }
+ }
+ if transceiver != nil {
+ sender, err := pc.api.NewRTPSender(track, pc.dtlsTransport)
+ if err != nil {
+ return nil, err
+ }
+ transceiver.setSender(sender)
+ // we still need to call setSendingTrack to ensure direction has changed
+ if err := transceiver.setSendingTrack(track); err != nil {
+ return nil, err
+ }
+ pc.onNegotiationNeeded()
+
+ return sender, nil
+ }
+
+ transceiver, err := pc.AddTransceiverFromTrack(track)
+ if err != nil {
+ return nil, err
+ }
+
+ return transceiver.Sender(), nil
+}
+
+// RemoveTrack removes a Track from the PeerConnection
+func (pc *PeerConnection) RemoveTrack(sender *RTPSender) error {
+ if pc.isClosed.get() {
+ return &rtcerr.InvalidStateError{Err: ErrConnectionClosed}
+ }
+
+ var transceiver *RTPTransceiver
+ for _, t := range pc.GetTransceivers() {
+ if t.Sender() == sender {
+ transceiver = t
+ break
+ }
+ }
+
+ if transceiver == nil {
+ return &rtcerr.InvalidAccessError{Err: ErrSenderNotCreatedByConnection}
+ } else if err := sender.Stop(); err != nil {
+ return err
+ }
+
+ if err := transceiver.setSendingTrack(nil); err != nil {
+ return err
+ }
+
+ pc.onNegotiationNeeded()
+
+ return nil
+}
+
+// AddTransceiverFromKind Create a new RtpTransceiver(SendRecv or RecvOnly) and add it to the set of transceivers.
+func (pc *PeerConnection) AddTransceiverFromKind(kind RTPCodecType, init ...RtpTransceiverInit) (*RTPTransceiver, error) {
+ if pc.isClosed.get() {
+ return nil, &rtcerr.InvalidStateError{Err: ErrConnectionClosed}
+ }
+
+ direction := RTPTransceiverDirectionSendrecv
+ if len(init) > 1 {
+ return nil, errPeerConnAddTransceiverFromKindOnlyAcceptsOne
+ } else if len(init) == 1 {
+ direction = init[0].Direction
+ }
+
+ switch direction {
+ case RTPTransceiverDirectionSendrecv:
+ codecs := pc.api.mediaEngine.getCodecsByKind(kind)
+ if len(codecs) == 0 {
+ return nil, ErrNoCodecsAvailable
+ }
+
+ track, err := NewTrackLocalStaticSample(codecs[0].RTPCodecCapability, util.MathRandAlpha(16), util.MathRandAlpha(16))
+ if err != nil {
+ return nil, err
+ }
+
+ return pc.AddTransceiverFromTrack(track, init...)
+ case RTPTransceiverDirectionRecvonly:
+ receiver, err := pc.api.NewRTPReceiver(kind, pc.dtlsTransport)
+ if err != nil {
+ return nil, err
+ }
+
+ t := pc.newRTPTransceiver(
+ receiver,
+ nil,
+ RTPTransceiverDirectionRecvonly,
+ kind,
+ )
+
+ pc.onNegotiationNeeded()
+
+ return t, nil
+ default:
+ return nil, errPeerConnAddTransceiverFromKindSupport
+ }
+}
+
+// AddTransceiverFromTrack Create a new RtpTransceiver(SendRecv or SendOnly) and add it to the set of transceivers.
+func (pc *PeerConnection) AddTransceiverFromTrack(track TrackLocal, init ...RtpTransceiverInit) (*RTPTransceiver, error) {
+ if pc.isClosed.get() {
+ return nil, &rtcerr.InvalidStateError{Err: ErrConnectionClosed}
+ }
+
+ direction := RTPTransceiverDirectionSendrecv
+ if len(init) > 1 {
+ return nil, errPeerConnAddTransceiverFromTrackOnlyAcceptsOne
+ } else if len(init) == 1 {
+ direction = init[0].Direction
+ }
+
+ switch direction {
+ case RTPTransceiverDirectionSendrecv:
+ receiver, err := pc.api.NewRTPReceiver(track.Kind(), pc.dtlsTransport)
+ if err != nil {
+ return nil, err
+ }
+
+ sender, err := pc.api.NewRTPSender(track, pc.dtlsTransport)
+ if err != nil {
+ return nil, err
+ }
+
+ t := pc.newRTPTransceiver(
+ receiver,
+ sender,
+ RTPTransceiverDirectionSendrecv,
+ track.Kind(),
+ )
+
+ pc.onNegotiationNeeded()
+
+ return t, nil
+
+ case RTPTransceiverDirectionSendonly:
+ sender, err := pc.api.NewRTPSender(track, pc.dtlsTransport)
+ if err != nil {
+ return nil, err
+ }
+
+ t := pc.newRTPTransceiver(
+ nil,
+ sender,
+ RTPTransceiverDirectionSendonly,
+ track.Kind(),
+ )
+
+ pc.onNegotiationNeeded()
+
+ return t, nil
+ default:
+ return nil, errPeerConnAddTransceiverFromTrackSupport
+ }
+}
+
+// CreateDataChannel creates a new DataChannel object with the given label
+// and optional DataChannelInit used to configure properties of the
+// underlying channel such as data reliability.
+func (pc *PeerConnection) CreateDataChannel(label string, options *DataChannelInit) (*DataChannel, error) {
+ // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api (Step #2)
+ if pc.isClosed.get() {
+ return nil, &rtcerr.InvalidStateError{Err: ErrConnectionClosed}
+ }
+
+ params := &DataChannelParameters{
+ Label: label,
+ Ordered: true,
+ }
+
+ // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api (Step #19)
+ if options != nil {
+ params.ID = options.ID
+ }
+
+ if options != nil {
+ // Ordered indicates if data is allowed to be delivered out of order. The
+ // default value of true, guarantees that data will be delivered in order.
+ // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api (Step #9)
+ if options.Ordered != nil {
+ params.Ordered = *options.Ordered
+ }
+
+ // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api (Step #7)
+ if options.MaxPacketLifeTime != nil {
+ params.MaxPacketLifeTime = options.MaxPacketLifeTime
+ }
+
+ // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api (Step #8)
+ if options.MaxRetransmits != nil {
+ params.MaxRetransmits = options.MaxRetransmits
+ }
+
+ // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api (Step #10)
+ if options.Protocol != nil {
+ params.Protocol = *options.Protocol
+ }
+
+ // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api (Step #11)
+ if len(params.Protocol) > 65535 {
+ return nil, &rtcerr.TypeError{Err: ErrProtocolTooLarge}
+ }
+
+ // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api (Step #12)
+ if options.Negotiated != nil {
+ params.Negotiated = *options.Negotiated
+ }
+ }
+
+ d, err := pc.api.newDataChannel(params, pc.log)
+ if err != nil {
+ return nil, err
+ }
+
+ // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api (Step #16)
+ if d.maxPacketLifeTime != nil && d.maxRetransmits != nil {
+ return nil, &rtcerr.TypeError{Err: ErrRetransmitsOrPacketLifeTime}
+ }
+
+ pc.sctpTransport.lock.Lock()
+ pc.sctpTransport.dataChannels = append(pc.sctpTransport.dataChannels, d)
+ pc.sctpTransport.dataChannelsRequested++
+ pc.sctpTransport.lock.Unlock()
+
+ // If SCTP already connected open all the channels
+ if pc.sctpTransport.State() == SCTPTransportStateConnected {
+ if err = d.open(pc.sctpTransport); err != nil {
+ return nil, err
+ }
+ }
+
+ pc.onNegotiationNeeded()
+
+ return d, nil
+}
+
+// SetIdentityProvider is used to configure an identity provider to generate identity assertions
+func (pc *PeerConnection) SetIdentityProvider(provider string) error {
+ return errPeerConnSetIdentityProviderNotImplemented
+}
+
+// WriteRTCP sends a user provided RTCP packet to the connected peer. If no peer is connected the
+// packet is discarded. It also runs any configured interceptors.
+func (pc *PeerConnection) WriteRTCP(pkts []rtcp.Packet) error {
+ _, err := pc.interceptorRTCPWriter.Write(pkts, make(interceptor.Attributes))
+ return err
+}
+
+func (pc *PeerConnection) writeRTCP(pkts []rtcp.Packet, _ interceptor.Attributes) (int, error) {
+ raw, err := rtcp.Marshal(pkts)
+ if err != nil {
+ return 0, err
+ }
+
+ srtcpSession, err := pc.dtlsTransport.getSRTCPSession()
+ if err != nil {
+ return 0, nil
+ }
+
+ writeStream, err := srtcpSession.OpenWriteStream()
+ if err != nil {
+ return 0, fmt.Errorf("%w: %v", errPeerConnWriteRTCPOpenWriteStream, err)
+ }
+
+ if n, err := writeStream.Write(raw); err != nil {
+ return n, err
+ }
+ return 0, nil
+}
+
+// Close ends the PeerConnection
+func (pc *PeerConnection) Close() error {
+ // https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #1)
+ if pc.isClosed.get() {
+ return nil
+ }
+
+ // https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #2)
+ pc.isClosed.set(true)
+
+ // https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #3)
+ pc.signalingState.Set(SignalingStateClosed)
+
+ // Try closing everything and collect the errors
+ // Shutdown strategy:
+ // 1. All Conn close by closing their underlying Conn.
+ // 2. A Mux stops this chain. It won't close the underlying
+ // Conn if one of the endpoints is closed down. To
+ // continue the chain the Mux has to be closed.
+ closeErrs := make([]error, 4)
+
+ closeErrs = append(closeErrs, pc.api.interceptor.Close())
+
+ // https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #4)
+ for _, t := range pc.GetTransceivers() {
+ if !t.stopped {
+ closeErrs = append(closeErrs, t.Stop())
+ }
+ }
+
+ // https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #5)
+ pc.sctpTransport.lock.Lock()
+ for _, d := range pc.sctpTransport.dataChannels {
+ d.setReadyState(DataChannelStateClosed)
+ }
+ pc.sctpTransport.lock.Unlock()
+
+ // https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #6)
+ if pc.sctpTransport != nil {
+ closeErrs = append(closeErrs, pc.sctpTransport.Stop())
+ }
+
+ // https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #7)
+ closeErrs = append(closeErrs, pc.dtlsTransport.Stop())
+
+ // https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #8, #9, #10)
+ if pc.iceTransport != nil {
+ closeErrs = append(closeErrs, pc.iceTransport.Stop())
+ }
+
+ // https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #11)
+ pc.updateConnectionState(pc.ICEConnectionState(), pc.dtlsTransport.State())
+
+ return util.FlattenErrs(closeErrs)
+}
+
+func (pc *PeerConnection) newRTPTransceiver(
+ receiver *RTPReceiver,
+ sender *RTPSender,
+ direction RTPTransceiverDirection,
+ kind RTPCodecType,
+) *RTPTransceiver {
+ t := &RTPTransceiver{kind: kind}
+ t.setReceiver(receiver)
+ t.setSender(sender)
+ t.setDirection(direction)
+
+ pc.mu.Lock()
+ pc.rtpTransceivers = append(pc.rtpTransceivers, t)
+ pc.mu.Unlock()
+
+ return t
+}
+
+// CurrentLocalDescription represents the local description that was
+// successfully negotiated the last time the PeerConnection transitioned
+// into the stable state plus any local candidates that have been generated
+// by the ICEAgent since the offer or answer was created.
+func (pc *PeerConnection) CurrentLocalDescription() *SessionDescription {
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+ return populateLocalCandidates(pc.currentLocalDescription, pc.iceGatherer, pc.ICEGatheringState())
+}
+
+// PendingLocalDescription represents a local description that is in the
+// process of being negotiated plus any local candidates that have been
+// generated by the ICEAgent since the offer or answer was created. If the
+// PeerConnection is in the stable state, the value is null.
+func (pc *PeerConnection) PendingLocalDescription() *SessionDescription {
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+ return populateLocalCandidates(pc.pendingLocalDescription, pc.iceGatherer, pc.ICEGatheringState())
+}
+
+// CurrentRemoteDescription represents the last remote description that was
+// successfully negotiated the last time the PeerConnection transitioned
+// into the stable state plus any remote candidates that have been supplied
+// via AddICECandidate() since the offer or answer was created.
+func (pc *PeerConnection) CurrentRemoteDescription() *SessionDescription {
+ return pc.currentRemoteDescription
+}
+
+// PendingRemoteDescription represents a remote description that is in the
+// process of being negotiated, complete with any remote candidates that
+// have been supplied via AddICECandidate() since the offer or answer was
+// created. If the PeerConnection is in the stable state, the value is
+// null.
+func (pc *PeerConnection) PendingRemoteDescription() *SessionDescription {
+ return pc.pendingRemoteDescription
+}
+
+// SignalingState attribute returns the signaling state of the
+// PeerConnection instance.
+func (pc *PeerConnection) SignalingState() SignalingState {
+ return pc.signalingState.Get()
+}
+
+// ICEGatheringState attribute returns the ICE gathering state of the
+// PeerConnection instance.
+func (pc *PeerConnection) ICEGatheringState() ICEGatheringState {
+ if pc.iceGatherer == nil {
+ return ICEGatheringStateNew
+ }
+
+ switch pc.iceGatherer.State() {
+ case ICEGathererStateNew:
+ return ICEGatheringStateNew
+ case ICEGathererStateGathering:
+ return ICEGatheringStateGathering
+ default:
+ return ICEGatheringStateComplete
+ }
+}
+
+// ConnectionState attribute returns the connection state of the
+// PeerConnection instance.
+func (pc *PeerConnection) ConnectionState() PeerConnectionState {
+ pc.mu.Lock()
+ defer pc.mu.Unlock()
+
+ return pc.connectionState
+}
+
+// GetStats return data providing statistics about the overall connection
+func (pc *PeerConnection) GetStats() StatsReport {
+ var (
+ dataChannelsAccepted uint32
+ dataChannelsClosed uint32
+ dataChannelsOpened uint32
+ dataChannelsRequested uint32
+ )
+ statsCollector := newStatsReportCollector()
+ statsCollector.Collecting()
+
+ pc.mu.Lock()
+ if pc.iceGatherer != nil {
+ pc.iceGatherer.collectStats(statsCollector)
+ }
+ if pc.iceTransport != nil {
+ pc.iceTransport.collectStats(statsCollector)
+ }
+
+ pc.sctpTransport.lock.Lock()
+ dataChannels := append([]*DataChannel{}, pc.sctpTransport.dataChannels...)
+ dataChannelsAccepted = pc.sctpTransport.dataChannelsAccepted
+ dataChannelsOpened = pc.sctpTransport.dataChannelsOpened
+ dataChannelsRequested = pc.sctpTransport.dataChannelsRequested
+ pc.sctpTransport.lock.Unlock()
+
+ for _, d := range dataChannels {
+ state := d.ReadyState()
+ if state != DataChannelStateConnecting && state != DataChannelStateOpen {
+ dataChannelsClosed++
+ }
+
+ d.collectStats(statsCollector)
+ }
+ pc.sctpTransport.collectStats(statsCollector)
+
+ stats := PeerConnectionStats{
+ Timestamp: statsTimestampNow(),
+ Type: StatsTypePeerConnection,
+ ID: pc.statsID,
+ DataChannelsAccepted: dataChannelsAccepted,
+ DataChannelsClosed: dataChannelsClosed,
+ DataChannelsOpened: dataChannelsOpened,
+ DataChannelsRequested: dataChannelsRequested,
+ }
+
+ statsCollector.Collect(stats.ID, stats)
+
+ certificates := pc.configuration.Certificates
+ for _, certificate := range certificates {
+ if err := certificate.collectStats(statsCollector); err != nil {
+ continue
+ }
+ }
+ pc.mu.Unlock()
+
+ pc.api.mediaEngine.collectStats(statsCollector)
+
+ return statsCollector.Ready()
+}
+
+// Start all transports. PeerConnection now has enough state
+func (pc *PeerConnection) startTransports(iceRole ICERole, dtlsRole DTLSRole, remoteUfrag, remotePwd, fingerprint, fingerprintHash string) {
+ // Start the ice transport
+ err := pc.iceTransport.Start(
+ pc.iceGatherer,
+ ICEParameters{
+ UsernameFragment: remoteUfrag,
+ Password: remotePwd,
+ ICELite: false,
+ },
+ &iceRole,
+ )
+ if err != nil {
+ pc.log.Warnf("Failed to start manager: %s", err)
+ return
+ }
+
+ // Start the dtls transport
+ err = pc.dtlsTransport.Start(DTLSParameters{
+ Role: dtlsRole,
+ Fingerprints: []DTLSFingerprint{{Algorithm: fingerprintHash, Value: fingerprint}},
+ })
+ pc.updateConnectionState(pc.ICEConnectionState(), pc.dtlsTransport.State())
+ if err != nil {
+ pc.log.Warnf("Failed to start manager: %s", err)
+ return
+ }
+}
+
+func (pc *PeerConnection) startRTP(isRenegotiation bool, remoteDesc *SessionDescription, currentTransceivers []*RTPTransceiver) {
+ trackDetails := trackDetailsFromSDP(pc.log, remoteDesc.parsed)
+ if isRenegotiation {
+ for _, t := range currentTransceivers {
+ if t.Receiver() == nil || t.Receiver().Track() == nil {
+ continue
+ }
+
+ t.Receiver().Track().mu.Lock()
+ ssrc := t.Receiver().Track().ssrc
+
+ if details := trackDetailsForSSRC(trackDetails, ssrc); details != nil {
+ t.Receiver().Track().id = details.id
+ t.Receiver().Track().streamID = details.streamID
+ t.Receiver().Track().mu.Unlock()
+ continue
+ }
+
+ t.Receiver().Track().mu.Unlock()
+
+ if err := t.Receiver().Stop(); err != nil {
+ pc.log.Warnf("Failed to stop RtpReceiver: %s", err)
+ continue
+ }
+
+ receiver, err := pc.api.NewRTPReceiver(t.Receiver().kind, pc.dtlsTransport)
+ if err != nil {
+ pc.log.Warnf("Failed to create new RtpReceiver: %s", err)
+ continue
+ }
+ t.setReceiver(receiver)
+ }
+ }
+
+ pc.startRTPReceivers(trackDetails, currentTransceivers)
+ if haveApplicationMediaSection(remoteDesc.parsed) {
+ pc.startSCTP()
+ }
+
+ if !isRenegotiation {
+ pc.undeclaredMediaProcessor()
+ }
+}
+
+// generateUnmatchedSDP generates an SDP that doesn't take remote state into account
+// This is used for the initial call for CreateOffer
+func (pc *PeerConnection) generateUnmatchedSDP(transceivers []*RTPTransceiver, useIdentity bool) (*sdp.SessionDescription, error) {
+ d, err := sdp.NewJSEPSessionDescription(useIdentity)
+ if err != nil {
+ return nil, err
+ }
+
+ iceParams, err := pc.iceGatherer.GetLocalParameters()
+ if err != nil {
+ return nil, err
+ }
+
+ candidates, err := pc.iceGatherer.GetLocalCandidates()
+ if err != nil {
+ return nil, err
+ }
+
+ isPlanB := pc.configuration.SDPSemantics == SDPSemanticsPlanB
+ mediaSections := []mediaSection{}
+
+ // Needed for pc.sctpTransport.dataChannelsRequested
+ pc.sctpTransport.lock.Lock()
+ defer pc.sctpTransport.lock.Unlock()
+
+ if isPlanB {
+ video := make([]*RTPTransceiver, 0)
+ audio := make([]*RTPTransceiver, 0)
+
+ for _, t := range transceivers {
+ if t.kind == RTPCodecTypeVideo {
+ video = append(video, t)
+ } else if t.kind == RTPCodecTypeAudio {
+ audio = append(audio, t)
+ }
+ if t.Sender() != nil {
+ t.Sender().setNegotiated()
+ }
+ }
+
+ if len(video) > 0 {
+ mediaSections = append(mediaSections, mediaSection{id: "video", transceivers: video})
+ }
+ if len(audio) > 0 {
+ mediaSections = append(mediaSections, mediaSection{id: "audio", transceivers: audio})
+ }
+
+ if pc.sctpTransport.dataChannelsRequested != 0 {
+ mediaSections = append(mediaSections, mediaSection{id: "data", data: true})
+ }
+ } else {
+ for _, t := range transceivers {
+ if t.Sender() != nil {
+ t.Sender().setNegotiated()
+ }
+ mediaSections = append(mediaSections, mediaSection{id: t.Mid(), transceivers: []*RTPTransceiver{t}})
+ }
+
+ if pc.sctpTransport.dataChannelsRequested != 0 {
+ mediaSections = append(mediaSections, mediaSection{id: strconv.Itoa(len(mediaSections)), data: true})
+ }
+ }
+
+ dtlsFingerprints, err := pc.configuration.Certificates[0].GetFingerprints()
+ if err != nil {
+ return nil, err
+ }
+
+ return populateSDP(d, isPlanB, dtlsFingerprints, pc.api.settingEngine.sdpMediaLevelFingerprints, pc.api.settingEngine.candidates.ICELite, pc.api.mediaEngine, connectionRoleFromDtlsRole(defaultDtlsRoleOffer), candidates, iceParams, mediaSections, pc.ICEGatheringState())
+}
+
+// generateMatchedSDP generates a SDP and takes the remote state into account
+// this is used everytime we have a RemoteDescription
+// nolint: gocyclo
+func (pc *PeerConnection) generateMatchedSDP(transceivers []*RTPTransceiver, useIdentity bool, includeUnmatched bool, connectionRole sdp.ConnectionRole) (*sdp.SessionDescription, error) { //nolint:gocognit
+ d, err := sdp.NewJSEPSessionDescription(useIdentity)
+ if err != nil {
+ return nil, err
+ }
+
+ iceParams, err := pc.iceGatherer.GetLocalParameters()
+ if err != nil {
+ return nil, err
+ }
+
+ candidates, err := pc.iceGatherer.GetLocalCandidates()
+ if err != nil {
+ return nil, err
+ }
+
+ var t *RTPTransceiver
+ localTransceivers := append([]*RTPTransceiver{}, transceivers...)
+ detectedPlanB := descriptionIsPlanB(pc.RemoteDescription())
+ mediaSections := []mediaSection{}
+ alreadyHaveApplicationMediaSection := false
+
+ for _, media := range pc.RemoteDescription().parsed.MediaDescriptions {
+ midValue := getMidValue(media)
+ if midValue == "" {
+ return nil, errPeerConnRemoteDescriptionWithoutMidValue
+ }
+
+ if media.MediaName.Media == mediaSectionApplication {
+ mediaSections = append(mediaSections, mediaSection{id: midValue, data: true})
+ alreadyHaveApplicationMediaSection = true
+ continue
+ }
+
+ kind := NewRTPCodecType(media.MediaName.Media)
+ direction := getPeerDirection(media)
+ if kind == 0 || direction == RTPTransceiverDirection(Unknown) {
+ continue
+ }
+
+ sdpSemantics := pc.configuration.SDPSemantics
+
+ switch {
+ case sdpSemantics == SDPSemanticsPlanB || sdpSemantics == SDPSemanticsUnifiedPlanWithFallback && detectedPlanB:
+ if !detectedPlanB {
+ return nil, &rtcerr.TypeError{Err: ErrIncorrectSDPSemantics}
+ }
+ // If we're responding to a plan-b offer, then we should try to fill up this
+ // media entry with all matching local transceivers
+ mediaTransceivers := []*RTPTransceiver{}
+ for {
+ // keep going until we can't get any more
+ t, localTransceivers = satisfyTypeAndDirection(kind, direction, localTransceivers)
+ if t == nil {
+ if len(mediaTransceivers) == 0 {
+ t = &RTPTransceiver{kind: kind}
+ t.setDirection(RTPTransceiverDirectionInactive)
+ mediaTransceivers = append(mediaTransceivers, t)
+ }
+ break
+ }
+ if t.Sender() != nil {
+ t.Sender().setNegotiated()
+ }
+ mediaTransceivers = append(mediaTransceivers, t)
+ }
+ mediaSections = append(mediaSections, mediaSection{id: midValue, transceivers: mediaTransceivers})
+ case sdpSemantics == SDPSemanticsUnifiedPlan || sdpSemantics == SDPSemanticsUnifiedPlanWithFallback:
+ if detectedPlanB {
+ return nil, &rtcerr.TypeError{Err: ErrIncorrectSDPSemantics}
+ }
+ t, localTransceivers = findByMid(midValue, localTransceivers)
+ if t == nil {
+ return nil, fmt.Errorf("%w: %q", errPeerConnTranscieverMidNil, midValue)
+ }
+ if t.Sender() != nil {
+ t.Sender().setNegotiated()
+ }
+ mediaTransceivers := []*RTPTransceiver{t}
+ mediaSections = append(mediaSections, mediaSection{id: midValue, transceivers: mediaTransceivers, ridMap: getRids(media)})
+ }
+ }
+
+ // If we are offering also include unmatched local transceivers
+ if includeUnmatched {
+ if !detectedPlanB {
+ for _, t := range localTransceivers {
+ if t.Sender() != nil {
+ t.Sender().setNegotiated()
+ }
+ mediaSections = append(mediaSections, mediaSection{id: t.Mid(), transceivers: []*RTPTransceiver{t}})
+ }
+ }
+
+ if pc.sctpTransport.dataChannelsRequested != 0 && !alreadyHaveApplicationMediaSection {
+ if detectedPlanB {
+ mediaSections = append(mediaSections, mediaSection{id: "data", data: true})
+ } else {
+ mediaSections = append(mediaSections, mediaSection{id: strconv.Itoa(len(mediaSections)), data: true})
+ }
+ }
+ }
+
+ if pc.configuration.SDPSemantics == SDPSemanticsUnifiedPlanWithFallback && detectedPlanB {
+ pc.log.Info("Plan-B Offer detected; responding with Plan-B Answer")
+ }
+
+ dtlsFingerprints, err := pc.configuration.Certificates[0].GetFingerprints()
+ if err != nil {
+ return nil, err
+ }
+
+ return populateSDP(d, detectedPlanB, dtlsFingerprints, pc.api.settingEngine.sdpMediaLevelFingerprints, pc.api.settingEngine.candidates.ICELite, pc.api.mediaEngine, connectionRole, candidates, iceParams, mediaSections, pc.ICEGatheringState())
+}
+
+func (pc *PeerConnection) setGatherCompleteHandler(handler func()) {
+ pc.iceGatherer.onGatheringCompleteHandler.Store(handler)
+}
+
+// SCTP returns the SCTPTransport for this PeerConnection
+//
+// The SCTP transport over which SCTP data is sent and received. If SCTP has not been negotiated, the value is nil.
+// https://www.w3.org/TR/webrtc/#attributes-15
+func (pc *PeerConnection) SCTP() *SCTPTransport {
+ return pc.sctpTransport
+}
diff --git a/vendor/github.com/pion/webrtc/v3/peerconnection_js.go b/vendor/github.com/pion/webrtc/v3/peerconnection_js.go
new file mode 100644
index 0000000..c293194
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/peerconnection_js.go
@@ -0,0 +1,676 @@
+// +build js,wasm
+
+// Package webrtc implements the WebRTC 1.0 as defined in W3C WebRTC specification document.
+package webrtc
+
+import (
+ "syscall/js"
+
+ "github.com/pion/ice/v2"
+ "github.com/pion/webrtc/v3/pkg/rtcerr"
+)
+
+// PeerConnection represents a WebRTC connection that establishes a
+// peer-to-peer communications with another PeerConnection instance in a
+// browser, or to another endpoint implementing the required protocols.
+type PeerConnection struct {
+ // Pointer to the underlying JavaScript RTCPeerConnection object.
+ underlying js.Value
+
+ // Keep track of handlers/callbacks so we can call Release as required by the
+ // syscall/js API. Initially nil.
+ onSignalingStateChangeHandler *js.Func
+ onDataChannelHandler *js.Func
+ onNegotiationNeededHandler *js.Func
+ onConnectionStateChangeHandler *js.Func
+ onICEConnectionStateChangeHandler *js.Func
+ onICECandidateHandler *js.Func
+ onICEGatheringStateChangeHandler *js.Func
+
+ // Used by GatheringCompletePromise
+ onGatherCompleteHandler func()
+
+ // A reference to the associated API state used by this connection
+ api *API
+}
+
+// NewPeerConnection creates a peerconnection.
+func NewPeerConnection(configuration Configuration) (*PeerConnection, error) {
+ api := NewAPI()
+ return api.NewPeerConnection(configuration)
+}
+
+// NewPeerConnection creates a new PeerConnection with the provided configuration against the received API object
+func (api *API) NewPeerConnection(configuration Configuration) (_ *PeerConnection, err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ err = recoveryToError(e)
+ }
+ }()
+ configMap := configurationToValue(configuration)
+ underlying := js.Global().Get("window").Get("RTCPeerConnection").New(configMap)
+ return &PeerConnection{
+ underlying: underlying,
+ api: api,
+ }, nil
+}
+
+func (pc *PeerConnection) JSValue() js.Value {
+ return pc.underlying
+}
+
+// OnSignalingStateChange sets an event handler which is invoked when the
+// peer connection's signaling state changes
+func (pc *PeerConnection) OnSignalingStateChange(f func(SignalingState)) {
+ if pc.onSignalingStateChangeHandler != nil {
+ oldHandler := pc.onSignalingStateChangeHandler
+ defer oldHandler.Release()
+ }
+ onSignalingStateChangeHandler := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ state := newSignalingState(args[0].String())
+ go f(state)
+ return js.Undefined()
+ })
+ pc.onSignalingStateChangeHandler = &onSignalingStateChangeHandler
+ pc.underlying.Set("onsignalingstatechange", onSignalingStateChangeHandler)
+}
+
+// OnDataChannel sets an event handler which is invoked when a data
+// channel message arrives from a remote peer.
+func (pc *PeerConnection) OnDataChannel(f func(*DataChannel)) {
+ if pc.onDataChannelHandler != nil {
+ oldHandler := pc.onDataChannelHandler
+ defer oldHandler.Release()
+ }
+ onDataChannelHandler := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ // pion/webrtc/projects/15
+ // This reference to the underlying DataChannel doesn't know
+ // about any other references to the same DataChannel. This might result in
+ // memory leaks where we don't clean up handler functions. Could possibly fix
+ // by keeping a mutex-protected list of all DataChannel references as a
+ // property of this PeerConnection, but at the cost of additional overhead.
+ dataChannel := &DataChannel{
+ underlying: args[0].Get("channel"),
+ api: pc.api,
+ }
+ go f(dataChannel)
+ return js.Undefined()
+ })
+ pc.onDataChannelHandler = &onDataChannelHandler
+ pc.underlying.Set("ondatachannel", onDataChannelHandler)
+}
+
+// OnNegotiationNeeded sets an event handler which is invoked when
+// a change has occurred which requires session negotiation
+func (pc *PeerConnection) OnNegotiationNeeded(f func()) {
+ if pc.onNegotiationNeededHandler != nil {
+ oldHandler := pc.onNegotiationNeededHandler
+ defer oldHandler.Release()
+ }
+ onNegotiationNeededHandler := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ go f()
+ return js.Undefined()
+ })
+ pc.onNegotiationNeededHandler = &onNegotiationNeededHandler
+ pc.underlying.Set("onnegotiationneeded", onNegotiationNeededHandler)
+}
+
+// OnICEConnectionStateChange sets an event handler which is called
+// when an ICE connection state is changed.
+func (pc *PeerConnection) OnICEConnectionStateChange(f func(ICEConnectionState)) {
+ if pc.onICEConnectionStateChangeHandler != nil {
+ oldHandler := pc.onICEConnectionStateChangeHandler
+ defer oldHandler.Release()
+ }
+ onICEConnectionStateChangeHandler := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ connectionState := NewICEConnectionState(pc.underlying.Get("iceConnectionState").String())
+ go f(connectionState)
+ return js.Undefined()
+ })
+ pc.onICEConnectionStateChangeHandler = &onICEConnectionStateChangeHandler
+ pc.underlying.Set("oniceconnectionstatechange", onICEConnectionStateChangeHandler)
+}
+
+// OnConnectionStateChange sets an event handler which is called
+// when an PeerConnectionState is changed.
+func (pc *PeerConnection) OnConnectionStateChange(f func(PeerConnectionState)) {
+ if pc.onConnectionStateChangeHandler != nil {
+ oldHandler := pc.onConnectionStateChangeHandler
+ defer oldHandler.Release()
+ }
+ onConnectionStateChangeHandler := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ connectionState := newPeerConnectionState(pc.underlying.Get("connectionState").String())
+ go f(connectionState)
+ return js.Undefined()
+ })
+ pc.onConnectionStateChangeHandler = &onConnectionStateChangeHandler
+ pc.underlying.Set("onconnectionstatechange", onConnectionStateChangeHandler)
+}
+
+func (pc *PeerConnection) checkConfiguration(configuration Configuration) error {
+ // https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-setconfiguration (step #2)
+ if pc.ConnectionState() == PeerConnectionStateClosed {
+ return &rtcerr.InvalidStateError{Err: ErrConnectionClosed}
+ }
+
+ existingConfig := pc.GetConfiguration()
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #3)
+ if configuration.PeerIdentity != "" {
+ if configuration.PeerIdentity != existingConfig.PeerIdentity {
+ return &rtcerr.InvalidModificationError{Err: ErrModifyingPeerIdentity}
+ }
+ }
+
+ // https://github.com/pion/webrtc/issues/513
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #4)
+ // if len(configuration.Certificates) > 0 {
+ // if len(configuration.Certificates) != len(existingConfiguration.Certificates) {
+ // return &rtcerr.InvalidModificationError{Err: ErrModifyingCertificates}
+ // }
+
+ // for i, certificate := range configuration.Certificates {
+ // if !pc.configuration.Certificates[i].Equals(certificate) {
+ // return &rtcerr.InvalidModificationError{Err: ErrModifyingCertificates}
+ // }
+ // }
+ // pc.configuration.Certificates = configuration.Certificates
+ // }
+
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #5)
+ if configuration.BundlePolicy != BundlePolicy(Unknown) {
+ if configuration.BundlePolicy != existingConfig.BundlePolicy {
+ return &rtcerr.InvalidModificationError{Err: ErrModifyingBundlePolicy}
+ }
+ }
+
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #6)
+ if configuration.RTCPMuxPolicy != RTCPMuxPolicy(Unknown) {
+ if configuration.RTCPMuxPolicy != existingConfig.RTCPMuxPolicy {
+ return &rtcerr.InvalidModificationError{Err: ErrModifyingRTCPMuxPolicy}
+ }
+ }
+
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #7)
+ if configuration.ICECandidatePoolSize != 0 {
+ if configuration.ICECandidatePoolSize != existingConfig.ICECandidatePoolSize &&
+ pc.LocalDescription() != nil {
+ return &rtcerr.InvalidModificationError{Err: ErrModifyingICECandidatePoolSize}
+ }
+ }
+
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #11)
+ if len(configuration.ICEServers) > 0 {
+ // https://www.w3.org/TR/webrtc/#set-the-configuration (step #11.3)
+ for _, server := range configuration.ICEServers {
+ if _, err := server.validate(); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+// SetConfiguration updates the configuration of this PeerConnection object.
+func (pc *PeerConnection) SetConfiguration(configuration Configuration) (err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ err = recoveryToError(e)
+ }
+ }()
+ if err := pc.checkConfiguration(configuration); err != nil {
+ return err
+ }
+ configMap := configurationToValue(configuration)
+ pc.underlying.Call("setConfiguration", configMap)
+ return nil
+}
+
+// GetConfiguration returns a Configuration object representing the current
+// configuration of this PeerConnection object. The returned object is a
+// copy and direct mutation on it will not take affect until SetConfiguration
+// has been called with Configuration passed as its only argument.
+// https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-getconfiguration
+func (pc *PeerConnection) GetConfiguration() Configuration {
+ return valueToConfiguration(pc.underlying.Call("getConfiguration"))
+}
+
+// CreateOffer starts the PeerConnection and generates the localDescription
+func (pc *PeerConnection) CreateOffer(options *OfferOptions) (_ SessionDescription, err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ err = recoveryToError(e)
+ }
+ }()
+ promise := pc.underlying.Call("createOffer", offerOptionsToValue(options))
+ desc, err := awaitPromise(promise)
+ if err != nil {
+ return SessionDescription{}, err
+ }
+ return *valueToSessionDescription(desc), nil
+}
+
+// CreateAnswer starts the PeerConnection and generates the localDescription
+func (pc *PeerConnection) CreateAnswer(options *AnswerOptions) (_ SessionDescription, err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ err = recoveryToError(e)
+ }
+ }()
+ promise := pc.underlying.Call("createAnswer", answerOptionsToValue(options))
+ desc, err := awaitPromise(promise)
+ if err != nil {
+ return SessionDescription{}, err
+ }
+ return *valueToSessionDescription(desc), nil
+}
+
+// SetLocalDescription sets the SessionDescription of the local peer
+func (pc *PeerConnection) SetLocalDescription(desc SessionDescription) (err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ err = recoveryToError(e)
+ }
+ }()
+ promise := pc.underlying.Call("setLocalDescription", sessionDescriptionToValue(&desc))
+ _, err = awaitPromise(promise)
+ return err
+}
+
+// LocalDescription returns PendingLocalDescription if it is not null and
+// otherwise it returns CurrentLocalDescription. This property is used to
+// determine if setLocalDescription has already been called.
+// https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-localdescription
+func (pc *PeerConnection) LocalDescription() *SessionDescription {
+ return valueToSessionDescription(pc.underlying.Get("localDescription"))
+}
+
+// SetRemoteDescription sets the SessionDescription of the remote peer
+func (pc *PeerConnection) SetRemoteDescription(desc SessionDescription) (err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ err = recoveryToError(e)
+ }
+ }()
+ promise := pc.underlying.Call("setRemoteDescription", sessionDescriptionToValue(&desc))
+ _, err = awaitPromise(promise)
+ return err
+}
+
+// RemoteDescription returns PendingRemoteDescription if it is not null and
+// otherwise it returns CurrentRemoteDescription. This property is used to
+// determine if setRemoteDescription has already been called.
+// https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-remotedescription
+func (pc *PeerConnection) RemoteDescription() *SessionDescription {
+ return valueToSessionDescription(pc.underlying.Get("remoteDescription"))
+}
+
+// AddICECandidate accepts an ICE candidate string and adds it
+// to the existing set of candidates
+func (pc *PeerConnection) AddICECandidate(candidate ICECandidateInit) (err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ err = recoveryToError(e)
+ }
+ }()
+ promise := pc.underlying.Call("addIceCandidate", iceCandidateInitToValue(candidate))
+ _, err = awaitPromise(promise)
+ return err
+}
+
+// ICEConnectionState returns the ICE connection state of the
+// PeerConnection instance.
+func (pc *PeerConnection) ICEConnectionState() ICEConnectionState {
+ return NewICEConnectionState(pc.underlying.Get("iceConnectionState").String())
+}
+
+// OnICECandidate sets an event handler which is invoked when a new ICE
+// candidate is found.
+func (pc *PeerConnection) OnICECandidate(f func(candidate *ICECandidate)) {
+ if pc.onICECandidateHandler != nil {
+ oldHandler := pc.onICECandidateHandler
+ defer oldHandler.Release()
+ }
+ onICECandidateHandler := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ candidate := valueToICECandidate(args[0].Get("candidate"))
+ if candidate == nil && pc.onGatherCompleteHandler != nil {
+ go pc.onGatherCompleteHandler()
+ }
+
+ go f(candidate)
+ return js.Undefined()
+ })
+ pc.onICECandidateHandler = &onICECandidateHandler
+ pc.underlying.Set("onicecandidate", onICECandidateHandler)
+}
+
+// OnICEGatheringStateChange sets an event handler which is invoked when the
+// ICE candidate gathering state has changed.
+func (pc *PeerConnection) OnICEGatheringStateChange(f func()) {
+ if pc.onICEGatheringStateChangeHandler != nil {
+ oldHandler := pc.onICEGatheringStateChangeHandler
+ defer oldHandler.Release()
+ }
+ onICEGatheringStateChangeHandler := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
+ go f()
+ return js.Undefined()
+ })
+ pc.onICEGatheringStateChangeHandler = &onICEGatheringStateChangeHandler
+ pc.underlying.Set("onicegatheringstatechange", onICEGatheringStateChangeHandler)
+}
+
+// CreateDataChannel creates a new DataChannel object with the given label
+// and optional DataChannelInit used to configure properties of the
+// underlying channel such as data reliability.
+func (pc *PeerConnection) CreateDataChannel(label string, options *DataChannelInit) (_ *DataChannel, err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ err = recoveryToError(e)
+ }
+ }()
+ channel := pc.underlying.Call("createDataChannel", label, dataChannelInitToValue(options))
+ return &DataChannel{
+ underlying: channel,
+ api: pc.api,
+ }, nil
+}
+
+// SetIdentityProvider is used to configure an identity provider to generate identity assertions
+func (pc *PeerConnection) SetIdentityProvider(provider string) (err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ err = recoveryToError(e)
+ }
+ }()
+ pc.underlying.Call("setIdentityProvider", provider)
+ return nil
+}
+
+// Close ends the PeerConnection
+func (pc *PeerConnection) Close() (err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ err = recoveryToError(e)
+ }
+ }()
+
+ pc.underlying.Call("close")
+
+ // Release any handlers as required by the syscall/js API.
+ if pc.onSignalingStateChangeHandler != nil {
+ pc.onSignalingStateChangeHandler.Release()
+ }
+ if pc.onDataChannelHandler != nil {
+ pc.onDataChannelHandler.Release()
+ }
+ if pc.onNegotiationNeededHandler != nil {
+ pc.onNegotiationNeededHandler.Release()
+ }
+ if pc.onConnectionStateChangeHandler != nil {
+ pc.onConnectionStateChangeHandler.Release()
+ }
+ if pc.onICEConnectionStateChangeHandler != nil {
+ pc.onICEConnectionStateChangeHandler.Release()
+ }
+ if pc.onICECandidateHandler != nil {
+ pc.onICECandidateHandler.Release()
+ }
+ if pc.onICEGatheringStateChangeHandler != nil {
+ pc.onICEGatheringStateChangeHandler.Release()
+ }
+
+ return nil
+}
+
+// CurrentLocalDescription represents the local description that was
+// successfully negotiated the last time the PeerConnection transitioned
+// into the stable state plus any local candidates that have been generated
+// by the ICEAgent since the offer or answer was created.
+func (pc *PeerConnection) CurrentLocalDescription() *SessionDescription {
+ desc := pc.underlying.Get("currentLocalDescription")
+ return valueToSessionDescription(desc)
+}
+
+// PendingLocalDescription represents a local description that is in the
+// process of being negotiated plus any local candidates that have been
+// generated by the ICEAgent since the offer or answer was created. If the
+// PeerConnection is in the stable state, the value is null.
+func (pc *PeerConnection) PendingLocalDescription() *SessionDescription {
+ desc := pc.underlying.Get("pendingLocalDescription")
+ return valueToSessionDescription(desc)
+}
+
+// CurrentRemoteDescription represents the last remote description that was
+// successfully negotiated the last time the PeerConnection transitioned
+// into the stable state plus any remote candidates that have been supplied
+// via AddICECandidate() since the offer or answer was created.
+func (pc *PeerConnection) CurrentRemoteDescription() *SessionDescription {
+ desc := pc.underlying.Get("currentRemoteDescription")
+ return valueToSessionDescription(desc)
+}
+
+// PendingRemoteDescription represents a remote description that is in the
+// process of being negotiated, complete with any remote candidates that
+// have been supplied via AddICECandidate() since the offer or answer was
+// created. If the PeerConnection is in the stable state, the value is
+// null.
+func (pc *PeerConnection) PendingRemoteDescription() *SessionDescription {
+ desc := pc.underlying.Get("pendingRemoteDescription")
+ return valueToSessionDescription(desc)
+}
+
+// SignalingState returns the signaling state of the PeerConnection instance.
+func (pc *PeerConnection) SignalingState() SignalingState {
+ rawState := pc.underlying.Get("signalingState").String()
+ return newSignalingState(rawState)
+}
+
+// ICEGatheringState attribute the ICE gathering state of the PeerConnection
+// instance.
+func (pc *PeerConnection) ICEGatheringState() ICEGatheringState {
+ rawState := pc.underlying.Get("iceGatheringState").String()
+ return NewICEGatheringState(rawState)
+}
+
+// ConnectionState attribute the connection state of the PeerConnection
+// instance.
+func (pc *PeerConnection) ConnectionState() PeerConnectionState {
+ rawState := pc.underlying.Get("connectionState").String()
+ return newPeerConnectionState(rawState)
+}
+
+func (pc *PeerConnection) setGatherCompleteHandler(handler func()) {
+ pc.onGatherCompleteHandler = handler
+
+ // If no onIceCandidate handler has been set provide an empty one
+ // otherwise our onGatherCompleteHandler will not be executed
+ if pc.onICECandidateHandler == nil {
+ pc.OnICECandidate(func(i *ICECandidate) {})
+ }
+}
+
+// Converts a Configuration to js.Value so it can be passed
+// through to the JavaScript WebRTC API. Any zero values are converted to
+// js.Undefined(), which will result in the default value being used.
+func configurationToValue(configuration Configuration) js.Value {
+ return js.ValueOf(map[string]interface{}{
+ "iceServers": iceServersToValue(configuration.ICEServers),
+ "iceTransportPolicy": stringEnumToValueOrUndefined(configuration.ICETransportPolicy.String()),
+ "bundlePolicy": stringEnumToValueOrUndefined(configuration.BundlePolicy.String()),
+ "rtcpMuxPolicy": stringEnumToValueOrUndefined(configuration.RTCPMuxPolicy.String()),
+ "peerIdentity": stringToValueOrUndefined(configuration.PeerIdentity),
+ "iceCandidatePoolSize": uint8ToValueOrUndefined(configuration.ICECandidatePoolSize),
+
+ // Note: Certificates are not currently supported.
+ // "certificates": configuration.Certificates,
+ })
+}
+
+func iceServersToValue(iceServers []ICEServer) js.Value {
+ if len(iceServers) == 0 {
+ return js.Undefined()
+ }
+ maps := make([]interface{}, len(iceServers))
+ for i, server := range iceServers {
+ maps[i] = iceServerToValue(server)
+ }
+ return js.ValueOf(maps)
+}
+
+func iceServerToValue(server ICEServer) js.Value {
+ return js.ValueOf(map[string]interface{}{
+ "urls": stringsToValue(server.URLs), // required
+ "username": stringToValueOrUndefined(server.Username),
+ // Note: credential and credentialType are not currently supported.
+ // "credential": interfaceToValueOrUndefined(server.Credential),
+ // "credentialType": stringEnumToValueOrUndefined(server.CredentialType.String()),
+ })
+}
+
+func valueToConfiguration(configValue js.Value) Configuration {
+ if jsValueIsNull(configValue) || jsValueIsUndefined(configValue) {
+ return Configuration{}
+ }
+ return Configuration{
+ ICEServers: valueToICEServers(configValue.Get("iceServers")),
+ ICETransportPolicy: NewICETransportPolicy(valueToStringOrZero(configValue.Get("iceTransportPolicy"))),
+ BundlePolicy: newBundlePolicy(valueToStringOrZero(configValue.Get("bundlePolicy"))),
+ RTCPMuxPolicy: newRTCPMuxPolicy(valueToStringOrZero(configValue.Get("rtcpMuxPolicy"))),
+ PeerIdentity: valueToStringOrZero(configValue.Get("peerIdentity")),
+ ICECandidatePoolSize: valueToUint8OrZero(configValue.Get("iceCandidatePoolSize")),
+
+ // Note: Certificates are not supported.
+ // Certificates []Certificate
+ }
+}
+
+func valueToICEServers(iceServersValue js.Value) []ICEServer {
+ if jsValueIsNull(iceServersValue) || jsValueIsUndefined(iceServersValue) {
+ return nil
+ }
+ iceServers := make([]ICEServer, iceServersValue.Length())
+ for i := 0; i < iceServersValue.Length(); i++ {
+ iceServers[i] = valueToICEServer(iceServersValue.Index(i))
+ }
+ return iceServers
+}
+
+func valueToICEServer(iceServerValue js.Value) ICEServer {
+ return ICEServer{
+ URLs: valueToStrings(iceServerValue.Get("urls")), // required
+ Username: valueToStringOrZero(iceServerValue.Get("username")),
+ // Note: Credential and CredentialType are not currently supported.
+ // Credential: iceServerValue.Get("credential"),
+ // CredentialType: newICECredentialType(valueToStringOrZero(iceServerValue.Get("credentialType"))),
+ }
+}
+
+func valueToICECandidate(val js.Value) *ICECandidate {
+ if jsValueIsNull(val) || jsValueIsUndefined(val) {
+ return nil
+ }
+ if jsValueIsUndefined(val.Get("protocol")) && !jsValueIsUndefined(val.Get("candidate")) {
+ // Missing some fields, assume it's Firefox and parse SDP candidate.
+ c, err := ice.UnmarshalCandidate(val.Get("candidate").String())
+ if err != nil {
+ return nil
+ }
+
+ iceCandidate, err := newICECandidateFromICE(c)
+ if err != nil {
+ return nil
+ }
+
+ return &iceCandidate
+ }
+ protocol, _ := NewICEProtocol(val.Get("protocol").String())
+ candidateType, _ := NewICECandidateType(val.Get("type").String())
+ return &ICECandidate{
+ Foundation: val.Get("foundation").String(),
+ Priority: valueToUint32OrZero(val.Get("priority")),
+ Address: val.Get("address").String(),
+ Protocol: protocol,
+ Port: valueToUint16OrZero(val.Get("port")),
+ Typ: candidateType,
+ Component: stringToComponentIDOrZero(val.Get("component").String()),
+ RelatedAddress: val.Get("relatedAddress").String(),
+ RelatedPort: valueToUint16OrZero(val.Get("relatedPort")),
+ }
+}
+
+func stringToComponentIDOrZero(val string) uint16 {
+ // See: https://developer.mozilla.org/en-US/docs/Web/API/RTCIceComponent
+ switch val {
+ case "rtp":
+ return 1
+ case "rtcp":
+ return 2
+ }
+ return 0
+}
+
+func sessionDescriptionToValue(desc *SessionDescription) js.Value {
+ if desc == nil {
+ return js.Undefined()
+ }
+ return js.ValueOf(map[string]interface{}{
+ "type": desc.Type.String(),
+ "sdp": desc.SDP,
+ })
+}
+
+func valueToSessionDescription(descValue js.Value) *SessionDescription {
+ if jsValueIsNull(descValue) || jsValueIsUndefined(descValue) {
+ return nil
+ }
+ return &SessionDescription{
+ Type: NewSDPType(descValue.Get("type").String()),
+ SDP: descValue.Get("sdp").String(),
+ }
+}
+
+func offerOptionsToValue(offerOptions *OfferOptions) js.Value {
+ if offerOptions == nil {
+ return js.Undefined()
+ }
+ return js.ValueOf(map[string]interface{}{
+ "iceRestart": offerOptions.ICERestart,
+ "voiceActivityDetection": offerOptions.VoiceActivityDetection,
+ })
+}
+
+func answerOptionsToValue(answerOptions *AnswerOptions) js.Value {
+ if answerOptions == nil {
+ return js.Undefined()
+ }
+ return js.ValueOf(map[string]interface{}{
+ "voiceActivityDetection": answerOptions.VoiceActivityDetection,
+ })
+}
+
+func iceCandidateInitToValue(candidate ICECandidateInit) js.Value {
+ return js.ValueOf(map[string]interface{}{
+ "candidate": candidate.Candidate,
+ "sdpMid": stringPointerToValue(candidate.SDPMid),
+ "sdpMLineIndex": uint16PointerToValue(candidate.SDPMLineIndex),
+ "usernameFragment": stringPointerToValue(candidate.UsernameFragment),
+ })
+}
+
+func dataChannelInitToValue(options *DataChannelInit) js.Value {
+ if options == nil {
+ return js.Undefined()
+ }
+
+ maxPacketLifeTime := uint16PointerToValue(options.MaxPacketLifeTime)
+ return js.ValueOf(map[string]interface{}{
+ "ordered": boolPointerToValue(options.Ordered),
+ "maxPacketLifeTime": maxPacketLifeTime,
+ // See https://bugs.chromium.org/p/chromium/issues/detail?id=696681
+ // Chrome calls this "maxRetransmitTime"
+ "maxRetransmitTime": maxPacketLifeTime,
+ "maxRetransmits": uint16PointerToValue(options.MaxRetransmits),
+ "protocol": stringPointerToValue(options.Protocol),
+ "negotiated": boolPointerToValue(options.Negotiated),
+ "id": uint16PointerToValue(options.ID),
+ })
+}
diff --git a/vendor/github.com/pion/webrtc/v3/peerconnectionstate.go b/vendor/github.com/pion/webrtc/v3/peerconnectionstate.go
new file mode 100644
index 0000000..66ac20e
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/peerconnectionstate.go
@@ -0,0 +1,94 @@
+package webrtc
+
+// PeerConnectionState indicates the state of the PeerConnection.
+type PeerConnectionState int
+
+const (
+ // PeerConnectionStateNew indicates that any of the ICETransports or
+ // DTLSTransports are in the "new" state and none of the transports are
+ // in the "connecting", "checking", "failed" or "disconnected" state, or
+ // all transports are in the "closed" state, or there are no transports.
+ PeerConnectionStateNew PeerConnectionState = iota + 1
+
+ // PeerConnectionStateConnecting indicates that any of the
+ // ICETransports or DTLSTransports are in the "connecting" or
+ // "checking" state and none of them is in the "failed" state.
+ PeerConnectionStateConnecting
+
+ // PeerConnectionStateConnected indicates that all ICETransports and
+ // DTLSTransports are in the "connected", "completed" or "closed" state
+ // and at least one of them is in the "connected" or "completed" state.
+ PeerConnectionStateConnected
+
+ // PeerConnectionStateDisconnected indicates that any of the
+ // ICETransports or DTLSTransports are in the "disconnected" state
+ // and none of them are in the "failed" or "connecting" or "checking" state.
+ PeerConnectionStateDisconnected
+
+ // PeerConnectionStateFailed indicates that any of the ICETransports
+ // or DTLSTransports are in a "failed" state.
+ PeerConnectionStateFailed
+
+ // PeerConnectionStateClosed indicates the peer connection is closed
+ // and the isClosed member variable of PeerConnection is true.
+ PeerConnectionStateClosed
+)
+
+// This is done this way because of a linter.
+const (
+ peerConnectionStateNewStr = "new"
+ peerConnectionStateConnectingStr = "connecting"
+ peerConnectionStateConnectedStr = "connected"
+ peerConnectionStateDisconnectedStr = "disconnected"
+ peerConnectionStateFailedStr = "failed"
+ peerConnectionStateClosedStr = "closed"
+)
+
+func newPeerConnectionState(raw string) PeerConnectionState {
+ switch raw {
+ case peerConnectionStateNewStr:
+ return PeerConnectionStateNew
+ case peerConnectionStateConnectingStr:
+ return PeerConnectionStateConnecting
+ case peerConnectionStateConnectedStr:
+ return PeerConnectionStateConnected
+ case peerConnectionStateDisconnectedStr:
+ return PeerConnectionStateDisconnected
+ case peerConnectionStateFailedStr:
+ return PeerConnectionStateFailed
+ case peerConnectionStateClosedStr:
+ return PeerConnectionStateClosed
+ default:
+ return PeerConnectionState(Unknown)
+ }
+}
+
+func (t PeerConnectionState) String() string {
+ switch t {
+ case PeerConnectionStateNew:
+ return peerConnectionStateNewStr
+ case PeerConnectionStateConnecting:
+ return peerConnectionStateConnectingStr
+ case PeerConnectionStateConnected:
+ return peerConnectionStateConnectedStr
+ case PeerConnectionStateDisconnected:
+ return peerConnectionStateDisconnectedStr
+ case PeerConnectionStateFailed:
+ return peerConnectionStateFailedStr
+ case PeerConnectionStateClosed:
+ return peerConnectionStateClosedStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+type negotiationNeededState int
+
+const (
+ // NegotiationNeededStateEmpty not running and queue is empty
+ negotiationNeededStateEmpty = iota
+ // NegotiationNeededStateEmpty running and queue is empty
+ negotiationNeededStateRun
+ // NegotiationNeededStateEmpty running and queue
+ negotiationNeededStateQueue
+)
diff --git a/vendor/github.com/pion/webrtc/v3/pkg/media/media.go b/vendor/github.com/pion/webrtc/v3/pkg/media/media.go
new file mode 100644
index 0000000..bcd7e33
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/pkg/media/media.go
@@ -0,0 +1,25 @@
+// Package media provides media writer and filters
+package media
+
+import (
+ "time"
+
+ "github.com/pion/rtp"
+)
+
+// A Sample contains encoded media and timing information
+type Sample struct {
+ Data []byte
+ Timestamp time.Time
+ Duration time.Duration
+}
+
+// Writer defines an interface to handle
+// the creation of media files
+type Writer interface {
+ // Add the content of an RTP packet to the media
+ WriteRTP(packet *rtp.Packet) error
+ // Close the media
+ // Note: Close implementation must be idempotent
+ Close() error
+}
diff --git a/vendor/github.com/pion/webrtc/v3/pkg/rtcerr/errors.go b/vendor/github.com/pion/webrtc/v3/pkg/rtcerr/errors.go
new file mode 100644
index 0000000..aa94b7b
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/pkg/rtcerr/errors.go
@@ -0,0 +1,160 @@
+// Package rtcerr implements the error wrappers defined throughout the
+// WebRTC 1.0 specifications.
+package rtcerr
+
+import (
+ "fmt"
+)
+
+// UnknownError indicates the operation failed for an unknown transient reason.
+type UnknownError struct {
+ Err error
+}
+
+func (e *UnknownError) Error() string {
+ return fmt.Sprintf("UnknownError: %v", e.Err)
+}
+
+// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
+// an Unwrap method returning error. Otherwise, Unwrap returns nil.
+func (e *UnknownError) Unwrap() error {
+ return e.Err
+}
+
+// InvalidStateError indicates the object is in an invalid state.
+type InvalidStateError struct {
+ Err error
+}
+
+func (e *InvalidStateError) Error() string {
+ return fmt.Sprintf("InvalidStateError: %v", e.Err)
+}
+
+// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
+// an Unwrap method returning error. Otherwise, Unwrap returns nil.
+func (e *InvalidStateError) Unwrap() error {
+ return e.Err
+}
+
+// InvalidAccessError indicates the object does not support the operation or
+// argument.
+type InvalidAccessError struct {
+ Err error
+}
+
+func (e *InvalidAccessError) Error() string {
+ return fmt.Sprintf("InvalidAccessError: %v", e.Err)
+}
+
+// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
+// an Unwrap method returning error. Otherwise, Unwrap returns nil.
+func (e *InvalidAccessError) Unwrap() error {
+ return e.Err
+}
+
+// NotSupportedError indicates the operation is not supported.
+type NotSupportedError struct {
+ Err error
+}
+
+func (e *NotSupportedError) Error() string {
+ return fmt.Sprintf("NotSupportedError: %v", e.Err)
+}
+
+// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
+// an Unwrap method returning error. Otherwise, Unwrap returns nil.
+func (e *NotSupportedError) Unwrap() error {
+ return e.Err
+}
+
+// InvalidModificationError indicates the object cannot be modified in this way.
+type InvalidModificationError struct {
+ Err error
+}
+
+func (e *InvalidModificationError) Error() string {
+ return fmt.Sprintf("InvalidModificationError: %v", e.Err)
+}
+
+// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
+// an Unwrap method returning error. Otherwise, Unwrap returns nil.
+func (e *InvalidModificationError) Unwrap() error {
+ return e.Err
+}
+
+// SyntaxError indicates the string did not match the expected pattern.
+type SyntaxError struct {
+ Err error
+}
+
+func (e *SyntaxError) Error() string {
+ return fmt.Sprintf("SyntaxError: %v", e.Err)
+}
+
+// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
+// an Unwrap method returning error. Otherwise, Unwrap returns nil.
+func (e *SyntaxError) Unwrap() error {
+ return e.Err
+}
+
+// TypeError indicates an error when a value is not of the expected type.
+type TypeError struct {
+ Err error
+}
+
+func (e *TypeError) Error() string {
+ return fmt.Sprintf("TypeError: %v", e.Err)
+}
+
+// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
+// an Unwrap method returning error. Otherwise, Unwrap returns nil.
+func (e *TypeError) Unwrap() error {
+ return e.Err
+}
+
+// OperationError indicates the operation failed for an operation-specific
+// reason.
+type OperationError struct {
+ Err error
+}
+
+func (e *OperationError) Error() string {
+ return fmt.Sprintf("OperationError: %v", e.Err)
+}
+
+// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
+// an Unwrap method returning error. Otherwise, Unwrap returns nil.
+func (e *OperationError) Unwrap() error {
+ return e.Err
+}
+
+// NotReadableError indicates the input/output read operation failed.
+type NotReadableError struct {
+ Err error
+}
+
+func (e *NotReadableError) Error() string {
+ return fmt.Sprintf("NotReadableError: %v", e.Err)
+}
+
+// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
+// an Unwrap method returning error. Otherwise, Unwrap returns nil.
+func (e *NotReadableError) Unwrap() error {
+ return e.Err
+}
+
+// RangeError indicates an error when a value is not in the set or range
+// of allowed values.
+type RangeError struct {
+ Err error
+}
+
+func (e *RangeError) Error() string {
+ return fmt.Sprintf("RangeError: %v", e.Err)
+}
+
+// Unwrap returns the result of calling the Unwrap method on err, if err's type contains
+// an Unwrap method returning error. Otherwise, Unwrap returns nil.
+func (e *RangeError) Unwrap() error {
+ return e.Err
+}
diff --git a/vendor/github.com/pion/webrtc/v3/renovate.json b/vendor/github.com/pion/webrtc/v3/renovate.json
new file mode 100644
index 0000000..4400fd9
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/renovate.json
@@ -0,0 +1,15 @@
+{
+ "extends": [
+ "config:base"
+ ],
+ "postUpdateOptions": [
+ "gomodTidy"
+ ],
+ "commitBody": "Generated by renovateBot",
+ "packageRules": [
+ {
+ "packagePatterns": ["^golang.org/x/"],
+ "schedule": ["on the first day of the month"]
+ }
+ ]
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtcpfeedback.go b/vendor/github.com/pion/webrtc/v3/rtcpfeedback.go
new file mode 100644
index 0000000..b377738
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtcpfeedback.go
@@ -0,0 +1,31 @@
+package webrtc
+
+const (
+ // TypeRTCPFBTransportCC ..
+ TypeRTCPFBTransportCC = "transport-cc"
+
+ // TypeRTCPFBGoogREMB ..
+ TypeRTCPFBGoogREMB = "goog-remb"
+
+ // TypeRTCPFBACK ..
+ TypeRTCPFBACK = "ack"
+
+ // TypeRTCPFBCCM ..
+ TypeRTCPFBCCM = "ccm"
+
+ // TypeRTCPFBNACK ..
+ TypeRTCPFBNACK = "nack"
+)
+
+// RTCPFeedback signals the connection to use additional RTCP packet types.
+// https://draft.ortc.org/#dom-rtcrtcpfeedback
+type RTCPFeedback struct {
+ // Type is the type of feedback.
+ // see: https://draft.ortc.org/#dom-rtcrtcpfeedback
+ // valid: ack, ccm, nack, goog-remb, transport-cc
+ Type string
+
+ // The parameter value depends on the type.
+ // For example, type="nack" parameter="pli" will send Picture Loss Indicator packets.
+ Parameter string
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtcpmuxpolicy.go b/vendor/github.com/pion/webrtc/v3/rtcpmuxpolicy.go
new file mode 100644
index 0000000..f74e440
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtcpmuxpolicy.go
@@ -0,0 +1,66 @@
+package webrtc
+
+import (
+ "encoding/json"
+)
+
+// RTCPMuxPolicy affects what ICE candidates are gathered to support
+// non-multiplexed RTCP.
+type RTCPMuxPolicy int
+
+const (
+ // RTCPMuxPolicyNegotiate indicates to gather ICE candidates for both
+ // RTP and RTCP candidates. If the remote-endpoint is capable of
+ // multiplexing RTCP, multiplex RTCP on the RTP candidates. If it is not,
+ // use both the RTP and RTCP candidates separately.
+ RTCPMuxPolicyNegotiate RTCPMuxPolicy = iota + 1
+
+ // RTCPMuxPolicyRequire indicates to gather ICE candidates only for
+ // RTP and multiplex RTCP on the RTP candidates. If the remote endpoint is
+ // not capable of rtcp-mux, session negotiation will fail.
+ RTCPMuxPolicyRequire
+)
+
+// This is done this way because of a linter.
+const (
+ rtcpMuxPolicyNegotiateStr = "negotiate"
+ rtcpMuxPolicyRequireStr = "require"
+)
+
+func newRTCPMuxPolicy(raw string) RTCPMuxPolicy {
+ switch raw {
+ case rtcpMuxPolicyNegotiateStr:
+ return RTCPMuxPolicyNegotiate
+ case rtcpMuxPolicyRequireStr:
+ return RTCPMuxPolicyRequire
+ default:
+ return RTCPMuxPolicy(Unknown)
+ }
+}
+
+func (t RTCPMuxPolicy) String() string {
+ switch t {
+ case RTCPMuxPolicyNegotiate:
+ return rtcpMuxPolicyNegotiateStr
+ case RTCPMuxPolicyRequire:
+ return rtcpMuxPolicyRequireStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// UnmarshalJSON parses the JSON-encoded data and stores the result
+func (t *RTCPMuxPolicy) UnmarshalJSON(b []byte) error {
+ var val string
+ if err := json.Unmarshal(b, &val); err != nil {
+ return err
+ }
+
+ *t = newRTCPMuxPolicy(val)
+ return nil
+}
+
+// MarshalJSON returns the JSON encoding
+func (t RTCPMuxPolicy) MarshalJSON() ([]byte, error) {
+ return json.Marshal(t.String())
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtpcapabilities.go b/vendor/github.com/pion/webrtc/v3/rtpcapabilities.go
new file mode 100644
index 0000000..dc42230
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtpcapabilities.go
@@ -0,0 +1,9 @@
+package webrtc
+
+// RTPCapabilities represents the capabilities of a transceiver
+//
+// https://w3c.github.io/webrtc-pc/#rtcrtpcapabilities
+type RTPCapabilities struct {
+ Codecs []RTPCodecCapability
+ HeaderExtensions []RTPHeaderExtensionCapability
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtpcodec.go b/vendor/github.com/pion/webrtc/v3/rtpcodec.go
new file mode 100644
index 0000000..f05b98b
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtpcodec.go
@@ -0,0 +1,118 @@
+package webrtc
+
+import (
+ "strings"
+)
+
+// RTPCodecType determines the type of a codec
+type RTPCodecType int
+
+const (
+
+ // RTPCodecTypeAudio indicates this is an audio codec
+ RTPCodecTypeAudio RTPCodecType = iota + 1
+
+ // RTPCodecTypeVideo indicates this is a video codec
+ RTPCodecTypeVideo
+)
+
+func (t RTPCodecType) String() string {
+ switch t {
+ case RTPCodecTypeAudio:
+ return "audio"
+ case RTPCodecTypeVideo:
+ return "video" //nolint: goconst
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// NewRTPCodecType creates a RTPCodecType from a string
+func NewRTPCodecType(r string) RTPCodecType {
+ switch {
+ case strings.EqualFold(r, RTPCodecTypeAudio.String()):
+ return RTPCodecTypeAudio
+ case strings.EqualFold(r, RTPCodecTypeVideo.String()):
+ return RTPCodecTypeVideo
+ default:
+ return RTPCodecType(0)
+ }
+}
+
+// RTPCodecCapability provides information about codec capabilities.
+//
+// https://w3c.github.io/webrtc-pc/#dictionary-rtcrtpcodeccapability-members
+type RTPCodecCapability struct {
+ MimeType string
+ ClockRate uint32
+ Channels uint16
+ SDPFmtpLine string
+ RTCPFeedback []RTCPFeedback
+}
+
+// RTPHeaderExtensionCapability is used to define a RFC5285 RTP header extension supported by the codec.
+//
+// https://w3c.github.io/webrtc-pc/#dom-rtcrtpcapabilities-headerextensions
+type RTPHeaderExtensionCapability struct {
+ URI string
+}
+
+// RTPHeaderExtensionParameter represents a negotiated RFC5285 RTP header extension.
+//
+// https://w3c.github.io/webrtc-pc/#dictionary-rtcrtpheaderextensionparameters-members
+type RTPHeaderExtensionParameter struct {
+ URI string
+ ID int
+}
+
+// RTPCodecParameters is a sequence containing the media codecs that an RtpSender
+// will choose from, as well as entries for RTX, RED and FEC mechanisms. This also
+// includes the PayloadType that has been negotiated
+//
+// https://w3c.github.io/webrtc-pc/#rtcrtpcodecparameters
+type RTPCodecParameters struct {
+ RTPCodecCapability
+ PayloadType PayloadType
+
+ statsID string
+}
+
+// RTPParameters is a list of negotiated codecs and header extensions
+//
+// https://w3c.github.io/webrtc-pc/#dictionary-rtcrtpparameters-members
+type RTPParameters struct {
+ HeaderExtensions []RTPHeaderExtensionParameter
+ Codecs []RTPCodecParameters
+}
+
+type codecMatchType int
+
+const (
+ codecMatchNone codecMatchType = 0
+ codecMatchPartial codecMatchType = 1
+ codecMatchExact codecMatchType = 2
+)
+
+// Do a fuzzy find for a codec in the list of codecs
+// Used for lookup up a codec in an existing list to find a match
+// Returns codecMatchExact, codecMatchPartial, or codecMatchNone
+func codecParametersFuzzySearch(needle RTPCodecParameters, haystack []RTPCodecParameters) (RTPCodecParameters, codecMatchType) {
+ // First attempt to match on MimeType + SDPFmtpLine
+ // Exact matches means fmtp line cannot be empty
+ for _, c := range haystack {
+ if strings.EqualFold(c.RTPCodecCapability.MimeType, needle.RTPCodecCapability.MimeType) &&
+ c.RTPCodecCapability.SDPFmtpLine == needle.RTPCodecCapability.SDPFmtpLine {
+ return c, codecMatchExact
+ }
+ }
+
+ // Fallback to just MimeType if either haystack or needle does not have fmtpline set
+ for _, c := range haystack {
+ if strings.EqualFold(c.RTPCodecCapability.MimeType, needle.RTPCodecCapability.MimeType) &&
+ (c.RTPCodecCapability.SDPFmtpLine == "" || needle.RTPCodecCapability.SDPFmtpLine == "") {
+ return c, codecMatchPartial
+ }
+ }
+
+ return RTPCodecParameters{}, codecMatchNone
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtpcodingparameters.go b/vendor/github.com/pion/webrtc/v3/rtpcodingparameters.go
new file mode 100644
index 0000000..8a08c33
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtpcodingparameters.go
@@ -0,0 +1,10 @@
+package webrtc
+
+// RTPCodingParameters provides information relating to both encoding and decoding.
+// This is a subset of the RFC since Pion WebRTC doesn't implement encoding/decoding itself
+// http://draft.ortc.org/#dom-rtcrtpcodingparameters
+type RTPCodingParameters struct {
+ RID string `json:"rid"`
+ SSRC SSRC `json:"ssrc"`
+ PayloadType PayloadType `json:"payloadType"`
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtpdecodingparameters.go b/vendor/github.com/pion/webrtc/v3/rtpdecodingparameters.go
new file mode 100644
index 0000000..77aa1fc
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtpdecodingparameters.go
@@ -0,0 +1,8 @@
+package webrtc
+
+// RTPDecodingParameters provides information relating to both encoding and decoding.
+// This is a subset of the RFC since Pion WebRTC doesn't implement decoding itself
+// http://draft.ortc.org/#dom-rtcrtpdecodingparameters
+type RTPDecodingParameters struct {
+ RTPCodingParameters
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtpencodingparameters.go b/vendor/github.com/pion/webrtc/v3/rtpencodingparameters.go
new file mode 100644
index 0000000..09481a5
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtpencodingparameters.go
@@ -0,0 +1,8 @@
+package webrtc
+
+// RTPEncodingParameters provides information relating to both encoding and decoding.
+// This is a subset of the RFC since Pion WebRTC doesn't implement encoding itself
+// http://draft.ortc.org/#dom-rtcrtpencodingparameters
+type RTPEncodingParameters struct {
+ RTPCodingParameters
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtpreceiveparameters.go b/vendor/github.com/pion/webrtc/v3/rtpreceiveparameters.go
new file mode 100644
index 0000000..badf6b7
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtpreceiveparameters.go
@@ -0,0 +1,6 @@
+package webrtc
+
+// RTPReceiveParameters contains the RTP stack settings used by receivers
+type RTPReceiveParameters struct {
+ Encodings []RTPDecodingParameters
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtpreceiver.go b/vendor/github.com/pion/webrtc/v3/rtpreceiver.go
new file mode 100644
index 0000000..8d558e0
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtpreceiver.go
@@ -0,0 +1,361 @@
+// +build !js
+
+package webrtc
+
+import (
+ "fmt"
+ "io"
+ "sync"
+ "time"
+
+ "github.com/pion/interceptor"
+ "github.com/pion/rtcp"
+ "github.com/pion/srtp/v2"
+ "github.com/pion/webrtc/v3/internal/util"
+)
+
+// trackStreams maintains a mapping of RTP/RTCP streams to a specific track
+// a RTPReceiver may contain multiple streams if we are dealing with Multicast
+type trackStreams struct {
+ track *TrackRemote
+
+ rtpReadStream *srtp.ReadStreamSRTP
+ rtpInterceptor interceptor.RTPReader
+
+ rtcpReadStream *srtp.ReadStreamSRTCP
+ rtcpInterceptor interceptor.RTCPReader
+}
+
+// RTPReceiver allows an application to inspect the receipt of a TrackRemote
+type RTPReceiver struct {
+ kind RTPCodecType
+ transport *DTLSTransport
+
+ tracks []trackStreams
+
+ closed, received chan interface{}
+ mu sync.RWMutex
+
+ // A reference to the associated api object
+ api *API
+}
+
+// NewRTPReceiver constructs a new RTPReceiver
+func (api *API) NewRTPReceiver(kind RTPCodecType, transport *DTLSTransport) (*RTPReceiver, error) {
+ if transport == nil {
+ return nil, errRTPReceiverDTLSTransportNil
+ }
+
+ r := &RTPReceiver{
+ kind: kind,
+ transport: transport,
+ api: api,
+ closed: make(chan interface{}),
+ received: make(chan interface{}),
+ tracks: []trackStreams{},
+ }
+
+ return r, nil
+}
+
+// Transport returns the currently-configured *DTLSTransport or nil
+// if one has not yet been configured
+func (r *RTPReceiver) Transport() *DTLSTransport {
+ r.mu.RLock()
+ defer r.mu.RUnlock()
+ return r.transport
+}
+
+// GetParameters describes the current configuration for the encoding and
+// transmission of media on the receiver's track.
+func (r *RTPReceiver) GetParameters() RTPParameters {
+ return r.api.mediaEngine.getRTPParametersByKind(r.kind, []RTPTransceiverDirection{RTPTransceiverDirectionRecvonly})
+}
+
+// Track returns the RtpTransceiver TrackRemote
+func (r *RTPReceiver) Track() *TrackRemote {
+ r.mu.RLock()
+ defer r.mu.RUnlock()
+
+ if len(r.tracks) != 1 {
+ return nil
+ }
+ return r.tracks[0].track
+}
+
+// Tracks returns the RtpTransceiver tracks
+// A RTPReceiver to support Simulcast may now have multiple tracks
+func (r *RTPReceiver) Tracks() []*TrackRemote {
+ r.mu.RLock()
+ defer r.mu.RUnlock()
+
+ var tracks []*TrackRemote
+ for i := range r.tracks {
+ tracks = append(tracks, r.tracks[i].track)
+ }
+ return tracks
+}
+
+// Receive initialize the track and starts all the transports
+func (r *RTPReceiver) Receive(parameters RTPReceiveParameters) error {
+ r.mu.Lock()
+ defer r.mu.Unlock()
+ select {
+ case <-r.received:
+ return errRTPReceiverReceiveAlreadyCalled
+ default:
+ }
+ defer close(r.received)
+
+ if len(parameters.Encodings) == 1 && parameters.Encodings[0].SSRC != 0 {
+ t := trackStreams{
+ track: newTrackRemote(
+ r.kind,
+ parameters.Encodings[0].SSRC,
+ "",
+ r,
+ ),
+ }
+
+ globalParams := r.GetParameters()
+ codec := RTPCodecCapability{}
+ if len(globalParams.Codecs) != 0 {
+ codec = globalParams.Codecs[0].RTPCodecCapability
+ }
+
+ streamInfo := createStreamInfo("", parameters.Encodings[0].SSRC, 0, codec, globalParams.HeaderExtensions)
+ var err error
+ if t.rtpReadStream, t.rtpInterceptor, t.rtcpReadStream, t.rtcpInterceptor, err = r.streamsForSSRC(parameters.Encodings[0].SSRC, streamInfo); err != nil {
+ return err
+ }
+
+ r.tracks = append(r.tracks, t)
+ } else {
+ for _, encoding := range parameters.Encodings {
+ r.tracks = append(r.tracks, trackStreams{
+ track: newTrackRemote(
+ r.kind,
+ 0,
+ encoding.RID,
+ r,
+ ),
+ })
+ }
+ }
+
+ return nil
+}
+
+// Read reads incoming RTCP for this RTPReceiver
+func (r *RTPReceiver) Read(b []byte) (n int, a interceptor.Attributes, err error) {
+ select {
+ case <-r.received:
+ return r.tracks[0].rtcpInterceptor.Read(b, a)
+ case <-r.closed:
+ return 0, nil, io.ErrClosedPipe
+ }
+}
+
+// ReadSimulcast reads incoming RTCP for this RTPReceiver for given rid
+func (r *RTPReceiver) ReadSimulcast(b []byte, rid string) (n int, a interceptor.Attributes, err error) {
+ select {
+ case <-r.received:
+ for _, t := range r.tracks {
+ if t.track != nil && t.track.rid == rid {
+ return t.rtcpInterceptor.Read(b, a)
+ }
+ }
+ return 0, nil, fmt.Errorf("%w: %s", errRTPReceiverForRIDTrackStreamNotFound, rid)
+ case <-r.closed:
+ return 0, nil, io.ErrClosedPipe
+ }
+}
+
+// ReadRTCP is a convenience method that wraps Read and unmarshal for you.
+// It also runs any configured interceptors.
+func (r *RTPReceiver) ReadRTCP() ([]rtcp.Packet, interceptor.Attributes, error) {
+ b := make([]byte, receiveMTU)
+ i, attributes, err := r.Read(b)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ pkts, err := rtcp.Unmarshal(b[:i])
+ if err != nil {
+ return nil, nil, err
+ }
+
+ return pkts, attributes, nil
+}
+
+// ReadSimulcastRTCP is a convenience method that wraps ReadSimulcast and unmarshal for you
+func (r *RTPReceiver) ReadSimulcastRTCP(rid string) ([]rtcp.Packet, interceptor.Attributes, error) {
+ b := make([]byte, receiveMTU)
+ i, attributes, err := r.ReadSimulcast(b, rid)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ pkts, err := rtcp.Unmarshal(b[:i])
+ return pkts, attributes, err
+}
+
+func (r *RTPReceiver) haveReceived() bool {
+ select {
+ case <-r.received:
+ return true
+ default:
+ return false
+ }
+}
+
+// Stop irreversibly stops the RTPReceiver
+func (r *RTPReceiver) Stop() error {
+ r.mu.Lock()
+ defer r.mu.Unlock()
+ var err error
+
+ select {
+ case <-r.closed:
+ return err
+ default:
+ }
+
+ select {
+ case <-r.received:
+ for i := range r.tracks {
+ errs := []error{}
+
+ if r.tracks[i].rtcpReadStream != nil {
+ errs = append(errs, r.tracks[i].rtcpReadStream.Close())
+ }
+
+ if r.tracks[i].rtpReadStream != nil {
+ errs = append(errs, r.tracks[i].rtpReadStream.Close())
+ }
+
+ err = util.FlattenErrs(errs)
+ }
+ default:
+ }
+
+ close(r.closed)
+ return err
+}
+
+func (r *RTPReceiver) streamsForTrack(t *TrackRemote) *trackStreams {
+ for i := range r.tracks {
+ if r.tracks[i].track == t {
+ return &r.tracks[i]
+ }
+ }
+ return nil
+}
+
+// readRTP should only be called by a track, this only exists so we can keep state in one place
+func (r *RTPReceiver) readRTP(b []byte, reader *TrackRemote) (n int, a interceptor.Attributes, err error) {
+ <-r.received
+ if t := r.streamsForTrack(reader); t != nil {
+ return t.rtpInterceptor.Read(b, a)
+ }
+
+ return 0, nil, fmt.Errorf("%w: %d", errRTPReceiverWithSSRCTrackStreamNotFound, reader.SSRC())
+}
+
+// receiveForRid is the sibling of Receive expect for RIDs instead of SSRCs
+// It populates all the internal state for the given RID
+func (r *RTPReceiver) receiveForRid(rid string, params RTPParameters, ssrc SSRC) (*TrackRemote, error) {
+ r.mu.Lock()
+ defer r.mu.Unlock()
+
+ for i := range r.tracks {
+ if r.tracks[i].track.RID() == rid {
+ r.tracks[i].track.mu.Lock()
+ r.tracks[i].track.kind = r.kind
+ r.tracks[i].track.codec = params.Codecs[0]
+ r.tracks[i].track.params = params
+ r.tracks[i].track.ssrc = ssrc
+ streamInfo := createStreamInfo("", ssrc, params.Codecs[0].PayloadType, params.Codecs[0].RTPCodecCapability, params.HeaderExtensions)
+ r.tracks[i].track.mu.Unlock()
+
+ var err error
+ if r.tracks[i].rtpReadStream, r.tracks[i].rtpInterceptor, r.tracks[i].rtcpReadStream, r.tracks[i].rtcpInterceptor, err = r.streamsForSSRC(ssrc, streamInfo); err != nil {
+ return nil, err
+ }
+
+ return r.tracks[i].track, nil
+ }
+ }
+
+ return nil, fmt.Errorf("%w: %d", errRTPReceiverForSSRCTrackStreamNotFound, ssrc)
+}
+
+func (r *RTPReceiver) streamsForSSRC(ssrc SSRC, streamInfo interceptor.StreamInfo) (*srtp.ReadStreamSRTP, interceptor.RTPReader, *srtp.ReadStreamSRTCP, interceptor.RTCPReader, error) {
+ srtpSession, err := r.transport.getSRTPSession()
+ if err != nil {
+ return nil, nil, nil, nil, err
+ }
+
+ rtpReadStream, err := srtpSession.OpenReadStream(uint32(ssrc))
+ if err != nil {
+ return nil, nil, nil, nil, err
+ }
+
+ rtpInterceptor := r.api.interceptor.BindRemoteStream(&streamInfo, interceptor.RTPReaderFunc(func(in []byte, a interceptor.Attributes) (n int, attributes interceptor.Attributes, err error) {
+ n, err = rtpReadStream.Read(in)
+ return n, a, err
+ }))
+
+ srtcpSession, err := r.transport.getSRTCPSession()
+ if err != nil {
+ return nil, nil, nil, nil, err
+ }
+
+ rtcpReadStream, err := srtcpSession.OpenReadStream(uint32(ssrc))
+ if err != nil {
+ return nil, nil, nil, nil, err
+ }
+
+ rtcpInterceptor := r.api.interceptor.BindRTCPReader(interceptor.RTPReaderFunc(func(in []byte, a interceptor.Attributes) (n int, attributes interceptor.Attributes, err error) {
+ n, err = rtcpReadStream.Read(in)
+ return n, a, err
+ }))
+
+ return rtpReadStream, rtpInterceptor, rtcpReadStream, rtcpInterceptor, nil
+}
+
+// SetReadDeadline sets the max amount of time the RTCP stream will block before returning. 0 is forever.
+func (r *RTPReceiver) SetReadDeadline(t time.Time) error {
+ r.mu.RLock()
+ defer r.mu.RUnlock()
+
+ if err := r.tracks[0].rtcpReadStream.SetReadDeadline(t); err != nil {
+ return err
+ }
+ return nil
+}
+
+// SetReadDeadlineSimulcast sets the max amount of time the RTCP stream for a given rid will block before returning. 0 is forever.
+func (r *RTPReceiver) SetReadDeadlineSimulcast(deadline time.Time, rid string) error {
+ r.mu.RLock()
+ defer r.mu.RUnlock()
+
+ for _, t := range r.tracks {
+ if t.track != nil && t.track.rid == rid {
+ return t.rtcpReadStream.SetReadDeadline(deadline)
+ }
+ }
+ return fmt.Errorf("%w: %s", errRTPReceiverForRIDTrackStreamNotFound, rid)
+}
+
+// setRTPReadDeadline sets the max amount of time the RTP stream will block before returning. 0 is forever.
+// This should be fired by calling SetReadDeadline on the TrackRemote
+func (r *RTPReceiver) setRTPReadDeadline(deadline time.Time, reader *TrackRemote) error {
+ r.mu.RLock()
+ defer r.mu.RUnlock()
+
+ if t := r.streamsForTrack(reader); t != nil {
+ return t.rtpReadStream.SetReadDeadline(deadline)
+ }
+ return fmt.Errorf("%w: %d", errRTPReceiverWithSSRCTrackStreamNotFound, reader.SSRC())
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtpsender.go b/vendor/github.com/pion/webrtc/v3/rtpsender.go
new file mode 100644
index 0000000..f3d34c7
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtpsender.go
@@ -0,0 +1,261 @@
+// +build !js
+
+package webrtc
+
+import (
+ "io"
+ "sync"
+ "time"
+
+ "github.com/pion/interceptor"
+ "github.com/pion/randutil"
+ "github.com/pion/rtcp"
+ "github.com/pion/rtp"
+)
+
+// RTPSender allows an application to control how a given Track is encoded and transmitted to a remote peer
+type RTPSender struct {
+ track TrackLocal
+
+ srtpStream *srtpWriterFuture
+ rtcpInterceptor interceptor.RTCPReader
+
+ context TrackLocalContext
+
+ transport *DTLSTransport
+
+ payloadType PayloadType
+ ssrc SSRC
+
+ // nolint:godox
+ // TODO(sgotti) remove this when in future we'll avoid replacing
+ // a transceiver sender since we can just check the
+ // transceiver negotiation status
+ negotiated bool
+
+ // A reference to the associated api object
+ api *API
+ id string
+
+ mu sync.RWMutex
+ sendCalled, stopCalled chan struct{}
+}
+
+// NewRTPSender constructs a new RTPSender
+func (api *API) NewRTPSender(track TrackLocal, transport *DTLSTransport) (*RTPSender, error) {
+ if track == nil {
+ return nil, errRTPSenderTrackNil
+ } else if transport == nil {
+ return nil, errRTPSenderDTLSTransportNil
+ }
+
+ id, err := randutil.GenerateCryptoRandomString(32, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
+ if err != nil {
+ return nil, err
+ }
+
+ r := &RTPSender{
+ track: track,
+ transport: transport,
+ api: api,
+ sendCalled: make(chan struct{}),
+ stopCalled: make(chan struct{}),
+ ssrc: SSRC(randutil.NewMathRandomGenerator().Uint32()),
+ id: id,
+ srtpStream: &srtpWriterFuture{},
+ }
+
+ r.srtpStream.rtpSender = r
+
+ r.rtcpInterceptor = r.api.interceptor.BindRTCPReader(interceptor.RTPReaderFunc(func(in []byte, a interceptor.Attributes) (n int, attributes interceptor.Attributes, err error) {
+ n, err = r.srtpStream.Read(in)
+ return n, a, err
+ }))
+
+ return r, nil
+}
+
+func (r *RTPSender) isNegotiated() bool {
+ r.mu.RLock()
+ defer r.mu.RUnlock()
+ return r.negotiated
+}
+
+func (r *RTPSender) setNegotiated() {
+ r.mu.Lock()
+ defer r.mu.Unlock()
+ r.negotiated = true
+}
+
+// Transport returns the currently-configured *DTLSTransport or nil
+// if one has not yet been configured
+func (r *RTPSender) Transport() *DTLSTransport {
+ r.mu.RLock()
+ defer r.mu.RUnlock()
+ return r.transport
+}
+
+// GetParameters describes the current configuration for the encoding and
+// transmission of media on the sender's track.
+func (r *RTPSender) GetParameters() RTPSendParameters {
+ return RTPSendParameters{
+ RTPParameters: r.api.mediaEngine.getRTPParametersByKind(
+ r.track.Kind(),
+ []RTPTransceiverDirection{RTPTransceiverDirectionSendonly},
+ ),
+ Encodings: []RTPEncodingParameters{
+ {
+ RTPCodingParameters: RTPCodingParameters{
+ SSRC: r.ssrc,
+ PayloadType: r.payloadType,
+ },
+ },
+ },
+ }
+}
+
+// Track returns the RTCRtpTransceiver track, or nil
+func (r *RTPSender) Track() TrackLocal {
+ r.mu.RLock()
+ defer r.mu.RUnlock()
+ return r.track
+}
+
+// ReplaceTrack replaces the track currently being used as the sender's source with a new TrackLocal.
+// The new track must be of the same media kind (audio, video, etc) and switching the track should not
+// require negotiation.
+func (r *RTPSender) ReplaceTrack(track TrackLocal) error {
+ r.mu.Lock()
+ defer r.mu.Unlock()
+
+ if r.hasSent() && r.track != nil {
+ if err := r.track.Unbind(r.context); err != nil {
+ return err
+ }
+ }
+
+ if !r.hasSent() || track == nil {
+ r.track = track
+ return nil
+ }
+
+ if _, err := track.Bind(r.context); err != nil {
+ // Re-bind the original track
+ if _, reBindErr := r.track.Bind(r.context); reBindErr != nil {
+ return reBindErr
+ }
+
+ return err
+ }
+
+ r.track = track
+ return nil
+}
+
+// Send Attempts to set the parameters controlling the sending of media.
+func (r *RTPSender) Send(parameters RTPSendParameters) error {
+ r.mu.Lock()
+ defer r.mu.Unlock()
+
+ if r.hasSent() {
+ return errRTPSenderSendAlreadyCalled
+ }
+
+ writeStream := &interceptorToTrackLocalWriter{}
+ r.context = TrackLocalContext{
+ id: r.id,
+ params: r.api.mediaEngine.getRTPParametersByKind(r.track.Kind(), []RTPTransceiverDirection{RTPTransceiverDirectionSendonly}),
+ ssrc: parameters.Encodings[0].SSRC,
+ writeStream: writeStream,
+ }
+
+ codec, err := r.track.Bind(r.context)
+ if err != nil {
+ return err
+ }
+ r.context.params.Codecs = []RTPCodecParameters{codec}
+
+ streamInfo := createStreamInfo(r.id, parameters.Encodings[0].SSRC, codec.PayloadType, codec.RTPCodecCapability, parameters.HeaderExtensions)
+ rtpInterceptor := r.api.interceptor.BindLocalStream(&streamInfo, interceptor.RTPWriterFunc(func(header *rtp.Header, payload []byte, attributes interceptor.Attributes) (int, error) {
+ return r.srtpStream.WriteRTP(header, payload)
+ }))
+ writeStream.interceptor.Store(rtpInterceptor)
+
+ close(r.sendCalled)
+ return nil
+}
+
+// Stop irreversibly stops the RTPSender
+func (r *RTPSender) Stop() error {
+ r.mu.Lock()
+
+ if stopped := r.hasStopped(); stopped {
+ r.mu.Unlock()
+ return nil
+ }
+
+ close(r.stopCalled)
+ r.mu.Unlock()
+
+ if !r.hasSent() {
+ return nil
+ }
+
+ if err := r.ReplaceTrack(nil); err != nil {
+ return err
+ }
+
+ return r.srtpStream.Close()
+}
+
+// Read reads incoming RTCP for this RTPReceiver
+func (r *RTPSender) Read(b []byte) (n int, a interceptor.Attributes, err error) {
+ select {
+ case <-r.sendCalled:
+ return r.rtcpInterceptor.Read(b, a)
+ case <-r.stopCalled:
+ return 0, nil, io.ErrClosedPipe
+ }
+}
+
+// ReadRTCP is a convenience method that wraps Read and unmarshals for you.
+func (r *RTPSender) ReadRTCP() ([]rtcp.Packet, interceptor.Attributes, error) {
+ b := make([]byte, receiveMTU)
+ i, attributes, err := r.Read(b)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ pkts, err := rtcp.Unmarshal(b[:i])
+ if err != nil {
+ return nil, nil, err
+ }
+
+ return pkts, attributes, nil
+}
+
+// SetReadDeadline sets the deadline for the Read operation.
+// Setting to zero means no deadline.
+func (r *RTPSender) SetReadDeadline(t time.Time) error {
+ return r.srtpStream.SetReadDeadline(t)
+}
+
+// hasSent tells if data has been ever sent for this instance
+func (r *RTPSender) hasSent() bool {
+ select {
+ case <-r.sendCalled:
+ return true
+ default:
+ return false
+ }
+}
+
+// hasStopped tells if stop has been called
+func (r *RTPSender) hasStopped() bool {
+ select {
+ case <-r.stopCalled:
+ return true
+ default:
+ return false
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtpsendparameters.go b/vendor/github.com/pion/webrtc/v3/rtpsendparameters.go
new file mode 100644
index 0000000..cc55e5d
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtpsendparameters.go
@@ -0,0 +1,7 @@
+package webrtc
+
+// RTPSendParameters contains the RTP stack settings used by receivers
+type RTPSendParameters struct {
+ RTPParameters
+ Encodings []RTPEncodingParameters
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtptransceiver.go b/vendor/github.com/pion/webrtc/v3/rtptransceiver.go
new file mode 100644
index 0000000..ee9de2f
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtptransceiver.go
@@ -0,0 +1,187 @@
+// +build !js
+
+package webrtc
+
+import (
+ "fmt"
+ "sync/atomic"
+
+ "github.com/pion/rtp"
+)
+
+// RTPTransceiver represents a combination of an RTPSender and an RTPReceiver that share a common mid.
+type RTPTransceiver struct {
+ mid atomic.Value // string
+ sender atomic.Value // *RTPSender
+ receiver atomic.Value // *RTPReceiver
+ direction atomic.Value // RTPTransceiverDirection
+
+ stopped bool
+ kind RTPCodecType
+}
+
+// Sender returns the RTPTransceiver's RTPSender if it has one
+func (t *RTPTransceiver) Sender() *RTPSender {
+ if v := t.sender.Load(); v != nil {
+ return v.(*RTPSender)
+ }
+
+ return nil
+}
+
+// SetSender sets the RTPSender and Track to current transceiver
+func (t *RTPTransceiver) SetSender(s *RTPSender, track TrackLocal) error {
+ t.setSender(s)
+ return t.setSendingTrack(track)
+}
+
+func (t *RTPTransceiver) setSender(s *RTPSender) {
+ t.sender.Store(s)
+}
+
+// Receiver returns the RTPTransceiver's RTPReceiver if it has one
+func (t *RTPTransceiver) Receiver() *RTPReceiver {
+ if v := t.receiver.Load(); v != nil {
+ return v.(*RTPReceiver)
+ }
+
+ return nil
+}
+
+// setMid sets the RTPTransceiver's mid. If it was already set, will return an error.
+func (t *RTPTransceiver) setMid(mid string) error {
+ if currentMid := t.Mid(); currentMid != "" {
+ return fmt.Errorf("%w: %s to %s", errRTPTransceiverCannotChangeMid, currentMid, mid)
+ }
+ t.mid.Store(mid)
+ return nil
+}
+
+// Mid gets the Transceiver's mid value. When not already set, this value will be set in CreateOffer or CreateAnswer.
+func (t *RTPTransceiver) Mid() string {
+ if v := t.mid.Load(); v != nil {
+ return v.(string)
+ }
+ return ""
+}
+
+// Kind returns RTPTransceiver's kind.
+func (t *RTPTransceiver) Kind() RTPCodecType {
+ return t.kind
+}
+
+// Direction returns the RTPTransceiver's current direction
+func (t *RTPTransceiver) Direction() RTPTransceiverDirection {
+ return t.direction.Load().(RTPTransceiverDirection)
+}
+
+// Stop irreversibly stops the RTPTransceiver
+func (t *RTPTransceiver) Stop() error {
+ if t.Sender() != nil {
+ if err := t.Sender().Stop(); err != nil {
+ return err
+ }
+ }
+ if t.Receiver() != nil {
+ if err := t.Receiver().Stop(); err != nil {
+ return err
+ }
+ }
+
+ t.setDirection(RTPTransceiverDirectionInactive)
+ return nil
+}
+
+func (t *RTPTransceiver) setReceiver(r *RTPReceiver) {
+ t.receiver.Store(r)
+}
+
+func (t *RTPTransceiver) setDirection(d RTPTransceiverDirection) {
+ t.direction.Store(d)
+}
+
+func (t *RTPTransceiver) setSendingTrack(track TrackLocal) error {
+ if err := t.Sender().ReplaceTrack(track); err != nil {
+ return err
+ }
+ if track == nil {
+ t.setSender(nil)
+ }
+
+ switch {
+ case track != nil && t.Direction() == RTPTransceiverDirectionRecvonly:
+ t.setDirection(RTPTransceiverDirectionSendrecv)
+ case track != nil && t.Direction() == RTPTransceiverDirectionInactive:
+ t.setDirection(RTPTransceiverDirectionSendonly)
+ case track == nil && t.Direction() == RTPTransceiverDirectionSendrecv:
+ t.setDirection(RTPTransceiverDirectionRecvonly)
+ case track == nil && t.Direction() == RTPTransceiverDirectionSendonly:
+ t.setDirection(RTPTransceiverDirectionInactive)
+ default:
+ return errRTPTransceiverSetSendingInvalidState
+ }
+ return nil
+}
+
+func findByMid(mid string, localTransceivers []*RTPTransceiver) (*RTPTransceiver, []*RTPTransceiver) {
+ for i, t := range localTransceivers {
+ if t.Mid() == mid {
+ return t, append(localTransceivers[:i], localTransceivers[i+1:]...)
+ }
+ }
+
+ return nil, localTransceivers
+}
+
+// Given a direction+type pluck a transceiver from the passed list
+// if no entry satisfies the requested type+direction return a inactive Transceiver
+func satisfyTypeAndDirection(remoteKind RTPCodecType, remoteDirection RTPTransceiverDirection, localTransceivers []*RTPTransceiver) (*RTPTransceiver, []*RTPTransceiver) {
+ // Get direction order from most preferred to least
+ getPreferredDirections := func() []RTPTransceiverDirection {
+ switch remoteDirection {
+ case RTPTransceiverDirectionSendrecv:
+ return []RTPTransceiverDirection{RTPTransceiverDirectionRecvonly, RTPTransceiverDirectionSendrecv}
+ case RTPTransceiverDirectionSendonly:
+ return []RTPTransceiverDirection{RTPTransceiverDirectionRecvonly}
+ case RTPTransceiverDirectionRecvonly:
+ return []RTPTransceiverDirection{RTPTransceiverDirectionSendonly, RTPTransceiverDirectionSendrecv}
+ default:
+ return []RTPTransceiverDirection{}
+ }
+ }
+
+ for _, possibleDirection := range getPreferredDirections() {
+ for i := range localTransceivers {
+ t := localTransceivers[i]
+ if t.Mid() == "" && t.kind == remoteKind && possibleDirection == t.Direction() {
+ return t, append(localTransceivers[:i], localTransceivers[i+1:]...)
+ }
+ }
+ }
+
+ return nil, localTransceivers
+}
+
+// handleUnknownRTPPacket consumes a single RTP Packet and returns information that is helpful
+// for demuxing and handling an unknown SSRC (usually for Simulcast)
+func handleUnknownRTPPacket(buf []byte, midExtensionID, streamIDExtensionID uint8) (mid, rid string, payloadType PayloadType, err error) {
+ rp := &rtp.Packet{}
+ if err = rp.Unmarshal(buf); err != nil {
+ return
+ }
+
+ if !rp.Header.Extension {
+ return
+ }
+
+ payloadType = PayloadType(rp.PayloadType)
+ if payload := rp.GetExtension(midExtensionID); payload != nil {
+ mid = string(payload)
+ }
+
+ if payload := rp.GetExtension(streamIDExtensionID); payload != nil {
+ rid = string(payload)
+ }
+
+ return
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtptransceiverdirection.go b/vendor/github.com/pion/webrtc/v3/rtptransceiverdirection.go
new file mode 100644
index 0000000..3073014
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtptransceiverdirection.go
@@ -0,0 +1,85 @@
+package webrtc
+
+// RTPTransceiverDirection indicates the direction of the RTPTransceiver.
+type RTPTransceiverDirection int
+
+const (
+ // RTPTransceiverDirectionSendrecv indicates the RTPSender will offer
+ // to send RTP and RTPReceiver the will offer to receive RTP.
+ RTPTransceiverDirectionSendrecv RTPTransceiverDirection = iota + 1
+
+ // RTPTransceiverDirectionSendonly indicates the RTPSender will offer
+ // to send RTP.
+ RTPTransceiverDirectionSendonly
+
+ // RTPTransceiverDirectionRecvonly indicates the RTPReceiver the will
+ // offer to receive RTP.
+ RTPTransceiverDirectionRecvonly
+
+ // RTPTransceiverDirectionInactive indicates the RTPSender won't offer
+ // to send RTP and RTPReceiver the won't offer to receive RTP.
+ RTPTransceiverDirectionInactive
+)
+
+// This is done this way because of a linter.
+const (
+ rtpTransceiverDirectionSendrecvStr = "sendrecv"
+ rtpTransceiverDirectionSendonlyStr = "sendonly"
+ rtpTransceiverDirectionRecvonlyStr = "recvonly"
+ rtpTransceiverDirectionInactiveStr = "inactive"
+)
+
+// NewRTPTransceiverDirection defines a procedure for creating a new
+// RTPTransceiverDirection from a raw string naming the transceiver direction.
+func NewRTPTransceiverDirection(raw string) RTPTransceiverDirection {
+ switch raw {
+ case rtpTransceiverDirectionSendrecvStr:
+ return RTPTransceiverDirectionSendrecv
+ case rtpTransceiverDirectionSendonlyStr:
+ return RTPTransceiverDirectionSendonly
+ case rtpTransceiverDirectionRecvonlyStr:
+ return RTPTransceiverDirectionRecvonly
+ case rtpTransceiverDirectionInactiveStr:
+ return RTPTransceiverDirectionInactive
+ default:
+ return RTPTransceiverDirection(Unknown)
+ }
+}
+
+func (t RTPTransceiverDirection) String() string {
+ switch t {
+ case RTPTransceiverDirectionSendrecv:
+ return rtpTransceiverDirectionSendrecvStr
+ case RTPTransceiverDirectionSendonly:
+ return rtpTransceiverDirectionSendonlyStr
+ case RTPTransceiverDirectionRecvonly:
+ return rtpTransceiverDirectionRecvonlyStr
+ case RTPTransceiverDirectionInactive:
+ return rtpTransceiverDirectionInactiveStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// Revers indicate the opposite direction
+func (t RTPTransceiverDirection) Revers() RTPTransceiverDirection {
+ switch t {
+ case RTPTransceiverDirectionSendonly:
+ return RTPTransceiverDirectionRecvonly
+ case RTPTransceiverDirectionRecvonly:
+ return RTPTransceiverDirectionSendonly
+ default:
+ return t
+ }
+}
+
+func haveRTPTransceiverDirectionIntersection(haystack []RTPTransceiverDirection, needle []RTPTransceiverDirection) bool {
+ for _, n := range needle {
+ for _, h := range haystack {
+ if n == h {
+ return true
+ }
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/pion/webrtc/v3/rtptransceiverinit.go b/vendor/github.com/pion/webrtc/v3/rtptransceiverinit.go
new file mode 100644
index 0000000..3c439b7
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/rtptransceiverinit.go
@@ -0,0 +1,12 @@
+package webrtc
+
+// RTPTransceiverInit dictionary is used when calling the WebRTC function addTransceiver() to provide configuration options for the new transceiver.
+type RTPTransceiverInit struct {
+ Direction RTPTransceiverDirection
+ SendEncodings []RTPEncodingParameters
+ // Streams []*Track
+}
+
+// RtpTransceiverInit is a temporary mapping while we fix case sensitivity
+// Deprecated: Use RTPTransceiverInit instead
+type RtpTransceiverInit = RTPTransceiverInit //nolint: stylecheck,golint
diff --git a/vendor/github.com/pion/webrtc/v3/sctpcapabilities.go b/vendor/github.com/pion/webrtc/v3/sctpcapabilities.go
new file mode 100644
index 0000000..34399d3
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/sctpcapabilities.go
@@ -0,0 +1,6 @@
+package webrtc
+
+// SCTPCapabilities indicates the capabilities of the SCTPTransport.
+type SCTPCapabilities struct {
+ MaxMessageSize uint32 `json:"maxMessageSize"`
+}
diff --git a/vendor/github.com/pion/webrtc/v3/sctptransport.go b/vendor/github.com/pion/webrtc/v3/sctptransport.go
new file mode 100644
index 0000000..d7b3764
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/sctptransport.go
@@ -0,0 +1,379 @@
+// +build !js
+
+package webrtc
+
+import (
+ "io"
+ "math"
+ "sync"
+ "time"
+
+ "github.com/pion/datachannel"
+ "github.com/pion/logging"
+ "github.com/pion/sctp"
+ "github.com/pion/webrtc/v3/pkg/rtcerr"
+)
+
+const sctpMaxChannels = uint16(65535)
+
+// SCTPTransport provides details about the SCTP transport.
+type SCTPTransport struct {
+ lock sync.RWMutex
+
+ dtlsTransport *DTLSTransport
+
+ // State represents the current state of the SCTP transport.
+ state SCTPTransportState
+
+ // SCTPTransportState doesn't have an enum to distinguish between New/Connecting
+ // so we need a dedicated field
+ isStarted bool
+
+ // MaxMessageSize represents the maximum size of data that can be passed to
+ // DataChannel's send() method.
+ maxMessageSize float64
+
+ // MaxChannels represents the maximum amount of DataChannel's that can
+ // be used simultaneously.
+ maxChannels *uint16
+
+ // OnStateChange func()
+
+ onErrorHandler func(error)
+
+ association *sctp.Association
+ onDataChannelHandler func(*DataChannel)
+ onDataChannelOpenedHandler func(*DataChannel)
+
+ // DataChannels
+ dataChannels []*DataChannel
+ dataChannelsOpened uint32
+ dataChannelsRequested uint32
+ dataChannelsAccepted uint32
+
+ api *API
+ log logging.LeveledLogger
+}
+
+// NewSCTPTransport creates a new SCTPTransport.
+// This constructor is part of the ORTC API. It is not
+// meant to be used together with the basic WebRTC API.
+func (api *API) NewSCTPTransport(dtls *DTLSTransport) *SCTPTransport {
+ res := &SCTPTransport{
+ dtlsTransport: dtls,
+ state: SCTPTransportStateConnecting,
+ api: api,
+ log: api.settingEngine.LoggerFactory.NewLogger("ortc"),
+ }
+
+ res.updateMessageSize()
+ res.updateMaxChannels()
+
+ return res
+}
+
+// Transport returns the DTLSTransport instance the SCTPTransport is sending over.
+func (r *SCTPTransport) Transport() *DTLSTransport {
+ r.lock.RLock()
+ defer r.lock.RUnlock()
+
+ return r.dtlsTransport
+}
+
+// GetCapabilities returns the SCTPCapabilities of the SCTPTransport.
+func (r *SCTPTransport) GetCapabilities() SCTPCapabilities {
+ return SCTPCapabilities{
+ MaxMessageSize: 0,
+ }
+}
+
+// Start the SCTPTransport. Since both local and remote parties must mutually
+// create an SCTPTransport, SCTP SO (Simultaneous Open) is used to establish
+// a connection over SCTP.
+func (r *SCTPTransport) Start(remoteCaps SCTPCapabilities) error {
+ if r.isStarted {
+ return nil
+ }
+ r.isStarted = true
+
+ if err := r.ensureDTLS(); err != nil {
+ return err
+ }
+
+ sctpAssociation, err := sctp.Client(sctp.Config{
+ NetConn: r.Transport().conn,
+ LoggerFactory: r.api.settingEngine.LoggerFactory,
+ })
+ if err != nil {
+ return err
+ }
+
+ r.lock.Lock()
+ defer r.lock.Unlock()
+
+ r.association = sctpAssociation
+ r.state = SCTPTransportStateConnected
+
+ go r.acceptDataChannels(sctpAssociation)
+
+ return nil
+}
+
+// Stop stops the SCTPTransport
+func (r *SCTPTransport) Stop() error {
+ r.lock.Lock()
+ defer r.lock.Unlock()
+ if r.association == nil {
+ return nil
+ }
+ err := r.association.Close()
+ if err != nil {
+ return err
+ }
+
+ r.association = nil
+ r.state = SCTPTransportStateClosed
+
+ return nil
+}
+
+func (r *SCTPTransport) ensureDTLS() error {
+ dtlsTransport := r.Transport()
+ if dtlsTransport == nil || dtlsTransport.conn == nil {
+ return errSCTPTransportDTLS
+ }
+
+ return nil
+}
+
+func (r *SCTPTransport) acceptDataChannels(a *sctp.Association) {
+ for {
+ dc, err := datachannel.Accept(a, &datachannel.Config{
+ LoggerFactory: r.api.settingEngine.LoggerFactory,
+ })
+ if err != nil {
+ if err != io.EOF {
+ r.log.Errorf("Failed to accept data channel: %v", err)
+ r.onError(err)
+ }
+ return
+ }
+
+ var (
+ maxRetransmits *uint16
+ maxPacketLifeTime *uint16
+ )
+ val := uint16(dc.Config.ReliabilityParameter)
+ ordered := true
+
+ switch dc.Config.ChannelType {
+ case datachannel.ChannelTypeReliable:
+ ordered = true
+ case datachannel.ChannelTypeReliableUnordered:
+ ordered = false
+ case datachannel.ChannelTypePartialReliableRexmit:
+ ordered = true
+ maxRetransmits = &val
+ case datachannel.ChannelTypePartialReliableRexmitUnordered:
+ ordered = false
+ maxRetransmits = &val
+ case datachannel.ChannelTypePartialReliableTimed:
+ ordered = true
+ maxPacketLifeTime = &val
+ case datachannel.ChannelTypePartialReliableTimedUnordered:
+ ordered = false
+ maxPacketLifeTime = &val
+ default:
+ }
+
+ sid := dc.StreamIdentifier()
+ rtcDC, err := r.api.newDataChannel(&DataChannelParameters{
+ ID: &sid,
+ Label: dc.Config.Label,
+ Protocol: dc.Config.Protocol,
+ Negotiated: dc.Config.Negotiated,
+ Ordered: ordered,
+ MaxPacketLifeTime: maxPacketLifeTime,
+ MaxRetransmits: maxRetransmits,
+ }, r.api.settingEngine.LoggerFactory.NewLogger("ortc"))
+ if err != nil {
+ r.log.Errorf("Failed to accept data channel: %v", err)
+ r.onError(err)
+ return
+ }
+
+ <-r.onDataChannel(rtcDC)
+ rtcDC.handleOpen(dc)
+
+ r.lock.Lock()
+ r.dataChannelsOpened++
+ handler := r.onDataChannelOpenedHandler
+ r.lock.Unlock()
+
+ if handler != nil {
+ handler(rtcDC)
+ }
+ }
+}
+
+// OnError sets an event handler which is invoked when
+// the SCTP connection error occurs.
+func (r *SCTPTransport) OnError(f func(err error)) {
+ r.lock.Lock()
+ defer r.lock.Unlock()
+ r.onErrorHandler = f
+}
+
+func (r *SCTPTransport) onError(err error) {
+ r.lock.RLock()
+ handler := r.onErrorHandler
+ r.lock.RUnlock()
+
+ if handler != nil {
+ go handler(err)
+ }
+}
+
+// OnDataChannel sets an event handler which is invoked when a data
+// channel message arrives from a remote peer.
+func (r *SCTPTransport) OnDataChannel(f func(*DataChannel)) {
+ r.lock.Lock()
+ defer r.lock.Unlock()
+ r.onDataChannelHandler = f
+}
+
+// OnDataChannelOpened sets an event handler which is invoked when a data
+// channel is opened
+func (r *SCTPTransport) OnDataChannelOpened(f func(*DataChannel)) {
+ r.lock.Lock()
+ defer r.lock.Unlock()
+ r.onDataChannelOpenedHandler = f
+}
+
+func (r *SCTPTransport) onDataChannel(dc *DataChannel) (done chan struct{}) {
+ r.lock.Lock()
+ r.dataChannels = append(r.dataChannels, dc)
+ r.dataChannelsAccepted++
+ handler := r.onDataChannelHandler
+ r.lock.Unlock()
+
+ done = make(chan struct{})
+ if handler == nil || dc == nil {
+ close(done)
+ return
+ }
+
+ // Run this synchronously to allow setup done in onDataChannelFn()
+ // to complete before datachannel event handlers might be called.
+ go func() {
+ handler(dc)
+ close(done)
+ }()
+
+ return
+}
+
+func (r *SCTPTransport) updateMessageSize() {
+ r.lock.Lock()
+ defer r.lock.Unlock()
+
+ var remoteMaxMessageSize float64 = 65536 // pion/webrtc#758
+ var canSendSize float64 = 65536 // pion/webrtc#758
+
+ r.maxMessageSize = r.calcMessageSize(remoteMaxMessageSize, canSendSize)
+}
+
+func (r *SCTPTransport) calcMessageSize(remoteMaxMessageSize, canSendSize float64) float64 {
+ switch {
+ case remoteMaxMessageSize == 0 &&
+ canSendSize == 0:
+ return math.Inf(1)
+
+ case remoteMaxMessageSize == 0:
+ return canSendSize
+
+ case canSendSize == 0:
+ return remoteMaxMessageSize
+
+ case canSendSize > remoteMaxMessageSize:
+ return remoteMaxMessageSize
+
+ default:
+ return canSendSize
+ }
+}
+
+func (r *SCTPTransport) updateMaxChannels() {
+ val := sctpMaxChannels
+ r.maxChannels = &val
+}
+
+// MaxChannels is the maximum number of RTCDataChannels that can be open simultaneously.
+func (r *SCTPTransport) MaxChannels() uint16 {
+ r.lock.Lock()
+ defer r.lock.Unlock()
+
+ if r.maxChannels == nil {
+ return sctpMaxChannels
+ }
+
+ return *r.maxChannels
+}
+
+// State returns the current state of the SCTPTransport
+func (r *SCTPTransport) State() SCTPTransportState {
+ r.lock.RLock()
+ defer r.lock.RUnlock()
+ return r.state
+}
+
+func (r *SCTPTransport) collectStats(collector *statsReportCollector) {
+ r.lock.Lock()
+ association := r.association
+ r.lock.Unlock()
+
+ collector.Collecting()
+
+ stats := TransportStats{
+ Timestamp: statsTimestampFrom(time.Now()),
+ Type: StatsTypeTransport,
+ ID: "sctpTransport",
+ }
+
+ if association != nil {
+ stats.BytesSent = association.BytesSent()
+ stats.BytesReceived = association.BytesReceived()
+ }
+
+ collector.Collect(stats.ID, stats)
+}
+
+func (r *SCTPTransport) generateAndSetDataChannelID(dtlsRole DTLSRole, idOut **uint16) error {
+ isChannelWithID := func(id uint16) bool {
+ for _, d := range r.dataChannels {
+ if d.id != nil && *d.id == id {
+ return true
+ }
+ }
+ return false
+ }
+
+ var id uint16
+ if dtlsRole != DTLSRoleClient {
+ id++
+ }
+
+ max := r.MaxChannels()
+
+ r.lock.Lock()
+ defer r.lock.Unlock()
+ for ; id < max-1; id += 2 {
+ if isChannelWithID(id) {
+ continue
+ }
+ *idOut = &id
+ return nil
+ }
+
+ return &rtcerr.OperationError{Err: ErrMaxDataChannelID}
+}
diff --git a/vendor/github.com/pion/webrtc/v3/sctptransportstate.go b/vendor/github.com/pion/webrtc/v3/sctptransportstate.go
new file mode 100644
index 0000000..8dc7941
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/sctptransportstate.go
@@ -0,0 +1,54 @@
+package webrtc
+
+// SCTPTransportState indicates the state of the SCTP transport.
+type SCTPTransportState int
+
+const (
+ // SCTPTransportStateConnecting indicates the SCTPTransport is in the
+ // process of negotiating an association. This is the initial state of the
+ // SCTPTransportState when an SCTPTransport is created.
+ SCTPTransportStateConnecting SCTPTransportState = iota + 1
+
+ // SCTPTransportStateConnected indicates the negotiation of an
+ // association is completed.
+ SCTPTransportStateConnected
+
+ // SCTPTransportStateClosed indicates a SHUTDOWN or ABORT chunk is
+ // received or when the SCTP association has been closed intentionally,
+ // such as by closing the peer connection or applying a remote description
+ // that rejects data or changes the SCTP port.
+ SCTPTransportStateClosed
+)
+
+// This is done this way because of a linter.
+const (
+ sctpTransportStateConnectingStr = "connecting"
+ sctpTransportStateConnectedStr = "connected"
+ sctpTransportStateClosedStr = "closed"
+)
+
+func newSCTPTransportState(raw string) SCTPTransportState {
+ switch raw {
+ case sctpTransportStateConnectingStr:
+ return SCTPTransportStateConnecting
+ case sctpTransportStateConnectedStr:
+ return SCTPTransportStateConnected
+ case sctpTransportStateClosedStr:
+ return SCTPTransportStateClosed
+ default:
+ return SCTPTransportState(Unknown)
+ }
+}
+
+func (s SCTPTransportState) String() string {
+ switch s {
+ case SCTPTransportStateConnecting:
+ return sctpTransportStateConnectingStr
+ case SCTPTransportStateConnected:
+ return sctpTransportStateConnectedStr
+ case SCTPTransportStateClosed:
+ return sctpTransportStateClosedStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/sdp.go b/vendor/github.com/pion/webrtc/v3/sdp.go
new file mode 100644
index 0000000..7454696
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/sdp.go
@@ -0,0 +1,643 @@
+// +build !js
+
+package webrtc
+
+import (
+ "fmt"
+ "net/url"
+ "regexp"
+ "strconv"
+ "strings"
+
+ "github.com/pion/ice/v2"
+ "github.com/pion/logging"
+ "github.com/pion/sdp/v3"
+)
+
+// trackDetails represents any media source that can be represented in a SDP
+// This isn't keyed by SSRC because it also needs to support rid based sources
+type trackDetails struct {
+ mid string
+ kind RTPCodecType
+ streamID string
+ id string
+ ssrc SSRC
+ rids []string
+}
+
+func trackDetailsForSSRC(trackDetails []trackDetails, ssrc SSRC) *trackDetails {
+ for i := range trackDetails {
+ if trackDetails[i].ssrc == ssrc {
+ return &trackDetails[i]
+ }
+ }
+ return nil
+}
+
+func filterTrackWithSSRC(incomingTracks []trackDetails, ssrc SSRC) []trackDetails {
+ filtered := []trackDetails{}
+ for i := range incomingTracks {
+ if incomingTracks[i].ssrc != ssrc {
+ filtered = append(filtered, incomingTracks[i])
+ }
+ }
+ return filtered
+}
+
+// extract all trackDetails from an SDP.
+func trackDetailsFromSDP(log logging.LeveledLogger, s *sdp.SessionDescription) []trackDetails { // nolint:gocognit
+ incomingTracks := []trackDetails{}
+ rtxRepairFlows := map[uint32]bool{}
+
+ for _, media := range s.MediaDescriptions {
+ // Plan B can have multiple tracks in a signle media section
+ streamID := ""
+ trackID := ""
+
+ // If media section is recvonly or inactive skip
+ if _, ok := media.Attribute(sdp.AttrKeyRecvOnly); ok {
+ continue
+ } else if _, ok := media.Attribute(sdp.AttrKeyInactive); ok {
+ continue
+ }
+
+ midValue := getMidValue(media)
+ if midValue == "" {
+ continue
+ }
+
+ codecType := NewRTPCodecType(media.MediaName.Media)
+ if codecType == 0 {
+ continue
+ }
+
+ for _, attr := range media.Attributes {
+ switch attr.Key {
+ case sdp.AttrKeySSRCGroup:
+ split := strings.Split(attr.Value, " ")
+ if split[0] == sdp.SemanticTokenFlowIdentification {
+ // Add rtx ssrcs to blacklist, to avoid adding them as tracks
+ // Essentially lines like `a=ssrc-group:FID 2231627014 632943048` are processed by this section
+ // as this declares that the second SSRC (632943048) is a rtx repair flow (RFC4588) for the first
+ // (2231627014) as specified in RFC5576
+ if len(split) == 3 {
+ _, err := strconv.ParseUint(split[1], 10, 32)
+ if err != nil {
+ log.Warnf("Failed to parse SSRC: %v", err)
+ continue
+ }
+ rtxRepairFlow, err := strconv.ParseUint(split[2], 10, 32)
+ if err != nil {
+ log.Warnf("Failed to parse SSRC: %v", err)
+ continue
+ }
+ rtxRepairFlows[uint32(rtxRepairFlow)] = true
+ incomingTracks = filterTrackWithSSRC(incomingTracks, SSRC(rtxRepairFlow)) // Remove if rtx was added as track before
+ }
+ }
+
+ // Handle `a=msid:<stream_id> <track_label>` for Unified plan. The first value is the same as MediaStream.id
+ // in the browser and can be used to figure out which tracks belong to the same stream. The browser should
+ // figure this out automatically when an ontrack event is emitted on RTCPeerConnection.
+ case sdp.AttrKeyMsid:
+ split := strings.Split(attr.Value, " ")
+ if len(split) == 2 {
+ streamID = split[0]
+ trackID = split[1]
+ }
+
+ case sdp.AttrKeySSRC:
+ split := strings.Split(attr.Value, " ")
+ ssrc, err := strconv.ParseUint(split[0], 10, 32)
+ if err != nil {
+ log.Warnf("Failed to parse SSRC: %v", err)
+ continue
+ }
+
+ if rtxRepairFlow := rtxRepairFlows[uint32(ssrc)]; rtxRepairFlow {
+ continue // This ssrc is a RTX repair flow, ignore
+ }
+
+ if len(split) == 3 && strings.HasPrefix(split[1], "msid:") {
+ streamID = split[1][len("msid:"):]
+ trackID = split[2]
+ }
+
+ isNewTrack := true
+ trackDetails := &trackDetails{}
+ for i := range incomingTracks {
+ if incomingTracks[i].ssrc == SSRC(ssrc) {
+ trackDetails = &incomingTracks[i]
+ isNewTrack = false
+ }
+ }
+
+ trackDetails.mid = midValue
+ trackDetails.kind = codecType
+ trackDetails.streamID = streamID
+ trackDetails.id = trackID
+ trackDetails.ssrc = SSRC(ssrc)
+
+ if isNewTrack {
+ incomingTracks = append(incomingTracks, *trackDetails)
+ }
+ }
+ }
+
+ if rids := getRids(media); len(rids) != 0 && trackID != "" && streamID != "" {
+ newTrack := trackDetails{
+ mid: midValue,
+ kind: codecType,
+ streamID: streamID,
+ id: trackID,
+ rids: []string{},
+ }
+ for rid := range rids {
+ newTrack.rids = append(newTrack.rids, rid)
+ }
+
+ incomingTracks = append(incomingTracks, newTrack)
+ }
+ }
+ return incomingTracks
+}
+
+func getRids(media *sdp.MediaDescription) map[string]string {
+ rids := map[string]string{}
+ for _, attr := range media.Attributes {
+ if attr.Key == "rid" {
+ split := strings.Split(attr.Value, " ")
+ rids[split[0]] = attr.Value
+ }
+ }
+ return rids
+}
+
+func addCandidatesToMediaDescriptions(candidates []ICECandidate, m *sdp.MediaDescription, iceGatheringState ICEGatheringState) error {
+ appendCandidateIfNew := func(c ice.Candidate, attributes []sdp.Attribute) {
+ marshaled := c.Marshal()
+ for _, a := range attributes {
+ if marshaled == a.Value {
+ return
+ }
+ }
+
+ m.WithValueAttribute("candidate", marshaled)
+ }
+
+ for _, c := range candidates {
+ candidate, err := c.toICE()
+ if err != nil {
+ return err
+ }
+
+ candidate.SetComponent(1)
+ appendCandidateIfNew(candidate, m.Attributes)
+
+ candidate.SetComponent(2)
+ appendCandidateIfNew(candidate, m.Attributes)
+ }
+
+ if iceGatheringState != ICEGatheringStateComplete {
+ return nil
+ }
+ for _, a := range m.Attributes {
+ if a.Key == "end-of-candidates" {
+ return nil
+ }
+ }
+
+ m.WithPropertyAttribute("end-of-candidates")
+ return nil
+}
+
+func addDataMediaSection(d *sdp.SessionDescription, shouldAddCandidates bool, dtlsFingerprints []DTLSFingerprint, midValue string, iceParams ICEParameters, candidates []ICECandidate, dtlsRole sdp.ConnectionRole, iceGatheringState ICEGatheringState) error {
+ media := (&sdp.MediaDescription{
+ MediaName: sdp.MediaName{
+ Media: mediaSectionApplication,
+ Port: sdp.RangedPort{Value: 9},
+ Protos: []string{"UDP", "DTLS", "SCTP"},
+ Formats: []string{"webrtc-datachannel"},
+ },
+ ConnectionInformation: &sdp.ConnectionInformation{
+ NetworkType: "IN",
+ AddressType: "IP4",
+ Address: &sdp.Address{
+ Address: "0.0.0.0",
+ },
+ },
+ }).
+ WithValueAttribute(sdp.AttrKeyConnectionSetup, dtlsRole.String()).
+ WithValueAttribute(sdp.AttrKeyMID, midValue).
+ WithPropertyAttribute(RTPTransceiverDirectionSendrecv.String()).
+ WithPropertyAttribute("sctp-port:5000").
+ WithICECredentials(iceParams.UsernameFragment, iceParams.Password)
+
+ for _, f := range dtlsFingerprints {
+ media = media.WithFingerprint(f.Algorithm, strings.ToUpper(f.Value))
+ }
+
+ if shouldAddCandidates {
+ if err := addCandidatesToMediaDescriptions(candidates, media, iceGatheringState); err != nil {
+ return err
+ }
+ }
+
+ d.WithMedia(media)
+ return nil
+}
+
+func populateLocalCandidates(sessionDescription *SessionDescription, i *ICEGatherer, iceGatheringState ICEGatheringState) *SessionDescription {
+ if sessionDescription == nil || i == nil {
+ return sessionDescription
+ }
+
+ candidates, err := i.GetLocalCandidates()
+ if err != nil {
+ return sessionDescription
+ }
+
+ parsed := sessionDescription.parsed
+ if len(parsed.MediaDescriptions) > 0 {
+ m := parsed.MediaDescriptions[0]
+ if err = addCandidatesToMediaDescriptions(candidates, m, iceGatheringState); err != nil {
+ return sessionDescription
+ }
+ }
+
+ sdp, err := parsed.Marshal()
+ if err != nil {
+ return sessionDescription
+ }
+
+ return &SessionDescription{
+ SDP: string(sdp),
+ Type: sessionDescription.Type,
+ }
+}
+
+func addTransceiverSDP(d *sdp.SessionDescription, isPlanB, shouldAddCandidates bool, dtlsFingerprints []DTLSFingerprint, mediaEngine *MediaEngine, midValue string, iceParams ICEParameters, candidates []ICECandidate, dtlsRole sdp.ConnectionRole, iceGatheringState ICEGatheringState, mediaSection mediaSection) (bool, error) {
+ transceivers := mediaSection.transceivers
+ if len(transceivers) < 1 {
+ return false, errSDPZeroTransceivers
+ }
+ // Use the first transceiver to generate the section attributes
+ t := transceivers[0]
+ media := sdp.NewJSEPMediaDescription(t.kind.String(), []string{}).
+ WithValueAttribute(sdp.AttrKeyConnectionSetup, dtlsRole.String()).
+ WithValueAttribute(sdp.AttrKeyMID, midValue).
+ WithICECredentials(iceParams.UsernameFragment, iceParams.Password).
+ WithPropertyAttribute(sdp.AttrKeyRTCPMux).
+ WithPropertyAttribute(sdp.AttrKeyRTCPRsize)
+
+ codecs := mediaEngine.getCodecsByKind(t.kind)
+ for _, codec := range codecs {
+ name := strings.TrimPrefix(codec.MimeType, "audio/")
+ name = strings.TrimPrefix(name, "video/")
+ media.WithCodec(uint8(codec.PayloadType), name, codec.ClockRate, codec.Channels, codec.SDPFmtpLine)
+
+ for _, feedback := range codec.RTPCodecCapability.RTCPFeedback {
+ media.WithValueAttribute("rtcp-fb", fmt.Sprintf("%d %s %s", codec.PayloadType, feedback.Type, feedback.Parameter))
+ }
+ }
+ if len(codecs) == 0 {
+ // Explicitly reject track if we don't have the codec
+ d.WithMedia(&sdp.MediaDescription{
+ MediaName: sdp.MediaName{
+ Media: t.kind.String(),
+ Port: sdp.RangedPort{Value: 0},
+ Protos: []string{"UDP", "TLS", "RTP", "SAVPF"},
+ Formats: []string{"0"},
+ },
+ })
+ return false, nil
+ }
+
+ directions := []RTPTransceiverDirection{}
+ if t.Sender() != nil {
+ directions = append(directions, RTPTransceiverDirectionSendonly)
+ }
+ if t.Receiver() != nil {
+ directions = append(directions, RTPTransceiverDirectionRecvonly)
+ }
+
+ parameters := mediaEngine.getRTPParametersByKind(t.kind, directions)
+ for _, rtpExtension := range parameters.HeaderExtensions {
+ extURL, err := url.Parse(rtpExtension.URI)
+ if err != nil {
+ return false, err
+ }
+ media.WithExtMap(sdp.ExtMap{Value: rtpExtension.ID, URI: extURL})
+ }
+
+ if len(mediaSection.ridMap) > 0 {
+ recvRids := make([]string, 0, len(mediaSection.ridMap))
+
+ for rid := range mediaSection.ridMap {
+ media.WithValueAttribute("rid", rid+" recv")
+ recvRids = append(recvRids, rid)
+ }
+ // Simulcast
+ media.WithValueAttribute("simulcast", "recv "+strings.Join(recvRids, ";"))
+ }
+
+ for _, mt := range transceivers {
+ if mt.Sender() != nil && mt.Sender().Track() != nil {
+ track := mt.Sender().Track()
+ media = media.WithMediaSource(uint32(mt.Sender().ssrc), track.StreamID() /* cname */, track.StreamID() /* streamLabel */, track.ID())
+ if !isPlanB {
+ media = media.WithPropertyAttribute("msid:" + track.StreamID() + " " + track.ID())
+ break
+ }
+ }
+ }
+
+ media = media.WithPropertyAttribute(t.Direction().String())
+
+ for _, fingerprint := range dtlsFingerprints {
+ media = media.WithFingerprint(fingerprint.Algorithm, strings.ToUpper(fingerprint.Value))
+ }
+
+ if shouldAddCandidates {
+ if err := addCandidatesToMediaDescriptions(candidates, media, iceGatheringState); err != nil {
+ return false, err
+ }
+ }
+
+ d.WithMedia(media)
+
+ return true, nil
+}
+
+type mediaSection struct {
+ id string
+ transceivers []*RTPTransceiver
+ data bool
+ ridMap map[string]string
+}
+
+// populateSDP serializes a PeerConnections state into an SDP
+func populateSDP(d *sdp.SessionDescription, isPlanB bool, dtlsFingerprints []DTLSFingerprint, mediaDescriptionFingerprint bool, isICELite bool, mediaEngine *MediaEngine, connectionRole sdp.ConnectionRole, candidates []ICECandidate, iceParams ICEParameters, mediaSections []mediaSection, iceGatheringState ICEGatheringState) (*sdp.SessionDescription, error) {
+ var err error
+ mediaDtlsFingerprints := []DTLSFingerprint{}
+
+ if mediaDescriptionFingerprint {
+ mediaDtlsFingerprints = dtlsFingerprints
+ }
+
+ bundleValue := "BUNDLE"
+ bundleCount := 0
+ appendBundle := func(midValue string) {
+ bundleValue += " " + midValue
+ bundleCount++
+ }
+
+ for i, m := range mediaSections {
+ if m.data && len(m.transceivers) != 0 {
+ return nil, errSDPMediaSectionMediaDataChanInvalid
+ } else if !isPlanB && len(m.transceivers) > 1 {
+ return nil, errSDPMediaSectionMultipleTrackInvalid
+ }
+
+ shouldAddID := true
+ shouldAddCanidates := i == 0
+ if m.data {
+ if err = addDataMediaSection(d, shouldAddCanidates, mediaDtlsFingerprints, m.id, iceParams, candidates, connectionRole, iceGatheringState); err != nil {
+ return nil, err
+ }
+ } else {
+ shouldAddID, err = addTransceiverSDP(d, isPlanB, shouldAddCanidates, mediaDtlsFingerprints, mediaEngine, m.id, iceParams, candidates, connectionRole, iceGatheringState, m)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ if shouldAddID {
+ appendBundle(m.id)
+ }
+ }
+
+ if !mediaDescriptionFingerprint {
+ for _, fingerprint := range dtlsFingerprints {
+ d.WithFingerprint(fingerprint.Algorithm, strings.ToUpper(fingerprint.Value))
+ }
+ }
+
+ if isICELite {
+ // RFC 5245 S15.3
+ d = d.WithValueAttribute(sdp.AttrKeyICELite, sdp.AttrKeyICELite)
+ }
+
+ return d.WithValueAttribute(sdp.AttrKeyGroup, bundleValue), nil
+}
+
+func getMidValue(media *sdp.MediaDescription) string {
+ for _, attr := range media.Attributes {
+ if attr.Key == "mid" {
+ return attr.Value
+ }
+ }
+ return ""
+}
+
+func descriptionIsPlanB(desc *SessionDescription) bool {
+ if desc == nil || desc.parsed == nil {
+ return false
+ }
+
+ detectionRegex := regexp.MustCompile(`(?i)^(audio|video|data)$`)
+ for _, media := range desc.parsed.MediaDescriptions {
+ if len(detectionRegex.FindStringSubmatch(getMidValue(media))) == 2 {
+ return true
+ }
+ }
+ return false
+}
+
+func getPeerDirection(media *sdp.MediaDescription) RTPTransceiverDirection {
+ for _, a := range media.Attributes {
+ if direction := NewRTPTransceiverDirection(a.Key); direction != RTPTransceiverDirection(Unknown) {
+ return direction
+ }
+ }
+ return RTPTransceiverDirection(Unknown)
+}
+
+func extractFingerprint(desc *sdp.SessionDescription) (string, string, error) {
+ fingerprints := []string{}
+
+ if fingerprint, haveFingerprint := desc.Attribute("fingerprint"); haveFingerprint {
+ fingerprints = append(fingerprints, fingerprint)
+ }
+
+ for _, m := range desc.MediaDescriptions {
+ if fingerprint, haveFingerprint := m.Attribute("fingerprint"); haveFingerprint {
+ fingerprints = append(fingerprints, fingerprint)
+ }
+ }
+
+ if len(fingerprints) < 1 {
+ return "", "", ErrSessionDescriptionNoFingerprint
+ }
+
+ for _, m := range fingerprints {
+ if m != fingerprints[0] {
+ return "", "", ErrSessionDescriptionConflictingFingerprints
+ }
+ }
+
+ parts := strings.Split(fingerprints[0], " ")
+ if len(parts) != 2 {
+ return "", "", ErrSessionDescriptionInvalidFingerprint
+ }
+ return parts[1], parts[0], nil
+}
+
+func extractICEDetails(desc *sdp.SessionDescription) (string, string, []ICECandidate, error) {
+ candidates := []ICECandidate{}
+ remotePwds := []string{}
+ remoteUfrags := []string{}
+
+ if ufrag, haveUfrag := desc.Attribute("ice-ufrag"); haveUfrag {
+ remoteUfrags = append(remoteUfrags, ufrag)
+ }
+ if pwd, havePwd := desc.Attribute("ice-pwd"); havePwd {
+ remotePwds = append(remotePwds, pwd)
+ }
+
+ for _, m := range desc.MediaDescriptions {
+ if ufrag, haveUfrag := m.Attribute("ice-ufrag"); haveUfrag {
+ remoteUfrags = append(remoteUfrags, ufrag)
+ }
+ if pwd, havePwd := m.Attribute("ice-pwd"); havePwd {
+ remotePwds = append(remotePwds, pwd)
+ }
+
+ for _, a := range m.Attributes {
+ if a.IsICECandidate() {
+ c, err := ice.UnmarshalCandidate(a.Value)
+ if err != nil {
+ return "", "", nil, err
+ }
+
+ candidate, err := newICECandidateFromICE(c)
+ if err != nil {
+ return "", "", nil, err
+ }
+
+ candidates = append(candidates, candidate)
+ }
+ }
+ }
+
+ if len(remoteUfrags) == 0 {
+ return "", "", nil, ErrSessionDescriptionMissingIceUfrag
+ } else if len(remotePwds) == 0 {
+ return "", "", nil, ErrSessionDescriptionMissingIcePwd
+ }
+
+ for _, m := range remoteUfrags {
+ if m != remoteUfrags[0] {
+ return "", "", nil, ErrSessionDescriptionConflictingIceUfrag
+ }
+ }
+
+ for _, m := range remotePwds {
+ if m != remotePwds[0] {
+ return "", "", nil, ErrSessionDescriptionConflictingIcePwd
+ }
+ }
+
+ return remoteUfrags[0], remotePwds[0], candidates, nil
+}
+
+func haveApplicationMediaSection(desc *sdp.SessionDescription) bool {
+ for _, m := range desc.MediaDescriptions {
+ if m.MediaName.Media == mediaSectionApplication {
+ return true
+ }
+ }
+
+ return false
+}
+
+func getByMid(searchMid string, desc *SessionDescription) *sdp.MediaDescription {
+ for _, m := range desc.parsed.MediaDescriptions {
+ if mid, ok := m.Attribute(sdp.AttrKeyMID); ok && mid == searchMid {
+ return m
+ }
+ }
+ return nil
+}
+
+// haveDataChannel return MediaDescription with MediaName equal application
+func haveDataChannel(desc *SessionDescription) *sdp.MediaDescription {
+ for _, d := range desc.parsed.MediaDescriptions {
+ if d.MediaName.Media == mediaSectionApplication {
+ return d
+ }
+ }
+ return nil
+}
+
+func codecsFromMediaDescription(m *sdp.MediaDescription) (out []RTPCodecParameters, err error) {
+ s := &sdp.SessionDescription{
+ MediaDescriptions: []*sdp.MediaDescription{m},
+ }
+
+ for _, payloadStr := range m.MediaName.Formats {
+ payloadType, err := strconv.Atoi(payloadStr)
+ if err != nil {
+ return nil, err
+ }
+
+ codec, err := s.GetCodecForPayloadType(uint8(payloadType))
+ if err != nil {
+ if payloadType == 0 {
+ continue
+ }
+ return nil, err
+ }
+
+ channels := uint16(0)
+ val, err := strconv.Atoi(codec.EncodingParameters)
+ if err == nil {
+ channels = uint16(val)
+ }
+
+ feedback := []RTCPFeedback{}
+ for _, raw := range codec.RTCPFeedback {
+ split := strings.Split(raw, " ")
+ entry := RTCPFeedback{Type: split[0]}
+ if len(split) == 2 {
+ entry.Parameter = split[1]
+ }
+
+ feedback = append(feedback, entry)
+ }
+
+ out = append(out, RTPCodecParameters{
+ RTPCodecCapability: RTPCodecCapability{m.MediaName.Media + "/" + codec.Name, codec.ClockRate, channels, codec.Fmtp, feedback},
+ PayloadType: PayloadType(payloadType),
+ })
+ }
+
+ return out, nil
+}
+
+func rtpExtensionsFromMediaDescription(m *sdp.MediaDescription) (map[string]int, error) {
+ out := map[string]int{}
+
+ for _, a := range m.Attributes {
+ if a.Key == sdp.AttrKeyExtMap {
+ e := sdp.ExtMap{}
+ if err := e.Unmarshal(a.String()); err != nil {
+ return nil, err
+ }
+
+ out[e.URI.String()] = e.Value
+ }
+ }
+
+ return out, nil
+}
diff --git a/vendor/github.com/pion/webrtc/v3/sdpsemantics.go b/vendor/github.com/pion/webrtc/v3/sdpsemantics.go
new file mode 100644
index 0000000..b8d396c
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/sdpsemantics.go
@@ -0,0 +1,74 @@
+package webrtc
+
+import (
+ "encoding/json"
+)
+
+// SDPSemantics determines which style of SDP offers and answers
+// can be used
+type SDPSemantics int
+
+const (
+ // SDPSemanticsUnifiedPlan uses unified-plan offers and answers
+ // (the default in Chrome since M72)
+ // https://tools.ietf.org/html/draft-roach-mmusic-unified-plan-00
+ SDPSemanticsUnifiedPlan SDPSemantics = iota
+
+ // SDPSemanticsPlanB uses plan-b offers and answers
+ // NB: This format should be considered deprecated
+ // https://tools.ietf.org/html/draft-uberti-rtcweb-plan-00
+ SDPSemanticsPlanB
+
+ // SDPSemanticsUnifiedPlanWithFallback prefers unified-plan
+ // offers and answers, but will respond to a plan-b offer
+ // with a plan-b answer
+ SDPSemanticsUnifiedPlanWithFallback
+)
+
+const (
+ sdpSemanticsUnifiedPlanWithFallback = "unified-plan-with-fallback"
+ sdpSemanticsUnifiedPlan = "unified-plan"
+ sdpSemanticsPlanB = "plan-b"
+)
+
+func newSDPSemantics(raw string) SDPSemantics {
+ switch raw {
+ case sdpSemanticsUnifiedPlan:
+ return SDPSemanticsUnifiedPlan
+ case sdpSemanticsPlanB:
+ return SDPSemanticsPlanB
+ case sdpSemanticsUnifiedPlanWithFallback:
+ return SDPSemanticsUnifiedPlanWithFallback
+ default:
+ return SDPSemantics(Unknown)
+ }
+}
+
+func (s SDPSemantics) String() string {
+ switch s {
+ case SDPSemanticsUnifiedPlanWithFallback:
+ return sdpSemanticsUnifiedPlanWithFallback
+ case SDPSemanticsUnifiedPlan:
+ return sdpSemanticsUnifiedPlan
+ case SDPSemanticsPlanB:
+ return sdpSemanticsPlanB
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// UnmarshalJSON parses the JSON-encoded data and stores the result
+func (s *SDPSemantics) UnmarshalJSON(b []byte) error {
+ var val string
+ if err := json.Unmarshal(b, &val); err != nil {
+ return err
+ }
+
+ *s = newSDPSemantics(val)
+ return nil
+}
+
+// MarshalJSON returns the JSON encoding
+func (s SDPSemantics) MarshalJSON() ([]byte, error) {
+ return json.Marshal(s.String())
+}
diff --git a/vendor/github.com/pion/webrtc/v3/sdptype.go b/vendor/github.com/pion/webrtc/v3/sdptype.go
new file mode 100644
index 0000000..bd49b6d
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/sdptype.go
@@ -0,0 +1,100 @@
+package webrtc
+
+import (
+ "encoding/json"
+ "strings"
+)
+
+// SDPType describes the type of an SessionDescription.
+type SDPType int
+
+const (
+ // SDPTypeOffer indicates that a description MUST be treated as an SDP
+ // offer.
+ SDPTypeOffer SDPType = iota + 1
+
+ // SDPTypePranswer indicates that a description MUST be treated as an
+ // SDP answer, but not a final answer. A description used as an SDP
+ // pranswer may be applied as a response to an SDP offer, or an update to
+ // a previously sent SDP pranswer.
+ SDPTypePranswer
+
+ // SDPTypeAnswer indicates that a description MUST be treated as an SDP
+ // final answer, and the offer-answer exchange MUST be considered complete.
+ // A description used as an SDP answer may be applied as a response to an
+ // SDP offer or as an update to a previously sent SDP pranswer.
+ SDPTypeAnswer
+
+ // SDPTypeRollback indicates that a description MUST be treated as
+ // canceling the current SDP negotiation and moving the SDP offer and
+ // answer back to what it was in the previous stable state. Note the
+ // local or remote SDP descriptions in the previous stable state could be
+ // null if there has not yet been a successful offer-answer negotiation.
+ SDPTypeRollback
+)
+
+// This is done this way because of a linter.
+const (
+ sdpTypeOfferStr = "offer"
+ sdpTypePranswerStr = "pranswer"
+ sdpTypeAnswerStr = "answer"
+ sdpTypeRollbackStr = "rollback"
+)
+
+// NewSDPType creates an SDPType from a string
+func NewSDPType(raw string) SDPType {
+ switch raw {
+ case sdpTypeOfferStr:
+ return SDPTypeOffer
+ case sdpTypePranswerStr:
+ return SDPTypePranswer
+ case sdpTypeAnswerStr:
+ return SDPTypeAnswer
+ case sdpTypeRollbackStr:
+ return SDPTypeRollback
+ default:
+ return SDPType(Unknown)
+ }
+}
+
+func (t SDPType) String() string {
+ switch t {
+ case SDPTypeOffer:
+ return sdpTypeOfferStr
+ case SDPTypePranswer:
+ return sdpTypePranswerStr
+ case SDPTypeAnswer:
+ return sdpTypeAnswerStr
+ case SDPTypeRollback:
+ return sdpTypeRollbackStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// MarshalJSON enables JSON marshaling of a SDPType
+func (t SDPType) MarshalJSON() ([]byte, error) {
+ return json.Marshal(t.String())
+}
+
+// UnmarshalJSON enables JSON unmarshaling of a SDPType
+func (t *SDPType) UnmarshalJSON(b []byte) error {
+ var s string
+ if err := json.Unmarshal(b, &s); err != nil {
+ return err
+ }
+ switch strings.ToLower(s) {
+ default:
+ return ErrUnknownType
+ case "offer":
+ *t = SDPTypeOffer
+ case "pranswer":
+ *t = SDPTypePranswer
+ case "answer":
+ *t = SDPTypeAnswer
+ case "rollback":
+ *t = SDPTypeRollback
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/pion/webrtc/v3/sessiondescription.go b/vendor/github.com/pion/webrtc/v3/sessiondescription.go
new file mode 100644
index 0000000..5b93391
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/sessiondescription.go
@@ -0,0 +1,21 @@
+package webrtc
+
+import (
+ "github.com/pion/sdp/v3"
+)
+
+// SessionDescription is used to expose local and remote session descriptions.
+type SessionDescription struct {
+ Type SDPType `json:"type"`
+ SDP string `json:"sdp"`
+
+ // This will never be initialized by callers, internal use only
+ parsed *sdp.SessionDescription
+}
+
+// Unmarshal is a helper to deserialize the sdp
+func (sd *SessionDescription) Unmarshal() (*sdp.SessionDescription, error) {
+ sd.parsed = &sdp.SessionDescription{}
+ err := sd.parsed.Unmarshal([]byte(sd.SDP))
+ return sd.parsed, err
+}
diff --git a/vendor/github.com/pion/webrtc/v3/settingengine.go b/vendor/github.com/pion/webrtc/v3/settingengine.go
new file mode 100644
index 0000000..8091e6a
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/settingengine.go
@@ -0,0 +1,265 @@
+// +build !js
+
+package webrtc
+
+import (
+ "io"
+ "time"
+
+ "github.com/pion/ice/v2"
+ "github.com/pion/logging"
+ "github.com/pion/transport/packetio"
+ "github.com/pion/transport/vnet"
+ "golang.org/x/net/proxy"
+)
+
+// SettingEngine allows influencing behavior in ways that are not
+// supported by the WebRTC API. This allows us to support additional
+// use-cases without deviating from the WebRTC API elsewhere.
+type SettingEngine struct {
+ ephemeralUDP struct {
+ PortMin uint16
+ PortMax uint16
+ }
+ detach struct {
+ DataChannels bool
+ }
+ timeout struct {
+ ICEDisconnectedTimeout *time.Duration
+ ICEFailedTimeout *time.Duration
+ ICEKeepaliveInterval *time.Duration
+ ICEHostAcceptanceMinWait *time.Duration
+ ICESrflxAcceptanceMinWait *time.Duration
+ ICEPrflxAcceptanceMinWait *time.Duration
+ ICERelayAcceptanceMinWait *time.Duration
+ }
+ candidates struct {
+ ICELite bool
+ ICENetworkTypes []NetworkType
+ InterfaceFilter func(string) bool
+ NAT1To1IPs []string
+ NAT1To1IPCandidateType ICECandidateType
+ MulticastDNSMode ice.MulticastDNSMode
+ MulticastDNSHostName string
+ UsernameFragment string
+ Password string
+ }
+ replayProtection struct {
+ DTLS *uint
+ SRTP *uint
+ SRTCP *uint
+ }
+ sdpMediaLevelFingerprints bool
+ answeringDTLSRole DTLSRole
+ disableCertificateFingerprintVerification bool
+ disableSRTPReplayProtection bool
+ disableSRTCPReplayProtection bool
+ vnet *vnet.Net
+ BufferFactory func(packetType packetio.BufferPacketType, ssrc uint32) io.ReadWriteCloser
+ LoggerFactory logging.LoggerFactory
+ iceTCPMux ice.TCPMux
+ iceProxyDialer proxy.Dialer
+ disableMediaEngineCopy bool
+}
+
+// DetachDataChannels enables detaching data channels. When enabled
+// data channels have to be detached in the OnOpen callback using the
+// DataChannel.Detach method.
+func (e *SettingEngine) DetachDataChannels() {
+ e.detach.DataChannels = true
+}
+
+// SetICETimeouts sets the behavior around ICE Timeouts
+// * disconnectedTimeout is the duration without network activity before a Agent is considered disconnected. Default is 5 Seconds
+// * failedTimeout is the duration without network activity before a Agent is considered failed after disconnected. Default is 25 Seconds
+// * keepAliveInterval is how often the ICE Agent sends extra traffic if there is no activity, if media is flowing no traffic will be sent. Default is 2 seconds
+func (e *SettingEngine) SetICETimeouts(disconnectedTimeout, failedTimeout, keepAliveInterval time.Duration) {
+ e.timeout.ICEDisconnectedTimeout = &disconnectedTimeout
+ e.timeout.ICEFailedTimeout = &failedTimeout
+ e.timeout.ICEKeepaliveInterval = &keepAliveInterval
+}
+
+// SetHostAcceptanceMinWait sets the ICEHostAcceptanceMinWait
+func (e *SettingEngine) SetHostAcceptanceMinWait(t time.Duration) {
+ e.timeout.ICEHostAcceptanceMinWait = &t
+}
+
+// SetSrflxAcceptanceMinWait sets the ICESrflxAcceptanceMinWait
+func (e *SettingEngine) SetSrflxAcceptanceMinWait(t time.Duration) {
+ e.timeout.ICESrflxAcceptanceMinWait = &t
+}
+
+// SetPrflxAcceptanceMinWait sets the ICEPrflxAcceptanceMinWait
+func (e *SettingEngine) SetPrflxAcceptanceMinWait(t time.Duration) {
+ e.timeout.ICEPrflxAcceptanceMinWait = &t
+}
+
+// SetRelayAcceptanceMinWait sets the ICERelayAcceptanceMinWait
+func (e *SettingEngine) SetRelayAcceptanceMinWait(t time.Duration) {
+ e.timeout.ICERelayAcceptanceMinWait = &t
+}
+
+// SetEphemeralUDPPortRange limits the pool of ephemeral ports that
+// ICE UDP connections can allocate from. This affects both host candidates,
+// and the local address of server reflexive candidates.
+func (e *SettingEngine) SetEphemeralUDPPortRange(portMin, portMax uint16) error {
+ if portMax < portMin {
+ return ice.ErrPort
+ }
+
+ e.ephemeralUDP.PortMin = portMin
+ e.ephemeralUDP.PortMax = portMax
+ return nil
+}
+
+// SetLite configures whether or not the ice agent should be a lite agent
+func (e *SettingEngine) SetLite(lite bool) {
+ e.candidates.ICELite = lite
+}
+
+// SetNetworkTypes configures what types of candidate networks are supported
+// during local and server reflexive gathering.
+func (e *SettingEngine) SetNetworkTypes(candidateTypes []NetworkType) {
+ e.candidates.ICENetworkTypes = candidateTypes
+}
+
+// SetInterfaceFilter sets the filtering functions when gathering ICE candidates
+// This can be used to exclude certain network interfaces from ICE. Which may be
+// useful if you know a certain interface will never succeed, or if you wish to reduce
+// the amount of information you wish to expose to the remote peer
+func (e *SettingEngine) SetInterfaceFilter(filter func(string) bool) {
+ e.candidates.InterfaceFilter = filter
+}
+
+// SetNAT1To1IPs sets a list of external IP addresses of 1:1 (D)NAT
+// and a candidate type for which the external IP address is used.
+// This is useful when you are host a server using Pion on an AWS EC2 instance
+// which has a private address, behind a 1:1 DNAT with a public IP (e.g.
+// Elastic IP). In this case, you can give the public IP address so that
+// Pion will use the public IP address in its candidate instead of the private
+// IP address. The second argument, candidateType, is used to tell Pion which
+// type of candidate should use the given public IP address.
+// Two types of candidates are supported:
+//
+// ICECandidateTypeHost:
+// The public IP address will be used for the host candidate in the SDP.
+// ICECandidateTypeSrflx:
+// A server reflexive candidate with the given public IP address will be added
+// to the SDP.
+//
+// Please note that if you choose ICECandidateTypeHost, then the private IP address
+// won't be advertised with the peer. Also, this option cannot be used along with mDNS.
+//
+// If you choose ICECandidateTypeSrflx, it simply adds a server reflexive candidate
+// with the public IP. The host candidate is still available along with mDNS
+// capabilities unaffected. Also, you cannot give STUN server URL at the same time.
+// It will result in an error otherwise.
+func (e *SettingEngine) SetNAT1To1IPs(ips []string, candidateType ICECandidateType) {
+ e.candidates.NAT1To1IPs = ips
+ e.candidates.NAT1To1IPCandidateType = candidateType
+}
+
+// SetAnsweringDTLSRole sets the DTLS role that is selected when offering
+// The DTLS role controls if the WebRTC Client as a client or server. This
+// may be useful when interacting with non-compliant clients or debugging issues.
+//
+// DTLSRoleActive:
+// Act as DTLS Client, send the ClientHello and starts the handshake
+// DTLSRolePassive:
+// Act as DTLS Server, wait for ClientHello
+func (e *SettingEngine) SetAnsweringDTLSRole(role DTLSRole) error {
+ if role != DTLSRoleClient && role != DTLSRoleServer {
+ return errSettingEngineSetAnsweringDTLSRole
+ }
+
+ e.answeringDTLSRole = role
+ return nil
+}
+
+// SetVNet sets the VNet instance that is passed to pion/ice
+//
+// VNet is a virtual network layer for Pion, allowing users to simulate
+// different topologies, latency, loss and jitter. This can be useful for
+// learning WebRTC concepts or testing your application in a lab environment
+func (e *SettingEngine) SetVNet(vnet *vnet.Net) {
+ e.vnet = vnet
+}
+
+// SetICEMulticastDNSMode controls if pion/ice queries and generates mDNS ICE Candidates
+func (e *SettingEngine) SetICEMulticastDNSMode(multicastDNSMode ice.MulticastDNSMode) {
+ e.candidates.MulticastDNSMode = multicastDNSMode
+}
+
+// SetMulticastDNSHostName sets a static HostName to be used by pion/ice instead of generating one on startup
+//
+// This should only be used for a single PeerConnection. Having multiple PeerConnections with the same HostName will cause
+// undefined behavior
+func (e *SettingEngine) SetMulticastDNSHostName(hostName string) {
+ e.candidates.MulticastDNSHostName = hostName
+}
+
+// SetICECredentials sets a staic uFrag/uPwd to be used by pion/ice
+//
+// This is useful if you want to do signalless WebRTC session, or having a reproducible environment with static credentials
+func (e *SettingEngine) SetICECredentials(usernameFragment, password string) {
+ e.candidates.UsernameFragment = usernameFragment
+ e.candidates.Password = password
+}
+
+// DisableCertificateFingerprintVerification disables fingerprint verification after DTLS Handshake has finished
+func (e *SettingEngine) DisableCertificateFingerprintVerification(isDisabled bool) {
+ e.disableCertificateFingerprintVerification = isDisabled
+}
+
+// SetDTLSReplayProtectionWindow sets a replay attack protection window size of DTLS connection.
+func (e *SettingEngine) SetDTLSReplayProtectionWindow(n uint) {
+ e.replayProtection.DTLS = &n
+}
+
+// SetSRTPReplayProtectionWindow sets a replay attack protection window size of SRTP session.
+func (e *SettingEngine) SetSRTPReplayProtectionWindow(n uint) {
+ e.disableSRTPReplayProtection = false
+ e.replayProtection.SRTP = &n
+}
+
+// SetSRTCPReplayProtectionWindow sets a replay attack protection window size of SRTCP session.
+func (e *SettingEngine) SetSRTCPReplayProtectionWindow(n uint) {
+ e.disableSRTCPReplayProtection = false
+ e.replayProtection.SRTCP = &n
+}
+
+// DisableSRTPReplayProtection disables SRTP replay protection.
+func (e *SettingEngine) DisableSRTPReplayProtection(isDisabled bool) {
+ e.disableSRTPReplayProtection = isDisabled
+}
+
+// DisableSRTCPReplayProtection disables SRTCP replay protection.
+func (e *SettingEngine) DisableSRTCPReplayProtection(isDisabled bool) {
+ e.disableSRTCPReplayProtection = isDisabled
+}
+
+// SetSDPMediaLevelFingerprints configures the logic for DTLS Fingerprint insertion
+// If true, fingerprints will be inserted in the sdp at the fingerprint
+// level, instead of the session level. This helps with compatibility with
+// some webrtc implementations.
+func (e *SettingEngine) SetSDPMediaLevelFingerprints(sdpMediaLevelFingerprints bool) {
+ e.sdpMediaLevelFingerprints = sdpMediaLevelFingerprints
+}
+
+// SetICETCPMux enables ICE-TCP when set to a non-nil value. Make sure that
+// NetworkTypeTCP4 or NetworkTypeTCP6 is enabled as well.
+func (e *SettingEngine) SetICETCPMux(tcpMux ice.TCPMux) {
+ e.iceTCPMux = tcpMux
+}
+
+// SetICEProxyDialer sets the proxy dialer interface based on golang.org/x/net/proxy.
+func (e *SettingEngine) SetICEProxyDialer(d proxy.Dialer) {
+ e.iceProxyDialer = d
+}
+
+// DisableMediaEngineCopy stops the MediaEngine from being copied. This allows a user to modify
+// the MediaEngine after the PeerConnection has been constructed. This is useful if you wish to
+// modify codecs after signaling. Make sure not to share MediaEngines between PeerConnections.
+func (e *SettingEngine) DisableMediaEngineCopy(isDisabled bool) {
+ e.disableMediaEngineCopy = isDisabled
+}
diff --git a/vendor/github.com/pion/webrtc/v3/settingengine_js.go b/vendor/github.com/pion/webrtc/v3/settingengine_js.go
new file mode 100644
index 0000000..5b77d66
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/settingengine_js.go
@@ -0,0 +1,19 @@
+// +build js,wasm
+
+package webrtc
+
+// SettingEngine allows influencing behavior in ways that are not
+// supported by the WebRTC API. This allows us to support additional
+// use-cases without deviating from the WebRTC API elsewhere.
+type SettingEngine struct {
+ detach struct {
+ DataChannels bool
+ }
+}
+
+// DetachDataChannels enables detaching data channels. When enabled
+// data channels have to be detached in the OnOpen callback using the
+// DataChannel.Detach method.
+func (e *SettingEngine) DetachDataChannels() {
+ e.detach.DataChannels = true
+}
diff --git a/vendor/github.com/pion/webrtc/v3/signalingstate.go b/vendor/github.com/pion/webrtc/v3/signalingstate.go
new file mode 100644
index 0000000..b64dffc
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/signalingstate.go
@@ -0,0 +1,188 @@
+package webrtc
+
+import (
+ "fmt"
+ "sync/atomic"
+
+ "github.com/pion/webrtc/v3/pkg/rtcerr"
+)
+
+type stateChangeOp int
+
+const (
+ stateChangeOpSetLocal stateChangeOp = iota + 1
+ stateChangeOpSetRemote
+)
+
+func (op stateChangeOp) String() string {
+ switch op {
+ case stateChangeOpSetLocal:
+ return "SetLocal"
+ case stateChangeOpSetRemote:
+ return "SetRemote"
+ default:
+ return "Unknown State Change Operation"
+ }
+}
+
+// SignalingState indicates the signaling state of the offer/answer process.
+type SignalingState int32
+
+const (
+ // SignalingStateStable indicates there is no offer/answer exchange in
+ // progress. This is also the initial state, in which case the local and
+ // remote descriptions are nil.
+ SignalingStateStable SignalingState = iota + 1
+
+ // SignalingStateHaveLocalOffer indicates that a local description, of
+ // type "offer", has been successfully applied.
+ SignalingStateHaveLocalOffer
+
+ // SignalingStateHaveRemoteOffer indicates that a remote description, of
+ // type "offer", has been successfully applied.
+ SignalingStateHaveRemoteOffer
+
+ // SignalingStateHaveLocalPranswer indicates that a remote description
+ // of type "offer" has been successfully applied and a local description
+ // of type "pranswer" has been successfully applied.
+ SignalingStateHaveLocalPranswer
+
+ // SignalingStateHaveRemotePranswer indicates that a local description
+ // of type "offer" has been successfully applied and a remote description
+ // of type "pranswer" has been successfully applied.
+ SignalingStateHaveRemotePranswer
+
+ // SignalingStateClosed indicates The PeerConnection has been closed.
+ SignalingStateClosed
+)
+
+// This is done this way because of a linter.
+const (
+ signalingStateStableStr = "stable"
+ signalingStateHaveLocalOfferStr = "have-local-offer"
+ signalingStateHaveRemoteOfferStr = "have-remote-offer"
+ signalingStateHaveLocalPranswerStr = "have-local-pranswer"
+ signalingStateHaveRemotePranswerStr = "have-remote-pranswer"
+ signalingStateClosedStr = "closed"
+)
+
+func newSignalingState(raw string) SignalingState {
+ switch raw {
+ case signalingStateStableStr:
+ return SignalingStateStable
+ case signalingStateHaveLocalOfferStr:
+ return SignalingStateHaveLocalOffer
+ case signalingStateHaveRemoteOfferStr:
+ return SignalingStateHaveRemoteOffer
+ case signalingStateHaveLocalPranswerStr:
+ return SignalingStateHaveLocalPranswer
+ case signalingStateHaveRemotePranswerStr:
+ return SignalingStateHaveRemotePranswer
+ case signalingStateClosedStr:
+ return SignalingStateClosed
+ default:
+ return SignalingState(Unknown)
+ }
+}
+
+func (t SignalingState) String() string {
+ switch t {
+ case SignalingStateStable:
+ return signalingStateStableStr
+ case SignalingStateHaveLocalOffer:
+ return signalingStateHaveLocalOfferStr
+ case SignalingStateHaveRemoteOffer:
+ return signalingStateHaveRemoteOfferStr
+ case SignalingStateHaveLocalPranswer:
+ return signalingStateHaveLocalPranswerStr
+ case SignalingStateHaveRemotePranswer:
+ return signalingStateHaveRemotePranswerStr
+ case SignalingStateClosed:
+ return signalingStateClosedStr
+ default:
+ return ErrUnknownType.Error()
+ }
+}
+
+// Get thread safe read value
+func (t *SignalingState) Get() SignalingState {
+ return SignalingState(atomic.LoadInt32((*int32)(t)))
+}
+
+// Set thread safe write value
+func (t *SignalingState) Set(state SignalingState) {
+ atomic.StoreInt32((*int32)(t), int32(state))
+}
+
+func checkNextSignalingState(cur, next SignalingState, op stateChangeOp, sdpType SDPType) (SignalingState, error) { // nolint:gocognit
+ // Special case for rollbacks
+ if sdpType == SDPTypeRollback && cur == SignalingStateStable {
+ return cur, &rtcerr.InvalidModificationError{
+ Err: errSignalingStateCannotRollback,
+ }
+ }
+
+ // 4.3.1 valid state transitions
+ switch cur { // nolint:exhaustive
+ case SignalingStateStable:
+ switch op {
+ case stateChangeOpSetLocal:
+ // stable->SetLocal(offer)->have-local-offer
+ if sdpType == SDPTypeOffer && next == SignalingStateHaveLocalOffer {
+ return next, nil
+ }
+ case stateChangeOpSetRemote:
+ // stable->SetRemote(offer)->have-remote-offer
+ if sdpType == SDPTypeOffer && next == SignalingStateHaveRemoteOffer {
+ return next, nil
+ }
+ }
+ case SignalingStateHaveLocalOffer:
+ if op == stateChangeOpSetRemote {
+ switch sdpType { // nolint:exhaustive
+ // have-local-offer->SetRemote(answer)->stable
+ case SDPTypeAnswer:
+ if next == SignalingStateStable {
+ return next, nil
+ }
+ // have-local-offer->SetRemote(pranswer)->have-remote-pranswer
+ case SDPTypePranswer:
+ if next == SignalingStateHaveRemotePranswer {
+ return next, nil
+ }
+ }
+ }
+ case SignalingStateHaveRemotePranswer:
+ if op == stateChangeOpSetRemote && sdpType == SDPTypeAnswer {
+ // have-remote-pranswer->SetRemote(answer)->stable
+ if next == SignalingStateStable {
+ return next, nil
+ }
+ }
+ case SignalingStateHaveRemoteOffer:
+ if op == stateChangeOpSetLocal {
+ switch sdpType { // nolint:exhaustive
+ // have-remote-offer->SetLocal(answer)->stable
+ case SDPTypeAnswer:
+ if next == SignalingStateStable {
+ return next, nil
+ }
+ // have-remote-offer->SetLocal(pranswer)->have-local-pranswer
+ case SDPTypePranswer:
+ if next == SignalingStateHaveLocalPranswer {
+ return next, nil
+ }
+ }
+ }
+ case SignalingStateHaveLocalPranswer:
+ if op == stateChangeOpSetLocal && sdpType == SDPTypeAnswer {
+ // have-local-pranswer->SetLocal(answer)->stable
+ if next == SignalingStateStable {
+ return next, nil
+ }
+ }
+ }
+ return cur, &rtcerr.InvalidModificationError{
+ Err: fmt.Errorf("%w: %s->%s(%s)->%s", errSignalingStateProposedTransitionInvalid, cur, op, sdpType, next),
+ }
+}
diff --git a/vendor/github.com/pion/webrtc/v3/srtp_writer_future.go b/vendor/github.com/pion/webrtc/v3/srtp_writer_future.go
new file mode 100644
index 0000000..4d8bafe
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/srtp_writer_future.go
@@ -0,0 +1,118 @@
+// +build !js
+
+package webrtc
+
+import (
+ "io"
+ "sync/atomic"
+ "time"
+
+ "github.com/pion/rtp"
+ "github.com/pion/srtp/v2"
+)
+
+// srtpWriterFuture blocks Read/Write calls until
+// the SRTP Session is available
+type srtpWriterFuture struct {
+ rtpSender *RTPSender
+ rtcpReadStream atomic.Value // *srtp.ReadStreamSRTCP
+ rtpWriteStream atomic.Value // *srtp.WriteStreamSRTP
+}
+
+func (s *srtpWriterFuture) init(returnWhenNoSRTP bool) error {
+ if returnWhenNoSRTP {
+ select {
+ case <-s.rtpSender.stopCalled:
+ return io.ErrClosedPipe
+ case <-s.rtpSender.transport.srtpReady:
+ default:
+ return nil
+ }
+ } else {
+ select {
+ case <-s.rtpSender.stopCalled:
+ return io.ErrClosedPipe
+ case <-s.rtpSender.transport.srtpReady:
+ }
+ }
+
+ srtcpSession, err := s.rtpSender.transport.getSRTCPSession()
+ if err != nil {
+ return err
+ }
+
+ rtcpReadStream, err := srtcpSession.OpenReadStream(uint32(s.rtpSender.ssrc))
+ if err != nil {
+ return err
+ }
+
+ srtpSession, err := s.rtpSender.transport.getSRTPSession()
+ if err != nil {
+ return err
+ }
+
+ rtpWriteStream, err := srtpSession.OpenWriteStream()
+ if err != nil {
+ return err
+ }
+
+ s.rtcpReadStream.Store(rtcpReadStream)
+ s.rtpWriteStream.Store(rtpWriteStream)
+ return nil
+}
+
+func (s *srtpWriterFuture) Close() error {
+ if value := s.rtcpReadStream.Load(); value != nil {
+ return value.(*srtp.ReadStreamSRTCP).Close()
+ }
+
+ return nil
+}
+
+func (s *srtpWriterFuture) Read(b []byte) (n int, err error) {
+ if value := s.rtcpReadStream.Load(); value != nil {
+ return value.(*srtp.ReadStreamSRTCP).Read(b)
+ }
+
+ if err := s.init(false); err != nil || s.rtcpReadStream.Load() == nil {
+ return 0, err
+ }
+
+ return s.Read(b)
+}
+
+func (s *srtpWriterFuture) SetReadDeadline(t time.Time) error {
+ if value := s.rtcpReadStream.Load(); value != nil {
+ return value.(*srtp.ReadStreamSRTCP).SetReadDeadline(t)
+ }
+
+ if err := s.init(false); err != nil || s.rtcpReadStream.Load() == nil {
+ return err
+ }
+
+ return s.SetReadDeadline(t)
+}
+
+func (s *srtpWriterFuture) WriteRTP(header *rtp.Header, payload []byte) (int, error) {
+ if value := s.rtpWriteStream.Load(); value != nil {
+ return value.(*srtp.WriteStreamSRTP).WriteRTP(header, payload)
+ }
+
+ if err := s.init(true); err != nil || s.rtpWriteStream.Load() == nil {
+ return 0, err
+ }
+
+ return s.WriteRTP(header, payload)
+}
+
+func (s *srtpWriterFuture) Write(b []byte) (int, error) {
+ if value := s.rtpWriteStream.Load(); value != nil {
+ return value.(*srtp.WriteStreamSRTP).Write(b)
+ }
+
+ if err := s.init(true); err != nil || s.rtpWriteStream.Load() == nil {
+ return 0, err
+ }
+
+ return s.Write(b)
+}
diff --git a/vendor/github.com/pion/webrtc/v3/stats.go b/vendor/github.com/pion/webrtc/v3/stats.go
new file mode 100644
index 0000000..a218d9e
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/stats.go
@@ -0,0 +1,1452 @@
+package webrtc
+
+import (
+ "fmt"
+ "sync"
+ "time"
+
+ "github.com/pion/ice/v2"
+)
+
+// A Stats object contains a set of statistics copies out of a monitored component
+// of the WebRTC stack at a specific time.
+type Stats interface{}
+
+// StatsType indicates the type of the object that a Stats object represents.
+type StatsType string
+
+const (
+ // StatsTypeCodec is used by CodecStats.
+ StatsTypeCodec StatsType = "codec"
+
+ // StatsTypeInboundRTP is used by InboundRTPStreamStats.
+ StatsTypeInboundRTP StatsType = "inbound-rtp"
+
+ // StatsTypeOutboundRTP is used by OutboundRTPStreamStats.
+ StatsTypeOutboundRTP StatsType = "outbound-rtp"
+
+ // StatsTypeRemoteInboundRTP is used by RemoteInboundRTPStreamStats.
+ StatsTypeRemoteInboundRTP StatsType = "remote-inbound-rtp"
+
+ // StatsTypeRemoteOutboundRTP is used by RemoteOutboundRTPStreamStats.
+ StatsTypeRemoteOutboundRTP StatsType = "remote-outbound-rtp"
+
+ // StatsTypeCSRC is used by RTPContributingSourceStats.
+ StatsTypeCSRC StatsType = "csrc"
+
+ // StatsTypePeerConnection used by PeerConnectionStats.
+ StatsTypePeerConnection StatsType = "peer-connection"
+
+ // StatsTypeDataChannel is used by DataChannelStats.
+ StatsTypeDataChannel StatsType = "data-channel"
+
+ // StatsTypeStream is used by MediaStreamStats.
+ StatsTypeStream StatsType = "stream"
+
+ // StatsTypeTrack is used by SenderVideoTrackAttachmentStats and SenderAudioTrackAttachmentStats.
+ StatsTypeTrack StatsType = "track"
+
+ // StatsTypeSender is used by by the AudioSenderStats or VideoSenderStats depending on kind.
+ StatsTypeSender StatsType = "sender"
+
+ // StatsTypeReceiver is used by the AudioReceiverStats or VideoReceiverStats depending on kind.
+ StatsTypeReceiver StatsType = "receiver"
+
+ // StatsTypeTransport is used by TransportStats.
+ StatsTypeTransport StatsType = "transport"
+
+ // StatsTypeCandidatePair is used by ICECandidatePairStats.
+ StatsTypeCandidatePair StatsType = "candidate-pair"
+
+ // StatsTypeLocalCandidate is used by ICECandidateStats for the local candidate.
+ StatsTypeLocalCandidate StatsType = "local-candidate"
+
+ // StatsTypeRemoteCandidate is used by ICECandidateStats for the remote candidate.
+ StatsTypeRemoteCandidate StatsType = "remote-candidate"
+
+ // StatsTypeCertificate is used by CertificateStats.
+ StatsTypeCertificate StatsType = "certificate"
+)
+
+// StatsTimestamp is a timestamp represented by the floating point number of
+// milliseconds since the epoch.
+type StatsTimestamp float64
+
+// Time returns the time.Time represented by this timestamp.
+func (s StatsTimestamp) Time() time.Time {
+ millis := float64(s)
+ nanos := int64(millis * float64(time.Millisecond))
+
+ return time.Unix(0, nanos).UTC()
+}
+
+func statsTimestampFrom(t time.Time) StatsTimestamp {
+ return StatsTimestamp(t.UnixNano() / int64(time.Millisecond))
+}
+
+func statsTimestampNow() StatsTimestamp {
+ return statsTimestampFrom(time.Now())
+}
+
+// StatsReport collects Stats objects indexed by their ID.
+type StatsReport map[string]Stats
+
+type statsReportCollector struct {
+ collectingGroup sync.WaitGroup
+ report StatsReport
+ mux sync.Mutex
+}
+
+func newStatsReportCollector() *statsReportCollector {
+ return &statsReportCollector{report: make(StatsReport)}
+}
+
+func (src *statsReportCollector) Collecting() {
+ src.collectingGroup.Add(1)
+}
+
+func (src *statsReportCollector) Collect(id string, stats Stats) {
+ src.mux.Lock()
+ defer src.mux.Unlock()
+
+ src.report[id] = stats
+ src.collectingGroup.Done()
+}
+
+func (src *statsReportCollector) Done() {
+ src.collectingGroup.Done()
+}
+
+func (src *statsReportCollector) Ready() StatsReport {
+ src.collectingGroup.Wait()
+ src.mux.Lock()
+ defer src.mux.Unlock()
+ return src.report
+}
+
+// CodecType specifies whether a CodecStats objects represents a media format
+// that is being encoded or decoded
+type CodecType string
+
+const (
+ // CodecTypeEncode means the attached CodecStats represents a media format that
+ // is being encoded, or that the implementation is prepared to encode.
+ CodecTypeEncode CodecType = "encode"
+
+ // CodecTypeDecode means the attached CodecStats represents a media format
+ // that the implementation is prepared to decode.
+ CodecTypeDecode CodecType = "decode"
+)
+
+// CodecStats contains statistics for a codec that is currently being used by RTP streams
+// being sent or received by this PeerConnection object.
+type CodecStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // PayloadType as used in RTP encoding or decoding
+ PayloadType PayloadType `json:"payloadType"`
+
+ // CodecType of this CodecStats
+ CodecType CodecType `json:"codecType"`
+
+ // TransportID is the unique identifier of the transport on which this codec is
+ // being used, which can be used to look up the corresponding TransportStats object.
+ TransportID string `json:"transportId"`
+
+ // MimeType is the codec MIME media type/subtype. e.g., video/vp8 or equivalent.
+ MimeType string `json:"mimeType"`
+
+ // ClockRate represents the media sampling rate.
+ ClockRate uint32 `json:"clockRate"`
+
+ // Channels is 2 for stereo, missing for most other cases.
+ Channels uint8 `json:"channels"`
+
+ // SDPFmtpLine is the a=fmtp line in the SDP corresponding to the codec,
+ // i.e., after the colon following the PT.
+ SDPFmtpLine string `json:"sdpFmtpLine"`
+
+ // Implementation identifies the implementation used. This is useful for diagnosing
+ // interoperability issues.
+ Implementation string `json:"implementation"`
+}
+
+// InboundRTPStreamStats contains statistics for an inbound RTP stream that is
+// currently received with this PeerConnection object.
+type InboundRTPStreamStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // SSRC is the 32-bit unsigned integer value used to identify the source of the
+ // stream of RTP packets that this stats object concerns.
+ SSRC SSRC `json:"ssrc"`
+
+ // Kind is either "audio" or "video"
+ Kind string `json:"kind"`
+
+ // It is a unique identifier that is associated to the object that was inspected
+ // to produce the TransportStats associated with this RTP stream.
+ TransportID string `json:"transportId"`
+
+ // CodecID is a unique identifier that is associated to the object that was inspected
+ // to produce the CodecStats associated with this RTP stream.
+ CodecID string `json:"codecId"`
+
+ // FIRCount counts the total number of Full Intra Request (FIR) packets received
+ // by the sender. This metric is only valid for video and is sent by receiver.
+ FIRCount uint32 `json:"firCount"`
+
+ // PLICount counts the total number of Picture Loss Indication (PLI) packets
+ // received by the sender. This metric is only valid for video and is sent by receiver.
+ PLICount uint32 `json:"pliCount"`
+
+ // NACKCount counts the total number of Negative ACKnowledgement (NACK) packets
+ // received by the sender and is sent by receiver.
+ NACKCount uint32 `json:"nackCount"`
+
+ // SLICount counts the total number of Slice Loss Indication (SLI) packets received
+ // by the sender. This metric is only valid for video and is sent by receiver.
+ SLICount uint32 `json:"sliCount"`
+
+ // QPSum is the sum of the QP values of frames passed. The count of frames is
+ // in FramesDecoded for inbound stream stats, and in FramesEncoded for outbound stream stats.
+ QPSum uint64 `json:"qpSum"`
+
+ // PacketsReceived is the total number of RTP packets received for this SSRC.
+ PacketsReceived uint32 `json:"packetsReceived"`
+
+ // PacketsLost is the total number of RTP packets lost for this SSRC. Note that
+ // because of how this is estimated, it can be negative if more packets are received than sent.
+ PacketsLost int32 `json:"packetsLost"`
+
+ // Jitter is the packet jitter measured in seconds for this SSRC
+ Jitter float64 `json:"jitter"`
+
+ // PacketsDiscarded is the cumulative number of RTP packets discarded by the jitter
+ // buffer due to late or early-arrival, i.e., these packets are not played out.
+ // RTP packets discarded due to packet duplication are not reported in this metric.
+ PacketsDiscarded uint32 `json:"packetsDiscarded"`
+
+ // PacketsRepaired is the cumulative number of lost RTP packets repaired after applying
+ // an error-resilience mechanism. It is measured for the primary source RTP packets
+ // and only counted for RTP packets that have no further chance of repair.
+ PacketsRepaired uint32 `json:"packetsRepaired"`
+
+ // BurstPacketsLost is the cumulative number of RTP packets lost during loss bursts.
+ BurstPacketsLost uint32 `json:"burstPacketsLost"`
+
+ // BurstPacketsDiscarded is the cumulative number of RTP packets discarded during discard bursts.
+ BurstPacketsDiscarded uint32 `json:"burstPacketsDiscarded"`
+
+ // BurstLossCount is the cumulative number of bursts of lost RTP packets.
+ BurstLossCount uint32 `json:"burstLossCount"`
+
+ // BurstDiscardCount is the cumulative number of bursts of discarded RTP packets.
+ BurstDiscardCount uint32 `json:"burstDiscardCount"`
+
+ // BurstLossRate is the fraction of RTP packets lost during bursts to the
+ // total number of RTP packets expected in the bursts.
+ BurstLossRate float64 `json:"burstLossRate"`
+
+ // BurstDiscardRate is the fraction of RTP packets discarded during bursts to
+ // the total number of RTP packets expected in bursts.
+ BurstDiscardRate float64 `json:"burstDiscardRate"`
+
+ // GapLossRate is the fraction of RTP packets lost during the gap periods.
+ GapLossRate float64 `json:"gapLossRate"`
+
+ // GapDiscardRate is the fraction of RTP packets discarded during the gap periods.
+ GapDiscardRate float64 `json:"gapDiscardRate"`
+
+ // TrackID is the identifier of the stats object representing the receiving track,
+ // a ReceiverAudioTrackAttachmentStats or ReceiverVideoTrackAttachmentStats.
+ TrackID string `json:"trackId"`
+
+ // ReceiverID is the stats ID used to look up the AudioReceiverStats or VideoReceiverStats
+ // object receiving this stream.
+ ReceiverID string `json:"receiverId"`
+
+ // RemoteID is used for looking up the remote RemoteOutboundRTPStreamStats object
+ // for the same SSRC.
+ RemoteID string `json:"remoteId"`
+
+ // FramesDecoded represents the total number of frames correctly decoded for this SSRC,
+ // i.e., frames that would be displayed if no frames are dropped. Only valid for video.
+ FramesDecoded uint32 `json:"framesDecoded"`
+
+ // LastPacketReceivedTimestamp represents the timestamp at which the last packet was
+ // received for this SSRC. This differs from Timestamp, which represents the time
+ // at which the statistics were generated by the local endpoint.
+ LastPacketReceivedTimestamp StatsTimestamp `json:"lastPacketReceivedTimestamp"`
+
+ // AverageRTCPInterval is the average RTCP interval between two consecutive compound RTCP packets.
+ // This is calculated by the sending endpoint when sending compound RTCP reports.
+ // Compound packets must contain at least a RTCP RR or SR packet and an SDES packet
+ // with the CNAME item.
+ AverageRTCPInterval float64 `json:"averageRtcpInterval"`
+
+ // FECPacketsReceived is the total number of RTP FEC packets received for this SSRC.
+ // This counter can also be incremented when receiving FEC packets in-band with media packets (e.g., with Opus).
+ FECPacketsReceived uint32 `json:"fecPacketsReceived"`
+
+ // BytesReceived is the total number of bytes received for this SSRC.
+ BytesReceived uint64 `json:"bytesReceived"`
+
+ // PacketsFailedDecryption is the cumulative number of RTP packets that failed
+ // to be decrypted. These packets are not counted by PacketsDiscarded.
+ PacketsFailedDecryption uint32 `json:"packetsFailedDecryption"`
+
+ // PacketsDuplicated is the cumulative number of packets discarded because they
+ // are duplicated. Duplicate packets are not counted in PacketsDiscarded.
+ //
+ // Duplicated packets have the same RTP sequence number and content as a previously
+ // received packet. If multiple duplicates of a packet are received, all of them are counted.
+ // An improved estimate of lost packets can be calculated by adding PacketsDuplicated to PacketsLost.
+ PacketsDuplicated uint32 `json:"packetsDuplicated"`
+
+ // PerDSCPPacketsReceived is the total number of packets received for this SSRC,
+ // per Differentiated Services code point (DSCP) [RFC2474]. DSCPs are identified
+ // as decimal integers in string form. Note that due to network remapping and bleaching,
+ // these numbers are not expected to match the numbers seen on sending. Not all
+ // OSes make this information available.
+ PerDSCPPacketsReceived map[string]uint32 `json:"perDscpPacketsReceived"`
+}
+
+// QualityLimitationReason lists the reason for limiting the resolution and/or framerate.
+// Only valid for video.
+type QualityLimitationReason string
+
+const (
+ // QualityLimitationReasonNone means the resolution and/or framerate is not limited.
+ QualityLimitationReasonNone QualityLimitationReason = "none"
+
+ // QualityLimitationReasonCPU means the resolution and/or framerate is primarily limited due to CPU load.
+ QualityLimitationReasonCPU QualityLimitationReason = "cpu"
+
+ // QualityLimitationReasonBandwidth means the resolution and/or framerate is primarily limited due to congestion cues during bandwidth estimation. Typical, congestion control algorithms use inter-arrival time, round-trip time, packet or other congestion cues to perform bandwidth estimation.
+ QualityLimitationReasonBandwidth QualityLimitationReason = "bandwidth"
+
+ // QualityLimitationReasonOther means the resolution and/or framerate is primarily limited for a reason other than the above.
+ QualityLimitationReasonOther QualityLimitationReason = "other"
+)
+
+// OutboundRTPStreamStats contains statistics for an outbound RTP stream that is
+// currently sent with this PeerConnection object.
+type OutboundRTPStreamStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // SSRC is the 32-bit unsigned integer value used to identify the source of the
+ // stream of RTP packets that this stats object concerns.
+ SSRC SSRC `json:"ssrc"`
+
+ // Kind is either "audio" or "video"
+ Kind string `json:"kind"`
+
+ // It is a unique identifier that is associated to the object that was inspected
+ // to produce the TransportStats associated with this RTP stream.
+ TransportID string `json:"transportId"`
+
+ // CodecID is a unique identifier that is associated to the object that was inspected
+ // to produce the CodecStats associated with this RTP stream.
+ CodecID string `json:"codecId"`
+
+ // FIRCount counts the total number of Full Intra Request (FIR) packets received
+ // by the sender. This metric is only valid for video and is sent by receiver.
+ FIRCount uint32 `json:"firCount"`
+
+ // PLICount counts the total number of Picture Loss Indication (PLI) packets
+ // received by the sender. This metric is only valid for video and is sent by receiver.
+ PLICount uint32 `json:"pliCount"`
+
+ // NACKCount counts the total number of Negative ACKnowledgement (NACK) packets
+ // received by the sender and is sent by receiver.
+ NACKCount uint32 `json:"nackCount"`
+
+ // SLICount counts the total number of Slice Loss Indication (SLI) packets received
+ // by the sender. This metric is only valid for video and is sent by receiver.
+ SLICount uint32 `json:"sliCount"`
+
+ // QPSum is the sum of the QP values of frames passed. The count of frames is
+ // in FramesDecoded for inbound stream stats, and in FramesEncoded for outbound stream stats.
+ QPSum uint64 `json:"qpSum"`
+
+ // PacketsSent is the total number of RTP packets sent for this SSRC.
+ PacketsSent uint32 `json:"packetsSent"`
+
+ // PacketsDiscardedOnSend is the total number of RTP packets for this SSRC that
+ // have been discarded due to socket errors, i.e. a socket error occurred when handing
+ // the packets to the socket. This might happen due to various reasons, including
+ // full buffer or no available memory.
+ PacketsDiscardedOnSend uint32 `json:"packetsDiscardedOnSend"`
+
+ // FECPacketsSent is the total number of RTP FEC packets sent for this SSRC.
+ // This counter can also be incremented when sending FEC packets in-band with
+ // media packets (e.g., with Opus).
+ FECPacketsSent uint32 `json:"fecPacketsSent"`
+
+ // BytesSent is the total number of bytes sent for this SSRC.
+ BytesSent uint64 `json:"bytesSent"`
+
+ // BytesDiscardedOnSend is the total number of bytes for this SSRC that have
+ // been discarded due to socket errors, i.e. a socket error occurred when handing
+ // the packets containing the bytes to the socket. This might happen due to various
+ // reasons, including full buffer or no available memory.
+ BytesDiscardedOnSend uint64 `json:"bytesDiscardedOnSend"`
+
+ // TrackID is the identifier of the stats object representing the current track
+ // attachment to the sender of this stream, a SenderAudioTrackAttachmentStats
+ // or SenderVideoTrackAttachmentStats.
+ TrackID string `json:"trackId"`
+
+ // SenderID is the stats ID used to look up the AudioSenderStats or VideoSenderStats
+ // object sending this stream.
+ SenderID string `json:"senderId"`
+
+ // RemoteID is used for looking up the remote RemoteInboundRTPStreamStats object
+ // for the same SSRC.
+ RemoteID string `json:"remoteId"`
+
+ // LastPacketSentTimestamp represents the timestamp at which the last packet was
+ // sent for this SSRC. This differs from timestamp, which represents the time at
+ // which the statistics were generated by the local endpoint.
+ LastPacketSentTimestamp StatsTimestamp `json:"lastPacketSentTimestamp"`
+
+ // TargetBitrate is the current target bitrate configured for this particular SSRC
+ // and is the Transport Independent Application Specific (TIAS) bitrate [RFC3890].
+ // Typically, the target bitrate is a configuration parameter provided to the codec's
+ // encoder and does not count the size of the IP or other transport layers like TCP or UDP.
+ // It is measured in bits per second and the bitrate is calculated over a 1 second window.
+ TargetBitrate float64 `json:"targetBitrate"`
+
+ // FramesEncoded represents the total number of frames successfully encoded for this RTP media stream.
+ // Only valid for video.
+ FramesEncoded uint32 `json:"framesEncoded"`
+
+ // TotalEncodeTime is the total number of seconds that has been spent encoding the
+ // framesEncoded frames of this stream. The average encode time can be calculated by
+ // dividing this value with FramesEncoded. The time it takes to encode one frame is the
+ // time passed between feeding the encoder a frame and the encoder returning encoded data
+ // for that frame. This does not include any additional time it may take to packetize the resulting data.
+ TotalEncodeTime float64 `json:"totalEncodeTime"`
+
+ // AverageRTCPInterval is the average RTCP interval between two consecutive compound RTCP
+ // packets. This is calculated by the sending endpoint when sending compound RTCP reports.
+ // Compound packets must contain at least a RTCP RR or SR packet and an SDES packet with the CNAME item.
+ AverageRTCPInterval float64 `json:"averageRtcpInterval"`
+
+ // QualityLimitationReason is the current reason for limiting the resolution and/or framerate,
+ // or "none" if not limited. Only valid for video.
+ QualityLimitationReason QualityLimitationReason `json:"qualityLimitationReason"`
+
+ // QualityLimitationDurations is record of the total time, in seconds, that this
+ // stream has spent in each quality limitation state. The record includes a mapping
+ // for all QualityLimitationReason types, including "none". Only valid for video.
+ QualityLimitationDurations map[string]float64 `json:"qualityLimitationDurations"`
+
+ // PerDSCPPacketsSent is the total number of packets sent for this SSRC, per DSCP.
+ // DSCPs are identified as decimal integers in string form.
+ PerDSCPPacketsSent map[string]uint32 `json:"perDscpPacketsSent"`
+}
+
+// RemoteInboundRTPStreamStats contains statistics for the remote endpoint's inbound
+// RTP stream corresponding to an outbound stream that is currently sent with this
+// PeerConnection object. It is measured at the remote endpoint and reported in an RTCP
+// Receiver Report (RR) or RTCP Extended Report (XR).
+type RemoteInboundRTPStreamStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // SSRC is the 32-bit unsigned integer value used to identify the source of the
+ // stream of RTP packets that this stats object concerns.
+ SSRC SSRC `json:"ssrc"`
+
+ // Kind is either "audio" or "video"
+ Kind string `json:"kind"`
+
+ // It is a unique identifier that is associated to the object that was inspected
+ // to produce the TransportStats associated with this RTP stream.
+ TransportID string `json:"transportId"`
+
+ // CodecID is a unique identifier that is associated to the object that was inspected
+ // to produce the CodecStats associated with this RTP stream.
+ CodecID string `json:"codecId"`
+
+ // FIRCount counts the total number of Full Intra Request (FIR) packets received
+ // by the sender. This metric is only valid for video and is sent by receiver.
+ FIRCount uint32 `json:"firCount"`
+
+ // PLICount counts the total number of Picture Loss Indication (PLI) packets
+ // received by the sender. This metric is only valid for video and is sent by receiver.
+ PLICount uint32 `json:"pliCount"`
+
+ // NACKCount counts the total number of Negative ACKnowledgement (NACK) packets
+ // received by the sender and is sent by receiver.
+ NACKCount uint32 `json:"nackCount"`
+
+ // SLICount counts the total number of Slice Loss Indication (SLI) packets received
+ // by the sender. This metric is only valid for video and is sent by receiver.
+ SLICount uint32 `json:"sliCount"`
+
+ // QPSum is the sum of the QP values of frames passed. The count of frames is
+ // in FramesDecoded for inbound stream stats, and in FramesEncoded for outbound stream stats.
+ QPSum uint64 `json:"qpSum"`
+
+ // PacketsReceived is the total number of RTP packets received for this SSRC.
+ PacketsReceived uint32 `json:"packetsReceived"`
+
+ // PacketsLost is the total number of RTP packets lost for this SSRC. Note that
+ // because of how this is estimated, it can be negative if more packets are received than sent.
+ PacketsLost int32 `json:"packetsLost"`
+
+ // Jitter is the packet jitter measured in seconds for this SSRC
+ Jitter float64 `json:"jitter"`
+
+ // PacketsDiscarded is the cumulative number of RTP packets discarded by the jitter
+ // buffer due to late or early-arrival, i.e., these packets are not played out.
+ // RTP packets discarded due to packet duplication are not reported in this metric.
+ PacketsDiscarded uint32 `json:"packetsDiscarded"`
+
+ // PacketsRepaired is the cumulative number of lost RTP packets repaired after applying
+ // an error-resilience mechanism. It is measured for the primary source RTP packets
+ // and only counted for RTP packets that have no further chance of repair.
+ PacketsRepaired uint32 `json:"packetsRepaired"`
+
+ // BurstPacketsLost is the cumulative number of RTP packets lost during loss bursts.
+ BurstPacketsLost uint32 `json:"burstPacketsLost"`
+
+ // BurstPacketsDiscarded is the cumulative number of RTP packets discarded during discard bursts.
+ BurstPacketsDiscarded uint32 `json:"burstPacketsDiscarded"`
+
+ // BurstLossCount is the cumulative number of bursts of lost RTP packets.
+ BurstLossCount uint32 `json:"burstLossCount"`
+
+ // BurstDiscardCount is the cumulative number of bursts of discarded RTP packets.
+ BurstDiscardCount uint32 `json:"burstDiscardCount"`
+
+ // BurstLossRate is the fraction of RTP packets lost during bursts to the
+ // total number of RTP packets expected in the bursts.
+ BurstLossRate float64 `json:"burstLossRate"`
+
+ // BurstDiscardRate is the fraction of RTP packets discarded during bursts to
+ // the total number of RTP packets expected in bursts.
+ BurstDiscardRate float64 `json:"burstDiscardRate"`
+
+ // GapLossRate is the fraction of RTP packets lost during the gap periods.
+ GapLossRate float64 `json:"gapLossRate"`
+
+ // GapDiscardRate is the fraction of RTP packets discarded during the gap periods.
+ GapDiscardRate float64 `json:"gapDiscardRate"`
+
+ // LocalID is used for looking up the local OutboundRTPStreamStats object for the same SSRC.
+ LocalID string `json:"localId"`
+
+ // RoundTripTime is the estimated round trip time for this SSRC based on the
+ // RTCP timestamps in the RTCP Receiver Report (RR) and measured in seconds.
+ RoundTripTime float64 `json:"roundTripTime"`
+
+ // FractionLost is the the fraction packet loss reported for this SSRC.
+ FractionLost float64 `json:"fractionLost"`
+}
+
+// RemoteOutboundRTPStreamStats contains statistics for the remote endpoint's outbound
+// RTP stream corresponding to an inbound stream that is currently received with this
+// PeerConnection object. It is measured at the remote endpoint and reported in an
+// RTCP Sender Report (SR).
+type RemoteOutboundRTPStreamStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // SSRC is the 32-bit unsigned integer value used to identify the source of the
+ // stream of RTP packets that this stats object concerns.
+ SSRC SSRC `json:"ssrc"`
+
+ // Kind is either "audio" or "video"
+ Kind string `json:"kind"`
+
+ // It is a unique identifier that is associated to the object that was inspected
+ // to produce the TransportStats associated with this RTP stream.
+ TransportID string `json:"transportId"`
+
+ // CodecID is a unique identifier that is associated to the object that was inspected
+ // to produce the CodecStats associated with this RTP stream.
+ CodecID string `json:"codecId"`
+
+ // FIRCount counts the total number of Full Intra Request (FIR) packets received
+ // by the sender. This metric is only valid for video and is sent by receiver.
+ FIRCount uint32 `json:"firCount"`
+
+ // PLICount counts the total number of Picture Loss Indication (PLI) packets
+ // received by the sender. This metric is only valid for video and is sent by receiver.
+ PLICount uint32 `json:"pliCount"`
+
+ // NACKCount counts the total number of Negative ACKnowledgement (NACK) packets
+ // received by the sender and is sent by receiver.
+ NACKCount uint32 `json:"nackCount"`
+
+ // SLICount counts the total number of Slice Loss Indication (SLI) packets received
+ // by the sender. This metric is only valid for video and is sent by receiver.
+ SLICount uint32 `json:"sliCount"`
+
+ // QPSum is the sum of the QP values of frames passed. The count of frames is
+ // in FramesDecoded for inbound stream stats, and in FramesEncoded for outbound stream stats.
+ QPSum uint64 `json:"qpSum"`
+
+ // PacketsSent is the total number of RTP packets sent for this SSRC.
+ PacketsSent uint32 `json:"packetsSent"`
+
+ // PacketsDiscardedOnSend is the total number of RTP packets for this SSRC that
+ // have been discarded due to socket errors, i.e. a socket error occurred when handing
+ // the packets to the socket. This might happen due to various reasons, including
+ // full buffer or no available memory.
+ PacketsDiscardedOnSend uint32 `json:"packetsDiscardedOnSend"`
+
+ // FECPacketsSent is the total number of RTP FEC packets sent for this SSRC.
+ // This counter can also be incremented when sending FEC packets in-band with
+ // media packets (e.g., with Opus).
+ FECPacketsSent uint32 `json:"fecPacketsSent"`
+
+ // BytesSent is the total number of bytes sent for this SSRC.
+ BytesSent uint64 `json:"bytesSent"`
+
+ // BytesDiscardedOnSend is the total number of bytes for this SSRC that have
+ // been discarded due to socket errors, i.e. a socket error occurred when handing
+ // the packets containing the bytes to the socket. This might happen due to various
+ // reasons, including full buffer or no available memory.
+ BytesDiscardedOnSend uint64 `json:"bytesDiscardedOnSend"`
+
+ // LocalID is used for looking up the local InboundRTPStreamStats object for the same SSRC.
+ LocalID string `json:"localId"`
+
+ // RemoteTimestamp represents the remote timestamp at which these statistics were
+ // sent by the remote endpoint. This differs from timestamp, which represents the
+ // time at which the statistics were generated or received by the local endpoint.
+ // The RemoteTimestamp, if present, is derived from the NTP timestamp in an RTCP
+ // Sender Report (SR) packet, which reflects the remote endpoint's clock.
+ // That clock may not be synchronized with the local clock.
+ RemoteTimestamp StatsTimestamp `json:"remoteTimestamp"`
+}
+
+// RTPContributingSourceStats contains statistics for a contributing source (CSRC) that contributed
+// to an inbound RTP stream.
+type RTPContributingSourceStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // ContributorSSRC is the SSRC identifier of the contributing source represented
+ // by this stats object. It is a 32-bit unsigned integer that appears in the CSRC
+ // list of any packets the relevant source contributed to.
+ ContributorSSRC SSRC `json:"contributorSsrc"`
+
+ // InboundRTPStreamID is the ID of the InboundRTPStreamStats object representing
+ // the inbound RTP stream that this contributing source is contributing to.
+ InboundRTPStreamID string `json:"inboundRtpStreamId"`
+
+ // PacketsContributedTo is the total number of RTP packets that this contributing
+ // source contributed to. This value is incremented each time a packet is counted
+ // by InboundRTPStreamStats.packetsReceived, and the packet's CSRC list contains
+ // the SSRC identifier of this contributing source, ContributorSSRC.
+ PacketsContributedTo uint32 `json:"packetsContributedTo"`
+
+ // AudioLevel is present if the last received RTP packet that this source contributed
+ // to contained an [RFC6465] mixer-to-client audio level header extension. The value
+ // of audioLevel is between 0..1 (linear), where 1.0 represents 0 dBov, 0 represents
+ // silence, and 0.5 represents approximately 6 dBSPL change in the sound pressure level from 0 dBov.
+ AudioLevel float64 `json:"audioLevel"`
+}
+
+// PeerConnectionStats contains statistics related to the PeerConnection object.
+type PeerConnectionStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // DataChannelsOpened represents the number of unique DataChannels that have
+ // entered the "open" state during their lifetime.
+ DataChannelsOpened uint32 `json:"dataChannelsOpened"`
+
+ // DataChannelsClosed represents the number of unique DataChannels that have
+ // left the "open" state during their lifetime (due to being closed by either
+ // end or the underlying transport being closed). DataChannels that transition
+ // from "connecting" to "closing" or "closed" without ever being "open"
+ // are not counted in this number.
+ DataChannelsClosed uint32 `json:"dataChannelsClosed"`
+
+ // DataChannelsRequested Represents the number of unique DataChannels returned
+ // from a successful createDataChannel() call on the PeerConnection. If the
+ // underlying data transport is not established, these may be in the "connecting" state.
+ DataChannelsRequested uint32 `json:"dataChannelsRequested"`
+
+ // DataChannelsAccepted represents the number of unique DataChannels signaled
+ // in a "datachannel" event on the PeerConnection.
+ DataChannelsAccepted uint32 `json:"dataChannelsAccepted"`
+}
+
+// DataChannelStats contains statistics related to each DataChannel ID.
+type DataChannelStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // Label is the "label" value of the DataChannel object.
+ Label string `json:"label"`
+
+ // Protocol is the "protocol" value of the DataChannel object.
+ Protocol string `json:"protocol"`
+
+ // DataChannelIdentifier is the "id" attribute of the DataChannel object.
+ DataChannelIdentifier int32 `json:"dataChannelIdentifier"`
+
+ // TransportID the ID of the TransportStats object for transport used to carry this datachannel.
+ TransportID string `json:"transportId"`
+
+ // State is the "readyState" value of the DataChannel object.
+ State DataChannelState `json:"state"`
+
+ // MessagesSent represents the total number of API "message" events sent.
+ MessagesSent uint32 `json:"messagesSent"`
+
+ // BytesSent represents the total number of payload bytes sent on this
+ // datachannel not including headers or padding.
+ BytesSent uint64 `json:"bytesSent"`
+
+ // MessagesReceived represents the total number of API "message" events received.
+ MessagesReceived uint32 `json:"messagesReceived"`
+
+ // BytesReceived represents the total number of bytes received on this
+ // datachannel not including headers or padding.
+ BytesReceived uint64 `json:"bytesReceived"`
+}
+
+// MediaStreamStats contains statistics related to a specific MediaStream.
+type MediaStreamStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // StreamIdentifier is the "id" property of the MediaStream
+ StreamIdentifier string `json:"streamIdentifier"`
+
+ // TrackIDs is a list of the identifiers of the stats object representing the
+ // stream's tracks, either ReceiverAudioTrackAttachmentStats or ReceiverVideoTrackAttachmentStats.
+ TrackIDs []string `json:"trackIds"`
+}
+
+// AudioSenderStats represents the stats about one audio sender of a PeerConnection
+// object for which one calls GetStats.
+//
+// It appears in the stats as soon as the RTPSender is added by either AddTrack
+// or AddTransceiver, or by media negotiation.
+type AudioSenderStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // TrackIdentifier represents the id property of the track.
+ TrackIdentifier string `json:"trackIdentifier"`
+
+ // RemoteSource is true if the source is remote, for instance if it is sourced
+ // from another host via a PeerConnection. False otherwise. Only applicable for 'track' stats.
+ RemoteSource bool `json:"remoteSource"`
+
+ // Ended reflects the "ended" state of the track.
+ Ended bool `json:"ended"`
+
+ // Kind is either "audio" or "video". This reflects the "kind" attribute of the MediaStreamTrack.
+ Kind string `json:"kind"`
+
+ // AudioLevel represents the output audio level of the track.
+ //
+ // The value is a value between 0..1 (linear), where 1.0 represents 0 dBov,
+ // 0 represents silence, and 0.5 represents approximately 6 dBSPL change in
+ // the sound pressure level from 0 dBov.
+ //
+ // If the track is sourced from an Receiver, does no audio processing, has a
+ // constant level, and has a volume setting of 1.0, the audio level is expected
+ // to be the same as the audio level of the source SSRC, while if the volume setting
+ // is 0.5, the AudioLevel is expected to be half that value.
+ //
+ // For outgoing audio tracks, the AudioLevel is the level of the audio being sent.
+ AudioLevel float64 `json:"audioLevel"`
+
+ // TotalAudioEnergy is the total energy of all the audio samples sent/received
+ // for this object, calculated by duration * Math.pow(energy/maxEnergy, 2) for
+ // each audio sample seen.
+ TotalAudioEnergy float64 `json:"totalAudioEnergy"`
+
+ // VoiceActivityFlag represents whether the last RTP packet sent or played out
+ // by this track contained voice activity or not based on the presence of the
+ // V bit in the extension header, as defined in [RFC6464].
+ //
+ // This value indicates the voice activity in the latest RTP packet played out
+ // from a given SSRC, and is defined in RTPSynchronizationSource.voiceActivityFlag.
+ VoiceActivityFlag bool `json:"voiceActivityFlag"`
+
+ // TotalSamplesDuration represents the total duration in seconds of all samples
+ // that have sent or received (and thus counted by TotalSamplesSent or TotalSamplesReceived).
+ // Can be used with TotalAudioEnergy to compute an average audio level over different intervals.
+ TotalSamplesDuration float64 `json:"totalSamplesDuration"`
+
+ // EchoReturnLoss is only present while the sender is sending a track sourced from
+ // a microphone where echo cancellation is applied. Calculated in decibels.
+ EchoReturnLoss float64 `json:"echoReturnLoss"`
+
+ // EchoReturnLossEnhancement is only present while the sender is sending a track
+ // sourced from a microphone where echo cancellation is applied. Calculated in decibels.
+ EchoReturnLossEnhancement float64 `json:"echoReturnLossEnhancement"`
+
+ // TotalSamplesSent is the total number of samples that have been sent by this sender.
+ TotalSamplesSent uint64 `json:"totalSamplesSent"`
+}
+
+// SenderAudioTrackAttachmentStats object represents the stats about one attachment
+// of an audio MediaStreamTrack to the PeerConnection object for which one calls GetStats.
+//
+// It appears in the stats as soon as it is attached (via AddTrack, via AddTransceiver,
+// via ReplaceTrack on an RTPSender object).
+//
+// If an audio track is attached twice (via AddTransceiver or ReplaceTrack), there
+// will be two SenderAudioTrackAttachmentStats objects, one for each attachment.
+// They will have the same "TrackIdentifier" attribute, but different "ID" attributes.
+//
+// If the track is detached from the PeerConnection (via removeTrack or via replaceTrack),
+// it continues to appear, but with the "ObjectDeleted" member set to true.
+type SenderAudioTrackAttachmentStats AudioSenderStats
+
+// VideoSenderStats represents the stats about one video sender of a PeerConnection
+// object for which one calls GetStats.
+//
+// It appears in the stats as soon as the sender is added by either AddTrack or
+// AddTransceiver, or by media negotiation.
+type VideoSenderStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // FramesCaptured represents the total number of frames captured, before encoding,
+ // for this RTPSender (or for this MediaStreamTrack, if type is "track"). For example,
+ // if type is "sender" and this sender's track represents a camera, then this is the
+ // number of frames produced by the camera for this track while being sent by this sender,
+ // combined with the number of frames produced by all tracks previously attached to this
+ // sender while being sent by this sender. Framerates can vary due to hardware limitations
+ // or environmental factors such as lighting conditions.
+ FramesCaptured uint32 `json:"framesCaptured"`
+
+ // FramesSent represents the total number of frames sent by this RTPSender
+ // (or for this MediaStreamTrack, if type is "track").
+ FramesSent uint32 `json:"framesSent"`
+
+ // HugeFramesSent represents the total number of huge frames sent by this RTPSender
+ // (or for this MediaStreamTrack, if type is "track"). Huge frames, by definition,
+ // are frames that have an encoded size at least 2.5 times the average size of the frames.
+ // The average size of the frames is defined as the target bitrate per second divided
+ // by the target fps at the time the frame was encoded. These are usually complex
+ // to encode frames with a lot of changes in the picture. This can be used to estimate,
+ // e.g slide changes in the streamed presentation. If a huge frame is also a key frame,
+ // then both counters HugeFramesSent and KeyFramesSent are incremented.
+ HugeFramesSent uint32 `json:"hugeFramesSent"`
+
+ // KeyFramesSent represents the total number of key frames sent by this RTPSender
+ // (or for this MediaStreamTrack, if type is "track"), such as Infra-frames in
+ // VP8 [RFC6386] or I-frames in H.264 [RFC6184]. This is a subset of FramesSent.
+ // FramesSent - KeyFramesSent gives you the number of delta frames sent.
+ KeyFramesSent uint32 `json:"keyFramesSent"`
+}
+
+// SenderVideoTrackAttachmentStats represents the stats about one attachment of a
+// video MediaStreamTrack to the PeerConnection object for which one calls GetStats.
+//
+// It appears in the stats as soon as it is attached (via AddTrack, via AddTransceiver,
+// via ReplaceTrack on an RTPSender object).
+//
+// If a video track is attached twice (via AddTransceiver or ReplaceTrack), there
+// will be two SenderVideoTrackAttachmentStats objects, one for each attachment.
+// They will have the same "TrackIdentifier" attribute, but different "ID" attributes.
+//
+// If the track is detached from the PeerConnection (via RemoveTrack or via ReplaceTrack),
+// it continues to appear, but with the "ObjectDeleted" member set to true.
+type SenderVideoTrackAttachmentStats VideoSenderStats
+
+// AudioReceiverStats contains audio metrics related to a specific receiver.
+type AudioReceiverStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // AudioLevel represents the output audio level of the track.
+ //
+ // The value is a value between 0..1 (linear), where 1.0 represents 0 dBov,
+ // 0 represents silence, and 0.5 represents approximately 6 dBSPL change in
+ // the sound pressure level from 0 dBov.
+ //
+ // If the track is sourced from an Receiver, does no audio processing, has a
+ // constant level, and has a volume setting of 1.0, the audio level is expected
+ // to be the same as the audio level of the source SSRC, while if the volume setting
+ // is 0.5, the AudioLevel is expected to be half that value.
+ //
+ // For outgoing audio tracks, the AudioLevel is the level of the audio being sent.
+ AudioLevel float64 `json:"audioLevel"`
+
+ // TotalAudioEnergy is the total energy of all the audio samples sent/received
+ // for this object, calculated by duration * Math.pow(energy/maxEnergy, 2) for
+ // each audio sample seen.
+ TotalAudioEnergy float64 `json:"totalAudioEnergy"`
+
+ // VoiceActivityFlag represents whether the last RTP packet sent or played out
+ // by this track contained voice activity or not based on the presence of the
+ // V bit in the extension header, as defined in [RFC6464].
+ //
+ // This value indicates the voice activity in the latest RTP packet played out
+ // from a given SSRC, and is defined in RTPSynchronizationSource.voiceActivityFlag.
+ VoiceActivityFlag bool `json:"voiceActivityFlag"`
+
+ // TotalSamplesDuration represents the total duration in seconds of all samples
+ // that have sent or received (and thus counted by TotalSamplesSent or TotalSamplesReceived).
+ // Can be used with TotalAudioEnergy to compute an average audio level over different intervals.
+ TotalSamplesDuration float64 `json:"totalSamplesDuration"`
+
+ // EstimatedPlayoutTimestamp is the estimated playout time of this receiver's
+ // track. The playout time is the NTP timestamp of the last playable sample that
+ // has a known timestamp (from an RTCP SR packet mapping RTP timestamps to NTP
+ // timestamps), extrapolated with the time elapsed since it was ready to be played out.
+ // This is the "current time" of the track in NTP clock time of the sender and
+ // can be present even if there is no audio currently playing.
+ //
+ // This can be useful for estimating how much audio and video is out of
+ // sync for two tracks from the same source:
+ // AudioTrackStats.EstimatedPlayoutTimestamp - VideoTrackStats.EstimatedPlayoutTimestamp
+ EstimatedPlayoutTimestamp StatsTimestamp `json:"estimatedPlayoutTimestamp"`
+
+ // JitterBufferDelay is the sum of the time, in seconds, each sample takes from
+ // the time it is received and to the time it exits the jitter buffer.
+ // This increases upon samples exiting, having completed their time in the buffer
+ // (incrementing JitterBufferEmittedCount). The average jitter buffer delay can
+ // be calculated by dividing the JitterBufferDelay with the JitterBufferEmittedCount.
+ JitterBufferDelay float64 `json:"jitterBufferDelay"`
+
+ // JitterBufferEmittedCount is the total number of samples that have come out
+ // of the jitter buffer (increasing JitterBufferDelay).
+ JitterBufferEmittedCount uint64 `json:"jitterBufferEmittedCount"`
+
+ // TotalSamplesReceived is the total number of samples that have been received
+ // by this receiver. This includes ConcealedSamples.
+ TotalSamplesReceived uint64 `json:"totalSamplesReceived"`
+
+ // ConcealedSamples is the total number of samples that are concealed samples.
+ // A concealed sample is a sample that is based on data that was synthesized
+ // to conceal packet loss and does not represent incoming data.
+ ConcealedSamples uint64 `json:"concealedSamples"`
+
+ // ConcealmentEvents is the number of concealment events. This counter increases
+ // every time a concealed sample is synthesized after a non-concealed sample.
+ // That is, multiple consecutive concealed samples will increase the concealedSamples
+ // count multiple times but is a single concealment event.
+ ConcealmentEvents uint64 `json:"concealmentEvents"`
+}
+
+// VideoReceiverStats contains video metrics related to a specific receiver.
+type VideoReceiverStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // FrameWidth represents the width of the last processed frame for this track.
+ // Before the first frame is processed this attribute is missing.
+ FrameWidth uint32 `json:"frameWidth"`
+
+ // FrameHeight represents the height of the last processed frame for this track.
+ // Before the first frame is processed this attribute is missing.
+ FrameHeight uint32 `json:"frameHeight"`
+
+ // FramesPerSecond represents the nominal FPS value before the degradation preference
+ // is applied. It is the number of complete frames in the last second. For sending
+ // tracks it is the current captured FPS and for the receiving tracks it is the
+ // current decoding framerate.
+ FramesPerSecond float64 `json:"framesPerSecond"`
+
+ // EstimatedPlayoutTimestamp is the estimated playout time of this receiver's
+ // track. The playout time is the NTP timestamp of the last playable sample that
+ // has a known timestamp (from an RTCP SR packet mapping RTP timestamps to NTP
+ // timestamps), extrapolated with the time elapsed since it was ready to be played out.
+ // This is the "current time" of the track in NTP clock time of the sender and
+ // can be present even if there is no audio currently playing.
+ //
+ // This can be useful for estimating how much audio and video is out of
+ // sync for two tracks from the same source:
+ // AudioTrackStats.EstimatedPlayoutTimestamp - VideoTrackStats.EstimatedPlayoutTimestamp
+ EstimatedPlayoutTimestamp StatsTimestamp `json:"estimatedPlayoutTimestamp"`
+
+ // JitterBufferDelay is the sum of the time, in seconds, each sample takes from
+ // the time it is received and to the time it exits the jitter buffer.
+ // This increases upon samples exiting, having completed their time in the buffer
+ // (incrementing JitterBufferEmittedCount). The average jitter buffer delay can
+ // be calculated by dividing the JitterBufferDelay with the JitterBufferEmittedCount.
+ JitterBufferDelay float64 `json:"jitterBufferDelay"`
+
+ // JitterBufferEmittedCount is the total number of samples that have come out
+ // of the jitter buffer (increasing JitterBufferDelay).
+ JitterBufferEmittedCount uint64 `json:"jitterBufferEmittedCount"`
+
+ // FramesReceived Represents the total number of complete frames received for
+ // this receiver. This metric is incremented when the complete frame is received.
+ FramesReceived uint32 `json:"framesReceived"`
+
+ // KeyFramesReceived represents the total number of complete key frames received
+ // for this MediaStreamTrack, such as Infra-frames in VP8 [RFC6386] or I-frames
+ // in H.264 [RFC6184]. This is a subset of framesReceived. `framesReceived - keyFramesReceived`
+ // gives you the number of delta frames received. This metric is incremented when
+ // the complete key frame is received. It is not incremented if a partial key
+ // frames is received and sent for decoding, i.e., the frame could not be recovered
+ // via retransmission or FEC.
+ KeyFramesReceived uint32 `json:"keyFramesReceived"`
+
+ // FramesDecoded represents the total number of frames correctly decoded for this
+ // SSRC, i.e., frames that would be displayed if no frames are dropped.
+ FramesDecoded uint32 `json:"framesDecoded"`
+
+ // FramesDropped is the total number of frames dropped predecode or dropped
+ // because the frame missed its display deadline for this receiver's track.
+ FramesDropped uint32 `json:"framesDropped"`
+
+ // The cumulative number of partial frames lost. This metric is incremented when
+ // the frame is sent to the decoder. If the partial frame is received and recovered
+ // via retransmission or FEC before decoding, the FramesReceived counter is incremented.
+ PartialFramesLost uint32 `json:"partialFramesLost"`
+
+ // FullFramesLost is the cumulative number of full frames lost.
+ FullFramesLost uint32 `json:"fullFramesLost"`
+}
+
+// TransportStats contains transport statistics related to the PeerConnection object.
+type TransportStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // PacketsSent represents the total number of packets sent over this transport.
+ PacketsSent uint32 `json:"packetsSent"`
+
+ // PacketsReceived represents the total number of packets received on this transport.
+ PacketsReceived uint32 `json:"packetsReceived"`
+
+ // BytesSent represents the total number of payload bytes sent on this PeerConnection
+ // not including headers or padding.
+ BytesSent uint64 `json:"bytesSent"`
+
+ // BytesReceived represents the total number of bytes received on this PeerConnection
+ // not including headers or padding.
+ BytesReceived uint64 `json:"bytesReceived"`
+
+ // RTCPTransportStatsID is the ID of the transport that gives stats for the RTCP
+ // component If RTP and RTCP are not multiplexed and this record has only
+ // the RTP component stats.
+ RTCPTransportStatsID string `json:"rtcpTransportStatsId"`
+
+ // ICERole is set to the current value of the "role" attribute of the underlying
+ // DTLSTransport's "transport".
+ ICERole ICERole `json:"iceRole"`
+
+ // DTLSState is set to the current value of the "state" attribute of the underlying DTLSTransport.
+ DTLSState DTLSTransportState `json:"dtlsState"`
+
+ // SelectedCandidatePairID is a unique identifier that is associated to the object
+ // that was inspected to produce the ICECandidatePairStats associated with this transport.
+ SelectedCandidatePairID string `json:"selectedCandidatePairId"`
+
+ // LocalCertificateID is the ID of the CertificateStats for the local certificate.
+ // Present only if DTLS is negotiated.
+ LocalCertificateID string `json:"localCertificateId"`
+
+ // LocalCertificateID is the ID of the CertificateStats for the remote certificate.
+ // Present only if DTLS is negotiated.
+ RemoteCertificateID string `json:"remoteCertificateId"`
+
+ // DTLSCipher is the descriptive name of the cipher suite used for the DTLS transport,
+ // as defined in the "Description" column of the IANA cipher suite registry.
+ DTLSCipher string `json:"dtlsCipher"`
+
+ // SRTPCipher is the descriptive name of the protection profile used for the SRTP
+ // transport, as defined in the "Profile" column of the IANA DTLS-SRTP protection
+ // profile registry.
+ SRTPCipher string `json:"srtpCipher"`
+}
+
+// StatsICECandidatePairState is the state of an ICE candidate pair used in the
+// ICECandidatePairStats object.
+type StatsICECandidatePairState string
+
+func toStatsICECandidatePairState(state ice.CandidatePairState) (StatsICECandidatePairState, error) {
+ switch state {
+ case ice.CandidatePairStateWaiting:
+ return StatsICECandidatePairStateWaiting, nil
+ case ice.CandidatePairStateInProgress:
+ return StatsICECandidatePairStateInProgress, nil
+ case ice.CandidatePairStateFailed:
+ return StatsICECandidatePairStateFailed, nil
+ case ice.CandidatePairStateSucceeded:
+ return StatsICECandidatePairStateSucceeded, nil
+ default:
+ // NOTE: this should never happen[tm]
+ err := fmt.Errorf("%w: %s", errStatsICECandidateStateInvalid, state.String())
+ return StatsICECandidatePairState("Unknown"), err
+ }
+}
+
+const (
+ // StatsICECandidatePairStateFrozen means a check for this pair hasn't been
+ // performed, and it can't yet be performed until some other check succeeds,
+ // allowing this pair to unfreeze and move into the Waiting state.
+ StatsICECandidatePairStateFrozen StatsICECandidatePairState = "frozen"
+
+ // StatsICECandidatePairStateWaiting means a check has not been performed for
+ // this pair, and can be performed as soon as it is the highest-priority Waiting
+ // pair on the check list.
+ StatsICECandidatePairStateWaiting StatsICECandidatePairState = "waiting"
+
+ // StatsICECandidatePairStateInProgress means a check has been sent for this pair,
+ // but the transaction is in progress.
+ StatsICECandidatePairStateInProgress StatsICECandidatePairState = "in-progress"
+
+ // StatsICECandidatePairStateFailed means a check for this pair was already done
+ // and failed, either never producing any response or producing an unrecoverable
+ // failure response.
+ StatsICECandidatePairStateFailed StatsICECandidatePairState = "failed"
+
+ // StatsICECandidatePairStateSucceeded means a check for this pair was already
+ // done and produced a successful result.
+ StatsICECandidatePairStateSucceeded StatsICECandidatePairState = "succeeded"
+)
+
+// ICECandidatePairStats contains ICE candidate pair statistics related
+// to the ICETransport objects.
+type ICECandidatePairStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // TransportID is a unique identifier that is associated to the object that
+ // was inspected to produce the TransportStats associated with this candidate pair.
+ TransportID string `json:"transportId"`
+
+ // LocalCandidateID is a unique identifier that is associated to the object
+ // that was inspected to produce the ICECandidateStats for the local candidate
+ // associated with this candidate pair.
+ LocalCandidateID string `json:"localCandidateId"`
+
+ // RemoteCandidateID is a unique identifier that is associated to the object
+ // that was inspected to produce the ICECandidateStats for the remote candidate
+ // associated with this candidate pair.
+ RemoteCandidateID string `json:"remoteCandidateId"`
+
+ // State represents the state of the checklist for the local and remote
+ // candidates in a pair.
+ State StatsICECandidatePairState `json:"state"`
+
+ // Nominated is true when this valid pair that should be used for media
+ // if it is the highest-priority one amongst those whose nominated flag is set
+ Nominated bool `json:"nominated"`
+
+ // PacketsSent represents the total number of packets sent on this candidate pair.
+ PacketsSent uint32 `json:"packetsSent"`
+
+ // PacketsReceived represents the total number of packets received on this candidate pair.
+ PacketsReceived uint32 `json:"packetsReceived"`
+
+ // BytesSent represents the total number of payload bytes sent on this candidate pair
+ // not including headers or padding.
+ BytesSent uint64 `json:"bytesSent"`
+
+ // BytesReceived represents the total number of payload bytes received on this candidate pair
+ // not including headers or padding.
+ BytesReceived uint64 `json:"bytesReceived"`
+
+ // LastPacketSentTimestamp represents the timestamp at which the last packet was
+ // sent on this particular candidate pair, excluding STUN packets.
+ LastPacketSentTimestamp StatsTimestamp `json:"lastPacketSentTimestamp"`
+
+ // LastPacketReceivedTimestamp represents the timestamp at which the last packet
+ // was received on this particular candidate pair, excluding STUN packets.
+ LastPacketReceivedTimestamp StatsTimestamp `json:"lastPacketReceivedTimestamp"`
+
+ // FirstRequestTimestamp represents the timestamp at which the first STUN request
+ // was sent on this particular candidate pair.
+ FirstRequestTimestamp StatsTimestamp `json:"firstRequestTimestamp"`
+
+ // LastRequestTimestamp represents the timestamp at which the last STUN request
+ // was sent on this particular candidate pair. The average interval between two
+ // consecutive connectivity checks sent can be calculated with
+ // (LastRequestTimestamp - FirstRequestTimestamp) / RequestsSent.
+ LastRequestTimestamp StatsTimestamp `json:"lastRequestTimestamp"`
+
+ // LastResponseTimestamp represents the timestamp at which the last STUN response
+ // was received on this particular candidate pair.
+ LastResponseTimestamp StatsTimestamp `json:"lastResponseTimestamp"`
+
+ // TotalRoundTripTime represents the sum of all round trip time measurements
+ // in seconds since the beginning of the session, based on STUN connectivity
+ // check responses (ResponsesReceived), including those that reply to requests
+ // that are sent in order to verify consent. The average round trip time can
+ // be computed from TotalRoundTripTime by dividing it by ResponsesReceived.
+ TotalRoundTripTime float64 `json:"totalRoundTripTime"`
+
+ // CurrentRoundTripTime represents the latest round trip time measured in seconds,
+ // computed from both STUN connectivity checks, including those that are sent
+ // for consent verification.
+ CurrentRoundTripTime float64 `json:"currentRoundTripTime"`
+
+ // AvailableOutgoingBitrate is calculated by the underlying congestion control
+ // by combining the available bitrate for all the outgoing RTP streams using
+ // this candidate pair. The bitrate measurement does not count the size of the
+ // IP or other transport layers like TCP or UDP. It is similar to the TIAS defined
+ // in RFC 3890, i.e., it is measured in bits per second and the bitrate is calculated
+ // over a 1 second window.
+ AvailableOutgoingBitrate float64 `json:"availableOutgoingBitrate"`
+
+ // AvailableIncomingBitrate is calculated by the underlying congestion control
+ // by combining the available bitrate for all the incoming RTP streams using
+ // this candidate pair. The bitrate measurement does not count the size of the
+ // IP or other transport layers like TCP or UDP. It is similar to the TIAS defined
+ // in RFC 3890, i.e., it is measured in bits per second and the bitrate is
+ // calculated over a 1 second window.
+ AvailableIncomingBitrate float64 `json:"availableIncomingBitrate"`
+
+ // CircuitBreakerTriggerCount represents the number of times the circuit breaker
+ // is triggered for this particular 5-tuple, ceasing transmission.
+ CircuitBreakerTriggerCount uint32 `json:"circuitBreakerTriggerCount"`
+
+ // RequestsReceived represents the total number of connectivity check requests
+ // received (including retransmissions). It is impossible for the receiver to
+ // tell whether the request was sent in order to check connectivity or check
+ // consent, so all connectivity checks requests are counted here.
+ RequestsReceived uint64 `json:"requestsReceived"`
+
+ // RequestsSent represents the total number of connectivity check requests
+ // sent (not including retransmissions).
+ RequestsSent uint64 `json:"requestsSent"`
+
+ // ResponsesReceived represents the total number of connectivity check responses received.
+ ResponsesReceived uint64 `json:"responsesReceived"`
+
+ // ResponsesSent represents the total number of connectivity check responses sent.
+ // Since we cannot distinguish connectivity check requests and consent requests,
+ // all responses are counted.
+ ResponsesSent uint64 `json:"responsesSent"`
+
+ // RetransmissionsReceived represents the total number of connectivity check
+ // request retransmissions received.
+ RetransmissionsReceived uint64 `json:"retransmissionsReceived"`
+
+ // RetransmissionsSent represents the total number of connectivity check
+ // request retransmissions sent.
+ RetransmissionsSent uint64 `json:"retransmissionsSent"`
+
+ // ConsentRequestsSent represents the total number of consent requests sent.
+ ConsentRequestsSent uint64 `json:"consentRequestsSent"`
+
+ // ConsentExpiredTimestamp represents the timestamp at which the latest valid
+ // STUN binding response expired.
+ ConsentExpiredTimestamp StatsTimestamp `json:"consentExpiredTimestamp"`
+}
+
+// ICECandidateStats contains ICE candidate statistics related to the ICETransport objects.
+type ICECandidateStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // TransportID is a unique identifier that is associated to the object that
+ // was inspected to produce the TransportStats associated with this candidate.
+ TransportID string `json:"transportId"`
+
+ // NetworkType represents the type of network interface used by the base of a
+ // local candidate (the address the ICE agent sends from). Only present for
+ // local candidates; it's not possible to know what type of network interface
+ // a remote candidate is using.
+ //
+ // Note:
+ // This stat only tells you about the network interface used by the first "hop";
+ // it's possible that a connection will be bottlenecked by another type of network.
+ // For example, when using Wi-Fi tethering, the networkType of the relevant candidate
+ // would be "wifi", even when the next hop is over a cellular connection.
+ NetworkType NetworkType `json:"networkType"`
+
+ // IP is the IP address of the candidate, allowing for IPv4 addresses and
+ // IPv6 addresses, but fully qualified domain names (FQDNs) are not allowed.
+ IP string `json:"ip"`
+
+ // Port is the port number of the candidate.
+ Port int32 `json:"port"`
+
+ // Protocol is one of udp and tcp.
+ Protocol string `json:"protocol"`
+
+ // CandidateType is the "Type" field of the ICECandidate.
+ CandidateType ICECandidateType `json:"candidateType"`
+
+ // Priority is the "Priority" field of the ICECandidate.
+ Priority int32 `json:"priority"`
+
+ // URL is the URL of the TURN or STUN server indicated in the that translated
+ // this IP address. It is the URL address surfaced in an PeerConnectionICEEvent.
+ URL string `json:"url"`
+
+ // RelayProtocol is the protocol used by the endpoint to communicate with the
+ // TURN server. This is only present for local candidates. Valid values for
+ // the TURN URL protocol is one of udp, tcp, or tls.
+ RelayProtocol string `json:"relayProtocol"`
+
+ // Deleted is true if the candidate has been deleted/freed. For host candidates,
+ // this means that any network resources (typically a socket) associated with the
+ // candidate have been released. For TURN candidates, this means the TURN allocation
+ // is no longer active.
+ //
+ // Only defined for local candidates. For remote candidates, this property is not applicable.
+ Deleted bool `json:"deleted"`
+}
+
+// CertificateStats contains information about a certificate used by an ICETransport.
+type CertificateStats struct {
+ // Timestamp is the timestamp associated with this object.
+ Timestamp StatsTimestamp `json:"timestamp"`
+
+ // Type is the object's StatsType
+ Type StatsType `json:"type"`
+
+ // ID is a unique id that is associated with the component inspected to produce
+ // this Stats object. Two Stats objects will have the same ID if they were produced
+ // by inspecting the same underlying object.
+ ID string `json:"id"`
+
+ // Fingerprint is the fingerprint of the certificate.
+ Fingerprint string `json:"fingerprint"`
+
+ // FingerprintAlgorithm is the hash function used to compute the certificate fingerprint. For instance, "sha-256".
+ FingerprintAlgorithm string `json:"fingerprintAlgorithm"`
+
+ // Base64Certificate is the DER-encoded base-64 representation of the certificate.
+ Base64Certificate string `json:"base64Certificate"`
+
+ // IssuerCertificateID refers to the stats object that contains the next certificate
+ // in the certificate chain. If the current certificate is at the end of the chain
+ // (i.e. a self-signed certificate), this will not be set.
+ IssuerCertificateID string `json:"issuerCertificateId"`
+}
diff --git a/vendor/github.com/pion/webrtc/v3/stats_go.go b/vendor/github.com/pion/webrtc/v3/stats_go.go
new file mode 100644
index 0000000..e1f622e
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/stats_go.go
@@ -0,0 +1,93 @@
+// +build !js
+
+package webrtc
+
+// GetConnectionStats is a helper method to return the associated stats for a given PeerConnection
+func (r StatsReport) GetConnectionStats(conn *PeerConnection) (PeerConnectionStats, bool) {
+ statsID := conn.getStatsID()
+ stats, ok := r[statsID]
+ if !ok {
+ return PeerConnectionStats{}, false
+ }
+
+ pcStats, ok := stats.(PeerConnectionStats)
+ if !ok {
+ return PeerConnectionStats{}, false
+ }
+ return pcStats, true
+}
+
+// GetDataChannelStats is a helper method to return the associated stats for a given DataChannel
+func (r StatsReport) GetDataChannelStats(dc *DataChannel) (DataChannelStats, bool) {
+ statsID := dc.getStatsID()
+ stats, ok := r[statsID]
+ if !ok {
+ return DataChannelStats{}, false
+ }
+
+ dcStats, ok := stats.(DataChannelStats)
+ if !ok {
+ return DataChannelStats{}, false
+ }
+ return dcStats, true
+}
+
+// GetICECandidateStats is a helper method to return the associated stats for a given ICECandidate
+func (r StatsReport) GetICECandidateStats(c *ICECandidate) (ICECandidateStats, bool) {
+ statsID := c.statsID
+ stats, ok := r[statsID]
+ if !ok {
+ return ICECandidateStats{}, false
+ }
+
+ candidateStats, ok := stats.(ICECandidateStats)
+ if !ok {
+ return ICECandidateStats{}, false
+ }
+ return candidateStats, true
+}
+
+// GetICECandidatePairStats is a helper method to return the associated stats for a given ICECandidatePair
+func (r StatsReport) GetICECandidatePairStats(c *ICECandidatePair) (ICECandidatePairStats, bool) {
+ statsID := c.statsID
+ stats, ok := r[statsID]
+ if !ok {
+ return ICECandidatePairStats{}, false
+ }
+
+ candidateStats, ok := stats.(ICECandidatePairStats)
+ if !ok {
+ return ICECandidatePairStats{}, false
+ }
+ return candidateStats, true
+}
+
+// GetCertificateStats is a helper method to return the associated stats for a given Certificate
+func (r StatsReport) GetCertificateStats(c *Certificate) (CertificateStats, bool) {
+ statsID := c.statsID
+ stats, ok := r[statsID]
+ if !ok {
+ return CertificateStats{}, false
+ }
+
+ certificateStats, ok := stats.(CertificateStats)
+ if !ok {
+ return CertificateStats{}, false
+ }
+ return certificateStats, true
+}
+
+// GetCodecStats is a helper method to return the associated stats for a given Codec
+func (r StatsReport) GetCodecStats(c *RTPCodecParameters) (CodecStats, bool) {
+ statsID := c.statsID
+ stats, ok := r[statsID]
+ if !ok {
+ return CodecStats{}, false
+ }
+
+ codecStats, ok := stats.(CodecStats)
+ if !ok {
+ return CodecStats{}, false
+ }
+ return codecStats, true
+}
diff --git a/vendor/github.com/pion/webrtc/v3/track_local.go b/vendor/github.com/pion/webrtc/v3/track_local.go
new file mode 100644
index 0000000..e6e1da1
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/track_local.go
@@ -0,0 +1,75 @@
+package webrtc
+
+import "github.com/pion/rtp"
+
+// TrackLocalWriter is the Writer for outbound RTP Packets
+type TrackLocalWriter interface {
+ // WriteRTP encrypts a RTP packet and writes to the connection
+ WriteRTP(header *rtp.Header, payload []byte) (int, error)
+
+ // Write encrypts and writes a full RTP packet
+ Write(b []byte) (int, error)
+}
+
+// TrackLocalContext is the Context passed when a TrackLocal has been Binded/Unbinded from a PeerConnection, and used
+// in Interceptors.
+type TrackLocalContext struct {
+ id string
+ params RTPParameters
+ ssrc SSRC
+ writeStream TrackLocalWriter
+}
+
+// CodecParameters returns the negotiated RTPCodecParameters. These are the codecs supported by both
+// PeerConnections and the SSRC/PayloadTypes
+func (t *TrackLocalContext) CodecParameters() []RTPCodecParameters {
+ return t.params.Codecs
+}
+
+// HeaderExtensions returns the negotiated RTPHeaderExtensionParameters. These are the header extensions supported by
+// both PeerConnections and the SSRC/PayloadTypes
+func (t *TrackLocalContext) HeaderExtensions() []RTPHeaderExtensionParameter {
+ return t.params.HeaderExtensions
+}
+
+// SSRC requires the negotiated SSRC of this track
+// This track may have multiple if RTX is enabled
+func (t *TrackLocalContext) SSRC() SSRC {
+ return t.ssrc
+}
+
+// WriteStream returns the WriteStream for this TrackLocal. The implementer writes the outbound
+// media packets to it
+func (t *TrackLocalContext) WriteStream() TrackLocalWriter {
+ return t.writeStream
+}
+
+// ID is a unique identifier that is used for both Bind/Unbind
+func (t *TrackLocalContext) ID() string {
+ return t.id
+}
+
+// TrackLocal is an interface that controls how the user can send media
+// The user can provide their own TrackLocal implementatiosn, or use
+// the implementations in pkg/media
+type TrackLocal interface {
+ // Bind should implement the way how the media data flows from the Track to the PeerConnection
+ // This will be called internally after signaling is complete and the list of available
+ // codecs has been determined
+ Bind(TrackLocalContext) (RTPCodecParameters, error)
+
+ // Unbind should implement the teardown logic when the track is no longer needed. This happens
+ // because a track has been stopped.
+ Unbind(TrackLocalContext) error
+
+ // ID is the unique identifier for this Track. This should be unique for the
+ // stream, but doesn't have to globally unique. A common example would be 'audio' or 'video'
+ // and StreamID would be 'desktop' or 'webcam'
+ ID() string
+
+ // StreamID is the group this track belongs too. This must be unique
+ StreamID() string
+
+ // Kind controls if this TrackLocal is audio or video
+ Kind() RTPCodecType
+}
diff --git a/vendor/github.com/pion/webrtc/v3/track_local_static.go b/vendor/github.com/pion/webrtc/v3/track_local_static.go
new file mode 100644
index 0000000..cf5aa22
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/track_local_static.go
@@ -0,0 +1,267 @@
+// +build !js
+
+package webrtc
+
+import (
+ "strings"
+ "sync"
+
+ "github.com/pion/rtp"
+ "github.com/pion/webrtc/v3/internal/util"
+ "github.com/pion/webrtc/v3/pkg/media"
+)
+
+// trackBinding is a single bind for a Track
+// Bind can be called multiple times, this stores the
+// result for a single bind call so that it can be used when writing
+type trackBinding struct {
+ id string
+ ssrc SSRC
+ payloadType PayloadType
+ writeStream TrackLocalWriter
+}
+
+// TrackLocalStaticRTP is a TrackLocal that has a pre-set codec and accepts RTP Packets.
+// If you wish to send a media.Sample use TrackLocalStaticSample
+type TrackLocalStaticRTP struct {
+ mu sync.RWMutex
+ bindings []trackBinding
+ codec RTPCodecCapability
+ id, streamID string
+}
+
+// NewTrackLocalStaticRTP returns a TrackLocalStaticRTP.
+func NewTrackLocalStaticRTP(c RTPCodecCapability, id, streamID string) (*TrackLocalStaticRTP, error) {
+ return &TrackLocalStaticRTP{
+ codec: c,
+ bindings: []trackBinding{},
+ id: id,
+ streamID: streamID,
+ }, nil
+}
+
+// Bind is called by the PeerConnection after negotiation is complete
+// This asserts that the code requested is supported by the remote peer.
+// If so it setups all the state (SSRC and PayloadType) to have a call
+func (s *TrackLocalStaticRTP) Bind(t TrackLocalContext) (RTPCodecParameters, error) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ parameters := RTPCodecParameters{RTPCodecCapability: s.codec}
+ if codec, matchType := codecParametersFuzzySearch(parameters, t.CodecParameters()); matchType != codecMatchNone {
+ s.bindings = append(s.bindings, trackBinding{
+ ssrc: t.SSRC(),
+ payloadType: codec.PayloadType,
+ writeStream: t.WriteStream(),
+ id: t.ID(),
+ })
+ return codec, nil
+ }
+
+ return RTPCodecParameters{}, ErrUnsupportedCodec
+}
+
+// Unbind implements the teardown logic when the track is no longer needed. This happens
+// because a track has been stopped.
+func (s *TrackLocalStaticRTP) Unbind(t TrackLocalContext) error {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ for i := range s.bindings {
+ if s.bindings[i].id == t.ID() {
+ s.bindings[i] = s.bindings[len(s.bindings)-1]
+ s.bindings = s.bindings[:len(s.bindings)-1]
+ return nil
+ }
+ }
+
+ return ErrUnbindFailed
+}
+
+// ID is the unique identifier for this Track. This should be unique for the
+// stream, but doesn't have to globally unique. A common example would be 'audio' or 'video'
+// and StreamID would be 'desktop' or 'webcam'
+func (s *TrackLocalStaticRTP) ID() string { return s.id }
+
+// StreamID is the group this track belongs too. This must be unique
+func (s *TrackLocalStaticRTP) StreamID() string { return s.streamID }
+
+// Kind controls if this TrackLocal is audio or video
+func (s *TrackLocalStaticRTP) Kind() RTPCodecType {
+ switch {
+ case strings.HasPrefix(s.codec.MimeType, "audio/"):
+ return RTPCodecTypeAudio
+ case strings.HasPrefix(s.codec.MimeType, "video/"):
+ return RTPCodecTypeVideo
+ default:
+ return RTPCodecType(0)
+ }
+}
+
+// Codec gets the Codec of the track
+func (s *TrackLocalStaticRTP) Codec() RTPCodecCapability {
+ return s.codec
+}
+
+// packetPool is a pool of packets used by WriteRTP and Write below
+// nolint:gochecknoglobals
+var rtpPacketPool = sync.Pool{
+ New: func() interface{} {
+ return &rtp.Packet{}
+ },
+}
+
+// WriteRTP writes a RTP Packet to the TrackLocalStaticRTP
+// If one PeerConnection fails the packets will still be sent to
+// all PeerConnections. The error message will contain the ID of the failed
+// PeerConnections so you can remove them
+func (s *TrackLocalStaticRTP) WriteRTP(p *rtp.Packet) error {
+ ipacket := rtpPacketPool.Get()
+ packet := ipacket.(*rtp.Packet)
+ defer func() {
+ *packet = rtp.Packet{}
+ rtpPacketPool.Put(ipacket)
+ }()
+ *packet = *p
+ return s.writeRTP(packet)
+}
+
+// writeRTP is like WriteRTP, except that it may modify the packet p
+func (s *TrackLocalStaticRTP) writeRTP(p *rtp.Packet) error {
+ s.mu.RLock()
+ defer s.mu.RUnlock()
+
+ writeErrs := []error{}
+
+ for _, b := range s.bindings {
+ p.Header.SSRC = uint32(b.ssrc)
+ p.Header.PayloadType = uint8(b.payloadType)
+ if _, err := b.writeStream.WriteRTP(&p.Header, p.Payload); err != nil {
+ writeErrs = append(writeErrs, err)
+ }
+ }
+
+ return util.FlattenErrs(writeErrs)
+}
+
+// Write writes a RTP Packet as a buffer to the TrackLocalStaticRTP
+// If one PeerConnection fails the packets will still be sent to
+// all PeerConnections. The error message will contain the ID of the failed
+// PeerConnections so you can remove them
+func (s *TrackLocalStaticRTP) Write(b []byte) (n int, err error) {
+ ipacket := rtpPacketPool.Get()
+ packet := ipacket.(*rtp.Packet)
+ defer func() {
+ *packet = rtp.Packet{}
+ rtpPacketPool.Put(ipacket)
+ }()
+
+ if err = packet.Unmarshal(b); err != nil {
+ return 0, err
+ }
+
+ return len(b), s.writeRTP(packet)
+}
+
+// TrackLocalStaticSample is a TrackLocal that has a pre-set codec and accepts Samples.
+// If you wish to send a RTP Packet use TrackLocalStaticRTP
+type TrackLocalStaticSample struct {
+ packetizer rtp.Packetizer
+ rtpTrack *TrackLocalStaticRTP
+ clockRate float64
+}
+
+// NewTrackLocalStaticSample returns a TrackLocalStaticSample
+func NewTrackLocalStaticSample(c RTPCodecCapability, id, streamID string) (*TrackLocalStaticSample, error) {
+ rtpTrack, err := NewTrackLocalStaticRTP(c, id, streamID)
+ if err != nil {
+ return nil, err
+ }
+
+ return &TrackLocalStaticSample{
+ rtpTrack: rtpTrack,
+ }, nil
+}
+
+// ID is the unique identifier for this Track. This should be unique for the
+// stream, but doesn't have to globally unique. A common example would be 'audio' or 'video'
+// and StreamID would be 'desktop' or 'webcam'
+func (s *TrackLocalStaticSample) ID() string { return s.rtpTrack.ID() }
+
+// StreamID is the group this track belongs too. This must be unique
+func (s *TrackLocalStaticSample) StreamID() string { return s.rtpTrack.StreamID() }
+
+// Kind controls if this TrackLocal is audio or video
+func (s *TrackLocalStaticSample) Kind() RTPCodecType { return s.rtpTrack.Kind() }
+
+// Codec gets the Codec of the track
+func (s *TrackLocalStaticSample) Codec() RTPCodecCapability {
+ return s.rtpTrack.Codec()
+}
+
+// Bind is called by the PeerConnection after negotiation is complete
+// This asserts that the code requested is supported by the remote peer.
+// If so it setups all the state (SSRC and PayloadType) to have a call
+func (s *TrackLocalStaticSample) Bind(t TrackLocalContext) (RTPCodecParameters, error) {
+ codec, err := s.rtpTrack.Bind(t)
+ if err != nil {
+ return codec, err
+ }
+
+ s.rtpTrack.mu.Lock()
+ defer s.rtpTrack.mu.Unlock()
+
+ // We only need one packetizer
+ if s.packetizer != nil {
+ return codec, nil
+ }
+
+ payloader, err := payloaderForCodec(codec.RTPCodecCapability)
+ if err != nil {
+ return codec, err
+ }
+
+ s.packetizer = rtp.NewPacketizer(
+ rtpOutboundMTU,
+ 0, // Value is handled when writing
+ 0, // Value is handled when writing
+ payloader,
+ rtp.NewRandomSequencer(),
+ codec.ClockRate,
+ )
+ s.clockRate = float64(codec.RTPCodecCapability.ClockRate)
+ return codec, nil
+}
+
+// Unbind implements the teardown logic when the track is no longer needed. This happens
+// because a track has been stopped.
+func (s *TrackLocalStaticSample) Unbind(t TrackLocalContext) error {
+ return s.rtpTrack.Unbind(t)
+}
+
+// WriteSample writes a Sample to the TrackLocalStaticSample
+// If one PeerConnection fails the packets will still be sent to
+// all PeerConnections. The error message will contain the ID of the failed
+// PeerConnections so you can remove them
+func (s *TrackLocalStaticSample) WriteSample(sample media.Sample) error {
+ s.rtpTrack.mu.RLock()
+ p := s.packetizer
+ clockRate := s.clockRate
+ s.rtpTrack.mu.RUnlock()
+
+ if p == nil {
+ return nil
+ }
+
+ samples := sample.Duration.Seconds() * clockRate
+ packets := p.(rtp.Packetizer).Packetize(sample.Data, uint32(samples))
+
+ writeErrs := []error{}
+ for _, p := range packets {
+ if err := s.rtpTrack.WriteRTP(p); err != nil {
+ writeErrs = append(writeErrs, err)
+ }
+ }
+
+ return util.FlattenErrs(writeErrs)
+}
diff --git a/vendor/github.com/pion/webrtc/v3/track_remote.go b/vendor/github.com/pion/webrtc/v3/track_remote.go
new file mode 100644
index 0000000..6733b7c
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/track_remote.go
@@ -0,0 +1,183 @@
+// +build !js
+
+package webrtc
+
+import (
+ "sync"
+ "time"
+
+ "github.com/pion/interceptor"
+ "github.com/pion/rtp"
+)
+
+// TrackRemote represents a single inbound source of media
+type TrackRemote struct {
+ mu sync.RWMutex
+
+ id string
+ streamID string
+
+ payloadType PayloadType
+ kind RTPCodecType
+ ssrc SSRC
+ codec RTPCodecParameters
+ params RTPParameters
+ rid string
+
+ receiver *RTPReceiver
+ peeked []byte
+ peekedAttributes interceptor.Attributes
+}
+
+func newTrackRemote(kind RTPCodecType, ssrc SSRC, rid string, receiver *RTPReceiver) *TrackRemote {
+ return &TrackRemote{
+ kind: kind,
+ ssrc: ssrc,
+ rid: rid,
+ receiver: receiver,
+ }
+}
+
+// ID is the unique identifier for this Track. This should be unique for the
+// stream, but doesn't have to globally unique. A common example would be 'audio' or 'video'
+// and StreamID would be 'desktop' or 'webcam'
+func (t *TrackRemote) ID() string {
+ t.mu.RLock()
+ defer t.mu.RUnlock()
+ return t.id
+}
+
+// RID gets the RTP Stream ID of this Track
+// With Simulcast you will have multiple tracks with the same ID, but different RID values.
+// In many cases a TrackRemote will not have an RID, so it is important to assert it is non-zero
+func (t *TrackRemote) RID() string {
+ t.mu.RLock()
+ defer t.mu.RUnlock()
+
+ return t.rid
+}
+
+// PayloadType gets the PayloadType of the track
+func (t *TrackRemote) PayloadType() PayloadType {
+ t.mu.RLock()
+ defer t.mu.RUnlock()
+ return t.payloadType
+}
+
+// Kind gets the Kind of the track
+func (t *TrackRemote) Kind() RTPCodecType {
+ t.mu.RLock()
+ defer t.mu.RUnlock()
+ return t.kind
+}
+
+// StreamID is the group this track belongs too. This must be unique
+func (t *TrackRemote) StreamID() string {
+ t.mu.RLock()
+ defer t.mu.RUnlock()
+ return t.streamID
+}
+
+// SSRC gets the SSRC of the track
+func (t *TrackRemote) SSRC() SSRC {
+ t.mu.RLock()
+ defer t.mu.RUnlock()
+ return t.ssrc
+}
+
+// Msid gets the Msid of the track
+func (t *TrackRemote) Msid() string {
+ return t.StreamID() + " " + t.ID()
+}
+
+// Codec gets the Codec of the track
+func (t *TrackRemote) Codec() RTPCodecParameters {
+ t.mu.RLock()
+ defer t.mu.RUnlock()
+ return t.codec
+}
+
+// Read reads data from the track.
+func (t *TrackRemote) Read(b []byte) (n int, attributes interceptor.Attributes, err error) {
+ t.mu.RLock()
+ r := t.receiver
+ peeked := t.peeked != nil
+ t.mu.RUnlock()
+
+ if peeked {
+ t.mu.Lock()
+ data := t.peeked
+ attributes = t.peekedAttributes
+
+ t.peeked = nil
+ t.peekedAttributes = nil
+ t.mu.Unlock()
+ // someone else may have stolen our packet when we
+ // released the lock. Deal with it.
+ if data != nil {
+ n = copy(b, data)
+ return
+ }
+ }
+
+ return r.readRTP(b, t)
+}
+
+// ReadRTP is a convenience method that wraps Read and unmarshals for you.
+func (t *TrackRemote) ReadRTP() (*rtp.Packet, interceptor.Attributes, error) {
+ b := make([]byte, receiveMTU)
+ i, attributes, err := t.Read(b)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ r := &rtp.Packet{}
+ if err := r.Unmarshal(b[:i]); err != nil {
+ return nil, nil, err
+ }
+ return r, attributes, nil
+}
+
+// determinePayloadType blocks and reads a single packet to determine the PayloadType for this Track
+// this is useful because we can't announce it to the user until we know the payloadType
+func (t *TrackRemote) determinePayloadType() error {
+ b := make([]byte, receiveMTU)
+ n, _, err := t.peek(b)
+ if err != nil {
+ return err
+ }
+ r := rtp.Packet{}
+ if err := r.Unmarshal(b[:n]); err != nil {
+ return err
+ }
+
+ t.mu.Lock()
+ t.payloadType = PayloadType(r.PayloadType)
+ defer t.mu.Unlock()
+
+ return nil
+}
+
+// peek is like Read, but it doesn't discard the packet read
+func (t *TrackRemote) peek(b []byte) (n int, a interceptor.Attributes, err error) {
+ n, a, err = t.Read(b)
+ if err != nil {
+ return
+ }
+
+ t.mu.Lock()
+ // this might overwrite data if somebody peeked between the Read
+ // and us getting the lock. Oh well, we'll just drop a packet in
+ // that case.
+ data := make([]byte, n)
+ n = copy(data, b[:n])
+ t.peeked = data
+ t.peekedAttributes = a
+ t.mu.Unlock()
+ return
+}
+
+// SetReadDeadline sets the max amount of time the RTP stream will block before returning. 0 is forever.
+func (t *TrackRemote) SetReadDeadline(deadline time.Time) error {
+ return t.receiver.setRTPReadDeadline(deadline, t)
+}
diff --git a/vendor/github.com/pion/webrtc/v3/webrtc.go b/vendor/github.com/pion/webrtc/v3/webrtc.go
new file mode 100644
index 0000000..ff32a55
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/webrtc.go
@@ -0,0 +1,17 @@
+// Package webrtc implements the WebRTC 1.0 as defined in W3C WebRTC specification document.
+package webrtc
+
+// SSRC represents a synchronization source
+// A synchronization source is a randomly chosen
+// value meant to be globally unique within a particular
+// RTP session. Used to identify a single stream of media.
+//
+// https://tools.ietf.org/html/rfc3550#section-3
+type SSRC uint32
+
+// PayloadType identifies the format of the RTP payload and determines
+// its interpretation by the application. Each codec in a RTP Session
+// will have a different PayloadType
+//
+// https://tools.ietf.org/html/rfc3550#section-3
+type PayloadType uint8
diff --git a/vendor/github.com/pion/webrtc/v3/yarn.lock b/vendor/github.com/pion/webrtc/v3/yarn.lock
new file mode 100644
index 0000000..90f73c2
--- /dev/null
+++ b/vendor/github.com/pion/webrtc/v3/yarn.lock
@@ -0,0 +1,795 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+abbrev@1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
+ integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
+
+ajv@^6.5.5:
+ version "6.12.2"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd"
+ integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==
+ dependencies:
+ fast-deep-equal "^3.1.1"
+ fast-json-stable-stringify "^2.0.0"
+ json-schema-traverse "^0.4.1"
+ uri-js "^4.2.2"
+
+ansi-regex@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
+ integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8=
+
+ansi-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
+ integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
+
+aproba@^1.0.3:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
+ integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==
+
+are-we-there-yet@~1.1.2:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
+ integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==
+ dependencies:
+ delegates "^1.0.0"
+ readable-stream "^2.0.6"
+
+asn1@~0.2.3:
+ version "0.2.4"
+ resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
+ integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==
+ dependencies:
+ safer-buffer "~2.1.0"
+
+assert-plus@1.0.0, assert-plus@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
+ integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
+
+asynckit@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
+ integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
+
+aws-sign2@~0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
+ integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
+
+aws4@^1.8.0:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.0.tgz#a17b3a8ea811060e74d47d306122400ad4497ae2"
+ integrity sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==
+
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+ integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
+
+bcrypt-pbkdf@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
+ integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=
+ dependencies:
+ tweetnacl "^0.14.3"
+
+brace-expansion@^1.1.7:
+ version "1.1.11"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+caseless@~0.12.0:
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
+ integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
+
+chownr@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494"
+ integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==
+
+code-point-at@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
+ integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=
+
+combined-stream@^1.0.6, combined-stream@~1.0.6:
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
+ integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
+ dependencies:
+ delayed-stream "~1.0.0"
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+ integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
+
+console-control-strings@^1.0.0, console-control-strings@~1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
+ integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
+
+core-util-is@1.0.2, core-util-is@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+ integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
+
+dashdash@^1.12.0:
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
+ integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=
+ dependencies:
+ assert-plus "^1.0.0"
+
+debug@^2.1.2:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
+ dependencies:
+ ms "2.0.0"
+
+deep-extend@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
+ integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
+
+delayed-stream@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+ integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
+
+delegates@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
+ integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=
+
+detect-libc@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
+ integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
+
+domexception@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90"
+ integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==
+ dependencies:
+ webidl-conversions "^4.0.2"
+
+ecc-jsbn@~0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
+ integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=
+ dependencies:
+ jsbn "~0.1.0"
+ safer-buffer "^2.1.0"
+
+extend@~3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
+ integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
+
+extsprintf@1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
+ integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=
+
+extsprintf@^1.2.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
+ integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
+
+fast-deep-equal@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4"
+ integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==
+
+fast-json-stable-stringify@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
+ integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
+
+forever-agent@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
+ integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
+
+form-data@~2.3.2:
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
+ integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==
+ dependencies:
+ asynckit "^0.4.0"
+ combined-stream "^1.0.6"
+ mime-types "^2.1.12"
+
+fs-minipass@^1.2.5:
+ version "1.2.5"
+ resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d"
+ integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==
+ dependencies:
+ minipass "^2.2.1"
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+ integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
+
+gauge@~2.7.3:
+ version "2.7.4"
+ resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
+ integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=
+ dependencies:
+ aproba "^1.0.3"
+ console-control-strings "^1.0.0"
+ has-unicode "^2.0.0"
+ object-assign "^4.1.0"
+ signal-exit "^3.0.0"
+ string-width "^1.0.1"
+ strip-ansi "^3.0.1"
+ wide-align "^1.1.0"
+
+getpass@^0.1.1:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
+ integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=
+ dependencies:
+ assert-plus "^1.0.0"
+
+glob@^7.1.3:
+ version "7.1.3"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
+ integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+har-schema@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
+ integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
+
+har-validator@~5.1.3:
+ version "5.1.3"
+ resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080"
+ integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==
+ dependencies:
+ ajv "^6.5.5"
+ har-schema "^2.0.0"
+
+has-unicode@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
+ integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=
+
+http-signature@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
+ integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=
+ dependencies:
+ assert-plus "^1.0.0"
+ jsprim "^1.2.2"
+ sshpk "^1.7.0"
+
+iconv-lite@^0.4.4:
+ version "0.4.24"
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
+ integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
+ dependencies:
+ safer-buffer ">= 2.1.2 < 3"
+
+ignore-walk@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8"
+ integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==
+ dependencies:
+ minimatch "^3.0.4"
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2, inherits@~2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
+ integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
+
+ini@~1.3.0:
+ version "1.3.5"
+ resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
+ integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
+
+is-fullwidth-code-point@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
+ integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs=
+ dependencies:
+ number-is-nan "^1.0.0"
+
+is-fullwidth-code-point@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+ integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
+
+is-typedarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
+ integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
+
+isarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+ integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
+
+isstream@~0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
+ integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
+
+jsbn@~0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
+ integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
+
+json-schema-traverse@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
+ integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
+
+json-schema@0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
+ integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
+
+json-stringify-safe@~5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
+ integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
+
+jsprim@^1.2.2:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
+ integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=
+ dependencies:
+ assert-plus "1.0.0"
+ extsprintf "1.3.0"
+ json-schema "0.2.3"
+ verror "1.10.0"
+
+mime-db@1.44.0:
+ version "1.44.0"
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92"
+ integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==
+
+mime-types@^2.1.12, mime-types@~2.1.19:
+ version "2.1.27"
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f"
+ integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==
+ dependencies:
+ mime-db "1.44.0"
+
+minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimist@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+ integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
+
+minimist@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
+ integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
+
+minipass@^2.2.1, minipass@^2.3.4:
+ version "2.3.5"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848"
+ integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==
+ dependencies:
+ safe-buffer "^5.1.2"
+ yallist "^3.0.0"
+
+minizlib@^1.1.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614"
+ integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==
+ dependencies:
+ minipass "^2.2.1"
+
+mkdirp@^0.5.0, mkdirp@^0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+ integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
+ dependencies:
+ minimist "0.0.8"
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+ integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
+
+needle@^2.2.1:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e"
+ integrity sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA==
+ dependencies:
+ debug "^2.1.2"
+ iconv-lite "^0.4.4"
+ sax "^1.2.4"
+
+node-pre-gyp@^0.13.0:
+ version "0.13.0"
+ resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.13.0.tgz#df9ab7b68dd6498137717838e4f92a33fc9daa42"
+ integrity sha512-Md1D3xnEne8b/HGVQkZZwV27WUi1ZRuZBij24TNaZwUPU3ZAFtvT6xxJGaUVillfmMKnn5oD1HoGsp2Ftik7SQ==
+ dependencies:
+ detect-libc "^1.0.2"
+ mkdirp "^0.5.1"
+ needle "^2.2.1"
+ nopt "^4.0.1"
+ npm-packlist "^1.1.6"
+ npmlog "^4.0.2"
+ rc "^1.2.7"
+ rimraf "^2.6.1"
+ semver "^5.3.0"
+ tar "^4"
+
+nopt@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d"
+ integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=
+ dependencies:
+ abbrev "1"
+ osenv "^0.1.4"
+
+npm-bundled@^1.0.1:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd"
+ integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==
+
+npm-packlist@^1.1.6:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.1.tgz#19064cdf988da80ea3cee45533879d90192bbfbc"
+ integrity sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==
+ dependencies:
+ ignore-walk "^3.0.1"
+ npm-bundled "^1.0.1"
+
+npmlog@^4.0.2:
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
+ integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
+ dependencies:
+ are-we-there-yet "~1.1.2"
+ console-control-strings "~1.1.0"
+ gauge "~2.7.3"
+ set-blocking "~2.0.0"
+
+number-is-nan@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
+ integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
+
+oauth-sign@~0.9.0:
+ version "0.9.0"
+ resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
+ integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
+
+object-assign@^4.1.0:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
+ integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
+
+once@^1.3.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
+ dependencies:
+ wrappy "1"
+
+os-homedir@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
+ integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
+
+os-tmpdir@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
+ integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
+
+osenv@^0.1.4:
+ version "0.1.5"
+ resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
+ integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==
+ dependencies:
+ os-homedir "^1.0.0"
+ os-tmpdir "^1.0.0"
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+ integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
+
+performance-now@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
+ integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
+
+process-nextick-args@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
+ integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==
+
+psl@^1.1.28:
+ version "1.8.0"
+ resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24"
+ integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==
+
+punycode@^2.1.0, punycode@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
+ integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
+
+qs@~6.5.2:
+ version "6.5.2"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
+ integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
+
+rc@^1.2.7:
+ version "1.2.8"
+ resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
+ integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
+ dependencies:
+ deep-extend "^0.6.0"
+ ini "~1.3.0"
+ minimist "^1.2.0"
+ strip-json-comments "~2.0.1"
+
+readable-stream@^2.0.6:
+ version "2.3.6"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
+ integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.3"
+ isarray "~1.0.0"
+ process-nextick-args "~2.0.0"
+ safe-buffer "~5.1.1"
+ string_decoder "~1.1.1"
+ util-deprecate "~1.0.1"
+
+request@2.88.2:
+ version "2.88.2"
+ resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3"
+ integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==
+ dependencies:
+ aws-sign2 "~0.7.0"
+ aws4 "^1.8.0"
+ caseless "~0.12.0"
+ combined-stream "~1.0.6"
+ extend "~3.0.2"
+ forever-agent "~0.6.1"
+ form-data "~2.3.2"
+ har-validator "~5.1.3"
+ http-signature "~1.2.0"
+ is-typedarray "~1.0.0"
+ isstream "~0.1.2"
+ json-stringify-safe "~5.0.1"
+ mime-types "~2.1.19"
+ oauth-sign "~0.9.0"
+ performance-now "^2.1.0"
+ qs "~6.5.2"
+ safe-buffer "^5.1.2"
+ tough-cookie "~2.5.0"
+ tunnel-agent "^0.6.0"
+ uuid "^3.3.2"
+
+rimraf@^2.6.1:
+ version "2.6.3"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
+ integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
+ dependencies:
+ glob "^7.1.3"
+
+safe-buffer@^5.0.1:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
+ integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
+
+safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+ integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
+
+"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
+ integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
+
+sax@^1.2.4:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
+ integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
+
+semver@^5.3.0:
+ version "5.6.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
+ integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
+
+set-blocking@~2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
+ integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
+
+signal-exit@^3.0.0:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
+ integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
+
+sshpk@^1.7.0:
+ version "1.16.1"
+ resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877"
+ integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==
+ dependencies:
+ asn1 "~0.2.3"
+ assert-plus "^1.0.0"
+ bcrypt-pbkdf "^1.0.0"
+ dashdash "^1.12.0"
+ ecc-jsbn "~0.1.1"
+ getpass "^0.1.1"
+ jsbn "~0.1.0"
+ safer-buffer "^2.0.2"
+ tweetnacl "~0.14.0"
+
+string-width@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
+ integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=
+ dependencies:
+ code-point-at "^1.0.0"
+ is-fullwidth-code-point "^1.0.0"
+ strip-ansi "^3.0.0"
+
+"string-width@^1.0.2 || 2":
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
+ integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
+ dependencies:
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^4.0.0"
+
+string_decoder@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
+ integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
+ dependencies:
+ safe-buffer "~5.1.0"
+
+strip-ansi@^3.0.0, strip-ansi@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
+ integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=
+ dependencies:
+ ansi-regex "^2.0.0"
+
+strip-ansi@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
+ integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8=
+ dependencies:
+ ansi-regex "^3.0.0"
+
+strip-json-comments@~2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
+ integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
+
+tar@^4:
+ version "4.4.8"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d"
+ integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==
+ dependencies:
+ chownr "^1.1.1"
+ fs-minipass "^1.2.5"
+ minipass "^2.3.4"
+ minizlib "^1.1.1"
+ mkdirp "^0.5.0"
+ safe-buffer "^5.1.2"
+ yallist "^3.0.2"
+
+tough-cookie@~2.5.0:
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
+ integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==
+ dependencies:
+ psl "^1.1.28"
+ punycode "^2.1.1"
+
+tunnel-agent@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
+ integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=
+ dependencies:
+ safe-buffer "^5.0.1"
+
+tweetnacl@^0.14.3, tweetnacl@~0.14.0:
+ version "0.14.5"
+ resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
+ integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
+
+uri-js@^4.2.2:
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
+ integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==
+ dependencies:
+ punycode "^2.1.0"
+
+util-deprecate@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+ integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
+
+uuid@^3.3.2:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
+ integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
+
+verror@1.10.0:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
+ integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=
+ dependencies:
+ assert-plus "^1.0.0"
+ core-util-is "1.0.2"
+ extsprintf "^1.2.0"
+
+webidl-conversions@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
+ integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==
+
+wide-align@^1.1.0:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
+ integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==
+ dependencies:
+ string-width "^1.0.2 || 2"
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+ integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
+
+wrtc@0.4.7:
+ version "0.4.7"
+ resolved "https://registry.yarnpkg.com/wrtc/-/wrtc-0.4.7.tgz#c61530cd662713e50bffe64b7a78673ce070426c"
+ integrity sha512-P6Hn7VT4lfSH49HxLHcHhDq+aFf/jd9dPY7lDHeFhZ22N3858EKuwm2jmnlPzpsRGEPaoF6XwkcxY5SYnt4f/g==
+ dependencies:
+ node-pre-gyp "^0.13.0"
+ optionalDependencies:
+ domexception "^1.0.1"
+
+yallist@^3.0.0, yallist@^3.0.2:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9"
+ integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==
diff --git a/vendor/github.com/pkg/errors/.gitignore b/vendor/github.com/pkg/errors/.gitignore
new file mode 100644
index 0000000..daf913b
--- /dev/null
+++ b/vendor/github.com/pkg/errors/.gitignore
@@ -0,0 +1,24 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof
diff --git a/vendor/github.com/pkg/errors/.travis.yml b/vendor/github.com/pkg/errors/.travis.yml
new file mode 100644
index 0000000..9159de0
--- /dev/null
+++ b/vendor/github.com/pkg/errors/.travis.yml
@@ -0,0 +1,10 @@
+language: go
+go_import_path: github.com/pkg/errors
+go:
+ - 1.11.x
+ - 1.12.x
+ - 1.13.x
+ - tip
+
+script:
+ - make check
diff --git a/vendor/github.com/pkg/errors/LICENSE b/vendor/github.com/pkg/errors/LICENSE
new file mode 100644
index 0000000..835ba3e
--- /dev/null
+++ b/vendor/github.com/pkg/errors/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2015, Dave Cheney <dave@cheney.net>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/pkg/errors/Makefile b/vendor/github.com/pkg/errors/Makefile
new file mode 100644
index 0000000..ce9d7cd
--- /dev/null
+++ b/vendor/github.com/pkg/errors/Makefile
@@ -0,0 +1,44 @@
+PKGS := github.com/pkg/errors
+SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS))
+GO := go
+
+check: test vet gofmt misspell unconvert staticcheck ineffassign unparam
+
+test:
+ $(GO) test $(PKGS)
+
+vet: | test
+ $(GO) vet $(PKGS)
+
+staticcheck:
+ $(GO) get honnef.co/go/tools/cmd/staticcheck
+ staticcheck -checks all $(PKGS)
+
+misspell:
+ $(GO) get github.com/client9/misspell/cmd/misspell
+ misspell \
+ -locale GB \
+ -error \
+ *.md *.go
+
+unconvert:
+ $(GO) get github.com/mdempsky/unconvert
+ unconvert -v $(PKGS)
+
+ineffassign:
+ $(GO) get github.com/gordonklaus/ineffassign
+ find $(SRCDIRS) -name '*.go' | xargs ineffassign
+
+pedantic: check errcheck
+
+unparam:
+ $(GO) get mvdan.cc/unparam
+ unparam ./...
+
+errcheck:
+ $(GO) get github.com/kisielk/errcheck
+ errcheck $(PKGS)
+
+gofmt:
+ @echo Checking code is gofmted
+ @test -z "$(shell gofmt -s -l -d -e $(SRCDIRS) | tee /dev/stderr)"
diff --git a/vendor/github.com/pkg/errors/README.md b/vendor/github.com/pkg/errors/README.md
new file mode 100644
index 0000000..54dfdcb
--- /dev/null
+++ b/vendor/github.com/pkg/errors/README.md
@@ -0,0 +1,59 @@
+# errors [![Travis-CI](https://travis-ci.org/pkg/errors.svg)](https://travis-ci.org/pkg/errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/b98mptawhudj53ep/branch/master?svg=true)](https://ci.appveyor.com/project/davecheney/errors/branch/master) [![GoDoc](https://godoc.org/github.com/pkg/errors?status.svg)](http://godoc.org/github.com/pkg/errors) [![Report card](https://goreportcard.com/badge/github.com/pkg/errors)](https://goreportcard.com/report/github.com/pkg/errors) [![Sourcegraph](https://sourcegraph.com/github.com/pkg/errors/-/badge.svg)](https://sourcegraph.com/github.com/pkg/errors?badge)
+
+Package errors provides simple error handling primitives.
+
+`go get github.com/pkg/errors`
+
+The traditional error handling idiom in Go is roughly akin to
+```go
+if err != nil {
+ return err
+}
+```
+which applied recursively up the call stack results in error reports without context or debugging information. The errors package allows programmers to add context to the failure path in their code in a way that does not destroy the original value of the error.
+
+## Adding context to an error
+
+The errors.Wrap function returns a new error that adds context to the original error. For example
+```go
+_, err := ioutil.ReadAll(r)
+if err != nil {
+ return errors.Wrap(err, "read failed")
+}
+```
+## Retrieving the cause of an error
+
+Using `errors.Wrap` constructs a stack of errors, adding context to the preceding error. Depending on the nature of the error it may be necessary to reverse the operation of errors.Wrap to retrieve the original error for inspection. Any error value which implements this interface can be inspected by `errors.Cause`.
+```go
+type causer interface {
+ Cause() error
+}
+```
+`errors.Cause` will recursively retrieve the topmost error which does not implement `causer`, which is assumed to be the original cause. For example:
+```go
+switch err := errors.Cause(err).(type) {
+case *MyError:
+ // handle specifically
+default:
+ // unknown error
+}
+```
+
+[Read the package documentation for more information](https://godoc.org/github.com/pkg/errors).
+
+## Roadmap
+
+With the upcoming [Go2 error proposals](https://go.googlesource.com/proposal/+/master/design/go2draft.md) this package is moving into maintenance mode. The roadmap for a 1.0 release is as follows:
+
+- 0.9. Remove pre Go 1.9 and Go 1.10 support, address outstanding pull requests (if possible)
+- 1.0. Final release.
+
+## Contributing
+
+Because of the Go2 errors changes, this package is not accepting proposals for new functionality. With that said, we welcome pull requests, bug fixes and issue reports.
+
+Before sending a PR, please discuss your change by raising an issue.
+
+## License
+
+BSD-2-Clause
diff --git a/vendor/github.com/pkg/errors/appveyor.yml b/vendor/github.com/pkg/errors/appveyor.yml
new file mode 100644
index 0000000..a932ead
--- /dev/null
+++ b/vendor/github.com/pkg/errors/appveyor.yml
@@ -0,0 +1,32 @@
+version: build-{build}.{branch}
+
+clone_folder: C:\gopath\src\github.com\pkg\errors
+shallow_clone: true # for startup speed
+
+environment:
+ GOPATH: C:\gopath
+
+platform:
+ - x64
+
+# http://www.appveyor.com/docs/installed-software
+install:
+ # some helpful output for debugging builds
+ - go version
+ - go env
+ # pre-installed MinGW at C:\MinGW is 32bit only
+ # but MSYS2 at C:\msys64 has mingw64
+ - set PATH=C:\msys64\mingw64\bin;%PATH%
+ - gcc --version
+ - g++ --version
+
+build_script:
+ - go install -v ./...
+
+test_script:
+ - set PATH=C:\gopath\bin;%PATH%
+ - go test -v ./...
+
+#artifacts:
+# - path: '%GOPATH%\bin\*.exe'
+deploy: off
diff --git a/vendor/github.com/pkg/errors/errors.go b/vendor/github.com/pkg/errors/errors.go
new file mode 100644
index 0000000..161aea2
--- /dev/null
+++ b/vendor/github.com/pkg/errors/errors.go
@@ -0,0 +1,288 @@
+// Package errors provides simple error handling primitives.
+//
+// The traditional error handling idiom in Go is roughly akin to
+//
+// if err != nil {
+// return err
+// }
+//
+// which when applied recursively up the call stack results in error reports
+// without context or debugging information. The errors package allows
+// programmers to add context to the failure path in their code in a way
+// that does not destroy the original value of the error.
+//
+// Adding context to an error
+//
+// The errors.Wrap function returns a new error that adds context to the
+// original error by recording a stack trace at the point Wrap is called,
+// together with the supplied message. For example
+//
+// _, err := ioutil.ReadAll(r)
+// if err != nil {
+// return errors.Wrap(err, "read failed")
+// }
+//
+// If additional control is required, the errors.WithStack and
+// errors.WithMessage functions destructure errors.Wrap into its component
+// operations: annotating an error with a stack trace and with a message,
+// respectively.
+//
+// Retrieving the cause of an error
+//
+// Using errors.Wrap constructs a stack of errors, adding context to the
+// preceding error. Depending on the nature of the error it may be necessary
+// to reverse the operation of errors.Wrap to retrieve the original error
+// for inspection. Any error value which implements this interface
+//
+// type causer interface {
+// Cause() error
+// }
+//
+// can be inspected by errors.Cause. errors.Cause will recursively retrieve
+// the topmost error that does not implement causer, which is assumed to be
+// the original cause. For example:
+//
+// switch err := errors.Cause(err).(type) {
+// case *MyError:
+// // handle specifically
+// default:
+// // unknown error
+// }
+//
+// Although the causer interface is not exported by this package, it is
+// considered a part of its stable public interface.
+//
+// Formatted printing of errors
+//
+// All error values returned from this package implement fmt.Formatter and can
+// be formatted by the fmt package. The following verbs are supported:
+//
+// %s print the error. If the error has a Cause it will be
+// printed recursively.
+// %v see %s
+// %+v extended format. Each Frame of the error's StackTrace will
+// be printed in detail.
+//
+// Retrieving the stack trace of an error or wrapper
+//
+// New, Errorf, Wrap, and Wrapf record a stack trace at the point they are
+// invoked. This information can be retrieved with the following interface:
+//
+// type stackTracer interface {
+// StackTrace() errors.StackTrace
+// }
+//
+// The returned errors.StackTrace type is defined as
+//
+// type StackTrace []Frame
+//
+// The Frame type represents a call site in the stack trace. Frame supports
+// the fmt.Formatter interface that can be used for printing information about
+// the stack trace of this error. For example:
+//
+// if err, ok := err.(stackTracer); ok {
+// for _, f := range err.StackTrace() {
+// fmt.Printf("%+s:%d\n", f, f)
+// }
+// }
+//
+// Although the stackTracer interface is not exported by this package, it is
+// considered a part of its stable public interface.
+//
+// See the documentation for Frame.Format for more details.
+package errors
+
+import (
+ "fmt"
+ "io"
+)
+
+// New returns an error with the supplied message.
+// New also records the stack trace at the point it was called.
+func New(message string) error {
+ return &fundamental{
+ msg: message,
+ stack: callers(),
+ }
+}
+
+// Errorf formats according to a format specifier and returns the string
+// as a value that satisfies error.
+// Errorf also records the stack trace at the point it was called.
+func Errorf(format string, args ...interface{}) error {
+ return &fundamental{
+ msg: fmt.Sprintf(format, args...),
+ stack: callers(),
+ }
+}
+
+// fundamental is an error that has a message and a stack, but no caller.
+type fundamental struct {
+ msg string
+ *stack
+}
+
+func (f *fundamental) Error() string { return f.msg }
+
+func (f *fundamental) Format(s fmt.State, verb rune) {
+ switch verb {
+ case 'v':
+ if s.Flag('+') {
+ io.WriteString(s, f.msg)
+ f.stack.Format(s, verb)
+ return
+ }
+ fallthrough
+ case 's':
+ io.WriteString(s, f.msg)
+ case 'q':
+ fmt.Fprintf(s, "%q", f.msg)
+ }
+}
+
+// WithStack annotates err with a stack trace at the point WithStack was called.
+// If err is nil, WithStack returns nil.
+func WithStack(err error) error {
+ if err == nil {
+ return nil
+ }
+ return &withStack{
+ err,
+ callers(),
+ }
+}
+
+type withStack struct {
+ error
+ *stack
+}
+
+func (w *withStack) Cause() error { return w.error }
+
+// Unwrap provides compatibility for Go 1.13 error chains.
+func (w *withStack) Unwrap() error { return w.error }
+
+func (w *withStack) Format(s fmt.State, verb rune) {
+ switch verb {
+ case 'v':
+ if s.Flag('+') {
+ fmt.Fprintf(s, "%+v", w.Cause())
+ w.stack.Format(s, verb)
+ return
+ }
+ fallthrough
+ case 's':
+ io.WriteString(s, w.Error())
+ case 'q':
+ fmt.Fprintf(s, "%q", w.Error())
+ }
+}
+
+// Wrap returns an error annotating err with a stack trace
+// at the point Wrap is called, and the supplied message.
+// If err is nil, Wrap returns nil.
+func Wrap(err error, message string) error {
+ if err == nil {
+ return nil
+ }
+ err = &withMessage{
+ cause: err,
+ msg: message,
+ }
+ return &withStack{
+ err,
+ callers(),
+ }
+}
+
+// Wrapf returns an error annotating err with a stack trace
+// at the point Wrapf is called, and the format specifier.
+// If err is nil, Wrapf returns nil.
+func Wrapf(err error, format string, args ...interface{}) error {
+ if err == nil {
+ return nil
+ }
+ err = &withMessage{
+ cause: err,
+ msg: fmt.Sprintf(format, args...),
+ }
+ return &withStack{
+ err,
+ callers(),
+ }
+}
+
+// WithMessage annotates err with a new message.
+// If err is nil, WithMessage returns nil.
+func WithMessage(err error, message string) error {
+ if err == nil {
+ return nil
+ }
+ return &withMessage{
+ cause: err,
+ msg: message,
+ }
+}
+
+// WithMessagef annotates err with the format specifier.
+// If err is nil, WithMessagef returns nil.
+func WithMessagef(err error, format string, args ...interface{}) error {
+ if err == nil {
+ return nil
+ }
+ return &withMessage{
+ cause: err,
+ msg: fmt.Sprintf(format, args...),
+ }
+}
+
+type withMessage struct {
+ cause error
+ msg string
+}
+
+func (w *withMessage) Error() string { return w.msg + ": " + w.cause.Error() }
+func (w *withMessage) Cause() error { return w.cause }
+
+// Unwrap provides compatibility for Go 1.13 error chains.
+func (w *withMessage) Unwrap() error { return w.cause }
+
+func (w *withMessage) Format(s fmt.State, verb rune) {
+ switch verb {
+ case 'v':
+ if s.Flag('+') {
+ fmt.Fprintf(s, "%+v\n", w.Cause())
+ io.WriteString(s, w.msg)
+ return
+ }
+ fallthrough
+ case 's', 'q':
+ io.WriteString(s, w.Error())
+ }
+}
+
+// Cause returns the underlying cause of the error, if possible.
+// An error value has a cause if it implements the following
+// interface:
+//
+// type causer interface {
+// Cause() error
+// }
+//
+// If the error does not implement Cause, the original error will
+// be returned. If the error is nil, nil will be returned without further
+// investigation.
+func Cause(err error) error {
+ type causer interface {
+ Cause() error
+ }
+
+ for err != nil {
+ cause, ok := err.(causer)
+ if !ok {
+ break
+ }
+ err = cause.Cause()
+ }
+ return err
+}
diff --git a/vendor/github.com/pkg/errors/go113.go b/vendor/github.com/pkg/errors/go113.go
new file mode 100644
index 0000000..be0d10d
--- /dev/null
+++ b/vendor/github.com/pkg/errors/go113.go
@@ -0,0 +1,38 @@
+// +build go1.13
+
+package errors
+
+import (
+ stderrors "errors"
+)
+
+// Is reports whether any error in err's chain matches target.
+//
+// The chain consists of err itself followed by the sequence of errors obtained by
+// repeatedly calling Unwrap.
+//
+// An error is considered to match a target if it is equal to that target or if
+// it implements a method Is(error) bool such that Is(target) returns true.
+func Is(err, target error) bool { return stderrors.Is(err, target) }
+
+// As finds the first error in err's chain that matches target, and if so, sets
+// target to that error value and returns true.
+//
+// The chain consists of err itself followed by the sequence of errors obtained by
+// repeatedly calling Unwrap.
+//
+// An error matches target if the error's concrete value is assignable to the value
+// pointed to by target, or if the error has a method As(interface{}) bool such that
+// As(target) returns true. In the latter case, the As method is responsible for
+// setting target.
+//
+// As will panic if target is not a non-nil pointer to either a type that implements
+// error, or to any interface type. As returns false if err is nil.
+func As(err error, target interface{}) bool { return stderrors.As(err, target) }
+
+// Unwrap returns the result of calling the Unwrap method on err, if err's
+// type contains an Unwrap method returning error.
+// Otherwise, Unwrap returns nil.
+func Unwrap(err error) error {
+ return stderrors.Unwrap(err)
+}
diff --git a/vendor/github.com/pkg/errors/stack.go b/vendor/github.com/pkg/errors/stack.go
new file mode 100644
index 0000000..779a834
--- /dev/null
+++ b/vendor/github.com/pkg/errors/stack.go
@@ -0,0 +1,177 @@
+package errors
+
+import (
+ "fmt"
+ "io"
+ "path"
+ "runtime"
+ "strconv"
+ "strings"
+)
+
+// Frame represents a program counter inside a stack frame.
+// For historical reasons if Frame is interpreted as a uintptr
+// its value represents the program counter + 1.
+type Frame uintptr
+
+// pc returns the program counter for this frame;
+// multiple frames may have the same PC value.
+func (f Frame) pc() uintptr { return uintptr(f) - 1 }
+
+// file returns the full path to the file that contains the
+// function for this Frame's pc.
+func (f Frame) file() string {
+ fn := runtime.FuncForPC(f.pc())
+ if fn == nil {
+ return "unknown"
+ }
+ file, _ := fn.FileLine(f.pc())
+ return file
+}
+
+// line returns the line number of source code of the
+// function for this Frame's pc.
+func (f Frame) line() int {
+ fn := runtime.FuncForPC(f.pc())
+ if fn == nil {
+ return 0
+ }
+ _, line := fn.FileLine(f.pc())
+ return line
+}
+
+// name returns the name of this function, if known.
+func (f Frame) name() string {
+ fn := runtime.FuncForPC(f.pc())
+ if fn == nil {
+ return "unknown"
+ }
+ return fn.Name()
+}
+
+// Format formats the frame according to the fmt.Formatter interface.
+//
+// %s source file
+// %d source line
+// %n function name
+// %v equivalent to %s:%d
+//
+// Format accepts flags that alter the printing of some verbs, as follows:
+//
+// %+s function name and path of source file relative to the compile time
+// GOPATH separated by \n\t (<funcname>\n\t<path>)
+// %+v equivalent to %+s:%d
+func (f Frame) Format(s fmt.State, verb rune) {
+ switch verb {
+ case 's':
+ switch {
+ case s.Flag('+'):
+ io.WriteString(s, f.name())
+ io.WriteString(s, "\n\t")
+ io.WriteString(s, f.file())
+ default:
+ io.WriteString(s, path.Base(f.file()))
+ }
+ case 'd':
+ io.WriteString(s, strconv.Itoa(f.line()))
+ case 'n':
+ io.WriteString(s, funcname(f.name()))
+ case 'v':
+ f.Format(s, 's')
+ io.WriteString(s, ":")
+ f.Format(s, 'd')
+ }
+}
+
+// MarshalText formats a stacktrace Frame as a text string. The output is the
+// same as that of fmt.Sprintf("%+v", f), but without newlines or tabs.
+func (f Frame) MarshalText() ([]byte, error) {
+ name := f.name()
+ if name == "unknown" {
+ return []byte(name), nil
+ }
+ return []byte(fmt.Sprintf("%s %s:%d", name, f.file(), f.line())), nil
+}
+
+// StackTrace is stack of Frames from innermost (newest) to outermost (oldest).
+type StackTrace []Frame
+
+// Format formats the stack of Frames according to the fmt.Formatter interface.
+//
+// %s lists source files for each Frame in the stack
+// %v lists the source file and line number for each Frame in the stack
+//
+// Format accepts flags that alter the printing of some verbs, as follows:
+//
+// %+v Prints filename, function, and line number for each Frame in the stack.
+func (st StackTrace) Format(s fmt.State, verb rune) {
+ switch verb {
+ case 'v':
+ switch {
+ case s.Flag('+'):
+ for _, f := range st {
+ io.WriteString(s, "\n")
+ f.Format(s, verb)
+ }
+ case s.Flag('#'):
+ fmt.Fprintf(s, "%#v", []Frame(st))
+ default:
+ st.formatSlice(s, verb)
+ }
+ case 's':
+ st.formatSlice(s, verb)
+ }
+}
+
+// formatSlice will format this StackTrace into the given buffer as a slice of
+// Frame, only valid when called with '%s' or '%v'.
+func (st StackTrace) formatSlice(s fmt.State, verb rune) {
+ io.WriteString(s, "[")
+ for i, f := range st {
+ if i > 0 {
+ io.WriteString(s, " ")
+ }
+ f.Format(s, verb)
+ }
+ io.WriteString(s, "]")
+}
+
+// stack represents a stack of program counters.
+type stack []uintptr
+
+func (s *stack) Format(st fmt.State, verb rune) {
+ switch verb {
+ case 'v':
+ switch {
+ case st.Flag('+'):
+ for _, pc := range *s {
+ f := Frame(pc)
+ fmt.Fprintf(st, "\n%+v", f)
+ }
+ }
+ }
+}
+
+func (s *stack) StackTrace() StackTrace {
+ f := make([]Frame, len(*s))
+ for i := 0; i < len(f); i++ {
+ f[i] = Frame((*s)[i])
+ }
+ return f
+}
+
+func callers() *stack {
+ const depth = 32
+ var pcs [depth]uintptr
+ n := runtime.Callers(3, pcs[:])
+ var st stack = pcs[0:n]
+ return &st
+}
+
+// funcname removes the path prefix component of a function's name reported by func.Name().
+func funcname(name string) string {
+ i := strings.LastIndex(name, "/")
+ name = name[i+1:]
+ i = strings.Index(name, ".")
+ return name[i+1:]
+}
diff --git a/vendor/github.com/smartystreets/assertions/.gitignore b/vendor/github.com/smartystreets/assertions/.gitignore
new file mode 100644
index 0000000..07d3c71
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/.gitignore
@@ -0,0 +1,5 @@
+.DS_Store
+Thumbs.db
+*.iml
+/.idea
+coverage.out
diff --git a/vendor/github.com/smartystreets/assertions/.travis.yml b/vendor/github.com/smartystreets/assertions/.travis.yml
new file mode 100644
index 0000000..72df752
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/.travis.yml
@@ -0,0 +1,11 @@
+language: go
+
+go:
+ - 1.x
+
+install:
+ - go get -t ./...
+
+script: go test ./... -v
+
+sudo: false
diff --git a/vendor/github.com/smartystreets/assertions/CONTRIBUTING.md b/vendor/github.com/smartystreets/assertions/CONTRIBUTING.md
new file mode 100644
index 0000000..1820ecb
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/CONTRIBUTING.md
@@ -0,0 +1,12 @@
+# Contributing
+
+In general, the code posted to the [SmartyStreets github organization](https://github.com/smartystreets) is created to solve specific problems at SmartyStreets that are ancillary to our core products in the address verification industry and may or may not be useful to other organizations or developers. Our reason for posting said code isn't necessarily to solicit feedback or contributions from the community but more as a showcase of some of the approaches to solving problems we have adopted.
+
+Having stated that, we do consider issues raised by other githubbers as well as contributions submitted via pull requests. When submitting such a pull request, please follow these guidelines:
+
+- _Look before you leap:_ If the changes you plan to make are significant, it's in everyone's best interest for you to discuss them with a SmartyStreets team member prior to opening a pull request.
+- _License and ownership:_ If modifying the `LICENSE.md` file, limit your changes to fixing typographical mistakes. Do NOT modify the actual terms in the license or the copyright by **SmartyStreets, LLC**. Code submitted to SmartyStreets projects becomes property of SmartyStreets and must be compatible with the associated license.
+- _Testing:_ If the code you are submitting resides in packages/modules covered by automated tests, be sure to add passing tests that cover your changes and assert expected behavior and state. Submit the additional test cases as part of your change set.
+- _Style:_ Match your approach to **naming** and **formatting** with the surrounding code. Basically, the code you submit shouldn't stand out.
+ - "Naming" refers to such constructs as variables, methods, functions, classes, structs, interfaces, packages, modules, directories, files, etc...
+ - "Formatting" refers to such constructs as whitespace, horizontal line length, vertical function length, vertical file length, indentation, curly braces, etc...
diff --git a/vendor/github.com/smartystreets/assertions/LICENSE.md b/vendor/github.com/smartystreets/assertions/LICENSE.md
new file mode 100644
index 0000000..8ea6f94
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/LICENSE.md
@@ -0,0 +1,23 @@
+Copyright (c) 2016 SmartyStreets, LLC
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+NOTE: Various optional and subordinate components carry their own licensing
+requirements and restrictions. Use of those components is subject to the terms
+and conditions outlined the respective license of each component.
diff --git a/vendor/github.com/smartystreets/assertions/README.md b/vendor/github.com/smartystreets/assertions/README.md
new file mode 100644
index 0000000..58e51e9
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/README.md
@@ -0,0 +1,611 @@
+# assertions
+--
+ import "github.com/smartystreets/assertions"
+
+Package assertions contains the implementations for all assertions which are
+referenced in goconvey's `convey` package
+(github.com/smartystreets/goconvey/convey) and gunit
+(github.com/smartystreets/gunit) for use with the So(...) method. They can also
+be used in traditional Go test functions and even in applications.
+
+https://smartystreets.com
+
+Many of the assertions lean heavily on work done by Aaron Jacobs in his
+excellent oglematchers library. (https://github.com/jacobsa/oglematchers) The
+ShouldResemble assertion leans heavily on work done by Daniel Jacques in his
+very helpful go-render library. (https://github.com/luci/go-render)
+
+## Usage
+
+#### func GoConveyMode
+
+```go
+func GoConveyMode(yes bool)
+```
+GoConveyMode provides control over JSON serialization of failures. When using
+the assertions in this package from the convey package JSON results are very
+helpful and can be rendered in a DIFF view. In that case, this function will be
+called with a true value to enable the JSON serialization. By default, the
+assertions in this package will not serializer a JSON result, making standalone
+usage more convenient.
+
+#### func ShouldAlmostEqual
+
+```go
+func ShouldAlmostEqual(actual interface{}, expected ...interface{}) string
+```
+ShouldAlmostEqual makes sure that two parameters are close enough to being
+equal. The acceptable delta may be specified with a third argument, or a very
+small default delta will be used.
+
+#### func ShouldBeBetween
+
+```go
+func ShouldBeBetween(actual interface{}, expected ...interface{}) string
+```
+ShouldBeBetween receives exactly three parameters: an actual value, a lower
+bound, and an upper bound. It ensures that the actual value is between both
+bounds (but not equal to either of them).
+
+#### func ShouldBeBetweenOrEqual
+
+```go
+func ShouldBeBetweenOrEqual(actual interface{}, expected ...interface{}) string
+```
+ShouldBeBetweenOrEqual receives exactly three parameters: an actual value, a
+lower bound, and an upper bound. It ensures that the actual value is between
+both bounds or equal to one of them.
+
+#### func ShouldBeBlank
+
+```go
+func ShouldBeBlank(actual interface{}, expected ...interface{}) string
+```
+ShouldBeBlank receives exactly 1 string parameter and ensures that it is equal
+to "".
+
+#### func ShouldBeChronological
+
+```go
+func ShouldBeChronological(actual interface{}, expected ...interface{}) string
+```
+ShouldBeChronological receives a []time.Time slice and asserts that the are in
+chronological order starting with the first time.Time as the earliest.
+
+#### func ShouldBeEmpty
+
+```go
+func ShouldBeEmpty(actual interface{}, expected ...interface{}) string
+```
+ShouldBeEmpty receives a single parameter (actual) and determines whether or not
+calling len(actual) would return `0`. It obeys the rules specified by the len
+function for determining length: http://golang.org/pkg/builtin/#len
+
+#### func ShouldBeError
+
+```go
+func ShouldBeError(actual interface{}, expected ...interface{}) string
+```
+ShouldBeError asserts that the first argument implements the error interface. It
+also compares the first argument against the second argument if provided (which
+must be an error message string or another error value).
+
+#### func ShouldBeFalse
+
+```go
+func ShouldBeFalse(actual interface{}, expected ...interface{}) string
+```
+ShouldBeFalse receives a single parameter and ensures that it is false.
+
+#### func ShouldBeGreaterThan
+
+```go
+func ShouldBeGreaterThan(actual interface{}, expected ...interface{}) string
+```
+ShouldBeGreaterThan receives exactly two parameters and ensures that the first
+is greater than the second.
+
+#### func ShouldBeGreaterThanOrEqualTo
+
+```go
+func ShouldBeGreaterThanOrEqualTo(actual interface{}, expected ...interface{}) string
+```
+ShouldBeGreaterThanOrEqualTo receives exactly two parameters and ensures that
+the first is greater than or equal to the second.
+
+#### func ShouldBeIn
+
+```go
+func ShouldBeIn(actual interface{}, expected ...interface{}) string
+```
+ShouldBeIn receives at least 2 parameters. The first is a proposed member of the
+collection that is passed in either as the second parameter, or of the
+collection that is comprised of all the remaining parameters. This assertion
+ensures that the proposed member is in the collection (using ShouldEqual).
+
+#### func ShouldBeLessThan
+
+```go
+func ShouldBeLessThan(actual interface{}, expected ...interface{}) string
+```
+ShouldBeLessThan receives exactly two parameters and ensures that the first is
+less than the second.
+
+#### func ShouldBeLessThanOrEqualTo
+
+```go
+func ShouldBeLessThanOrEqualTo(actual interface{}, expected ...interface{}) string
+```
+ShouldBeLessThan receives exactly two parameters and ensures that the first is
+less than or equal to the second.
+
+#### func ShouldBeNil
+
+```go
+func ShouldBeNil(actual interface{}, expected ...interface{}) string
+```
+ShouldBeNil receives a single parameter and ensures that it is nil.
+
+#### func ShouldBeTrue
+
+```go
+func ShouldBeTrue(actual interface{}, expected ...interface{}) string
+```
+ShouldBeTrue receives a single parameter and ensures that it is true.
+
+#### func ShouldBeZeroValue
+
+```go
+func ShouldBeZeroValue(actual interface{}, expected ...interface{}) string
+```
+ShouldBeZeroValue receives a single parameter and ensures that it is the Go
+equivalent of the default value, or "zero" value.
+
+#### func ShouldContain
+
+```go
+func ShouldContain(actual interface{}, expected ...interface{}) string
+```
+ShouldContain receives exactly two parameters. The first is a slice and the
+second is a proposed member. Membership is determined using ShouldEqual.
+
+#### func ShouldContainKey
+
+```go
+func ShouldContainKey(actual interface{}, expected ...interface{}) string
+```
+ShouldContainKey receives exactly two parameters. The first is a map and the
+second is a proposed key. Keys are compared with a simple '=='.
+
+#### func ShouldContainSubstring
+
+```go
+func ShouldContainSubstring(actual interface{}, expected ...interface{}) string
+```
+ShouldContainSubstring receives exactly 2 string parameters and ensures that the
+first contains the second as a substring.
+
+#### func ShouldEndWith
+
+```go
+func ShouldEndWith(actual interface{}, expected ...interface{}) string
+```
+ShouldEndWith receives exactly 2 string parameters and ensures that the first
+ends with the second.
+
+#### func ShouldEqual
+
+```go
+func ShouldEqual(actual interface{}, expected ...interface{}) string
+```
+ShouldEqual receives exactly two parameters and does an equality check using the
+following semantics: 1. If the expected and actual values implement an Equal
+method in the form `func (this T) Equal(that T) bool` then call the method. If
+true, they are equal. 2. The expected and actual values are judged equal or not
+by oglematchers.Equals.
+
+#### func ShouldEqualJSON
+
+```go
+func ShouldEqualJSON(actual interface{}, expected ...interface{}) string
+```
+ShouldEqualJSON receives exactly two parameters and does an equality check by
+marshalling to JSON
+
+#### func ShouldEqualTrimSpace
+
+```go
+func ShouldEqualTrimSpace(actual interface{}, expected ...interface{}) string
+```
+ShouldEqualTrimSpace receives exactly 2 string parameters and ensures that the
+first is equal to the second after removing all leading and trailing whitespace
+using strings.TrimSpace(first).
+
+#### func ShouldEqualWithout
+
+```go
+func ShouldEqualWithout(actual interface{}, expected ...interface{}) string
+```
+ShouldEqualWithout receives exactly 3 string parameters and ensures that the
+first is equal to the second after removing all instances of the third from the
+first using strings.Replace(first, third, "", -1).
+
+#### func ShouldHappenAfter
+
+```go
+func ShouldHappenAfter(actual interface{}, expected ...interface{}) string
+```
+ShouldHappenAfter receives exactly 2 time.Time arguments and asserts that the
+first happens after the second.
+
+#### func ShouldHappenBefore
+
+```go
+func ShouldHappenBefore(actual interface{}, expected ...interface{}) string
+```
+ShouldHappenBefore receives exactly 2 time.Time arguments and asserts that the
+first happens before the second.
+
+#### func ShouldHappenBetween
+
+```go
+func ShouldHappenBetween(actual interface{}, expected ...interface{}) string
+```
+ShouldHappenBetween receives exactly 3 time.Time arguments and asserts that the
+first happens between (not on) the second and third.
+
+#### func ShouldHappenOnOrAfter
+
+```go
+func ShouldHappenOnOrAfter(actual interface{}, expected ...interface{}) string
+```
+ShouldHappenOnOrAfter receives exactly 2 time.Time arguments and asserts that
+the first happens on or after the second.
+
+#### func ShouldHappenOnOrBefore
+
+```go
+func ShouldHappenOnOrBefore(actual interface{}, expected ...interface{}) string
+```
+ShouldHappenOnOrBefore receives exactly 2 time.Time arguments and asserts that
+the first happens on or before the second.
+
+#### func ShouldHappenOnOrBetween
+
+```go
+func ShouldHappenOnOrBetween(actual interface{}, expected ...interface{}) string
+```
+ShouldHappenOnOrBetween receives exactly 3 time.Time arguments and asserts that
+the first happens between or on the second and third.
+
+#### func ShouldHappenWithin
+
+```go
+func ShouldHappenWithin(actual interface{}, expected ...interface{}) string
+```
+ShouldHappenWithin receives a time.Time, a time.Duration, and a time.Time (3
+arguments) and asserts that the first time.Time happens within or on the
+duration specified relative to the other time.Time.
+
+#### func ShouldHaveLength
+
+```go
+func ShouldHaveLength(actual interface{}, expected ...interface{}) string
+```
+ShouldHaveLength receives 2 parameters. The first is a collection to check the
+length of, the second being the expected length. It obeys the rules specified by
+the len function for determining length: http://golang.org/pkg/builtin/#len
+
+#### func ShouldHaveSameTypeAs
+
+```go
+func ShouldHaveSameTypeAs(actual interface{}, expected ...interface{}) string
+```
+ShouldHaveSameTypeAs receives exactly two parameters and compares their
+underlying types for equality.
+
+#### func ShouldImplement
+
+```go
+func ShouldImplement(actual interface{}, expectedList ...interface{}) string
+```
+ShouldImplement receives exactly two parameters and ensures that the first
+implements the interface type of the second.
+
+#### func ShouldNotAlmostEqual
+
+```go
+func ShouldNotAlmostEqual(actual interface{}, expected ...interface{}) string
+```
+ShouldNotAlmostEqual is the inverse of ShouldAlmostEqual
+
+#### func ShouldNotBeBetween
+
+```go
+func ShouldNotBeBetween(actual interface{}, expected ...interface{}) string
+```
+ShouldNotBeBetween receives exactly three parameters: an actual value, a lower
+bound, and an upper bound. It ensures that the actual value is NOT between both
+bounds.
+
+#### func ShouldNotBeBetweenOrEqual
+
+```go
+func ShouldNotBeBetweenOrEqual(actual interface{}, expected ...interface{}) string
+```
+ShouldNotBeBetweenOrEqual receives exactly three parameters: an actual value, a
+lower bound, and an upper bound. It ensures that the actual value is nopt
+between the bounds nor equal to either of them.
+
+#### func ShouldNotBeBlank
+
+```go
+func ShouldNotBeBlank(actual interface{}, expected ...interface{}) string
+```
+ShouldNotBeBlank receives exactly 1 string parameter and ensures that it is
+equal to "".
+
+#### func ShouldNotBeEmpty
+
+```go
+func ShouldNotBeEmpty(actual interface{}, expected ...interface{}) string
+```
+ShouldNotBeEmpty receives a single parameter (actual) and determines whether or
+not calling len(actual) would return a value greater than zero. It obeys the
+rules specified by the `len` function for determining length:
+http://golang.org/pkg/builtin/#len
+
+#### func ShouldNotBeIn
+
+```go
+func ShouldNotBeIn(actual interface{}, expected ...interface{}) string
+```
+ShouldNotBeIn receives at least 2 parameters. The first is a proposed member of
+the collection that is passed in either as the second parameter, or of the
+collection that is comprised of all the remaining parameters. This assertion
+ensures that the proposed member is NOT in the collection (using ShouldEqual).
+
+#### func ShouldNotBeNil
+
+```go
+func ShouldNotBeNil(actual interface{}, expected ...interface{}) string
+```
+ShouldNotBeNil receives a single parameter and ensures that it is not nil.
+
+#### func ShouldNotBeZeroValue
+
+```go
+func ShouldNotBeZeroValue(actual interface{}, expected ...interface{}) string
+```
+ShouldBeZeroValue receives a single parameter and ensures that it is NOT the Go
+equivalent of the default value, or "zero" value.
+
+#### func ShouldNotContain
+
+```go
+func ShouldNotContain(actual interface{}, expected ...interface{}) string
+```
+ShouldNotContain receives exactly two parameters. The first is a slice and the
+second is a proposed member. Membership is determinied using ShouldEqual.
+
+#### func ShouldNotContainKey
+
+```go
+func ShouldNotContainKey(actual interface{}, expected ...interface{}) string
+```
+ShouldNotContainKey receives exactly two parameters. The first is a map and the
+second is a proposed absent key. Keys are compared with a simple '=='.
+
+#### func ShouldNotContainSubstring
+
+```go
+func ShouldNotContainSubstring(actual interface{}, expected ...interface{}) string
+```
+ShouldNotContainSubstring receives exactly 2 string parameters and ensures that
+the first does NOT contain the second as a substring.
+
+#### func ShouldNotEndWith
+
+```go
+func ShouldNotEndWith(actual interface{}, expected ...interface{}) string
+```
+ShouldEndWith receives exactly 2 string parameters and ensures that the first
+does not end with the second.
+
+#### func ShouldNotEqual
+
+```go
+func ShouldNotEqual(actual interface{}, expected ...interface{}) string
+```
+ShouldNotEqual receives exactly two parameters and does an inequality check. See
+ShouldEqual for details on how equality is determined.
+
+#### func ShouldNotHappenOnOrBetween
+
+```go
+func ShouldNotHappenOnOrBetween(actual interface{}, expected ...interface{}) string
+```
+ShouldNotHappenOnOrBetween receives exactly 3 time.Time arguments and asserts
+that the first does NOT happen between or on the second or third.
+
+#### func ShouldNotHappenWithin
+
+```go
+func ShouldNotHappenWithin(actual interface{}, expected ...interface{}) string
+```
+ShouldNotHappenWithin receives a time.Time, a time.Duration, and a time.Time (3
+arguments) and asserts that the first time.Time does NOT happen within or on the
+duration specified relative to the other time.Time.
+
+#### func ShouldNotHaveSameTypeAs
+
+```go
+func ShouldNotHaveSameTypeAs(actual interface{}, expected ...interface{}) string
+```
+ShouldNotHaveSameTypeAs receives exactly two parameters and compares their
+underlying types for inequality.
+
+#### func ShouldNotImplement
+
+```go
+func ShouldNotImplement(actual interface{}, expectedList ...interface{}) string
+```
+ShouldNotImplement receives exactly two parameters and ensures that the first
+does NOT implement the interface type of the second.
+
+#### func ShouldNotPanic
+
+```go
+func ShouldNotPanic(actual interface{}, expected ...interface{}) (message string)
+```
+ShouldNotPanic receives a void, niladic function and expects to execute the
+function without any panic.
+
+#### func ShouldNotPanicWith
+
+```go
+func ShouldNotPanicWith(actual interface{}, expected ...interface{}) (message string)
+```
+ShouldNotPanicWith receives a void, niladic function and expects to recover a
+panic whose content differs from the second argument.
+
+#### func ShouldNotPointTo
+
+```go
+func ShouldNotPointTo(actual interface{}, expected ...interface{}) string
+```
+ShouldNotPointTo receives exactly two parameters and checks to see that they
+point to different addresess.
+
+#### func ShouldNotResemble
+
+```go
+func ShouldNotResemble(actual interface{}, expected ...interface{}) string
+```
+ShouldNotResemble receives exactly two parameters and does an inverse deep equal
+check (see reflect.DeepEqual)
+
+#### func ShouldNotStartWith
+
+```go
+func ShouldNotStartWith(actual interface{}, expected ...interface{}) string
+```
+ShouldNotStartWith receives exactly 2 string parameters and ensures that the
+first does not start with the second.
+
+#### func ShouldPanic
+
+```go
+func ShouldPanic(actual interface{}, expected ...interface{}) (message string)
+```
+ShouldPanic receives a void, niladic function and expects to recover a panic.
+
+#### func ShouldPanicWith
+
+```go
+func ShouldPanicWith(actual interface{}, expected ...interface{}) (message string)
+```
+ShouldPanicWith receives a void, niladic function and expects to recover a panic
+with the second argument as the content.
+
+#### func ShouldPointTo
+
+```go
+func ShouldPointTo(actual interface{}, expected ...interface{}) string
+```
+ShouldPointTo receives exactly two parameters and checks to see that they point
+to the same address.
+
+#### func ShouldResemble
+
+```go
+func ShouldResemble(actual interface{}, expected ...interface{}) string
+```
+ShouldResemble receives exactly two parameters and does a deep equal check (see
+reflect.DeepEqual)
+
+#### func ShouldStartWith
+
+```go
+func ShouldStartWith(actual interface{}, expected ...interface{}) string
+```
+ShouldStartWith receives exactly 2 string parameters and ensures that the first
+starts with the second.
+
+#### func So
+
+```go
+func So(actual interface{}, assert assertion, expected ...interface{}) (bool, string)
+```
+So is a convenience function (as opposed to an inconvenience function?) for
+running assertions on arbitrary arguments in any context, be it for testing or
+even application logging. It allows you to perform assertion-like behavior (and
+get nicely formatted messages detailing discrepancies) but without the program
+blowing up or panicking. All that is required is to import this package and call
+`So` with one of the assertions exported by this package as the second
+parameter. The first return parameter is a boolean indicating if the assertion
+was true. The second return parameter is the well-formatted message showing why
+an assertion was incorrect, or blank if the assertion was correct.
+
+Example:
+
+ if ok, message := So(x, ShouldBeGreaterThan, y); !ok {
+ log.Println(message)
+ }
+
+For an alternative implementation of So (that provides more flexible return
+options) see the `So` function in the package at
+github.com/smartystreets/assertions/assert.
+
+#### type Assertion
+
+```go
+type Assertion struct {
+}
+```
+
+
+#### func New
+
+```go
+func New(t testingT) *Assertion
+```
+New swallows the *testing.T struct and prints failed assertions using t.Error.
+Example: assertions.New(t).So(1, should.Equal, 1)
+
+#### func (*Assertion) Failed
+
+```go
+func (this *Assertion) Failed() bool
+```
+Failed reports whether any calls to So (on this Assertion instance) have failed.
+
+#### func (*Assertion) So
+
+```go
+func (this *Assertion) So(actual interface{}, assert assertion, expected ...interface{}) bool
+```
+So calls the standalone So function and additionally, calls t.Error in failure
+scenarios.
+
+#### type FailureView
+
+```go
+type FailureView struct {
+ Message string `json:"Message"`
+ Expected string `json:"Expected"`
+ Actual string `json:"Actual"`
+}
+```
+
+This struct is also declared in
+github.com/smartystreets/goconvey/convey/reporting. The json struct tags should
+be equal in both declarations.
+
+#### type Serializer
+
+```go
+type Serializer interface {
+ // contains filtered or unexported methods
+}
+```
diff --git a/vendor/github.com/smartystreets/assertions/collections.go b/vendor/github.com/smartystreets/assertions/collections.go
new file mode 100644
index 0000000..b534d4b
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/collections.go
@@ -0,0 +1,244 @@
+package assertions
+
+import (
+ "fmt"
+ "reflect"
+
+ "github.com/smartystreets/assertions/internal/oglematchers"
+)
+
+// ShouldContain receives exactly two parameters. The first is a slice and the
+// second is a proposed member. Membership is determined using ShouldEqual.
+func ShouldContain(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ if matchError := oglematchers.Contains(expected[0]).Matches(actual); matchError != nil {
+ typeName := reflect.TypeOf(actual)
+
+ if fmt.Sprintf("%v", matchError) == "which is not a slice or array" {
+ return fmt.Sprintf(shouldHaveBeenAValidCollection, typeName)
+ }
+ return fmt.Sprintf(shouldHaveContained, typeName, expected[0])
+ }
+ return success
+}
+
+// ShouldNotContain receives exactly two parameters. The first is a slice and the
+// second is a proposed member. Membership is determinied using ShouldEqual.
+func ShouldNotContain(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+ typeName := reflect.TypeOf(actual)
+
+ if matchError := oglematchers.Contains(expected[0]).Matches(actual); matchError != nil {
+ if fmt.Sprintf("%v", matchError) == "which is not a slice or array" {
+ return fmt.Sprintf(shouldHaveBeenAValidCollection, typeName)
+ }
+ return success
+ }
+ return fmt.Sprintf(shouldNotHaveContained, typeName, expected[0])
+}
+
+// ShouldContainKey receives exactly two parameters. The first is a map and the
+// second is a proposed key. Keys are compared with a simple '=='.
+func ShouldContainKey(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ keys, isMap := mapKeys(actual)
+ if !isMap {
+ return fmt.Sprintf(shouldHaveBeenAValidMap, reflect.TypeOf(actual))
+ }
+
+ if !keyFound(keys, expected[0]) {
+ return fmt.Sprintf(shouldHaveContainedKey, reflect.TypeOf(actual), expected)
+ }
+
+ return ""
+}
+
+// ShouldNotContainKey receives exactly two parameters. The first is a map and the
+// second is a proposed absent key. Keys are compared with a simple '=='.
+func ShouldNotContainKey(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ keys, isMap := mapKeys(actual)
+ if !isMap {
+ return fmt.Sprintf(shouldHaveBeenAValidMap, reflect.TypeOf(actual))
+ }
+
+ if keyFound(keys, expected[0]) {
+ return fmt.Sprintf(shouldNotHaveContainedKey, reflect.TypeOf(actual), expected)
+ }
+
+ return ""
+}
+
+func mapKeys(m interface{}) ([]reflect.Value, bool) {
+ value := reflect.ValueOf(m)
+ if value.Kind() != reflect.Map {
+ return nil, false
+ }
+ return value.MapKeys(), true
+}
+func keyFound(keys []reflect.Value, expectedKey interface{}) bool {
+ found := false
+ for _, key := range keys {
+ if key.Interface() == expectedKey {
+ found = true
+ }
+ }
+ return found
+}
+
+// ShouldBeIn receives at least 2 parameters. The first is a proposed member of the collection
+// that is passed in either as the second parameter, or of the collection that is comprised
+// of all the remaining parameters. This assertion ensures that the proposed member is in
+// the collection (using ShouldEqual).
+func ShouldBeIn(actual interface{}, expected ...interface{}) string {
+ if fail := atLeast(1, expected); fail != success {
+ return fail
+ }
+
+ if len(expected) == 1 {
+ return shouldBeIn(actual, expected[0])
+ }
+ return shouldBeIn(actual, expected)
+}
+func shouldBeIn(actual interface{}, expected interface{}) string {
+ if matchError := oglematchers.Contains(actual).Matches(expected); matchError != nil {
+ return fmt.Sprintf(shouldHaveBeenIn, actual, reflect.TypeOf(expected))
+ }
+ return success
+}
+
+// ShouldNotBeIn receives at least 2 parameters. The first is a proposed member of the collection
+// that is passed in either as the second parameter, or of the collection that is comprised
+// of all the remaining parameters. This assertion ensures that the proposed member is NOT in
+// the collection (using ShouldEqual).
+func ShouldNotBeIn(actual interface{}, expected ...interface{}) string {
+ if fail := atLeast(1, expected); fail != success {
+ return fail
+ }
+
+ if len(expected) == 1 {
+ return shouldNotBeIn(actual, expected[0])
+ }
+ return shouldNotBeIn(actual, expected)
+}
+func shouldNotBeIn(actual interface{}, expected interface{}) string {
+ if matchError := oglematchers.Contains(actual).Matches(expected); matchError == nil {
+ return fmt.Sprintf(shouldNotHaveBeenIn, actual, reflect.TypeOf(expected))
+ }
+ return success
+}
+
+// ShouldBeEmpty receives a single parameter (actual) and determines whether or not
+// calling len(actual) would return `0`. It obeys the rules specified by the len
+// function for determining length: http://golang.org/pkg/builtin/#len
+func ShouldBeEmpty(actual interface{}, expected ...interface{}) string {
+ if fail := need(0, expected); fail != success {
+ return fail
+ }
+
+ if actual == nil {
+ return success
+ }
+
+ value := reflect.ValueOf(actual)
+ switch value.Kind() {
+ case reflect.Slice:
+ if value.Len() == 0 {
+ return success
+ }
+ case reflect.Chan:
+ if value.Len() == 0 {
+ return success
+ }
+ case reflect.Map:
+ if value.Len() == 0 {
+ return success
+ }
+ case reflect.String:
+ if value.Len() == 0 {
+ return success
+ }
+ case reflect.Ptr:
+ elem := value.Elem()
+ kind := elem.Kind()
+ if (kind == reflect.Slice || kind == reflect.Array) && elem.Len() == 0 {
+ return success
+ }
+ }
+
+ return fmt.Sprintf(shouldHaveBeenEmpty, actual)
+}
+
+// ShouldNotBeEmpty receives a single parameter (actual) and determines whether or not
+// calling len(actual) would return a value greater than zero. It obeys the rules
+// specified by the `len` function for determining length: http://golang.org/pkg/builtin/#len
+func ShouldNotBeEmpty(actual interface{}, expected ...interface{}) string {
+ if fail := need(0, expected); fail != success {
+ return fail
+ }
+
+ if empty := ShouldBeEmpty(actual, expected...); empty != success {
+ return success
+ }
+ return fmt.Sprintf(shouldNotHaveBeenEmpty, actual)
+}
+
+// ShouldHaveLength receives 2 parameters. The first is a collection to check
+// the length of, the second being the expected length. It obeys the rules
+// specified by the len function for determining length:
+// http://golang.org/pkg/builtin/#len
+func ShouldHaveLength(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ var expectedLen int64
+ lenValue := reflect.ValueOf(expected[0])
+ switch lenValue.Kind() {
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ expectedLen = lenValue.Int()
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ expectedLen = int64(lenValue.Uint())
+ default:
+ return fmt.Sprintf(shouldHaveBeenAValidInteger, reflect.TypeOf(expected[0]))
+ }
+
+ if expectedLen < 0 {
+ return fmt.Sprintf(shouldHaveBeenAValidLength, expected[0])
+ }
+
+ value := reflect.ValueOf(actual)
+ switch value.Kind() {
+ case reflect.Slice,
+ reflect.Chan,
+ reflect.Map,
+ reflect.String:
+ if int64(value.Len()) == expectedLen {
+ return success
+ } else {
+ return fmt.Sprintf(shouldHaveHadLength, expectedLen, value.Len(), actual)
+ }
+ case reflect.Ptr:
+ elem := value.Elem()
+ kind := elem.Kind()
+ if kind == reflect.Slice || kind == reflect.Array {
+ if int64(elem.Len()) == expectedLen {
+ return success
+ } else {
+ return fmt.Sprintf(shouldHaveHadLength, expectedLen, elem.Len(), actual)
+ }
+ }
+ }
+ return fmt.Sprintf(shouldHaveBeenAValidCollection, reflect.TypeOf(actual))
+}
diff --git a/vendor/github.com/smartystreets/assertions/doc.go b/vendor/github.com/smartystreets/assertions/doc.go
new file mode 100644
index 0000000..ba30a92
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/doc.go
@@ -0,0 +1,109 @@
+// Package assertions contains the implementations for all assertions which
+// are referenced in goconvey's `convey` package
+// (github.com/smartystreets/goconvey/convey) and gunit (github.com/smartystreets/gunit)
+// for use with the So(...) method.
+// They can also be used in traditional Go test functions and even in
+// applications.
+//
+// https://smartystreets.com
+//
+// Many of the assertions lean heavily on work done by Aaron Jacobs in his excellent oglematchers library.
+// (https://github.com/jacobsa/oglematchers)
+// The ShouldResemble assertion leans heavily on work done by Daniel Jacques in his very helpful go-render library.
+// (https://github.com/luci/go-render)
+package assertions
+
+import (
+ "fmt"
+ "runtime"
+)
+
+// By default we use a no-op serializer. The actual Serializer provides a JSON
+// representation of failure results on selected assertions so the goconvey
+// web UI can display a convenient diff.
+var serializer Serializer = new(noopSerializer)
+
+// GoConveyMode provides control over JSON serialization of failures. When
+// using the assertions in this package from the convey package JSON results
+// are very helpful and can be rendered in a DIFF view. In that case, this function
+// will be called with a true value to enable the JSON serialization. By default,
+// the assertions in this package will not serializer a JSON result, making
+// standalone usage more convenient.
+func GoConveyMode(yes bool) {
+ if yes {
+ serializer = newSerializer()
+ } else {
+ serializer = new(noopSerializer)
+ }
+}
+
+type testingT interface {
+ Error(args ...interface{})
+}
+
+type Assertion struct {
+ t testingT
+ failed bool
+}
+
+// New swallows the *testing.T struct and prints failed assertions using t.Error.
+// Example: assertions.New(t).So(1, should.Equal, 1)
+func New(t testingT) *Assertion {
+ return &Assertion{t: t}
+}
+
+// Failed reports whether any calls to So (on this Assertion instance) have failed.
+func (this *Assertion) Failed() bool {
+ return this.failed
+}
+
+// So calls the standalone So function and additionally, calls t.Error in failure scenarios.
+func (this *Assertion) So(actual interface{}, assert assertion, expected ...interface{}) bool {
+ ok, result := So(actual, assert, expected...)
+ if !ok {
+ this.failed = true
+ _, file, line, _ := runtime.Caller(1)
+ this.t.Error(fmt.Sprintf("\n%s:%d\n%s", file, line, result))
+ }
+ return ok
+}
+
+// So is a convenience function (as opposed to an inconvenience function?)
+// for running assertions on arbitrary arguments in any context, be it for testing or even
+// application logging. It allows you to perform assertion-like behavior (and get nicely
+// formatted messages detailing discrepancies) but without the program blowing up or panicking.
+// All that is required is to import this package and call `So` with one of the assertions
+// exported by this package as the second parameter.
+// The first return parameter is a boolean indicating if the assertion was true. The second
+// return parameter is the well-formatted message showing why an assertion was incorrect, or
+// blank if the assertion was correct.
+//
+// Example:
+//
+// if ok, message := So(x, ShouldBeGreaterThan, y); !ok {
+// log.Println(message)
+// }
+//
+// For an alternative implementation of So (that provides more flexible return options)
+// see the `So` function in the package at github.com/smartystreets/assertions/assert.
+func So(actual interface{}, assert assertion, expected ...interface{}) (bool, string) {
+ if result := so(actual, assert, expected...); len(result) == 0 {
+ return true, result
+ } else {
+ return false, result
+ }
+}
+
+// so is like So, except that it only returns the string message, which is blank if the
+// assertion passed. Used to facilitate testing.
+func so(actual interface{}, assert func(interface{}, ...interface{}) string, expected ...interface{}) string {
+ return assert(actual, expected...)
+}
+
+// assertion is an alias for a function with a signature that the So()
+// function can handle. Any future or custom assertions should conform to this
+// method signature. The return value should be an empty string if the assertion
+// passes and a well-formed failure message if not.
+type assertion func(actual interface{}, expected ...interface{}) string
+
+////////////////////////////////////////////////////////////////////////////
diff --git a/vendor/github.com/smartystreets/assertions/equal_method.go b/vendor/github.com/smartystreets/assertions/equal_method.go
new file mode 100644
index 0000000..c4fc38f
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/equal_method.go
@@ -0,0 +1,75 @@
+package assertions
+
+import "reflect"
+
+type equalityMethodSpecification struct {
+ a interface{}
+ b interface{}
+
+ aType reflect.Type
+ bType reflect.Type
+
+ equalMethod reflect.Value
+}
+
+func newEqualityMethodSpecification(a, b interface{}) *equalityMethodSpecification {
+ return &equalityMethodSpecification{
+ a: a,
+ b: b,
+ }
+}
+
+func (this *equalityMethodSpecification) IsSatisfied() bool {
+ if !this.bothAreSameType() {
+ return false
+ }
+ if !this.typeHasEqualMethod() {
+ return false
+ }
+ if !this.equalMethodReceivesSameTypeForComparison() {
+ return false
+ }
+ if !this.equalMethodReturnsBool() {
+ return false
+ }
+ return true
+}
+
+func (this *equalityMethodSpecification) bothAreSameType() bool {
+ this.aType = reflect.TypeOf(this.a)
+ if this.aType == nil {
+ return false
+ }
+ if this.aType.Kind() == reflect.Ptr {
+ this.aType = this.aType.Elem()
+ }
+ this.bType = reflect.TypeOf(this.b)
+ return this.aType == this.bType
+}
+func (this *equalityMethodSpecification) typeHasEqualMethod() bool {
+ aInstance := reflect.ValueOf(this.a)
+ this.equalMethod = aInstance.MethodByName("Equal")
+ return this.equalMethod != reflect.Value{}
+}
+
+func (this *equalityMethodSpecification) equalMethodReceivesSameTypeForComparison() bool {
+ signature := this.equalMethod.Type()
+ return signature.NumIn() == 1 && signature.In(0) == this.aType
+}
+
+func (this *equalityMethodSpecification) equalMethodReturnsBool() bool {
+ signature := this.equalMethod.Type()
+ return signature.NumOut() == 1 && signature.Out(0) == reflect.TypeOf(true)
+}
+
+func (this *equalityMethodSpecification) AreEqual() bool {
+ a := reflect.ValueOf(this.a)
+ b := reflect.ValueOf(this.b)
+ return areEqual(a, b) && areEqual(b, a)
+}
+func areEqual(receiver reflect.Value, argument reflect.Value) bool {
+ equalMethod := receiver.MethodByName("Equal")
+ argumentList := []reflect.Value{argument}
+ result := equalMethod.Call(argumentList)
+ return result[0].Bool()
+}
diff --git a/vendor/github.com/smartystreets/assertions/equality.go b/vendor/github.com/smartystreets/assertions/equality.go
new file mode 100644
index 0000000..6c10d24
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/equality.go
@@ -0,0 +1,328 @@
+package assertions
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ "math"
+ "reflect"
+ "strings"
+
+ "github.com/smartystreets/assertions/internal/go-render/render"
+ "github.com/smartystreets/assertions/internal/oglematchers"
+)
+
+// ShouldEqual receives exactly two parameters and does an equality check
+// using the following semantics:
+// 1. If the expected and actual values implement an Equal method in the form
+// `func (this T) Equal(that T) bool` then call the method. If true, they are equal.
+// 2. The expected and actual values are judged equal or not by oglematchers.Equals.
+func ShouldEqual(actual interface{}, expected ...interface{}) string {
+ if message := need(1, expected); message != success {
+ return message
+ }
+ return shouldEqual(actual, expected[0])
+}
+func shouldEqual(actual, expected interface{}) (message string) {
+ defer func() {
+ if r := recover(); r != nil {
+ message = serializer.serialize(expected, actual, fmt.Sprintf(shouldHaveBeenEqual, expected, actual))
+ }
+ }()
+
+ if specification := newEqualityMethodSpecification(expected, actual); specification.IsSatisfied() {
+ if specification.AreEqual() {
+ return success
+ } else {
+ message = fmt.Sprintf(shouldHaveBeenEqual, expected, actual)
+ return serializer.serialize(expected, actual, message)
+ }
+ }
+ if matchError := oglematchers.Equals(expected).Matches(actual); matchError != nil {
+ expectedSyntax := fmt.Sprintf("%v", expected)
+ actualSyntax := fmt.Sprintf("%v", actual)
+ if expectedSyntax == actualSyntax && reflect.TypeOf(expected) != reflect.TypeOf(actual) {
+ message = fmt.Sprintf(shouldHaveBeenEqualTypeMismatch, expected, expected, actual, actual)
+ } else {
+ message = fmt.Sprintf(shouldHaveBeenEqual, expected, actual)
+ }
+ return serializer.serialize(expected, actual, message)
+ }
+
+ return success
+}
+
+// ShouldNotEqual receives exactly two parameters and does an inequality check.
+// See ShouldEqual for details on how equality is determined.
+func ShouldNotEqual(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ } else if ShouldEqual(actual, expected[0]) == success {
+ return fmt.Sprintf(shouldNotHaveBeenEqual, actual, expected[0])
+ }
+ return success
+}
+
+// ShouldAlmostEqual makes sure that two parameters are close enough to being equal.
+// The acceptable delta may be specified with a third argument,
+// or a very small default delta will be used.
+func ShouldAlmostEqual(actual interface{}, expected ...interface{}) string {
+ actualFloat, expectedFloat, deltaFloat, err := cleanAlmostEqualInput(actual, expected...)
+
+ if err != "" {
+ return err
+ }
+
+ if math.Abs(actualFloat-expectedFloat) <= deltaFloat {
+ return success
+ } else {
+ return fmt.Sprintf(shouldHaveBeenAlmostEqual, actualFloat, expectedFloat)
+ }
+}
+
+// ShouldNotAlmostEqual is the inverse of ShouldAlmostEqual
+func ShouldNotAlmostEqual(actual interface{}, expected ...interface{}) string {
+ actualFloat, expectedFloat, deltaFloat, err := cleanAlmostEqualInput(actual, expected...)
+
+ if err != "" {
+ return err
+ }
+
+ if math.Abs(actualFloat-expectedFloat) > deltaFloat {
+ return success
+ } else {
+ return fmt.Sprintf(shouldHaveNotBeenAlmostEqual, actualFloat, expectedFloat)
+ }
+}
+
+func cleanAlmostEqualInput(actual interface{}, expected ...interface{}) (float64, float64, float64, string) {
+ deltaFloat := 0.0000000001
+
+ if len(expected) == 0 {
+ return 0.0, 0.0, 0.0, "This assertion requires exactly one comparison value and an optional delta (you provided neither)"
+ } else if len(expected) == 2 {
+ delta, err := getFloat(expected[1])
+
+ if err != nil {
+ return 0.0, 0.0, 0.0, "The delta value " + err.Error()
+ }
+
+ deltaFloat = delta
+ } else if len(expected) > 2 {
+ return 0.0, 0.0, 0.0, "This assertion requires exactly one comparison value and an optional delta (you provided more values)"
+ }
+
+ actualFloat, err := getFloat(actual)
+ if err != nil {
+ return 0.0, 0.0, 0.0, "The actual value " + err.Error()
+ }
+
+ expectedFloat, err := getFloat(expected[0])
+ if err != nil {
+ return 0.0, 0.0, 0.0, "The comparison value " + err.Error()
+ }
+
+ return actualFloat, expectedFloat, deltaFloat, ""
+}
+
+// returns the float value of any real number, or error if it is not a numerical type
+func getFloat(num interface{}) (float64, error) {
+ numValue := reflect.ValueOf(num)
+ numKind := numValue.Kind()
+
+ if numKind == reflect.Int ||
+ numKind == reflect.Int8 ||
+ numKind == reflect.Int16 ||
+ numKind == reflect.Int32 ||
+ numKind == reflect.Int64 {
+ return float64(numValue.Int()), nil
+ } else if numKind == reflect.Uint ||
+ numKind == reflect.Uint8 ||
+ numKind == reflect.Uint16 ||
+ numKind == reflect.Uint32 ||
+ numKind == reflect.Uint64 {
+ return float64(numValue.Uint()), nil
+ } else if numKind == reflect.Float32 ||
+ numKind == reflect.Float64 {
+ return numValue.Float(), nil
+ } else {
+ return 0.0, errors.New("must be a numerical type, but was: " + numKind.String())
+ }
+}
+
+// ShouldEqualJSON receives exactly two parameters and does an equality check by marshalling to JSON
+func ShouldEqualJSON(actual interface{}, expected ...interface{}) string {
+ if message := need(1, expected); message != success {
+ return message
+ }
+
+ expectedString, expectedErr := remarshal(expected[0].(string))
+ if expectedErr != nil {
+ return "Expected value not valid JSON: " + expectedErr.Error()
+ }
+
+ actualString, actualErr := remarshal(actual.(string))
+ if actualErr != nil {
+ return "Actual value not valid JSON: " + actualErr.Error()
+ }
+
+ return ShouldEqual(actualString, expectedString)
+}
+func remarshal(value string) (string, error) {
+ var structured map[string]interface{}
+ err := json.Unmarshal([]byte(value), &structured)
+ if err != nil {
+ return "", err
+ }
+ canonical, _ := json.Marshal(structured)
+ return string(canonical), nil
+}
+
+// ShouldResemble receives exactly two parameters and does a deep equal check (see reflect.DeepEqual)
+func ShouldResemble(actual interface{}, expected ...interface{}) string {
+ if message := need(1, expected); message != success {
+ return message
+ }
+
+ if matchError := oglematchers.DeepEquals(expected[0]).Matches(actual); matchError != nil {
+ return serializer.serializeDetailed(expected[0], actual,
+ fmt.Sprintf(shouldHaveResembled, render.Render(expected[0]), render.Render(actual)))
+ }
+
+ return success
+}
+
+// ShouldNotResemble receives exactly two parameters and does an inverse deep equal check (see reflect.DeepEqual)
+func ShouldNotResemble(actual interface{}, expected ...interface{}) string {
+ if message := need(1, expected); message != success {
+ return message
+ } else if ShouldResemble(actual, expected[0]) == success {
+ return fmt.Sprintf(shouldNotHaveResembled, render.Render(actual), render.Render(expected[0]))
+ }
+ return success
+}
+
+// ShouldPointTo receives exactly two parameters and checks to see that they point to the same address.
+func ShouldPointTo(actual interface{}, expected ...interface{}) string {
+ if message := need(1, expected); message != success {
+ return message
+ }
+ return shouldPointTo(actual, expected[0])
+
+}
+func shouldPointTo(actual, expected interface{}) string {
+ actualValue := reflect.ValueOf(actual)
+ expectedValue := reflect.ValueOf(expected)
+
+ if ShouldNotBeNil(actual) != success {
+ return fmt.Sprintf(shouldHaveBeenNonNilPointer, "first", "nil")
+ } else if ShouldNotBeNil(expected) != success {
+ return fmt.Sprintf(shouldHaveBeenNonNilPointer, "second", "nil")
+ } else if actualValue.Kind() != reflect.Ptr {
+ return fmt.Sprintf(shouldHaveBeenNonNilPointer, "first", "not")
+ } else if expectedValue.Kind() != reflect.Ptr {
+ return fmt.Sprintf(shouldHaveBeenNonNilPointer, "second", "not")
+ } else if ShouldEqual(actualValue.Pointer(), expectedValue.Pointer()) != success {
+ actualAddress := reflect.ValueOf(actual).Pointer()
+ expectedAddress := reflect.ValueOf(expected).Pointer()
+ return serializer.serialize(expectedAddress, actualAddress, fmt.Sprintf(shouldHavePointedTo,
+ actual, actualAddress,
+ expected, expectedAddress))
+ }
+ return success
+}
+
+// ShouldNotPointTo receives exactly two parameters and checks to see that they point to different addresess.
+func ShouldNotPointTo(actual interface{}, expected ...interface{}) string {
+ if message := need(1, expected); message != success {
+ return message
+ }
+ compare := ShouldPointTo(actual, expected[0])
+ if strings.HasPrefix(compare, shouldBePointers) {
+ return compare
+ } else if compare == success {
+ return fmt.Sprintf(shouldNotHavePointedTo, actual, expected[0], reflect.ValueOf(actual).Pointer())
+ }
+ return success
+}
+
+// ShouldBeNil receives a single parameter and ensures that it is nil.
+func ShouldBeNil(actual interface{}, expected ...interface{}) string {
+ if fail := need(0, expected); fail != success {
+ return fail
+ } else if actual == nil {
+ return success
+ } else if interfaceHasNilValue(actual) {
+ return success
+ }
+ return fmt.Sprintf(shouldHaveBeenNil, actual)
+}
+func interfaceHasNilValue(actual interface{}) bool {
+ value := reflect.ValueOf(actual)
+ kind := value.Kind()
+ nilable := kind == reflect.Slice ||
+ kind == reflect.Chan ||
+ kind == reflect.Func ||
+ kind == reflect.Ptr ||
+ kind == reflect.Map
+
+ // Careful: reflect.Value.IsNil() will panic unless it's an interface, chan, map, func, slice, or ptr
+ // Reference: http://golang.org/pkg/reflect/#Value.IsNil
+ return nilable && value.IsNil()
+}
+
+// ShouldNotBeNil receives a single parameter and ensures that it is not nil.
+func ShouldNotBeNil(actual interface{}, expected ...interface{}) string {
+ if fail := need(0, expected); fail != success {
+ return fail
+ } else if ShouldBeNil(actual) == success {
+ return fmt.Sprintf(shouldNotHaveBeenNil, actual)
+ }
+ return success
+}
+
+// ShouldBeTrue receives a single parameter and ensures that it is true.
+func ShouldBeTrue(actual interface{}, expected ...interface{}) string {
+ if fail := need(0, expected); fail != success {
+ return fail
+ } else if actual != true {
+ return fmt.Sprintf(shouldHaveBeenTrue, actual)
+ }
+ return success
+}
+
+// ShouldBeFalse receives a single parameter and ensures that it is false.
+func ShouldBeFalse(actual interface{}, expected ...interface{}) string {
+ if fail := need(0, expected); fail != success {
+ return fail
+ } else if actual != false {
+ return fmt.Sprintf(shouldHaveBeenFalse, actual)
+ }
+ return success
+}
+
+// ShouldBeZeroValue receives a single parameter and ensures that it is
+// the Go equivalent of the default value, or "zero" value.
+func ShouldBeZeroValue(actual interface{}, expected ...interface{}) string {
+ if fail := need(0, expected); fail != success {
+ return fail
+ }
+ zeroVal := reflect.Zero(reflect.TypeOf(actual)).Interface()
+ if !reflect.DeepEqual(zeroVal, actual) {
+ return serializer.serialize(zeroVal, actual, fmt.Sprintf(shouldHaveBeenZeroValue, actual))
+ }
+ return success
+}
+
+// ShouldBeZeroValue receives a single parameter and ensures that it is NOT
+// the Go equivalent of the default value, or "zero" value.
+func ShouldNotBeZeroValue(actual interface{}, expected ...interface{}) string {
+ if fail := need(0, expected); fail != success {
+ return fail
+ }
+ zeroVal := reflect.Zero(reflect.TypeOf(actual)).Interface()
+ if reflect.DeepEqual(zeroVal, actual) {
+ return serializer.serialize(zeroVal, actual, fmt.Sprintf(shouldNotHaveBeenZeroValue, actual))
+ }
+ return success
+}
diff --git a/vendor/github.com/smartystreets/assertions/filter.go b/vendor/github.com/smartystreets/assertions/filter.go
new file mode 100644
index 0000000..7c46ab8
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/filter.go
@@ -0,0 +1,31 @@
+package assertions
+
+import "fmt"
+
+const (
+ success = ""
+ needExactValues = "This assertion requires exactly %d comparison values (you provided %d)."
+ needNonEmptyCollection = "This assertion requires at least 1 comparison value (you provided 0)."
+ needFewerValues = "This assertion allows %d or fewer comparison values (you provided %d)."
+)
+
+func need(needed int, expected []interface{}) string {
+ if len(expected) != needed {
+ return fmt.Sprintf(needExactValues, needed, len(expected))
+ }
+ return success
+}
+
+func atLeast(minimum int, expected []interface{}) string {
+ if len(expected) < 1 {
+ return needNonEmptyCollection
+ }
+ return success
+}
+
+func atMost(max int, expected []interface{}) string {
+ if len(expected) > max {
+ return fmt.Sprintf(needFewerValues, max, len(expected))
+ }
+ return success
+}
diff --git a/vendor/github.com/smartystreets/assertions/internal/go-render/LICENSE b/vendor/github.com/smartystreets/assertions/internal/go-render/LICENSE
new file mode 100644
index 0000000..6280ff0
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/go-render/LICENSE
@@ -0,0 +1,27 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/smartystreets/assertions/internal/go-render/render/render.go b/vendor/github.com/smartystreets/assertions/internal/go-render/render/render.go
new file mode 100644
index 0000000..313611e
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/go-render/render/render.go
@@ -0,0 +1,481 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package render
+
+import (
+ "bytes"
+ "fmt"
+ "reflect"
+ "sort"
+ "strconv"
+)
+
+var builtinTypeMap = map[reflect.Kind]string{
+ reflect.Bool: "bool",
+ reflect.Complex128: "complex128",
+ reflect.Complex64: "complex64",
+ reflect.Float32: "float32",
+ reflect.Float64: "float64",
+ reflect.Int16: "int16",
+ reflect.Int32: "int32",
+ reflect.Int64: "int64",
+ reflect.Int8: "int8",
+ reflect.Int: "int",
+ reflect.String: "string",
+ reflect.Uint16: "uint16",
+ reflect.Uint32: "uint32",
+ reflect.Uint64: "uint64",
+ reflect.Uint8: "uint8",
+ reflect.Uint: "uint",
+ reflect.Uintptr: "uintptr",
+}
+
+var builtinTypeSet = map[string]struct{}{}
+
+func init() {
+ for _, v := range builtinTypeMap {
+ builtinTypeSet[v] = struct{}{}
+ }
+}
+
+var typeOfString = reflect.TypeOf("")
+var typeOfInt = reflect.TypeOf(int(1))
+var typeOfUint = reflect.TypeOf(uint(1))
+var typeOfFloat = reflect.TypeOf(10.1)
+
+// Render converts a structure to a string representation. Unline the "%#v"
+// format string, this resolves pointer types' contents in structs, maps, and
+// slices/arrays and prints their field values.
+func Render(v interface{}) string {
+ buf := bytes.Buffer{}
+ s := (*traverseState)(nil)
+ s.render(&buf, 0, reflect.ValueOf(v), false)
+ return buf.String()
+}
+
+// renderPointer is called to render a pointer value.
+//
+// This is overridable so that the test suite can have deterministic pointer
+// values in its expectations.
+var renderPointer = func(buf *bytes.Buffer, p uintptr) {
+ fmt.Fprintf(buf, "0x%016x", p)
+}
+
+// traverseState is used to note and avoid recursion as struct members are being
+// traversed.
+//
+// traverseState is allowed to be nil. Specifically, the root state is nil.
+type traverseState struct {
+ parent *traverseState
+ ptr uintptr
+}
+
+func (s *traverseState) forkFor(ptr uintptr) *traverseState {
+ for cur := s; cur != nil; cur = cur.parent {
+ if ptr == cur.ptr {
+ return nil
+ }
+ }
+
+ fs := &traverseState{
+ parent: s,
+ ptr: ptr,
+ }
+ return fs
+}
+
+func (s *traverseState) render(buf *bytes.Buffer, ptrs int, v reflect.Value, implicit bool) {
+ if v.Kind() == reflect.Invalid {
+ buf.WriteString("nil")
+ return
+ }
+ vt := v.Type()
+
+ // If the type being rendered is a potentially recursive type (a type that
+ // can contain itself as a member), we need to avoid recursion.
+ //
+ // If we've already seen this type before, mark that this is the case and
+ // write a recursion placeholder instead of actually rendering it.
+ //
+ // If we haven't seen it before, fork our `seen` tracking so any higher-up
+ // renderers will also render it at least once, then mark that we've seen it
+ // to avoid recursing on lower layers.
+ pe := uintptr(0)
+ vk := vt.Kind()
+ switch vk {
+ case reflect.Ptr:
+ // Since structs and arrays aren't pointers, they can't directly be
+ // recursed, but they can contain pointers to themselves. Record their
+ // pointer to avoid this.
+ switch v.Elem().Kind() {
+ case reflect.Struct, reflect.Array:
+ pe = v.Pointer()
+ }
+
+ case reflect.Slice, reflect.Map:
+ pe = v.Pointer()
+ }
+ if pe != 0 {
+ s = s.forkFor(pe)
+ if s == nil {
+ buf.WriteString("<REC(")
+ if !implicit {
+ writeType(buf, ptrs, vt)
+ }
+ buf.WriteString(")>")
+ return
+ }
+ }
+
+ isAnon := func(t reflect.Type) bool {
+ if t.Name() != "" {
+ if _, ok := builtinTypeSet[t.Name()]; !ok {
+ return false
+ }
+ }
+ return t.Kind() != reflect.Interface
+ }
+
+ switch vk {
+ case reflect.Struct:
+ if !implicit {
+ writeType(buf, ptrs, vt)
+ }
+ buf.WriteRune('{')
+ if rendered, ok := renderTime(v); ok {
+ buf.WriteString(rendered)
+ } else {
+ structAnon := vt.Name() == ""
+ for i := 0; i < vt.NumField(); i++ {
+ if i > 0 {
+ buf.WriteString(", ")
+ }
+ anon := structAnon && isAnon(vt.Field(i).Type)
+
+ if !anon {
+ buf.WriteString(vt.Field(i).Name)
+ buf.WriteRune(':')
+ }
+
+ s.render(buf, 0, v.Field(i), anon)
+ }
+ }
+ buf.WriteRune('}')
+
+ case reflect.Slice:
+ if v.IsNil() {
+ if !implicit {
+ writeType(buf, ptrs, vt)
+ buf.WriteString("(nil)")
+ } else {
+ buf.WriteString("nil")
+ }
+ return
+ }
+ fallthrough
+
+ case reflect.Array:
+ if !implicit {
+ writeType(buf, ptrs, vt)
+ }
+ anon := vt.Name() == "" && isAnon(vt.Elem())
+ buf.WriteString("{")
+ for i := 0; i < v.Len(); i++ {
+ if i > 0 {
+ buf.WriteString(", ")
+ }
+
+ s.render(buf, 0, v.Index(i), anon)
+ }
+ buf.WriteRune('}')
+
+ case reflect.Map:
+ if !implicit {
+ writeType(buf, ptrs, vt)
+ }
+ if v.IsNil() {
+ buf.WriteString("(nil)")
+ } else {
+ buf.WriteString("{")
+
+ mkeys := v.MapKeys()
+ tryAndSortMapKeys(vt, mkeys)
+
+ kt := vt.Key()
+ keyAnon := typeOfString.ConvertibleTo(kt) || typeOfInt.ConvertibleTo(kt) || typeOfUint.ConvertibleTo(kt) || typeOfFloat.ConvertibleTo(kt)
+ valAnon := vt.Name() == "" && isAnon(vt.Elem())
+ for i, mk := range mkeys {
+ if i > 0 {
+ buf.WriteString(", ")
+ }
+
+ s.render(buf, 0, mk, keyAnon)
+ buf.WriteString(":")
+ s.render(buf, 0, v.MapIndex(mk), valAnon)
+ }
+ buf.WriteRune('}')
+ }
+
+ case reflect.Ptr:
+ ptrs++
+ fallthrough
+ case reflect.Interface:
+ if v.IsNil() {
+ writeType(buf, ptrs, v.Type())
+ buf.WriteString("(nil)")
+ } else {
+ s.render(buf, ptrs, v.Elem(), false)
+ }
+
+ case reflect.Chan, reflect.Func, reflect.UnsafePointer:
+ writeType(buf, ptrs, vt)
+ buf.WriteRune('(')
+ renderPointer(buf, v.Pointer())
+ buf.WriteRune(')')
+
+ default:
+ tstr := vt.String()
+ implicit = implicit || (ptrs == 0 && builtinTypeMap[vk] == tstr)
+ if !implicit {
+ writeType(buf, ptrs, vt)
+ buf.WriteRune('(')
+ }
+
+ switch vk {
+ case reflect.String:
+ fmt.Fprintf(buf, "%q", v.String())
+ case reflect.Bool:
+ fmt.Fprintf(buf, "%v", v.Bool())
+
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ fmt.Fprintf(buf, "%d", v.Int())
+
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ fmt.Fprintf(buf, "%d", v.Uint())
+
+ case reflect.Float32, reflect.Float64:
+ fmt.Fprintf(buf, "%g", v.Float())
+
+ case reflect.Complex64, reflect.Complex128:
+ fmt.Fprintf(buf, "%g", v.Complex())
+ }
+
+ if !implicit {
+ buf.WriteRune(')')
+ }
+ }
+}
+
+func writeType(buf *bytes.Buffer, ptrs int, t reflect.Type) {
+ parens := ptrs > 0
+ switch t.Kind() {
+ case reflect.Chan, reflect.Func, reflect.UnsafePointer:
+ parens = true
+ }
+
+ if parens {
+ buf.WriteRune('(')
+ for i := 0; i < ptrs; i++ {
+ buf.WriteRune('*')
+ }
+ }
+
+ switch t.Kind() {
+ case reflect.Ptr:
+ if ptrs == 0 {
+ // This pointer was referenced from within writeType (e.g., as part of
+ // rendering a list), and so hasn't had its pointer asterisk accounted
+ // for.
+ buf.WriteRune('*')
+ }
+ writeType(buf, 0, t.Elem())
+
+ case reflect.Interface:
+ if n := t.Name(); n != "" {
+ buf.WriteString(t.String())
+ } else {
+ buf.WriteString("interface{}")
+ }
+
+ case reflect.Array:
+ buf.WriteRune('[')
+ buf.WriteString(strconv.FormatInt(int64(t.Len()), 10))
+ buf.WriteRune(']')
+ writeType(buf, 0, t.Elem())
+
+ case reflect.Slice:
+ if t == reflect.SliceOf(t.Elem()) {
+ buf.WriteString("[]")
+ writeType(buf, 0, t.Elem())
+ } else {
+ // Custom slice type, use type name.
+ buf.WriteString(t.String())
+ }
+
+ case reflect.Map:
+ if t == reflect.MapOf(t.Key(), t.Elem()) {
+ buf.WriteString("map[")
+ writeType(buf, 0, t.Key())
+ buf.WriteRune(']')
+ writeType(buf, 0, t.Elem())
+ } else {
+ // Custom map type, use type name.
+ buf.WriteString(t.String())
+ }
+
+ default:
+ buf.WriteString(t.String())
+ }
+
+ if parens {
+ buf.WriteRune(')')
+ }
+}
+
+type cmpFn func(a, b reflect.Value) int
+
+type sortableValueSlice struct {
+ cmp cmpFn
+ elements []reflect.Value
+}
+
+func (s sortableValueSlice) Len() int {
+ return len(s.elements)
+}
+
+func (s sortableValueSlice) Less(i, j int) bool {
+ return s.cmp(s.elements[i], s.elements[j]) < 0
+}
+
+func (s sortableValueSlice) Swap(i, j int) {
+ s.elements[i], s.elements[j] = s.elements[j], s.elements[i]
+}
+
+// cmpForType returns a cmpFn which sorts the data for some type t in the same
+// order that a go-native map key is compared for equality.
+func cmpForType(t reflect.Type) cmpFn {
+ switch t.Kind() {
+ case reflect.String:
+ return func(av, bv reflect.Value) int {
+ a, b := av.String(), bv.String()
+ if a < b {
+ return -1
+ } else if a > b {
+ return 1
+ }
+ return 0
+ }
+
+ case reflect.Bool:
+ return func(av, bv reflect.Value) int {
+ a, b := av.Bool(), bv.Bool()
+ if !a && b {
+ return -1
+ } else if a && !b {
+ return 1
+ }
+ return 0
+ }
+
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ return func(av, bv reflect.Value) int {
+ a, b := av.Int(), bv.Int()
+ if a < b {
+ return -1
+ } else if a > b {
+ return 1
+ }
+ return 0
+ }
+
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32,
+ reflect.Uint64, reflect.Uintptr, reflect.UnsafePointer:
+ return func(av, bv reflect.Value) int {
+ a, b := av.Uint(), bv.Uint()
+ if a < b {
+ return -1
+ } else if a > b {
+ return 1
+ }
+ return 0
+ }
+
+ case reflect.Float32, reflect.Float64:
+ return func(av, bv reflect.Value) int {
+ a, b := av.Float(), bv.Float()
+ if a < b {
+ return -1
+ } else if a > b {
+ return 1
+ }
+ return 0
+ }
+
+ case reflect.Interface:
+ return func(av, bv reflect.Value) int {
+ a, b := av.InterfaceData(), bv.InterfaceData()
+ if a[0] < b[0] {
+ return -1
+ } else if a[0] > b[0] {
+ return 1
+ }
+ if a[1] < b[1] {
+ return -1
+ } else if a[1] > b[1] {
+ return 1
+ }
+ return 0
+ }
+
+ case reflect.Complex64, reflect.Complex128:
+ return func(av, bv reflect.Value) int {
+ a, b := av.Complex(), bv.Complex()
+ if real(a) < real(b) {
+ return -1
+ } else if real(a) > real(b) {
+ return 1
+ }
+ if imag(a) < imag(b) {
+ return -1
+ } else if imag(a) > imag(b) {
+ return 1
+ }
+ return 0
+ }
+
+ case reflect.Ptr, reflect.Chan:
+ return func(av, bv reflect.Value) int {
+ a, b := av.Pointer(), bv.Pointer()
+ if a < b {
+ return -1
+ } else if a > b {
+ return 1
+ }
+ return 0
+ }
+
+ case reflect.Struct:
+ cmpLst := make([]cmpFn, t.NumField())
+ for i := range cmpLst {
+ cmpLst[i] = cmpForType(t.Field(i).Type)
+ }
+ return func(a, b reflect.Value) int {
+ for i, cmp := range cmpLst {
+ if rslt := cmp(a.Field(i), b.Field(i)); rslt != 0 {
+ return rslt
+ }
+ }
+ return 0
+ }
+ }
+
+ return nil
+}
+
+func tryAndSortMapKeys(mt reflect.Type, k []reflect.Value) {
+ if cmp := cmpForType(mt.Key()); cmp != nil {
+ sort.Sort(sortableValueSlice{cmp, k})
+ }
+}
diff --git a/vendor/github.com/smartystreets/assertions/internal/go-render/render/render_time.go b/vendor/github.com/smartystreets/assertions/internal/go-render/render/render_time.go
new file mode 100644
index 0000000..990c75d
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/go-render/render/render_time.go
@@ -0,0 +1,26 @@
+package render
+
+import (
+ "reflect"
+ "time"
+)
+
+func renderTime(value reflect.Value) (string, bool) {
+ if instant, ok := convertTime(value); !ok {
+ return "", false
+ } else if instant.IsZero() {
+ return "0", true
+ } else {
+ return instant.String(), true
+ }
+}
+
+func convertTime(value reflect.Value) (t time.Time, ok bool) {
+ if value.Type() == timeType {
+ defer func() { recover() }()
+ t, ok = value.Interface().(time.Time)
+ }
+ return
+}
+
+var timeType = reflect.TypeOf(time.Time{})
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/.gitignore b/vendor/github.com/smartystreets/assertions/internal/oglematchers/.gitignore
new file mode 100644
index 0000000..dd8fc74
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/.gitignore
@@ -0,0 +1,5 @@
+*.6
+6.out
+_obj/
+_test/
+_testmain.go
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/.travis.yml b/vendor/github.com/smartystreets/assertions/internal/oglematchers/.travis.yml
new file mode 100644
index 0000000..b972119
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/.travis.yml
@@ -0,0 +1,4 @@
+# Cf. http://docs.travis-ci.com/user/getting-started/
+# Cf. http://docs.travis-ci.com/user/languages/go/
+
+language: go
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/LICENSE b/vendor/github.com/smartystreets/assertions/internal/oglematchers/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/README.md b/vendor/github.com/smartystreets/assertions/internal/oglematchers/README.md
new file mode 100644
index 0000000..215a2bb
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/README.md
@@ -0,0 +1,58 @@
+[![GoDoc](https://godoc.org/github.com/smartystreets/assertions/internal/oglematchers?status.svg)](https://godoc.org/github.com/smartystreets/assertions/internal/oglematchers)
+
+`oglematchers` is a package for the Go programming language containing a set of
+matchers, useful in a testing or mocking framework, inspired by and mostly
+compatible with [Google Test][googletest] for C++ and
+[Google JS Test][google-js-test]. The package is used by the
+[ogletest][ogletest] testing framework and [oglemock][oglemock] mocking
+framework, which may be more directly useful to you, but can be generically used
+elsewhere as well.
+
+A "matcher" is simply an object with a `Matches` method defining a set of golang
+values matched by the matcher, and a `Description` method describing that set.
+For example, here are some matchers:
+
+```go
+// Numbers
+Equals(17.13)
+LessThan(19)
+
+// Strings
+Equals("taco")
+HasSubstr("burrito")
+MatchesRegex("t.*o")
+
+// Combining matchers
+AnyOf(LessThan(17), GreaterThan(19))
+```
+
+There are lots more; see [here][reference] for a reference. You can also add
+your own simply by implementing the `oglematchers.Matcher` interface.
+
+
+Installation
+------------
+
+First, make sure you have installed Go 1.0.2 or newer. See
+[here][golang-install] for instructions.
+
+Use the following command to install `oglematchers` and keep it up to date:
+
+ go get -u github.com/smartystreets/assertions/internal/oglematchers
+
+
+Documentation
+-------------
+
+See [here][reference] for documentation. Alternatively, you can install the
+package and then use `godoc`:
+
+ godoc github.com/smartystreets/assertions/internal/oglematchers
+
+
+[reference]: http://godoc.org/github.com/smartystreets/assertions/internal/oglematchers
+[golang-install]: http://golang.org/doc/install.html
+[googletest]: http://code.google.com/p/googletest/
+[google-js-test]: http://code.google.com/p/google-js-test/
+[ogletest]: http://github.com/smartystreets/assertions/internal/ogletest
+[oglemock]: http://github.com/smartystreets/assertions/internal/oglemock
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/any_of.go b/vendor/github.com/smartystreets/assertions/internal/oglematchers/any_of.go
new file mode 100644
index 0000000..2918b51
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/any_of.go
@@ -0,0 +1,94 @@
+// Copyright 2011 Aaron Jacobs. All Rights Reserved.
+// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package oglematchers
+
+import (
+ "errors"
+ "fmt"
+ "reflect"
+ "strings"
+)
+
+// AnyOf accepts a set of values S and returns a matcher that follows the
+// algorithm below when considering a candidate c:
+//
+// 1. If there exists a value m in S such that m implements the Matcher
+// interface and m matches c, return true.
+//
+// 2. Otherwise, if there exists a value v in S such that v does not implement
+// the Matcher interface and the matcher Equals(v) matches c, return true.
+//
+// 3. Otherwise, if there is a value m in S such that m implements the Matcher
+// interface and m returns a fatal error for c, return that fatal error.
+//
+// 4. Otherwise, return false.
+//
+// This is akin to a logical OR operation for matchers, with non-matchers x
+// being treated as Equals(x).
+func AnyOf(vals ...interface{}) Matcher {
+ // Get ahold of a type variable for the Matcher interface.
+ var dummy *Matcher
+ matcherType := reflect.TypeOf(dummy).Elem()
+
+ // Create a matcher for each value, or use the value itself if it's already a
+ // matcher.
+ wrapped := make([]Matcher, len(vals))
+ for i, v := range vals {
+ t := reflect.TypeOf(v)
+ if t != nil && t.Implements(matcherType) {
+ wrapped[i] = v.(Matcher)
+ } else {
+ wrapped[i] = Equals(v)
+ }
+ }
+
+ return &anyOfMatcher{wrapped}
+}
+
+type anyOfMatcher struct {
+ wrapped []Matcher
+}
+
+func (m *anyOfMatcher) Description() string {
+ wrappedDescs := make([]string, len(m.wrapped))
+ for i, matcher := range m.wrapped {
+ wrappedDescs[i] = matcher.Description()
+ }
+
+ return fmt.Sprintf("or(%s)", strings.Join(wrappedDescs, ", "))
+}
+
+func (m *anyOfMatcher) Matches(c interface{}) (err error) {
+ err = errors.New("")
+
+ // Try each matcher in turn.
+ for _, matcher := range m.wrapped {
+ wrappedErr := matcher.Matches(c)
+
+ // Return immediately if there's a match.
+ if wrappedErr == nil {
+ err = nil
+ return
+ }
+
+ // Note the fatal error, if any.
+ if _, isFatal := wrappedErr.(*FatalError); isFatal {
+ err = wrappedErr
+ }
+ }
+
+ return
+}
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/contains.go b/vendor/github.com/smartystreets/assertions/internal/oglematchers/contains.go
new file mode 100644
index 0000000..87f107d
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/contains.go
@@ -0,0 +1,61 @@
+// Copyright 2012 Aaron Jacobs. All Rights Reserved.
+// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package oglematchers
+
+import (
+ "fmt"
+ "reflect"
+)
+
+// Return a matcher that matches arrays slices with at least one element that
+// matches the supplied argument. If the argument x is not itself a Matcher,
+// this is equivalent to Contains(Equals(x)).
+func Contains(x interface{}) Matcher {
+ var result containsMatcher
+ var ok bool
+
+ if result.elementMatcher, ok = x.(Matcher); !ok {
+ result.elementMatcher = DeepEquals(x)
+ }
+
+ return &result
+}
+
+type containsMatcher struct {
+ elementMatcher Matcher
+}
+
+func (m *containsMatcher) Description() string {
+ return fmt.Sprintf("contains: %s", m.elementMatcher.Description())
+}
+
+func (m *containsMatcher) Matches(candidate interface{}) error {
+ // The candidate must be a slice or an array.
+ v := reflect.ValueOf(candidate)
+ if v.Kind() != reflect.Slice && v.Kind() != reflect.Array {
+ return NewFatalError("which is not a slice or array")
+ }
+
+ // Check each element.
+ for i := 0; i < v.Len(); i++ {
+ elem := v.Index(i)
+ if matchErr := m.elementMatcher.Matches(elem.Interface()); matchErr == nil {
+ return nil
+ }
+ }
+
+ return fmt.Errorf("")
+}
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/deep_equals.go b/vendor/github.com/smartystreets/assertions/internal/oglematchers/deep_equals.go
new file mode 100644
index 0000000..1d91bae
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/deep_equals.go
@@ -0,0 +1,88 @@
+// Copyright 2012 Aaron Jacobs. All Rights Reserved.
+// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package oglematchers
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "reflect"
+)
+
+var byteSliceType reflect.Type = reflect.TypeOf([]byte{})
+
+// DeepEquals returns a matcher that matches based on 'deep equality', as
+// defined by the reflect package. This matcher requires that values have
+// identical types to x.
+func DeepEquals(x interface{}) Matcher {
+ return &deepEqualsMatcher{x}
+}
+
+type deepEqualsMatcher struct {
+ x interface{}
+}
+
+func (m *deepEqualsMatcher) Description() string {
+ xDesc := fmt.Sprintf("%v", m.x)
+ xValue := reflect.ValueOf(m.x)
+
+ // Special case: fmt.Sprintf presents nil slices as "[]", but
+ // reflect.DeepEqual makes a distinction between nil and empty slices. Make
+ // this less confusing.
+ if xValue.Kind() == reflect.Slice && xValue.IsNil() {
+ xDesc = "<nil slice>"
+ }
+
+ return fmt.Sprintf("deep equals: %s", xDesc)
+}
+
+func (m *deepEqualsMatcher) Matches(c interface{}) error {
+ // Make sure the types match.
+ ct := reflect.TypeOf(c)
+ xt := reflect.TypeOf(m.x)
+
+ if ct != xt {
+ return NewFatalError(fmt.Sprintf("which is of type %v", ct))
+ }
+
+ // Special case: handle byte slices more efficiently.
+ cValue := reflect.ValueOf(c)
+ xValue := reflect.ValueOf(m.x)
+
+ if ct == byteSliceType && !cValue.IsNil() && !xValue.IsNil() {
+ xBytes := m.x.([]byte)
+ cBytes := c.([]byte)
+
+ if bytes.Equal(cBytes, xBytes) {
+ return nil
+ }
+
+ return errors.New("")
+ }
+
+ // Defer to the reflect package.
+ if reflect.DeepEqual(m.x, c) {
+ return nil
+ }
+
+ // Special case: if the comparison failed because c is the nil slice, given
+ // an indication of this (since its value is printed as "[]").
+ if cValue.Kind() == reflect.Slice && cValue.IsNil() {
+ return errors.New("which is nil")
+ }
+
+ return errors.New("")
+}
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/equals.go b/vendor/github.com/smartystreets/assertions/internal/oglematchers/equals.go
new file mode 100644
index 0000000..a510707
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/equals.go
@@ -0,0 +1,541 @@
+// Copyright 2011 Aaron Jacobs. All Rights Reserved.
+// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package oglematchers
+
+import (
+ "errors"
+ "fmt"
+ "math"
+ "reflect"
+)
+
+// Equals(x) returns a matcher that matches values v such that v and x are
+// equivalent. This includes the case when the comparison v == x using Go's
+// built-in comparison operator is legal (except for structs, which this
+// matcher does not support), but for convenience the following rules also
+// apply:
+//
+// * Type checking is done based on underlying types rather than actual
+// types, so that e.g. two aliases for string can be compared:
+//
+// type stringAlias1 string
+// type stringAlias2 string
+//
+// a := "taco"
+// b := stringAlias1("taco")
+// c := stringAlias2("taco")
+//
+// ExpectTrue(a == b) // Legal, passes
+// ExpectTrue(b == c) // Illegal, doesn't compile
+//
+// ExpectThat(a, Equals(b)) // Passes
+// ExpectThat(b, Equals(c)) // Passes
+//
+// * Values of numeric type are treated as if they were abstract numbers, and
+// compared accordingly. Therefore Equals(17) will match int(17),
+// int16(17), uint(17), float32(17), complex64(17), and so on.
+//
+// If you want a stricter matcher that contains no such cleverness, see
+// IdenticalTo instead.
+//
+// Arrays are supported by this matcher, but do not participate in the
+// exceptions above. Two arrays compared with this matcher must have identical
+// types, and their element type must itself be comparable according to Go's ==
+// operator.
+func Equals(x interface{}) Matcher {
+ v := reflect.ValueOf(x)
+
+ // This matcher doesn't support structs.
+ if v.Kind() == reflect.Struct {
+ panic(fmt.Sprintf("oglematchers.Equals: unsupported kind %v", v.Kind()))
+ }
+
+ // The == operator is not defined for non-nil slices.
+ if v.Kind() == reflect.Slice && v.Pointer() != uintptr(0) {
+ panic(fmt.Sprintf("oglematchers.Equals: non-nil slice"))
+ }
+
+ return &equalsMatcher{v}
+}
+
+type equalsMatcher struct {
+ expectedValue reflect.Value
+}
+
+////////////////////////////////////////////////////////////////////////
+// Numeric types
+////////////////////////////////////////////////////////////////////////
+
+func isSignedInteger(v reflect.Value) bool {
+ k := v.Kind()
+ return k >= reflect.Int && k <= reflect.Int64
+}
+
+func isUnsignedInteger(v reflect.Value) bool {
+ k := v.Kind()
+ return k >= reflect.Uint && k <= reflect.Uintptr
+}
+
+func isInteger(v reflect.Value) bool {
+ return isSignedInteger(v) || isUnsignedInteger(v)
+}
+
+func isFloat(v reflect.Value) bool {
+ k := v.Kind()
+ return k == reflect.Float32 || k == reflect.Float64
+}
+
+func isComplex(v reflect.Value) bool {
+ k := v.Kind()
+ return k == reflect.Complex64 || k == reflect.Complex128
+}
+
+func checkAgainstInt64(e int64, c reflect.Value) (err error) {
+ err = errors.New("")
+
+ switch {
+ case isSignedInteger(c):
+ if c.Int() == e {
+ err = nil
+ }
+
+ case isUnsignedInteger(c):
+ u := c.Uint()
+ if u <= math.MaxInt64 && int64(u) == e {
+ err = nil
+ }
+
+ // Turn around the various floating point types so that the checkAgainst*
+ // functions for them can deal with precision issues.
+ case isFloat(c), isComplex(c):
+ return Equals(c.Interface()).Matches(e)
+
+ default:
+ err = NewFatalError("which is not numeric")
+ }
+
+ return
+}
+
+func checkAgainstUint64(e uint64, c reflect.Value) (err error) {
+ err = errors.New("")
+
+ switch {
+ case isSignedInteger(c):
+ i := c.Int()
+ if i >= 0 && uint64(i) == e {
+ err = nil
+ }
+
+ case isUnsignedInteger(c):
+ if c.Uint() == e {
+ err = nil
+ }
+
+ // Turn around the various floating point types so that the checkAgainst*
+ // functions for them can deal with precision issues.
+ case isFloat(c), isComplex(c):
+ return Equals(c.Interface()).Matches(e)
+
+ default:
+ err = NewFatalError("which is not numeric")
+ }
+
+ return
+}
+
+func checkAgainstFloat32(e float32, c reflect.Value) (err error) {
+ err = errors.New("")
+
+ switch {
+ case isSignedInteger(c):
+ if float32(c.Int()) == e {
+ err = nil
+ }
+
+ case isUnsignedInteger(c):
+ if float32(c.Uint()) == e {
+ err = nil
+ }
+
+ case isFloat(c):
+ // Compare using float32 to avoid a false sense of precision; otherwise
+ // e.g. Equals(float32(0.1)) won't match float32(0.1).
+ if float32(c.Float()) == e {
+ err = nil
+ }
+
+ case isComplex(c):
+ comp := c.Complex()
+ rl := real(comp)
+ im := imag(comp)
+
+ // Compare using float32 to avoid a false sense of precision; otherwise
+ // e.g. Equals(float32(0.1)) won't match (0.1 + 0i).
+ if im == 0 && float32(rl) == e {
+ err = nil
+ }
+
+ default:
+ err = NewFatalError("which is not numeric")
+ }
+
+ return
+}
+
+func checkAgainstFloat64(e float64, c reflect.Value) (err error) {
+ err = errors.New("")
+
+ ck := c.Kind()
+
+ switch {
+ case isSignedInteger(c):
+ if float64(c.Int()) == e {
+ err = nil
+ }
+
+ case isUnsignedInteger(c):
+ if float64(c.Uint()) == e {
+ err = nil
+ }
+
+ // If the actual value is lower precision, turn the comparison around so we
+ // apply the low-precision rules. Otherwise, e.g. Equals(0.1) may not match
+ // float32(0.1).
+ case ck == reflect.Float32 || ck == reflect.Complex64:
+ return Equals(c.Interface()).Matches(e)
+
+ // Otherwise, compare with double precision.
+ case isFloat(c):
+ if c.Float() == e {
+ err = nil
+ }
+
+ case isComplex(c):
+ comp := c.Complex()
+ rl := real(comp)
+ im := imag(comp)
+
+ if im == 0 && rl == e {
+ err = nil
+ }
+
+ default:
+ err = NewFatalError("which is not numeric")
+ }
+
+ return
+}
+
+func checkAgainstComplex64(e complex64, c reflect.Value) (err error) {
+ err = errors.New("")
+ realPart := real(e)
+ imaginaryPart := imag(e)
+
+ switch {
+ case isInteger(c) || isFloat(c):
+ // If we have no imaginary part, then we should just compare against the
+ // real part. Otherwise, we can't be equal.
+ if imaginaryPart != 0 {
+ return
+ }
+
+ return checkAgainstFloat32(realPart, c)
+
+ case isComplex(c):
+ // Compare using complex64 to avoid a false sense of precision; otherwise
+ // e.g. Equals(0.1 + 0i) won't match float32(0.1).
+ if complex64(c.Complex()) == e {
+ err = nil
+ }
+
+ default:
+ err = NewFatalError("which is not numeric")
+ }
+
+ return
+}
+
+func checkAgainstComplex128(e complex128, c reflect.Value) (err error) {
+ err = errors.New("")
+ realPart := real(e)
+ imaginaryPart := imag(e)
+
+ switch {
+ case isInteger(c) || isFloat(c):
+ // If we have no imaginary part, then we should just compare against the
+ // real part. Otherwise, we can't be equal.
+ if imaginaryPart != 0 {
+ return
+ }
+
+ return checkAgainstFloat64(realPart, c)
+
+ case isComplex(c):
+ if c.Complex() == e {
+ err = nil
+ }
+
+ default:
+ err = NewFatalError("which is not numeric")
+ }
+
+ return
+}
+
+////////////////////////////////////////////////////////////////////////
+// Other types
+////////////////////////////////////////////////////////////////////////
+
+func checkAgainstBool(e bool, c reflect.Value) (err error) {
+ if c.Kind() != reflect.Bool {
+ err = NewFatalError("which is not a bool")
+ return
+ }
+
+ err = errors.New("")
+ if c.Bool() == e {
+ err = nil
+ }
+ return
+}
+
+func checkAgainstChan(e reflect.Value, c reflect.Value) (err error) {
+ // Create a description of e's type, e.g. "chan int".
+ typeStr := fmt.Sprintf("%s %s", e.Type().ChanDir(), e.Type().Elem())
+
+ // Make sure c is a chan of the correct type.
+ if c.Kind() != reflect.Chan ||
+ c.Type().ChanDir() != e.Type().ChanDir() ||
+ c.Type().Elem() != e.Type().Elem() {
+ err = NewFatalError(fmt.Sprintf("which is not a %s", typeStr))
+ return
+ }
+
+ err = errors.New("")
+ if c.Pointer() == e.Pointer() {
+ err = nil
+ }
+ return
+}
+
+func checkAgainstFunc(e reflect.Value, c reflect.Value) (err error) {
+ // Make sure c is a function.
+ if c.Kind() != reflect.Func {
+ err = NewFatalError("which is not a function")
+ return
+ }
+
+ err = errors.New("")
+ if c.Pointer() == e.Pointer() {
+ err = nil
+ }
+ return
+}
+
+func checkAgainstMap(e reflect.Value, c reflect.Value) (err error) {
+ // Make sure c is a map.
+ if c.Kind() != reflect.Map {
+ err = NewFatalError("which is not a map")
+ return
+ }
+
+ err = errors.New("")
+ if c.Pointer() == e.Pointer() {
+ err = nil
+ }
+ return
+}
+
+func checkAgainstPtr(e reflect.Value, c reflect.Value) (err error) {
+ // Create a description of e's type, e.g. "*int".
+ typeStr := fmt.Sprintf("*%v", e.Type().Elem())
+
+ // Make sure c is a pointer of the correct type.
+ if c.Kind() != reflect.Ptr ||
+ c.Type().Elem() != e.Type().Elem() {
+ err = NewFatalError(fmt.Sprintf("which is not a %s", typeStr))
+ return
+ }
+
+ err = errors.New("")
+ if c.Pointer() == e.Pointer() {
+ err = nil
+ }
+ return
+}
+
+func checkAgainstSlice(e reflect.Value, c reflect.Value) (err error) {
+ // Create a description of e's type, e.g. "[]int".
+ typeStr := fmt.Sprintf("[]%v", e.Type().Elem())
+
+ // Make sure c is a slice of the correct type.
+ if c.Kind() != reflect.Slice ||
+ c.Type().Elem() != e.Type().Elem() {
+ err = NewFatalError(fmt.Sprintf("which is not a %s", typeStr))
+ return
+ }
+
+ err = errors.New("")
+ if c.Pointer() == e.Pointer() {
+ err = nil
+ }
+ return
+}
+
+func checkAgainstString(e reflect.Value, c reflect.Value) (err error) {
+ // Make sure c is a string.
+ if c.Kind() != reflect.String {
+ err = NewFatalError("which is not a string")
+ return
+ }
+
+ err = errors.New("")
+ if c.String() == e.String() {
+ err = nil
+ }
+ return
+}
+
+func checkAgainstArray(e reflect.Value, c reflect.Value) (err error) {
+ // Create a description of e's type, e.g. "[2]int".
+ typeStr := fmt.Sprintf("%v", e.Type())
+
+ // Make sure c is the correct type.
+ if c.Type() != e.Type() {
+ err = NewFatalError(fmt.Sprintf("which is not %s", typeStr))
+ return
+ }
+
+ // Check for equality.
+ if e.Interface() != c.Interface() {
+ err = errors.New("")
+ return
+ }
+
+ return
+}
+
+func checkAgainstUnsafePointer(e reflect.Value, c reflect.Value) (err error) {
+ // Make sure c is a pointer.
+ if c.Kind() != reflect.UnsafePointer {
+ err = NewFatalError("which is not a unsafe.Pointer")
+ return
+ }
+
+ err = errors.New("")
+ if c.Pointer() == e.Pointer() {
+ err = nil
+ }
+ return
+}
+
+func checkForNil(c reflect.Value) (err error) {
+ err = errors.New("")
+
+ // Make sure it is legal to call IsNil.
+ switch c.Kind() {
+ case reflect.Invalid:
+ case reflect.Chan:
+ case reflect.Func:
+ case reflect.Interface:
+ case reflect.Map:
+ case reflect.Ptr:
+ case reflect.Slice:
+
+ default:
+ err = NewFatalError("which cannot be compared to nil")
+ return
+ }
+
+ // Ask whether the value is nil. Handle a nil literal (kind Invalid)
+ // specially, since it's not legal to call IsNil there.
+ if c.Kind() == reflect.Invalid || c.IsNil() {
+ err = nil
+ }
+ return
+}
+
+////////////////////////////////////////////////////////////////////////
+// Public implementation
+////////////////////////////////////////////////////////////////////////
+
+func (m *equalsMatcher) Matches(candidate interface{}) error {
+ e := m.expectedValue
+ c := reflect.ValueOf(candidate)
+ ek := e.Kind()
+
+ switch {
+ case ek == reflect.Bool:
+ return checkAgainstBool(e.Bool(), c)
+
+ case isSignedInteger(e):
+ return checkAgainstInt64(e.Int(), c)
+
+ case isUnsignedInteger(e):
+ return checkAgainstUint64(e.Uint(), c)
+
+ case ek == reflect.Float32:
+ return checkAgainstFloat32(float32(e.Float()), c)
+
+ case ek == reflect.Float64:
+ return checkAgainstFloat64(e.Float(), c)
+
+ case ek == reflect.Complex64:
+ return checkAgainstComplex64(complex64(e.Complex()), c)
+
+ case ek == reflect.Complex128:
+ return checkAgainstComplex128(complex128(e.Complex()), c)
+
+ case ek == reflect.Chan:
+ return checkAgainstChan(e, c)
+
+ case ek == reflect.Func:
+ return checkAgainstFunc(e, c)
+
+ case ek == reflect.Map:
+ return checkAgainstMap(e, c)
+
+ case ek == reflect.Ptr:
+ return checkAgainstPtr(e, c)
+
+ case ek == reflect.Slice:
+ return checkAgainstSlice(e, c)
+
+ case ek == reflect.String:
+ return checkAgainstString(e, c)
+
+ case ek == reflect.Array:
+ return checkAgainstArray(e, c)
+
+ case ek == reflect.UnsafePointer:
+ return checkAgainstUnsafePointer(e, c)
+
+ case ek == reflect.Invalid:
+ return checkForNil(c)
+ }
+
+ panic(fmt.Sprintf("equalsMatcher.Matches: unexpected kind: %v", ek))
+}
+
+func (m *equalsMatcher) Description() string {
+ // Special case: handle nil.
+ if !m.expectedValue.IsValid() {
+ return "is nil"
+ }
+
+ return fmt.Sprintf("%v", m.expectedValue.Interface())
+}
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/greater_or_equal.go b/vendor/github.com/smartystreets/assertions/internal/oglematchers/greater_or_equal.go
new file mode 100644
index 0000000..4b9d103
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/greater_or_equal.go
@@ -0,0 +1,39 @@
+// Copyright 2011 Aaron Jacobs. All Rights Reserved.
+// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package oglematchers
+
+import (
+ "fmt"
+ "reflect"
+)
+
+// GreaterOrEqual returns a matcher that matches integer, floating point, or
+// strings values v such that v >= x. Comparison is not defined between numeric
+// and string types, but is defined between all integer and floating point
+// types.
+//
+// x must itself be an integer, floating point, or string type; otherwise,
+// GreaterOrEqual will panic.
+func GreaterOrEqual(x interface{}) Matcher {
+ desc := fmt.Sprintf("greater than or equal to %v", x)
+
+ // Special case: make it clear that strings are strings.
+ if reflect.TypeOf(x).Kind() == reflect.String {
+ desc = fmt.Sprintf("greater than or equal to \"%s\"", x)
+ }
+
+ return transformDescription(Not(LessThan(x)), desc)
+}
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/greater_than.go b/vendor/github.com/smartystreets/assertions/internal/oglematchers/greater_than.go
new file mode 100644
index 0000000..3eef321
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/greater_than.go
@@ -0,0 +1,39 @@
+// Copyright 2011 Aaron Jacobs. All Rights Reserved.
+// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package oglematchers
+
+import (
+ "fmt"
+ "reflect"
+)
+
+// GreaterThan returns a matcher that matches integer, floating point, or
+// strings values v such that v > x. Comparison is not defined between numeric
+// and string types, but is defined between all integer and floating point
+// types.
+//
+// x must itself be an integer, floating point, or string type; otherwise,
+// GreaterThan will panic.
+func GreaterThan(x interface{}) Matcher {
+ desc := fmt.Sprintf("greater than %v", x)
+
+ // Special case: make it clear that strings are strings.
+ if reflect.TypeOf(x).Kind() == reflect.String {
+ desc = fmt.Sprintf("greater than \"%s\"", x)
+ }
+
+ return transformDescription(Not(LessOrEqual(x)), desc)
+}
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/less_or_equal.go b/vendor/github.com/smartystreets/assertions/internal/oglematchers/less_or_equal.go
new file mode 100644
index 0000000..8402cde
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/less_or_equal.go
@@ -0,0 +1,41 @@
+// Copyright 2011 Aaron Jacobs. All Rights Reserved.
+// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package oglematchers
+
+import (
+ "fmt"
+ "reflect"
+)
+
+// LessOrEqual returns a matcher that matches integer, floating point, or
+// strings values v such that v <= x. Comparison is not defined between numeric
+// and string types, but is defined between all integer and floating point
+// types.
+//
+// x must itself be an integer, floating point, or string type; otherwise,
+// LessOrEqual will panic.
+func LessOrEqual(x interface{}) Matcher {
+ desc := fmt.Sprintf("less than or equal to %v", x)
+
+ // Special case: make it clear that strings are strings.
+ if reflect.TypeOf(x).Kind() == reflect.String {
+ desc = fmt.Sprintf("less than or equal to \"%s\"", x)
+ }
+
+ // Put LessThan last so that its error messages will be used in the event of
+ // failure.
+ return transformDescription(AnyOf(Equals(x), LessThan(x)), desc)
+}
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/less_than.go b/vendor/github.com/smartystreets/assertions/internal/oglematchers/less_than.go
new file mode 100644
index 0000000..8258e45
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/less_than.go
@@ -0,0 +1,152 @@
+// Copyright 2011 Aaron Jacobs. All Rights Reserved.
+// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package oglematchers
+
+import (
+ "errors"
+ "fmt"
+ "math"
+ "reflect"
+)
+
+// LessThan returns a matcher that matches integer, floating point, or strings
+// values v such that v < x. Comparison is not defined between numeric and
+// string types, but is defined between all integer and floating point types.
+//
+// x must itself be an integer, floating point, or string type; otherwise,
+// LessThan will panic.
+func LessThan(x interface{}) Matcher {
+ v := reflect.ValueOf(x)
+ kind := v.Kind()
+
+ switch {
+ case isInteger(v):
+ case isFloat(v):
+ case kind == reflect.String:
+
+ default:
+ panic(fmt.Sprintf("LessThan: unexpected kind %v", kind))
+ }
+
+ return &lessThanMatcher{v}
+}
+
+type lessThanMatcher struct {
+ limit reflect.Value
+}
+
+func (m *lessThanMatcher) Description() string {
+ // Special case: make it clear that strings are strings.
+ if m.limit.Kind() == reflect.String {
+ return fmt.Sprintf("less than \"%s\"", m.limit.String())
+ }
+
+ return fmt.Sprintf("less than %v", m.limit.Interface())
+}
+
+func compareIntegers(v1, v2 reflect.Value) (err error) {
+ err = errors.New("")
+
+ switch {
+ case isSignedInteger(v1) && isSignedInteger(v2):
+ if v1.Int() < v2.Int() {
+ err = nil
+ }
+ return
+
+ case isSignedInteger(v1) && isUnsignedInteger(v2):
+ if v1.Int() < 0 || uint64(v1.Int()) < v2.Uint() {
+ err = nil
+ }
+ return
+
+ case isUnsignedInteger(v1) && isSignedInteger(v2):
+ if v1.Uint() <= math.MaxInt64 && int64(v1.Uint()) < v2.Int() {
+ err = nil
+ }
+ return
+
+ case isUnsignedInteger(v1) && isUnsignedInteger(v2):
+ if v1.Uint() < v2.Uint() {
+ err = nil
+ }
+ return
+ }
+
+ panic(fmt.Sprintf("compareIntegers: %v %v", v1, v2))
+}
+
+func getFloat(v reflect.Value) float64 {
+ switch {
+ case isSignedInteger(v):
+ return float64(v.Int())
+
+ case isUnsignedInteger(v):
+ return float64(v.Uint())
+
+ case isFloat(v):
+ return v.Float()
+ }
+
+ panic(fmt.Sprintf("getFloat: %v", v))
+}
+
+func (m *lessThanMatcher) Matches(c interface{}) (err error) {
+ v1 := reflect.ValueOf(c)
+ v2 := m.limit
+
+ err = errors.New("")
+
+ // Handle strings as a special case.
+ if v1.Kind() == reflect.String && v2.Kind() == reflect.String {
+ if v1.String() < v2.String() {
+ err = nil
+ }
+ return
+ }
+
+ // If we get here, we require that we are dealing with integers or floats.
+ v1Legal := isInteger(v1) || isFloat(v1)
+ v2Legal := isInteger(v2) || isFloat(v2)
+ if !v1Legal || !v2Legal {
+ err = NewFatalError("which is not comparable")
+ return
+ }
+
+ // Handle the various comparison cases.
+ switch {
+ // Both integers
+ case isInteger(v1) && isInteger(v2):
+ return compareIntegers(v1, v2)
+
+ // At least one float32
+ case v1.Kind() == reflect.Float32 || v2.Kind() == reflect.Float32:
+ if float32(getFloat(v1)) < float32(getFloat(v2)) {
+ err = nil
+ }
+ return
+
+ // At least one float64
+ case v1.Kind() == reflect.Float64 || v2.Kind() == reflect.Float64:
+ if getFloat(v1) < getFloat(v2) {
+ err = nil
+ }
+ return
+ }
+
+ // We shouldn't get here.
+ panic(fmt.Sprintf("lessThanMatcher.Matches: Shouldn't get here: %v %v", v1, v2))
+}
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/matcher.go b/vendor/github.com/smartystreets/assertions/internal/oglematchers/matcher.go
new file mode 100644
index 0000000..78159a0
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/matcher.go
@@ -0,0 +1,86 @@
+// Copyright 2011 Aaron Jacobs. All Rights Reserved.
+// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package oglematchers provides a set of matchers useful in a testing or
+// mocking framework. These matchers are inspired by and mostly compatible with
+// Google Test for C++ and Google JS Test.
+//
+// This package is used by github.com/smartystreets/assertions/internal/ogletest and
+// github.com/smartystreets/assertions/internal/oglemock, which may be more directly useful if you're not
+// writing your own testing package or defining your own matchers.
+package oglematchers
+
+// A Matcher is some predicate implicitly defining a set of values that it
+// matches. For example, GreaterThan(17) matches all numeric values greater
+// than 17, and HasSubstr("taco") matches all strings with the substring
+// "taco".
+//
+// Matchers are typically exposed to tests via constructor functions like
+// HasSubstr. In order to implement such a function you can either define your
+// own matcher type or use NewMatcher.
+type Matcher interface {
+ // Check whether the supplied value belongs to the the set defined by the
+ // matcher. Return a non-nil error if and only if it does not.
+ //
+ // The error describes why the value doesn't match. The error text is a
+ // relative clause that is suitable for being placed after the value. For
+ // example, a predicate that matches strings with a particular substring may,
+ // when presented with a numerical value, return the following error text:
+ //
+ // "which is not a string"
+ //
+ // Then the failure message may look like:
+ //
+ // Expected: has substring "taco"
+ // Actual: 17, which is not a string
+ //
+ // If the error is self-apparent based on the description of the matcher, the
+ // error text may be empty (but the error still non-nil). For example:
+ //
+ // Expected: 17
+ // Actual: 19
+ //
+ // If you are implementing a new matcher, see also the documentation on
+ // FatalError.
+ Matches(candidate interface{}) error
+
+ // Description returns a string describing the property that values matching
+ // this matcher have, as a verb phrase where the subject is the value. For
+ // example, "is greather than 17" or "has substring "taco"".
+ Description() string
+}
+
+// FatalError is an implementation of the error interface that may be returned
+// from matchers, indicating the error should be propagated. Returning a
+// *FatalError indicates that the matcher doesn't process values of the
+// supplied type, or otherwise doesn't know how to handle the value.
+//
+// For example, if GreaterThan(17) returned false for the value "taco" without
+// a fatal error, then Not(GreaterThan(17)) would return true. This is
+// technically correct, but is surprising and may mask failures where the wrong
+// sort of matcher is accidentally used. Instead, GreaterThan(17) can return a
+// fatal error, which will be propagated by Not().
+type FatalError struct {
+ errorText string
+}
+
+// NewFatalError creates a FatalError struct with the supplied error text.
+func NewFatalError(s string) *FatalError {
+ return &FatalError{s}
+}
+
+func (e *FatalError) Error() string {
+ return e.errorText
+}
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/not.go b/vendor/github.com/smartystreets/assertions/internal/oglematchers/not.go
new file mode 100644
index 0000000..623789f
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/not.go
@@ -0,0 +1,53 @@
+// Copyright 2011 Aaron Jacobs. All Rights Reserved.
+// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package oglematchers
+
+import (
+ "errors"
+ "fmt"
+)
+
+// Not returns a matcher that inverts the set of values matched by the wrapped
+// matcher. It does not transform the result for values for which the wrapped
+// matcher returns a fatal error.
+func Not(m Matcher) Matcher {
+ return &notMatcher{m}
+}
+
+type notMatcher struct {
+ wrapped Matcher
+}
+
+func (m *notMatcher) Matches(c interface{}) (err error) {
+ err = m.wrapped.Matches(c)
+
+ // Did the wrapped matcher say yes?
+ if err == nil {
+ return errors.New("")
+ }
+
+ // Did the wrapped matcher return a fatal error?
+ if _, isFatal := err.(*FatalError); isFatal {
+ return err
+ }
+
+ // The wrapped matcher returned a non-fatal error.
+ return nil
+}
+
+func (m *notMatcher) Description() string {
+ return fmt.Sprintf("not(%s)", m.wrapped.Description())
+}
diff --git a/vendor/github.com/smartystreets/assertions/internal/oglematchers/transform_description.go b/vendor/github.com/smartystreets/assertions/internal/oglematchers/transform_description.go
new file mode 100644
index 0000000..8ea2807
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/internal/oglematchers/transform_description.go
@@ -0,0 +1,36 @@
+// Copyright 2011 Aaron Jacobs. All Rights Reserved.
+// Author: aaronjjacobs@gmail.com (Aaron Jacobs)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package oglematchers
+
+// transformDescription returns a matcher that is equivalent to the supplied
+// one, except that it has the supplied description instead of the one attached
+// to the existing matcher.
+func transformDescription(m Matcher, newDesc string) Matcher {
+ return &transformDescriptionMatcher{newDesc, m}
+}
+
+type transformDescriptionMatcher struct {
+ desc string
+ wrappedMatcher Matcher
+}
+
+func (m *transformDescriptionMatcher) Description() string {
+ return m.desc
+}
+
+func (m *transformDescriptionMatcher) Matches(c interface{}) error {
+ return m.wrappedMatcher.Matches(c)
+}
diff --git a/vendor/github.com/smartystreets/assertions/messages.go b/vendor/github.com/smartystreets/assertions/messages.go
new file mode 100644
index 0000000..6ed7dc2
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/messages.go
@@ -0,0 +1,97 @@
+package assertions
+
+const ( // equality
+ shouldHaveBeenEqual = "Expected: '%v'\nActual: '%v'\n(Should be equal)"
+ shouldNotHaveBeenEqual = "Expected '%v'\nto NOT equal '%v'\n(but it did)!"
+ shouldHaveBeenEqualTypeMismatch = "Expected: '%v' (%T)\nActual: '%v' (%T)\n(Should be equal, type mismatch)"
+ shouldHaveBeenAlmostEqual = "Expected '%v' to almost equal '%v' (but it didn't)!"
+ shouldHaveNotBeenAlmostEqual = "Expected '%v' to NOT almost equal '%v' (but it did)!"
+ shouldHaveResembled = "Expected: '%s'\nActual: '%s'\n(Should resemble)!"
+ shouldNotHaveResembled = "Expected '%#v'\nto NOT resemble '%#v'\n(but it did)!"
+ shouldBePointers = "Both arguments should be pointers "
+ shouldHaveBeenNonNilPointer = shouldBePointers + "(the %s was %s)!"
+ shouldHavePointedTo = "Expected '%+v' (address: '%v') and '%+v' (address: '%v') to be the same address (but their weren't)!"
+ shouldNotHavePointedTo = "Expected '%+v' and '%+v' to be different references (but they matched: '%v')!"
+ shouldHaveBeenNil = "Expected: nil\nActual: '%v'"
+ shouldNotHaveBeenNil = "Expected '%+v' to NOT be nil (but it was)!"
+ shouldHaveBeenTrue = "Expected: true\nActual: %v"
+ shouldHaveBeenFalse = "Expected: false\nActual: %v"
+ shouldHaveBeenZeroValue = "'%+v' should have been the zero value" //"Expected: (zero value)\nActual: %v"
+ shouldNotHaveBeenZeroValue = "'%+v' should NOT have been the zero value"
+)
+
+const ( // quantity comparisons
+ shouldHaveBeenGreater = "Expected '%v' to be greater than '%v' (but it wasn't)!"
+ shouldHaveBeenGreaterOrEqual = "Expected '%v' to be greater than or equal to '%v' (but it wasn't)!"
+ shouldHaveBeenLess = "Expected '%v' to be less than '%v' (but it wasn't)!"
+ shouldHaveBeenLessOrEqual = "Expected '%v' to be less than or equal to '%v' (but it wasn't)!"
+ shouldHaveBeenBetween = "Expected '%v' to be between '%v' and '%v' (but it wasn't)!"
+ shouldNotHaveBeenBetween = "Expected '%v' NOT to be between '%v' and '%v' (but it was)!"
+ shouldHaveDifferentUpperAndLower = "The lower and upper bounds must be different values (they were both '%v')."
+ shouldHaveBeenBetweenOrEqual = "Expected '%v' to be between '%v' and '%v' or equal to one of them (but it wasn't)!"
+ shouldNotHaveBeenBetweenOrEqual = "Expected '%v' NOT to be between '%v' and '%v' or equal to one of them (but it was)!"
+)
+
+const ( // collections
+ shouldHaveContained = "Expected the container (%v) to contain: '%v' (but it didn't)!"
+ shouldNotHaveContained = "Expected the container (%v) NOT to contain: '%v' (but it did)!"
+ shouldHaveContainedKey = "Expected the %v to contain the key: %v (but it didn't)!"
+ shouldNotHaveContainedKey = "Expected the %v NOT to contain the key: %v (but it did)!"
+ shouldHaveBeenIn = "Expected '%v' to be in the container (%v), but it wasn't!"
+ shouldNotHaveBeenIn = "Expected '%v' NOT to be in the container (%v), but it was!"
+ shouldHaveBeenAValidCollection = "You must provide a valid container (was %v)!"
+ shouldHaveBeenAValidMap = "You must provide a valid map type (was %v)!"
+ shouldHaveBeenEmpty = "Expected %+v to be empty (but it wasn't)!"
+ shouldNotHaveBeenEmpty = "Expected %+v to NOT be empty (but it was)!"
+ shouldHaveBeenAValidInteger = "You must provide a valid integer (was %v)!"
+ shouldHaveBeenAValidLength = "You must provide a valid positive integer (was %v)!"
+ shouldHaveHadLength = "Expected collection to have length equal to [%v], but it's length was [%v] instead! contents: %+v"
+)
+
+const ( // strings
+ shouldHaveStartedWith = "Expected '%v'\nto start with '%v'\n(but it didn't)!"
+ shouldNotHaveStartedWith = "Expected '%v'\nNOT to start with '%v'\n(but it did)!"
+ shouldHaveEndedWith = "Expected '%v'\nto end with '%v'\n(but it didn't)!"
+ shouldNotHaveEndedWith = "Expected '%v'\nNOT to end with '%v'\n(but it did)!"
+ shouldAllBeStrings = "All arguments to this assertion must be strings (you provided: %v)."
+ shouldBothBeStrings = "Both arguments to this assertion must be strings (you provided %v and %v)."
+ shouldBeString = "The argument to this assertion must be a string (you provided %v)."
+ shouldHaveContainedSubstring = "Expected '%s' to contain substring '%s' (but it didn't)!"
+ shouldNotHaveContainedSubstring = "Expected '%s' NOT to contain substring '%s' (but it did)!"
+ shouldHaveBeenBlank = "Expected '%s' to be blank (but it wasn't)!"
+ shouldNotHaveBeenBlank = "Expected value to NOT be blank (but it was)!"
+)
+
+const ( // panics
+ shouldUseVoidNiladicFunction = "You must provide a void, niladic function as the first argument!"
+ shouldHavePanickedWith = "Expected func() to panic with '%v' (but it panicked with '%v')!"
+ shouldHavePanicked = "Expected func() to panic (but it didn't)!"
+ shouldNotHavePanicked = "Expected func() NOT to panic (error: '%+v')!"
+ shouldNotHavePanickedWith = "Expected func() NOT to panic with '%v' (but it did)!"
+)
+
+const ( // type checking
+ shouldHaveBeenA = "Expected '%v' to be: '%v' (but was: '%v')!"
+ shouldNotHaveBeenA = "Expected '%v' to NOT be: '%v' (but it was)!"
+
+ shouldHaveImplemented = "Expected: '%v interface support'\nActual: '%v' does not implement the interface!"
+ shouldNotHaveImplemented = "Expected '%v'\nto NOT implement '%v'\n(but it did)!"
+ shouldCompareWithInterfacePointer = "The expected value must be a pointer to an interface type (eg. *fmt.Stringer)"
+ shouldNotBeNilActual = "The actual value was 'nil' and should be a value or a pointer to a value!"
+
+ shouldBeError = "Expected an error value (but was '%v' instead)!"
+ shouldBeErrorInvalidComparisonValue = "The final argument to this assertion must be a string or an error value (you provided: '%v')."
+)
+
+const ( // time comparisons
+ shouldUseTimes = "You must provide time instances as arguments to this assertion."
+ shouldUseTimeSlice = "You must provide a slice of time instances as the first argument to this assertion."
+ shouldUseDurationAndTime = "You must provide a duration and a time as arguments to this assertion."
+ shouldHaveHappenedBefore = "Expected '%v' to happen before '%v' (it happened '%v' after)!"
+ shouldHaveHappenedAfter = "Expected '%v' to happen after '%v' (it happened '%v' before)!"
+ shouldHaveHappenedBetween = "Expected '%v' to happen between '%v' and '%v' (it happened '%v' outside threshold)!"
+ shouldNotHaveHappenedOnOrBetween = "Expected '%v' to NOT happen on or between '%v' and '%v' (but it did)!"
+
+ // format params: incorrect-index, previous-index, previous-time, incorrect-index, incorrect-time
+ shouldHaveBeenChronological = "The 'Time' at index [%d] should have happened after the previous one (but it didn't!):\n [%d]: %s\n [%d]: %s (see, it happened before!)"
+)
diff --git a/vendor/github.com/smartystreets/assertions/panic.go b/vendor/github.com/smartystreets/assertions/panic.go
new file mode 100644
index 0000000..7e75db1
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/panic.go
@@ -0,0 +1,115 @@
+package assertions
+
+import "fmt"
+
+// ShouldPanic receives a void, niladic function and expects to recover a panic.
+func ShouldPanic(actual interface{}, expected ...interface{}) (message string) {
+ if fail := need(0, expected); fail != success {
+ return fail
+ }
+
+ action, _ := actual.(func())
+
+ if action == nil {
+ message = shouldUseVoidNiladicFunction
+ return
+ }
+
+ defer func() {
+ recovered := recover()
+ if recovered == nil {
+ message = shouldHavePanicked
+ } else {
+ message = success
+ }
+ }()
+ action()
+
+ return
+}
+
+// ShouldNotPanic receives a void, niladic function and expects to execute the function without any panic.
+func ShouldNotPanic(actual interface{}, expected ...interface{}) (message string) {
+ if fail := need(0, expected); fail != success {
+ return fail
+ }
+
+ action, _ := actual.(func())
+
+ if action == nil {
+ message = shouldUseVoidNiladicFunction
+ return
+ }
+
+ defer func() {
+ recovered := recover()
+ if recovered != nil {
+ message = fmt.Sprintf(shouldNotHavePanicked, recovered)
+ } else {
+ message = success
+ }
+ }()
+ action()
+
+ return
+}
+
+// ShouldPanicWith receives a void, niladic function and expects to recover a panic with the second argument as the content.
+func ShouldPanicWith(actual interface{}, expected ...interface{}) (message string) {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ action, _ := actual.(func())
+
+ if action == nil {
+ message = shouldUseVoidNiladicFunction
+ return
+ }
+
+ defer func() {
+ recovered := recover()
+ if recovered == nil {
+ message = shouldHavePanicked
+ } else {
+ if equal := ShouldEqual(recovered, expected[0]); equal != success {
+ message = serializer.serialize(expected[0], recovered, fmt.Sprintf(shouldHavePanickedWith, expected[0], recovered))
+ } else {
+ message = success
+ }
+ }
+ }()
+ action()
+
+ return
+}
+
+// ShouldNotPanicWith receives a void, niladic function and expects to recover a panic whose content differs from the second argument.
+func ShouldNotPanicWith(actual interface{}, expected ...interface{}) (message string) {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ action, _ := actual.(func())
+
+ if action == nil {
+ message = shouldUseVoidNiladicFunction
+ return
+ }
+
+ defer func() {
+ recovered := recover()
+ if recovered == nil {
+ message = success
+ } else {
+ if equal := ShouldEqual(recovered, expected[0]); equal == success {
+ message = fmt.Sprintf(shouldNotHavePanickedWith, expected[0])
+ } else {
+ message = success
+ }
+ }
+ }()
+ action()
+
+ return
+}
diff --git a/vendor/github.com/smartystreets/assertions/quantity.go b/vendor/github.com/smartystreets/assertions/quantity.go
new file mode 100644
index 0000000..f28b0a0
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/quantity.go
@@ -0,0 +1,141 @@
+package assertions
+
+import (
+ "fmt"
+
+ "github.com/smartystreets/assertions/internal/oglematchers"
+)
+
+// ShouldBeGreaterThan receives exactly two parameters and ensures that the first is greater than the second.
+func ShouldBeGreaterThan(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ if matchError := oglematchers.GreaterThan(expected[0]).Matches(actual); matchError != nil {
+ return fmt.Sprintf(shouldHaveBeenGreater, actual, expected[0])
+ }
+ return success
+}
+
+// ShouldBeGreaterThanOrEqualTo receives exactly two parameters and ensures that the first is greater than or equal to the second.
+func ShouldBeGreaterThanOrEqualTo(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ } else if matchError := oglematchers.GreaterOrEqual(expected[0]).Matches(actual); matchError != nil {
+ return fmt.Sprintf(shouldHaveBeenGreaterOrEqual, actual, expected[0])
+ }
+ return success
+}
+
+// ShouldBeLessThan receives exactly two parameters and ensures that the first is less than the second.
+func ShouldBeLessThan(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ } else if matchError := oglematchers.LessThan(expected[0]).Matches(actual); matchError != nil {
+ return fmt.Sprintf(shouldHaveBeenLess, actual, expected[0])
+ }
+ return success
+}
+
+// ShouldBeLessThan receives exactly two parameters and ensures that the first is less than or equal to the second.
+func ShouldBeLessThanOrEqualTo(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ } else if matchError := oglematchers.LessOrEqual(expected[0]).Matches(actual); matchError != nil {
+ return fmt.Sprintf(shouldHaveBeenLessOrEqual, actual, expected[0])
+ }
+ return success
+}
+
+// ShouldBeBetween receives exactly three parameters: an actual value, a lower bound, and an upper bound.
+// It ensures that the actual value is between both bounds (but not equal to either of them).
+func ShouldBeBetween(actual interface{}, expected ...interface{}) string {
+ if fail := need(2, expected); fail != success {
+ return fail
+ }
+ lower, upper, fail := deriveBounds(expected)
+
+ if fail != success {
+ return fail
+ } else if !isBetween(actual, lower, upper) {
+ return fmt.Sprintf(shouldHaveBeenBetween, actual, lower, upper)
+ }
+ return success
+}
+
+// ShouldNotBeBetween receives exactly three parameters: an actual value, a lower bound, and an upper bound.
+// It ensures that the actual value is NOT between both bounds.
+func ShouldNotBeBetween(actual interface{}, expected ...interface{}) string {
+ if fail := need(2, expected); fail != success {
+ return fail
+ }
+ lower, upper, fail := deriveBounds(expected)
+
+ if fail != success {
+ return fail
+ } else if isBetween(actual, lower, upper) {
+ return fmt.Sprintf(shouldNotHaveBeenBetween, actual, lower, upper)
+ }
+ return success
+}
+func deriveBounds(values []interface{}) (lower interface{}, upper interface{}, fail string) {
+ lower = values[0]
+ upper = values[1]
+
+ if ShouldNotEqual(lower, upper) != success {
+ return nil, nil, fmt.Sprintf(shouldHaveDifferentUpperAndLower, lower)
+ } else if ShouldBeLessThan(lower, upper) != success {
+ lower, upper = upper, lower
+ }
+ return lower, upper, success
+}
+func isBetween(value, lower, upper interface{}) bool {
+ if ShouldBeGreaterThan(value, lower) != success {
+ return false
+ } else if ShouldBeLessThan(value, upper) != success {
+ return false
+ }
+ return true
+}
+
+// ShouldBeBetweenOrEqual receives exactly three parameters: an actual value, a lower bound, and an upper bound.
+// It ensures that the actual value is between both bounds or equal to one of them.
+func ShouldBeBetweenOrEqual(actual interface{}, expected ...interface{}) string {
+ if fail := need(2, expected); fail != success {
+ return fail
+ }
+ lower, upper, fail := deriveBounds(expected)
+
+ if fail != success {
+ return fail
+ } else if !isBetweenOrEqual(actual, lower, upper) {
+ return fmt.Sprintf(shouldHaveBeenBetweenOrEqual, actual, lower, upper)
+ }
+ return success
+}
+
+// ShouldNotBeBetweenOrEqual receives exactly three parameters: an actual value, a lower bound, and an upper bound.
+// It ensures that the actual value is nopt between the bounds nor equal to either of them.
+func ShouldNotBeBetweenOrEqual(actual interface{}, expected ...interface{}) string {
+ if fail := need(2, expected); fail != success {
+ return fail
+ }
+ lower, upper, fail := deriveBounds(expected)
+
+ if fail != success {
+ return fail
+ } else if isBetweenOrEqual(actual, lower, upper) {
+ return fmt.Sprintf(shouldNotHaveBeenBetweenOrEqual, actual, lower, upper)
+ }
+ return success
+}
+
+func isBetweenOrEqual(value, lower, upper interface{}) bool {
+ if ShouldBeGreaterThanOrEqualTo(value, lower) != success {
+ return false
+ } else if ShouldBeLessThanOrEqualTo(value, upper) != success {
+ return false
+ }
+ return true
+}
diff --git a/vendor/github.com/smartystreets/assertions/serializer.go b/vendor/github.com/smartystreets/assertions/serializer.go
new file mode 100644
index 0000000..fa32f94
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/serializer.go
@@ -0,0 +1,63 @@
+package assertions
+
+import (
+ "encoding/json"
+ "fmt"
+
+ "github.com/smartystreets/assertions/internal/go-render/render"
+)
+
+type Serializer interface {
+ serialize(expected, actual interface{}, message string) string
+ serializeDetailed(expected, actual interface{}, message string) string
+}
+
+type failureSerializer struct{}
+
+func (self *failureSerializer) serializeDetailed(expected, actual interface{}, message string) string {
+ view := FailureView{
+ Message: message,
+ Expected: render.Render(expected),
+ Actual: render.Render(actual),
+ }
+ serialized, _ := json.Marshal(view)
+ return string(serialized)
+}
+
+func (self *failureSerializer) serialize(expected, actual interface{}, message string) string {
+ view := FailureView{
+ Message: message,
+ Expected: fmt.Sprintf("%+v", expected),
+ Actual: fmt.Sprintf("%+v", actual),
+ }
+ serialized, _ := json.Marshal(view)
+ return string(serialized)
+}
+
+func newSerializer() *failureSerializer {
+ return &failureSerializer{}
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+// This struct is also declared in github.com/smartystreets/goconvey/convey/reporting.
+// The json struct tags should be equal in both declarations.
+type FailureView struct {
+ Message string `json:"Message"`
+ Expected string `json:"Expected"`
+ Actual string `json:"Actual"`
+}
+
+///////////////////////////////////////////////////////
+
+// noopSerializer just gives back the original message. This is useful when we are using
+// the assertions from a context other than the GoConvey Web UI, that requires the JSON
+// structure provided by the failureSerializer.
+type noopSerializer struct{}
+
+func (self *noopSerializer) serialize(expected, actual interface{}, message string) string {
+ return message
+}
+func (self *noopSerializer) serializeDetailed(expected, actual interface{}, message string) string {
+ return message
+}
diff --git a/vendor/github.com/smartystreets/assertions/strings.go b/vendor/github.com/smartystreets/assertions/strings.go
new file mode 100644
index 0000000..dbc3f04
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/strings.go
@@ -0,0 +1,227 @@
+package assertions
+
+import (
+ "fmt"
+ "reflect"
+ "strings"
+)
+
+// ShouldStartWith receives exactly 2 string parameters and ensures that the first starts with the second.
+func ShouldStartWith(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ value, valueIsString := actual.(string)
+ prefix, prefixIsString := expected[0].(string)
+
+ if !valueIsString || !prefixIsString {
+ return fmt.Sprintf(shouldBothBeStrings, reflect.TypeOf(actual), reflect.TypeOf(expected[0]))
+ }
+
+ return shouldStartWith(value, prefix)
+}
+func shouldStartWith(value, prefix string) string {
+ if !strings.HasPrefix(value, prefix) {
+ shortval := value
+ if len(shortval) > len(prefix) {
+ shortval = shortval[:len(prefix)] + "..."
+ }
+ return serializer.serialize(prefix, shortval, fmt.Sprintf(shouldHaveStartedWith, value, prefix))
+ }
+ return success
+}
+
+// ShouldNotStartWith receives exactly 2 string parameters and ensures that the first does not start with the second.
+func ShouldNotStartWith(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ value, valueIsString := actual.(string)
+ prefix, prefixIsString := expected[0].(string)
+
+ if !valueIsString || !prefixIsString {
+ return fmt.Sprintf(shouldBothBeStrings, reflect.TypeOf(actual), reflect.TypeOf(expected[0]))
+ }
+
+ return shouldNotStartWith(value, prefix)
+}
+func shouldNotStartWith(value, prefix string) string {
+ if strings.HasPrefix(value, prefix) {
+ if value == "" {
+ value = "<empty>"
+ }
+ if prefix == "" {
+ prefix = "<empty>"
+ }
+ return fmt.Sprintf(shouldNotHaveStartedWith, value, prefix)
+ }
+ return success
+}
+
+// ShouldEndWith receives exactly 2 string parameters and ensures that the first ends with the second.
+func ShouldEndWith(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ value, valueIsString := actual.(string)
+ suffix, suffixIsString := expected[0].(string)
+
+ if !valueIsString || !suffixIsString {
+ return fmt.Sprintf(shouldBothBeStrings, reflect.TypeOf(actual), reflect.TypeOf(expected[0]))
+ }
+
+ return shouldEndWith(value, suffix)
+}
+func shouldEndWith(value, suffix string) string {
+ if !strings.HasSuffix(value, suffix) {
+ shortval := value
+ if len(shortval) > len(suffix) {
+ shortval = "..." + shortval[len(shortval)-len(suffix):]
+ }
+ return serializer.serialize(suffix, shortval, fmt.Sprintf(shouldHaveEndedWith, value, suffix))
+ }
+ return success
+}
+
+// ShouldEndWith receives exactly 2 string parameters and ensures that the first does not end with the second.
+func ShouldNotEndWith(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ value, valueIsString := actual.(string)
+ suffix, suffixIsString := expected[0].(string)
+
+ if !valueIsString || !suffixIsString {
+ return fmt.Sprintf(shouldBothBeStrings, reflect.TypeOf(actual), reflect.TypeOf(expected[0]))
+ }
+
+ return shouldNotEndWith(value, suffix)
+}
+func shouldNotEndWith(value, suffix string) string {
+ if strings.HasSuffix(value, suffix) {
+ if value == "" {
+ value = "<empty>"
+ }
+ if suffix == "" {
+ suffix = "<empty>"
+ }
+ return fmt.Sprintf(shouldNotHaveEndedWith, value, suffix)
+ }
+ return success
+}
+
+// ShouldContainSubstring receives exactly 2 string parameters and ensures that the first contains the second as a substring.
+func ShouldContainSubstring(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ long, longOk := actual.(string)
+ short, shortOk := expected[0].(string)
+
+ if !longOk || !shortOk {
+ return fmt.Sprintf(shouldBothBeStrings, reflect.TypeOf(actual), reflect.TypeOf(expected[0]))
+ }
+
+ if !strings.Contains(long, short) {
+ return serializer.serialize(expected[0], actual, fmt.Sprintf(shouldHaveContainedSubstring, long, short))
+ }
+ return success
+}
+
+// ShouldNotContainSubstring receives exactly 2 string parameters and ensures that the first does NOT contain the second as a substring.
+func ShouldNotContainSubstring(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ long, longOk := actual.(string)
+ short, shortOk := expected[0].(string)
+
+ if !longOk || !shortOk {
+ return fmt.Sprintf(shouldBothBeStrings, reflect.TypeOf(actual), reflect.TypeOf(expected[0]))
+ }
+
+ if strings.Contains(long, short) {
+ return fmt.Sprintf(shouldNotHaveContainedSubstring, long, short)
+ }
+ return success
+}
+
+// ShouldBeBlank receives exactly 1 string parameter and ensures that it is equal to "".
+func ShouldBeBlank(actual interface{}, expected ...interface{}) string {
+ if fail := need(0, expected); fail != success {
+ return fail
+ }
+ value, ok := actual.(string)
+ if !ok {
+ return fmt.Sprintf(shouldBeString, reflect.TypeOf(actual))
+ }
+ if value != "" {
+ return serializer.serialize("", value, fmt.Sprintf(shouldHaveBeenBlank, value))
+ }
+ return success
+}
+
+// ShouldNotBeBlank receives exactly 1 string parameter and ensures that it is equal to "".
+func ShouldNotBeBlank(actual interface{}, expected ...interface{}) string {
+ if fail := need(0, expected); fail != success {
+ return fail
+ }
+ value, ok := actual.(string)
+ if !ok {
+ return fmt.Sprintf(shouldBeString, reflect.TypeOf(actual))
+ }
+ if value == "" {
+ return shouldNotHaveBeenBlank
+ }
+ return success
+}
+
+// ShouldEqualWithout receives exactly 3 string parameters and ensures that the first is equal to the second
+// after removing all instances of the third from the first using strings.Replace(first, third, "", -1).
+func ShouldEqualWithout(actual interface{}, expected ...interface{}) string {
+ if fail := need(2, expected); fail != success {
+ return fail
+ }
+ actualString, ok1 := actual.(string)
+ expectedString, ok2 := expected[0].(string)
+ replace, ok3 := expected[1].(string)
+
+ if !ok1 || !ok2 || !ok3 {
+ return fmt.Sprintf(shouldAllBeStrings, []reflect.Type{
+ reflect.TypeOf(actual),
+ reflect.TypeOf(expected[0]),
+ reflect.TypeOf(expected[1]),
+ })
+ }
+
+ replaced := strings.Replace(actualString, replace, "", -1)
+ if replaced == expectedString {
+ return ""
+ }
+
+ return fmt.Sprintf("Expected '%s' to equal '%s' but without any '%s' (but it didn't).", actualString, expectedString, replace)
+}
+
+// ShouldEqualTrimSpace receives exactly 2 string parameters and ensures that the first is equal to the second
+// after removing all leading and trailing whitespace using strings.TrimSpace(first).
+func ShouldEqualTrimSpace(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ actualString, valueIsString := actual.(string)
+ _, value2IsString := expected[0].(string)
+
+ if !valueIsString || !value2IsString {
+ return fmt.Sprintf(shouldBothBeStrings, reflect.TypeOf(actual), reflect.TypeOf(expected[0]))
+ }
+
+ actualString = strings.TrimSpace(actualString)
+ return ShouldEqual(actualString, expected[0])
+}
diff --git a/vendor/github.com/smartystreets/assertions/time.go b/vendor/github.com/smartystreets/assertions/time.go
new file mode 100644
index 0000000..7e05026
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/time.go
@@ -0,0 +1,202 @@
+package assertions
+
+import (
+ "fmt"
+ "time"
+)
+
+// ShouldHappenBefore receives exactly 2 time.Time arguments and asserts that the first happens before the second.
+func ShouldHappenBefore(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+ actualTime, firstOk := actual.(time.Time)
+ expectedTime, secondOk := expected[0].(time.Time)
+
+ if !firstOk || !secondOk {
+ return shouldUseTimes
+ }
+
+ if !actualTime.Before(expectedTime) {
+ return fmt.Sprintf(shouldHaveHappenedBefore, actualTime, expectedTime, actualTime.Sub(expectedTime))
+ }
+
+ return success
+}
+
+// ShouldHappenOnOrBefore receives exactly 2 time.Time arguments and asserts that the first happens on or before the second.
+func ShouldHappenOnOrBefore(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+ actualTime, firstOk := actual.(time.Time)
+ expectedTime, secondOk := expected[0].(time.Time)
+
+ if !firstOk || !secondOk {
+ return shouldUseTimes
+ }
+
+ if actualTime.Equal(expectedTime) {
+ return success
+ }
+ return ShouldHappenBefore(actualTime, expectedTime)
+}
+
+// ShouldHappenAfter receives exactly 2 time.Time arguments and asserts that the first happens after the second.
+func ShouldHappenAfter(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+ actualTime, firstOk := actual.(time.Time)
+ expectedTime, secondOk := expected[0].(time.Time)
+
+ if !firstOk || !secondOk {
+ return shouldUseTimes
+ }
+ if !actualTime.After(expectedTime) {
+ return fmt.Sprintf(shouldHaveHappenedAfter, actualTime, expectedTime, expectedTime.Sub(actualTime))
+ }
+ return success
+}
+
+// ShouldHappenOnOrAfter receives exactly 2 time.Time arguments and asserts that the first happens on or after the second.
+func ShouldHappenOnOrAfter(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+ actualTime, firstOk := actual.(time.Time)
+ expectedTime, secondOk := expected[0].(time.Time)
+
+ if !firstOk || !secondOk {
+ return shouldUseTimes
+ }
+ if actualTime.Equal(expectedTime) {
+ return success
+ }
+ return ShouldHappenAfter(actualTime, expectedTime)
+}
+
+// ShouldHappenBetween receives exactly 3 time.Time arguments and asserts that the first happens between (not on) the second and third.
+func ShouldHappenBetween(actual interface{}, expected ...interface{}) string {
+ if fail := need(2, expected); fail != success {
+ return fail
+ }
+ actualTime, firstOk := actual.(time.Time)
+ min, secondOk := expected[0].(time.Time)
+ max, thirdOk := expected[1].(time.Time)
+
+ if !firstOk || !secondOk || !thirdOk {
+ return shouldUseTimes
+ }
+
+ if !actualTime.After(min) {
+ return fmt.Sprintf(shouldHaveHappenedBetween, actualTime, min, max, min.Sub(actualTime))
+ }
+ if !actualTime.Before(max) {
+ return fmt.Sprintf(shouldHaveHappenedBetween, actualTime, min, max, actualTime.Sub(max))
+ }
+ return success
+}
+
+// ShouldHappenOnOrBetween receives exactly 3 time.Time arguments and asserts that the first happens between or on the second and third.
+func ShouldHappenOnOrBetween(actual interface{}, expected ...interface{}) string {
+ if fail := need(2, expected); fail != success {
+ return fail
+ }
+ actualTime, firstOk := actual.(time.Time)
+ min, secondOk := expected[0].(time.Time)
+ max, thirdOk := expected[1].(time.Time)
+
+ if !firstOk || !secondOk || !thirdOk {
+ return shouldUseTimes
+ }
+ if actualTime.Equal(min) || actualTime.Equal(max) {
+ return success
+ }
+ return ShouldHappenBetween(actualTime, min, max)
+}
+
+// ShouldNotHappenOnOrBetween receives exactly 3 time.Time arguments and asserts that the first
+// does NOT happen between or on the second or third.
+func ShouldNotHappenOnOrBetween(actual interface{}, expected ...interface{}) string {
+ if fail := need(2, expected); fail != success {
+ return fail
+ }
+ actualTime, firstOk := actual.(time.Time)
+ min, secondOk := expected[0].(time.Time)
+ max, thirdOk := expected[1].(time.Time)
+
+ if !firstOk || !secondOk || !thirdOk {
+ return shouldUseTimes
+ }
+ if actualTime.Equal(min) || actualTime.Equal(max) {
+ return fmt.Sprintf(shouldNotHaveHappenedOnOrBetween, actualTime, min, max)
+ }
+ if actualTime.After(min) && actualTime.Before(max) {
+ return fmt.Sprintf(shouldNotHaveHappenedOnOrBetween, actualTime, min, max)
+ }
+ return success
+}
+
+// ShouldHappenWithin receives a time.Time, a time.Duration, and a time.Time (3 arguments)
+// and asserts that the first time.Time happens within or on the duration specified relative to
+// the other time.Time.
+func ShouldHappenWithin(actual interface{}, expected ...interface{}) string {
+ if fail := need(2, expected); fail != success {
+ return fail
+ }
+ actualTime, firstOk := actual.(time.Time)
+ tolerance, secondOk := expected[0].(time.Duration)
+ threshold, thirdOk := expected[1].(time.Time)
+
+ if !firstOk || !secondOk || !thirdOk {
+ return shouldUseDurationAndTime
+ }
+
+ min := threshold.Add(-tolerance)
+ max := threshold.Add(tolerance)
+ return ShouldHappenOnOrBetween(actualTime, min, max)
+}
+
+// ShouldNotHappenWithin receives a time.Time, a time.Duration, and a time.Time (3 arguments)
+// and asserts that the first time.Time does NOT happen within or on the duration specified relative to
+// the other time.Time.
+func ShouldNotHappenWithin(actual interface{}, expected ...interface{}) string {
+ if fail := need(2, expected); fail != success {
+ return fail
+ }
+ actualTime, firstOk := actual.(time.Time)
+ tolerance, secondOk := expected[0].(time.Duration)
+ threshold, thirdOk := expected[1].(time.Time)
+
+ if !firstOk || !secondOk || !thirdOk {
+ return shouldUseDurationAndTime
+ }
+
+ min := threshold.Add(-tolerance)
+ max := threshold.Add(tolerance)
+ return ShouldNotHappenOnOrBetween(actualTime, min, max)
+}
+
+// ShouldBeChronological receives a []time.Time slice and asserts that the are
+// in chronological order starting with the first time.Time as the earliest.
+func ShouldBeChronological(actual interface{}, expected ...interface{}) string {
+ if fail := need(0, expected); fail != success {
+ return fail
+ }
+
+ times, ok := actual.([]time.Time)
+ if !ok {
+ return shouldUseTimeSlice
+ }
+
+ var previous time.Time
+ for i, current := range times {
+ if i > 0 && current.Before(previous) {
+ return fmt.Sprintf(shouldHaveBeenChronological,
+ i, i-1, previous.String(), i, current.String())
+ }
+ previous = current
+ }
+ return ""
+}
diff --git a/vendor/github.com/smartystreets/assertions/type.go b/vendor/github.com/smartystreets/assertions/type.go
new file mode 100644
index 0000000..d2d1dc8
--- /dev/null
+++ b/vendor/github.com/smartystreets/assertions/type.go
@@ -0,0 +1,134 @@
+package assertions
+
+import (
+ "fmt"
+ "reflect"
+)
+
+// ShouldHaveSameTypeAs receives exactly two parameters and compares their underlying types for equality.
+func ShouldHaveSameTypeAs(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ first := reflect.TypeOf(actual)
+ second := reflect.TypeOf(expected[0])
+
+ if first != second {
+ return serializer.serialize(second, first, fmt.Sprintf(shouldHaveBeenA, actual, second, first))
+ }
+
+ return success
+}
+
+// ShouldNotHaveSameTypeAs receives exactly two parameters and compares their underlying types for inequality.
+func ShouldNotHaveSameTypeAs(actual interface{}, expected ...interface{}) string {
+ if fail := need(1, expected); fail != success {
+ return fail
+ }
+
+ first := reflect.TypeOf(actual)
+ second := reflect.TypeOf(expected[0])
+
+ if (actual == nil && expected[0] == nil) || first == second {
+ return fmt.Sprintf(shouldNotHaveBeenA, actual, second)
+ }
+ return success
+}
+
+// ShouldImplement receives exactly two parameters and ensures
+// that the first implements the interface type of the second.
+func ShouldImplement(actual interface{}, expectedList ...interface{}) string {
+ if fail := need(1, expectedList); fail != success {
+ return fail
+ }
+
+ expected := expectedList[0]
+ if fail := ShouldBeNil(expected); fail != success {
+ return shouldCompareWithInterfacePointer
+ }
+
+ if fail := ShouldNotBeNil(actual); fail != success {
+ return shouldNotBeNilActual
+ }
+
+ var actualType reflect.Type
+ if reflect.TypeOf(actual).Kind() != reflect.Ptr {
+ actualType = reflect.PtrTo(reflect.TypeOf(actual))
+ } else {
+ actualType = reflect.TypeOf(actual)
+ }
+
+ expectedType := reflect.TypeOf(expected)
+ if fail := ShouldNotBeNil(expectedType); fail != success {
+ return shouldCompareWithInterfacePointer
+ }
+
+ expectedInterface := expectedType.Elem()
+
+ if !actualType.Implements(expectedInterface) {
+ return fmt.Sprintf(shouldHaveImplemented, expectedInterface, actualType)
+ }
+ return success
+}
+
+// ShouldNotImplement receives exactly two parameters and ensures
+// that the first does NOT implement the interface type of the second.
+func ShouldNotImplement(actual interface{}, expectedList ...interface{}) string {
+ if fail := need(1, expectedList); fail != success {
+ return fail
+ }
+
+ expected := expectedList[0]
+ if fail := ShouldBeNil(expected); fail != success {
+ return shouldCompareWithInterfacePointer
+ }
+
+ if fail := ShouldNotBeNil(actual); fail != success {
+ return shouldNotBeNilActual
+ }
+
+ var actualType reflect.Type
+ if reflect.TypeOf(actual).Kind() != reflect.Ptr {
+ actualType = reflect.PtrTo(reflect.TypeOf(actual))
+ } else {
+ actualType = reflect.TypeOf(actual)
+ }
+
+ expectedType := reflect.TypeOf(expected)
+ if fail := ShouldNotBeNil(expectedType); fail != success {
+ return shouldCompareWithInterfacePointer
+ }
+
+ expectedInterface := expectedType.Elem()
+
+ if actualType.Implements(expectedInterface) {
+ return fmt.Sprintf(shouldNotHaveImplemented, actualType, expectedInterface)
+ }
+ return success
+}
+
+// ShouldBeError asserts that the first argument implements the error interface.
+// It also compares the first argument against the second argument if provided
+// (which must be an error message string or another error value).
+func ShouldBeError(actual interface{}, expected ...interface{}) string {
+ if fail := atMost(1, expected); fail != success {
+ return fail
+ }
+
+ if !isError(actual) {
+ return fmt.Sprintf(shouldBeError, reflect.TypeOf(actual))
+ }
+
+ if len(expected) == 0 {
+ return success
+ }
+
+ if expected := expected[0]; !isString(expected) && !isError(expected) {
+ return fmt.Sprintf(shouldBeErrorInvalidComparisonValue, reflect.TypeOf(expected))
+ }
+ return ShouldEqual(fmt.Sprint(actual), fmt.Sprint(expected[0]))
+}
+
+func isString(value interface{}) bool { _, ok := value.(string); return ok }
+func isError(value interface{}) bool { _, ok := value.(error); return ok }
diff --git a/vendor/github.com/smartystreets/goconvey/LICENSE.md b/vendor/github.com/smartystreets/goconvey/LICENSE.md
new file mode 100644
index 0000000..3f87a40
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/LICENSE.md
@@ -0,0 +1,23 @@
+Copyright (c) 2016 SmartyStreets, LLC
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+NOTE: Various optional and subordinate components carry their own licensing
+requirements and restrictions. Use of those components is subject to the terms
+and conditions outlined the respective license of each component.
diff --git a/vendor/github.com/smartystreets/goconvey/convey/assertions.go b/vendor/github.com/smartystreets/goconvey/convey/assertions.go
new file mode 100644
index 0000000..97e3bec
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/assertions.go
@@ -0,0 +1,71 @@
+package convey
+
+import "github.com/smartystreets/assertions"
+
+var (
+ ShouldEqual = assertions.ShouldEqual
+ ShouldNotEqual = assertions.ShouldNotEqual
+ ShouldAlmostEqual = assertions.ShouldAlmostEqual
+ ShouldNotAlmostEqual = assertions.ShouldNotAlmostEqual
+ ShouldResemble = assertions.ShouldResemble
+ ShouldNotResemble = assertions.ShouldNotResemble
+ ShouldPointTo = assertions.ShouldPointTo
+ ShouldNotPointTo = assertions.ShouldNotPointTo
+ ShouldBeNil = assertions.ShouldBeNil
+ ShouldNotBeNil = assertions.ShouldNotBeNil
+ ShouldBeTrue = assertions.ShouldBeTrue
+ ShouldBeFalse = assertions.ShouldBeFalse
+ ShouldBeZeroValue = assertions.ShouldBeZeroValue
+ ShouldNotBeZeroValue = assertions.ShouldNotBeZeroValue
+
+ ShouldBeGreaterThan = assertions.ShouldBeGreaterThan
+ ShouldBeGreaterThanOrEqualTo = assertions.ShouldBeGreaterThanOrEqualTo
+ ShouldBeLessThan = assertions.ShouldBeLessThan
+ ShouldBeLessThanOrEqualTo = assertions.ShouldBeLessThanOrEqualTo
+ ShouldBeBetween = assertions.ShouldBeBetween
+ ShouldNotBeBetween = assertions.ShouldNotBeBetween
+ ShouldBeBetweenOrEqual = assertions.ShouldBeBetweenOrEqual
+ ShouldNotBeBetweenOrEqual = assertions.ShouldNotBeBetweenOrEqual
+
+ ShouldContain = assertions.ShouldContain
+ ShouldNotContain = assertions.ShouldNotContain
+ ShouldContainKey = assertions.ShouldContainKey
+ ShouldNotContainKey = assertions.ShouldNotContainKey
+ ShouldBeIn = assertions.ShouldBeIn
+ ShouldNotBeIn = assertions.ShouldNotBeIn
+ ShouldBeEmpty = assertions.ShouldBeEmpty
+ ShouldNotBeEmpty = assertions.ShouldNotBeEmpty
+ ShouldHaveLength = assertions.ShouldHaveLength
+
+ ShouldStartWith = assertions.ShouldStartWith
+ ShouldNotStartWith = assertions.ShouldNotStartWith
+ ShouldEndWith = assertions.ShouldEndWith
+ ShouldNotEndWith = assertions.ShouldNotEndWith
+ ShouldBeBlank = assertions.ShouldBeBlank
+ ShouldNotBeBlank = assertions.ShouldNotBeBlank
+ ShouldContainSubstring = assertions.ShouldContainSubstring
+ ShouldNotContainSubstring = assertions.ShouldNotContainSubstring
+
+ ShouldPanic = assertions.ShouldPanic
+ ShouldNotPanic = assertions.ShouldNotPanic
+ ShouldPanicWith = assertions.ShouldPanicWith
+ ShouldNotPanicWith = assertions.ShouldNotPanicWith
+
+ ShouldHaveSameTypeAs = assertions.ShouldHaveSameTypeAs
+ ShouldNotHaveSameTypeAs = assertions.ShouldNotHaveSameTypeAs
+ ShouldImplement = assertions.ShouldImplement
+ ShouldNotImplement = assertions.ShouldNotImplement
+
+ ShouldHappenBefore = assertions.ShouldHappenBefore
+ ShouldHappenOnOrBefore = assertions.ShouldHappenOnOrBefore
+ ShouldHappenAfter = assertions.ShouldHappenAfter
+ ShouldHappenOnOrAfter = assertions.ShouldHappenOnOrAfter
+ ShouldHappenBetween = assertions.ShouldHappenBetween
+ ShouldHappenOnOrBetween = assertions.ShouldHappenOnOrBetween
+ ShouldNotHappenOnOrBetween = assertions.ShouldNotHappenOnOrBetween
+ ShouldHappenWithin = assertions.ShouldHappenWithin
+ ShouldNotHappenWithin = assertions.ShouldNotHappenWithin
+ ShouldBeChronological = assertions.ShouldBeChronological
+
+ ShouldBeError = assertions.ShouldBeError
+)
diff --git a/vendor/github.com/smartystreets/goconvey/convey/context.go b/vendor/github.com/smartystreets/goconvey/convey/context.go
new file mode 100644
index 0000000..2c75c2d
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/context.go
@@ -0,0 +1,272 @@
+package convey
+
+import (
+ "fmt"
+
+ "github.com/jtolds/gls"
+ "github.com/smartystreets/goconvey/convey/reporting"
+)
+
+type conveyErr struct {
+ fmt string
+ params []interface{}
+}
+
+func (e *conveyErr) Error() string {
+ return fmt.Sprintf(e.fmt, e.params...)
+}
+
+func conveyPanic(fmt string, params ...interface{}) {
+ panic(&conveyErr{fmt, params})
+}
+
+const (
+ missingGoTest = `Top-level calls to Convey(...) need a reference to the *testing.T.
+ Hint: Convey("description here", t, func() { /* notice that the second argument was the *testing.T (t)! */ }) `
+ extraGoTest = `Only the top-level call to Convey(...) needs a reference to the *testing.T.`
+ noStackContext = "Convey operation made without context on goroutine stack.\n" +
+ "Hint: Perhaps you meant to use `Convey(..., func(c C){...})` ?"
+ differentConveySituations = "Different set of Convey statements on subsequent pass!\nDid not expect %#v."
+ multipleIdenticalConvey = "Multiple convey suites with identical names: %#v"
+)
+
+const (
+ failureHalt = "___FAILURE_HALT___"
+
+ nodeKey = "node"
+)
+
+///////////////////////////////// Stack Context /////////////////////////////////
+
+func getCurrentContext() *context {
+ ctx, ok := ctxMgr.GetValue(nodeKey)
+ if ok {
+ return ctx.(*context)
+ }
+ return nil
+}
+
+func mustGetCurrentContext() *context {
+ ctx := getCurrentContext()
+ if ctx == nil {
+ conveyPanic(noStackContext)
+ }
+ return ctx
+}
+
+//////////////////////////////////// Context ////////////////////////////////////
+
+// context magically handles all coordination of Convey's and So assertions.
+//
+// It is tracked on the stack as goroutine-local-storage with the gls package,
+// or explicitly if the user decides to call convey like:
+//
+// Convey(..., func(c C) {
+// c.So(...)
+// })
+//
+// This implements the `C` interface.
+type context struct {
+ reporter reporting.Reporter
+
+ children map[string]*context
+
+ resets []func()
+
+ executedOnce bool
+ expectChildRun *bool
+ complete bool
+
+ focus bool
+ failureMode FailureMode
+}
+
+// rootConvey is the main entry point to a test suite. This is called when
+// there's no context in the stack already, and items must contain a `t` object,
+// or this panics.
+func rootConvey(items ...interface{}) {
+ entry := discover(items)
+
+ if entry.Test == nil {
+ conveyPanic(missingGoTest)
+ }
+
+ expectChildRun := true
+ ctx := &context{
+ reporter: buildReporter(),
+
+ children: make(map[string]*context),
+
+ expectChildRun: &expectChildRun,
+
+ focus: entry.Focus,
+ failureMode: defaultFailureMode.combine(entry.FailMode),
+ }
+ ctxMgr.SetValues(gls.Values{nodeKey: ctx}, func() {
+ ctx.reporter.BeginStory(reporting.NewStoryReport(entry.Test))
+ defer ctx.reporter.EndStory()
+
+ for ctx.shouldVisit() {
+ ctx.conveyInner(entry.Situation, entry.Func)
+ expectChildRun = true
+ }
+ })
+}
+
+//////////////////////////////////// Methods ////////////////////////////////////
+
+func (ctx *context) SkipConvey(items ...interface{}) {
+ ctx.Convey(items, skipConvey)
+}
+
+func (ctx *context) FocusConvey(items ...interface{}) {
+ ctx.Convey(items, focusConvey)
+}
+
+func (ctx *context) Convey(items ...interface{}) {
+ entry := discover(items)
+
+ // we're a branch, or leaf (on the wind)
+ if entry.Test != nil {
+ conveyPanic(extraGoTest)
+ }
+ if ctx.focus && !entry.Focus {
+ return
+ }
+
+ var inner_ctx *context
+ if ctx.executedOnce {
+ var ok bool
+ inner_ctx, ok = ctx.children[entry.Situation]
+ if !ok {
+ conveyPanic(differentConveySituations, entry.Situation)
+ }
+ } else {
+ if _, ok := ctx.children[entry.Situation]; ok {
+ conveyPanic(multipleIdenticalConvey, entry.Situation)
+ }
+ inner_ctx = &context{
+ reporter: ctx.reporter,
+
+ children: make(map[string]*context),
+
+ expectChildRun: ctx.expectChildRun,
+
+ focus: entry.Focus,
+ failureMode: ctx.failureMode.combine(entry.FailMode),
+ }
+ ctx.children[entry.Situation] = inner_ctx
+ }
+
+ if inner_ctx.shouldVisit() {
+ ctxMgr.SetValues(gls.Values{nodeKey: inner_ctx}, func() {
+ inner_ctx.conveyInner(entry.Situation, entry.Func)
+ })
+ }
+}
+
+func (ctx *context) SkipSo(stuff ...interface{}) {
+ ctx.assertionReport(reporting.NewSkipReport())
+}
+
+func (ctx *context) So(actual interface{}, assert assertion, expected ...interface{}) {
+ if result := assert(actual, expected...); result == assertionSuccess {
+ ctx.assertionReport(reporting.NewSuccessReport())
+ } else {
+ ctx.assertionReport(reporting.NewFailureReport(result))
+ }
+}
+
+func (ctx *context) Reset(action func()) {
+ /* TODO: Failure mode configuration */
+ ctx.resets = append(ctx.resets, action)
+}
+
+func (ctx *context) Print(items ...interface{}) (int, error) {
+ fmt.Fprint(ctx.reporter, items...)
+ return fmt.Print(items...)
+}
+
+func (ctx *context) Println(items ...interface{}) (int, error) {
+ fmt.Fprintln(ctx.reporter, items...)
+ return fmt.Println(items...)
+}
+
+func (ctx *context) Printf(format string, items ...interface{}) (int, error) {
+ fmt.Fprintf(ctx.reporter, format, items...)
+ return fmt.Printf(format, items...)
+}
+
+//////////////////////////////////// Private ////////////////////////////////////
+
+// shouldVisit returns true iff we should traverse down into a Convey. Note
+// that just because we don't traverse a Convey this time, doesn't mean that
+// we may not traverse it on a subsequent pass.
+func (c *context) shouldVisit() bool {
+ return !c.complete && *c.expectChildRun
+}
+
+// conveyInner is the function which actually executes the user's anonymous test
+// function body. At this point, Convey or RootConvey has decided that this
+// function should actually run.
+func (ctx *context) conveyInner(situation string, f func(C)) {
+ // Record/Reset state for next time.
+ defer func() {
+ ctx.executedOnce = true
+
+ // This is only needed at the leaves, but there's no harm in also setting it
+ // when returning from branch Convey's
+ *ctx.expectChildRun = false
+ }()
+
+ // Set up+tear down our scope for the reporter
+ ctx.reporter.Enter(reporting.NewScopeReport(situation))
+ defer ctx.reporter.Exit()
+
+ // Recover from any panics in f, and assign the `complete` status for this
+ // node of the tree.
+ defer func() {
+ ctx.complete = true
+ if problem := recover(); problem != nil {
+ if problem, ok := problem.(*conveyErr); ok {
+ panic(problem)
+ }
+ if problem != failureHalt {
+ ctx.reporter.Report(reporting.NewErrorReport(problem))
+ }
+ } else {
+ for _, child := range ctx.children {
+ if !child.complete {
+ ctx.complete = false
+ return
+ }
+ }
+ }
+ }()
+
+ // Resets are registered as the `f` function executes, so nil them here.
+ // All resets are run in registration order (FIFO).
+ ctx.resets = []func(){}
+ defer func() {
+ for _, r := range ctx.resets {
+ // panics handled by the previous defer
+ r()
+ }
+ }()
+
+ if f == nil {
+ // if f is nil, this was either a Convey(..., nil), or a SkipConvey
+ ctx.reporter.Report(reporting.NewSkipReport())
+ } else {
+ f(ctx)
+ }
+}
+
+// assertionReport is a helper for So and SkipSo which makes the report and
+// then possibly panics, depending on the current context's failureMode.
+func (ctx *context) assertionReport(r *reporting.AssertionResult) {
+ ctx.reporter.Report(r)
+ if r.Failure != "" && ctx.failureMode == FailureHalts {
+ panic(failureHalt)
+ }
+}
diff --git a/vendor/github.com/smartystreets/goconvey/convey/convey.goconvey b/vendor/github.com/smartystreets/goconvey/convey/convey.goconvey
new file mode 100644
index 0000000..a2d9327
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/convey.goconvey
@@ -0,0 +1,4 @@
+#ignore
+-timeout=1s
+#-covermode=count
+#-coverpkg=github.com/smartystreets/goconvey/convey,github.com/smartystreets/goconvey/convey/gotest,github.com/smartystreets/goconvey/convey/reporting \ No newline at end of file
diff --git a/vendor/github.com/smartystreets/goconvey/convey/discovery.go b/vendor/github.com/smartystreets/goconvey/convey/discovery.go
new file mode 100644
index 0000000..eb8d4cb
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/discovery.go
@@ -0,0 +1,103 @@
+package convey
+
+type actionSpecifier uint8
+
+const (
+ noSpecifier actionSpecifier = iota
+ skipConvey
+ focusConvey
+)
+
+type suite struct {
+ Situation string
+ Test t
+ Focus bool
+ Func func(C) // nil means skipped
+ FailMode FailureMode
+}
+
+func newSuite(situation string, failureMode FailureMode, f func(C), test t, specifier actionSpecifier) *suite {
+ ret := &suite{
+ Situation: situation,
+ Test: test,
+ Func: f,
+ FailMode: failureMode,
+ }
+ switch specifier {
+ case skipConvey:
+ ret.Func = nil
+ case focusConvey:
+ ret.Focus = true
+ }
+ return ret
+}
+
+func discover(items []interface{}) *suite {
+ name, items := parseName(items)
+ test, items := parseGoTest(items)
+ failure, items := parseFailureMode(items)
+ action, items := parseAction(items)
+ specifier, items := parseSpecifier(items)
+
+ if len(items) != 0 {
+ conveyPanic(parseError)
+ }
+
+ return newSuite(name, failure, action, test, specifier)
+}
+func item(items []interface{}) interface{} {
+ if len(items) == 0 {
+ conveyPanic(parseError)
+ }
+ return items[0]
+}
+func parseName(items []interface{}) (string, []interface{}) {
+ if name, parsed := item(items).(string); parsed {
+ return name, items[1:]
+ }
+ conveyPanic(parseError)
+ panic("never get here")
+}
+func parseGoTest(items []interface{}) (t, []interface{}) {
+ if test, parsed := item(items).(t); parsed {
+ return test, items[1:]
+ }
+ return nil, items
+}
+func parseFailureMode(items []interface{}) (FailureMode, []interface{}) {
+ if mode, parsed := item(items).(FailureMode); parsed {
+ return mode, items[1:]
+ }
+ return FailureInherits, items
+}
+func parseAction(items []interface{}) (func(C), []interface{}) {
+ switch x := item(items).(type) {
+ case nil:
+ return nil, items[1:]
+ case func(C):
+ return x, items[1:]
+ case func():
+ return func(C) { x() }, items[1:]
+ }
+ conveyPanic(parseError)
+ panic("never get here")
+}
+func parseSpecifier(items []interface{}) (actionSpecifier, []interface{}) {
+ if len(items) == 0 {
+ return noSpecifier, items
+ }
+ if spec, ok := items[0].(actionSpecifier); ok {
+ return spec, items[1:]
+ }
+ conveyPanic(parseError)
+ panic("never get here")
+}
+
+// This interface allows us to pass the *testing.T struct
+// throughout the internals of this package without ever
+// having to import the "testing" package.
+type t interface {
+ Fail()
+}
+
+const parseError = "You must provide a name (string), then a *testing.T (if in outermost scope), an optional FailureMode, and then an action (func())."
diff --git a/vendor/github.com/smartystreets/goconvey/convey/doc.go b/vendor/github.com/smartystreets/goconvey/convey/doc.go
new file mode 100644
index 0000000..e4f7b51
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/doc.go
@@ -0,0 +1,218 @@
+// Package convey contains all of the public-facing entry points to this project.
+// This means that it should never be required of the user to import any other
+// packages from this project as they serve internal purposes.
+package convey
+
+import "github.com/smartystreets/goconvey/convey/reporting"
+
+////////////////////////////////// suite //////////////////////////////////
+
+// C is the Convey context which you can optionally obtain in your action
+// by calling Convey like:
+//
+// Convey(..., func(c C) {
+// ...
+// })
+//
+// See the documentation on Convey for more details.
+//
+// All methods in this context behave identically to the global functions of the
+// same name in this package.
+type C interface {
+ Convey(items ...interface{})
+ SkipConvey(items ...interface{})
+ FocusConvey(items ...interface{})
+
+ So(actual interface{}, assert assertion, expected ...interface{})
+ SkipSo(stuff ...interface{})
+
+ Reset(action func())
+
+ Println(items ...interface{}) (int, error)
+ Print(items ...interface{}) (int, error)
+ Printf(format string, items ...interface{}) (int, error)
+}
+
+// Convey is the method intended for use when declaring the scopes of
+// a specification. Each scope has a description and a func() which may contain
+// other calls to Convey(), Reset() or Should-style assertions. Convey calls can
+// be nested as far as you see fit.
+//
+// IMPORTANT NOTE: The top-level Convey() within a Test method
+// must conform to the following signature:
+//
+// Convey(description string, t *testing.T, action func())
+//
+// All other calls should look like this (no need to pass in *testing.T):
+//
+// Convey(description string, action func())
+//
+// Don't worry, goconvey will panic if you get it wrong so you can fix it.
+//
+// Additionally, you may explicitly obtain access to the Convey context by doing:
+//
+// Convey(description string, action func(c C))
+//
+// You may need to do this if you want to pass the context through to a
+// goroutine, or to close over the context in a handler to a library which
+// calls your handler in a goroutine (httptest comes to mind).
+//
+// All Convey()-blocks also accept an optional parameter of FailureMode which sets
+// how goconvey should treat failures for So()-assertions in the block and
+// nested blocks. See the constants in this file for the available options.
+//
+// By default it will inherit from its parent block and the top-level blocks
+// default to the FailureHalts setting.
+//
+// This parameter is inserted before the block itself:
+//
+// Convey(description string, t *testing.T, mode FailureMode, action func())
+// Convey(description string, mode FailureMode, action func())
+//
+// See the examples package for, well, examples.
+func Convey(items ...interface{}) {
+ if ctx := getCurrentContext(); ctx == nil {
+ rootConvey(items...)
+ } else {
+ ctx.Convey(items...)
+ }
+}
+
+// SkipConvey is analogous to Convey except that the scope is not executed
+// (which means that child scopes defined within this scope are not run either).
+// The reporter will be notified that this step was skipped.
+func SkipConvey(items ...interface{}) {
+ Convey(append(items, skipConvey)...)
+}
+
+// FocusConvey is has the inverse effect of SkipConvey. If the top-level
+// Convey is changed to `FocusConvey`, only nested scopes that are defined
+// with FocusConvey will be run. The rest will be ignored completely. This
+// is handy when debugging a large suite that runs a misbehaving function
+// repeatedly as you can disable all but one of that function
+// without swaths of `SkipConvey` calls, just a targeted chain of calls
+// to FocusConvey.
+func FocusConvey(items ...interface{}) {
+ Convey(append(items, focusConvey)...)
+}
+
+// Reset registers a cleanup function to be run after each Convey()
+// in the same scope. See the examples package for a simple use case.
+func Reset(action func()) {
+ mustGetCurrentContext().Reset(action)
+}
+
+/////////////////////////////////// Assertions ///////////////////////////////////
+
+// assertion is an alias for a function with a signature that the convey.So()
+// method can handle. Any future or custom assertions should conform to this
+// method signature. The return value should be an empty string if the assertion
+// passes and a well-formed failure message if not.
+type assertion func(actual interface{}, expected ...interface{}) string
+
+const assertionSuccess = ""
+
+// So is the means by which assertions are made against the system under test.
+// The majority of exported names in the assertions package begin with the word
+// 'Should' and describe how the first argument (actual) should compare with any
+// of the final (expected) arguments. How many final arguments are accepted
+// depends on the particular assertion that is passed in as the assert argument.
+// See the examples package for use cases and the assertions package for
+// documentation on specific assertion methods. A failing assertion will
+// cause t.Fail() to be invoked--you should never call this method (or other
+// failure-inducing methods) in your test code. Leave that to GoConvey.
+func So(actual interface{}, assert assertion, expected ...interface{}) {
+ mustGetCurrentContext().So(actual, assert, expected...)
+}
+
+// SkipSo is analogous to So except that the assertion that would have been passed
+// to So is not executed and the reporter is notified that the assertion was skipped.
+func SkipSo(stuff ...interface{}) {
+ mustGetCurrentContext().SkipSo()
+}
+
+// FailureMode is a type which determines how the So() blocks should fail
+// if their assertion fails. See constants further down for acceptable values
+type FailureMode string
+
+const (
+
+ // FailureContinues is a failure mode which prevents failing
+ // So()-assertions from halting Convey-block execution, instead
+ // allowing the test to continue past failing So()-assertions.
+ FailureContinues FailureMode = "continue"
+
+ // FailureHalts is the default setting for a top-level Convey()-block
+ // and will cause all failing So()-assertions to halt further execution
+ // in that test-arm and continue on to the next arm.
+ FailureHalts FailureMode = "halt"
+
+ // FailureInherits is the default setting for failure-mode, it will
+ // default to the failure-mode of the parent block. You should never
+ // need to specify this mode in your tests..
+ FailureInherits FailureMode = "inherits"
+)
+
+func (f FailureMode) combine(other FailureMode) FailureMode {
+ if other == FailureInherits {
+ return f
+ }
+ return other
+}
+
+var defaultFailureMode FailureMode = FailureHalts
+
+// SetDefaultFailureMode allows you to specify the default failure mode
+// for all Convey blocks. It is meant to be used in an init function to
+// allow the default mode to be changdd across all tests for an entire packgae
+// but it can be used anywhere.
+func SetDefaultFailureMode(mode FailureMode) {
+ if mode == FailureContinues || mode == FailureHalts {
+ defaultFailureMode = mode
+ } else {
+ panic("You may only use the constants named 'FailureContinues' and 'FailureHalts' as default failure modes.")
+ }
+}
+
+//////////////////////////////////// Print functions ////////////////////////////////////
+
+// Print is analogous to fmt.Print (and it even calls fmt.Print). It ensures that
+// output is aligned with the corresponding scopes in the web UI.
+func Print(items ...interface{}) (written int, err error) {
+ return mustGetCurrentContext().Print(items...)
+}
+
+// Print is analogous to fmt.Println (and it even calls fmt.Println). It ensures that
+// output is aligned with the corresponding scopes in the web UI.
+func Println(items ...interface{}) (written int, err error) {
+ return mustGetCurrentContext().Println(items...)
+}
+
+// Print is analogous to fmt.Printf (and it even calls fmt.Printf). It ensures that
+// output is aligned with the corresponding scopes in the web UI.
+func Printf(format string, items ...interface{}) (written int, err error) {
+ return mustGetCurrentContext().Printf(format, items...)
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+// SuppressConsoleStatistics prevents automatic printing of console statistics.
+// Calling PrintConsoleStatistics explicitly will force printing of statistics.
+func SuppressConsoleStatistics() {
+ reporting.SuppressConsoleStatistics()
+}
+
+// PrintConsoleStatistics may be called at any time to print assertion statistics.
+// Generally, the best place to do this would be in a TestMain function,
+// after all tests have been run. Something like this:
+//
+// func TestMain(m *testing.M) {
+// convey.SuppressConsoleStatistics()
+// result := m.Run()
+// convey.PrintConsoleStatistics()
+// os.Exit(result)
+// }
+//
+func PrintConsoleStatistics() {
+ reporting.PrintConsoleStatistics()
+}
diff --git a/vendor/github.com/smartystreets/goconvey/convey/gotest/utils.go b/vendor/github.com/smartystreets/goconvey/convey/gotest/utils.go
new file mode 100644
index 0000000..167c8fb
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/gotest/utils.go
@@ -0,0 +1,28 @@
+// Package gotest contains internal functionality. Although this package
+// contains one or more exported names it is not intended for public
+// consumption. See the examples package for how to use this project.
+package gotest
+
+import (
+ "runtime"
+ "strings"
+)
+
+func ResolveExternalCaller() (file string, line int, name string) {
+ var caller_id uintptr
+ callers := runtime.Callers(0, callStack)
+
+ for x := 0; x < callers; x++ {
+ caller_id, file, line, _ = runtime.Caller(x)
+ if strings.HasSuffix(file, "_test.go") || strings.HasSuffix(file, "_tests.go") {
+ name = runtime.FuncForPC(caller_id).Name()
+ return
+ }
+ }
+ file, line, name = "<unknown file>", -1, "<unknown name>"
+ return // panic?
+}
+
+const maxStackDepth = 100 // This had better be enough...
+
+var callStack []uintptr = make([]uintptr, maxStackDepth, maxStackDepth)
diff --git a/vendor/github.com/smartystreets/goconvey/convey/init.go b/vendor/github.com/smartystreets/goconvey/convey/init.go
new file mode 100644
index 0000000..cb930a0
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/init.go
@@ -0,0 +1,81 @@
+package convey
+
+import (
+ "flag"
+ "os"
+
+ "github.com/jtolds/gls"
+ "github.com/smartystreets/assertions"
+ "github.com/smartystreets/goconvey/convey/reporting"
+)
+
+func init() {
+ assertions.GoConveyMode(true)
+
+ declareFlags()
+
+ ctxMgr = gls.NewContextManager()
+}
+
+func declareFlags() {
+ flag.BoolVar(&json, "convey-json", false, "When true, emits results in JSON blocks. Default: 'false'")
+ flag.BoolVar(&silent, "convey-silent", false, "When true, all output from GoConvey is suppressed.")
+ flag.BoolVar(&story, "convey-story", false, "When true, emits story output, otherwise emits dot output. When not provided, this flag mirrors the value of the '-test.v' flag")
+
+ if noStoryFlagProvided() {
+ story = verboseEnabled
+ }
+
+ // FYI: flag.Parse() is called from the testing package.
+}
+
+func noStoryFlagProvided() bool {
+ return !story && !storyDisabled
+}
+
+func buildReporter() reporting.Reporter {
+ selectReporter := os.Getenv("GOCONVEY_REPORTER")
+
+ switch {
+ case testReporter != nil:
+ return testReporter
+ case json || selectReporter == "json":
+ return reporting.BuildJsonReporter()
+ case silent || selectReporter == "silent":
+ return reporting.BuildSilentReporter()
+ case selectReporter == "dot":
+ // Story is turned on when verbose is set, so we need to check for dot reporter first.
+ return reporting.BuildDotReporter()
+ case story || selectReporter == "story":
+ return reporting.BuildStoryReporter()
+ default:
+ return reporting.BuildDotReporter()
+ }
+}
+
+var (
+ ctxMgr *gls.ContextManager
+
+ // only set by internal tests
+ testReporter reporting.Reporter
+)
+
+var (
+ json bool
+ silent bool
+ story bool
+
+ verboseEnabled = flagFound("-test.v=true")
+ storyDisabled = flagFound("-story=false")
+)
+
+// flagFound parses the command line args manually for flags defined in other
+// packages. Like the '-v' flag from the "testing" package, for instance.
+func flagFound(flagValue string) bool {
+ for _, arg := range os.Args {
+ if arg == flagValue {
+ return true
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/smartystreets/goconvey/convey/nilReporter.go b/vendor/github.com/smartystreets/goconvey/convey/nilReporter.go
new file mode 100644
index 0000000..777b2a5
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/nilReporter.go
@@ -0,0 +1,15 @@
+package convey
+
+import (
+ "github.com/smartystreets/goconvey/convey/reporting"
+)
+
+type nilReporter struct{}
+
+func (self *nilReporter) BeginStory(story *reporting.StoryReport) {}
+func (self *nilReporter) Enter(scope *reporting.ScopeReport) {}
+func (self *nilReporter) Report(report *reporting.AssertionResult) {}
+func (self *nilReporter) Exit() {}
+func (self *nilReporter) EndStory() {}
+func (self *nilReporter) Write(p []byte) (int, error) { return len(p), nil }
+func newNilReporter() *nilReporter { return &nilReporter{} }
diff --git a/vendor/github.com/smartystreets/goconvey/convey/reporting/console.go b/vendor/github.com/smartystreets/goconvey/convey/reporting/console.go
new file mode 100644
index 0000000..7bf67db
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/reporting/console.go
@@ -0,0 +1,16 @@
+package reporting
+
+import (
+ "fmt"
+ "io"
+)
+
+type console struct{}
+
+func (self *console) Write(p []byte) (n int, err error) {
+ return fmt.Print(string(p))
+}
+
+func NewConsole() io.Writer {
+ return new(console)
+}
diff --git a/vendor/github.com/smartystreets/goconvey/convey/reporting/doc.go b/vendor/github.com/smartystreets/goconvey/convey/reporting/doc.go
new file mode 100644
index 0000000..a37d001
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/reporting/doc.go
@@ -0,0 +1,5 @@
+// Package reporting contains internal functionality related
+// to console reporting and output. Although this package has
+// exported names is not intended for public consumption. See the
+// examples package for how to use this project.
+package reporting
diff --git a/vendor/github.com/smartystreets/goconvey/convey/reporting/dot.go b/vendor/github.com/smartystreets/goconvey/convey/reporting/dot.go
new file mode 100644
index 0000000..47d57c6
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/reporting/dot.go
@@ -0,0 +1,40 @@
+package reporting
+
+import "fmt"
+
+type dot struct{ out *Printer }
+
+func (self *dot) BeginStory(story *StoryReport) {}
+
+func (self *dot) Enter(scope *ScopeReport) {}
+
+func (self *dot) Report(report *AssertionResult) {
+ if report.Error != nil {
+ fmt.Print(redColor)
+ self.out.Insert(dotError)
+ } else if report.Failure != "" {
+ fmt.Print(yellowColor)
+ self.out.Insert(dotFailure)
+ } else if report.Skipped {
+ fmt.Print(yellowColor)
+ self.out.Insert(dotSkip)
+ } else {
+ fmt.Print(greenColor)
+ self.out.Insert(dotSuccess)
+ }
+ fmt.Print(resetColor)
+}
+
+func (self *dot) Exit() {}
+
+func (self *dot) EndStory() {}
+
+func (self *dot) Write(content []byte) (written int, err error) {
+ return len(content), nil // no-op
+}
+
+func NewDotReporter(out *Printer) *dot {
+ self := new(dot)
+ self.out = out
+ return self
+}
diff --git a/vendor/github.com/smartystreets/goconvey/convey/reporting/gotest.go b/vendor/github.com/smartystreets/goconvey/convey/reporting/gotest.go
new file mode 100644
index 0000000..c396e16
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/reporting/gotest.go
@@ -0,0 +1,33 @@
+package reporting
+
+type gotestReporter struct{ test T }
+
+func (self *gotestReporter) BeginStory(story *StoryReport) {
+ self.test = story.Test
+}
+
+func (self *gotestReporter) Enter(scope *ScopeReport) {}
+
+func (self *gotestReporter) Report(r *AssertionResult) {
+ if !passed(r) {
+ self.test.Fail()
+ }
+}
+
+func (self *gotestReporter) Exit() {}
+
+func (self *gotestReporter) EndStory() {
+ self.test = nil
+}
+
+func (self *gotestReporter) Write(content []byte) (written int, err error) {
+ return len(content), nil // no-op
+}
+
+func NewGoTestReporter() *gotestReporter {
+ return new(gotestReporter)
+}
+
+func passed(r *AssertionResult) bool {
+ return r.Error == nil && r.Failure == ""
+}
diff --git a/vendor/github.com/smartystreets/goconvey/convey/reporting/init.go b/vendor/github.com/smartystreets/goconvey/convey/reporting/init.go
new file mode 100644
index 0000000..99c3bd6
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/reporting/init.go
@@ -0,0 +1,94 @@
+package reporting
+
+import (
+ "os"
+ "runtime"
+ "strings"
+)
+
+func init() {
+ if !isColorableTerminal() {
+ monochrome()
+ }
+
+ if runtime.GOOS == "windows" {
+ success, failure, error_ = dotSuccess, dotFailure, dotError
+ }
+}
+
+func BuildJsonReporter() Reporter {
+ out := NewPrinter(NewConsole())
+ return NewReporters(
+ NewGoTestReporter(),
+ NewJsonReporter(out))
+}
+func BuildDotReporter() Reporter {
+ out := NewPrinter(NewConsole())
+ return NewReporters(
+ NewGoTestReporter(),
+ NewDotReporter(out),
+ NewProblemReporter(out),
+ consoleStatistics)
+}
+func BuildStoryReporter() Reporter {
+ out := NewPrinter(NewConsole())
+ return NewReporters(
+ NewGoTestReporter(),
+ NewStoryReporter(out),
+ NewProblemReporter(out),
+ consoleStatistics)
+}
+func BuildSilentReporter() Reporter {
+ out := NewPrinter(NewConsole())
+ return NewReporters(
+ NewGoTestReporter(),
+ NewSilentProblemReporter(out))
+}
+
+var (
+ newline = "\n"
+ success = "✔"
+ failure = "✘"
+ error_ = "🔥"
+ skip = "⚠"
+ dotSuccess = "."
+ dotFailure = "x"
+ dotError = "E"
+ dotSkip = "S"
+ errorTemplate = "* %s \nLine %d: - %v \n%s\n"
+ failureTemplate = "* %s \nLine %d:\n%s\n%s\n"
+)
+
+var (
+ greenColor = "\033[32m"
+ yellowColor = "\033[33m"
+ redColor = "\033[31m"
+ resetColor = "\033[0m"
+)
+
+var consoleStatistics = NewStatisticsReporter(NewPrinter(NewConsole()))
+
+func SuppressConsoleStatistics() { consoleStatistics.Suppress() }
+func PrintConsoleStatistics() { consoleStatistics.PrintSummary() }
+
+// QuietMode disables all console output symbols. This is only meant to be used
+// for tests that are internal to goconvey where the output is distracting or
+// otherwise not needed in the test output.
+func QuietMode() {
+ success, failure, error_, skip, dotSuccess, dotFailure, dotError, dotSkip = "", "", "", "", "", "", "", ""
+}
+
+func monochrome() {
+ greenColor, yellowColor, redColor, resetColor = "", "", "", ""
+}
+
+func isColorableTerminal() bool {
+ return strings.Contains(os.Getenv("TERM"), "color")
+}
+
+// This interface allows us to pass the *testing.T struct
+// throughout the internals of this tool without ever
+// having to import the "testing" package.
+type T interface {
+ Fail()
+}
diff --git a/vendor/github.com/smartystreets/goconvey/convey/reporting/json.go b/vendor/github.com/smartystreets/goconvey/convey/reporting/json.go
new file mode 100644
index 0000000..f852697
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/reporting/json.go
@@ -0,0 +1,88 @@
+// TODO: under unit test
+
+package reporting
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "strings"
+)
+
+type JsonReporter struct {
+ out *Printer
+ currentKey []string
+ current *ScopeResult
+ index map[string]*ScopeResult
+ scopes []*ScopeResult
+}
+
+func (self *JsonReporter) depth() int { return len(self.currentKey) }
+
+func (self *JsonReporter) BeginStory(story *StoryReport) {}
+
+func (self *JsonReporter) Enter(scope *ScopeReport) {
+ self.currentKey = append(self.currentKey, scope.Title)
+ ID := strings.Join(self.currentKey, "|")
+ if _, found := self.index[ID]; !found {
+ next := newScopeResult(scope.Title, self.depth(), scope.File, scope.Line)
+ self.scopes = append(self.scopes, next)
+ self.index[ID] = next
+ }
+ self.current = self.index[ID]
+}
+
+func (self *JsonReporter) Report(report *AssertionResult) {
+ self.current.Assertions = append(self.current.Assertions, report)
+}
+
+func (self *JsonReporter) Exit() {
+ self.currentKey = self.currentKey[:len(self.currentKey)-1]
+}
+
+func (self *JsonReporter) EndStory() {
+ self.report()
+ self.reset()
+}
+func (self *JsonReporter) report() {
+ scopes := []string{}
+ for _, scope := range self.scopes {
+ serialized, err := json.Marshal(scope)
+ if err != nil {
+ self.out.Println(jsonMarshalFailure)
+ panic(err)
+ }
+ var buffer bytes.Buffer
+ json.Indent(&buffer, serialized, "", " ")
+ scopes = append(scopes, buffer.String())
+ }
+ self.out.Print(fmt.Sprintf("%s\n%s,\n%s\n", OpenJson, strings.Join(scopes, ","), CloseJson))
+}
+func (self *JsonReporter) reset() {
+ self.scopes = []*ScopeResult{}
+ self.index = map[string]*ScopeResult{}
+ self.currentKey = nil
+}
+
+func (self *JsonReporter) Write(content []byte) (written int, err error) {
+ self.current.Output += string(content)
+ return len(content), nil
+}
+
+func NewJsonReporter(out *Printer) *JsonReporter {
+ self := new(JsonReporter)
+ self.out = out
+ self.reset()
+ return self
+}
+
+const OpenJson = ">->->OPEN-JSON->->->" // "⌦"
+const CloseJson = "<-<-<-CLOSE-JSON<-<-<" // "⌫"
+const jsonMarshalFailure = `
+
+GOCONVEY_JSON_MARSHALL_FAILURE: There was an error when attempting to convert test results to JSON.
+Please file a bug report and reference the code that caused this failure if possible.
+
+Here's the panic:
+
+`
diff --git a/vendor/github.com/smartystreets/goconvey/convey/reporting/printer.go b/vendor/github.com/smartystreets/goconvey/convey/reporting/printer.go
new file mode 100644
index 0000000..3dac0d4
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/reporting/printer.go
@@ -0,0 +1,60 @@
+package reporting
+
+import (
+ "fmt"
+ "io"
+ "strings"
+)
+
+type Printer struct {
+ out io.Writer
+ prefix string
+}
+
+func (self *Printer) Println(message string, values ...interface{}) {
+ formatted := self.format(message, values...) + newline
+ self.out.Write([]byte(formatted))
+}
+
+func (self *Printer) Print(message string, values ...interface{}) {
+ formatted := self.format(message, values...)
+ self.out.Write([]byte(formatted))
+}
+
+func (self *Printer) Insert(text string) {
+ self.out.Write([]byte(text))
+}
+
+func (self *Printer) format(message string, values ...interface{}) string {
+ var formatted string
+ if len(values) == 0 {
+ formatted = self.prefix + message
+ } else {
+ formatted = self.prefix + fmt_Sprintf(message, values...)
+ }
+ indented := strings.Replace(formatted, newline, newline+self.prefix, -1)
+ return strings.TrimRight(indented, space)
+}
+
+// Extracting fmt.Sprintf to a separate variable circumvents go vet, which, as of go 1.10 is run with go test.
+var fmt_Sprintf = fmt.Sprintf
+
+func (self *Printer) Indent() {
+ self.prefix += pad
+}
+
+func (self *Printer) Dedent() {
+ if len(self.prefix) >= padLength {
+ self.prefix = self.prefix[:len(self.prefix)-padLength]
+ }
+}
+
+func NewPrinter(out io.Writer) *Printer {
+ self := new(Printer)
+ self.out = out
+ return self
+}
+
+const space = " "
+const pad = space + space
+const padLength = len(pad)
diff --git a/vendor/github.com/smartystreets/goconvey/convey/reporting/problems.go b/vendor/github.com/smartystreets/goconvey/convey/reporting/problems.go
new file mode 100644
index 0000000..33d5e14
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/reporting/problems.go
@@ -0,0 +1,80 @@
+package reporting
+
+import "fmt"
+
+type problem struct {
+ silent bool
+ out *Printer
+ errors []*AssertionResult
+ failures []*AssertionResult
+}
+
+func (self *problem) BeginStory(story *StoryReport) {}
+
+func (self *problem) Enter(scope *ScopeReport) {}
+
+func (self *problem) Report(report *AssertionResult) {
+ if report.Error != nil {
+ self.errors = append(self.errors, report)
+ } else if report.Failure != "" {
+ self.failures = append(self.failures, report)
+ }
+}
+
+func (self *problem) Exit() {}
+
+func (self *problem) EndStory() {
+ self.show(self.showErrors, redColor)
+ self.show(self.showFailures, yellowColor)
+ self.prepareForNextStory()
+}
+func (self *problem) show(display func(), color string) {
+ if !self.silent {
+ fmt.Print(color)
+ }
+ display()
+ if !self.silent {
+ fmt.Print(resetColor)
+ }
+ self.out.Dedent()
+}
+func (self *problem) showErrors() {
+ for i, e := range self.errors {
+ if i == 0 {
+ self.out.Println("\nErrors:\n")
+ self.out.Indent()
+ }
+ self.out.Println(errorTemplate, e.File, e.Line, e.Error, e.StackTrace)
+ }
+}
+func (self *problem) showFailures() {
+ for i, f := range self.failures {
+ if i == 0 {
+ self.out.Println("\nFailures:\n")
+ self.out.Indent()
+ }
+ self.out.Println(failureTemplate, f.File, f.Line, f.Failure, f.StackTrace)
+ }
+}
+
+func (self *problem) Write(content []byte) (written int, err error) {
+ return len(content), nil // no-op
+}
+
+func NewProblemReporter(out *Printer) *problem {
+ self := new(problem)
+ self.out = out
+ self.prepareForNextStory()
+ return self
+}
+
+func NewSilentProblemReporter(out *Printer) *problem {
+ self := NewProblemReporter(out)
+ self.silent = true
+ return self
+}
+
+func (self *problem) prepareForNextStory() {
+ self.errors = []*AssertionResult{}
+ self.failures = []*AssertionResult{}
+}
diff --git a/vendor/github.com/smartystreets/goconvey/convey/reporting/reporter.go b/vendor/github.com/smartystreets/goconvey/convey/reporting/reporter.go
new file mode 100644
index 0000000..cce6c5e
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/reporting/reporter.go
@@ -0,0 +1,39 @@
+package reporting
+
+import "io"
+
+type Reporter interface {
+ BeginStory(story *StoryReport)
+ Enter(scope *ScopeReport)
+ Report(r *AssertionResult)
+ Exit()
+ EndStory()
+ io.Writer
+}
+
+type reporters struct{ collection []Reporter }
+
+func (self *reporters) BeginStory(s *StoryReport) { self.foreach(func(r Reporter) { r.BeginStory(s) }) }
+func (self *reporters) Enter(s *ScopeReport) { self.foreach(func(r Reporter) { r.Enter(s) }) }
+func (self *reporters) Report(a *AssertionResult) { self.foreach(func(r Reporter) { r.Report(a) }) }
+func (self *reporters) Exit() { self.foreach(func(r Reporter) { r.Exit() }) }
+func (self *reporters) EndStory() { self.foreach(func(r Reporter) { r.EndStory() }) }
+
+func (self *reporters) Write(contents []byte) (written int, err error) {
+ self.foreach(func(r Reporter) {
+ written, err = r.Write(contents)
+ })
+ return written, err
+}
+
+func (self *reporters) foreach(action func(Reporter)) {
+ for _, r := range self.collection {
+ action(r)
+ }
+}
+
+func NewReporters(collection ...Reporter) *reporters {
+ self := new(reporters)
+ self.collection = collection
+ return self
+}
diff --git a/vendor/github.com/smartystreets/goconvey/convey/reporting/reporting.goconvey b/vendor/github.com/smartystreets/goconvey/convey/reporting/reporting.goconvey
new file mode 100644
index 0000000..7998285
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/reporting/reporting.goconvey
@@ -0,0 +1,2 @@
+#ignore
+-timeout=1s
diff --git a/vendor/github.com/smartystreets/goconvey/convey/reporting/reports.go b/vendor/github.com/smartystreets/goconvey/convey/reporting/reports.go
new file mode 100644
index 0000000..712e6ad
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/reporting/reports.go
@@ -0,0 +1,179 @@
+package reporting
+
+import (
+ "encoding/json"
+ "fmt"
+ "runtime"
+ "strings"
+
+ "github.com/smartystreets/goconvey/convey/gotest"
+)
+
+////////////////// ScopeReport ////////////////////
+
+type ScopeReport struct {
+ Title string
+ File string
+ Line int
+}
+
+func NewScopeReport(title string) *ScopeReport {
+ file, line, _ := gotest.ResolveExternalCaller()
+ self := new(ScopeReport)
+ self.Title = title
+ self.File = file
+ self.Line = line
+ return self
+}
+
+////////////////// ScopeResult ////////////////////
+
+type ScopeResult struct {
+ Title string
+ File string
+ Line int
+ Depth int
+ Assertions []*AssertionResult
+ Output string
+}
+
+func newScopeResult(title string, depth int, file string, line int) *ScopeResult {
+ self := new(ScopeResult)
+ self.Title = title
+ self.Depth = depth
+ self.File = file
+ self.Line = line
+ self.Assertions = []*AssertionResult{}
+ return self
+}
+
+/////////////////// StoryReport /////////////////////
+
+type StoryReport struct {
+ Test T
+ Name string
+ File string
+ Line int
+}
+
+func NewStoryReport(test T) *StoryReport {
+ file, line, name := gotest.ResolveExternalCaller()
+ name = removePackagePath(name)
+ self := new(StoryReport)
+ self.Test = test
+ self.Name = name
+ self.File = file
+ self.Line = line
+ return self
+}
+
+// name comes in looking like "github.com/smartystreets/goconvey/examples.TestName".
+// We only want the stuff after the last '.', which is the name of the test function.
+func removePackagePath(name string) string {
+ parts := strings.Split(name, ".")
+ return parts[len(parts)-1]
+}
+
+/////////////////// FailureView ////////////////////////
+
+// This struct is also declared in github.com/smartystreets/assertions.
+// The json struct tags should be equal in both declarations.
+type FailureView struct {
+ Message string `json:"Message"`
+ Expected string `json:"Expected"`
+ Actual string `json:"Actual"`
+}
+
+////////////////////AssertionResult //////////////////////
+
+type AssertionResult struct {
+ File string
+ Line int
+ Expected string
+ Actual string
+ Failure string
+ Error interface{}
+ StackTrace string
+ Skipped bool
+}
+
+func NewFailureReport(failure string) *AssertionResult {
+ report := new(AssertionResult)
+ report.File, report.Line = caller()
+ report.StackTrace = stackTrace()
+ parseFailure(failure, report)
+ return report
+}
+func parseFailure(failure string, report *AssertionResult) {
+ view := new(FailureView)
+ err := json.Unmarshal([]byte(failure), view)
+ if err == nil {
+ report.Failure = view.Message
+ report.Expected = view.Expected
+ report.Actual = view.Actual
+ } else {
+ report.Failure = failure
+ }
+}
+func NewErrorReport(err interface{}) *AssertionResult {
+ report := new(AssertionResult)
+ report.File, report.Line = caller()
+ report.StackTrace = fullStackTrace()
+ report.Error = fmt.Sprintf("%v", err)
+ return report
+}
+func NewSuccessReport() *AssertionResult {
+ return new(AssertionResult)
+}
+func NewSkipReport() *AssertionResult {
+ report := new(AssertionResult)
+ report.File, report.Line = caller()
+ report.StackTrace = fullStackTrace()
+ report.Skipped = true
+ return report
+}
+
+func caller() (file string, line int) {
+ file, line, _ = gotest.ResolveExternalCaller()
+ return
+}
+
+func stackTrace() string {
+ buffer := make([]byte, 1024*64)
+ n := runtime.Stack(buffer, false)
+ return removeInternalEntries(string(buffer[:n]))
+}
+func fullStackTrace() string {
+ buffer := make([]byte, 1024*64)
+ n := runtime.Stack(buffer, true)
+ return removeInternalEntries(string(buffer[:n]))
+}
+func removeInternalEntries(stack string) string {
+ lines := strings.Split(stack, newline)
+ filtered := []string{}
+ for _, line := range lines {
+ if !isExternal(line) {
+ filtered = append(filtered, line)
+ }
+ }
+ return strings.Join(filtered, newline)
+}
+func isExternal(line string) bool {
+ for _, p := range internalPackages {
+ if strings.Contains(line, p) {
+ return true
+ }
+ }
+ return false
+}
+
+// NOTE: any new packages that host goconvey packages will need to be added here!
+// An alternative is to scan the goconvey directory and then exclude stuff like
+// the examples package but that's nasty too.
+var internalPackages = []string{
+ "goconvey/assertions",
+ "goconvey/convey",
+ "goconvey/execution",
+ "goconvey/gotest",
+ "goconvey/reporting",
+}
diff --git a/vendor/github.com/smartystreets/goconvey/convey/reporting/statistics.go b/vendor/github.com/smartystreets/goconvey/convey/reporting/statistics.go
new file mode 100644
index 0000000..c3ccd05
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/reporting/statistics.go
@@ -0,0 +1,108 @@
+package reporting
+
+import (
+ "fmt"
+ "sync"
+)
+
+func (self *statistics) BeginStory(story *StoryReport) {}
+
+func (self *statistics) Enter(scope *ScopeReport) {}
+
+func (self *statistics) Report(report *AssertionResult) {
+ self.Lock()
+ defer self.Unlock()
+
+ if !self.failing && report.Failure != "" {
+ self.failing = true
+ }
+ if !self.erroring && report.Error != nil {
+ self.erroring = true
+ }
+ if report.Skipped {
+ self.skipped += 1
+ } else {
+ self.total++
+ }
+}
+
+func (self *statistics) Exit() {}
+
+func (self *statistics) EndStory() {
+ self.Lock()
+ defer self.Unlock()
+
+ if !self.suppressed {
+ self.printSummaryLocked()
+ }
+}
+
+func (self *statistics) Suppress() {
+ self.Lock()
+ defer self.Unlock()
+ self.suppressed = true
+}
+
+func (self *statistics) PrintSummary() {
+ self.Lock()
+ defer self.Unlock()
+ self.printSummaryLocked()
+}
+
+func (self *statistics) printSummaryLocked() {
+ self.reportAssertionsLocked()
+ self.reportSkippedSectionsLocked()
+ self.completeReportLocked()
+}
+func (self *statistics) reportAssertionsLocked() {
+ self.decideColorLocked()
+ self.out.Print("\n%d total %s", self.total, plural("assertion", self.total))
+}
+func (self *statistics) decideColorLocked() {
+ if self.failing && !self.erroring {
+ fmt.Print(yellowColor)
+ } else if self.erroring {
+ fmt.Print(redColor)
+ } else {
+ fmt.Print(greenColor)
+ }
+}
+func (self *statistics) reportSkippedSectionsLocked() {
+ if self.skipped > 0 {
+ fmt.Print(yellowColor)
+ self.out.Print(" (one or more sections skipped)")
+ }
+}
+func (self *statistics) completeReportLocked() {
+ fmt.Print(resetColor)
+ self.out.Print("\n")
+ self.out.Print("\n")
+}
+
+func (self *statistics) Write(content []byte) (written int, err error) {
+ return len(content), nil // no-op
+}
+
+func NewStatisticsReporter(out *Printer) *statistics {
+ self := statistics{}
+ self.out = out
+ return &self
+}
+
+type statistics struct {
+ sync.Mutex
+
+ out *Printer
+ total int
+ failing bool
+ erroring bool
+ skipped int
+ suppressed bool
+}
+
+func plural(word string, count int) string {
+ if count == 1 {
+ return word
+ }
+ return word + "s"
+}
diff --git a/vendor/github.com/smartystreets/goconvey/convey/reporting/story.go b/vendor/github.com/smartystreets/goconvey/convey/reporting/story.go
new file mode 100644
index 0000000..9e73c97
--- /dev/null
+++ b/vendor/github.com/smartystreets/goconvey/convey/reporting/story.go
@@ -0,0 +1,73 @@
+// TODO: in order for this reporter to be completely honest
+// we need to retrofit to be more like the json reporter such that:
+// 1. it maintains ScopeResult collections, which count assertions
+// 2. it reports only after EndStory(), so that all tick marks
+// are placed near the appropriate title.
+// 3. Under unit test
+
+package reporting
+
+import (
+ "fmt"
+ "strings"
+)
+
+type story struct {
+ out *Printer
+ titlesById map[string]string
+ currentKey []string
+}
+
+func (self *story) BeginStory(story *StoryReport) {}
+
+func (self *story) Enter(scope *ScopeReport) {
+ self.out.Indent()
+
+ self.currentKey = append(self.currentKey, scope.Title)
+ ID := strings.Join(self.currentKey, "|")
+
+ if _, found := self.titlesById[ID]; !found {
+ self.out.Println("")
+ self.out.Print(scope.Title)
+ self.out.Insert(" ")
+ self.titlesById[ID] = scope.Title
+ }
+}
+
+func (self *story) Report(report *AssertionResult) {
+ if report.Error != nil {
+ fmt.Print(redColor)
+ self.out.Insert(error_)
+ } else if report.Failure != "" {
+ fmt.Print(yellowColor)
+ self.out.Insert(failure)
+ } else if report.Skipped {
+ fmt.Print(yellowColor)
+ self.out.Insert(skip)
+ } else {
+ fmt.Print(greenColor)
+ self.out.Insert(success)
+ }
+ fmt.Print(resetColor)
+}
+
+func (self *story) Exit() {
+ self.out.Dedent()
+ self.currentKey = self.currentKey[:len(self.currentKey)-1]
+}
+
+func (self *story) EndStory() {
+ self.titlesById = make(map[string]string)
+ self.out.Println("\n")
+}
+
+func (self *story) Write(content []byte) (written int, err error) {
+ return len(content), nil // no-op
+}
+
+func NewStoryReporter(out *Printer) *story {
+ self := new(story)
+ self.out = out
+ self.titlesById = make(map[string]string)
+ return self
+}
diff --git a/vendor/github.com/templexxx/cpu/.gitignore b/vendor/github.com/templexxx/cpu/.gitignore
new file mode 100644
index 0000000..f1c181e
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/.gitignore
@@ -0,0 +1,12 @@
+# Binaries for programs and plugins
+*.exe
+*.exe~
+*.dll
+*.so
+*.dylib
+
+# Test binary, build with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
diff --git a/vendor/github.com/templexxx/cpu/LICENSE b/vendor/github.com/templexxx/cpu/LICENSE
new file mode 100644
index 0000000..dfa8f7b
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/LICENSE
@@ -0,0 +1,32 @@
+BSD 3-Clause License
+
+Copyright (c) 2018 Temple3x (temple3x@gmail.com)
+Copyright 2017 The Go Authors
+Copyright (c) 2015 Klaus Post
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/templexxx/cpu/README.md b/vendor/github.com/templexxx/cpu/README.md
new file mode 100644
index 0000000..50ccb9f
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/README.md
@@ -0,0 +1,23 @@
+# cpu
+internal/cpu(in Go standard lib) with these detections:
+
+>- AVX512
+>
+>- Cache Size
+>
+>- Invariant TSC
+>
+
+It also provides:
+
+>- False sharing range, see `X86FalseSharingRange` for X86 platform.
+>
+>- TSC frequency
+>
+>- Name
+>
+>- Family & Model
+
+# Acknowledgement
+
+[klauspost/cpuid](https://github.com/klauspost/cpuid) \ No newline at end of file
diff --git a/vendor/github.com/templexxx/cpu/cpu.go b/vendor/github.com/templexxx/cpu/cpu.go
new file mode 100644
index 0000000..92295d9
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu.go
@@ -0,0 +1,234 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package cpu implements processor feature detection
+// used by the Go standard library.
+package cpu
+
+// debugOptions is set to true by the runtime if go was compiled with GOEXPERIMENT=debugcpu
+// and GOOS is Linux or Darwin. This variable is linknamed in runtime/proc.go.
+var debugOptions bool
+
+var X86 x86
+
+// "Loads data or instructions from memory to the second-level cache.
+// To use the streamer, organize the data or instructions in blocks of 128 bytes,
+// aligned on 128 bytes."
+// From <Intel® 64 and IA-32 architectures optimization reference manual>,
+// in section 3.7.3 "Hardware Prefetching for Second-Level Cache"
+//
+// In practice, I have found use 128bytes can gain better performance than 64bytes (one cache line).
+const X86FalseSharingRange = 128
+
+// The booleans in x86 contain the correspondingly named cpuid feature bit.
+// HasAVX and HasAVX2 are only set if the OS does support XMM and YMM registers
+// in addition to the cpuid feature bit being set.
+// The struct is padded to avoid false sharing.
+type x86 struct {
+ _ [X86FalseSharingRange]byte
+ HasAES bool
+ HasADX bool
+ HasAVX bool
+ HasAVX2 bool
+ HasAVX512F bool
+ HasAVX512DQ bool
+ HasAVX512BW bool
+ HasAVX512VL bool
+ HasBMI1 bool
+ HasBMI2 bool
+ HasERMS bool
+ HasFMA bool
+ HasOSXSAVE bool
+ HasPCLMULQDQ bool
+ HasPOPCNT bool
+ HasSSE2 bool
+ HasSSE3 bool
+ HasSSSE3 bool
+ HasSSE41 bool
+ HasSSE42 bool
+ // The invariant TSC will run at a constant rate in all ACPI P-, C-, and T-states.
+ // This is the architectural behavior moving forward. On processors with
+ // invariant TSC support, the OS may use the TSC for wall clock timer services (instead of ACPI or HPET timers).
+ HasInvariantTSC bool
+
+ Cache Cache
+
+ // TSCFrequency only meaningful when HasInvariantTSC == true.
+ // Unit: Hz.
+ //
+ // Warn:
+ // 1. If it's 0, means can't get it. Don't use it.
+ // 2. Don't use it if you want "100%" precise timestamp.
+ TSCFrequency uint64
+
+ Name string
+ Signature string // DisplayFamily_DisplayModel.
+ Family uint32 // CPU family number.
+ Model uint32 // CPU model number.
+
+ _ [X86FalseSharingRange]byte
+}
+
+// CPU Cache Size.
+// -1 if undetected.
+type Cache struct {
+ L1I int
+ L1D int
+ L2 int
+ L3 int
+}
+
+var PPC64 ppc64
+
+// For ppc64x, it is safe to check only for ISA level starting on ISA v3.00,
+// since there are no optional categories. There are some exceptions that also
+// require kernel support to work (darn, scv), so there are feature bits for
+// those as well. The minimum processor requirement is POWER8 (ISA 2.07), so we
+// maintain some of the old feature checks for optional categories for
+// safety.
+// The struct is padded to avoid false sharing.
+type ppc64 struct {
+ _ [CacheLineSize]byte
+ HasVMX bool // Vector unit (Altivec)
+ HasDFP bool // Decimal Floating Point unit
+ HasVSX bool // Vector-scalar unit
+ HasHTM bool // Hardware Transactional Memory
+ HasISEL bool // Integer select
+ HasVCRYPTO bool // Vector cryptography
+ HasHTMNOSC bool // HTM: kernel-aborted transaction in syscalls
+ HasDARN bool // Hardware random number generator (requires kernel enablement)
+ HasSCV bool // Syscall vectored (requires kernel enablement)
+ IsPOWER8 bool // ISA v2.07 (POWER8)
+ IsPOWER9 bool // ISA v3.00 (POWER9)
+ _ [CacheLineSize]byte
+}
+
+var ARM64 arm64
+
+// The booleans in arm64 contain the correspondingly named cpu feature bit.
+// The struct is padded to avoid false sharing.
+type arm64 struct {
+ _ [CacheLineSize]byte
+ HasFP bool
+ HasASIMD bool
+ HasEVTSTRM bool
+ HasAES bool
+ HasPMULL bool
+ HasSHA1 bool
+ HasSHA2 bool
+ HasCRC32 bool
+ HasATOMICS bool
+ HasFPHP bool
+ HasASIMDHP bool
+ HasCPUID bool
+ HasASIMDRDM bool
+ HasJSCVT bool
+ HasFCMA bool
+ HasLRCPC bool
+ HasDCPOP bool
+ HasSHA3 bool
+ HasSM3 bool
+ HasSM4 bool
+ HasASIMDDP bool
+ HasSHA512 bool
+ HasSVE bool
+ HasASIMDFHM bool
+ _ [CacheLineSize]byte
+}
+
+var S390X s390x
+
+type s390x struct {
+ _ [CacheLineSize]byte
+ HasZArch bool // z architecture mode is active [mandatory]
+ HasSTFLE bool // store facility list extended [mandatory]
+ HasLDisp bool // long (20-bit) displacements [mandatory]
+ HasEImm bool // 32-bit immediates [mandatory]
+ HasDFP bool // decimal floating point
+ HasETF3Enhanced bool // ETF-3 enhanced
+ HasMSA bool // message security assist (CPACF)
+ HasAES bool // KM-AES{128,192,256} functions
+ HasAESCBC bool // KMC-AES{128,192,256} functions
+ HasAESCTR bool // KMCTR-AES{128,192,256} functions
+ HasAESGCM bool // KMA-GCM-AES{128,192,256} functions
+ HasGHASH bool // KIMD-GHASH function
+ HasSHA1 bool // K{I,L}MD-SHA-1 functions
+ HasSHA256 bool // K{I,L}MD-SHA-256 functions
+ HasSHA512 bool // K{I,L}MD-SHA-512 functions
+ HasVX bool // vector facility. Note: the runtime sets this when it processes auxv records.
+ _ [CacheLineSize]byte
+}
+
+// initialize examines the processor and sets the relevant variables above.
+// This is called by the runtime package early in program initialization,
+// before normal init functions are run. env is set by runtime on Linux and Darwin
+// if go was compiled with GOEXPERIMENT=debugcpu.
+func init() {
+ doinit()
+ processOptions("")
+}
+
+// options contains the cpu debug options that can be used in GODEBUGCPU.
+// Options are arch dependent and are added by the arch specific doinit functions.
+// Features that are mandatory for the specific GOARCH should not be added to options
+// (e.g. SSE2 on amd64).
+var options []option
+
+// Option names should be lower case. e.g. avx instead of AVX.
+type option struct {
+ Name string
+ Feature *bool
+}
+
+// processOptions disables CPU feature values based on the parsed env string.
+// The env string is expected to be of the form feature1=0,feature2=0...
+// where feature names is one of the architecture specifc list stored in the
+// cpu packages options variable. If env contains all=0 then all capabilities
+// referenced through the options variable are disabled. Other feature
+// names and values other than 0 are silently ignored.
+func processOptions(env string) {
+field:
+ for env != "" {
+ field := ""
+ i := indexByte(env, ',')
+ if i < 0 {
+ field, env = env, ""
+ } else {
+ field, env = env[:i], env[i+1:]
+ }
+ i = indexByte(field, '=')
+ if i < 0 {
+ continue
+ }
+ key, value := field[:i], field[i+1:]
+
+ // Only allow turning off CPU features by specifying '0'.
+ if value == "0" {
+ if key == "all" {
+ for _, v := range options {
+ *v.Feature = false
+ }
+ return
+ } else {
+ for _, v := range options {
+ if v.Name == key {
+ *v.Feature = false
+ continue field
+ }
+ }
+ }
+ }
+ }
+}
+
+// indexByte returns the index of the first instance of c in s,
+// or -1 if c is not present in s.
+func indexByte(s string, c byte) int {
+ for i := 0; i < len(s); i++ {
+ if s[i] == c {
+ return i
+ }
+ }
+ return -1
+}
diff --git a/vendor/github.com/templexxx/cpu/cpu_386.go b/vendor/github.com/templexxx/cpu/cpu_386.go
new file mode 100644
index 0000000..561c81f
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_386.go
@@ -0,0 +1,7 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+const GOARCH = "386"
diff --git a/vendor/github.com/templexxx/cpu/cpu_amd64.go b/vendor/github.com/templexxx/cpu/cpu_amd64.go
new file mode 100644
index 0000000..9b00153
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_amd64.go
@@ -0,0 +1,7 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+const GOARCH = "amd64"
diff --git a/vendor/github.com/templexxx/cpu/cpu_amd64p32.go b/vendor/github.com/templexxx/cpu/cpu_amd64p32.go
new file mode 100644
index 0000000..177b14e
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_amd64p32.go
@@ -0,0 +1,7 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+const GOARCH = "amd64p32"
diff --git a/vendor/github.com/templexxx/cpu/cpu_arm.go b/vendor/github.com/templexxx/cpu/cpu_arm.go
new file mode 100644
index 0000000..078a6c3
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_arm.go
@@ -0,0 +1,7 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+const CacheLineSize = 32
diff --git a/vendor/github.com/templexxx/cpu/cpu_arm64.go b/vendor/github.com/templexxx/cpu/cpu_arm64.go
new file mode 100644
index 0000000..487ccf8
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_arm64.go
@@ -0,0 +1,102 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+const CacheLineSize = 64
+
+// arm64 doesn't have a 'cpuid' equivalent, so we rely on HWCAP/HWCAP2.
+// These are linknamed in runtime/os_linux_arm64.go and are initialized by
+// archauxv().
+var hwcap uint
+var hwcap2 uint
+
+// HWCAP/HWCAP2 bits. These are exposed by Linux.
+const (
+ hwcap_FP = (1 << 0)
+ hwcap_ASIMD = (1 << 1)
+ hwcap_EVTSTRM = (1 << 2)
+ hwcap_AES = (1 << 3)
+ hwcap_PMULL = (1 << 4)
+ hwcap_SHA1 = (1 << 5)
+ hwcap_SHA2 = (1 << 6)
+ hwcap_CRC32 = (1 << 7)
+ hwcap_ATOMICS = (1 << 8)
+ hwcap_FPHP = (1 << 9)
+ hwcap_ASIMDHP = (1 << 10)
+ hwcap_CPUID = (1 << 11)
+ hwcap_ASIMDRDM = (1 << 12)
+ hwcap_JSCVT = (1 << 13)
+ hwcap_FCMA = (1 << 14)
+ hwcap_LRCPC = (1 << 15)
+ hwcap_DCPOP = (1 << 16)
+ hwcap_SHA3 = (1 << 17)
+ hwcap_SM3 = (1 << 18)
+ hwcap_SM4 = (1 << 19)
+ hwcap_ASIMDDP = (1 << 20)
+ hwcap_SHA512 = (1 << 21)
+ hwcap_SVE = (1 << 22)
+ hwcap_ASIMDFHM = (1 << 23)
+)
+
+func doinit() {
+ options = []option{
+ {"evtstrm", &ARM64.HasEVTSTRM},
+ {"aes", &ARM64.HasAES},
+ {"pmull", &ARM64.HasPMULL},
+ {"sha1", &ARM64.HasSHA1},
+ {"sha2", &ARM64.HasSHA2},
+ {"crc32", &ARM64.HasCRC32},
+ {"atomics", &ARM64.HasATOMICS},
+ {"fphp", &ARM64.HasFPHP},
+ {"asimdhp", &ARM64.HasASIMDHP},
+ {"cpuid", &ARM64.HasCPUID},
+ {"asimdrdm", &ARM64.HasASIMDRDM},
+ {"jscvt", &ARM64.HasJSCVT},
+ {"fcma", &ARM64.HasFCMA},
+ {"lrcpc", &ARM64.HasLRCPC},
+ {"dcpop", &ARM64.HasDCPOP},
+ {"sha3", &ARM64.HasSHA3},
+ {"sm3", &ARM64.HasSM3},
+ {"sm4", &ARM64.HasSM4},
+ {"asimddp", &ARM64.HasASIMDDP},
+ {"sha512", &ARM64.HasSHA512},
+ {"sve", &ARM64.HasSVE},
+ {"asimdfhm", &ARM64.HasASIMDFHM},
+
+ // These capabilities should always be enabled on arm64:
+ // {"fp", &ARM64.HasFP},
+ // {"asimd", &ARM64.HasASIMD},
+ }
+
+ // HWCAP feature bits
+ ARM64.HasFP = isSet(hwcap, hwcap_FP)
+ ARM64.HasASIMD = isSet(hwcap, hwcap_ASIMD)
+ ARM64.HasEVTSTRM = isSet(hwcap, hwcap_EVTSTRM)
+ ARM64.HasAES = isSet(hwcap, hwcap_AES)
+ ARM64.HasPMULL = isSet(hwcap, hwcap_PMULL)
+ ARM64.HasSHA1 = isSet(hwcap, hwcap_SHA1)
+ ARM64.HasSHA2 = isSet(hwcap, hwcap_SHA2)
+ ARM64.HasCRC32 = isSet(hwcap, hwcap_CRC32)
+ ARM64.HasATOMICS = isSet(hwcap, hwcap_ATOMICS)
+ ARM64.HasFPHP = isSet(hwcap, hwcap_FPHP)
+ ARM64.HasASIMDHP = isSet(hwcap, hwcap_ASIMDHP)
+ ARM64.HasCPUID = isSet(hwcap, hwcap_CPUID)
+ ARM64.HasASIMDRDM = isSet(hwcap, hwcap_ASIMDRDM)
+ ARM64.HasJSCVT = isSet(hwcap, hwcap_JSCVT)
+ ARM64.HasFCMA = isSet(hwcap, hwcap_FCMA)
+ ARM64.HasLRCPC = isSet(hwcap, hwcap_LRCPC)
+ ARM64.HasDCPOP = isSet(hwcap, hwcap_DCPOP)
+ ARM64.HasSHA3 = isSet(hwcap, hwcap_SHA3)
+ ARM64.HasSM3 = isSet(hwcap, hwcap_SM3)
+ ARM64.HasSM4 = isSet(hwcap, hwcap_SM4)
+ ARM64.HasASIMDDP = isSet(hwcap, hwcap_ASIMDDP)
+ ARM64.HasSHA512 = isSet(hwcap, hwcap_SHA512)
+ ARM64.HasSVE = isSet(hwcap, hwcap_SVE)
+ ARM64.HasASIMDFHM = isSet(hwcap, hwcap_ASIMDFHM)
+}
+
+func isSet(hwc uint, value uint) bool {
+ return hwc&value != 0
+}
diff --git a/vendor/github.com/templexxx/cpu/cpu_mips.go b/vendor/github.com/templexxx/cpu/cpu_mips.go
new file mode 100644
index 0000000..078a6c3
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_mips.go
@@ -0,0 +1,7 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+const CacheLineSize = 32
diff --git a/vendor/github.com/templexxx/cpu/cpu_mips64.go b/vendor/github.com/templexxx/cpu/cpu_mips64.go
new file mode 100644
index 0000000..078a6c3
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_mips64.go
@@ -0,0 +1,7 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+const CacheLineSize = 32
diff --git a/vendor/github.com/templexxx/cpu/cpu_mips64le.go b/vendor/github.com/templexxx/cpu/cpu_mips64le.go
new file mode 100644
index 0000000..078a6c3
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_mips64le.go
@@ -0,0 +1,7 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+const CacheLineSize = 32
diff --git a/vendor/github.com/templexxx/cpu/cpu_mipsle.go b/vendor/github.com/templexxx/cpu/cpu_mipsle.go
new file mode 100644
index 0000000..078a6c3
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_mipsle.go
@@ -0,0 +1,7 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+const CacheLineSize = 32
diff --git a/vendor/github.com/templexxx/cpu/cpu_no_init.go b/vendor/github.com/templexxx/cpu/cpu_no_init.go
new file mode 100644
index 0000000..1be4f29
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_no_init.go
@@ -0,0 +1,16 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !386
+// +build !amd64
+// +build !amd64p32
+// +build !arm64
+// +build !ppc64
+// +build !ppc64le
+// +build !s390x
+
+package cpu
+
+func doinit() {
+}
diff --git a/vendor/github.com/templexxx/cpu/cpu_ppc64x.go b/vendor/github.com/templexxx/cpu/cpu_ppc64x.go
new file mode 100644
index 0000000..995cf02
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_ppc64x.go
@@ -0,0 +1,68 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ppc64 ppc64le
+
+package cpu
+
+const CacheLineSize = 128
+
+// ppc64x doesn't have a 'cpuid' equivalent, so we rely on HWCAP/HWCAP2.
+// These are linknamed in runtime/os_linux_ppc64x.go and are initialized by
+// archauxv().
+var hwcap uint
+var hwcap2 uint
+
+// HWCAP/HWCAP2 bits. These are exposed by the kernel.
+const (
+ // ISA Level
+ _PPC_FEATURE2_ARCH_2_07 = 0x80000000
+ _PPC_FEATURE2_ARCH_3_00 = 0x00800000
+
+ // CPU features
+ _PPC_FEATURE_HAS_ALTIVEC = 0x10000000
+ _PPC_FEATURE_HAS_DFP = 0x00000400
+ _PPC_FEATURE_HAS_VSX = 0x00000080
+ _PPC_FEATURE2_HAS_HTM = 0x40000000
+ _PPC_FEATURE2_HAS_ISEL = 0x08000000
+ _PPC_FEATURE2_HAS_VEC_CRYPTO = 0x02000000
+ _PPC_FEATURE2_HTM_NOSC = 0x01000000
+ _PPC_FEATURE2_DARN = 0x00200000
+ _PPC_FEATURE2_SCV = 0x00100000
+)
+
+func doinit() {
+ options = []option{
+ {"htm", &PPC64.HasHTM},
+ {"htmnosc", &PPC64.HasHTMNOSC},
+ {"darn", &PPC64.HasDARN},
+ {"scv", &PPC64.HasSCV},
+
+ // These capabilities should always be enabled on ppc64 and ppc64le:
+ // {"vmx", &PPC64.HasVMX},
+ // {"dfp", &PPC64.HasDFP},
+ // {"vsx", &PPC64.HasVSX},
+ // {"isel", &PPC64.HasISEL},
+ // {"vcrypto", &PPC64.HasVCRYPTO},
+ }
+
+ // HWCAP feature bits
+ PPC64.HasVMX = isSet(hwcap, _PPC_FEATURE_HAS_ALTIVEC)
+ PPC64.HasDFP = isSet(hwcap, _PPC_FEATURE_HAS_DFP)
+ PPC64.HasVSX = isSet(hwcap, _PPC_FEATURE_HAS_VSX)
+
+ // HWCAP2 feature bits
+ PPC64.IsPOWER8 = isSet(hwcap2, _PPC_FEATURE2_ARCH_2_07)
+ PPC64.HasHTM = isSet(hwcap2, _PPC_FEATURE2_HAS_HTM)
+ PPC64.HasISEL = isSet(hwcap2, _PPC_FEATURE2_HAS_ISEL)
+ PPC64.HasVCRYPTO = isSet(hwcap2, _PPC_FEATURE2_HAS_VEC_CRYPTO)
+ PPC64.HasHTMNOSC = isSet(hwcap2, _PPC_FEATURE2_HTM_NOSC)
+ PPC64.IsPOWER9 = isSet(hwcap2, _PPC_FEATURE2_ARCH_3_00)
+ PPC64.HasDARN = isSet(hwcap2, _PPC_FEATURE2_DARN)
+ PPC64.HasSCV = isSet(hwcap2, _PPC_FEATURE2_SCV)
+}
+
+func isSet(hwc uint, value uint) bool {
+ return hwc&value != 0
+}
diff --git a/vendor/github.com/templexxx/cpu/cpu_s390x.go b/vendor/github.com/templexxx/cpu/cpu_s390x.go
new file mode 100644
index 0000000..389a058
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_s390x.go
@@ -0,0 +1,153 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+const CacheLineSize = 256
+
+// bitIsSet reports whether the bit at index is set. The bit index
+// is in big endian order, so bit index 0 is the leftmost bit.
+func bitIsSet(bits []uint64, index uint) bool {
+ return bits[index/64]&((1<<63)>>(index%64)) != 0
+}
+
+// function is the function code for the named function.
+type function uint8
+
+const (
+ // KM{,A,C,CTR} function codes
+ aes128 function = 18 // AES-128
+ aes192 = 19 // AES-192
+ aes256 = 20 // AES-256
+
+ // K{I,L}MD function codes
+ sha1 = 1 // SHA-1
+ sha256 = 2 // SHA-256
+ sha512 = 3 // SHA-512
+
+ // KLMD function codes
+ ghash = 65 // GHASH
+)
+
+// queryResult contains the result of a Query function
+// call. Bits are numbered in big endian order so the
+// leftmost bit (the MSB) is at index 0.
+type queryResult struct {
+ bits [2]uint64
+}
+
+// Has reports whether the given functions are present.
+func (q *queryResult) Has(fns ...function) bool {
+ if len(fns) == 0 {
+ panic("no function codes provided")
+ }
+ for _, f := range fns {
+ if !bitIsSet(q.bits[:], uint(f)) {
+ return false
+ }
+ }
+ return true
+}
+
+// facility is a bit index for the named facility.
+type facility uint8
+
+const (
+ // mandatory facilities
+ zarch facility = 1 // z architecture mode is active
+ stflef = 7 // store-facility-list-extended
+ ldisp = 18 // long-displacement
+ eimm = 21 // extended-immediate
+
+ // miscellaneous facilities
+ dfp = 42 // decimal-floating-point
+ etf3eh = 30 // extended-translation 3 enhancement
+
+ // cryptography facilities
+ msa = 17 // message-security-assist
+ msa3 = 76 // message-security-assist extension 3
+ msa4 = 77 // message-security-assist extension 4
+ msa5 = 57 // message-security-assist extension 5
+ msa8 = 146 // message-security-assist extension 8
+
+ // Note: vx and highgprs are excluded because they require
+ // kernel support and so must be fetched from HWCAP.
+)
+
+// facilityList contains the result of an STFLE call.
+// Bits are numbered in big endian order so the
+// leftmost bit (the MSB) is at index 0.
+type facilityList struct {
+ bits [4]uint64
+}
+
+// Has reports whether the given facilities are present.
+func (s *facilityList) Has(fs ...facility) bool {
+ if len(fs) == 0 {
+ panic("no facility bits provided")
+ }
+ for _, f := range fs {
+ if !bitIsSet(s.bits[:], uint(f)) {
+ return false
+ }
+ }
+ return true
+}
+
+// The following feature detection functions are defined in cpu_s390x.s.
+// They are likely to be expensive to call so the results should be cached.
+func stfle() facilityList
+func kmQuery() queryResult
+func kmcQuery() queryResult
+func kmctrQuery() queryResult
+func kmaQuery() queryResult
+func kimdQuery() queryResult
+func klmdQuery() queryResult
+
+func doinit() {
+ options = []option{
+ {"zarch", &S390X.HasZArch},
+ {"stfle", &S390X.HasSTFLE},
+ {"ldisp", &S390X.HasLDisp},
+ {"msa", &S390X.HasMSA},
+ {"eimm", &S390X.HasEImm},
+ {"dfp", &S390X.HasDFP},
+ {"etf3eh", &S390X.HasETF3Enhanced},
+ {"vx", &S390X.HasVX},
+ }
+
+ aes := []function{aes128, aes192, aes256}
+ facilities := stfle()
+
+ S390X.HasZArch = facilities.Has(zarch)
+ S390X.HasSTFLE = facilities.Has(stflef)
+ S390X.HasLDisp = facilities.Has(ldisp)
+ S390X.HasEImm = facilities.Has(eimm)
+ S390X.HasDFP = facilities.Has(dfp)
+ S390X.HasETF3Enhanced = facilities.Has(etf3eh)
+ S390X.HasMSA = facilities.Has(msa)
+
+ if S390X.HasMSA {
+ // cipher message
+ km, kmc := kmQuery(), kmcQuery()
+ S390X.HasAES = km.Has(aes...)
+ S390X.HasAESCBC = kmc.Has(aes...)
+ if facilities.Has(msa4) {
+ kmctr := kmctrQuery()
+ S390X.HasAESCTR = kmctr.Has(aes...)
+ }
+ if facilities.Has(msa8) {
+ kma := kmaQuery()
+ S390X.HasAESGCM = kma.Has(aes...)
+ }
+
+ // compute message digest
+ kimd := kimdQuery() // intermediate (no padding)
+ klmd := klmdQuery() // last (padding)
+ S390X.HasSHA1 = kimd.Has(sha1) && klmd.Has(sha1)
+ S390X.HasSHA256 = kimd.Has(sha256) && klmd.Has(sha256)
+ S390X.HasSHA512 = kimd.Has(sha512) && klmd.Has(sha512)
+ S390X.HasGHASH = kimd.Has(ghash) // KLMD-GHASH does not exist
+ }
+}
diff --git a/vendor/github.com/templexxx/cpu/cpu_s390x.s b/vendor/github.com/templexxx/cpu/cpu_s390x.s
new file mode 100644
index 0000000..9678035
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_s390x.s
@@ -0,0 +1,55 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+// func stfle() facilityList
+TEXT ·stfle(SB), NOSPLIT|NOFRAME, $0-32
+ MOVD $ret+0(FP), R1
+ MOVD $3, R0 // last doubleword index to store
+ XC $32, (R1), (R1) // clear 4 doublewords (32 bytes)
+ WORD $0xb2b01000 // store facility list extended (STFLE)
+ RET
+
+// func kmQuery() queryResult
+TEXT ·kmQuery(SB), NOSPLIT|NOFRAME, $0-16
+ MOVD $0, R0 // set function code to 0 (KM-Query)
+ MOVD $ret+0(FP), R1 // address of 16-byte return value
+ WORD $0xB92E0024 // cipher message (KM)
+ RET
+
+// func kmcQuery() queryResult
+TEXT ·kmcQuery(SB), NOSPLIT|NOFRAME, $0-16
+ MOVD $0, R0 // set function code to 0 (KMC-Query)
+ MOVD $ret+0(FP), R1 // address of 16-byte return value
+ WORD $0xB92F0024 // cipher message with chaining (KMC)
+ RET
+
+// func kmctrQuery() queryResult
+TEXT ·kmctrQuery(SB), NOSPLIT|NOFRAME, $0-16
+ MOVD $0, R0 // set function code to 0 (KMCTR-Query)
+ MOVD $ret+0(FP), R1 // address of 16-byte return value
+ WORD $0xB92D4024 // cipher message with counter (KMCTR)
+ RET
+
+// func kmaQuery() queryResult
+TEXT ·kmaQuery(SB), NOSPLIT|NOFRAME, $0-16
+ MOVD $0, R0 // set function code to 0 (KMA-Query)
+ MOVD $ret+0(FP), R1 // address of 16-byte return value
+ WORD $0xb9296024 // cipher message with authentication (KMA)
+ RET
+
+// func kimdQuery() queryResult
+TEXT ·kimdQuery(SB), NOSPLIT|NOFRAME, $0-16
+ MOVD $0, R0 // set function code to 0 (KIMD-Query)
+ MOVD $ret+0(FP), R1 // address of 16-byte return value
+ WORD $0xB93E0024 // compute intermediate message digest (KIMD)
+ RET
+
+// func klmdQuery() queryResult
+TEXT ·klmdQuery(SB), NOSPLIT|NOFRAME, $0-16
+ MOVD $0, R0 // set function code to 0 (KLMD-Query)
+ MOVD $ret+0(FP), R1 // address of 16-byte return value
+ WORD $0xB93F0024 // compute last message digest (KLMD)
+ RET
diff --git a/vendor/github.com/templexxx/cpu/cpu_wasm.go b/vendor/github.com/templexxx/cpu/cpu_wasm.go
new file mode 100644
index 0000000..1107a7a
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_wasm.go
@@ -0,0 +1,7 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+const CacheLineSize = 64
diff --git a/vendor/github.com/templexxx/cpu/cpu_x86.go b/vendor/github.com/templexxx/cpu/cpu_x86.go
new file mode 100644
index 0000000..313a29a
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_x86.go
@@ -0,0 +1,425 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build 386 amd64 amd64p32
+
+package cpu
+
+import (
+ "fmt"
+ "strings"
+)
+
+const CacheLineSize = 64
+
+// cpuid is implemented in cpu_x86.s.
+func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
+
+// xgetbv with ecx = 0 is implemented in cpu_x86.s.
+func xgetbv() (eax, edx uint32)
+
+const (
+ // edx bits
+ cpuid_SSE2 = 1 << 26
+
+ // ecx bits
+ cpuid_SSE3 = 1 << 0
+ cpuid_PCLMULQDQ = 1 << 1
+ cpuid_SSSE3 = 1 << 9
+ cpuid_FMA = 1 << 12
+ cpuid_SSE41 = 1 << 19
+ cpuid_SSE42 = 1 << 20
+ cpuid_POPCNT = 1 << 23
+ cpuid_AES = 1 << 25
+ cpuid_OSXSAVE = 1 << 27
+ cpuid_AVX = 1 << 28
+
+ // ebx bits
+ cpuid_BMI1 = 1 << 3
+ cpuid_AVX2 = 1 << 5
+ cpuid_BMI2 = 1 << 8
+ cpuid_ERMS = 1 << 9
+ cpuid_ADX = 1 << 19
+ cpuid_AVX512F = 1 << 16
+ cpuid_AVX512DQ = 1 << 17
+ cpuid_AVX512BW = 1 << 30
+ cpuid_AVX512VL = 1 << 31
+
+ // edx bits
+ cpuid_Invariant_TSC = 1 << 8
+)
+
+func doinit() {
+ options = []option{
+ {"adx", &X86.HasADX},
+ {"aes", &X86.HasAES},
+ {"avx", &X86.HasAVX},
+ {"avx2", &X86.HasAVX2},
+ {"bmi1", &X86.HasBMI1},
+ {"bmi2", &X86.HasBMI2},
+ {"erms", &X86.HasERMS},
+ {"fma", &X86.HasFMA},
+ {"pclmulqdq", &X86.HasPCLMULQDQ},
+ {"popcnt", &X86.HasPOPCNT},
+ {"sse3", &X86.HasSSE3},
+ {"sse41", &X86.HasSSE41},
+ {"sse42", &X86.HasSSE42},
+ {"ssse3", &X86.HasSSSE3},
+ {"avx512f", &X86.HasAVX512F},
+ {"avx512dq", &X86.HasAVX512DQ},
+ {"avx512bw", &X86.HasAVX512BW},
+ {"avx512vl", &X86.HasAVX512VL},
+ {"invariant_tsc", &X86.HasInvariantTSC},
+
+ // sse2 set as last element so it can easily be removed again. See code below.
+ {"sse2", &X86.HasSSE2},
+ }
+
+ // Remove sse2 from options on amd64(p32) because SSE2 is a mandatory feature for these GOARCHs.
+ if GOARCH == "amd64" || GOARCH == "amd64p32" {
+ options = options[:len(options)-1]
+ }
+
+ maxID, _, _, _ := cpuid(0, 0)
+
+ if maxID < 1 {
+ return
+ }
+
+ _, _, ecx1, edx1 := cpuid(1, 0)
+ X86.HasSSE2 = isSet(edx1, cpuid_SSE2)
+
+ X86.HasSSE3 = isSet(ecx1, cpuid_SSE3)
+ X86.HasPCLMULQDQ = isSet(ecx1, cpuid_PCLMULQDQ)
+ X86.HasSSSE3 = isSet(ecx1, cpuid_SSSE3)
+ X86.HasFMA = isSet(ecx1, cpuid_FMA)
+ X86.HasSSE41 = isSet(ecx1, cpuid_SSE41)
+ X86.HasSSE42 = isSet(ecx1, cpuid_SSE42)
+ X86.HasPOPCNT = isSet(ecx1, cpuid_POPCNT)
+ X86.HasAES = isSet(ecx1, cpuid_AES)
+ X86.HasOSXSAVE = isSet(ecx1, cpuid_OSXSAVE)
+
+ osSupportsAVX := false
+ osSupportsAVX512 := false
+ // For XGETBV, OSXSAVE bit is required and sufficient.
+ if X86.HasOSXSAVE {
+ eax, _ := xgetbv()
+ // Check if XMM and YMM registers have OS support.
+ osSupportsAVX = isSet(eax, 1<<1) && isSet(eax, 1<<2)
+ // Check is ZMM registers have OS support.
+ osSupportsAVX512 = isSet(eax>>5, 7) && isSet(eax>>1, 3)
+ }
+
+ X86.HasAVX = isSet(ecx1, cpuid_AVX) && osSupportsAVX
+
+ if maxID < 7 {
+ return
+ }
+
+ _, ebx7, _, _ := cpuid(7, 0)
+ X86.HasBMI1 = isSet(ebx7, cpuid_BMI1)
+ X86.HasAVX2 = isSet(ebx7, cpuid_AVX2) && osSupportsAVX
+ X86.HasAVX512F = isSet(ebx7, cpuid_AVX512F) && osSupportsAVX512
+ X86.HasAVX512DQ = isSet(ebx7, cpuid_AVX512DQ) && osSupportsAVX512
+ X86.HasAVX512BW = isSet(ebx7, cpuid_AVX512BW) && osSupportsAVX512
+ X86.HasAVX512VL = isSet(ebx7, cpuid_AVX512VL) && osSupportsAVX512
+ X86.HasBMI2 = isSet(ebx7, cpuid_BMI2)
+ X86.HasERMS = isSet(ebx7, cpuid_ERMS)
+ X86.HasADX = isSet(ebx7, cpuid_ADX)
+
+ X86.Cache = getCacheSize()
+
+ X86.HasInvariantTSC = hasInvariantTSC()
+
+ X86.Family, X86.Model = getFamilyModel()
+
+ X86.Signature = makeSignature(X86.Family, X86.Model)
+
+ X86.Name = getName()
+
+ X86.TSCFrequency = getNativeTSCFrequency(X86.Name, X86.Signature)
+}
+
+func isSet(hwc uint32, value uint32) bool {
+ return hwc&value != 0
+}
+
+func hasInvariantTSC() bool {
+ if maxExtendedFunction() < 0x80000007 {
+ return false
+ }
+ _, _, _, edx := cpuid(0x80000007, 0)
+ return isSet(edx, cpuid_Invariant_TSC)
+}
+
+func getName() string {
+ if maxExtendedFunction() >= 0x80000004 {
+ v := make([]uint32, 0, 48)
+ for i := uint32(0); i < 3; i++ {
+ a, b, c, d := cpuid(0x80000002+i, 0)
+ v = append(v, a, b, c, d)
+ }
+ return strings.Trim(string(valAsString(v...)), " ")
+ }
+ return "unknown"
+}
+
+// getNativeTSCFrequency gets TSC frequency from CPUID,
+// only supports Intel (Skylake or later microarchitecture) & key information is from Intel manual & kernel codes
+// (especially this commit: https://github.com/torvalds/linux/commit/604dc9170f2435d27da5039a3efd757dceadc684).
+func getNativeTSCFrequency(name, sign string) uint64 {
+
+ if vendorID() != Intel {
+ return 0
+ }
+
+ if maxFunctionID() < 0x15 {
+ return 0
+ }
+
+ // ApolloLake, GeminiLake, CannonLake (and presumably all new chipsets
+ // from this point) report the crystal frequency directly via CPUID.0x15.
+ // That's definitive data that we can rely upon.
+ eax, ebx, ecx, _ := cpuid(0x15, 0)
+
+ // If ebx is 0, the TSC/”core crystal clock” ratio is not enumerated.
+ // We won't provide TSC frequency detection in this situation.
+ if eax == 0 || ebx == 0 {
+ return 0
+ }
+
+ // Skylake, Kabylake and all variants of those two chipsets report a
+ // crystal frequency of zero.
+ if ecx == 0 { // Crystal clock frequency is not enumerated.
+ ecx = getCrystalClockFrequency(sign)
+ }
+
+ // TSC frequency = “core crystal clock frequency” * EBX/EAX.
+ return uint64(ecx) * (uint64(ebx) / uint64(eax))
+}
+
+// Copied from: CPUID Signature values of DisplayFamily and DisplayModel,
+// in Intel® 64 and IA-32 Architectures Software Developer’s Manual
+// Volume 4: Model-Specific Registers
+// & https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/intel-family.h
+const (
+ IntelFam6SkylakeL = "06_4EH"
+ IntelFam6Skylake = "06_5EH"
+ IntelFam6SkylakeX = "06_55H"
+ IntelFam6KabylakeL = "06_8EH"
+ IntelFam6Kabylake = "06_9EH"
+)
+
+// getCrystalClockFrequency gets crystal clock frequency
+// for Intel processors in which CPUID.15H.EBX[31:0] ÷ CPUID.0x15.EAX[31:0] is enumerated
+// but CPUID.15H.ECX is not enumerated using this function to get nominal core crystal clock frequency.
+//
+// Actually these crystal clock frequencies provided by Intel hardcoded tables are not so accurate in some cases,
+// e.g. SkyLake server CPU may have issue (All SKX subject the crystal to an EMI reduction circuit that
+//reduces its actual frequency by (approximately) -0.25%):
+// see https://lore.kernel.org/lkml/ff6dcea166e8ff8f2f6a03c17beab2cb436aa779.1513920414.git.len.brown@intel.com/
+// for more details.
+// With this report, I set a coefficient (0.9975) for IntelFam6SkyLakeX.
+//
+// Unlike the kernel way (mentioned in https://github.com/torvalds/linux/commit/604dc9170f2435d27da5039a3efd757dceadc684),
+// I prefer the Intel hardcoded tables,
+// because after some testing (comparing with wall clock, see https://github.com/templexxx/tsc/tsc_test.go for more details),
+// I found hardcoded tables are more accurate.
+func getCrystalClockFrequency(sign string) uint32 {
+
+ if maxFunctionID() < 0x16 {
+ return 0
+ }
+
+ switch sign {
+ case IntelFam6SkylakeL:
+ return 24 * 1000 * 1000
+ case IntelFam6Skylake:
+ return 24 * 1000 * 1000
+ case IntelFam6SkylakeX:
+ return 25 * 1000 * 1000 * 0.9975
+ case IntelFam6KabylakeL:
+ return 24 * 1000 * 1000
+ case IntelFam6Kabylake:
+ return 24 * 1000 * 1000
+ }
+
+ return 0
+}
+
+func getFamilyModel() (uint32, uint32) {
+ if maxFunctionID() < 0x1 {
+ return 0, 0
+ }
+ eax, _, _, _ := cpuid(1, 0)
+ family := (eax >> 8) & 0xf
+ displayFamily := family
+ if family == 0xf {
+ displayFamily = ((eax >> 20) & 0xff) + family
+ }
+ model := (eax >> 4) & 0xf
+ displayModel := model
+ if family == 0x6 || family == 0xf {
+ displayModel = ((eax >> 12) & 0xf0) + model
+ }
+ return displayFamily, displayModel
+}
+
+// signature format: XX_XXH
+func makeSignature(family, model uint32) string {
+ signature := strings.ToUpper(fmt.Sprintf("0%x_0%xH", family, model))
+ ss := strings.Split(signature, "_")
+ for i, s := range ss {
+ // Maybe insert too more `0`, drop it.
+ if len(s) > 2 {
+ s = s[1:]
+ ss[i] = s
+ }
+ }
+ return strings.Join(ss, "_")
+}
+
+// getCacheSize is from
+// https://github.com/klauspost/cpuid/blob/5a626f7029c910cc8329dae5405ee4f65034bce5/cpuid.go#L723
+func getCacheSize() Cache {
+ c := Cache{
+ L1I: -1,
+ L1D: -1,
+ L2: -1,
+ L3: -1,
+ }
+
+ vendor := vendorID()
+ switch vendor {
+ case Intel:
+ if maxFunctionID() < 4 {
+ return c
+ }
+ for i := uint32(0); ; i++ {
+ eax, ebx, ecx, _ := cpuid(4, i)
+ cacheType := eax & 15
+ if cacheType == 0 {
+ break
+ }
+ cacheLevel := (eax >> 5) & 7
+ coherency := int(ebx&0xfff) + 1
+ partitions := int((ebx>>12)&0x3ff) + 1
+ associativity := int((ebx>>22)&0x3ff) + 1
+ sets := int(ecx) + 1
+ size := associativity * partitions * coherency * sets
+ switch cacheLevel {
+ case 1:
+ if cacheType == 1 {
+ // 1 = Data Cache
+ c.L1D = size
+ } else if cacheType == 2 {
+ // 2 = Instruction Cache
+ c.L1I = size
+ } else {
+ if c.L1D < 0 {
+ c.L1I = size
+ }
+ if c.L1I < 0 {
+ c.L1I = size
+ }
+ }
+ case 2:
+ c.L2 = size
+ case 3:
+ c.L3 = size
+ }
+ }
+ case AMD, Hygon:
+ // Untested.
+ if maxExtendedFunction() < 0x80000005 {
+ return c
+ }
+ _, _, ecx, edx := cpuid(0x80000005, 0)
+ c.L1D = int(((ecx >> 24) & 0xFF) * 1024)
+ c.L1I = int(((edx >> 24) & 0xFF) * 1024)
+
+ if maxExtendedFunction() < 0x80000006 {
+ return c
+ }
+ _, _, ecx, _ = cpuid(0x80000006, 0)
+ c.L2 = int(((ecx >> 16) & 0xFFFF) * 1024)
+ }
+
+ return c
+}
+
+func maxFunctionID() uint32 {
+ a, _, _, _ := cpuid(0, 0)
+ return a
+}
+
+func maxExtendedFunction() uint32 {
+ eax, _, _, _ := cpuid(0x80000000, 0)
+ return eax
+}
+
+const (
+ Other = iota
+ Intel
+ AMD
+ VIA
+ Transmeta
+ NSC
+ KVM // Kernel-based Virtual Machine
+ MSVM // Microsoft Hyper-V or Windows Virtual PC
+ VMware
+ XenHVM
+ Bhyve
+ Hygon
+)
+
+// Except from http://en.wikipedia.org/wiki/CPUID#EAX.3D0:_Get_vendor_ID
+var vendorMapping = map[string]int{
+ "AMDisbetter!": AMD,
+ "AuthenticAMD": AMD,
+ "CentaurHauls": VIA,
+ "GenuineIntel": Intel,
+ "TransmetaCPU": Transmeta,
+ "GenuineTMx86": Transmeta,
+ "Geode by NSC": NSC,
+ "VIA VIA VIA ": VIA,
+ "KVMKVMKVMKVM": KVM,
+ "Microsoft Hv": MSVM,
+ "VMwareVMware": VMware,
+ "XenVMMXenVMM": XenHVM,
+ "bhyve bhyve ": Bhyve,
+ "HygonGenuine": Hygon,
+}
+
+func vendorID() int {
+ _, b, c, d := cpuid(0, 0)
+ v := valAsString(b, d, c)
+ vend, ok := vendorMapping[string(v)]
+ if !ok {
+ return Other
+ }
+ return vend
+}
+
+func valAsString(values ...uint32) []byte {
+ r := make([]byte, 4*len(values))
+ for i, v := range values {
+ dst := r[i*4:]
+ dst[0] = byte(v & 0xff)
+ dst[1] = byte((v >> 8) & 0xff)
+ dst[2] = byte((v >> 16) & 0xff)
+ dst[3] = byte((v >> 24) & 0xff)
+ switch {
+ case dst[0] == 0:
+ return r[:i*4]
+ case dst[1] == 0:
+ return r[:i*4+1]
+ case dst[2] == 0:
+ return r[:i*4+2]
+ case dst[3] == 0:
+ return r[:i*4+3]
+ }
+ }
+ return r
+}
diff --git a/vendor/github.com/templexxx/cpu/cpu_x86.s b/vendor/github.com/templexxx/cpu/cpu_x86.s
new file mode 100644
index 0000000..228fbcf
--- /dev/null
+++ b/vendor/github.com/templexxx/cpu/cpu_x86.s
@@ -0,0 +1,32 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build 386 amd64 amd64p32
+
+#include "textflag.h"
+
+// func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
+TEXT ·cpuid(SB), NOSPLIT, $0-24
+ MOVL eaxArg+0(FP), AX
+ MOVL ecxArg+4(FP), CX
+ CPUID
+ MOVL AX, eax+8(FP)
+ MOVL BX, ebx+12(FP)
+ MOVL CX, ecx+16(FP)
+ MOVL DX, edx+20(FP)
+ RET
+
+// func xgetbv() (eax, edx uint32)
+TEXT ·xgetbv(SB),NOSPLIT,$0-8
+#ifdef GOOS_nacl
+ // nacl does not support XGETBV.
+ MOVL $0, eax+0(FP)
+ MOVL $0, edx+4(FP)
+#else
+ MOVL $0, CX
+ XGETBV
+ MOVL AX, eax+0(FP)
+ MOVL DX, edx+4(FP)
+#endif
+ RET
diff --git a/vendor/github.com/templexxx/xorsimd/.gitattributes b/vendor/github.com/templexxx/xorsimd/.gitattributes
new file mode 100644
index 0000000..68f7d04
--- /dev/null
+++ b/vendor/github.com/templexxx/xorsimd/.gitattributes
@@ -0,0 +1 @@
+*.s linguist-language=go:x
diff --git a/vendor/github.com/templexxx/xorsimd/.gitignore b/vendor/github.com/templexxx/xorsimd/.gitignore
new file mode 100644
index 0000000..43309f8
--- /dev/null
+++ b/vendor/github.com/templexxx/xorsimd/.gitignore
@@ -0,0 +1,13 @@
+# Binaries for programs and plugins
+*.exe
+*.exe~
+*.dll
+*.so
+*.dylib
+
+# Test binary, build with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
+.idea
diff --git a/vendor/github.com/templexxx/xorsimd/LICENSE b/vendor/github.com/templexxx/xorsimd/LICENSE
new file mode 100644
index 0000000..08ee714
--- /dev/null
+++ b/vendor/github.com/templexxx/xorsimd/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 Temple3x (temple3x@gmail.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/templexxx/xorsimd/README.md b/vendor/github.com/templexxx/xorsimd/README.md
new file mode 100644
index 0000000..9dce5c9
--- /dev/null
+++ b/vendor/github.com/templexxx/xorsimd/README.md
@@ -0,0 +1,46 @@
+# XOR SIMD
+
+[![GoDoc][1]][2] [![MIT licensed][3]][4] [![Build Status][5]][6] [![Go Report Card][7]][8] [![Sourcegraph][9]][10]
+
+[1]: https://godoc.org/github.com/templexxx/xorsimd?status.svg
+[2]: https://godoc.org/github.com/templexxx/xorsimd
+[3]: https://img.shields.io/badge/license-MIT-blue.svg
+[4]: LICENSE
+[5]: https://github.com/templexxx/xorsimd/workflows/unit-test/badge.svg
+[6]: https://github.com/templexxx/xorsimd
+[7]: https://goreportcard.com/badge/github.com/templexxx/xorsimd
+[8]: https://goreportcard.com/report/github.com/templexxx/xorsimd
+[9]: https://sourcegraph.com/github.com/templexxx/xorsimd/-/badge.svg
+[10]: https://sourcegraph.com/github.com/templexxx/xorsimd?badge
+
+## Introduction:
+
+>- XOR code engine in pure Go.
+>
+>- [High Performance](https://github.com/templexxx/xorsimd#performance):
+More than 270GB/s per physics core.
+
+## Performance
+
+Performance depends mainly on:
+
+>- CPU instruction extension.
+>
+>- Number of source row vectors.
+
+**Platform:**
+
+*AWS c5d.xlarge (Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz)*
+
+**All test run on a single Core.**
+
+`I/O = (src_num + 1) * vector_size / cost`
+
+| Src Num | Vector size | AVX512 I/O (MB/S) | AVX2 I/O (MB/S) |SSE2 I/O (MB/S) |
+|-------|-------------|-------------|---------------|---------------|
+|5|4KB| 270403.73 | 142825.25 | 74443.91 |
+|5|1MB| 26948.34 | 26887.37 | 26950.65 |
+|5|8MB| 17881.32 | 17212.56 | 16402.97 |
+|10|4KB| 190445.30 | 102953.59 | 53244.04 |
+|10|1MB| 26424.44 | 26618.65 | 26094.39 |
+|10|8MB| 15471.31 | 14866.72 | 13565.80 |
diff --git a/vendor/github.com/templexxx/xorsimd/go.mod b/vendor/github.com/templexxx/xorsimd/go.mod
new file mode 100644
index 0000000..ac5f57f
--- /dev/null
+++ b/vendor/github.com/templexxx/xorsimd/go.mod
@@ -0,0 +1,5 @@
+module github.com/templexxx/xorsimd
+
+require github.com/templexxx/cpu v0.0.1
+
+go 1.13
diff --git a/vendor/github.com/templexxx/xorsimd/go.sum b/vendor/github.com/templexxx/xorsimd/go.sum
new file mode 100644
index 0000000..04d04de
--- /dev/null
+++ b/vendor/github.com/templexxx/xorsimd/go.sum
@@ -0,0 +1,2 @@
+github.com/templexxx/cpu v0.0.1 h1:hY4WdLOgKdc8y13EYklu9OUTXik80BkxHoWvTO6MQQY=
+github.com/templexxx/cpu v0.0.1/go.mod h1:w7Tb+7qgcAlIyX4NhLuDKt78AHA5SzPmq0Wj6HiEnnk=
diff --git a/vendor/github.com/templexxx/xorsimd/xor.go b/vendor/github.com/templexxx/xorsimd/xor.go
new file mode 100644
index 0000000..ae88911
--- /dev/null
+++ b/vendor/github.com/templexxx/xorsimd/xor.go
@@ -0,0 +1,89 @@
+// Copyright (c) 2019. Temple3x (temple3x@gmail.com)
+//
+// Use of this source code is governed by the MIT License
+// that can be found in the LICENSE file.
+
+package xorsimd
+
+import "github.com/templexxx/cpu"
+
+// EnableAVX512 may slow down CPU Clock (maybe not).
+// TODO need more research:
+// https://lemire.me/blog/2018/04/19/by-how-much-does-avx-512-slow-down-your-cpu-a-first-experiment/
+var EnableAVX512 = true
+
+// cpuFeature indicates which instruction set will be used.
+var cpuFeature = getCPUFeature()
+
+const (
+ avx512 = iota
+ avx2
+ sse2
+ generic
+)
+
+// TODO: Add ARM feature...
+func getCPUFeature() int {
+ if hasAVX512() && EnableAVX512 {
+ return avx512
+ } else if cpu.X86.HasAVX2 {
+ return avx2
+ } else {
+ return sse2 // amd64 must has sse2
+ }
+}
+
+func hasAVX512() (ok bool) {
+
+ return cpu.X86.HasAVX512VL &&
+ cpu.X86.HasAVX512BW &&
+ cpu.X86.HasAVX512F &&
+ cpu.X86.HasAVX512DQ
+}
+
+// Encode encodes elements from source slice into a
+// destination slice. The source and destination may overlap.
+// Encode returns the number of bytes encoded, which will be the minimum of
+// len(src[i]) and len(dst).
+func Encode(dst []byte, src [][]byte) (n int) {
+ n = checkLen(dst, src)
+ if n == 0 {
+ return
+ }
+
+ dst = dst[:n]
+ for i := range src {
+ src[i] = src[i][:n]
+ }
+
+ if len(src) == 1 {
+ copy(dst, src[0])
+ return
+ }
+
+ encode(dst, src)
+ return
+}
+
+func checkLen(dst []byte, src [][]byte) int {
+ n := len(dst)
+ for i := range src {
+ if len(src[i]) < n {
+ n = len(src[i])
+ }
+ }
+
+ if n <= 0 {
+ return 0
+ }
+ return n
+}
+
+// Bytes XORs the bytes in a and b into a
+// destination slice. The source and destination may overlap.
+//
+// Bytes returns the number of bytes encoded, which will be the minimum of
+// len(dst), len(a), len(b).
+func Bytes(dst, a, b []byte) int {
+ return Encode(dst, [][]byte{a, b})
+}
diff --git a/vendor/github.com/templexxx/xorsimd/xor_amd64.go b/vendor/github.com/templexxx/xorsimd/xor_amd64.go
new file mode 100644
index 0000000..5d46df3
--- /dev/null
+++ b/vendor/github.com/templexxx/xorsimd/xor_amd64.go
@@ -0,0 +1,95 @@
+// Copyright (c) 2019. Temple3x (temple3x@gmail.com)
+//
+// Use of this source code is governed by the MIT License
+// that can be found in the LICENSE file.
+
+package xorsimd
+
+func encode(dst []byte, src [][]byte) {
+
+ switch cpuFeature {
+ case avx512:
+ encodeAVX512(dst, src)
+ case avx2:
+ encodeAVX2(dst, src)
+ default:
+ encodeSSE2(dst, src)
+ }
+ return
+}
+
+// Bytes8 XORs of 8 Bytes.
+// The slice arguments a, b, dst's lengths are assumed to be at least 8,
+// if not, Bytes8 will panic.
+func Bytes8(dst, a, b []byte) {
+
+ bytes8(&dst[0], &a[0], &b[0])
+}
+
+// Bytes16 XORs of packed 16 Bytes.
+// The slice arguments a, b, dst's lengths are assumed to be at least 16,
+// if not, Bytes16 will panic.
+func Bytes16(dst, a, b []byte) {
+
+ bytes16(&dst[0], &a[0], &b[0])
+}
+
+// Bytes8Align XORs of 8 Bytes.
+// The slice arguments a, b, dst's lengths are assumed to be at least 8,
+// if not, Bytes8 will panic.
+func Bytes8Align(dst, a, b []byte) {
+
+ bytes8(&dst[0], &a[0], &b[0])
+}
+
+// Bytes16Align XORs of packed 16 Bytes.
+// The slice arguments a, b, dst's lengths are assumed to be at least 16,
+// if not, Bytes16 will panic.
+func Bytes16Align(dst, a, b []byte) {
+
+ bytes16(&dst[0], &a[0], &b[0])
+}
+
+// BytesA XORs the len(a) bytes in a and b into a
+// destination slice.
+// The destination should have enough space.
+//
+// It's used for encoding small bytes slices (< dozens bytes),
+// and the slices may not be aligned to 8 bytes or 16 bytes.
+// If the length is big, it's better to use 'func Bytes(dst, a, b []byte)' instead
+// for gain better performance.
+func BytesA(dst, a, b []byte) {
+
+ bytesN(&dst[0], &a[0], &b[0], len(a))
+}
+
+// BytesB XORs the len(b) bytes in a and b into a
+// destination slice.
+// The destination should have enough space.
+//
+// It's used for encoding small bytes slices (< dozens bytes),
+// and the slices may not be aligned to 8 bytes or 16 bytes.
+// If the length is big, it's better to use 'func Bytes(dst, a, b []byte)' instead
+// for gain better performance.
+func BytesB(dst, a, b []byte) {
+
+ bytesN(&dst[0], &a[0], &b[0], len(b))
+}
+
+//go:noescape
+func encodeAVX512(dst []byte, src [][]byte)
+
+//go:noescape
+func encodeAVX2(dst []byte, src [][]byte)
+
+//go:noescape
+func encodeSSE2(dst []byte, src [][]byte)
+
+//go:noescape
+func bytesN(dst, a, b *byte, n int)
+
+//go:noescape
+func bytes8(dst, a, b *byte)
+
+//go:noescape
+func bytes16(dst, a, b *byte)
diff --git a/vendor/github.com/templexxx/xorsimd/xor_generic.go b/vendor/github.com/templexxx/xorsimd/xor_generic.go
new file mode 100644
index 0000000..b12908f
--- /dev/null
+++ b/vendor/github.com/templexxx/xorsimd/xor_generic.go
@@ -0,0 +1,205 @@
+// Copyright (c) 2019. Temple3x (temple3x@gmail.com)
+//
+// Use of this source code is governed by the MIT License
+// that can be found in the LICENSE file.
+//
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !amd64
+
+package xorsimd
+
+import (
+ "runtime"
+ "unsafe"
+)
+
+const wordSize = int(unsafe.Sizeof(uintptr(0)))
+const supportsUnaligned = runtime.GOARCH == "386" || runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le" || runtime.GOARCH == "s390x"
+
+func encode(dst []byte, src [][]byte) {
+ if supportsUnaligned {
+ fastEncode(dst, src, len(dst))
+ } else {
+ // TODO(hanwen): if (dst, a, b) have common alignment
+ // we could still try fastEncode. It is not clear
+ // how often this happens, and it's only worth it if
+ // the block encryption itself is hardware
+ // accelerated.
+ safeEncode(dst, src, len(dst))
+ }
+
+}
+
+// fastEncode xor in bulk. It only works on architectures that
+// support unaligned read/writes.
+func fastEncode(dst []byte, src [][]byte, n int) {
+ w := n / wordSize
+ if w > 0 {
+ wordBytes := w * wordSize
+
+ wordAlignSrc := make([][]byte, len(src))
+ for i := range src {
+ wordAlignSrc[i] = src[i][:wordBytes]
+ }
+ fastEnc(dst[:wordBytes], wordAlignSrc)
+ }
+
+ for i := n - n%wordSize; i < n; i++ {
+ s := src[0][i]
+ for j := 1; j < len(src); j++ {
+ s ^= src[j][i]
+ }
+ dst[i] = s
+ }
+}
+
+func fastEnc(dst []byte, src [][]byte) {
+ dw := *(*[]uintptr)(unsafe.Pointer(&dst))
+ sw := make([][]uintptr, len(src))
+ for i := range src {
+ sw[i] = *(*[]uintptr)(unsafe.Pointer(&src[i]))
+ }
+
+ n := len(dst) / wordSize
+ for i := 0; i < n; i++ {
+ s := sw[0][i]
+ for j := 1; j < len(sw); j++ {
+ s ^= sw[j][i]
+ }
+ dw[i] = s
+ }
+}
+
+func safeEncode(dst []byte, src [][]byte, n int) {
+ for i := 0; i < n; i++ {
+ s := src[0][i]
+ for j := 1; j < len(src); j++ {
+ s ^= src[j][i]
+ }
+ dst[i] = s
+ }
+}
+
+// Bytes8 XORs of word 8 Bytes.
+// The slice arguments a, b, dst's lengths are assumed to be at least 8,
+// if not, Bytes8 will panic.
+func Bytes8(dst, a, b []byte) {
+
+ bytesWords(dst[:8], a[:8], b[:8])
+}
+
+// Bytes16 XORs of packed doubleword 16 Bytes.
+// The slice arguments a, b, dst's lengths are assumed to be at least 16,
+// if not, Bytes16 will panic.
+func Bytes16(dst, a, b []byte) {
+
+ bytesWords(dst[:16], a[:16], b[:16])
+}
+
+// bytesWords XORs multiples of 4 or 8 bytes (depending on architecture.)
+// The slice arguments a and b are assumed to be of equal length.
+func bytesWords(dst, a, b []byte) {
+ if supportsUnaligned {
+ dw := *(*[]uintptr)(unsafe.Pointer(&dst))
+ aw := *(*[]uintptr)(unsafe.Pointer(&a))
+ bw := *(*[]uintptr)(unsafe.Pointer(&b))
+ n := len(b) / wordSize
+ for i := 0; i < n; i++ {
+ dw[i] = aw[i] ^ bw[i]
+ }
+ } else {
+ n := len(b)
+ for i := 0; i < n; i++ {
+ dst[i] = a[i] ^ b[i]
+ }
+ }
+}
+
+// Bytes8Align XORs of 8 Bytes.
+// The slice arguments a, b, dst's lengths are assumed to be at least 8,
+// if not, Bytes8 will panic.
+//
+// All the byte slices must be aligned to wordsize.
+func Bytes8Align(dst, a, b []byte) {
+
+ bytesWordsAlign(dst[:8], a[:8], b[:8])
+}
+
+// Bytes16Align XORs of packed 16 Bytes.
+// The slice arguments a, b, dst's lengths are assumed to be at least 16,
+// if not, Bytes16 will panic.
+//
+// All the byte slices must be aligned to wordsize.
+func Bytes16Align(dst, a, b []byte) {
+
+ bytesWordsAlign(dst[:16], a[:16], b[:16])
+}
+
+// bytesWordsAlign XORs multiples of 4 or 8 bytes (depending on architecture.)
+// The slice arguments a and b are assumed to be of equal length.
+//
+// All the byte slices must be aligned to wordsize.
+func bytesWordsAlign(dst, a, b []byte) {
+ dw := *(*[]uintptr)(unsafe.Pointer(&dst))
+ aw := *(*[]uintptr)(unsafe.Pointer(&a))
+ bw := *(*[]uintptr)(unsafe.Pointer(&b))
+ n := len(b) / wordSize
+ for i := 0; i < n; i++ {
+ dw[i] = aw[i] ^ bw[i]
+ }
+}
+
+// BytesA XORs the len(a) bytes in a and b into a
+// destination slice.
+// The destination should have enough space.
+//
+// It's used for encoding small bytes slices (< dozens bytes),
+// and the slices may not be aligned to 8 bytes or 16 bytes.
+// If the length is big, it's better to use 'func Bytes(dst, a, b []byte)' instead
+// for gain better performance.
+func BytesA(dst, a, b []byte) {
+
+ n := len(a)
+ bytesN(dst[:n], a[:n], b[:n], n)
+}
+
+// BytesB XORs the len(b) bytes in a and b into a
+// destination slice.
+// The destination should have enough space.
+//
+// It's used for encoding small bytes slices (< dozens bytes),
+// and the slices may not be aligned to 8 bytes or 16 bytes.
+// If the length is big, it's better to use 'func Bytes(dst, a, b []byte)' instead
+// for gain better performance.
+func BytesB(dst, a, b []byte) {
+
+ n := len(b)
+ bytesN(dst[:n], a[:n], b[:n], n)
+}
+
+func bytesN(dst, a, b []byte, n int) {
+
+ switch {
+ case supportsUnaligned:
+ w := n / wordSize
+ if w > 0 {
+ dw := *(*[]uintptr)(unsafe.Pointer(&dst))
+ aw := *(*[]uintptr)(unsafe.Pointer(&a))
+ bw := *(*[]uintptr)(unsafe.Pointer(&b))
+ for i := 0; i < w; i++ {
+ dw[i] = aw[i] ^ bw[i]
+ }
+ }
+
+ for i := (n - n%wordSize); i < n; i++ {
+ dst[i] = a[i] ^ b[i]
+ }
+ default:
+ for i := 0; i < n; i++ {
+ dst[i] = a[i] ^ b[i]
+ }
+ }
+}
diff --git a/vendor/github.com/templexxx/xorsimd/xoravx2_amd64.s b/vendor/github.com/templexxx/xorsimd/xoravx2_amd64.s
new file mode 100644
index 0000000..23cf924
--- /dev/null
+++ b/vendor/github.com/templexxx/xorsimd/xoravx2_amd64.s
@@ -0,0 +1,124 @@
+// Copyright (c) 2019. Temple3x (temple3x@gmail.com)
+//
+// Use of this source code is governed by the MIT License
+// that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+#define dst BX // parity's address
+#define d2src SI // two-dimension src_slice's address
+#define csrc CX // cnt of src
+#define len DX // len of vect
+#define pos R8 // job position in vect
+
+#define csrc_tmp R9
+#define d2src_off R10
+#define src_tmp R11
+#define not_aligned_len R12
+#define src_val0 R13
+#define src_val1 R14
+
+// func encodeAVX2(dst []byte, src [][]byte)
+TEXT ·encodeAVX2(SB), NOSPLIT, $0
+ MOVQ d+0(FP), dst
+ MOVQ s+24(FP), d2src
+ MOVQ c+32(FP), csrc
+ MOVQ l+8(FP), len
+ TESTQ $127, len
+ JNZ not_aligned
+
+aligned:
+ MOVQ $0, pos
+
+loop128b:
+ MOVQ csrc, csrc_tmp // store src_cnt -> csrc_tmp
+ SUBQ $2, csrc_tmp
+ MOVQ $0, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp // get first src_vect's addr -> src_tmp
+ VMOVDQU (src_tmp)(pos*1), Y0
+ VMOVDQU 32(src_tmp)(pos*1), Y1
+ VMOVDQU 64(src_tmp)(pos*1), Y2
+ VMOVDQU 96(src_tmp)(pos*1), Y3
+
+next_vect:
+ ADDQ $24, d2src_off // len(slice) = 24
+ MOVQ (d2src)(d2src_off*1), src_tmp // next data_vect
+ VMOVDQU (src_tmp)(pos*1), Y4
+ VMOVDQU 32(src_tmp)(pos*1), Y5
+ VMOVDQU 64(src_tmp)(pos*1), Y6
+ VMOVDQU 96(src_tmp)(pos*1), Y7
+ VPXOR Y4, Y0, Y0
+ VPXOR Y5, Y1, Y1
+ VPXOR Y6, Y2, Y2
+ VPXOR Y7, Y3, Y3
+ SUBQ $1, csrc_tmp
+ JGE next_vect
+
+ VMOVDQU Y0, (dst)(pos*1)
+ VMOVDQU Y1, 32(dst)(pos*1)
+ VMOVDQU Y2, 64(dst)(pos*1)
+ VMOVDQU Y3, 96(dst)(pos*1)
+
+ ADDQ $128, pos
+ CMPQ len, pos
+ JNE loop128b
+ VZEROUPPER
+ RET
+
+loop_1b:
+ MOVQ csrc, csrc_tmp
+ MOVQ $0, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ SUBQ $2, csrc_tmp
+ MOVB -1(src_tmp)(len*1), src_val0 // encode from the end of src
+
+next_vect_1b:
+ ADDQ $24, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ MOVB -1(src_tmp)(len*1), src_val1
+ XORB src_val1, src_val0
+ SUBQ $1, csrc_tmp
+ JGE next_vect_1b
+
+ MOVB src_val0, -1(dst)(len*1)
+ SUBQ $1, len
+ TESTQ $7, len
+ JNZ loop_1b
+
+ CMPQ len, $0
+ JE ret
+ TESTQ $127, len
+ JZ aligned
+
+not_aligned:
+ TESTQ $7, len
+ JNE loop_1b
+ MOVQ len, not_aligned_len
+ ANDQ $127, not_aligned_len
+
+loop_8b:
+ MOVQ csrc, csrc_tmp
+ MOVQ $0, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ SUBQ $2, csrc_tmp
+ MOVQ -8(src_tmp)(len*1), src_val0
+
+next_vect_8b:
+ ADDQ $24, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ MOVQ -8(src_tmp)(len*1), src_val1
+ XORQ src_val1, src_val0
+ SUBQ $1, csrc_tmp
+ JGE next_vect_8b
+
+ MOVQ src_val0, -8(dst)(len*1)
+ SUBQ $8, len
+ SUBQ $8, not_aligned_len
+ JG loop_8b
+
+ CMPQ len, $128
+ JGE aligned
+ RET
+
+ret:
+ RET
diff --git a/vendor/github.com/templexxx/xorsimd/xoravx512_amd64.s b/vendor/github.com/templexxx/xorsimd/xoravx512_amd64.s
new file mode 100644
index 0000000..2ba6b75
--- /dev/null
+++ b/vendor/github.com/templexxx/xorsimd/xoravx512_amd64.s
@@ -0,0 +1,124 @@
+// Copyright (c) 2019. Temple3x (temple3x@gmail.com)
+//
+// Use of this source code is governed by the MIT License
+// that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+#define dst BX // parity's address
+#define d2src SI // two-dimension src_slice's address
+#define csrc CX // cnt of src
+#define len DX // len of vect
+#define pos R8 // job position in vect
+
+#define csrc_tmp R9
+#define d2src_off R10
+#define src_tmp R11
+#define not_aligned_len R12
+#define src_val0 R13
+#define src_val1 R14
+
+// func encodeAVX512(dst []byte, src [][]byte)
+TEXT ·encodeAVX512(SB), NOSPLIT, $0
+ MOVQ d+0(FP), dst
+ MOVQ src+24(FP), d2src
+ MOVQ c+32(FP), csrc
+ MOVQ l+8(FP), len
+ TESTQ $255, len
+ JNZ not_aligned
+
+aligned:
+ MOVQ $0, pos
+
+loop256b:
+ MOVQ csrc, csrc_tmp // store src_cnt -> csrc_tmp
+ SUBQ $2, csrc_tmp
+ MOVQ $0, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp // get first src_vect's addr -> src_tmp
+ VMOVDQU8 (src_tmp)(pos*1), Z0
+ VMOVDQU8 64(src_tmp)(pos*1), Z1
+ VMOVDQU8 128(src_tmp)(pos*1), Z2
+ VMOVDQU8 192(src_tmp)(pos*1), Z3
+
+next_vect:
+ ADDQ $24, d2src_off // len(slice) = 24
+ MOVQ (d2src)(d2src_off*1), src_tmp // next data_vect
+ VMOVDQU8 (src_tmp)(pos*1), Z4
+ VMOVDQU8 64(src_tmp)(pos*1), Z5
+ VMOVDQU8 128(src_tmp)(pos*1), Z6
+ VMOVDQU8 192(src_tmp)(pos*1), Z7
+ VPXORQ Z4, Z0, Z0
+ VPXORQ Z5, Z1, Z1
+ VPXORQ Z6, Z2, Z2
+ VPXORQ Z7, Z3, Z3
+ SUBQ $1, csrc_tmp
+ JGE next_vect
+
+ VMOVDQU8 Z0, (dst)(pos*1)
+ VMOVDQU8 Z1, 64(dst)(pos*1)
+ VMOVDQU8 Z2, 128(dst)(pos*1)
+ VMOVDQU8 Z3, 192(dst)(pos*1)
+
+ ADDQ $256, pos
+ CMPQ len, pos
+ JNE loop256b
+ VZEROUPPER
+ RET
+
+loop_1b:
+ MOVQ csrc, csrc_tmp
+ MOVQ $0, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ SUBQ $2, csrc_tmp
+ MOVB -1(src_tmp)(len*1), src_val0 // encode from the end of src
+
+next_vect_1b:
+ ADDQ $24, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ MOVB -1(src_tmp)(len*1), src_val1
+ XORB src_val1, src_val0
+ SUBQ $1, csrc_tmp
+ JGE next_vect_1b
+
+ MOVB src_val0, -1(dst)(len*1)
+ SUBQ $1, len
+ TESTQ $7, len
+ JNZ loop_1b
+
+ CMPQ len, $0
+ JE ret
+ TESTQ $255, len
+ JZ aligned
+
+not_aligned:
+ TESTQ $7, len
+ JNE loop_1b
+ MOVQ len, not_aligned_len
+ ANDQ $255, not_aligned_len
+
+loop_8b:
+ MOVQ csrc, csrc_tmp
+ MOVQ $0, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ SUBQ $2, csrc_tmp
+ MOVQ -8(src_tmp)(len*1), src_val0
+
+next_vect_8b:
+ ADDQ $24, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ MOVQ -8(src_tmp)(len*1), src_val1
+ XORQ src_val1, src_val0
+ SUBQ $1, csrc_tmp
+ JGE next_vect_8b
+
+ MOVQ src_val0, -8(dst)(len*1)
+ SUBQ $8, len
+ SUBQ $8, not_aligned_len
+ JG loop_8b
+
+ CMPQ len, $256
+ JGE aligned
+ RET
+
+ret:
+ RET
diff --git a/vendor/github.com/templexxx/xorsimd/xorbytes_amd64.s b/vendor/github.com/templexxx/xorsimd/xorbytes_amd64.s
new file mode 100644
index 0000000..8f67edd
--- /dev/null
+++ b/vendor/github.com/templexxx/xorsimd/xorbytes_amd64.s
@@ -0,0 +1,72 @@
+#include "textflag.h"
+
+// func bytesN(dst, a, b *byte, n int)
+TEXT ·bytesN(SB), NOSPLIT, $0
+ MOVQ d+0(FP), BX
+ MOVQ a+8(FP), SI
+ MOVQ b+16(FP), CX
+ MOVQ n+24(FP), DX
+ TESTQ $15, DX // AND 15 & len, if not zero jump to not_aligned.
+ JNZ not_aligned
+
+aligned:
+ MOVQ $0, AX // position in slices
+
+loop16b:
+ MOVOU (SI)(AX*1), X0 // XOR 16byte forwards.
+ MOVOU (CX)(AX*1), X1
+ PXOR X1, X0
+ MOVOU X0, (BX)(AX*1)
+ ADDQ $16, AX
+ CMPQ DX, AX
+ JNE loop16b
+ RET
+
+loop_1b:
+ SUBQ $1, DX // XOR 1byte backwards.
+ MOVB (SI)(DX*1), DI
+ MOVB (CX)(DX*1), AX
+ XORB AX, DI
+ MOVB DI, (BX)(DX*1)
+ TESTQ $7, DX // AND 7 & len, if not zero jump to loop_1b.
+ JNZ loop_1b
+ CMPQ DX, $0 // if len is 0, ret.
+ JE ret
+ TESTQ $15, DX // AND 15 & len, if zero jump to aligned.
+ JZ aligned
+
+not_aligned:
+ TESTQ $7, DX // AND $7 & len, if not zero jump to loop_1b.
+ JNE loop_1b
+ SUBQ $8, DX // XOR 8bytes backwards.
+ MOVQ (SI)(DX*1), DI
+ MOVQ (CX)(DX*1), AX
+ XORQ AX, DI
+ MOVQ DI, (BX)(DX*1)
+ CMPQ DX, $16 // if len is greater or equal 16 here, it must be aligned.
+ JGE aligned
+
+ret:
+ RET
+
+// func bytes8(dst, a, b *byte)
+TEXT ·bytes8(SB), NOSPLIT, $0
+ MOVQ d+0(FP), BX
+ MOVQ a+8(FP), SI
+ MOVQ b+16(FP), CX
+ MOVQ (SI), DI
+ MOVQ (CX), AX
+ XORQ AX, DI
+ MOVQ DI, (BX)
+ RET
+
+// func bytes16(dst, a, b *byte)
+TEXT ·bytes16(SB), NOSPLIT, $0
+ MOVQ d+0(FP), BX
+ MOVQ a+8(FP), SI
+ MOVQ b+16(FP), CX
+ MOVOU (SI), X0
+ MOVOU (CX), X1
+ PXOR X1, X0
+ MOVOU X0, (BX)
+ RET
diff --git a/vendor/github.com/templexxx/xorsimd/xorsse2_amd64.s b/vendor/github.com/templexxx/xorsimd/xorsse2_amd64.s
new file mode 100644
index 0000000..38df948
--- /dev/null
+++ b/vendor/github.com/templexxx/xorsimd/xorsse2_amd64.s
@@ -0,0 +1,123 @@
+// Copyright (c) 2019. Temple3x (temple3x@gmail.com)
+//
+// Use of this source code is governed by the MIT License
+// that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+#define dst BX // parity's address
+#define d2src SI // two-dimension src_slice's address
+#define csrc CX // cnt of src
+#define len DX // len of vect
+#define pos R8 // job position in vect
+
+#define csrc_tmp R9
+#define d2src_off R10
+#define src_tmp R11
+#define not_aligned_len R12
+#define src_val0 R13
+#define src_val1 R14
+
+// func encodeSSE2(dst []byte, src [][]byte)
+TEXT ·encodeSSE2(SB), NOSPLIT, $0
+ MOVQ d+0(FP), dst
+ MOVQ src+24(FP), d2src
+ MOVQ c+32(FP), csrc
+ MOVQ l+8(FP), len
+ TESTQ $63, len
+ JNZ not_aligned
+
+aligned:
+ MOVQ $0, pos
+
+loop64b:
+ MOVQ csrc, csrc_tmp
+ SUBQ $2, csrc_tmp
+ MOVQ $0, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ MOVOU (src_tmp)(pos*1), X0
+ MOVOU 16(src_tmp)(pos*1), X1
+ MOVOU 32(src_tmp)(pos*1), X2
+ MOVOU 48(src_tmp)(pos*1), X3
+
+next_vect:
+ ADDQ $24, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ MOVOU (src_tmp)(pos*1), X4
+ MOVOU 16(src_tmp)(pos*1), X5
+ MOVOU 32(src_tmp)(pos*1), X6
+ MOVOU 48(src_tmp)(pos*1), X7
+ PXOR X4, X0
+ PXOR X5, X1
+ PXOR X6, X2
+ PXOR X7, X3
+ SUBQ $1, csrc_tmp
+ JGE next_vect
+
+ MOVOU X0, (dst)(pos*1)
+ MOVOU X1, 16(dst)(pos*1)
+ MOVOU X2, 32(dst)(pos*1)
+ MOVOU X3, 48(dst)(pos*1)
+
+ ADDQ $64, pos
+ CMPQ len, pos
+ JNE loop64b
+ RET
+
+loop_1b:
+ MOVQ csrc, csrc_tmp
+ MOVQ $0, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ SUBQ $2, csrc_tmp
+ MOVB -1(src_tmp)(len*1), src_val0
+
+next_vect_1b:
+ ADDQ $24, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ MOVB -1(src_tmp)(len*1), src_val1
+ XORB src_val1, src_val0
+ SUBQ $1, csrc_tmp
+ JGE next_vect_1b
+
+ MOVB src_val0, -1(dst)(len*1)
+ SUBQ $1, len
+ TESTQ $7, len
+ JNZ loop_1b
+
+ CMPQ len, $0
+ JE ret
+ TESTQ $63, len
+ JZ aligned
+
+not_aligned:
+ TESTQ $7, len
+ JNE loop_1b
+ MOVQ len, not_aligned_len
+ ANDQ $63, not_aligned_len
+
+loop_8b:
+ MOVQ csrc, csrc_tmp
+ MOVQ $0, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ SUBQ $2, csrc_tmp
+ MOVQ -8(src_tmp)(len*1), src_val0
+
+next_vect_8b:
+ ADDQ $24, d2src_off
+ MOVQ (d2src)(d2src_off*1), src_tmp
+ MOVQ -8(src_tmp)(len*1), src_val1
+ XORQ src_val1, src_val0
+ SUBQ $1, csrc_tmp
+ JGE next_vect_8b
+
+ MOVQ src_val0, -8(dst)(len*1)
+ SUBQ $8, len
+ SUBQ $8, not_aligned_len
+ JG loop_8b
+
+ CMPQ len, $64
+ JGE aligned
+ RET
+
+ret:
+ RET
diff --git a/vendor/github.com/tjfoc/gmsm/LICENSE b/vendor/github.com/tjfoc/gmsm/LICENSE
new file mode 100644
index 0000000..8dada3e
--- /dev/null
+++ b/vendor/github.com/tjfoc/gmsm/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/tjfoc/gmsm/sm4/sm4.go b/vendor/github.com/tjfoc/gmsm/sm4/sm4.go
new file mode 100644
index 0000000..d97f35c
--- /dev/null
+++ b/vendor/github.com/tjfoc/gmsm/sm4/sm4.go
@@ -0,0 +1,350 @@
+/*
+Copyright Suzhou Tongji Fintech Research Institute 2017 All Rights Reserved.
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+sm4 acceration
+modified by Jack, 2017 Oct
+*/
+
+package sm4
+
+import (
+ "crypto/cipher"
+ "crypto/rand"
+ "crypto/x509"
+ "encoding/pem"
+ "errors"
+ "io/ioutil"
+ "os"
+ "strconv"
+)
+
+const BlockSize = 16
+
+type SM4Key []byte
+
+type KeySizeError int
+
+// Cipher is an instance of SM4 encryption.
+type Sm4Cipher struct {
+ subkeys []uint32
+ block1 []uint32
+ block2 []byte
+}
+
+// sm4密钥参量
+var fk = [4]uint32{
+ 0xa3b1bac6, 0x56aa3350, 0x677d9197, 0xb27022dc,
+}
+
+// sm4密钥参量
+var ck = [32]uint32{
+ 0x00070e15, 0x1c232a31, 0x383f464d, 0x545b6269,
+ 0x70777e85, 0x8c939aa1, 0xa8afb6bd, 0xc4cbd2d9,
+ 0xe0e7eef5, 0xfc030a11, 0x181f262d, 0x343b4249,
+ 0x50575e65, 0x6c737a81, 0x888f969d, 0xa4abb2b9,
+ 0xc0c7ced5, 0xdce3eaf1, 0xf8ff060d, 0x141b2229,
+ 0x30373e45, 0x4c535a61, 0x686f767d, 0x848b9299,
+ 0xa0a7aeb5, 0xbcc3cad1, 0xd8dfe6ed, 0xf4fb0209,
+ 0x10171e25, 0x2c333a41, 0x484f565d, 0x646b7279,
+}
+
+// sm4密钥参量
+var sbox = [256]uint8{
+ 0xd6, 0x90, 0xe9, 0xfe, 0xcc, 0xe1, 0x3d, 0xb7, 0x16, 0xb6, 0x14, 0xc2, 0x28, 0xfb, 0x2c, 0x05,
+ 0x2b, 0x67, 0x9a, 0x76, 0x2a, 0xbe, 0x04, 0xc3, 0xaa, 0x44, 0x13, 0x26, 0x49, 0x86, 0x06, 0x99,
+ 0x9c, 0x42, 0x50, 0xf4, 0x91, 0xef, 0x98, 0x7a, 0x33, 0x54, 0x0b, 0x43, 0xed, 0xcf, 0xac, 0x62,
+ 0xe4, 0xb3, 0x1c, 0xa9, 0xc9, 0x08, 0xe8, 0x95, 0x80, 0xdf, 0x94, 0xfa, 0x75, 0x8f, 0x3f, 0xa6,
+ 0x47, 0x07, 0xa7, 0xfc, 0xf3, 0x73, 0x17, 0xba, 0x83, 0x59, 0x3c, 0x19, 0xe6, 0x85, 0x4f, 0xa8,
+ 0x68, 0x6b, 0x81, 0xb2, 0x71, 0x64, 0xda, 0x8b, 0xf8, 0xeb, 0x0f, 0x4b, 0x70, 0x56, 0x9d, 0x35,
+ 0x1e, 0x24, 0x0e, 0x5e, 0x63, 0x58, 0xd1, 0xa2, 0x25, 0x22, 0x7c, 0x3b, 0x01, 0x21, 0x78, 0x87,
+ 0xd4, 0x00, 0x46, 0x57, 0x9f, 0xd3, 0x27, 0x52, 0x4c, 0x36, 0x02, 0xe7, 0xa0, 0xc4, 0xc8, 0x9e,
+ 0xea, 0xbf, 0x8a, 0xd2, 0x40, 0xc7, 0x38, 0xb5, 0xa3, 0xf7, 0xf2, 0xce, 0xf9, 0x61, 0x15, 0xa1,
+ 0xe0, 0xae, 0x5d, 0xa4, 0x9b, 0x34, 0x1a, 0x55, 0xad, 0x93, 0x32, 0x30, 0xf5, 0x8c, 0xb1, 0xe3,
+ 0x1d, 0xf6, 0xe2, 0x2e, 0x82, 0x66, 0xca, 0x60, 0xc0, 0x29, 0x23, 0xab, 0x0d, 0x53, 0x4e, 0x6f,
+ 0xd5, 0xdb, 0x37, 0x45, 0xde, 0xfd, 0x8e, 0x2f, 0x03, 0xff, 0x6a, 0x72, 0x6d, 0x6c, 0x5b, 0x51,
+ 0x8d, 0x1b, 0xaf, 0x92, 0xbb, 0xdd, 0xbc, 0x7f, 0x11, 0xd9, 0x5c, 0x41, 0x1f, 0x10, 0x5a, 0xd8,
+ 0x0a, 0xc1, 0x31, 0x88, 0xa5, 0xcd, 0x7b, 0xbd, 0x2d, 0x74, 0xd0, 0x12, 0xb8, 0xe5, 0xb4, 0xb0,
+ 0x89, 0x69, 0x97, 0x4a, 0x0c, 0x96, 0x77, 0x7e, 0x65, 0xb9, 0xf1, 0x09, 0xc5, 0x6e, 0xc6, 0x84,
+ 0x18, 0xf0, 0x7d, 0xec, 0x3a, 0xdc, 0x4d, 0x20, 0x79, 0xee, 0x5f, 0x3e, 0xd7, 0xcb, 0x39, 0x48,
+}
+
+var sbox0 = [256]uint32{
+ 0xd55b5b8e, 0x924242d0, 0xeaa7a74d, 0xfdfbfb06, 0xcf3333fc, 0xe2878765, 0x3df4f4c9, 0xb5dede6b, 0x1658584e, 0xb4dada6e, 0x14505044, 0xc10b0bca, 0x28a0a088, 0xf8efef17, 0x2cb0b09c, 0x05141411,
+ 0x2bacac87, 0x669d9dfb, 0x986a6af2, 0x77d9d9ae, 0x2aa8a882, 0xbcfafa46, 0x04101014, 0xc00f0fcf, 0xa8aaaa02, 0x45111154, 0x134c4c5f, 0x269898be, 0x4825256d, 0x841a1a9e, 0x0618181e, 0x9b6666fd,
+ 0x9e7272ec, 0x4309094a, 0x51414110, 0xf7d3d324, 0x934646d5, 0xecbfbf53, 0x9a6262f8, 0x7be9e992, 0x33ccccff, 0x55515104, 0x0b2c2c27, 0x420d0d4f, 0xeeb7b759, 0xcc3f3ff3, 0xaeb2b21c, 0x638989ea,
+ 0xe7939374, 0xb1cece7f, 0x1c70706c, 0xaba6a60d, 0xca2727ed, 0x08202028, 0xeba3a348, 0x975656c1, 0x82020280, 0xdc7f7fa3, 0x965252c4, 0xf9ebeb12, 0x74d5d5a1, 0x8d3e3eb3, 0x3ffcfcc3, 0xa49a9a3e,
+ 0x461d1d5b, 0x071c1c1b, 0xa59e9e3b, 0xfff3f30c, 0xf0cfcf3f, 0x72cdcdbf, 0x175c5c4b, 0xb8eaea52, 0x810e0e8f, 0x5865653d, 0x3cf0f0cc, 0x1964647d, 0xe59b9b7e, 0x87161691, 0x4e3d3d73, 0xaaa2a208,
+ 0x69a1a1c8, 0x6aadadc7, 0x83060685, 0xb0caca7a, 0x70c5c5b5, 0x659191f4, 0xd96b6bb2, 0x892e2ea7, 0xfbe3e318, 0xe8afaf47, 0x0f3c3c33, 0x4a2d2d67, 0x71c1c1b0, 0x5759590e, 0x9f7676e9, 0x35d4d4e1,
+ 0x1e787866, 0x249090b4, 0x0e383836, 0x5f797926, 0x628d8def, 0x59616138, 0xd2474795, 0xa08a8a2a, 0x259494b1, 0x228888aa, 0x7df1f18c, 0x3bececd7, 0x01040405, 0x218484a5, 0x79e1e198, 0x851e1e9b,
+ 0xd7535384, 0x00000000, 0x4719195e, 0x565d5d0b, 0x9d7e7ee3, 0xd04f4f9f, 0x279c9cbb, 0x5349491a, 0x4d31317c, 0x36d8d8ee, 0x0208080a, 0xe49f9f7b, 0xa2828220, 0xc71313d4, 0xcb2323e8, 0x9c7a7ae6,
+ 0xe9abab42, 0xbdfefe43, 0x882a2aa2, 0xd14b4b9a, 0x41010140, 0xc41f1fdb, 0x38e0e0d8, 0xb7d6d661, 0xa18e8e2f, 0xf4dfdf2b, 0xf1cbcb3a, 0xcd3b3bf6, 0xfae7e71d, 0x608585e5, 0x15545441, 0xa3868625,
+ 0xe3838360, 0xacbaba16, 0x5c757529, 0xa6929234, 0x996e6ef7, 0x34d0d0e4, 0x1a686872, 0x54555501, 0xafb6b619, 0x914e4edf, 0x32c8c8fa, 0x30c0c0f0, 0xf6d7d721, 0x8e3232bc, 0xb3c6c675, 0xe08f8f6f,
+ 0x1d747469, 0xf5dbdb2e, 0xe18b8b6a, 0x2eb8b896, 0x800a0a8a, 0x679999fe, 0xc92b2be2, 0x618181e0, 0xc30303c0, 0x29a4a48d, 0x238c8caf, 0xa9aeae07, 0x0d343439, 0x524d4d1f, 0x4f393976, 0x6ebdbdd3,
+ 0xd6575781, 0xd86f6fb7, 0x37dcdceb, 0x44151551, 0xdd7b7ba6, 0xfef7f709, 0x8c3a3ab6, 0x2fbcbc93, 0x030c0c0f, 0xfcffff03, 0x6ba9a9c2, 0x73c9c9ba, 0x6cb5b5d9, 0x6db1b1dc, 0x5a6d6d37, 0x50454515,
+ 0x8f3636b9, 0x1b6c6c77, 0xadbebe13, 0x904a4ada, 0xb9eeee57, 0xde7777a9, 0xbef2f24c, 0x7efdfd83, 0x11444455, 0xda6767bd, 0x5d71712c, 0x40050545, 0x1f7c7c63, 0x10404050, 0x5b696932, 0xdb6363b8,
+ 0x0a282822, 0xc20707c5, 0x31c4c4f5, 0x8a2222a8, 0xa7969631, 0xce3737f9, 0x7aeded97, 0xbff6f649, 0x2db4b499, 0x75d1d1a4, 0xd3434390, 0x1248485a, 0xbae2e258, 0xe6979771, 0xb6d2d264, 0xb2c2c270,
+ 0x8b2626ad, 0x68a5a5cd, 0x955e5ecb, 0x4b292962, 0x0c30303c, 0x945a5ace, 0x76ddddab, 0x7ff9f986, 0x649595f1, 0xbbe6e65d, 0xf2c7c735, 0x0924242d, 0xc61717d1, 0x6fb9b9d6, 0xc51b1bde, 0x86121294,
+ 0x18606078, 0xf3c3c330, 0x7cf5f589, 0xefb3b35c, 0x3ae8e8d2, 0xdf7373ac, 0x4c353579, 0x208080a0, 0x78e5e59d, 0xedbbbb56, 0x5e7d7d23, 0x3ef8f8c6, 0xd45f5f8b, 0xc82f2fe7, 0x39e4e4dd, 0x49212168,
+}
+
+var sbox1 = [256]uint32{
+ 0x5b5b8ed5, 0x4242d092, 0xa7a74dea, 0xfbfb06fd, 0x3333fccf, 0x878765e2, 0xf4f4c93d, 0xdede6bb5, 0x58584e16, 0xdada6eb4, 0x50504414, 0x0b0bcac1, 0xa0a08828, 0xefef17f8, 0xb0b09c2c, 0x14141105,
+ 0xacac872b, 0x9d9dfb66, 0x6a6af298, 0xd9d9ae77, 0xa8a8822a, 0xfafa46bc, 0x10101404, 0x0f0fcfc0, 0xaaaa02a8, 0x11115445, 0x4c4c5f13, 0x9898be26, 0x25256d48, 0x1a1a9e84, 0x18181e06, 0x6666fd9b,
+ 0x7272ec9e, 0x09094a43, 0x41411051, 0xd3d324f7, 0x4646d593, 0xbfbf53ec, 0x6262f89a, 0xe9e9927b, 0xccccff33, 0x51510455, 0x2c2c270b, 0x0d0d4f42, 0xb7b759ee, 0x3f3ff3cc, 0xb2b21cae, 0x8989ea63,
+ 0x939374e7, 0xcece7fb1, 0x70706c1c, 0xa6a60dab, 0x2727edca, 0x20202808, 0xa3a348eb, 0x5656c197, 0x02028082, 0x7f7fa3dc, 0x5252c496, 0xebeb12f9, 0xd5d5a174, 0x3e3eb38d, 0xfcfcc33f, 0x9a9a3ea4,
+ 0x1d1d5b46, 0x1c1c1b07, 0x9e9e3ba5, 0xf3f30cff, 0xcfcf3ff0, 0xcdcdbf72, 0x5c5c4b17, 0xeaea52b8, 0x0e0e8f81, 0x65653d58, 0xf0f0cc3c, 0x64647d19, 0x9b9b7ee5, 0x16169187, 0x3d3d734e, 0xa2a208aa,
+ 0xa1a1c869, 0xadadc76a, 0x06068583, 0xcaca7ab0, 0xc5c5b570, 0x9191f465, 0x6b6bb2d9, 0x2e2ea789, 0xe3e318fb, 0xafaf47e8, 0x3c3c330f, 0x2d2d674a, 0xc1c1b071, 0x59590e57, 0x7676e99f, 0xd4d4e135,
+ 0x7878661e, 0x9090b424, 0x3838360e, 0x7979265f, 0x8d8def62, 0x61613859, 0x474795d2, 0x8a8a2aa0, 0x9494b125, 0x8888aa22, 0xf1f18c7d, 0xececd73b, 0x04040501, 0x8484a521, 0xe1e19879, 0x1e1e9b85,
+ 0x535384d7, 0x00000000, 0x19195e47, 0x5d5d0b56, 0x7e7ee39d, 0x4f4f9fd0, 0x9c9cbb27, 0x49491a53, 0x31317c4d, 0xd8d8ee36, 0x08080a02, 0x9f9f7be4, 0x828220a2, 0x1313d4c7, 0x2323e8cb, 0x7a7ae69c,
+ 0xabab42e9, 0xfefe43bd, 0x2a2aa288, 0x4b4b9ad1, 0x01014041, 0x1f1fdbc4, 0xe0e0d838, 0xd6d661b7, 0x8e8e2fa1, 0xdfdf2bf4, 0xcbcb3af1, 0x3b3bf6cd, 0xe7e71dfa, 0x8585e560, 0x54544115, 0x868625a3,
+ 0x838360e3, 0xbaba16ac, 0x7575295c, 0x929234a6, 0x6e6ef799, 0xd0d0e434, 0x6868721a, 0x55550154, 0xb6b619af, 0x4e4edf91, 0xc8c8fa32, 0xc0c0f030, 0xd7d721f6, 0x3232bc8e, 0xc6c675b3, 0x8f8f6fe0,
+ 0x7474691d, 0xdbdb2ef5, 0x8b8b6ae1, 0xb8b8962e, 0x0a0a8a80, 0x9999fe67, 0x2b2be2c9, 0x8181e061, 0x0303c0c3, 0xa4a48d29, 0x8c8caf23, 0xaeae07a9, 0x3434390d, 0x4d4d1f52, 0x3939764f, 0xbdbdd36e,
+ 0x575781d6, 0x6f6fb7d8, 0xdcdceb37, 0x15155144, 0x7b7ba6dd, 0xf7f709fe, 0x3a3ab68c, 0xbcbc932f, 0x0c0c0f03, 0xffff03fc, 0xa9a9c26b, 0xc9c9ba73, 0xb5b5d96c, 0xb1b1dc6d, 0x6d6d375a, 0x45451550,
+ 0x3636b98f, 0x6c6c771b, 0xbebe13ad, 0x4a4ada90, 0xeeee57b9, 0x7777a9de, 0xf2f24cbe, 0xfdfd837e, 0x44445511, 0x6767bdda, 0x71712c5d, 0x05054540, 0x7c7c631f, 0x40405010, 0x6969325b, 0x6363b8db,
+ 0x2828220a, 0x0707c5c2, 0xc4c4f531, 0x2222a88a, 0x969631a7, 0x3737f9ce, 0xeded977a, 0xf6f649bf, 0xb4b4992d, 0xd1d1a475, 0x434390d3, 0x48485a12, 0xe2e258ba, 0x979771e6, 0xd2d264b6, 0xc2c270b2,
+ 0x2626ad8b, 0xa5a5cd68, 0x5e5ecb95, 0x2929624b, 0x30303c0c, 0x5a5ace94, 0xddddab76, 0xf9f9867f, 0x9595f164, 0xe6e65dbb, 0xc7c735f2, 0x24242d09, 0x1717d1c6, 0xb9b9d66f, 0x1b1bdec5, 0x12129486,
+ 0x60607818, 0xc3c330f3, 0xf5f5897c, 0xb3b35cef, 0xe8e8d23a, 0x7373acdf, 0x3535794c, 0x8080a020, 0xe5e59d78, 0xbbbb56ed, 0x7d7d235e, 0xf8f8c63e, 0x5f5f8bd4, 0x2f2fe7c8, 0xe4e4dd39, 0x21216849,
+}
+
+var sbox2 = [256]uint32{
+ 0x5b8ed55b, 0x42d09242, 0xa74deaa7, 0xfb06fdfb, 0x33fccf33, 0x8765e287, 0xf4c93df4, 0xde6bb5de, 0x584e1658, 0xda6eb4da, 0x50441450, 0x0bcac10b, 0xa08828a0, 0xef17f8ef, 0xb09c2cb0, 0x14110514,
+ 0xac872bac, 0x9dfb669d, 0x6af2986a, 0xd9ae77d9, 0xa8822aa8, 0xfa46bcfa, 0x10140410, 0x0fcfc00f, 0xaa02a8aa, 0x11544511, 0x4c5f134c, 0x98be2698, 0x256d4825, 0x1a9e841a, 0x181e0618, 0x66fd9b66,
+ 0x72ec9e72, 0x094a4309, 0x41105141, 0xd324f7d3, 0x46d59346, 0xbf53ecbf, 0x62f89a62, 0xe9927be9, 0xccff33cc, 0x51045551, 0x2c270b2c, 0x0d4f420d, 0xb759eeb7, 0x3ff3cc3f, 0xb21caeb2, 0x89ea6389,
+ 0x9374e793, 0xce7fb1ce, 0x706c1c70, 0xa60daba6, 0x27edca27, 0x20280820, 0xa348eba3, 0x56c19756, 0x02808202, 0x7fa3dc7f, 0x52c49652, 0xeb12f9eb, 0xd5a174d5, 0x3eb38d3e, 0xfcc33ffc, 0x9a3ea49a,
+ 0x1d5b461d, 0x1c1b071c, 0x9e3ba59e, 0xf30cfff3, 0xcf3ff0cf, 0xcdbf72cd, 0x5c4b175c, 0xea52b8ea, 0x0e8f810e, 0x653d5865, 0xf0cc3cf0, 0x647d1964, 0x9b7ee59b, 0x16918716, 0x3d734e3d, 0xa208aaa2,
+ 0xa1c869a1, 0xadc76aad, 0x06858306, 0xca7ab0ca, 0xc5b570c5, 0x91f46591, 0x6bb2d96b, 0x2ea7892e, 0xe318fbe3, 0xaf47e8af, 0x3c330f3c, 0x2d674a2d, 0xc1b071c1, 0x590e5759, 0x76e99f76, 0xd4e135d4,
+ 0x78661e78, 0x90b42490, 0x38360e38, 0x79265f79, 0x8def628d, 0x61385961, 0x4795d247, 0x8a2aa08a, 0x94b12594, 0x88aa2288, 0xf18c7df1, 0xecd73bec, 0x04050104, 0x84a52184, 0xe19879e1, 0x1e9b851e,
+ 0x5384d753, 0x00000000, 0x195e4719, 0x5d0b565d, 0x7ee39d7e, 0x4f9fd04f, 0x9cbb279c, 0x491a5349, 0x317c4d31, 0xd8ee36d8, 0x080a0208, 0x9f7be49f, 0x8220a282, 0x13d4c713, 0x23e8cb23, 0x7ae69c7a,
+ 0xab42e9ab, 0xfe43bdfe, 0x2aa2882a, 0x4b9ad14b, 0x01404101, 0x1fdbc41f, 0xe0d838e0, 0xd661b7d6, 0x8e2fa18e, 0xdf2bf4df, 0xcb3af1cb, 0x3bf6cd3b, 0xe71dfae7, 0x85e56085, 0x54411554, 0x8625a386,
+ 0x8360e383, 0xba16acba, 0x75295c75, 0x9234a692, 0x6ef7996e, 0xd0e434d0, 0x68721a68, 0x55015455, 0xb619afb6, 0x4edf914e, 0xc8fa32c8, 0xc0f030c0, 0xd721f6d7, 0x32bc8e32, 0xc675b3c6, 0x8f6fe08f,
+ 0x74691d74, 0xdb2ef5db, 0x8b6ae18b, 0xb8962eb8, 0x0a8a800a, 0x99fe6799, 0x2be2c92b, 0x81e06181, 0x03c0c303, 0xa48d29a4, 0x8caf238c, 0xae07a9ae, 0x34390d34, 0x4d1f524d, 0x39764f39, 0xbdd36ebd,
+ 0x5781d657, 0x6fb7d86f, 0xdceb37dc, 0x15514415, 0x7ba6dd7b, 0xf709fef7, 0x3ab68c3a, 0xbc932fbc, 0x0c0f030c, 0xff03fcff, 0xa9c26ba9, 0xc9ba73c9, 0xb5d96cb5, 0xb1dc6db1, 0x6d375a6d, 0x45155045,
+ 0x36b98f36, 0x6c771b6c, 0xbe13adbe, 0x4ada904a, 0xee57b9ee, 0x77a9de77, 0xf24cbef2, 0xfd837efd, 0x44551144, 0x67bdda67, 0x712c5d71, 0x05454005, 0x7c631f7c, 0x40501040, 0x69325b69, 0x63b8db63,
+ 0x28220a28, 0x07c5c207, 0xc4f531c4, 0x22a88a22, 0x9631a796, 0x37f9ce37, 0xed977aed, 0xf649bff6, 0xb4992db4, 0xd1a475d1, 0x4390d343, 0x485a1248, 0xe258bae2, 0x9771e697, 0xd264b6d2, 0xc270b2c2,
+ 0x26ad8b26, 0xa5cd68a5, 0x5ecb955e, 0x29624b29, 0x303c0c30, 0x5ace945a, 0xddab76dd, 0xf9867ff9, 0x95f16495, 0xe65dbbe6, 0xc735f2c7, 0x242d0924, 0x17d1c617, 0xb9d66fb9, 0x1bdec51b, 0x12948612,
+ 0x60781860, 0xc330f3c3, 0xf5897cf5, 0xb35cefb3, 0xe8d23ae8, 0x73acdf73, 0x35794c35, 0x80a02080, 0xe59d78e5, 0xbb56edbb, 0x7d235e7d, 0xf8c63ef8, 0x5f8bd45f, 0x2fe7c82f, 0xe4dd39e4, 0x21684921,
+}
+
+var sbox3 = [256]uint32{
+ 0x8ed55b5b, 0xd0924242, 0x4deaa7a7, 0x06fdfbfb, 0xfccf3333, 0x65e28787, 0xc93df4f4, 0x6bb5dede, 0x4e165858, 0x6eb4dada, 0x44145050, 0xcac10b0b, 0x8828a0a0, 0x17f8efef, 0x9c2cb0b0, 0x11051414,
+ 0x872bacac, 0xfb669d9d, 0xf2986a6a, 0xae77d9d9, 0x822aa8a8, 0x46bcfafa, 0x14041010, 0xcfc00f0f, 0x02a8aaaa, 0x54451111, 0x5f134c4c, 0xbe269898, 0x6d482525, 0x9e841a1a, 0x1e061818, 0xfd9b6666,
+ 0xec9e7272, 0x4a430909, 0x10514141, 0x24f7d3d3, 0xd5934646, 0x53ecbfbf, 0xf89a6262, 0x927be9e9, 0xff33cccc, 0x04555151, 0x270b2c2c, 0x4f420d0d, 0x59eeb7b7, 0xf3cc3f3f, 0x1caeb2b2, 0xea638989,
+ 0x74e79393, 0x7fb1cece, 0x6c1c7070, 0x0daba6a6, 0xedca2727, 0x28082020, 0x48eba3a3, 0xc1975656, 0x80820202, 0xa3dc7f7f, 0xc4965252, 0x12f9ebeb, 0xa174d5d5, 0xb38d3e3e, 0xc33ffcfc, 0x3ea49a9a,
+ 0x5b461d1d, 0x1b071c1c, 0x3ba59e9e, 0x0cfff3f3, 0x3ff0cfcf, 0xbf72cdcd, 0x4b175c5c, 0x52b8eaea, 0x8f810e0e, 0x3d586565, 0xcc3cf0f0, 0x7d196464, 0x7ee59b9b, 0x91871616, 0x734e3d3d, 0x08aaa2a2,
+ 0xc869a1a1, 0xc76aadad, 0x85830606, 0x7ab0caca, 0xb570c5c5, 0xf4659191, 0xb2d96b6b, 0xa7892e2e, 0x18fbe3e3, 0x47e8afaf, 0x330f3c3c, 0x674a2d2d, 0xb071c1c1, 0x0e575959, 0xe99f7676, 0xe135d4d4,
+ 0x661e7878, 0xb4249090, 0x360e3838, 0x265f7979, 0xef628d8d, 0x38596161, 0x95d24747, 0x2aa08a8a, 0xb1259494, 0xaa228888, 0x8c7df1f1, 0xd73becec, 0x05010404, 0xa5218484, 0x9879e1e1, 0x9b851e1e,
+ 0x84d75353, 0x00000000, 0x5e471919, 0x0b565d5d, 0xe39d7e7e, 0x9fd04f4f, 0xbb279c9c, 0x1a534949, 0x7c4d3131, 0xee36d8d8, 0x0a020808, 0x7be49f9f, 0x20a28282, 0xd4c71313, 0xe8cb2323, 0xe69c7a7a,
+ 0x42e9abab, 0x43bdfefe, 0xa2882a2a, 0x9ad14b4b, 0x40410101, 0xdbc41f1f, 0xd838e0e0, 0x61b7d6d6, 0x2fa18e8e, 0x2bf4dfdf, 0x3af1cbcb, 0xf6cd3b3b, 0x1dfae7e7, 0xe5608585, 0x41155454, 0x25a38686,
+ 0x60e38383, 0x16acbaba, 0x295c7575, 0x34a69292, 0xf7996e6e, 0xe434d0d0, 0x721a6868, 0x01545555, 0x19afb6b6, 0xdf914e4e, 0xfa32c8c8, 0xf030c0c0, 0x21f6d7d7, 0xbc8e3232, 0x75b3c6c6, 0x6fe08f8f,
+ 0x691d7474, 0x2ef5dbdb, 0x6ae18b8b, 0x962eb8b8, 0x8a800a0a, 0xfe679999, 0xe2c92b2b, 0xe0618181, 0xc0c30303, 0x8d29a4a4, 0xaf238c8c, 0x07a9aeae, 0x390d3434, 0x1f524d4d, 0x764f3939, 0xd36ebdbd,
+ 0x81d65757, 0xb7d86f6f, 0xeb37dcdc, 0x51441515, 0xa6dd7b7b, 0x09fef7f7, 0xb68c3a3a, 0x932fbcbc, 0x0f030c0c, 0x03fcffff, 0xc26ba9a9, 0xba73c9c9, 0xd96cb5b5, 0xdc6db1b1, 0x375a6d6d, 0x15504545,
+ 0xb98f3636, 0x771b6c6c, 0x13adbebe, 0xda904a4a, 0x57b9eeee, 0xa9de7777, 0x4cbef2f2, 0x837efdfd, 0x55114444, 0xbdda6767, 0x2c5d7171, 0x45400505, 0x631f7c7c, 0x50104040, 0x325b6969, 0xb8db6363,
+ 0x220a2828, 0xc5c20707, 0xf531c4c4, 0xa88a2222, 0x31a79696, 0xf9ce3737, 0x977aeded, 0x49bff6f6, 0x992db4b4, 0xa475d1d1, 0x90d34343, 0x5a124848, 0x58bae2e2, 0x71e69797, 0x64b6d2d2, 0x70b2c2c2,
+ 0xad8b2626, 0xcd68a5a5, 0xcb955e5e, 0x624b2929, 0x3c0c3030, 0xce945a5a, 0xab76dddd, 0x867ff9f9, 0xf1649595, 0x5dbbe6e6, 0x35f2c7c7, 0x2d092424, 0xd1c61717, 0xd66fb9b9, 0xdec51b1b, 0x94861212,
+ 0x78186060, 0x30f3c3c3, 0x897cf5f5, 0x5cefb3b3, 0xd23ae8e8, 0xacdf7373, 0x794c3535, 0xa0208080, 0x9d78e5e5, 0x56edbbbb, 0x235e7d7d, 0xc63ef8f8, 0x8bd45f5f, 0xe7c82f2f, 0xdd39e4e4, 0x68492121,
+}
+
+func rl(x uint32, i uint8) uint32 { return (x << (i % 32)) | (x >> (32 - (i % 32))) }
+
+func l0(b uint32) uint32 { return b ^ rl(b, 13) ^ rl(b, 23) }
+
+func feistel0(x0, x1, x2, x3, rk uint32) uint32 { return x0 ^ l0(p(x1^x2^x3^rk)) }
+
+//非线性变换τ(.)
+func p(a uint32) uint32 {
+ return (uint32(sbox[a>>24]) << 24) ^ (uint32(sbox[(a>>16)&0xff]) << 16) ^ (uint32(sbox[(a>>8)&0xff]) << 8) ^ uint32(sbox[(a)&0xff])
+}
+
+func permuteInitialBlock(b []uint32, block []byte) {
+ for i := 0; i < 4; i++ {
+ b[i] = (uint32(block[i*4]) << 24) | (uint32(block[i*4+1]) << 16) |
+ (uint32(block[i*4+2]) << 8) | (uint32(block[i*4+3]))
+ }
+}
+
+func permuteFinalBlock(b []byte, block []uint32) {
+ for i := 0; i < 4; i++ {
+ b[i*4] = uint8(block[i] >> 24)
+ b[i*4+1] = uint8(block[i] >> 16)
+ b[i*4+2] = uint8(block[i] >> 8)
+ b[i*4+3] = uint8(block[i])
+ }
+}
+
+//修改后的加密核心函数
+func cryptBlock(subkeys []uint32, b []uint32, r []byte, dst, src []byte, decrypt bool) {
+ permuteInitialBlock(b, src)
+
+ // bounds check elimination in major encryption loop
+ // https://go101.org/article/bounds-check-elimination.html
+ _ = b[3]
+ if decrypt {
+ for i := 0; i < 8; i++ {
+ s := subkeys[31-4*i-3 : 31-4*i-3+4]
+ x := b[1] ^ b[2] ^ b[3] ^ s[3]
+ b[0] = b[0] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff]
+ x = b[0] ^ b[2] ^ b[3] ^ s[2]
+ b[1] = b[1] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff]
+ x = b[0] ^ b[1] ^ b[3] ^ s[1]
+ b[2] = b[2] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff]
+ x = b[1] ^ b[2] ^ b[0] ^ s[0]
+ b[3] = b[3] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff]
+ }
+ } else {
+ for i := 0; i < 8; i++ {
+ s := subkeys[4*i : 4*i+4]
+ x := b[1] ^ b[2] ^ b[3] ^ s[0]
+ b[0] = b[0] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff]
+ x = b[0] ^ b[2] ^ b[3] ^ s[1]
+ b[1] = b[1] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff]
+ x = b[0] ^ b[1] ^ b[3] ^ s[2]
+ b[2] = b[2] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff]
+ x = b[1] ^ b[2] ^ b[0] ^ s[3]
+ b[3] = b[3] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff]
+ }
+ }
+ b[0], b[1], b[2], b[3] = b[3], b[2], b[1], b[0]
+ permuteFinalBlock(r, b)
+ copy(dst, r)
+}
+
+func generateSubKeys(key []byte) []uint32 {
+ subkeys := make([]uint32, 32)
+ b := make([]uint32, 4)
+ permuteInitialBlock(b, key)
+ b[0] ^= fk[0]
+ b[1] ^= fk[1]
+ b[2] ^= fk[2]
+ b[3] ^= fk[3]
+ for i := 0; i < 32; i++ {
+ subkeys[i] = feistel0(b[0], b[1], b[2], b[3], ck[i])
+ b[0], b[1], b[2], b[3] = b[1], b[2], b[3], subkeys[i]
+ }
+ return subkeys
+}
+
+func EncryptBlock(key SM4Key, dst, src []byte) {
+ subkeys := generateSubKeys(key)
+ cryptBlock(subkeys, make([]uint32, 4), make([]byte, 16), dst, src, false)
+}
+
+func DecryptBlock(key SM4Key, dst, src []byte) {
+ subkeys := generateSubKeys(key)
+ cryptBlock(subkeys, make([]uint32, 4), make([]byte, 16), dst, src, true)
+}
+
+func ReadKeyFromMem(data []byte, pwd []byte) (SM4Key, error) {
+ block, _ := pem.Decode(data)
+ if block == nil {
+ return nil, errors.New("SM4: pem decode failed")
+ }
+ if x509.IsEncryptedPEMBlock(block) {
+ if block.Type != "SM4 ENCRYPTED KEY" {
+ return nil, errors.New("SM4: unknown type")
+ }
+ if pwd == nil {
+ return nil, errors.New("SM4: need passwd")
+ }
+ data, err := x509.DecryptPEMBlock(block, pwd)
+ if err != nil {
+ return nil, err
+ }
+ return data, nil
+ }
+ if block.Type != "SM4 KEY" {
+ return nil, errors.New("SM4: unknown type")
+ }
+ return block.Bytes, nil
+}
+
+func ReadKeyFromPem(FileName string, pwd []byte) (SM4Key, error) {
+ data, err := ioutil.ReadFile(FileName)
+ if err != nil {
+ return nil, err
+ }
+ return ReadKeyFromMem(data, pwd)
+}
+
+func WriteKeytoMem(key SM4Key, pwd []byte) ([]byte, error) {
+ if pwd != nil {
+ block, err := x509.EncryptPEMBlock(rand.Reader,
+ "SM4 ENCRYPTED KEY", key, pwd, x509.PEMCipherAES256)
+ if err != nil {
+ return nil, err
+ }
+ return pem.EncodeToMemory(block), nil
+ } else {
+ block := &pem.Block{
+ Type: "SM4 KEY",
+ Bytes: key,
+ }
+ return pem.EncodeToMemory(block), nil
+ }
+}
+
+func WriteKeyToPem(FileName string, key SM4Key, pwd []byte) (bool, error) {
+ var block *pem.Block
+
+ if pwd != nil {
+ var err error
+ block, err = x509.EncryptPEMBlock(rand.Reader,
+ "SM4 ENCRYPTED KEY", key, pwd, x509.PEMCipherAES256)
+ if err != nil {
+ return false, err
+ }
+ } else {
+ block = &pem.Block{
+ Type: "SM4 KEY",
+ Bytes: key,
+ }
+ }
+ file, err := os.Create(FileName)
+ if err != nil {
+ return false, err
+ }
+ defer file.Close()
+ err = pem.Encode(file, block)
+ if err != nil {
+ return false, nil
+ }
+ return true, nil
+}
+
+func (k KeySizeError) Error() string {
+ return "SM4: invalid key size " + strconv.Itoa(int(k))
+}
+
+// NewCipher creates and returns a new cipher.Block.
+func NewCipher(key []byte) (cipher.Block, error) {
+ if len(key) != BlockSize {
+ return nil, KeySizeError(len(key))
+ }
+ c := new(Sm4Cipher)
+ c.subkeys = generateSubKeys(key)
+ c.block1 = make([]uint32, 4)
+ c.block2 = make([]byte, 16)
+ return c, nil
+}
+
+func (c *Sm4Cipher) BlockSize() int {
+ return BlockSize
+}
+
+func (c *Sm4Cipher) Encrypt(dst, src []byte) {
+ cryptBlock(c.subkeys, c.block1, c.block2, dst, src, false)
+}
+
+func (c *Sm4Cipher) Decrypt(dst, src []byte) {
+ cryptBlock(c.subkeys, c.block1, c.block2, dst, src, true)
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/.gitignore b/vendor/github.com/xtaci/kcp-go/v5/.gitignore
new file mode 100644
index 0000000..2f4178c
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/.gitignore
@@ -0,0 +1,25 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+/vendor/
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof
diff --git a/vendor/github.com/xtaci/kcp-go/v5/.travis.yml b/vendor/github.com/xtaci/kcp-go/v5/.travis.yml
new file mode 100644
index 0000000..0e7c4ac
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/.travis.yml
@@ -0,0 +1,20 @@
+language: go
+go:
+ - 1.11.x
+ - 1.12.x
+ - 1.13.x
+
+env:
+ - GO111MODULE=on
+
+before_install:
+ - go get -t -v ./...
+
+install:
+ - go get github.com/xtaci/kcp-go
+
+script:
+ - go test -coverprofile=coverage.txt -covermode=atomic -bench . -timeout 10m
+
+after_success:
+ - bash <(curl -s https://codecov.io/bash)
diff --git a/vendor/github.com/xtaci/kcp-go/v5/LICENSE b/vendor/github.com/xtaci/kcp-go/v5/LICENSE
new file mode 100644
index 0000000..8294d13
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Daniel Fu
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/vendor/github.com/xtaci/kcp-go/v5/README.md b/vendor/github.com/xtaci/kcp-go/v5/README.md
new file mode 100644
index 0000000..d2273f8
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/README.md
@@ -0,0 +1,285 @@
+<img src="kcp-go.png" alt="kcp-go" height="50px" />
+
+
+[![GoDoc][1]][2] [![Powered][9]][10] [![MIT licensed][11]][12] [![Build Status][3]][4] [![Go Report Card][5]][6] [![Coverage Statusd][7]][8] [![Sourcegraph][13]][14]
+
+[1]: https://godoc.org/github.com/xtaci/kcp-go?status.svg
+[2]: https://pkg.go.dev/github.com/xtaci/kcp-go
+[3]: https://travis-ci.org/xtaci/kcp-go.svg?branch=master
+[4]: https://travis-ci.org/xtaci/kcp-go
+[5]: https://goreportcard.com/badge/github.com/xtaci/kcp-go
+[6]: https://goreportcard.com/report/github.com/xtaci/kcp-go
+[7]: https://codecov.io/gh/xtaci/kcp-go/branch/master/graph/badge.svg
+[8]: https://codecov.io/gh/xtaci/kcp-go
+[9]: https://img.shields.io/badge/KCP-Powered-blue.svg
+[10]: https://github.com/skywind3000/kcp
+[11]: https://img.shields.io/badge/license-MIT-blue.svg
+[12]: LICENSE
+[13]: https://sourcegraph.com/github.com/xtaci/kcp-go/-/badge.svg
+[14]: https://sourcegraph.com/github.com/xtaci/kcp-go?badge
+
+## Introduction
+
+**kcp-go** is a **Production-Grade Reliable-UDP** library for [golang](https://golang.org/).
+
+This library intents to provide a **smooth, resilient, ordered, error-checked and anonymous** delivery of streams over **UDP** packets, it has been battle-tested with opensource project [kcptun](https://github.com/xtaci/kcptun). Millions of devices(from low-end MIPS routers to high-end servers) have deployed **kcp-go** powered program in a variety of forms like **online games, live broadcasting, file synchronization and network acceleration**.
+
+[Lastest Release](https://github.com/xtaci/kcp-go/releases)
+
+## Features
+
+1. Designed for **Latency-sensitive** scenarios.
+1. **Cache friendly** and **Memory optimized** design, offers extremely **High Performance** core.
+1. Handles **>5K concurrent connections** on a single commodity server.
+1. Compatible with [net.Conn](https://golang.org/pkg/net/#Conn) and [net.Listener](https://golang.org/pkg/net/#Listener), a drop-in replacement for [net.TCPConn](https://golang.org/pkg/net/#TCPConn).
+1. [FEC(Forward Error Correction)](https://en.wikipedia.org/wiki/Forward_error_correction) Support with [Reed-Solomon Codes](https://en.wikipedia.org/wiki/Reed%E2%80%93Solomon_error_correction)
+1. Packet level encryption support with [AES](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard), [TEA](https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm), [3DES](https://en.wikipedia.org/wiki/Triple_DES), [Blowfish](https://en.wikipedia.org/wiki/Blowfish_(cipher)), [Cast5](https://en.wikipedia.org/wiki/CAST-128), [Salsa20]( https://en.wikipedia.org/wiki/Salsa20), etc. in [CFB](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Feedback_.28CFB.29) mode, which generates completely anonymous packet.
+1. Only **A fixed number of goroutines** will be created for the entire server application, costs in **context switch** between goroutines have been taken into consideration.
+1. Compatible with [skywind3000's](https://github.com/skywind3000) C version with various improvements.
+1. Platform-dependent optimizations: [sendmmsg](http://man7.org/linux/man-pages/man2/sendmmsg.2.html) and [recvmmsg](http://man7.org/linux/man-pages/man2/recvmmsg.2.html) were expoloited for linux.
+
+## Documentation
+
+For complete documentation, see the associated [Godoc](https://godoc.org/github.com/xtaci/kcp-go).
+
+## Specification
+
+<img src="frame.png" alt="Frame Format" height="109px" />
+
+```
+NONCE:
+ 16bytes cryptographically secure random number, nonce changes for every packet.
+
+CRC32:
+ CRC-32 checksum of data using the IEEE polynomial
+
+FEC TYPE:
+ typeData = 0xF1
+ typeParity = 0xF2
+
+FEC SEQID:
+ monotonically increasing in range: [0, (0xffffffff/shardSize) * shardSize - 1]
+
+SIZE:
+ The size of KCP frame plus 2
+```
+
+```
++-----------------+
+| SESSION |
++-----------------+
+| KCP(ARQ) |
++-----------------+
+| FEC(OPTIONAL) |
++-----------------+
+| CRYPTO(OPTIONAL)|
++-----------------+
+| UDP(PACKET) |
++-----------------+
+| IP |
++-----------------+
+| LINK |
++-----------------+
+| PHY |
++-----------------+
+(LAYER MODEL OF KCP-GO)
+```
+
+
+## Examples
+
+1. [simple examples](https://github.com/xtaci/kcp-go/tree/master/examples)
+2. [kcptun client](https://github.com/xtaci/kcptun/blob/master/client/main.go)
+3. [kcptun server](https://github.com/xtaci/kcptun/blob/master/server/main.go)
+
+## Benchmark
+```
+===
+Model Name: MacBook Pro
+Model Identifier: MacBookPro14,1
+Processor Name: Intel Core i5
+Processor Speed: 3.1 GHz
+Number of Processors: 1
+Total Number of Cores: 2
+L2 Cache (per Core): 256 KB
+L3 Cache: 4 MB
+Memory: 8 GB
+===
+
+$ go test -v -run=^$ -bench .
+beginning tests, encryption:salsa20, fec:10/3
+goos: darwin
+goarch: amd64
+pkg: github.com/xtaci/kcp-go
+BenchmarkSM4-4 50000 32180 ns/op 93.23 MB/s 0 B/op 0 allocs/op
+BenchmarkAES128-4 500000 3285 ns/op 913.21 MB/s 0 B/op 0 allocs/op
+BenchmarkAES192-4 300000 3623 ns/op 827.85 MB/s 0 B/op 0 allocs/op
+BenchmarkAES256-4 300000 3874 ns/op 774.20 MB/s 0 B/op 0 allocs/op
+BenchmarkTEA-4 100000 15384 ns/op 195.00 MB/s 0 B/op 0 allocs/op
+BenchmarkXOR-4 20000000 89.9 ns/op 33372.00 MB/s 0 B/op 0 allocs/op
+BenchmarkBlowfish-4 50000 26927 ns/op 111.41 MB/s 0 B/op 0 allocs/op
+BenchmarkNone-4 30000000 45.7 ns/op 65597.94 MB/s 0 B/op 0 allocs/op
+BenchmarkCast5-4 50000 34258 ns/op 87.57 MB/s 0 B/op 0 allocs/op
+Benchmark3DES-4 10000 117149 ns/op 25.61 MB/s 0 B/op 0 allocs/op
+BenchmarkTwofish-4 50000 33538 ns/op 89.45 MB/s 0 B/op 0 allocs/op
+BenchmarkXTEA-4 30000 45666 ns/op 65.69 MB/s 0 B/op 0 allocs/op
+BenchmarkSalsa20-4 500000 3308 ns/op 906.76 MB/s 0 B/op 0 allocs/op
+BenchmarkCRC32-4 20000000 65.2 ns/op 15712.43 MB/s
+BenchmarkCsprngSystem-4 1000000 1150 ns/op 13.91 MB/s
+BenchmarkCsprngMD5-4 10000000 145 ns/op 110.26 MB/s
+BenchmarkCsprngSHA1-4 10000000 158 ns/op 126.54 MB/s
+BenchmarkCsprngNonceMD5-4 10000000 153 ns/op 104.22 MB/s
+BenchmarkCsprngNonceAES128-4 100000000 19.1 ns/op 837.81 MB/s
+BenchmarkFECDecode-4 1000000 1119 ns/op 1339.61 MB/s 1606 B/op 2 allocs/op
+BenchmarkFECEncode-4 2000000 832 ns/op 1801.83 MB/s 17 B/op 0 allocs/op
+BenchmarkFlush-4 5000000 272 ns/op 0 B/op 0 allocs/op
+BenchmarkEchoSpeed4K-4 5000 259617 ns/op 15.78 MB/s 5451 B/op 149 allocs/op
+BenchmarkEchoSpeed64K-4 1000 1706084 ns/op 38.41 MB/s 56002 B/op 1604 allocs/op
+BenchmarkEchoSpeed512K-4 100 14345505 ns/op 36.55 MB/s 482597 B/op 13045 allocs/op
+BenchmarkEchoSpeed1M-4 30 34859104 ns/op 30.08 MB/s 1143773 B/op 27186 allocs/op
+BenchmarkSinkSpeed4K-4 50000 31369 ns/op 130.57 MB/s 1566 B/op 30 allocs/op
+BenchmarkSinkSpeed64K-4 5000 329065 ns/op 199.16 MB/s 21529 B/op 453 allocs/op
+BenchmarkSinkSpeed256K-4 500 2373354 ns/op 220.91 MB/s 166332 B/op 3554 allocs/op
+BenchmarkSinkSpeed1M-4 300 5117927 ns/op 204.88 MB/s 310378 B/op 6988 allocs/op
+PASS
+ok github.com/xtaci/kcp-go 50.349s
+```
+
+```
+=== Raspberry Pi 4 ===
+
+➜ kcp-go git:(master) cat /proc/cpuinfo
+processor : 0
+model name : ARMv7 Processor rev 3 (v7l)
+BogoMIPS : 108.00
+Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
+CPU implementer : 0x41
+CPU architecture: 7
+CPU variant : 0x0
+CPU part : 0xd08
+CPU revision : 3
+
+➜ kcp-go git:(master) go test -run=^$ -bench .
+2020/01/05 19:25:13 beginning tests, encryption:salsa20, fec:10/3
+goos: linux
+goarch: arm
+pkg: github.com/xtaci/kcp-go/v5
+BenchmarkSM4-4 20000 86475 ns/op 34.69 MB/s 0 B/op 0 allocs/op
+BenchmarkAES128-4 20000 62254 ns/op 48.19 MB/s 0 B/op 0 allocs/op
+BenchmarkAES192-4 20000 71802 ns/op 41.78 MB/s 0 B/op 0 allocs/op
+BenchmarkAES256-4 20000 80570 ns/op 37.23 MB/s 0 B/op 0 allocs/op
+BenchmarkTEA-4 50000 37343 ns/op 80.34 MB/s 0 B/op 0 allocs/op
+BenchmarkXOR-4 100000 22266 ns/op 134.73 MB/s 0 B/op 0 allocs/op
+BenchmarkBlowfish-4 20000 66123 ns/op 45.37 MB/s 0 B/op 0 allocs/op
+BenchmarkNone-4 3000000 518 ns/op 5786.77 MB/s 0 B/op 0 allocs/op
+BenchmarkCast5-4 20000 76705 ns/op 39.11 MB/s 0 B/op 0 allocs/op
+Benchmark3DES-4 5000 418868 ns/op 7.16 MB/s 0 B/op 0 allocs/op
+BenchmarkTwofish-4 5000 326896 ns/op 9.18 MB/s 0 B/op 0 allocs/op
+BenchmarkXTEA-4 10000 114418 ns/op 26.22 MB/s 0 B/op 0 allocs/op
+BenchmarkSalsa20-4 50000 36736 ns/op 81.66 MB/s 0 B/op 0 allocs/op
+BenchmarkCRC32-4 1000000 1735 ns/op 589.98 MB/s
+BenchmarkCsprngSystem-4 1000000 2179 ns/op 7.34 MB/s
+BenchmarkCsprngMD5-4 2000000 811 ns/op 19.71 MB/s
+BenchmarkCsprngSHA1-4 2000000 862 ns/op 23.19 MB/s
+BenchmarkCsprngNonceMD5-4 2000000 878 ns/op 18.22 MB/s
+BenchmarkCsprngNonceAES128-4 5000000 326 ns/op 48.97 MB/s
+BenchmarkFECDecode-4 200000 9081 ns/op 165.16 MB/s 140 B/op 1 allocs/op
+BenchmarkFECEncode-4 100000 12039 ns/op 124.59 MB/s 11 B/op 0 allocs/op
+BenchmarkFlush-4 100000 21704 ns/op 0 B/op 0 allocs/op
+BenchmarkEchoSpeed4K-4 2000 981182 ns/op 4.17 MB/s 12384 B/op 424 allocs/op
+BenchmarkEchoSpeed64K-4 100 10503324 ns/op 6.24 MB/s 123616 B/op 3779 allocs/op
+BenchmarkEchoSpeed512K-4 20 138633802 ns/op 3.78 MB/s 1606584 B/op 29233 allocs/op
+BenchmarkEchoSpeed1M-4 5 372903568 ns/op 2.81 MB/s 4080504 B/op 63600 allocs/op
+BenchmarkSinkSpeed4K-4 10000 121239 ns/op 33.78 MB/s 4647 B/op 104 allocs/op
+BenchmarkSinkSpeed64K-4 1000 1587906 ns/op 41.27 MB/s 50914 B/op 1115 allocs/op
+BenchmarkSinkSpeed256K-4 100 16277830 ns/op 32.21 MB/s 453027 B/op 9296 allocs/op
+BenchmarkSinkSpeed1M-4 100 31040703 ns/op 33.78 MB/s 898097 B/op 18932 allocs/op
+PASS
+ok github.com/xtaci/kcp-go/v5 64.151s
+```
+
+
+## Typical Flame Graph
+![Flame Graph in kcptun](flame.png)
+
+## Key Design Considerations
+
+1. slice vs. container/list
+
+`kcp.flush()` loops through the send queue for retransmission checking for every 20ms(interval).
+
+I've wrote a benchmark for comparing sequential loop through *slice* and *container/list* here:
+
+https://github.com/xtaci/notes/blob/master/golang/benchmark2/cachemiss_test.go
+
+```
+BenchmarkLoopSlice-4 2000000000 0.39 ns/op
+BenchmarkLoopList-4 100000000 54.6 ns/op
+```
+
+List structure introduces **heavy cache misses** compared to slice which owns better **locality**, 5000 connections with 32 window size and 20ms interval will cost 6us/0.03%(cpu) using slice, and 8.7ms/43.5%(cpu) for list for each `kcp.flush()`.
+
+2. Timing accuracy vs. syscall clock_gettime
+
+Timing is **critical** to **RTT estimator**, inaccurate timing leads to false retransmissions in KCP, but calling `time.Now()` costs 42 cycles(10.5ns on 4GHz CPU, 15.6ns on my MacBook Pro 2.7GHz).
+
+The benchmark for time.Now() lies here:
+
+https://github.com/xtaci/notes/blob/master/golang/benchmark2/syscall_test.go
+
+```
+BenchmarkNow-4 100000000 15.6 ns/op
+```
+
+In kcp-go, after each `kcp.output()` function call, current clock time will be updated upon return, and for a single `kcp.flush()` operation, current time will be queried from system once. For most of the time, 5000 connections costs 5000 * 15.6ns = 78us(a fixed cost while no packet needs to be sent), as for 10MB/s data transfering with 1400 MTU, `kcp.output()` will be called around 7500 times and costs 117us for `time.Now()` in **every second**.
+
+3. Memory management
+
+Primary memory allocation are done from a global buffer pool xmit.Buf, in kcp-go, when we need to allocate some bytes, we can get from that pool, and a fixed-capacity 1500 bytes(mtuLimit) will be returned, the rx queue, tx queue and fec queue all receive bytes from there, and they will return the bytes to the pool after using to prevent unnecessary zer0ing of bytes. The pool mechanism maintained a high watermark for slice objects, these in-flight objects from the pool will survive from the perodical garbage collection, meanwhile the pool kept the ability to return the memory to runtime if in idle.
+
+4. Information security
+
+kcp-go is shipped with builtin packet encryption powered by various block encryption algorithms and works in [Cipher Feedback Mode](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Feedback_(CFB)), for each packet to be sent, the encryption process will start from encrypting a [nonce](https://en.wikipedia.org/wiki/Cryptographic_nonce) from the [system entropy](https://en.wikipedia.org/wiki//dev/random), so encryption to same plaintexts never leads to a same ciphertexts thereafter.
+
+The contents of the packets are completely anonymous with encryption, including the headers(FEC,KCP), checksums and contents. Note that, no matter which encryption method you choose on you upper layer, if you disable encryption, the transmit will be insecure somehow, since the header is ***PLAINTEXT*** to everyone it would be susceptible to header tampering, such as jamming the *sliding window size*, *round-trip time*, *FEC property* and *checksums*. ```AES-128``` is suggested for minimal encryption since modern CPUs are shipped with [AES-NI](https://en.wikipedia.org/wiki/AES_instruction_set) instructions and performs even better than `salsa20`(check the table above).
+
+Other possible attacks to kcp-go includes: a) [traffic analysis](https://en.wikipedia.org/wiki/Traffic_analysis), dataflow on specific websites may have pattern while interchanging data, but this type of eavesdropping has been mitigated by adapting [smux](https://github.com/xtaci/smux) to mix data streams so as to introduce noises, perfect solution to this has not appeared yet, theroretically by shuffling/mixing messages on larger scale network may mitigate this problem. b) [replay attack](https://en.wikipedia.org/wiki/Replay_attack), since the asymmetrical encryption has not been introduced into kcp-go for some reason, capturing the packets and replay them on a different machine is possible, (notice: hijacking the session and decrypting the contents is still *impossible*), so upper layers should contain a asymmetrical encryption system to guarantee the authenticity of each message(to process message exactly once), such as HTTPS/OpenSSL/LibreSSL, only by signing the requests with private keys can eliminate this type of attack.
+
+## Connection Termination
+
+Control messages like **SYN/FIN/RST** in TCP **are not defined** in KCP, you need some **keepalive/heartbeat mechanism** in the application-level. A real world example is to use some **multiplexing** protocol over session, such as [smux](https://github.com/xtaci/smux)(with embedded keepalive mechanism), see [kcptun](https://github.com/xtaci/kcptun) for example.
+
+## FAQ
+
+Q: I'm handling >5K connections on my server, the CPU utilization is so high.
+
+A: A standalone `agent` or `gate` server for running kcp-go is suggested, not only for CPU utilization, but also important to the **precision** of RTT measurements(timing) which indirectly affects retransmission. By increasing update `interval` with `SetNoDelay` like `conn.SetNoDelay(1, 40, 1, 1)` will dramatically reduce system load, but lower the performance.
+
+Q: When should I enable FEC?
+
+A: Forward error correction is critical to long-distance transmission, because a packet loss will lead to a huge penalty in time. And for the complicated packet routing network in modern world, round-trip time based loss check will not always be efficient, the big deviation of RTT samples in the long way usually leads to a larger RTO value in typical rtt estimator, which in other words, slows down the transmission.
+
+Q: Should I enable encryption?
+
+A: Yes, for the safety of protocol, even if the upper layer has encrypted.
+
+## Who is using this?
+
+1. https://github.com/xtaci/kcptun -- A Secure Tunnel Based On KCP over UDP.
+2. https://github.com/getlantern/lantern -- Lantern delivers fast access to the open Internet.
+3. https://github.com/smallnest/rpcx -- A RPC service framework based on net/rpc like alibaba Dubbo and weibo Motan.
+4. https://github.com/gonet2/agent -- A gateway for games with stream multiplexing.
+5. https://github.com/syncthing/syncthing -- Open Source Continuous File Synchronization.
+
+## Links
+
+1. https://github.com/xtaci/smux/ -- A Stream Multiplexing Library for golang with least memory
+1. https://github.com/xtaci/libkcp -- FEC enhanced KCP session library for iOS/Android in C++
+1. https://github.com/skywind3000/kcp -- A Fast and Reliable ARQ Protocol
+1. https://github.com/klauspost/reedsolomon -- Reed-Solomon Erasure Coding in Go
+
+## Consulting
+
+WeChat(付费技术咨询)
+
+<img src="wechat_donate.jpg" alt="kcptun" height="120px" />
diff --git a/vendor/github.com/xtaci/kcp-go/v5/autotune.go b/vendor/github.com/xtaci/kcp-go/v5/autotune.go
new file mode 100644
index 0000000..1f85be3
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/autotune.go
@@ -0,0 +1,64 @@
+package kcp
+
+const maxAutoTuneSamples = 258
+
+// pulse represents a 0/1 signal with time sequence
+type pulse struct {
+ bit bool // 0 or 1
+ seq uint32 // sequence of the signal
+}
+
+// autoTune object
+type autoTune struct {
+ pulses [maxAutoTuneSamples]pulse
+}
+
+// Sample adds a signal sample to the pulse buffer
+func (tune *autoTune) Sample(bit bool, seq uint32) {
+ tune.pulses[seq%maxAutoTuneSamples] = pulse{bit, seq}
+}
+
+// Find a period for a given signal
+// returns -1 if not found
+//
+// --- ------
+// | |
+// |______________|
+// Period
+// Falling Edge Rising Edge
+func (tune *autoTune) FindPeriod(bit bool) int {
+ // last pulse and initial index setup
+ lastPulse := tune.pulses[0]
+ idx := 1
+
+ // left edge
+ var leftEdge int
+ for ; idx < len(tune.pulses); idx++ {
+ if lastPulse.bit != bit && tune.pulses[idx].bit == bit { // edge found
+ if lastPulse.seq+1 == tune.pulses[idx].seq { // ensure edge continuity
+ leftEdge = idx
+ break
+ }
+ }
+ lastPulse = tune.pulses[idx]
+ }
+
+ // right edge
+ var rightEdge int
+ lastPulse = tune.pulses[leftEdge]
+ idx = leftEdge + 1
+
+ for ; idx < len(tune.pulses); idx++ {
+ if lastPulse.seq+1 == tune.pulses[idx].seq { // ensure pulses in this level monotonic
+ if lastPulse.bit == bit && tune.pulses[idx].bit != bit { // edge found
+ rightEdge = idx
+ break
+ }
+ } else {
+ return -1
+ }
+ lastPulse = tune.pulses[idx]
+ }
+
+ return rightEdge - leftEdge
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/batchconn.go b/vendor/github.com/xtaci/kcp-go/v5/batchconn.go
new file mode 100644
index 0000000..6c30701
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/batchconn.go
@@ -0,0 +1,12 @@
+package kcp
+
+import "golang.org/x/net/ipv4"
+
+const (
+ batchSize = 16
+)
+
+type batchConn interface {
+ WriteBatch(ms []ipv4.Message, flags int) (int, error)
+ ReadBatch(ms []ipv4.Message, flags int) (int, error)
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/crypt.go b/vendor/github.com/xtaci/kcp-go/v5/crypt.go
new file mode 100644
index 0000000..d882852
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/crypt.go
@@ -0,0 +1,618 @@
+package kcp
+
+import (
+ "crypto/aes"
+ "crypto/cipher"
+ "crypto/des"
+ "crypto/sha1"
+ "unsafe"
+
+ xor "github.com/templexxx/xorsimd"
+ "github.com/tjfoc/gmsm/sm4"
+
+ "golang.org/x/crypto/blowfish"
+ "golang.org/x/crypto/cast5"
+ "golang.org/x/crypto/pbkdf2"
+ "golang.org/x/crypto/salsa20"
+ "golang.org/x/crypto/tea"
+ "golang.org/x/crypto/twofish"
+ "golang.org/x/crypto/xtea"
+)
+
+var (
+ initialVector = []byte{167, 115, 79, 156, 18, 172, 27, 1, 164, 21, 242, 193, 252, 120, 230, 107}
+ saltxor = `sH3CIVoF#rWLtJo6`
+)
+
+// BlockCrypt defines encryption/decryption methods for a given byte slice.
+// Notes on implementing: the data to be encrypted contains a builtin
+// nonce at the first 16 bytes
+type BlockCrypt interface {
+ // Encrypt encrypts the whole block in src into dst.
+ // Dst and src may point at the same memory.
+ Encrypt(dst, src []byte)
+
+ // Decrypt decrypts the whole block in src into dst.
+ // Dst and src may point at the same memory.
+ Decrypt(dst, src []byte)
+}
+
+type salsa20BlockCrypt struct {
+ key [32]byte
+}
+
+// NewSalsa20BlockCrypt https://en.wikipedia.org/wiki/Salsa20
+func NewSalsa20BlockCrypt(key []byte) (BlockCrypt, error) {
+ c := new(salsa20BlockCrypt)
+ copy(c.key[:], key)
+ return c, nil
+}
+
+func (c *salsa20BlockCrypt) Encrypt(dst, src []byte) {
+ salsa20.XORKeyStream(dst[8:], src[8:], src[:8], &c.key)
+ copy(dst[:8], src[:8])
+}
+func (c *salsa20BlockCrypt) Decrypt(dst, src []byte) {
+ salsa20.XORKeyStream(dst[8:], src[8:], src[:8], &c.key)
+ copy(dst[:8], src[:8])
+}
+
+type sm4BlockCrypt struct {
+ encbuf [sm4.BlockSize]byte // 64bit alignment enc/dec buffer
+ decbuf [2 * sm4.BlockSize]byte
+ block cipher.Block
+}
+
+// NewSM4BlockCrypt https://github.com/tjfoc/gmsm/tree/master/sm4
+func NewSM4BlockCrypt(key []byte) (BlockCrypt, error) {
+ c := new(sm4BlockCrypt)
+ block, err := sm4.NewCipher(key)
+ if err != nil {
+ return nil, err
+ }
+ c.block = block
+ return c, nil
+}
+
+func (c *sm4BlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
+func (c *sm4BlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
+
+type twofishBlockCrypt struct {
+ encbuf [twofish.BlockSize]byte
+ decbuf [2 * twofish.BlockSize]byte
+ block cipher.Block
+}
+
+// NewTwofishBlockCrypt https://en.wikipedia.org/wiki/Twofish
+func NewTwofishBlockCrypt(key []byte) (BlockCrypt, error) {
+ c := new(twofishBlockCrypt)
+ block, err := twofish.NewCipher(key)
+ if err != nil {
+ return nil, err
+ }
+ c.block = block
+ return c, nil
+}
+
+func (c *twofishBlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
+func (c *twofishBlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
+
+type tripleDESBlockCrypt struct {
+ encbuf [des.BlockSize]byte
+ decbuf [2 * des.BlockSize]byte
+ block cipher.Block
+}
+
+// NewTripleDESBlockCrypt https://en.wikipedia.org/wiki/Triple_DES
+func NewTripleDESBlockCrypt(key []byte) (BlockCrypt, error) {
+ c := new(tripleDESBlockCrypt)
+ block, err := des.NewTripleDESCipher(key)
+ if err != nil {
+ return nil, err
+ }
+ c.block = block
+ return c, nil
+}
+
+func (c *tripleDESBlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
+func (c *tripleDESBlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
+
+type cast5BlockCrypt struct {
+ encbuf [cast5.BlockSize]byte
+ decbuf [2 * cast5.BlockSize]byte
+ block cipher.Block
+}
+
+// NewCast5BlockCrypt https://en.wikipedia.org/wiki/CAST-128
+func NewCast5BlockCrypt(key []byte) (BlockCrypt, error) {
+ c := new(cast5BlockCrypt)
+ block, err := cast5.NewCipher(key)
+ if err != nil {
+ return nil, err
+ }
+ c.block = block
+ return c, nil
+}
+
+func (c *cast5BlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
+func (c *cast5BlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
+
+type blowfishBlockCrypt struct {
+ encbuf [blowfish.BlockSize]byte
+ decbuf [2 * blowfish.BlockSize]byte
+ block cipher.Block
+}
+
+// NewBlowfishBlockCrypt https://en.wikipedia.org/wiki/Blowfish_(cipher)
+func NewBlowfishBlockCrypt(key []byte) (BlockCrypt, error) {
+ c := new(blowfishBlockCrypt)
+ block, err := blowfish.NewCipher(key)
+ if err != nil {
+ return nil, err
+ }
+ c.block = block
+ return c, nil
+}
+
+func (c *blowfishBlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
+func (c *blowfishBlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
+
+type aesBlockCrypt struct {
+ encbuf [aes.BlockSize]byte
+ decbuf [2 * aes.BlockSize]byte
+ block cipher.Block
+}
+
+// NewAESBlockCrypt https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
+func NewAESBlockCrypt(key []byte) (BlockCrypt, error) {
+ c := new(aesBlockCrypt)
+ block, err := aes.NewCipher(key)
+ if err != nil {
+ return nil, err
+ }
+ c.block = block
+ return c, nil
+}
+
+func (c *aesBlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
+func (c *aesBlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
+
+type teaBlockCrypt struct {
+ encbuf [tea.BlockSize]byte
+ decbuf [2 * tea.BlockSize]byte
+ block cipher.Block
+}
+
+// NewTEABlockCrypt https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm
+func NewTEABlockCrypt(key []byte) (BlockCrypt, error) {
+ c := new(teaBlockCrypt)
+ block, err := tea.NewCipherWithRounds(key, 16)
+ if err != nil {
+ return nil, err
+ }
+ c.block = block
+ return c, nil
+}
+
+func (c *teaBlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
+func (c *teaBlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
+
+type xteaBlockCrypt struct {
+ encbuf [xtea.BlockSize]byte
+ decbuf [2 * xtea.BlockSize]byte
+ block cipher.Block
+}
+
+// NewXTEABlockCrypt https://en.wikipedia.org/wiki/XTEA
+func NewXTEABlockCrypt(key []byte) (BlockCrypt, error) {
+ c := new(xteaBlockCrypt)
+ block, err := xtea.NewCipher(key)
+ if err != nil {
+ return nil, err
+ }
+ c.block = block
+ return c, nil
+}
+
+func (c *xteaBlockCrypt) Encrypt(dst, src []byte) { encrypt(c.block, dst, src, c.encbuf[:]) }
+func (c *xteaBlockCrypt) Decrypt(dst, src []byte) { decrypt(c.block, dst, src, c.decbuf[:]) }
+
+type simpleXORBlockCrypt struct {
+ xortbl []byte
+}
+
+// NewSimpleXORBlockCrypt simple xor with key expanding
+func NewSimpleXORBlockCrypt(key []byte) (BlockCrypt, error) {
+ c := new(simpleXORBlockCrypt)
+ c.xortbl = pbkdf2.Key(key, []byte(saltxor), 32, mtuLimit, sha1.New)
+ return c, nil
+}
+
+func (c *simpleXORBlockCrypt) Encrypt(dst, src []byte) { xor.Bytes(dst, src, c.xortbl) }
+func (c *simpleXORBlockCrypt) Decrypt(dst, src []byte) { xor.Bytes(dst, src, c.xortbl) }
+
+type noneBlockCrypt struct{}
+
+// NewNoneBlockCrypt does nothing but copying
+func NewNoneBlockCrypt(key []byte) (BlockCrypt, error) {
+ return new(noneBlockCrypt), nil
+}
+
+func (c *noneBlockCrypt) Encrypt(dst, src []byte) { copy(dst, src) }
+func (c *noneBlockCrypt) Decrypt(dst, src []byte) { copy(dst, src) }
+
+// packet encryption with local CFB mode
+func encrypt(block cipher.Block, dst, src, buf []byte) {
+ switch block.BlockSize() {
+ case 8:
+ encrypt8(block, dst, src, buf)
+ case 16:
+ encrypt16(block, dst, src, buf)
+ default:
+ panic("unsupported cipher block size")
+ }
+}
+
+// optimized encryption for the ciphers which works in 8-bytes
+func encrypt8(block cipher.Block, dst, src, buf []byte) {
+ tbl := buf[:8]
+ block.Encrypt(tbl, initialVector)
+ n := len(src) / 8
+ base := 0
+ repeat := n / 8
+ left := n % 8
+ ptr_tbl := (*uint64)(unsafe.Pointer(&tbl[0]))
+
+ for i := 0; i < repeat; i++ {
+ s := src[base:][0:64]
+ d := dst[base:][0:64]
+ // 1
+ *(*uint64)(unsafe.Pointer(&d[0])) = *(*uint64)(unsafe.Pointer(&s[0])) ^ *ptr_tbl
+ block.Encrypt(tbl, d[0:8])
+ // 2
+ *(*uint64)(unsafe.Pointer(&d[8])) = *(*uint64)(unsafe.Pointer(&s[8])) ^ *ptr_tbl
+ block.Encrypt(tbl, d[8:16])
+ // 3
+ *(*uint64)(unsafe.Pointer(&d[16])) = *(*uint64)(unsafe.Pointer(&s[16])) ^ *ptr_tbl
+ block.Encrypt(tbl, d[16:24])
+ // 4
+ *(*uint64)(unsafe.Pointer(&d[24])) = *(*uint64)(unsafe.Pointer(&s[24])) ^ *ptr_tbl
+ block.Encrypt(tbl, d[24:32])
+ // 5
+ *(*uint64)(unsafe.Pointer(&d[32])) = *(*uint64)(unsafe.Pointer(&s[32])) ^ *ptr_tbl
+ block.Encrypt(tbl, d[32:40])
+ // 6
+ *(*uint64)(unsafe.Pointer(&d[40])) = *(*uint64)(unsafe.Pointer(&s[40])) ^ *ptr_tbl
+ block.Encrypt(tbl, d[40:48])
+ // 7
+ *(*uint64)(unsafe.Pointer(&d[48])) = *(*uint64)(unsafe.Pointer(&s[48])) ^ *ptr_tbl
+ block.Encrypt(tbl, d[48:56])
+ // 8
+ *(*uint64)(unsafe.Pointer(&d[56])) = *(*uint64)(unsafe.Pointer(&s[56])) ^ *ptr_tbl
+ block.Encrypt(tbl, d[56:64])
+ base += 64
+ }
+
+ switch left {
+ case 7:
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
+ block.Encrypt(tbl, dst[base:])
+ base += 8
+ fallthrough
+ case 6:
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
+ block.Encrypt(tbl, dst[base:])
+ base += 8
+ fallthrough
+ case 5:
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
+ block.Encrypt(tbl, dst[base:])
+ base += 8
+ fallthrough
+ case 4:
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
+ block.Encrypt(tbl, dst[base:])
+ base += 8
+ fallthrough
+ case 3:
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
+ block.Encrypt(tbl, dst[base:])
+ base += 8
+ fallthrough
+ case 2:
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
+ block.Encrypt(tbl, dst[base:])
+ base += 8
+ fallthrough
+ case 1:
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *ptr_tbl
+ block.Encrypt(tbl, dst[base:])
+ base += 8
+ fallthrough
+ case 0:
+ xorBytes(dst[base:], src[base:], tbl)
+ }
+}
+
+// optimized encryption for the ciphers which works in 16-bytes
+func encrypt16(block cipher.Block, dst, src, buf []byte) {
+ tbl := buf[:16]
+ block.Encrypt(tbl, initialVector)
+ n := len(src) / 16
+ base := 0
+ repeat := n / 8
+ left := n % 8
+ for i := 0; i < repeat; i++ {
+ s := src[base:][0:128]
+ d := dst[base:][0:128]
+ // 1
+ xor.Bytes16Align(d[0:16], s[0:16], tbl)
+ block.Encrypt(tbl, d[0:16])
+ // 2
+ xor.Bytes16Align(d[16:32], s[16:32], tbl)
+ block.Encrypt(tbl, d[16:32])
+ // 3
+ xor.Bytes16Align(d[32:48], s[32:48], tbl)
+ block.Encrypt(tbl, d[32:48])
+ // 4
+ xor.Bytes16Align(d[48:64], s[48:64], tbl)
+ block.Encrypt(tbl, d[48:64])
+ // 5
+ xor.Bytes16Align(d[64:80], s[64:80], tbl)
+ block.Encrypt(tbl, d[64:80])
+ // 6
+ xor.Bytes16Align(d[80:96], s[80:96], tbl)
+ block.Encrypt(tbl, d[80:96])
+ // 7
+ xor.Bytes16Align(d[96:112], s[96:112], tbl)
+ block.Encrypt(tbl, d[96:112])
+ // 8
+ xor.Bytes16Align(d[112:128], s[112:128], tbl)
+ block.Encrypt(tbl, d[112:128])
+ base += 128
+ }
+
+ switch left {
+ case 7:
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ block.Encrypt(tbl, dst[base:])
+ base += 16
+ fallthrough
+ case 6:
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ block.Encrypt(tbl, dst[base:])
+ base += 16
+ fallthrough
+ case 5:
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ block.Encrypt(tbl, dst[base:])
+ base += 16
+ fallthrough
+ case 4:
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ block.Encrypt(tbl, dst[base:])
+ base += 16
+ fallthrough
+ case 3:
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ block.Encrypt(tbl, dst[base:])
+ base += 16
+ fallthrough
+ case 2:
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ block.Encrypt(tbl, dst[base:])
+ base += 16
+ fallthrough
+ case 1:
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ block.Encrypt(tbl, dst[base:])
+ base += 16
+ fallthrough
+ case 0:
+ xorBytes(dst[base:], src[base:], tbl)
+ }
+}
+
+// decryption
+func decrypt(block cipher.Block, dst, src, buf []byte) {
+ switch block.BlockSize() {
+ case 8:
+ decrypt8(block, dst, src, buf)
+ case 16:
+ decrypt16(block, dst, src, buf)
+ default:
+ panic("unsupported cipher block size")
+ }
+}
+
+// decrypt 8 bytes block, all byte slices are supposed to be 64bit aligned
+func decrypt8(block cipher.Block, dst, src, buf []byte) {
+ tbl := buf[0:8]
+ next := buf[8:16]
+ block.Encrypt(tbl, initialVector)
+ n := len(src) / 8
+ base := 0
+ repeat := n / 8
+ left := n % 8
+ ptr_tbl := (*uint64)(unsafe.Pointer(&tbl[0]))
+ ptr_next := (*uint64)(unsafe.Pointer(&next[0]))
+
+ for i := 0; i < repeat; i++ {
+ s := src[base:][0:64]
+ d := dst[base:][0:64]
+ // 1
+ block.Encrypt(next, s[0:8])
+ *(*uint64)(unsafe.Pointer(&d[0])) = *(*uint64)(unsafe.Pointer(&s[0])) ^ *ptr_tbl
+ // 2
+ block.Encrypt(tbl, s[8:16])
+ *(*uint64)(unsafe.Pointer(&d[8])) = *(*uint64)(unsafe.Pointer(&s[8])) ^ *ptr_next
+ // 3
+ block.Encrypt(next, s[16:24])
+ *(*uint64)(unsafe.Pointer(&d[16])) = *(*uint64)(unsafe.Pointer(&s[16])) ^ *ptr_tbl
+ // 4
+ block.Encrypt(tbl, s[24:32])
+ *(*uint64)(unsafe.Pointer(&d[24])) = *(*uint64)(unsafe.Pointer(&s[24])) ^ *ptr_next
+ // 5
+ block.Encrypt(next, s[32:40])
+ *(*uint64)(unsafe.Pointer(&d[32])) = *(*uint64)(unsafe.Pointer(&s[32])) ^ *ptr_tbl
+ // 6
+ block.Encrypt(tbl, s[40:48])
+ *(*uint64)(unsafe.Pointer(&d[40])) = *(*uint64)(unsafe.Pointer(&s[40])) ^ *ptr_next
+ // 7
+ block.Encrypt(next, s[48:56])
+ *(*uint64)(unsafe.Pointer(&d[48])) = *(*uint64)(unsafe.Pointer(&s[48])) ^ *ptr_tbl
+ // 8
+ block.Encrypt(tbl, s[56:64])
+ *(*uint64)(unsafe.Pointer(&d[56])) = *(*uint64)(unsafe.Pointer(&s[56])) ^ *ptr_next
+ base += 64
+ }
+
+ switch left {
+ case 7:
+ block.Encrypt(next, src[base:])
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
+ tbl, next = next, tbl
+ base += 8
+ fallthrough
+ case 6:
+ block.Encrypt(next, src[base:])
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
+ tbl, next = next, tbl
+ base += 8
+ fallthrough
+ case 5:
+ block.Encrypt(next, src[base:])
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
+ tbl, next = next, tbl
+ base += 8
+ fallthrough
+ case 4:
+ block.Encrypt(next, src[base:])
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
+ tbl, next = next, tbl
+ base += 8
+ fallthrough
+ case 3:
+ block.Encrypt(next, src[base:])
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
+ tbl, next = next, tbl
+ base += 8
+ fallthrough
+ case 2:
+ block.Encrypt(next, src[base:])
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
+ tbl, next = next, tbl
+ base += 8
+ fallthrough
+ case 1:
+ block.Encrypt(next, src[base:])
+ *(*uint64)(unsafe.Pointer(&dst[base])) = *(*uint64)(unsafe.Pointer(&src[base])) ^ *(*uint64)(unsafe.Pointer(&tbl[0]))
+ tbl, next = next, tbl
+ base += 8
+ fallthrough
+ case 0:
+ xorBytes(dst[base:], src[base:], tbl)
+ }
+}
+
+func decrypt16(block cipher.Block, dst, src, buf []byte) {
+ tbl := buf[0:16]
+ next := buf[16:32]
+ block.Encrypt(tbl, initialVector)
+ n := len(src) / 16
+ base := 0
+ repeat := n / 8
+ left := n % 8
+ for i := 0; i < repeat; i++ {
+ s := src[base:][0:128]
+ d := dst[base:][0:128]
+ // 1
+ block.Encrypt(next, s[0:16])
+ xor.Bytes16Align(d[0:16], s[0:16], tbl)
+ // 2
+ block.Encrypt(tbl, s[16:32])
+ xor.Bytes16Align(d[16:32], s[16:32], next)
+ // 3
+ block.Encrypt(next, s[32:48])
+ xor.Bytes16Align(d[32:48], s[32:48], tbl)
+ // 4
+ block.Encrypt(tbl, s[48:64])
+ xor.Bytes16Align(d[48:64], s[48:64], next)
+ // 5
+ block.Encrypt(next, s[64:80])
+ xor.Bytes16Align(d[64:80], s[64:80], tbl)
+ // 6
+ block.Encrypt(tbl, s[80:96])
+ xor.Bytes16Align(d[80:96], s[80:96], next)
+ // 7
+ block.Encrypt(next, s[96:112])
+ xor.Bytes16Align(d[96:112], s[96:112], tbl)
+ // 8
+ block.Encrypt(tbl, s[112:128])
+ xor.Bytes16Align(d[112:128], s[112:128], next)
+ base += 128
+ }
+
+ switch left {
+ case 7:
+ block.Encrypt(next, src[base:])
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ tbl, next = next, tbl
+ base += 16
+ fallthrough
+ case 6:
+ block.Encrypt(next, src[base:])
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ tbl, next = next, tbl
+ base += 16
+ fallthrough
+ case 5:
+ block.Encrypt(next, src[base:])
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ tbl, next = next, tbl
+ base += 16
+ fallthrough
+ case 4:
+ block.Encrypt(next, src[base:])
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ tbl, next = next, tbl
+ base += 16
+ fallthrough
+ case 3:
+ block.Encrypt(next, src[base:])
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ tbl, next = next, tbl
+ base += 16
+ fallthrough
+ case 2:
+ block.Encrypt(next, src[base:])
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ tbl, next = next, tbl
+ base += 16
+ fallthrough
+ case 1:
+ block.Encrypt(next, src[base:])
+ xor.Bytes16Align(dst[base:], src[base:], tbl)
+ tbl, next = next, tbl
+ base += 16
+ fallthrough
+ case 0:
+ xorBytes(dst[base:], src[base:], tbl)
+ }
+}
+
+// per bytes xors
+func xorBytes(dst, a, b []byte) int {
+ n := len(a)
+ if len(b) < n {
+ n = len(b)
+ }
+ if n == 0 {
+ return 0
+ }
+
+ for i := 0; i < n; i++ {
+ dst[i] = a[i] ^ b[i]
+ }
+ return n
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/donate.png b/vendor/github.com/xtaci/kcp-go/v5/donate.png
new file mode 100644
index 0000000..0f353d9
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/donate.png
Binary files differ
diff --git a/vendor/github.com/xtaci/kcp-go/v5/entropy.go b/vendor/github.com/xtaci/kcp-go/v5/entropy.go
new file mode 100644
index 0000000..156c1cd
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/entropy.go
@@ -0,0 +1,52 @@
+package kcp
+
+import (
+ "crypto/aes"
+ "crypto/cipher"
+ "crypto/md5"
+ "crypto/rand"
+ "io"
+)
+
+// Entropy defines a entropy source
+type Entropy interface {
+ Init()
+ Fill(nonce []byte)
+}
+
+// nonceMD5 nonce generator for packet header
+type nonceMD5 struct {
+ seed [md5.Size]byte
+}
+
+func (n *nonceMD5) Init() { /*nothing required*/ }
+
+func (n *nonceMD5) Fill(nonce []byte) {
+ if n.seed[0] == 0 { // entropy update
+ io.ReadFull(rand.Reader, n.seed[:])
+ }
+ n.seed = md5.Sum(n.seed[:])
+ copy(nonce, n.seed[:])
+}
+
+// nonceAES128 nonce generator for packet headers
+type nonceAES128 struct {
+ seed [aes.BlockSize]byte
+ block cipher.Block
+}
+
+func (n *nonceAES128) Init() {
+ var key [16]byte //aes-128
+ io.ReadFull(rand.Reader, key[:])
+ io.ReadFull(rand.Reader, n.seed[:])
+ block, _ := aes.NewCipher(key[:])
+ n.block = block
+}
+
+func (n *nonceAES128) Fill(nonce []byte) {
+ if n.seed[0] == 0 { // entropy update
+ io.ReadFull(rand.Reader, n.seed[:])
+ }
+ n.block.Encrypt(n.seed[:], n.seed[:])
+ copy(nonce, n.seed[:])
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/fec.go b/vendor/github.com/xtaci/kcp-go/v5/fec.go
new file mode 100644
index 0000000..0a203ee
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/fec.go
@@ -0,0 +1,381 @@
+package kcp
+
+import (
+ "encoding/binary"
+ "sync/atomic"
+
+ "github.com/klauspost/reedsolomon"
+)
+
+const (
+ fecHeaderSize = 6
+ fecHeaderSizePlus2 = fecHeaderSize + 2 // plus 2B data size
+ typeData = 0xf1
+ typeParity = 0xf2
+ fecExpire = 60000
+ rxFECMulti = 3 // FEC keeps rxFECMulti* (dataShard+parityShard) ordered packets in memory
+)
+
+// fecPacket is a decoded FEC packet
+type fecPacket []byte
+
+func (bts fecPacket) seqid() uint32 { return binary.LittleEndian.Uint32(bts) }
+func (bts fecPacket) flag() uint16 { return binary.LittleEndian.Uint16(bts[4:]) }
+func (bts fecPacket) data() []byte { return bts[6:] }
+
+// fecElement has auxcilliary time field
+type fecElement struct {
+ fecPacket
+ ts uint32
+}
+
+// fecDecoder for decoding incoming packets
+type fecDecoder struct {
+ rxlimit int // queue size limit
+ dataShards int
+ parityShards int
+ shardSize int
+ rx []fecElement // ordered receive queue
+
+ // caches
+ decodeCache [][]byte
+ flagCache []bool
+
+ // zeros
+ zeros []byte
+
+ // RS decoder
+ codec reedsolomon.Encoder
+
+ // auto tune fec parameter
+ autoTune autoTune
+}
+
+func newFECDecoder(dataShards, parityShards int) *fecDecoder {
+ if dataShards <= 0 || parityShards <= 0 {
+ return nil
+ }
+
+ dec := new(fecDecoder)
+ dec.dataShards = dataShards
+ dec.parityShards = parityShards
+ dec.shardSize = dataShards + parityShards
+ dec.rxlimit = rxFECMulti * dec.shardSize
+ codec, err := reedsolomon.New(dataShards, parityShards)
+ if err != nil {
+ return nil
+ }
+ dec.codec = codec
+ dec.decodeCache = make([][]byte, dec.shardSize)
+ dec.flagCache = make([]bool, dec.shardSize)
+ dec.zeros = make([]byte, mtuLimit)
+ return dec
+}
+
+// decode a fec packet
+func (dec *fecDecoder) decode(in fecPacket) (recovered [][]byte) {
+ // sample to auto FEC tuner
+ if in.flag() == typeData {
+ dec.autoTune.Sample(true, in.seqid())
+ } else {
+ dec.autoTune.Sample(false, in.seqid())
+ }
+
+ // check if FEC parameters is out of sync
+ var shouldTune bool
+ if int(in.seqid())%dec.shardSize < dec.dataShards {
+ if in.flag() != typeData { // expect typeData
+ shouldTune = true
+ }
+ } else {
+ if in.flag() != typeParity {
+ shouldTune = true
+ }
+ }
+
+ if shouldTune {
+ autoDS := dec.autoTune.FindPeriod(true)
+ autoPS := dec.autoTune.FindPeriod(false)
+
+ // edges found, we can tune parameters now
+ if autoDS > 0 && autoPS > 0 && autoDS < 256 && autoPS < 256 {
+ // and make sure it's different
+ if autoDS != dec.dataShards || autoPS != dec.parityShards {
+ dec.dataShards = autoDS
+ dec.parityShards = autoPS
+ dec.shardSize = autoDS + autoPS
+ dec.rxlimit = rxFECMulti * dec.shardSize
+ codec, err := reedsolomon.New(autoDS, autoPS)
+ if err != nil {
+ return nil
+ }
+ dec.codec = codec
+ dec.decodeCache = make([][]byte, dec.shardSize)
+ dec.flagCache = make([]bool, dec.shardSize)
+ //log.Println("autotune to :", dec.dataShards, dec.parityShards)
+ }
+ }
+ }
+
+ // insertion
+ n := len(dec.rx) - 1
+ insertIdx := 0
+ for i := n; i >= 0; i-- {
+ if in.seqid() == dec.rx[i].seqid() { // de-duplicate
+ return nil
+ } else if _itimediff(in.seqid(), dec.rx[i].seqid()) > 0 { // insertion
+ insertIdx = i + 1
+ break
+ }
+ }
+
+ // make a copy
+ pkt := fecPacket(xmitBuf.Get().([]byte)[:len(in)])
+ copy(pkt, in)
+ elem := fecElement{pkt, currentMs()}
+
+ // insert into ordered rx queue
+ if insertIdx == n+1 {
+ dec.rx = append(dec.rx, elem)
+ } else {
+ dec.rx = append(dec.rx, fecElement{})
+ copy(dec.rx[insertIdx+1:], dec.rx[insertIdx:]) // shift right
+ dec.rx[insertIdx] = elem
+ }
+
+ // shard range for current packet
+ shardBegin := pkt.seqid() - pkt.seqid()%uint32(dec.shardSize)
+ shardEnd := shardBegin + uint32(dec.shardSize) - 1
+
+ // max search range in ordered queue for current shard
+ searchBegin := insertIdx - int(pkt.seqid()%uint32(dec.shardSize))
+ if searchBegin < 0 {
+ searchBegin = 0
+ }
+ searchEnd := searchBegin + dec.shardSize - 1
+ if searchEnd >= len(dec.rx) {
+ searchEnd = len(dec.rx) - 1
+ }
+
+ // re-construct datashards
+ if searchEnd-searchBegin+1 >= dec.dataShards {
+ var numshard, numDataShard, first, maxlen int
+
+ // zero caches
+ shards := dec.decodeCache
+ shardsflag := dec.flagCache
+ for k := range dec.decodeCache {
+ shards[k] = nil
+ shardsflag[k] = false
+ }
+
+ // shard assembly
+ for i := searchBegin; i <= searchEnd; i++ {
+ seqid := dec.rx[i].seqid()
+ if _itimediff(seqid, shardEnd) > 0 {
+ break
+ } else if _itimediff(seqid, shardBegin) >= 0 {
+ shards[seqid%uint32(dec.shardSize)] = dec.rx[i].data()
+ shardsflag[seqid%uint32(dec.shardSize)] = true
+ numshard++
+ if dec.rx[i].flag() == typeData {
+ numDataShard++
+ }
+ if numshard == 1 {
+ first = i
+ }
+ if len(dec.rx[i].data()) > maxlen {
+ maxlen = len(dec.rx[i].data())
+ }
+ }
+ }
+
+ if numDataShard == dec.dataShards {
+ // case 1: no loss on data shards
+ dec.rx = dec.freeRange(first, numshard, dec.rx)
+ } else if numshard >= dec.dataShards {
+ // case 2: loss on data shards, but it's recoverable from parity shards
+ for k := range shards {
+ if shards[k] != nil {
+ dlen := len(shards[k])
+ shards[k] = shards[k][:maxlen]
+ copy(shards[k][dlen:], dec.zeros)
+ } else if k < dec.dataShards {
+ shards[k] = xmitBuf.Get().([]byte)[:0]
+ }
+ }
+ if err := dec.codec.ReconstructData(shards); err == nil {
+ for k := range shards[:dec.dataShards] {
+ if !shardsflag[k] {
+ // recovered data should be recycled
+ recovered = append(recovered, shards[k])
+ }
+ }
+ }
+ dec.rx = dec.freeRange(first, numshard, dec.rx)
+ }
+ }
+
+ // keep rxlimit
+ if len(dec.rx) > dec.rxlimit {
+ if dec.rx[0].flag() == typeData { // track the unrecoverable data
+ atomic.AddUint64(&DefaultSnmp.FECShortShards, 1)
+ }
+ dec.rx = dec.freeRange(0, 1, dec.rx)
+ }
+
+ // timeout policy
+ current := currentMs()
+ numExpired := 0
+ for k := range dec.rx {
+ if _itimediff(current, dec.rx[k].ts) > fecExpire {
+ numExpired++
+ continue
+ }
+ break
+ }
+ if numExpired > 0 {
+ dec.rx = dec.freeRange(0, numExpired, dec.rx)
+ }
+ return
+}
+
+// free a range of fecPacket
+func (dec *fecDecoder) freeRange(first, n int, q []fecElement) []fecElement {
+ for i := first; i < first+n; i++ { // recycle buffer
+ xmitBuf.Put([]byte(q[i].fecPacket))
+ }
+
+ if first == 0 && n < cap(q)/2 {
+ return q[n:]
+ }
+ copy(q[first:], q[first+n:])
+ return q[:len(q)-n]
+}
+
+// release all segments back to xmitBuf
+func (dec *fecDecoder) release() {
+ if n := len(dec.rx); n > 0 {
+ dec.rx = dec.freeRange(0, n, dec.rx)
+ }
+}
+
+type (
+ // fecEncoder for encoding outgoing packets
+ fecEncoder struct {
+ dataShards int
+ parityShards int
+ shardSize int
+ paws uint32 // Protect Against Wrapped Sequence numbers
+ next uint32 // next seqid
+
+ shardCount int // count the number of datashards collected
+ maxSize int // track maximum data length in datashard
+
+ headerOffset int // FEC header offset
+ payloadOffset int // FEC payload offset
+
+ // caches
+ shardCache [][]byte
+ encodeCache [][]byte
+
+ // zeros
+ zeros []byte
+
+ // RS encoder
+ codec reedsolomon.Encoder
+ }
+)
+
+func newFECEncoder(dataShards, parityShards, offset int) *fecEncoder {
+ if dataShards <= 0 || parityShards <= 0 {
+ return nil
+ }
+ enc := new(fecEncoder)
+ enc.dataShards = dataShards
+ enc.parityShards = parityShards
+ enc.shardSize = dataShards + parityShards
+ enc.paws = 0xffffffff / uint32(enc.shardSize) * uint32(enc.shardSize)
+ enc.headerOffset = offset
+ enc.payloadOffset = enc.headerOffset + fecHeaderSize
+
+ codec, err := reedsolomon.New(dataShards, parityShards)
+ if err != nil {
+ return nil
+ }
+ enc.codec = codec
+
+ // caches
+ enc.encodeCache = make([][]byte, enc.shardSize)
+ enc.shardCache = make([][]byte, enc.shardSize)
+ for k := range enc.shardCache {
+ enc.shardCache[k] = make([]byte, mtuLimit)
+ }
+ enc.zeros = make([]byte, mtuLimit)
+ return enc
+}
+
+// encodes the packet, outputs parity shards if we have collected quorum datashards
+// notice: the contents of 'ps' will be re-written in successive calling
+func (enc *fecEncoder) encode(b []byte) (ps [][]byte) {
+ // The header format:
+ // | FEC SEQID(4B) | FEC TYPE(2B) | SIZE (2B) | PAYLOAD(SIZE-2) |
+ // |<-headerOffset |<-payloadOffset
+ enc.markData(b[enc.headerOffset:])
+ binary.LittleEndian.PutUint16(b[enc.payloadOffset:], uint16(len(b[enc.payloadOffset:])))
+
+ // copy data from payloadOffset to fec shard cache
+ sz := len(b)
+ enc.shardCache[enc.shardCount] = enc.shardCache[enc.shardCount][:sz]
+ copy(enc.shardCache[enc.shardCount][enc.payloadOffset:], b[enc.payloadOffset:])
+ enc.shardCount++
+
+ // track max datashard length
+ if sz > enc.maxSize {
+ enc.maxSize = sz
+ }
+
+ // Generation of Reed-Solomon Erasure Code
+ if enc.shardCount == enc.dataShards {
+ // fill '0' into the tail of each datashard
+ for i := 0; i < enc.dataShards; i++ {
+ shard := enc.shardCache[i]
+ slen := len(shard)
+ copy(shard[slen:enc.maxSize], enc.zeros)
+ }
+
+ // construct equal-sized slice with stripped header
+ cache := enc.encodeCache
+ for k := range cache {
+ cache[k] = enc.shardCache[k][enc.payloadOffset:enc.maxSize]
+ }
+
+ // encoding
+ if err := enc.codec.Encode(cache); err == nil {
+ ps = enc.shardCache[enc.dataShards:]
+ for k := range ps {
+ enc.markParity(ps[k][enc.headerOffset:])
+ ps[k] = ps[k][:enc.maxSize]
+ }
+ }
+
+ // counters resetting
+ enc.shardCount = 0
+ enc.maxSize = 0
+ }
+
+ return
+}
+
+func (enc *fecEncoder) markData(data []byte) {
+ binary.LittleEndian.PutUint32(data, enc.next)
+ binary.LittleEndian.PutUint16(data[4:], typeData)
+ enc.next++
+}
+
+func (enc *fecEncoder) markParity(data []byte) {
+ binary.LittleEndian.PutUint32(data, enc.next)
+ binary.LittleEndian.PutUint16(data[4:], typeParity)
+ // sequence wrap will only happen at parity shard
+ enc.next = (enc.next + 1) % enc.paws
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/flame.png b/vendor/github.com/xtaci/kcp-go/v5/flame.png
new file mode 100644
index 0000000..672f649
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/flame.png
Binary files differ
diff --git a/vendor/github.com/xtaci/kcp-go/v5/frame.png b/vendor/github.com/xtaci/kcp-go/v5/frame.png
new file mode 100644
index 0000000..0b0aefd
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/frame.png
Binary files differ
diff --git a/vendor/github.com/xtaci/kcp-go/v5/go.mod b/vendor/github.com/xtaci/kcp-go/v5/go.mod
new file mode 100644
index 0000000..ff51020
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/go.mod
@@ -0,0 +1,20 @@
+module github.com/xtaci/kcp-go/v5
+
+require (
+ github.com/klauspost/cpuid v1.3.1 // indirect
+ github.com/klauspost/reedsolomon v1.9.9
+ github.com/mmcloughlin/avo v0.0.0-20200803215136-443f81d77104 // indirect
+ github.com/pkg/errors v0.9.1
+ github.com/stretchr/testify v1.6.1
+ github.com/templexxx/cpu v0.0.7 // indirect
+ github.com/templexxx/xorsimd v0.4.1
+ github.com/tjfoc/gmsm v1.3.2
+ github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae
+ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
+ golang.org/x/net v0.0.0-20200707034311-ab3426394381
+ golang.org/x/sys v0.0.0-20200808120158-1030fc2bf1d9 // indirect
+ golang.org/x/tools v0.0.0-20200808161706-5bf02b21f123 // indirect
+ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
+)
+
+go 1.13
diff --git a/vendor/github.com/xtaci/kcp-go/v5/go.sum b/vendor/github.com/xtaci/kcp-go/v5/go.sum
new file mode 100644
index 0000000..db81c71
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/go.sum
@@ -0,0 +1,69 @@
+github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/klauspost/cpuid v1.2.4/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
+github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s=
+github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4=
+github.com/klauspost/reedsolomon v1.9.9 h1:qCL7LZlv17xMixl55nq2/Oa1Y86nfO8EqDfv2GHND54=
+github.com/klauspost/reedsolomon v1.9.9/go.mod h1:O7yFFHiQwDR6b2t63KPUpccPtNdp5ADgh1gg4fd12wo=
+github.com/mmcloughlin/avo v0.0.0-20200803215136-443f81d77104 h1:ULR/QWMgcgRiZLUjSSJMU+fW+RDMstRdmnDWj9Q+AsA=
+github.com/mmcloughlin/avo v0.0.0-20200803215136-443f81d77104/go.mod h1:wqKykBG2QzQDJEzvRkcS8x6MiSJkF52hXZsXcjaB3ls=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/templexxx/cpu v0.0.1 h1:hY4WdLOgKdc8y13EYklu9OUTXik80BkxHoWvTO6MQQY=
+github.com/templexxx/cpu v0.0.1/go.mod h1:w7Tb+7qgcAlIyX4NhLuDKt78AHA5SzPmq0Wj6HiEnnk=
+github.com/templexxx/cpu v0.0.7 h1:pUEZn8JBy/w5yzdYWgx+0m0xL9uk6j4K91C5kOViAzo=
+github.com/templexxx/cpu v0.0.7/go.mod h1:w7Tb+7qgcAlIyX4NhLuDKt78AHA5SzPmq0Wj6HiEnnk=
+github.com/templexxx/xorsimd v0.4.1 h1:iUZcywbOYDRAZUasAs2eSCUW8eobuZDy0I9FJiORkVg=
+github.com/templexxx/xorsimd v0.4.1/go.mod h1:W+ffZz8jJMH2SXwuKu9WhygqBMbFnp14G2fqEr8qaNo=
+github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM=
+github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w=
+github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae h1:J0GxkO96kL4WF+AIT3M4mfUVinOCPgf2uUWYFUzN0sM=
+github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae/go.mod h1:gXtu8J62kEgmN++bm9BVICuT/e8yiLI2KFobd/TRFsE=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+golang.org/x/arch v0.0.0-20190909030613-46d78d1859ac/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt572qowuyMDMJLLm3Db3ig=
+golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU=
+golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200808120158-1030fc2bf1d9 h1:yi1hN8dcqI9l8klZfy4B8mJvFmmAxJEePIQQFNSd7Cs=
+golang.org/x/sys v0.0.0-20200808120158-1030fc2bf1d9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20200425043458-8463f397d07c h1:iHhCR0b26amDCiiO+kBguKZom9aMF+NrFxh9zeKR/XU=
+golang.org/x/tools v0.0.0-20200425043458-8463f397d07c/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200808161706-5bf02b21f123 h1:4JSJPND/+4555t1HfXYF4UEqDqiSKCgeV0+hbA8hMs4=
+golang.org/x/tools v0.0.0-20200808161706-5bf02b21f123/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
diff --git a/vendor/github.com/xtaci/kcp-go/v5/kcp-go.png b/vendor/github.com/xtaci/kcp-go/v5/kcp-go.png
new file mode 100644
index 0000000..151b7c4
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/kcp-go.png
Binary files differ
diff --git a/vendor/github.com/xtaci/kcp-go/v5/kcp.go b/vendor/github.com/xtaci/kcp-go/v5/kcp.go
new file mode 100644
index 0000000..0c6c304
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/kcp.go
@@ -0,0 +1,1080 @@
+package kcp
+
+import (
+ "encoding/binary"
+ "sync/atomic"
+ "time"
+)
+
+const (
+ IKCP_RTO_NDL = 30 // no delay min rto
+ IKCP_RTO_MIN = 100 // normal min rto
+ IKCP_RTO_DEF = 200
+ IKCP_RTO_MAX = 60000
+ IKCP_CMD_PUSH = 81 // cmd: push data
+ IKCP_CMD_ACK = 82 // cmd: ack
+ IKCP_CMD_WASK = 83 // cmd: window probe (ask)
+ IKCP_CMD_WINS = 84 // cmd: window size (tell)
+ IKCP_ASK_SEND = 1 // need to send IKCP_CMD_WASK
+ IKCP_ASK_TELL = 2 // need to send IKCP_CMD_WINS
+ IKCP_WND_SND = 32
+ IKCP_WND_RCV = 32
+ IKCP_MTU_DEF = 1400
+ IKCP_ACK_FAST = 3
+ IKCP_INTERVAL = 100
+ IKCP_OVERHEAD = 24
+ IKCP_DEADLINK = 20
+ IKCP_THRESH_INIT = 2
+ IKCP_THRESH_MIN = 2
+ IKCP_PROBE_INIT = 7000 // 7 secs to probe window size
+ IKCP_PROBE_LIMIT = 120000 // up to 120 secs to probe window
+ IKCP_SN_OFFSET = 12
+)
+
+// monotonic reference time point
+var refTime time.Time = time.Now()
+
+// currentMs returns current elapsed monotonic milliseconds since program startup
+func currentMs() uint32 { return uint32(time.Since(refTime) / time.Millisecond) }
+
+// output_callback is a prototype which ought capture conn and call conn.Write
+type output_callback func(buf []byte, size int)
+
+/* encode 8 bits unsigned int */
+func ikcp_encode8u(p []byte, c byte) []byte {
+ p[0] = c
+ return p[1:]
+}
+
+/* decode 8 bits unsigned int */
+func ikcp_decode8u(p []byte, c *byte) []byte {
+ *c = p[0]
+ return p[1:]
+}
+
+/* encode 16 bits unsigned int (lsb) */
+func ikcp_encode16u(p []byte, w uint16) []byte {
+ binary.LittleEndian.PutUint16(p, w)
+ return p[2:]
+}
+
+/* decode 16 bits unsigned int (lsb) */
+func ikcp_decode16u(p []byte, w *uint16) []byte {
+ *w = binary.LittleEndian.Uint16(p)
+ return p[2:]
+}
+
+/* encode 32 bits unsigned int (lsb) */
+func ikcp_encode32u(p []byte, l uint32) []byte {
+ binary.LittleEndian.PutUint32(p, l)
+ return p[4:]
+}
+
+/* decode 32 bits unsigned int (lsb) */
+func ikcp_decode32u(p []byte, l *uint32) []byte {
+ *l = binary.LittleEndian.Uint32(p)
+ return p[4:]
+}
+
+func _imin_(a, b uint32) uint32 {
+ if a <= b {
+ return a
+ }
+ return b
+}
+
+func _imax_(a, b uint32) uint32 {
+ if a >= b {
+ return a
+ }
+ return b
+}
+
+func _ibound_(lower, middle, upper uint32) uint32 {
+ return _imin_(_imax_(lower, middle), upper)
+}
+
+func _itimediff(later, earlier uint32) int32 {
+ return (int32)(later - earlier)
+}
+
+// segment defines a KCP segment
+type segment struct {
+ conv uint32
+ cmd uint8
+ frg uint8
+ wnd uint16
+ ts uint32
+ sn uint32
+ una uint32
+ rto uint32
+ xmit uint32
+ resendts uint32
+ fastack uint32
+ acked uint32 // mark if the seg has acked
+ data []byte
+}
+
+// encode a segment into buffer
+func (seg *segment) encode(ptr []byte) []byte {
+ ptr = ikcp_encode32u(ptr, seg.conv)
+ ptr = ikcp_encode8u(ptr, seg.cmd)
+ ptr = ikcp_encode8u(ptr, seg.frg)
+ ptr = ikcp_encode16u(ptr, seg.wnd)
+ ptr = ikcp_encode32u(ptr, seg.ts)
+ ptr = ikcp_encode32u(ptr, seg.sn)
+ ptr = ikcp_encode32u(ptr, seg.una)
+ ptr = ikcp_encode32u(ptr, uint32(len(seg.data)))
+ atomic.AddUint64(&DefaultSnmp.OutSegs, 1)
+ return ptr
+}
+
+// KCP defines a single KCP connection
+type KCP struct {
+ conv, mtu, mss, state uint32
+ snd_una, snd_nxt, rcv_nxt uint32
+ ssthresh uint32
+ rx_rttvar, rx_srtt int32
+ rx_rto, rx_minrto uint32
+ snd_wnd, rcv_wnd, rmt_wnd, cwnd, probe uint32
+ interval, ts_flush uint32
+ nodelay, updated uint32
+ ts_probe, probe_wait uint32
+ dead_link, incr uint32
+
+ fastresend int32
+ nocwnd, stream int32
+
+ snd_queue []segment
+ rcv_queue []segment
+ snd_buf []segment
+ rcv_buf []segment
+
+ acklist []ackItem
+
+ buffer []byte
+ reserved int
+ output output_callback
+}
+
+type ackItem struct {
+ sn uint32
+ ts uint32
+}
+
+// NewKCP create a new kcp state machine
+//
+// 'conv' must be equal in the connection peers, or else data will be silently rejected.
+//
+// 'output' function will be called whenever these is data to be sent on wire.
+func NewKCP(conv uint32, output output_callback) *KCP {
+ kcp := new(KCP)
+ kcp.conv = conv
+ kcp.snd_wnd = IKCP_WND_SND
+ kcp.rcv_wnd = IKCP_WND_RCV
+ kcp.rmt_wnd = IKCP_WND_RCV
+ kcp.mtu = IKCP_MTU_DEF
+ kcp.mss = kcp.mtu - IKCP_OVERHEAD
+ kcp.buffer = make([]byte, kcp.mtu)
+ kcp.rx_rto = IKCP_RTO_DEF
+ kcp.rx_minrto = IKCP_RTO_MIN
+ kcp.interval = IKCP_INTERVAL
+ kcp.ts_flush = IKCP_INTERVAL
+ kcp.ssthresh = IKCP_THRESH_INIT
+ kcp.dead_link = IKCP_DEADLINK
+ kcp.output = output
+ return kcp
+}
+
+// newSegment creates a KCP segment
+func (kcp *KCP) newSegment(size int) (seg segment) {
+ seg.data = xmitBuf.Get().([]byte)[:size]
+ return
+}
+
+// delSegment recycles a KCP segment
+func (kcp *KCP) delSegment(seg *segment) {
+ if seg.data != nil {
+ xmitBuf.Put(seg.data)
+ seg.data = nil
+ }
+}
+
+// ReserveBytes keeps n bytes untouched from the beginning of the buffer,
+// the output_callback function should be aware of this.
+//
+// Return false if n >= mss
+func (kcp *KCP) ReserveBytes(n int) bool {
+ if n >= int(kcp.mtu-IKCP_OVERHEAD) || n < 0 {
+ return false
+ }
+ kcp.reserved = n
+ kcp.mss = kcp.mtu - IKCP_OVERHEAD - uint32(n)
+ return true
+}
+
+// PeekSize checks the size of next message in the recv queue
+func (kcp *KCP) PeekSize() (length int) {
+ if len(kcp.rcv_queue) == 0 {
+ return -1
+ }
+
+ seg := &kcp.rcv_queue[0]
+ if seg.frg == 0 {
+ return len(seg.data)
+ }
+
+ if len(kcp.rcv_queue) < int(seg.frg+1) {
+ return -1
+ }
+
+ for k := range kcp.rcv_queue {
+ seg := &kcp.rcv_queue[k]
+ length += len(seg.data)
+ if seg.frg == 0 {
+ break
+ }
+ }
+ return
+}
+
+// Receive data from kcp state machine
+//
+// Return number of bytes read.
+//
+// Return -1 when there is no readable data.
+//
+// Return -2 if len(buffer) is smaller than kcp.PeekSize().
+func (kcp *KCP) Recv(buffer []byte) (n int) {
+ peeksize := kcp.PeekSize()
+ if peeksize < 0 {
+ return -1
+ }
+
+ if peeksize > len(buffer) {
+ return -2
+ }
+
+ var fast_recover bool
+ if len(kcp.rcv_queue) >= int(kcp.rcv_wnd) {
+ fast_recover = true
+ }
+
+ // merge fragment
+ count := 0
+ for k := range kcp.rcv_queue {
+ seg := &kcp.rcv_queue[k]
+ copy(buffer, seg.data)
+ buffer = buffer[len(seg.data):]
+ n += len(seg.data)
+ count++
+ kcp.delSegment(seg)
+ if seg.frg == 0 {
+ break
+ }
+ }
+ if count > 0 {
+ kcp.rcv_queue = kcp.remove_front(kcp.rcv_queue, count)
+ }
+
+ // move available data from rcv_buf -> rcv_queue
+ count = 0
+ for k := range kcp.rcv_buf {
+ seg := &kcp.rcv_buf[k]
+ if seg.sn == kcp.rcv_nxt && len(kcp.rcv_queue)+count < int(kcp.rcv_wnd) {
+ kcp.rcv_nxt++
+ count++
+ } else {
+ break
+ }
+ }
+
+ if count > 0 {
+ kcp.rcv_queue = append(kcp.rcv_queue, kcp.rcv_buf[:count]...)
+ kcp.rcv_buf = kcp.remove_front(kcp.rcv_buf, count)
+ }
+
+ // fast recover
+ if len(kcp.rcv_queue) < int(kcp.rcv_wnd) && fast_recover {
+ // ready to send back IKCP_CMD_WINS in ikcp_flush
+ // tell remote my window size
+ kcp.probe |= IKCP_ASK_TELL
+ }
+ return
+}
+
+// Send is user/upper level send, returns below zero for error
+func (kcp *KCP) Send(buffer []byte) int {
+ var count int
+ if len(buffer) == 0 {
+ return -1
+ }
+
+ // append to previous segment in streaming mode (if possible)
+ if kcp.stream != 0 {
+ n := len(kcp.snd_queue)
+ if n > 0 {
+ seg := &kcp.snd_queue[n-1]
+ if len(seg.data) < int(kcp.mss) {
+ capacity := int(kcp.mss) - len(seg.data)
+ extend := capacity
+ if len(buffer) < capacity {
+ extend = len(buffer)
+ }
+
+ // grow slice, the underlying cap is guaranteed to
+ // be larger than kcp.mss
+ oldlen := len(seg.data)
+ seg.data = seg.data[:oldlen+extend]
+ copy(seg.data[oldlen:], buffer)
+ buffer = buffer[extend:]
+ }
+ }
+
+ if len(buffer) == 0 {
+ return 0
+ }
+ }
+
+ if len(buffer) <= int(kcp.mss) {
+ count = 1
+ } else {
+ count = (len(buffer) + int(kcp.mss) - 1) / int(kcp.mss)
+ }
+
+ if count > 255 {
+ return -2
+ }
+
+ if count == 0 {
+ count = 1
+ }
+
+ for i := 0; i < count; i++ {
+ var size int
+ if len(buffer) > int(kcp.mss) {
+ size = int(kcp.mss)
+ } else {
+ size = len(buffer)
+ }
+ seg := kcp.newSegment(size)
+ copy(seg.data, buffer[:size])
+ if kcp.stream == 0 { // message mode
+ seg.frg = uint8(count - i - 1)
+ } else { // stream mode
+ seg.frg = 0
+ }
+ kcp.snd_queue = append(kcp.snd_queue, seg)
+ buffer = buffer[size:]
+ }
+ return 0
+}
+
+func (kcp *KCP) update_ack(rtt int32) {
+ // https://tools.ietf.org/html/rfc6298
+ var rto uint32
+ if kcp.rx_srtt == 0 {
+ kcp.rx_srtt = rtt
+ kcp.rx_rttvar = rtt >> 1
+ } else {
+ delta := rtt - kcp.rx_srtt
+ kcp.rx_srtt += delta >> 3
+ if delta < 0 {
+ delta = -delta
+ }
+ if rtt < kcp.rx_srtt-kcp.rx_rttvar {
+ // if the new RTT sample is below the bottom of the range of
+ // what an RTT measurement is expected to be.
+ // give an 8x reduced weight versus its normal weighting
+ kcp.rx_rttvar += (delta - kcp.rx_rttvar) >> 5
+ } else {
+ kcp.rx_rttvar += (delta - kcp.rx_rttvar) >> 2
+ }
+ }
+ rto = uint32(kcp.rx_srtt) + _imax_(kcp.interval, uint32(kcp.rx_rttvar)<<2)
+ kcp.rx_rto = _ibound_(kcp.rx_minrto, rto, IKCP_RTO_MAX)
+}
+
+func (kcp *KCP) shrink_buf() {
+ if len(kcp.snd_buf) > 0 {
+ seg := &kcp.snd_buf[0]
+ kcp.snd_una = seg.sn
+ } else {
+ kcp.snd_una = kcp.snd_nxt
+ }
+}
+
+func (kcp *KCP) parse_ack(sn uint32) {
+ if _itimediff(sn, kcp.snd_una) < 0 || _itimediff(sn, kcp.snd_nxt) >= 0 {
+ return
+ }
+
+ for k := range kcp.snd_buf {
+ seg := &kcp.snd_buf[k]
+ if sn == seg.sn {
+ // mark and free space, but leave the segment here,
+ // and wait until `una` to delete this, then we don't
+ // have to shift the segments behind forward,
+ // which is an expensive operation for large window
+ seg.acked = 1
+ kcp.delSegment(seg)
+ break
+ }
+ if _itimediff(sn, seg.sn) < 0 {
+ break
+ }
+ }
+}
+
+func (kcp *KCP) parse_fastack(sn, ts uint32) {
+ if _itimediff(sn, kcp.snd_una) < 0 || _itimediff(sn, kcp.snd_nxt) >= 0 {
+ return
+ }
+
+ for k := range kcp.snd_buf {
+ seg := &kcp.snd_buf[k]
+ if _itimediff(sn, seg.sn) < 0 {
+ break
+ } else if sn != seg.sn && _itimediff(seg.ts, ts) <= 0 {
+ seg.fastack++
+ }
+ }
+}
+
+func (kcp *KCP) parse_una(una uint32) int {
+ count := 0
+ for k := range kcp.snd_buf {
+ seg := &kcp.snd_buf[k]
+ if _itimediff(una, seg.sn) > 0 {
+ kcp.delSegment(seg)
+ count++
+ } else {
+ break
+ }
+ }
+ if count > 0 {
+ kcp.snd_buf = kcp.remove_front(kcp.snd_buf, count)
+ }
+ return count
+}
+
+// ack append
+func (kcp *KCP) ack_push(sn, ts uint32) {
+ kcp.acklist = append(kcp.acklist, ackItem{sn, ts})
+}
+
+// returns true if data has repeated
+func (kcp *KCP) parse_data(newseg segment) bool {
+ sn := newseg.sn
+ if _itimediff(sn, kcp.rcv_nxt+kcp.rcv_wnd) >= 0 ||
+ _itimediff(sn, kcp.rcv_nxt) < 0 {
+ return true
+ }
+
+ n := len(kcp.rcv_buf) - 1
+ insert_idx := 0
+ repeat := false
+ for i := n; i >= 0; i-- {
+ seg := &kcp.rcv_buf[i]
+ if seg.sn == sn {
+ repeat = true
+ break
+ }
+ if _itimediff(sn, seg.sn) > 0 {
+ insert_idx = i + 1
+ break
+ }
+ }
+
+ if !repeat {
+ // replicate the content if it's new
+ dataCopy := xmitBuf.Get().([]byte)[:len(newseg.data)]
+ copy(dataCopy, newseg.data)
+ newseg.data = dataCopy
+
+ if insert_idx == n+1 {
+ kcp.rcv_buf = append(kcp.rcv_buf, newseg)
+ } else {
+ kcp.rcv_buf = append(kcp.rcv_buf, segment{})
+ copy(kcp.rcv_buf[insert_idx+1:], kcp.rcv_buf[insert_idx:])
+ kcp.rcv_buf[insert_idx] = newseg
+ }
+ }
+
+ // move available data from rcv_buf -> rcv_queue
+ count := 0
+ for k := range kcp.rcv_buf {
+ seg := &kcp.rcv_buf[k]
+ if seg.sn == kcp.rcv_nxt && len(kcp.rcv_queue)+count < int(kcp.rcv_wnd) {
+ kcp.rcv_nxt++
+ count++
+ } else {
+ break
+ }
+ }
+ if count > 0 {
+ kcp.rcv_queue = append(kcp.rcv_queue, kcp.rcv_buf[:count]...)
+ kcp.rcv_buf = kcp.remove_front(kcp.rcv_buf, count)
+ }
+
+ return repeat
+}
+
+// Input a packet into kcp state machine.
+//
+// 'regular' indicates it's a real data packet from remote, and it means it's not generated from ReedSolomon
+// codecs.
+//
+// 'ackNoDelay' will trigger immediate ACK, but surely it will not be efficient in bandwidth
+func (kcp *KCP) Input(data []byte, regular, ackNoDelay bool) int {
+ snd_una := kcp.snd_una
+ if len(data) < IKCP_OVERHEAD {
+ return -1
+ }
+
+ var latest uint32 // the latest ack packet
+ var flag int
+ var inSegs uint64
+ var windowSlides bool
+
+ for {
+ var ts, sn, length, una, conv uint32
+ var wnd uint16
+ var cmd, frg uint8
+
+ if len(data) < int(IKCP_OVERHEAD) {
+ break
+ }
+
+ data = ikcp_decode32u(data, &conv)
+ if conv != kcp.conv {
+ return -1
+ }
+
+ data = ikcp_decode8u(data, &cmd)
+ data = ikcp_decode8u(data, &frg)
+ data = ikcp_decode16u(data, &wnd)
+ data = ikcp_decode32u(data, &ts)
+ data = ikcp_decode32u(data, &sn)
+ data = ikcp_decode32u(data, &una)
+ data = ikcp_decode32u(data, &length)
+ if len(data) < int(length) {
+ return -2
+ }
+
+ if cmd != IKCP_CMD_PUSH && cmd != IKCP_CMD_ACK &&
+ cmd != IKCP_CMD_WASK && cmd != IKCP_CMD_WINS {
+ return -3
+ }
+
+ // only trust window updates from regular packets. i.e: latest update
+ if regular {
+ kcp.rmt_wnd = uint32(wnd)
+ }
+ if kcp.parse_una(una) > 0 {
+ windowSlides = true
+ }
+ kcp.shrink_buf()
+
+ if cmd == IKCP_CMD_ACK {
+ kcp.parse_ack(sn)
+ kcp.parse_fastack(sn, ts)
+ flag |= 1
+ latest = ts
+ } else if cmd == IKCP_CMD_PUSH {
+ repeat := true
+ if _itimediff(sn, kcp.rcv_nxt+kcp.rcv_wnd) < 0 {
+ kcp.ack_push(sn, ts)
+ if _itimediff(sn, kcp.rcv_nxt) >= 0 {
+ var seg segment
+ seg.conv = conv
+ seg.cmd = cmd
+ seg.frg = frg
+ seg.wnd = wnd
+ seg.ts = ts
+ seg.sn = sn
+ seg.una = una
+ seg.data = data[:length] // delayed data copying
+ repeat = kcp.parse_data(seg)
+ }
+ }
+ if regular && repeat {
+ atomic.AddUint64(&DefaultSnmp.RepeatSegs, 1)
+ }
+ } else if cmd == IKCP_CMD_WASK {
+ // ready to send back IKCP_CMD_WINS in Ikcp_flush
+ // tell remote my window size
+ kcp.probe |= IKCP_ASK_TELL
+ } else if cmd == IKCP_CMD_WINS {
+ // do nothing
+ } else {
+ return -3
+ }
+
+ inSegs++
+ data = data[length:]
+ }
+ atomic.AddUint64(&DefaultSnmp.InSegs, inSegs)
+
+ // update rtt with the latest ts
+ // ignore the FEC packet
+ if flag != 0 && regular {
+ current := currentMs()
+ if _itimediff(current, latest) >= 0 {
+ kcp.update_ack(_itimediff(current, latest))
+ }
+ }
+
+ // cwnd update when packet arrived
+ if kcp.nocwnd == 0 {
+ if _itimediff(kcp.snd_una, snd_una) > 0 {
+ if kcp.cwnd < kcp.rmt_wnd {
+ mss := kcp.mss
+ if kcp.cwnd < kcp.ssthresh {
+ kcp.cwnd++
+ kcp.incr += mss
+ } else {
+ if kcp.incr < mss {
+ kcp.incr = mss
+ }
+ kcp.incr += (mss*mss)/kcp.incr + (mss / 16)
+ if (kcp.cwnd+1)*mss <= kcp.incr {
+ if mss > 0 {
+ kcp.cwnd = (kcp.incr + mss - 1) / mss
+ } else {
+ kcp.cwnd = kcp.incr + mss - 1
+ }
+ }
+ }
+ if kcp.cwnd > kcp.rmt_wnd {
+ kcp.cwnd = kcp.rmt_wnd
+ kcp.incr = kcp.rmt_wnd * mss
+ }
+ }
+ }
+ }
+
+ if windowSlides { // if window has slided, flush
+ kcp.flush(false)
+ } else if ackNoDelay && len(kcp.acklist) > 0 { // ack immediately
+ kcp.flush(true)
+ }
+ return 0
+}
+
+func (kcp *KCP) wnd_unused() uint16 {
+ if len(kcp.rcv_queue) < int(kcp.rcv_wnd) {
+ return uint16(int(kcp.rcv_wnd) - len(kcp.rcv_queue))
+ }
+ return 0
+}
+
+// flush pending data
+func (kcp *KCP) flush(ackOnly bool) uint32 {
+ var seg segment
+ seg.conv = kcp.conv
+ seg.cmd = IKCP_CMD_ACK
+ seg.wnd = kcp.wnd_unused()
+ seg.una = kcp.rcv_nxt
+
+ buffer := kcp.buffer
+ ptr := buffer[kcp.reserved:] // keep n bytes untouched
+
+ // makeSpace makes room for writing
+ makeSpace := func(space int) {
+ size := len(buffer) - len(ptr)
+ if size+space > int(kcp.mtu) {
+ kcp.output(buffer, size)
+ ptr = buffer[kcp.reserved:]
+ }
+ }
+
+ // flush bytes in buffer if there is any
+ flushBuffer := func() {
+ size := len(buffer) - len(ptr)
+ if size > kcp.reserved {
+ kcp.output(buffer, size)
+ }
+ }
+
+ // flush acknowledges
+ for i, ack := range kcp.acklist {
+ makeSpace(IKCP_OVERHEAD)
+ // filter jitters caused by bufferbloat
+ if _itimediff(ack.sn, kcp.rcv_nxt) >= 0 || len(kcp.acklist)-1 == i {
+ seg.sn, seg.ts = ack.sn, ack.ts
+ ptr = seg.encode(ptr)
+ }
+ }
+ kcp.acklist = kcp.acklist[0:0]
+
+ if ackOnly { // flash remain ack segments
+ flushBuffer()
+ return kcp.interval
+ }
+
+ // probe window size (if remote window size equals zero)
+ if kcp.rmt_wnd == 0 {
+ current := currentMs()
+ if kcp.probe_wait == 0 {
+ kcp.probe_wait = IKCP_PROBE_INIT
+ kcp.ts_probe = current + kcp.probe_wait
+ } else {
+ if _itimediff(current, kcp.ts_probe) >= 0 {
+ if kcp.probe_wait < IKCP_PROBE_INIT {
+ kcp.probe_wait = IKCP_PROBE_INIT
+ }
+ kcp.probe_wait += kcp.probe_wait / 2
+ if kcp.probe_wait > IKCP_PROBE_LIMIT {
+ kcp.probe_wait = IKCP_PROBE_LIMIT
+ }
+ kcp.ts_probe = current + kcp.probe_wait
+ kcp.probe |= IKCP_ASK_SEND
+ }
+ }
+ } else {
+ kcp.ts_probe = 0
+ kcp.probe_wait = 0
+ }
+
+ // flush window probing commands
+ if (kcp.probe & IKCP_ASK_SEND) != 0 {
+ seg.cmd = IKCP_CMD_WASK
+ makeSpace(IKCP_OVERHEAD)
+ ptr = seg.encode(ptr)
+ }
+
+ // flush window probing commands
+ if (kcp.probe & IKCP_ASK_TELL) != 0 {
+ seg.cmd = IKCP_CMD_WINS
+ makeSpace(IKCP_OVERHEAD)
+ ptr = seg.encode(ptr)
+ }
+
+ kcp.probe = 0
+
+ // calculate window size
+ cwnd := _imin_(kcp.snd_wnd, kcp.rmt_wnd)
+ if kcp.nocwnd == 0 {
+ cwnd = _imin_(kcp.cwnd, cwnd)
+ }
+
+ // sliding window, controlled by snd_nxt && sna_una+cwnd
+ newSegsCount := 0
+ for k := range kcp.snd_queue {
+ if _itimediff(kcp.snd_nxt, kcp.snd_una+cwnd) >= 0 {
+ break
+ }
+ newseg := kcp.snd_queue[k]
+ newseg.conv = kcp.conv
+ newseg.cmd = IKCP_CMD_PUSH
+ newseg.sn = kcp.snd_nxt
+ kcp.snd_buf = append(kcp.snd_buf, newseg)
+ kcp.snd_nxt++
+ newSegsCount++
+ }
+ if newSegsCount > 0 {
+ kcp.snd_queue = kcp.remove_front(kcp.snd_queue, newSegsCount)
+ }
+
+ // calculate resent
+ resent := uint32(kcp.fastresend)
+ if kcp.fastresend <= 0 {
+ resent = 0xffffffff
+ }
+
+ // check for retransmissions
+ current := currentMs()
+ var change, lostSegs, fastRetransSegs, earlyRetransSegs uint64
+ minrto := int32(kcp.interval)
+
+ ref := kcp.snd_buf[:len(kcp.snd_buf)] // for bounds check elimination
+ for k := range ref {
+ segment := &ref[k]
+ needsend := false
+ if segment.acked == 1 {
+ continue
+ }
+ if segment.xmit == 0 { // initial transmit
+ needsend = true
+ segment.rto = kcp.rx_rto
+ segment.resendts = current + segment.rto
+ } else if segment.fastack >= resent { // fast retransmit
+ needsend = true
+ segment.fastack = 0
+ segment.rto = kcp.rx_rto
+ segment.resendts = current + segment.rto
+ change++
+ fastRetransSegs++
+ } else if segment.fastack > 0 && newSegsCount == 0 { // early retransmit
+ needsend = true
+ segment.fastack = 0
+ segment.rto = kcp.rx_rto
+ segment.resendts = current + segment.rto
+ change++
+ earlyRetransSegs++
+ } else if _itimediff(current, segment.resendts) >= 0 { // RTO
+ needsend = true
+ if kcp.nodelay == 0 {
+ segment.rto += kcp.rx_rto
+ } else {
+ segment.rto += kcp.rx_rto / 2
+ }
+ segment.fastack = 0
+ segment.resendts = current + segment.rto
+ lostSegs++
+ }
+
+ if needsend {
+ current = currentMs()
+ segment.xmit++
+ segment.ts = current
+ segment.wnd = seg.wnd
+ segment.una = seg.una
+
+ need := IKCP_OVERHEAD + len(segment.data)
+ makeSpace(need)
+ ptr = segment.encode(ptr)
+ copy(ptr, segment.data)
+ ptr = ptr[len(segment.data):]
+
+ if segment.xmit >= kcp.dead_link {
+ kcp.state = 0xFFFFFFFF
+ }
+ }
+
+ // get the nearest rto
+ if rto := _itimediff(segment.resendts, current); rto > 0 && rto < minrto {
+ minrto = rto
+ }
+ }
+
+ // flash remain segments
+ flushBuffer()
+
+ // counter updates
+ sum := lostSegs
+ if lostSegs > 0 {
+ atomic.AddUint64(&DefaultSnmp.LostSegs, lostSegs)
+ }
+ if fastRetransSegs > 0 {
+ atomic.AddUint64(&DefaultSnmp.FastRetransSegs, fastRetransSegs)
+ sum += fastRetransSegs
+ }
+ if earlyRetransSegs > 0 {
+ atomic.AddUint64(&DefaultSnmp.EarlyRetransSegs, earlyRetransSegs)
+ sum += earlyRetransSegs
+ }
+ if sum > 0 {
+ atomic.AddUint64(&DefaultSnmp.RetransSegs, sum)
+ }
+
+ // cwnd update
+ if kcp.nocwnd == 0 {
+ // update ssthresh
+ // rate halving, https://tools.ietf.org/html/rfc6937
+ if change > 0 {
+ inflight := kcp.snd_nxt - kcp.snd_una
+ kcp.ssthresh = inflight / 2
+ if kcp.ssthresh < IKCP_THRESH_MIN {
+ kcp.ssthresh = IKCP_THRESH_MIN
+ }
+ kcp.cwnd = kcp.ssthresh + resent
+ kcp.incr = kcp.cwnd * kcp.mss
+ }
+
+ // congestion control, https://tools.ietf.org/html/rfc5681
+ if lostSegs > 0 {
+ kcp.ssthresh = cwnd / 2
+ if kcp.ssthresh < IKCP_THRESH_MIN {
+ kcp.ssthresh = IKCP_THRESH_MIN
+ }
+ kcp.cwnd = 1
+ kcp.incr = kcp.mss
+ }
+
+ if kcp.cwnd < 1 {
+ kcp.cwnd = 1
+ kcp.incr = kcp.mss
+ }
+ }
+
+ return uint32(minrto)
+}
+
+// (deprecated)
+//
+// Update updates state (call it repeatedly, every 10ms-100ms), or you can ask
+// ikcp_check when to call it again (without ikcp_input/_send calling).
+// 'current' - current timestamp in millisec.
+func (kcp *KCP) Update() {
+ var slap int32
+
+ current := currentMs()
+ if kcp.updated == 0 {
+ kcp.updated = 1
+ kcp.ts_flush = current
+ }
+
+ slap = _itimediff(current, kcp.ts_flush)
+
+ if slap >= 10000 || slap < -10000 {
+ kcp.ts_flush = current
+ slap = 0
+ }
+
+ if slap >= 0 {
+ kcp.ts_flush += kcp.interval
+ if _itimediff(current, kcp.ts_flush) >= 0 {
+ kcp.ts_flush = current + kcp.interval
+ }
+ kcp.flush(false)
+ }
+}
+
+// (deprecated)
+//
+// Check determines when should you invoke ikcp_update:
+// returns when you should invoke ikcp_update in millisec, if there
+// is no ikcp_input/_send calling. you can call ikcp_update in that
+// time, instead of call update repeatly.
+// Important to reduce unnacessary ikcp_update invoking. use it to
+// schedule ikcp_update (eg. implementing an epoll-like mechanism,
+// or optimize ikcp_update when handling massive kcp connections)
+func (kcp *KCP) Check() uint32 {
+ current := currentMs()
+ ts_flush := kcp.ts_flush
+ tm_flush := int32(0x7fffffff)
+ tm_packet := int32(0x7fffffff)
+ minimal := uint32(0)
+ if kcp.updated == 0 {
+ return current
+ }
+
+ if _itimediff(current, ts_flush) >= 10000 ||
+ _itimediff(current, ts_flush) < -10000 {
+ ts_flush = current
+ }
+
+ if _itimediff(current, ts_flush) >= 0 {
+ return current
+ }
+
+ tm_flush = _itimediff(ts_flush, current)
+
+ for k := range kcp.snd_buf {
+ seg := &kcp.snd_buf[k]
+ diff := _itimediff(seg.resendts, current)
+ if diff <= 0 {
+ return current
+ }
+ if diff < tm_packet {
+ tm_packet = diff
+ }
+ }
+
+ minimal = uint32(tm_packet)
+ if tm_packet >= tm_flush {
+ minimal = uint32(tm_flush)
+ }
+ if minimal >= kcp.interval {
+ minimal = kcp.interval
+ }
+
+ return current + minimal
+}
+
+// SetMtu changes MTU size, default is 1400
+func (kcp *KCP) SetMtu(mtu int) int {
+ if mtu < 50 || mtu < IKCP_OVERHEAD {
+ return -1
+ }
+ if kcp.reserved >= int(kcp.mtu-IKCP_OVERHEAD) || kcp.reserved < 0 {
+ return -1
+ }
+
+ buffer := make([]byte, mtu)
+ if buffer == nil {
+ return -2
+ }
+ kcp.mtu = uint32(mtu)
+ kcp.mss = kcp.mtu - IKCP_OVERHEAD - uint32(kcp.reserved)
+ kcp.buffer = buffer
+ return 0
+}
+
+// NoDelay options
+// fastest: ikcp_nodelay(kcp, 1, 20, 2, 1)
+// nodelay: 0:disable(default), 1:enable
+// interval: internal update timer interval in millisec, default is 100ms
+// resend: 0:disable fast resend(default), 1:enable fast resend
+// nc: 0:normal congestion control(default), 1:disable congestion control
+func (kcp *KCP) NoDelay(nodelay, interval, resend, nc int) int {
+ if nodelay >= 0 {
+ kcp.nodelay = uint32(nodelay)
+ if nodelay != 0 {
+ kcp.rx_minrto = IKCP_RTO_NDL
+ } else {
+ kcp.rx_minrto = IKCP_RTO_MIN
+ }
+ }
+ if interval >= 0 {
+ if interval > 5000 {
+ interval = 5000
+ } else if interval < 10 {
+ interval = 10
+ }
+ kcp.interval = uint32(interval)
+ }
+ if resend >= 0 {
+ kcp.fastresend = int32(resend)
+ }
+ if nc >= 0 {
+ kcp.nocwnd = int32(nc)
+ }
+ return 0
+}
+
+// WndSize sets maximum window size: sndwnd=32, rcvwnd=32 by default
+func (kcp *KCP) WndSize(sndwnd, rcvwnd int) int {
+ if sndwnd > 0 {
+ kcp.snd_wnd = uint32(sndwnd)
+ }
+ if rcvwnd > 0 {
+ kcp.rcv_wnd = uint32(rcvwnd)
+ }
+ return 0
+}
+
+// WaitSnd gets how many packet is waiting to be sent
+func (kcp *KCP) WaitSnd() int {
+ return len(kcp.snd_buf) + len(kcp.snd_queue)
+}
+
+// remove front n elements from queue
+// if the number of elements to remove is more than half of the size.
+// just shift the rear elements to front, otherwise just reslice q to q[n:]
+// then the cost of runtime.growslice can always be less than n/2
+func (kcp *KCP) remove_front(q []segment, n int) []segment {
+ if n > cap(q)/2 {
+ newn := copy(q, q[n:])
+ return q[:newn]
+ }
+ return q[n:]
+}
+
+// Release all cached outgoing segments
+func (kcp *KCP) ReleaseTX() {
+ for k := range kcp.snd_queue {
+ if kcp.snd_queue[k].data != nil {
+ xmitBuf.Put(kcp.snd_queue[k].data)
+ }
+ }
+ for k := range kcp.snd_buf {
+ if kcp.snd_buf[k].data != nil {
+ xmitBuf.Put(kcp.snd_buf[k].data)
+ }
+ }
+ kcp.snd_queue = nil
+ kcp.snd_buf = nil
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/readloop.go b/vendor/github.com/xtaci/kcp-go/v5/readloop.go
new file mode 100644
index 0000000..697395a
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/readloop.go
@@ -0,0 +1,39 @@
+package kcp
+
+import (
+ "sync/atomic"
+
+ "github.com/pkg/errors"
+)
+
+func (s *UDPSession) defaultReadLoop() {
+ buf := make([]byte, mtuLimit)
+ var src string
+ for {
+ if n, addr, err := s.conn.ReadFrom(buf); err == nil {
+ // make sure the packet is from the same source
+ if src == "" { // set source address
+ src = addr.String()
+ } else if addr.String() != src {
+ atomic.AddUint64(&DefaultSnmp.InErrs, 1)
+ continue
+ }
+ s.packetInput(buf[:n])
+ } else {
+ s.notifyReadError(errors.WithStack(err))
+ return
+ }
+ }
+}
+
+func (l *Listener) defaultMonitor() {
+ buf := make([]byte, mtuLimit)
+ for {
+ if n, from, err := l.conn.ReadFrom(buf); err == nil {
+ l.packetInput(buf[:n], from)
+ } else {
+ l.notifyReadError(errors.WithStack(err))
+ return
+ }
+ }
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/readloop_generic.go b/vendor/github.com/xtaci/kcp-go/v5/readloop_generic.go
new file mode 100644
index 0000000..5dbe4f4
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/readloop_generic.go
@@ -0,0 +1,11 @@
+// +build !linux
+
+package kcp
+
+func (s *UDPSession) readLoop() {
+ s.defaultReadLoop()
+}
+
+func (l *Listener) monitor() {
+ l.defaultMonitor()
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/readloop_linux.go b/vendor/github.com/xtaci/kcp-go/v5/readloop_linux.go
new file mode 100644
index 0000000..be194af
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/readloop_linux.go
@@ -0,0 +1,111 @@
+// +build linux
+
+package kcp
+
+import (
+ "net"
+ "os"
+ "sync/atomic"
+
+ "github.com/pkg/errors"
+ "golang.org/x/net/ipv4"
+ "golang.org/x/net/ipv6"
+)
+
+// the read loop for a client session
+func (s *UDPSession) readLoop() {
+ // default version
+ if s.xconn == nil {
+ s.defaultReadLoop()
+ return
+ }
+
+ // x/net version
+ var src string
+ msgs := make([]ipv4.Message, batchSize)
+ for k := range msgs {
+ msgs[k].Buffers = [][]byte{make([]byte, mtuLimit)}
+ }
+
+ for {
+ if count, err := s.xconn.ReadBatch(msgs, 0); err == nil {
+ for i := 0; i < count; i++ {
+ msg := &msgs[i]
+ // make sure the packet is from the same source
+ if src == "" { // set source address if nil
+ src = msg.Addr.String()
+ } else if msg.Addr.String() != src {
+ atomic.AddUint64(&DefaultSnmp.InErrs, 1)
+ continue
+ }
+
+ // source and size has validated
+ s.packetInput(msg.Buffers[0][:msg.N])
+ }
+ } else {
+ // compatibility issue:
+ // for linux kernel<=2.6.32, support for sendmmsg is not available
+ // an error of type os.SyscallError will be returned
+ if operr, ok := err.(*net.OpError); ok {
+ if se, ok := operr.Err.(*os.SyscallError); ok {
+ if se.Syscall == "recvmmsg" {
+ s.defaultReadLoop()
+ return
+ }
+ }
+ }
+ s.notifyReadError(errors.WithStack(err))
+ return
+ }
+ }
+}
+
+// monitor incoming data for all connections of server
+func (l *Listener) monitor() {
+ var xconn batchConn
+ if _, ok := l.conn.(*net.UDPConn); ok {
+ addr, err := net.ResolveUDPAddr("udp", l.conn.LocalAddr().String())
+ if err == nil {
+ if addr.IP.To4() != nil {
+ xconn = ipv4.NewPacketConn(l.conn)
+ } else {
+ xconn = ipv6.NewPacketConn(l.conn)
+ }
+ }
+ }
+
+ // default version
+ if xconn == nil {
+ l.defaultMonitor()
+ return
+ }
+
+ // x/net version
+ msgs := make([]ipv4.Message, batchSize)
+ for k := range msgs {
+ msgs[k].Buffers = [][]byte{make([]byte, mtuLimit)}
+ }
+
+ for {
+ if count, err := xconn.ReadBatch(msgs, 0); err == nil {
+ for i := 0; i < count; i++ {
+ msg := &msgs[i]
+ l.packetInput(msg.Buffers[0][:msg.N], msg.Addr)
+ }
+ } else {
+ // compatibility issue:
+ // for linux kernel<=2.6.32, support for sendmmsg is not available
+ // an error of type os.SyscallError will be returned
+ if operr, ok := err.(*net.OpError); ok {
+ if se, ok := operr.Err.(*os.SyscallError); ok {
+ if se.Syscall == "recvmmsg" {
+ l.defaultMonitor()
+ return
+ }
+ }
+ }
+ l.notifyReadError(errors.WithStack(err))
+ return
+ }
+ }
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/sess.go b/vendor/github.com/xtaci/kcp-go/v5/sess.go
new file mode 100644
index 0000000..2dedd74
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/sess.go
@@ -0,0 +1,1075 @@
+// Package kcp-go is a Reliable-UDP library for golang.
+//
+// This library intents to provide a smooth, resilient, ordered,
+// error-checked and anonymous delivery of streams over UDP packets.
+//
+// The interfaces of this package aims to be compatible with
+// net.Conn in standard library, but offers powerful features for advanced users.
+package kcp
+
+import (
+ "crypto/rand"
+ "encoding/binary"
+ "hash/crc32"
+ "io"
+ "net"
+ "sync"
+ "sync/atomic"
+ "time"
+
+ "github.com/pkg/errors"
+ "golang.org/x/net/ipv4"
+ "golang.org/x/net/ipv6"
+)
+
+const (
+ // 16-bytes nonce for each packet
+ nonceSize = 16
+
+ // 4-bytes packet checksum
+ crcSize = 4
+
+ // overall crypto header size
+ cryptHeaderSize = nonceSize + crcSize
+
+ // maximum packet size
+ mtuLimit = 1500
+
+ // accept backlog
+ acceptBacklog = 128
+)
+
+var (
+ errInvalidOperation = errors.New("invalid operation")
+ errTimeout = errors.New("timeout")
+)
+
+var (
+ // a system-wide packet buffer shared among sending, receiving and FEC
+ // to mitigate high-frequency memory allocation for packets, bytes from xmitBuf
+ // is aligned to 64bit
+ xmitBuf sync.Pool
+)
+
+func init() {
+ xmitBuf.New = func() interface{} {
+ return make([]byte, mtuLimit)
+ }
+}
+
+type (
+ // UDPSession defines a KCP session implemented by UDP
+ UDPSession struct {
+ conn net.PacketConn // the underlying packet connection
+ ownConn bool // true if we created conn internally, false if provided by caller
+ kcp *KCP // KCP ARQ protocol
+ l *Listener // pointing to the Listener object if it's been accepted by a Listener
+ block BlockCrypt // block encryption object
+
+ // kcp receiving is based on packets
+ // recvbuf turns packets into stream
+ recvbuf []byte
+ bufptr []byte
+
+ // FEC codec
+ fecDecoder *fecDecoder
+ fecEncoder *fecEncoder
+
+ // settings
+ remote net.Addr // remote peer address
+ rd time.Time // read deadline
+ wd time.Time // write deadline
+ headerSize int // the header size additional to a KCP frame
+ ackNoDelay bool // send ack immediately for each incoming packet(testing purpose)
+ writeDelay bool // delay kcp.flush() for Write() for bulk transfer
+ dup int // duplicate udp packets(testing purpose)
+
+ // notifications
+ die chan struct{} // notify current session has Closed
+ dieOnce sync.Once
+ chReadEvent chan struct{} // notify Read() can be called without blocking
+ chWriteEvent chan struct{} // notify Write() can be called without blocking
+
+ // socket error handling
+ socketReadError atomic.Value
+ socketWriteError atomic.Value
+ chSocketReadError chan struct{}
+ chSocketWriteError chan struct{}
+ socketReadErrorOnce sync.Once
+ socketWriteErrorOnce sync.Once
+
+ // nonce generator
+ nonce Entropy
+
+ // packets waiting to be sent on wire
+ txqueue []ipv4.Message
+ xconn batchConn // for x/net
+ xconnWriteError error
+
+ mu sync.Mutex
+ }
+
+ setReadBuffer interface {
+ SetReadBuffer(bytes int) error
+ }
+
+ setWriteBuffer interface {
+ SetWriteBuffer(bytes int) error
+ }
+
+ setDSCP interface {
+ SetDSCP(int) error
+ }
+)
+
+// newUDPSession create a new udp session for client or server
+func newUDPSession(conv uint32, dataShards, parityShards int, l *Listener, conn net.PacketConn, ownConn bool, remote net.Addr, block BlockCrypt) *UDPSession {
+ sess := new(UDPSession)
+ sess.die = make(chan struct{})
+ sess.nonce = new(nonceAES128)
+ sess.nonce.Init()
+ sess.chReadEvent = make(chan struct{}, 1)
+ sess.chWriteEvent = make(chan struct{}, 1)
+ sess.chSocketReadError = make(chan struct{})
+ sess.chSocketWriteError = make(chan struct{})
+ sess.remote = remote
+ sess.conn = conn
+ sess.ownConn = ownConn
+ sess.l = l
+ sess.block = block
+ sess.recvbuf = make([]byte, mtuLimit)
+
+ // cast to writebatch conn
+ if _, ok := conn.(*net.UDPConn); ok {
+ addr, err := net.ResolveUDPAddr("udp", conn.LocalAddr().String())
+ if err == nil {
+ if addr.IP.To4() != nil {
+ sess.xconn = ipv4.NewPacketConn(conn)
+ } else {
+ sess.xconn = ipv6.NewPacketConn(conn)
+ }
+ }
+ }
+
+ // FEC codec initialization
+ sess.fecDecoder = newFECDecoder(dataShards, parityShards)
+ if sess.block != nil {
+ sess.fecEncoder = newFECEncoder(dataShards, parityShards, cryptHeaderSize)
+ } else {
+ sess.fecEncoder = newFECEncoder(dataShards, parityShards, 0)
+ }
+
+ // calculate additional header size introduced by FEC and encryption
+ if sess.block != nil {
+ sess.headerSize += cryptHeaderSize
+ }
+ if sess.fecEncoder != nil {
+ sess.headerSize += fecHeaderSizePlus2
+ }
+
+ sess.kcp = NewKCP(conv, func(buf []byte, size int) {
+ if size >= IKCP_OVERHEAD+sess.headerSize {
+ sess.output(buf[:size])
+ }
+ })
+ sess.kcp.ReserveBytes(sess.headerSize)
+
+ if sess.l == nil { // it's a client connection
+ go sess.readLoop()
+ atomic.AddUint64(&DefaultSnmp.ActiveOpens, 1)
+ } else {
+ atomic.AddUint64(&DefaultSnmp.PassiveOpens, 1)
+ }
+
+ // start per-session updater
+ SystemTimedSched.Put(sess.update, time.Now())
+
+ currestab := atomic.AddUint64(&DefaultSnmp.CurrEstab, 1)
+ maxconn := atomic.LoadUint64(&DefaultSnmp.MaxConn)
+ if currestab > maxconn {
+ atomic.CompareAndSwapUint64(&DefaultSnmp.MaxConn, maxconn, currestab)
+ }
+
+ return sess
+}
+
+// Read implements net.Conn
+func (s *UDPSession) Read(b []byte) (n int, err error) {
+ for {
+ s.mu.Lock()
+ if len(s.bufptr) > 0 { // copy from buffer into b
+ n = copy(b, s.bufptr)
+ s.bufptr = s.bufptr[n:]
+ s.mu.Unlock()
+ atomic.AddUint64(&DefaultSnmp.BytesReceived, uint64(n))
+ return n, nil
+ }
+
+ if size := s.kcp.PeekSize(); size > 0 { // peek data size from kcp
+ if len(b) >= size { // receive data into 'b' directly
+ s.kcp.Recv(b)
+ s.mu.Unlock()
+ atomic.AddUint64(&DefaultSnmp.BytesReceived, uint64(size))
+ return size, nil
+ }
+
+ // if necessary resize the stream buffer to guarantee a sufficient buffer space
+ if cap(s.recvbuf) < size {
+ s.recvbuf = make([]byte, size)
+ }
+
+ // resize the length of recvbuf to correspond to data size
+ s.recvbuf = s.recvbuf[:size]
+ s.kcp.Recv(s.recvbuf)
+ n = copy(b, s.recvbuf) // copy to 'b'
+ s.bufptr = s.recvbuf[n:] // pointer update
+ s.mu.Unlock()
+ atomic.AddUint64(&DefaultSnmp.BytesReceived, uint64(n))
+ return n, nil
+ }
+
+ // deadline for current reading operation
+ var timeout *time.Timer
+ var c <-chan time.Time
+ if !s.rd.IsZero() {
+ if time.Now().After(s.rd) {
+ s.mu.Unlock()
+ return 0, errors.WithStack(errTimeout)
+ }
+
+ delay := time.Until(s.rd)
+ timeout = time.NewTimer(delay)
+ c = timeout.C
+ }
+ s.mu.Unlock()
+
+ // wait for read event or timeout or error
+ select {
+ case <-s.chReadEvent:
+ if timeout != nil {
+ timeout.Stop()
+ }
+ case <-c:
+ return 0, errors.WithStack(errTimeout)
+ case <-s.chSocketReadError:
+ return 0, s.socketReadError.Load().(error)
+ case <-s.die:
+ return 0, errors.WithStack(io.ErrClosedPipe)
+ }
+ }
+}
+
+// Write implements net.Conn
+func (s *UDPSession) Write(b []byte) (n int, err error) { return s.WriteBuffers([][]byte{b}) }
+
+// WriteBuffers write a vector of byte slices to the underlying connection
+func (s *UDPSession) WriteBuffers(v [][]byte) (n int, err error) {
+ for {
+ select {
+ case <-s.chSocketWriteError:
+ return 0, s.socketWriteError.Load().(error)
+ case <-s.die:
+ return 0, errors.WithStack(io.ErrClosedPipe)
+ default:
+ }
+
+ s.mu.Lock()
+
+ // make sure write do not overflow the max sliding window on both side
+ waitsnd := s.kcp.WaitSnd()
+ if waitsnd < int(s.kcp.snd_wnd) && waitsnd < int(s.kcp.rmt_wnd) {
+ for _, b := range v {
+ n += len(b)
+ for {
+ if len(b) <= int(s.kcp.mss) {
+ s.kcp.Send(b)
+ break
+ } else {
+ s.kcp.Send(b[:s.kcp.mss])
+ b = b[s.kcp.mss:]
+ }
+ }
+ }
+
+ waitsnd = s.kcp.WaitSnd()
+ if waitsnd >= int(s.kcp.snd_wnd) || waitsnd >= int(s.kcp.rmt_wnd) || !s.writeDelay {
+ s.kcp.flush(false)
+ s.uncork()
+ }
+ s.mu.Unlock()
+ atomic.AddUint64(&DefaultSnmp.BytesSent, uint64(n))
+ return n, nil
+ }
+
+ var timeout *time.Timer
+ var c <-chan time.Time
+ if !s.wd.IsZero() {
+ if time.Now().After(s.wd) {
+ s.mu.Unlock()
+ return 0, errors.WithStack(errTimeout)
+ }
+ delay := time.Until(s.wd)
+ timeout = time.NewTimer(delay)
+ c = timeout.C
+ }
+ s.mu.Unlock()
+
+ select {
+ case <-s.chWriteEvent:
+ if timeout != nil {
+ timeout.Stop()
+ }
+ case <-c:
+ return 0, errors.WithStack(errTimeout)
+ case <-s.chSocketWriteError:
+ return 0, s.socketWriteError.Load().(error)
+ case <-s.die:
+ return 0, errors.WithStack(io.ErrClosedPipe)
+ }
+ }
+}
+
+// uncork sends data in txqueue if there is any
+func (s *UDPSession) uncork() {
+ if len(s.txqueue) > 0 {
+ s.tx(s.txqueue)
+ // recycle
+ for k := range s.txqueue {
+ xmitBuf.Put(s.txqueue[k].Buffers[0])
+ s.txqueue[k].Buffers = nil
+ }
+ s.txqueue = s.txqueue[:0]
+ }
+}
+
+// Close closes the connection.
+func (s *UDPSession) Close() error {
+ var once bool
+ s.dieOnce.Do(func() {
+ close(s.die)
+ once = true
+ })
+
+ if once {
+ atomic.AddUint64(&DefaultSnmp.CurrEstab, ^uint64(0))
+
+ // try best to send all queued messages
+ s.mu.Lock()
+ s.kcp.flush(false)
+ s.uncork()
+ // release pending segments
+ s.kcp.ReleaseTX()
+ if s.fecDecoder != nil {
+ s.fecDecoder.release()
+ }
+ s.mu.Unlock()
+
+ if s.l != nil { // belongs to listener
+ s.l.closeSession(s.remote)
+ return nil
+ } else if s.ownConn { // client socket close
+ return s.conn.Close()
+ } else {
+ return nil
+ }
+ } else {
+ return errors.WithStack(io.ErrClosedPipe)
+ }
+}
+
+// LocalAddr returns the local network address. The Addr returned is shared by all invocations of LocalAddr, so do not modify it.
+func (s *UDPSession) LocalAddr() net.Addr { return s.conn.LocalAddr() }
+
+// RemoteAddr returns the remote network address. The Addr returned is shared by all invocations of RemoteAddr, so do not modify it.
+func (s *UDPSession) RemoteAddr() net.Addr { return s.remote }
+
+// SetDeadline sets the deadline associated with the listener. A zero time value disables the deadline.
+func (s *UDPSession) SetDeadline(t time.Time) error {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ s.rd = t
+ s.wd = t
+ s.notifyReadEvent()
+ s.notifyWriteEvent()
+ return nil
+}
+
+// SetReadDeadline implements the Conn SetReadDeadline method.
+func (s *UDPSession) SetReadDeadline(t time.Time) error {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ s.rd = t
+ s.notifyReadEvent()
+ return nil
+}
+
+// SetWriteDeadline implements the Conn SetWriteDeadline method.
+func (s *UDPSession) SetWriteDeadline(t time.Time) error {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ s.wd = t
+ s.notifyWriteEvent()
+ return nil
+}
+
+// SetWriteDelay delays write for bulk transfer until the next update interval
+func (s *UDPSession) SetWriteDelay(delay bool) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ s.writeDelay = delay
+}
+
+// SetWindowSize set maximum window size
+func (s *UDPSession) SetWindowSize(sndwnd, rcvwnd int) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ s.kcp.WndSize(sndwnd, rcvwnd)
+}
+
+// SetMtu sets the maximum transmission unit(not including UDP header)
+func (s *UDPSession) SetMtu(mtu int) bool {
+ if mtu > mtuLimit {
+ return false
+ }
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ s.kcp.SetMtu(mtu)
+ return true
+}
+
+// SetStreamMode toggles the stream mode on/off
+func (s *UDPSession) SetStreamMode(enable bool) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if enable {
+ s.kcp.stream = 1
+ } else {
+ s.kcp.stream = 0
+ }
+}
+
+// SetACKNoDelay changes ack flush option, set true to flush ack immediately,
+func (s *UDPSession) SetACKNoDelay(nodelay bool) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ s.ackNoDelay = nodelay
+}
+
+// (deprecated)
+//
+// SetDUP duplicates udp packets for kcp output.
+func (s *UDPSession) SetDUP(dup int) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ s.dup = dup
+}
+
+// SetNoDelay calls nodelay() of kcp
+// https://github.com/skywind3000/kcp/blob/master/README.en.md#protocol-configuration
+func (s *UDPSession) SetNoDelay(nodelay, interval, resend, nc int) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ s.kcp.NoDelay(nodelay, interval, resend, nc)
+}
+
+// SetDSCP sets the 6bit DSCP field in IPv4 header, or 8bit Traffic Class in IPv6 header.
+//
+// if the underlying connection has implemented `func SetDSCP(int) error`, SetDSCP() will invoke
+// this function instead.
+//
+// It has no effect if it's accepted from Listener.
+func (s *UDPSession) SetDSCP(dscp int) error {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if s.l != nil {
+ return errInvalidOperation
+ }
+
+ // interface enabled
+ if ts, ok := s.conn.(setDSCP); ok {
+ return ts.SetDSCP(dscp)
+ }
+
+ if nc, ok := s.conn.(net.Conn); ok {
+ var succeed bool
+ if err := ipv4.NewConn(nc).SetTOS(dscp << 2); err == nil {
+ succeed = true
+ }
+ if err := ipv6.NewConn(nc).SetTrafficClass(dscp); err == nil {
+ succeed = true
+ }
+
+ if succeed {
+ return nil
+ }
+ }
+ return errInvalidOperation
+}
+
+// SetReadBuffer sets the socket read buffer, no effect if it's accepted from Listener
+func (s *UDPSession) SetReadBuffer(bytes int) error {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if s.l == nil {
+ if nc, ok := s.conn.(setReadBuffer); ok {
+ return nc.SetReadBuffer(bytes)
+ }
+ }
+ return errInvalidOperation
+}
+
+// SetWriteBuffer sets the socket write buffer, no effect if it's accepted from Listener
+func (s *UDPSession) SetWriteBuffer(bytes int) error {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ if s.l == nil {
+ if nc, ok := s.conn.(setWriteBuffer); ok {
+ return nc.SetWriteBuffer(bytes)
+ }
+ }
+ return errInvalidOperation
+}
+
+// post-processing for sending a packet from kcp core
+// steps:
+// 1. FEC packet generation
+// 2. CRC32 integrity
+// 3. Encryption
+// 4. TxQueue
+func (s *UDPSession) output(buf []byte) {
+ var ecc [][]byte
+
+ // 1. FEC encoding
+ if s.fecEncoder != nil {
+ ecc = s.fecEncoder.encode(buf)
+ }
+
+ // 2&3. crc32 & encryption
+ if s.block != nil {
+ s.nonce.Fill(buf[:nonceSize])
+ checksum := crc32.ChecksumIEEE(buf[cryptHeaderSize:])
+ binary.LittleEndian.PutUint32(buf[nonceSize:], checksum)
+ s.block.Encrypt(buf, buf)
+
+ for k := range ecc {
+ s.nonce.Fill(ecc[k][:nonceSize])
+ checksum := crc32.ChecksumIEEE(ecc[k][cryptHeaderSize:])
+ binary.LittleEndian.PutUint32(ecc[k][nonceSize:], checksum)
+ s.block.Encrypt(ecc[k], ecc[k])
+ }
+ }
+
+ // 4. TxQueue
+ var msg ipv4.Message
+ for i := 0; i < s.dup+1; i++ {
+ bts := xmitBuf.Get().([]byte)[:len(buf)]
+ copy(bts, buf)
+ msg.Buffers = [][]byte{bts}
+ msg.Addr = s.remote
+ s.txqueue = append(s.txqueue, msg)
+ }
+
+ for k := range ecc {
+ bts := xmitBuf.Get().([]byte)[:len(ecc[k])]
+ copy(bts, ecc[k])
+ msg.Buffers = [][]byte{bts}
+ msg.Addr = s.remote
+ s.txqueue = append(s.txqueue, msg)
+ }
+}
+
+// sess update to trigger protocol
+func (s *UDPSession) update() {
+ select {
+ case <-s.die:
+ default:
+ s.mu.Lock()
+ interval := s.kcp.flush(false)
+ waitsnd := s.kcp.WaitSnd()
+ if waitsnd < int(s.kcp.snd_wnd) && waitsnd < int(s.kcp.rmt_wnd) {
+ s.notifyWriteEvent()
+ }
+ s.uncork()
+ s.mu.Unlock()
+ // self-synchronized timed scheduling
+ SystemTimedSched.Put(s.update, time.Now().Add(time.Duration(interval)*time.Millisecond))
+ }
+}
+
+// GetConv gets conversation id of a session
+func (s *UDPSession) GetConv() uint32 { return s.kcp.conv }
+
+// GetRTO gets current rto of the session
+func (s *UDPSession) GetRTO() uint32 {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.kcp.rx_rto
+}
+
+// GetSRTT gets current srtt of the session
+func (s *UDPSession) GetSRTT() int32 {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.kcp.rx_srtt
+}
+
+// GetRTTVar gets current rtt variance of the session
+func (s *UDPSession) GetSRTTVar() int32 {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ return s.kcp.rx_rttvar
+}
+
+func (s *UDPSession) notifyReadEvent() {
+ select {
+ case s.chReadEvent <- struct{}{}:
+ default:
+ }
+}
+
+func (s *UDPSession) notifyWriteEvent() {
+ select {
+ case s.chWriteEvent <- struct{}{}:
+ default:
+ }
+}
+
+func (s *UDPSession) notifyReadError(err error) {
+ s.socketReadErrorOnce.Do(func() {
+ s.socketReadError.Store(err)
+ close(s.chSocketReadError)
+ })
+}
+
+func (s *UDPSession) notifyWriteError(err error) {
+ s.socketWriteErrorOnce.Do(func() {
+ s.socketWriteError.Store(err)
+ close(s.chSocketWriteError)
+ })
+}
+
+// packet input stage
+func (s *UDPSession) packetInput(data []byte) {
+ decrypted := false
+ if s.block != nil && len(data) >= cryptHeaderSize {
+ s.block.Decrypt(data, data)
+ data = data[nonceSize:]
+ checksum := crc32.ChecksumIEEE(data[crcSize:])
+ if checksum == binary.LittleEndian.Uint32(data) {
+ data = data[crcSize:]
+ decrypted = true
+ } else {
+ atomic.AddUint64(&DefaultSnmp.InCsumErrors, 1)
+ }
+ } else if s.block == nil {
+ decrypted = true
+ }
+
+ if decrypted && len(data) >= IKCP_OVERHEAD {
+ s.kcpInput(data)
+ }
+}
+
+func (s *UDPSession) kcpInput(data []byte) {
+ var kcpInErrors, fecErrs, fecRecovered, fecParityShards uint64
+
+ fecFlag := binary.LittleEndian.Uint16(data[4:])
+ if fecFlag == typeData || fecFlag == typeParity { // 16bit kcp cmd [81-84] and frg [0-255] will not overlap with FEC type 0x00f1 0x00f2
+ if len(data) >= fecHeaderSizePlus2 {
+ f := fecPacket(data)
+ if f.flag() == typeParity {
+ fecParityShards++
+ }
+
+ // lock
+ s.mu.Lock()
+ // if fecDecoder is not initialized, create one with default parameter
+ if s.fecDecoder == nil {
+ s.fecDecoder = newFECDecoder(1, 1)
+ }
+ recovers := s.fecDecoder.decode(f)
+ if f.flag() == typeData {
+ if ret := s.kcp.Input(data[fecHeaderSizePlus2:], true, s.ackNoDelay); ret != 0 {
+ kcpInErrors++
+ }
+ }
+
+ for _, r := range recovers {
+ if len(r) >= 2 { // must be larger than 2bytes
+ sz := binary.LittleEndian.Uint16(r)
+ if int(sz) <= len(r) && sz >= 2 {
+ if ret := s.kcp.Input(r[2:sz], false, s.ackNoDelay); ret == 0 {
+ fecRecovered++
+ } else {
+ kcpInErrors++
+ }
+ } else {
+ fecErrs++
+ }
+ } else {
+ fecErrs++
+ }
+ // recycle the recovers
+ xmitBuf.Put(r)
+ }
+
+ // to notify the readers to receive the data
+ if n := s.kcp.PeekSize(); n > 0 {
+ s.notifyReadEvent()
+ }
+ // to notify the writers
+ waitsnd := s.kcp.WaitSnd()
+ if waitsnd < int(s.kcp.snd_wnd) && waitsnd < int(s.kcp.rmt_wnd) {
+ s.notifyWriteEvent()
+ }
+
+ s.uncork()
+ s.mu.Unlock()
+ } else {
+ atomic.AddUint64(&DefaultSnmp.InErrs, 1)
+ }
+ } else {
+ s.mu.Lock()
+ if ret := s.kcp.Input(data, true, s.ackNoDelay); ret != 0 {
+ kcpInErrors++
+ }
+ if n := s.kcp.PeekSize(); n > 0 {
+ s.notifyReadEvent()
+ }
+ waitsnd := s.kcp.WaitSnd()
+ if waitsnd < int(s.kcp.snd_wnd) && waitsnd < int(s.kcp.rmt_wnd) {
+ s.notifyWriteEvent()
+ }
+ s.uncork()
+ s.mu.Unlock()
+ }
+
+ atomic.AddUint64(&DefaultSnmp.InPkts, 1)
+ atomic.AddUint64(&DefaultSnmp.InBytes, uint64(len(data)))
+ if fecParityShards > 0 {
+ atomic.AddUint64(&DefaultSnmp.FECParityShards, fecParityShards)
+ }
+ if kcpInErrors > 0 {
+ atomic.AddUint64(&DefaultSnmp.KCPInErrors, kcpInErrors)
+ }
+ if fecErrs > 0 {
+ atomic.AddUint64(&DefaultSnmp.FECErrs, fecErrs)
+ }
+ if fecRecovered > 0 {
+ atomic.AddUint64(&DefaultSnmp.FECRecovered, fecRecovered)
+ }
+
+}
+
+type (
+ // Listener defines a server which will be waiting to accept incoming connections
+ Listener struct {
+ block BlockCrypt // block encryption
+ dataShards int // FEC data shard
+ parityShards int // FEC parity shard
+ conn net.PacketConn // the underlying packet connection
+ ownConn bool // true if we created conn internally, false if provided by caller
+
+ sessions map[string]*UDPSession // all sessions accepted by this Listener
+ sessionLock sync.RWMutex
+ chAccepts chan *UDPSession // Listen() backlog
+ chSessionClosed chan net.Addr // session close queue
+
+ die chan struct{} // notify the listener has closed
+ dieOnce sync.Once
+
+ // socket error handling
+ socketReadError atomic.Value
+ chSocketReadError chan struct{}
+ socketReadErrorOnce sync.Once
+
+ rd atomic.Value // read deadline for Accept()
+ }
+)
+
+// packet input stage
+func (l *Listener) packetInput(data []byte, addr net.Addr) {
+ decrypted := false
+ if l.block != nil && len(data) >= cryptHeaderSize {
+ l.block.Decrypt(data, data)
+ data = data[nonceSize:]
+ checksum := crc32.ChecksumIEEE(data[crcSize:])
+ if checksum == binary.LittleEndian.Uint32(data) {
+ data = data[crcSize:]
+ decrypted = true
+ } else {
+ atomic.AddUint64(&DefaultSnmp.InCsumErrors, 1)
+ }
+ } else if l.block == nil {
+ decrypted = true
+ }
+
+ if decrypted && len(data) >= IKCP_OVERHEAD {
+ l.sessionLock.RLock()
+ s, ok := l.sessions[addr.String()]
+ l.sessionLock.RUnlock()
+
+ var conv, sn uint32
+ convRecovered := false
+ fecFlag := binary.LittleEndian.Uint16(data[4:])
+ if fecFlag == typeData || fecFlag == typeParity { // 16bit kcp cmd [81-84] and frg [0-255] will not overlap with FEC type 0x00f1 0x00f2
+ // packet with FEC
+ if fecFlag == typeData && len(data) >= fecHeaderSizePlus2+IKCP_OVERHEAD {
+ conv = binary.LittleEndian.Uint32(data[fecHeaderSizePlus2:])
+ sn = binary.LittleEndian.Uint32(data[fecHeaderSizePlus2+IKCP_SN_OFFSET:])
+ convRecovered = true
+ }
+ } else {
+ // packet without FEC
+ conv = binary.LittleEndian.Uint32(data)
+ sn = binary.LittleEndian.Uint32(data[IKCP_SN_OFFSET:])
+ convRecovered = true
+ }
+
+ if ok { // existing connection
+ if !convRecovered || conv == s.kcp.conv { // parity data or valid conversation
+ s.kcpInput(data)
+ } else if sn == 0 { // should replace current connection
+ s.Close()
+ s = nil
+ }
+ }
+
+ if s == nil && convRecovered { // new session
+ if len(l.chAccepts) < cap(l.chAccepts) { // do not let the new sessions overwhelm accept queue
+ s := newUDPSession(conv, l.dataShards, l.parityShards, l, l.conn, false, addr, l.block)
+ s.kcpInput(data)
+ l.sessionLock.Lock()
+ l.sessions[addr.String()] = s
+ l.sessionLock.Unlock()
+ l.chAccepts <- s
+ }
+ }
+ }
+}
+
+func (l *Listener) notifyReadError(err error) {
+ l.socketReadErrorOnce.Do(func() {
+ l.socketReadError.Store(err)
+ close(l.chSocketReadError)
+
+ // propagate read error to all sessions
+ l.sessionLock.RLock()
+ for _, s := range l.sessions {
+ s.notifyReadError(err)
+ }
+ l.sessionLock.RUnlock()
+ })
+}
+
+// SetReadBuffer sets the socket read buffer for the Listener
+func (l *Listener) SetReadBuffer(bytes int) error {
+ if nc, ok := l.conn.(setReadBuffer); ok {
+ return nc.SetReadBuffer(bytes)
+ }
+ return errInvalidOperation
+}
+
+// SetWriteBuffer sets the socket write buffer for the Listener
+func (l *Listener) SetWriteBuffer(bytes int) error {
+ if nc, ok := l.conn.(setWriteBuffer); ok {
+ return nc.SetWriteBuffer(bytes)
+ }
+ return errInvalidOperation
+}
+
+// SetDSCP sets the 6bit DSCP field in IPv4 header, or 8bit Traffic Class in IPv6 header.
+//
+// if the underlying connection has implemented `func SetDSCP(int) error`, SetDSCP() will invoke
+// this function instead.
+func (l *Listener) SetDSCP(dscp int) error {
+ // interface enabled
+ if ts, ok := l.conn.(setDSCP); ok {
+ return ts.SetDSCP(dscp)
+ }
+
+ if nc, ok := l.conn.(net.Conn); ok {
+ var succeed bool
+ if err := ipv4.NewConn(nc).SetTOS(dscp << 2); err == nil {
+ succeed = true
+ }
+ if err := ipv6.NewConn(nc).SetTrafficClass(dscp); err == nil {
+ succeed = true
+ }
+
+ if succeed {
+ return nil
+ }
+ }
+ return errInvalidOperation
+}
+
+// Accept implements the Accept method in the Listener interface; it waits for the next call and returns a generic Conn.
+func (l *Listener) Accept() (net.Conn, error) {
+ return l.AcceptKCP()
+}
+
+// AcceptKCP accepts a KCP connection
+func (l *Listener) AcceptKCP() (*UDPSession, error) {
+ var timeout <-chan time.Time
+ if tdeadline, ok := l.rd.Load().(time.Time); ok && !tdeadline.IsZero() {
+ timeout = time.After(time.Until(tdeadline))
+ }
+
+ select {
+ case <-timeout:
+ return nil, errors.WithStack(errTimeout)
+ case c := <-l.chAccepts:
+ return c, nil
+ case <-l.chSocketReadError:
+ return nil, l.socketReadError.Load().(error)
+ case <-l.die:
+ return nil, errors.WithStack(io.ErrClosedPipe)
+ }
+}
+
+// SetDeadline sets the deadline associated with the listener. A zero time value disables the deadline.
+func (l *Listener) SetDeadline(t time.Time) error {
+ l.SetReadDeadline(t)
+ l.SetWriteDeadline(t)
+ return nil
+}
+
+// SetReadDeadline implements the Conn SetReadDeadline method.
+func (l *Listener) SetReadDeadline(t time.Time) error {
+ l.rd.Store(t)
+ return nil
+}
+
+// SetWriteDeadline implements the Conn SetWriteDeadline method.
+func (l *Listener) SetWriteDeadline(t time.Time) error { return errInvalidOperation }
+
+// Close stops listening on the UDP address, and closes the socket
+func (l *Listener) Close() error {
+ var once bool
+ l.dieOnce.Do(func() {
+ close(l.die)
+ once = true
+ })
+
+ var err error
+ if once {
+ if l.ownConn {
+ err = l.conn.Close()
+ }
+ } else {
+ err = errors.WithStack(io.ErrClosedPipe)
+ }
+ return err
+}
+
+// closeSession notify the listener that a session has closed
+func (l *Listener) closeSession(remote net.Addr) (ret bool) {
+ l.sessionLock.Lock()
+ defer l.sessionLock.Unlock()
+ if _, ok := l.sessions[remote.String()]; ok {
+ delete(l.sessions, remote.String())
+ return true
+ }
+ return false
+}
+
+// Addr returns the listener's network address, The Addr returned is shared by all invocations of Addr, so do not modify it.
+func (l *Listener) Addr() net.Addr { return l.conn.LocalAddr() }
+
+// Listen listens for incoming KCP packets addressed to the local address laddr on the network "udp",
+func Listen(laddr string) (net.Listener, error) { return ListenWithOptions(laddr, nil, 0, 0) }
+
+// ListenWithOptions listens for incoming KCP packets addressed to the local address laddr on the network "udp" with packet encryption.
+//
+// 'block' is the block encryption algorithm to encrypt packets.
+//
+// 'dataShards', 'parityShards' specify how many parity packets will be generated following the data packets.
+//
+// Check https://github.com/klauspost/reedsolomon for details
+func ListenWithOptions(laddr string, block BlockCrypt, dataShards, parityShards int) (*Listener, error) {
+ udpaddr, err := net.ResolveUDPAddr("udp", laddr)
+ if err != nil {
+ return nil, errors.WithStack(err)
+ }
+ conn, err := net.ListenUDP("udp", udpaddr)
+ if err != nil {
+ return nil, errors.WithStack(err)
+ }
+
+ return serveConn(block, dataShards, parityShards, conn, true)
+}
+
+// ServeConn serves KCP protocol for a single packet connection.
+func ServeConn(block BlockCrypt, dataShards, parityShards int, conn net.PacketConn) (*Listener, error) {
+ return serveConn(block, dataShards, parityShards, conn, false)
+}
+
+func serveConn(block BlockCrypt, dataShards, parityShards int, conn net.PacketConn, ownConn bool) (*Listener, error) {
+ l := new(Listener)
+ l.conn = conn
+ l.ownConn = ownConn
+ l.sessions = make(map[string]*UDPSession)
+ l.chAccepts = make(chan *UDPSession, acceptBacklog)
+ l.chSessionClosed = make(chan net.Addr)
+ l.die = make(chan struct{})
+ l.dataShards = dataShards
+ l.parityShards = parityShards
+ l.block = block
+ l.chSocketReadError = make(chan struct{})
+ go l.monitor()
+ return l, nil
+}
+
+// Dial connects to the remote address "raddr" on the network "udp" without encryption and FEC
+func Dial(raddr string) (net.Conn, error) { return DialWithOptions(raddr, nil, 0, 0) }
+
+// DialWithOptions connects to the remote address "raddr" on the network "udp" with packet encryption
+//
+// 'block' is the block encryption algorithm to encrypt packets.
+//
+// 'dataShards', 'parityShards' specify how many parity packets will be generated following the data packets.
+//
+// Check https://github.com/klauspost/reedsolomon for details
+func DialWithOptions(raddr string, block BlockCrypt, dataShards, parityShards int) (*UDPSession, error) {
+ // network type detection
+ udpaddr, err := net.ResolveUDPAddr("udp", raddr)
+ if err != nil {
+ return nil, errors.WithStack(err)
+ }
+ network := "udp4"
+ if udpaddr.IP.To4() == nil {
+ network = "udp"
+ }
+
+ conn, err := net.ListenUDP(network, nil)
+ if err != nil {
+ return nil, errors.WithStack(err)
+ }
+
+ var convid uint32
+ binary.Read(rand.Reader, binary.LittleEndian, &convid)
+ return newUDPSession(convid, dataShards, parityShards, nil, conn, true, udpaddr, block), nil
+}
+
+// NewConn3 establishes a session and talks KCP protocol over a packet connection.
+func NewConn3(convid uint32, raddr net.Addr, block BlockCrypt, dataShards, parityShards int, conn net.PacketConn) (*UDPSession, error) {
+ return newUDPSession(convid, dataShards, parityShards, nil, conn, false, raddr, block), nil
+}
+
+// NewConn2 establishes a session and talks KCP protocol over a packet connection.
+func NewConn2(raddr net.Addr, block BlockCrypt, dataShards, parityShards int, conn net.PacketConn) (*UDPSession, error) {
+ var convid uint32
+ binary.Read(rand.Reader, binary.LittleEndian, &convid)
+ return NewConn3(convid, raddr, block, dataShards, parityShards, conn)
+}
+
+// NewConn establishes a session and talks KCP protocol over a packet connection.
+func NewConn(raddr string, block BlockCrypt, dataShards, parityShards int, conn net.PacketConn) (*UDPSession, error) {
+ udpaddr, err := net.ResolveUDPAddr("udp", raddr)
+ if err != nil {
+ return nil, errors.WithStack(err)
+ }
+ return NewConn2(udpaddr, block, dataShards, parityShards, conn)
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/snmp.go b/vendor/github.com/xtaci/kcp-go/v5/snmp.go
new file mode 100644
index 0000000..f961810
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/snmp.go
@@ -0,0 +1,164 @@
+package kcp
+
+import (
+ "fmt"
+ "sync/atomic"
+)
+
+// Snmp defines network statistics indicator
+type Snmp struct {
+ BytesSent uint64 // bytes sent from upper level
+ BytesReceived uint64 // bytes received to upper level
+ MaxConn uint64 // max number of connections ever reached
+ ActiveOpens uint64 // accumulated active open connections
+ PassiveOpens uint64 // accumulated passive open connections
+ CurrEstab uint64 // current number of established connections
+ InErrs uint64 // UDP read errors reported from net.PacketConn
+ InCsumErrors uint64 // checksum errors from CRC32
+ KCPInErrors uint64 // packet iput errors reported from KCP
+ InPkts uint64 // incoming packets count
+ OutPkts uint64 // outgoing packets count
+ InSegs uint64 // incoming KCP segments
+ OutSegs uint64 // outgoing KCP segments
+ InBytes uint64 // UDP bytes received
+ OutBytes uint64 // UDP bytes sent
+ RetransSegs uint64 // accmulated retransmited segments
+ FastRetransSegs uint64 // accmulated fast retransmitted segments
+ EarlyRetransSegs uint64 // accmulated early retransmitted segments
+ LostSegs uint64 // number of segs inferred as lost
+ RepeatSegs uint64 // number of segs duplicated
+ FECRecovered uint64 // correct packets recovered from FEC
+ FECErrs uint64 // incorrect packets recovered from FEC
+ FECParityShards uint64 // FEC segments received
+ FECShortShards uint64 // number of data shards that's not enough for recovery
+}
+
+func newSnmp() *Snmp {
+ return new(Snmp)
+}
+
+// Header returns all field names
+func (s *Snmp) Header() []string {
+ return []string{
+ "BytesSent",
+ "BytesReceived",
+ "MaxConn",
+ "ActiveOpens",
+ "PassiveOpens",
+ "CurrEstab",
+ "InErrs",
+ "InCsumErrors",
+ "KCPInErrors",
+ "InPkts",
+ "OutPkts",
+ "InSegs",
+ "OutSegs",
+ "InBytes",
+ "OutBytes",
+ "RetransSegs",
+ "FastRetransSegs",
+ "EarlyRetransSegs",
+ "LostSegs",
+ "RepeatSegs",
+ "FECParityShards",
+ "FECErrs",
+ "FECRecovered",
+ "FECShortShards",
+ }
+}
+
+// ToSlice returns current snmp info as slice
+func (s *Snmp) ToSlice() []string {
+ snmp := s.Copy()
+ return []string{
+ fmt.Sprint(snmp.BytesSent),
+ fmt.Sprint(snmp.BytesReceived),
+ fmt.Sprint(snmp.MaxConn),
+ fmt.Sprint(snmp.ActiveOpens),
+ fmt.Sprint(snmp.PassiveOpens),
+ fmt.Sprint(snmp.CurrEstab),
+ fmt.Sprint(snmp.InErrs),
+ fmt.Sprint(snmp.InCsumErrors),
+ fmt.Sprint(snmp.KCPInErrors),
+ fmt.Sprint(snmp.InPkts),
+ fmt.Sprint(snmp.OutPkts),
+ fmt.Sprint(snmp.InSegs),
+ fmt.Sprint(snmp.OutSegs),
+ fmt.Sprint(snmp.InBytes),
+ fmt.Sprint(snmp.OutBytes),
+ fmt.Sprint(snmp.RetransSegs),
+ fmt.Sprint(snmp.FastRetransSegs),
+ fmt.Sprint(snmp.EarlyRetransSegs),
+ fmt.Sprint(snmp.LostSegs),
+ fmt.Sprint(snmp.RepeatSegs),
+ fmt.Sprint(snmp.FECParityShards),
+ fmt.Sprint(snmp.FECErrs),
+ fmt.Sprint(snmp.FECRecovered),
+ fmt.Sprint(snmp.FECShortShards),
+ }
+}
+
+// Copy make a copy of current snmp snapshot
+func (s *Snmp) Copy() *Snmp {
+ d := newSnmp()
+ d.BytesSent = atomic.LoadUint64(&s.BytesSent)
+ d.BytesReceived = atomic.LoadUint64(&s.BytesReceived)
+ d.MaxConn = atomic.LoadUint64(&s.MaxConn)
+ d.ActiveOpens = atomic.LoadUint64(&s.ActiveOpens)
+ d.PassiveOpens = atomic.LoadUint64(&s.PassiveOpens)
+ d.CurrEstab = atomic.LoadUint64(&s.CurrEstab)
+ d.InErrs = atomic.LoadUint64(&s.InErrs)
+ d.InCsumErrors = atomic.LoadUint64(&s.InCsumErrors)
+ d.KCPInErrors = atomic.LoadUint64(&s.KCPInErrors)
+ d.InPkts = atomic.LoadUint64(&s.InPkts)
+ d.OutPkts = atomic.LoadUint64(&s.OutPkts)
+ d.InSegs = atomic.LoadUint64(&s.InSegs)
+ d.OutSegs = atomic.LoadUint64(&s.OutSegs)
+ d.InBytes = atomic.LoadUint64(&s.InBytes)
+ d.OutBytes = atomic.LoadUint64(&s.OutBytes)
+ d.RetransSegs = atomic.LoadUint64(&s.RetransSegs)
+ d.FastRetransSegs = atomic.LoadUint64(&s.FastRetransSegs)
+ d.EarlyRetransSegs = atomic.LoadUint64(&s.EarlyRetransSegs)
+ d.LostSegs = atomic.LoadUint64(&s.LostSegs)
+ d.RepeatSegs = atomic.LoadUint64(&s.RepeatSegs)
+ d.FECParityShards = atomic.LoadUint64(&s.FECParityShards)
+ d.FECErrs = atomic.LoadUint64(&s.FECErrs)
+ d.FECRecovered = atomic.LoadUint64(&s.FECRecovered)
+ d.FECShortShards = atomic.LoadUint64(&s.FECShortShards)
+ return d
+}
+
+// Reset values to zero
+func (s *Snmp) Reset() {
+ atomic.StoreUint64(&s.BytesSent, 0)
+ atomic.StoreUint64(&s.BytesReceived, 0)
+ atomic.StoreUint64(&s.MaxConn, 0)
+ atomic.StoreUint64(&s.ActiveOpens, 0)
+ atomic.StoreUint64(&s.PassiveOpens, 0)
+ atomic.StoreUint64(&s.CurrEstab, 0)
+ atomic.StoreUint64(&s.InErrs, 0)
+ atomic.StoreUint64(&s.InCsumErrors, 0)
+ atomic.StoreUint64(&s.KCPInErrors, 0)
+ atomic.StoreUint64(&s.InPkts, 0)
+ atomic.StoreUint64(&s.OutPkts, 0)
+ atomic.StoreUint64(&s.InSegs, 0)
+ atomic.StoreUint64(&s.OutSegs, 0)
+ atomic.StoreUint64(&s.InBytes, 0)
+ atomic.StoreUint64(&s.OutBytes, 0)
+ atomic.StoreUint64(&s.RetransSegs, 0)
+ atomic.StoreUint64(&s.FastRetransSegs, 0)
+ atomic.StoreUint64(&s.EarlyRetransSegs, 0)
+ atomic.StoreUint64(&s.LostSegs, 0)
+ atomic.StoreUint64(&s.RepeatSegs, 0)
+ atomic.StoreUint64(&s.FECParityShards, 0)
+ atomic.StoreUint64(&s.FECErrs, 0)
+ atomic.StoreUint64(&s.FECRecovered, 0)
+ atomic.StoreUint64(&s.FECShortShards, 0)
+}
+
+// DefaultSnmp is the global KCP connection statistics collector
+var DefaultSnmp *Snmp
+
+func init() {
+ DefaultSnmp = newSnmp()
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/timedsched.go b/vendor/github.com/xtaci/kcp-go/v5/timedsched.go
new file mode 100644
index 0000000..2db7c20
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/timedsched.go
@@ -0,0 +1,146 @@
+package kcp
+
+import (
+ "container/heap"
+ "runtime"
+ "sync"
+ "time"
+)
+
+// SystemTimedSched is the library level timed-scheduler
+var SystemTimedSched *TimedSched = NewTimedSched(runtime.NumCPU())
+
+type timedFunc struct {
+ execute func()
+ ts time.Time
+}
+
+// a heap for sorted timed function
+type timedFuncHeap []timedFunc
+
+func (h timedFuncHeap) Len() int { return len(h) }
+func (h timedFuncHeap) Less(i, j int) bool { return h[i].ts.Before(h[j].ts) }
+func (h timedFuncHeap) Swap(i, j int) { h[i], h[j] = h[j], h[i] }
+func (h *timedFuncHeap) Push(x interface{}) { *h = append(*h, x.(timedFunc)) }
+func (h *timedFuncHeap) Pop() interface{} {
+ old := *h
+ n := len(old)
+ x := old[n-1]
+ old[n-1].execute = nil // avoid memory leak
+ *h = old[0 : n-1]
+ return x
+}
+
+// TimedSched represents the control struct for timed parallel scheduler
+type TimedSched struct {
+ // prepending tasks
+ prependTasks []timedFunc
+ prependLock sync.Mutex
+ chPrependNotify chan struct{}
+
+ // tasks will be distributed through chTask
+ chTask chan timedFunc
+
+ dieOnce sync.Once
+ die chan struct{}
+}
+
+// NewTimedSched creates a parallel-scheduler with given parallelization
+func NewTimedSched(parallel int) *TimedSched {
+ ts := new(TimedSched)
+ ts.chTask = make(chan timedFunc)
+ ts.die = make(chan struct{})
+ ts.chPrependNotify = make(chan struct{}, 1)
+
+ for i := 0; i < parallel; i++ {
+ go ts.sched()
+ }
+ go ts.prepend()
+ return ts
+}
+
+func (ts *TimedSched) sched() {
+ var tasks timedFuncHeap
+ timer := time.NewTimer(0)
+ drained := false
+ for {
+ select {
+ case task := <-ts.chTask:
+ now := time.Now()
+ if now.After(task.ts) {
+ // already delayed! execute immediately
+ task.execute()
+ } else {
+ heap.Push(&tasks, task)
+ // properly reset timer to trigger based on the top element
+ stopped := timer.Stop()
+ if !stopped && !drained {
+ <-timer.C
+ }
+ timer.Reset(tasks[0].ts.Sub(now))
+ drained = false
+ }
+ case now := <-timer.C:
+ drained = true
+ for tasks.Len() > 0 {
+ if now.After(tasks[0].ts) {
+ heap.Pop(&tasks).(timedFunc).execute()
+ } else {
+ timer.Reset(tasks[0].ts.Sub(now))
+ drained = false
+ break
+ }
+ }
+ case <-ts.die:
+ return
+ }
+ }
+}
+
+func (ts *TimedSched) prepend() {
+ var tasks []timedFunc
+ for {
+ select {
+ case <-ts.chPrependNotify:
+ ts.prependLock.Lock()
+ // keep cap to reuse slice
+ if cap(tasks) < cap(ts.prependTasks) {
+ tasks = make([]timedFunc, 0, cap(ts.prependTasks))
+ }
+ tasks = tasks[:len(ts.prependTasks)]
+ copy(tasks, ts.prependTasks)
+ for k := range ts.prependTasks {
+ ts.prependTasks[k].execute = nil // avoid memory leak
+ }
+ ts.prependTasks = ts.prependTasks[:0]
+ ts.prependLock.Unlock()
+
+ for k := range tasks {
+ select {
+ case ts.chTask <- tasks[k]:
+ tasks[k].execute = nil // avoid memory leak
+ case <-ts.die:
+ return
+ }
+ }
+ tasks = tasks[:0]
+ case <-ts.die:
+ return
+ }
+ }
+}
+
+// Put a function 'f' awaiting to be executed at 'deadline'
+func (ts *TimedSched) Put(f func(), deadline time.Time) {
+ ts.prependLock.Lock()
+ ts.prependTasks = append(ts.prependTasks, timedFunc{f, deadline})
+ ts.prependLock.Unlock()
+
+ select {
+ case ts.chPrependNotify <- struct{}{}:
+ default:
+ }
+}
+
+// Close terminates this scheduler
+func (ts *TimedSched) Close() { ts.dieOnce.Do(func() { close(ts.die) }) }
diff --git a/vendor/github.com/xtaci/kcp-go/v5/tx.go b/vendor/github.com/xtaci/kcp-go/v5/tx.go
new file mode 100644
index 0000000..3397b82
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/tx.go
@@ -0,0 +1,24 @@
+package kcp
+
+import (
+ "sync/atomic"
+
+ "github.com/pkg/errors"
+ "golang.org/x/net/ipv4"
+)
+
+func (s *UDPSession) defaultTx(txqueue []ipv4.Message) {
+ nbytes := 0
+ npkts := 0
+ for k := range txqueue {
+ if n, err := s.conn.WriteTo(txqueue[k].Buffers[0], txqueue[k].Addr); err == nil {
+ nbytes += n
+ npkts++
+ } else {
+ s.notifyWriteError(errors.WithStack(err))
+ break
+ }
+ }
+ atomic.AddUint64(&DefaultSnmp.OutPkts, uint64(npkts))
+ atomic.AddUint64(&DefaultSnmp.OutBytes, uint64(nbytes))
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/tx_generic.go b/vendor/github.com/xtaci/kcp-go/v5/tx_generic.go
new file mode 100644
index 0000000..0b4f349
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/tx_generic.go
@@ -0,0 +1,11 @@
+// +build !linux
+
+package kcp
+
+import (
+ "golang.org/x/net/ipv4"
+)
+
+func (s *UDPSession) tx(txqueue []ipv4.Message) {
+ s.defaultTx(txqueue)
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/tx_linux.go b/vendor/github.com/xtaci/kcp-go/v5/tx_linux.go
new file mode 100644
index 0000000..4f19df5
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/tx_linux.go
@@ -0,0 +1,51 @@
+// +build linux
+
+package kcp
+
+import (
+ "net"
+ "os"
+ "sync/atomic"
+
+ "github.com/pkg/errors"
+ "golang.org/x/net/ipv4"
+)
+
+func (s *UDPSession) tx(txqueue []ipv4.Message) {
+ // default version
+ if s.xconn == nil || s.xconnWriteError != nil {
+ s.defaultTx(txqueue)
+ return
+ }
+
+ // x/net version
+ nbytes := 0
+ npkts := 0
+ for len(txqueue) > 0 {
+ if n, err := s.xconn.WriteBatch(txqueue, 0); err == nil {
+ for k := range txqueue[:n] {
+ nbytes += len(txqueue[k].Buffers[0])
+ }
+ npkts += n
+ txqueue = txqueue[n:]
+ } else {
+ // compatibility issue:
+ // for linux kernel<=2.6.32, support for sendmmsg is not available
+ // an error of type os.SyscallError will be returned
+ if operr, ok := err.(*net.OpError); ok {
+ if se, ok := operr.Err.(*os.SyscallError); ok {
+ if se.Syscall == "sendmmsg" {
+ s.xconnWriteError = se
+ s.defaultTx(txqueue)
+ return
+ }
+ }
+ }
+ s.notifyWriteError(errors.WithStack(err))
+ break
+ }
+ }
+
+ atomic.AddUint64(&DefaultSnmp.OutPkts, uint64(npkts))
+ atomic.AddUint64(&DefaultSnmp.OutBytes, uint64(nbytes))
+}
diff --git a/vendor/github.com/xtaci/kcp-go/v5/wechat_donate.jpg b/vendor/github.com/xtaci/kcp-go/v5/wechat_donate.jpg
new file mode 100644
index 0000000..ad72505
--- /dev/null
+++ b/vendor/github.com/xtaci/kcp-go/v5/wechat_donate.jpg
Binary files differ
diff --git a/vendor/github.com/xtaci/smux/.gitignore b/vendor/github.com/xtaci/smux/.gitignore
new file mode 100644
index 0000000..daf913b
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/.gitignore
@@ -0,0 +1,24 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof
diff --git a/vendor/github.com/xtaci/smux/.travis.yml b/vendor/github.com/xtaci/smux/.travis.yml
new file mode 100644
index 0000000..e1d30fa
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/.travis.yml
@@ -0,0 +1,17 @@
+language: go
+go:
+ - 1.9.x
+ - 1.10.x
+ - 1.11.x
+
+before_install:
+ - go get -t -v ./...
+
+install:
+ - go get github.com/xtaci/smux
+
+script:
+ - go test -coverprofile=coverage.txt -covermode=atomic -bench .
+
+after_success:
+ - bash <(curl -s https://codecov.io/bash)
diff --git a/vendor/github.com/xtaci/smux/LICENSE b/vendor/github.com/xtaci/smux/LICENSE
new file mode 100644
index 0000000..eed41ac
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016-2017 Daniel Fu
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/github.com/xtaci/smux/README.md b/vendor/github.com/xtaci/smux/README.md
new file mode 100644
index 0000000..a5c4680
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/README.md
@@ -0,0 +1,136 @@
+<img src="smux.png" alt="smux" height="35px" />
+
+[![GoDoc][1]][2] [![MIT licensed][3]][4] [![Build Status][5]][6] [![Go Report Card][7]][8] [![Coverage Statusd][9]][10] [![Sourcegraph][11]][12]
+
+<img src="mux.jpg" alt="smux" height="120px" />
+
+[1]: https://godoc.org/github.com/xtaci/smux?status.svg
+[2]: https://godoc.org/github.com/xtaci/smux
+[3]: https://img.shields.io/badge/license-MIT-blue.svg
+[4]: LICENSE
+[5]: https://travis-ci.org/xtaci/smux.svg?branch=master
+[6]: https://travis-ci.org/xtaci/smux
+[7]: https://goreportcard.com/badge/github.com/xtaci/smux
+[8]: https://goreportcard.com/report/github.com/xtaci/smux
+[9]: https://codecov.io/gh/xtaci/smux/branch/master/graph/badge.svg
+[10]: https://codecov.io/gh/xtaci/smux
+[11]: https://sourcegraph.com/github.com/xtaci/smux/-/badge.svg
+[12]: https://sourcegraph.com/github.com/xtaci/smux?badge
+
+## Introduction
+
+Smux ( **S**imple **MU**ltiple**X**ing) is a multiplexing library for Golang. It relies on an underlying connection to provide reliability and ordering, such as TCP or [KCP](https://github.com/xtaci/kcp-go), and provides stream-oriented multiplexing. The original intention of this library is to power the connection management for [kcp-go](https://github.com/xtaci/kcp-go).
+
+## Features
+
+1. ***Token bucket*** controlled receiving, which provides smoother bandwidth graph(see picture below).
+2. Session-wide receive buffer, shared among streams, **fully controlled** overall memory usage.
+3. Minimized header(8Bytes), maximized payload.
+4. Well-tested on millions of devices in [kcptun](https://github.com/xtaci/kcptun).
+5. Builtin fair queue traffic shaping.
+6. Per-stream sliding window to control congestion.(protocol version 2+).
+
+![smooth bandwidth curve](curve.jpg)
+
+## Documentation
+
+For complete documentation, see the associated [Godoc](https://godoc.org/github.com/xtaci/smux).
+
+## Benchmark
+```
+$ go test -v -run=^$ -bench .
+goos: darwin
+goarch: amd64
+pkg: github.com/xtaci/smux
+BenchmarkMSB-4 30000000 51.8 ns/op
+BenchmarkAcceptClose-4 50000 36783 ns/op
+BenchmarkConnSmux-4 30000 58335 ns/op 2246.88 MB/s 1208 B/op 19 allocs/op
+BenchmarkConnTCP-4 50000 25579 ns/op 5124.04 MB/s 0 B/op 0 allocs/op
+PASS
+ok github.com/xtaci/smux 7.811s
+```
+
+## Specification
+
+```
+VERSION(1B) | CMD(1B) | LENGTH(2B) | STREAMID(4B) | DATA(LENGTH)
+
+VALUES FOR LATEST VERSION:
+VERSION:
+ 1/2
+
+CMD:
+ cmdSYN(0)
+ cmdFIN(1)
+ cmdPSH(2)
+ cmdNOP(3)
+ cmdUPD(4) // only supported on version 2
+
+STREAMID:
+ client use odd numbers starts from 1
+ server use even numbers starts from 0
+
+cmdUPD:
+ | CONSUMED(4B) | WINDOW(4B) |
+```
+
+## Usage
+
+```go
+
+func client() {
+ // Get a TCP connection
+ conn, err := net.Dial(...)
+ if err != nil {
+ panic(err)
+ }
+
+ // Setup client side of smux
+ session, err := smux.Client(conn, nil)
+ if err != nil {
+ panic(err)
+ }
+
+ // Open a new stream
+ stream, err := session.OpenStream()
+ if err != nil {
+ panic(err)
+ }
+
+ // Stream implements io.ReadWriteCloser
+ stream.Write([]byte("ping"))
+ stream.Close()
+ session.Close()
+}
+
+func server() {
+ // Accept a TCP connection
+ conn, err := listener.Accept()
+ if err != nil {
+ panic(err)
+ }
+
+ // Setup server side of smux
+ session, err := smux.Server(conn, nil)
+ if err != nil {
+ panic(err)
+ }
+
+ // Accept a stream
+ stream, err := session.AcceptStream()
+ if err != nil {
+ panic(err)
+ }
+
+ // Listen for a message
+ buf := make([]byte, 4)
+ stream.Read(buf)
+ stream.Close()
+ session.Close()
+}
+
+```
+
+## Status
+
+Stable
diff --git a/vendor/github.com/xtaci/smux/alloc.go b/vendor/github.com/xtaci/smux/alloc.go
new file mode 100644
index 0000000..9e3acf3
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/alloc.go
@@ -0,0 +1,72 @@
+package smux
+
+import (
+ "errors"
+ "sync"
+)
+
+var (
+ defaultAllocator *Allocator
+ debruijinPos = [...]byte{0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31}
+)
+
+func init() {
+ defaultAllocator = NewAllocator()
+}
+
+// Allocator for incoming frames, optimized to prevent overwriting after zeroing
+type Allocator struct {
+ buffers []sync.Pool
+}
+
+// NewAllocator initiates a []byte allocator for frames less than 65536 bytes,
+// the waste(memory fragmentation) of space allocation is guaranteed to be
+// no more than 50%.
+func NewAllocator() *Allocator {
+ alloc := new(Allocator)
+ alloc.buffers = make([]sync.Pool, 17) // 1B -> 64K
+ for k := range alloc.buffers {
+ i := k
+ alloc.buffers[k].New = func() interface{} {
+ return make([]byte, 1<<uint32(i))
+ }
+ }
+ return alloc
+}
+
+// Get a []byte from pool with most appropriate cap
+func (alloc *Allocator) Get(size int) []byte {
+ if size <= 0 || size > 65536 {
+ return nil
+ }
+
+ bits := msb(size)
+ if size == 1<<bits {
+ return alloc.buffers[bits].Get().([]byte)[:size]
+ } else {
+ return alloc.buffers[bits+1].Get().([]byte)[:size]
+ }
+}
+
+// Put returns a []byte to pool for future use,
+// which the cap must be exactly 2^n
+func (alloc *Allocator) Put(buf []byte) error {
+ bits := msb(cap(buf))
+ if cap(buf) == 0 || cap(buf) > 65536 || cap(buf) != 1<<bits {
+ return errors.New("allocator Put() incorrect buffer size")
+ }
+ alloc.buffers[bits].Put(buf)
+ return nil
+}
+
+// msb return the pos of most significiant bit
+// http://supertech.csail.mit.edu/papers/debruijn.pdf
+func msb(size int) byte {
+ v := uint32(size)
+ v |= v >> 1
+ v |= v >> 2
+ v |= v >> 4
+ v |= v >> 8
+ v |= v >> 16
+ return debruijinPos[(v*0x07C4ACDD)>>27]
+}
diff --git a/vendor/github.com/xtaci/smux/curve.jpg b/vendor/github.com/xtaci/smux/curve.jpg
new file mode 100644
index 0000000..3fc4863
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/curve.jpg
Binary files differ
diff --git a/vendor/github.com/xtaci/smux/frame.go b/vendor/github.com/xtaci/smux/frame.go
new file mode 100644
index 0000000..467a058
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/frame.go
@@ -0,0 +1,81 @@
+package smux
+
+import (
+ "encoding/binary"
+ "fmt"
+)
+
+const ( // cmds
+ // protocol version 1:
+ cmdSYN byte = iota // stream open
+ cmdFIN // stream close, a.k.a EOF mark
+ cmdPSH // data push
+ cmdNOP // no operation
+
+ // protocol version 2 extra commands
+ // notify bytes consumed by remote peer-end
+ cmdUPD
+)
+
+const (
+ // data size of cmdUPD, format:
+ // |4B data consumed(ACK)| 4B window size(WINDOW) |
+ szCmdUPD = 8
+)
+
+const (
+ // initial peer window guess, a slow-start
+ initialPeerWindow = 262144
+)
+
+const (
+ sizeOfVer = 1
+ sizeOfCmd = 1
+ sizeOfLength = 2
+ sizeOfSid = 4
+ headerSize = sizeOfVer + sizeOfCmd + sizeOfSid + sizeOfLength
+)
+
+// Frame defines a packet from or to be multiplexed into a single connection
+type Frame struct {
+ ver byte
+ cmd byte
+ sid uint32
+ data []byte
+}
+
+func newFrame(version byte, cmd byte, sid uint32) Frame {
+ return Frame{ver: version, cmd: cmd, sid: sid}
+}
+
+type rawHeader [headerSize]byte
+
+func (h rawHeader) Version() byte {
+ return h[0]
+}
+
+func (h rawHeader) Cmd() byte {
+ return h[1]
+}
+
+func (h rawHeader) Length() uint16 {
+ return binary.LittleEndian.Uint16(h[2:])
+}
+
+func (h rawHeader) StreamID() uint32 {
+ return binary.LittleEndian.Uint32(h[4:])
+}
+
+func (h rawHeader) String() string {
+ return fmt.Sprintf("Version:%d Cmd:%d StreamID:%d Length:%d",
+ h.Version(), h.Cmd(), h.StreamID(), h.Length())
+}
+
+type updHeader [szCmdUPD]byte
+
+func (h updHeader) Consumed() uint32 {
+ return binary.LittleEndian.Uint32(h[:])
+}
+func (h updHeader) Window() uint32 {
+ return binary.LittleEndian.Uint32(h[4:])
+}
diff --git a/vendor/github.com/xtaci/smux/go.mod b/vendor/github.com/xtaci/smux/go.mod
new file mode 100644
index 0000000..9ddead6
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/go.mod
@@ -0,0 +1,3 @@
+module github.com/xtaci/smux
+
+go 1.13
diff --git a/vendor/github.com/xtaci/smux/go.sum b/vendor/github.com/xtaci/smux/go.sum
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/go.sum
diff --git a/vendor/github.com/xtaci/smux/mux.go b/vendor/github.com/xtaci/smux/mux.go
new file mode 100644
index 0000000..c0b8ab8
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/mux.go
@@ -0,0 +1,110 @@
+// Package smux is a multiplexing library for Golang.
+//
+// It relies on an underlying connection to provide reliability and ordering, such as TCP or KCP,
+// and provides stream-oriented multiplexing over a single channel.
+package smux
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "math"
+ "time"
+)
+
+// Config is used to tune the Smux session
+type Config struct {
+ // SMUX Protocol version, support 1,2
+ Version int
+
+ // Disabled keepalive
+ KeepAliveDisabled bool
+
+ // KeepAliveInterval is how often to send a NOP command to the remote
+ KeepAliveInterval time.Duration
+
+ // KeepAliveTimeout is how long the session
+ // will be closed if no data has arrived
+ KeepAliveTimeout time.Duration
+
+ // MaxFrameSize is used to control the maximum
+ // frame size to sent to the remote
+ MaxFrameSize int
+
+ // MaxReceiveBuffer is used to control the maximum
+ // number of data in the buffer pool
+ MaxReceiveBuffer int
+
+ // MaxStreamBuffer is used to control the maximum
+ // number of data per stream
+ MaxStreamBuffer int
+}
+
+// DefaultConfig is used to return a default configuration
+func DefaultConfig() *Config {
+ return &Config{
+ Version: 1,
+ KeepAliveInterval: 10 * time.Second,
+ KeepAliveTimeout: 30 * time.Second,
+ MaxFrameSize: 32768,
+ MaxReceiveBuffer: 4194304,
+ MaxStreamBuffer: 65536,
+ }
+}
+
+// VerifyConfig is used to verify the sanity of configuration
+func VerifyConfig(config *Config) error {
+ if !(config.Version == 1 || config.Version == 2) {
+ return errors.New("unsupported protocol version")
+ }
+ if !config.KeepAliveDisabled {
+ if config.KeepAliveInterval == 0 {
+ return errors.New("keep-alive interval must be positive")
+ }
+ if config.KeepAliveTimeout < config.KeepAliveInterval {
+ return fmt.Errorf("keep-alive timeout must be larger than keep-alive interval")
+ }
+ }
+ if config.MaxFrameSize <= 0 {
+ return errors.New("max frame size must be positive")
+ }
+ if config.MaxFrameSize > 65535 {
+ return errors.New("max frame size must not be larger than 65535")
+ }
+ if config.MaxReceiveBuffer <= 0 {
+ return errors.New("max receive buffer must be positive")
+ }
+ if config.MaxStreamBuffer <= 0 {
+ return errors.New("max stream buffer must be positive")
+ }
+ if config.MaxStreamBuffer > config.MaxReceiveBuffer {
+ return errors.New("max stream buffer must not be larger than max receive buffer")
+ }
+ if config.MaxStreamBuffer > math.MaxInt32 {
+ return errors.New("max stream buffer cannot be larger than 2147483647")
+ }
+ return nil
+}
+
+// Server is used to initialize a new server-side connection.
+func Server(conn io.ReadWriteCloser, config *Config) (*Session, error) {
+ if config == nil {
+ config = DefaultConfig()
+ }
+ if err := VerifyConfig(config); err != nil {
+ return nil, err
+ }
+ return newSession(config, conn, false), nil
+}
+
+// Client is used to initialize a new client-side connection.
+func Client(conn io.ReadWriteCloser, config *Config) (*Session, error) {
+ if config == nil {
+ config = DefaultConfig()
+ }
+
+ if err := VerifyConfig(config); err != nil {
+ return nil, err
+ }
+ return newSession(config, conn, true), nil
+}
diff --git a/vendor/github.com/xtaci/smux/mux.jpg b/vendor/github.com/xtaci/smux/mux.jpg
new file mode 100644
index 0000000..dde2e11
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/mux.jpg
Binary files differ
diff --git a/vendor/github.com/xtaci/smux/session.go b/vendor/github.com/xtaci/smux/session.go
new file mode 100644
index 0000000..bc56066
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/session.go
@@ -0,0 +1,525 @@
+package smux
+
+import (
+ "container/heap"
+ "encoding/binary"
+ "errors"
+ "io"
+ "net"
+ "sync"
+ "sync/atomic"
+ "time"
+)
+
+const (
+ defaultAcceptBacklog = 1024
+)
+
+var (
+ ErrInvalidProtocol = errors.New("invalid protocol")
+ ErrConsumed = errors.New("peer consumed more than sent")
+ ErrGoAway = errors.New("stream id overflows, should start a new connection")
+ ErrTimeout = errors.New("timeout")
+ ErrWouldBlock = errors.New("operation would block on IO")
+)
+
+type writeRequest struct {
+ prio uint64
+ frame Frame
+ result chan writeResult
+}
+
+type writeResult struct {
+ n int
+ err error
+}
+
+type buffersWriter interface {
+ WriteBuffers(v [][]byte) (n int, err error)
+}
+
+// Session defines a multiplexed connection for streams
+type Session struct {
+ conn io.ReadWriteCloser
+
+ config *Config
+ nextStreamID uint32 // next stream identifier
+ nextStreamIDLock sync.Mutex
+
+ bucket int32 // token bucket
+ bucketNotify chan struct{} // used for waiting for tokens
+
+ streams map[uint32]*Stream // all streams in this session
+ streamLock sync.Mutex // locks streams
+
+ die chan struct{} // flag session has died
+ dieOnce sync.Once
+
+ // socket error handling
+ socketReadError atomic.Value
+ socketWriteError atomic.Value
+ chSocketReadError chan struct{}
+ chSocketWriteError chan struct{}
+ socketReadErrorOnce sync.Once
+ socketWriteErrorOnce sync.Once
+
+ // smux protocol errors
+ protoError atomic.Value
+ chProtoError chan struct{}
+ protoErrorOnce sync.Once
+
+ chAccepts chan *Stream
+
+ dataReady int32 // flag data has arrived
+
+ goAway int32 // flag id exhausted
+
+ deadline atomic.Value
+
+ shaper chan writeRequest // a shaper for writing
+ writes chan writeRequest
+}
+
+func newSession(config *Config, conn io.ReadWriteCloser, client bool) *Session {
+ s := new(Session)
+ s.die = make(chan struct{})
+ s.conn = conn
+ s.config = config
+ s.streams = make(map[uint32]*Stream)
+ s.chAccepts = make(chan *Stream, defaultAcceptBacklog)
+ s.bucket = int32(config.MaxReceiveBuffer)
+ s.bucketNotify = make(chan struct{}, 1)
+ s.shaper = make(chan writeRequest)
+ s.writes = make(chan writeRequest)
+ s.chSocketReadError = make(chan struct{})
+ s.chSocketWriteError = make(chan struct{})
+ s.chProtoError = make(chan struct{})
+
+ if client {
+ s.nextStreamID = 1
+ } else {
+ s.nextStreamID = 0
+ }
+
+ go s.shaperLoop()
+ go s.recvLoop()
+ go s.sendLoop()
+ if !config.KeepAliveDisabled {
+ go s.keepalive()
+ }
+ return s
+}
+
+// OpenStream is used to create a new stream
+func (s *Session) OpenStream() (*Stream, error) {
+ if s.IsClosed() {
+ return nil, io.ErrClosedPipe
+ }
+
+ // generate stream id
+ s.nextStreamIDLock.Lock()
+ if s.goAway > 0 {
+ s.nextStreamIDLock.Unlock()
+ return nil, ErrGoAway
+ }
+
+ s.nextStreamID += 2
+ sid := s.nextStreamID
+ if sid == sid%2 { // stream-id overflows
+ s.goAway = 1
+ s.nextStreamIDLock.Unlock()
+ return nil, ErrGoAway
+ }
+ s.nextStreamIDLock.Unlock()
+
+ stream := newStream(sid, s.config.MaxFrameSize, s)
+
+ if _, err := s.writeFrame(newFrame(byte(s.config.Version), cmdSYN, sid)); err != nil {
+ return nil, err
+ }
+
+ s.streamLock.Lock()
+ defer s.streamLock.Unlock()
+ select {
+ case <-s.chSocketReadError:
+ return nil, s.socketReadError.Load().(error)
+ case <-s.chSocketWriteError:
+ return nil, s.socketWriteError.Load().(error)
+ case <-s.die:
+ return nil, io.ErrClosedPipe
+ default:
+ s.streams[sid] = stream
+ return stream, nil
+ }
+}
+
+// Open returns a generic ReadWriteCloser
+func (s *Session) Open() (io.ReadWriteCloser, error) {
+ return s.OpenStream()
+}
+
+// AcceptStream is used to block until the next available stream
+// is ready to be accepted.
+func (s *Session) AcceptStream() (*Stream, error) {
+ var deadline <-chan time.Time
+ if d, ok := s.deadline.Load().(time.Time); ok && !d.IsZero() {
+ timer := time.NewTimer(time.Until(d))
+ defer timer.Stop()
+ deadline = timer.C
+ }
+
+ select {
+ case stream := <-s.chAccepts:
+ return stream, nil
+ case <-deadline:
+ return nil, ErrTimeout
+ case <-s.chSocketReadError:
+ return nil, s.socketReadError.Load().(error)
+ case <-s.chProtoError:
+ return nil, s.protoError.Load().(error)
+ case <-s.die:
+ return nil, io.ErrClosedPipe
+ }
+}
+
+// Accept Returns a generic ReadWriteCloser instead of smux.Stream
+func (s *Session) Accept() (io.ReadWriteCloser, error) {
+ return s.AcceptStream()
+}
+
+// Close is used to close the session and all streams.
+func (s *Session) Close() error {
+ var once bool
+ s.dieOnce.Do(func() {
+ close(s.die)
+ once = true
+ })
+
+ if once {
+ s.streamLock.Lock()
+ for k := range s.streams {
+ s.streams[k].sessionClose()
+ }
+ s.streamLock.Unlock()
+ return s.conn.Close()
+ } else {
+ return io.ErrClosedPipe
+ }
+}
+
+// notifyBucket notifies recvLoop that bucket is available
+func (s *Session) notifyBucket() {
+ select {
+ case s.bucketNotify <- struct{}{}:
+ default:
+ }
+}
+
+func (s *Session) notifyReadError(err error) {
+ s.socketReadErrorOnce.Do(func() {
+ s.socketReadError.Store(err)
+ close(s.chSocketReadError)
+ })
+}
+
+func (s *Session) notifyWriteError(err error) {
+ s.socketWriteErrorOnce.Do(func() {
+ s.socketWriteError.Store(err)
+ close(s.chSocketWriteError)
+ })
+}
+
+func (s *Session) notifyProtoError(err error) {
+ s.protoErrorOnce.Do(func() {
+ s.protoError.Store(err)
+ close(s.chProtoError)
+ })
+}
+
+// IsClosed does a safe check to see if we have shutdown
+func (s *Session) IsClosed() bool {
+ select {
+ case <-s.die:
+ return true
+ default:
+ return false
+ }
+}
+
+// NumStreams returns the number of currently open streams
+func (s *Session) NumStreams() int {
+ if s.IsClosed() {
+ return 0
+ }
+ s.streamLock.Lock()
+ defer s.streamLock.Unlock()
+ return len(s.streams)
+}
+
+// SetDeadline sets a deadline used by Accept* calls.
+// A zero time value disables the deadline.
+func (s *Session) SetDeadline(t time.Time) error {
+ s.deadline.Store(t)
+ return nil
+}
+
+// LocalAddr satisfies net.Conn interface
+func (s *Session) LocalAddr() net.Addr {
+ if ts, ok := s.conn.(interface {
+ LocalAddr() net.Addr
+ }); ok {
+ return ts.LocalAddr()
+ }
+ return nil
+}
+
+// RemoteAddr satisfies net.Conn interface
+func (s *Session) RemoteAddr() net.Addr {
+ if ts, ok := s.conn.(interface {
+ RemoteAddr() net.Addr
+ }); ok {
+ return ts.RemoteAddr()
+ }
+ return nil
+}
+
+// notify the session that a stream has closed
+func (s *Session) streamClosed(sid uint32) {
+ s.streamLock.Lock()
+ if n := s.streams[sid].recycleTokens(); n > 0 { // return remaining tokens to the bucket
+ if atomic.AddInt32(&s.bucket, int32(n)) > 0 {
+ s.notifyBucket()
+ }
+ }
+ delete(s.streams, sid)
+ s.streamLock.Unlock()
+}
+
+// returnTokens is called by stream to return token after read
+func (s *Session) returnTokens(n int) {
+ if atomic.AddInt32(&s.bucket, int32(n)) > 0 {
+ s.notifyBucket()
+ }
+}
+
+// recvLoop keeps on reading from underlying connection if tokens are available
+func (s *Session) recvLoop() {
+ var hdr rawHeader
+ var updHdr updHeader
+
+ for {
+ for atomic.LoadInt32(&s.bucket) <= 0 && !s.IsClosed() {
+ select {
+ case <-s.bucketNotify:
+ case <-s.die:
+ return
+ }
+ }
+
+ // read header first
+ if _, err := io.ReadFull(s.conn, hdr[:]); err == nil {
+ atomic.StoreInt32(&s.dataReady, 1)
+ if hdr.Version() != byte(s.config.Version) {
+ s.notifyProtoError(ErrInvalidProtocol)
+ return
+ }
+ sid := hdr.StreamID()
+ switch hdr.Cmd() {
+ case cmdNOP:
+ case cmdSYN:
+ s.streamLock.Lock()
+ if _, ok := s.streams[sid]; !ok {
+ stream := newStream(sid, s.config.MaxFrameSize, s)
+ s.streams[sid] = stream
+ select {
+ case s.chAccepts <- stream:
+ case <-s.die:
+ }
+ }
+ s.streamLock.Unlock()
+ case cmdFIN:
+ s.streamLock.Lock()
+ if stream, ok := s.streams[sid]; ok {
+ stream.fin()
+ stream.notifyReadEvent()
+ }
+ s.streamLock.Unlock()
+ case cmdPSH:
+ if hdr.Length() > 0 {
+ newbuf := defaultAllocator.Get(int(hdr.Length()))
+ if written, err := io.ReadFull(s.conn, newbuf); err == nil {
+ s.streamLock.Lock()
+ if stream, ok := s.streams[sid]; ok {
+ stream.pushBytes(newbuf)
+ atomic.AddInt32(&s.bucket, -int32(written))
+ stream.notifyReadEvent()
+ }
+ s.streamLock.Unlock()
+ } else {
+ s.notifyReadError(err)
+ return
+ }
+ }
+ case cmdUPD:
+ if _, err := io.ReadFull(s.conn, updHdr[:]); err == nil {
+ s.streamLock.Lock()
+ if stream, ok := s.streams[sid]; ok {
+ stream.update(updHdr.Consumed(), updHdr.Window())
+ }
+ s.streamLock.Unlock()
+ } else {
+ s.notifyReadError(err)
+ return
+ }
+ default:
+ s.notifyProtoError(ErrInvalidProtocol)
+ return
+ }
+ } else {
+ s.notifyReadError(err)
+ return
+ }
+ }
+}
+
+func (s *Session) keepalive() {
+ tickerPing := time.NewTicker(s.config.KeepAliveInterval)
+ tickerTimeout := time.NewTicker(s.config.KeepAliveTimeout)
+ defer tickerPing.Stop()
+ defer tickerTimeout.Stop()
+ for {
+ select {
+ case <-tickerPing.C:
+ s.writeFrameInternal(newFrame(byte(s.config.Version), cmdNOP, 0), tickerPing.C, 0)
+ s.notifyBucket() // force a signal to the recvLoop
+ case <-tickerTimeout.C:
+ if !atomic.CompareAndSwapInt32(&s.dataReady, 1, 0) {
+ // recvLoop may block while bucket is 0, in this case,
+ // session should not be closed.
+ if atomic.LoadInt32(&s.bucket) > 0 {
+ s.Close()
+ return
+ }
+ }
+ case <-s.die:
+ return
+ }
+ }
+}
+
+// shaper shapes the sending sequence among streams
+func (s *Session) shaperLoop() {
+ var reqs shaperHeap
+ var next writeRequest
+ var chWrite chan writeRequest
+
+ for {
+ if len(reqs) > 0 {
+ chWrite = s.writes
+ next = heap.Pop(&reqs).(writeRequest)
+ } else {
+ chWrite = nil
+ }
+
+ select {
+ case <-s.die:
+ return
+ case r := <-s.shaper:
+ if chWrite != nil { // next is valid, reshape
+ heap.Push(&reqs, next)
+ }
+ heap.Push(&reqs, r)
+ case chWrite <- next:
+ }
+ }
+}
+
+func (s *Session) sendLoop() {
+ var buf []byte
+ var n int
+ var err error
+ var vec [][]byte // vector for writeBuffers
+
+ bw, ok := s.conn.(buffersWriter)
+ if ok {
+ buf = make([]byte, headerSize)
+ vec = make([][]byte, 2)
+ } else {
+ buf = make([]byte, (1<<16)+headerSize)
+ }
+
+ for {
+ select {
+ case <-s.die:
+ return
+ case request := <-s.writes:
+ buf[0] = request.frame.ver
+ buf[1] = request.frame.cmd
+ binary.LittleEndian.PutUint16(buf[2:], uint16(len(request.frame.data)))
+ binary.LittleEndian.PutUint32(buf[4:], request.frame.sid)
+
+ if len(vec) > 0 {
+ vec[0] = buf[:headerSize]
+ vec[1] = request.frame.data
+ n, err = bw.WriteBuffers(vec)
+ } else {
+ copy(buf[headerSize:], request.frame.data)
+ n, err = s.conn.Write(buf[:headerSize+len(request.frame.data)])
+ }
+
+ n -= headerSize
+ if n < 0 {
+ n = 0
+ }
+
+ result := writeResult{
+ n: n,
+ err: err,
+ }
+
+ request.result <- result
+ close(request.result)
+
+ // store conn error
+ if err != nil {
+ s.notifyWriteError(err)
+ return
+ }
+ }
+ }
+}
+
+// writeFrame writes the frame to the underlying connection
+// and returns the number of bytes written if successful
+func (s *Session) writeFrame(f Frame) (n int, err error) {
+ return s.writeFrameInternal(f, nil, 0)
+}
+
+// internal writeFrame version to support deadline used in keepalive
+func (s *Session) writeFrameInternal(f Frame, deadline <-chan time.Time, prio uint64) (int, error) {
+ req := writeRequest{
+ prio: prio,
+ frame: f,
+ result: make(chan writeResult, 1),
+ }
+ select {
+ case s.shaper <- req:
+ case <-s.die:
+ return 0, io.ErrClosedPipe
+ case <-s.chSocketWriteError:
+ return 0, s.socketWriteError.Load().(error)
+ case <-deadline:
+ return 0, ErrTimeout
+ }
+
+ select {
+ case result := <-req.result:
+ return result.n, result.err
+ case <-s.die:
+ return 0, io.ErrClosedPipe
+ case <-s.chSocketWriteError:
+ return 0, s.socketWriteError.Load().(error)
+ case <-deadline:
+ return 0, ErrTimeout
+ }
+}
diff --git a/vendor/github.com/xtaci/smux/shaper.go b/vendor/github.com/xtaci/smux/shaper.go
new file mode 100644
index 0000000..be03406
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/shaper.go
@@ -0,0 +1,16 @@
+package smux
+
+type shaperHeap []writeRequest
+
+func (h shaperHeap) Len() int { return len(h) }
+func (h shaperHeap) Less(i, j int) bool { return h[i].prio < h[j].prio }
+func (h shaperHeap) Swap(i, j int) { h[i], h[j] = h[j], h[i] }
+func (h *shaperHeap) Push(x interface{}) { *h = append(*h, x.(writeRequest)) }
+
+func (h *shaperHeap) Pop() interface{} {
+ old := *h
+ n := len(old)
+ x := old[n-1]
+ *h = old[0 : n-1]
+ return x
+}
diff --git a/vendor/github.com/xtaci/smux/smux.png b/vendor/github.com/xtaci/smux/smux.png
new file mode 100644
index 0000000..26aba3b
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/smux.png
Binary files differ
diff --git a/vendor/github.com/xtaci/smux/stream.go b/vendor/github.com/xtaci/smux/stream.go
new file mode 100644
index 0000000..6c9499c
--- /dev/null
+++ b/vendor/github.com/xtaci/smux/stream.go
@@ -0,0 +1,549 @@
+package smux
+
+import (
+ "encoding/binary"
+ "io"
+ "net"
+ "sync"
+ "sync/atomic"
+ "time"
+)
+
+// Stream implements net.Conn
+type Stream struct {
+ id uint32
+ sess *Session
+
+ buffers [][]byte
+ heads [][]byte // slice heads kept for recycle
+
+ bufferLock sync.Mutex
+ frameSize int
+
+ // notify a read event
+ chReadEvent chan struct{}
+
+ // flag the stream has closed
+ die chan struct{}
+ dieOnce sync.Once
+
+ // FIN command
+ chFinEvent chan struct{}
+ finEventOnce sync.Once
+
+ // deadlines
+ readDeadline atomic.Value
+ writeDeadline atomic.Value
+
+ // per stream sliding window control
+ numRead uint32 // number of consumed bytes
+ numWritten uint32 // count num of bytes written
+ incr uint32 // counting for sending
+
+ // UPD command
+ peerConsumed uint32 // num of bytes the peer has consumed
+ peerWindow uint32 // peer window, initialized to 256KB, updated by peer
+ chUpdate chan struct{} // notify of remote data consuming and window update
+}
+
+// newStream initiates a Stream struct
+func newStream(id uint32, frameSize int, sess *Session) *Stream {
+ s := new(Stream)
+ s.id = id
+ s.chReadEvent = make(chan struct{}, 1)
+ s.chUpdate = make(chan struct{}, 1)
+ s.frameSize = frameSize
+ s.sess = sess
+ s.die = make(chan struct{})
+ s.chFinEvent = make(chan struct{})
+ s.peerWindow = initialPeerWindow // set to initial window size
+ return s
+}
+
+// ID returns the unique stream ID.
+func (s *Stream) ID() uint32 {
+ return s.id
+}
+
+// Read implements net.Conn
+func (s *Stream) Read(b []byte) (n int, err error) {
+ for {
+ n, err = s.tryRead(b)
+ if err == ErrWouldBlock {
+ if ew := s.waitRead(); ew != nil {
+ return 0, ew
+ }
+ } else {
+ return n, err
+ }
+ }
+}
+
+// tryRead is the nonblocking version of Read
+func (s *Stream) tryRead(b []byte) (n int, err error) {
+ if s.sess.config.Version == 2 {
+ return s.tryReadv2(b)
+ }
+
+ if len(b) == 0 {
+ return 0, nil
+ }
+
+ s.bufferLock.Lock()
+ if len(s.buffers) > 0 {
+ n = copy(b, s.buffers[0])
+ s.buffers[0] = s.buffers[0][n:]
+ if len(s.buffers[0]) == 0 {
+ s.buffers[0] = nil
+ s.buffers = s.buffers[1:]
+ // full recycle
+ defaultAllocator.Put(s.heads[0])
+ s.heads = s.heads[1:]
+ }
+ }
+ s.bufferLock.Unlock()
+
+ if n > 0 {
+ s.sess.returnTokens(n)
+ return n, nil
+ }
+
+ select {
+ case <-s.die:
+ return 0, io.EOF
+ default:
+ return 0, ErrWouldBlock
+ }
+}
+
+func (s *Stream) tryReadv2(b []byte) (n int, err error) {
+ if len(b) == 0 {
+ return 0, nil
+ }
+
+ var notifyConsumed uint32
+ s.bufferLock.Lock()
+ if len(s.buffers) > 0 {
+ n = copy(b, s.buffers[0])
+ s.buffers[0] = s.buffers[0][n:]
+ if len(s.buffers[0]) == 0 {
+ s.buffers[0] = nil
+ s.buffers = s.buffers[1:]
+ // full recycle
+ defaultAllocator.Put(s.heads[0])
+ s.heads = s.heads[1:]
+ }
+ }
+
+ // in an ideal environment:
+ // if more than half of buffer has consumed, send read ack to peer
+ // based on round-trip time of ACK, continous flowing data
+ // won't slow down because of waiting for ACK, as long as the
+ // consumer keeps on reading data
+ // s.numRead == n also notify window at the first read
+ s.numRead += uint32(n)
+ s.incr += uint32(n)
+ if s.incr >= uint32(s.sess.config.MaxStreamBuffer/2) || s.numRead == uint32(n) {
+ notifyConsumed = s.numRead
+ s.incr = 0
+ }
+ s.bufferLock.Unlock()
+
+ if n > 0 {
+ s.sess.returnTokens(n)
+ if notifyConsumed > 0 {
+ err := s.sendWindowUpdate(notifyConsumed)
+ return n, err
+ } else {
+ return n, nil
+ }
+ }
+
+ select {
+ case <-s.die:
+ return 0, io.EOF
+ default:
+ return 0, ErrWouldBlock
+ }
+}
+
+// WriteTo implements io.WriteTo
+func (s *Stream) WriteTo(w io.Writer) (n int64, err error) {
+ if s.sess.config.Version == 2 {
+ return s.writeTov2(w)
+ }
+
+ for {
+ var buf []byte
+ s.bufferLock.Lock()
+ if len(s.buffers) > 0 {
+ buf = s.buffers[0]
+ s.buffers = s.buffers[1:]
+ s.heads = s.heads[1:]
+ }
+ s.bufferLock.Unlock()
+
+ if buf != nil {
+ nw, ew := w.Write(buf)
+ s.sess.returnTokens(len(buf))
+ defaultAllocator.Put(buf)
+ if nw > 0 {
+ n += int64(nw)
+ }
+
+ if ew != nil {
+ return n, ew
+ }
+ } else if ew := s.waitRead(); ew != nil {
+ return n, ew
+ }
+ }
+}
+
+func (s *Stream) writeTov2(w io.Writer) (n int64, err error) {
+ for {
+ var notifyConsumed uint32
+ var buf []byte
+ s.bufferLock.Lock()
+ if len(s.buffers) > 0 {
+ buf = s.buffers[0]
+ s.buffers = s.buffers[1:]
+ s.heads = s.heads[1:]
+ }
+ s.numRead += uint32(len(buf))
+ s.incr += uint32(len(buf))
+ if s.incr >= uint32(s.sess.config.MaxStreamBuffer/2) || s.numRead == uint32(len(buf)) {
+ notifyConsumed = s.numRead
+ s.incr = 0
+ }
+ s.bufferLock.Unlock()
+
+ if buf != nil {
+ nw, ew := w.Write(buf)
+ s.sess.returnTokens(len(buf))
+ defaultAllocator.Put(buf)
+ if nw > 0 {
+ n += int64(nw)
+ }
+
+ if ew != nil {
+ return n, ew
+ }
+
+ if notifyConsumed > 0 {
+ if err := s.sendWindowUpdate(notifyConsumed); err != nil {
+ return n, err
+ }
+ }
+ } else if ew := s.waitRead(); ew != nil {
+ return n, ew
+ }
+ }
+}
+
+func (s *Stream) sendWindowUpdate(consumed uint32) error {
+ var timer *time.Timer
+ var deadline <-chan time.Time
+ if d, ok := s.readDeadline.Load().(time.Time); ok && !d.IsZero() {
+ timer = time.NewTimer(time.Until(d))
+ defer timer.Stop()
+ deadline = timer.C
+ }
+
+ frame := newFrame(byte(s.sess.config.Version), cmdUPD, s.id)
+ var hdr updHeader
+ binary.LittleEndian.PutUint32(hdr[:], consumed)
+ binary.LittleEndian.PutUint32(hdr[4:], uint32(s.sess.config.MaxStreamBuffer))
+ frame.data = hdr[:]
+ _, err := s.sess.writeFrameInternal(frame, deadline, 0)
+ return err
+}
+
+func (s *Stream) waitRead() error {
+ var timer *time.Timer
+ var deadline <-chan time.Time
+ if d, ok := s.readDeadline.Load().(time.Time); ok && !d.IsZero() {
+ timer = time.NewTimer(time.Until(d))
+ defer timer.Stop()
+ deadline = timer.C
+ }
+
+ select {
+ case <-s.chReadEvent:
+ return nil
+ case <-s.chFinEvent:
+ // BUG(xtaci): Fix for https://github.com/xtaci/smux/issues/82
+ s.bufferLock.Lock()
+ defer s.bufferLock.Unlock()
+ if len(s.buffers) > 0 {
+ return nil
+ }
+ return io.EOF
+ case <-s.sess.chSocketReadError:
+ return s.sess.socketReadError.Load().(error)
+ case <-s.sess.chProtoError:
+ return s.sess.protoError.Load().(error)
+ case <-deadline:
+ return ErrTimeout
+ case <-s.die:
+ return io.ErrClosedPipe
+ }
+
+}
+
+// Write implements net.Conn
+//
+// Note that the behavior when multiple goroutines write concurrently is not deterministic,
+// frames may interleave in random way.
+func (s *Stream) Write(b []byte) (n int, err error) {
+ if s.sess.config.Version == 2 {
+ return s.writeV2(b)
+ }
+
+ var deadline <-chan time.Time
+ if d, ok := s.writeDeadline.Load().(time.Time); ok && !d.IsZero() {
+ timer := time.NewTimer(time.Until(d))
+ defer timer.Stop()
+ deadline = timer.C
+ }
+
+ // check if stream has closed
+ select {
+ case <-s.die:
+ return 0, io.ErrClosedPipe
+ default:
+ }
+
+ // frame split and transmit
+ sent := 0
+ frame := newFrame(byte(s.sess.config.Version), cmdPSH, s.id)
+ bts := b
+ for len(bts) > 0 {
+ sz := len(bts)
+ if sz > s.frameSize {
+ sz = s.frameSize
+ }
+ frame.data = bts[:sz]
+ bts = bts[sz:]
+ n, err := s.sess.writeFrameInternal(frame, deadline, uint64(s.numWritten))
+ s.numWritten++
+ sent += n
+ if err != nil {
+ return sent, err
+ }
+ }
+
+ return sent, nil
+}
+
+func (s *Stream) writeV2(b []byte) (n int, err error) {
+ // check empty input
+ if len(b) == 0 {
+ return 0, nil
+ }
+
+ // check if stream has closed
+ select {
+ case <-s.die:
+ return 0, io.ErrClosedPipe
+ default:
+ }
+
+ // create write deadline timer
+ var deadline <-chan time.Time
+ if d, ok := s.writeDeadline.Load().(time.Time); ok && !d.IsZero() {
+ timer := time.NewTimer(time.Until(d))
+ defer timer.Stop()
+ deadline = timer.C
+ }
+
+ // frame split and transmit process
+ sent := 0
+ frame := newFrame(byte(s.sess.config.Version), cmdPSH, s.id)
+
+ for {
+ // per stream sliding window control
+ // [.... [consumed... numWritten] ... win... ]
+ // [.... [consumed...................+rmtwnd]]
+ var bts []byte
+ // note:
+ // even if uint32 overflow, this math still works:
+ // eg1: uint32(0) - uint32(math.MaxUint32) = 1
+ // eg2: int32(uint32(0) - uint32(1)) = -1
+ // security check for misbehavior
+ inflight := int32(atomic.LoadUint32(&s.numWritten) - atomic.LoadUint32(&s.peerConsumed))
+ if inflight < 0 {
+ return 0, ErrConsumed
+ }
+
+ win := int32(atomic.LoadUint32(&s.peerWindow)) - inflight
+ if win > 0 {
+ if win > int32(len(b)) {
+ bts = b
+ b = nil
+ } else {
+ bts = b[:win]
+ b = b[win:]
+ }
+
+ for len(bts) > 0 {
+ sz := len(bts)
+ if sz > s.frameSize {
+ sz = s.frameSize
+ }
+ frame.data = bts[:sz]
+ bts = bts[sz:]
+ n, err := s.sess.writeFrameInternal(frame, deadline, uint64(atomic.LoadUint32(&s.numWritten)))
+ atomic.AddUint32(&s.numWritten, uint32(sz))
+ sent += n
+ if err != nil {
+ return sent, err
+ }
+ }
+ }
+
+ // if there is any data remaining to be sent
+ // wait until stream closes, window changes or deadline reached
+ // this blocking behavior will inform upper layer to do flow control
+ if len(b) > 0 {
+ select {
+ case <-s.chFinEvent: // if fin arrived, future window update is impossible
+ return 0, io.EOF
+ case <-s.die:
+ return sent, io.ErrClosedPipe
+ case <-deadline:
+ return sent, ErrTimeout
+ case <-s.sess.chSocketWriteError:
+ return sent, s.sess.socketWriteError.Load().(error)
+ case <-s.chUpdate:
+ continue
+ }
+ } else {
+ return sent, nil
+ }
+ }
+}
+
+// Close implements net.Conn
+func (s *Stream) Close() error {
+ var once bool
+ var err error
+ s.dieOnce.Do(func() {
+ close(s.die)
+ once = true
+ })
+
+ if once {
+ _, err = s.sess.writeFrame(newFrame(byte(s.sess.config.Version), cmdFIN, s.id))
+ s.sess.streamClosed(s.id)
+ return err
+ } else {
+ return io.ErrClosedPipe
+ }
+}
+
+// GetDieCh returns a readonly chan which can be readable
+// when the stream is to be closed.
+func (s *Stream) GetDieCh() <-chan struct{} {
+ return s.die
+}
+
+// SetReadDeadline sets the read deadline as defined by
+// net.Conn.SetReadDeadline.
+// A zero time value disables the deadline.
+func (s *Stream) SetReadDeadline(t time.Time) error {
+ s.readDeadline.Store(t)
+ s.notifyReadEvent()
+ return nil
+}
+
+// SetWriteDeadline sets the write deadline as defined by
+// net.Conn.SetWriteDeadline.
+// A zero time value disables the deadline.
+func (s *Stream) SetWriteDeadline(t time.Time) error {
+ s.writeDeadline.Store(t)
+ return nil
+}
+
+// SetDeadline sets both read and write deadlines as defined by
+// net.Conn.SetDeadline.
+// A zero time value disables the deadlines.
+func (s *Stream) SetDeadline(t time.Time) error {
+ if err := s.SetReadDeadline(t); err != nil {
+ return err
+ }
+ if err := s.SetWriteDeadline(t); err != nil {
+ return err
+ }
+ return nil
+}
+
+// session closes
+func (s *Stream) sessionClose() { s.dieOnce.Do(func() { close(s.die) }) }
+
+// LocalAddr satisfies net.Conn interface
+func (s *Stream) LocalAddr() net.Addr {
+ if ts, ok := s.sess.conn.(interface {
+ LocalAddr() net.Addr
+ }); ok {
+ return ts.LocalAddr()
+ }
+ return nil
+}
+
+// RemoteAddr satisfies net.Conn interface
+func (s *Stream) RemoteAddr() net.Addr {
+ if ts, ok := s.sess.conn.(interface {
+ RemoteAddr() net.Addr
+ }); ok {
+ return ts.RemoteAddr()
+ }
+ return nil
+}
+
+// pushBytes append buf to buffers
+func (s *Stream) pushBytes(buf []byte) (written int, err error) {
+ s.bufferLock.Lock()
+ s.buffers = append(s.buffers, buf)
+ s.heads = append(s.heads, buf)
+ s.bufferLock.Unlock()
+ return
+}
+
+// recycleTokens transform remaining bytes to tokens(will truncate buffer)
+func (s *Stream) recycleTokens() (n int) {
+ s.bufferLock.Lock()
+ for k := range s.buffers {
+ n += len(s.buffers[k])
+ defaultAllocator.Put(s.heads[k])
+ }
+ s.buffers = nil
+ s.heads = nil
+ s.bufferLock.Unlock()
+ return
+}
+
+// notify read event
+func (s *Stream) notifyReadEvent() {
+ select {
+ case s.chReadEvent <- struct{}{}:
+ default:
+ }
+}
+
+// update command
+func (s *Stream) update(consumed uint32, window uint32) {
+ atomic.StoreUint32(&s.peerConsumed, consumed)
+ atomic.StoreUint32(&s.peerWindow, window)
+ select {
+ case s.chUpdate <- struct{}{}:
+ default:
+ }
+}
+
+// mark this stream has been closed in protocol
+func (s *Stream) fin() {
+ s.finEventOnce.Do(func() {
+ close(s.chFinEvent)
+ })
+}
diff --git a/vendor/golang.org/x/crypto/blowfish/block.go b/vendor/golang.org/x/crypto/blowfish/block.go
new file mode 100644
index 0000000..9d80f19
--- /dev/null
+++ b/vendor/golang.org/x/crypto/blowfish/block.go
@@ -0,0 +1,159 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package blowfish
+
+// getNextWord returns the next big-endian uint32 value from the byte slice
+// at the given position in a circular manner, updating the position.
+func getNextWord(b []byte, pos *int) uint32 {
+ var w uint32
+ j := *pos
+ for i := 0; i < 4; i++ {
+ w = w<<8 | uint32(b[j])
+ j++
+ if j >= len(b) {
+ j = 0
+ }
+ }
+ *pos = j
+ return w
+}
+
+// ExpandKey performs a key expansion on the given *Cipher. Specifically, it
+// performs the Blowfish algorithm's key schedule which sets up the *Cipher's
+// pi and substitution tables for calls to Encrypt. This is used, primarily,
+// by the bcrypt package to reuse the Blowfish key schedule during its
+// set up. It's unlikely that you need to use this directly.
+func ExpandKey(key []byte, c *Cipher) {
+ j := 0
+ for i := 0; i < 18; i++ {
+ // Using inlined getNextWord for performance.
+ var d uint32
+ for k := 0; k < 4; k++ {
+ d = d<<8 | uint32(key[j])
+ j++
+ if j >= len(key) {
+ j = 0
+ }
+ }
+ c.p[i] ^= d
+ }
+
+ var l, r uint32
+ for i := 0; i < 18; i += 2 {
+ l, r = encryptBlock(l, r, c)
+ c.p[i], c.p[i+1] = l, r
+ }
+
+ for i := 0; i < 256; i += 2 {
+ l, r = encryptBlock(l, r, c)
+ c.s0[i], c.s0[i+1] = l, r
+ }
+ for i := 0; i < 256; i += 2 {
+ l, r = encryptBlock(l, r, c)
+ c.s1[i], c.s1[i+1] = l, r
+ }
+ for i := 0; i < 256; i += 2 {
+ l, r = encryptBlock(l, r, c)
+ c.s2[i], c.s2[i+1] = l, r
+ }
+ for i := 0; i < 256; i += 2 {
+ l, r = encryptBlock(l, r, c)
+ c.s3[i], c.s3[i+1] = l, r
+ }
+}
+
+// This is similar to ExpandKey, but folds the salt during the key
+// schedule. While ExpandKey is essentially expandKeyWithSalt with an all-zero
+// salt passed in, reusing ExpandKey turns out to be a place of inefficiency
+// and specializing it here is useful.
+func expandKeyWithSalt(key []byte, salt []byte, c *Cipher) {
+ j := 0
+ for i := 0; i < 18; i++ {
+ c.p[i] ^= getNextWord(key, &j)
+ }
+
+ j = 0
+ var l, r uint32
+ for i := 0; i < 18; i += 2 {
+ l ^= getNextWord(salt, &j)
+ r ^= getNextWord(salt, &j)
+ l, r = encryptBlock(l, r, c)
+ c.p[i], c.p[i+1] = l, r
+ }
+
+ for i := 0; i < 256; i += 2 {
+ l ^= getNextWord(salt, &j)
+ r ^= getNextWord(salt, &j)
+ l, r = encryptBlock(l, r, c)
+ c.s0[i], c.s0[i+1] = l, r
+ }
+
+ for i := 0; i < 256; i += 2 {
+ l ^= getNextWord(salt, &j)
+ r ^= getNextWord(salt, &j)
+ l, r = encryptBlock(l, r, c)
+ c.s1[i], c.s1[i+1] = l, r
+ }
+
+ for i := 0; i < 256; i += 2 {
+ l ^= getNextWord(salt, &j)
+ r ^= getNextWord(salt, &j)
+ l, r = encryptBlock(l, r, c)
+ c.s2[i], c.s2[i+1] = l, r
+ }
+
+ for i := 0; i < 256; i += 2 {
+ l ^= getNextWord(salt, &j)
+ r ^= getNextWord(salt, &j)
+ l, r = encryptBlock(l, r, c)
+ c.s3[i], c.s3[i+1] = l, r
+ }
+}
+
+func encryptBlock(l, r uint32, c *Cipher) (uint32, uint32) {
+ xl, xr := l, r
+ xl ^= c.p[0]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[1]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[2]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[3]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[4]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[5]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[6]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[7]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[8]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[9]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[10]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[11]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[12]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[13]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[14]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[15]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[16]
+ xr ^= c.p[17]
+ return xr, xl
+}
+
+func decryptBlock(l, r uint32, c *Cipher) (uint32, uint32) {
+ xl, xr := l, r
+ xl ^= c.p[17]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[16]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[15]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[14]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[13]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[12]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[11]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[10]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[9]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[8]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[7]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[6]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[5]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[4]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[3]
+ xr ^= ((c.s0[byte(xl>>24)] + c.s1[byte(xl>>16)]) ^ c.s2[byte(xl>>8)]) + c.s3[byte(xl)] ^ c.p[2]
+ xl ^= ((c.s0[byte(xr>>24)] + c.s1[byte(xr>>16)]) ^ c.s2[byte(xr>>8)]) + c.s3[byte(xr)] ^ c.p[1]
+ xr ^= c.p[0]
+ return xr, xl
+}
diff --git a/vendor/golang.org/x/crypto/blowfish/cipher.go b/vendor/golang.org/x/crypto/blowfish/cipher.go
new file mode 100644
index 0000000..213bf20
--- /dev/null
+++ b/vendor/golang.org/x/crypto/blowfish/cipher.go
@@ -0,0 +1,99 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package blowfish implements Bruce Schneier's Blowfish encryption algorithm.
+//
+// Blowfish is a legacy cipher and its short block size makes it vulnerable to
+// birthday bound attacks (see https://sweet32.info). It should only be used
+// where compatibility with legacy systems, not security, is the goal.
+//
+// Deprecated: any new system should use AES (from crypto/aes, if necessary in
+// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from
+// golang.org/x/crypto/chacha20poly1305).
+package blowfish // import "golang.org/x/crypto/blowfish"
+
+// The code is a port of Bruce Schneier's C implementation.
+// See https://www.schneier.com/blowfish.html.
+
+import "strconv"
+
+// The Blowfish block size in bytes.
+const BlockSize = 8
+
+// A Cipher is an instance of Blowfish encryption using a particular key.
+type Cipher struct {
+ p [18]uint32
+ s0, s1, s2, s3 [256]uint32
+}
+
+type KeySizeError int
+
+func (k KeySizeError) Error() string {
+ return "crypto/blowfish: invalid key size " + strconv.Itoa(int(k))
+}
+
+// NewCipher creates and returns a Cipher.
+// The key argument should be the Blowfish key, from 1 to 56 bytes.
+func NewCipher(key []byte) (*Cipher, error) {
+ var result Cipher
+ if k := len(key); k < 1 || k > 56 {
+ return nil, KeySizeError(k)
+ }
+ initCipher(&result)
+ ExpandKey(key, &result)
+ return &result, nil
+}
+
+// NewSaltedCipher creates a returns a Cipher that folds a salt into its key
+// schedule. For most purposes, NewCipher, instead of NewSaltedCipher, is
+// sufficient and desirable. For bcrypt compatibility, the key can be over 56
+// bytes.
+func NewSaltedCipher(key, salt []byte) (*Cipher, error) {
+ if len(salt) == 0 {
+ return NewCipher(key)
+ }
+ var result Cipher
+ if k := len(key); k < 1 {
+ return nil, KeySizeError(k)
+ }
+ initCipher(&result)
+ expandKeyWithSalt(key, salt, &result)
+ return &result, nil
+}
+
+// BlockSize returns the Blowfish block size, 8 bytes.
+// It is necessary to satisfy the Block interface in the
+// package "crypto/cipher".
+func (c *Cipher) BlockSize() int { return BlockSize }
+
+// Encrypt encrypts the 8-byte buffer src using the key k
+// and stores the result in dst.
+// Note that for amounts of data larger than a block,
+// it is not safe to just call Encrypt on successive blocks;
+// instead, use an encryption mode like CBC (see crypto/cipher/cbc.go).
+func (c *Cipher) Encrypt(dst, src []byte) {
+ l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])
+ r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])
+ l, r = encryptBlock(l, r, c)
+ dst[0], dst[1], dst[2], dst[3] = byte(l>>24), byte(l>>16), byte(l>>8), byte(l)
+ dst[4], dst[5], dst[6], dst[7] = byte(r>>24), byte(r>>16), byte(r>>8), byte(r)
+}
+
+// Decrypt decrypts the 8-byte buffer src using the key k
+// and stores the result in dst.
+func (c *Cipher) Decrypt(dst, src []byte) {
+ l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])
+ r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])
+ l, r = decryptBlock(l, r, c)
+ dst[0], dst[1], dst[2], dst[3] = byte(l>>24), byte(l>>16), byte(l>>8), byte(l)
+ dst[4], dst[5], dst[6], dst[7] = byte(r>>24), byte(r>>16), byte(r>>8), byte(r)
+}
+
+func initCipher(c *Cipher) {
+ copy(c.p[0:], p[0:])
+ copy(c.s0[0:], s0[0:])
+ copy(c.s1[0:], s1[0:])
+ copy(c.s2[0:], s2[0:])
+ copy(c.s3[0:], s3[0:])
+}
diff --git a/vendor/golang.org/x/crypto/blowfish/const.go b/vendor/golang.org/x/crypto/blowfish/const.go
new file mode 100644
index 0000000..d040775
--- /dev/null
+++ b/vendor/golang.org/x/crypto/blowfish/const.go
@@ -0,0 +1,199 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// The startup permutation array and substitution boxes.
+// They are the hexadecimal digits of PI; see:
+// https://www.schneier.com/code/constants.txt.
+
+package blowfish
+
+var s0 = [256]uint32{
+ 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed, 0x6a267e96,
+ 0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,
+ 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 0x0d95748f, 0x728eb658,
+ 0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,
+ 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, 0x8e79dcb0, 0x603a180e,
+ 0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,
+ 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, 0x55ca396a, 0x2aab10b6,
+ 0xb4cc5c34, 0x1141e8ce, 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,
+ 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c,
+ 0x7a325381, 0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
+ 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, 0xef845d5d, 0xe98575b1,
+ 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
+ 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, 0x21c66842, 0xf6e96c9a,
+ 0x670c9c61, 0xabd388f0, 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,
+ 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176,
+ 0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,
+ 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, 0x4ed3aa62, 0x363f7706,
+ 0x1bfedf72, 0x429b023d, 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,
+ 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b,
+ 0x976ce0bd, 0x04c006ba, 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,
+ 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f, 0x9b30952c,
+ 0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,
+ 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, 0x5579c0bd, 0x1a60320a,
+ 0xd6a100c6, 0x402c7279, 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,
+ 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760,
+ 0x53317b48, 0x3e00df82, 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,
+ 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, 0x695b27b0, 0xbbca58c8,
+ 0xe1ffa35d, 0xb8f011a0, 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,
+ 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33,
+ 0x62fb1341, 0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
+ 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0, 0xafc725e0,
+ 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,
+ 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777,
+ 0xea752dfe, 0x8b021fa1, 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,
+ 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, 0x165fa266, 0x80957705,
+ 0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,
+ 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, 0x00250e2d, 0x2071b35e,
+ 0x226800bb, 0x57b8e0af, 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,
+ 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9,
+ 0x11c81968, 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,
+ 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 0x08ba6fb5, 0x571be91f,
+ 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,
+ 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a,
+}
+
+var s1 = [256]uint32{
+ 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, 0xad6ea6b0, 0x49a7df7d,
+ 0x9cee60b8, 0x8fedb266, 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1,
+ 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65,
+ 0x6b8fe4d6, 0x99f73fd6, 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,
+ 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, 0x09686b3f, 0x3ebaefc9,
+ 0x3c971814, 0x6b6a70a1, 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737,
+ 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, 0xb03ada37, 0xf0500c0d,
+ 0xf01c1f04, 0x0200b3ff, 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd,
+ 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc,
+ 0xc8b57634, 0x9af3dda7, 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41,
+ 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, 0x4e548b38, 0x4f6db908,
+ 0x6f420d03, 0xf60a04bf, 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af,
+ 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, 0x5512721f, 0x2e6b7124,
+ 0x501adde6, 0x9f84cd87, 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c,
+ 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, 0xef1c1847, 0x3215d908,
+ 0xdd433b37, 0x24c2ba16, 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd,
+ 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, 0x043556f1, 0xd7a3c76b,
+ 0x3c11183b, 0x5924a509, 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e,
+ 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c, 0x4e3d06fa,
+ 0x2965dcb9, 0x99e71d0f, 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a,
+ 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, 0xf2f74ea7, 0x361d2b3d,
+ 0x1939260f, 0x19c27960, 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66,
+ 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5,
+ 0x65582185, 0x68ab9802, 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,
+ 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, 0x13cca830, 0xeb61bd96,
+ 0x0334fe1e, 0xaa0363cf, 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14,
+ 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, 0x648b1eaf, 0x19bdf0ca,
+ 0xa02369b9, 0x655abb50, 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7,
+ 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77,
+ 0x11ed935f, 0x16681281, 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99,
+ 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, 0xcdb30aeb, 0x532e3054,
+ 0x8fd948e4, 0x6dbc3128, 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73,
+ 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea,
+ 0xdb6c4f15, 0xfacb4fd0, 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105,
+ 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, 0xcf62a1f2, 0x5b8d2646,
+ 0xfc8883a0, 0xc1c7b6a3, 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285,
+ 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, 0x58428d2a, 0x0c55f5ea,
+ 0x1dadf43e, 0x233f7061, 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb,
+ 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e,
+ 0xe8efd855, 0x61d99735, 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc,
+ 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, 0xdb73dbd3, 0x105588cd,
+ 0x675fda79, 0xe3674340, 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20,
+ 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7,
+}
+
+var s2 = [256]uint32{
+ 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, 0x411520f7, 0x7602d4f7,
+ 0xbcf46b2e, 0xd4a20068, 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af,
+ 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, 0x4d95fc1d, 0x96b591af,
+ 0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504,
+ 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, 0x28507825, 0x530429f4,
+ 0x0a2c86da, 0xe9b66dfb, 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee,
+ 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, 0xaace1e7c, 0xd3375fec,
+ 0xce78a399, 0x406b2a42, 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,
+ 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, 0x3a6efa74, 0xdd5b4332,
+ 0x6841e7f7, 0xca7820fb, 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527,
+ 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, 0x55a867bc, 0xa1159a58,
+ 0xcca92963, 0x99e1db33, 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c,
+ 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, 0x95c11548, 0xe4c66d22,
+ 0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17,
+ 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, 0x257b7834, 0x602a9c60,
+ 0xdff8e8a3, 0x1f636c1b, 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115,
+ 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, 0x85b2a20e, 0xe6ba0d99,
+ 0xde720c8c, 0x2da2f728, 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0,
+ 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, 0x0a476341, 0x992eff74,
+ 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d,
+ 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, 0xf1290dc7, 0xcc00ffa3,
+ 0xb5390f92, 0x690fed0b, 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3,
+ 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, 0x37392eb3, 0xcc115979,
+ 0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c,
+ 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, 0x1a6b1018, 0x11caedfa,
+ 0x3d25bdd8, 0xe2e1c3c9, 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a,
+ 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, 0x9dbc8057, 0xf0f7c086,
+ 0x60787bf8, 0x6003604d, 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,
+ 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, 0x77a057be, 0xbde8ae24,
+ 0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2,
+ 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, 0x7aeb2661, 0x8b1ddf84,
+ 0x846a0e79, 0x915f95e2, 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c,
+ 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, 0xb77f19b6, 0xe0a9dc09,
+ 0x662d09a1, 0xc4324633, 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10,
+ 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, 0xdcb7da83, 0x573906fe,
+ 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027,
+ 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, 0xf0177a28, 0xc0f586e0,
+ 0x006058aa, 0x30dc7d62, 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634,
+ 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, 0x6f05e409, 0x4b7c0188,
+ 0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc,
+ 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, 0x1e50ef5e, 0xb161e6f8,
+ 0xa28514d9, 0x6c51133c, 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837,
+ 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0,
+}
+
+var s3 = [256]uint32{
+ 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742,
+ 0xd3822740, 0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,
+ 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 0x5748ab2f, 0xbc946e79,
+ 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,
+ 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, 0xa1fad5f0, 0x6a2d519a,
+ 0x63ef8ce2, 0x9a86ee22, 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,
+ 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1,
+ 0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,
+ 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, 0xe990fd5a, 0x9e34d797,
+ 0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,
+ 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6,
+ 0x47b0acfd, 0xed93fa9b, 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,
+ 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4, 0x88f46dba,
+ 0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,
+ 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, 0x7533d928, 0xb155fdf5,
+ 0x03563482, 0x8aba3cbb, 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,
+ 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce,
+ 0x5121ce64, 0x774fbe32, 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,
+ 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, 0xb39a460a, 0x6445c0dd,
+ 0x586cdecf, 0x1c20c8ae, 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,
+ 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, 0x72eacea8, 0xfa6484bb,
+ 0x8d6612ae, 0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
+ 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08, 0x4eb4e2cc,
+ 0x34d2466a, 0x0115af84, 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,
+ 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, 0x611560b1, 0xe7933fdc,
+ 0xbb3a792b, 0x344525bd, 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,
+ 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, 0x1a908749, 0xd44fbd9a,
+ 0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,
+ 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, 0xbf97222c, 0x15e6fc2a,
+ 0x0f91fc71, 0x9b941525, 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,
+ 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b,
+ 0x4c98a0be, 0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,
+ 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, 0xdf359f8d, 0x9b992f2e,
+ 0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,
+ 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, 0xf523f357, 0xa6327623,
+ 0x93a83531, 0x56cccd02, 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,
+ 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a,
+ 0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,
+ 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, 0x53113ec0, 0x1640e3d3,
+ 0x38abbd60, 0x2547adf0, 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,
+ 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c,
+ 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
+ 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6,
+}
+
+var p = [18]uint32{
+ 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0,
+ 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
+ 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0x9216d5d9, 0x8979fb1b,
+}
diff --git a/vendor/golang.org/x/crypto/cast5/cast5.go b/vendor/golang.org/x/crypto/cast5/cast5.go
new file mode 100644
index 0000000..ddcbeb6
--- /dev/null
+++ b/vendor/golang.org/x/crypto/cast5/cast5.go
@@ -0,0 +1,533 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package cast5 implements CAST5, as defined in RFC 2144.
+//
+// CAST5 is a legacy cipher and its short block size makes it vulnerable to
+// birthday bound attacks (see https://sweet32.info). It should only be used
+// where compatibility with legacy systems, not security, is the goal.
+//
+// Deprecated: any new system should use AES (from crypto/aes, if necessary in
+// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from
+// golang.org/x/crypto/chacha20poly1305).
+package cast5 // import "golang.org/x/crypto/cast5"
+
+import "errors"
+
+const BlockSize = 8
+const KeySize = 16
+
+type Cipher struct {
+ masking [16]uint32
+ rotate [16]uint8
+}
+
+func NewCipher(key []byte) (c *Cipher, err error) {
+ if len(key) != KeySize {
+ return nil, errors.New("CAST5: keys must be 16 bytes")
+ }
+
+ c = new(Cipher)
+ c.keySchedule(key)
+ return
+}
+
+func (c *Cipher) BlockSize() int {
+ return BlockSize
+}
+
+func (c *Cipher) Encrypt(dst, src []byte) {
+ l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])
+ r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])
+
+ l, r = r, l^f1(r, c.masking[0], c.rotate[0])
+ l, r = r, l^f2(r, c.masking[1], c.rotate[1])
+ l, r = r, l^f3(r, c.masking[2], c.rotate[2])
+ l, r = r, l^f1(r, c.masking[3], c.rotate[3])
+
+ l, r = r, l^f2(r, c.masking[4], c.rotate[4])
+ l, r = r, l^f3(r, c.masking[5], c.rotate[5])
+ l, r = r, l^f1(r, c.masking[6], c.rotate[6])
+ l, r = r, l^f2(r, c.masking[7], c.rotate[7])
+
+ l, r = r, l^f3(r, c.masking[8], c.rotate[8])
+ l, r = r, l^f1(r, c.masking[9], c.rotate[9])
+ l, r = r, l^f2(r, c.masking[10], c.rotate[10])
+ l, r = r, l^f3(r, c.masking[11], c.rotate[11])
+
+ l, r = r, l^f1(r, c.masking[12], c.rotate[12])
+ l, r = r, l^f2(r, c.masking[13], c.rotate[13])
+ l, r = r, l^f3(r, c.masking[14], c.rotate[14])
+ l, r = r, l^f1(r, c.masking[15], c.rotate[15])
+
+ dst[0] = uint8(r >> 24)
+ dst[1] = uint8(r >> 16)
+ dst[2] = uint8(r >> 8)
+ dst[3] = uint8(r)
+ dst[4] = uint8(l >> 24)
+ dst[5] = uint8(l >> 16)
+ dst[6] = uint8(l >> 8)
+ dst[7] = uint8(l)
+}
+
+func (c *Cipher) Decrypt(dst, src []byte) {
+ l := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])
+ r := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])
+
+ l, r = r, l^f1(r, c.masking[15], c.rotate[15])
+ l, r = r, l^f3(r, c.masking[14], c.rotate[14])
+ l, r = r, l^f2(r, c.masking[13], c.rotate[13])
+ l, r = r, l^f1(r, c.masking[12], c.rotate[12])
+
+ l, r = r, l^f3(r, c.masking[11], c.rotate[11])
+ l, r = r, l^f2(r, c.masking[10], c.rotate[10])
+ l, r = r, l^f1(r, c.masking[9], c.rotate[9])
+ l, r = r, l^f3(r, c.masking[8], c.rotate[8])
+
+ l, r = r, l^f2(r, c.masking[7], c.rotate[7])
+ l, r = r, l^f1(r, c.masking[6], c.rotate[6])
+ l, r = r, l^f3(r, c.masking[5], c.rotate[5])
+ l, r = r, l^f2(r, c.masking[4], c.rotate[4])
+
+ l, r = r, l^f1(r, c.masking[3], c.rotate[3])
+ l, r = r, l^f3(r, c.masking[2], c.rotate[2])
+ l, r = r, l^f2(r, c.masking[1], c.rotate[1])
+ l, r = r, l^f1(r, c.masking[0], c.rotate[0])
+
+ dst[0] = uint8(r >> 24)
+ dst[1] = uint8(r >> 16)
+ dst[2] = uint8(r >> 8)
+ dst[3] = uint8(r)
+ dst[4] = uint8(l >> 24)
+ dst[5] = uint8(l >> 16)
+ dst[6] = uint8(l >> 8)
+ dst[7] = uint8(l)
+}
+
+type keyScheduleA [4][7]uint8
+type keyScheduleB [4][5]uint8
+
+// keyScheduleRound contains the magic values for a round of the key schedule.
+// The keyScheduleA deals with the lines like:
+// z0z1z2z3 = x0x1x2x3 ^ S5[xD] ^ S6[xF] ^ S7[xC] ^ S8[xE] ^ S7[x8]
+// Conceptually, both x and z are in the same array, x first. The first
+// element describes which word of this array gets written to and the
+// second, which word gets read. So, for the line above, it's "4, 0", because
+// it's writing to the first word of z, which, being after x, is word 4, and
+// reading from the first word of x: word 0.
+//
+// Next are the indexes into the S-boxes. Now the array is treated as bytes. So
+// "xD" is 0xd. The first byte of z is written as "16 + 0", just to be clear
+// that it's z that we're indexing.
+//
+// keyScheduleB deals with lines like:
+// K1 = S5[z8] ^ S6[z9] ^ S7[z7] ^ S8[z6] ^ S5[z2]
+// "K1" is ignored because key words are always written in order. So the five
+// elements are the S-box indexes. They use the same form as in keyScheduleA,
+// above.
+
+type keyScheduleRound struct{}
+type keySchedule []keyScheduleRound
+
+var schedule = []struct {
+ a keyScheduleA
+ b keyScheduleB
+}{
+ {
+ keyScheduleA{
+ {4, 0, 0xd, 0xf, 0xc, 0xe, 0x8},
+ {5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa},
+ {6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9},
+ {7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb},
+ },
+ keyScheduleB{
+ {16 + 8, 16 + 9, 16 + 7, 16 + 6, 16 + 2},
+ {16 + 0xa, 16 + 0xb, 16 + 5, 16 + 4, 16 + 6},
+ {16 + 0xc, 16 + 0xd, 16 + 3, 16 + 2, 16 + 9},
+ {16 + 0xe, 16 + 0xf, 16 + 1, 16 + 0, 16 + 0xc},
+ },
+ },
+ {
+ keyScheduleA{
+ {0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0},
+ {1, 4, 0, 2, 1, 3, 16 + 2},
+ {2, 5, 7, 6, 5, 4, 16 + 1},
+ {3, 7, 0xa, 9, 0xb, 8, 16 + 3},
+ },
+ keyScheduleB{
+ {3, 2, 0xc, 0xd, 8},
+ {1, 0, 0xe, 0xf, 0xd},
+ {7, 6, 8, 9, 3},
+ {5, 4, 0xa, 0xb, 7},
+ },
+ },
+ {
+ keyScheduleA{
+ {4, 0, 0xd, 0xf, 0xc, 0xe, 8},
+ {5, 2, 16 + 0, 16 + 2, 16 + 1, 16 + 3, 0xa},
+ {6, 3, 16 + 7, 16 + 6, 16 + 5, 16 + 4, 9},
+ {7, 1, 16 + 0xa, 16 + 9, 16 + 0xb, 16 + 8, 0xb},
+ },
+ keyScheduleB{
+ {16 + 3, 16 + 2, 16 + 0xc, 16 + 0xd, 16 + 9},
+ {16 + 1, 16 + 0, 16 + 0xe, 16 + 0xf, 16 + 0xc},
+ {16 + 7, 16 + 6, 16 + 8, 16 + 9, 16 + 2},
+ {16 + 5, 16 + 4, 16 + 0xa, 16 + 0xb, 16 + 6},
+ },
+ },
+ {
+ keyScheduleA{
+ {0, 6, 16 + 5, 16 + 7, 16 + 4, 16 + 6, 16 + 0},
+ {1, 4, 0, 2, 1, 3, 16 + 2},
+ {2, 5, 7, 6, 5, 4, 16 + 1},
+ {3, 7, 0xa, 9, 0xb, 8, 16 + 3},
+ },
+ keyScheduleB{
+ {8, 9, 7, 6, 3},
+ {0xa, 0xb, 5, 4, 7},
+ {0xc, 0xd, 3, 2, 8},
+ {0xe, 0xf, 1, 0, 0xd},
+ },
+ },
+}
+
+func (c *Cipher) keySchedule(in []byte) {
+ var t [8]uint32
+ var k [32]uint32
+
+ for i := 0; i < 4; i++ {
+ j := i * 4
+ t[i] = uint32(in[j])<<24 | uint32(in[j+1])<<16 | uint32(in[j+2])<<8 | uint32(in[j+3])
+ }
+
+ x := []byte{6, 7, 4, 5}
+ ki := 0
+
+ for half := 0; half < 2; half++ {
+ for _, round := range schedule {
+ for j := 0; j < 4; j++ {
+ var a [7]uint8
+ copy(a[:], round.a[j][:])
+ w := t[a[1]]
+ w ^= sBox[4][(t[a[2]>>2]>>(24-8*(a[2]&3)))&0xff]
+ w ^= sBox[5][(t[a[3]>>2]>>(24-8*(a[3]&3)))&0xff]
+ w ^= sBox[6][(t[a[4]>>2]>>(24-8*(a[4]&3)))&0xff]
+ w ^= sBox[7][(t[a[5]>>2]>>(24-8*(a[5]&3)))&0xff]
+ w ^= sBox[x[j]][(t[a[6]>>2]>>(24-8*(a[6]&3)))&0xff]
+ t[a[0]] = w
+ }
+
+ for j := 0; j < 4; j++ {
+ var b [5]uint8
+ copy(b[:], round.b[j][:])
+ w := sBox[4][(t[b[0]>>2]>>(24-8*(b[0]&3)))&0xff]
+ w ^= sBox[5][(t[b[1]>>2]>>(24-8*(b[1]&3)))&0xff]
+ w ^= sBox[6][(t[b[2]>>2]>>(24-8*(b[2]&3)))&0xff]
+ w ^= sBox[7][(t[b[3]>>2]>>(24-8*(b[3]&3)))&0xff]
+ w ^= sBox[4+j][(t[b[4]>>2]>>(24-8*(b[4]&3)))&0xff]
+ k[ki] = w
+ ki++
+ }
+ }
+ }
+
+ for i := 0; i < 16; i++ {
+ c.masking[i] = k[i]
+ c.rotate[i] = uint8(k[16+i] & 0x1f)
+ }
+}
+
+// These are the three 'f' functions. See RFC 2144, section 2.2.
+func f1(d, m uint32, r uint8) uint32 {
+ t := m + d
+ I := (t << r) | (t >> (32 - r))
+ return ((sBox[0][I>>24] ^ sBox[1][(I>>16)&0xff]) - sBox[2][(I>>8)&0xff]) + sBox[3][I&0xff]
+}
+
+func f2(d, m uint32, r uint8) uint32 {
+ t := m ^ d
+ I := (t << r) | (t >> (32 - r))
+ return ((sBox[0][I>>24] - sBox[1][(I>>16)&0xff]) + sBox[2][(I>>8)&0xff]) ^ sBox[3][I&0xff]
+}
+
+func f3(d, m uint32, r uint8) uint32 {
+ t := m - d
+ I := (t << r) | (t >> (32 - r))
+ return ((sBox[0][I>>24] + sBox[1][(I>>16)&0xff]) ^ sBox[2][(I>>8)&0xff]) - sBox[3][I&0xff]
+}
+
+var sBox = [8][256]uint32{
+ {
+ 0x30fb40d4, 0x9fa0ff0b, 0x6beccd2f, 0x3f258c7a, 0x1e213f2f, 0x9c004dd3, 0x6003e540, 0xcf9fc949,
+ 0xbfd4af27, 0x88bbbdb5, 0xe2034090, 0x98d09675, 0x6e63a0e0, 0x15c361d2, 0xc2e7661d, 0x22d4ff8e,
+ 0x28683b6f, 0xc07fd059, 0xff2379c8, 0x775f50e2, 0x43c340d3, 0xdf2f8656, 0x887ca41a, 0xa2d2bd2d,
+ 0xa1c9e0d6, 0x346c4819, 0x61b76d87, 0x22540f2f, 0x2abe32e1, 0xaa54166b, 0x22568e3a, 0xa2d341d0,
+ 0x66db40c8, 0xa784392f, 0x004dff2f, 0x2db9d2de, 0x97943fac, 0x4a97c1d8, 0x527644b7, 0xb5f437a7,
+ 0xb82cbaef, 0xd751d159, 0x6ff7f0ed, 0x5a097a1f, 0x827b68d0, 0x90ecf52e, 0x22b0c054, 0xbc8e5935,
+ 0x4b6d2f7f, 0x50bb64a2, 0xd2664910, 0xbee5812d, 0xb7332290, 0xe93b159f, 0xb48ee411, 0x4bff345d,
+ 0xfd45c240, 0xad31973f, 0xc4f6d02e, 0x55fc8165, 0xd5b1caad, 0xa1ac2dae, 0xa2d4b76d, 0xc19b0c50,
+ 0x882240f2, 0x0c6e4f38, 0xa4e4bfd7, 0x4f5ba272, 0x564c1d2f, 0xc59c5319, 0xb949e354, 0xb04669fe,
+ 0xb1b6ab8a, 0xc71358dd, 0x6385c545, 0x110f935d, 0x57538ad5, 0x6a390493, 0xe63d37e0, 0x2a54f6b3,
+ 0x3a787d5f, 0x6276a0b5, 0x19a6fcdf, 0x7a42206a, 0x29f9d4d5, 0xf61b1891, 0xbb72275e, 0xaa508167,
+ 0x38901091, 0xc6b505eb, 0x84c7cb8c, 0x2ad75a0f, 0x874a1427, 0xa2d1936b, 0x2ad286af, 0xaa56d291,
+ 0xd7894360, 0x425c750d, 0x93b39e26, 0x187184c9, 0x6c00b32d, 0x73e2bb14, 0xa0bebc3c, 0x54623779,
+ 0x64459eab, 0x3f328b82, 0x7718cf82, 0x59a2cea6, 0x04ee002e, 0x89fe78e6, 0x3fab0950, 0x325ff6c2,
+ 0x81383f05, 0x6963c5c8, 0x76cb5ad6, 0xd49974c9, 0xca180dcf, 0x380782d5, 0xc7fa5cf6, 0x8ac31511,
+ 0x35e79e13, 0x47da91d0, 0xf40f9086, 0xa7e2419e, 0x31366241, 0x051ef495, 0xaa573b04, 0x4a805d8d,
+ 0x548300d0, 0x00322a3c, 0xbf64cddf, 0xba57a68e, 0x75c6372b, 0x50afd341, 0xa7c13275, 0x915a0bf5,
+ 0x6b54bfab, 0x2b0b1426, 0xab4cc9d7, 0x449ccd82, 0xf7fbf265, 0xab85c5f3, 0x1b55db94, 0xaad4e324,
+ 0xcfa4bd3f, 0x2deaa3e2, 0x9e204d02, 0xc8bd25ac, 0xeadf55b3, 0xd5bd9e98, 0xe31231b2, 0x2ad5ad6c,
+ 0x954329de, 0xadbe4528, 0xd8710f69, 0xaa51c90f, 0xaa786bf6, 0x22513f1e, 0xaa51a79b, 0x2ad344cc,
+ 0x7b5a41f0, 0xd37cfbad, 0x1b069505, 0x41ece491, 0xb4c332e6, 0x032268d4, 0xc9600acc, 0xce387e6d,
+ 0xbf6bb16c, 0x6a70fb78, 0x0d03d9c9, 0xd4df39de, 0xe01063da, 0x4736f464, 0x5ad328d8, 0xb347cc96,
+ 0x75bb0fc3, 0x98511bfb, 0x4ffbcc35, 0xb58bcf6a, 0xe11f0abc, 0xbfc5fe4a, 0xa70aec10, 0xac39570a,
+ 0x3f04442f, 0x6188b153, 0xe0397a2e, 0x5727cb79, 0x9ceb418f, 0x1cacd68d, 0x2ad37c96, 0x0175cb9d,
+ 0xc69dff09, 0xc75b65f0, 0xd9db40d8, 0xec0e7779, 0x4744ead4, 0xb11c3274, 0xdd24cb9e, 0x7e1c54bd,
+ 0xf01144f9, 0xd2240eb1, 0x9675b3fd, 0xa3ac3755, 0xd47c27af, 0x51c85f4d, 0x56907596, 0xa5bb15e6,
+ 0x580304f0, 0xca042cf1, 0x011a37ea, 0x8dbfaadb, 0x35ba3e4a, 0x3526ffa0, 0xc37b4d09, 0xbc306ed9,
+ 0x98a52666, 0x5648f725, 0xff5e569d, 0x0ced63d0, 0x7c63b2cf, 0x700b45e1, 0xd5ea50f1, 0x85a92872,
+ 0xaf1fbda7, 0xd4234870, 0xa7870bf3, 0x2d3b4d79, 0x42e04198, 0x0cd0ede7, 0x26470db8, 0xf881814c,
+ 0x474d6ad7, 0x7c0c5e5c, 0xd1231959, 0x381b7298, 0xf5d2f4db, 0xab838653, 0x6e2f1e23, 0x83719c9e,
+ 0xbd91e046, 0x9a56456e, 0xdc39200c, 0x20c8c571, 0x962bda1c, 0xe1e696ff, 0xb141ab08, 0x7cca89b9,
+ 0x1a69e783, 0x02cc4843, 0xa2f7c579, 0x429ef47d, 0x427b169c, 0x5ac9f049, 0xdd8f0f00, 0x5c8165bf,
+ },
+ {
+ 0x1f201094, 0xef0ba75b, 0x69e3cf7e, 0x393f4380, 0xfe61cf7a, 0xeec5207a, 0x55889c94, 0x72fc0651,
+ 0xada7ef79, 0x4e1d7235, 0xd55a63ce, 0xde0436ba, 0x99c430ef, 0x5f0c0794, 0x18dcdb7d, 0xa1d6eff3,
+ 0xa0b52f7b, 0x59e83605, 0xee15b094, 0xe9ffd909, 0xdc440086, 0xef944459, 0xba83ccb3, 0xe0c3cdfb,
+ 0xd1da4181, 0x3b092ab1, 0xf997f1c1, 0xa5e6cf7b, 0x01420ddb, 0xe4e7ef5b, 0x25a1ff41, 0xe180f806,
+ 0x1fc41080, 0x179bee7a, 0xd37ac6a9, 0xfe5830a4, 0x98de8b7f, 0x77e83f4e, 0x79929269, 0x24fa9f7b,
+ 0xe113c85b, 0xacc40083, 0xd7503525, 0xf7ea615f, 0x62143154, 0x0d554b63, 0x5d681121, 0xc866c359,
+ 0x3d63cf73, 0xcee234c0, 0xd4d87e87, 0x5c672b21, 0x071f6181, 0x39f7627f, 0x361e3084, 0xe4eb573b,
+ 0x602f64a4, 0xd63acd9c, 0x1bbc4635, 0x9e81032d, 0x2701f50c, 0x99847ab4, 0xa0e3df79, 0xba6cf38c,
+ 0x10843094, 0x2537a95e, 0xf46f6ffe, 0xa1ff3b1f, 0x208cfb6a, 0x8f458c74, 0xd9e0a227, 0x4ec73a34,
+ 0xfc884f69, 0x3e4de8df, 0xef0e0088, 0x3559648d, 0x8a45388c, 0x1d804366, 0x721d9bfd, 0xa58684bb,
+ 0xe8256333, 0x844e8212, 0x128d8098, 0xfed33fb4, 0xce280ae1, 0x27e19ba5, 0xd5a6c252, 0xe49754bd,
+ 0xc5d655dd, 0xeb667064, 0x77840b4d, 0xa1b6a801, 0x84db26a9, 0xe0b56714, 0x21f043b7, 0xe5d05860,
+ 0x54f03084, 0x066ff472, 0xa31aa153, 0xdadc4755, 0xb5625dbf, 0x68561be6, 0x83ca6b94, 0x2d6ed23b,
+ 0xeccf01db, 0xa6d3d0ba, 0xb6803d5c, 0xaf77a709, 0x33b4a34c, 0x397bc8d6, 0x5ee22b95, 0x5f0e5304,
+ 0x81ed6f61, 0x20e74364, 0xb45e1378, 0xde18639b, 0x881ca122, 0xb96726d1, 0x8049a7e8, 0x22b7da7b,
+ 0x5e552d25, 0x5272d237, 0x79d2951c, 0xc60d894c, 0x488cb402, 0x1ba4fe5b, 0xa4b09f6b, 0x1ca815cf,
+ 0xa20c3005, 0x8871df63, 0xb9de2fcb, 0x0cc6c9e9, 0x0beeff53, 0xe3214517, 0xb4542835, 0x9f63293c,
+ 0xee41e729, 0x6e1d2d7c, 0x50045286, 0x1e6685f3, 0xf33401c6, 0x30a22c95, 0x31a70850, 0x60930f13,
+ 0x73f98417, 0xa1269859, 0xec645c44, 0x52c877a9, 0xcdff33a6, 0xa02b1741, 0x7cbad9a2, 0x2180036f,
+ 0x50d99c08, 0xcb3f4861, 0xc26bd765, 0x64a3f6ab, 0x80342676, 0x25a75e7b, 0xe4e6d1fc, 0x20c710e6,
+ 0xcdf0b680, 0x17844d3b, 0x31eef84d, 0x7e0824e4, 0x2ccb49eb, 0x846a3bae, 0x8ff77888, 0xee5d60f6,
+ 0x7af75673, 0x2fdd5cdb, 0xa11631c1, 0x30f66f43, 0xb3faec54, 0x157fd7fa, 0xef8579cc, 0xd152de58,
+ 0xdb2ffd5e, 0x8f32ce19, 0x306af97a, 0x02f03ef8, 0x99319ad5, 0xc242fa0f, 0xa7e3ebb0, 0xc68e4906,
+ 0xb8da230c, 0x80823028, 0xdcdef3c8, 0xd35fb171, 0x088a1bc8, 0xbec0c560, 0x61a3c9e8, 0xbca8f54d,
+ 0xc72feffa, 0x22822e99, 0x82c570b4, 0xd8d94e89, 0x8b1c34bc, 0x301e16e6, 0x273be979, 0xb0ffeaa6,
+ 0x61d9b8c6, 0x00b24869, 0xb7ffce3f, 0x08dc283b, 0x43daf65a, 0xf7e19798, 0x7619b72f, 0x8f1c9ba4,
+ 0xdc8637a0, 0x16a7d3b1, 0x9fc393b7, 0xa7136eeb, 0xc6bcc63e, 0x1a513742, 0xef6828bc, 0x520365d6,
+ 0x2d6a77ab, 0x3527ed4b, 0x821fd216, 0x095c6e2e, 0xdb92f2fb, 0x5eea29cb, 0x145892f5, 0x91584f7f,
+ 0x5483697b, 0x2667a8cc, 0x85196048, 0x8c4bacea, 0x833860d4, 0x0d23e0f9, 0x6c387e8a, 0x0ae6d249,
+ 0xb284600c, 0xd835731d, 0xdcb1c647, 0xac4c56ea, 0x3ebd81b3, 0x230eabb0, 0x6438bc87, 0xf0b5b1fa,
+ 0x8f5ea2b3, 0xfc184642, 0x0a036b7a, 0x4fb089bd, 0x649da589, 0xa345415e, 0x5c038323, 0x3e5d3bb9,
+ 0x43d79572, 0x7e6dd07c, 0x06dfdf1e, 0x6c6cc4ef, 0x7160a539, 0x73bfbe70, 0x83877605, 0x4523ecf1,
+ },
+ {
+ 0x8defc240, 0x25fa5d9f, 0xeb903dbf, 0xe810c907, 0x47607fff, 0x369fe44b, 0x8c1fc644, 0xaececa90,
+ 0xbeb1f9bf, 0xeefbcaea, 0xe8cf1950, 0x51df07ae, 0x920e8806, 0xf0ad0548, 0xe13c8d83, 0x927010d5,
+ 0x11107d9f, 0x07647db9, 0xb2e3e4d4, 0x3d4f285e, 0xb9afa820, 0xfade82e0, 0xa067268b, 0x8272792e,
+ 0x553fb2c0, 0x489ae22b, 0xd4ef9794, 0x125e3fbc, 0x21fffcee, 0x825b1bfd, 0x9255c5ed, 0x1257a240,
+ 0x4e1a8302, 0xbae07fff, 0x528246e7, 0x8e57140e, 0x3373f7bf, 0x8c9f8188, 0xa6fc4ee8, 0xc982b5a5,
+ 0xa8c01db7, 0x579fc264, 0x67094f31, 0xf2bd3f5f, 0x40fff7c1, 0x1fb78dfc, 0x8e6bd2c1, 0x437be59b,
+ 0x99b03dbf, 0xb5dbc64b, 0x638dc0e6, 0x55819d99, 0xa197c81c, 0x4a012d6e, 0xc5884a28, 0xccc36f71,
+ 0xb843c213, 0x6c0743f1, 0x8309893c, 0x0feddd5f, 0x2f7fe850, 0xd7c07f7e, 0x02507fbf, 0x5afb9a04,
+ 0xa747d2d0, 0x1651192e, 0xaf70bf3e, 0x58c31380, 0x5f98302e, 0x727cc3c4, 0x0a0fb402, 0x0f7fef82,
+ 0x8c96fdad, 0x5d2c2aae, 0x8ee99a49, 0x50da88b8, 0x8427f4a0, 0x1eac5790, 0x796fb449, 0x8252dc15,
+ 0xefbd7d9b, 0xa672597d, 0xada840d8, 0x45f54504, 0xfa5d7403, 0xe83ec305, 0x4f91751a, 0x925669c2,
+ 0x23efe941, 0xa903f12e, 0x60270df2, 0x0276e4b6, 0x94fd6574, 0x927985b2, 0x8276dbcb, 0x02778176,
+ 0xf8af918d, 0x4e48f79e, 0x8f616ddf, 0xe29d840e, 0x842f7d83, 0x340ce5c8, 0x96bbb682, 0x93b4b148,
+ 0xef303cab, 0x984faf28, 0x779faf9b, 0x92dc560d, 0x224d1e20, 0x8437aa88, 0x7d29dc96, 0x2756d3dc,
+ 0x8b907cee, 0xb51fd240, 0xe7c07ce3, 0xe566b4a1, 0xc3e9615e, 0x3cf8209d, 0x6094d1e3, 0xcd9ca341,
+ 0x5c76460e, 0x00ea983b, 0xd4d67881, 0xfd47572c, 0xf76cedd9, 0xbda8229c, 0x127dadaa, 0x438a074e,
+ 0x1f97c090, 0x081bdb8a, 0x93a07ebe, 0xb938ca15, 0x97b03cff, 0x3dc2c0f8, 0x8d1ab2ec, 0x64380e51,
+ 0x68cc7bfb, 0xd90f2788, 0x12490181, 0x5de5ffd4, 0xdd7ef86a, 0x76a2e214, 0xb9a40368, 0x925d958f,
+ 0x4b39fffa, 0xba39aee9, 0xa4ffd30b, 0xfaf7933b, 0x6d498623, 0x193cbcfa, 0x27627545, 0x825cf47a,
+ 0x61bd8ba0, 0xd11e42d1, 0xcead04f4, 0x127ea392, 0x10428db7, 0x8272a972, 0x9270c4a8, 0x127de50b,
+ 0x285ba1c8, 0x3c62f44f, 0x35c0eaa5, 0xe805d231, 0x428929fb, 0xb4fcdf82, 0x4fb66a53, 0x0e7dc15b,
+ 0x1f081fab, 0x108618ae, 0xfcfd086d, 0xf9ff2889, 0x694bcc11, 0x236a5cae, 0x12deca4d, 0x2c3f8cc5,
+ 0xd2d02dfe, 0xf8ef5896, 0xe4cf52da, 0x95155b67, 0x494a488c, 0xb9b6a80c, 0x5c8f82bc, 0x89d36b45,
+ 0x3a609437, 0xec00c9a9, 0x44715253, 0x0a874b49, 0xd773bc40, 0x7c34671c, 0x02717ef6, 0x4feb5536,
+ 0xa2d02fff, 0xd2bf60c4, 0xd43f03c0, 0x50b4ef6d, 0x07478cd1, 0x006e1888, 0xa2e53f55, 0xb9e6d4bc,
+ 0xa2048016, 0x97573833, 0xd7207d67, 0xde0f8f3d, 0x72f87b33, 0xabcc4f33, 0x7688c55d, 0x7b00a6b0,
+ 0x947b0001, 0x570075d2, 0xf9bb88f8, 0x8942019e, 0x4264a5ff, 0x856302e0, 0x72dbd92b, 0xee971b69,
+ 0x6ea22fde, 0x5f08ae2b, 0xaf7a616d, 0xe5c98767, 0xcf1febd2, 0x61efc8c2, 0xf1ac2571, 0xcc8239c2,
+ 0x67214cb8, 0xb1e583d1, 0xb7dc3e62, 0x7f10bdce, 0xf90a5c38, 0x0ff0443d, 0x606e6dc6, 0x60543a49,
+ 0x5727c148, 0x2be98a1d, 0x8ab41738, 0x20e1be24, 0xaf96da0f, 0x68458425, 0x99833be5, 0x600d457d,
+ 0x282f9350, 0x8334b362, 0xd91d1120, 0x2b6d8da0, 0x642b1e31, 0x9c305a00, 0x52bce688, 0x1b03588a,
+ 0xf7baefd5, 0x4142ed9c, 0xa4315c11, 0x83323ec5, 0xdfef4636, 0xa133c501, 0xe9d3531c, 0xee353783,
+ },
+ {
+ 0x9db30420, 0x1fb6e9de, 0xa7be7bef, 0xd273a298, 0x4a4f7bdb, 0x64ad8c57, 0x85510443, 0xfa020ed1,
+ 0x7e287aff, 0xe60fb663, 0x095f35a1, 0x79ebf120, 0xfd059d43, 0x6497b7b1, 0xf3641f63, 0x241e4adf,
+ 0x28147f5f, 0x4fa2b8cd, 0xc9430040, 0x0cc32220, 0xfdd30b30, 0xc0a5374f, 0x1d2d00d9, 0x24147b15,
+ 0xee4d111a, 0x0fca5167, 0x71ff904c, 0x2d195ffe, 0x1a05645f, 0x0c13fefe, 0x081b08ca, 0x05170121,
+ 0x80530100, 0xe83e5efe, 0xac9af4f8, 0x7fe72701, 0xd2b8ee5f, 0x06df4261, 0xbb9e9b8a, 0x7293ea25,
+ 0xce84ffdf, 0xf5718801, 0x3dd64b04, 0xa26f263b, 0x7ed48400, 0x547eebe6, 0x446d4ca0, 0x6cf3d6f5,
+ 0x2649abdf, 0xaea0c7f5, 0x36338cc1, 0x503f7e93, 0xd3772061, 0x11b638e1, 0x72500e03, 0xf80eb2bb,
+ 0xabe0502e, 0xec8d77de, 0x57971e81, 0xe14f6746, 0xc9335400, 0x6920318f, 0x081dbb99, 0xffc304a5,
+ 0x4d351805, 0x7f3d5ce3, 0xa6c866c6, 0x5d5bcca9, 0xdaec6fea, 0x9f926f91, 0x9f46222f, 0x3991467d,
+ 0xa5bf6d8e, 0x1143c44f, 0x43958302, 0xd0214eeb, 0x022083b8, 0x3fb6180c, 0x18f8931e, 0x281658e6,
+ 0x26486e3e, 0x8bd78a70, 0x7477e4c1, 0xb506e07c, 0xf32d0a25, 0x79098b02, 0xe4eabb81, 0x28123b23,
+ 0x69dead38, 0x1574ca16, 0xdf871b62, 0x211c40b7, 0xa51a9ef9, 0x0014377b, 0x041e8ac8, 0x09114003,
+ 0xbd59e4d2, 0xe3d156d5, 0x4fe876d5, 0x2f91a340, 0x557be8de, 0x00eae4a7, 0x0ce5c2ec, 0x4db4bba6,
+ 0xe756bdff, 0xdd3369ac, 0xec17b035, 0x06572327, 0x99afc8b0, 0x56c8c391, 0x6b65811c, 0x5e146119,
+ 0x6e85cb75, 0xbe07c002, 0xc2325577, 0x893ff4ec, 0x5bbfc92d, 0xd0ec3b25, 0xb7801ab7, 0x8d6d3b24,
+ 0x20c763ef, 0xc366a5fc, 0x9c382880, 0x0ace3205, 0xaac9548a, 0xeca1d7c7, 0x041afa32, 0x1d16625a,
+ 0x6701902c, 0x9b757a54, 0x31d477f7, 0x9126b031, 0x36cc6fdb, 0xc70b8b46, 0xd9e66a48, 0x56e55a79,
+ 0x026a4ceb, 0x52437eff, 0x2f8f76b4, 0x0df980a5, 0x8674cde3, 0xedda04eb, 0x17a9be04, 0x2c18f4df,
+ 0xb7747f9d, 0xab2af7b4, 0xefc34d20, 0x2e096b7c, 0x1741a254, 0xe5b6a035, 0x213d42f6, 0x2c1c7c26,
+ 0x61c2f50f, 0x6552daf9, 0xd2c231f8, 0x25130f69, 0xd8167fa2, 0x0418f2c8, 0x001a96a6, 0x0d1526ab,
+ 0x63315c21, 0x5e0a72ec, 0x49bafefd, 0x187908d9, 0x8d0dbd86, 0x311170a7, 0x3e9b640c, 0xcc3e10d7,
+ 0xd5cad3b6, 0x0caec388, 0xf73001e1, 0x6c728aff, 0x71eae2a1, 0x1f9af36e, 0xcfcbd12f, 0xc1de8417,
+ 0xac07be6b, 0xcb44a1d8, 0x8b9b0f56, 0x013988c3, 0xb1c52fca, 0xb4be31cd, 0xd8782806, 0x12a3a4e2,
+ 0x6f7de532, 0x58fd7eb6, 0xd01ee900, 0x24adffc2, 0xf4990fc5, 0x9711aac5, 0x001d7b95, 0x82e5e7d2,
+ 0x109873f6, 0x00613096, 0xc32d9521, 0xada121ff, 0x29908415, 0x7fbb977f, 0xaf9eb3db, 0x29c9ed2a,
+ 0x5ce2a465, 0xa730f32c, 0xd0aa3fe8, 0x8a5cc091, 0xd49e2ce7, 0x0ce454a9, 0xd60acd86, 0x015f1919,
+ 0x77079103, 0xdea03af6, 0x78a8565e, 0xdee356df, 0x21f05cbe, 0x8b75e387, 0xb3c50651, 0xb8a5c3ef,
+ 0xd8eeb6d2, 0xe523be77, 0xc2154529, 0x2f69efdf, 0xafe67afb, 0xf470c4b2, 0xf3e0eb5b, 0xd6cc9876,
+ 0x39e4460c, 0x1fda8538, 0x1987832f, 0xca007367, 0xa99144f8, 0x296b299e, 0x492fc295, 0x9266beab,
+ 0xb5676e69, 0x9bd3ddda, 0xdf7e052f, 0xdb25701c, 0x1b5e51ee, 0xf65324e6, 0x6afce36c, 0x0316cc04,
+ 0x8644213e, 0xb7dc59d0, 0x7965291f, 0xccd6fd43, 0x41823979, 0x932bcdf6, 0xb657c34d, 0x4edfd282,
+ 0x7ae5290c, 0x3cb9536b, 0x851e20fe, 0x9833557e, 0x13ecf0b0, 0xd3ffb372, 0x3f85c5c1, 0x0aef7ed2,
+ },
+ {
+ 0x7ec90c04, 0x2c6e74b9, 0x9b0e66df, 0xa6337911, 0xb86a7fff, 0x1dd358f5, 0x44dd9d44, 0x1731167f,
+ 0x08fbf1fa, 0xe7f511cc, 0xd2051b00, 0x735aba00, 0x2ab722d8, 0x386381cb, 0xacf6243a, 0x69befd7a,
+ 0xe6a2e77f, 0xf0c720cd, 0xc4494816, 0xccf5c180, 0x38851640, 0x15b0a848, 0xe68b18cb, 0x4caadeff,
+ 0x5f480a01, 0x0412b2aa, 0x259814fc, 0x41d0efe2, 0x4e40b48d, 0x248eb6fb, 0x8dba1cfe, 0x41a99b02,
+ 0x1a550a04, 0xba8f65cb, 0x7251f4e7, 0x95a51725, 0xc106ecd7, 0x97a5980a, 0xc539b9aa, 0x4d79fe6a,
+ 0xf2f3f763, 0x68af8040, 0xed0c9e56, 0x11b4958b, 0xe1eb5a88, 0x8709e6b0, 0xd7e07156, 0x4e29fea7,
+ 0x6366e52d, 0x02d1c000, 0xc4ac8e05, 0x9377f571, 0x0c05372a, 0x578535f2, 0x2261be02, 0xd642a0c9,
+ 0xdf13a280, 0x74b55bd2, 0x682199c0, 0xd421e5ec, 0x53fb3ce8, 0xc8adedb3, 0x28a87fc9, 0x3d959981,
+ 0x5c1ff900, 0xfe38d399, 0x0c4eff0b, 0x062407ea, 0xaa2f4fb1, 0x4fb96976, 0x90c79505, 0xb0a8a774,
+ 0xef55a1ff, 0xe59ca2c2, 0xa6b62d27, 0xe66a4263, 0xdf65001f, 0x0ec50966, 0xdfdd55bc, 0x29de0655,
+ 0x911e739a, 0x17af8975, 0x32c7911c, 0x89f89468, 0x0d01e980, 0x524755f4, 0x03b63cc9, 0x0cc844b2,
+ 0xbcf3f0aa, 0x87ac36e9, 0xe53a7426, 0x01b3d82b, 0x1a9e7449, 0x64ee2d7e, 0xcddbb1da, 0x01c94910,
+ 0xb868bf80, 0x0d26f3fd, 0x9342ede7, 0x04a5c284, 0x636737b6, 0x50f5b616, 0xf24766e3, 0x8eca36c1,
+ 0x136e05db, 0xfef18391, 0xfb887a37, 0xd6e7f7d4, 0xc7fb7dc9, 0x3063fcdf, 0xb6f589de, 0xec2941da,
+ 0x26e46695, 0xb7566419, 0xf654efc5, 0xd08d58b7, 0x48925401, 0xc1bacb7f, 0xe5ff550f, 0xb6083049,
+ 0x5bb5d0e8, 0x87d72e5a, 0xab6a6ee1, 0x223a66ce, 0xc62bf3cd, 0x9e0885f9, 0x68cb3e47, 0x086c010f,
+ 0xa21de820, 0xd18b69de, 0xf3f65777, 0xfa02c3f6, 0x407edac3, 0xcbb3d550, 0x1793084d, 0xb0d70eba,
+ 0x0ab378d5, 0xd951fb0c, 0xded7da56, 0x4124bbe4, 0x94ca0b56, 0x0f5755d1, 0xe0e1e56e, 0x6184b5be,
+ 0x580a249f, 0x94f74bc0, 0xe327888e, 0x9f7b5561, 0xc3dc0280, 0x05687715, 0x646c6bd7, 0x44904db3,
+ 0x66b4f0a3, 0xc0f1648a, 0x697ed5af, 0x49e92ff6, 0x309e374f, 0x2cb6356a, 0x85808573, 0x4991f840,
+ 0x76f0ae02, 0x083be84d, 0x28421c9a, 0x44489406, 0x736e4cb8, 0xc1092910, 0x8bc95fc6, 0x7d869cf4,
+ 0x134f616f, 0x2e77118d, 0xb31b2be1, 0xaa90b472, 0x3ca5d717, 0x7d161bba, 0x9cad9010, 0xaf462ba2,
+ 0x9fe459d2, 0x45d34559, 0xd9f2da13, 0xdbc65487, 0xf3e4f94e, 0x176d486f, 0x097c13ea, 0x631da5c7,
+ 0x445f7382, 0x175683f4, 0xcdc66a97, 0x70be0288, 0xb3cdcf72, 0x6e5dd2f3, 0x20936079, 0x459b80a5,
+ 0xbe60e2db, 0xa9c23101, 0xeba5315c, 0x224e42f2, 0x1c5c1572, 0xf6721b2c, 0x1ad2fff3, 0x8c25404e,
+ 0x324ed72f, 0x4067b7fd, 0x0523138e, 0x5ca3bc78, 0xdc0fd66e, 0x75922283, 0x784d6b17, 0x58ebb16e,
+ 0x44094f85, 0x3f481d87, 0xfcfeae7b, 0x77b5ff76, 0x8c2302bf, 0xaaf47556, 0x5f46b02a, 0x2b092801,
+ 0x3d38f5f7, 0x0ca81f36, 0x52af4a8a, 0x66d5e7c0, 0xdf3b0874, 0x95055110, 0x1b5ad7a8, 0xf61ed5ad,
+ 0x6cf6e479, 0x20758184, 0xd0cefa65, 0x88f7be58, 0x4a046826, 0x0ff6f8f3, 0xa09c7f70, 0x5346aba0,
+ 0x5ce96c28, 0xe176eda3, 0x6bac307f, 0x376829d2, 0x85360fa9, 0x17e3fe2a, 0x24b79767, 0xf5a96b20,
+ 0xd6cd2595, 0x68ff1ebf, 0x7555442c, 0xf19f06be, 0xf9e0659a, 0xeeb9491d, 0x34010718, 0xbb30cab8,
+ 0xe822fe15, 0x88570983, 0x750e6249, 0xda627e55, 0x5e76ffa8, 0xb1534546, 0x6d47de08, 0xefe9e7d4,
+ },
+ {
+ 0xf6fa8f9d, 0x2cac6ce1, 0x4ca34867, 0xe2337f7c, 0x95db08e7, 0x016843b4, 0xeced5cbc, 0x325553ac,
+ 0xbf9f0960, 0xdfa1e2ed, 0x83f0579d, 0x63ed86b9, 0x1ab6a6b8, 0xde5ebe39, 0xf38ff732, 0x8989b138,
+ 0x33f14961, 0xc01937bd, 0xf506c6da, 0xe4625e7e, 0xa308ea99, 0x4e23e33c, 0x79cbd7cc, 0x48a14367,
+ 0xa3149619, 0xfec94bd5, 0xa114174a, 0xeaa01866, 0xa084db2d, 0x09a8486f, 0xa888614a, 0x2900af98,
+ 0x01665991, 0xe1992863, 0xc8f30c60, 0x2e78ef3c, 0xd0d51932, 0xcf0fec14, 0xf7ca07d2, 0xd0a82072,
+ 0xfd41197e, 0x9305a6b0, 0xe86be3da, 0x74bed3cd, 0x372da53c, 0x4c7f4448, 0xdab5d440, 0x6dba0ec3,
+ 0x083919a7, 0x9fbaeed9, 0x49dbcfb0, 0x4e670c53, 0x5c3d9c01, 0x64bdb941, 0x2c0e636a, 0xba7dd9cd,
+ 0xea6f7388, 0xe70bc762, 0x35f29adb, 0x5c4cdd8d, 0xf0d48d8c, 0xb88153e2, 0x08a19866, 0x1ae2eac8,
+ 0x284caf89, 0xaa928223, 0x9334be53, 0x3b3a21bf, 0x16434be3, 0x9aea3906, 0xefe8c36e, 0xf890cdd9,
+ 0x80226dae, 0xc340a4a3, 0xdf7e9c09, 0xa694a807, 0x5b7c5ecc, 0x221db3a6, 0x9a69a02f, 0x68818a54,
+ 0xceb2296f, 0x53c0843a, 0xfe893655, 0x25bfe68a, 0xb4628abc, 0xcf222ebf, 0x25ac6f48, 0xa9a99387,
+ 0x53bddb65, 0xe76ffbe7, 0xe967fd78, 0x0ba93563, 0x8e342bc1, 0xe8a11be9, 0x4980740d, 0xc8087dfc,
+ 0x8de4bf99, 0xa11101a0, 0x7fd37975, 0xda5a26c0, 0xe81f994f, 0x9528cd89, 0xfd339fed, 0xb87834bf,
+ 0x5f04456d, 0x22258698, 0xc9c4c83b, 0x2dc156be, 0x4f628daa, 0x57f55ec5, 0xe2220abe, 0xd2916ebf,
+ 0x4ec75b95, 0x24f2c3c0, 0x42d15d99, 0xcd0d7fa0, 0x7b6e27ff, 0xa8dc8af0, 0x7345c106, 0xf41e232f,
+ 0x35162386, 0xe6ea8926, 0x3333b094, 0x157ec6f2, 0x372b74af, 0x692573e4, 0xe9a9d848, 0xf3160289,
+ 0x3a62ef1d, 0xa787e238, 0xf3a5f676, 0x74364853, 0x20951063, 0x4576698d, 0xb6fad407, 0x592af950,
+ 0x36f73523, 0x4cfb6e87, 0x7da4cec0, 0x6c152daa, 0xcb0396a8, 0xc50dfe5d, 0xfcd707ab, 0x0921c42f,
+ 0x89dff0bb, 0x5fe2be78, 0x448f4f33, 0x754613c9, 0x2b05d08d, 0x48b9d585, 0xdc049441, 0xc8098f9b,
+ 0x7dede786, 0xc39a3373, 0x42410005, 0x6a091751, 0x0ef3c8a6, 0x890072d6, 0x28207682, 0xa9a9f7be,
+ 0xbf32679d, 0xd45b5b75, 0xb353fd00, 0xcbb0e358, 0x830f220a, 0x1f8fb214, 0xd372cf08, 0xcc3c4a13,
+ 0x8cf63166, 0x061c87be, 0x88c98f88, 0x6062e397, 0x47cf8e7a, 0xb6c85283, 0x3cc2acfb, 0x3fc06976,
+ 0x4e8f0252, 0x64d8314d, 0xda3870e3, 0x1e665459, 0xc10908f0, 0x513021a5, 0x6c5b68b7, 0x822f8aa0,
+ 0x3007cd3e, 0x74719eef, 0xdc872681, 0x073340d4, 0x7e432fd9, 0x0c5ec241, 0x8809286c, 0xf592d891,
+ 0x08a930f6, 0x957ef305, 0xb7fbffbd, 0xc266e96f, 0x6fe4ac98, 0xb173ecc0, 0xbc60b42a, 0x953498da,
+ 0xfba1ae12, 0x2d4bd736, 0x0f25faab, 0xa4f3fceb, 0xe2969123, 0x257f0c3d, 0x9348af49, 0x361400bc,
+ 0xe8816f4a, 0x3814f200, 0xa3f94043, 0x9c7a54c2, 0xbc704f57, 0xda41e7f9, 0xc25ad33a, 0x54f4a084,
+ 0xb17f5505, 0x59357cbe, 0xedbd15c8, 0x7f97c5ab, 0xba5ac7b5, 0xb6f6deaf, 0x3a479c3a, 0x5302da25,
+ 0x653d7e6a, 0x54268d49, 0x51a477ea, 0x5017d55b, 0xd7d25d88, 0x44136c76, 0x0404a8c8, 0xb8e5a121,
+ 0xb81a928a, 0x60ed5869, 0x97c55b96, 0xeaec991b, 0x29935913, 0x01fdb7f1, 0x088e8dfa, 0x9ab6f6f5,
+ 0x3b4cbf9f, 0x4a5de3ab, 0xe6051d35, 0xa0e1d855, 0xd36b4cf1, 0xf544edeb, 0xb0e93524, 0xbebb8fbd,
+ 0xa2d762cf, 0x49c92f54, 0x38b5f331, 0x7128a454, 0x48392905, 0xa65b1db8, 0x851c97bd, 0xd675cf2f,
+ },
+ {
+ 0x85e04019, 0x332bf567, 0x662dbfff, 0xcfc65693, 0x2a8d7f6f, 0xab9bc912, 0xde6008a1, 0x2028da1f,
+ 0x0227bce7, 0x4d642916, 0x18fac300, 0x50f18b82, 0x2cb2cb11, 0xb232e75c, 0x4b3695f2, 0xb28707de,
+ 0xa05fbcf6, 0xcd4181e9, 0xe150210c, 0xe24ef1bd, 0xb168c381, 0xfde4e789, 0x5c79b0d8, 0x1e8bfd43,
+ 0x4d495001, 0x38be4341, 0x913cee1d, 0x92a79c3f, 0x089766be, 0xbaeeadf4, 0x1286becf, 0xb6eacb19,
+ 0x2660c200, 0x7565bde4, 0x64241f7a, 0x8248dca9, 0xc3b3ad66, 0x28136086, 0x0bd8dfa8, 0x356d1cf2,
+ 0x107789be, 0xb3b2e9ce, 0x0502aa8f, 0x0bc0351e, 0x166bf52a, 0xeb12ff82, 0xe3486911, 0xd34d7516,
+ 0x4e7b3aff, 0x5f43671b, 0x9cf6e037, 0x4981ac83, 0x334266ce, 0x8c9341b7, 0xd0d854c0, 0xcb3a6c88,
+ 0x47bc2829, 0x4725ba37, 0xa66ad22b, 0x7ad61f1e, 0x0c5cbafa, 0x4437f107, 0xb6e79962, 0x42d2d816,
+ 0x0a961288, 0xe1a5c06e, 0x13749e67, 0x72fc081a, 0xb1d139f7, 0xf9583745, 0xcf19df58, 0xbec3f756,
+ 0xc06eba30, 0x07211b24, 0x45c28829, 0xc95e317f, 0xbc8ec511, 0x38bc46e9, 0xc6e6fa14, 0xbae8584a,
+ 0xad4ebc46, 0x468f508b, 0x7829435f, 0xf124183b, 0x821dba9f, 0xaff60ff4, 0xea2c4e6d, 0x16e39264,
+ 0x92544a8b, 0x009b4fc3, 0xaba68ced, 0x9ac96f78, 0x06a5b79a, 0xb2856e6e, 0x1aec3ca9, 0xbe838688,
+ 0x0e0804e9, 0x55f1be56, 0xe7e5363b, 0xb3a1f25d, 0xf7debb85, 0x61fe033c, 0x16746233, 0x3c034c28,
+ 0xda6d0c74, 0x79aac56c, 0x3ce4e1ad, 0x51f0c802, 0x98f8f35a, 0x1626a49f, 0xeed82b29, 0x1d382fe3,
+ 0x0c4fb99a, 0xbb325778, 0x3ec6d97b, 0x6e77a6a9, 0xcb658b5c, 0xd45230c7, 0x2bd1408b, 0x60c03eb7,
+ 0xb9068d78, 0xa33754f4, 0xf430c87d, 0xc8a71302, 0xb96d8c32, 0xebd4e7be, 0xbe8b9d2d, 0x7979fb06,
+ 0xe7225308, 0x8b75cf77, 0x11ef8da4, 0xe083c858, 0x8d6b786f, 0x5a6317a6, 0xfa5cf7a0, 0x5dda0033,
+ 0xf28ebfb0, 0xf5b9c310, 0xa0eac280, 0x08b9767a, 0xa3d9d2b0, 0x79d34217, 0x021a718d, 0x9ac6336a,
+ 0x2711fd60, 0x438050e3, 0x069908a8, 0x3d7fedc4, 0x826d2bef, 0x4eeb8476, 0x488dcf25, 0x36c9d566,
+ 0x28e74e41, 0xc2610aca, 0x3d49a9cf, 0xbae3b9df, 0xb65f8de6, 0x92aeaf64, 0x3ac7d5e6, 0x9ea80509,
+ 0xf22b017d, 0xa4173f70, 0xdd1e16c3, 0x15e0d7f9, 0x50b1b887, 0x2b9f4fd5, 0x625aba82, 0x6a017962,
+ 0x2ec01b9c, 0x15488aa9, 0xd716e740, 0x40055a2c, 0x93d29a22, 0xe32dbf9a, 0x058745b9, 0x3453dc1e,
+ 0xd699296e, 0x496cff6f, 0x1c9f4986, 0xdfe2ed07, 0xb87242d1, 0x19de7eae, 0x053e561a, 0x15ad6f8c,
+ 0x66626c1c, 0x7154c24c, 0xea082b2a, 0x93eb2939, 0x17dcb0f0, 0x58d4f2ae, 0x9ea294fb, 0x52cf564c,
+ 0x9883fe66, 0x2ec40581, 0x763953c3, 0x01d6692e, 0xd3a0c108, 0xa1e7160e, 0xe4f2dfa6, 0x693ed285,
+ 0x74904698, 0x4c2b0edd, 0x4f757656, 0x5d393378, 0xa132234f, 0x3d321c5d, 0xc3f5e194, 0x4b269301,
+ 0xc79f022f, 0x3c997e7e, 0x5e4f9504, 0x3ffafbbd, 0x76f7ad0e, 0x296693f4, 0x3d1fce6f, 0xc61e45be,
+ 0xd3b5ab34, 0xf72bf9b7, 0x1b0434c0, 0x4e72b567, 0x5592a33d, 0xb5229301, 0xcfd2a87f, 0x60aeb767,
+ 0x1814386b, 0x30bcc33d, 0x38a0c07d, 0xfd1606f2, 0xc363519b, 0x589dd390, 0x5479f8e6, 0x1cb8d647,
+ 0x97fd61a9, 0xea7759f4, 0x2d57539d, 0x569a58cf, 0xe84e63ad, 0x462e1b78, 0x6580f87e, 0xf3817914,
+ 0x91da55f4, 0x40a230f3, 0xd1988f35, 0xb6e318d2, 0x3ffa50bc, 0x3d40f021, 0xc3c0bdae, 0x4958c24c,
+ 0x518f36b2, 0x84b1d370, 0x0fedce83, 0x878ddada, 0xf2a279c7, 0x94e01be8, 0x90716f4b, 0x954b8aa3,
+ },
+ {
+ 0xe216300d, 0xbbddfffc, 0xa7ebdabd, 0x35648095, 0x7789f8b7, 0xe6c1121b, 0x0e241600, 0x052ce8b5,
+ 0x11a9cfb0, 0xe5952f11, 0xece7990a, 0x9386d174, 0x2a42931c, 0x76e38111, 0xb12def3a, 0x37ddddfc,
+ 0xde9adeb1, 0x0a0cc32c, 0xbe197029, 0x84a00940, 0xbb243a0f, 0xb4d137cf, 0xb44e79f0, 0x049eedfd,
+ 0x0b15a15d, 0x480d3168, 0x8bbbde5a, 0x669ded42, 0xc7ece831, 0x3f8f95e7, 0x72df191b, 0x7580330d,
+ 0x94074251, 0x5c7dcdfa, 0xabbe6d63, 0xaa402164, 0xb301d40a, 0x02e7d1ca, 0x53571dae, 0x7a3182a2,
+ 0x12a8ddec, 0xfdaa335d, 0x176f43e8, 0x71fb46d4, 0x38129022, 0xce949ad4, 0xb84769ad, 0x965bd862,
+ 0x82f3d055, 0x66fb9767, 0x15b80b4e, 0x1d5b47a0, 0x4cfde06f, 0xc28ec4b8, 0x57e8726e, 0x647a78fc,
+ 0x99865d44, 0x608bd593, 0x6c200e03, 0x39dc5ff6, 0x5d0b00a3, 0xae63aff2, 0x7e8bd632, 0x70108c0c,
+ 0xbbd35049, 0x2998df04, 0x980cf42a, 0x9b6df491, 0x9e7edd53, 0x06918548, 0x58cb7e07, 0x3b74ef2e,
+ 0x522fffb1, 0xd24708cc, 0x1c7e27cd, 0xa4eb215b, 0x3cf1d2e2, 0x19b47a38, 0x424f7618, 0x35856039,
+ 0x9d17dee7, 0x27eb35e6, 0xc9aff67b, 0x36baf5b8, 0x09c467cd, 0xc18910b1, 0xe11dbf7b, 0x06cd1af8,
+ 0x7170c608, 0x2d5e3354, 0xd4de495a, 0x64c6d006, 0xbcc0c62c, 0x3dd00db3, 0x708f8f34, 0x77d51b42,
+ 0x264f620f, 0x24b8d2bf, 0x15c1b79e, 0x46a52564, 0xf8d7e54e, 0x3e378160, 0x7895cda5, 0x859c15a5,
+ 0xe6459788, 0xc37bc75f, 0xdb07ba0c, 0x0676a3ab, 0x7f229b1e, 0x31842e7b, 0x24259fd7, 0xf8bef472,
+ 0x835ffcb8, 0x6df4c1f2, 0x96f5b195, 0xfd0af0fc, 0xb0fe134c, 0xe2506d3d, 0x4f9b12ea, 0xf215f225,
+ 0xa223736f, 0x9fb4c428, 0x25d04979, 0x34c713f8, 0xc4618187, 0xea7a6e98, 0x7cd16efc, 0x1436876c,
+ 0xf1544107, 0xbedeee14, 0x56e9af27, 0xa04aa441, 0x3cf7c899, 0x92ecbae6, 0xdd67016d, 0x151682eb,
+ 0xa842eedf, 0xfdba60b4, 0xf1907b75, 0x20e3030f, 0x24d8c29e, 0xe139673b, 0xefa63fb8, 0x71873054,
+ 0xb6f2cf3b, 0x9f326442, 0xcb15a4cc, 0xb01a4504, 0xf1e47d8d, 0x844a1be5, 0xbae7dfdc, 0x42cbda70,
+ 0xcd7dae0a, 0x57e85b7a, 0xd53f5af6, 0x20cf4d8c, 0xcea4d428, 0x79d130a4, 0x3486ebfb, 0x33d3cddc,
+ 0x77853b53, 0x37effcb5, 0xc5068778, 0xe580b3e6, 0x4e68b8f4, 0xc5c8b37e, 0x0d809ea2, 0x398feb7c,
+ 0x132a4f94, 0x43b7950e, 0x2fee7d1c, 0x223613bd, 0xdd06caa2, 0x37df932b, 0xc4248289, 0xacf3ebc3,
+ 0x5715f6b7, 0xef3478dd, 0xf267616f, 0xc148cbe4, 0x9052815e, 0x5e410fab, 0xb48a2465, 0x2eda7fa4,
+ 0xe87b40e4, 0xe98ea084, 0x5889e9e1, 0xefd390fc, 0xdd07d35b, 0xdb485694, 0x38d7e5b2, 0x57720101,
+ 0x730edebc, 0x5b643113, 0x94917e4f, 0x503c2fba, 0x646f1282, 0x7523d24a, 0xe0779695, 0xf9c17a8f,
+ 0x7a5b2121, 0xd187b896, 0x29263a4d, 0xba510cdf, 0x81f47c9f, 0xad1163ed, 0xea7b5965, 0x1a00726e,
+ 0x11403092, 0x00da6d77, 0x4a0cdd61, 0xad1f4603, 0x605bdfb0, 0x9eedc364, 0x22ebe6a8, 0xcee7d28a,
+ 0xa0e736a0, 0x5564a6b9, 0x10853209, 0xc7eb8f37, 0x2de705ca, 0x8951570f, 0xdf09822b, 0xbd691a6c,
+ 0xaa12e4f2, 0x87451c0f, 0xe0f6a27a, 0x3ada4819, 0x4cf1764f, 0x0d771c2b, 0x67cdb156, 0x350d8384,
+ 0x5938fa0f, 0x42399ef3, 0x36997b07, 0x0e84093d, 0x4aa93e61, 0x8360d87b, 0x1fa98b0c, 0x1149382c,
+ 0xe97625a5, 0x0614d1b7, 0x0e25244b, 0x0c768347, 0x589e8d82, 0x0d2059d1, 0xa466bb1e, 0xf8da0a82,
+ 0x04f19130, 0xba6e4ec0, 0x99265164, 0x1ee7230d, 0x50b2ad80, 0xeaee6801, 0x8db2a283, 0xea8bf59e,
+ },
+}
diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1.go
new file mode 100644
index 0000000..83c776d
--- /dev/null
+++ b/vendor/golang.org/x/crypto/cryptobyte/asn1.go
@@ -0,0 +1,804 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cryptobyte
+
+import (
+ encoding_asn1 "encoding/asn1"
+ "fmt"
+ "math/big"
+ "reflect"
+ "time"
+
+ "golang.org/x/crypto/cryptobyte/asn1"
+)
+
+// This file contains ASN.1-related methods for String and Builder.
+
+// Builder
+
+// AddASN1Int64 appends a DER-encoded ASN.1 INTEGER.
+func (b *Builder) AddASN1Int64(v int64) {
+ b.addASN1Signed(asn1.INTEGER, v)
+}
+
+// AddASN1Int64WithTag appends a DER-encoded ASN.1 INTEGER with the
+// given tag.
+func (b *Builder) AddASN1Int64WithTag(v int64, tag asn1.Tag) {
+ b.addASN1Signed(tag, v)
+}
+
+// AddASN1Enum appends a DER-encoded ASN.1 ENUMERATION.
+func (b *Builder) AddASN1Enum(v int64) {
+ b.addASN1Signed(asn1.ENUM, v)
+}
+
+func (b *Builder) addASN1Signed(tag asn1.Tag, v int64) {
+ b.AddASN1(tag, func(c *Builder) {
+ length := 1
+ for i := v; i >= 0x80 || i < -0x80; i >>= 8 {
+ length++
+ }
+
+ for ; length > 0; length-- {
+ i := v >> uint((length-1)*8) & 0xff
+ c.AddUint8(uint8(i))
+ }
+ })
+}
+
+// AddASN1Uint64 appends a DER-encoded ASN.1 INTEGER.
+func (b *Builder) AddASN1Uint64(v uint64) {
+ b.AddASN1(asn1.INTEGER, func(c *Builder) {
+ length := 1
+ for i := v; i >= 0x80; i >>= 8 {
+ length++
+ }
+
+ for ; length > 0; length-- {
+ i := v >> uint((length-1)*8) & 0xff
+ c.AddUint8(uint8(i))
+ }
+ })
+}
+
+// AddASN1BigInt appends a DER-encoded ASN.1 INTEGER.
+func (b *Builder) AddASN1BigInt(n *big.Int) {
+ if b.err != nil {
+ return
+ }
+
+ b.AddASN1(asn1.INTEGER, func(c *Builder) {
+ if n.Sign() < 0 {
+ // A negative number has to be converted to two's-complement form. So we
+ // invert and subtract 1. If the most-significant-bit isn't set then
+ // we'll need to pad the beginning with 0xff in order to keep the number
+ // negative.
+ nMinus1 := new(big.Int).Neg(n)
+ nMinus1.Sub(nMinus1, bigOne)
+ bytes := nMinus1.Bytes()
+ for i := range bytes {
+ bytes[i] ^= 0xff
+ }
+ if len(bytes) == 0 || bytes[0]&0x80 == 0 {
+ c.add(0xff)
+ }
+ c.add(bytes...)
+ } else if n.Sign() == 0 {
+ c.add(0)
+ } else {
+ bytes := n.Bytes()
+ if bytes[0]&0x80 != 0 {
+ c.add(0)
+ }
+ c.add(bytes...)
+ }
+ })
+}
+
+// AddASN1OctetString appends a DER-encoded ASN.1 OCTET STRING.
+func (b *Builder) AddASN1OctetString(bytes []byte) {
+ b.AddASN1(asn1.OCTET_STRING, func(c *Builder) {
+ c.AddBytes(bytes)
+ })
+}
+
+const generalizedTimeFormatStr = "20060102150405Z0700"
+
+// AddASN1GeneralizedTime appends a DER-encoded ASN.1 GENERALIZEDTIME.
+func (b *Builder) AddASN1GeneralizedTime(t time.Time) {
+ if t.Year() < 0 || t.Year() > 9999 {
+ b.err = fmt.Errorf("cryptobyte: cannot represent %v as a GeneralizedTime", t)
+ return
+ }
+ b.AddASN1(asn1.GeneralizedTime, func(c *Builder) {
+ c.AddBytes([]byte(t.Format(generalizedTimeFormatStr)))
+ })
+}
+
+// AddASN1UTCTime appends a DER-encoded ASN.1 UTCTime.
+func (b *Builder) AddASN1UTCTime(t time.Time) {
+ b.AddASN1(asn1.UTCTime, func(c *Builder) {
+ // As utilized by the X.509 profile, UTCTime can only
+ // represent the years 1950 through 2049.
+ if t.Year() < 1950 || t.Year() >= 2050 {
+ b.err = fmt.Errorf("cryptobyte: cannot represent %v as a UTCTime", t)
+ return
+ }
+ c.AddBytes([]byte(t.Format(defaultUTCTimeFormatStr)))
+ })
+}
+
+// AddASN1BitString appends a DER-encoded ASN.1 BIT STRING. This does not
+// support BIT STRINGs that are not a whole number of bytes.
+func (b *Builder) AddASN1BitString(data []byte) {
+ b.AddASN1(asn1.BIT_STRING, func(b *Builder) {
+ b.AddUint8(0)
+ b.AddBytes(data)
+ })
+}
+
+func (b *Builder) addBase128Int(n int64) {
+ var length int
+ if n == 0 {
+ length = 1
+ } else {
+ for i := n; i > 0; i >>= 7 {
+ length++
+ }
+ }
+
+ for i := length - 1; i >= 0; i-- {
+ o := byte(n >> uint(i*7))
+ o &= 0x7f
+ if i != 0 {
+ o |= 0x80
+ }
+
+ b.add(o)
+ }
+}
+
+func isValidOID(oid encoding_asn1.ObjectIdentifier) bool {
+ if len(oid) < 2 {
+ return false
+ }
+
+ if oid[0] > 2 || (oid[0] <= 1 && oid[1] >= 40) {
+ return false
+ }
+
+ for _, v := range oid {
+ if v < 0 {
+ return false
+ }
+ }
+
+ return true
+}
+
+func (b *Builder) AddASN1ObjectIdentifier(oid encoding_asn1.ObjectIdentifier) {
+ b.AddASN1(asn1.OBJECT_IDENTIFIER, func(b *Builder) {
+ if !isValidOID(oid) {
+ b.err = fmt.Errorf("cryptobyte: invalid OID: %v", oid)
+ return
+ }
+
+ b.addBase128Int(int64(oid[0])*40 + int64(oid[1]))
+ for _, v := range oid[2:] {
+ b.addBase128Int(int64(v))
+ }
+ })
+}
+
+func (b *Builder) AddASN1Boolean(v bool) {
+ b.AddASN1(asn1.BOOLEAN, func(b *Builder) {
+ if v {
+ b.AddUint8(0xff)
+ } else {
+ b.AddUint8(0)
+ }
+ })
+}
+
+func (b *Builder) AddASN1NULL() {
+ b.add(uint8(asn1.NULL), 0)
+}
+
+// MarshalASN1 calls encoding_asn1.Marshal on its input and appends the result if
+// successful or records an error if one occurred.
+func (b *Builder) MarshalASN1(v interface{}) {
+ // NOTE(martinkr): This is somewhat of a hack to allow propagation of
+ // encoding_asn1.Marshal errors into Builder.err. N.B. if you call MarshalASN1 with a
+ // value embedded into a struct, its tag information is lost.
+ if b.err != nil {
+ return
+ }
+ bytes, err := encoding_asn1.Marshal(v)
+ if err != nil {
+ b.err = err
+ return
+ }
+ b.AddBytes(bytes)
+}
+
+// AddASN1 appends an ASN.1 object. The object is prefixed with the given tag.
+// Tags greater than 30 are not supported and result in an error (i.e.
+// low-tag-number form only). The child builder passed to the
+// BuilderContinuation can be used to build the content of the ASN.1 object.
+func (b *Builder) AddASN1(tag asn1.Tag, f BuilderContinuation) {
+ if b.err != nil {
+ return
+ }
+ // Identifiers with the low five bits set indicate high-tag-number format
+ // (two or more octets), which we don't support.
+ if tag&0x1f == 0x1f {
+ b.err = fmt.Errorf("cryptobyte: high-tag number identifier octects not supported: 0x%x", tag)
+ return
+ }
+ b.AddUint8(uint8(tag))
+ b.addLengthPrefixed(1, true, f)
+}
+
+// String
+
+// ReadASN1Boolean decodes an ASN.1 BOOLEAN and converts it to a boolean
+// representation into out and advances. It reports whether the read
+// was successful.
+func (s *String) ReadASN1Boolean(out *bool) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.BOOLEAN) || len(bytes) != 1 {
+ return false
+ }
+
+ switch bytes[0] {
+ case 0:
+ *out = false
+ case 0xff:
+ *out = true
+ default:
+ return false
+ }
+
+ return true
+}
+
+var bigIntType = reflect.TypeOf((*big.Int)(nil)).Elem()
+
+// ReadASN1Integer decodes an ASN.1 INTEGER into out and advances. If out does
+// not point to an integer or to a big.Int, it panics. It reports whether the
+// read was successful.
+func (s *String) ReadASN1Integer(out interface{}) bool {
+ if reflect.TypeOf(out).Kind() != reflect.Ptr {
+ panic("out is not a pointer")
+ }
+ switch reflect.ValueOf(out).Elem().Kind() {
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ var i int64
+ if !s.readASN1Int64(&i) || reflect.ValueOf(out).Elem().OverflowInt(i) {
+ return false
+ }
+ reflect.ValueOf(out).Elem().SetInt(i)
+ return true
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ var u uint64
+ if !s.readASN1Uint64(&u) || reflect.ValueOf(out).Elem().OverflowUint(u) {
+ return false
+ }
+ reflect.ValueOf(out).Elem().SetUint(u)
+ return true
+ case reflect.Struct:
+ if reflect.TypeOf(out).Elem() == bigIntType {
+ return s.readASN1BigInt(out.(*big.Int))
+ }
+ }
+ panic("out does not point to an integer type")
+}
+
+func checkASN1Integer(bytes []byte) bool {
+ if len(bytes) == 0 {
+ // An INTEGER is encoded with at least one octet.
+ return false
+ }
+ if len(bytes) == 1 {
+ return true
+ }
+ if bytes[0] == 0 && bytes[1]&0x80 == 0 || bytes[0] == 0xff && bytes[1]&0x80 == 0x80 {
+ // Value is not minimally encoded.
+ return false
+ }
+ return true
+}
+
+var bigOne = big.NewInt(1)
+
+func (s *String) readASN1BigInt(out *big.Int) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) {
+ return false
+ }
+ if bytes[0]&0x80 == 0x80 {
+ // Negative number.
+ neg := make([]byte, len(bytes))
+ for i, b := range bytes {
+ neg[i] = ^b
+ }
+ out.SetBytes(neg)
+ out.Add(out, bigOne)
+ out.Neg(out)
+ } else {
+ out.SetBytes(bytes)
+ }
+ return true
+}
+
+func (s *String) readASN1Int64(out *int64) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Signed(out, bytes) {
+ return false
+ }
+ return true
+}
+
+func asn1Signed(out *int64, n []byte) bool {
+ length := len(n)
+ if length > 8 {
+ return false
+ }
+ for i := 0; i < length; i++ {
+ *out <<= 8
+ *out |= int64(n[i])
+ }
+ // Shift up and down in order to sign extend the result.
+ *out <<= 64 - uint8(length)*8
+ *out >>= 64 - uint8(length)*8
+ return true
+}
+
+func (s *String) readASN1Uint64(out *uint64) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Unsigned(out, bytes) {
+ return false
+ }
+ return true
+}
+
+func asn1Unsigned(out *uint64, n []byte) bool {
+ length := len(n)
+ if length > 9 || length == 9 && n[0] != 0 {
+ // Too large for uint64.
+ return false
+ }
+ if n[0]&0x80 != 0 {
+ // Negative number.
+ return false
+ }
+ for i := 0; i < length; i++ {
+ *out <<= 8
+ *out |= uint64(n[i])
+ }
+ return true
+}
+
+// ReadASN1Int64WithTag decodes an ASN.1 INTEGER with the given tag into out
+// and advances. It reports whether the read was successful and resulted in a
+// value that can be represented in an int64.
+func (s *String) ReadASN1Int64WithTag(out *int64, tag asn1.Tag) bool {
+ var bytes String
+ return s.ReadASN1(&bytes, tag) && checkASN1Integer(bytes) && asn1Signed(out, bytes)
+}
+
+// ReadASN1Enum decodes an ASN.1 ENUMERATION into out and advances. It reports
+// whether the read was successful.
+func (s *String) ReadASN1Enum(out *int) bool {
+ var bytes String
+ var i int64
+ if !s.ReadASN1(&bytes, asn1.ENUM) || !checkASN1Integer(bytes) || !asn1Signed(&i, bytes) {
+ return false
+ }
+ if int64(int(i)) != i {
+ return false
+ }
+ *out = int(i)
+ return true
+}
+
+func (s *String) readBase128Int(out *int) bool {
+ ret := 0
+ for i := 0; len(*s) > 0; i++ {
+ if i == 4 {
+ return false
+ }
+ ret <<= 7
+ b := s.read(1)[0]
+ ret |= int(b & 0x7f)
+ if b&0x80 == 0 {
+ *out = ret
+ return true
+ }
+ }
+ return false // truncated
+}
+
+// ReadASN1ObjectIdentifier decodes an ASN.1 OBJECT IDENTIFIER into out and
+// advances. It reports whether the read was successful.
+func (s *String) ReadASN1ObjectIdentifier(out *encoding_asn1.ObjectIdentifier) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.OBJECT_IDENTIFIER) || len(bytes) == 0 {
+ return false
+ }
+
+ // In the worst case, we get two elements from the first byte (which is
+ // encoded differently) and then every varint is a single byte long.
+ components := make([]int, len(bytes)+1)
+
+ // The first varint is 40*value1 + value2:
+ // According to this packing, value1 can take the values 0, 1 and 2 only.
+ // When value1 = 0 or value1 = 1, then value2 is <= 39. When value1 = 2,
+ // then there are no restrictions on value2.
+ var v int
+ if !bytes.readBase128Int(&v) {
+ return false
+ }
+ if v < 80 {
+ components[0] = v / 40
+ components[1] = v % 40
+ } else {
+ components[0] = 2
+ components[1] = v - 80
+ }
+
+ i := 2
+ for ; len(bytes) > 0; i++ {
+ if !bytes.readBase128Int(&v) {
+ return false
+ }
+ components[i] = v
+ }
+ *out = components[:i]
+ return true
+}
+
+// ReadASN1GeneralizedTime decodes an ASN.1 GENERALIZEDTIME into out and
+// advances. It reports whether the read was successful.
+func (s *String) ReadASN1GeneralizedTime(out *time.Time) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.GeneralizedTime) {
+ return false
+ }
+ t := string(bytes)
+ res, err := time.Parse(generalizedTimeFormatStr, t)
+ if err != nil {
+ return false
+ }
+ if serialized := res.Format(generalizedTimeFormatStr); serialized != t {
+ return false
+ }
+ *out = res
+ return true
+}
+
+const defaultUTCTimeFormatStr = "060102150405Z0700"
+
+// ReadASN1UTCTime decodes an ASN.1 UTCTime into out and advances.
+// It reports whether the read was successful.
+func (s *String) ReadASN1UTCTime(out *time.Time) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.UTCTime) {
+ return false
+ }
+ t := string(bytes)
+
+ formatStr := defaultUTCTimeFormatStr
+ var err error
+ res, err := time.Parse(formatStr, t)
+ if err != nil {
+ // Fallback to minute precision if we can't parse second
+ // precision. If we are following X.509 or X.690 we shouldn't
+ // support this, but we do.
+ formatStr = "0601021504Z0700"
+ res, err = time.Parse(formatStr, t)
+ }
+ if err != nil {
+ return false
+ }
+
+ if serialized := res.Format(formatStr); serialized != t {
+ return false
+ }
+
+ if res.Year() >= 2050 {
+ // UTCTime interprets the low order digits 50-99 as 1950-99.
+ // This only applies to its use in the X.509 profile.
+ // See https://tools.ietf.org/html/rfc5280#section-4.1.2.5.1
+ res = res.AddDate(-100, 0, 0)
+ }
+ *out = res
+ return true
+}
+
+// ReadASN1BitString decodes an ASN.1 BIT STRING into out and advances.
+// It reports whether the read was successful.
+func (s *String) ReadASN1BitString(out *encoding_asn1.BitString) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.BIT_STRING) || len(bytes) == 0 ||
+ len(bytes)*8/8 != len(bytes) {
+ return false
+ }
+
+ paddingBits := uint8(bytes[0])
+ bytes = bytes[1:]
+ if paddingBits > 7 ||
+ len(bytes) == 0 && paddingBits != 0 ||
+ len(bytes) > 0 && bytes[len(bytes)-1]&(1<<paddingBits-1) != 0 {
+ return false
+ }
+
+ out.BitLength = len(bytes)*8 - int(paddingBits)
+ out.Bytes = bytes
+ return true
+}
+
+// ReadASN1BitString decodes an ASN.1 BIT STRING into out and advances. It is
+// an error if the BIT STRING is not a whole number of bytes. It reports
+// whether the read was successful.
+func (s *String) ReadASN1BitStringAsBytes(out *[]byte) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.BIT_STRING) || len(bytes) == 0 {
+ return false
+ }
+
+ paddingBits := uint8(bytes[0])
+ if paddingBits != 0 {
+ return false
+ }
+ *out = bytes[1:]
+ return true
+}
+
+// ReadASN1Bytes reads the contents of a DER-encoded ASN.1 element (not including
+// tag and length bytes) into out, and advances. The element must match the
+// given tag. It reports whether the read was successful.
+func (s *String) ReadASN1Bytes(out *[]byte, tag asn1.Tag) bool {
+ return s.ReadASN1((*String)(out), tag)
+}
+
+// ReadASN1 reads the contents of a DER-encoded ASN.1 element (not including
+// tag and length bytes) into out, and advances. The element must match the
+// given tag. It reports whether the read was successful.
+//
+// Tags greater than 30 are not supported (i.e. low-tag-number format only).
+func (s *String) ReadASN1(out *String, tag asn1.Tag) bool {
+ var t asn1.Tag
+ if !s.ReadAnyASN1(out, &t) || t != tag {
+ return false
+ }
+ return true
+}
+
+// ReadASN1Element reads the contents of a DER-encoded ASN.1 element (including
+// tag and length bytes) into out, and advances. The element must match the
+// given tag. It reports whether the read was successful.
+//
+// Tags greater than 30 are not supported (i.e. low-tag-number format only).
+func (s *String) ReadASN1Element(out *String, tag asn1.Tag) bool {
+ var t asn1.Tag
+ if !s.ReadAnyASN1Element(out, &t) || t != tag {
+ return false
+ }
+ return true
+}
+
+// ReadAnyASN1 reads the contents of a DER-encoded ASN.1 element (not including
+// tag and length bytes) into out, sets outTag to its tag, and advances.
+// It reports whether the read was successful.
+//
+// Tags greater than 30 are not supported (i.e. low-tag-number format only).
+func (s *String) ReadAnyASN1(out *String, outTag *asn1.Tag) bool {
+ return s.readASN1(out, outTag, true /* skip header */)
+}
+
+// ReadAnyASN1Element reads the contents of a DER-encoded ASN.1 element
+// (including tag and length bytes) into out, sets outTag to is tag, and
+// advances. It reports whether the read was successful.
+//
+// Tags greater than 30 are not supported (i.e. low-tag-number format only).
+func (s *String) ReadAnyASN1Element(out *String, outTag *asn1.Tag) bool {
+ return s.readASN1(out, outTag, false /* include header */)
+}
+
+// PeekASN1Tag reports whether the next ASN.1 value on the string starts with
+// the given tag.
+func (s String) PeekASN1Tag(tag asn1.Tag) bool {
+ if len(s) == 0 {
+ return false
+ }
+ return asn1.Tag(s[0]) == tag
+}
+
+// SkipASN1 reads and discards an ASN.1 element with the given tag. It
+// reports whether the operation was successful.
+func (s *String) SkipASN1(tag asn1.Tag) bool {
+ var unused String
+ return s.ReadASN1(&unused, tag)
+}
+
+// ReadOptionalASN1 attempts to read the contents of a DER-encoded ASN.1
+// element (not including tag and length bytes) tagged with the given tag into
+// out. It stores whether an element with the tag was found in outPresent,
+// unless outPresent is nil. It reports whether the read was successful.
+func (s *String) ReadOptionalASN1(out *String, outPresent *bool, tag asn1.Tag) bool {
+ present := s.PeekASN1Tag(tag)
+ if outPresent != nil {
+ *outPresent = present
+ }
+ if present && !s.ReadASN1(out, tag) {
+ return false
+ }
+ return true
+}
+
+// SkipOptionalASN1 advances s over an ASN.1 element with the given tag, or
+// else leaves s unchanged. It reports whether the operation was successful.
+func (s *String) SkipOptionalASN1(tag asn1.Tag) bool {
+ if !s.PeekASN1Tag(tag) {
+ return true
+ }
+ var unused String
+ return s.ReadASN1(&unused, tag)
+}
+
+// ReadOptionalASN1Integer attempts to read an optional ASN.1 INTEGER
+// explicitly tagged with tag into out and advances. If no element with a
+// matching tag is present, it writes defaultValue into out instead. If out
+// does not point to an integer or to a big.Int, it panics. It reports
+// whether the read was successful.
+func (s *String) ReadOptionalASN1Integer(out interface{}, tag asn1.Tag, defaultValue interface{}) bool {
+ if reflect.TypeOf(out).Kind() != reflect.Ptr {
+ panic("out is not a pointer")
+ }
+ var present bool
+ var i String
+ if !s.ReadOptionalASN1(&i, &present, tag) {
+ return false
+ }
+ if !present {
+ switch reflect.ValueOf(out).Elem().Kind() {
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
+ reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ reflect.ValueOf(out).Elem().Set(reflect.ValueOf(defaultValue))
+ case reflect.Struct:
+ if reflect.TypeOf(out).Elem() != bigIntType {
+ panic("invalid integer type")
+ }
+ if reflect.TypeOf(defaultValue).Kind() != reflect.Ptr ||
+ reflect.TypeOf(defaultValue).Elem() != bigIntType {
+ panic("out points to big.Int, but defaultValue does not")
+ }
+ out.(*big.Int).Set(defaultValue.(*big.Int))
+ default:
+ panic("invalid integer type")
+ }
+ return true
+ }
+ if !i.ReadASN1Integer(out) || !i.Empty() {
+ return false
+ }
+ return true
+}
+
+// ReadOptionalASN1OctetString attempts to read an optional ASN.1 OCTET STRING
+// explicitly tagged with tag into out and advances. If no element with a
+// matching tag is present, it sets "out" to nil instead. It reports
+// whether the read was successful.
+func (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag asn1.Tag) bool {
+ var present bool
+ var child String
+ if !s.ReadOptionalASN1(&child, &present, tag) {
+ return false
+ }
+ if outPresent != nil {
+ *outPresent = present
+ }
+ if present {
+ var oct String
+ if !child.ReadASN1(&oct, asn1.OCTET_STRING) || !child.Empty() {
+ return false
+ }
+ *out = oct
+ } else {
+ *out = nil
+ }
+ return true
+}
+
+// ReadOptionalASN1Boolean sets *out to the value of the next ASN.1 BOOLEAN or,
+// if the next bytes are not an ASN.1 BOOLEAN, to the value of defaultValue.
+// It reports whether the operation was successful.
+func (s *String) ReadOptionalASN1Boolean(out *bool, defaultValue bool) bool {
+ var present bool
+ var child String
+ if !s.ReadOptionalASN1(&child, &present, asn1.BOOLEAN) {
+ return false
+ }
+
+ if !present {
+ *out = defaultValue
+ return true
+ }
+
+ return s.ReadASN1Boolean(out)
+}
+
+func (s *String) readASN1(out *String, outTag *asn1.Tag, skipHeader bool) bool {
+ if len(*s) < 2 {
+ return false
+ }
+ tag, lenByte := (*s)[0], (*s)[1]
+
+ if tag&0x1f == 0x1f {
+ // ITU-T X.690 section 8.1.2
+ //
+ // An identifier octet with a tag part of 0x1f indicates a high-tag-number
+ // form identifier with two or more octets. We only support tags less than
+ // 31 (i.e. low-tag-number form, single octet identifier).
+ return false
+ }
+
+ if outTag != nil {
+ *outTag = asn1.Tag(tag)
+ }
+
+ // ITU-T X.690 section 8.1.3
+ //
+ // Bit 8 of the first length byte indicates whether the length is short- or
+ // long-form.
+ var length, headerLen uint32 // length includes headerLen
+ if lenByte&0x80 == 0 {
+ // Short-form length (section 8.1.3.4), encoded in bits 1-7.
+ length = uint32(lenByte) + 2
+ headerLen = 2
+ } else {
+ // Long-form length (section 8.1.3.5). Bits 1-7 encode the number of octets
+ // used to encode the length.
+ lenLen := lenByte & 0x7f
+ var len32 uint32
+
+ if lenLen == 0 || lenLen > 4 || len(*s) < int(2+lenLen) {
+ return false
+ }
+
+ lenBytes := String((*s)[2 : 2+lenLen])
+ if !lenBytes.readUnsigned(&len32, int(lenLen)) {
+ return false
+ }
+
+ // ITU-T X.690 section 10.1 (DER length forms) requires encoding the length
+ // with the minimum number of octets.
+ if len32 < 128 {
+ // Length should have used short-form encoding.
+ return false
+ }
+ if len32>>((lenLen-1)*8) == 0 {
+ // Leading octet is 0. Length should have been at least one byte shorter.
+ return false
+ }
+
+ headerLen = 2 + uint32(lenLen)
+ if headerLen+len32 < len32 {
+ // Overflow.
+ return false
+ }
+ length = headerLen + len32
+ }
+
+ if int(length) < 0 || !s.ReadBytes((*[]byte)(out), int(length)) {
+ return false
+ }
+ if skipHeader && !out.Skip(int(headerLen)) {
+ panic("cryptobyte: internal error")
+ }
+
+ return true
+}
diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go
new file mode 100644
index 0000000..cda8e3e
--- /dev/null
+++ b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go
@@ -0,0 +1,46 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package asn1 contains supporting types for parsing and building ASN.1
+// messages with the cryptobyte package.
+package asn1 // import "golang.org/x/crypto/cryptobyte/asn1"
+
+// Tag represents an ASN.1 identifier octet, consisting of a tag number
+// (indicating a type) and class (such as context-specific or constructed).
+//
+// Methods in the cryptobyte package only support the low-tag-number form, i.e.
+// a single identifier octet with bits 7-8 encoding the class and bits 1-6
+// encoding the tag number.
+type Tag uint8
+
+const (
+ classConstructed = 0x20
+ classContextSpecific = 0x80
+)
+
+// Constructed returns t with the constructed class bit set.
+func (t Tag) Constructed() Tag { return t | classConstructed }
+
+// ContextSpecific returns t with the context-specific class bit set.
+func (t Tag) ContextSpecific() Tag { return t | classContextSpecific }
+
+// The following is a list of standard tag and class combinations.
+const (
+ BOOLEAN = Tag(1)
+ INTEGER = Tag(2)
+ BIT_STRING = Tag(3)
+ OCTET_STRING = Tag(4)
+ NULL = Tag(5)
+ OBJECT_IDENTIFIER = Tag(6)
+ ENUM = Tag(10)
+ UTF8String = Tag(12)
+ SEQUENCE = Tag(16 | classConstructed)
+ SET = Tag(17 | classConstructed)
+ PrintableString = Tag(19)
+ T61String = Tag(20)
+ IA5String = Tag(22)
+ UTCTime = Tag(23)
+ GeneralizedTime = Tag(24)
+ GeneralString = Tag(27)
+)
diff --git a/vendor/golang.org/x/crypto/cryptobyte/builder.go b/vendor/golang.org/x/crypto/cryptobyte/builder.go
new file mode 100644
index 0000000..ca7b1db
--- /dev/null
+++ b/vendor/golang.org/x/crypto/cryptobyte/builder.go
@@ -0,0 +1,337 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cryptobyte
+
+import (
+ "errors"
+ "fmt"
+)
+
+// A Builder builds byte strings from fixed-length and length-prefixed values.
+// Builders either allocate space as needed, or are ‘fixed’, which means that
+// they write into a given buffer and produce an error if it's exhausted.
+//
+// The zero value is a usable Builder that allocates space as needed.
+//
+// Simple values are marshaled and appended to a Builder using methods on the
+// Builder. Length-prefixed values are marshaled by providing a
+// BuilderContinuation, which is a function that writes the inner contents of
+// the value to a given Builder. See the documentation for BuilderContinuation
+// for details.
+type Builder struct {
+ err error
+ result []byte
+ fixedSize bool
+ child *Builder
+ offset int
+ pendingLenLen int
+ pendingIsASN1 bool
+ inContinuation *bool
+}
+
+// NewBuilder creates a Builder that appends its output to the given buffer.
+// Like append(), the slice will be reallocated if its capacity is exceeded.
+// Use Bytes to get the final buffer.
+func NewBuilder(buffer []byte) *Builder {
+ return &Builder{
+ result: buffer,
+ }
+}
+
+// NewFixedBuilder creates a Builder that appends its output into the given
+// buffer. This builder does not reallocate the output buffer. Writes that
+// would exceed the buffer's capacity are treated as an error.
+func NewFixedBuilder(buffer []byte) *Builder {
+ return &Builder{
+ result: buffer,
+ fixedSize: true,
+ }
+}
+
+// SetError sets the value to be returned as the error from Bytes. Writes
+// performed after calling SetError are ignored.
+func (b *Builder) SetError(err error) {
+ b.err = err
+}
+
+// Bytes returns the bytes written by the builder or an error if one has
+// occurred during building.
+func (b *Builder) Bytes() ([]byte, error) {
+ if b.err != nil {
+ return nil, b.err
+ }
+ return b.result[b.offset:], nil
+}
+
+// BytesOrPanic returns the bytes written by the builder or panics if an error
+// has occurred during building.
+func (b *Builder) BytesOrPanic() []byte {
+ if b.err != nil {
+ panic(b.err)
+ }
+ return b.result[b.offset:]
+}
+
+// AddUint8 appends an 8-bit value to the byte string.
+func (b *Builder) AddUint8(v uint8) {
+ b.add(byte(v))
+}
+
+// AddUint16 appends a big-endian, 16-bit value to the byte string.
+func (b *Builder) AddUint16(v uint16) {
+ b.add(byte(v>>8), byte(v))
+}
+
+// AddUint24 appends a big-endian, 24-bit value to the byte string. The highest
+// byte of the 32-bit input value is silently truncated.
+func (b *Builder) AddUint24(v uint32) {
+ b.add(byte(v>>16), byte(v>>8), byte(v))
+}
+
+// AddUint32 appends a big-endian, 32-bit value to the byte string.
+func (b *Builder) AddUint32(v uint32) {
+ b.add(byte(v>>24), byte(v>>16), byte(v>>8), byte(v))
+}
+
+// AddBytes appends a sequence of bytes to the byte string.
+func (b *Builder) AddBytes(v []byte) {
+ b.add(v...)
+}
+
+// BuilderContinuation is a continuation-passing interface for building
+// length-prefixed byte sequences. Builder methods for length-prefixed
+// sequences (AddUint8LengthPrefixed etc) will invoke the BuilderContinuation
+// supplied to them. The child builder passed to the continuation can be used
+// to build the content of the length-prefixed sequence. For example:
+//
+// parent := cryptobyte.NewBuilder()
+// parent.AddUint8LengthPrefixed(func (child *Builder) {
+// child.AddUint8(42)
+// child.AddUint8LengthPrefixed(func (grandchild *Builder) {
+// grandchild.AddUint8(5)
+// })
+// })
+//
+// It is an error to write more bytes to the child than allowed by the reserved
+// length prefix. After the continuation returns, the child must be considered
+// invalid, i.e. users must not store any copies or references of the child
+// that outlive the continuation.
+//
+// If the continuation panics with a value of type BuildError then the inner
+// error will be returned as the error from Bytes. If the child panics
+// otherwise then Bytes will repanic with the same value.
+type BuilderContinuation func(child *Builder)
+
+// BuildError wraps an error. If a BuilderContinuation panics with this value,
+// the panic will be recovered and the inner error will be returned from
+// Builder.Bytes.
+type BuildError struct {
+ Err error
+}
+
+// AddUint8LengthPrefixed adds a 8-bit length-prefixed byte sequence.
+func (b *Builder) AddUint8LengthPrefixed(f BuilderContinuation) {
+ b.addLengthPrefixed(1, false, f)
+}
+
+// AddUint16LengthPrefixed adds a big-endian, 16-bit length-prefixed byte sequence.
+func (b *Builder) AddUint16LengthPrefixed(f BuilderContinuation) {
+ b.addLengthPrefixed(2, false, f)
+}
+
+// AddUint24LengthPrefixed adds a big-endian, 24-bit length-prefixed byte sequence.
+func (b *Builder) AddUint24LengthPrefixed(f BuilderContinuation) {
+ b.addLengthPrefixed(3, false, f)
+}
+
+// AddUint32LengthPrefixed adds a big-endian, 32-bit length-prefixed byte sequence.
+func (b *Builder) AddUint32LengthPrefixed(f BuilderContinuation) {
+ b.addLengthPrefixed(4, false, f)
+}
+
+func (b *Builder) callContinuation(f BuilderContinuation, arg *Builder) {
+ if !*b.inContinuation {
+ *b.inContinuation = true
+
+ defer func() {
+ *b.inContinuation = false
+
+ r := recover()
+ if r == nil {
+ return
+ }
+
+ if buildError, ok := r.(BuildError); ok {
+ b.err = buildError.Err
+ } else {
+ panic(r)
+ }
+ }()
+ }
+
+ f(arg)
+}
+
+func (b *Builder) addLengthPrefixed(lenLen int, isASN1 bool, f BuilderContinuation) {
+ // Subsequent writes can be ignored if the builder has encountered an error.
+ if b.err != nil {
+ return
+ }
+
+ offset := len(b.result)
+ b.add(make([]byte, lenLen)...)
+
+ if b.inContinuation == nil {
+ b.inContinuation = new(bool)
+ }
+
+ b.child = &Builder{
+ result: b.result,
+ fixedSize: b.fixedSize,
+ offset: offset,
+ pendingLenLen: lenLen,
+ pendingIsASN1: isASN1,
+ inContinuation: b.inContinuation,
+ }
+
+ b.callContinuation(f, b.child)
+ b.flushChild()
+ if b.child != nil {
+ panic("cryptobyte: internal error")
+ }
+}
+
+func (b *Builder) flushChild() {
+ if b.child == nil {
+ return
+ }
+ b.child.flushChild()
+ child := b.child
+ b.child = nil
+
+ if child.err != nil {
+ b.err = child.err
+ return
+ }
+
+ length := len(child.result) - child.pendingLenLen - child.offset
+
+ if length < 0 {
+ panic("cryptobyte: internal error") // result unexpectedly shrunk
+ }
+
+ if child.pendingIsASN1 {
+ // For ASN.1, we reserved a single byte for the length. If that turned out
+ // to be incorrect, we have to move the contents along in order to make
+ // space.
+ if child.pendingLenLen != 1 {
+ panic("cryptobyte: internal error")
+ }
+ var lenLen, lenByte uint8
+ if int64(length) > 0xfffffffe {
+ b.err = errors.New("pending ASN.1 child too long")
+ return
+ } else if length > 0xffffff {
+ lenLen = 5
+ lenByte = 0x80 | 4
+ } else if length > 0xffff {
+ lenLen = 4
+ lenByte = 0x80 | 3
+ } else if length > 0xff {
+ lenLen = 3
+ lenByte = 0x80 | 2
+ } else if length > 0x7f {
+ lenLen = 2
+ lenByte = 0x80 | 1
+ } else {
+ lenLen = 1
+ lenByte = uint8(length)
+ length = 0
+ }
+
+ // Insert the initial length byte, make space for successive length bytes,
+ // and adjust the offset.
+ child.result[child.offset] = lenByte
+ extraBytes := int(lenLen - 1)
+ if extraBytes != 0 {
+ child.add(make([]byte, extraBytes)...)
+ childStart := child.offset + child.pendingLenLen
+ copy(child.result[childStart+extraBytes:], child.result[childStart:])
+ }
+ child.offset++
+ child.pendingLenLen = extraBytes
+ }
+
+ l := length
+ for i := child.pendingLenLen - 1; i >= 0; i-- {
+ child.result[child.offset+i] = uint8(l)
+ l >>= 8
+ }
+ if l != 0 {
+ b.err = fmt.Errorf("cryptobyte: pending child length %d exceeds %d-byte length prefix", length, child.pendingLenLen)
+ return
+ }
+
+ if b.fixedSize && &b.result[0] != &child.result[0] {
+ panic("cryptobyte: BuilderContinuation reallocated a fixed-size buffer")
+ }
+
+ b.result = child.result
+}
+
+func (b *Builder) add(bytes ...byte) {
+ if b.err != nil {
+ return
+ }
+ if b.child != nil {
+ panic("cryptobyte: attempted write while child is pending")
+ }
+ if len(b.result)+len(bytes) < len(bytes) {
+ b.err = errors.New("cryptobyte: length overflow")
+ }
+ if b.fixedSize && len(b.result)+len(bytes) > cap(b.result) {
+ b.err = errors.New("cryptobyte: Builder is exceeding its fixed-size buffer")
+ return
+ }
+ b.result = append(b.result, bytes...)
+}
+
+// Unwrite rolls back n bytes written directly to the Builder. An attempt by a
+// child builder passed to a continuation to unwrite bytes from its parent will
+// panic.
+func (b *Builder) Unwrite(n int) {
+ if b.err != nil {
+ return
+ }
+ if b.child != nil {
+ panic("cryptobyte: attempted unwrite while child is pending")
+ }
+ length := len(b.result) - b.pendingLenLen - b.offset
+ if length < 0 {
+ panic("cryptobyte: internal error")
+ }
+ if n > length {
+ panic("cryptobyte: attempted to unwrite more than was written")
+ }
+ b.result = b.result[:len(b.result)-n]
+}
+
+// A MarshalingValue marshals itself into a Builder.
+type MarshalingValue interface {
+ // Marshal is called by Builder.AddValue. It receives a pointer to a builder
+ // to marshal itself into. It may return an error that occurred during
+ // marshaling, such as unset or invalid values.
+ Marshal(b *Builder) error
+}
+
+// AddValue calls Marshal on v, passing a pointer to the builder to append to.
+// If Marshal returns an error, it is set on the Builder so that subsequent
+// appends don't have an effect.
+func (b *Builder) AddValue(v MarshalingValue) {
+ err := v.Marshal(b)
+ if err != nil {
+ b.err = err
+ }
+}
diff --git a/vendor/golang.org/x/crypto/cryptobyte/string.go b/vendor/golang.org/x/crypto/cryptobyte/string.go
new file mode 100644
index 0000000..589d297
--- /dev/null
+++ b/vendor/golang.org/x/crypto/cryptobyte/string.go
@@ -0,0 +1,161 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package cryptobyte contains types that help with parsing and constructing
+// length-prefixed, binary messages, including ASN.1 DER. (The asn1 subpackage
+// contains useful ASN.1 constants.)
+//
+// The String type is for parsing. It wraps a []byte slice and provides helper
+// functions for consuming structures, value by value.
+//
+// The Builder type is for constructing messages. It providers helper functions
+// for appending values and also for appending length-prefixed submessages –
+// without having to worry about calculating the length prefix ahead of time.
+//
+// See the documentation and examples for the Builder and String types to get
+// started.
+package cryptobyte // import "golang.org/x/crypto/cryptobyte"
+
+// String represents a string of bytes. It provides methods for parsing
+// fixed-length and length-prefixed values from it.
+type String []byte
+
+// read advances a String by n bytes and returns them. If less than n bytes
+// remain, it returns nil.
+func (s *String) read(n int) []byte {
+ if len(*s) < n || n < 0 {
+ return nil
+ }
+ v := (*s)[:n]
+ *s = (*s)[n:]
+ return v
+}
+
+// Skip advances the String by n byte and reports whether it was successful.
+func (s *String) Skip(n int) bool {
+ return s.read(n) != nil
+}
+
+// ReadUint8 decodes an 8-bit value into out and advances over it.
+// It reports whether the read was successful.
+func (s *String) ReadUint8(out *uint8) bool {
+ v := s.read(1)
+ if v == nil {
+ return false
+ }
+ *out = uint8(v[0])
+ return true
+}
+
+// ReadUint16 decodes a big-endian, 16-bit value into out and advances over it.
+// It reports whether the read was successful.
+func (s *String) ReadUint16(out *uint16) bool {
+ v := s.read(2)
+ if v == nil {
+ return false
+ }
+ *out = uint16(v[0])<<8 | uint16(v[1])
+ return true
+}
+
+// ReadUint24 decodes a big-endian, 24-bit value into out and advances over it.
+// It reports whether the read was successful.
+func (s *String) ReadUint24(out *uint32) bool {
+ v := s.read(3)
+ if v == nil {
+ return false
+ }
+ *out = uint32(v[0])<<16 | uint32(v[1])<<8 | uint32(v[2])
+ return true
+}
+
+// ReadUint32 decodes a big-endian, 32-bit value into out and advances over it.
+// It reports whether the read was successful.
+func (s *String) ReadUint32(out *uint32) bool {
+ v := s.read(4)
+ if v == nil {
+ return false
+ }
+ *out = uint32(v[0])<<24 | uint32(v[1])<<16 | uint32(v[2])<<8 | uint32(v[3])
+ return true
+}
+
+func (s *String) readUnsigned(out *uint32, length int) bool {
+ v := s.read(length)
+ if v == nil {
+ return false
+ }
+ var result uint32
+ for i := 0; i < length; i++ {
+ result <<= 8
+ result |= uint32(v[i])
+ }
+ *out = result
+ return true
+}
+
+func (s *String) readLengthPrefixed(lenLen int, outChild *String) bool {
+ lenBytes := s.read(lenLen)
+ if lenBytes == nil {
+ return false
+ }
+ var length uint32
+ for _, b := range lenBytes {
+ length = length << 8
+ length = length | uint32(b)
+ }
+ v := s.read(int(length))
+ if v == nil {
+ return false
+ }
+ *outChild = v
+ return true
+}
+
+// ReadUint8LengthPrefixed reads the content of an 8-bit length-prefixed value
+// into out and advances over it. It reports whether the read was successful.
+func (s *String) ReadUint8LengthPrefixed(out *String) bool {
+ return s.readLengthPrefixed(1, out)
+}
+
+// ReadUint16LengthPrefixed reads the content of a big-endian, 16-bit
+// length-prefixed value into out and advances over it. It reports whether the
+// read was successful.
+func (s *String) ReadUint16LengthPrefixed(out *String) bool {
+ return s.readLengthPrefixed(2, out)
+}
+
+// ReadUint24LengthPrefixed reads the content of a big-endian, 24-bit
+// length-prefixed value into out and advances over it. It reports whether
+// the read was successful.
+func (s *String) ReadUint24LengthPrefixed(out *String) bool {
+ return s.readLengthPrefixed(3, out)
+}
+
+// ReadBytes reads n bytes into out and advances over them. It reports
+// whether the read was successful.
+func (s *String) ReadBytes(out *[]byte, n int) bool {
+ v := s.read(n)
+ if v == nil {
+ return false
+ }
+ *out = v
+ return true
+}
+
+// CopyBytes copies len(out) bytes into out and advances over them. It reports
+// whether the copy operation was successful
+func (s *String) CopyBytes(out []byte) bool {
+ n := len(out)
+ v := s.read(n)
+ if v == nil {
+ return false
+ }
+ return copy(out, v) == n
+}
+
+// Empty reports whether the string does not contain any bytes.
+func (s String) Empty() bool {
+ return len(s) == 0
+}
diff --git a/vendor/golang.org/x/crypto/curve25519/const_amd64.h b/vendor/golang.org/x/crypto/curve25519/const_amd64.h
deleted file mode 100644
index b3f7416..0000000
--- a/vendor/golang.org/x/crypto/curve25519/const_amd64.h
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
-
-#define REDMASK51 0x0007FFFFFFFFFFFF
diff --git a/vendor/golang.org/x/crypto/curve25519/const_amd64.s b/vendor/golang.org/x/crypto/curve25519/const_amd64.s
deleted file mode 100644
index ee7b4bd..0000000
--- a/vendor/golang.org/x/crypto/curve25519/const_amd64.s
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
-
-// +build amd64,!gccgo,!appengine
-
-// These constants cannot be encoded in non-MOVQ immediates.
-// We access them directly from memory instead.
-
-DATA ·_121666_213(SB)/8, $996687872
-GLOBL ·_121666_213(SB), 8, $8
-
-DATA ·_2P0(SB)/8, $0xFFFFFFFFFFFDA
-GLOBL ·_2P0(SB), 8, $8
-
-DATA ·_2P1234(SB)/8, $0xFFFFFFFFFFFFE
-GLOBL ·_2P1234(SB), 8, $8
diff --git a/vendor/golang.org/x/crypto/curve25519/cswap_amd64.s b/vendor/golang.org/x/crypto/curve25519/cswap_amd64.s
deleted file mode 100644
index cd793a5..0000000
--- a/vendor/golang.org/x/crypto/curve25519/cswap_amd64.s
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,!gccgo,!appengine
-
-// func cswap(inout *[4][5]uint64, v uint64)
-TEXT ·cswap(SB),7,$0
- MOVQ inout+0(FP),DI
- MOVQ v+8(FP),SI
-
- SUBQ $1, SI
- NOTQ SI
- MOVQ SI, X15
- PSHUFD $0x44, X15, X15
-
- MOVOU 0(DI), X0
- MOVOU 16(DI), X2
- MOVOU 32(DI), X4
- MOVOU 48(DI), X6
- MOVOU 64(DI), X8
- MOVOU 80(DI), X1
- MOVOU 96(DI), X3
- MOVOU 112(DI), X5
- MOVOU 128(DI), X7
- MOVOU 144(DI), X9
-
- MOVO X1, X10
- MOVO X3, X11
- MOVO X5, X12
- MOVO X7, X13
- MOVO X9, X14
-
- PXOR X0, X10
- PXOR X2, X11
- PXOR X4, X12
- PXOR X6, X13
- PXOR X8, X14
- PAND X15, X10
- PAND X15, X11
- PAND X15, X12
- PAND X15, X13
- PAND X15, X14
- PXOR X10, X0
- PXOR X10, X1
- PXOR X11, X2
- PXOR X11, X3
- PXOR X12, X4
- PXOR X12, X5
- PXOR X13, X6
- PXOR X13, X7
- PXOR X14, X8
- PXOR X14, X9
-
- MOVOU X0, 0(DI)
- MOVOU X2, 16(DI)
- MOVOU X4, 32(DI)
- MOVOU X6, 48(DI)
- MOVOU X8, 64(DI)
- MOVOU X1, 80(DI)
- MOVOU X3, 96(DI)
- MOVOU X5, 112(DI)
- MOVOU X7, 128(DI)
- MOVOU X9, 144(DI)
- RET
diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519.go b/vendor/golang.org/x/crypto/curve25519/curve25519.go
index 75f24ba..cda3fdd 100644
--- a/vendor/golang.org/x/crypto/curve25519/curve25519.go
+++ b/vendor/golang.org/x/crypto/curve25519/curve25519.go
@@ -1,834 +1,145 @@
-// Copyright 2013 The Go Authors. All rights reserved.
+// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// We have an implementation in amd64 assembly so this code is only run on
-// non-amd64 platforms. The amd64 assembly does not support gccgo.
-// +build !amd64 gccgo appengine
-
-package curve25519
+// Package curve25519 provides an implementation of the X25519 function, which
+// performs scalar multiplication on the elliptic curve known as Curve25519.
+// See RFC 7748.
+package curve25519 // import "golang.org/x/crypto/curve25519"
import (
- "encoding/binary"
-)
-
-// This code is a port of the public domain, "ref10" implementation of
-// curve25519 from SUPERCOP 20130419 by D. J. Bernstein.
-
-// fieldElement represents an element of the field GF(2^255 - 19). An element
-// t, entries t[0]...t[9], represents the integer t[0]+2^26 t[1]+2^51 t[2]+2^77
-// t[3]+2^102 t[4]+...+2^230 t[9]. Bounds on each t[i] vary depending on
-// context.
-type fieldElement [10]int32
-
-func feZero(fe *fieldElement) {
- for i := range fe {
- fe[i] = 0
- }
-}
-
-func feOne(fe *fieldElement) {
- feZero(fe)
- fe[0] = 1
-}
-
-func feAdd(dst, a, b *fieldElement) {
- for i := range dst {
- dst[i] = a[i] + b[i]
- }
-}
-
-func feSub(dst, a, b *fieldElement) {
- for i := range dst {
- dst[i] = a[i] - b[i]
- }
-}
-
-func feCopy(dst, src *fieldElement) {
- for i := range dst {
- dst[i] = src[i]
- }
-}
-
-// feCSwap replaces (f,g) with (g,f) if b == 1; replaces (f,g) with (f,g) if b == 0.
-//
-// Preconditions: b in {0,1}.
-func feCSwap(f, g *fieldElement, b int32) {
- b = -b
- for i := range f {
- t := b & (f[i] ^ g[i])
- f[i] ^= t
- g[i] ^= t
- }
-}
-
-// load3 reads a 24-bit, little-endian value from in.
-func load3(in []byte) int64 {
- var r int64
- r = int64(in[0])
- r |= int64(in[1]) << 8
- r |= int64(in[2]) << 16
- return r
-}
-
-// load4 reads a 32-bit, little-endian value from in.
-func load4(in []byte) int64 {
- return int64(binary.LittleEndian.Uint32(in))
-}
-
-func feFromBytes(dst *fieldElement, src *[32]byte) {
- h0 := load4(src[:])
- h1 := load3(src[4:]) << 6
- h2 := load3(src[7:]) << 5
- h3 := load3(src[10:]) << 3
- h4 := load3(src[13:]) << 2
- h5 := load4(src[16:])
- h6 := load3(src[20:]) << 7
- h7 := load3(src[23:]) << 5
- h8 := load3(src[26:]) << 4
- h9 := (load3(src[29:]) & 0x7fffff) << 2
-
- var carry [10]int64
- carry[9] = (h9 + 1<<24) >> 25
- h0 += carry[9] * 19
- h9 -= carry[9] << 25
- carry[1] = (h1 + 1<<24) >> 25
- h2 += carry[1]
- h1 -= carry[1] << 25
- carry[3] = (h3 + 1<<24) >> 25
- h4 += carry[3]
- h3 -= carry[3] << 25
- carry[5] = (h5 + 1<<24) >> 25
- h6 += carry[5]
- h5 -= carry[5] << 25
- carry[7] = (h7 + 1<<24) >> 25
- h8 += carry[7]
- h7 -= carry[7] << 25
-
- carry[0] = (h0 + 1<<25) >> 26
- h1 += carry[0]
- h0 -= carry[0] << 26
- carry[2] = (h2 + 1<<25) >> 26
- h3 += carry[2]
- h2 -= carry[2] << 26
- carry[4] = (h4 + 1<<25) >> 26
- h5 += carry[4]
- h4 -= carry[4] << 26
- carry[6] = (h6 + 1<<25) >> 26
- h7 += carry[6]
- h6 -= carry[6] << 26
- carry[8] = (h8 + 1<<25) >> 26
- h9 += carry[8]
- h8 -= carry[8] << 26
+ "crypto/subtle"
+ "fmt"
- dst[0] = int32(h0)
- dst[1] = int32(h1)
- dst[2] = int32(h2)
- dst[3] = int32(h3)
- dst[4] = int32(h4)
- dst[5] = int32(h5)
- dst[6] = int32(h6)
- dst[7] = int32(h7)
- dst[8] = int32(h8)
- dst[9] = int32(h9)
-}
+ "golang.org/x/crypto/curve25519/internal/field"
+)
-// feToBytes marshals h to s.
-// Preconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-//
-// Write p=2^255-19; q=floor(h/p).
-// Basic claim: q = floor(2^(-255)(h + 19 2^(-25)h9 + 2^(-1))).
+// ScalarMult sets dst to the product scalar * point.
//
-// Proof:
-// Have |h|<=p so |q|<=1 so |19^2 2^(-255) q|<1/4.
-// Also have |h-2^230 h9|<2^230 so |19 2^(-255)(h-2^230 h9)|<1/4.
-//
-// Write y=2^(-1)-19^2 2^(-255)q-19 2^(-255)(h-2^230 h9).
-// Then 0<y<1.
-//
-// Write r=h-pq.
-// Have 0<=r<=p-1=2^255-20.
-// Thus 0<=r+19(2^-255)r<r+19(2^-255)2^255<=2^255-1.
-//
-// Write x=r+19(2^-255)r+y.
-// Then 0<x<2^255 so floor(2^(-255)x) = 0 so floor(q+2^(-255)x) = q.
-//
-// Have q+2^(-255)x = 2^(-255)(h + 19 2^(-25) h9 + 2^(-1))
-// so floor(2^(-255)(h + 19 2^(-25) h9 + 2^(-1))) = q.
-func feToBytes(s *[32]byte, h *fieldElement) {
- var carry [10]int32
-
- q := (19*h[9] + (1 << 24)) >> 25
- q = (h[0] + q) >> 26
- q = (h[1] + q) >> 25
- q = (h[2] + q) >> 26
- q = (h[3] + q) >> 25
- q = (h[4] + q) >> 26
- q = (h[5] + q) >> 25
- q = (h[6] + q) >> 26
- q = (h[7] + q) >> 25
- q = (h[8] + q) >> 26
- q = (h[9] + q) >> 25
-
- // Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20.
- h[0] += 19 * q
- // Goal: Output h-2^255 q, which is between 0 and 2^255-20.
+// Deprecated: when provided a low-order point, ScalarMult will set dst to all
+// zeroes, irrespective of the scalar. Instead, use the X25519 function, which
+// will return an error.
+func ScalarMult(dst, scalar, point *[32]byte) {
+ var e [32]byte
- carry[0] = h[0] >> 26
- h[1] += carry[0]
- h[0] -= carry[0] << 26
- carry[1] = h[1] >> 25
- h[2] += carry[1]
- h[1] -= carry[1] << 25
- carry[2] = h[2] >> 26
- h[3] += carry[2]
- h[2] -= carry[2] << 26
- carry[3] = h[3] >> 25
- h[4] += carry[3]
- h[3] -= carry[3] << 25
- carry[4] = h[4] >> 26
- h[5] += carry[4]
- h[4] -= carry[4] << 26
- carry[5] = h[5] >> 25
- h[6] += carry[5]
- h[5] -= carry[5] << 25
- carry[6] = h[6] >> 26
- h[7] += carry[6]
- h[6] -= carry[6] << 26
- carry[7] = h[7] >> 25
- h[8] += carry[7]
- h[7] -= carry[7] << 25
- carry[8] = h[8] >> 26
- h[9] += carry[8]
- h[8] -= carry[8] << 26
- carry[9] = h[9] >> 25
- h[9] -= carry[9] << 25
- // h10 = carry9
+ copy(e[:], scalar[:])
+ e[0] &= 248
+ e[31] &= 127
+ e[31] |= 64
- // Goal: Output h[0]+...+2^255 h10-2^255 q, which is between 0 and 2^255-20.
- // Have h[0]+...+2^230 h[9] between 0 and 2^255-1;
- // evidently 2^255 h10-2^255 q = 0.
- // Goal: Output h[0]+...+2^230 h[9].
+ var x1, x2, z2, x3, z3, tmp0, tmp1 field.Element
+ x1.SetBytes(point[:])
+ x2.One()
+ x3.Set(&x1)
+ z3.One()
- s[0] = byte(h[0] >> 0)
- s[1] = byte(h[0] >> 8)
- s[2] = byte(h[0] >> 16)
- s[3] = byte((h[0] >> 24) | (h[1] << 2))
- s[4] = byte(h[1] >> 6)
- s[5] = byte(h[1] >> 14)
- s[6] = byte((h[1] >> 22) | (h[2] << 3))
- s[7] = byte(h[2] >> 5)
- s[8] = byte(h[2] >> 13)
- s[9] = byte((h[2] >> 21) | (h[3] << 5))
- s[10] = byte(h[3] >> 3)
- s[11] = byte(h[3] >> 11)
- s[12] = byte((h[3] >> 19) | (h[4] << 6))
- s[13] = byte(h[4] >> 2)
- s[14] = byte(h[4] >> 10)
- s[15] = byte(h[4] >> 18)
- s[16] = byte(h[5] >> 0)
- s[17] = byte(h[5] >> 8)
- s[18] = byte(h[5] >> 16)
- s[19] = byte((h[5] >> 24) | (h[6] << 1))
- s[20] = byte(h[6] >> 7)
- s[21] = byte(h[6] >> 15)
- s[22] = byte((h[6] >> 23) | (h[7] << 3))
- s[23] = byte(h[7] >> 5)
- s[24] = byte(h[7] >> 13)
- s[25] = byte((h[7] >> 21) | (h[8] << 4))
- s[26] = byte(h[8] >> 4)
- s[27] = byte(h[8] >> 12)
- s[28] = byte((h[8] >> 20) | (h[9] << 6))
- s[29] = byte(h[9] >> 2)
- s[30] = byte(h[9] >> 10)
- s[31] = byte(h[9] >> 18)
+ swap := 0
+ for pos := 254; pos >= 0; pos-- {
+ b := e[pos/8] >> uint(pos&7)
+ b &= 1
+ swap ^= int(b)
+ x2.Swap(&x3, swap)
+ z2.Swap(&z3, swap)
+ swap = int(b)
+
+ tmp0.Subtract(&x3, &z3)
+ tmp1.Subtract(&x2, &z2)
+ x2.Add(&x2, &z2)
+ z2.Add(&x3, &z3)
+ z3.Multiply(&tmp0, &x2)
+ z2.Multiply(&z2, &tmp1)
+ tmp0.Square(&tmp1)
+ tmp1.Square(&x2)
+ x3.Add(&z3, &z2)
+ z2.Subtract(&z3, &z2)
+ x2.Multiply(&tmp1, &tmp0)
+ tmp1.Subtract(&tmp1, &tmp0)
+ z2.Square(&z2)
+
+ z3.Mult32(&tmp1, 121666)
+ x3.Square(&x3)
+ tmp0.Add(&tmp0, &z3)
+ z3.Multiply(&x1, &z2)
+ z2.Multiply(&tmp1, &tmp0)
+ }
+
+ x2.Swap(&x3, swap)
+ z2.Swap(&z3, swap)
+
+ z2.Invert(&z2)
+ x2.Multiply(&x2, &z2)
+ copy(dst[:], x2.Bytes())
}
-// feMul calculates h = f * g
-// Can overlap h with f or g.
-//
-// Preconditions:
-// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
-// |g| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
-//
-// Postconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-//
-// Notes on implementation strategy:
-//
-// Using schoolbook multiplication.
-// Karatsuba would save a little in some cost models.
-//
-// Most multiplications by 2 and 19 are 32-bit precomputations;
-// cheaper than 64-bit postcomputations.
+// ScalarBaseMult sets dst to the product scalar * base where base is the
+// standard generator.
//
-// There is one remaining multiplication by 19 in the carry chain;
-// one *19 precomputation can be merged into this,
-// but the resulting data flow is considerably less clean.
-//
-// There are 12 carries below.
-// 10 of them are 2-way parallelizable and vectorizable.
-// Can get away with 11 carries, but then data flow is much deeper.
-//
-// With tighter constraints on inputs can squeeze carries into int32.
-func feMul(h, f, g *fieldElement) {
- f0 := f[0]
- f1 := f[1]
- f2 := f[2]
- f3 := f[3]
- f4 := f[4]
- f5 := f[5]
- f6 := f[6]
- f7 := f[7]
- f8 := f[8]
- f9 := f[9]
- g0 := g[0]
- g1 := g[1]
- g2 := g[2]
- g3 := g[3]
- g4 := g[4]
- g5 := g[5]
- g6 := g[6]
- g7 := g[7]
- g8 := g[8]
- g9 := g[9]
- g1_19 := 19 * g1 // 1.4*2^29
- g2_19 := 19 * g2 // 1.4*2^30; still ok
- g3_19 := 19 * g3
- g4_19 := 19 * g4
- g5_19 := 19 * g5
- g6_19 := 19 * g6
- g7_19 := 19 * g7
- g8_19 := 19 * g8
- g9_19 := 19 * g9
- f1_2 := 2 * f1
- f3_2 := 2 * f3
- f5_2 := 2 * f5
- f7_2 := 2 * f7
- f9_2 := 2 * f9
- f0g0 := int64(f0) * int64(g0)
- f0g1 := int64(f0) * int64(g1)
- f0g2 := int64(f0) * int64(g2)
- f0g3 := int64(f0) * int64(g3)
- f0g4 := int64(f0) * int64(g4)
- f0g5 := int64(f0) * int64(g5)
- f0g6 := int64(f0) * int64(g6)
- f0g7 := int64(f0) * int64(g7)
- f0g8 := int64(f0) * int64(g8)
- f0g9 := int64(f0) * int64(g9)
- f1g0 := int64(f1) * int64(g0)
- f1g1_2 := int64(f1_2) * int64(g1)
- f1g2 := int64(f1) * int64(g2)
- f1g3_2 := int64(f1_2) * int64(g3)
- f1g4 := int64(f1) * int64(g4)
- f1g5_2 := int64(f1_2) * int64(g5)
- f1g6 := int64(f1) * int64(g6)
- f1g7_2 := int64(f1_2) * int64(g7)
- f1g8 := int64(f1) * int64(g8)
- f1g9_38 := int64(f1_2) * int64(g9_19)
- f2g0 := int64(f2) * int64(g0)
- f2g1 := int64(f2) * int64(g1)
- f2g2 := int64(f2) * int64(g2)
- f2g3 := int64(f2) * int64(g3)
- f2g4 := int64(f2) * int64(g4)
- f2g5 := int64(f2) * int64(g5)
- f2g6 := int64(f2) * int64(g6)
- f2g7 := int64(f2) * int64(g7)
- f2g8_19 := int64(f2) * int64(g8_19)
- f2g9_19 := int64(f2) * int64(g9_19)
- f3g0 := int64(f3) * int64(g0)
- f3g1_2 := int64(f3_2) * int64(g1)
- f3g2 := int64(f3) * int64(g2)
- f3g3_2 := int64(f3_2) * int64(g3)
- f3g4 := int64(f3) * int64(g4)
- f3g5_2 := int64(f3_2) * int64(g5)
- f3g6 := int64(f3) * int64(g6)
- f3g7_38 := int64(f3_2) * int64(g7_19)
- f3g8_19 := int64(f3) * int64(g8_19)
- f3g9_38 := int64(f3_2) * int64(g9_19)
- f4g0 := int64(f4) * int64(g0)
- f4g1 := int64(f4) * int64(g1)
- f4g2 := int64(f4) * int64(g2)
- f4g3 := int64(f4) * int64(g3)
- f4g4 := int64(f4) * int64(g4)
- f4g5 := int64(f4) * int64(g5)
- f4g6_19 := int64(f4) * int64(g6_19)
- f4g7_19 := int64(f4) * int64(g7_19)
- f4g8_19 := int64(f4) * int64(g8_19)
- f4g9_19 := int64(f4) * int64(g9_19)
- f5g0 := int64(f5) * int64(g0)
- f5g1_2 := int64(f5_2) * int64(g1)
- f5g2 := int64(f5) * int64(g2)
- f5g3_2 := int64(f5_2) * int64(g3)
- f5g4 := int64(f5) * int64(g4)
- f5g5_38 := int64(f5_2) * int64(g5_19)
- f5g6_19 := int64(f5) * int64(g6_19)
- f5g7_38 := int64(f5_2) * int64(g7_19)
- f5g8_19 := int64(f5) * int64(g8_19)
- f5g9_38 := int64(f5_2) * int64(g9_19)
- f6g0 := int64(f6) * int64(g0)
- f6g1 := int64(f6) * int64(g1)
- f6g2 := int64(f6) * int64(g2)
- f6g3 := int64(f6) * int64(g3)
- f6g4_19 := int64(f6) * int64(g4_19)
- f6g5_19 := int64(f6) * int64(g5_19)
- f6g6_19 := int64(f6) * int64(g6_19)
- f6g7_19 := int64(f6) * int64(g7_19)
- f6g8_19 := int64(f6) * int64(g8_19)
- f6g9_19 := int64(f6) * int64(g9_19)
- f7g0 := int64(f7) * int64(g0)
- f7g1_2 := int64(f7_2) * int64(g1)
- f7g2 := int64(f7) * int64(g2)
- f7g3_38 := int64(f7_2) * int64(g3_19)
- f7g4_19 := int64(f7) * int64(g4_19)
- f7g5_38 := int64(f7_2) * int64(g5_19)
- f7g6_19 := int64(f7) * int64(g6_19)
- f7g7_38 := int64(f7_2) * int64(g7_19)
- f7g8_19 := int64(f7) * int64(g8_19)
- f7g9_38 := int64(f7_2) * int64(g9_19)
- f8g0 := int64(f8) * int64(g0)
- f8g1 := int64(f8) * int64(g1)
- f8g2_19 := int64(f8) * int64(g2_19)
- f8g3_19 := int64(f8) * int64(g3_19)
- f8g4_19 := int64(f8) * int64(g4_19)
- f8g5_19 := int64(f8) * int64(g5_19)
- f8g6_19 := int64(f8) * int64(g6_19)
- f8g7_19 := int64(f8) * int64(g7_19)
- f8g8_19 := int64(f8) * int64(g8_19)
- f8g9_19 := int64(f8) * int64(g9_19)
- f9g0 := int64(f9) * int64(g0)
- f9g1_38 := int64(f9_2) * int64(g1_19)
- f9g2_19 := int64(f9) * int64(g2_19)
- f9g3_38 := int64(f9_2) * int64(g3_19)
- f9g4_19 := int64(f9) * int64(g4_19)
- f9g5_38 := int64(f9_2) * int64(g5_19)
- f9g6_19 := int64(f9) * int64(g6_19)
- f9g7_38 := int64(f9_2) * int64(g7_19)
- f9g8_19 := int64(f9) * int64(g8_19)
- f9g9_38 := int64(f9_2) * int64(g9_19)
- h0 := f0g0 + f1g9_38 + f2g8_19 + f3g7_38 + f4g6_19 + f5g5_38 + f6g4_19 + f7g3_38 + f8g2_19 + f9g1_38
- h1 := f0g1 + f1g0 + f2g9_19 + f3g8_19 + f4g7_19 + f5g6_19 + f6g5_19 + f7g4_19 + f8g3_19 + f9g2_19
- h2 := f0g2 + f1g1_2 + f2g0 + f3g9_38 + f4g8_19 + f5g7_38 + f6g6_19 + f7g5_38 + f8g4_19 + f9g3_38
- h3 := f0g3 + f1g2 + f2g1 + f3g0 + f4g9_19 + f5g8_19 + f6g7_19 + f7g6_19 + f8g5_19 + f9g4_19
- h4 := f0g4 + f1g3_2 + f2g2 + f3g1_2 + f4g0 + f5g9_38 + f6g8_19 + f7g7_38 + f8g6_19 + f9g5_38
- h5 := f0g5 + f1g4 + f2g3 + f3g2 + f4g1 + f5g0 + f6g9_19 + f7g8_19 + f8g7_19 + f9g6_19
- h6 := f0g6 + f1g5_2 + f2g4 + f3g3_2 + f4g2 + f5g1_2 + f6g0 + f7g9_38 + f8g8_19 + f9g7_38
- h7 := f0g7 + f1g6 + f2g5 + f3g4 + f4g3 + f5g2 + f6g1 + f7g0 + f8g9_19 + f9g8_19
- h8 := f0g8 + f1g7_2 + f2g6 + f3g5_2 + f4g4 + f5g3_2 + f6g2 + f7g1_2 + f8g0 + f9g9_38
- h9 := f0g9 + f1g8 + f2g7 + f3g6 + f4g5 + f5g4 + f6g3 + f7g2 + f8g1 + f9g0
- var carry [10]int64
-
- // |h0| <= (1.1*1.1*2^52*(1+19+19+19+19)+1.1*1.1*2^50*(38+38+38+38+38))
- // i.e. |h0| <= 1.2*2^59; narrower ranges for h2, h4, h6, h8
- // |h1| <= (1.1*1.1*2^51*(1+1+19+19+19+19+19+19+19+19))
- // i.e. |h1| <= 1.5*2^58; narrower ranges for h3, h5, h7, h9
-
- carry[0] = (h0 + (1 << 25)) >> 26
- h1 += carry[0]
- h0 -= carry[0] << 26
- carry[4] = (h4 + (1 << 25)) >> 26
- h5 += carry[4]
- h4 -= carry[4] << 26
- // |h0| <= 2^25
- // |h4| <= 2^25
- // |h1| <= 1.51*2^58
- // |h5| <= 1.51*2^58
-
- carry[1] = (h1 + (1 << 24)) >> 25
- h2 += carry[1]
- h1 -= carry[1] << 25
- carry[5] = (h5 + (1 << 24)) >> 25
- h6 += carry[5]
- h5 -= carry[5] << 25
- // |h1| <= 2^24; from now on fits into int32
- // |h5| <= 2^24; from now on fits into int32
- // |h2| <= 1.21*2^59
- // |h6| <= 1.21*2^59
-
- carry[2] = (h2 + (1 << 25)) >> 26
- h3 += carry[2]
- h2 -= carry[2] << 26
- carry[6] = (h6 + (1 << 25)) >> 26
- h7 += carry[6]
- h6 -= carry[6] << 26
- // |h2| <= 2^25; from now on fits into int32 unchanged
- // |h6| <= 2^25; from now on fits into int32 unchanged
- // |h3| <= 1.51*2^58
- // |h7| <= 1.51*2^58
-
- carry[3] = (h3 + (1 << 24)) >> 25
- h4 += carry[3]
- h3 -= carry[3] << 25
- carry[7] = (h7 + (1 << 24)) >> 25
- h8 += carry[7]
- h7 -= carry[7] << 25
- // |h3| <= 2^24; from now on fits into int32 unchanged
- // |h7| <= 2^24; from now on fits into int32 unchanged
- // |h4| <= 1.52*2^33
- // |h8| <= 1.52*2^33
-
- carry[4] = (h4 + (1 << 25)) >> 26
- h5 += carry[4]
- h4 -= carry[4] << 26
- carry[8] = (h8 + (1 << 25)) >> 26
- h9 += carry[8]
- h8 -= carry[8] << 26
- // |h4| <= 2^25; from now on fits into int32 unchanged
- // |h8| <= 2^25; from now on fits into int32 unchanged
- // |h5| <= 1.01*2^24
- // |h9| <= 1.51*2^58
-
- carry[9] = (h9 + (1 << 24)) >> 25
- h0 += carry[9] * 19
- h9 -= carry[9] << 25
- // |h9| <= 2^24; from now on fits into int32 unchanged
- // |h0| <= 1.8*2^37
-
- carry[0] = (h0 + (1 << 25)) >> 26
- h1 += carry[0]
- h0 -= carry[0] << 26
- // |h0| <= 2^25; from now on fits into int32 unchanged
- // |h1| <= 1.01*2^24
-
- h[0] = int32(h0)
- h[1] = int32(h1)
- h[2] = int32(h2)
- h[3] = int32(h3)
- h[4] = int32(h4)
- h[5] = int32(h5)
- h[6] = int32(h6)
- h[7] = int32(h7)
- h[8] = int32(h8)
- h[9] = int32(h9)
+// It is recommended to use the X25519 function with Basepoint instead, as
+// copying into fixed size arrays can lead to unexpected bugs.
+func ScalarBaseMult(dst, scalar *[32]byte) {
+ ScalarMult(dst, scalar, &basePoint)
}
-// feSquare calculates h = f*f. Can overlap h with f.
-//
-// Preconditions:
-// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
-//
-// Postconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-func feSquare(h, f *fieldElement) {
- f0 := f[0]
- f1 := f[1]
- f2 := f[2]
- f3 := f[3]
- f4 := f[4]
- f5 := f[5]
- f6 := f[6]
- f7 := f[7]
- f8 := f[8]
- f9 := f[9]
- f0_2 := 2 * f0
- f1_2 := 2 * f1
- f2_2 := 2 * f2
- f3_2 := 2 * f3
- f4_2 := 2 * f4
- f5_2 := 2 * f5
- f6_2 := 2 * f6
- f7_2 := 2 * f7
- f5_38 := 38 * f5 // 1.31*2^30
- f6_19 := 19 * f6 // 1.31*2^30
- f7_38 := 38 * f7 // 1.31*2^30
- f8_19 := 19 * f8 // 1.31*2^30
- f9_38 := 38 * f9 // 1.31*2^30
- f0f0 := int64(f0) * int64(f0)
- f0f1_2 := int64(f0_2) * int64(f1)
- f0f2_2 := int64(f0_2) * int64(f2)
- f0f3_2 := int64(f0_2) * int64(f3)
- f0f4_2 := int64(f0_2) * int64(f4)
- f0f5_2 := int64(f0_2) * int64(f5)
- f0f6_2 := int64(f0_2) * int64(f6)
- f0f7_2 := int64(f0_2) * int64(f7)
- f0f8_2 := int64(f0_2) * int64(f8)
- f0f9_2 := int64(f0_2) * int64(f9)
- f1f1_2 := int64(f1_2) * int64(f1)
- f1f2_2 := int64(f1_2) * int64(f2)
- f1f3_4 := int64(f1_2) * int64(f3_2)
- f1f4_2 := int64(f1_2) * int64(f4)
- f1f5_4 := int64(f1_2) * int64(f5_2)
- f1f6_2 := int64(f1_2) * int64(f6)
- f1f7_4 := int64(f1_2) * int64(f7_2)
- f1f8_2 := int64(f1_2) * int64(f8)
- f1f9_76 := int64(f1_2) * int64(f9_38)
- f2f2 := int64(f2) * int64(f2)
- f2f3_2 := int64(f2_2) * int64(f3)
- f2f4_2 := int64(f2_2) * int64(f4)
- f2f5_2 := int64(f2_2) * int64(f5)
- f2f6_2 := int64(f2_2) * int64(f6)
- f2f7_2 := int64(f2_2) * int64(f7)
- f2f8_38 := int64(f2_2) * int64(f8_19)
- f2f9_38 := int64(f2) * int64(f9_38)
- f3f3_2 := int64(f3_2) * int64(f3)
- f3f4_2 := int64(f3_2) * int64(f4)
- f3f5_4 := int64(f3_2) * int64(f5_2)
- f3f6_2 := int64(f3_2) * int64(f6)
- f3f7_76 := int64(f3_2) * int64(f7_38)
- f3f8_38 := int64(f3_2) * int64(f8_19)
- f3f9_76 := int64(f3_2) * int64(f9_38)
- f4f4 := int64(f4) * int64(f4)
- f4f5_2 := int64(f4_2) * int64(f5)
- f4f6_38 := int64(f4_2) * int64(f6_19)
- f4f7_38 := int64(f4) * int64(f7_38)
- f4f8_38 := int64(f4_2) * int64(f8_19)
- f4f9_38 := int64(f4) * int64(f9_38)
- f5f5_38 := int64(f5) * int64(f5_38)
- f5f6_38 := int64(f5_2) * int64(f6_19)
- f5f7_76 := int64(f5_2) * int64(f7_38)
- f5f8_38 := int64(f5_2) * int64(f8_19)
- f5f9_76 := int64(f5_2) * int64(f9_38)
- f6f6_19 := int64(f6) * int64(f6_19)
- f6f7_38 := int64(f6) * int64(f7_38)
- f6f8_38 := int64(f6_2) * int64(f8_19)
- f6f9_38 := int64(f6) * int64(f9_38)
- f7f7_38 := int64(f7) * int64(f7_38)
- f7f8_38 := int64(f7_2) * int64(f8_19)
- f7f9_76 := int64(f7_2) * int64(f9_38)
- f8f8_19 := int64(f8) * int64(f8_19)
- f8f9_38 := int64(f8) * int64(f9_38)
- f9f9_38 := int64(f9) * int64(f9_38)
- h0 := f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38
- h1 := f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38
- h2 := f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19
- h3 := f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38
- h4 := f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38
- h5 := f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38
- h6 := f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19
- h7 := f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38
- h8 := f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38
- h9 := f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2
- var carry [10]int64
-
- carry[0] = (h0 + (1 << 25)) >> 26
- h1 += carry[0]
- h0 -= carry[0] << 26
- carry[4] = (h4 + (1 << 25)) >> 26
- h5 += carry[4]
- h4 -= carry[4] << 26
-
- carry[1] = (h1 + (1 << 24)) >> 25
- h2 += carry[1]
- h1 -= carry[1] << 25
- carry[5] = (h5 + (1 << 24)) >> 25
- h6 += carry[5]
- h5 -= carry[5] << 25
-
- carry[2] = (h2 + (1 << 25)) >> 26
- h3 += carry[2]
- h2 -= carry[2] << 26
- carry[6] = (h6 + (1 << 25)) >> 26
- h7 += carry[6]
- h6 -= carry[6] << 26
-
- carry[3] = (h3 + (1 << 24)) >> 25
- h4 += carry[3]
- h3 -= carry[3] << 25
- carry[7] = (h7 + (1 << 24)) >> 25
- h8 += carry[7]
- h7 -= carry[7] << 25
+const (
+ // ScalarSize is the size of the scalar input to X25519.
+ ScalarSize = 32
+ // PointSize is the size of the point input to X25519.
+ PointSize = 32
+)
- carry[4] = (h4 + (1 << 25)) >> 26
- h5 += carry[4]
- h4 -= carry[4] << 26
- carry[8] = (h8 + (1 << 25)) >> 26
- h9 += carry[8]
- h8 -= carry[8] << 26
+// Basepoint is the canonical Curve25519 generator.
+var Basepoint []byte
- carry[9] = (h9 + (1 << 24)) >> 25
- h0 += carry[9] * 19
- h9 -= carry[9] << 25
+var basePoint = [32]byte{9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
- carry[0] = (h0 + (1 << 25)) >> 26
- h1 += carry[0]
- h0 -= carry[0] << 26
+func init() { Basepoint = basePoint[:] }
- h[0] = int32(h0)
- h[1] = int32(h1)
- h[2] = int32(h2)
- h[3] = int32(h3)
- h[4] = int32(h4)
- h[5] = int32(h5)
- h[6] = int32(h6)
- h[7] = int32(h7)
- h[8] = int32(h8)
- h[9] = int32(h9)
+func checkBasepoint() {
+ if subtle.ConstantTimeCompare(Basepoint, []byte{
+ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ }) != 1 {
+ panic("curve25519: global Basepoint value was modified")
+ }
}
-// feMul121666 calculates h = f * 121666. Can overlap h with f.
+// X25519 returns the result of the scalar multiplication (scalar * point),
+// according to RFC 7748, Section 5. scalar, point and the return value are
+// slices of 32 bytes.
//
-// Preconditions:
-// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
+// scalar can be generated at random, for example with crypto/rand. point should
+// be either Basepoint or the output of another X25519 call.
//
-// Postconditions:
-// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
-func feMul121666(h, f *fieldElement) {
- h0 := int64(f[0]) * 121666
- h1 := int64(f[1]) * 121666
- h2 := int64(f[2]) * 121666
- h3 := int64(f[3]) * 121666
- h4 := int64(f[4]) * 121666
- h5 := int64(f[5]) * 121666
- h6 := int64(f[6]) * 121666
- h7 := int64(f[7]) * 121666
- h8 := int64(f[8]) * 121666
- h9 := int64(f[9]) * 121666
- var carry [10]int64
-
- carry[9] = (h9 + (1 << 24)) >> 25
- h0 += carry[9] * 19
- h9 -= carry[9] << 25
- carry[1] = (h1 + (1 << 24)) >> 25
- h2 += carry[1]
- h1 -= carry[1] << 25
- carry[3] = (h3 + (1 << 24)) >> 25
- h4 += carry[3]
- h3 -= carry[3] << 25
- carry[5] = (h5 + (1 << 24)) >> 25
- h6 += carry[5]
- h5 -= carry[5] << 25
- carry[7] = (h7 + (1 << 24)) >> 25
- h8 += carry[7]
- h7 -= carry[7] << 25
-
- carry[0] = (h0 + (1 << 25)) >> 26
- h1 += carry[0]
- h0 -= carry[0] << 26
- carry[2] = (h2 + (1 << 25)) >> 26
- h3 += carry[2]
- h2 -= carry[2] << 26
- carry[4] = (h4 + (1 << 25)) >> 26
- h5 += carry[4]
- h4 -= carry[4] << 26
- carry[6] = (h6 + (1 << 25)) >> 26
- h7 += carry[6]
- h6 -= carry[6] << 26
- carry[8] = (h8 + (1 << 25)) >> 26
- h9 += carry[8]
- h8 -= carry[8] << 26
-
- h[0] = int32(h0)
- h[1] = int32(h1)
- h[2] = int32(h2)
- h[3] = int32(h3)
- h[4] = int32(h4)
- h[5] = int32(h5)
- h[6] = int32(h6)
- h[7] = int32(h7)
- h[8] = int32(h8)
- h[9] = int32(h9)
-}
-
-// feInvert sets out = z^-1.
-func feInvert(out, z *fieldElement) {
- var t0, t1, t2, t3 fieldElement
- var i int
-
- feSquare(&t0, z)
- for i = 1; i < 1; i++ {
- feSquare(&t0, &t0)
- }
- feSquare(&t1, &t0)
- for i = 1; i < 2; i++ {
- feSquare(&t1, &t1)
- }
- feMul(&t1, z, &t1)
- feMul(&t0, &t0, &t1)
- feSquare(&t2, &t0)
- for i = 1; i < 1; i++ {
- feSquare(&t2, &t2)
- }
- feMul(&t1, &t1, &t2)
- feSquare(&t2, &t1)
- for i = 1; i < 5; i++ {
- feSquare(&t2, &t2)
- }
- feMul(&t1, &t2, &t1)
- feSquare(&t2, &t1)
- for i = 1; i < 10; i++ {
- feSquare(&t2, &t2)
- }
- feMul(&t2, &t2, &t1)
- feSquare(&t3, &t2)
- for i = 1; i < 20; i++ {
- feSquare(&t3, &t3)
- }
- feMul(&t2, &t3, &t2)
- feSquare(&t2, &t2)
- for i = 1; i < 10; i++ {
- feSquare(&t2, &t2)
- }
- feMul(&t1, &t2, &t1)
- feSquare(&t2, &t1)
- for i = 1; i < 50; i++ {
- feSquare(&t2, &t2)
- }
- feMul(&t2, &t2, &t1)
- feSquare(&t3, &t2)
- for i = 1; i < 100; i++ {
- feSquare(&t3, &t3)
- }
- feMul(&t2, &t3, &t2)
- feSquare(&t2, &t2)
- for i = 1; i < 50; i++ {
- feSquare(&t2, &t2)
- }
- feMul(&t1, &t2, &t1)
- feSquare(&t1, &t1)
- for i = 1; i < 5; i++ {
- feSquare(&t1, &t1)
- }
- feMul(out, &t1, &t0)
+// If point is Basepoint (but not if it's a different slice with the same
+// contents) a precomputed implementation might be used for performance.
+func X25519(scalar, point []byte) ([]byte, error) {
+ // Outline the body of function, to let the allocation be inlined in the
+ // caller, and possibly avoid escaping to the heap.
+ var dst [32]byte
+ return x25519(&dst, scalar, point)
}
-func scalarMult(out, in, base *[32]byte) {
- var e [32]byte
-
- copy(e[:], in[:])
- e[0] &= 248
- e[31] &= 127
- e[31] |= 64
-
- var x1, x2, z2, x3, z3, tmp0, tmp1 fieldElement
- feFromBytes(&x1, base)
- feOne(&x2)
- feCopy(&x3, &x1)
- feOne(&z3)
-
- swap := int32(0)
- for pos := 254; pos >= 0; pos-- {
- b := e[pos/8] >> uint(pos&7)
- b &= 1
- swap ^= int32(b)
- feCSwap(&x2, &x3, swap)
- feCSwap(&z2, &z3, swap)
- swap = int32(b)
-
- feSub(&tmp0, &x3, &z3)
- feSub(&tmp1, &x2, &z2)
- feAdd(&x2, &x2, &z2)
- feAdd(&z2, &x3, &z3)
- feMul(&z3, &tmp0, &x2)
- feMul(&z2, &z2, &tmp1)
- feSquare(&tmp0, &tmp1)
- feSquare(&tmp1, &x2)
- feAdd(&x3, &z3, &z2)
- feSub(&z2, &z3, &z2)
- feMul(&x2, &tmp1, &tmp0)
- feSub(&tmp1, &tmp1, &tmp0)
- feSquare(&z2, &z2)
- feMul121666(&z3, &tmp1)
- feSquare(&x3, &x3)
- feAdd(&tmp0, &tmp0, &z3)
- feMul(&z3, &x1, &z2)
- feMul(&z2, &tmp1, &tmp0)
- }
-
- feCSwap(&x2, &x3, swap)
- feCSwap(&z2, &z3, swap)
-
- feInvert(&z2, &z2)
- feMul(&x2, &x2, &z2)
- feToBytes(out, &x2)
+func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) {
+ var in [32]byte
+ if l := len(scalar); l != 32 {
+ return nil, fmt.Errorf("bad scalar length: %d, expected %d", l, 32)
+ }
+ if l := len(point); l != 32 {
+ return nil, fmt.Errorf("bad point length: %d, expected %d", l, 32)
+ }
+ copy(in[:], scalar)
+ if &point[0] == &Basepoint[0] {
+ checkBasepoint()
+ ScalarBaseMult(dst, &in)
+ } else {
+ var base, zero [32]byte
+ copy(base[:], point)
+ ScalarMult(dst, &in, &base)
+ if subtle.ConstantTimeCompare(dst[:], zero[:]) == 1 {
+ return nil, fmt.Errorf("bad input point: low order point")
+ }
+ }
+ return dst[:], nil
}
diff --git a/vendor/golang.org/x/crypto/curve25519/doc.go b/vendor/golang.org/x/crypto/curve25519/doc.go
deleted file mode 100644
index da9b10d..0000000
--- a/vendor/golang.org/x/crypto/curve25519/doc.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package curve25519 provides an implementation of scalar multiplication on
-// the elliptic curve known as curve25519. See https://cr.yp.to/ecdh.html
-package curve25519 // import "golang.org/x/crypto/curve25519"
-
-// basePoint is the x coordinate of the generator of the curve.
-var basePoint = [32]byte{9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
-
-// ScalarMult sets dst to the product in*base where dst and base are the x
-// coordinates of group points and all values are in little-endian form.
-func ScalarMult(dst, in, base *[32]byte) {
- scalarMult(dst, in, base)
-}
-
-// ScalarBaseMult sets dst to the product in*base where dst and base are the x
-// coordinates of group points, base is the standard generator and all values
-// are in little-endian form.
-func ScalarBaseMult(dst, in *[32]byte) {
- ScalarMult(dst, in, &basePoint)
-}
diff --git a/vendor/golang.org/x/crypto/curve25519/freeze_amd64.s b/vendor/golang.org/x/crypto/curve25519/freeze_amd64.s
deleted file mode 100644
index 3908161..0000000
--- a/vendor/golang.org/x/crypto/curve25519/freeze_amd64.s
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
-
-// +build amd64,!gccgo,!appengine
-
-#include "const_amd64.h"
-
-// func freeze(inout *[5]uint64)
-TEXT ·freeze(SB),7,$0-8
- MOVQ inout+0(FP), DI
-
- MOVQ 0(DI),SI
- MOVQ 8(DI),DX
- MOVQ 16(DI),CX
- MOVQ 24(DI),R8
- MOVQ 32(DI),R9
- MOVQ $REDMASK51,AX
- MOVQ AX,R10
- SUBQ $18,R10
- MOVQ $3,R11
-REDUCELOOP:
- MOVQ SI,R12
- SHRQ $51,R12
- ANDQ AX,SI
- ADDQ R12,DX
- MOVQ DX,R12
- SHRQ $51,R12
- ANDQ AX,DX
- ADDQ R12,CX
- MOVQ CX,R12
- SHRQ $51,R12
- ANDQ AX,CX
- ADDQ R12,R8
- MOVQ R8,R12
- SHRQ $51,R12
- ANDQ AX,R8
- ADDQ R12,R9
- MOVQ R9,R12
- SHRQ $51,R12
- ANDQ AX,R9
- IMUL3Q $19,R12,R12
- ADDQ R12,SI
- SUBQ $1,R11
- JA REDUCELOOP
- MOVQ $1,R12
- CMPQ R10,SI
- CMOVQLT R11,R12
- CMPQ AX,DX
- CMOVQNE R11,R12
- CMPQ AX,CX
- CMOVQNE R11,R12
- CMPQ AX,R8
- CMOVQNE R11,R12
- CMPQ AX,R9
- CMOVQNE R11,R12
- NEGQ R12
- ANDQ R12,AX
- ANDQ R12,R10
- SUBQ R10,SI
- SUBQ AX,DX
- SUBQ AX,CX
- SUBQ AX,R8
- SUBQ AX,R9
- MOVQ SI,0(DI)
- MOVQ DX,8(DI)
- MOVQ CX,16(DI)
- MOVQ R8,24(DI)
- MOVQ R9,32(DI)
- RET
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/README b/vendor/golang.org/x/crypto/curve25519/internal/field/README
new file mode 100644
index 0000000..e25bca7
--- /dev/null
+++ b/vendor/golang.org/x/crypto/curve25519/internal/field/README
@@ -0,0 +1,7 @@
+This package is kept in sync with crypto/ed25519/internal/edwards25519/field in
+the standard library.
+
+If there are any changes in the standard library that need to be synced to this
+package, run sync.sh. It will not overwrite any local changes made since the
+previous sync, so it's ok to land changes in this package first, and then sync
+to the standard library later.
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go
new file mode 100644
index 0000000..ca841ad
--- /dev/null
+++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go
@@ -0,0 +1,416 @@
+// Copyright (c) 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package field implements fast arithmetic modulo 2^255-19.
+package field
+
+import (
+ "crypto/subtle"
+ "encoding/binary"
+ "math/bits"
+)
+
+// Element represents an element of the field GF(2^255-19). Note that this
+// is not a cryptographically secure group, and should only be used to interact
+// with edwards25519.Point coordinates.
+//
+// This type works similarly to math/big.Int, and all arguments and receivers
+// are allowed to alias.
+//
+// The zero value is a valid zero element.
+type Element struct {
+ // An element t represents the integer
+ // t.l0 + t.l1*2^51 + t.l2*2^102 + t.l3*2^153 + t.l4*2^204
+ //
+ // Between operations, all limbs are expected to be lower than 2^52.
+ l0 uint64
+ l1 uint64
+ l2 uint64
+ l3 uint64
+ l4 uint64
+}
+
+const maskLow51Bits uint64 = (1 << 51) - 1
+
+var feZero = &Element{0, 0, 0, 0, 0}
+
+// Zero sets v = 0, and returns v.
+func (v *Element) Zero() *Element {
+ *v = *feZero
+ return v
+}
+
+var feOne = &Element{1, 0, 0, 0, 0}
+
+// One sets v = 1, and returns v.
+func (v *Element) One() *Element {
+ *v = *feOne
+ return v
+}
+
+// reduce reduces v modulo 2^255 - 19 and returns it.
+func (v *Element) reduce() *Element {
+ v.carryPropagate()
+
+ // After the light reduction we now have a field element representation
+ // v < 2^255 + 2^13 * 19, but need v < 2^255 - 19.
+
+ // If v >= 2^255 - 19, then v + 19 >= 2^255, which would overflow 2^255 - 1,
+ // generating a carry. That is, c will be 0 if v < 2^255 - 19, and 1 otherwise.
+ c := (v.l0 + 19) >> 51
+ c = (v.l1 + c) >> 51
+ c = (v.l2 + c) >> 51
+ c = (v.l3 + c) >> 51
+ c = (v.l4 + c) >> 51
+
+ // If v < 2^255 - 19 and c = 0, this will be a no-op. Otherwise, it's
+ // effectively applying the reduction identity to the carry.
+ v.l0 += 19 * c
+
+ v.l1 += v.l0 >> 51
+ v.l0 = v.l0 & maskLow51Bits
+ v.l2 += v.l1 >> 51
+ v.l1 = v.l1 & maskLow51Bits
+ v.l3 += v.l2 >> 51
+ v.l2 = v.l2 & maskLow51Bits
+ v.l4 += v.l3 >> 51
+ v.l3 = v.l3 & maskLow51Bits
+ // no additional carry
+ v.l4 = v.l4 & maskLow51Bits
+
+ return v
+}
+
+// Add sets v = a + b, and returns v.
+func (v *Element) Add(a, b *Element) *Element {
+ v.l0 = a.l0 + b.l0
+ v.l1 = a.l1 + b.l1
+ v.l2 = a.l2 + b.l2
+ v.l3 = a.l3 + b.l3
+ v.l4 = a.l4 + b.l4
+ // Using the generic implementation here is actually faster than the
+ // assembly. Probably because the body of this function is so simple that
+ // the compiler can figure out better optimizations by inlining the carry
+ // propagation. TODO
+ return v.carryPropagateGeneric()
+}
+
+// Subtract sets v = a - b, and returns v.
+func (v *Element) Subtract(a, b *Element) *Element {
+ // We first add 2 * p, to guarantee the subtraction won't underflow, and
+ // then subtract b (which can be up to 2^255 + 2^13 * 19).
+ v.l0 = (a.l0 + 0xFFFFFFFFFFFDA) - b.l0
+ v.l1 = (a.l1 + 0xFFFFFFFFFFFFE) - b.l1
+ v.l2 = (a.l2 + 0xFFFFFFFFFFFFE) - b.l2
+ v.l3 = (a.l3 + 0xFFFFFFFFFFFFE) - b.l3
+ v.l4 = (a.l4 + 0xFFFFFFFFFFFFE) - b.l4
+ return v.carryPropagate()
+}
+
+// Negate sets v = -a, and returns v.
+func (v *Element) Negate(a *Element) *Element {
+ return v.Subtract(feZero, a)
+}
+
+// Invert sets v = 1/z mod p, and returns v.
+//
+// If z == 0, Invert returns v = 0.
+func (v *Element) Invert(z *Element) *Element {
+ // Inversion is implemented as exponentiation with exponent p − 2. It uses the
+ // same sequence of 255 squarings and 11 multiplications as [Curve25519].
+ var z2, z9, z11, z2_5_0, z2_10_0, z2_20_0, z2_50_0, z2_100_0, t Element
+
+ z2.Square(z) // 2
+ t.Square(&z2) // 4
+ t.Square(&t) // 8
+ z9.Multiply(&t, z) // 9
+ z11.Multiply(&z9, &z2) // 11
+ t.Square(&z11) // 22
+ z2_5_0.Multiply(&t, &z9) // 31 = 2^5 - 2^0
+
+ t.Square(&z2_5_0) // 2^6 - 2^1
+ for i := 0; i < 4; i++ {
+ t.Square(&t) // 2^10 - 2^5
+ }
+ z2_10_0.Multiply(&t, &z2_5_0) // 2^10 - 2^0
+
+ t.Square(&z2_10_0) // 2^11 - 2^1
+ for i := 0; i < 9; i++ {
+ t.Square(&t) // 2^20 - 2^10
+ }
+ z2_20_0.Multiply(&t, &z2_10_0) // 2^20 - 2^0
+
+ t.Square(&z2_20_0) // 2^21 - 2^1
+ for i := 0; i < 19; i++ {
+ t.Square(&t) // 2^40 - 2^20
+ }
+ t.Multiply(&t, &z2_20_0) // 2^40 - 2^0
+
+ t.Square(&t) // 2^41 - 2^1
+ for i := 0; i < 9; i++ {
+ t.Square(&t) // 2^50 - 2^10
+ }
+ z2_50_0.Multiply(&t, &z2_10_0) // 2^50 - 2^0
+
+ t.Square(&z2_50_0) // 2^51 - 2^1
+ for i := 0; i < 49; i++ {
+ t.Square(&t) // 2^100 - 2^50
+ }
+ z2_100_0.Multiply(&t, &z2_50_0) // 2^100 - 2^0
+
+ t.Square(&z2_100_0) // 2^101 - 2^1
+ for i := 0; i < 99; i++ {
+ t.Square(&t) // 2^200 - 2^100
+ }
+ t.Multiply(&t, &z2_100_0) // 2^200 - 2^0
+
+ t.Square(&t) // 2^201 - 2^1
+ for i := 0; i < 49; i++ {
+ t.Square(&t) // 2^250 - 2^50
+ }
+ t.Multiply(&t, &z2_50_0) // 2^250 - 2^0
+
+ t.Square(&t) // 2^251 - 2^1
+ t.Square(&t) // 2^252 - 2^2
+ t.Square(&t) // 2^253 - 2^3
+ t.Square(&t) // 2^254 - 2^4
+ t.Square(&t) // 2^255 - 2^5
+
+ return v.Multiply(&t, &z11) // 2^255 - 21
+}
+
+// Set sets v = a, and returns v.
+func (v *Element) Set(a *Element) *Element {
+ *v = *a
+ return v
+}
+
+// SetBytes sets v to x, which must be a 32-byte little-endian encoding.
+//
+// Consistent with RFC 7748, the most significant bit (the high bit of the
+// last byte) is ignored, and non-canonical values (2^255-19 through 2^255-1)
+// are accepted. Note that this is laxer than specified by RFC 8032.
+func (v *Element) SetBytes(x []byte) *Element {
+ if len(x) != 32 {
+ panic("edwards25519: invalid field element input size")
+ }
+
+ // Bits 0:51 (bytes 0:8, bits 0:64, shift 0, mask 51).
+ v.l0 = binary.LittleEndian.Uint64(x[0:8])
+ v.l0 &= maskLow51Bits
+ // Bits 51:102 (bytes 6:14, bits 48:112, shift 3, mask 51).
+ v.l1 = binary.LittleEndian.Uint64(x[6:14]) >> 3
+ v.l1 &= maskLow51Bits
+ // Bits 102:153 (bytes 12:20, bits 96:160, shift 6, mask 51).
+ v.l2 = binary.LittleEndian.Uint64(x[12:20]) >> 6
+ v.l2 &= maskLow51Bits
+ // Bits 153:204 (bytes 19:27, bits 152:216, shift 1, mask 51).
+ v.l3 = binary.LittleEndian.Uint64(x[19:27]) >> 1
+ v.l3 &= maskLow51Bits
+ // Bits 204:251 (bytes 24:32, bits 192:256, shift 12, mask 51).
+ // Note: not bytes 25:33, shift 4, to avoid overread.
+ v.l4 = binary.LittleEndian.Uint64(x[24:32]) >> 12
+ v.l4 &= maskLow51Bits
+
+ return v
+}
+
+// Bytes returns the canonical 32-byte little-endian encoding of v.
+func (v *Element) Bytes() []byte {
+ // This function is outlined to make the allocations inline in the caller
+ // rather than happen on the heap.
+ var out [32]byte
+ return v.bytes(&out)
+}
+
+func (v *Element) bytes(out *[32]byte) []byte {
+ t := *v
+ t.reduce()
+
+ var buf [8]byte
+ for i, l := range [5]uint64{t.l0, t.l1, t.l2, t.l3, t.l4} {
+ bitsOffset := i * 51
+ binary.LittleEndian.PutUint64(buf[:], l<<uint(bitsOffset%8))
+ for i, bb := range buf {
+ off := bitsOffset/8 + i
+ if off >= len(out) {
+ break
+ }
+ out[off] |= bb
+ }
+ }
+
+ return out[:]
+}
+
+// Equal returns 1 if v and u are equal, and 0 otherwise.
+func (v *Element) Equal(u *Element) int {
+ sa, sv := u.Bytes(), v.Bytes()
+ return subtle.ConstantTimeCompare(sa, sv)
+}
+
+// mask64Bits returns 0xffffffff if cond is 1, and 0 otherwise.
+func mask64Bits(cond int) uint64 { return ^(uint64(cond) - 1) }
+
+// Select sets v to a if cond == 1, and to b if cond == 0.
+func (v *Element) Select(a, b *Element, cond int) *Element {
+ m := mask64Bits(cond)
+ v.l0 = (m & a.l0) | (^m & b.l0)
+ v.l1 = (m & a.l1) | (^m & b.l1)
+ v.l2 = (m & a.l2) | (^m & b.l2)
+ v.l3 = (m & a.l3) | (^m & b.l3)
+ v.l4 = (m & a.l4) | (^m & b.l4)
+ return v
+}
+
+// Swap swaps v and u if cond == 1 or leaves them unchanged if cond == 0, and returns v.
+func (v *Element) Swap(u *Element, cond int) {
+ m := mask64Bits(cond)
+ t := m & (v.l0 ^ u.l0)
+ v.l0 ^= t
+ u.l0 ^= t
+ t = m & (v.l1 ^ u.l1)
+ v.l1 ^= t
+ u.l1 ^= t
+ t = m & (v.l2 ^ u.l2)
+ v.l2 ^= t
+ u.l2 ^= t
+ t = m & (v.l3 ^ u.l3)
+ v.l3 ^= t
+ u.l3 ^= t
+ t = m & (v.l4 ^ u.l4)
+ v.l4 ^= t
+ u.l4 ^= t
+}
+
+// IsNegative returns 1 if v is negative, and 0 otherwise.
+func (v *Element) IsNegative() int {
+ return int(v.Bytes()[0] & 1)
+}
+
+// Absolute sets v to |u|, and returns v.
+func (v *Element) Absolute(u *Element) *Element {
+ return v.Select(new(Element).Negate(u), u, u.IsNegative())
+}
+
+// Multiply sets v = x * y, and returns v.
+func (v *Element) Multiply(x, y *Element) *Element {
+ feMul(v, x, y)
+ return v
+}
+
+// Square sets v = x * x, and returns v.
+func (v *Element) Square(x *Element) *Element {
+ feSquare(v, x)
+ return v
+}
+
+// Mult32 sets v = x * y, and returns v.
+func (v *Element) Mult32(x *Element, y uint32) *Element {
+ x0lo, x0hi := mul51(x.l0, y)
+ x1lo, x1hi := mul51(x.l1, y)
+ x2lo, x2hi := mul51(x.l2, y)
+ x3lo, x3hi := mul51(x.l3, y)
+ x4lo, x4hi := mul51(x.l4, y)
+ v.l0 = x0lo + 19*x4hi // carried over per the reduction identity
+ v.l1 = x1lo + x0hi
+ v.l2 = x2lo + x1hi
+ v.l3 = x3lo + x2hi
+ v.l4 = x4lo + x3hi
+ // The hi portions are going to be only 32 bits, plus any previous excess,
+ // so we can skip the carry propagation.
+ return v
+}
+
+// mul51 returns lo + hi * 2⁵¹ = a * b.
+func mul51(a uint64, b uint32) (lo uint64, hi uint64) {
+ mh, ml := bits.Mul64(a, uint64(b))
+ lo = ml & maskLow51Bits
+ hi = (mh << 13) | (ml >> 51)
+ return
+}
+
+// Pow22523 set v = x^((p-5)/8), and returns v. (p-5)/8 is 2^252-3.
+func (v *Element) Pow22523(x *Element) *Element {
+ var t0, t1, t2 Element
+
+ t0.Square(x) // x^2
+ t1.Square(&t0) // x^4
+ t1.Square(&t1) // x^8
+ t1.Multiply(x, &t1) // x^9
+ t0.Multiply(&t0, &t1) // x^11
+ t0.Square(&t0) // x^22
+ t0.Multiply(&t1, &t0) // x^31
+ t1.Square(&t0) // x^62
+ for i := 1; i < 5; i++ { // x^992
+ t1.Square(&t1)
+ }
+ t0.Multiply(&t1, &t0) // x^1023 -> 1023 = 2^10 - 1
+ t1.Square(&t0) // 2^11 - 2
+ for i := 1; i < 10; i++ { // 2^20 - 2^10
+ t1.Square(&t1)
+ }
+ t1.Multiply(&t1, &t0) // 2^20 - 1
+ t2.Square(&t1) // 2^21 - 2
+ for i := 1; i < 20; i++ { // 2^40 - 2^20
+ t2.Square(&t2)
+ }
+ t1.Multiply(&t2, &t1) // 2^40 - 1
+ t1.Square(&t1) // 2^41 - 2
+ for i := 1; i < 10; i++ { // 2^50 - 2^10
+ t1.Square(&t1)
+ }
+ t0.Multiply(&t1, &t0) // 2^50 - 1
+ t1.Square(&t0) // 2^51 - 2
+ for i := 1; i < 50; i++ { // 2^100 - 2^50
+ t1.Square(&t1)
+ }
+ t1.Multiply(&t1, &t0) // 2^100 - 1
+ t2.Square(&t1) // 2^101 - 2
+ for i := 1; i < 100; i++ { // 2^200 - 2^100
+ t2.Square(&t2)
+ }
+ t1.Multiply(&t2, &t1) // 2^200 - 1
+ t1.Square(&t1) // 2^201 - 2
+ for i := 1; i < 50; i++ { // 2^250 - 2^50
+ t1.Square(&t1)
+ }
+ t0.Multiply(&t1, &t0) // 2^250 - 1
+ t0.Square(&t0) // 2^251 - 2
+ t0.Square(&t0) // 2^252 - 4
+ return v.Multiply(&t0, x) // 2^252 - 3 -> x^(2^252-3)
+}
+
+// sqrtM1 is 2^((p-1)/4), which squared is equal to -1 by Euler's Criterion.
+var sqrtM1 = &Element{1718705420411056, 234908883556509,
+ 2233514472574048, 2117202627021982, 765476049583133}
+
+// SqrtRatio sets r to the non-negative square root of the ratio of u and v.
+//
+// If u/v is square, SqrtRatio returns r and 1. If u/v is not square, SqrtRatio
+// sets r according to Section 4.3 of draft-irtf-cfrg-ristretto255-decaf448-00,
+// and returns r and 0.
+func (r *Element) SqrtRatio(u, v *Element) (rr *Element, wasSquare int) {
+ var a, b Element
+
+ // r = (u * v3) * (u * v7)^((p-5)/8)
+ v2 := a.Square(v)
+ uv3 := b.Multiply(u, b.Multiply(v2, v))
+ uv7 := a.Multiply(uv3, a.Square(v2))
+ r.Multiply(uv3, r.Pow22523(uv7))
+
+ check := a.Multiply(v, a.Square(r)) // check = v * r^2
+
+ uNeg := b.Negate(u)
+ correctSignSqrt := check.Equal(u)
+ flippedSignSqrt := check.Equal(uNeg)
+ flippedSignSqrtI := check.Equal(uNeg.Multiply(uNeg, sqrtM1))
+
+ rPrime := b.Multiply(r, sqrtM1) // r_prime = SQRT_M1 * r
+ // r = CT_SELECT(r_prime IF flipped_sign_sqrt | flipped_sign_sqrt_i ELSE r)
+ r.Select(rPrime, r, flippedSignSqrt|flippedSignSqrtI)
+
+ r.Absolute(r) // Choose the nonnegative square root.
+ return r, correctSignSqrt | flippedSignSqrt
+}
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go
new file mode 100644
index 0000000..44dc8e8
--- /dev/null
+++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go
@@ -0,0 +1,13 @@
+// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
+
+// +build amd64,gc,!purego
+
+package field
+
+// feMul sets out = a * b. It works like feMulGeneric.
+//go:noescape
+func feMul(out *Element, a *Element, b *Element)
+
+// feSquare sets out = a * a. It works like feSquareGeneric.
+//go:noescape
+func feSquare(out *Element, a *Element)
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s
new file mode 100644
index 0000000..293f013
--- /dev/null
+++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s
@@ -0,0 +1,379 @@
+// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
+
+//go:build amd64 && gc && !purego
+// +build amd64,gc,!purego
+
+#include "textflag.h"
+
+// func feMul(out *Element, a *Element, b *Element)
+TEXT ·feMul(SB), NOSPLIT, $0-24
+ MOVQ a+8(FP), CX
+ MOVQ b+16(FP), BX
+
+ // r0 = a0×b0
+ MOVQ (CX), AX
+ MULQ (BX)
+ MOVQ AX, DI
+ MOVQ DX, SI
+
+ // r0 += 19×a1×b4
+ MOVQ 8(CX), AX
+ IMUL3Q $0x13, AX, AX
+ MULQ 32(BX)
+ ADDQ AX, DI
+ ADCQ DX, SI
+
+ // r0 += 19×a2×b3
+ MOVQ 16(CX), AX
+ IMUL3Q $0x13, AX, AX
+ MULQ 24(BX)
+ ADDQ AX, DI
+ ADCQ DX, SI
+
+ // r0 += 19×a3×b2
+ MOVQ 24(CX), AX
+ IMUL3Q $0x13, AX, AX
+ MULQ 16(BX)
+ ADDQ AX, DI
+ ADCQ DX, SI
+
+ // r0 += 19×a4×b1
+ MOVQ 32(CX), AX
+ IMUL3Q $0x13, AX, AX
+ MULQ 8(BX)
+ ADDQ AX, DI
+ ADCQ DX, SI
+
+ // r1 = a0×b1
+ MOVQ (CX), AX
+ MULQ 8(BX)
+ MOVQ AX, R9
+ MOVQ DX, R8
+
+ // r1 += a1×b0
+ MOVQ 8(CX), AX
+ MULQ (BX)
+ ADDQ AX, R9
+ ADCQ DX, R8
+
+ // r1 += 19×a2×b4
+ MOVQ 16(CX), AX
+ IMUL3Q $0x13, AX, AX
+ MULQ 32(BX)
+ ADDQ AX, R9
+ ADCQ DX, R8
+
+ // r1 += 19×a3×b3
+ MOVQ 24(CX), AX
+ IMUL3Q $0x13, AX, AX
+ MULQ 24(BX)
+ ADDQ AX, R9
+ ADCQ DX, R8
+
+ // r1 += 19×a4×b2
+ MOVQ 32(CX), AX
+ IMUL3Q $0x13, AX, AX
+ MULQ 16(BX)
+ ADDQ AX, R9
+ ADCQ DX, R8
+
+ // r2 = a0×b2
+ MOVQ (CX), AX
+ MULQ 16(BX)
+ MOVQ AX, R11
+ MOVQ DX, R10
+
+ // r2 += a1×b1
+ MOVQ 8(CX), AX
+ MULQ 8(BX)
+ ADDQ AX, R11
+ ADCQ DX, R10
+
+ // r2 += a2×b0
+ MOVQ 16(CX), AX
+ MULQ (BX)
+ ADDQ AX, R11
+ ADCQ DX, R10
+
+ // r2 += 19×a3×b4
+ MOVQ 24(CX), AX
+ IMUL3Q $0x13, AX, AX
+ MULQ 32(BX)
+ ADDQ AX, R11
+ ADCQ DX, R10
+
+ // r2 += 19×a4×b3
+ MOVQ 32(CX), AX
+ IMUL3Q $0x13, AX, AX
+ MULQ 24(BX)
+ ADDQ AX, R11
+ ADCQ DX, R10
+
+ // r3 = a0×b3
+ MOVQ (CX), AX
+ MULQ 24(BX)
+ MOVQ AX, R13
+ MOVQ DX, R12
+
+ // r3 += a1×b2
+ MOVQ 8(CX), AX
+ MULQ 16(BX)
+ ADDQ AX, R13
+ ADCQ DX, R12
+
+ // r3 += a2×b1
+ MOVQ 16(CX), AX
+ MULQ 8(BX)
+ ADDQ AX, R13
+ ADCQ DX, R12
+
+ // r3 += a3×b0
+ MOVQ 24(CX), AX
+ MULQ (BX)
+ ADDQ AX, R13
+ ADCQ DX, R12
+
+ // r3 += 19×a4×b4
+ MOVQ 32(CX), AX
+ IMUL3Q $0x13, AX, AX
+ MULQ 32(BX)
+ ADDQ AX, R13
+ ADCQ DX, R12
+
+ // r4 = a0×b4
+ MOVQ (CX), AX
+ MULQ 32(BX)
+ MOVQ AX, R15
+ MOVQ DX, R14
+
+ // r4 += a1×b3
+ MOVQ 8(CX), AX
+ MULQ 24(BX)
+ ADDQ AX, R15
+ ADCQ DX, R14
+
+ // r4 += a2×b2
+ MOVQ 16(CX), AX
+ MULQ 16(BX)
+ ADDQ AX, R15
+ ADCQ DX, R14
+
+ // r4 += a3×b1
+ MOVQ 24(CX), AX
+ MULQ 8(BX)
+ ADDQ AX, R15
+ ADCQ DX, R14
+
+ // r4 += a4×b0
+ MOVQ 32(CX), AX
+ MULQ (BX)
+ ADDQ AX, R15
+ ADCQ DX, R14
+
+ // First reduction chain
+ MOVQ $0x0007ffffffffffff, AX
+ SHLQ $0x0d, DI, SI
+ SHLQ $0x0d, R9, R8
+ SHLQ $0x0d, R11, R10
+ SHLQ $0x0d, R13, R12
+ SHLQ $0x0d, R15, R14
+ ANDQ AX, DI
+ IMUL3Q $0x13, R14, R14
+ ADDQ R14, DI
+ ANDQ AX, R9
+ ADDQ SI, R9
+ ANDQ AX, R11
+ ADDQ R8, R11
+ ANDQ AX, R13
+ ADDQ R10, R13
+ ANDQ AX, R15
+ ADDQ R12, R15
+
+ // Second reduction chain (carryPropagate)
+ MOVQ DI, SI
+ SHRQ $0x33, SI
+ MOVQ R9, R8
+ SHRQ $0x33, R8
+ MOVQ R11, R10
+ SHRQ $0x33, R10
+ MOVQ R13, R12
+ SHRQ $0x33, R12
+ MOVQ R15, R14
+ SHRQ $0x33, R14
+ ANDQ AX, DI
+ IMUL3Q $0x13, R14, R14
+ ADDQ R14, DI
+ ANDQ AX, R9
+ ADDQ SI, R9
+ ANDQ AX, R11
+ ADDQ R8, R11
+ ANDQ AX, R13
+ ADDQ R10, R13
+ ANDQ AX, R15
+ ADDQ R12, R15
+
+ // Store output
+ MOVQ out+0(FP), AX
+ MOVQ DI, (AX)
+ MOVQ R9, 8(AX)
+ MOVQ R11, 16(AX)
+ MOVQ R13, 24(AX)
+ MOVQ R15, 32(AX)
+ RET
+
+// func feSquare(out *Element, a *Element)
+TEXT ·feSquare(SB), NOSPLIT, $0-16
+ MOVQ a+8(FP), CX
+
+ // r0 = l0×l0
+ MOVQ (CX), AX
+ MULQ (CX)
+ MOVQ AX, SI
+ MOVQ DX, BX
+
+ // r0 += 38×l1×l4
+ MOVQ 8(CX), AX
+ IMUL3Q $0x26, AX, AX
+ MULQ 32(CX)
+ ADDQ AX, SI
+ ADCQ DX, BX
+
+ // r0 += 38×l2×l3
+ MOVQ 16(CX), AX
+ IMUL3Q $0x26, AX, AX
+ MULQ 24(CX)
+ ADDQ AX, SI
+ ADCQ DX, BX
+
+ // r1 = 2×l0×l1
+ MOVQ (CX), AX
+ SHLQ $0x01, AX
+ MULQ 8(CX)
+ MOVQ AX, R8
+ MOVQ DX, DI
+
+ // r1 += 38×l2×l4
+ MOVQ 16(CX), AX
+ IMUL3Q $0x26, AX, AX
+ MULQ 32(CX)
+ ADDQ AX, R8
+ ADCQ DX, DI
+
+ // r1 += 19×l3×l3
+ MOVQ 24(CX), AX
+ IMUL3Q $0x13, AX, AX
+ MULQ 24(CX)
+ ADDQ AX, R8
+ ADCQ DX, DI
+
+ // r2 = 2×l0×l2
+ MOVQ (CX), AX
+ SHLQ $0x01, AX
+ MULQ 16(CX)
+ MOVQ AX, R10
+ MOVQ DX, R9
+
+ // r2 += l1×l1
+ MOVQ 8(CX), AX
+ MULQ 8(CX)
+ ADDQ AX, R10
+ ADCQ DX, R9
+
+ // r2 += 38×l3×l4
+ MOVQ 24(CX), AX
+ IMUL3Q $0x26, AX, AX
+ MULQ 32(CX)
+ ADDQ AX, R10
+ ADCQ DX, R9
+
+ // r3 = 2×l0×l3
+ MOVQ (CX), AX
+ SHLQ $0x01, AX
+ MULQ 24(CX)
+ MOVQ AX, R12
+ MOVQ DX, R11
+
+ // r3 += 2×l1×l2
+ MOVQ 8(CX), AX
+ IMUL3Q $0x02, AX, AX
+ MULQ 16(CX)
+ ADDQ AX, R12
+ ADCQ DX, R11
+
+ // r3 += 19×l4×l4
+ MOVQ 32(CX), AX
+ IMUL3Q $0x13, AX, AX
+ MULQ 32(CX)
+ ADDQ AX, R12
+ ADCQ DX, R11
+
+ // r4 = 2×l0×l4
+ MOVQ (CX), AX
+ SHLQ $0x01, AX
+ MULQ 32(CX)
+ MOVQ AX, R14
+ MOVQ DX, R13
+
+ // r4 += 2×l1×l3
+ MOVQ 8(CX), AX
+ IMUL3Q $0x02, AX, AX
+ MULQ 24(CX)
+ ADDQ AX, R14
+ ADCQ DX, R13
+
+ // r4 += l2×l2
+ MOVQ 16(CX), AX
+ MULQ 16(CX)
+ ADDQ AX, R14
+ ADCQ DX, R13
+
+ // First reduction chain
+ MOVQ $0x0007ffffffffffff, AX
+ SHLQ $0x0d, SI, BX
+ SHLQ $0x0d, R8, DI
+ SHLQ $0x0d, R10, R9
+ SHLQ $0x0d, R12, R11
+ SHLQ $0x0d, R14, R13
+ ANDQ AX, SI
+ IMUL3Q $0x13, R13, R13
+ ADDQ R13, SI
+ ANDQ AX, R8
+ ADDQ BX, R8
+ ANDQ AX, R10
+ ADDQ DI, R10
+ ANDQ AX, R12
+ ADDQ R9, R12
+ ANDQ AX, R14
+ ADDQ R11, R14
+
+ // Second reduction chain (carryPropagate)
+ MOVQ SI, BX
+ SHRQ $0x33, BX
+ MOVQ R8, DI
+ SHRQ $0x33, DI
+ MOVQ R10, R9
+ SHRQ $0x33, R9
+ MOVQ R12, R11
+ SHRQ $0x33, R11
+ MOVQ R14, R13
+ SHRQ $0x33, R13
+ ANDQ AX, SI
+ IMUL3Q $0x13, R13, R13
+ ADDQ R13, SI
+ ANDQ AX, R8
+ ADDQ BX, R8
+ ANDQ AX, R10
+ ADDQ DI, R10
+ ANDQ AX, R12
+ ADDQ R9, R12
+ ANDQ AX, R14
+ ADDQ R11, R14
+
+ // Store output
+ MOVQ out+0(FP), AX
+ MOVQ SI, (AX)
+ MOVQ R8, 8(AX)
+ MOVQ R10, 16(AX)
+ MOVQ R12, 24(AX)
+ MOVQ R14, 32(AX)
+ RET
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go
new file mode 100644
index 0000000..ddb6c9b
--- /dev/null
+++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go
@@ -0,0 +1,12 @@
+// Copyright (c) 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !amd64 || !gc || purego
+// +build !amd64 !gc purego
+
+package field
+
+func feMul(v, x, y *Element) { feMulGeneric(v, x, y) }
+
+func feSquare(v, x *Element) { feSquareGeneric(v, x) }
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go
new file mode 100644
index 0000000..af459ef
--- /dev/null
+++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go
@@ -0,0 +1,16 @@
+// Copyright (c) 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build arm64 && gc && !purego
+// +build arm64,gc,!purego
+
+package field
+
+//go:noescape
+func carryPropagate(v *Element)
+
+func (v *Element) carryPropagate() *Element {
+ carryPropagate(v)
+ return v
+}
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s
new file mode 100644
index 0000000..5c91e45
--- /dev/null
+++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s
@@ -0,0 +1,43 @@
+// Copyright (c) 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build arm64 && gc && !purego
+// +build arm64,gc,!purego
+
+#include "textflag.h"
+
+// carryPropagate works exactly like carryPropagateGeneric and uses the
+// same AND, ADD, and LSR+MADD instructions emitted by the compiler, but
+// avoids loading R0-R4 twice and uses LDP and STP.
+//
+// See https://golang.org/issues/43145 for the main compiler issue.
+//
+// func carryPropagate(v *Element)
+TEXT ·carryPropagate(SB),NOFRAME|NOSPLIT,$0-8
+ MOVD v+0(FP), R20
+
+ LDP 0(R20), (R0, R1)
+ LDP 16(R20), (R2, R3)
+ MOVD 32(R20), R4
+
+ AND $0x7ffffffffffff, R0, R10
+ AND $0x7ffffffffffff, R1, R11
+ AND $0x7ffffffffffff, R2, R12
+ AND $0x7ffffffffffff, R3, R13
+ AND $0x7ffffffffffff, R4, R14
+
+ ADD R0>>51, R11, R11
+ ADD R1>>51, R12, R12
+ ADD R2>>51, R13, R13
+ ADD R3>>51, R14, R14
+ // R4>>51 * 19 + R10 -> R10
+ LSR $51, R4, R21
+ MOVD $19, R22
+ MADD R22, R10, R21, R10
+
+ STP (R10, R11), 0(R20)
+ STP (R12, R13), 16(R20)
+ MOVD R14, 32(R20)
+
+ RET
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go
new file mode 100644
index 0000000..234a5b2
--- /dev/null
+++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go
@@ -0,0 +1,12 @@
+// Copyright (c) 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !arm64 || !gc || purego
+// +build !arm64 !gc purego
+
+package field
+
+func (v *Element) carryPropagate() *Element {
+ return v.carryPropagateGeneric()
+}
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go
new file mode 100644
index 0000000..7b5b78c
--- /dev/null
+++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go
@@ -0,0 +1,264 @@
+// Copyright (c) 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package field
+
+import "math/bits"
+
+// uint128 holds a 128-bit number as two 64-bit limbs, for use with the
+// bits.Mul64 and bits.Add64 intrinsics.
+type uint128 struct {
+ lo, hi uint64
+}
+
+// mul64 returns a * b.
+func mul64(a, b uint64) uint128 {
+ hi, lo := bits.Mul64(a, b)
+ return uint128{lo, hi}
+}
+
+// addMul64 returns v + a * b.
+func addMul64(v uint128, a, b uint64) uint128 {
+ hi, lo := bits.Mul64(a, b)
+ lo, c := bits.Add64(lo, v.lo, 0)
+ hi, _ = bits.Add64(hi, v.hi, c)
+ return uint128{lo, hi}
+}
+
+// shiftRightBy51 returns a >> 51. a is assumed to be at most 115 bits.
+func shiftRightBy51(a uint128) uint64 {
+ return (a.hi << (64 - 51)) | (a.lo >> 51)
+}
+
+func feMulGeneric(v, a, b *Element) {
+ a0 := a.l0
+ a1 := a.l1
+ a2 := a.l2
+ a3 := a.l3
+ a4 := a.l4
+
+ b0 := b.l0
+ b1 := b.l1
+ b2 := b.l2
+ b3 := b.l3
+ b4 := b.l4
+
+ // Limb multiplication works like pen-and-paper columnar multiplication, but
+ // with 51-bit limbs instead of digits.
+ //
+ // a4 a3 a2 a1 a0 x
+ // b4 b3 b2 b1 b0 =
+ // ------------------------
+ // a4b0 a3b0 a2b0 a1b0 a0b0 +
+ // a4b1 a3b1 a2b1 a1b1 a0b1 +
+ // a4b2 a3b2 a2b2 a1b2 a0b2 +
+ // a4b3 a3b3 a2b3 a1b3 a0b3 +
+ // a4b4 a3b4 a2b4 a1b4 a0b4 =
+ // ----------------------------------------------
+ // r8 r7 r6 r5 r4 r3 r2 r1 r0
+ //
+ // We can then use the reduction identity (a * 2²⁵⁵ + b = a * 19 + b) to
+ // reduce the limbs that would overflow 255 bits. r5 * 2²⁵⁵ becomes 19 * r5,
+ // r6 * 2³⁰⁶ becomes 19 * r6 * 2⁵¹, etc.
+ //
+ // Reduction can be carried out simultaneously to multiplication. For
+ // example, we do not compute r5: whenever the result of a multiplication
+ // belongs to r5, like a1b4, we multiply it by 19 and add the result to r0.
+ //
+ // a4b0 a3b0 a2b0 a1b0 a0b0 +
+ // a3b1 a2b1 a1b1 a0b1 19×a4b1 +
+ // a2b2 a1b2 a0b2 19×a4b2 19×a3b2 +
+ // a1b3 a0b3 19×a4b3 19×a3b3 19×a2b3 +
+ // a0b4 19×a4b4 19×a3b4 19×a2b4 19×a1b4 =
+ // --------------------------------------
+ // r4 r3 r2 r1 r0
+ //
+ // Finally we add up the columns into wide, overlapping limbs.
+
+ a1_19 := a1 * 19
+ a2_19 := a2 * 19
+ a3_19 := a3 * 19
+ a4_19 := a4 * 19
+
+ // r0 = a0×b0 + 19×(a1×b4 + a2×b3 + a3×b2 + a4×b1)
+ r0 := mul64(a0, b0)
+ r0 = addMul64(r0, a1_19, b4)
+ r0 = addMul64(r0, a2_19, b3)
+ r0 = addMul64(r0, a3_19, b2)
+ r0 = addMul64(r0, a4_19, b1)
+
+ // r1 = a0×b1 + a1×b0 + 19×(a2×b4 + a3×b3 + a4×b2)
+ r1 := mul64(a0, b1)
+ r1 = addMul64(r1, a1, b0)
+ r1 = addMul64(r1, a2_19, b4)
+ r1 = addMul64(r1, a3_19, b3)
+ r1 = addMul64(r1, a4_19, b2)
+
+ // r2 = a0×b2 + a1×b1 + a2×b0 + 19×(a3×b4 + a4×b3)
+ r2 := mul64(a0, b2)
+ r2 = addMul64(r2, a1, b1)
+ r2 = addMul64(r2, a2, b0)
+ r2 = addMul64(r2, a3_19, b4)
+ r2 = addMul64(r2, a4_19, b3)
+
+ // r3 = a0×b3 + a1×b2 + a2×b1 + a3×b0 + 19×a4×b4
+ r3 := mul64(a0, b3)
+ r3 = addMul64(r3, a1, b2)
+ r3 = addMul64(r3, a2, b1)
+ r3 = addMul64(r3, a3, b0)
+ r3 = addMul64(r3, a4_19, b4)
+
+ // r4 = a0×b4 + a1×b3 + a2×b2 + a3×b1 + a4×b0
+ r4 := mul64(a0, b4)
+ r4 = addMul64(r4, a1, b3)
+ r4 = addMul64(r4, a2, b2)
+ r4 = addMul64(r4, a3, b1)
+ r4 = addMul64(r4, a4, b0)
+
+ // After the multiplication, we need to reduce (carry) the five coefficients
+ // to obtain a result with limbs that are at most slightly larger than 2⁵¹,
+ // to respect the Element invariant.
+ //
+ // Overall, the reduction works the same as carryPropagate, except with
+ // wider inputs: we take the carry for each coefficient by shifting it right
+ // by 51, and add it to the limb above it. The top carry is multiplied by 19
+ // according to the reduction identity and added to the lowest limb.
+ //
+ // The largest coefficient (r0) will be at most 111 bits, which guarantees
+ // that all carries are at most 111 - 51 = 60 bits, which fits in a uint64.
+ //
+ // r0 = a0×b0 + 19×(a1×b4 + a2×b3 + a3×b2 + a4×b1)
+ // r0 < 2⁵²×2⁵² + 19×(2⁵²×2⁵² + 2⁵²×2⁵² + 2⁵²×2⁵² + 2⁵²×2⁵²)
+ // r0 < (1 + 19 × 4) × 2⁵² × 2⁵²
+ // r0 < 2⁷ × 2⁵² × 2⁵²
+ // r0 < 2¹¹¹
+ //
+ // Moreover, the top coefficient (r4) is at most 107 bits, so c4 is at most
+ // 56 bits, and c4 * 19 is at most 61 bits, which again fits in a uint64 and
+ // allows us to easily apply the reduction identity.
+ //
+ // r4 = a0×b4 + a1×b3 + a2×b2 + a3×b1 + a4×b0
+ // r4 < 5 × 2⁵² × 2⁵²
+ // r4 < 2¹⁰⁷
+ //
+
+ c0 := shiftRightBy51(r0)
+ c1 := shiftRightBy51(r1)
+ c2 := shiftRightBy51(r2)
+ c3 := shiftRightBy51(r3)
+ c4 := shiftRightBy51(r4)
+
+ rr0 := r0.lo&maskLow51Bits + c4*19
+ rr1 := r1.lo&maskLow51Bits + c0
+ rr2 := r2.lo&maskLow51Bits + c1
+ rr3 := r3.lo&maskLow51Bits + c2
+ rr4 := r4.lo&maskLow51Bits + c3
+
+ // Now all coefficients fit into 64-bit registers but are still too large to
+ // be passed around as a Element. We therefore do one last carry chain,
+ // where the carries will be small enough to fit in the wiggle room above 2⁵¹.
+ *v = Element{rr0, rr1, rr2, rr3, rr4}
+ v.carryPropagate()
+}
+
+func feSquareGeneric(v, a *Element) {
+ l0 := a.l0
+ l1 := a.l1
+ l2 := a.l2
+ l3 := a.l3
+ l4 := a.l4
+
+ // Squaring works precisely like multiplication above, but thanks to its
+ // symmetry we get to group a few terms together.
+ //
+ // l4 l3 l2 l1 l0 x
+ // l4 l3 l2 l1 l0 =
+ // ------------------------
+ // l4l0 l3l0 l2l0 l1l0 l0l0 +
+ // l4l1 l3l1 l2l1 l1l1 l0l1 +
+ // l4l2 l3l2 l2l2 l1l2 l0l2 +
+ // l4l3 l3l3 l2l3 l1l3 l0l3 +
+ // l4l4 l3l4 l2l4 l1l4 l0l4 =
+ // ----------------------------------------------
+ // r8 r7 r6 r5 r4 r3 r2 r1 r0
+ //
+ // l4l0 l3l0 l2l0 l1l0 l0l0 +
+ // l3l1 l2l1 l1l1 l0l1 19×l4l1 +
+ // l2l2 l1l2 l0l2 19×l4l2 19×l3l2 +
+ // l1l3 l0l3 19×l4l3 19×l3l3 19×l2l3 +
+ // l0l4 19×l4l4 19×l3l4 19×l2l4 19×l1l4 =
+ // --------------------------------------
+ // r4 r3 r2 r1 r0
+ //
+ // With precomputed 2×, 19×, and 2×19× terms, we can compute each limb with
+ // only three Mul64 and four Add64, instead of five and eight.
+
+ l0_2 := l0 * 2
+ l1_2 := l1 * 2
+
+ l1_38 := l1 * 38
+ l2_38 := l2 * 38
+ l3_38 := l3 * 38
+
+ l3_19 := l3 * 19
+ l4_19 := l4 * 19
+
+ // r0 = l0×l0 + 19×(l1×l4 + l2×l3 + l3×l2 + l4×l1) = l0×l0 + 19×2×(l1×l4 + l2×l3)
+ r0 := mul64(l0, l0)
+ r0 = addMul64(r0, l1_38, l4)
+ r0 = addMul64(r0, l2_38, l3)
+
+ // r1 = l0×l1 + l1×l0 + 19×(l2×l4 + l3×l3 + l4×l2) = 2×l0×l1 + 19×2×l2×l4 + 19×l3×l3
+ r1 := mul64(l0_2, l1)
+ r1 = addMul64(r1, l2_38, l4)
+ r1 = addMul64(r1, l3_19, l3)
+
+ // r2 = l0×l2 + l1×l1 + l2×l0 + 19×(l3×l4 + l4×l3) = 2×l0×l2 + l1×l1 + 19×2×l3×l4
+ r2 := mul64(l0_2, l2)
+ r2 = addMul64(r2, l1, l1)
+ r2 = addMul64(r2, l3_38, l4)
+
+ // r3 = l0×l3 + l1×l2 + l2×l1 + l3×l0 + 19×l4×l4 = 2×l0×l3 + 2×l1×l2 + 19×l4×l4
+ r3 := mul64(l0_2, l3)
+ r3 = addMul64(r3, l1_2, l2)
+ r3 = addMul64(r3, l4_19, l4)
+
+ // r4 = l0×l4 + l1×l3 + l2×l2 + l3×l1 + l4×l0 = 2×l0×l4 + 2×l1×l3 + l2×l2
+ r4 := mul64(l0_2, l4)
+ r4 = addMul64(r4, l1_2, l3)
+ r4 = addMul64(r4, l2, l2)
+
+ c0 := shiftRightBy51(r0)
+ c1 := shiftRightBy51(r1)
+ c2 := shiftRightBy51(r2)
+ c3 := shiftRightBy51(r3)
+ c4 := shiftRightBy51(r4)
+
+ rr0 := r0.lo&maskLow51Bits + c4*19
+ rr1 := r1.lo&maskLow51Bits + c0
+ rr2 := r2.lo&maskLow51Bits + c1
+ rr3 := r3.lo&maskLow51Bits + c2
+ rr4 := r4.lo&maskLow51Bits + c3
+
+ *v = Element{rr0, rr1, rr2, rr3, rr4}
+ v.carryPropagate()
+}
+
+// carryPropagate brings the limbs below 52 bits by applying the reduction
+// identity (a * 2²⁵⁵ + b = a * 19 + b) to the l4 carry. TODO inline
+func (v *Element) carryPropagateGeneric() *Element {
+ c0 := v.l0 >> 51
+ c1 := v.l1 >> 51
+ c2 := v.l2 >> 51
+ c3 := v.l3 >> 51
+ c4 := v.l4 >> 51
+
+ v.l0 = v.l0&maskLow51Bits + c4*19
+ v.l1 = v.l1&maskLow51Bits + c0
+ v.l2 = v.l2&maskLow51Bits + c1
+ v.l3 = v.l3&maskLow51Bits + c2
+ v.l4 = v.l4&maskLow51Bits + c3
+
+ return v
+}
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint b/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint
new file mode 100644
index 0000000..e3685f9
--- /dev/null
+++ b/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint
@@ -0,0 +1 @@
+b0c49ae9f59d233526f8934262c5bbbe14d4358d
diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh b/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh
new file mode 100644
index 0000000..1ba22a8
--- /dev/null
+++ b/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh
@@ -0,0 +1,19 @@
+#! /bin/bash
+set -euo pipefail
+
+cd "$(git rev-parse --show-toplevel)"
+
+STD_PATH=src/crypto/ed25519/internal/edwards25519/field
+LOCAL_PATH=curve25519/internal/field
+LAST_SYNC_REF=$(cat $LOCAL_PATH/sync.checkpoint)
+
+git fetch https://go.googlesource.com/go master
+
+if git diff --quiet $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH; then
+ echo "No changes."
+else
+ NEW_REF=$(git rev-parse FETCH_HEAD | tee $LOCAL_PATH/sync.checkpoint)
+ echo "Applying changes from $LAST_SYNC_REF to $NEW_REF..."
+ git diff $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH | \
+ git apply -3 --directory=$LOCAL_PATH
+fi
diff --git a/vendor/golang.org/x/crypto/curve25519/ladderstep_amd64.s b/vendor/golang.org/x/crypto/curve25519/ladderstep_amd64.s
deleted file mode 100644
index e0ac30c..0000000
--- a/vendor/golang.org/x/crypto/curve25519/ladderstep_amd64.s
+++ /dev/null
@@ -1,1377 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
-
-// +build amd64,!gccgo,!appengine
-
-#include "const_amd64.h"
-
-// func ladderstep(inout *[5][5]uint64)
-TEXT ·ladderstep(SB),0,$296-8
- MOVQ inout+0(FP),DI
-
- MOVQ 40(DI),SI
- MOVQ 48(DI),DX
- MOVQ 56(DI),CX
- MOVQ 64(DI),R8
- MOVQ 72(DI),R9
- MOVQ SI,AX
- MOVQ DX,R10
- MOVQ CX,R11
- MOVQ R8,R12
- MOVQ R9,R13
- ADDQ ·_2P0(SB),AX
- ADDQ ·_2P1234(SB),R10
- ADDQ ·_2P1234(SB),R11
- ADDQ ·_2P1234(SB),R12
- ADDQ ·_2P1234(SB),R13
- ADDQ 80(DI),SI
- ADDQ 88(DI),DX
- ADDQ 96(DI),CX
- ADDQ 104(DI),R8
- ADDQ 112(DI),R9
- SUBQ 80(DI),AX
- SUBQ 88(DI),R10
- SUBQ 96(DI),R11
- SUBQ 104(DI),R12
- SUBQ 112(DI),R13
- MOVQ SI,0(SP)
- MOVQ DX,8(SP)
- MOVQ CX,16(SP)
- MOVQ R8,24(SP)
- MOVQ R9,32(SP)
- MOVQ AX,40(SP)
- MOVQ R10,48(SP)
- MOVQ R11,56(SP)
- MOVQ R12,64(SP)
- MOVQ R13,72(SP)
- MOVQ 40(SP),AX
- MULQ 40(SP)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 40(SP),AX
- SHLQ $1,AX
- MULQ 48(SP)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 40(SP),AX
- SHLQ $1,AX
- MULQ 56(SP)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 40(SP),AX
- SHLQ $1,AX
- MULQ 64(SP)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 40(SP),AX
- SHLQ $1,AX
- MULQ 72(SP)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 48(SP),AX
- MULQ 48(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 48(SP),AX
- SHLQ $1,AX
- MULQ 56(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 48(SP),AX
- SHLQ $1,AX
- MULQ 64(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 48(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 72(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 56(SP),AX
- MULQ 56(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 56(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 64(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 56(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 72(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 64(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 64(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 64(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 72(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 72(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 72(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,SI,CX
- ANDQ DX,SI
- SHLQ $13,R8,R9
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R10,R11
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R12,R13
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R14,R15
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- ANDQ DX,SI
- MOVQ CX,R8
- SHRQ $51,CX
- ADDQ R10,CX
- ANDQ DX,R8
- MOVQ CX,R9
- SHRQ $51,CX
- ADDQ R12,CX
- ANDQ DX,R9
- MOVQ CX,AX
- SHRQ $51,CX
- ADDQ R14,CX
- ANDQ DX,AX
- MOVQ CX,R10
- SHRQ $51,CX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,80(SP)
- MOVQ R8,88(SP)
- MOVQ R9,96(SP)
- MOVQ AX,104(SP)
- MOVQ R10,112(SP)
- MOVQ 0(SP),AX
- MULQ 0(SP)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 0(SP),AX
- SHLQ $1,AX
- MULQ 8(SP)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 0(SP),AX
- SHLQ $1,AX
- MULQ 16(SP)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 0(SP),AX
- SHLQ $1,AX
- MULQ 24(SP)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 0(SP),AX
- SHLQ $1,AX
- MULQ 32(SP)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 8(SP),AX
- MULQ 8(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 8(SP),AX
- SHLQ $1,AX
- MULQ 16(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 8(SP),AX
- SHLQ $1,AX
- MULQ 24(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 8(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 32(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 16(SP),AX
- MULQ 16(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 16(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 24(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 16(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 32(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 24(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 24(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 24(SP),DX
- IMUL3Q $38,DX,AX
- MULQ 32(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 32(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 32(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,SI,CX
- ANDQ DX,SI
- SHLQ $13,R8,R9
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R10,R11
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R12,R13
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R14,R15
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- ANDQ DX,SI
- MOVQ CX,R8
- SHRQ $51,CX
- ADDQ R10,CX
- ANDQ DX,R8
- MOVQ CX,R9
- SHRQ $51,CX
- ADDQ R12,CX
- ANDQ DX,R9
- MOVQ CX,AX
- SHRQ $51,CX
- ADDQ R14,CX
- ANDQ DX,AX
- MOVQ CX,R10
- SHRQ $51,CX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,120(SP)
- MOVQ R8,128(SP)
- MOVQ R9,136(SP)
- MOVQ AX,144(SP)
- MOVQ R10,152(SP)
- MOVQ SI,SI
- MOVQ R8,DX
- MOVQ R9,CX
- MOVQ AX,R8
- MOVQ R10,R9
- ADDQ ·_2P0(SB),SI
- ADDQ ·_2P1234(SB),DX
- ADDQ ·_2P1234(SB),CX
- ADDQ ·_2P1234(SB),R8
- ADDQ ·_2P1234(SB),R9
- SUBQ 80(SP),SI
- SUBQ 88(SP),DX
- SUBQ 96(SP),CX
- SUBQ 104(SP),R8
- SUBQ 112(SP),R9
- MOVQ SI,160(SP)
- MOVQ DX,168(SP)
- MOVQ CX,176(SP)
- MOVQ R8,184(SP)
- MOVQ R9,192(SP)
- MOVQ 120(DI),SI
- MOVQ 128(DI),DX
- MOVQ 136(DI),CX
- MOVQ 144(DI),R8
- MOVQ 152(DI),R9
- MOVQ SI,AX
- MOVQ DX,R10
- MOVQ CX,R11
- MOVQ R8,R12
- MOVQ R9,R13
- ADDQ ·_2P0(SB),AX
- ADDQ ·_2P1234(SB),R10
- ADDQ ·_2P1234(SB),R11
- ADDQ ·_2P1234(SB),R12
- ADDQ ·_2P1234(SB),R13
- ADDQ 160(DI),SI
- ADDQ 168(DI),DX
- ADDQ 176(DI),CX
- ADDQ 184(DI),R8
- ADDQ 192(DI),R9
- SUBQ 160(DI),AX
- SUBQ 168(DI),R10
- SUBQ 176(DI),R11
- SUBQ 184(DI),R12
- SUBQ 192(DI),R13
- MOVQ SI,200(SP)
- MOVQ DX,208(SP)
- MOVQ CX,216(SP)
- MOVQ R8,224(SP)
- MOVQ R9,232(SP)
- MOVQ AX,240(SP)
- MOVQ R10,248(SP)
- MOVQ R11,256(SP)
- MOVQ R12,264(SP)
- MOVQ R13,272(SP)
- MOVQ 224(SP),SI
- IMUL3Q $19,SI,AX
- MOVQ AX,280(SP)
- MULQ 56(SP)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 232(SP),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,288(SP)
- MULQ 48(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 200(SP),AX
- MULQ 40(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 200(SP),AX
- MULQ 48(SP)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 200(SP),AX
- MULQ 56(SP)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 200(SP),AX
- MULQ 64(SP)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 200(SP),AX
- MULQ 72(SP)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 208(SP),AX
- MULQ 40(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 208(SP),AX
- MULQ 48(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 208(SP),AX
- MULQ 56(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 208(SP),AX
- MULQ 64(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 208(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 72(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 216(SP),AX
- MULQ 40(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 216(SP),AX
- MULQ 48(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 216(SP),AX
- MULQ 56(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 216(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 64(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 216(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 72(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 224(SP),AX
- MULQ 40(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 224(SP),AX
- MULQ 48(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 280(SP),AX
- MULQ 64(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 280(SP),AX
- MULQ 72(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 232(SP),AX
- MULQ 40(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 288(SP),AX
- MULQ 56(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 288(SP),AX
- MULQ 64(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 288(SP),AX
- MULQ 72(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,SI,CX
- ANDQ DX,SI
- SHLQ $13,R8,R9
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R10,R11
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R12,R13
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R14,R15
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- MOVQ CX,R8
- SHRQ $51,CX
- ANDQ DX,SI
- ADDQ R10,CX
- MOVQ CX,R9
- SHRQ $51,CX
- ANDQ DX,R8
- ADDQ R12,CX
- MOVQ CX,AX
- SHRQ $51,CX
- ANDQ DX,R9
- ADDQ R14,CX
- MOVQ CX,R10
- SHRQ $51,CX
- ANDQ DX,AX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,40(SP)
- MOVQ R8,48(SP)
- MOVQ R9,56(SP)
- MOVQ AX,64(SP)
- MOVQ R10,72(SP)
- MOVQ 264(SP),SI
- IMUL3Q $19,SI,AX
- MOVQ AX,200(SP)
- MULQ 16(SP)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 272(SP),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,208(SP)
- MULQ 8(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 240(SP),AX
- MULQ 0(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 240(SP),AX
- MULQ 8(SP)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 240(SP),AX
- MULQ 16(SP)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 240(SP),AX
- MULQ 24(SP)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 240(SP),AX
- MULQ 32(SP)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 248(SP),AX
- MULQ 0(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 248(SP),AX
- MULQ 8(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 248(SP),AX
- MULQ 16(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 248(SP),AX
- MULQ 24(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 248(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 32(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 256(SP),AX
- MULQ 0(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 256(SP),AX
- MULQ 8(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 256(SP),AX
- MULQ 16(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 256(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 24(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 256(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 32(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 264(SP),AX
- MULQ 0(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 264(SP),AX
- MULQ 8(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 200(SP),AX
- MULQ 24(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 200(SP),AX
- MULQ 32(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 272(SP),AX
- MULQ 0(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 208(SP),AX
- MULQ 16(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 208(SP),AX
- MULQ 24(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 208(SP),AX
- MULQ 32(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,SI,CX
- ANDQ DX,SI
- SHLQ $13,R8,R9
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R10,R11
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R12,R13
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R14,R15
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- MOVQ CX,R8
- SHRQ $51,CX
- ANDQ DX,SI
- ADDQ R10,CX
- MOVQ CX,R9
- SHRQ $51,CX
- ANDQ DX,R8
- ADDQ R12,CX
- MOVQ CX,AX
- SHRQ $51,CX
- ANDQ DX,R9
- ADDQ R14,CX
- MOVQ CX,R10
- SHRQ $51,CX
- ANDQ DX,AX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,DX
- MOVQ R8,CX
- MOVQ R9,R11
- MOVQ AX,R12
- MOVQ R10,R13
- ADDQ ·_2P0(SB),DX
- ADDQ ·_2P1234(SB),CX
- ADDQ ·_2P1234(SB),R11
- ADDQ ·_2P1234(SB),R12
- ADDQ ·_2P1234(SB),R13
- ADDQ 40(SP),SI
- ADDQ 48(SP),R8
- ADDQ 56(SP),R9
- ADDQ 64(SP),AX
- ADDQ 72(SP),R10
- SUBQ 40(SP),DX
- SUBQ 48(SP),CX
- SUBQ 56(SP),R11
- SUBQ 64(SP),R12
- SUBQ 72(SP),R13
- MOVQ SI,120(DI)
- MOVQ R8,128(DI)
- MOVQ R9,136(DI)
- MOVQ AX,144(DI)
- MOVQ R10,152(DI)
- MOVQ DX,160(DI)
- MOVQ CX,168(DI)
- MOVQ R11,176(DI)
- MOVQ R12,184(DI)
- MOVQ R13,192(DI)
- MOVQ 120(DI),AX
- MULQ 120(DI)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 120(DI),AX
- SHLQ $1,AX
- MULQ 128(DI)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 120(DI),AX
- SHLQ $1,AX
- MULQ 136(DI)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 120(DI),AX
- SHLQ $1,AX
- MULQ 144(DI)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 120(DI),AX
- SHLQ $1,AX
- MULQ 152(DI)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 128(DI),AX
- MULQ 128(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 128(DI),AX
- SHLQ $1,AX
- MULQ 136(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 128(DI),AX
- SHLQ $1,AX
- MULQ 144(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 128(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 152(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 136(DI),AX
- MULQ 136(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 136(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 144(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 136(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 152(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 144(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 144(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 144(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 152(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 152(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 152(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,SI,CX
- ANDQ DX,SI
- SHLQ $13,R8,R9
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R10,R11
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R12,R13
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R14,R15
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- ANDQ DX,SI
- MOVQ CX,R8
- SHRQ $51,CX
- ADDQ R10,CX
- ANDQ DX,R8
- MOVQ CX,R9
- SHRQ $51,CX
- ADDQ R12,CX
- ANDQ DX,R9
- MOVQ CX,AX
- SHRQ $51,CX
- ADDQ R14,CX
- ANDQ DX,AX
- MOVQ CX,R10
- SHRQ $51,CX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,120(DI)
- MOVQ R8,128(DI)
- MOVQ R9,136(DI)
- MOVQ AX,144(DI)
- MOVQ R10,152(DI)
- MOVQ 160(DI),AX
- MULQ 160(DI)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 160(DI),AX
- SHLQ $1,AX
- MULQ 168(DI)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 160(DI),AX
- SHLQ $1,AX
- MULQ 176(DI)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 160(DI),AX
- SHLQ $1,AX
- MULQ 184(DI)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 160(DI),AX
- SHLQ $1,AX
- MULQ 192(DI)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 168(DI),AX
- MULQ 168(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 168(DI),AX
- SHLQ $1,AX
- MULQ 176(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 168(DI),AX
- SHLQ $1,AX
- MULQ 184(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 168(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 192(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 176(DI),AX
- MULQ 176(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 176(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 184(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 176(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 192(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 184(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 184(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 184(DI),DX
- IMUL3Q $38,DX,AX
- MULQ 192(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 192(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 192(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,SI,CX
- ANDQ DX,SI
- SHLQ $13,R8,R9
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R10,R11
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R12,R13
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R14,R15
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- ANDQ DX,SI
- MOVQ CX,R8
- SHRQ $51,CX
- ADDQ R10,CX
- ANDQ DX,R8
- MOVQ CX,R9
- SHRQ $51,CX
- ADDQ R12,CX
- ANDQ DX,R9
- MOVQ CX,AX
- SHRQ $51,CX
- ADDQ R14,CX
- ANDQ DX,AX
- MOVQ CX,R10
- SHRQ $51,CX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,160(DI)
- MOVQ R8,168(DI)
- MOVQ R9,176(DI)
- MOVQ AX,184(DI)
- MOVQ R10,192(DI)
- MOVQ 184(DI),SI
- IMUL3Q $19,SI,AX
- MOVQ AX,0(SP)
- MULQ 16(DI)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 192(DI),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,8(SP)
- MULQ 8(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 160(DI),AX
- MULQ 0(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 160(DI),AX
- MULQ 8(DI)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 160(DI),AX
- MULQ 16(DI)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 160(DI),AX
- MULQ 24(DI)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 160(DI),AX
- MULQ 32(DI)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 168(DI),AX
- MULQ 0(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 168(DI),AX
- MULQ 8(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 168(DI),AX
- MULQ 16(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 168(DI),AX
- MULQ 24(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 168(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 32(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 176(DI),AX
- MULQ 0(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 176(DI),AX
- MULQ 8(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 176(DI),AX
- MULQ 16(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 176(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 24(DI)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 176(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 32(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 184(DI),AX
- MULQ 0(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 184(DI),AX
- MULQ 8(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 0(SP),AX
- MULQ 24(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 0(SP),AX
- MULQ 32(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 192(DI),AX
- MULQ 0(DI)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 8(SP),AX
- MULQ 16(DI)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 8(SP),AX
- MULQ 24(DI)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 8(SP),AX
- MULQ 32(DI)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,SI,CX
- ANDQ DX,SI
- SHLQ $13,R8,R9
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R10,R11
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R12,R13
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R14,R15
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- MOVQ CX,R8
- SHRQ $51,CX
- ANDQ DX,SI
- ADDQ R10,CX
- MOVQ CX,R9
- SHRQ $51,CX
- ANDQ DX,R8
- ADDQ R12,CX
- MOVQ CX,AX
- SHRQ $51,CX
- ANDQ DX,R9
- ADDQ R14,CX
- MOVQ CX,R10
- SHRQ $51,CX
- ANDQ DX,AX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,160(DI)
- MOVQ R8,168(DI)
- MOVQ R9,176(DI)
- MOVQ AX,184(DI)
- MOVQ R10,192(DI)
- MOVQ 144(SP),SI
- IMUL3Q $19,SI,AX
- MOVQ AX,0(SP)
- MULQ 96(SP)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 152(SP),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,8(SP)
- MULQ 88(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 120(SP),AX
- MULQ 80(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 120(SP),AX
- MULQ 88(SP)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 120(SP),AX
- MULQ 96(SP)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 120(SP),AX
- MULQ 104(SP)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 120(SP),AX
- MULQ 112(SP)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 128(SP),AX
- MULQ 80(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 128(SP),AX
- MULQ 88(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 128(SP),AX
- MULQ 96(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 128(SP),AX
- MULQ 104(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 128(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 112(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 136(SP),AX
- MULQ 80(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 136(SP),AX
- MULQ 88(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 136(SP),AX
- MULQ 96(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 136(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 104(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 136(SP),DX
- IMUL3Q $19,DX,AX
- MULQ 112(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 144(SP),AX
- MULQ 80(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 144(SP),AX
- MULQ 88(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 0(SP),AX
- MULQ 104(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 0(SP),AX
- MULQ 112(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 152(SP),AX
- MULQ 80(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 8(SP),AX
- MULQ 96(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 8(SP),AX
- MULQ 104(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 8(SP),AX
- MULQ 112(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,SI,CX
- ANDQ DX,SI
- SHLQ $13,R8,R9
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R10,R11
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R12,R13
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R14,R15
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- MOVQ CX,R8
- SHRQ $51,CX
- ANDQ DX,SI
- ADDQ R10,CX
- MOVQ CX,R9
- SHRQ $51,CX
- ANDQ DX,R8
- ADDQ R12,CX
- MOVQ CX,AX
- SHRQ $51,CX
- ANDQ DX,R9
- ADDQ R14,CX
- MOVQ CX,R10
- SHRQ $51,CX
- ANDQ DX,AX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,40(DI)
- MOVQ R8,48(DI)
- MOVQ R9,56(DI)
- MOVQ AX,64(DI)
- MOVQ R10,72(DI)
- MOVQ 160(SP),AX
- MULQ ·_121666_213(SB)
- SHRQ $13,AX
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 168(SP),AX
- MULQ ·_121666_213(SB)
- SHRQ $13,AX
- ADDQ AX,CX
- MOVQ DX,R8
- MOVQ 176(SP),AX
- MULQ ·_121666_213(SB)
- SHRQ $13,AX
- ADDQ AX,R8
- MOVQ DX,R9
- MOVQ 184(SP),AX
- MULQ ·_121666_213(SB)
- SHRQ $13,AX
- ADDQ AX,R9
- MOVQ DX,R10
- MOVQ 192(SP),AX
- MULQ ·_121666_213(SB)
- SHRQ $13,AX
- ADDQ AX,R10
- IMUL3Q $19,DX,DX
- ADDQ DX,SI
- ADDQ 80(SP),SI
- ADDQ 88(SP),CX
- ADDQ 96(SP),R8
- ADDQ 104(SP),R9
- ADDQ 112(SP),R10
- MOVQ SI,80(DI)
- MOVQ CX,88(DI)
- MOVQ R8,96(DI)
- MOVQ R9,104(DI)
- MOVQ R10,112(DI)
- MOVQ 104(DI),SI
- IMUL3Q $19,SI,AX
- MOVQ AX,0(SP)
- MULQ 176(SP)
- MOVQ AX,SI
- MOVQ DX,CX
- MOVQ 112(DI),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,8(SP)
- MULQ 168(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 80(DI),AX
- MULQ 160(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 80(DI),AX
- MULQ 168(SP)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 80(DI),AX
- MULQ 176(SP)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 80(DI),AX
- MULQ 184(SP)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 80(DI),AX
- MULQ 192(SP)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 88(DI),AX
- MULQ 160(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 88(DI),AX
- MULQ 168(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 88(DI),AX
- MULQ 176(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 88(DI),AX
- MULQ 184(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 88(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 192(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 96(DI),AX
- MULQ 160(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 96(DI),AX
- MULQ 168(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 96(DI),AX
- MULQ 176(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 96(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 184(SP)
- ADDQ AX,SI
- ADCQ DX,CX
- MOVQ 96(DI),DX
- IMUL3Q $19,DX,AX
- MULQ 192(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 104(DI),AX
- MULQ 160(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 104(DI),AX
- MULQ 168(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 0(SP),AX
- MULQ 184(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 0(SP),AX
- MULQ 192(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 112(DI),AX
- MULQ 160(SP)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 8(SP),AX
- MULQ 176(SP)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 8(SP),AX
- MULQ 184(SP)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 8(SP),AX
- MULQ 192(SP)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ $REDMASK51,DX
- SHLQ $13,SI,CX
- ANDQ DX,SI
- SHLQ $13,R8,R9
- ANDQ DX,R8
- ADDQ CX,R8
- SHLQ $13,R10,R11
- ANDQ DX,R10
- ADDQ R9,R10
- SHLQ $13,R12,R13
- ANDQ DX,R12
- ADDQ R11,R12
- SHLQ $13,R14,R15
- ANDQ DX,R14
- ADDQ R13,R14
- IMUL3Q $19,R15,CX
- ADDQ CX,SI
- MOVQ SI,CX
- SHRQ $51,CX
- ADDQ R8,CX
- MOVQ CX,R8
- SHRQ $51,CX
- ANDQ DX,SI
- ADDQ R10,CX
- MOVQ CX,R9
- SHRQ $51,CX
- ANDQ DX,R8
- ADDQ R12,CX
- MOVQ CX,AX
- SHRQ $51,CX
- ANDQ DX,R9
- ADDQ R14,CX
- MOVQ CX,R10
- SHRQ $51,CX
- ANDQ DX,AX
- IMUL3Q $19,CX,CX
- ADDQ CX,SI
- ANDQ DX,R10
- MOVQ SI,80(DI)
- MOVQ R8,88(DI)
- MOVQ R9,96(DI)
- MOVQ AX,104(DI)
- MOVQ R10,112(DI)
- RET
diff --git a/vendor/golang.org/x/crypto/curve25519/mont25519_amd64.go b/vendor/golang.org/x/crypto/curve25519/mont25519_amd64.go
deleted file mode 100644
index 5822bd5..0000000
--- a/vendor/golang.org/x/crypto/curve25519/mont25519_amd64.go
+++ /dev/null
@@ -1,240 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,!gccgo,!appengine
-
-package curve25519
-
-// These functions are implemented in the .s files. The names of the functions
-// in the rest of the file are also taken from the SUPERCOP sources to help
-// people following along.
-
-//go:noescape
-
-func cswap(inout *[5]uint64, v uint64)
-
-//go:noescape
-
-func ladderstep(inout *[5][5]uint64)
-
-//go:noescape
-
-func freeze(inout *[5]uint64)
-
-//go:noescape
-
-func mul(dest, a, b *[5]uint64)
-
-//go:noescape
-
-func square(out, in *[5]uint64)
-
-// mladder uses a Montgomery ladder to calculate (xr/zr) *= s.
-func mladder(xr, zr *[5]uint64, s *[32]byte) {
- var work [5][5]uint64
-
- work[0] = *xr
- setint(&work[1], 1)
- setint(&work[2], 0)
- work[3] = *xr
- setint(&work[4], 1)
-
- j := uint(6)
- var prevbit byte
-
- for i := 31; i >= 0; i-- {
- for j < 8 {
- bit := ((*s)[i] >> j) & 1
- swap := bit ^ prevbit
- prevbit = bit
- cswap(&work[1], uint64(swap))
- ladderstep(&work)
- j--
- }
- j = 7
- }
-
- *xr = work[1]
- *zr = work[2]
-}
-
-func scalarMult(out, in, base *[32]byte) {
- var e [32]byte
- copy(e[:], (*in)[:])
- e[0] &= 248
- e[31] &= 127
- e[31] |= 64
-
- var t, z [5]uint64
- unpack(&t, base)
- mladder(&t, &z, &e)
- invert(&z, &z)
- mul(&t, &t, &z)
- pack(out, &t)
-}
-
-func setint(r *[5]uint64, v uint64) {
- r[0] = v
- r[1] = 0
- r[2] = 0
- r[3] = 0
- r[4] = 0
-}
-
-// unpack sets r = x where r consists of 5, 51-bit limbs in little-endian
-// order.
-func unpack(r *[5]uint64, x *[32]byte) {
- r[0] = uint64(x[0]) |
- uint64(x[1])<<8 |
- uint64(x[2])<<16 |
- uint64(x[3])<<24 |
- uint64(x[4])<<32 |
- uint64(x[5])<<40 |
- uint64(x[6]&7)<<48
-
- r[1] = uint64(x[6])>>3 |
- uint64(x[7])<<5 |
- uint64(x[8])<<13 |
- uint64(x[9])<<21 |
- uint64(x[10])<<29 |
- uint64(x[11])<<37 |
- uint64(x[12]&63)<<45
-
- r[2] = uint64(x[12])>>6 |
- uint64(x[13])<<2 |
- uint64(x[14])<<10 |
- uint64(x[15])<<18 |
- uint64(x[16])<<26 |
- uint64(x[17])<<34 |
- uint64(x[18])<<42 |
- uint64(x[19]&1)<<50
-
- r[3] = uint64(x[19])>>1 |
- uint64(x[20])<<7 |
- uint64(x[21])<<15 |
- uint64(x[22])<<23 |
- uint64(x[23])<<31 |
- uint64(x[24])<<39 |
- uint64(x[25]&15)<<47
-
- r[4] = uint64(x[25])>>4 |
- uint64(x[26])<<4 |
- uint64(x[27])<<12 |
- uint64(x[28])<<20 |
- uint64(x[29])<<28 |
- uint64(x[30])<<36 |
- uint64(x[31]&127)<<44
-}
-
-// pack sets out = x where out is the usual, little-endian form of the 5,
-// 51-bit limbs in x.
-func pack(out *[32]byte, x *[5]uint64) {
- t := *x
- freeze(&t)
-
- out[0] = byte(t[0])
- out[1] = byte(t[0] >> 8)
- out[2] = byte(t[0] >> 16)
- out[3] = byte(t[0] >> 24)
- out[4] = byte(t[0] >> 32)
- out[5] = byte(t[0] >> 40)
- out[6] = byte(t[0] >> 48)
-
- out[6] ^= byte(t[1]<<3) & 0xf8
- out[7] = byte(t[1] >> 5)
- out[8] = byte(t[1] >> 13)
- out[9] = byte(t[1] >> 21)
- out[10] = byte(t[1] >> 29)
- out[11] = byte(t[1] >> 37)
- out[12] = byte(t[1] >> 45)
-
- out[12] ^= byte(t[2]<<6) & 0xc0
- out[13] = byte(t[2] >> 2)
- out[14] = byte(t[2] >> 10)
- out[15] = byte(t[2] >> 18)
- out[16] = byte(t[2] >> 26)
- out[17] = byte(t[2] >> 34)
- out[18] = byte(t[2] >> 42)
- out[19] = byte(t[2] >> 50)
-
- out[19] ^= byte(t[3]<<1) & 0xfe
- out[20] = byte(t[3] >> 7)
- out[21] = byte(t[3] >> 15)
- out[22] = byte(t[3] >> 23)
- out[23] = byte(t[3] >> 31)
- out[24] = byte(t[3] >> 39)
- out[25] = byte(t[3] >> 47)
-
- out[25] ^= byte(t[4]<<4) & 0xf0
- out[26] = byte(t[4] >> 4)
- out[27] = byte(t[4] >> 12)
- out[28] = byte(t[4] >> 20)
- out[29] = byte(t[4] >> 28)
- out[30] = byte(t[4] >> 36)
- out[31] = byte(t[4] >> 44)
-}
-
-// invert calculates r = x^-1 mod p using Fermat's little theorem.
-func invert(r *[5]uint64, x *[5]uint64) {
- var z2, z9, z11, z2_5_0, z2_10_0, z2_20_0, z2_50_0, z2_100_0, t [5]uint64
-
- square(&z2, x) /* 2 */
- square(&t, &z2) /* 4 */
- square(&t, &t) /* 8 */
- mul(&z9, &t, x) /* 9 */
- mul(&z11, &z9, &z2) /* 11 */
- square(&t, &z11) /* 22 */
- mul(&z2_5_0, &t, &z9) /* 2^5 - 2^0 = 31 */
-
- square(&t, &z2_5_0) /* 2^6 - 2^1 */
- for i := 1; i < 5; i++ { /* 2^20 - 2^10 */
- square(&t, &t)
- }
- mul(&z2_10_0, &t, &z2_5_0) /* 2^10 - 2^0 */
-
- square(&t, &z2_10_0) /* 2^11 - 2^1 */
- for i := 1; i < 10; i++ { /* 2^20 - 2^10 */
- square(&t, &t)
- }
- mul(&z2_20_0, &t, &z2_10_0) /* 2^20 - 2^0 */
-
- square(&t, &z2_20_0) /* 2^21 - 2^1 */
- for i := 1; i < 20; i++ { /* 2^40 - 2^20 */
- square(&t, &t)
- }
- mul(&t, &t, &z2_20_0) /* 2^40 - 2^0 */
-
- square(&t, &t) /* 2^41 - 2^1 */
- for i := 1; i < 10; i++ { /* 2^50 - 2^10 */
- square(&t, &t)
- }
- mul(&z2_50_0, &t, &z2_10_0) /* 2^50 - 2^0 */
-
- square(&t, &z2_50_0) /* 2^51 - 2^1 */
- for i := 1; i < 50; i++ { /* 2^100 - 2^50 */
- square(&t, &t)
- }
- mul(&z2_100_0, &t, &z2_50_0) /* 2^100 - 2^0 */
-
- square(&t, &z2_100_0) /* 2^101 - 2^1 */
- for i := 1; i < 100; i++ { /* 2^200 - 2^100 */
- square(&t, &t)
- }
- mul(&t, &t, &z2_100_0) /* 2^200 - 2^0 */
-
- square(&t, &t) /* 2^201 - 2^1 */
- for i := 1; i < 50; i++ { /* 2^250 - 2^50 */
- square(&t, &t)
- }
- mul(&t, &t, &z2_50_0) /* 2^250 - 2^0 */
-
- square(&t, &t) /* 2^251 - 2^1 */
- square(&t, &t) /* 2^252 - 2^2 */
- square(&t, &t) /* 2^253 - 2^3 */
-
- square(&t, &t) /* 2^254 - 2^4 */
-
- square(&t, &t) /* 2^255 - 2^5 */
- mul(r, &t, &z11) /* 2^255 - 21 */
-}
diff --git a/vendor/golang.org/x/crypto/curve25519/mul_amd64.s b/vendor/golang.org/x/crypto/curve25519/mul_amd64.s
deleted file mode 100644
index 1f76d1a..0000000
--- a/vendor/golang.org/x/crypto/curve25519/mul_amd64.s
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
-
-// +build amd64,!gccgo,!appengine
-
-#include "const_amd64.h"
-
-// func mul(dest, a, b *[5]uint64)
-TEXT ·mul(SB),0,$16-24
- MOVQ dest+0(FP), DI
- MOVQ a+8(FP), SI
- MOVQ b+16(FP), DX
-
- MOVQ DX,CX
- MOVQ 24(SI),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,0(SP)
- MULQ 16(CX)
- MOVQ AX,R8
- MOVQ DX,R9
- MOVQ 32(SI),DX
- IMUL3Q $19,DX,AX
- MOVQ AX,8(SP)
- MULQ 8(CX)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 0(SI),AX
- MULQ 0(CX)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 0(SI),AX
- MULQ 8(CX)
- MOVQ AX,R10
- MOVQ DX,R11
- MOVQ 0(SI),AX
- MULQ 16(CX)
- MOVQ AX,R12
- MOVQ DX,R13
- MOVQ 0(SI),AX
- MULQ 24(CX)
- MOVQ AX,R14
- MOVQ DX,R15
- MOVQ 0(SI),AX
- MULQ 32(CX)
- MOVQ AX,BX
- MOVQ DX,BP
- MOVQ 8(SI),AX
- MULQ 0(CX)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 8(SI),AX
- MULQ 8(CX)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 8(SI),AX
- MULQ 16(CX)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 8(SI),AX
- MULQ 24(CX)
- ADDQ AX,BX
- ADCQ DX,BP
- MOVQ 8(SI),DX
- IMUL3Q $19,DX,AX
- MULQ 32(CX)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 16(SI),AX
- MULQ 0(CX)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 16(SI),AX
- MULQ 8(CX)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 16(SI),AX
- MULQ 16(CX)
- ADDQ AX,BX
- ADCQ DX,BP
- MOVQ 16(SI),DX
- IMUL3Q $19,DX,AX
- MULQ 24(CX)
- ADDQ AX,R8
- ADCQ DX,R9
- MOVQ 16(SI),DX
- IMUL3Q $19,DX,AX
- MULQ 32(CX)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 24(SI),AX
- MULQ 0(CX)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ 24(SI),AX
- MULQ 8(CX)
- ADDQ AX,BX
- ADCQ DX,BP
- MOVQ 0(SP),AX
- MULQ 24(CX)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 0(SP),AX
- MULQ 32(CX)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 32(SI),AX
- MULQ 0(CX)
- ADDQ AX,BX
- ADCQ DX,BP
- MOVQ 8(SP),AX
- MULQ 16(CX)
- ADDQ AX,R10
- ADCQ DX,R11
- MOVQ 8(SP),AX
- MULQ 24(CX)
- ADDQ AX,R12
- ADCQ DX,R13
- MOVQ 8(SP),AX
- MULQ 32(CX)
- ADDQ AX,R14
- ADCQ DX,R15
- MOVQ $REDMASK51,SI
- SHLQ $13,R8,R9
- ANDQ SI,R8
- SHLQ $13,R10,R11
- ANDQ SI,R10
- ADDQ R9,R10
- SHLQ $13,R12,R13
- ANDQ SI,R12
- ADDQ R11,R12
- SHLQ $13,R14,R15
- ANDQ SI,R14
- ADDQ R13,R14
- SHLQ $13,BX,BP
- ANDQ SI,BX
- ADDQ R15,BX
- IMUL3Q $19,BP,DX
- ADDQ DX,R8
- MOVQ R8,DX
- SHRQ $51,DX
- ADDQ R10,DX
- MOVQ DX,CX
- SHRQ $51,DX
- ANDQ SI,R8
- ADDQ R12,DX
- MOVQ DX,R9
- SHRQ $51,DX
- ANDQ SI,CX
- ADDQ R14,DX
- MOVQ DX,AX
- SHRQ $51,DX
- ANDQ SI,R9
- ADDQ BX,DX
- MOVQ DX,R10
- SHRQ $51,DX
- ANDQ SI,AX
- IMUL3Q $19,DX,DX
- ADDQ DX,R8
- ANDQ SI,R10
- MOVQ R8,0(DI)
- MOVQ CX,8(DI)
- MOVQ R9,16(DI)
- MOVQ AX,24(DI)
- MOVQ R10,32(DI)
- RET
diff --git a/vendor/golang.org/x/crypto/curve25519/square_amd64.s b/vendor/golang.org/x/crypto/curve25519/square_amd64.s
deleted file mode 100644
index 07511a4..0000000
--- a/vendor/golang.org/x/crypto/curve25519/square_amd64.s
+++ /dev/null
@@ -1,132 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This code was translated into a form compatible with 6a from the public
-// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
-
-// +build amd64,!gccgo,!appengine
-
-#include "const_amd64.h"
-
-// func square(out, in *[5]uint64)
-TEXT ·square(SB),7,$0-16
- MOVQ out+0(FP), DI
- MOVQ in+8(FP), SI
-
- MOVQ 0(SI),AX
- MULQ 0(SI)
- MOVQ AX,CX
- MOVQ DX,R8
- MOVQ 0(SI),AX
- SHLQ $1,AX
- MULQ 8(SI)
- MOVQ AX,R9
- MOVQ DX,R10
- MOVQ 0(SI),AX
- SHLQ $1,AX
- MULQ 16(SI)
- MOVQ AX,R11
- MOVQ DX,R12
- MOVQ 0(SI),AX
- SHLQ $1,AX
- MULQ 24(SI)
- MOVQ AX,R13
- MOVQ DX,R14
- MOVQ 0(SI),AX
- SHLQ $1,AX
- MULQ 32(SI)
- MOVQ AX,R15
- MOVQ DX,BX
- MOVQ 8(SI),AX
- MULQ 8(SI)
- ADDQ AX,R11
- ADCQ DX,R12
- MOVQ 8(SI),AX
- SHLQ $1,AX
- MULQ 16(SI)
- ADDQ AX,R13
- ADCQ DX,R14
- MOVQ 8(SI),AX
- SHLQ $1,AX
- MULQ 24(SI)
- ADDQ AX,R15
- ADCQ DX,BX
- MOVQ 8(SI),DX
- IMUL3Q $38,DX,AX
- MULQ 32(SI)
- ADDQ AX,CX
- ADCQ DX,R8
- MOVQ 16(SI),AX
- MULQ 16(SI)
- ADDQ AX,R15
- ADCQ DX,BX
- MOVQ 16(SI),DX
- IMUL3Q $38,DX,AX
- MULQ 24(SI)
- ADDQ AX,CX
- ADCQ DX,R8
- MOVQ 16(SI),DX
- IMUL3Q $38,DX,AX
- MULQ 32(SI)
- ADDQ AX,R9
- ADCQ DX,R10
- MOVQ 24(SI),DX
- IMUL3Q $19,DX,AX
- MULQ 24(SI)
- ADDQ AX,R9
- ADCQ DX,R10
- MOVQ 24(SI),DX
- IMUL3Q $38,DX,AX
- MULQ 32(SI)
- ADDQ AX,R11
- ADCQ DX,R12
- MOVQ 32(SI),DX
- IMUL3Q $19,DX,AX
- MULQ 32(SI)
- ADDQ AX,R13
- ADCQ DX,R14
- MOVQ $REDMASK51,SI
- SHLQ $13,CX,R8
- ANDQ SI,CX
- SHLQ $13,R9,R10
- ANDQ SI,R9
- ADDQ R8,R9
- SHLQ $13,R11,R12
- ANDQ SI,R11
- ADDQ R10,R11
- SHLQ $13,R13,R14
- ANDQ SI,R13
- ADDQ R12,R13
- SHLQ $13,R15,BX
- ANDQ SI,R15
- ADDQ R14,R15
- IMUL3Q $19,BX,DX
- ADDQ DX,CX
- MOVQ CX,DX
- SHRQ $51,DX
- ADDQ R9,DX
- ANDQ SI,CX
- MOVQ DX,R8
- SHRQ $51,DX
- ADDQ R11,DX
- ANDQ SI,R8
- MOVQ DX,R9
- SHRQ $51,DX
- ADDQ R13,DX
- ANDQ SI,R9
- MOVQ DX,AX
- SHRQ $51,DX
- ADDQ R15,DX
- ANDQ SI,AX
- MOVQ DX,R10
- SHRQ $51,DX
- IMUL3Q $19,DX,DX
- ADDQ DX,CX
- ANDQ SI,R10
- MOVQ CX,0(DI)
- MOVQ R8,8(DI)
- MOVQ R9,16(DI)
- MOVQ AX,24(DI)
- MOVQ R10,32(DI)
- RET
diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519.go b/vendor/golang.org/x/crypto/ed25519/ed25519.go
new file mode 100644
index 0000000..71ad917
--- /dev/null
+++ b/vendor/golang.org/x/crypto/ed25519/ed25519.go
@@ -0,0 +1,223 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// In Go 1.13, the ed25519 package was promoted to the standard library as
+// crypto/ed25519, and this package became a wrapper for the standard library one.
+//
+//go:build !go1.13
+// +build !go1.13
+
+// Package ed25519 implements the Ed25519 signature algorithm. See
+// https://ed25519.cr.yp.to/.
+//
+// These functions are also compatible with the “Ed25519” function defined in
+// RFC 8032. However, unlike RFC 8032's formulation, this package's private key
+// representation includes a public key suffix to make multiple signing
+// operations with the same key more efficient. This package refers to the RFC
+// 8032 private key as the “seed”.
+package ed25519
+
+// This code is a port of the public domain, “ref10” implementation of ed25519
+// from SUPERCOP.
+
+import (
+ "bytes"
+ "crypto"
+ cryptorand "crypto/rand"
+ "crypto/sha512"
+ "errors"
+ "io"
+ "strconv"
+
+ "golang.org/x/crypto/ed25519/internal/edwards25519"
+)
+
+const (
+ // PublicKeySize is the size, in bytes, of public keys as used in this package.
+ PublicKeySize = 32
+ // PrivateKeySize is the size, in bytes, of private keys as used in this package.
+ PrivateKeySize = 64
+ // SignatureSize is the size, in bytes, of signatures generated and verified by this package.
+ SignatureSize = 64
+ // SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032.
+ SeedSize = 32
+)
+
+// PublicKey is the type of Ed25519 public keys.
+type PublicKey []byte
+
+// PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer.
+type PrivateKey []byte
+
+// Public returns the PublicKey corresponding to priv.
+func (priv PrivateKey) Public() crypto.PublicKey {
+ publicKey := make([]byte, PublicKeySize)
+ copy(publicKey, priv[32:])
+ return PublicKey(publicKey)
+}
+
+// Seed returns the private key seed corresponding to priv. It is provided for
+// interoperability with RFC 8032. RFC 8032's private keys correspond to seeds
+// in this package.
+func (priv PrivateKey) Seed() []byte {
+ seed := make([]byte, SeedSize)
+ copy(seed, priv[:32])
+ return seed
+}
+
+// Sign signs the given message with priv.
+// Ed25519 performs two passes over messages to be signed and therefore cannot
+// handle pre-hashed messages. Thus opts.HashFunc() must return zero to
+// indicate the message hasn't been hashed. This can be achieved by passing
+// crypto.Hash(0) as the value for opts.
+func (priv PrivateKey) Sign(rand io.Reader, message []byte, opts crypto.SignerOpts) (signature []byte, err error) {
+ if opts.HashFunc() != crypto.Hash(0) {
+ return nil, errors.New("ed25519: cannot sign hashed message")
+ }
+
+ return Sign(priv, message), nil
+}
+
+// GenerateKey generates a public/private key pair using entropy from rand.
+// If rand is nil, crypto/rand.Reader will be used.
+func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error) {
+ if rand == nil {
+ rand = cryptorand.Reader
+ }
+
+ seed := make([]byte, SeedSize)
+ if _, err := io.ReadFull(rand, seed); err != nil {
+ return nil, nil, err
+ }
+
+ privateKey := NewKeyFromSeed(seed)
+ publicKey := make([]byte, PublicKeySize)
+ copy(publicKey, privateKey[32:])
+
+ return publicKey, privateKey, nil
+}
+
+// NewKeyFromSeed calculates a private key from a seed. It will panic if
+// len(seed) is not SeedSize. This function is provided for interoperability
+// with RFC 8032. RFC 8032's private keys correspond to seeds in this
+// package.
+func NewKeyFromSeed(seed []byte) PrivateKey {
+ if l := len(seed); l != SeedSize {
+ panic("ed25519: bad seed length: " + strconv.Itoa(l))
+ }
+
+ digest := sha512.Sum512(seed)
+ digest[0] &= 248
+ digest[31] &= 127
+ digest[31] |= 64
+
+ var A edwards25519.ExtendedGroupElement
+ var hBytes [32]byte
+ copy(hBytes[:], digest[:])
+ edwards25519.GeScalarMultBase(&A, &hBytes)
+ var publicKeyBytes [32]byte
+ A.ToBytes(&publicKeyBytes)
+
+ privateKey := make([]byte, PrivateKeySize)
+ copy(privateKey, seed)
+ copy(privateKey[32:], publicKeyBytes[:])
+
+ return privateKey
+}
+
+// Sign signs the message with privateKey and returns a signature. It will
+// panic if len(privateKey) is not PrivateKeySize.
+func Sign(privateKey PrivateKey, message []byte) []byte {
+ if l := len(privateKey); l != PrivateKeySize {
+ panic("ed25519: bad private key length: " + strconv.Itoa(l))
+ }
+
+ h := sha512.New()
+ h.Write(privateKey[:32])
+
+ var digest1, messageDigest, hramDigest [64]byte
+ var expandedSecretKey [32]byte
+ h.Sum(digest1[:0])
+ copy(expandedSecretKey[:], digest1[:])
+ expandedSecretKey[0] &= 248
+ expandedSecretKey[31] &= 63
+ expandedSecretKey[31] |= 64
+
+ h.Reset()
+ h.Write(digest1[32:])
+ h.Write(message)
+ h.Sum(messageDigest[:0])
+
+ var messageDigestReduced [32]byte
+ edwards25519.ScReduce(&messageDigestReduced, &messageDigest)
+ var R edwards25519.ExtendedGroupElement
+ edwards25519.GeScalarMultBase(&R, &messageDigestReduced)
+
+ var encodedR [32]byte
+ R.ToBytes(&encodedR)
+
+ h.Reset()
+ h.Write(encodedR[:])
+ h.Write(privateKey[32:])
+ h.Write(message)
+ h.Sum(hramDigest[:0])
+ var hramDigestReduced [32]byte
+ edwards25519.ScReduce(&hramDigestReduced, &hramDigest)
+
+ var s [32]byte
+ edwards25519.ScMulAdd(&s, &hramDigestReduced, &expandedSecretKey, &messageDigestReduced)
+
+ signature := make([]byte, SignatureSize)
+ copy(signature[:], encodedR[:])
+ copy(signature[32:], s[:])
+
+ return signature
+}
+
+// Verify reports whether sig is a valid signature of message by publicKey. It
+// will panic if len(publicKey) is not PublicKeySize.
+func Verify(publicKey PublicKey, message, sig []byte) bool {
+ if l := len(publicKey); l != PublicKeySize {
+ panic("ed25519: bad public key length: " + strconv.Itoa(l))
+ }
+
+ if len(sig) != SignatureSize || sig[63]&224 != 0 {
+ return false
+ }
+
+ var A edwards25519.ExtendedGroupElement
+ var publicKeyBytes [32]byte
+ copy(publicKeyBytes[:], publicKey)
+ if !A.FromBytes(&publicKeyBytes) {
+ return false
+ }
+ edwards25519.FeNeg(&A.X, &A.X)
+ edwards25519.FeNeg(&A.T, &A.T)
+
+ h := sha512.New()
+ h.Write(sig[:32])
+ h.Write(publicKey[:])
+ h.Write(message)
+ var digest [64]byte
+ h.Sum(digest[:0])
+
+ var hReduced [32]byte
+ edwards25519.ScReduce(&hReduced, &digest)
+
+ var R edwards25519.ProjectiveGroupElement
+ var s [32]byte
+ copy(s[:], sig[32:])
+
+ // https://tools.ietf.org/html/rfc8032#section-5.1.7 requires that s be in
+ // the range [0, order) in order to prevent signature malleability.
+ if !edwards25519.ScMinimal(&s) {
+ return false
+ }
+
+ edwards25519.GeDoubleScalarMultVartime(&R, &hReduced, &A, &s)
+
+ var checkR [32]byte
+ R.ToBytes(&checkR)
+ return bytes.Equal(sig[:32], checkR[:])
+}
diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519_go113.go b/vendor/golang.org/x/crypto/ed25519/ed25519_go113.go
new file mode 100644
index 0000000..b5974dc
--- /dev/null
+++ b/vendor/golang.org/x/crypto/ed25519/ed25519_go113.go
@@ -0,0 +1,74 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build go1.13
+// +build go1.13
+
+// Package ed25519 implements the Ed25519 signature algorithm. See
+// https://ed25519.cr.yp.to/.
+//
+// These functions are also compatible with the “Ed25519” function defined in
+// RFC 8032. However, unlike RFC 8032's formulation, this package's private key
+// representation includes a public key suffix to make multiple signing
+// operations with the same key more efficient. This package refers to the RFC
+// 8032 private key as the “seed”.
+//
+// Beginning with Go 1.13, the functionality of this package was moved to the
+// standard library as crypto/ed25519. This package only acts as a compatibility
+// wrapper.
+package ed25519
+
+import (
+ "crypto/ed25519"
+ "io"
+)
+
+const (
+ // PublicKeySize is the size, in bytes, of public keys as used in this package.
+ PublicKeySize = 32
+ // PrivateKeySize is the size, in bytes, of private keys as used in this package.
+ PrivateKeySize = 64
+ // SignatureSize is the size, in bytes, of signatures generated and verified by this package.
+ SignatureSize = 64
+ // SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032.
+ SeedSize = 32
+)
+
+// PublicKey is the type of Ed25519 public keys.
+//
+// This type is an alias for crypto/ed25519's PublicKey type.
+// See the crypto/ed25519 package for the methods on this type.
+type PublicKey = ed25519.PublicKey
+
+// PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer.
+//
+// This type is an alias for crypto/ed25519's PrivateKey type.
+// See the crypto/ed25519 package for the methods on this type.
+type PrivateKey = ed25519.PrivateKey
+
+// GenerateKey generates a public/private key pair using entropy from rand.
+// If rand is nil, crypto/rand.Reader will be used.
+func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error) {
+ return ed25519.GenerateKey(rand)
+}
+
+// NewKeyFromSeed calculates a private key from a seed. It will panic if
+// len(seed) is not SeedSize. This function is provided for interoperability
+// with RFC 8032. RFC 8032's private keys correspond to seeds in this
+// package.
+func NewKeyFromSeed(seed []byte) PrivateKey {
+ return ed25519.NewKeyFromSeed(seed)
+}
+
+// Sign signs the message with privateKey and returns a signature. It will
+// panic if len(privateKey) is not PrivateKeySize.
+func Sign(privateKey PrivateKey, message []byte) []byte {
+ return ed25519.Sign(privateKey, message)
+}
+
+// Verify reports whether sig is a valid signature of message by publicKey. It
+// will panic if len(publicKey) is not PublicKeySize.
+func Verify(publicKey PublicKey, message, sig []byte) bool {
+ return ed25519.Verify(publicKey, message, sig)
+}
diff --git a/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go b/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go
new file mode 100644
index 0000000..e39f086
--- /dev/null
+++ b/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go
@@ -0,0 +1,1422 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package edwards25519
+
+// These values are from the public domain, “ref10” implementation of ed25519
+// from SUPERCOP.
+
+// d is a constant in the Edwards curve equation.
+var d = FieldElement{
+ -10913610, 13857413, -15372611, 6949391, 114729, -8787816, -6275908, -3247719, -18696448, -12055116,
+}
+
+// d2 is 2*d.
+var d2 = FieldElement{
+ -21827239, -5839606, -30745221, 13898782, 229458, 15978800, -12551817, -6495438, 29715968, 9444199,
+}
+
+// SqrtM1 is the square-root of -1 in the field.
+var SqrtM1 = FieldElement{
+ -32595792, -7943725, 9377950, 3500415, 12389472, -272473, -25146209, -2005654, 326686, 11406482,
+}
+
+// A is a constant in the Montgomery-form of curve25519.
+var A = FieldElement{
+ 486662, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+}
+
+// bi contains precomputed multiples of the base-point. See the Ed25519 paper
+// for a discussion about how these values are used.
+var bi = [8]PreComputedGroupElement{
+ {
+ FieldElement{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605},
+ FieldElement{-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378},
+ FieldElement{-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546},
+ },
+ {
+ FieldElement{15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024},
+ FieldElement{16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574},
+ FieldElement{30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357},
+ },
+ {
+ FieldElement{10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380},
+ FieldElement{4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306},
+ FieldElement{19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942},
+ },
+ {
+ FieldElement{5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766},
+ FieldElement{-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701},
+ FieldElement{28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300},
+ },
+ {
+ FieldElement{-22518993, -6692182, 14201702, -8745502, -23510406, 8844726, 18474211, -1361450, -13062696, 13821877},
+ FieldElement{-6455177, -7839871, 3374702, -4740862, -27098617, -10571707, 31655028, -7212327, 18853322, -14220951},
+ FieldElement{4566830, -12963868, -28974889, -12240689, -7602672, -2830569, -8514358, -10431137, 2207753, -3209784},
+ },
+ {
+ FieldElement{-25154831, -4185821, 29681144, 7868801, -6854661, -9423865, -12437364, -663000, -31111463, -16132436},
+ FieldElement{25576264, -2703214, 7349804, -11814844, 16472782, 9300885, 3844789, 15725684, 171356, 6466918},
+ FieldElement{23103977, 13316479, 9739013, -16149481, 817875, -15038942, 8965339, -14088058, -30714912, 16193877},
+ },
+ {
+ FieldElement{-33521811, 3180713, -2394130, 14003687, -16903474, -16270840, 17238398, 4729455, -18074513, 9256800},
+ FieldElement{-25182317, -4174131, 32336398, 5036987, -21236817, 11360617, 22616405, 9761698, -19827198, 630305},
+ FieldElement{-13720693, 2639453, -24237460, -7406481, 9494427, -5774029, -6554551, -15960994, -2449256, -14291300},
+ },
+ {
+ FieldElement{-3151181, -5046075, 9282714, 6866145, -31907062, -863023, -18940575, 15033784, 25105118, -7894876},
+ FieldElement{-24326370, 15950226, -31801215, -14592823, -11662737, -5090925, 1573892, -2625887, 2198790, -15804619},
+ FieldElement{-3099351, 10324967, -2241613, 7453183, -5446979, -2735503, -13812022, -16236442, -32461234, -12290683},
+ },
+}
+
+// base contains precomputed multiples of the base-point. See the Ed25519 paper
+// for a discussion about how these values are used.
+var base = [32][8]PreComputedGroupElement{
+ {
+ {
+ FieldElement{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605},
+ FieldElement{-12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378},
+ FieldElement{-8738181, 4489570, 9688441, -14785194, 10184609, -12363380, 29287919, 11864899, -24514362, -4438546},
+ },
+ {
+ FieldElement{-12815894, -12976347, -21581243, 11784320, -25355658, -2750717, -11717903, -3814571, -358445, -10211303},
+ FieldElement{-21703237, 6903825, 27185491, 6451973, -29577724, -9554005, -15616551, 11189268, -26829678, -5319081},
+ FieldElement{26966642, 11152617, 32442495, 15396054, 14353839, -12752335, -3128826, -9541118, -15472047, -4166697},
+ },
+ {
+ FieldElement{15636291, -9688557, 24204773, -7912398, 616977, -16685262, 27787600, -14772189, 28944400, -1550024},
+ FieldElement{16568933, 4717097, -11556148, -1102322, 15682896, -11807043, 16354577, -11775962, 7689662, 11199574},
+ FieldElement{30464156, -5976125, -11779434, -15670865, 23220365, 15915852, 7512774, 10017326, -17749093, -9920357},
+ },
+ {
+ FieldElement{-17036878, 13921892, 10945806, -6033431, 27105052, -16084379, -28926210, 15006023, 3284568, -6276540},
+ FieldElement{23599295, -8306047, -11193664, -7687416, 13236774, 10506355, 7464579, 9656445, 13059162, 10374397},
+ FieldElement{7798556, 16710257, 3033922, 2874086, 28997861, 2835604, 32406664, -3839045, -641708, -101325},
+ },
+ {
+ FieldElement{10861363, 11473154, 27284546, 1981175, -30064349, 12577861, 32867885, 14515107, -15438304, 10819380},
+ FieldElement{4708026, 6336745, 20377586, 9066809, -11272109, 6594696, -25653668, 12483688, -12668491, 5581306},
+ FieldElement{19563160, 16186464, -29386857, 4097519, 10237984, -4348115, 28542350, 13850243, -23678021, -15815942},
+ },
+ {
+ FieldElement{-15371964, -12862754, 32573250, 4720197, -26436522, 5875511, -19188627, -15224819, -9818940, -12085777},
+ FieldElement{-8549212, 109983, 15149363, 2178705, 22900618, 4543417, 3044240, -15689887, 1762328, 14866737},
+ FieldElement{-18199695, -15951423, -10473290, 1707278, -17185920, 3916101, -28236412, 3959421, 27914454, 4383652},
+ },
+ {
+ FieldElement{5153746, 9909285, 1723747, -2777874, 30523605, 5516873, 19480852, 5230134, -23952439, -15175766},
+ FieldElement{-30269007, -3463509, 7665486, 10083793, 28475525, 1649722, 20654025, 16520125, 30598449, 7715701},
+ FieldElement{28881845, 14381568, 9657904, 3680757, -20181635, 7843316, -31400660, 1370708, 29794553, -1409300},
+ },
+ {
+ FieldElement{14499471, -2729599, -33191113, -4254652, 28494862, 14271267, 30290735, 10876454, -33154098, 2381726},
+ FieldElement{-7195431, -2655363, -14730155, 462251, -27724326, 3941372, -6236617, 3696005, -32300832, 15351955},
+ FieldElement{27431194, 8222322, 16448760, -3907995, -18707002, 11938355, -32961401, -2970515, 29551813, 10109425},
+ },
+ },
+ {
+ {
+ FieldElement{-13657040, -13155431, -31283750, 11777098, 21447386, 6519384, -2378284, -1627556, 10092783, -4764171},
+ FieldElement{27939166, 14210322, 4677035, 16277044, -22964462, -12398139, -32508754, 12005538, -17810127, 12803510},
+ FieldElement{17228999, -15661624, -1233527, 300140, -1224870, -11714777, 30364213, -9038194, 18016357, 4397660},
+ },
+ {
+ FieldElement{-10958843, -7690207, 4776341, -14954238, 27850028, -15602212, -26619106, 14544525, -17477504, 982639},
+ FieldElement{29253598, 15796703, -2863982, -9908884, 10057023, 3163536, 7332899, -4120128, -21047696, 9934963},
+ FieldElement{5793303, 16271923, -24131614, -10116404, 29188560, 1206517, -14747930, 4559895, -30123922, -10897950},
+ },
+ {
+ FieldElement{-27643952, -11493006, 16282657, -11036493, 28414021, -15012264, 24191034, 4541697, -13338309, 5500568},
+ FieldElement{12650548, -1497113, 9052871, 11355358, -17680037, -8400164, -17430592, 12264343, 10874051, 13524335},
+ FieldElement{25556948, -3045990, 714651, 2510400, 23394682, -10415330, 33119038, 5080568, -22528059, 5376628},
+ },
+ {
+ FieldElement{-26088264, -4011052, -17013699, -3537628, -6726793, 1920897, -22321305, -9447443, 4535768, 1569007},
+ FieldElement{-2255422, 14606630, -21692440, -8039818, 28430649, 8775819, -30494562, 3044290, 31848280, 12543772},
+ FieldElement{-22028579, 2943893, -31857513, 6777306, 13784462, -4292203, -27377195, -2062731, 7718482, 14474653},
+ },
+ {
+ FieldElement{2385315, 2454213, -22631320, 46603, -4437935, -15680415, 656965, -7236665, 24316168, -5253567},
+ FieldElement{13741529, 10911568, -33233417, -8603737, -20177830, -1033297, 33040651, -13424532, -20729456, 8321686},
+ FieldElement{21060490, -2212744, 15712757, -4336099, 1639040, 10656336, 23845965, -11874838, -9984458, 608372},
+ },
+ {
+ FieldElement{-13672732, -15087586, -10889693, -7557059, -6036909, 11305547, 1123968, -6780577, 27229399, 23887},
+ FieldElement{-23244140, -294205, -11744728, 14712571, -29465699, -2029617, 12797024, -6440308, -1633405, 16678954},
+ FieldElement{-29500620, 4770662, -16054387, 14001338, 7830047, 9564805, -1508144, -4795045, -17169265, 4904953},
+ },
+ {
+ FieldElement{24059557, 14617003, 19037157, -15039908, 19766093, -14906429, 5169211, 16191880, 2128236, -4326833},
+ FieldElement{-16981152, 4124966, -8540610, -10653797, 30336522, -14105247, -29806336, 916033, -6882542, -2986532},
+ FieldElement{-22630907, 12419372, -7134229, -7473371, -16478904, 16739175, 285431, 2763829, 15736322, 4143876},
+ },
+ {
+ FieldElement{2379352, 11839345, -4110402, -5988665, 11274298, 794957, 212801, -14594663, 23527084, -16458268},
+ FieldElement{33431127, -11130478, -17838966, -15626900, 8909499, 8376530, -32625340, 4087881, -15188911, -14416214},
+ FieldElement{1767683, 7197987, -13205226, -2022635, -13091350, 448826, 5799055, 4357868, -4774191, -16323038},
+ },
+ },
+ {
+ {
+ FieldElement{6721966, 13833823, -23523388, -1551314, 26354293, -11863321, 23365147, -3949732, 7390890, 2759800},
+ FieldElement{4409041, 2052381, 23373853, 10530217, 7676779, -12885954, 21302353, -4264057, 1244380, -12919645},
+ FieldElement{-4421239, 7169619, 4982368, -2957590, 30256825, -2777540, 14086413, 9208236, 15886429, 16489664},
+ },
+ {
+ FieldElement{1996075, 10375649, 14346367, 13311202, -6874135, -16438411, -13693198, 398369, -30606455, -712933},
+ FieldElement{-25307465, 9795880, -2777414, 14878809, -33531835, 14780363, 13348553, 12076947, -30836462, 5113182},
+ FieldElement{-17770784, 11797796, 31950843, 13929123, -25888302, 12288344, -30341101, -7336386, 13847711, 5387222},
+ },
+ {
+ FieldElement{-18582163, -3416217, 17824843, -2340966, 22744343, -10442611, 8763061, 3617786, -19600662, 10370991},
+ FieldElement{20246567, -14369378, 22358229, -543712, 18507283, -10413996, 14554437, -8746092, 32232924, 16763880},
+ FieldElement{9648505, 10094563, 26416693, 14745928, -30374318, -6472621, 11094161, 15689506, 3140038, -16510092},
+ },
+ {
+ FieldElement{-16160072, 5472695, 31895588, 4744994, 8823515, 10365685, -27224800, 9448613, -28774454, 366295},
+ FieldElement{19153450, 11523972, -11096490, -6503142, -24647631, 5420647, 28344573, 8041113, 719605, 11671788},
+ FieldElement{8678025, 2694440, -6808014, 2517372, 4964326, 11152271, -15432916, -15266516, 27000813, -10195553},
+ },
+ {
+ FieldElement{-15157904, 7134312, 8639287, -2814877, -7235688, 10421742, 564065, 5336097, 6750977, -14521026},
+ FieldElement{11836410, -3979488, 26297894, 16080799, 23455045, 15735944, 1695823, -8819122, 8169720, 16220347},
+ FieldElement{-18115838, 8653647, 17578566, -6092619, -8025777, -16012763, -11144307, -2627664, -5990708, -14166033},
+ },
+ {
+ FieldElement{-23308498, -10968312, 15213228, -10081214, -30853605, -11050004, 27884329, 2847284, 2655861, 1738395},
+ FieldElement{-27537433, -14253021, -25336301, -8002780, -9370762, 8129821, 21651608, -3239336, -19087449, -11005278},
+ FieldElement{1533110, 3437855, 23735889, 459276, 29970501, 11335377, 26030092, 5821408, 10478196, 8544890},
+ },
+ {
+ FieldElement{32173121, -16129311, 24896207, 3921497, 22579056, -3410854, 19270449, 12217473, 17789017, -3395995},
+ FieldElement{-30552961, -2228401, -15578829, -10147201, 13243889, 517024, 15479401, -3853233, 30460520, 1052596},
+ FieldElement{-11614875, 13323618, 32618793, 8175907, -15230173, 12596687, 27491595, -4612359, 3179268, -9478891},
+ },
+ {
+ FieldElement{31947069, -14366651, -4640583, -15339921, -15125977, -6039709, -14756777, -16411740, 19072640, -9511060},
+ FieldElement{11685058, 11822410, 3158003, -13952594, 33402194, -4165066, 5977896, -5215017, 473099, 5040608},
+ FieldElement{-20290863, 8198642, -27410132, 11602123, 1290375, -2799760, 28326862, 1721092, -19558642, -3131606},
+ },
+ },
+ {
+ {
+ FieldElement{7881532, 10687937, 7578723, 7738378, -18951012, -2553952, 21820786, 8076149, -27868496, 11538389},
+ FieldElement{-19935666, 3899861, 18283497, -6801568, -15728660, -11249211, 8754525, 7446702, -5676054, 5797016},
+ FieldElement{-11295600, -3793569, -15782110, -7964573, 12708869, -8456199, 2014099, -9050574, -2369172, -5877341},
+ },
+ {
+ FieldElement{-22472376, -11568741, -27682020, 1146375, 18956691, 16640559, 1192730, -3714199, 15123619, 10811505},
+ FieldElement{14352098, -3419715, -18942044, 10822655, 32750596, 4699007, -70363, 15776356, -28886779, -11974553},
+ FieldElement{-28241164, -8072475, -4978962, -5315317, 29416931, 1847569, -20654173, -16484855, 4714547, -9600655},
+ },
+ {
+ FieldElement{15200332, 8368572, 19679101, 15970074, -31872674, 1959451, 24611599, -4543832, -11745876, 12340220},
+ FieldElement{12876937, -10480056, 33134381, 6590940, -6307776, 14872440, 9613953, 8241152, 15370987, 9608631},
+ FieldElement{-4143277, -12014408, 8446281, -391603, 4407738, 13629032, -7724868, 15866074, -28210621, -8814099},
+ },
+ {
+ FieldElement{26660628, -15677655, 8393734, 358047, -7401291, 992988, -23904233, 858697, 20571223, 8420556},
+ FieldElement{14620715, 13067227, -15447274, 8264467, 14106269, 15080814, 33531827, 12516406, -21574435, -12476749},
+ FieldElement{236881, 10476226, 57258, -14677024, 6472998, 2466984, 17258519, 7256740, 8791136, 15069930},
+ },
+ {
+ FieldElement{1276410, -9371918, 22949635, -16322807, -23493039, -5702186, 14711875, 4874229, -30663140, -2331391},
+ FieldElement{5855666, 4990204, -13711848, 7294284, -7804282, 1924647, -1423175, -7912378, -33069337, 9234253},
+ FieldElement{20590503, -9018988, 31529744, -7352666, -2706834, 10650548, 31559055, -11609587, 18979186, 13396066},
+ },
+ {
+ FieldElement{24474287, 4968103, 22267082, 4407354, 24063882, -8325180, -18816887, 13594782, 33514650, 7021958},
+ FieldElement{-11566906, -6565505, -21365085, 15928892, -26158305, 4315421, -25948728, -3916677, -21480480, 12868082},
+ FieldElement{-28635013, 13504661, 19988037, -2132761, 21078225, 6443208, -21446107, 2244500, -12455797, -8089383},
+ },
+ {
+ FieldElement{-30595528, 13793479, -5852820, 319136, -25723172, -6263899, 33086546, 8957937, -15233648, 5540521},
+ FieldElement{-11630176, -11503902, -8119500, -7643073, 2620056, 1022908, -23710744, -1568984, -16128528, -14962807},
+ FieldElement{23152971, 775386, 27395463, 14006635, -9701118, 4649512, 1689819, 892185, -11513277, -15205948},
+ },
+ {
+ FieldElement{9770129, 9586738, 26496094, 4324120, 1556511, -3550024, 27453819, 4763127, -19179614, 5867134},
+ FieldElement{-32765025, 1927590, 31726409, -4753295, 23962434, -16019500, 27846559, 5931263, -29749703, -16108455},
+ FieldElement{27461885, -2977536, 22380810, 1815854, -23033753, -3031938, 7283490, -15148073, -19526700, 7734629},
+ },
+ },
+ {
+ {
+ FieldElement{-8010264, -9590817, -11120403, 6196038, 29344158, -13430885, 7585295, -3176626, 18549497, 15302069},
+ FieldElement{-32658337, -6171222, -7672793, -11051681, 6258878, 13504381, 10458790, -6418461, -8872242, 8424746},
+ FieldElement{24687205, 8613276, -30667046, -3233545, 1863892, -1830544, 19206234, 7134917, -11284482, -828919},
+ },
+ {
+ FieldElement{11334899, -9218022, 8025293, 12707519, 17523892, -10476071, 10243738, -14685461, -5066034, 16498837},
+ FieldElement{8911542, 6887158, -9584260, -6958590, 11145641, -9543680, 17303925, -14124238, 6536641, 10543906},
+ FieldElement{-28946384, 15479763, -17466835, 568876, -1497683, 11223454, -2669190, -16625574, -27235709, 8876771},
+ },
+ {
+ FieldElement{-25742899, -12566864, -15649966, -846607, -33026686, -796288, -33481822, 15824474, -604426, -9039817},
+ FieldElement{10330056, 70051, 7957388, -9002667, 9764902, 15609756, 27698697, -4890037, 1657394, 3084098},
+ FieldElement{10477963, -7470260, 12119566, -13250805, 29016247, -5365589, 31280319, 14396151, -30233575, 15272409},
+ },
+ {
+ FieldElement{-12288309, 3169463, 28813183, 16658753, 25116432, -5630466, -25173957, -12636138, -25014757, 1950504},
+ FieldElement{-26180358, 9489187, 11053416, -14746161, -31053720, 5825630, -8384306, -8767532, 15341279, 8373727},
+ FieldElement{28685821, 7759505, -14378516, -12002860, -31971820, 4079242, 298136, -10232602, -2878207, 15190420},
+ },
+ {
+ FieldElement{-32932876, 13806336, -14337485, -15794431, -24004620, 10940928, 8669718, 2742393, -26033313, -6875003},
+ FieldElement{-1580388, -11729417, -25979658, -11445023, -17411874, -10912854, 9291594, -16247779, -12154742, 6048605},
+ FieldElement{-30305315, 14843444, 1539301, 11864366, 20201677, 1900163, 13934231, 5128323, 11213262, 9168384},
+ },
+ {
+ FieldElement{-26280513, 11007847, 19408960, -940758, -18592965, -4328580, -5088060, -11105150, 20470157, -16398701},
+ FieldElement{-23136053, 9282192, 14855179, -15390078, -7362815, -14408560, -22783952, 14461608, 14042978, 5230683},
+ FieldElement{29969567, -2741594, -16711867, -8552442, 9175486, -2468974, 21556951, 3506042, -5933891, -12449708},
+ },
+ {
+ FieldElement{-3144746, 8744661, 19704003, 4581278, -20430686, 6830683, -21284170, 8971513, -28539189, 15326563},
+ FieldElement{-19464629, 10110288, -17262528, -3503892, -23500387, 1355669, -15523050, 15300988, -20514118, 9168260},
+ FieldElement{-5353335, 4488613, -23803248, 16314347, 7780487, -15638939, -28948358, 9601605, 33087103, -9011387},
+ },
+ {
+ FieldElement{-19443170, -15512900, -20797467, -12445323, -29824447, 10229461, -27444329, -15000531, -5996870, 15664672},
+ FieldElement{23294591, -16632613, -22650781, -8470978, 27844204, 11461195, 13099750, -2460356, 18151676, 13417686},
+ FieldElement{-24722913, -4176517, -31150679, 5988919, -26858785, 6685065, 1661597, -12551441, 15271676, -15452665},
+ },
+ },
+ {
+ {
+ FieldElement{11433042, -13228665, 8239631, -5279517, -1985436, -725718, -18698764, 2167544, -6921301, -13440182},
+ FieldElement{-31436171, 15575146, 30436815, 12192228, -22463353, 9395379, -9917708, -8638997, 12215110, 12028277},
+ FieldElement{14098400, 6555944, 23007258, 5757252, -15427832, -12950502, 30123440, 4617780, -16900089, -655628},
+ },
+ {
+ FieldElement{-4026201, -15240835, 11893168, 13718664, -14809462, 1847385, -15819999, 10154009, 23973261, -12684474},
+ FieldElement{-26531820, -3695990, -1908898, 2534301, -31870557, -16550355, 18341390, -11419951, 32013174, -10103539},
+ FieldElement{-25479301, 10876443, -11771086, -14625140, -12369567, 1838104, 21911214, 6354752, 4425632, -837822},
+ },
+ {
+ FieldElement{-10433389, -14612966, 22229858, -3091047, -13191166, 776729, -17415375, -12020462, 4725005, 14044970},
+ FieldElement{19268650, -7304421, 1555349, 8692754, -21474059, -9910664, 6347390, -1411784, -19522291, -16109756},
+ FieldElement{-24864089, 12986008, -10898878, -5558584, -11312371, -148526, 19541418, 8180106, 9282262, 10282508},
+ },
+ {
+ FieldElement{-26205082, 4428547, -8661196, -13194263, 4098402, -14165257, 15522535, 8372215, 5542595, -10702683},
+ FieldElement{-10562541, 14895633, 26814552, -16673850, -17480754, -2489360, -2781891, 6993761, -18093885, 10114655},
+ FieldElement{-20107055, -929418, 31422704, 10427861, -7110749, 6150669, -29091755, -11529146, 25953725, -106158},
+ },
+ {
+ FieldElement{-4234397, -8039292, -9119125, 3046000, 2101609, -12607294, 19390020, 6094296, -3315279, 12831125},
+ FieldElement{-15998678, 7578152, 5310217, 14408357, -33548620, -224739, 31575954, 6326196, 7381791, -2421839},
+ FieldElement{-20902779, 3296811, 24736065, -16328389, 18374254, 7318640, 6295303, 8082724, -15362489, 12339664},
+ },
+ {
+ FieldElement{27724736, 2291157, 6088201, -14184798, 1792727, 5857634, 13848414, 15768922, 25091167, 14856294},
+ FieldElement{-18866652, 8331043, 24373479, 8541013, -701998, -9269457, 12927300, -12695493, -22182473, -9012899},
+ FieldElement{-11423429, -5421590, 11632845, 3405020, 30536730, -11674039, -27260765, 13866390, 30146206, 9142070},
+ },
+ {
+ FieldElement{3924129, -15307516, -13817122, -10054960, 12291820, -668366, -27702774, 9326384, -8237858, 4171294},
+ FieldElement{-15921940, 16037937, 6713787, 16606682, -21612135, 2790944, 26396185, 3731949, 345228, -5462949},
+ FieldElement{-21327538, 13448259, 25284571, 1143661, 20614966, -8849387, 2031539, -12391231, -16253183, -13582083},
+ },
+ {
+ FieldElement{31016211, -16722429, 26371392, -14451233, -5027349, 14854137, 17477601, 3842657, 28012650, -16405420},
+ FieldElement{-5075835, 9368966, -8562079, -4600902, -15249953, 6970560, -9189873, 16292057, -8867157, 3507940},
+ FieldElement{29439664, 3537914, 23333589, 6997794, -17555561, -11018068, -15209202, -15051267, -9164929, 6580396},
+ },
+ },
+ {
+ {
+ FieldElement{-12185861, -7679788, 16438269, 10826160, -8696817, -6235611, 17860444, -9273846, -2095802, 9304567},
+ FieldElement{20714564, -4336911, 29088195, 7406487, 11426967, -5095705, 14792667, -14608617, 5289421, -477127},
+ FieldElement{-16665533, -10650790, -6160345, -13305760, 9192020, -1802462, 17271490, 12349094, 26939669, -3752294},
+ },
+ {
+ FieldElement{-12889898, 9373458, 31595848, 16374215, 21471720, 13221525, -27283495, -12348559, -3698806, 117887},
+ FieldElement{22263325, -6560050, 3984570, -11174646, -15114008, -566785, 28311253, 5358056, -23319780, 541964},
+ FieldElement{16259219, 3261970, 2309254, -15534474, -16885711, -4581916, 24134070, -16705829, -13337066, -13552195},
+ },
+ {
+ FieldElement{9378160, -13140186, -22845982, -12745264, 28198281, -7244098, -2399684, -717351, 690426, 14876244},
+ FieldElement{24977353, -314384, -8223969, -13465086, 28432343, -1176353, -13068804, -12297348, -22380984, 6618999},
+ FieldElement{-1538174, 11685646, 12944378, 13682314, -24389511, -14413193, 8044829, -13817328, 32239829, -5652762},
+ },
+ {
+ FieldElement{-18603066, 4762990, -926250, 8885304, -28412480, -3187315, 9781647, -10350059, 32779359, 5095274},
+ FieldElement{-33008130, -5214506, -32264887, -3685216, 9460461, -9327423, -24601656, 14506724, 21639561, -2630236},
+ FieldElement{-16400943, -13112215, 25239338, 15531969, 3987758, -4499318, -1289502, -6863535, 17874574, 558605},
+ },
+ {
+ FieldElement{-13600129, 10240081, 9171883, 16131053, -20869254, 9599700, 33499487, 5080151, 2085892, 5119761},
+ FieldElement{-22205145, -2519528, -16381601, 414691, -25019550, 2170430, 30634760, -8363614, -31999993, -5759884},
+ FieldElement{-6845704, 15791202, 8550074, -1312654, 29928809, -12092256, 27534430, -7192145, -22351378, 12961482},
+ },
+ {
+ FieldElement{-24492060, -9570771, 10368194, 11582341, -23397293, -2245287, 16533930, 8206996, -30194652, -5159638},
+ FieldElement{-11121496, -3382234, 2307366, 6362031, -135455, 8868177, -16835630, 7031275, 7589640, 8945490},
+ FieldElement{-32152748, 8917967, 6661220, -11677616, -1192060, -15793393, 7251489, -11182180, 24099109, -14456170},
+ },
+ {
+ FieldElement{5019558, -7907470, 4244127, -14714356, -26933272, 6453165, -19118182, -13289025, -6231896, -10280736},
+ FieldElement{10853594, 10721687, 26480089, 5861829, -22995819, 1972175, -1866647, -10557898, -3363451, -6441124},
+ FieldElement{-17002408, 5906790, 221599, -6563147, 7828208, -13248918, 24362661, -2008168, -13866408, 7421392},
+ },
+ {
+ FieldElement{8139927, -6546497, 32257646, -5890546, 30375719, 1886181, -21175108, 15441252, 28826358, -4123029},
+ FieldElement{6267086, 9695052, 7709135, -16603597, -32869068, -1886135, 14795160, -7840124, 13746021, -1742048},
+ FieldElement{28584902, 7787108, -6732942, -15050729, 22846041, -7571236, -3181936, -363524, 4771362, -8419958},
+ },
+ },
+ {
+ {
+ FieldElement{24949256, 6376279, -27466481, -8174608, -18646154, -9930606, 33543569, -12141695, 3569627, 11342593},
+ FieldElement{26514989, 4740088, 27912651, 3697550, 19331575, -11472339, 6809886, 4608608, 7325975, -14801071},
+ FieldElement{-11618399, -14554430, -24321212, 7655128, -1369274, 5214312, -27400540, 10258390, -17646694, -8186692},
+ },
+ {
+ FieldElement{11431204, 15823007, 26570245, 14329124, 18029990, 4796082, -31446179, 15580664, 9280358, -3973687},
+ FieldElement{-160783, -10326257, -22855316, -4304997, -20861367, -13621002, -32810901, -11181622, -15545091, 4387441},
+ FieldElement{-20799378, 12194512, 3937617, -5805892, -27154820, 9340370, -24513992, 8548137, 20617071, -7482001},
+ },
+ {
+ FieldElement{-938825, -3930586, -8714311, 16124718, 24603125, -6225393, -13775352, -11875822, 24345683, 10325460},
+ FieldElement{-19855277, -1568885, -22202708, 8714034, 14007766, 6928528, 16318175, -1010689, 4766743, 3552007},
+ FieldElement{-21751364, -16730916, 1351763, -803421, -4009670, 3950935, 3217514, 14481909, 10988822, -3994762},
+ },
+ {
+ FieldElement{15564307, -14311570, 3101243, 5684148, 30446780, -8051356, 12677127, -6505343, -8295852, 13296005},
+ FieldElement{-9442290, 6624296, -30298964, -11913677, -4670981, -2057379, 31521204, 9614054, -30000824, 12074674},
+ FieldElement{4771191, -135239, 14290749, -13089852, 27992298, 14998318, -1413936, -1556716, 29832613, -16391035},
+ },
+ {
+ FieldElement{7064884, -7541174, -19161962, -5067537, -18891269, -2912736, 25825242, 5293297, -27122660, 13101590},
+ FieldElement{-2298563, 2439670, -7466610, 1719965, -27267541, -16328445, 32512469, -5317593, -30356070, -4190957},
+ FieldElement{-30006540, 10162316, -33180176, 3981723, -16482138, -13070044, 14413974, 9515896, 19568978, 9628812},
+ },
+ {
+ FieldElement{33053803, 199357, 15894591, 1583059, 27380243, -4580435, -17838894, -6106839, -6291786, 3437740},
+ FieldElement{-18978877, 3884493, 19469877, 12726490, 15913552, 13614290, -22961733, 70104, 7463304, 4176122},
+ FieldElement{-27124001, 10659917, 11482427, -16070381, 12771467, -6635117, -32719404, -5322751, 24216882, 5944158},
+ },
+ {
+ FieldElement{8894125, 7450974, -2664149, -9765752, -28080517, -12389115, 19345746, 14680796, 11632993, 5847885},
+ FieldElement{26942781, -2315317, 9129564, -4906607, 26024105, 11769399, -11518837, 6367194, -9727230, 4782140},
+ FieldElement{19916461, -4828410, -22910704, -11414391, 25606324, -5972441, 33253853, 8220911, 6358847, -1873857},
+ },
+ {
+ FieldElement{801428, -2081702, 16569428, 11065167, 29875704, 96627, 7908388, -4480480, -13538503, 1387155},
+ FieldElement{19646058, 5720633, -11416706, 12814209, 11607948, 12749789, 14147075, 15156355, -21866831, 11835260},
+ FieldElement{19299512, 1155910, 28703737, 14890794, 2925026, 7269399, 26121523, 15467869, -26560550, 5052483},
+ },
+ },
+ {
+ {
+ FieldElement{-3017432, 10058206, 1980837, 3964243, 22160966, 12322533, -6431123, -12618185, 12228557, -7003677},
+ FieldElement{32944382, 14922211, -22844894, 5188528, 21913450, -8719943, 4001465, 13238564, -6114803, 8653815},
+ FieldElement{22865569, -4652735, 27603668, -12545395, 14348958, 8234005, 24808405, 5719875, 28483275, 2841751},
+ },
+ {
+ FieldElement{-16420968, -1113305, -327719, -12107856, 21886282, -15552774, -1887966, -315658, 19932058, -12739203},
+ FieldElement{-11656086, 10087521, -8864888, -5536143, -19278573, -3055912, 3999228, 13239134, -4777469, -13910208},
+ FieldElement{1382174, -11694719, 17266790, 9194690, -13324356, 9720081, 20403944, 11284705, -14013818, 3093230},
+ },
+ {
+ FieldElement{16650921, -11037932, -1064178, 1570629, -8329746, 7352753, -302424, 16271225, -24049421, -6691850},
+ FieldElement{-21911077, -5927941, -4611316, -5560156, -31744103, -10785293, 24123614, 15193618, -21652117, -16739389},
+ FieldElement{-9935934, -4289447, -25279823, 4372842, 2087473, 10399484, 31870908, 14690798, 17361620, 11864968},
+ },
+ {
+ FieldElement{-11307610, 6210372, 13206574, 5806320, -29017692, -13967200, -12331205, -7486601, -25578460, -16240689},
+ FieldElement{14668462, -12270235, 26039039, 15305210, 25515617, 4542480, 10453892, 6577524, 9145645, -6443880},
+ FieldElement{5974874, 3053895, -9433049, -10385191, -31865124, 3225009, -7972642, 3936128, -5652273, -3050304},
+ },
+ {
+ FieldElement{30625386, -4729400, -25555961, -12792866, -20484575, 7695099, 17097188, -16303496, -27999779, 1803632},
+ FieldElement{-3553091, 9865099, -5228566, 4272701, -5673832, -16689700, 14911344, 12196514, -21405489, 7047412},
+ FieldElement{20093277, 9920966, -11138194, -5343857, 13161587, 12044805, -32856851, 4124601, -32343828, -10257566},
+ },
+ {
+ FieldElement{-20788824, 14084654, -13531713, 7842147, 19119038, -13822605, 4752377, -8714640, -21679658, 2288038},
+ FieldElement{-26819236, -3283715, 29965059, 3039786, -14473765, 2540457, 29457502, 14625692, -24819617, 12570232},
+ FieldElement{-1063558, -11551823, 16920318, 12494842, 1278292, -5869109, -21159943, -3498680, -11974704, 4724943},
+ },
+ {
+ FieldElement{17960970, -11775534, -4140968, -9702530, -8876562, -1410617, -12907383, -8659932, -29576300, 1903856},
+ FieldElement{23134274, -14279132, -10681997, -1611936, 20684485, 15770816, -12989750, 3190296, 26955097, 14109738},
+ FieldElement{15308788, 5320727, -30113809, -14318877, 22902008, 7767164, 29425325, -11277562, 31960942, 11934971},
+ },
+ {
+ FieldElement{-27395711, 8435796, 4109644, 12222639, -24627868, 14818669, 20638173, 4875028, 10491392, 1379718},
+ FieldElement{-13159415, 9197841, 3875503, -8936108, -1383712, -5879801, 33518459, 16176658, 21432314, 12180697},
+ FieldElement{-11787308, 11500838, 13787581, -13832590, -22430679, 10140205, 1465425, 12689540, -10301319, -13872883},
+ },
+ },
+ {
+ {
+ FieldElement{5414091, -15386041, -21007664, 9643570, 12834970, 1186149, -2622916, -1342231, 26128231, 6032912},
+ FieldElement{-26337395, -13766162, 32496025, -13653919, 17847801, -12669156, 3604025, 8316894, -25875034, -10437358},
+ FieldElement{3296484, 6223048, 24680646, -12246460, -23052020, 5903205, -8862297, -4639164, 12376617, 3188849},
+ },
+ {
+ FieldElement{29190488, -14659046, 27549113, -1183516, 3520066, -10697301, 32049515, -7309113, -16109234, -9852307},
+ FieldElement{-14744486, -9309156, 735818, -598978, -20407687, -5057904, 25246078, -15795669, 18640741, -960977},
+ FieldElement{-6928835, -16430795, 10361374, 5642961, 4910474, 12345252, -31638386, -494430, 10530747, 1053335},
+ },
+ {
+ FieldElement{-29265967, -14186805, -13538216, -12117373, -19457059, -10655384, -31462369, -2948985, 24018831, 15026644},
+ FieldElement{-22592535, -3145277, -2289276, 5953843, -13440189, 9425631, 25310643, 13003497, -2314791, -15145616},
+ FieldElement{-27419985, -603321, -8043984, -1669117, -26092265, 13987819, -27297622, 187899, -23166419, -2531735},
+ },
+ {
+ FieldElement{-21744398, -13810475, 1844840, 5021428, -10434399, -15911473, 9716667, 16266922, -5070217, 726099},
+ FieldElement{29370922, -6053998, 7334071, -15342259, 9385287, 2247707, -13661962, -4839461, 30007388, -15823341},
+ FieldElement{-936379, 16086691, 23751945, -543318, -1167538, -5189036, 9137109, 730663, 9835848, 4555336},
+ },
+ {
+ FieldElement{-23376435, 1410446, -22253753, -12899614, 30867635, 15826977, 17693930, 544696, -11985298, 12422646},
+ FieldElement{31117226, -12215734, -13502838, 6561947, -9876867, -12757670, -5118685, -4096706, 29120153, 13924425},
+ FieldElement{-17400879, -14233209, 19675799, -2734756, -11006962, -5858820, -9383939, -11317700, 7240931, -237388},
+ },
+ {
+ FieldElement{-31361739, -11346780, -15007447, -5856218, -22453340, -12152771, 1222336, 4389483, 3293637, -15551743},
+ FieldElement{-16684801, -14444245, 11038544, 11054958, -13801175, -3338533, -24319580, 7733547, 12796905, -6335822},
+ FieldElement{-8759414, -10817836, -25418864, 10783769, -30615557, -9746811, -28253339, 3647836, 3222231, -11160462},
+ },
+ {
+ FieldElement{18606113, 1693100, -25448386, -15170272, 4112353, 10045021, 23603893, -2048234, -7550776, 2484985},
+ FieldElement{9255317, -3131197, -12156162, -1004256, 13098013, -9214866, 16377220, -2102812, -19802075, -3034702},
+ FieldElement{-22729289, 7496160, -5742199, 11329249, 19991973, -3347502, -31718148, 9936966, -30097688, -10618797},
+ },
+ {
+ FieldElement{21878590, -5001297, 4338336, 13643897, -3036865, 13160960, 19708896, 5415497, -7360503, -4109293},
+ FieldElement{27736861, 10103576, 12500508, 8502413, -3413016, -9633558, 10436918, -1550276, -23659143, -8132100},
+ FieldElement{19492550, -12104365, -29681976, -852630, -3208171, 12403437, 30066266, 8367329, 13243957, 8709688},
+ },
+ },
+ {
+ {
+ FieldElement{12015105, 2801261, 28198131, 10151021, 24818120, -4743133, -11194191, -5645734, 5150968, 7274186},
+ FieldElement{2831366, -12492146, 1478975, 6122054, 23825128, -12733586, 31097299, 6083058, 31021603, -9793610},
+ FieldElement{-2529932, -2229646, 445613, 10720828, -13849527, -11505937, -23507731, 16354465, 15067285, -14147707},
+ },
+ {
+ FieldElement{7840942, 14037873, -33364863, 15934016, -728213, -3642706, 21403988, 1057586, -19379462, -12403220},
+ FieldElement{915865, -16469274, 15608285, -8789130, -24357026, 6060030, -17371319, 8410997, -7220461, 16527025},
+ FieldElement{32922597, -556987, 20336074, -16184568, 10903705, -5384487, 16957574, 52992, 23834301, 6588044},
+ },
+ {
+ FieldElement{32752030, 11232950, 3381995, -8714866, 22652988, -10744103, 17159699, 16689107, -20314580, -1305992},
+ FieldElement{-4689649, 9166776, -25710296, -10847306, 11576752, 12733943, 7924251, -2752281, 1976123, -7249027},
+ FieldElement{21251222, 16309901, -2983015, -6783122, 30810597, 12967303, 156041, -3371252, 12331345, -8237197},
+ },
+ {
+ FieldElement{8651614, -4477032, -16085636, -4996994, 13002507, 2950805, 29054427, -5106970, 10008136, -4667901},
+ FieldElement{31486080, 15114593, -14261250, 12951354, 14369431, -7387845, 16347321, -13662089, 8684155, -10532952},
+ FieldElement{19443825, 11385320, 24468943, -9659068, -23919258, 2187569, -26263207, -6086921, 31316348, 14219878},
+ },
+ {
+ FieldElement{-28594490, 1193785, 32245219, 11392485, 31092169, 15722801, 27146014, 6992409, 29126555, 9207390},
+ FieldElement{32382935, 1110093, 18477781, 11028262, -27411763, -7548111, -4980517, 10843782, -7957600, -14435730},
+ FieldElement{2814918, 7836403, 27519878, -7868156, -20894015, -11553689, -21494559, 8550130, 28346258, 1994730},
+ },
+ {
+ FieldElement{-19578299, 8085545, -14000519, -3948622, 2785838, -16231307, -19516951, 7174894, 22628102, 8115180},
+ FieldElement{-30405132, 955511, -11133838, -15078069, -32447087, -13278079, -25651578, 3317160, -9943017, 930272},
+ FieldElement{-15303681, -6833769, 28856490, 1357446, 23421993, 1057177, 24091212, -1388970, -22765376, -10650715},
+ },
+ {
+ FieldElement{-22751231, -5303997, -12907607, -12768866, -15811511, -7797053, -14839018, -16554220, -1867018, 8398970},
+ FieldElement{-31969310, 2106403, -4736360, 1362501, 12813763, 16200670, 22981545, -6291273, 18009408, -15772772},
+ FieldElement{-17220923, -9545221, -27784654, 14166835, 29815394, 7444469, 29551787, -3727419, 19288549, 1325865},
+ },
+ {
+ FieldElement{15100157, -15835752, -23923978, -1005098, -26450192, 15509408, 12376730, -3479146, 33166107, -8042750},
+ FieldElement{20909231, 13023121, -9209752, 16251778, -5778415, -8094914, 12412151, 10018715, 2213263, -13878373},
+ FieldElement{32529814, -11074689, 30361439, -16689753, -9135940, 1513226, 22922121, 6382134, -5766928, 8371348},
+ },
+ },
+ {
+ {
+ FieldElement{9923462, 11271500, 12616794, 3544722, -29998368, -1721626, 12891687, -8193132, -26442943, 10486144},
+ FieldElement{-22597207, -7012665, 8587003, -8257861, 4084309, -12970062, 361726, 2610596, -23921530, -11455195},
+ FieldElement{5408411, -1136691, -4969122, 10561668, 24145918, 14240566, 31319731, -4235541, 19985175, -3436086},
+ },
+ {
+ FieldElement{-13994457, 16616821, 14549246, 3341099, 32155958, 13648976, -17577068, 8849297, 65030, 8370684},
+ FieldElement{-8320926, -12049626, 31204563, 5839400, -20627288, -1057277, -19442942, 6922164, 12743482, -9800518},
+ FieldElement{-2361371, 12678785, 28815050, 4759974, -23893047, 4884717, 23783145, 11038569, 18800704, 255233},
+ },
+ {
+ FieldElement{-5269658, -1773886, 13957886, 7990715, 23132995, 728773, 13393847, 9066957, 19258688, -14753793},
+ FieldElement{-2936654, -10827535, -10432089, 14516793, -3640786, 4372541, -31934921, 2209390, -1524053, 2055794},
+ FieldElement{580882, 16705327, 5468415, -2683018, -30926419, -14696000, -7203346, -8994389, -30021019, 7394435},
+ },
+ {
+ FieldElement{23838809, 1822728, -15738443, 15242727, 8318092, -3733104, -21672180, -3492205, -4821741, 14799921},
+ FieldElement{13345610, 9759151, 3371034, -16137791, 16353039, 8577942, 31129804, 13496856, -9056018, 7402518},
+ FieldElement{2286874, -4435931, -20042458, -2008336, -13696227, 5038122, 11006906, -15760352, 8205061, 1607563},
+ },
+ {
+ FieldElement{14414086, -8002132, 3331830, -3208217, 22249151, -5594188, 18364661, -2906958, 30019587, -9029278},
+ FieldElement{-27688051, 1585953, -10775053, 931069, -29120221, -11002319, -14410829, 12029093, 9944378, 8024},
+ FieldElement{4368715, -3709630, 29874200, -15022983, -20230386, -11410704, -16114594, -999085, -8142388, 5640030},
+ },
+ {
+ FieldElement{10299610, 13746483, 11661824, 16234854, 7630238, 5998374, 9809887, -16694564, 15219798, -14327783},
+ FieldElement{27425505, -5719081, 3055006, 10660664, 23458024, 595578, -15398605, -1173195, -18342183, 9742717},
+ FieldElement{6744077, 2427284, 26042789, 2720740, -847906, 1118974, 32324614, 7406442, 12420155, 1994844},
+ },
+ {
+ FieldElement{14012521, -5024720, -18384453, -9578469, -26485342, -3936439, -13033478, -10909803, 24319929, -6446333},
+ FieldElement{16412690, -4507367, 10772641, 15929391, -17068788, -4658621, 10555945, -10484049, -30102368, -4739048},
+ FieldElement{22397382, -7767684, -9293161, -12792868, 17166287, -9755136, -27333065, 6199366, 21880021, -12250760},
+ },
+ {
+ FieldElement{-4283307, 5368523, -31117018, 8163389, -30323063, 3209128, 16557151, 8890729, 8840445, 4957760},
+ FieldElement{-15447727, 709327, -6919446, -10870178, -29777922, 6522332, -21720181, 12130072, -14796503, 5005757},
+ FieldElement{-2114751, -14308128, 23019042, 15765735, -25269683, 6002752, 10183197, -13239326, -16395286, -2176112},
+ },
+ },
+ {
+ {
+ FieldElement{-19025756, 1632005, 13466291, -7995100, -23640451, 16573537, -32013908, -3057104, 22208662, 2000468},
+ FieldElement{3065073, -1412761, -25598674, -361432, -17683065, -5703415, -8164212, 11248527, -3691214, -7414184},
+ FieldElement{10379208, -6045554, 8877319, 1473647, -29291284, -12507580, 16690915, 2553332, -3132688, 16400289},
+ },
+ {
+ FieldElement{15716668, 1254266, -18472690, 7446274, -8448918, 6344164, -22097271, -7285580, 26894937, 9132066},
+ FieldElement{24158887, 12938817, 11085297, -8177598, -28063478, -4457083, -30576463, 64452, -6817084, -2692882},
+ FieldElement{13488534, 7794716, 22236231, 5989356, 25426474, -12578208, 2350710, -3418511, -4688006, 2364226},
+ },
+ {
+ FieldElement{16335052, 9132434, 25640582, 6678888, 1725628, 8517937, -11807024, -11697457, 15445875, -7798101},
+ FieldElement{29004207, -7867081, 28661402, -640412, -12794003, -7943086, 31863255, -4135540, -278050, -15759279},
+ FieldElement{-6122061, -14866665, -28614905, 14569919, -10857999, -3591829, 10343412, -6976290, -29828287, -10815811},
+ },
+ {
+ FieldElement{27081650, 3463984, 14099042, -4517604, 1616303, -6205604, 29542636, 15372179, 17293797, 960709},
+ FieldElement{20263915, 11434237, -5765435, 11236810, 13505955, -10857102, -16111345, 6493122, -19384511, 7639714},
+ FieldElement{-2830798, -14839232, 25403038, -8215196, -8317012, -16173699, 18006287, -16043750, 29994677, -15808121},
+ },
+ {
+ FieldElement{9769828, 5202651, -24157398, -13631392, -28051003, -11561624, -24613141, -13860782, -31184575, 709464},
+ FieldElement{12286395, 13076066, -21775189, -1176622, -25003198, 4057652, -32018128, -8890874, 16102007, 13205847},
+ FieldElement{13733362, 5599946, 10557076, 3195751, -5557991, 8536970, -25540170, 8525972, 10151379, 10394400},
+ },
+ {
+ FieldElement{4024660, -16137551, 22436262, 12276534, -9099015, -2686099, 19698229, 11743039, -33302334, 8934414},
+ FieldElement{-15879800, -4525240, -8580747, -2934061, 14634845, -698278, -9449077, 3137094, -11536886, 11721158},
+ FieldElement{17555939, -5013938, 8268606, 2331751, -22738815, 9761013, 9319229, 8835153, -9205489, -1280045},
+ },
+ {
+ FieldElement{-461409, -7830014, 20614118, 16688288, -7514766, -4807119, 22300304, 505429, 6108462, -6183415},
+ FieldElement{-5070281, 12367917, -30663534, 3234473, 32617080, -8422642, 29880583, -13483331, -26898490, -7867459},
+ FieldElement{-31975283, 5726539, 26934134, 10237677, -3173717, -605053, 24199304, 3795095, 7592688, -14992079},
+ },
+ {
+ FieldElement{21594432, -14964228, 17466408, -4077222, 32537084, 2739898, 6407723, 12018833, -28256052, 4298412},
+ FieldElement{-20650503, -11961496, -27236275, 570498, 3767144, -1717540, 13891942, -1569194, 13717174, 10805743},
+ FieldElement{-14676630, -15644296, 15287174, 11927123, 24177847, -8175568, -796431, 14860609, -26938930, -5863836},
+ },
+ },
+ {
+ {
+ FieldElement{12962541, 5311799, -10060768, 11658280, 18855286, -7954201, 13286263, -12808704, -4381056, 9882022},
+ FieldElement{18512079, 11319350, -20123124, 15090309, 18818594, 5271736, -22727904, 3666879, -23967430, -3299429},
+ FieldElement{-6789020, -3146043, 16192429, 13241070, 15898607, -14206114, -10084880, -6661110, -2403099, 5276065},
+ },
+ {
+ FieldElement{30169808, -5317648, 26306206, -11750859, 27814964, 7069267, 7152851, 3684982, 1449224, 13082861},
+ FieldElement{10342826, 3098505, 2119311, 193222, 25702612, 12233820, 23697382, 15056736, -21016438, -8202000},
+ FieldElement{-33150110, 3261608, 22745853, 7948688, 19370557, -15177665, -26171976, 6482814, -10300080, -11060101},
+ },
+ {
+ FieldElement{32869458, -5408545, 25609743, 15678670, -10687769, -15471071, 26112421, 2521008, -22664288, 6904815},
+ FieldElement{29506923, 4457497, 3377935, -9796444, -30510046, 12935080, 1561737, 3841096, -29003639, -6657642},
+ FieldElement{10340844, -6630377, -18656632, -2278430, 12621151, -13339055, 30878497, -11824370, -25584551, 5181966},
+ },
+ {
+ FieldElement{25940115, -12658025, 17324188, -10307374, -8671468, 15029094, 24396252, -16450922, -2322852, -12388574},
+ FieldElement{-21765684, 9916823, -1300409, 4079498, -1028346, 11909559, 1782390, 12641087, 20603771, -6561742},
+ FieldElement{-18882287, -11673380, 24849422, 11501709, 13161720, -4768874, 1925523, 11914390, 4662781, 7820689},
+ },
+ {
+ FieldElement{12241050, -425982, 8132691, 9393934, 32846760, -1599620, 29749456, 12172924, 16136752, 15264020},
+ FieldElement{-10349955, -14680563, -8211979, 2330220, -17662549, -14545780, 10658213, 6671822, 19012087, 3772772},
+ FieldElement{3753511, -3421066, 10617074, 2028709, 14841030, -6721664, 28718732, -15762884, 20527771, 12988982},
+ },
+ {
+ FieldElement{-14822485, -5797269, -3707987, 12689773, -898983, -10914866, -24183046, -10564943, 3299665, -12424953},
+ FieldElement{-16777703, -15253301, -9642417, 4978983, 3308785, 8755439, 6943197, 6461331, -25583147, 8991218},
+ FieldElement{-17226263, 1816362, -1673288, -6086439, 31783888, -8175991, -32948145, 7417950, -30242287, 1507265},
+ },
+ {
+ FieldElement{29692663, 6829891, -10498800, 4334896, 20945975, -11906496, -28887608, 8209391, 14606362, -10647073},
+ FieldElement{-3481570, 8707081, 32188102, 5672294, 22096700, 1711240, -33020695, 9761487, 4170404, -2085325},
+ FieldElement{-11587470, 14855945, -4127778, -1531857, -26649089, 15084046, 22186522, 16002000, -14276837, -8400798},
+ },
+ {
+ FieldElement{-4811456, 13761029, -31703877, -2483919, -3312471, 7869047, -7113572, -9620092, 13240845, 10965870},
+ FieldElement{-7742563, -8256762, -14768334, -13656260, -23232383, 12387166, 4498947, 14147411, 29514390, 4302863},
+ FieldElement{-13413405, -12407859, 20757302, -13801832, 14785143, 8976368, -5061276, -2144373, 17846988, -13971927},
+ },
+ },
+ {
+ {
+ FieldElement{-2244452, -754728, -4597030, -1066309, -6247172, 1455299, -21647728, -9214789, -5222701, 12650267},
+ FieldElement{-9906797, -16070310, 21134160, 12198166, -27064575, 708126, 387813, 13770293, -19134326, 10958663},
+ FieldElement{22470984, 12369526, 23446014, -5441109, -21520802, -9698723, -11772496, -11574455, -25083830, 4271862},
+ },
+ {
+ FieldElement{-25169565, -10053642, -19909332, 15361595, -5984358, 2159192, 75375, -4278529, -32526221, 8469673},
+ FieldElement{15854970, 4148314, -8893890, 7259002, 11666551, 13824734, -30531198, 2697372, 24154791, -9460943},
+ FieldElement{15446137, -15806644, 29759747, 14019369, 30811221, -9610191, -31582008, 12840104, 24913809, 9815020},
+ },
+ {
+ FieldElement{-4709286, -5614269, -31841498, -12288893, -14443537, 10799414, -9103676, 13438769, 18735128, 9466238},
+ FieldElement{11933045, 9281483, 5081055, -5183824, -2628162, -4905629, -7727821, -10896103, -22728655, 16199064},
+ FieldElement{14576810, 379472, -26786533, -8317236, -29426508, -10812974, -102766, 1876699, 30801119, 2164795},
+ },
+ {
+ FieldElement{15995086, 3199873, 13672555, 13712240, -19378835, -4647646, -13081610, -15496269, -13492807, 1268052},
+ FieldElement{-10290614, -3659039, -3286592, 10948818, 23037027, 3794475, -3470338, -12600221, -17055369, 3565904},
+ FieldElement{29210088, -9419337, -5919792, -4952785, 10834811, -13327726, -16512102, -10820713, -27162222, -14030531},
+ },
+ {
+ FieldElement{-13161890, 15508588, 16663704, -8156150, -28349942, 9019123, -29183421, -3769423, 2244111, -14001979},
+ FieldElement{-5152875, -3800936, -9306475, -6071583, 16243069, 14684434, -25673088, -16180800, 13491506, 4641841},
+ FieldElement{10813417, 643330, -19188515, -728916, 30292062, -16600078, 27548447, -7721242, 14476989, -12767431},
+ },
+ {
+ FieldElement{10292079, 9984945, 6481436, 8279905, -7251514, 7032743, 27282937, -1644259, -27912810, 12651324},
+ FieldElement{-31185513, -813383, 22271204, 11835308, 10201545, 15351028, 17099662, 3988035, 21721536, -3148940},
+ FieldElement{10202177, -6545839, -31373232, -9574638, -32150642, -8119683, -12906320, 3852694, 13216206, 14842320},
+ },
+ {
+ FieldElement{-15815640, -10601066, -6538952, -7258995, -6984659, -6581778, -31500847, 13765824, -27434397, 9900184},
+ FieldElement{14465505, -13833331, -32133984, -14738873, -27443187, 12990492, 33046193, 15796406, -7051866, -8040114},
+ FieldElement{30924417, -8279620, 6359016, -12816335, 16508377, 9071735, -25488601, 15413635, 9524356, -7018878},
+ },
+ {
+ FieldElement{12274201, -13175547, 32627641, -1785326, 6736625, 13267305, 5237659, -5109483, 15663516, 4035784},
+ FieldElement{-2951309, 8903985, 17349946, 601635, -16432815, -4612556, -13732739, -15889334, -22258478, 4659091},
+ FieldElement{-16916263, -4952973, -30393711, -15158821, 20774812, 15897498, 5736189, 15026997, -2178256, -13455585},
+ },
+ },
+ {
+ {
+ FieldElement{-8858980, -2219056, 28571666, -10155518, -474467, -10105698, -3801496, 278095, 23440562, -290208},
+ FieldElement{10226241, -5928702, 15139956, 120818, -14867693, 5218603, 32937275, 11551483, -16571960, -7442864},
+ FieldElement{17932739, -12437276, -24039557, 10749060, 11316803, 7535897, 22503767, 5561594, -3646624, 3898661},
+ },
+ {
+ FieldElement{7749907, -969567, -16339731, -16464, -25018111, 15122143, -1573531, 7152530, 21831162, 1245233},
+ FieldElement{26958459, -14658026, 4314586, 8346991, -5677764, 11960072, -32589295, -620035, -30402091, -16716212},
+ FieldElement{-12165896, 9166947, 33491384, 13673479, 29787085, 13096535, 6280834, 14587357, -22338025, 13987525},
+ },
+ {
+ FieldElement{-24349909, 7778775, 21116000, 15572597, -4833266, -5357778, -4300898, -5124639, -7469781, -2858068},
+ FieldElement{9681908, -6737123, -31951644, 13591838, -6883821, 386950, 31622781, 6439245, -14581012, 4091397},
+ FieldElement{-8426427, 1470727, -28109679, -1596990, 3978627, -5123623, -19622683, 12092163, 29077877, -14741988},
+ },
+ {
+ FieldElement{5269168, -6859726, -13230211, -8020715, 25932563, 1763552, -5606110, -5505881, -20017847, 2357889},
+ FieldElement{32264008, -15407652, -5387735, -1160093, -2091322, -3946900, 23104804, -12869908, 5727338, 189038},
+ FieldElement{14609123, -8954470, -6000566, -16622781, -14577387, -7743898, -26745169, 10942115, -25888931, -14884697},
+ },
+ {
+ FieldElement{20513500, 5557931, -15604613, 7829531, 26413943, -2019404, -21378968, 7471781, 13913677, -5137875},
+ FieldElement{-25574376, 11967826, 29233242, 12948236, -6754465, 4713227, -8940970, 14059180, 12878652, 8511905},
+ FieldElement{-25656801, 3393631, -2955415, -7075526, -2250709, 9366908, -30223418, 6812974, 5568676, -3127656},
+ },
+ {
+ FieldElement{11630004, 12144454, 2116339, 13606037, 27378885, 15676917, -17408753, -13504373, -14395196, 8070818},
+ FieldElement{27117696, -10007378, -31282771, -5570088, 1127282, 12772488, -29845906, 10483306, -11552749, -1028714},
+ FieldElement{10637467, -5688064, 5674781, 1072708, -26343588, -6982302, -1683975, 9177853, -27493162, 15431203},
+ },
+ {
+ FieldElement{20525145, 10892566, -12742472, 12779443, -29493034, 16150075, -28240519, 14943142, -15056790, -7935931},
+ FieldElement{-30024462, 5626926, -551567, -9981087, 753598, 11981191, 25244767, -3239766, -3356550, 9594024},
+ FieldElement{-23752644, 2636870, -5163910, -10103818, 585134, 7877383, 11345683, -6492290, 13352335, -10977084},
+ },
+ {
+ FieldElement{-1931799, -5407458, 3304649, -12884869, 17015806, -4877091, -29783850, -7752482, -13215537, -319204},
+ FieldElement{20239939, 6607058, 6203985, 3483793, -18386976, -779229, -20723742, 15077870, -22750759, 14523817},
+ FieldElement{27406042, -6041657, 27423596, -4497394, 4996214, 10002360, -28842031, -4545494, -30172742, -4805667},
+ },
+ },
+ {
+ {
+ FieldElement{11374242, 12660715, 17861383, -12540833, 10935568, 1099227, -13886076, -9091740, -27727044, 11358504},
+ FieldElement{-12730809, 10311867, 1510375, 10778093, -2119455, -9145702, 32676003, 11149336, -26123651, 4985768},
+ FieldElement{-19096303, 341147, -6197485, -239033, 15756973, -8796662, -983043, 13794114, -19414307, -15621255},
+ },
+ {
+ FieldElement{6490081, 11940286, 25495923, -7726360, 8668373, -8751316, 3367603, 6970005, -1691065, -9004790},
+ FieldElement{1656497, 13457317, 15370807, 6364910, 13605745, 8362338, -19174622, -5475723, -16796596, -5031438},
+ FieldElement{-22273315, -13524424, -64685, -4334223, -18605636, -10921968, -20571065, -7007978, -99853, -10237333},
+ },
+ {
+ FieldElement{17747465, 10039260, 19368299, -4050591, -20630635, -16041286, 31992683, -15857976, -29260363, -5511971},
+ FieldElement{31932027, -4986141, -19612382, 16366580, 22023614, 88450, 11371999, -3744247, 4882242, -10626905},
+ FieldElement{29796507, 37186, 19818052, 10115756, -11829032, 3352736, 18551198, 3272828, -5190932, -4162409},
+ },
+ {
+ FieldElement{12501286, 4044383, -8612957, -13392385, -32430052, 5136599, -19230378, -3529697, 330070, -3659409},
+ FieldElement{6384877, 2899513, 17807477, 7663917, -2358888, 12363165, 25366522, -8573892, -271295, 12071499},
+ FieldElement{-8365515, -4042521, 25133448, -4517355, -6211027, 2265927, -32769618, 1936675, -5159697, 3829363},
+ },
+ {
+ FieldElement{28425966, -5835433, -577090, -4697198, -14217555, 6870930, 7921550, -6567787, 26333140, 14267664},
+ FieldElement{-11067219, 11871231, 27385719, -10559544, -4585914, -11189312, 10004786, -8709488, -21761224, 8930324},
+ FieldElement{-21197785, -16396035, 25654216, -1725397, 12282012, 11008919, 1541940, 4757911, -26491501, -16408940},
+ },
+ {
+ FieldElement{13537262, -7759490, -20604840, 10961927, -5922820, -13218065, -13156584, 6217254, -15943699, 13814990},
+ FieldElement{-17422573, 15157790, 18705543, 29619, 24409717, -260476, 27361681, 9257833, -1956526, -1776914},
+ FieldElement{-25045300, -10191966, 15366585, 15166509, -13105086, 8423556, -29171540, 12361135, -18685978, 4578290},
+ },
+ {
+ FieldElement{24579768, 3711570, 1342322, -11180126, -27005135, 14124956, -22544529, 14074919, 21964432, 8235257},
+ FieldElement{-6528613, -2411497, 9442966, -5925588, 12025640, -1487420, -2981514, -1669206, 13006806, 2355433},
+ FieldElement{-16304899, -13605259, -6632427, -5142349, 16974359, -10911083, 27202044, 1719366, 1141648, -12796236},
+ },
+ {
+ FieldElement{-12863944, -13219986, -8318266, -11018091, -6810145, -4843894, 13475066, -3133972, 32674895, 13715045},
+ FieldElement{11423335, -5468059, 32344216, 8962751, 24989809, 9241752, -13265253, 16086212, -28740881, -15642093},
+ FieldElement{-1409668, 12530728, -6368726, 10847387, 19531186, -14132160, -11709148, 7791794, -27245943, 4383347},
+ },
+ },
+ {
+ {
+ FieldElement{-28970898, 5271447, -1266009, -9736989, -12455236, 16732599, -4862407, -4906449, 27193557, 6245191},
+ FieldElement{-15193956, 5362278, -1783893, 2695834, 4960227, 12840725, 23061898, 3260492, 22510453, 8577507},
+ FieldElement{-12632451, 11257346, -32692994, 13548177, -721004, 10879011, 31168030, 13952092, -29571492, -3635906},
+ },
+ {
+ FieldElement{3877321, -9572739, 32416692, 5405324, -11004407, -13656635, 3759769, 11935320, 5611860, 8164018},
+ FieldElement{-16275802, 14667797, 15906460, 12155291, -22111149, -9039718, 32003002, -8832289, 5773085, -8422109},
+ FieldElement{-23788118, -8254300, 1950875, 8937633, 18686727, 16459170, -905725, 12376320, 31632953, 190926},
+ },
+ {
+ FieldElement{-24593607, -16138885, -8423991, 13378746, 14162407, 6901328, -8288749, 4508564, -25341555, -3627528},
+ FieldElement{8884438, -5884009, 6023974, 10104341, -6881569, -4941533, 18722941, -14786005, -1672488, 827625},
+ FieldElement{-32720583, -16289296, -32503547, 7101210, 13354605, 2659080, -1800575, -14108036, -24878478, 1541286},
+ },
+ {
+ FieldElement{2901347, -1117687, 3880376, -10059388, -17620940, -3612781, -21802117, -3567481, 20456845, -1885033},
+ FieldElement{27019610, 12299467, -13658288, -1603234, -12861660, -4861471, -19540150, -5016058, 29439641, 15138866},
+ FieldElement{21536104, -6626420, -32447818, -10690208, -22408077, 5175814, -5420040, -16361163, 7779328, 109896},
+ },
+ {
+ FieldElement{30279744, 14648750, -8044871, 6425558, 13639621, -743509, 28698390, 12180118, 23177719, -554075},
+ FieldElement{26572847, 3405927, -31701700, 12890905, -19265668, 5335866, -6493768, 2378492, 4439158, -13279347},
+ FieldElement{-22716706, 3489070, -9225266, -332753, 18875722, -1140095, 14819434, -12731527, -17717757, -5461437},
+ },
+ {
+ FieldElement{-5056483, 16566551, 15953661, 3767752, -10436499, 15627060, -820954, 2177225, 8550082, -15114165},
+ FieldElement{-18473302, 16596775, -381660, 15663611, 22860960, 15585581, -27844109, -3582739, -23260460, -8428588},
+ FieldElement{-32480551, 15707275, -8205912, -5652081, 29464558, 2713815, -22725137, 15860482, -21902570, 1494193},
+ },
+ {
+ FieldElement{-19562091, -14087393, -25583872, -9299552, 13127842, 759709, 21923482, 16529112, 8742704, 12967017},
+ FieldElement{-28464899, 1553205, 32536856, -10473729, -24691605, -406174, -8914625, -2933896, -29903758, 15553883},
+ FieldElement{21877909, 3230008, 9881174, 10539357, -4797115, 2841332, 11543572, 14513274, 19375923, -12647961},
+ },
+ {
+ FieldElement{8832269, -14495485, 13253511, 5137575, 5037871, 4078777, 24880818, -6222716, 2862653, 9455043},
+ FieldElement{29306751, 5123106, 20245049, -14149889, 9592566, 8447059, -2077124, -2990080, 15511449, 4789663},
+ FieldElement{-20679756, 7004547, 8824831, -9434977, -4045704, -3750736, -5754762, 108893, 23513200, 16652362},
+ },
+ },
+ {
+ {
+ FieldElement{-33256173, 4144782, -4476029, -6579123, 10770039, -7155542, -6650416, -12936300, -18319198, 10212860},
+ FieldElement{2756081, 8598110, 7383731, -6859892, 22312759, -1105012, 21179801, 2600940, -9988298, -12506466},
+ FieldElement{-24645692, 13317462, -30449259, -15653928, 21365574, -10869657, 11344424, 864440, -2499677, -16710063},
+ },
+ {
+ FieldElement{-26432803, 6148329, -17184412, -14474154, 18782929, -275997, -22561534, 211300, 2719757, 4940997},
+ FieldElement{-1323882, 3911313, -6948744, 14759765, -30027150, 7851207, 21690126, 8518463, 26699843, 5276295},
+ FieldElement{-13149873, -6429067, 9396249, 365013, 24703301, -10488939, 1321586, 149635, -15452774, 7159369},
+ },
+ {
+ FieldElement{9987780, -3404759, 17507962, 9505530, 9731535, -2165514, 22356009, 8312176, 22477218, -8403385},
+ FieldElement{18155857, -16504990, 19744716, 9006923, 15154154, -10538976, 24256460, -4864995, -22548173, 9334109},
+ FieldElement{2986088, -4911893, 10776628, -3473844, 10620590, -7083203, -21413845, 14253545, -22587149, 536906},
+ },
+ {
+ FieldElement{4377756, 8115836, 24567078, 15495314, 11625074, 13064599, 7390551, 10589625, 10838060, -15420424},
+ FieldElement{-19342404, 867880, 9277171, -3218459, -14431572, -1986443, 19295826, -15796950, 6378260, 699185},
+ FieldElement{7895026, 4057113, -7081772, -13077756, -17886831, -323126, -716039, 15693155, -5045064, -13373962},
+ },
+ {
+ FieldElement{-7737563, -5869402, -14566319, -7406919, 11385654, 13201616, 31730678, -10962840, -3918636, -9669325},
+ FieldElement{10188286, -15770834, -7336361, 13427543, 22223443, 14896287, 30743455, 7116568, -21786507, 5427593},
+ FieldElement{696102, 13206899, 27047647, -10632082, 15285305, -9853179, 10798490, -4578720, 19236243, 12477404},
+ },
+ {
+ FieldElement{-11229439, 11243796, -17054270, -8040865, -788228, -8167967, -3897669, 11180504, -23169516, 7733644},
+ FieldElement{17800790, -14036179, -27000429, -11766671, 23887827, 3149671, 23466177, -10538171, 10322027, 15313801},
+ FieldElement{26246234, 11968874, 32263343, -5468728, 6830755, -13323031, -15794704, -101982, -24449242, 10890804},
+ },
+ {
+ FieldElement{-31365647, 10271363, -12660625, -6267268, 16690207, -13062544, -14982212, 16484931, 25180797, -5334884},
+ FieldElement{-586574, 10376444, -32586414, -11286356, 19801893, 10997610, 2276632, 9482883, 316878, 13820577},
+ FieldElement{-9882808, -4510367, -2115506, 16457136, -11100081, 11674996, 30756178, -7515054, 30696930, -3712849},
+ },
+ {
+ FieldElement{32988917, -9603412, 12499366, 7910787, -10617257, -11931514, -7342816, -9985397, -32349517, 7392473},
+ FieldElement{-8855661, 15927861, 9866406, -3649411, -2396914, -16655781, -30409476, -9134995, 25112947, -2926644},
+ FieldElement{-2504044, -436966, 25621774, -5678772, 15085042, -5479877, -24884878, -13526194, 5537438, -13914319},
+ },
+ },
+ {
+ {
+ FieldElement{-11225584, 2320285, -9584280, 10149187, -33444663, 5808648, -14876251, -1729667, 31234590, 6090599},
+ FieldElement{-9633316, 116426, 26083934, 2897444, -6364437, -2688086, 609721, 15878753, -6970405, -9034768},
+ FieldElement{-27757857, 247744, -15194774, -9002551, 23288161, -10011936, -23869595, 6503646, 20650474, 1804084},
+ },
+ {
+ FieldElement{-27589786, 15456424, 8972517, 8469608, 15640622, 4439847, 3121995, -10329713, 27842616, -202328},
+ FieldElement{-15306973, 2839644, 22530074, 10026331, 4602058, 5048462, 28248656, 5031932, -11375082, 12714369},
+ FieldElement{20807691, -7270825, 29286141, 11421711, -27876523, -13868230, -21227475, 1035546, -19733229, 12796920},
+ },
+ {
+ FieldElement{12076899, -14301286, -8785001, -11848922, -25012791, 16400684, -17591495, -12899438, 3480665, -15182815},
+ FieldElement{-32361549, 5457597, 28548107, 7833186, 7303070, -11953545, -24363064, -15921875, -33374054, 2771025},
+ FieldElement{-21389266, 421932, 26597266, 6860826, 22486084, -6737172, -17137485, -4210226, -24552282, 15673397},
+ },
+ {
+ FieldElement{-20184622, 2338216, 19788685, -9620956, -4001265, -8740893, -20271184, 4733254, 3727144, -12934448},
+ FieldElement{6120119, 814863, -11794402, -622716, 6812205, -15747771, 2019594, 7975683, 31123697, -10958981},
+ FieldElement{30069250, -11435332, 30434654, 2958439, 18399564, -976289, 12296869, 9204260, -16432438, 9648165},
+ },
+ {
+ FieldElement{32705432, -1550977, 30705658, 7451065, -11805606, 9631813, 3305266, 5248604, -26008332, -11377501},
+ FieldElement{17219865, 2375039, -31570947, -5575615, -19459679, 9219903, 294711, 15298639, 2662509, -16297073},
+ FieldElement{-1172927, -7558695, -4366770, -4287744, -21346413, -8434326, 32087529, -1222777, 32247248, -14389861},
+ },
+ {
+ FieldElement{14312628, 1221556, 17395390, -8700143, -4945741, -8684635, -28197744, -9637817, -16027623, -13378845},
+ FieldElement{-1428825, -9678990, -9235681, 6549687, -7383069, -468664, 23046502, 9803137, 17597934, 2346211},
+ FieldElement{18510800, 15337574, 26171504, 981392, -22241552, 7827556, -23491134, -11323352, 3059833, -11782870},
+ },
+ {
+ FieldElement{10141598, 6082907, 17829293, -1947643, 9830092, 13613136, -25556636, -5544586, -33502212, 3592096},
+ FieldElement{33114168, -15889352, -26525686, -13343397, 33076705, 8716171, 1151462, 1521897, -982665, -6837803},
+ FieldElement{-32939165, -4255815, 23947181, -324178, -33072974, -12305637, -16637686, 3891704, 26353178, 693168},
+ },
+ {
+ FieldElement{30374239, 1595580, -16884039, 13186931, 4600344, 406904, 9585294, -400668, 31375464, 14369965},
+ FieldElement{-14370654, -7772529, 1510301, 6434173, -18784789, -6262728, 32732230, -13108839, 17901441, 16011505},
+ FieldElement{18171223, -11934626, -12500402, 15197122, -11038147, -15230035, -19172240, -16046376, 8764035, 12309598},
+ },
+ },
+ {
+ {
+ FieldElement{5975908, -5243188, -19459362, -9681747, -11541277, 14015782, -23665757, 1228319, 17544096, -10593782},
+ FieldElement{5811932, -1715293, 3442887, -2269310, -18367348, -8359541, -18044043, -15410127, -5565381, 12348900},
+ FieldElement{-31399660, 11407555, 25755363, 6891399, -3256938, 14872274, -24849353, 8141295, -10632534, -585479},
+ },
+ {
+ FieldElement{-12675304, 694026, -5076145, 13300344, 14015258, -14451394, -9698672, -11329050, 30944593, 1130208},
+ FieldElement{8247766, -6710942, -26562381, -7709309, -14401939, -14648910, 4652152, 2488540, 23550156, -271232},
+ FieldElement{17294316, -3788438, 7026748, 15626851, 22990044, 113481, 2267737, -5908146, -408818, -137719},
+ },
+ {
+ FieldElement{16091085, -16253926, 18599252, 7340678, 2137637, -1221657, -3364161, 14550936, 3260525, -7166271},
+ FieldElement{-4910104, -13332887, 18550887, 10864893, -16459325, -7291596, -23028869, -13204905, -12748722, 2701326},
+ FieldElement{-8574695, 16099415, 4629974, -16340524, -20786213, -6005432, -10018363, 9276971, 11329923, 1862132},
+ },
+ {
+ FieldElement{14763076, -15903608, -30918270, 3689867, 3511892, 10313526, -21951088, 12219231, -9037963, -940300},
+ FieldElement{8894987, -3446094, 6150753, 3013931, 301220, 15693451, -31981216, -2909717, -15438168, 11595570},
+ FieldElement{15214962, 3537601, -26238722, -14058872, 4418657, -15230761, 13947276, 10730794, -13489462, -4363670},
+ },
+ {
+ FieldElement{-2538306, 7682793, 32759013, 263109, -29984731, -7955452, -22332124, -10188635, 977108, 699994},
+ FieldElement{-12466472, 4195084, -9211532, 550904, -15565337, 12917920, 19118110, -439841, -30534533, -14337913},
+ FieldElement{31788461, -14507657, 4799989, 7372237, 8808585, -14747943, 9408237, -10051775, 12493932, -5409317},
+ },
+ {
+ FieldElement{-25680606, 5260744, -19235809, -6284470, -3695942, 16566087, 27218280, 2607121, 29375955, 6024730},
+ FieldElement{842132, -2794693, -4763381, -8722815, 26332018, -12405641, 11831880, 6985184, -9940361, 2854096},
+ FieldElement{-4847262, -7969331, 2516242, -5847713, 9695691, -7221186, 16512645, 960770, 12121869, 16648078},
+ },
+ {
+ FieldElement{-15218652, 14667096, -13336229, 2013717, 30598287, -464137, -31504922, -7882064, 20237806, 2838411},
+ FieldElement{-19288047, 4453152, 15298546, -16178388, 22115043, -15972604, 12544294, -13470457, 1068881, -12499905},
+ FieldElement{-9558883, -16518835, 33238498, 13506958, 30505848, -1114596, -8486907, -2630053, 12521378, 4845654},
+ },
+ {
+ FieldElement{-28198521, 10744108, -2958380, 10199664, 7759311, -13088600, 3409348, -873400, -6482306, -12885870},
+ FieldElement{-23561822, 6230156, -20382013, 10655314, -24040585, -11621172, 10477734, -1240216, -3113227, 13974498},
+ FieldElement{12966261, 15550616, -32038948, -1615346, 21025980, -629444, 5642325, 7188737, 18895762, 12629579},
+ },
+ },
+ {
+ {
+ FieldElement{14741879, -14946887, 22177208, -11721237, 1279741, 8058600, 11758140, 789443, 32195181, 3895677},
+ FieldElement{10758205, 15755439, -4509950, 9243698, -4879422, 6879879, -2204575, -3566119, -8982069, 4429647},
+ FieldElement{-2453894, 15725973, -20436342, -10410672, -5803908, -11040220, -7135870, -11642895, 18047436, -15281743},
+ },
+ {
+ FieldElement{-25173001, -11307165, 29759956, 11776784, -22262383, -15820455, 10993114, -12850837, -17620701, -9408468},
+ FieldElement{21987233, 700364, -24505048, 14972008, -7774265, -5718395, 32155026, 2581431, -29958985, 8773375},
+ FieldElement{-25568350, 454463, -13211935, 16126715, 25240068, 8594567, 20656846, 12017935, -7874389, -13920155},
+ },
+ {
+ FieldElement{6028182, 6263078, -31011806, -11301710, -818919, 2461772, -31841174, -5468042, -1721788, -2776725},
+ FieldElement{-12278994, 16624277, 987579, -5922598, 32908203, 1248608, 7719845, -4166698, 28408820, 6816612},
+ FieldElement{-10358094, -8237829, 19549651, -12169222, 22082623, 16147817, 20613181, 13982702, -10339570, 5067943},
+ },
+ {
+ FieldElement{-30505967, -3821767, 12074681, 13582412, -19877972, 2443951, -19719286, 12746132, 5331210, -10105944},
+ FieldElement{30528811, 3601899, -1957090, 4619785, -27361822, -15436388, 24180793, -12570394, 27679908, -1648928},
+ FieldElement{9402404, -13957065, 32834043, 10838634, -26580150, -13237195, 26653274, -8685565, 22611444, -12715406},
+ },
+ {
+ FieldElement{22190590, 1118029, 22736441, 15130463, -30460692, -5991321, 19189625, -4648942, 4854859, 6622139},
+ FieldElement{-8310738, -2953450, -8262579, -3388049, -10401731, -271929, 13424426, -3567227, 26404409, 13001963},
+ FieldElement{-31241838, -15415700, -2994250, 8939346, 11562230, -12840670, -26064365, -11621720, -15405155, 11020693},
+ },
+ {
+ FieldElement{1866042, -7949489, -7898649, -10301010, 12483315, 13477547, 3175636, -12424163, 28761762, 1406734},
+ FieldElement{-448555, -1777666, 13018551, 3194501, -9580420, -11161737, 24760585, -4347088, 25577411, -13378680},
+ FieldElement{-24290378, 4759345, -690653, -1852816, 2066747, 10693769, -29595790, 9884936, -9368926, 4745410},
+ },
+ {
+ FieldElement{-9141284, 6049714, -19531061, -4341411, -31260798, 9944276, -15462008, -11311852, 10931924, -11931931},
+ FieldElement{-16561513, 14112680, -8012645, 4817318, -8040464, -11414606, -22853429, 10856641, -20470770, 13434654},
+ FieldElement{22759489, -10073434, -16766264, -1871422, 13637442, -10168091, 1765144, -12654326, 28445307, -5364710},
+ },
+ {
+ FieldElement{29875063, 12493613, 2795536, -3786330, 1710620, 15181182, -10195717, -8788675, 9074234, 1167180},
+ FieldElement{-26205683, 11014233, -9842651, -2635485, -26908120, 7532294, -18716888, -9535498, 3843903, 9367684},
+ FieldElement{-10969595, -6403711, 9591134, 9582310, 11349256, 108879, 16235123, 8601684, -139197, 4242895},
+ },
+ },
+ {
+ {
+ FieldElement{22092954, -13191123, -2042793, -11968512, 32186753, -11517388, -6574341, 2470660, -27417366, 16625501},
+ FieldElement{-11057722, 3042016, 13770083, -9257922, 584236, -544855, -7770857, 2602725, -27351616, 14247413},
+ FieldElement{6314175, -10264892, -32772502, 15957557, -10157730, 168750, -8618807, 14290061, 27108877, -1180880},
+ },
+ {
+ FieldElement{-8586597, -7170966, 13241782, 10960156, -32991015, -13794596, 33547976, -11058889, -27148451, 981874},
+ FieldElement{22833440, 9293594, -32649448, -13618667, -9136966, 14756819, -22928859, -13970780, -10479804, -16197962},
+ FieldElement{-7768587, 3326786, -28111797, 10783824, 19178761, 14905060, 22680049, 13906969, -15933690, 3797899},
+ },
+ {
+ FieldElement{21721356, -4212746, -12206123, 9310182, -3882239, -13653110, 23740224, -2709232, 20491983, -8042152},
+ FieldElement{9209270, -15135055, -13256557, -6167798, -731016, 15289673, 25947805, 15286587, 30997318, -6703063},
+ FieldElement{7392032, 16618386, 23946583, -8039892, -13265164, -1533858, -14197445, -2321576, 17649998, -250080},
+ },
+ {
+ FieldElement{-9301088, -14193827, 30609526, -3049543, -25175069, -1283752, -15241566, -9525724, -2233253, 7662146},
+ FieldElement{-17558673, 1763594, -33114336, 15908610, -30040870, -12174295, 7335080, -8472199, -3174674, 3440183},
+ FieldElement{-19889700, -5977008, -24111293, -9688870, 10799743, -16571957, 40450, -4431835, 4862400, 1133},
+ },
+ {
+ FieldElement{-32856209, -7873957, -5422389, 14860950, -16319031, 7956142, 7258061, 311861, -30594991, -7379421},
+ FieldElement{-3773428, -1565936, 28985340, 7499440, 24445838, 9325937, 29727763, 16527196, 18278453, 15405622},
+ FieldElement{-4381906, 8508652, -19898366, -3674424, -5984453, 15149970, -13313598, 843523, -21875062, 13626197},
+ },
+ {
+ FieldElement{2281448, -13487055, -10915418, -2609910, 1879358, 16164207, -10783882, 3953792, 13340839, 15928663},
+ FieldElement{31727126, -7179855, -18437503, -8283652, 2875793, -16390330, -25269894, -7014826, -23452306, 5964753},
+ FieldElement{4100420, -5959452, -17179337, 6017714, -18705837, 12227141, -26684835, 11344144, 2538215, -7570755},
+ },
+ {
+ FieldElement{-9433605, 6123113, 11159803, -2156608, 30016280, 14966241, -20474983, 1485421, -629256, -15958862},
+ FieldElement{-26804558, 4260919, 11851389, 9658551, -32017107, 16367492, -20205425, -13191288, 11659922, -11115118},
+ FieldElement{26180396, 10015009, -30844224, -8581293, 5418197, 9480663, 2231568, -10170080, 33100372, -1306171},
+ },
+ {
+ FieldElement{15121113, -5201871, -10389905, 15427821, -27509937, -15992507, 21670947, 4486675, -5931810, -14466380},
+ FieldElement{16166486, -9483733, -11104130, 6023908, -31926798, -1364923, 2340060, -16254968, -10735770, -10039824},
+ FieldElement{28042865, -3557089, -12126526, 12259706, -3717498, -6945899, 6766453, -8689599, 18036436, 5803270},
+ },
+ },
+ {
+ {
+ FieldElement{-817581, 6763912, 11803561, 1585585, 10958447, -2671165, 23855391, 4598332, -6159431, -14117438},
+ FieldElement{-31031306, -14256194, 17332029, -2383520, 31312682, -5967183, 696309, 50292, -20095739, 11763584},
+ FieldElement{-594563, -2514283, -32234153, 12643980, 12650761, 14811489, 665117, -12613632, -19773211, -10713562},
+ },
+ {
+ FieldElement{30464590, -11262872, -4127476, -12734478, 19835327, -7105613, -24396175, 2075773, -17020157, 992471},
+ FieldElement{18357185, -6994433, 7766382, 16342475, -29324918, 411174, 14578841, 8080033, -11574335, -10601610},
+ FieldElement{19598397, 10334610, 12555054, 2555664, 18821899, -10339780, 21873263, 16014234, 26224780, 16452269},
+ },
+ {
+ FieldElement{-30223925, 5145196, 5944548, 16385966, 3976735, 2009897, -11377804, -7618186, -20533829, 3698650},
+ FieldElement{14187449, 3448569, -10636236, -10810935, -22663880, -3433596, 7268410, -10890444, 27394301, 12015369},
+ FieldElement{19695761, 16087646, 28032085, 12999827, 6817792, 11427614, 20244189, -1312777, -13259127, -3402461},
+ },
+ {
+ FieldElement{30860103, 12735208, -1888245, -4699734, -16974906, 2256940, -8166013, 12298312, -8550524, -10393462},
+ FieldElement{-5719826, -11245325, -1910649, 15569035, 26642876, -7587760, -5789354, -15118654, -4976164, 12651793},
+ FieldElement{-2848395, 9953421, 11531313, -5282879, 26895123, -12697089, -13118820, -16517902, 9768698, -2533218},
+ },
+ {
+ FieldElement{-24719459, 1894651, -287698, -4704085, 15348719, -8156530, 32767513, 12765450, 4940095, 10678226},
+ FieldElement{18860224, 15980149, -18987240, -1562570, -26233012, -11071856, -7843882, 13944024, -24372348, 16582019},
+ FieldElement{-15504260, 4970268, -29893044, 4175593, -20993212, -2199756, -11704054, 15444560, -11003761, 7989037},
+ },
+ {
+ FieldElement{31490452, 5568061, -2412803, 2182383, -32336847, 4531686, -32078269, 6200206, -19686113, -14800171},
+ FieldElement{-17308668, -15879940, -31522777, -2831, -32887382, 16375549, 8680158, -16371713, 28550068, -6857132},
+ FieldElement{-28126887, -5688091, 16837845, -1820458, -6850681, 12700016, -30039981, 4364038, 1155602, 5988841},
+ },
+ {
+ FieldElement{21890435, -13272907, -12624011, 12154349, -7831873, 15300496, 23148983, -4470481, 24618407, 8283181},
+ FieldElement{-33136107, -10512751, 9975416, 6841041, -31559793, 16356536, 3070187, -7025928, 1466169, 10740210},
+ FieldElement{-1509399, -15488185, -13503385, -10655916, 32799044, 909394, -13938903, -5779719, -32164649, -15327040},
+ },
+ {
+ FieldElement{3960823, -14267803, -28026090, -15918051, -19404858, 13146868, 15567327, 951507, -3260321, -573935},
+ FieldElement{24740841, 5052253, -30094131, 8961361, 25877428, 6165135, -24368180, 14397372, -7380369, -6144105},
+ FieldElement{-28888365, 3510803, -28103278, -1158478, -11238128, -10631454, -15441463, -14453128, -1625486, -6494814},
+ },
+ },
+ {
+ {
+ FieldElement{793299, -9230478, 8836302, -6235707, -27360908, -2369593, 33152843, -4885251, -9906200, -621852},
+ FieldElement{5666233, 525582, 20782575, -8038419, -24538499, 14657740, 16099374, 1468826, -6171428, -15186581},
+ FieldElement{-4859255, -3779343, -2917758, -6748019, 7778750, 11688288, -30404353, -9871238, -1558923, -9863646},
+ },
+ {
+ FieldElement{10896332, -7719704, 824275, 472601, -19460308, 3009587, 25248958, 14783338, -30581476, -15757844},
+ FieldElement{10566929, 12612572, -31944212, 11118703, -12633376, 12362879, 21752402, 8822496, 24003793, 14264025},
+ FieldElement{27713862, -7355973, -11008240, 9227530, 27050101, 2504721, 23886875, -13117525, 13958495, -5732453},
+ },
+ {
+ FieldElement{-23481610, 4867226, -27247128, 3900521, 29838369, -8212291, -31889399, -10041781, 7340521, -15410068},
+ FieldElement{4646514, -8011124, -22766023, -11532654, 23184553, 8566613, 31366726, -1381061, -15066784, -10375192},
+ FieldElement{-17270517, 12723032, -16993061, 14878794, 21619651, -6197576, 27584817, 3093888, -8843694, 3849921},
+ },
+ {
+ FieldElement{-9064912, 2103172, 25561640, -15125738, -5239824, 9582958, 32477045, -9017955, 5002294, -15550259},
+ FieldElement{-12057553, -11177906, 21115585, -13365155, 8808712, -12030708, 16489530, 13378448, -25845716, 12741426},
+ FieldElement{-5946367, 10645103, -30911586, 15390284, -3286982, -7118677, 24306472, 15852464, 28834118, -7646072},
+ },
+ {
+ FieldElement{-17335748, -9107057, -24531279, 9434953, -8472084, -583362, -13090771, 455841, 20461858, 5491305},
+ FieldElement{13669248, -16095482, -12481974, -10203039, -14569770, -11893198, -24995986, 11293807, -28588204, -9421832},
+ FieldElement{28497928, 6272777, -33022994, 14470570, 8906179, -1225630, 18504674, -14165166, 29867745, -8795943},
+ },
+ {
+ FieldElement{-16207023, 13517196, -27799630, -13697798, 24009064, -6373891, -6367600, -13175392, 22853429, -4012011},
+ FieldElement{24191378, 16712145, -13931797, 15217831, 14542237, 1646131, 18603514, -11037887, 12876623, -2112447},
+ FieldElement{17902668, 4518229, -411702, -2829247, 26878217, 5258055, -12860753, 608397, 16031844, 3723494},
+ },
+ {
+ FieldElement{-28632773, 12763728, -20446446, 7577504, 33001348, -13017745, 17558842, -7872890, 23896954, -4314245},
+ FieldElement{-20005381, -12011952, 31520464, 605201, 2543521, 5991821, -2945064, 7229064, -9919646, -8826859},
+ FieldElement{28816045, 298879, -28165016, -15920938, 19000928, -1665890, -12680833, -2949325, -18051778, -2082915},
+ },
+ {
+ FieldElement{16000882, -344896, 3493092, -11447198, -29504595, -13159789, 12577740, 16041268, -19715240, 7847707},
+ FieldElement{10151868, 10572098, 27312476, 7922682, 14825339, 4723128, -32855931, -6519018, -10020567, 3852848},
+ FieldElement{-11430470, 15697596, -21121557, -4420647, 5386314, 15063598, 16514493, -15932110, 29330899, -15076224},
+ },
+ },
+ {
+ {
+ FieldElement{-25499735, -4378794, -15222908, -6901211, 16615731, 2051784, 3303702, 15490, -27548796, 12314391},
+ FieldElement{15683520, -6003043, 18109120, -9980648, 15337968, -5997823, -16717435, 15921866, 16103996, -3731215},
+ FieldElement{-23169824, -10781249, 13588192, -1628807, -3798557, -1074929, -19273607, 5402699, -29815713, -9841101},
+ },
+ {
+ FieldElement{23190676, 2384583, -32714340, 3462154, -29903655, -1529132, -11266856, 8911517, -25205859, 2739713},
+ FieldElement{21374101, -3554250, -33524649, 9874411, 15377179, 11831242, -33529904, 6134907, 4931255, 11987849},
+ FieldElement{-7732, -2978858, -16223486, 7277597, 105524, -322051, -31480539, 13861388, -30076310, 10117930},
+ },
+ {
+ FieldElement{-29501170, -10744872, -26163768, 13051539, -25625564, 5089643, -6325503, 6704079, 12890019, 15728940},
+ FieldElement{-21972360, -11771379, -951059, -4418840, 14704840, 2695116, 903376, -10428139, 12885167, 8311031},
+ FieldElement{-17516482, 5352194, 10384213, -13811658, 7506451, 13453191, 26423267, 4384730, 1888765, -5435404},
+ },
+ {
+ FieldElement{-25817338, -3107312, -13494599, -3182506, 30896459, -13921729, -32251644, -12707869, -19464434, -3340243},
+ FieldElement{-23607977, -2665774, -526091, 4651136, 5765089, 4618330, 6092245, 14845197, 17151279, -9854116},
+ FieldElement{-24830458, -12733720, -15165978, 10367250, -29530908, -265356, 22825805, -7087279, -16866484, 16176525},
+ },
+ {
+ FieldElement{-23583256, 6564961, 20063689, 3798228, -4740178, 7359225, 2006182, -10363426, -28746253, -10197509},
+ FieldElement{-10626600, -4486402, -13320562, -5125317, 3432136, -6393229, 23632037, -1940610, 32808310, 1099883},
+ FieldElement{15030977, 5768825, -27451236, -2887299, -6427378, -15361371, -15277896, -6809350, 2051441, -15225865},
+ },
+ {
+ FieldElement{-3362323, -7239372, 7517890, 9824992, 23555850, 295369, 5148398, -14154188, -22686354, 16633660},
+ FieldElement{4577086, -16752288, 13249841, -15304328, 19958763, -14537274, 18559670, -10759549, 8402478, -9864273},
+ FieldElement{-28406330, -1051581, -26790155, -907698, -17212414, -11030789, 9453451, -14980072, 17983010, 9967138},
+ },
+ {
+ FieldElement{-25762494, 6524722, 26585488, 9969270, 24709298, 1220360, -1677990, 7806337, 17507396, 3651560},
+ FieldElement{-10420457, -4118111, 14584639, 15971087, -15768321, 8861010, 26556809, -5574557, -18553322, -11357135},
+ FieldElement{2839101, 14284142, 4029895, 3472686, 14402957, 12689363, -26642121, 8459447, -5605463, -7621941},
+ },
+ {
+ FieldElement{-4839289, -3535444, 9744961, 2871048, 25113978, 3187018, -25110813, -849066, 17258084, -7977739},
+ FieldElement{18164541, -10595176, -17154882, -1542417, 19237078, -9745295, 23357533, -15217008, 26908270, 12150756},
+ FieldElement{-30264870, -7647865, 5112249, -7036672, -1499807, -6974257, 43168, -5537701, -32302074, 16215819},
+ },
+ },
+ {
+ {
+ FieldElement{-6898905, 9824394, -12304779, -4401089, -31397141, -6276835, 32574489, 12532905, -7503072, -8675347},
+ FieldElement{-27343522, -16515468, -27151524, -10722951, 946346, 16291093, 254968, 7168080, 21676107, -1943028},
+ FieldElement{21260961, -8424752, -16831886, -11920822, -23677961, 3968121, -3651949, -6215466, -3556191, -7913075},
+ },
+ {
+ FieldElement{16544754, 13250366, -16804428, 15546242, -4583003, 12757258, -2462308, -8680336, -18907032, -9662799},
+ FieldElement{-2415239, -15577728, 18312303, 4964443, -15272530, -12653564, 26820651, 16690659, 25459437, -4564609},
+ FieldElement{-25144690, 11425020, 28423002, -11020557, -6144921, -15826224, 9142795, -2391602, -6432418, -1644817},
+ },
+ {
+ FieldElement{-23104652, 6253476, 16964147, -3768872, -25113972, -12296437, -27457225, -16344658, 6335692, 7249989},
+ FieldElement{-30333227, 13979675, 7503222, -12368314, -11956721, -4621693, -30272269, 2682242, 25993170, -12478523},
+ FieldElement{4364628, 5930691, 32304656, -10044554, -8054781, 15091131, 22857016, -10598955, 31820368, 15075278},
+ },
+ {
+ FieldElement{31879134, -8918693, 17258761, 90626, -8041836, -4917709, 24162788, -9650886, -17970238, 12833045},
+ FieldElement{19073683, 14851414, -24403169, -11860168, 7625278, 11091125, -19619190, 2074449, -9413939, 14905377},
+ FieldElement{24483667, -11935567, -2518866, -11547418, -1553130, 15355506, -25282080, 9253129, 27628530, -7555480},
+ },
+ {
+ FieldElement{17597607, 8340603, 19355617, 552187, 26198470, -3176583, 4593324, -9157582, -14110875, 15297016},
+ FieldElement{510886, 14337390, -31785257, 16638632, 6328095, 2713355, -20217417, -11864220, 8683221, 2921426},
+ FieldElement{18606791, 11874196, 27155355, -5281482, -24031742, 6265446, -25178240, -1278924, 4674690, 13890525},
+ },
+ {
+ FieldElement{13609624, 13069022, -27372361, -13055908, 24360586, 9592974, 14977157, 9835105, 4389687, 288396},
+ FieldElement{9922506, -519394, 13613107, 5883594, -18758345, -434263, -12304062, 8317628, 23388070, 16052080},
+ FieldElement{12720016, 11937594, -31970060, -5028689, 26900120, 8561328, -20155687, -11632979, -14754271, -10812892},
+ },
+ {
+ FieldElement{15961858, 14150409, 26716931, -665832, -22794328, 13603569, 11829573, 7467844, -28822128, 929275},
+ FieldElement{11038231, -11582396, -27310482, -7316562, -10498527, -16307831, -23479533, -9371869, -21393143, 2465074},
+ FieldElement{20017163, -4323226, 27915242, 1529148, 12396362, 15675764, 13817261, -9658066, 2463391, -4622140},
+ },
+ {
+ FieldElement{-16358878, -12663911, -12065183, 4996454, -1256422, 1073572, 9583558, 12851107, 4003896, 12673717},
+ FieldElement{-1731589, -15155870, -3262930, 16143082, 19294135, 13385325, 14741514, -9103726, 7903886, 2348101},
+ FieldElement{24536016, -16515207, 12715592, -3862155, 1511293, 10047386, -3842346, -7129159, -28377538, 10048127},
+ },
+ },
+ {
+ {
+ FieldElement{-12622226, -6204820, 30718825, 2591312, -10617028, 12192840, 18873298, -7297090, -32297756, 15221632},
+ FieldElement{-26478122, -11103864, 11546244, -1852483, 9180880, 7656409, -21343950, 2095755, 29769758, 6593415},
+ FieldElement{-31994208, -2907461, 4176912, 3264766, 12538965, -868111, 26312345, -6118678, 30958054, 8292160},
+ },
+ {
+ FieldElement{31429822, -13959116, 29173532, 15632448, 12174511, -2760094, 32808831, 3977186, 26143136, -3148876},
+ FieldElement{22648901, 1402143, -22799984, 13746059, 7936347, 365344, -8668633, -1674433, -3758243, -2304625},
+ FieldElement{-15491917, 8012313, -2514730, -12702462, -23965846, -10254029, -1612713, -1535569, -16664475, 8194478},
+ },
+ {
+ FieldElement{27338066, -7507420, -7414224, 10140405, -19026427, -6589889, 27277191, 8855376, 28572286, 3005164},
+ FieldElement{26287124, 4821776, 25476601, -4145903, -3764513, -15788984, -18008582, 1182479, -26094821, -13079595},
+ FieldElement{-7171154, 3178080, 23970071, 6201893, -17195577, -4489192, -21876275, -13982627, 32208683, -1198248},
+ },
+ {
+ FieldElement{-16657702, 2817643, -10286362, 14811298, 6024667, 13349505, -27315504, -10497842, -27672585, -11539858},
+ FieldElement{15941029, -9405932, -21367050, 8062055, 31876073, -238629, -15278393, -1444429, 15397331, -4130193},
+ FieldElement{8934485, -13485467, -23286397, -13423241, -32446090, 14047986, 31170398, -1441021, -27505566, 15087184},
+ },
+ {
+ FieldElement{-18357243, -2156491, 24524913, -16677868, 15520427, -6360776, -15502406, 11461896, 16788528, -5868942},
+ FieldElement{-1947386, 16013773, 21750665, 3714552, -17401782, -16055433, -3770287, -10323320, 31322514, -11615635},
+ FieldElement{21426655, -5650218, -13648287, -5347537, -28812189, -4920970, -18275391, -14621414, 13040862, -12112948},
+ },
+ {
+ FieldElement{11293895, 12478086, -27136401, 15083750, -29307421, 14748872, 14555558, -13417103, 1613711, 4896935},
+ FieldElement{-25894883, 15323294, -8489791, -8057900, 25967126, -13425460, 2825960, -4897045, -23971776, -11267415},
+ FieldElement{-15924766, -5229880, -17443532, 6410664, 3622847, 10243618, 20615400, 12405433, -23753030, -8436416},
+ },
+ {
+ FieldElement{-7091295, 12556208, -20191352, 9025187, -17072479, 4333801, 4378436, 2432030, 23097949, -566018},
+ FieldElement{4565804, -16025654, 20084412, -7842817, 1724999, 189254, 24767264, 10103221, -18512313, 2424778},
+ FieldElement{366633, -11976806, 8173090, -6890119, 30788634, 5745705, -7168678, 1344109, -3642553, 12412659},
+ },
+ {
+ FieldElement{-24001791, 7690286, 14929416, -168257, -32210835, -13412986, 24162697, -15326504, -3141501, 11179385},
+ FieldElement{18289522, -14724954, 8056945, 16430056, -21729724, 7842514, -6001441, -1486897, -18684645, -11443503},
+ FieldElement{476239, 6601091, -6152790, -9723375, 17503545, -4863900, 27672959, 13403813, 11052904, 5219329},
+ },
+ },
+ {
+ {
+ FieldElement{20678546, -8375738, -32671898, 8849123, -5009758, 14574752, 31186971, -3973730, 9014762, -8579056},
+ FieldElement{-13644050, -10350239, -15962508, 5075808, -1514661, -11534600, -33102500, 9160280, 8473550, -3256838},
+ FieldElement{24900749, 14435722, 17209120, -15292541, -22592275, 9878983, -7689309, -16335821, -24568481, 11788948},
+ },
+ {
+ FieldElement{-3118155, -11395194, -13802089, 14797441, 9652448, -6845904, -20037437, 10410733, -24568470, -1458691},
+ FieldElement{-15659161, 16736706, -22467150, 10215878, -9097177, 7563911, 11871841, -12505194, -18513325, 8464118},
+ FieldElement{-23400612, 8348507, -14585951, -861714, -3950205, -6373419, 14325289, 8628612, 33313881, -8370517},
+ },
+ {
+ FieldElement{-20186973, -4967935, 22367356, 5271547, -1097117, -4788838, -24805667, -10236854, -8940735, -5818269},
+ FieldElement{-6948785, -1795212, -32625683, -16021179, 32635414, -7374245, 15989197, -12838188, 28358192, -4253904},
+ FieldElement{-23561781, -2799059, -32351682, -1661963, -9147719, 10429267, -16637684, 4072016, -5351664, 5596589},
+ },
+ {
+ FieldElement{-28236598, -3390048, 12312896, 6213178, 3117142, 16078565, 29266239, 2557221, 1768301, 15373193},
+ FieldElement{-7243358, -3246960, -4593467, -7553353, -127927, -912245, -1090902, -4504991, -24660491, 3442910},
+ FieldElement{-30210571, 5124043, 14181784, 8197961, 18964734, -11939093, 22597931, 7176455, -18585478, 13365930},
+ },
+ {
+ FieldElement{-7877390, -1499958, 8324673, 4690079, 6261860, 890446, 24538107, -8570186, -9689599, -3031667},
+ FieldElement{25008904, -10771599, -4305031, -9638010, 16265036, 15721635, 683793, -11823784, 15723479, -15163481},
+ FieldElement{-9660625, 12374379, -27006999, -7026148, -7724114, -12314514, 11879682, 5400171, 519526, -1235876},
+ },
+ {
+ FieldElement{22258397, -16332233, -7869817, 14613016, -22520255, -2950923, -20353881, 7315967, 16648397, 7605640},
+ FieldElement{-8081308, -8464597, -8223311, 9719710, 19259459, -15348212, 23994942, -5281555, -9468848, 4763278},
+ FieldElement{-21699244, 9220969, -15730624, 1084137, -25476107, -2852390, 31088447, -7764523, -11356529, 728112},
+ },
+ {
+ FieldElement{26047220, -11751471, -6900323, -16521798, 24092068, 9158119, -4273545, -12555558, -29365436, -5498272},
+ FieldElement{17510331, -322857, 5854289, 8403524, 17133918, -3112612, -28111007, 12327945, 10750447, 10014012},
+ FieldElement{-10312768, 3936952, 9156313, -8897683, 16498692, -994647, -27481051, -666732, 3424691, 7540221},
+ },
+ {
+ FieldElement{30322361, -6964110, 11361005, -4143317, 7433304, 4989748, -7071422, -16317219, -9244265, 15258046},
+ FieldElement{13054562, -2779497, 19155474, 469045, -12482797, 4566042, 5631406, 2711395, 1062915, -5136345},
+ FieldElement{-19240248, -11254599, -29509029, -7499965, -5835763, 13005411, -6066489, 12194497, 32960380, 1459310},
+ },
+ },
+ {
+ {
+ FieldElement{19852034, 7027924, 23669353, 10020366, 8586503, -6657907, 394197, -6101885, 18638003, -11174937},
+ FieldElement{31395534, 15098109, 26581030, 8030562, -16527914, -5007134, 9012486, -7584354, -6643087, -5442636},
+ FieldElement{-9192165, -2347377, -1997099, 4529534, 25766844, 607986, -13222, 9677543, -32294889, -6456008},
+ },
+ {
+ FieldElement{-2444496, -149937, 29348902, 8186665, 1873760, 12489863, -30934579, -7839692, -7852844, -8138429},
+ FieldElement{-15236356, -15433509, 7766470, 746860, 26346930, -10221762, -27333451, 10754588, -9431476, 5203576},
+ FieldElement{31834314, 14135496, -770007, 5159118, 20917671, -16768096, -7467973, -7337524, 31809243, 7347066},
+ },
+ {
+ FieldElement{-9606723, -11874240, 20414459, 13033986, 13716524, -11691881, 19797970, -12211255, 15192876, -2087490},
+ FieldElement{-12663563, -2181719, 1168162, -3804809, 26747877, -14138091, 10609330, 12694420, 33473243, -13382104},
+ FieldElement{33184999, 11180355, 15832085, -11385430, -1633671, 225884, 15089336, -11023903, -6135662, 14480053},
+ },
+ {
+ FieldElement{31308717, -5619998, 31030840, -1897099, 15674547, -6582883, 5496208, 13685227, 27595050, 8737275},
+ FieldElement{-20318852, -15150239, 10933843, -16178022, 8335352, -7546022, -31008351, -12610604, 26498114, 66511},
+ FieldElement{22644454, -8761729, -16671776, 4884562, -3105614, -13559366, 30540766, -4286747, -13327787, -7515095},
+ },
+ {
+ FieldElement{-28017847, 9834845, 18617207, -2681312, -3401956, -13307506, 8205540, 13585437, -17127465, 15115439},
+ FieldElement{23711543, -672915, 31206561, -8362711, 6164647, -9709987, -33535882, -1426096, 8236921, 16492939},
+ FieldElement{-23910559, -13515526, -26299483, -4503841, 25005590, -7687270, 19574902, 10071562, 6708380, -6222424},
+ },
+ {
+ FieldElement{2101391, -4930054, 19702731, 2367575, -15427167, 1047675, 5301017, 9328700, 29955601, -11678310},
+ FieldElement{3096359, 9271816, -21620864, -15521844, -14847996, -7592937, -25892142, -12635595, -9917575, 6216608},
+ FieldElement{-32615849, 338663, -25195611, 2510422, -29213566, -13820213, 24822830, -6146567, -26767480, 7525079},
+ },
+ {
+ FieldElement{-23066649, -13985623, 16133487, -7896178, -3389565, 778788, -910336, -2782495, -19386633, 11994101},
+ FieldElement{21691500, -13624626, -641331, -14367021, 3285881, -3483596, -25064666, 9718258, -7477437, 13381418},
+ FieldElement{18445390, -4202236, 14979846, 11622458, -1727110, -3582980, 23111648, -6375247, 28535282, 15779576},
+ },
+ {
+ FieldElement{30098053, 3089662, -9234387, 16662135, -21306940, 11308411, -14068454, 12021730, 9955285, -16303356},
+ FieldElement{9734894, -14576830, -7473633, -9138735, 2060392, 11313496, -18426029, 9924399, 20194861, 13380996},
+ FieldElement{-26378102, -7965207, -22167821, 15789297, -18055342, -6168792, -1984914, 15707771, 26342023, 10146099},
+ },
+ },
+ {
+ {
+ FieldElement{-26016874, -219943, 21339191, -41388, 19745256, -2878700, -29637280, 2227040, 21612326, -545728},
+ FieldElement{-13077387, 1184228, 23562814, -5970442, -20351244, -6348714, 25764461, 12243797, -20856566, 11649658},
+ FieldElement{-10031494, 11262626, 27384172, 2271902, 26947504, -15997771, 39944, 6114064, 33514190, 2333242},
+ },
+ {
+ FieldElement{-21433588, -12421821, 8119782, 7219913, -21830522, -9016134, -6679750, -12670638, 24350578, -13450001},
+ FieldElement{-4116307, -11271533, -23886186, 4843615, -30088339, 690623, -31536088, -10406836, 8317860, 12352766},
+ FieldElement{18200138, -14475911, -33087759, -2696619, -23702521, -9102511, -23552096, -2287550, 20712163, 6719373},
+ },
+ {
+ FieldElement{26656208, 6075253, -7858556, 1886072, -28344043, 4262326, 11117530, -3763210, 26224235, -3297458},
+ FieldElement{-17168938, -14854097, -3395676, -16369877, -19954045, 14050420, 21728352, 9493610, 18620611, -16428628},
+ FieldElement{-13323321, 13325349, 11432106, 5964811, 18609221, 6062965, -5269471, -9725556, -30701573, -16479657},
+ },
+ {
+ FieldElement{-23860538, -11233159, 26961357, 1640861, -32413112, -16737940, 12248509, -5240639, 13735342, 1934062},
+ FieldElement{25089769, 6742589, 17081145, -13406266, 21909293, -16067981, -15136294, -3765346, -21277997, 5473616},
+ FieldElement{31883677, -7961101, 1083432, -11572403, 22828471, 13290673, -7125085, 12469656, 29111212, -5451014},
+ },
+ {
+ FieldElement{24244947, -15050407, -26262976, 2791540, -14997599, 16666678, 24367466, 6388839, -10295587, 452383},
+ FieldElement{-25640782, -3417841, 5217916, 16224624, 19987036, -4082269, -24236251, -5915248, 15766062, 8407814},
+ FieldElement{-20406999, 13990231, 15495425, 16395525, 5377168, 15166495, -8917023, -4388953, -8067909, 2276718},
+ },
+ {
+ FieldElement{30157918, 12924066, -17712050, 9245753, 19895028, 3368142, -23827587, 5096219, 22740376, -7303417},
+ FieldElement{2041139, -14256350, 7783687, 13876377, -25946985, -13352459, 24051124, 13742383, -15637599, 13295222},
+ FieldElement{33338237, -8505733, 12532113, 7977527, 9106186, -1715251, -17720195, -4612972, -4451357, -14669444},
+ },
+ {
+ FieldElement{-20045281, 5454097, -14346548, 6447146, 28862071, 1883651, -2469266, -4141880, 7770569, 9620597},
+ FieldElement{23208068, 7979712, 33071466, 8149229, 1758231, -10834995, 30945528, -1694323, -33502340, -14767970},
+ FieldElement{1439958, -16270480, -1079989, -793782, 4625402, 10647766, -5043801, 1220118, 30494170, -11440799},
+ },
+ {
+ FieldElement{-5037580, -13028295, -2970559, -3061767, 15640974, -6701666, -26739026, 926050, -1684339, -13333647},
+ FieldElement{13908495, -3549272, 30919928, -6273825, -21521863, 7989039, 9021034, 9078865, 3353509, 4033511},
+ FieldElement{-29663431, -15113610, 32259991, -344482, 24295849, -12912123, 23161163, 8839127, 27485041, 7356032},
+ },
+ },
+ {
+ {
+ FieldElement{9661027, 705443, 11980065, -5370154, -1628543, 14661173, -6346142, 2625015, 28431036, -16771834},
+ FieldElement{-23839233, -8311415, -25945511, 7480958, -17681669, -8354183, -22545972, 14150565, 15970762, 4099461},
+ FieldElement{29262576, 16756590, 26350592, -8793563, 8529671, -11208050, 13617293, -9937143, 11465739, 8317062},
+ },
+ {
+ FieldElement{-25493081, -6962928, 32500200, -9419051, -23038724, -2302222, 14898637, 3848455, 20969334, -5157516},
+ FieldElement{-20384450, -14347713, -18336405, 13884722, -33039454, 2842114, -21610826, -3649888, 11177095, 14989547},
+ FieldElement{-24496721, -11716016, 16959896, 2278463, 12066309, 10137771, 13515641, 2581286, -28487508, 9930240},
+ },
+ {
+ FieldElement{-17751622, -2097826, 16544300, -13009300, -15914807, -14949081, 18345767, -13403753, 16291481, -5314038},
+ FieldElement{-33229194, 2553288, 32678213, 9875984, 8534129, 6889387, -9676774, 6957617, 4368891, 9788741},
+ FieldElement{16660756, 7281060, -10830758, 12911820, 20108584, -8101676, -21722536, -8613148, 16250552, -11111103},
+ },
+ {
+ FieldElement{-19765507, 2390526, -16551031, 14161980, 1905286, 6414907, 4689584, 10604807, -30190403, 4782747},
+ FieldElement{-1354539, 14736941, -7367442, -13292886, 7710542, -14155590, -9981571, 4383045, 22546403, 437323},
+ FieldElement{31665577, -12180464, -16186830, 1491339, -18368625, 3294682, 27343084, 2786261, -30633590, -14097016},
+ },
+ {
+ FieldElement{-14467279, -683715, -33374107, 7448552, 19294360, 14334329, -19690631, 2355319, -19284671, -6114373},
+ FieldElement{15121312, -15796162, 6377020, -6031361, -10798111, -12957845, 18952177, 15496498, -29380133, 11754228},
+ FieldElement{-2637277, -13483075, 8488727, -14303896, 12728761, -1622493, 7141596, 11724556, 22761615, -10134141},
+ },
+ {
+ FieldElement{16918416, 11729663, -18083579, 3022987, -31015732, -13339659, -28741185, -12227393, 32851222, 11717399},
+ FieldElement{11166634, 7338049, -6722523, 4531520, -29468672, -7302055, 31474879, 3483633, -1193175, -4030831},
+ FieldElement{-185635, 9921305, 31456609, -13536438, -12013818, 13348923, 33142652, 6546660, -19985279, -3948376},
+ },
+ {
+ FieldElement{-32460596, 11266712, -11197107, -7899103, 31703694, 3855903, -8537131, -12833048, -30772034, -15486313},
+ FieldElement{-18006477, 12709068, 3991746, -6479188, -21491523, -10550425, -31135347, -16049879, 10928917, 3011958},
+ FieldElement{-6957757, -15594337, 31696059, 334240, 29576716, 14796075, -30831056, -12805180, 18008031, 10258577},
+ },
+ {
+ FieldElement{-22448644, 15655569, 7018479, -4410003, -30314266, -1201591, -1853465, 1367120, 25127874, 6671743},
+ FieldElement{29701166, -14373934, -10878120, 9279288, -17568, 13127210, 21382910, 11042292, 25838796, 4642684},
+ FieldElement{-20430234, 14955537, -24126347, 8124619, -5369288, -5990470, 30468147, -13900640, 18423289, 4177476},
+ },
+ },
+}
diff --git a/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go b/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go
new file mode 100644
index 0000000..fd03c25
--- /dev/null
+++ b/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go
@@ -0,0 +1,1793 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package edwards25519
+
+import "encoding/binary"
+
+// This code is a port of the public domain, “ref10” implementation of ed25519
+// from SUPERCOP.
+
+// FieldElement represents an element of the field GF(2^255 - 19). An element
+// t, entries t[0]...t[9], represents the integer t[0]+2^26 t[1]+2^51 t[2]+2^77
+// t[3]+2^102 t[4]+...+2^230 t[9]. Bounds on each t[i] vary depending on
+// context.
+type FieldElement [10]int32
+
+var zero FieldElement
+
+func FeZero(fe *FieldElement) {
+ copy(fe[:], zero[:])
+}
+
+func FeOne(fe *FieldElement) {
+ FeZero(fe)
+ fe[0] = 1
+}
+
+func FeAdd(dst, a, b *FieldElement) {
+ dst[0] = a[0] + b[0]
+ dst[1] = a[1] + b[1]
+ dst[2] = a[2] + b[2]
+ dst[3] = a[3] + b[3]
+ dst[4] = a[4] + b[4]
+ dst[5] = a[5] + b[5]
+ dst[6] = a[6] + b[6]
+ dst[7] = a[7] + b[7]
+ dst[8] = a[8] + b[8]
+ dst[9] = a[9] + b[9]
+}
+
+func FeSub(dst, a, b *FieldElement) {
+ dst[0] = a[0] - b[0]
+ dst[1] = a[1] - b[1]
+ dst[2] = a[2] - b[2]
+ dst[3] = a[3] - b[3]
+ dst[4] = a[4] - b[4]
+ dst[5] = a[5] - b[5]
+ dst[6] = a[6] - b[6]
+ dst[7] = a[7] - b[7]
+ dst[8] = a[8] - b[8]
+ dst[9] = a[9] - b[9]
+}
+
+func FeCopy(dst, src *FieldElement) {
+ copy(dst[:], src[:])
+}
+
+// Replace (f,g) with (g,g) if b == 1;
+// replace (f,g) with (f,g) if b == 0.
+//
+// Preconditions: b in {0,1}.
+func FeCMove(f, g *FieldElement, b int32) {
+ b = -b
+ f[0] ^= b & (f[0] ^ g[0])
+ f[1] ^= b & (f[1] ^ g[1])
+ f[2] ^= b & (f[2] ^ g[2])
+ f[3] ^= b & (f[3] ^ g[3])
+ f[4] ^= b & (f[4] ^ g[4])
+ f[5] ^= b & (f[5] ^ g[5])
+ f[6] ^= b & (f[6] ^ g[6])
+ f[7] ^= b & (f[7] ^ g[7])
+ f[8] ^= b & (f[8] ^ g[8])
+ f[9] ^= b & (f[9] ^ g[9])
+}
+
+func load3(in []byte) int64 {
+ var r int64
+ r = int64(in[0])
+ r |= int64(in[1]) << 8
+ r |= int64(in[2]) << 16
+ return r
+}
+
+func load4(in []byte) int64 {
+ var r int64
+ r = int64(in[0])
+ r |= int64(in[1]) << 8
+ r |= int64(in[2]) << 16
+ r |= int64(in[3]) << 24
+ return r
+}
+
+func FeFromBytes(dst *FieldElement, src *[32]byte) {
+ h0 := load4(src[:])
+ h1 := load3(src[4:]) << 6
+ h2 := load3(src[7:]) << 5
+ h3 := load3(src[10:]) << 3
+ h4 := load3(src[13:]) << 2
+ h5 := load4(src[16:])
+ h6 := load3(src[20:]) << 7
+ h7 := load3(src[23:]) << 5
+ h8 := load3(src[26:]) << 4
+ h9 := (load3(src[29:]) & 8388607) << 2
+
+ FeCombine(dst, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
+}
+
+// FeToBytes marshals h to s.
+// Preconditions:
+// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
+//
+// Write p=2^255-19; q=floor(h/p).
+// Basic claim: q = floor(2^(-255)(h + 19 2^(-25)h9 + 2^(-1))).
+//
+// Proof:
+// Have |h|<=p so |q|<=1 so |19^2 2^(-255) q|<1/4.
+// Also have |h-2^230 h9|<2^230 so |19 2^(-255)(h-2^230 h9)|<1/4.
+//
+// Write y=2^(-1)-19^2 2^(-255)q-19 2^(-255)(h-2^230 h9).
+// Then 0<y<1.
+//
+// Write r=h-pq.
+// Have 0<=r<=p-1=2^255-20.
+// Thus 0<=r+19(2^-255)r<r+19(2^-255)2^255<=2^255-1.
+//
+// Write x=r+19(2^-255)r+y.
+// Then 0<x<2^255 so floor(2^(-255)x) = 0 so floor(q+2^(-255)x) = q.
+//
+// Have q+2^(-255)x = 2^(-255)(h + 19 2^(-25) h9 + 2^(-1))
+// so floor(2^(-255)(h + 19 2^(-25) h9 + 2^(-1))) = q.
+func FeToBytes(s *[32]byte, h *FieldElement) {
+ var carry [10]int32
+
+ q := (19*h[9] + (1 << 24)) >> 25
+ q = (h[0] + q) >> 26
+ q = (h[1] + q) >> 25
+ q = (h[2] + q) >> 26
+ q = (h[3] + q) >> 25
+ q = (h[4] + q) >> 26
+ q = (h[5] + q) >> 25
+ q = (h[6] + q) >> 26
+ q = (h[7] + q) >> 25
+ q = (h[8] + q) >> 26
+ q = (h[9] + q) >> 25
+
+ // Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20.
+ h[0] += 19 * q
+ // Goal: Output h-2^255 q, which is between 0 and 2^255-20.
+
+ carry[0] = h[0] >> 26
+ h[1] += carry[0]
+ h[0] -= carry[0] << 26
+ carry[1] = h[1] >> 25
+ h[2] += carry[1]
+ h[1] -= carry[1] << 25
+ carry[2] = h[2] >> 26
+ h[3] += carry[2]
+ h[2] -= carry[2] << 26
+ carry[3] = h[3] >> 25
+ h[4] += carry[3]
+ h[3] -= carry[3] << 25
+ carry[4] = h[4] >> 26
+ h[5] += carry[4]
+ h[4] -= carry[4] << 26
+ carry[5] = h[5] >> 25
+ h[6] += carry[5]
+ h[5] -= carry[5] << 25
+ carry[6] = h[6] >> 26
+ h[7] += carry[6]
+ h[6] -= carry[6] << 26
+ carry[7] = h[7] >> 25
+ h[8] += carry[7]
+ h[7] -= carry[7] << 25
+ carry[8] = h[8] >> 26
+ h[9] += carry[8]
+ h[8] -= carry[8] << 26
+ carry[9] = h[9] >> 25
+ h[9] -= carry[9] << 25
+ // h10 = carry9
+
+ // Goal: Output h[0]+...+2^255 h10-2^255 q, which is between 0 and 2^255-20.
+ // Have h[0]+...+2^230 h[9] between 0 and 2^255-1;
+ // evidently 2^255 h10-2^255 q = 0.
+ // Goal: Output h[0]+...+2^230 h[9].
+
+ s[0] = byte(h[0] >> 0)
+ s[1] = byte(h[0] >> 8)
+ s[2] = byte(h[0] >> 16)
+ s[3] = byte((h[0] >> 24) | (h[1] << 2))
+ s[4] = byte(h[1] >> 6)
+ s[5] = byte(h[1] >> 14)
+ s[6] = byte((h[1] >> 22) | (h[2] << 3))
+ s[7] = byte(h[2] >> 5)
+ s[8] = byte(h[2] >> 13)
+ s[9] = byte((h[2] >> 21) | (h[3] << 5))
+ s[10] = byte(h[3] >> 3)
+ s[11] = byte(h[3] >> 11)
+ s[12] = byte((h[3] >> 19) | (h[4] << 6))
+ s[13] = byte(h[4] >> 2)
+ s[14] = byte(h[4] >> 10)
+ s[15] = byte(h[4] >> 18)
+ s[16] = byte(h[5] >> 0)
+ s[17] = byte(h[5] >> 8)
+ s[18] = byte(h[5] >> 16)
+ s[19] = byte((h[5] >> 24) | (h[6] << 1))
+ s[20] = byte(h[6] >> 7)
+ s[21] = byte(h[6] >> 15)
+ s[22] = byte((h[6] >> 23) | (h[7] << 3))
+ s[23] = byte(h[7] >> 5)
+ s[24] = byte(h[7] >> 13)
+ s[25] = byte((h[7] >> 21) | (h[8] << 4))
+ s[26] = byte(h[8] >> 4)
+ s[27] = byte(h[8] >> 12)
+ s[28] = byte((h[8] >> 20) | (h[9] << 6))
+ s[29] = byte(h[9] >> 2)
+ s[30] = byte(h[9] >> 10)
+ s[31] = byte(h[9] >> 18)
+}
+
+func FeIsNegative(f *FieldElement) byte {
+ var s [32]byte
+ FeToBytes(&s, f)
+ return s[0] & 1
+}
+
+func FeIsNonZero(f *FieldElement) int32 {
+ var s [32]byte
+ FeToBytes(&s, f)
+ var x uint8
+ for _, b := range s {
+ x |= b
+ }
+ x |= x >> 4
+ x |= x >> 2
+ x |= x >> 1
+ return int32(x & 1)
+}
+
+// FeNeg sets h = -f
+//
+// Preconditions:
+// |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
+//
+// Postconditions:
+// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
+func FeNeg(h, f *FieldElement) {
+ h[0] = -f[0]
+ h[1] = -f[1]
+ h[2] = -f[2]
+ h[3] = -f[3]
+ h[4] = -f[4]
+ h[5] = -f[5]
+ h[6] = -f[6]
+ h[7] = -f[7]
+ h[8] = -f[8]
+ h[9] = -f[9]
+}
+
+func FeCombine(h *FieldElement, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 int64) {
+ var c0, c1, c2, c3, c4, c5, c6, c7, c8, c9 int64
+
+ /*
+ |h0| <= (1.1*1.1*2^52*(1+19+19+19+19)+1.1*1.1*2^50*(38+38+38+38+38))
+ i.e. |h0| <= 1.2*2^59; narrower ranges for h2, h4, h6, h8
+ |h1| <= (1.1*1.1*2^51*(1+1+19+19+19+19+19+19+19+19))
+ i.e. |h1| <= 1.5*2^58; narrower ranges for h3, h5, h7, h9
+ */
+
+ c0 = (h0 + (1 << 25)) >> 26
+ h1 += c0
+ h0 -= c0 << 26
+ c4 = (h4 + (1 << 25)) >> 26
+ h5 += c4
+ h4 -= c4 << 26
+ /* |h0| <= 2^25 */
+ /* |h4| <= 2^25 */
+ /* |h1| <= 1.51*2^58 */
+ /* |h5| <= 1.51*2^58 */
+
+ c1 = (h1 + (1 << 24)) >> 25
+ h2 += c1
+ h1 -= c1 << 25
+ c5 = (h5 + (1 << 24)) >> 25
+ h6 += c5
+ h5 -= c5 << 25
+ /* |h1| <= 2^24; from now on fits into int32 */
+ /* |h5| <= 2^24; from now on fits into int32 */
+ /* |h2| <= 1.21*2^59 */
+ /* |h6| <= 1.21*2^59 */
+
+ c2 = (h2 + (1 << 25)) >> 26
+ h3 += c2
+ h2 -= c2 << 26
+ c6 = (h6 + (1 << 25)) >> 26
+ h7 += c6
+ h6 -= c6 << 26
+ /* |h2| <= 2^25; from now on fits into int32 unchanged */
+ /* |h6| <= 2^25; from now on fits into int32 unchanged */
+ /* |h3| <= 1.51*2^58 */
+ /* |h7| <= 1.51*2^58 */
+
+ c3 = (h3 + (1 << 24)) >> 25
+ h4 += c3
+ h3 -= c3 << 25
+ c7 = (h7 + (1 << 24)) >> 25
+ h8 += c7
+ h7 -= c7 << 25
+ /* |h3| <= 2^24; from now on fits into int32 unchanged */
+ /* |h7| <= 2^24; from now on fits into int32 unchanged */
+ /* |h4| <= 1.52*2^33 */
+ /* |h8| <= 1.52*2^33 */
+
+ c4 = (h4 + (1 << 25)) >> 26
+ h5 += c4
+ h4 -= c4 << 26
+ c8 = (h8 + (1 << 25)) >> 26
+ h9 += c8
+ h8 -= c8 << 26
+ /* |h4| <= 2^25; from now on fits into int32 unchanged */
+ /* |h8| <= 2^25; from now on fits into int32 unchanged */
+ /* |h5| <= 1.01*2^24 */
+ /* |h9| <= 1.51*2^58 */
+
+ c9 = (h9 + (1 << 24)) >> 25
+ h0 += c9 * 19
+ h9 -= c9 << 25
+ /* |h9| <= 2^24; from now on fits into int32 unchanged */
+ /* |h0| <= 1.8*2^37 */
+
+ c0 = (h0 + (1 << 25)) >> 26
+ h1 += c0
+ h0 -= c0 << 26
+ /* |h0| <= 2^25; from now on fits into int32 unchanged */
+ /* |h1| <= 1.01*2^24 */
+
+ h[0] = int32(h0)
+ h[1] = int32(h1)
+ h[2] = int32(h2)
+ h[3] = int32(h3)
+ h[4] = int32(h4)
+ h[5] = int32(h5)
+ h[6] = int32(h6)
+ h[7] = int32(h7)
+ h[8] = int32(h8)
+ h[9] = int32(h9)
+}
+
+// FeMul calculates h = f * g
+// Can overlap h with f or g.
+//
+// Preconditions:
+// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
+// |g| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
+//
+// Postconditions:
+// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
+//
+// Notes on implementation strategy:
+//
+// Using schoolbook multiplication.
+// Karatsuba would save a little in some cost models.
+//
+// Most multiplications by 2 and 19 are 32-bit precomputations;
+// cheaper than 64-bit postcomputations.
+//
+// There is one remaining multiplication by 19 in the carry chain;
+// one *19 precomputation can be merged into this,
+// but the resulting data flow is considerably less clean.
+//
+// There are 12 carries below.
+// 10 of them are 2-way parallelizable and vectorizable.
+// Can get away with 11 carries, but then data flow is much deeper.
+//
+// With tighter constraints on inputs, can squeeze carries into int32.
+func FeMul(h, f, g *FieldElement) {
+ f0 := int64(f[0])
+ f1 := int64(f[1])
+ f2 := int64(f[2])
+ f3 := int64(f[3])
+ f4 := int64(f[4])
+ f5 := int64(f[5])
+ f6 := int64(f[6])
+ f7 := int64(f[7])
+ f8 := int64(f[8])
+ f9 := int64(f[9])
+
+ f1_2 := int64(2 * f[1])
+ f3_2 := int64(2 * f[3])
+ f5_2 := int64(2 * f[5])
+ f7_2 := int64(2 * f[7])
+ f9_2 := int64(2 * f[9])
+
+ g0 := int64(g[0])
+ g1 := int64(g[1])
+ g2 := int64(g[2])
+ g3 := int64(g[3])
+ g4 := int64(g[4])
+ g5 := int64(g[5])
+ g6 := int64(g[6])
+ g7 := int64(g[7])
+ g8 := int64(g[8])
+ g9 := int64(g[9])
+
+ g1_19 := int64(19 * g[1]) /* 1.4*2^29 */
+ g2_19 := int64(19 * g[2]) /* 1.4*2^30; still ok */
+ g3_19 := int64(19 * g[3])
+ g4_19 := int64(19 * g[4])
+ g5_19 := int64(19 * g[5])
+ g6_19 := int64(19 * g[6])
+ g7_19 := int64(19 * g[7])
+ g8_19 := int64(19 * g[8])
+ g9_19 := int64(19 * g[9])
+
+ h0 := f0*g0 + f1_2*g9_19 + f2*g8_19 + f3_2*g7_19 + f4*g6_19 + f5_2*g5_19 + f6*g4_19 + f7_2*g3_19 + f8*g2_19 + f9_2*g1_19
+ h1 := f0*g1 + f1*g0 + f2*g9_19 + f3*g8_19 + f4*g7_19 + f5*g6_19 + f6*g5_19 + f7*g4_19 + f8*g3_19 + f9*g2_19
+ h2 := f0*g2 + f1_2*g1 + f2*g0 + f3_2*g9_19 + f4*g8_19 + f5_2*g7_19 + f6*g6_19 + f7_2*g5_19 + f8*g4_19 + f9_2*g3_19
+ h3 := f0*g3 + f1*g2 + f2*g1 + f3*g0 + f4*g9_19 + f5*g8_19 + f6*g7_19 + f7*g6_19 + f8*g5_19 + f9*g4_19
+ h4 := f0*g4 + f1_2*g3 + f2*g2 + f3_2*g1 + f4*g0 + f5_2*g9_19 + f6*g8_19 + f7_2*g7_19 + f8*g6_19 + f9_2*g5_19
+ h5 := f0*g5 + f1*g4 + f2*g3 + f3*g2 + f4*g1 + f5*g0 + f6*g9_19 + f7*g8_19 + f8*g7_19 + f9*g6_19
+ h6 := f0*g6 + f1_2*g5 + f2*g4 + f3_2*g3 + f4*g2 + f5_2*g1 + f6*g0 + f7_2*g9_19 + f8*g8_19 + f9_2*g7_19
+ h7 := f0*g7 + f1*g6 + f2*g5 + f3*g4 + f4*g3 + f5*g2 + f6*g1 + f7*g0 + f8*g9_19 + f9*g8_19
+ h8 := f0*g8 + f1_2*g7 + f2*g6 + f3_2*g5 + f4*g4 + f5_2*g3 + f6*g2 + f7_2*g1 + f8*g0 + f9_2*g9_19
+ h9 := f0*g9 + f1*g8 + f2*g7 + f3*g6 + f4*g5 + f5*g4 + f6*g3 + f7*g2 + f8*g1 + f9*g0
+
+ FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
+}
+
+func feSquare(f *FieldElement) (h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 int64) {
+ f0 := int64(f[0])
+ f1 := int64(f[1])
+ f2 := int64(f[2])
+ f3 := int64(f[3])
+ f4 := int64(f[4])
+ f5 := int64(f[5])
+ f6 := int64(f[6])
+ f7 := int64(f[7])
+ f8 := int64(f[8])
+ f9 := int64(f[9])
+ f0_2 := int64(2 * f[0])
+ f1_2 := int64(2 * f[1])
+ f2_2 := int64(2 * f[2])
+ f3_2 := int64(2 * f[3])
+ f4_2 := int64(2 * f[4])
+ f5_2 := int64(2 * f[5])
+ f6_2 := int64(2 * f[6])
+ f7_2 := int64(2 * f[7])
+ f5_38 := 38 * f5 // 1.31*2^30
+ f6_19 := 19 * f6 // 1.31*2^30
+ f7_38 := 38 * f7 // 1.31*2^30
+ f8_19 := 19 * f8 // 1.31*2^30
+ f9_38 := 38 * f9 // 1.31*2^30
+
+ h0 = f0*f0 + f1_2*f9_38 + f2_2*f8_19 + f3_2*f7_38 + f4_2*f6_19 + f5*f5_38
+ h1 = f0_2*f1 + f2*f9_38 + f3_2*f8_19 + f4*f7_38 + f5_2*f6_19
+ h2 = f0_2*f2 + f1_2*f1 + f3_2*f9_38 + f4_2*f8_19 + f5_2*f7_38 + f6*f6_19
+ h3 = f0_2*f3 + f1_2*f2 + f4*f9_38 + f5_2*f8_19 + f6*f7_38
+ h4 = f0_2*f4 + f1_2*f3_2 + f2*f2 + f5_2*f9_38 + f6_2*f8_19 + f7*f7_38
+ h5 = f0_2*f5 + f1_2*f4 + f2_2*f3 + f6*f9_38 + f7_2*f8_19
+ h6 = f0_2*f6 + f1_2*f5_2 + f2_2*f4 + f3_2*f3 + f7_2*f9_38 + f8*f8_19
+ h7 = f0_2*f7 + f1_2*f6 + f2_2*f5 + f3_2*f4 + f8*f9_38
+ h8 = f0_2*f8 + f1_2*f7_2 + f2_2*f6 + f3_2*f5_2 + f4*f4 + f9*f9_38
+ h9 = f0_2*f9 + f1_2*f8 + f2_2*f7 + f3_2*f6 + f4_2*f5
+
+ return
+}
+
+// FeSquare calculates h = f*f. Can overlap h with f.
+//
+// Preconditions:
+// |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
+//
+// Postconditions:
+// |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
+func FeSquare(h, f *FieldElement) {
+ h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 := feSquare(f)
+ FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
+}
+
+// FeSquare2 sets h = 2 * f * f
+//
+// Can overlap h with f.
+//
+// Preconditions:
+// |f| bounded by 1.65*2^26,1.65*2^25,1.65*2^26,1.65*2^25,etc.
+//
+// Postconditions:
+// |h| bounded by 1.01*2^25,1.01*2^24,1.01*2^25,1.01*2^24,etc.
+// See fe_mul.c for discussion of implementation strategy.
+func FeSquare2(h, f *FieldElement) {
+ h0, h1, h2, h3, h4, h5, h6, h7, h8, h9 := feSquare(f)
+
+ h0 += h0
+ h1 += h1
+ h2 += h2
+ h3 += h3
+ h4 += h4
+ h5 += h5
+ h6 += h6
+ h7 += h7
+ h8 += h8
+ h9 += h9
+
+ FeCombine(h, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9)
+}
+
+func FeInvert(out, z *FieldElement) {
+ var t0, t1, t2, t3 FieldElement
+ var i int
+
+ FeSquare(&t0, z) // 2^1
+ FeSquare(&t1, &t0) // 2^2
+ for i = 1; i < 2; i++ { // 2^3
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t1, z, &t1) // 2^3 + 2^0
+ FeMul(&t0, &t0, &t1) // 2^3 + 2^1 + 2^0
+ FeSquare(&t2, &t0) // 2^4 + 2^2 + 2^1
+ FeMul(&t1, &t1, &t2) // 2^4 + 2^3 + 2^2 + 2^1 + 2^0
+ FeSquare(&t2, &t1) // 5,4,3,2,1
+ for i = 1; i < 5; i++ { // 9,8,7,6,5
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t1, &t2, &t1) // 9,8,7,6,5,4,3,2,1,0
+ FeSquare(&t2, &t1) // 10..1
+ for i = 1; i < 10; i++ { // 19..10
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t2, &t2, &t1) // 19..0
+ FeSquare(&t3, &t2) // 20..1
+ for i = 1; i < 20; i++ { // 39..20
+ FeSquare(&t3, &t3)
+ }
+ FeMul(&t2, &t3, &t2) // 39..0
+ FeSquare(&t2, &t2) // 40..1
+ for i = 1; i < 10; i++ { // 49..10
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t1, &t2, &t1) // 49..0
+ FeSquare(&t2, &t1) // 50..1
+ for i = 1; i < 50; i++ { // 99..50
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t2, &t2, &t1) // 99..0
+ FeSquare(&t3, &t2) // 100..1
+ for i = 1; i < 100; i++ { // 199..100
+ FeSquare(&t3, &t3)
+ }
+ FeMul(&t2, &t3, &t2) // 199..0
+ FeSquare(&t2, &t2) // 200..1
+ for i = 1; i < 50; i++ { // 249..50
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t1, &t2, &t1) // 249..0
+ FeSquare(&t1, &t1) // 250..1
+ for i = 1; i < 5; i++ { // 254..5
+ FeSquare(&t1, &t1)
+ }
+ FeMul(out, &t1, &t0) // 254..5,3,1,0
+}
+
+func fePow22523(out, z *FieldElement) {
+ var t0, t1, t2 FieldElement
+ var i int
+
+ FeSquare(&t0, z)
+ for i = 1; i < 1; i++ {
+ FeSquare(&t0, &t0)
+ }
+ FeSquare(&t1, &t0)
+ for i = 1; i < 2; i++ {
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t1, z, &t1)
+ FeMul(&t0, &t0, &t1)
+ FeSquare(&t0, &t0)
+ for i = 1; i < 1; i++ {
+ FeSquare(&t0, &t0)
+ }
+ FeMul(&t0, &t1, &t0)
+ FeSquare(&t1, &t0)
+ for i = 1; i < 5; i++ {
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t0, &t1, &t0)
+ FeSquare(&t1, &t0)
+ for i = 1; i < 10; i++ {
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t1, &t1, &t0)
+ FeSquare(&t2, &t1)
+ for i = 1; i < 20; i++ {
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t1, &t2, &t1)
+ FeSquare(&t1, &t1)
+ for i = 1; i < 10; i++ {
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t0, &t1, &t0)
+ FeSquare(&t1, &t0)
+ for i = 1; i < 50; i++ {
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t1, &t1, &t0)
+ FeSquare(&t2, &t1)
+ for i = 1; i < 100; i++ {
+ FeSquare(&t2, &t2)
+ }
+ FeMul(&t1, &t2, &t1)
+ FeSquare(&t1, &t1)
+ for i = 1; i < 50; i++ {
+ FeSquare(&t1, &t1)
+ }
+ FeMul(&t0, &t1, &t0)
+ FeSquare(&t0, &t0)
+ for i = 1; i < 2; i++ {
+ FeSquare(&t0, &t0)
+ }
+ FeMul(out, &t0, z)
+}
+
+// Group elements are members of the elliptic curve -x^2 + y^2 = 1 + d * x^2 *
+// y^2 where d = -121665/121666.
+//
+// Several representations are used:
+// ProjectiveGroupElement: (X:Y:Z) satisfying x=X/Z, y=Y/Z
+// ExtendedGroupElement: (X:Y:Z:T) satisfying x=X/Z, y=Y/Z, XY=ZT
+// CompletedGroupElement: ((X:Z),(Y:T)) satisfying x=X/Z, y=Y/T
+// PreComputedGroupElement: (y+x,y-x,2dxy)
+
+type ProjectiveGroupElement struct {
+ X, Y, Z FieldElement
+}
+
+type ExtendedGroupElement struct {
+ X, Y, Z, T FieldElement
+}
+
+type CompletedGroupElement struct {
+ X, Y, Z, T FieldElement
+}
+
+type PreComputedGroupElement struct {
+ yPlusX, yMinusX, xy2d FieldElement
+}
+
+type CachedGroupElement struct {
+ yPlusX, yMinusX, Z, T2d FieldElement
+}
+
+func (p *ProjectiveGroupElement) Zero() {
+ FeZero(&p.X)
+ FeOne(&p.Y)
+ FeOne(&p.Z)
+}
+
+func (p *ProjectiveGroupElement) Double(r *CompletedGroupElement) {
+ var t0 FieldElement
+
+ FeSquare(&r.X, &p.X)
+ FeSquare(&r.Z, &p.Y)
+ FeSquare2(&r.T, &p.Z)
+ FeAdd(&r.Y, &p.X, &p.Y)
+ FeSquare(&t0, &r.Y)
+ FeAdd(&r.Y, &r.Z, &r.X)
+ FeSub(&r.Z, &r.Z, &r.X)
+ FeSub(&r.X, &t0, &r.Y)
+ FeSub(&r.T, &r.T, &r.Z)
+}
+
+func (p *ProjectiveGroupElement) ToBytes(s *[32]byte) {
+ var recip, x, y FieldElement
+
+ FeInvert(&recip, &p.Z)
+ FeMul(&x, &p.X, &recip)
+ FeMul(&y, &p.Y, &recip)
+ FeToBytes(s, &y)
+ s[31] ^= FeIsNegative(&x) << 7
+}
+
+func (p *ExtendedGroupElement) Zero() {
+ FeZero(&p.X)
+ FeOne(&p.Y)
+ FeOne(&p.Z)
+ FeZero(&p.T)
+}
+
+func (p *ExtendedGroupElement) Double(r *CompletedGroupElement) {
+ var q ProjectiveGroupElement
+ p.ToProjective(&q)
+ q.Double(r)
+}
+
+func (p *ExtendedGroupElement) ToCached(r *CachedGroupElement) {
+ FeAdd(&r.yPlusX, &p.Y, &p.X)
+ FeSub(&r.yMinusX, &p.Y, &p.X)
+ FeCopy(&r.Z, &p.Z)
+ FeMul(&r.T2d, &p.T, &d2)
+}
+
+func (p *ExtendedGroupElement) ToProjective(r *ProjectiveGroupElement) {
+ FeCopy(&r.X, &p.X)
+ FeCopy(&r.Y, &p.Y)
+ FeCopy(&r.Z, &p.Z)
+}
+
+func (p *ExtendedGroupElement) ToBytes(s *[32]byte) {
+ var recip, x, y FieldElement
+
+ FeInvert(&recip, &p.Z)
+ FeMul(&x, &p.X, &recip)
+ FeMul(&y, &p.Y, &recip)
+ FeToBytes(s, &y)
+ s[31] ^= FeIsNegative(&x) << 7
+}
+
+func (p *ExtendedGroupElement) FromBytes(s *[32]byte) bool {
+ var u, v, v3, vxx, check FieldElement
+
+ FeFromBytes(&p.Y, s)
+ FeOne(&p.Z)
+ FeSquare(&u, &p.Y)
+ FeMul(&v, &u, &d)
+ FeSub(&u, &u, &p.Z) // y = y^2-1
+ FeAdd(&v, &v, &p.Z) // v = dy^2+1
+
+ FeSquare(&v3, &v)
+ FeMul(&v3, &v3, &v) // v3 = v^3
+ FeSquare(&p.X, &v3)
+ FeMul(&p.X, &p.X, &v)
+ FeMul(&p.X, &p.X, &u) // x = uv^7
+
+ fePow22523(&p.X, &p.X) // x = (uv^7)^((q-5)/8)
+ FeMul(&p.X, &p.X, &v3)
+ FeMul(&p.X, &p.X, &u) // x = uv^3(uv^7)^((q-5)/8)
+
+ var tmpX, tmp2 [32]byte
+
+ FeSquare(&vxx, &p.X)
+ FeMul(&vxx, &vxx, &v)
+ FeSub(&check, &vxx, &u) // vx^2-u
+ if FeIsNonZero(&check) == 1 {
+ FeAdd(&check, &vxx, &u) // vx^2+u
+ if FeIsNonZero(&check) == 1 {
+ return false
+ }
+ FeMul(&p.X, &p.X, &SqrtM1)
+
+ FeToBytes(&tmpX, &p.X)
+ for i, v := range tmpX {
+ tmp2[31-i] = v
+ }
+ }
+
+ if FeIsNegative(&p.X) != (s[31] >> 7) {
+ FeNeg(&p.X, &p.X)
+ }
+
+ FeMul(&p.T, &p.X, &p.Y)
+ return true
+}
+
+func (p *CompletedGroupElement) ToProjective(r *ProjectiveGroupElement) {
+ FeMul(&r.X, &p.X, &p.T)
+ FeMul(&r.Y, &p.Y, &p.Z)
+ FeMul(&r.Z, &p.Z, &p.T)
+}
+
+func (p *CompletedGroupElement) ToExtended(r *ExtendedGroupElement) {
+ FeMul(&r.X, &p.X, &p.T)
+ FeMul(&r.Y, &p.Y, &p.Z)
+ FeMul(&r.Z, &p.Z, &p.T)
+ FeMul(&r.T, &p.X, &p.Y)
+}
+
+func (p *PreComputedGroupElement) Zero() {
+ FeOne(&p.yPlusX)
+ FeOne(&p.yMinusX)
+ FeZero(&p.xy2d)
+}
+
+func geAdd(r *CompletedGroupElement, p *ExtendedGroupElement, q *CachedGroupElement) {
+ var t0 FieldElement
+
+ FeAdd(&r.X, &p.Y, &p.X)
+ FeSub(&r.Y, &p.Y, &p.X)
+ FeMul(&r.Z, &r.X, &q.yPlusX)
+ FeMul(&r.Y, &r.Y, &q.yMinusX)
+ FeMul(&r.T, &q.T2d, &p.T)
+ FeMul(&r.X, &p.Z, &q.Z)
+ FeAdd(&t0, &r.X, &r.X)
+ FeSub(&r.X, &r.Z, &r.Y)
+ FeAdd(&r.Y, &r.Z, &r.Y)
+ FeAdd(&r.Z, &t0, &r.T)
+ FeSub(&r.T, &t0, &r.T)
+}
+
+func geSub(r *CompletedGroupElement, p *ExtendedGroupElement, q *CachedGroupElement) {
+ var t0 FieldElement
+
+ FeAdd(&r.X, &p.Y, &p.X)
+ FeSub(&r.Y, &p.Y, &p.X)
+ FeMul(&r.Z, &r.X, &q.yMinusX)
+ FeMul(&r.Y, &r.Y, &q.yPlusX)
+ FeMul(&r.T, &q.T2d, &p.T)
+ FeMul(&r.X, &p.Z, &q.Z)
+ FeAdd(&t0, &r.X, &r.X)
+ FeSub(&r.X, &r.Z, &r.Y)
+ FeAdd(&r.Y, &r.Z, &r.Y)
+ FeSub(&r.Z, &t0, &r.T)
+ FeAdd(&r.T, &t0, &r.T)
+}
+
+func geMixedAdd(r *CompletedGroupElement, p *ExtendedGroupElement, q *PreComputedGroupElement) {
+ var t0 FieldElement
+
+ FeAdd(&r.X, &p.Y, &p.X)
+ FeSub(&r.Y, &p.Y, &p.X)
+ FeMul(&r.Z, &r.X, &q.yPlusX)
+ FeMul(&r.Y, &r.Y, &q.yMinusX)
+ FeMul(&r.T, &q.xy2d, &p.T)
+ FeAdd(&t0, &p.Z, &p.Z)
+ FeSub(&r.X, &r.Z, &r.Y)
+ FeAdd(&r.Y, &r.Z, &r.Y)
+ FeAdd(&r.Z, &t0, &r.T)
+ FeSub(&r.T, &t0, &r.T)
+}
+
+func geMixedSub(r *CompletedGroupElement, p *ExtendedGroupElement, q *PreComputedGroupElement) {
+ var t0 FieldElement
+
+ FeAdd(&r.X, &p.Y, &p.X)
+ FeSub(&r.Y, &p.Y, &p.X)
+ FeMul(&r.Z, &r.X, &q.yMinusX)
+ FeMul(&r.Y, &r.Y, &q.yPlusX)
+ FeMul(&r.T, &q.xy2d, &p.T)
+ FeAdd(&t0, &p.Z, &p.Z)
+ FeSub(&r.X, &r.Z, &r.Y)
+ FeAdd(&r.Y, &r.Z, &r.Y)
+ FeSub(&r.Z, &t0, &r.T)
+ FeAdd(&r.T, &t0, &r.T)
+}
+
+func slide(r *[256]int8, a *[32]byte) {
+ for i := range r {
+ r[i] = int8(1 & (a[i>>3] >> uint(i&7)))
+ }
+
+ for i := range r {
+ if r[i] != 0 {
+ for b := 1; b <= 6 && i+b < 256; b++ {
+ if r[i+b] != 0 {
+ if r[i]+(r[i+b]<<uint(b)) <= 15 {
+ r[i] += r[i+b] << uint(b)
+ r[i+b] = 0
+ } else if r[i]-(r[i+b]<<uint(b)) >= -15 {
+ r[i] -= r[i+b] << uint(b)
+ for k := i + b; k < 256; k++ {
+ if r[k] == 0 {
+ r[k] = 1
+ break
+ }
+ r[k] = 0
+ }
+ } else {
+ break
+ }
+ }
+ }
+ }
+ }
+}
+
+// GeDoubleScalarMultVartime sets r = a*A + b*B
+// where a = a[0]+256*a[1]+...+256^31 a[31].
+// and b = b[0]+256*b[1]+...+256^31 b[31].
+// B is the Ed25519 base point (x,4/5) with x positive.
+func GeDoubleScalarMultVartime(r *ProjectiveGroupElement, a *[32]byte, A *ExtendedGroupElement, b *[32]byte) {
+ var aSlide, bSlide [256]int8
+ var Ai [8]CachedGroupElement // A,3A,5A,7A,9A,11A,13A,15A
+ var t CompletedGroupElement
+ var u, A2 ExtendedGroupElement
+ var i int
+
+ slide(&aSlide, a)
+ slide(&bSlide, b)
+
+ A.ToCached(&Ai[0])
+ A.Double(&t)
+ t.ToExtended(&A2)
+
+ for i := 0; i < 7; i++ {
+ geAdd(&t, &A2, &Ai[i])
+ t.ToExtended(&u)
+ u.ToCached(&Ai[i+1])
+ }
+
+ r.Zero()
+
+ for i = 255; i >= 0; i-- {
+ if aSlide[i] != 0 || bSlide[i] != 0 {
+ break
+ }
+ }
+
+ for ; i >= 0; i-- {
+ r.Double(&t)
+
+ if aSlide[i] > 0 {
+ t.ToExtended(&u)
+ geAdd(&t, &u, &Ai[aSlide[i]/2])
+ } else if aSlide[i] < 0 {
+ t.ToExtended(&u)
+ geSub(&t, &u, &Ai[(-aSlide[i])/2])
+ }
+
+ if bSlide[i] > 0 {
+ t.ToExtended(&u)
+ geMixedAdd(&t, &u, &bi[bSlide[i]/2])
+ } else if bSlide[i] < 0 {
+ t.ToExtended(&u)
+ geMixedSub(&t, &u, &bi[(-bSlide[i])/2])
+ }
+
+ t.ToProjective(r)
+ }
+}
+
+// equal returns 1 if b == c and 0 otherwise, assuming that b and c are
+// non-negative.
+func equal(b, c int32) int32 {
+ x := uint32(b ^ c)
+ x--
+ return int32(x >> 31)
+}
+
+// negative returns 1 if b < 0 and 0 otherwise.
+func negative(b int32) int32 {
+ return (b >> 31) & 1
+}
+
+func PreComputedGroupElementCMove(t, u *PreComputedGroupElement, b int32) {
+ FeCMove(&t.yPlusX, &u.yPlusX, b)
+ FeCMove(&t.yMinusX, &u.yMinusX, b)
+ FeCMove(&t.xy2d, &u.xy2d, b)
+}
+
+func selectPoint(t *PreComputedGroupElement, pos int32, b int32) {
+ var minusT PreComputedGroupElement
+ bNegative := negative(b)
+ bAbs := b - (((-bNegative) & b) << 1)
+
+ t.Zero()
+ for i := int32(0); i < 8; i++ {
+ PreComputedGroupElementCMove(t, &base[pos][i], equal(bAbs, i+1))
+ }
+ FeCopy(&minusT.yPlusX, &t.yMinusX)
+ FeCopy(&minusT.yMinusX, &t.yPlusX)
+ FeNeg(&minusT.xy2d, &t.xy2d)
+ PreComputedGroupElementCMove(t, &minusT, bNegative)
+}
+
+// GeScalarMultBase computes h = a*B, where
+// a = a[0]+256*a[1]+...+256^31 a[31]
+// B is the Ed25519 base point (x,4/5) with x positive.
+//
+// Preconditions:
+// a[31] <= 127
+func GeScalarMultBase(h *ExtendedGroupElement, a *[32]byte) {
+ var e [64]int8
+
+ for i, v := range a {
+ e[2*i] = int8(v & 15)
+ e[2*i+1] = int8((v >> 4) & 15)
+ }
+
+ // each e[i] is between 0 and 15 and e[63] is between 0 and 7.
+
+ carry := int8(0)
+ for i := 0; i < 63; i++ {
+ e[i] += carry
+ carry = (e[i] + 8) >> 4
+ e[i] -= carry << 4
+ }
+ e[63] += carry
+ // each e[i] is between -8 and 8.
+
+ h.Zero()
+ var t PreComputedGroupElement
+ var r CompletedGroupElement
+ for i := int32(1); i < 64; i += 2 {
+ selectPoint(&t, i/2, int32(e[i]))
+ geMixedAdd(&r, h, &t)
+ r.ToExtended(h)
+ }
+
+ var s ProjectiveGroupElement
+
+ h.Double(&r)
+ r.ToProjective(&s)
+ s.Double(&r)
+ r.ToProjective(&s)
+ s.Double(&r)
+ r.ToProjective(&s)
+ s.Double(&r)
+ r.ToExtended(h)
+
+ for i := int32(0); i < 64; i += 2 {
+ selectPoint(&t, i/2, int32(e[i]))
+ geMixedAdd(&r, h, &t)
+ r.ToExtended(h)
+ }
+}
+
+// The scalars are GF(2^252 + 27742317777372353535851937790883648493).
+
+// Input:
+// a[0]+256*a[1]+...+256^31*a[31] = a
+// b[0]+256*b[1]+...+256^31*b[31] = b
+// c[0]+256*c[1]+...+256^31*c[31] = c
+//
+// Output:
+// s[0]+256*s[1]+...+256^31*s[31] = (ab+c) mod l
+// where l = 2^252 + 27742317777372353535851937790883648493.
+func ScMulAdd(s, a, b, c *[32]byte) {
+ a0 := 2097151 & load3(a[:])
+ a1 := 2097151 & (load4(a[2:]) >> 5)
+ a2 := 2097151 & (load3(a[5:]) >> 2)
+ a3 := 2097151 & (load4(a[7:]) >> 7)
+ a4 := 2097151 & (load4(a[10:]) >> 4)
+ a5 := 2097151 & (load3(a[13:]) >> 1)
+ a6 := 2097151 & (load4(a[15:]) >> 6)
+ a7 := 2097151 & (load3(a[18:]) >> 3)
+ a8 := 2097151 & load3(a[21:])
+ a9 := 2097151 & (load4(a[23:]) >> 5)
+ a10 := 2097151 & (load3(a[26:]) >> 2)
+ a11 := (load4(a[28:]) >> 7)
+ b0 := 2097151 & load3(b[:])
+ b1 := 2097151 & (load4(b[2:]) >> 5)
+ b2 := 2097151 & (load3(b[5:]) >> 2)
+ b3 := 2097151 & (load4(b[7:]) >> 7)
+ b4 := 2097151 & (load4(b[10:]) >> 4)
+ b5 := 2097151 & (load3(b[13:]) >> 1)
+ b6 := 2097151 & (load4(b[15:]) >> 6)
+ b7 := 2097151 & (load3(b[18:]) >> 3)
+ b8 := 2097151 & load3(b[21:])
+ b9 := 2097151 & (load4(b[23:]) >> 5)
+ b10 := 2097151 & (load3(b[26:]) >> 2)
+ b11 := (load4(b[28:]) >> 7)
+ c0 := 2097151 & load3(c[:])
+ c1 := 2097151 & (load4(c[2:]) >> 5)
+ c2 := 2097151 & (load3(c[5:]) >> 2)
+ c3 := 2097151 & (load4(c[7:]) >> 7)
+ c4 := 2097151 & (load4(c[10:]) >> 4)
+ c5 := 2097151 & (load3(c[13:]) >> 1)
+ c6 := 2097151 & (load4(c[15:]) >> 6)
+ c7 := 2097151 & (load3(c[18:]) >> 3)
+ c8 := 2097151 & load3(c[21:])
+ c9 := 2097151 & (load4(c[23:]) >> 5)
+ c10 := 2097151 & (load3(c[26:]) >> 2)
+ c11 := (load4(c[28:]) >> 7)
+ var carry [23]int64
+
+ s0 := c0 + a0*b0
+ s1 := c1 + a0*b1 + a1*b0
+ s2 := c2 + a0*b2 + a1*b1 + a2*b0
+ s3 := c3 + a0*b3 + a1*b2 + a2*b1 + a3*b0
+ s4 := c4 + a0*b4 + a1*b3 + a2*b2 + a3*b1 + a4*b0
+ s5 := c5 + a0*b5 + a1*b4 + a2*b3 + a3*b2 + a4*b1 + a5*b0
+ s6 := c6 + a0*b6 + a1*b5 + a2*b4 + a3*b3 + a4*b2 + a5*b1 + a6*b0
+ s7 := c7 + a0*b7 + a1*b6 + a2*b5 + a3*b4 + a4*b3 + a5*b2 + a6*b1 + a7*b0
+ s8 := c8 + a0*b8 + a1*b7 + a2*b6 + a3*b5 + a4*b4 + a5*b3 + a6*b2 + a7*b1 + a8*b0
+ s9 := c9 + a0*b9 + a1*b8 + a2*b7 + a3*b6 + a4*b5 + a5*b4 + a6*b3 + a7*b2 + a8*b1 + a9*b0
+ s10 := c10 + a0*b10 + a1*b9 + a2*b8 + a3*b7 + a4*b6 + a5*b5 + a6*b4 + a7*b3 + a8*b2 + a9*b1 + a10*b0
+ s11 := c11 + a0*b11 + a1*b10 + a2*b9 + a3*b8 + a4*b7 + a5*b6 + a6*b5 + a7*b4 + a8*b3 + a9*b2 + a10*b1 + a11*b0
+ s12 := a1*b11 + a2*b10 + a3*b9 + a4*b8 + a5*b7 + a6*b6 + a7*b5 + a8*b4 + a9*b3 + a10*b2 + a11*b1
+ s13 := a2*b11 + a3*b10 + a4*b9 + a5*b8 + a6*b7 + a7*b6 + a8*b5 + a9*b4 + a10*b3 + a11*b2
+ s14 := a3*b11 + a4*b10 + a5*b9 + a6*b8 + a7*b7 + a8*b6 + a9*b5 + a10*b4 + a11*b3
+ s15 := a4*b11 + a5*b10 + a6*b9 + a7*b8 + a8*b7 + a9*b6 + a10*b5 + a11*b4
+ s16 := a5*b11 + a6*b10 + a7*b9 + a8*b8 + a9*b7 + a10*b6 + a11*b5
+ s17 := a6*b11 + a7*b10 + a8*b9 + a9*b8 + a10*b7 + a11*b6
+ s18 := a7*b11 + a8*b10 + a9*b9 + a10*b8 + a11*b7
+ s19 := a8*b11 + a9*b10 + a10*b9 + a11*b8
+ s20 := a9*b11 + a10*b10 + a11*b9
+ s21 := a10*b11 + a11*b10
+ s22 := a11 * b11
+ s23 := int64(0)
+
+ carry[0] = (s0 + (1 << 20)) >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[2] = (s2 + (1 << 20)) >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[4] = (s4 + (1 << 20)) >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[6] = (s6 + (1 << 20)) >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[8] = (s8 + (1 << 20)) >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[10] = (s10 + (1 << 20)) >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+ carry[12] = (s12 + (1 << 20)) >> 21
+ s13 += carry[12]
+ s12 -= carry[12] << 21
+ carry[14] = (s14 + (1 << 20)) >> 21
+ s15 += carry[14]
+ s14 -= carry[14] << 21
+ carry[16] = (s16 + (1 << 20)) >> 21
+ s17 += carry[16]
+ s16 -= carry[16] << 21
+ carry[18] = (s18 + (1 << 20)) >> 21
+ s19 += carry[18]
+ s18 -= carry[18] << 21
+ carry[20] = (s20 + (1 << 20)) >> 21
+ s21 += carry[20]
+ s20 -= carry[20] << 21
+ carry[22] = (s22 + (1 << 20)) >> 21
+ s23 += carry[22]
+ s22 -= carry[22] << 21
+
+ carry[1] = (s1 + (1 << 20)) >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[3] = (s3 + (1 << 20)) >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[5] = (s5 + (1 << 20)) >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[7] = (s7 + (1 << 20)) >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[9] = (s9 + (1 << 20)) >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[11] = (s11 + (1 << 20)) >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+ carry[13] = (s13 + (1 << 20)) >> 21
+ s14 += carry[13]
+ s13 -= carry[13] << 21
+ carry[15] = (s15 + (1 << 20)) >> 21
+ s16 += carry[15]
+ s15 -= carry[15] << 21
+ carry[17] = (s17 + (1 << 20)) >> 21
+ s18 += carry[17]
+ s17 -= carry[17] << 21
+ carry[19] = (s19 + (1 << 20)) >> 21
+ s20 += carry[19]
+ s19 -= carry[19] << 21
+ carry[21] = (s21 + (1 << 20)) >> 21
+ s22 += carry[21]
+ s21 -= carry[21] << 21
+
+ s11 += s23 * 666643
+ s12 += s23 * 470296
+ s13 += s23 * 654183
+ s14 -= s23 * 997805
+ s15 += s23 * 136657
+ s16 -= s23 * 683901
+ s23 = 0
+
+ s10 += s22 * 666643
+ s11 += s22 * 470296
+ s12 += s22 * 654183
+ s13 -= s22 * 997805
+ s14 += s22 * 136657
+ s15 -= s22 * 683901
+ s22 = 0
+
+ s9 += s21 * 666643
+ s10 += s21 * 470296
+ s11 += s21 * 654183
+ s12 -= s21 * 997805
+ s13 += s21 * 136657
+ s14 -= s21 * 683901
+ s21 = 0
+
+ s8 += s20 * 666643
+ s9 += s20 * 470296
+ s10 += s20 * 654183
+ s11 -= s20 * 997805
+ s12 += s20 * 136657
+ s13 -= s20 * 683901
+ s20 = 0
+
+ s7 += s19 * 666643
+ s8 += s19 * 470296
+ s9 += s19 * 654183
+ s10 -= s19 * 997805
+ s11 += s19 * 136657
+ s12 -= s19 * 683901
+ s19 = 0
+
+ s6 += s18 * 666643
+ s7 += s18 * 470296
+ s8 += s18 * 654183
+ s9 -= s18 * 997805
+ s10 += s18 * 136657
+ s11 -= s18 * 683901
+ s18 = 0
+
+ carry[6] = (s6 + (1 << 20)) >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[8] = (s8 + (1 << 20)) >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[10] = (s10 + (1 << 20)) >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+ carry[12] = (s12 + (1 << 20)) >> 21
+ s13 += carry[12]
+ s12 -= carry[12] << 21
+ carry[14] = (s14 + (1 << 20)) >> 21
+ s15 += carry[14]
+ s14 -= carry[14] << 21
+ carry[16] = (s16 + (1 << 20)) >> 21
+ s17 += carry[16]
+ s16 -= carry[16] << 21
+
+ carry[7] = (s7 + (1 << 20)) >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[9] = (s9 + (1 << 20)) >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[11] = (s11 + (1 << 20)) >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+ carry[13] = (s13 + (1 << 20)) >> 21
+ s14 += carry[13]
+ s13 -= carry[13] << 21
+ carry[15] = (s15 + (1 << 20)) >> 21
+ s16 += carry[15]
+ s15 -= carry[15] << 21
+
+ s5 += s17 * 666643
+ s6 += s17 * 470296
+ s7 += s17 * 654183
+ s8 -= s17 * 997805
+ s9 += s17 * 136657
+ s10 -= s17 * 683901
+ s17 = 0
+
+ s4 += s16 * 666643
+ s5 += s16 * 470296
+ s6 += s16 * 654183
+ s7 -= s16 * 997805
+ s8 += s16 * 136657
+ s9 -= s16 * 683901
+ s16 = 0
+
+ s3 += s15 * 666643
+ s4 += s15 * 470296
+ s5 += s15 * 654183
+ s6 -= s15 * 997805
+ s7 += s15 * 136657
+ s8 -= s15 * 683901
+ s15 = 0
+
+ s2 += s14 * 666643
+ s3 += s14 * 470296
+ s4 += s14 * 654183
+ s5 -= s14 * 997805
+ s6 += s14 * 136657
+ s7 -= s14 * 683901
+ s14 = 0
+
+ s1 += s13 * 666643
+ s2 += s13 * 470296
+ s3 += s13 * 654183
+ s4 -= s13 * 997805
+ s5 += s13 * 136657
+ s6 -= s13 * 683901
+ s13 = 0
+
+ s0 += s12 * 666643
+ s1 += s12 * 470296
+ s2 += s12 * 654183
+ s3 -= s12 * 997805
+ s4 += s12 * 136657
+ s5 -= s12 * 683901
+ s12 = 0
+
+ carry[0] = (s0 + (1 << 20)) >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[2] = (s2 + (1 << 20)) >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[4] = (s4 + (1 << 20)) >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[6] = (s6 + (1 << 20)) >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[8] = (s8 + (1 << 20)) >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[10] = (s10 + (1 << 20)) >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+
+ carry[1] = (s1 + (1 << 20)) >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[3] = (s3 + (1 << 20)) >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[5] = (s5 + (1 << 20)) >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[7] = (s7 + (1 << 20)) >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[9] = (s9 + (1 << 20)) >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[11] = (s11 + (1 << 20)) >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+
+ s0 += s12 * 666643
+ s1 += s12 * 470296
+ s2 += s12 * 654183
+ s3 -= s12 * 997805
+ s4 += s12 * 136657
+ s5 -= s12 * 683901
+ s12 = 0
+
+ carry[0] = s0 >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[1] = s1 >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[2] = s2 >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[3] = s3 >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[4] = s4 >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[5] = s5 >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[6] = s6 >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[7] = s7 >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[8] = s8 >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[9] = s9 >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[10] = s10 >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+ carry[11] = s11 >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+
+ s0 += s12 * 666643
+ s1 += s12 * 470296
+ s2 += s12 * 654183
+ s3 -= s12 * 997805
+ s4 += s12 * 136657
+ s5 -= s12 * 683901
+ s12 = 0
+
+ carry[0] = s0 >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[1] = s1 >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[2] = s2 >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[3] = s3 >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[4] = s4 >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[5] = s5 >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[6] = s6 >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[7] = s7 >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[8] = s8 >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[9] = s9 >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[10] = s10 >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+
+ s[0] = byte(s0 >> 0)
+ s[1] = byte(s0 >> 8)
+ s[2] = byte((s0 >> 16) | (s1 << 5))
+ s[3] = byte(s1 >> 3)
+ s[4] = byte(s1 >> 11)
+ s[5] = byte((s1 >> 19) | (s2 << 2))
+ s[6] = byte(s2 >> 6)
+ s[7] = byte((s2 >> 14) | (s3 << 7))
+ s[8] = byte(s3 >> 1)
+ s[9] = byte(s3 >> 9)
+ s[10] = byte((s3 >> 17) | (s4 << 4))
+ s[11] = byte(s4 >> 4)
+ s[12] = byte(s4 >> 12)
+ s[13] = byte((s4 >> 20) | (s5 << 1))
+ s[14] = byte(s5 >> 7)
+ s[15] = byte((s5 >> 15) | (s6 << 6))
+ s[16] = byte(s6 >> 2)
+ s[17] = byte(s6 >> 10)
+ s[18] = byte((s6 >> 18) | (s7 << 3))
+ s[19] = byte(s7 >> 5)
+ s[20] = byte(s7 >> 13)
+ s[21] = byte(s8 >> 0)
+ s[22] = byte(s8 >> 8)
+ s[23] = byte((s8 >> 16) | (s9 << 5))
+ s[24] = byte(s9 >> 3)
+ s[25] = byte(s9 >> 11)
+ s[26] = byte((s9 >> 19) | (s10 << 2))
+ s[27] = byte(s10 >> 6)
+ s[28] = byte((s10 >> 14) | (s11 << 7))
+ s[29] = byte(s11 >> 1)
+ s[30] = byte(s11 >> 9)
+ s[31] = byte(s11 >> 17)
+}
+
+// Input:
+// s[0]+256*s[1]+...+256^63*s[63] = s
+//
+// Output:
+// s[0]+256*s[1]+...+256^31*s[31] = s mod l
+// where l = 2^252 + 27742317777372353535851937790883648493.
+func ScReduce(out *[32]byte, s *[64]byte) {
+ s0 := 2097151 & load3(s[:])
+ s1 := 2097151 & (load4(s[2:]) >> 5)
+ s2 := 2097151 & (load3(s[5:]) >> 2)
+ s3 := 2097151 & (load4(s[7:]) >> 7)
+ s4 := 2097151 & (load4(s[10:]) >> 4)
+ s5 := 2097151 & (load3(s[13:]) >> 1)
+ s6 := 2097151 & (load4(s[15:]) >> 6)
+ s7 := 2097151 & (load3(s[18:]) >> 3)
+ s8 := 2097151 & load3(s[21:])
+ s9 := 2097151 & (load4(s[23:]) >> 5)
+ s10 := 2097151 & (load3(s[26:]) >> 2)
+ s11 := 2097151 & (load4(s[28:]) >> 7)
+ s12 := 2097151 & (load4(s[31:]) >> 4)
+ s13 := 2097151 & (load3(s[34:]) >> 1)
+ s14 := 2097151 & (load4(s[36:]) >> 6)
+ s15 := 2097151 & (load3(s[39:]) >> 3)
+ s16 := 2097151 & load3(s[42:])
+ s17 := 2097151 & (load4(s[44:]) >> 5)
+ s18 := 2097151 & (load3(s[47:]) >> 2)
+ s19 := 2097151 & (load4(s[49:]) >> 7)
+ s20 := 2097151 & (load4(s[52:]) >> 4)
+ s21 := 2097151 & (load3(s[55:]) >> 1)
+ s22 := 2097151 & (load4(s[57:]) >> 6)
+ s23 := (load4(s[60:]) >> 3)
+
+ s11 += s23 * 666643
+ s12 += s23 * 470296
+ s13 += s23 * 654183
+ s14 -= s23 * 997805
+ s15 += s23 * 136657
+ s16 -= s23 * 683901
+ s23 = 0
+
+ s10 += s22 * 666643
+ s11 += s22 * 470296
+ s12 += s22 * 654183
+ s13 -= s22 * 997805
+ s14 += s22 * 136657
+ s15 -= s22 * 683901
+ s22 = 0
+
+ s9 += s21 * 666643
+ s10 += s21 * 470296
+ s11 += s21 * 654183
+ s12 -= s21 * 997805
+ s13 += s21 * 136657
+ s14 -= s21 * 683901
+ s21 = 0
+
+ s8 += s20 * 666643
+ s9 += s20 * 470296
+ s10 += s20 * 654183
+ s11 -= s20 * 997805
+ s12 += s20 * 136657
+ s13 -= s20 * 683901
+ s20 = 0
+
+ s7 += s19 * 666643
+ s8 += s19 * 470296
+ s9 += s19 * 654183
+ s10 -= s19 * 997805
+ s11 += s19 * 136657
+ s12 -= s19 * 683901
+ s19 = 0
+
+ s6 += s18 * 666643
+ s7 += s18 * 470296
+ s8 += s18 * 654183
+ s9 -= s18 * 997805
+ s10 += s18 * 136657
+ s11 -= s18 * 683901
+ s18 = 0
+
+ var carry [17]int64
+
+ carry[6] = (s6 + (1 << 20)) >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[8] = (s8 + (1 << 20)) >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[10] = (s10 + (1 << 20)) >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+ carry[12] = (s12 + (1 << 20)) >> 21
+ s13 += carry[12]
+ s12 -= carry[12] << 21
+ carry[14] = (s14 + (1 << 20)) >> 21
+ s15 += carry[14]
+ s14 -= carry[14] << 21
+ carry[16] = (s16 + (1 << 20)) >> 21
+ s17 += carry[16]
+ s16 -= carry[16] << 21
+
+ carry[7] = (s7 + (1 << 20)) >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[9] = (s9 + (1 << 20)) >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[11] = (s11 + (1 << 20)) >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+ carry[13] = (s13 + (1 << 20)) >> 21
+ s14 += carry[13]
+ s13 -= carry[13] << 21
+ carry[15] = (s15 + (1 << 20)) >> 21
+ s16 += carry[15]
+ s15 -= carry[15] << 21
+
+ s5 += s17 * 666643
+ s6 += s17 * 470296
+ s7 += s17 * 654183
+ s8 -= s17 * 997805
+ s9 += s17 * 136657
+ s10 -= s17 * 683901
+ s17 = 0
+
+ s4 += s16 * 666643
+ s5 += s16 * 470296
+ s6 += s16 * 654183
+ s7 -= s16 * 997805
+ s8 += s16 * 136657
+ s9 -= s16 * 683901
+ s16 = 0
+
+ s3 += s15 * 666643
+ s4 += s15 * 470296
+ s5 += s15 * 654183
+ s6 -= s15 * 997805
+ s7 += s15 * 136657
+ s8 -= s15 * 683901
+ s15 = 0
+
+ s2 += s14 * 666643
+ s3 += s14 * 470296
+ s4 += s14 * 654183
+ s5 -= s14 * 997805
+ s6 += s14 * 136657
+ s7 -= s14 * 683901
+ s14 = 0
+
+ s1 += s13 * 666643
+ s2 += s13 * 470296
+ s3 += s13 * 654183
+ s4 -= s13 * 997805
+ s5 += s13 * 136657
+ s6 -= s13 * 683901
+ s13 = 0
+
+ s0 += s12 * 666643
+ s1 += s12 * 470296
+ s2 += s12 * 654183
+ s3 -= s12 * 997805
+ s4 += s12 * 136657
+ s5 -= s12 * 683901
+ s12 = 0
+
+ carry[0] = (s0 + (1 << 20)) >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[2] = (s2 + (1 << 20)) >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[4] = (s4 + (1 << 20)) >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[6] = (s6 + (1 << 20)) >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[8] = (s8 + (1 << 20)) >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[10] = (s10 + (1 << 20)) >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+
+ carry[1] = (s1 + (1 << 20)) >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[3] = (s3 + (1 << 20)) >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[5] = (s5 + (1 << 20)) >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[7] = (s7 + (1 << 20)) >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[9] = (s9 + (1 << 20)) >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[11] = (s11 + (1 << 20)) >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+
+ s0 += s12 * 666643
+ s1 += s12 * 470296
+ s2 += s12 * 654183
+ s3 -= s12 * 997805
+ s4 += s12 * 136657
+ s5 -= s12 * 683901
+ s12 = 0
+
+ carry[0] = s0 >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[1] = s1 >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[2] = s2 >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[3] = s3 >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[4] = s4 >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[5] = s5 >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[6] = s6 >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[7] = s7 >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[8] = s8 >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[9] = s9 >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[10] = s10 >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+ carry[11] = s11 >> 21
+ s12 += carry[11]
+ s11 -= carry[11] << 21
+
+ s0 += s12 * 666643
+ s1 += s12 * 470296
+ s2 += s12 * 654183
+ s3 -= s12 * 997805
+ s4 += s12 * 136657
+ s5 -= s12 * 683901
+ s12 = 0
+
+ carry[0] = s0 >> 21
+ s1 += carry[0]
+ s0 -= carry[0] << 21
+ carry[1] = s1 >> 21
+ s2 += carry[1]
+ s1 -= carry[1] << 21
+ carry[2] = s2 >> 21
+ s3 += carry[2]
+ s2 -= carry[2] << 21
+ carry[3] = s3 >> 21
+ s4 += carry[3]
+ s3 -= carry[3] << 21
+ carry[4] = s4 >> 21
+ s5 += carry[4]
+ s4 -= carry[4] << 21
+ carry[5] = s5 >> 21
+ s6 += carry[5]
+ s5 -= carry[5] << 21
+ carry[6] = s6 >> 21
+ s7 += carry[6]
+ s6 -= carry[6] << 21
+ carry[7] = s7 >> 21
+ s8 += carry[7]
+ s7 -= carry[7] << 21
+ carry[8] = s8 >> 21
+ s9 += carry[8]
+ s8 -= carry[8] << 21
+ carry[9] = s9 >> 21
+ s10 += carry[9]
+ s9 -= carry[9] << 21
+ carry[10] = s10 >> 21
+ s11 += carry[10]
+ s10 -= carry[10] << 21
+
+ out[0] = byte(s0 >> 0)
+ out[1] = byte(s0 >> 8)
+ out[2] = byte((s0 >> 16) | (s1 << 5))
+ out[3] = byte(s1 >> 3)
+ out[4] = byte(s1 >> 11)
+ out[5] = byte((s1 >> 19) | (s2 << 2))
+ out[6] = byte(s2 >> 6)
+ out[7] = byte((s2 >> 14) | (s3 << 7))
+ out[8] = byte(s3 >> 1)
+ out[9] = byte(s3 >> 9)
+ out[10] = byte((s3 >> 17) | (s4 << 4))
+ out[11] = byte(s4 >> 4)
+ out[12] = byte(s4 >> 12)
+ out[13] = byte((s4 >> 20) | (s5 << 1))
+ out[14] = byte(s5 >> 7)
+ out[15] = byte((s5 >> 15) | (s6 << 6))
+ out[16] = byte(s6 >> 2)
+ out[17] = byte(s6 >> 10)
+ out[18] = byte((s6 >> 18) | (s7 << 3))
+ out[19] = byte(s7 >> 5)
+ out[20] = byte(s7 >> 13)
+ out[21] = byte(s8 >> 0)
+ out[22] = byte(s8 >> 8)
+ out[23] = byte((s8 >> 16) | (s9 << 5))
+ out[24] = byte(s9 >> 3)
+ out[25] = byte(s9 >> 11)
+ out[26] = byte((s9 >> 19) | (s10 << 2))
+ out[27] = byte(s10 >> 6)
+ out[28] = byte((s10 >> 14) | (s11 << 7))
+ out[29] = byte(s11 >> 1)
+ out[30] = byte(s11 >> 9)
+ out[31] = byte(s11 >> 17)
+}
+
+// order is the order of Curve25519 in little-endian form.
+var order = [4]uint64{0x5812631a5cf5d3ed, 0x14def9dea2f79cd6, 0, 0x1000000000000000}
+
+// ScMinimal returns true if the given scalar is less than the order of the
+// curve.
+func ScMinimal(scalar *[32]byte) bool {
+ for i := 3; ; i-- {
+ v := binary.LittleEndian.Uint64(scalar[i*8:])
+ if v > order[i] {
+ return false
+ } else if v < order[i] {
+ break
+ } else if i == 0 {
+ return false
+ }
+ }
+
+ return true
+}
diff --git a/vendor/golang.org/x/crypto/internal/subtle/aliasing.go b/vendor/golang.org/x/crypto/internal/subtle/aliasing.go
index f38797b..4fad24f 100644
--- a/vendor/golang.org/x/crypto/internal/subtle/aliasing.go
+++ b/vendor/golang.org/x/crypto/internal/subtle/aliasing.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !appengine
+//go:build !purego
+// +build !purego
// Package subtle implements functions that are often useful in cryptographic
// code but require careful thought to use correctly.
diff --git a/vendor/golang.org/x/crypto/internal/subtle/aliasing_appengine.go b/vendor/golang.org/x/crypto/internal/subtle/aliasing_purego.go
index 0cc4a8a..80ccbed 100644
--- a/vendor/golang.org/x/crypto/internal/subtle/aliasing_appengine.go
+++ b/vendor/golang.org/x/crypto/internal/subtle/aliasing_purego.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build appengine
+//go:build purego
+// +build purego
// Package subtle implements functions that are often useful in cryptographic
// code but require careful thought to use correctly.
diff --git a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
new file mode 100644
index 0000000..593f653
--- /dev/null
+++ b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go
@@ -0,0 +1,77 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+/*
+Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC
+2898 / PKCS #5 v2.0.
+
+A key derivation function is useful when encrypting data based on a password
+or any other not-fully-random data. It uses a pseudorandom function to derive
+a secure encryption key based on the password.
+
+While v2.0 of the standard defines only one pseudorandom function to use,
+HMAC-SHA1, the drafted v2.1 specification allows use of all five FIPS Approved
+Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To
+choose, you can pass the `New` functions from the different SHA packages to
+pbkdf2.Key.
+*/
+package pbkdf2 // import "golang.org/x/crypto/pbkdf2"
+
+import (
+ "crypto/hmac"
+ "hash"
+)
+
+// Key derives a key from the password, salt and iteration count, returning a
+// []byte of length keylen that can be used as cryptographic key. The key is
+// derived based on the method described as PBKDF2 with the HMAC variant using
+// the supplied hash function.
+//
+// For example, to use a HMAC-SHA-1 based PBKDF2 key derivation function, you
+// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by
+// doing:
+//
+// dk := pbkdf2.Key([]byte("some password"), salt, 4096, 32, sha1.New)
+//
+// Remember to get a good random salt. At least 8 bytes is recommended by the
+// RFC.
+//
+// Using a higher iteration count will increase the cost of an exhaustive
+// search but will also make derivation proportionally slower.
+func Key(password, salt []byte, iter, keyLen int, h func() hash.Hash) []byte {
+ prf := hmac.New(h, password)
+ hashLen := prf.Size()
+ numBlocks := (keyLen + hashLen - 1) / hashLen
+
+ var buf [4]byte
+ dk := make([]byte, 0, numBlocks*hashLen)
+ U := make([]byte, hashLen)
+ for block := 1; block <= numBlocks; block++ {
+ // N.B.: || means concatenation, ^ means XOR
+ // for each block T_i = U_1 ^ U_2 ^ ... ^ U_iter
+ // U_1 = PRF(password, salt || uint(i))
+ prf.Reset()
+ prf.Write(salt)
+ buf[0] = byte(block >> 24)
+ buf[1] = byte(block >> 16)
+ buf[2] = byte(block >> 8)
+ buf[3] = byte(block)
+ prf.Write(buf[:4])
+ dk = prf.Sum(dk)
+ T := dk[len(dk)-hashLen:]
+ copy(U, T)
+
+ // U_n = PRF(password, U_(n-1))
+ for n := 2; n <= iter; n++ {
+ prf.Reset()
+ prf.Write(U)
+ U = U[:0]
+ U = prf.Sum(U)
+ for x := range U {
+ T[x] ^= U[x]
+ }
+ }
+ }
+ return dk[:keyLen]
+}
diff --git a/vendor/golang.org/x/crypto/poly1305/bits_compat.go b/vendor/golang.org/x/crypto/poly1305/bits_compat.go
new file mode 100644
index 0000000..45b5c96
--- /dev/null
+++ b/vendor/golang.org/x/crypto/poly1305/bits_compat.go
@@ -0,0 +1,40 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !go1.13
+// +build !go1.13
+
+package poly1305
+
+// Generic fallbacks for the math/bits intrinsics, copied from
+// src/math/bits/bits.go. They were added in Go 1.12, but Add64 and Sum64 had
+// variable time fallbacks until Go 1.13.
+
+func bitsAdd64(x, y, carry uint64) (sum, carryOut uint64) {
+ sum = x + y + carry
+ carryOut = ((x & y) | ((x | y) &^ sum)) >> 63
+ return
+}
+
+func bitsSub64(x, y, borrow uint64) (diff, borrowOut uint64) {
+ diff = x - y - borrow
+ borrowOut = ((^x & y) | (^(x ^ y) & diff)) >> 63
+ return
+}
+
+func bitsMul64(x, y uint64) (hi, lo uint64) {
+ const mask32 = 1<<32 - 1
+ x0 := x & mask32
+ x1 := x >> 32
+ y0 := y & mask32
+ y1 := y >> 32
+ w0 := x0 * y0
+ t := x1*y0 + w0>>32
+ w1 := t & mask32
+ w2 := t >> 32
+ w1 += x0 * y1
+ hi = x1*y1 + w2 + w1>>32
+ lo = x * y
+ return
+}
diff --git a/vendor/golang.org/x/crypto/poly1305/bits_go1.13.go b/vendor/golang.org/x/crypto/poly1305/bits_go1.13.go
new file mode 100644
index 0000000..ed52b34
--- /dev/null
+++ b/vendor/golang.org/x/crypto/poly1305/bits_go1.13.go
@@ -0,0 +1,22 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build go1.13
+// +build go1.13
+
+package poly1305
+
+import "math/bits"
+
+func bitsAdd64(x, y, carry uint64) (sum, carryOut uint64) {
+ return bits.Add64(x, y, carry)
+}
+
+func bitsSub64(x, y, borrow uint64) (diff, borrowOut uint64) {
+ return bits.Sub64(x, y, borrow)
+}
+
+func bitsMul64(x, y uint64) (hi, lo uint64) {
+ return bits.Mul64(x, y)
+}
diff --git a/vendor/golang.org/x/crypto/poly1305/mac_noasm.go b/vendor/golang.org/x/crypto/poly1305/mac_noasm.go
index a8dd589..f184b67 100644
--- a/vendor/golang.org/x/crypto/poly1305/mac_noasm.go
+++ b/vendor/golang.org/x/crypto/poly1305/mac_noasm.go
@@ -2,10 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !amd64,!ppc64le gccgo appengine
+//go:build (!amd64 && !ppc64le && !s390x) || !gc || purego
+// +build !amd64,!ppc64le,!s390x !gc purego
package poly1305
type mac struct{ macGeneric }
-
-func newMAC(key *[32]byte) mac { return mac{newMACGeneric(key)} }
diff --git a/vendor/golang.org/x/crypto/poly1305/poly1305.go b/vendor/golang.org/x/crypto/poly1305/poly1305.go
index d076a56..9d7a6af 100644
--- a/vendor/golang.org/x/crypto/poly1305/poly1305.go
+++ b/vendor/golang.org/x/crypto/poly1305/poly1305.go
@@ -22,8 +22,16 @@ import "crypto/subtle"
// TagSize is the size, in bytes, of a poly1305 authenticator.
const TagSize = 16
-// Verify returns true if mac is a valid authenticator for m with the given
-// key.
+// Sum generates an authenticator for msg using a one-time key and puts the
+// 16-byte result into out. Authenticating two different messages with the same
+// key allows an attacker to forge messages at will.
+func Sum(out *[16]byte, m []byte, key *[32]byte) {
+ h := New(key)
+ h.Write(m)
+ h.Sum(out[:0])
+}
+
+// Verify returns true if mac is a valid authenticator for m with the given key.
func Verify(mac *[16]byte, m []byte, key *[32]byte) bool {
var tmp [16]byte
Sum(&tmp, m, key)
@@ -40,10 +48,9 @@ func Verify(mac *[16]byte, m []byte, key *[32]byte) bool {
// two different messages with the same key allows an attacker
// to forge messages at will.
func New(key *[32]byte) *MAC {
- return &MAC{
- mac: newMAC(key),
- finalized: false,
- }
+ m := &MAC{}
+ initialize(key, &m.macState)
+ return m
}
// MAC is an io.Writer computing an authentication tag
@@ -52,7 +59,7 @@ func New(key *[32]byte) *MAC {
// MAC cannot be used like common hash.Hash implementations,
// because using a poly1305 key twice breaks its security.
// Therefore writing data to a running MAC after calling
-// Sum causes it to panic.
+// Sum or Verify causes it to panic.
type MAC struct {
mac // platform-dependent implementation
@@ -65,10 +72,10 @@ func (h *MAC) Size() int { return TagSize }
// Write adds more data to the running message authentication code.
// It never returns an error.
//
-// It must not be called after the first call of Sum.
+// It must not be called after the first call of Sum or Verify.
func (h *MAC) Write(p []byte) (n int, err error) {
if h.finalized {
- panic("poly1305: write to MAC after Sum")
+ panic("poly1305: write to MAC after Sum or Verify")
}
return h.mac.Write(p)
}
@@ -81,3 +88,12 @@ func (h *MAC) Sum(b []byte) []byte {
h.finalized = true
return append(b, mac[:]...)
}
+
+// Verify returns whether the authenticator of all data written to
+// the message authentication code matches the expected value.
+func (h *MAC) Verify(expected []byte) bool {
+ var mac [TagSize]byte
+ h.mac.Sum(&mac)
+ h.finalized = true
+ return subtle.ConstantTimeCompare(expected, mac[:]) == 1
+}
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_amd64.go b/vendor/golang.org/x/crypto/poly1305/sum_amd64.go
index 2dbf42a..6d52233 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_amd64.go
+++ b/vendor/golang.org/x/crypto/poly1305/sum_amd64.go
@@ -2,67 +2,47 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build amd64,!gccgo,!appengine
+//go:build gc && !purego
+// +build gc,!purego
package poly1305
//go:noescape
-func initialize(state *[7]uint64, key *[32]byte)
+func update(state *macState, msg []byte)
-//go:noescape
-func update(state *[7]uint64, msg []byte)
-
-//go:noescape
-func finalize(tag *[TagSize]byte, state *[7]uint64)
-
-// Sum generates an authenticator for m using a one-time key and puts the
-// 16-byte result into out. Authenticating two different messages with the same
-// key allows an attacker to forge messages at will.
-func Sum(out *[16]byte, m []byte, key *[32]byte) {
- h := newMAC(key)
- h.Write(m)
- h.Sum(out)
-}
-
-func newMAC(key *[32]byte) (h mac) {
- initialize(&h.state, key)
- return
-}
-
-type mac struct {
- state [7]uint64 // := uint64{ h0, h1, h2, r0, r1, pad0, pad1 }
-
- buffer [TagSize]byte
- offset int
-}
+// mac is a wrapper for macGeneric that redirects calls that would have gone to
+// updateGeneric to update.
+//
+// Its Write and Sum methods are otherwise identical to the macGeneric ones, but
+// using function pointers would carry a major performance cost.
+type mac struct{ macGeneric }
-func (h *mac) Write(p []byte) (n int, err error) {
- n = len(p)
+func (h *mac) Write(p []byte) (int, error) {
+ nn := len(p)
if h.offset > 0 {
- remaining := TagSize - h.offset
- if n < remaining {
- h.offset += copy(h.buffer[h.offset:], p)
- return n, nil
+ n := copy(h.buffer[h.offset:], p)
+ if h.offset+n < TagSize {
+ h.offset += n
+ return nn, nil
}
- copy(h.buffer[h.offset:], p[:remaining])
- p = p[remaining:]
+ p = p[n:]
h.offset = 0
- update(&h.state, h.buffer[:])
+ update(&h.macState, h.buffer[:])
}
- if nn := len(p) - (len(p) % TagSize); nn > 0 {
- update(&h.state, p[:nn])
- p = p[nn:]
+ if n := len(p) - (len(p) % TagSize); n > 0 {
+ update(&h.macState, p[:n])
+ p = p[n:]
}
if len(p) > 0 {
h.offset += copy(h.buffer[h.offset:], p)
}
- return n, nil
+ return nn, nil
}
func (h *mac) Sum(out *[16]byte) {
- state := h.state
+ state := h.macState
if h.offset > 0 {
update(&state, h.buffer[:h.offset])
}
- finalize(out, &state)
+ finalize(out, &state.h, &state.s)
}
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_amd64.s b/vendor/golang.org/x/crypto/poly1305/sum_amd64.s
index 7d600f1..1d74f0f 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_amd64.s
+++ b/vendor/golang.org/x/crypto/poly1305/sum_amd64.s
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build amd64,!gccgo,!appengine
+//go:build gc && !purego
+// +build gc,!purego
#include "textflag.h"
@@ -54,10 +55,6 @@
ADCQ t3, h1; \
ADCQ $0, h2
-DATA ·poly1305Mask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF
-DATA ·poly1305Mask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC
-GLOBL ·poly1305Mask<>(SB), RODATA, $16
-
// func update(state *[7]uint64, msg []byte)
TEXT ·update(SB), $0-32
MOVQ state+0(FP), DI
@@ -110,39 +107,3 @@ done:
MOVQ R9, 8(DI)
MOVQ R10, 16(DI)
RET
-
-// func initialize(state *[7]uint64, key *[32]byte)
-TEXT ·initialize(SB), $0-16
- MOVQ state+0(FP), DI
- MOVQ key+8(FP), SI
-
- // state[0...7] is initialized with zero
- MOVOU 0(SI), X0
- MOVOU 16(SI), X1
- MOVOU ·poly1305Mask<>(SB), X2
- PAND X2, X0
- MOVOU X0, 24(DI)
- MOVOU X1, 40(DI)
- RET
-
-// func finalize(tag *[TagSize]byte, state *[7]uint64)
-TEXT ·finalize(SB), $0-16
- MOVQ tag+0(FP), DI
- MOVQ state+8(FP), SI
-
- MOVQ 0(SI), AX
- MOVQ 8(SI), BX
- MOVQ 16(SI), CX
- MOVQ AX, R8
- MOVQ BX, R9
- SUBQ $0xFFFFFFFFFFFFFFFB, AX
- SBBQ $0xFFFFFFFFFFFFFFFF, BX
- SBBQ $3, CX
- CMOVQCS R8, AX
- CMOVQCS R9, BX
- ADDQ 40(SI), AX
- ADCQ 48(SI), BX
-
- MOVQ AX, 0(DI)
- MOVQ BX, 8(DI)
- RET
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_arm.go b/vendor/golang.org/x/crypto/poly1305/sum_arm.go
deleted file mode 100644
index 5dc321c..0000000
--- a/vendor/golang.org/x/crypto/poly1305/sum_arm.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm,!gccgo,!appengine,!nacl
-
-package poly1305
-
-// This function is implemented in sum_arm.s
-//go:noescape
-func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]byte)
-
-// Sum generates an authenticator for m using a one-time key and puts the
-// 16-byte result into out. Authenticating two different messages with the same
-// key allows an attacker to forge messages at will.
-func Sum(out *[16]byte, m []byte, key *[32]byte) {
- var mPtr *byte
- if len(m) > 0 {
- mPtr = &m[0]
- }
- poly1305_auth_armv6(out, mPtr, uint32(len(m)), key)
-}
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_arm.s b/vendor/golang.org/x/crypto/poly1305/sum_arm.s
deleted file mode 100644
index f70b4ac..0000000
--- a/vendor/golang.org/x/crypto/poly1305/sum_arm.s
+++ /dev/null
@@ -1,427 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm,!gccgo,!appengine,!nacl
-
-#include "textflag.h"
-
-// This code was translated into a form compatible with 5a from the public
-// domain source by Andrew Moon: github.com/floodyberry/poly1305-opt/blob/master/app/extensions/poly1305.
-
-DATA ·poly1305_init_constants_armv6<>+0x00(SB)/4, $0x3ffffff
-DATA ·poly1305_init_constants_armv6<>+0x04(SB)/4, $0x3ffff03
-DATA ·poly1305_init_constants_armv6<>+0x08(SB)/4, $0x3ffc0ff
-DATA ·poly1305_init_constants_armv6<>+0x0c(SB)/4, $0x3f03fff
-DATA ·poly1305_init_constants_armv6<>+0x10(SB)/4, $0x00fffff
-GLOBL ·poly1305_init_constants_armv6<>(SB), 8, $20
-
-// Warning: the linker may use R11 to synthesize certain instructions. Please
-// take care and verify that no synthetic instructions use it.
-
-TEXT poly1305_init_ext_armv6<>(SB), NOSPLIT, $0
- // Needs 16 bytes of stack and 64 bytes of space pointed to by R0. (It
- // might look like it's only 60 bytes of space but the final four bytes
- // will be written by another function.) We need to skip over four
- // bytes of stack because that's saving the value of 'g'.
- ADD $4, R13, R8
- MOVM.IB [R4-R7], (R8)
- MOVM.IA.W (R1), [R2-R5]
- MOVW $·poly1305_init_constants_armv6<>(SB), R7
- MOVW R2, R8
- MOVW R2>>26, R9
- MOVW R3>>20, g
- MOVW R4>>14, R11
- MOVW R5>>8, R12
- ORR R3<<6, R9, R9
- ORR R4<<12, g, g
- ORR R5<<18, R11, R11
- MOVM.IA (R7), [R2-R6]
- AND R8, R2, R2
- AND R9, R3, R3
- AND g, R4, R4
- AND R11, R5, R5
- AND R12, R6, R6
- MOVM.IA.W [R2-R6], (R0)
- EOR R2, R2, R2
- EOR R3, R3, R3
- EOR R4, R4, R4
- EOR R5, R5, R5
- EOR R6, R6, R6
- MOVM.IA.W [R2-R6], (R0)
- MOVM.IA.W (R1), [R2-R5]
- MOVM.IA [R2-R6], (R0)
- ADD $20, R13, R0
- MOVM.DA (R0), [R4-R7]
- RET
-
-#define MOVW_UNALIGNED(Rsrc, Rdst, Rtmp, offset) \
- MOVBU (offset+0)(Rsrc), Rtmp; \
- MOVBU Rtmp, (offset+0)(Rdst); \
- MOVBU (offset+1)(Rsrc), Rtmp; \
- MOVBU Rtmp, (offset+1)(Rdst); \
- MOVBU (offset+2)(Rsrc), Rtmp; \
- MOVBU Rtmp, (offset+2)(Rdst); \
- MOVBU (offset+3)(Rsrc), Rtmp; \
- MOVBU Rtmp, (offset+3)(Rdst)
-
-TEXT poly1305_blocks_armv6<>(SB), NOSPLIT, $0
- // Needs 24 bytes of stack for saved registers and then 88 bytes of
- // scratch space after that. We assume that 24 bytes at (R13) have
- // already been used: four bytes for the link register saved in the
- // prelude of poly1305_auth_armv6, four bytes for saving the value of g
- // in that function and 16 bytes of scratch space used around
- // poly1305_finish_ext_armv6_skip1.
- ADD $24, R13, R12
- MOVM.IB [R4-R8, R14], (R12)
- MOVW R0, 88(R13)
- MOVW R1, 92(R13)
- MOVW R2, 96(R13)
- MOVW R1, R14
- MOVW R2, R12
- MOVW 56(R0), R8
- WORD $0xe1180008 // TST R8, R8 not working see issue 5921
- EOR R6, R6, R6
- MOVW.EQ $(1<<24), R6
- MOVW R6, 84(R13)
- ADD $116, R13, g
- MOVM.IA (R0), [R0-R9]
- MOVM.IA [R0-R4], (g)
- CMP $16, R12
- BLO poly1305_blocks_armv6_done
-
-poly1305_blocks_armv6_mainloop:
- WORD $0xe31e0003 // TST R14, #3 not working see issue 5921
- BEQ poly1305_blocks_armv6_mainloop_aligned
- ADD $100, R13, g
- MOVW_UNALIGNED(R14, g, R0, 0)
- MOVW_UNALIGNED(R14, g, R0, 4)
- MOVW_UNALIGNED(R14, g, R0, 8)
- MOVW_UNALIGNED(R14, g, R0, 12)
- MOVM.IA (g), [R0-R3]
- ADD $16, R14
- B poly1305_blocks_armv6_mainloop_loaded
-
-poly1305_blocks_armv6_mainloop_aligned:
- MOVM.IA.W (R14), [R0-R3]
-
-poly1305_blocks_armv6_mainloop_loaded:
- MOVW R0>>26, g
- MOVW R1>>20, R11
- MOVW R2>>14, R12
- MOVW R14, 92(R13)
- MOVW R3>>8, R4
- ORR R1<<6, g, g
- ORR R2<<12, R11, R11
- ORR R3<<18, R12, R12
- BIC $0xfc000000, R0, R0
- BIC $0xfc000000, g, g
- MOVW 84(R13), R3
- BIC $0xfc000000, R11, R11
- BIC $0xfc000000, R12, R12
- ADD R0, R5, R5
- ADD g, R6, R6
- ORR R3, R4, R4
- ADD R11, R7, R7
- ADD $116, R13, R14
- ADD R12, R8, R8
- ADD R4, R9, R9
- MOVM.IA (R14), [R0-R4]
- MULLU R4, R5, (R11, g)
- MULLU R3, R5, (R14, R12)
- MULALU R3, R6, (R11, g)
- MULALU R2, R6, (R14, R12)
- MULALU R2, R7, (R11, g)
- MULALU R1, R7, (R14, R12)
- ADD R4<<2, R4, R4
- ADD R3<<2, R3, R3
- MULALU R1, R8, (R11, g)
- MULALU R0, R8, (R14, R12)
- MULALU R0, R9, (R11, g)
- MULALU R4, R9, (R14, R12)
- MOVW g, 76(R13)
- MOVW R11, 80(R13)
- MOVW R12, 68(R13)
- MOVW R14, 72(R13)
- MULLU R2, R5, (R11, g)
- MULLU R1, R5, (R14, R12)
- MULALU R1, R6, (R11, g)
- MULALU R0, R6, (R14, R12)
- MULALU R0, R7, (R11, g)
- MULALU R4, R7, (R14, R12)
- ADD R2<<2, R2, R2
- ADD R1<<2, R1, R1
- MULALU R4, R8, (R11, g)
- MULALU R3, R8, (R14, R12)
- MULALU R3, R9, (R11, g)
- MULALU R2, R9, (R14, R12)
- MOVW g, 60(R13)
- MOVW R11, 64(R13)
- MOVW R12, 52(R13)
- MOVW R14, 56(R13)
- MULLU R0, R5, (R11, g)
- MULALU R4, R6, (R11, g)
- MULALU R3, R7, (R11, g)
- MULALU R2, R8, (R11, g)
- MULALU R1, R9, (R11, g)
- ADD $52, R13, R0
- MOVM.IA (R0), [R0-R7]
- MOVW g>>26, R12
- MOVW R4>>26, R14
- ORR R11<<6, R12, R12
- ORR R5<<6, R14, R14
- BIC $0xfc000000, g, g
- BIC $0xfc000000, R4, R4
- ADD.S R12, R0, R0
- ADC $0, R1, R1
- ADD.S R14, R6, R6
- ADC $0, R7, R7
- MOVW R0>>26, R12
- MOVW R6>>26, R14
- ORR R1<<6, R12, R12
- ORR R7<<6, R14, R14
- BIC $0xfc000000, R0, R0
- BIC $0xfc000000, R6, R6
- ADD R14<<2, R14, R14
- ADD.S R12, R2, R2
- ADC $0, R3, R3
- ADD R14, g, g
- MOVW R2>>26, R12
- MOVW g>>26, R14
- ORR R3<<6, R12, R12
- BIC $0xfc000000, g, R5
- BIC $0xfc000000, R2, R7
- ADD R12, R4, R4
- ADD R14, R0, R0
- MOVW R4>>26, R12
- BIC $0xfc000000, R4, R8
- ADD R12, R6, R9
- MOVW 96(R13), R12
- MOVW 92(R13), R14
- MOVW R0, R6
- CMP $32, R12
- SUB $16, R12, R12
- MOVW R12, 96(R13)
- BHS poly1305_blocks_armv6_mainloop
-
-poly1305_blocks_armv6_done:
- MOVW 88(R13), R12
- MOVW R5, 20(R12)
- MOVW R6, 24(R12)
- MOVW R7, 28(R12)
- MOVW R8, 32(R12)
- MOVW R9, 36(R12)
- ADD $48, R13, R0
- MOVM.DA (R0), [R4-R8, R14]
- RET
-
-#define MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp) \
- MOVBU.P 1(Rsrc), Rtmp; \
- MOVBU.P Rtmp, 1(Rdst); \
- MOVBU.P 1(Rsrc), Rtmp; \
- MOVBU.P Rtmp, 1(Rdst)
-
-#define MOVWP_UNALIGNED(Rsrc, Rdst, Rtmp) \
- MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp); \
- MOVHUP_UNALIGNED(Rsrc, Rdst, Rtmp)
-
-// func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]key)
-TEXT ·poly1305_auth_armv6(SB), $196-16
- // The value 196, just above, is the sum of 64 (the size of the context
- // structure) and 132 (the amount of stack needed).
- //
- // At this point, the stack pointer (R13) has been moved down. It
- // points to the saved link register and there's 196 bytes of free
- // space above it.
- //
- // The stack for this function looks like:
- //
- // +---------------------
- // |
- // | 64 bytes of context structure
- // |
- // +---------------------
- // |
- // | 112 bytes for poly1305_blocks_armv6
- // |
- // +---------------------
- // | 16 bytes of final block, constructed at
- // | poly1305_finish_ext_armv6_skip8
- // +---------------------
- // | four bytes of saved 'g'
- // +---------------------
- // | lr, saved by prelude <- R13 points here
- // +---------------------
- MOVW g, 4(R13)
-
- MOVW out+0(FP), R4
- MOVW m+4(FP), R5
- MOVW mlen+8(FP), R6
- MOVW key+12(FP), R7
-
- ADD $136, R13, R0 // 136 = 4 + 4 + 16 + 112
- MOVW R7, R1
-
- // poly1305_init_ext_armv6 will write to the stack from R13+4, but
- // that's ok because none of the other values have been written yet.
- BL poly1305_init_ext_armv6<>(SB)
- BIC.S $15, R6, R2
- BEQ poly1305_auth_armv6_noblocks
- ADD $136, R13, R0
- MOVW R5, R1
- ADD R2, R5, R5
- SUB R2, R6, R6
- BL poly1305_blocks_armv6<>(SB)
-
-poly1305_auth_armv6_noblocks:
- ADD $136, R13, R0
- MOVW R5, R1
- MOVW R6, R2
- MOVW R4, R3
-
- MOVW R0, R5
- MOVW R1, R6
- MOVW R2, R7
- MOVW R3, R8
- AND.S R2, R2, R2
- BEQ poly1305_finish_ext_armv6_noremaining
- EOR R0, R0
- ADD $8, R13, R9 // 8 = offset to 16 byte scratch space
- MOVW R0, (R9)
- MOVW R0, 4(R9)
- MOVW R0, 8(R9)
- MOVW R0, 12(R9)
- WORD $0xe3110003 // TST R1, #3 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_aligned
- WORD $0xe3120008 // TST R2, #8 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip8
- MOVWP_UNALIGNED(R1, R9, g)
- MOVWP_UNALIGNED(R1, R9, g)
-
-poly1305_finish_ext_armv6_skip8:
- WORD $0xe3120004 // TST $4, R2 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip4
- MOVWP_UNALIGNED(R1, R9, g)
-
-poly1305_finish_ext_armv6_skip4:
- WORD $0xe3120002 // TST $2, R2 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip2
- MOVHUP_UNALIGNED(R1, R9, g)
- B poly1305_finish_ext_armv6_skip2
-
-poly1305_finish_ext_armv6_aligned:
- WORD $0xe3120008 // TST R2, #8 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip8_aligned
- MOVM.IA.W (R1), [g-R11]
- MOVM.IA.W [g-R11], (R9)
-
-poly1305_finish_ext_armv6_skip8_aligned:
- WORD $0xe3120004 // TST $4, R2 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip4_aligned
- MOVW.P 4(R1), g
- MOVW.P g, 4(R9)
-
-poly1305_finish_ext_armv6_skip4_aligned:
- WORD $0xe3120002 // TST $2, R2 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip2
- MOVHU.P 2(R1), g
- MOVH.P g, 2(R9)
-
-poly1305_finish_ext_armv6_skip2:
- WORD $0xe3120001 // TST $1, R2 not working see issue 5921
- BEQ poly1305_finish_ext_armv6_skip1
- MOVBU.P 1(R1), g
- MOVBU.P g, 1(R9)
-
-poly1305_finish_ext_armv6_skip1:
- MOVW $1, R11
- MOVBU R11, 0(R9)
- MOVW R11, 56(R5)
- MOVW R5, R0
- ADD $8, R13, R1
- MOVW $16, R2
- BL poly1305_blocks_armv6<>(SB)
-
-poly1305_finish_ext_armv6_noremaining:
- MOVW 20(R5), R0
- MOVW 24(R5), R1
- MOVW 28(R5), R2
- MOVW 32(R5), R3
- MOVW 36(R5), R4
- MOVW R4>>26, R12
- BIC $0xfc000000, R4, R4
- ADD R12<<2, R12, R12
- ADD R12, R0, R0
- MOVW R0>>26, R12
- BIC $0xfc000000, R0, R0
- ADD R12, R1, R1
- MOVW R1>>26, R12
- BIC $0xfc000000, R1, R1
- ADD R12, R2, R2
- MOVW R2>>26, R12
- BIC $0xfc000000, R2, R2
- ADD R12, R3, R3
- MOVW R3>>26, R12
- BIC $0xfc000000, R3, R3
- ADD R12, R4, R4
- ADD $5, R0, R6
- MOVW R6>>26, R12
- BIC $0xfc000000, R6, R6
- ADD R12, R1, R7
- MOVW R7>>26, R12
- BIC $0xfc000000, R7, R7
- ADD R12, R2, g
- MOVW g>>26, R12
- BIC $0xfc000000, g, g
- ADD R12, R3, R11
- MOVW $-(1<<26), R12
- ADD R11>>26, R12, R12
- BIC $0xfc000000, R11, R11
- ADD R12, R4, R9
- MOVW R9>>31, R12
- SUB $1, R12
- AND R12, R6, R6
- AND R12, R7, R7
- AND R12, g, g
- AND R12, R11, R11
- AND R12, R9, R9
- MVN R12, R12
- AND R12, R0, R0
- AND R12, R1, R1
- AND R12, R2, R2
- AND R12, R3, R3
- AND R12, R4, R4
- ORR R6, R0, R0
- ORR R7, R1, R1
- ORR g, R2, R2
- ORR R11, R3, R3
- ORR R9, R4, R4
- ORR R1<<26, R0, R0
- MOVW R1>>6, R1
- ORR R2<<20, R1, R1
- MOVW R2>>12, R2
- ORR R3<<14, R2, R2
- MOVW R3>>18, R3
- ORR R4<<8, R3, R3
- MOVW 40(R5), R6
- MOVW 44(R5), R7
- MOVW 48(R5), g
- MOVW 52(R5), R11
- ADD.S R6, R0, R0
- ADC.S R7, R1, R1
- ADC.S g, R2, R2
- ADC.S R11, R3, R3
- MOVM.IA [R0-R3], (R8)
- MOVW R5, R12
- EOR R0, R0, R0
- EOR R1, R1, R1
- EOR R2, R2, R2
- EOR R3, R3, R3
- EOR R4, R4, R4
- EOR R5, R5, R5
- EOR R6, R6, R6
- EOR R7, R7, R7
- MOVM.IA.W [R0-R7], (R12)
- MOVM.IA [R0-R7], (R12)
- MOVW 4(R13), g
- RET
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_generic.go b/vendor/golang.org/x/crypto/poly1305/sum_generic.go
index bab76ef..c942a65 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_generic.go
+++ b/vendor/golang.org/x/crypto/poly1305/sum_generic.go
@@ -2,171 +2,309 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// This file provides the generic implementation of Sum and MAC. Other files
+// might provide optimized assembly implementations of some of this code.
+
package poly1305
import "encoding/binary"
-const (
- msgBlock = uint32(1 << 24)
- finalBlock = uint32(0)
-)
+// Poly1305 [RFC 7539] is a relatively simple algorithm: the authentication tag
+// for a 64 bytes message is approximately
+//
+// s + m[0:16] * r⁴ + m[16:32] * r³ + m[32:48] * r² + m[48:64] * r mod 2¹³⁰ - 5
+//
+// for some secret r and s. It can be computed sequentially like
+//
+// for len(msg) > 0:
+// h += read(msg, 16)
+// h *= r
+// h %= 2¹³⁰ - 5
+// return h + s
+//
+// All the complexity is about doing performant constant-time math on numbers
+// larger than any available numeric type.
-// sumGeneric generates an authenticator for msg using a one-time key and
-// puts the 16-byte result into out. This is the generic implementation of
-// Sum and should be called if no assembly implementation is available.
func sumGeneric(out *[TagSize]byte, msg []byte, key *[32]byte) {
h := newMACGeneric(key)
h.Write(msg)
h.Sum(out)
}
-func newMACGeneric(key *[32]byte) (h macGeneric) {
- h.r[0] = binary.LittleEndian.Uint32(key[0:]) & 0x3ffffff
- h.r[1] = (binary.LittleEndian.Uint32(key[3:]) >> 2) & 0x3ffff03
- h.r[2] = (binary.LittleEndian.Uint32(key[6:]) >> 4) & 0x3ffc0ff
- h.r[3] = (binary.LittleEndian.Uint32(key[9:]) >> 6) & 0x3f03fff
- h.r[4] = (binary.LittleEndian.Uint32(key[12:]) >> 8) & 0x00fffff
-
- h.s[0] = binary.LittleEndian.Uint32(key[16:])
- h.s[1] = binary.LittleEndian.Uint32(key[20:])
- h.s[2] = binary.LittleEndian.Uint32(key[24:])
- h.s[3] = binary.LittleEndian.Uint32(key[28:])
- return
+func newMACGeneric(key *[32]byte) macGeneric {
+ m := macGeneric{}
+ initialize(key, &m.macState)
+ return m
+}
+
+// macState holds numbers in saturated 64-bit little-endian limbs. That is,
+// the value of [x0, x1, x2] is x[0] + x[1] * 2⁶⁴ + x[2] * 2¹²⁸.
+type macState struct {
+ // h is the main accumulator. It is to be interpreted modulo 2¹³⁰ - 5, but
+ // can grow larger during and after rounds. It must, however, remain below
+ // 2 * (2¹³⁰ - 5).
+ h [3]uint64
+ // r and s are the private key components.
+ r [2]uint64
+ s [2]uint64
}
type macGeneric struct {
- h, r [5]uint32
- s [4]uint32
+ macState
buffer [TagSize]byte
offset int
}
-func (h *macGeneric) Write(p []byte) (n int, err error) {
- n = len(p)
+// Write splits the incoming message into TagSize chunks, and passes them to
+// update. It buffers incomplete chunks.
+func (h *macGeneric) Write(p []byte) (int, error) {
+ nn := len(p)
if h.offset > 0 {
- remaining := TagSize - h.offset
- if n < remaining {
- h.offset += copy(h.buffer[h.offset:], p)
- return n, nil
+ n := copy(h.buffer[h.offset:], p)
+ if h.offset+n < TagSize {
+ h.offset += n
+ return nn, nil
}
- copy(h.buffer[h.offset:], p[:remaining])
- p = p[remaining:]
+ p = p[n:]
h.offset = 0
- updateGeneric(h.buffer[:], msgBlock, &(h.h), &(h.r))
+ updateGeneric(&h.macState, h.buffer[:])
}
- if nn := len(p) - (len(p) % TagSize); nn > 0 {
- updateGeneric(p, msgBlock, &(h.h), &(h.r))
- p = p[nn:]
+ if n := len(p) - (len(p) % TagSize); n > 0 {
+ updateGeneric(&h.macState, p[:n])
+ p = p[n:]
}
if len(p) > 0 {
h.offset += copy(h.buffer[h.offset:], p)
}
- return n, nil
+ return nn, nil
}
-func (h *macGeneric) Sum(out *[16]byte) {
- H, R := h.h, h.r
+// Sum flushes the last incomplete chunk from the buffer, if any, and generates
+// the MAC output. It does not modify its state, in order to allow for multiple
+// calls to Sum, even if no Write is allowed after Sum.
+func (h *macGeneric) Sum(out *[TagSize]byte) {
+ state := h.macState
if h.offset > 0 {
- var buffer [TagSize]byte
- copy(buffer[:], h.buffer[:h.offset])
- buffer[h.offset] = 1 // invariant: h.offset < TagSize
- updateGeneric(buffer[:], finalBlock, &H, &R)
+ updateGeneric(&state, h.buffer[:h.offset])
}
- finalizeGeneric(out, &H, &(h.s))
+ finalize(out, &state.h, &state.s)
+}
+
+// [rMask0, rMask1] is the specified Poly1305 clamping mask in little-endian. It
+// clears some bits of the secret coefficient to make it possible to implement
+// multiplication more efficiently.
+const (
+ rMask0 = 0x0FFFFFFC0FFFFFFF
+ rMask1 = 0x0FFFFFFC0FFFFFFC
+)
+
+// initialize loads the 256-bit key into the two 128-bit secret values r and s.
+func initialize(key *[32]byte, m *macState) {
+ m.r[0] = binary.LittleEndian.Uint64(key[0:8]) & rMask0
+ m.r[1] = binary.LittleEndian.Uint64(key[8:16]) & rMask1
+ m.s[0] = binary.LittleEndian.Uint64(key[16:24])
+ m.s[1] = binary.LittleEndian.Uint64(key[24:32])
+}
+
+// uint128 holds a 128-bit number as two 64-bit limbs, for use with the
+// bits.Mul64 and bits.Add64 intrinsics.
+type uint128 struct {
+ lo, hi uint64
+}
+
+func mul64(a, b uint64) uint128 {
+ hi, lo := bitsMul64(a, b)
+ return uint128{lo, hi}
}
-func updateGeneric(msg []byte, flag uint32, h, r *[5]uint32) {
- h0, h1, h2, h3, h4 := h[0], h[1], h[2], h[3], h[4]
- r0, r1, r2, r3, r4 := uint64(r[0]), uint64(r[1]), uint64(r[2]), uint64(r[3]), uint64(r[4])
- R1, R2, R3, R4 := r1*5, r2*5, r3*5, r4*5
-
- for len(msg) >= TagSize {
- // h += msg
- h0 += binary.LittleEndian.Uint32(msg[0:]) & 0x3ffffff
- h1 += (binary.LittleEndian.Uint32(msg[3:]) >> 2) & 0x3ffffff
- h2 += (binary.LittleEndian.Uint32(msg[6:]) >> 4) & 0x3ffffff
- h3 += (binary.LittleEndian.Uint32(msg[9:]) >> 6) & 0x3ffffff
- h4 += (binary.LittleEndian.Uint32(msg[12:]) >> 8) | flag
-
- // h *= r
- d0 := (uint64(h0) * r0) + (uint64(h1) * R4) + (uint64(h2) * R3) + (uint64(h3) * R2) + (uint64(h4) * R1)
- d1 := (d0 >> 26) + (uint64(h0) * r1) + (uint64(h1) * r0) + (uint64(h2) * R4) + (uint64(h3) * R3) + (uint64(h4) * R2)
- d2 := (d1 >> 26) + (uint64(h0) * r2) + (uint64(h1) * r1) + (uint64(h2) * r0) + (uint64(h3) * R4) + (uint64(h4) * R3)
- d3 := (d2 >> 26) + (uint64(h0) * r3) + (uint64(h1) * r2) + (uint64(h2) * r1) + (uint64(h3) * r0) + (uint64(h4) * R4)
- d4 := (d3 >> 26) + (uint64(h0) * r4) + (uint64(h1) * r3) + (uint64(h2) * r2) + (uint64(h3) * r1) + (uint64(h4) * r0)
-
- // h %= p
- h0 = uint32(d0) & 0x3ffffff
- h1 = uint32(d1) & 0x3ffffff
- h2 = uint32(d2) & 0x3ffffff
- h3 = uint32(d3) & 0x3ffffff
- h4 = uint32(d4) & 0x3ffffff
-
- h0 += uint32(d4>>26) * 5
- h1 += h0 >> 26
- h0 = h0 & 0x3ffffff
-
- msg = msg[TagSize:]
+func add128(a, b uint128) uint128 {
+ lo, c := bitsAdd64(a.lo, b.lo, 0)
+ hi, c := bitsAdd64(a.hi, b.hi, c)
+ if c != 0 {
+ panic("poly1305: unexpected overflow")
}
+ return uint128{lo, hi}
+}
- h[0], h[1], h[2], h[3], h[4] = h0, h1, h2, h3, h4
+func shiftRightBy2(a uint128) uint128 {
+ a.lo = a.lo>>2 | (a.hi&3)<<62
+ a.hi = a.hi >> 2
+ return a
}
-func finalizeGeneric(out *[TagSize]byte, h *[5]uint32, s *[4]uint32) {
- h0, h1, h2, h3, h4 := h[0], h[1], h[2], h[3], h[4]
-
- // h %= p reduction
- h2 += h1 >> 26
- h1 &= 0x3ffffff
- h3 += h2 >> 26
- h2 &= 0x3ffffff
- h4 += h3 >> 26
- h3 &= 0x3ffffff
- h0 += 5 * (h4 >> 26)
- h4 &= 0x3ffffff
- h1 += h0 >> 26
- h0 &= 0x3ffffff
-
- // h - p
- t0 := h0 + 5
- t1 := h1 + (t0 >> 26)
- t2 := h2 + (t1 >> 26)
- t3 := h3 + (t2 >> 26)
- t4 := h4 + (t3 >> 26) - (1 << 26)
- t0 &= 0x3ffffff
- t1 &= 0x3ffffff
- t2 &= 0x3ffffff
- t3 &= 0x3ffffff
-
- // select h if h < p else h - p
- t_mask := (t4 >> 31) - 1
- h_mask := ^t_mask
- h0 = (h0 & h_mask) | (t0 & t_mask)
- h1 = (h1 & h_mask) | (t1 & t_mask)
- h2 = (h2 & h_mask) | (t2 & t_mask)
- h3 = (h3 & h_mask) | (t3 & t_mask)
- h4 = (h4 & h_mask) | (t4 & t_mask)
-
- // h %= 2^128
- h0 |= h1 << 26
- h1 = ((h1 >> 6) | (h2 << 20))
- h2 = ((h2 >> 12) | (h3 << 14))
- h3 = ((h3 >> 18) | (h4 << 8))
-
- // s: the s part of the key
- // tag = (h + s) % (2^128)
- t := uint64(h0) + uint64(s[0])
- h0 = uint32(t)
- t = uint64(h1) + uint64(s[1]) + (t >> 32)
- h1 = uint32(t)
- t = uint64(h2) + uint64(s[2]) + (t >> 32)
- h2 = uint32(t)
- t = uint64(h3) + uint64(s[3]) + (t >> 32)
- h3 = uint32(t)
-
- binary.LittleEndian.PutUint32(out[0:], h0)
- binary.LittleEndian.PutUint32(out[4:], h1)
- binary.LittleEndian.PutUint32(out[8:], h2)
- binary.LittleEndian.PutUint32(out[12:], h3)
+// updateGeneric absorbs msg into the state.h accumulator. For each chunk m of
+// 128 bits of message, it computes
+//
+// h₊ = (h + m) * r mod 2¹³⁰ - 5
+//
+// If the msg length is not a multiple of TagSize, it assumes the last
+// incomplete chunk is the final one.
+func updateGeneric(state *macState, msg []byte) {
+ h0, h1, h2 := state.h[0], state.h[1], state.h[2]
+ r0, r1 := state.r[0], state.r[1]
+
+ for len(msg) > 0 {
+ var c uint64
+
+ // For the first step, h + m, we use a chain of bits.Add64 intrinsics.
+ // The resulting value of h might exceed 2¹³⁰ - 5, but will be partially
+ // reduced at the end of the multiplication below.
+ //
+ // The spec requires us to set a bit just above the message size, not to
+ // hide leading zeroes. For full chunks, that's 1 << 128, so we can just
+ // add 1 to the most significant (2¹²⁸) limb, h2.
+ if len(msg) >= TagSize {
+ h0, c = bitsAdd64(h0, binary.LittleEndian.Uint64(msg[0:8]), 0)
+ h1, c = bitsAdd64(h1, binary.LittleEndian.Uint64(msg[8:16]), c)
+ h2 += c + 1
+
+ msg = msg[TagSize:]
+ } else {
+ var buf [TagSize]byte
+ copy(buf[:], msg)
+ buf[len(msg)] = 1
+
+ h0, c = bitsAdd64(h0, binary.LittleEndian.Uint64(buf[0:8]), 0)
+ h1, c = bitsAdd64(h1, binary.LittleEndian.Uint64(buf[8:16]), c)
+ h2 += c
+
+ msg = nil
+ }
+
+ // Multiplication of big number limbs is similar to elementary school
+ // columnar multiplication. Instead of digits, there are 64-bit limbs.
+ //
+ // We are multiplying a 3 limbs number, h, by a 2 limbs number, r.
+ //
+ // h2 h1 h0 x
+ // r1 r0 =
+ // ----------------
+ // h2r0 h1r0 h0r0 <-- individual 128-bit products
+ // + h2r1 h1r1 h0r1
+ // ------------------------
+ // m3 m2 m1 m0 <-- result in 128-bit overlapping limbs
+ // ------------------------
+ // m3.hi m2.hi m1.hi m0.hi <-- carry propagation
+ // + m3.lo m2.lo m1.lo m0.lo
+ // -------------------------------
+ // t4 t3 t2 t1 t0 <-- final result in 64-bit limbs
+ //
+ // The main difference from pen-and-paper multiplication is that we do
+ // carry propagation in a separate step, as if we wrote two digit sums
+ // at first (the 128-bit limbs), and then carried the tens all at once.
+
+ h0r0 := mul64(h0, r0)
+ h1r0 := mul64(h1, r0)
+ h2r0 := mul64(h2, r0)
+ h0r1 := mul64(h0, r1)
+ h1r1 := mul64(h1, r1)
+ h2r1 := mul64(h2, r1)
+
+ // Since h2 is known to be at most 7 (5 + 1 + 1), and r0 and r1 have their
+ // top 4 bits cleared by rMask{0,1}, we know that their product is not going
+ // to overflow 64 bits, so we can ignore the high part of the products.
+ //
+ // This also means that the product doesn't have a fifth limb (t4).
+ if h2r0.hi != 0 {
+ panic("poly1305: unexpected overflow")
+ }
+ if h2r1.hi != 0 {
+ panic("poly1305: unexpected overflow")
+ }
+
+ m0 := h0r0
+ m1 := add128(h1r0, h0r1) // These two additions don't overflow thanks again
+ m2 := add128(h2r0, h1r1) // to the 4 masked bits at the top of r0 and r1.
+ m3 := h2r1
+
+ t0 := m0.lo
+ t1, c := bitsAdd64(m1.lo, m0.hi, 0)
+ t2, c := bitsAdd64(m2.lo, m1.hi, c)
+ t3, _ := bitsAdd64(m3.lo, m2.hi, c)
+
+ // Now we have the result as 4 64-bit limbs, and we need to reduce it
+ // modulo 2¹³⁰ - 5. The special shape of this Crandall prime lets us do
+ // a cheap partial reduction according to the reduction identity
+ //
+ // c * 2¹³⁰ + n = c * 5 + n mod 2¹³⁰ - 5
+ //
+ // because 2¹³⁰ = 5 mod 2¹³⁰ - 5. Partial reduction since the result is
+ // likely to be larger than 2¹³⁰ - 5, but still small enough to fit the
+ // assumptions we make about h in the rest of the code.
+ //
+ // See also https://speakerdeck.com/gtank/engineering-prime-numbers?slide=23
+
+ // We split the final result at the 2¹³⁰ mark into h and cc, the carry.
+ // Note that the carry bits are effectively shifted left by 2, in other
+ // words, cc = c * 4 for the c in the reduction identity.
+ h0, h1, h2 = t0, t1, t2&maskLow2Bits
+ cc := uint128{t2 & maskNotLow2Bits, t3}
+
+ // To add c * 5 to h, we first add cc = c * 4, and then add (cc >> 2) = c.
+
+ h0, c = bitsAdd64(h0, cc.lo, 0)
+ h1, c = bitsAdd64(h1, cc.hi, c)
+ h2 += c
+
+ cc = shiftRightBy2(cc)
+
+ h0, c = bitsAdd64(h0, cc.lo, 0)
+ h1, c = bitsAdd64(h1, cc.hi, c)
+ h2 += c
+
+ // h2 is at most 3 + 1 + 1 = 5, making the whole of h at most
+ //
+ // 5 * 2¹²⁸ + (2¹²⁸ - 1) = 6 * 2¹²⁸ - 1
+ }
+
+ state.h[0], state.h[1], state.h[2] = h0, h1, h2
+}
+
+const (
+ maskLow2Bits uint64 = 0x0000000000000003
+ maskNotLow2Bits uint64 = ^maskLow2Bits
+)
+
+// select64 returns x if v == 1 and y if v == 0, in constant time.
+func select64(v, x, y uint64) uint64 { return ^(v-1)&x | (v-1)&y }
+
+// [p0, p1, p2] is 2¹³⁰ - 5 in little endian order.
+const (
+ p0 = 0xFFFFFFFFFFFFFFFB
+ p1 = 0xFFFFFFFFFFFFFFFF
+ p2 = 0x0000000000000003
+)
+
+// finalize completes the modular reduction of h and computes
+//
+// out = h + s mod 2¹²⁸
+//
+func finalize(out *[TagSize]byte, h *[3]uint64, s *[2]uint64) {
+ h0, h1, h2 := h[0], h[1], h[2]
+
+ // After the partial reduction in updateGeneric, h might be more than
+ // 2¹³⁰ - 5, but will be less than 2 * (2¹³⁰ - 5). To complete the reduction
+ // in constant time, we compute t = h - (2¹³⁰ - 5), and select h as the
+ // result if the subtraction underflows, and t otherwise.
+
+ hMinusP0, b := bitsSub64(h0, p0, 0)
+ hMinusP1, b := bitsSub64(h1, p1, b)
+ _, b = bitsSub64(h2, p2, b)
+
+ // h = h if h < p else h - p
+ h0 = select64(b, h0, hMinusP0)
+ h1 = select64(b, h1, hMinusP1)
+
+ // Finally, we compute the last Poly1305 step
+ //
+ // tag = h + s mod 2¹²⁸
+ //
+ // by just doing a wide addition with the 128 low bits of h and discarding
+ // the overflow.
+ h0, c := bitsAdd64(h0, s[0], 0)
+ h1, _ = bitsAdd64(h1, s[1], c)
+
+ binary.LittleEndian.PutUint64(out[0:8], h0)
+ binary.LittleEndian.PutUint64(out[8:16], h1)
}
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_noasm.go b/vendor/golang.org/x/crypto/poly1305/sum_noasm.go
deleted file mode 100644
index 8a9c207..0000000
--- a/vendor/golang.org/x/crypto/poly1305/sum_noasm.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2018 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build s390x,!go1.11 !arm,!amd64,!s390x,!ppc64le gccgo appengine nacl
-
-package poly1305
-
-// Sum generates an authenticator for msg using a one-time key and puts the
-// 16-byte result into out. Authenticating two different messages with the same
-// key allows an attacker to forge messages at will.
-func Sum(out *[TagSize]byte, msg []byte, key *[32]byte) {
- h := newMAC(key)
- h.Write(msg)
- h.Sum(out)
-}
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.go b/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.go
index 2402b63..4a06994 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.go
+++ b/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.go
@@ -2,67 +2,47 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ppc64le,!gccgo,!appengine
+//go:build gc && !purego
+// +build gc,!purego
package poly1305
//go:noescape
-func initialize(state *[7]uint64, key *[32]byte)
+func update(state *macState, msg []byte)
-//go:noescape
-func update(state *[7]uint64, msg []byte)
-
-//go:noescape
-func finalize(tag *[TagSize]byte, state *[7]uint64)
-
-// Sum generates an authenticator for m using a one-time key and puts the
-// 16-byte result into out. Authenticating two different messages with the same
-// key allows an attacker to forge messages at will.
-func Sum(out *[16]byte, m []byte, key *[32]byte) {
- h := newMAC(key)
- h.Write(m)
- h.Sum(out)
-}
-
-func newMAC(key *[32]byte) (h mac) {
- initialize(&h.state, key)
- return
-}
-
-type mac struct {
- state [7]uint64 // := uint64{ h0, h1, h2, r0, r1, pad0, pad1 }
-
- buffer [TagSize]byte
- offset int
-}
+// mac is a wrapper for macGeneric that redirects calls that would have gone to
+// updateGeneric to update.
+//
+// Its Write and Sum methods are otherwise identical to the macGeneric ones, but
+// using function pointers would carry a major performance cost.
+type mac struct{ macGeneric }
-func (h *mac) Write(p []byte) (n int, err error) {
- n = len(p)
+func (h *mac) Write(p []byte) (int, error) {
+ nn := len(p)
if h.offset > 0 {
- remaining := TagSize - h.offset
- if n < remaining {
- h.offset += copy(h.buffer[h.offset:], p)
- return n, nil
+ n := copy(h.buffer[h.offset:], p)
+ if h.offset+n < TagSize {
+ h.offset += n
+ return nn, nil
}
- copy(h.buffer[h.offset:], p[:remaining])
- p = p[remaining:]
+ p = p[n:]
h.offset = 0
- update(&h.state, h.buffer[:])
+ update(&h.macState, h.buffer[:])
}
- if nn := len(p) - (len(p) % TagSize); nn > 0 {
- update(&h.state, p[:nn])
- p = p[nn:]
+ if n := len(p) - (len(p) % TagSize); n > 0 {
+ update(&h.macState, p[:n])
+ p = p[n:]
}
if len(p) > 0 {
h.offset += copy(h.buffer[h.offset:], p)
}
- return n, nil
+ return nn, nil
}
func (h *mac) Sum(out *[16]byte) {
- state := h.state
+ state := h.macState
if h.offset > 0 {
update(&state, h.buffer[:h.offset])
}
- finalize(out, &state)
+ finalize(out, &state.h, &state.s)
}
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.s b/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.s
index 55c7167..58422aa 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.s
+++ b/vendor/golang.org/x/crypto/poly1305/sum_ppc64le.s
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build ppc64le,!gccgo,!appengine
+//go:build gc && !purego
+// +build gc,!purego
#include "textflag.h"
@@ -58,7 +59,6 @@ DATA ·poly1305Mask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC
GLOBL ·poly1305Mask<>(SB), RODATA, $16
// func update(state *[7]uint64, msg []byte)
-
TEXT ·update(SB), $0-32
MOVD state+0(FP), R3
MOVD msg_base+8(FP), R4
@@ -83,7 +83,7 @@ multiply:
BGE loop
bytes_between_0_and_15:
- CMP $0, R5
+ CMP R5, $0
BEQ done
MOVD $0, R16 // h0
MOVD $0, R17 // h1
@@ -123,7 +123,7 @@ just1:
// Exactly 8
MOVD (R4), R16
- CMP $0, R17
+ CMP R17, $0
// Check if we've already set R17; if not
// set 1 to indicate end of msg.
@@ -152,7 +152,7 @@ less4:
ADD $2, R4
less2:
- CMP $0, R5
+ CMP R5, $0
BEQ insert1
MOVBZ (R4), R21
SLD R22, R21, R21
@@ -167,12 +167,12 @@ insert1:
carry:
// Add new values to h0, h1, h2
- ADDC R16, R8
- ADDE R17, R9
- ADDE $0, R10
- MOVD $16, R5
- ADD R5, R4
- BR multiply
+ ADDC R16, R8
+ ADDE R17, R9
+ ADDZE R10, R10
+ MOVD $16, R5
+ ADD R5, R4
+ BR multiply
done:
// Save h0, h1, h2 in state
@@ -180,68 +180,3 @@ done:
MOVD R9, 8(R3)
MOVD R10, 16(R3)
RET
-
-// func initialize(state *[7]uint64, key *[32]byte)
-TEXT ·initialize(SB), $0-16
- MOVD state+0(FP), R3
- MOVD key+8(FP), R4
-
- // state[0...7] is initialized with zero
- // Load key
- MOVD 0(R4), R5
- MOVD 8(R4), R6
- MOVD 16(R4), R7
- MOVD 24(R4), R8
-
- // Address of key mask
- MOVD $·poly1305Mask<>(SB), R9
-
- // Save original key in state
- MOVD R7, 40(R3)
- MOVD R8, 48(R3)
-
- // Get mask
- MOVD (R9), R7
- MOVD 8(R9), R8
-
- // And with key
- AND R5, R7, R5
- AND R6, R8, R6
-
- // Save masked key in state
- MOVD R5, 24(R3)
- MOVD R6, 32(R3)
- RET
-
-// func finalize(tag *[TagSize]byte, state *[7]uint64)
-TEXT ·finalize(SB), $0-16
- MOVD tag+0(FP), R3
- MOVD state+8(FP), R4
-
- // Get h0, h1, h2 from state
- MOVD 0(R4), R5
- MOVD 8(R4), R6
- MOVD 16(R4), R7
-
- // Save h0, h1
- MOVD R5, R8
- MOVD R6, R9
- MOVD $3, R20
- MOVD $-1, R21
- SUBC $-5, R5
- SUBE R21, R6
- SUBE R20, R7
- MOVD $0, R21
- SUBZE R21
-
- // Check for carry
- CMP $0, R21
- ISEL $2, R5, R8, R5
- ISEL $2, R6, R9, R6
- MOVD 40(R4), R8
- MOVD 48(R4), R9
- ADDC R8, R5
- ADDE R9, R6
- MOVD R5, 0(R3)
- MOVD R6, 8(R3)
- RET
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_s390x.go b/vendor/golang.org/x/crypto/poly1305/sum_s390x.go
index ec99e07..62cc9f8 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_s390x.go
+++ b/vendor/golang.org/x/crypto/poly1305/sum_s390x.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build s390x,go1.11,!gccgo,!appengine
+//go:build gc && !purego
+// +build gc,!purego
package poly1305
@@ -10,33 +11,66 @@ import (
"golang.org/x/sys/cpu"
)
-// poly1305vx is an assembly implementation of Poly1305 that uses vector
+// updateVX is an assembly implementation of Poly1305 that uses vector
// instructions. It must only be called if the vector facility (vx) is
// available.
//go:noescape
-func poly1305vx(out *[16]byte, m *byte, mlen uint64, key *[32]byte)
+func updateVX(state *macState, msg []byte)
-// poly1305vmsl is an assembly implementation of Poly1305 that uses vector
-// instructions, including VMSL. It must only be called if the vector facility (vx) is
-// available and if VMSL is supported.
-//go:noescape
-func poly1305vmsl(out *[16]byte, m *byte, mlen uint64, key *[32]byte)
-
-// Sum generates an authenticator for m using a one-time key and puts the
-// 16-byte result into out. Authenticating two different messages with the same
-// key allows an attacker to forge messages at will.
-func Sum(out *[16]byte, m []byte, key *[32]byte) {
- if cpu.S390X.HasVX {
- var mPtr *byte
- if len(m) > 0 {
- mPtr = &m[0]
+// mac is a replacement for macGeneric that uses a larger buffer and redirects
+// calls that would have gone to updateGeneric to updateVX if the vector
+// facility is installed.
+//
+// A larger buffer is required for good performance because the vector
+// implementation has a higher fixed cost per call than the generic
+// implementation.
+type mac struct {
+ macState
+
+ buffer [16 * TagSize]byte // size must be a multiple of block size (16)
+ offset int
+}
+
+func (h *mac) Write(p []byte) (int, error) {
+ nn := len(p)
+ if h.offset > 0 {
+ n := copy(h.buffer[h.offset:], p)
+ if h.offset+n < len(h.buffer) {
+ h.offset += n
+ return nn, nil
+ }
+ p = p[n:]
+ h.offset = 0
+ if cpu.S390X.HasVX {
+ updateVX(&h.macState, h.buffer[:])
+ } else {
+ updateGeneric(&h.macState, h.buffer[:])
}
- if cpu.S390X.HasVXE && len(m) > 256 {
- poly1305vmsl(out, mPtr, uint64(len(m)), key)
+ }
+
+ tail := len(p) % len(h.buffer) // number of bytes to copy into buffer
+ body := len(p) - tail // number of bytes to process now
+ if body > 0 {
+ if cpu.S390X.HasVX {
+ updateVX(&h.macState, p[:body])
} else {
- poly1305vx(out, mPtr, uint64(len(m)), key)
+ updateGeneric(&h.macState, p[:body])
}
- } else {
- sumGeneric(out, m, key)
}
+ h.offset = copy(h.buffer[:], p[body:]) // copy tail bytes - can be 0
+ return nn, nil
+}
+
+func (h *mac) Sum(out *[TagSize]byte) {
+ state := h.macState
+ remainder := h.buffer[:h.offset]
+
+ // Use the generic implementation if we have 2 or fewer blocks left
+ // to sum. The vector implementation has a higher startup time.
+ if cpu.S390X.HasVX && len(remainder) > 2*TagSize {
+ updateVX(&state, remainder)
+ } else if len(remainder) > 0 {
+ updateGeneric(&state, remainder)
+ }
+ finalize(out, &state.h, &state.s)
}
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_s390x.s b/vendor/golang.org/x/crypto/poly1305/sum_s390x.s
index ca5a309..69c64f8 100644
--- a/vendor/golang.org/x/crypto/poly1305/sum_s390x.s
+++ b/vendor/golang.org/x/crypto/poly1305/sum_s390x.s
@@ -2,115 +2,188 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build s390x,go1.11,!gccgo,!appengine
+//go:build gc && !purego
+// +build gc,!purego
#include "textflag.h"
-// Implementation of Poly1305 using the vector facility (vx).
-
-// constants
-#define MOD26 V0
-#define EX0 V1
-#define EX1 V2
-#define EX2 V3
-
-// temporaries
-#define T_0 V4
-#define T_1 V5
-#define T_2 V6
-#define T_3 V7
-#define T_4 V8
-
-// key (r)
-#define R_0 V9
-#define R_1 V10
-#define R_2 V11
-#define R_3 V12
-#define R_4 V13
-#define R5_1 V14
-#define R5_2 V15
-#define R5_3 V16
-#define R5_4 V17
-#define RSAVE_0 R5
-#define RSAVE_1 R6
-#define RSAVE_2 R7
-#define RSAVE_3 R8
-#define RSAVE_4 R9
-#define R5SAVE_1 V28
-#define R5SAVE_2 V29
-#define R5SAVE_3 V30
-#define R5SAVE_4 V31
-
-// message block
-#define F_0 V18
-#define F_1 V19
-#define F_2 V20
-#define F_3 V21
-#define F_4 V22
-
-// accumulator
-#define H_0 V23
-#define H_1 V24
-#define H_2 V25
-#define H_3 V26
-#define H_4 V27
-
-GLOBL ·keyMask<>(SB), RODATA, $16
-DATA ·keyMask<>+0(SB)/8, $0xffffff0ffcffff0f
-DATA ·keyMask<>+8(SB)/8, $0xfcffff0ffcffff0f
-
-GLOBL ·bswapMask<>(SB), RODATA, $16
-DATA ·bswapMask<>+0(SB)/8, $0x0f0e0d0c0b0a0908
-DATA ·bswapMask<>+8(SB)/8, $0x0706050403020100
-
-GLOBL ·constants<>(SB), RODATA, $64
-// MOD26
-DATA ·constants<>+0(SB)/8, $0x3ffffff
-DATA ·constants<>+8(SB)/8, $0x3ffffff
+// This implementation of Poly1305 uses the vector facility (vx)
+// to process up to 2 blocks (32 bytes) per iteration using an
+// algorithm based on the one described in:
+//
+// NEON crypto, Daniel J. Bernstein & Peter Schwabe
+// https://cryptojedi.org/papers/neoncrypto-20120320.pdf
+//
+// This algorithm uses 5 26-bit limbs to represent a 130-bit
+// value. These limbs are, for the most part, zero extended and
+// placed into 64-bit vector register elements. Each vector
+// register is 128-bits wide and so holds 2 of these elements.
+// Using 26-bit limbs allows us plenty of headroom to accomodate
+// accumulations before and after multiplication without
+// overflowing either 32-bits (before multiplication) or 64-bits
+// (after multiplication).
+//
+// In order to parallelise the operations required to calculate
+// the sum we use two separate accumulators and then sum those
+// in an extra final step. For compatibility with the generic
+// implementation we perform this summation at the end of every
+// updateVX call.
+//
+// To use two accumulators we must multiply the message blocks
+// by r² rather than r. Only the final message block should be
+// multiplied by r.
+//
+// Example:
+//
+// We want to calculate the sum (h) for a 64 byte message (m):
+//
+// h = m[0:16]r⁴ + m[16:32]r³ + m[32:48]r² + m[48:64]r
+//
+// To do this we split the calculation into the even indices
+// and odd indices of the message. These form our SIMD 'lanes':
+//
+// h = m[ 0:16]r⁴ + m[32:48]r² + <- lane 0
+// m[16:32]r³ + m[48:64]r <- lane 1
+//
+// To calculate this iteratively we refactor so that both lanes
+// are written in terms of r² and r:
+//
+// h = (m[ 0:16]r² + m[32:48])r² + <- lane 0
+// (m[16:32]r² + m[48:64])r <- lane 1
+// ^ ^
+// | coefficients for second iteration
+// coefficients for first iteration
+//
+// So in this case we would have two iterations. In the first
+// both lanes are multiplied by r². In the second only the
+// first lane is multiplied by r² and the second lane is
+// instead multiplied by r. This gives use the odd and even
+// powers of r that we need from the original equation.
+//
+// Notation:
+//
+// h - accumulator
+// r - key
+// m - message
+//
+// [a, b] - SIMD register holding two 64-bit values
+// [a, b, c, d] - SIMD register holding four 32-bit values
+// xᵢ[n] - limb n of variable x with bit width i
+//
+// Limbs are expressed in little endian order, so for 26-bit
+// limbs x₂₆[4] will be the most significant limb and x₂₆[0]
+// will be the least significant limb.
+
+// masking constants
+#define MOD24 V0 // [0x0000000000ffffff, 0x0000000000ffffff] - mask low 24-bits
+#define MOD26 V1 // [0x0000000003ffffff, 0x0000000003ffffff] - mask low 26-bits
+
+// expansion constants (see EXPAND macro)
+#define EX0 V2
+#define EX1 V3
+#define EX2 V4
+
+// key (r², r or 1 depending on context)
+#define R_0 V5
+#define R_1 V6
+#define R_2 V7
+#define R_3 V8
+#define R_4 V9
+
+// precalculated coefficients (5r², 5r or 0 depending on context)
+#define R5_1 V10
+#define R5_2 V11
+#define R5_3 V12
+#define R5_4 V13
+
+// message block (m)
+#define M_0 V14
+#define M_1 V15
+#define M_2 V16
+#define M_3 V17
+#define M_4 V18
+
+// accumulator (h)
+#define H_0 V19
+#define H_1 V20
+#define H_2 V21
+#define H_3 V22
+#define H_4 V23
+
+// temporary registers (for short-lived values)
+#define T_0 V24
+#define T_1 V25
+#define T_2 V26
+#define T_3 V27
+#define T_4 V28
+
+GLOBL ·constants<>(SB), RODATA, $0x30
// EX0
-DATA ·constants<>+16(SB)/8, $0x0006050403020100
-DATA ·constants<>+24(SB)/8, $0x1016151413121110
+DATA ·constants<>+0x00(SB)/8, $0x0006050403020100
+DATA ·constants<>+0x08(SB)/8, $0x1016151413121110
// EX1
-DATA ·constants<>+32(SB)/8, $0x060c0b0a09080706
-DATA ·constants<>+40(SB)/8, $0x161c1b1a19181716
+DATA ·constants<>+0x10(SB)/8, $0x060c0b0a09080706
+DATA ·constants<>+0x18(SB)/8, $0x161c1b1a19181716
// EX2
-DATA ·constants<>+48(SB)/8, $0x0d0d0d0d0d0f0e0d
-DATA ·constants<>+56(SB)/8, $0x1d1d1d1d1d1f1e1d
-
-// h = (f*g) % (2**130-5) [partial reduction]
+DATA ·constants<>+0x20(SB)/8, $0x0d0d0d0d0d0f0e0d
+DATA ·constants<>+0x28(SB)/8, $0x1d1d1d1d1d1f1e1d
+
+// MULTIPLY multiplies each lane of f and g, partially reduced
+// modulo 2¹³⁰ - 5. The result, h, consists of partial products
+// in each lane that need to be reduced further to produce the
+// final result.
+//
+// h₁₃₀ = (f₁₃₀g₁₃₀) % 2¹³⁰ + (5f₁₃₀g₁₃₀) / 2¹³⁰
+//
+// Note that the multiplication by 5 of the high bits is
+// achieved by precalculating the multiplication of four of the
+// g coefficients by 5. These are g51-g54.
#define MULTIPLY(f0, f1, f2, f3, f4, g0, g1, g2, g3, g4, g51, g52, g53, g54, h0, h1, h2, h3, h4) \
VMLOF f0, g0, h0 \
- VMLOF f0, g1, h1 \
- VMLOF f0, g2, h2 \
VMLOF f0, g3, h3 \
+ VMLOF f0, g1, h1 \
VMLOF f0, g4, h4 \
+ VMLOF f0, g2, h2 \
VMLOF f1, g54, T_0 \
- VMLOF f1, g0, T_1 \
- VMLOF f1, g1, T_2 \
VMLOF f1, g2, T_3 \
+ VMLOF f1, g0, T_1 \
VMLOF f1, g3, T_4 \
+ VMLOF f1, g1, T_2 \
VMALOF f2, g53, h0, h0 \
- VMALOF f2, g54, h1, h1 \
- VMALOF f2, g0, h2, h2 \
VMALOF f2, g1, h3, h3 \
+ VMALOF f2, g54, h1, h1 \
VMALOF f2, g2, h4, h4 \
+ VMALOF f2, g0, h2, h2 \
VMALOF f3, g52, T_0, T_0 \
- VMALOF f3, g53, T_1, T_1 \
- VMALOF f3, g54, T_2, T_2 \
VMALOF f3, g0, T_3, T_3 \
+ VMALOF f3, g53, T_1, T_1 \
VMALOF f3, g1, T_4, T_4 \
+ VMALOF f3, g54, T_2, T_2 \
VMALOF f4, g51, h0, h0 \
- VMALOF f4, g52, h1, h1 \
- VMALOF f4, g53, h2, h2 \
VMALOF f4, g54, h3, h3 \
+ VMALOF f4, g52, h1, h1 \
VMALOF f4, g0, h4, h4 \
+ VMALOF f4, g53, h2, h2 \
VAG T_0, h0, h0 \
- VAG T_1, h1, h1 \
- VAG T_2, h2, h2 \
VAG T_3, h3, h3 \
- VAG T_4, h4, h4
-
-// carry h0->h1 h3->h4, h1->h2 h4->h0, h0->h1 h2->h3, h3->h4
+ VAG T_1, h1, h1 \
+ VAG T_4, h4, h4 \
+ VAG T_2, h2, h2
+
+// REDUCE performs the following carry operations in four
+// stages, as specified in Bernstein & Schwabe:
+//
+// 1: h₂₆[0]->h₂₆[1] h₂₆[3]->h₂₆[4]
+// 2: h₂₆[1]->h₂₆[2] h₂₆[4]->h₂₆[0]
+// 3: h₂₆[0]->h₂₆[1] h₂₆[2]->h₂₆[3]
+// 4: h₂₆[3]->h₂₆[4]
+//
+// The result is that all of the limbs are limited to 26-bits
+// except for h₂₆[1] and h₂₆[4] which are limited to 27-bits.
+//
+// Note that although each limb is aligned at 26-bit intervals
+// they may contain values that exceed 2²⁶ - 1, hence the need
+// to carry the excess bits in each limb.
#define REDUCE(h0, h1, h2, h3, h4) \
VESRLG $26, h0, T_0 \
VESRLG $26, h3, T_1 \
@@ -136,144 +209,155 @@ DATA ·constants<>+56(SB)/8, $0x1d1d1d1d1d1f1e1d
VN MOD26, h3, h3 \
VAG T_2, h4, h4
-// expand in0 into d[0] and in1 into d[1]
+// EXPAND splits the 128-bit little-endian values in0 and in1
+// into 26-bit big-endian limbs and places the results into
+// the first and second lane of d₂₆[0:4] respectively.
+//
+// The EX0, EX1 and EX2 constants are arrays of byte indices
+// for permutation. The permutation both reverses the bytes
+// in the input and ensures the bytes are copied into the
+// destination limb ready to be shifted into their final
+// position.
#define EXPAND(in0, in1, d0, d1, d2, d3, d4) \
- VGBM $0x0707, d1 \ // d1=tmp
- VPERM in0, in1, EX2, d4 \
VPERM in0, in1, EX0, d0 \
VPERM in0, in1, EX1, d2 \
- VN d1, d4, d4 \
+ VPERM in0, in1, EX2, d4 \
VESRLG $26, d0, d1 \
VESRLG $30, d2, d3 \
VESRLG $4, d2, d2 \
- VN MOD26, d0, d0 \
- VN MOD26, d1, d1 \
- VN MOD26, d2, d2 \
- VN MOD26, d3, d3
-
-// pack h4:h0 into h1:h0 (no carry)
-#define PACK(h0, h1, h2, h3, h4) \
- VESLG $26, h1, h1 \
- VESLG $26, h3, h3 \
- VO h0, h1, h0 \
- VO h2, h3, h2 \
- VESLG $4, h2, h2 \
- VLEIB $7, $48, h1 \
- VSLB h1, h2, h2 \
- VO h0, h2, h0 \
- VLEIB $7, $104, h1 \
- VSLB h1, h4, h3 \
- VO h3, h0, h0 \
- VLEIB $7, $24, h1 \
- VSRLB h1, h4, h1
-
-// if h > 2**130-5 then h -= 2**130-5
-#define MOD(h0, h1, t0, t1, t2) \
- VZERO t0 \
- VLEIG $1, $5, t0 \
- VACCQ h0, t0, t1 \
- VAQ h0, t0, t0 \
- VONE t2 \
- VLEIG $1, $-4, t2 \
- VAQ t2, t1, t1 \
- VACCQ h1, t1, t1 \
- VONE t2 \
- VAQ t2, t1, t1 \
- VN h0, t1, t2 \
- VNC t0, t1, t1 \
- VO t1, t2, h0
-
-// func poly1305vx(out *[16]byte, m *byte, mlen uint64, key *[32]key)
-TEXT ·poly1305vx(SB), $0-32
- // This code processes up to 2 blocks (32 bytes) per iteration
- // using the algorithm described in:
- // NEON crypto, Daniel J. Bernstein & Peter Schwabe
- // https://cryptojedi.org/papers/neoncrypto-20120320.pdf
- LMG out+0(FP), R1, R4 // R1=out, R2=m, R3=mlen, R4=key
-
- // load MOD26, EX0, EX1 and EX2
+ VN MOD26, d0, d0 \ // [in0₂₆[0], in1₂₆[0]]
+ VN MOD26, d3, d3 \ // [in0₂₆[3], in1₂₆[3]]
+ VN MOD26, d1, d1 \ // [in0₂₆[1], in1₂₆[1]]
+ VN MOD24, d4, d4 \ // [in0₂₆[4], in1₂₆[4]]
+ VN MOD26, d2, d2 // [in0₂₆[2], in1₂₆[2]]
+
+// func updateVX(state *macState, msg []byte)
+TEXT ·updateVX(SB), NOSPLIT, $0
+ MOVD state+0(FP), R1
+ LMG msg+8(FP), R2, R3 // R2=msg_base, R3=msg_len
+
+ // load EX0, EX1 and EX2
MOVD $·constants<>(SB), R5
- VLM (R5), MOD26, EX2
-
- // setup r
- VL (R4), T_0
- MOVD $·keyMask<>(SB), R6
- VL (R6), T_1
- VN T_0, T_1, T_0
- EXPAND(T_0, T_0, R_0, R_1, R_2, R_3, R_4)
-
- // setup r*5
- VLEIG $0, $5, T_0
- VLEIG $1, $5, T_0
-
- // store r (for final block)
- VMLOF T_0, R_1, R5SAVE_1
- VMLOF T_0, R_2, R5SAVE_2
- VMLOF T_0, R_3, R5SAVE_3
- VMLOF T_0, R_4, R5SAVE_4
- VLGVG $0, R_0, RSAVE_0
- VLGVG $0, R_1, RSAVE_1
- VLGVG $0, R_2, RSAVE_2
- VLGVG $0, R_3, RSAVE_3
- VLGVG $0, R_4, RSAVE_4
-
- // skip r**2 calculation
+ VLM (R5), EX0, EX2
+
+ // generate masks
+ VGMG $(64-24), $63, MOD24 // [0x00ffffff, 0x00ffffff]
+ VGMG $(64-26), $63, MOD26 // [0x03ffffff, 0x03ffffff]
+
+ // load h (accumulator) and r (key) from state
+ VZERO T_1 // [0, 0]
+ VL 0(R1), T_0 // [h₆₄[0], h₆₄[1]]
+ VLEG $0, 16(R1), T_1 // [h₆₄[2], 0]
+ VL 24(R1), T_2 // [r₆₄[0], r₆₄[1]]
+ VPDI $0, T_0, T_2, T_3 // [h₆₄[0], r₆₄[0]]
+ VPDI $5, T_0, T_2, T_4 // [h₆₄[1], r₆₄[1]]
+
+ // unpack h and r into 26-bit limbs
+ // note: h₆₄[2] may have the low 3 bits set, so h₂₆[4] is a 27-bit value
+ VN MOD26, T_3, H_0 // [h₂₆[0], r₂₆[0]]
+ VZERO H_1 // [0, 0]
+ VZERO H_3 // [0, 0]
+ VGMG $(64-12-14), $(63-12), T_0 // [0x03fff000, 0x03fff000] - 26-bit mask with low 12 bits masked out
+ VESLG $24, T_1, T_1 // [h₆₄[2]<<24, 0]
+ VERIMG $-26&63, T_3, MOD26, H_1 // [h₂₆[1], r₂₆[1]]
+ VESRLG $+52&63, T_3, H_2 // [h₂₆[2], r₂₆[2]] - low 12 bits only
+ VERIMG $-14&63, T_4, MOD26, H_3 // [h₂₆[1], r₂₆[1]]
+ VESRLG $40, T_4, H_4 // [h₂₆[4], r₂₆[4]] - low 24 bits only
+ VERIMG $+12&63, T_4, T_0, H_2 // [h₂₆[2], r₂₆[2]] - complete
+ VO T_1, H_4, H_4 // [h₂₆[4], r₂₆[4]] - complete
+
+ // replicate r across all 4 vector elements
+ VREPF $3, H_0, R_0 // [r₂₆[0], r₂₆[0], r₂₆[0], r₂₆[0]]
+ VREPF $3, H_1, R_1 // [r₂₆[1], r₂₆[1], r₂₆[1], r₂₆[1]]
+ VREPF $3, H_2, R_2 // [r₂₆[2], r₂₆[2], r₂₆[2], r₂₆[2]]
+ VREPF $3, H_3, R_3 // [r₂₆[3], r₂₆[3], r₂₆[3], r₂₆[3]]
+ VREPF $3, H_4, R_4 // [r₂₆[4], r₂₆[4], r₂₆[4], r₂₆[4]]
+
+ // zero out lane 1 of h
+ VLEIG $1, $0, H_0 // [h₂₆[0], 0]
+ VLEIG $1, $0, H_1 // [h₂₆[1], 0]
+ VLEIG $1, $0, H_2 // [h₂₆[2], 0]
+ VLEIG $1, $0, H_3 // [h₂₆[3], 0]
+ VLEIG $1, $0, H_4 // [h₂₆[4], 0]
+
+ // calculate 5r (ignore least significant limb)
+ VREPIF $5, T_0
+ VMLF T_0, R_1, R5_1 // [5r₂₆[1], 5r₂₆[1], 5r₂₆[1], 5r₂₆[1]]
+ VMLF T_0, R_2, R5_2 // [5r₂₆[2], 5r₂₆[2], 5r₂₆[2], 5r₂₆[2]]
+ VMLF T_0, R_3, R5_3 // [5r₂₆[3], 5r₂₆[3], 5r₂₆[3], 5r₂₆[3]]
+ VMLF T_0, R_4, R5_4 // [5r₂₆[4], 5r₂₆[4], 5r₂₆[4], 5r₂₆[4]]
+
+ // skip r² calculation if we are only calculating one block
CMPBLE R3, $16, skip
- // calculate r**2
- MULTIPLY(R_0, R_1, R_2, R_3, R_4, R_0, R_1, R_2, R_3, R_4, R5SAVE_1, R5SAVE_2, R5SAVE_3, R5SAVE_4, H_0, H_1, H_2, H_3, H_4)
- REDUCE(H_0, H_1, H_2, H_3, H_4)
- VLEIG $0, $5, T_0
- VLEIG $1, $5, T_0
- VMLOF T_0, H_1, R5_1
- VMLOF T_0, H_2, R5_2
- VMLOF T_0, H_3, R5_3
- VMLOF T_0, H_4, R5_4
- VLR H_0, R_0
- VLR H_1, R_1
- VLR H_2, R_2
- VLR H_3, R_3
- VLR H_4, R_4
-
- // initialize h
- VZERO H_0
- VZERO H_1
- VZERO H_2
- VZERO H_3
- VZERO H_4
+ // calculate r²
+ MULTIPLY(R_0, R_1, R_2, R_3, R_4, R_0, R_1, R_2, R_3, R_4, R5_1, R5_2, R5_3, R5_4, M_0, M_1, M_2, M_3, M_4)
+ REDUCE(M_0, M_1, M_2, M_3, M_4)
+ VGBM $0x0f0f, T_0
+ VERIMG $0, M_0, T_0, R_0 // [r₂₆[0], r²₂₆[0], r₂₆[0], r²₂₆[0]]
+ VERIMG $0, M_1, T_0, R_1 // [r₂₆[1], r²₂₆[1], r₂₆[1], r²₂₆[1]]
+ VERIMG $0, M_2, T_0, R_2 // [r₂₆[2], r²₂₆[2], r₂₆[2], r²₂₆[2]]
+ VERIMG $0, M_3, T_0, R_3 // [r₂₆[3], r²₂₆[3], r₂₆[3], r²₂₆[3]]
+ VERIMG $0, M_4, T_0, R_4 // [r₂₆[4], r²₂₆[4], r₂₆[4], r²₂₆[4]]
+
+ // calculate 5r² (ignore least significant limb)
+ VREPIF $5, T_0
+ VMLF T_0, R_1, R5_1 // [5r₂₆[1], 5r²₂₆[1], 5r₂₆[1], 5r²₂₆[1]]
+ VMLF T_0, R_2, R5_2 // [5r₂₆[2], 5r²₂₆[2], 5r₂₆[2], 5r²₂₆[2]]
+ VMLF T_0, R_3, R5_3 // [5r₂₆[3], 5r²₂₆[3], 5r₂₆[3], 5r²₂₆[3]]
+ VMLF T_0, R_4, R5_4 // [5r₂₆[4], 5r²₂₆[4], 5r₂₆[4], 5r²₂₆[4]]
loop:
- CMPBLE R3, $32, b2
- VLM (R2), T_0, T_1
- SUB $32, R3
- MOVD $32(R2), R2
- EXPAND(T_0, T_1, F_0, F_1, F_2, F_3, F_4)
- VLEIB $4, $1, F_4
- VLEIB $12, $1, F_4
+ CMPBLE R3, $32, b2 // 2 or fewer blocks remaining, need to change key coefficients
+
+ // load next 2 blocks from message
+ VLM (R2), T_0, T_1
+
+ // update message slice
+ SUB $32, R3
+ MOVD $32(R2), R2
+
+ // unpack message blocks into 26-bit big-endian limbs
+ EXPAND(T_0, T_1, M_0, M_1, M_2, M_3, M_4)
+
+ // add 2¹²⁸ to each message block value
+ VLEIB $4, $1, M_4
+ VLEIB $12, $1, M_4
multiply:
- VAG H_0, F_0, F_0
- VAG H_1, F_1, F_1
- VAG H_2, F_2, F_2
- VAG H_3, F_3, F_3
- VAG H_4, F_4, F_4
- MULTIPLY(F_0, F_1, F_2, F_3, F_4, R_0, R_1, R_2, R_3, R_4, R5_1, R5_2, R5_3, R5_4, H_0, H_1, H_2, H_3, H_4)
+ // accumulate the incoming message
+ VAG H_0, M_0, M_0
+ VAG H_3, M_3, M_3
+ VAG H_1, M_1, M_1
+ VAG H_4, M_4, M_4
+ VAG H_2, M_2, M_2
+
+ // multiply the accumulator by the key coefficient
+ MULTIPLY(M_0, M_1, M_2, M_3, M_4, R_0, R_1, R_2, R_3, R_4, R5_1, R5_2, R5_3, R5_4, H_0, H_1, H_2, H_3, H_4)
+
+ // carry and partially reduce the partial products
REDUCE(H_0, H_1, H_2, H_3, H_4)
+
CMPBNE R3, $0, loop
finish:
- // sum vectors
+ // sum lane 0 and lane 1 and put the result in lane 1
VZERO T_0
VSUMQG H_0, T_0, H_0
- VSUMQG H_1, T_0, H_1
- VSUMQG H_2, T_0, H_2
VSUMQG H_3, T_0, H_3
+ VSUMQG H_1, T_0, H_1
VSUMQG H_4, T_0, H_4
+ VSUMQG H_2, T_0, H_2
- // h may be >= 2*(2**130-5) so we need to reduce it again
+ // reduce again after summation
+ // TODO(mundaym): there might be a more efficient way to do this
+ // now that we only have 1 active lane. For example, we could
+ // simultaneously pack the values as we reduce them.
REDUCE(H_0, H_1, H_2, H_3, H_4)
- // carry h1->h4
+ // carry h[1] through to h[4] so that only h[4] can exceed 2²⁶ - 1
+ // TODO(mundaym): in testing this final carry was unnecessary.
+ // Needs a proof before it can be removed though.
VESRLG $26, H_1, T_1
VN MOD26, H_1, H_1
VAQ T_1, H_2, H_2
@@ -284,95 +368,137 @@ finish:
VN MOD26, H_3, H_3
VAQ T_3, H_4, H_4
- // h is now < 2*(2**130-5)
- // pack h into h1 (hi) and h0 (lo)
- PACK(H_0, H_1, H_2, H_3, H_4)
-
- // if h > 2**130-5 then h -= 2**130-5
- MOD(H_0, H_1, T_0, T_1, T_2)
-
- // h += s
- MOVD $·bswapMask<>(SB), R5
- VL (R5), T_1
- VL 16(R4), T_0
- VPERM T_0, T_0, T_1, T_0 // reverse bytes (to big)
- VAQ T_0, H_0, H_0
- VPERM H_0, H_0, T_1, H_0 // reverse bytes (to little)
- VST H_0, (R1)
-
+ // h is now < 2(2¹³⁰ - 5)
+ // Pack each lane in h₂₆[0:4] into h₁₂₈[0:1].
+ VESLG $26, H_1, H_1
+ VESLG $26, H_3, H_3
+ VO H_0, H_1, H_0
+ VO H_2, H_3, H_2
+ VESLG $4, H_2, H_2
+ VLEIB $7, $48, H_1
+ VSLB H_1, H_2, H_2
+ VO H_0, H_2, H_0
+ VLEIB $7, $104, H_1
+ VSLB H_1, H_4, H_3
+ VO H_3, H_0, H_0
+ VLEIB $7, $24, H_1
+ VSRLB H_1, H_4, H_1
+
+ // update state
+ VSTEG $1, H_0, 0(R1)
+ VSTEG $0, H_0, 8(R1)
+ VSTEG $1, H_1, 16(R1)
RET
-b2:
+b2: // 2 or fewer blocks remaining
CMPBLE R3, $16, b1
- // 2 blocks remaining
- SUB $17, R3
- VL (R2), T_0
- VLL R3, 16(R2), T_1
- ADD $1, R3
+ // Load the 2 remaining blocks (17-32 bytes remaining).
+ MOVD $-17(R3), R0 // index of final byte to load modulo 16
+ VL (R2), T_0 // load full 16 byte block
+ VLL R0, 16(R2), T_1 // load final (possibly partial) block and pad with zeros to 16 bytes
+
+ // The Poly1305 algorithm requires that a 1 bit be appended to
+ // each message block. If the final block is less than 16 bytes
+ // long then it is easiest to insert the 1 before the message
+ // block is split into 26-bit limbs. If, on the other hand, the
+ // final message block is 16 bytes long then we append the 1 bit
+ // after expansion as normal.
MOVBZ $1, R0
- CMPBEQ R3, $16, 2(PC)
- VLVGB R3, R0, T_1
- EXPAND(T_0, T_1, F_0, F_1, F_2, F_3, F_4)
+ MOVD $-16(R3), R3 // index of byte in last block to insert 1 at (could be 16)
+ CMPBEQ R3, $16, 2(PC) // skip the insertion if the final block is 16 bytes long
+ VLVGB R3, R0, T_1 // insert 1 into the byte at index R3
+
+ // Split both blocks into 26-bit limbs in the appropriate lanes.
+ EXPAND(T_0, T_1, M_0, M_1, M_2, M_3, M_4)
+
+ // Append a 1 byte to the end of the second to last block.
+ VLEIB $4, $1, M_4
+
+ // Append a 1 byte to the end of the last block only if it is a
+ // full 16 byte block.
CMPBNE R3, $16, 2(PC)
- VLEIB $12, $1, F_4
- VLEIB $4, $1, F_4
-
- // setup [r²,r]
- VLVGG $1, RSAVE_0, R_0
- VLVGG $1, RSAVE_1, R_1
- VLVGG $1, RSAVE_2, R_2
- VLVGG $1, RSAVE_3, R_3
- VLVGG $1, RSAVE_4, R_4
- VPDI $0, R5_1, R5SAVE_1, R5_1
- VPDI $0, R5_2, R5SAVE_2, R5_2
- VPDI $0, R5_3, R5SAVE_3, R5_3
- VPDI $0, R5_4, R5SAVE_4, R5_4
+ VLEIB $12, $1, M_4
+
+ // Finally, set up the coefficients for the final multiplication.
+ // We have previously saved r and 5r in the 32-bit even indexes
+ // of the R_[0-4] and R5_[1-4] coefficient registers.
+ //
+ // We want lane 0 to be multiplied by r² so that can be kept the
+ // same. We want lane 1 to be multiplied by r so we need to move
+ // the saved r value into the 32-bit odd index in lane 1 by
+ // rotating the 64-bit lane by 32.
+ VGBM $0x00ff, T_0 // [0, 0xffffffffffffffff] - mask lane 1 only
+ VERIMG $32, R_0, T_0, R_0 // [_, r²₂₆[0], _, r₂₆[0]]
+ VERIMG $32, R_1, T_0, R_1 // [_, r²₂₆[1], _, r₂₆[1]]
+ VERIMG $32, R_2, T_0, R_2 // [_, r²₂₆[2], _, r₂₆[2]]
+ VERIMG $32, R_3, T_0, R_3 // [_, r²₂₆[3], _, r₂₆[3]]
+ VERIMG $32, R_4, T_0, R_4 // [_, r²₂₆[4], _, r₂₆[4]]
+ VERIMG $32, R5_1, T_0, R5_1 // [_, 5r²₂₆[1], _, 5r₂₆[1]]
+ VERIMG $32, R5_2, T_0, R5_2 // [_, 5r²₂₆[2], _, 5r₂₆[2]]
+ VERIMG $32, R5_3, T_0, R5_3 // [_, 5r²₂₆[3], _, 5r₂₆[3]]
+ VERIMG $32, R5_4, T_0, R5_4 // [_, 5r²₂₆[4], _, 5r₂₆[4]]
MOVD $0, R3
BR multiply
skip:
- VZERO H_0
- VZERO H_1
- VZERO H_2
- VZERO H_3
- VZERO H_4
-
CMPBEQ R3, $0, finish
-b1:
- // 1 block remaining
- SUB $1, R3
- VLL R3, (R2), T_0
- ADD $1, R3
+b1: // 1 block remaining
+
+ // Load the final block (1-16 bytes). This will be placed into
+ // lane 0.
+ MOVD $-1(R3), R0
+ VLL R0, (R2), T_0 // pad to 16 bytes with zeros
+
+ // The Poly1305 algorithm requires that a 1 bit be appended to
+ // each message block. If the final block is less than 16 bytes
+ // long then it is easiest to insert the 1 before the message
+ // block is split into 26-bit limbs. If, on the other hand, the
+ // final message block is 16 bytes long then we append the 1 bit
+ // after expansion as normal.
MOVBZ $1, R0
CMPBEQ R3, $16, 2(PC)
VLVGB R3, R0, T_0
- VZERO T_1
- EXPAND(T_0, T_1, F_0, F_1, F_2, F_3, F_4)
+
+ // Set the message block in lane 1 to the value 0 so that it
+ // can be accumulated without affecting the final result.
+ VZERO T_1
+
+ // Split the final message block into 26-bit limbs in lane 0.
+ // Lane 1 will be contain 0.
+ EXPAND(T_0, T_1, M_0, M_1, M_2, M_3, M_4)
+
+ // Append a 1 byte to the end of the last block only if it is a
+ // full 16 byte block.
CMPBNE R3, $16, 2(PC)
- VLEIB $4, $1, F_4
- VLEIG $1, $1, R_0
- VZERO R_1
- VZERO R_2
- VZERO R_3
- VZERO R_4
- VZERO R5_1
- VZERO R5_2
- VZERO R5_3
- VZERO R5_4
-
- // setup [r, 1]
- VLVGG $0, RSAVE_0, R_0
- VLVGG $0, RSAVE_1, R_1
- VLVGG $0, RSAVE_2, R_2
- VLVGG $0, RSAVE_3, R_3
- VLVGG $0, RSAVE_4, R_4
- VPDI $0, R5SAVE_1, R5_1, R5_1
- VPDI $0, R5SAVE_2, R5_2, R5_2
- VPDI $0, R5SAVE_3, R5_3, R5_3
- VPDI $0, R5SAVE_4, R5_4, R5_4
+ VLEIB $4, $1, M_4
+
+ // We have previously saved r and 5r in the 32-bit even indexes
+ // of the R_[0-4] and R5_[1-4] coefficient registers.
+ //
+ // We want lane 0 to be multiplied by r so we need to move the
+ // saved r value into the 32-bit odd index in lane 0. We want
+ // lane 1 to be set to the value 1. This makes multiplication
+ // a no-op. We do this by setting lane 1 in every register to 0
+ // and then just setting the 32-bit index 3 in R_0 to 1.
+ VZERO T_0
+ MOVD $0, R0
+ MOVD $0x10111213, R12
+ VLVGP R12, R0, T_1 // [_, 0x10111213, _, 0x00000000]
+ VPERM T_0, R_0, T_1, R_0 // [_, r₂₆[0], _, 0]
+ VPERM T_0, R_1, T_1, R_1 // [_, r₂₆[1], _, 0]
+ VPERM T_0, R_2, T_1, R_2 // [_, r₂₆[2], _, 0]
+ VPERM T_0, R_3, T_1, R_3 // [_, r₂₆[3], _, 0]
+ VPERM T_0, R_4, T_1, R_4 // [_, r₂₆[4], _, 0]
+ VPERM T_0, R5_1, T_1, R5_1 // [_, 5r₂₆[1], _, 0]
+ VPERM T_0, R5_2, T_1, R5_2 // [_, 5r₂₆[2], _, 0]
+ VPERM T_0, R5_3, T_1, R5_3 // [_, 5r₂₆[3], _, 0]
+ VPERM T_0, R5_4, T_1, R5_4 // [_, 5r₂₆[4], _, 0]
+
+ // Set the value of lane 1 to be 1.
+ VLEIF $3, $1, R_0 // [_, r₂₆[0], _, 1]
MOVD $0, R3
BR multiply
diff --git a/vendor/golang.org/x/crypto/poly1305/sum_vmsl_s390x.s b/vendor/golang.org/x/crypto/poly1305/sum_vmsl_s390x.s
deleted file mode 100644
index e60bbc1..0000000
--- a/vendor/golang.org/x/crypto/poly1305/sum_vmsl_s390x.s
+++ /dev/null
@@ -1,909 +0,0 @@
-// Copyright 2018 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build s390x,go1.11,!gccgo,!appengine
-
-#include "textflag.h"
-
-// Implementation of Poly1305 using the vector facility (vx) and the VMSL instruction.
-
-// constants
-#define EX0 V1
-#define EX1 V2
-#define EX2 V3
-
-// temporaries
-#define T_0 V4
-#define T_1 V5
-#define T_2 V6
-#define T_3 V7
-#define T_4 V8
-#define T_5 V9
-#define T_6 V10
-#define T_7 V11
-#define T_8 V12
-#define T_9 V13
-#define T_10 V14
-
-// r**2 & r**4
-#define R_0 V15
-#define R_1 V16
-#define R_2 V17
-#define R5_1 V18
-#define R5_2 V19
-// key (r)
-#define RSAVE_0 R7
-#define RSAVE_1 R8
-#define RSAVE_2 R9
-#define R5SAVE_1 R10
-#define R5SAVE_2 R11
-
-// message block
-#define M0 V20
-#define M1 V21
-#define M2 V22
-#define M3 V23
-#define M4 V24
-#define M5 V25
-
-// accumulator
-#define H0_0 V26
-#define H1_0 V27
-#define H2_0 V28
-#define H0_1 V29
-#define H1_1 V30
-#define H2_1 V31
-
-GLOBL ·keyMask<>(SB), RODATA, $16
-DATA ·keyMask<>+0(SB)/8, $0xffffff0ffcffff0f
-DATA ·keyMask<>+8(SB)/8, $0xfcffff0ffcffff0f
-
-GLOBL ·bswapMask<>(SB), RODATA, $16
-DATA ·bswapMask<>+0(SB)/8, $0x0f0e0d0c0b0a0908
-DATA ·bswapMask<>+8(SB)/8, $0x0706050403020100
-
-GLOBL ·constants<>(SB), RODATA, $48
-// EX0
-DATA ·constants<>+0(SB)/8, $0x18191a1b1c1d1e1f
-DATA ·constants<>+8(SB)/8, $0x0000050403020100
-// EX1
-DATA ·constants<>+16(SB)/8, $0x18191a1b1c1d1e1f
-DATA ·constants<>+24(SB)/8, $0x00000a0908070605
-// EX2
-DATA ·constants<>+32(SB)/8, $0x18191a1b1c1d1e1f
-DATA ·constants<>+40(SB)/8, $0x0000000f0e0d0c0b
-
-GLOBL ·c<>(SB), RODATA, $48
-// EX0
-DATA ·c<>+0(SB)/8, $0x0000050403020100
-DATA ·c<>+8(SB)/8, $0x0000151413121110
-// EX1
-DATA ·c<>+16(SB)/8, $0x00000a0908070605
-DATA ·c<>+24(SB)/8, $0x00001a1918171615
-// EX2
-DATA ·c<>+32(SB)/8, $0x0000000f0e0d0c0b
-DATA ·c<>+40(SB)/8, $0x0000001f1e1d1c1b
-
-GLOBL ·reduce<>(SB), RODATA, $32
-// 44 bit
-DATA ·reduce<>+0(SB)/8, $0x0
-DATA ·reduce<>+8(SB)/8, $0xfffffffffff
-// 42 bit
-DATA ·reduce<>+16(SB)/8, $0x0
-DATA ·reduce<>+24(SB)/8, $0x3ffffffffff
-
-// h = (f*g) % (2**130-5) [partial reduction]
-// uses T_0...T_9 temporary registers
-// input: m02_0, m02_1, m02_2, m13_0, m13_1, m13_2, r_0, r_1, r_2, r5_1, r5_2, m4_0, m4_1, m4_2, m5_0, m5_1, m5_2
-// temp: t0, t1, t2, t3, t4, t5, t6, t7, t8, t9
-// output: m02_0, m02_1, m02_2, m13_0, m13_1, m13_2
-#define MULTIPLY(m02_0, m02_1, m02_2, m13_0, m13_1, m13_2, r_0, r_1, r_2, r5_1, r5_2, m4_0, m4_1, m4_2, m5_0, m5_1, m5_2, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) \
- \ // Eliminate the dependency for the last 2 VMSLs
- VMSLG m02_0, r_2, m4_2, m4_2 \
- VMSLG m13_0, r_2, m5_2, m5_2 \ // 8 VMSLs pipelined
- VMSLG m02_0, r_0, m4_0, m4_0 \
- VMSLG m02_1, r5_2, V0, T_0 \
- VMSLG m02_0, r_1, m4_1, m4_1 \
- VMSLG m02_1, r_0, V0, T_1 \
- VMSLG m02_1, r_1, V0, T_2 \
- VMSLG m02_2, r5_1, V0, T_3 \
- VMSLG m02_2, r5_2, V0, T_4 \
- VMSLG m13_0, r_0, m5_0, m5_0 \
- VMSLG m13_1, r5_2, V0, T_5 \
- VMSLG m13_0, r_1, m5_1, m5_1 \
- VMSLG m13_1, r_0, V0, T_6 \
- VMSLG m13_1, r_1, V0, T_7 \
- VMSLG m13_2, r5_1, V0, T_8 \
- VMSLG m13_2, r5_2, V0, T_9 \
- VMSLG m02_2, r_0, m4_2, m4_2 \
- VMSLG m13_2, r_0, m5_2, m5_2 \
- VAQ m4_0, T_0, m02_0 \
- VAQ m4_1, T_1, m02_1 \
- VAQ m5_0, T_5, m13_0 \
- VAQ m5_1, T_6, m13_1 \
- VAQ m02_0, T_3, m02_0 \
- VAQ m02_1, T_4, m02_1 \
- VAQ m13_0, T_8, m13_0 \
- VAQ m13_1, T_9, m13_1 \
- VAQ m4_2, T_2, m02_2 \
- VAQ m5_2, T_7, m13_2 \
-
-// SQUARE uses three limbs of r and r_2*5 to output square of r
-// uses T_1, T_5 and T_7 temporary registers
-// input: r_0, r_1, r_2, r5_2
-// temp: TEMP0, TEMP1, TEMP2
-// output: p0, p1, p2
-#define SQUARE(r_0, r_1, r_2, r5_2, p0, p1, p2, TEMP0, TEMP1, TEMP2) \
- VMSLG r_0, r_0, p0, p0 \
- VMSLG r_1, r5_2, V0, TEMP0 \
- VMSLG r_2, r5_2, p1, p1 \
- VMSLG r_0, r_1, V0, TEMP1 \
- VMSLG r_1, r_1, p2, p2 \
- VMSLG r_0, r_2, V0, TEMP2 \
- VAQ TEMP0, p0, p0 \
- VAQ TEMP1, p1, p1 \
- VAQ TEMP2, p2, p2 \
- VAQ TEMP0, p0, p0 \
- VAQ TEMP1, p1, p1 \
- VAQ TEMP2, p2, p2 \
-
-// carry h0->h1->h2->h0 || h3->h4->h5->h3
-// uses T_2, T_4, T_5, T_7, T_8, T_9
-// t6, t7, t8, t9, t10, t11
-// input: h0, h1, h2, h3, h4, h5
-// temp: t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11
-// output: h0, h1, h2, h3, h4, h5
-#define REDUCE(h0, h1, h2, h3, h4, h5, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11) \
- VLM (R12), t6, t7 \ // 44 and 42 bit clear mask
- VLEIB $7, $0x28, t10 \ // 5 byte shift mask
- VREPIB $4, t8 \ // 4 bit shift mask
- VREPIB $2, t11 \ // 2 bit shift mask
- VSRLB t10, h0, t0 \ // h0 byte shift
- VSRLB t10, h1, t1 \ // h1 byte shift
- VSRLB t10, h2, t2 \ // h2 byte shift
- VSRLB t10, h3, t3 \ // h3 byte shift
- VSRLB t10, h4, t4 \ // h4 byte shift
- VSRLB t10, h5, t5 \ // h5 byte shift
- VSRL t8, t0, t0 \ // h0 bit shift
- VSRL t8, t1, t1 \ // h2 bit shift
- VSRL t11, t2, t2 \ // h2 bit shift
- VSRL t8, t3, t3 \ // h3 bit shift
- VSRL t8, t4, t4 \ // h4 bit shift
- VESLG $2, t2, t9 \ // h2 carry x5
- VSRL t11, t5, t5 \ // h5 bit shift
- VN t6, h0, h0 \ // h0 clear carry
- VAQ t2, t9, t2 \ // h2 carry x5
- VESLG $2, t5, t9 \ // h5 carry x5
- VN t6, h1, h1 \ // h1 clear carry
- VN t7, h2, h2 \ // h2 clear carry
- VAQ t5, t9, t5 \ // h5 carry x5
- VN t6, h3, h3 \ // h3 clear carry
- VN t6, h4, h4 \ // h4 clear carry
- VN t7, h5, h5 \ // h5 clear carry
- VAQ t0, h1, h1 \ // h0->h1
- VAQ t3, h4, h4 \ // h3->h4
- VAQ t1, h2, h2 \ // h1->h2
- VAQ t4, h5, h5 \ // h4->h5
- VAQ t2, h0, h0 \ // h2->h0
- VAQ t5, h3, h3 \ // h5->h3
- VREPG $1, t6, t6 \ // 44 and 42 bit masks across both halves
- VREPG $1, t7, t7 \
- VSLDB $8, h0, h0, h0 \ // set up [h0/1/2, h3/4/5]
- VSLDB $8, h1, h1, h1 \
- VSLDB $8, h2, h2, h2 \
- VO h0, h3, h3 \
- VO h1, h4, h4 \
- VO h2, h5, h5 \
- VESRLG $44, h3, t0 \ // 44 bit shift right
- VESRLG $44, h4, t1 \
- VESRLG $42, h5, t2 \
- VN t6, h3, h3 \ // clear carry bits
- VN t6, h4, h4 \
- VN t7, h5, h5 \
- VESLG $2, t2, t9 \ // multiply carry by 5
- VAQ t9, t2, t2 \
- VAQ t0, h4, h4 \
- VAQ t1, h5, h5 \
- VAQ t2, h3, h3 \
-
-// carry h0->h1->h2->h0
-// input: h0, h1, h2
-// temp: t0, t1, t2, t3, t4, t5, t6, t7, t8
-// output: h0, h1, h2
-#define REDUCE2(h0, h1, h2, t0, t1, t2, t3, t4, t5, t6, t7, t8) \
- VLEIB $7, $0x28, t3 \ // 5 byte shift mask
- VREPIB $4, t4 \ // 4 bit shift mask
- VREPIB $2, t7 \ // 2 bit shift mask
- VGBM $0x003F, t5 \ // mask to clear carry bits
- VSRLB t3, h0, t0 \
- VSRLB t3, h1, t1 \
- VSRLB t3, h2, t2 \
- VESRLG $4, t5, t5 \ // 44 bit clear mask
- VSRL t4, t0, t0 \
- VSRL t4, t1, t1 \
- VSRL t7, t2, t2 \
- VESRLG $2, t5, t6 \ // 42 bit clear mask
- VESLG $2, t2, t8 \
- VAQ t8, t2, t2 \
- VN t5, h0, h0 \
- VN t5, h1, h1 \
- VN t6, h2, h2 \
- VAQ t0, h1, h1 \
- VAQ t1, h2, h2 \
- VAQ t2, h0, h0 \
- VSRLB t3, h0, t0 \
- VSRLB t3, h1, t1 \
- VSRLB t3, h2, t2 \
- VSRL t4, t0, t0 \
- VSRL t4, t1, t1 \
- VSRL t7, t2, t2 \
- VN t5, h0, h0 \
- VN t5, h1, h1 \
- VESLG $2, t2, t8 \
- VN t6, h2, h2 \
- VAQ t0, h1, h1 \
- VAQ t8, t2, t2 \
- VAQ t1, h2, h2 \
- VAQ t2, h0, h0 \
-
-// expands two message blocks into the lower halfs of the d registers
-// moves the contents of the d registers into upper halfs
-// input: in1, in2, d0, d1, d2, d3, d4, d5
-// temp: TEMP0, TEMP1, TEMP2, TEMP3
-// output: d0, d1, d2, d3, d4, d5
-#define EXPACC(in1, in2, d0, d1, d2, d3, d4, d5, TEMP0, TEMP1, TEMP2, TEMP3) \
- VGBM $0xff3f, TEMP0 \
- VGBM $0xff1f, TEMP1 \
- VESLG $4, d1, TEMP2 \
- VESLG $4, d4, TEMP3 \
- VESRLG $4, TEMP0, TEMP0 \
- VPERM in1, d0, EX0, d0 \
- VPERM in2, d3, EX0, d3 \
- VPERM in1, d2, EX2, d2 \
- VPERM in2, d5, EX2, d5 \
- VPERM in1, TEMP2, EX1, d1 \
- VPERM in2, TEMP3, EX1, d4 \
- VN TEMP0, d0, d0 \
- VN TEMP0, d3, d3 \
- VESRLG $4, d1, d1 \
- VESRLG $4, d4, d4 \
- VN TEMP1, d2, d2 \
- VN TEMP1, d5, d5 \
- VN TEMP0, d1, d1 \
- VN TEMP0, d4, d4 \
-
-// expands one message block into the lower halfs of the d registers
-// moves the contents of the d registers into upper halfs
-// input: in, d0, d1, d2
-// temp: TEMP0, TEMP1, TEMP2
-// output: d0, d1, d2
-#define EXPACC2(in, d0, d1, d2, TEMP0, TEMP1, TEMP2) \
- VGBM $0xff3f, TEMP0 \
- VESLG $4, d1, TEMP2 \
- VGBM $0xff1f, TEMP1 \
- VPERM in, d0, EX0, d0 \
- VESRLG $4, TEMP0, TEMP0 \
- VPERM in, d2, EX2, d2 \
- VPERM in, TEMP2, EX1, d1 \
- VN TEMP0, d0, d0 \
- VN TEMP1, d2, d2 \
- VESRLG $4, d1, d1 \
- VN TEMP0, d1, d1 \
-
-// pack h2:h0 into h1:h0 (no carry)
-// input: h0, h1, h2
-// output: h0, h1, h2
-#define PACK(h0, h1, h2) \
- VMRLG h1, h2, h2 \ // copy h1 to upper half h2
- VESLG $44, h1, h1 \ // shift limb 1 44 bits, leaving 20
- VO h0, h1, h0 \ // combine h0 with 20 bits from limb 1
- VESRLG $20, h2, h1 \ // put top 24 bits of limb 1 into h1
- VLEIG $1, $0, h1 \ // clear h2 stuff from lower half of h1
- VO h0, h1, h0 \ // h0 now has 88 bits (limb 0 and 1)
- VLEIG $0, $0, h2 \ // clear upper half of h2
- VESRLG $40, h2, h1 \ // h1 now has upper two bits of result
- VLEIB $7, $88, h1 \ // for byte shift (11 bytes)
- VSLB h1, h2, h2 \ // shift h2 11 bytes to the left
- VO h0, h2, h0 \ // combine h0 with 20 bits from limb 1
- VLEIG $0, $0, h1 \ // clear upper half of h1
-
-// if h > 2**130-5 then h -= 2**130-5
-// input: h0, h1
-// temp: t0, t1, t2
-// output: h0
-#define MOD(h0, h1, t0, t1, t2) \
- VZERO t0 \
- VLEIG $1, $5, t0 \
- VACCQ h0, t0, t1 \
- VAQ h0, t0, t0 \
- VONE t2 \
- VLEIG $1, $-4, t2 \
- VAQ t2, t1, t1 \
- VACCQ h1, t1, t1 \
- VONE t2 \
- VAQ t2, t1, t1 \
- VN h0, t1, t2 \
- VNC t0, t1, t1 \
- VO t1, t2, h0 \
-
-// func poly1305vmsl(out *[16]byte, m *byte, mlen uint64, key *[32]key)
-TEXT ·poly1305vmsl(SB), $0-32
- // This code processes 6 + up to 4 blocks (32 bytes) per iteration
- // using the algorithm described in:
- // NEON crypto, Daniel J. Bernstein & Peter Schwabe
- // https://cryptojedi.org/papers/neoncrypto-20120320.pdf
- // And as moddified for VMSL as described in
- // Accelerating Poly1305 Cryptographic Message Authentication on the z14
- // O'Farrell et al, CASCON 2017, p48-55
- // https://ibm.ent.box.com/s/jf9gedj0e9d2vjctfyh186shaztavnht
-
- LMG out+0(FP), R1, R4 // R1=out, R2=m, R3=mlen, R4=key
- VZERO V0 // c
-
- // load EX0, EX1 and EX2
- MOVD $·constants<>(SB), R5
- VLM (R5), EX0, EX2 // c
-
- // setup r
- VL (R4), T_0
- MOVD $·keyMask<>(SB), R6
- VL (R6), T_1
- VN T_0, T_1, T_0
- VZERO T_2 // limbs for r
- VZERO T_3
- VZERO T_4
- EXPACC2(T_0, T_2, T_3, T_4, T_1, T_5, T_7)
-
- // T_2, T_3, T_4: [0, r]
-
- // setup r*20
- VLEIG $0, $0, T_0
- VLEIG $1, $20, T_0 // T_0: [0, 20]
- VZERO T_5
- VZERO T_6
- VMSLG T_0, T_3, T_5, T_5
- VMSLG T_0, T_4, T_6, T_6
-
- // store r for final block in GR
- VLGVG $1, T_2, RSAVE_0 // c
- VLGVG $1, T_3, RSAVE_1 // c
- VLGVG $1, T_4, RSAVE_2 // c
- VLGVG $1, T_5, R5SAVE_1 // c
- VLGVG $1, T_6, R5SAVE_2 // c
-
- // initialize h
- VZERO H0_0
- VZERO H1_0
- VZERO H2_0
- VZERO H0_1
- VZERO H1_1
- VZERO H2_1
-
- // initialize pointer for reduce constants
- MOVD $·reduce<>(SB), R12
-
- // calculate r**2 and 20*(r**2)
- VZERO R_0
- VZERO R_1
- VZERO R_2
- SQUARE(T_2, T_3, T_4, T_6, R_0, R_1, R_2, T_1, T_5, T_7)
- REDUCE2(R_0, R_1, R_2, M0, M1, M2, M3, M4, R5_1, R5_2, M5, T_1)
- VZERO R5_1
- VZERO R5_2
- VMSLG T_0, R_1, R5_1, R5_1
- VMSLG T_0, R_2, R5_2, R5_2
-
- // skip r**4 calculation if 3 blocks or less
- CMPBLE R3, $48, b4
-
- // calculate r**4 and 20*(r**4)
- VZERO T_8
- VZERO T_9
- VZERO T_10
- SQUARE(R_0, R_1, R_2, R5_2, T_8, T_9, T_10, T_1, T_5, T_7)
- REDUCE2(T_8, T_9, T_10, M0, M1, M2, M3, M4, T_2, T_3, M5, T_1)
- VZERO T_2
- VZERO T_3
- VMSLG T_0, T_9, T_2, T_2
- VMSLG T_0, T_10, T_3, T_3
-
- // put r**2 to the right and r**4 to the left of R_0, R_1, R_2
- VSLDB $8, T_8, T_8, T_8
- VSLDB $8, T_9, T_9, T_9
- VSLDB $8, T_10, T_10, T_10
- VSLDB $8, T_2, T_2, T_2
- VSLDB $8, T_3, T_3, T_3
-
- VO T_8, R_0, R_0
- VO T_9, R_1, R_1
- VO T_10, R_2, R_2
- VO T_2, R5_1, R5_1
- VO T_3, R5_2, R5_2
-
- CMPBLE R3, $80, load // less than or equal to 5 blocks in message
-
- // 6(or 5+1) blocks
- SUB $81, R3
- VLM (R2), M0, M4
- VLL R3, 80(R2), M5
- ADD $1, R3
- MOVBZ $1, R0
- CMPBGE R3, $16, 2(PC)
- VLVGB R3, R0, M5
- MOVD $96(R2), R2
- EXPACC(M0, M1, H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_0, T_1, T_2, T_3)
- EXPACC(M2, M3, H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_0, T_1, T_2, T_3)
- VLEIB $2, $1, H2_0
- VLEIB $2, $1, H2_1
- VLEIB $10, $1, H2_0
- VLEIB $10, $1, H2_1
-
- VZERO M0
- VZERO M1
- VZERO M2
- VZERO M3
- VZERO T_4
- VZERO T_10
- EXPACC(M4, M5, M0, M1, M2, M3, T_4, T_10, T_0, T_1, T_2, T_3)
- VLR T_4, M4
- VLEIB $10, $1, M2
- CMPBLT R3, $16, 2(PC)
- VLEIB $10, $1, T_10
- MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, T_10, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9)
- REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M2, M3, M4, T_4, T_5, T_2, T_7, T_8, T_9)
- VMRHG V0, H0_1, H0_0
- VMRHG V0, H1_1, H1_0
- VMRHG V0, H2_1, H2_0
- VMRLG V0, H0_1, H0_1
- VMRLG V0, H1_1, H1_1
- VMRLG V0, H2_1, H2_1
-
- SUB $16, R3
- CMPBLE R3, $0, square
-
-load:
- // load EX0, EX1 and EX2
- MOVD $·c<>(SB), R5
- VLM (R5), EX0, EX2
-
-loop:
- CMPBLE R3, $64, add // b4 // last 4 or less blocks left
-
- // next 4 full blocks
- VLM (R2), M2, M5
- SUB $64, R3
- MOVD $64(R2), R2
- REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, T_0, T_1, T_3, T_4, T_5, T_2, T_7, T_8, T_9)
-
- // expacc in-lined to create [m2, m3] limbs
- VGBM $0x3f3f, T_0 // 44 bit clear mask
- VGBM $0x1f1f, T_1 // 40 bit clear mask
- VPERM M2, M3, EX0, T_3
- VESRLG $4, T_0, T_0 // 44 bit clear mask ready
- VPERM M2, M3, EX1, T_4
- VPERM M2, M3, EX2, T_5
- VN T_0, T_3, T_3
- VESRLG $4, T_4, T_4
- VN T_1, T_5, T_5
- VN T_0, T_4, T_4
- VMRHG H0_1, T_3, H0_0
- VMRHG H1_1, T_4, H1_0
- VMRHG H2_1, T_5, H2_0
- VMRLG H0_1, T_3, H0_1
- VMRLG H1_1, T_4, H1_1
- VMRLG H2_1, T_5, H2_1
- VLEIB $10, $1, H2_0
- VLEIB $10, $1, H2_1
- VPERM M4, M5, EX0, T_3
- VPERM M4, M5, EX1, T_4
- VPERM M4, M5, EX2, T_5
- VN T_0, T_3, T_3
- VESRLG $4, T_4, T_4
- VN T_1, T_5, T_5
- VN T_0, T_4, T_4
- VMRHG V0, T_3, M0
- VMRHG V0, T_4, M1
- VMRHG V0, T_5, M2
- VMRLG V0, T_3, M3
- VMRLG V0, T_4, M4
- VMRLG V0, T_5, M5
- VLEIB $10, $1, M2
- VLEIB $10, $1, M5
-
- MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9)
- CMPBNE R3, $0, loop
- REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M3, M4, M5, T_4, T_5, T_2, T_7, T_8, T_9)
- VMRHG V0, H0_1, H0_0
- VMRHG V0, H1_1, H1_0
- VMRHG V0, H2_1, H2_0
- VMRLG V0, H0_1, H0_1
- VMRLG V0, H1_1, H1_1
- VMRLG V0, H2_1, H2_1
-
- // load EX0, EX1, EX2
- MOVD $·constants<>(SB), R5
- VLM (R5), EX0, EX2
-
- // sum vectors
- VAQ H0_0, H0_1, H0_0
- VAQ H1_0, H1_1, H1_0
- VAQ H2_0, H2_1, H2_0
-
- // h may be >= 2*(2**130-5) so we need to reduce it again
- // M0...M4 are used as temps here
- REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, T_9, T_10, H0_1, M5)
-
-next: // carry h1->h2
- VLEIB $7, $0x28, T_1
- VREPIB $4, T_2
- VGBM $0x003F, T_3
- VESRLG $4, T_3
-
- // byte shift
- VSRLB T_1, H1_0, T_4
-
- // bit shift
- VSRL T_2, T_4, T_4
-
- // clear h1 carry bits
- VN T_3, H1_0, H1_0
-
- // add carry
- VAQ T_4, H2_0, H2_0
-
- // h is now < 2*(2**130-5)
- // pack h into h1 (hi) and h0 (lo)
- PACK(H0_0, H1_0, H2_0)
-
- // if h > 2**130-5 then h -= 2**130-5
- MOD(H0_0, H1_0, T_0, T_1, T_2)
-
- // h += s
- MOVD $·bswapMask<>(SB), R5
- VL (R5), T_1
- VL 16(R4), T_0
- VPERM T_0, T_0, T_1, T_0 // reverse bytes (to big)
- VAQ T_0, H0_0, H0_0
- VPERM H0_0, H0_0, T_1, H0_0 // reverse bytes (to little)
- VST H0_0, (R1)
- RET
-
-add:
- // load EX0, EX1, EX2
- MOVD $·constants<>(SB), R5
- VLM (R5), EX0, EX2
-
- REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M3, M4, M5, T_4, T_5, T_2, T_7, T_8, T_9)
- VMRHG V0, H0_1, H0_0
- VMRHG V0, H1_1, H1_0
- VMRHG V0, H2_1, H2_0
- VMRLG V0, H0_1, H0_1
- VMRLG V0, H1_1, H1_1
- VMRLG V0, H2_1, H2_1
- CMPBLE R3, $64, b4
-
-b4:
- CMPBLE R3, $48, b3 // 3 blocks or less
-
- // 4(3+1) blocks remaining
- SUB $49, R3
- VLM (R2), M0, M2
- VLL R3, 48(R2), M3
- ADD $1, R3
- MOVBZ $1, R0
- CMPBEQ R3, $16, 2(PC)
- VLVGB R3, R0, M3
- MOVD $64(R2), R2
- EXPACC(M0, M1, H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_0, T_1, T_2, T_3)
- VLEIB $10, $1, H2_0
- VLEIB $10, $1, H2_1
- VZERO M0
- VZERO M1
- VZERO M4
- VZERO M5
- VZERO T_4
- VZERO T_10
- EXPACC(M2, M3, M0, M1, M4, M5, T_4, T_10, T_0, T_1, T_2, T_3)
- VLR T_4, M2
- VLEIB $10, $1, M4
- CMPBNE R3, $16, 2(PC)
- VLEIB $10, $1, T_10
- MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M4, M5, M2, T_10, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9)
- REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M3, M4, M5, T_4, T_5, T_2, T_7, T_8, T_9)
- VMRHG V0, H0_1, H0_0
- VMRHG V0, H1_1, H1_0
- VMRHG V0, H2_1, H2_0
- VMRLG V0, H0_1, H0_1
- VMRLG V0, H1_1, H1_1
- VMRLG V0, H2_1, H2_1
- SUB $16, R3
- CMPBLE R3, $0, square // this condition must always hold true!
-
-b3:
- CMPBLE R3, $32, b2
-
- // 3 blocks remaining
-
- // setup [r²,r]
- VSLDB $8, R_0, R_0, R_0
- VSLDB $8, R_1, R_1, R_1
- VSLDB $8, R_2, R_2, R_2
- VSLDB $8, R5_1, R5_1, R5_1
- VSLDB $8, R5_2, R5_2, R5_2
-
- VLVGG $1, RSAVE_0, R_0
- VLVGG $1, RSAVE_1, R_1
- VLVGG $1, RSAVE_2, R_2
- VLVGG $1, R5SAVE_1, R5_1
- VLVGG $1, R5SAVE_2, R5_2
-
- // setup [h0, h1]
- VSLDB $8, H0_0, H0_0, H0_0
- VSLDB $8, H1_0, H1_0, H1_0
- VSLDB $8, H2_0, H2_0, H2_0
- VO H0_1, H0_0, H0_0
- VO H1_1, H1_0, H1_0
- VO H2_1, H2_0, H2_0
- VZERO H0_1
- VZERO H1_1
- VZERO H2_1
-
- VZERO M0
- VZERO M1
- VZERO M2
- VZERO M3
- VZERO M4
- VZERO M5
-
- // H*[r**2, r]
- MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9)
- REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, H0_1, H1_1, T_10, M5)
-
- SUB $33, R3
- VLM (R2), M0, M1
- VLL R3, 32(R2), M2
- ADD $1, R3
- MOVBZ $1, R0
- CMPBEQ R3, $16, 2(PC)
- VLVGB R3, R0, M2
-
- // H += m0
- VZERO T_1
- VZERO T_2
- VZERO T_3
- EXPACC2(M0, T_1, T_2, T_3, T_4, T_5, T_6)
- VLEIB $10, $1, T_3
- VAG H0_0, T_1, H0_0
- VAG H1_0, T_2, H1_0
- VAG H2_0, T_3, H2_0
-
- VZERO M0
- VZERO M3
- VZERO M4
- VZERO M5
- VZERO T_10
-
- // (H+m0)*r
- MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M3, M4, M5, V0, T_10, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9)
- REDUCE2(H0_0, H1_0, H2_0, M0, M3, M4, M5, T_10, H0_1, H1_1, H2_1, T_9)
-
- // H += m1
- VZERO V0
- VZERO T_1
- VZERO T_2
- VZERO T_3
- EXPACC2(M1, T_1, T_2, T_3, T_4, T_5, T_6)
- VLEIB $10, $1, T_3
- VAQ H0_0, T_1, H0_0
- VAQ H1_0, T_2, H1_0
- VAQ H2_0, T_3, H2_0
- REDUCE2(H0_0, H1_0, H2_0, M0, M3, M4, M5, T_9, H0_1, H1_1, H2_1, T_10)
-
- // [H, m2] * [r**2, r]
- EXPACC2(M2, H0_0, H1_0, H2_0, T_1, T_2, T_3)
- CMPBNE R3, $16, 2(PC)
- VLEIB $10, $1, H2_0
- VZERO M0
- VZERO M1
- VZERO M2
- VZERO M3
- VZERO M4
- VZERO M5
- MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9)
- REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, H0_1, H1_1, M5, T_10)
- SUB $16, R3
- CMPBLE R3, $0, next // this condition must always hold true!
-
-b2:
- CMPBLE R3, $16, b1
-
- // 2 blocks remaining
-
- // setup [r²,r]
- VSLDB $8, R_0, R_0, R_0
- VSLDB $8, R_1, R_1, R_1
- VSLDB $8, R_2, R_2, R_2
- VSLDB $8, R5_1, R5_1, R5_1
- VSLDB $8, R5_2, R5_2, R5_2
-
- VLVGG $1, RSAVE_0, R_0
- VLVGG $1, RSAVE_1, R_1
- VLVGG $1, RSAVE_2, R_2
- VLVGG $1, R5SAVE_1, R5_1
- VLVGG $1, R5SAVE_2, R5_2
-
- // setup [h0, h1]
- VSLDB $8, H0_0, H0_0, H0_0
- VSLDB $8, H1_0, H1_0, H1_0
- VSLDB $8, H2_0, H2_0, H2_0
- VO H0_1, H0_0, H0_0
- VO H1_1, H1_0, H1_0
- VO H2_1, H2_0, H2_0
- VZERO H0_1
- VZERO H1_1
- VZERO H2_1
-
- VZERO M0
- VZERO M1
- VZERO M2
- VZERO M3
- VZERO M4
- VZERO M5
-
- // H*[r**2, r]
- MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9)
- REDUCE(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, T_10, M0, M1, M2, M3, M4, T_4, T_5, T_2, T_7, T_8, T_9)
- VMRHG V0, H0_1, H0_0
- VMRHG V0, H1_1, H1_0
- VMRHG V0, H2_1, H2_0
- VMRLG V0, H0_1, H0_1
- VMRLG V0, H1_1, H1_1
- VMRLG V0, H2_1, H2_1
-
- // move h to the left and 0s at the right
- VSLDB $8, H0_0, H0_0, H0_0
- VSLDB $8, H1_0, H1_0, H1_0
- VSLDB $8, H2_0, H2_0, H2_0
-
- // get message blocks and append 1 to start
- SUB $17, R3
- VL (R2), M0
- VLL R3, 16(R2), M1
- ADD $1, R3
- MOVBZ $1, R0
- CMPBEQ R3, $16, 2(PC)
- VLVGB R3, R0, M1
- VZERO T_6
- VZERO T_7
- VZERO T_8
- EXPACC2(M0, T_6, T_7, T_8, T_1, T_2, T_3)
- EXPACC2(M1, T_6, T_7, T_8, T_1, T_2, T_3)
- VLEIB $2, $1, T_8
- CMPBNE R3, $16, 2(PC)
- VLEIB $10, $1, T_8
-
- // add [m0, m1] to h
- VAG H0_0, T_6, H0_0
- VAG H1_0, T_7, H1_0
- VAG H2_0, T_8, H2_0
-
- VZERO M2
- VZERO M3
- VZERO M4
- VZERO M5
- VZERO T_10
- VZERO M0
-
- // at this point R_0 .. R5_2 look like [r**2, r]
- MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M2, M3, M4, M5, T_10, M0, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9)
- REDUCE2(H0_0, H1_0, H2_0, M2, M3, M4, M5, T_9, H0_1, H1_1, H2_1, T_10)
- SUB $16, R3, R3
- CMPBLE R3, $0, next
-
-b1:
- CMPBLE R3, $0, next
-
- // 1 block remaining
-
- // setup [r²,r]
- VSLDB $8, R_0, R_0, R_0
- VSLDB $8, R_1, R_1, R_1
- VSLDB $8, R_2, R_2, R_2
- VSLDB $8, R5_1, R5_1, R5_1
- VSLDB $8, R5_2, R5_2, R5_2
-
- VLVGG $1, RSAVE_0, R_0
- VLVGG $1, RSAVE_1, R_1
- VLVGG $1, RSAVE_2, R_2
- VLVGG $1, R5SAVE_1, R5_1
- VLVGG $1, R5SAVE_2, R5_2
-
- // setup [h0, h1]
- VSLDB $8, H0_0, H0_0, H0_0
- VSLDB $8, H1_0, H1_0, H1_0
- VSLDB $8, H2_0, H2_0, H2_0
- VO H0_1, H0_0, H0_0
- VO H1_1, H1_0, H1_0
- VO H2_1, H2_0, H2_0
- VZERO H0_1
- VZERO H1_1
- VZERO H2_1
-
- VZERO M0
- VZERO M1
- VZERO M2
- VZERO M3
- VZERO M4
- VZERO M5
-
- // H*[r**2, r]
- MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9)
- REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, T_9, T_10, H0_1, M5)
-
- // set up [0, m0] limbs
- SUB $1, R3
- VLL R3, (R2), M0
- ADD $1, R3
- MOVBZ $1, R0
- CMPBEQ R3, $16, 2(PC)
- VLVGB R3, R0, M0
- VZERO T_1
- VZERO T_2
- VZERO T_3
- EXPACC2(M0, T_1, T_2, T_3, T_4, T_5, T_6)// limbs: [0, m]
- CMPBNE R3, $16, 2(PC)
- VLEIB $10, $1, T_3
-
- // h+m0
- VAQ H0_0, T_1, H0_0
- VAQ H1_0, T_2, H1_0
- VAQ H2_0, T_3, H2_0
-
- VZERO M0
- VZERO M1
- VZERO M2
- VZERO M3
- VZERO M4
- VZERO M5
- MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9)
- REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, T_9, T_10, H0_1, M5)
-
- BR next
-
-square:
- // setup [r²,r]
- VSLDB $8, R_0, R_0, R_0
- VSLDB $8, R_1, R_1, R_1
- VSLDB $8, R_2, R_2, R_2
- VSLDB $8, R5_1, R5_1, R5_1
- VSLDB $8, R5_2, R5_2, R5_2
-
- VLVGG $1, RSAVE_0, R_0
- VLVGG $1, RSAVE_1, R_1
- VLVGG $1, RSAVE_2, R_2
- VLVGG $1, R5SAVE_1, R5_1
- VLVGG $1, R5SAVE_2, R5_2
-
- // setup [h0, h1]
- VSLDB $8, H0_0, H0_0, H0_0
- VSLDB $8, H1_0, H1_0, H1_0
- VSLDB $8, H2_0, H2_0, H2_0
- VO H0_1, H0_0, H0_0
- VO H1_1, H1_0, H1_0
- VO H2_1, H2_0, H2_0
- VZERO H0_1
- VZERO H1_1
- VZERO H2_1
-
- VZERO M0
- VZERO M1
- VZERO M2
- VZERO M3
- VZERO M4
- VZERO M5
-
- // (h0*r**2) + (h1*r)
- MULTIPLY(H0_0, H1_0, H2_0, H0_1, H1_1, H2_1, R_0, R_1, R_2, R5_1, R5_2, M0, M1, M2, M3, M4, M5, T_0, T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8, T_9)
- REDUCE2(H0_0, H1_0, H2_0, M0, M1, M2, M3, M4, T_9, T_10, H0_1, M5)
- BR next
diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go
index 656e8df..c400dfc 100644
--- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go
+++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build amd64,!appengine,!gccgo
+//go:build amd64 && !purego && gc
+// +build amd64,!purego,gc
package salsa
diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s
index 18085d2..c089277 100644
--- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s
+++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s
@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build amd64,!appengine,!gccgo
+//go:build amd64 && !purego && gc
+// +build amd64,!purego,gc
// This code was translated into a form compatible with 6a from the public
// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html
// func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte)
-// This needs up to 64 bytes at 360(SP); hence the non-obvious frame size.
+// This needs up to 64 bytes at 360(R12); hence the non-obvious frame size.
TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
MOVQ out+0(FP),DI
MOVQ in+8(FP),SI
@@ -17,10 +18,8 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
MOVQ key+32(FP),R8
MOVQ SP,R12
- MOVQ SP,R9
- ADDQ $31, R9
- ANDQ $~31, R9
- MOVQ R9, SP
+ ADDQ $31, R12
+ ANDQ $~31, R12
MOVQ DX,R9
MOVQ CX,DX
@@ -32,116 +31,116 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
MOVL 0(R10),R8
MOVL 0(DX),AX
MOVL 16(R10),R11
- MOVL CX,0(SP)
- MOVL R8, 4 (SP)
- MOVL AX, 8 (SP)
- MOVL R11, 12 (SP)
+ MOVL CX,0(R12)
+ MOVL R8, 4 (R12)
+ MOVL AX, 8 (R12)
+ MOVL R11, 12 (R12)
MOVL 8(DX),CX
MOVL 24(R10),R8
MOVL 4(R10),AX
MOVL 4(DX),R11
- MOVL CX,16(SP)
- MOVL R8, 20 (SP)
- MOVL AX, 24 (SP)
- MOVL R11, 28 (SP)
+ MOVL CX,16(R12)
+ MOVL R8, 20 (R12)
+ MOVL AX, 24 (R12)
+ MOVL R11, 28 (R12)
MOVL 12(DX),CX
MOVL 12(R10),DX
MOVL 28(R10),R8
MOVL 8(R10),AX
- MOVL DX,32(SP)
- MOVL CX, 36 (SP)
- MOVL R8, 40 (SP)
- MOVL AX, 44 (SP)
+ MOVL DX,32(R12)
+ MOVL CX, 36 (R12)
+ MOVL R8, 40 (R12)
+ MOVL AX, 44 (R12)
MOVQ $1634760805,DX
MOVQ $857760878,CX
MOVQ $2036477234,R8
MOVQ $1797285236,AX
- MOVL DX,48(SP)
- MOVL CX, 52 (SP)
- MOVL R8, 56 (SP)
- MOVL AX, 60 (SP)
+ MOVL DX,48(R12)
+ MOVL CX, 52 (R12)
+ MOVL R8, 56 (R12)
+ MOVL AX, 60 (R12)
CMPQ R9,$256
JB BYTESBETWEEN1AND255
- MOVOA 48(SP),X0
+ MOVOA 48(R12),X0
PSHUFL $0X55,X0,X1
PSHUFL $0XAA,X0,X2
PSHUFL $0XFF,X0,X3
PSHUFL $0X00,X0,X0
- MOVOA X1,64(SP)
- MOVOA X2,80(SP)
- MOVOA X3,96(SP)
- MOVOA X0,112(SP)
- MOVOA 0(SP),X0
+ MOVOA X1,64(R12)
+ MOVOA X2,80(R12)
+ MOVOA X3,96(R12)
+ MOVOA X0,112(R12)
+ MOVOA 0(R12),X0
PSHUFL $0XAA,X0,X1
PSHUFL $0XFF,X0,X2
PSHUFL $0X00,X0,X3
PSHUFL $0X55,X0,X0
- MOVOA X1,128(SP)
- MOVOA X2,144(SP)
- MOVOA X3,160(SP)
- MOVOA X0,176(SP)
- MOVOA 16(SP),X0
+ MOVOA X1,128(R12)
+ MOVOA X2,144(R12)
+ MOVOA X3,160(R12)
+ MOVOA X0,176(R12)
+ MOVOA 16(R12),X0
PSHUFL $0XFF,X0,X1
PSHUFL $0X55,X0,X2
PSHUFL $0XAA,X0,X0
- MOVOA X1,192(SP)
- MOVOA X2,208(SP)
- MOVOA X0,224(SP)
- MOVOA 32(SP),X0
+ MOVOA X1,192(R12)
+ MOVOA X2,208(R12)
+ MOVOA X0,224(R12)
+ MOVOA 32(R12),X0
PSHUFL $0X00,X0,X1
PSHUFL $0XAA,X0,X2
PSHUFL $0XFF,X0,X0
- MOVOA X1,240(SP)
- MOVOA X2,256(SP)
- MOVOA X0,272(SP)
+ MOVOA X1,240(R12)
+ MOVOA X2,256(R12)
+ MOVOA X0,272(R12)
BYTESATLEAST256:
- MOVL 16(SP),DX
- MOVL 36 (SP),CX
- MOVL DX,288(SP)
- MOVL CX,304(SP)
+ MOVL 16(R12),DX
+ MOVL 36 (R12),CX
+ MOVL DX,288(R12)
+ MOVL CX,304(R12)
SHLQ $32,CX
ADDQ CX,DX
ADDQ $1,DX
MOVQ DX,CX
SHRQ $32,CX
- MOVL DX, 292 (SP)
- MOVL CX, 308 (SP)
+ MOVL DX, 292 (R12)
+ MOVL CX, 308 (R12)
ADDQ $1,DX
MOVQ DX,CX
SHRQ $32,CX
- MOVL DX, 296 (SP)
- MOVL CX, 312 (SP)
+ MOVL DX, 296 (R12)
+ MOVL CX, 312 (R12)
ADDQ $1,DX
MOVQ DX,CX
SHRQ $32,CX
- MOVL DX, 300 (SP)
- MOVL CX, 316 (SP)
+ MOVL DX, 300 (R12)
+ MOVL CX, 316 (R12)
ADDQ $1,DX
MOVQ DX,CX
SHRQ $32,CX
- MOVL DX,16(SP)
- MOVL CX, 36 (SP)
- MOVQ R9,352(SP)
+ MOVL DX,16(R12)
+ MOVL CX, 36 (R12)
+ MOVQ R9,352(R12)
MOVQ $20,DX
- MOVOA 64(SP),X0
- MOVOA 80(SP),X1
- MOVOA 96(SP),X2
- MOVOA 256(SP),X3
- MOVOA 272(SP),X4
- MOVOA 128(SP),X5
- MOVOA 144(SP),X6
- MOVOA 176(SP),X7
- MOVOA 192(SP),X8
- MOVOA 208(SP),X9
- MOVOA 224(SP),X10
- MOVOA 304(SP),X11
- MOVOA 112(SP),X12
- MOVOA 160(SP),X13
- MOVOA 240(SP),X14
- MOVOA 288(SP),X15
+ MOVOA 64(R12),X0
+ MOVOA 80(R12),X1
+ MOVOA 96(R12),X2
+ MOVOA 256(R12),X3
+ MOVOA 272(R12),X4
+ MOVOA 128(R12),X5
+ MOVOA 144(R12),X6
+ MOVOA 176(R12),X7
+ MOVOA 192(R12),X8
+ MOVOA 208(R12),X9
+ MOVOA 224(R12),X10
+ MOVOA 304(R12),X11
+ MOVOA 112(R12),X12
+ MOVOA 160(R12),X13
+ MOVOA 240(R12),X14
+ MOVOA 288(R12),X15
MAINLOOP1:
- MOVOA X1,320(SP)
- MOVOA X2,336(SP)
+ MOVOA X1,320(R12)
+ MOVOA X2,336(R12)
MOVOA X13,X1
PADDL X12,X1
MOVOA X1,X2
@@ -191,8 +190,8 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
PXOR X1,X12
PSRLL $14,X2
PXOR X2,X12
- MOVOA 320(SP),X1
- MOVOA X12,320(SP)
+ MOVOA 320(R12),X1
+ MOVOA X12,320(R12)
MOVOA X9,X2
PADDL X7,X2
MOVOA X2,X12
@@ -207,8 +206,8 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
PXOR X2,X3
PSRLL $25,X12
PXOR X12,X3
- MOVOA 336(SP),X2
- MOVOA X0,336(SP)
+ MOVOA 336(R12),X2
+ MOVOA X0,336(R12)
MOVOA X6,X0
PADDL X2,X0
MOVOA X0,X12
@@ -251,8 +250,8 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
PXOR X0,X1
PSRLL $14,X12
PXOR X12,X1
- MOVOA 320(SP),X0
- MOVOA X1,320(SP)
+ MOVOA 320(R12),X0
+ MOVOA X1,320(R12)
MOVOA X4,X1
PADDL X0,X1
MOVOA X1,X12
@@ -267,8 +266,8 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
PXOR X1,X2
PSRLL $14,X12
PXOR X12,X2
- MOVOA 336(SP),X12
- MOVOA X2,336(SP)
+ MOVOA 336(R12),X12
+ MOVOA X2,336(R12)
MOVOA X14,X1
PADDL X12,X1
MOVOA X1,X2
@@ -311,8 +310,8 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
PXOR X1,X0
PSRLL $14,X2
PXOR X2,X0
- MOVOA 320(SP),X1
- MOVOA X0,320(SP)
+ MOVOA 320(R12),X1
+ MOVOA X0,320(R12)
MOVOA X8,X0
PADDL X14,X0
MOVOA X0,X2
@@ -327,8 +326,8 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
PXOR X0,X6
PSRLL $25,X2
PXOR X2,X6
- MOVOA 336(SP),X2
- MOVOA X12,336(SP)
+ MOVOA 336(R12),X2
+ MOVOA X12,336(R12)
MOVOA X3,X0
PADDL X2,X0
MOVOA X0,X12
@@ -378,14 +377,14 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
PXOR X0,X2
PSRLL $14,X12
PXOR X12,X2
- MOVOA 320(SP),X12
- MOVOA 336(SP),X0
+ MOVOA 320(R12),X12
+ MOVOA 336(R12),X0
SUBQ $2,DX
JA MAINLOOP1
- PADDL 112(SP),X12
- PADDL 176(SP),X7
- PADDL 224(SP),X10
- PADDL 272(SP),X4
+ PADDL 112(R12),X12
+ PADDL 176(R12),X7
+ PADDL 224(R12),X10
+ PADDL 272(R12),X4
MOVD X12,DX
MOVD X7,CX
MOVD X10,R8
@@ -446,10 +445,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
MOVL CX,196(DI)
MOVL R8,200(DI)
MOVL R9,204(DI)
- PADDL 240(SP),X14
- PADDL 64(SP),X0
- PADDL 128(SP),X5
- PADDL 192(SP),X8
+ PADDL 240(R12),X14
+ PADDL 64(R12),X0
+ PADDL 128(R12),X5
+ PADDL 192(R12),X8
MOVD X14,DX
MOVD X0,CX
MOVD X5,R8
@@ -510,10 +509,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
MOVL CX,212(DI)
MOVL R8,216(DI)
MOVL R9,220(DI)
- PADDL 288(SP),X15
- PADDL 304(SP),X11
- PADDL 80(SP),X1
- PADDL 144(SP),X6
+ PADDL 288(R12),X15
+ PADDL 304(R12),X11
+ PADDL 80(R12),X1
+ PADDL 144(R12),X6
MOVD X15,DX
MOVD X11,CX
MOVD X1,R8
@@ -574,10 +573,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
MOVL CX,228(DI)
MOVL R8,232(DI)
MOVL R9,236(DI)
- PADDL 160(SP),X13
- PADDL 208(SP),X9
- PADDL 256(SP),X3
- PADDL 96(SP),X2
+ PADDL 160(R12),X13
+ PADDL 208(R12),X9
+ PADDL 256(R12),X3
+ PADDL 96(R12),X2
MOVD X13,DX
MOVD X9,CX
MOVD X3,R8
@@ -638,7 +637,7 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
MOVL CX,244(DI)
MOVL R8,248(DI)
MOVL R9,252(DI)
- MOVQ 352(SP),R9
+ MOVQ 352(R12),R9
SUBQ $256,R9
ADDQ $256,SI
ADDQ $256,DI
@@ -650,17 +649,17 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
CMPQ R9,$64
JAE NOCOPY
MOVQ DI,DX
- LEAQ 360(SP),DI
+ LEAQ 360(R12),DI
MOVQ R9,CX
REP; MOVSB
- LEAQ 360(SP),DI
- LEAQ 360(SP),SI
+ LEAQ 360(R12),DI
+ LEAQ 360(R12),SI
NOCOPY:
- MOVQ R9,352(SP)
- MOVOA 48(SP),X0
- MOVOA 0(SP),X1
- MOVOA 16(SP),X2
- MOVOA 32(SP),X3
+ MOVQ R9,352(R12)
+ MOVOA 48(R12),X0
+ MOVOA 0(R12),X1
+ MOVOA 16(R12),X2
+ MOVOA 32(R12),X3
MOVOA X1,X4
MOVQ $20,CX
MAINLOOP2:
@@ -791,10 +790,10 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
PSHUFL $0X39,X3,X3
PXOR X6,X0
JA MAINLOOP2
- PADDL 48(SP),X0
- PADDL 0(SP),X1
- PADDL 16(SP),X2
- PADDL 32(SP),X3
+ PADDL 48(R12),X0
+ PADDL 0(R12),X1
+ PADDL 16(R12),X2
+ PADDL 32(R12),X3
MOVD X0,CX
MOVD X1,R8
MOVD X2,R9
@@ -855,16 +854,16 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
MOVL R8,44(DI)
MOVL R9,28(DI)
MOVL AX,12(DI)
- MOVQ 352(SP),R9
- MOVL 16(SP),CX
- MOVL 36 (SP),R8
+ MOVQ 352(R12),R9
+ MOVL 16(R12),CX
+ MOVL 36 (R12),R8
ADDQ $1,CX
SHLQ $32,R8
ADDQ R8,CX
MOVQ CX,R8
SHRQ $32,R8
- MOVL CX,16(SP)
- MOVL R8, 36 (SP)
+ MOVL CX,16(R12)
+ MOVL R8, 36 (R12)
CMPQ R9,$64
JA BYTESATLEAST65
JAE BYTESATLEAST64
@@ -874,7 +873,6 @@ TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment
REP; MOVSB
BYTESATLEAST64:
DONE:
- MOVQ R12,SP
RET
BYTESATLEAST65:
SUBQ $64,R9
diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_noasm.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_noasm.go
index 8a46bd2..4392cc1 100644
--- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_noasm.go
+++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_noasm.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !amd64 appengine gccgo
+//go:build !amd64 || purego || !gc
+// +build !amd64 purego !gc
package salsa
diff --git a/vendor/golang.org/x/crypto/salsa20/salsa20.go b/vendor/golang.org/x/crypto/salsa20/salsa20.go
new file mode 100644
index 0000000..6f9bb10
--- /dev/null
+++ b/vendor/golang.org/x/crypto/salsa20/salsa20.go
@@ -0,0 +1,58 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+/*
+Package salsa20 implements the Salsa20 stream cipher as specified in https://cr.yp.to/snuffle/spec.pdf.
+
+Salsa20 differs from many other stream ciphers in that it is message orientated
+rather than byte orientated. Keystream blocks are not preserved between calls,
+therefore each side must encrypt/decrypt data with the same segmentation.
+
+Another aspect of this difference is that part of the counter is exposed as
+a nonce in each call. Encrypting two different messages with the same (key,
+nonce) pair leads to trivial plaintext recovery. This is analogous to
+encrypting two different messages with the same key with a traditional stream
+cipher.
+
+This package also implements XSalsa20: a version of Salsa20 with a 24-byte
+nonce as specified in https://cr.yp.to/snuffle/xsalsa-20081128.pdf. Simply
+passing a 24-byte slice as the nonce triggers XSalsa20.
+*/
+package salsa20 // import "golang.org/x/crypto/salsa20"
+
+// TODO(agl): implement XORKeyStream12 and XORKeyStream8 - the reduced round variants of Salsa20.
+
+import (
+ "golang.org/x/crypto/internal/subtle"
+ "golang.org/x/crypto/salsa20/salsa"
+)
+
+// XORKeyStream crypts bytes from in to out using the given key and nonce.
+// In and out must overlap entirely or not at all. Nonce must
+// be either 8 or 24 bytes long.
+func XORKeyStream(out, in []byte, nonce []byte, key *[32]byte) {
+ if len(out) < len(in) {
+ panic("salsa20: output smaller than input")
+ }
+ if subtle.InexactOverlap(out[:len(in)], in) {
+ panic("salsa20: invalid buffer overlap")
+ }
+
+ var subNonce [16]byte
+
+ if len(nonce) == 24 {
+ var subKey [32]byte
+ var hNonce [16]byte
+ copy(hNonce[:], nonce[:16])
+ salsa.HSalsa20(&subKey, &hNonce, key, &salsa.Sigma)
+ copy(subNonce[:], nonce[16:])
+ key = &subKey
+ } else if len(nonce) == 8 {
+ copy(subNonce[:], nonce[:])
+ } else {
+ panic("salsa20: nonce must be 8 or 24 bytes")
+ }
+
+ salsa.XORKeyStream(out, in, &subNonce, key)
+}
diff --git a/vendor/golang.org/x/crypto/sha3/doc.go b/vendor/golang.org/x/crypto/sha3/doc.go
new file mode 100644
index 0000000..c2fef30
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/doc.go
@@ -0,0 +1,66 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package sha3 implements the SHA-3 fixed-output-length hash functions and
+// the SHAKE variable-output-length hash functions defined by FIPS-202.
+//
+// Both types of hash function use the "sponge" construction and the Keccak
+// permutation. For a detailed specification see http://keccak.noekeon.org/
+//
+//
+// Guidance
+//
+// If you aren't sure what function you need, use SHAKE256 with at least 64
+// bytes of output. The SHAKE instances are faster than the SHA3 instances;
+// the latter have to allocate memory to conform to the hash.Hash interface.
+//
+// If you need a secret-key MAC (message authentication code), prepend the
+// secret key to the input, hash with SHAKE256 and read at least 32 bytes of
+// output.
+//
+//
+// Security strengths
+//
+// The SHA3-x (x equals 224, 256, 384, or 512) functions have a security
+// strength against preimage attacks of x bits. Since they only produce "x"
+// bits of output, their collision-resistance is only "x/2" bits.
+//
+// The SHAKE-256 and -128 functions have a generic security strength of 256 and
+// 128 bits against all attacks, provided that at least 2x bits of their output
+// is used. Requesting more than 64 or 32 bytes of output, respectively, does
+// not increase the collision-resistance of the SHAKE functions.
+//
+//
+// The sponge construction
+//
+// A sponge builds a pseudo-random function from a public pseudo-random
+// permutation, by applying the permutation to a state of "rate + capacity"
+// bytes, but hiding "capacity" of the bytes.
+//
+// A sponge starts out with a zero state. To hash an input using a sponge, up
+// to "rate" bytes of the input are XORed into the sponge's state. The sponge
+// is then "full" and the permutation is applied to "empty" it. This process is
+// repeated until all the input has been "absorbed". The input is then padded.
+// The digest is "squeezed" from the sponge in the same way, except that output
+// is copied out instead of input being XORed in.
+//
+// A sponge is parameterized by its generic security strength, which is equal
+// to half its capacity; capacity + rate is equal to the permutation's width.
+// Since the KeccakF-1600 permutation is 1600 bits (200 bytes) wide, this means
+// that the security strength of a sponge instance is equal to (1600 - bitrate) / 2.
+//
+//
+// Recommendations
+//
+// The SHAKE functions are recommended for most new uses. They can produce
+// output of arbitrary length. SHAKE256, with an output length of at least
+// 64 bytes, provides 256-bit security against all attacks. The Keccak team
+// recommends it for most applications upgrading from SHA2-512. (NIST chose a
+// much stronger, but much slower, sponge instance for SHA3-512.)
+//
+// The SHA-3 functions are "drop-in" replacements for the SHA-2 functions.
+// They produce output of the same length, with the same security strengths
+// against all attacks. This means, in particular, that SHA3-256 only has
+// 128-bit collision resistance, because its output length is 32 bytes.
+package sha3 // import "golang.org/x/crypto/sha3"
diff --git a/vendor/golang.org/x/crypto/sha3/hashes.go b/vendor/golang.org/x/crypto/sha3/hashes.go
new file mode 100644
index 0000000..0d8043f
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/hashes.go
@@ -0,0 +1,97 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package sha3
+
+// This file provides functions for creating instances of the SHA-3
+// and SHAKE hash functions, as well as utility functions for hashing
+// bytes.
+
+import (
+ "hash"
+)
+
+// New224 creates a new SHA3-224 hash.
+// Its generic security strength is 224 bits against preimage attacks,
+// and 112 bits against collision attacks.
+func New224() hash.Hash {
+ if h := new224Asm(); h != nil {
+ return h
+ }
+ return &state{rate: 144, outputLen: 28, dsbyte: 0x06}
+}
+
+// New256 creates a new SHA3-256 hash.
+// Its generic security strength is 256 bits against preimage attacks,
+// and 128 bits against collision attacks.
+func New256() hash.Hash {
+ if h := new256Asm(); h != nil {
+ return h
+ }
+ return &state{rate: 136, outputLen: 32, dsbyte: 0x06}
+}
+
+// New384 creates a new SHA3-384 hash.
+// Its generic security strength is 384 bits against preimage attacks,
+// and 192 bits against collision attacks.
+func New384() hash.Hash {
+ if h := new384Asm(); h != nil {
+ return h
+ }
+ return &state{rate: 104, outputLen: 48, dsbyte: 0x06}
+}
+
+// New512 creates a new SHA3-512 hash.
+// Its generic security strength is 512 bits against preimage attacks,
+// and 256 bits against collision attacks.
+func New512() hash.Hash {
+ if h := new512Asm(); h != nil {
+ return h
+ }
+ return &state{rate: 72, outputLen: 64, dsbyte: 0x06}
+}
+
+// NewLegacyKeccak256 creates a new Keccak-256 hash.
+//
+// Only use this function if you require compatibility with an existing cryptosystem
+// that uses non-standard padding. All other users should use New256 instead.
+func NewLegacyKeccak256() hash.Hash { return &state{rate: 136, outputLen: 32, dsbyte: 0x01} }
+
+// NewLegacyKeccak512 creates a new Keccak-512 hash.
+//
+// Only use this function if you require compatibility with an existing cryptosystem
+// that uses non-standard padding. All other users should use New512 instead.
+func NewLegacyKeccak512() hash.Hash { return &state{rate: 72, outputLen: 64, dsbyte: 0x01} }
+
+// Sum224 returns the SHA3-224 digest of the data.
+func Sum224(data []byte) (digest [28]byte) {
+ h := New224()
+ h.Write(data)
+ h.Sum(digest[:0])
+ return
+}
+
+// Sum256 returns the SHA3-256 digest of the data.
+func Sum256(data []byte) (digest [32]byte) {
+ h := New256()
+ h.Write(data)
+ h.Sum(digest[:0])
+ return
+}
+
+// Sum384 returns the SHA3-384 digest of the data.
+func Sum384(data []byte) (digest [48]byte) {
+ h := New384()
+ h.Write(data)
+ h.Sum(digest[:0])
+ return
+}
+
+// Sum512 returns the SHA3-512 digest of the data.
+func Sum512(data []byte) (digest [64]byte) {
+ h := New512()
+ h.Write(data)
+ h.Sum(digest[:0])
+ return
+}
diff --git a/vendor/golang.org/x/crypto/sha3/hashes_generic.go b/vendor/golang.org/x/crypto/sha3/hashes_generic.go
new file mode 100644
index 0000000..c74fc20
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/hashes_generic.go
@@ -0,0 +1,28 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !gc || purego || !s390x
+// +build !gc purego !s390x
+
+package sha3
+
+import (
+ "hash"
+)
+
+// new224Asm returns an assembly implementation of SHA3-224 if available,
+// otherwise it returns nil.
+func new224Asm() hash.Hash { return nil }
+
+// new256Asm returns an assembly implementation of SHA3-256 if available,
+// otherwise it returns nil.
+func new256Asm() hash.Hash { return nil }
+
+// new384Asm returns an assembly implementation of SHA3-384 if available,
+// otherwise it returns nil.
+func new384Asm() hash.Hash { return nil }
+
+// new512Asm returns an assembly implementation of SHA3-512 if available,
+// otherwise it returns nil.
+func new512Asm() hash.Hash { return nil }
diff --git a/vendor/golang.org/x/crypto/sha3/keccakf.go b/vendor/golang.org/x/crypto/sha3/keccakf.go
new file mode 100644
index 0000000..0f4ae8b
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/keccakf.go
@@ -0,0 +1,413 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !amd64 || purego || !gc
+// +build !amd64 purego !gc
+
+package sha3
+
+// rc stores the round constants for use in the ι step.
+var rc = [24]uint64{
+ 0x0000000000000001,
+ 0x0000000000008082,
+ 0x800000000000808A,
+ 0x8000000080008000,
+ 0x000000000000808B,
+ 0x0000000080000001,
+ 0x8000000080008081,
+ 0x8000000000008009,
+ 0x000000000000008A,
+ 0x0000000000000088,
+ 0x0000000080008009,
+ 0x000000008000000A,
+ 0x000000008000808B,
+ 0x800000000000008B,
+ 0x8000000000008089,
+ 0x8000000000008003,
+ 0x8000000000008002,
+ 0x8000000000000080,
+ 0x000000000000800A,
+ 0x800000008000000A,
+ 0x8000000080008081,
+ 0x8000000000008080,
+ 0x0000000080000001,
+ 0x8000000080008008,
+}
+
+// keccakF1600 applies the Keccak permutation to a 1600b-wide
+// state represented as a slice of 25 uint64s.
+func keccakF1600(a *[25]uint64) {
+ // Implementation translated from Keccak-inplace.c
+ // in the keccak reference code.
+ var t, bc0, bc1, bc2, bc3, bc4, d0, d1, d2, d3, d4 uint64
+
+ for i := 0; i < 24; i += 4 {
+ // Combines the 5 steps in each round into 2 steps.
+ // Unrolls 4 rounds per loop and spreads some steps across rounds.
+
+ // Round 1
+ bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
+ bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
+ bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
+ bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
+ bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
+ d0 = bc4 ^ (bc1<<1 | bc1>>63)
+ d1 = bc0 ^ (bc2<<1 | bc2>>63)
+ d2 = bc1 ^ (bc3<<1 | bc3>>63)
+ d3 = bc2 ^ (bc4<<1 | bc4>>63)
+ d4 = bc3 ^ (bc0<<1 | bc0>>63)
+
+ bc0 = a[0] ^ d0
+ t = a[6] ^ d1
+ bc1 = t<<44 | t>>(64-44)
+ t = a[12] ^ d2
+ bc2 = t<<43 | t>>(64-43)
+ t = a[18] ^ d3
+ bc3 = t<<21 | t>>(64-21)
+ t = a[24] ^ d4
+ bc4 = t<<14 | t>>(64-14)
+ a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i]
+ a[6] = bc1 ^ (bc3 &^ bc2)
+ a[12] = bc2 ^ (bc4 &^ bc3)
+ a[18] = bc3 ^ (bc0 &^ bc4)
+ a[24] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[10] ^ d0
+ bc2 = t<<3 | t>>(64-3)
+ t = a[16] ^ d1
+ bc3 = t<<45 | t>>(64-45)
+ t = a[22] ^ d2
+ bc4 = t<<61 | t>>(64-61)
+ t = a[3] ^ d3
+ bc0 = t<<28 | t>>(64-28)
+ t = a[9] ^ d4
+ bc1 = t<<20 | t>>(64-20)
+ a[10] = bc0 ^ (bc2 &^ bc1)
+ a[16] = bc1 ^ (bc3 &^ bc2)
+ a[22] = bc2 ^ (bc4 &^ bc3)
+ a[3] = bc3 ^ (bc0 &^ bc4)
+ a[9] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[20] ^ d0
+ bc4 = t<<18 | t>>(64-18)
+ t = a[1] ^ d1
+ bc0 = t<<1 | t>>(64-1)
+ t = a[7] ^ d2
+ bc1 = t<<6 | t>>(64-6)
+ t = a[13] ^ d3
+ bc2 = t<<25 | t>>(64-25)
+ t = a[19] ^ d4
+ bc3 = t<<8 | t>>(64-8)
+ a[20] = bc0 ^ (bc2 &^ bc1)
+ a[1] = bc1 ^ (bc3 &^ bc2)
+ a[7] = bc2 ^ (bc4 &^ bc3)
+ a[13] = bc3 ^ (bc0 &^ bc4)
+ a[19] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[5] ^ d0
+ bc1 = t<<36 | t>>(64-36)
+ t = a[11] ^ d1
+ bc2 = t<<10 | t>>(64-10)
+ t = a[17] ^ d2
+ bc3 = t<<15 | t>>(64-15)
+ t = a[23] ^ d3
+ bc4 = t<<56 | t>>(64-56)
+ t = a[4] ^ d4
+ bc0 = t<<27 | t>>(64-27)
+ a[5] = bc0 ^ (bc2 &^ bc1)
+ a[11] = bc1 ^ (bc3 &^ bc2)
+ a[17] = bc2 ^ (bc4 &^ bc3)
+ a[23] = bc3 ^ (bc0 &^ bc4)
+ a[4] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[15] ^ d0
+ bc3 = t<<41 | t>>(64-41)
+ t = a[21] ^ d1
+ bc4 = t<<2 | t>>(64-2)
+ t = a[2] ^ d2
+ bc0 = t<<62 | t>>(64-62)
+ t = a[8] ^ d3
+ bc1 = t<<55 | t>>(64-55)
+ t = a[14] ^ d4
+ bc2 = t<<39 | t>>(64-39)
+ a[15] = bc0 ^ (bc2 &^ bc1)
+ a[21] = bc1 ^ (bc3 &^ bc2)
+ a[2] = bc2 ^ (bc4 &^ bc3)
+ a[8] = bc3 ^ (bc0 &^ bc4)
+ a[14] = bc4 ^ (bc1 &^ bc0)
+
+ // Round 2
+ bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
+ bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
+ bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
+ bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
+ bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
+ d0 = bc4 ^ (bc1<<1 | bc1>>63)
+ d1 = bc0 ^ (bc2<<1 | bc2>>63)
+ d2 = bc1 ^ (bc3<<1 | bc3>>63)
+ d3 = bc2 ^ (bc4<<1 | bc4>>63)
+ d4 = bc3 ^ (bc0<<1 | bc0>>63)
+
+ bc0 = a[0] ^ d0
+ t = a[16] ^ d1
+ bc1 = t<<44 | t>>(64-44)
+ t = a[7] ^ d2
+ bc2 = t<<43 | t>>(64-43)
+ t = a[23] ^ d3
+ bc3 = t<<21 | t>>(64-21)
+ t = a[14] ^ d4
+ bc4 = t<<14 | t>>(64-14)
+ a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+1]
+ a[16] = bc1 ^ (bc3 &^ bc2)
+ a[7] = bc2 ^ (bc4 &^ bc3)
+ a[23] = bc3 ^ (bc0 &^ bc4)
+ a[14] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[20] ^ d0
+ bc2 = t<<3 | t>>(64-3)
+ t = a[11] ^ d1
+ bc3 = t<<45 | t>>(64-45)
+ t = a[2] ^ d2
+ bc4 = t<<61 | t>>(64-61)
+ t = a[18] ^ d3
+ bc0 = t<<28 | t>>(64-28)
+ t = a[9] ^ d4
+ bc1 = t<<20 | t>>(64-20)
+ a[20] = bc0 ^ (bc2 &^ bc1)
+ a[11] = bc1 ^ (bc3 &^ bc2)
+ a[2] = bc2 ^ (bc4 &^ bc3)
+ a[18] = bc3 ^ (bc0 &^ bc4)
+ a[9] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[15] ^ d0
+ bc4 = t<<18 | t>>(64-18)
+ t = a[6] ^ d1
+ bc0 = t<<1 | t>>(64-1)
+ t = a[22] ^ d2
+ bc1 = t<<6 | t>>(64-6)
+ t = a[13] ^ d3
+ bc2 = t<<25 | t>>(64-25)
+ t = a[4] ^ d4
+ bc3 = t<<8 | t>>(64-8)
+ a[15] = bc0 ^ (bc2 &^ bc1)
+ a[6] = bc1 ^ (bc3 &^ bc2)
+ a[22] = bc2 ^ (bc4 &^ bc3)
+ a[13] = bc3 ^ (bc0 &^ bc4)
+ a[4] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[10] ^ d0
+ bc1 = t<<36 | t>>(64-36)
+ t = a[1] ^ d1
+ bc2 = t<<10 | t>>(64-10)
+ t = a[17] ^ d2
+ bc3 = t<<15 | t>>(64-15)
+ t = a[8] ^ d3
+ bc4 = t<<56 | t>>(64-56)
+ t = a[24] ^ d4
+ bc0 = t<<27 | t>>(64-27)
+ a[10] = bc0 ^ (bc2 &^ bc1)
+ a[1] = bc1 ^ (bc3 &^ bc2)
+ a[17] = bc2 ^ (bc4 &^ bc3)
+ a[8] = bc3 ^ (bc0 &^ bc4)
+ a[24] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[5] ^ d0
+ bc3 = t<<41 | t>>(64-41)
+ t = a[21] ^ d1
+ bc4 = t<<2 | t>>(64-2)
+ t = a[12] ^ d2
+ bc0 = t<<62 | t>>(64-62)
+ t = a[3] ^ d3
+ bc1 = t<<55 | t>>(64-55)
+ t = a[19] ^ d4
+ bc2 = t<<39 | t>>(64-39)
+ a[5] = bc0 ^ (bc2 &^ bc1)
+ a[21] = bc1 ^ (bc3 &^ bc2)
+ a[12] = bc2 ^ (bc4 &^ bc3)
+ a[3] = bc3 ^ (bc0 &^ bc4)
+ a[19] = bc4 ^ (bc1 &^ bc0)
+
+ // Round 3
+ bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
+ bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
+ bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
+ bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
+ bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
+ d0 = bc4 ^ (bc1<<1 | bc1>>63)
+ d1 = bc0 ^ (bc2<<1 | bc2>>63)
+ d2 = bc1 ^ (bc3<<1 | bc3>>63)
+ d3 = bc2 ^ (bc4<<1 | bc4>>63)
+ d4 = bc3 ^ (bc0<<1 | bc0>>63)
+
+ bc0 = a[0] ^ d0
+ t = a[11] ^ d1
+ bc1 = t<<44 | t>>(64-44)
+ t = a[22] ^ d2
+ bc2 = t<<43 | t>>(64-43)
+ t = a[8] ^ d3
+ bc3 = t<<21 | t>>(64-21)
+ t = a[19] ^ d4
+ bc4 = t<<14 | t>>(64-14)
+ a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+2]
+ a[11] = bc1 ^ (bc3 &^ bc2)
+ a[22] = bc2 ^ (bc4 &^ bc3)
+ a[8] = bc3 ^ (bc0 &^ bc4)
+ a[19] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[15] ^ d0
+ bc2 = t<<3 | t>>(64-3)
+ t = a[1] ^ d1
+ bc3 = t<<45 | t>>(64-45)
+ t = a[12] ^ d2
+ bc4 = t<<61 | t>>(64-61)
+ t = a[23] ^ d3
+ bc0 = t<<28 | t>>(64-28)
+ t = a[9] ^ d4
+ bc1 = t<<20 | t>>(64-20)
+ a[15] = bc0 ^ (bc2 &^ bc1)
+ a[1] = bc1 ^ (bc3 &^ bc2)
+ a[12] = bc2 ^ (bc4 &^ bc3)
+ a[23] = bc3 ^ (bc0 &^ bc4)
+ a[9] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[5] ^ d0
+ bc4 = t<<18 | t>>(64-18)
+ t = a[16] ^ d1
+ bc0 = t<<1 | t>>(64-1)
+ t = a[2] ^ d2
+ bc1 = t<<6 | t>>(64-6)
+ t = a[13] ^ d3
+ bc2 = t<<25 | t>>(64-25)
+ t = a[24] ^ d4
+ bc3 = t<<8 | t>>(64-8)
+ a[5] = bc0 ^ (bc2 &^ bc1)
+ a[16] = bc1 ^ (bc3 &^ bc2)
+ a[2] = bc2 ^ (bc4 &^ bc3)
+ a[13] = bc3 ^ (bc0 &^ bc4)
+ a[24] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[20] ^ d0
+ bc1 = t<<36 | t>>(64-36)
+ t = a[6] ^ d1
+ bc2 = t<<10 | t>>(64-10)
+ t = a[17] ^ d2
+ bc3 = t<<15 | t>>(64-15)
+ t = a[3] ^ d3
+ bc4 = t<<56 | t>>(64-56)
+ t = a[14] ^ d4
+ bc0 = t<<27 | t>>(64-27)
+ a[20] = bc0 ^ (bc2 &^ bc1)
+ a[6] = bc1 ^ (bc3 &^ bc2)
+ a[17] = bc2 ^ (bc4 &^ bc3)
+ a[3] = bc3 ^ (bc0 &^ bc4)
+ a[14] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[10] ^ d0
+ bc3 = t<<41 | t>>(64-41)
+ t = a[21] ^ d1
+ bc4 = t<<2 | t>>(64-2)
+ t = a[7] ^ d2
+ bc0 = t<<62 | t>>(64-62)
+ t = a[18] ^ d3
+ bc1 = t<<55 | t>>(64-55)
+ t = a[4] ^ d4
+ bc2 = t<<39 | t>>(64-39)
+ a[10] = bc0 ^ (bc2 &^ bc1)
+ a[21] = bc1 ^ (bc3 &^ bc2)
+ a[7] = bc2 ^ (bc4 &^ bc3)
+ a[18] = bc3 ^ (bc0 &^ bc4)
+ a[4] = bc4 ^ (bc1 &^ bc0)
+
+ // Round 4
+ bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
+ bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
+ bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
+ bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
+ bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
+ d0 = bc4 ^ (bc1<<1 | bc1>>63)
+ d1 = bc0 ^ (bc2<<1 | bc2>>63)
+ d2 = bc1 ^ (bc3<<1 | bc3>>63)
+ d3 = bc2 ^ (bc4<<1 | bc4>>63)
+ d4 = bc3 ^ (bc0<<1 | bc0>>63)
+
+ bc0 = a[0] ^ d0
+ t = a[1] ^ d1
+ bc1 = t<<44 | t>>(64-44)
+ t = a[2] ^ d2
+ bc2 = t<<43 | t>>(64-43)
+ t = a[3] ^ d3
+ bc3 = t<<21 | t>>(64-21)
+ t = a[4] ^ d4
+ bc4 = t<<14 | t>>(64-14)
+ a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+3]
+ a[1] = bc1 ^ (bc3 &^ bc2)
+ a[2] = bc2 ^ (bc4 &^ bc3)
+ a[3] = bc3 ^ (bc0 &^ bc4)
+ a[4] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[5] ^ d0
+ bc2 = t<<3 | t>>(64-3)
+ t = a[6] ^ d1
+ bc3 = t<<45 | t>>(64-45)
+ t = a[7] ^ d2
+ bc4 = t<<61 | t>>(64-61)
+ t = a[8] ^ d3
+ bc0 = t<<28 | t>>(64-28)
+ t = a[9] ^ d4
+ bc1 = t<<20 | t>>(64-20)
+ a[5] = bc0 ^ (bc2 &^ bc1)
+ a[6] = bc1 ^ (bc3 &^ bc2)
+ a[7] = bc2 ^ (bc4 &^ bc3)
+ a[8] = bc3 ^ (bc0 &^ bc4)
+ a[9] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[10] ^ d0
+ bc4 = t<<18 | t>>(64-18)
+ t = a[11] ^ d1
+ bc0 = t<<1 | t>>(64-1)
+ t = a[12] ^ d2
+ bc1 = t<<6 | t>>(64-6)
+ t = a[13] ^ d3
+ bc2 = t<<25 | t>>(64-25)
+ t = a[14] ^ d4
+ bc3 = t<<8 | t>>(64-8)
+ a[10] = bc0 ^ (bc2 &^ bc1)
+ a[11] = bc1 ^ (bc3 &^ bc2)
+ a[12] = bc2 ^ (bc4 &^ bc3)
+ a[13] = bc3 ^ (bc0 &^ bc4)
+ a[14] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[15] ^ d0
+ bc1 = t<<36 | t>>(64-36)
+ t = a[16] ^ d1
+ bc2 = t<<10 | t>>(64-10)
+ t = a[17] ^ d2
+ bc3 = t<<15 | t>>(64-15)
+ t = a[18] ^ d3
+ bc4 = t<<56 | t>>(64-56)
+ t = a[19] ^ d4
+ bc0 = t<<27 | t>>(64-27)
+ a[15] = bc0 ^ (bc2 &^ bc1)
+ a[16] = bc1 ^ (bc3 &^ bc2)
+ a[17] = bc2 ^ (bc4 &^ bc3)
+ a[18] = bc3 ^ (bc0 &^ bc4)
+ a[19] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[20] ^ d0
+ bc3 = t<<41 | t>>(64-41)
+ t = a[21] ^ d1
+ bc4 = t<<2 | t>>(64-2)
+ t = a[22] ^ d2
+ bc0 = t<<62 | t>>(64-62)
+ t = a[23] ^ d3
+ bc1 = t<<55 | t>>(64-55)
+ t = a[24] ^ d4
+ bc2 = t<<39 | t>>(64-39)
+ a[20] = bc0 ^ (bc2 &^ bc1)
+ a[21] = bc1 ^ (bc3 &^ bc2)
+ a[22] = bc2 ^ (bc4 &^ bc3)
+ a[23] = bc3 ^ (bc0 &^ bc4)
+ a[24] = bc4 ^ (bc1 &^ bc0)
+ }
+}
diff --git a/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go b/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go
new file mode 100644
index 0000000..248a382
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go
@@ -0,0 +1,14 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build amd64 && !purego && gc
+// +build amd64,!purego,gc
+
+package sha3
+
+// This function is implemented in keccakf_amd64.s.
+
+//go:noescape
+
+func keccakF1600(a *[25]uint64)
diff --git a/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s b/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s
new file mode 100644
index 0000000..4cfa543
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/keccakf_amd64.s
@@ -0,0 +1,391 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build amd64 && !purego && gc
+// +build amd64,!purego,gc
+
+// This code was translated into a form compatible with 6a from the public
+// domain sources at https://github.com/gvanas/KeccakCodePackage
+
+// Offsets in state
+#define _ba (0*8)
+#define _be (1*8)
+#define _bi (2*8)
+#define _bo (3*8)
+#define _bu (4*8)
+#define _ga (5*8)
+#define _ge (6*8)
+#define _gi (7*8)
+#define _go (8*8)
+#define _gu (9*8)
+#define _ka (10*8)
+#define _ke (11*8)
+#define _ki (12*8)
+#define _ko (13*8)
+#define _ku (14*8)
+#define _ma (15*8)
+#define _me (16*8)
+#define _mi (17*8)
+#define _mo (18*8)
+#define _mu (19*8)
+#define _sa (20*8)
+#define _se (21*8)
+#define _si (22*8)
+#define _so (23*8)
+#define _su (24*8)
+
+// Temporary registers
+#define rT1 AX
+
+// Round vars
+#define rpState DI
+#define rpStack SP
+
+#define rDa BX
+#define rDe CX
+#define rDi DX
+#define rDo R8
+#define rDu R9
+
+#define rBa R10
+#define rBe R11
+#define rBi R12
+#define rBo R13
+#define rBu R14
+
+#define rCa SI
+#define rCe BP
+#define rCi rBi
+#define rCo rBo
+#define rCu R15
+
+#define MOVQ_RBI_RCE MOVQ rBi, rCe
+#define XORQ_RT1_RCA XORQ rT1, rCa
+#define XORQ_RT1_RCE XORQ rT1, rCe
+#define XORQ_RBA_RCU XORQ rBa, rCu
+#define XORQ_RBE_RCU XORQ rBe, rCu
+#define XORQ_RDU_RCU XORQ rDu, rCu
+#define XORQ_RDA_RCA XORQ rDa, rCa
+#define XORQ_RDE_RCE XORQ rDe, rCe
+
+#define mKeccakRound(iState, oState, rc, B_RBI_RCE, G_RT1_RCA, G_RT1_RCE, G_RBA_RCU, K_RT1_RCA, K_RT1_RCE, K_RBA_RCU, M_RT1_RCA, M_RT1_RCE, M_RBE_RCU, S_RDU_RCU, S_RDA_RCA, S_RDE_RCE) \
+ /* Prepare round */ \
+ MOVQ rCe, rDa; \
+ ROLQ $1, rDa; \
+ \
+ MOVQ _bi(iState), rCi; \
+ XORQ _gi(iState), rDi; \
+ XORQ rCu, rDa; \
+ XORQ _ki(iState), rCi; \
+ XORQ _mi(iState), rDi; \
+ XORQ rDi, rCi; \
+ \
+ MOVQ rCi, rDe; \
+ ROLQ $1, rDe; \
+ \
+ MOVQ _bo(iState), rCo; \
+ XORQ _go(iState), rDo; \
+ XORQ rCa, rDe; \
+ XORQ _ko(iState), rCo; \
+ XORQ _mo(iState), rDo; \
+ XORQ rDo, rCo; \
+ \
+ MOVQ rCo, rDi; \
+ ROLQ $1, rDi; \
+ \
+ MOVQ rCu, rDo; \
+ XORQ rCe, rDi; \
+ ROLQ $1, rDo; \
+ \
+ MOVQ rCa, rDu; \
+ XORQ rCi, rDo; \
+ ROLQ $1, rDu; \
+ \
+ /* Result b */ \
+ MOVQ _ba(iState), rBa; \
+ MOVQ _ge(iState), rBe; \
+ XORQ rCo, rDu; \
+ MOVQ _ki(iState), rBi; \
+ MOVQ _mo(iState), rBo; \
+ MOVQ _su(iState), rBu; \
+ XORQ rDe, rBe; \
+ ROLQ $44, rBe; \
+ XORQ rDi, rBi; \
+ XORQ rDa, rBa; \
+ ROLQ $43, rBi; \
+ \
+ MOVQ rBe, rCa; \
+ MOVQ rc, rT1; \
+ ORQ rBi, rCa; \
+ XORQ rBa, rT1; \
+ XORQ rT1, rCa; \
+ MOVQ rCa, _ba(oState); \
+ \
+ XORQ rDu, rBu; \
+ ROLQ $14, rBu; \
+ MOVQ rBa, rCu; \
+ ANDQ rBe, rCu; \
+ XORQ rBu, rCu; \
+ MOVQ rCu, _bu(oState); \
+ \
+ XORQ rDo, rBo; \
+ ROLQ $21, rBo; \
+ MOVQ rBo, rT1; \
+ ANDQ rBu, rT1; \
+ XORQ rBi, rT1; \
+ MOVQ rT1, _bi(oState); \
+ \
+ NOTQ rBi; \
+ ORQ rBa, rBu; \
+ ORQ rBo, rBi; \
+ XORQ rBo, rBu; \
+ XORQ rBe, rBi; \
+ MOVQ rBu, _bo(oState); \
+ MOVQ rBi, _be(oState); \
+ B_RBI_RCE; \
+ \
+ /* Result g */ \
+ MOVQ _gu(iState), rBe; \
+ XORQ rDu, rBe; \
+ MOVQ _ka(iState), rBi; \
+ ROLQ $20, rBe; \
+ XORQ rDa, rBi; \
+ ROLQ $3, rBi; \
+ MOVQ _bo(iState), rBa; \
+ MOVQ rBe, rT1; \
+ ORQ rBi, rT1; \
+ XORQ rDo, rBa; \
+ MOVQ _me(iState), rBo; \
+ MOVQ _si(iState), rBu; \
+ ROLQ $28, rBa; \
+ XORQ rBa, rT1; \
+ MOVQ rT1, _ga(oState); \
+ G_RT1_RCA; \
+ \
+ XORQ rDe, rBo; \
+ ROLQ $45, rBo; \
+ MOVQ rBi, rT1; \
+ ANDQ rBo, rT1; \
+ XORQ rBe, rT1; \
+ MOVQ rT1, _ge(oState); \
+ G_RT1_RCE; \
+ \
+ XORQ rDi, rBu; \
+ ROLQ $61, rBu; \
+ MOVQ rBu, rT1; \
+ ORQ rBa, rT1; \
+ XORQ rBo, rT1; \
+ MOVQ rT1, _go(oState); \
+ \
+ ANDQ rBe, rBa; \
+ XORQ rBu, rBa; \
+ MOVQ rBa, _gu(oState); \
+ NOTQ rBu; \
+ G_RBA_RCU; \
+ \
+ ORQ rBu, rBo; \
+ XORQ rBi, rBo; \
+ MOVQ rBo, _gi(oState); \
+ \
+ /* Result k */ \
+ MOVQ _be(iState), rBa; \
+ MOVQ _gi(iState), rBe; \
+ MOVQ _ko(iState), rBi; \
+ MOVQ _mu(iState), rBo; \
+ MOVQ _sa(iState), rBu; \
+ XORQ rDi, rBe; \
+ ROLQ $6, rBe; \
+ XORQ rDo, rBi; \
+ ROLQ $25, rBi; \
+ MOVQ rBe, rT1; \
+ ORQ rBi, rT1; \
+ XORQ rDe, rBa; \
+ ROLQ $1, rBa; \
+ XORQ rBa, rT1; \
+ MOVQ rT1, _ka(oState); \
+ K_RT1_RCA; \
+ \
+ XORQ rDu, rBo; \
+ ROLQ $8, rBo; \
+ MOVQ rBi, rT1; \
+ ANDQ rBo, rT1; \
+ XORQ rBe, rT1; \
+ MOVQ rT1, _ke(oState); \
+ K_RT1_RCE; \
+ \
+ XORQ rDa, rBu; \
+ ROLQ $18, rBu; \
+ NOTQ rBo; \
+ MOVQ rBo, rT1; \
+ ANDQ rBu, rT1; \
+ XORQ rBi, rT1; \
+ MOVQ rT1, _ki(oState); \
+ \
+ MOVQ rBu, rT1; \
+ ORQ rBa, rT1; \
+ XORQ rBo, rT1; \
+ MOVQ rT1, _ko(oState); \
+ \
+ ANDQ rBe, rBa; \
+ XORQ rBu, rBa; \
+ MOVQ rBa, _ku(oState); \
+ K_RBA_RCU; \
+ \
+ /* Result m */ \
+ MOVQ _ga(iState), rBe; \
+ XORQ rDa, rBe; \
+ MOVQ _ke(iState), rBi; \
+ ROLQ $36, rBe; \
+ XORQ rDe, rBi; \
+ MOVQ _bu(iState), rBa; \
+ ROLQ $10, rBi; \
+ MOVQ rBe, rT1; \
+ MOVQ _mi(iState), rBo; \
+ ANDQ rBi, rT1; \
+ XORQ rDu, rBa; \
+ MOVQ _so(iState), rBu; \
+ ROLQ $27, rBa; \
+ XORQ rBa, rT1; \
+ MOVQ rT1, _ma(oState); \
+ M_RT1_RCA; \
+ \
+ XORQ rDi, rBo; \
+ ROLQ $15, rBo; \
+ MOVQ rBi, rT1; \
+ ORQ rBo, rT1; \
+ XORQ rBe, rT1; \
+ MOVQ rT1, _me(oState); \
+ M_RT1_RCE; \
+ \
+ XORQ rDo, rBu; \
+ ROLQ $56, rBu; \
+ NOTQ rBo; \
+ MOVQ rBo, rT1; \
+ ORQ rBu, rT1; \
+ XORQ rBi, rT1; \
+ MOVQ rT1, _mi(oState); \
+ \
+ ORQ rBa, rBe; \
+ XORQ rBu, rBe; \
+ MOVQ rBe, _mu(oState); \
+ \
+ ANDQ rBa, rBu; \
+ XORQ rBo, rBu; \
+ MOVQ rBu, _mo(oState); \
+ M_RBE_RCU; \
+ \
+ /* Result s */ \
+ MOVQ _bi(iState), rBa; \
+ MOVQ _go(iState), rBe; \
+ MOVQ _ku(iState), rBi; \
+ XORQ rDi, rBa; \
+ MOVQ _ma(iState), rBo; \
+ ROLQ $62, rBa; \
+ XORQ rDo, rBe; \
+ MOVQ _se(iState), rBu; \
+ ROLQ $55, rBe; \
+ \
+ XORQ rDu, rBi; \
+ MOVQ rBa, rDu; \
+ XORQ rDe, rBu; \
+ ROLQ $2, rBu; \
+ ANDQ rBe, rDu; \
+ XORQ rBu, rDu; \
+ MOVQ rDu, _su(oState); \
+ \
+ ROLQ $39, rBi; \
+ S_RDU_RCU; \
+ NOTQ rBe; \
+ XORQ rDa, rBo; \
+ MOVQ rBe, rDa; \
+ ANDQ rBi, rDa; \
+ XORQ rBa, rDa; \
+ MOVQ rDa, _sa(oState); \
+ S_RDA_RCA; \
+ \
+ ROLQ $41, rBo; \
+ MOVQ rBi, rDe; \
+ ORQ rBo, rDe; \
+ XORQ rBe, rDe; \
+ MOVQ rDe, _se(oState); \
+ S_RDE_RCE; \
+ \
+ MOVQ rBo, rDi; \
+ MOVQ rBu, rDo; \
+ ANDQ rBu, rDi; \
+ ORQ rBa, rDo; \
+ XORQ rBi, rDi; \
+ XORQ rBo, rDo; \
+ MOVQ rDi, _si(oState); \
+ MOVQ rDo, _so(oState) \
+
+// func keccakF1600(state *[25]uint64)
+TEXT ·keccakF1600(SB), 0, $200-8
+ MOVQ state+0(FP), rpState
+
+ // Convert the user state into an internal state
+ NOTQ _be(rpState)
+ NOTQ _bi(rpState)
+ NOTQ _go(rpState)
+ NOTQ _ki(rpState)
+ NOTQ _mi(rpState)
+ NOTQ _sa(rpState)
+
+ // Execute the KeccakF permutation
+ MOVQ _ba(rpState), rCa
+ MOVQ _be(rpState), rCe
+ MOVQ _bu(rpState), rCu
+
+ XORQ _ga(rpState), rCa
+ XORQ _ge(rpState), rCe
+ XORQ _gu(rpState), rCu
+
+ XORQ _ka(rpState), rCa
+ XORQ _ke(rpState), rCe
+ XORQ _ku(rpState), rCu
+
+ XORQ _ma(rpState), rCa
+ XORQ _me(rpState), rCe
+ XORQ _mu(rpState), rCu
+
+ XORQ _sa(rpState), rCa
+ XORQ _se(rpState), rCe
+ MOVQ _si(rpState), rDi
+ MOVQ _so(rpState), rDo
+ XORQ _su(rpState), rCu
+
+ mKeccakRound(rpState, rpStack, $0x0000000000000001, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpStack, rpState, $0x0000000000008082, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpState, rpStack, $0x800000000000808a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpStack, rpState, $0x8000000080008000, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpState, rpStack, $0x000000000000808b, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpStack, rpState, $0x0000000080000001, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpState, rpStack, $0x8000000080008081, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpStack, rpState, $0x8000000000008009, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpState, rpStack, $0x000000000000008a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpStack, rpState, $0x0000000000000088, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpState, rpStack, $0x0000000080008009, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpStack, rpState, $0x000000008000000a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpState, rpStack, $0x000000008000808b, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpStack, rpState, $0x800000000000008b, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpState, rpStack, $0x8000000000008089, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpStack, rpState, $0x8000000000008003, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpState, rpStack, $0x8000000000008002, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpStack, rpState, $0x8000000000000080, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpState, rpStack, $0x000000000000800a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpStack, rpState, $0x800000008000000a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpState, rpStack, $0x8000000080008081, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpStack, rpState, $0x8000000000008080, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpState, rpStack, $0x0000000080000001, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE)
+ mKeccakRound(rpStack, rpState, $0x8000000080008008, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP)
+
+ // Revert the internal state to the user state
+ NOTQ _be(rpState)
+ NOTQ _bi(rpState)
+ NOTQ _go(rpState)
+ NOTQ _ki(rpState)
+ NOTQ _mi(rpState)
+ NOTQ _sa(rpState)
+
+ RET
diff --git a/vendor/golang.org/x/crypto/sha3/register.go b/vendor/golang.org/x/crypto/sha3/register.go
new file mode 100644
index 0000000..8b4453a
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/register.go
@@ -0,0 +1,19 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build go1.4
+// +build go1.4
+
+package sha3
+
+import (
+ "crypto"
+)
+
+func init() {
+ crypto.RegisterHash(crypto.SHA3_224, New224)
+ crypto.RegisterHash(crypto.SHA3_256, New256)
+ crypto.RegisterHash(crypto.SHA3_384, New384)
+ crypto.RegisterHash(crypto.SHA3_512, New512)
+}
diff --git a/vendor/golang.org/x/crypto/sha3/sha3.go b/vendor/golang.org/x/crypto/sha3/sha3.go
new file mode 100644
index 0000000..ba269a0
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/sha3.go
@@ -0,0 +1,193 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package sha3
+
+// spongeDirection indicates the direction bytes are flowing through the sponge.
+type spongeDirection int
+
+const (
+ // spongeAbsorbing indicates that the sponge is absorbing input.
+ spongeAbsorbing spongeDirection = iota
+ // spongeSqueezing indicates that the sponge is being squeezed.
+ spongeSqueezing
+)
+
+const (
+ // maxRate is the maximum size of the internal buffer. SHAKE-256
+ // currently needs the largest buffer.
+ maxRate = 168
+)
+
+type state struct {
+ // Generic sponge components.
+ a [25]uint64 // main state of the hash
+ buf []byte // points into storage
+ rate int // the number of bytes of state to use
+
+ // dsbyte contains the "domain separation" bits and the first bit of
+ // the padding. Sections 6.1 and 6.2 of [1] separate the outputs of the
+ // SHA-3 and SHAKE functions by appending bitstrings to the message.
+ // Using a little-endian bit-ordering convention, these are "01" for SHA-3
+ // and "1111" for SHAKE, or 00000010b and 00001111b, respectively. Then the
+ // padding rule from section 5.1 is applied to pad the message to a multiple
+ // of the rate, which involves adding a "1" bit, zero or more "0" bits, and
+ // a final "1" bit. We merge the first "1" bit from the padding into dsbyte,
+ // giving 00000110b (0x06) and 00011111b (0x1f).
+ // [1] http://csrc.nist.gov/publications/drafts/fips-202/fips_202_draft.pdf
+ // "Draft FIPS 202: SHA-3 Standard: Permutation-Based Hash and
+ // Extendable-Output Functions (May 2014)"
+ dsbyte byte
+
+ storage storageBuf
+
+ // Specific to SHA-3 and SHAKE.
+ outputLen int // the default output size in bytes
+ state spongeDirection // whether the sponge is absorbing or squeezing
+}
+
+// BlockSize returns the rate of sponge underlying this hash function.
+func (d *state) BlockSize() int { return d.rate }
+
+// Size returns the output size of the hash function in bytes.
+func (d *state) Size() int { return d.outputLen }
+
+// Reset clears the internal state by zeroing the sponge state and
+// the byte buffer, and setting Sponge.state to absorbing.
+func (d *state) Reset() {
+ // Zero the permutation's state.
+ for i := range d.a {
+ d.a[i] = 0
+ }
+ d.state = spongeAbsorbing
+ d.buf = d.storage.asBytes()[:0]
+}
+
+func (d *state) clone() *state {
+ ret := *d
+ if ret.state == spongeAbsorbing {
+ ret.buf = ret.storage.asBytes()[:len(ret.buf)]
+ } else {
+ ret.buf = ret.storage.asBytes()[d.rate-cap(d.buf) : d.rate]
+ }
+
+ return &ret
+}
+
+// permute applies the KeccakF-1600 permutation. It handles
+// any input-output buffering.
+func (d *state) permute() {
+ switch d.state {
+ case spongeAbsorbing:
+ // If we're absorbing, we need to xor the input into the state
+ // before applying the permutation.
+ xorIn(d, d.buf)
+ d.buf = d.storage.asBytes()[:0]
+ keccakF1600(&d.a)
+ case spongeSqueezing:
+ // If we're squeezing, we need to apply the permutatin before
+ // copying more output.
+ keccakF1600(&d.a)
+ d.buf = d.storage.asBytes()[:d.rate]
+ copyOut(d, d.buf)
+ }
+}
+
+// pads appends the domain separation bits in dsbyte, applies
+// the multi-bitrate 10..1 padding rule, and permutes the state.
+func (d *state) padAndPermute(dsbyte byte) {
+ if d.buf == nil {
+ d.buf = d.storage.asBytes()[:0]
+ }
+ // Pad with this instance's domain-separator bits. We know that there's
+ // at least one byte of space in d.buf because, if it were full,
+ // permute would have been called to empty it. dsbyte also contains the
+ // first one bit for the padding. See the comment in the state struct.
+ d.buf = append(d.buf, dsbyte)
+ zerosStart := len(d.buf)
+ d.buf = d.storage.asBytes()[:d.rate]
+ for i := zerosStart; i < d.rate; i++ {
+ d.buf[i] = 0
+ }
+ // This adds the final one bit for the padding. Because of the way that
+ // bits are numbered from the LSB upwards, the final bit is the MSB of
+ // the last byte.
+ d.buf[d.rate-1] ^= 0x80
+ // Apply the permutation
+ d.permute()
+ d.state = spongeSqueezing
+ d.buf = d.storage.asBytes()[:d.rate]
+ copyOut(d, d.buf)
+}
+
+// Write absorbs more data into the hash's state. It produces an error
+// if more data is written to the ShakeHash after writing
+func (d *state) Write(p []byte) (written int, err error) {
+ if d.state != spongeAbsorbing {
+ panic("sha3: write to sponge after read")
+ }
+ if d.buf == nil {
+ d.buf = d.storage.asBytes()[:0]
+ }
+ written = len(p)
+
+ for len(p) > 0 {
+ if len(d.buf) == 0 && len(p) >= d.rate {
+ // The fast path; absorb a full "rate" bytes of input and apply the permutation.
+ xorIn(d, p[:d.rate])
+ p = p[d.rate:]
+ keccakF1600(&d.a)
+ } else {
+ // The slow path; buffer the input until we can fill the sponge, and then xor it in.
+ todo := d.rate - len(d.buf)
+ if todo > len(p) {
+ todo = len(p)
+ }
+ d.buf = append(d.buf, p[:todo]...)
+ p = p[todo:]
+
+ // If the sponge is full, apply the permutation.
+ if len(d.buf) == d.rate {
+ d.permute()
+ }
+ }
+ }
+
+ return
+}
+
+// Read squeezes an arbitrary number of bytes from the sponge.
+func (d *state) Read(out []byte) (n int, err error) {
+ // If we're still absorbing, pad and apply the permutation.
+ if d.state == spongeAbsorbing {
+ d.padAndPermute(d.dsbyte)
+ }
+
+ n = len(out)
+
+ // Now, do the squeezing.
+ for len(out) > 0 {
+ n := copy(out, d.buf)
+ d.buf = d.buf[n:]
+ out = out[n:]
+
+ // Apply the permutation if we've squeezed the sponge dry.
+ if len(d.buf) == 0 {
+ d.permute()
+ }
+ }
+
+ return
+}
+
+// Sum applies padding to the hash state and then squeezes out the desired
+// number of output bytes.
+func (d *state) Sum(in []byte) []byte {
+ // Make a copy of the original hash so that caller can keep writing
+ // and summing.
+ dup := d.clone()
+ hash := make([]byte, dup.outputLen)
+ dup.Read(hash)
+ return append(in, hash...)
+}
diff --git a/vendor/golang.org/x/crypto/sha3/sha3_s390x.go b/vendor/golang.org/x/crypto/sha3/sha3_s390x.go
new file mode 100644
index 0000000..4fcfc92
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/sha3_s390x.go
@@ -0,0 +1,285 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build gc && !purego
+// +build gc,!purego
+
+package sha3
+
+// This file contains code for using the 'compute intermediate
+// message digest' (KIMD) and 'compute last message digest' (KLMD)
+// instructions to compute SHA-3 and SHAKE hashes on IBM Z.
+
+import (
+ "hash"
+
+ "golang.org/x/sys/cpu"
+)
+
+// codes represent 7-bit KIMD/KLMD function codes as defined in
+// the Principles of Operation.
+type code uint64
+
+const (
+ // function codes for KIMD/KLMD
+ sha3_224 code = 32
+ sha3_256 = 33
+ sha3_384 = 34
+ sha3_512 = 35
+ shake_128 = 36
+ shake_256 = 37
+ nopad = 0x100
+)
+
+// kimd is a wrapper for the 'compute intermediate message digest' instruction.
+// src must be a multiple of the rate for the given function code.
+//go:noescape
+func kimd(function code, chain *[200]byte, src []byte)
+
+// klmd is a wrapper for the 'compute last message digest' instruction.
+// src padding is handled by the instruction.
+//go:noescape
+func klmd(function code, chain *[200]byte, dst, src []byte)
+
+type asmState struct {
+ a [200]byte // 1600 bit state
+ buf []byte // care must be taken to ensure cap(buf) is a multiple of rate
+ rate int // equivalent to block size
+ storage [3072]byte // underlying storage for buf
+ outputLen int // output length if fixed, 0 if not
+ function code // KIMD/KLMD function code
+ state spongeDirection // whether the sponge is absorbing or squeezing
+}
+
+func newAsmState(function code) *asmState {
+ var s asmState
+ s.function = function
+ switch function {
+ case sha3_224:
+ s.rate = 144
+ s.outputLen = 28
+ case sha3_256:
+ s.rate = 136
+ s.outputLen = 32
+ case sha3_384:
+ s.rate = 104
+ s.outputLen = 48
+ case sha3_512:
+ s.rate = 72
+ s.outputLen = 64
+ case shake_128:
+ s.rate = 168
+ case shake_256:
+ s.rate = 136
+ default:
+ panic("sha3: unrecognized function code")
+ }
+
+ // limit s.buf size to a multiple of s.rate
+ s.resetBuf()
+ return &s
+}
+
+func (s *asmState) clone() *asmState {
+ c := *s
+ c.buf = c.storage[:len(s.buf):cap(s.buf)]
+ return &c
+}
+
+// copyIntoBuf copies b into buf. It will panic if there is not enough space to
+// store all of b.
+func (s *asmState) copyIntoBuf(b []byte) {
+ bufLen := len(s.buf)
+ s.buf = s.buf[:len(s.buf)+len(b)]
+ copy(s.buf[bufLen:], b)
+}
+
+// resetBuf points buf at storage, sets the length to 0 and sets cap to be a
+// multiple of the rate.
+func (s *asmState) resetBuf() {
+ max := (cap(s.storage) / s.rate) * s.rate
+ s.buf = s.storage[:0:max]
+}
+
+// Write (via the embedded io.Writer interface) adds more data to the running hash.
+// It never returns an error.
+func (s *asmState) Write(b []byte) (int, error) {
+ if s.state != spongeAbsorbing {
+ panic("sha3: write to sponge after read")
+ }
+ length := len(b)
+ for len(b) > 0 {
+ if len(s.buf) == 0 && len(b) >= cap(s.buf) {
+ // Hash the data directly and push any remaining bytes
+ // into the buffer.
+ remainder := len(b) % s.rate
+ kimd(s.function, &s.a, b[:len(b)-remainder])
+ if remainder != 0 {
+ s.copyIntoBuf(b[len(b)-remainder:])
+ }
+ return length, nil
+ }
+
+ if len(s.buf) == cap(s.buf) {
+ // flush the buffer
+ kimd(s.function, &s.a, s.buf)
+ s.buf = s.buf[:0]
+ }
+
+ // copy as much as we can into the buffer
+ n := len(b)
+ if len(b) > cap(s.buf)-len(s.buf) {
+ n = cap(s.buf) - len(s.buf)
+ }
+ s.copyIntoBuf(b[:n])
+ b = b[n:]
+ }
+ return length, nil
+}
+
+// Read squeezes an arbitrary number of bytes from the sponge.
+func (s *asmState) Read(out []byte) (n int, err error) {
+ n = len(out)
+
+ // need to pad if we were absorbing
+ if s.state == spongeAbsorbing {
+ s.state = spongeSqueezing
+
+ // write hash directly into out if possible
+ if len(out)%s.rate == 0 {
+ klmd(s.function, &s.a, out, s.buf) // len(out) may be 0
+ s.buf = s.buf[:0]
+ return
+ }
+
+ // write hash into buffer
+ max := cap(s.buf)
+ if max > len(out) {
+ max = (len(out)/s.rate)*s.rate + s.rate
+ }
+ klmd(s.function, &s.a, s.buf[:max], s.buf)
+ s.buf = s.buf[:max]
+ }
+
+ for len(out) > 0 {
+ // flush the buffer
+ if len(s.buf) != 0 {
+ c := copy(out, s.buf)
+ out = out[c:]
+ s.buf = s.buf[c:]
+ continue
+ }
+
+ // write hash directly into out if possible
+ if len(out)%s.rate == 0 {
+ klmd(s.function|nopad, &s.a, out, nil)
+ return
+ }
+
+ // write hash into buffer
+ s.resetBuf()
+ if cap(s.buf) > len(out) {
+ s.buf = s.buf[:(len(out)/s.rate)*s.rate+s.rate]
+ }
+ klmd(s.function|nopad, &s.a, s.buf, nil)
+ }
+ return
+}
+
+// Sum appends the current hash to b and returns the resulting slice.
+// It does not change the underlying hash state.
+func (s *asmState) Sum(b []byte) []byte {
+ if s.outputLen == 0 {
+ panic("sha3: cannot call Sum on SHAKE functions")
+ }
+
+ // Copy the state to preserve the original.
+ a := s.a
+
+ // Hash the buffer. Note that we don't clear it because we
+ // aren't updating the state.
+ klmd(s.function, &a, nil, s.buf)
+ return append(b, a[:s.outputLen]...)
+}
+
+// Reset resets the Hash to its initial state.
+func (s *asmState) Reset() {
+ for i := range s.a {
+ s.a[i] = 0
+ }
+ s.resetBuf()
+ s.state = spongeAbsorbing
+}
+
+// Size returns the number of bytes Sum will return.
+func (s *asmState) Size() int {
+ return s.outputLen
+}
+
+// BlockSize returns the hash's underlying block size.
+// The Write method must be able to accept any amount
+// of data, but it may operate more efficiently if all writes
+// are a multiple of the block size.
+func (s *asmState) BlockSize() int {
+ return s.rate
+}
+
+// Clone returns a copy of the ShakeHash in its current state.
+func (s *asmState) Clone() ShakeHash {
+ return s.clone()
+}
+
+// new224Asm returns an assembly implementation of SHA3-224 if available,
+// otherwise it returns nil.
+func new224Asm() hash.Hash {
+ if cpu.S390X.HasSHA3 {
+ return newAsmState(sha3_224)
+ }
+ return nil
+}
+
+// new256Asm returns an assembly implementation of SHA3-256 if available,
+// otherwise it returns nil.
+func new256Asm() hash.Hash {
+ if cpu.S390X.HasSHA3 {
+ return newAsmState(sha3_256)
+ }
+ return nil
+}
+
+// new384Asm returns an assembly implementation of SHA3-384 if available,
+// otherwise it returns nil.
+func new384Asm() hash.Hash {
+ if cpu.S390X.HasSHA3 {
+ return newAsmState(sha3_384)
+ }
+ return nil
+}
+
+// new512Asm returns an assembly implementation of SHA3-512 if available,
+// otherwise it returns nil.
+func new512Asm() hash.Hash {
+ if cpu.S390X.HasSHA3 {
+ return newAsmState(sha3_512)
+ }
+ return nil
+}
+
+// newShake128Asm returns an assembly implementation of SHAKE-128 if available,
+// otherwise it returns nil.
+func newShake128Asm() ShakeHash {
+ if cpu.S390X.HasSHA3 {
+ return newAsmState(shake_128)
+ }
+ return nil
+}
+
+// newShake256Asm returns an assembly implementation of SHAKE-256 if available,
+// otherwise it returns nil.
+func newShake256Asm() ShakeHash {
+ if cpu.S390X.HasSHA3 {
+ return newAsmState(shake_256)
+ }
+ return nil
+}
diff --git a/vendor/golang.org/x/crypto/sha3/sha3_s390x.s b/vendor/golang.org/x/crypto/sha3/sha3_s390x.s
new file mode 100644
index 0000000..a0e051b
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/sha3_s390x.s
@@ -0,0 +1,34 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build gc && !purego
+// +build gc,!purego
+
+#include "textflag.h"
+
+// func kimd(function code, chain *[200]byte, src []byte)
+TEXT ·kimd(SB), NOFRAME|NOSPLIT, $0-40
+ MOVD function+0(FP), R0
+ MOVD chain+8(FP), R1
+ LMG src+16(FP), R2, R3 // R2=base, R3=len
+
+continue:
+ WORD $0xB93E0002 // KIMD --, R2
+ BVS continue // continue if interrupted
+ MOVD $0, R0 // reset R0 for pre-go1.8 compilers
+ RET
+
+// func klmd(function code, chain *[200]byte, dst, src []byte)
+TEXT ·klmd(SB), NOFRAME|NOSPLIT, $0-64
+ // TODO: SHAKE support
+ MOVD function+0(FP), R0
+ MOVD chain+8(FP), R1
+ LMG dst+16(FP), R2, R3 // R2=base, R3=len
+ LMG src+40(FP), R4, R5 // R4=base, R5=len
+
+continue:
+ WORD $0xB93F0024 // KLMD R2, R4
+ BVS continue // continue if interrupted
+ MOVD $0, R0 // reset R0 for pre-go1.8 compilers
+ RET
diff --git a/vendor/golang.org/x/crypto/sha3/shake.go b/vendor/golang.org/x/crypto/sha3/shake.go
new file mode 100644
index 0000000..d7be295
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/shake.go
@@ -0,0 +1,173 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package sha3
+
+// This file defines the ShakeHash interface, and provides
+// functions for creating SHAKE and cSHAKE instances, as well as utility
+// functions for hashing bytes to arbitrary-length output.
+//
+//
+// SHAKE implementation is based on FIPS PUB 202 [1]
+// cSHAKE implementations is based on NIST SP 800-185 [2]
+//
+// [1] https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf
+// [2] https://doi.org/10.6028/NIST.SP.800-185
+
+import (
+ "encoding/binary"
+ "io"
+)
+
+// ShakeHash defines the interface to hash functions that
+// support arbitrary-length output.
+type ShakeHash interface {
+ // Write absorbs more data into the hash's state. It panics if input is
+ // written to it after output has been read from it.
+ io.Writer
+
+ // Read reads more output from the hash; reading affects the hash's
+ // state. (ShakeHash.Read is thus very different from Hash.Sum)
+ // It never returns an error.
+ io.Reader
+
+ // Clone returns a copy of the ShakeHash in its current state.
+ Clone() ShakeHash
+
+ // Reset resets the ShakeHash to its initial state.
+ Reset()
+}
+
+// cSHAKE specific context
+type cshakeState struct {
+ *state // SHA-3 state context and Read/Write operations
+
+ // initBlock is the cSHAKE specific initialization set of bytes. It is initialized
+ // by newCShake function and stores concatenation of N followed by S, encoded
+ // by the method specified in 3.3 of [1].
+ // It is stored here in order for Reset() to be able to put context into
+ // initial state.
+ initBlock []byte
+}
+
+// Consts for configuring initial SHA-3 state
+const (
+ dsbyteShake = 0x1f
+ dsbyteCShake = 0x04
+ rate128 = 168
+ rate256 = 136
+)
+
+func bytepad(input []byte, w int) []byte {
+ // leftEncode always returns max 9 bytes
+ buf := make([]byte, 0, 9+len(input)+w)
+ buf = append(buf, leftEncode(uint64(w))...)
+ buf = append(buf, input...)
+ padlen := w - (len(buf) % w)
+ return append(buf, make([]byte, padlen)...)
+}
+
+func leftEncode(value uint64) []byte {
+ var b [9]byte
+ binary.BigEndian.PutUint64(b[1:], value)
+ // Trim all but last leading zero bytes
+ i := byte(1)
+ for i < 8 && b[i] == 0 {
+ i++
+ }
+ // Prepend number of encoded bytes
+ b[i-1] = 9 - i
+ return b[i-1:]
+}
+
+func newCShake(N, S []byte, rate int, dsbyte byte) ShakeHash {
+ c := cshakeState{state: &state{rate: rate, dsbyte: dsbyte}}
+
+ // leftEncode returns max 9 bytes
+ c.initBlock = make([]byte, 0, 9*2+len(N)+len(S))
+ c.initBlock = append(c.initBlock, leftEncode(uint64(len(N)*8))...)
+ c.initBlock = append(c.initBlock, N...)
+ c.initBlock = append(c.initBlock, leftEncode(uint64(len(S)*8))...)
+ c.initBlock = append(c.initBlock, S...)
+ c.Write(bytepad(c.initBlock, c.rate))
+ return &c
+}
+
+// Reset resets the hash to initial state.
+func (c *cshakeState) Reset() {
+ c.state.Reset()
+ c.Write(bytepad(c.initBlock, c.rate))
+}
+
+// Clone returns copy of a cSHAKE context within its current state.
+func (c *cshakeState) Clone() ShakeHash {
+ b := make([]byte, len(c.initBlock))
+ copy(b, c.initBlock)
+ return &cshakeState{state: c.clone(), initBlock: b}
+}
+
+// Clone returns copy of SHAKE context within its current state.
+func (c *state) Clone() ShakeHash {
+ return c.clone()
+}
+
+// NewShake128 creates a new SHAKE128 variable-output-length ShakeHash.
+// Its generic security strength is 128 bits against all attacks if at
+// least 32 bytes of its output are used.
+func NewShake128() ShakeHash {
+ if h := newShake128Asm(); h != nil {
+ return h
+ }
+ return &state{rate: rate128, dsbyte: dsbyteShake}
+}
+
+// NewShake256 creates a new SHAKE256 variable-output-length ShakeHash.
+// Its generic security strength is 256 bits against all attacks if
+// at least 64 bytes of its output are used.
+func NewShake256() ShakeHash {
+ if h := newShake256Asm(); h != nil {
+ return h
+ }
+ return &state{rate: rate256, dsbyte: dsbyteShake}
+}
+
+// NewCShake128 creates a new instance of cSHAKE128 variable-output-length ShakeHash,
+// a customizable variant of SHAKE128.
+// N is used to define functions based on cSHAKE, it can be empty when plain cSHAKE is
+// desired. S is a customization byte string used for domain separation - two cSHAKE
+// computations on same input with different S yield unrelated outputs.
+// When N and S are both empty, this is equivalent to NewShake128.
+func NewCShake128(N, S []byte) ShakeHash {
+ if len(N) == 0 && len(S) == 0 {
+ return NewShake128()
+ }
+ return newCShake(N, S, rate128, dsbyteCShake)
+}
+
+// NewCShake256 creates a new instance of cSHAKE256 variable-output-length ShakeHash,
+// a customizable variant of SHAKE256.
+// N is used to define functions based on cSHAKE, it can be empty when plain cSHAKE is
+// desired. S is a customization byte string used for domain separation - two cSHAKE
+// computations on same input with different S yield unrelated outputs.
+// When N and S are both empty, this is equivalent to NewShake256.
+func NewCShake256(N, S []byte) ShakeHash {
+ if len(N) == 0 && len(S) == 0 {
+ return NewShake256()
+ }
+ return newCShake(N, S, rate256, dsbyteCShake)
+}
+
+// ShakeSum128 writes an arbitrary-length digest of data into hash.
+func ShakeSum128(hash, data []byte) {
+ h := NewShake128()
+ h.Write(data)
+ h.Read(hash)
+}
+
+// ShakeSum256 writes an arbitrary-length digest of data into hash.
+func ShakeSum256(hash, data []byte) {
+ h := NewShake256()
+ h.Write(data)
+ h.Read(hash)
+}
diff --git a/vendor/golang.org/x/crypto/sha3/shake_generic.go b/vendor/golang.org/x/crypto/sha3/shake_generic.go
new file mode 100644
index 0000000..5c0710e
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/shake_generic.go
@@ -0,0 +1,20 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !gc || purego || !s390x
+// +build !gc purego !s390x
+
+package sha3
+
+// newShake128Asm returns an assembly implementation of SHAKE-128 if available,
+// otherwise it returns nil.
+func newShake128Asm() ShakeHash {
+ return nil
+}
+
+// newShake256Asm returns an assembly implementation of SHAKE-256 if available,
+// otherwise it returns nil.
+func newShake256Asm() ShakeHash {
+ return nil
+}
diff --git a/vendor/golang.org/x/crypto/sha3/xor.go b/vendor/golang.org/x/crypto/sha3/xor.go
new file mode 100644
index 0000000..59c8eb9
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/xor.go
@@ -0,0 +1,24 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (!amd64 && !386 && !ppc64le) || purego
+// +build !amd64,!386,!ppc64le purego
+
+package sha3
+
+// A storageBuf is an aligned array of maxRate bytes.
+type storageBuf [maxRate]byte
+
+func (b *storageBuf) asBytes() *[maxRate]byte {
+ return (*[maxRate]byte)(b)
+}
+
+var (
+ xorIn = xorInGeneric
+ copyOut = copyOutGeneric
+ xorInUnaligned = xorInGeneric
+ copyOutUnaligned = copyOutGeneric
+)
+
+const xorImplementationUnaligned = "generic"
diff --git a/vendor/golang.org/x/crypto/sha3/xor_generic.go b/vendor/golang.org/x/crypto/sha3/xor_generic.go
new file mode 100644
index 0000000..fd35f02
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/xor_generic.go
@@ -0,0 +1,28 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package sha3
+
+import "encoding/binary"
+
+// xorInGeneric xors the bytes in buf into the state; it
+// makes no non-portable assumptions about memory layout
+// or alignment.
+func xorInGeneric(d *state, buf []byte) {
+ n := len(buf) / 8
+
+ for i := 0; i < n; i++ {
+ a := binary.LittleEndian.Uint64(buf)
+ d.a[i] ^= a
+ buf = buf[8:]
+ }
+}
+
+// copyOutGeneric copies ulint64s to a byte buffer.
+func copyOutGeneric(d *state, b []byte) {
+ for i := 0; len(b) >= 8; i++ {
+ binary.LittleEndian.PutUint64(b, d.a[i])
+ b = b[8:]
+ }
+}
diff --git a/vendor/golang.org/x/crypto/sha3/xor_unaligned.go b/vendor/golang.org/x/crypto/sha3/xor_unaligned.go
new file mode 100644
index 0000000..1ce6062
--- /dev/null
+++ b/vendor/golang.org/x/crypto/sha3/xor_unaligned.go
@@ -0,0 +1,68 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (amd64 || 386 || ppc64le) && !purego
+// +build amd64 386 ppc64le
+// +build !purego
+
+package sha3
+
+import "unsafe"
+
+// A storageBuf is an aligned array of maxRate bytes.
+type storageBuf [maxRate / 8]uint64
+
+func (b *storageBuf) asBytes() *[maxRate]byte {
+ return (*[maxRate]byte)(unsafe.Pointer(b))
+}
+
+// xorInUnaligned uses unaligned reads and writes to update d.a to contain d.a
+// XOR buf.
+func xorInUnaligned(d *state, buf []byte) {
+ n := len(buf)
+ bw := (*[maxRate / 8]uint64)(unsafe.Pointer(&buf[0]))[: n/8 : n/8]
+ if n >= 72 {
+ d.a[0] ^= bw[0]
+ d.a[1] ^= bw[1]
+ d.a[2] ^= bw[2]
+ d.a[3] ^= bw[3]
+ d.a[4] ^= bw[4]
+ d.a[5] ^= bw[5]
+ d.a[6] ^= bw[6]
+ d.a[7] ^= bw[7]
+ d.a[8] ^= bw[8]
+ }
+ if n >= 104 {
+ d.a[9] ^= bw[9]
+ d.a[10] ^= bw[10]
+ d.a[11] ^= bw[11]
+ d.a[12] ^= bw[12]
+ }
+ if n >= 136 {
+ d.a[13] ^= bw[13]
+ d.a[14] ^= bw[14]
+ d.a[15] ^= bw[15]
+ d.a[16] ^= bw[16]
+ }
+ if n >= 144 {
+ d.a[17] ^= bw[17]
+ }
+ if n >= 168 {
+ d.a[18] ^= bw[18]
+ d.a[19] ^= bw[19]
+ d.a[20] ^= bw[20]
+ }
+}
+
+func copyOutUnaligned(d *state, buf []byte) {
+ ab := (*[maxRate]uint8)(unsafe.Pointer(&d.a[0]))
+ copy(buf, ab[:])
+}
+
+var (
+ xorIn = xorInUnaligned
+ copyOut = copyOutUnaligned
+)
+
+const xorImplementationUnaligned = "unaligned"
diff --git a/vendor/golang.org/x/crypto/tea/cipher.go b/vendor/golang.org/x/crypto/tea/cipher.go
new file mode 100644
index 0000000..c1ff90e
--- /dev/null
+++ b/vendor/golang.org/x/crypto/tea/cipher.go
@@ -0,0 +1,116 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package tea implements the TEA algorithm, as defined in Needham and
+// Wheeler's 1994 technical report, “TEA, a Tiny Encryption Algorithm”. See
+// http://www.cix.co.uk/~klockstone/tea.pdf for details.
+//
+// TEA is a legacy cipher and its short block size makes it vulnerable to
+// birthday bound attacks (see https://sweet32.info). It should only be used
+// where compatibility with legacy systems, not security, is the goal.
+//
+// Deprecated: any new system should use AES (from crypto/aes, if necessary in
+// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from
+// golang.org/x/crypto/chacha20poly1305).
+package tea
+
+import (
+ "crypto/cipher"
+ "encoding/binary"
+ "errors"
+)
+
+const (
+ // BlockSize is the size of a TEA block, in bytes.
+ BlockSize = 8
+
+ // KeySize is the size of a TEA key, in bytes.
+ KeySize = 16
+
+ // delta is the TEA key schedule constant.
+ delta = 0x9e3779b9
+
+ // numRounds is the standard number of rounds in TEA.
+ numRounds = 64
+)
+
+// tea is an instance of the TEA cipher with a particular key.
+type tea struct {
+ key [16]byte
+ rounds int
+}
+
+// NewCipher returns an instance of the TEA cipher with the standard number of
+// rounds. The key argument must be 16 bytes long.
+func NewCipher(key []byte) (cipher.Block, error) {
+ return NewCipherWithRounds(key, numRounds)
+}
+
+// NewCipherWithRounds returns an instance of the TEA cipher with a given
+// number of rounds, which must be even. The key argument must be 16 bytes
+// long.
+func NewCipherWithRounds(key []byte, rounds int) (cipher.Block, error) {
+ if len(key) != 16 {
+ return nil, errors.New("tea: incorrect key size")
+ }
+
+ if rounds&1 != 0 {
+ return nil, errors.New("tea: odd number of rounds specified")
+ }
+
+ c := &tea{
+ rounds: rounds,
+ }
+ copy(c.key[:], key)
+
+ return c, nil
+}
+
+// BlockSize returns the TEA block size, which is eight bytes. It is necessary
+// to satisfy the Block interface in the package "crypto/cipher".
+func (*tea) BlockSize() int {
+ return BlockSize
+}
+
+// Encrypt encrypts the 8 byte buffer src using the key in t and stores the
+// result in dst. Note that for amounts of data larger than a block, it is not
+// safe to just call Encrypt on successive blocks; instead, use an encryption
+// mode like CBC (see crypto/cipher/cbc.go).
+func (t *tea) Encrypt(dst, src []byte) {
+ e := binary.BigEndian
+ v0, v1 := e.Uint32(src), e.Uint32(src[4:])
+ k0, k1, k2, k3 := e.Uint32(t.key[0:]), e.Uint32(t.key[4:]), e.Uint32(t.key[8:]), e.Uint32(t.key[12:])
+
+ sum := uint32(0)
+ delta := uint32(delta)
+
+ for i := 0; i < t.rounds/2; i++ {
+ sum += delta
+ v0 += ((v1 << 4) + k0) ^ (v1 + sum) ^ ((v1 >> 5) + k1)
+ v1 += ((v0 << 4) + k2) ^ (v0 + sum) ^ ((v0 >> 5) + k3)
+ }
+
+ e.PutUint32(dst, v0)
+ e.PutUint32(dst[4:], v1)
+}
+
+// Decrypt decrypts the 8 byte buffer src using the key in t and stores the
+// result in dst.
+func (t *tea) Decrypt(dst, src []byte) {
+ e := binary.BigEndian
+ v0, v1 := e.Uint32(src), e.Uint32(src[4:])
+ k0, k1, k2, k3 := e.Uint32(t.key[0:]), e.Uint32(t.key[4:]), e.Uint32(t.key[8:]), e.Uint32(t.key[12:])
+
+ delta := uint32(delta)
+ sum := delta * uint32(t.rounds/2) // in general, sum = delta * n
+
+ for i := 0; i < t.rounds/2; i++ {
+ v1 -= ((v0 << 4) + k2) ^ (v0 + sum) ^ ((v0 >> 5) + k3)
+ v0 -= ((v1 << 4) + k0) ^ (v1 + sum) ^ ((v1 >> 5) + k1)
+ sum -= delta
+ }
+
+ e.PutUint32(dst, v0)
+ e.PutUint32(dst[4:], v1)
+}
diff --git a/vendor/golang.org/x/crypto/twofish/twofish.go b/vendor/golang.org/x/crypto/twofish/twofish.go
new file mode 100644
index 0000000..1197d75
--- /dev/null
+++ b/vendor/golang.org/x/crypto/twofish/twofish.go
@@ -0,0 +1,348 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package twofish implements Bruce Schneier's Twofish encryption algorithm.
+//
+// Deprecated: Twofish is a legacy cipher and should not be used for new
+// applications. Also, this package does not and will not provide an optimized
+// implementation. Instead, use AES (from crypto/aes, if necessary in an AEAD
+// mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from
+// golang.org/x/crypto/chacha20poly1305).
+package twofish // import "golang.org/x/crypto/twofish"
+
+// Twofish is defined in https://www.schneier.com/paper-twofish-paper.pdf [TWOFISH]
+
+// This code is a port of the LibTom C implementation.
+// See http://libtom.org/?page=features&newsitems=5&whatfile=crypt.
+// LibTomCrypt is free for all purposes under the public domain.
+// It was heavily inspired by the go blowfish package.
+
+import "strconv"
+
+// BlockSize is the constant block size of Twofish.
+const BlockSize = 16
+
+const mdsPolynomial = 0x169 // x^8 + x^6 + x^5 + x^3 + 1, see [TWOFISH] 4.2
+const rsPolynomial = 0x14d // x^8 + x^6 + x^3 + x^2 + 1, see [TWOFISH] 4.3
+
+// A Cipher is an instance of Twofish encryption using a particular key.
+type Cipher struct {
+ s [4][256]uint32
+ k [40]uint32
+}
+
+type KeySizeError int
+
+func (k KeySizeError) Error() string {
+ return "crypto/twofish: invalid key size " + strconv.Itoa(int(k))
+}
+
+// NewCipher creates and returns a Cipher.
+// The key argument should be the Twofish key, 16, 24 or 32 bytes.
+func NewCipher(key []byte) (*Cipher, error) {
+ keylen := len(key)
+
+ if keylen != 16 && keylen != 24 && keylen != 32 {
+ return nil, KeySizeError(keylen)
+ }
+
+ // k is the number of 64 bit words in key
+ k := keylen / 8
+
+ // Create the S[..] words
+ var S [4 * 4]byte
+ for i := 0; i < k; i++ {
+ // Computes [y0 y1 y2 y3] = rs . [x0 x1 x2 x3 x4 x5 x6 x7]
+ for j, rsRow := range rs {
+ for k, rsVal := range rsRow {
+ S[4*i+j] ^= gfMult(key[8*i+k], rsVal, rsPolynomial)
+ }
+ }
+ }
+
+ // Calculate subkeys
+ c := new(Cipher)
+ var tmp [4]byte
+ for i := byte(0); i < 20; i++ {
+ // A = h(p * 2x, Me)
+ for j := range tmp {
+ tmp[j] = 2 * i
+ }
+ A := h(tmp[:], key, 0)
+
+ // B = rolc(h(p * (2x + 1), Mo), 8)
+ for j := range tmp {
+ tmp[j] = 2*i + 1
+ }
+ B := h(tmp[:], key, 1)
+ B = rol(B, 8)
+
+ c.k[2*i] = A + B
+
+ // K[2i+1] = (A + 2B) <<< 9
+ c.k[2*i+1] = rol(2*B+A, 9)
+ }
+
+ // Calculate sboxes
+ switch k {
+ case 2:
+ for i := range c.s[0] {
+ c.s[0][i] = mdsColumnMult(sbox[1][sbox[0][sbox[0][byte(i)]^S[0]]^S[4]], 0)
+ c.s[1][i] = mdsColumnMult(sbox[0][sbox[0][sbox[1][byte(i)]^S[1]]^S[5]], 1)
+ c.s[2][i] = mdsColumnMult(sbox[1][sbox[1][sbox[0][byte(i)]^S[2]]^S[6]], 2)
+ c.s[3][i] = mdsColumnMult(sbox[0][sbox[1][sbox[1][byte(i)]^S[3]]^S[7]], 3)
+ }
+ case 3:
+ for i := range c.s[0] {
+ c.s[0][i] = mdsColumnMult(sbox[1][sbox[0][sbox[0][sbox[1][byte(i)]^S[0]]^S[4]]^S[8]], 0)
+ c.s[1][i] = mdsColumnMult(sbox[0][sbox[0][sbox[1][sbox[1][byte(i)]^S[1]]^S[5]]^S[9]], 1)
+ c.s[2][i] = mdsColumnMult(sbox[1][sbox[1][sbox[0][sbox[0][byte(i)]^S[2]]^S[6]]^S[10]], 2)
+ c.s[3][i] = mdsColumnMult(sbox[0][sbox[1][sbox[1][sbox[0][byte(i)]^S[3]]^S[7]]^S[11]], 3)
+ }
+ default:
+ for i := range c.s[0] {
+ c.s[0][i] = mdsColumnMult(sbox[1][sbox[0][sbox[0][sbox[1][sbox[1][byte(i)]^S[0]]^S[4]]^S[8]]^S[12]], 0)
+ c.s[1][i] = mdsColumnMult(sbox[0][sbox[0][sbox[1][sbox[1][sbox[0][byte(i)]^S[1]]^S[5]]^S[9]]^S[13]], 1)
+ c.s[2][i] = mdsColumnMult(sbox[1][sbox[1][sbox[0][sbox[0][sbox[0][byte(i)]^S[2]]^S[6]]^S[10]]^S[14]], 2)
+ c.s[3][i] = mdsColumnMult(sbox[0][sbox[1][sbox[1][sbox[0][sbox[1][byte(i)]^S[3]]^S[7]]^S[11]]^S[15]], 3)
+ }
+ }
+
+ return c, nil
+}
+
+// BlockSize returns the Twofish block size, 16 bytes.
+func (c *Cipher) BlockSize() int { return BlockSize }
+
+// store32l stores src in dst in little-endian form.
+func store32l(dst []byte, src uint32) {
+ dst[0] = byte(src)
+ dst[1] = byte(src >> 8)
+ dst[2] = byte(src >> 16)
+ dst[3] = byte(src >> 24)
+ return
+}
+
+// load32l reads a little-endian uint32 from src.
+func load32l(src []byte) uint32 {
+ return uint32(src[0]) | uint32(src[1])<<8 | uint32(src[2])<<16 | uint32(src[3])<<24
+}
+
+// rol returns x after a left circular rotation of y bits.
+func rol(x, y uint32) uint32 {
+ return (x << (y & 31)) | (x >> (32 - (y & 31)))
+}
+
+// ror returns x after a right circular rotation of y bits.
+func ror(x, y uint32) uint32 {
+ return (x >> (y & 31)) | (x << (32 - (y & 31)))
+}
+
+// The RS matrix. See [TWOFISH] 4.3
+var rs = [4][8]byte{
+ {0x01, 0xA4, 0x55, 0x87, 0x5A, 0x58, 0xDB, 0x9E},
+ {0xA4, 0x56, 0x82, 0xF3, 0x1E, 0xC6, 0x68, 0xE5},
+ {0x02, 0xA1, 0xFC, 0xC1, 0x47, 0xAE, 0x3D, 0x19},
+ {0xA4, 0x55, 0x87, 0x5A, 0x58, 0xDB, 0x9E, 0x03},
+}
+
+// sbox tables
+var sbox = [2][256]byte{
+ {
+ 0xa9, 0x67, 0xb3, 0xe8, 0x04, 0xfd, 0xa3, 0x76, 0x9a, 0x92, 0x80, 0x78, 0xe4, 0xdd, 0xd1, 0x38,
+ 0x0d, 0xc6, 0x35, 0x98, 0x18, 0xf7, 0xec, 0x6c, 0x43, 0x75, 0x37, 0x26, 0xfa, 0x13, 0x94, 0x48,
+ 0xf2, 0xd0, 0x8b, 0x30, 0x84, 0x54, 0xdf, 0x23, 0x19, 0x5b, 0x3d, 0x59, 0xf3, 0xae, 0xa2, 0x82,
+ 0x63, 0x01, 0x83, 0x2e, 0xd9, 0x51, 0x9b, 0x7c, 0xa6, 0xeb, 0xa5, 0xbe, 0x16, 0x0c, 0xe3, 0x61,
+ 0xc0, 0x8c, 0x3a, 0xf5, 0x73, 0x2c, 0x25, 0x0b, 0xbb, 0x4e, 0x89, 0x6b, 0x53, 0x6a, 0xb4, 0xf1,
+ 0xe1, 0xe6, 0xbd, 0x45, 0xe2, 0xf4, 0xb6, 0x66, 0xcc, 0x95, 0x03, 0x56, 0xd4, 0x1c, 0x1e, 0xd7,
+ 0xfb, 0xc3, 0x8e, 0xb5, 0xe9, 0xcf, 0xbf, 0xba, 0xea, 0x77, 0x39, 0xaf, 0x33, 0xc9, 0x62, 0x71,
+ 0x81, 0x79, 0x09, 0xad, 0x24, 0xcd, 0xf9, 0xd8, 0xe5, 0xc5, 0xb9, 0x4d, 0x44, 0x08, 0x86, 0xe7,
+ 0xa1, 0x1d, 0xaa, 0xed, 0x06, 0x70, 0xb2, 0xd2, 0x41, 0x7b, 0xa0, 0x11, 0x31, 0xc2, 0x27, 0x90,
+ 0x20, 0xf6, 0x60, 0xff, 0x96, 0x5c, 0xb1, 0xab, 0x9e, 0x9c, 0x52, 0x1b, 0x5f, 0x93, 0x0a, 0xef,
+ 0x91, 0x85, 0x49, 0xee, 0x2d, 0x4f, 0x8f, 0x3b, 0x47, 0x87, 0x6d, 0x46, 0xd6, 0x3e, 0x69, 0x64,
+ 0x2a, 0xce, 0xcb, 0x2f, 0xfc, 0x97, 0x05, 0x7a, 0xac, 0x7f, 0xd5, 0x1a, 0x4b, 0x0e, 0xa7, 0x5a,
+ 0x28, 0x14, 0x3f, 0x29, 0x88, 0x3c, 0x4c, 0x02, 0xb8, 0xda, 0xb0, 0x17, 0x55, 0x1f, 0x8a, 0x7d,
+ 0x57, 0xc7, 0x8d, 0x74, 0xb7, 0xc4, 0x9f, 0x72, 0x7e, 0x15, 0x22, 0x12, 0x58, 0x07, 0x99, 0x34,
+ 0x6e, 0x50, 0xde, 0x68, 0x65, 0xbc, 0xdb, 0xf8, 0xc8, 0xa8, 0x2b, 0x40, 0xdc, 0xfe, 0x32, 0xa4,
+ 0xca, 0x10, 0x21, 0xf0, 0xd3, 0x5d, 0x0f, 0x00, 0x6f, 0x9d, 0x36, 0x42, 0x4a, 0x5e, 0xc1, 0xe0,
+ },
+ {
+ 0x75, 0xf3, 0xc6, 0xf4, 0xdb, 0x7b, 0xfb, 0xc8, 0x4a, 0xd3, 0xe6, 0x6b, 0x45, 0x7d, 0xe8, 0x4b,
+ 0xd6, 0x32, 0xd8, 0xfd, 0x37, 0x71, 0xf1, 0xe1, 0x30, 0x0f, 0xf8, 0x1b, 0x87, 0xfa, 0x06, 0x3f,
+ 0x5e, 0xba, 0xae, 0x5b, 0x8a, 0x00, 0xbc, 0x9d, 0x6d, 0xc1, 0xb1, 0x0e, 0x80, 0x5d, 0xd2, 0xd5,
+ 0xa0, 0x84, 0x07, 0x14, 0xb5, 0x90, 0x2c, 0xa3, 0xb2, 0x73, 0x4c, 0x54, 0x92, 0x74, 0x36, 0x51,
+ 0x38, 0xb0, 0xbd, 0x5a, 0xfc, 0x60, 0x62, 0x96, 0x6c, 0x42, 0xf7, 0x10, 0x7c, 0x28, 0x27, 0x8c,
+ 0x13, 0x95, 0x9c, 0xc7, 0x24, 0x46, 0x3b, 0x70, 0xca, 0xe3, 0x85, 0xcb, 0x11, 0xd0, 0x93, 0xb8,
+ 0xa6, 0x83, 0x20, 0xff, 0x9f, 0x77, 0xc3, 0xcc, 0x03, 0x6f, 0x08, 0xbf, 0x40, 0xe7, 0x2b, 0xe2,
+ 0x79, 0x0c, 0xaa, 0x82, 0x41, 0x3a, 0xea, 0xb9, 0xe4, 0x9a, 0xa4, 0x97, 0x7e, 0xda, 0x7a, 0x17,
+ 0x66, 0x94, 0xa1, 0x1d, 0x3d, 0xf0, 0xde, 0xb3, 0x0b, 0x72, 0xa7, 0x1c, 0xef, 0xd1, 0x53, 0x3e,
+ 0x8f, 0x33, 0x26, 0x5f, 0xec, 0x76, 0x2a, 0x49, 0x81, 0x88, 0xee, 0x21, 0xc4, 0x1a, 0xeb, 0xd9,
+ 0xc5, 0x39, 0x99, 0xcd, 0xad, 0x31, 0x8b, 0x01, 0x18, 0x23, 0xdd, 0x1f, 0x4e, 0x2d, 0xf9, 0x48,
+ 0x4f, 0xf2, 0x65, 0x8e, 0x78, 0x5c, 0x58, 0x19, 0x8d, 0xe5, 0x98, 0x57, 0x67, 0x7f, 0x05, 0x64,
+ 0xaf, 0x63, 0xb6, 0xfe, 0xf5, 0xb7, 0x3c, 0xa5, 0xce, 0xe9, 0x68, 0x44, 0xe0, 0x4d, 0x43, 0x69,
+ 0x29, 0x2e, 0xac, 0x15, 0x59, 0xa8, 0x0a, 0x9e, 0x6e, 0x47, 0xdf, 0x34, 0x35, 0x6a, 0xcf, 0xdc,
+ 0x22, 0xc9, 0xc0, 0x9b, 0x89, 0xd4, 0xed, 0xab, 0x12, 0xa2, 0x0d, 0x52, 0xbb, 0x02, 0x2f, 0xa9,
+ 0xd7, 0x61, 0x1e, 0xb4, 0x50, 0x04, 0xf6, 0xc2, 0x16, 0x25, 0x86, 0x56, 0x55, 0x09, 0xbe, 0x91,
+ },
+}
+
+// gfMult returns a·b in GF(2^8)/p
+func gfMult(a, b byte, p uint32) byte {
+ B := [2]uint32{0, uint32(b)}
+ P := [2]uint32{0, p}
+ var result uint32
+
+ // branchless GF multiplier
+ for i := 0; i < 7; i++ {
+ result ^= B[a&1]
+ a >>= 1
+ B[1] = P[B[1]>>7] ^ (B[1] << 1)
+ }
+ result ^= B[a&1]
+ return byte(result)
+}
+
+// mdsColumnMult calculates y{col} where [y0 y1 y2 y3] = MDS · [x0]
+func mdsColumnMult(in byte, col int) uint32 {
+ mul01 := in
+ mul5B := gfMult(in, 0x5B, mdsPolynomial)
+ mulEF := gfMult(in, 0xEF, mdsPolynomial)
+
+ switch col {
+ case 0:
+ return uint32(mul01) | uint32(mul5B)<<8 | uint32(mulEF)<<16 | uint32(mulEF)<<24
+ case 1:
+ return uint32(mulEF) | uint32(mulEF)<<8 | uint32(mul5B)<<16 | uint32(mul01)<<24
+ case 2:
+ return uint32(mul5B) | uint32(mulEF)<<8 | uint32(mul01)<<16 | uint32(mulEF)<<24
+ case 3:
+ return uint32(mul5B) | uint32(mul01)<<8 | uint32(mulEF)<<16 | uint32(mul5B)<<24
+ }
+
+ panic("unreachable")
+}
+
+// h implements the S-box generation function. See [TWOFISH] 4.3.5
+func h(in, key []byte, offset int) uint32 {
+ var y [4]byte
+ for x := range y {
+ y[x] = in[x]
+ }
+ switch len(key) / 8 {
+ case 4:
+ y[0] = sbox[1][y[0]] ^ key[4*(6+offset)+0]
+ y[1] = sbox[0][y[1]] ^ key[4*(6+offset)+1]
+ y[2] = sbox[0][y[2]] ^ key[4*(6+offset)+2]
+ y[3] = sbox[1][y[3]] ^ key[4*(6+offset)+3]
+ fallthrough
+ case 3:
+ y[0] = sbox[1][y[0]] ^ key[4*(4+offset)+0]
+ y[1] = sbox[1][y[1]] ^ key[4*(4+offset)+1]
+ y[2] = sbox[0][y[2]] ^ key[4*(4+offset)+2]
+ y[3] = sbox[0][y[3]] ^ key[4*(4+offset)+3]
+ fallthrough
+ case 2:
+ y[0] = sbox[1][sbox[0][sbox[0][y[0]]^key[4*(2+offset)+0]]^key[4*(0+offset)+0]]
+ y[1] = sbox[0][sbox[0][sbox[1][y[1]]^key[4*(2+offset)+1]]^key[4*(0+offset)+1]]
+ y[2] = sbox[1][sbox[1][sbox[0][y[2]]^key[4*(2+offset)+2]]^key[4*(0+offset)+2]]
+ y[3] = sbox[0][sbox[1][sbox[1][y[3]]^key[4*(2+offset)+3]]^key[4*(0+offset)+3]]
+ }
+ // [y0 y1 y2 y3] = MDS . [x0 x1 x2 x3]
+ var mdsMult uint32
+ for i := range y {
+ mdsMult ^= mdsColumnMult(y[i], i)
+ }
+ return mdsMult
+}
+
+// Encrypt encrypts a 16-byte block from src to dst, which may overlap.
+// Note that for amounts of data larger than a block,
+// it is not safe to just call Encrypt on successive blocks;
+// instead, use an encryption mode like CBC (see crypto/cipher/cbc.go).
+func (c *Cipher) Encrypt(dst, src []byte) {
+ S1 := c.s[0]
+ S2 := c.s[1]
+ S3 := c.s[2]
+ S4 := c.s[3]
+
+ // Load input
+ ia := load32l(src[0:4])
+ ib := load32l(src[4:8])
+ ic := load32l(src[8:12])
+ id := load32l(src[12:16])
+
+ // Pre-whitening
+ ia ^= c.k[0]
+ ib ^= c.k[1]
+ ic ^= c.k[2]
+ id ^= c.k[3]
+
+ for i := 0; i < 8; i++ {
+ k := c.k[8+i*4 : 12+i*4]
+ t2 := S2[byte(ib)] ^ S3[byte(ib>>8)] ^ S4[byte(ib>>16)] ^ S1[byte(ib>>24)]
+ t1 := S1[byte(ia)] ^ S2[byte(ia>>8)] ^ S3[byte(ia>>16)] ^ S4[byte(ia>>24)] + t2
+ ic = ror(ic^(t1+k[0]), 1)
+ id = rol(id, 1) ^ (t2 + t1 + k[1])
+
+ t2 = S2[byte(id)] ^ S3[byte(id>>8)] ^ S4[byte(id>>16)] ^ S1[byte(id>>24)]
+ t1 = S1[byte(ic)] ^ S2[byte(ic>>8)] ^ S3[byte(ic>>16)] ^ S4[byte(ic>>24)] + t2
+ ia = ror(ia^(t1+k[2]), 1)
+ ib = rol(ib, 1) ^ (t2 + t1 + k[3])
+ }
+
+ // Output with "undo last swap"
+ ta := ic ^ c.k[4]
+ tb := id ^ c.k[5]
+ tc := ia ^ c.k[6]
+ td := ib ^ c.k[7]
+
+ store32l(dst[0:4], ta)
+ store32l(dst[4:8], tb)
+ store32l(dst[8:12], tc)
+ store32l(dst[12:16], td)
+}
+
+// Decrypt decrypts a 16-byte block from src to dst, which may overlap.
+func (c *Cipher) Decrypt(dst, src []byte) {
+ S1 := c.s[0]
+ S2 := c.s[1]
+ S3 := c.s[2]
+ S4 := c.s[3]
+
+ // Load input
+ ta := load32l(src[0:4])
+ tb := load32l(src[4:8])
+ tc := load32l(src[8:12])
+ td := load32l(src[12:16])
+
+ // Undo undo final swap
+ ia := tc ^ c.k[6]
+ ib := td ^ c.k[7]
+ ic := ta ^ c.k[4]
+ id := tb ^ c.k[5]
+
+ for i := 8; i > 0; i-- {
+ k := c.k[4+i*4 : 8+i*4]
+ t2 := S2[byte(id)] ^ S3[byte(id>>8)] ^ S4[byte(id>>16)] ^ S1[byte(id>>24)]
+ t1 := S1[byte(ic)] ^ S2[byte(ic>>8)] ^ S3[byte(ic>>16)] ^ S4[byte(ic>>24)] + t2
+ ia = rol(ia, 1) ^ (t1 + k[2])
+ ib = ror(ib^(t2+t1+k[3]), 1)
+
+ t2 = S2[byte(ib)] ^ S3[byte(ib>>8)] ^ S4[byte(ib>>16)] ^ S1[byte(ib>>24)]
+ t1 = S1[byte(ia)] ^ S2[byte(ia>>8)] ^ S3[byte(ia>>16)] ^ S4[byte(ia>>24)] + t2
+ ic = rol(ic, 1) ^ (t1 + k[0])
+ id = ror(id^(t2+t1+k[1]), 1)
+ }
+
+ // Undo pre-whitening
+ ia ^= c.k[0]
+ ib ^= c.k[1]
+ ic ^= c.k[2]
+ id ^= c.k[3]
+
+ store32l(dst[0:4], ia)
+ store32l(dst[4:8], ib)
+ store32l(dst[8:12], ic)
+ store32l(dst[12:16], id)
+}
diff --git a/vendor/golang.org/x/crypto/xtea/block.go b/vendor/golang.org/x/crypto/xtea/block.go
new file mode 100644
index 0000000..fcb4e4d
--- /dev/null
+++ b/vendor/golang.org/x/crypto/xtea/block.go
@@ -0,0 +1,66 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+/*
+ Implementation adapted from Needham and Wheeler's paper:
+ http://www.cix.co.uk/~klockstone/xtea.pdf
+
+ A precalculated look up table is used during encryption/decryption for values that are based purely on the key.
+*/
+
+package xtea
+
+// XTEA is based on 64 rounds.
+const numRounds = 64
+
+// blockToUint32 reads an 8 byte slice into two uint32s.
+// The block is treated as big endian.
+func blockToUint32(src []byte) (uint32, uint32) {
+ r0 := uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3])
+ r1 := uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7])
+ return r0, r1
+}
+
+// uint32ToBlock writes two uint32s into an 8 byte data block.
+// Values are written as big endian.
+func uint32ToBlock(v0, v1 uint32, dst []byte) {
+ dst[0] = byte(v0 >> 24)
+ dst[1] = byte(v0 >> 16)
+ dst[2] = byte(v0 >> 8)
+ dst[3] = byte(v0)
+ dst[4] = byte(v1 >> 24)
+ dst[5] = byte(v1 >> 16)
+ dst[6] = byte(v1 >> 8)
+ dst[7] = byte(v1 >> 0)
+}
+
+// encryptBlock encrypts a single 8 byte block using XTEA.
+func encryptBlock(c *Cipher, dst, src []byte) {
+ v0, v1 := blockToUint32(src)
+
+ // Two rounds of XTEA applied per loop
+ for i := 0; i < numRounds; {
+ v0 += ((v1<<4 ^ v1>>5) + v1) ^ c.table[i]
+ i++
+ v1 += ((v0<<4 ^ v0>>5) + v0) ^ c.table[i]
+ i++
+ }
+
+ uint32ToBlock(v0, v1, dst)
+}
+
+// decryptBlock decrypts a single 8 byte block using XTEA.
+func decryptBlock(c *Cipher, dst, src []byte) {
+ v0, v1 := blockToUint32(src)
+
+ // Two rounds of XTEA applied per loop
+ for i := numRounds; i > 0; {
+ i--
+ v1 -= ((v0<<4 ^ v0>>5) + v0) ^ c.table[i]
+ i--
+ v0 -= ((v1<<4 ^ v1>>5) + v1) ^ c.table[i]
+ }
+
+ uint32ToBlock(v0, v1, dst)
+}
diff --git a/vendor/golang.org/x/crypto/xtea/cipher.go b/vendor/golang.org/x/crypto/xtea/cipher.go
new file mode 100644
index 0000000..a4c2fd0
--- /dev/null
+++ b/vendor/golang.org/x/crypto/xtea/cipher.go
@@ -0,0 +1,90 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package xtea implements XTEA encryption, as defined in Needham and Wheeler's
+// 1997 technical report, "Tea extensions."
+//
+// XTEA is a legacy cipher and its short block size makes it vulnerable to
+// birthday bound attacks (see https://sweet32.info). It should only be used
+// where compatibility with legacy systems, not security, is the goal.
+//
+// Deprecated: any new system should use AES (from crypto/aes, if necessary in
+// an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from
+// golang.org/x/crypto/chacha20poly1305).
+package xtea // import "golang.org/x/crypto/xtea"
+
+// For details, see http://www.cix.co.uk/~klockstone/xtea.pdf
+
+import "strconv"
+
+// The XTEA block size in bytes.
+const BlockSize = 8
+
+// A Cipher is an instance of an XTEA cipher using a particular key.
+type Cipher struct {
+ // table contains a series of precalculated values that are used each round.
+ table [64]uint32
+}
+
+type KeySizeError int
+
+func (k KeySizeError) Error() string {
+ return "crypto/xtea: invalid key size " + strconv.Itoa(int(k))
+}
+
+// NewCipher creates and returns a new Cipher.
+// The key argument should be the XTEA key.
+// XTEA only supports 128 bit (16 byte) keys.
+func NewCipher(key []byte) (*Cipher, error) {
+ k := len(key)
+ switch k {
+ default:
+ return nil, KeySizeError(k)
+ case 16:
+ break
+ }
+
+ c := new(Cipher)
+ initCipher(c, key)
+
+ return c, nil
+}
+
+// BlockSize returns the XTEA block size, 8 bytes.
+// It is necessary to satisfy the Block interface in the
+// package "crypto/cipher".
+func (c *Cipher) BlockSize() int { return BlockSize }
+
+// Encrypt encrypts the 8 byte buffer src using the key and stores the result in dst.
+// Note that for amounts of data larger than a block,
+// it is not safe to just call Encrypt on successive blocks;
+// instead, use an encryption mode like CBC (see crypto/cipher/cbc.go).
+func (c *Cipher) Encrypt(dst, src []byte) { encryptBlock(c, dst, src) }
+
+// Decrypt decrypts the 8 byte buffer src using the key and stores the result in dst.
+func (c *Cipher) Decrypt(dst, src []byte) { decryptBlock(c, dst, src) }
+
+// initCipher initializes the cipher context by creating a look up table
+// of precalculated values that are based on the key.
+func initCipher(c *Cipher, key []byte) {
+ // Load the key into four uint32s
+ var k [4]uint32
+ for i := 0; i < len(k); i++ {
+ j := i << 2 // Multiply by 4
+ k[i] = uint32(key[j+0])<<24 | uint32(key[j+1])<<16 | uint32(key[j+2])<<8 | uint32(key[j+3])
+ }
+
+ // Precalculate the table
+ const delta = 0x9E3779B9
+ var sum uint32
+
+ // Two rounds of XTEA applied per loop
+ for i := 0; i < numRounds; {
+ c.table[i] = sum + k[sum&3]
+ i++
+ sum += delta
+ c.table[i] = sum + k[(sum>>11)&3]
+ i++
+ }
+}
diff --git a/vendor/golang.org/x/mod/LICENSE b/vendor/golang.org/x/mod/LICENSE
new file mode 100644
index 0000000..6a66aea
--- /dev/null
+++ b/vendor/golang.org/x/mod/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2009 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/golang.org/x/mod/PATENTS b/vendor/golang.org/x/mod/PATENTS
new file mode 100644
index 0000000..7330990
--- /dev/null
+++ b/vendor/golang.org/x/mod/PATENTS
@@ -0,0 +1,22 @@
+Additional IP Rights Grant (Patents)
+
+"This implementation" means the copyrightable works distributed by
+Google as part of the Go project.
+
+Google hereby grants to You a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable (except as stated in this section)
+patent license to make, have made, use, offer to sell, sell, import,
+transfer and otherwise run, modify and propagate the contents of this
+implementation of Go, where such license applies only to those patent
+claims, both currently owned or controlled by Google and acquired in
+the future, licensable by Google that are necessarily infringed by this
+implementation of Go. This grant does not include claims that would be
+infringed only as a consequence of further modification of this
+implementation. If you or your agent or exclusive licensee institute or
+order or agree to the institution of patent litigation against any
+entity (including a cross-claim or counterclaim in a lawsuit) alleging
+that this implementation of Go or any code incorporated within this
+implementation of Go constitutes direct or contributory patent
+infringement, or inducement of patent infringement, then any patent
+rights granted to you under this License for this implementation of Go
+shall terminate as of the date such litigation is filed.
diff --git a/vendor/golang.org/x/mod/semver/semver.go b/vendor/golang.org/x/mod/semver/semver.go
new file mode 100644
index 0000000..2988e3c
--- /dev/null
+++ b/vendor/golang.org/x/mod/semver/semver.go
@@ -0,0 +1,388 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package semver implements comparison of semantic version strings.
+// In this package, semantic version strings must begin with a leading "v",
+// as in "v1.0.0".
+//
+// The general form of a semantic version string accepted by this package is
+//
+// vMAJOR[.MINOR[.PATCH[-PRERELEASE][+BUILD]]]
+//
+// where square brackets indicate optional parts of the syntax;
+// MAJOR, MINOR, and PATCH are decimal integers without extra leading zeros;
+// PRERELEASE and BUILD are each a series of non-empty dot-separated identifiers
+// using only alphanumeric characters and hyphens; and
+// all-numeric PRERELEASE identifiers must not have leading zeros.
+//
+// This package follows Semantic Versioning 2.0.0 (see semver.org)
+// with two exceptions. First, it requires the "v" prefix. Second, it recognizes
+// vMAJOR and vMAJOR.MINOR (with no prerelease or build suffixes)
+// as shorthands for vMAJOR.0.0 and vMAJOR.MINOR.0.
+package semver
+
+// parsed returns the parsed form of a semantic version string.
+type parsed struct {
+ major string
+ minor string
+ patch string
+ short string
+ prerelease string
+ build string
+ err string
+}
+
+// IsValid reports whether v is a valid semantic version string.
+func IsValid(v string) bool {
+ _, ok := parse(v)
+ return ok
+}
+
+// Canonical returns the canonical formatting of the semantic version v.
+// It fills in any missing .MINOR or .PATCH and discards build metadata.
+// Two semantic versions compare equal only if their canonical formattings
+// are identical strings.
+// The canonical invalid semantic version is the empty string.
+func Canonical(v string) string {
+ p, ok := parse(v)
+ if !ok {
+ return ""
+ }
+ if p.build != "" {
+ return v[:len(v)-len(p.build)]
+ }
+ if p.short != "" {
+ return v + p.short
+ }
+ return v
+}
+
+// Major returns the major version prefix of the semantic version v.
+// For example, Major("v2.1.0") == "v2".
+// If v is an invalid semantic version string, Major returns the empty string.
+func Major(v string) string {
+ pv, ok := parse(v)
+ if !ok {
+ return ""
+ }
+ return v[:1+len(pv.major)]
+}
+
+// MajorMinor returns the major.minor version prefix of the semantic version v.
+// For example, MajorMinor("v2.1.0") == "v2.1".
+// If v is an invalid semantic version string, MajorMinor returns the empty string.
+func MajorMinor(v string) string {
+ pv, ok := parse(v)
+ if !ok {
+ return ""
+ }
+ i := 1 + len(pv.major)
+ if j := i + 1 + len(pv.minor); j <= len(v) && v[i] == '.' && v[i+1:j] == pv.minor {
+ return v[:j]
+ }
+ return v[:i] + "." + pv.minor
+}
+
+// Prerelease returns the prerelease suffix of the semantic version v.
+// For example, Prerelease("v2.1.0-pre+meta") == "-pre".
+// If v is an invalid semantic version string, Prerelease returns the empty string.
+func Prerelease(v string) string {
+ pv, ok := parse(v)
+ if !ok {
+ return ""
+ }
+ return pv.prerelease
+}
+
+// Build returns the build suffix of the semantic version v.
+// For example, Build("v2.1.0+meta") == "+meta".
+// If v is an invalid semantic version string, Build returns the empty string.
+func Build(v string) string {
+ pv, ok := parse(v)
+ if !ok {
+ return ""
+ }
+ return pv.build
+}
+
+// Compare returns an integer comparing two versions according to
+// semantic version precedence.
+// The result will be 0 if v == w, -1 if v < w, or +1 if v > w.
+//
+// An invalid semantic version string is considered less than a valid one.
+// All invalid semantic version strings compare equal to each other.
+func Compare(v, w string) int {
+ pv, ok1 := parse(v)
+ pw, ok2 := parse(w)
+ if !ok1 && !ok2 {
+ return 0
+ }
+ if !ok1 {
+ return -1
+ }
+ if !ok2 {
+ return +1
+ }
+ if c := compareInt(pv.major, pw.major); c != 0 {
+ return c
+ }
+ if c := compareInt(pv.minor, pw.minor); c != 0 {
+ return c
+ }
+ if c := compareInt(pv.patch, pw.patch); c != 0 {
+ return c
+ }
+ return comparePrerelease(pv.prerelease, pw.prerelease)
+}
+
+// Max canonicalizes its arguments and then returns the version string
+// that compares greater.
+func Max(v, w string) string {
+ v = Canonical(v)
+ w = Canonical(w)
+ if Compare(v, w) > 0 {
+ return v
+ }
+ return w
+}
+
+func parse(v string) (p parsed, ok bool) {
+ if v == "" || v[0] != 'v' {
+ p.err = "missing v prefix"
+ return
+ }
+ p.major, v, ok = parseInt(v[1:])
+ if !ok {
+ p.err = "bad major version"
+ return
+ }
+ if v == "" {
+ p.minor = "0"
+ p.patch = "0"
+ p.short = ".0.0"
+ return
+ }
+ if v[0] != '.' {
+ p.err = "bad minor prefix"
+ ok = false
+ return
+ }
+ p.minor, v, ok = parseInt(v[1:])
+ if !ok {
+ p.err = "bad minor version"
+ return
+ }
+ if v == "" {
+ p.patch = "0"
+ p.short = ".0"
+ return
+ }
+ if v[0] != '.' {
+ p.err = "bad patch prefix"
+ ok = false
+ return
+ }
+ p.patch, v, ok = parseInt(v[1:])
+ if !ok {
+ p.err = "bad patch version"
+ return
+ }
+ if len(v) > 0 && v[0] == '-' {
+ p.prerelease, v, ok = parsePrerelease(v)
+ if !ok {
+ p.err = "bad prerelease"
+ return
+ }
+ }
+ if len(v) > 0 && v[0] == '+' {
+ p.build, v, ok = parseBuild(v)
+ if !ok {
+ p.err = "bad build"
+ return
+ }
+ }
+ if v != "" {
+ p.err = "junk on end"
+ ok = false
+ return
+ }
+ ok = true
+ return
+}
+
+func parseInt(v string) (t, rest string, ok bool) {
+ if v == "" {
+ return
+ }
+ if v[0] < '0' || '9' < v[0] {
+ return
+ }
+ i := 1
+ for i < len(v) && '0' <= v[i] && v[i] <= '9' {
+ i++
+ }
+ if v[0] == '0' && i != 1 {
+ return
+ }
+ return v[:i], v[i:], true
+}
+
+func parsePrerelease(v string) (t, rest string, ok bool) {
+ // "A pre-release version MAY be denoted by appending a hyphen and
+ // a series of dot separated identifiers immediately following the patch version.
+ // Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-].
+ // Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes."
+ if v == "" || v[0] != '-' {
+ return
+ }
+ i := 1
+ start := 1
+ for i < len(v) && v[i] != '+' {
+ if !isIdentChar(v[i]) && v[i] != '.' {
+ return
+ }
+ if v[i] == '.' {
+ if start == i || isBadNum(v[start:i]) {
+ return
+ }
+ start = i + 1
+ }
+ i++
+ }
+ if start == i || isBadNum(v[start:i]) {
+ return
+ }
+ return v[:i], v[i:], true
+}
+
+func parseBuild(v string) (t, rest string, ok bool) {
+ if v == "" || v[0] != '+' {
+ return
+ }
+ i := 1
+ start := 1
+ for i < len(v) {
+ if !isIdentChar(v[i]) && v[i] != '.' {
+ return
+ }
+ if v[i] == '.' {
+ if start == i {
+ return
+ }
+ start = i + 1
+ }
+ i++
+ }
+ if start == i {
+ return
+ }
+ return v[:i], v[i:], true
+}
+
+func isIdentChar(c byte) bool {
+ return 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9' || c == '-'
+}
+
+func isBadNum(v string) bool {
+ i := 0
+ for i < len(v) && '0' <= v[i] && v[i] <= '9' {
+ i++
+ }
+ return i == len(v) && i > 1 && v[0] == '0'
+}
+
+func isNum(v string) bool {
+ i := 0
+ for i < len(v) && '0' <= v[i] && v[i] <= '9' {
+ i++
+ }
+ return i == len(v)
+}
+
+func compareInt(x, y string) int {
+ if x == y {
+ return 0
+ }
+ if len(x) < len(y) {
+ return -1
+ }
+ if len(x) > len(y) {
+ return +1
+ }
+ if x < y {
+ return -1
+ } else {
+ return +1
+ }
+}
+
+func comparePrerelease(x, y string) int {
+ // "When major, minor, and patch are equal, a pre-release version has
+ // lower precedence than a normal version.
+ // Example: 1.0.0-alpha < 1.0.0.
+ // Precedence for two pre-release versions with the same major, minor,
+ // and patch version MUST be determined by comparing each dot separated
+ // identifier from left to right until a difference is found as follows:
+ // identifiers consisting of only digits are compared numerically and
+ // identifiers with letters or hyphens are compared lexically in ASCII
+ // sort order. Numeric identifiers always have lower precedence than
+ // non-numeric identifiers. A larger set of pre-release fields has a
+ // higher precedence than a smaller set, if all of the preceding
+ // identifiers are equal.
+ // Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta <
+ // 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0."
+ if x == y {
+ return 0
+ }
+ if x == "" {
+ return +1
+ }
+ if y == "" {
+ return -1
+ }
+ for x != "" && y != "" {
+ x = x[1:] // skip - or .
+ y = y[1:] // skip - or .
+ var dx, dy string
+ dx, x = nextIdent(x)
+ dy, y = nextIdent(y)
+ if dx != dy {
+ ix := isNum(dx)
+ iy := isNum(dy)
+ if ix != iy {
+ if ix {
+ return -1
+ } else {
+ return +1
+ }
+ }
+ if ix {
+ if len(dx) < len(dy) {
+ return -1
+ }
+ if len(dx) > len(dy) {
+ return +1
+ }
+ }
+ if dx < dy {
+ return -1
+ } else {
+ return +1
+ }
+ }
+ }
+ if x == "" {
+ return -1
+ } else {
+ return +1
+ }
+}
+
+func nextIdent(x string) (dx, rest string) {
+ i := 0
+ for i < len(x) && x[i] != '.' {
+ i++
+ }
+ return x[:i], x[i:]
+}
diff --git a/vendor/golang.org/x/net/bpf/asm.go b/vendor/golang.org/x/net/bpf/asm.go
new file mode 100644
index 0000000..15e21b1
--- /dev/null
+++ b/vendor/golang.org/x/net/bpf/asm.go
@@ -0,0 +1,41 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package bpf
+
+import "fmt"
+
+// Assemble converts insts into raw instructions suitable for loading
+// into a BPF virtual machine.
+//
+// Currently, no optimization is attempted, the assembled program flow
+// is exactly as provided.
+func Assemble(insts []Instruction) ([]RawInstruction, error) {
+ ret := make([]RawInstruction, len(insts))
+ var err error
+ for i, inst := range insts {
+ ret[i], err = inst.Assemble()
+ if err != nil {
+ return nil, fmt.Errorf("assembling instruction %d: %s", i+1, err)
+ }
+ }
+ return ret, nil
+}
+
+// Disassemble attempts to parse raw back into
+// Instructions. Unrecognized RawInstructions are assumed to be an
+// extension not implemented by this package, and are passed through
+// unchanged to the output. The allDecoded value reports whether insts
+// contains no RawInstructions.
+func Disassemble(raw []RawInstruction) (insts []Instruction, allDecoded bool) {
+ insts = make([]Instruction, len(raw))
+ allDecoded = true
+ for i, r := range raw {
+ insts[i] = r.Disassemble()
+ if _, ok := insts[i].(RawInstruction); ok {
+ allDecoded = false
+ }
+ }
+ return insts, allDecoded
+}
diff --git a/vendor/golang.org/x/net/bpf/constants.go b/vendor/golang.org/x/net/bpf/constants.go
new file mode 100644
index 0000000..12f3ee8
--- /dev/null
+++ b/vendor/golang.org/x/net/bpf/constants.go
@@ -0,0 +1,222 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package bpf
+
+// A Register is a register of the BPF virtual machine.
+type Register uint16
+
+const (
+ // RegA is the accumulator register. RegA is always the
+ // destination register of ALU operations.
+ RegA Register = iota
+ // RegX is the indirection register, used by LoadIndirect
+ // operations.
+ RegX
+)
+
+// An ALUOp is an arithmetic or logic operation.
+type ALUOp uint16
+
+// ALU binary operation types.
+const (
+ ALUOpAdd ALUOp = iota << 4
+ ALUOpSub
+ ALUOpMul
+ ALUOpDiv
+ ALUOpOr
+ ALUOpAnd
+ ALUOpShiftLeft
+ ALUOpShiftRight
+ aluOpNeg // Not exported because it's the only unary ALU operation, and gets its own instruction type.
+ ALUOpMod
+ ALUOpXor
+)
+
+// A JumpTest is a comparison operator used in conditional jumps.
+type JumpTest uint16
+
+// Supported operators for conditional jumps.
+// K can be RegX for JumpIfX
+const (
+ // K == A
+ JumpEqual JumpTest = iota
+ // K != A
+ JumpNotEqual
+ // K > A
+ JumpGreaterThan
+ // K < A
+ JumpLessThan
+ // K >= A
+ JumpGreaterOrEqual
+ // K <= A
+ JumpLessOrEqual
+ // K & A != 0
+ JumpBitsSet
+ // K & A == 0
+ JumpBitsNotSet
+)
+
+// An Extension is a function call provided by the kernel that
+// performs advanced operations that are expensive or impossible
+// within the BPF virtual machine.
+//
+// Extensions are only implemented by the Linux kernel.
+//
+// TODO: should we prune this list? Some of these extensions seem
+// either broken or near-impossible to use correctly, whereas other
+// (len, random, ifindex) are quite useful.
+type Extension int
+
+// Extension functions available in the Linux kernel.
+const (
+ // extOffset is the negative maximum number of instructions used
+ // to load instructions by overloading the K argument.
+ extOffset = -0x1000
+ // ExtLen returns the length of the packet.
+ ExtLen Extension = 1
+ // ExtProto returns the packet's L3 protocol type.
+ ExtProto Extension = 0
+ // ExtType returns the packet's type (skb->pkt_type in the kernel)
+ //
+ // TODO: better documentation. How nice an API do we want to
+ // provide for these esoteric extensions?
+ ExtType Extension = 4
+ // ExtPayloadOffset returns the offset of the packet payload, or
+ // the first protocol header that the kernel does not know how to
+ // parse.
+ ExtPayloadOffset Extension = 52
+ // ExtInterfaceIndex returns the index of the interface on which
+ // the packet was received.
+ ExtInterfaceIndex Extension = 8
+ // ExtNetlinkAttr returns the netlink attribute of type X at
+ // offset A.
+ ExtNetlinkAttr Extension = 12
+ // ExtNetlinkAttrNested returns the nested netlink attribute of
+ // type X at offset A.
+ ExtNetlinkAttrNested Extension = 16
+ // ExtMark returns the packet's mark value.
+ ExtMark Extension = 20
+ // ExtQueue returns the packet's assigned hardware queue.
+ ExtQueue Extension = 24
+ // ExtLinkLayerType returns the packet's hardware address type
+ // (e.g. Ethernet, Infiniband).
+ ExtLinkLayerType Extension = 28
+ // ExtRXHash returns the packets receive hash.
+ //
+ // TODO: figure out what this rxhash actually is.
+ ExtRXHash Extension = 32
+ // ExtCPUID returns the ID of the CPU processing the current
+ // packet.
+ ExtCPUID Extension = 36
+ // ExtVLANTag returns the packet's VLAN tag.
+ ExtVLANTag Extension = 44
+ // ExtVLANTagPresent returns non-zero if the packet has a VLAN
+ // tag.
+ //
+ // TODO: I think this might be a lie: it reads bit 0x1000 of the
+ // VLAN header, which changed meaning in recent revisions of the
+ // spec - this extension may now return meaningless information.
+ ExtVLANTagPresent Extension = 48
+ // ExtVLANProto returns 0x8100 if the frame has a VLAN header,
+ // 0x88a8 if the frame has a "Q-in-Q" double VLAN header, or some
+ // other value if no VLAN information is present.
+ ExtVLANProto Extension = 60
+ // ExtRand returns a uniformly random uint32.
+ ExtRand Extension = 56
+)
+
+// The following gives names to various bit patterns used in opcode construction.
+
+const (
+ opMaskCls uint16 = 0x7
+ // opClsLoad masks
+ opMaskLoadDest = 0x01
+ opMaskLoadWidth = 0x18
+ opMaskLoadMode = 0xe0
+ // opClsALU & opClsJump
+ opMaskOperand = 0x08
+ opMaskOperator = 0xf0
+)
+
+const (
+ // +---------------+-----------------+---+---+---+
+ // | AddrMode (3b) | LoadWidth (2b) | 0 | 0 | 0 |
+ // +---------------+-----------------+---+---+---+
+ opClsLoadA uint16 = iota
+ // +---------------+-----------------+---+---+---+
+ // | AddrMode (3b) | LoadWidth (2b) | 0 | 0 | 1 |
+ // +---------------+-----------------+---+---+---+
+ opClsLoadX
+ // +---+---+---+---+---+---+---+---+
+ // | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
+ // +---+---+---+---+---+---+---+---+
+ opClsStoreA
+ // +---+---+---+---+---+---+---+---+
+ // | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
+ // +---+---+---+---+---+---+---+---+
+ opClsStoreX
+ // +---------------+-----------------+---+---+---+
+ // | Operator (4b) | OperandSrc (1b) | 1 | 0 | 0 |
+ // +---------------+-----------------+---+---+---+
+ opClsALU
+ // +-----------------------------+---+---+---+---+
+ // | TestOperator (4b) | 0 | 1 | 0 | 1 |
+ // +-----------------------------+---+---+---+---+
+ opClsJump
+ // +---+-------------------------+---+---+---+---+
+ // | 0 | 0 | 0 | RetSrc (1b) | 0 | 1 | 1 | 0 |
+ // +---+-------------------------+---+---+---+---+
+ opClsReturn
+ // +---+-------------------------+---+---+---+---+
+ // | 0 | 0 | 0 | TXAorTAX (1b) | 0 | 1 | 1 | 1 |
+ // +---+-------------------------+---+---+---+---+
+ opClsMisc
+)
+
+const (
+ opAddrModeImmediate uint16 = iota << 5
+ opAddrModeAbsolute
+ opAddrModeIndirect
+ opAddrModeScratch
+ opAddrModePacketLen // actually an extension, not an addressing mode.
+ opAddrModeMemShift
+)
+
+const (
+ opLoadWidth4 uint16 = iota << 3
+ opLoadWidth2
+ opLoadWidth1
+)
+
+// Operand for ALU and Jump instructions
+type opOperand uint16
+
+// Supported operand sources.
+const (
+ opOperandConstant opOperand = iota << 3
+ opOperandX
+)
+
+// An jumpOp is a conditional jump condition.
+type jumpOp uint16
+
+// Supported jump conditions.
+const (
+ opJumpAlways jumpOp = iota << 4
+ opJumpEqual
+ opJumpGT
+ opJumpGE
+ opJumpSet
+)
+
+const (
+ opRetSrcConstant uint16 = iota << 4
+ opRetSrcA
+)
+
+const (
+ opMiscTAX = 0x00
+ opMiscTXA = 0x80
+)
diff --git a/vendor/golang.org/x/net/bpf/doc.go b/vendor/golang.org/x/net/bpf/doc.go
new file mode 100644
index 0000000..ae62feb
--- /dev/null
+++ b/vendor/golang.org/x/net/bpf/doc.go
@@ -0,0 +1,82 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+/*
+
+Package bpf implements marshaling and unmarshaling of programs for the
+Berkeley Packet Filter virtual machine, and provides a Go implementation
+of the virtual machine.
+
+BPF's main use is to specify a packet filter for network taps, so that
+the kernel doesn't have to expensively copy every packet it sees to
+userspace. However, it's been repurposed to other areas where running
+user code in-kernel is needed. For example, Linux's seccomp uses BPF
+to apply security policies to system calls. For simplicity, this
+documentation refers only to packets, but other uses of BPF have their
+own data payloads.
+
+BPF programs run in a restricted virtual machine. It has almost no
+access to kernel functions, and while conditional branches are
+allowed, they can only jump forwards, to guarantee that there are no
+infinite loops.
+
+The virtual machine
+
+The BPF VM is an accumulator machine. Its main register, called
+register A, is an implicit source and destination in all arithmetic
+and logic operations. The machine also has 16 scratch registers for
+temporary storage, and an indirection register (register X) for
+indirect memory access. All registers are 32 bits wide.
+
+Each run of a BPF program is given one packet, which is placed in the
+VM's read-only "main memory". LoadAbsolute and LoadIndirect
+instructions can fetch up to 32 bits at a time into register A for
+examination.
+
+The goal of a BPF program is to produce and return a verdict (uint32),
+which tells the kernel what to do with the packet. In the context of
+packet filtering, the returned value is the number of bytes of the
+packet to forward to userspace, or 0 to ignore the packet. Other
+contexts like seccomp define their own return values.
+
+In order to simplify programs, attempts to read past the end of the
+packet terminate the program execution with a verdict of 0 (ignore
+packet). This means that the vast majority of BPF programs don't need
+to do any explicit bounds checking.
+
+In addition to the bytes of the packet, some BPF programs have access
+to extensions, which are essentially calls to kernel utility
+functions. Currently, the only extensions supported by this package
+are the Linux packet filter extensions.
+
+Examples
+
+This packet filter selects all ARP packets.
+
+ bpf.Assemble([]bpf.Instruction{
+ // Load "EtherType" field from the ethernet header.
+ bpf.LoadAbsolute{Off: 12, Size: 2},
+ // Skip over the next instruction if EtherType is not ARP.
+ bpf.JumpIf{Cond: bpf.JumpNotEqual, Val: 0x0806, SkipTrue: 1},
+ // Verdict is "send up to 4k of the packet to userspace."
+ bpf.RetConstant{Val: 4096},
+ // Verdict is "ignore packet."
+ bpf.RetConstant{Val: 0},
+ })
+
+This packet filter captures a random 1% sample of traffic.
+
+ bpf.Assemble([]bpf.Instruction{
+ // Get a 32-bit random number from the Linux kernel.
+ bpf.LoadExtension{Num: bpf.ExtRand},
+ // 1% dice roll?
+ bpf.JumpIf{Cond: bpf.JumpLessThan, Val: 2^32/100, SkipFalse: 1},
+ // Capture.
+ bpf.RetConstant{Val: 4096},
+ // Ignore.
+ bpf.RetConstant{Val: 0},
+ })
+
+*/
+package bpf // import "golang.org/x/net/bpf"
diff --git a/vendor/golang.org/x/net/bpf/instructions.go b/vendor/golang.org/x/net/bpf/instructions.go
new file mode 100644
index 0000000..3cffcaa
--- /dev/null
+++ b/vendor/golang.org/x/net/bpf/instructions.go
@@ -0,0 +1,726 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package bpf
+
+import "fmt"
+
+// An Instruction is one instruction executed by the BPF virtual
+// machine.
+type Instruction interface {
+ // Assemble assembles the Instruction into a RawInstruction.
+ Assemble() (RawInstruction, error)
+}
+
+// A RawInstruction is a raw BPF virtual machine instruction.
+type RawInstruction struct {
+ // Operation to execute.
+ Op uint16
+ // For conditional jump instructions, the number of instructions
+ // to skip if the condition is true/false.
+ Jt uint8
+ Jf uint8
+ // Constant parameter. The meaning depends on the Op.
+ K uint32
+}
+
+// Assemble implements the Instruction Assemble method.
+func (ri RawInstruction) Assemble() (RawInstruction, error) { return ri, nil }
+
+// Disassemble parses ri into an Instruction and returns it. If ri is
+// not recognized by this package, ri itself is returned.
+func (ri RawInstruction) Disassemble() Instruction {
+ switch ri.Op & opMaskCls {
+ case opClsLoadA, opClsLoadX:
+ reg := Register(ri.Op & opMaskLoadDest)
+ sz := 0
+ switch ri.Op & opMaskLoadWidth {
+ case opLoadWidth4:
+ sz = 4
+ case opLoadWidth2:
+ sz = 2
+ case opLoadWidth1:
+ sz = 1
+ default:
+ return ri
+ }
+ switch ri.Op & opMaskLoadMode {
+ case opAddrModeImmediate:
+ if sz != 4 {
+ return ri
+ }
+ return LoadConstant{Dst: reg, Val: ri.K}
+ case opAddrModeScratch:
+ if sz != 4 || ri.K > 15 {
+ return ri
+ }
+ return LoadScratch{Dst: reg, N: int(ri.K)}
+ case opAddrModeAbsolute:
+ if ri.K > extOffset+0xffffffff {
+ return LoadExtension{Num: Extension(-extOffset + ri.K)}
+ }
+ return LoadAbsolute{Size: sz, Off: ri.K}
+ case opAddrModeIndirect:
+ return LoadIndirect{Size: sz, Off: ri.K}
+ case opAddrModePacketLen:
+ if sz != 4 {
+ return ri
+ }
+ return LoadExtension{Num: ExtLen}
+ case opAddrModeMemShift:
+ return LoadMemShift{Off: ri.K}
+ default:
+ return ri
+ }
+
+ case opClsStoreA:
+ if ri.Op != opClsStoreA || ri.K > 15 {
+ return ri
+ }
+ return StoreScratch{Src: RegA, N: int(ri.K)}
+
+ case opClsStoreX:
+ if ri.Op != opClsStoreX || ri.K > 15 {
+ return ri
+ }
+ return StoreScratch{Src: RegX, N: int(ri.K)}
+
+ case opClsALU:
+ switch op := ALUOp(ri.Op & opMaskOperator); op {
+ case ALUOpAdd, ALUOpSub, ALUOpMul, ALUOpDiv, ALUOpOr, ALUOpAnd, ALUOpShiftLeft, ALUOpShiftRight, ALUOpMod, ALUOpXor:
+ switch operand := opOperand(ri.Op & opMaskOperand); operand {
+ case opOperandX:
+ return ALUOpX{Op: op}
+ case opOperandConstant:
+ return ALUOpConstant{Op: op, Val: ri.K}
+ default:
+ return ri
+ }
+ case aluOpNeg:
+ return NegateA{}
+ default:
+ return ri
+ }
+
+ case opClsJump:
+ switch op := jumpOp(ri.Op & opMaskOperator); op {
+ case opJumpAlways:
+ return Jump{Skip: ri.K}
+ case opJumpEqual, opJumpGT, opJumpGE, opJumpSet:
+ cond, skipTrue, skipFalse := jumpOpToTest(op, ri.Jt, ri.Jf)
+ switch operand := opOperand(ri.Op & opMaskOperand); operand {
+ case opOperandX:
+ return JumpIfX{Cond: cond, SkipTrue: skipTrue, SkipFalse: skipFalse}
+ case opOperandConstant:
+ return JumpIf{Cond: cond, Val: ri.K, SkipTrue: skipTrue, SkipFalse: skipFalse}
+ default:
+ return ri
+ }
+ default:
+ return ri
+ }
+
+ case opClsReturn:
+ switch ri.Op {
+ case opClsReturn | opRetSrcA:
+ return RetA{}
+ case opClsReturn | opRetSrcConstant:
+ return RetConstant{Val: ri.K}
+ default:
+ return ri
+ }
+
+ case opClsMisc:
+ switch ri.Op {
+ case opClsMisc | opMiscTAX:
+ return TAX{}
+ case opClsMisc | opMiscTXA:
+ return TXA{}
+ default:
+ return ri
+ }
+
+ default:
+ panic("unreachable") // switch is exhaustive on the bit pattern
+ }
+}
+
+func jumpOpToTest(op jumpOp, skipTrue uint8, skipFalse uint8) (JumpTest, uint8, uint8) {
+ var test JumpTest
+
+ // Decode "fake" jump conditions that don't appear in machine code
+ // Ensures the Assemble -> Disassemble stage recreates the same instructions
+ // See https://github.com/golang/go/issues/18470
+ if skipTrue == 0 {
+ switch op {
+ case opJumpEqual:
+ test = JumpNotEqual
+ case opJumpGT:
+ test = JumpLessOrEqual
+ case opJumpGE:
+ test = JumpLessThan
+ case opJumpSet:
+ test = JumpBitsNotSet
+ }
+
+ return test, skipFalse, 0
+ }
+
+ switch op {
+ case opJumpEqual:
+ test = JumpEqual
+ case opJumpGT:
+ test = JumpGreaterThan
+ case opJumpGE:
+ test = JumpGreaterOrEqual
+ case opJumpSet:
+ test = JumpBitsSet
+ }
+
+ return test, skipTrue, skipFalse
+}
+
+// LoadConstant loads Val into register Dst.
+type LoadConstant struct {
+ Dst Register
+ Val uint32
+}
+
+// Assemble implements the Instruction Assemble method.
+func (a LoadConstant) Assemble() (RawInstruction, error) {
+ return assembleLoad(a.Dst, 4, opAddrModeImmediate, a.Val)
+}
+
+// String returns the instruction in assembler notation.
+func (a LoadConstant) String() string {
+ switch a.Dst {
+ case RegA:
+ return fmt.Sprintf("ld #%d", a.Val)
+ case RegX:
+ return fmt.Sprintf("ldx #%d", a.Val)
+ default:
+ return fmt.Sprintf("unknown instruction: %#v", a)
+ }
+}
+
+// LoadScratch loads scratch[N] into register Dst.
+type LoadScratch struct {
+ Dst Register
+ N int // 0-15
+}
+
+// Assemble implements the Instruction Assemble method.
+func (a LoadScratch) Assemble() (RawInstruction, error) {
+ if a.N < 0 || a.N > 15 {
+ return RawInstruction{}, fmt.Errorf("invalid scratch slot %d", a.N)
+ }
+ return assembleLoad(a.Dst, 4, opAddrModeScratch, uint32(a.N))
+}
+
+// String returns the instruction in assembler notation.
+func (a LoadScratch) String() string {
+ switch a.Dst {
+ case RegA:
+ return fmt.Sprintf("ld M[%d]", a.N)
+ case RegX:
+ return fmt.Sprintf("ldx M[%d]", a.N)
+ default:
+ return fmt.Sprintf("unknown instruction: %#v", a)
+ }
+}
+
+// LoadAbsolute loads packet[Off:Off+Size] as an integer value into
+// register A.
+type LoadAbsolute struct {
+ Off uint32
+ Size int // 1, 2 or 4
+}
+
+// Assemble implements the Instruction Assemble method.
+func (a LoadAbsolute) Assemble() (RawInstruction, error) {
+ return assembleLoad(RegA, a.Size, opAddrModeAbsolute, a.Off)
+}
+
+// String returns the instruction in assembler notation.
+func (a LoadAbsolute) String() string {
+ switch a.Size {
+ case 1: // byte
+ return fmt.Sprintf("ldb [%d]", a.Off)
+ case 2: // half word
+ return fmt.Sprintf("ldh [%d]", a.Off)
+ case 4: // word
+ if a.Off > extOffset+0xffffffff {
+ return LoadExtension{Num: Extension(a.Off + 0x1000)}.String()
+ }
+ return fmt.Sprintf("ld [%d]", a.Off)
+ default:
+ return fmt.Sprintf("unknown instruction: %#v", a)
+ }
+}
+
+// LoadIndirect loads packet[X+Off:X+Off+Size] as an integer value
+// into register A.
+type LoadIndirect struct {
+ Off uint32
+ Size int // 1, 2 or 4
+}
+
+// Assemble implements the Instruction Assemble method.
+func (a LoadIndirect) Assemble() (RawInstruction, error) {
+ return assembleLoad(RegA, a.Size, opAddrModeIndirect, a.Off)
+}
+
+// String returns the instruction in assembler notation.
+func (a LoadIndirect) String() string {
+ switch a.Size {
+ case 1: // byte
+ return fmt.Sprintf("ldb [x + %d]", a.Off)
+ case 2: // half word
+ return fmt.Sprintf("ldh [x + %d]", a.Off)
+ case 4: // word
+ return fmt.Sprintf("ld [x + %d]", a.Off)
+ default:
+ return fmt.Sprintf("unknown instruction: %#v", a)
+ }
+}
+
+// LoadMemShift multiplies the first 4 bits of the byte at packet[Off]
+// by 4 and stores the result in register X.
+//
+// This instruction is mainly useful to load into X the length of an
+// IPv4 packet header in a single instruction, rather than have to do
+// the arithmetic on the header's first byte by hand.
+type LoadMemShift struct {
+ Off uint32
+}
+
+// Assemble implements the Instruction Assemble method.
+func (a LoadMemShift) Assemble() (RawInstruction, error) {
+ return assembleLoad(RegX, 1, opAddrModeMemShift, a.Off)
+}
+
+// String returns the instruction in assembler notation.
+func (a LoadMemShift) String() string {
+ return fmt.Sprintf("ldx 4*([%d]&0xf)", a.Off)
+}
+
+// LoadExtension invokes a linux-specific extension and stores the
+// result in register A.
+type LoadExtension struct {
+ Num Extension
+}
+
+// Assemble implements the Instruction Assemble method.
+func (a LoadExtension) Assemble() (RawInstruction, error) {
+ if a.Num == ExtLen {
+ return assembleLoad(RegA, 4, opAddrModePacketLen, 0)
+ }
+ return assembleLoad(RegA, 4, opAddrModeAbsolute, uint32(extOffset+a.Num))
+}
+
+// String returns the instruction in assembler notation.
+func (a LoadExtension) String() string {
+ switch a.Num {
+ case ExtLen:
+ return "ld #len"
+ case ExtProto:
+ return "ld #proto"
+ case ExtType:
+ return "ld #type"
+ case ExtPayloadOffset:
+ return "ld #poff"
+ case ExtInterfaceIndex:
+ return "ld #ifidx"
+ case ExtNetlinkAttr:
+ return "ld #nla"
+ case ExtNetlinkAttrNested:
+ return "ld #nlan"
+ case ExtMark:
+ return "ld #mark"
+ case ExtQueue:
+ return "ld #queue"
+ case ExtLinkLayerType:
+ return "ld #hatype"
+ case ExtRXHash:
+ return "ld #rxhash"
+ case ExtCPUID:
+ return "ld #cpu"
+ case ExtVLANTag:
+ return "ld #vlan_tci"
+ case ExtVLANTagPresent:
+ return "ld #vlan_avail"
+ case ExtVLANProto:
+ return "ld #vlan_tpid"
+ case ExtRand:
+ return "ld #rand"
+ default:
+ return fmt.Sprintf("unknown instruction: %#v", a)
+ }
+}
+
+// StoreScratch stores register Src into scratch[N].
+type StoreScratch struct {
+ Src Register
+ N int // 0-15
+}
+
+// Assemble implements the Instruction Assemble method.
+func (a StoreScratch) Assemble() (RawInstruction, error) {
+ if a.N < 0 || a.N > 15 {
+ return RawInstruction{}, fmt.Errorf("invalid scratch slot %d", a.N)
+ }
+ var op uint16
+ switch a.Src {
+ case RegA:
+ op = opClsStoreA
+ case RegX:
+ op = opClsStoreX
+ default:
+ return RawInstruction{}, fmt.Errorf("invalid source register %v", a.Src)
+ }
+
+ return RawInstruction{
+ Op: op,
+ K: uint32(a.N),
+ }, nil
+}
+
+// String returns the instruction in assembler notation.
+func (a StoreScratch) String() string {
+ switch a.Src {
+ case RegA:
+ return fmt.Sprintf("st M[%d]", a.N)
+ case RegX:
+ return fmt.Sprintf("stx M[%d]", a.N)
+ default:
+ return fmt.Sprintf("unknown instruction: %#v", a)
+ }
+}
+
+// ALUOpConstant executes A = A <Op> Val.
+type ALUOpConstant struct {
+ Op ALUOp
+ Val uint32
+}
+
+// Assemble implements the Instruction Assemble method.
+func (a ALUOpConstant) Assemble() (RawInstruction, error) {
+ return RawInstruction{
+ Op: opClsALU | uint16(opOperandConstant) | uint16(a.Op),
+ K: a.Val,
+ }, nil
+}
+
+// String returns the instruction in assembler notation.
+func (a ALUOpConstant) String() string {
+ switch a.Op {
+ case ALUOpAdd:
+ return fmt.Sprintf("add #%d", a.Val)
+ case ALUOpSub:
+ return fmt.Sprintf("sub #%d", a.Val)
+ case ALUOpMul:
+ return fmt.Sprintf("mul #%d", a.Val)
+ case ALUOpDiv:
+ return fmt.Sprintf("div #%d", a.Val)
+ case ALUOpMod:
+ return fmt.Sprintf("mod #%d", a.Val)
+ case ALUOpAnd:
+ return fmt.Sprintf("and #%d", a.Val)
+ case ALUOpOr:
+ return fmt.Sprintf("or #%d", a.Val)
+ case ALUOpXor:
+ return fmt.Sprintf("xor #%d", a.Val)
+ case ALUOpShiftLeft:
+ return fmt.Sprintf("lsh #%d", a.Val)
+ case ALUOpShiftRight:
+ return fmt.Sprintf("rsh #%d", a.Val)
+ default:
+ return fmt.Sprintf("unknown instruction: %#v", a)
+ }
+}
+
+// ALUOpX executes A = A <Op> X
+type ALUOpX struct {
+ Op ALUOp
+}
+
+// Assemble implements the Instruction Assemble method.
+func (a ALUOpX) Assemble() (RawInstruction, error) {
+ return RawInstruction{
+ Op: opClsALU | uint16(opOperandX) | uint16(a.Op),
+ }, nil
+}
+
+// String returns the instruction in assembler notation.
+func (a ALUOpX) String() string {
+ switch a.Op {
+ case ALUOpAdd:
+ return "add x"
+ case ALUOpSub:
+ return "sub x"
+ case ALUOpMul:
+ return "mul x"
+ case ALUOpDiv:
+ return "div x"
+ case ALUOpMod:
+ return "mod x"
+ case ALUOpAnd:
+ return "and x"
+ case ALUOpOr:
+ return "or x"
+ case ALUOpXor:
+ return "xor x"
+ case ALUOpShiftLeft:
+ return "lsh x"
+ case ALUOpShiftRight:
+ return "rsh x"
+ default:
+ return fmt.Sprintf("unknown instruction: %#v", a)
+ }
+}
+
+// NegateA executes A = -A.
+type NegateA struct{}
+
+// Assemble implements the Instruction Assemble method.
+func (a NegateA) Assemble() (RawInstruction, error) {
+ return RawInstruction{
+ Op: opClsALU | uint16(aluOpNeg),
+ }, nil
+}
+
+// String returns the instruction in assembler notation.
+func (a NegateA) String() string {
+ return fmt.Sprintf("neg")
+}
+
+// Jump skips the following Skip instructions in the program.
+type Jump struct {
+ Skip uint32
+}
+
+// Assemble implements the Instruction Assemble method.
+func (a Jump) Assemble() (RawInstruction, error) {
+ return RawInstruction{
+ Op: opClsJump | uint16(opJumpAlways),
+ K: a.Skip,
+ }, nil
+}
+
+// String returns the instruction in assembler notation.
+func (a Jump) String() string {
+ return fmt.Sprintf("ja %d", a.Skip)
+}
+
+// JumpIf skips the following Skip instructions in the program if A
+// <Cond> Val is true.
+type JumpIf struct {
+ Cond JumpTest
+ Val uint32
+ SkipTrue uint8
+ SkipFalse uint8
+}
+
+// Assemble implements the Instruction Assemble method.
+func (a JumpIf) Assemble() (RawInstruction, error) {
+ return jumpToRaw(a.Cond, opOperandConstant, a.Val, a.SkipTrue, a.SkipFalse)
+}
+
+// String returns the instruction in assembler notation.
+func (a JumpIf) String() string {
+ return jumpToString(a.Cond, fmt.Sprintf("#%d", a.Val), a.SkipTrue, a.SkipFalse)
+}
+
+// JumpIfX skips the following Skip instructions in the program if A
+// <Cond> X is true.
+type JumpIfX struct {
+ Cond JumpTest
+ SkipTrue uint8
+ SkipFalse uint8
+}
+
+// Assemble implements the Instruction Assemble method.
+func (a JumpIfX) Assemble() (RawInstruction, error) {
+ return jumpToRaw(a.Cond, opOperandX, 0, a.SkipTrue, a.SkipFalse)
+}
+
+// String returns the instruction in assembler notation.
+func (a JumpIfX) String() string {
+ return jumpToString(a.Cond, "x", a.SkipTrue, a.SkipFalse)
+}
+
+// jumpToRaw assembles a jump instruction into a RawInstruction
+func jumpToRaw(test JumpTest, operand opOperand, k uint32, skipTrue, skipFalse uint8) (RawInstruction, error) {
+ var (
+ cond jumpOp
+ flip bool
+ )
+ switch test {
+ case JumpEqual:
+ cond = opJumpEqual
+ case JumpNotEqual:
+ cond, flip = opJumpEqual, true
+ case JumpGreaterThan:
+ cond = opJumpGT
+ case JumpLessThan:
+ cond, flip = opJumpGE, true
+ case JumpGreaterOrEqual:
+ cond = opJumpGE
+ case JumpLessOrEqual:
+ cond, flip = opJumpGT, true
+ case JumpBitsSet:
+ cond = opJumpSet
+ case JumpBitsNotSet:
+ cond, flip = opJumpSet, true
+ default:
+ return RawInstruction{}, fmt.Errorf("unknown JumpTest %v", test)
+ }
+ jt, jf := skipTrue, skipFalse
+ if flip {
+ jt, jf = jf, jt
+ }
+ return RawInstruction{
+ Op: opClsJump | uint16(cond) | uint16(operand),
+ Jt: jt,
+ Jf: jf,
+ K: k,
+ }, nil
+}
+
+// jumpToString converts a jump instruction to assembler notation
+func jumpToString(cond JumpTest, operand string, skipTrue, skipFalse uint8) string {
+ switch cond {
+ // K == A
+ case JumpEqual:
+ return conditionalJump(operand, skipTrue, skipFalse, "jeq", "jneq")
+ // K != A
+ case JumpNotEqual:
+ return fmt.Sprintf("jneq %s,%d", operand, skipTrue)
+ // K > A
+ case JumpGreaterThan:
+ return conditionalJump(operand, skipTrue, skipFalse, "jgt", "jle")
+ // K < A
+ case JumpLessThan:
+ return fmt.Sprintf("jlt %s,%d", operand, skipTrue)
+ // K >= A
+ case JumpGreaterOrEqual:
+ return conditionalJump(operand, skipTrue, skipFalse, "jge", "jlt")
+ // K <= A
+ case JumpLessOrEqual:
+ return fmt.Sprintf("jle %s,%d", operand, skipTrue)
+ // K & A != 0
+ case JumpBitsSet:
+ if skipFalse > 0 {
+ return fmt.Sprintf("jset %s,%d,%d", operand, skipTrue, skipFalse)
+ }
+ return fmt.Sprintf("jset %s,%d", operand, skipTrue)
+ // K & A == 0, there is no assembler instruction for JumpBitNotSet, use JumpBitSet and invert skips
+ case JumpBitsNotSet:
+ return jumpToString(JumpBitsSet, operand, skipFalse, skipTrue)
+ default:
+ return fmt.Sprintf("unknown JumpTest %#v", cond)
+ }
+}
+
+func conditionalJump(operand string, skipTrue, skipFalse uint8, positiveJump, negativeJump string) string {
+ if skipTrue > 0 {
+ if skipFalse > 0 {
+ return fmt.Sprintf("%s %s,%d,%d", positiveJump, operand, skipTrue, skipFalse)
+ }
+ return fmt.Sprintf("%s %s,%d", positiveJump, operand, skipTrue)
+ }
+ return fmt.Sprintf("%s %s,%d", negativeJump, operand, skipFalse)
+}
+
+// RetA exits the BPF program, returning the value of register A.
+type RetA struct{}
+
+// Assemble implements the Instruction Assemble method.
+func (a RetA) Assemble() (RawInstruction, error) {
+ return RawInstruction{
+ Op: opClsReturn | opRetSrcA,
+ }, nil
+}
+
+// String returns the instruction in assembler notation.
+func (a RetA) String() string {
+ return fmt.Sprintf("ret a")
+}
+
+// RetConstant exits the BPF program, returning a constant value.
+type RetConstant struct {
+ Val uint32
+}
+
+// Assemble implements the Instruction Assemble method.
+func (a RetConstant) Assemble() (RawInstruction, error) {
+ return RawInstruction{
+ Op: opClsReturn | opRetSrcConstant,
+ K: a.Val,
+ }, nil
+}
+
+// String returns the instruction in assembler notation.
+func (a RetConstant) String() string {
+ return fmt.Sprintf("ret #%d", a.Val)
+}
+
+// TXA copies the value of register X to register A.
+type TXA struct{}
+
+// Assemble implements the Instruction Assemble method.
+func (a TXA) Assemble() (RawInstruction, error) {
+ return RawInstruction{
+ Op: opClsMisc | opMiscTXA,
+ }, nil
+}
+
+// String returns the instruction in assembler notation.
+func (a TXA) String() string {
+ return fmt.Sprintf("txa")
+}
+
+// TAX copies the value of register A to register X.
+type TAX struct{}
+
+// Assemble implements the Instruction Assemble method.
+func (a TAX) Assemble() (RawInstruction, error) {
+ return RawInstruction{
+ Op: opClsMisc | opMiscTAX,
+ }, nil
+}
+
+// String returns the instruction in assembler notation.
+func (a TAX) String() string {
+ return fmt.Sprintf("tax")
+}
+
+func assembleLoad(dst Register, loadSize int, mode uint16, k uint32) (RawInstruction, error) {
+ var (
+ cls uint16
+ sz uint16
+ )
+ switch dst {
+ case RegA:
+ cls = opClsLoadA
+ case RegX:
+ cls = opClsLoadX
+ default:
+ return RawInstruction{}, fmt.Errorf("invalid target register %v", dst)
+ }
+ switch loadSize {
+ case 1:
+ sz = opLoadWidth1
+ case 2:
+ sz = opLoadWidth2
+ case 4:
+ sz = opLoadWidth4
+ default:
+ return RawInstruction{}, fmt.Errorf("invalid load byte length %d", sz)
+ }
+ return RawInstruction{
+ Op: cls | sz | mode,
+ K: k,
+ }, nil
+}
diff --git a/vendor/golang.org/x/net/bpf/setter.go b/vendor/golang.org/x/net/bpf/setter.go
new file mode 100644
index 0000000..43e35f0
--- /dev/null
+++ b/vendor/golang.org/x/net/bpf/setter.go
@@ -0,0 +1,10 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package bpf
+
+// A Setter is a type which can attach a compiled BPF filter to itself.
+type Setter interface {
+ SetBPF(filter []RawInstruction) error
+}
diff --git a/vendor/golang.org/x/net/bpf/vm.go b/vendor/golang.org/x/net/bpf/vm.go
new file mode 100644
index 0000000..73f57f1
--- /dev/null
+++ b/vendor/golang.org/x/net/bpf/vm.go
@@ -0,0 +1,150 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package bpf
+
+import (
+ "errors"
+ "fmt"
+)
+
+// A VM is an emulated BPF virtual machine.
+type VM struct {
+ filter []Instruction
+}
+
+// NewVM returns a new VM using the input BPF program.
+func NewVM(filter []Instruction) (*VM, error) {
+ if len(filter) == 0 {
+ return nil, errors.New("one or more Instructions must be specified")
+ }
+
+ for i, ins := range filter {
+ check := len(filter) - (i + 1)
+ switch ins := ins.(type) {
+ // Check for out-of-bounds jumps in instructions
+ case Jump:
+ if check <= int(ins.Skip) {
+ return nil, fmt.Errorf("cannot jump %d instructions; jumping past program bounds", ins.Skip)
+ }
+ case JumpIf:
+ if check <= int(ins.SkipTrue) {
+ return nil, fmt.Errorf("cannot jump %d instructions in true case; jumping past program bounds", ins.SkipTrue)
+ }
+ if check <= int(ins.SkipFalse) {
+ return nil, fmt.Errorf("cannot jump %d instructions in false case; jumping past program bounds", ins.SkipFalse)
+ }
+ case JumpIfX:
+ if check <= int(ins.SkipTrue) {
+ return nil, fmt.Errorf("cannot jump %d instructions in true case; jumping past program bounds", ins.SkipTrue)
+ }
+ if check <= int(ins.SkipFalse) {
+ return nil, fmt.Errorf("cannot jump %d instructions in false case; jumping past program bounds", ins.SkipFalse)
+ }
+ // Check for division or modulus by zero
+ case ALUOpConstant:
+ if ins.Val != 0 {
+ break
+ }
+
+ switch ins.Op {
+ case ALUOpDiv, ALUOpMod:
+ return nil, errors.New("cannot divide by zero using ALUOpConstant")
+ }
+ // Check for unknown extensions
+ case LoadExtension:
+ switch ins.Num {
+ case ExtLen:
+ default:
+ return nil, fmt.Errorf("extension %d not implemented", ins.Num)
+ }
+ }
+ }
+
+ // Make sure last instruction is a return instruction
+ switch filter[len(filter)-1].(type) {
+ case RetA, RetConstant:
+ default:
+ return nil, errors.New("BPF program must end with RetA or RetConstant")
+ }
+
+ // Though our VM works using disassembled instructions, we
+ // attempt to assemble the input filter anyway to ensure it is compatible
+ // with an operating system VM.
+ _, err := Assemble(filter)
+
+ return &VM{
+ filter: filter,
+ }, err
+}
+
+// Run runs the VM's BPF program against the input bytes.
+// Run returns the number of bytes accepted by the BPF program, and any errors
+// which occurred while processing the program.
+func (v *VM) Run(in []byte) (int, error) {
+ var (
+ // Registers of the virtual machine
+ regA uint32
+ regX uint32
+ regScratch [16]uint32
+
+ // OK is true if the program should continue processing the next
+ // instruction, or false if not, causing the loop to break
+ ok = true
+ )
+
+ // TODO(mdlayher): implement:
+ // - NegateA:
+ // - would require a change from uint32 registers to int32
+ // registers
+
+ // TODO(mdlayher): add interop tests that check signedness of ALU
+ // operations against kernel implementation, and make sure Go
+ // implementation matches behavior
+
+ for i := 0; i < len(v.filter) && ok; i++ {
+ ins := v.filter[i]
+
+ switch ins := ins.(type) {
+ case ALUOpConstant:
+ regA = aluOpConstant(ins, regA)
+ case ALUOpX:
+ regA, ok = aluOpX(ins, regA, regX)
+ case Jump:
+ i += int(ins.Skip)
+ case JumpIf:
+ jump := jumpIf(ins, regA)
+ i += jump
+ case JumpIfX:
+ jump := jumpIfX(ins, regA, regX)
+ i += jump
+ case LoadAbsolute:
+ regA, ok = loadAbsolute(ins, in)
+ case LoadConstant:
+ regA, regX = loadConstant(ins, regA, regX)
+ case LoadExtension:
+ regA = loadExtension(ins, in)
+ case LoadIndirect:
+ regA, ok = loadIndirect(ins, in, regX)
+ case LoadMemShift:
+ regX, ok = loadMemShift(ins, in)
+ case LoadScratch:
+ regA, regX = loadScratch(ins, regScratch, regA, regX)
+ case RetA:
+ return int(regA), nil
+ case RetConstant:
+ return int(ins.Val), nil
+ case StoreScratch:
+ regScratch = storeScratch(ins, regScratch, regA, regX)
+ case TAX:
+ regX = regA
+ case TXA:
+ regA = regX
+ default:
+ return 0, fmt.Errorf("unknown Instruction at index %d: %T", i, ins)
+ }
+ }
+
+ return 0, nil
+}
diff --git a/vendor/golang.org/x/net/bpf/vm_instructions.go b/vendor/golang.org/x/net/bpf/vm_instructions.go
new file mode 100644
index 0000000..cf8947c
--- /dev/null
+++ b/vendor/golang.org/x/net/bpf/vm_instructions.go
@@ -0,0 +1,182 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package bpf
+
+import (
+ "encoding/binary"
+ "fmt"
+)
+
+func aluOpConstant(ins ALUOpConstant, regA uint32) uint32 {
+ return aluOpCommon(ins.Op, regA, ins.Val)
+}
+
+func aluOpX(ins ALUOpX, regA uint32, regX uint32) (uint32, bool) {
+ // Guard against division or modulus by zero by terminating
+ // the program, as the OS BPF VM does
+ if regX == 0 {
+ switch ins.Op {
+ case ALUOpDiv, ALUOpMod:
+ return 0, false
+ }
+ }
+
+ return aluOpCommon(ins.Op, regA, regX), true
+}
+
+func aluOpCommon(op ALUOp, regA uint32, value uint32) uint32 {
+ switch op {
+ case ALUOpAdd:
+ return regA + value
+ case ALUOpSub:
+ return regA - value
+ case ALUOpMul:
+ return regA * value
+ case ALUOpDiv:
+ // Division by zero not permitted by NewVM and aluOpX checks
+ return regA / value
+ case ALUOpOr:
+ return regA | value
+ case ALUOpAnd:
+ return regA & value
+ case ALUOpShiftLeft:
+ return regA << value
+ case ALUOpShiftRight:
+ return regA >> value
+ case ALUOpMod:
+ // Modulus by zero not permitted by NewVM and aluOpX checks
+ return regA % value
+ case ALUOpXor:
+ return regA ^ value
+ default:
+ return regA
+ }
+}
+
+func jumpIf(ins JumpIf, regA uint32) int {
+ return jumpIfCommon(ins.Cond, ins.SkipTrue, ins.SkipFalse, regA, ins.Val)
+}
+
+func jumpIfX(ins JumpIfX, regA uint32, regX uint32) int {
+ return jumpIfCommon(ins.Cond, ins.SkipTrue, ins.SkipFalse, regA, regX)
+}
+
+func jumpIfCommon(cond JumpTest, skipTrue, skipFalse uint8, regA uint32, value uint32) int {
+ var ok bool
+
+ switch cond {
+ case JumpEqual:
+ ok = regA == value
+ case JumpNotEqual:
+ ok = regA != value
+ case JumpGreaterThan:
+ ok = regA > value
+ case JumpLessThan:
+ ok = regA < value
+ case JumpGreaterOrEqual:
+ ok = regA >= value
+ case JumpLessOrEqual:
+ ok = regA <= value
+ case JumpBitsSet:
+ ok = (regA & value) != 0
+ case JumpBitsNotSet:
+ ok = (regA & value) == 0
+ }
+
+ if ok {
+ return int(skipTrue)
+ }
+
+ return int(skipFalse)
+}
+
+func loadAbsolute(ins LoadAbsolute, in []byte) (uint32, bool) {
+ offset := int(ins.Off)
+ size := int(ins.Size)
+
+ return loadCommon(in, offset, size)
+}
+
+func loadConstant(ins LoadConstant, regA uint32, regX uint32) (uint32, uint32) {
+ switch ins.Dst {
+ case RegA:
+ regA = ins.Val
+ case RegX:
+ regX = ins.Val
+ }
+
+ return regA, regX
+}
+
+func loadExtension(ins LoadExtension, in []byte) uint32 {
+ switch ins.Num {
+ case ExtLen:
+ return uint32(len(in))
+ default:
+ panic(fmt.Sprintf("unimplemented extension: %d", ins.Num))
+ }
+}
+
+func loadIndirect(ins LoadIndirect, in []byte, regX uint32) (uint32, bool) {
+ offset := int(ins.Off) + int(regX)
+ size := int(ins.Size)
+
+ return loadCommon(in, offset, size)
+}
+
+func loadMemShift(ins LoadMemShift, in []byte) (uint32, bool) {
+ offset := int(ins.Off)
+
+ // Size of LoadMemShift is always 1 byte
+ if !inBounds(len(in), offset, 1) {
+ return 0, false
+ }
+
+ // Mask off high 4 bits and multiply low 4 bits by 4
+ return uint32(in[offset]&0x0f) * 4, true
+}
+
+func inBounds(inLen int, offset int, size int) bool {
+ return offset+size <= inLen
+}
+
+func loadCommon(in []byte, offset int, size int) (uint32, bool) {
+ if !inBounds(len(in), offset, size) {
+ return 0, false
+ }
+
+ switch size {
+ case 1:
+ return uint32(in[offset]), true
+ case 2:
+ return uint32(binary.BigEndian.Uint16(in[offset : offset+size])), true
+ case 4:
+ return uint32(binary.BigEndian.Uint32(in[offset : offset+size])), true
+ default:
+ panic(fmt.Sprintf("invalid load size: %d", size))
+ }
+}
+
+func loadScratch(ins LoadScratch, regScratch [16]uint32, regA uint32, regX uint32) (uint32, uint32) {
+ switch ins.Dst {
+ case RegA:
+ regA = regScratch[ins.N]
+ case RegX:
+ regX = regScratch[ins.N]
+ }
+
+ return regA, regX
+}
+
+func storeScratch(ins StoreScratch, regScratch [16]uint32, regA uint32, regX uint32) [16]uint32 {
+ switch ins.Src {
+ case RegA:
+ regScratch[ins.N] = regA
+ case RegX:
+ regScratch[ins.N] = regX
+ }
+
+ return regScratch
+}
diff --git a/vendor/golang.org/x/net/dns/dnsmessage/message.go b/vendor/golang.org/x/net/dns/dnsmessage/message.go
new file mode 100644
index 0000000..1736fc5
--- /dev/null
+++ b/vendor/golang.org/x/net/dns/dnsmessage/message.go
@@ -0,0 +1,2664 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package dnsmessage provides a mostly RFC 1035 compliant implementation of
+// DNS message packing and unpacking.
+//
+// The package also supports messages with Extension Mechanisms for DNS
+// (EDNS(0)) as defined in RFC 6891.
+//
+// This implementation is designed to minimize heap allocations and avoid
+// unnecessary packing and unpacking as much as possible.
+package dnsmessage
+
+import (
+ "errors"
+)
+
+// Message formats
+
+// A Type is a type of DNS request and response.
+type Type uint16
+
+const (
+ // ResourceHeader.Type and Question.Type
+ TypeA Type = 1
+ TypeNS Type = 2
+ TypeCNAME Type = 5
+ TypeSOA Type = 6
+ TypePTR Type = 12
+ TypeMX Type = 15
+ TypeTXT Type = 16
+ TypeAAAA Type = 28
+ TypeSRV Type = 33
+ TypeOPT Type = 41
+
+ // Question.Type
+ TypeWKS Type = 11
+ TypeHINFO Type = 13
+ TypeMINFO Type = 14
+ TypeAXFR Type = 252
+ TypeALL Type = 255
+)
+
+var typeNames = map[Type]string{
+ TypeA: "TypeA",
+ TypeNS: "TypeNS",
+ TypeCNAME: "TypeCNAME",
+ TypeSOA: "TypeSOA",
+ TypePTR: "TypePTR",
+ TypeMX: "TypeMX",
+ TypeTXT: "TypeTXT",
+ TypeAAAA: "TypeAAAA",
+ TypeSRV: "TypeSRV",
+ TypeOPT: "TypeOPT",
+ TypeWKS: "TypeWKS",
+ TypeHINFO: "TypeHINFO",
+ TypeMINFO: "TypeMINFO",
+ TypeAXFR: "TypeAXFR",
+ TypeALL: "TypeALL",
+}
+
+// String implements fmt.Stringer.String.
+func (t Type) String() string {
+ if n, ok := typeNames[t]; ok {
+ return n
+ }
+ return printUint16(uint16(t))
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (t Type) GoString() string {
+ if n, ok := typeNames[t]; ok {
+ return "dnsmessage." + n
+ }
+ return printUint16(uint16(t))
+}
+
+// A Class is a type of network.
+type Class uint16
+
+const (
+ // ResourceHeader.Class and Question.Class
+ ClassINET Class = 1
+ ClassCSNET Class = 2
+ ClassCHAOS Class = 3
+ ClassHESIOD Class = 4
+
+ // Question.Class
+ ClassANY Class = 255
+)
+
+var classNames = map[Class]string{
+ ClassINET: "ClassINET",
+ ClassCSNET: "ClassCSNET",
+ ClassCHAOS: "ClassCHAOS",
+ ClassHESIOD: "ClassHESIOD",
+ ClassANY: "ClassANY",
+}
+
+// String implements fmt.Stringer.String.
+func (c Class) String() string {
+ if n, ok := classNames[c]; ok {
+ return n
+ }
+ return printUint16(uint16(c))
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (c Class) GoString() string {
+ if n, ok := classNames[c]; ok {
+ return "dnsmessage." + n
+ }
+ return printUint16(uint16(c))
+}
+
+// An OpCode is a DNS operation code.
+type OpCode uint16
+
+// GoString implements fmt.GoStringer.GoString.
+func (o OpCode) GoString() string {
+ return printUint16(uint16(o))
+}
+
+// An RCode is a DNS response status code.
+type RCode uint16
+
+const (
+ // Message.Rcode
+ RCodeSuccess RCode = 0
+ RCodeFormatError RCode = 1
+ RCodeServerFailure RCode = 2
+ RCodeNameError RCode = 3
+ RCodeNotImplemented RCode = 4
+ RCodeRefused RCode = 5
+)
+
+var rCodeNames = map[RCode]string{
+ RCodeSuccess: "RCodeSuccess",
+ RCodeFormatError: "RCodeFormatError",
+ RCodeServerFailure: "RCodeServerFailure",
+ RCodeNameError: "RCodeNameError",
+ RCodeNotImplemented: "RCodeNotImplemented",
+ RCodeRefused: "RCodeRefused",
+}
+
+// String implements fmt.Stringer.String.
+func (r RCode) String() string {
+ if n, ok := rCodeNames[r]; ok {
+ return n
+ }
+ return printUint16(uint16(r))
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (r RCode) GoString() string {
+ if n, ok := rCodeNames[r]; ok {
+ return "dnsmessage." + n
+ }
+ return printUint16(uint16(r))
+}
+
+func printPaddedUint8(i uint8) string {
+ b := byte(i)
+ return string([]byte{
+ b/100 + '0',
+ b/10%10 + '0',
+ b%10 + '0',
+ })
+}
+
+func printUint8Bytes(buf []byte, i uint8) []byte {
+ b := byte(i)
+ if i >= 100 {
+ buf = append(buf, b/100+'0')
+ }
+ if i >= 10 {
+ buf = append(buf, b/10%10+'0')
+ }
+ return append(buf, b%10+'0')
+}
+
+func printByteSlice(b []byte) string {
+ if len(b) == 0 {
+ return ""
+ }
+ buf := make([]byte, 0, 5*len(b))
+ buf = printUint8Bytes(buf, uint8(b[0]))
+ for _, n := range b[1:] {
+ buf = append(buf, ',', ' ')
+ buf = printUint8Bytes(buf, uint8(n))
+ }
+ return string(buf)
+}
+
+const hexDigits = "0123456789abcdef"
+
+func printString(str []byte) string {
+ buf := make([]byte, 0, len(str))
+ for i := 0; i < len(str); i++ {
+ c := str[i]
+ if c == '.' || c == '-' || c == ' ' ||
+ 'A' <= c && c <= 'Z' ||
+ 'a' <= c && c <= 'z' ||
+ '0' <= c && c <= '9' {
+ buf = append(buf, c)
+ continue
+ }
+
+ upper := c >> 4
+ lower := (c << 4) >> 4
+ buf = append(
+ buf,
+ '\\',
+ 'x',
+ hexDigits[upper],
+ hexDigits[lower],
+ )
+ }
+ return string(buf)
+}
+
+func printUint16(i uint16) string {
+ return printUint32(uint32(i))
+}
+
+func printUint32(i uint32) string {
+ // Max value is 4294967295.
+ buf := make([]byte, 10)
+ for b, d := buf, uint32(1000000000); d > 0; d /= 10 {
+ b[0] = byte(i/d%10 + '0')
+ if b[0] == '0' && len(b) == len(buf) && len(buf) > 1 {
+ buf = buf[1:]
+ }
+ b = b[1:]
+ i %= d
+ }
+ return string(buf)
+}
+
+func printBool(b bool) string {
+ if b {
+ return "true"
+ }
+ return "false"
+}
+
+var (
+ // ErrNotStarted indicates that the prerequisite information isn't
+ // available yet because the previous records haven't been appropriately
+ // parsed, skipped or finished.
+ ErrNotStarted = errors.New("parsing/packing of this type isn't available yet")
+
+ // ErrSectionDone indicated that all records in the section have been
+ // parsed or finished.
+ ErrSectionDone = errors.New("parsing/packing of this section has completed")
+
+ errBaseLen = errors.New("insufficient data for base length type")
+ errCalcLen = errors.New("insufficient data for calculated length type")
+ errReserved = errors.New("segment prefix is reserved")
+ errTooManyPtr = errors.New("too many pointers (>10)")
+ errInvalidPtr = errors.New("invalid pointer")
+ errNilResouceBody = errors.New("nil resource body")
+ errResourceLen = errors.New("insufficient data for resource body length")
+ errSegTooLong = errors.New("segment length too long")
+ errZeroSegLen = errors.New("zero length segment")
+ errResTooLong = errors.New("resource length too long")
+ errTooManyQuestions = errors.New("too many Questions to pack (>65535)")
+ errTooManyAnswers = errors.New("too many Answers to pack (>65535)")
+ errTooManyAuthorities = errors.New("too many Authorities to pack (>65535)")
+ errTooManyAdditionals = errors.New("too many Additionals to pack (>65535)")
+ errNonCanonicalName = errors.New("name is not in canonical format (it must end with a .)")
+ errStringTooLong = errors.New("character string exceeds maximum length (255)")
+ errCompressedSRV = errors.New("compressed name in SRV resource data")
+)
+
+// Internal constants.
+const (
+ // packStartingCap is the default initial buffer size allocated during
+ // packing.
+ //
+ // The starting capacity doesn't matter too much, but most DNS responses
+ // Will be <= 512 bytes as it is the limit for DNS over UDP.
+ packStartingCap = 512
+
+ // uint16Len is the length (in bytes) of a uint16.
+ uint16Len = 2
+
+ // uint32Len is the length (in bytes) of a uint32.
+ uint32Len = 4
+
+ // headerLen is the length (in bytes) of a DNS header.
+ //
+ // A header is comprised of 6 uint16s and no padding.
+ headerLen = 6 * uint16Len
+)
+
+type nestedError struct {
+ // s is the current level's error message.
+ s string
+
+ // err is the nested error.
+ err error
+}
+
+// nestedError implements error.Error.
+func (e *nestedError) Error() string {
+ return e.s + ": " + e.err.Error()
+}
+
+// Header is a representation of a DNS message header.
+type Header struct {
+ ID uint16
+ Response bool
+ OpCode OpCode
+ Authoritative bool
+ Truncated bool
+ RecursionDesired bool
+ RecursionAvailable bool
+ RCode RCode
+}
+
+func (m *Header) pack() (id uint16, bits uint16) {
+ id = m.ID
+ bits = uint16(m.OpCode)<<11 | uint16(m.RCode)
+ if m.RecursionAvailable {
+ bits |= headerBitRA
+ }
+ if m.RecursionDesired {
+ bits |= headerBitRD
+ }
+ if m.Truncated {
+ bits |= headerBitTC
+ }
+ if m.Authoritative {
+ bits |= headerBitAA
+ }
+ if m.Response {
+ bits |= headerBitQR
+ }
+ return
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (m *Header) GoString() string {
+ return "dnsmessage.Header{" +
+ "ID: " + printUint16(m.ID) + ", " +
+ "Response: " + printBool(m.Response) + ", " +
+ "OpCode: " + m.OpCode.GoString() + ", " +
+ "Authoritative: " + printBool(m.Authoritative) + ", " +
+ "Truncated: " + printBool(m.Truncated) + ", " +
+ "RecursionDesired: " + printBool(m.RecursionDesired) + ", " +
+ "RecursionAvailable: " + printBool(m.RecursionAvailable) + ", " +
+ "RCode: " + m.RCode.GoString() + "}"
+}
+
+// Message is a representation of a DNS message.
+type Message struct {
+ Header
+ Questions []Question
+ Answers []Resource
+ Authorities []Resource
+ Additionals []Resource
+}
+
+type section uint8
+
+const (
+ sectionNotStarted section = iota
+ sectionHeader
+ sectionQuestions
+ sectionAnswers
+ sectionAuthorities
+ sectionAdditionals
+ sectionDone
+
+ headerBitQR = 1 << 15 // query/response (response=1)
+ headerBitAA = 1 << 10 // authoritative
+ headerBitTC = 1 << 9 // truncated
+ headerBitRD = 1 << 8 // recursion desired
+ headerBitRA = 1 << 7 // recursion available
+)
+
+var sectionNames = map[section]string{
+ sectionHeader: "header",
+ sectionQuestions: "Question",
+ sectionAnswers: "Answer",
+ sectionAuthorities: "Authority",
+ sectionAdditionals: "Additional",
+}
+
+// header is the wire format for a DNS message header.
+type header struct {
+ id uint16
+ bits uint16
+ questions uint16
+ answers uint16
+ authorities uint16
+ additionals uint16
+}
+
+func (h *header) count(sec section) uint16 {
+ switch sec {
+ case sectionQuestions:
+ return h.questions
+ case sectionAnswers:
+ return h.answers
+ case sectionAuthorities:
+ return h.authorities
+ case sectionAdditionals:
+ return h.additionals
+ }
+ return 0
+}
+
+// pack appends the wire format of the header to msg.
+func (h *header) pack(msg []byte) []byte {
+ msg = packUint16(msg, h.id)
+ msg = packUint16(msg, h.bits)
+ msg = packUint16(msg, h.questions)
+ msg = packUint16(msg, h.answers)
+ msg = packUint16(msg, h.authorities)
+ return packUint16(msg, h.additionals)
+}
+
+func (h *header) unpack(msg []byte, off int) (int, error) {
+ newOff := off
+ var err error
+ if h.id, newOff, err = unpackUint16(msg, newOff); err != nil {
+ return off, &nestedError{"id", err}
+ }
+ if h.bits, newOff, err = unpackUint16(msg, newOff); err != nil {
+ return off, &nestedError{"bits", err}
+ }
+ if h.questions, newOff, err = unpackUint16(msg, newOff); err != nil {
+ return off, &nestedError{"questions", err}
+ }
+ if h.answers, newOff, err = unpackUint16(msg, newOff); err != nil {
+ return off, &nestedError{"answers", err}
+ }
+ if h.authorities, newOff, err = unpackUint16(msg, newOff); err != nil {
+ return off, &nestedError{"authorities", err}
+ }
+ if h.additionals, newOff, err = unpackUint16(msg, newOff); err != nil {
+ return off, &nestedError{"additionals", err}
+ }
+ return newOff, nil
+}
+
+func (h *header) header() Header {
+ return Header{
+ ID: h.id,
+ Response: (h.bits & headerBitQR) != 0,
+ OpCode: OpCode(h.bits>>11) & 0xF,
+ Authoritative: (h.bits & headerBitAA) != 0,
+ Truncated: (h.bits & headerBitTC) != 0,
+ RecursionDesired: (h.bits & headerBitRD) != 0,
+ RecursionAvailable: (h.bits & headerBitRA) != 0,
+ RCode: RCode(h.bits & 0xF),
+ }
+}
+
+// A Resource is a DNS resource record.
+type Resource struct {
+ Header ResourceHeader
+ Body ResourceBody
+}
+
+func (r *Resource) GoString() string {
+ return "dnsmessage.Resource{" +
+ "Header: " + r.Header.GoString() +
+ ", Body: &" + r.Body.GoString() +
+ "}"
+}
+
+// A ResourceBody is a DNS resource record minus the header.
+type ResourceBody interface {
+ // pack packs a Resource except for its header.
+ pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error)
+
+ // realType returns the actual type of the Resource. This is used to
+ // fill in the header Type field.
+ realType() Type
+
+ // GoString implements fmt.GoStringer.GoString.
+ GoString() string
+}
+
+// pack appends the wire format of the Resource to msg.
+func (r *Resource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ if r.Body == nil {
+ return msg, errNilResouceBody
+ }
+ oldMsg := msg
+ r.Header.Type = r.Body.realType()
+ msg, lenOff, err := r.Header.pack(msg, compression, compressionOff)
+ if err != nil {
+ return msg, &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ msg, err = r.Body.pack(msg, compression, compressionOff)
+ if err != nil {
+ return msg, &nestedError{"content", err}
+ }
+ if err := r.Header.fixLen(msg, lenOff, preLen); err != nil {
+ return oldMsg, err
+ }
+ return msg, nil
+}
+
+// A Parser allows incrementally parsing a DNS message.
+//
+// When parsing is started, the Header is parsed. Next, each Question can be
+// either parsed or skipped. Alternatively, all Questions can be skipped at
+// once. When all Questions have been parsed, attempting to parse Questions
+// will return (nil, nil) and attempting to skip Questions will return
+// (true, nil). After all Questions have been either parsed or skipped, all
+// Answers, Authorities and Additionals can be either parsed or skipped in the
+// same way, and each type of Resource must be fully parsed or skipped before
+// proceeding to the next type of Resource.
+//
+// Note that there is no requirement to fully skip or parse the message.
+type Parser struct {
+ msg []byte
+ header header
+
+ section section
+ off int
+ index int
+ resHeaderValid bool
+ resHeader ResourceHeader
+}
+
+// Start parses the header and enables the parsing of Questions.
+func (p *Parser) Start(msg []byte) (Header, error) {
+ if p.msg != nil {
+ *p = Parser{}
+ }
+ p.msg = msg
+ var err error
+ if p.off, err = p.header.unpack(msg, 0); err != nil {
+ return Header{}, &nestedError{"unpacking header", err}
+ }
+ p.section = sectionQuestions
+ return p.header.header(), nil
+}
+
+func (p *Parser) checkAdvance(sec section) error {
+ if p.section < sec {
+ return ErrNotStarted
+ }
+ if p.section > sec {
+ return ErrSectionDone
+ }
+ p.resHeaderValid = false
+ if p.index == int(p.header.count(sec)) {
+ p.index = 0
+ p.section++
+ return ErrSectionDone
+ }
+ return nil
+}
+
+func (p *Parser) resource(sec section) (Resource, error) {
+ var r Resource
+ var err error
+ r.Header, err = p.resourceHeader(sec)
+ if err != nil {
+ return r, err
+ }
+ p.resHeaderValid = false
+ r.Body, p.off, err = unpackResourceBody(p.msg, p.off, r.Header)
+ if err != nil {
+ return Resource{}, &nestedError{"unpacking " + sectionNames[sec], err}
+ }
+ p.index++
+ return r, nil
+}
+
+func (p *Parser) resourceHeader(sec section) (ResourceHeader, error) {
+ if p.resHeaderValid {
+ return p.resHeader, nil
+ }
+ if err := p.checkAdvance(sec); err != nil {
+ return ResourceHeader{}, err
+ }
+ var hdr ResourceHeader
+ off, err := hdr.unpack(p.msg, p.off)
+ if err != nil {
+ return ResourceHeader{}, err
+ }
+ p.resHeaderValid = true
+ p.resHeader = hdr
+ p.off = off
+ return hdr, nil
+}
+
+func (p *Parser) skipResource(sec section) error {
+ if p.resHeaderValid {
+ newOff := p.off + int(p.resHeader.Length)
+ if newOff > len(p.msg) {
+ return errResourceLen
+ }
+ p.off = newOff
+ p.resHeaderValid = false
+ p.index++
+ return nil
+ }
+ if err := p.checkAdvance(sec); err != nil {
+ return err
+ }
+ var err error
+ p.off, err = skipResource(p.msg, p.off)
+ if err != nil {
+ return &nestedError{"skipping: " + sectionNames[sec], err}
+ }
+ p.index++
+ return nil
+}
+
+// Question parses a single Question.
+func (p *Parser) Question() (Question, error) {
+ if err := p.checkAdvance(sectionQuestions); err != nil {
+ return Question{}, err
+ }
+ var name Name
+ off, err := name.unpack(p.msg, p.off)
+ if err != nil {
+ return Question{}, &nestedError{"unpacking Question.Name", err}
+ }
+ typ, off, err := unpackType(p.msg, off)
+ if err != nil {
+ return Question{}, &nestedError{"unpacking Question.Type", err}
+ }
+ class, off, err := unpackClass(p.msg, off)
+ if err != nil {
+ return Question{}, &nestedError{"unpacking Question.Class", err}
+ }
+ p.off = off
+ p.index++
+ return Question{name, typ, class}, nil
+}
+
+// AllQuestions parses all Questions.
+func (p *Parser) AllQuestions() ([]Question, error) {
+ // Multiple questions are valid according to the spec,
+ // but servers don't actually support them. There will
+ // be at most one question here.
+ //
+ // Do not pre-allocate based on info in p.header, since
+ // the data is untrusted.
+ qs := []Question{}
+ for {
+ q, err := p.Question()
+ if err == ErrSectionDone {
+ return qs, nil
+ }
+ if err != nil {
+ return nil, err
+ }
+ qs = append(qs, q)
+ }
+}
+
+// SkipQuestion skips a single Question.
+func (p *Parser) SkipQuestion() error {
+ if err := p.checkAdvance(sectionQuestions); err != nil {
+ return err
+ }
+ off, err := skipName(p.msg, p.off)
+ if err != nil {
+ return &nestedError{"skipping Question Name", err}
+ }
+ if off, err = skipType(p.msg, off); err != nil {
+ return &nestedError{"skipping Question Type", err}
+ }
+ if off, err = skipClass(p.msg, off); err != nil {
+ return &nestedError{"skipping Question Class", err}
+ }
+ p.off = off
+ p.index++
+ return nil
+}
+
+// SkipAllQuestions skips all Questions.
+func (p *Parser) SkipAllQuestions() error {
+ for {
+ if err := p.SkipQuestion(); err == ErrSectionDone {
+ return nil
+ } else if err != nil {
+ return err
+ }
+ }
+}
+
+// AnswerHeader parses a single Answer ResourceHeader.
+func (p *Parser) AnswerHeader() (ResourceHeader, error) {
+ return p.resourceHeader(sectionAnswers)
+}
+
+// Answer parses a single Answer Resource.
+func (p *Parser) Answer() (Resource, error) {
+ return p.resource(sectionAnswers)
+}
+
+// AllAnswers parses all Answer Resources.
+func (p *Parser) AllAnswers() ([]Resource, error) {
+ // The most common query is for A/AAAA, which usually returns
+ // a handful of IPs.
+ //
+ // Pre-allocate up to a certain limit, since p.header is
+ // untrusted data.
+ n := int(p.header.answers)
+ if n > 20 {
+ n = 20
+ }
+ as := make([]Resource, 0, n)
+ for {
+ a, err := p.Answer()
+ if err == ErrSectionDone {
+ return as, nil
+ }
+ if err != nil {
+ return nil, err
+ }
+ as = append(as, a)
+ }
+}
+
+// SkipAnswer skips a single Answer Resource.
+func (p *Parser) SkipAnswer() error {
+ return p.skipResource(sectionAnswers)
+}
+
+// SkipAllAnswers skips all Answer Resources.
+func (p *Parser) SkipAllAnswers() error {
+ for {
+ if err := p.SkipAnswer(); err == ErrSectionDone {
+ return nil
+ } else if err != nil {
+ return err
+ }
+ }
+}
+
+// AuthorityHeader parses a single Authority ResourceHeader.
+func (p *Parser) AuthorityHeader() (ResourceHeader, error) {
+ return p.resourceHeader(sectionAuthorities)
+}
+
+// Authority parses a single Authority Resource.
+func (p *Parser) Authority() (Resource, error) {
+ return p.resource(sectionAuthorities)
+}
+
+// AllAuthorities parses all Authority Resources.
+func (p *Parser) AllAuthorities() ([]Resource, error) {
+ // Authorities contains SOA in case of NXDOMAIN and friends,
+ // otherwise it is empty.
+ //
+ // Pre-allocate up to a certain limit, since p.header is
+ // untrusted data.
+ n := int(p.header.authorities)
+ if n > 10 {
+ n = 10
+ }
+ as := make([]Resource, 0, n)
+ for {
+ a, err := p.Authority()
+ if err == ErrSectionDone {
+ return as, nil
+ }
+ if err != nil {
+ return nil, err
+ }
+ as = append(as, a)
+ }
+}
+
+// SkipAuthority skips a single Authority Resource.
+func (p *Parser) SkipAuthority() error {
+ return p.skipResource(sectionAuthorities)
+}
+
+// SkipAllAuthorities skips all Authority Resources.
+func (p *Parser) SkipAllAuthorities() error {
+ for {
+ if err := p.SkipAuthority(); err == ErrSectionDone {
+ return nil
+ } else if err != nil {
+ return err
+ }
+ }
+}
+
+// AdditionalHeader parses a single Additional ResourceHeader.
+func (p *Parser) AdditionalHeader() (ResourceHeader, error) {
+ return p.resourceHeader(sectionAdditionals)
+}
+
+// Additional parses a single Additional Resource.
+func (p *Parser) Additional() (Resource, error) {
+ return p.resource(sectionAdditionals)
+}
+
+// AllAdditionals parses all Additional Resources.
+func (p *Parser) AllAdditionals() ([]Resource, error) {
+ // Additionals usually contain OPT, and sometimes A/AAAA
+ // glue records.
+ //
+ // Pre-allocate up to a certain limit, since p.header is
+ // untrusted data.
+ n := int(p.header.additionals)
+ if n > 10 {
+ n = 10
+ }
+ as := make([]Resource, 0, n)
+ for {
+ a, err := p.Additional()
+ if err == ErrSectionDone {
+ return as, nil
+ }
+ if err != nil {
+ return nil, err
+ }
+ as = append(as, a)
+ }
+}
+
+// SkipAdditional skips a single Additional Resource.
+func (p *Parser) SkipAdditional() error {
+ return p.skipResource(sectionAdditionals)
+}
+
+// SkipAllAdditionals skips all Additional Resources.
+func (p *Parser) SkipAllAdditionals() error {
+ for {
+ if err := p.SkipAdditional(); err == ErrSectionDone {
+ return nil
+ } else if err != nil {
+ return err
+ }
+ }
+}
+
+// CNAMEResource parses a single CNAMEResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) CNAMEResource() (CNAMEResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeCNAME {
+ return CNAMEResource{}, ErrNotStarted
+ }
+ r, err := unpackCNAMEResource(p.msg, p.off)
+ if err != nil {
+ return CNAMEResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// MXResource parses a single MXResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) MXResource() (MXResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeMX {
+ return MXResource{}, ErrNotStarted
+ }
+ r, err := unpackMXResource(p.msg, p.off)
+ if err != nil {
+ return MXResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// NSResource parses a single NSResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) NSResource() (NSResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeNS {
+ return NSResource{}, ErrNotStarted
+ }
+ r, err := unpackNSResource(p.msg, p.off)
+ if err != nil {
+ return NSResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// PTRResource parses a single PTRResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) PTRResource() (PTRResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypePTR {
+ return PTRResource{}, ErrNotStarted
+ }
+ r, err := unpackPTRResource(p.msg, p.off)
+ if err != nil {
+ return PTRResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// SOAResource parses a single SOAResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) SOAResource() (SOAResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeSOA {
+ return SOAResource{}, ErrNotStarted
+ }
+ r, err := unpackSOAResource(p.msg, p.off)
+ if err != nil {
+ return SOAResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// TXTResource parses a single TXTResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) TXTResource() (TXTResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeTXT {
+ return TXTResource{}, ErrNotStarted
+ }
+ r, err := unpackTXTResource(p.msg, p.off, p.resHeader.Length)
+ if err != nil {
+ return TXTResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// SRVResource parses a single SRVResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) SRVResource() (SRVResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeSRV {
+ return SRVResource{}, ErrNotStarted
+ }
+ r, err := unpackSRVResource(p.msg, p.off)
+ if err != nil {
+ return SRVResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// AResource parses a single AResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) AResource() (AResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeA {
+ return AResource{}, ErrNotStarted
+ }
+ r, err := unpackAResource(p.msg, p.off)
+ if err != nil {
+ return AResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// AAAAResource parses a single AAAAResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) AAAAResource() (AAAAResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeAAAA {
+ return AAAAResource{}, ErrNotStarted
+ }
+ r, err := unpackAAAAResource(p.msg, p.off)
+ if err != nil {
+ return AAAAResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// OPTResource parses a single OPTResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) OPTResource() (OPTResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeOPT {
+ return OPTResource{}, ErrNotStarted
+ }
+ r, err := unpackOPTResource(p.msg, p.off, p.resHeader.Length)
+ if err != nil {
+ return OPTResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// UnknownResource parses a single UnknownResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) UnknownResource() (UnknownResource, error) {
+ if !p.resHeaderValid {
+ return UnknownResource{}, ErrNotStarted
+ }
+ r, err := unpackUnknownResource(p.resHeader.Type, p.msg, p.off, p.resHeader.Length)
+ if err != nil {
+ return UnknownResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// Unpack parses a full Message.
+func (m *Message) Unpack(msg []byte) error {
+ var p Parser
+ var err error
+ if m.Header, err = p.Start(msg); err != nil {
+ return err
+ }
+ if m.Questions, err = p.AllQuestions(); err != nil {
+ return err
+ }
+ if m.Answers, err = p.AllAnswers(); err != nil {
+ return err
+ }
+ if m.Authorities, err = p.AllAuthorities(); err != nil {
+ return err
+ }
+ if m.Additionals, err = p.AllAdditionals(); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Pack packs a full Message.
+func (m *Message) Pack() ([]byte, error) {
+ return m.AppendPack(make([]byte, 0, packStartingCap))
+}
+
+// AppendPack is like Pack but appends the full Message to b and returns the
+// extended buffer.
+func (m *Message) AppendPack(b []byte) ([]byte, error) {
+ // Validate the lengths. It is very unlikely that anyone will try to
+ // pack more than 65535 of any particular type, but it is possible and
+ // we should fail gracefully.
+ if len(m.Questions) > int(^uint16(0)) {
+ return nil, errTooManyQuestions
+ }
+ if len(m.Answers) > int(^uint16(0)) {
+ return nil, errTooManyAnswers
+ }
+ if len(m.Authorities) > int(^uint16(0)) {
+ return nil, errTooManyAuthorities
+ }
+ if len(m.Additionals) > int(^uint16(0)) {
+ return nil, errTooManyAdditionals
+ }
+
+ var h header
+ h.id, h.bits = m.Header.pack()
+
+ h.questions = uint16(len(m.Questions))
+ h.answers = uint16(len(m.Answers))
+ h.authorities = uint16(len(m.Authorities))
+ h.additionals = uint16(len(m.Additionals))
+
+ compressionOff := len(b)
+ msg := h.pack(b)
+
+ // RFC 1035 allows (but does not require) compression for packing. RFC
+ // 1035 requires unpacking implementations to support compression, so
+ // unconditionally enabling it is fine.
+ //
+ // DNS lookups are typically done over UDP, and RFC 1035 states that UDP
+ // DNS messages can be a maximum of 512 bytes long. Without compression,
+ // many DNS response messages are over this limit, so enabling
+ // compression will help ensure compliance.
+ compression := map[string]int{}
+
+ for i := range m.Questions {
+ var err error
+ if msg, err = m.Questions[i].pack(msg, compression, compressionOff); err != nil {
+ return nil, &nestedError{"packing Question", err}
+ }
+ }
+ for i := range m.Answers {
+ var err error
+ if msg, err = m.Answers[i].pack(msg, compression, compressionOff); err != nil {
+ return nil, &nestedError{"packing Answer", err}
+ }
+ }
+ for i := range m.Authorities {
+ var err error
+ if msg, err = m.Authorities[i].pack(msg, compression, compressionOff); err != nil {
+ return nil, &nestedError{"packing Authority", err}
+ }
+ }
+ for i := range m.Additionals {
+ var err error
+ if msg, err = m.Additionals[i].pack(msg, compression, compressionOff); err != nil {
+ return nil, &nestedError{"packing Additional", err}
+ }
+ }
+
+ return msg, nil
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (m *Message) GoString() string {
+ s := "dnsmessage.Message{Header: " + m.Header.GoString() + ", " +
+ "Questions: []dnsmessage.Question{"
+ if len(m.Questions) > 0 {
+ s += m.Questions[0].GoString()
+ for _, q := range m.Questions[1:] {
+ s += ", " + q.GoString()
+ }
+ }
+ s += "}, Answers: []dnsmessage.Resource{"
+ if len(m.Answers) > 0 {
+ s += m.Answers[0].GoString()
+ for _, a := range m.Answers[1:] {
+ s += ", " + a.GoString()
+ }
+ }
+ s += "}, Authorities: []dnsmessage.Resource{"
+ if len(m.Authorities) > 0 {
+ s += m.Authorities[0].GoString()
+ for _, a := range m.Authorities[1:] {
+ s += ", " + a.GoString()
+ }
+ }
+ s += "}, Additionals: []dnsmessage.Resource{"
+ if len(m.Additionals) > 0 {
+ s += m.Additionals[0].GoString()
+ for _, a := range m.Additionals[1:] {
+ s += ", " + a.GoString()
+ }
+ }
+ return s + "}}"
+}
+
+// A Builder allows incrementally packing a DNS message.
+//
+// Example usage:
+// buf := make([]byte, 2, 514)
+// b := NewBuilder(buf, Header{...})
+// b.EnableCompression()
+// // Optionally start a section and add things to that section.
+// // Repeat adding sections as necessary.
+// buf, err := b.Finish()
+// // If err is nil, buf[2:] will contain the built bytes.
+type Builder struct {
+ // msg is the storage for the message being built.
+ msg []byte
+
+ // section keeps track of the current section being built.
+ section section
+
+ // header keeps track of what should go in the header when Finish is
+ // called.
+ header header
+
+ // start is the starting index of the bytes allocated in msg for header.
+ start int
+
+ // compression is a mapping from name suffixes to their starting index
+ // in msg.
+ compression map[string]int
+}
+
+// NewBuilder creates a new builder with compression disabled.
+//
+// Note: Most users will want to immediately enable compression with the
+// EnableCompression method. See that method's comment for why you may or may
+// not want to enable compression.
+//
+// The DNS message is appended to the provided initial buffer buf (which may be
+// nil) as it is built. The final message is returned by the (*Builder).Finish
+// method, which may return the same underlying array if there was sufficient
+// capacity in the slice.
+func NewBuilder(buf []byte, h Header) Builder {
+ if buf == nil {
+ buf = make([]byte, 0, packStartingCap)
+ }
+ b := Builder{msg: buf, start: len(buf)}
+ b.header.id, b.header.bits = h.pack()
+ var hb [headerLen]byte
+ b.msg = append(b.msg, hb[:]...)
+ b.section = sectionHeader
+ return b
+}
+
+// EnableCompression enables compression in the Builder.
+//
+// Leaving compression disabled avoids compression related allocations, but can
+// result in larger message sizes. Be careful with this mode as it can cause
+// messages to exceed the UDP size limit.
+//
+// According to RFC 1035, section 4.1.4, the use of compression is optional, but
+// all implementations must accept both compressed and uncompressed DNS
+// messages.
+//
+// Compression should be enabled before any sections are added for best results.
+func (b *Builder) EnableCompression() {
+ b.compression = map[string]int{}
+}
+
+func (b *Builder) startCheck(s section) error {
+ if b.section <= sectionNotStarted {
+ return ErrNotStarted
+ }
+ if b.section > s {
+ return ErrSectionDone
+ }
+ return nil
+}
+
+// StartQuestions prepares the builder for packing Questions.
+func (b *Builder) StartQuestions() error {
+ if err := b.startCheck(sectionQuestions); err != nil {
+ return err
+ }
+ b.section = sectionQuestions
+ return nil
+}
+
+// StartAnswers prepares the builder for packing Answers.
+func (b *Builder) StartAnswers() error {
+ if err := b.startCheck(sectionAnswers); err != nil {
+ return err
+ }
+ b.section = sectionAnswers
+ return nil
+}
+
+// StartAuthorities prepares the builder for packing Authorities.
+func (b *Builder) StartAuthorities() error {
+ if err := b.startCheck(sectionAuthorities); err != nil {
+ return err
+ }
+ b.section = sectionAuthorities
+ return nil
+}
+
+// StartAdditionals prepares the builder for packing Additionals.
+func (b *Builder) StartAdditionals() error {
+ if err := b.startCheck(sectionAdditionals); err != nil {
+ return err
+ }
+ b.section = sectionAdditionals
+ return nil
+}
+
+func (b *Builder) incrementSectionCount() error {
+ var count *uint16
+ var err error
+ switch b.section {
+ case sectionQuestions:
+ count = &b.header.questions
+ err = errTooManyQuestions
+ case sectionAnswers:
+ count = &b.header.answers
+ err = errTooManyAnswers
+ case sectionAuthorities:
+ count = &b.header.authorities
+ err = errTooManyAuthorities
+ case sectionAdditionals:
+ count = &b.header.additionals
+ err = errTooManyAdditionals
+ }
+ if *count == ^uint16(0) {
+ return err
+ }
+ *count++
+ return nil
+}
+
+// Question adds a single Question.
+func (b *Builder) Question(q Question) error {
+ if b.section < sectionQuestions {
+ return ErrNotStarted
+ }
+ if b.section > sectionQuestions {
+ return ErrSectionDone
+ }
+ msg, err := q.pack(b.msg, b.compression, b.start)
+ if err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+func (b *Builder) checkResourceSection() error {
+ if b.section < sectionAnswers {
+ return ErrNotStarted
+ }
+ if b.section > sectionAdditionals {
+ return ErrSectionDone
+ }
+ return nil
+}
+
+// CNAMEResource adds a single CNAMEResource.
+func (b *Builder) CNAMEResource(h ResourceHeader, r CNAMEResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, lenOff, err := h.pack(b.msg, b.compression, b.start)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression, b.start); err != nil {
+ return &nestedError{"CNAMEResource body", err}
+ }
+ if err := h.fixLen(msg, lenOff, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// MXResource adds a single MXResource.
+func (b *Builder) MXResource(h ResourceHeader, r MXResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, lenOff, err := h.pack(b.msg, b.compression, b.start)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression, b.start); err != nil {
+ return &nestedError{"MXResource body", err}
+ }
+ if err := h.fixLen(msg, lenOff, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// NSResource adds a single NSResource.
+func (b *Builder) NSResource(h ResourceHeader, r NSResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, lenOff, err := h.pack(b.msg, b.compression, b.start)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression, b.start); err != nil {
+ return &nestedError{"NSResource body", err}
+ }
+ if err := h.fixLen(msg, lenOff, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// PTRResource adds a single PTRResource.
+func (b *Builder) PTRResource(h ResourceHeader, r PTRResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, lenOff, err := h.pack(b.msg, b.compression, b.start)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression, b.start); err != nil {
+ return &nestedError{"PTRResource body", err}
+ }
+ if err := h.fixLen(msg, lenOff, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// SOAResource adds a single SOAResource.
+func (b *Builder) SOAResource(h ResourceHeader, r SOAResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, lenOff, err := h.pack(b.msg, b.compression, b.start)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression, b.start); err != nil {
+ return &nestedError{"SOAResource body", err}
+ }
+ if err := h.fixLen(msg, lenOff, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// TXTResource adds a single TXTResource.
+func (b *Builder) TXTResource(h ResourceHeader, r TXTResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, lenOff, err := h.pack(b.msg, b.compression, b.start)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression, b.start); err != nil {
+ return &nestedError{"TXTResource body", err}
+ }
+ if err := h.fixLen(msg, lenOff, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// SRVResource adds a single SRVResource.
+func (b *Builder) SRVResource(h ResourceHeader, r SRVResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, lenOff, err := h.pack(b.msg, b.compression, b.start)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression, b.start); err != nil {
+ return &nestedError{"SRVResource body", err}
+ }
+ if err := h.fixLen(msg, lenOff, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// AResource adds a single AResource.
+func (b *Builder) AResource(h ResourceHeader, r AResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, lenOff, err := h.pack(b.msg, b.compression, b.start)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression, b.start); err != nil {
+ return &nestedError{"AResource body", err}
+ }
+ if err := h.fixLen(msg, lenOff, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// AAAAResource adds a single AAAAResource.
+func (b *Builder) AAAAResource(h ResourceHeader, r AAAAResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, lenOff, err := h.pack(b.msg, b.compression, b.start)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression, b.start); err != nil {
+ return &nestedError{"AAAAResource body", err}
+ }
+ if err := h.fixLen(msg, lenOff, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// OPTResource adds a single OPTResource.
+func (b *Builder) OPTResource(h ResourceHeader, r OPTResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, lenOff, err := h.pack(b.msg, b.compression, b.start)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression, b.start); err != nil {
+ return &nestedError{"OPTResource body", err}
+ }
+ if err := h.fixLen(msg, lenOff, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// UnknownResource adds a single UnknownResource.
+func (b *Builder) UnknownResource(h ResourceHeader, r UnknownResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, lenOff, err := h.pack(b.msg, b.compression, b.start)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression, b.start); err != nil {
+ return &nestedError{"UnknownResource body", err}
+ }
+ if err := h.fixLen(msg, lenOff, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// Finish ends message building and generates a binary message.
+func (b *Builder) Finish() ([]byte, error) {
+ if b.section < sectionHeader {
+ return nil, ErrNotStarted
+ }
+ b.section = sectionDone
+ // Space for the header was allocated in NewBuilder.
+ b.header.pack(b.msg[b.start:b.start])
+ return b.msg, nil
+}
+
+// A ResourceHeader is the header of a DNS resource record. There are
+// many types of DNS resource records, but they all share the same header.
+type ResourceHeader struct {
+ // Name is the domain name for which this resource record pertains.
+ Name Name
+
+ // Type is the type of DNS resource record.
+ //
+ // This field will be set automatically during packing.
+ Type Type
+
+ // Class is the class of network to which this DNS resource record
+ // pertains.
+ Class Class
+
+ // TTL is the length of time (measured in seconds) which this resource
+ // record is valid for (time to live). All Resources in a set should
+ // have the same TTL (RFC 2181 Section 5.2).
+ TTL uint32
+
+ // Length is the length of data in the resource record after the header.
+ //
+ // This field will be set automatically during packing.
+ Length uint16
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (h *ResourceHeader) GoString() string {
+ return "dnsmessage.ResourceHeader{" +
+ "Name: " + h.Name.GoString() + ", " +
+ "Type: " + h.Type.GoString() + ", " +
+ "Class: " + h.Class.GoString() + ", " +
+ "TTL: " + printUint32(h.TTL) + ", " +
+ "Length: " + printUint16(h.Length) + "}"
+}
+
+// pack appends the wire format of the ResourceHeader to oldMsg.
+//
+// lenOff is the offset in msg where the Length field was packed.
+func (h *ResourceHeader) pack(oldMsg []byte, compression map[string]int, compressionOff int) (msg []byte, lenOff int, err error) {
+ msg = oldMsg
+ if msg, err = h.Name.pack(msg, compression, compressionOff); err != nil {
+ return oldMsg, 0, &nestedError{"Name", err}
+ }
+ msg = packType(msg, h.Type)
+ msg = packClass(msg, h.Class)
+ msg = packUint32(msg, h.TTL)
+ lenOff = len(msg)
+ msg = packUint16(msg, h.Length)
+ return msg, lenOff, nil
+}
+
+func (h *ResourceHeader) unpack(msg []byte, off int) (int, error) {
+ newOff := off
+ var err error
+ if newOff, err = h.Name.unpack(msg, newOff); err != nil {
+ return off, &nestedError{"Name", err}
+ }
+ if h.Type, newOff, err = unpackType(msg, newOff); err != nil {
+ return off, &nestedError{"Type", err}
+ }
+ if h.Class, newOff, err = unpackClass(msg, newOff); err != nil {
+ return off, &nestedError{"Class", err}
+ }
+ if h.TTL, newOff, err = unpackUint32(msg, newOff); err != nil {
+ return off, &nestedError{"TTL", err}
+ }
+ if h.Length, newOff, err = unpackUint16(msg, newOff); err != nil {
+ return off, &nestedError{"Length", err}
+ }
+ return newOff, nil
+}
+
+// fixLen updates a packed ResourceHeader to include the length of the
+// ResourceBody.
+//
+// lenOff is the offset of the ResourceHeader.Length field in msg.
+//
+// preLen is the length that msg was before the ResourceBody was packed.
+func (h *ResourceHeader) fixLen(msg []byte, lenOff int, preLen int) error {
+ conLen := len(msg) - preLen
+ if conLen > int(^uint16(0)) {
+ return errResTooLong
+ }
+
+ // Fill in the length now that we know how long the content is.
+ packUint16(msg[lenOff:lenOff], uint16(conLen))
+ h.Length = uint16(conLen)
+
+ return nil
+}
+
+// EDNS(0) wire constants.
+const (
+ edns0Version = 0
+
+ edns0DNSSECOK = 0x00008000
+ ednsVersionMask = 0x00ff0000
+ edns0DNSSECOKMask = 0x00ff8000
+)
+
+// SetEDNS0 configures h for EDNS(0).
+//
+// The provided extRCode must be an extedned RCode.
+func (h *ResourceHeader) SetEDNS0(udpPayloadLen int, extRCode RCode, dnssecOK bool) error {
+ h.Name = Name{Data: [nameLen]byte{'.'}, Length: 1} // RFC 6891 section 6.1.2
+ h.Type = TypeOPT
+ h.Class = Class(udpPayloadLen)
+ h.TTL = uint32(extRCode) >> 4 << 24
+ if dnssecOK {
+ h.TTL |= edns0DNSSECOK
+ }
+ return nil
+}
+
+// DNSSECAllowed reports whether the DNSSEC OK bit is set.
+func (h *ResourceHeader) DNSSECAllowed() bool {
+ return h.TTL&edns0DNSSECOKMask == edns0DNSSECOK // RFC 6891 section 6.1.3
+}
+
+// ExtendedRCode returns an extended RCode.
+//
+// The provided rcode must be the RCode in DNS message header.
+func (h *ResourceHeader) ExtendedRCode(rcode RCode) RCode {
+ if h.TTL&ednsVersionMask == edns0Version { // RFC 6891 section 6.1.3
+ return RCode(h.TTL>>24<<4) | rcode
+ }
+ return rcode
+}
+
+func skipResource(msg []byte, off int) (int, error) {
+ newOff, err := skipName(msg, off)
+ if err != nil {
+ return off, &nestedError{"Name", err}
+ }
+ if newOff, err = skipType(msg, newOff); err != nil {
+ return off, &nestedError{"Type", err}
+ }
+ if newOff, err = skipClass(msg, newOff); err != nil {
+ return off, &nestedError{"Class", err}
+ }
+ if newOff, err = skipUint32(msg, newOff); err != nil {
+ return off, &nestedError{"TTL", err}
+ }
+ length, newOff, err := unpackUint16(msg, newOff)
+ if err != nil {
+ return off, &nestedError{"Length", err}
+ }
+ if newOff += int(length); newOff > len(msg) {
+ return off, errResourceLen
+ }
+ return newOff, nil
+}
+
+// packUint16 appends the wire format of field to msg.
+func packUint16(msg []byte, field uint16) []byte {
+ return append(msg, byte(field>>8), byte(field))
+}
+
+func unpackUint16(msg []byte, off int) (uint16, int, error) {
+ if off+uint16Len > len(msg) {
+ return 0, off, errBaseLen
+ }
+ return uint16(msg[off])<<8 | uint16(msg[off+1]), off + uint16Len, nil
+}
+
+func skipUint16(msg []byte, off int) (int, error) {
+ if off+uint16Len > len(msg) {
+ return off, errBaseLen
+ }
+ return off + uint16Len, nil
+}
+
+// packType appends the wire format of field to msg.
+func packType(msg []byte, field Type) []byte {
+ return packUint16(msg, uint16(field))
+}
+
+func unpackType(msg []byte, off int) (Type, int, error) {
+ t, o, err := unpackUint16(msg, off)
+ return Type(t), o, err
+}
+
+func skipType(msg []byte, off int) (int, error) {
+ return skipUint16(msg, off)
+}
+
+// packClass appends the wire format of field to msg.
+func packClass(msg []byte, field Class) []byte {
+ return packUint16(msg, uint16(field))
+}
+
+func unpackClass(msg []byte, off int) (Class, int, error) {
+ c, o, err := unpackUint16(msg, off)
+ return Class(c), o, err
+}
+
+func skipClass(msg []byte, off int) (int, error) {
+ return skipUint16(msg, off)
+}
+
+// packUint32 appends the wire format of field to msg.
+func packUint32(msg []byte, field uint32) []byte {
+ return append(
+ msg,
+ byte(field>>24),
+ byte(field>>16),
+ byte(field>>8),
+ byte(field),
+ )
+}
+
+func unpackUint32(msg []byte, off int) (uint32, int, error) {
+ if off+uint32Len > len(msg) {
+ return 0, off, errBaseLen
+ }
+ v := uint32(msg[off])<<24 | uint32(msg[off+1])<<16 | uint32(msg[off+2])<<8 | uint32(msg[off+3])
+ return v, off + uint32Len, nil
+}
+
+func skipUint32(msg []byte, off int) (int, error) {
+ if off+uint32Len > len(msg) {
+ return off, errBaseLen
+ }
+ return off + uint32Len, nil
+}
+
+// packText appends the wire format of field to msg.
+func packText(msg []byte, field string) ([]byte, error) {
+ l := len(field)
+ if l > 255 {
+ return nil, errStringTooLong
+ }
+ msg = append(msg, byte(l))
+ msg = append(msg, field...)
+
+ return msg, nil
+}
+
+func unpackText(msg []byte, off int) (string, int, error) {
+ if off >= len(msg) {
+ return "", off, errBaseLen
+ }
+ beginOff := off + 1
+ endOff := beginOff + int(msg[off])
+ if endOff > len(msg) {
+ return "", off, errCalcLen
+ }
+ return string(msg[beginOff:endOff]), endOff, nil
+}
+
+// packBytes appends the wire format of field to msg.
+func packBytes(msg []byte, field []byte) []byte {
+ return append(msg, field...)
+}
+
+func unpackBytes(msg []byte, off int, field []byte) (int, error) {
+ newOff := off + len(field)
+ if newOff > len(msg) {
+ return off, errBaseLen
+ }
+ copy(field, msg[off:newOff])
+ return newOff, nil
+}
+
+const nameLen = 255
+
+// A Name is a non-encoded domain name. It is used instead of strings to avoid
+// allocations.
+type Name struct {
+ Data [nameLen]byte
+ Length uint8
+}
+
+// NewName creates a new Name from a string.
+func NewName(name string) (Name, error) {
+ if len([]byte(name)) > nameLen {
+ return Name{}, errCalcLen
+ }
+ n := Name{Length: uint8(len(name))}
+ copy(n.Data[:], []byte(name))
+ return n, nil
+}
+
+// MustNewName creates a new Name from a string and panics on error.
+func MustNewName(name string) Name {
+ n, err := NewName(name)
+ if err != nil {
+ panic("creating name: " + err.Error())
+ }
+ return n
+}
+
+// String implements fmt.Stringer.String.
+func (n Name) String() string {
+ return string(n.Data[:n.Length])
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (n *Name) GoString() string {
+ return `dnsmessage.MustNewName("` + printString(n.Data[:n.Length]) + `")`
+}
+
+// pack appends the wire format of the Name to msg.
+//
+// Domain names are a sequence of counted strings split at the dots. They end
+// with a zero-length string. Compression can be used to reuse domain suffixes.
+//
+// The compression map will be updated with new domain suffixes. If compression
+// is nil, compression will not be used.
+func (n *Name) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ oldMsg := msg
+
+ // Add a trailing dot to canonicalize name.
+ if n.Length == 0 || n.Data[n.Length-1] != '.' {
+ return oldMsg, errNonCanonicalName
+ }
+
+ // Allow root domain.
+ if n.Data[0] == '.' && n.Length == 1 {
+ return append(msg, 0), nil
+ }
+
+ // Emit sequence of counted strings, chopping at dots.
+ for i, begin := 0, 0; i < int(n.Length); i++ {
+ // Check for the end of the segment.
+ if n.Data[i] == '.' {
+ // The two most significant bits have special meaning.
+ // It isn't allowed for segments to be long enough to
+ // need them.
+ if i-begin >= 1<<6 {
+ return oldMsg, errSegTooLong
+ }
+
+ // Segments must have a non-zero length.
+ if i-begin == 0 {
+ return oldMsg, errZeroSegLen
+ }
+
+ msg = append(msg, byte(i-begin))
+
+ for j := begin; j < i; j++ {
+ msg = append(msg, n.Data[j])
+ }
+
+ begin = i + 1
+ continue
+ }
+
+ // We can only compress domain suffixes starting with a new
+ // segment. A pointer is two bytes with the two most significant
+ // bits set to 1 to indicate that it is a pointer.
+ if (i == 0 || n.Data[i-1] == '.') && compression != nil {
+ if ptr, ok := compression[string(n.Data[i:])]; ok {
+ // Hit. Emit a pointer instead of the rest of
+ // the domain.
+ return append(msg, byte(ptr>>8|0xC0), byte(ptr)), nil
+ }
+
+ // Miss. Add the suffix to the compression table if the
+ // offset can be stored in the available 14 bytes.
+ if len(msg) <= int(^uint16(0)>>2) {
+ compression[string(n.Data[i:])] = len(msg) - compressionOff
+ }
+ }
+ }
+ return append(msg, 0), nil
+}
+
+// unpack unpacks a domain name.
+func (n *Name) unpack(msg []byte, off int) (int, error) {
+ return n.unpackCompressed(msg, off, true /* allowCompression */)
+}
+
+func (n *Name) unpackCompressed(msg []byte, off int, allowCompression bool) (int, error) {
+ // currOff is the current working offset.
+ currOff := off
+
+ // newOff is the offset where the next record will start. Pointers lead
+ // to data that belongs to other names and thus doesn't count towards to
+ // the usage of this name.
+ newOff := off
+
+ // ptr is the number of pointers followed.
+ var ptr int
+
+ // Name is a slice representation of the name data.
+ name := n.Data[:0]
+
+Loop:
+ for {
+ if currOff >= len(msg) {
+ return off, errBaseLen
+ }
+ c := int(msg[currOff])
+ currOff++
+ switch c & 0xC0 {
+ case 0x00: // String segment
+ if c == 0x00 {
+ // A zero length signals the end of the name.
+ break Loop
+ }
+ endOff := currOff + c
+ if endOff > len(msg) {
+ return off, errCalcLen
+ }
+ name = append(name, msg[currOff:endOff]...)
+ name = append(name, '.')
+ currOff = endOff
+ case 0xC0: // Pointer
+ if !allowCompression {
+ return off, errCompressedSRV
+ }
+ if currOff >= len(msg) {
+ return off, errInvalidPtr
+ }
+ c1 := msg[currOff]
+ currOff++
+ if ptr == 0 {
+ newOff = currOff
+ }
+ // Don't follow too many pointers, maybe there's a loop.
+ if ptr++; ptr > 10 {
+ return off, errTooManyPtr
+ }
+ currOff = (c^0xC0)<<8 | int(c1)
+ default:
+ // Prefixes 0x80 and 0x40 are reserved.
+ return off, errReserved
+ }
+ }
+ if len(name) == 0 {
+ name = append(name, '.')
+ }
+ if len(name) > len(n.Data) {
+ return off, errCalcLen
+ }
+ n.Length = uint8(len(name))
+ if ptr == 0 {
+ newOff = currOff
+ }
+ return newOff, nil
+}
+
+func skipName(msg []byte, off int) (int, error) {
+ // newOff is the offset where the next record will start. Pointers lead
+ // to data that belongs to other names and thus doesn't count towards to
+ // the usage of this name.
+ newOff := off
+
+Loop:
+ for {
+ if newOff >= len(msg) {
+ return off, errBaseLen
+ }
+ c := int(msg[newOff])
+ newOff++
+ switch c & 0xC0 {
+ case 0x00:
+ if c == 0x00 {
+ // A zero length signals the end of the name.
+ break Loop
+ }
+ // literal string
+ newOff += c
+ if newOff > len(msg) {
+ return off, errCalcLen
+ }
+ case 0xC0:
+ // Pointer to somewhere else in msg.
+
+ // Pointers are two bytes.
+ newOff++
+
+ // Don't follow the pointer as the data here has ended.
+ break Loop
+ default:
+ // Prefixes 0x80 and 0x40 are reserved.
+ return off, errReserved
+ }
+ }
+
+ return newOff, nil
+}
+
+// A Question is a DNS query.
+type Question struct {
+ Name Name
+ Type Type
+ Class Class
+}
+
+// pack appends the wire format of the Question to msg.
+func (q *Question) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ msg, err := q.Name.pack(msg, compression, compressionOff)
+ if err != nil {
+ return msg, &nestedError{"Name", err}
+ }
+ msg = packType(msg, q.Type)
+ return packClass(msg, q.Class), nil
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (q *Question) GoString() string {
+ return "dnsmessage.Question{" +
+ "Name: " + q.Name.GoString() + ", " +
+ "Type: " + q.Type.GoString() + ", " +
+ "Class: " + q.Class.GoString() + "}"
+}
+
+func unpackResourceBody(msg []byte, off int, hdr ResourceHeader) (ResourceBody, int, error) {
+ var (
+ r ResourceBody
+ err error
+ name string
+ )
+ switch hdr.Type {
+ case TypeA:
+ var rb AResource
+ rb, err = unpackAResource(msg, off)
+ r = &rb
+ name = "A"
+ case TypeNS:
+ var rb NSResource
+ rb, err = unpackNSResource(msg, off)
+ r = &rb
+ name = "NS"
+ case TypeCNAME:
+ var rb CNAMEResource
+ rb, err = unpackCNAMEResource(msg, off)
+ r = &rb
+ name = "CNAME"
+ case TypeSOA:
+ var rb SOAResource
+ rb, err = unpackSOAResource(msg, off)
+ r = &rb
+ name = "SOA"
+ case TypePTR:
+ var rb PTRResource
+ rb, err = unpackPTRResource(msg, off)
+ r = &rb
+ name = "PTR"
+ case TypeMX:
+ var rb MXResource
+ rb, err = unpackMXResource(msg, off)
+ r = &rb
+ name = "MX"
+ case TypeTXT:
+ var rb TXTResource
+ rb, err = unpackTXTResource(msg, off, hdr.Length)
+ r = &rb
+ name = "TXT"
+ case TypeAAAA:
+ var rb AAAAResource
+ rb, err = unpackAAAAResource(msg, off)
+ r = &rb
+ name = "AAAA"
+ case TypeSRV:
+ var rb SRVResource
+ rb, err = unpackSRVResource(msg, off)
+ r = &rb
+ name = "SRV"
+ case TypeOPT:
+ var rb OPTResource
+ rb, err = unpackOPTResource(msg, off, hdr.Length)
+ r = &rb
+ name = "OPT"
+ default:
+ var rb UnknownResource
+ rb, err = unpackUnknownResource(hdr.Type, msg, off, hdr.Length)
+ r = &rb
+ name = "Unknown"
+ }
+ if err != nil {
+ return nil, off, &nestedError{name + " record", err}
+ }
+ return r, off + int(hdr.Length), nil
+}
+
+// A CNAMEResource is a CNAME Resource record.
+type CNAMEResource struct {
+ CNAME Name
+}
+
+func (r *CNAMEResource) realType() Type {
+ return TypeCNAME
+}
+
+// pack appends the wire format of the CNAMEResource to msg.
+func (r *CNAMEResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ return r.CNAME.pack(msg, compression, compressionOff)
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (r *CNAMEResource) GoString() string {
+ return "dnsmessage.CNAMEResource{CNAME: " + r.CNAME.GoString() + "}"
+}
+
+func unpackCNAMEResource(msg []byte, off int) (CNAMEResource, error) {
+ var cname Name
+ if _, err := cname.unpack(msg, off); err != nil {
+ return CNAMEResource{}, err
+ }
+ return CNAMEResource{cname}, nil
+}
+
+// An MXResource is an MX Resource record.
+type MXResource struct {
+ Pref uint16
+ MX Name
+}
+
+func (r *MXResource) realType() Type {
+ return TypeMX
+}
+
+// pack appends the wire format of the MXResource to msg.
+func (r *MXResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ oldMsg := msg
+ msg = packUint16(msg, r.Pref)
+ msg, err := r.MX.pack(msg, compression, compressionOff)
+ if err != nil {
+ return oldMsg, &nestedError{"MXResource.MX", err}
+ }
+ return msg, nil
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (r *MXResource) GoString() string {
+ return "dnsmessage.MXResource{" +
+ "Pref: " + printUint16(r.Pref) + ", " +
+ "MX: " + r.MX.GoString() + "}"
+}
+
+func unpackMXResource(msg []byte, off int) (MXResource, error) {
+ pref, off, err := unpackUint16(msg, off)
+ if err != nil {
+ return MXResource{}, &nestedError{"Pref", err}
+ }
+ var mx Name
+ if _, err := mx.unpack(msg, off); err != nil {
+ return MXResource{}, &nestedError{"MX", err}
+ }
+ return MXResource{pref, mx}, nil
+}
+
+// An NSResource is an NS Resource record.
+type NSResource struct {
+ NS Name
+}
+
+func (r *NSResource) realType() Type {
+ return TypeNS
+}
+
+// pack appends the wire format of the NSResource to msg.
+func (r *NSResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ return r.NS.pack(msg, compression, compressionOff)
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (r *NSResource) GoString() string {
+ return "dnsmessage.NSResource{NS: " + r.NS.GoString() + "}"
+}
+
+func unpackNSResource(msg []byte, off int) (NSResource, error) {
+ var ns Name
+ if _, err := ns.unpack(msg, off); err != nil {
+ return NSResource{}, err
+ }
+ return NSResource{ns}, nil
+}
+
+// A PTRResource is a PTR Resource record.
+type PTRResource struct {
+ PTR Name
+}
+
+func (r *PTRResource) realType() Type {
+ return TypePTR
+}
+
+// pack appends the wire format of the PTRResource to msg.
+func (r *PTRResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ return r.PTR.pack(msg, compression, compressionOff)
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (r *PTRResource) GoString() string {
+ return "dnsmessage.PTRResource{PTR: " + r.PTR.GoString() + "}"
+}
+
+func unpackPTRResource(msg []byte, off int) (PTRResource, error) {
+ var ptr Name
+ if _, err := ptr.unpack(msg, off); err != nil {
+ return PTRResource{}, err
+ }
+ return PTRResource{ptr}, nil
+}
+
+// An SOAResource is an SOA Resource record.
+type SOAResource struct {
+ NS Name
+ MBox Name
+ Serial uint32
+ Refresh uint32
+ Retry uint32
+ Expire uint32
+
+ // MinTTL the is the default TTL of Resources records which did not
+ // contain a TTL value and the TTL of negative responses. (RFC 2308
+ // Section 4)
+ MinTTL uint32
+}
+
+func (r *SOAResource) realType() Type {
+ return TypeSOA
+}
+
+// pack appends the wire format of the SOAResource to msg.
+func (r *SOAResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ oldMsg := msg
+ msg, err := r.NS.pack(msg, compression, compressionOff)
+ if err != nil {
+ return oldMsg, &nestedError{"SOAResource.NS", err}
+ }
+ msg, err = r.MBox.pack(msg, compression, compressionOff)
+ if err != nil {
+ return oldMsg, &nestedError{"SOAResource.MBox", err}
+ }
+ msg = packUint32(msg, r.Serial)
+ msg = packUint32(msg, r.Refresh)
+ msg = packUint32(msg, r.Retry)
+ msg = packUint32(msg, r.Expire)
+ return packUint32(msg, r.MinTTL), nil
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (r *SOAResource) GoString() string {
+ return "dnsmessage.SOAResource{" +
+ "NS: " + r.NS.GoString() + ", " +
+ "MBox: " + r.MBox.GoString() + ", " +
+ "Serial: " + printUint32(r.Serial) + ", " +
+ "Refresh: " + printUint32(r.Refresh) + ", " +
+ "Retry: " + printUint32(r.Retry) + ", " +
+ "Expire: " + printUint32(r.Expire) + ", " +
+ "MinTTL: " + printUint32(r.MinTTL) + "}"
+}
+
+func unpackSOAResource(msg []byte, off int) (SOAResource, error) {
+ var ns Name
+ off, err := ns.unpack(msg, off)
+ if err != nil {
+ return SOAResource{}, &nestedError{"NS", err}
+ }
+ var mbox Name
+ if off, err = mbox.unpack(msg, off); err != nil {
+ return SOAResource{}, &nestedError{"MBox", err}
+ }
+ serial, off, err := unpackUint32(msg, off)
+ if err != nil {
+ return SOAResource{}, &nestedError{"Serial", err}
+ }
+ refresh, off, err := unpackUint32(msg, off)
+ if err != nil {
+ return SOAResource{}, &nestedError{"Refresh", err}
+ }
+ retry, off, err := unpackUint32(msg, off)
+ if err != nil {
+ return SOAResource{}, &nestedError{"Retry", err}
+ }
+ expire, off, err := unpackUint32(msg, off)
+ if err != nil {
+ return SOAResource{}, &nestedError{"Expire", err}
+ }
+ minTTL, _, err := unpackUint32(msg, off)
+ if err != nil {
+ return SOAResource{}, &nestedError{"MinTTL", err}
+ }
+ return SOAResource{ns, mbox, serial, refresh, retry, expire, minTTL}, nil
+}
+
+// A TXTResource is a TXT Resource record.
+type TXTResource struct {
+ TXT []string
+}
+
+func (r *TXTResource) realType() Type {
+ return TypeTXT
+}
+
+// pack appends the wire format of the TXTResource to msg.
+func (r *TXTResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ oldMsg := msg
+ for _, s := range r.TXT {
+ var err error
+ msg, err = packText(msg, s)
+ if err != nil {
+ return oldMsg, err
+ }
+ }
+ return msg, nil
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (r *TXTResource) GoString() string {
+ s := "dnsmessage.TXTResource{TXT: []string{"
+ if len(r.TXT) == 0 {
+ return s + "}}"
+ }
+ s += `"` + printString([]byte(r.TXT[0]))
+ for _, t := range r.TXT[1:] {
+ s += `", "` + printString([]byte(t))
+ }
+ return s + `"}}`
+}
+
+func unpackTXTResource(msg []byte, off int, length uint16) (TXTResource, error) {
+ txts := make([]string, 0, 1)
+ for n := uint16(0); n < length; {
+ var t string
+ var err error
+ if t, off, err = unpackText(msg, off); err != nil {
+ return TXTResource{}, &nestedError{"text", err}
+ }
+ // Check if we got too many bytes.
+ if length-n < uint16(len(t))+1 {
+ return TXTResource{}, errCalcLen
+ }
+ n += uint16(len(t)) + 1
+ txts = append(txts, t)
+ }
+ return TXTResource{txts}, nil
+}
+
+// An SRVResource is an SRV Resource record.
+type SRVResource struct {
+ Priority uint16
+ Weight uint16
+ Port uint16
+ Target Name // Not compressed as per RFC 2782.
+}
+
+func (r *SRVResource) realType() Type {
+ return TypeSRV
+}
+
+// pack appends the wire format of the SRVResource to msg.
+func (r *SRVResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ oldMsg := msg
+ msg = packUint16(msg, r.Priority)
+ msg = packUint16(msg, r.Weight)
+ msg = packUint16(msg, r.Port)
+ msg, err := r.Target.pack(msg, nil, compressionOff)
+ if err != nil {
+ return oldMsg, &nestedError{"SRVResource.Target", err}
+ }
+ return msg, nil
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (r *SRVResource) GoString() string {
+ return "dnsmessage.SRVResource{" +
+ "Priority: " + printUint16(r.Priority) + ", " +
+ "Weight: " + printUint16(r.Weight) + ", " +
+ "Port: " + printUint16(r.Port) + ", " +
+ "Target: " + r.Target.GoString() + "}"
+}
+
+func unpackSRVResource(msg []byte, off int) (SRVResource, error) {
+ priority, off, err := unpackUint16(msg, off)
+ if err != nil {
+ return SRVResource{}, &nestedError{"Priority", err}
+ }
+ weight, off, err := unpackUint16(msg, off)
+ if err != nil {
+ return SRVResource{}, &nestedError{"Weight", err}
+ }
+ port, off, err := unpackUint16(msg, off)
+ if err != nil {
+ return SRVResource{}, &nestedError{"Port", err}
+ }
+ var target Name
+ if _, err := target.unpackCompressed(msg, off, false /* allowCompression */); err != nil {
+ return SRVResource{}, &nestedError{"Target", err}
+ }
+ return SRVResource{priority, weight, port, target}, nil
+}
+
+// An AResource is an A Resource record.
+type AResource struct {
+ A [4]byte
+}
+
+func (r *AResource) realType() Type {
+ return TypeA
+}
+
+// pack appends the wire format of the AResource to msg.
+func (r *AResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ return packBytes(msg, r.A[:]), nil
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (r *AResource) GoString() string {
+ return "dnsmessage.AResource{" +
+ "A: [4]byte{" + printByteSlice(r.A[:]) + "}}"
+}
+
+func unpackAResource(msg []byte, off int) (AResource, error) {
+ var a [4]byte
+ if _, err := unpackBytes(msg, off, a[:]); err != nil {
+ return AResource{}, err
+ }
+ return AResource{a}, nil
+}
+
+// An AAAAResource is an AAAA Resource record.
+type AAAAResource struct {
+ AAAA [16]byte
+}
+
+func (r *AAAAResource) realType() Type {
+ return TypeAAAA
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (r *AAAAResource) GoString() string {
+ return "dnsmessage.AAAAResource{" +
+ "AAAA: [16]byte{" + printByteSlice(r.AAAA[:]) + "}}"
+}
+
+// pack appends the wire format of the AAAAResource to msg.
+func (r *AAAAResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ return packBytes(msg, r.AAAA[:]), nil
+}
+
+func unpackAAAAResource(msg []byte, off int) (AAAAResource, error) {
+ var aaaa [16]byte
+ if _, err := unpackBytes(msg, off, aaaa[:]); err != nil {
+ return AAAAResource{}, err
+ }
+ return AAAAResource{aaaa}, nil
+}
+
+// An OPTResource is an OPT pseudo Resource record.
+//
+// The pseudo resource record is part of the extension mechanisms for DNS
+// as defined in RFC 6891.
+type OPTResource struct {
+ Options []Option
+}
+
+// An Option represents a DNS message option within OPTResource.
+//
+// The message option is part of the extension mechanisms for DNS as
+// defined in RFC 6891.
+type Option struct {
+ Code uint16 // option code
+ Data []byte
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (o *Option) GoString() string {
+ return "dnsmessage.Option{" +
+ "Code: " + printUint16(o.Code) + ", " +
+ "Data: []byte{" + printByteSlice(o.Data) + "}}"
+}
+
+func (r *OPTResource) realType() Type {
+ return TypeOPT
+}
+
+func (r *OPTResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ for _, opt := range r.Options {
+ msg = packUint16(msg, opt.Code)
+ l := uint16(len(opt.Data))
+ msg = packUint16(msg, l)
+ msg = packBytes(msg, opt.Data)
+ }
+ return msg, nil
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (r *OPTResource) GoString() string {
+ s := "dnsmessage.OPTResource{Options: []dnsmessage.Option{"
+ if len(r.Options) == 0 {
+ return s + "}}"
+ }
+ s += r.Options[0].GoString()
+ for _, o := range r.Options[1:] {
+ s += ", " + o.GoString()
+ }
+ return s + "}}"
+}
+
+func unpackOPTResource(msg []byte, off int, length uint16) (OPTResource, error) {
+ var opts []Option
+ for oldOff := off; off < oldOff+int(length); {
+ var err error
+ var o Option
+ o.Code, off, err = unpackUint16(msg, off)
+ if err != nil {
+ return OPTResource{}, &nestedError{"Code", err}
+ }
+ var l uint16
+ l, off, err = unpackUint16(msg, off)
+ if err != nil {
+ return OPTResource{}, &nestedError{"Data", err}
+ }
+ o.Data = make([]byte, l)
+ if copy(o.Data, msg[off:]) != int(l) {
+ return OPTResource{}, &nestedError{"Data", errCalcLen}
+ }
+ off += int(l)
+ opts = append(opts, o)
+ }
+ return OPTResource{opts}, nil
+}
+
+// An UnknownResource is a catch-all container for unknown record types.
+type UnknownResource struct {
+ Type Type
+ Data []byte
+}
+
+func (r *UnknownResource) realType() Type {
+ return r.Type
+}
+
+// pack appends the wire format of the UnknownResource to msg.
+func (r *UnknownResource) pack(msg []byte, compression map[string]int, compressionOff int) ([]byte, error) {
+ return packBytes(msg, r.Data[:]), nil
+}
+
+// GoString implements fmt.GoStringer.GoString.
+func (r *UnknownResource) GoString() string {
+ return "dnsmessage.UnknownResource{" +
+ "Type: " + r.Type.GoString() + ", " +
+ "Data: []byte{" + printByteSlice(r.Data) + "}}"
+}
+
+func unpackUnknownResource(recordType Type, msg []byte, off int, length uint16) (UnknownResource, error) {
+ parsed := UnknownResource{
+ Type: recordType,
+ Data: make([]byte, length),
+ }
+ if _, err := unpackBytes(msg, off, parsed.Data); err != nil {
+ return UnknownResource{}, err
+ }
+ return parsed, nil
+}
diff --git a/vendor/golang.org/x/net/internal/iana/const.go b/vendor/golang.org/x/net/internal/iana/const.go
new file mode 100644
index 0000000..cea712f
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/iana/const.go
@@ -0,0 +1,223 @@
+// go generate gen.go
+// Code generated by the command above; DO NOT EDIT.
+
+// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).
+package iana // import "golang.org/x/net/internal/iana"
+
+// Differentiated Services Field Codepoints (DSCP), Updated: 2018-05-04
+const (
+ DiffServCS0 = 0x00 // CS0
+ DiffServCS1 = 0x20 // CS1
+ DiffServCS2 = 0x40 // CS2
+ DiffServCS3 = 0x60 // CS3
+ DiffServCS4 = 0x80 // CS4
+ DiffServCS5 = 0xa0 // CS5
+ DiffServCS6 = 0xc0 // CS6
+ DiffServCS7 = 0xe0 // CS7
+ DiffServAF11 = 0x28 // AF11
+ DiffServAF12 = 0x30 // AF12
+ DiffServAF13 = 0x38 // AF13
+ DiffServAF21 = 0x48 // AF21
+ DiffServAF22 = 0x50 // AF22
+ DiffServAF23 = 0x58 // AF23
+ DiffServAF31 = 0x68 // AF31
+ DiffServAF32 = 0x70 // AF32
+ DiffServAF33 = 0x78 // AF33
+ DiffServAF41 = 0x88 // AF41
+ DiffServAF42 = 0x90 // AF42
+ DiffServAF43 = 0x98 // AF43
+ DiffServEF = 0xb8 // EF
+ DiffServVOICEADMIT = 0xb0 // VOICE-ADMIT
+ NotECNTransport = 0x00 // Not-ECT (Not ECN-Capable Transport)
+ ECNTransport1 = 0x01 // ECT(1) (ECN-Capable Transport(1))
+ ECNTransport0 = 0x02 // ECT(0) (ECN-Capable Transport(0))
+ CongestionExperienced = 0x03 // CE (Congestion Experienced)
+)
+
+// Protocol Numbers, Updated: 2017-10-13
+const (
+ ProtocolIP = 0 // IPv4 encapsulation, pseudo protocol number
+ ProtocolHOPOPT = 0 // IPv6 Hop-by-Hop Option
+ ProtocolICMP = 1 // Internet Control Message
+ ProtocolIGMP = 2 // Internet Group Management
+ ProtocolGGP = 3 // Gateway-to-Gateway
+ ProtocolIPv4 = 4 // IPv4 encapsulation
+ ProtocolST = 5 // Stream
+ ProtocolTCP = 6 // Transmission Control
+ ProtocolCBT = 7 // CBT
+ ProtocolEGP = 8 // Exterior Gateway Protocol
+ ProtocolIGP = 9 // any private interior gateway (used by Cisco for their IGRP)
+ ProtocolBBNRCCMON = 10 // BBN RCC Monitoring
+ ProtocolNVPII = 11 // Network Voice Protocol
+ ProtocolPUP = 12 // PUP
+ ProtocolEMCON = 14 // EMCON
+ ProtocolXNET = 15 // Cross Net Debugger
+ ProtocolCHAOS = 16 // Chaos
+ ProtocolUDP = 17 // User Datagram
+ ProtocolMUX = 18 // Multiplexing
+ ProtocolDCNMEAS = 19 // DCN Measurement Subsystems
+ ProtocolHMP = 20 // Host Monitoring
+ ProtocolPRM = 21 // Packet Radio Measurement
+ ProtocolXNSIDP = 22 // XEROX NS IDP
+ ProtocolTRUNK1 = 23 // Trunk-1
+ ProtocolTRUNK2 = 24 // Trunk-2
+ ProtocolLEAF1 = 25 // Leaf-1
+ ProtocolLEAF2 = 26 // Leaf-2
+ ProtocolRDP = 27 // Reliable Data Protocol
+ ProtocolIRTP = 28 // Internet Reliable Transaction
+ ProtocolISOTP4 = 29 // ISO Transport Protocol Class 4
+ ProtocolNETBLT = 30 // Bulk Data Transfer Protocol
+ ProtocolMFENSP = 31 // MFE Network Services Protocol
+ ProtocolMERITINP = 32 // MERIT Internodal Protocol
+ ProtocolDCCP = 33 // Datagram Congestion Control Protocol
+ Protocol3PC = 34 // Third Party Connect Protocol
+ ProtocolIDPR = 35 // Inter-Domain Policy Routing Protocol
+ ProtocolXTP = 36 // XTP
+ ProtocolDDP = 37 // Datagram Delivery Protocol
+ ProtocolIDPRCMTP = 38 // IDPR Control Message Transport Proto
+ ProtocolTPPP = 39 // TP++ Transport Protocol
+ ProtocolIL = 40 // IL Transport Protocol
+ ProtocolIPv6 = 41 // IPv6 encapsulation
+ ProtocolSDRP = 42 // Source Demand Routing Protocol
+ ProtocolIPv6Route = 43 // Routing Header for IPv6
+ ProtocolIPv6Frag = 44 // Fragment Header for IPv6
+ ProtocolIDRP = 45 // Inter-Domain Routing Protocol
+ ProtocolRSVP = 46 // Reservation Protocol
+ ProtocolGRE = 47 // Generic Routing Encapsulation
+ ProtocolDSR = 48 // Dynamic Source Routing Protocol
+ ProtocolBNA = 49 // BNA
+ ProtocolESP = 50 // Encap Security Payload
+ ProtocolAH = 51 // Authentication Header
+ ProtocolINLSP = 52 // Integrated Net Layer Security TUBA
+ ProtocolNARP = 54 // NBMA Address Resolution Protocol
+ ProtocolMOBILE = 55 // IP Mobility
+ ProtocolTLSP = 56 // Transport Layer Security Protocol using Kryptonet key management
+ ProtocolSKIP = 57 // SKIP
+ ProtocolIPv6ICMP = 58 // ICMP for IPv6
+ ProtocolIPv6NoNxt = 59 // No Next Header for IPv6
+ ProtocolIPv6Opts = 60 // Destination Options for IPv6
+ ProtocolCFTP = 62 // CFTP
+ ProtocolSATEXPAK = 64 // SATNET and Backroom EXPAK
+ ProtocolKRYPTOLAN = 65 // Kryptolan
+ ProtocolRVD = 66 // MIT Remote Virtual Disk Protocol
+ ProtocolIPPC = 67 // Internet Pluribus Packet Core
+ ProtocolSATMON = 69 // SATNET Monitoring
+ ProtocolVISA = 70 // VISA Protocol
+ ProtocolIPCV = 71 // Internet Packet Core Utility
+ ProtocolCPNX = 72 // Computer Protocol Network Executive
+ ProtocolCPHB = 73 // Computer Protocol Heart Beat
+ ProtocolWSN = 74 // Wang Span Network
+ ProtocolPVP = 75 // Packet Video Protocol
+ ProtocolBRSATMON = 76 // Backroom SATNET Monitoring
+ ProtocolSUNND = 77 // SUN ND PROTOCOL-Temporary
+ ProtocolWBMON = 78 // WIDEBAND Monitoring
+ ProtocolWBEXPAK = 79 // WIDEBAND EXPAK
+ ProtocolISOIP = 80 // ISO Internet Protocol
+ ProtocolVMTP = 81 // VMTP
+ ProtocolSECUREVMTP = 82 // SECURE-VMTP
+ ProtocolVINES = 83 // VINES
+ ProtocolTTP = 84 // Transaction Transport Protocol
+ ProtocolIPTM = 84 // Internet Protocol Traffic Manager
+ ProtocolNSFNETIGP = 85 // NSFNET-IGP
+ ProtocolDGP = 86 // Dissimilar Gateway Protocol
+ ProtocolTCF = 87 // TCF
+ ProtocolEIGRP = 88 // EIGRP
+ ProtocolOSPFIGP = 89 // OSPFIGP
+ ProtocolSpriteRPC = 90 // Sprite RPC Protocol
+ ProtocolLARP = 91 // Locus Address Resolution Protocol
+ ProtocolMTP = 92 // Multicast Transport Protocol
+ ProtocolAX25 = 93 // AX.25 Frames
+ ProtocolIPIP = 94 // IP-within-IP Encapsulation Protocol
+ ProtocolSCCSP = 96 // Semaphore Communications Sec. Pro.
+ ProtocolETHERIP = 97 // Ethernet-within-IP Encapsulation
+ ProtocolENCAP = 98 // Encapsulation Header
+ ProtocolGMTP = 100 // GMTP
+ ProtocolIFMP = 101 // Ipsilon Flow Management Protocol
+ ProtocolPNNI = 102 // PNNI over IP
+ ProtocolPIM = 103 // Protocol Independent Multicast
+ ProtocolARIS = 104 // ARIS
+ ProtocolSCPS = 105 // SCPS
+ ProtocolQNX = 106 // QNX
+ ProtocolAN = 107 // Active Networks
+ ProtocolIPComp = 108 // IP Payload Compression Protocol
+ ProtocolSNP = 109 // Sitara Networks Protocol
+ ProtocolCompaqPeer = 110 // Compaq Peer Protocol
+ ProtocolIPXinIP = 111 // IPX in IP
+ ProtocolVRRP = 112 // Virtual Router Redundancy Protocol
+ ProtocolPGM = 113 // PGM Reliable Transport Protocol
+ ProtocolL2TP = 115 // Layer Two Tunneling Protocol
+ ProtocolDDX = 116 // D-II Data Exchange (DDX)
+ ProtocolIATP = 117 // Interactive Agent Transfer Protocol
+ ProtocolSTP = 118 // Schedule Transfer Protocol
+ ProtocolSRP = 119 // SpectraLink Radio Protocol
+ ProtocolUTI = 120 // UTI
+ ProtocolSMP = 121 // Simple Message Protocol
+ ProtocolPTP = 123 // Performance Transparency Protocol
+ ProtocolISIS = 124 // ISIS over IPv4
+ ProtocolFIRE = 125 // FIRE
+ ProtocolCRTP = 126 // Combat Radio Transport Protocol
+ ProtocolCRUDP = 127 // Combat Radio User Datagram
+ ProtocolSSCOPMCE = 128 // SSCOPMCE
+ ProtocolIPLT = 129 // IPLT
+ ProtocolSPS = 130 // Secure Packet Shield
+ ProtocolPIPE = 131 // Private IP Encapsulation within IP
+ ProtocolSCTP = 132 // Stream Control Transmission Protocol
+ ProtocolFC = 133 // Fibre Channel
+ ProtocolRSVPE2EIGNORE = 134 // RSVP-E2E-IGNORE
+ ProtocolMobilityHeader = 135 // Mobility Header
+ ProtocolUDPLite = 136 // UDPLite
+ ProtocolMPLSinIP = 137 // MPLS-in-IP
+ ProtocolMANET = 138 // MANET Protocols
+ ProtocolHIP = 139 // Host Identity Protocol
+ ProtocolShim6 = 140 // Shim6 Protocol
+ ProtocolWESP = 141 // Wrapped Encapsulating Security Payload
+ ProtocolROHC = 142 // Robust Header Compression
+ ProtocolReserved = 255 // Reserved
+)
+
+// Address Family Numbers, Updated: 2018-04-02
+const (
+ AddrFamilyIPv4 = 1 // IP (IP version 4)
+ AddrFamilyIPv6 = 2 // IP6 (IP version 6)
+ AddrFamilyNSAP = 3 // NSAP
+ AddrFamilyHDLC = 4 // HDLC (8-bit multidrop)
+ AddrFamilyBBN1822 = 5 // BBN 1822
+ AddrFamily802 = 6 // 802 (includes all 802 media plus Ethernet "canonical format")
+ AddrFamilyE163 = 7 // E.163
+ AddrFamilyE164 = 8 // E.164 (SMDS, Frame Relay, ATM)
+ AddrFamilyF69 = 9 // F.69 (Telex)
+ AddrFamilyX121 = 10 // X.121 (X.25, Frame Relay)
+ AddrFamilyIPX = 11 // IPX
+ AddrFamilyAppletalk = 12 // Appletalk
+ AddrFamilyDecnetIV = 13 // Decnet IV
+ AddrFamilyBanyanVines = 14 // Banyan Vines
+ AddrFamilyE164withSubaddress = 15 // E.164 with NSAP format subaddress
+ AddrFamilyDNS = 16 // DNS (Domain Name System)
+ AddrFamilyDistinguishedName = 17 // Distinguished Name
+ AddrFamilyASNumber = 18 // AS Number
+ AddrFamilyXTPoverIPv4 = 19 // XTP over IP version 4
+ AddrFamilyXTPoverIPv6 = 20 // XTP over IP version 6
+ AddrFamilyXTPnativemodeXTP = 21 // XTP native mode XTP
+ AddrFamilyFibreChannelWorldWidePortName = 22 // Fibre Channel World-Wide Port Name
+ AddrFamilyFibreChannelWorldWideNodeName = 23 // Fibre Channel World-Wide Node Name
+ AddrFamilyGWID = 24 // GWID
+ AddrFamilyL2VPN = 25 // AFI for L2VPN information
+ AddrFamilyMPLSTPSectionEndpointID = 26 // MPLS-TP Section Endpoint Identifier
+ AddrFamilyMPLSTPLSPEndpointID = 27 // MPLS-TP LSP Endpoint Identifier
+ AddrFamilyMPLSTPPseudowireEndpointID = 28 // MPLS-TP Pseudowire Endpoint Identifier
+ AddrFamilyMTIPv4 = 29 // MT IP: Multi-Topology IP version 4
+ AddrFamilyMTIPv6 = 30 // MT IPv6: Multi-Topology IP version 6
+ AddrFamilyEIGRPCommonServiceFamily = 16384 // EIGRP Common Service Family
+ AddrFamilyEIGRPIPv4ServiceFamily = 16385 // EIGRP IPv4 Service Family
+ AddrFamilyEIGRPIPv6ServiceFamily = 16386 // EIGRP IPv6 Service Family
+ AddrFamilyLISPCanonicalAddressFormat = 16387 // LISP Canonical Address Format (LCAF)
+ AddrFamilyBGPLS = 16388 // BGP-LS
+ AddrFamily48bitMAC = 16389 // 48-bit MAC
+ AddrFamily64bitMAC = 16390 // 64-bit MAC
+ AddrFamilyOUI = 16391 // OUI
+ AddrFamilyMACFinal24bits = 16392 // MAC/24
+ AddrFamilyMACFinal40bits = 16393 // MAC/40
+ AddrFamilyIPv6Initial64bits = 16394 // IPv6/64
+ AddrFamilyRBridgePortID = 16395 // RBridge Port ID
+ AddrFamilyTRILLNickname = 16396 // TRILL Nickname
+)
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr.go b/vendor/golang.org/x/net/internal/socket/cmsghdr.go
new file mode 100644
index 0000000..4bdaaaf
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr.go
@@ -0,0 +1,12 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
+
+package socket
+
+func (h *cmsghdr) len() int { return int(h.Len) }
+func (h *cmsghdr) lvl() int { return int(h.Level) }
+func (h *cmsghdr) typ() int { return int(h.Type) }
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go
new file mode 100644
index 0000000..0d30e0a
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go
@@ -0,0 +1,14 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd
+// +build aix darwin dragonfly freebsd netbsd openbsd
+
+package socket
+
+func (h *cmsghdr) set(l, lvl, typ int) {
+ h.Len = uint32(l)
+ h.Level = int32(lvl)
+ h.Type = int32(typ)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go
new file mode 100644
index 0000000..4936e8a
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go
@@ -0,0 +1,15 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (arm || mips || mipsle || 386 || ppc) && linux
+// +build arm mips mipsle 386 ppc
+// +build linux
+
+package socket
+
+func (h *cmsghdr) set(l, lvl, typ int) {
+ h.Len = uint32(l)
+ h.Level = int32(lvl)
+ h.Type = int32(typ)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go
new file mode 100644
index 0000000..1ba4310
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go
@@ -0,0 +1,15 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (arm64 || amd64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux
+// +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
+// +build linux
+
+package socket
+
+func (h *cmsghdr) set(l, lvl, typ int) {
+ h.Len = uint64(l)
+ h.Level = int32(lvl)
+ h.Type = int32(typ)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go
new file mode 100644
index 0000000..d3dbe1b
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go
@@ -0,0 +1,14 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build amd64 && solaris
+// +build amd64,solaris
+
+package socket
+
+func (h *cmsghdr) set(l, lvl, typ int) {
+ h.Len = uint32(l)
+ h.Level = int32(lvl)
+ h.Type = int32(typ)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go
new file mode 100644
index 0000000..1d9f2ed
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go
@@ -0,0 +1,28 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
+
+package socket
+
+func controlHeaderLen() int {
+ return 0
+}
+
+func controlMessageLen(dataLen int) int {
+ return 0
+}
+
+func controlMessageSpace(dataLen int) int {
+ return 0
+}
+
+type cmsghdr struct{}
+
+func (h *cmsghdr) len() int { return 0 }
+func (h *cmsghdr) lvl() int { return 0 }
+func (h *cmsghdr) typ() int { return 0 }
+
+func (h *cmsghdr) set(l, lvl, typ int) {}
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go
new file mode 100644
index 0000000..aa1b062
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go
@@ -0,0 +1,22 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+
+package socket
+
+import "golang.org/x/sys/unix"
+
+func controlHeaderLen() int {
+ return unix.CmsgLen(0)
+}
+
+func controlMessageLen(dataLen int) int {
+ return unix.CmsgLen(dataLen)
+}
+
+func controlMessageSpace(dataLen int) int {
+ return unix.CmsgSpace(dataLen)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_zos_s390x.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_zos_s390x.go
new file mode 100644
index 0000000..98be146
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_zos_s390x.go
@@ -0,0 +1,25 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+import "syscall"
+
+func (h *cmsghdr) set(l, lvl, typ int) {
+ h.Len = int32(l)
+ h.Level = int32(lvl)
+ h.Type = int32(typ)
+}
+
+func controlHeaderLen() int {
+ return syscall.CmsgLen(0)
+}
+
+func controlMessageLen(dataLen int) int {
+ return syscall.CmsgLen(dataLen)
+}
+
+func controlMessageSpace(dataLen int) int {
+ return syscall.CmsgSpace(dataLen)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/empty.s b/vendor/golang.org/x/net/internal/socket/empty.s
new file mode 100644
index 0000000..bff0231
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/empty.s
@@ -0,0 +1,7 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build darwin,go1.12
+
+// This exists solely so we can linkname in symbols from syscall.
diff --git a/vendor/golang.org/x/net/internal/socket/error_unix.go b/vendor/golang.org/x/net/internal/socket/error_unix.go
new file mode 100644
index 0000000..78f4129
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/error_unix.go
@@ -0,0 +1,32 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
+
+package socket
+
+import "syscall"
+
+var (
+ errEAGAIN error = syscall.EAGAIN
+ errEINVAL error = syscall.EINVAL
+ errENOENT error = syscall.ENOENT
+)
+
+// errnoErr returns common boxed Errno values, to prevent allocations
+// at runtime.
+func errnoErr(errno syscall.Errno) error {
+ switch errno {
+ case 0:
+ return nil
+ case syscall.EAGAIN:
+ return errEAGAIN
+ case syscall.EINVAL:
+ return errEINVAL
+ case syscall.ENOENT:
+ return errENOENT
+ }
+ return errno
+}
diff --git a/vendor/golang.org/x/net/internal/socket/error_windows.go b/vendor/golang.org/x/net/internal/socket/error_windows.go
new file mode 100644
index 0000000..6a6379a
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/error_windows.go
@@ -0,0 +1,26 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+import "syscall"
+
+var (
+ errERROR_IO_PENDING error = syscall.ERROR_IO_PENDING
+ errEINVAL error = syscall.EINVAL
+)
+
+// errnoErr returns common boxed Errno values, to prevent allocations
+// at runtime.
+func errnoErr(errno syscall.Errno) error {
+ switch errno {
+ case 0:
+ return nil
+ case syscall.ERROR_IO_PENDING:
+ return errERROR_IO_PENDING
+ case syscall.EINVAL:
+ return errEINVAL
+ }
+ return errno
+}
diff --git a/vendor/golang.org/x/net/internal/socket/iovec_32bit.go b/vendor/golang.org/x/net/internal/socket/iovec_32bit.go
new file mode 100644
index 0000000..2b8fbb3
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/iovec_32bit.go
@@ -0,0 +1,20 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (arm || mips || mipsle || 386 || ppc) && (darwin || dragonfly || freebsd || linux || netbsd || openbsd)
+// +build arm mips mipsle 386 ppc
+// +build darwin dragonfly freebsd linux netbsd openbsd
+
+package socket
+
+import "unsafe"
+
+func (v *iovec) set(b []byte) {
+ l := len(b)
+ if l == 0 {
+ return
+ }
+ v.Base = (*byte)(unsafe.Pointer(&b[0]))
+ v.Len = uint32(l)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/iovec_64bit.go b/vendor/golang.org/x/net/internal/socket/iovec_64bit.go
new file mode 100644
index 0000000..3dc5def
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/iovec_64bit.go
@@ -0,0 +1,20 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (arm64 || amd64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || zos)
+// +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
+// +build aix darwin dragonfly freebsd linux netbsd openbsd zos
+
+package socket
+
+import "unsafe"
+
+func (v *iovec) set(b []byte) {
+ l := len(b)
+ if l == 0 {
+ return
+ }
+ v.Base = (*byte)(unsafe.Pointer(&b[0]))
+ v.Len = uint64(l)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go b/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go
new file mode 100644
index 0000000..f7da2bc
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go
@@ -0,0 +1,19 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build amd64 && solaris
+// +build amd64,solaris
+
+package socket
+
+import "unsafe"
+
+func (v *iovec) set(b []byte) {
+ l := len(b)
+ if l == 0 {
+ return
+ }
+ v.Base = (*int8)(unsafe.Pointer(&b[0]))
+ v.Len = uint64(l)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/iovec_stub.go b/vendor/golang.org/x/net/internal/socket/iovec_stub.go
new file mode 100644
index 0000000..14caf52
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/iovec_stub.go
@@ -0,0 +1,12 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
+
+package socket
+
+type iovec struct{}
+
+func (v *iovec) set(b []byte) {}
diff --git a/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go b/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go
new file mode 100644
index 0000000..113e773
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go
@@ -0,0 +1,22 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !linux && !netbsd
+// +build !aix,!linux,!netbsd
+
+package socket
+
+import "net"
+
+type mmsghdr struct{}
+
+type mmsghdrs []mmsghdr
+
+func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error {
+ return nil
+}
+
+func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error {
+ return nil
+}
diff --git a/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go b/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go
new file mode 100644
index 0000000..40ebeda
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go
@@ -0,0 +1,114 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || linux || netbsd
+// +build aix linux netbsd
+
+package socket
+
+import (
+ "net"
+ "sync"
+)
+
+type mmsghdrs []mmsghdr
+
+func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error {
+ for i := range hs {
+ ms[i].N = int(hs[i].Len)
+ ms[i].NN = hs[i].Hdr.controllen()
+ ms[i].Flags = hs[i].Hdr.flags()
+ if parseFn != nil {
+ var err error
+ ms[i].Addr, err = parseFn(hs[i].Hdr.name(), hint)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+// mmsghdrsPacker packs Message-slices into mmsghdrs (re-)using pre-allocated buffers.
+type mmsghdrsPacker struct {
+ // hs are the pre-allocated mmsghdrs.
+ hs mmsghdrs
+ // sockaddrs is the pre-allocated buffer for the Hdr.Name buffers.
+ // We use one large buffer for all messages and slice it up.
+ sockaddrs []byte
+ // vs are the pre-allocated iovecs.
+ // We allocate one large buffer for all messages and slice it up. This allows to reuse the buffer
+ // if the number of buffers per message is distributed differently between calls.
+ vs []iovec
+}
+
+func (p *mmsghdrsPacker) prepare(ms []Message) {
+ n := len(ms)
+ if n <= cap(p.hs) {
+ p.hs = p.hs[:n]
+ } else {
+ p.hs = make(mmsghdrs, n)
+ }
+ if n*sizeofSockaddrInet6 <= cap(p.sockaddrs) {
+ p.sockaddrs = p.sockaddrs[:n*sizeofSockaddrInet6]
+ } else {
+ p.sockaddrs = make([]byte, n*sizeofSockaddrInet6)
+ }
+
+ nb := 0
+ for _, m := range ms {
+ nb += len(m.Buffers)
+ }
+ if nb <= cap(p.vs) {
+ p.vs = p.vs[:nb]
+ } else {
+ p.vs = make([]iovec, nb)
+ }
+}
+
+func (p *mmsghdrsPacker) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr, []byte) int) mmsghdrs {
+ p.prepare(ms)
+ hs := p.hs
+ vsRest := p.vs
+ saRest := p.sockaddrs
+ for i := range hs {
+ nvs := len(ms[i].Buffers)
+ vs := vsRest[:nvs]
+ vsRest = vsRest[nvs:]
+
+ var sa []byte
+ if parseFn != nil {
+ sa = saRest[:sizeofSockaddrInet6]
+ saRest = saRest[sizeofSockaddrInet6:]
+ } else if marshalFn != nil {
+ n := marshalFn(ms[i].Addr, saRest)
+ if n > 0 {
+ sa = saRest[:n]
+ saRest = saRest[n:]
+ }
+ }
+ hs[i].Hdr.pack(vs, ms[i].Buffers, ms[i].OOB, sa)
+ }
+ return hs
+}
+
+var defaultMmsghdrsPool = mmsghdrsPool{
+ p: sync.Pool{
+ New: func() interface{} {
+ return new(mmsghdrsPacker)
+ },
+ },
+}
+
+type mmsghdrsPool struct {
+ p sync.Pool
+}
+
+func (p *mmsghdrsPool) Get() *mmsghdrsPacker {
+ return p.p.Get().(*mmsghdrsPacker)
+}
+
+func (p *mmsghdrsPool) Put(packer *mmsghdrsPacker) {
+ p.p.Put(packer)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go b/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go
new file mode 100644
index 0000000..25f6847
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go
@@ -0,0 +1,40 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd
+// +build aix darwin dragonfly freebsd netbsd openbsd
+
+package socket
+
+import "unsafe"
+
+func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
+ for i := range vs {
+ vs[i].set(bs[i])
+ }
+ h.setIov(vs)
+ if len(oob) > 0 {
+ h.Control = (*byte)(unsafe.Pointer(&oob[0]))
+ h.Controllen = uint32(len(oob))
+ }
+ if sa != nil {
+ h.Name = (*byte)(unsafe.Pointer(&sa[0]))
+ h.Namelen = uint32(len(sa))
+ }
+}
+
+func (h *msghdr) name() []byte {
+ if h.Name != nil && h.Namelen > 0 {
+ return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen]
+ }
+ return nil
+}
+
+func (h *msghdr) controllen() int {
+ return int(h.Controllen)
+}
+
+func (h *msghdr) flags() int {
+ return int(h.Flags)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go b/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go
new file mode 100644
index 0000000..5b8e00f
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go
@@ -0,0 +1,17 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || netbsd
+// +build aix darwin dragonfly freebsd netbsd
+
+package socket
+
+func (h *msghdr) setIov(vs []iovec) {
+ l := len(vs)
+ if l == 0 {
+ return
+ }
+ h.Iov = &vs[0]
+ h.Iovlen = int32(l)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_linux.go b/vendor/golang.org/x/net/internal/socket/msghdr_linux.go
new file mode 100644
index 0000000..c3c7cc4
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_linux.go
@@ -0,0 +1,39 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+import "unsafe"
+
+func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
+ for i := range vs {
+ vs[i].set(bs[i])
+ }
+ h.setIov(vs)
+ if len(oob) > 0 {
+ h.setControl(oob)
+ }
+ if sa != nil {
+ h.Name = (*byte)(unsafe.Pointer(&sa[0]))
+ h.Namelen = uint32(len(sa))
+ } else {
+ h.Name = nil
+ h.Namelen = 0
+ }
+}
+
+func (h *msghdr) name() []byte {
+ if h.Name != nil && h.Namelen > 0 {
+ return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen]
+ }
+ return nil
+}
+
+func (h *msghdr) controllen() int {
+ return int(h.Controllen)
+}
+
+func (h *msghdr) flags() int {
+ return int(h.Flags)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go b/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go
new file mode 100644
index 0000000..b4658fb
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go
@@ -0,0 +1,25 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (arm || mips || mipsle || 386 || ppc) && linux
+// +build arm mips mipsle 386 ppc
+// +build linux
+
+package socket
+
+import "unsafe"
+
+func (h *msghdr) setIov(vs []iovec) {
+ l := len(vs)
+ if l == 0 {
+ return
+ }
+ h.Iov = &vs[0]
+ h.Iovlen = uint32(l)
+}
+
+func (h *msghdr) setControl(b []byte) {
+ h.Control = (*byte)(unsafe.Pointer(&b[0]))
+ h.Controllen = uint32(len(b))
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go b/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go
new file mode 100644
index 0000000..c9c592d
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go
@@ -0,0 +1,25 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (arm64 || amd64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux
+// +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
+// +build linux
+
+package socket
+
+import "unsafe"
+
+func (h *msghdr) setIov(vs []iovec) {
+ l := len(vs)
+ if l == 0 {
+ return
+ }
+ h.Iov = &vs[0]
+ h.Iovlen = uint64(l)
+}
+
+func (h *msghdr) setControl(b []byte) {
+ h.Control = (*byte)(unsafe.Pointer(&b[0]))
+ h.Controllen = uint64(len(b))
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go b/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go
new file mode 100644
index 0000000..71a69e2
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go
@@ -0,0 +1,14 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+func (h *msghdr) setIov(vs []iovec) {
+ l := len(vs)
+ if l == 0 {
+ return
+ }
+ h.Iov = &vs[0]
+ h.Iovlen = uint32(l)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go b/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go
new file mode 100644
index 0000000..3098f5d
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go
@@ -0,0 +1,36 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build amd64 && solaris
+// +build amd64,solaris
+
+package socket
+
+import "unsafe"
+
+func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
+ for i := range vs {
+ vs[i].set(bs[i])
+ }
+ if len(vs) > 0 {
+ h.Iov = &vs[0]
+ h.Iovlen = int32(len(vs))
+ }
+ if len(oob) > 0 {
+ h.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
+ h.Accrightslen = int32(len(oob))
+ }
+ if sa != nil {
+ h.Name = (*byte)(unsafe.Pointer(&sa[0]))
+ h.Namelen = uint32(len(sa))
+ }
+}
+
+func (h *msghdr) controllen() int {
+ return int(h.Accrightslen)
+}
+
+func (h *msghdr) flags() int {
+ return int(NativeEndian.Uint32(h.Pad_cgo_2[:]))
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_stub.go b/vendor/golang.org/x/net/internal/socket/msghdr_stub.go
new file mode 100644
index 0000000..eb79151
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_stub.go
@@ -0,0 +1,15 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
+
+package socket
+
+type msghdr struct{}
+
+func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {}
+func (h *msghdr) name() []byte { return nil }
+func (h *msghdr) controllen() int { return 0 }
+func (h *msghdr) flags() int { return 0 }
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go b/vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go
new file mode 100644
index 0000000..324e9ee
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go
@@ -0,0 +1,36 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build s390x && zos
+// +build s390x,zos
+
+package socket
+
+import "unsafe"
+
+func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
+ for i := range vs {
+ vs[i].set(bs[i])
+ }
+ if len(vs) > 0 {
+ h.Iov = &vs[0]
+ h.Iovlen = int32(len(vs))
+ }
+ if len(oob) > 0 {
+ h.Control = (*byte)(unsafe.Pointer(&oob[0]))
+ h.Controllen = uint32(len(oob))
+ }
+ if sa != nil {
+ h.Name = (*byte)(unsafe.Pointer(&sa[0]))
+ h.Namelen = uint32(len(sa))
+ }
+}
+
+func (h *msghdr) controllen() int {
+ return int(h.Controllen)
+}
+
+func (h *msghdr) flags() int {
+ return int(h.Flags)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go b/vendor/golang.org/x/net/internal/socket/norace.go
index 0e3f25a..de0ad42 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go
+++ b/vendor/golang.org/x/net/internal/socket/norace.go
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin,arm,!go1.12
+//go:build !race
+// +build !race
-package unix
+package socket
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return 0, ENOSYS
+func (m *Message) raceRead() {
+}
+func (m *Message) raceWrite() {
}
diff --git a/vendor/golang.org/x/net/internal/socket/race.go b/vendor/golang.org/x/net/internal/socket/race.go
new file mode 100644
index 0000000..f0a28a6
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/race.go
@@ -0,0 +1,38 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build race
+// +build race
+
+package socket
+
+import (
+ "runtime"
+ "unsafe"
+)
+
+// This package reads and writes the Message buffers using a
+// direct system call, which the race detector can't see.
+// These functions tell the race detector what is going on during the syscall.
+
+func (m *Message) raceRead() {
+ for _, b := range m.Buffers {
+ if len(b) > 0 {
+ runtime.RaceReadRange(unsafe.Pointer(&b[0]), len(b))
+ }
+ }
+ if b := m.OOB; len(b) > 0 {
+ runtime.RaceReadRange(unsafe.Pointer(&b[0]), len(b))
+ }
+}
+func (m *Message) raceWrite() {
+ for _, b := range m.Buffers {
+ if len(b) > 0 {
+ runtime.RaceWriteRange(unsafe.Pointer(&b[0]), len(b))
+ }
+ }
+ if b := m.OOB; len(b) > 0 {
+ runtime.RaceWriteRange(unsafe.Pointer(&b[0]), len(b))
+ }
+}
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn.go b/vendor/golang.org/x/net/internal/socket/rawconn.go
new file mode 100644
index 0000000..87e8107
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/rawconn.go
@@ -0,0 +1,91 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+import (
+ "errors"
+ "net"
+ "os"
+ "syscall"
+)
+
+// A Conn represents a raw connection.
+type Conn struct {
+ network string
+ c syscall.RawConn
+}
+
+// tcpConn is an interface implemented by net.TCPConn.
+// It can be used for interface assertions to check if a net.Conn is a TCP connection.
+type tcpConn interface {
+ SyscallConn() (syscall.RawConn, error)
+ SetLinger(int) error
+}
+
+var _ tcpConn = (*net.TCPConn)(nil)
+
+// udpConn is an interface implemented by net.UDPConn.
+// It can be used for interface assertions to check if a net.Conn is a UDP connection.
+type udpConn interface {
+ SyscallConn() (syscall.RawConn, error)
+ ReadMsgUDP(b, oob []byte) (n, oobn, flags int, addr *net.UDPAddr, err error)
+}
+
+var _ udpConn = (*net.UDPConn)(nil)
+
+// ipConn is an interface implemented by net.IPConn.
+// It can be used for interface assertions to check if a net.Conn is an IP connection.
+type ipConn interface {
+ SyscallConn() (syscall.RawConn, error)
+ ReadMsgIP(b, oob []byte) (n, oobn, flags int, addr *net.IPAddr, err error)
+}
+
+var _ ipConn = (*net.IPConn)(nil)
+
+// NewConn returns a new raw connection.
+func NewConn(c net.Conn) (*Conn, error) {
+ var err error
+ var cc Conn
+ switch c := c.(type) {
+ case tcpConn:
+ cc.network = "tcp"
+ cc.c, err = c.SyscallConn()
+ case udpConn:
+ cc.network = "udp"
+ cc.c, err = c.SyscallConn()
+ case ipConn:
+ cc.network = "ip"
+ cc.c, err = c.SyscallConn()
+ default:
+ return nil, errors.New("unknown connection type")
+ }
+ if err != nil {
+ return nil, err
+ }
+ return &cc, nil
+}
+
+func (o *Option) get(c *Conn, b []byte) (int, error) {
+ var operr error
+ var n int
+ fn := func(s uintptr) {
+ n, operr = getsockopt(s, o.Level, o.Name, b)
+ }
+ if err := c.c.Control(fn); err != nil {
+ return 0, err
+ }
+ return n, os.NewSyscallError("getsockopt", operr)
+}
+
+func (o *Option) set(c *Conn, b []byte) error {
+ var operr error
+ fn := func(s uintptr) {
+ operr = setsockopt(s, o.Level, o.Name, b)
+ }
+ if err := c.c.Control(fn); err != nil {
+ return err
+ }
+ return os.NewSyscallError("setsockopt", operr)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go b/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go
new file mode 100644
index 0000000..d80a15c
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go
@@ -0,0 +1,78 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build linux
+// +build linux
+
+package socket
+
+import (
+ "net"
+ "os"
+ "syscall"
+)
+
+func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
+ for i := range ms {
+ ms[i].raceWrite()
+ }
+ packer := defaultMmsghdrsPool.Get()
+ defer defaultMmsghdrsPool.Put(packer)
+ var parseFn func([]byte, string) (net.Addr, error)
+ if c.network != "tcp" {
+ parseFn = parseInetAddr
+ }
+ hs := packer.pack(ms, parseFn, nil)
+ var operr error
+ var n int
+ fn := func(s uintptr) bool {
+ n, operr = recvmmsg(s, hs, flags)
+ if operr == syscall.EAGAIN {
+ return false
+ }
+ return true
+ }
+ if err := c.c.Read(fn); err != nil {
+ return n, err
+ }
+ if operr != nil {
+ return n, os.NewSyscallError("recvmmsg", operr)
+ }
+ if err := hs[:n].unpack(ms[:n], parseFn, c.network); err != nil {
+ return n, err
+ }
+ return n, nil
+}
+
+func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) {
+ for i := range ms {
+ ms[i].raceRead()
+ }
+ packer := defaultMmsghdrsPool.Get()
+ defer defaultMmsghdrsPool.Put(packer)
+ var marshalFn func(net.Addr, []byte) int
+ if c.network != "tcp" {
+ marshalFn = marshalInetAddr
+ }
+ hs := packer.pack(ms, nil, marshalFn)
+ var operr error
+ var n int
+ fn := func(s uintptr) bool {
+ n, operr = sendmmsg(s, hs, flags)
+ if operr == syscall.EAGAIN {
+ return false
+ }
+ return true
+ }
+ if err := c.c.Write(fn); err != nil {
+ return n, err
+ }
+ if operr != nil {
+ return n, os.NewSyscallError("sendmmsg", operr)
+ }
+ if err := hs[:n].unpack(ms[:n], nil, ""); err != nil {
+ return n, err
+ }
+ return n, nil
+}
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_msg.go b/vendor/golang.org/x/net/internal/socket/rawconn_msg.go
new file mode 100644
index 0000000..2e2d61b
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/rawconn_msg.go
@@ -0,0 +1,81 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
+
+package socket
+
+import (
+ "os"
+ "syscall"
+)
+
+func (c *Conn) recvMsg(m *Message, flags int) error {
+ m.raceWrite()
+ var h msghdr
+ vs := make([]iovec, len(m.Buffers))
+ var sa []byte
+ if c.network != "tcp" {
+ sa = make([]byte, sizeofSockaddrInet6)
+ }
+ h.pack(vs, m.Buffers, m.OOB, sa)
+ var operr error
+ var n int
+ fn := func(s uintptr) bool {
+ n, operr = recvmsg(s, &h, flags)
+ if operr == syscall.EAGAIN || operr == syscall.EWOULDBLOCK {
+ return false
+ }
+ return true
+ }
+ if err := c.c.Read(fn); err != nil {
+ return err
+ }
+ if operr != nil {
+ return os.NewSyscallError("recvmsg", operr)
+ }
+ if c.network != "tcp" {
+ var err error
+ m.Addr, err = parseInetAddr(sa[:], c.network)
+ if err != nil {
+ return err
+ }
+ }
+ m.N = n
+ m.NN = h.controllen()
+ m.Flags = h.flags()
+ return nil
+}
+
+func (c *Conn) sendMsg(m *Message, flags int) error {
+ m.raceRead()
+ var h msghdr
+ vs := make([]iovec, len(m.Buffers))
+ var sa []byte
+ if m.Addr != nil {
+ var a [sizeofSockaddrInet6]byte
+ n := marshalInetAddr(m.Addr, a[:])
+ sa = a[:n]
+ }
+ h.pack(vs, m.Buffers, m.OOB, sa)
+ var operr error
+ var n int
+ fn := func(s uintptr) bool {
+ n, operr = sendmsg(s, &h, flags)
+ if operr == syscall.EAGAIN || operr == syscall.EWOULDBLOCK {
+ return false
+ }
+ return true
+ }
+ if err := c.c.Write(fn); err != nil {
+ return err
+ }
+ if operr != nil {
+ return os.NewSyscallError("sendmsg", operr)
+ }
+ m.N = n
+ m.NN = len(m.OOB)
+ return nil
+}
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go b/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go
new file mode 100644
index 0000000..02f3285
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go
@@ -0,0 +1,16 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !linux
+// +build !linux
+
+package socket
+
+func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
+ return 0, errNotImplemented
+}
+
+func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) {
+ return 0, errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go b/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go
new file mode 100644
index 0000000..dd78587
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go
@@ -0,0 +1,16 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
+
+package socket
+
+func (c *Conn) recvMsg(m *Message, flags int) error {
+ return errNotImplemented
+}
+
+func (c *Conn) sendMsg(m *Message, flags int) error {
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/internal/socket/socket.go b/vendor/golang.org/x/net/internal/socket/socket.go
new file mode 100644
index 0000000..dba47bf
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/socket.go
@@ -0,0 +1,280 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package socket provides a portable interface for socket system
+// calls.
+package socket // import "golang.org/x/net/internal/socket"
+
+import (
+ "errors"
+ "net"
+ "runtime"
+ "unsafe"
+)
+
+var errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH)
+
+// An Option represents a sticky socket option.
+type Option struct {
+ Level int // level
+ Name int // name; must be equal or greater than 1
+ Len int // length of value in bytes; must be equal or greater than 1
+}
+
+// Get reads a value for the option from the kernel.
+// It returns the number of bytes written into b.
+func (o *Option) Get(c *Conn, b []byte) (int, error) {
+ if o.Name < 1 || o.Len < 1 {
+ return 0, errors.New("invalid option")
+ }
+ if len(b) < o.Len {
+ return 0, errors.New("short buffer")
+ }
+ return o.get(c, b)
+}
+
+// GetInt returns an integer value for the option.
+//
+// The Len field of Option must be either 1 or 4.
+func (o *Option) GetInt(c *Conn) (int, error) {
+ if o.Len != 1 && o.Len != 4 {
+ return 0, errors.New("invalid option")
+ }
+ var b []byte
+ var bb [4]byte
+ if o.Len == 1 {
+ b = bb[:1]
+ } else {
+ b = bb[:4]
+ }
+ n, err := o.get(c, b)
+ if err != nil {
+ return 0, err
+ }
+ if n != o.Len {
+ return 0, errors.New("invalid option length")
+ }
+ if o.Len == 1 {
+ return int(b[0]), nil
+ }
+ return int(NativeEndian.Uint32(b[:4])), nil
+}
+
+// Set writes the option and value to the kernel.
+func (o *Option) Set(c *Conn, b []byte) error {
+ if o.Name < 1 || o.Len < 1 {
+ return errors.New("invalid option")
+ }
+ if len(b) < o.Len {
+ return errors.New("short buffer")
+ }
+ return o.set(c, b)
+}
+
+// SetInt writes the option and value to the kernel.
+//
+// The Len field of Option must be either 1 or 4.
+func (o *Option) SetInt(c *Conn, v int) error {
+ if o.Len != 1 && o.Len != 4 {
+ return errors.New("invalid option")
+ }
+ var b []byte
+ if o.Len == 1 {
+ b = []byte{byte(v)}
+ } else {
+ var bb [4]byte
+ NativeEndian.PutUint32(bb[:o.Len], uint32(v))
+ b = bb[:4]
+ }
+ return o.set(c, b)
+}
+
+// ControlMessageSpace returns the whole length of control message.
+func ControlMessageSpace(dataLen int) int {
+ return controlMessageSpace(dataLen)
+}
+
+// A ControlMessage represents the head message in a stream of control
+// messages.
+//
+// A control message comprises of a header, data and a few padding
+// fields to conform to the interface to the kernel.
+//
+// See RFC 3542 for further information.
+type ControlMessage []byte
+
+// Data returns the data field of the control message at the head on
+// m.
+func (m ControlMessage) Data(dataLen int) []byte {
+ l := controlHeaderLen()
+ if len(m) < l || len(m) < l+dataLen {
+ return nil
+ }
+ return m[l : l+dataLen]
+}
+
+// Next returns the control message at the next on m.
+//
+// Next works only for standard control messages.
+func (m ControlMessage) Next(dataLen int) ControlMessage {
+ l := ControlMessageSpace(dataLen)
+ if len(m) < l {
+ return nil
+ }
+ return m[l:]
+}
+
+// MarshalHeader marshals the header fields of the control message at
+// the head on m.
+func (m ControlMessage) MarshalHeader(lvl, typ, dataLen int) error {
+ if len(m) < controlHeaderLen() {
+ return errors.New("short message")
+ }
+ h := (*cmsghdr)(unsafe.Pointer(&m[0]))
+ h.set(controlMessageLen(dataLen), lvl, typ)
+ return nil
+}
+
+// ParseHeader parses and returns the header fields of the control
+// message at the head on m.
+func (m ControlMessage) ParseHeader() (lvl, typ, dataLen int, err error) {
+ l := controlHeaderLen()
+ if len(m) < l {
+ return 0, 0, 0, errors.New("short message")
+ }
+ h := (*cmsghdr)(unsafe.Pointer(&m[0]))
+ return h.lvl(), h.typ(), int(uint64(h.len()) - uint64(l)), nil
+}
+
+// Marshal marshals the control message at the head on m, and returns
+// the next control message.
+func (m ControlMessage) Marshal(lvl, typ int, data []byte) (ControlMessage, error) {
+ l := len(data)
+ if len(m) < ControlMessageSpace(l) {
+ return nil, errors.New("short message")
+ }
+ h := (*cmsghdr)(unsafe.Pointer(&m[0]))
+ h.set(controlMessageLen(l), lvl, typ)
+ if l > 0 {
+ copy(m.Data(l), data)
+ }
+ return m.Next(l), nil
+}
+
+// Parse parses m as a single or multiple control messages.
+//
+// Parse works for both standard and compatible messages.
+func (m ControlMessage) Parse() ([]ControlMessage, error) {
+ var ms []ControlMessage
+ for len(m) >= controlHeaderLen() {
+ h := (*cmsghdr)(unsafe.Pointer(&m[0]))
+ l := h.len()
+ if l <= 0 {
+ return nil, errors.New("invalid header length")
+ }
+ if uint64(l) < uint64(controlHeaderLen()) {
+ return nil, errors.New("invalid message length")
+ }
+ if uint64(l) > uint64(len(m)) {
+ return nil, errors.New("short buffer")
+ }
+ // On message reception:
+ //
+ // |<- ControlMessageSpace --------------->|
+ // |<- controlMessageLen ---------->| |
+ // |<- controlHeaderLen ->| | |
+ // +---------------+------+---------+------+
+ // | Header | PadH | Data | PadD |
+ // +---------------+------+---------+------+
+ //
+ // On compatible message reception:
+ //
+ // | ... |<- controlMessageLen ----------->|
+ // | ... |<- controlHeaderLen ->| |
+ // +-----+---------------+------+----------+
+ // | ... | Header | PadH | Data |
+ // +-----+---------------+------+----------+
+ ms = append(ms, ControlMessage(m[:l]))
+ ll := l - controlHeaderLen()
+ if len(m) >= ControlMessageSpace(ll) {
+ m = m[ControlMessageSpace(ll):]
+ } else {
+ m = m[controlMessageLen(ll):]
+ }
+ }
+ return ms, nil
+}
+
+// NewControlMessage returns a new stream of control messages.
+func NewControlMessage(dataLen []int) ControlMessage {
+ var l int
+ for i := range dataLen {
+ l += ControlMessageSpace(dataLen[i])
+ }
+ return make([]byte, l)
+}
+
+// A Message represents an IO message.
+type Message struct {
+ // When writing, the Buffers field must contain at least one
+ // byte to write.
+ // When reading, the Buffers field will always contain a byte
+ // to read.
+ Buffers [][]byte
+
+ // OOB contains protocol-specific control or miscellaneous
+ // ancillary data known as out-of-band data.
+ OOB []byte
+
+ // Addr specifies a destination address when writing.
+ // It can be nil when the underlying protocol of the raw
+ // connection uses connection-oriented communication.
+ // After a successful read, it may contain the source address
+ // on the received packet.
+ Addr net.Addr
+
+ N int // # of bytes read or written from/to Buffers
+ NN int // # of bytes read or written from/to OOB
+ Flags int // protocol-specific information on the received message
+}
+
+// RecvMsg wraps recvmsg system call.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_PEEK.
+func (c *Conn) RecvMsg(m *Message, flags int) error {
+ return c.recvMsg(m, flags)
+}
+
+// SendMsg wraps sendmsg system call.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_DONTROUTE.
+func (c *Conn) SendMsg(m *Message, flags int) error {
+ return c.sendMsg(m, flags)
+}
+
+// RecvMsgs wraps recvmmsg system call.
+//
+// It returns the number of processed messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_PEEK.
+//
+// Only Linux supports this.
+func (c *Conn) RecvMsgs(ms []Message, flags int) (int, error) {
+ return c.recvMsgs(ms, flags)
+}
+
+// SendMsgs wraps sendmmsg system call.
+//
+// It returns the number of processed messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_DONTROUTE.
+//
+// Only Linux supports this.
+func (c *Conn) SendMsgs(ms []Message, flags int) (int, error) {
+ return c.sendMsgs(ms, flags)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys.go b/vendor/golang.org/x/net/internal/socket/sys.go
new file mode 100644
index 0000000..4a26af1
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys.go
@@ -0,0 +1,23 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+import (
+ "encoding/binary"
+ "unsafe"
+)
+
+// NativeEndian is the machine native endian implementation of ByteOrder.
+var NativeEndian binary.ByteOrder
+
+func init() {
+ i := uint32(1)
+ b := (*[4]byte)(unsafe.Pointer(&i))
+ if b[0] == 1 {
+ NativeEndian = binary.LittleEndian
+ } else {
+ NativeEndian = binary.BigEndian
+ }
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_bsd.go b/vendor/golang.org/x/net/internal/socket/sys_bsd.go
new file mode 100644
index 0000000..b6cd770
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_bsd.go
@@ -0,0 +1,16 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || openbsd
+// +build aix darwin dragonfly freebsd openbsd
+
+package socket
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errNotImplemented
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_const_unix.go b/vendor/golang.org/x/net/internal/socket/sys_const_unix.go
new file mode 100644
index 0000000..5d99f23
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_const_unix.go
@@ -0,0 +1,21 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
+
+package socket
+
+import "golang.org/x/sys/unix"
+
+const (
+ sysAF_UNSPEC = unix.AF_UNSPEC
+ sysAF_INET = unix.AF_INET
+ sysAF_INET6 = unix.AF_INET6
+
+ sysSOCK_RAW = unix.SOCK_RAW
+
+ sizeofSockaddrInet4 = unix.SizeofSockaddrInet4
+ sizeofSockaddrInet6 = unix.SizeofSockaddrInet6
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linkname.go b/vendor/golang.org/x/net/internal/socket/sys_linkname.go
new file mode 100644
index 0000000..21734af
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linkname.go
@@ -0,0 +1,43 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || (go1.12 && darwin)
+// +build aix go1.12,darwin
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+//go:linkname syscall_getsockopt syscall.getsockopt
+func syscall_getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *uint32) error
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ err := syscall_getsockopt(int(s), level, name, unsafe.Pointer(&b[0]), &l)
+ return int(l), err
+}
+
+//go:linkname syscall_setsockopt syscall.setsockopt
+func syscall_setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ return syscall_setsockopt(int(s), level, name, unsafe.Pointer(&b[0]), uintptr(len(b)))
+}
+
+//go:linkname syscall_recvmsg syscall.recvmsg
+func syscall_recvmsg(s int, msg *syscall.Msghdr, flags int) (n int, err error)
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ return syscall_recvmsg(int(s), (*syscall.Msghdr)(unsafe.Pointer(h)), flags)
+}
+
+//go:linkname syscall_sendmsg syscall.sendmsg
+func syscall_sendmsg(s int, msg *syscall.Msghdr, flags int) (n int, err error)
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ return syscall_sendmsg(int(s), (*syscall.Msghdr)(unsafe.Pointer(h)), flags)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux.go b/vendor/golang.org/x/net/internal/socket/sys_linux.go
new file mode 100644
index 0000000..76f5b8a
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux.go
@@ -0,0 +1,23 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build linux && !s390x && !386
+// +build linux,!s390x,!386
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_386.go b/vendor/golang.org/x/net/internal/socket/sys_linux_386.go
new file mode 100644
index 0000000..6512153
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_386.go
@@ -0,0 +1,53 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+const (
+ sysSETSOCKOPT = 0xe
+ sysGETSOCKOPT = 0xf
+ sysSENDMSG = 0x10
+ sysRECVMSG = 0x11
+ sysRECVMMSG = 0x13
+ sysSENDMMSG = 0x14
+)
+
+func socketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno)
+func rawsocketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno)
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ _, errno := socketcall(sysGETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
+ return int(l), errnoErr(errno)
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ _, errno := socketcall(sysSETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
+ return errnoErr(errno)
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, errno := socketcall(sysRECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, errno := socketcall(sysSENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, errno := socketcall(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, errno := socketcall(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_386.s b/vendor/golang.org/x/net/internal/socket/sys_linux_386.s
new file mode 100644
index 0000000..93e7d75
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_386.s
@@ -0,0 +1,11 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+TEXT ·socketcall(SB),NOSPLIT,$0-36
+ JMP syscall·socketcall(SB)
+
+TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
+ JMP syscall·rawsocketcall(SB)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go b/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go
new file mode 100644
index 0000000..9decee2
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go
@@ -0,0 +1,10 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+const (
+ sysRECVMMSG = 0x12b
+ sysSENDMMSG = 0x133
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go b/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go
new file mode 100644
index 0000000..d753b43
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go
@@ -0,0 +1,10 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+const (
+ sysRECVMMSG = 0x16d
+ sysSENDMMSG = 0x176
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go b/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go
new file mode 100644
index 0000000..b670894
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go
@@ -0,0 +1,10 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+const (
+ sysRECVMMSG = 0xf3
+ sysSENDMMSG = 0x10d
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go b/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go
new file mode 100644
index 0000000..9c0d740
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go
@@ -0,0 +1,10 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+const (
+ sysRECVMMSG = 0x10ef
+ sysSENDMMSG = 0x10f7
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go b/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go
new file mode 100644
index 0000000..071a4ab
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go
@@ -0,0 +1,10 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+const (
+ sysRECVMMSG = 0x14ae
+ sysSENDMMSG = 0x14b6
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go b/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go
new file mode 100644
index 0000000..071a4ab
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go
@@ -0,0 +1,10 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+const (
+ sysRECVMMSG = 0x14ae
+ sysSENDMMSG = 0x14b6
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go b/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go
new file mode 100644
index 0000000..9c0d740
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go
@@ -0,0 +1,10 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+const (
+ sysRECVMMSG = 0x10ef
+ sysSENDMMSG = 0x10f7
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_ppc.go b/vendor/golang.org/x/net/internal/socket/sys_linux_ppc.go
new file mode 100644
index 0000000..90cfaa9
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_ppc.go
@@ -0,0 +1,10 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+const (
+ sysRECVMMSG = 0x157
+ sysSENDMMSG = 0x15d
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go b/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go
new file mode 100644
index 0000000..21c1e3f
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go
@@ -0,0 +1,10 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+const (
+ sysRECVMMSG = 0x157
+ sysSENDMMSG = 0x15d
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go b/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go
new file mode 100644
index 0000000..21c1e3f
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go
@@ -0,0 +1,10 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+const (
+ sysRECVMMSG = 0x157
+ sysSENDMMSG = 0x15d
+)
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go b/vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go
index 01d4504..5b128fb 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin,arm64,!go1.12
+//go:build riscv64
+// +build riscv64
-package unix
+package socket
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return 0, ENOSYS
-}
+const (
+ sysRECVMMSG = 0xf3
+ sysSENDMMSG = 0x10d
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go b/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go
new file mode 100644
index 0000000..6512153
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go
@@ -0,0 +1,53 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+const (
+ sysSETSOCKOPT = 0xe
+ sysGETSOCKOPT = 0xf
+ sysSENDMSG = 0x10
+ sysRECVMSG = 0x11
+ sysRECVMMSG = 0x13
+ sysSENDMMSG = 0x14
+)
+
+func socketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno)
+func rawsocketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno)
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ _, errno := socketcall(sysGETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
+ return int(l), errnoErr(errno)
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ _, errno := socketcall(sysSETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
+ return errnoErr(errno)
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, errno := socketcall(sysRECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, errno := socketcall(sysSENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, errno := socketcall(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, errno := socketcall(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s b/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s
new file mode 100644
index 0000000..06d7562
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s
@@ -0,0 +1,11 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+TEXT ·socketcall(SB),NOSPLIT,$0-72
+ JMP syscall·socketcall(SB)
+
+TEXT ·rawsocketcall(SB),NOSPLIT,$0-72
+ JMP syscall·rawsocketcall(SB)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_netbsd.go b/vendor/golang.org/x/net/internal/socket/sys_netbsd.go
new file mode 100644
index 0000000..431851c
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_netbsd.go
@@ -0,0 +1,25 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+const (
+ sysRECVMMSG = 0x1db
+ sysSENDMMSG = 0x1dc
+)
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_posix.go b/vendor/golang.org/x/net/internal/socket/sys_posix.go
new file mode 100644
index 0000000..42b8f23
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_posix.go
@@ -0,0 +1,185 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
+
+package socket
+
+import (
+ "encoding/binary"
+ "errors"
+ "net"
+ "runtime"
+ "strconv"
+ "sync"
+ "time"
+)
+
+// marshalInetAddr writes a in sockaddr format into the buffer b.
+// The buffer must be sufficiently large (sizeofSockaddrInet4/6).
+// Returns the number of bytes written.
+func marshalInetAddr(a net.Addr, b []byte) int {
+ switch a := a.(type) {
+ case *net.TCPAddr:
+ return marshalSockaddr(a.IP, a.Port, a.Zone, b)
+ case *net.UDPAddr:
+ return marshalSockaddr(a.IP, a.Port, a.Zone, b)
+ case *net.IPAddr:
+ return marshalSockaddr(a.IP, 0, a.Zone, b)
+ default:
+ return 0
+ }
+}
+
+func marshalSockaddr(ip net.IP, port int, zone string, b []byte) int {
+ if ip4 := ip.To4(); ip4 != nil {
+ switch runtime.GOOS {
+ case "android", "illumos", "linux", "solaris", "windows":
+ NativeEndian.PutUint16(b[:2], uint16(sysAF_INET))
+ default:
+ b[0] = sizeofSockaddrInet4
+ b[1] = sysAF_INET
+ }
+ binary.BigEndian.PutUint16(b[2:4], uint16(port))
+ copy(b[4:8], ip4)
+ return sizeofSockaddrInet4
+ }
+ if ip6 := ip.To16(); ip6 != nil && ip.To4() == nil {
+ switch runtime.GOOS {
+ case "android", "illumos", "linux", "solaris", "windows":
+ NativeEndian.PutUint16(b[:2], uint16(sysAF_INET6))
+ default:
+ b[0] = sizeofSockaddrInet6
+ b[1] = sysAF_INET6
+ }
+ binary.BigEndian.PutUint16(b[2:4], uint16(port))
+ copy(b[8:24], ip6)
+ if zone != "" {
+ NativeEndian.PutUint32(b[24:28], uint32(zoneCache.index(zone)))
+ }
+ return sizeofSockaddrInet6
+ }
+ return 0
+}
+
+func parseInetAddr(b []byte, network string) (net.Addr, error) {
+ if len(b) < 2 {
+ return nil, errors.New("invalid address")
+ }
+ var af int
+ switch runtime.GOOS {
+ case "android", "illumos", "linux", "solaris", "windows":
+ af = int(NativeEndian.Uint16(b[:2]))
+ default:
+ af = int(b[1])
+ }
+ var ip net.IP
+ var zone string
+ if af == sysAF_INET {
+ if len(b) < sizeofSockaddrInet4 {
+ return nil, errors.New("short address")
+ }
+ ip = make(net.IP, net.IPv4len)
+ copy(ip, b[4:8])
+ }
+ if af == sysAF_INET6 {
+ if len(b) < sizeofSockaddrInet6 {
+ return nil, errors.New("short address")
+ }
+ ip = make(net.IP, net.IPv6len)
+ copy(ip, b[8:24])
+ if id := int(NativeEndian.Uint32(b[24:28])); id > 0 {
+ zone = zoneCache.name(id)
+ }
+ }
+ switch network {
+ case "tcp", "tcp4", "tcp6":
+ return &net.TCPAddr{IP: ip, Port: int(binary.BigEndian.Uint16(b[2:4])), Zone: zone}, nil
+ case "udp", "udp4", "udp6":
+ return &net.UDPAddr{IP: ip, Port: int(binary.BigEndian.Uint16(b[2:4])), Zone: zone}, nil
+ default:
+ return &net.IPAddr{IP: ip, Zone: zone}, nil
+ }
+}
+
+// An ipv6ZoneCache represents a cache holding partial network
+// interface information. It is used for reducing the cost of IPv6
+// addressing scope zone resolution.
+//
+// Multiple names sharing the index are managed by first-come
+// first-served basis for consistency.
+type ipv6ZoneCache struct {
+ sync.RWMutex // guard the following
+ lastFetched time.Time // last time routing information was fetched
+ toIndex map[string]int // interface name to its index
+ toName map[int]string // interface index to its name
+}
+
+var zoneCache = ipv6ZoneCache{
+ toIndex: make(map[string]int),
+ toName: make(map[int]string),
+}
+
+// update refreshes the network interface information if the cache was last
+// updated more than 1 minute ago, or if force is set. It returns whether the
+// cache was updated.
+func (zc *ipv6ZoneCache) update(ift []net.Interface, force bool) (updated bool) {
+ zc.Lock()
+ defer zc.Unlock()
+ now := time.Now()
+ if !force && zc.lastFetched.After(now.Add(-60*time.Second)) {
+ return false
+ }
+ zc.lastFetched = now
+ if len(ift) == 0 {
+ var err error
+ if ift, err = net.Interfaces(); err != nil {
+ return false
+ }
+ }
+ zc.toIndex = make(map[string]int, len(ift))
+ zc.toName = make(map[int]string, len(ift))
+ for _, ifi := range ift {
+ zc.toIndex[ifi.Name] = ifi.Index
+ if _, ok := zc.toName[ifi.Index]; !ok {
+ zc.toName[ifi.Index] = ifi.Name
+ }
+ }
+ return true
+}
+
+func (zc *ipv6ZoneCache) name(zone int) string {
+ updated := zoneCache.update(nil, false)
+ zoneCache.RLock()
+ name, ok := zoneCache.toName[zone]
+ zoneCache.RUnlock()
+ if !ok && !updated {
+ zoneCache.update(nil, true)
+ zoneCache.RLock()
+ name, ok = zoneCache.toName[zone]
+ zoneCache.RUnlock()
+ }
+ if !ok { // last resort
+ name = strconv.Itoa(zone)
+ }
+ return name
+}
+
+func (zc *ipv6ZoneCache) index(zone string) int {
+ updated := zoneCache.update(nil, false)
+ zoneCache.RLock()
+ index, ok := zoneCache.toIndex[zone]
+ zoneCache.RUnlock()
+ if !ok && !updated {
+ zoneCache.update(nil, true)
+ zoneCache.RLock()
+ index, ok = zoneCache.toIndex[zone]
+ zoneCache.RUnlock()
+ }
+ if !ok { // last resort
+ index, _ = strconv.Atoi(zone)
+ }
+ return index
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_solaris.go b/vendor/golang.org/x/net/internal/socket/sys_solaris.go
new file mode 100644
index 0000000..e79ca95
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_solaris.go
@@ -0,0 +1,59 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+//go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so"
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
+//go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so"
+//go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so"
+
+//go:linkname procGetsockopt libc___xnet_getsockopt
+//go:linkname procSetsockopt libc_setsockopt
+//go:linkname procRecvmsg libc___xnet_recvmsg
+//go:linkname procSendmsg libc___xnet_sendmsg
+
+var (
+ procGetsockopt uintptr
+ procSetsockopt uintptr
+ procRecvmsg uintptr
+ procSendmsg uintptr
+)
+
+func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno)
+func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno)
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procGetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
+ return int(l), errnoErr(errno)
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procSetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
+ return errnoErr(errno)
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procRecvmsg)), 3, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procSendmsg)), 3, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errNotImplemented
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s b/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s
new file mode 100644
index 0000000..a18ac5e
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s
@@ -0,0 +1,11 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+TEXT ·sysvicall6(SB),NOSPLIT,$0-88
+ JMP syscall·sysvicall6(SB)
+
+TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
+ JMP syscall·rawSysvicall6(SB)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_stub.go b/vendor/golang.org/x/net/internal/socket/sys_stub.go
new file mode 100644
index 0000000..381e45e
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_stub.go
@@ -0,0 +1,53 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
+
+package socket
+
+import "net"
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0xa
+
+ sysSOCK_RAW = 0x3
+
+ sizeofSockaddrInet4 = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
+
+func marshalInetAddr(ip net.IP, port int, zone string) []byte {
+ return nil
+}
+
+func parseInetAddr(b []byte, network string) (net.Addr, error) {
+ return nil, errNotImplemented
+}
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ return 0, errNotImplemented
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ return errNotImplemented
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ return 0, errNotImplemented
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ return 0, errNotImplemented
+}
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errNotImplemented
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_unix.go b/vendor/golang.org/x/net/internal/socket/sys_unix.go
new file mode 100644
index 0000000..c98ebae
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_unix.go
@@ -0,0 +1,34 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build dragonfly || freebsd || (linux && !s390x && !386) || netbsd || openbsd
+// +build dragonfly freebsd linux,!s390x,!386 netbsd openbsd
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ _, _, errno := syscall.Syscall6(syscall.SYS_GETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
+ return int(l), errnoErr(errno)
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ _, _, errno := syscall.Syscall6(syscall.SYS_SETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
+ return errnoErr(errno)
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall(syscall.SYS_RECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags))
+ return int(n), errnoErr(errno)
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall(syscall.SYS_SENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags))
+ return int(n), errnoErr(errno)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_windows.go b/vendor/golang.org/x/net/internal/socket/sys_windows.go
new file mode 100644
index 0000000..2de0d68
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_windows.go
@@ -0,0 +1,54 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+func probeProtocolStack() int {
+ var p uintptr
+ return int(unsafe.Sizeof(p))
+}
+
+const (
+ sysAF_UNSPEC = windows.AF_UNSPEC
+ sysAF_INET = windows.AF_INET
+ sysAF_INET6 = windows.AF_INET6
+
+ sysSOCK_RAW = windows.SOCK_RAW
+
+ sizeofSockaddrInet4 = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ err := syscall.Getsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(unsafe.Pointer(&b[0])), (*int32)(unsafe.Pointer(&l)))
+ return int(l), err
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ return syscall.Setsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(unsafe.Pointer(&b[0])), int32(len(b)))
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ return 0, errNotImplemented
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ return 0, errNotImplemented
+}
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errNotImplemented
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_zos_s390x.go b/vendor/golang.org/x/net/internal/socket/sys_zos_s390x.go
new file mode 100644
index 0000000..1e38b92
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_zos_s390x.go
@@ -0,0 +1,38 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+func syscall_syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
+func syscall_syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
+
+func probeProtocolStack() int {
+ return 4 // sizeof(int) on GOOS=zos GOARCH=s390x
+}
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ _, _, errno := syscall_syscall6(syscall.SYS_GETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
+ return int(l), errnoErr(errno)
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ _, _, errno := syscall_syscall6(syscall.SYS_SETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
+ return errnoErr(errno)
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, _, errno := syscall_syscall(syscall.SYS___RECVMSG_A, s, uintptr(unsafe.Pointer(h)), uintptr(flags))
+ return int(n), errnoErr(errno)
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, _, errno := syscall_syscall(syscall.SYS___SENDMSG_A, s, uintptr(unsafe.Pointer(h)), uintptr(flags))
+ return int(n), errnoErr(errno)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_zos_s390x.s b/vendor/golang.org/x/net/internal/socket/sys_zos_s390x.s
new file mode 100644
index 0000000..60d5839
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_zos_s390x.s
@@ -0,0 +1,11 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+TEXT ·syscall_syscall(SB),NOSPLIT,$0
+ JMP syscall·_syscall(SB)
+
+TEXT ·syscall_syscall6(SB),NOSPLIT,$0
+ JMP syscall·_syscall6(SB)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go b/vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go
new file mode 100644
index 0000000..00691bd
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go
@@ -0,0 +1,40 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_aix.go
+
+// Added for go1.11 compatibility
+//go:build aix
+// +build aix
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go b/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go
new file mode 100644
index 0000000..5acf6db
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go
@@ -0,0 +1,30 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_darwin.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go
new file mode 100644
index 0000000..98dcfe4
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go
@@ -0,0 +1,32 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_darwin.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go
new file mode 100644
index 0000000..5acf6db
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go
@@ -0,0 +1,30 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_darwin.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go b/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go
new file mode 100644
index 0000000..98dcfe4
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go
@@ -0,0 +1,32 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_darwin.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go
new file mode 100644
index 0000000..636d129
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go
@@ -0,0 +1,32 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_dragonfly.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go
new file mode 100644
index 0000000..87707fe
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go
@@ -0,0 +1,30 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_freebsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go
new file mode 100644
index 0000000..7db7781
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go
@@ -0,0 +1,32 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_freebsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go
new file mode 100644
index 0000000..87707fe
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go
@@ -0,0 +1,30 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_freebsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm64.go b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm64.go
new file mode 100644
index 0000000..7db7781
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm64.go
@@ -0,0 +1,32 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_freebsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go
new file mode 100644
index 0000000..4c19269
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go
@@ -0,0 +1,35 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go
new file mode 100644
index 0000000..3dcd5c8
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go
@@ -0,0 +1,38 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go
new file mode 100644
index 0000000..4c19269
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go
@@ -0,0 +1,35 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go
new file mode 100644
index 0000000..3dcd5c8
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go
@@ -0,0 +1,38 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go
new file mode 100644
index 0000000..4c19269
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go
@@ -0,0 +1,35 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go
new file mode 100644
index 0000000..3dcd5c8
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go
@@ -0,0 +1,38 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go
new file mode 100644
index 0000000..3dcd5c8
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go
@@ -0,0 +1,38 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go
new file mode 100644
index 0000000..4c19269
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go
@@ -0,0 +1,35 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc.go
new file mode 100644
index 0000000..59b71da
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc.go
@@ -0,0 +1,35 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go
new file mode 100644
index 0000000..3dcd5c8
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go
@@ -0,0 +1,38 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go
new file mode 100644
index 0000000..3dcd5c8
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go
@@ -0,0 +1,38 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go
new file mode 100644
index 0000000..c066272
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go
@@ -0,0 +1,40 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+//go:build riscv64
+// +build riscv64
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_0 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go
new file mode 100644
index 0000000..3dcd5c8
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go
@@ -0,0 +1,38 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go
new file mode 100644
index 0000000..f95572d
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go
@@ -0,0 +1,35 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_netbsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go
new file mode 100644
index 0000000..a92fd60
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go
@@ -0,0 +1,38 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_netbsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go
new file mode 100644
index 0000000..f95572d
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go
@@ -0,0 +1,35 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_netbsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go
new file mode 100644
index 0000000..a92fd60
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go
@@ -0,0 +1,38 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_netbsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go
new file mode 100644
index 0000000..e792ec2
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go
@@ -0,0 +1,30 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_openbsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go
new file mode 100644
index 0000000..b68ff2d
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go
@@ -0,0 +1,32 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_openbsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go
new file mode 100644
index 0000000..e792ec2
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go
@@ -0,0 +1,30 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_openbsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm64.go b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm64.go
new file mode 100644
index 0000000..b68ff2d
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm64.go
@@ -0,0 +1,32 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_openbsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_mips64.go b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_mips64.go
new file mode 100644
index 0000000..3c9576e
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_mips64.go
@@ -0,0 +1,30 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_openbsd.go
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go
new file mode 100644
index 0000000..359cfec
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go
@@ -0,0 +1,32 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_solaris.go
+
+package socket
+
+type iovec struct {
+ Base *int8
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Accrights *int8
+ Accrightslen int32
+ Pad_cgo_2 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_zos_s390x.go b/vendor/golang.org/x/net/internal/socket/zsys_zos_s390x.go
new file mode 100644
index 0000000..49b62c8
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_zos_s390x.go
@@ -0,0 +1,28 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package socket
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Iov *iovec
+ Control *byte
+ Flags int32
+ Namelen uint32
+ Iovlen int32
+ Controllen uint32
+}
+
+type cmsghdr struct {
+ Len int32
+ Level int32
+ Type int32
+}
+
+const sizeofCmsghdr = 12
diff --git a/vendor/golang.org/x/net/ipv4/batch.go b/vendor/golang.org/x/net/ipv4/batch.go
new file mode 100644
index 0000000..1a3a4fc
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/batch.go
@@ -0,0 +1,194 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "net"
+ "runtime"
+
+ "golang.org/x/net/internal/socket"
+)
+
+// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of
+// PacketConn are not implemented.
+
+// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of
+// RawConn are not implemented.
+
+// A Message represents an IO message.
+//
+// type Message struct {
+// Buffers [][]byte
+// OOB []byte
+// Addr net.Addr
+// N int
+// NN int
+// Flags int
+// }
+//
+// The Buffers fields represents a list of contiguous buffers, which
+// can be used for vectored IO, for example, putting a header and a
+// payload in each slice.
+// When writing, the Buffers field must contain at least one byte to
+// write.
+// When reading, the Buffers field will always contain a byte to read.
+//
+// The OOB field contains protocol-specific control or miscellaneous
+// ancillary data known as out-of-band data.
+// It can be nil when not required.
+//
+// The Addr field specifies a destination address when writing.
+// It can be nil when the underlying protocol of the endpoint uses
+// connection-oriented communication.
+// After a successful read, it may contain the source address on the
+// received packet.
+//
+// The N field indicates the number of bytes read or written from/to
+// Buffers.
+//
+// The NN field indicates the number of bytes read or written from/to
+// OOB.
+//
+// The Flags field contains protocol-specific information on the
+// received message.
+type Message = socket.Message
+
+// ReadBatch reads a batch of messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_PEEK.
+//
+// On a successful read it returns the number of messages received, up
+// to len(ms).
+//
+// On Linux, a batch read will be optimized.
+// On other platforms, this method will read only a single message.
+//
+// Unlike the ReadFrom method, it doesn't strip the IPv4 header
+// followed by option headers from the received IPv4 datagram when the
+// underlying transport is net.IPConn. Each Buffers field of Message
+// must be large enough to accommodate an IPv4 header and option
+// headers.
+func (c *payloadHandler) ReadBatch(ms []Message, flags int) (int, error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ switch runtime.GOOS {
+ case "linux":
+ n, err := c.RecvMsgs([]socket.Message(ms), flags)
+ if err != nil {
+ err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ default:
+ n := 1
+ err := c.RecvMsg(&ms[0], flags)
+ if err != nil {
+ n = 0
+ err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ if compatFreeBSD32 && ms[0].NN > 0 {
+ adjustFreeBSD32(&ms[0])
+ }
+ return n, err
+ }
+}
+
+// WriteBatch writes a batch of messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_DONTROUTE.
+//
+// It returns the number of messages written on a successful write.
+//
+// On Linux, a batch write will be optimized.
+// On other platforms, this method will write only a single message.
+func (c *payloadHandler) WriteBatch(ms []Message, flags int) (int, error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ switch runtime.GOOS {
+ case "linux":
+ n, err := c.SendMsgs([]socket.Message(ms), flags)
+ if err != nil {
+ err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ default:
+ n := 1
+ err := c.SendMsg(&ms[0], flags)
+ if err != nil {
+ n = 0
+ err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ }
+}
+
+// ReadBatch reads a batch of messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_PEEK.
+//
+// On a successful read it returns the number of messages received, up
+// to len(ms).
+//
+// On Linux, a batch read will be optimized.
+// On other platforms, this method will read only a single message.
+func (c *packetHandler) ReadBatch(ms []Message, flags int) (int, error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ switch runtime.GOOS {
+ case "linux":
+ n, err := c.RecvMsgs([]socket.Message(ms), flags)
+ if err != nil {
+ err = &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ default:
+ n := 1
+ err := c.RecvMsg(&ms[0], flags)
+ if err != nil {
+ n = 0
+ err = &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ if compatFreeBSD32 && ms[0].NN > 0 {
+ adjustFreeBSD32(&ms[0])
+ }
+ return n, err
+ }
+}
+
+// WriteBatch writes a batch of messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_DONTROUTE.
+//
+// It returns the number of messages written on a successful write.
+//
+// On Linux, a batch write will be optimized.
+// On other platforms, this method will write only a single message.
+func (c *packetHandler) WriteBatch(ms []Message, flags int) (int, error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ switch runtime.GOOS {
+ case "linux":
+ n, err := c.SendMsgs([]socket.Message(ms), flags)
+ if err != nil {
+ err = &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ default:
+ n := 1
+ err := c.SendMsg(&ms[0], flags)
+ if err != nil {
+ n = 0
+ err = &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ }
+}
diff --git a/vendor/golang.org/x/net/ipv4/control.go b/vendor/golang.org/x/net/ipv4/control.go
new file mode 100644
index 0000000..a2b02ca
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/control.go
@@ -0,0 +1,144 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "fmt"
+ "net"
+ "sync"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+)
+
+type rawOpt struct {
+ sync.RWMutex
+ cflags ControlFlags
+}
+
+func (c *rawOpt) set(f ControlFlags) { c.cflags |= f }
+func (c *rawOpt) clear(f ControlFlags) { c.cflags &^= f }
+func (c *rawOpt) isset(f ControlFlags) bool { return c.cflags&f != 0 }
+
+type ControlFlags uint
+
+const (
+ FlagTTL ControlFlags = 1 << iota // pass the TTL on the received packet
+ FlagSrc // pass the source address on the received packet
+ FlagDst // pass the destination address on the received packet
+ FlagInterface // pass the interface index on the received packet
+)
+
+// A ControlMessage represents per packet basis IP-level socket options.
+type ControlMessage struct {
+ // Receiving socket options: SetControlMessage allows to
+ // receive the options from the protocol stack using ReadFrom
+ // method of PacketConn or RawConn.
+ //
+ // Specifying socket options: ControlMessage for WriteTo
+ // method of PacketConn or RawConn allows to send the options
+ // to the protocol stack.
+ //
+ TTL int // time-to-live, receiving only
+ Src net.IP // source address, specifying only
+ Dst net.IP // destination address, receiving only
+ IfIndex int // interface index, must be 1 <= value when specifying
+}
+
+func (cm *ControlMessage) String() string {
+ if cm == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("ttl=%d src=%v dst=%v ifindex=%d", cm.TTL, cm.Src, cm.Dst, cm.IfIndex)
+}
+
+// Marshal returns the binary encoding of cm.
+func (cm *ControlMessage) Marshal() []byte {
+ if cm == nil {
+ return nil
+ }
+ var m socket.ControlMessage
+ if ctlOpts[ctlPacketInfo].name > 0 && (cm.Src.To4() != nil || cm.IfIndex > 0) {
+ m = socket.NewControlMessage([]int{ctlOpts[ctlPacketInfo].length})
+ }
+ if len(m) > 0 {
+ ctlOpts[ctlPacketInfo].marshal(m, cm)
+ }
+ return m
+}
+
+// Parse parses b as a control message and stores the result in cm.
+func (cm *ControlMessage) Parse(b []byte) error {
+ ms, err := socket.ControlMessage(b).Parse()
+ if err != nil {
+ return err
+ }
+ for _, m := range ms {
+ lvl, typ, l, err := m.ParseHeader()
+ if err != nil {
+ return err
+ }
+ if lvl != iana.ProtocolIP {
+ continue
+ }
+ switch {
+ case typ == ctlOpts[ctlTTL].name && l >= ctlOpts[ctlTTL].length:
+ ctlOpts[ctlTTL].parse(cm, m.Data(l))
+ case typ == ctlOpts[ctlDst].name && l >= ctlOpts[ctlDst].length:
+ ctlOpts[ctlDst].parse(cm, m.Data(l))
+ case typ == ctlOpts[ctlInterface].name && l >= ctlOpts[ctlInterface].length:
+ ctlOpts[ctlInterface].parse(cm, m.Data(l))
+ case typ == ctlOpts[ctlPacketInfo].name && l >= ctlOpts[ctlPacketInfo].length:
+ ctlOpts[ctlPacketInfo].parse(cm, m.Data(l))
+ }
+ }
+ return nil
+}
+
+// NewControlMessage returns a new control message.
+//
+// The returned message is large enough for options specified by cf.
+func NewControlMessage(cf ControlFlags) []byte {
+ opt := rawOpt{cflags: cf}
+ var l int
+ if opt.isset(FlagTTL) && ctlOpts[ctlTTL].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlTTL].length)
+ }
+ if ctlOpts[ctlPacketInfo].name > 0 {
+ if opt.isset(FlagSrc | FlagDst | FlagInterface) {
+ l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length)
+ }
+ } else {
+ if opt.isset(FlagDst) && ctlOpts[ctlDst].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlDst].length)
+ }
+ if opt.isset(FlagInterface) && ctlOpts[ctlInterface].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlInterface].length)
+ }
+ }
+ var b []byte
+ if l > 0 {
+ b = make([]byte, l)
+ }
+ return b
+}
+
+// Ancillary data socket options
+const (
+ ctlTTL = iota // header field
+ ctlSrc // header field
+ ctlDst // header field
+ ctlInterface // inbound or outbound interface
+ ctlPacketInfo // inbound or outbound packet path
+ ctlMax
+)
+
+// A ctlOpt represents a binding for ancillary data socket option.
+type ctlOpt struct {
+ name int // option name, must be equal or greater than 1
+ length int // option length
+ marshal func([]byte, *ControlMessage) []byte
+ parse func(*ControlMessage, []byte)
+}
diff --git a/vendor/golang.org/x/net/ipv4/control_bsd.go b/vendor/golang.org/x/net/ipv4/control_bsd.go
new file mode 100644
index 0000000..b7385df
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/control_bsd.go
@@ -0,0 +1,44 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd
+// +build aix darwin dragonfly freebsd netbsd openbsd
+
+package ipv4
+
+import (
+ "net"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+func marshalDst(b []byte, cm *ControlMessage) []byte {
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIP, unix.IP_RECVDSTADDR, net.IPv4len)
+ return m.Next(net.IPv4len)
+}
+
+func parseDst(cm *ControlMessage, b []byte) {
+ if len(cm.Dst) < net.IPv4len {
+ cm.Dst = make(net.IP, net.IPv4len)
+ }
+ copy(cm.Dst, b[:net.IPv4len])
+}
+
+func marshalInterface(b []byte, cm *ControlMessage) []byte {
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIP, sockoptReceiveInterface, syscall.SizeofSockaddrDatalink)
+ return m.Next(syscall.SizeofSockaddrDatalink)
+}
+
+func parseInterface(cm *ControlMessage, b []byte) {
+ var sadl syscall.SockaddrDatalink
+ copy((*[unsafe.Sizeof(sadl)]byte)(unsafe.Pointer(&sadl))[:], b)
+ cm.IfIndex = int(sadl.Index)
+}
diff --git a/vendor/golang.org/x/net/ipv4/control_pktinfo.go b/vendor/golang.org/x/net/ipv4/control_pktinfo.go
new file mode 100644
index 0000000..0e748db
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/control_pktinfo.go
@@ -0,0 +1,42 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build darwin || linux || solaris
+// +build darwin linux solaris
+
+package ipv4
+
+import (
+ "net"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIP, unix.IP_PKTINFO, sizeofInetPktinfo)
+ if cm != nil {
+ pi := (*inetPktinfo)(unsafe.Pointer(&m.Data(sizeofInetPktinfo)[0]))
+ if ip := cm.Src.To4(); ip != nil {
+ copy(pi.Spec_dst[:], ip)
+ }
+ if cm.IfIndex > 0 {
+ pi.setIfindex(cm.IfIndex)
+ }
+ }
+ return m.Next(sizeofInetPktinfo)
+}
+
+func parsePacketInfo(cm *ControlMessage, b []byte) {
+ pi := (*inetPktinfo)(unsafe.Pointer(&b[0]))
+ cm.IfIndex = int(pi.Ifindex)
+ if len(cm.Dst) < net.IPv4len {
+ cm.Dst = make(net.IP, net.IPv4len)
+ }
+ copy(cm.Dst, pi.Addr[:])
+}
diff --git a/vendor/golang.org/x/net/ipv4/control_stub.go b/vendor/golang.org/x/net/ipv4/control_stub.go
new file mode 100644
index 0000000..f27322c
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/control_stub.go
@@ -0,0 +1,14 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
+
+package ipv4
+
+import "golang.org/x/net/internal/socket"
+
+func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/ipv4/control_unix.go b/vendor/golang.org/x/net/ipv4/control_unix.go
new file mode 100644
index 0000000..2413e02
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/control_unix.go
@@ -0,0 +1,76 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+
+package ipv4
+
+import (
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
+ opt.Lock()
+ defer opt.Unlock()
+ if so, ok := sockOpts[ssoReceiveTTL]; ok && cf&FlagTTL != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
+ return err
+ }
+ if on {
+ opt.set(FlagTTL)
+ } else {
+ opt.clear(FlagTTL)
+ }
+ }
+ if so, ok := sockOpts[ssoPacketInfo]; ok {
+ if cf&(FlagSrc|FlagDst|FlagInterface) != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
+ return err
+ }
+ if on {
+ opt.set(cf & (FlagSrc | FlagDst | FlagInterface))
+ } else {
+ opt.clear(cf & (FlagSrc | FlagDst | FlagInterface))
+ }
+ }
+ } else {
+ if so, ok := sockOpts[ssoReceiveDst]; ok && cf&FlagDst != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
+ return err
+ }
+ if on {
+ opt.set(FlagDst)
+ } else {
+ opt.clear(FlagDst)
+ }
+ }
+ if so, ok := sockOpts[ssoReceiveInterface]; ok && cf&FlagInterface != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
+ return err
+ }
+ if on {
+ opt.set(FlagInterface)
+ } else {
+ opt.clear(FlagInterface)
+ }
+ }
+ }
+ return nil
+}
+
+func marshalTTL(b []byte, cm *ControlMessage) []byte {
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIP, unix.IP_RECVTTL, 1)
+ return m.Next(1)
+}
+
+func parseTTL(cm *ControlMessage, b []byte) {
+ cm.TTL = int(*(*byte)(unsafe.Pointer(&b[:1][0])))
+}
diff --git a/vendor/golang.org/x/net/ipv4/control_windows.go b/vendor/golang.org/x/net/ipv4/control_windows.go
new file mode 100644
index 0000000..82c6306
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/control_windows.go
@@ -0,0 +1,12 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import "golang.org/x/net/internal/socket"
+
+func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
+ // TODO(mikio): implement this
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/ipv4/control_zos.go b/vendor/golang.org/x/net/ipv4/control_zos.go
new file mode 100644
index 0000000..de11c42
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/control_zos.go
@@ -0,0 +1,88 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "net"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIP, unix.IP_PKTINFO, sizeofInetPktinfo)
+ if cm != nil {
+ pi := (*inetPktinfo)(unsafe.Pointer(&m.Data(sizeofInetPktinfo)[0]))
+ if ip := cm.Src.To4(); ip != nil {
+ copy(pi.Addr[:], ip)
+ }
+ if cm.IfIndex > 0 {
+ pi.setIfindex(cm.IfIndex)
+ }
+ }
+ return m.Next(sizeofInetPktinfo)
+}
+
+func parsePacketInfo(cm *ControlMessage, b []byte) {
+ pi := (*inetPktinfo)(unsafe.Pointer(&b[0]))
+ cm.IfIndex = int(pi.Ifindex)
+ if len(cm.Dst) < net.IPv4len {
+ cm.Dst = make(net.IP, net.IPv4len)
+ }
+ copy(cm.Dst, pi.Addr[:])
+}
+
+func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
+ opt.Lock()
+ defer opt.Unlock()
+ if so, ok := sockOpts[ssoReceiveTTL]; ok && cf&FlagTTL != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
+ return err
+ }
+ if on {
+ opt.set(FlagTTL)
+ } else {
+ opt.clear(FlagTTL)
+ }
+ }
+ if so, ok := sockOpts[ssoPacketInfo]; ok {
+ if cf&(FlagSrc|FlagDst|FlagInterface) != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
+ return err
+ }
+ if on {
+ opt.set(cf & (FlagSrc | FlagDst | FlagInterface))
+ } else {
+ opt.clear(cf & (FlagSrc | FlagDst | FlagInterface))
+ }
+ }
+ } else {
+ if so, ok := sockOpts[ssoReceiveDst]; ok && cf&FlagDst != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
+ return err
+ }
+ if on {
+ opt.set(FlagDst)
+ } else {
+ opt.clear(FlagDst)
+ }
+ }
+ if so, ok := sockOpts[ssoReceiveInterface]; ok && cf&FlagInterface != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
+ return err
+ }
+ if on {
+ opt.set(FlagInterface)
+ } else {
+ opt.clear(FlagInterface)
+ }
+ }
+ }
+ return nil
+}
diff --git a/vendor/golang.org/x/net/ipv4/dgramopt.go b/vendor/golang.org/x/net/ipv4/dgramopt.go
new file mode 100644
index 0000000..c191c22
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/dgramopt.go
@@ -0,0 +1,264 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "net"
+
+ "golang.org/x/net/bpf"
+)
+
+// MulticastTTL returns the time-to-live field value for outgoing
+// multicast packets.
+func (c *dgramOpt) MulticastTTL() (int, error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ so, ok := sockOpts[ssoMulticastTTL]
+ if !ok {
+ return 0, errNotImplemented
+ }
+ return so.GetInt(c.Conn)
+}
+
+// SetMulticastTTL sets the time-to-live field value for future
+// outgoing multicast packets.
+func (c *dgramOpt) SetMulticastTTL(ttl int) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoMulticastTTL]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.SetInt(c.Conn, ttl)
+}
+
+// MulticastInterface returns the default interface for multicast
+// packet transmissions.
+func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
+ if !c.ok() {
+ return nil, errInvalidConn
+ }
+ so, ok := sockOpts[ssoMulticastInterface]
+ if !ok {
+ return nil, errNotImplemented
+ }
+ return so.getMulticastInterface(c.Conn)
+}
+
+// SetMulticastInterface sets the default interface for future
+// multicast packet transmissions.
+func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoMulticastInterface]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.setMulticastInterface(c.Conn, ifi)
+}
+
+// MulticastLoopback reports whether transmitted multicast packets
+// should be copied and send back to the originator.
+func (c *dgramOpt) MulticastLoopback() (bool, error) {
+ if !c.ok() {
+ return false, errInvalidConn
+ }
+ so, ok := sockOpts[ssoMulticastLoopback]
+ if !ok {
+ return false, errNotImplemented
+ }
+ on, err := so.GetInt(c.Conn)
+ if err != nil {
+ return false, err
+ }
+ return on == 1, nil
+}
+
+// SetMulticastLoopback sets whether transmitted multicast packets
+// should be copied and send back to the originator.
+func (c *dgramOpt) SetMulticastLoopback(on bool) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoMulticastLoopback]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.SetInt(c.Conn, boolint(on))
+}
+
+// JoinGroup joins the group address group on the interface ifi.
+// By default all sources that can cast data to group are accepted.
+// It's possible to mute and unmute data transmission from a specific
+// source by using ExcludeSourceSpecificGroup and
+// IncludeSourceSpecificGroup.
+// JoinGroup uses the system assigned multicast interface when ifi is
+// nil, although this is not recommended because the assignment
+// depends on platforms and sometimes it might require routing
+// configuration.
+func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoJoinGroup]
+ if !ok {
+ return errNotImplemented
+ }
+ grp := netAddrToIP4(group)
+ if grp == nil {
+ return errMissingAddress
+ }
+ return so.setGroup(c.Conn, ifi, grp)
+}
+
+// LeaveGroup leaves the group address group on the interface ifi
+// regardless of whether the group is any-source group or
+// source-specific group.
+func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoLeaveGroup]
+ if !ok {
+ return errNotImplemented
+ }
+ grp := netAddrToIP4(group)
+ if grp == nil {
+ return errMissingAddress
+ }
+ return so.setGroup(c.Conn, ifi, grp)
+}
+
+// JoinSourceSpecificGroup joins the source-specific group comprising
+// group and source on the interface ifi.
+// JoinSourceSpecificGroup uses the system assigned multicast
+// interface when ifi is nil, although this is not recommended because
+// the assignment depends on platforms and sometimes it might require
+// routing configuration.
+func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoJoinSourceGroup]
+ if !ok {
+ return errNotImplemented
+ }
+ grp := netAddrToIP4(group)
+ if grp == nil {
+ return errMissingAddress
+ }
+ src := netAddrToIP4(source)
+ if src == nil {
+ return errMissingAddress
+ }
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
+}
+
+// LeaveSourceSpecificGroup leaves the source-specific group on the
+// interface ifi.
+func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoLeaveSourceGroup]
+ if !ok {
+ return errNotImplemented
+ }
+ grp := netAddrToIP4(group)
+ if grp == nil {
+ return errMissingAddress
+ }
+ src := netAddrToIP4(source)
+ if src == nil {
+ return errMissingAddress
+ }
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
+}
+
+// ExcludeSourceSpecificGroup excludes the source-specific group from
+// the already joined any-source groups by JoinGroup on the interface
+// ifi.
+func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoBlockSourceGroup]
+ if !ok {
+ return errNotImplemented
+ }
+ grp := netAddrToIP4(group)
+ if grp == nil {
+ return errMissingAddress
+ }
+ src := netAddrToIP4(source)
+ if src == nil {
+ return errMissingAddress
+ }
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
+}
+
+// IncludeSourceSpecificGroup includes the excluded source-specific
+// group by ExcludeSourceSpecificGroup again on the interface ifi.
+func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoUnblockSourceGroup]
+ if !ok {
+ return errNotImplemented
+ }
+ grp := netAddrToIP4(group)
+ if grp == nil {
+ return errMissingAddress
+ }
+ src := netAddrToIP4(source)
+ if src == nil {
+ return errMissingAddress
+ }
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
+}
+
+// ICMPFilter returns an ICMP filter.
+// Currently only Linux supports this.
+func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
+ if !c.ok() {
+ return nil, errInvalidConn
+ }
+ so, ok := sockOpts[ssoICMPFilter]
+ if !ok {
+ return nil, errNotImplemented
+ }
+ return so.getICMPFilter(c.Conn)
+}
+
+// SetICMPFilter deploys the ICMP filter.
+// Currently only Linux supports this.
+func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoICMPFilter]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.setICMPFilter(c.Conn, f)
+}
+
+// SetBPF attaches a BPF program to the connection.
+//
+// Only supported on Linux.
+func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoAttachFilter]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.setBPF(c.Conn, filter)
+}
diff --git a/vendor/golang.org/x/net/ipv4/doc.go b/vendor/golang.org/x/net/ipv4/doc.go
new file mode 100644
index 0000000..2458349
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/doc.go
@@ -0,0 +1,244 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package ipv4 implements IP-level socket options for the Internet
+// Protocol version 4.
+//
+// The package provides IP-level socket options that allow
+// manipulation of IPv4 facilities.
+//
+// The IPv4 protocol and basic host requirements for IPv4 are defined
+// in RFC 791 and RFC 1122.
+// Host extensions for multicasting and socket interface extensions
+// for multicast source filters are defined in RFC 1112 and RFC 3678.
+// IGMPv1, IGMPv2 and IGMPv3 are defined in RFC 1112, RFC 2236 and RFC
+// 3376.
+// Source-specific multicast is defined in RFC 4607.
+//
+//
+// Unicasting
+//
+// The options for unicasting are available for net.TCPConn,
+// net.UDPConn and net.IPConn which are created as network connections
+// that use the IPv4 transport. When a single TCP connection carrying
+// a data flow of multiple packets needs to indicate the flow is
+// important, Conn is used to set the type-of-service field on the
+// IPv4 header for each packet.
+//
+// ln, err := net.Listen("tcp4", "0.0.0.0:1024")
+// if err != nil {
+// // error handling
+// }
+// defer ln.Close()
+// for {
+// c, err := ln.Accept()
+// if err != nil {
+// // error handling
+// }
+// go func(c net.Conn) {
+// defer c.Close()
+//
+// The outgoing packets will be labeled DiffServ assured forwarding
+// class 1 low drop precedence, known as AF11 packets.
+//
+// if err := ipv4.NewConn(c).SetTOS(0x28); err != nil {
+// // error handling
+// }
+// if _, err := c.Write(data); err != nil {
+// // error handling
+// }
+// }(c)
+// }
+//
+//
+// Multicasting
+//
+// The options for multicasting are available for net.UDPConn and
+// net.IPConn which are created as network connections that use the
+// IPv4 transport. A few network facilities must be prepared before
+// you begin multicasting, at a minimum joining network interfaces and
+// multicast groups.
+//
+// en0, err := net.InterfaceByName("en0")
+// if err != nil {
+// // error handling
+// }
+// en1, err := net.InterfaceByIndex(911)
+// if err != nil {
+// // error handling
+// }
+// group := net.IPv4(224, 0, 0, 250)
+//
+// First, an application listens to an appropriate address with an
+// appropriate service port.
+//
+// c, err := net.ListenPacket("udp4", "0.0.0.0:1024")
+// if err != nil {
+// // error handling
+// }
+// defer c.Close()
+//
+// Second, the application joins multicast groups, starts listening to
+// the groups on the specified network interfaces. Note that the
+// service port for transport layer protocol does not matter with this
+// operation as joining groups affects only network and link layer
+// protocols, such as IPv4 and Ethernet.
+//
+// p := ipv4.NewPacketConn(c)
+// if err := p.JoinGroup(en0, &net.UDPAddr{IP: group}); err != nil {
+// // error handling
+// }
+// if err := p.JoinGroup(en1, &net.UDPAddr{IP: group}); err != nil {
+// // error handling
+// }
+//
+// The application might set per packet control message transmissions
+// between the protocol stack within the kernel. When the application
+// needs a destination address on an incoming packet,
+// SetControlMessage of PacketConn is used to enable control message
+// transmissions.
+//
+// if err := p.SetControlMessage(ipv4.FlagDst, true); err != nil {
+// // error handling
+// }
+//
+// The application could identify whether the received packets are
+// of interest by using the control message that contains the
+// destination address of the received packet.
+//
+// b := make([]byte, 1500)
+// for {
+// n, cm, src, err := p.ReadFrom(b)
+// if err != nil {
+// // error handling
+// }
+// if cm.Dst.IsMulticast() {
+// if cm.Dst.Equal(group) {
+// // joined group, do something
+// } else {
+// // unknown group, discard
+// continue
+// }
+// }
+//
+// The application can also send both unicast and multicast packets.
+//
+// p.SetTOS(0x0)
+// p.SetTTL(16)
+// if _, err := p.WriteTo(data, nil, src); err != nil {
+// // error handling
+// }
+// dst := &net.UDPAddr{IP: group, Port: 1024}
+// for _, ifi := range []*net.Interface{en0, en1} {
+// if err := p.SetMulticastInterface(ifi); err != nil {
+// // error handling
+// }
+// p.SetMulticastTTL(2)
+// if _, err := p.WriteTo(data, nil, dst); err != nil {
+// // error handling
+// }
+// }
+// }
+//
+//
+// More multicasting
+//
+// An application that uses PacketConn or RawConn may join multiple
+// multicast groups. For example, a UDP listener with port 1024 might
+// join two different groups across over two different network
+// interfaces by using:
+//
+// c, err := net.ListenPacket("udp4", "0.0.0.0:1024")
+// if err != nil {
+// // error handling
+// }
+// defer c.Close()
+// p := ipv4.NewPacketConn(c)
+// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil {
+// // error handling
+// }
+// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}); err != nil {
+// // error handling
+// }
+// if err := p.JoinGroup(en1, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}); err != nil {
+// // error handling
+// }
+//
+// It is possible for multiple UDP listeners that listen on the same
+// UDP port to join the same multicast group. The net package will
+// provide a socket that listens to a wildcard address with reusable
+// UDP port when an appropriate multicast address prefix is passed to
+// the net.ListenPacket or net.ListenUDP.
+//
+// c1, err := net.ListenPacket("udp4", "224.0.0.0:1024")
+// if err != nil {
+// // error handling
+// }
+// defer c1.Close()
+// c2, err := net.ListenPacket("udp4", "224.0.0.0:1024")
+// if err != nil {
+// // error handling
+// }
+// defer c2.Close()
+// p1 := ipv4.NewPacketConn(c1)
+// if err := p1.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil {
+// // error handling
+// }
+// p2 := ipv4.NewPacketConn(c2)
+// if err := p2.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil {
+// // error handling
+// }
+//
+// Also it is possible for the application to leave or rejoin a
+// multicast group on the network interface.
+//
+// if err := p.LeaveGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil {
+// // error handling
+// }
+// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 250)}); err != nil {
+// // error handling
+// }
+//
+//
+// Source-specific multicasting
+//
+// An application that uses PacketConn or RawConn on IGMPv3 supported
+// platform is able to join source-specific multicast groups.
+// The application may use JoinSourceSpecificGroup and
+// LeaveSourceSpecificGroup for the operation known as "include" mode,
+//
+// ssmgroup := net.UDPAddr{IP: net.IPv4(232, 7, 8, 9)}
+// ssmsource := net.UDPAddr{IP: net.IPv4(192, 168, 0, 1)}
+// if err := p.JoinSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil {
+// // error handling
+// }
+// if err := p.LeaveSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil {
+// // error handling
+// }
+//
+// or JoinGroup, ExcludeSourceSpecificGroup,
+// IncludeSourceSpecificGroup and LeaveGroup for the operation known
+// as "exclude" mode.
+//
+// exclsource := net.UDPAddr{IP: net.IPv4(192, 168, 0, 254)}
+// if err := p.JoinGroup(en0, &ssmgroup); err != nil {
+// // error handling
+// }
+// if err := p.ExcludeSourceSpecificGroup(en0, &ssmgroup, &exclsource); err != nil {
+// // error handling
+// }
+// if err := p.LeaveGroup(en0, &ssmgroup); err != nil {
+// // error handling
+// }
+//
+// Note that it depends on each platform implementation what happens
+// when an application which runs on IGMPv3 unsupported platform uses
+// JoinSourceSpecificGroup and LeaveSourceSpecificGroup.
+// In general the platform tries to fall back to conversations using
+// IGMPv1 or IGMPv2 and starts to listen to multicast traffic.
+// In the fallback case, ExcludeSourceSpecificGroup and
+// IncludeSourceSpecificGroup may return an error.
+package ipv4 // import "golang.org/x/net/ipv4"
+
+// BUG(mikio): This package is not implemented on JS, NaCl and Plan 9.
diff --git a/vendor/golang.org/x/net/ipv4/endpoint.go b/vendor/golang.org/x/net/ipv4/endpoint.go
new file mode 100644
index 0000000..4a6d7a8
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/endpoint.go
@@ -0,0 +1,186 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "net"
+ "time"
+
+ "golang.org/x/net/internal/socket"
+)
+
+// BUG(mikio): On Windows, the JoinSourceSpecificGroup,
+// LeaveSourceSpecificGroup, ExcludeSourceSpecificGroup and
+// IncludeSourceSpecificGroup methods of PacketConn and RawConn are
+// not implemented.
+
+// A Conn represents a network endpoint that uses the IPv4 transport.
+// It is used to control basic IP-level socket options such as TOS and
+// TTL.
+type Conn struct {
+ genericOpt
+}
+
+type genericOpt struct {
+ *socket.Conn
+}
+
+func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil }
+
+// NewConn returns a new Conn.
+func NewConn(c net.Conn) *Conn {
+ cc, _ := socket.NewConn(c)
+ return &Conn{
+ genericOpt: genericOpt{Conn: cc},
+ }
+}
+
+// A PacketConn represents a packet network endpoint that uses the
+// IPv4 transport. It is used to control several IP-level socket
+// options including multicasting. It also provides datagram based
+// network I/O methods specific to the IPv4 and higher layer protocols
+// such as UDP.
+type PacketConn struct {
+ genericOpt
+ dgramOpt
+ payloadHandler
+}
+
+type dgramOpt struct {
+ *socket.Conn
+}
+
+func (c *dgramOpt) ok() bool { return c != nil && c.Conn != nil }
+
+// SetControlMessage sets the per packet IP-level socket options.
+func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error {
+ if !c.payloadHandler.ok() {
+ return errInvalidConn
+ }
+ return setControlMessage(c.dgramOpt.Conn, &c.payloadHandler.rawOpt, cf, on)
+}
+
+// SetDeadline sets the read and write deadlines associated with the
+// endpoint.
+func (c *PacketConn) SetDeadline(t time.Time) error {
+ if !c.payloadHandler.ok() {
+ return errInvalidConn
+ }
+ return c.payloadHandler.PacketConn.SetDeadline(t)
+}
+
+// SetReadDeadline sets the read deadline associated with the
+// endpoint.
+func (c *PacketConn) SetReadDeadline(t time.Time) error {
+ if !c.payloadHandler.ok() {
+ return errInvalidConn
+ }
+ return c.payloadHandler.PacketConn.SetReadDeadline(t)
+}
+
+// SetWriteDeadline sets the write deadline associated with the
+// endpoint.
+func (c *PacketConn) SetWriteDeadline(t time.Time) error {
+ if !c.payloadHandler.ok() {
+ return errInvalidConn
+ }
+ return c.payloadHandler.PacketConn.SetWriteDeadline(t)
+}
+
+// Close closes the endpoint.
+func (c *PacketConn) Close() error {
+ if !c.payloadHandler.ok() {
+ return errInvalidConn
+ }
+ return c.payloadHandler.PacketConn.Close()
+}
+
+// NewPacketConn returns a new PacketConn using c as its underlying
+// transport.
+func NewPacketConn(c net.PacketConn) *PacketConn {
+ cc, _ := socket.NewConn(c.(net.Conn))
+ p := &PacketConn{
+ genericOpt: genericOpt{Conn: cc},
+ dgramOpt: dgramOpt{Conn: cc},
+ payloadHandler: payloadHandler{PacketConn: c, Conn: cc},
+ }
+ return p
+}
+
+// A RawConn represents a packet network endpoint that uses the IPv4
+// transport. It is used to control several IP-level socket options
+// including IPv4 header manipulation. It also provides datagram
+// based network I/O methods specific to the IPv4 and higher layer
+// protocols that handle IPv4 datagram directly such as OSPF, GRE.
+type RawConn struct {
+ genericOpt
+ dgramOpt
+ packetHandler
+}
+
+// SetControlMessage sets the per packet IP-level socket options.
+func (c *RawConn) SetControlMessage(cf ControlFlags, on bool) error {
+ if !c.packetHandler.ok() {
+ return errInvalidConn
+ }
+ return setControlMessage(c.dgramOpt.Conn, &c.packetHandler.rawOpt, cf, on)
+}
+
+// SetDeadline sets the read and write deadlines associated with the
+// endpoint.
+func (c *RawConn) SetDeadline(t time.Time) error {
+ if !c.packetHandler.ok() {
+ return errInvalidConn
+ }
+ return c.packetHandler.IPConn.SetDeadline(t)
+}
+
+// SetReadDeadline sets the read deadline associated with the
+// endpoint.
+func (c *RawConn) SetReadDeadline(t time.Time) error {
+ if !c.packetHandler.ok() {
+ return errInvalidConn
+ }
+ return c.packetHandler.IPConn.SetReadDeadline(t)
+}
+
+// SetWriteDeadline sets the write deadline associated with the
+// endpoint.
+func (c *RawConn) SetWriteDeadline(t time.Time) error {
+ if !c.packetHandler.ok() {
+ return errInvalidConn
+ }
+ return c.packetHandler.IPConn.SetWriteDeadline(t)
+}
+
+// Close closes the endpoint.
+func (c *RawConn) Close() error {
+ if !c.packetHandler.ok() {
+ return errInvalidConn
+ }
+ return c.packetHandler.IPConn.Close()
+}
+
+// NewRawConn returns a new RawConn using c as its underlying
+// transport.
+func NewRawConn(c net.PacketConn) (*RawConn, error) {
+ cc, err := socket.NewConn(c.(net.Conn))
+ if err != nil {
+ return nil, err
+ }
+ r := &RawConn{
+ genericOpt: genericOpt{Conn: cc},
+ dgramOpt: dgramOpt{Conn: cc},
+ packetHandler: packetHandler{IPConn: c.(*net.IPConn), Conn: cc},
+ }
+ so, ok := sockOpts[ssoHeaderPrepend]
+ if !ok {
+ return nil, errNotImplemented
+ }
+ if err := so.SetInt(r.dgramOpt.Conn, boolint(true)); err != nil {
+ return nil, err
+ }
+ return r, nil
+}
diff --git a/vendor/golang.org/x/net/ipv4/genericopt.go b/vendor/golang.org/x/net/ipv4/genericopt.go
new file mode 100644
index 0000000..51c1237
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/genericopt.go
@@ -0,0 +1,55 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+// TOS returns the type-of-service field value for outgoing packets.
+func (c *genericOpt) TOS() (int, error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ so, ok := sockOpts[ssoTOS]
+ if !ok {
+ return 0, errNotImplemented
+ }
+ return so.GetInt(c.Conn)
+}
+
+// SetTOS sets the type-of-service field value for future outgoing
+// packets.
+func (c *genericOpt) SetTOS(tos int) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoTOS]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.SetInt(c.Conn, tos)
+}
+
+// TTL returns the time-to-live field value for outgoing packets.
+func (c *genericOpt) TTL() (int, error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ so, ok := sockOpts[ssoTTL]
+ if !ok {
+ return 0, errNotImplemented
+ }
+ return so.GetInt(c.Conn)
+}
+
+// SetTTL sets the time-to-live field value for future outgoing
+// packets.
+func (c *genericOpt) SetTTL(ttl int) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoTTL]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.SetInt(c.Conn, ttl)
+}
diff --git a/vendor/golang.org/x/net/ipv4/header.go b/vendor/golang.org/x/net/ipv4/header.go
new file mode 100644
index 0000000..a00a3ea
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/header.go
@@ -0,0 +1,172 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "encoding/binary"
+ "fmt"
+ "net"
+ "runtime"
+
+ "golang.org/x/net/internal/socket"
+)
+
+const (
+ Version = 4 // protocol version
+ HeaderLen = 20 // header length without extension headers
+)
+
+type HeaderFlags int
+
+const (
+ MoreFragments HeaderFlags = 1 << iota // more fragments flag
+ DontFragment // don't fragment flag
+)
+
+// A Header represents an IPv4 header.
+type Header struct {
+ Version int // protocol version
+ Len int // header length
+ TOS int // type-of-service
+ TotalLen int // packet total length
+ ID int // identification
+ Flags HeaderFlags // flags
+ FragOff int // fragment offset
+ TTL int // time-to-live
+ Protocol int // next protocol
+ Checksum int // checksum
+ Src net.IP // source address
+ Dst net.IP // destination address
+ Options []byte // options, extension headers
+}
+
+func (h *Header) String() string {
+ if h == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("ver=%d hdrlen=%d tos=%#x totallen=%d id=%#x flags=%#x fragoff=%#x ttl=%d proto=%d cksum=%#x src=%v dst=%v", h.Version, h.Len, h.TOS, h.TotalLen, h.ID, h.Flags, h.FragOff, h.TTL, h.Protocol, h.Checksum, h.Src, h.Dst)
+}
+
+// Marshal returns the binary encoding of h.
+//
+// The returned slice is in the format used by a raw IP socket on the
+// local system.
+// This may differ from the wire format, depending on the system.
+func (h *Header) Marshal() ([]byte, error) {
+ if h == nil {
+ return nil, errNilHeader
+ }
+ if h.Len < HeaderLen {
+ return nil, errHeaderTooShort
+ }
+ hdrlen := HeaderLen + len(h.Options)
+ b := make([]byte, hdrlen)
+ b[0] = byte(Version<<4 | (hdrlen >> 2 & 0x0f))
+ b[1] = byte(h.TOS)
+ flagsAndFragOff := (h.FragOff & 0x1fff) | int(h.Flags<<13)
+ switch runtime.GOOS {
+ case "darwin", "ios", "dragonfly", "netbsd":
+ socket.NativeEndian.PutUint16(b[2:4], uint16(h.TotalLen))
+ socket.NativeEndian.PutUint16(b[6:8], uint16(flagsAndFragOff))
+ case "freebsd":
+ if freebsdVersion < 1100000 {
+ socket.NativeEndian.PutUint16(b[2:4], uint16(h.TotalLen))
+ socket.NativeEndian.PutUint16(b[6:8], uint16(flagsAndFragOff))
+ } else {
+ binary.BigEndian.PutUint16(b[2:4], uint16(h.TotalLen))
+ binary.BigEndian.PutUint16(b[6:8], uint16(flagsAndFragOff))
+ }
+ default:
+ binary.BigEndian.PutUint16(b[2:4], uint16(h.TotalLen))
+ binary.BigEndian.PutUint16(b[6:8], uint16(flagsAndFragOff))
+ }
+ binary.BigEndian.PutUint16(b[4:6], uint16(h.ID))
+ b[8] = byte(h.TTL)
+ b[9] = byte(h.Protocol)
+ binary.BigEndian.PutUint16(b[10:12], uint16(h.Checksum))
+ if ip := h.Src.To4(); ip != nil {
+ copy(b[12:16], ip[:net.IPv4len])
+ }
+ if ip := h.Dst.To4(); ip != nil {
+ copy(b[16:20], ip[:net.IPv4len])
+ } else {
+ return nil, errMissingAddress
+ }
+ if len(h.Options) > 0 {
+ copy(b[HeaderLen:], h.Options)
+ }
+ return b, nil
+}
+
+// Parse parses b as an IPv4 header and stores the result in h.
+//
+// The provided b must be in the format used by a raw IP socket on the
+// local system.
+// This may differ from the wire format, depending on the system.
+func (h *Header) Parse(b []byte) error {
+ if h == nil || b == nil {
+ return errNilHeader
+ }
+ if len(b) < HeaderLen {
+ return errHeaderTooShort
+ }
+ hdrlen := int(b[0]&0x0f) << 2
+ if len(b) < hdrlen {
+ return errExtHeaderTooShort
+ }
+ h.Version = int(b[0] >> 4)
+ h.Len = hdrlen
+ h.TOS = int(b[1])
+ h.ID = int(binary.BigEndian.Uint16(b[4:6]))
+ h.TTL = int(b[8])
+ h.Protocol = int(b[9])
+ h.Checksum = int(binary.BigEndian.Uint16(b[10:12]))
+ h.Src = net.IPv4(b[12], b[13], b[14], b[15])
+ h.Dst = net.IPv4(b[16], b[17], b[18], b[19])
+ switch runtime.GOOS {
+ case "darwin", "ios", "dragonfly", "netbsd":
+ h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4])) + hdrlen
+ h.FragOff = int(socket.NativeEndian.Uint16(b[6:8]))
+ case "freebsd":
+ if freebsdVersion < 1100000 {
+ h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4]))
+ if freebsdVersion < 1000000 {
+ h.TotalLen += hdrlen
+ }
+ h.FragOff = int(socket.NativeEndian.Uint16(b[6:8]))
+ } else {
+ h.TotalLen = int(binary.BigEndian.Uint16(b[2:4]))
+ h.FragOff = int(binary.BigEndian.Uint16(b[6:8]))
+ }
+ default:
+ h.TotalLen = int(binary.BigEndian.Uint16(b[2:4]))
+ h.FragOff = int(binary.BigEndian.Uint16(b[6:8]))
+ }
+ h.Flags = HeaderFlags(h.FragOff&0xe000) >> 13
+ h.FragOff = h.FragOff & 0x1fff
+ optlen := hdrlen - HeaderLen
+ if optlen > 0 && len(b) >= hdrlen {
+ if cap(h.Options) < optlen {
+ h.Options = make([]byte, optlen)
+ } else {
+ h.Options = h.Options[:optlen]
+ }
+ copy(h.Options, b[HeaderLen:hdrlen])
+ }
+ return nil
+}
+
+// ParseHeader parses b as an IPv4 header.
+//
+// The provided b must be in the format used by a raw IP socket on the
+// local system.
+// This may differ from the wire format, depending on the system.
+func ParseHeader(b []byte) (*Header, error) {
+ h := new(Header)
+ if err := h.Parse(b); err != nil {
+ return nil, err
+ }
+ return h, nil
+}
diff --git a/vendor/golang.org/x/net/ipv4/helper.go b/vendor/golang.org/x/net/ipv4/helper.go
new file mode 100644
index 0000000..e845a73
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/helper.go
@@ -0,0 +1,77 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "errors"
+ "net"
+ "runtime"
+
+ "golang.org/x/net/internal/socket"
+)
+
+var (
+ errInvalidConn = errors.New("invalid connection")
+ errMissingAddress = errors.New("missing address")
+ errNilHeader = errors.New("nil header")
+ errHeaderTooShort = errors.New("header too short")
+ errExtHeaderTooShort = errors.New("extension header too short")
+ errInvalidConnType = errors.New("invalid conn type")
+ errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH)
+
+ // See https://www.freebsd.org/doc/en/books/porters-handbook/versions.html.
+ freebsdVersion uint32
+ compatFreeBSD32 bool // 386 emulation on amd64
+)
+
+// See golang.org/issue/30899.
+func adjustFreeBSD32(m *socket.Message) {
+ // FreeBSD 12.0-RELEASE is affected by https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236737
+ if 1200086 <= freebsdVersion && freebsdVersion < 1201000 {
+ l := (m.NN + 4 - 1) &^ (4 - 1)
+ if m.NN < l && l <= len(m.OOB) {
+ m.NN = l
+ }
+ }
+}
+
+func boolint(b bool) int {
+ if b {
+ return 1
+ }
+ return 0
+}
+
+func netAddrToIP4(a net.Addr) net.IP {
+ switch v := a.(type) {
+ case *net.UDPAddr:
+ if ip := v.IP.To4(); ip != nil {
+ return ip
+ }
+ case *net.IPAddr:
+ if ip := v.IP.To4(); ip != nil {
+ return ip
+ }
+ }
+ return nil
+}
+
+func opAddr(a net.Addr) net.Addr {
+ switch a.(type) {
+ case *net.TCPAddr:
+ if a == nil {
+ return nil
+ }
+ case *net.UDPAddr:
+ if a == nil {
+ return nil
+ }
+ case *net.IPAddr:
+ if a == nil {
+ return nil
+ }
+ }
+ return a
+}
diff --git a/vendor/golang.org/x/net/ipv4/iana.go b/vendor/golang.org/x/net/ipv4/iana.go
new file mode 100644
index 0000000..4375b40
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/iana.go
@@ -0,0 +1,38 @@
+// go generate gen.go
+// Code generated by the command above; DO NOT EDIT.
+
+package ipv4
+
+// Internet Control Message Protocol (ICMP) Parameters, Updated: 2018-02-26
+const (
+ ICMPTypeEchoReply ICMPType = 0 // Echo Reply
+ ICMPTypeDestinationUnreachable ICMPType = 3 // Destination Unreachable
+ ICMPTypeRedirect ICMPType = 5 // Redirect
+ ICMPTypeEcho ICMPType = 8 // Echo
+ ICMPTypeRouterAdvertisement ICMPType = 9 // Router Advertisement
+ ICMPTypeRouterSolicitation ICMPType = 10 // Router Solicitation
+ ICMPTypeTimeExceeded ICMPType = 11 // Time Exceeded
+ ICMPTypeParameterProblem ICMPType = 12 // Parameter Problem
+ ICMPTypeTimestamp ICMPType = 13 // Timestamp
+ ICMPTypeTimestampReply ICMPType = 14 // Timestamp Reply
+ ICMPTypePhoturis ICMPType = 40 // Photuris
+ ICMPTypeExtendedEchoRequest ICMPType = 42 // Extended Echo Request
+ ICMPTypeExtendedEchoReply ICMPType = 43 // Extended Echo Reply
+)
+
+// Internet Control Message Protocol (ICMP) Parameters, Updated: 2018-02-26
+var icmpTypes = map[ICMPType]string{
+ 0: "echo reply",
+ 3: "destination unreachable",
+ 5: "redirect",
+ 8: "echo",
+ 9: "router advertisement",
+ 10: "router solicitation",
+ 11: "time exceeded",
+ 12: "parameter problem",
+ 13: "timestamp",
+ 14: "timestamp reply",
+ 40: "photuris",
+ 42: "extended echo request",
+ 43: "extended echo reply",
+}
diff --git a/vendor/golang.org/x/net/ipv4/icmp.go b/vendor/golang.org/x/net/ipv4/icmp.go
new file mode 100644
index 0000000..9902bb3
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/icmp.go
@@ -0,0 +1,57 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import "golang.org/x/net/internal/iana"
+
+// An ICMPType represents a type of ICMP message.
+type ICMPType int
+
+func (typ ICMPType) String() string {
+ s, ok := icmpTypes[typ]
+ if !ok {
+ return "<nil>"
+ }
+ return s
+}
+
+// Protocol returns the ICMPv4 protocol number.
+func (typ ICMPType) Protocol() int {
+ return iana.ProtocolICMP
+}
+
+// An ICMPFilter represents an ICMP message filter for incoming
+// packets. The filter belongs to a packet delivery path on a host and
+// it cannot interact with forwarding packets or tunnel-outer packets.
+//
+// Note: RFC 8200 defines a reasonable role model and it works not
+// only for IPv6 but IPv4. A node means a device that implements IP.
+// A router means a node that forwards IP packets not explicitly
+// addressed to itself, and a host means a node that is not a router.
+type ICMPFilter struct {
+ icmpFilter
+}
+
+// Accept accepts incoming ICMP packets including the type field value
+// typ.
+func (f *ICMPFilter) Accept(typ ICMPType) {
+ f.accept(typ)
+}
+
+// Block blocks incoming ICMP packets including the type field value
+// typ.
+func (f *ICMPFilter) Block(typ ICMPType) {
+ f.block(typ)
+}
+
+// SetAll sets the filter action to the filter.
+func (f *ICMPFilter) SetAll(block bool) {
+ f.setAll(block)
+}
+
+// WillBlock reports whether the ICMP type will be blocked.
+func (f *ICMPFilter) WillBlock(typ ICMPType) bool {
+ return f.willBlock(typ)
+}
diff --git a/vendor/golang.org/x/net/ipv4/icmp_linux.go b/vendor/golang.org/x/net/ipv4/icmp_linux.go
new file mode 100644
index 0000000..6e1c5c8
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/icmp_linux.go
@@ -0,0 +1,25 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+func (f *icmpFilter) accept(typ ICMPType) {
+ f.Data &^= 1 << (uint32(typ) & 31)
+}
+
+func (f *icmpFilter) block(typ ICMPType) {
+ f.Data |= 1 << (uint32(typ) & 31)
+}
+
+func (f *icmpFilter) setAll(block bool) {
+ if block {
+ f.Data = 1<<32 - 1
+ } else {
+ f.Data = 0
+ }
+}
+
+func (f *icmpFilter) willBlock(typ ICMPType) bool {
+ return f.Data&(1<<(uint32(typ)&31)) != 0
+}
diff --git a/vendor/golang.org/x/net/ipv4/icmp_stub.go b/vendor/golang.org/x/net/ipv4/icmp_stub.go
new file mode 100644
index 0000000..cd4ee6e
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/icmp_stub.go
@@ -0,0 +1,26 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !linux
+// +build !linux
+
+package ipv4
+
+const sizeofICMPFilter = 0x0
+
+type icmpFilter struct {
+}
+
+func (f *icmpFilter) accept(typ ICMPType) {
+}
+
+func (f *icmpFilter) block(typ ICMPType) {
+}
+
+func (f *icmpFilter) setAll(block bool) {
+}
+
+func (f *icmpFilter) willBlock(typ ICMPType) bool {
+ return false
+}
diff --git a/vendor/golang.org/x/net/ipv4/packet.go b/vendor/golang.org/x/net/ipv4/packet.go
new file mode 100644
index 0000000..7d784e0
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/packet.go
@@ -0,0 +1,117 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+// BUG(mikio): On Windows, the ReadFrom and WriteTo methods of RawConn
+// are not implemented.
+
+// A packetHandler represents the IPv4 datagram handler.
+type packetHandler struct {
+ *net.IPConn
+ *socket.Conn
+ rawOpt
+}
+
+func (c *packetHandler) ok() bool { return c != nil && c.IPConn != nil && c.Conn != nil }
+
+// ReadFrom reads an IPv4 datagram from the endpoint c, copying the
+// datagram into b. It returns the received datagram as the IPv4
+// header h, the payload p and the control message cm.
+func (c *packetHandler) ReadFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) {
+ if !c.ok() {
+ return nil, nil, nil, errInvalidConn
+ }
+ c.rawOpt.RLock()
+ m := socket.Message{
+ Buffers: [][]byte{b},
+ OOB: NewControlMessage(c.rawOpt.cflags),
+ }
+ c.rawOpt.RUnlock()
+ if err := c.RecvMsg(&m, 0); err != nil {
+ return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ var hs []byte
+ if hs, p, err = slicePacket(b[:m.N]); err != nil {
+ return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ if h, err = ParseHeader(hs); err != nil {
+ return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ if m.NN > 0 {
+ if compatFreeBSD32 {
+ adjustFreeBSD32(&m)
+ }
+ cm = new(ControlMessage)
+ if err := cm.Parse(m.OOB[:m.NN]); err != nil {
+ return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ }
+ if src, ok := m.Addr.(*net.IPAddr); ok && cm != nil {
+ cm.Src = src.IP
+ }
+ return
+}
+
+func slicePacket(b []byte) (h, p []byte, err error) {
+ if len(b) < HeaderLen {
+ return nil, nil, errHeaderTooShort
+ }
+ hdrlen := int(b[0]&0x0f) << 2
+ return b[:hdrlen], b[hdrlen:], nil
+}
+
+// WriteTo writes an IPv4 datagram through the endpoint c, copying the
+// datagram from the IPv4 header h and the payload p. The control
+// message cm allows the datagram path and the outgoing interface to be
+// specified. Currently only Darwin and Linux support this. The cm
+// may be nil if control of the outgoing datagram is not required.
+//
+// The IPv4 header h must contain appropriate fields that include:
+//
+// Version = <must be specified>
+// Len = <must be specified>
+// TOS = <must be specified>
+// TotalLen = <must be specified>
+// ID = platform sets an appropriate value if ID is zero
+// FragOff = <must be specified>
+// TTL = <must be specified>
+// Protocol = <must be specified>
+// Checksum = platform sets an appropriate value if Checksum is zero
+// Src = platform sets an appropriate value if Src is nil
+// Dst = <must be specified>
+// Options = optional
+func (c *packetHandler) WriteTo(h *Header, p []byte, cm *ControlMessage) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ m := socket.Message{
+ OOB: cm.Marshal(),
+ }
+ wh, err := h.Marshal()
+ if err != nil {
+ return err
+ }
+ m.Buffers = [][]byte{wh, p}
+ dst := new(net.IPAddr)
+ if cm != nil {
+ if ip := cm.Dst.To4(); ip != nil {
+ dst.IP = ip
+ }
+ }
+ if dst.IP == nil {
+ dst.IP = h.Dst
+ }
+ m.Addr = dst
+ if err := c.SendMsg(&m, 0); err != nil {
+ return &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Addr: opAddr(dst), Err: err}
+ }
+ return nil
+}
diff --git a/vendor/golang.org/x/net/ipv4/payload.go b/vendor/golang.org/x/net/ipv4/payload.go
new file mode 100644
index 0000000..f95f811
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/payload.go
@@ -0,0 +1,23 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+// BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo
+// methods of PacketConn is not implemented.
+
+// A payloadHandler represents the IPv4 datagram payload handler.
+type payloadHandler struct {
+ net.PacketConn
+ *socket.Conn
+ rawOpt
+}
+
+func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil }
diff --git a/vendor/golang.org/x/net/ipv4/payload_cmsg.go b/vendor/golang.org/x/net/ipv4/payload_cmsg.go
new file mode 100644
index 0000000..1bb370e
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/payload_cmsg.go
@@ -0,0 +1,85 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
+
+package ipv4
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+// ReadFrom reads a payload of the received IPv4 datagram, from the
+// endpoint c, copying the payload into b. It returns the number of
+// bytes copied into b, the control message cm and the source address
+// src of the received datagram.
+func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
+ if !c.ok() {
+ return 0, nil, nil, errInvalidConn
+ }
+ c.rawOpt.RLock()
+ m := socket.Message{
+ OOB: NewControlMessage(c.rawOpt.cflags),
+ }
+ c.rawOpt.RUnlock()
+ switch c.PacketConn.(type) {
+ case *net.UDPConn:
+ m.Buffers = [][]byte{b}
+ if err := c.RecvMsg(&m, 0); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ case *net.IPConn:
+ h := make([]byte, HeaderLen)
+ m.Buffers = [][]byte{h, b}
+ if err := c.RecvMsg(&m, 0); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ hdrlen := int(h[0]&0x0f) << 2
+ if hdrlen > len(h) {
+ d := hdrlen - len(h)
+ copy(b, b[d:])
+ m.N -= d
+ } else {
+ m.N -= hdrlen
+ }
+ default:
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errInvalidConnType}
+ }
+ if m.NN > 0 {
+ if compatFreeBSD32 {
+ adjustFreeBSD32(&m)
+ }
+ cm = new(ControlMessage)
+ if err := cm.Parse(m.OOB[:m.NN]); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ cm.Src = netAddrToIP4(m.Addr)
+ }
+ return m.N, cm, m.Addr, nil
+}
+
+// WriteTo writes a payload of the IPv4 datagram, to the destination
+// address dst through the endpoint c, copying the payload from b. It
+// returns the number of bytes written. The control message cm allows
+// the datagram path and the outgoing interface to be specified.
+// Currently only Darwin and Linux support this. The cm may be nil if
+// control of the outgoing datagram is not required.
+func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ m := socket.Message{
+ Buffers: [][]byte{b},
+ OOB: cm.Marshal(),
+ Addr: dst,
+ }
+ err = c.SendMsg(&m, 0)
+ if err != nil {
+ err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Addr: opAddr(dst), Err: err}
+ }
+ return m.N, err
+}
diff --git a/vendor/golang.org/x/net/ipv4/payload_nocmsg.go b/vendor/golang.org/x/net/ipv4/payload_nocmsg.go
new file mode 100644
index 0000000..53f0794
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/payload_nocmsg.go
@@ -0,0 +1,40 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
+
+package ipv4
+
+import "net"
+
+// ReadFrom reads a payload of the received IPv4 datagram, from the
+// endpoint c, copying the payload into b. It returns the number of
+// bytes copied into b, the control message cm and the source address
+// src of the received datagram.
+func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
+ if !c.ok() {
+ return 0, nil, nil, errInvalidConn
+ }
+ if n, src, err = c.PacketConn.ReadFrom(b); err != nil {
+ return 0, nil, nil, err
+ }
+ return
+}
+
+// WriteTo writes a payload of the IPv4 datagram, to the destination
+// address dst through the endpoint c, copying the payload from b. It
+// returns the number of bytes written. The control message cm allows
+// the datagram path and the outgoing interface to be specified.
+// Currently only Darwin and Linux support this. The cm may be nil if
+// control of the outgoing datagram is not required.
+func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ if dst == nil {
+ return 0, errMissingAddress
+ }
+ return c.PacketConn.WriteTo(b, dst)
+}
diff --git a/vendor/golang.org/x/net/ipv4/sockopt.go b/vendor/golang.org/x/net/ipv4/sockopt.go
new file mode 100644
index 0000000..22e90c0
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sockopt.go
@@ -0,0 +1,44 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import "golang.org/x/net/internal/socket"
+
+// Sticky socket options
+const (
+ ssoTOS = iota // header field for unicast packet
+ ssoTTL // header field for unicast packet
+ ssoMulticastTTL // header field for multicast packet
+ ssoMulticastInterface // outbound interface for multicast packet
+ ssoMulticastLoopback // loopback for multicast packet
+ ssoReceiveTTL // header field on received packet
+ ssoReceiveDst // header field on received packet
+ ssoReceiveInterface // inbound interface on received packet
+ ssoPacketInfo // incbound or outbound packet path
+ ssoHeaderPrepend // ipv4 header prepend
+ ssoStripHeader // strip ipv4 header
+ ssoICMPFilter // icmp filter
+ ssoJoinGroup // any-source multicast
+ ssoLeaveGroup // any-source multicast
+ ssoJoinSourceGroup // source-specific multicast
+ ssoLeaveSourceGroup // source-specific multicast
+ ssoBlockSourceGroup // any-source or source-specific multicast
+ ssoUnblockSourceGroup // any-source or source-specific multicast
+ ssoAttachFilter // attach BPF for filtering inbound traffic
+)
+
+// Sticky socket option value types
+const (
+ ssoTypeIPMreq = iota + 1
+ ssoTypeIPMreqn
+ ssoTypeGroupReq
+ ssoTypeGroupSourceReq
+)
+
+// A sockOpt represents a binding for sticky socket option.
+type sockOpt struct {
+ socket.Option
+ typ int // hint for option value type; optional
+}
diff --git a/vendor/golang.org/x/net/ipv4/sockopt_posix.go b/vendor/golang.org/x/net/ipv4/sockopt_posix.go
new file mode 100644
index 0000000..eb07c1c
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sockopt_posix.go
@@ -0,0 +1,72 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
+
+package ipv4
+
+import (
+ "net"
+ "unsafe"
+
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) {
+ switch so.typ {
+ case ssoTypeIPMreqn:
+ return so.getIPMreqn(c)
+ default:
+ return so.getMulticastIf(c)
+ }
+}
+
+func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error {
+ switch so.typ {
+ case ssoTypeIPMreqn:
+ return so.setIPMreqn(c, ifi, nil)
+ default:
+ return so.setMulticastIf(c, ifi)
+ }
+}
+
+func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
+ b := make([]byte, so.Len)
+ n, err := so.Get(c, b)
+ if err != nil {
+ return nil, err
+ }
+ if n != sizeofICMPFilter {
+ return nil, errNotImplemented
+ }
+ return (*ICMPFilter)(unsafe.Pointer(&b[0])), nil
+}
+
+func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error {
+ b := (*[sizeofICMPFilter]byte)(unsafe.Pointer(f))[:sizeofICMPFilter]
+ return so.Set(c, b)
+}
+
+func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ switch so.typ {
+ case ssoTypeIPMreq:
+ return so.setIPMreq(c, ifi, grp)
+ case ssoTypeIPMreqn:
+ return so.setIPMreqn(c, ifi, grp)
+ case ssoTypeGroupReq:
+ return so.setGroupReq(c, ifi, grp)
+ default:
+ return errNotImplemented
+ }
+}
+
+func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
+ return so.setGroupSourceReq(c, ifi, grp, src)
+}
+
+func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error {
+ return so.setAttachFilter(c, f)
+}
diff --git a/vendor/golang.org/x/net/ipv4/sockopt_stub.go b/vendor/golang.org/x/net/ipv4/sockopt_stub.go
new file mode 100644
index 0000000..cf03689
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sockopt_stub.go
@@ -0,0 +1,43 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
+
+package ipv4
+
+import (
+ "net"
+
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) {
+ return nil, errNotImplemented
+}
+
+func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error {
+ return errNotImplemented
+}
+
+func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
+ return nil, errNotImplemented
+}
+
+func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error {
+ return errNotImplemented
+}
+
+func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ return errNotImplemented
+}
+
+func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
+ return errNotImplemented
+}
+
+func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error {
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_aix.go b/vendor/golang.org/x/net/ipv4/sys_aix.go
new file mode 100644
index 0000000..02730cd
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_aix.go
@@ -0,0 +1,44 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Added for go1.11 compatibility
+//go:build aix
+// +build aix
+
+package ipv4
+
+import (
+ "net"
+ "syscall"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+// IP_RECVIF is defined on AIX but doesn't work. IP_RECVINTERFACE must be used instead.
+const sockoptReceiveInterface = unix.IP_RECVINTERFACE
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTTL: {unix.IP_RECVTTL, 1, marshalTTL, parseTTL},
+ ctlDst: {unix.IP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst},
+ ctlInterface: {unix.IP_RECVINTERFACE, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_TTL, Len: 1}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_IF, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_LOOP, Len: 1}},
+ ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVTTL, Len: 4}},
+ ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVDSTADDR, Len: 4}},
+ ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVINTERFACE, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_HDRINCL, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
+ }
+)
diff --git a/vendor/golang.org/x/net/ipv4/sys_asmreq.go b/vendor/golang.org/x/net/ipv4/sys_asmreq.go
new file mode 100644
index 0000000..22322b3
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_asmreq.go
@@ -0,0 +1,123 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd || solaris || windows
+// +build aix darwin dragonfly freebsd netbsd openbsd solaris windows
+
+package ipv4
+
+import (
+ "errors"
+ "net"
+ "unsafe"
+
+ "golang.org/x/net/internal/socket"
+)
+
+var errNoSuchInterface = errors.New("no such interface")
+
+func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ mreq := ipMreq{Multiaddr: [4]byte{grp[0], grp[1], grp[2], grp[3]}}
+ if err := setIPMreqInterface(&mreq, ifi); err != nil {
+ return err
+ }
+ b := (*[sizeofIPMreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPMreq]
+ return so.Set(c, b)
+}
+
+func (so *sockOpt) getMulticastIf(c *socket.Conn) (*net.Interface, error) {
+ var b [4]byte
+ if _, err := so.Get(c, b[:]); err != nil {
+ return nil, err
+ }
+ ifi, err := netIP4ToInterface(net.IPv4(b[0], b[1], b[2], b[3]))
+ if err != nil {
+ return nil, err
+ }
+ return ifi, nil
+}
+
+func (so *sockOpt) setMulticastIf(c *socket.Conn, ifi *net.Interface) error {
+ ip, err := netInterfaceToIP4(ifi)
+ if err != nil {
+ return err
+ }
+ var b [4]byte
+ copy(b[:], ip)
+ return so.Set(c, b[:])
+}
+
+func setIPMreqInterface(mreq *ipMreq, ifi *net.Interface) error {
+ if ifi == nil {
+ return nil
+ }
+ ifat, err := ifi.Addrs()
+ if err != nil {
+ return err
+ }
+ for _, ifa := range ifat {
+ switch ifa := ifa.(type) {
+ case *net.IPAddr:
+ if ip := ifa.IP.To4(); ip != nil {
+ copy(mreq.Interface[:], ip)
+ return nil
+ }
+ case *net.IPNet:
+ if ip := ifa.IP.To4(); ip != nil {
+ copy(mreq.Interface[:], ip)
+ return nil
+ }
+ }
+ }
+ return errNoSuchInterface
+}
+
+func netIP4ToInterface(ip net.IP) (*net.Interface, error) {
+ ift, err := net.Interfaces()
+ if err != nil {
+ return nil, err
+ }
+ for _, ifi := range ift {
+ ifat, err := ifi.Addrs()
+ if err != nil {
+ return nil, err
+ }
+ for _, ifa := range ifat {
+ switch ifa := ifa.(type) {
+ case *net.IPAddr:
+ if ip.Equal(ifa.IP) {
+ return &ifi, nil
+ }
+ case *net.IPNet:
+ if ip.Equal(ifa.IP) {
+ return &ifi, nil
+ }
+ }
+ }
+ }
+ return nil, errNoSuchInterface
+}
+
+func netInterfaceToIP4(ifi *net.Interface) (net.IP, error) {
+ if ifi == nil {
+ return net.IPv4zero.To4(), nil
+ }
+ ifat, err := ifi.Addrs()
+ if err != nil {
+ return nil, err
+ }
+ for _, ifa := range ifat {
+ switch ifa := ifa.(type) {
+ case *net.IPAddr:
+ if ip := ifa.IP.To4(); ip != nil {
+ return ip, nil
+ }
+ case *net.IPNet:
+ if ip := ifa.IP.To4(); ip != nil {
+ return ip, nil
+ }
+ }
+ }
+ return nil, errNoSuchInterface
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go b/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go
new file mode 100644
index 0000000..fde6401
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go
@@ -0,0 +1,26 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !netbsd && !openbsd && !solaris && !windows
+// +build !aix,!darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!windows
+
+package ipv4
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ return errNotImplemented
+}
+
+func (so *sockOpt) getMulticastIf(c *socket.Conn) (*net.Interface, error) {
+ return nil, errNotImplemented
+}
+
+func (so *sockOpt) setMulticastIf(c *socket.Conn, ifi *net.Interface) error {
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_asmreqn.go b/vendor/golang.org/x/net/ipv4/sys_asmreqn.go
new file mode 100644
index 0000000..54eb990
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_asmreqn.go
@@ -0,0 +1,45 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build darwin || freebsd || linux
+// +build darwin freebsd linux
+
+package ipv4
+
+import (
+ "net"
+ "unsafe"
+
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) {
+ b := make([]byte, so.Len)
+ if _, err := so.Get(c, b); err != nil {
+ return nil, err
+ }
+ mreqn := (*unix.IPMreqn)(unsafe.Pointer(&b[0]))
+ if mreqn.Ifindex == 0 {
+ return nil, nil
+ }
+ ifi, err := net.InterfaceByIndex(int(mreqn.Ifindex))
+ if err != nil {
+ return nil, err
+ }
+ return ifi, nil
+}
+
+func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ var mreqn unix.IPMreqn
+ if ifi != nil {
+ mreqn.Ifindex = int32(ifi.Index)
+ }
+ if grp != nil {
+ mreqn.Multiaddr = [4]byte{grp[0], grp[1], grp[2], grp[3]}
+ }
+ b := (*[unix.SizeofIPMreqn]byte)(unsafe.Pointer(&mreqn))[:unix.SizeofIPMreqn]
+ return so.Set(c, b)
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go b/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go
new file mode 100644
index 0000000..dcb15f2
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go
@@ -0,0 +1,22 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !darwin && !freebsd && !linux
+// +build !darwin,!freebsd,!linux
+
+package ipv4
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) {
+ return nil, errNotImplemented
+}
+
+func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_bpf.go b/vendor/golang.org/x/net/ipv4/sys_bpf.go
new file mode 100644
index 0000000..fb11e32
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_bpf.go
@@ -0,0 +1,25 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build linux
+// +build linux
+
+package ipv4
+
+import (
+ "unsafe"
+
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+ "golang.org/x/sys/unix"
+)
+
+func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
+ prog := unix.SockFprog{
+ Len: uint16(len(f)),
+ Filter: (*unix.SockFilter)(unsafe.Pointer(&f[0])),
+ }
+ b := (*[unix.SizeofSockFprog]byte)(unsafe.Pointer(&prog))[:unix.SizeofSockFprog]
+ return so.Set(c, b)
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go b/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go
new file mode 100644
index 0000000..fc53a0d
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go
@@ -0,0 +1,17 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !linux
+// +build !linux
+
+package ipv4
+
+import (
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_bsd.go b/vendor/golang.org/x/net/ipv4/sys_bsd.go
new file mode 100644
index 0000000..e191b2f
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_bsd.go
@@ -0,0 +1,42 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build netbsd || openbsd
+// +build netbsd openbsd
+
+package ipv4
+
+import (
+ "net"
+ "syscall"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+const sockoptReceiveInterface = unix.IP_RECVIF
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTTL: {unix.IP_RECVTTL, 1, marshalTTL, parseTTL},
+ ctlDst: {unix.IP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst},
+ ctlInterface: {unix.IP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_TTL, Len: 1}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_IF, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_LOOP, Len: 1}},
+ ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVTTL, Len: 4}},
+ ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVDSTADDR, Len: 4}},
+ ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVIF, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_HDRINCL, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
+ }
+)
diff --git a/vendor/golang.org/x/net/ipv4/sys_darwin.go b/vendor/golang.org/x/net/ipv4/sys_darwin.go
new file mode 100644
index 0000000..cac6f3c
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_darwin.go
@@ -0,0 +1,69 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "net"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+const sockoptReceiveInterface = unix.IP_RECVIF
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTTL: {unix.IP_RECVTTL, 1, marshalTTL, parseTTL},
+ ctlDst: {unix.IP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst},
+ ctlInterface: {unix.IP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
+ ctlPacketInfo: {unix.IP_PKTINFO, sizeofInetPktinfo, marshalPacketInfo, parsePacketInfo},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_TTL, Len: 1}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_IF, Len: unix.SizeofIPMreqn}, typ: ssoTypeIPMreqn},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVTTL, Len: 4}},
+ ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVDSTADDR, Len: 4}},
+ ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVIF, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_HDRINCL, Len: 4}},
+ ssoStripHeader: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_STRIPHDR, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoPacketInfo: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVPKTINFO, Len: 4}},
+ }
+)
+
+func (pi *inetPktinfo) setIfindex(i int) {
+ pi.Ifindex = uint32(i)
+}
+
+func (gr *groupReq) setGroup(grp net.IP) {
+ sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4))
+ sa.Len = sizeofSockaddrInet
+ sa.Family = syscall.AF_INET
+ copy(sa.Addr[:], grp)
+}
+
+func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
+ sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4))
+ sa.Len = sizeofSockaddrInet
+ sa.Family = syscall.AF_INET
+ copy(sa.Addr[:], grp)
+ sa = (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 132))
+ sa.Len = sizeofSockaddrInet
+ sa.Family = syscall.AF_INET
+ copy(sa.Addr[:], src)
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_dragonfly.go b/vendor/golang.org/x/net/ipv4/sys_dragonfly.go
new file mode 100644
index 0000000..0620d0e
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_dragonfly.go
@@ -0,0 +1,39 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "net"
+ "syscall"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+const sockoptReceiveInterface = unix.IP_RECVIF
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTTL: {unix.IP_RECVTTL, 1, marshalTTL, parseTTL},
+ ctlDst: {unix.IP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst},
+ ctlInterface: {unix.IP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_TTL, Len: 1}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_IF, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVTTL, Len: 4}},
+ ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVDSTADDR, Len: 4}},
+ ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVIF, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_HDRINCL, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
+ }
+)
diff --git a/vendor/golang.org/x/net/ipv4/sys_freebsd.go b/vendor/golang.org/x/net/ipv4/sys_freebsd.go
new file mode 100644
index 0000000..8961228
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_freebsd.go
@@ -0,0 +1,80 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "net"
+ "runtime"
+ "strings"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+const sockoptReceiveInterface = unix.IP_RECVIF
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTTL: {unix.IP_RECVTTL, 1, marshalTTL, parseTTL},
+ ctlDst: {unix.IP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst},
+ ctlInterface: {unix.IP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_TTL, Len: 1}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_IF, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVTTL, Len: 4}},
+ ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVDSTADDR, Len: 4}},
+ ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVIF, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_HDRINCL, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ }
+)
+
+func init() {
+ freebsdVersion, _ = syscall.SysctlUint32("kern.osreldate")
+ if freebsdVersion >= 1000000 {
+ sockOpts[ssoMulticastInterface] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_IF, Len: unix.SizeofIPMreqn}, typ: ssoTypeIPMreqn}
+ }
+ if runtime.GOOS == "freebsd" && runtime.GOARCH == "386" {
+ archs, _ := syscall.Sysctl("kern.supported_archs")
+ for _, s := range strings.Fields(archs) {
+ if s == "amd64" {
+ compatFreeBSD32 = true
+ break
+ }
+ }
+ }
+}
+
+func (gr *groupReq) setGroup(grp net.IP) {
+ sa := (*sockaddrInet)(unsafe.Pointer(&gr.Group))
+ sa.Len = sizeofSockaddrInet
+ sa.Family = syscall.AF_INET
+ copy(sa.Addr[:], grp)
+}
+
+func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
+ sa := (*sockaddrInet)(unsafe.Pointer(&gsr.Group))
+ sa.Len = sizeofSockaddrInet
+ sa.Family = syscall.AF_INET
+ copy(sa.Addr[:], grp)
+ sa = (*sockaddrInet)(unsafe.Pointer(&gsr.Source))
+ sa.Len = sizeofSockaddrInet
+ sa.Family = syscall.AF_INET
+ copy(sa.Addr[:], src)
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_linux.go b/vendor/golang.org/x/net/ipv4/sys_linux.go
new file mode 100644
index 0000000..4588a5f
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_linux.go
@@ -0,0 +1,61 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "net"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTTL: {unix.IP_TTL, 1, marshalTTL, parseTTL},
+ ctlPacketInfo: {unix.IP_PKTINFO, sizeofInetPktinfo, marshalPacketInfo, parsePacketInfo},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_TTL, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_IF, Len: unix.SizeofIPMreqn}, typ: ssoTypeIPMreqn},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVTTL, Len: 4}},
+ ssoPacketInfo: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_PKTINFO, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_HDRINCL, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolReserved, Name: unix.ICMP_FILTER, Len: sizeofICMPFilter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoAttachFilter: {Option: socket.Option{Level: unix.SOL_SOCKET, Name: unix.SO_ATTACH_FILTER, Len: unix.SizeofSockFprog}},
+ }
+)
+
+func (pi *inetPktinfo) setIfindex(i int) {
+ pi.Ifindex = int32(i)
+}
+
+func (gr *groupReq) setGroup(grp net.IP) {
+ sa := (*sockaddrInet)(unsafe.Pointer(&gr.Group))
+ sa.Family = syscall.AF_INET
+ copy(sa.Addr[:], grp)
+}
+
+func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
+ sa := (*sockaddrInet)(unsafe.Pointer(&gsr.Group))
+ sa.Family = syscall.AF_INET
+ copy(sa.Addr[:], grp)
+ sa = (*sockaddrInet)(unsafe.Pointer(&gsr.Source))
+ sa.Family = syscall.AF_INET
+ copy(sa.Addr[:], src)
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_solaris.go b/vendor/golang.org/x/net/ipv4/sys_solaris.go
new file mode 100644
index 0000000..0bb9f3e
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_solaris.go
@@ -0,0 +1,61 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "net"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+const sockoptReceiveInterface = unix.IP_RECVIF
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTTL: {unix.IP_RECVTTL, 4, marshalTTL, parseTTL},
+ ctlPacketInfo: {unix.IP_PKTINFO, sizeofInetPktinfo, marshalPacketInfo, parsePacketInfo},
+ }
+
+ sockOpts = map[int]sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_TTL, Len: 1}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_IF, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_LOOP, Len: 1}},
+ ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVTTL, Len: 4}},
+ ssoPacketInfo: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVPKTINFO, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_HDRINCL, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ }
+)
+
+func (pi *inetPktinfo) setIfindex(i int) {
+ pi.Ifindex = uint32(i)
+}
+
+func (gr *groupReq) setGroup(grp net.IP) {
+ sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4))
+ sa.Family = syscall.AF_INET
+ copy(sa.Addr[:], grp)
+}
+
+func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
+ sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4))
+ sa.Family = syscall.AF_INET
+ copy(sa.Addr[:], grp)
+ sa = (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 260))
+ sa.Family = syscall.AF_INET
+ copy(sa.Addr[:], src)
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_ssmreq.go b/vendor/golang.org/x/net/ipv4/sys_ssmreq.go
new file mode 100644
index 0000000..6a4e7ab
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_ssmreq.go
@@ -0,0 +1,53 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build darwin || freebsd || linux || solaris
+// +build darwin freebsd linux solaris
+
+package ipv4
+
+import (
+ "net"
+ "unsafe"
+
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ var gr groupReq
+ if ifi != nil {
+ gr.Interface = uint32(ifi.Index)
+ }
+ gr.setGroup(grp)
+ var b []byte
+ if compatFreeBSD32 {
+ var d [sizeofGroupReq + 4]byte
+ s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))
+ copy(d[:4], s[:4])
+ copy(d[8:], s[4:])
+ b = d[:]
+ } else {
+ b = (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))[:sizeofGroupReq]
+ }
+ return so.Set(c, b)
+}
+
+func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
+ var gsr groupSourceReq
+ if ifi != nil {
+ gsr.Interface = uint32(ifi.Index)
+ }
+ gsr.setSourceGroup(grp, src)
+ var b []byte
+ if compatFreeBSD32 {
+ var d [sizeofGroupSourceReq + 4]byte
+ s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))
+ copy(d[:4], s[:4])
+ copy(d[8:], s[4:])
+ b = d[:]
+ } else {
+ b = (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))[:sizeofGroupSourceReq]
+ }
+ return so.Set(c, b)
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go b/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go
new file mode 100644
index 0000000..157159f
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go
@@ -0,0 +1,22 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !darwin && !freebsd && !linux && !solaris
+// +build !darwin,!freebsd,!linux,!solaris
+
+package ipv4
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ return errNotImplemented
+}
+
+func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_stub.go b/vendor/golang.org/x/net/ipv4/sys_stub.go
new file mode 100644
index 0000000..d550851
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_stub.go
@@ -0,0 +1,14 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
+
+package ipv4
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{}
+
+ sockOpts = map[int]*sockOpt{}
+)
diff --git a/vendor/golang.org/x/net/ipv4/sys_windows.go b/vendor/golang.org/x/net/ipv4/sys_windows.go
new file mode 100644
index 0000000..c5e9506
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_windows.go
@@ -0,0 +1,44 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/windows"
+)
+
+const (
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+)
+
+type ipMreq struct {
+ Multiaddr [4]byte
+ Interface [4]byte
+}
+
+type ipMreqSource struct {
+ Multiaddr [4]byte
+ Sourceaddr [4]byte
+ Interface [4]byte
+}
+
+// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms738586(v=vs.85).aspx
+var (
+ ctlOpts = [ctlMax]ctlOpt{}
+
+ sockOpts = map[int]*sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: windows.IP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: windows.IP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: windows.IP_MULTICAST_TTL, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: windows.IP_MULTICAST_IF, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: windows.IP_MULTICAST_LOOP, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: windows.IP_HDRINCL, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: windows.IP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: windows.IP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
+ }
+)
diff --git a/vendor/golang.org/x/net/ipv4/sys_zos.go b/vendor/golang.org/x/net/ipv4/sys_zos.go
new file mode 100644
index 0000000..be20640
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_zos.go
@@ -0,0 +1,57 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv4
+
+import (
+ "net"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlPacketInfo: {unix.IP_PKTINFO, sizeofInetPktinfo, marshalPacketInfo, parsePacketInfo},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_TTL, Len: 1}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_IF, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_MULTICAST_LOOP, Len: 1}},
+ ssoPacketInfo: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.IP_RECVPKTINFO, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: unix.MCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ }
+)
+
+func (pi *inetPktinfo) setIfindex(i int) {
+ pi.Ifindex = uint32(i)
+}
+
+func (gr *groupReq) setGroup(grp net.IP) {
+ sa := (*sockaddrInet4)(unsafe.Pointer(&gr.Group))
+ sa.Family = syscall.AF_INET
+ sa.Len = sizeofSockaddrInet4
+ copy(sa.Addr[:], grp)
+}
+
+func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
+ sa := (*sockaddrInet4)(unsafe.Pointer(&gsr.Group))
+ sa.Family = syscall.AF_INET
+ sa.Len = sizeofSockaddrInet4
+ copy(sa.Addr[:], grp)
+ sa = (*sockaddrInet4)(unsafe.Pointer(&gsr.Source))
+ sa.Family = syscall.AF_INET
+ sa.Len = sizeofSockaddrInet4
+ copy(sa.Addr[:], src)
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_aix_ppc64.go b/vendor/golang.org/x/net/ipv4/zsys_aix_ppc64.go
new file mode 100644
index 0000000..b7f2d6e
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_aix_ppc64.go
@@ -0,0 +1,17 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_aix.go
+
+// Added for go1.11 compatibility
+//go:build aix
+// +build aix
+
+package ipv4
+
+const (
+ sizeofIPMreq = 0x8
+)
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_darwin.go b/vendor/golang.org/x/net/ipv4/zsys_darwin.go
new file mode 100644
index 0000000..6c1b705
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_darwin.go
@@ -0,0 +1,59 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_darwin.go
+
+package ipv4
+
+const (
+ sizeofSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+)
+
+type sockaddrStorage struct {
+ Len uint8
+ Family uint8
+ X__ss_pad1 [6]int8
+ X__ss_align int64
+ X__ss_pad2 [112]int8
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type inetPktinfo struct {
+ Ifindex uint32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr [4]byte /* in_addr */
+ Sourceaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [128]byte
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [128]byte
+ Pad_cgo_1 [128]byte
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go b/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go
new file mode 100644
index 0000000..2155df1
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go
@@ -0,0 +1,13 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_dragonfly.go
+
+package ipv4
+
+const (
+ sizeofIPMreq = 0x8
+)
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go b/vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go
new file mode 100644
index 0000000..ae40482
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go
@@ -0,0 +1,52 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_freebsd.go
+
+package ipv4
+
+const (
+ sizeofSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+)
+
+type sockaddrStorage struct {
+ Len uint8
+ Family uint8
+ X__ss_pad1 [6]int8
+ X__ss_align int64
+ X__ss_pad2 [112]int8
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr [4]byte /* in_addr */
+ Sourceaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type groupReq struct {
+ Interface uint32
+ Group sockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group sockaddrStorage
+ Source sockaddrStorage
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go b/vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go
new file mode 100644
index 0000000..9018186
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go
@@ -0,0 +1,54 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_freebsd.go
+
+package ipv4
+
+const (
+ sizeofSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+)
+
+type sockaddrStorage struct {
+ Len uint8
+ Family uint8
+ X__ss_pad1 [6]int8
+ X__ss_align int64
+ X__ss_pad2 [112]int8
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr [4]byte /* in_addr */
+ Sourceaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group sockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group sockaddrStorage
+ Source sockaddrStorage
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go b/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go
new file mode 100644
index 0000000..9018186
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go
@@ -0,0 +1,54 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_freebsd.go
+
+package ipv4
+
+const (
+ sizeofSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+)
+
+type sockaddrStorage struct {
+ Len uint8
+ Family uint8
+ X__ss_pad1 [6]int8
+ X__ss_align int64
+ X__ss_pad2 [112]int8
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr [4]byte /* in_addr */
+ Sourceaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group sockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group sockaddrStorage
+ Source sockaddrStorage
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm64.go b/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm64.go
new file mode 100644
index 0000000..0feb9a7
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm64.go
@@ -0,0 +1,52 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_freebsd.go
+
+package ipv4
+
+const (
+ sizeofSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+)
+
+type sockaddrStorage struct {
+ Len uint8
+ Family uint8
+ X__ss_pad1 [6]uint8
+ X__ss_align int64
+ X__ss_pad2 [112]uint8
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]uint8
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr [4]byte /* in_addr */
+ Sourceaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type groupReq struct {
+ Interface uint32
+ Group sockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group sockaddrStorage
+ Source sockaddrStorage
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_386.go b/vendor/golang.org/x/net/ipv4/zsys_linux_386.go
new file mode 100644
index 0000000..d510357
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_386.go
@@ -0,0 +1,72 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv4
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+ sizeofSockExtendedErr = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+
+ sizeofICMPFilter = 0x4
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type inetPktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type sockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr uint32
+ Interface uint32
+ Sourceaddr uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpFilter struct {
+ Data uint32
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go b/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go
new file mode 100644
index 0000000..eb10cc7
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv4
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+ sizeofSockExtendedErr = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPFilter = 0x4
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type inetPktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type sockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr uint32
+ Interface uint32
+ Sourceaddr uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpFilter struct {
+ Data uint32
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go b/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go
new file mode 100644
index 0000000..d510357
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go
@@ -0,0 +1,72 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv4
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+ sizeofSockExtendedErr = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+
+ sizeofICMPFilter = 0x4
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type inetPktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type sockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr uint32
+ Interface uint32
+ Sourceaddr uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpFilter struct {
+ Data uint32
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go b/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go
new file mode 100644
index 0000000..eb10cc7
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv4
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+ sizeofSockExtendedErr = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPFilter = 0x4
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type inetPktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type sockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr uint32
+ Interface uint32
+ Sourceaddr uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpFilter struct {
+ Data uint32
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go b/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go
new file mode 100644
index 0000000..d510357
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go
@@ -0,0 +1,72 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv4
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+ sizeofSockExtendedErr = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+
+ sizeofICMPFilter = 0x4
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type inetPktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type sockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr uint32
+ Interface uint32
+ Sourceaddr uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpFilter struct {
+ Data uint32
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go b/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go
new file mode 100644
index 0000000..eb10cc7
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv4
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+ sizeofSockExtendedErr = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPFilter = 0x4
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type inetPktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type sockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr uint32
+ Interface uint32
+ Sourceaddr uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpFilter struct {
+ Data uint32
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go b/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go
new file mode 100644
index 0000000..eb10cc7
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv4
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+ sizeofSockExtendedErr = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPFilter = 0x4
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type inetPktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type sockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr uint32
+ Interface uint32
+ Sourceaddr uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpFilter struct {
+ Data uint32
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go b/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go
new file mode 100644
index 0000000..d510357
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go
@@ -0,0 +1,72 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv4
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+ sizeofSockExtendedErr = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+
+ sizeofICMPFilter = 0x4
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type inetPktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type sockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr uint32
+ Interface uint32
+ Sourceaddr uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpFilter struct {
+ Data uint32
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go
new file mode 100644
index 0000000..29202e4
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go
@@ -0,0 +1,72 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv4
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+ sizeofSockExtendedErr = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+
+ sizeofICMPFilter = 0x4
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]uint8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type inetPktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type sockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr uint32
+ Interface uint32
+ Sourceaddr uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpFilter struct {
+ Data uint32
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go
new file mode 100644
index 0000000..eb10cc7
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv4
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+ sizeofSockExtendedErr = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPFilter = 0x4
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type inetPktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type sockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr uint32
+ Interface uint32
+ Sourceaddr uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpFilter struct {
+ Data uint32
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go
new file mode 100644
index 0000000..eb10cc7
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv4
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+ sizeofSockExtendedErr = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPFilter = 0x4
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type inetPktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type sockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr uint32
+ Interface uint32
+ Sourceaddr uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpFilter struct {
+ Data uint32
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_riscv64.go b/vendor/golang.org/x/net/ipv4/zsys_linux_riscv64.go
new file mode 100644
index 0000000..e2edebd
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_riscv64.go
@@ -0,0 +1,77 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+//go:build riscv64
+// +build riscv64
+
+package ipv4
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+ sizeofSockExtendedErr = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPFilter = 0x4
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type inetPktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type sockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr uint32
+ Interface uint32
+ Sourceaddr uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpFilter struct {
+ Data uint32
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go b/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go
new file mode 100644
index 0000000..eb10cc7
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv4
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+ sizeofSockExtendedErr = 0x10
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPFilter = 0x4
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type inetPktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type sockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr uint32
+ Interface uint32
+ Sourceaddr uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpFilter struct {
+ Data uint32
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_netbsd.go b/vendor/golang.org/x/net/ipv4/zsys_netbsd.go
new file mode 100644
index 0000000..a2ef2f6
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_netbsd.go
@@ -0,0 +1,13 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_netbsd.go
+
+package ipv4
+
+const (
+ sizeofIPMreq = 0x8
+)
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_openbsd.go b/vendor/golang.org/x/net/ipv4/zsys_openbsd.go
new file mode 100644
index 0000000..b293a33
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_openbsd.go
@@ -0,0 +1,13 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_openbsd.go
+
+package ipv4
+
+const (
+ sizeofIPMreq = 0x8
+)
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_solaris.go b/vendor/golang.org/x/net/ipv4/zsys_solaris.go
new file mode 100644
index 0000000..e1a961b
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_solaris.go
@@ -0,0 +1,57 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_solaris.go
+
+package ipv4
+
+const (
+ sizeofSockaddrStorage = 0x100
+ sizeofSockaddrInet = 0x10
+ sizeofInetPktinfo = 0xc
+
+ sizeofIPMreq = 0x8
+ sizeofIPMreqSource = 0xc
+ sizeofGroupReq = 0x104
+ sizeofGroupSourceReq = 0x204
+)
+
+type sockaddrStorage struct {
+ Family uint16
+ X_ss_pad1 [6]int8
+ X_ss_align float64
+ X_ss_pad2 [240]int8
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type inetPktinfo struct {
+ Ifindex uint32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type ipMreqSource struct {
+ Multiaddr [4]byte /* in_addr */
+ Sourceaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [256]byte
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [256]byte
+ Pad_cgo_1 [256]byte
+}
diff --git a/vendor/golang.org/x/net/ipv4/zsys_zos_s390x.go b/vendor/golang.org/x/net/ipv4/zsys_zos_s390x.go
new file mode 100644
index 0000000..692abf6
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/zsys_zos_s390x.go
@@ -0,0 +1,56 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Hand edited based on zerrors_zos_s390x.go
+// TODO(Bill O'Farrell): auto-generate.
+
+package ipv4
+
+const (
+ sizeofIPMreq = 8
+ sizeofSockaddrInet4 = 16
+ sizeofSockaddrStorage = 128
+ sizeofGroupReq = 136
+ sizeofGroupSourceReq = 264
+ sizeofInetPktinfo = 8
+)
+
+type sockaddrInet4 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte
+ Zero [8]uint8
+}
+
+type inetPktinfo struct {
+ Addr [4]byte
+ Ifindex uint32
+}
+
+type sockaddrStorage struct {
+ Len uint8
+ Family byte
+ ss_pad1 [6]byte
+ ss_align int64
+ ss_pad2 [112]byte
+}
+
+type groupReq struct {
+ Interface uint32
+ reserved uint32
+ Group sockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ reserved uint32
+ Group sockaddrStorage
+ Source sockaddrStorage
+}
+
+type ipMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
diff --git a/vendor/golang.org/x/net/ipv6/batch.go b/vendor/golang.org/x/net/ipv6/batch.go
new file mode 100644
index 0000000..2ccb984
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/batch.go
@@ -0,0 +1,116 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import (
+ "net"
+ "runtime"
+
+ "golang.org/x/net/internal/socket"
+)
+
+// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of
+// PacketConn are not implemented.
+
+// A Message represents an IO message.
+//
+// type Message struct {
+// Buffers [][]byte
+// OOB []byte
+// Addr net.Addr
+// N int
+// NN int
+// Flags int
+// }
+//
+// The Buffers fields represents a list of contiguous buffers, which
+// can be used for vectored IO, for example, putting a header and a
+// payload in each slice.
+// When writing, the Buffers field must contain at least one byte to
+// write.
+// When reading, the Buffers field will always contain a byte to read.
+//
+// The OOB field contains protocol-specific control or miscellaneous
+// ancillary data known as out-of-band data.
+// It can be nil when not required.
+//
+// The Addr field specifies a destination address when writing.
+// It can be nil when the underlying protocol of the endpoint uses
+// connection-oriented communication.
+// After a successful read, it may contain the source address on the
+// received packet.
+//
+// The N field indicates the number of bytes read or written from/to
+// Buffers.
+//
+// The NN field indicates the number of bytes read or written from/to
+// OOB.
+//
+// The Flags field contains protocol-specific information on the
+// received message.
+type Message = socket.Message
+
+// ReadBatch reads a batch of messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_PEEK.
+//
+// On a successful read it returns the number of messages received, up
+// to len(ms).
+//
+// On Linux, a batch read will be optimized.
+// On other platforms, this method will read only a single message.
+func (c *payloadHandler) ReadBatch(ms []Message, flags int) (int, error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ switch runtime.GOOS {
+ case "linux":
+ n, err := c.RecvMsgs([]socket.Message(ms), flags)
+ if err != nil {
+ err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ default:
+ n := 1
+ err := c.RecvMsg(&ms[0], flags)
+ if err != nil {
+ n = 0
+ err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ }
+}
+
+// WriteBatch writes a batch of messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_DONTROUTE.
+//
+// It returns the number of messages written on a successful write.
+//
+// On Linux, a batch write will be optimized.
+// On other platforms, this method will write only a single message.
+func (c *payloadHandler) WriteBatch(ms []Message, flags int) (int, error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ switch runtime.GOOS {
+ case "linux":
+ n, err := c.SendMsgs([]socket.Message(ms), flags)
+ if err != nil {
+ err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ default:
+ n := 1
+ err := c.SendMsg(&ms[0], flags)
+ if err != nil {
+ n = 0
+ err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ }
+}
diff --git a/vendor/golang.org/x/net/ipv6/control.go b/vendor/golang.org/x/net/ipv6/control.go
new file mode 100644
index 0000000..2da6444
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/control.go
@@ -0,0 +1,187 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import (
+ "fmt"
+ "net"
+ "sync"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+)
+
+// Note that RFC 3542 obsoletes RFC 2292 but OS X Snow Leopard and the
+// former still support RFC 2292 only. Please be aware that almost
+// all protocol implementations prohibit using a combination of RFC
+// 2292 and RFC 3542 for some practical reasons.
+
+type rawOpt struct {
+ sync.RWMutex
+ cflags ControlFlags
+}
+
+func (c *rawOpt) set(f ControlFlags) { c.cflags |= f }
+func (c *rawOpt) clear(f ControlFlags) { c.cflags &^= f }
+func (c *rawOpt) isset(f ControlFlags) bool { return c.cflags&f != 0 }
+
+// A ControlFlags represents per packet basis IP-level socket option
+// control flags.
+type ControlFlags uint
+
+const (
+ FlagTrafficClass ControlFlags = 1 << iota // pass the traffic class on the received packet
+ FlagHopLimit // pass the hop limit on the received packet
+ FlagSrc // pass the source address on the received packet
+ FlagDst // pass the destination address on the received packet
+ FlagInterface // pass the interface index on the received packet
+ FlagPathMTU // pass the path MTU on the received packet path
+)
+
+const flagPacketInfo = FlagDst | FlagInterface
+
+// A ControlMessage represents per packet basis IP-level socket
+// options.
+type ControlMessage struct {
+ // Receiving socket options: SetControlMessage allows to
+ // receive the options from the protocol stack using ReadFrom
+ // method of PacketConn.
+ //
+ // Specifying socket options: ControlMessage for WriteTo
+ // method of PacketConn allows to send the options to the
+ // protocol stack.
+ //
+ TrafficClass int // traffic class, must be 1 <= value <= 255 when specifying
+ HopLimit int // hop limit, must be 1 <= value <= 255 when specifying
+ Src net.IP // source address, specifying only
+ Dst net.IP // destination address, receiving only
+ IfIndex int // interface index, must be 1 <= value when specifying
+ NextHop net.IP // next hop address, specifying only
+ MTU int // path MTU, receiving only
+}
+
+func (cm *ControlMessage) String() string {
+ if cm == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("tclass=%#x hoplim=%d src=%v dst=%v ifindex=%d nexthop=%v mtu=%d", cm.TrafficClass, cm.HopLimit, cm.Src, cm.Dst, cm.IfIndex, cm.NextHop, cm.MTU)
+}
+
+// Marshal returns the binary encoding of cm.
+func (cm *ControlMessage) Marshal() []byte {
+ if cm == nil {
+ return nil
+ }
+ var l int
+ tclass := false
+ if ctlOpts[ctlTrafficClass].name > 0 && cm.TrafficClass > 0 {
+ tclass = true
+ l += socket.ControlMessageSpace(ctlOpts[ctlTrafficClass].length)
+ }
+ hoplimit := false
+ if ctlOpts[ctlHopLimit].name > 0 && cm.HopLimit > 0 {
+ hoplimit = true
+ l += socket.ControlMessageSpace(ctlOpts[ctlHopLimit].length)
+ }
+ pktinfo := false
+ if ctlOpts[ctlPacketInfo].name > 0 && (cm.Src.To16() != nil && cm.Src.To4() == nil || cm.IfIndex > 0) {
+ pktinfo = true
+ l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length)
+ }
+ nexthop := false
+ if ctlOpts[ctlNextHop].name > 0 && cm.NextHop.To16() != nil && cm.NextHop.To4() == nil {
+ nexthop = true
+ l += socket.ControlMessageSpace(ctlOpts[ctlNextHop].length)
+ }
+ var b []byte
+ if l > 0 {
+ b = make([]byte, l)
+ bb := b
+ if tclass {
+ bb = ctlOpts[ctlTrafficClass].marshal(bb, cm)
+ }
+ if hoplimit {
+ bb = ctlOpts[ctlHopLimit].marshal(bb, cm)
+ }
+ if pktinfo {
+ bb = ctlOpts[ctlPacketInfo].marshal(bb, cm)
+ }
+ if nexthop {
+ bb = ctlOpts[ctlNextHop].marshal(bb, cm)
+ }
+ }
+ return b
+}
+
+// Parse parses b as a control message and stores the result in cm.
+func (cm *ControlMessage) Parse(b []byte) error {
+ ms, err := socket.ControlMessage(b).Parse()
+ if err != nil {
+ return err
+ }
+ for _, m := range ms {
+ lvl, typ, l, err := m.ParseHeader()
+ if err != nil {
+ return err
+ }
+ if lvl != iana.ProtocolIPv6 {
+ continue
+ }
+ switch {
+ case typ == ctlOpts[ctlTrafficClass].name && l >= ctlOpts[ctlTrafficClass].length:
+ ctlOpts[ctlTrafficClass].parse(cm, m.Data(l))
+ case typ == ctlOpts[ctlHopLimit].name && l >= ctlOpts[ctlHopLimit].length:
+ ctlOpts[ctlHopLimit].parse(cm, m.Data(l))
+ case typ == ctlOpts[ctlPacketInfo].name && l >= ctlOpts[ctlPacketInfo].length:
+ ctlOpts[ctlPacketInfo].parse(cm, m.Data(l))
+ case typ == ctlOpts[ctlPathMTU].name && l >= ctlOpts[ctlPathMTU].length:
+ ctlOpts[ctlPathMTU].parse(cm, m.Data(l))
+ }
+ }
+ return nil
+}
+
+// NewControlMessage returns a new control message.
+//
+// The returned message is large enough for options specified by cf.
+func NewControlMessage(cf ControlFlags) []byte {
+ opt := rawOpt{cflags: cf}
+ var l int
+ if opt.isset(FlagTrafficClass) && ctlOpts[ctlTrafficClass].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlTrafficClass].length)
+ }
+ if opt.isset(FlagHopLimit) && ctlOpts[ctlHopLimit].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlHopLimit].length)
+ }
+ if opt.isset(flagPacketInfo) && ctlOpts[ctlPacketInfo].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length)
+ }
+ if opt.isset(FlagPathMTU) && ctlOpts[ctlPathMTU].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlPathMTU].length)
+ }
+ var b []byte
+ if l > 0 {
+ b = make([]byte, l)
+ }
+ return b
+}
+
+// Ancillary data socket options
+const (
+ ctlTrafficClass = iota // header field
+ ctlHopLimit // header field
+ ctlPacketInfo // inbound or outbound packet path
+ ctlNextHop // nexthop
+ ctlPathMTU // path mtu
+ ctlMax
+)
+
+// A ctlOpt represents a binding for ancillary data socket option.
+type ctlOpt struct {
+ name int // option name, must be equal or greater than 1
+ length int // option length
+ marshal func([]byte, *ControlMessage) []byte
+ parse func(*ControlMessage, []byte)
+}
diff --git a/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go b/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go
new file mode 100644
index 0000000..2733ddb
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go
@@ -0,0 +1,51 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build darwin
+// +build darwin
+
+package ipv6
+
+import (
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+func marshal2292HopLimit(b []byte, cm *ControlMessage) []byte {
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, unix.IPV6_2292HOPLIMIT, 4)
+ if cm != nil {
+ socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.HopLimit))
+ }
+ return m.Next(4)
+}
+
+func marshal2292PacketInfo(b []byte, cm *ControlMessage) []byte {
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, unix.IPV6_2292PKTINFO, sizeofInet6Pktinfo)
+ if cm != nil {
+ pi := (*inet6Pktinfo)(unsafe.Pointer(&m.Data(sizeofInet6Pktinfo)[0]))
+ if ip := cm.Src.To16(); ip != nil && ip.To4() == nil {
+ copy(pi.Addr[:], ip)
+ }
+ if cm.IfIndex > 0 {
+ pi.setIfindex(cm.IfIndex)
+ }
+ }
+ return m.Next(sizeofInet6Pktinfo)
+}
+
+func marshal2292NextHop(b []byte, cm *ControlMessage) []byte {
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, unix.IPV6_2292NEXTHOP, sizeofSockaddrInet6)
+ if cm != nil {
+ sa := (*sockaddrInet6)(unsafe.Pointer(&m.Data(sizeofSockaddrInet6)[0]))
+ sa.setSockaddr(cm.NextHop, cm.IfIndex)
+ }
+ return m.Next(sizeofSockaddrInet6)
+}
diff --git a/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go b/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go
new file mode 100644
index 0000000..9c90844
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go
@@ -0,0 +1,97 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
+
+package ipv6
+
+import (
+ "net"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+func marshalTrafficClass(b []byte, cm *ControlMessage) []byte {
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, unix.IPV6_TCLASS, 4)
+ if cm != nil {
+ socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.TrafficClass))
+ }
+ return m.Next(4)
+}
+
+func parseTrafficClass(cm *ControlMessage, b []byte) {
+ cm.TrafficClass = int(socket.NativeEndian.Uint32(b[:4]))
+}
+
+func marshalHopLimit(b []byte, cm *ControlMessage) []byte {
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, unix.IPV6_HOPLIMIT, 4)
+ if cm != nil {
+ socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.HopLimit))
+ }
+ return m.Next(4)
+}
+
+func parseHopLimit(cm *ControlMessage, b []byte) {
+ cm.HopLimit = int(socket.NativeEndian.Uint32(b[:4]))
+}
+
+func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, unix.IPV6_PKTINFO, sizeofInet6Pktinfo)
+ if cm != nil {
+ pi := (*inet6Pktinfo)(unsafe.Pointer(&m.Data(sizeofInet6Pktinfo)[0]))
+ if ip := cm.Src.To16(); ip != nil && ip.To4() == nil {
+ copy(pi.Addr[:], ip)
+ }
+ if cm.IfIndex > 0 {
+ pi.setIfindex(cm.IfIndex)
+ }
+ }
+ return m.Next(sizeofInet6Pktinfo)
+}
+
+func parsePacketInfo(cm *ControlMessage, b []byte) {
+ pi := (*inet6Pktinfo)(unsafe.Pointer(&b[0]))
+ if len(cm.Dst) < net.IPv6len {
+ cm.Dst = make(net.IP, net.IPv6len)
+ }
+ copy(cm.Dst, pi.Addr[:])
+ cm.IfIndex = int(pi.Ifindex)
+}
+
+func marshalNextHop(b []byte, cm *ControlMessage) []byte {
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, unix.IPV6_NEXTHOP, sizeofSockaddrInet6)
+ if cm != nil {
+ sa := (*sockaddrInet6)(unsafe.Pointer(&m.Data(sizeofSockaddrInet6)[0]))
+ sa.setSockaddr(cm.NextHop, cm.IfIndex)
+ }
+ return m.Next(sizeofSockaddrInet6)
+}
+
+func parseNextHop(cm *ControlMessage, b []byte) {
+}
+
+func marshalPathMTU(b []byte, cm *ControlMessage) []byte {
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, unix.IPV6_PATHMTU, sizeofIPv6Mtuinfo)
+ return m.Next(sizeofIPv6Mtuinfo)
+}
+
+func parsePathMTU(cm *ControlMessage, b []byte) {
+ mi := (*ipv6Mtuinfo)(unsafe.Pointer(&b[0]))
+ if len(cm.Dst) < net.IPv6len {
+ cm.Dst = make(net.IP, net.IPv6len)
+ }
+ copy(cm.Dst, mi.Addr.Addr[:])
+ cm.IfIndex = int(mi.Addr.Scope_id)
+ cm.MTU = int(mi.Mtu)
+}
diff --git a/vendor/golang.org/x/net/ipv6/control_stub.go b/vendor/golang.org/x/net/ipv6/control_stub.go
new file mode 100644
index 0000000..b7e8643
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/control_stub.go
@@ -0,0 +1,14 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
+
+package ipv6
+
+import "golang.org/x/net/internal/socket"
+
+func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/ipv6/control_unix.go b/vendor/golang.org/x/net/ipv6/control_unix.go
new file mode 100644
index 0000000..63e475d
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/control_unix.go
@@ -0,0 +1,56 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
+
+package ipv6
+
+import "golang.org/x/net/internal/socket"
+
+func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
+ opt.Lock()
+ defer opt.Unlock()
+ if so, ok := sockOpts[ssoReceiveTrafficClass]; ok && cf&FlagTrafficClass != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
+ return err
+ }
+ if on {
+ opt.set(FlagTrafficClass)
+ } else {
+ opt.clear(FlagTrafficClass)
+ }
+ }
+ if so, ok := sockOpts[ssoReceiveHopLimit]; ok && cf&FlagHopLimit != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
+ return err
+ }
+ if on {
+ opt.set(FlagHopLimit)
+ } else {
+ opt.clear(FlagHopLimit)
+ }
+ }
+ if so, ok := sockOpts[ssoReceivePacketInfo]; ok && cf&flagPacketInfo != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
+ return err
+ }
+ if on {
+ opt.set(cf & flagPacketInfo)
+ } else {
+ opt.clear(cf & flagPacketInfo)
+ }
+ }
+ if so, ok := sockOpts[ssoReceivePathMTU]; ok && cf&FlagPathMTU != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
+ return err
+ }
+ if on {
+ opt.set(FlagPathMTU)
+ } else {
+ opt.clear(FlagPathMTU)
+ }
+ }
+ return nil
+}
diff --git a/vendor/golang.org/x/net/ipv6/control_windows.go b/vendor/golang.org/x/net/ipv6/control_windows.go
new file mode 100644
index 0000000..8882d81
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/control_windows.go
@@ -0,0 +1,12 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import "golang.org/x/net/internal/socket"
+
+func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
+ // TODO(mikio): implement this
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/ipv6/dgramopt.go b/vendor/golang.org/x/net/ipv6/dgramopt.go
new file mode 100644
index 0000000..1f422e7
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/dgramopt.go
@@ -0,0 +1,301 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import (
+ "net"
+
+ "golang.org/x/net/bpf"
+)
+
+// MulticastHopLimit returns the hop limit field value for outgoing
+// multicast packets.
+func (c *dgramOpt) MulticastHopLimit() (int, error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ so, ok := sockOpts[ssoMulticastHopLimit]
+ if !ok {
+ return 0, errNotImplemented
+ }
+ return so.GetInt(c.Conn)
+}
+
+// SetMulticastHopLimit sets the hop limit field value for future
+// outgoing multicast packets.
+func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoMulticastHopLimit]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.SetInt(c.Conn, hoplim)
+}
+
+// MulticastInterface returns the default interface for multicast
+// packet transmissions.
+func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
+ if !c.ok() {
+ return nil, errInvalidConn
+ }
+ so, ok := sockOpts[ssoMulticastInterface]
+ if !ok {
+ return nil, errNotImplemented
+ }
+ return so.getMulticastInterface(c.Conn)
+}
+
+// SetMulticastInterface sets the default interface for future
+// multicast packet transmissions.
+func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoMulticastInterface]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.setMulticastInterface(c.Conn, ifi)
+}
+
+// MulticastLoopback reports whether transmitted multicast packets
+// should be copied and send back to the originator.
+func (c *dgramOpt) MulticastLoopback() (bool, error) {
+ if !c.ok() {
+ return false, errInvalidConn
+ }
+ so, ok := sockOpts[ssoMulticastLoopback]
+ if !ok {
+ return false, errNotImplemented
+ }
+ on, err := so.GetInt(c.Conn)
+ if err != nil {
+ return false, err
+ }
+ return on == 1, nil
+}
+
+// SetMulticastLoopback sets whether transmitted multicast packets
+// should be copied and send back to the originator.
+func (c *dgramOpt) SetMulticastLoopback(on bool) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoMulticastLoopback]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.SetInt(c.Conn, boolint(on))
+}
+
+// JoinGroup joins the group address group on the interface ifi.
+// By default all sources that can cast data to group are accepted.
+// It's possible to mute and unmute data transmission from a specific
+// source by using ExcludeSourceSpecificGroup and
+// IncludeSourceSpecificGroup.
+// JoinGroup uses the system assigned multicast interface when ifi is
+// nil, although this is not recommended because the assignment
+// depends on platforms and sometimes it might require routing
+// configuration.
+func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoJoinGroup]
+ if !ok {
+ return errNotImplemented
+ }
+ grp := netAddrToIP16(group)
+ if grp == nil {
+ return errMissingAddress
+ }
+ return so.setGroup(c.Conn, ifi, grp)
+}
+
+// LeaveGroup leaves the group address group on the interface ifi
+// regardless of whether the group is any-source group or
+// source-specific group.
+func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoLeaveGroup]
+ if !ok {
+ return errNotImplemented
+ }
+ grp := netAddrToIP16(group)
+ if grp == nil {
+ return errMissingAddress
+ }
+ return so.setGroup(c.Conn, ifi, grp)
+}
+
+// JoinSourceSpecificGroup joins the source-specific group comprising
+// group and source on the interface ifi.
+// JoinSourceSpecificGroup uses the system assigned multicast
+// interface when ifi is nil, although this is not recommended because
+// the assignment depends on platforms and sometimes it might require
+// routing configuration.
+func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoJoinSourceGroup]
+ if !ok {
+ return errNotImplemented
+ }
+ grp := netAddrToIP16(group)
+ if grp == nil {
+ return errMissingAddress
+ }
+ src := netAddrToIP16(source)
+ if src == nil {
+ return errMissingAddress
+ }
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
+}
+
+// LeaveSourceSpecificGroup leaves the source-specific group on the
+// interface ifi.
+func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoLeaveSourceGroup]
+ if !ok {
+ return errNotImplemented
+ }
+ grp := netAddrToIP16(group)
+ if grp == nil {
+ return errMissingAddress
+ }
+ src := netAddrToIP16(source)
+ if src == nil {
+ return errMissingAddress
+ }
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
+}
+
+// ExcludeSourceSpecificGroup excludes the source-specific group from
+// the already joined any-source groups by JoinGroup on the interface
+// ifi.
+func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoBlockSourceGroup]
+ if !ok {
+ return errNotImplemented
+ }
+ grp := netAddrToIP16(group)
+ if grp == nil {
+ return errMissingAddress
+ }
+ src := netAddrToIP16(source)
+ if src == nil {
+ return errMissingAddress
+ }
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
+}
+
+// IncludeSourceSpecificGroup includes the excluded source-specific
+// group by ExcludeSourceSpecificGroup again on the interface ifi.
+func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoUnblockSourceGroup]
+ if !ok {
+ return errNotImplemented
+ }
+ grp := netAddrToIP16(group)
+ if grp == nil {
+ return errMissingAddress
+ }
+ src := netAddrToIP16(source)
+ if src == nil {
+ return errMissingAddress
+ }
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
+}
+
+// Checksum reports whether the kernel will compute, store or verify a
+// checksum for both incoming and outgoing packets. If on is true, it
+// returns an offset in bytes into the data of where the checksum
+// field is located.
+func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
+ if !c.ok() {
+ return false, 0, errInvalidConn
+ }
+ so, ok := sockOpts[ssoChecksum]
+ if !ok {
+ return false, 0, errNotImplemented
+ }
+ offset, err = so.GetInt(c.Conn)
+ if err != nil {
+ return false, 0, err
+ }
+ if offset < 0 {
+ return false, 0, nil
+ }
+ return true, offset, nil
+}
+
+// SetChecksum enables the kernel checksum processing. If on is ture,
+// the offset should be an offset in bytes into the data of where the
+// checksum field is located.
+func (c *dgramOpt) SetChecksum(on bool, offset int) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoChecksum]
+ if !ok {
+ return errNotImplemented
+ }
+ if !on {
+ offset = -1
+ }
+ return so.SetInt(c.Conn, offset)
+}
+
+// ICMPFilter returns an ICMP filter.
+func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
+ if !c.ok() {
+ return nil, errInvalidConn
+ }
+ so, ok := sockOpts[ssoICMPFilter]
+ if !ok {
+ return nil, errNotImplemented
+ }
+ return so.getICMPFilter(c.Conn)
+}
+
+// SetICMPFilter deploys the ICMP filter.
+func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoICMPFilter]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.setICMPFilter(c.Conn, f)
+}
+
+// SetBPF attaches a BPF program to the connection.
+//
+// Only supported on Linux.
+func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoAttachFilter]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.setBPF(c.Conn, filter)
+}
diff --git a/vendor/golang.org/x/net/ipv6/doc.go b/vendor/golang.org/x/net/ipv6/doc.go
new file mode 100644
index 0000000..e0be9d5
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/doc.go
@@ -0,0 +1,243 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package ipv6 implements IP-level socket options for the Internet
+// Protocol version 6.
+//
+// The package provides IP-level socket options that allow
+// manipulation of IPv6 facilities.
+//
+// The IPv6 protocol is defined in RFC 8200.
+// Socket interface extensions are defined in RFC 3493, RFC 3542 and
+// RFC 3678.
+// MLDv1 and MLDv2 are defined in RFC 2710 and RFC 3810.
+// Source-specific multicast is defined in RFC 4607.
+//
+// On Darwin, this package requires OS X Mavericks version 10.9 or
+// above, or equivalent.
+//
+//
+// Unicasting
+//
+// The options for unicasting are available for net.TCPConn,
+// net.UDPConn and net.IPConn which are created as network connections
+// that use the IPv6 transport. When a single TCP connection carrying
+// a data flow of multiple packets needs to indicate the flow is
+// important, Conn is used to set the traffic class field on the IPv6
+// header for each packet.
+//
+// ln, err := net.Listen("tcp6", "[::]:1024")
+// if err != nil {
+// // error handling
+// }
+// defer ln.Close()
+// for {
+// c, err := ln.Accept()
+// if err != nil {
+// // error handling
+// }
+// go func(c net.Conn) {
+// defer c.Close()
+//
+// The outgoing packets will be labeled DiffServ assured forwarding
+// class 1 low drop precedence, known as AF11 packets.
+//
+// if err := ipv6.NewConn(c).SetTrafficClass(0x28); err != nil {
+// // error handling
+// }
+// if _, err := c.Write(data); err != nil {
+// // error handling
+// }
+// }(c)
+// }
+//
+//
+// Multicasting
+//
+// The options for multicasting are available for net.UDPConn and
+// net.IPConn which are created as network connections that use the
+// IPv6 transport. A few network facilities must be prepared before
+// you begin multicasting, at a minimum joining network interfaces and
+// multicast groups.
+//
+// en0, err := net.InterfaceByName("en0")
+// if err != nil {
+// // error handling
+// }
+// en1, err := net.InterfaceByIndex(911)
+// if err != nil {
+// // error handling
+// }
+// group := net.ParseIP("ff02::114")
+//
+// First, an application listens to an appropriate address with an
+// appropriate service port.
+//
+// c, err := net.ListenPacket("udp6", "[::]:1024")
+// if err != nil {
+// // error handling
+// }
+// defer c.Close()
+//
+// Second, the application joins multicast groups, starts listening to
+// the groups on the specified network interfaces. Note that the
+// service port for transport layer protocol does not matter with this
+// operation as joining groups affects only network and link layer
+// protocols, such as IPv6 and Ethernet.
+//
+// p := ipv6.NewPacketConn(c)
+// if err := p.JoinGroup(en0, &net.UDPAddr{IP: group}); err != nil {
+// // error handling
+// }
+// if err := p.JoinGroup(en1, &net.UDPAddr{IP: group}); err != nil {
+// // error handling
+// }
+//
+// The application might set per packet control message transmissions
+// between the protocol stack within the kernel. When the application
+// needs a destination address on an incoming packet,
+// SetControlMessage of PacketConn is used to enable control message
+// transmissions.
+//
+// if err := p.SetControlMessage(ipv6.FlagDst, true); err != nil {
+// // error handling
+// }
+//
+// The application could identify whether the received packets are
+// of interest by using the control message that contains the
+// destination address of the received packet.
+//
+// b := make([]byte, 1500)
+// for {
+// n, rcm, src, err := p.ReadFrom(b)
+// if err != nil {
+// // error handling
+// }
+// if rcm.Dst.IsMulticast() {
+// if rcm.Dst.Equal(group) {
+// // joined group, do something
+// } else {
+// // unknown group, discard
+// continue
+// }
+// }
+//
+// The application can also send both unicast and multicast packets.
+//
+// p.SetTrafficClass(0x0)
+// p.SetHopLimit(16)
+// if _, err := p.WriteTo(data[:n], nil, src); err != nil {
+// // error handling
+// }
+// dst := &net.UDPAddr{IP: group, Port: 1024}
+// wcm := ipv6.ControlMessage{TrafficClass: 0xe0, HopLimit: 1}
+// for _, ifi := range []*net.Interface{en0, en1} {
+// wcm.IfIndex = ifi.Index
+// if _, err := p.WriteTo(data[:n], &wcm, dst); err != nil {
+// // error handling
+// }
+// }
+// }
+//
+//
+// More multicasting
+//
+// An application that uses PacketConn may join multiple multicast
+// groups. For example, a UDP listener with port 1024 might join two
+// different groups across over two different network interfaces by
+// using:
+//
+// c, err := net.ListenPacket("udp6", "[::]:1024")
+// if err != nil {
+// // error handling
+// }
+// defer c.Close()
+// p := ipv6.NewPacketConn(c)
+// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::1:114")}); err != nil {
+// // error handling
+// }
+// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::2:114")}); err != nil {
+// // error handling
+// }
+// if err := p.JoinGroup(en1, &net.UDPAddr{IP: net.ParseIP("ff02::2:114")}); err != nil {
+// // error handling
+// }
+//
+// It is possible for multiple UDP listeners that listen on the same
+// UDP port to join the same multicast group. The net package will
+// provide a socket that listens to a wildcard address with reusable
+// UDP port when an appropriate multicast address prefix is passed to
+// the net.ListenPacket or net.ListenUDP.
+//
+// c1, err := net.ListenPacket("udp6", "[ff02::]:1024")
+// if err != nil {
+// // error handling
+// }
+// defer c1.Close()
+// c2, err := net.ListenPacket("udp6", "[ff02::]:1024")
+// if err != nil {
+// // error handling
+// }
+// defer c2.Close()
+// p1 := ipv6.NewPacketConn(c1)
+// if err := p1.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil {
+// // error handling
+// }
+// p2 := ipv6.NewPacketConn(c2)
+// if err := p2.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil {
+// // error handling
+// }
+//
+// Also it is possible for the application to leave or rejoin a
+// multicast group on the network interface.
+//
+// if err := p.LeaveGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil {
+// // error handling
+// }
+// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff01::114")}); err != nil {
+// // error handling
+// }
+//
+//
+// Source-specific multicasting
+//
+// An application that uses PacketConn on MLDv2 supported platform is
+// able to join source-specific multicast groups.
+// The application may use JoinSourceSpecificGroup and
+// LeaveSourceSpecificGroup for the operation known as "include" mode,
+//
+// ssmgroup := net.UDPAddr{IP: net.ParseIP("ff32::8000:9")}
+// ssmsource := net.UDPAddr{IP: net.ParseIP("fe80::cafe")}
+// if err := p.JoinSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil {
+// // error handling
+// }
+// if err := p.LeaveSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil {
+// // error handling
+// }
+//
+// or JoinGroup, ExcludeSourceSpecificGroup,
+// IncludeSourceSpecificGroup and LeaveGroup for the operation known
+// as "exclude" mode.
+//
+// exclsource := net.UDPAddr{IP: net.ParseIP("fe80::dead")}
+// if err := p.JoinGroup(en0, &ssmgroup); err != nil {
+// // error handling
+// }
+// if err := p.ExcludeSourceSpecificGroup(en0, &ssmgroup, &exclsource); err != nil {
+// // error handling
+// }
+// if err := p.LeaveGroup(en0, &ssmgroup); err != nil {
+// // error handling
+// }
+//
+// Note that it depends on each platform implementation what happens
+// when an application which runs on MLDv2 unsupported platform uses
+// JoinSourceSpecificGroup and LeaveSourceSpecificGroup.
+// In general the platform tries to fall back to conversations using
+// MLDv1 and starts to listen to multicast traffic.
+// In the fallback case, ExcludeSourceSpecificGroup and
+// IncludeSourceSpecificGroup may return an error.
+package ipv6 // import "golang.org/x/net/ipv6"
+
+// BUG(mikio): This package is not implemented on JS, NaCl and Plan 9.
diff --git a/vendor/golang.org/x/net/ipv6/endpoint.go b/vendor/golang.org/x/net/ipv6/endpoint.go
new file mode 100644
index 0000000..f534a0b
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/endpoint.go
@@ -0,0 +1,127 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import (
+ "net"
+ "time"
+
+ "golang.org/x/net/internal/socket"
+)
+
+// BUG(mikio): On Windows, the JoinSourceSpecificGroup,
+// LeaveSourceSpecificGroup, ExcludeSourceSpecificGroup and
+// IncludeSourceSpecificGroup methods of PacketConn are not
+// implemented.
+
+// A Conn represents a network endpoint that uses IPv6 transport.
+// It allows to set basic IP-level socket options such as traffic
+// class and hop limit.
+type Conn struct {
+ genericOpt
+}
+
+type genericOpt struct {
+ *socket.Conn
+}
+
+func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil }
+
+// PathMTU returns a path MTU value for the destination associated
+// with the endpoint.
+func (c *Conn) PathMTU() (int, error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ so, ok := sockOpts[ssoPathMTU]
+ if !ok {
+ return 0, errNotImplemented
+ }
+ _, mtu, err := so.getMTUInfo(c.Conn)
+ if err != nil {
+ return 0, err
+ }
+ return mtu, nil
+}
+
+// NewConn returns a new Conn.
+func NewConn(c net.Conn) *Conn {
+ cc, _ := socket.NewConn(c)
+ return &Conn{
+ genericOpt: genericOpt{Conn: cc},
+ }
+}
+
+// A PacketConn represents a packet network endpoint that uses IPv6
+// transport. It is used to control several IP-level socket options
+// including IPv6 header manipulation. It also provides datagram
+// based network I/O methods specific to the IPv6 and higher layer
+// protocols such as OSPF, GRE, and UDP.
+type PacketConn struct {
+ genericOpt
+ dgramOpt
+ payloadHandler
+}
+
+type dgramOpt struct {
+ *socket.Conn
+}
+
+func (c *dgramOpt) ok() bool { return c != nil && c.Conn != nil }
+
+// SetControlMessage allows to receive the per packet basis IP-level
+// socket options.
+func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error {
+ if !c.payloadHandler.ok() {
+ return errInvalidConn
+ }
+ return setControlMessage(c.dgramOpt.Conn, &c.payloadHandler.rawOpt, cf, on)
+}
+
+// SetDeadline sets the read and write deadlines associated with the
+// endpoint.
+func (c *PacketConn) SetDeadline(t time.Time) error {
+ if !c.payloadHandler.ok() {
+ return errInvalidConn
+ }
+ return c.payloadHandler.SetDeadline(t)
+}
+
+// SetReadDeadline sets the read deadline associated with the
+// endpoint.
+func (c *PacketConn) SetReadDeadline(t time.Time) error {
+ if !c.payloadHandler.ok() {
+ return errInvalidConn
+ }
+ return c.payloadHandler.SetReadDeadline(t)
+}
+
+// SetWriteDeadline sets the write deadline associated with the
+// endpoint.
+func (c *PacketConn) SetWriteDeadline(t time.Time) error {
+ if !c.payloadHandler.ok() {
+ return errInvalidConn
+ }
+ return c.payloadHandler.SetWriteDeadline(t)
+}
+
+// Close closes the endpoint.
+func (c *PacketConn) Close() error {
+ if !c.payloadHandler.ok() {
+ return errInvalidConn
+ }
+ return c.payloadHandler.Close()
+}
+
+// NewPacketConn returns a new PacketConn using c as its underlying
+// transport.
+func NewPacketConn(c net.PacketConn) *PacketConn {
+ cc, _ := socket.NewConn(c.(net.Conn))
+ return &PacketConn{
+ genericOpt: genericOpt{Conn: cc},
+ dgramOpt: dgramOpt{Conn: cc},
+ payloadHandler: payloadHandler{PacketConn: c, Conn: cc},
+ }
+}
diff --git a/vendor/golang.org/x/net/ipv6/genericopt.go b/vendor/golang.org/x/net/ipv6/genericopt.go
new file mode 100644
index 0000000..0326aed
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/genericopt.go
@@ -0,0 +1,56 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+// TrafficClass returns the traffic class field value for outgoing
+// packets.
+func (c *genericOpt) TrafficClass() (int, error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ so, ok := sockOpts[ssoTrafficClass]
+ if !ok {
+ return 0, errNotImplemented
+ }
+ return so.GetInt(c.Conn)
+}
+
+// SetTrafficClass sets the traffic class field value for future
+// outgoing packets.
+func (c *genericOpt) SetTrafficClass(tclass int) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoTrafficClass]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.SetInt(c.Conn, tclass)
+}
+
+// HopLimit returns the hop limit field value for outgoing packets.
+func (c *genericOpt) HopLimit() (int, error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ so, ok := sockOpts[ssoHopLimit]
+ if !ok {
+ return 0, errNotImplemented
+ }
+ return so.GetInt(c.Conn)
+}
+
+// SetHopLimit sets the hop limit field value for future outgoing
+// packets.
+func (c *genericOpt) SetHopLimit(hoplim int) error {
+ if !c.ok() {
+ return errInvalidConn
+ }
+ so, ok := sockOpts[ssoHopLimit]
+ if !ok {
+ return errNotImplemented
+ }
+ return so.SetInt(c.Conn, hoplim)
+}
diff --git a/vendor/golang.org/x/net/ipv6/header.go b/vendor/golang.org/x/net/ipv6/header.go
new file mode 100644
index 0000000..e05cb08
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/header.go
@@ -0,0 +1,55 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import (
+ "encoding/binary"
+ "fmt"
+ "net"
+)
+
+const (
+ Version = 6 // protocol version
+ HeaderLen = 40 // header length
+)
+
+// A Header represents an IPv6 base header.
+type Header struct {
+ Version int // protocol version
+ TrafficClass int // traffic class
+ FlowLabel int // flow label
+ PayloadLen int // payload length
+ NextHeader int // next header
+ HopLimit int // hop limit
+ Src net.IP // source address
+ Dst net.IP // destination address
+}
+
+func (h *Header) String() string {
+ if h == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("ver=%d tclass=%#x flowlbl=%#x payloadlen=%d nxthdr=%d hoplim=%d src=%v dst=%v", h.Version, h.TrafficClass, h.FlowLabel, h.PayloadLen, h.NextHeader, h.HopLimit, h.Src, h.Dst)
+}
+
+// ParseHeader parses b as an IPv6 base header.
+func ParseHeader(b []byte) (*Header, error) {
+ if len(b) < HeaderLen {
+ return nil, errHeaderTooShort
+ }
+ h := &Header{
+ Version: int(b[0]) >> 4,
+ TrafficClass: int(b[0]&0x0f)<<4 | int(b[1])>>4,
+ FlowLabel: int(b[1]&0x0f)<<16 | int(b[2])<<8 | int(b[3]),
+ PayloadLen: int(binary.BigEndian.Uint16(b[4:6])),
+ NextHeader: int(b[6]),
+ HopLimit: int(b[7]),
+ }
+ h.Src = make(net.IP, net.IPv6len)
+ copy(h.Src, b[8:24])
+ h.Dst = make(net.IP, net.IPv6len)
+ copy(h.Dst, b[24:40])
+ return h, nil
+}
diff --git a/vendor/golang.org/x/net/ipv6/helper.go b/vendor/golang.org/x/net/ipv6/helper.go
new file mode 100644
index 0000000..c2d508f
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/helper.go
@@ -0,0 +1,58 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import (
+ "errors"
+ "net"
+ "runtime"
+)
+
+var (
+ errInvalidConn = errors.New("invalid connection")
+ errMissingAddress = errors.New("missing address")
+ errHeaderTooShort = errors.New("header too short")
+ errInvalidConnType = errors.New("invalid conn type")
+ errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH)
+)
+
+func boolint(b bool) int {
+ if b {
+ return 1
+ }
+ return 0
+}
+
+func netAddrToIP16(a net.Addr) net.IP {
+ switch v := a.(type) {
+ case *net.UDPAddr:
+ if ip := v.IP.To16(); ip != nil && ip.To4() == nil {
+ return ip
+ }
+ case *net.IPAddr:
+ if ip := v.IP.To16(); ip != nil && ip.To4() == nil {
+ return ip
+ }
+ }
+ return nil
+}
+
+func opAddr(a net.Addr) net.Addr {
+ switch a.(type) {
+ case *net.TCPAddr:
+ if a == nil {
+ return nil
+ }
+ case *net.UDPAddr:
+ if a == nil {
+ return nil
+ }
+ case *net.IPAddr:
+ if a == nil {
+ return nil
+ }
+ }
+ return a
+}
diff --git a/vendor/golang.org/x/net/ipv6/iana.go b/vendor/golang.org/x/net/ipv6/iana.go
new file mode 100644
index 0000000..32db1aa
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/iana.go
@@ -0,0 +1,86 @@
+// go generate gen.go
+// Code generated by the command above; DO NOT EDIT.
+
+package ipv6
+
+// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2018-03-09
+const (
+ ICMPTypeDestinationUnreachable ICMPType = 1 // Destination Unreachable
+ ICMPTypePacketTooBig ICMPType = 2 // Packet Too Big
+ ICMPTypeTimeExceeded ICMPType = 3 // Time Exceeded
+ ICMPTypeParameterProblem ICMPType = 4 // Parameter Problem
+ ICMPTypeEchoRequest ICMPType = 128 // Echo Request
+ ICMPTypeEchoReply ICMPType = 129 // Echo Reply
+ ICMPTypeMulticastListenerQuery ICMPType = 130 // Multicast Listener Query
+ ICMPTypeMulticastListenerReport ICMPType = 131 // Multicast Listener Report
+ ICMPTypeMulticastListenerDone ICMPType = 132 // Multicast Listener Done
+ ICMPTypeRouterSolicitation ICMPType = 133 // Router Solicitation
+ ICMPTypeRouterAdvertisement ICMPType = 134 // Router Advertisement
+ ICMPTypeNeighborSolicitation ICMPType = 135 // Neighbor Solicitation
+ ICMPTypeNeighborAdvertisement ICMPType = 136 // Neighbor Advertisement
+ ICMPTypeRedirect ICMPType = 137 // Redirect Message
+ ICMPTypeRouterRenumbering ICMPType = 138 // Router Renumbering
+ ICMPTypeNodeInformationQuery ICMPType = 139 // ICMP Node Information Query
+ ICMPTypeNodeInformationResponse ICMPType = 140 // ICMP Node Information Response
+ ICMPTypeInverseNeighborDiscoverySolicitation ICMPType = 141 // Inverse Neighbor Discovery Solicitation Message
+ ICMPTypeInverseNeighborDiscoveryAdvertisement ICMPType = 142 // Inverse Neighbor Discovery Advertisement Message
+ ICMPTypeVersion2MulticastListenerReport ICMPType = 143 // Version 2 Multicast Listener Report
+ ICMPTypeHomeAgentAddressDiscoveryRequest ICMPType = 144 // Home Agent Address Discovery Request Message
+ ICMPTypeHomeAgentAddressDiscoveryReply ICMPType = 145 // Home Agent Address Discovery Reply Message
+ ICMPTypeMobilePrefixSolicitation ICMPType = 146 // Mobile Prefix Solicitation
+ ICMPTypeMobilePrefixAdvertisement ICMPType = 147 // Mobile Prefix Advertisement
+ ICMPTypeCertificationPathSolicitation ICMPType = 148 // Certification Path Solicitation Message
+ ICMPTypeCertificationPathAdvertisement ICMPType = 149 // Certification Path Advertisement Message
+ ICMPTypeMulticastRouterAdvertisement ICMPType = 151 // Multicast Router Advertisement
+ ICMPTypeMulticastRouterSolicitation ICMPType = 152 // Multicast Router Solicitation
+ ICMPTypeMulticastRouterTermination ICMPType = 153 // Multicast Router Termination
+ ICMPTypeFMIPv6 ICMPType = 154 // FMIPv6 Messages
+ ICMPTypeRPLControl ICMPType = 155 // RPL Control Message
+ ICMPTypeILNPv6LocatorUpdate ICMPType = 156 // ILNPv6 Locator Update Message
+ ICMPTypeDuplicateAddressRequest ICMPType = 157 // Duplicate Address Request
+ ICMPTypeDuplicateAddressConfirmation ICMPType = 158 // Duplicate Address Confirmation
+ ICMPTypeMPLControl ICMPType = 159 // MPL Control Message
+ ICMPTypeExtendedEchoRequest ICMPType = 160 // Extended Echo Request
+ ICMPTypeExtendedEchoReply ICMPType = 161 // Extended Echo Reply
+)
+
+// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2018-03-09
+var icmpTypes = map[ICMPType]string{
+ 1: "destination unreachable",
+ 2: "packet too big",
+ 3: "time exceeded",
+ 4: "parameter problem",
+ 128: "echo request",
+ 129: "echo reply",
+ 130: "multicast listener query",
+ 131: "multicast listener report",
+ 132: "multicast listener done",
+ 133: "router solicitation",
+ 134: "router advertisement",
+ 135: "neighbor solicitation",
+ 136: "neighbor advertisement",
+ 137: "redirect message",
+ 138: "router renumbering",
+ 139: "icmp node information query",
+ 140: "icmp node information response",
+ 141: "inverse neighbor discovery solicitation message",
+ 142: "inverse neighbor discovery advertisement message",
+ 143: "version 2 multicast listener report",
+ 144: "home agent address discovery request message",
+ 145: "home agent address discovery reply message",
+ 146: "mobile prefix solicitation",
+ 147: "mobile prefix advertisement",
+ 148: "certification path solicitation message",
+ 149: "certification path advertisement message",
+ 151: "multicast router advertisement",
+ 152: "multicast router solicitation",
+ 153: "multicast router termination",
+ 154: "fmipv6 messages",
+ 155: "rpl control message",
+ 156: "ilnpv6 locator update message",
+ 157: "duplicate address request",
+ 158: "duplicate address confirmation",
+ 159: "mpl control message",
+ 160: "extended echo request",
+ 161: "extended echo reply",
+}
diff --git a/vendor/golang.org/x/net/ipv6/icmp.go b/vendor/golang.org/x/net/ipv6/icmp.go
new file mode 100644
index 0000000..b7f48e2
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/icmp.go
@@ -0,0 +1,60 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import "golang.org/x/net/internal/iana"
+
+// BUG(mikio): On Windows, methods related to ICMPFilter are not
+// implemented.
+
+// An ICMPType represents a type of ICMP message.
+type ICMPType int
+
+func (typ ICMPType) String() string {
+ s, ok := icmpTypes[typ]
+ if !ok {
+ return "<nil>"
+ }
+ return s
+}
+
+// Protocol returns the ICMPv6 protocol number.
+func (typ ICMPType) Protocol() int {
+ return iana.ProtocolIPv6ICMP
+}
+
+// An ICMPFilter represents an ICMP message filter for incoming
+// packets. The filter belongs to a packet delivery path on a host and
+// it cannot interact with forwarding packets or tunnel-outer packets.
+//
+// Note: RFC 8200 defines a reasonable role model. A node means a
+// device that implements IP. A router means a node that forwards IP
+// packets not explicitly addressed to itself, and a host means a node
+// that is not a router.
+type ICMPFilter struct {
+ icmpv6Filter
+}
+
+// Accept accepts incoming ICMP packets including the type field value
+// typ.
+func (f *ICMPFilter) Accept(typ ICMPType) {
+ f.accept(typ)
+}
+
+// Block blocks incoming ICMP packets including the type field value
+// typ.
+func (f *ICMPFilter) Block(typ ICMPType) {
+ f.block(typ)
+}
+
+// SetAll sets the filter action to the filter.
+func (f *ICMPFilter) SetAll(block bool) {
+ f.setAll(block)
+}
+
+// WillBlock reports whether the ICMP type will be blocked.
+func (f *ICMPFilter) WillBlock(typ ICMPType) bool {
+ return f.willBlock(typ)
+}
diff --git a/vendor/golang.org/x/net/ipv6/icmp_bsd.go b/vendor/golang.org/x/net/ipv6/icmp_bsd.go
new file mode 100644
index 0000000..120bf87
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/icmp_bsd.go
@@ -0,0 +1,30 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd
+// +build aix darwin dragonfly freebsd netbsd openbsd
+
+package ipv6
+
+func (f *icmpv6Filter) accept(typ ICMPType) {
+ f.Filt[typ>>5] |= 1 << (uint32(typ) & 31)
+}
+
+func (f *icmpv6Filter) block(typ ICMPType) {
+ f.Filt[typ>>5] &^= 1 << (uint32(typ) & 31)
+}
+
+func (f *icmpv6Filter) setAll(block bool) {
+ for i := range f.Filt {
+ if block {
+ f.Filt[i] = 0
+ } else {
+ f.Filt[i] = 1<<32 - 1
+ }
+ }
+}
+
+func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
+ return f.Filt[typ>>5]&(1<<(uint32(typ)&31)) == 0
+}
diff --git a/vendor/golang.org/x/net/ipv6/icmp_linux.go b/vendor/golang.org/x/net/ipv6/icmp_linux.go
new file mode 100644
index 0000000..647f6b4
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/icmp_linux.go
@@ -0,0 +1,27 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+func (f *icmpv6Filter) accept(typ ICMPType) {
+ f.Data[typ>>5] &^= 1 << (uint32(typ) & 31)
+}
+
+func (f *icmpv6Filter) block(typ ICMPType) {
+ f.Data[typ>>5] |= 1 << (uint32(typ) & 31)
+}
+
+func (f *icmpv6Filter) setAll(block bool) {
+ for i := range f.Data {
+ if block {
+ f.Data[i] = 1<<32 - 1
+ } else {
+ f.Data[i] = 0
+ }
+ }
+}
+
+func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
+ return f.Data[typ>>5]&(1<<(uint32(typ)&31)) != 0
+}
diff --git a/vendor/golang.org/x/net/ipv6/icmp_solaris.go b/vendor/golang.org/x/net/ipv6/icmp_solaris.go
new file mode 100644
index 0000000..7c23bb1
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/icmp_solaris.go
@@ -0,0 +1,27 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+func (f *icmpv6Filter) accept(typ ICMPType) {
+ f.X__icmp6_filt[typ>>5] |= 1 << (uint32(typ) & 31)
+}
+
+func (f *icmpv6Filter) block(typ ICMPType) {
+ f.X__icmp6_filt[typ>>5] &^= 1 << (uint32(typ) & 31)
+}
+
+func (f *icmpv6Filter) setAll(block bool) {
+ for i := range f.X__icmp6_filt {
+ if block {
+ f.X__icmp6_filt[i] = 0
+ } else {
+ f.X__icmp6_filt[i] = 1<<32 - 1
+ }
+ }
+}
+
+func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
+ return f.X__icmp6_filt[typ>>5]&(1<<(uint32(typ)&31)) == 0
+}
diff --git a/vendor/golang.org/x/net/ipv6/icmp_stub.go b/vendor/golang.org/x/net/ipv6/icmp_stub.go
new file mode 100644
index 0000000..d60136a
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/icmp_stub.go
@@ -0,0 +1,24 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
+
+package ipv6
+
+type icmpv6Filter struct {
+}
+
+func (f *icmpv6Filter) accept(typ ICMPType) {
+}
+
+func (f *icmpv6Filter) block(typ ICMPType) {
+}
+
+func (f *icmpv6Filter) setAll(block bool) {
+}
+
+func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
+ return false
+}
diff --git a/vendor/golang.org/x/net/ipv6/icmp_windows.go b/vendor/golang.org/x/net/ipv6/icmp_windows.go
new file mode 100644
index 0000000..443cd07
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/icmp_windows.go
@@ -0,0 +1,22 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+func (f *icmpv6Filter) accept(typ ICMPType) {
+ // TODO(mikio): implement this
+}
+
+func (f *icmpv6Filter) block(typ ICMPType) {
+ // TODO(mikio): implement this
+}
+
+func (f *icmpv6Filter) setAll(block bool) {
+ // TODO(mikio): implement this
+}
+
+func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
+ // TODO(mikio): implement this
+ return false
+}
diff --git a/vendor/golang.org/x/net/ipv6/icmp_zos.go b/vendor/golang.org/x/net/ipv6/icmp_zos.go
new file mode 100644
index 0000000..ddf8f09
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/icmp_zos.go
@@ -0,0 +1,29 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+func (f *icmpv6Filter) accept(typ ICMPType) {
+ f.Filt[typ>>5] |= 1 << (uint32(typ) & 31)
+
+}
+
+func (f *icmpv6Filter) block(typ ICMPType) {
+ f.Filt[typ>>5] &^= 1 << (uint32(typ) & 31)
+
+}
+
+func (f *icmpv6Filter) setAll(block bool) {
+ for i := range f.Filt {
+ if block {
+ f.Filt[i] = 0
+ } else {
+ f.Filt[i] = 1<<32 - 1
+ }
+ }
+}
+
+func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
+ return f.Filt[typ>>5]&(1<<(uint32(typ)&31)) == 0
+}
diff --git a/vendor/golang.org/x/net/ipv6/payload.go b/vendor/golang.org/x/net/ipv6/payload.go
new file mode 100644
index 0000000..a8197f1
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/payload.go
@@ -0,0 +1,23 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+// BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo
+// methods of PacketConn is not implemented.
+
+// A payloadHandler represents the IPv6 datagram payload handler.
+type payloadHandler struct {
+ net.PacketConn
+ *socket.Conn
+ rawOpt
+}
+
+func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil }
diff --git a/vendor/golang.org/x/net/ipv6/payload_cmsg.go b/vendor/golang.org/x/net/ipv6/payload_cmsg.go
new file mode 100644
index 0000000..b0692e4
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/payload_cmsg.go
@@ -0,0 +1,71 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
+
+package ipv6
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+// ReadFrom reads a payload of the received IPv6 datagram, from the
+// endpoint c, copying the payload into b. It returns the number of
+// bytes copied into b, the control message cm and the source address
+// src of the received datagram.
+func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
+ if !c.ok() {
+ return 0, nil, nil, errInvalidConn
+ }
+ c.rawOpt.RLock()
+ m := socket.Message{
+ Buffers: [][]byte{b},
+ OOB: NewControlMessage(c.rawOpt.cflags),
+ }
+ c.rawOpt.RUnlock()
+ switch c.PacketConn.(type) {
+ case *net.UDPConn:
+ if err := c.RecvMsg(&m, 0); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ case *net.IPConn:
+ if err := c.RecvMsg(&m, 0); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ default:
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errInvalidConnType}
+ }
+ if m.NN > 0 {
+ cm = new(ControlMessage)
+ if err := cm.Parse(m.OOB[:m.NN]); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ cm.Src = netAddrToIP16(m.Addr)
+ }
+ return m.N, cm, m.Addr, nil
+}
+
+// WriteTo writes a payload of the IPv6 datagram, to the destination
+// address dst through the endpoint c, copying the payload from b. It
+// returns the number of bytes written. The control message cm allows
+// the IPv6 header fields and the datagram path to be specified. The
+// cm may be nil if control of the outgoing datagram is not required.
+func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ m := socket.Message{
+ Buffers: [][]byte{b},
+ OOB: cm.Marshal(),
+ Addr: dst,
+ }
+ err = c.SendMsg(&m, 0)
+ if err != nil {
+ err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Addr: opAddr(dst), Err: err}
+ }
+ return m.N, err
+}
diff --git a/vendor/golang.org/x/net/ipv6/payload_nocmsg.go b/vendor/golang.org/x/net/ipv6/payload_nocmsg.go
new file mode 100644
index 0000000..cd0ff50
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/payload_nocmsg.go
@@ -0,0 +1,39 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
+
+package ipv6
+
+import "net"
+
+// ReadFrom reads a payload of the received IPv6 datagram, from the
+// endpoint c, copying the payload into b. It returns the number of
+// bytes copied into b, the control message cm and the source address
+// src of the received datagram.
+func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
+ if !c.ok() {
+ return 0, nil, nil, errInvalidConn
+ }
+ if n, src, err = c.PacketConn.ReadFrom(b); err != nil {
+ return 0, nil, nil, err
+ }
+ return
+}
+
+// WriteTo writes a payload of the IPv6 datagram, to the destination
+// address dst through the endpoint c, copying the payload from b. It
+// returns the number of bytes written. The control message cm allows
+// the IPv6 header fields and the datagram path to be specified. The
+// cm may be nil if control of the outgoing datagram is not required.
+func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
+ if !c.ok() {
+ return 0, errInvalidConn
+ }
+ if dst == nil {
+ return 0, errMissingAddress
+ }
+ return c.PacketConn.WriteTo(b, dst)
+}
diff --git a/vendor/golang.org/x/net/ipv6/sockopt.go b/vendor/golang.org/x/net/ipv6/sockopt.go
new file mode 100644
index 0000000..cc3907d
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sockopt.go
@@ -0,0 +1,43 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import "golang.org/x/net/internal/socket"
+
+// Sticky socket options
+const (
+ ssoTrafficClass = iota // header field for unicast packet, RFC 3542
+ ssoHopLimit // header field for unicast packet, RFC 3493
+ ssoMulticastInterface // outbound interface for multicast packet, RFC 3493
+ ssoMulticastHopLimit // header field for multicast packet, RFC 3493
+ ssoMulticastLoopback // loopback for multicast packet, RFC 3493
+ ssoReceiveTrafficClass // header field on received packet, RFC 3542
+ ssoReceiveHopLimit // header field on received packet, RFC 2292 or 3542
+ ssoReceivePacketInfo // incbound or outbound packet path, RFC 2292 or 3542
+ ssoReceivePathMTU // path mtu, RFC 3542
+ ssoPathMTU // path mtu, RFC 3542
+ ssoChecksum // packet checksum, RFC 2292 or 3542
+ ssoICMPFilter // icmp filter, RFC 2292 or 3542
+ ssoJoinGroup // any-source multicast, RFC 3493
+ ssoLeaveGroup // any-source multicast, RFC 3493
+ ssoJoinSourceGroup // source-specific multicast
+ ssoLeaveSourceGroup // source-specific multicast
+ ssoBlockSourceGroup // any-source or source-specific multicast
+ ssoUnblockSourceGroup // any-source or source-specific multicast
+ ssoAttachFilter // attach BPF for filtering inbound traffic
+)
+
+// Sticky socket option value types
+const (
+ ssoTypeIPMreq = iota + 1
+ ssoTypeGroupReq
+ ssoTypeGroupSourceReq
+)
+
+// A sockOpt represents a binding for sticky socket option.
+type sockOpt struct {
+ socket.Option
+ typ int // hint for option value type; optional
+}
diff --git a/vendor/golang.org/x/net/ipv6/sockopt_posix.go b/vendor/golang.org/x/net/ipv6/sockopt_posix.go
new file mode 100644
index 0000000..37c6287
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sockopt_posix.go
@@ -0,0 +1,90 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
+
+package ipv6
+
+import (
+ "net"
+ "runtime"
+ "unsafe"
+
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) {
+ n, err := so.GetInt(c)
+ if err != nil {
+ return nil, err
+ }
+ return net.InterfaceByIndex(n)
+}
+
+func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error {
+ var n int
+ if ifi != nil {
+ n = ifi.Index
+ }
+ return so.SetInt(c, n)
+}
+
+func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
+ b := make([]byte, so.Len)
+ n, err := so.Get(c, b)
+ if err != nil {
+ return nil, err
+ }
+ if n != sizeofICMPv6Filter {
+ return nil, errNotImplemented
+ }
+ return (*ICMPFilter)(unsafe.Pointer(&b[0])), nil
+}
+
+func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error {
+ b := (*[sizeofICMPv6Filter]byte)(unsafe.Pointer(f))[:sizeofICMPv6Filter]
+ return so.Set(c, b)
+}
+
+func (so *sockOpt) getMTUInfo(c *socket.Conn) (*net.Interface, int, error) {
+ b := make([]byte, so.Len)
+ n, err := so.Get(c, b)
+ if err != nil {
+ return nil, 0, err
+ }
+ if n != sizeofIPv6Mtuinfo {
+ return nil, 0, errNotImplemented
+ }
+ mi := (*ipv6Mtuinfo)(unsafe.Pointer(&b[0]))
+ if mi.Addr.Scope_id == 0 || runtime.GOOS == "aix" {
+ // AIX kernel might return a wrong address.
+ return nil, int(mi.Mtu), nil
+ }
+ ifi, err := net.InterfaceByIndex(int(mi.Addr.Scope_id))
+ if err != nil {
+ return nil, 0, err
+ }
+ return ifi, int(mi.Mtu), nil
+}
+
+func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ switch so.typ {
+ case ssoTypeIPMreq:
+ return so.setIPMreq(c, ifi, grp)
+ case ssoTypeGroupReq:
+ return so.setGroupReq(c, ifi, grp)
+ default:
+ return errNotImplemented
+ }
+}
+
+func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
+ return so.setGroupSourceReq(c, ifi, grp, src)
+}
+
+func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error {
+ return so.setAttachFilter(c, f)
+}
diff --git a/vendor/golang.org/x/net/ipv6/sockopt_stub.go b/vendor/golang.org/x/net/ipv6/sockopt_stub.go
new file mode 100644
index 0000000..32fd866
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sockopt_stub.go
@@ -0,0 +1,47 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
+
+package ipv6
+
+import (
+ "net"
+
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) {
+ return nil, errNotImplemented
+}
+
+func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error {
+ return errNotImplemented
+}
+
+func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
+ return nil, errNotImplemented
+}
+
+func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error {
+ return errNotImplemented
+}
+
+func (so *sockOpt) getMTUInfo(c *socket.Conn) (*net.Interface, int, error) {
+ return nil, 0, errNotImplemented
+}
+
+func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ return errNotImplemented
+}
+
+func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
+ return errNotImplemented
+}
+
+func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error {
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_aix.go b/vendor/golang.org/x/net/ipv6/sys_aix.go
new file mode 100644
index 0000000..a47182a
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_aix.go
@@ -0,0 +1,80 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Added for go1.11 compatibility
+//go:build aix
+// +build aix
+
+package ipv6
+
+import (
+ "net"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTrafficClass: {unix.IPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
+ ctlHopLimit: {unix.IPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
+ ctlPacketInfo: {unix.IPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
+ ctlNextHop: {unix.IPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop},
+ ctlPathMTU: {unix.IPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_TCLASS, Len: 4}},
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVTCLASS, Len: 4}},
+ ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVHOPLIMIT, Len: 4}},
+ ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPKTINFO, Len: 4}},
+ ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPATHMTU, Len: 4}},
+ ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
+ ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_CHECKSUM, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: unix.ICMP6_FILTER, Len: sizeofICMPv6Filter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
+ }
+)
+
+func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
+ sa.Len = sizeofSockaddrInet6
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], ip)
+ sa.Scope_id = uint32(i)
+}
+
+func (pi *inet6Pktinfo) setIfindex(i int) {
+ pi.Ifindex = int32(i)
+}
+
+func (mreq *ipv6Mreq) setIfindex(i int) {
+ mreq.Interface = uint32(i)
+}
+
+func (gr *groupReq) setGroup(grp net.IP) {
+ sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4))
+ sa.Len = sizeofSockaddrInet6
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], grp)
+}
+
+func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
+ sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4))
+ sa.Len = sizeofSockaddrInet6
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], grp)
+ sa = (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 132))
+ sa.Len = sizeofSockaddrInet6
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], src)
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_asmreq.go b/vendor/golang.org/x/net/ipv6/sys_asmreq.go
new file mode 100644
index 0000000..6ff9950
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_asmreq.go
@@ -0,0 +1,25 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
+
+package ipv6
+
+import (
+ "net"
+ "unsafe"
+
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ var mreq ipv6Mreq
+ copy(mreq.Multiaddr[:], grp)
+ if ifi != nil {
+ mreq.setIfindex(ifi.Index)
+ }
+ b := (*[sizeofIPv6Mreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPv6Mreq]
+ return so.Set(c, b)
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go b/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go
new file mode 100644
index 0000000..485290c
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go
@@ -0,0 +1,18 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
+
+package ipv6
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_bpf.go b/vendor/golang.org/x/net/ipv6/sys_bpf.go
new file mode 100644
index 0000000..b5661fb
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_bpf.go
@@ -0,0 +1,25 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build linux
+// +build linux
+
+package ipv6
+
+import (
+ "unsafe"
+
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+ "golang.org/x/sys/unix"
+)
+
+func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
+ prog := unix.SockFprog{
+ Len: uint16(len(f)),
+ Filter: (*unix.SockFilter)(unsafe.Pointer(&f[0])),
+ }
+ b := (*[unix.SizeofSockFprog]byte)(unsafe.Pointer(&prog))[:unix.SizeofSockFprog]
+ return so.Set(c, b)
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go b/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go
new file mode 100644
index 0000000..cb00661
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go
@@ -0,0 +1,17 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !linux
+// +build !linux
+
+package ipv6
+
+import (
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_bsd.go b/vendor/golang.org/x/net/ipv6/sys_bsd.go
new file mode 100644
index 0000000..bde41a6
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_bsd.go
@@ -0,0 +1,60 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build dragonfly || netbsd || openbsd
+// +build dragonfly netbsd openbsd
+
+package ipv6
+
+import (
+ "net"
+ "syscall"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTrafficClass: {unix.IPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
+ ctlHopLimit: {unix.IPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
+ ctlPacketInfo: {unix.IPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
+ ctlNextHop: {unix.IPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop},
+ ctlPathMTU: {unix.IPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_TCLASS, Len: 4}},
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVTCLASS, Len: 4}},
+ ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVHOPLIMIT, Len: 4}},
+ ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPKTINFO, Len: 4}},
+ ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPATHMTU, Len: 4}},
+ ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
+ ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_CHECKSUM, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: unix.ICMP6_FILTER, Len: sizeofICMPv6Filter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
+ }
+)
+
+func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
+ sa.Len = sizeofSockaddrInet6
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], ip)
+ sa.Scope_id = uint32(i)
+}
+
+func (pi *inet6Pktinfo) setIfindex(i int) {
+ pi.Ifindex = uint32(i)
+}
+
+func (mreq *ipv6Mreq) setIfindex(i int) {
+ mreq.Interface = uint32(i)
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_darwin.go b/vendor/golang.org/x/net/ipv6/sys_darwin.go
new file mode 100644
index 0000000..b80ec80
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_darwin.go
@@ -0,0 +1,80 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import (
+ "net"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTrafficClass: {unix.IPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
+ ctlHopLimit: {unix.IPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
+ ctlPacketInfo: {unix.IPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
+ ctlNextHop: {unix.IPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop},
+ ctlPathMTU: {unix.IPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_LOOP, Len: 4}},
+ ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_TCLASS, Len: 4}},
+ ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVTCLASS, Len: 4}},
+ ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVHOPLIMIT, Len: 4}},
+ ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPKTINFO, Len: 4}},
+ ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPATHMTU, Len: 4}},
+ ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
+ ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_CHECKSUM, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: unix.ICMP6_FILTER, Len: sizeofICMPv6Filter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ }
+)
+
+func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
+ sa.Len = sizeofSockaddrInet6
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], ip)
+ sa.Scope_id = uint32(i)
+}
+
+func (pi *inet6Pktinfo) setIfindex(i int) {
+ pi.Ifindex = uint32(i)
+}
+
+func (mreq *ipv6Mreq) setIfindex(i int) {
+ mreq.Interface = uint32(i)
+}
+
+func (gr *groupReq) setGroup(grp net.IP) {
+ sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4))
+ sa.Len = sizeofSockaddrInet6
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], grp)
+}
+
+func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
+ sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4))
+ sa.Len = sizeofSockaddrInet6
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], grp)
+ sa = (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 132))
+ sa.Len = sizeofSockaddrInet6
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], src)
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_freebsd.go b/vendor/golang.org/x/net/ipv6/sys_freebsd.go
new file mode 100644
index 0000000..6282cf9
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_freebsd.go
@@ -0,0 +1,94 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import (
+ "net"
+ "runtime"
+ "strings"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTrafficClass: {unix.IPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
+ ctlHopLimit: {unix.IPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
+ ctlPacketInfo: {unix.IPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
+ ctlNextHop: {unix.IPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop},
+ ctlPathMTU: {unix.IPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
+ }
+
+ sockOpts = map[int]sockOpt{
+ ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_TCLASS, Len: 4}},
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVTCLASS, Len: 4}},
+ ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVHOPLIMIT, Len: 4}},
+ ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPKTINFO, Len: 4}},
+ ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPATHMTU, Len: 4}},
+ ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
+ ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_CHECKSUM, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: unix.ICMP6_FILTER, Len: sizeofICMPv6Filter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ }
+)
+
+func init() {
+ if runtime.GOOS == "freebsd" && runtime.GOARCH == "386" {
+ archs, _ := syscall.Sysctl("kern.supported_archs")
+ for _, s := range strings.Fields(archs) {
+ if s == "amd64" {
+ compatFreeBSD32 = true
+ break
+ }
+ }
+ }
+}
+
+func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
+ sa.Len = sizeofSockaddrInet6
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], ip)
+ sa.Scope_id = uint32(i)
+}
+
+func (pi *inet6Pktinfo) setIfindex(i int) {
+ pi.Ifindex = uint32(i)
+}
+
+func (mreq *ipv6Mreq) setIfindex(i int) {
+ mreq.Interface = uint32(i)
+}
+
+func (gr *groupReq) setGroup(grp net.IP) {
+ sa := (*sockaddrInet6)(unsafe.Pointer(&gr.Group))
+ sa.Len = sizeofSockaddrInet6
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], grp)
+}
+
+func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
+ sa := (*sockaddrInet6)(unsafe.Pointer(&gsr.Group))
+ sa.Len = sizeofSockaddrInet6
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], grp)
+ sa = (*sockaddrInet6)(unsafe.Pointer(&gsr.Source))
+ sa.Len = sizeofSockaddrInet6
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], src)
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_linux.go b/vendor/golang.org/x/net/ipv6/sys_linux.go
new file mode 100644
index 0000000..82e2121
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_linux.go
@@ -0,0 +1,76 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import (
+ "net"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTrafficClass: {unix.IPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
+ ctlHopLimit: {unix.IPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
+ ctlPacketInfo: {unix.IPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
+ ctlPathMTU: {unix.IPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_TCLASS, Len: 4}},
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVTCLASS, Len: 4}},
+ ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVHOPLIMIT, Len: 4}},
+ ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPKTINFO, Len: 4}},
+ ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPATHMTU, Len: 4}},
+ ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
+ ssoChecksum: {Option: socket.Option{Level: iana.ProtocolReserved, Name: unix.IPV6_CHECKSUM, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: unix.ICMPV6_FILTER, Len: sizeofICMPv6Filter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoAttachFilter: {Option: socket.Option{Level: unix.SOL_SOCKET, Name: unix.SO_ATTACH_FILTER, Len: unix.SizeofSockFprog}},
+ }
+)
+
+func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], ip)
+ sa.Scope_id = uint32(i)
+}
+
+func (pi *inet6Pktinfo) setIfindex(i int) {
+ pi.Ifindex = int32(i)
+}
+
+func (mreq *ipv6Mreq) setIfindex(i int) {
+ mreq.Ifindex = int32(i)
+}
+
+func (gr *groupReq) setGroup(grp net.IP) {
+ sa := (*sockaddrInet6)(unsafe.Pointer(&gr.Group))
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], grp)
+}
+
+func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
+ sa := (*sockaddrInet6)(unsafe.Pointer(&gsr.Group))
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], grp)
+ sa = (*sockaddrInet6)(unsafe.Pointer(&gsr.Source))
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], src)
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_solaris.go b/vendor/golang.org/x/net/ipv6/sys_solaris.go
new file mode 100644
index 0000000..1fc30ad
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_solaris.go
@@ -0,0 +1,76 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import (
+ "net"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTrafficClass: {unix.IPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass},
+ ctlHopLimit: {unix.IPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
+ ctlPacketInfo: {unix.IPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
+ ctlNextHop: {unix.IPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop},
+ ctlPathMTU: {unix.IPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_TCLASS, Len: 4}},
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVTCLASS, Len: 4}},
+ ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVHOPLIMIT, Len: 4}},
+ ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPKTINFO, Len: 4}},
+ ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPATHMTU, Len: 4}},
+ ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
+ ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_CHECKSUM, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: unix.ICMP6_FILTER, Len: sizeofICMPv6Filter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ }
+)
+
+func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], ip)
+ sa.Scope_id = uint32(i)
+}
+
+func (pi *inet6Pktinfo) setIfindex(i int) {
+ pi.Ifindex = uint32(i)
+}
+
+func (mreq *ipv6Mreq) setIfindex(i int) {
+ mreq.Interface = uint32(i)
+}
+
+func (gr *groupReq) setGroup(grp net.IP) {
+ sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4))
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], grp)
+}
+
+func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
+ sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4))
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], grp)
+ sa = (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 260))
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], src)
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_ssmreq.go b/vendor/golang.org/x/net/ipv6/sys_ssmreq.go
new file mode 100644
index 0000000..023488a
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_ssmreq.go
@@ -0,0 +1,55 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || darwin || freebsd || linux || solaris || zos
+// +build aix darwin freebsd linux solaris zos
+
+package ipv6
+
+import (
+ "net"
+ "unsafe"
+
+ "golang.org/x/net/internal/socket"
+)
+
+var compatFreeBSD32 bool // 386 emulation on amd64
+
+func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ var gr groupReq
+ if ifi != nil {
+ gr.Interface = uint32(ifi.Index)
+ }
+ gr.setGroup(grp)
+ var b []byte
+ if compatFreeBSD32 {
+ var d [sizeofGroupReq + 4]byte
+ s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))
+ copy(d[:4], s[:4])
+ copy(d[8:], s[4:])
+ b = d[:]
+ } else {
+ b = (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))[:sizeofGroupReq]
+ }
+ return so.Set(c, b)
+}
+
+func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
+ var gsr groupSourceReq
+ if ifi != nil {
+ gsr.Interface = uint32(ifi.Index)
+ }
+ gsr.setSourceGroup(grp, src)
+ var b []byte
+ if compatFreeBSD32 {
+ var d [sizeofGroupSourceReq + 4]byte
+ s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))
+ copy(d[:4], s[:4])
+ copy(d[8:], s[4:])
+ b = d[:]
+ } else {
+ b = (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))[:sizeofGroupSourceReq]
+ }
+ return so.Set(c, b)
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go b/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go
new file mode 100644
index 0000000..acdf2e5
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go
@@ -0,0 +1,22 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !freebsd && !linux && !solaris && !zos
+// +build !aix,!darwin,!freebsd,!linux,!solaris,!zos
+
+package ipv6
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ return errNotImplemented
+}
+
+func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
+ return errNotImplemented
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_stub.go b/vendor/golang.org/x/net/ipv6/sys_stub.go
new file mode 100644
index 0000000..5807bba
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_stub.go
@@ -0,0 +1,14 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
+// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
+
+package ipv6
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{}
+
+ sockOpts = map[int]*sockOpt{}
+)
diff --git a/vendor/golang.org/x/net/ipv6/sys_windows.go b/vendor/golang.org/x/net/ipv6/sys_windows.go
new file mode 100644
index 0000000..fda8a29
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_windows.go
@@ -0,0 +1,68 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import (
+ "net"
+ "syscall"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/windows"
+)
+
+const (
+ sizeofSockaddrInet6 = 0x1c
+
+ sizeofIPv6Mreq = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofICMPv6Filter = 0
+)
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type icmpv6Filter struct {
+ // TODO(mikio): implement this
+}
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{}
+
+ sockOpts = map[int]*sockOpt{
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: windows.IPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: windows.IPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: windows.IPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: windows.IPV6_MULTICAST_LOOP, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: windows.IPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: windows.IPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
+ }
+)
+
+func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], ip)
+ sa.Scope_id = uint32(i)
+}
+
+func (mreq *ipv6Mreq) setIfindex(i int) {
+ mreq.Interface = uint32(i)
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_zos.go b/vendor/golang.org/x/net/ipv6/sys_zos.go
new file mode 100644
index 0000000..31adc86
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_zos.go
@@ -0,0 +1,72 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ipv6
+
+import (
+ "net"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+
+ "golang.org/x/sys/unix"
+)
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlHopLimit: {unix.IPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit},
+ ctlPacketInfo: {unix.IPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo},
+ ctlPathMTU: {unix.IPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_TCLASS, Len: 4}},
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVTCLASS, Len: 4}},
+ ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVHOPLIMIT, Len: 4}},
+ ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPKTINFO, Len: 4}},
+ ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_RECVPATHMTU, Len: 4}},
+ ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.IPV6_CHECKSUM, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: unix.ICMP6_FILTER, Len: sizeofICMPv6Filter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: unix.MCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ }
+)
+
+func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
+ sa.Family = syscall.AF_INET6
+ copy(sa.Addr[:], ip)
+ sa.Scope_id = uint32(i)
+}
+
+func (pi *inet6Pktinfo) setIfindex(i int) {
+ pi.Ifindex = uint32(i)
+}
+
+func (gr *groupReq) setGroup(grp net.IP) {
+ sa := (*sockaddrInet6)(unsafe.Pointer(&gr.Group))
+ sa.Family = syscall.AF_INET6
+ sa.Len = sizeofSockaddrInet6
+ copy(sa.Addr[:], grp)
+}
+
+func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) {
+ sa := (*sockaddrInet6)(unsafe.Pointer(&gsr.Group))
+ sa.Family = syscall.AF_INET6
+ sa.Len = sizeofSockaddrInet6
+ copy(sa.Addr[:], grp)
+ sa = (*sockaddrInet6)(unsafe.Pointer(&gsr.Source))
+ sa.Family = syscall.AF_INET6
+ sa.Len = sizeofSockaddrInet6
+ copy(sa.Addr[:], src)
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_aix_ppc64.go b/vendor/golang.org/x/net/ipv6/zsys_aix_ppc64.go
new file mode 100644
index 0000000..f604b0f
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_aix_ppc64.go
@@ -0,0 +1,69 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_aix.go
+
+// Added for go1.11 compatibility
+//go:build aix
+// +build aix
+
+package ipv6
+
+const (
+ sizeofSockaddrStorage = 0x508
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x510
+ sizeofGroupSourceReq = 0xa18
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type sockaddrStorage struct {
+ X__ss_len uint8
+ Family uint8
+ X__ss_pad1 [6]uint8
+ X__ss_align int64
+ X__ss_pad2 [1265]uint8
+ Pad_cgo_0 [7]byte
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type icmpv6Filter struct {
+ Filt [8]uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Group sockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group sockaddrStorage
+ Source sockaddrStorage
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_darwin.go b/vendor/golang.org/x/net/ipv6/zsys_darwin.go
new file mode 100644
index 0000000..dd6f7b2
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_darwin.go
@@ -0,0 +1,64 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_darwin.go
+
+package ipv6
+
+const (
+ sizeofSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type sockaddrStorage struct {
+ Len uint8
+ Family uint8
+ X__ss_pad1 [6]int8
+ X__ss_align int64
+ X__ss_pad2 [112]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type icmpv6Filter struct {
+ Filt [8]uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [128]byte
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [128]byte
+ Pad_cgo_1 [128]byte
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_dragonfly.go b/vendor/golang.org/x/net/ipv6/zsys_dragonfly.go
new file mode 100644
index 0000000..6b45a94
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_dragonfly.go
@@ -0,0 +1,42 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_dragonfly.go
+
+package ipv6
+
+const (
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+
+ sizeofIPv6Mreq = 0x14
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type icmpv6Filter struct {
+ Filt [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go b/vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go
new file mode 100644
index 0000000..8da5592
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go
@@ -0,0 +1,64 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_freebsd.go
+
+package ipv6
+
+const (
+ sizeofSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type sockaddrStorage struct {
+ Len uint8
+ Family uint8
+ X__ss_pad1 [6]int8
+ X__ss_align int64
+ X__ss_pad2 [112]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Group sockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group sockaddrStorage
+ Source sockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Filt [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go b/vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go
new file mode 100644
index 0000000..72a1a65
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go
@@ -0,0 +1,66 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_freebsd.go
+
+package ipv6
+
+const (
+ sizeofSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type sockaddrStorage struct {
+ Len uint8
+ Family uint8
+ X__ss_pad1 [6]int8
+ X__ss_align int64
+ X__ss_pad2 [112]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group sockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group sockaddrStorage
+ Source sockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Filt [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go b/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go
new file mode 100644
index 0000000..72a1a65
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go
@@ -0,0 +1,66 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_freebsd.go
+
+package ipv6
+
+const (
+ sizeofSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type sockaddrStorage struct {
+ Len uint8
+ Family uint8
+ X__ss_pad1 [6]int8
+ X__ss_align int64
+ X__ss_pad2 [112]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group sockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group sockaddrStorage
+ Source sockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Filt [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm64.go b/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm64.go
new file mode 100644
index 0000000..5b39eb8
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm64.go
@@ -0,0 +1,64 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_freebsd.go
+
+package ipv6
+
+const (
+ sizeofSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type sockaddrStorage struct {
+ Len uint8
+ Family uint8
+ X__ss_pad1 [6]uint8
+ X__ss_align int64
+ X__ss_pad2 [112]uint8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Group sockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group sockaddrStorage
+ Source sockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Filt [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_386.go b/vendor/golang.org/x/net/ipv6/zsys_linux_386.go
new file mode 100644
index 0000000..ad71871
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_386.go
@@ -0,0 +1,72 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv6
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofIPv6FlowlabelReq = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6FlowlabelReq struct {
+ Dst [16]byte /* in6_addr */
+ Label uint32
+ Action uint8
+ Share uint8
+ Flags uint16
+ Expires uint16
+ Linger uint16
+ X__flr_pad uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type groupReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Data [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go b/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go
new file mode 100644
index 0000000..2514ab9
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv6
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofIPv6FlowlabelReq = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6FlowlabelReq struct {
+ Dst [16]byte /* in6_addr */
+ Label uint32
+ Action uint8
+ Share uint8
+ Flags uint16
+ Expires uint16
+ Linger uint16
+ X__flr_pad uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Data [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go b/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go
new file mode 100644
index 0000000..ad71871
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go
@@ -0,0 +1,72 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv6
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofIPv6FlowlabelReq = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6FlowlabelReq struct {
+ Dst [16]byte /* in6_addr */
+ Label uint32
+ Action uint8
+ Share uint8
+ Flags uint16
+ Expires uint16
+ Linger uint16
+ X__flr_pad uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type groupReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Data [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go b/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go
new file mode 100644
index 0000000..2514ab9
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv6
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofIPv6FlowlabelReq = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6FlowlabelReq struct {
+ Dst [16]byte /* in6_addr */
+ Label uint32
+ Action uint8
+ Share uint8
+ Flags uint16
+ Expires uint16
+ Linger uint16
+ X__flr_pad uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Data [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go b/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go
new file mode 100644
index 0000000..ad71871
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go
@@ -0,0 +1,72 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv6
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofIPv6FlowlabelReq = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6FlowlabelReq struct {
+ Dst [16]byte /* in6_addr */
+ Label uint32
+ Action uint8
+ Share uint8
+ Flags uint16
+ Expires uint16
+ Linger uint16
+ X__flr_pad uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type groupReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Data [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go b/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go
new file mode 100644
index 0000000..2514ab9
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv6
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofIPv6FlowlabelReq = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6FlowlabelReq struct {
+ Dst [16]byte /* in6_addr */
+ Label uint32
+ Action uint8
+ Share uint8
+ Flags uint16
+ Expires uint16
+ Linger uint16
+ X__flr_pad uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Data [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go b/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go
new file mode 100644
index 0000000..2514ab9
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv6
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofIPv6FlowlabelReq = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6FlowlabelReq struct {
+ Dst [16]byte /* in6_addr */
+ Label uint32
+ Action uint8
+ Share uint8
+ Flags uint16
+ Expires uint16
+ Linger uint16
+ X__flr_pad uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Data [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go b/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go
new file mode 100644
index 0000000..ad71871
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go
@@ -0,0 +1,72 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv6
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofIPv6FlowlabelReq = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6FlowlabelReq struct {
+ Dst [16]byte /* in6_addr */
+ Label uint32
+ Action uint8
+ Share uint8
+ Flags uint16
+ Expires uint16
+ Linger uint16
+ X__flr_pad uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type groupReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Data [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go
new file mode 100644
index 0000000..d06c2ad
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go
@@ -0,0 +1,72 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv6
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofIPv6FlowlabelReq = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x84
+ sizeofGroupSourceReq = 0x104
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6FlowlabelReq struct {
+ Dst [16]byte /* in6_addr */
+ Label uint32
+ Action uint8
+ Share uint8
+ Flags uint16
+ Expires uint16
+ Linger uint16
+ X__flr_pad uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type groupReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Data [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go
new file mode 100644
index 0000000..2514ab9
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv6
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofIPv6FlowlabelReq = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6FlowlabelReq struct {
+ Dst [16]byte /* in6_addr */
+ Label uint32
+ Action uint8
+ Share uint8
+ Flags uint16
+ Expires uint16
+ Linger uint16
+ X__flr_pad uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Data [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go
new file mode 100644
index 0000000..2514ab9
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv6
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofIPv6FlowlabelReq = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6FlowlabelReq struct {
+ Dst [16]byte /* in6_addr */
+ Label uint32
+ Action uint8
+ Share uint8
+ Flags uint16
+ Expires uint16
+ Linger uint16
+ X__flr_pad uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Data [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_riscv64.go b/vendor/golang.org/x/net/ipv6/zsys_linux_riscv64.go
new file mode 100644
index 0000000..d4f78e4
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_riscv64.go
@@ -0,0 +1,77 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+//go:build riscv64
+// +build riscv64
+
+package ipv6
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofIPv6FlowlabelReq = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6FlowlabelReq struct {
+ Dst [16]byte /* in6_addr */
+ Label uint32
+ Action uint8
+ Share uint8
+ Flags uint16
+ Expires uint16
+ Linger uint16
+ X__flr_pad uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Data [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go b/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go
new file mode 100644
index 0000000..2514ab9
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go
@@ -0,0 +1,74 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_linux.go
+
+package ipv6
+
+const (
+ sizeofKernelSockaddrStorage = 0x80
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+ sizeofIPv6FlowlabelReq = 0x20
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x88
+ sizeofGroupSourceReq = 0x108
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type kernelSockaddrStorage struct {
+ Family uint16
+ X__data [126]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6FlowlabelReq struct {
+ Dst [16]byte /* in6_addr */
+ Label uint32
+ Action uint8
+ Share uint8
+ Flags uint16
+ Expires uint16
+ Linger uint16
+ X__flr_pad uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Ifindex int32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [4]byte
+ Group kernelSockaddrStorage
+ Source kernelSockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Data [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_netbsd.go b/vendor/golang.org/x/net/ipv6/zsys_netbsd.go
new file mode 100644
index 0000000..f7335d5
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_netbsd.go
@@ -0,0 +1,42 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_netbsd.go
+
+package ipv6
+
+const (
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+
+ sizeofIPv6Mreq = 0x14
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type icmpv6Filter struct {
+ Filt [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_openbsd.go b/vendor/golang.org/x/net/ipv6/zsys_openbsd.go
new file mode 100644
index 0000000..6d15928
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_openbsd.go
@@ -0,0 +1,42 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_openbsd.go
+
+package ipv6
+
+const (
+ sizeofSockaddrInet6 = 0x1c
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x20
+
+ sizeofIPv6Mreq = 0x14
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type icmpv6Filter struct {
+ Filt [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_solaris.go b/vendor/golang.org/x/net/ipv6/zsys_solaris.go
new file mode 100644
index 0000000..1716197
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_solaris.go
@@ -0,0 +1,63 @@
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs defs_solaris.go
+
+package ipv6
+
+const (
+ sizeofSockaddrStorage = 0x100
+ sizeofSockaddrInet6 = 0x20
+ sizeofInet6Pktinfo = 0x14
+ sizeofIPv6Mtuinfo = 0x24
+
+ sizeofIPv6Mreq = 0x14
+ sizeofGroupReq = 0x104
+ sizeofGroupSourceReq = 0x204
+
+ sizeofICMPv6Filter = 0x20
+)
+
+type sockaddrStorage struct {
+ Family uint16
+ X_ss_pad1 [6]int8
+ X_ss_align float64
+ X_ss_pad2 [240]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+ X__sin6_src_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type ipv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ Pad_cgo_0 [256]byte
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ Pad_cgo_0 [256]byte
+ Pad_cgo_1 [256]byte
+}
+
+type icmpv6Filter struct {
+ X__icmp6_filt [8]uint32
+}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_zos_s390x.go b/vendor/golang.org/x/net/ipv6/zsys_zos_s390x.go
new file mode 100644
index 0000000..7c75645
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/zsys_zos_s390x.go
@@ -0,0 +1,62 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Hand edited based on zerrors_zos_s390x.go
+// TODO(Bill O'Farrell): auto-generate.
+
+package ipv6
+
+const (
+ sizeofSockaddrStorage = 128
+ sizeofICMPv6Filter = 32
+ sizeofInet6Pktinfo = 20
+ sizeofIPv6Mtuinfo = 32
+ sizeofSockaddrInet6 = 28
+ sizeofGroupReq = 136
+ sizeofGroupSourceReq = 264
+)
+
+type sockaddrStorage struct {
+ Len uint8
+ Family byte
+ ss_pad1 [6]byte
+ ss_align int64
+ ss_pad2 [112]byte
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte
+ Scope_id uint32
+}
+
+type inet6Pktinfo struct {
+ Addr [16]byte
+ Ifindex uint32
+}
+
+type ipv6Mtuinfo struct {
+ Addr sockaddrInet6
+ Mtu uint32
+}
+
+type groupReq struct {
+ Interface uint32
+ reserved uint32
+ Group sockaddrStorage
+}
+
+type groupSourceReq struct {
+ Interface uint32
+ reserved uint32
+ Group sockaddrStorage
+ Source sockaddrStorage
+}
+
+type icmpv6Filter struct {
+ Filt [8]uint32
+}
diff --git a/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s b/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s
index 06f84b8..6b4027b 100644
--- a/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s
+++ b/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/cpu/byteorder.go b/vendor/golang.org/x/sys/cpu/byteorder.go
index ed8da8d..dcbb14e 100644
--- a/vendor/golang.org/x/sys/cpu/byteorder.go
+++ b/vendor/golang.org/x/sys/cpu/byteorder.go
@@ -39,20 +39,25 @@ func (bigEndian) Uint64(b []byte) uint64 {
uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
}
-// hostByteOrder returns binary.LittleEndian on little-endian machines and
-// binary.BigEndian on big-endian machines.
+// hostByteOrder returns littleEndian on little-endian machines and
+// bigEndian on big-endian machines.
func hostByteOrder() byteOrder {
switch runtime.GOARCH {
case "386", "amd64", "amd64p32",
+ "alpha",
"arm", "arm64",
"mipsle", "mips64le", "mips64p32le",
+ "nios2",
"ppc64le",
- "riscv", "riscv64":
+ "riscv", "riscv64",
+ "sh":
return littleEndian{}
case "armbe", "arm64be",
+ "m68k",
"mips", "mips64", "mips64p32",
"ppc", "ppc64",
"s390", "s390x",
+ "shbe",
"sparc", "sparc64":
return bigEndian{}
}
diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go
index b4e6ecb..f77701f 100644
--- a/vendor/golang.org/x/sys/cpu/cpu.go
+++ b/vendor/golang.org/x/sys/cpu/cpu.go
@@ -6,6 +6,11 @@
// various CPU architectures.
package cpu
+import (
+ "os"
+ "strings"
+)
+
// Initialized reports whether the CPU features were initialized.
//
// For some GOOS/GOARCH combinations initialization of the CPU features depends
@@ -24,26 +29,46 @@ type CacheLinePad struct{ _ [cacheLineSize]byte }
// and HasAVX2 are only set if the OS supports XMM and YMM
// registers in addition to the CPUID feature bit being set.
var X86 struct {
- _ CacheLinePad
- HasAES bool // AES hardware implementation (AES NI)
- HasADX bool // Multi-precision add-carry instruction extensions
- HasAVX bool // Advanced vector extension
- HasAVX2 bool // Advanced vector extension 2
- 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
+ _ CacheLinePad
+ HasAES bool // AES hardware implementation (AES NI)
+ HasADX bool // Multi-precision add-carry instruction extensions
+ HasAVX bool // Advanced vector extension
+ HasAVX2 bool // Advanced vector extension 2
+ HasAVX512 bool // Advanced vector extension 512
+ HasAVX512F bool // Advanced vector extension 512 Foundation Instructions
+ HasAVX512CD bool // Advanced vector extension 512 Conflict Detection Instructions
+ HasAVX512ER bool // Advanced vector extension 512 Exponential and Reciprocal Instructions
+ HasAVX512PF bool // Advanced vector extension 512 Prefetch Instructions Instructions
+ HasAVX512VL bool // Advanced vector extension 512 Vector Length Extensions
+ HasAVX512BW bool // Advanced vector extension 512 Byte and Word Instructions
+ HasAVX512DQ bool // Advanced vector extension 512 Doubleword and Quadword Instructions
+ HasAVX512IFMA bool // Advanced vector extension 512 Integer Fused Multiply Add
+ HasAVX512VBMI bool // Advanced vector extension 512 Vector Byte Manipulation Instructions
+ HasAVX5124VNNIW bool // Advanced vector extension 512 Vector Neural Network Instructions Word variable precision
+ HasAVX5124FMAPS bool // Advanced vector extension 512 Fused Multiply Accumulation Packed Single precision
+ HasAVX512VPOPCNTDQ bool // Advanced vector extension 512 Double and quad word population count instructions
+ HasAVX512VPCLMULQDQ bool // Advanced vector extension 512 Vector carry-less multiply operations
+ 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
@@ -114,6 +139,15 @@ var ARM struct {
_ CacheLinePad
}
+// MIPS64X contains the supported CPU features of the current mips64/mips64le
+// platforms. If the current platform is not mips64/mips64le or the current
+// operating system is not Linux then all feature flags are false.
+var MIPS64X struct {
+ _ CacheLinePad
+ HasMSA bool // MIPS SIMD architecture
+ _ CacheLinePad
+}
+
// PPC64 contains the supported CPU features of the current ppc64/ppc64le platforms.
// If the current platform is not ppc64/ppc64le then all feature flags are false.
//
@@ -160,3 +194,94 @@ var S390X struct {
HasVXE bool // vector-enhancements facility 1
_ CacheLinePad
}
+
+func init() {
+ archInit()
+ initOptions()
+ processOptions()
+}
+
+// options contains the cpu debug options that can be used in GODEBUG.
+// Options are arch dependent and are added by the arch specific initOptions functions.
+// Features that are mandatory for the specific GOARCH should have the Required field set
+// (e.g. SSE2 on amd64).
+var options []option
+
+// Option names should be lower case. e.g. avx instead of AVX.
+type option struct {
+ Name string
+ Feature *bool
+ Specified bool // whether feature value was specified in GODEBUG
+ Enable bool // whether feature should be enabled
+ Required bool // whether feature is mandatory and can not be disabled
+}
+
+func processOptions() {
+ env := os.Getenv("GODEBUG")
+field:
+ for env != "" {
+ field := ""
+ i := strings.IndexByte(env, ',')
+ if i < 0 {
+ field, env = env, ""
+ } else {
+ field, env = env[:i], env[i+1:]
+ }
+ if len(field) < 4 || field[:4] != "cpu." {
+ continue
+ }
+ i = strings.IndexByte(field, '=')
+ if i < 0 {
+ print("GODEBUG sys/cpu: no value specified for \"", field, "\"\n")
+ continue
+ }
+ key, value := field[4:i], field[i+1:] // e.g. "SSE2", "on"
+
+ var enable bool
+ switch value {
+ case "on":
+ enable = true
+ case "off":
+ enable = false
+ default:
+ print("GODEBUG sys/cpu: value \"", value, "\" not supported for cpu option \"", key, "\"\n")
+ continue field
+ }
+
+ if key == "all" {
+ for i := range options {
+ options[i].Specified = true
+ options[i].Enable = enable || options[i].Required
+ }
+ continue field
+ }
+
+ for i := range options {
+ if options[i].Name == key {
+ options[i].Specified = true
+ options[i].Enable = enable
+ continue field
+ }
+ }
+
+ print("GODEBUG sys/cpu: unknown cpu feature \"", key, "\"\n")
+ }
+
+ for _, o := range options {
+ if !o.Specified {
+ continue
+ }
+
+ if o.Enable && !*o.Feature {
+ print("GODEBUG sys/cpu: can not enable \"", o.Name, "\", missing CPU support\n")
+ continue
+ }
+
+ if !o.Enable && o.Required {
+ print("GODEBUG sys/cpu: can not disable \"", o.Name, "\", required CPU feature\n")
+ continue
+ }
+
+ *o.Feature = o.Enable
+ }
+}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go b/vendor/golang.org/x/sys/cpu/cpu_aix.go
index be60272..28b5216 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_aix.go
@@ -2,12 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix,ppc64
+//go:build aix
+// +build aix
package cpu
-const cacheLineSize = 128
-
const (
// getsystemcfg constants
_SC_IMPL = 2
@@ -15,7 +14,7 @@ const (
_IMPL_POWER9 = 0x20000
)
-func init() {
+func archInit() {
impl := getsystemcfg(_SC_IMPL)
if impl&_IMPL_POWER8 != 0 {
PPC64.IsPOWER8 = true
diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm.go b/vendor/golang.org/x/sys/cpu/cpu_arm.go
index 981af68..301b752 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_arm.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_arm.go
@@ -38,3 +38,36 @@ const (
hwcap2_SHA2 = 1 << 3
hwcap2_CRC32 = 1 << 4
)
+
+func initOptions() {
+ options = []option{
+ {Name: "pmull", Feature: &ARM.HasPMULL},
+ {Name: "sha1", Feature: &ARM.HasSHA1},
+ {Name: "sha2", Feature: &ARM.HasSHA2},
+ {Name: "swp", Feature: &ARM.HasSWP},
+ {Name: "thumb", Feature: &ARM.HasTHUMB},
+ {Name: "thumbee", Feature: &ARM.HasTHUMBEE},
+ {Name: "tls", Feature: &ARM.HasTLS},
+ {Name: "vfp", Feature: &ARM.HasVFP},
+ {Name: "vfpd32", Feature: &ARM.HasVFPD32},
+ {Name: "vfpv3", Feature: &ARM.HasVFPv3},
+ {Name: "vfpv3d16", Feature: &ARM.HasVFPv3D16},
+ {Name: "vfpv4", Feature: &ARM.HasVFPv4},
+ {Name: "half", Feature: &ARM.HasHALF},
+ {Name: "26bit", Feature: &ARM.Has26BIT},
+ {Name: "fastmul", Feature: &ARM.HasFASTMUL},
+ {Name: "fpa", Feature: &ARM.HasFPA},
+ {Name: "edsp", Feature: &ARM.HasEDSP},
+ {Name: "java", Feature: &ARM.HasJAVA},
+ {Name: "iwmmxt", Feature: &ARM.HasIWMMXT},
+ {Name: "crunch", Feature: &ARM.HasCRUNCH},
+ {Name: "neon", Feature: &ARM.HasNEON},
+ {Name: "idivt", Feature: &ARM.HasIDIVT},
+ {Name: "idiva", Feature: &ARM.HasIDIVA},
+ {Name: "lpae", Feature: &ARM.HasLPAE},
+ {Name: "evtstrm", Feature: &ARM.HasEVTSTRM},
+ {Name: "aes", Feature: &ARM.HasAES},
+ {Name: "crc32", Feature: &ARM.HasCRC32},
+ }
+
+}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_arm64.go
index 9c87677..87dd5e3 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_arm64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.go
@@ -8,27 +8,65 @@ import "runtime"
const cacheLineSize = 64
-func init() {
+func initOptions() {
+ options = []option{
+ {Name: "fp", Feature: &ARM64.HasFP},
+ {Name: "asimd", Feature: &ARM64.HasASIMD},
+ {Name: "evstrm", Feature: &ARM64.HasEVTSTRM},
+ {Name: "aes", Feature: &ARM64.HasAES},
+ {Name: "fphp", Feature: &ARM64.HasFPHP},
+ {Name: "jscvt", Feature: &ARM64.HasJSCVT},
+ {Name: "lrcpc", Feature: &ARM64.HasLRCPC},
+ {Name: "pmull", Feature: &ARM64.HasPMULL},
+ {Name: "sha1", Feature: &ARM64.HasSHA1},
+ {Name: "sha2", Feature: &ARM64.HasSHA2},
+ {Name: "sha3", Feature: &ARM64.HasSHA3},
+ {Name: "sha512", Feature: &ARM64.HasSHA512},
+ {Name: "sm3", Feature: &ARM64.HasSM3},
+ {Name: "sm4", Feature: &ARM64.HasSM4},
+ {Name: "sve", Feature: &ARM64.HasSVE},
+ {Name: "crc32", Feature: &ARM64.HasCRC32},
+ {Name: "atomics", Feature: &ARM64.HasATOMICS},
+ {Name: "asimdhp", Feature: &ARM64.HasASIMDHP},
+ {Name: "cpuid", Feature: &ARM64.HasCPUID},
+ {Name: "asimrdm", Feature: &ARM64.HasASIMDRDM},
+ {Name: "fcma", Feature: &ARM64.HasFCMA},
+ {Name: "dcpop", Feature: &ARM64.HasDCPOP},
+ {Name: "asimddp", Feature: &ARM64.HasASIMDDP},
+ {Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM},
+ }
+}
+
+func archInit() {
switch runtime.GOOS {
- case "android", "darwin":
- // Android and iOS don't seem to allow reading these registers.
- // Fake the minimal features expected by
- // TestARM64minimalFeatures.
- ARM64.HasASIMD = true
- ARM64.HasFP = true
- case "linux":
+ case "freebsd":
+ readARM64Registers()
+ case "linux", "netbsd":
doinit()
default:
- readARM64Registers()
+ // Most platforms don't seem to allow reading these registers.
+ //
+ // OpenBSD:
+ // See https://golang.org/issue/31746
+ setMinimalFeatures()
}
}
+// setMinimalFeatures fakes the minimal ARM64 features expected by
+// TestARM64minimalFeatures.
+func setMinimalFeatures() {
+ ARM64.HasASIMD = true
+ ARM64.HasFP = true
+}
+
func readARM64Registers() {
Initialized = true
- // ID_AA64ISAR0_EL1
- isar0 := getisar0()
+ parseARM64SystemRegisters(getisar0(), getisar1(), getpfr0())
+}
+func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) {
+ // ID_AA64ISAR0_EL1
switch extractBits(isar0, 4, 7) {
case 1:
ARM64.HasAES = true
@@ -86,8 +124,6 @@ func readARM64Registers() {
}
// ID_AA64ISAR1_EL1
- isar1 := getisar1()
-
switch extractBits(isar1, 0, 3) {
case 1:
ARM64.HasDCPOP = true
@@ -109,8 +145,6 @@ func readARM64Registers() {
}
// ID_AA64PFR0_EL1
- pfr0 := getpfr0()
-
switch extractBits(pfr0, 16, 19) {
case 0:
ARM64.HasFP = true
diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.s b/vendor/golang.org/x/sys/cpu/cpu_arm64.s
index a54436e..cfc08c9 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_arm64.s
+++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
index 7b88e86..ccf542a 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+//go:build gc
+// +build gc
package cpu
diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go b/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go
index 568bcd0..0af2f24 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+//go:build gc
+// +build gc
package cpu
diff --git a/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
index f7cb469..fa7cdb9 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (386 || amd64 || amd64p32) && gc
// +build 386 amd64 amd64p32
-// +build !gccgo
+// +build gc
package cpu
diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
index 53ca8d6..2aff318 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build gccgo
// +build gccgo
package cpu
diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go
index aa986f7..4bfbda6 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_s390x.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build gccgo
// +build gccgo
package cpu
diff --git a/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go
index ba49b91..8478a6d 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_gccgo_x86.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (386 || amd64 || amd64p32) && gccgo
// +build 386 amd64 amd64p32
// +build gccgo
diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux.go b/vendor/golang.org/x/sys/cpu/cpu_linux.go
index fe13918..159a686 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_linux.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_linux.go
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !386 && !amd64 && !amd64p32 && !arm64
// +build !386,!amd64,!amd64p32,!arm64
package cpu
-func init() {
+func archInit() {
if err := readHWCAP(); err != nil {
return
}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go
new file mode 100644
index 0000000..6000db4
--- /dev/null
+++ b/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go
@@ -0,0 +1,24 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build linux && (mips64 || mips64le)
+// +build linux
+// +build mips64 mips64le
+
+package cpu
+
+// HWCAP bits. These are exposed by the Linux kernel 5.4.
+const (
+ // CPU features
+ hwcap_MIPS_MSA = 1 << 1
+)
+
+func doinit() {
+ // HWCAP feature bits
+ MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA)
+}
+
+func isSet(hwc uint, value uint) bool {
+ return hwc&value != 0
+}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
index f65134f..f4992b1 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux,!arm,!arm64,!ppc64,!ppc64le,!s390x
+//go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x
+// +build linux,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le,!s390x
package cpu
diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go b/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go
index 6c8d975..021356d 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_linux_ppc64x.go
@@ -2,13 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && (ppc64 || ppc64le)
// +build linux
// +build ppc64 ppc64le
package cpu
-const cacheLineSize = 128
-
// HWCAP/HWCAP2 bits. These are exposed by the kernel.
const (
// ISA Level
diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go b/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
index d579eae..1517ac6 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
@@ -4,8 +4,6 @@
package cpu
-const cacheLineSize = 256
-
const (
// bit mask values from /usr/include/bits/hwcap.h
hwcap_ZARCH = 2
@@ -19,86 +17,7 @@ const (
hwcap_VXE = 8192
)
-// bitIsSet reports whether the bit at index is set. The bit index
-// is in big endian order, so bit index 0 is the leftmost bit.
-func bitIsSet(bits []uint64, index uint) bool {
- return bits[index/64]&((1<<63)>>(index%64)) != 0
-}
-
-// function is the code for the named cryptographic function.
-type function uint8
-
-const (
- // KM{,A,C,CTR} function codes
- aes128 function = 18 // AES-128
- aes192 function = 19 // AES-192
- aes256 function = 20 // AES-256
-
- // K{I,L}MD function codes
- sha1 function = 1 // SHA-1
- sha256 function = 2 // SHA-256
- sha512 function = 3 // SHA-512
- sha3_224 function = 32 // SHA3-224
- sha3_256 function = 33 // SHA3-256
- sha3_384 function = 34 // SHA3-384
- sha3_512 function = 35 // SHA3-512
- shake128 function = 36 // SHAKE-128
- shake256 function = 37 // SHAKE-256
-
- // KLMD function codes
- ghash function = 65 // GHASH
-)
-
-// queryResult contains the result of a Query function
-// call. Bits are numbered in big endian order so the
-// leftmost bit (the MSB) is at index 0.
-type queryResult struct {
- bits [2]uint64
-}
-
-// Has reports whether the given functions are present.
-func (q *queryResult) Has(fns ...function) bool {
- if len(fns) == 0 {
- panic("no function codes provided")
- }
- for _, f := range fns {
- if !bitIsSet(q.bits[:], uint(f)) {
- return false
- }
- }
- return true
-}
-
-// facility is a bit index for the named facility.
-type facility uint8
-
-const (
- // cryptography facilities
- msa4 facility = 77 // message-security-assist extension 4
- msa8 facility = 146 // message-security-assist extension 8
-)
-
-// facilityList contains the result of an STFLE call.
-// Bits are numbered in big endian order so the
-// leftmost bit (the MSB) is at index 0.
-type facilityList struct {
- bits [4]uint64
-}
-
-// Has reports whether the given facilities are present.
-func (s *facilityList) Has(fs ...facility) bool {
- if len(fs) == 0 {
- panic("no facility bits provided")
- }
- for _, f := range fs {
- if !bitIsSet(s.bits[:], uint(f)) {
- return false
- }
- }
- return true
-}
-
-func doinit() {
+func initS390Xbase() {
// test HWCAP bit vector
has := func(featureMask uint) bool {
return hwCap&featureMask == featureMask
@@ -118,44 +37,4 @@ func doinit() {
if S390X.HasVX {
S390X.HasVXE = has(hwcap_VXE)
}
-
- // We need implementations of stfle, km and so on
- // to detect cryptographic features.
- if !haveAsmFunctions() {
- return
- }
-
- // optional cryptographic functions
- if S390X.HasMSA {
- aes := []function{aes128, aes192, aes256}
-
- // cipher message
- km, kmc := kmQuery(), kmcQuery()
- S390X.HasAES = km.Has(aes...)
- S390X.HasAESCBC = kmc.Has(aes...)
- if S390X.HasSTFLE {
- facilities := stfle()
- if facilities.Has(msa4) {
- kmctr := kmctrQuery()
- S390X.HasAESCTR = kmctr.Has(aes...)
- }
- if facilities.Has(msa8) {
- kma := kmaQuery()
- S390X.HasAESGCM = kma.Has(aes...)
- }
- }
-
- // compute message digest
- kimd := kimdQuery() // intermediate (no padding)
- klmd := klmdQuery() // last (padding)
- S390X.HasSHA1 = kimd.Has(sha1) && klmd.Has(sha1)
- S390X.HasSHA256 = kimd.Has(sha256) && klmd.Has(sha256)
- S390X.HasSHA512 = kimd.Has(sha512) && klmd.Has(sha512)
- S390X.HasGHASH = kimd.Has(ghash) // KLMD-GHASH does not exist
- sha3 := []function{
- sha3_224, sha3_256, sha3_384, sha3_512,
- shake128, shake256,
- }
- S390X.HasSHA3 = kimd.Has(sha3...) && klmd.Has(sha3...)
- }
}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_mips64x.go
index 6165f12..f4063c6 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_mips64x.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_mips64x.go
@@ -2,8 +2,15 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build mips64 || mips64le
// +build mips64 mips64le
package cpu
const cacheLineSize = 32
+
+func initOptions() {
+ options = []option{
+ {Name: "msa", Feature: &MIPS64X.HasMSA},
+ }
+}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_mipsx.go b/vendor/golang.org/x/sys/cpu/cpu_mipsx.go
index 1269eee..07c4e36 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_mipsx.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_mipsx.go
@@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build mips || mipsle
// +build mips mipsle
package cpu
const cacheLineSize = 32
+
+func initOptions() {}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
new file mode 100644
index 0000000..ebfb3fc
--- /dev/null
+++ b/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go
@@ -0,0 +1,173 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+// Minimal copy of functionality from x/sys/unix so the cpu package can call
+// sysctl without depending on x/sys/unix.
+
+const (
+ _CTL_QUERY = -2
+
+ _SYSCTL_VERS_1 = 0x1000000
+)
+
+var _zero uintptr
+
+func sysctl(mib []int32, 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)
+ }
+ _, _, errno := syscall.Syscall6(
+ syscall.SYS___SYSCTL,
+ uintptr(_p0),
+ uintptr(len(mib)),
+ uintptr(unsafe.Pointer(old)),
+ uintptr(unsafe.Pointer(oldlen)),
+ uintptr(unsafe.Pointer(new)),
+ uintptr(newlen))
+ if errno != 0 {
+ return errno
+ }
+ return nil
+}
+
+type sysctlNode struct {
+ Flags uint32
+ Num int32
+ Name [32]int8
+ Ver uint32
+ __rsvd uint32
+ Un [16]byte
+ _sysctl_size [8]byte
+ _sysctl_func [8]byte
+ _sysctl_parent [8]byte
+ _sysctl_desc [8]byte
+}
+
+func sysctlNodes(mib []int32) ([]sysctlNode, error) {
+ var olen uintptr
+
+ // Get a list of all sysctl nodes below the given MIB by performing
+ // a sysctl for the given MIB with CTL_QUERY appended.
+ mib = append(mib, _CTL_QUERY)
+ qnode := sysctlNode{Flags: _SYSCTL_VERS_1}
+ qp := (*byte)(unsafe.Pointer(&qnode))
+ sz := unsafe.Sizeof(qnode)
+ if err := sysctl(mib, nil, &olen, qp, sz); err != nil {
+ return nil, err
+ }
+
+ // Now that we know the size, get the actual nodes.
+ nodes := make([]sysctlNode, olen/sz)
+ np := (*byte)(unsafe.Pointer(&nodes[0]))
+ if err := sysctl(mib, np, &olen, qp, sz); err != nil {
+ return nil, err
+ }
+
+ return nodes, nil
+}
+
+func nametomib(name string) ([]int32, error) {
+ // Split name into components.
+ var parts []string
+ last := 0
+ for i := 0; i < len(name); i++ {
+ if name[i] == '.' {
+ parts = append(parts, name[last:i])
+ last = i + 1
+ }
+ }
+ parts = append(parts, name[last:])
+
+ mib := []int32{}
+ // Discover the nodes and construct the MIB OID.
+ for partno, part := range parts {
+ nodes, err := sysctlNodes(mib)
+ if err != nil {
+ return nil, err
+ }
+ for _, node := range nodes {
+ n := make([]byte, 0)
+ for i := range node.Name {
+ if node.Name[i] != 0 {
+ n = append(n, byte(node.Name[i]))
+ }
+ }
+ if string(n) == part {
+ mib = append(mib, int32(node.Num))
+ break
+ }
+ }
+ if len(mib) != partno+1 {
+ return nil, err
+ }
+ }
+
+ return mib, nil
+}
+
+// aarch64SysctlCPUID is struct aarch64_sysctl_cpu_id from NetBSD's <aarch64/armreg.h>
+type aarch64SysctlCPUID struct {
+ midr uint64 /* Main ID Register */
+ revidr uint64 /* Revision ID Register */
+ mpidr uint64 /* Multiprocessor Affinity Register */
+ aa64dfr0 uint64 /* A64 Debug Feature Register 0 */
+ aa64dfr1 uint64 /* A64 Debug Feature Register 1 */
+ aa64isar0 uint64 /* A64 Instruction Set Attribute Register 0 */
+ aa64isar1 uint64 /* A64 Instruction Set Attribute Register 1 */
+ aa64mmfr0 uint64 /* A64 Memory Model Feature Register 0 */
+ aa64mmfr1 uint64 /* A64 Memory Model Feature Register 1 */
+ aa64mmfr2 uint64 /* A64 Memory Model Feature Register 2 */
+ aa64pfr0 uint64 /* A64 Processor Feature Register 0 */
+ aa64pfr1 uint64 /* A64 Processor Feature Register 1 */
+ aa64zfr0 uint64 /* A64 SVE Feature ID Register 0 */
+ mvfr0 uint32 /* Media and VFP Feature Register 0 */
+ mvfr1 uint32 /* Media and VFP Feature Register 1 */
+ mvfr2 uint32 /* Media and VFP Feature Register 2 */
+ pad uint32
+ clidr uint64 /* Cache Level ID Register */
+ ctr uint64 /* Cache Type Register */
+}
+
+func sysctlCPUID(name string) (*aarch64SysctlCPUID, error) {
+ mib, err := nametomib(name)
+ if err != nil {
+ return nil, err
+ }
+
+ out := aarch64SysctlCPUID{}
+ n := unsafe.Sizeof(out)
+ _, _, errno := syscall.Syscall6(
+ syscall.SYS___SYSCTL,
+ uintptr(unsafe.Pointer(&mib[0])),
+ uintptr(len(mib)),
+ uintptr(unsafe.Pointer(&out)),
+ uintptr(unsafe.Pointer(&n)),
+ uintptr(0),
+ uintptr(0))
+ if errno != 0 {
+ return nil, errno
+ }
+ return &out, nil
+}
+
+func doinit() {
+ cpuid, err := sysctlCPUID("machdep.cpu0.cpu_id")
+ if err != nil {
+ setMinimalFeatures()
+ return
+ }
+ parseARM64SystemRegisters(cpuid.aa64isar0, cpuid.aa64isar1, cpuid.aa64pfr0)
+
+ Initialized = true
+}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_arm.go b/vendor/golang.org/x/sys/cpu/cpu_other_arm.go
new file mode 100644
index 0000000..d7b4fb4
--- /dev/null
+++ b/vendor/golang.org/x/sys/cpu/cpu_other_arm.go
@@ -0,0 +1,10 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !linux && arm
+// +build !linux,arm
+
+package cpu
+
+func archInit() {}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
index 3ffc4af..f8c484f 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !linux,arm64
+//go:build !linux && !netbsd && arm64
+// +build !linux,!netbsd,arm64
package cpu
diff --git a/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go
new file mode 100644
index 0000000..0dafe96
--- /dev/null
+++ b/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go
@@ -0,0 +1,13 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !linux && (mips64 || mips64le)
+// +build !linux
+// +build mips64 mips64le
+
+package cpu
+
+func archInit() {
+ Initialized = true
+}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go b/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go
new file mode 100644
index 0000000..4e8acd1
--- /dev/null
+++ b/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go
@@ -0,0 +1,17 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build ppc64 || ppc64le
+// +build ppc64 ppc64le
+
+package cpu
+
+const cacheLineSize = 128
+
+func initOptions() {
+ options = []option{
+ {Name: "darn", Feature: &PPC64.HasDARN},
+ {Name: "scv", Feature: &PPC64.HasSCV},
+ }
+}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
index efe2b7a..bd6c128 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go
@@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build riscv64
// +build riscv64
package cpu
const cacheLineSize = 32
+
+func initOptions() {}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_s390x.go b/vendor/golang.org/x/sys/cpu/cpu_s390x.go
new file mode 100644
index 0000000..5881b88
--- /dev/null
+++ b/vendor/golang.org/x/sys/cpu/cpu_s390x.go
@@ -0,0 +1,172 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+const cacheLineSize = 256
+
+func initOptions() {
+ options = []option{
+ {Name: "zarch", Feature: &S390X.HasZARCH, Required: true},
+ {Name: "stfle", Feature: &S390X.HasSTFLE, Required: true},
+ {Name: "ldisp", Feature: &S390X.HasLDISP, Required: true},
+ {Name: "eimm", Feature: &S390X.HasEIMM, Required: true},
+ {Name: "dfp", Feature: &S390X.HasDFP},
+ {Name: "etf3eh", Feature: &S390X.HasETF3EH},
+ {Name: "msa", Feature: &S390X.HasMSA},
+ {Name: "aes", Feature: &S390X.HasAES},
+ {Name: "aescbc", Feature: &S390X.HasAESCBC},
+ {Name: "aesctr", Feature: &S390X.HasAESCTR},
+ {Name: "aesgcm", Feature: &S390X.HasAESGCM},
+ {Name: "ghash", Feature: &S390X.HasGHASH},
+ {Name: "sha1", Feature: &S390X.HasSHA1},
+ {Name: "sha256", Feature: &S390X.HasSHA256},
+ {Name: "sha3", Feature: &S390X.HasSHA3},
+ {Name: "sha512", Feature: &S390X.HasSHA512},
+ {Name: "vx", Feature: &S390X.HasVX},
+ {Name: "vxe", Feature: &S390X.HasVXE},
+ }
+}
+
+// bitIsSet reports whether the bit at index is set. The bit index
+// is in big endian order, so bit index 0 is the leftmost bit.
+func bitIsSet(bits []uint64, index uint) bool {
+ return bits[index/64]&((1<<63)>>(index%64)) != 0
+}
+
+// facility is a bit index for the named facility.
+type facility uint8
+
+const (
+ // mandatory facilities
+ zarch facility = 1 // z architecture mode is active
+ stflef facility = 7 // store-facility-list-extended
+ ldisp facility = 18 // long-displacement
+ eimm facility = 21 // extended-immediate
+
+ // miscellaneous facilities
+ dfp facility = 42 // decimal-floating-point
+ etf3eh facility = 30 // extended-translation 3 enhancement
+
+ // cryptography facilities
+ msa facility = 17 // message-security-assist
+ msa3 facility = 76 // message-security-assist extension 3
+ msa4 facility = 77 // message-security-assist extension 4
+ msa5 facility = 57 // message-security-assist extension 5
+ msa8 facility = 146 // message-security-assist extension 8
+ msa9 facility = 155 // message-security-assist extension 9
+
+ // vector facilities
+ vx facility = 129 // vector facility
+ vxe facility = 135 // vector-enhancements 1
+ vxe2 facility = 148 // vector-enhancements 2
+)
+
+// facilityList contains the result of an STFLE call.
+// Bits are numbered in big endian order so the
+// leftmost bit (the MSB) is at index 0.
+type facilityList struct {
+ bits [4]uint64
+}
+
+// Has reports whether the given facilities are present.
+func (s *facilityList) Has(fs ...facility) bool {
+ if len(fs) == 0 {
+ panic("no facility bits provided")
+ }
+ for _, f := range fs {
+ if !bitIsSet(s.bits[:], uint(f)) {
+ return false
+ }
+ }
+ return true
+}
+
+// function is the code for the named cryptographic function.
+type function uint8
+
+const (
+ // KM{,A,C,CTR} function codes
+ aes128 function = 18 // AES-128
+ aes192 function = 19 // AES-192
+ aes256 function = 20 // AES-256
+
+ // K{I,L}MD function codes
+ sha1 function = 1 // SHA-1
+ sha256 function = 2 // SHA-256
+ sha512 function = 3 // SHA-512
+ sha3_224 function = 32 // SHA3-224
+ sha3_256 function = 33 // SHA3-256
+ sha3_384 function = 34 // SHA3-384
+ sha3_512 function = 35 // SHA3-512
+ shake128 function = 36 // SHAKE-128
+ shake256 function = 37 // SHAKE-256
+
+ // KLMD function codes
+ ghash function = 65 // GHASH
+)
+
+// queryResult contains the result of a Query function
+// call. Bits are numbered in big endian order so the
+// leftmost bit (the MSB) is at index 0.
+type queryResult struct {
+ bits [2]uint64
+}
+
+// Has reports whether the given functions are present.
+func (q *queryResult) Has(fns ...function) bool {
+ if len(fns) == 0 {
+ panic("no function codes provided")
+ }
+ for _, f := range fns {
+ if !bitIsSet(q.bits[:], uint(f)) {
+ return false
+ }
+ }
+ return true
+}
+
+func doinit() {
+ initS390Xbase()
+
+ // We need implementations of stfle, km and so on
+ // to detect cryptographic features.
+ if !haveAsmFunctions() {
+ return
+ }
+
+ // optional cryptographic functions
+ if S390X.HasMSA {
+ aes := []function{aes128, aes192, aes256}
+
+ // cipher message
+ km, kmc := kmQuery(), kmcQuery()
+ S390X.HasAES = km.Has(aes...)
+ S390X.HasAESCBC = kmc.Has(aes...)
+ if S390X.HasSTFLE {
+ facilities := stfle()
+ if facilities.Has(msa4) {
+ kmctr := kmctrQuery()
+ S390X.HasAESCTR = kmctr.Has(aes...)
+ }
+ if facilities.Has(msa8) {
+ kma := kmaQuery()
+ S390X.HasAESGCM = kma.Has(aes...)
+ }
+ }
+
+ // compute message digest
+ kimd := kimdQuery() // intermediate (no padding)
+ klmd := klmdQuery() // last (padding)
+ S390X.HasSHA1 = kimd.Has(sha1) && klmd.Has(sha1)
+ S390X.HasSHA256 = kimd.Has(sha256) && klmd.Has(sha256)
+ S390X.HasSHA512 = kimd.Has(sha512) && klmd.Has(sha512)
+ S390X.HasGHASH = kimd.Has(ghash) // KLMD-GHASH does not exist
+ sha3 := []function{
+ sha3_224, sha3_256, sha3_384, sha3_512,
+ shake128, shake256,
+ }
+ S390X.HasSHA3 = kimd.Has(sha3...) && klmd.Has(sha3...)
+ }
+}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_s390x.s b/vendor/golang.org/x/sys/cpu/cpu_s390x.s
index e5037d9..964946d 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_s390x.s
+++ b/vendor/golang.org/x/sys/cpu/cpu_s390x.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/cpu/cpu_wasm.go b/vendor/golang.org/x/sys/cpu/cpu_wasm.go
index 8681e87..7747d88 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_wasm.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_wasm.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build wasm
// +build wasm
package cpu
@@ -11,3 +12,7 @@ package cpu
// rules are good enough.
const cacheLineSize = 0
+
+func initOptions() {}
+
+func archInit() {}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.go b/vendor/golang.org/x/sys/cpu/cpu_x86.go
index d70d317..fd380c0 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_x86.go
+++ b/vendor/golang.org/x/sys/cpu/cpu_x86.go
@@ -2,13 +2,62 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build 386 || amd64 || amd64p32
// +build 386 amd64 amd64p32
package cpu
+import "runtime"
+
const cacheLineSize = 64
-func init() {
+func initOptions() {
+ options = []option{
+ {Name: "adx", Feature: &X86.HasADX},
+ {Name: "aes", Feature: &X86.HasAES},
+ {Name: "avx", Feature: &X86.HasAVX},
+ {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: "bmi2", Feature: &X86.HasBMI2},
+ {Name: "erms", Feature: &X86.HasERMS},
+ {Name: "fma", Feature: &X86.HasFMA},
+ {Name: "osxsave", Feature: &X86.HasOSXSAVE},
+ {Name: "pclmulqdq", Feature: &X86.HasPCLMULQDQ},
+ {Name: "popcnt", Feature: &X86.HasPOPCNT},
+ {Name: "rdrand", Feature: &X86.HasRDRAND},
+ {Name: "rdseed", Feature: &X86.HasRDSEED},
+ {Name: "sse3", Feature: &X86.HasSSE3},
+ {Name: "sse41", Feature: &X86.HasSSE41},
+ {Name: "sse42", Feature: &X86.HasSSE42},
+ {Name: "ssse3", Feature: &X86.HasSSSE3},
+
+ // These capabilities should always be enabled on amd64:
+ {Name: "sse2", Feature: &X86.HasSSE2, Required: runtime.GOARCH == "amd64"},
+ }
+}
+
+func archInit() {
+
Initialized = true
maxID, _, _, _ := cpuid(0, 0)
@@ -31,12 +80,15 @@ func init() {
X86.HasOSXSAVE = isSet(27, ecx1)
X86.HasRDRAND = isSet(30, ecx1)
- osSupportsAVX := false
+ var osSupportsAVX, osSupportsAVX512 bool
// For XGETBV, OSXSAVE bit is required and sufficient.
if X86.HasOSXSAVE {
eax, _ := xgetbv()
// Check if XMM and YMM registers have OS support.
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
@@ -45,13 +97,38 @@ func init() {
return
}
- _, ebx7, _, _ := cpuid(7, 0)
+ _, ebx7, ecx7, edx7 := cpuid(7, 0)
X86.HasBMI1 = isSet(3, ebx7)
X86.HasAVX2 = isSet(5, ebx7) && osSupportsAVX
X86.HasBMI2 = isSet(8, ebx7)
X86.HasERMS = isSet(9, ebx7)
X86.HasRDSEED = isSet(18, 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 {
diff --git a/vendor/golang.org/x/sys/cpu/cpu_x86.s b/vendor/golang.org/x/sys/cpu/cpu_x86.s
index 47f0841..2f557a5 100644
--- a/vendor/golang.org/x/sys/cpu/cpu_x86.s
+++ b/vendor/golang.org/x/sys/cpu/cpu_x86.s
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// +build 386 amd64 amd64p32
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/cpu/cpu_zos.go b/vendor/golang.org/x/sys/cpu/cpu_zos.go
new file mode 100644
index 0000000..5f54683
--- /dev/null
+++ b/vendor/golang.org/x/sys/cpu/cpu_zos.go
@@ -0,0 +1,10 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+func archInit() {
+ doinit()
+ Initialized = true
+}
diff --git a/vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go b/vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go
new file mode 100644
index 0000000..ccb1b70
--- /dev/null
+++ b/vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go
@@ -0,0 +1,25 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+func initS390Xbase() {
+ // get the facilities list
+ facilities := stfle()
+
+ // mandatory
+ S390X.HasZARCH = facilities.Has(zarch)
+ S390X.HasSTFLE = facilities.Has(stflef)
+ S390X.HasLDISP = facilities.Has(ldisp)
+ S390X.HasEIMM = facilities.Has(eimm)
+
+ // optional
+ S390X.HasETF3EH = facilities.Has(etf3eh)
+ S390X.HasDFP = facilities.Has(dfp)
+ S390X.HasMSA = facilities.Has(msa)
+ S390X.HasVX = facilities.Has(vx)
+ if S390X.HasVX {
+ S390X.HasVXE = facilities.Has(vxe)
+ }
+}
diff --git a/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go b/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
new file mode 100644
index 0000000..a864f24
--- /dev/null
+++ b/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
@@ -0,0 +1,27 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Recreate a getsystemcfg syscall handler instead of
+// using the one provided by x/sys/unix to avoid having
+// the dependency between them. (See golang.org/issue/32102)
+// Morever, this file will be used during the building of
+// gccgo's libgo and thus must not used a CGo method.
+
+//go:build aix && gccgo
+// +build aix,gccgo
+
+package cpu
+
+import (
+ "syscall"
+)
+
+//extern getsystemcfg
+func gccgoGetsystemcfg(label uint32) (r uint64)
+
+func callgetsystemcfg(label int) (r1 uintptr, e1 syscall.Errno) {
+ r1 = uintptr(gccgoGetsystemcfg(uint32(label)))
+ e1 = syscall.GetErrno()
+ return
+}
diff --git a/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go b/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go
index 78fe25e..904be42 100644
--- a/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go
+++ b/vendor/golang.org/x/sys/cpu/syscall_aix_ppc64_gc.go
@@ -6,8 +6,8 @@
// system call on AIX without depending on x/sys/unix.
// (See golang.org/issue/32102)
-// +build aix,ppc64
-// +build !gccgo
+//go:build aix && ppc64 && gc
+// +build aix,ppc64,gc
package cpu
diff --git a/vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go b/vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go
new file mode 100644
index 0000000..e07899b
--- /dev/null
+++ b/vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go
@@ -0,0 +1,30 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package unsafeheader contains header declarations for the Go runtime's
+// slice and string implementations.
+//
+// This package allows x/sys to use types equivalent to
+// reflect.SliceHeader and reflect.StringHeader without introducing
+// a dependency on the (relatively heavy) "reflect" package.
+package unsafeheader
+
+import (
+ "unsafe"
+)
+
+// Slice is the runtime representation of a slice.
+// It cannot be used safely or portably and its representation may change in a later release.
+type Slice struct {
+ Data unsafe.Pointer
+ Len int
+ Cap int
+}
+
+// String is the runtime representation of a string.
+// It cannot be used safely or portably and its representation may change in a later release.
+type String struct {
+ Data unsafe.Pointer
+ Len int
+}
diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md
index eb2f78a..579d2d7 100644
--- a/vendor/golang.org/x/sys/unix/README.md
+++ b/vendor/golang.org/x/sys/unix/README.md
@@ -89,7 +89,7 @@ constants.
Adding new syscall numbers is mostly done by running the build on a sufficiently
new installation of the target OS (or updating the source checkouts for the
-new build system). However, depending on the OS, you make need to update the
+new build system). However, depending on the OS, you may need to update the
parsing in mksysnum.
### mksyscall.go
@@ -149,10 +149,21 @@ To add a constant, add the header that includes it to the appropriate variable.
Then, edit the regex (if necessary) to match the desired constant. Avoid making
the regex too broad to avoid matching unintended constants.
+### mkmerge.go
+
+This program is used to extract duplicate const, func, and type declarations
+from the generated architecture-specific files listed below, and merge these
+into a common file for each OS.
+
+The merge is performed in the following steps:
+1. Construct the set of common code that is idential in all architecture-specific files.
+2. Write this common code to the merged file.
+3. Remove the common code from all architecture-specific files.
+
## Generated files
-### `zerror_${GOOS}_${GOARCH}.go`
+### `zerrors_${GOOS}_${GOARCH}.go`
A file containing all of the system's generated error numbers, error strings,
signal numbers, and constants. Generated by `mkerrors.sh` (see above).
diff --git a/vendor/golang.org/x/sys/unix/aliases.go b/vendor/golang.org/x/sys/unix/aliases.go
index 951fce4..abc89c1 100644
--- a/vendor/golang.org/x/sys/unix/aliases.go
+++ b/vendor/golang.org/x/sys/unix/aliases.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
// +build go1.9
package unix
diff --git a/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s b/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s
index 06f84b8..6b4027b 100644
--- a/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s
+++ b/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_386.s b/vendor/golang.org/x/sys/unix/asm_bsd_386.s
index c9a0a26..7f29275 100644
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
+++ b/vendor/golang.org/x/sys/unix/asm_bsd_386.s
@@ -1,14 +1,14 @@
-// Copyright 2009 The Go Authors. All rights reserved.
+// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+//go:build (darwin || freebsd || netbsd || openbsd) && gc
+// +build darwin freebsd netbsd openbsd
+// +build gc
#include "textflag.h"
-//
-// System call support for 386, FreeBSD
-//
+// System call support for 386 BSD
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
@@ -22,7 +22,7 @@ TEXT ·Syscall6(SB),NOSPLIT,$0-40
TEXT ·Syscall9(SB),NOSPLIT,$0-52
JMP syscall·Syscall9(SB)
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
+TEXT ·RawSyscall(SB),NOSPLIT,$0-28
JMP syscall·RawSyscall(SB)
TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s
index 2ede05c..2b99c34 100644
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_bsd_amd64.s
@@ -1,14 +1,14 @@
-// Copyright 2009 The Go Authors. All rights reserved.
+// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+//go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc
+// +build darwin dragonfly freebsd netbsd openbsd
+// +build gc
#include "textflag.h"
-//
-// System call support for AMD64, NetBSD
-//
+// System call support for AMD64 BSD
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_bsd_arm.s
index e892857..98ebfad 100644
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
+++ b/vendor/golang.org/x/sys/unix/asm_bsd_arm.s
@@ -1,14 +1,14 @@
-// Copyright 2013 The Go Authors. All rights reserved.
+// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+//go:build (darwin || freebsd || netbsd || openbsd) && gc
+// +build darwin freebsd netbsd openbsd
+// +build gc
#include "textflag.h"
-//
-// System call support for ARM, NetBSD
-//
+// System call support for ARM BSD
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s b/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s
index 6321421..fe36a73 100644
--- a/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_bsd_arm64.s
@@ -1,14 +1,14 @@
-// Copyright 2009 The Go Authors. All rights reserved.
+// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+//go:build (darwin || freebsd || netbsd || openbsd) && gc
+// +build darwin freebsd netbsd openbsd
+// +build gc
#include "textflag.h"
-//
-// System call support for AMD64, Darwin
-//
+// System call support for ARM64 BSD
// Just jump to package syscall's implementation for all these functions.
// The runtime may know about them.
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_386.s b/vendor/golang.org/x/sys/unix/asm_darwin_386.s
deleted file mode 100644
index 8a72783..0000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
deleted file mode 100644
index 333242d..0000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-// +build arm,darwin
-
-#include "textflag.h"
-
-//
-// System call support for ARM, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
deleted file mode 100644
index 97e0174..0000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-// +build arm64,darwin
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s b/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
deleted file mode 100644
index 603dd57..0000000
--- a/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, DragonFly
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
deleted file mode 100644
index 3517247..0000000
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s b/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
deleted file mode 100644
index 9227c87..0000000
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s b/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s
deleted file mode 100644
index d9318cb..0000000
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2018 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM64, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_386.s b/vendor/golang.org/x/sys/unix/asm_linux_386.s
index 448bebb..0655ecb 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_386.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_amd64.s b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
index c6468a9..bc3fb6a 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm.s b/vendor/golang.org/x/sys/unix/asm_linux_arm.s
index cf0f357..55b13c7 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_arm.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm64.s b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
index afe6fdf..22a83d8 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
@@ -4,7 +4,7 @@
// +build linux
// +build arm64
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
index ab9d638..dc222b9 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
@@ -4,7 +4,7 @@
// +build linux
// +build mips64 mips64le
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s b/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
index 99e5399..d333f13 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
@@ -4,7 +4,7 @@
// +build linux
// +build mips mipsle
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
index 88f7125..459a629 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
@@ -4,7 +4,7 @@
// +build linux
// +build ppc64 ppc64le
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s b/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
index 3cfefed..04d3849 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build riscv64,!gccgo
+// +build riscv64,gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_s390x.s b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
index a5a863c..cc30398 100644
--- a/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
+++ b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
@@ -4,7 +4,7 @@
// +build s390x
// +build linux
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_386.s b/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
deleted file mode 100644
index 48bdcd7..0000000
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s b/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
deleted file mode 100644
index 6f98ba5..0000000
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM64, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_386.s b/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
deleted file mode 100644
index 00576f3..0000000
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
deleted file mode 100644
index 790ef77..0000000
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
deleted file mode 100644
index 469bfa1..0000000
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s
index 0cedea3..47c93fc 100644
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s
+++ b/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+// +build gc
#include "textflag.h"
//
-// System call support for arm64, OpenBSD
+// System call support for mips64, OpenBSD
//
// Just jump to package syscall's implementation for all these functions.
diff --git a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
index ded8260..1f2c755 100644
--- a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
+++ b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !gccgo
+// +build gc
#include "textflag.h"
diff --git a/vendor/golang.org/x/sys/unix/asm_zos_s390x.s b/vendor/golang.org/x/sys/unix/asm_zos_s390x.s
new file mode 100644
index 0000000..3b54e18
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/asm_zos_s390x.s
@@ -0,0 +1,426 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build zos && s390x && gc
+// +build zos
+// +build s390x
+// +build gc
+
+#include "textflag.h"
+
+#define PSALAA 1208(R0)
+#define GTAB64(x) 80(x)
+#define LCA64(x) 88(x)
+#define CAA(x) 8(x)
+#define EDCHPXV(x) 1016(x) // in the CAA
+#define SAVSTACK_ASYNC(x) 336(x) // in the LCA
+
+// SS_*, where x=SAVSTACK_ASYNC
+#define SS_LE(x) 0(x)
+#define SS_GO(x) 8(x)
+#define SS_ERRNO(x) 16(x)
+#define SS_ERRNOJR(x) 20(x)
+
+#define LE_CALL BYTE $0x0D; BYTE $0x76; // BL R7, R6
+
+TEXT ·clearErrno(SB),NOSPLIT,$0-0
+ BL addrerrno<>(SB)
+ MOVD $0, 0(R3)
+ RET
+
+// Returns the address of errno in R3.
+TEXT addrerrno<>(SB),NOSPLIT|NOFRAME,$0-0
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get __errno FuncDesc.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ ADD $(0x156*16), R9
+ LMG 0(R9), R5, R6
+
+ // Switch to saved LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Call __errno function.
+ LE_CALL
+ NOPH
+
+ // Switch back to Go stack.
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+ RET
+
+TEXT ·syscall_syscall(SB),NOSPLIT,$0-56
+ BL runtime·entersyscall(SB)
+ MOVD a1+8(FP), R1
+ MOVD a2+16(FP), R2
+ MOVD a3+24(FP), R3
+
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get function.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ MOVD trap+0(FP), R5
+ SLD $4, R5
+ ADD R5, R9
+ LMG 0(R9), R5, R6
+
+ // Restore LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Call function.
+ LE_CALL
+ NOPH
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+
+ MOVD R3, r1+32(FP)
+ MOVD R0, r2+40(FP)
+ MOVD R0, err+48(FP)
+ MOVW R3, R4
+ CMP R4, $-1
+ BNE done
+ BL addrerrno<>(SB)
+ MOVWZ 0(R3), R3
+ MOVD R3, err+48(FP)
+done:
+ BL runtime·exitsyscall(SB)
+ RET
+
+TEXT ·syscall_rawsyscall(SB),NOSPLIT,$0-56
+ MOVD a1+8(FP), R1
+ MOVD a2+16(FP), R2
+ MOVD a3+24(FP), R3
+
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get function.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ MOVD trap+0(FP), R5
+ SLD $4, R5
+ ADD R5, R9
+ LMG 0(R9), R5, R6
+
+ // Restore LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Call function.
+ LE_CALL
+ NOPH
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+
+ MOVD R3, r1+32(FP)
+ MOVD R0, r2+40(FP)
+ MOVD R0, err+48(FP)
+ MOVW R3, R4
+ CMP R4, $-1
+ BNE done
+ BL addrerrno<>(SB)
+ MOVWZ 0(R3), R3
+ MOVD R3, err+48(FP)
+done:
+ RET
+
+TEXT ·syscall_syscall6(SB),NOSPLIT,$0-80
+ BL runtime·entersyscall(SB)
+ MOVD a1+8(FP), R1
+ MOVD a2+16(FP), R2
+ MOVD a3+24(FP), R3
+
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get function.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ MOVD trap+0(FP), R5
+ SLD $4, R5
+ ADD R5, R9
+ LMG 0(R9), R5, R6
+
+ // Restore LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Fill in parameter list.
+ MOVD a4+32(FP), R12
+ MOVD R12, (2176+24)(R4)
+ MOVD a5+40(FP), R12
+ MOVD R12, (2176+32)(R4)
+ MOVD a6+48(FP), R12
+ MOVD R12, (2176+40)(R4)
+
+ // Call function.
+ LE_CALL
+ NOPH
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+
+ MOVD R3, r1+56(FP)
+ MOVD R0, r2+64(FP)
+ MOVD R0, err+72(FP)
+ MOVW R3, R4
+ CMP R4, $-1
+ BNE done
+ BL addrerrno<>(SB)
+ MOVWZ 0(R3), R3
+ MOVD R3, err+72(FP)
+done:
+ BL runtime·exitsyscall(SB)
+ RET
+
+TEXT ·syscall_rawsyscall6(SB),NOSPLIT,$0-80
+ MOVD a1+8(FP), R1
+ MOVD a2+16(FP), R2
+ MOVD a3+24(FP), R3
+
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get function.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ MOVD trap+0(FP), R5
+ SLD $4, R5
+ ADD R5, R9
+ LMG 0(R9), R5, R6
+
+ // Restore LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Fill in parameter list.
+ MOVD a4+32(FP), R12
+ MOVD R12, (2176+24)(R4)
+ MOVD a5+40(FP), R12
+ MOVD R12, (2176+32)(R4)
+ MOVD a6+48(FP), R12
+ MOVD R12, (2176+40)(R4)
+
+ // Call function.
+ LE_CALL
+ NOPH
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+
+ MOVD R3, r1+56(FP)
+ MOVD R0, r2+64(FP)
+ MOVD R0, err+72(FP)
+ MOVW R3, R4
+ CMP R4, $-1
+ BNE done
+ BL ·rrno<>(SB)
+ MOVWZ 0(R3), R3
+ MOVD R3, err+72(FP)
+done:
+ RET
+
+TEXT ·syscall_syscall9(SB),NOSPLIT,$0
+ BL runtime·entersyscall(SB)
+ MOVD a1+8(FP), R1
+ MOVD a2+16(FP), R2
+ MOVD a3+24(FP), R3
+
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get function.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ MOVD trap+0(FP), R5
+ SLD $4, R5
+ ADD R5, R9
+ LMG 0(R9), R5, R6
+
+ // Restore LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Fill in parameter list.
+ MOVD a4+32(FP), R12
+ MOVD R12, (2176+24)(R4)
+ MOVD a5+40(FP), R12
+ MOVD R12, (2176+32)(R4)
+ MOVD a6+48(FP), R12
+ MOVD R12, (2176+40)(R4)
+ MOVD a7+56(FP), R12
+ MOVD R12, (2176+48)(R4)
+ MOVD a8+64(FP), R12
+ MOVD R12, (2176+56)(R4)
+ MOVD a9+72(FP), R12
+ MOVD R12, (2176+64)(R4)
+
+ // Call function.
+ LE_CALL
+ NOPH
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+
+ MOVD R3, r1+80(FP)
+ MOVD R0, r2+88(FP)
+ MOVD R0, err+96(FP)
+ MOVW R3, R4
+ CMP R4, $-1
+ BNE done
+ BL addrerrno<>(SB)
+ MOVWZ 0(R3), R3
+ MOVD R3, err+96(FP)
+done:
+ BL runtime·exitsyscall(SB)
+ RET
+
+TEXT ·syscall_rawsyscall9(SB),NOSPLIT,$0
+ MOVD a1+8(FP), R1
+ MOVD a2+16(FP), R2
+ MOVD a3+24(FP), R3
+
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get function.
+ MOVD CAA(R8), R9
+ MOVD EDCHPXV(R9), R9
+ MOVD trap+0(FP), R5
+ SLD $4, R5
+ ADD R5, R9
+ LMG 0(R9), R5, R6
+
+ // Restore LE stack.
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R4
+ MOVD $0, 0(R9)
+
+ // Fill in parameter list.
+ MOVD a4+32(FP), R12
+ MOVD R12, (2176+24)(R4)
+ MOVD a5+40(FP), R12
+ MOVD R12, (2176+32)(R4)
+ MOVD a6+48(FP), R12
+ MOVD R12, (2176+40)(R4)
+ MOVD a7+56(FP), R12
+ MOVD R12, (2176+48)(R4)
+ MOVD a8+64(FP), R12
+ MOVD R12, (2176+56)(R4)
+ MOVD a9+72(FP), R12
+ MOVD R12, (2176+64)(R4)
+
+ // Call function.
+ LE_CALL
+ NOPH
+ XOR R0, R0 // Restore R0 to $0.
+ MOVD R4, 0(R9) // Save stack pointer.
+
+ MOVD R3, r1+80(FP)
+ MOVD R0, r2+88(FP)
+ MOVD R0, err+96(FP)
+ MOVW R3, R4
+ CMP R4, $-1
+ BNE done
+ BL addrerrno<>(SB)
+ MOVWZ 0(R3), R3
+ MOVD R3, err+96(FP)
+done:
+ RET
+
+// func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64)
+TEXT ·svcCall(SB),NOSPLIT,$0
+ BL runtime·save_g(SB) // Save g and stack pointer
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD R15, 0(R9)
+
+ MOVD argv+8(FP), R1 // Move function arguments into registers
+ MOVD dsa+16(FP), g
+ MOVD fnptr+0(FP), R15
+
+ BYTE $0x0D // Branch to function
+ BYTE $0xEF
+
+ BL runtime·load_g(SB) // Restore g and stack pointer
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+ MOVD SAVSTACK_ASYNC(R8), R9
+ MOVD 0(R9), R15
+
+ RET
+
+// func svcLoad(name *byte) unsafe.Pointer
+TEXT ·svcLoad(SB),NOSPLIT,$0
+ MOVD R15, R2 // Save go stack pointer
+ MOVD name+0(FP), R0 // Move SVC args into registers
+ MOVD $0x80000000, R1
+ MOVD $0, R15
+ BYTE $0x0A // SVC 08 LOAD
+ BYTE $0x08
+ MOVW R15, R3 // Save return code from SVC
+ MOVD R2, R15 // Restore go stack pointer
+ CMP R3, $0 // Check SVC return code
+ BNE error
+
+ MOVD $-2, R3 // Reset last bit of entry point to zero
+ AND R0, R3
+ MOVD R3, addr+8(FP) // Return entry point returned by SVC
+ CMP R0, R3 // Check if last bit of entry point was set
+ BNE done
+
+ MOVD R15, R2 // Save go stack pointer
+ MOVD $0, R15 // Move SVC args into registers (entry point still in r0 from SVC 08)
+ BYTE $0x0A // SVC 09 DELETE
+ BYTE $0x09
+ MOVD R2, R15 // Restore go stack pointer
+
+error:
+ MOVD $0, addr+8(FP) // Return 0 on failure
+done:
+ XOR R0, R0 // Reset r0 to 0
+ RET
+
+// func svcUnload(name *byte, fnptr unsafe.Pointer) int64
+TEXT ·svcUnload(SB),NOSPLIT,$0
+ MOVD R15, R2 // Save go stack pointer
+ MOVD name+0(FP), R0 // Move SVC args into registers
+ MOVD addr+8(FP), R15
+ BYTE $0x0A // SVC 09
+ BYTE $0x09
+ XOR R0, R0 // Reset r0 to 0
+ MOVD R15, R1 // Save SVC return code
+ MOVD R2, R15 // Restore go stack pointer
+ MOVD R1, rc+0(FP) // Return SVC return code
+ RET
+
+// func gettid() uint64
+TEXT ·gettid(SB), NOSPLIT, $0
+ // Get library control area (LCA).
+ MOVW PSALAA, R8
+ MOVD LCA64(R8), R8
+
+ // Get CEECAATHDID
+ MOVD CAA(R8), R9
+ MOVD 0x3D0(R9), R9
+ MOVD R9, ret+0(FP)
+
+ RET
diff --git a/vendor/golang.org/x/sys/unix/cap_freebsd.go b/vendor/golang.org/x/sys/unix/cap_freebsd.go
index df52048..0b7c6ad 100644
--- a/vendor/golang.org/x/sys/unix/cap_freebsd.go
+++ b/vendor/golang.org/x/sys/unix/cap_freebsd.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build freebsd
// +build freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/constants.go b/vendor/golang.org/x/sys/unix/constants.go
index 3a6ac64..394a396 100644
--- a/vendor/golang.org/x/sys/unix/constants.go
+++ b/vendor/golang.org/x/sys/unix/constants.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package unix
diff --git a/vendor/golang.org/x/sys/unix/dev_aix_ppc.go b/vendor/golang.org/x/sys/unix/dev_aix_ppc.go
index 5e5fb45..65a9985 100644
--- a/vendor/golang.org/x/sys/unix/dev_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/dev_aix_ppc.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix
-// +build ppc
+//go:build aix && ppc
+// +build aix,ppc
// Functions to access/create device major and minor numbers matching the
// encoding used by AIX.
diff --git a/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go b/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
index 8b40124..8fc08ad 100644
--- a/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix
-// +build ppc64
+//go:build aix && ppc64
+// +build aix,ppc64
// Functions to access/create device major and minor numbers matching the
// encoding used AIX.
diff --git a/vendor/golang.org/x/sys/unix/dev_zos.go b/vendor/golang.org/x/sys/unix/dev_zos.go
new file mode 100644
index 0000000..a388e59
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/dev_zos.go
@@ -0,0 +1,29 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build zos && s390x
+// +build zos,s390x
+
+// Functions to access/create device major and minor numbers matching the
+// encoding used by z/OS.
+//
+// The information below is extracted and adapted from <sys/stat.h> macros.
+
+package unix
+
+// Major returns the major component of a z/OS device number.
+func Major(dev uint64) uint32 {
+ return uint32((dev >> 16) & 0x0000FFFF)
+}
+
+// Minor returns the minor component of a z/OS device number.
+func Minor(dev uint64) uint32 {
+ return uint32(dev & 0x0000FFFF)
+}
+
+// Mkdev returns a z/OS device number generated from the given major and minor
+// components.
+func Mkdev(major, minor uint32) uint64 {
+ return (uint64(major) << 16) | uint64(minor)
+}
diff --git a/vendor/golang.org/x/sys/unix/dirent.go b/vendor/golang.org/x/sys/unix/dirent.go
index 304016b..e74e5ea 100644
--- a/vendor/golang.org/x/sys/unix/dirent.go
+++ b/vendor/golang.org/x/sys/unix/dirent.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
diff --git a/vendor/golang.org/x/sys/unix/endian_big.go b/vendor/golang.org/x/sys/unix/endian_big.go
index 5e92690..a520265 100644
--- a/vendor/golang.org/x/sys/unix/endian_big.go
+++ b/vendor/golang.org/x/sys/unix/endian_big.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
-// +build ppc64 s390x mips mips64
+//go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
+// +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64
package unix
diff --git a/vendor/golang.org/x/sys/unix/endian_little.go b/vendor/golang.org/x/sys/unix/endian_little.go
index bcdb5d3..4362f47 100644
--- a/vendor/golang.org/x/sys/unix/endian_little.go
+++ b/vendor/golang.org/x/sys/unix/endian_little.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
-// +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le riscv64
+//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
+// +build 386 amd64 amd64p32 alpha arm arm64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
package unix
diff --git a/vendor/golang.org/x/sys/unix/env_unix.go b/vendor/golang.org/x/sys/unix/env_unix.go
index 84178b0..29ccc4d 100644
--- a/vendor/golang.org/x/sys/unix/env_unix.go
+++ b/vendor/golang.org/x/sys/unix/env_unix.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
// Unix environment variables.
diff --git a/vendor/golang.org/x/sys/unix/epoll_zos.go b/vendor/golang.org/x/sys/unix/epoll_zos.go
new file mode 100644
index 0000000..cedaf7e
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/epoll_zos.go
@@ -0,0 +1,221 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build zos && s390x
+// +build zos,s390x
+
+package unix
+
+import (
+ "sync"
+)
+
+// This file simulates epoll on z/OS using poll.
+
+// Analogous to epoll_event on Linux.
+// TODO(neeilan): Pad is because the Linux kernel expects a 96-bit struct. We never pass this to the kernel; remove?
+type EpollEvent struct {
+ Events uint32
+ Fd int32
+ Pad int32
+}
+
+const (
+ EPOLLERR = 0x8
+ EPOLLHUP = 0x10
+ EPOLLIN = 0x1
+ EPOLLMSG = 0x400
+ EPOLLOUT = 0x4
+ EPOLLPRI = 0x2
+ EPOLLRDBAND = 0x80
+ EPOLLRDNORM = 0x40
+ EPOLLWRBAND = 0x200
+ EPOLLWRNORM = 0x100
+ EPOLL_CTL_ADD = 0x1
+ EPOLL_CTL_DEL = 0x2
+ EPOLL_CTL_MOD = 0x3
+ // The following constants are part of the epoll API, but represent
+ // currently unsupported functionality on z/OS.
+ // EPOLL_CLOEXEC = 0x80000
+ // EPOLLET = 0x80000000
+ // EPOLLONESHOT = 0x40000000
+ // EPOLLRDHUP = 0x2000 // Typically used with edge-triggered notis
+ // EPOLLEXCLUSIVE = 0x10000000 // Exclusive wake-up mode
+ // EPOLLWAKEUP = 0x20000000 // Relies on Linux's BLOCK_SUSPEND capability
+)
+
+// TODO(neeilan): We can eliminate these epToPoll / pToEpoll calls by using identical mask values for POLL/EPOLL
+// constants where possible The lower 16 bits of epoll events (uint32) can fit any system poll event (int16).
+
+// epToPollEvt converts epoll event field to poll equivalent.
+// In epoll, Events is a 32-bit field, while poll uses 16 bits.
+func epToPollEvt(events uint32) int16 {
+ var ep2p = map[uint32]int16{
+ EPOLLIN: POLLIN,
+ EPOLLOUT: POLLOUT,
+ EPOLLHUP: POLLHUP,
+ EPOLLPRI: POLLPRI,
+ EPOLLERR: POLLERR,
+ }
+
+ var pollEvts int16 = 0
+ for epEvt, pEvt := range ep2p {
+ if (events & epEvt) != 0 {
+ pollEvts |= pEvt
+ }
+ }
+
+ return pollEvts
+}
+
+// pToEpollEvt converts 16 bit poll event bitfields to 32-bit epoll event fields.
+func pToEpollEvt(revents int16) uint32 {
+ var p2ep = map[int16]uint32{
+ POLLIN: EPOLLIN,
+ POLLOUT: EPOLLOUT,
+ POLLHUP: EPOLLHUP,
+ POLLPRI: EPOLLPRI,
+ POLLERR: EPOLLERR,
+ }
+
+ var epollEvts uint32 = 0
+ for pEvt, epEvt := range p2ep {
+ if (revents & pEvt) != 0 {
+ epollEvts |= epEvt
+ }
+ }
+
+ return epollEvts
+}
+
+// Per-process epoll implementation.
+type epollImpl struct {
+ mu sync.Mutex
+ epfd2ep map[int]*eventPoll
+ nextEpfd int
+}
+
+// eventPoll holds a set of file descriptors being watched by the process. A process can have multiple epoll instances.
+// On Linux, this is an in-kernel data structure accessed through a fd.
+type eventPoll struct {
+ mu sync.Mutex
+ fds map[int]*EpollEvent
+}
+
+// epoll impl for this process.
+var impl epollImpl = epollImpl{
+ epfd2ep: make(map[int]*eventPoll),
+ nextEpfd: 0,
+}
+
+func (e *epollImpl) epollcreate(size int) (epfd int, err error) {
+ e.mu.Lock()
+ defer e.mu.Unlock()
+ epfd = e.nextEpfd
+ e.nextEpfd++
+
+ e.epfd2ep[epfd] = &eventPoll{
+ fds: make(map[int]*EpollEvent),
+ }
+ return epfd, nil
+}
+
+func (e *epollImpl) epollcreate1(flag int) (fd int, err error) {
+ return e.epollcreate(4)
+}
+
+func (e *epollImpl) epollctl(epfd int, op int, fd int, event *EpollEvent) (err error) {
+ e.mu.Lock()
+ defer e.mu.Unlock()
+
+ ep, ok := e.epfd2ep[epfd]
+ if !ok {
+
+ return EBADF
+ }
+
+ switch op {
+ case EPOLL_CTL_ADD:
+ // TODO(neeilan): When we make epfds and fds disjoint, detect epoll
+ // loops here (instances watching each other) and return ELOOP.
+ if _, ok := ep.fds[fd]; ok {
+ return EEXIST
+ }
+ ep.fds[fd] = event
+ case EPOLL_CTL_MOD:
+ if _, ok := ep.fds[fd]; !ok {
+ return ENOENT
+ }
+ ep.fds[fd] = event
+ case EPOLL_CTL_DEL:
+ if _, ok := ep.fds[fd]; !ok {
+ return ENOENT
+ }
+ delete(ep.fds, fd)
+
+ }
+ return nil
+}
+
+// Must be called while holding ep.mu
+func (ep *eventPoll) getFds() []int {
+ fds := make([]int, len(ep.fds))
+ for fd := range ep.fds {
+ fds = append(fds, fd)
+ }
+ return fds
+}
+
+func (e *epollImpl) epollwait(epfd int, events []EpollEvent, msec int) (n int, err error) {
+ e.mu.Lock() // in [rare] case of concurrent epollcreate + epollwait
+ ep, ok := e.epfd2ep[epfd]
+
+ if !ok {
+ e.mu.Unlock()
+ return 0, EBADF
+ }
+
+ pollfds := make([]PollFd, 4)
+ for fd, epollevt := range ep.fds {
+ pollfds = append(pollfds, PollFd{Fd: int32(fd), Events: epToPollEvt(epollevt.Events)})
+ }
+ e.mu.Unlock()
+
+ n, err = Poll(pollfds, msec)
+ if err != nil {
+ return n, err
+ }
+
+ i := 0
+ for _, pFd := range pollfds {
+ if pFd.Revents != 0 {
+ events[i] = EpollEvent{Fd: pFd.Fd, Events: pToEpollEvt(pFd.Revents)}
+ i++
+ }
+
+ if i == n {
+ break
+ }
+ }
+
+ return n, nil
+}
+
+func EpollCreate(size int) (fd int, err error) {
+ return impl.epollcreate(size)
+}
+
+func EpollCreate1(flag int) (fd int, err error) {
+ return impl.epollcreate1(flag)
+}
+
+func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
+ return impl.epollctl(epfd, op, fd, event)
+}
+
+// Because EpollWait mutates events, the caller is expected to coordinate
+// concurrent access if calling with the same epfd from multiple goroutines.
+func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
+ return impl.epollwait(epfd, events, msec)
+}
diff --git a/vendor/golang.org/x/sys/unix/errors_freebsd_386.go b/vendor/golang.org/x/sys/unix/errors_freebsd_386.go
index c56bc8b..761db66 100644
--- a/vendor/golang.org/x/sys/unix/errors_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/errors_freebsd_386.go
@@ -8,6 +8,7 @@
package unix
const (
+ DLT_HHDLC = 0x79
IFF_SMART = 0x20
IFT_1822 = 0x2
IFT_A12MPPSWITCH = 0x82
@@ -210,13 +211,18 @@ const (
IFT_XETHER = 0x1a
IPPROTO_MAXID = 0x34
IPV6_FAITH = 0x1d
+ IPV6_MIN_MEMBERSHIPS = 0x1f
IP_FAITH = 0x16
+ IP_MAX_SOURCE_FILTER = 0x400
+ IP_MIN_MEMBERSHIPS = 0x1f
MAP_NORESERVE = 0x40
MAP_RENAME = 0x20
NET_RT_MAXID = 0x6
RTF_PRCLONING = 0x10000
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
+ RT_CACHING_CONTEXT = 0x1
+ RT_NORTREF = 0x2
SIOCADDRT = 0x8030720a
SIOCALIFADDR = 0x8118691b
SIOCDELRT = 0x8030720b
diff --git a/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
index 3e97711..070f44b 100644
--- a/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go
@@ -8,6 +8,7 @@
package unix
const (
+ DLT_HHDLC = 0x79
IFF_SMART = 0x20
IFT_1822 = 0x2
IFT_A12MPPSWITCH = 0x82
@@ -210,13 +211,18 @@ const (
IFT_XETHER = 0x1a
IPPROTO_MAXID = 0x34
IPV6_FAITH = 0x1d
+ IPV6_MIN_MEMBERSHIPS = 0x1f
IP_FAITH = 0x16
+ IP_MAX_SOURCE_FILTER = 0x400
+ IP_MIN_MEMBERSHIPS = 0x1f
MAP_NORESERVE = 0x40
MAP_RENAME = 0x20
NET_RT_MAXID = 0x6
RTF_PRCLONING = 0x10000
RTM_OLDADD = 0x9
RTM_OLDDEL = 0xa
+ RT_CACHING_CONTEXT = 0x1
+ RT_NORTREF = 0x2
SIOCADDRT = 0x8040720a
SIOCALIFADDR = 0x8118691b
SIOCDELRT = 0x8040720b
diff --git a/vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go
new file mode 100644
index 0000000..946dcf3
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go
@@ -0,0 +1,17 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Constants that were deprecated or moved to enums in the FreeBSD headers. Keep
+// them here for backwards compatibility.
+
+package unix
+
+const (
+ DLT_HHDLC = 0x79
+ IPV6_MIN_MEMBERSHIPS = 0x1f
+ IP_MAX_SOURCE_FILTER = 0x400
+ IP_MIN_MEMBERSHIPS = 0x1f
+ RT_CACHING_CONTEXT = 0x1
+ RT_NORTREF = 0x2
+)
diff --git a/vendor/golang.org/x/sys/unix/fcntl.go b/vendor/golang.org/x/sys/unix/fcntl.go
index 4dc5348..e9b9912 100644
--- a/vendor/golang.org/x/sys/unix/fcntl.go
+++ b/vendor/golang.org/x/sys/unix/fcntl.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build dragonfly || freebsd || linux || netbsd || openbsd
// +build dragonfly freebsd linux netbsd openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/fcntl_darwin.go b/vendor/golang.org/x/sys/unix/fcntl_darwin.go
index 5868a4a..a9911c7 100644
--- a/vendor/golang.org/x/sys/unix/fcntl_darwin.go
+++ b/vendor/golang.org/x/sys/unix/fcntl_darwin.go
@@ -16,3 +16,9 @@ func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
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
+}
diff --git a/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go b/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go
index fc0e50e..29d4480 100644
--- a/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go
+++ b/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go
@@ -1,9 +1,10 @@
-// +build linux,386 linux,arm linux,mips linux,mipsle
-
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc)
+// +build linux,386 linux,arm linux,mips linux,mipsle linux,ppc
+
package unix
func init() {
diff --git a/vendor/golang.org/x/sys/unix/fdset.go b/vendor/golang.org/x/sys/unix/fdset.go
index b27be0a..b1e07b2 100644
--- a/vendor/golang.org/x/sys/unix/fdset.go
+++ b/vendor/golang.org/x/sys/unix/fdset.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
diff --git a/vendor/golang.org/x/sys/unix/fstatfs_zos.go b/vendor/golang.org/x/sys/unix/fstatfs_zos.go
new file mode 100644
index 0000000..e377cc9
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/fstatfs_zos.go
@@ -0,0 +1,164 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build zos && s390x
+// +build zos,s390x
+
+package unix
+
+import (
+ "unsafe"
+)
+
+// This file simulates fstatfs on z/OS using fstatvfs and w_getmntent.
+
+func Fstatfs(fd int, stat *Statfs_t) (err error) {
+ var stat_v Statvfs_t
+ err = Fstatvfs(fd, &stat_v)
+ if err == nil {
+ // populate stat
+ stat.Type = 0
+ stat.Bsize = stat_v.Bsize
+ stat.Blocks = stat_v.Blocks
+ stat.Bfree = stat_v.Bfree
+ stat.Bavail = stat_v.Bavail
+ stat.Files = stat_v.Files
+ stat.Ffree = stat_v.Ffree
+ stat.Fsid = stat_v.Fsid
+ stat.Namelen = stat_v.Namemax
+ stat.Frsize = stat_v.Frsize
+ stat.Flags = stat_v.Flag
+ for passn := 0; passn < 5; passn++ {
+ switch passn {
+ case 0:
+ err = tryGetmntent64(stat)
+ break
+ case 1:
+ err = tryGetmntent128(stat)
+ break
+ case 2:
+ err = tryGetmntent256(stat)
+ break
+ case 3:
+ err = tryGetmntent512(stat)
+ break
+ case 4:
+ err = tryGetmntent1024(stat)
+ break
+ default:
+ break
+ }
+ //proceed to return if: err is nil (found), err is nonnil but not ERANGE (another error occurred)
+ if err == nil || err != nil && err != ERANGE {
+ break
+ }
+ }
+ }
+ return err
+}
+
+func tryGetmntent64(stat *Statfs_t) (err error) {
+ var mnt_ent_buffer struct {
+ header W_Mnth
+ filesys_info [64]W_Mntent
+ }
+ var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
+ fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
+ if err != nil {
+ return err
+ }
+ err = ERANGE //return ERANGE if no match is found in this batch
+ for i := 0; i < fs_count; i++ {
+ if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
+ stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
+ err = nil
+ break
+ }
+ }
+ return err
+}
+
+func tryGetmntent128(stat *Statfs_t) (err error) {
+ var mnt_ent_buffer struct {
+ header W_Mnth
+ filesys_info [128]W_Mntent
+ }
+ var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
+ fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
+ if err != nil {
+ return err
+ }
+ err = ERANGE //return ERANGE if no match is found in this batch
+ for i := 0; i < fs_count; i++ {
+ if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
+ stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
+ err = nil
+ break
+ }
+ }
+ return err
+}
+
+func tryGetmntent256(stat *Statfs_t) (err error) {
+ var mnt_ent_buffer struct {
+ header W_Mnth
+ filesys_info [256]W_Mntent
+ }
+ var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
+ fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
+ if err != nil {
+ return err
+ }
+ err = ERANGE //return ERANGE if no match is found in this batch
+ for i := 0; i < fs_count; i++ {
+ if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
+ stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
+ err = nil
+ break
+ }
+ }
+ return err
+}
+
+func tryGetmntent512(stat *Statfs_t) (err error) {
+ var mnt_ent_buffer struct {
+ header W_Mnth
+ filesys_info [512]W_Mntent
+ }
+ var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
+ fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
+ if err != nil {
+ return err
+ }
+ err = ERANGE //return ERANGE if no match is found in this batch
+ for i := 0; i < fs_count; i++ {
+ if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
+ stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
+ err = nil
+ break
+ }
+ }
+ return err
+}
+
+func tryGetmntent1024(stat *Statfs_t) (err error) {
+ var mnt_ent_buffer struct {
+ header W_Mnth
+ filesys_info [1024]W_Mntent
+ }
+ var buffer_size int = int(unsafe.Sizeof(mnt_ent_buffer))
+ fs_count, err := W_Getmntent((*byte)(unsafe.Pointer(&mnt_ent_buffer)), buffer_size)
+ if err != nil {
+ return err
+ }
+ err = ERANGE //return ERANGE if no match is found in this batch
+ for i := 0; i < fs_count; i++ {
+ if stat.Fsid == uint64(mnt_ent_buffer.filesys_info[i].Dev) {
+ stat.Type = uint32(mnt_ent_buffer.filesys_info[i].Fstname[0])
+ err = nil
+ break
+ }
+ }
+ return err
+}
diff --git a/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go
index cd6f5a6..0dee232 100644
--- a/vendor/golang.org/x/sys/unix/gccgo.go
+++ b/vendor/golang.org/x/sys/unix/gccgo.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build gccgo
-// +build !aix
+//go:build gccgo && !aix
+// +build gccgo,!aix
package unix
@@ -12,10 +12,8 @@ import "syscall"
// 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.
-//extern gccgoRealSyscallNoError
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 SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) {
diff --git a/vendor/golang.org/x/sys/unix/gccgo_c.c b/vendor/golang.org/x/sys/unix/gccgo_c.c
index c44730c..2cb1fef 100644
--- a/vendor/golang.org/x/sys/unix/gccgo_c.c
+++ b/vendor/golang.org/x/sys/unix/gccgo_c.c
@@ -21,6 +21,9 @@ struct ret {
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
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;
}
+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
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)
{
diff --git a/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
index 251a977..e60e49a 100644
--- a/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build gccgo && linux && amd64
// +build gccgo,linux,amd64
package unix
diff --git a/vendor/golang.org/x/sys/unix/ioctl.go b/vendor/golang.org/x/sys/unix/ioctl.go
index 3559e5d..6c7ad05 100644
--- a/vendor/golang.org/x/sys/unix/ioctl.go
+++ b/vendor/golang.org/x/sys/unix/ioctl.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
@@ -20,6 +21,15 @@ func IoctlSetInt(fd int, req uint, value int) error {
return ioctl(fd, req, uintptr(value))
}
+// IoctlSetPointerInt performs an ioctl operation which sets an
+// integer value on fd, using the specified request number. The ioctl
+// argument is called with a pointer to the integer value, rather than
+// passing the integer value directly.
+func IoctlSetPointerInt(fd int, req uint, value int) error {
+ v := int32(value)
+ return ioctl(fd, req, uintptr(unsafe.Pointer(&v)))
+}
+
// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
//
// To change fd's window size, the req argument should be TIOCSWINSZ.
diff --git a/vendor/golang.org/x/sys/unix/ioctl_linux.go b/vendor/golang.org/x/sys/unix/ioctl_linux.go
new file mode 100644
index 0000000..48773f7
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ioctl_linux.go
@@ -0,0 +1,196 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package unix
+
+import (
+ "runtime"
+ "unsafe"
+)
+
+// IoctlRetInt performs an ioctl operation specified by req on a device
+// associated with opened file descriptor fd, and returns a non-negative
+// integer that is returned by the ioctl syscall.
+func IoctlRetInt(fd int, req uint) (int, error) {
+ ret, _, err := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), 0)
+ if err != 0 {
+ return 0, err
+ }
+ return int(ret), nil
+}
+
+func IoctlGetUint32(fd int, req uint) (uint32, error) {
+ var value uint32
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return value, err
+}
+
+func IoctlGetRTCTime(fd int) (*RTCTime, error) {
+ var value RTCTime
+ err := ioctl(fd, RTC_RD_TIME, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
+func IoctlSetRTCTime(fd int, value *RTCTime) error {
+ err := ioctl(fd, RTC_SET_TIME, uintptr(unsafe.Pointer(value)))
+ runtime.KeepAlive(value)
+ return err
+}
+
+func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) {
+ var value RTCWkAlrm
+ err := ioctl(fd, RTC_WKALM_RD, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
+func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error {
+ err := ioctl(fd, RTC_WKALM_SET, uintptr(unsafe.Pointer(value)))
+ runtime.KeepAlive(value)
+ return err
+}
+
+type ifreqEthtool struct {
+ name [IFNAMSIZ]byte
+ data unsafe.Pointer
+}
+
+// IoctlGetEthtoolDrvinfo fetches ethtool driver information for the network
+// device specified by ifname.
+func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) {
+ // Leave room for terminating NULL byte.
+ if len(ifname) >= IFNAMSIZ {
+ return nil, EINVAL
+ }
+
+ value := EthtoolDrvinfo{
+ Cmd: ETHTOOL_GDRVINFO,
+ }
+ ifreq := ifreqEthtool{
+ data: unsafe.Pointer(&value),
+ }
+ copy(ifreq.name[:], ifname)
+ err := ioctl(fd, SIOCETHTOOL, uintptr(unsafe.Pointer(&ifreq)))
+ runtime.KeepAlive(ifreq)
+ 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
+}
+
+// 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)
+}
+
+// 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))
+}
+
+type FileDedupeRange struct {
+ Src_offset uint64
+ Src_length uint64
+ Reserved1 uint16
+ Reserved2 uint32
+ Info []FileDedupeRangeInfo
+}
+
+type FileDedupeRangeInfo struct {
+ Dest_fd int64
+ Dest_offset uint64
+ Bytes_deduped uint64
+ Status int32
+ Reserved uint32
+}
+
+// IoctlFileDedupeRange performs an FIDEDUPERANGE ioctl operation to share the
+// range of data conveyed in value from the file associated with the file
+// descriptor srcFd to the value.Info destinations. See the
+// ioctl_fideduperange(2) man page for details.
+func IoctlFileDedupeRange(srcFd int, value *FileDedupeRange) error {
+ buf := make([]byte, SizeofRawFileDedupeRange+
+ len(value.Info)*SizeofRawFileDedupeRangeInfo)
+ rawrange := (*RawFileDedupeRange)(unsafe.Pointer(&buf[0]))
+ rawrange.Src_offset = value.Src_offset
+ rawrange.Src_length = value.Src_length
+ rawrange.Dest_count = uint16(len(value.Info))
+ rawrange.Reserved1 = value.Reserved1
+ rawrange.Reserved2 = value.Reserved2
+
+ for i := range value.Info {
+ rawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer(
+ uintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) +
+ uintptr(i*SizeofRawFileDedupeRangeInfo)))
+ rawinfo.Dest_fd = value.Info[i].Dest_fd
+ rawinfo.Dest_offset = value.Info[i].Dest_offset
+ rawinfo.Bytes_deduped = value.Info[i].Bytes_deduped
+ rawinfo.Status = value.Info[i].Status
+ rawinfo.Reserved = value.Info[i].Reserved
+ }
+
+ err := ioctl(srcFd, FIDEDUPERANGE, uintptr(unsafe.Pointer(&buf[0])))
+
+ // Output
+ for i := range value.Info {
+ rawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer(
+ uintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) +
+ uintptr(i*SizeofRawFileDedupeRangeInfo)))
+ value.Info[i].Dest_fd = rawinfo.Dest_fd
+ value.Info[i].Dest_offset = rawinfo.Dest_offset
+ value.Info[i].Bytes_deduped = rawinfo.Bytes_deduped
+ value.Info[i].Status = rawinfo.Status
+ value.Info[i].Reserved = rawinfo.Reserved
+ }
+
+ return err
+}
+
+func IoctlHIDGetDesc(fd int, value *HIDRawReportDescriptor) error {
+ err := ioctl(fd, HIDIOCGRDESC, uintptr(unsafe.Pointer(value)))
+ runtime.KeepAlive(value)
+ return err
+}
+
+func IoctlHIDGetRawInfo(fd int) (*HIDRawDevInfo, error) {
+ var value HIDRawDevInfo
+ err := ioctl(fd, HIDIOCGRAWINFO, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
+func IoctlHIDGetRawName(fd int) (string, error) {
+ var value [_HIDIOCGRAWNAME_LEN]byte
+ err := ioctl(fd, _HIDIOCGRAWNAME, uintptr(unsafe.Pointer(&value[0])))
+ return ByteSliceToString(value[:]), err
+}
+
+func IoctlHIDGetRawPhys(fd int) (string, error) {
+ var value [_HIDIOCGRAWPHYS_LEN]byte
+ err := ioctl(fd, _HIDIOCGRAWPHYS, uintptr(unsafe.Pointer(&value[0])))
+ return ByteSliceToString(value[:]), err
+}
+
+func IoctlHIDGetRawUniq(fd int) (string, error) {
+ var value [_HIDIOCGRAWUNIQ_LEN]byte
+ err := ioctl(fd, _HIDIOCGRAWUNIQ, uintptr(unsafe.Pointer(&value[0])))
+ return ByteSliceToString(value[:]), err
+}
diff --git a/vendor/golang.org/x/sys/unix/ioctl_zos.go b/vendor/golang.org/x/sys/unix/ioctl_zos.go
new file mode 100644
index 0000000..5384e7d
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ioctl_zos.go
@@ -0,0 +1,74 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build zos && s390x
+// +build zos,s390x
+
+package unix
+
+import (
+ "runtime"
+ "unsafe"
+)
+
+// ioctl itself should not be exposed directly, but additional get/set
+// functions for specific types are permissible.
+
+// IoctlSetInt performs an ioctl operation which sets an integer value
+// on fd, using the specified request number.
+func IoctlSetInt(fd int, req uint, value int) error {
+ return ioctl(fd, req, uintptr(value))
+}
+
+// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
+//
+// To change fd's window size, the req argument should be TIOCSWINSZ.
+func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+ // TODO: if we get the chance, remove the req parameter and
+ // hardcode TIOCSWINSZ.
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+ runtime.KeepAlive(value)
+ return err
+}
+
+// IoctlSetTermios performs an ioctl on fd with a *Termios.
+//
+// The req value is expected to be TCSETS, TCSETSW, or TCSETSF
+func IoctlSetTermios(fd int, req uint, value *Termios) error {
+ if (req != TCSETS) && (req != TCSETSW) && (req != TCSETSF) {
+ return ENOSYS
+ }
+ err := Tcsetattr(fd, int(req), value)
+ runtime.KeepAlive(value)
+ return err
+}
+
+// IoctlGetInt performs an ioctl operation which gets an integer value
+// from fd, using the specified request number.
+//
+// A few ioctl requests use the return value as an output parameter;
+// for those, IoctlRetInt should be used instead of this function.
+func IoctlGetInt(fd int, req uint) (int, error) {
+ var value int
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return value, err
+}
+
+func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
+ var value Winsize
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
+// IoctlGetTermios performs an ioctl on fd with a *Termios.
+//
+// The req value is expected to be TCGETS
+func IoctlGetTermios(fd int, req uint) (*Termios, error) {
+ var value Termios
+ if req != TCGETS {
+ return &value, ENOSYS
+ }
+ err := Tcgetattr(fd, &value)
+ return &value, err
+}
diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh
index fa0c69b..d727cad 100644
--- a/vendor/golang.org/x/sys/unix/mkall.sh
+++ b/vendor/golang.org/x/sys/unix/mkall.sh
@@ -73,26 +73,22 @@ aix_ppc64)
darwin_386)
mkerrors="$mkerrors -m32"
mksyscall="go run mksyscall.go -l32"
- mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
mkasm="go run mkasm_darwin.go"
;;
darwin_amd64)
mkerrors="$mkerrors -m64"
- mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
mkasm="go run mkasm_darwin.go"
;;
darwin_arm)
mkerrors="$mkerrors"
mksyscall="go run mksyscall.go -l32"
- mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
mkasm="go run mkasm_darwin.go"
;;
darwin_arm64)
mkerrors="$mkerrors -m64"
- mksysnum="go run mksysnum.go $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
mkasm="go run mkasm_darwin.go"
;;
@@ -124,7 +120,7 @@ freebsd_arm)
freebsd_arm64)
mkerrors="$mkerrors -m64"
mksysnum="go run mksysnum.go 'https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master'"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
netbsd_386)
mkerrors="$mkerrors -m32"
@@ -184,12 +180,27 @@ openbsd_arm64)
# API consistent across platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
+openbsd_mips64)
+ mkerrors="$mkerrors -m64"
+ mksyscall="go run mksyscall.go -openbsd"
+ mksysctl="go run mksysctl_openbsd.go"
+ mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
+ # Let the type of C char be signed for making the bare syscall
+ # API consistent across platforms.
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
+ ;;
solaris_amd64)
mksyscall="go run mksyscall_solaris.go"
mkerrors="$mkerrors -m64"
mksysnum=
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
+illumos_amd64)
+ mksyscall="go run mksyscall_solaris.go"
+ mkerrors=
+ mksysnum=
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs"
+ ;;
*)
echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
exit 1
@@ -211,12 +222,15 @@ esac
# aix/ppc64 script generates files instead of writing to stdin.
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
elif [ "$GOOS" == "darwin" ]; then
- # pre-1.12, direct syscalls
- echo "$mksyscall -tags $GOOS,$GOARCH,!go1.12 $syscall_goos syscall_darwin_${GOARCH}.1_11.go $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.1_11.go";
# 1.12 and later, syscalls via libSystem
echo "$mksyscall -tags $GOOS,$GOARCH,go1.12 $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
# 1.13 and later, syscalls via libSystem (including syscallPtr)
echo "$mksyscall -tags $GOOS,$GOARCH,go1.13 syscall_darwin.1_13.go |gofmt >zsyscall_$GOOSARCH.1_13.go";
+ elif [ "$GOOS" == "illumos" ]; then
+ # illumos code generation requires a --illumos switch
+ echo "$mksyscall -illumos -tags illumos,$GOARCH syscall_illumos.go |gofmt > zsyscall_illumos_$GOARCH.go";
+ # illumos implies solaris, so solaris code generation is also required
+ echo "$mksyscall -tags solaris,$GOARCH syscall_solaris.go syscall_solaris_$GOARCH.go |gofmt >zsyscall_solaris_$GOARCH.go";
else
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
fi
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index 6ffac92..007358a 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -56,14 +56,19 @@ includes_Darwin='
#define _DARWIN_C_SOURCE
#define KERNEL
#define _DARWIN_USE_64_BIT_INODE
+#define __APPLE_USE_RFC_3542
#include <stdint.h>
#include <sys/attr.h>
+#include <sys/clonefile.h>
+#include <sys/kern_control.h>
#include <sys/types.h>
#include <sys/event.h>
#include <sys/ptrace.h>
#include <sys/select.h>
#include <sys/socket.h>
+#include <sys/un.h>
#include <sys/sockio.h>
+#include <sys/sys_domain.h>
#include <sys/sysctl.h>
#include <sys/mman.h>
#include <sys/mount.h>
@@ -93,6 +98,7 @@ includes_DragonFly='
#include <sys/ioctl.h>
#include <net/bpf.h>
#include <net/if.h>
+#include <net/if_clone.h>
#include <net/if_types.h>
#include <net/route.h>
#include <netinet/in.h>
@@ -105,9 +111,12 @@ includes_FreeBSD='
#include <sys/capsicum.h>
#include <sys/param.h>
#include <sys/types.h>
+#include <sys/disk.h>
#include <sys/event.h>
+#include <sys/sched.h>
#include <sys/select.h>
#include <sys/socket.h>
+#include <sys/un.h>
#include <sys/sockio.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
@@ -186,21 +195,29 @@ struct ltchars {
#include <sys/select.h>
#include <sys/signalfd.h>
#include <sys/socket.h>
+#include <sys/timerfd.h>
#include <sys/uio.h>
#include <sys/xattr.h>
#include <linux/bpf.h>
#include <linux/can.h>
+#include <linux/can/error.h>
+#include <linux/can/raw.h>
#include <linux/capability.h>
#include <linux/cryptouser.h>
#include <linux/devlink.h>
+#include <linux/dm-ioctl.h>
#include <linux/errqueue.h>
+#include <linux/ethtool_netlink.h>
#include <linux/falloc.h>
#include <linux/fanotify.h>
#include <linux/filter.h>
#include <linux/fs.h>
#include <linux/fscrypt.h>
+#include <linux/fsverity.h>
#include <linux/genetlink.h>
#include <linux/hdreg.h>
+#include <linux/hidraw.h>
+#include <linux/icmp.h>
#include <linux/icmpv6.h>
#include <linux/if.h>
#include <linux/if_addr.h>
@@ -211,9 +228,11 @@ struct ltchars {
#include <linux/if_tun.h>
#include <linux/if_packet.h>
#include <linux/if_xdp.h>
+#include <linux/input.h>
#include <linux/kexec.h>
#include <linux/keyctl.h>
#include <linux/loop.h>
+#include <linux/lwtunnel.h>
#include <linux/magic.h>
#include <linux/memfd.h>
#include <linux/module.h>
@@ -222,6 +241,7 @@ struct ltchars {
#include <linux/net_namespace.h>
#include <linux/nsfs.h>
#include <linux/perf_event.h>
+#include <linux/pps.h>
#include <linux/ptrace.h>
#include <linux/random.h>
#include <linux/reboot.h>
@@ -280,6 +300,22 @@ struct ltchars {
// for the tipc_subscr timeout __u32 field.
#undef TIPC_WAIT_FOREVER
#define TIPC_WAIT_FOREVER 0xffffffff
+
+// Copied from linux/l2tp.h
+// Including linux/l2tp.h here causes conflicts between linux/in.h
+// and netinet/in.h included via net/route.h above.
+#define IPPROTO_L2TP 115
+
+// Copied from linux/hid.h.
+// Keep in sync with the size of the referenced fields.
+#define _HIDIOCGRAWNAME_LEN 128 // sizeof_field(struct hid_device, name)
+#define _HIDIOCGRAWPHYS_LEN 64 // sizeof_field(struct hid_device, phys)
+#define _HIDIOCGRAWUNIQ_LEN 64 // sizeof_field(struct hid_device, uniq)
+
+#define _HIDIOCGRAWNAME HIDIOCGRAWNAME(_HIDIOCGRAWNAME_LEN)
+#define _HIDIOCGRAWPHYS HIDIOCGRAWPHYS(_HIDIOCGRAWPHYS_LEN)
+#define _HIDIOCGRAWUNIQ HIDIOCGRAWUNIQ(_HIDIOCGRAWUNIQ_LEN)
+
'
includes_NetBSD='
@@ -289,6 +325,7 @@ includes_NetBSD='
#include <sys/extattr.h>
#include <sys/mman.h>
#include <sys/mount.h>
+#include <sys/sched.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/sockio.h>
@@ -317,6 +354,7 @@ includes_OpenBSD='
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/select.h>
+#include <sys/sched.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/stat.h>
@@ -357,6 +395,7 @@ includes_SunOS='
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/stat.h>
+#include <sys/stream.h>
#include <sys/mman.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
@@ -366,10 +405,11 @@ includes_SunOS='
#include <net/if_arp.h>
#include <net/if_types.h>
#include <net/route.h>
+#include <netinet/icmp6.h>
#include <netinet/in.h>
-#include <termios.h>
#include <netinet/ip.h>
#include <netinet/ip_mroute.h>
+#include <termios.h>
'
@@ -424,6 +464,8 @@ ccflags="$@"
$2 !~ /^EPROC_/ &&
$2 !~ /^EQUIV_/ &&
$2 !~ /^EXPR_/ &&
+ $2 !~ /^EVIOC/ &&
+ $2 !~ /^EV_/ &&
$2 ~ /^E[A-Z0-9_]+$/ ||
$2 ~ /^B[0-9_]+$/ ||
$2 ~ /^(OLD|NEW)DEV$/ ||
@@ -458,10 +500,10 @@ ccflags="$@"
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
- $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|MCAST|EVFILT|NOTE|EV|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
+ $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL)_/ ||
$2 ~ /^TP_STATUS_/ ||
$2 ~ /^FALLOC_/ ||
- $2 == "ICMPV6_FILTER" ||
+ $2 ~ /^ICMPV?6?_(FILTER|SEC)/ ||
$2 == "SOMAXCONN" ||
$2 == "NAME_MAX" ||
$2 == "IFNAMSIZ" ||
@@ -473,21 +515,24 @@ ccflags="$@"
$2 ~ /^(MS|MNT|UMOUNT)_/ ||
$2 ~ /^NS_GET_/ ||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
- $2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT)_/ ||
+ $2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
$2 ~ /^KEXEC_/ ||
$2 ~ /^LINUX_REBOOT_CMD_/ ||
$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
$2 ~ /^MODULE_INIT_/ ||
$2 !~ "NLA_TYPE_MASK" &&
+ $2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ &&
$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ ||
+ $2 ~ /^FIORDCHK$/ ||
$2 ~ /^SIOC/ ||
$2 ~ /^TIOC/ ||
$2 ~ /^TCGET/ ||
$2 ~ /^TCSET/ ||
$2 ~ /^TC(FLSH|SBRKP?|XONC)$/ ||
$2 !~ "RTF_BITS" &&
- $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
+ $2 ~ /^(IFF|IFT|NET_RT|RTM(GRP)?|RTF|RTV|RTA|RTAX)_/ ||
$2 ~ /^BIOC/ ||
+ $2 ~ /^DIOC/ ||
$2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ ||
$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
@@ -497,15 +542,21 @@ ccflags="$@"
$2 ~ /^(CLOCK|TIMER)_/ ||
$2 ~ /^CAN_/ ||
$2 ~ /^CAP_/ ||
+ $2 ~ /^CP_/ ||
+ $2 ~ /^CPUSTATES$/ ||
+ $2 ~ /^CTLIOCGINFO$/ ||
$2 ~ /^ALG_/ ||
+ $2 ~ /^FI(CLONE|DEDUPERANGE)/ ||
$2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE)/ ||
- $2 ~ /^FS_IOC_.*ENCRYPTION/ ||
+ $2 ~ /^FS_IOC_.*(ENCRYPTION|VERITY|[GS]ETFLAGS)/ ||
+ $2 ~ /^FS_VERITY_/ ||
$2 ~ /^FSCRYPT_/ ||
+ $2 ~ /^DM_/ ||
$2 ~ /^GRND_/ ||
$2 ~ /^RND/ ||
$2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ ||
$2 ~ /^KEYCTL_/ ||
- $2 ~ /^PERF_EVENT_IOC_/ ||
+ $2 ~ /^PERF_/ ||
$2 ~ /^SECCOMP_MODE_/ ||
$2 ~ /^SPLICE_/ ||
$2 ~ /^SYNC_FILE_RANGE_/ ||
@@ -524,18 +575,24 @@ ccflags="$@"
$2 ~ /^XATTR_(CREATE|REPLACE|NO(DEFAULT|FOLLOW|SECURITY)|SHOWCOMPRESSION)/ ||
$2 ~ /^ATTR_(BIT_MAP_COUNT|(CMN|VOL|FILE)_)/ ||
$2 ~ /^FSOPT_/ ||
- $2 ~ /^WDIOC_/ ||
+ $2 ~ /^WDIO[CFS]_/ ||
$2 ~ /^NFN/ ||
$2 ~ /^XDP_/ ||
$2 ~ /^RWF_/ ||
$2 ~ /^(HDIO|WIN|SMART)_/ ||
$2 ~ /^CRYPTO_/ ||
$2 ~ /^TIPC_/ ||
+ $2 !~ "DEVLINK_RELOAD_LIMITS_VALID_MASK" &&
$2 ~ /^DEVLINK_/ ||
+ $2 ~ /^ETHTOOL_/ ||
+ $2 ~ /^LWTUNNEL_IP/ ||
$2 !~ "WMESGLEN" &&
$2 ~ /^W[A-Z0-9]+$/ ||
$2 ~/^PPPIOC/ ||
$2 ~ /^FAN_|FANOTIFY_/ ||
+ $2 == "HID_MAX_DESCRIPTOR_SIZE" ||
+ $2 ~ /^_?HIDIOC/ ||
+ $2 ~ /^BUS_(USB|HIL|BLUETOOTH|VIRTUAL)$/ ||
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
$2 ~ /^__WCOREFLAG$/ {next}
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
@@ -573,6 +630,7 @@ echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
echo '// mkerrors.sh' "$@"
echo '// Code generated by the command above; see README.md. DO NOT EDIT.'
echo
+echo "//go:build ${GOARCH} && ${GOOS}"
echo "// +build ${GOARCH},${GOOS}"
echo
go tool cgo -godefs -- "$@" _const.go >_error.out
diff --git a/vendor/golang.org/x/sys/unix/pagesize_unix.go b/vendor/golang.org/x/sys/unix/pagesize_unix.go
index bc2f362..53f1b4c 100644
--- a/vendor/golang.org/x/sys/unix/pagesize_unix.go
+++ b/vendor/golang.org/x/sys/unix/pagesize_unix.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
// For Unix, get the pagesize from the runtime.
diff --git a/vendor/golang.org/x/sys/unix/ptrace_darwin.go b/vendor/golang.org/x/sys/unix/ptrace_darwin.go
new file mode 100644
index 0000000..463c3ef
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ptrace_darwin.go
@@ -0,0 +1,12 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build darwin && !ios
+// +build darwin,!ios
+
+package unix
+
+func ptrace(request int, pid int, addr uintptr, data uintptr) error {
+ return ptrace1(request, pid, addr, data)
+}
diff --git a/vendor/golang.org/x/sys/unix/ptrace_ios.go b/vendor/golang.org/x/sys/unix/ptrace_ios.go
new file mode 100644
index 0000000..ed0509a
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ptrace_ios.go
@@ -0,0 +1,12 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build ios
+// +build ios
+
+package unix
+
+func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
+ return ENOTSUP
+}
diff --git a/vendor/golang.org/x/sys/unix/race.go b/vendor/golang.org/x/sys/unix/race.go
index 61712b5..6f6c5fe 100644
--- a/vendor/golang.org/x/sys/unix/race.go
+++ b/vendor/golang.org/x/sys/unix/race.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (darwin && race) || (linux && race) || (freebsd && race)
// +build darwin,race linux,race freebsd,race
package unix
diff --git a/vendor/golang.org/x/sys/unix/race0.go b/vendor/golang.org/x/sys/unix/race0.go
index ad02667..706e132 100644
--- a/vendor/golang.org/x/sys/unix/race0.go
+++ b/vendor/golang.org/x/sys/unix/race0.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
+//go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos
+// +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly zos
package unix
diff --git a/vendor/golang.org/x/sys/unix/readdirent_getdents.go b/vendor/golang.org/x/sys/unix/readdirent_getdents.go
index 3a90aa6..4d62575 100644
--- a/vendor/golang.org/x/sys/unix/readdirent_getdents.go
+++ b/vendor/golang.org/x/sys/unix/readdirent_getdents.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || dragonfly || freebsd || linux || netbsd || openbsd
// +build aix dragonfly freebsd linux netbsd openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go b/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
index 5fdae40..2a4ba47 100644
--- a/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
+++ b/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin
// +build darwin
package unix
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
index 003916e..453a942 100644
--- a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
// Socket control messages
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
index 7d08dae..0840fe4 100644
--- a/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin freebsd linux netbsd openbsd solaris zos
package unix
@@ -20,7 +21,7 @@ func cmsgAlignOf(salen int) int {
case "aix":
// There is no alignment on AIX.
salign = 1
- case "darwin", "illumos", "solaris":
+ case "darwin", "ios", "illumos", "solaris":
// NOTE: It seems like 64-bit Darwin, Illumos and Solaris
// kernels still require 32-bit aligned access to network
// subsystem.
@@ -32,6 +33,14 @@ func cmsgAlignOf(salen int) int {
if runtime.GOARCH == "arm" {
salign = 8
}
+ // NetBSD aarch64 requires 128-bit alignment.
+ if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm64" {
+ salign = 16
+ }
+ case "zos":
+ // z/OS socket macros use [32-bit] sizeof(int) alignment,
+ // not pointer width.
+ salign = SizeofInt
}
return (salen + salign - 1) & ^(salign - 1)
diff --git a/vendor/golang.org/x/sys/unix/str.go b/vendor/golang.org/x/sys/unix/str.go
index 17fb698..8ba89ed 100644
--- a/vendor/golang.org/x/sys/unix/str.go
+++ b/vendor/golang.org/x/sys/unix/str.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall.go b/vendor/golang.org/x/sys/unix/syscall.go
index fd4ee8e..649fa87 100644
--- a/vendor/golang.org/x/sys/unix/syscall.go
+++ b/vendor/golang.org/x/sys/unix/syscall.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
// Package unix contains an interface to the low-level operating system
// primitives. OS details vary depending on the underlying system, and
@@ -24,7 +25,13 @@
// holds a value of type syscall.Errno.
package unix // import "golang.org/x/sys/unix"
-import "strings"
+import (
+ "bytes"
+ "strings"
+ "unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
+)
// ByteSliceFromString returns a NUL-terminated slice of bytes
// containing the text of s. If s contains a NUL byte at any
@@ -49,5 +56,40 @@ func BytePtrFromString(s string) (*byte, error) {
return &a[0], nil
}
+// ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any
+// bytes after the NUL removed.
+func ByteSliceToString(s []byte) string {
+ if i := bytes.IndexByte(s, 0); i != -1 {
+ s = s[:i]
+ }
+ return string(s)
+}
+
+// BytePtrToString takes a pointer to a sequence of text and returns the corresponding string.
+// If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated
+// at a zero byte; if the zero byte is not present, the program may crash.
+func BytePtrToString(p *byte) string {
+ if p == nil {
+ return ""
+ }
+ if *p == 0 {
+ return ""
+ }
+
+ // Find NUL terminator.
+ n := 0
+ for ptr := unsafe.Pointer(p); *(*byte)(ptr) != 0; n++ {
+ ptr = unsafe.Pointer(uintptr(ptr) + 1)
+ }
+
+ var s []byte
+ h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
+ h.Data = unsafe.Pointer(p)
+ h.Len = n
+ h.Cap = n
+
+ return string(s)
+}
+
// Single-word zero for use when we need a valid pointer to 0 bytes.
var _zero uintptr
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go
index 9ad8a0d..d8efb71 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix
// +build aix
// Aix system calls.
@@ -19,6 +20,22 @@ import "unsafe"
* Wrapped
*/
+func Access(path string, mode uint32) (err error) {
+ return Faccessat(AT_FDCWD, path, mode, 0)
+}
+
+func Chmod(path string, mode uint32) (err error) {
+ return Fchmodat(AT_FDCWD, path, mode, 0)
+}
+
+func Chown(path string, uid int, gid int) (err error) {
+ return Fchownat(AT_FDCWD, path, uid, gid, 0)
+}
+
+func Creat(path string, mode uint32) (fd int, err error) {
+ return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
+}
+
//sys utimes(path string, times *[2]Timeval) (err error)
func Utimes(path string, tv []Timeval) error {
if len(tv) != 2 {
@@ -235,7 +252,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
}
}
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
+ bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
sa.Name = string(bytes)
return sa, nil
@@ -403,8 +420,8 @@ func (w WaitStatus) TrapCause() int { return -1 }
//sys Mknod(path string, mode uint32, dev int) (err error)
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error) = open64
-//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
+//sys Open(path string, mode int, perm uint32) (fd int, err error) = open64
+//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error)
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
@@ -423,8 +440,8 @@ func (w WaitStatus) TrapCause() int { return -1 }
//sysnb Times(tms *Tms) (ticks uintptr, err error)
//sysnb Umask(mask int) (oldmask int)
//sysnb Uname(buf *Utsname) (err error)
-//sys Unlink(path string) (err error)
-//sys Unlinkat(dirfd int, path string, flags int) (err error)
+//sys Unlink(path string) (err error)
+//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
//sys write(fd int, p []byte) (n int, err error)
//sys readlen(fd int, p *byte, np int) (n int, err error) = read
@@ -498,7 +515,7 @@ func Munmap(b []byte) (err error) {
//sys Munlock(b []byte) (err error)
//sys Munlockall() (err error)
-//sysnb pipe(p *[2]_C_int) (err error)
+//sysnb pipe(p *[2]_C_int) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
index b3c8e33..e92a0be 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix
-// +build ppc
+//go:build aix && ppc
+// +build aix,ppc
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
index 9a6e024..16eed17 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix
-// +build ppc64
+//go:build aix && ppc64
+// +build aix,ppc64
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go
index 68605db..95ac394 100644
--- a/vendor/golang.org/x/sys/unix/syscall_bsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin || dragonfly || freebsd || netbsd || openbsd
// +build darwin dragonfly freebsd netbsd openbsd
// BSD system call wrappers shared by *BSD based systems
@@ -18,6 +19,21 @@ import (
"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
*/
@@ -262,7 +278,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
}
return sa, nil
}
- return nil, EAFNOSUPPORT
+ return anyToSockaddrGOOS(fd, rsa)
}
func Accept(fd int) (nfd int, sa Sockaddr, err error) {
@@ -272,7 +288,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
if err != nil {
return
}
- if runtime.GOOS == "darwin" && len == 0 {
+ if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && len == 0 {
// Accepted socket has no address.
// This is likely due to a bug in xnu kernels,
// where instead of ECONNABORTED error socket
@@ -303,7 +319,7 @@ func Getsockname(fd int) (sa Sockaddr, err error) {
return anyToSockaddr(fd, &rsa)
}
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
// GetsockoptString returns the string value of the socket option opt for the
// socket associated with fd at the given socket level.
@@ -317,8 +333,8 @@ func GetsockoptString(fd, level, opt int) (string, error) {
return string(buf[:vallen-1]), nil
}
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
+//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
+//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
@@ -527,6 +543,23 @@ func SysctlClockinfo(name string) (*Clockinfo, error) {
return &ci, nil
}
+func SysctlTimeval(name string) (*Timeval, error) {
+ mib, err := sysctlmib(name)
+ if err != nil {
+ return nil, err
+ }
+
+ var tv Timeval
+ n := uintptr(unsafe.Sizeof(tv))
+ if err := sysctl(mib, (*byte)(unsafe.Pointer(&tv)), &n, nil, 0); err != nil {
+ return nil, err
+ }
+ if n != unsafe.Sizeof(tv) {
+ return nil, EIO
+ }
+ return &tv, nil
+}
+
//sys utimes(path string, timeval *[2]Timeval) (err error)
func Utimes(path string, tv []Timeval) error {
@@ -594,7 +627,7 @@ func Futimes(fd int, tv []Timeval) error {
return futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
}
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go b/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
index 6a15cba..b009860 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin && go1.12 && !go1.13
// +build darwin,go1.12,!go1.13
package unix
@@ -10,6 +11,8 @@ import (
"unsafe"
)
+const _SYS_GETDIRENTRIES64 = 344
+
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
// To implement this using libSystem we'd need syscall_syscallPtr for
// fdopendir. However, syscallPtr was only added in Go 1.13, so we fall
@@ -20,7 +23,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
} else {
p = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
+ r0, _, e1 := Syscall6(_SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
n = int(r0)
if e1 != 0 {
return n, errnoErr(e1)
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go b/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
index f911617..5fc3cda 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
@@ -2,11 +2,16 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin && go1.13
// +build darwin,go1.13
package unix
-import "unsafe"
+import (
+ "unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
+)
//sys closedir(dir uintptr) (err error)
//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
@@ -22,7 +27,6 @@ func fdopendir(fd int) (dir uintptr, err error) {
func libc_fdopendir_trampoline()
-//go:linkname libc_fdopendir libc_fdopendir
//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
@@ -71,6 +75,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
cnt++
continue
}
+
reclen := int(entry.Reclen)
if reclen > len(buf) {
// Not enough room. Return for now.
@@ -79,13 +84,15 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
// restarting is O(n^2) in the length of the directory. Oh well.
break
}
+
// Copy entry into return buffer.
- s := struct {
- ptr unsafe.Pointer
- siz int
- cap int
- }{ptr: unsafe.Pointer(&entry), siz: reclen, cap: reclen}
- copy(buf, *(*[]byte)(unsafe.Pointer(&s)))
+ var s []byte
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&s))
+ hdr.Data = unsafe.Pointer(&entry)
+ hdr.Cap = reclen
+ hdr.Len = reclen
+ copy(buf, s)
+
buf = buf[reclen:]
n += reclen
cnt++
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 9a5a6ee..9945e5f 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -13,29 +13,11 @@
package unix
import (
- "errors"
+ "runtime"
"syscall"
"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.
type SockaddrDatalink struct {
Len uint8
@@ -49,6 +31,41 @@ type SockaddrDatalink struct {
raw RawSockaddrDatalink
}
+// SockaddrCtl implements the Sockaddr interface for AF_SYSTEM type sockets.
+type SockaddrCtl struct {
+ ID uint32
+ Unit uint32
+ raw RawSockaddrCtl
+}
+
+func (sa *SockaddrCtl) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Sc_len = SizeofSockaddrCtl
+ sa.raw.Sc_family = AF_SYSTEM
+ sa.raw.Ss_sysaddr = AF_SYS_CONTROL
+ sa.raw.Sc_id = sa.ID
+ sa.raw.Sc_unit = sa.Unit
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil
+}
+
+func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
+ switch rsa.Addr.Family {
+ case AF_SYSTEM:
+ pp := (*RawSockaddrCtl)(unsafe.Pointer(rsa))
+ if pp.Ss_sysaddr == AF_SYS_CONTROL {
+ sa := new(SockaddrCtl)
+ sa.ID = pp.Sc_id
+ sa.Unit = pp.Sc_unit
+ return sa, nil
+ }
+ }
+ return nil, EAFNOSUPPORT
+}
+
+// Some external packages rely on SYS___SYSCTL being defined to implement their
+// own sysctl wrappers. Provide it here, even though direct syscalls are no
+// longer supported on darwin.
+const SYS___SYSCTL = SYS_SYSCTL
+
// Translate "kern.hostname" to []_C_int{0,1,2,3}.
func nametomib(name string) (mib []_C_int, err error) {
const siz = unsafe.Sizeof(mib[0])
@@ -92,11 +109,6 @@ func direntNamlen(buf []byte) (uint64, bool) {
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) }
-const (
- attrBitMapCount = 5
- attrCmnFullpath = 0x08000000
-)
-
type attrList struct {
bitmapCount uint16
_ uint16
@@ -107,61 +119,16 @@ type attrList struct {
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(p *[2]int32) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
- p[0], p[1], err = pipe()
+ var x [2]int32
+ err = pipe(&x)
+ p[0] = int(x[0])
+ p[1] = int(x[1])
return
}
@@ -305,7 +272,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
options)
}
-//sys setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
+//sys setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
// Darwin doesn't support SYS_UTIMENSAT
@@ -324,7 +291,36 @@ func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(sig
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
+func IoctlCtlInfo(fd int, ctlInfo *CtlInfo) error {
+ err := ioctl(fd, CTLIOCGINFO, uintptr(unsafe.Pointer(ctlInfo)))
+ runtime.KeepAlive(ctlInfo)
+ return err
+}
+
+// IfreqMTU is struct ifreq used to get or set a network device's MTU.
+type IfreqMTU struct {
+ Name [IFNAMSIZ]byte
+ MTU int32
+}
+
+// IoctlGetIfreqMTU performs the SIOCGIFMTU ioctl operation on fd to get the MTU
+// of the network device specified by ifname.
+func IoctlGetIfreqMTU(fd int, ifname string) (*IfreqMTU, error) {
+ var ifreq IfreqMTU
+ copy(ifreq.Name[:], ifname)
+ err := ioctl(fd, SIOCGIFMTU, uintptr(unsafe.Pointer(&ifreq)))
+ return &ifreq, err
+}
+
+// IoctlSetIfreqMTU performs the SIOCSIFMTU ioctl operation on fd to set the MTU
+// of the network device specified by ifreq.Name.
+func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error {
+ err := ioctl(fd, SIOCSIFMTU, uintptr(unsafe.Pointer(ifreq)))
+ runtime.KeepAlive(ifreq)
+ return err
+}
+
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL
func Uname(uname *Utsname) error {
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
@@ -382,6 +378,26 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
return
}
+func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
+ var value IPMreqn
+ vallen := _Socklen(SizeofIPMreqn)
+ errno := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
+ return &value, errno
+}
+
+func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
+}
+
+// GetsockoptXucred is a getsockopt wrapper that returns an Xucred struct.
+// The usual level and opt are SOL_LOCAL and LOCAL_PEERCRED, respectively.
+func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
+ x := new(Xucred)
+ vallen := _Socklen(SizeofXucred)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(x), &vallen)
+ return x, err
+}
+
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
/*
@@ -396,6 +412,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Chroot(path string) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys Close(fd int) (err error)
+//sys Clonefile(src string, dst string, flags int) (err error)
+//sys Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error)
//sys Dup(fd int) (nfd int, err error)
//sys Dup2(from int, to int) (err error)
//sys Exchangedata(path1 string, path2 string, options int) (err error)
@@ -407,10 +425,12 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
+//sys Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error)
//sys Flock(fd int, how int) (err error)
//sys Fpathconf(fd int, name int) (val int, err error)
//sys Fsync(fd int) (err error)
//sys Ftruncate(fd int, length int64) (err error)
+//sys Getcwd(buf []byte) (n int, err error)
//sys Getdtablesize() (size int)
//sysnb Getegid() (egid int)
//sysnb Geteuid() (uid int)
@@ -423,6 +443,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sysnb Getrlimit(which int, lim *Rlimit) (err error)
//sysnb Getrusage(who int, rusage *Rusage) (err error)
//sysnb Getsid(pid int) (sid int, err error)
+//sysnb Gettimeofday(tp *Timeval) (err error)
//sysnb Getuid() (uid int)
//sysnb Issetugid() (tainted bool)
//sys Kqueue() (fd int, err error)
@@ -471,8 +492,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Unmount(path string, flags int) (err error)
//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
+//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
+//sys munmap(addr uintptr, length uintptr) (err error)
//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
index 707ba4f..6474677 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
@@ -2,15 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build 386 && darwin
// +build 386,darwin
package unix
-import (
- "syscall"
-)
-
-//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
+import "syscall"
func setTimespec(sec, nsec int64) Timespec {
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
@@ -20,17 +17,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)}
}
-//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = int32(sec)
- tv.Usec = int32(usec)
- return err
-}
-
func SetKevent(k *Kevent_t, fd, mode, flags int) {
k.Ident = uint32(fd)
k.Filter = int16(mode)
@@ -55,14 +41,11 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/386 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
-
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
+//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go
deleted file mode 100644
index 68ebd6f..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2019 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin,amd64,!go1.12
-
-package unix
-
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
index fdbfb59..b37310c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
@@ -2,15 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && darwin
// +build amd64,darwin
package unix
-import (
- "syscall"
-)
-
-//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
+import "syscall"
func setTimespec(sec, nsec int64) Timespec {
return Timespec{Sec: sec, Nsec: nsec}
@@ -20,17 +17,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: int32(usec)}
}
-//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = sec
- tv.Usec = usec
- return err
-}
-
func SetKevent(k *Kevent_t, fd, mode, flags int) {
k.Ident = uint64(fd)
k.Filter = int16(mode)
@@ -55,14 +41,11 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/amd64 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
-
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
+//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
index f8bc4cf..d30735c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
@@ -4,11 +4,9 @@
package unix
-import (
- "syscall"
-)
+import "syscall"
-func ptrace(request int, pid int, addr uintptr, data uintptr) error {
+func ptrace1(request int, pid int, addr uintptr, data uintptr) error {
return ENOTSUP
}
@@ -20,17 +18,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)}
}
-//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = int32(sec)
- tv.Usec = int32(usec)
- return err
-}
-
func SetKevent(k *Kevent_t, fd, mode, flags int) {
k.Ident = uint32(fd)
k.Filter = int16(mode)
@@ -55,10 +42,6 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/arm the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
-
//sys Fstat(fd int, stat *Stat_t) (err error)
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
//sys Fstatfs(fd int, stat *Statfs_t) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
index 5ede3ac..d51ec99 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
@@ -2,17 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm64 && darwin
// +build arm64,darwin
package unix
-import (
- "syscall"
-)
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) error {
- return ENOTSUP
-}
+import "syscall"
func setTimespec(sec, nsec int64) Timespec {
return Timespec{Sec: sec, Nsec: nsec}
@@ -22,17 +17,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: int32(usec)}
}
-//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = sec
- tv.Usec = usec
- return err
-}
-
func SetKevent(k *Kevent_t, fd, mode, flags int) {
k.Ident = uint64(fd)
k.Filter = int16(mode)
@@ -57,14 +41,11 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/arm64 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
-
//sys Fstat(fd int, stat *Stat_t) (err error)
//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
//sys Fstatfs(fd int, stat *Statfs_t) (err error)
//sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT
//sys Lstat(path string, stat *Stat_t) (err error)
+//sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
//sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, stat *Statfs_t) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
index f34c86c..38bec30 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build darwin && go1.12
// +build darwin,go1.12
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
index 8a195ae..5af108a 100644
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
+++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
@@ -47,6 +47,10 @@ type SockaddrDatalink struct {
raw RawSockaddrDatalink
}
+func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
+ return nil, EAFNOSUPPORT
+}
+
// Translate "kern.hostname" to []_C_int{0,1,2,3}.
func nametomib(name string) (mib []_C_int, err error) {
const siz = unsafe.Sizeof(mib[0])
@@ -91,7 +95,7 @@ func direntNamlen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
}
-//sysnb pipe() (r int, w int, err error)
+//sysnb pipe() (r int, w int, err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
@@ -101,6 +105,19 @@ func Pipe(p []int) (err error) {
return
}
+//sysnb pipe2(p *[2]_C_int, flags int) (r int, w int, err error)
+
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ // pipe2 on dragonfly takes an fds array as an argument, but still
+ // returns the file descriptors.
+ p[0], p[1], err = pipe2(&pp, flags)
+ return err
+}
+
//sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
func Pread(fd int, p []byte, offset int64) (n int, err error) {
return extpread(fd, p, 0, offset)
@@ -129,23 +146,8 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
return
}
-const ImplementsGetwd = true
-
//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) {
var _p0 unsafe.Pointer
var bufsize uintptr
@@ -168,7 +170,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
func sysctlUname(mib []_C_int, old *byte, oldlen *uintptr) error {
err := sysctl(mib, old, oldlen, nil, 0)
@@ -335,8 +337,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Unmount(path string, flags int) (err error)
//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
+//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
+//sys munmap(addr uintptr, length uintptr) (err error)
//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
index a6b4830..4e2d321 100644
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && dragonfly
// +build amd64,dragonfly
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
index 6b2eca4..18c392c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
@@ -54,6 +54,10 @@ type SockaddrDatalink struct {
raw RawSockaddrDatalink
}
+func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
+ return nil, EAFNOSUPPORT
+}
+
// Translate "kern.hostname" to []_C_int{0,1,2,3}.
func nametomib(name string) (mib []_C_int, err error) {
const siz = unsafe.Sizeof(mib[0])
@@ -122,6 +126,15 @@ func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
}
+// GetsockoptXucred is a getsockopt wrapper that returns an Xucred struct.
+// The usual level and opt are SOL_LOCAL and LOCAL_PEERCRED, respectively.
+func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
+ x := new(Xucred)
+ vallen := _Socklen(SizeofXucred)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(x), &vallen)
+ return x, err
+}
+
func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
var rsa RawSockaddrAny
var len _Socklen = SizeofSockaddrAny
@@ -140,23 +153,8 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
return
}
-const ImplementsGetwd = true
-
//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) {
var (
_p0 unsafe.Pointer
@@ -199,9 +197,9 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
return ENOSYS
}
-//sys ioctl(fd int, req uint, arg uintptr) (err error)
+//sys ioctl(fd int, req uint, arg uintptr) (err error)
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
func Uname(uname *Utsname) error {
mib := []_C_int{CTL_KERN, KERN_OSTYPE}
@@ -521,10 +519,6 @@ func PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) {
return ptrace(PTRACE_GETFPREGS, pid, uintptr(unsafe.Pointer(fpregsout)), 0)
}
-func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
- return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
-}
-
func PtraceGetRegs(pid int, regsout *Reg) (err error) {
return ptrace(PTRACE_GETREGS, pid, uintptr(unsafe.Pointer(regsout)), 0)
}
@@ -680,8 +674,8 @@ func PtraceSingleStep(pid int) (err error) {
//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Unmount(path string, flags int) (err error)
//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
+//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
+//sys munmap(addr uintptr, length uintptr) (err error)
//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
index 0a5a66f..342fc32 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build 386 && freebsd
// +build 386,freebsd
package unix
@@ -55,6 +56,10 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
+func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
+ return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
+}
+
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
index 8025b22..a32d5aa 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && freebsd
// +build amd64,freebsd
package unix
@@ -55,6 +56,10 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
+func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
+ return ptrace(PTRACE_GETFSBASE, pid, uintptr(unsafe.Pointer(fsbase)), 0)
+}
+
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
err = ptrace(PTRACE_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
index 4ea45bc..1e36d39 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm && freebsd
// +build arm,freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
index aa5326d..a09a153 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm64 && freebsd
// +build arm64,freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_illumos.go b/vendor/golang.org/x/sys/unix/syscall_illumos.go
new file mode 100644
index 0000000..c5c5880
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_illumos.go
@@ -0,0 +1,129 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// illumos system calls not present on Solaris.
+
+//go:build amd64 && illumos
+// +build amd64,illumos
+
+package unix
+
+import (
+ "unsafe"
+)
+
+func bytes2iovec(bs [][]byte) []Iovec {
+ iovecs := make([]Iovec, len(bs))
+ for i, b := range bs {
+ iovecs[i].SetLen(len(b))
+ if len(b) > 0 {
+ // somehow Iovec.Base on illumos is (*int8), not (*byte)
+ iovecs[i].Base = (*int8)(unsafe.Pointer(&b[0]))
+ } else {
+ iovecs[i].Base = (*int8)(unsafe.Pointer(&_zero))
+ }
+ }
+ return iovecs
+}
+
+//sys readv(fd int, iovs []Iovec) (n int, err error)
+
+func Readv(fd int, iovs [][]byte) (n int, err error) {
+ iovecs := bytes2iovec(iovs)
+ n, err = readv(fd, iovecs)
+ return n, err
+}
+
+//sys preadv(fd int, iovs []Iovec, off int64) (n int, err error)
+
+func Preadv(fd int, iovs [][]byte, off int64) (n int, err error) {
+ iovecs := bytes2iovec(iovs)
+ n, err = preadv(fd, iovecs, off)
+ return n, err
+}
+
+//sys writev(fd int, iovs []Iovec) (n int, err error)
+
+func Writev(fd int, iovs [][]byte) (n int, err error) {
+ iovecs := bytes2iovec(iovs)
+ n, err = writev(fd, iovecs)
+ return n, err
+}
+
+//sys pwritev(fd int, iovs []Iovec, off int64) (n int, err error)
+
+func Pwritev(fd int, iovs [][]byte, off int64) (n int, err error) {
+ iovecs := bytes2iovec(iovs)
+ n, err = pwritev(fd, iovecs, off)
+ return n, err
+}
+
+//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) {
+ var rsa RawSockaddrAny
+ var len _Socklen = SizeofSockaddrAny
+ nfd, err = accept4(fd, &rsa, &len, flags)
+ if err != nil {
+ return
+ }
+ if len > SizeofSockaddrAny {
+ panic("RawSockaddrAny too small")
+ }
+ sa, err = anyToSockaddr(fd, &rsa)
+ if err != nil {
+ Close(nfd)
+ nfd = 0
+ }
+ return
+}
+
+//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
+
+func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
+ var clp, datap *strbuf
+ if len(cl) > 0 {
+ clp = &strbuf{
+ Len: int32(len(cl)),
+ Buf: (*int8)(unsafe.Pointer(&cl[0])),
+ }
+ }
+ if len(data) > 0 {
+ datap = &strbuf{
+ Len: int32(len(data)),
+ Buf: (*int8)(unsafe.Pointer(&data[0])),
+ }
+ }
+ return putmsg(fd, clp, datap, flags)
+}
+
+//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
+
+func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
+ var clp, datap *strbuf
+ if len(cl) > 0 {
+ clp = &strbuf{
+ Maxlen: int32(len(cl)),
+ Buf: (*int8)(unsafe.Pointer(&cl[0])),
+ }
+ }
+ if len(data) > 0 {
+ datap = &strbuf{
+ Maxlen: int32(len(data)),
+ Buf: (*int8)(unsafe.Pointer(&data[0])),
+ }
+ }
+
+ if err = getmsg(fd, clp, datap, &flags); err != nil {
+ return nil, nil, 0, err
+ }
+
+ if len(cl) > 0 {
+ retCl = cl[:clp.Len]
+ }
+ if len(data) > 0 {
+ retData = data[:datap.Len]
+ }
+ return retCl, retData, flags, nil
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index 0efe45a..4263953 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -70,44 +70,7 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
// ioctl itself should not be exposed directly, but additional get/set
// functions for specific types are permissible.
-
-// IoctlRetInt performs an ioctl operation specified by req on a device
-// associated with opened file descriptor fd, and returns a non-negative
-// integer that is returned by the ioctl syscall.
-func IoctlRetInt(fd int, req uint) (int, error) {
- ret, _, err := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), 0)
- if err != 0 {
- return 0, err
- }
- return int(ret), nil
-}
-
-// IoctlSetPointerInt performs an ioctl operation which sets an
-// integer value on fd, using the specified request number. The ioctl
-// argument is called with a pointer to the integer value, rather than
-// passing the integer value directly.
-func IoctlSetPointerInt(fd int, req uint, value int) error {
- v := int32(value)
- return ioctl(fd, req, uintptr(unsafe.Pointer(&v)))
-}
-
-func IoctlSetRTCTime(fd int, value *RTCTime) error {
- err := ioctl(fd, RTC_SET_TIME, uintptr(unsafe.Pointer(value)))
- runtime.KeepAlive(value)
- return err
-}
-
-func IoctlGetUint32(fd int, req uint) (uint32, error) {
- var value uint32
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
-func IoctlGetRTCTime(fd int) (*RTCTime, error) {
- var value RTCTime
- err := ioctl(fd, RTC_RD_TIME, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
+// These are defined in ioctl.go and ioctl_linux.go.
//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
@@ -133,6 +96,12 @@ func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
return openat(dirfd, path, flags|O_LARGEFILE, mode)
}
+//sys openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error)
+
+func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) {
+ return openat2(dirfd, path, how, SizeofOpenHow)
+}
+
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
@@ -591,6 +560,36 @@ func (sa *SockaddrCAN) sockaddr() (unsafe.Pointer, _Socklen, error) {
return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil
}
+// SockaddrCANJ1939 implements the Sockaddr interface for AF_CAN using J1939
+// protocol (https://en.wikipedia.org/wiki/SAE_J1939). For more information
+// on the purposes of the fields, check the official linux kernel documentation
+// available here: https://www.kernel.org/doc/Documentation/networking/j1939.rst
+type SockaddrCANJ1939 struct {
+ Ifindex int
+ Name uint64
+ PGN uint32
+ Addr uint8
+ raw RawSockaddrCAN
+}
+
+func (sa *SockaddrCANJ1939) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff {
+ return nil, 0, EINVAL
+ }
+ sa.raw.Family = AF_CAN
+ sa.raw.Ifindex = int32(sa.Ifindex)
+ n := (*[8]byte)(unsafe.Pointer(&sa.Name))
+ for i := 0; i < 8; i++ {
+ sa.raw.Addr[i] = n[i]
+ }
+ p := (*[4]byte)(unsafe.Pointer(&sa.PGN))
+ for i := 0; i < 4; i++ {
+ sa.raw.Addr[i+8] = p[i]
+ }
+ sa.raw.Addr[12] = sa.Addr
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil
+}
+
// SockaddrALG implements the Sockaddr interface for AF_ALG type sockets.
// SockaddrALG enables userspace access to the Linux kernel's cryptography
// subsystem. The Type and Name fields specify which type of hash or cipher
@@ -698,16 +697,19 @@ type SockaddrVM struct {
// CID and Port specify a context ID and port address for a VM socket.
// Guests have a unique CID, and hosts may have a well-known CID of:
// - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
+ // - VMADDR_CID_LOCAL: refers to local communication (loopback).
// - VMADDR_CID_HOST: refers to other processes on the host.
- CID uint32
- Port uint32
- raw RawSockaddrVM
+ CID uint32
+ Port uint32
+ Flags uint8
+ raw RawSockaddrVM
}
func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Family = AF_VSOCK
sa.raw.Port = sa.Port
sa.raw.Cid = sa.CID
+ sa.raw.Flags = sa.Flags
return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
}
@@ -839,6 +841,73 @@ func (sa *SockaddrTIPC) sockaddr() (unsafe.Pointer, _Socklen, error) {
return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil
}
+// SockaddrL2TPIP implements the Sockaddr interface for IPPROTO_L2TP/AF_INET sockets.
+type SockaddrL2TPIP struct {
+ Addr [4]byte
+ ConnId uint32
+ raw RawSockaddrL2TPIP
+}
+
+func (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Family = AF_INET
+ sa.raw.Conn_id = sa.ConnId
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.raw.Addr[i] = sa.Addr[i]
+ }
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil
+}
+
+// SockaddrL2TPIP6 implements the Sockaddr interface for IPPROTO_L2TP/AF_INET6 sockets.
+type SockaddrL2TPIP6 struct {
+ Addr [16]byte
+ ZoneId uint32
+ ConnId uint32
+ raw RawSockaddrL2TPIP6
+}
+
+func (sa *SockaddrL2TPIP6) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Family = AF_INET6
+ sa.raw.Conn_id = sa.ConnId
+ sa.raw.Scope_id = sa.ZoneId
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.raw.Addr[i] = sa.Addr[i]
+ }
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil
+}
+
+// SockaddrIUCV implements the Sockaddr interface for AF_IUCV sockets.
+type SockaddrIUCV struct {
+ UserID string
+ Name string
+ raw RawSockaddrIUCV
+}
+
+func (sa *SockaddrIUCV) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Family = AF_IUCV
+ // These are EBCDIC encoded by the kernel, but we still need to pad them
+ // with blanks. Initializing with blanks allows the caller to feed in either
+ // a padded or an unpadded string.
+ for i := 0; i < 8; i++ {
+ sa.raw.Nodeid[i] = ' '
+ sa.raw.User_id[i] = ' '
+ sa.raw.Name[i] = ' '
+ }
+ if len(sa.UserID) > 8 || len(sa.Name) > 8 {
+ return nil, 0, EINVAL
+ }
+ for i, b := range []byte(sa.UserID[:]) {
+ sa.raw.User_id[i] = int8(b)
+ }
+ for i, b := range []byte(sa.Name[:]) {
+ sa.raw.Name[i] = int8(b)
+ }
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrIUCV, nil
+}
+
+var socketProtocol = func(fd int) (int, error) {
+ return GetsockoptInt(fd, SOL_SOCKET, SO_PROTOCOL)
+}
+
func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
switch rsa.Addr.Family {
case AF_NETLINK:
@@ -889,35 +958,69 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
return sa, nil
case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
+ proto, err := socketProtocol(fd)
+ if err != nil {
+ return nil, err
+ }
+
+ switch proto {
+ case IPPROTO_L2TP:
+ pp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa))
+ sa := new(SockaddrL2TPIP)
+ sa.ConnId = pp.Conn_id
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.Addr[i] = pp.Addr[i]
+ }
+ return sa, nil
+ default:
+ pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
+ sa := new(SockaddrInet4)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.Addr[i] = pp.Addr[i]
+ }
+ return sa, nil
}
- return sa, nil
case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
+ proto, err := socketProtocol(fd)
+ if err != nil {
+ return nil, err
+ }
+
+ switch proto {
+ case IPPROTO_L2TP:
+ pp := (*RawSockaddrL2TPIP6)(unsafe.Pointer(rsa))
+ sa := new(SockaddrL2TPIP6)
+ sa.ConnId = pp.Conn_id
+ sa.ZoneId = pp.Scope_id
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.Addr[i] = pp.Addr[i]
+ }
+ return sa, nil
+ default:
+ pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
+ sa := new(SockaddrInet6)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ sa.ZoneId = pp.Scope_id
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.Addr[i] = pp.Addr[i]
+ }
+ return sa, nil
}
- return sa, nil
case AF_VSOCK:
pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
sa := &SockaddrVM{
- CID: pp.Cid,
- Port: pp.Port,
+ CID: pp.Cid,
+ Port: pp.Port,
+ Flags: pp.Flags,
}
return sa, nil
case AF_BLUETOOTH:
- proto, err := GetsockoptInt(fd, SOL_SOCKET, SO_PROTOCOL)
+ proto, err := socketProtocol(fd)
if err != nil {
return nil, err
}
@@ -986,6 +1089,61 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
}
return sa, nil
+ case AF_IUCV:
+ pp := (*RawSockaddrIUCV)(unsafe.Pointer(rsa))
+
+ var user [8]byte
+ var name [8]byte
+
+ for i := 0; i < 8; i++ {
+ user[i] = byte(pp.User_id[i])
+ name[i] = byte(pp.Name[i])
+ }
+
+ sa := &SockaddrIUCV{
+ UserID: string(user[:]),
+ Name: string(name[:]),
+ }
+ return sa, nil
+
+ case AF_CAN:
+ proto, err := socketProtocol(fd)
+ if err != nil {
+ return nil, err
+ }
+
+ pp := (*RawSockaddrCAN)(unsafe.Pointer(rsa))
+
+ switch proto {
+ case CAN_J1939:
+ sa := &SockaddrCANJ1939{
+ Ifindex: int(pp.Ifindex),
+ }
+ name := (*[8]byte)(unsafe.Pointer(&sa.Name))
+ for i := 0; i < 8; i++ {
+ name[i] = pp.Addr[i]
+ }
+ pgn := (*[4]byte)(unsafe.Pointer(&sa.PGN))
+ for i := 0; i < 4; i++ {
+ pgn[i] = pp.Addr[i+8]
+ }
+ addr := (*[1]byte)(unsafe.Pointer(&sa.Addr))
+ addr[0] = pp.Addr[12]
+ return sa, nil
+ default:
+ sa := &SockaddrCAN{
+ Ifindex: int(pp.Ifindex),
+ }
+ rx := (*[4]byte)(unsafe.Pointer(&sa.RxID))
+ for i := 0; i < 4; i++ {
+ rx[i] = pp.Addr[i]
+ }
+ tx := (*[4]byte)(unsafe.Pointer(&sa.TxID))
+ for i := 0; i < 4; i++ {
+ tx[i] = pp.Addr[i+4]
+ }
+ return sa, nil
+ }
}
return nil, EAFNOSUPPORT
}
@@ -1247,8 +1405,8 @@ func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error
return keyctlRestrictKeyringByType(KEYCTL_RESTRICT_KEYRING, ringid, keyType, restriction)
}
-//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
-//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
+//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
+//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
var msg Msghdr
@@ -1555,17 +1713,27 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Acct(path string) (err error)
//sys AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error)
//sys Adjtimex(buf *Timex) (state int, err error)
-//sys Capget(hdr *CapUserHeader, data *CapUserData) (err error)
-//sys Capset(hdr *CapUserHeader, data *CapUserData) (err error)
+//sysnb Capget(hdr *CapUserHeader, data *CapUserData) (err error)
+//sysnb Capset(hdr *CapUserHeader, data *CapUserData) (err error)
//sys Chdir(path string) (err error)
//sys Chroot(path string) (err error)
//sys ClockGetres(clockid int32, res *Timespec) (err error)
//sys ClockGettime(clockid int32, time *Timespec) (err error)
//sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error)
//sys Close(fd int) (err error)
+//sys CloseRange(first uint, last uint, flags uint) (err error)
//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys DeleteModule(name string, flags int) (err error)
//sys Dup(oldfd int) (fd int, err error)
+
+func Dup2(oldfd, newfd int) error {
+ // Android O and newer blocks dup2; riscv and arm64 don't implement dup2.
+ if runtime.GOOS == "android" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "arm64" {
+ return Dup3(oldfd, newfd, 0)
+ }
+ return dup2(oldfd, newfd)
+}
+
//sys Dup3(oldfd int, newfd int, flags int) (err error)
//sysnb EpollCreate1(flag int) (fd int, err error)
//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
@@ -1616,8 +1784,8 @@ func Getpgrp() (pid int) {
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
-//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
-//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
+//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
+//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
//sys read(fd int, p []byte) (n int, err error)
//sys Removexattr(path string, attr string) (err error)
@@ -1690,6 +1858,9 @@ func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) {
//sys Syncfs(fd int) (err error)
//sysnb Sysinfo(info *Sysinfo_t) (err error)
//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
+//sysnb TimerfdCreate(clockid int, flags int) (fd int, err error)
+//sysnb TimerfdGettime(fd int, currValue *ItimerSpec) (err error)
+//sysnb TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error)
//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
//sysnb Times(tms *Tms) (ticks uintptr, err error)
//sysnb Umask(mask int) (oldmask int)
@@ -1859,11 +2030,30 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
return int(n), nil
}
+func isGroupMember(gid int) bool {
+ groups, err := Getgroups()
+ if err != nil {
+ return false
+ }
+
+ for _, g := range groups {
+ if g == gid {
+ return true
+ }
+ }
+ return false
+}
+
//sys faccessat(dirfd int, path string, mode uint32) (err error)
+//sys Faccessat2(dirfd int, path string, mode uint32, flags int) (err error)
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- if flags & ^(AT_SYMLINK_NOFOLLOW|AT_EACCESS) != 0 {
- return EINVAL
+ if flags == 0 {
+ return faccessat(dirfd, path, mode)
+ }
+
+ if err := Faccessat2(dirfd, path, mode, flags); err != ENOSYS && err != EPERM {
+ return err
}
// The Linux kernel faccessat system call does not take any flags.
@@ -1872,8 +2062,8 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
// Because people naturally expect syscall.Faccessat to act
// like C faccessat, we do the same.
- if flags == 0 {
- return faccessat(dirfd, path, mode)
+ if flags & ^(AT_SYMLINK_NOFOLLOW|AT_EACCESS) != 0 {
+ return EINVAL
}
var st Stat_t
@@ -1916,7 +2106,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
gid = Getgid()
}
- if uint32(gid) == st.Gid {
+ if uint32(gid) == st.Gid || isGroupMember(gid) {
fmode = (st.Mode >> 3) & 7
} else {
fmode = st.Mode & 7
@@ -1930,8 +2120,8 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
return EACCES
}
-//sys nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) = SYS_NAME_TO_HANDLE_AT
-//sys openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) = SYS_OPEN_BY_HANDLE_AT
+//sys nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) = SYS_NAME_TO_HANDLE_AT
+//sys openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) = SYS_OPEN_BY_HANDLE_AT
// fileHandle is the argument to nameToHandleAt and openByHandleAt. We
// originally tried to generate it via unix/linux/types.go with "type
@@ -2017,6 +2207,18 @@ func Klogset(typ int, arg int) (err error) {
return nil
}
+// RemoteIovec is Iovec with the pointer replaced with an integer.
+// It is used for ProcessVMReadv and ProcessVMWritev, where the pointer
+// refers to a location in a different process' address space, which
+// would confuse the Go garbage collector.
+type RemoteIovec struct {
+ Base uintptr
+ Len int
+}
+
+//sys ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV
+//sys ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV
+
/*
* Unimplemented
*/
@@ -2111,7 +2313,6 @@ func Klogset(typ int, arg int) (err error) {
// TimerGetoverrun
// TimerGettime
// TimerSettime
-// Timerfd
// Tkill (obsolete)
// Tuxcall
// Umount2
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
index a8374b6..7b52e5d 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
@@ -2,9 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
+//go:build 386 && linux
// +build 386,linux
package unix
@@ -34,7 +32,7 @@ func Pipe(p []int) (err error) {
return
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
@@ -49,7 +47,7 @@ func Pipe2(p []int, flags int) (err error) {
// 64-bit file system and 32-bit uid calls
// (386 default is 32-bit file system and 16-bit uid).
-//sys Dup2(oldfd int, newfd int) (err error)
+//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
@@ -101,7 +99,7 @@ type rlimit32 struct {
Max uint32
}
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
+//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
const rlimInf32 = ^uint32(0)
const rlimInf64 = ^uint64(0)
@@ -132,7 +130,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
return
}
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
+//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
func Setrlimit(resource int, rlim *Rlimit) (err error) {
err = prlimit(0, resource, rlim, nil)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
index 8ed1d54..28b7641 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && linux
// +build amd64,linux
package unix
-//sys Dup2(oldfd int, newfd int) (err error)
+//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
@@ -138,7 +139,7 @@ func Pipe(p []int) (err error) {
return
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
index 21a4946..8b0f0f3 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build amd64,linux
-// +build !gccgo
+//go:build amd64 && linux && gc
+// +build amd64,linux,gc
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
index 99ae613..6887772 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm && linux
// +build arm,linux
package unix
import (
- "syscall"
"unsafe"
)
@@ -36,7 +36,7 @@ func Pipe(p []int) (err error) {
return
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
@@ -49,10 +49,6 @@ func Pipe2(p []int, flags int) (err error) {
return
}
-// Underlying system call writes to newoffset via pointer.
-// Implemented in assembly to avoid allocation.
-func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
-
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
newoffset, errno := seek(fd, offset, whence)
if errno != 0 {
@@ -80,7 +76,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// 64-bit file system and 32-bit uid calls
// (16-bit uid calls are not always supported in newer kernels)
-//sys Dup2(oldfd int, newfd int) (err error)
+//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
@@ -134,8 +130,8 @@ func Utime(path string, buf *Utimbuf) error {
//sys utimes(path string, times *[2]Timeval) (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
@@ -182,7 +178,7 @@ type rlimit32 struct {
Max uint32
}
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT
+//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT
const rlimInf32 = ^uint32(0)
const rlimInf64 = ^uint64(0)
@@ -213,7 +209,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
return
}
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
+//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
func Setrlimit(resource int, rlim *Rlimit) (err error) {
err = prlimit(0, resource, rlim, nil)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
index 807a0b2..7ed7034 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm64 && linux
// +build arm64,linux
package unix
@@ -25,7 +26,7 @@ func EpollCreate(size int) (fd int, err error) {
//sysnb Getegid() (egid int)
//sysnb Geteuid() (euid int)
//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb getrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Getuid() (uid int)
//sys Listen(s int, n int) (err error)
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
@@ -47,7 +48,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb setrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
@@ -155,7 +156,7 @@ func Pipe(p []int) (err error) {
return
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
@@ -168,6 +169,24 @@ func Pipe2(p []int, flags int) (err error) {
return
}
+// Getrlimit prefers the prlimit64 system call. See issue 38604.
+func Getrlimit(resource int, rlim *Rlimit) error {
+ err := prlimit(0, resource, nil, rlim)
+ if err != ENOSYS {
+ return err
+ }
+ return getrlimit(resource, rlim)
+}
+
+// Setrlimit prefers the prlimit64 system call. See issue 38604.
+func Setrlimit(resource int, rlim *Rlimit) error {
+ err := prlimit(0, resource, rlim, nil)
+ if err != ENOSYS {
+ return err
+ }
+ return setrlimit(resource, rlim)
+}
+
func (r *PtraceRegs) PC() uint64 { return r.Pc }
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
@@ -192,9 +211,9 @@ func InotifyInit() (fd int, err error) {
return InotifyInit1(0)
}
-func Dup2(oldfd int, newfd int) (err error) {
- return Dup3(oldfd, newfd, 0)
-}
+// dup2 exists because func Dup3 in syscall_linux.go references
+// it in an unreachable path. dup2 isn't available on arm64.
+func dup2(oldfd int, newfd int) error
func Pause() error {
_, err := ppoll(nil, 0, nil, nil)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gc.go b/vendor/golang.org/x/sys/unix/syscall_linux_gc.go
index c26e6ec..2b1168d 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_gc.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_gc.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux,!gccgo
+//go:build linux && gc
+// +build linux,gc
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
index 070bd38..9843fb4 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux,!gccgo,386
+//go:build linux && gc && 386
+// +build linux,gc,386
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go
new file mode 100644
index 0000000..a6008fc
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go
@@ -0,0 +1,14 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build arm && gc && linux
+// +build arm,gc,linux
+
+package unix
+
+import "syscall"
+
+// Underlying system call writes to newoffset via pointer.
+// Implemented in assembly to avoid allocation.
+func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
index 308eb7a..7740af2 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && gccgo && 386
// +build linux,gccgo,386
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
index aa7fc9e..e16a122 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && gccgo && arm
// +build linux,gccgo,arm
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
index 85a872d..06dec06 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && (mips64 || mips64le)
// +build linux
// +build mips64 mips64le
package unix
-//sys Dup2(oldfd int, newfd int) (err error)
+//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
@@ -104,7 +105,7 @@ func Pipe(p []int) (err error) {
return
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
@@ -216,6 +217,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
+func InotifyInit() (fd int, err error) {
+ return InotifyInit1(0)
+}
+
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
@@ -224,8 +229,3 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
}
return poll(&fds[0], len(fds), timeout)
}
-
-func InotifyInit() (fd int, err error) {
- return InotifyInit1(0)
-}
-
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
index e286c6b..8f0d0a5 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && (mips || mipsle)
// +build linux
// +build mips mipsle
@@ -14,7 +15,7 @@ import (
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-//sys Dup2(oldfd int, newfd int) (err error)
+//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
@@ -112,7 +113,7 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)}
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
@@ -125,7 +126,7 @@ func Pipe2(p []int, flags int) (err error) {
return
}
-//sysnb pipe() (p1 int, p2 int, err error)
+//sysnb pipe() (p1 int, p2 int, err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
@@ -153,7 +154,7 @@ type rlimit32 struct {
Max uint32
}
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
+//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
func Getrlimit(resource int, rlim *Rlimit) (err error) {
err = prlimit(0, resource, nil, rlim)
@@ -181,7 +182,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
return
}
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
+//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
func Setrlimit(resource int, rlim *Rlimit) (err error) {
err = prlimit(0, resource, rlim, nil)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
new file mode 100644
index 0000000..7e65e08
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
@@ -0,0 +1,272 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build linux && ppc
+// +build linux
+// +build ppc
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+//sys dup2(oldfd int, newfd int) (err error)
+//sysnb EpollCreate(size int) (fd int, err error)
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
+//sys Fchown(fd int, uid int, gid int) (err error)
+//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
+//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
+//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
+//sysnb Getegid() (egid int)
+//sysnb Geteuid() (euid int)
+//sysnb Getgid() (gid int)
+//sysnb Getuid() (uid int)
+//sysnb InotifyInit() (fd int, err error)
+//sys Ioperm(from int, num int, on int) (err error)
+//sys Iopl(level int) (err error)
+//sys Lchown(path string, uid int, gid int) (err error)
+//sys Listen(s int, n int) (err error)
+//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
+//sys Pause() (err error)
+//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
+//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
+//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
+//sys setfsgid(gid int) (prev int, err error)
+//sys setfsuid(uid int) (prev int, err error)
+//sysnb Setregid(rgid int, egid int) (err error)
+//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
+//sysnb Setresuid(ruid int, euid int, suid int) (err error)
+//sysnb Setreuid(ruid int, euid int) (err error)
+//sys Shutdown(fd int, how int) (err error)
+//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
+//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
+//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
+//sys Ustat(dev int, ubuf *Ustat_t) (err error)
+//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
+//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
+//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
+//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
+//sysnb setgroups(n int, list *_Gid_t) (err error)
+//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
+//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
+//sysnb socket(domain int, typ int, proto int) (fd int, err error)
+//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
+//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
+//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
+//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
+//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
+
+//sys futimesat(dirfd int, path string, times *[2]Timeval) (err error)
+//sysnb Gettimeofday(tv *Timeval) (err error)
+//sysnb Time(t *Time_t) (tt Time_t, err error)
+//sys Utime(path string, buf *Utimbuf) (err error)
+//sys utimes(path string, times *[2]Timeval) (err error)
+
+func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
+ _, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(advice), uintptr(offset>>32), uintptr(offset), uintptr(length>>32), uintptr(length))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
+ var newoffset int64
+ offsetLow := uint32(offset & 0xffffffff)
+ offsetHigh := uint32((offset >> 32) & 0xffffffff)
+ _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
+ return newoffset, err
+}
+
+func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
+ newoffset, errno := seek(fd, offset, whence)
+ if errno != 0 {
+ return 0, errno
+ }
+ return newoffset, nil
+}
+
+func Fstatfs(fd int, buf *Statfs_t) (err error) {
+ _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
+ if e != 0 {
+ err = e
+ }
+ return
+}
+
+func Statfs(path string, buf *Statfs_t) (err error) {
+ pathp, err := BytePtrFromString(path)
+ if err != nil {
+ return err
+ }
+ _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
+ if e != 0 {
+ err = e
+ }
+ return
+}
+
+//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
+
+func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
+ page := uintptr(offset / 4096)
+ if offset != int64(page)*4096 {
+ return 0, EINVAL
+ }
+ return mmap2(addr, length, prot, flags, fd, page)
+}
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: int32(sec), Usec: int32(usec)}
+}
+
+type rlimit32 struct {
+ Cur uint32
+ Max uint32
+}
+
+//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT
+
+const rlimInf32 = ^uint32(0)
+const rlimInf64 = ^uint64(0)
+
+func Getrlimit(resource int, rlim *Rlimit) (err error) {
+ err = prlimit(0, resource, nil, rlim)
+ if err != ENOSYS {
+ return err
+ }
+
+ rl := rlimit32{}
+ err = getrlimit(resource, &rl)
+ if err != nil {
+ return
+ }
+
+ if rl.Cur == rlimInf32 {
+ rlim.Cur = rlimInf64
+ } else {
+ rlim.Cur = uint64(rl.Cur)
+ }
+
+ if rl.Max == rlimInf32 {
+ rlim.Max = rlimInf64
+ } else {
+ rlim.Max = uint64(rl.Max)
+ }
+ return
+}
+
+//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
+
+func Setrlimit(resource int, rlim *Rlimit) (err error) {
+ err = prlimit(0, resource, rlim, nil)
+ if err != ENOSYS {
+ return err
+ }
+
+ rl := rlimit32{}
+ if rlim.Cur == rlimInf64 {
+ rl.Cur = rlimInf32
+ } else if rlim.Cur < uint64(rlimInf32) {
+ rl.Cur = uint32(rlim.Cur)
+ } else {
+ return EINVAL
+ }
+ if rlim.Max == rlimInf64 {
+ rl.Max = rlimInf32
+ } else if rlim.Max < uint64(rlimInf32) {
+ rl.Max = uint32(rlim.Max)
+ } else {
+ return EINVAL
+ }
+
+ return setrlimit(resource, &rl)
+}
+
+func (r *PtraceRegs) PC() uint32 { return r.Nip }
+
+func (r *PtraceRegs) SetPC(pc uint32) { r.Nip = pc }
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint32(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint32(length)
+}
+
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint32(length)
+}
+
+//sysnb pipe(p *[2]_C_int) (err error)
+
+func Pipe(p []int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe(&pp)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe2(&pp, flags)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ if len(fds) == 0 {
+ return poll(nil, 0, timeout)
+ }
+ return poll(&fds[0], len(fds), timeout)
+}
+
+//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
+
+func SyncFileRange(fd int, off int64, n int64, flags int) error {
+ // The sync_file_range and sync_file_range2 syscalls differ only in the
+ // order of their arguments.
+ return syncFileRange2(fd, flags, off, n)
+}
+
+//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
+
+func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
+ cmdlineLen := len(cmdline)
+ if cmdlineLen > 0 {
+ // Account for the additional NULL byte added by
+ // BytePtrFromString in kexecFileLoad. The kexec_file_load
+ // syscall expects a NULL-terminated string.
+ cmdlineLen++
+ }
+ return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
index ca0345a..0b1f0d6 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && (ppc64 || ppc64le)
// +build linux
// +build ppc64 ppc64le
package unix
-//sys Dup2(oldfd int, newfd int) (err error)
+//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
@@ -99,7 +100,7 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
-//sysnb pipe(p *[2]_C_int) (err error)
+//sysnb pipe(p *[2]_C_int) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
@@ -112,7 +113,7 @@ func Pipe(p []int) (err error) {
return
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
index abdabba..ce9bcd3 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build riscv64 && linux
// +build riscv64,linux
package unix
@@ -154,7 +155,7 @@ func Pipe(p []int) (err error) {
return
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
@@ -191,10 +192,6 @@ func InotifyInit() (fd int, err error) {
return InotifyInit1(0)
}
-func Dup2(oldfd int, newfd int) (err error) {
- return Dup3(oldfd, newfd, 0)
-}
-
func Pause() error {
_, err := ppoll(nil, 0, nil, nil)
return err
@@ -228,3 +225,7 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
}
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
}
+
+// dup2 exists because func Dup3 in syscall_linux.go references
+// it in an unreachable path. dup2 isn't available on arm64.
+func dup2(oldfd int, newfd int) error
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
index 533e930..a1e4569 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build s390x && linux
// +build s390x,linux
package unix
@@ -10,7 +11,7 @@ import (
"unsafe"
)
-//sys Dup2(oldfd int, newfd int) (err error)
+//sys dup2(oldfd int, newfd int) (err error)
//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
@@ -76,7 +77,7 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: usec}
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
@@ -249,7 +250,7 @@ func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen
}
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error {
- args := [4]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val)}
+ args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen}
_, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
if err != 0 {
return err
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
index d890a22..49055a3 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build sparc64 && linux
// +build sparc64,linux
package unix
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
-//sys Dup2(oldfd int, newfd int) (err error)
+//sys dup2(oldfd int, newfd int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstat(fd int, stat *Stat_t) (err error)
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
@@ -115,7 +116,7 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
-//sysnb pipe(p *[2]_C_int) (err error)
+//sysnb pipe(p *[2]_C_int) (err error)
func Pipe(p []int) (err error) {
if len(p) != 2 {
@@ -128,7 +129,7 @@ func Pipe(p []int) (err error) {
return
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
func Pipe2(p []int, flags int) (err error) {
if len(p) != 2 {
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
index 45b50a6..853d5f0 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
@@ -31,6 +31,10 @@ type SockaddrDatalink struct {
raw RawSockaddrDatalink
}
+func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
+ return nil, EAFNOSUPPORT
+}
+
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) {
@@ -106,7 +110,8 @@ func direntNamlen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
}
-//sysnb pipe() (fd1 int, fd2 int, err error)
+//sysnb pipe() (fd1 int, fd2 int, err error)
+
func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
@@ -115,7 +120,21 @@ func Pipe(p []int) (err error) {
return
}
-//sys Getdents(fd int, buf []byte) (n int, err error)
+//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
+}
+
+//sys Getdents(fd int, buf []byte) (n int, err error)
+
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
n, err = Getdents(fd, buf)
if err != nil || basep == nil {
@@ -141,23 +160,8 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
return
}
-const ImplementsGetwd = true
-
//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
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
return -1, ENOSYS
@@ -170,7 +174,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) {
var value Ptmget
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
index 24da8b5..5199d28 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build 386 && netbsd
// +build 386,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
index 25a0ac8..70a9c52 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && netbsd
// +build amd64,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
index 21591ec..3eb5942 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm && netbsd
// +build arm,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
index 8047496..fc6ccfd 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm64 && netbsd
// +build arm64,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
index a266e92..22b5503 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
@@ -31,6 +31,10 @@ type SockaddrDatalink struct {
raw RawSockaddrDatalink
}
+func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
+ return nil, EAFNOSUPPORT
+}
+
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func nametomib(name string) (mib []_C_int, err error) {
@@ -88,7 +92,7 @@ func Pipe2(p []int, flags int) error {
return err
}
-//sys Getdents(fd int, buf []byte) (n int, err error)
+//sys Getdents(fd int, buf []byte) (n int, err error)
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
n, err = Getdents(fd, buf)
if err != nil || basep == nil {
@@ -114,23 +118,8 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
return
}
-const ImplementsGetwd = true
-
//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) {
if raceenabled {
raceReleaseMerge(unsafe.Pointer(&ioSync))
@@ -165,7 +154,7 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
//sys ioctl(fd int, req uint, arg uintptr) (err error)
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
+//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
index 42b5a0e..6baabcd 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build 386 && openbsd
// +build 386,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
index 6ea4b48..bab2536 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && openbsd
// +build amd64,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
index 1c3d26f..8eed3c4 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm && openbsd
// +build arm,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
index a8c458c..483dde9 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build arm64 && openbsd
// +build arm64,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go
new file mode 100644
index 0000000..30f2853
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go
@@ -0,0 +1,35 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package unix
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: sec, Usec: usec}
+}
+
+func SetKevent(k *Kevent_t, fd, mode, flags int) {
+ k.Ident = uint64(fd)
+ k.Filter = int16(mode)
+ k.Flags = uint16(flags)
+}
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint32(length)
+}
+
+// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
+// of OpenBSD the syscall is called sysctl instead of __sysctl.
+const SYS___SYSCTL = SYS_SYSCTL
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go
index 0e2a696..77fcde7 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -13,6 +13,7 @@
package unix
import (
+ "runtime"
"syscall"
"unsafe"
)
@@ -67,6 +68,19 @@ func Pipe(p []int) (err error) {
return nil
}
+//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
+}
+
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
if sa.Port < 0 || sa.Port > 0xFFFF {
return nil, 0, EINVAL
@@ -551,10 +565,17 @@ func Minor(dev uint64) uint32 {
* Expose the ioctl function
*/
-//sys ioctl(fd int, req uint, arg uintptr) (err error)
+//sys ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl
+
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, err = ioctlRet(fd, req, arg)
+ return err
+}
-func IoctlSetTermio(fd int, req uint, value *Termio) (err error) {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+func IoctlSetTermio(fd int, req uint, value *Termio) error {
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+ runtime.KeepAlive(value)
+ return err
}
func IoctlGetTermio(fd int, req uint) (*Termio, error) {
@@ -563,7 +584,7 @@ func IoctlGetTermio(fd int, req uint) (*Termio, error) {
return &value, err
}
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
@@ -666,6 +687,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Statvfs(path string, vfsstat *Statvfs_t) (err error)
//sys Symlink(path string, link string) (err error)
//sys Sync() (err error)
+//sys Sysconf(which int) (n int64, err error)
//sysnb Times(tms *Tms) (ticks uintptr, err error)
//sys Truncate(path string, length int64) (err error)
//sys Fsync(fd int) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
index b22a34d..0bd25ef 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build amd64 && solaris
// +build amd64,solaris
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go
index 3de3756..a7618ce 100644
--- a/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package unix
@@ -12,6 +13,8 @@ import (
"sync"
"syscall"
"unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
)
var (
@@ -76,7 +79,7 @@ func SignalName(s syscall.Signal) string {
// The signal name should start with "SIG".
func SignalNum(s string) syscall.Signal {
signalNameMapOnce.Do(func() {
- signalNameMap = make(map[string]syscall.Signal)
+ signalNameMap = make(map[string]syscall.Signal, len(signalList))
for _, signal := range signalList {
signalNameMap[signal.name] = signal.num
}
@@ -113,15 +116,12 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d
return nil, errno
}
- // Slice memory layout
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{addr, length, length}
-
- // Use unsafe to turn sl into a []byte.
- b := *(*[]byte)(unsafe.Pointer(&sl))
+ // Use unsafe to convert addr into a []byte.
+ var b []byte
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
+ hdr.Data = unsafe.Pointer(addr)
+ hdr.Cap = length
+ hdr.Len = length
// Register mapping in m and return it.
p := &b[cap(b)-1]
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_gc.go b/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
index 1c70d1b..5898e9a 100644
--- a/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
@@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-// +build !gccgo,!ppc64le,!ppc64
+// +build gc
+// +build !ppc64le
+// +build !ppc64
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go
index 86dc765..f6f707a 100644
--- a/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build linux && (ppc64le || ppc64) && gc
// +build linux
// +build ppc64le ppc64
-// +build !gccgo
+// +build gc
package unix
diff --git a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
new file mode 100644
index 0000000..13f58d2
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
@@ -0,0 +1,1781 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build zos && s390x
+// +build zos,s390x
+
+package unix
+
+import (
+ "bytes"
+ "runtime"
+ "sort"
+ "sync"
+ "syscall"
+ "unsafe"
+)
+
+const (
+ O_CLOEXEC = 0 // Dummy value (not supported).
+ AF_LOCAL = AF_UNIX // AF_LOCAL is an alias for AF_UNIX
+)
+
+func syscall_syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_rawsyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_rawsyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_rawsyscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno)
+
+func copyStat(stat *Stat_t, statLE *Stat_LE_t) {
+ stat.Dev = uint64(statLE.Dev)
+ stat.Ino = uint64(statLE.Ino)
+ stat.Nlink = uint64(statLE.Nlink)
+ stat.Mode = uint32(statLE.Mode)
+ stat.Uid = uint32(statLE.Uid)
+ stat.Gid = uint32(statLE.Gid)
+ stat.Rdev = uint64(statLE.Rdev)
+ stat.Size = statLE.Size
+ stat.Atim.Sec = int64(statLE.Atim)
+ stat.Atim.Nsec = 0 //zos doesn't return nanoseconds
+ stat.Mtim.Sec = int64(statLE.Mtim)
+ stat.Mtim.Nsec = 0 //zos doesn't return nanoseconds
+ stat.Ctim.Sec = int64(statLE.Ctim)
+ stat.Ctim.Nsec = 0 //zos doesn't return nanoseconds
+ stat.Blksize = int64(statLE.Blksize)
+ stat.Blocks = statLE.Blocks
+}
+
+func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64)
+func svcLoad(name *byte) unsafe.Pointer
+func svcUnload(name *byte, fnptr unsafe.Pointer) int64
+
+func (d *Dirent) NameString() string {
+ if d == nil {
+ return ""
+ }
+ return string(d.Name[:d.Namlen])
+}
+
+func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ if sa.Port < 0 || sa.Port > 0xFFFF {
+ return nil, 0, EINVAL
+ }
+ sa.raw.Len = SizeofSockaddrInet4
+ sa.raw.Family = AF_INET
+ p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
+ p[0] = byte(sa.Port >> 8)
+ p[1] = byte(sa.Port)
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.raw.Addr[i] = sa.Addr[i]
+ }
+ return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
+}
+
+func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ if sa.Port < 0 || sa.Port > 0xFFFF {
+ return nil, 0, EINVAL
+ }
+ sa.raw.Len = SizeofSockaddrInet6
+ sa.raw.Family = AF_INET6
+ p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
+ p[0] = byte(sa.Port >> 8)
+ p[1] = byte(sa.Port)
+ sa.raw.Scope_id = sa.ZoneId
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.raw.Addr[i] = sa.Addr[i]
+ }
+ return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
+}
+
+func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ name := sa.Name
+ n := len(name)
+ if n >= len(sa.raw.Path) || n == 0 {
+ return nil, 0, EINVAL
+ }
+ sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL
+ sa.raw.Family = AF_UNIX
+ for i := 0; i < n; i++ {
+ sa.raw.Path[i] = int8(name[i])
+ }
+ return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
+}
+
+func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
+ // TODO(neeilan): Implement use of first param (fd)
+ switch rsa.Addr.Family {
+ case AF_UNIX:
+ pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
+ sa := new(SockaddrUnix)
+ // For z/OS, only replace NUL with @ when the
+ // length is not zero.
+ if pp.Len != 0 && pp.Path[0] == 0 {
+ // "Abstract" Unix domain socket.
+ // Rewrite leading NUL as @ for textual display.
+ // (This is the standard convention.)
+ // Not friendly to overwrite in place,
+ // but the callers below don't care.
+ pp.Path[0] = '@'
+ }
+
+ // Assume path ends at NUL.
+ //
+ // For z/OS, the length of the name is a field
+ // in the structure. To be on the safe side, we
+ // will still scan the name for a NUL but only
+ // to the length provided in the structure.
+ //
+ // This is not technically the Linux semantics for
+ // abstract Unix domain sockets--they are supposed
+ // to be uninterpreted fixed-size binary blobs--but
+ // everyone uses this convention.
+ n := 0
+ for n < int(pp.Len) && pp.Path[n] != 0 {
+ n++
+ }
+ bytes := (*[len(pp.Path)]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
+ sa.Name = string(bytes)
+ return sa, nil
+
+ case AF_INET:
+ pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
+ sa := new(SockaddrInet4)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.Addr[i] = pp.Addr[i]
+ }
+ return sa, nil
+
+ case AF_INET6:
+ pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
+ sa := new(SockaddrInet6)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ sa.ZoneId = pp.Scope_id
+ for i := 0; i < len(sa.Addr); i++ {
+ sa.Addr[i] = pp.Addr[i]
+ }
+ return sa, nil
+ }
+ return nil, EAFNOSUPPORT
+}
+
+func Accept(fd int) (nfd int, sa Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ var len _Socklen = SizeofSockaddrAny
+ nfd, err = accept(fd, &rsa, &len)
+ if err != nil {
+ return
+ }
+ // TODO(neeilan): Remove 0 in call
+ sa, err = anyToSockaddr(0, &rsa)
+ if err != nil {
+ Close(nfd)
+ nfd = 0
+ }
+ return
+}
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = int32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = int32(length)
+}
+
+//sys fcntl(fd int, cmd int, arg int) (val int, err error)
+//sys read(fd int, p []byte) (n int, err error)
+//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
+//sys write(fd int, p []byte) (n int, err error)
+
+//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = SYS___ACCEPT_A
+//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___BIND_A
+//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___CONNECT_A
+//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
+//sysnb setgroups(n int, list *_Gid_t) (err error)
+//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
+//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
+//sysnb socket(domain int, typ int, proto int) (fd int, err error)
+//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
+//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = SYS___GETPEERNAME_A
+//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = SYS___GETSOCKNAME_A
+//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = SYS___RECVFROM_A
+//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = SYS___SENDTO_A
+//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___RECVMSG_A
+//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___SENDMSG_A
+//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) = SYS_MMAP
+//sys munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP
+//sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
+
+//sys Access(path string, mode uint32) (err error) = SYS___ACCESS_A
+//sys Chdir(path string) (err error) = SYS___CHDIR_A
+//sys Chown(path string, uid int, gid int) (err error) = SYS___CHOWN_A
+//sys Chmod(path string, mode uint32) (err error) = SYS___CHMOD_A
+//sys Creat(path string, mode uint32) (fd int, err error) = SYS___CREAT_A
+//sys Dup(oldfd int) (fd int, err error)
+//sys Dup2(oldfd int, newfd int) (err error)
+//sys Exit(code int)
+//sys Fchdir(fd int) (err error)
+//sys Fchmod(fd int, mode uint32) (err error)
+//sys Fchown(fd int, uid int, gid int) (err error)
+//sys FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) = SYS_FCNTL
+//sys fstat(fd int, stat *Stat_LE_t) (err error)
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ var statLE Stat_LE_t
+ err = fstat(fd, &statLE)
+ copyStat(stat, &statLE)
+ return
+}
+
+//sys Fstatvfs(fd int, stat *Statvfs_t) (err error) = SYS_FSTATVFS
+//sys Fsync(fd int) (err error)
+//sys Ftruncate(fd int, length int64) (err error)
+//sys Getpagesize() (pgsize int) = SYS_GETPAGESIZE
+//sys Mprotect(b []byte, prot int) (err error) = SYS_MPROTECT
+//sys Msync(b []byte, flags int) (err error) = SYS_MSYNC
+//sys Poll(fds []PollFd, timeout int) (n int, err error) = SYS_POLL
+//sys Times(tms *Tms) (ticks uintptr, err error) = SYS_TIMES
+//sys W_Getmntent(buff *byte, size int) (lastsys int, err error) = SYS_W_GETMNTENT
+
+//sys Mount(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) = SYS___MOUNT_A
+//sys Unmount(filesystem string, mtm int) (err error) = SYS___UMOUNT_A
+//sys Chroot(path string) (err error) = SYS___CHROOT_A
+//sysnb Uname(buf *Utsname) (err error) = SYS___UNAME_A
+
+func Ptsname(fd int) (name string, err error) {
+ r0, _, e1 := syscall_syscall(SYS___PTSNAME_A, uintptr(fd), 0, 0)
+ name = u2s(unsafe.Pointer(r0))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func u2s(cstr unsafe.Pointer) string {
+ str := (*[1024]uint8)(cstr)
+ i := 0
+ for str[i] != 0 {
+ i++
+ }
+ return string(str[:i])
+}
+
+func Close(fd int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ for i := 0; e1 == EAGAIN && i < 10; i++ {
+ _, _, _ = syscall_syscall(SYS_USLEEP, uintptr(10), 0, 0)
+ _, _, e1 = syscall_syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ }
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var mapper = &mmapper{
+ active: make(map[*byte][]byte),
+ mmap: mmap,
+ munmap: munmap,
+}
+
+// Dummy function: there are no semantics for Madvise on z/OS
+func Madvise(b []byte, advice int) (err error) {
+ return
+}
+
+func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
+ return mapper.Mmap(fd, offset, length, prot, flags)
+}
+
+func Munmap(b []byte) (err error) {
+ return mapper.Munmap(b)
+}
+
+//sys Gethostname(buf []byte) (err error) = SYS___GETHOSTNAME_A
+//sysnb Getegid() (egid int)
+//sysnb Geteuid() (uid int)
+//sysnb Getgid() (gid int)
+//sysnb Getpid() (pid int)
+//sysnb Getpgid(pid int) (pgid int, err error) = SYS_GETPGID
+
+func Getpgrp() (pid int) {
+ pid, _ = Getpgid(0)
+ return
+}
+
+//sysnb Getppid() (pid int)
+//sys Getpriority(which int, who int) (prio int, err error)
+//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_GETRLIMIT
+
+//sysnb getrusage(who int, rusage *rusage_zos) (err error) = SYS_GETRUSAGE
+
+func Getrusage(who int, rusage *Rusage) (err error) {
+ var ruz rusage_zos
+ err = getrusage(who, &ruz)
+ //Only the first two fields of Rusage are set
+ rusage.Utime.Sec = ruz.Utime.Sec
+ rusage.Utime.Usec = int64(ruz.Utime.Usec)
+ rusage.Stime.Sec = ruz.Stime.Sec
+ rusage.Stime.Usec = int64(ruz.Stime.Usec)
+ return
+}
+
+//sysnb Getsid(pid int) (sid int, err error) = SYS_GETSID
+//sysnb Getuid() (uid int)
+//sysnb Kill(pid int, sig Signal) (err error)
+//sys Lchown(path string, uid int, gid int) (err error) = SYS___LCHOWN_A
+//sys Link(path string, link string) (err error) = SYS___LINK_A
+//sys Listen(s int, n int) (err error)
+//sys lstat(path string, stat *Stat_LE_t) (err error) = SYS___LSTAT_A
+
+func Lstat(path string, stat *Stat_t) (err error) {
+ var statLE Stat_LE_t
+ err = lstat(path, &statLE)
+ copyStat(stat, &statLE)
+ return
+}
+
+//sys Mkdir(path string, mode uint32) (err error) = SYS___MKDIR_A
+//sys Mkfifo(path string, mode uint32) (err error) = SYS___MKFIFO_A
+//sys Mknod(path string, mode uint32, dev int) (err error) = SYS___MKNOD_A
+//sys Pread(fd int, p []byte, offset int64) (n int, err error)
+//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
+//sys Readlink(path string, buf []byte) (n int, err error) = SYS___READLINK_A
+//sys Rename(from string, to string) (err error) = SYS___RENAME_A
+//sys Rmdir(path string) (err error) = SYS___RMDIR_A
+//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
+//sys Setpriority(which int, who int, prio int) (err error)
+//sysnb Setpgid(pid int, pgid int) (err error) = SYS_SETPGID
+//sysnb Setrlimit(resource int, lim *Rlimit) (err error)
+//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID
+//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID
+//sysnb Setsid() (pid int, err error) = SYS_SETSID
+//sys Setuid(uid int) (err error) = SYS_SETUID
+//sys Setgid(uid int) (err error) = SYS_SETGID
+//sys Shutdown(fd int, how int) (err error)
+//sys stat(path string, statLE *Stat_LE_t) (err error) = SYS___STAT_A
+
+func Stat(path string, sta *Stat_t) (err error) {
+ var statLE Stat_LE_t
+ err = stat(path, &statLE)
+ copyStat(sta, &statLE)
+ return
+}
+
+//sys Symlink(path string, link string) (err error) = SYS___SYMLINK_A
+//sys Sync() = SYS_SYNC
+//sys Truncate(path string, length int64) (err error) = SYS___TRUNCATE_A
+//sys Tcgetattr(fildes int, termptr *Termios) (err error) = SYS_TCGETATTR
+//sys Tcsetattr(fildes int, when int, termptr *Termios) (err error) = SYS_TCSETATTR
+//sys Umask(mask int) (oldmask int)
+//sys Unlink(path string) (err error) = SYS___UNLINK_A
+//sys Utime(path string, utim *Utimbuf) (err error) = SYS___UTIME_A
+
+//sys open(path string, mode int, perm uint32) (fd int, err error) = SYS___OPEN_A
+
+func Open(path string, mode int, perm uint32) (fd int, err error) {
+ return open(path, mode, perm)
+}
+
+func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
+ wd, err := Getwd()
+ if err != nil {
+ return err
+ }
+
+ if err := Fchdir(dirfd); err != nil {
+ return err
+ }
+ defer Chdir(wd)
+
+ return Mkfifo(path, mode)
+}
+
+//sys remove(path string) (err error)
+
+func Remove(path string) error {
+ return remove(path)
+}
+
+const ImplementsGetwd = true
+
+func Getcwd(buf []byte) (n int, err error) {
+ var p unsafe.Pointer
+ if len(buf) > 0 {
+ p = unsafe.Pointer(&buf[0])
+ } else {
+ p = unsafe.Pointer(&_zero)
+ }
+ _, _, e := syscall_syscall(SYS___GETCWD_A, uintptr(p), uintptr(len(buf)), 0)
+ n = clen(buf) + 1
+ if e != 0 {
+ err = errnoErr(e)
+ }
+ return
+}
+
+func Getwd() (wd string, err error) {
+ var buf [PathMax]byte
+ n, err := Getcwd(buf[0:])
+ if err != nil {
+ return "", err
+ }
+ // Getcwd returns the number of bytes written to buf, including the NUL.
+ if n < 1 || n > len(buf) || buf[n-1] != 0 {
+ return "", EINVAL
+ }
+ return string(buf[0 : n-1]), nil
+}
+
+func Getgroups() (gids []int, err error) {
+ n, err := getgroups(0, nil)
+ if err != nil {
+ return nil, err
+ }
+ if n == 0 {
+ return nil, nil
+ }
+
+ // Sanity check group count. Max is 1<<16 on Linux.
+ if n < 0 || n > 1<<20 {
+ return nil, EINVAL
+ }
+
+ a := make([]_Gid_t, n)
+ n, err = getgroups(n, &a[0])
+ if err != nil {
+ return nil, err
+ }
+ gids = make([]int, n)
+ for i, v := range a[0:n] {
+ gids[i] = int(v)
+ }
+ return
+}
+
+func Setgroups(gids []int) (err error) {
+ if len(gids) == 0 {
+ return setgroups(0, nil)
+ }
+
+ a := make([]_Gid_t, len(gids))
+ for i, v := range gids {
+ a[i] = _Gid_t(v)
+ }
+ return setgroups(len(a), &a[0])
+}
+
+func gettid() uint64
+
+func Gettid() (tid int) {
+ return int(gettid())
+}
+
+type WaitStatus uint32
+
+// Wait status is 7 bits at bottom, either 0 (exited),
+// 0x7F (stopped), or a signal number that caused an exit.
+// The 0x80 bit is whether there was a core dump.
+// An extra number (exit code, signal causing a stop)
+// is in the high bits. At least that's the idea.
+// There are various irregularities. For example, the
+// "continued" status is 0xFFFF, distinguishing itself
+// from stopped via the core dump bit.
+
+const (
+ mask = 0x7F
+ core = 0x80
+ exited = 0x00
+ stopped = 0x7F
+ shift = 8
+)
+
+func (w WaitStatus) Exited() bool { return w&mask == exited }
+
+func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited }
+
+func (w WaitStatus) Stopped() bool { return w&0xFF == stopped }
+
+func (w WaitStatus) Continued() bool { return w == 0xFFFF }
+
+func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
+
+func (w WaitStatus) ExitStatus() int {
+ if !w.Exited() {
+ return -1
+ }
+ return int(w>>shift) & 0xFF
+}
+
+func (w WaitStatus) Signal() Signal {
+ if !w.Signaled() {
+ return -1
+ }
+ return Signal(w & mask)
+}
+
+func (w WaitStatus) StopSignal() Signal {
+ if !w.Stopped() {
+ return -1
+ }
+ return Signal(w>>shift) & 0xFF
+}
+
+func (w WaitStatus) TrapCause() int { return -1 }
+
+//sys waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error)
+
+func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
+ // TODO(mundaym): z/OS doesn't have wait4. I don't think getrusage does what we want.
+ // At the moment rusage will not be touched.
+ var status _C_int
+ wpid, err = waitpid(pid, &status, options)
+ if wstatus != nil {
+ *wstatus = WaitStatus(status)
+ }
+ return
+}
+
+//sysnb gettimeofday(tv *timeval_zos) (err error)
+
+func Gettimeofday(tv *Timeval) (err error) {
+ var tvz timeval_zos
+ err = gettimeofday(&tvz)
+ tv.Sec = tvz.Sec
+ tv.Usec = int64(tvz.Usec)
+ return
+}
+
+func Time(t *Time_t) (tt Time_t, err error) {
+ var tv Timeval
+ err = Gettimeofday(&tv)
+ if err != nil {
+ return 0, err
+ }
+ if t != nil {
+ *t = Time_t(tv.Sec)
+ }
+ return Time_t(tv.Sec), nil
+}
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval { //fix
+ return Timeval{Sec: sec, Usec: usec}
+}
+
+//sysnb pipe(p *[2]_C_int) (err error)
+
+func Pipe(p []int) (err error) {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err = pipe(&pp)
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ return
+}
+
+//sys utimes(path string, timeval *[2]Timeval) (err error) = SYS___UTIMES_A
+
+func Utimes(path string, tv []Timeval) (err error) {
+ if len(tv) != 2 {
+ return EINVAL
+ }
+ return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
+}
+
+func UtimesNano(path string, ts []Timespec) error {
+ if len(ts) != 2 {
+ return EINVAL
+ }
+ // Not as efficient as it could be because Timespec and
+ // Timeval have different types in the different OSes
+ tv := [2]Timeval{
+ NsecToTimeval(TimespecToNsec(ts[0])),
+ NsecToTimeval(TimespecToNsec(ts[1])),
+ }
+ return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
+}
+
+func Getsockname(fd int) (sa Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ var len _Socklen = SizeofSockaddrAny
+ if err = getsockname(fd, &rsa, &len); err != nil {
+ return
+ }
+ // TODO(neeilan) : Remove this 0 ( added to get sys/unix compiling on z/OS )
+ return anyToSockaddr(0, &rsa)
+}
+
+const (
+ // identifier constants
+ nwmHeaderIdentifier = 0xd5e6d4c8
+ nwmFilterIdentifier = 0xd5e6d4c6
+ nwmTCPConnIdentifier = 0xd5e6d4c3
+ nwmRecHeaderIdentifier = 0xd5e6d4d9
+ nwmIPStatsIdentifier = 0xd5e6d4c9d7e2e340
+ nwmIPGStatsIdentifier = 0xd5e6d4c9d7c7e2e3
+ nwmTCPStatsIdentifier = 0xd5e6d4e3c3d7e2e3
+ nwmUDPStatsIdentifier = 0xd5e6d4e4c4d7e2e3
+ nwmICMPGStatsEntry = 0xd5e6d4c9c3d4d7c7
+ nwmICMPTStatsEntry = 0xd5e6d4c9c3d4d7e3
+
+ // nwmHeader constants
+ nwmVersion1 = 1
+ nwmVersion2 = 2
+ nwmCurrentVer = 2
+
+ nwmTCPConnType = 1
+ nwmGlobalStatsType = 14
+
+ // nwmFilter constants
+ nwmFilterLclAddrMask = 0x20000000 // Local address
+ nwmFilterSrcAddrMask = 0x20000000 // Source address
+ nwmFilterLclPortMask = 0x10000000 // Local port
+ nwmFilterSrcPortMask = 0x10000000 // Source port
+
+ // nwmConnEntry constants
+ nwmTCPStateClosed = 1
+ nwmTCPStateListen = 2
+ nwmTCPStateSynSent = 3
+ nwmTCPStateSynRcvd = 4
+ nwmTCPStateEstab = 5
+ nwmTCPStateFinWait1 = 6
+ nwmTCPStateFinWait2 = 7
+ nwmTCPStateClosWait = 8
+ nwmTCPStateLastAck = 9
+ nwmTCPStateClosing = 10
+ nwmTCPStateTimeWait = 11
+ nwmTCPStateDeletTCB = 12
+
+ // Existing constants on linux
+ BPF_TCP_CLOSE = 1
+ BPF_TCP_LISTEN = 2
+ BPF_TCP_SYN_SENT = 3
+ BPF_TCP_SYN_RECV = 4
+ BPF_TCP_ESTABLISHED = 5
+ BPF_TCP_FIN_WAIT1 = 6
+ BPF_TCP_FIN_WAIT2 = 7
+ BPF_TCP_CLOSE_WAIT = 8
+ BPF_TCP_LAST_ACK = 9
+ BPF_TCP_CLOSING = 10
+ BPF_TCP_TIME_WAIT = 11
+ BPF_TCP_NEW_SYN_RECV = -1
+ BPF_TCP_MAX_STATES = -2
+)
+
+type nwmTriplet struct {
+ offset uint32
+ length uint32
+ number uint32
+}
+
+type nwmQuadruplet struct {
+ offset uint32
+ length uint32
+ number uint32
+ match uint32
+}
+
+type nwmHeader struct {
+ ident uint32
+ length uint32
+ version uint16
+ nwmType uint16
+ bytesNeeded uint32
+ options uint32
+ _ [16]byte
+ inputDesc nwmTriplet
+ outputDesc nwmQuadruplet
+}
+
+type nwmFilter struct {
+ ident uint32
+ flags uint32
+ resourceName [8]byte
+ resourceId uint32
+ listenerId uint32
+ local [28]byte // union of sockaddr4 and sockaddr6
+ remote [28]byte // union of sockaddr4 and sockaddr6
+ _ uint16
+ _ uint16
+ asid uint16
+ _ [2]byte
+ tnLuName [8]byte
+ tnMonGrp uint32
+ tnAppl [8]byte
+ applData [40]byte
+ nInterface [16]byte
+ dVipa [16]byte
+ dVipaPfx uint16
+ dVipaPort uint16
+ dVipaFamily byte
+ _ [3]byte
+ destXCF [16]byte
+ destXCFPfx uint16
+ destXCFFamily byte
+ _ [1]byte
+ targIP [16]byte
+ targIPPfx uint16
+ targIPFamily byte
+ _ [1]byte
+ _ [20]byte
+}
+
+type nwmRecHeader struct {
+ ident uint32
+ length uint32
+ number byte
+ _ [3]byte
+}
+
+type nwmTCPStatsEntry struct {
+ ident uint64
+ currEstab uint32
+ activeOpened uint32
+ passiveOpened uint32
+ connClosed uint32
+ estabResets uint32
+ attemptFails uint32
+ passiveDrops uint32
+ timeWaitReused uint32
+ inSegs uint64
+ predictAck uint32
+ predictData uint32
+ inDupAck uint32
+ inBadSum uint32
+ inBadLen uint32
+ inShort uint32
+ inDiscOldTime uint32
+ inAllBeforeWin uint32
+ inSomeBeforeWin uint32
+ inAllAfterWin uint32
+ inSomeAfterWin uint32
+ inOutOfOrder uint32
+ inAfterClose uint32
+ inWinProbes uint32
+ inWinUpdates uint32
+ outWinUpdates uint32
+ outSegs uint64
+ outDelayAcks uint32
+ outRsts uint32
+ retransSegs uint32
+ retransTimeouts uint32
+ retransDrops uint32
+ pmtuRetrans uint32
+ pmtuErrors uint32
+ outWinProbes uint32
+ probeDrops uint32
+ keepAliveProbes uint32
+ keepAliveDrops uint32
+ finwait2Drops uint32
+ acceptCount uint64
+ inBulkQSegs uint64
+ inDiscards uint64
+ connFloods uint32
+ connStalls uint32
+ cfgEphemDef uint16
+ ephemInUse uint16
+ ephemHiWater uint16
+ flags byte
+ _ [1]byte
+ ephemExhaust uint32
+ smcRCurrEstabLnks uint32
+ smcRLnkActTimeOut uint32
+ smcRActLnkOpened uint32
+ smcRPasLnkOpened uint32
+ smcRLnksClosed uint32
+ smcRCurrEstab uint32
+ smcRActiveOpened uint32
+ smcRPassiveOpened uint32
+ smcRConnClosed uint32
+ smcRInSegs uint64
+ smcROutSegs uint64
+ smcRInRsts uint32
+ smcROutRsts uint32
+ smcDCurrEstabLnks uint32
+ smcDActLnkOpened uint32
+ smcDPasLnkOpened uint32
+ smcDLnksClosed uint32
+ smcDCurrEstab uint32
+ smcDActiveOpened uint32
+ smcDPassiveOpened uint32
+ smcDConnClosed uint32
+ smcDInSegs uint64
+ smcDOutSegs uint64
+ smcDInRsts uint32
+ smcDOutRsts uint32
+}
+
+type nwmConnEntry struct {
+ ident uint32
+ local [28]byte // union of sockaddr4 and sockaddr6
+ remote [28]byte // union of sockaddr4 and sockaddr6
+ startTime [8]byte // uint64, changed to prevent padding from being inserted
+ lastActivity [8]byte // uint64
+ bytesIn [8]byte // uint64
+ bytesOut [8]byte // uint64
+ inSegs [8]byte // uint64
+ outSegs [8]byte // uint64
+ state uint16
+ activeOpen byte
+ flag01 byte
+ outBuffered uint32
+ inBuffered uint32
+ maxSndWnd uint32
+ reXmtCount uint32
+ congestionWnd uint32
+ ssThresh uint32
+ roundTripTime uint32
+ roundTripVar uint32
+ sendMSS uint32
+ sndWnd uint32
+ rcvBufSize uint32
+ sndBufSize uint32
+ outOfOrderCount uint32
+ lcl0WindowCount uint32
+ rmt0WindowCount uint32
+ dupacks uint32
+ flag02 byte
+ sockOpt6Cont byte
+ asid uint16
+ resourceName [8]byte
+ resourceId uint32
+ subtask uint32
+ sockOpt byte
+ sockOpt6 byte
+ clusterConnFlag byte
+ proto byte
+ targetAppl [8]byte
+ luName [8]byte
+ clientUserId [8]byte
+ logMode [8]byte
+ timeStamp uint32
+ timeStampAge uint32
+ serverResourceId uint32
+ intfName [16]byte
+ ttlsStatPol byte
+ ttlsStatConn byte
+ ttlsSSLProt uint16
+ ttlsNegCiph [2]byte
+ ttlsSecType byte
+ ttlsFIPS140Mode byte
+ ttlsUserID [8]byte
+ applData [40]byte
+ inOldestTime [8]byte // uint64
+ outOldestTime [8]byte // uint64
+ tcpTrustedPartner byte
+ _ [3]byte
+ bulkDataIntfName [16]byte
+ ttlsNegCiph4 [4]byte
+ smcReason uint32
+ lclSMCLinkId uint32
+ rmtSMCLinkId uint32
+ smcStatus byte
+ smcFlags byte
+ _ [2]byte
+ rcvWnd uint32
+ lclSMCBufSz uint32
+ rmtSMCBufSz uint32
+ ttlsSessID [32]byte
+ ttlsSessIDLen int16
+ _ [1]byte
+ smcDStatus byte
+ smcDReason uint32
+}
+
+var svcNameTable [][]byte = [][]byte{
+ []byte("\xc5\xe9\xc2\xd5\xd4\xc9\xc6\xf4"), // svc_EZBNMIF4
+}
+
+const (
+ svc_EZBNMIF4 = 0
+)
+
+func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) {
+ jobname := []byte("\x5c\x40\x40\x40\x40\x40\x40\x40") // "*"
+ responseBuffer := [4096]byte{0}
+ var bufferAlet, reasonCode uint32 = 0, 0
+ var bufferLen, returnValue, returnCode int32 = 4096, 0, 0
+
+ dsa := [18]uint64{0}
+ var argv [7]unsafe.Pointer
+ argv[0] = unsafe.Pointer(&jobname[0])
+ argv[1] = unsafe.Pointer(&responseBuffer[0])
+ argv[2] = unsafe.Pointer(&bufferAlet)
+ argv[3] = unsafe.Pointer(&bufferLen)
+ argv[4] = unsafe.Pointer(&returnValue)
+ argv[5] = unsafe.Pointer(&returnCode)
+ argv[6] = unsafe.Pointer(&reasonCode)
+
+ request := (*struct {
+ header nwmHeader
+ filter nwmFilter
+ })(unsafe.Pointer(&responseBuffer[0]))
+
+ EZBNMIF4 := svcLoad(&svcNameTable[svc_EZBNMIF4][0])
+ if EZBNMIF4 == nil {
+ return nil, errnoErr(EINVAL)
+ }
+
+ // GetGlobalStats EZBNMIF4 call
+ request.header.ident = nwmHeaderIdentifier
+ request.header.length = uint32(unsafe.Sizeof(request.header))
+ request.header.version = nwmCurrentVer
+ request.header.nwmType = nwmGlobalStatsType
+ request.header.options = 0x80000000
+
+ svcCall(EZBNMIF4, &argv[0], &dsa[0])
+
+ // outputDesc field is filled by EZBNMIF4 on success
+ if returnCode != 0 || request.header.outputDesc.offset == 0 {
+ return nil, errnoErr(EINVAL)
+ }
+
+ // Check that EZBNMIF4 returned a nwmRecHeader
+ recHeader := (*nwmRecHeader)(unsafe.Pointer(&responseBuffer[request.header.outputDesc.offset]))
+ if recHeader.ident != nwmRecHeaderIdentifier {
+ return nil, errnoErr(EINVAL)
+ }
+
+ // Parse nwmTriplets to get offsets of returned entries
+ var sections []*uint64
+ var sectionDesc *nwmTriplet = (*nwmTriplet)(unsafe.Pointer(&responseBuffer[0]))
+ for i := uint32(0); i < uint32(recHeader.number); i++ {
+ offset := request.header.outputDesc.offset + uint32(unsafe.Sizeof(*recHeader)) + i*uint32(unsafe.Sizeof(*sectionDesc))
+ sectionDesc = (*nwmTriplet)(unsafe.Pointer(&responseBuffer[offset]))
+ for j := uint32(0); j < sectionDesc.number; j++ {
+ offset = request.header.outputDesc.offset + sectionDesc.offset + j*sectionDesc.length
+ sections = append(sections, (*uint64)(unsafe.Pointer(&responseBuffer[offset])))
+ }
+ }
+
+ // Find nwmTCPStatsEntry in returned entries
+ var tcpStats *nwmTCPStatsEntry = nil
+ for _, ptr := range sections {
+ switch *ptr {
+ case nwmTCPStatsIdentifier:
+ if tcpStats != nil {
+ return nil, errnoErr(EINVAL)
+ }
+ tcpStats = (*nwmTCPStatsEntry)(unsafe.Pointer(ptr))
+ case nwmIPStatsIdentifier:
+ case nwmIPGStatsIdentifier:
+ case nwmUDPStatsIdentifier:
+ case nwmICMPGStatsEntry:
+ case nwmICMPTStatsEntry:
+ default:
+ return nil, errnoErr(EINVAL)
+ }
+ }
+ if tcpStats == nil {
+ return nil, errnoErr(EINVAL)
+ }
+
+ // GetConnectionDetail EZBNMIF4 call
+ responseBuffer = [4096]byte{0}
+ dsa = [18]uint64{0}
+ bufferAlet, reasonCode = 0, 0
+ bufferLen, returnValue, returnCode = 4096, 0, 0
+ nameptr := (*uint32)(unsafe.Pointer(uintptr(0x21c))) // Get jobname of current process
+ nameptr = (*uint32)(unsafe.Pointer(uintptr(*nameptr + 12)))
+ argv[0] = unsafe.Pointer(uintptr(*nameptr))
+
+ request.header.ident = nwmHeaderIdentifier
+ request.header.length = uint32(unsafe.Sizeof(request.header))
+ request.header.version = nwmCurrentVer
+ request.header.nwmType = nwmTCPConnType
+ request.header.options = 0x80000000
+
+ request.filter.ident = nwmFilterIdentifier
+
+ var localSockaddr RawSockaddrAny
+ socklen := _Socklen(SizeofSockaddrAny)
+ err := getsockname(fd, &localSockaddr, &socklen)
+ if err != nil {
+ return nil, errnoErr(EINVAL)
+ }
+ if localSockaddr.Addr.Family == AF_INET {
+ localSockaddr := (*RawSockaddrInet4)(unsafe.Pointer(&localSockaddr.Addr))
+ localSockFilter := (*RawSockaddrInet4)(unsafe.Pointer(&request.filter.local[0]))
+ localSockFilter.Family = AF_INET
+ var i int
+ for i = 0; i < 4; i++ {
+ if localSockaddr.Addr[i] != 0 {
+ break
+ }
+ }
+ if i != 4 {
+ request.filter.flags |= nwmFilterLclAddrMask
+ for i = 0; i < 4; i++ {
+ localSockFilter.Addr[i] = localSockaddr.Addr[i]
+ }
+ }
+ if localSockaddr.Port != 0 {
+ request.filter.flags |= nwmFilterLclPortMask
+ localSockFilter.Port = localSockaddr.Port
+ }
+ } else if localSockaddr.Addr.Family == AF_INET6 {
+ localSockaddr := (*RawSockaddrInet6)(unsafe.Pointer(&localSockaddr.Addr))
+ localSockFilter := (*RawSockaddrInet6)(unsafe.Pointer(&request.filter.local[0]))
+ localSockFilter.Family = AF_INET6
+ var i int
+ for i = 0; i < 16; i++ {
+ if localSockaddr.Addr[i] != 0 {
+ break
+ }
+ }
+ if i != 16 {
+ request.filter.flags |= nwmFilterLclAddrMask
+ for i = 0; i < 16; i++ {
+ localSockFilter.Addr[i] = localSockaddr.Addr[i]
+ }
+ }
+ if localSockaddr.Port != 0 {
+ request.filter.flags |= nwmFilterLclPortMask
+ localSockFilter.Port = localSockaddr.Port
+ }
+ }
+
+ svcCall(EZBNMIF4, &argv[0], &dsa[0])
+
+ // outputDesc field is filled by EZBNMIF4 on success
+ if returnCode != 0 || request.header.outputDesc.offset == 0 {
+ return nil, errnoErr(EINVAL)
+ }
+
+ // Check that EZBNMIF4 returned a nwmConnEntry
+ conn := (*nwmConnEntry)(unsafe.Pointer(&responseBuffer[request.header.outputDesc.offset]))
+ if conn.ident != nwmTCPConnIdentifier {
+ return nil, errnoErr(EINVAL)
+ }
+
+ // Copy data from the returned data structures into tcpInfo
+ // Stats from nwmConnEntry are specific to that connection.
+ // Stats from nwmTCPStatsEntry are global (to the interface?)
+ // Fields may not be an exact match. Some fields have no equivalent.
+ var tcpinfo TCPInfo
+ tcpinfo.State = uint8(conn.state)
+ tcpinfo.Ca_state = 0 // dummy
+ tcpinfo.Retransmits = uint8(tcpStats.retransSegs)
+ tcpinfo.Probes = uint8(tcpStats.outWinProbes)
+ tcpinfo.Backoff = 0 // dummy
+ tcpinfo.Options = 0 // dummy
+ tcpinfo.Rto = tcpStats.retransTimeouts
+ tcpinfo.Ato = tcpStats.outDelayAcks
+ tcpinfo.Snd_mss = conn.sendMSS
+ tcpinfo.Rcv_mss = conn.sendMSS // dummy
+ tcpinfo.Unacked = 0 // dummy
+ tcpinfo.Sacked = 0 // dummy
+ tcpinfo.Lost = 0 // dummy
+ tcpinfo.Retrans = conn.reXmtCount
+ tcpinfo.Fackets = 0 // dummy
+ tcpinfo.Last_data_sent = uint32(*(*uint64)(unsafe.Pointer(&conn.lastActivity[0])))
+ tcpinfo.Last_ack_sent = uint32(*(*uint64)(unsafe.Pointer(&conn.outOldestTime[0])))
+ tcpinfo.Last_data_recv = uint32(*(*uint64)(unsafe.Pointer(&conn.inOldestTime[0])))
+ tcpinfo.Last_ack_recv = uint32(*(*uint64)(unsafe.Pointer(&conn.inOldestTime[0])))
+ tcpinfo.Pmtu = conn.sendMSS // dummy, NWMIfRouteMtu is a candidate
+ tcpinfo.Rcv_ssthresh = conn.ssThresh
+ tcpinfo.Rtt = conn.roundTripTime
+ tcpinfo.Rttvar = conn.roundTripVar
+ tcpinfo.Snd_ssthresh = conn.ssThresh // dummy
+ tcpinfo.Snd_cwnd = conn.congestionWnd
+ tcpinfo.Advmss = conn.sendMSS // dummy
+ tcpinfo.Reordering = 0 // dummy
+ tcpinfo.Rcv_rtt = conn.roundTripTime // dummy
+ tcpinfo.Rcv_space = conn.sendMSS // dummy
+ tcpinfo.Total_retrans = conn.reXmtCount
+
+ svcUnload(&svcNameTable[svc_EZBNMIF4][0], EZBNMIF4)
+
+ return &tcpinfo, nil
+}
+
+// GetsockoptString returns the string value of the socket option opt for the
+// socket associated with fd at the given socket level.
+func GetsockoptString(fd, level, opt int) (string, error) {
+ buf := make([]byte, 256)
+ vallen := _Socklen(len(buf))
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen)
+ if err != nil {
+ return "", err
+ }
+
+ return string(buf[:vallen-1]), nil
+}
+
+func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+ var msg Msghdr
+ var rsa RawSockaddrAny
+ msg.Name = (*byte)(unsafe.Pointer(&rsa))
+ msg.Namelen = SizeofSockaddrAny
+ var iov Iovec
+ if len(p) > 0 {
+ iov.Base = (*byte)(unsafe.Pointer(&p[0]))
+ iov.SetLen(len(p))
+ }
+ var dummy byte
+ if len(oob) > 0 {
+ // receive at least one normal byte
+ if len(p) == 0 {
+ iov.Base = &dummy
+ iov.SetLen(1)
+ }
+ msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
+ msg.SetControllen(len(oob))
+ }
+ msg.Iov = &iov
+ msg.Iovlen = 1
+ if n, err = recvmsg(fd, &msg, flags); err != nil {
+ return
+ }
+ oobn = int(msg.Controllen)
+ recvflags = int(msg.Flags)
+ // source address is only specified if the socket is unconnected
+ if rsa.Addr.Family != AF_UNSPEC {
+ // TODO(neeilan): Remove 0 arg added to get this compiling on z/OS
+ from, err = anyToSockaddr(0, &rsa)
+ }
+ return
+}
+
+func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
+ _, err = SendmsgN(fd, p, oob, to, flags)
+ return
+}
+
+func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
+ var ptr unsafe.Pointer
+ var salen _Socklen
+ if to != nil {
+ var err error
+ ptr, salen, err = to.sockaddr()
+ if err != nil {
+ return 0, err
+ }
+ }
+ var msg Msghdr
+ msg.Name = (*byte)(unsafe.Pointer(ptr))
+ msg.Namelen = int32(salen)
+ var iov Iovec
+ if len(p) > 0 {
+ iov.Base = (*byte)(unsafe.Pointer(&p[0]))
+ iov.SetLen(len(p))
+ }
+ var dummy byte
+ if len(oob) > 0 {
+ // send at least one normal byte
+ if len(p) == 0 {
+ iov.Base = &dummy
+ iov.SetLen(1)
+ }
+ msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
+ msg.SetControllen(len(oob))
+ }
+ msg.Iov = &iov
+ msg.Iovlen = 1
+ if n, err = sendmsg(fd, &msg, flags); err != nil {
+ return 0, err
+ }
+ if len(oob) > 0 && len(p) == 0 {
+ n = 0
+ }
+ return n, nil
+}
+
+func Opendir(name string) (uintptr, error) {
+ p, err := BytePtrFromString(name)
+ if err != nil {
+ return 0, err
+ }
+ dir, _, e := syscall_syscall(SYS___OPENDIR_A, uintptr(unsafe.Pointer(p)), 0, 0)
+ runtime.KeepAlive(unsafe.Pointer(p))
+ if e != 0 {
+ err = errnoErr(e)
+ }
+ return dir, err
+}
+
+// clearsyscall.Errno resets the errno value to 0.
+func clearErrno()
+
+func Readdir(dir uintptr) (*Dirent, error) {
+ var ent Dirent
+ var res uintptr
+ // __readdir_r_a returns errno at the end of the directory stream, rather than 0.
+ // Therefore to avoid false positives we clear errno before calling it.
+
+ // TODO(neeilan): Commented this out to get sys/unix compiling on z/OS. Uncomment and fix. Error: "undefined: clearsyscall"
+ //clearsyscall.Errno() // TODO(mundaym): check pre-emption rules.
+
+ e, _, _ := syscall_syscall(SYS___READDIR_R_A, dir, uintptr(unsafe.Pointer(&ent)), uintptr(unsafe.Pointer(&res)))
+ var err error
+ if e != 0 {
+ err = errnoErr(Errno(e))
+ }
+ if res == 0 {
+ return nil, err
+ }
+ return &ent, err
+}
+
+func Closedir(dir uintptr) error {
+ _, _, e := syscall_syscall(SYS_CLOSEDIR, dir, 0, 0)
+ if e != 0 {
+ return errnoErr(e)
+ }
+ return nil
+}
+
+func Seekdir(dir uintptr, pos int) {
+ _, _, _ = syscall_syscall(SYS_SEEKDIR, dir, uintptr(pos), 0)
+}
+
+func Telldir(dir uintptr) (int, error) {
+ p, _, e := syscall_syscall(SYS_TELLDIR, dir, 0, 0)
+ pos := int(p)
+ if pos == -1 {
+ return pos, errnoErr(e)
+ }
+ return pos, nil
+}
+
+// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
+func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
+ // struct flock is packed on z/OS. We can't emulate that in Go so
+ // instead we pack it here.
+ var flock [24]byte
+ *(*int16)(unsafe.Pointer(&flock[0])) = lk.Type
+ *(*int16)(unsafe.Pointer(&flock[2])) = lk.Whence
+ *(*int64)(unsafe.Pointer(&flock[4])) = lk.Start
+ *(*int64)(unsafe.Pointer(&flock[12])) = lk.Len
+ *(*int32)(unsafe.Pointer(&flock[20])) = lk.Pid
+ _, _, errno := syscall_syscall(SYS_FCNTL, fd, uintptr(cmd), uintptr(unsafe.Pointer(&flock)))
+ lk.Type = *(*int16)(unsafe.Pointer(&flock[0]))
+ lk.Whence = *(*int16)(unsafe.Pointer(&flock[2]))
+ lk.Start = *(*int64)(unsafe.Pointer(&flock[4]))
+ lk.Len = *(*int64)(unsafe.Pointer(&flock[12]))
+ lk.Pid = *(*int32)(unsafe.Pointer(&flock[20]))
+ if errno == 0 {
+ return nil
+ }
+ return errno
+}
+
+func Flock(fd int, how int) error {
+
+ var flock_type int16
+ var fcntl_cmd int
+
+ switch how {
+ case LOCK_SH | LOCK_NB:
+ flock_type = F_RDLCK
+ fcntl_cmd = F_SETLK
+ case LOCK_EX | LOCK_NB:
+ flock_type = F_WRLCK
+ fcntl_cmd = F_SETLK
+ case LOCK_EX:
+ flock_type = F_WRLCK
+ fcntl_cmd = F_SETLKW
+ case LOCK_UN:
+ flock_type = F_UNLCK
+ fcntl_cmd = F_SETLKW
+ default:
+ }
+
+ flock := Flock_t{
+ Type: int16(flock_type),
+ Whence: int16(0),
+ Start: int64(0),
+ Len: int64(0),
+ Pid: int32(Getppid()),
+ }
+
+ err := FcntlFlock(uintptr(fd), fcntl_cmd, &flock)
+ return err
+}
+
+func Mlock(b []byte) (err error) {
+ _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func Mlock2(b []byte, flags int) (err error) {
+ _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func Mlockall(flags int) (err error) {
+ _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_NONSWAP, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func Munlock(b []byte) (err error) {
+ _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_SWAP, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func Munlockall() (err error) {
+ _, _, e1 := syscall_syscall(SYS___MLOCKALL, _BPX_SWAP, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func ClockGettime(clockid int32, ts *Timespec) error {
+
+ var ticks_per_sec uint32 = 100 //TODO(kenan): value is currently hardcoded; need sysconf() call otherwise
+ var nsec_per_sec int64 = 1000000000
+
+ if ts == nil {
+ return EFAULT
+ }
+ if clockid == CLOCK_REALTIME || clockid == CLOCK_MONOTONIC {
+ var nanotime int64 = runtime.Nanotime1()
+ ts.Sec = nanotime / nsec_per_sec
+ ts.Nsec = nanotime % nsec_per_sec
+ } else if clockid == CLOCK_PROCESS_CPUTIME_ID || clockid == CLOCK_THREAD_CPUTIME_ID {
+ var tm Tms
+ _, err := Times(&tm)
+ if err != nil {
+ return EFAULT
+ }
+ ts.Sec = int64(tm.Utime / ticks_per_sec)
+ ts.Nsec = int64(tm.Utime) * nsec_per_sec / int64(ticks_per_sec)
+ } else {
+ return EINVAL
+ }
+ return nil
+}
+
+func Statfs(path string, stat *Statfs_t) (err error) {
+ fd, err := open(path, O_RDONLY, 0)
+ defer Close(fd)
+ if err != nil {
+ return err
+ }
+ return Fstatfs(fd, stat)
+}
+
+var (
+ Stdin = 0
+ Stdout = 1
+ Stderr = 2
+)
+
+// Do the interface allocations only once for common
+// Errno values.
+var (
+ errEAGAIN error = syscall.EAGAIN
+ errEINVAL error = syscall.EINVAL
+ errENOENT error = syscall.ENOENT
+)
+
+var (
+ signalNameMapOnce sync.Once
+ signalNameMap map[string]syscall.Signal
+)
+
+// errnoErr returns common boxed Errno values, to prevent
+// allocations at runtime.
+func errnoErr(e Errno) error {
+ switch e {
+ case 0:
+ return nil
+ case EAGAIN:
+ return errEAGAIN
+ case EINVAL:
+ return errEINVAL
+ case ENOENT:
+ return errENOENT
+ }
+ return e
+}
+
+// ErrnoName returns the error name for error number e.
+func ErrnoName(e Errno) string {
+ i := sort.Search(len(errorList), func(i int) bool {
+ return errorList[i].num >= e
+ })
+ if i < len(errorList) && errorList[i].num == e {
+ return errorList[i].name
+ }
+ return ""
+}
+
+// SignalName returns the signal name for signal number s.
+func SignalName(s syscall.Signal) string {
+ i := sort.Search(len(signalList), func(i int) bool {
+ return signalList[i].num >= s
+ })
+ if i < len(signalList) && signalList[i].num == s {
+ return signalList[i].name
+ }
+ return ""
+}
+
+// SignalNum returns the syscall.Signal for signal named s,
+// or 0 if a signal with such name is not found.
+// The signal name should start with "SIG".
+func SignalNum(s string) syscall.Signal {
+ signalNameMapOnce.Do(func() {
+ signalNameMap = make(map[string]syscall.Signal, len(signalList))
+ for _, signal := range signalList {
+ signalNameMap[signal.name] = signal.num
+ }
+ })
+ return signalNameMap[s]
+}
+
+// clen returns the index of the first NULL byte in n or len(n) if n contains no NULL byte.
+func clen(n []byte) int {
+ i := bytes.IndexByte(n, 0)
+ if i == -1 {
+ i = len(n)
+ }
+ return i
+}
+
+// Mmap manager, for use by operating system-specific implementations.
+
+type mmapper struct {
+ sync.Mutex
+ active map[*byte][]byte // active mappings; key is last byte in mapping
+ mmap func(addr, length uintptr, prot, flags, fd int, offset int64) (uintptr, error)
+ munmap func(addr uintptr, length uintptr) error
+}
+
+func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
+ if length <= 0 {
+ return nil, EINVAL
+ }
+
+ // Map the requested memory.
+ addr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset)
+ if errno != nil {
+ return nil, errno
+ }
+
+ // Slice memory layout
+ var sl = struct {
+ addr uintptr
+ len int
+ cap int
+ }{addr, length, length}
+
+ // Use unsafe to turn sl into a []byte.
+ b := *(*[]byte)(unsafe.Pointer(&sl))
+
+ // Register mapping in m and return it.
+ p := &b[cap(b)-1]
+ m.Lock()
+ defer m.Unlock()
+ m.active[p] = b
+ return b, nil
+}
+
+func (m *mmapper) Munmap(data []byte) (err error) {
+ if len(data) == 0 || len(data) != cap(data) {
+ return EINVAL
+ }
+
+ // Find the base of the mapping.
+ p := &data[cap(data)-1]
+ m.Lock()
+ defer m.Unlock()
+ b := m.active[p]
+ if b == nil || &b[0] != &data[0] {
+ return EINVAL
+ }
+
+ // Unmap the memory and update m.
+ if errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil {
+ return errno
+ }
+ delete(m.active, p)
+ return nil
+}
+
+func Read(fd int, p []byte) (n int, err error) {
+ n, err = read(fd, p)
+ if raceenabled {
+ if n > 0 {
+ raceWriteRange(unsafe.Pointer(&p[0]), n)
+ }
+ if err == nil {
+ raceAcquire(unsafe.Pointer(&ioSync))
+ }
+ }
+ return
+}
+
+func Write(fd int, p []byte) (n int, err error) {
+ if raceenabled {
+ raceReleaseMerge(unsafe.Pointer(&ioSync))
+ }
+ n, err = write(fd, p)
+ if raceenabled && n > 0 {
+ raceReadRange(unsafe.Pointer(&p[0]), n)
+ }
+ return
+}
+
+// For testing: clients can set this flag to force
+// creation of IPv6 sockets to return EAFNOSUPPORT.
+var SocketDisableIPv6 bool
+
+// Sockaddr represents a socket address.
+type Sockaddr interface {
+ sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs
+}
+
+// SockaddrInet4 implements the Sockaddr interface for AF_INET type sockets.
+type SockaddrInet4 struct {
+ Port int
+ Addr [4]byte
+ raw RawSockaddrInet4
+}
+
+// SockaddrInet6 implements the Sockaddr interface for AF_INET6 type sockets.
+type SockaddrInet6 struct {
+ Port int
+ ZoneId uint32
+ Addr [16]byte
+ raw RawSockaddrInet6
+}
+
+// SockaddrUnix implements the Sockaddr interface for AF_UNIX type sockets.
+type SockaddrUnix struct {
+ Name string
+ raw RawSockaddrUnix
+}
+
+func Bind(fd int, sa Sockaddr) (err error) {
+ ptr, n, err := sa.sockaddr()
+ if err != nil {
+ return err
+ }
+ return bind(fd, ptr, n)
+}
+
+func Connect(fd int, sa Sockaddr) (err error) {
+ ptr, n, err := sa.sockaddr()
+ if err != nil {
+ return err
+ }
+ return connect(fd, ptr, n)
+}
+
+func Getpeername(fd int) (sa Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ var len _Socklen = SizeofSockaddrAny
+ if err = getpeername(fd, &rsa, &len); err != nil {
+ return
+ }
+ return anyToSockaddr(fd, &rsa)
+}
+
+func GetsockoptByte(fd, level, opt int) (value byte, err error) {
+ var n byte
+ vallen := _Socklen(1)
+ err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
+ return n, err
+}
+
+func GetsockoptInt(fd, level, opt int) (value int, err error) {
+ var n int32
+ vallen := _Socklen(4)
+ err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
+ return int(n), err
+}
+
+func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
+ vallen := _Socklen(4)
+ err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
+ return value, err
+}
+
+func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
+ var value IPMreq
+ vallen := _Socklen(SizeofIPMreq)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
+ return &value, err
+}
+
+func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
+ var value IPv6Mreq
+ vallen := _Socklen(SizeofIPv6Mreq)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
+ return &value, err
+}
+
+func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
+ var value IPv6MTUInfo
+ vallen := _Socklen(SizeofIPv6MTUInfo)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
+ return &value, err
+}
+
+func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
+ var value ICMPv6Filter
+ vallen := _Socklen(SizeofICMPv6Filter)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
+ return &value, err
+}
+
+func GetsockoptLinger(fd, level, opt int) (*Linger, error) {
+ var linger Linger
+ vallen := _Socklen(SizeofLinger)
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&linger), &vallen)
+ return &linger, err
+}
+
+func GetsockoptTimeval(fd, level, opt int) (*Timeval, error) {
+ var tv Timeval
+ vallen := _Socklen(unsafe.Sizeof(tv))
+ err := getsockopt(fd, level, opt, unsafe.Pointer(&tv), &vallen)
+ return &tv, err
+}
+
+func GetsockoptUint64(fd, level, opt int) (value uint64, err error) {
+ var n uint64
+ vallen := _Socklen(8)
+ err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
+ return n, err
+}
+
+func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ var len _Socklen = SizeofSockaddrAny
+ if n, err = recvfrom(fd, p, flags, &rsa, &len); err != nil {
+ return
+ }
+ if rsa.Addr.Family != AF_UNSPEC {
+ from, err = anyToSockaddr(fd, &rsa)
+ }
+ return
+}
+
+func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
+ ptr, n, err := to.sockaddr()
+ if err != nil {
+ return err
+ }
+ return sendto(fd, p, flags, ptr, n)
+}
+
+func SetsockoptByte(fd, level, opt int, value byte) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(&value), 1)
+}
+
+func SetsockoptInt(fd, level, opt int, value int) (err error) {
+ var n = int32(value)
+ return setsockopt(fd, level, opt, unsafe.Pointer(&n), 4)
+}
+
+func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(&value[0]), 4)
+}
+
+func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPMreq)
+}
+
+func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPv6Mreq)
+}
+
+func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error {
+ return setsockopt(fd, level, opt, unsafe.Pointer(filter), SizeofICMPv6Filter)
+}
+
+func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(l), SizeofLinger)
+}
+
+func SetsockoptString(fd, level, opt int, s string) (err error) {
+ var p unsafe.Pointer
+ if len(s) > 0 {
+ p = unsafe.Pointer(&[]byte(s)[0])
+ }
+ return setsockopt(fd, level, opt, p, uintptr(len(s)))
+}
+
+func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv))
+}
+
+func SetsockoptUint64(fd, level, opt int, value uint64) (err error) {
+ return setsockopt(fd, level, opt, unsafe.Pointer(&value), 8)
+}
+
+func Socket(domain, typ, proto int) (fd int, err error) {
+ if domain == AF_INET6 && SocketDisableIPv6 {
+ return -1, EAFNOSUPPORT
+ }
+ fd, err = socket(domain, typ, proto)
+ return
+}
+
+func Socketpair(domain, typ, proto int) (fd [2]int, err error) {
+ var fdx [2]int32
+ err = socketpair(domain, typ, proto, &fdx)
+ if err == nil {
+ fd[0] = int(fdx[0])
+ fd[1] = int(fdx[1])
+ }
+ return
+}
+
+var ioSync int64
+
+func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
+
+func SetNonblock(fd int, nonblocking bool) (err error) {
+ flag, err := fcntl(fd, F_GETFL, 0)
+ if err != nil {
+ return err
+ }
+ if nonblocking {
+ flag |= O_NONBLOCK
+ } else {
+ flag &= ^O_NONBLOCK
+ }
+ _, err = fcntl(fd, F_SETFL, flag)
+ return err
+}
+
+// Exec calls execve(2), which replaces the calling executable in the process
+// tree. argv0 should be the full path to an executable ("/bin/ls") and the
+// executable name should also be the first argument in argv (["ls", "-l"]).
+// envv are the environment variables that should be passed to the new
+// process (["USER=go", "PWD=/tmp"]).
+func Exec(argv0 string, argv []string, envv []string) error {
+ return syscall.Exec(argv0, argv, envv)
+}
diff --git a/vendor/golang.org/x/sys/unix/timestruct.go b/vendor/golang.org/x/sys/unix/timestruct.go
index 4a672f5..3d89304 100644
--- a/vendor/golang.org/x/sys/unix/timestruct.go
+++ b/vendor/golang.org/x/sys/unix/timestruct.go
@@ -2,18 +2,17 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package unix
import "time"
-// TimespecToNsec converts a Timespec value into a number of
-// nanoseconds since the Unix epoch.
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
+// TimespecToNSec returns the time stored in ts as nanoseconds.
+func TimespecToNsec(ts Timespec) int64 { return ts.Nano() }
-// NsecToTimespec takes a number of nanoseconds since the Unix epoch
-// and returns the corresponding Timespec value.
+// NsecToTimespec converts a number of nanoseconds into a Timespec.
func NsecToTimespec(nsec int64) Timespec {
sec := nsec / 1e9
nsec = nsec % 1e9
@@ -42,12 +41,10 @@ func TimeToTimespec(t time.Time) (Timespec, error) {
return ts, nil
}
-// TimevalToNsec converts a Timeval value into a number of nanoseconds
-// since the Unix epoch.
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
+// TimevalToNsec returns the time stored in tv as nanoseconds.
+func TimevalToNsec(tv Timeval) int64 { return tv.Nano() }
-// NsecToTimeval takes a number of nanoseconds since the Unix epoch
-// and returns the corresponding Timeval value.
+// NsecToTimeval converts a number of nanoseconds into a Timeval.
func NsecToTimeval(nsec int64) Timeval {
nsec += 999 // round up to microsecond
usec := nsec % 1e9 / 1e3
@@ -59,24 +56,22 @@ func NsecToTimeval(nsec int64) Timeval {
return setTimeval(sec, usec)
}
-// Unix returns ts as the number of seconds and nanoseconds elapsed since the
-// Unix epoch.
+// Unix returns the time stored in ts as seconds plus nanoseconds.
func (ts *Timespec) Unix() (sec int64, nsec int64) {
return int64(ts.Sec), int64(ts.Nsec)
}
-// Unix returns tv as the number of seconds and nanoseconds elapsed since the
-// Unix epoch.
+// Unix returns the time stored in tv as seconds plus nanoseconds.
func (tv *Timeval) Unix() (sec int64, nsec int64) {
return int64(tv.Sec), int64(tv.Usec) * 1000
}
-// Nano returns ts as the number of nanoseconds elapsed since the Unix epoch.
+// Nano returns the time stored in ts as nanoseconds.
func (ts *Timespec) Nano() int64 {
return int64(ts.Sec)*1e9 + int64(ts.Nsec)
}
-// Nano returns tv as the number of nanoseconds elapsed since the Unix epoch.
+// Nano returns the time stored in tv as nanoseconds.
func (tv *Timeval) Nano() int64 {
return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
}
diff --git a/vendor/golang.org/x/sys/unix/xattr_bsd.go b/vendor/golang.org/x/sys/unix/xattr_bsd.go
index 30c1d71..25df1e3 100644
--- a/vendor/golang.org/x/sys/unix/xattr_bsd.go
+++ b/vendor/golang.org/x/sys/unix/xattr_bsd.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build freebsd || netbsd
// +build freebsd netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
index 104994b..ca9799b 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go
@@ -1,6 +1,7 @@
// mkerrors.sh -maix32
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc && aix
// +build ppc,aix
// Created by cgo -godefs - DO NOT EDIT
diff --git a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
index 4fc8d30..200c8c2 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -maix64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64 && aix
// +build ppc64,aix
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
index 6217cdb..7ee196f 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m32
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && darwin
// +build 386,darwin
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -45,6 +46,7 @@ const (
AF_SIP = 0x18
AF_SNA = 0xb
AF_SYSTEM = 0x20
+ AF_SYS_CONTROL = 0x2
AF_UNIX = 0x1
AF_UNSPEC = 0x0
AF_UTUN = 0x26
@@ -232,6 +234,8 @@ const (
CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9
+ CLONE_NOFOLLOW = 0x1
+ CLONE_NOOWNERCOPY = 0x2
CR0 = 0x0
CR1 = 0x1000
CR2 = 0x2000
@@ -249,6 +253,7 @@ const (
CSTOP = 0x13
CSTOPB = 0x400
CSUSP = 0x1a
+ CTLIOCGINFO = 0xc0644e03
CTL_HW = 0x6
CTL_KERN = 0x1
CTL_MAXNAME = 0xc
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
index e3ff2ee..991996b 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && darwin
// +build amd64,darwin
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -32,7 +33,7 @@ const (
AF_LAT = 0xe
AF_LINK = 0x12
AF_LOCAL = 0x1
- AF_MAX = 0x28
+ AF_MAX = 0x29
AF_NATM = 0x1f
AF_NDRV = 0x1b
AF_NETBIOS = 0x21
@@ -45,9 +46,11 @@ const (
AF_SIP = 0x18
AF_SNA = 0xb
AF_SYSTEM = 0x20
+ AF_SYS_CONTROL = 0x2
AF_UNIX = 0x1
AF_UNSPEC = 0x0
AF_UTUN = 0x26
+ AF_VSOCK = 0x28
ALTWERASE = 0x200
ATTR_BIT_MAP_COUNT = 0x5
ATTR_CMN_ACCESSMASK = 0x20000
@@ -82,7 +85,7 @@ const (
ATTR_CMN_PAROBJID = 0x80
ATTR_CMN_RETURNED_ATTRS = 0x80000000
ATTR_CMN_SCRIPT = 0x100
- ATTR_CMN_SETMASK = 0x41c7ff00
+ ATTR_CMN_SETMASK = 0x51c7ff00
ATTR_CMN_USERACCESS = 0x200000
ATTR_CMN_UUID = 0x800000
ATTR_CMN_VALIDMASK = 0xffffffff
@@ -232,6 +235,8 @@ const (
CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9
+ CLONE_NOFOLLOW = 0x1
+ CLONE_NOOWNERCOPY = 0x2
CR0 = 0x0
CR1 = 0x1000
CR2 = 0x2000
@@ -249,6 +254,7 @@ const (
CSTOP = 0x13
CSTOPB = 0x400
CSUSP = 0x1a
+ CTLIOCGINFO = 0xc0644e03
CTL_HW = 0x6
CTL_KERN = 0x1
CTL_MAXNAME = 0xc
@@ -353,7 +359,7 @@ const (
DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c
DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0xf5
+ DLT_MATCHING_MAX = 0x10a
DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6
DLT_MOST = 0xd3
@@ -394,6 +400,7 @@ const (
DLT_SYMANTEC_FIREWALL = 0x63
DLT_TZSP = 0x80
DLT_USB = 0xba
+ DLT_USB_DARWIN = 0x10a
DLT_USB_LINUX = 0xbd
DLT_USB_LINUX_MMAPPED = 0xdc
DLT_USER0 = 0x93
@@ -438,8 +445,8 @@ const (
EVFILT_PROC = -0x5
EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xf
- EVFILT_THREADMARKER = 0xf
+ EVFILT_SYSCOUNT = 0x11
+ EVFILT_THREADMARKER = 0x11
EVFILT_TIMER = -0x7
EVFILT_USER = -0xa
EVFILT_VM = -0xc
@@ -477,9 +484,12 @@ const (
FSOPT_NOINMEMUPDATE = 0x2
FSOPT_PACK_INVAL_ATTRS = 0x8
FSOPT_REPORT_FULLSIZE = 0x4
+ FSOPT_RETURN_REALDEV = 0x200
F_ADDFILESIGS = 0x3d
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
+ F_ADDFILESIGS_INFO = 0x67
F_ADDFILESIGS_RETURN = 0x61
+ F_ADDFILESUPPL = 0x68
F_ADDSIGS = 0x3b
F_ALLOCATEALL = 0x4
F_ALLOCATECONTIG = 0x2
@@ -501,8 +511,10 @@ const (
F_GETOWN = 0x5
F_GETPATH = 0x32
F_GETPATH_MTMINFO = 0x47
+ F_GETPATH_NOFIRMLINK = 0x66
F_GETPROTECTIONCLASS = 0x3f
F_GETPROTECTIONLEVEL = 0x4d
+ F_GETSIGSINFO = 0x69
F_GLOBAL_NOCACHE = 0x37
F_LOG2PHYS = 0x31
F_LOG2PHYS_EXT = 0x41
@@ -527,6 +539,7 @@ const (
F_SETPROTECTIONCLASS = 0x40
F_SETSIZE = 0x2b
F_SINGLE_WRITER = 0x4c
+ F_SPECULATIVE_READ = 0x65
F_THAW_FS = 0x36
F_TRANSCODEKEY = 0x4b
F_TRIM_ACTIVE_FILE = 0x64
@@ -558,6 +571,7 @@ const (
IFF_UP = 0x1
IFNAMSIZ = 0x10
IFT_1822 = 0x2
+ IFT_6LOWPAN = 0x40
IFT_AAL5 = 0x31
IFT_ARCNET = 0x23
IFT_ARCNETPLUS = 0x24
@@ -762,16 +776,28 @@ const (
IPV6_2292PKTINFO = 0x13
IPV6_2292PKTOPTIONS = 0x19
IPV6_2292RTHDR = 0x18
+ IPV6_3542DSTOPTS = 0x32
+ IPV6_3542HOPLIMIT = 0x2f
+ IPV6_3542HOPOPTS = 0x31
+ IPV6_3542NEXTHOP = 0x30
+ IPV6_3542PKTINFO = 0x2e
+ IPV6_3542RTHDR = 0x33
+ IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
+ IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
+ IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
+ IPV6_AUTOFLOWLABEL = 0x3b
IPV6_BINDV6ONLY = 0x1b
IPV6_BOUND_IF = 0x7d
IPV6_CHECKSUM = 0x1a
IPV6_DEFAULT_MULTICAST_HOPS = 0x1
IPV6_DEFAULT_MULTICAST_LOOP = 0x1
IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FLOW_ECN_MASK = 0x300
+ IPV6_FLOW_ECN_MASK = 0x3000
IPV6_FRAGTTL = 0x3c
IPV6_FW_ADD = 0x1e
IPV6_FW_DEL = 0x1f
@@ -779,6 +805,8 @@ const (
IPV6_FW_GET = 0x22
IPV6_FW_ZERO = 0x21
IPV6_HLIMDEC = 0x1
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
IPV6_IPSEC_POLICY = 0x1c
IPV6_JOIN_GROUP = 0xc
IPV6_LEAVE_GROUP = 0xd
@@ -790,20 +818,34 @@ const (
IPV6_MAX_SOCK_SRC_FILTER = 0x80
IPV6_MIN_MEMBERSHIPS = 0x1f
IPV6_MMTU = 0x500
+ IPV6_MSFILTER = 0x4a
IPV6_MULTICAST_HOPS = 0xa
IPV6_MULTICAST_IF = 0x9
IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_PATHMTU = 0x2c
+ IPV6_PKTINFO = 0x2e
IPV6_PORTRANGE = 0xe
IPV6_PORTRANGE_DEFAULT = 0x0
IPV6_PORTRANGE_HIGH = 0x1
IPV6_PORTRANGE_LOW = 0x2
+ IPV6_PREFER_TEMPADDR = 0x3f
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x3d
+ IPV6_RECVRTHDR = 0x26
IPV6_RECVTCLASS = 0x23
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x39
IPV6_RTHDR_LOOSE = 0x0
IPV6_RTHDR_STRICT = 0x1
IPV6_RTHDR_TYPE_0 = 0x0
IPV6_SOCKOPT_RESERVED1 = 0x3
IPV6_TCLASS = 0x24
IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2a
IPV6_V6ONLY = 0x1b
IPV6_VERSION = 0x60
IPV6_VERSION_MASK = 0xf0
@@ -814,6 +856,7 @@ const (
IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000
+ IP_DONTFRAG = 0x1c
IP_DROP_MEMBERSHIP = 0xd
IP_DROP_SOURCE_MEMBERSHIP = 0x47
IP_DUMMYNET_CONFIGURE = 0x3c
@@ -885,6 +928,12 @@ const (
KERN_OSRELEASE = 0x2
KERN_OSTYPE = 0x1
KERN_VERSION = 0x4
+ LOCAL_PEERCRED = 0x1
+ LOCAL_PEEREPID = 0x3
+ LOCAL_PEEREUUID = 0x5
+ LOCAL_PEERPID = 0x2
+ LOCAL_PEERTOKEN = 0x6
+ LOCAL_PEERUUID = 0x4
LOCK_EX = 0x2
LOCK_NB = 0x4
LOCK_SH = 0x1
@@ -900,6 +949,7 @@ const (
MADV_SEQUENTIAL = 0x2
MADV_WILLNEED = 0x3
MADV_ZERO_WIRED_PAGES = 0x6
+ MAP_32BIT = 0x8000
MAP_ANON = 0x1000
MAP_ANONYMOUS = 0x1000
MAP_COPY = 0x2
@@ -916,6 +966,17 @@ const (
MAP_RESILIENT_CODESIGN = 0x2000
MAP_RESILIENT_MEDIA = 0x4000
MAP_SHARED = 0x1
+ MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
+ MAP_UNIX03 = 0x40000
+ MCAST_BLOCK_SOURCE = 0x54
+ MCAST_EXCLUDE = 0x2
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x50
+ MCAST_JOIN_SOURCE_GROUP = 0x52
+ MCAST_LEAVE_GROUP = 0x51
+ MCAST_LEAVE_SOURCE_GROUP = 0x53
+ MCAST_UNBLOCK_SOURCE = 0x55
+ MCAST_UNDEFINED = 0x0
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MNT_ASYNC = 0x40
@@ -927,6 +988,7 @@ const (
MNT_DOVOLFS = 0x8000
MNT_DWAIT = 0x4
MNT_EXPORTED = 0x100
+ MNT_EXT_ROOT_DATA_VOL = 0x1
MNT_FORCE = 0x80000
MNT_IGNORE_OWNERSHIP = 0x200000
MNT_JOURNALED = 0x800000
@@ -943,12 +1005,15 @@ const (
MNT_QUOTA = 0x2000
MNT_RDONLY = 0x1
MNT_RELOAD = 0x40000
+ MNT_REMOVABLE = 0x200
MNT_ROOTFS = 0x4000
+ MNT_SNAPSHOT = 0x40000000
+ MNT_STRICTATIME = 0x80000000
MNT_SYNCHRONOUS = 0x2
MNT_UNION = 0x20
MNT_UNKNOWNPERMISSIONS = 0x200000
MNT_UPDATE = 0x10000
- MNT_VISFLAGMASK = 0x17f0f5ff
+ MNT_VISFLAGMASK = 0xd7f0f7ff
MNT_WAIT = 0x1
MSG_CTRUNC = 0x20
MSG_DONTROUTE = 0x4
@@ -959,6 +1024,7 @@ const (
MSG_HAVEMORE = 0x2000
MSG_HOLD = 0x800
MSG_NEEDSA = 0x10000
+ MSG_NOSIGNAL = 0x80000
MSG_OOB = 0x1
MSG_PEEK = 0x2
MSG_RCVMORE = 0x4000
@@ -975,9 +1041,10 @@ const (
NET_RT_DUMP = 0x1
NET_RT_DUMP2 = 0x7
NET_RT_FLAGS = 0x2
+ NET_RT_FLAGS_PRIV = 0xa
NET_RT_IFLIST = 0x3
NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xa
+ NET_RT_MAXID = 0xb
NET_RT_STAT = 0x4
NET_RT_TRASH = 0x5
NFDBITS = 0x20
@@ -1015,6 +1082,7 @@ const (
NOTE_LEEWAY = 0x10
NOTE_LINK = 0x10
NOTE_LOWAT = 0x1
+ NOTE_MACHTIME = 0x100
NOTE_MACH_CONTINUOUS_TIME = 0x80
NOTE_NONE = 0x80
NOTE_NSECONDS = 0x4
@@ -1061,6 +1129,7 @@ const (
O_NDELAY = 0x4
O_NOCTTY = 0x20000
O_NOFOLLOW = 0x100
+ O_NOFOLLOW_ANY = 0x20000000
O_NONBLOCK = 0x4
O_POPUP = 0x80000000
O_RDONLY = 0x0
@@ -1132,6 +1201,7 @@ const (
RTF_BROADCAST = 0x400000
RTF_CLONING = 0x100
RTF_CONDEMNED = 0x2000000
+ RTF_DEAD = 0x20000000
RTF_DELCLONE = 0x80
RTF_DONE = 0x40
RTF_DYNAMIC = 0x10
@@ -1139,6 +1209,7 @@ const (
RTF_HOST = 0x4
RTF_IFREF = 0x4000000
RTF_IFSCOPE = 0x1000000
+ RTF_LLDATA = 0x400
RTF_LLINFO = 0x400
RTF_LOCAL = 0x200000
RTF_MODIFIED = 0x20
@@ -1206,6 +1277,7 @@ const (
SIOCGDRVSPEC = 0xc028697b
SIOCGETVLAN = 0xc020697f
SIOCGHIWAT = 0x40047301
+ SIOCGIF6LOWPAN = 0xc02069c5
SIOCGIFADDR = 0xc0206921
SIOCGIFALTMTU = 0xc0206948
SIOCGIFASYNCMAP = 0xc020697c
@@ -1216,6 +1288,7 @@ const (
SIOCGIFDEVMTU = 0xc0206944
SIOCGIFDSTADDR = 0xc0206922
SIOCGIFFLAGS = 0xc0206911
+ SIOCGIFFUNCTIONALTYPE = 0xc02069ad
SIOCGIFGENERIC = 0xc020693a
SIOCGIFKPI = 0xc0206987
SIOCGIFMAC = 0xc0206982
@@ -1229,6 +1302,7 @@ const (
SIOCGIFSTATUS = 0xc331693d
SIOCGIFVLAN = 0xc020697f
SIOCGIFWAKEFLAGS = 0xc0206988
+ SIOCGIFXMEDIA = 0xc02c6948
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309
SIOCIFCREATE = 0xc0206978
@@ -1239,6 +1313,7 @@ const (
SIOCSDRVSPEC = 0x8028697b
SIOCSETVLAN = 0x8020697e
SIOCSHIWAT = 0x80047300
+ SIOCSIF6LOWPAN = 0x802069c4
SIOCSIFADDR = 0x8020690c
SIOCSIFALTMTU = 0x80206945
SIOCSIFASYNCMAP = 0x8020697d
@@ -1266,6 +1341,7 @@ const (
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
SOL_SOCKET = 0xffff
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x2
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
index 3e41757..e748cb1 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
@@ -1,6 +1,7 @@
// mkerrors.sh
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && darwin
// +build arm,darwin
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -45,6 +46,7 @@ const (
AF_SIP = 0x18
AF_SNA = 0xb
AF_SYSTEM = 0x20
+ AF_SYS_CONTROL = 0x2
AF_UNIX = 0x1
AF_UNSPEC = 0x0
AF_UTUN = 0x26
@@ -232,6 +234,8 @@ const (
CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9
+ CLONE_NOFOLLOW = 0x1
+ CLONE_NOOWNERCOPY = 0x2
CR0 = 0x0
CR1 = 0x1000
CR2 = 0x2000
@@ -249,6 +253,7 @@ const (
CSTOP = 0x13
CSTOPB = 0x400
CSUSP = 0x1a
+ CTLIOCGINFO = 0xc0644e03
CTL_HW = 0x6
CTL_KERN = 0x1
CTL_MAXNAME = 0xc
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
index cbd8ed1..e644eaf 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && darwin
// +build arm64,darwin
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -32,7 +33,7 @@ const (
AF_LAT = 0xe
AF_LINK = 0x12
AF_LOCAL = 0x1
- AF_MAX = 0x28
+ AF_MAX = 0x29
AF_NATM = 0x1f
AF_NDRV = 0x1b
AF_NETBIOS = 0x21
@@ -45,9 +46,11 @@ const (
AF_SIP = 0x18
AF_SNA = 0xb
AF_SYSTEM = 0x20
+ AF_SYS_CONTROL = 0x2
AF_UNIX = 0x1
AF_UNSPEC = 0x0
AF_UTUN = 0x26
+ AF_VSOCK = 0x28
ALTWERASE = 0x200
ATTR_BIT_MAP_COUNT = 0x5
ATTR_CMN_ACCESSMASK = 0x20000
@@ -82,7 +85,7 @@ const (
ATTR_CMN_PAROBJID = 0x80
ATTR_CMN_RETURNED_ATTRS = 0x80000000
ATTR_CMN_SCRIPT = 0x100
- ATTR_CMN_SETMASK = 0x41c7ff00
+ ATTR_CMN_SETMASK = 0x51c7ff00
ATTR_CMN_USERACCESS = 0x200000
ATTR_CMN_UUID = 0x800000
ATTR_CMN_VALIDMASK = 0xffffffff
@@ -232,6 +235,8 @@ const (
CLOCK_THREAD_CPUTIME_ID = 0x10
CLOCK_UPTIME_RAW = 0x8
CLOCK_UPTIME_RAW_APPROX = 0x9
+ CLONE_NOFOLLOW = 0x1
+ CLONE_NOOWNERCOPY = 0x2
CR0 = 0x0
CR1 = 0x1000
CR2 = 0x2000
@@ -249,6 +254,7 @@ const (
CSTOP = 0x13
CSTOPB = 0x400
CSUSP = 0x1a
+ CTLIOCGINFO = 0xc0644e03
CTL_HW = 0x6
CTL_KERN = 0x1
CTL_MAXNAME = 0xc
@@ -353,7 +359,7 @@ const (
DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c
DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0xf5
+ DLT_MATCHING_MAX = 0x10a
DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6
DLT_MOST = 0xd3
@@ -394,6 +400,7 @@ const (
DLT_SYMANTEC_FIREWALL = 0x63
DLT_TZSP = 0x80
DLT_USB = 0xba
+ DLT_USB_DARWIN = 0x10a
DLT_USB_LINUX = 0xbd
DLT_USB_LINUX_MMAPPED = 0xdc
DLT_USER0 = 0x93
@@ -438,8 +445,8 @@ const (
EVFILT_PROC = -0x5
EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xf
- EVFILT_THREADMARKER = 0xf
+ EVFILT_SYSCOUNT = 0x11
+ EVFILT_THREADMARKER = 0x11
EVFILT_TIMER = -0x7
EVFILT_USER = -0xa
EVFILT_VM = -0xc
@@ -477,9 +484,12 @@ const (
FSOPT_NOINMEMUPDATE = 0x2
FSOPT_PACK_INVAL_ATTRS = 0x8
FSOPT_REPORT_FULLSIZE = 0x4
+ FSOPT_RETURN_REALDEV = 0x200
F_ADDFILESIGS = 0x3d
F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
+ F_ADDFILESIGS_INFO = 0x67
F_ADDFILESIGS_RETURN = 0x61
+ F_ADDFILESUPPL = 0x68
F_ADDSIGS = 0x3b
F_ALLOCATEALL = 0x4
F_ALLOCATECONTIG = 0x2
@@ -501,8 +511,10 @@ const (
F_GETOWN = 0x5
F_GETPATH = 0x32
F_GETPATH_MTMINFO = 0x47
+ F_GETPATH_NOFIRMLINK = 0x66
F_GETPROTECTIONCLASS = 0x3f
F_GETPROTECTIONLEVEL = 0x4d
+ F_GETSIGSINFO = 0x69
F_GLOBAL_NOCACHE = 0x37
F_LOG2PHYS = 0x31
F_LOG2PHYS_EXT = 0x41
@@ -527,6 +539,7 @@ const (
F_SETPROTECTIONCLASS = 0x40
F_SETSIZE = 0x2b
F_SINGLE_WRITER = 0x4c
+ F_SPECULATIVE_READ = 0x65
F_THAW_FS = 0x36
F_TRANSCODEKEY = 0x4b
F_TRIM_ACTIVE_FILE = 0x64
@@ -558,6 +571,7 @@ const (
IFF_UP = 0x1
IFNAMSIZ = 0x10
IFT_1822 = 0x2
+ IFT_6LOWPAN = 0x40
IFT_AAL5 = 0x31
IFT_ARCNET = 0x23
IFT_ARCNETPLUS = 0x24
@@ -762,16 +776,28 @@ const (
IPV6_2292PKTINFO = 0x13
IPV6_2292PKTOPTIONS = 0x19
IPV6_2292RTHDR = 0x18
+ IPV6_3542DSTOPTS = 0x32
+ IPV6_3542HOPLIMIT = 0x2f
+ IPV6_3542HOPOPTS = 0x31
+ IPV6_3542NEXTHOP = 0x30
+ IPV6_3542PKTINFO = 0x2e
+ IPV6_3542RTHDR = 0x33
+ IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
+ IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
+ IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
+ IPV6_AUTOFLOWLABEL = 0x3b
IPV6_BINDV6ONLY = 0x1b
IPV6_BOUND_IF = 0x7d
IPV6_CHECKSUM = 0x1a
IPV6_DEFAULT_MULTICAST_HOPS = 0x1
IPV6_DEFAULT_MULTICAST_LOOP = 0x1
IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FLOW_ECN_MASK = 0x300
+ IPV6_FLOW_ECN_MASK = 0x3000
IPV6_FRAGTTL = 0x3c
IPV6_FW_ADD = 0x1e
IPV6_FW_DEL = 0x1f
@@ -779,6 +805,8 @@ const (
IPV6_FW_GET = 0x22
IPV6_FW_ZERO = 0x21
IPV6_HLIMDEC = 0x1
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
IPV6_IPSEC_POLICY = 0x1c
IPV6_JOIN_GROUP = 0xc
IPV6_LEAVE_GROUP = 0xd
@@ -790,20 +818,34 @@ const (
IPV6_MAX_SOCK_SRC_FILTER = 0x80
IPV6_MIN_MEMBERSHIPS = 0x1f
IPV6_MMTU = 0x500
+ IPV6_MSFILTER = 0x4a
IPV6_MULTICAST_HOPS = 0xa
IPV6_MULTICAST_IF = 0x9
IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_PATHMTU = 0x2c
+ IPV6_PKTINFO = 0x2e
IPV6_PORTRANGE = 0xe
IPV6_PORTRANGE_DEFAULT = 0x0
IPV6_PORTRANGE_HIGH = 0x1
IPV6_PORTRANGE_LOW = 0x2
+ IPV6_PREFER_TEMPADDR = 0x3f
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x3d
+ IPV6_RECVRTHDR = 0x26
IPV6_RECVTCLASS = 0x23
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x39
IPV6_RTHDR_LOOSE = 0x0
IPV6_RTHDR_STRICT = 0x1
IPV6_RTHDR_TYPE_0 = 0x0
IPV6_SOCKOPT_RESERVED1 = 0x3
IPV6_TCLASS = 0x24
IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2a
IPV6_V6ONLY = 0x1b
IPV6_VERSION = 0x60
IPV6_VERSION_MASK = 0xf0
@@ -814,6 +856,7 @@ const (
IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1
IP_DF = 0x4000
+ IP_DONTFRAG = 0x1c
IP_DROP_MEMBERSHIP = 0xd
IP_DROP_SOURCE_MEMBERSHIP = 0x47
IP_DUMMYNET_CONFIGURE = 0x3c
@@ -885,6 +928,12 @@ const (
KERN_OSRELEASE = 0x2
KERN_OSTYPE = 0x1
KERN_VERSION = 0x4
+ LOCAL_PEERCRED = 0x1
+ LOCAL_PEEREPID = 0x3
+ LOCAL_PEEREUUID = 0x5
+ LOCAL_PEERPID = 0x2
+ LOCAL_PEERTOKEN = 0x6
+ LOCAL_PEERUUID = 0x4
LOCK_EX = 0x2
LOCK_NB = 0x4
LOCK_SH = 0x1
@@ -900,6 +949,7 @@ const (
MADV_SEQUENTIAL = 0x2
MADV_WILLNEED = 0x3
MADV_ZERO_WIRED_PAGES = 0x6
+ MAP_32BIT = 0x8000
MAP_ANON = 0x1000
MAP_ANONYMOUS = 0x1000
MAP_COPY = 0x2
@@ -916,6 +966,17 @@ const (
MAP_RESILIENT_CODESIGN = 0x2000
MAP_RESILIENT_MEDIA = 0x4000
MAP_SHARED = 0x1
+ MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
+ MAP_UNIX03 = 0x40000
+ MCAST_BLOCK_SOURCE = 0x54
+ MCAST_EXCLUDE = 0x2
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x50
+ MCAST_JOIN_SOURCE_GROUP = 0x52
+ MCAST_LEAVE_GROUP = 0x51
+ MCAST_LEAVE_SOURCE_GROUP = 0x53
+ MCAST_UNBLOCK_SOURCE = 0x55
+ MCAST_UNDEFINED = 0x0
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MNT_ASYNC = 0x40
@@ -927,6 +988,7 @@ const (
MNT_DOVOLFS = 0x8000
MNT_DWAIT = 0x4
MNT_EXPORTED = 0x100
+ MNT_EXT_ROOT_DATA_VOL = 0x1
MNT_FORCE = 0x80000
MNT_IGNORE_OWNERSHIP = 0x200000
MNT_JOURNALED = 0x800000
@@ -943,12 +1005,15 @@ const (
MNT_QUOTA = 0x2000
MNT_RDONLY = 0x1
MNT_RELOAD = 0x40000
+ MNT_REMOVABLE = 0x200
MNT_ROOTFS = 0x4000
+ MNT_SNAPSHOT = 0x40000000
+ MNT_STRICTATIME = 0x80000000
MNT_SYNCHRONOUS = 0x2
MNT_UNION = 0x20
MNT_UNKNOWNPERMISSIONS = 0x200000
MNT_UPDATE = 0x10000
- MNT_VISFLAGMASK = 0x17f0f5ff
+ MNT_VISFLAGMASK = 0xd7f0f7ff
MNT_WAIT = 0x1
MSG_CTRUNC = 0x20
MSG_DONTROUTE = 0x4
@@ -959,6 +1024,7 @@ const (
MSG_HAVEMORE = 0x2000
MSG_HOLD = 0x800
MSG_NEEDSA = 0x10000
+ MSG_NOSIGNAL = 0x80000
MSG_OOB = 0x1
MSG_PEEK = 0x2
MSG_RCVMORE = 0x4000
@@ -975,9 +1041,10 @@ const (
NET_RT_DUMP = 0x1
NET_RT_DUMP2 = 0x7
NET_RT_FLAGS = 0x2
+ NET_RT_FLAGS_PRIV = 0xa
NET_RT_IFLIST = 0x3
NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xa
+ NET_RT_MAXID = 0xb
NET_RT_STAT = 0x4
NET_RT_TRASH = 0x5
NFDBITS = 0x20
@@ -1015,6 +1082,7 @@ const (
NOTE_LEEWAY = 0x10
NOTE_LINK = 0x10
NOTE_LOWAT = 0x1
+ NOTE_MACHTIME = 0x100
NOTE_MACH_CONTINUOUS_TIME = 0x80
NOTE_NONE = 0x80
NOTE_NSECONDS = 0x4
@@ -1061,6 +1129,7 @@ const (
O_NDELAY = 0x4
O_NOCTTY = 0x20000
O_NOFOLLOW = 0x100
+ O_NOFOLLOW_ANY = 0x20000000
O_NONBLOCK = 0x4
O_POPUP = 0x80000000
O_RDONLY = 0x0
@@ -1132,6 +1201,7 @@ const (
RTF_BROADCAST = 0x400000
RTF_CLONING = 0x100
RTF_CONDEMNED = 0x2000000
+ RTF_DEAD = 0x20000000
RTF_DELCLONE = 0x80
RTF_DONE = 0x40
RTF_DYNAMIC = 0x10
@@ -1139,6 +1209,7 @@ const (
RTF_HOST = 0x4
RTF_IFREF = 0x4000000
RTF_IFSCOPE = 0x1000000
+ RTF_LLDATA = 0x400
RTF_LLINFO = 0x400
RTF_LOCAL = 0x200000
RTF_MODIFIED = 0x20
@@ -1206,6 +1277,7 @@ const (
SIOCGDRVSPEC = 0xc028697b
SIOCGETVLAN = 0xc020697f
SIOCGHIWAT = 0x40047301
+ SIOCGIF6LOWPAN = 0xc02069c5
SIOCGIFADDR = 0xc0206921
SIOCGIFALTMTU = 0xc0206948
SIOCGIFASYNCMAP = 0xc020697c
@@ -1216,6 +1288,7 @@ const (
SIOCGIFDEVMTU = 0xc0206944
SIOCGIFDSTADDR = 0xc0206922
SIOCGIFFLAGS = 0xc0206911
+ SIOCGIFFUNCTIONALTYPE = 0xc02069ad
SIOCGIFGENERIC = 0xc020693a
SIOCGIFKPI = 0xc0206987
SIOCGIFMAC = 0xc0206982
@@ -1229,6 +1302,7 @@ const (
SIOCGIFSTATUS = 0xc331693d
SIOCGIFVLAN = 0xc020697f
SIOCGIFWAKEFLAGS = 0xc0206988
+ SIOCGIFXMEDIA = 0xc02c6948
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309
SIOCIFCREATE = 0xc0206978
@@ -1239,6 +1313,7 @@ const (
SIOCSDRVSPEC = 0x8028697b
SIOCSETVLAN = 0x8020697e
SIOCSHIWAT = 0x80047300
+ SIOCSIF6LOWPAN = 0x802069c4
SIOCSIFADDR = 0x8020690c
SIOCSIFALTMTU = 0x80206945
SIOCSIFASYNCMAP = 0x8020697d
@@ -1266,6 +1341,7 @@ const (
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
SOL_SOCKET = 0xffff
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x2
diff --git a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
index 6130471..17bba0e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && dragonfly
// +build amd64,dragonfly
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -62,6 +63,7 @@ const (
B28800 = 0x7080
B300 = 0x12c
B38400 = 0x9600
+ B460800 = 0x70800
B4800 = 0x12c0
B50 = 0x32
B57600 = 0xe100
@@ -69,12 +71,15 @@ const (
B7200 = 0x1c20
B75 = 0x4b
B76800 = 0x12c00
+ B921600 = 0xe1000
B9600 = 0x2580
+ BIOCFEEDBACK = 0x8004427d
BIOCFLUSH = 0x20004268
BIOCGBLEN = 0x40044266
BIOCGDLT = 0x4004426a
BIOCGDLTLIST = 0xc0104279
BIOCGETIF = 0x4020426b
+ BIOCGFEEDBACK = 0x4004427c
BIOCGHDRCMPLT = 0x40044274
BIOCGRSIG = 0x40044272
BIOCGRTIMEOUT = 0x4010426e
@@ -88,6 +93,7 @@ const (
BIOCSETF = 0x80104267
BIOCSETIF = 0x8020426c
BIOCSETWF = 0x8010427b
+ BIOCSFEEDBACK = 0x8004427d
BIOCSHDRCMPLT = 0x80044275
BIOCSRSIG = 0x80044273
BIOCSRTIMEOUT = 0x8010426d
@@ -125,6 +131,7 @@ const (
BPF_MINBUFSIZE = 0x20
BPF_MINOR_VERSION = 0x1
BPF_MISC = 0x7
+ BPF_MOD = 0x90
BPF_MSH = 0xa0
BPF_MUL = 0x20
BPF_NEG = 0x80
@@ -139,6 +146,7 @@ const (
BPF_TXA = 0x80
BPF_W = 0x0
BPF_X = 0x8
+ BPF_XOR = 0xa0
BRKINT = 0x2
CFLUSH = 0xf
CLOCAL = 0x8000
@@ -156,6 +164,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
@@ -175,6 +189,7 @@ const (
DLT_A429 = 0xb8
DLT_A653_ICM = 0xb9
DLT_AIRONET_HEADER = 0x78
+ DLT_AOS = 0xde
DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
DLT_ARCNET = 0x7
DLT_ARCNET_LINUX = 0x81
@@ -184,22 +199,33 @@ const (
DLT_AX25 = 0x3
DLT_AX25_KISS = 0xca
DLT_BACNET_MS_TP = 0xa5
+ DLT_BLUETOOTH_BREDR_BB = 0xff
DLT_BLUETOOTH_HCI_H4 = 0xbb
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_CAN_SOCKETCAN = 0xe3
DLT_CHAOS = 0x5
DLT_CHDLC = 0x68
DLT_CISCO_IOS = 0x76
DLT_C_HDLC = 0x68
DLT_C_HDLC_WITH_DIR = 0xcd
+ DLT_DBUS = 0xe7
+ DLT_DECT = 0xdd
DLT_DOCSIS = 0x8f
+ DLT_DVB_CI = 0xeb
DLT_ECONET = 0x73
DLT_EN10MB = 0x1
DLT_EN3MB = 0x2
DLT_ENC = 0x6d
+ DLT_EPON = 0x103
DLT_ERF = 0xc5
DLT_ERF_ETH = 0xaf
DLT_ERF_POS = 0xb0
+ DLT_FC_2 = 0xe0
+ DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
DLT_FDDI = 0xa
DLT_FLEXRAY = 0xd2
DLT_FRELAY = 0x6b
@@ -209,6 +235,8 @@ const (
DLT_GPF_F = 0xab
DLT_GPF_T = 0xaa
DLT_GPRS_LLC = 0xa9
+ DLT_GSMTAP_ABIS = 0xda
+ DLT_GSMTAP_UM = 0xd9
DLT_HHDLC = 0x79
DLT_IBM_SN = 0x92
DLT_IBM_SP = 0x91
@@ -218,18 +246,28 @@ const (
DLT_IEEE802_11_RADIO_AVS = 0xa3
DLT_IEEE802_15_4 = 0xc3
DLT_IEEE802_15_4_LINUX = 0xbf
+ DLT_IEEE802_15_4_NOFCS = 0xe6
DLT_IEEE802_15_4_NONASK_PHY = 0xd7
DLT_IEEE802_16_MAC_CPS = 0xbc
DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
+ DLT_INFINIBAND = 0xf7
DLT_IPFILTER = 0x74
DLT_IPMB = 0xc7
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_ISO_14443 = 0x108
DLT_JUNIPER_ATM1 = 0x89
DLT_JUNIPER_ATM2 = 0x87
+ DLT_JUNIPER_ATM_CEMIC = 0xee
DLT_JUNIPER_CHDLC = 0xb5
DLT_JUNIPER_ES = 0x84
DLT_JUNIPER_ETHER = 0xb2
+ DLT_JUNIPER_FIBRECHANNEL = 0xea
DLT_JUNIPER_FRELAY = 0xb4
DLT_JUNIPER_GGSN = 0x85
DLT_JUNIPER_ISM = 0xc2
@@ -242,25 +280,40 @@ const (
DLT_JUNIPER_PPPOE = 0xa7
DLT_JUNIPER_PPPOE_ATM = 0xa8
DLT_JUNIPER_SERVICES = 0x88
+ DLT_JUNIPER_SRX_E2E = 0xe9
DLT_JUNIPER_ST = 0xc8
DLT_JUNIPER_VP = 0xb7
+ DLT_JUNIPER_VS = 0xe8
DLT_LAPB_WITH_DIR = 0xcf
DLT_LAPD = 0xcb
DLT_LIN = 0xd4
+ DLT_LINUX_EVDEV = 0xd8
DLT_LINUX_IRDA = 0x90
DLT_LINUX_LAPD = 0xb1
DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c
DLT_LTALK = 0x72
+ DLT_MATCHING_MAX = 0x109
+ DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6
DLT_MOST = 0xd3
+ DLT_MPEG_2_TS = 0xf3
+ DLT_MPLS = 0xdb
DLT_MTP2 = 0x8c
DLT_MTP2_WITH_PHDR = 0x8b
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_PCI_EXP = 0x7d
DLT_PFLOG = 0x75
DLT_PFSYNC = 0x12
+ DLT_PKTAP = 0x102
DLT_PPI = 0xc0
DLT_PPP = 0x9
DLT_PPP_BSDOS = 0x10
@@ -269,22 +322,51 @@ const (
DLT_PPP_SERIAL = 0x32
DLT_PPP_WITH_DIR = 0xcc
DLT_PRISM_HEADER = 0x77
+ DLT_PROFIBUS_DL = 0x101
DLT_PRONET = 0x4
DLT_RAIF1 = 0xc6
DLT_RAW = 0xc
+ DLT_RDS = 0x109
DLT_REDBACK_SMARTEDGE = 0x20
DLT_RIO = 0x7c
+ DLT_RTAC_SERIAL = 0xfa
DLT_SCCP = 0x8e
+ DLT_SCTP = 0xf8
DLT_SITA = 0xc4
DLT_SLIP = 0x8
DLT_SLIP_BSDOS = 0xf
+ DLT_STANAG_5066_D_PDU = 0xed
DLT_SUNATM = 0x7b
DLT_SYMANTEC_FIREWALL = 0x63
DLT_TZSP = 0x80
DLT_USB = 0xba
+ DLT_USBPCAP = 0xf9
+ DLT_USB_FREEBSD = 0xba
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_XORAYA = 0xd6
+ DLT_ZWAVE_R1_R2 = 0x105
+ DLT_ZWAVE_R3 = 0x106
DT_BLK = 0x6
DT_CHR = 0x2
DT_DBF = 0xf
@@ -323,10 +405,11 @@ const (
EV_EOF = 0x8000
EV_ERROR = 0x4000
EV_FLAG1 = 0x2000
+ EV_HUP = 0x800
EV_NODATA = 0x1000
EV_ONESHOT = 0x10
EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
+ EV_SYSFLAGS = 0xf800
EXTA = 0x4b00
EXTB = 0x9600
EXTEXIT_LWP = 0x10000
@@ -365,8 +448,9 @@ const (
IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2
- IFF_CANTCHANGE = 0x118e72
+ IFF_CANTCHANGE = 0x318e72
IFF_DEBUG = 0x4
+ IFF_IDIRECT = 0x200000
IFF_LINK0 = 0x1000
IFF_LINK1 = 0x2000
IFF_LINK2 = 0x4000
@@ -441,7 +525,6 @@ const (
IFT_EPLRS = 0x57
IFT_ESCON = 0x49
IFT_ETHER = 0x6
- IFT_FAITH = 0xf2
IFT_FAST = 0x7d
IFT_FASTETHER = 0x3e
IFT_FASTETHERFX = 0x45
@@ -614,6 +697,7 @@ const (
IN_CLASSD_NET = 0xf0000000
IN_CLASSD_NSHIFT = 0x1c
IN_LOOPBACKNET = 0x7f
+ IN_RFC3021_MASK = 0xfffffffe
IPPROTO_3PC = 0x22
IPPROTO_ADFS = 0x44
IPPROTO_AH = 0x33
@@ -735,7 +819,6 @@ const (
IPV6_DEFHLIM = 0x40
IPV6_DONTFRAG = 0x3e
IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FRAGTTL = 0x78
@@ -747,7 +830,6 @@ const (
IPV6_HLIMDEC = 0x1
IPV6_HOPLIMIT = 0x2f
IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
IPV6_JOIN_GROUP = 0xc
IPV6_LEAVE_GROUP = 0xd
IPV6_MAXHLIM = 0xff
@@ -795,16 +877,22 @@ const (
IP_DUMMYNET_DEL = 0x3d
IP_DUMMYNET_FLUSH = 0x3e
IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
IP_FW_ADD = 0x32
IP_FW_DEL = 0x33
IP_FW_FLUSH = 0x34
IP_FW_GET = 0x36
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_ZERO = 0x35
IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
IP_MAXPACKET = 0xffff
IP_MAX_MEMBERSHIPS = 0x14
IP_MF = 0x2000
@@ -1080,12 +1168,10 @@ const (
RTM_MISS = 0x7
RTM_NEWADDR = 0xc
RTM_NEWMADDR = 0xf
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
RTM_REDIRECT = 0x6
RTM_RESOLVE = 0xb
RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x6
+ RTM_VERSION = 0x7
RTV_EXPIRE = 0x4
RTV_HOPCOUNT = 0x2
RTV_IWCAPSEGS = 0x400
@@ -1106,13 +1192,13 @@ const (
SHUT_RDWR = 0x2
SHUT_WR = 0x1
SIOCADDMULTI = 0x80206931
- SIOCADDRT = 0x8040720a
SIOCAIFADDR = 0x8040691a
+ SIOCAIFGROUP = 0x80286987
SIOCALIFADDR = 0x8118691b
SIOCATMARK = 0x40047307
SIOCDELMULTI = 0x80206932
- SIOCDELRT = 0x8040720b
SIOCDIFADDR = 0x80206919
+ SIOCDIFGROUP = 0x80286989
SIOCDIFPHYADDR = 0x80206949
SIOCDLIFADDR = 0x8118691d
SIOCGDRVSPEC = 0xc028697b
@@ -1120,6 +1206,7 @@ const (
SIOCGETVIFCNT = 0xc028720f
SIOCGHIWAT = 0x40047301
SIOCGIFADDR = 0xc0206921
+ SIOCGIFALIAS = 0xc0406929
SIOCGIFBRDADDR = 0xc0206923
SIOCGIFCAP = 0xc020691f
SIOCGIFCONF = 0xc0106924
@@ -1128,6 +1215,7 @@ const (
SIOCGIFFLAGS = 0xc0206911
SIOCGIFGENERIC = 0xc020693a
SIOCGIFGMEMB = 0xc028698a
+ SIOCGIFGROUP = 0xc0286988
SIOCGIFINDEX = 0xc0206920
SIOCGIFMEDIA = 0xc0306938
SIOCGIFMETRIC = 0xc0206917
@@ -1194,6 +1282,7 @@ const (
SO_RCVBUF = 0x1002
SO_RCVLOWAT = 0x1004
SO_RCVTIMEO = 0x1006
+ SO_RERROR = 0x2000
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
SO_SNDBUF = 0x1001
@@ -1233,6 +1322,9 @@ const (
S_IXGRP = 0x8
S_IXOTH = 0x1
S_IXUSR = 0x40
+ TAB0 = 0x0
+ TAB3 = 0x4
+ TABDLY = 0x4
TCIFLUSH = 0x1
TCIOFF = 0x3
TCIOFLUSH = 0x3
@@ -1259,6 +1351,8 @@ const (
TCP_NOPUSH = 0x4
TCP_SIGNATURE_ENABLE = 0x10
TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478
TIOCCONS = 0x80047462
@@ -1272,7 +1366,6 @@ const (
TIOCGETD = 0x4004741a
TIOCGPGRP = 0x40047477
TIOCGSID = 0x40047463
- TIOCGSIZE = 0x40087468
TIOCGWINSZ = 0x40087468
TIOCISPTMASTER = 0x20007455
TIOCMBIC = 0x8004746b
@@ -1317,7 +1410,6 @@ const (
TIOCSETD = 0x8004741b
TIOCSIG = 0x2000745f
TIOCSPGRP = 0x80047476
- TIOCSSIZE = 0x80087467
TIOCSTART = 0x2000746e
TIOCSTAT = 0x20007465
TIOCSTI = 0x80017472
@@ -1326,6 +1418,8 @@ const (
TIOCTIMESTAMP = 0x40107459
TIOCUCNTL = 0x80047466
TOSTOP = 0x400000
+ UTIME_NOW = -0x1
+ UTIME_OMIT = -0x2
VCHECKPT = 0x13
VDISCARD = 0xf
VDSUSP = 0xb
@@ -1350,9 +1444,12 @@ const (
VWERASE = 0x4
WCONTINUED = 0x4
WCOREFLAG = 0x80
+ WEXITED = 0x10
WLINUXCLONE = 0x80000000
WNOHANG = 0x1
- WSTOPPED = 0x7f
+ WNOWAIT = 0x8
+ WSTOPPED = 0x2
+ WTRAPPED = 0x20
WUNTRACED = 0x2
)
@@ -1452,11 +1549,6 @@ const (
ETIMEDOUT = syscall.Errno(0x3c)
ETOOMANYREFS = syscall.Errno(0x3b)
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)
EWOULDBLOCK = syscall.Errno(0x23)
EXDEV = syscall.Errno(0x12)
@@ -1600,12 +1692,7 @@ var errorList = [...]struct {
{91, "ENOLINK", "link has been severed"},
{92, "EPROTO", "protocol error"},
{93, "ENOMEDIUM", "no medium found"},
- {94, "EUNUSED94", "unknown error: 94"},
- {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"},
+ {99, "EASYNC", "unknown error: 99"},
}
// Signal table
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
index b72544f..9c7c5e1 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m32
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && freebsd
// +build 386,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -339,6 +340,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
@@ -355,6 +362,22 @@ const (
CTL_KERN = 0x1
CTL_MAXNAME = 0x18
CTL_NET = 0x4
+ DIOCGATTR = 0xc144648e
+ DIOCGDELETE = 0x80106488
+ DIOCGFLUSH = 0x20006487
+ DIOCGFRONTSTUFF = 0x40086486
+ DIOCGFWHEADS = 0x40046483
+ DIOCGFWSECTORS = 0x40046482
+ DIOCGIDENT = 0x41006489
+ DIOCGMEDIASIZE = 0x40086481
+ DIOCGPHYSPATH = 0x4400648d
+ DIOCGPROVIDERNAME = 0x4400648a
+ DIOCGSECTORSIZE = 0x40046480
+ DIOCGSTRIPEOFFSET = 0x4008648c
+ DIOCGSTRIPESIZE = 0x4008648b
+ DIOCSKERNELDUMP = 0x804c6490
+ DIOCSKERNELDUMP_FREEBSD11 = 0x80046485
+ DIOCZONECMD = 0xc06c648f
DLT_A429 = 0xb8
DLT_A653_ICM = 0xb9
DLT_AIRONET_HEADER = 0x78
@@ -379,11 +402,14 @@ const (
DLT_CHAOS = 0x5
DLT_CHDLC = 0x68
DLT_CISCO_IOS = 0x76
+ DLT_CLASS_NETBSD_RAWAF = 0x2240000
DLT_C_HDLC = 0x68
DLT_C_HDLC_WITH_DIR = 0xcd
DLT_DBUS = 0xe7
DLT_DECT = 0xdd
+ DLT_DISPLAYPORT_AUX = 0x113
DLT_DOCSIS = 0x8f
+ DLT_DOCSIS31_XRA31 = 0x111
DLT_DVB_CI = 0xeb
DLT_ECONET = 0x73
DLT_EN10MB = 0x1
@@ -393,6 +419,7 @@ const (
DLT_ERF = 0xc5
DLT_ERF_ETH = 0xaf
DLT_ERF_POS = 0xb0
+ DLT_ETHERNET_MPACKET = 0x112
DLT_FC_2 = 0xe0
DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
DLT_FDDI = 0xa
@@ -406,7 +433,6 @@ const (
DLT_GPRS_LLC = 0xa9
DLT_GSMTAP_ABIS = 0xda
DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
DLT_IBM_SN = 0x92
DLT_IBM_SP = 0x91
DLT_IEEE802 = 0x6
@@ -429,6 +455,7 @@ const (
DLT_IPV4 = 0xe4
DLT_IPV6 = 0xe5
DLT_IP_OVER_FC = 0x7a
+ DLT_ISO_14443 = 0x108
DLT_JUNIPER_ATM1 = 0x89
DLT_JUNIPER_ATM2 = 0x87
DLT_JUNIPER_ATM_CEMIC = 0xee
@@ -461,8 +488,9 @@ const (
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c
+ DLT_LORATAP = 0x10e
DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0x104
+ DLT_MATCHING_MAX = 0x113
DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6
DLT_MOST = 0xd3
@@ -478,14 +506,16 @@ const (
DLT_NFC_LLCP = 0xf5
DLT_NFLOG = 0xef
DLT_NG40 = 0xf4
+ DLT_NORDIC_BLE = 0x110
DLT_NULL = 0x0
+ DLT_OPENFLOW = 0x10b
DLT_PCI_EXP = 0x7d
DLT_PFLOG = 0x75
DLT_PFSYNC = 0x79
DLT_PKTAP = 0x102
DLT_PPI = 0xc0
DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
+ DLT_PPP_BSDOS = 0xe
DLT_PPP_ETHER = 0x33
DLT_PPP_PPPD = 0xa6
DLT_PPP_SERIAL = 0x32
@@ -496,19 +526,25 @@ const (
DLT_PRONET = 0x4
DLT_RAIF1 = 0xc6
DLT_RAW = 0xc
+ DLT_RDS = 0x109
+ DLT_REDBACK_SMARTEDGE = 0x20
DLT_RIO = 0x7c
DLT_RTAC_SERIAL = 0xfa
DLT_SCCP = 0x8e
DLT_SCTP = 0xf8
+ DLT_SDLC = 0x10c
DLT_SITA = 0xc4
DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
+ DLT_SLIP_BSDOS = 0xd
DLT_STANAG_5066_D_PDU = 0xed
DLT_SUNATM = 0x7b
DLT_SYMANTEC_FIREWALL = 0x63
+ DLT_TI_LLN_SNIFFER = 0x10d
DLT_TZSP = 0x80
DLT_USB = 0xba
DLT_USBPCAP = 0xf9
+ DLT_USB_DARWIN = 0x10a
+ DLT_USB_FREEBSD = 0xba
DLT_USB_LINUX = 0xbd
DLT_USB_LINUX_MMAPPED = 0xdc
DLT_USER0 = 0x93
@@ -527,10 +563,14 @@ const (
DLT_USER7 = 0x9a
DLT_USER8 = 0x9b
DLT_USER9 = 0x9c
+ DLT_VSOCK = 0x10f
+ DLT_WATTSTOPPER_DLM = 0x107
DLT_WIHART = 0xdf
DLT_WIRESHARK_UPPER_PDU = 0xfc
DLT_X2E_SERIAL = 0xd5
DLT_X2E_XORAYA = 0xd6
+ DLT_ZWAVE_R1_R2 = 0x105
+ DLT_ZWAVE_R3 = 0x106
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -548,6 +588,7 @@ const (
ECHONL = 0x10
ECHOPRT = 0x20
EVFILT_AIO = -0x3
+ EVFILT_EMPTY = -0xd
EVFILT_FS = -0x9
EVFILT_LIO = -0xa
EVFILT_PROC = -0x5
@@ -555,11 +596,12 @@ const (
EVFILT_READ = -0x1
EVFILT_SENDFILE = -0xc
EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xc
+ EVFILT_SYSCOUNT = 0xd
EVFILT_TIMER = -0x7
EVFILT_USER = -0xb
EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2
+ EVNAMEMAP_NAME_SIZE = 0x40
EV_ADD = 0x1
EV_CLEAR = 0x20
EV_DELETE = 0x2
@@ -576,6 +618,7 @@ const (
EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000
EXTA = 0x4b00
+ EXTATTR_MAXNAMELEN = 0xff
EXTATTR_NAMESPACE_EMPTY = 0x0
EXTATTR_NAMESPACE_SYSTEM = 0x2
EXTATTR_NAMESPACE_USER = 0x1
@@ -617,6 +660,7 @@ const (
IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
+ IFCAP_WOL_MAGIC = 0x2000
IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2
@@ -633,6 +677,7 @@ const (
IFF_MONITOR = 0x40000
IFF_MULTICAST = 0x8000
IFF_NOARP = 0x80
+ IFF_NOGROUP = 0x800000
IFF_OACTIVE = 0x400
IFF_POINTOPOINT = 0x10
IFF_PPROMISC = 0x20000
@@ -807,6 +852,7 @@ const (
IPV6_DSTOPTS = 0x32
IPV6_FLOWID = 0x43
IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_LEN = 0x14
IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FLOWTYPE = 0x44
IPV6_FRAGTTL = 0x78
@@ -827,13 +873,13 @@ const (
IPV6_MAX_GROUP_SRC_FILTER = 0x200
IPV6_MAX_MEMBERSHIPS = 0xfff
IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
IPV6_MMTU = 0x500
IPV6_MSFILTER = 0x4a
IPV6_MULTICAST_HOPS = 0xa
IPV6_MULTICAST_IF = 0x9
IPV6_MULTICAST_LOOP = 0xb
IPV6_NEXTHOP = 0x30
+ IPV6_ORIGDSTADDR = 0x48
IPV6_PATHMTU = 0x2c
IPV6_PKTINFO = 0x2e
IPV6_PORTRANGE = 0xe
@@ -845,6 +891,7 @@ const (
IPV6_RECVFLOWID = 0x46
IPV6_RECVHOPLIMIT = 0x25
IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVORIGDSTADDR = 0x48
IPV6_RECVPATHMTU = 0x2b
IPV6_RECVPKTINFO = 0x24
IPV6_RECVRSSBUCKETID = 0x47
@@ -905,10 +952,8 @@ const (
IP_MAX_MEMBERSHIPS = 0xfff
IP_MAX_SOCK_MUTE_FILTER = 0x80
IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MAX_SOURCE_FILTER = 0x400
IP_MF = 0x2000
IP_MINTTL = 0x42
- IP_MIN_MEMBERSHIPS = 0x1f
IP_MSFILTER = 0x4a
IP_MSS = 0x240
IP_MULTICAST_IF = 0x9
@@ -918,6 +963,7 @@ const (
IP_OFFMASK = 0x1fff
IP_ONESBCAST = 0x17
IP_OPTIONS = 0x1
+ IP_ORIGDSTADDR = 0x1b
IP_PORTRANGE = 0x13
IP_PORTRANGE_DEFAULT = 0x0
IP_PORTRANGE_HIGH = 0x1
@@ -926,6 +972,7 @@ const (
IP_RECVFLOWID = 0x5d
IP_RECVIF = 0x14
IP_RECVOPTS = 0x5
+ IP_RECVORIGDSTADDR = 0x1b
IP_RECVRETOPTS = 0x6
IP_RECVRSSBUCKETID = 0x5e
IP_RECVTOS = 0x44
@@ -951,6 +998,11 @@ const (
KERN_OSRELEASE = 0x2
KERN_OSTYPE = 0x1
KERN_VERSION = 0x4
+ LOCAL_CONNWAIT = 0x4
+ LOCAL_CREDS = 0x2
+ LOCAL_CREDS_PERSISTENT = 0x3
+ LOCAL_PEERCRED = 0x1
+ LOCAL_VENDOR = 0x80000000
LOCK_EX = 0x2
LOCK_NB = 0x4
LOCK_SH = 0x1
@@ -975,6 +1027,7 @@ const (
MAP_EXCL = 0x4000
MAP_FILE = 0x0
MAP_FIXED = 0x10
+ MAP_GUARD = 0x2000
MAP_HASSEMAPHORE = 0x200
MAP_NOCORE = 0x20000
MAP_NOSYNC = 0x800
@@ -986,6 +1039,15 @@ const (
MAP_RESERVED0100 = 0x100
MAP_SHARED = 0x1
MAP_STACK = 0x400
+ MCAST_BLOCK_SOURCE = 0x54
+ MCAST_EXCLUDE = 0x2
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x50
+ MCAST_JOIN_SOURCE_GROUP = 0x52
+ MCAST_LEAVE_GROUP = 0x51
+ MCAST_LEAVE_SOURCE_GROUP = 0x53
+ MCAST_UNBLOCK_SOURCE = 0x55
+ MCAST_UNDEFINED = 0x0
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MNT_ACLS = 0x8000000
@@ -1026,10 +1088,12 @@ const (
MNT_SUSPEND = 0x4
MNT_SYNCHRONOUS = 0x2
MNT_UNION = 0x20
+ MNT_UNTRUSTED = 0x800000000
MNT_UPDATE = 0x10000
- MNT_UPDATEMASK = 0x2d8d0807e
+ MNT_UPDATEMASK = 0xad8d0807e
MNT_USER = 0x8000
- MNT_VISFLAGMASK = 0x3fef0ffff
+ MNT_VERIFIED = 0x400000000
+ MNT_VISFLAGMASK = 0xffef0ffff
MNT_WAIT = 0x1
MSG_CMSG_CLOEXEC = 0x40000
MSG_COMPAT = 0x8000
@@ -1058,6 +1122,7 @@ const (
NFDBITS = 0x20
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
+ NOTE_ABSTIME = 0x10
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
NOTE_CLOSE = 0x100
@@ -1212,7 +1277,6 @@ const (
RTV_WEIGHT = 0x100
RT_ALL_FIBS = -0x1
RT_BLACKHOLE = 0x40
- RT_CACHING_CONTEXT = 0x1
RT_DEFAULT_FIB = 0x0
RT_HAS_GW = 0x80
RT_HAS_HEADER = 0x10
@@ -1222,15 +1286,17 @@ const (
RT_LLE_CACHE = 0x100
RT_MAY_LOOP = 0x8
RT_MAY_LOOP_BIT = 0x3
- RT_NORTREF = 0x2
RT_REJECT = 0x20
RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1
SCM_BINTIME = 0x4
SCM_CREDS = 0x3
+ SCM_MONOTONIC = 0x6
+ SCM_REALTIME = 0x5
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x2
+ SCM_TIME_INFO = 0x7
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@@ -1246,6 +1312,7 @@ const (
SIOCGETSGCNT = 0xc0147210
SIOCGETVIFCNT = 0xc014720f
SIOCGHIWAT = 0x40047301
+ SIOCGHWADDR = 0xc020693e
SIOCGI2C = 0xc020693d
SIOCGIFADDR = 0xc0206921
SIOCGIFBRDADDR = 0xc0206923
@@ -1267,8 +1334,11 @@ const (
SIOCGIFPDSTADDR = 0xc0206948
SIOCGIFPHYS = 0xc0206935
SIOCGIFPSRCADDR = 0xc0206947
+ SIOCGIFRSSHASH = 0xc0186997
+ SIOCGIFRSSKEY = 0xc0946996
SIOCGIFSTATUS = 0xc331693b
SIOCGIFXMEDIA = 0xc028698b
+ SIOCGLANPCP = 0xc0206998
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309
SIOCGPRIVATE_0 = 0xc0206950
@@ -1299,6 +1369,7 @@ const (
SIOCSIFPHYS = 0x80206936
SIOCSIFRVNET = 0xc020695b
SIOCSIFVNET = 0xc020695a
+ SIOCSLANPCP = 0x80206999
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308
SIOCSTUNFIB = 0x8020695f
@@ -1310,6 +1381,7 @@ const (
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
SOL_SOCKET = 0xffff
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x2
@@ -1317,6 +1389,7 @@ const (
SO_BINTIME = 0x2000
SO_BROADCAST = 0x20
SO_DEBUG = 0x1
+ SO_DOMAIN = 0x1019
SO_DONTROUTE = 0x10
SO_ERROR = 0x1007
SO_KEEPALIVE = 0x8
@@ -1325,6 +1398,7 @@ const (
SO_LISTENINCQLEN = 0x1013
SO_LISTENQLEN = 0x1012
SO_LISTENQLIMIT = 0x1011
+ SO_MAX_PACING_RATE = 0x1018
SO_NOSIGPIPE = 0x800
SO_NO_DDP = 0x8000
SO_NO_OFFLOAD = 0x4000
@@ -1337,11 +1411,19 @@ const (
SO_RCVTIMEO = 0x1006
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
+ SO_REUSEPORT_LB = 0x10000
SO_SETFIB = 0x1014
SO_SNDBUF = 0x1001
SO_SNDLOWAT = 0x1003
SO_SNDTIMEO = 0x1005
SO_TIMESTAMP = 0x400
+ SO_TS_BINTIME = 0x1
+ SO_TS_CLOCK = 0x1017
+ SO_TS_CLOCK_MAX = 0x3
+ SO_TS_DEFAULT = 0x0
+ SO_TS_MONOTONIC = 0x3
+ SO_TS_REALTIME = 0x2
+ SO_TS_REALTIME_MICRO = 0x0
SO_TYPE = 0x1008
SO_USELOOPBACK = 0x40
SO_USER_COOKIE = 0x1015
@@ -1385,10 +1467,45 @@ const (
TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
+ TCP_BBR_ACK_COMP_ALG = 0x448
+ TCP_BBR_DRAIN_INC_EXTRA = 0x43c
+ TCP_BBR_DRAIN_PG = 0x42e
+ TCP_BBR_EXTRA_GAIN = 0x449
+ TCP_BBR_IWINTSO = 0x42b
+ TCP_BBR_LOWGAIN_FD = 0x436
+ TCP_BBR_LOWGAIN_HALF = 0x435
+ TCP_BBR_LOWGAIN_THRESH = 0x434
+ TCP_BBR_MAX_RTO = 0x439
+ TCP_BBR_MIN_RTO = 0x438
+ TCP_BBR_ONE_RETRAN = 0x431
+ TCP_BBR_PACE_CROSS = 0x442
+ TCP_BBR_PACE_DEL_TAR = 0x43f
+ TCP_BBR_PACE_PER_SEC = 0x43e
+ TCP_BBR_PACE_SEG_MAX = 0x440
+ TCP_BBR_PACE_SEG_MIN = 0x441
+ TCP_BBR_PROBE_RTT_GAIN = 0x44d
+ TCP_BBR_PROBE_RTT_INT = 0x430
+ TCP_BBR_PROBE_RTT_LEN = 0x44e
+ TCP_BBR_RACK_RTT_USE = 0x44a
+ TCP_BBR_RECFORCE = 0x42c
+ TCP_BBR_REC_OVER_HPTS = 0x43a
+ TCP_BBR_RETRAN_WTSO = 0x44b
+ TCP_BBR_RWND_IS_APP = 0x42f
+ TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
+ TCP_BBR_STARTUP_LOSS_EXIT = 0x432
+ TCP_BBR_STARTUP_PG = 0x42d
+ TCP_BBR_UNLIMITED = 0x43b
+ TCP_BBR_USEDEL_RATE = 0x437
+ TCP_BBR_USE_LOWGAIN = 0x433
TCP_CA_NAME_MAX = 0x10
TCP_CCALGOOPT = 0x41
TCP_CONGESTION = 0x40
+ TCP_DATA_AFTER_CLOSE = 0x44c
+ TCP_DELACK = 0x48
TCP_FASTOPEN = 0x401
+ TCP_FASTOPEN_MAX_COOKIE_LEN = 0x10
+ TCP_FASTOPEN_MIN_COOKIE_LEN = 0x4
+ TCP_FASTOPEN_PSK_LEN = 0x10
TCP_FUNCTION_BLK = 0x2000
TCP_FUNCTION_NAME_LEN_MAX = 0x20
TCP_INFO = 0x20
@@ -1396,6 +1513,12 @@ const (
TCP_KEEPIDLE = 0x100
TCP_KEEPINIT = 0x80
TCP_KEEPINTVL = 0x200
+ TCP_LOG = 0x22
+ TCP_LOGBUF = 0x23
+ TCP_LOGDUMP = 0x25
+ TCP_LOGDUMPID = 0x26
+ TCP_LOGID = 0x24
+ TCP_LOG_ID_LEN = 0x40
TCP_MAXBURST = 0x4
TCP_MAXHLEN = 0x3c
TCP_MAXOLEN = 0x28
@@ -1411,8 +1534,30 @@ const (
TCP_NOPUSH = 0x4
TCP_PCAP_IN = 0x1000
TCP_PCAP_OUT = 0x800
+ TCP_RACK_EARLY_RECOV = 0x423
+ TCP_RACK_EARLY_SEG = 0x424
+ TCP_RACK_IDLE_REDUCE_HIGH = 0x444
+ TCP_RACK_MIN_PACE = 0x445
+ TCP_RACK_MIN_PACE_SEG = 0x446
+ TCP_RACK_MIN_TO = 0x422
+ TCP_RACK_PACE_ALWAYS = 0x41f
+ TCP_RACK_PACE_MAX_SEG = 0x41e
+ TCP_RACK_PACE_REDUCE = 0x41d
+ TCP_RACK_PKT_DELAY = 0x428
+ TCP_RACK_PROP = 0x41b
+ TCP_RACK_PROP_RATE = 0x420
+ TCP_RACK_PRR_SENDALOT = 0x421
+ TCP_RACK_REORD_FADE = 0x426
+ TCP_RACK_REORD_THRESH = 0x425
+ TCP_RACK_SESS_CWV = 0x42a
+ TCP_RACK_TLP_INC_VAR = 0x429
+ TCP_RACK_TLP_REDUCE = 0x41c
+ TCP_RACK_TLP_THRESH = 0x427
+ TCP_RACK_TLP_USE = 0x447
TCP_VENDOR = 0x80000000
TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478
TIOCCONS = 0x80047462
@@ -1476,6 +1621,8 @@ const (
TIOCTIMESTAMP = 0x40087459
TIOCUCNTL = 0x80047466
TOSTOP = 0x400000
+ UTIME_NOW = -0x1
+ UTIME_OMIT = -0x2
VDISCARD = 0xf
VDSUSP = 0xb
VEOF = 0x0
@@ -1487,6 +1634,8 @@ const (
VKILL = 0x5
VLNEXT = 0xe
VMIN = 0x10
+ VM_BCACHE_SIZE_MAX = 0x70e0000
+ VM_SWZONE_SIZE_MAX = 0x2280000
VQUIT = 0x9
VREPRINT = 0x6
VSTART = 0xc
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
index 9f38267..b265abb 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && freebsd
// +build amd64,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -339,6 +340,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
@@ -355,6 +362,22 @@ const (
CTL_KERN = 0x1
CTL_MAXNAME = 0x18
CTL_NET = 0x4
+ DIOCGATTR = 0xc148648e
+ DIOCGDELETE = 0x80106488
+ DIOCGFLUSH = 0x20006487
+ DIOCGFRONTSTUFF = 0x40086486
+ DIOCGFWHEADS = 0x40046483
+ DIOCGFWSECTORS = 0x40046482
+ DIOCGIDENT = 0x41006489
+ DIOCGMEDIASIZE = 0x40086481
+ DIOCGPHYSPATH = 0x4400648d
+ DIOCGPROVIDERNAME = 0x4400648a
+ DIOCGSECTORSIZE = 0x40046480
+ DIOCGSTRIPEOFFSET = 0x4008648c
+ DIOCGSTRIPESIZE = 0x4008648b
+ DIOCSKERNELDUMP = 0x80506490
+ DIOCSKERNELDUMP_FREEBSD11 = 0x80046485
+ DIOCZONECMD = 0xc080648f
DLT_A429 = 0xb8
DLT_A653_ICM = 0xb9
DLT_AIRONET_HEADER = 0x78
@@ -379,11 +402,14 @@ const (
DLT_CHAOS = 0x5
DLT_CHDLC = 0x68
DLT_CISCO_IOS = 0x76
+ DLT_CLASS_NETBSD_RAWAF = 0x2240000
DLT_C_HDLC = 0x68
DLT_C_HDLC_WITH_DIR = 0xcd
DLT_DBUS = 0xe7
DLT_DECT = 0xdd
+ DLT_DISPLAYPORT_AUX = 0x113
DLT_DOCSIS = 0x8f
+ DLT_DOCSIS31_XRA31 = 0x111
DLT_DVB_CI = 0xeb
DLT_ECONET = 0x73
DLT_EN10MB = 0x1
@@ -393,6 +419,7 @@ const (
DLT_ERF = 0xc5
DLT_ERF_ETH = 0xaf
DLT_ERF_POS = 0xb0
+ DLT_ETHERNET_MPACKET = 0x112
DLT_FC_2 = 0xe0
DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
DLT_FDDI = 0xa
@@ -406,7 +433,6 @@ const (
DLT_GPRS_LLC = 0xa9
DLT_GSMTAP_ABIS = 0xda
DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
DLT_IBM_SN = 0x92
DLT_IBM_SP = 0x91
DLT_IEEE802 = 0x6
@@ -429,6 +455,7 @@ const (
DLT_IPV4 = 0xe4
DLT_IPV6 = 0xe5
DLT_IP_OVER_FC = 0x7a
+ DLT_ISO_14443 = 0x108
DLT_JUNIPER_ATM1 = 0x89
DLT_JUNIPER_ATM2 = 0x87
DLT_JUNIPER_ATM_CEMIC = 0xee
@@ -461,8 +488,9 @@ const (
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c
+ DLT_LORATAP = 0x10e
DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0x104
+ DLT_MATCHING_MAX = 0x113
DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6
DLT_MOST = 0xd3
@@ -478,14 +506,16 @@ const (
DLT_NFC_LLCP = 0xf5
DLT_NFLOG = 0xef
DLT_NG40 = 0xf4
+ DLT_NORDIC_BLE = 0x110
DLT_NULL = 0x0
+ DLT_OPENFLOW = 0x10b
DLT_PCI_EXP = 0x7d
DLT_PFLOG = 0x75
DLT_PFSYNC = 0x79
DLT_PKTAP = 0x102
DLT_PPI = 0xc0
DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
+ DLT_PPP_BSDOS = 0xe
DLT_PPP_ETHER = 0x33
DLT_PPP_PPPD = 0xa6
DLT_PPP_SERIAL = 0x32
@@ -496,19 +526,25 @@ const (
DLT_PRONET = 0x4
DLT_RAIF1 = 0xc6
DLT_RAW = 0xc
+ DLT_RDS = 0x109
+ DLT_REDBACK_SMARTEDGE = 0x20
DLT_RIO = 0x7c
DLT_RTAC_SERIAL = 0xfa
DLT_SCCP = 0x8e
DLT_SCTP = 0xf8
+ DLT_SDLC = 0x10c
DLT_SITA = 0xc4
DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
+ DLT_SLIP_BSDOS = 0xd
DLT_STANAG_5066_D_PDU = 0xed
DLT_SUNATM = 0x7b
DLT_SYMANTEC_FIREWALL = 0x63
+ DLT_TI_LLN_SNIFFER = 0x10d
DLT_TZSP = 0x80
DLT_USB = 0xba
DLT_USBPCAP = 0xf9
+ DLT_USB_DARWIN = 0x10a
+ DLT_USB_FREEBSD = 0xba
DLT_USB_LINUX = 0xbd
DLT_USB_LINUX_MMAPPED = 0xdc
DLT_USER0 = 0x93
@@ -527,10 +563,14 @@ const (
DLT_USER7 = 0x9a
DLT_USER8 = 0x9b
DLT_USER9 = 0x9c
+ DLT_VSOCK = 0x10f
+ DLT_WATTSTOPPER_DLM = 0x107
DLT_WIHART = 0xdf
DLT_WIRESHARK_UPPER_PDU = 0xfc
DLT_X2E_SERIAL = 0xd5
DLT_X2E_XORAYA = 0xd6
+ DLT_ZWAVE_R1_R2 = 0x105
+ DLT_ZWAVE_R3 = 0x106
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -548,6 +588,7 @@ const (
ECHONL = 0x10
ECHOPRT = 0x20
EVFILT_AIO = -0x3
+ EVFILT_EMPTY = -0xd
EVFILT_FS = -0x9
EVFILT_LIO = -0xa
EVFILT_PROC = -0x5
@@ -555,11 +596,12 @@ const (
EVFILT_READ = -0x1
EVFILT_SENDFILE = -0xc
EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xc
+ EVFILT_SYSCOUNT = 0xd
EVFILT_TIMER = -0x7
EVFILT_USER = -0xb
EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2
+ EVNAMEMAP_NAME_SIZE = 0x40
EV_ADD = 0x1
EV_CLEAR = 0x20
EV_DELETE = 0x2
@@ -576,6 +618,7 @@ const (
EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000
EXTA = 0x4b00
+ EXTATTR_MAXNAMELEN = 0xff
EXTATTR_NAMESPACE_EMPTY = 0x0
EXTATTR_NAMESPACE_SYSTEM = 0x2
EXTATTR_NAMESPACE_USER = 0x1
@@ -617,6 +660,7 @@ const (
IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
+ IFCAP_WOL_MAGIC = 0x2000
IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2
@@ -633,6 +677,7 @@ const (
IFF_MONITOR = 0x40000
IFF_MULTICAST = 0x8000
IFF_NOARP = 0x80
+ IFF_NOGROUP = 0x800000
IFF_OACTIVE = 0x400
IFF_POINTOPOINT = 0x10
IFF_PPROMISC = 0x20000
@@ -807,6 +852,7 @@ const (
IPV6_DSTOPTS = 0x32
IPV6_FLOWID = 0x43
IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_LEN = 0x14
IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FLOWTYPE = 0x44
IPV6_FRAGTTL = 0x78
@@ -827,13 +873,13 @@ const (
IPV6_MAX_GROUP_SRC_FILTER = 0x200
IPV6_MAX_MEMBERSHIPS = 0xfff
IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
IPV6_MMTU = 0x500
IPV6_MSFILTER = 0x4a
IPV6_MULTICAST_HOPS = 0xa
IPV6_MULTICAST_IF = 0x9
IPV6_MULTICAST_LOOP = 0xb
IPV6_NEXTHOP = 0x30
+ IPV6_ORIGDSTADDR = 0x48
IPV6_PATHMTU = 0x2c
IPV6_PKTINFO = 0x2e
IPV6_PORTRANGE = 0xe
@@ -845,6 +891,7 @@ const (
IPV6_RECVFLOWID = 0x46
IPV6_RECVHOPLIMIT = 0x25
IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVORIGDSTADDR = 0x48
IPV6_RECVPATHMTU = 0x2b
IPV6_RECVPKTINFO = 0x24
IPV6_RECVRSSBUCKETID = 0x47
@@ -905,10 +952,8 @@ const (
IP_MAX_MEMBERSHIPS = 0xfff
IP_MAX_SOCK_MUTE_FILTER = 0x80
IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MAX_SOURCE_FILTER = 0x400
IP_MF = 0x2000
IP_MINTTL = 0x42
- IP_MIN_MEMBERSHIPS = 0x1f
IP_MSFILTER = 0x4a
IP_MSS = 0x240
IP_MULTICAST_IF = 0x9
@@ -918,6 +963,7 @@ const (
IP_OFFMASK = 0x1fff
IP_ONESBCAST = 0x17
IP_OPTIONS = 0x1
+ IP_ORIGDSTADDR = 0x1b
IP_PORTRANGE = 0x13
IP_PORTRANGE_DEFAULT = 0x0
IP_PORTRANGE_HIGH = 0x1
@@ -926,6 +972,7 @@ const (
IP_RECVFLOWID = 0x5d
IP_RECVIF = 0x14
IP_RECVOPTS = 0x5
+ IP_RECVORIGDSTADDR = 0x1b
IP_RECVRETOPTS = 0x6
IP_RECVRSSBUCKETID = 0x5e
IP_RECVTOS = 0x44
@@ -951,6 +998,11 @@ const (
KERN_OSRELEASE = 0x2
KERN_OSTYPE = 0x1
KERN_VERSION = 0x4
+ LOCAL_CONNWAIT = 0x4
+ LOCAL_CREDS = 0x2
+ LOCAL_CREDS_PERSISTENT = 0x3
+ LOCAL_PEERCRED = 0x1
+ LOCAL_VENDOR = 0x80000000
LOCK_EX = 0x2
LOCK_NB = 0x4
LOCK_SH = 0x1
@@ -976,6 +1028,7 @@ const (
MAP_EXCL = 0x4000
MAP_FILE = 0x0
MAP_FIXED = 0x10
+ MAP_GUARD = 0x2000
MAP_HASSEMAPHORE = 0x200
MAP_NOCORE = 0x20000
MAP_NOSYNC = 0x800
@@ -987,6 +1040,15 @@ const (
MAP_RESERVED0100 = 0x100
MAP_SHARED = 0x1
MAP_STACK = 0x400
+ MCAST_BLOCK_SOURCE = 0x54
+ MCAST_EXCLUDE = 0x2
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x50
+ MCAST_JOIN_SOURCE_GROUP = 0x52
+ MCAST_LEAVE_GROUP = 0x51
+ MCAST_LEAVE_SOURCE_GROUP = 0x53
+ MCAST_UNBLOCK_SOURCE = 0x55
+ MCAST_UNDEFINED = 0x0
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MNT_ACLS = 0x8000000
@@ -1027,10 +1089,12 @@ const (
MNT_SUSPEND = 0x4
MNT_SYNCHRONOUS = 0x2
MNT_UNION = 0x20
+ MNT_UNTRUSTED = 0x800000000
MNT_UPDATE = 0x10000
- MNT_UPDATEMASK = 0x2d8d0807e
+ MNT_UPDATEMASK = 0xad8d0807e
MNT_USER = 0x8000
- MNT_VISFLAGMASK = 0x3fef0ffff
+ MNT_VERIFIED = 0x400000000
+ MNT_VISFLAGMASK = 0xffef0ffff
MNT_WAIT = 0x1
MSG_CMSG_CLOEXEC = 0x40000
MSG_COMPAT = 0x8000
@@ -1059,6 +1123,7 @@ const (
NFDBITS = 0x40
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
+ NOTE_ABSTIME = 0x10
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
NOTE_CLOSE = 0x100
@@ -1213,7 +1278,6 @@ const (
RTV_WEIGHT = 0x100
RT_ALL_FIBS = -0x1
RT_BLACKHOLE = 0x40
- RT_CACHING_CONTEXT = 0x1
RT_DEFAULT_FIB = 0x0
RT_HAS_GW = 0x80
RT_HAS_HEADER = 0x10
@@ -1223,15 +1287,17 @@ const (
RT_LLE_CACHE = 0x100
RT_MAY_LOOP = 0x8
RT_MAY_LOOP_BIT = 0x3
- RT_NORTREF = 0x2
RT_REJECT = 0x20
RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1
SCM_BINTIME = 0x4
SCM_CREDS = 0x3
+ SCM_MONOTONIC = 0x6
+ SCM_REALTIME = 0x5
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x2
+ SCM_TIME_INFO = 0x7
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@@ -1247,6 +1313,7 @@ const (
SIOCGETSGCNT = 0xc0207210
SIOCGETVIFCNT = 0xc028720f
SIOCGHIWAT = 0x40047301
+ SIOCGHWADDR = 0xc020693e
SIOCGI2C = 0xc020693d
SIOCGIFADDR = 0xc0206921
SIOCGIFBRDADDR = 0xc0206923
@@ -1268,8 +1335,11 @@ const (
SIOCGIFPDSTADDR = 0xc0206948
SIOCGIFPHYS = 0xc0206935
SIOCGIFPSRCADDR = 0xc0206947
+ SIOCGIFRSSHASH = 0xc0186997
+ SIOCGIFRSSKEY = 0xc0946996
SIOCGIFSTATUS = 0xc331693b
SIOCGIFXMEDIA = 0xc030698b
+ SIOCGLANPCP = 0xc0206998
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309
SIOCGPRIVATE_0 = 0xc0206950
@@ -1300,6 +1370,7 @@ const (
SIOCSIFPHYS = 0x80206936
SIOCSIFRVNET = 0xc020695b
SIOCSIFVNET = 0xc020695a
+ SIOCSLANPCP = 0x80206999
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308
SIOCSTUNFIB = 0x8020695f
@@ -1311,6 +1382,7 @@ const (
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
SOL_SOCKET = 0xffff
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x2
@@ -1318,6 +1390,7 @@ const (
SO_BINTIME = 0x2000
SO_BROADCAST = 0x20
SO_DEBUG = 0x1
+ SO_DOMAIN = 0x1019
SO_DONTROUTE = 0x10
SO_ERROR = 0x1007
SO_KEEPALIVE = 0x8
@@ -1326,6 +1399,7 @@ const (
SO_LISTENINCQLEN = 0x1013
SO_LISTENQLEN = 0x1012
SO_LISTENQLIMIT = 0x1011
+ SO_MAX_PACING_RATE = 0x1018
SO_NOSIGPIPE = 0x800
SO_NO_DDP = 0x8000
SO_NO_OFFLOAD = 0x4000
@@ -1338,11 +1412,19 @@ const (
SO_RCVTIMEO = 0x1006
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
+ SO_REUSEPORT_LB = 0x10000
SO_SETFIB = 0x1014
SO_SNDBUF = 0x1001
SO_SNDLOWAT = 0x1003
SO_SNDTIMEO = 0x1005
SO_TIMESTAMP = 0x400
+ SO_TS_BINTIME = 0x1
+ SO_TS_CLOCK = 0x1017
+ SO_TS_CLOCK_MAX = 0x3
+ SO_TS_DEFAULT = 0x0
+ SO_TS_MONOTONIC = 0x3
+ SO_TS_REALTIME = 0x2
+ SO_TS_REALTIME_MICRO = 0x0
SO_TYPE = 0x1008
SO_USELOOPBACK = 0x40
SO_USER_COOKIE = 0x1015
@@ -1386,10 +1468,45 @@ const (
TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
+ TCP_BBR_ACK_COMP_ALG = 0x448
+ TCP_BBR_DRAIN_INC_EXTRA = 0x43c
+ TCP_BBR_DRAIN_PG = 0x42e
+ TCP_BBR_EXTRA_GAIN = 0x449
+ TCP_BBR_IWINTSO = 0x42b
+ TCP_BBR_LOWGAIN_FD = 0x436
+ TCP_BBR_LOWGAIN_HALF = 0x435
+ TCP_BBR_LOWGAIN_THRESH = 0x434
+ TCP_BBR_MAX_RTO = 0x439
+ TCP_BBR_MIN_RTO = 0x438
+ TCP_BBR_ONE_RETRAN = 0x431
+ TCP_BBR_PACE_CROSS = 0x442
+ TCP_BBR_PACE_DEL_TAR = 0x43f
+ TCP_BBR_PACE_PER_SEC = 0x43e
+ TCP_BBR_PACE_SEG_MAX = 0x440
+ TCP_BBR_PACE_SEG_MIN = 0x441
+ TCP_BBR_PROBE_RTT_GAIN = 0x44d
+ TCP_BBR_PROBE_RTT_INT = 0x430
+ TCP_BBR_PROBE_RTT_LEN = 0x44e
+ TCP_BBR_RACK_RTT_USE = 0x44a
+ TCP_BBR_RECFORCE = 0x42c
+ TCP_BBR_REC_OVER_HPTS = 0x43a
+ TCP_BBR_RETRAN_WTSO = 0x44b
+ TCP_BBR_RWND_IS_APP = 0x42f
+ TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
+ TCP_BBR_STARTUP_LOSS_EXIT = 0x432
+ TCP_BBR_STARTUP_PG = 0x42d
+ TCP_BBR_UNLIMITED = 0x43b
+ TCP_BBR_USEDEL_RATE = 0x437
+ TCP_BBR_USE_LOWGAIN = 0x433
TCP_CA_NAME_MAX = 0x10
TCP_CCALGOOPT = 0x41
TCP_CONGESTION = 0x40
+ TCP_DATA_AFTER_CLOSE = 0x44c
+ TCP_DELACK = 0x48
TCP_FASTOPEN = 0x401
+ TCP_FASTOPEN_MAX_COOKIE_LEN = 0x10
+ TCP_FASTOPEN_MIN_COOKIE_LEN = 0x4
+ TCP_FASTOPEN_PSK_LEN = 0x10
TCP_FUNCTION_BLK = 0x2000
TCP_FUNCTION_NAME_LEN_MAX = 0x20
TCP_INFO = 0x20
@@ -1397,6 +1514,12 @@ const (
TCP_KEEPIDLE = 0x100
TCP_KEEPINIT = 0x80
TCP_KEEPINTVL = 0x200
+ TCP_LOG = 0x22
+ TCP_LOGBUF = 0x23
+ TCP_LOGDUMP = 0x25
+ TCP_LOGDUMPID = 0x26
+ TCP_LOGID = 0x24
+ TCP_LOG_ID_LEN = 0x40
TCP_MAXBURST = 0x4
TCP_MAXHLEN = 0x3c
TCP_MAXOLEN = 0x28
@@ -1412,8 +1535,30 @@ const (
TCP_NOPUSH = 0x4
TCP_PCAP_IN = 0x1000
TCP_PCAP_OUT = 0x800
+ TCP_RACK_EARLY_RECOV = 0x423
+ TCP_RACK_EARLY_SEG = 0x424
+ TCP_RACK_IDLE_REDUCE_HIGH = 0x444
+ TCP_RACK_MIN_PACE = 0x445
+ TCP_RACK_MIN_PACE_SEG = 0x446
+ TCP_RACK_MIN_TO = 0x422
+ TCP_RACK_PACE_ALWAYS = 0x41f
+ TCP_RACK_PACE_MAX_SEG = 0x41e
+ TCP_RACK_PACE_REDUCE = 0x41d
+ TCP_RACK_PKT_DELAY = 0x428
+ TCP_RACK_PROP = 0x41b
+ TCP_RACK_PROP_RATE = 0x420
+ TCP_RACK_PRR_SENDALOT = 0x421
+ TCP_RACK_REORD_FADE = 0x426
+ TCP_RACK_REORD_THRESH = 0x425
+ TCP_RACK_SESS_CWV = 0x42a
+ TCP_RACK_TLP_INC_VAR = 0x429
+ TCP_RACK_TLP_REDUCE = 0x41c
+ TCP_RACK_TLP_THRESH = 0x427
+ TCP_RACK_TLP_USE = 0x447
TCP_VENDOR = 0x80000000
TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478
TIOCCONS = 0x80047462
@@ -1477,6 +1622,8 @@ const (
TIOCTIMESTAMP = 0x40107459
TIOCUCNTL = 0x80047466
TOSTOP = 0x400000
+ UTIME_NOW = -0x1
+ UTIME_OMIT = -0x2
VDISCARD = 0xf
VDSUSP = 0xb
VEOF = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
index 16db56a..3df99f2 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
@@ -1,6 +1,7 @@
// mkerrors.sh
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && freebsd
// +build arm,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -339,6 +340,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
@@ -355,6 +362,22 @@ const (
CTL_KERN = 0x1
CTL_MAXNAME = 0x18
CTL_NET = 0x4
+ DIOCGATTR = 0xc144648e
+ DIOCGDELETE = 0x80106488
+ DIOCGFLUSH = 0x20006487
+ DIOCGFRONTSTUFF = 0x40086486
+ DIOCGFWHEADS = 0x40046483
+ DIOCGFWSECTORS = 0x40046482
+ DIOCGIDENT = 0x41006489
+ DIOCGMEDIASIZE = 0x40086481
+ DIOCGPHYSPATH = 0x4400648d
+ DIOCGPROVIDERNAME = 0x4400648a
+ DIOCGSECTORSIZE = 0x40046480
+ DIOCGSTRIPEOFFSET = 0x4008648c
+ DIOCGSTRIPESIZE = 0x4008648b
+ DIOCSKERNELDUMP = 0x804c6490
+ DIOCSKERNELDUMP_FREEBSD11 = 0x80046485
+ DIOCZONECMD = 0xc06c648f
DLT_A429 = 0xb8
DLT_A653_ICM = 0xb9
DLT_AIRONET_HEADER = 0x78
@@ -958,6 +981,11 @@ const (
KERN_OSRELEASE = 0x2
KERN_OSTYPE = 0x1
KERN_VERSION = 0x4
+ LOCAL_CONNWAIT = 0x4
+ LOCAL_CREDS = 0x2
+ LOCAL_CREDS_PERSISTENT = 0x3
+ LOCAL_PEERCRED = 0x1
+ LOCAL_VENDOR = 0x80000000
LOCK_EX = 0x2
LOCK_NB = 0x4
LOCK_SH = 0x1
@@ -994,6 +1022,15 @@ const (
MAP_RESERVED0100 = 0x100
MAP_SHARED = 0x1
MAP_STACK = 0x400
+ MCAST_BLOCK_SOURCE = 0x54
+ MCAST_EXCLUDE = 0x2
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x50
+ MCAST_JOIN_SOURCE_GROUP = 0x52
+ MCAST_LEAVE_GROUP = 0x51
+ MCAST_LEAVE_SOURCE_GROUP = 0x53
+ MCAST_UNBLOCK_SOURCE = 0x55
+ MCAST_UNDEFINED = 0x0
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MNT_ACLS = 0x8000000
@@ -1319,6 +1356,7 @@ const (
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
SOL_SOCKET = 0xffff
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x2
diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
index 1a1de34..218d399 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && freebsd
// +build arm64,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -339,6 +340,12 @@ const (
CLOCK_UPTIME_FAST = 0x8
CLOCK_UPTIME_PRECISE = 0x7
CLOCK_VIRTUAL = 0x1
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x30000
CS5 = 0x0
@@ -355,6 +362,22 @@ const (
CTL_KERN = 0x1
CTL_MAXNAME = 0x18
CTL_NET = 0x4
+ DIOCGATTR = 0xc148648e
+ DIOCGDELETE = 0x80106488
+ DIOCGFLUSH = 0x20006487
+ DIOCGFRONTSTUFF = 0x40086486
+ DIOCGFWHEADS = 0x40046483
+ DIOCGFWSECTORS = 0x40046482
+ DIOCGIDENT = 0x41006489
+ DIOCGMEDIASIZE = 0x40086481
+ DIOCGPHYSPATH = 0x4400648d
+ DIOCGPROVIDERNAME = 0x4400648a
+ DIOCGSECTORSIZE = 0x40046480
+ DIOCGSTRIPEOFFSET = 0x4008648c
+ DIOCGSTRIPESIZE = 0x4008648b
+ DIOCSKERNELDUMP = 0x80506490
+ DIOCSKERNELDUMP_FREEBSD11 = 0x80046485
+ DIOCZONECMD = 0xc080648f
DLT_A429 = 0xb8
DLT_A653_ICM = 0xb9
DLT_AIRONET_HEADER = 0x78
@@ -379,11 +402,14 @@ const (
DLT_CHAOS = 0x5
DLT_CHDLC = 0x68
DLT_CISCO_IOS = 0x76
+ DLT_CLASS_NETBSD_RAWAF = 0x2240000
DLT_C_HDLC = 0x68
DLT_C_HDLC_WITH_DIR = 0xcd
DLT_DBUS = 0xe7
DLT_DECT = 0xdd
+ DLT_DISPLAYPORT_AUX = 0x113
DLT_DOCSIS = 0x8f
+ DLT_DOCSIS31_XRA31 = 0x111
DLT_DVB_CI = 0xeb
DLT_ECONET = 0x73
DLT_EN10MB = 0x1
@@ -393,6 +419,7 @@ const (
DLT_ERF = 0xc5
DLT_ERF_ETH = 0xaf
DLT_ERF_POS = 0xb0
+ DLT_ETHERNET_MPACKET = 0x112
DLT_FC_2 = 0xe0
DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
DLT_FDDI = 0xa
@@ -406,7 +433,6 @@ const (
DLT_GPRS_LLC = 0xa9
DLT_GSMTAP_ABIS = 0xda
DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
DLT_IBM_SN = 0x92
DLT_IBM_SP = 0x91
DLT_IEEE802 = 0x6
@@ -429,6 +455,7 @@ const (
DLT_IPV4 = 0xe4
DLT_IPV6 = 0xe5
DLT_IP_OVER_FC = 0x7a
+ DLT_ISO_14443 = 0x108
DLT_JUNIPER_ATM1 = 0x89
DLT_JUNIPER_ATM2 = 0x87
DLT_JUNIPER_ATM_CEMIC = 0xee
@@ -461,8 +488,9 @@ const (
DLT_LINUX_PPP_WITHDIRECTION = 0xa6
DLT_LINUX_SLL = 0x71
DLT_LOOP = 0x6c
+ DLT_LORATAP = 0x10e
DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0x104
+ DLT_MATCHING_MAX = 0x113
DLT_MATCHING_MIN = 0x68
DLT_MFR = 0xb6
DLT_MOST = 0xd3
@@ -478,14 +506,16 @@ const (
DLT_NFC_LLCP = 0xf5
DLT_NFLOG = 0xef
DLT_NG40 = 0xf4
+ DLT_NORDIC_BLE = 0x110
DLT_NULL = 0x0
+ DLT_OPENFLOW = 0x10b
DLT_PCI_EXP = 0x7d
DLT_PFLOG = 0x75
DLT_PFSYNC = 0x79
DLT_PKTAP = 0x102
DLT_PPI = 0xc0
DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
+ DLT_PPP_BSDOS = 0xe
DLT_PPP_ETHER = 0x33
DLT_PPP_PPPD = 0xa6
DLT_PPP_SERIAL = 0x32
@@ -496,19 +526,25 @@ const (
DLT_PRONET = 0x4
DLT_RAIF1 = 0xc6
DLT_RAW = 0xc
+ DLT_RDS = 0x109
+ DLT_REDBACK_SMARTEDGE = 0x20
DLT_RIO = 0x7c
DLT_RTAC_SERIAL = 0xfa
DLT_SCCP = 0x8e
DLT_SCTP = 0xf8
+ DLT_SDLC = 0x10c
DLT_SITA = 0xc4
DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
+ DLT_SLIP_BSDOS = 0xd
DLT_STANAG_5066_D_PDU = 0xed
DLT_SUNATM = 0x7b
DLT_SYMANTEC_FIREWALL = 0x63
+ DLT_TI_LLN_SNIFFER = 0x10d
DLT_TZSP = 0x80
DLT_USB = 0xba
DLT_USBPCAP = 0xf9
+ DLT_USB_DARWIN = 0x10a
+ DLT_USB_FREEBSD = 0xba
DLT_USB_LINUX = 0xbd
DLT_USB_LINUX_MMAPPED = 0xdc
DLT_USER0 = 0x93
@@ -527,10 +563,14 @@ const (
DLT_USER7 = 0x9a
DLT_USER8 = 0x9b
DLT_USER9 = 0x9c
+ DLT_VSOCK = 0x10f
+ DLT_WATTSTOPPER_DLM = 0x107
DLT_WIHART = 0xdf
DLT_WIRESHARK_UPPER_PDU = 0xfc
DLT_X2E_SERIAL = 0xd5
DLT_X2E_XORAYA = 0xd6
+ DLT_ZWAVE_R1_R2 = 0x105
+ DLT_ZWAVE_R3 = 0x106
DT_BLK = 0x6
DT_CHR = 0x2
DT_DIR = 0x4
@@ -548,6 +588,7 @@ const (
ECHONL = 0x10
ECHOPRT = 0x20
EVFILT_AIO = -0x3
+ EVFILT_EMPTY = -0xd
EVFILT_FS = -0x9
EVFILT_LIO = -0xa
EVFILT_PROC = -0x5
@@ -555,11 +596,12 @@ const (
EVFILT_READ = -0x1
EVFILT_SENDFILE = -0xc
EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0xc
+ EVFILT_SYSCOUNT = 0xd
EVFILT_TIMER = -0x7
EVFILT_USER = -0xb
EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2
+ EVNAMEMAP_NAME_SIZE = 0x40
EV_ADD = 0x1
EV_CLEAR = 0x20
EV_DELETE = 0x2
@@ -576,6 +618,7 @@ const (
EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000
EXTA = 0x4b00
+ EXTATTR_MAXNAMELEN = 0xff
EXTATTR_NAMESPACE_EMPTY = 0x0
EXTATTR_NAMESPACE_SYSTEM = 0x2
EXTATTR_NAMESPACE_USER = 0x1
@@ -617,6 +660,7 @@ const (
IEXTEN = 0x400
IFAN_ARRIVAL = 0x0
IFAN_DEPARTURE = 0x1
+ IFCAP_WOL_MAGIC = 0x2000
IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2
@@ -633,6 +677,7 @@ const (
IFF_MONITOR = 0x40000
IFF_MULTICAST = 0x8000
IFF_NOARP = 0x80
+ IFF_NOGROUP = 0x800000
IFF_OACTIVE = 0x400
IFF_POINTOPOINT = 0x10
IFF_PPROMISC = 0x20000
@@ -807,6 +852,7 @@ const (
IPV6_DSTOPTS = 0x32
IPV6_FLOWID = 0x43
IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_LEN = 0x14
IPV6_FLOWLABEL_MASK = 0xffff0f00
IPV6_FLOWTYPE = 0x44
IPV6_FRAGTTL = 0x78
@@ -827,13 +873,13 @@ const (
IPV6_MAX_GROUP_SRC_FILTER = 0x200
IPV6_MAX_MEMBERSHIPS = 0xfff
IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
IPV6_MMTU = 0x500
IPV6_MSFILTER = 0x4a
IPV6_MULTICAST_HOPS = 0xa
IPV6_MULTICAST_IF = 0x9
IPV6_MULTICAST_LOOP = 0xb
IPV6_NEXTHOP = 0x30
+ IPV6_ORIGDSTADDR = 0x48
IPV6_PATHMTU = 0x2c
IPV6_PKTINFO = 0x2e
IPV6_PORTRANGE = 0xe
@@ -845,6 +891,7 @@ const (
IPV6_RECVFLOWID = 0x46
IPV6_RECVHOPLIMIT = 0x25
IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVORIGDSTADDR = 0x48
IPV6_RECVPATHMTU = 0x2b
IPV6_RECVPKTINFO = 0x24
IPV6_RECVRSSBUCKETID = 0x47
@@ -905,10 +952,8 @@ const (
IP_MAX_MEMBERSHIPS = 0xfff
IP_MAX_SOCK_MUTE_FILTER = 0x80
IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MAX_SOURCE_FILTER = 0x400
IP_MF = 0x2000
IP_MINTTL = 0x42
- IP_MIN_MEMBERSHIPS = 0x1f
IP_MSFILTER = 0x4a
IP_MSS = 0x240
IP_MULTICAST_IF = 0x9
@@ -918,6 +963,7 @@ const (
IP_OFFMASK = 0x1fff
IP_ONESBCAST = 0x17
IP_OPTIONS = 0x1
+ IP_ORIGDSTADDR = 0x1b
IP_PORTRANGE = 0x13
IP_PORTRANGE_DEFAULT = 0x0
IP_PORTRANGE_HIGH = 0x1
@@ -926,6 +972,7 @@ const (
IP_RECVFLOWID = 0x5d
IP_RECVIF = 0x14
IP_RECVOPTS = 0x5
+ IP_RECVORIGDSTADDR = 0x1b
IP_RECVRETOPTS = 0x6
IP_RECVRSSBUCKETID = 0x5e
IP_RECVTOS = 0x44
@@ -951,6 +998,11 @@ const (
KERN_OSRELEASE = 0x2
KERN_OSTYPE = 0x1
KERN_VERSION = 0x4
+ LOCAL_CONNWAIT = 0x4
+ LOCAL_CREDS = 0x2
+ LOCAL_CREDS_PERSISTENT = 0x3
+ LOCAL_PEERCRED = 0x1
+ LOCAL_VENDOR = 0x80000000
LOCK_EX = 0x2
LOCK_NB = 0x4
LOCK_SH = 0x1
@@ -976,6 +1028,7 @@ const (
MAP_EXCL = 0x4000
MAP_FILE = 0x0
MAP_FIXED = 0x10
+ MAP_GUARD = 0x2000
MAP_HASSEMAPHORE = 0x200
MAP_NOCORE = 0x20000
MAP_NOSYNC = 0x800
@@ -987,6 +1040,15 @@ const (
MAP_RESERVED0100 = 0x100
MAP_SHARED = 0x1
MAP_STACK = 0x400
+ MCAST_BLOCK_SOURCE = 0x54
+ MCAST_EXCLUDE = 0x2
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x50
+ MCAST_JOIN_SOURCE_GROUP = 0x52
+ MCAST_LEAVE_GROUP = 0x51
+ MCAST_LEAVE_SOURCE_GROUP = 0x53
+ MCAST_UNBLOCK_SOURCE = 0x55
+ MCAST_UNDEFINED = 0x0
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MNT_ACLS = 0x8000000
@@ -1027,10 +1089,12 @@ const (
MNT_SUSPEND = 0x4
MNT_SYNCHRONOUS = 0x2
MNT_UNION = 0x20
+ MNT_UNTRUSTED = 0x800000000
MNT_UPDATE = 0x10000
- MNT_UPDATEMASK = 0x2d8d0807e
+ MNT_UPDATEMASK = 0xad8d0807e
MNT_USER = 0x8000
- MNT_VISFLAGMASK = 0x3fef0ffff
+ MNT_VERIFIED = 0x400000000
+ MNT_VISFLAGMASK = 0xffef0ffff
MNT_WAIT = 0x1
MSG_CMSG_CLOEXEC = 0x40000
MSG_COMPAT = 0x8000
@@ -1059,6 +1123,7 @@ const (
NFDBITS = 0x40
NOFLSH = 0x80000000
NOKERNINFO = 0x2000000
+ NOTE_ABSTIME = 0x10
NOTE_ATTRIB = 0x8
NOTE_CHILD = 0x4
NOTE_CLOSE = 0x100
@@ -1213,7 +1278,6 @@ const (
RTV_WEIGHT = 0x100
RT_ALL_FIBS = -0x1
RT_BLACKHOLE = 0x40
- RT_CACHING_CONTEXT = 0x1
RT_DEFAULT_FIB = 0x0
RT_HAS_GW = 0x80
RT_HAS_HEADER = 0x10
@@ -1223,15 +1287,17 @@ const (
RT_LLE_CACHE = 0x100
RT_MAY_LOOP = 0x8
RT_MAY_LOOP_BIT = 0x3
- RT_NORTREF = 0x2
RT_REJECT = 0x20
RUSAGE_CHILDREN = -0x1
RUSAGE_SELF = 0x0
RUSAGE_THREAD = 0x1
SCM_BINTIME = 0x4
SCM_CREDS = 0x3
+ SCM_MONOTONIC = 0x6
+ SCM_REALTIME = 0x5
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x2
+ SCM_TIME_INFO = 0x7
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@@ -1247,6 +1313,7 @@ const (
SIOCGETSGCNT = 0xc0207210
SIOCGETVIFCNT = 0xc028720f
SIOCGHIWAT = 0x40047301
+ SIOCGHWADDR = 0xc020693e
SIOCGI2C = 0xc020693d
SIOCGIFADDR = 0xc0206921
SIOCGIFBRDADDR = 0xc0206923
@@ -1268,8 +1335,11 @@ const (
SIOCGIFPDSTADDR = 0xc0206948
SIOCGIFPHYS = 0xc0206935
SIOCGIFPSRCADDR = 0xc0206947
+ SIOCGIFRSSHASH = 0xc0186997
+ SIOCGIFRSSKEY = 0xc0946996
SIOCGIFSTATUS = 0xc331693b
SIOCGIFXMEDIA = 0xc030698b
+ SIOCGLANPCP = 0xc0206998
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309
SIOCGPRIVATE_0 = 0xc0206950
@@ -1300,6 +1370,7 @@ const (
SIOCSIFPHYS = 0x80206936
SIOCSIFRVNET = 0xc020695b
SIOCSIFVNET = 0xc020695a
+ SIOCSLANPCP = 0x80206999
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308
SIOCSTUNFIB = 0x8020695f
@@ -1311,6 +1382,7 @@ const (
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
SOL_SOCKET = 0xffff
SOMAXCONN = 0x80
SO_ACCEPTCONN = 0x2
@@ -1318,6 +1390,7 @@ const (
SO_BINTIME = 0x2000
SO_BROADCAST = 0x20
SO_DEBUG = 0x1
+ SO_DOMAIN = 0x1019
SO_DONTROUTE = 0x10
SO_ERROR = 0x1007
SO_KEEPALIVE = 0x8
@@ -1326,6 +1399,7 @@ const (
SO_LISTENINCQLEN = 0x1013
SO_LISTENQLEN = 0x1012
SO_LISTENQLIMIT = 0x1011
+ SO_MAX_PACING_RATE = 0x1018
SO_NOSIGPIPE = 0x800
SO_NO_DDP = 0x8000
SO_NO_OFFLOAD = 0x4000
@@ -1338,11 +1412,19 @@ const (
SO_RCVTIMEO = 0x1006
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
+ SO_REUSEPORT_LB = 0x10000
SO_SETFIB = 0x1014
SO_SNDBUF = 0x1001
SO_SNDLOWAT = 0x1003
SO_SNDTIMEO = 0x1005
SO_TIMESTAMP = 0x400
+ SO_TS_BINTIME = 0x1
+ SO_TS_CLOCK = 0x1017
+ SO_TS_CLOCK_MAX = 0x3
+ SO_TS_DEFAULT = 0x0
+ SO_TS_MONOTONIC = 0x3
+ SO_TS_REALTIME = 0x2
+ SO_TS_REALTIME_MICRO = 0x0
SO_TYPE = 0x1008
SO_USELOOPBACK = 0x40
SO_USER_COOKIE = 0x1015
@@ -1386,10 +1468,45 @@ const (
TCOFLUSH = 0x2
TCOOFF = 0x1
TCOON = 0x2
+ TCP_BBR_ACK_COMP_ALG = 0x448
+ TCP_BBR_DRAIN_INC_EXTRA = 0x43c
+ TCP_BBR_DRAIN_PG = 0x42e
+ TCP_BBR_EXTRA_GAIN = 0x449
+ TCP_BBR_IWINTSO = 0x42b
+ TCP_BBR_LOWGAIN_FD = 0x436
+ TCP_BBR_LOWGAIN_HALF = 0x435
+ TCP_BBR_LOWGAIN_THRESH = 0x434
+ TCP_BBR_MAX_RTO = 0x439
+ TCP_BBR_MIN_RTO = 0x438
+ TCP_BBR_ONE_RETRAN = 0x431
+ TCP_BBR_PACE_CROSS = 0x442
+ TCP_BBR_PACE_DEL_TAR = 0x43f
+ TCP_BBR_PACE_PER_SEC = 0x43e
+ TCP_BBR_PACE_SEG_MAX = 0x440
+ TCP_BBR_PACE_SEG_MIN = 0x441
+ TCP_BBR_PROBE_RTT_GAIN = 0x44d
+ TCP_BBR_PROBE_RTT_INT = 0x430
+ TCP_BBR_PROBE_RTT_LEN = 0x44e
+ TCP_BBR_RACK_RTT_USE = 0x44a
+ TCP_BBR_RECFORCE = 0x42c
+ TCP_BBR_REC_OVER_HPTS = 0x43a
+ TCP_BBR_RETRAN_WTSO = 0x44b
+ TCP_BBR_RWND_IS_APP = 0x42f
+ TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d
+ TCP_BBR_STARTUP_LOSS_EXIT = 0x432
+ TCP_BBR_STARTUP_PG = 0x42d
+ TCP_BBR_UNLIMITED = 0x43b
+ TCP_BBR_USEDEL_RATE = 0x437
+ TCP_BBR_USE_LOWGAIN = 0x433
TCP_CA_NAME_MAX = 0x10
TCP_CCALGOOPT = 0x41
TCP_CONGESTION = 0x40
+ TCP_DATA_AFTER_CLOSE = 0x44c
+ TCP_DELACK = 0x48
TCP_FASTOPEN = 0x401
+ TCP_FASTOPEN_MAX_COOKIE_LEN = 0x10
+ TCP_FASTOPEN_MIN_COOKIE_LEN = 0x4
+ TCP_FASTOPEN_PSK_LEN = 0x10
TCP_FUNCTION_BLK = 0x2000
TCP_FUNCTION_NAME_LEN_MAX = 0x20
TCP_INFO = 0x20
@@ -1397,6 +1514,12 @@ const (
TCP_KEEPIDLE = 0x100
TCP_KEEPINIT = 0x80
TCP_KEEPINTVL = 0x200
+ TCP_LOG = 0x22
+ TCP_LOGBUF = 0x23
+ TCP_LOGDUMP = 0x25
+ TCP_LOGDUMPID = 0x26
+ TCP_LOGID = 0x24
+ TCP_LOG_ID_LEN = 0x40
TCP_MAXBURST = 0x4
TCP_MAXHLEN = 0x3c
TCP_MAXOLEN = 0x28
@@ -1412,8 +1535,30 @@ const (
TCP_NOPUSH = 0x4
TCP_PCAP_IN = 0x1000
TCP_PCAP_OUT = 0x800
+ TCP_RACK_EARLY_RECOV = 0x423
+ TCP_RACK_EARLY_SEG = 0x424
+ TCP_RACK_IDLE_REDUCE_HIGH = 0x444
+ TCP_RACK_MIN_PACE = 0x445
+ TCP_RACK_MIN_PACE_SEG = 0x446
+ TCP_RACK_MIN_TO = 0x422
+ TCP_RACK_PACE_ALWAYS = 0x41f
+ TCP_RACK_PACE_MAX_SEG = 0x41e
+ TCP_RACK_PACE_REDUCE = 0x41d
+ TCP_RACK_PKT_DELAY = 0x428
+ TCP_RACK_PROP = 0x41b
+ TCP_RACK_PROP_RATE = 0x420
+ TCP_RACK_PRR_SENDALOT = 0x421
+ TCP_RACK_REORD_FADE = 0x426
+ TCP_RACK_REORD_THRESH = 0x425
+ TCP_RACK_SESS_CWV = 0x42a
+ TCP_RACK_TLP_INC_VAR = 0x429
+ TCP_RACK_TLP_REDUCE = 0x41c
+ TCP_RACK_TLP_THRESH = 0x427
+ TCP_RACK_TLP_USE = 0x447
TCP_VENDOR = 0x80000000
TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
TIOCCBRK = 0x2000747a
TIOCCDTR = 0x20007478
TIOCCONS = 0x80047462
@@ -1477,6 +1622,8 @@ const (
TIOCTIMESTAMP = 0x40107459
TIOCUCNTL = 0x80047466
TOSTOP = 0x400000
+ UTIME_NOW = -0x1
+ UTIME_OMIT = -0x2
VDISCARD = 0xf
VDSUSP = 0xb
VEOF = 0x0
@@ -1488,6 +1635,7 @@ const (
VKILL = 0x5
VLNEXT = 0xe
VMIN = 0x10
+ VM_BCACHE_SIZE_MAX = 0x19000000
VQUIT = 0x9
VREPRINT = 0x6
VSTART = 0xc
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go
new file mode 100644
index 0000000..35de419
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -0,0 +1,2808 @@
+// Code generated by mkmerge.go; DO NOT EDIT.
+
+//go:build linux
+// +build linux
+
+package unix
+
+import "syscall"
+
+const (
+ AAFS_MAGIC = 0x5a3c69f0
+ ADFS_SUPER_MAGIC = 0xadf5
+ AFFS_SUPER_MAGIC = 0xadff
+ AFS_FS_MAGIC = 0x6b414653
+ AFS_SUPER_MAGIC = 0x5346414f
+ AF_ALG = 0x26
+ AF_APPLETALK = 0x5
+ AF_ASH = 0x12
+ AF_ATMPVC = 0x8
+ AF_ATMSVC = 0x14
+ AF_AX25 = 0x3
+ AF_BLUETOOTH = 0x1f
+ AF_BRIDGE = 0x7
+ AF_CAIF = 0x25
+ AF_CAN = 0x1d
+ AF_DECnet = 0xc
+ AF_ECONET = 0x13
+ AF_FILE = 0x1
+ AF_IB = 0x1b
+ AF_IEEE802154 = 0x24
+ AF_INET = 0x2
+ AF_INET6 = 0xa
+ AF_IPX = 0x4
+ AF_IRDA = 0x17
+ AF_ISDN = 0x22
+ AF_IUCV = 0x20
+ AF_KCM = 0x29
+ AF_KEY = 0xf
+ AF_LLC = 0x1a
+ AF_LOCAL = 0x1
+ AF_MAX = 0x2d
+ AF_MPLS = 0x1c
+ AF_NETBEUI = 0xd
+ AF_NETLINK = 0x10
+ AF_NETROM = 0x6
+ AF_NFC = 0x27
+ AF_PACKET = 0x11
+ AF_PHONET = 0x23
+ AF_PPPOX = 0x18
+ AF_QIPCRTR = 0x2a
+ AF_RDS = 0x15
+ AF_ROSE = 0xb
+ AF_ROUTE = 0x10
+ AF_RXRPC = 0x21
+ AF_SECURITY = 0xe
+ AF_SMC = 0x2b
+ AF_SNA = 0x16
+ AF_TIPC = 0x1e
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ AF_VSOCK = 0x28
+ AF_WANPIPE = 0x19
+ AF_X25 = 0x9
+ AF_XDP = 0x2c
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_DRBG_ENTROPY = 0x6
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
+ ANON_INODE_FS_MAGIC = 0x9041934
+ ARPHRD_6LOWPAN = 0x339
+ ARPHRD_ADAPT = 0x108
+ ARPHRD_APPLETLK = 0x8
+ ARPHRD_ARCNET = 0x7
+ ARPHRD_ASH = 0x30d
+ ARPHRD_ATM = 0x13
+ ARPHRD_AX25 = 0x3
+ ARPHRD_BIF = 0x307
+ ARPHRD_CAIF = 0x336
+ ARPHRD_CAN = 0x118
+ ARPHRD_CHAOS = 0x5
+ ARPHRD_CISCO = 0x201
+ ARPHRD_CSLIP = 0x101
+ ARPHRD_CSLIP6 = 0x103
+ ARPHRD_DDCMP = 0x205
+ ARPHRD_DLCI = 0xf
+ ARPHRD_ECONET = 0x30e
+ ARPHRD_EETHER = 0x2
+ ARPHRD_ETHER = 0x1
+ ARPHRD_EUI64 = 0x1b
+ ARPHRD_FCAL = 0x311
+ ARPHRD_FCFABRIC = 0x313
+ ARPHRD_FCPL = 0x312
+ ARPHRD_FCPP = 0x310
+ ARPHRD_FDDI = 0x306
+ ARPHRD_FRAD = 0x302
+ ARPHRD_HDLC = 0x201
+ ARPHRD_HIPPI = 0x30c
+ ARPHRD_HWX25 = 0x110
+ ARPHRD_IEEE1394 = 0x18
+ ARPHRD_IEEE802 = 0x6
+ ARPHRD_IEEE80211 = 0x321
+ ARPHRD_IEEE80211_PRISM = 0x322
+ ARPHRD_IEEE80211_RADIOTAP = 0x323
+ ARPHRD_IEEE802154 = 0x324
+ ARPHRD_IEEE802154_MONITOR = 0x325
+ ARPHRD_IEEE802_TR = 0x320
+ ARPHRD_INFINIBAND = 0x20
+ ARPHRD_IP6GRE = 0x337
+ ARPHRD_IPDDP = 0x309
+ ARPHRD_IPGRE = 0x30a
+ ARPHRD_IRDA = 0x30f
+ ARPHRD_LAPB = 0x204
+ ARPHRD_LOCALTLK = 0x305
+ ARPHRD_LOOPBACK = 0x304
+ ARPHRD_METRICOM = 0x17
+ ARPHRD_NETLINK = 0x338
+ ARPHRD_NETROM = 0x0
+ ARPHRD_NONE = 0xfffe
+ ARPHRD_PHONET = 0x334
+ ARPHRD_PHONET_PIPE = 0x335
+ ARPHRD_PIMREG = 0x30b
+ ARPHRD_PPP = 0x200
+ ARPHRD_PRONET = 0x4
+ ARPHRD_RAWHDLC = 0x206
+ ARPHRD_RAWIP = 0x207
+ ARPHRD_ROSE = 0x10e
+ ARPHRD_RSRVD = 0x104
+ ARPHRD_SIT = 0x308
+ ARPHRD_SKIP = 0x303
+ ARPHRD_SLIP = 0x100
+ ARPHRD_SLIP6 = 0x102
+ ARPHRD_TUNNEL = 0x300
+ ARPHRD_TUNNEL6 = 0x301
+ ARPHRD_VOID = 0xffff
+ ARPHRD_VSOCKMON = 0x33a
+ ARPHRD_X25 = 0x10f
+ AUTOFS_SUPER_MAGIC = 0x187
+ B0 = 0x0
+ B110 = 0x3
+ B1200 = 0x9
+ B134 = 0x4
+ B150 = 0x5
+ B1800 = 0xa
+ B19200 = 0xe
+ B200 = 0x6
+ B2400 = 0xb
+ B300 = 0x7
+ B38400 = 0xf
+ B4800 = 0xc
+ B50 = 0x1
+ B600 = 0x8
+ B75 = 0x2
+ B9600 = 0xd
+ BALLOON_KVM_MAGIC = 0x13661366
+ BDEVFS_MAGIC = 0x62646576
+ BINDERFS_SUPER_MAGIC = 0x6c6f6f70
+ BINFMTFS_MAGIC = 0x42494e4d
+ BPF_A = 0x10
+ BPF_ABS = 0x20
+ BPF_ADD = 0x0
+ BPF_ALU = 0x4
+ BPF_ALU64 = 0x7
+ BPF_AND = 0x50
+ BPF_ARSH = 0xc0
+ BPF_B = 0x10
+ BPF_BUILD_ID_SIZE = 0x14
+ BPF_CALL = 0x80
+ BPF_DIV = 0x30
+ BPF_DW = 0x18
+ BPF_END = 0xd0
+ BPF_EXIT = 0x90
+ BPF_FROM_BE = 0x8
+ BPF_FROM_LE = 0x0
+ BPF_FS_MAGIC = 0xcafe4a11
+ BPF_F_ALLOW_MULTI = 0x2
+ BPF_F_ALLOW_OVERRIDE = 0x1
+ BPF_F_ANY_ALIGNMENT = 0x2
+ BPF_F_QUERY_EFFECTIVE = 0x1
+ BPF_F_REPLACE = 0x4
+ BPF_F_SLEEPABLE = 0x10
+ BPF_F_STRICT_ALIGNMENT = 0x1
+ BPF_F_TEST_RND_HI32 = 0x4
+ BPF_F_TEST_RUN_ON_CPU = 0x1
+ BPF_F_TEST_STATE_FREQ = 0x8
+ BPF_H = 0x8
+ BPF_IMM = 0x0
+ BPF_IND = 0x40
+ BPF_JA = 0x0
+ BPF_JEQ = 0x10
+ BPF_JGE = 0x30
+ BPF_JGT = 0x20
+ BPF_JLE = 0xb0
+ BPF_JLT = 0xa0
+ BPF_JMP = 0x5
+ BPF_JMP32 = 0x6
+ BPF_JNE = 0x50
+ BPF_JSET = 0x40
+ BPF_JSGE = 0x70
+ BPF_JSGT = 0x60
+ BPF_JSLE = 0xd0
+ BPF_JSLT = 0xc0
+ BPF_K = 0x0
+ BPF_LD = 0x0
+ BPF_LDX = 0x1
+ BPF_LEN = 0x80
+ BPF_LL_OFF = -0x200000
+ BPF_LSH = 0x60
+ BPF_MAJOR_VERSION = 0x1
+ BPF_MAXINSNS = 0x1000
+ BPF_MEM = 0x60
+ BPF_MEMWORDS = 0x10
+ BPF_MINOR_VERSION = 0x1
+ BPF_MISC = 0x7
+ BPF_MOD = 0x90
+ BPF_MOV = 0xb0
+ BPF_MSH = 0xa0
+ BPF_MUL = 0x20
+ BPF_NEG = 0x80
+ BPF_NET_OFF = -0x100000
+ BPF_OBJ_NAME_LEN = 0x10
+ BPF_OR = 0x40
+ BPF_PSEUDO_BTF_ID = 0x3
+ BPF_PSEUDO_CALL = 0x1
+ BPF_PSEUDO_MAP_FD = 0x1
+ BPF_PSEUDO_MAP_VALUE = 0x2
+ BPF_RET = 0x6
+ BPF_RSH = 0x70
+ BPF_ST = 0x2
+ BPF_STX = 0x3
+ BPF_SUB = 0x10
+ BPF_TAG_SIZE = 0x8
+ BPF_TAX = 0x0
+ BPF_TO_BE = 0x8
+ BPF_TO_LE = 0x0
+ BPF_TXA = 0x80
+ BPF_W = 0x0
+ BPF_X = 0x8
+ BPF_XADD = 0xc0
+ BPF_XOR = 0xa0
+ BRKINT = 0x2
+ BS0 = 0x0
+ BTRFS_SUPER_MAGIC = 0x9123683e
+ BTRFS_TEST_MAGIC = 0x73727279
+ BUS_BLUETOOTH = 0x5
+ BUS_HIL = 0x4
+ BUS_USB = 0x3
+ BUS_VIRTUAL = 0x6
+ CAN_BCM = 0x2
+ CAN_EFF_FLAG = 0x80000000
+ CAN_EFF_ID_BITS = 0x1d
+ CAN_EFF_MASK = 0x1fffffff
+ CAN_ERR_ACK = 0x20
+ CAN_ERR_BUSERROR = 0x80
+ CAN_ERR_BUSOFF = 0x40
+ CAN_ERR_CRTL = 0x4
+ CAN_ERR_CRTL_ACTIVE = 0x40
+ CAN_ERR_CRTL_RX_OVERFLOW = 0x1
+ CAN_ERR_CRTL_RX_PASSIVE = 0x10
+ CAN_ERR_CRTL_RX_WARNING = 0x4
+ CAN_ERR_CRTL_TX_OVERFLOW = 0x2
+ CAN_ERR_CRTL_TX_PASSIVE = 0x20
+ CAN_ERR_CRTL_TX_WARNING = 0x8
+ CAN_ERR_CRTL_UNSPEC = 0x0
+ CAN_ERR_DLC = 0x8
+ CAN_ERR_FLAG = 0x20000000
+ CAN_ERR_LOSTARB = 0x2
+ CAN_ERR_LOSTARB_UNSPEC = 0x0
+ CAN_ERR_MASK = 0x1fffffff
+ CAN_ERR_PROT = 0x8
+ CAN_ERR_PROT_ACTIVE = 0x40
+ CAN_ERR_PROT_BIT = 0x1
+ CAN_ERR_PROT_BIT0 = 0x8
+ CAN_ERR_PROT_BIT1 = 0x10
+ CAN_ERR_PROT_FORM = 0x2
+ CAN_ERR_PROT_LOC_ACK = 0x19
+ CAN_ERR_PROT_LOC_ACK_DEL = 0x1b
+ CAN_ERR_PROT_LOC_CRC_DEL = 0x18
+ CAN_ERR_PROT_LOC_CRC_SEQ = 0x8
+ CAN_ERR_PROT_LOC_DATA = 0xa
+ CAN_ERR_PROT_LOC_DLC = 0xb
+ CAN_ERR_PROT_LOC_EOF = 0x1a
+ CAN_ERR_PROT_LOC_ID04_00 = 0xe
+ CAN_ERR_PROT_LOC_ID12_05 = 0xf
+ CAN_ERR_PROT_LOC_ID17_13 = 0x7
+ CAN_ERR_PROT_LOC_ID20_18 = 0x6
+ CAN_ERR_PROT_LOC_ID28_21 = 0x2
+ CAN_ERR_PROT_LOC_IDE = 0x5
+ CAN_ERR_PROT_LOC_INTERM = 0x12
+ CAN_ERR_PROT_LOC_RES0 = 0x9
+ CAN_ERR_PROT_LOC_RES1 = 0xd
+ CAN_ERR_PROT_LOC_RTR = 0xc
+ CAN_ERR_PROT_LOC_SOF = 0x3
+ CAN_ERR_PROT_LOC_SRTR = 0x4
+ CAN_ERR_PROT_LOC_UNSPEC = 0x0
+ CAN_ERR_PROT_OVERLOAD = 0x20
+ CAN_ERR_PROT_STUFF = 0x4
+ CAN_ERR_PROT_TX = 0x80
+ CAN_ERR_PROT_UNSPEC = 0x0
+ CAN_ERR_RESTARTED = 0x100
+ CAN_ERR_TRX = 0x10
+ CAN_ERR_TRX_CANH_NO_WIRE = 0x4
+ CAN_ERR_TRX_CANH_SHORT_TO_BAT = 0x5
+ CAN_ERR_TRX_CANH_SHORT_TO_GND = 0x7
+ CAN_ERR_TRX_CANH_SHORT_TO_VCC = 0x6
+ CAN_ERR_TRX_CANL_NO_WIRE = 0x40
+ CAN_ERR_TRX_CANL_SHORT_TO_BAT = 0x50
+ CAN_ERR_TRX_CANL_SHORT_TO_CANH = 0x80
+ CAN_ERR_TRX_CANL_SHORT_TO_GND = 0x70
+ CAN_ERR_TRX_CANL_SHORT_TO_VCC = 0x60
+ CAN_ERR_TRX_UNSPEC = 0x0
+ CAN_ERR_TX_TIMEOUT = 0x1
+ CAN_INV_FILTER = 0x20000000
+ CAN_ISOTP = 0x6
+ CAN_J1939 = 0x7
+ CAN_MAX_DLC = 0x8
+ CAN_MAX_DLEN = 0x8
+ CAN_MAX_RAW_DLC = 0xf
+ CAN_MCNET = 0x5
+ CAN_MTU = 0x10
+ CAN_NPROTO = 0x8
+ CAN_RAW = 0x1
+ CAN_RAW_FILTER_MAX = 0x200
+ CAN_RTR_FLAG = 0x40000000
+ CAN_SFF_ID_BITS = 0xb
+ CAN_SFF_MASK = 0x7ff
+ CAN_TP16 = 0x3
+ CAN_TP20 = 0x4
+ CAP_AUDIT_CONTROL = 0x1e
+ CAP_AUDIT_READ = 0x25
+ CAP_AUDIT_WRITE = 0x1d
+ CAP_BLOCK_SUSPEND = 0x24
+ CAP_BPF = 0x27
+ CAP_CHECKPOINT_RESTORE = 0x28
+ CAP_CHOWN = 0x0
+ CAP_DAC_OVERRIDE = 0x1
+ CAP_DAC_READ_SEARCH = 0x2
+ CAP_FOWNER = 0x3
+ CAP_FSETID = 0x4
+ CAP_IPC_LOCK = 0xe
+ CAP_IPC_OWNER = 0xf
+ CAP_KILL = 0x5
+ CAP_LAST_CAP = 0x28
+ CAP_LEASE = 0x1c
+ CAP_LINUX_IMMUTABLE = 0x9
+ CAP_MAC_ADMIN = 0x21
+ CAP_MAC_OVERRIDE = 0x20
+ CAP_MKNOD = 0x1b
+ CAP_NET_ADMIN = 0xc
+ CAP_NET_BIND_SERVICE = 0xa
+ CAP_NET_BROADCAST = 0xb
+ CAP_NET_RAW = 0xd
+ CAP_PERFMON = 0x26
+ CAP_SETFCAP = 0x1f
+ CAP_SETGID = 0x6
+ CAP_SETPCAP = 0x8
+ CAP_SETUID = 0x7
+ CAP_SYSLOG = 0x22
+ CAP_SYS_ADMIN = 0x15
+ CAP_SYS_BOOT = 0x16
+ CAP_SYS_CHROOT = 0x12
+ CAP_SYS_MODULE = 0x10
+ CAP_SYS_NICE = 0x17
+ CAP_SYS_PACCT = 0x14
+ CAP_SYS_PTRACE = 0x13
+ CAP_SYS_RAWIO = 0x11
+ CAP_SYS_RESOURCE = 0x18
+ CAP_SYS_TIME = 0x19
+ CAP_SYS_TTY_CONFIG = 0x1a
+ CAP_WAKE_ALARM = 0x23
+ CFLUSH = 0xf
+ CGROUP2_SUPER_MAGIC = 0x63677270
+ CGROUP_SUPER_MAGIC = 0x27e0eb
+ CLOCK_BOOTTIME = 0x7
+ CLOCK_BOOTTIME_ALARM = 0x9
+ CLOCK_DEFAULT = 0x0
+ CLOCK_EXT = 0x1
+ CLOCK_INT = 0x2
+ CLOCK_MONOTONIC = 0x1
+ CLOCK_MONOTONIC_COARSE = 0x6
+ CLOCK_MONOTONIC_RAW = 0x4
+ CLOCK_PROCESS_CPUTIME_ID = 0x2
+ CLOCK_REALTIME = 0x0
+ CLOCK_REALTIME_ALARM = 0x8
+ CLOCK_REALTIME_COARSE = 0x5
+ CLOCK_TAI = 0xb
+ CLOCK_THREAD_CPUTIME_ID = 0x3
+ CLOCK_TXFROMRX = 0x4
+ CLOCK_TXINT = 0x3
+ CLONE_ARGS_SIZE_VER0 = 0x40
+ CLONE_ARGS_SIZE_VER1 = 0x50
+ CLONE_ARGS_SIZE_VER2 = 0x58
+ CLONE_CHILD_CLEARTID = 0x200000
+ CLONE_CHILD_SETTID = 0x1000000
+ CLONE_CLEAR_SIGHAND = 0x100000000
+ CLONE_DETACHED = 0x400000
+ CLONE_FILES = 0x400
+ CLONE_FS = 0x200
+ CLONE_INTO_CGROUP = 0x200000000
+ CLONE_IO = 0x80000000
+ CLONE_NEWCGROUP = 0x2000000
+ CLONE_NEWIPC = 0x8000000
+ CLONE_NEWNET = 0x40000000
+ CLONE_NEWNS = 0x20000
+ CLONE_NEWPID = 0x20000000
+ CLONE_NEWTIME = 0x80
+ CLONE_NEWUSER = 0x10000000
+ CLONE_NEWUTS = 0x4000000
+ CLONE_PARENT = 0x8000
+ CLONE_PARENT_SETTID = 0x100000
+ CLONE_PIDFD = 0x1000
+ CLONE_PTRACE = 0x2000
+ CLONE_SETTLS = 0x80000
+ CLONE_SIGHAND = 0x800
+ CLONE_SYSVSEM = 0x40000
+ CLONE_THREAD = 0x10000
+ CLONE_UNTRACED = 0x800000
+ CLONE_VFORK = 0x4000
+ CLONE_VM = 0x100
+ CMSPAR = 0x40000000
+ CODA_SUPER_MAGIC = 0x73757245
+ CR0 = 0x0
+ CRAMFS_MAGIC = 0x28cd3d45
+ CRTSCTS = 0x80000000
+ CRYPTO_MAX_NAME = 0x40
+ CRYPTO_MSG_MAX = 0x15
+ CRYPTO_NR_MSGTYPES = 0x6
+ CRYPTO_REPORT_MAXSIZE = 0x160
+ CS5 = 0x0
+ CSIGNAL = 0xff
+ CSTART = 0x11
+ CSTATUS = 0x0
+ CSTOP = 0x13
+ CSUSP = 0x1a
+ DAXFS_MAGIC = 0x64646178
+ DEBUGFS_MAGIC = 0x64626720
+ DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
+ DEVLINK_FLASH_OVERWRITE_IDENTIFIERS = 0x2
+ DEVLINK_FLASH_OVERWRITE_SETTINGS = 0x1
+ DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
+ DEVLINK_GENL_NAME = "devlink"
+ DEVLINK_GENL_VERSION = 0x1
+ DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
+ DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS = 0x3
+ DEVMEM_MAGIC = 0x454d444d
+ DEVPTS_SUPER_MAGIC = 0x1cd1
+ DMA_BUF_MAGIC = 0x444d4142
+ DM_ACTIVE_PRESENT_FLAG = 0x20
+ DM_BUFFER_FULL_FLAG = 0x100
+ DM_CONTROL_NODE = "control"
+ DM_DATA_OUT_FLAG = 0x10000
+ DM_DEFERRED_REMOVE = 0x20000
+ DM_DEV_ARM_POLL = 0xc138fd10
+ DM_DEV_CREATE = 0xc138fd03
+ DM_DEV_REMOVE = 0xc138fd04
+ DM_DEV_RENAME = 0xc138fd05
+ DM_DEV_SET_GEOMETRY = 0xc138fd0f
+ DM_DEV_STATUS = 0xc138fd07
+ DM_DEV_SUSPEND = 0xc138fd06
+ DM_DEV_WAIT = 0xc138fd08
+ DM_DIR = "mapper"
+ DM_GET_TARGET_VERSION = 0xc138fd11
+ DM_INACTIVE_PRESENT_FLAG = 0x40
+ DM_INTERNAL_SUSPEND_FLAG = 0x40000
+ DM_IOCTL = 0xfd
+ DM_LIST_DEVICES = 0xc138fd02
+ DM_LIST_VERSIONS = 0xc138fd0d
+ DM_MAX_TYPE_NAME = 0x10
+ DM_NAME_LEN = 0x80
+ DM_NOFLUSH_FLAG = 0x800
+ DM_PERSISTENT_DEV_FLAG = 0x8
+ DM_QUERY_INACTIVE_TABLE_FLAG = 0x1000
+ DM_READONLY_FLAG = 0x1
+ DM_REMOVE_ALL = 0xc138fd01
+ DM_SECURE_DATA_FLAG = 0x8000
+ DM_SKIP_BDGET_FLAG = 0x200
+ DM_SKIP_LOCKFS_FLAG = 0x400
+ DM_STATUS_TABLE_FLAG = 0x10
+ DM_SUSPEND_FLAG = 0x2
+ DM_TABLE_CLEAR = 0xc138fd0a
+ DM_TABLE_DEPS = 0xc138fd0b
+ DM_TABLE_LOAD = 0xc138fd09
+ DM_TABLE_STATUS = 0xc138fd0c
+ DM_TARGET_MSG = 0xc138fd0e
+ DM_UEVENT_GENERATED_FLAG = 0x2000
+ DM_UUID_FLAG = 0x4000
+ DM_UUID_LEN = 0x81
+ DM_VERSION = 0xc138fd00
+ DM_VERSION_EXTRA = "-ioctl (2020-10-01)"
+ DM_VERSION_MAJOR = 0x4
+ DM_VERSION_MINOR = 0x2b
+ DM_VERSION_PATCHLEVEL = 0x0
+ DT_BLK = 0x6
+ DT_CHR = 0x2
+ DT_DIR = 0x4
+ DT_FIFO = 0x1
+ DT_LNK = 0xa
+ DT_REG = 0x8
+ DT_SOCK = 0xc
+ DT_UNKNOWN = 0x0
+ DT_WHT = 0xe
+ ECHO = 0x8
+ ECRYPTFS_SUPER_MAGIC = 0xf15f
+ EFD_SEMAPHORE = 0x1
+ EFIVARFS_MAGIC = 0xde5e81e4
+ EFS_SUPER_MAGIC = 0x414a53
+ ENCODING_DEFAULT = 0x0
+ ENCODING_FM_MARK = 0x3
+ ENCODING_FM_SPACE = 0x4
+ ENCODING_MANCHESTER = 0x5
+ ENCODING_NRZ = 0x1
+ ENCODING_NRZI = 0x2
+ EPOLLERR = 0x8
+ EPOLLET = 0x80000000
+ EPOLLEXCLUSIVE = 0x10000000
+ EPOLLHUP = 0x10
+ EPOLLIN = 0x1
+ EPOLLMSG = 0x400
+ EPOLLONESHOT = 0x40000000
+ EPOLLOUT = 0x4
+ EPOLLPRI = 0x2
+ EPOLLRDBAND = 0x80
+ EPOLLRDHUP = 0x2000
+ EPOLLRDNORM = 0x40
+ EPOLLWAKEUP = 0x20000000
+ EPOLLWRBAND = 0x200
+ EPOLLWRNORM = 0x100
+ EPOLL_CTL_ADD = 0x1
+ EPOLL_CTL_DEL = 0x2
+ EPOLL_CTL_MOD = 0x3
+ EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
+ ESP_V4_FLOW = 0xa
+ ESP_V6_FLOW = 0xc
+ ETHER_FLOW = 0x12
+ ETHTOOL_BUSINFO_LEN = 0x20
+ ETHTOOL_EROMVERS_LEN = 0x20
+ ETHTOOL_FEC_AUTO = 0x2
+ ETHTOOL_FEC_BASER = 0x10
+ ETHTOOL_FEC_LLRS = 0x20
+ ETHTOOL_FEC_NONE = 0x1
+ ETHTOOL_FEC_OFF = 0x4
+ ETHTOOL_FEC_RS = 0x8
+ ETHTOOL_FLAG_ALL = 0x7
+ ETHTOOL_FLAG_COMPACT_BITSETS = 0x1
+ ETHTOOL_FLAG_OMIT_REPLY = 0x2
+ ETHTOOL_FLAG_STATS = 0x4
+ ETHTOOL_FLASHDEV = 0x33
+ ETHTOOL_FLASH_MAX_FILENAME = 0x80
+ ETHTOOL_FWVERS_LEN = 0x20
+ ETHTOOL_F_COMPAT = 0x4
+ ETHTOOL_F_UNSUPPORTED = 0x1
+ ETHTOOL_F_WISH = 0x2
+ ETHTOOL_GCHANNELS = 0x3c
+ ETHTOOL_GCOALESCE = 0xe
+ ETHTOOL_GDRVINFO = 0x3
+ ETHTOOL_GEEE = 0x44
+ ETHTOOL_GEEPROM = 0xb
+ ETHTOOL_GENL_NAME = "ethtool"
+ ETHTOOL_GENL_VERSION = 0x1
+ ETHTOOL_GET_DUMP_DATA = 0x40
+ ETHTOOL_GET_DUMP_FLAG = 0x3f
+ ETHTOOL_GET_TS_INFO = 0x41
+ ETHTOOL_GFEATURES = 0x3a
+ ETHTOOL_GFECPARAM = 0x50
+ ETHTOOL_GFLAGS = 0x25
+ ETHTOOL_GGRO = 0x2b
+ ETHTOOL_GGSO = 0x23
+ ETHTOOL_GLINK = 0xa
+ ETHTOOL_GLINKSETTINGS = 0x4c
+ ETHTOOL_GMODULEEEPROM = 0x43
+ ETHTOOL_GMODULEINFO = 0x42
+ ETHTOOL_GMSGLVL = 0x7
+ ETHTOOL_GPAUSEPARAM = 0x12
+ ETHTOOL_GPERMADDR = 0x20
+ ETHTOOL_GPFLAGS = 0x27
+ ETHTOOL_GPHYSTATS = 0x4a
+ ETHTOOL_GREGS = 0x4
+ ETHTOOL_GRINGPARAM = 0x10
+ ETHTOOL_GRSSH = 0x46
+ ETHTOOL_GRXCLSRLALL = 0x30
+ ETHTOOL_GRXCLSRLCNT = 0x2e
+ ETHTOOL_GRXCLSRULE = 0x2f
+ ETHTOOL_GRXCSUM = 0x14
+ ETHTOOL_GRXFH = 0x29
+ ETHTOOL_GRXFHINDIR = 0x38
+ ETHTOOL_GRXNTUPLE = 0x36
+ ETHTOOL_GRXRINGS = 0x2d
+ ETHTOOL_GSET = 0x1
+ ETHTOOL_GSG = 0x18
+ ETHTOOL_GSSET_INFO = 0x37
+ ETHTOOL_GSTATS = 0x1d
+ ETHTOOL_GSTRINGS = 0x1b
+ ETHTOOL_GTSO = 0x1e
+ ETHTOOL_GTUNABLE = 0x48
+ ETHTOOL_GTXCSUM = 0x16
+ ETHTOOL_GUFO = 0x21
+ ETHTOOL_GWOL = 0x5
+ ETHTOOL_MCGRP_MONITOR_NAME = "monitor"
+ ETHTOOL_NWAY_RST = 0x9
+ ETHTOOL_PERQUEUE = 0x4b
+ ETHTOOL_PHYS_ID = 0x1c
+ ETHTOOL_PHY_EDPD_DFLT_TX_MSECS = 0xffff
+ ETHTOOL_PHY_EDPD_DISABLE = 0x0
+ ETHTOOL_PHY_EDPD_NO_TX = 0xfffe
+ ETHTOOL_PHY_FAST_LINK_DOWN_OFF = 0xff
+ ETHTOOL_PHY_FAST_LINK_DOWN_ON = 0x0
+ ETHTOOL_PHY_GTUNABLE = 0x4e
+ ETHTOOL_PHY_STUNABLE = 0x4f
+ ETHTOOL_RESET = 0x34
+ ETHTOOL_RXNTUPLE_ACTION_CLEAR = -0x2
+ ETHTOOL_RXNTUPLE_ACTION_DROP = -0x1
+ ETHTOOL_RX_FLOW_SPEC_RING = 0xffffffff
+ ETHTOOL_RX_FLOW_SPEC_RING_VF = 0xff00000000
+ ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF = 0x20
+ ETHTOOL_SCHANNELS = 0x3d
+ ETHTOOL_SCOALESCE = 0xf
+ ETHTOOL_SEEE = 0x45
+ ETHTOOL_SEEPROM = 0xc
+ ETHTOOL_SET_DUMP = 0x3e
+ ETHTOOL_SFEATURES = 0x3b
+ ETHTOOL_SFECPARAM = 0x51
+ ETHTOOL_SFLAGS = 0x26
+ ETHTOOL_SGRO = 0x2c
+ ETHTOOL_SGSO = 0x24
+ ETHTOOL_SLINKSETTINGS = 0x4d
+ ETHTOOL_SMSGLVL = 0x8
+ ETHTOOL_SPAUSEPARAM = 0x13
+ ETHTOOL_SPFLAGS = 0x28
+ ETHTOOL_SRINGPARAM = 0x11
+ ETHTOOL_SRSSH = 0x47
+ ETHTOOL_SRXCLSRLDEL = 0x31
+ ETHTOOL_SRXCLSRLINS = 0x32
+ ETHTOOL_SRXCSUM = 0x15
+ ETHTOOL_SRXFH = 0x2a
+ ETHTOOL_SRXFHINDIR = 0x39
+ ETHTOOL_SRXNTUPLE = 0x35
+ ETHTOOL_SSET = 0x2
+ ETHTOOL_SSG = 0x19
+ ETHTOOL_STSO = 0x1f
+ ETHTOOL_STUNABLE = 0x49
+ ETHTOOL_STXCSUM = 0x17
+ ETHTOOL_SUFO = 0x22
+ ETHTOOL_SWOL = 0x6
+ ETHTOOL_TEST = 0x1a
+ ETH_P_1588 = 0x88f7
+ ETH_P_8021AD = 0x88a8
+ ETH_P_8021AH = 0x88e7
+ ETH_P_8021Q = 0x8100
+ ETH_P_80221 = 0x8917
+ ETH_P_802_2 = 0x4
+ ETH_P_802_3 = 0x1
+ ETH_P_802_3_MIN = 0x600
+ ETH_P_802_EX1 = 0x88b5
+ ETH_P_AARP = 0x80f3
+ ETH_P_AF_IUCV = 0xfbfb
+ ETH_P_ALL = 0x3
+ ETH_P_AOE = 0x88a2
+ ETH_P_ARCNET = 0x1a
+ ETH_P_ARP = 0x806
+ ETH_P_ATALK = 0x809b
+ ETH_P_ATMFATE = 0x8884
+ ETH_P_ATMMPOA = 0x884c
+ ETH_P_AX25 = 0x2
+ ETH_P_BATMAN = 0x4305
+ ETH_P_BPQ = 0x8ff
+ ETH_P_CAIF = 0xf7
+ ETH_P_CAN = 0xc
+ ETH_P_CANFD = 0xd
+ ETH_P_CFM = 0x8902
+ ETH_P_CONTROL = 0x16
+ ETH_P_CUST = 0x6006
+ ETH_P_DDCMP = 0x6
+ ETH_P_DEC = 0x6000
+ ETH_P_DIAG = 0x6005
+ ETH_P_DNA_DL = 0x6001
+ ETH_P_DNA_RC = 0x6002
+ ETH_P_DNA_RT = 0x6003
+ ETH_P_DSA = 0x1b
+ ETH_P_DSA_8021Q = 0xdadb
+ ETH_P_ECONET = 0x18
+ ETH_P_EDSA = 0xdada
+ ETH_P_ERSPAN = 0x88be
+ ETH_P_ERSPAN2 = 0x22eb
+ ETH_P_FCOE = 0x8906
+ ETH_P_FIP = 0x8914
+ ETH_P_HDLC = 0x19
+ ETH_P_HSR = 0x892f
+ ETH_P_IBOE = 0x8915
+ ETH_P_IEEE802154 = 0xf6
+ ETH_P_IEEEPUP = 0xa00
+ ETH_P_IEEEPUPAT = 0xa01
+ ETH_P_IFE = 0xed3e
+ ETH_P_IP = 0x800
+ ETH_P_IPV6 = 0x86dd
+ ETH_P_IPX = 0x8137
+ ETH_P_IRDA = 0x17
+ ETH_P_LAT = 0x6004
+ ETH_P_LINK_CTL = 0x886c
+ ETH_P_LLDP = 0x88cc
+ ETH_P_LOCALTALK = 0x9
+ ETH_P_LOOP = 0x60
+ ETH_P_LOOPBACK = 0x9000
+ ETH_P_MACSEC = 0x88e5
+ ETH_P_MAP = 0xf9
+ ETH_P_MOBITEX = 0x15
+ ETH_P_MPLS_MC = 0x8848
+ ETH_P_MPLS_UC = 0x8847
+ ETH_P_MRP = 0x88e3
+ ETH_P_MVRP = 0x88f5
+ ETH_P_NCSI = 0x88f8
+ ETH_P_NSH = 0x894f
+ ETH_P_PAE = 0x888e
+ ETH_P_PAUSE = 0x8808
+ ETH_P_PHONET = 0xf5
+ ETH_P_PPPTALK = 0x10
+ ETH_P_PPP_DISC = 0x8863
+ ETH_P_PPP_MP = 0x8
+ ETH_P_PPP_SES = 0x8864
+ ETH_P_PREAUTH = 0x88c7
+ ETH_P_PRP = 0x88fb
+ ETH_P_PUP = 0x200
+ ETH_P_PUPAT = 0x201
+ ETH_P_QINQ1 = 0x9100
+ ETH_P_QINQ2 = 0x9200
+ ETH_P_QINQ3 = 0x9300
+ ETH_P_RARP = 0x8035
+ ETH_P_SCA = 0x6007
+ ETH_P_SLOW = 0x8809
+ ETH_P_SNAP = 0x5
+ ETH_P_TDLS = 0x890d
+ ETH_P_TEB = 0x6558
+ ETH_P_TIPC = 0x88ca
+ ETH_P_TRAILER = 0x1c
+ ETH_P_TR_802_2 = 0x11
+ ETH_P_TSN = 0x22f0
+ ETH_P_WAN_PPP = 0x7
+ ETH_P_WCCP = 0x883e
+ ETH_P_X25 = 0x805
+ ETH_P_XDSA = 0xf8
+ EXABYTE_ENABLE_NEST = 0xf0
+ EXT2_SUPER_MAGIC = 0xef53
+ EXT3_SUPER_MAGIC = 0xef53
+ EXT4_SUPER_MAGIC = 0xef53
+ EXTA = 0xe
+ EXTB = 0xf
+ F2FS_SUPER_MAGIC = 0xf2f52010
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_UNSHARE_RANGE = 0x40
+ FALLOC_FL_ZERO_RANGE = 0x10
+ FANOTIFY_METADATA_VERSION = 0x3
+ FAN_ACCESS = 0x1
+ FAN_ACCESS_PERM = 0x20000
+ FAN_ALLOW = 0x1
+ FAN_ALL_CLASS_BITS = 0xc
+ FAN_ALL_EVENTS = 0x3b
+ FAN_ALL_INIT_FLAGS = 0x3f
+ FAN_ALL_MARK_FLAGS = 0xff
+ FAN_ALL_OUTGOING_EVENTS = 0x3403b
+ FAN_ALL_PERM_EVENTS = 0x30000
+ FAN_ATTRIB = 0x4
+ FAN_AUDIT = 0x10
+ FAN_CLASS_CONTENT = 0x4
+ FAN_CLASS_NOTIF = 0x0
+ FAN_CLASS_PRE_CONTENT = 0x8
+ FAN_CLOEXEC = 0x1
+ FAN_CLOSE = 0x18
+ FAN_CLOSE_NOWRITE = 0x10
+ FAN_CLOSE_WRITE = 0x8
+ FAN_CREATE = 0x100
+ FAN_DELETE = 0x200
+ FAN_DELETE_SELF = 0x400
+ FAN_DENY = 0x2
+ FAN_ENABLE_AUDIT = 0x40
+ FAN_EVENT_INFO_TYPE_DFID = 0x3
+ FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
+ FAN_EVENT_INFO_TYPE_FID = 0x1
+ FAN_EVENT_METADATA_LEN = 0x18
+ FAN_EVENT_ON_CHILD = 0x8000000
+ FAN_MARK_ADD = 0x1
+ FAN_MARK_DONT_FOLLOW = 0x4
+ FAN_MARK_FILESYSTEM = 0x100
+ FAN_MARK_FLUSH = 0x80
+ FAN_MARK_IGNORED_MASK = 0x20
+ FAN_MARK_IGNORED_SURV_MODIFY = 0x40
+ FAN_MARK_INODE = 0x0
+ FAN_MARK_MOUNT = 0x10
+ FAN_MARK_ONLYDIR = 0x8
+ FAN_MARK_REMOVE = 0x2
+ FAN_MODIFY = 0x2
+ FAN_MOVE = 0xc0
+ FAN_MOVED_FROM = 0x40
+ FAN_MOVED_TO = 0x80
+ FAN_MOVE_SELF = 0x800
+ FAN_NOFD = -0x1
+ FAN_NONBLOCK = 0x2
+ FAN_ONDIR = 0x40000000
+ FAN_OPEN = 0x20
+ FAN_OPEN_EXEC = 0x1000
+ FAN_OPEN_EXEC_PERM = 0x40000
+ FAN_OPEN_PERM = 0x10000
+ FAN_Q_OVERFLOW = 0x4000
+ FAN_REPORT_DFID_NAME = 0xc00
+ FAN_REPORT_DIR_FID = 0x400
+ FAN_REPORT_FID = 0x200
+ FAN_REPORT_NAME = 0x800
+ FAN_REPORT_TID = 0x100
+ FAN_UNLIMITED_MARKS = 0x20
+ FAN_UNLIMITED_QUEUE = 0x10
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0x400
+ FF0 = 0x0
+ FIDEDUPERANGE = 0xc0189436
+ FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
+ FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
+ FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
+ FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
+ FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
+ FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
+ FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
+ FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
+ FSCRYPT_KEY_STATUS_ABSENT = 0x1
+ FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
+ FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
+ FSCRYPT_KEY_STATUS_PRESENT = 0x2
+ FSCRYPT_MAX_KEY_SIZE = 0x40
+ FSCRYPT_MODE_ADIANTUM = 0x9
+ FSCRYPT_MODE_AES_128_CBC = 0x5
+ FSCRYPT_MODE_AES_128_CTS = 0x6
+ FSCRYPT_MODE_AES_256_CTS = 0x4
+ FSCRYPT_MODE_AES_256_XTS = 0x1
+ FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
+ FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
+ FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
+ FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
+ FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
+ FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
+ FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32 = 0x10
+ FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
+ FSCRYPT_POLICY_V1 = 0x0
+ FSCRYPT_POLICY_V2 = 0x2
+ FS_ENCRYPTION_MODE_ADIANTUM = 0x9
+ FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
+ FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
+ FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
+ FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
+ FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
+ FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
+ FS_ENCRYPTION_MODE_INVALID = 0x0
+ FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
+ FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
+ FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
+ FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
+ FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
+ FS_IOC_MEASURE_VERITY = 0xc0046686
+ FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
+ FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
+ FS_KEY_DESCRIPTOR_SIZE = 0x8
+ FS_KEY_DESC_PREFIX = "fscrypt:"
+ FS_KEY_DESC_PREFIX_SIZE = 0x8
+ FS_MAX_KEY_SIZE = 0x40
+ FS_POLICY_FLAGS_PAD_16 = 0x2
+ FS_POLICY_FLAGS_PAD_32 = 0x3
+ FS_POLICY_FLAGS_PAD_4 = 0x0
+ FS_POLICY_FLAGS_PAD_8 = 0x1
+ FS_POLICY_FLAGS_PAD_MASK = 0x3
+ FS_POLICY_FLAGS_VALID = 0x7
+ FS_VERITY_FL = 0x100000
+ FS_VERITY_HASH_ALG_SHA256 = 0x1
+ FS_VERITY_HASH_ALG_SHA512 = 0x2
+ FUTEXFS_SUPER_MAGIC = 0xbad1dea
+ F_ADD_SEALS = 0x409
+ F_DUPFD = 0x0
+ F_DUPFD_CLOEXEC = 0x406
+ F_EXLCK = 0x4
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLEASE = 0x401
+ F_GETOWN_EX = 0x10
+ F_GETPIPE_SZ = 0x408
+ F_GETSIG = 0xb
+ F_GET_FILE_RW_HINT = 0x40d
+ F_GET_RW_HINT = 0x40b
+ F_GET_SEALS = 0x40a
+ F_LOCK = 0x1
+ F_NOTIFY = 0x402
+ F_OFD_GETLK = 0x24
+ F_OFD_SETLK = 0x25
+ F_OFD_SETLKW = 0x26
+ F_OK = 0x0
+ F_SEAL_FUTURE_WRITE = 0x10
+ F_SEAL_GROW = 0x4
+ F_SEAL_SEAL = 0x1
+ F_SEAL_SHRINK = 0x2
+ F_SEAL_WRITE = 0x8
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLEASE = 0x400
+ F_SETOWN_EX = 0xf
+ F_SETPIPE_SZ = 0x407
+ F_SETSIG = 0xa
+ F_SET_FILE_RW_HINT = 0x40e
+ F_SET_RW_HINT = 0x40c
+ F_SHLCK = 0x8
+ F_TEST = 0x3
+ F_TLOCK = 0x2
+ F_ULOCK = 0x0
+ GENL_ADMIN_PERM = 0x1
+ GENL_CMD_CAP_DO = 0x2
+ GENL_CMD_CAP_DUMP = 0x4
+ GENL_CMD_CAP_HASPOL = 0x8
+ GENL_HDRLEN = 0x4
+ GENL_ID_CTRL = 0x10
+ GENL_ID_PMCRAID = 0x12
+ GENL_ID_VFS_DQUOT = 0x11
+ GENL_MAX_ID = 0x3ff
+ GENL_MIN_ID = 0x10
+ GENL_NAMSIZ = 0x10
+ GENL_START_ALLOC = 0x13
+ GENL_UNS_ADMIN_PERM = 0x10
+ GRND_INSECURE = 0x4
+ GRND_NONBLOCK = 0x1
+ GRND_RANDOM = 0x2
+ HDIO_DRIVE_CMD = 0x31f
+ HDIO_DRIVE_CMD_AEB = 0x31e
+ HDIO_DRIVE_CMD_HDR_SIZE = 0x4
+ HDIO_DRIVE_HOB_HDR_SIZE = 0x8
+ HDIO_DRIVE_RESET = 0x31c
+ HDIO_DRIVE_TASK = 0x31e
+ HDIO_DRIVE_TASKFILE = 0x31d
+ HDIO_DRIVE_TASK_HDR_SIZE = 0x8
+ HDIO_GETGEO = 0x301
+ HDIO_GET_32BIT = 0x309
+ HDIO_GET_ACOUSTIC = 0x30f
+ HDIO_GET_ADDRESS = 0x310
+ HDIO_GET_BUSSTATE = 0x31a
+ HDIO_GET_DMA = 0x30b
+ HDIO_GET_IDENTITY = 0x30d
+ HDIO_GET_KEEPSETTINGS = 0x308
+ HDIO_GET_MULTCOUNT = 0x304
+ HDIO_GET_NICE = 0x30c
+ HDIO_GET_NOWERR = 0x30a
+ HDIO_GET_QDMA = 0x305
+ HDIO_GET_UNMASKINTR = 0x302
+ HDIO_GET_WCACHE = 0x30e
+ HDIO_OBSOLETE_IDENTITY = 0x307
+ HDIO_SCAN_HWIF = 0x328
+ HDIO_SET_32BIT = 0x324
+ HDIO_SET_ACOUSTIC = 0x32c
+ HDIO_SET_ADDRESS = 0x32f
+ HDIO_SET_BUSSTATE = 0x32d
+ HDIO_SET_DMA = 0x326
+ HDIO_SET_KEEPSETTINGS = 0x323
+ HDIO_SET_MULTCOUNT = 0x321
+ HDIO_SET_NICE = 0x329
+ HDIO_SET_NOWERR = 0x325
+ HDIO_SET_PIO_MODE = 0x327
+ HDIO_SET_QDMA = 0x32e
+ HDIO_SET_UNMASKINTR = 0x322
+ HDIO_SET_WCACHE = 0x32b
+ HDIO_SET_XFER = 0x306
+ HDIO_TRISTATE_HWIF = 0x31b
+ HDIO_UNREGISTER_HWIF = 0x32a
+ HID_MAX_DESCRIPTOR_SIZE = 0x1000
+ HOSTFS_SUPER_MAGIC = 0xc0ffee
+ HPFS_SUPER_MAGIC = 0xf995e849
+ HUGETLBFS_MAGIC = 0x958458f6
+ IBSHIFT = 0x10
+ ICMPV6_FILTER = 0x1
+ ICMPV6_FILTER_BLOCK = 0x1
+ ICMPV6_FILTER_BLOCKOTHERS = 0x3
+ ICMPV6_FILTER_PASS = 0x2
+ ICMPV6_FILTER_PASSONLY = 0x4
+ ICMP_FILTER = 0x1
+ ICRNL = 0x100
+ IFA_F_DADFAILED = 0x8
+ IFA_F_DEPRECATED = 0x20
+ IFA_F_HOMEADDRESS = 0x10
+ IFA_F_MANAGETEMPADDR = 0x100
+ IFA_F_MCAUTOJOIN = 0x400
+ IFA_F_NODAD = 0x2
+ IFA_F_NOPREFIXROUTE = 0x200
+ IFA_F_OPTIMISTIC = 0x4
+ IFA_F_PERMANENT = 0x80
+ IFA_F_SECONDARY = 0x1
+ IFA_F_STABLE_PRIVACY = 0x800
+ IFA_F_TEMPORARY = 0x1
+ IFA_F_TENTATIVE = 0x40
+ IFA_MAX = 0xa
+ IFF_ALLMULTI = 0x200
+ IFF_ATTACH_QUEUE = 0x200
+ IFF_AUTOMEDIA = 0x4000
+ IFF_BROADCAST = 0x2
+ IFF_DEBUG = 0x4
+ IFF_DETACH_QUEUE = 0x400
+ IFF_DORMANT = 0x20000
+ IFF_DYNAMIC = 0x8000
+ IFF_ECHO = 0x40000
+ IFF_LOOPBACK = 0x8
+ IFF_LOWER_UP = 0x10000
+ IFF_MASTER = 0x400
+ IFF_MULTICAST = 0x1000
+ IFF_MULTI_QUEUE = 0x100
+ IFF_NAPI = 0x10
+ IFF_NAPI_FRAGS = 0x20
+ IFF_NOARP = 0x80
+ IFF_NOFILTER = 0x1000
+ IFF_NOTRAILERS = 0x20
+ IFF_NO_PI = 0x1000
+ IFF_ONE_QUEUE = 0x2000
+ IFF_PERSIST = 0x800
+ IFF_POINTOPOINT = 0x10
+ IFF_PORTSEL = 0x2000
+ IFF_PROMISC = 0x100
+ IFF_RUNNING = 0x40
+ IFF_SLAVE = 0x800
+ IFF_TAP = 0x2
+ IFF_TUN = 0x1
+ IFF_TUN_EXCL = 0x8000
+ IFF_UP = 0x1
+ IFF_VNET_HDR = 0x4000
+ IFF_VOLATILE = 0x70c5a
+ IFNAMSIZ = 0x10
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x2000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_ACCESS = 0x1
+ IN_ALL_EVENTS = 0xfff
+ IN_ATTRIB = 0x4
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLOSE = 0x18
+ IN_CLOSE_NOWRITE = 0x10
+ IN_CLOSE_WRITE = 0x8
+ IN_CREATE = 0x100
+ IN_DELETE = 0x200
+ IN_DELETE_SELF = 0x400
+ IN_DONT_FOLLOW = 0x2000000
+ IN_EXCL_UNLINK = 0x4000000
+ IN_IGNORED = 0x8000
+ IN_ISDIR = 0x40000000
+ IN_LOOPBACKNET = 0x7f
+ IN_MASK_ADD = 0x20000000
+ IN_MASK_CREATE = 0x10000000
+ IN_MODIFY = 0x2
+ IN_MOVE = 0xc0
+ IN_MOVED_FROM = 0x40
+ IN_MOVED_TO = 0x80
+ IN_MOVE_SELF = 0x800
+ IN_ONESHOT = 0x80000000
+ IN_ONLYDIR = 0x1000000
+ IN_OPEN = 0x20
+ IN_Q_OVERFLOW = 0x4000
+ IN_UNMOUNT = 0x2000
+ IPPROTO_AH = 0x33
+ IPPROTO_BEETPH = 0x5e
+ IPPROTO_COMP = 0x6c
+ IPPROTO_DCCP = 0x21
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_ENCAP = 0x62
+ IPPROTO_ESP = 0x32
+ IPPROTO_ETHERNET = 0x8f
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IP = 0x0
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_L2TP = 0x73
+ IPPROTO_MH = 0x87
+ IPPROTO_MPLS = 0x89
+ IPPROTO_MPTCP = 0x106
+ IPPROTO_MTP = 0x5c
+ IPPROTO_NONE = 0x3b
+ IPPROTO_PIM = 0x67
+ IPPROTO_PUP = 0xc
+ IPPROTO_RAW = 0xff
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_SCTP = 0x84
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_UDP = 0x11
+ IPPROTO_UDPLITE = 0x88
+ IPV6_2292DSTOPTS = 0x4
+ IPV6_2292HOPLIMIT = 0x8
+ IPV6_2292HOPOPTS = 0x3
+ IPV6_2292PKTINFO = 0x2
+ IPV6_2292PKTOPTIONS = 0x6
+ IPV6_2292RTHDR = 0x5
+ IPV6_ADDRFORM = 0x1
+ IPV6_ADDR_PREFERENCES = 0x48
+ IPV6_ADD_MEMBERSHIP = 0x14
+ IPV6_AUTHHDR = 0xa
+ IPV6_AUTOFLOWLABEL = 0x46
+ IPV6_CHECKSUM = 0x7
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DROP_MEMBERSHIP = 0x15
+ IPV6_DSTOPTS = 0x3b
+ IPV6_FLOW = 0x11
+ IPV6_FREEBIND = 0x4e
+ IPV6_HDRINCL = 0x24
+ IPV6_HOPLIMIT = 0x34
+ IPV6_HOPOPTS = 0x36
+ IPV6_IPSEC_POLICY = 0x22
+ IPV6_JOIN_ANYCAST = 0x1b
+ IPV6_JOIN_GROUP = 0x14
+ IPV6_LEAVE_ANYCAST = 0x1c
+ IPV6_LEAVE_GROUP = 0x15
+ IPV6_MINHOPCOUNT = 0x49
+ IPV6_MTU = 0x18
+ IPV6_MTU_DISCOVER = 0x17
+ IPV6_MULTICAST_ALL = 0x1d
+ IPV6_MULTICAST_HOPS = 0x12
+ IPV6_MULTICAST_IF = 0x11
+ IPV6_MULTICAST_LOOP = 0x13
+ IPV6_NEXTHOP = 0x9
+ IPV6_ORIGDSTADDR = 0x4a
+ IPV6_PATHMTU = 0x3d
+ IPV6_PKTINFO = 0x32
+ IPV6_PMTUDISC_DO = 0x2
+ IPV6_PMTUDISC_DONT = 0x0
+ IPV6_PMTUDISC_INTERFACE = 0x4
+ IPV6_PMTUDISC_OMIT = 0x5
+ IPV6_PMTUDISC_PROBE = 0x3
+ IPV6_PMTUDISC_WANT = 0x1
+ IPV6_RECVDSTOPTS = 0x3a
+ IPV6_RECVERR = 0x19
+ IPV6_RECVERR_RFC4884 = 0x1f
+ IPV6_RECVFRAGSIZE = 0x4d
+ IPV6_RECVHOPLIMIT = 0x33
+ IPV6_RECVHOPOPTS = 0x35
+ IPV6_RECVORIGDSTADDR = 0x4a
+ IPV6_RECVPATHMTU = 0x3c
+ IPV6_RECVPKTINFO = 0x31
+ IPV6_RECVRTHDR = 0x38
+ IPV6_RECVTCLASS = 0x42
+ IPV6_ROUTER_ALERT = 0x16
+ IPV6_ROUTER_ALERT_ISOLATE = 0x1e
+ IPV6_RTHDR = 0x39
+ IPV6_RTHDRDSTOPTS = 0x37
+ IPV6_RTHDR_LOOSE = 0x0
+ IPV6_RTHDR_STRICT = 0x1
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_RXDSTOPTS = 0x3b
+ IPV6_RXHOPOPTS = 0x36
+ IPV6_TCLASS = 0x43
+ IPV6_TRANSPARENT = 0x4b
+ IPV6_UNICAST_HOPS = 0x10
+ IPV6_UNICAST_IF = 0x4c
+ IPV6_USER_FLOW = 0xe
+ IPV6_V6ONLY = 0x1a
+ IPV6_XFRM_POLICY = 0x23
+ IP_ADD_MEMBERSHIP = 0x23
+ IP_ADD_SOURCE_MEMBERSHIP = 0x27
+ IP_BIND_ADDRESS_NO_PORT = 0x18
+ IP_BLOCK_SOURCE = 0x26
+ IP_CHECKSUM = 0x17
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DROP_MEMBERSHIP = 0x24
+ IP_DROP_SOURCE_MEMBERSHIP = 0x28
+ IP_FREEBIND = 0xf
+ IP_HDRINCL = 0x3
+ IP_IPSEC_POLICY = 0x10
+ IP_MAXPACKET = 0xffff
+ IP_MAX_MEMBERSHIPS = 0x14
+ IP_MF = 0x2000
+ IP_MINTTL = 0x15
+ IP_MSFILTER = 0x29
+ IP_MSS = 0x240
+ IP_MTU = 0xe
+ IP_MTU_DISCOVER = 0xa
+ IP_MULTICAST_ALL = 0x31
+ IP_MULTICAST_IF = 0x20
+ IP_MULTICAST_LOOP = 0x22
+ IP_MULTICAST_TTL = 0x21
+ IP_NODEFRAG = 0x16
+ IP_OFFMASK = 0x1fff
+ IP_OPTIONS = 0x4
+ IP_ORIGDSTADDR = 0x14
+ IP_PASSSEC = 0x12
+ IP_PKTINFO = 0x8
+ IP_PKTOPTIONS = 0x9
+ IP_PMTUDISC = 0xa
+ IP_PMTUDISC_DO = 0x2
+ IP_PMTUDISC_DONT = 0x0
+ IP_PMTUDISC_INTERFACE = 0x4
+ IP_PMTUDISC_OMIT = 0x5
+ IP_PMTUDISC_PROBE = 0x3
+ IP_PMTUDISC_WANT = 0x1
+ IP_RECVERR = 0xb
+ IP_RECVERR_RFC4884 = 0x1a
+ IP_RECVFRAGSIZE = 0x19
+ IP_RECVOPTS = 0x6
+ IP_RECVORIGDSTADDR = 0x14
+ IP_RECVRETOPTS = 0x7
+ IP_RECVTOS = 0xd
+ IP_RECVTTL = 0xc
+ IP_RETOPTS = 0x7
+ IP_RF = 0x8000
+ IP_ROUTER_ALERT = 0x5
+ IP_TOS = 0x1
+ IP_TRANSPARENT = 0x13
+ IP_TTL = 0x2
+ IP_UNBLOCK_SOURCE = 0x25
+ IP_UNICAST_IF = 0x32
+ IP_USER_FLOW = 0xd
+ IP_XFRM_POLICY = 0x11
+ ISOFS_SUPER_MAGIC = 0x9660
+ ISTRIP = 0x20
+ IUTF8 = 0x4000
+ IXANY = 0x800
+ JFFS2_SUPER_MAGIC = 0x72b6
+ KEXEC_ARCH_386 = 0x30000
+ KEXEC_ARCH_68K = 0x40000
+ KEXEC_ARCH_AARCH64 = 0xb70000
+ KEXEC_ARCH_ARM = 0x280000
+ KEXEC_ARCH_DEFAULT = 0x0
+ KEXEC_ARCH_IA_64 = 0x320000
+ KEXEC_ARCH_MASK = 0xffff0000
+ KEXEC_ARCH_MIPS = 0x80000
+ KEXEC_ARCH_MIPS_LE = 0xa0000
+ KEXEC_ARCH_PARISC = 0xf0000
+ KEXEC_ARCH_PPC = 0x140000
+ KEXEC_ARCH_PPC64 = 0x150000
+ KEXEC_ARCH_S390 = 0x160000
+ KEXEC_ARCH_SH = 0x2a0000
+ KEXEC_ARCH_X86_64 = 0x3e0000
+ KEXEC_FILE_NO_INITRAMFS = 0x4
+ KEXEC_FILE_ON_CRASH = 0x2
+ KEXEC_FILE_UNLOAD = 0x1
+ KEXEC_ON_CRASH = 0x1
+ KEXEC_PRESERVE_CONTEXT = 0x2
+ KEXEC_SEGMENT_MAX = 0x10
+ KEYCTL_ASSUME_AUTHORITY = 0x10
+ KEYCTL_CAPABILITIES = 0x1f
+ KEYCTL_CAPS0_BIG_KEY = 0x10
+ KEYCTL_CAPS0_CAPABILITIES = 0x1
+ KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
+ KEYCTL_CAPS0_INVALIDATE = 0x20
+ KEYCTL_CAPS0_MOVE = 0x80
+ KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
+ KEYCTL_CAPS0_PUBLIC_KEY = 0x8
+ KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
+ KEYCTL_CAPS1_NOTIFICATIONS = 0x4
+ KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
+ KEYCTL_CAPS1_NS_KEY_TAG = 0x2
+ KEYCTL_CHOWN = 0x4
+ KEYCTL_CLEAR = 0x7
+ KEYCTL_DESCRIBE = 0x6
+ KEYCTL_DH_COMPUTE = 0x17
+ KEYCTL_GET_KEYRING_ID = 0x0
+ KEYCTL_GET_PERSISTENT = 0x16
+ KEYCTL_GET_SECURITY = 0x11
+ KEYCTL_INSTANTIATE = 0xc
+ KEYCTL_INSTANTIATE_IOV = 0x14
+ KEYCTL_INVALIDATE = 0x15
+ KEYCTL_JOIN_SESSION_KEYRING = 0x1
+ KEYCTL_LINK = 0x8
+ KEYCTL_MOVE = 0x1e
+ KEYCTL_MOVE_EXCL = 0x1
+ KEYCTL_NEGATE = 0xd
+ KEYCTL_PKEY_DECRYPT = 0x1a
+ KEYCTL_PKEY_ENCRYPT = 0x19
+ KEYCTL_PKEY_QUERY = 0x18
+ KEYCTL_PKEY_SIGN = 0x1b
+ KEYCTL_PKEY_VERIFY = 0x1c
+ KEYCTL_READ = 0xb
+ KEYCTL_REJECT = 0x13
+ KEYCTL_RESTRICT_KEYRING = 0x1d
+ KEYCTL_REVOKE = 0x3
+ KEYCTL_SEARCH = 0xa
+ KEYCTL_SESSION_TO_PARENT = 0x12
+ KEYCTL_SETPERM = 0x5
+ KEYCTL_SET_REQKEY_KEYRING = 0xe
+ KEYCTL_SET_TIMEOUT = 0xf
+ KEYCTL_SUPPORTS_DECRYPT = 0x2
+ KEYCTL_SUPPORTS_ENCRYPT = 0x1
+ KEYCTL_SUPPORTS_SIGN = 0x4
+ KEYCTL_SUPPORTS_VERIFY = 0x8
+ KEYCTL_UNLINK = 0x9
+ KEYCTL_UPDATE = 0x2
+ KEYCTL_WATCH_KEY = 0x20
+ KEY_REQKEY_DEFL_DEFAULT = 0x0
+ KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
+ KEY_REQKEY_DEFL_NO_CHANGE = -0x1
+ KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
+ KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
+ KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
+ KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
+ KEY_REQKEY_DEFL_USER_KEYRING = 0x4
+ KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
+ KEY_SPEC_GROUP_KEYRING = -0x6
+ KEY_SPEC_PROCESS_KEYRING = -0x2
+ KEY_SPEC_REQKEY_AUTH_KEY = -0x7
+ KEY_SPEC_REQUESTOR_KEYRING = -0x8
+ KEY_SPEC_SESSION_KEYRING = -0x3
+ KEY_SPEC_THREAD_KEYRING = -0x1
+ KEY_SPEC_USER_KEYRING = -0x4
+ KEY_SPEC_USER_SESSION_KEYRING = -0x5
+ LINUX_REBOOT_CMD_CAD_OFF = 0x0
+ LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
+ LINUX_REBOOT_CMD_HALT = 0xcdef0123
+ LINUX_REBOOT_CMD_KEXEC = 0x45584543
+ LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
+ LINUX_REBOOT_CMD_RESTART = 0x1234567
+ LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
+ LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
+ LINUX_REBOOT_MAGIC1 = 0xfee1dead
+ LINUX_REBOOT_MAGIC2 = 0x28121969
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ LOOP_CLR_FD = 0x4c01
+ LOOP_CTL_ADD = 0x4c80
+ LOOP_CTL_GET_FREE = 0x4c82
+ LOOP_CTL_REMOVE = 0x4c81
+ LOOP_GET_STATUS = 0x4c03
+ LOOP_GET_STATUS64 = 0x4c05
+ LOOP_SET_BLOCK_SIZE = 0x4c09
+ LOOP_SET_CAPACITY = 0x4c07
+ LOOP_SET_DIRECT_IO = 0x4c08
+ LOOP_SET_FD = 0x4c00
+ LOOP_SET_STATUS = 0x4c02
+ LOOP_SET_STATUS64 = 0x4c04
+ LOOP_SET_STATUS_CLEARABLE_FLAGS = 0x4
+ LOOP_SET_STATUS_SETTABLE_FLAGS = 0xc
+ LO_KEY_SIZE = 0x20
+ LO_NAME_SIZE = 0x40
+ LWTUNNEL_IP6_MAX = 0x8
+ LWTUNNEL_IP_MAX = 0x8
+ LWTUNNEL_IP_OPTS_MAX = 0x3
+ LWTUNNEL_IP_OPT_ERSPAN_MAX = 0x4
+ LWTUNNEL_IP_OPT_GENEVE_MAX = 0x3
+ LWTUNNEL_IP_OPT_VXLAN_MAX = 0x1
+ MADV_COLD = 0x14
+ MADV_DODUMP = 0x11
+ MADV_DOFORK = 0xb
+ MADV_DONTDUMP = 0x10
+ MADV_DONTFORK = 0xa
+ MADV_DONTNEED = 0x4
+ MADV_FREE = 0x8
+ MADV_HUGEPAGE = 0xe
+ MADV_HWPOISON = 0x64
+ MADV_KEEPONFORK = 0x13
+ MADV_MERGEABLE = 0xc
+ MADV_NOHUGEPAGE = 0xf
+ MADV_NORMAL = 0x0
+ MADV_PAGEOUT = 0x15
+ MADV_RANDOM = 0x1
+ MADV_REMOVE = 0x9
+ MADV_SEQUENTIAL = 0x2
+ MADV_UNMERGEABLE = 0xd
+ MADV_WILLNEED = 0x3
+ MADV_WIPEONFORK = 0x12
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x10
+ MAP_FIXED_NOREPLACE = 0x100000
+ MAP_HUGE_MASK = 0x3f
+ MAP_HUGE_SHIFT = 0x1a
+ MAP_PRIVATE = 0x2
+ MAP_SHARED = 0x1
+ MAP_SHARED_VALIDATE = 0x3
+ MAP_TYPE = 0xf
+ MCAST_BLOCK_SOURCE = 0x2b
+ MCAST_EXCLUDE = 0x0
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x2a
+ MCAST_JOIN_SOURCE_GROUP = 0x2e
+ MCAST_LEAVE_GROUP = 0x2d
+ MCAST_LEAVE_SOURCE_GROUP = 0x2f
+ MCAST_MSFILTER = 0x30
+ MCAST_UNBLOCK_SOURCE = 0x2c
+ MFD_ALLOW_SEALING = 0x2
+ MFD_CLOEXEC = 0x1
+ MFD_HUGETLB = 0x4
+ MFD_HUGE_16GB = -0x78000000
+ MFD_HUGE_16MB = 0x60000000
+ MFD_HUGE_1GB = 0x78000000
+ MFD_HUGE_1MB = 0x50000000
+ MFD_HUGE_256MB = 0x70000000
+ MFD_HUGE_2GB = 0x7c000000
+ MFD_HUGE_2MB = 0x54000000
+ MFD_HUGE_32MB = 0x64000000
+ MFD_HUGE_512KB = 0x4c000000
+ MFD_HUGE_512MB = 0x74000000
+ MFD_HUGE_64KB = 0x40000000
+ MFD_HUGE_8MB = 0x5c000000
+ MFD_HUGE_MASK = 0x3f
+ MFD_HUGE_SHIFT = 0x1a
+ MINIX2_SUPER_MAGIC = 0x2468
+ MINIX2_SUPER_MAGIC2 = 0x2478
+ MINIX3_SUPER_MAGIC = 0x4d5a
+ MINIX_SUPER_MAGIC = 0x137f
+ MINIX_SUPER_MAGIC2 = 0x138f
+ MNT_DETACH = 0x2
+ MNT_EXPIRE = 0x4
+ MNT_FORCE = 0x1
+ MODULE_INIT_IGNORE_MODVERSIONS = 0x1
+ MODULE_INIT_IGNORE_VERMAGIC = 0x2
+ MSDOS_SUPER_MAGIC = 0x4d44
+ MSG_BATCH = 0x40000
+ MSG_CMSG_CLOEXEC = 0x40000000
+ MSG_CONFIRM = 0x800
+ MSG_CTRUNC = 0x8
+ MSG_DONTROUTE = 0x4
+ MSG_DONTWAIT = 0x40
+ MSG_EOR = 0x80
+ MSG_ERRQUEUE = 0x2000
+ MSG_FASTOPEN = 0x20000000
+ MSG_FIN = 0x200
+ MSG_MORE = 0x8000
+ MSG_NOSIGNAL = 0x4000
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_PROXY = 0x10
+ MSG_RST = 0x1000
+ MSG_SYN = 0x400
+ MSG_TRUNC = 0x20
+ MSG_TRYHARD = 0x4
+ MSG_WAITALL = 0x100
+ MSG_WAITFORONE = 0x10000
+ MSG_ZEROCOPY = 0x4000000
+ MS_ACTIVE = 0x40000000
+ MS_ASYNC = 0x1
+ MS_BIND = 0x1000
+ MS_BORN = 0x20000000
+ MS_DIRSYNC = 0x80
+ MS_INVALIDATE = 0x2
+ MS_I_VERSION = 0x800000
+ MS_KERNMOUNT = 0x400000
+ MS_LAZYTIME = 0x2000000
+ MS_MANDLOCK = 0x40
+ MS_MGC_MSK = 0xffff0000
+ MS_MGC_VAL = 0xc0ed0000
+ MS_MOVE = 0x2000
+ MS_NOATIME = 0x400
+ MS_NODEV = 0x4
+ MS_NODIRATIME = 0x800
+ MS_NOEXEC = 0x8
+ MS_NOREMOTELOCK = 0x8000000
+ MS_NOSEC = 0x10000000
+ MS_NOSUID = 0x2
+ MS_NOSYMFOLLOW = 0x100
+ MS_NOUSER = -0x80000000
+ MS_POSIXACL = 0x10000
+ MS_PRIVATE = 0x40000
+ MS_RDONLY = 0x1
+ MS_REC = 0x4000
+ MS_RELATIME = 0x200000
+ MS_REMOUNT = 0x20
+ MS_RMT_MASK = 0x2800051
+ MS_SHARED = 0x100000
+ MS_SILENT = 0x8000
+ MS_SLAVE = 0x80000
+ MS_STRICTATIME = 0x1000000
+ MS_SUBMOUNT = 0x4000000
+ MS_SYNC = 0x4
+ MS_SYNCHRONOUS = 0x10
+ MS_UNBINDABLE = 0x20000
+ MS_VERBOSE = 0x8000
+ MTD_INODE_FS_MAGIC = 0x11307854
+ NAME_MAX = 0xff
+ NCP_SUPER_MAGIC = 0x564c
+ NETLINK_ADD_MEMBERSHIP = 0x1
+ NETLINK_AUDIT = 0x9
+ NETLINK_BROADCAST_ERROR = 0x4
+ NETLINK_CAP_ACK = 0xa
+ NETLINK_CONNECTOR = 0xb
+ NETLINK_CRYPTO = 0x15
+ NETLINK_DNRTMSG = 0xe
+ NETLINK_DROP_MEMBERSHIP = 0x2
+ NETLINK_ECRYPTFS = 0x13
+ NETLINK_EXT_ACK = 0xb
+ NETLINK_FIB_LOOKUP = 0xa
+ NETLINK_FIREWALL = 0x3
+ NETLINK_GENERIC = 0x10
+ NETLINK_GET_STRICT_CHK = 0xc
+ NETLINK_INET_DIAG = 0x4
+ NETLINK_IP6_FW = 0xd
+ NETLINK_ISCSI = 0x8
+ NETLINK_KOBJECT_UEVENT = 0xf
+ NETLINK_LISTEN_ALL_NSID = 0x8
+ NETLINK_LIST_MEMBERSHIPS = 0x9
+ NETLINK_NETFILTER = 0xc
+ NETLINK_NFLOG = 0x5
+ NETLINK_NO_ENOBUFS = 0x5
+ NETLINK_PKTINFO = 0x3
+ NETLINK_RDMA = 0x14
+ NETLINK_ROUTE = 0x0
+ NETLINK_RX_RING = 0x6
+ NETLINK_SCSITRANSPORT = 0x12
+ NETLINK_SELINUX = 0x7
+ NETLINK_SMC = 0x16
+ NETLINK_SOCK_DIAG = 0x4
+ NETLINK_TX_RING = 0x7
+ NETLINK_UNUSED = 0x1
+ NETLINK_USERSOCK = 0x2
+ NETLINK_XFRM = 0x6
+ NETNSA_MAX = 0x5
+ NETNSA_NSID_NOT_ASSIGNED = -0x1
+ NFNETLINK_V0 = 0x0
+ NFNLGRP_ACCT_QUOTA = 0x8
+ NFNLGRP_CONNTRACK_DESTROY = 0x3
+ NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
+ NFNLGRP_CONNTRACK_EXP_NEW = 0x4
+ NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
+ NFNLGRP_CONNTRACK_NEW = 0x1
+ NFNLGRP_CONNTRACK_UPDATE = 0x2
+ NFNLGRP_MAX = 0x9
+ NFNLGRP_NFTABLES = 0x7
+ NFNLGRP_NFTRACE = 0x9
+ NFNLGRP_NONE = 0x0
+ NFNL_BATCH_MAX = 0x1
+ NFNL_MSG_BATCH_BEGIN = 0x10
+ NFNL_MSG_BATCH_END = 0x11
+ NFNL_NFA_NEST = 0x8000
+ NFNL_SUBSYS_ACCT = 0x7
+ NFNL_SUBSYS_COUNT = 0xc
+ NFNL_SUBSYS_CTHELPER = 0x9
+ NFNL_SUBSYS_CTNETLINK = 0x1
+ NFNL_SUBSYS_CTNETLINK_EXP = 0x2
+ NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
+ NFNL_SUBSYS_IPSET = 0x6
+ NFNL_SUBSYS_NFTABLES = 0xa
+ NFNL_SUBSYS_NFT_COMPAT = 0xb
+ NFNL_SUBSYS_NONE = 0x0
+ NFNL_SUBSYS_OSF = 0x5
+ NFNL_SUBSYS_QUEUE = 0x3
+ NFNL_SUBSYS_ULOG = 0x4
+ NFS_SUPER_MAGIC = 0x6969
+ NILFS_SUPER_MAGIC = 0x3434
+ NL0 = 0x0
+ NL1 = 0x100
+ NLA_ALIGNTO = 0x4
+ NLA_F_NESTED = 0x8000
+ NLA_F_NET_BYTEORDER = 0x4000
+ NLA_HDRLEN = 0x4
+ NLMSG_ALIGNTO = 0x4
+ NLMSG_DONE = 0x3
+ NLMSG_ERROR = 0x2
+ NLMSG_HDRLEN = 0x10
+ NLMSG_MIN_TYPE = 0x10
+ NLMSG_NOOP = 0x1
+ NLMSG_OVERRUN = 0x4
+ NLM_F_ACK = 0x4
+ NLM_F_ACK_TLVS = 0x200
+ NLM_F_APPEND = 0x800
+ NLM_F_ATOMIC = 0x400
+ NLM_F_CAPPED = 0x100
+ NLM_F_CREATE = 0x400
+ NLM_F_DUMP = 0x300
+ NLM_F_DUMP_FILTERED = 0x20
+ NLM_F_DUMP_INTR = 0x10
+ NLM_F_ECHO = 0x8
+ NLM_F_EXCL = 0x200
+ NLM_F_MATCH = 0x200
+ NLM_F_MULTI = 0x2
+ NLM_F_NONREC = 0x100
+ NLM_F_REPLACE = 0x100
+ NLM_F_REQUEST = 0x1
+ NLM_F_ROOT = 0x100
+ NSFS_MAGIC = 0x6e736673
+ OCFS2_SUPER_MAGIC = 0x7461636f
+ OCRNL = 0x8
+ OFDEL = 0x80
+ OFILL = 0x40
+ ONLRET = 0x20
+ ONOCR = 0x10
+ OPENPROM_SUPER_MAGIC = 0x9fa1
+ OPOST = 0x1
+ OVERLAYFS_SUPER_MAGIC = 0x794c7630
+ O_ACCMODE = 0x3
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_WRONLY = 0x1
+ PACKET_ADD_MEMBERSHIP = 0x1
+ PACKET_AUXDATA = 0x8
+ PACKET_BROADCAST = 0x1
+ PACKET_COPY_THRESH = 0x7
+ PACKET_DROP_MEMBERSHIP = 0x2
+ PACKET_FANOUT = 0x12
+ PACKET_FANOUT_CBPF = 0x6
+ PACKET_FANOUT_CPU = 0x2
+ PACKET_FANOUT_DATA = 0x16
+ PACKET_FANOUT_EBPF = 0x7
+ PACKET_FANOUT_FLAG_DEFRAG = 0x8000
+ PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
+ PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
+ PACKET_FANOUT_HASH = 0x0
+ PACKET_FANOUT_LB = 0x1
+ PACKET_FANOUT_QM = 0x5
+ PACKET_FANOUT_RND = 0x4
+ PACKET_FANOUT_ROLLOVER = 0x3
+ PACKET_FASTROUTE = 0x6
+ PACKET_HDRLEN = 0xb
+ PACKET_HOST = 0x0
+ PACKET_IGNORE_OUTGOING = 0x17
+ PACKET_KERNEL = 0x7
+ PACKET_LOOPBACK = 0x5
+ PACKET_LOSS = 0xe
+ PACKET_MR_ALLMULTI = 0x2
+ PACKET_MR_MULTICAST = 0x0
+ PACKET_MR_PROMISC = 0x1
+ PACKET_MR_UNICAST = 0x3
+ PACKET_MULTICAST = 0x2
+ PACKET_ORIGDEV = 0x9
+ PACKET_OTHERHOST = 0x3
+ PACKET_OUTGOING = 0x4
+ PACKET_QDISC_BYPASS = 0x14
+ PACKET_RECV_OUTPUT = 0x3
+ PACKET_RESERVE = 0xc
+ PACKET_ROLLOVER_STATS = 0x15
+ PACKET_RX_RING = 0x5
+ PACKET_STATISTICS = 0x6
+ PACKET_TIMESTAMP = 0x11
+ PACKET_TX_HAS_OFF = 0x13
+ PACKET_TX_RING = 0xd
+ PACKET_TX_TIMESTAMP = 0x10
+ PACKET_USER = 0x6
+ PACKET_VERSION = 0xa
+ PACKET_VNET_HDR = 0xf
+ PARITY_CRC16_PR0 = 0x2
+ PARITY_CRC16_PR0_CCITT = 0x4
+ PARITY_CRC16_PR1 = 0x3
+ PARITY_CRC16_PR1_CCITT = 0x5
+ PARITY_CRC32_PR0_CCITT = 0x6
+ PARITY_CRC32_PR1_CCITT = 0x7
+ PARITY_DEFAULT = 0x0
+ PARITY_NONE = 0x1
+ PARMRK = 0x8
+ 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 = 0x26
+ 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
+ PPC_CMM_MAGIC = 0xc7571590
+ PPPIOCGNPMODE = 0xc008744c
+ PPPIOCNEWUNIT = 0xc004743e
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROC_SUPER_MAGIC = 0x9fa0
+ PROT_EXEC = 0x4
+ PROT_GROWSDOWN = 0x1000000
+ PROT_GROWSUP = 0x2000000
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ PR_CAPBSET_DROP = 0x18
+ PR_CAPBSET_READ = 0x17
+ PR_CAP_AMBIENT = 0x2f
+ PR_CAP_AMBIENT_CLEAR_ALL = 0x4
+ PR_CAP_AMBIENT_IS_SET = 0x1
+ PR_CAP_AMBIENT_LOWER = 0x3
+ PR_CAP_AMBIENT_RAISE = 0x2
+ PR_ENDIAN_BIG = 0x0
+ PR_ENDIAN_LITTLE = 0x1
+ PR_ENDIAN_PPC_LITTLE = 0x2
+ PR_FPEMU_NOPRINT = 0x1
+ PR_FPEMU_SIGFPE = 0x2
+ PR_FP_EXC_ASYNC = 0x2
+ PR_FP_EXC_DISABLED = 0x0
+ PR_FP_EXC_DIV = 0x10000
+ PR_FP_EXC_INV = 0x100000
+ PR_FP_EXC_NONRECOV = 0x1
+ PR_FP_EXC_OVF = 0x20000
+ PR_FP_EXC_PRECISE = 0x3
+ PR_FP_EXC_RES = 0x80000
+ PR_FP_EXC_SW_ENABLE = 0x80
+ PR_FP_EXC_UND = 0x40000
+ PR_FP_MODE_FR = 0x1
+ PR_FP_MODE_FRE = 0x2
+ PR_GET_CHILD_SUBREAPER = 0x25
+ PR_GET_DUMPABLE = 0x3
+ PR_GET_ENDIAN = 0x13
+ PR_GET_FPEMU = 0x9
+ PR_GET_FPEXC = 0xb
+ PR_GET_FP_MODE = 0x2e
+ PR_GET_IO_FLUSHER = 0x3a
+ PR_GET_KEEPCAPS = 0x7
+ PR_GET_NAME = 0x10
+ PR_GET_NO_NEW_PRIVS = 0x27
+ PR_GET_PDEATHSIG = 0x2
+ PR_GET_SECCOMP = 0x15
+ PR_GET_SECUREBITS = 0x1b
+ PR_GET_SPECULATION_CTRL = 0x34
+ PR_GET_TAGGED_ADDR_CTRL = 0x38
+ PR_GET_THP_DISABLE = 0x2a
+ PR_GET_TID_ADDRESS = 0x28
+ PR_GET_TIMERSLACK = 0x1e
+ PR_GET_TIMING = 0xd
+ PR_GET_TSC = 0x19
+ PR_GET_UNALIGN = 0x5
+ PR_MCE_KILL = 0x21
+ PR_MCE_KILL_CLEAR = 0x0
+ PR_MCE_KILL_DEFAULT = 0x2
+ PR_MCE_KILL_EARLY = 0x1
+ PR_MCE_KILL_GET = 0x22
+ PR_MCE_KILL_LATE = 0x0
+ PR_MCE_KILL_SET = 0x1
+ PR_MPX_DISABLE_MANAGEMENT = 0x2c
+ PR_MPX_ENABLE_MANAGEMENT = 0x2b
+ PR_MTE_TAG_MASK = 0x7fff8
+ PR_MTE_TAG_SHIFT = 0x3
+ PR_MTE_TCF_ASYNC = 0x4
+ PR_MTE_TCF_MASK = 0x6
+ PR_MTE_TCF_NONE = 0x0
+ PR_MTE_TCF_SHIFT = 0x1
+ PR_MTE_TCF_SYNC = 0x2
+ PR_PAC_APDAKEY = 0x4
+ PR_PAC_APDBKEY = 0x8
+ PR_PAC_APGAKEY = 0x10
+ PR_PAC_APIAKEY = 0x1
+ PR_PAC_APIBKEY = 0x2
+ PR_PAC_RESET_KEYS = 0x36
+ PR_SET_CHILD_SUBREAPER = 0x24
+ PR_SET_DUMPABLE = 0x4
+ PR_SET_ENDIAN = 0x14
+ PR_SET_FPEMU = 0xa
+ PR_SET_FPEXC = 0xc
+ PR_SET_FP_MODE = 0x2d
+ PR_SET_IO_FLUSHER = 0x39
+ PR_SET_KEEPCAPS = 0x8
+ PR_SET_MM = 0x23
+ PR_SET_MM_ARG_END = 0x9
+ PR_SET_MM_ARG_START = 0x8
+ PR_SET_MM_AUXV = 0xc
+ PR_SET_MM_BRK = 0x7
+ PR_SET_MM_END_CODE = 0x2
+ PR_SET_MM_END_DATA = 0x4
+ PR_SET_MM_ENV_END = 0xb
+ PR_SET_MM_ENV_START = 0xa
+ PR_SET_MM_EXE_FILE = 0xd
+ PR_SET_MM_MAP = 0xe
+ PR_SET_MM_MAP_SIZE = 0xf
+ PR_SET_MM_START_BRK = 0x6
+ PR_SET_MM_START_CODE = 0x1
+ PR_SET_MM_START_DATA = 0x3
+ PR_SET_MM_START_STACK = 0x5
+ PR_SET_NAME = 0xf
+ PR_SET_NO_NEW_PRIVS = 0x26
+ PR_SET_PDEATHSIG = 0x1
+ PR_SET_PTRACER = 0x59616d61
+ PR_SET_SECCOMP = 0x16
+ PR_SET_SECUREBITS = 0x1c
+ PR_SET_SPECULATION_CTRL = 0x35
+ PR_SET_SYSCALL_USER_DISPATCH = 0x3b
+ PR_SET_TAGGED_ADDR_CTRL = 0x37
+ PR_SET_THP_DISABLE = 0x29
+ PR_SET_TIMERSLACK = 0x1d
+ PR_SET_TIMING = 0xe
+ PR_SET_TSC = 0x1a
+ PR_SET_UNALIGN = 0x6
+ PR_SPEC_DISABLE = 0x4
+ PR_SPEC_DISABLE_NOEXEC = 0x10
+ PR_SPEC_ENABLE = 0x2
+ PR_SPEC_FORCE_DISABLE = 0x8
+ PR_SPEC_INDIRECT_BRANCH = 0x1
+ PR_SPEC_NOT_AFFECTED = 0x0
+ PR_SPEC_PRCTL = 0x1
+ PR_SPEC_STORE_BYPASS = 0x0
+ PR_SVE_GET_VL = 0x33
+ PR_SVE_SET_VL = 0x32
+ PR_SVE_SET_VL_ONEXEC = 0x40000
+ PR_SVE_VL_INHERIT = 0x20000
+ PR_SVE_VL_LEN_MASK = 0xffff
+ PR_SYS_DISPATCH_OFF = 0x0
+ PR_SYS_DISPATCH_ON = 0x1
+ PR_TAGGED_ADDR_ENABLE = 0x1
+ PR_TASK_PERF_EVENTS_DISABLE = 0x1f
+ PR_TASK_PERF_EVENTS_ENABLE = 0x20
+ PR_TIMING_STATISTICAL = 0x0
+ PR_TIMING_TIMESTAMP = 0x1
+ PR_TSC_ENABLE = 0x1
+ PR_TSC_SIGSEGV = 0x2
+ PR_UNALIGN_NOPRINT = 0x1
+ PR_UNALIGN_SIGBUS = 0x2
+ PSTOREFS_MAGIC = 0x6165676c
+ PTRACE_ATTACH = 0x10
+ PTRACE_CONT = 0x7
+ PTRACE_DETACH = 0x11
+ PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
+ PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
+ PTRACE_EVENT_CLONE = 0x3
+ PTRACE_EVENT_EXEC = 0x4
+ PTRACE_EVENT_EXIT = 0x6
+ PTRACE_EVENT_FORK = 0x1
+ PTRACE_EVENT_SECCOMP = 0x7
+ PTRACE_EVENT_STOP = 0x80
+ PTRACE_EVENT_VFORK = 0x2
+ PTRACE_EVENT_VFORK_DONE = 0x5
+ PTRACE_GETEVENTMSG = 0x4201
+ PTRACE_GETREGS = 0xc
+ PTRACE_GETREGSET = 0x4204
+ PTRACE_GETSIGINFO = 0x4202
+ PTRACE_GETSIGMASK = 0x420a
+ PTRACE_GET_SYSCALL_INFO = 0x420e
+ PTRACE_INTERRUPT = 0x4207
+ PTRACE_KILL = 0x8
+ PTRACE_LISTEN = 0x4208
+ PTRACE_O_EXITKILL = 0x100000
+ PTRACE_O_MASK = 0x3000ff
+ PTRACE_O_SUSPEND_SECCOMP = 0x200000
+ PTRACE_O_TRACECLONE = 0x8
+ PTRACE_O_TRACEEXEC = 0x10
+ PTRACE_O_TRACEEXIT = 0x40
+ PTRACE_O_TRACEFORK = 0x2
+ PTRACE_O_TRACESECCOMP = 0x80
+ PTRACE_O_TRACESYSGOOD = 0x1
+ PTRACE_O_TRACEVFORK = 0x4
+ PTRACE_O_TRACEVFORKDONE = 0x20
+ PTRACE_PEEKDATA = 0x2
+ PTRACE_PEEKSIGINFO = 0x4209
+ PTRACE_PEEKSIGINFO_SHARED = 0x1
+ PTRACE_PEEKTEXT = 0x1
+ PTRACE_PEEKUSR = 0x3
+ PTRACE_POKEDATA = 0x5
+ PTRACE_POKETEXT = 0x4
+ PTRACE_POKEUSR = 0x6
+ PTRACE_SECCOMP_GET_FILTER = 0x420c
+ PTRACE_SECCOMP_GET_METADATA = 0x420d
+ PTRACE_SEIZE = 0x4206
+ PTRACE_SETOPTIONS = 0x4200
+ PTRACE_SETREGS = 0xd
+ PTRACE_SETREGSET = 0x4205
+ PTRACE_SETSIGINFO = 0x4203
+ PTRACE_SETSIGMASK = 0x420b
+ PTRACE_SINGLESTEP = 0x9
+ PTRACE_SYSCALL = 0x18
+ PTRACE_SYSCALL_INFO_ENTRY = 0x1
+ PTRACE_SYSCALL_INFO_EXIT = 0x2
+ PTRACE_SYSCALL_INFO_NONE = 0x0
+ PTRACE_SYSCALL_INFO_SECCOMP = 0x3
+ PTRACE_TRACEME = 0x0
+ QNX4_SUPER_MAGIC = 0x2f
+ QNX6_SUPER_MAGIC = 0x68191122
+ RAMFS_MAGIC = 0x858458f6
+ RDTGROUP_SUPER_MAGIC = 0x7655821
+ REISERFS_SUPER_MAGIC = 0x52654973
+ RENAME_EXCHANGE = 0x2
+ RENAME_NOREPLACE = 0x1
+ RENAME_WHITEOUT = 0x4
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_LOCKS = 0xa
+ RLIMIT_MSGQUEUE = 0xc
+ RLIMIT_NICE = 0xd
+ RLIMIT_RTPRIO = 0xe
+ RLIMIT_RTTIME = 0xf
+ RLIMIT_SIGPENDING = 0xb
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0xffffffffffffffff
+ RTAX_ADVMSS = 0x8
+ RTAX_CC_ALGO = 0x10
+ RTAX_CWND = 0x7
+ RTAX_FASTOPEN_NO_COOKIE = 0x11
+ RTAX_FEATURES = 0xc
+ RTAX_FEATURE_ALLFRAG = 0x8
+ RTAX_FEATURE_ECN = 0x1
+ RTAX_FEATURE_MASK = 0xf
+ RTAX_FEATURE_SACK = 0x2
+ RTAX_FEATURE_TIMESTAMP = 0x4
+ RTAX_HOPLIMIT = 0xa
+ RTAX_INITCWND = 0xb
+ RTAX_INITRWND = 0xe
+ RTAX_LOCK = 0x1
+ RTAX_MAX = 0x11
+ RTAX_MTU = 0x2
+ RTAX_QUICKACK = 0xf
+ RTAX_REORDERING = 0x9
+ RTAX_RTO_MIN = 0xd
+ RTAX_RTT = 0x4
+ RTAX_RTTVAR = 0x5
+ RTAX_SSTHRESH = 0x6
+ RTAX_UNSPEC = 0x0
+ RTAX_WINDOW = 0x3
+ RTA_ALIGNTO = 0x4
+ RTA_MAX = 0x1e
+ RTCF_DIRECTSRC = 0x4000000
+ RTCF_DOREDIRECT = 0x1000000
+ RTCF_LOG = 0x2000000
+ RTCF_MASQ = 0x400000
+ RTCF_NAT = 0x800000
+ RTCF_VALVE = 0x200000
+ RTC_AF = 0x20
+ RTC_IRQF = 0x80
+ RTC_MAX_FREQ = 0x2000
+ RTC_PF = 0x40
+ RTC_UF = 0x10
+ RTF_ADDRCLASSMASK = 0xf8000000
+ RTF_ADDRCONF = 0x40000
+ RTF_ALLONLINK = 0x20000
+ RTF_BROADCAST = 0x10000000
+ RTF_CACHE = 0x1000000
+ RTF_DEFAULT = 0x10000
+ RTF_DYNAMIC = 0x10
+ RTF_FLOW = 0x2000000
+ RTF_GATEWAY = 0x2
+ RTF_HOST = 0x4
+ RTF_INTERFACE = 0x40000000
+ RTF_IRTT = 0x100
+ RTF_LINKRT = 0x100000
+ RTF_LOCAL = 0x80000000
+ RTF_MODIFIED = 0x20
+ RTF_MSS = 0x40
+ RTF_MTU = 0x40
+ RTF_MULTICAST = 0x20000000
+ RTF_NAT = 0x8000000
+ RTF_NOFORWARD = 0x1000
+ RTF_NONEXTHOP = 0x200000
+ RTF_NOPMTUDISC = 0x4000
+ RTF_POLICY = 0x4000000
+ RTF_REINSTATE = 0x8
+ RTF_REJECT = 0x200
+ RTF_STATIC = 0x400
+ RTF_THROW = 0x2000
+ RTF_UP = 0x1
+ RTF_WINDOW = 0x80
+ RTF_XRESOLVE = 0x800
+ RTMGRP_DECnet_IFADDR = 0x1000
+ RTMGRP_DECnet_ROUTE = 0x4000
+ RTMGRP_IPV4_IFADDR = 0x10
+ RTMGRP_IPV4_MROUTE = 0x20
+ RTMGRP_IPV4_ROUTE = 0x40
+ RTMGRP_IPV4_RULE = 0x80
+ RTMGRP_IPV6_IFADDR = 0x100
+ RTMGRP_IPV6_IFINFO = 0x800
+ RTMGRP_IPV6_MROUTE = 0x200
+ RTMGRP_IPV6_PREFIX = 0x20000
+ RTMGRP_IPV6_ROUTE = 0x400
+ RTMGRP_LINK = 0x1
+ RTMGRP_NEIGH = 0x4
+ RTMGRP_NOTIFY = 0x2
+ RTMGRP_TC = 0x8
+ RTM_BASE = 0x10
+ RTM_DELACTION = 0x31
+ RTM_DELADDR = 0x15
+ RTM_DELADDRLABEL = 0x49
+ RTM_DELCHAIN = 0x65
+ RTM_DELLINK = 0x11
+ RTM_DELLINKPROP = 0x6d
+ RTM_DELMDB = 0x55
+ RTM_DELNEIGH = 0x1d
+ RTM_DELNETCONF = 0x51
+ RTM_DELNEXTHOP = 0x69
+ RTM_DELNSID = 0x59
+ RTM_DELQDISC = 0x25
+ RTM_DELROUTE = 0x19
+ RTM_DELRULE = 0x21
+ RTM_DELTCLASS = 0x29
+ RTM_DELTFILTER = 0x2d
+ RTM_DELVLAN = 0x71
+ RTM_F_CLONED = 0x200
+ RTM_F_EQUALIZE = 0x400
+ RTM_F_FIB_MATCH = 0x2000
+ RTM_F_LOOKUP_TABLE = 0x1000
+ RTM_F_NOTIFY = 0x100
+ RTM_F_OFFLOAD = 0x4000
+ RTM_F_PREFIX = 0x800
+ RTM_F_TRAP = 0x8000
+ RTM_GETACTION = 0x32
+ RTM_GETADDR = 0x16
+ RTM_GETADDRLABEL = 0x4a
+ RTM_GETANYCAST = 0x3e
+ RTM_GETCHAIN = 0x66
+ RTM_GETDCB = 0x4e
+ RTM_GETLINK = 0x12
+ RTM_GETLINKPROP = 0x6e
+ RTM_GETMDB = 0x56
+ RTM_GETMULTICAST = 0x3a
+ RTM_GETNEIGH = 0x1e
+ RTM_GETNEIGHTBL = 0x42
+ RTM_GETNETCONF = 0x52
+ RTM_GETNEXTHOP = 0x6a
+ RTM_GETNSID = 0x5a
+ RTM_GETQDISC = 0x26
+ RTM_GETROUTE = 0x1a
+ RTM_GETRULE = 0x22
+ RTM_GETSTATS = 0x5e
+ RTM_GETTCLASS = 0x2a
+ RTM_GETTFILTER = 0x2e
+ RTM_GETVLAN = 0x72
+ RTM_MAX = 0x73
+ RTM_NEWACTION = 0x30
+ RTM_NEWADDR = 0x14
+ RTM_NEWADDRLABEL = 0x48
+ RTM_NEWCACHEREPORT = 0x60
+ RTM_NEWCHAIN = 0x64
+ RTM_NEWLINK = 0x10
+ RTM_NEWLINKPROP = 0x6c
+ RTM_NEWMDB = 0x54
+ RTM_NEWNDUSEROPT = 0x44
+ RTM_NEWNEIGH = 0x1c
+ RTM_NEWNEIGHTBL = 0x40
+ RTM_NEWNETCONF = 0x50
+ RTM_NEWNEXTHOP = 0x68
+ RTM_NEWNSID = 0x58
+ RTM_NEWNVLAN = 0x70
+ RTM_NEWPREFIX = 0x34
+ RTM_NEWQDISC = 0x24
+ RTM_NEWROUTE = 0x18
+ RTM_NEWRULE = 0x20
+ RTM_NEWSTATS = 0x5c
+ RTM_NEWTCLASS = 0x28
+ RTM_NEWTFILTER = 0x2c
+ RTM_NR_FAMILIES = 0x19
+ RTM_NR_MSGTYPES = 0x64
+ RTM_SETDCB = 0x4f
+ RTM_SETLINK = 0x13
+ RTM_SETNEIGHTBL = 0x43
+ RTNH_ALIGNTO = 0x4
+ RTNH_COMPARE_MASK = 0x59
+ RTNH_F_DEAD = 0x1
+ RTNH_F_LINKDOWN = 0x10
+ RTNH_F_OFFLOAD = 0x8
+ RTNH_F_ONLINK = 0x4
+ RTNH_F_PERVASIVE = 0x2
+ RTNH_F_TRAP = 0x40
+ RTNH_F_UNRESOLVED = 0x20
+ RTN_MAX = 0xb
+ RTPROT_BABEL = 0x2a
+ RTPROT_BGP = 0xba
+ RTPROT_BIRD = 0xc
+ RTPROT_BOOT = 0x3
+ RTPROT_DHCP = 0x10
+ RTPROT_DNROUTED = 0xd
+ RTPROT_EIGRP = 0xc0
+ RTPROT_GATED = 0x8
+ RTPROT_ISIS = 0xbb
+ RTPROT_KEEPALIVED = 0x12
+ RTPROT_KERNEL = 0x2
+ RTPROT_MROUTED = 0x11
+ RTPROT_MRT = 0xa
+ RTPROT_NTK = 0xf
+ RTPROT_OSPF = 0xbc
+ RTPROT_RA = 0x9
+ RTPROT_REDIRECT = 0x1
+ RTPROT_RIP = 0xbd
+ RTPROT_STATIC = 0x4
+ RTPROT_UNSPEC = 0x0
+ RTPROT_XORP = 0xe
+ RTPROT_ZEBRA = 0xb
+ RT_CLASS_DEFAULT = 0xfd
+ RT_CLASS_LOCAL = 0xff
+ RT_CLASS_MAIN = 0xfe
+ RT_CLASS_MAX = 0xff
+ RT_CLASS_UNSPEC = 0x0
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ RUSAGE_THREAD = 0x1
+ RWF_APPEND = 0x10
+ RWF_DSYNC = 0x2
+ RWF_HIPRI = 0x1
+ RWF_NOWAIT = 0x8
+ RWF_SUPPORTED = 0x1f
+ RWF_SYNC = 0x4
+ RWF_WRITE_LIFE_NOT_SET = 0x0
+ SCM_CREDENTIALS = 0x2
+ SCM_RIGHTS = 0x1
+ SCM_TIMESTAMP = 0x1d
+ SC_LOG_FLUSH = 0x100000
+ SECCOMP_MODE_DISABLED = 0x0
+ SECCOMP_MODE_FILTER = 0x2
+ SECCOMP_MODE_STRICT = 0x1
+ SECURITYFS_MAGIC = 0x73636673
+ SELINUX_MAGIC = 0xf97cff8c
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIOCADDDLCI = 0x8980
+ SIOCADDMULTI = 0x8931
+ SIOCADDRT = 0x890b
+ SIOCBONDCHANGEACTIVE = 0x8995
+ SIOCBONDENSLAVE = 0x8990
+ SIOCBONDINFOQUERY = 0x8994
+ SIOCBONDRELEASE = 0x8991
+ SIOCBONDSETHWADDR = 0x8992
+ SIOCBONDSLAVEINFOQUERY = 0x8993
+ SIOCBRADDBR = 0x89a0
+ SIOCBRADDIF = 0x89a2
+ SIOCBRDELBR = 0x89a1
+ SIOCBRDELIF = 0x89a3
+ SIOCDARP = 0x8953
+ SIOCDELDLCI = 0x8981
+ SIOCDELMULTI = 0x8932
+ SIOCDELRT = 0x890c
+ SIOCDEVPRIVATE = 0x89f0
+ SIOCDIFADDR = 0x8936
+ SIOCDRARP = 0x8960
+ SIOCETHTOOL = 0x8946
+ SIOCGARP = 0x8954
+ SIOCGETLINKNAME = 0x89e0
+ SIOCGETNODEID = 0x89e1
+ SIOCGHWTSTAMP = 0x89b1
+ SIOCGIFADDR = 0x8915
+ SIOCGIFBR = 0x8940
+ SIOCGIFBRDADDR = 0x8919
+ SIOCGIFCONF = 0x8912
+ SIOCGIFCOUNT = 0x8938
+ SIOCGIFDSTADDR = 0x8917
+ SIOCGIFENCAP = 0x8925
+ SIOCGIFFLAGS = 0x8913
+ SIOCGIFHWADDR = 0x8927
+ SIOCGIFINDEX = 0x8933
+ SIOCGIFMAP = 0x8970
+ SIOCGIFMEM = 0x891f
+ SIOCGIFMETRIC = 0x891d
+ SIOCGIFMTU = 0x8921
+ SIOCGIFNAME = 0x8910
+ SIOCGIFNETMASK = 0x891b
+ SIOCGIFPFLAGS = 0x8935
+ SIOCGIFSLAVE = 0x8929
+ SIOCGIFTXQLEN = 0x8942
+ SIOCGIFVLAN = 0x8982
+ SIOCGMIIPHY = 0x8947
+ SIOCGMIIREG = 0x8948
+ SIOCGPPPCSTATS = 0x89f2
+ SIOCGPPPSTATS = 0x89f0
+ SIOCGPPPVER = 0x89f1
+ SIOCGRARP = 0x8961
+ SIOCGSKNS = 0x894c
+ SIOCGSTAMP = 0x8906
+ SIOCGSTAMPNS = 0x8907
+ SIOCGSTAMPNS_OLD = 0x8907
+ SIOCGSTAMP_OLD = 0x8906
+ SIOCOUTQNSD = 0x894b
+ SIOCPROTOPRIVATE = 0x89e0
+ SIOCRTMSG = 0x890d
+ SIOCSARP = 0x8955
+ SIOCSHWTSTAMP = 0x89b0
+ SIOCSIFADDR = 0x8916
+ SIOCSIFBR = 0x8941
+ SIOCSIFBRDADDR = 0x891a
+ SIOCSIFDSTADDR = 0x8918
+ SIOCSIFENCAP = 0x8926
+ SIOCSIFFLAGS = 0x8914
+ SIOCSIFHWADDR = 0x8924
+ SIOCSIFHWBROADCAST = 0x8937
+ SIOCSIFLINK = 0x8911
+ SIOCSIFMAP = 0x8971
+ SIOCSIFMEM = 0x8920
+ SIOCSIFMETRIC = 0x891e
+ SIOCSIFMTU = 0x8922
+ SIOCSIFNAME = 0x8923
+ SIOCSIFNETMASK = 0x891c
+ SIOCSIFPFLAGS = 0x8934
+ SIOCSIFSLAVE = 0x8930
+ SIOCSIFTXQLEN = 0x8943
+ SIOCSIFVLAN = 0x8983
+ SIOCSMIIREG = 0x8949
+ SIOCSRARP = 0x8962
+ SIOCWANDEV = 0x894a
+ SMACK_MAGIC = 0x43415d53
+ SMART_AUTOSAVE = 0xd2
+ SMART_AUTO_OFFLINE = 0xdb
+ SMART_DISABLE = 0xd9
+ SMART_ENABLE = 0xd8
+ SMART_HCYL_PASS = 0xc2
+ SMART_IMMEDIATE_OFFLINE = 0xd4
+ SMART_LCYL_PASS = 0x4f
+ SMART_READ_LOG_SECTOR = 0xd5
+ SMART_READ_THRESHOLDS = 0xd1
+ SMART_READ_VALUES = 0xd0
+ SMART_SAVE = 0xd3
+ SMART_STATUS = 0xda
+ SMART_WRITE_LOG_SECTOR = 0xd6
+ SMART_WRITE_THRESHOLDS = 0xd7
+ SMB_SUPER_MAGIC = 0x517b
+ SOCKFS_MAGIC = 0x534f434b
+ SOCK_DCCP = 0x6
+ SOCK_IOC_TYPE = 0x89
+ SOCK_PACKET = 0xa
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOL_AAL = 0x109
+ SOL_ALG = 0x117
+ SOL_ATM = 0x108
+ SOL_CAIF = 0x116
+ SOL_CAN_BASE = 0x64
+ SOL_CAN_RAW = 0x65
+ SOL_DCCP = 0x10d
+ SOL_DECNET = 0x105
+ SOL_ICMPV6 = 0x3a
+ SOL_IP = 0x0
+ SOL_IPV6 = 0x29
+ SOL_IRDA = 0x10a
+ SOL_IUCV = 0x115
+ SOL_KCM = 0x119
+ SOL_LLC = 0x10c
+ SOL_NETBEUI = 0x10b
+ SOL_NETLINK = 0x10e
+ SOL_NFC = 0x118
+ SOL_PACKET = 0x107
+ SOL_PNPIPE = 0x113
+ SOL_PPPOL2TP = 0x111
+ SOL_RAW = 0xff
+ SOL_RDS = 0x114
+ SOL_RXRPC = 0x110
+ SOL_TCP = 0x6
+ SOL_TIPC = 0x10f
+ SOL_TLS = 0x11a
+ SOL_X25 = 0x106
+ SOL_XDP = 0x11b
+ SOMAXCONN = 0x1000
+ SO_ATTACH_FILTER = 0x1a
+ SO_DEBUG = 0x1
+ SO_DETACH_BPF = 0x1b
+ SO_DETACH_FILTER = 0x1b
+ SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
+ SO_EE_CODE_TXTIME_MISSED = 0x2
+ SO_EE_CODE_ZEROCOPY_COPIED = 0x1
+ SO_EE_ORIGIN_ICMP = 0x2
+ SO_EE_ORIGIN_ICMP6 = 0x3
+ SO_EE_ORIGIN_LOCAL = 0x1
+ SO_EE_ORIGIN_NONE = 0x0
+ SO_EE_ORIGIN_TIMESTAMPING = 0x4
+ SO_EE_ORIGIN_TXSTATUS = 0x4
+ SO_EE_ORIGIN_TXTIME = 0x6
+ SO_EE_ORIGIN_ZEROCOPY = 0x5
+ SO_EE_RFC4884_FLAG_INVALID = 0x1
+ SO_GET_FILTER = 0x1a
+ SO_NO_CHECK = 0xb
+ SO_PEERNAME = 0x1c
+ SO_PRIORITY = 0xc
+ SO_TIMESTAMP = 0x1d
+ SO_TIMESTAMP_OLD = 0x1d
+ SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
+ SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
+ SO_VM_SOCKETS_BUFFER_SIZE = 0x0
+ SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
+ SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
+ SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
+ SO_VM_SOCKETS_TRUSTED = 0x5
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
+ SQUASHFS_MAGIC = 0x73717368
+ STACK_END_MAGIC = 0x57ac6e9d
+ STATX_ALL = 0xfff
+ STATX_ATIME = 0x20
+ STATX_ATTR_APPEND = 0x20
+ STATX_ATTR_AUTOMOUNT = 0x1000
+ STATX_ATTR_COMPRESSED = 0x4
+ STATX_ATTR_DAX = 0x200000
+ STATX_ATTR_ENCRYPTED = 0x800
+ STATX_ATTR_IMMUTABLE = 0x10
+ STATX_ATTR_MOUNT_ROOT = 0x2000
+ STATX_ATTR_NODUMP = 0x40
+ STATX_ATTR_VERITY = 0x100000
+ STATX_BASIC_STATS = 0x7ff
+ STATX_BLOCKS = 0x400
+ STATX_BTIME = 0x800
+ STATX_CTIME = 0x80
+ STATX_GID = 0x10
+ STATX_INO = 0x100
+ STATX_MNT_ID = 0x1000
+ STATX_MODE = 0x2
+ STATX_MTIME = 0x40
+ STATX_NLINK = 0x4
+ STATX_SIZE = 0x200
+ STATX_TYPE = 0x1
+ STATX_UID = 0x8
+ STATX__RESERVED = 0x80000000
+ SYNC_FILE_RANGE_WAIT_AFTER = 0x4
+ SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
+ SYNC_FILE_RANGE_WRITE = 0x2
+ SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
+ SYSFS_MAGIC = 0x62656572
+ S_BLKSIZE = 0x200
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFLNK = 0xa000
+ S_IFMT = 0xf000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXGRP = 0x8
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ TAB0 = 0x0
+ TASKSTATS_CMD_ATTR_MAX = 0x4
+ TASKSTATS_CMD_MAX = 0x2
+ TASKSTATS_GENL_NAME = "TASKSTATS"
+ TASKSTATS_GENL_VERSION = 0x1
+ TASKSTATS_TYPE_MAX = 0x6
+ TASKSTATS_VERSION = 0xa
+ TCIFLUSH = 0x0
+ TCIOFF = 0x2
+ TCIOFLUSH = 0x2
+ TCION = 0x3
+ TCOFLUSH = 0x1
+ TCOOFF = 0x0
+ TCOON = 0x1
+ TCP_CC_INFO = 0x1a
+ TCP_CM_INQ = 0x24
+ TCP_CONGESTION = 0xd
+ TCP_COOKIE_IN_ALWAYS = 0x1
+ TCP_COOKIE_MAX = 0x10
+ TCP_COOKIE_MIN = 0x8
+ TCP_COOKIE_OUT_NEVER = 0x2
+ TCP_COOKIE_PAIR_SIZE = 0x20
+ TCP_COOKIE_TRANSACTIONS = 0xf
+ TCP_CORK = 0x3
+ TCP_DEFER_ACCEPT = 0x9
+ TCP_FASTOPEN = 0x17
+ TCP_FASTOPEN_CONNECT = 0x1e
+ TCP_FASTOPEN_KEY = 0x21
+ TCP_FASTOPEN_NO_COOKIE = 0x22
+ TCP_INFO = 0xb
+ TCP_INQ = 0x24
+ TCP_KEEPCNT = 0x6
+ TCP_KEEPIDLE = 0x4
+ TCP_KEEPINTVL = 0x5
+ TCP_LINGER2 = 0x8
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAX_WINSHIFT = 0xe
+ TCP_MD5SIG = 0xe
+ TCP_MD5SIG_EXT = 0x20
+ TCP_MD5SIG_FLAG_PREFIX = 0x1
+ TCP_MD5SIG_MAXKEYLEN = 0x50
+ TCP_MSS = 0x200
+ TCP_MSS_DEFAULT = 0x218
+ TCP_MSS_DESIRED = 0x4c4
+ TCP_NODELAY = 0x1
+ TCP_NOTSENT_LOWAT = 0x19
+ TCP_QUEUE_SEQ = 0x15
+ TCP_QUICKACK = 0xc
+ TCP_REPAIR = 0x13
+ TCP_REPAIR_OFF = 0x0
+ TCP_REPAIR_OFF_NO_WP = -0x1
+ TCP_REPAIR_ON = 0x1
+ TCP_REPAIR_OPTIONS = 0x16
+ TCP_REPAIR_QUEUE = 0x14
+ TCP_REPAIR_WINDOW = 0x1d
+ TCP_SAVED_SYN = 0x1c
+ TCP_SAVE_SYN = 0x1b
+ TCP_SYNCNT = 0x7
+ TCP_S_DATA_IN = 0x4
+ TCP_S_DATA_OUT = 0x8
+ TCP_THIN_DUPACK = 0x11
+ TCP_THIN_LINEAR_TIMEOUTS = 0x10
+ TCP_TIMESTAMP = 0x18
+ TCP_TX_DELAY = 0x25
+ TCP_ULP = 0x1f
+ TCP_USER_TIMEOUT = 0x12
+ TCP_V4_FLOW = 0x1
+ TCP_V6_FLOW = 0x5
+ TCP_WINDOW_CLAMP = 0xa
+ TCP_ZEROCOPY_RECEIVE = 0x23
+ TFD_TIMER_ABSTIME = 0x1
+ TFD_TIMER_CANCEL_ON_SET = 0x2
+ TIMER_ABSTIME = 0x1
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RTS = 0x4
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_IOCTL = 0x40
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIPC_ADDR_ID = 0x3
+ TIPC_ADDR_MCAST = 0x1
+ TIPC_ADDR_NAME = 0x2
+ TIPC_ADDR_NAMESEQ = 0x1
+ TIPC_AEAD_ALG_NAME = 0x20
+ TIPC_AEAD_KEYLEN_MAX = 0x24
+ TIPC_AEAD_KEYLEN_MIN = 0x14
+ TIPC_AEAD_KEY_SIZE_MAX = 0x48
+ TIPC_CFG_SRV = 0x0
+ TIPC_CLUSTER_BITS = 0xc
+ TIPC_CLUSTER_MASK = 0xfff000
+ TIPC_CLUSTER_OFFSET = 0xc
+ TIPC_CLUSTER_SIZE = 0xfff
+ TIPC_CONN_SHUTDOWN = 0x5
+ TIPC_CONN_TIMEOUT = 0x82
+ TIPC_CRITICAL_IMPORTANCE = 0x3
+ TIPC_DESTNAME = 0x3
+ TIPC_DEST_DROPPABLE = 0x81
+ TIPC_ERRINFO = 0x1
+ TIPC_ERR_NO_NAME = 0x1
+ TIPC_ERR_NO_NODE = 0x3
+ TIPC_ERR_NO_PORT = 0x2
+ TIPC_ERR_OVERLOAD = 0x4
+ TIPC_GROUP_JOIN = 0x87
+ TIPC_GROUP_LEAVE = 0x88
+ TIPC_GROUP_LOOPBACK = 0x1
+ TIPC_GROUP_MEMBER_EVTS = 0x2
+ TIPC_HIGH_IMPORTANCE = 0x2
+ TIPC_IMPORTANCE = 0x7f
+ TIPC_LINK_STATE = 0x2
+ TIPC_LOW_IMPORTANCE = 0x0
+ TIPC_MAX_BEARER_NAME = 0x20
+ TIPC_MAX_IF_NAME = 0x10
+ TIPC_MAX_LINK_NAME = 0x44
+ TIPC_MAX_MEDIA_NAME = 0x10
+ TIPC_MAX_USER_MSG_SIZE = 0x101d0
+ TIPC_MCAST_BROADCAST = 0x85
+ TIPC_MCAST_REPLICAST = 0x86
+ TIPC_MEDIUM_IMPORTANCE = 0x1
+ TIPC_NODEID_LEN = 0x10
+ TIPC_NODELAY = 0x8a
+ TIPC_NODE_BITS = 0xc
+ TIPC_NODE_MASK = 0xfff
+ TIPC_NODE_OFFSET = 0x0
+ TIPC_NODE_RECVQ_DEPTH = 0x83
+ TIPC_NODE_SIZE = 0xfff
+ TIPC_NODE_STATE = 0x0
+ TIPC_OK = 0x0
+ TIPC_PUBLISHED = 0x1
+ TIPC_REKEYING_NOW = 0xffffffff
+ TIPC_RESERVED_TYPES = 0x40
+ TIPC_RETDATA = 0x2
+ TIPC_SERVICE_ADDR = 0x2
+ TIPC_SERVICE_RANGE = 0x1
+ TIPC_SOCKET_ADDR = 0x3
+ TIPC_SOCK_RECVQ_DEPTH = 0x84
+ TIPC_SOCK_RECVQ_USED = 0x89
+ TIPC_SRC_DROPPABLE = 0x80
+ TIPC_SUBSCR_TIMEOUT = 0x3
+ TIPC_SUB_CANCEL = 0x4
+ TIPC_SUB_PORTS = 0x1
+ TIPC_SUB_SERVICE = 0x2
+ TIPC_TOP_SRV = 0x1
+ TIPC_WAIT_FOREVER = 0xffffffff
+ TIPC_WITHDRAWN = 0x2
+ TIPC_ZONE_BITS = 0x8
+ TIPC_ZONE_CLUSTER_MASK = 0xfffff000
+ TIPC_ZONE_MASK = 0xff000000
+ TIPC_ZONE_OFFSET = 0x18
+ TIPC_ZONE_SCOPE = 0x1
+ TIPC_ZONE_SIZE = 0xff
+ TMPFS_MAGIC = 0x1021994
+ TPACKET_ALIGNMENT = 0x10
+ TPACKET_HDRLEN = 0x34
+ TP_STATUS_AVAILABLE = 0x0
+ TP_STATUS_BLK_TMO = 0x20
+ TP_STATUS_COPY = 0x2
+ TP_STATUS_CSUMNOTREADY = 0x8
+ TP_STATUS_CSUM_VALID = 0x80
+ TP_STATUS_KERNEL = 0x0
+ TP_STATUS_LOSING = 0x4
+ TP_STATUS_SENDING = 0x2
+ TP_STATUS_SEND_REQUEST = 0x1
+ TP_STATUS_TS_RAW_HARDWARE = 0x80000000
+ TP_STATUS_TS_SOFTWARE = 0x20000000
+ TP_STATUS_TS_SYS_HARDWARE = 0x40000000
+ TP_STATUS_USER = 0x1
+ TP_STATUS_VLAN_TPID_VALID = 0x40
+ TP_STATUS_VLAN_VALID = 0x10
+ TP_STATUS_WRONG_FORMAT = 0x4
+ TRACEFS_MAGIC = 0x74726163
+ TS_COMM_LEN = 0x20
+ UDF_SUPER_MAGIC = 0x15013346
+ UMOUNT_NOFOLLOW = 0x8
+ USBDEVICE_SUPER_MAGIC = 0x9fa2
+ UTIME_NOW = 0x3fffffff
+ UTIME_OMIT = 0x3ffffffe
+ V9FS_MAGIC = 0x1021997
+ VERASE = 0x2
+ VINTR = 0x0
+ VKILL = 0x3
+ VLNEXT = 0xf
+ VMADDR_CID_ANY = 0xffffffff
+ VMADDR_CID_HOST = 0x2
+ VMADDR_CID_HYPERVISOR = 0x0
+ VMADDR_CID_LOCAL = 0x1
+ VMADDR_FLAG_TO_HOST = 0x1
+ VMADDR_PORT_ANY = 0xffffffff
+ VM_SOCKETS_INVALID_VERSION = 0xffffffff
+ VQUIT = 0x1
+ VT0 = 0x0
+ WAKE_MAGIC = 0x20
+ WALL = 0x40000000
+ WCLONE = 0x80000000
+ WCONTINUED = 0x8
+ WDIOC_SETPRETIMEOUT = 0xc0045708
+ 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
+ WIN_ACKMEDIACHANGE = 0xdb
+ WIN_CHECKPOWERMODE1 = 0xe5
+ WIN_CHECKPOWERMODE2 = 0x98
+ WIN_DEVICE_RESET = 0x8
+ WIN_DIAGNOSE = 0x90
+ WIN_DOORLOCK = 0xde
+ WIN_DOORUNLOCK = 0xdf
+ WIN_DOWNLOAD_MICROCODE = 0x92
+ WIN_FLUSH_CACHE = 0xe7
+ WIN_FLUSH_CACHE_EXT = 0xea
+ WIN_FORMAT = 0x50
+ WIN_GETMEDIASTATUS = 0xda
+ WIN_IDENTIFY = 0xec
+ WIN_IDENTIFY_DMA = 0xee
+ WIN_IDLEIMMEDIATE = 0xe1
+ WIN_INIT = 0x60
+ WIN_MEDIAEJECT = 0xed
+ WIN_MULTREAD = 0xc4
+ WIN_MULTREAD_EXT = 0x29
+ WIN_MULTWRITE = 0xc5
+ WIN_MULTWRITE_EXT = 0x39
+ WIN_NOP = 0x0
+ WIN_PACKETCMD = 0xa0
+ WIN_PIDENTIFY = 0xa1
+ WIN_POSTBOOT = 0xdc
+ WIN_PREBOOT = 0xdd
+ WIN_QUEUED_SERVICE = 0xa2
+ WIN_READ = 0x20
+ WIN_READDMA = 0xc8
+ WIN_READDMA_EXT = 0x25
+ WIN_READDMA_ONCE = 0xc9
+ WIN_READDMA_QUEUED = 0xc7
+ WIN_READDMA_QUEUED_EXT = 0x26
+ WIN_READ_BUFFER = 0xe4
+ WIN_READ_EXT = 0x24
+ WIN_READ_LONG = 0x22
+ WIN_READ_LONG_ONCE = 0x23
+ WIN_READ_NATIVE_MAX = 0xf8
+ WIN_READ_NATIVE_MAX_EXT = 0x27
+ WIN_READ_ONCE = 0x21
+ WIN_RECAL = 0x10
+ WIN_RESTORE = 0x10
+ WIN_SECURITY_DISABLE = 0xf6
+ WIN_SECURITY_ERASE_PREPARE = 0xf3
+ WIN_SECURITY_ERASE_UNIT = 0xf4
+ WIN_SECURITY_FREEZE_LOCK = 0xf5
+ WIN_SECURITY_SET_PASS = 0xf1
+ WIN_SECURITY_UNLOCK = 0xf2
+ WIN_SEEK = 0x70
+ WIN_SETFEATURES = 0xef
+ WIN_SETIDLE1 = 0xe3
+ WIN_SETIDLE2 = 0x97
+ WIN_SETMULT = 0xc6
+ WIN_SET_MAX = 0xf9
+ WIN_SET_MAX_EXT = 0x37
+ WIN_SLEEPNOW1 = 0xe6
+ WIN_SLEEPNOW2 = 0x99
+ WIN_SMART = 0xb0
+ WIN_SPECIFY = 0x91
+ WIN_SRST = 0x8
+ WIN_STANDBY = 0xe2
+ WIN_STANDBY2 = 0x96
+ WIN_STANDBYNOW1 = 0xe0
+ WIN_STANDBYNOW2 = 0x94
+ WIN_VERIFY = 0x40
+ WIN_VERIFY_EXT = 0x42
+ WIN_VERIFY_ONCE = 0x41
+ WIN_WRITE = 0x30
+ WIN_WRITEDMA = 0xca
+ WIN_WRITEDMA_EXT = 0x35
+ WIN_WRITEDMA_ONCE = 0xcb
+ WIN_WRITEDMA_QUEUED = 0xcc
+ WIN_WRITEDMA_QUEUED_EXT = 0x36
+ WIN_WRITE_BUFFER = 0xe8
+ WIN_WRITE_EXT = 0x34
+ WIN_WRITE_LONG = 0x32
+ WIN_WRITE_LONG_ONCE = 0x33
+ WIN_WRITE_ONCE = 0x31
+ WIN_WRITE_SAME = 0xe9
+ WIN_WRITE_VERIFY = 0x3c
+ WNOHANG = 0x1
+ WNOTHREAD = 0x20000000
+ WNOWAIT = 0x1000000
+ WSTOPPED = 0x2
+ WUNTRACED = 0x2
+ XATTR_CREATE = 0x1
+ XATTR_REPLACE = 0x2
+ XDP_COPY = 0x2
+ XDP_FLAGS_DRV_MODE = 0x4
+ XDP_FLAGS_HW_MODE = 0x8
+ XDP_FLAGS_MASK = 0x1f
+ XDP_FLAGS_MODES = 0xe
+ XDP_FLAGS_REPLACE = 0x10
+ XDP_FLAGS_SKB_MODE = 0x2
+ XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
+ XDP_MMAP_OFFSETS = 0x1
+ XDP_OPTIONS = 0x8
+ XDP_OPTIONS_ZEROCOPY = 0x1
+ XDP_PACKET_HEADROOM = 0x100
+ XDP_PGOFF_RX_RING = 0x0
+ XDP_PGOFF_TX_RING = 0x80000000
+ XDP_RING_NEED_WAKEUP = 0x1
+ XDP_RX_RING = 0x2
+ XDP_SHARED_UMEM = 0x1
+ XDP_STATISTICS = 0x7
+ XDP_TX_RING = 0x3
+ XDP_UMEM_COMPLETION_RING = 0x6
+ XDP_UMEM_FILL_RING = 0x5
+ XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
+ XDP_UMEM_PGOFF_FILL_RING = 0x100000000
+ XDP_UMEM_REG = 0x4
+ XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
+ XDP_USE_NEED_WAKEUP = 0x8
+ XDP_ZEROCOPY = 0x4
+ XENFS_SUPER_MAGIC = 0xabba1974
+ XFS_SUPER_MAGIC = 0x58465342
+ Z3FOLD_MAGIC = 0x33
+ ZONEFS_MAGIC = 0x5a4f4653
+ ZSMALLOC_MAGIC = 0x58295829
+ _HIDIOCGRAWNAME_LEN = 0x80
+ _HIDIOCGRAWPHYS_LEN = 0x40
+ _HIDIOCGRAWUNIQ_LEN = 0x40
+)
+
+// Errors
+const (
+ E2BIG = syscall.Errno(0x7)
+ EACCES = syscall.Errno(0xd)
+ EAGAIN = syscall.Errno(0xb)
+ EBADF = syscall.Errno(0x9)
+ EBUSY = syscall.Errno(0x10)
+ ECHILD = syscall.Errno(0xa)
+ EDOM = syscall.Errno(0x21)
+ EEXIST = syscall.Errno(0x11)
+ EFAULT = syscall.Errno(0xe)
+ EFBIG = syscall.Errno(0x1b)
+ EINTR = syscall.Errno(0x4)
+ EINVAL = syscall.Errno(0x16)
+ EIO = syscall.Errno(0x5)
+ EISDIR = syscall.Errno(0x15)
+ EMFILE = syscall.Errno(0x18)
+ EMLINK = syscall.Errno(0x1f)
+ ENFILE = syscall.Errno(0x17)
+ ENODEV = syscall.Errno(0x13)
+ ENOENT = syscall.Errno(0x2)
+ ENOEXEC = syscall.Errno(0x8)
+ ENOMEM = syscall.Errno(0xc)
+ ENOSPC = syscall.Errno(0x1c)
+ ENOTBLK = syscall.Errno(0xf)
+ ENOTDIR = syscall.Errno(0x14)
+ ENOTTY = syscall.Errno(0x19)
+ ENXIO = syscall.Errno(0x6)
+ EPERM = syscall.Errno(0x1)
+ EPIPE = syscall.Errno(0x20)
+ ERANGE = syscall.Errno(0x22)
+ EROFS = syscall.Errno(0x1e)
+ ESPIPE = syscall.Errno(0x1d)
+ ESRCH = syscall.Errno(0x3)
+ ETXTBSY = syscall.Errno(0x1a)
+ EWOULDBLOCK = syscall.Errno(0xb)
+ EXDEV = syscall.Errno(0x12)
+)
+
+// Signals
+const (
+ SIGABRT = syscall.Signal(0x6)
+ SIGALRM = syscall.Signal(0xe)
+ SIGFPE = syscall.Signal(0x8)
+ SIGHUP = syscall.Signal(0x1)
+ SIGILL = syscall.Signal(0x4)
+ SIGINT = syscall.Signal(0x2)
+ SIGIOT = syscall.Signal(0x6)
+ SIGKILL = syscall.Signal(0x9)
+ SIGPIPE = syscall.Signal(0xd)
+ SIGQUIT = syscall.Signal(0x3)
+ SIGSEGV = syscall.Signal(0xb)
+ SIGTERM = syscall.Signal(0xf)
+ SIGTRAP = syscall.Signal(0x5)
+)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index e65b02f..e91a1a9 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -1,2873 +1,514 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include -m32
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && linux
// +build 386,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x80041270
- BLKBSZSET = 0x40041271
- BLKFLSBUF = 0x1261
- BLKFRAGET = 0x1265
- BLKFRASET = 0x1264
- BLKGETSIZE = 0x1260
- BLKGETSIZE64 = 0x80041272
- BLKPBSZGET = 0x127b
- BLKRAGET = 0x1263
- BLKRASET = 0x1262
- BLKROGET = 0x125e
- BLKROSET = 0x125d
- BLKRRPART = 0x125f
- BLKSECTGET = 0x1267
- BLKSECTSET = 0x1266
- BLKSSZGET = 0x1268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_MMAPABLE = 0x400
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_ARGS_SIZE_VER1 = 0x50
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_CLEAR_SIGHAND = 0x100000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FP_XSTATE_MAGIC2 = 0x46505845
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0xf
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0xf
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xc
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0xd
- F_SETLK64 = 0xd
- F_SETLKW = 0xe
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_COLD = 0x14
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0x15
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_32BIT = 0x40
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x20
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0xb703
- NS_GET_OWNER_UID = 0xb704
- NS_GET_PARENT = 0xb702
- NS_GET_USERNS = 0xb701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x8000
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x2401
- PERF_EVENT_IOC_ENABLE = 0x2400
- PERF_EVENT_IOC_ID = 0x80042407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
- PERF_EVENT_IOC_PERIOD = 0x40082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
- PERF_EVENT_IOC_REFRESH = 0x2402
- PERF_EVENT_IOC_RESET = 0x2403
- PERF_EVENT_IOC_SET_BPF = 0x40042408
- PERF_EVENT_IOC_SET_FILTER = 0x40042406
- PERF_EVENT_IOC_SET_OUTPUT = 0x2405
- PIPEFS_MAGIC = 0x50495045
- PPC_CMM_MAGIC = 0xc7571590
- PPPIOCATTACH = 0x4004743d
- PPPIOCATTCHAN = 0x40047438
- PPPIOCCONNECT = 0x4004743a
- PPPIOCDETACH = 0x4004743c
- PPPIOCDISCONN = 0x7439
- PPPIOCGASYNCMAP = 0x80047458
- PPPIOCGCHAN = 0x80047437
- PPPIOCGDEBUG = 0x80047441
- PPPIOCGFLAGS = 0x8004745a
- PPPIOCGIDLE = 0x8008743f
- PPPIOCGIDLE32 = 0x8008743f
- PPPIOCGIDLE64 = 0x8010743f
- PPPIOCGL2TPSTATS = 0x80487436
- PPPIOCGMRU = 0x80047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x80047455
- PPPIOCGUNIT = 0x80047456
- PPPIOCGXASYNCMAP = 0x80207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x40087446
- PPPIOCSASYNCMAP = 0x40047457
- PPPIOCSCOMPRESS = 0x400c744d
- PPPIOCSDEBUG = 0x40047440
- PPPIOCSFLAGS = 0x40047459
- PPPIOCSMAXCID = 0x40047451
- PPPIOCSMRRU = 0x4004743b
- PPPIOCSMRU = 0x40047452
- PPPIOCSNPMODE = 0x4008744b
- PPPIOCSPASS = 0x40087447
- PPPIOCSRASYNCMAP = 0x40047454
- PPPIOCSXASYNCMAP = 0x4020744f
- PPPIOCXFERUNIT = 0x744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETFPXREGS = 0x12
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETFPXREGS = 0x13
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SINGLEBLOCK = 0x21
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_SYSEMU = 0x1f
- PTRACE_SYSEMU_SINGLESTEP = 0x20
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x40085203
- RNDADDTOENTCNT = 0x40045201
- RNDCLEARPOOL = 0x5206
- RNDGETENTCNT = 0x80045200
- RNDGETPOOL = 0x80085202
- RNDRESEEDCRNG = 0x5207
- RNDZAPENTCNT = 0x5204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x7002
- RTC_AIE_ON = 0x7001
- RTC_ALM_READ = 0x80247008
- RTC_ALM_SET = 0x40247007
- RTC_EPOCH_READ = 0x8004700d
- RTC_EPOCH_SET = 0x4004700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x8004700b
- RTC_IRQP_SET = 0x4004700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x7006
- RTC_PIE_ON = 0x7005
- RTC_PLL_GET = 0x801c7011
- RTC_PLL_SET = 0x401c7012
- RTC_RD_TIME = 0x80247009
- RTC_SET_TIME = 0x4024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x7004
- RTC_UIE_ON = 0x7003
- RTC_VL_CLR = 0x7014
- RTC_VL_READ = 0x80047013
- RTC_WIE_OFF = 0x7010
- RTC_WIE_ON = 0x700f
- RTC_WKALM_RD = 0x80287010
- RTC_WKALM_SET = 0x4028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELLINKPROP = 0x6d
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETLINKPROP = 0x6e
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWLINKPROP = 0x6c
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x18
- RTM_NR_MSGTYPES = 0x60
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x80108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x80108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x541b
- SIOCOUTQ = 0x5411
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x1000
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_ATTR_VERITY = 0x100000
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_TX_DELAY = 0x25
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x80285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGPTPEER = 0x5441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_AEAD_ALG_NAME = 0x20
- TIPC_AEAD_KEYLEN_MAX = 0x24
- TIPC_AEAD_KEYLEN_MIN = 0x14
- TIPC_AEAD_KEY_SIZE_MAX = 0x48
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODELAY = 0x8a
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x400854d5
- TUNDETACHFILTER = 0x400854d6
- TUNGETDEVNETNS = 0x54e3
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x800854db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETCARRIER = 0x400454e2
- TUNSETDEBUG = 0x400454c9
- TUNSETFILTEREBPF = 0x800454e1
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETSTEERINGEBPF = 0x800454e0
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- UBI_IOCATT = 0x40186f40
- UBI_IOCDET = 0x40046f41
- UBI_IOCEBCH = 0x40044f02
- UBI_IOCEBER = 0x40044f01
- UBI_IOCEBISMAP = 0x80044f05
- UBI_IOCEBMAP = 0x40084f03
- UBI_IOCEBUNMAP = 0x40044f04
- UBI_IOCMKVOL = 0x40986f00
- UBI_IOCRMVOL = 0x40046f01
- UBI_IOCRNVOL = 0x51106f03
- UBI_IOCRPEB = 0x40046f04
- UBI_IOCRSVOL = 0x400c6f02
- UBI_IOCSETVOLPROP = 0x40104f06
- UBI_IOCSPEB = 0x40046f05
- UBI_IOCVOLCRBLK = 0x40804f07
- UBI_IOCVOLRMBLK = 0x4f08
- UBI_IOCVOLUP = 0x40084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x80045702
- WDIOC_GETPRETIMEOUT = 0x80045709
- WDIOC_GETSTATUS = 0x80045701
- WDIOC_GETSUPPORT = 0x80285700
- WDIOC_GETTEMP = 0x80045703
- WDIOC_GETTIMELEFT = 0x8004570a
- WDIOC_GETTIMEOUT = 0x80045707
- WDIOC_KEEPALIVE = 0x80045705
- WDIOC_SETOPTIONS = 0x80045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x20
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- X86_FXSR_MAGIC = 0x0
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x80041270
+ BLKBSZSET = 0x40041271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80041272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FP_XSTATE_MAGIC2 = 0x46505845
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80046601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40046602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0xc
+ F_GETLK64 = 0xc
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0xd
+ F_SETLK64 = 0xd
+ F_SETLKW = 0xe
+ F_SETLKW64 = 0xe
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_32BIT = 0x40
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ NFDBITS = 0x20
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x4000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x8000
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80042407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40042406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8008743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40087446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x400c744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40087447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PR_SET_PTRACER_ANY = 0xffffffff
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETFPXREGS = 0x12
+ PTRACE_GET_THREAD_AREA = 0x19
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETFPXREGS = 0x13
+ PTRACE_SET_THREAD_AREA = 0x1a
+ PTRACE_SINGLEBLOCK = 0x21
+ PTRACE_SYSEMU = 0x1f
+ PTRACE_SYSEMU_SINGLESTEP = 0x20
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8004700d
+ RTC_EPOCH_SET = 0x4004700e
+ RTC_IRQP_READ = 0x8004700b
+ RTC_IRQP_SET = 0x4004700c
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x801c7011
+ RTC_PLL_SET = 0x401c7012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x400854d5
+ TUNDETACHFILTER = 0x400854d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x800854db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x20
+ X86_FXSR_MAGIC = 0x0
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2876,23 +517,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x23)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2909,8 +542,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2918,99 +549,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index b26659e..a9cbac6 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -1,2873 +1,514 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && linux
// +build amd64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x80081270
- BLKBSZSET = 0x40081271
- BLKFLSBUF = 0x1261
- BLKFRAGET = 0x1265
- BLKFRASET = 0x1264
- BLKGETSIZE = 0x1260
- BLKGETSIZE64 = 0x80081272
- BLKPBSZGET = 0x127b
- BLKRAGET = 0x1263
- BLKRASET = 0x1262
- BLKROGET = 0x125e
- BLKROSET = 0x125d
- BLKRRPART = 0x125f
- BLKSECTGET = 0x1267
- BLKSECTSET = 0x1266
- BLKSSZGET = 0x1268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_MMAPABLE = 0x400
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_ARGS_SIZE_VER1 = 0x50
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_CLEAR_SIGHAND = 0x100000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FP_XSTATE_MAGIC2 = 0x46505845
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0xf
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0xf
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0x5
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_COLD = 0x14
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0x15
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_32BIT = 0x40
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0xb703
- NS_GET_OWNER_UID = 0xb704
- NS_GET_PARENT = 0xb702
- NS_GET_USERNS = 0xb701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x2401
- PERF_EVENT_IOC_ENABLE = 0x2400
- PERF_EVENT_IOC_ID = 0x80082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
- PERF_EVENT_IOC_PERIOD = 0x40082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x2402
- PERF_EVENT_IOC_RESET = 0x2403
- PERF_EVENT_IOC_SET_BPF = 0x40042408
- PERF_EVENT_IOC_SET_FILTER = 0x40082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x2405
- PIPEFS_MAGIC = 0x50495045
- PPC_CMM_MAGIC = 0xc7571590
- PPPIOCATTACH = 0x4004743d
- PPPIOCATTCHAN = 0x40047438
- PPPIOCCONNECT = 0x4004743a
- PPPIOCDETACH = 0x4004743c
- PPPIOCDISCONN = 0x7439
- PPPIOCGASYNCMAP = 0x80047458
- PPPIOCGCHAN = 0x80047437
- PPPIOCGDEBUG = 0x80047441
- PPPIOCGFLAGS = 0x8004745a
- PPPIOCGIDLE = 0x8010743f
- PPPIOCGIDLE32 = 0x8008743f
- PPPIOCGIDLE64 = 0x8010743f
- PPPIOCGL2TPSTATS = 0x80487436
- PPPIOCGMRU = 0x80047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x80047455
- PPPIOCGUNIT = 0x80047456
- PPPIOCGXASYNCMAP = 0x80207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x40107446
- PPPIOCSASYNCMAP = 0x40047457
- PPPIOCSCOMPRESS = 0x4010744d
- PPPIOCSDEBUG = 0x40047440
- PPPIOCSFLAGS = 0x40047459
- PPPIOCSMAXCID = 0x40047451
- PPPIOCSMRRU = 0x4004743b
- PPPIOCSMRU = 0x40047452
- PPPIOCSNPMODE = 0x4008744b
- PPPIOCSPASS = 0x40107447
- PPPIOCSRASYNCMAP = 0x40047454
- PPPIOCSXASYNCMAP = 0x4020744f
- PPPIOCXFERUNIT = 0x744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ARCH_PRCTL = 0x1e
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETFPXREGS = 0x12
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETFPXREGS = 0x13
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SINGLEBLOCK = 0x21
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_SYSEMU = 0x1f
- PTRACE_SYSEMU_SINGLESTEP = 0x20
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x40085203
- RNDADDTOENTCNT = 0x40045201
- RNDCLEARPOOL = 0x5206
- RNDGETENTCNT = 0x80045200
- RNDGETPOOL = 0x80085202
- RNDRESEEDCRNG = 0x5207
- RNDZAPENTCNT = 0x5204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x7002
- RTC_AIE_ON = 0x7001
- RTC_ALM_READ = 0x80247008
- RTC_ALM_SET = 0x40247007
- RTC_EPOCH_READ = 0x8008700d
- RTC_EPOCH_SET = 0x4008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x8008700b
- RTC_IRQP_SET = 0x4008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x7006
- RTC_PIE_ON = 0x7005
- RTC_PLL_GET = 0x80207011
- RTC_PLL_SET = 0x40207012
- RTC_RD_TIME = 0x80247009
- RTC_SET_TIME = 0x4024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x7004
- RTC_UIE_ON = 0x7003
- RTC_VL_CLR = 0x7014
- RTC_VL_READ = 0x80047013
- RTC_WIE_OFF = 0x7010
- RTC_WIE_ON = 0x700f
- RTC_WKALM_RD = 0x80287010
- RTC_WKALM_SET = 0x4028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELLINKPROP = 0x6d
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETLINKPROP = 0x6e
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWLINKPROP = 0x6c
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x18
- RTM_NR_MSGTYPES = 0x60
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x80108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x80108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x541b
- SIOCOUTQ = 0x5411
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x1000
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_ATTR_VERITY = 0x100000
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_TX_DELAY = 0x25
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x80285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGPTPEER = 0x5441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_AEAD_ALG_NAME = 0x20
- TIPC_AEAD_KEYLEN_MAX = 0x24
- TIPC_AEAD_KEYLEN_MIN = 0x14
- TIPC_AEAD_KEY_SIZE_MAX = 0x48
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODELAY = 0x8a
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x401054d5
- TUNDETACHFILTER = 0x401054d6
- TUNGETDEVNETNS = 0x54e3
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x801054db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETCARRIER = 0x400454e2
- TUNSETDEBUG = 0x400454c9
- TUNSETFILTEREBPF = 0x800454e1
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETSTEERINGEBPF = 0x800454e0
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- UBI_IOCATT = 0x40186f40
- UBI_IOCDET = 0x40046f41
- UBI_IOCEBCH = 0x40044f02
- UBI_IOCEBER = 0x40044f01
- UBI_IOCEBISMAP = 0x80044f05
- UBI_IOCEBMAP = 0x40084f03
- UBI_IOCEBUNMAP = 0x40044f04
- UBI_IOCMKVOL = 0x40986f00
- UBI_IOCRMVOL = 0x40046f01
- UBI_IOCRNVOL = 0x51106f03
- UBI_IOCRPEB = 0x40046f04
- UBI_IOCRSVOL = 0x400c6f02
- UBI_IOCSETVOLPROP = 0x40104f06
- UBI_IOCSPEB = 0x40046f05
- UBI_IOCVOLCRBLK = 0x40804f07
- UBI_IOCVOLRMBLK = 0x4f08
- UBI_IOCVOLUP = 0x40084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x80045702
- WDIOC_GETPRETIMEOUT = 0x80045709
- WDIOC_GETSTATUS = 0x80045701
- WDIOC_GETSUPPORT = 0x80285700
- WDIOC_GETTEMP = 0x80045703
- WDIOC_GETTIMELEFT = 0x8004570a
- WDIOC_GETTIMEOUT = 0x80045707
- WDIOC_KEEPALIVE = 0x80045705
- WDIOC_SETOPTIONS = 0x80045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x80081270
+ BLKBSZSET = 0x40081271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80081272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FP_XSTATE_MAGIC2 = 0x46505845
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0x5
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_32BIT = 0x40
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x4000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8010743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40107446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x4010744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40107447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_ARCH_PRCTL = 0x1e
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETFPXREGS = 0x12
+ PTRACE_GET_THREAD_AREA = 0x19
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETFPXREGS = 0x13
+ PTRACE_SET_THREAD_AREA = 0x1a
+ PTRACE_SINGLEBLOCK = 0x21
+ PTRACE_SYSEMU = 0x1f
+ PTRACE_SYSEMU_SINGLESTEP = 0x20
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8008700d
+ RTC_EPOCH_SET = 0x4008700e
+ RTC_IRQP_READ = 0x8008700b
+ RTC_IRQP_SET = 0x4008700c
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x80207011
+ RTC_PLL_SET = 0x40207012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x401054d5
+ TUNDETACHFILTER = 0x401054d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x801054db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2876,23 +517,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x23)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2909,8 +542,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2918,99 +549,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index c69ddf6..d74f3c1 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -1,2879 +1,520 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && linux
// +build arm,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x80041270
- BLKBSZSET = 0x40041271
- BLKFLSBUF = 0x1261
- BLKFRAGET = 0x1265
- BLKFRASET = 0x1264
- BLKGETSIZE = 0x1260
- BLKGETSIZE64 = 0x80041272
- BLKPBSZGET = 0x127b
- BLKRAGET = 0x1263
- BLKRASET = 0x1262
- BLKROGET = 0x125e
- BLKROSET = 0x125d
- BLKRRPART = 0x125f
- BLKSECTGET = 0x1267
- BLKSECTSET = 0x1266
- BLKSSZGET = 0x1268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_MMAPABLE = 0x400
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_ARGS_SIZE_VER1 = 0x50
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_CLEAR_SIGHAND = 0x100000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0xf
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0xf
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xc
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0xd
- F_SETLK64 = 0xd
- F_SETLKW = 0xe
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_COLD = 0x14
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0x15
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x20
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0xb703
- NS_GET_OWNER_UID = 0xb704
- NS_GET_PARENT = 0xb702
- NS_GET_USERNS = 0xb701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x4000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x20000
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x8000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x404000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x2401
- PERF_EVENT_IOC_ENABLE = 0x2400
- PERF_EVENT_IOC_ID = 0x80042407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
- PERF_EVENT_IOC_PERIOD = 0x40082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
- PERF_EVENT_IOC_REFRESH = 0x2402
- PERF_EVENT_IOC_RESET = 0x2403
- PERF_EVENT_IOC_SET_BPF = 0x40042408
- PERF_EVENT_IOC_SET_FILTER = 0x40042406
- PERF_EVENT_IOC_SET_OUTPUT = 0x2405
- PIPEFS_MAGIC = 0x50495045
- PPC_CMM_MAGIC = 0xc7571590
- PPPIOCATTACH = 0x4004743d
- PPPIOCATTCHAN = 0x40047438
- PPPIOCCONNECT = 0x4004743a
- PPPIOCDETACH = 0x4004743c
- PPPIOCDISCONN = 0x7439
- PPPIOCGASYNCMAP = 0x80047458
- PPPIOCGCHAN = 0x80047437
- PPPIOCGDEBUG = 0x80047441
- PPPIOCGFLAGS = 0x8004745a
- PPPIOCGIDLE = 0x8008743f
- PPPIOCGIDLE32 = 0x8008743f
- PPPIOCGIDLE64 = 0x8010743f
- PPPIOCGL2TPSTATS = 0x80487436
- PPPIOCGMRU = 0x80047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x80047455
- PPPIOCGUNIT = 0x80047456
- PPPIOCGXASYNCMAP = 0x80207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x40087446
- PPPIOCSASYNCMAP = 0x40047457
- PPPIOCSCOMPRESS = 0x400c744d
- PPPIOCSDEBUG = 0x40047440
- PPPIOCSFLAGS = 0x40047459
- PPPIOCSMAXCID = 0x40047451
- PPPIOCSMRRU = 0x4004743b
- PPPIOCSMRU = 0x40047452
- PPPIOCSNPMODE = 0x4008744b
- PPPIOCSPASS = 0x40087447
- PPPIOCSRASYNCMAP = 0x40047454
- PPPIOCSXASYNCMAP = 0x4020744f
- PPPIOCXFERUNIT = 0x744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETCRUNCHREGS = 0x19
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFDPIC = 0x1f
- PTRACE_GETFDPIC_EXEC = 0x0
- PTRACE_GETFDPIC_INTERP = 0x1
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETHBPREGS = 0x1d
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GETVFPREGS = 0x1b
- PTRACE_GETWMMXREGS = 0x12
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x16
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETCRUNCHREGS = 0x1a
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETHBPREGS = 0x1e
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SETVFPREGS = 0x1c
- PTRACE_SETWMMXREGS = 0x13
- PTRACE_SET_SYSCALL = 0x17
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- PT_DATA_ADDR = 0x10004
- PT_TEXT_ADDR = 0x10000
- PT_TEXT_END_ADDR = 0x10008
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x40085203
- RNDADDTOENTCNT = 0x40045201
- RNDCLEARPOOL = 0x5206
- RNDGETENTCNT = 0x80045200
- RNDGETPOOL = 0x80085202
- RNDRESEEDCRNG = 0x5207
- RNDZAPENTCNT = 0x5204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x7002
- RTC_AIE_ON = 0x7001
- RTC_ALM_READ = 0x80247008
- RTC_ALM_SET = 0x40247007
- RTC_EPOCH_READ = 0x8004700d
- RTC_EPOCH_SET = 0x4004700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x8004700b
- RTC_IRQP_SET = 0x4004700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x7006
- RTC_PIE_ON = 0x7005
- RTC_PLL_GET = 0x801c7011
- RTC_PLL_SET = 0x401c7012
- RTC_RD_TIME = 0x80247009
- RTC_SET_TIME = 0x4024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x7004
- RTC_UIE_ON = 0x7003
- RTC_VL_CLR = 0x7014
- RTC_VL_READ = 0x80047013
- RTC_WIE_OFF = 0x7010
- RTC_WIE_ON = 0x700f
- RTC_WKALM_RD = 0x80287010
- RTC_WKALM_SET = 0x4028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELLINKPROP = 0x6d
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETLINKPROP = 0x6e
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWLINKPROP = 0x6c
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x18
- RTM_NR_MSGTYPES = 0x60
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x80108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x80108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x541b
- SIOCOUTQ = 0x5411
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x1000
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_ATTR_VERITY = 0x100000
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_TX_DELAY = 0x25
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x80285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGPTPEER = 0x5441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_AEAD_ALG_NAME = 0x20
- TIPC_AEAD_KEYLEN_MAX = 0x24
- TIPC_AEAD_KEYLEN_MIN = 0x14
- TIPC_AEAD_KEY_SIZE_MAX = 0x48
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODELAY = 0x8a
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x400854d5
- TUNDETACHFILTER = 0x400854d6
- TUNGETDEVNETNS = 0x54e3
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x800854db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETCARRIER = 0x400454e2
- TUNSETDEBUG = 0x400454c9
- TUNSETFILTEREBPF = 0x800454e1
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETSTEERINGEBPF = 0x800454e0
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- UBI_IOCATT = 0x40186f40
- UBI_IOCDET = 0x40046f41
- UBI_IOCEBCH = 0x40044f02
- UBI_IOCEBER = 0x40044f01
- UBI_IOCEBISMAP = 0x80044f05
- UBI_IOCEBMAP = 0x40084f03
- UBI_IOCEBUNMAP = 0x40044f04
- UBI_IOCMKVOL = 0x40986f00
- UBI_IOCRMVOL = 0x40046f01
- UBI_IOCRNVOL = 0x51106f03
- UBI_IOCRPEB = 0x40046f04
- UBI_IOCRSVOL = 0x400c6f02
- UBI_IOCSETVOLPROP = 0x40104f06
- UBI_IOCSPEB = 0x40046f05
- UBI_IOCVOLCRBLK = 0x40804f07
- UBI_IOCVOLRMBLK = 0x4f08
- UBI_IOCVOLUP = 0x40084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x80045702
- WDIOC_GETPRETIMEOUT = 0x80045709
- WDIOC_GETSTATUS = 0x80045701
- WDIOC_GETSUPPORT = 0x80285700
- WDIOC_GETTEMP = 0x80045703
- WDIOC_GETTIMELEFT = 0x8004570a
- WDIOC_GETTIMEOUT = 0x80045707
- WDIOC_KEEPALIVE = 0x80045705
- WDIOC_SETOPTIONS = 0x80045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x20
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x80041270
+ BLKBSZSET = 0x40041271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80041272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80046601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40046602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0xc
+ F_GETLK64 = 0xc
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0xd
+ F_SETLK64 = 0xd
+ F_SETLKW = 0xe
+ F_SETLKW64 = 0xe
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ NFDBITS = 0x20
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x10000
+ O_DIRECTORY = 0x4000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x20000
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x8000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x404000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80042407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40042406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8008743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40087446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x400c744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40087447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PR_SET_PTRACER_ANY = 0xffffffff
+ PTRACE_GETCRUNCHREGS = 0x19
+ PTRACE_GETFDPIC = 0x1f
+ PTRACE_GETFDPIC_EXEC = 0x0
+ PTRACE_GETFDPIC_INTERP = 0x1
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETHBPREGS = 0x1d
+ PTRACE_GETVFPREGS = 0x1b
+ PTRACE_GETWMMXREGS = 0x12
+ PTRACE_GET_THREAD_AREA = 0x16
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_SETCRUNCHREGS = 0x1a
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETHBPREGS = 0x1e
+ PTRACE_SETVFPREGS = 0x1c
+ PTRACE_SETWMMXREGS = 0x13
+ PTRACE_SET_SYSCALL = 0x17
+ PT_DATA_ADDR = 0x10004
+ PT_TEXT_ADDR = 0x10000
+ PT_TEXT_END_ADDR = 0x10008
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8004700d
+ RTC_EPOCH_SET = 0x4004700e
+ RTC_IRQP_READ = 0x8004700b
+ RTC_IRQP_SET = 0x4004700c
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x801c7011
+ RTC_PLL_SET = 0x401c7012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x400854d5
+ TUNDETACHFILTER = 0x400854d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x800854db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x20
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2882,23 +523,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x23)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2915,8 +548,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2924,99 +555,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index 4a14044..e153899 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -1,2866 +1,511 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && linux
// +build arm64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x80081270
- BLKBSZSET = 0x40081271
- BLKFLSBUF = 0x1261
- BLKFRAGET = 0x1265
- BLKFRASET = 0x1264
- BLKGETSIZE = 0x1260
- BLKGETSIZE64 = 0x80081272
- BLKPBSZGET = 0x127b
- BLKRAGET = 0x1263
- BLKRASET = 0x1262
- BLKROGET = 0x125e
- BLKROSET = 0x125d
- BLKRRPART = 0x125f
- BLKSECTGET = 0x1267
- BLKSECTSET = 0x1266
- BLKSSZGET = 0x1268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_MMAPABLE = 0x400
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_ARGS_SIZE_VER1 = 0x50
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_CLEAR_SIGHAND = 0x100000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ESR_MAGIC = 0x45535201
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- EXTRA_MAGIC = 0x45585401
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FPSIMD_MAGIC = 0x46508001
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0xf
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0xf
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0x5
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_COLD = 0x14
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0x15
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0xb703
- NS_GET_OWNER_UID = 0xb704
- NS_GET_PARENT = 0xb702
- NS_GET_USERNS = 0xb701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x10000
- O_DIRECTORY = 0x4000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x8000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x404000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x2401
- PERF_EVENT_IOC_ENABLE = 0x2400
- PERF_EVENT_IOC_ID = 0x80082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
- PERF_EVENT_IOC_PERIOD = 0x40082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x2402
- PERF_EVENT_IOC_RESET = 0x2403
- PERF_EVENT_IOC_SET_BPF = 0x40042408
- PERF_EVENT_IOC_SET_FILTER = 0x40082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x2405
- PIPEFS_MAGIC = 0x50495045
- PPC_CMM_MAGIC = 0xc7571590
- PPPIOCATTACH = 0x4004743d
- PPPIOCATTCHAN = 0x40047438
- PPPIOCCONNECT = 0x4004743a
- PPPIOCDETACH = 0x4004743c
- PPPIOCDISCONN = 0x7439
- PPPIOCGASYNCMAP = 0x80047458
- PPPIOCGCHAN = 0x80047437
- PPPIOCGDEBUG = 0x80047441
- PPPIOCGFLAGS = 0x8004745a
- PPPIOCGIDLE = 0x8010743f
- PPPIOCGIDLE32 = 0x8008743f
- PPPIOCGIDLE64 = 0x8010743f
- PPPIOCGL2TPSTATS = 0x80487436
- PPPIOCGMRU = 0x80047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x80047455
- PPPIOCGUNIT = 0x80047456
- PPPIOCGXASYNCMAP = 0x80207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x40107446
- PPPIOCSASYNCMAP = 0x40047457
- PPPIOCSCOMPRESS = 0x4010744d
- PPPIOCSDEBUG = 0x40047440
- PPPIOCSFLAGS = 0x40047459
- PPPIOCSMAXCID = 0x40047451
- PPPIOCSMRRU = 0x4004743b
- PPPIOCSMRU = 0x40047452
- PPPIOCSNPMODE = 0x4008744b
- PPPIOCSPASS = 0x40107447
- PPPIOCSRASYNCMAP = 0x40047454
- PPPIOCSXASYNCMAP = 0x4020744f
- PPPIOCXFERUNIT = 0x744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_SYSEMU = 0x1f
- PTRACE_SYSEMU_SINGLESTEP = 0x20
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x40085203
- RNDADDTOENTCNT = 0x40045201
- RNDCLEARPOOL = 0x5206
- RNDGETENTCNT = 0x80045200
- RNDGETPOOL = 0x80085202
- RNDRESEEDCRNG = 0x5207
- RNDZAPENTCNT = 0x5204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x7002
- RTC_AIE_ON = 0x7001
- RTC_ALM_READ = 0x80247008
- RTC_ALM_SET = 0x40247007
- RTC_EPOCH_READ = 0x8008700d
- RTC_EPOCH_SET = 0x4008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x8008700b
- RTC_IRQP_SET = 0x4008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x7006
- RTC_PIE_ON = 0x7005
- RTC_PLL_GET = 0x80207011
- RTC_PLL_SET = 0x40207012
- RTC_RD_TIME = 0x80247009
- RTC_SET_TIME = 0x4024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x7004
- RTC_UIE_ON = 0x7003
- RTC_VL_CLR = 0x7014
- RTC_VL_READ = 0x80047013
- RTC_WIE_OFF = 0x7010
- RTC_WIE_ON = 0x700f
- RTC_WKALM_RD = 0x80287010
- RTC_WKALM_SET = 0x4028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELLINKPROP = 0x6d
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETLINKPROP = 0x6e
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWLINKPROP = 0x6c
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x18
- RTM_NR_MSGTYPES = 0x60
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x80108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x80108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x541b
- SIOCOUTQ = 0x5411
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x1000
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_ATTR_VERITY = 0x100000
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SVE_MAGIC = 0x53564501
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_TX_DELAY = 0x25
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x80285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGPTPEER = 0x5441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_AEAD_ALG_NAME = 0x20
- TIPC_AEAD_KEYLEN_MAX = 0x24
- TIPC_AEAD_KEYLEN_MIN = 0x14
- TIPC_AEAD_KEY_SIZE_MAX = 0x48
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODELAY = 0x8a
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x401054d5
- TUNDETACHFILTER = 0x401054d6
- TUNGETDEVNETNS = 0x54e3
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x801054db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETCARRIER = 0x400454e2
- TUNSETDEBUG = 0x400454c9
- TUNSETFILTEREBPF = 0x800454e1
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETSTEERINGEBPF = 0x800454e0
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- UBI_IOCATT = 0x40186f40
- UBI_IOCDET = 0x40046f41
- UBI_IOCEBCH = 0x40044f02
- UBI_IOCEBER = 0x40044f01
- UBI_IOCEBISMAP = 0x80044f05
- UBI_IOCEBMAP = 0x40084f03
- UBI_IOCEBUNMAP = 0x40044f04
- UBI_IOCMKVOL = 0x40986f00
- UBI_IOCRMVOL = 0x40046f01
- UBI_IOCRNVOL = 0x51106f03
- UBI_IOCRPEB = 0x40046f04
- UBI_IOCRSVOL = 0x400c6f02
- UBI_IOCSETVOLPROP = 0x40104f06
- UBI_IOCSPEB = 0x40046f05
- UBI_IOCVOLCRBLK = 0x40804f07
- UBI_IOCVOLRMBLK = 0x4f08
- UBI_IOCVOLUP = 0x40084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x80045702
- WDIOC_GETPRETIMEOUT = 0x80045709
- WDIOC_GETSTATUS = 0x80045701
- WDIOC_GETSUPPORT = 0x80285700
- WDIOC_GETTEMP = 0x80045703
- WDIOC_GETTIMELEFT = 0x8004570a
- WDIOC_GETTIMEOUT = 0x80045707
- WDIOC_KEEPALIVE = 0x80045705
- WDIOC_SETOPTIONS = 0x80045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x80081270
+ BLKBSZSET = 0x40081271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80081272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ ESR_MAGIC = 0x45535201
+ EXTPROC = 0x10000
+ EXTRA_MAGIC = 0x45585401
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FPSIMD_MAGIC = 0x46508001
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0x5
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x10000
+ O_DIRECTORY = 0x4000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x8000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x404000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8010743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40107446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x4010744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40107447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PROT_BTI = 0x10
+ PROT_MTE = 0x20
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_PEEKMTETAGS = 0x21
+ PTRACE_POKEMTETAGS = 0x22
+ PTRACE_SYSEMU = 0x1f
+ PTRACE_SYSEMU_SINGLESTEP = 0x20
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8008700d
+ RTC_EPOCH_SET = 0x4008700e
+ RTC_IRQP_READ = 0x8008700b
+ RTC_IRQP_SET = 0x4008700c
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x80207011
+ RTC_PLL_SET = 0x40207012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ SVE_MAGIC = 0x53564501
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x401054d5
+ TUNDETACHFILTER = 0x401054d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x801054db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2869,23 +514,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x23)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2902,8 +539,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2911,99 +546,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index 1bbc52c..5e8e71f 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -1,2875 +1,516 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips && linux
// +build mips,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40041270
- BLKBSZSET = 0x80041271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40041272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_MMAPABLE = 0x400
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_ARGS_SIZE_VER1 = 0x50
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_CLEAR_SIGHAND = 0x100000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x80
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x2000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0xf
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0xf
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x21
- F_GETLK64 = 0x21
- F_GETOWN = 0x17
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x22
- F_SETLK64 = 0x22
- F_SETLKW = 0x23
- F_SETLKW64 = 0x23
- F_SETOWN = 0x18
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x100
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x80
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_COLD = 0x14
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0x15
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x800
- MAP_ANONYMOUS = 0x800
- MAP_DENYWRITE = 0x2000
- MAP_EXECUTABLE = 0x4000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x1000
- MAP_HUGETLB = 0x80000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x8000
- MAP_NONBLOCK = 0x20000
- MAP_NORESERVE = 0x400
- MAP_POPULATE = 0x10000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x800
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x40000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x20
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x1000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x100
- O_DIRECT = 0x8000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x10
- O_EXCL = 0x400
- O_FSYNC = 0x4010
- O_LARGEFILE = 0x2000
- O_NDELAY = 0x80
- O_NOATIME = 0x40000
- O_NOCTTY = 0x800
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x80
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x4010
- O_SYNC = 0x4010
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40042407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80042406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPC_CMM_MAGIC = 0xc7571590
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4008743f
- PPPIOCGIDLE32 = 0x4008743f
- PPPIOCGIDLE64 = 0x4010743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80087446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x800c744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80087447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_GET_THREAD_AREA_3264 = 0xc4
- PTRACE_GET_WATCH_REGS = 0xd0
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKDATA_3264 = 0xc1
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKTEXT_3264 = 0xc0
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKEDATA_3264 = 0xc3
- PTRACE_POKETEXT = 0x4
- PTRACE_POKETEXT_3264 = 0xc2
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SET_WATCH_REGS = 0xd1
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x6
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x9
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x5
- RLIMIT_NPROC = 0x8
- RLIMIT_RSS = 0x7
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4004700d
- RTC_EPOCH_SET = 0x8004700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4004700b
- RTC_IRQP_SET = 0x8004700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x401c7011
- RTC_PLL_SET = 0x801c7012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELLINKPROP = 0x6d
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETLINKPROP = 0x6e
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWLINKPROP = 0x6c
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x18
- RTM_NR_MSGTYPES = 0x60
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x80
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x40047307
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x40047309
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x467f
- SIOCOUTQ = 0x7472
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x80047308
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x1
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x80
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x2
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0xffff
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x1000
- SO_ACCEPTCONN = 0x1009
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x20
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x1029
- SO_DONTROUTE = 0x10
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x1007
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0x100
- SO_PASSCRED = 0x11
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x12
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1e
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x1028
- SO_RCVBUF = 0x1002
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x1001
- SO_SNDBUFFORCE = 0x1f
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x1005
- SO_STYLE = 0x1008
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x1008
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_ATTR_VERITY = 0x100000
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x5407
- TCGETA = 0x5401
- TCGETS = 0x540d
- TCGETS2 = 0x4030542a
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_TX_DELAY = 0x25
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x5410
- TCSBRK = 0x5405
- TCSBRKP = 0x5486
- TCSETA = 0x5402
- TCSETAF = 0x5404
- TCSETAW = 0x5403
- TCSETS = 0x540e
- TCSETS2 = 0x8030542b
- TCSETSF = 0x5410
- TCSETSF2 = 0x8030542d
- TCSETSW = 0x540f
- TCSETSW2 = 0x8030542c
- TCXONC = 0x5406
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x80047478
- TIOCEXCL = 0x740d
- TIOCGDEV = 0x40045432
- TIOCGETD = 0x7400
- TIOCGETP = 0x7408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x5492
- TIOCGISO7816 = 0x40285442
- TIOCGLCKTRMIOS = 0x548b
- TIOCGLTC = 0x7474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGPTPEER = 0x20005441
- TIOCGRS485 = 0x4020542e
- TIOCGSERIAL = 0x5484
- TIOCGSID = 0x7416
- TIOCGSOFTCAR = 0x5481
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x467f
- TIOCLINUX = 0x5483
- TIOCMBIC = 0x741c
- TIOCMBIS = 0x741b
- TIOCMGET = 0x741d
- TIOCMIWAIT = 0x5491
- TIOCMSET = 0x741a
- TIOCM_CAR = 0x100
- TIOCM_CD = 0x100
- TIOCM_CTS = 0x40
- TIOCM_DSR = 0x400
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x200
- TIOCM_RNG = 0x200
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x20
- TIOCM_ST = 0x10
- TIOCNOTTY = 0x5471
- TIOCNXCL = 0x740e
- TIOCOUTQ = 0x7472
- TIOCPKT = 0x5470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x5480
- TIOCSERCONFIG = 0x5488
- TIOCSERGETLSR = 0x548e
- TIOCSERGETMULTI = 0x548f
- TIOCSERGSTRUCT = 0x548d
- TIOCSERGWILD = 0x5489
- TIOCSERSETMULTI = 0x5490
- TIOCSERSWILD = 0x548a
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x7401
- TIOCSETN = 0x740a
- TIOCSETP = 0x7409
- TIOCSIG = 0x80045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x548c
- TIOCSLTC = 0x7475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0xc020542f
- TIOCSSERIAL = 0x5485
- TIOCSSOFTCAR = 0x5482
- TIOCSTI = 0x5472
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_AEAD_ALG_NAME = 0x20
- TIPC_AEAD_KEYLEN_MAX = 0x24
- TIPC_AEAD_KEYLEN_MIN = 0x14
- TIPC_AEAD_KEY_SIZE_MAX = 0x48
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODELAY = 0x8a
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x8000
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x800854d5
- TUNDETACHFILTER = 0x800854d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x400854db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x10
- VEOL = 0x11
- VEOL2 = 0x6
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x4
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VSWTCH = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x20
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x40041270
+ BLKBSZSET = 0x80041271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40041272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x80
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x2000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40046601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80046602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0x21
+ F_GETLK64 = 0x21
+ F_GETOWN = 0x17
+ F_RDLCK = 0x0
+ F_SETLK = 0x22
+ F_SETLK64 = 0x22
+ F_SETLKW = 0x23
+ F_SETLKW64 = 0x23
+ F_SETOWN = 0x18
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x100
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x80
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x800
+ MAP_ANONYMOUS = 0x800
+ MAP_DENYWRITE = 0x2000
+ MAP_EXECUTABLE = 0x4000
+ MAP_GROWSDOWN = 0x1000
+ MAP_HUGETLB = 0x80000
+ MAP_LOCKED = 0x8000
+ MAP_NONBLOCK = 0x20000
+ MAP_NORESERVE = 0x400
+ MAP_POPULATE = 0x10000
+ MAP_RENAME = 0x800
+ MAP_STACK = 0x40000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ NFDBITS = 0x20
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ O_APPEND = 0x8
+ O_ASYNC = 0x1000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x100
+ O_DIRECT = 0x8000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x10
+ O_EXCL = 0x400
+ O_FSYNC = 0x4010
+ O_LARGEFILE = 0x2000
+ O_NDELAY = 0x80
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x800
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x80
+ O_PATH = 0x200000
+ O_RSYNC = 0x4010
+ O_SYNC = 0x4010
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40042407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80042406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4008743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80087446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x800c744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80087447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PR_SET_PTRACER_ANY = 0xffffffff
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GET_THREAD_AREA = 0x19
+ PTRACE_GET_THREAD_AREA_3264 = 0xc4
+ PTRACE_GET_WATCH_REGS = 0xd0
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_PEEKDATA_3264 = 0xc1
+ PTRACE_PEEKTEXT_3264 = 0xc0
+ PTRACE_POKEDATA_3264 = 0xc3
+ PTRACE_POKETEXT_3264 = 0xc2
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SET_THREAD_AREA = 0x1a
+ PTRACE_SET_WATCH_REGS = 0xd1
+ RLIMIT_AS = 0x6
+ RLIMIT_MEMLOCK = 0x9
+ RLIMIT_NOFILE = 0x5
+ RLIMIT_NPROC = 0x8
+ RLIMIT_RSS = 0x7
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4004700d
+ RTC_EPOCH_SET = 0x8004700e
+ RTC_IRQP_READ = 0x4004700b
+ RTC_IRQP_SET = 0x8004700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x401c7011
+ RTC_PLL_SET = 0x801c7012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x80
+ SIOCATMARK = 0x40047307
+ SIOCGPGRP = 0x40047309
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x467f
+ SIOCOUTQ = 0x7472
+ SIOCSPGRP = 0x80047308
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x1
+ SOCK_NONBLOCK = 0x80
+ SOCK_STREAM = 0x2
+ SOL_SOCKET = 0xffff
+ SO_ACCEPTCONN = 0x1009
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x20
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x1029
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0x100
+ SO_PASSCRED = 0x11
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x12
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1e
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x1028
+ SO_RCVBUF = 0x1002
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x1001
+ SO_SNDBUFFORCE = 0x1f
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x1005
+ SO_STYLE = 0x1008
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x1008
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x5407
+ TCGETA = 0x5401
+ TCGETS = 0x540d
+ TCGETS2 = 0x4030542a
+ TCSAFLUSH = 0x5410
+ TCSBRK = 0x5405
+ TCSBRKP = 0x5486
+ TCSETA = 0x5402
+ TCSETAF = 0x5404
+ TCSETAW = 0x5403
+ TCSETS = 0x540e
+ TCSETS2 = 0x8030542b
+ TCSETSF = 0x5410
+ TCSETSF2 = 0x8030542d
+ TCSETSW = 0x540f
+ TCSETSW2 = 0x8030542c
+ TCXONC = 0x5406
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x80
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x80047478
+ TIOCEXCL = 0x740d
+ TIOCGDEV = 0x40045432
+ TIOCGETD = 0x7400
+ TIOCGETP = 0x7408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x5492
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x548b
+ TIOCGLTC = 0x7474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x4020542e
+ TIOCGSERIAL = 0x5484
+ TIOCGSID = 0x7416
+ TIOCGSOFTCAR = 0x5481
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x467f
+ TIOCLINUX = 0x5483
+ TIOCMBIC = 0x741c
+ TIOCMBIS = 0x741b
+ TIOCMGET = 0x741d
+ TIOCMIWAIT = 0x5491
+ TIOCMSET = 0x741a
+ TIOCM_CAR = 0x100
+ TIOCM_CD = 0x100
+ TIOCM_CTS = 0x40
+ TIOCM_DSR = 0x400
+ TIOCM_RI = 0x200
+ TIOCM_RNG = 0x200
+ TIOCM_SR = 0x20
+ TIOCM_ST = 0x10
+ TIOCNOTTY = 0x5471
+ TIOCNXCL = 0x740e
+ TIOCOUTQ = 0x7472
+ TIOCPKT = 0x5470
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x5480
+ TIOCSERCONFIG = 0x5488
+ TIOCSERGETLSR = 0x548e
+ TIOCSERGETMULTI = 0x548f
+ TIOCSERGSTRUCT = 0x548d
+ TIOCSERGWILD = 0x5489
+ TIOCSERSETMULTI = 0x5490
+ TIOCSERSWILD = 0x548a
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x7401
+ TIOCSETN = 0x740a
+ TIOCSETP = 0x7409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x548c
+ TIOCSLTC = 0x7475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0xc020542f
+ TIOCSSERIAL = 0x5485
+ TIOCSSOFTCAR = 0x5482
+ TIOCSTI = 0x5472
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x8000
+ TUNATTACHFILTER = 0x800854d5
+ TUNDETACHFILTER = 0x800854d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x400854db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0xd
+ VEOF = 0x10
+ VEOL = 0x11
+ VEOL2 = 0x6
+ VMIN = 0x4
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VSWTCH = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x20
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x7d)
EADDRNOTAVAIL = syscall.Errno(0x7e)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x7c)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x95)
EBADE = syscall.Errno(0x32)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x51)
EBADMSG = syscall.Errno(0x4d)
EBADR = syscall.Errno(0x33)
EBADRQC = syscall.Errno(0x36)
EBADSLT = syscall.Errno(0x37)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x9e)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x25)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x82)
@@ -2878,12 +519,8 @@ const (
EDEADLK = syscall.Errno(0x2d)
EDEADLOCK = syscall.Errno(0x38)
EDESTADDRREQ = syscall.Errno(0x60)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x46d)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x93)
EHOSTUNREACH = syscall.Errno(0x94)
EHWPOISON = syscall.Errno(0xa8)
@@ -2891,11 +528,7 @@ const (
EILSEQ = syscall.Errno(0x58)
EINIT = syscall.Errno(0x8d)
EINPROGRESS = syscall.Errno(0x96)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x85)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x8b)
EKEYEXPIRED = syscall.Errno(0xa2)
EKEYREJECTED = syscall.Errno(0xa4)
@@ -2912,8 +545,6 @@ const (
ELNRNG = syscall.Errno(0x29)
ELOOP = syscall.Errno(0x5a)
EMEDIUMTYPE = syscall.Errno(0xa0)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x61)
EMULTIHOP = syscall.Errno(0x4a)
ENAMETOOLONG = syscall.Errno(0x4e)
@@ -2921,100 +552,68 @@ const (
ENETDOWN = syscall.Errno(0x7f)
ENETRESET = syscall.Errno(0x81)
ENETUNREACH = syscall.Errno(0x80)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x35)
ENOBUFS = syscall.Errno(0x84)
ENOCSI = syscall.Errno(0x2b)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0xa1)
ENOLCK = syscall.Errno(0x2e)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x9f)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x23)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x63)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x59)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x86)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x5d)
ENOTNAM = syscall.Errno(0x89)
ENOTRECOVERABLE = syscall.Errno(0xa6)
ENOTSOCK = syscall.Errno(0x5f)
ENOTSUP = syscall.Errno(0x7a)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x50)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x7a)
EOVERFLOW = syscall.Errno(0x4f)
EOWNERDEAD = syscall.Errno(0xa5)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x7b)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x78)
EPROTOTYPE = syscall.Errno(0x62)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x52)
EREMDEV = syscall.Errno(0x8e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x8c)
ERESTART = syscall.Errno(0x5b)
ERFKILL = syscall.Errno(0xa7)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x8f)
ESOCKTNOSUPPORT = syscall.Errno(0x79)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x97)
ESTRPIPE = syscall.Errno(0x5c)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x91)
ETOOMANYREFS = syscall.Errno(0x90)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x87)
EUNATCH = syscall.Errno(0x2a)
EUSERS = syscall.Errno(0x5e)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x34)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0xa)
SIGCHLD = syscall.Signal(0x12)
SIGCLD = syscall.Signal(0x12)
SIGCONT = syscall.Signal(0x19)
SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x16)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x16)
SIGPROF = syscall.Signal(0x1d)
SIGPWR = syscall.Signal(0x13)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTOP = syscall.Signal(0x17)
SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x18)
SIGTTIN = syscall.Signal(0x1a)
SIGTTOU = syscall.Signal(0x1b)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index 2b339ef..e670ee1 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -1,2875 +1,516 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips64 && linux
// +build mips64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40081270
- BLKBSZSET = 0x80081271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40081272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_MMAPABLE = 0x400
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_ARGS_SIZE_VER1 = 0x50
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_CLEAR_SIGHAND = 0x100000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x80
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x2000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0xf
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0xf
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xe
- F_GETLK64 = 0xe
- F_GETOWN = 0x17
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x18
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x100
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x80
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_COLD = 0x14
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0x15
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x800
- MAP_ANONYMOUS = 0x800
- MAP_DENYWRITE = 0x2000
- MAP_EXECUTABLE = 0x4000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x1000
- MAP_HUGETLB = 0x80000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x8000
- MAP_NONBLOCK = 0x20000
- MAP_NORESERVE = 0x400
- MAP_POPULATE = 0x10000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x800
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x40000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x1000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x100
- O_DIRECT = 0x8000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x10
- O_EXCL = 0x400
- O_FSYNC = 0x4010
- O_LARGEFILE = 0x0
- O_NDELAY = 0x80
- O_NOATIME = 0x40000
- O_NOCTTY = 0x800
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x80
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x4010
- O_SYNC = 0x4010
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPC_CMM_MAGIC = 0xc7571590
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4010743f
- PPPIOCGIDLE32 = 0x4008743f
- PPPIOCGIDLE64 = 0x4010743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80107446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x8010744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80107447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_GET_THREAD_AREA_3264 = 0xc4
- PTRACE_GET_WATCH_REGS = 0xd0
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKDATA_3264 = 0xc1
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKTEXT_3264 = 0xc0
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKEDATA_3264 = 0xc3
- PTRACE_POKETEXT = 0x4
- PTRACE_POKETEXT_3264 = 0xc2
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SET_WATCH_REGS = 0xd1
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x6
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x9
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x5
- RLIMIT_NPROC = 0x8
- RLIMIT_RSS = 0x7
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4008700d
- RTC_EPOCH_SET = 0x8008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4008700b
- RTC_IRQP_SET = 0x8008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x40207011
- RTC_PLL_SET = 0x80207012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELLINKPROP = 0x6d
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETLINKPROP = 0x6e
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWLINKPROP = 0x6c
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x18
- RTM_NR_MSGTYPES = 0x60
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x80
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x40047307
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x40047309
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x467f
- SIOCOUTQ = 0x7472
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x80047308
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x1
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x80
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x2
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0xffff
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x1000
- SO_ACCEPTCONN = 0x1009
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x20
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x1029
- SO_DONTROUTE = 0x10
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x1007
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0x100
- SO_PASSCRED = 0x11
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x12
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1e
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x1028
- SO_RCVBUF = 0x1002
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x1001
- SO_SNDBUFFORCE = 0x1f
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x1005
- SO_STYLE = 0x1008
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x1008
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_ATTR_VERITY = 0x100000
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x5407
- TCGETA = 0x5401
- TCGETS = 0x540d
- TCGETS2 = 0x4030542a
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_TX_DELAY = 0x25
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x5410
- TCSBRK = 0x5405
- TCSBRKP = 0x5486
- TCSETA = 0x5402
- TCSETAF = 0x5404
- TCSETAW = 0x5403
- TCSETS = 0x540e
- TCSETS2 = 0x8030542b
- TCSETSF = 0x5410
- TCSETSF2 = 0x8030542d
- TCSETSW = 0x540f
- TCSETSW2 = 0x8030542c
- TCXONC = 0x5406
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x80047478
- TIOCEXCL = 0x740d
- TIOCGDEV = 0x40045432
- TIOCGETD = 0x7400
- TIOCGETP = 0x7408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x5492
- TIOCGISO7816 = 0x40285442
- TIOCGLCKTRMIOS = 0x548b
- TIOCGLTC = 0x7474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGPTPEER = 0x20005441
- TIOCGRS485 = 0x4020542e
- TIOCGSERIAL = 0x5484
- TIOCGSID = 0x7416
- TIOCGSOFTCAR = 0x5481
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x467f
- TIOCLINUX = 0x5483
- TIOCMBIC = 0x741c
- TIOCMBIS = 0x741b
- TIOCMGET = 0x741d
- TIOCMIWAIT = 0x5491
- TIOCMSET = 0x741a
- TIOCM_CAR = 0x100
- TIOCM_CD = 0x100
- TIOCM_CTS = 0x40
- TIOCM_DSR = 0x400
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x200
- TIOCM_RNG = 0x200
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x20
- TIOCM_ST = 0x10
- TIOCNOTTY = 0x5471
- TIOCNXCL = 0x740e
- TIOCOUTQ = 0x7472
- TIOCPKT = 0x5470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x5480
- TIOCSERCONFIG = 0x5488
- TIOCSERGETLSR = 0x548e
- TIOCSERGETMULTI = 0x548f
- TIOCSERGSTRUCT = 0x548d
- TIOCSERGWILD = 0x5489
- TIOCSERSETMULTI = 0x5490
- TIOCSERSWILD = 0x548a
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x7401
- TIOCSETN = 0x740a
- TIOCSETP = 0x7409
- TIOCSIG = 0x80045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x548c
- TIOCSLTC = 0x7475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0xc020542f
- TIOCSSERIAL = 0x5485
- TIOCSSOFTCAR = 0x5482
- TIOCSTI = 0x5472
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_AEAD_ALG_NAME = 0x20
- TIPC_AEAD_KEYLEN_MAX = 0x24
- TIPC_AEAD_KEYLEN_MIN = 0x14
- TIPC_AEAD_KEY_SIZE_MAX = 0x48
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODELAY = 0x8a
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x8000
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x10
- VEOL = 0x11
- VEOL2 = 0x6
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x4
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VSWTCH = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x40081270
+ BLKBSZSET = 0x80081271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40081272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x80
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x2000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0xe
+ F_GETLK64 = 0xe
+ F_GETOWN = 0x17
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x18
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x100
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x80
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x800
+ MAP_ANONYMOUS = 0x800
+ MAP_DENYWRITE = 0x2000
+ MAP_EXECUTABLE = 0x4000
+ MAP_GROWSDOWN = 0x1000
+ MAP_HUGETLB = 0x80000
+ MAP_LOCKED = 0x8000
+ MAP_NONBLOCK = 0x20000
+ MAP_NORESERVE = 0x400
+ MAP_POPULATE = 0x10000
+ MAP_RENAME = 0x800
+ MAP_STACK = 0x40000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ O_APPEND = 0x8
+ O_ASYNC = 0x1000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x100
+ O_DIRECT = 0x8000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x10
+ O_EXCL = 0x400
+ O_FSYNC = 0x4010
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x80
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x800
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x80
+ O_PATH = 0x200000
+ O_RSYNC = 0x4010
+ O_SYNC = 0x4010
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4010743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80107446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x8010744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80107447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GET_THREAD_AREA = 0x19
+ PTRACE_GET_THREAD_AREA_3264 = 0xc4
+ PTRACE_GET_WATCH_REGS = 0xd0
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_PEEKDATA_3264 = 0xc1
+ PTRACE_PEEKTEXT_3264 = 0xc0
+ PTRACE_POKEDATA_3264 = 0xc3
+ PTRACE_POKETEXT_3264 = 0xc2
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SET_THREAD_AREA = 0x1a
+ PTRACE_SET_WATCH_REGS = 0xd1
+ RLIMIT_AS = 0x6
+ RLIMIT_MEMLOCK = 0x9
+ RLIMIT_NOFILE = 0x5
+ RLIMIT_NPROC = 0x8
+ RLIMIT_RSS = 0x7
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4008700d
+ RTC_EPOCH_SET = 0x8008700e
+ RTC_IRQP_READ = 0x4008700b
+ RTC_IRQP_SET = 0x8008700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x40207011
+ RTC_PLL_SET = 0x80207012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x80
+ SIOCATMARK = 0x40047307
+ SIOCGPGRP = 0x40047309
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x467f
+ SIOCOUTQ = 0x7472
+ SIOCSPGRP = 0x80047308
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x1
+ SOCK_NONBLOCK = 0x80
+ SOCK_STREAM = 0x2
+ SOL_SOCKET = 0xffff
+ SO_ACCEPTCONN = 0x1009
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x20
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x1029
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0x100
+ SO_PASSCRED = 0x11
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x12
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1e
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x1028
+ SO_RCVBUF = 0x1002
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x1001
+ SO_SNDBUFFORCE = 0x1f
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x1005
+ SO_STYLE = 0x1008
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x1008
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x5407
+ TCGETA = 0x5401
+ TCGETS = 0x540d
+ TCGETS2 = 0x4030542a
+ TCSAFLUSH = 0x5410
+ TCSBRK = 0x5405
+ TCSBRKP = 0x5486
+ TCSETA = 0x5402
+ TCSETAF = 0x5404
+ TCSETAW = 0x5403
+ TCSETS = 0x540e
+ TCSETS2 = 0x8030542b
+ TCSETSF = 0x5410
+ TCSETSF2 = 0x8030542d
+ TCSETSW = 0x540f
+ TCSETSW2 = 0x8030542c
+ TCXONC = 0x5406
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x80
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x80047478
+ TIOCEXCL = 0x740d
+ TIOCGDEV = 0x40045432
+ TIOCGETD = 0x7400
+ TIOCGETP = 0x7408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x5492
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x548b
+ TIOCGLTC = 0x7474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x4020542e
+ TIOCGSERIAL = 0x5484
+ TIOCGSID = 0x7416
+ TIOCGSOFTCAR = 0x5481
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x467f
+ TIOCLINUX = 0x5483
+ TIOCMBIC = 0x741c
+ TIOCMBIS = 0x741b
+ TIOCMGET = 0x741d
+ TIOCMIWAIT = 0x5491
+ TIOCMSET = 0x741a
+ TIOCM_CAR = 0x100
+ TIOCM_CD = 0x100
+ TIOCM_CTS = 0x40
+ TIOCM_DSR = 0x400
+ TIOCM_RI = 0x200
+ TIOCM_RNG = 0x200
+ TIOCM_SR = 0x20
+ TIOCM_ST = 0x10
+ TIOCNOTTY = 0x5471
+ TIOCNXCL = 0x740e
+ TIOCOUTQ = 0x7472
+ TIOCPKT = 0x5470
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x5480
+ TIOCSERCONFIG = 0x5488
+ TIOCSERGETLSR = 0x548e
+ TIOCSERGETMULTI = 0x548f
+ TIOCSERGSTRUCT = 0x548d
+ TIOCSERGWILD = 0x5489
+ TIOCSERSETMULTI = 0x5490
+ TIOCSERSWILD = 0x548a
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x7401
+ TIOCSETN = 0x740a
+ TIOCSETP = 0x7409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x548c
+ TIOCSLTC = 0x7475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0xc020542f
+ TIOCSSERIAL = 0x5485
+ TIOCSSOFTCAR = 0x5482
+ TIOCSTI = 0x5472
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x8000
+ TUNATTACHFILTER = 0x801054d5
+ TUNDETACHFILTER = 0x801054d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x401054db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0xd
+ VEOF = 0x10
+ VEOL = 0x11
+ VEOL2 = 0x6
+ VMIN = 0x4
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VSWTCH = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x7d)
EADDRNOTAVAIL = syscall.Errno(0x7e)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x7c)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x95)
EBADE = syscall.Errno(0x32)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x51)
EBADMSG = syscall.Errno(0x4d)
EBADR = syscall.Errno(0x33)
EBADRQC = syscall.Errno(0x36)
EBADSLT = syscall.Errno(0x37)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x9e)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x25)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x82)
@@ -2878,12 +519,8 @@ const (
EDEADLK = syscall.Errno(0x2d)
EDEADLOCK = syscall.Errno(0x38)
EDESTADDRREQ = syscall.Errno(0x60)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x46d)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x93)
EHOSTUNREACH = syscall.Errno(0x94)
EHWPOISON = syscall.Errno(0xa8)
@@ -2891,11 +528,7 @@ const (
EILSEQ = syscall.Errno(0x58)
EINIT = syscall.Errno(0x8d)
EINPROGRESS = syscall.Errno(0x96)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x85)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x8b)
EKEYEXPIRED = syscall.Errno(0xa2)
EKEYREJECTED = syscall.Errno(0xa4)
@@ -2912,8 +545,6 @@ const (
ELNRNG = syscall.Errno(0x29)
ELOOP = syscall.Errno(0x5a)
EMEDIUMTYPE = syscall.Errno(0xa0)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x61)
EMULTIHOP = syscall.Errno(0x4a)
ENAMETOOLONG = syscall.Errno(0x4e)
@@ -2921,100 +552,68 @@ const (
ENETDOWN = syscall.Errno(0x7f)
ENETRESET = syscall.Errno(0x81)
ENETUNREACH = syscall.Errno(0x80)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x35)
ENOBUFS = syscall.Errno(0x84)
ENOCSI = syscall.Errno(0x2b)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0xa1)
ENOLCK = syscall.Errno(0x2e)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x9f)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x23)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x63)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x59)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x86)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x5d)
ENOTNAM = syscall.Errno(0x89)
ENOTRECOVERABLE = syscall.Errno(0xa6)
ENOTSOCK = syscall.Errno(0x5f)
ENOTSUP = syscall.Errno(0x7a)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x50)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x7a)
EOVERFLOW = syscall.Errno(0x4f)
EOWNERDEAD = syscall.Errno(0xa5)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x7b)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x78)
EPROTOTYPE = syscall.Errno(0x62)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x52)
EREMDEV = syscall.Errno(0x8e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x8c)
ERESTART = syscall.Errno(0x5b)
ERFKILL = syscall.Errno(0xa7)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x8f)
ESOCKTNOSUPPORT = syscall.Errno(0x79)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x97)
ESTRPIPE = syscall.Errno(0x5c)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x91)
ETOOMANYREFS = syscall.Errno(0x90)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x87)
EUNATCH = syscall.Errno(0x2a)
EUSERS = syscall.Errno(0x5e)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x34)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0xa)
SIGCHLD = syscall.Signal(0x12)
SIGCLD = syscall.Signal(0x12)
SIGCONT = syscall.Signal(0x19)
SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x16)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x16)
SIGPROF = syscall.Signal(0x1d)
SIGPWR = syscall.Signal(0x13)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTOP = syscall.Signal(0x17)
SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x18)
SIGTTIN = syscall.Signal(0x1a)
SIGTTOU = syscall.Signal(0x1b)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index 1c697f3..dd11eac 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -1,2875 +1,516 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips64le && linux
// +build mips64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40081270
- BLKBSZSET = 0x80081271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40081272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_MMAPABLE = 0x400
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_ARGS_SIZE_VER1 = 0x50
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_CLEAR_SIGHAND = 0x100000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x80
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x2000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0xf
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0xf
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0xe
- F_GETLK64 = 0xe
- F_GETOWN = 0x17
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x18
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x100
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x80
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_COLD = 0x14
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0x15
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x800
- MAP_ANONYMOUS = 0x800
- MAP_DENYWRITE = 0x2000
- MAP_EXECUTABLE = 0x4000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x1000
- MAP_HUGETLB = 0x80000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x8000
- MAP_NONBLOCK = 0x20000
- MAP_NORESERVE = 0x400
- MAP_POPULATE = 0x10000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x800
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x40000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x1000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x100
- O_DIRECT = 0x8000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x10
- O_EXCL = 0x400
- O_FSYNC = 0x4010
- O_LARGEFILE = 0x0
- O_NDELAY = 0x80
- O_NOATIME = 0x40000
- O_NOCTTY = 0x800
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x80
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x4010
- O_SYNC = 0x4010
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPC_CMM_MAGIC = 0xc7571590
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4010743f
- PPPIOCGIDLE32 = 0x4008743f
- PPPIOCGIDLE64 = 0x4010743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80107446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x8010744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80107447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_GET_THREAD_AREA_3264 = 0xc4
- PTRACE_GET_WATCH_REGS = 0xd0
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKDATA_3264 = 0xc1
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKTEXT_3264 = 0xc0
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKEDATA_3264 = 0xc3
- PTRACE_POKETEXT = 0x4
- PTRACE_POKETEXT_3264 = 0xc2
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SET_WATCH_REGS = 0xd1
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x6
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x9
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x5
- RLIMIT_NPROC = 0x8
- RLIMIT_RSS = 0x7
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4008700d
- RTC_EPOCH_SET = 0x8008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4008700b
- RTC_IRQP_SET = 0x8008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x40207011
- RTC_PLL_SET = 0x80207012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELLINKPROP = 0x6d
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETLINKPROP = 0x6e
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWLINKPROP = 0x6c
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x18
- RTM_NR_MSGTYPES = 0x60
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x80
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x40047307
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x40047309
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x467f
- SIOCOUTQ = 0x7472
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x80047308
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x1
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x80
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x2
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0xffff
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x1000
- SO_ACCEPTCONN = 0x1009
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x20
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x1029
- SO_DONTROUTE = 0x10
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x1007
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0x100
- SO_PASSCRED = 0x11
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x12
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1e
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x1028
- SO_RCVBUF = 0x1002
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x1001
- SO_SNDBUFFORCE = 0x1f
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x1005
- SO_STYLE = 0x1008
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x1008
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_ATTR_VERITY = 0x100000
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x5407
- TCGETA = 0x5401
- TCGETS = 0x540d
- TCGETS2 = 0x4030542a
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_TX_DELAY = 0x25
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x5410
- TCSBRK = 0x5405
- TCSBRKP = 0x5486
- TCSETA = 0x5402
- TCSETAF = 0x5404
- TCSETAW = 0x5403
- TCSETS = 0x540e
- TCSETS2 = 0x8030542b
- TCSETSF = 0x5410
- TCSETSF2 = 0x8030542d
- TCSETSW = 0x540f
- TCSETSW2 = 0x8030542c
- TCXONC = 0x5406
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x80047478
- TIOCEXCL = 0x740d
- TIOCGDEV = 0x40045432
- TIOCGETD = 0x7400
- TIOCGETP = 0x7408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x5492
- TIOCGISO7816 = 0x40285442
- TIOCGLCKTRMIOS = 0x548b
- TIOCGLTC = 0x7474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGPTPEER = 0x20005441
- TIOCGRS485 = 0x4020542e
- TIOCGSERIAL = 0x5484
- TIOCGSID = 0x7416
- TIOCGSOFTCAR = 0x5481
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x467f
- TIOCLINUX = 0x5483
- TIOCMBIC = 0x741c
- TIOCMBIS = 0x741b
- TIOCMGET = 0x741d
- TIOCMIWAIT = 0x5491
- TIOCMSET = 0x741a
- TIOCM_CAR = 0x100
- TIOCM_CD = 0x100
- TIOCM_CTS = 0x40
- TIOCM_DSR = 0x400
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x200
- TIOCM_RNG = 0x200
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x20
- TIOCM_ST = 0x10
- TIOCNOTTY = 0x5471
- TIOCNXCL = 0x740e
- TIOCOUTQ = 0x7472
- TIOCPKT = 0x5470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x5480
- TIOCSERCONFIG = 0x5488
- TIOCSERGETLSR = 0x548e
- TIOCSERGETMULTI = 0x548f
- TIOCSERGSTRUCT = 0x548d
- TIOCSERGWILD = 0x5489
- TIOCSERSETMULTI = 0x5490
- TIOCSERSWILD = 0x548a
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x7401
- TIOCSETN = 0x740a
- TIOCSETP = 0x7409
- TIOCSIG = 0x80045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x548c
- TIOCSLTC = 0x7475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0xc020542f
- TIOCSSERIAL = 0x5485
- TIOCSSOFTCAR = 0x5482
- TIOCSTI = 0x5472
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_AEAD_ALG_NAME = 0x20
- TIPC_AEAD_KEYLEN_MAX = 0x24
- TIPC_AEAD_KEYLEN_MIN = 0x14
- TIPC_AEAD_KEY_SIZE_MAX = 0x48
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODELAY = 0x8a
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x8000
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x10
- VEOL = 0x11
- VEOL2 = 0x6
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x4
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VSWTCH = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x40081270
+ BLKBSZSET = 0x80081271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40081272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x80
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x2000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0xe
+ F_GETLK64 = 0xe
+ F_GETOWN = 0x17
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x18
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x100
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x80
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x800
+ MAP_ANONYMOUS = 0x800
+ MAP_DENYWRITE = 0x2000
+ MAP_EXECUTABLE = 0x4000
+ MAP_GROWSDOWN = 0x1000
+ MAP_HUGETLB = 0x80000
+ MAP_LOCKED = 0x8000
+ MAP_NONBLOCK = 0x20000
+ MAP_NORESERVE = 0x400
+ MAP_POPULATE = 0x10000
+ MAP_RENAME = 0x800
+ MAP_STACK = 0x40000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ O_APPEND = 0x8
+ O_ASYNC = 0x1000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x100
+ O_DIRECT = 0x8000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x10
+ O_EXCL = 0x400
+ O_FSYNC = 0x4010
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x80
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x800
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x80
+ O_PATH = 0x200000
+ O_RSYNC = 0x4010
+ O_SYNC = 0x4010
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4010743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80107446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x8010744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80107447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GET_THREAD_AREA = 0x19
+ PTRACE_GET_THREAD_AREA_3264 = 0xc4
+ PTRACE_GET_WATCH_REGS = 0xd0
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_PEEKDATA_3264 = 0xc1
+ PTRACE_PEEKTEXT_3264 = 0xc0
+ PTRACE_POKEDATA_3264 = 0xc3
+ PTRACE_POKETEXT_3264 = 0xc2
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SET_THREAD_AREA = 0x1a
+ PTRACE_SET_WATCH_REGS = 0xd1
+ RLIMIT_AS = 0x6
+ RLIMIT_MEMLOCK = 0x9
+ RLIMIT_NOFILE = 0x5
+ RLIMIT_NPROC = 0x8
+ RLIMIT_RSS = 0x7
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4008700d
+ RTC_EPOCH_SET = 0x8008700e
+ RTC_IRQP_READ = 0x4008700b
+ RTC_IRQP_SET = 0x8008700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x40207011
+ RTC_PLL_SET = 0x80207012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x80
+ SIOCATMARK = 0x40047307
+ SIOCGPGRP = 0x40047309
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x467f
+ SIOCOUTQ = 0x7472
+ SIOCSPGRP = 0x80047308
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x1
+ SOCK_NONBLOCK = 0x80
+ SOCK_STREAM = 0x2
+ SOL_SOCKET = 0xffff
+ SO_ACCEPTCONN = 0x1009
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x20
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x1029
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0x100
+ SO_PASSCRED = 0x11
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x12
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1e
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x1028
+ SO_RCVBUF = 0x1002
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x1001
+ SO_SNDBUFFORCE = 0x1f
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x1005
+ SO_STYLE = 0x1008
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x1008
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x5407
+ TCGETA = 0x5401
+ TCGETS = 0x540d
+ TCGETS2 = 0x4030542a
+ TCSAFLUSH = 0x5410
+ TCSBRK = 0x5405
+ TCSBRKP = 0x5486
+ TCSETA = 0x5402
+ TCSETAF = 0x5404
+ TCSETAW = 0x5403
+ TCSETS = 0x540e
+ TCSETS2 = 0x8030542b
+ TCSETSF = 0x5410
+ TCSETSF2 = 0x8030542d
+ TCSETSW = 0x540f
+ TCSETSW2 = 0x8030542c
+ TCXONC = 0x5406
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x80
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x80047478
+ TIOCEXCL = 0x740d
+ TIOCGDEV = 0x40045432
+ TIOCGETD = 0x7400
+ TIOCGETP = 0x7408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x5492
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x548b
+ TIOCGLTC = 0x7474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x4020542e
+ TIOCGSERIAL = 0x5484
+ TIOCGSID = 0x7416
+ TIOCGSOFTCAR = 0x5481
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x467f
+ TIOCLINUX = 0x5483
+ TIOCMBIC = 0x741c
+ TIOCMBIS = 0x741b
+ TIOCMGET = 0x741d
+ TIOCMIWAIT = 0x5491
+ TIOCMSET = 0x741a
+ TIOCM_CAR = 0x100
+ TIOCM_CD = 0x100
+ TIOCM_CTS = 0x40
+ TIOCM_DSR = 0x400
+ TIOCM_RI = 0x200
+ TIOCM_RNG = 0x200
+ TIOCM_SR = 0x20
+ TIOCM_ST = 0x10
+ TIOCNOTTY = 0x5471
+ TIOCNXCL = 0x740e
+ TIOCOUTQ = 0x7472
+ TIOCPKT = 0x5470
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x5480
+ TIOCSERCONFIG = 0x5488
+ TIOCSERGETLSR = 0x548e
+ TIOCSERGETMULTI = 0x548f
+ TIOCSERGSTRUCT = 0x548d
+ TIOCSERGWILD = 0x5489
+ TIOCSERSETMULTI = 0x5490
+ TIOCSERSWILD = 0x548a
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x7401
+ TIOCSETN = 0x740a
+ TIOCSETP = 0x7409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x548c
+ TIOCSLTC = 0x7475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0xc020542f
+ TIOCSSERIAL = 0x5485
+ TIOCSSOFTCAR = 0x5482
+ TIOCSTI = 0x5472
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x8000
+ TUNATTACHFILTER = 0x801054d5
+ TUNDETACHFILTER = 0x801054d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x401054db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0xd
+ VEOF = 0x10
+ VEOL = 0x11
+ VEOL2 = 0x6
+ VMIN = 0x4
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VSWTCH = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x7d)
EADDRNOTAVAIL = syscall.Errno(0x7e)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x7c)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x95)
EBADE = syscall.Errno(0x32)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x51)
EBADMSG = syscall.Errno(0x4d)
EBADR = syscall.Errno(0x33)
EBADRQC = syscall.Errno(0x36)
EBADSLT = syscall.Errno(0x37)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x9e)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x25)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x82)
@@ -2878,12 +519,8 @@ const (
EDEADLK = syscall.Errno(0x2d)
EDEADLOCK = syscall.Errno(0x38)
EDESTADDRREQ = syscall.Errno(0x60)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x46d)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x93)
EHOSTUNREACH = syscall.Errno(0x94)
EHWPOISON = syscall.Errno(0xa8)
@@ -2891,11 +528,7 @@ const (
EILSEQ = syscall.Errno(0x58)
EINIT = syscall.Errno(0x8d)
EINPROGRESS = syscall.Errno(0x96)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x85)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x8b)
EKEYEXPIRED = syscall.Errno(0xa2)
EKEYREJECTED = syscall.Errno(0xa4)
@@ -2912,8 +545,6 @@ const (
ELNRNG = syscall.Errno(0x29)
ELOOP = syscall.Errno(0x5a)
EMEDIUMTYPE = syscall.Errno(0xa0)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x61)
EMULTIHOP = syscall.Errno(0x4a)
ENAMETOOLONG = syscall.Errno(0x4e)
@@ -2921,100 +552,68 @@ const (
ENETDOWN = syscall.Errno(0x7f)
ENETRESET = syscall.Errno(0x81)
ENETUNREACH = syscall.Errno(0x80)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x35)
ENOBUFS = syscall.Errno(0x84)
ENOCSI = syscall.Errno(0x2b)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0xa1)
ENOLCK = syscall.Errno(0x2e)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x9f)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x23)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x63)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x59)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x86)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x5d)
ENOTNAM = syscall.Errno(0x89)
ENOTRECOVERABLE = syscall.Errno(0xa6)
ENOTSOCK = syscall.Errno(0x5f)
ENOTSUP = syscall.Errno(0x7a)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x50)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x7a)
EOVERFLOW = syscall.Errno(0x4f)
EOWNERDEAD = syscall.Errno(0xa5)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x7b)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x78)
EPROTOTYPE = syscall.Errno(0x62)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x52)
EREMDEV = syscall.Errno(0x8e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x8c)
ERESTART = syscall.Errno(0x5b)
ERFKILL = syscall.Errno(0xa7)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x8f)
ESOCKTNOSUPPORT = syscall.Errno(0x79)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x97)
ESTRPIPE = syscall.Errno(0x5c)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x91)
ETOOMANYREFS = syscall.Errno(0x90)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x87)
EUNATCH = syscall.Errno(0x2a)
EUSERS = syscall.Errno(0x5e)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x34)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0xa)
SIGCHLD = syscall.Signal(0x12)
SIGCLD = syscall.Signal(0x12)
SIGCONT = syscall.Signal(0x19)
SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x16)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x16)
SIGPROF = syscall.Signal(0x1d)
SIGPWR = syscall.Signal(0x13)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTOP = syscall.Signal(0x17)
SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x18)
SIGTTIN = syscall.Signal(0x1a)
SIGTTOU = syscall.Signal(0x1b)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index 264898c..a0a5b22 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -1,2875 +1,516 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mipsle && linux
// +build mipsle,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40041270
- BLKBSZSET = 0x80041271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40041272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_MMAPABLE = 0x400
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_ARGS_SIZE_VER1 = 0x50
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_CLEAR_SIGHAND = 0x100000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x80
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x2000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0xf
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0xf
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x21
- F_GETLK64 = 0x21
- F_GETOWN = 0x17
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x22
- F_SETLK64 = 0x22
- F_SETLKW = 0x23
- F_SETLKW64 = 0x23
- F_SETOWN = 0x18
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x100
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x80
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_COLD = 0x14
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0x15
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x800
- MAP_ANONYMOUS = 0x800
- MAP_DENYWRITE = 0x2000
- MAP_EXECUTABLE = 0x4000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x1000
- MAP_HUGETLB = 0x80000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x8000
- MAP_NONBLOCK = 0x20000
- MAP_NORESERVE = 0x400
- MAP_POPULATE = 0x10000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x800
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x40000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x20
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x1000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x100
- O_DIRECT = 0x8000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x10
- O_EXCL = 0x400
- O_FSYNC = 0x4010
- O_LARGEFILE = 0x2000
- O_NDELAY = 0x80
- O_NOATIME = 0x40000
- O_NOCTTY = 0x800
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x80
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x4010
- O_SYNC = 0x4010
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40042407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80042406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPC_CMM_MAGIC = 0xc7571590
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4008743f
- PPPIOCGIDLE32 = 0x4008743f
- PPPIOCGIDLE64 = 0x4010743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80087446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x800c744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80087447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_GET_THREAD_AREA = 0x19
- PTRACE_GET_THREAD_AREA_3264 = 0xc4
- PTRACE_GET_WATCH_REGS = 0xd0
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKDATA_3264 = 0xc1
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKTEXT_3264 = 0xc0
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKEDATA_3264 = 0xc3
- PTRACE_POKETEXT = 0x4
- PTRACE_POKETEXT_3264 = 0xc2
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SET_THREAD_AREA = 0x1a
- PTRACE_SET_WATCH_REGS = 0xd1
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x6
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x9
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x5
- RLIMIT_NPROC = 0x8
- RLIMIT_RSS = 0x7
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4004700d
- RTC_EPOCH_SET = 0x8004700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4004700b
- RTC_IRQP_SET = 0x8004700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x401c7011
- RTC_PLL_SET = 0x801c7012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELLINKPROP = 0x6d
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETLINKPROP = 0x6e
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWLINKPROP = 0x6c
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x18
- RTM_NR_MSGTYPES = 0x60
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x80
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x40047307
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x40047309
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x467f
- SIOCOUTQ = 0x7472
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x80047308
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x1
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x80
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x2
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0xffff
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x1000
- SO_ACCEPTCONN = 0x1009
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x20
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x1029
- SO_DONTROUTE = 0x10
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x1007
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0x100
- SO_PASSCRED = 0x11
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x12
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1e
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x1028
- SO_RCVBUF = 0x1002
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x1001
- SO_SNDBUFFORCE = 0x1f
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x1005
- SO_STYLE = 0x1008
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x1008
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_ATTR_VERITY = 0x100000
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x5407
- TCGETA = 0x5401
- TCGETS = 0x540d
- TCGETS2 = 0x4030542a
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_TX_DELAY = 0x25
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x5410
- TCSBRK = 0x5405
- TCSBRKP = 0x5486
- TCSETA = 0x5402
- TCSETAF = 0x5404
- TCSETAW = 0x5403
- TCSETS = 0x540e
- TCSETS2 = 0x8030542b
- TCSETSF = 0x5410
- TCSETSF2 = 0x8030542d
- TCSETSW = 0x540f
- TCSETSW2 = 0x8030542c
- TCXONC = 0x5406
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x80047478
- TIOCEXCL = 0x740d
- TIOCGDEV = 0x40045432
- TIOCGETD = 0x7400
- TIOCGETP = 0x7408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x5492
- TIOCGISO7816 = 0x40285442
- TIOCGLCKTRMIOS = 0x548b
- TIOCGLTC = 0x7474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGPTPEER = 0x20005441
- TIOCGRS485 = 0x4020542e
- TIOCGSERIAL = 0x5484
- TIOCGSID = 0x7416
- TIOCGSOFTCAR = 0x5481
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x467f
- TIOCLINUX = 0x5483
- TIOCMBIC = 0x741c
- TIOCMBIS = 0x741b
- TIOCMGET = 0x741d
- TIOCMIWAIT = 0x5491
- TIOCMSET = 0x741a
- TIOCM_CAR = 0x100
- TIOCM_CD = 0x100
- TIOCM_CTS = 0x40
- TIOCM_DSR = 0x400
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x200
- TIOCM_RNG = 0x200
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x20
- TIOCM_ST = 0x10
- TIOCNOTTY = 0x5471
- TIOCNXCL = 0x740e
- TIOCOUTQ = 0x7472
- TIOCPKT = 0x5470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x5480
- TIOCSERCONFIG = 0x5488
- TIOCSERGETLSR = 0x548e
- TIOCSERGETMULTI = 0x548f
- TIOCSERGSTRUCT = 0x548d
- TIOCSERGWILD = 0x5489
- TIOCSERSETMULTI = 0x5490
- TIOCSERSWILD = 0x548a
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x7401
- TIOCSETN = 0x740a
- TIOCSETP = 0x7409
- TIOCSIG = 0x80045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x548c
- TIOCSLTC = 0x7475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0xc020542f
- TIOCSSERIAL = 0x5485
- TIOCSSOFTCAR = 0x5482
- TIOCSTI = 0x5472
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_AEAD_ALG_NAME = 0x20
- TIPC_AEAD_KEYLEN_MAX = 0x24
- TIPC_AEAD_KEYLEN_MIN = 0x14
- TIPC_AEAD_KEY_SIZE_MAX = 0x48
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODELAY = 0x8a
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x8000
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x800854d5
- TUNDETACHFILTER = 0x800854d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x400854db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x10
- VEOL = 0x11
- VEOL2 = 0x6
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x4
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VSWTCH = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x20
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x40041270
+ BLKBSZSET = 0x80041271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40041272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x80
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x2000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40046601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80046602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0x21
+ F_GETLK64 = 0x21
+ F_GETOWN = 0x17
+ F_RDLCK = 0x0
+ F_SETLK = 0x22
+ F_SETLK64 = 0x22
+ F_SETLKW = 0x23
+ F_SETLKW64 = 0x23
+ F_SETOWN = 0x18
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x100
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x80
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x800
+ MAP_ANONYMOUS = 0x800
+ MAP_DENYWRITE = 0x2000
+ MAP_EXECUTABLE = 0x4000
+ MAP_GROWSDOWN = 0x1000
+ MAP_HUGETLB = 0x80000
+ MAP_LOCKED = 0x8000
+ MAP_NONBLOCK = 0x20000
+ MAP_NORESERVE = 0x400
+ MAP_POPULATE = 0x10000
+ MAP_RENAME = 0x800
+ MAP_STACK = 0x40000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ NFDBITS = 0x20
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ O_APPEND = 0x8
+ O_ASYNC = 0x1000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x100
+ O_DIRECT = 0x8000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x10
+ O_EXCL = 0x400
+ O_FSYNC = 0x4010
+ O_LARGEFILE = 0x2000
+ O_NDELAY = 0x80
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x800
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x80
+ O_PATH = 0x200000
+ O_RSYNC = 0x4010
+ O_SYNC = 0x4010
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40042407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80042406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4008743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80087446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x800c744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80087447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PR_SET_PTRACER_ANY = 0xffffffff
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GET_THREAD_AREA = 0x19
+ PTRACE_GET_THREAD_AREA_3264 = 0xc4
+ PTRACE_GET_WATCH_REGS = 0xd0
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_PEEKDATA_3264 = 0xc1
+ PTRACE_PEEKTEXT_3264 = 0xc0
+ PTRACE_POKEDATA_3264 = 0xc3
+ PTRACE_POKETEXT_3264 = 0xc2
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SET_THREAD_AREA = 0x1a
+ PTRACE_SET_WATCH_REGS = 0xd1
+ RLIMIT_AS = 0x6
+ RLIMIT_MEMLOCK = 0x9
+ RLIMIT_NOFILE = 0x5
+ RLIMIT_NPROC = 0x8
+ RLIMIT_RSS = 0x7
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4004700d
+ RTC_EPOCH_SET = 0x8004700e
+ RTC_IRQP_READ = 0x4004700b
+ RTC_IRQP_SET = 0x8004700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x401c7011
+ RTC_PLL_SET = 0x801c7012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x80
+ SIOCATMARK = 0x40047307
+ SIOCGPGRP = 0x40047309
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x467f
+ SIOCOUTQ = 0x7472
+ SIOCSPGRP = 0x80047308
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x1
+ SOCK_NONBLOCK = 0x80
+ SOCK_STREAM = 0x2
+ SOL_SOCKET = 0xffff
+ SO_ACCEPTCONN = 0x1009
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x20
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x1029
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0x100
+ SO_PASSCRED = 0x11
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x12
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1e
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x1028
+ SO_RCVBUF = 0x1002
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x1001
+ SO_SNDBUFFORCE = 0x1f
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x1005
+ SO_STYLE = 0x1008
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x1008
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x5407
+ TCGETA = 0x5401
+ TCGETS = 0x540d
+ TCGETS2 = 0x4030542a
+ TCSAFLUSH = 0x5410
+ TCSBRK = 0x5405
+ TCSBRKP = 0x5486
+ TCSETA = 0x5402
+ TCSETAF = 0x5404
+ TCSETAW = 0x5403
+ TCSETS = 0x540e
+ TCSETS2 = 0x8030542b
+ TCSETSF = 0x5410
+ TCSETSF2 = 0x8030542d
+ TCSETSW = 0x540f
+ TCSETSW2 = 0x8030542c
+ TCXONC = 0x5406
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x80
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x80047478
+ TIOCEXCL = 0x740d
+ TIOCGDEV = 0x40045432
+ TIOCGETD = 0x7400
+ TIOCGETP = 0x7408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x5492
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x548b
+ TIOCGLTC = 0x7474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x4020542e
+ TIOCGSERIAL = 0x5484
+ TIOCGSID = 0x7416
+ TIOCGSOFTCAR = 0x5481
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x467f
+ TIOCLINUX = 0x5483
+ TIOCMBIC = 0x741c
+ TIOCMBIS = 0x741b
+ TIOCMGET = 0x741d
+ TIOCMIWAIT = 0x5491
+ TIOCMSET = 0x741a
+ TIOCM_CAR = 0x100
+ TIOCM_CD = 0x100
+ TIOCM_CTS = 0x40
+ TIOCM_DSR = 0x400
+ TIOCM_RI = 0x200
+ TIOCM_RNG = 0x200
+ TIOCM_SR = 0x20
+ TIOCM_ST = 0x10
+ TIOCNOTTY = 0x5471
+ TIOCNXCL = 0x740e
+ TIOCOUTQ = 0x7472
+ TIOCPKT = 0x5470
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x5480
+ TIOCSERCONFIG = 0x5488
+ TIOCSERGETLSR = 0x548e
+ TIOCSERGETMULTI = 0x548f
+ TIOCSERGSTRUCT = 0x548d
+ TIOCSERGWILD = 0x5489
+ TIOCSERSETMULTI = 0x5490
+ TIOCSERSWILD = 0x548a
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x7401
+ TIOCSETN = 0x740a
+ TIOCSETP = 0x7409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x548c
+ TIOCSLTC = 0x7475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0xc020542f
+ TIOCSSERIAL = 0x5485
+ TIOCSSOFTCAR = 0x5482
+ TIOCSTI = 0x5472
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x8000
+ TUNATTACHFILTER = 0x800854d5
+ TUNDETACHFILTER = 0x800854d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x400854db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0xd
+ VEOF = 0x10
+ VEOL = 0x11
+ VEOL2 = 0x6
+ VMIN = 0x4
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VSWTCH = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x20
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x7d)
EADDRNOTAVAIL = syscall.Errno(0x7e)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x7c)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x95)
EBADE = syscall.Errno(0x32)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x51)
EBADMSG = syscall.Errno(0x4d)
EBADR = syscall.Errno(0x33)
EBADRQC = syscall.Errno(0x36)
EBADSLT = syscall.Errno(0x37)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x9e)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x25)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x82)
@@ -2878,12 +519,8 @@ const (
EDEADLK = syscall.Errno(0x2d)
EDEADLOCK = syscall.Errno(0x38)
EDESTADDRREQ = syscall.Errno(0x60)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x46d)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x93)
EHOSTUNREACH = syscall.Errno(0x94)
EHWPOISON = syscall.Errno(0xa8)
@@ -2891,11 +528,7 @@ const (
EILSEQ = syscall.Errno(0x58)
EINIT = syscall.Errno(0x8d)
EINPROGRESS = syscall.Errno(0x96)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x85)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x8b)
EKEYEXPIRED = syscall.Errno(0xa2)
EKEYREJECTED = syscall.Errno(0xa4)
@@ -2912,8 +545,6 @@ const (
ELNRNG = syscall.Errno(0x29)
ELOOP = syscall.Errno(0x5a)
EMEDIUMTYPE = syscall.Errno(0xa0)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x61)
EMULTIHOP = syscall.Errno(0x4a)
ENAMETOOLONG = syscall.Errno(0x4e)
@@ -2921,100 +552,68 @@ const (
ENETDOWN = syscall.Errno(0x7f)
ENETRESET = syscall.Errno(0x81)
ENETUNREACH = syscall.Errno(0x80)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x35)
ENOBUFS = syscall.Errno(0x84)
ENOCSI = syscall.Errno(0x2b)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0xa1)
ENOLCK = syscall.Errno(0x2e)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x9f)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x23)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x63)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x59)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x86)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x5d)
ENOTNAM = syscall.Errno(0x89)
ENOTRECOVERABLE = syscall.Errno(0xa6)
ENOTSOCK = syscall.Errno(0x5f)
ENOTSUP = syscall.Errno(0x7a)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x50)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x7a)
EOVERFLOW = syscall.Errno(0x4f)
EOWNERDEAD = syscall.Errno(0xa5)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x7b)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x78)
EPROTOTYPE = syscall.Errno(0x62)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x52)
EREMDEV = syscall.Errno(0x8e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x8c)
ERESTART = syscall.Errno(0x5b)
ERFKILL = syscall.Errno(0xa7)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x8f)
ESOCKTNOSUPPORT = syscall.Errno(0x79)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x97)
ESTRPIPE = syscall.Errno(0x5c)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x91)
ETOOMANYREFS = syscall.Errno(0x90)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x87)
EUNATCH = syscall.Errno(0x2a)
EUSERS = syscall.Errno(0x5e)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x34)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0xa)
SIGCHLD = syscall.Signal(0x12)
SIGCLD = syscall.Signal(0x12)
SIGCONT = syscall.Signal(0x19)
SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x16)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x16)
SIGPROF = syscall.Signal(0x1d)
SIGPWR = syscall.Signal(0x13)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTOP = syscall.Signal(0x17)
SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x18)
SIGTTIN = syscall.Signal(0x1a)
SIGTTOU = syscall.Signal(0x1b)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
new file mode 100644
index 0000000..d9530e5
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
@@ -0,0 +1,860 @@
+// mkerrors.sh -Wall -Werror -static -I/tmp/include
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build ppc && linux
+// +build ppc,linux
+
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+
+package unix
+
+import "syscall"
+
+const (
+ B1000000 = 0x17
+ B115200 = 0x11
+ B1152000 = 0x18
+ B1500000 = 0x19
+ B2000000 = 0x1a
+ B230400 = 0x12
+ B2500000 = 0x1b
+ B3000000 = 0x1c
+ B3500000 = 0x1d
+ B4000000 = 0x1e
+ B460800 = 0x13
+ B500000 = 0x14
+ B57600 = 0x10
+ B576000 = 0x15
+ B921600 = 0x16
+ BLKBSZGET = 0x40041270
+ BLKBSZSET = 0x80041271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40041272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1f
+ BS1 = 0x8000
+ BSDLY = 0x8000
+ CBAUD = 0xff
+ CBAUDEX = 0x0
+ CIBAUD = 0xff0000
+ CLOCAL = 0x8000
+ CR1 = 0x1000
+ CR2 = 0x2000
+ CR3 = 0x3000
+ CRDLY = 0x3000
+ CREAD = 0x800
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTOPB = 0x400
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000000
+ FF1 = 0x4000
+ FFDLY = 0x4000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x800000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40046601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80046602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0xc
+ F_GETLK64 = 0xc
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0xd
+ F_SETLK64 = 0xd
+ F_SETLKW = 0xe
+ F_SETLKW64 = 0xe
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x4000
+ ICANON = 0x100
+ IEXTEN = 0x400
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x80
+ IUCLC = 0x1000
+ IXOFF = 0x400
+ IXON = 0x200
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x80
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x40
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x2000
+ MCL_FUTURE = 0x4000
+ MCL_ONFAULT = 0x8000
+ NFDBITS = 0x20
+ NL2 = 0x200
+ NL3 = 0x300
+ NLDLY = 0x300
+ NOFLSH = 0x80000000
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x4
+ ONLCR = 0x2
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x20000
+ O_DIRECTORY = 0x4000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x10000
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x8000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x404000
+ O_TRUNC = 0x200
+ PARENB = 0x1000
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40042407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc004240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80042406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4008743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80087446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x800c744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80087447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PROT_SAO = 0x10
+ PR_SET_PTRACER_ANY = 0xffffffff
+ PTRACE_GETEVRREGS = 0x14
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETREGS64 = 0x16
+ PTRACE_GETVRREGS = 0x12
+ PTRACE_GETVSRREGS = 0x1b
+ PTRACE_GET_DEBUGREG = 0x19
+ PTRACE_SETEVRREGS = 0x15
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETREGS64 = 0x17
+ PTRACE_SETVRREGS = 0x13
+ PTRACE_SETVSRREGS = 0x1c
+ PTRACE_SET_DEBUGREG = 0x1a
+ PTRACE_SINGLEBLOCK = 0x100
+ PTRACE_SYSEMU = 0x1d
+ PTRACE_SYSEMU_SINGLESTEP = 0x1e
+ PT_CCR = 0x26
+ PT_CTR = 0x23
+ PT_DAR = 0x29
+ PT_DSCR = 0x2c
+ PT_DSISR = 0x2a
+ PT_FPR0 = 0x30
+ PT_FPR31 = 0x6e
+ PT_FPSCR = 0x71
+ PT_LNK = 0x24
+ PT_MQ = 0x27
+ PT_MSR = 0x21
+ PT_NIP = 0x20
+ PT_ORIG_R3 = 0x22
+ PT_R0 = 0x0
+ PT_R1 = 0x1
+ PT_R10 = 0xa
+ PT_R11 = 0xb
+ PT_R12 = 0xc
+ PT_R13 = 0xd
+ PT_R14 = 0xe
+ PT_R15 = 0xf
+ PT_R16 = 0x10
+ PT_R17 = 0x11
+ PT_R18 = 0x12
+ PT_R19 = 0x13
+ PT_R2 = 0x2
+ PT_R20 = 0x14
+ PT_R21 = 0x15
+ PT_R22 = 0x16
+ PT_R23 = 0x17
+ PT_R24 = 0x18
+ PT_R25 = 0x19
+ PT_R26 = 0x1a
+ PT_R27 = 0x1b
+ PT_R28 = 0x1c
+ PT_R29 = 0x1d
+ PT_R3 = 0x3
+ PT_R30 = 0x1e
+ PT_R31 = 0x1f
+ PT_R4 = 0x4
+ PT_R5 = 0x5
+ PT_R6 = 0x6
+ PT_R7 = 0x7
+ PT_R8 = 0x8
+ PT_R9 = 0x9
+ PT_REGS_COUNT = 0x2c
+ PT_RESULT = 0x2b
+ PT_TRAP = 0x28
+ PT_XER = 0x25
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4004700d
+ RTC_EPOCH_SET = 0x8004700e
+ RTC_IRQP_READ = 0x4004700b
+ RTC_IRQP_SET = 0x8004700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x401c7011
+ RTC_PLL_SET = 0x801c7012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x4004667f
+ SIOCOUTQ = 0x40047473
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x14
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x15
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x10
+ SO_RCVTIMEO = 0x12
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x12
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x11
+ SO_SNDTIMEO = 0x13
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x13
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x400
+ TAB2 = 0x800
+ TAB3 = 0xc00
+ TABDLY = 0xc00
+ TCFLSH = 0x2000741f
+ TCGETA = 0x40147417
+ TCGETS = 0x402c7413
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x2000741d
+ TCSBRKP = 0x5425
+ TCSETA = 0x80147418
+ TCSETAF = 0x8014741c
+ TCSETAW = 0x80147419
+ TCSETS = 0x802c7414
+ TCSETSF = 0x802c7416
+ TCSETSW = 0x802c7415
+ TCXONC = 0x2000741e
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x40045432
+ TIOCGETC = 0x40067412
+ TIOCGETD = 0x5424
+ TIOCGETP = 0x40067408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGLTC = 0x40067474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x4004667f
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_LOOP = 0x8000
+ TIOCM_OUT1 = 0x2000
+ TIOCM_OUT2 = 0x4000
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETC = 0x80067411
+ TIOCSETD = 0x5423
+ TIOCSETN = 0x8006740a
+ TIOCSETP = 0x80067409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSLTC = 0x80067475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTART = 0x2000746e
+ TIOCSTI = 0x5412
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x400000
+ TUNATTACHFILTER = 0x800854d5
+ TUNDETACHFILTER = 0x800854d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x400854db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0x10
+ VEOF = 0x4
+ VEOL = 0x6
+ VEOL2 = 0x8
+ VMIN = 0x5
+ VREPRINT = 0xb
+ VSTART = 0xd
+ VSTOP = 0xe
+ VSUSP = 0xc
+ VSWTC = 0x9
+ VT1 = 0x10000
+ VTDLY = 0x10000
+ VTIME = 0x7
+ VWERASE = 0xa
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x20
+ XCASE = 0x4000
+ XTABS = 0xc00
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
+)
+
+// Errors
+const (
+ EADDRINUSE = syscall.Errno(0x62)
+ EADDRNOTAVAIL = syscall.Errno(0x63)
+ EADV = syscall.Errno(0x44)
+ EAFNOSUPPORT = syscall.Errno(0x61)
+ EALREADY = syscall.Errno(0x72)
+ EBADE = syscall.Errno(0x34)
+ EBADFD = syscall.Errno(0x4d)
+ EBADMSG = syscall.Errno(0x4a)
+ EBADR = syscall.Errno(0x35)
+ EBADRQC = syscall.Errno(0x38)
+ EBADSLT = syscall.Errno(0x39)
+ EBFONT = syscall.Errno(0x3b)
+ ECANCELED = syscall.Errno(0x7d)
+ ECHRNG = syscall.Errno(0x2c)
+ ECOMM = syscall.Errno(0x46)
+ ECONNABORTED = syscall.Errno(0x67)
+ ECONNREFUSED = syscall.Errno(0x6f)
+ ECONNRESET = syscall.Errno(0x68)
+ EDEADLK = syscall.Errno(0x23)
+ EDEADLOCK = syscall.Errno(0x3a)
+ EDESTADDRREQ = syscall.Errno(0x59)
+ EDOTDOT = syscall.Errno(0x49)
+ EDQUOT = syscall.Errno(0x7a)
+ EHOSTDOWN = syscall.Errno(0x70)
+ EHOSTUNREACH = syscall.Errno(0x71)
+ EHWPOISON = syscall.Errno(0x85)
+ EIDRM = syscall.Errno(0x2b)
+ EILSEQ = syscall.Errno(0x54)
+ EINPROGRESS = syscall.Errno(0x73)
+ EISCONN = syscall.Errno(0x6a)
+ EISNAM = syscall.Errno(0x78)
+ EKEYEXPIRED = syscall.Errno(0x7f)
+ EKEYREJECTED = syscall.Errno(0x81)
+ EKEYREVOKED = syscall.Errno(0x80)
+ EL2HLT = syscall.Errno(0x33)
+ EL2NSYNC = syscall.Errno(0x2d)
+ EL3HLT = syscall.Errno(0x2e)
+ EL3RST = syscall.Errno(0x2f)
+ ELIBACC = syscall.Errno(0x4f)
+ ELIBBAD = syscall.Errno(0x50)
+ ELIBEXEC = syscall.Errno(0x53)
+ ELIBMAX = syscall.Errno(0x52)
+ ELIBSCN = syscall.Errno(0x51)
+ ELNRNG = syscall.Errno(0x30)
+ ELOOP = syscall.Errno(0x28)
+ EMEDIUMTYPE = syscall.Errno(0x7c)
+ EMSGSIZE = syscall.Errno(0x5a)
+ EMULTIHOP = syscall.Errno(0x48)
+ ENAMETOOLONG = syscall.Errno(0x24)
+ ENAVAIL = syscall.Errno(0x77)
+ ENETDOWN = syscall.Errno(0x64)
+ ENETRESET = syscall.Errno(0x66)
+ ENETUNREACH = syscall.Errno(0x65)
+ ENOANO = syscall.Errno(0x37)
+ ENOBUFS = syscall.Errno(0x69)
+ ENOCSI = syscall.Errno(0x32)
+ ENODATA = syscall.Errno(0x3d)
+ ENOKEY = syscall.Errno(0x7e)
+ ENOLCK = syscall.Errno(0x25)
+ ENOLINK = syscall.Errno(0x43)
+ ENOMEDIUM = syscall.Errno(0x7b)
+ ENOMSG = syscall.Errno(0x2a)
+ ENONET = syscall.Errno(0x40)
+ ENOPKG = syscall.Errno(0x41)
+ ENOPROTOOPT = syscall.Errno(0x5c)
+ ENOSR = syscall.Errno(0x3f)
+ ENOSTR = syscall.Errno(0x3c)
+ ENOSYS = syscall.Errno(0x26)
+ ENOTCONN = syscall.Errno(0x6b)
+ ENOTEMPTY = syscall.Errno(0x27)
+ ENOTNAM = syscall.Errno(0x76)
+ ENOTRECOVERABLE = syscall.Errno(0x83)
+ ENOTSOCK = syscall.Errno(0x58)
+ ENOTSUP = syscall.Errno(0x5f)
+ ENOTUNIQ = syscall.Errno(0x4c)
+ EOPNOTSUPP = syscall.Errno(0x5f)
+ EOVERFLOW = syscall.Errno(0x4b)
+ EOWNERDEAD = syscall.Errno(0x82)
+ EPFNOSUPPORT = syscall.Errno(0x60)
+ EPROTO = syscall.Errno(0x47)
+ EPROTONOSUPPORT = syscall.Errno(0x5d)
+ EPROTOTYPE = syscall.Errno(0x5b)
+ EREMCHG = syscall.Errno(0x4e)
+ EREMOTE = syscall.Errno(0x42)
+ EREMOTEIO = syscall.Errno(0x79)
+ ERESTART = syscall.Errno(0x55)
+ ERFKILL = syscall.Errno(0x84)
+ ESHUTDOWN = syscall.Errno(0x6c)
+ ESOCKTNOSUPPORT = syscall.Errno(0x5e)
+ ESRMNT = syscall.Errno(0x45)
+ ESTALE = syscall.Errno(0x74)
+ ESTRPIPE = syscall.Errno(0x56)
+ ETIME = syscall.Errno(0x3e)
+ ETIMEDOUT = syscall.Errno(0x6e)
+ ETOOMANYREFS = syscall.Errno(0x6d)
+ EUCLEAN = syscall.Errno(0x75)
+ EUNATCH = syscall.Errno(0x31)
+ EUSERS = syscall.Errno(0x57)
+ EXFULL = syscall.Errno(0x36)
+)
+
+// Signals
+const (
+ SIGBUS = syscall.Signal(0x7)
+ SIGCHLD = syscall.Signal(0x11)
+ SIGCLD = syscall.Signal(0x11)
+ SIGCONT = syscall.Signal(0x12)
+ SIGIO = syscall.Signal(0x1d)
+ SIGPOLL = syscall.Signal(0x1d)
+ SIGPROF = syscall.Signal(0x1b)
+ SIGPWR = syscall.Signal(0x1e)
+ SIGSTKFLT = syscall.Signal(0x10)
+ SIGSTOP = syscall.Signal(0x13)
+ SIGSYS = syscall.Signal(0x1f)
+ SIGTSTP = syscall.Signal(0x14)
+ SIGTTIN = syscall.Signal(0x15)
+ SIGTTOU = syscall.Signal(0x16)
+ SIGURG = syscall.Signal(0x17)
+ SIGUSR1 = syscall.Signal(0xa)
+ SIGUSR2 = syscall.Signal(0xc)
+ SIGVTALRM = syscall.Signal(0x1a)
+ SIGWINCH = syscall.Signal(0x1c)
+ SIGXCPU = syscall.Signal(0x18)
+ SIGXFSZ = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+ num syscall.Errno
+ name string
+ desc string
+}{
+ {1, "EPERM", "operation not permitted"},
+ {2, "ENOENT", "no such file or directory"},
+ {3, "ESRCH", "no such process"},
+ {4, "EINTR", "interrupted system call"},
+ {5, "EIO", "input/output error"},
+ {6, "ENXIO", "no such device or address"},
+ {7, "E2BIG", "argument list too long"},
+ {8, "ENOEXEC", "exec format error"},
+ {9, "EBADF", "bad file descriptor"},
+ {10, "ECHILD", "no child processes"},
+ {11, "EAGAIN", "resource temporarily unavailable"},
+ {12, "ENOMEM", "cannot allocate memory"},
+ {13, "EACCES", "permission denied"},
+ {14, "EFAULT", "bad address"},
+ {15, "ENOTBLK", "block device required"},
+ {16, "EBUSY", "device or resource busy"},
+ {17, "EEXIST", "file exists"},
+ {18, "EXDEV", "invalid cross-device link"},
+ {19, "ENODEV", "no such device"},
+ {20, "ENOTDIR", "not a directory"},
+ {21, "EISDIR", "is a directory"},
+ {22, "EINVAL", "invalid argument"},
+ {23, "ENFILE", "too many open files in system"},
+ {24, "EMFILE", "too many open files"},
+ {25, "ENOTTY", "inappropriate ioctl for device"},
+ {26, "ETXTBSY", "text file busy"},
+ {27, "EFBIG", "file too large"},
+ {28, "ENOSPC", "no space left on device"},
+ {29, "ESPIPE", "illegal seek"},
+ {30, "EROFS", "read-only file system"},
+ {31, "EMLINK", "too many links"},
+ {32, "EPIPE", "broken pipe"},
+ {33, "EDOM", "numerical argument out of domain"},
+ {34, "ERANGE", "numerical result out of range"},
+ {35, "EDEADLK", "resource deadlock avoided"},
+ {36, "ENAMETOOLONG", "file name too long"},
+ {37, "ENOLCK", "no locks available"},
+ {38, "ENOSYS", "function not implemented"},
+ {39, "ENOTEMPTY", "directory not empty"},
+ {40, "ELOOP", "too many levels of symbolic links"},
+ {42, "ENOMSG", "no message of desired type"},
+ {43, "EIDRM", "identifier removed"},
+ {44, "ECHRNG", "channel number out of range"},
+ {45, "EL2NSYNC", "level 2 not synchronized"},
+ {46, "EL3HLT", "level 3 halted"},
+ {47, "EL3RST", "level 3 reset"},
+ {48, "ELNRNG", "link number out of range"},
+ {49, "EUNATCH", "protocol driver not attached"},
+ {50, "ENOCSI", "no CSI structure available"},
+ {51, "EL2HLT", "level 2 halted"},
+ {52, "EBADE", "invalid exchange"},
+ {53, "EBADR", "invalid request descriptor"},
+ {54, "EXFULL", "exchange full"},
+ {55, "ENOANO", "no anode"},
+ {56, "EBADRQC", "invalid request code"},
+ {57, "EBADSLT", "invalid slot"},
+ {58, "EDEADLOCK", "file locking deadlock error"},
+ {59, "EBFONT", "bad font file format"},
+ {60, "ENOSTR", "device not a stream"},
+ {61, "ENODATA", "no data available"},
+ {62, "ETIME", "timer expired"},
+ {63, "ENOSR", "out of streams resources"},
+ {64, "ENONET", "machine is not on the network"},
+ {65, "ENOPKG", "package not installed"},
+ {66, "EREMOTE", "object is remote"},
+ {67, "ENOLINK", "link has been severed"},
+ {68, "EADV", "advertise error"},
+ {69, "ESRMNT", "srmount error"},
+ {70, "ECOMM", "communication error on send"},
+ {71, "EPROTO", "protocol error"},
+ {72, "EMULTIHOP", "multihop attempted"},
+ {73, "EDOTDOT", "RFS specific error"},
+ {74, "EBADMSG", "bad message"},
+ {75, "EOVERFLOW", "value too large for defined data type"},
+ {76, "ENOTUNIQ", "name not unique on network"},
+ {77, "EBADFD", "file descriptor in bad state"},
+ {78, "EREMCHG", "remote address changed"},
+ {79, "ELIBACC", "can not access a needed shared library"},
+ {80, "ELIBBAD", "accessing a corrupted shared library"},
+ {81, "ELIBSCN", ".lib section in a.out corrupted"},
+ {82, "ELIBMAX", "attempting to link in too many shared libraries"},
+ {83, "ELIBEXEC", "cannot exec a shared library directly"},
+ {84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
+ {85, "ERESTART", "interrupted system call should be restarted"},
+ {86, "ESTRPIPE", "streams pipe error"},
+ {87, "EUSERS", "too many users"},
+ {88, "ENOTSOCK", "socket operation on non-socket"},
+ {89, "EDESTADDRREQ", "destination address required"},
+ {90, "EMSGSIZE", "message too long"},
+ {91, "EPROTOTYPE", "protocol wrong type for socket"},
+ {92, "ENOPROTOOPT", "protocol not available"},
+ {93, "EPROTONOSUPPORT", "protocol not supported"},
+ {94, "ESOCKTNOSUPPORT", "socket type not supported"},
+ {95, "ENOTSUP", "operation not supported"},
+ {96, "EPFNOSUPPORT", "protocol family not supported"},
+ {97, "EAFNOSUPPORT", "address family not supported by protocol"},
+ {98, "EADDRINUSE", "address already in use"},
+ {99, "EADDRNOTAVAIL", "cannot assign requested address"},
+ {100, "ENETDOWN", "network is down"},
+ {101, "ENETUNREACH", "network is unreachable"},
+ {102, "ENETRESET", "network dropped connection on reset"},
+ {103, "ECONNABORTED", "software caused connection abort"},
+ {104, "ECONNRESET", "connection reset by peer"},
+ {105, "ENOBUFS", "no buffer space available"},
+ {106, "EISCONN", "transport endpoint is already connected"},
+ {107, "ENOTCONN", "transport endpoint is not connected"},
+ {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
+ {109, "ETOOMANYREFS", "too many references: cannot splice"},
+ {110, "ETIMEDOUT", "connection timed out"},
+ {111, "ECONNREFUSED", "connection refused"},
+ {112, "EHOSTDOWN", "host is down"},
+ {113, "EHOSTUNREACH", "no route to host"},
+ {114, "EALREADY", "operation already in progress"},
+ {115, "EINPROGRESS", "operation now in progress"},
+ {116, "ESTALE", "stale file handle"},
+ {117, "EUCLEAN", "structure needs cleaning"},
+ {118, "ENOTNAM", "not a XENIX named type file"},
+ {119, "ENAVAIL", "no XENIX semaphores available"},
+ {120, "EISNAM", "is a named type file"},
+ {121, "EREMOTEIO", "remote I/O error"},
+ {122, "EDQUOT", "disk quota exceeded"},
+ {123, "ENOMEDIUM", "no medium found"},
+ {124, "EMEDIUMTYPE", "wrong medium type"},
+ {125, "ECANCELED", "operation canceled"},
+ {126, "ENOKEY", "required key not available"},
+ {127, "EKEYEXPIRED", "key has expired"},
+ {128, "EKEYREVOKED", "key has been revoked"},
+ {129, "EKEYREJECTED", "key was rejected by service"},
+ {130, "EOWNERDEAD", "owner died"},
+ {131, "ENOTRECOVERABLE", "state not recoverable"},
+ {132, "ERFKILL", "operation not possible due to RF-kill"},
+ {133, "EHWPOISON", "memory page has hardware error"},
+}
+
+// Signal table
+var signalList = [...]struct {
+ num syscall.Signal
+ name string
+ desc string
+}{
+ {1, "SIGHUP", "hangup"},
+ {2, "SIGINT", "interrupt"},
+ {3, "SIGQUIT", "quit"},
+ {4, "SIGILL", "illegal instruction"},
+ {5, "SIGTRAP", "trace/breakpoint trap"},
+ {6, "SIGABRT", "aborted"},
+ {7, "SIGBUS", "bus error"},
+ {8, "SIGFPE", "floating point exception"},
+ {9, "SIGKILL", "killed"},
+ {10, "SIGUSR1", "user defined signal 1"},
+ {11, "SIGSEGV", "segmentation fault"},
+ {12, "SIGUSR2", "user defined signal 2"},
+ {13, "SIGPIPE", "broken pipe"},
+ {14, "SIGALRM", "alarm clock"},
+ {15, "SIGTERM", "terminated"},
+ {16, "SIGSTKFLT", "stack fault"},
+ {17, "SIGCHLD", "child exited"},
+ {18, "SIGCONT", "continued"},
+ {19, "SIGSTOP", "stopped (signal)"},
+ {20, "SIGTSTP", "stopped"},
+ {21, "SIGTTIN", "stopped (tty input)"},
+ {22, "SIGTTOU", "stopped (tty output)"},
+ {23, "SIGURG", "urgent I/O condition"},
+ {24, "SIGXCPU", "CPU time limit exceeded"},
+ {25, "SIGXFSZ", "file size limit exceeded"},
+ {26, "SIGVTALRM", "virtual timer expired"},
+ {27, "SIGPROF", "profiling timer expired"},
+ {28, "SIGWINCH", "window changed"},
+ {29, "SIGIO", "I/O possible"},
+ {30, "SIGPWR", "power failure"},
+ {31, "SIGSYS", "bad system call"},
+}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index 7afa93a..e60102f 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -1,2935 +1,576 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64 && linux
// +build ppc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x17
- B110 = 0x3
- B115200 = 0x11
- B1152000 = 0x18
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x19
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x1a
- B230400 = 0x12
- B2400 = 0xb
- B2500000 = 0x1b
- B300 = 0x7
- B3000000 = 0x1c
- B3500000 = 0x1d
- B38400 = 0xf
- B4000000 = 0x1e
- B460800 = 0x13
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x14
- B57600 = 0x10
- B576000 = 0x15
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x16
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40081270
- BLKBSZSET = 0x80081271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40081272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1f
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_MMAPABLE = 0x400
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x8000
- BSDLY = 0x8000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0xff
- CBAUDEX = 0x0
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0xff0000
- CLOCAL = 0x8000
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_ARGS_SIZE_VER1 = 0x50
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_CLEAR_SIGHAND = 0x100000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x1000
- CR2 = 0x2000
- CR3 = 0x3000
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x3000
- CREAD = 0x800
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIGNAL = 0xff
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x4000
- FFDLY = 0x4000
- FLUSHO = 0x800000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0xf
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0xf
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0xd
- F_SETLKW = 0x7
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x4000
- IBSHIFT = 0x10
- ICANON = 0x100
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x400
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x80
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x1000
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_COLD = 0x14
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0x15
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x80
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x40
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x2000
- MCL_FUTURE = 0x4000
- MCL_ONFAULT = 0x8000
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NL2 = 0x200
- NL3 = 0x300
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x300
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80000000
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x4
- ONLCR = 0x2
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x20000
- O_DIRECTORY = 0x4000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x8000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x404000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x1000
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPC_CMM_MAGIC = 0xc7571590
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4010743f
- PPPIOCGIDLE32 = 0x4008743f
- PPPIOCGIDLE64 = 0x4010743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80107446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x8010744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80107447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_SAO = 0x10
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETEVRREGS = 0x14
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGS64 = 0x16
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GETVRREGS = 0x12
- PTRACE_GETVSRREGS = 0x1b
- PTRACE_GET_DEBUGREG = 0x19
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETEVRREGS = 0x15
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGS64 = 0x17
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SETVRREGS = 0x13
- PTRACE_SETVSRREGS = 0x1c
- PTRACE_SET_DEBUGREG = 0x1a
- PTRACE_SINGLEBLOCK = 0x100
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_SYSEMU = 0x1d
- PTRACE_SYSEMU_SINGLESTEP = 0x1e
- PTRACE_TRACEME = 0x0
- PT_CCR = 0x26
- PT_CTR = 0x23
- PT_DAR = 0x29
- PT_DSCR = 0x2c
- PT_DSISR = 0x2a
- PT_FPR0 = 0x30
- PT_FPSCR = 0x50
- PT_LNK = 0x24
- PT_MSR = 0x21
- PT_NIP = 0x20
- PT_ORIG_R3 = 0x22
- PT_R0 = 0x0
- PT_R1 = 0x1
- PT_R10 = 0xa
- PT_R11 = 0xb
- PT_R12 = 0xc
- PT_R13 = 0xd
- PT_R14 = 0xe
- PT_R15 = 0xf
- PT_R16 = 0x10
- PT_R17 = 0x11
- PT_R18 = 0x12
- PT_R19 = 0x13
- PT_R2 = 0x2
- PT_R20 = 0x14
- PT_R21 = 0x15
- PT_R22 = 0x16
- PT_R23 = 0x17
- PT_R24 = 0x18
- PT_R25 = 0x19
- PT_R26 = 0x1a
- PT_R27 = 0x1b
- PT_R28 = 0x1c
- PT_R29 = 0x1d
- PT_R3 = 0x3
- PT_R30 = 0x1e
- PT_R31 = 0x1f
- PT_R4 = 0x4
- PT_R5 = 0x5
- PT_R6 = 0x6
- PT_R7 = 0x7
- PT_R8 = 0x8
- PT_R9 = 0x9
- PT_REGS_COUNT = 0x2c
- PT_RESULT = 0x2b
- PT_SOFTE = 0x27
- PT_TRAP = 0x28
- PT_VR0 = 0x52
- PT_VRSAVE = 0x94
- PT_VSCR = 0x93
- PT_VSR0 = 0x96
- PT_VSR31 = 0xd4
- PT_XER = 0x25
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4008700d
- RTC_EPOCH_SET = 0x8008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4008700b
- RTC_IRQP_SET = 0x8008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x40207011
- RTC_PLL_SET = 0x80207012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELLINKPROP = 0x6d
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETLINKPROP = 0x6e
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWLINKPROP = 0x6c
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x18
- RTM_NR_MSGTYPES = 0x60
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x4004667f
- SIOCOUTQ = 0x40047473
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x1000
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x14
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x15
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x10
- SO_RCVTIMEO = 0x12
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x12
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x11
- SO_SNDTIMEO = 0x13
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x13
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_ATTR_VERITY = 0x100000
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x400
- TAB2 = 0x800
- TAB3 = 0xc00
- TABDLY = 0xc00
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x2000741f
- TCGETA = 0x40147417
- TCGETS = 0x402c7413
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_TX_DELAY = 0x25
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x2000741d
- TCSBRKP = 0x5425
- TCSETA = 0x80147418
- TCSETAF = 0x8014741c
- TCSETAW = 0x80147419
- TCSETS = 0x802c7414
- TCSETSF = 0x802c7416
- TCSETSW = 0x802c7415
- TCXONC = 0x2000741e
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x40045432
- TIOCGETC = 0x40067412
- TIOCGETD = 0x5424
- TIOCGETP = 0x40067408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x40285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGLTC = 0x40067474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGPTPEER = 0x20005441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x4004667f
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_LOOP = 0x8000
- TIOCM_OUT1 = 0x2000
- TIOCM_OUT2 = 0x4000
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETC = 0x80067411
- TIOCSETD = 0x5423
- TIOCSETN = 0x8006740a
- TIOCSETP = 0x80067409
- TIOCSIG = 0x80045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSLTC = 0x80067475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTART = 0x2000746e
- TIOCSTI = 0x5412
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_AEAD_ALG_NAME = 0x20
- TIPC_AEAD_KEYLEN_MAX = 0x24
- TIPC_AEAD_KEYLEN_MIN = 0x14
- TIPC_AEAD_KEY_SIZE_MAX = 0x48
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODELAY = 0x8a
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x400000
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0x10
- VEOF = 0x4
- VEOL = 0x6
- VEOL2 = 0x8
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x5
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xb
- VSTART = 0xd
- VSTOP = 0xe
- VSUSP = 0xc
- VSWTC = 0x9
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x7
- VWERASE = 0xa
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4000
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0xc00
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x17
+ B115200 = 0x11
+ B1152000 = 0x18
+ B1500000 = 0x19
+ B2000000 = 0x1a
+ B230400 = 0x12
+ B2500000 = 0x1b
+ B3000000 = 0x1c
+ B3500000 = 0x1d
+ B4000000 = 0x1e
+ B460800 = 0x13
+ B500000 = 0x14
+ B57600 = 0x10
+ B576000 = 0x15
+ B921600 = 0x16
+ BLKBSZGET = 0x40081270
+ BLKBSZSET = 0x80081271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40081272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1f
+ BS1 = 0x8000
+ BSDLY = 0x8000
+ CBAUD = 0xff
+ CBAUDEX = 0x0
+ CIBAUD = 0xff0000
+ CLOCAL = 0x8000
+ CR1 = 0x1000
+ CR2 = 0x2000
+ CR3 = 0x3000
+ CRDLY = 0x3000
+ CREAD = 0x800
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTOPB = 0x400
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000000
+ FF1 = 0x4000
+ FFDLY = 0x4000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x800000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0xc
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0xd
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0xe
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x4000
+ ICANON = 0x100
+ IEXTEN = 0x400
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x80
+ IUCLC = 0x1000
+ IXOFF = 0x400
+ IXON = 0x200
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x80
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x40
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x2000
+ MCL_FUTURE = 0x4000
+ MCL_ONFAULT = 0x8000
+ NFDBITS = 0x40
+ NL2 = 0x200
+ NL3 = 0x300
+ NLDLY = 0x300
+ NOFLSH = 0x80000000
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x4
+ ONLCR = 0x2
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x20000
+ O_DIRECTORY = 0x4000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x8000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x404000
+ O_TRUNC = 0x200
+ PARENB = 0x1000
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4010743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80107446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x8010744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80107447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PROT_SAO = 0x10
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_GETEVRREGS = 0x14
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETREGS64 = 0x16
+ PTRACE_GETVRREGS = 0x12
+ PTRACE_GETVSRREGS = 0x1b
+ PTRACE_GET_DEBUGREG = 0x19
+ PTRACE_SETEVRREGS = 0x15
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETREGS64 = 0x17
+ PTRACE_SETVRREGS = 0x13
+ PTRACE_SETVSRREGS = 0x1c
+ PTRACE_SET_DEBUGREG = 0x1a
+ PTRACE_SINGLEBLOCK = 0x100
+ PTRACE_SYSEMU = 0x1d
+ PTRACE_SYSEMU_SINGLESTEP = 0x1e
+ PT_CCR = 0x26
+ PT_CTR = 0x23
+ PT_DAR = 0x29
+ PT_DSCR = 0x2c
+ PT_DSISR = 0x2a
+ PT_FPR0 = 0x30
+ PT_FPSCR = 0x50
+ PT_LNK = 0x24
+ PT_MSR = 0x21
+ PT_NIP = 0x20
+ PT_ORIG_R3 = 0x22
+ PT_R0 = 0x0
+ PT_R1 = 0x1
+ PT_R10 = 0xa
+ PT_R11 = 0xb
+ PT_R12 = 0xc
+ PT_R13 = 0xd
+ PT_R14 = 0xe
+ PT_R15 = 0xf
+ PT_R16 = 0x10
+ PT_R17 = 0x11
+ PT_R18 = 0x12
+ PT_R19 = 0x13
+ PT_R2 = 0x2
+ PT_R20 = 0x14
+ PT_R21 = 0x15
+ PT_R22 = 0x16
+ PT_R23 = 0x17
+ PT_R24 = 0x18
+ PT_R25 = 0x19
+ PT_R26 = 0x1a
+ PT_R27 = 0x1b
+ PT_R28 = 0x1c
+ PT_R29 = 0x1d
+ PT_R3 = 0x3
+ PT_R30 = 0x1e
+ PT_R31 = 0x1f
+ PT_R4 = 0x4
+ PT_R5 = 0x5
+ PT_R6 = 0x6
+ PT_R7 = 0x7
+ PT_R8 = 0x8
+ PT_R9 = 0x9
+ PT_REGS_COUNT = 0x2c
+ PT_RESULT = 0x2b
+ PT_SOFTE = 0x27
+ PT_TRAP = 0x28
+ PT_VR0 = 0x52
+ PT_VRSAVE = 0x94
+ PT_VSCR = 0x93
+ PT_VSR0 = 0x96
+ PT_VSR31 = 0xd4
+ PT_XER = 0x25
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4008700d
+ RTC_EPOCH_SET = 0x8008700e
+ RTC_IRQP_READ = 0x4008700b
+ RTC_IRQP_SET = 0x8008700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x40207011
+ RTC_PLL_SET = 0x80207012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x4004667f
+ SIOCOUTQ = 0x40047473
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x14
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x15
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x10
+ SO_RCVTIMEO = 0x12
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x12
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x11
+ SO_SNDTIMEO = 0x13
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x13
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x400
+ TAB2 = 0x800
+ TAB3 = 0xc00
+ TABDLY = 0xc00
+ TCFLSH = 0x2000741f
+ TCGETA = 0x40147417
+ TCGETS = 0x402c7413
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x2000741d
+ TCSBRKP = 0x5425
+ TCSETA = 0x80147418
+ TCSETAF = 0x8014741c
+ TCSETAW = 0x80147419
+ TCSETS = 0x802c7414
+ TCSETSF = 0x802c7416
+ TCSETSW = 0x802c7415
+ TCXONC = 0x2000741e
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x40045432
+ TIOCGETC = 0x40067412
+ TIOCGETD = 0x5424
+ TIOCGETP = 0x40067408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGLTC = 0x40067474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x4004667f
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_LOOP = 0x8000
+ TIOCM_OUT1 = 0x2000
+ TIOCM_OUT2 = 0x4000
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETC = 0x80067411
+ TIOCSETD = 0x5423
+ TIOCSETN = 0x8006740a
+ TIOCSETP = 0x80067409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSLTC = 0x80067475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTART = 0x2000746e
+ TIOCSTI = 0x5412
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x400000
+ TUNATTACHFILTER = 0x801054d5
+ TUNDETACHFILTER = 0x801054d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x401054db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0x10
+ VEOF = 0x4
+ VEOL = 0x6
+ VEOL2 = 0x8
+ VMIN = 0x5
+ VREPRINT = 0xb
+ VSTART = 0xd
+ VSTOP = 0xe
+ VSUSP = 0xc
+ VSWTC = 0x9
+ VT1 = 0x10000
+ VTDLY = 0x10000
+ VTIME = 0x7
+ VWERASE = 0xa
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x40
+ XCASE = 0x4000
+ XTABS = 0xc00
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2938,23 +579,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x3a)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2971,8 +604,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2980,99 +611,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index 7e68440..838ff4e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -1,2935 +1,576 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64le && linux
// +build ppc64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x17
- B110 = 0x3
- B115200 = 0x11
- B1152000 = 0x18
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x19
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x1a
- B230400 = 0x12
- B2400 = 0xb
- B2500000 = 0x1b
- B300 = 0x7
- B3000000 = 0x1c
- B3500000 = 0x1d
- B38400 = 0xf
- B4000000 = 0x1e
- B460800 = 0x13
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x14
- B57600 = 0x10
- B576000 = 0x15
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x16
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40081270
- BLKBSZSET = 0x80081271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40081272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1f
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_MMAPABLE = 0x400
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x8000
- BSDLY = 0x8000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0xff
- CBAUDEX = 0x0
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0xff0000
- CLOCAL = 0x8000
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_ARGS_SIZE_VER1 = 0x50
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_CLEAR_SIGHAND = 0x100000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x1000
- CR2 = 0x2000
- CR3 = 0x3000
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x3000
- CREAD = 0x800
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIGNAL = 0xff
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x4000
- FFDLY = 0x4000
- FLUSHO = 0x800000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0xf
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0xf
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0xc
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0xd
- F_SETLKW = 0x7
- F_SETLKW64 = 0xe
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x4000
- IBSHIFT = 0x10
- ICANON = 0x100
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x400
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x80
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x1000
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_COLD = 0x14
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0x15
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x80
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x40
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x2000
- MCL_FUTURE = 0x4000
- MCL_ONFAULT = 0x8000
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NL2 = 0x200
- NL3 = 0x300
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x300
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80000000
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x4
- ONLCR = 0x2
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x20000
- O_DIRECTORY = 0x4000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x8000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x404000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x1000
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPC_CMM_MAGIC = 0xc7571590
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4010743f
- PPPIOCGIDLE32 = 0x4008743f
- PPPIOCGIDLE64 = 0x4010743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80107446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x8010744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80107447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_SAO = 0x10
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETEVRREGS = 0x14
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGS64 = 0x16
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GETVRREGS = 0x12
- PTRACE_GETVSRREGS = 0x1b
- PTRACE_GET_DEBUGREG = 0x19
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETEVRREGS = 0x15
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGS64 = 0x17
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SETVRREGS = 0x13
- PTRACE_SETVSRREGS = 0x1c
- PTRACE_SET_DEBUGREG = 0x1a
- PTRACE_SINGLEBLOCK = 0x100
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_SYSEMU = 0x1d
- PTRACE_SYSEMU_SINGLESTEP = 0x1e
- PTRACE_TRACEME = 0x0
- PT_CCR = 0x26
- PT_CTR = 0x23
- PT_DAR = 0x29
- PT_DSCR = 0x2c
- PT_DSISR = 0x2a
- PT_FPR0 = 0x30
- PT_FPSCR = 0x50
- PT_LNK = 0x24
- PT_MSR = 0x21
- PT_NIP = 0x20
- PT_ORIG_R3 = 0x22
- PT_R0 = 0x0
- PT_R1 = 0x1
- PT_R10 = 0xa
- PT_R11 = 0xb
- PT_R12 = 0xc
- PT_R13 = 0xd
- PT_R14 = 0xe
- PT_R15 = 0xf
- PT_R16 = 0x10
- PT_R17 = 0x11
- PT_R18 = 0x12
- PT_R19 = 0x13
- PT_R2 = 0x2
- PT_R20 = 0x14
- PT_R21 = 0x15
- PT_R22 = 0x16
- PT_R23 = 0x17
- PT_R24 = 0x18
- PT_R25 = 0x19
- PT_R26 = 0x1a
- PT_R27 = 0x1b
- PT_R28 = 0x1c
- PT_R29 = 0x1d
- PT_R3 = 0x3
- PT_R30 = 0x1e
- PT_R31 = 0x1f
- PT_R4 = 0x4
- PT_R5 = 0x5
- PT_R6 = 0x6
- PT_R7 = 0x7
- PT_R8 = 0x8
- PT_R9 = 0x9
- PT_REGS_COUNT = 0x2c
- PT_RESULT = 0x2b
- PT_SOFTE = 0x27
- PT_TRAP = 0x28
- PT_VR0 = 0x52
- PT_VRSAVE = 0x94
- PT_VSCR = 0x93
- PT_VSR0 = 0x96
- PT_VSR31 = 0xd4
- PT_XER = 0x25
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4008700d
- RTC_EPOCH_SET = 0x8008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4008700b
- RTC_IRQP_SET = 0x8008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x40207011
- RTC_PLL_SET = 0x80207012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELLINKPROP = 0x6d
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETLINKPROP = 0x6e
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWLINKPROP = 0x6c
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x18
- RTM_NR_MSGTYPES = 0x60
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x4004667f
- SIOCOUTQ = 0x40047473
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x1000
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x14
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x15
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x10
- SO_RCVTIMEO = 0x12
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x12
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x11
- SO_SNDTIMEO = 0x13
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x13
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_ATTR_VERITY = 0x100000
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x400
- TAB2 = 0x800
- TAB3 = 0xc00
- TABDLY = 0xc00
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x2000741f
- TCGETA = 0x40147417
- TCGETS = 0x402c7413
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_TX_DELAY = 0x25
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x2000741d
- TCSBRKP = 0x5425
- TCSETA = 0x80147418
- TCSETAF = 0x8014741c
- TCSETAW = 0x80147419
- TCSETS = 0x802c7414
- TCSETSF = 0x802c7416
- TCSETSW = 0x802c7415
- TCXONC = 0x2000741e
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x40045432
- TIOCGETC = 0x40067412
- TIOCGETD = 0x5424
- TIOCGETP = 0x40067408
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x40285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGLTC = 0x40067474
- TIOCGPGRP = 0x40047477
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40045430
- TIOCGPTPEER = 0x20005441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x4004667f
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_LOOP = 0x8000
- TIOCM_OUT1 = 0x2000
- TIOCM_OUT2 = 0x4000
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETC = 0x80067411
- TIOCSETD = 0x5423
- TIOCSETN = 0x8006740a
- TIOCSETP = 0x80067409
- TIOCSIG = 0x80045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSLTC = 0x80067475
- TIOCSPGRP = 0x80047476
- TIOCSPTLCK = 0x80045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTART = 0x2000746e
- TIOCSTI = 0x5412
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_AEAD_ALG_NAME = 0x20
- TIPC_AEAD_KEYLEN_MAX = 0x24
- TIPC_AEAD_KEYLEN_MIN = 0x14
- TIPC_AEAD_KEY_SIZE_MAX = 0x48
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODELAY = 0x8a
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x400000
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0x10
- VEOF = 0x4
- VEOL = 0x6
- VEOL2 = 0x8
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x5
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xb
- VSTART = 0xd
- VSTOP = 0xe
- VSUSP = 0xc
- VSWTC = 0x9
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x7
- VWERASE = 0xa
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4000
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0xc00
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x17
+ B115200 = 0x11
+ B1152000 = 0x18
+ B1500000 = 0x19
+ B2000000 = 0x1a
+ B230400 = 0x12
+ B2500000 = 0x1b
+ B3000000 = 0x1c
+ B3500000 = 0x1d
+ B4000000 = 0x1e
+ B460800 = 0x13
+ B500000 = 0x14
+ B57600 = 0x10
+ B576000 = 0x15
+ B921600 = 0x16
+ BLKBSZGET = 0x40081270
+ BLKBSZSET = 0x80081271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40081272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1f
+ BS1 = 0x8000
+ BSDLY = 0x8000
+ CBAUD = 0xff
+ CBAUDEX = 0x0
+ CIBAUD = 0xff0000
+ CLOCAL = 0x8000
+ CR1 = 0x1000
+ CR2 = 0x2000
+ CR3 = 0x3000
+ CRDLY = 0x3000
+ CREAD = 0x800
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTOPB = 0x400
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000000
+ FF1 = 0x4000
+ FFDLY = 0x4000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x800000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0xc
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0xd
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0xe
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x4000
+ ICANON = 0x100
+ IEXTEN = 0x400
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x80
+ IUCLC = 0x1000
+ IXOFF = 0x400
+ IXON = 0x200
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x80
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x40
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x2000
+ MCL_FUTURE = 0x4000
+ MCL_ONFAULT = 0x8000
+ NFDBITS = 0x40
+ NL2 = 0x200
+ NL3 = 0x300
+ NLDLY = 0x300
+ NOFLSH = 0x80000000
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x4
+ ONLCR = 0x2
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x20000
+ O_DIRECTORY = 0x4000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x8000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x404000
+ O_TRUNC = 0x200
+ PARENB = 0x1000
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4010743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80107446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x8010744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80107447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PROT_SAO = 0x10
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_GETEVRREGS = 0x14
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETREGS64 = 0x16
+ PTRACE_GETVRREGS = 0x12
+ PTRACE_GETVSRREGS = 0x1b
+ PTRACE_GET_DEBUGREG = 0x19
+ PTRACE_SETEVRREGS = 0x15
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETREGS64 = 0x17
+ PTRACE_SETVRREGS = 0x13
+ PTRACE_SETVSRREGS = 0x1c
+ PTRACE_SET_DEBUGREG = 0x1a
+ PTRACE_SINGLEBLOCK = 0x100
+ PTRACE_SYSEMU = 0x1d
+ PTRACE_SYSEMU_SINGLESTEP = 0x1e
+ PT_CCR = 0x26
+ PT_CTR = 0x23
+ PT_DAR = 0x29
+ PT_DSCR = 0x2c
+ PT_DSISR = 0x2a
+ PT_FPR0 = 0x30
+ PT_FPSCR = 0x50
+ PT_LNK = 0x24
+ PT_MSR = 0x21
+ PT_NIP = 0x20
+ PT_ORIG_R3 = 0x22
+ PT_R0 = 0x0
+ PT_R1 = 0x1
+ PT_R10 = 0xa
+ PT_R11 = 0xb
+ PT_R12 = 0xc
+ PT_R13 = 0xd
+ PT_R14 = 0xe
+ PT_R15 = 0xf
+ PT_R16 = 0x10
+ PT_R17 = 0x11
+ PT_R18 = 0x12
+ PT_R19 = 0x13
+ PT_R2 = 0x2
+ PT_R20 = 0x14
+ PT_R21 = 0x15
+ PT_R22 = 0x16
+ PT_R23 = 0x17
+ PT_R24 = 0x18
+ PT_R25 = 0x19
+ PT_R26 = 0x1a
+ PT_R27 = 0x1b
+ PT_R28 = 0x1c
+ PT_R29 = 0x1d
+ PT_R3 = 0x3
+ PT_R30 = 0x1e
+ PT_R31 = 0x1f
+ PT_R4 = 0x4
+ PT_R5 = 0x5
+ PT_R6 = 0x6
+ PT_R7 = 0x7
+ PT_R8 = 0x8
+ PT_R9 = 0x9
+ PT_REGS_COUNT = 0x2c
+ PT_RESULT = 0x2b
+ PT_SOFTE = 0x27
+ PT_TRAP = 0x28
+ PT_VR0 = 0x52
+ PT_VRSAVE = 0x94
+ PT_VSCR = 0x93
+ PT_VSR0 = 0x96
+ PT_VSR31 = 0xd4
+ PT_XER = 0x25
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4008700d
+ RTC_EPOCH_SET = 0x8008700e
+ RTC_IRQP_READ = 0x4008700b
+ RTC_IRQP_SET = 0x8008700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x40207011
+ RTC_PLL_SET = 0x80207012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x4004667f
+ SIOCOUTQ = 0x40047473
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x14
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x15
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x10
+ SO_RCVTIMEO = 0x12
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x12
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x11
+ SO_SNDTIMEO = 0x13
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x13
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x400
+ TAB2 = 0x800
+ TAB3 = 0xc00
+ TABDLY = 0xc00
+ TCFLSH = 0x2000741f
+ TCGETA = 0x40147417
+ TCGETS = 0x402c7413
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x2000741d
+ TCSBRKP = 0x5425
+ TCSETA = 0x80147418
+ TCSETAF = 0x8014741c
+ TCSETAW = 0x80147419
+ TCSETS = 0x802c7414
+ TCSETSF = 0x802c7416
+ TCSETSW = 0x802c7415
+ TCXONC = 0x2000741e
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x40045432
+ TIOCGETC = 0x40067412
+ TIOCGETD = 0x5424
+ TIOCGETP = 0x40067408
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x40285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGLTC = 0x40067474
+ TIOCGPGRP = 0x40047477
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40045430
+ TIOCGPTPEER = 0x20005441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x4004667f
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_LOOP = 0x8000
+ TIOCM_OUT1 = 0x2000
+ TIOCM_OUT2 = 0x4000
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETC = 0x80067411
+ TIOCSETD = 0x5423
+ TIOCSETN = 0x8006740a
+ TIOCSETP = 0x80067409
+ TIOCSIG = 0x80045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSLTC = 0x80067475
+ TIOCSPGRP = 0x80047476
+ TIOCSPTLCK = 0x80045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTART = 0x2000746e
+ TIOCSTI = 0x5412
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x400000
+ TUNATTACHFILTER = 0x801054d5
+ TUNDETACHFILTER = 0x801054d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x401054db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0x10
+ VEOF = 0x4
+ VEOL = 0x6
+ VEOL2 = 0x8
+ VMIN = 0x5
+ VREPRINT = 0xb
+ VSTART = 0xd
+ VSTOP = 0xe
+ VSUSP = 0xc
+ VSWTC = 0x9
+ VT1 = 0x10000
+ VTDLY = 0x10000
+ VTIME = 0x7
+ VWERASE = 0xa
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x40
+ XCASE = 0x4000
+ XTABS = 0xc00
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2938,23 +579,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x3a)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2971,8 +604,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2980,99 +611,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
index 30afa57..7cc98f0 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
@@ -1,2860 +1,501 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build riscv64 && linux
// +build riscv64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x80081270
- BLKBSZSET = 0x40081271
- BLKFLSBUF = 0x1261
- BLKFRAGET = 0x1265
- BLKFRASET = 0x1264
- BLKGETSIZE = 0x1260
- BLKGETSIZE64 = 0x80081272
- BLKPBSZGET = 0x127b
- BLKRAGET = 0x1263
- BLKRASET = 0x1262
- BLKROGET = 0x125e
- BLKROSET = 0x125d
- BLKRRPART = 0x125f
- BLKSECTGET = 0x1267
- BLKSECTSET = 0x1266
- BLKSSZGET = 0x1268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_MMAPABLE = 0x400
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_ARGS_SIZE_VER1 = 0x50
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_CLEAR_SIGHAND = 0x100000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0xf
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0xf
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0x5
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_COLD = 0x14
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0x15
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0xb703
- NS_GET_OWNER_UID = 0xb704
- NS_GET_PARENT = 0xb702
- NS_GET_USERNS = 0xb701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x2401
- PERF_EVENT_IOC_ENABLE = 0x2400
- PERF_EVENT_IOC_ID = 0x80082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
- PERF_EVENT_IOC_PERIOD = 0x40082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x2402
- PERF_EVENT_IOC_RESET = 0x2403
- PERF_EVENT_IOC_SET_BPF = 0x40042408
- PERF_EVENT_IOC_SET_FILTER = 0x40082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x2405
- PIPEFS_MAGIC = 0x50495045
- PPC_CMM_MAGIC = 0xc7571590
- PPPIOCATTACH = 0x4004743d
- PPPIOCATTCHAN = 0x40047438
- PPPIOCCONNECT = 0x4004743a
- PPPIOCDETACH = 0x4004743c
- PPPIOCDISCONN = 0x7439
- PPPIOCGASYNCMAP = 0x80047458
- PPPIOCGCHAN = 0x80047437
- PPPIOCGDEBUG = 0x80047441
- PPPIOCGFLAGS = 0x8004745a
- PPPIOCGIDLE = 0x8010743f
- PPPIOCGIDLE32 = 0x8008743f
- PPPIOCGIDLE64 = 0x8010743f
- PPPIOCGL2TPSTATS = 0x80487436
- PPPIOCGMRU = 0x80047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x80047455
- PPPIOCGUNIT = 0x80047456
- PPPIOCGXASYNCMAP = 0x80207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x40107446
- PPPIOCSASYNCMAP = 0x40047457
- PPPIOCSCOMPRESS = 0x4010744d
- PPPIOCSDEBUG = 0x40047440
- PPPIOCSFLAGS = 0x40047459
- PPPIOCSMAXCID = 0x40047451
- PPPIOCSMRRU = 0x4004743b
- PPPIOCSMRU = 0x40047452
- PPPIOCSNPMODE = 0x4008744b
- PPPIOCSPASS = 0x40107447
- PPPIOCSRASYNCMAP = 0x40047454
- PPPIOCSXASYNCMAP = 0x4020744f
- PPPIOCXFERUNIT = 0x744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x40085203
- RNDADDTOENTCNT = 0x40045201
- RNDCLEARPOOL = 0x5206
- RNDGETENTCNT = 0x80045200
- RNDGETPOOL = 0x80085202
- RNDRESEEDCRNG = 0x5207
- RNDZAPENTCNT = 0x5204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x7002
- RTC_AIE_ON = 0x7001
- RTC_ALM_READ = 0x80247008
- RTC_ALM_SET = 0x40247007
- RTC_EPOCH_READ = 0x8008700d
- RTC_EPOCH_SET = 0x4008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x8008700b
- RTC_IRQP_SET = 0x4008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x7006
- RTC_PIE_ON = 0x7005
- RTC_PLL_GET = 0x80207011
- RTC_PLL_SET = 0x40207012
- RTC_RD_TIME = 0x80247009
- RTC_SET_TIME = 0x4024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x7004
- RTC_UIE_ON = 0x7003
- RTC_VL_CLR = 0x7014
- RTC_VL_READ = 0x80047013
- RTC_WIE_OFF = 0x7010
- RTC_WIE_ON = 0x700f
- RTC_WKALM_RD = 0x80287010
- RTC_WKALM_SET = 0x4028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELLINKPROP = 0x6d
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETLINKPROP = 0x6e
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWLINKPROP = 0x6c
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x18
- RTM_NR_MSGTYPES = 0x60
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x80108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x80108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x541b
- SIOCOUTQ = 0x5411
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x1000
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_ATTR_VERITY = 0x100000
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_TX_DELAY = 0x25
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x80285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGPTPEER = 0x5441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_AEAD_ALG_NAME = 0x20
- TIPC_AEAD_KEYLEN_MAX = 0x24
- TIPC_AEAD_KEYLEN_MIN = 0x14
- TIPC_AEAD_KEY_SIZE_MAX = 0x48
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODELAY = 0x8a
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x401054d5
- TUNDETACHFILTER = 0x401054d6
- TUNGETDEVNETNS = 0x54e3
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x801054db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETCARRIER = 0x400454e2
- TUNSETDEBUG = 0x400454c9
- TUNSETFILTEREBPF = 0x800454e1
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETSTEERINGEBPF = 0x800454e0
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- UBI_IOCATT = 0x40186f40
- UBI_IOCDET = 0x40046f41
- UBI_IOCEBCH = 0x40044f02
- UBI_IOCEBER = 0x40044f01
- UBI_IOCEBISMAP = 0x80044f05
- UBI_IOCEBMAP = 0x40084f03
- UBI_IOCEBUNMAP = 0x40044f04
- UBI_IOCMKVOL = 0x40986f00
- UBI_IOCRMVOL = 0x40046f01
- UBI_IOCRNVOL = 0x51106f03
- UBI_IOCRPEB = 0x40046f04
- UBI_IOCRSVOL = 0x400c6f02
- UBI_IOCSETVOLPROP = 0x40104f06
- UBI_IOCSPEB = 0x40046f05
- UBI_IOCVOLCRBLK = 0x40804f07
- UBI_IOCVOLRMBLK = 0x4f08
- UBI_IOCVOLUP = 0x40084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x80045702
- WDIOC_GETPRETIMEOUT = 0x80045709
- WDIOC_GETSTATUS = 0x80045701
- WDIOC_GETSUPPORT = 0x80285700
- WDIOC_GETTEMP = 0x80045703
- WDIOC_GETTIMELEFT = 0x8004570a
- WDIOC_GETTIMEOUT = 0x80045707
- WDIOC_KEEPALIVE = 0x80045705
- WDIOC_SETOPTIONS = 0x80045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x80081270
+ BLKBSZSET = 0x40081271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80081272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0x5
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x4000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8010743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40107446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x4010744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40107447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8008700d
+ RTC_EPOCH_SET = 0x4008700e
+ RTC_IRQP_READ = 0x8008700b
+ RTC_IRQP_SET = 0x4008700c
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x80207011
+ RTC_PLL_SET = 0x40207012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x401054d5
+ TUNDETACHFILTER = 0x401054d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x801054db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2863,23 +504,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x23)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2896,8 +529,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2905,99 +536,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index 5dc08e9..a508392 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -1,2933 +1,574 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build s390x && linux
// +build s390x,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x80081270
- BLKBSZSET = 0x40081271
- BLKFLSBUF = 0x1261
- BLKFRAGET = 0x1265
- BLKFRASET = 0x1264
- BLKGETSIZE = 0x1260
- BLKGETSIZE64 = 0x80081272
- BLKPBSZGET = 0x127b
- BLKRAGET = 0x1263
- BLKRASET = 0x1262
- BLKROGET = 0x125e
- BLKROSET = 0x125d
- BLKRRPART = 0x125f
- BLKSECTGET = 0x1267
- BLKSECTSET = 0x1266
- BLKSSZGET = 0x1268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_MMAPABLE = 0x400
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_ARGS_SIZE_VER1 = 0x50
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_CLEAR_SIGHAND = 0x100000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x80000
- EFD_NONBLOCK = 0x800
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x80000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0xf
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0xf
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x5
- F_GETLK64 = 0x5
- F_GETOWN = 0x9
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x0
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x6
- F_SETLK64 = 0x6
- F_SETLKW = 0x7
- F_SETLKW64 = 0x7
- F_SETOWN = 0x8
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x2
- F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x80000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x800
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_COLD = 0x14
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0x15
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x100
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x2000
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x4000
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MCL_ONFAULT = 0x4
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0xb703
- NS_GET_OWNER_UID = 0xb704
- NS_GET_PARENT = 0xb702
- NS_GET_USERNS = 0xb701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x400
- O_ASYNC = 0x2000
- O_CLOEXEC = 0x80000
- O_CREAT = 0x40
- O_DIRECT = 0x4000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x1000
- O_EXCL = 0x80
- O_FSYNC = 0x101000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x800
- O_NOATIME = 0x40000
- O_NOCTTY = 0x100
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x800
- O_PATH = 0x200000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x101000
- O_SYNC = 0x101000
- O_TMPFILE = 0x410000
- O_TRUNC = 0x200
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x2401
- PERF_EVENT_IOC_ENABLE = 0x2400
- PERF_EVENT_IOC_ID = 0x80082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
- PERF_EVENT_IOC_PERIOD = 0x40082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x2402
- PERF_EVENT_IOC_RESET = 0x2403
- PERF_EVENT_IOC_SET_BPF = 0x40042408
- PERF_EVENT_IOC_SET_FILTER = 0x40082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x2405
- PIPEFS_MAGIC = 0x50495045
- PPC_CMM_MAGIC = 0xc7571590
- PPPIOCATTACH = 0x4004743d
- PPPIOCATTCHAN = 0x40047438
- PPPIOCCONNECT = 0x4004743a
- PPPIOCDETACH = 0x4004743c
- PPPIOCDISCONN = 0x7439
- PPPIOCGASYNCMAP = 0x80047458
- PPPIOCGCHAN = 0x80047437
- PPPIOCGDEBUG = 0x80047441
- PPPIOCGFLAGS = 0x8004745a
- PPPIOCGIDLE = 0x8010743f
- PPPIOCGIDLE32 = 0x8008743f
- PPPIOCGIDLE64 = 0x8010743f
- PPPIOCGL2TPSTATS = 0x80487436
- PPPIOCGMRU = 0x80047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x80047455
- PPPIOCGUNIT = 0x80047456
- PPPIOCGXASYNCMAP = 0x80207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x40107446
- PPPIOCSASYNCMAP = 0x40047457
- PPPIOCSCOMPRESS = 0x4010744d
- PPPIOCSDEBUG = 0x40047440
- PPPIOCSFLAGS = 0x40047459
- PPPIOCSMAXCID = 0x40047451
- PPPIOCSMRRU = 0x4004743b
- PPPIOCSMRU = 0x40047452
- PPPIOCSNPMODE = 0x4008744b
- PPPIOCSPASS = 0x40107447
- PPPIOCSRASYNCMAP = 0x40047454
- PPPIOCSXASYNCMAP = 0x4020744f
- PPPIOCXFERUNIT = 0x744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_DISABLE_TE = 0x5010
- PTRACE_ENABLE_TE = 0x5009
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_LAST_BREAK = 0x5006
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_OLDSETOPTIONS = 0x15
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKDATA_AREA = 0x5003
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKTEXT_AREA = 0x5002
- PTRACE_PEEKUSR = 0x3
- PTRACE_PEEKUSR_AREA = 0x5000
- PTRACE_PEEK_SYSTEM_CALL = 0x5007
- PTRACE_POKEDATA = 0x5
- PTRACE_POKEDATA_AREA = 0x5005
- PTRACE_POKETEXT = 0x4
- PTRACE_POKETEXT_AREA = 0x5004
- PTRACE_POKEUSR = 0x6
- PTRACE_POKEUSR_AREA = 0x5001
- PTRACE_POKE_SYSTEM_CALL = 0x5008
- PTRACE_PROT = 0x15
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SINGLEBLOCK = 0xc
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TE_ABORT_RAND = 0x5011
- PTRACE_TRACEME = 0x0
- PT_ACR0 = 0x90
- PT_ACR1 = 0x94
- PT_ACR10 = 0xb8
- PT_ACR11 = 0xbc
- PT_ACR12 = 0xc0
- PT_ACR13 = 0xc4
- PT_ACR14 = 0xc8
- PT_ACR15 = 0xcc
- PT_ACR2 = 0x98
- PT_ACR3 = 0x9c
- PT_ACR4 = 0xa0
- PT_ACR5 = 0xa4
- PT_ACR6 = 0xa8
- PT_ACR7 = 0xac
- PT_ACR8 = 0xb0
- PT_ACR9 = 0xb4
- PT_CR_10 = 0x168
- PT_CR_11 = 0x170
- PT_CR_9 = 0x160
- PT_ENDREGS = 0x1af
- PT_FPC = 0xd8
- PT_FPR0 = 0xe0
- PT_FPR1 = 0xe8
- PT_FPR10 = 0x130
- PT_FPR11 = 0x138
- PT_FPR12 = 0x140
- PT_FPR13 = 0x148
- PT_FPR14 = 0x150
- PT_FPR15 = 0x158
- PT_FPR2 = 0xf0
- PT_FPR3 = 0xf8
- PT_FPR4 = 0x100
- PT_FPR5 = 0x108
- PT_FPR6 = 0x110
- PT_FPR7 = 0x118
- PT_FPR8 = 0x120
- PT_FPR9 = 0x128
- PT_GPR0 = 0x10
- PT_GPR1 = 0x18
- PT_GPR10 = 0x60
- PT_GPR11 = 0x68
- PT_GPR12 = 0x70
- PT_GPR13 = 0x78
- PT_GPR14 = 0x80
- PT_GPR15 = 0x88
- PT_GPR2 = 0x20
- PT_GPR3 = 0x28
- PT_GPR4 = 0x30
- PT_GPR5 = 0x38
- PT_GPR6 = 0x40
- PT_GPR7 = 0x48
- PT_GPR8 = 0x50
- PT_GPR9 = 0x58
- PT_IEEE_IP = 0x1a8
- PT_LASTOFF = 0x1a8
- PT_ORIGGPR2 = 0xd0
- PT_PSWADDR = 0x8
- PT_PSWMASK = 0x0
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x7
- RLIMIT_NPROC = 0x6
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x40085203
- RNDADDTOENTCNT = 0x40045201
- RNDCLEARPOOL = 0x5206
- RNDGETENTCNT = 0x80045200
- RNDGETPOOL = 0x80085202
- RNDRESEEDCRNG = 0x5207
- RNDZAPENTCNT = 0x5204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x7002
- RTC_AIE_ON = 0x7001
- RTC_ALM_READ = 0x80247008
- RTC_ALM_SET = 0x40247007
- RTC_EPOCH_READ = 0x8008700d
- RTC_EPOCH_SET = 0x4008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x8008700b
- RTC_IRQP_SET = 0x4008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x7006
- RTC_PIE_ON = 0x7005
- RTC_PLL_GET = 0x80207011
- RTC_PLL_SET = 0x40207012
- RTC_RD_TIME = 0x80247009
- RTC_SET_TIME = 0x4024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x7004
- RTC_UIE_ON = 0x7003
- RTC_VL_CLR = 0x7014
- RTC_VL_READ = 0x80047013
- RTC_WIE_OFF = 0x7010
- RTC_WIE_ON = 0x700f
- RTC_WKALM_RD = 0x80287010
- RTC_WKALM_SET = 0x4028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELLINKPROP = 0x6d
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETLINKPROP = 0x6e
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWLINKPROP = 0x6c
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x18
- RTM_NR_MSGTYPES = 0x60
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x25
- SCM_TIMESTAMPING_OPT_STATS = 0x36
- SCM_TIMESTAMPING_PKTINFO = 0x3a
- SCM_TIMESTAMPNS = 0x23
- SCM_TXTIME = 0x3d
- SCM_WIFI_STATUS = 0x29
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x80000
- SFD_NONBLOCK = 0x800
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x80108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x80108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x541b
- SIOCOUTQ = 0x5411
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x80000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x800
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0x1
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x1000
- SO_ACCEPTCONN = 0x1e
- SO_ATTACH_BPF = 0x32
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x33
- SO_ATTACH_REUSEPORT_EBPF = 0x34
- SO_BINDTODEVICE = 0x19
- SO_BINDTOIFINDEX = 0x3e
- SO_BPF_EXTENSIONS = 0x30
- SO_BROADCAST = 0x6
- SO_BSDCOMPAT = 0xe
- SO_BUSY_POLL = 0x2e
- SO_CNX_ADVICE = 0x35
- SO_COOKIE = 0x39
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x44
- SO_DOMAIN = 0x27
- SO_DONTROUTE = 0x5
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x4
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x31
- SO_INCOMING_NAPI_ID = 0x38
- SO_KEEPALIVE = 0x9
- SO_LINGER = 0xd
- SO_LOCK_FILTER = 0x2c
- SO_MARK = 0x24
- SO_MAX_PACING_RATE = 0x2f
- SO_MEMINFO = 0x37
- SO_NOFCS = 0x2b
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0xa
- SO_PASSCRED = 0x10
- SO_PASSSEC = 0x22
- SO_PEEK_OFF = 0x2a
- SO_PEERCRED = 0x11
- SO_PEERGROUPS = 0x3b
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1f
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x26
- SO_RCVBUF = 0x8
- SO_RCVBUFFORCE = 0x21
- SO_RCVLOWAT = 0x12
- SO_RCVTIMEO = 0x14
- SO_RCVTIMEO_NEW = 0x42
- SO_RCVTIMEO_OLD = 0x14
- SO_REUSEADDR = 0x2
- SO_REUSEPORT = 0xf
- SO_RXQ_OVFL = 0x28
- SO_SECURITY_AUTHENTICATION = 0x16
- SO_SECURITY_ENCRYPTION_NETWORK = 0x18
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
- SO_SELECT_ERR_QUEUE = 0x2d
- SO_SNDBUF = 0x7
- SO_SNDBUFFORCE = 0x20
- SO_SNDLOWAT = 0x13
- SO_SNDTIMEO = 0x15
- SO_SNDTIMEO_NEW = 0x43
- SO_SNDTIMEO_OLD = 0x15
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x25
- SO_TIMESTAMPING_NEW = 0x41
- SO_TIMESTAMPING_OLD = 0x25
- SO_TIMESTAMPNS = 0x23
- SO_TIMESTAMPNS_NEW = 0x40
- SO_TIMESTAMPNS_OLD = 0x23
- SO_TIMESTAMP_NEW = 0x3f
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3d
- SO_TYPE = 0x3
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x29
- SO_ZEROCOPY = 0x3c
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_ATTR_VERITY = 0x100000
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x540b
- TCGETA = 0x5405
- TCGETS = 0x5401
- TCGETS2 = 0x802c542a
- TCGETX = 0x5432
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_TX_DELAY = 0x25
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x5409
- TCSBRKP = 0x5425
- TCSETA = 0x5406
- TCSETAF = 0x5408
- TCSETAW = 0x5407
- TCSETS = 0x5402
- TCSETS2 = 0x402c542b
- TCSETSF = 0x5404
- TCSETSF2 = 0x402c542d
- TCSETSW = 0x5403
- TCSETSW2 = 0x402c542c
- TCSETX = 0x5433
- TCSETXF = 0x5434
- TCSETXW = 0x5435
- TCXONC = 0x540a
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x5428
- TIOCCONS = 0x541d
- TIOCEXCL = 0x540c
- TIOCGDEV = 0x80045432
- TIOCGETD = 0x5424
- TIOCGEXCL = 0x80045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x80285442
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x540f
- TIOCGPKT = 0x80045438
- TIOCGPTLCK = 0x80045439
- TIOCGPTN = 0x80045430
- TIOCGPTPEER = 0x5441
- TIOCGRS485 = 0x542e
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x5429
- TIOCGSOFTCAR = 0x5419
- TIOCGWINSZ = 0x5413
- TIOCINQ = 0x541b
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x5417
- TIOCMBIS = 0x5416
- TIOCMGET = 0x5415
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x5418
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x5422
- TIOCNXCL = 0x540d
- TIOCOUTQ = 0x5411
- TIOCPKT = 0x5420
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x5427
- TIOCSCTTY = 0x540e
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSER_TEMT = 0x1
- TIOCSETD = 0x5423
- TIOCSIG = 0x40045436
- TIOCSISO7816 = 0xc0285443
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x5410
- TIOCSPTLCK = 0x40045431
- TIOCSRS485 = 0x542f
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x541a
- TIOCSTI = 0x5412
- TIOCSWINSZ = 0x5414
- TIOCVHANGUP = 0x5437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_AEAD_ALG_NAME = 0x20
- TIPC_AEAD_KEYLEN_MAX = 0x24
- TIPC_AEAD_KEYLEN_MIN = 0x14
- TIPC_AEAD_KEY_SIZE_MAX = 0x48
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODELAY = 0x8a
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x401054d5
- TUNDETACHFILTER = 0x401054d6
- TUNGETDEVNETNS = 0x54e3
- TUNGETFEATURES = 0x800454cf
- TUNGETFILTER = 0x801054db
- TUNGETIFF = 0x800454d2
- TUNGETSNDBUF = 0x800454d3
- TUNGETVNETBE = 0x800454df
- TUNGETVNETHDRSZ = 0x800454d7
- TUNGETVNETLE = 0x800454dd
- TUNSETCARRIER = 0x400454e2
- TUNSETDEBUG = 0x400454c9
- TUNSETFILTEREBPF = 0x800454e1
- TUNSETGROUP = 0x400454ce
- TUNSETIFF = 0x400454ca
- TUNSETIFINDEX = 0x400454da
- TUNSETLINK = 0x400454cd
- TUNSETNOCSUM = 0x400454c8
- TUNSETOFFLOAD = 0x400454d0
- TUNSETOWNER = 0x400454cc
- TUNSETPERSIST = 0x400454cb
- TUNSETQUEUE = 0x400454d9
- TUNSETSNDBUF = 0x400454d4
- TUNSETSTEERINGEBPF = 0x800454e0
- TUNSETTXFILTER = 0x400454d1
- TUNSETVNETBE = 0x400454de
- TUNSETVNETHDRSZ = 0x400454d8
- TUNSETVNETLE = 0x400454dc
- UBI_IOCATT = 0x40186f40
- UBI_IOCDET = 0x40046f41
- UBI_IOCEBCH = 0x40044f02
- UBI_IOCEBER = 0x40044f01
- UBI_IOCEBISMAP = 0x80044f05
- UBI_IOCEBMAP = 0x40084f03
- UBI_IOCEBUNMAP = 0x40044f04
- UBI_IOCMKVOL = 0x40986f00
- UBI_IOCRMVOL = 0x40046f01
- UBI_IOCRNVOL = 0x51106f03
- UBI_IOCRPEB = 0x40046f04
- UBI_IOCRSVOL = 0x400c6f02
- UBI_IOCSETVOLPROP = 0x40104f06
- UBI_IOCSPEB = 0x40046f05
- UBI_IOCVOLCRBLK = 0x40804f07
- UBI_IOCVOLRMBLK = 0x4f08
- UBI_IOCVOLUP = 0x40084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x80045702
- WDIOC_GETPRETIMEOUT = 0x80045709
- WDIOC_GETSTATUS = 0x80045701
- WDIOC_GETSUPPORT = 0x80285700
- WDIOC_GETTEMP = 0x80045703
- WDIOC_GETTIMELEFT = 0x8004570a
- WDIOC_GETTIMEOUT = 0x80045707
- WDIOC_KEEPALIVE = 0x80045705
- WDIOC_SETOPTIONS = 0x80045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x80081270
+ BLKBSZSET = 0x40081271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80081272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0x5
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x4000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8010743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40107446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x4010744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40107447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_DISABLE_TE = 0x5010
+ PTRACE_ENABLE_TE = 0x5009
+ PTRACE_GET_LAST_BREAK = 0x5006
+ PTRACE_OLDSETOPTIONS = 0x15
+ PTRACE_PEEKDATA_AREA = 0x5003
+ PTRACE_PEEKTEXT_AREA = 0x5002
+ PTRACE_PEEKUSR_AREA = 0x5000
+ PTRACE_PEEK_SYSTEM_CALL = 0x5007
+ PTRACE_POKEDATA_AREA = 0x5005
+ PTRACE_POKETEXT_AREA = 0x5004
+ PTRACE_POKEUSR_AREA = 0x5001
+ PTRACE_POKE_SYSTEM_CALL = 0x5008
+ PTRACE_PROT = 0x15
+ PTRACE_SINGLEBLOCK = 0xc
+ PTRACE_TE_ABORT_RAND = 0x5011
+ PT_ACR0 = 0x90
+ PT_ACR1 = 0x94
+ PT_ACR10 = 0xb8
+ PT_ACR11 = 0xbc
+ PT_ACR12 = 0xc0
+ PT_ACR13 = 0xc4
+ PT_ACR14 = 0xc8
+ PT_ACR15 = 0xcc
+ PT_ACR2 = 0x98
+ PT_ACR3 = 0x9c
+ PT_ACR4 = 0xa0
+ PT_ACR5 = 0xa4
+ PT_ACR6 = 0xa8
+ PT_ACR7 = 0xac
+ PT_ACR8 = 0xb0
+ PT_ACR9 = 0xb4
+ PT_CR_10 = 0x168
+ PT_CR_11 = 0x170
+ PT_CR_9 = 0x160
+ PT_ENDREGS = 0x1af
+ PT_FPC = 0xd8
+ PT_FPR0 = 0xe0
+ PT_FPR1 = 0xe8
+ PT_FPR10 = 0x130
+ PT_FPR11 = 0x138
+ PT_FPR12 = 0x140
+ PT_FPR13 = 0x148
+ PT_FPR14 = 0x150
+ PT_FPR15 = 0x158
+ PT_FPR2 = 0xf0
+ PT_FPR3 = 0xf8
+ PT_FPR4 = 0x100
+ PT_FPR5 = 0x108
+ PT_FPR6 = 0x110
+ PT_FPR7 = 0x118
+ PT_FPR8 = 0x120
+ PT_FPR9 = 0x128
+ PT_GPR0 = 0x10
+ PT_GPR1 = 0x18
+ PT_GPR10 = 0x60
+ PT_GPR11 = 0x68
+ PT_GPR12 = 0x70
+ PT_GPR13 = 0x78
+ PT_GPR14 = 0x80
+ PT_GPR15 = 0x88
+ PT_GPR2 = 0x20
+ PT_GPR3 = 0x28
+ PT_GPR4 = 0x30
+ PT_GPR5 = 0x38
+ PT_GPR6 = 0x40
+ PT_GPR7 = 0x48
+ PT_GPR8 = 0x50
+ PT_GPR9 = 0x58
+ PT_IEEE_IP = 0x1a8
+ PT_LASTOFF = 0x1a8
+ PT_ORIGGPR2 = 0xd0
+ PT_PSWADDR = 0x8
+ PT_PSWMASK = 0x0
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8008700d
+ RTC_EPOCH_SET = 0x4008700e
+ RTC_IRQP_READ = 0x8008700b
+ RTC_IRQP_SET = 0x4008700c
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x80207011
+ RTC_PLL_SET = 0x40207012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x401054d5
+ TUNDETACHFILTER = 0x401054d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x801054db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x62)
EADDRNOTAVAIL = syscall.Errno(0x63)
EADV = syscall.Errno(0x44)
EAFNOSUPPORT = syscall.Errno(0x61)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x72)
EBADE = syscall.Errno(0x34)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x4d)
EBADMSG = syscall.Errno(0x4a)
EBADR = syscall.Errno(0x35)
EBADRQC = syscall.Errno(0x38)
EBADSLT = syscall.Errno(0x39)
EBFONT = syscall.Errno(0x3b)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7d)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x2c)
ECOMM = syscall.Errno(0x46)
ECONNABORTED = syscall.Errno(0x67)
@@ -2936,23 +577,15 @@ const (
EDEADLK = syscall.Errno(0x23)
EDEADLOCK = syscall.Errno(0x23)
EDESTADDRREQ = syscall.Errno(0x59)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x49)
EDQUOT = syscall.Errno(0x7a)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x70)
EHOSTUNREACH = syscall.Errno(0x71)
EHWPOISON = syscall.Errno(0x85)
EIDRM = syscall.Errno(0x2b)
EILSEQ = syscall.Errno(0x54)
EINPROGRESS = syscall.Errno(0x73)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x6a)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x7f)
EKEYREJECTED = syscall.Errno(0x81)
@@ -2969,8 +602,6 @@ const (
ELNRNG = syscall.Errno(0x30)
ELOOP = syscall.Errno(0x28)
EMEDIUMTYPE = syscall.Errno(0x7c)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x5a)
EMULTIHOP = syscall.Errno(0x48)
ENAMETOOLONG = syscall.Errno(0x24)
@@ -2978,99 +609,67 @@ const (
ENETDOWN = syscall.Errno(0x64)
ENETRESET = syscall.Errno(0x66)
ENETUNREACH = syscall.Errno(0x65)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x37)
ENOBUFS = syscall.Errno(0x69)
ENOCSI = syscall.Errno(0x32)
ENODATA = syscall.Errno(0x3d)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x7e)
ENOLCK = syscall.Errno(0x25)
ENOLINK = syscall.Errno(0x43)
ENOMEDIUM = syscall.Errno(0x7b)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x2a)
ENONET = syscall.Errno(0x40)
ENOPKG = syscall.Errno(0x41)
ENOPROTOOPT = syscall.Errno(0x5c)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x3f)
ENOSTR = syscall.Errno(0x3c)
ENOSYS = syscall.Errno(0x26)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x6b)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x27)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x83)
ENOTSOCK = syscall.Errno(0x58)
ENOTSUP = syscall.Errno(0x5f)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x4c)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x5f)
EOVERFLOW = syscall.Errno(0x4b)
EOWNERDEAD = syscall.Errno(0x82)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x60)
- EPIPE = syscall.Errno(0x20)
EPROTO = syscall.Errno(0x47)
EPROTONOSUPPORT = syscall.Errno(0x5d)
EPROTOTYPE = syscall.Errno(0x5b)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x4e)
EREMOTE = syscall.Errno(0x42)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x55)
ERFKILL = syscall.Errno(0x84)
- EROFS = syscall.Errno(0x1e)
ESHUTDOWN = syscall.Errno(0x6c)
ESOCKTNOSUPPORT = syscall.Errno(0x5e)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x45)
ESTALE = syscall.Errno(0x74)
ESTRPIPE = syscall.Errno(0x56)
ETIME = syscall.Errno(0x3e)
ETIMEDOUT = syscall.Errno(0x6e)
ETOOMANYREFS = syscall.Errno(0x6d)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x31)
EUSERS = syscall.Errno(0x57)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x36)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0x7)
SIGCHLD = syscall.Signal(0x11)
SIGCLD = syscall.Signal(0x11)
SIGCONT = syscall.Signal(0x12)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x1d)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x1d)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1e)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTKFLT = syscall.Signal(0x10)
SIGSTOP = syscall.Signal(0x13)
SIGSYS = syscall.Signal(0x1f)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x14)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
index cf1c386..d5e2dc9 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
@@ -1,2924 +1,565 @@
// mkerrors.sh -Wall -Werror -static -I/tmp/include
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build sparc64 && linux
// +build sparc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
package unix
import "syscall"
const (
- AAFS_MAGIC = 0x5a3c69f0
- ADFS_SUPER_MAGIC = 0xadf5
- AFFS_SUPER_MAGIC = 0xadff
- AFS_FS_MAGIC = 0x6b414653
- AFS_SUPER_MAGIC = 0x5346414f
- AF_ALG = 0x26
- AF_APPLETALK = 0x5
- AF_ASH = 0x12
- AF_ATMPVC = 0x8
- AF_ATMSVC = 0x14
- AF_AX25 = 0x3
- AF_BLUETOOTH = 0x1f
- AF_BRIDGE = 0x7
- AF_CAIF = 0x25
- AF_CAN = 0x1d
- AF_DECnet = 0xc
- AF_ECONET = 0x13
- AF_FILE = 0x1
- AF_IB = 0x1b
- AF_IEEE802154 = 0x24
- AF_INET = 0x2
- AF_INET6 = 0xa
- AF_IPX = 0x4
- AF_IRDA = 0x17
- AF_ISDN = 0x22
- AF_IUCV = 0x20
- AF_KCM = 0x29
- AF_KEY = 0xf
- AF_LLC = 0x1a
- AF_LOCAL = 0x1
- AF_MAX = 0x2d
- AF_MPLS = 0x1c
- AF_NETBEUI = 0xd
- AF_NETLINK = 0x10
- AF_NETROM = 0x6
- AF_NFC = 0x27
- AF_PACKET = 0x11
- AF_PHONET = 0x23
- AF_PPPOX = 0x18
- AF_QIPCRTR = 0x2a
- AF_RDS = 0x15
- AF_ROSE = 0xb
- AF_ROUTE = 0x10
- AF_RXRPC = 0x21
- AF_SECURITY = 0xe
- AF_SMC = 0x2b
- AF_SNA = 0x16
- AF_TIPC = 0x1e
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_VSOCK = 0x28
- AF_WANPIPE = 0x19
- AF_X25 = 0x9
- AF_XDP = 0x2c
- ALG_OP_DECRYPT = 0x0
- ALG_OP_ENCRYPT = 0x1
- ALG_SET_AEAD_ASSOCLEN = 0x4
- ALG_SET_AEAD_AUTHSIZE = 0x5
- ALG_SET_IV = 0x2
- ALG_SET_KEY = 0x1
- ALG_SET_OP = 0x3
- ANON_INODE_FS_MAGIC = 0x9041934
- ARPHRD_6LOWPAN = 0x339
- ARPHRD_ADAPT = 0x108
- ARPHRD_APPLETLK = 0x8
- ARPHRD_ARCNET = 0x7
- ARPHRD_ASH = 0x30d
- ARPHRD_ATM = 0x13
- ARPHRD_AX25 = 0x3
- ARPHRD_BIF = 0x307
- ARPHRD_CAIF = 0x336
- ARPHRD_CAN = 0x118
- ARPHRD_CHAOS = 0x5
- ARPHRD_CISCO = 0x201
- ARPHRD_CSLIP = 0x101
- ARPHRD_CSLIP6 = 0x103
- ARPHRD_DDCMP = 0x205
- ARPHRD_DLCI = 0xf
- ARPHRD_ECONET = 0x30e
- ARPHRD_EETHER = 0x2
- ARPHRD_ETHER = 0x1
- ARPHRD_EUI64 = 0x1b
- ARPHRD_FCAL = 0x311
- ARPHRD_FCFABRIC = 0x313
- ARPHRD_FCPL = 0x312
- ARPHRD_FCPP = 0x310
- ARPHRD_FDDI = 0x306
- ARPHRD_FRAD = 0x302
- ARPHRD_HDLC = 0x201
- ARPHRD_HIPPI = 0x30c
- ARPHRD_HWX25 = 0x110
- ARPHRD_IEEE1394 = 0x18
- ARPHRD_IEEE802 = 0x6
- ARPHRD_IEEE80211 = 0x321
- ARPHRD_IEEE80211_PRISM = 0x322
- ARPHRD_IEEE80211_RADIOTAP = 0x323
- ARPHRD_IEEE802154 = 0x324
- ARPHRD_IEEE802154_MONITOR = 0x325
- ARPHRD_IEEE802_TR = 0x320
- ARPHRD_INFINIBAND = 0x20
- ARPHRD_IP6GRE = 0x337
- ARPHRD_IPDDP = 0x309
- ARPHRD_IPGRE = 0x30a
- ARPHRD_IRDA = 0x30f
- ARPHRD_LAPB = 0x204
- ARPHRD_LOCALTLK = 0x305
- ARPHRD_LOOPBACK = 0x304
- ARPHRD_METRICOM = 0x17
- ARPHRD_NETLINK = 0x338
- ARPHRD_NETROM = 0x0
- ARPHRD_NONE = 0xfffe
- ARPHRD_PHONET = 0x334
- ARPHRD_PHONET_PIPE = 0x335
- ARPHRD_PIMREG = 0x30b
- ARPHRD_PPP = 0x200
- ARPHRD_PRONET = 0x4
- ARPHRD_RAWHDLC = 0x206
- ARPHRD_RAWIP = 0x207
- ARPHRD_ROSE = 0x10e
- ARPHRD_RSRVD = 0x104
- ARPHRD_SIT = 0x308
- ARPHRD_SKIP = 0x303
- ARPHRD_SLIP = 0x100
- ARPHRD_SLIP6 = 0x102
- ARPHRD_TUNNEL = 0x300
- ARPHRD_TUNNEL6 = 0x301
- ARPHRD_VOID = 0xffff
- ARPHRD_VSOCKMON = 0x33a
- ARPHRD_X25 = 0x10f
- ASI_LEON_DFLUSH = 0x11
- ASI_LEON_IFLUSH = 0x10
- ASI_LEON_MMUFLUSH = 0x18
- AUTOFS_SUPER_MAGIC = 0x187
- B0 = 0x0
- B1000000 = 0x1008
- B110 = 0x3
- B115200 = 0x1002
- B1152000 = 0x1009
- B1200 = 0x9
- B134 = 0x4
- B150 = 0x5
- B1500000 = 0x100a
- B1800 = 0xa
- B19200 = 0xe
- B200 = 0x6
- B2000000 = 0x100b
- B230400 = 0x1003
- B2400 = 0xb
- B2500000 = 0x100c
- B300 = 0x7
- B3000000 = 0x100d
- B3500000 = 0x100e
- B38400 = 0xf
- B4000000 = 0x100f
- B460800 = 0x1004
- B4800 = 0xc
- B50 = 0x1
- B500000 = 0x1005
- B57600 = 0x1001
- B576000 = 0x1006
- B600 = 0x8
- B75 = 0x2
- B921600 = 0x1007
- B9600 = 0xd
- BALLOON_KVM_MAGIC = 0x13661366
- BDEVFS_MAGIC = 0x62646576
- BINDERFS_SUPER_MAGIC = 0x6c6f6f70
- BINFMTFS_MAGIC = 0x42494e4d
- BLKBSZGET = 0x40081270
- BLKBSZSET = 0x80081271
- BLKFLSBUF = 0x20001261
- BLKFRAGET = 0x20001265
- BLKFRASET = 0x20001264
- BLKGETSIZE = 0x20001260
- BLKGETSIZE64 = 0x40081272
- BLKPBSZGET = 0x2000127b
- BLKRAGET = 0x20001263
- BLKRASET = 0x20001262
- BLKROGET = 0x2000125e
- BLKROSET = 0x2000125d
- BLKRRPART = 0x2000125f
- BLKSECTGET = 0x20001267
- BLKSECTSET = 0x20001266
- BLKSSZGET = 0x20001268
- BOTHER = 0x1000
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
- BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
- BPF_ALU = 0x4
- BPF_ALU64 = 0x7
- BPF_AND = 0x50
- BPF_ANY = 0x0
- BPF_ARSH = 0xc0
- BPF_B = 0x10
- BPF_BUILD_ID_SIZE = 0x14
- BPF_CALL = 0x80
- BPF_DEVCG_ACC_MKNOD = 0x1
- BPF_DEVCG_ACC_READ = 0x2
- BPF_DEVCG_ACC_WRITE = 0x4
- BPF_DEVCG_DEV_BLOCK = 0x1
- BPF_DEVCG_DEV_CHAR = 0x2
- BPF_DIV = 0x30
- BPF_DW = 0x18
- BPF_END = 0xd0
- BPF_EXIST = 0x2
- BPF_EXIT = 0x90
- BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
- BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
- BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
- BPF_FROM_BE = 0x8
- BPF_FROM_LE = 0x0
- BPF_FS_MAGIC = 0xcafe4a11
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
- BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
- BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
- BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
- BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
- BPF_F_ALLOW_MULTI = 0x2
- BPF_F_ALLOW_OVERRIDE = 0x1
- BPF_F_ANY_ALIGNMENT = 0x2
- BPF_F_CLONE = 0x200
- BPF_F_CTXLEN_MASK = 0xfffff00000000
- BPF_F_CURRENT_CPU = 0xffffffff
- BPF_F_CURRENT_NETNS = -0x1
- BPF_F_DONT_FRAGMENT = 0x4
- BPF_F_FAST_STACK_CMP = 0x200
- BPF_F_HDR_FIELD_MASK = 0xf
- BPF_F_INDEX_MASK = 0xffffffff
- BPF_F_INGRESS = 0x1
- BPF_F_INVALIDATE_HASH = 0x2
- BPF_F_LOCK = 0x4
- BPF_F_MARK_ENFORCE = 0x40
- BPF_F_MARK_MANGLED_0 = 0x20
- BPF_F_MMAPABLE = 0x400
- BPF_F_NO_COMMON_LRU = 0x2
- BPF_F_NO_PREALLOC = 0x1
- BPF_F_NUMA_NODE = 0x4
- BPF_F_PSEUDO_HDR = 0x10
- BPF_F_QUERY_EFFECTIVE = 0x1
- BPF_F_RDONLY = 0x8
- BPF_F_RDONLY_PROG = 0x80
- BPF_F_RECOMPUTE_CSUM = 0x1
- BPF_F_REUSE_STACKID = 0x400
- BPF_F_SEQ_NUMBER = 0x8
- BPF_F_SKIP_FIELD_MASK = 0xff
- BPF_F_STACK_BUILD_ID = 0x20
- BPF_F_STRICT_ALIGNMENT = 0x1
- BPF_F_SYSCTL_BASE_NAME = 0x1
- BPF_F_TEST_RND_HI32 = 0x4
- BPF_F_TEST_STATE_FREQ = 0x8
- BPF_F_TUNINFO_IPV6 = 0x1
- BPF_F_USER_BUILD_ID = 0x800
- BPF_F_USER_STACK = 0x100
- BPF_F_WRONLY = 0x10
- BPF_F_WRONLY_PROG = 0x100
- BPF_F_ZERO_CSUM_TX = 0x2
- BPF_F_ZERO_SEED = 0x40
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JLE = 0xb0
- BPF_JLT = 0xa0
- BPF_JMP = 0x5
- BPF_JMP32 = 0x6
- BPF_JNE = 0x50
- BPF_JSET = 0x40
- BPF_JSGE = 0x70
- BPF_JSGT = 0x60
- BPF_JSLE = 0xd0
- BPF_JSLT = 0xc0
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LL_OFF = -0x200000
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXINSNS = 0x1000
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MOD = 0x90
- BPF_MOV = 0xb0
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_NET_OFF = -0x100000
- BPF_NOEXIST = 0x1
- BPF_OBJ_NAME_LEN = 0x10
- BPF_OR = 0x40
- BPF_PSEUDO_CALL = 0x1
- BPF_PSEUDO_MAP_FD = 0x1
- BPF_PSEUDO_MAP_VALUE = 0x2
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_SK_STORAGE_GET_F_CREATE = 0x1
- BPF_SOCK_OPS_ALL_CB_FLAGS = 0xf
- BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
- BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
- BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
- BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAG_SIZE = 0x8
- BPF_TAX = 0x0
- BPF_TO_BE = 0x8
- BPF_TO_LE = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BPF_XADD = 0xc0
- BPF_XOR = 0xa0
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x2000
- BSDLY = 0x2000
- BTRFS_SUPER_MAGIC = 0x9123683e
- BTRFS_TEST_MAGIC = 0x73727279
- CAN_BCM = 0x2
- CAN_EFF_FLAG = 0x80000000
- CAN_EFF_ID_BITS = 0x1d
- CAN_EFF_MASK = 0x1fffffff
- CAN_ERR_FLAG = 0x20000000
- CAN_ERR_MASK = 0x1fffffff
- CAN_INV_FILTER = 0x20000000
- CAN_ISOTP = 0x6
- CAN_J1939 = 0x7
- CAN_MAX_DLC = 0x8
- CAN_MAX_DLEN = 0x8
- CAN_MCNET = 0x5
- CAN_MTU = 0x10
- CAN_NPROTO = 0x8
- CAN_RAW = 0x1
- CAN_RAW_FILTER_MAX = 0x200
- CAN_RTR_FLAG = 0x40000000
- CAN_SFF_ID_BITS = 0xb
- CAN_SFF_MASK = 0x7ff
- CAN_TP16 = 0x3
- CAN_TP20 = 0x4
- CAP_AUDIT_CONTROL = 0x1e
- CAP_AUDIT_READ = 0x25
- CAP_AUDIT_WRITE = 0x1d
- CAP_BLOCK_SUSPEND = 0x24
- CAP_CHOWN = 0x0
- CAP_DAC_OVERRIDE = 0x1
- CAP_DAC_READ_SEARCH = 0x2
- CAP_FOWNER = 0x3
- CAP_FSETID = 0x4
- CAP_IPC_LOCK = 0xe
- CAP_IPC_OWNER = 0xf
- CAP_KILL = 0x5
- CAP_LAST_CAP = 0x25
- CAP_LEASE = 0x1c
- CAP_LINUX_IMMUTABLE = 0x9
- CAP_MAC_ADMIN = 0x21
- CAP_MAC_OVERRIDE = 0x20
- CAP_MKNOD = 0x1b
- CAP_NET_ADMIN = 0xc
- CAP_NET_BIND_SERVICE = 0xa
- CAP_NET_BROADCAST = 0xb
- CAP_NET_RAW = 0xd
- CAP_SETFCAP = 0x1f
- CAP_SETGID = 0x6
- CAP_SETPCAP = 0x8
- CAP_SETUID = 0x7
- CAP_SYSLOG = 0x22
- CAP_SYS_ADMIN = 0x15
- CAP_SYS_BOOT = 0x16
- CAP_SYS_CHROOT = 0x12
- CAP_SYS_MODULE = 0x10
- CAP_SYS_NICE = 0x17
- CAP_SYS_PACCT = 0x14
- CAP_SYS_PTRACE = 0x13
- CAP_SYS_RAWIO = 0x11
- CAP_SYS_RESOURCE = 0x18
- CAP_SYS_TIME = 0x19
- CAP_SYS_TTY_CONFIG = 0x1a
- CAP_WAKE_ALARM = 0x23
- CBAUD = 0x100f
- CBAUDEX = 0x1000
- CFLUSH = 0xf
- CGROUP2_SUPER_MAGIC = 0x63677270
- CGROUP_SUPER_MAGIC = 0x27e0eb
- CIBAUD = 0x100f0000
- CLOCAL = 0x800
- CLOCK_BOOTTIME = 0x7
- CLOCK_BOOTTIME_ALARM = 0x9
- CLOCK_DEFAULT = 0x0
- CLOCK_EXT = 0x1
- CLOCK_INT = 0x2
- CLOCK_MONOTONIC = 0x1
- CLOCK_MONOTONIC_COARSE = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_PROCESS_CPUTIME_ID = 0x2
- CLOCK_REALTIME = 0x0
- CLOCK_REALTIME_ALARM = 0x8
- CLOCK_REALTIME_COARSE = 0x5
- CLOCK_TAI = 0xb
- CLOCK_THREAD_CPUTIME_ID = 0x3
- CLOCK_TXFROMRX = 0x4
- CLOCK_TXINT = 0x3
- CLONE_ARGS_SIZE_VER0 = 0x40
- CLONE_ARGS_SIZE_VER1 = 0x50
- CLONE_CHILD_CLEARTID = 0x200000
- CLONE_CHILD_SETTID = 0x1000000
- CLONE_CLEAR_SIGHAND = 0x100000000
- CLONE_DETACHED = 0x400000
- CLONE_FILES = 0x400
- CLONE_FS = 0x200
- CLONE_IO = 0x80000000
- CLONE_NEWCGROUP = 0x2000000
- CLONE_NEWIPC = 0x8000000
- CLONE_NEWNET = 0x40000000
- CLONE_NEWNS = 0x20000
- CLONE_NEWPID = 0x20000000
- CLONE_NEWUSER = 0x10000000
- CLONE_NEWUTS = 0x4000000
- CLONE_PARENT = 0x8000
- CLONE_PARENT_SETTID = 0x100000
- CLONE_PIDFD = 0x1000
- CLONE_PTRACE = 0x2000
- CLONE_SETTLS = 0x80000
- CLONE_SIGHAND = 0x800
- CLONE_SYSVSEM = 0x40000
- CLONE_THREAD = 0x10000
- CLONE_UNTRACED = 0x800000
- CLONE_VFORK = 0x4000
- CLONE_VM = 0x100
- CMSPAR = 0x40000000
- CODA_SUPER_MAGIC = 0x73757245
- CR0 = 0x0
- CR1 = 0x200
- CR2 = 0x400
- CR3 = 0x600
- CRAMFS_MAGIC = 0x28cd3d45
- CRDLY = 0x600
- CREAD = 0x80
- CRTSCTS = 0x80000000
- CRYPTO_MAX_NAME = 0x40
- CRYPTO_MSG_MAX = 0x15
- CRYPTO_NR_MSGTYPES = 0x6
- CRYPTO_REPORT_MAXSIZE = 0x160
- CS5 = 0x0
- CS6 = 0x10
- CS7 = 0x20
- CS8 = 0x30
- CSIGNAL = 0xff
- CSIZE = 0x30
- CSTART = 0x11
- CSTATUS = 0x0
- CSTOP = 0x13
- CSTOPB = 0x40
- CSUSP = 0x1a
- DAXFS_MAGIC = 0x64646178
- DEBUGFS_MAGIC = 0x64626720
- DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d
- DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e
- DEVLINK_GENL_MCGRP_CONFIG_NAME = "config"
- DEVLINK_GENL_NAME = "devlink"
- DEVLINK_GENL_VERSION = 0x1
- DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14
- DEVPTS_SUPER_MAGIC = 0x1cd1
- DMA_BUF_MAGIC = 0x444d4142
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x200
- ECHOE = 0x10
- ECHOK = 0x20
- ECHOKE = 0x800
- ECHONL = 0x40
- ECHOPRT = 0x400
- ECRYPTFS_SUPER_MAGIC = 0xf15f
- EFD_CLOEXEC = 0x400000
- EFD_NONBLOCK = 0x4000
- EFD_SEMAPHORE = 0x1
- EFIVARFS_MAGIC = 0xde5e81e4
- EFS_SUPER_MAGIC = 0x414a53
- EMT_TAGOVF = 0x1
- ENCODING_DEFAULT = 0x0
- ENCODING_FM_MARK = 0x3
- ENCODING_FM_SPACE = 0x4
- ENCODING_MANCHESTER = 0x5
- ENCODING_NRZ = 0x1
- ENCODING_NRZI = 0x2
- EPOLLERR = 0x8
- EPOLLET = 0x80000000
- EPOLLEXCLUSIVE = 0x10000000
- EPOLLHUP = 0x10
- EPOLLIN = 0x1
- EPOLLMSG = 0x400
- EPOLLONESHOT = 0x40000000
- EPOLLOUT = 0x4
- EPOLLPRI = 0x2
- EPOLLRDBAND = 0x80
- EPOLLRDHUP = 0x2000
- EPOLLRDNORM = 0x40
- EPOLLWAKEUP = 0x20000000
- EPOLLWRBAND = 0x200
- EPOLLWRNORM = 0x100
- EPOLL_CLOEXEC = 0x400000
- EPOLL_CTL_ADD = 0x1
- EPOLL_CTL_DEL = 0x2
- EPOLL_CTL_MOD = 0x3
- EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2
- ETH_P_1588 = 0x88f7
- ETH_P_8021AD = 0x88a8
- ETH_P_8021AH = 0x88e7
- ETH_P_8021Q = 0x8100
- ETH_P_80221 = 0x8917
- ETH_P_802_2 = 0x4
- ETH_P_802_3 = 0x1
- ETH_P_802_3_MIN = 0x600
- ETH_P_802_EX1 = 0x88b5
- ETH_P_AARP = 0x80f3
- ETH_P_AF_IUCV = 0xfbfb
- ETH_P_ALL = 0x3
- ETH_P_AOE = 0x88a2
- ETH_P_ARCNET = 0x1a
- ETH_P_ARP = 0x806
- ETH_P_ATALK = 0x809b
- ETH_P_ATMFATE = 0x8884
- ETH_P_ATMMPOA = 0x884c
- ETH_P_AX25 = 0x2
- ETH_P_BATMAN = 0x4305
- ETH_P_BPQ = 0x8ff
- ETH_P_CAIF = 0xf7
- ETH_P_CAN = 0xc
- ETH_P_CANFD = 0xd
- ETH_P_CONTROL = 0x16
- ETH_P_CUST = 0x6006
- ETH_P_DDCMP = 0x6
- ETH_P_DEC = 0x6000
- ETH_P_DIAG = 0x6005
- ETH_P_DNA_DL = 0x6001
- ETH_P_DNA_RC = 0x6002
- ETH_P_DNA_RT = 0x6003
- ETH_P_DSA = 0x1b
- ETH_P_DSA_8021Q = 0xdadb
- ETH_P_ECONET = 0x18
- ETH_P_EDSA = 0xdada
- ETH_P_ERSPAN = 0x88be
- ETH_P_ERSPAN2 = 0x22eb
- ETH_P_FCOE = 0x8906
- ETH_P_FIP = 0x8914
- ETH_P_HDLC = 0x19
- ETH_P_HSR = 0x892f
- ETH_P_IBOE = 0x8915
- ETH_P_IEEE802154 = 0xf6
- ETH_P_IEEEPUP = 0xa00
- ETH_P_IEEEPUPAT = 0xa01
- ETH_P_IFE = 0xed3e
- ETH_P_IP = 0x800
- ETH_P_IPV6 = 0x86dd
- ETH_P_IPX = 0x8137
- ETH_P_IRDA = 0x17
- ETH_P_LAT = 0x6004
- ETH_P_LINK_CTL = 0x886c
- ETH_P_LLDP = 0x88cc
- ETH_P_LOCALTALK = 0x9
- ETH_P_LOOP = 0x60
- ETH_P_LOOPBACK = 0x9000
- ETH_P_MACSEC = 0x88e5
- ETH_P_MAP = 0xf9
- ETH_P_MOBITEX = 0x15
- ETH_P_MPLS_MC = 0x8848
- ETH_P_MPLS_UC = 0x8847
- ETH_P_MVRP = 0x88f5
- ETH_P_NCSI = 0x88f8
- ETH_P_NSH = 0x894f
- ETH_P_PAE = 0x888e
- ETH_P_PAUSE = 0x8808
- ETH_P_PHONET = 0xf5
- ETH_P_PPPTALK = 0x10
- ETH_P_PPP_DISC = 0x8863
- ETH_P_PPP_MP = 0x8
- ETH_P_PPP_SES = 0x8864
- ETH_P_PREAUTH = 0x88c7
- ETH_P_PRP = 0x88fb
- ETH_P_PUP = 0x200
- ETH_P_PUPAT = 0x201
- ETH_P_QINQ1 = 0x9100
- ETH_P_QINQ2 = 0x9200
- ETH_P_QINQ3 = 0x9300
- ETH_P_RARP = 0x8035
- ETH_P_SCA = 0x6007
- ETH_P_SLOW = 0x8809
- ETH_P_SNAP = 0x5
- ETH_P_TDLS = 0x890d
- ETH_P_TEB = 0x6558
- ETH_P_TIPC = 0x88ca
- ETH_P_TRAILER = 0x1c
- ETH_P_TR_802_2 = 0x11
- ETH_P_TSN = 0x22f0
- ETH_P_WAN_PPP = 0x7
- ETH_P_WCCP = 0x883e
- ETH_P_X25 = 0x805
- ETH_P_XDSA = 0xf8
- EXABYTE_ENABLE_NEST = 0xf0
- EXT2_SUPER_MAGIC = 0xef53
- EXT3_SUPER_MAGIC = 0xef53
- EXT4_SUPER_MAGIC = 0xef53
- EXTA = 0xe
- EXTB = 0xf
- EXTPROC = 0x10000
- F2FS_SUPER_MAGIC = 0xf2f52010
- FALLOC_FL_COLLAPSE_RANGE = 0x8
- FALLOC_FL_INSERT_RANGE = 0x20
- FALLOC_FL_KEEP_SIZE = 0x1
- FALLOC_FL_NO_HIDE_STALE = 0x4
- FALLOC_FL_PUNCH_HOLE = 0x2
- FALLOC_FL_UNSHARE_RANGE = 0x40
- FALLOC_FL_ZERO_RANGE = 0x10
- FANOTIFY_METADATA_VERSION = 0x3
- FAN_ACCESS = 0x1
- FAN_ACCESS_PERM = 0x20000
- FAN_ALLOW = 0x1
- FAN_ALL_CLASS_BITS = 0xc
- FAN_ALL_EVENTS = 0x3b
- FAN_ALL_INIT_FLAGS = 0x3f
- FAN_ALL_MARK_FLAGS = 0xff
- FAN_ALL_OUTGOING_EVENTS = 0x3403b
- FAN_ALL_PERM_EVENTS = 0x30000
- FAN_ATTRIB = 0x4
- FAN_AUDIT = 0x10
- FAN_CLASS_CONTENT = 0x4
- FAN_CLASS_NOTIF = 0x0
- FAN_CLASS_PRE_CONTENT = 0x8
- FAN_CLOEXEC = 0x1
- FAN_CLOSE = 0x18
- FAN_CLOSE_NOWRITE = 0x10
- FAN_CLOSE_WRITE = 0x8
- FAN_CREATE = 0x100
- FAN_DELETE = 0x200
- FAN_DELETE_SELF = 0x400
- FAN_DENY = 0x2
- FAN_ENABLE_AUDIT = 0x40
- FAN_EVENT_INFO_TYPE_FID = 0x1
- FAN_EVENT_METADATA_LEN = 0x18
- FAN_EVENT_ON_CHILD = 0x8000000
- FAN_MARK_ADD = 0x1
- FAN_MARK_DONT_FOLLOW = 0x4
- FAN_MARK_FILESYSTEM = 0x100
- FAN_MARK_FLUSH = 0x80
- FAN_MARK_IGNORED_MASK = 0x20
- FAN_MARK_IGNORED_SURV_MODIFY = 0x40
- FAN_MARK_INODE = 0x0
- FAN_MARK_MOUNT = 0x10
- FAN_MARK_ONLYDIR = 0x8
- FAN_MARK_REMOVE = 0x2
- FAN_MODIFY = 0x2
- FAN_MOVE = 0xc0
- FAN_MOVED_FROM = 0x40
- FAN_MOVED_TO = 0x80
- FAN_MOVE_SELF = 0x800
- FAN_NOFD = -0x1
- FAN_NONBLOCK = 0x2
- FAN_ONDIR = 0x40000000
- FAN_OPEN = 0x20
- FAN_OPEN_EXEC = 0x1000
- FAN_OPEN_EXEC_PERM = 0x40000
- FAN_OPEN_PERM = 0x10000
- FAN_Q_OVERFLOW = 0x4000
- FAN_REPORT_FID = 0x200
- FAN_REPORT_TID = 0x100
- FAN_UNLIMITED_MARKS = 0x20
- FAN_UNLIMITED_QUEUE = 0x10
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x8000
- FFDLY = 0x8000
- FLUSHO = 0x1000
- FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
- FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
- FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8
- FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1
- FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2
- FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1
- FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2
- FSCRYPT_KEY_STATUS_ABSENT = 0x1
- FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1
- FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3
- FSCRYPT_KEY_STATUS_PRESENT = 0x2
- FSCRYPT_MAX_KEY_SIZE = 0x40
- FSCRYPT_MODE_ADIANTUM = 0x9
- FSCRYPT_MODE_AES_128_CBC = 0x5
- FSCRYPT_MODE_AES_128_CTS = 0x6
- FSCRYPT_MODE_AES_256_CTS = 0x4
- FSCRYPT_MODE_AES_256_XTS = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2
- FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3
- FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0
- FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1
- FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3
- FSCRYPT_POLICY_FLAGS_VALID = 0xf
- FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4
- FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8
- FSCRYPT_POLICY_V1 = 0x0
- FSCRYPT_POLICY_V2 = 0x2
- FS_ENCRYPTION_MODE_ADIANTUM = 0x9
- FS_ENCRYPTION_MODE_AES_128_CBC = 0x5
- FS_ENCRYPTION_MODE_AES_128_CTS = 0x6
- FS_ENCRYPTION_MODE_AES_256_CBC = 0x3
- FS_ENCRYPTION_MODE_AES_256_CTS = 0x4
- FS_ENCRYPTION_MODE_AES_256_GCM = 0x2
- FS_ENCRYPTION_MODE_AES_256_XTS = 0x1
- FS_ENCRYPTION_MODE_INVALID = 0x0
- FS_ENCRYPTION_MODE_SPECK128_256_CTS = 0x8
- FS_ENCRYPTION_MODE_SPECK128_256_XTS = 0x7
- FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617
- FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a
- FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
- FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616
- FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
- FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618
- FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619
- FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
- FS_KEY_DESCRIPTOR_SIZE = 0x8
- FS_KEY_DESC_PREFIX = "fscrypt:"
- FS_KEY_DESC_PREFIX_SIZE = 0x8
- FS_MAX_KEY_SIZE = 0x40
- FS_POLICY_FLAGS_PAD_16 = 0x2
- FS_POLICY_FLAGS_PAD_32 = 0x3
- FS_POLICY_FLAGS_PAD_4 = 0x0
- FS_POLICY_FLAGS_PAD_8 = 0x1
- FS_POLICY_FLAGS_PAD_MASK = 0x3
- FS_POLICY_FLAGS_VALID = 0xf
- FUTEXFS_SUPER_MAGIC = 0xbad1dea
- F_ADD_SEALS = 0x409
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x406
- F_EXLCK = 0x4
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLEASE = 0x401
- F_GETLK = 0x7
- F_GETLK64 = 0x7
- F_GETOWN = 0x5
- F_GETOWN_EX = 0x10
- F_GETPIPE_SZ = 0x408
- F_GETSIG = 0xb
- F_GET_FILE_RW_HINT = 0x40d
- F_GET_RW_HINT = 0x40b
- F_GET_SEALS = 0x40a
- F_LOCK = 0x1
- F_NOTIFY = 0x402
- F_OFD_GETLK = 0x24
- F_OFD_SETLK = 0x25
- F_OFD_SETLKW = 0x26
- F_OK = 0x0
- F_RDLCK = 0x1
- F_SEAL_FUTURE_WRITE = 0x10
- F_SEAL_GROW = 0x4
- F_SEAL_SEAL = 0x1
- F_SEAL_SHRINK = 0x2
- F_SEAL_WRITE = 0x8
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLEASE = 0x400
- F_SETLK = 0x8
- F_SETLK64 = 0x8
- F_SETLKW = 0x9
- F_SETLKW64 = 0x9
- F_SETOWN = 0x6
- F_SETOWN_EX = 0xf
- F_SETPIPE_SZ = 0x407
- F_SETSIG = 0xa
- F_SET_FILE_RW_HINT = 0x40e
- F_SET_RW_HINT = 0x40c
- F_SHLCK = 0x8
- F_TEST = 0x3
- F_TLOCK = 0x2
- F_ULOCK = 0x0
- F_UNLCK = 0x3
- F_WRLCK = 0x2
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
- GRND_NONBLOCK = 0x1
- GRND_RANDOM = 0x2
- HDIO_DRIVE_CMD = 0x31f
- HDIO_DRIVE_CMD_AEB = 0x31e
- HDIO_DRIVE_CMD_HDR_SIZE = 0x4
- HDIO_DRIVE_HOB_HDR_SIZE = 0x8
- HDIO_DRIVE_RESET = 0x31c
- HDIO_DRIVE_TASK = 0x31e
- HDIO_DRIVE_TASKFILE = 0x31d
- HDIO_DRIVE_TASK_HDR_SIZE = 0x8
- HDIO_GETGEO = 0x301
- HDIO_GET_32BIT = 0x309
- HDIO_GET_ACOUSTIC = 0x30f
- HDIO_GET_ADDRESS = 0x310
- HDIO_GET_BUSSTATE = 0x31a
- HDIO_GET_DMA = 0x30b
- HDIO_GET_IDENTITY = 0x30d
- HDIO_GET_KEEPSETTINGS = 0x308
- HDIO_GET_MULTCOUNT = 0x304
- HDIO_GET_NICE = 0x30c
- HDIO_GET_NOWERR = 0x30a
- HDIO_GET_QDMA = 0x305
- HDIO_GET_UNMASKINTR = 0x302
- HDIO_GET_WCACHE = 0x30e
- HDIO_OBSOLETE_IDENTITY = 0x307
- HDIO_SCAN_HWIF = 0x328
- HDIO_SET_32BIT = 0x324
- HDIO_SET_ACOUSTIC = 0x32c
- HDIO_SET_ADDRESS = 0x32f
- HDIO_SET_BUSSTATE = 0x32d
- HDIO_SET_DMA = 0x326
- HDIO_SET_KEEPSETTINGS = 0x323
- HDIO_SET_MULTCOUNT = 0x321
- HDIO_SET_NICE = 0x329
- HDIO_SET_NOWERR = 0x325
- HDIO_SET_PIO_MODE = 0x327
- HDIO_SET_QDMA = 0x32e
- HDIO_SET_UNMASKINTR = 0x322
- HDIO_SET_WCACHE = 0x32b
- HDIO_SET_XFER = 0x306
- HDIO_TRISTATE_HWIF = 0x31b
- HDIO_UNREGISTER_HWIF = 0x32a
- HOSTFS_SUPER_MAGIC = 0xc0ffee
- HPFS_SUPER_MAGIC = 0xf995e849
- HUGETLBFS_MAGIC = 0x958458f6
- HUPCL = 0x400
- IBSHIFT = 0x10
- ICANON = 0x2
- ICMPV6_FILTER = 0x1
- ICRNL = 0x100
- IEXTEN = 0x8000
- IFA_F_DADFAILED = 0x8
- IFA_F_DEPRECATED = 0x20
- IFA_F_HOMEADDRESS = 0x10
- IFA_F_MANAGETEMPADDR = 0x100
- IFA_F_MCAUTOJOIN = 0x400
- IFA_F_NODAD = 0x2
- IFA_F_NOPREFIXROUTE = 0x200
- IFA_F_OPTIMISTIC = 0x4
- IFA_F_PERMANENT = 0x80
- IFA_F_SECONDARY = 0x1
- IFA_F_STABLE_PRIVACY = 0x800
- IFA_F_TEMPORARY = 0x1
- IFA_F_TENTATIVE = 0x40
- IFA_MAX = 0xa
- IFF_ALLMULTI = 0x200
- IFF_ATTACH_QUEUE = 0x200
- IFF_AUTOMEDIA = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_DETACH_QUEUE = 0x400
- IFF_DORMANT = 0x20000
- IFF_DYNAMIC = 0x8000
- IFF_ECHO = 0x40000
- IFF_LOOPBACK = 0x8
- IFF_LOWER_UP = 0x10000
- IFF_MASTER = 0x400
- IFF_MULTICAST = 0x1000
- IFF_MULTI_QUEUE = 0x100
- IFF_NAPI = 0x10
- IFF_NAPI_FRAGS = 0x20
- IFF_NOARP = 0x80
- IFF_NOFILTER = 0x1000
- IFF_NOTRAILERS = 0x20
- IFF_NO_PI = 0x1000
- IFF_ONE_QUEUE = 0x2000
- IFF_PERSIST = 0x800
- IFF_POINTOPOINT = 0x10
- IFF_PORTSEL = 0x2000
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SLAVE = 0x800
- IFF_TAP = 0x2
- IFF_TUN = 0x1
- IFF_TUN_EXCL = 0x8000
- IFF_UP = 0x1
- IFF_VNET_HDR = 0x4000
- IFF_VOLATILE = 0x70c5a
- IFNAMSIZ = 0x10
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_ACCESS = 0x1
- IN_ALL_EVENTS = 0xfff
- IN_ATTRIB = 0x4
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLOEXEC = 0x400000
- IN_CLOSE = 0x18
- IN_CLOSE_NOWRITE = 0x10
- IN_CLOSE_WRITE = 0x8
- IN_CREATE = 0x100
- IN_DELETE = 0x200
- IN_DELETE_SELF = 0x400
- IN_DONT_FOLLOW = 0x2000000
- IN_EXCL_UNLINK = 0x4000000
- IN_IGNORED = 0x8000
- IN_ISDIR = 0x40000000
- IN_LOOPBACKNET = 0x7f
- IN_MASK_ADD = 0x20000000
- IN_MASK_CREATE = 0x10000000
- IN_MODIFY = 0x2
- IN_MOVE = 0xc0
- IN_MOVED_FROM = 0x40
- IN_MOVED_TO = 0x80
- IN_MOVE_SELF = 0x800
- IN_NONBLOCK = 0x4000
- IN_ONESHOT = 0x80000000
- IN_ONLYDIR = 0x1000000
- IN_OPEN = 0x20
- IN_Q_OVERFLOW = 0x4000
- IN_UNMOUNT = 0x2000
- IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
- IPPROTO_AH = 0x33
- IPPROTO_BEETPH = 0x5e
- IPPROTO_COMP = 0x6c
- IPPROTO_DCCP = 0x21
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_ENCAP = 0x62
- IPPROTO_ESP = 0x32
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GRE = 0x2f
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IGMP = 0x2
- IPPROTO_IP = 0x0
- IPPROTO_IPIP = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_MH = 0x87
- IPPROTO_MPLS = 0x89
- IPPROTO_MTP = 0x5c
- IPPROTO_NONE = 0x3b
- IPPROTO_PIM = 0x67
- IPPROTO_PUP = 0xc
- IPPROTO_RAW = 0xff
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_SCTP = 0x84
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_UDP = 0x11
- IPPROTO_UDPLITE = 0x88
- IPV6_2292DSTOPTS = 0x4
- IPV6_2292HOPLIMIT = 0x8
- IPV6_2292HOPOPTS = 0x3
- IPV6_2292PKTINFO = 0x2
- IPV6_2292PKTOPTIONS = 0x6
- IPV6_2292RTHDR = 0x5
- IPV6_ADDRFORM = 0x1
- IPV6_ADDR_PREFERENCES = 0x48
- IPV6_ADD_MEMBERSHIP = 0x14
- IPV6_AUTHHDR = 0xa
- IPV6_AUTOFLOWLABEL = 0x46
- IPV6_CHECKSUM = 0x7
- IPV6_DONTFRAG = 0x3e
- IPV6_DROP_MEMBERSHIP = 0x15
- IPV6_DSTOPTS = 0x3b
- IPV6_FREEBIND = 0x4e
- IPV6_HDRINCL = 0x24
- IPV6_HOPLIMIT = 0x34
- IPV6_HOPOPTS = 0x36
- IPV6_IPSEC_POLICY = 0x22
- IPV6_JOIN_ANYCAST = 0x1b
- IPV6_JOIN_GROUP = 0x14
- IPV6_LEAVE_ANYCAST = 0x1c
- IPV6_LEAVE_GROUP = 0x15
- IPV6_MINHOPCOUNT = 0x49
- IPV6_MTU = 0x18
- IPV6_MTU_DISCOVER = 0x17
- IPV6_MULTICAST_ALL = 0x1d
- IPV6_MULTICAST_HOPS = 0x12
- IPV6_MULTICAST_IF = 0x11
- IPV6_MULTICAST_LOOP = 0x13
- IPV6_NEXTHOP = 0x9
- IPV6_ORIGDSTADDR = 0x4a
- IPV6_PATHMTU = 0x3d
- IPV6_PKTINFO = 0x32
- IPV6_PMTUDISC_DO = 0x2
- IPV6_PMTUDISC_DONT = 0x0
- IPV6_PMTUDISC_INTERFACE = 0x4
- IPV6_PMTUDISC_OMIT = 0x5
- IPV6_PMTUDISC_PROBE = 0x3
- IPV6_PMTUDISC_WANT = 0x1
- IPV6_RECVDSTOPTS = 0x3a
- IPV6_RECVERR = 0x19
- IPV6_RECVFRAGSIZE = 0x4d
- IPV6_RECVHOPLIMIT = 0x33
- IPV6_RECVHOPOPTS = 0x35
- IPV6_RECVORIGDSTADDR = 0x4a
- IPV6_RECVPATHMTU = 0x3c
- IPV6_RECVPKTINFO = 0x31
- IPV6_RECVRTHDR = 0x38
- IPV6_RECVTCLASS = 0x42
- IPV6_ROUTER_ALERT = 0x16
- IPV6_ROUTER_ALERT_ISOLATE = 0x1e
- IPV6_RTHDR = 0x39
- IPV6_RTHDRDSTOPTS = 0x37
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_RXDSTOPTS = 0x3b
- IPV6_RXHOPOPTS = 0x36
- IPV6_TCLASS = 0x43
- IPV6_TRANSPARENT = 0x4b
- IPV6_UNICAST_HOPS = 0x10
- IPV6_UNICAST_IF = 0x4c
- IPV6_V6ONLY = 0x1a
- IPV6_XFRM_POLICY = 0x23
- IP_ADD_MEMBERSHIP = 0x23
- IP_ADD_SOURCE_MEMBERSHIP = 0x27
- IP_BIND_ADDRESS_NO_PORT = 0x18
- IP_BLOCK_SOURCE = 0x26
- IP_CHECKSUM = 0x17
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DROP_MEMBERSHIP = 0x24
- IP_DROP_SOURCE_MEMBERSHIP = 0x28
- IP_FREEBIND = 0xf
- IP_HDRINCL = 0x3
- IP_IPSEC_POLICY = 0x10
- IP_MAXPACKET = 0xffff
- IP_MAX_MEMBERSHIPS = 0x14
- IP_MF = 0x2000
- IP_MINTTL = 0x15
- IP_MSFILTER = 0x29
- IP_MSS = 0x240
- IP_MTU = 0xe
- IP_MTU_DISCOVER = 0xa
- IP_MULTICAST_ALL = 0x31
- IP_MULTICAST_IF = 0x20
- IP_MULTICAST_LOOP = 0x22
- IP_MULTICAST_TTL = 0x21
- IP_NODEFRAG = 0x16
- IP_OFFMASK = 0x1fff
- IP_OPTIONS = 0x4
- IP_ORIGDSTADDR = 0x14
- IP_PASSSEC = 0x12
- IP_PKTINFO = 0x8
- IP_PKTOPTIONS = 0x9
- IP_PMTUDISC = 0xa
- IP_PMTUDISC_DO = 0x2
- IP_PMTUDISC_DONT = 0x0
- IP_PMTUDISC_INTERFACE = 0x4
- IP_PMTUDISC_OMIT = 0x5
- IP_PMTUDISC_PROBE = 0x3
- IP_PMTUDISC_WANT = 0x1
- IP_RECVERR = 0xb
- IP_RECVFRAGSIZE = 0x19
- IP_RECVOPTS = 0x6
- IP_RECVORIGDSTADDR = 0x14
- IP_RECVRETOPTS = 0x7
- IP_RECVTOS = 0xd
- IP_RECVTTL = 0xc
- IP_RETOPTS = 0x7
- IP_RF = 0x8000
- IP_ROUTER_ALERT = 0x5
- IP_TOS = 0x1
- IP_TRANSPARENT = 0x13
- IP_TTL = 0x2
- IP_UNBLOCK_SOURCE = 0x25
- IP_UNICAST_IF = 0x32
- IP_XFRM_POLICY = 0x11
- ISIG = 0x1
- ISOFS_SUPER_MAGIC = 0x9660
- ISTRIP = 0x20
- IUCLC = 0x200
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x1000
- IXON = 0x400
- JFFS2_SUPER_MAGIC = 0x72b6
- KEXEC_ARCH_386 = 0x30000
- KEXEC_ARCH_68K = 0x40000
- KEXEC_ARCH_AARCH64 = 0xb70000
- KEXEC_ARCH_ARM = 0x280000
- KEXEC_ARCH_DEFAULT = 0x0
- KEXEC_ARCH_IA_64 = 0x320000
- KEXEC_ARCH_MASK = 0xffff0000
- KEXEC_ARCH_MIPS = 0x80000
- KEXEC_ARCH_MIPS_LE = 0xa0000
- KEXEC_ARCH_PARISC = 0xf0000
- KEXEC_ARCH_PPC = 0x140000
- KEXEC_ARCH_PPC64 = 0x150000
- KEXEC_ARCH_S390 = 0x160000
- KEXEC_ARCH_SH = 0x2a0000
- KEXEC_ARCH_X86_64 = 0x3e0000
- KEXEC_FILE_NO_INITRAMFS = 0x4
- KEXEC_FILE_ON_CRASH = 0x2
- KEXEC_FILE_UNLOAD = 0x1
- KEXEC_ON_CRASH = 0x1
- KEXEC_PRESERVE_CONTEXT = 0x2
- KEXEC_SEGMENT_MAX = 0x10
- KEYCTL_ASSUME_AUTHORITY = 0x10
- KEYCTL_CAPABILITIES = 0x1f
- KEYCTL_CAPS0_BIG_KEY = 0x10
- KEYCTL_CAPS0_CAPABILITIES = 0x1
- KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4
- KEYCTL_CAPS0_INVALIDATE = 0x20
- KEYCTL_CAPS0_MOVE = 0x80
- KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2
- KEYCTL_CAPS0_PUBLIC_KEY = 0x8
- KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40
- KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1
- KEYCTL_CAPS1_NS_KEY_TAG = 0x2
- KEYCTL_CHOWN = 0x4
- KEYCTL_CLEAR = 0x7
- KEYCTL_DESCRIBE = 0x6
- KEYCTL_DH_COMPUTE = 0x17
- KEYCTL_GET_KEYRING_ID = 0x0
- KEYCTL_GET_PERSISTENT = 0x16
- KEYCTL_GET_SECURITY = 0x11
- KEYCTL_INSTANTIATE = 0xc
- KEYCTL_INSTANTIATE_IOV = 0x14
- KEYCTL_INVALIDATE = 0x15
- KEYCTL_JOIN_SESSION_KEYRING = 0x1
- KEYCTL_LINK = 0x8
- KEYCTL_MOVE = 0x1e
- KEYCTL_MOVE_EXCL = 0x1
- KEYCTL_NEGATE = 0xd
- KEYCTL_PKEY_DECRYPT = 0x1a
- KEYCTL_PKEY_ENCRYPT = 0x19
- KEYCTL_PKEY_QUERY = 0x18
- KEYCTL_PKEY_SIGN = 0x1b
- KEYCTL_PKEY_VERIFY = 0x1c
- KEYCTL_READ = 0xb
- KEYCTL_REJECT = 0x13
- KEYCTL_RESTRICT_KEYRING = 0x1d
- KEYCTL_REVOKE = 0x3
- KEYCTL_SEARCH = 0xa
- KEYCTL_SESSION_TO_PARENT = 0x12
- KEYCTL_SETPERM = 0x5
- KEYCTL_SET_REQKEY_KEYRING = 0xe
- KEYCTL_SET_TIMEOUT = 0xf
- KEYCTL_SUPPORTS_DECRYPT = 0x2
- KEYCTL_SUPPORTS_ENCRYPT = 0x1
- KEYCTL_SUPPORTS_SIGN = 0x4
- KEYCTL_SUPPORTS_VERIFY = 0x8
- KEYCTL_UNLINK = 0x9
- KEYCTL_UPDATE = 0x2
- KEY_REQKEY_DEFL_DEFAULT = 0x0
- KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6
- KEY_REQKEY_DEFL_NO_CHANGE = -0x1
- KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2
- KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7
- KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3
- KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1
- KEY_REQKEY_DEFL_USER_KEYRING = 0x4
- KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5
- KEY_SPEC_GROUP_KEYRING = -0x6
- KEY_SPEC_PROCESS_KEYRING = -0x2
- KEY_SPEC_REQKEY_AUTH_KEY = -0x7
- KEY_SPEC_REQUESTOR_KEYRING = -0x8
- KEY_SPEC_SESSION_KEYRING = -0x3
- KEY_SPEC_THREAD_KEYRING = -0x1
- KEY_SPEC_USER_KEYRING = -0x4
- KEY_SPEC_USER_SESSION_KEYRING = -0x5
- LINUX_REBOOT_CMD_CAD_OFF = 0x0
- LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
- LINUX_REBOOT_CMD_HALT = 0xcdef0123
- LINUX_REBOOT_CMD_KEXEC = 0x45584543
- LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
- LINUX_REBOOT_CMD_RESTART = 0x1234567
- LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
- LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
- LINUX_REBOOT_MAGIC1 = 0xfee1dead
- LINUX_REBOOT_MAGIC2 = 0x28121969
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- LOOP_CLR_FD = 0x4c01
- LOOP_CTL_ADD = 0x4c80
- LOOP_CTL_GET_FREE = 0x4c82
- LOOP_CTL_REMOVE = 0x4c81
- LOOP_GET_STATUS = 0x4c03
- LOOP_GET_STATUS64 = 0x4c05
- LOOP_SET_BLOCK_SIZE = 0x4c09
- LOOP_SET_CAPACITY = 0x4c07
- LOOP_SET_DIRECT_IO = 0x4c08
- LOOP_SET_FD = 0x4c00
- LOOP_SET_STATUS = 0x4c02
- LOOP_SET_STATUS64 = 0x4c04
- LO_KEY_SIZE = 0x20
- LO_NAME_SIZE = 0x40
- MADV_COLD = 0x14
- MADV_DODUMP = 0x11
- MADV_DOFORK = 0xb
- MADV_DONTDUMP = 0x10
- MADV_DONTFORK = 0xa
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x8
- MADV_HUGEPAGE = 0xe
- MADV_HWPOISON = 0x64
- MADV_KEEPONFORK = 0x13
- MADV_MERGEABLE = 0xc
- MADV_NOHUGEPAGE = 0xf
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0x15
- MADV_RANDOM = 0x1
- MADV_REMOVE = 0x9
- MADV_SEQUENTIAL = 0x2
- MADV_UNMERGEABLE = 0xd
- MADV_WILLNEED = 0x3
- MADV_WIPEONFORK = 0x12
- MAP_ANON = 0x20
- MAP_ANONYMOUS = 0x20
- MAP_DENYWRITE = 0x800
- MAP_EXECUTABLE = 0x1000
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_FIXED_NOREPLACE = 0x100000
- MAP_GROWSDOWN = 0x200
- MAP_HUGETLB = 0x40000
- MAP_HUGE_MASK = 0x3f
- MAP_HUGE_SHIFT = 0x1a
- MAP_LOCKED = 0x100
- MAP_NONBLOCK = 0x10000
- MAP_NORESERVE = 0x40
- MAP_POPULATE = 0x8000
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_SHARED = 0x1
- MAP_SHARED_VALIDATE = 0x3
- MAP_STACK = 0x20000
- MAP_SYNC = 0x80000
- MAP_TYPE = 0xf
- MCAST_BLOCK_SOURCE = 0x2b
- MCAST_EXCLUDE = 0x0
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x2a
- MCAST_JOIN_SOURCE_GROUP = 0x2e
- MCAST_LEAVE_GROUP = 0x2d
- MCAST_LEAVE_SOURCE_GROUP = 0x2f
- MCAST_MSFILTER = 0x30
- MCAST_UNBLOCK_SOURCE = 0x2c
- MCL_CURRENT = 0x2000
- MCL_FUTURE = 0x4000
- MCL_ONFAULT = 0x8000
- MFD_ALLOW_SEALING = 0x2
- MFD_CLOEXEC = 0x1
- MFD_HUGETLB = 0x4
- MFD_HUGE_16GB = -0x78000000
- MFD_HUGE_16MB = 0x60000000
- MFD_HUGE_1GB = 0x78000000
- MFD_HUGE_1MB = 0x50000000
- MFD_HUGE_256MB = 0x70000000
- MFD_HUGE_2GB = 0x7c000000
- MFD_HUGE_2MB = 0x54000000
- MFD_HUGE_32MB = 0x64000000
- MFD_HUGE_512KB = 0x4c000000
- MFD_HUGE_512MB = 0x74000000
- MFD_HUGE_64KB = 0x40000000
- MFD_HUGE_8MB = 0x5c000000
- MFD_HUGE_MASK = 0x3f
- MFD_HUGE_SHIFT = 0x1a
- MINIX2_SUPER_MAGIC = 0x2468
- MINIX2_SUPER_MAGIC2 = 0x2478
- MINIX3_SUPER_MAGIC = 0x4d5a
- MINIX_SUPER_MAGIC = 0x137f
- MINIX_SUPER_MAGIC2 = 0x138f
- MNT_DETACH = 0x2
- MNT_EXPIRE = 0x4
- MNT_FORCE = 0x1
- MODULE_INIT_IGNORE_MODVERSIONS = 0x1
- MODULE_INIT_IGNORE_VERMAGIC = 0x2
- MSDOS_SUPER_MAGIC = 0x4d44
- MSG_BATCH = 0x40000
- MSG_CMSG_CLOEXEC = 0x40000000
- MSG_CONFIRM = 0x800
- MSG_CTRUNC = 0x8
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x40
- MSG_EOR = 0x80
- MSG_ERRQUEUE = 0x2000
- MSG_FASTOPEN = 0x20000000
- MSG_FIN = 0x200
- MSG_MORE = 0x8000
- MSG_NOSIGNAL = 0x4000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_PROXY = 0x10
- MSG_RST = 0x1000
- MSG_SYN = 0x400
- MSG_TRUNC = 0x20
- MSG_TRYHARD = 0x4
- MSG_WAITALL = 0x100
- MSG_WAITFORONE = 0x10000
- MSG_ZEROCOPY = 0x4000000
- MS_ACTIVE = 0x40000000
- MS_ASYNC = 0x1
- MS_BIND = 0x1000
- MS_BORN = 0x20000000
- MS_DIRSYNC = 0x80
- MS_INVALIDATE = 0x2
- MS_I_VERSION = 0x800000
- MS_KERNMOUNT = 0x400000
- MS_LAZYTIME = 0x2000000
- MS_MANDLOCK = 0x40
- MS_MGC_MSK = 0xffff0000
- MS_MGC_VAL = 0xc0ed0000
- MS_MOVE = 0x2000
- MS_NOATIME = 0x400
- MS_NODEV = 0x4
- MS_NODIRATIME = 0x800
- MS_NOEXEC = 0x8
- MS_NOREMOTELOCK = 0x8000000
- MS_NOSEC = 0x10000000
- MS_NOSUID = 0x2
- MS_NOUSER = -0x80000000
- MS_POSIXACL = 0x10000
- MS_PRIVATE = 0x40000
- MS_RDONLY = 0x1
- MS_REC = 0x4000
- MS_RELATIME = 0x200000
- MS_REMOUNT = 0x20
- MS_RMT_MASK = 0x2800051
- MS_SHARED = 0x100000
- MS_SILENT = 0x8000
- MS_SLAVE = 0x80000
- MS_STRICTATIME = 0x1000000
- MS_SUBMOUNT = 0x4000000
- MS_SYNC = 0x4
- MS_SYNCHRONOUS = 0x10
- MS_UNBINDABLE = 0x20000
- MS_VERBOSE = 0x8000
- MTD_INODE_FS_MAGIC = 0x11307854
- NAME_MAX = 0xff
- NCP_SUPER_MAGIC = 0x564c
- NETLINK_ADD_MEMBERSHIP = 0x1
- NETLINK_AUDIT = 0x9
- NETLINK_BROADCAST_ERROR = 0x4
- NETLINK_CAP_ACK = 0xa
- NETLINK_CONNECTOR = 0xb
- NETLINK_CRYPTO = 0x15
- NETLINK_DNRTMSG = 0xe
- NETLINK_DROP_MEMBERSHIP = 0x2
- NETLINK_ECRYPTFS = 0x13
- NETLINK_EXT_ACK = 0xb
- NETLINK_FIB_LOOKUP = 0xa
- NETLINK_FIREWALL = 0x3
- NETLINK_GENERIC = 0x10
- NETLINK_GET_STRICT_CHK = 0xc
- NETLINK_INET_DIAG = 0x4
- NETLINK_IP6_FW = 0xd
- NETLINK_ISCSI = 0x8
- NETLINK_KOBJECT_UEVENT = 0xf
- NETLINK_LISTEN_ALL_NSID = 0x8
- NETLINK_LIST_MEMBERSHIPS = 0x9
- NETLINK_NETFILTER = 0xc
- NETLINK_NFLOG = 0x5
- NETLINK_NO_ENOBUFS = 0x5
- NETLINK_PKTINFO = 0x3
- NETLINK_RDMA = 0x14
- NETLINK_ROUTE = 0x0
- NETLINK_RX_RING = 0x6
- NETLINK_SCSITRANSPORT = 0x12
- NETLINK_SELINUX = 0x7
- NETLINK_SMC = 0x16
- NETLINK_SOCK_DIAG = 0x4
- NETLINK_TX_RING = 0x7
- NETLINK_UNUSED = 0x1
- NETLINK_USERSOCK = 0x2
- NETLINK_XFRM = 0x6
- NETNSA_MAX = 0x5
- NETNSA_NSID_NOT_ASSIGNED = -0x1
- NFDBITS = 0x40
- NFNETLINK_V0 = 0x0
- NFNLGRP_ACCT_QUOTA = 0x8
- NFNLGRP_CONNTRACK_DESTROY = 0x3
- NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6
- NFNLGRP_CONNTRACK_EXP_NEW = 0x4
- NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5
- NFNLGRP_CONNTRACK_NEW = 0x1
- NFNLGRP_CONNTRACK_UPDATE = 0x2
- NFNLGRP_MAX = 0x9
- NFNLGRP_NFTABLES = 0x7
- NFNLGRP_NFTRACE = 0x9
- NFNLGRP_NONE = 0x0
- NFNL_BATCH_MAX = 0x1
- NFNL_MSG_BATCH_BEGIN = 0x10
- NFNL_MSG_BATCH_END = 0x11
- NFNL_NFA_NEST = 0x8000
- NFNL_SUBSYS_ACCT = 0x7
- NFNL_SUBSYS_COUNT = 0xc
- NFNL_SUBSYS_CTHELPER = 0x9
- NFNL_SUBSYS_CTNETLINK = 0x1
- NFNL_SUBSYS_CTNETLINK_EXP = 0x2
- NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8
- NFNL_SUBSYS_IPSET = 0x6
- NFNL_SUBSYS_NFTABLES = 0xa
- NFNL_SUBSYS_NFT_COMPAT = 0xb
- NFNL_SUBSYS_NONE = 0x0
- NFNL_SUBSYS_OSF = 0x5
- NFNL_SUBSYS_QUEUE = 0x3
- NFNL_SUBSYS_ULOG = 0x4
- NFS_SUPER_MAGIC = 0x6969
- NILFS_SUPER_MAGIC = 0x3434
- NL0 = 0x0
- NL1 = 0x100
- NLA_ALIGNTO = 0x4
- NLA_F_NESTED = 0x8000
- NLA_F_NET_BYTEORDER = 0x4000
- NLA_HDRLEN = 0x4
- NLDLY = 0x100
- NLMSG_ALIGNTO = 0x4
- NLMSG_DONE = 0x3
- NLMSG_ERROR = 0x2
- NLMSG_HDRLEN = 0x10
- NLMSG_MIN_TYPE = 0x10
- NLMSG_NOOP = 0x1
- NLMSG_OVERRUN = 0x4
- NLM_F_ACK = 0x4
- NLM_F_ACK_TLVS = 0x200
- NLM_F_APPEND = 0x800
- NLM_F_ATOMIC = 0x400
- NLM_F_CAPPED = 0x100
- NLM_F_CREATE = 0x400
- NLM_F_DUMP = 0x300
- NLM_F_DUMP_FILTERED = 0x20
- NLM_F_DUMP_INTR = 0x10
- NLM_F_ECHO = 0x8
- NLM_F_EXCL = 0x200
- NLM_F_MATCH = 0x200
- NLM_F_MULTI = 0x2
- NLM_F_NONREC = 0x100
- NLM_F_REPLACE = 0x100
- NLM_F_REQUEST = 0x1
- NLM_F_ROOT = 0x100
- NOFLSH = 0x80
- NSFS_MAGIC = 0x6e736673
- NS_GET_NSTYPE = 0x2000b703
- NS_GET_OWNER_UID = 0x2000b704
- NS_GET_PARENT = 0x2000b702
- NS_GET_USERNS = 0x2000b701
- OCFS2_SUPER_MAGIC = 0x7461636f
- OCRNL = 0x8
- OFDEL = 0x80
- OFILL = 0x40
- OLCUC = 0x2
- ONLCR = 0x4
- ONLRET = 0x20
- ONOCR = 0x10
- OPENPROM_SUPER_MAGIC = 0x9fa1
- OPOST = 0x1
- OVERLAYFS_SUPER_MAGIC = 0x794c7630
- O_ACCMODE = 0x3
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x400000
- O_CREAT = 0x200
- O_DIRECT = 0x100000
- O_DIRECTORY = 0x10000
- O_DSYNC = 0x2000
- O_EXCL = 0x800
- O_FSYNC = 0x802000
- O_LARGEFILE = 0x0
- O_NDELAY = 0x4004
- O_NOATIME = 0x200000
- O_NOCTTY = 0x8000
- O_NOFOLLOW = 0x20000
- O_NONBLOCK = 0x4000
- O_PATH = 0x1000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_RSYNC = 0x802000
- O_SYNC = 0x802000
- O_TMPFILE = 0x2010000
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PACKET_ADD_MEMBERSHIP = 0x1
- PACKET_AUXDATA = 0x8
- PACKET_BROADCAST = 0x1
- PACKET_COPY_THRESH = 0x7
- PACKET_DROP_MEMBERSHIP = 0x2
- PACKET_FANOUT = 0x12
- PACKET_FANOUT_CBPF = 0x6
- PACKET_FANOUT_CPU = 0x2
- PACKET_FANOUT_DATA = 0x16
- PACKET_FANOUT_EBPF = 0x7
- PACKET_FANOUT_FLAG_DEFRAG = 0x8000
- PACKET_FANOUT_FLAG_ROLLOVER = 0x1000
- PACKET_FANOUT_FLAG_UNIQUEID = 0x2000
- PACKET_FANOUT_HASH = 0x0
- PACKET_FANOUT_LB = 0x1
- PACKET_FANOUT_QM = 0x5
- PACKET_FANOUT_RND = 0x4
- PACKET_FANOUT_ROLLOVER = 0x3
- PACKET_FASTROUTE = 0x6
- PACKET_HDRLEN = 0xb
- PACKET_HOST = 0x0
- PACKET_IGNORE_OUTGOING = 0x17
- PACKET_KERNEL = 0x7
- PACKET_LOOPBACK = 0x5
- PACKET_LOSS = 0xe
- PACKET_MR_ALLMULTI = 0x2
- PACKET_MR_MULTICAST = 0x0
- PACKET_MR_PROMISC = 0x1
- PACKET_MR_UNICAST = 0x3
- PACKET_MULTICAST = 0x2
- PACKET_ORIGDEV = 0x9
- PACKET_OTHERHOST = 0x3
- PACKET_OUTGOING = 0x4
- PACKET_QDISC_BYPASS = 0x14
- PACKET_RECV_OUTPUT = 0x3
- PACKET_RESERVE = 0xc
- PACKET_ROLLOVER_STATS = 0x15
- PACKET_RX_RING = 0x5
- PACKET_STATISTICS = 0x6
- PACKET_TIMESTAMP = 0x11
- PACKET_TX_HAS_OFF = 0x13
- PACKET_TX_RING = 0xd
- PACKET_TX_TIMESTAMP = 0x10
- PACKET_USER = 0x6
- PACKET_VERSION = 0xa
- PACKET_VNET_HDR = 0xf
- PARENB = 0x100
- PARITY_CRC16_PR0 = 0x2
- PARITY_CRC16_PR0_CCITT = 0x4
- PARITY_CRC16_PR1 = 0x3
- PARITY_CRC16_PR1_CCITT = 0x5
- PARITY_CRC32_PR0_CCITT = 0x6
- PARITY_CRC32_PR1_CCITT = 0x7
- PARITY_DEFAULT = 0x0
- PARITY_NONE = 0x1
- PARMRK = 0x8
- PARODD = 0x200
- PENDIN = 0x4000
- PERF_EVENT_IOC_DISABLE = 0x20002401
- PERF_EVENT_IOC_ENABLE = 0x20002400
- PERF_EVENT_IOC_ID = 0x40082407
- PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
- PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
- PERF_EVENT_IOC_PERIOD = 0x80082404
- PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
- PERF_EVENT_IOC_REFRESH = 0x20002402
- PERF_EVENT_IOC_RESET = 0x20002403
- PERF_EVENT_IOC_SET_BPF = 0x80042408
- PERF_EVENT_IOC_SET_FILTER = 0x80082406
- PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
- PIPEFS_MAGIC = 0x50495045
- PPC_CMM_MAGIC = 0xc7571590
- PPPIOCATTACH = 0x8004743d
- PPPIOCATTCHAN = 0x80047438
- PPPIOCCONNECT = 0x8004743a
- PPPIOCDETACH = 0x8004743c
- PPPIOCDISCONN = 0x20007439
- PPPIOCGASYNCMAP = 0x40047458
- PPPIOCGCHAN = 0x40047437
- PPPIOCGDEBUG = 0x40047441
- PPPIOCGFLAGS = 0x4004745a
- PPPIOCGIDLE = 0x4010743f
- PPPIOCGIDLE32 = 0x4008743f
- PPPIOCGIDLE64 = 0x4010743f
- PPPIOCGL2TPSTATS = 0x40487436
- PPPIOCGMRU = 0x40047453
- PPPIOCGNPMODE = 0xc008744c
- PPPIOCGRASYNCMAP = 0x40047455
- PPPIOCGUNIT = 0x40047456
- PPPIOCGXASYNCMAP = 0x40207450
- PPPIOCNEWUNIT = 0xc004743e
- PPPIOCSACTIVE = 0x80107446
- PPPIOCSASYNCMAP = 0x80047457
- PPPIOCSCOMPRESS = 0x8010744d
- PPPIOCSDEBUG = 0x80047440
- PPPIOCSFLAGS = 0x80047459
- PPPIOCSMAXCID = 0x80047451
- PPPIOCSMRRU = 0x8004743b
- PPPIOCSMRU = 0x80047452
- PPPIOCSNPMODE = 0x8008744b
- PPPIOCSPASS = 0x80107447
- PPPIOCSRASYNCMAP = 0x80047454
- PPPIOCSXASYNCMAP = 0x8020744f
- PPPIOCXFERUNIT = 0x2000744e
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROC_SUPER_MAGIC = 0x9fa0
- PROT_EXEC = 0x4
- PROT_GROWSDOWN = 0x1000000
- PROT_GROWSUP = 0x2000000
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PR_CAPBSET_DROP = 0x18
- PR_CAPBSET_READ = 0x17
- PR_CAP_AMBIENT = 0x2f
- PR_CAP_AMBIENT_CLEAR_ALL = 0x4
- PR_CAP_AMBIENT_IS_SET = 0x1
- PR_CAP_AMBIENT_LOWER = 0x3
- PR_CAP_AMBIENT_RAISE = 0x2
- PR_ENDIAN_BIG = 0x0
- PR_ENDIAN_LITTLE = 0x1
- PR_ENDIAN_PPC_LITTLE = 0x2
- PR_FPEMU_NOPRINT = 0x1
- PR_FPEMU_SIGFPE = 0x2
- PR_FP_EXC_ASYNC = 0x2
- PR_FP_EXC_DISABLED = 0x0
- PR_FP_EXC_DIV = 0x10000
- PR_FP_EXC_INV = 0x100000
- PR_FP_EXC_NONRECOV = 0x1
- PR_FP_EXC_OVF = 0x20000
- PR_FP_EXC_PRECISE = 0x3
- PR_FP_EXC_RES = 0x80000
- PR_FP_EXC_SW_ENABLE = 0x80
- PR_FP_EXC_UND = 0x40000
- PR_FP_MODE_FR = 0x1
- PR_FP_MODE_FRE = 0x2
- PR_GET_CHILD_SUBREAPER = 0x25
- PR_GET_DUMPABLE = 0x3
- PR_GET_ENDIAN = 0x13
- PR_GET_FPEMU = 0x9
- PR_GET_FPEXC = 0xb
- PR_GET_FP_MODE = 0x2e
- PR_GET_KEEPCAPS = 0x7
- PR_GET_NAME = 0x10
- PR_GET_NO_NEW_PRIVS = 0x27
- PR_GET_PDEATHSIG = 0x2
- PR_GET_SECCOMP = 0x15
- PR_GET_SECUREBITS = 0x1b
- PR_GET_SPECULATION_CTRL = 0x34
- PR_GET_TAGGED_ADDR_CTRL = 0x38
- PR_GET_THP_DISABLE = 0x2a
- PR_GET_TID_ADDRESS = 0x28
- PR_GET_TIMERSLACK = 0x1e
- PR_GET_TIMING = 0xd
- PR_GET_TSC = 0x19
- PR_GET_UNALIGN = 0x5
- PR_MCE_KILL = 0x21
- PR_MCE_KILL_CLEAR = 0x0
- PR_MCE_KILL_DEFAULT = 0x2
- PR_MCE_KILL_EARLY = 0x1
- PR_MCE_KILL_GET = 0x22
- PR_MCE_KILL_LATE = 0x0
- PR_MCE_KILL_SET = 0x1
- PR_MPX_DISABLE_MANAGEMENT = 0x2c
- PR_MPX_ENABLE_MANAGEMENT = 0x2b
- PR_PAC_APDAKEY = 0x4
- PR_PAC_APDBKEY = 0x8
- PR_PAC_APGAKEY = 0x10
- PR_PAC_APIAKEY = 0x1
- PR_PAC_APIBKEY = 0x2
- PR_PAC_RESET_KEYS = 0x36
- PR_SET_CHILD_SUBREAPER = 0x24
- PR_SET_DUMPABLE = 0x4
- PR_SET_ENDIAN = 0x14
- PR_SET_FPEMU = 0xa
- PR_SET_FPEXC = 0xc
- PR_SET_FP_MODE = 0x2d
- PR_SET_KEEPCAPS = 0x8
- PR_SET_MM = 0x23
- PR_SET_MM_ARG_END = 0x9
- PR_SET_MM_ARG_START = 0x8
- PR_SET_MM_AUXV = 0xc
- PR_SET_MM_BRK = 0x7
- PR_SET_MM_END_CODE = 0x2
- PR_SET_MM_END_DATA = 0x4
- PR_SET_MM_ENV_END = 0xb
- PR_SET_MM_ENV_START = 0xa
- PR_SET_MM_EXE_FILE = 0xd
- PR_SET_MM_MAP = 0xe
- PR_SET_MM_MAP_SIZE = 0xf
- PR_SET_MM_START_BRK = 0x6
- PR_SET_MM_START_CODE = 0x1
- PR_SET_MM_START_DATA = 0x3
- PR_SET_MM_START_STACK = 0x5
- PR_SET_NAME = 0xf
- PR_SET_NO_NEW_PRIVS = 0x26
- PR_SET_PDEATHSIG = 0x1
- PR_SET_PTRACER = 0x59616d61
- PR_SET_PTRACER_ANY = 0xffffffffffffffff
- PR_SET_SECCOMP = 0x16
- PR_SET_SECUREBITS = 0x1c
- PR_SET_SPECULATION_CTRL = 0x35
- PR_SET_TAGGED_ADDR_CTRL = 0x37
- PR_SET_THP_DISABLE = 0x29
- PR_SET_TIMERSLACK = 0x1d
- PR_SET_TIMING = 0xe
- PR_SET_TSC = 0x1a
- PR_SET_UNALIGN = 0x6
- PR_SPEC_DISABLE = 0x4
- PR_SPEC_DISABLE_NOEXEC = 0x10
- PR_SPEC_ENABLE = 0x2
- PR_SPEC_FORCE_DISABLE = 0x8
- PR_SPEC_INDIRECT_BRANCH = 0x1
- PR_SPEC_NOT_AFFECTED = 0x0
- PR_SPEC_PRCTL = 0x1
- PR_SPEC_STORE_BYPASS = 0x0
- PR_SVE_GET_VL = 0x33
- PR_SVE_SET_VL = 0x32
- PR_SVE_SET_VL_ONEXEC = 0x40000
- PR_SVE_VL_INHERIT = 0x20000
- PR_SVE_VL_LEN_MASK = 0xffff
- PR_TAGGED_ADDR_ENABLE = 0x1
- PR_TASK_PERF_EVENTS_DISABLE = 0x1f
- PR_TASK_PERF_EVENTS_ENABLE = 0x20
- PR_TIMING_STATISTICAL = 0x0
- PR_TIMING_TIMESTAMP = 0x1
- PR_TSC_ENABLE = 0x1
- PR_TSC_SIGSEGV = 0x2
- PR_UNALIGN_NOPRINT = 0x1
- PR_UNALIGN_SIGBUS = 0x2
- PSTOREFS_MAGIC = 0x6165676c
- PTRACE_ATTACH = 0x10
- PTRACE_CONT = 0x7
- PTRACE_DETACH = 0x11
- PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1
- PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2
- PTRACE_EVENT_CLONE = 0x3
- PTRACE_EVENT_EXEC = 0x4
- PTRACE_EVENT_EXIT = 0x6
- PTRACE_EVENT_FORK = 0x1
- PTRACE_EVENT_SECCOMP = 0x7
- PTRACE_EVENT_STOP = 0x80
- PTRACE_EVENT_VFORK = 0x2
- PTRACE_EVENT_VFORK_DONE = 0x5
- PTRACE_GETEVENTMSG = 0x4201
- PTRACE_GETFPAREGS = 0x14
- PTRACE_GETFPREGS = 0xe
- PTRACE_GETFPREGS64 = 0x19
- PTRACE_GETREGS = 0xc
- PTRACE_GETREGS64 = 0x16
- PTRACE_GETREGSET = 0x4204
- PTRACE_GETSIGINFO = 0x4202
- PTRACE_GETSIGMASK = 0x420a
- PTRACE_GET_SYSCALL_INFO = 0x420e
- PTRACE_INTERRUPT = 0x4207
- PTRACE_KILL = 0x8
- PTRACE_LISTEN = 0x4208
- PTRACE_O_EXITKILL = 0x100000
- PTRACE_O_MASK = 0x3000ff
- PTRACE_O_SUSPEND_SECCOMP = 0x200000
- PTRACE_O_TRACECLONE = 0x8
- PTRACE_O_TRACEEXEC = 0x10
- PTRACE_O_TRACEEXIT = 0x40
- PTRACE_O_TRACEFORK = 0x2
- PTRACE_O_TRACESECCOMP = 0x80
- PTRACE_O_TRACESYSGOOD = 0x1
- PTRACE_O_TRACEVFORK = 0x4
- PTRACE_O_TRACEVFORKDONE = 0x20
- PTRACE_PEEKDATA = 0x2
- PTRACE_PEEKSIGINFO = 0x4209
- PTRACE_PEEKSIGINFO_SHARED = 0x1
- PTRACE_PEEKTEXT = 0x1
- PTRACE_PEEKUSR = 0x3
- PTRACE_POKEDATA = 0x5
- PTRACE_POKETEXT = 0x4
- PTRACE_POKEUSR = 0x6
- PTRACE_READDATA = 0x10
- PTRACE_READTEXT = 0x12
- PTRACE_SECCOMP_GET_FILTER = 0x420c
- PTRACE_SECCOMP_GET_METADATA = 0x420d
- PTRACE_SEIZE = 0x4206
- PTRACE_SETFPAREGS = 0x15
- PTRACE_SETFPREGS = 0xf
- PTRACE_SETFPREGS64 = 0x1a
- PTRACE_SETOPTIONS = 0x4200
- PTRACE_SETREGS = 0xd
- PTRACE_SETREGS64 = 0x17
- PTRACE_SETREGSET = 0x4205
- PTRACE_SETSIGINFO = 0x4203
- PTRACE_SETSIGMASK = 0x420b
- PTRACE_SINGLESTEP = 0x9
- PTRACE_SPARC_DETACH = 0xb
- PTRACE_SYSCALL = 0x18
- PTRACE_SYSCALL_INFO_ENTRY = 0x1
- PTRACE_SYSCALL_INFO_EXIT = 0x2
- PTRACE_SYSCALL_INFO_NONE = 0x0
- PTRACE_SYSCALL_INFO_SECCOMP = 0x3
- PTRACE_TRACEME = 0x0
- PTRACE_WRITEDATA = 0x11
- PTRACE_WRITETEXT = 0x13
- PT_FP = 0x48
- PT_G0 = 0x10
- PT_G1 = 0x14
- PT_G2 = 0x18
- PT_G3 = 0x1c
- PT_G4 = 0x20
- PT_G5 = 0x24
- PT_G6 = 0x28
- PT_G7 = 0x2c
- PT_I0 = 0x30
- PT_I1 = 0x34
- PT_I2 = 0x38
- PT_I3 = 0x3c
- PT_I4 = 0x40
- PT_I5 = 0x44
- PT_I6 = 0x48
- PT_I7 = 0x4c
- PT_NPC = 0x8
- PT_PC = 0x4
- PT_PSR = 0x0
- PT_REGS_MAGIC = 0x57ac6c00
- PT_TNPC = 0x90
- PT_TPC = 0x88
- PT_TSTATE = 0x80
- PT_V9_FP = 0x70
- PT_V9_G0 = 0x0
- PT_V9_G1 = 0x8
- PT_V9_G2 = 0x10
- PT_V9_G3 = 0x18
- PT_V9_G4 = 0x20
- PT_V9_G5 = 0x28
- PT_V9_G6 = 0x30
- PT_V9_G7 = 0x38
- PT_V9_I0 = 0x40
- PT_V9_I1 = 0x48
- PT_V9_I2 = 0x50
- PT_V9_I3 = 0x58
- PT_V9_I4 = 0x60
- PT_V9_I5 = 0x68
- PT_V9_I6 = 0x70
- PT_V9_I7 = 0x78
- PT_V9_MAGIC = 0x9c
- PT_V9_TNPC = 0x90
- PT_V9_TPC = 0x88
- PT_V9_TSTATE = 0x80
- PT_V9_Y = 0x98
- PT_WIM = 0x10
- PT_Y = 0xc
- QNX4_SUPER_MAGIC = 0x2f
- QNX6_SUPER_MAGIC = 0x68191122
- RAMFS_MAGIC = 0x858458f6
- RDTGROUP_SUPER_MAGIC = 0x7655821
- REISERFS_SUPER_MAGIC = 0x52654973
- RENAME_EXCHANGE = 0x2
- RENAME_NOREPLACE = 0x1
- RENAME_WHITEOUT = 0x4
- RLIMIT_AS = 0x9
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_LOCKS = 0xa
- RLIMIT_MEMLOCK = 0x8
- RLIMIT_MSGQUEUE = 0xc
- RLIMIT_NICE = 0xd
- RLIMIT_NOFILE = 0x6
- RLIMIT_NPROC = 0x7
- RLIMIT_RSS = 0x5
- RLIMIT_RTPRIO = 0xe
- RLIMIT_RTTIME = 0xf
- RLIMIT_SIGPENDING = 0xb
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0xffffffffffffffff
- RNDADDENTROPY = 0x80085203
- RNDADDTOENTCNT = 0x80045201
- RNDCLEARPOOL = 0x20005206
- RNDGETENTCNT = 0x40045200
- RNDGETPOOL = 0x40085202
- RNDRESEEDCRNG = 0x20005207
- RNDZAPENTCNT = 0x20005204
- RTAX_ADVMSS = 0x8
- RTAX_CC_ALGO = 0x10
- RTAX_CWND = 0x7
- RTAX_FASTOPEN_NO_COOKIE = 0x11
- RTAX_FEATURES = 0xc
- RTAX_FEATURE_ALLFRAG = 0x8
- RTAX_FEATURE_ECN = 0x1
- RTAX_FEATURE_MASK = 0xf
- RTAX_FEATURE_SACK = 0x2
- RTAX_FEATURE_TIMESTAMP = 0x4
- RTAX_HOPLIMIT = 0xa
- RTAX_INITCWND = 0xb
- RTAX_INITRWND = 0xe
- RTAX_LOCK = 0x1
- RTAX_MAX = 0x11
- RTAX_MTU = 0x2
- RTAX_QUICKACK = 0xf
- RTAX_REORDERING = 0x9
- RTAX_RTO_MIN = 0xd
- RTAX_RTT = 0x4
- RTAX_RTTVAR = 0x5
- RTAX_SSTHRESH = 0x6
- RTAX_UNSPEC = 0x0
- RTAX_WINDOW = 0x3
- RTA_ALIGNTO = 0x4
- RTA_MAX = 0x1e
- RTCF_DIRECTSRC = 0x4000000
- RTCF_DOREDIRECT = 0x1000000
- RTCF_LOG = 0x2000000
- RTCF_MASQ = 0x400000
- RTCF_NAT = 0x800000
- RTCF_VALVE = 0x200000
- RTC_AF = 0x20
- RTC_AIE_OFF = 0x20007002
- RTC_AIE_ON = 0x20007001
- RTC_ALM_READ = 0x40247008
- RTC_ALM_SET = 0x80247007
- RTC_EPOCH_READ = 0x4008700d
- RTC_EPOCH_SET = 0x8008700e
- RTC_IRQF = 0x80
- RTC_IRQP_READ = 0x4008700b
- RTC_IRQP_SET = 0x8008700c
- RTC_MAX_FREQ = 0x2000
- RTC_PF = 0x40
- RTC_PIE_OFF = 0x20007006
- RTC_PIE_ON = 0x20007005
- RTC_PLL_GET = 0x40207011
- RTC_PLL_SET = 0x80207012
- RTC_RD_TIME = 0x40247009
- RTC_SET_TIME = 0x8024700a
- RTC_UF = 0x10
- RTC_UIE_OFF = 0x20007004
- RTC_UIE_ON = 0x20007003
- RTC_VL_CLR = 0x20007014
- RTC_VL_READ = 0x40047013
- RTC_WIE_OFF = 0x20007010
- RTC_WIE_ON = 0x2000700f
- RTC_WKALM_RD = 0x40287010
- RTC_WKALM_SET = 0x8028700f
- RTF_ADDRCLASSMASK = 0xf8000000
- RTF_ADDRCONF = 0x40000
- RTF_ALLONLINK = 0x20000
- RTF_BROADCAST = 0x10000000
- RTF_CACHE = 0x1000000
- RTF_DEFAULT = 0x10000
- RTF_DYNAMIC = 0x10
- RTF_FLOW = 0x2000000
- RTF_GATEWAY = 0x2
- RTF_HOST = 0x4
- RTF_INTERFACE = 0x40000000
- RTF_IRTT = 0x100
- RTF_LINKRT = 0x100000
- RTF_LOCAL = 0x80000000
- RTF_MODIFIED = 0x20
- RTF_MSS = 0x40
- RTF_MTU = 0x40
- RTF_MULTICAST = 0x20000000
- RTF_NAT = 0x8000000
- RTF_NOFORWARD = 0x1000
- RTF_NONEXTHOP = 0x200000
- RTF_NOPMTUDISC = 0x4000
- RTF_POLICY = 0x4000000
- RTF_REINSTATE = 0x8
- RTF_REJECT = 0x200
- RTF_STATIC = 0x400
- RTF_THROW = 0x2000
- RTF_UP = 0x1
- RTF_WINDOW = 0x80
- RTF_XRESOLVE = 0x800
- RTM_BASE = 0x10
- RTM_DELACTION = 0x31
- RTM_DELADDR = 0x15
- RTM_DELADDRLABEL = 0x49
- RTM_DELCHAIN = 0x65
- RTM_DELLINK = 0x11
- RTM_DELLINKPROP = 0x6d
- RTM_DELMDB = 0x55
- RTM_DELNEIGH = 0x1d
- RTM_DELNETCONF = 0x51
- RTM_DELNEXTHOP = 0x69
- RTM_DELNSID = 0x59
- RTM_DELQDISC = 0x25
- RTM_DELROUTE = 0x19
- RTM_DELRULE = 0x21
- RTM_DELTCLASS = 0x29
- RTM_DELTFILTER = 0x2d
- RTM_F_CLONED = 0x200
- RTM_F_EQUALIZE = 0x400
- RTM_F_FIB_MATCH = 0x2000
- RTM_F_LOOKUP_TABLE = 0x1000
- RTM_F_NOTIFY = 0x100
- RTM_F_PREFIX = 0x800
- RTM_GETACTION = 0x32
- RTM_GETADDR = 0x16
- RTM_GETADDRLABEL = 0x4a
- RTM_GETANYCAST = 0x3e
- RTM_GETCHAIN = 0x66
- RTM_GETDCB = 0x4e
- RTM_GETLINK = 0x12
- RTM_GETLINKPROP = 0x6e
- RTM_GETMDB = 0x56
- RTM_GETMULTICAST = 0x3a
- RTM_GETNEIGH = 0x1e
- RTM_GETNEIGHTBL = 0x42
- RTM_GETNETCONF = 0x52
- RTM_GETNEXTHOP = 0x6a
- RTM_GETNSID = 0x5a
- RTM_GETQDISC = 0x26
- RTM_GETROUTE = 0x1a
- RTM_GETRULE = 0x22
- RTM_GETSTATS = 0x5e
- RTM_GETTCLASS = 0x2a
- RTM_GETTFILTER = 0x2e
- RTM_MAX = 0x6f
- RTM_NEWACTION = 0x30
- RTM_NEWADDR = 0x14
- RTM_NEWADDRLABEL = 0x48
- RTM_NEWCACHEREPORT = 0x60
- RTM_NEWCHAIN = 0x64
- RTM_NEWLINK = 0x10
- RTM_NEWLINKPROP = 0x6c
- RTM_NEWMDB = 0x54
- RTM_NEWNDUSEROPT = 0x44
- RTM_NEWNEIGH = 0x1c
- RTM_NEWNEIGHTBL = 0x40
- RTM_NEWNETCONF = 0x50
- RTM_NEWNEXTHOP = 0x68
- RTM_NEWNSID = 0x58
- RTM_NEWPREFIX = 0x34
- RTM_NEWQDISC = 0x24
- RTM_NEWROUTE = 0x18
- RTM_NEWRULE = 0x20
- RTM_NEWSTATS = 0x5c
- RTM_NEWTCLASS = 0x28
- RTM_NEWTFILTER = 0x2c
- RTM_NR_FAMILIES = 0x18
- RTM_NR_MSGTYPES = 0x60
- RTM_SETDCB = 0x4f
- RTM_SETLINK = 0x13
- RTM_SETNEIGHTBL = 0x43
- RTNH_ALIGNTO = 0x4
- RTNH_COMPARE_MASK = 0x19
- RTNH_F_DEAD = 0x1
- RTNH_F_LINKDOWN = 0x10
- RTNH_F_OFFLOAD = 0x8
- RTNH_F_ONLINK = 0x4
- RTNH_F_PERVASIVE = 0x2
- RTNH_F_UNRESOLVED = 0x20
- RTN_MAX = 0xb
- RTPROT_BABEL = 0x2a
- RTPROT_BGP = 0xba
- RTPROT_BIRD = 0xc
- RTPROT_BOOT = 0x3
- RTPROT_DHCP = 0x10
- RTPROT_DNROUTED = 0xd
- RTPROT_EIGRP = 0xc0
- RTPROT_GATED = 0x8
- RTPROT_ISIS = 0xbb
- RTPROT_KERNEL = 0x2
- RTPROT_MROUTED = 0x11
- RTPROT_MRT = 0xa
- RTPROT_NTK = 0xf
- RTPROT_OSPF = 0xbc
- RTPROT_RA = 0x9
- RTPROT_REDIRECT = 0x1
- RTPROT_RIP = 0xbd
- RTPROT_STATIC = 0x4
- RTPROT_UNSPEC = 0x0
- RTPROT_XORP = 0xe
- RTPROT_ZEBRA = 0xb
- RT_CLASS_DEFAULT = 0xfd
- RT_CLASS_LOCAL = 0xff
- RT_CLASS_MAIN = 0xfe
- RT_CLASS_MAX = 0xff
- RT_CLASS_UNSPEC = 0x0
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- RUSAGE_THREAD = 0x1
- RWF_APPEND = 0x10
- RWF_DSYNC = 0x2
- RWF_HIPRI = 0x1
- RWF_NOWAIT = 0x8
- RWF_SUPPORTED = 0x1f
- RWF_SYNC = 0x4
- RWF_WRITE_LIFE_NOT_SET = 0x0
- SCM_CREDENTIALS = 0x2
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x1d
- SCM_TIMESTAMPING = 0x23
- SCM_TIMESTAMPING_OPT_STATS = 0x38
- SCM_TIMESTAMPING_PKTINFO = 0x3c
- SCM_TIMESTAMPNS = 0x21
- SCM_TXTIME = 0x3f
- SCM_WIFI_STATUS = 0x25
- SC_LOG_FLUSH = 0x100000
- SECCOMP_MODE_DISABLED = 0x0
- SECCOMP_MODE_FILTER = 0x2
- SECCOMP_MODE_STRICT = 0x1
- SECURITYFS_MAGIC = 0x73636673
- SELINUX_MAGIC = 0xf97cff8c
- SFD_CLOEXEC = 0x400000
- SFD_NONBLOCK = 0x4000
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDDLCI = 0x8980
- SIOCADDMULTI = 0x8931
- SIOCADDRT = 0x890b
- SIOCATMARK = 0x8905
- SIOCBONDCHANGEACTIVE = 0x8995
- SIOCBONDENSLAVE = 0x8990
- SIOCBONDINFOQUERY = 0x8994
- SIOCBONDRELEASE = 0x8991
- SIOCBONDSETHWADDR = 0x8992
- SIOCBONDSLAVEINFOQUERY = 0x8993
- SIOCBRADDBR = 0x89a0
- SIOCBRADDIF = 0x89a2
- SIOCBRDELBR = 0x89a1
- SIOCBRDELIF = 0x89a3
- SIOCDARP = 0x8953
- SIOCDELDLCI = 0x8981
- SIOCDELMULTI = 0x8932
- SIOCDELRT = 0x890c
- SIOCDEVPRIVATE = 0x89f0
- SIOCDIFADDR = 0x8936
- SIOCDRARP = 0x8960
- SIOCETHTOOL = 0x8946
- SIOCGARP = 0x8954
- SIOCGETLINKNAME = 0x89e0
- SIOCGETNODEID = 0x89e1
- SIOCGHWTSTAMP = 0x89b1
- SIOCGIFADDR = 0x8915
- SIOCGIFBR = 0x8940
- SIOCGIFBRDADDR = 0x8919
- SIOCGIFCONF = 0x8912
- SIOCGIFCOUNT = 0x8938
- SIOCGIFDSTADDR = 0x8917
- SIOCGIFENCAP = 0x8925
- SIOCGIFFLAGS = 0x8913
- SIOCGIFHWADDR = 0x8927
- SIOCGIFINDEX = 0x8933
- SIOCGIFMAP = 0x8970
- SIOCGIFMEM = 0x891f
- SIOCGIFMETRIC = 0x891d
- SIOCGIFMTU = 0x8921
- SIOCGIFNAME = 0x8910
- SIOCGIFNETMASK = 0x891b
- SIOCGIFPFLAGS = 0x8935
- SIOCGIFSLAVE = 0x8929
- SIOCGIFTXQLEN = 0x8942
- SIOCGIFVLAN = 0x8982
- SIOCGMIIPHY = 0x8947
- SIOCGMIIREG = 0x8948
- SIOCGPGRP = 0x8904
- SIOCGPPPCSTATS = 0x89f2
- SIOCGPPPSTATS = 0x89f0
- SIOCGPPPVER = 0x89f1
- SIOCGRARP = 0x8961
- SIOCGSKNS = 0x894c
- SIOCGSTAMP = 0x8906
- SIOCGSTAMPNS = 0x8907
- SIOCGSTAMPNS_NEW = 0x40108907
- SIOCGSTAMPNS_OLD = 0x8907
- SIOCGSTAMP_NEW = 0x40108906
- SIOCGSTAMP_OLD = 0x8906
- SIOCINQ = 0x4004667f
- SIOCOUTQ = 0x40047473
- SIOCOUTQNSD = 0x894b
- SIOCPROTOPRIVATE = 0x89e0
- SIOCRTMSG = 0x890d
- SIOCSARP = 0x8955
- SIOCSHWTSTAMP = 0x89b0
- SIOCSIFADDR = 0x8916
- SIOCSIFBR = 0x8941
- SIOCSIFBRDADDR = 0x891a
- SIOCSIFDSTADDR = 0x8918
- SIOCSIFENCAP = 0x8926
- SIOCSIFFLAGS = 0x8914
- SIOCSIFHWADDR = 0x8924
- SIOCSIFHWBROADCAST = 0x8937
- SIOCSIFLINK = 0x8911
- SIOCSIFMAP = 0x8971
- SIOCSIFMEM = 0x8920
- SIOCSIFMETRIC = 0x891e
- SIOCSIFMTU = 0x8922
- SIOCSIFNAME = 0x8923
- SIOCSIFNETMASK = 0x891c
- SIOCSIFPFLAGS = 0x8934
- SIOCSIFSLAVE = 0x8930
- SIOCSIFTXQLEN = 0x8943
- SIOCSIFVLAN = 0x8983
- SIOCSMIIREG = 0x8949
- SIOCSPGRP = 0x8902
- SIOCSRARP = 0x8962
- SIOCWANDEV = 0x894a
- SMACK_MAGIC = 0x43415d53
- SMART_AUTOSAVE = 0xd2
- SMART_AUTO_OFFLINE = 0xdb
- SMART_DISABLE = 0xd9
- SMART_ENABLE = 0xd8
- SMART_HCYL_PASS = 0xc2
- SMART_IMMEDIATE_OFFLINE = 0xd4
- SMART_LCYL_PASS = 0x4f
- SMART_READ_LOG_SECTOR = 0xd5
- SMART_READ_THRESHOLDS = 0xd1
- SMART_READ_VALUES = 0xd0
- SMART_SAVE = 0xd3
- SMART_STATUS = 0xda
- SMART_WRITE_LOG_SECTOR = 0xd6
- SMART_WRITE_THRESHOLDS = 0xd7
- SMB_SUPER_MAGIC = 0x517b
- SOCKFS_MAGIC = 0x534f434b
- SOCK_CLOEXEC = 0x400000
- SOCK_DCCP = 0x6
- SOCK_DGRAM = 0x2
- SOCK_IOC_TYPE = 0x89
- SOCK_NONBLOCK = 0x4000
- SOCK_PACKET = 0xa
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_AAL = 0x109
- SOL_ALG = 0x117
- SOL_ATM = 0x108
- SOL_CAIF = 0x116
- SOL_CAN_BASE = 0x64
- SOL_DCCP = 0x10d
- SOL_DECNET = 0x105
- SOL_ICMPV6 = 0x3a
- SOL_IP = 0x0
- SOL_IPV6 = 0x29
- SOL_IRDA = 0x10a
- SOL_IUCV = 0x115
- SOL_KCM = 0x119
- SOL_LLC = 0x10c
- SOL_NETBEUI = 0x10b
- SOL_NETLINK = 0x10e
- SOL_NFC = 0x118
- SOL_PACKET = 0x107
- SOL_PNPIPE = 0x113
- SOL_PPPOL2TP = 0x111
- SOL_RAW = 0xff
- SOL_RDS = 0x114
- SOL_RXRPC = 0x110
- SOL_SOCKET = 0xffff
- SOL_TCP = 0x6
- SOL_TIPC = 0x10f
- SOL_TLS = 0x11a
- SOL_X25 = 0x106
- SOL_XDP = 0x11b
- SOMAXCONN = 0x1000
- SO_ACCEPTCONN = 0x8000
- SO_ATTACH_BPF = 0x34
- SO_ATTACH_FILTER = 0x1a
- SO_ATTACH_REUSEPORT_CBPF = 0x35
- SO_ATTACH_REUSEPORT_EBPF = 0x36
- SO_BINDTODEVICE = 0xd
- SO_BINDTOIFINDEX = 0x41
- SO_BPF_EXTENSIONS = 0x32
- SO_BROADCAST = 0x20
- SO_BSDCOMPAT = 0x400
- SO_BUSY_POLL = 0x30
- SO_CNX_ADVICE = 0x37
- SO_COOKIE = 0x3b
- SO_DEBUG = 0x1
- SO_DETACH_BPF = 0x1b
- SO_DETACH_FILTER = 0x1b
- SO_DETACH_REUSEPORT_BPF = 0x47
- SO_DOMAIN = 0x1029
- SO_DONTROUTE = 0x10
- SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1
- SO_EE_CODE_TXTIME_MISSED = 0x2
- SO_EE_CODE_ZEROCOPY_COPIED = 0x1
- SO_EE_ORIGIN_ICMP = 0x2
- SO_EE_ORIGIN_ICMP6 = 0x3
- SO_EE_ORIGIN_LOCAL = 0x1
- SO_EE_ORIGIN_NONE = 0x0
- SO_EE_ORIGIN_TIMESTAMPING = 0x4
- SO_EE_ORIGIN_TXSTATUS = 0x4
- SO_EE_ORIGIN_TXTIME = 0x6
- SO_EE_ORIGIN_ZEROCOPY = 0x5
- SO_ERROR = 0x1007
- SO_GET_FILTER = 0x1a
- SO_INCOMING_CPU = 0x33
- SO_INCOMING_NAPI_ID = 0x3a
- SO_KEEPALIVE = 0x8
- SO_LINGER = 0x80
- SO_LOCK_FILTER = 0x28
- SO_MARK = 0x22
- SO_MAX_PACING_RATE = 0x31
- SO_MEMINFO = 0x39
- SO_NOFCS = 0x27
- SO_NO_CHECK = 0xb
- SO_OOBINLINE = 0x100
- SO_PASSCRED = 0x2
- SO_PASSSEC = 0x1f
- SO_PEEK_OFF = 0x26
- SO_PEERCRED = 0x40
- SO_PEERGROUPS = 0x3d
- SO_PEERNAME = 0x1c
- SO_PEERSEC = 0x1e
- SO_PRIORITY = 0xc
- SO_PROTOCOL = 0x1028
- SO_RCVBUF = 0x1002
- SO_RCVBUFFORCE = 0x100b
- SO_RCVLOWAT = 0x800
- SO_RCVTIMEO = 0x2000
- SO_RCVTIMEO_NEW = 0x44
- SO_RCVTIMEO_OLD = 0x2000
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_RXQ_OVFL = 0x24
- SO_SECURITY_AUTHENTICATION = 0x5001
- SO_SECURITY_ENCRYPTION_NETWORK = 0x5004
- SO_SECURITY_ENCRYPTION_TRANSPORT = 0x5002
- SO_SELECT_ERR_QUEUE = 0x29
- SO_SNDBUF = 0x1001
- SO_SNDBUFFORCE = 0x100a
- SO_SNDLOWAT = 0x1000
- SO_SNDTIMEO = 0x4000
- SO_SNDTIMEO_NEW = 0x45
- SO_SNDTIMEO_OLD = 0x4000
- SO_TIMESTAMP = 0x1d
- SO_TIMESTAMPING = 0x23
- SO_TIMESTAMPING_NEW = 0x43
- SO_TIMESTAMPING_OLD = 0x23
- SO_TIMESTAMPNS = 0x21
- SO_TIMESTAMPNS_NEW = 0x42
- SO_TIMESTAMPNS_OLD = 0x21
- SO_TIMESTAMP_NEW = 0x46
- SO_TIMESTAMP_OLD = 0x1d
- SO_TXTIME = 0x3f
- SO_TYPE = 0x1008
- SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
- SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
- SO_VM_SOCKETS_BUFFER_SIZE = 0x0
- SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
- SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
- SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
- SO_VM_SOCKETS_TRUSTED = 0x5
- SO_WIFI_STATUS = 0x25
- SO_ZEROCOPY = 0x3e
- SPLICE_F_GIFT = 0x8
- SPLICE_F_MORE = 0x4
- SPLICE_F_MOVE = 0x1
- SPLICE_F_NONBLOCK = 0x2
- SQUASHFS_MAGIC = 0x73717368
- STACK_END_MAGIC = 0x57ac6e9d
- STATX_ALL = 0xfff
- STATX_ATIME = 0x20
- STATX_ATTR_APPEND = 0x20
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x4
- STATX_ATTR_ENCRYPTED = 0x800
- STATX_ATTR_IMMUTABLE = 0x10
- STATX_ATTR_NODUMP = 0x40
- STATX_ATTR_VERITY = 0x100000
- STATX_BASIC_STATS = 0x7ff
- STATX_BLOCKS = 0x400
- STATX_BTIME = 0x800
- STATX_CTIME = 0x80
- STATX_GID = 0x10
- STATX_INO = 0x100
- STATX_MODE = 0x2
- STATX_MTIME = 0x40
- STATX_NLINK = 0x4
- STATX_SIZE = 0x200
- STATX_TYPE = 0x1
- STATX_UID = 0x8
- STATX__RESERVED = 0x80000000
- SYNC_FILE_RANGE_WAIT_AFTER = 0x4
- SYNC_FILE_RANGE_WAIT_BEFORE = 0x1
- SYNC_FILE_RANGE_WRITE = 0x2
- SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7
- SYSFS_MAGIC = 0x62656572
- S_BLKSIZE = 0x200
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x800
- TAB2 = 0x1000
- TAB3 = 0x1800
- TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x9
- TCFLSH = 0x20005407
- TCGETA = 0x40125401
- TCGETS = 0x40245408
- TCGETS2 = 0x402c540c
- TCIFLUSH = 0x0
- TCIOFF = 0x2
- TCIOFLUSH = 0x2
- TCION = 0x3
- TCOFLUSH = 0x1
- TCOOFF = 0x0
- TCOON = 0x1
- TCP_BPF_IW = 0x3e9
- TCP_BPF_SNDCWND_CLAMP = 0x3ea
- TCP_CC_INFO = 0x1a
- TCP_CM_INQ = 0x24
- TCP_CONGESTION = 0xd
- TCP_COOKIE_IN_ALWAYS = 0x1
- TCP_COOKIE_MAX = 0x10
- TCP_COOKIE_MIN = 0x8
- TCP_COOKIE_OUT_NEVER = 0x2
- TCP_COOKIE_PAIR_SIZE = 0x20
- TCP_COOKIE_TRANSACTIONS = 0xf
- TCP_CORK = 0x3
- TCP_DEFER_ACCEPT = 0x9
- TCP_FASTOPEN = 0x17
- TCP_FASTOPEN_CONNECT = 0x1e
- TCP_FASTOPEN_KEY = 0x21
- TCP_FASTOPEN_NO_COOKIE = 0x22
- TCP_INFO = 0xb
- TCP_INQ = 0x24
- TCP_KEEPCNT = 0x6
- TCP_KEEPIDLE = 0x4
- TCP_KEEPINTVL = 0x5
- TCP_LINGER2 = 0x8
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_WINSHIFT = 0xe
- TCP_MD5SIG = 0xe
- TCP_MD5SIG_EXT = 0x20
- TCP_MD5SIG_FLAG_PREFIX = 0x1
- TCP_MD5SIG_MAXKEYLEN = 0x50
- TCP_MSS = 0x200
- TCP_MSS_DEFAULT = 0x218
- TCP_MSS_DESIRED = 0x4c4
- TCP_NODELAY = 0x1
- TCP_NOTSENT_LOWAT = 0x19
- TCP_QUEUE_SEQ = 0x15
- TCP_QUICKACK = 0xc
- TCP_REPAIR = 0x13
- TCP_REPAIR_OFF = 0x0
- TCP_REPAIR_OFF_NO_WP = -0x1
- TCP_REPAIR_ON = 0x1
- TCP_REPAIR_OPTIONS = 0x16
- TCP_REPAIR_QUEUE = 0x14
- TCP_REPAIR_WINDOW = 0x1d
- TCP_SAVED_SYN = 0x1c
- TCP_SAVE_SYN = 0x1b
- TCP_SYNCNT = 0x7
- TCP_S_DATA_IN = 0x4
- TCP_S_DATA_OUT = 0x8
- TCP_THIN_DUPACK = 0x11
- TCP_THIN_LINEAR_TIMEOUTS = 0x10
- TCP_TIMESTAMP = 0x18
- TCP_TX_DELAY = 0x25
- TCP_ULP = 0x1f
- TCP_USER_TIMEOUT = 0x12
- TCP_WINDOW_CLAMP = 0xa
- TCP_ZEROCOPY_RECEIVE = 0x23
- TCSAFLUSH = 0x2
- TCSBRK = 0x20005405
- TCSBRKP = 0x5425
- TCSETA = 0x80125402
- TCSETAF = 0x80125404
- TCSETAW = 0x80125403
- TCSETS = 0x80245409
- TCSETS2 = 0x802c540d
- TCSETSF = 0x8024540b
- TCSETSF2 = 0x802c540f
- TCSETSW = 0x8024540a
- TCSETSW2 = 0x802c540e
- TCXONC = 0x20005406
- TIMER_ABSTIME = 0x1
- TIOCCBRK = 0x2000747a
- TIOCCONS = 0x20007424
- TIOCEXCL = 0x2000740d
- TIOCGDEV = 0x40045432
- TIOCGETD = 0x40047400
- TIOCGEXCL = 0x40045440
- TIOCGICOUNT = 0x545d
- TIOCGISO7816 = 0x40285443
- TIOCGLCKTRMIOS = 0x5456
- TIOCGPGRP = 0x40047483
- TIOCGPKT = 0x40045438
- TIOCGPTLCK = 0x40045439
- TIOCGPTN = 0x40047486
- TIOCGPTPEER = 0x20007489
- TIOCGRS485 = 0x40205441
- TIOCGSERIAL = 0x541e
- TIOCGSID = 0x40047485
- TIOCGSOFTCAR = 0x40047464
- TIOCGWINSZ = 0x40087468
- TIOCINQ = 0x4004667f
- TIOCLINUX = 0x541c
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGET = 0x4004746a
- TIOCMIWAIT = 0x545c
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCSBRK = 0x2000747b
- TIOCSCTTY = 0x20007484
- TIOCSERCONFIG = 0x5453
- TIOCSERGETLSR = 0x5459
- TIOCSERGETMULTI = 0x545a
- TIOCSERGSTRUCT = 0x5458
- TIOCSERGWILD = 0x5454
- TIOCSERSETMULTI = 0x545b
- TIOCSERSWILD = 0x5455
- TIOCSETD = 0x80047401
- TIOCSIG = 0x80047488
- TIOCSISO7816 = 0xc0285444
- TIOCSLCKTRMIOS = 0x5457
- TIOCSPGRP = 0x80047482
- TIOCSPTLCK = 0x80047487
- TIOCSRS485 = 0xc0205442
- TIOCSSERIAL = 0x541f
- TIOCSSOFTCAR = 0x80047465
- TIOCSTART = 0x2000746e
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCVHANGUP = 0x20005437
- TIPC_ADDR_ID = 0x3
- TIPC_ADDR_MCAST = 0x1
- TIPC_ADDR_NAME = 0x2
- TIPC_ADDR_NAMESEQ = 0x1
- TIPC_AEAD_ALG_NAME = 0x20
- TIPC_AEAD_KEYLEN_MAX = 0x24
- TIPC_AEAD_KEYLEN_MIN = 0x14
- TIPC_AEAD_KEY_SIZE_MAX = 0x48
- TIPC_CFG_SRV = 0x0
- TIPC_CLUSTER_BITS = 0xc
- TIPC_CLUSTER_MASK = 0xfff000
- TIPC_CLUSTER_OFFSET = 0xc
- TIPC_CLUSTER_SIZE = 0xfff
- TIPC_CONN_SHUTDOWN = 0x5
- TIPC_CONN_TIMEOUT = 0x82
- TIPC_CRITICAL_IMPORTANCE = 0x3
- TIPC_DESTNAME = 0x3
- TIPC_DEST_DROPPABLE = 0x81
- TIPC_ERRINFO = 0x1
- TIPC_ERR_NO_NAME = 0x1
- TIPC_ERR_NO_NODE = 0x3
- TIPC_ERR_NO_PORT = 0x2
- TIPC_ERR_OVERLOAD = 0x4
- TIPC_GROUP_JOIN = 0x87
- TIPC_GROUP_LEAVE = 0x88
- TIPC_GROUP_LOOPBACK = 0x1
- TIPC_GROUP_MEMBER_EVTS = 0x2
- TIPC_HIGH_IMPORTANCE = 0x2
- TIPC_IMPORTANCE = 0x7f
- TIPC_LINK_STATE = 0x2
- TIPC_LOW_IMPORTANCE = 0x0
- TIPC_MAX_BEARER_NAME = 0x20
- TIPC_MAX_IF_NAME = 0x10
- TIPC_MAX_LINK_NAME = 0x44
- TIPC_MAX_MEDIA_NAME = 0x10
- TIPC_MAX_USER_MSG_SIZE = 0x101d0
- TIPC_MCAST_BROADCAST = 0x85
- TIPC_MCAST_REPLICAST = 0x86
- TIPC_MEDIUM_IMPORTANCE = 0x1
- TIPC_NODEID_LEN = 0x10
- TIPC_NODELAY = 0x8a
- TIPC_NODE_BITS = 0xc
- TIPC_NODE_MASK = 0xfff
- TIPC_NODE_OFFSET = 0x0
- TIPC_NODE_RECVQ_DEPTH = 0x83
- TIPC_NODE_SIZE = 0xfff
- TIPC_NODE_STATE = 0x0
- TIPC_OK = 0x0
- TIPC_PUBLISHED = 0x1
- TIPC_RESERVED_TYPES = 0x40
- TIPC_RETDATA = 0x2
- TIPC_SERVICE_ADDR = 0x2
- TIPC_SERVICE_RANGE = 0x1
- TIPC_SOCKET_ADDR = 0x3
- TIPC_SOCK_RECVQ_DEPTH = 0x84
- TIPC_SOCK_RECVQ_USED = 0x89
- TIPC_SRC_DROPPABLE = 0x80
- TIPC_SUBSCR_TIMEOUT = 0x3
- TIPC_SUB_CANCEL = 0x4
- TIPC_SUB_PORTS = 0x1
- TIPC_SUB_SERVICE = 0x2
- TIPC_TOP_SRV = 0x1
- TIPC_WAIT_FOREVER = 0xffffffff
- TIPC_WITHDRAWN = 0x2
- TIPC_ZONE_BITS = 0x8
- TIPC_ZONE_CLUSTER_MASK = 0xfffff000
- TIPC_ZONE_MASK = 0xff000000
- TIPC_ZONE_OFFSET = 0x18
- TIPC_ZONE_SCOPE = 0x1
- TIPC_ZONE_SIZE = 0xff
- TMPFS_MAGIC = 0x1021994
- TOSTOP = 0x100
- TPACKET_ALIGNMENT = 0x10
- TPACKET_HDRLEN = 0x34
- TP_STATUS_AVAILABLE = 0x0
- TP_STATUS_BLK_TMO = 0x20
- TP_STATUS_COPY = 0x2
- TP_STATUS_CSUMNOTREADY = 0x8
- TP_STATUS_CSUM_VALID = 0x80
- TP_STATUS_KERNEL = 0x0
- TP_STATUS_LOSING = 0x4
- TP_STATUS_SENDING = 0x2
- TP_STATUS_SEND_REQUEST = 0x1
- TP_STATUS_TS_RAW_HARDWARE = 0x80000000
- TP_STATUS_TS_SOFTWARE = 0x20000000
- TP_STATUS_TS_SYS_HARDWARE = 0x40000000
- TP_STATUS_USER = 0x1
- TP_STATUS_VLAN_TPID_VALID = 0x40
- TP_STATUS_VLAN_VALID = 0x10
- TP_STATUS_WRONG_FORMAT = 0x4
- TRACEFS_MAGIC = 0x74726163
- TS_COMM_LEN = 0x20
- TUNATTACHFILTER = 0x801054d5
- TUNDETACHFILTER = 0x801054d6
- TUNGETDEVNETNS = 0x200054e3
- TUNGETFEATURES = 0x400454cf
- TUNGETFILTER = 0x401054db
- TUNGETIFF = 0x400454d2
- TUNGETSNDBUF = 0x400454d3
- TUNGETVNETBE = 0x400454df
- TUNGETVNETHDRSZ = 0x400454d7
- TUNGETVNETLE = 0x400454dd
- TUNSETCARRIER = 0x800454e2
- TUNSETDEBUG = 0x800454c9
- TUNSETFILTEREBPF = 0x400454e1
- TUNSETGROUP = 0x800454ce
- TUNSETIFF = 0x800454ca
- TUNSETIFINDEX = 0x800454da
- TUNSETLINK = 0x800454cd
- TUNSETNOCSUM = 0x800454c8
- TUNSETOFFLOAD = 0x800454d0
- TUNSETOWNER = 0x800454cc
- TUNSETPERSIST = 0x800454cb
- TUNSETQUEUE = 0x800454d9
- TUNSETSNDBUF = 0x800454d4
- TUNSETSTEERINGEBPF = 0x400454e0
- TUNSETTXFILTER = 0x800454d1
- TUNSETVNETBE = 0x800454de
- TUNSETVNETHDRSZ = 0x800454d8
- TUNSETVNETLE = 0x800454dc
- UBI_IOCATT = 0x80186f40
- UBI_IOCDET = 0x80046f41
- UBI_IOCEBCH = 0x80044f02
- UBI_IOCEBER = 0x80044f01
- UBI_IOCEBISMAP = 0x40044f05
- UBI_IOCEBMAP = 0x80084f03
- UBI_IOCEBUNMAP = 0x80044f04
- UBI_IOCMKVOL = 0x80986f00
- UBI_IOCRMVOL = 0x80046f01
- UBI_IOCRNVOL = 0x91106f03
- UBI_IOCRPEB = 0x80046f04
- UBI_IOCRSVOL = 0x800c6f02
- UBI_IOCSETVOLPROP = 0x80104f06
- UBI_IOCSPEB = 0x80046f05
- UBI_IOCVOLCRBLK = 0x80804f07
- UBI_IOCVOLRMBLK = 0x20004f08
- UBI_IOCVOLUP = 0x80084f00
- UDF_SUPER_MAGIC = 0x15013346
- UMOUNT_NOFOLLOW = 0x8
- USBDEVICE_SUPER_MAGIC = 0x9fa2
- UTIME_NOW = 0x3fffffff
- UTIME_OMIT = 0x3ffffffe
- V9FS_MAGIC = 0x1021997
- VDISCARD = 0xd
- VEOF = 0x4
- VEOL = 0xb
- VEOL2 = 0x10
- VERASE = 0x2
- VINTR = 0x0
- VKILL = 0x3
- VLNEXT = 0xf
- VMADDR_CID_ANY = 0xffffffff
- VMADDR_CID_HOST = 0x2
- VMADDR_CID_HYPERVISOR = 0x0
- VMADDR_CID_RESERVED = 0x1
- VMADDR_PORT_ANY = 0xffffffff
- VMIN = 0x6
- VM_SOCKETS_INVALID_VERSION = 0xffffffff
- VQUIT = 0x1
- VREPRINT = 0xc
- VSTART = 0x8
- VSTOP = 0x9
- VSUSP = 0xa
- VSWTC = 0x7
- VT0 = 0x0
- VT1 = 0x4000
- VTDLY = 0x4000
- VTIME = 0x5
- VWERASE = 0xe
- WALL = 0x40000000
- WCLONE = 0x80000000
- WCONTINUED = 0x8
- WDIOC_GETBOOTSTATUS = 0x40045702
- WDIOC_GETPRETIMEOUT = 0x40045709
- WDIOC_GETSTATUS = 0x40045701
- WDIOC_GETSUPPORT = 0x40285700
- WDIOC_GETTEMP = 0x40045703
- WDIOC_GETTIMELEFT = 0x4004570a
- WDIOC_GETTIMEOUT = 0x40045707
- WDIOC_KEEPALIVE = 0x40045705
- WDIOC_SETOPTIONS = 0x40045704
- WDIOC_SETPRETIMEOUT = 0xc0045708
- WDIOC_SETTIMEOUT = 0xc0045706
- WEXITED = 0x4
- WIN_ACKMEDIACHANGE = 0xdb
- WIN_CHECKPOWERMODE1 = 0xe5
- WIN_CHECKPOWERMODE2 = 0x98
- WIN_DEVICE_RESET = 0x8
- WIN_DIAGNOSE = 0x90
- WIN_DOORLOCK = 0xde
- WIN_DOORUNLOCK = 0xdf
- WIN_DOWNLOAD_MICROCODE = 0x92
- WIN_FLUSH_CACHE = 0xe7
- WIN_FLUSH_CACHE_EXT = 0xea
- WIN_FORMAT = 0x50
- WIN_GETMEDIASTATUS = 0xda
- WIN_IDENTIFY = 0xec
- WIN_IDENTIFY_DMA = 0xee
- WIN_IDLEIMMEDIATE = 0xe1
- WIN_INIT = 0x60
- WIN_MEDIAEJECT = 0xed
- WIN_MULTREAD = 0xc4
- WIN_MULTREAD_EXT = 0x29
- WIN_MULTWRITE = 0xc5
- WIN_MULTWRITE_EXT = 0x39
- WIN_NOP = 0x0
- WIN_PACKETCMD = 0xa0
- WIN_PIDENTIFY = 0xa1
- WIN_POSTBOOT = 0xdc
- WIN_PREBOOT = 0xdd
- WIN_QUEUED_SERVICE = 0xa2
- WIN_READ = 0x20
- WIN_READDMA = 0xc8
- WIN_READDMA_EXT = 0x25
- WIN_READDMA_ONCE = 0xc9
- WIN_READDMA_QUEUED = 0xc7
- WIN_READDMA_QUEUED_EXT = 0x26
- WIN_READ_BUFFER = 0xe4
- WIN_READ_EXT = 0x24
- WIN_READ_LONG = 0x22
- WIN_READ_LONG_ONCE = 0x23
- WIN_READ_NATIVE_MAX = 0xf8
- WIN_READ_NATIVE_MAX_EXT = 0x27
- WIN_READ_ONCE = 0x21
- WIN_RECAL = 0x10
- WIN_RESTORE = 0x10
- WIN_SECURITY_DISABLE = 0xf6
- WIN_SECURITY_ERASE_PREPARE = 0xf3
- WIN_SECURITY_ERASE_UNIT = 0xf4
- WIN_SECURITY_FREEZE_LOCK = 0xf5
- WIN_SECURITY_SET_PASS = 0xf1
- WIN_SECURITY_UNLOCK = 0xf2
- WIN_SEEK = 0x70
- WIN_SETFEATURES = 0xef
- WIN_SETIDLE1 = 0xe3
- WIN_SETIDLE2 = 0x97
- WIN_SETMULT = 0xc6
- WIN_SET_MAX = 0xf9
- WIN_SET_MAX_EXT = 0x37
- WIN_SLEEPNOW1 = 0xe6
- WIN_SLEEPNOW2 = 0x99
- WIN_SMART = 0xb0
- WIN_SPECIFY = 0x91
- WIN_SRST = 0x8
- WIN_STANDBY = 0xe2
- WIN_STANDBY2 = 0x96
- WIN_STANDBYNOW1 = 0xe0
- WIN_STANDBYNOW2 = 0x94
- WIN_VERIFY = 0x40
- WIN_VERIFY_EXT = 0x42
- WIN_VERIFY_ONCE = 0x41
- WIN_WRITE = 0x30
- WIN_WRITEDMA = 0xca
- WIN_WRITEDMA_EXT = 0x35
- WIN_WRITEDMA_ONCE = 0xcb
- WIN_WRITEDMA_QUEUED = 0xcc
- WIN_WRITEDMA_QUEUED_EXT = 0x36
- WIN_WRITE_BUFFER = 0xe8
- WIN_WRITE_EXT = 0x34
- WIN_WRITE_LONG = 0x32
- WIN_WRITE_LONG_ONCE = 0x33
- WIN_WRITE_ONCE = 0x31
- WIN_WRITE_SAME = 0xe9
- WIN_WRITE_VERIFY = 0x3c
- WNOHANG = 0x1
- WNOTHREAD = 0x20000000
- WNOWAIT = 0x1000000
- WORDSIZE = 0x40
- WSTOPPED = 0x2
- WUNTRACED = 0x2
- XATTR_CREATE = 0x1
- XATTR_REPLACE = 0x2
- XCASE = 0x4
- XDP_COPY = 0x2
- XDP_FLAGS_DRV_MODE = 0x4
- XDP_FLAGS_HW_MODE = 0x8
- XDP_FLAGS_MASK = 0xf
- XDP_FLAGS_MODES = 0xe
- XDP_FLAGS_SKB_MODE = 0x2
- XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1
- XDP_MMAP_OFFSETS = 0x1
- XDP_OPTIONS = 0x8
- XDP_OPTIONS_ZEROCOPY = 0x1
- XDP_PACKET_HEADROOM = 0x100
- XDP_PGOFF_RX_RING = 0x0
- XDP_PGOFF_TX_RING = 0x80000000
- XDP_RING_NEED_WAKEUP = 0x1
- XDP_RX_RING = 0x2
- XDP_SHARED_UMEM = 0x1
- XDP_STATISTICS = 0x7
- XDP_TX_RING = 0x3
- XDP_UMEM_COMPLETION_RING = 0x6
- XDP_UMEM_FILL_RING = 0x5
- XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000
- XDP_UMEM_PGOFF_FILL_RING = 0x100000000
- XDP_UMEM_REG = 0x4
- XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1
- XDP_USE_NEED_WAKEUP = 0x8
- XDP_ZEROCOPY = 0x4
- XENFS_SUPER_MAGIC = 0xabba1974
- XFS_SUPER_MAGIC = 0x58465342
- XTABS = 0x1800
- Z3FOLD_MAGIC = 0x33
- ZSMALLOC_MAGIC = 0x58295829
- __TIOCFLUSH = 0x80047410
+ ASI_LEON_DFLUSH = 0x11
+ ASI_LEON_IFLUSH = 0x10
+ ASI_LEON_MMUFLUSH = 0x18
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x40081270
+ BLKBSZSET = 0x80081271
+ BLKFLSBUF = 0x20001261
+ BLKFRAGET = 0x20001265
+ BLKFRASET = 0x20001264
+ BLKGETSIZE = 0x20001260
+ BLKGETSIZE64 = 0x40081272
+ BLKPBSZGET = 0x2000127b
+ BLKRAGET = 0x20001263
+ BLKRASET = 0x20001262
+ BLKROGET = 0x2000125e
+ BLKROSET = 0x2000125d
+ BLKRRPART = 0x2000125f
+ BLKSECTGET = 0x20001267
+ BLKSECTSET = 0x20001266
+ BLKSSZGET = 0x20001268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x400000
+ EFD_NONBLOCK = 0x4000
+ EMT_TAGOVF = 0x1
+ EPOLL_CLOEXEC = 0x400000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x80049409
+ FICLONERANGE = 0x8020940d
+ FLUSHO = 0x1000
+ FS_IOC_ENABLE_VERITY = 0x80806685
+ FS_IOC_GETFLAGS = 0x40086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614
+ FS_IOC_SETFLAGS = 0x80086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613
+ F_GETLK = 0x7
+ F_GETLK64 = 0x7
+ F_GETOWN = 0x5
+ F_RDLCK = 0x1
+ F_SETLK = 0x8
+ F_SETLK64 = 0x8
+ F_SETLKW = 0x9
+ F_SETLKW64 = 0x9
+ F_SETOWN = 0x6
+ F_UNLCK = 0x3
+ F_WRLCK = 0x2
+ HIDIOCGRAWINFO = 0x40084803
+ HIDIOCGRDESC = 0x50044802
+ HIDIOCGRDESCSIZE = 0x40044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x400000
+ IN_NONBLOCK = 0x4000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x200
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x100
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x40
+ MAP_POPULATE = 0x8000
+ MAP_RENAME = 0x20
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x2000
+ MCL_FUTURE = 0x4000
+ MCL_ONFAULT = 0x8000
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0x2000b703
+ NS_GET_OWNER_UID = 0x2000b704
+ NS_GET_PARENT = 0x2000b702
+ NS_GET_USERNS = 0x2000b701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ O_APPEND = 0x8
+ O_ASYNC = 0x40
+ O_CLOEXEC = 0x400000
+ O_CREAT = 0x200
+ O_DIRECT = 0x100000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x2000
+ O_EXCL = 0x800
+ O_FSYNC = 0x802000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x4004
+ O_NOATIME = 0x200000
+ O_NOCTTY = 0x8000
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x4000
+ O_PATH = 0x1000000
+ O_RSYNC = 0x802000
+ O_SYNC = 0x802000
+ O_TMPFILE = 0x2010000
+ O_TRUNC = 0x400
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x20002401
+ PERF_EVENT_IOC_ENABLE = 0x20002400
+ PERF_EVENT_IOC_ID = 0x40082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409
+ PERF_EVENT_IOC_PERIOD = 0x80082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x20002402
+ PERF_EVENT_IOC_RESET = 0x20002403
+ PERF_EVENT_IOC_SET_BPF = 0x80042408
+ PERF_EVENT_IOC_SET_FILTER = 0x80082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x20002405
+ PPPIOCATTACH = 0x8004743d
+ PPPIOCATTCHAN = 0x80047438
+ PPPIOCBRIDGECHAN = 0x80047435
+ PPPIOCCONNECT = 0x8004743a
+ PPPIOCDETACH = 0x8004743c
+ PPPIOCDISCONN = 0x20007439
+ PPPIOCGASYNCMAP = 0x40047458
+ PPPIOCGCHAN = 0x40047437
+ PPPIOCGDEBUG = 0x40047441
+ PPPIOCGFLAGS = 0x4004745a
+ PPPIOCGIDLE = 0x4010743f
+ PPPIOCGIDLE32 = 0x4008743f
+ PPPIOCGIDLE64 = 0x4010743f
+ PPPIOCGL2TPSTATS = 0x40487436
+ PPPIOCGMRU = 0x40047453
+ PPPIOCGRASYNCMAP = 0x40047455
+ PPPIOCGUNIT = 0x40047456
+ PPPIOCGXASYNCMAP = 0x40207450
+ PPPIOCSACTIVE = 0x80107446
+ PPPIOCSASYNCMAP = 0x80047457
+ PPPIOCSCOMPRESS = 0x8010744d
+ PPPIOCSDEBUG = 0x80047440
+ PPPIOCSFLAGS = 0x80047459
+ PPPIOCSMAXCID = 0x80047451
+ PPPIOCSMRRU = 0x8004743b
+ PPPIOCSMRU = 0x80047452
+ PPPIOCSNPMODE = 0x8008744b
+ PPPIOCSPASS = 0x80107447
+ PPPIOCSRASYNCMAP = 0x80047454
+ PPPIOCSXASYNCMAP = 0x8020744f
+ PPPIOCUNBRIDGECHAN = 0x20007434
+ PPPIOCXFERUNIT = 0x2000744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_GETFPAREGS = 0x14
+ PTRACE_GETFPREGS = 0xe
+ PTRACE_GETFPREGS64 = 0x19
+ PTRACE_GETREGS64 = 0x16
+ PTRACE_READDATA = 0x10
+ PTRACE_READTEXT = 0x12
+ PTRACE_SETFPAREGS = 0x15
+ PTRACE_SETFPREGS = 0xf
+ PTRACE_SETFPREGS64 = 0x1a
+ PTRACE_SETREGS64 = 0x17
+ PTRACE_SPARC_DETACH = 0xb
+ PTRACE_WRITEDATA = 0x11
+ PTRACE_WRITETEXT = 0x13
+ PT_FP = 0x48
+ PT_G0 = 0x10
+ PT_G1 = 0x14
+ PT_G2 = 0x18
+ PT_G3 = 0x1c
+ PT_G4 = 0x20
+ PT_G5 = 0x24
+ PT_G6 = 0x28
+ PT_G7 = 0x2c
+ PT_I0 = 0x30
+ PT_I1 = 0x34
+ PT_I2 = 0x38
+ PT_I3 = 0x3c
+ PT_I4 = 0x40
+ PT_I5 = 0x44
+ PT_I6 = 0x48
+ PT_I7 = 0x4c
+ PT_NPC = 0x8
+ PT_PC = 0x4
+ PT_PSR = 0x0
+ PT_REGS_MAGIC = 0x57ac6c00
+ PT_TNPC = 0x90
+ PT_TPC = 0x88
+ PT_TSTATE = 0x80
+ PT_V9_FP = 0x70
+ PT_V9_G0 = 0x0
+ PT_V9_G1 = 0x8
+ PT_V9_G2 = 0x10
+ PT_V9_G3 = 0x18
+ PT_V9_G4 = 0x20
+ PT_V9_G5 = 0x28
+ PT_V9_G6 = 0x30
+ PT_V9_G7 = 0x38
+ PT_V9_I0 = 0x40
+ PT_V9_I1 = 0x48
+ PT_V9_I2 = 0x50
+ PT_V9_I3 = 0x58
+ PT_V9_I4 = 0x60
+ PT_V9_I5 = 0x68
+ PT_V9_I6 = 0x70
+ PT_V9_I7 = 0x78
+ PT_V9_MAGIC = 0x9c
+ PT_V9_TNPC = 0x90
+ PT_V9_TPC = 0x88
+ PT_V9_TSTATE = 0x80
+ PT_V9_Y = 0x98
+ PT_WIM = 0x10
+ PT_Y = 0xc
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x6
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x80085203
+ RNDADDTOENTCNT = 0x80045201
+ RNDCLEARPOOL = 0x20005206
+ RNDGETENTCNT = 0x40045200
+ RNDGETPOOL = 0x40085202
+ RNDRESEEDCRNG = 0x20005207
+ RNDZAPENTCNT = 0x20005204
+ RTC_AIE_OFF = 0x20007002
+ RTC_AIE_ON = 0x20007001
+ RTC_ALM_READ = 0x40247008
+ RTC_ALM_SET = 0x80247007
+ RTC_EPOCH_READ = 0x4008700d
+ RTC_EPOCH_SET = 0x8008700e
+ RTC_IRQP_READ = 0x4008700b
+ RTC_IRQP_SET = 0x8008700c
+ RTC_PIE_OFF = 0x20007006
+ RTC_PIE_ON = 0x20007005
+ RTC_PLL_GET = 0x40207011
+ RTC_PLL_SET = 0x80207012
+ RTC_RD_TIME = 0x40247009
+ RTC_SET_TIME = 0x8024700a
+ RTC_UIE_OFF = 0x20007004
+ RTC_UIE_ON = 0x20007003
+ RTC_VL_CLR = 0x20007014
+ RTC_VL_READ = 0x40047013
+ RTC_WIE_OFF = 0x20007010
+ RTC_WIE_ON = 0x2000700f
+ RTC_WKALM_RD = 0x40287010
+ RTC_WKALM_SET = 0x8028700f
+ SCM_TIMESTAMPING = 0x23
+ SCM_TIMESTAMPING_OPT_STATS = 0x38
+ SCM_TIMESTAMPING_PKTINFO = 0x3c
+ SCM_TIMESTAMPNS = 0x21
+ SCM_TXTIME = 0x3f
+ SCM_WIFI_STATUS = 0x25
+ SFD_CLOEXEC = 0x400000
+ SFD_NONBLOCK = 0x4000
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x40108907
+ SIOCGSTAMP_NEW = 0x40108906
+ SIOCINQ = 0x4004667f
+ SIOCOUTQ = 0x40047473
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x400000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x4000
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0xffff
+ SO_ACCEPTCONN = 0x8000
+ SO_ATTACH_BPF = 0x34
+ SO_ATTACH_REUSEPORT_CBPF = 0x35
+ SO_ATTACH_REUSEPORT_EBPF = 0x36
+ SO_BINDTODEVICE = 0xd
+ SO_BINDTOIFINDEX = 0x41
+ SO_BPF_EXTENSIONS = 0x32
+ SO_BROADCAST = 0x20
+ SO_BSDCOMPAT = 0x400
+ SO_BUSY_POLL = 0x30
+ SO_BUSY_POLL_BUDGET = 0x49
+ SO_CNX_ADVICE = 0x37
+ SO_COOKIE = 0x3b
+ SO_DETACH_REUSEPORT_BPF = 0x47
+ SO_DOMAIN = 0x1029
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_INCOMING_CPU = 0x33
+ SO_INCOMING_NAPI_ID = 0x3a
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_LOCK_FILTER = 0x28
+ SO_MARK = 0x22
+ SO_MAX_PACING_RATE = 0x31
+ SO_MEMINFO = 0x39
+ SO_NOFCS = 0x27
+ SO_OOBINLINE = 0x100
+ SO_PASSCRED = 0x2
+ SO_PASSSEC = 0x1f
+ SO_PEEK_OFF = 0x26
+ SO_PEERCRED = 0x40
+ SO_PEERGROUPS = 0x3d
+ SO_PEERSEC = 0x1e
+ SO_PREFER_BUSY_POLL = 0x48
+ SO_PROTOCOL = 0x1028
+ SO_RCVBUF = 0x1002
+ SO_RCVBUFFORCE = 0x100b
+ SO_RCVLOWAT = 0x800
+ SO_RCVTIMEO = 0x2000
+ SO_RCVTIMEO_NEW = 0x44
+ SO_RCVTIMEO_OLD = 0x2000
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RXQ_OVFL = 0x24
+ SO_SECURITY_AUTHENTICATION = 0x5001
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x5004
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x5002
+ SO_SELECT_ERR_QUEUE = 0x29
+ SO_SNDBUF = 0x1001
+ SO_SNDBUFFORCE = 0x100a
+ SO_SNDLOWAT = 0x1000
+ SO_SNDTIMEO = 0x4000
+ SO_SNDTIMEO_NEW = 0x45
+ SO_SNDTIMEO_OLD = 0x4000
+ SO_TIMESTAMPING = 0x23
+ SO_TIMESTAMPING_NEW = 0x43
+ SO_TIMESTAMPING_OLD = 0x23
+ SO_TIMESTAMPNS = 0x21
+ SO_TIMESTAMPNS_NEW = 0x42
+ SO_TIMESTAMPNS_OLD = 0x21
+ SO_TIMESTAMP_NEW = 0x46
+ SO_TXTIME = 0x3f
+ SO_TYPE = 0x1008
+ SO_WIFI_STATUS = 0x25
+ SO_ZEROCOPY = 0x3e
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x20005407
+ TCGETA = 0x40125401
+ TCGETS = 0x40245408
+ TCGETS2 = 0x402c540c
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x20005405
+ TCSBRKP = 0x5425
+ TCSETA = 0x80125402
+ TCSETAF = 0x80125404
+ TCSETAW = 0x80125403
+ TCSETS = 0x80245409
+ TCSETS2 = 0x802c540d
+ TCSETSF = 0x8024540b
+ TCSETSF2 = 0x802c540f
+ TCSETSW = 0x8024540a
+ TCSETSW2 = 0x802c540e
+ TCXONC = 0x20005406
+ TFD_CLOEXEC = 0x400000
+ TFD_NONBLOCK = 0x4000
+ TIOCCBRK = 0x2000747a
+ TIOCCONS = 0x20007424
+ TIOCEXCL = 0x2000740d
+ TIOCGDEV = 0x40045432
+ TIOCGETD = 0x40047400
+ TIOCGEXCL = 0x40045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x40285443
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x40047483
+ TIOCGPKT = 0x40045438
+ TIOCGPTLCK = 0x40045439
+ TIOCGPTN = 0x40047486
+ TIOCGPTPEER = 0x20007489
+ TIOCGRS485 = 0x40205441
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x40047485
+ TIOCGSOFTCAR = 0x40047464
+ TIOCGWINSZ = 0x40087468
+ TIOCINQ = 0x4004667f
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x8004746b
+ TIOCMBIS = 0x8004746c
+ TIOCMGET = 0x4004746a
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x80047470
+ TIOCSBRK = 0x2000747b
+ TIOCSCTTY = 0x20007484
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSETD = 0x80047401
+ TIOCSIG = 0x80047488
+ TIOCSISO7816 = 0xc0285444
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x80047482
+ TIOCSPTLCK = 0x80047487
+ TIOCSRS485 = 0xc0205442
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x80047465
+ TIOCSTART = 0x2000746e
+ TIOCSTI = 0x80017472
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCVHANGUP = 0x20005437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x801054d5
+ TUNDETACHFILTER = 0x801054d6
+ TUNGETDEVNETNS = 0x200054e3
+ TUNGETFEATURES = 0x400454cf
+ TUNGETFILTER = 0x401054db
+ TUNGETIFF = 0x400454d2
+ TUNGETSNDBUF = 0x400454d3
+ TUNGETVNETBE = 0x400454df
+ TUNGETVNETHDRSZ = 0x400454d7
+ TUNGETVNETLE = 0x400454dd
+ TUNSETCARRIER = 0x800454e2
+ TUNSETDEBUG = 0x800454c9
+ TUNSETFILTEREBPF = 0x400454e1
+ TUNSETGROUP = 0x800454ce
+ TUNSETIFF = 0x800454ca
+ TUNSETIFINDEX = 0x800454da
+ TUNSETLINK = 0x800454cd
+ TUNSETNOCSUM = 0x800454c8
+ TUNSETOFFLOAD = 0x800454d0
+ TUNSETOWNER = 0x800454cc
+ TUNSETPERSIST = 0x800454cb
+ TUNSETQUEUE = 0x800454d9
+ TUNSETSNDBUF = 0x800454d4
+ TUNSETSTEERINGEBPF = 0x400454e0
+ TUNSETTXFILTER = 0x800454d1
+ TUNSETVNETBE = 0x800454de
+ TUNSETVNETHDRSZ = 0x800454d8
+ TUNSETVNETLE = 0x800454dc
+ UBI_IOCATT = 0x80186f40
+ UBI_IOCDET = 0x80046f41
+ UBI_IOCEBCH = 0x80044f02
+ UBI_IOCEBER = 0x80044f01
+ UBI_IOCEBISMAP = 0x40044f05
+ UBI_IOCEBMAP = 0x80084f03
+ UBI_IOCEBUNMAP = 0x80044f04
+ UBI_IOCMKVOL = 0x80986f00
+ UBI_IOCRMVOL = 0x80046f01
+ UBI_IOCRNVOL = 0x91106f03
+ UBI_IOCRPEB = 0x80046f04
+ UBI_IOCRSVOL = 0x800c6f02
+ UBI_IOCSETVOLPROP = 0x80104f06
+ UBI_IOCSPEB = 0x80046f05
+ UBI_IOCVOLCRBLK = 0x80804f07
+ UBI_IOCVOLRMBLK = 0x20004f08
+ UBI_IOCVOLUP = 0x80084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x40045702
+ WDIOC_GETPRETIMEOUT = 0x40045709
+ WDIOC_GETSTATUS = 0x40045701
+ WDIOC_GETSUPPORT = 0x40285700
+ WDIOC_GETTEMP = 0x40045703
+ WDIOC_GETTIMELEFT = 0x4004570a
+ WDIOC_GETTIMEOUT = 0x40045707
+ WDIOC_KEEPALIVE = 0x40045705
+ WDIOC_SETOPTIONS = 0x40045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x40804804
+ _HIDIOCGRAWPHYS = 0x40404805
+ _HIDIOCGRAWUNIQ = 0x40404808
+ __TIOCFLUSH = 0x80047410
)
// Errors
const (
- E2BIG = syscall.Errno(0x7)
- EACCES = syscall.Errno(0xd)
EADDRINUSE = syscall.Errno(0x30)
EADDRNOTAVAIL = syscall.Errno(0x31)
EADV = syscall.Errno(0x53)
EAFNOSUPPORT = syscall.Errno(0x2f)
- EAGAIN = syscall.Errno(0xb)
EALREADY = syscall.Errno(0x25)
EBADE = syscall.Errno(0x66)
- EBADF = syscall.Errno(0x9)
EBADFD = syscall.Errno(0x5d)
EBADMSG = syscall.Errno(0x4c)
EBADR = syscall.Errno(0x67)
EBADRQC = syscall.Errno(0x6a)
EBADSLT = syscall.Errno(0x6b)
EBFONT = syscall.Errno(0x6d)
- EBUSY = syscall.Errno(0x10)
ECANCELED = syscall.Errno(0x7f)
- ECHILD = syscall.Errno(0xa)
ECHRNG = syscall.Errno(0x5e)
ECOMM = syscall.Errno(0x55)
ECONNABORTED = syscall.Errno(0x35)
@@ -2927,23 +568,15 @@ const (
EDEADLK = syscall.Errno(0x4e)
EDEADLOCK = syscall.Errno(0x6c)
EDESTADDRREQ = syscall.Errno(0x27)
- EDOM = syscall.Errno(0x21)
EDOTDOT = syscall.Errno(0x58)
EDQUOT = syscall.Errno(0x45)
- EEXIST = syscall.Errno(0x11)
- EFAULT = syscall.Errno(0xe)
- EFBIG = syscall.Errno(0x1b)
EHOSTDOWN = syscall.Errno(0x40)
EHOSTUNREACH = syscall.Errno(0x41)
EHWPOISON = syscall.Errno(0x87)
EIDRM = syscall.Errno(0x4d)
EILSEQ = syscall.Errno(0x7a)
EINPROGRESS = syscall.Errno(0x24)
- EINTR = syscall.Errno(0x4)
- EINVAL = syscall.Errno(0x16)
- EIO = syscall.Errno(0x5)
EISCONN = syscall.Errno(0x38)
- EISDIR = syscall.Errno(0x15)
EISNAM = syscall.Errno(0x78)
EKEYEXPIRED = syscall.Errno(0x81)
EKEYREJECTED = syscall.Errno(0x83)
@@ -2960,8 +593,6 @@ const (
ELNRNG = syscall.Errno(0x62)
ELOOP = syscall.Errno(0x3e)
EMEDIUMTYPE = syscall.Errno(0x7e)
- EMFILE = syscall.Errno(0x18)
- EMLINK = syscall.Errno(0x1f)
EMSGSIZE = syscall.Errno(0x28)
EMULTIHOP = syscall.Errno(0x57)
ENAMETOOLONG = syscall.Errno(0x3f)
@@ -2969,102 +600,70 @@ const (
ENETDOWN = syscall.Errno(0x32)
ENETRESET = syscall.Errno(0x34)
ENETUNREACH = syscall.Errno(0x33)
- ENFILE = syscall.Errno(0x17)
ENOANO = syscall.Errno(0x69)
ENOBUFS = syscall.Errno(0x37)
ENOCSI = syscall.Errno(0x64)
ENODATA = syscall.Errno(0x6f)
- ENODEV = syscall.Errno(0x13)
- ENOENT = syscall.Errno(0x2)
- ENOEXEC = syscall.Errno(0x8)
ENOKEY = syscall.Errno(0x80)
ENOLCK = syscall.Errno(0x4f)
ENOLINK = syscall.Errno(0x52)
ENOMEDIUM = syscall.Errno(0x7d)
- ENOMEM = syscall.Errno(0xc)
ENOMSG = syscall.Errno(0x4b)
ENONET = syscall.Errno(0x50)
ENOPKG = syscall.Errno(0x71)
ENOPROTOOPT = syscall.Errno(0x2a)
- ENOSPC = syscall.Errno(0x1c)
ENOSR = syscall.Errno(0x4a)
ENOSTR = syscall.Errno(0x48)
ENOSYS = syscall.Errno(0x5a)
- ENOTBLK = syscall.Errno(0xf)
ENOTCONN = syscall.Errno(0x39)
- ENOTDIR = syscall.Errno(0x14)
ENOTEMPTY = syscall.Errno(0x42)
ENOTNAM = syscall.Errno(0x76)
ENOTRECOVERABLE = syscall.Errno(0x85)
ENOTSOCK = syscall.Errno(0x26)
ENOTSUP = syscall.Errno(0x2d)
- ENOTTY = syscall.Errno(0x19)
ENOTUNIQ = syscall.Errno(0x73)
- ENXIO = syscall.Errno(0x6)
EOPNOTSUPP = syscall.Errno(0x2d)
EOVERFLOW = syscall.Errno(0x5c)
EOWNERDEAD = syscall.Errno(0x84)
- EPERM = syscall.Errno(0x1)
EPFNOSUPPORT = syscall.Errno(0x2e)
- EPIPE = syscall.Errno(0x20)
EPROCLIM = syscall.Errno(0x43)
EPROTO = syscall.Errno(0x56)
EPROTONOSUPPORT = syscall.Errno(0x2b)
EPROTOTYPE = syscall.Errno(0x29)
- ERANGE = syscall.Errno(0x22)
EREMCHG = syscall.Errno(0x59)
EREMOTE = syscall.Errno(0x47)
EREMOTEIO = syscall.Errno(0x79)
ERESTART = syscall.Errno(0x74)
ERFKILL = syscall.Errno(0x86)
- EROFS = syscall.Errno(0x1e)
ERREMOTE = syscall.Errno(0x51)
ESHUTDOWN = syscall.Errno(0x3a)
ESOCKTNOSUPPORT = syscall.Errno(0x2c)
- ESPIPE = syscall.Errno(0x1d)
- ESRCH = syscall.Errno(0x3)
ESRMNT = syscall.Errno(0x54)
ESTALE = syscall.Errno(0x46)
ESTRPIPE = syscall.Errno(0x5b)
ETIME = syscall.Errno(0x49)
ETIMEDOUT = syscall.Errno(0x3c)
ETOOMANYREFS = syscall.Errno(0x3b)
- ETXTBSY = syscall.Errno(0x1a)
EUCLEAN = syscall.Errno(0x75)
EUNATCH = syscall.Errno(0x63)
EUSERS = syscall.Errno(0x44)
- EWOULDBLOCK = syscall.Errno(0xb)
- EXDEV = syscall.Errno(0x12)
EXFULL = syscall.Errno(0x68)
)
// Signals
const (
- SIGABRT = syscall.Signal(0x6)
- SIGALRM = syscall.Signal(0xe)
SIGBUS = syscall.Signal(0xa)
SIGCHLD = syscall.Signal(0x14)
SIGCLD = syscall.Signal(0x14)
SIGCONT = syscall.Signal(0x13)
SIGEMT = syscall.Signal(0x7)
- SIGFPE = syscall.Signal(0x8)
- SIGHUP = syscall.Signal(0x1)
- SIGILL = syscall.Signal(0x4)
- SIGINT = syscall.Signal(0x2)
SIGIO = syscall.Signal(0x17)
- SIGIOT = syscall.Signal(0x6)
- SIGKILL = syscall.Signal(0x9)
SIGLOST = syscall.Signal(0x1d)
- SIGPIPE = syscall.Signal(0xd)
SIGPOLL = syscall.Signal(0x17)
SIGPROF = syscall.Signal(0x1b)
SIGPWR = syscall.Signal(0x1d)
- SIGQUIT = syscall.Signal(0x3)
- SIGSEGV = syscall.Signal(0xb)
SIGSTOP = syscall.Signal(0x11)
SIGSYS = syscall.Signal(0xc)
- SIGTERM = syscall.Signal(0xf)
- SIGTRAP = syscall.Signal(0x5)
SIGTSTP = syscall.Signal(0x12)
SIGTTIN = syscall.Signal(0x15)
SIGTTOU = syscall.Signal(0x16)
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
index 96b9b8a..72f7420 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m32
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && netbsd
// +build 386,netbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -158,6 +159,12 @@ const (
CLONE_SIGHAND = 0x800
CLONE_VFORK = 0x4000
CLONE_VM = 0x100
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
index ed522a8..8d4eb0c 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && netbsd
// +build amd64,netbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -158,6 +159,12 @@ const (
CLONE_SIGHAND = 0x800
CLONE_VFORK = 0x4000
CLONE_VM = 0x100
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
index c8d36fe..9eef974 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
@@ -1,6 +1,7 @@
// mkerrors.sh -marm
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && netbsd
// +build arm,netbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -150,6 +151,12 @@ const (
BRKINT = 0x2
CFLUSH = 0xf
CLOCAL = 0x8000
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
index f1c146a..3b62ba1 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && netbsd
// +build arm64,netbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -158,6 +159,12 @@ const (
CLONE_SIGHAND = 0x800
CLONE_VFORK = 0x4000
CLONE_VM = 0x100
+ CPUSTATES = 0x5
+ CP_IDLE = 0x4
+ CP_INTR = 0x3
+ CP_NICE = 0x1
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
index 5402bd5..593cc0f 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m32
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && openbsd
// +build 386,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -146,6 +147,13 @@ const (
BRKINT = 0x2
CFLUSH = 0xf
CLOCAL = 0x8000
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
index ffaf2d2..25cb609 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && openbsd
// +build amd64,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -153,6 +154,13 @@ const (
CLOCK_REALTIME = 0x0
CLOCK_THREAD_CPUTIME_ID = 0x4
CLOCK_UPTIME = 0x5
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
index 7aa796a..a4e4c22 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go
@@ -1,6 +1,7 @@
// mkerrors.sh
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && openbsd
// +build arm,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -146,6 +147,13 @@ const (
BRKINT = 0x2
CFLUSH = 0xf
CLOCAL = 0x8000
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go
index 1792d3f..90de7df 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && openbsd
// +build arm64,openbsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -156,6 +157,13 @@ const (
CLOCK_REALTIME = 0x0
CLOCK_THREAD_CPUTIME_ID = 0x4
CLOCK_UPTIME = 0x5
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
CREAD = 0x800
CRTSCTS = 0x10000
CS5 = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go
new file mode 100644
index 0000000..f1154ff
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go
@@ -0,0 +1,1863 @@
+// mkerrors.sh -m64
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build mips64 && openbsd
+// +build mips64,openbsd
+
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs -- -m64 _const.go
+
+package unix
+
+import "syscall"
+
+const (
+ AF_APPLETALK = 0x10
+ AF_BLUETOOTH = 0x20
+ AF_CCITT = 0xa
+ AF_CHAOS = 0x5
+ AF_CNT = 0x15
+ AF_COIP = 0x14
+ AF_DATAKIT = 0x9
+ AF_DECnet = 0xc
+ AF_DLI = 0xd
+ AF_E164 = 0x1a
+ AF_ECMA = 0x8
+ AF_ENCAP = 0x1c
+ AF_HYLINK = 0xf
+ AF_IMPLINK = 0x3
+ AF_INET = 0x2
+ AF_INET6 = 0x18
+ AF_IPX = 0x17
+ AF_ISDN = 0x1a
+ AF_ISO = 0x7
+ AF_KEY = 0x1e
+ AF_LAT = 0xe
+ AF_LINK = 0x12
+ AF_LOCAL = 0x1
+ AF_MAX = 0x24
+ AF_MPLS = 0x21
+ AF_NATM = 0x1b
+ AF_NS = 0x6
+ AF_OSI = 0x7
+ AF_PUP = 0x4
+ AF_ROUTE = 0x11
+ AF_SIP = 0x1d
+ AF_SNA = 0xb
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ ALTWERASE = 0x200
+ ARPHRD_ETHER = 0x1
+ ARPHRD_FRELAY = 0xf
+ ARPHRD_IEEE1394 = 0x18
+ ARPHRD_IEEE802 = 0x6
+ B0 = 0x0
+ B110 = 0x6e
+ B115200 = 0x1c200
+ B1200 = 0x4b0
+ B134 = 0x86
+ B14400 = 0x3840
+ B150 = 0x96
+ B1800 = 0x708
+ B19200 = 0x4b00
+ B200 = 0xc8
+ B230400 = 0x38400
+ B2400 = 0x960
+ B28800 = 0x7080
+ B300 = 0x12c
+ B38400 = 0x9600
+ B4800 = 0x12c0
+ B50 = 0x32
+ B57600 = 0xe100
+ B600 = 0x258
+ B7200 = 0x1c20
+ B75 = 0x4b
+ B76800 = 0x12c00
+ B9600 = 0x2580
+ BIOCFLUSH = 0x20004268
+ BIOCGBLEN = 0x40044266
+ BIOCGDIRFILT = 0x4004427c
+ BIOCGDLT = 0x4004426a
+ BIOCGDLTLIST = 0xc010427b
+ BIOCGETIF = 0x4020426b
+ BIOCGFILDROP = 0x40044278
+ BIOCGHDRCMPLT = 0x40044274
+ BIOCGRSIG = 0x40044273
+ BIOCGRTIMEOUT = 0x4010426e
+ BIOCGSTATS = 0x4008426f
+ BIOCIMMEDIATE = 0x80044270
+ BIOCLOCK = 0x20004276
+ BIOCPROMISC = 0x20004269
+ BIOCSBLEN = 0xc0044266
+ BIOCSDIRFILT = 0x8004427d
+ BIOCSDLT = 0x8004427a
+ BIOCSETF = 0x80104267
+ BIOCSETIF = 0x8020426c
+ BIOCSETWF = 0x80104277
+ BIOCSFILDROP = 0x80044279
+ BIOCSHDRCMPLT = 0x80044275
+ BIOCSRSIG = 0x80044272
+ BIOCSRTIMEOUT = 0x8010426d
+ BIOCVERSION = 0x40044271
+ BPF_A = 0x10
+ BPF_ABS = 0x20
+ BPF_ADD = 0x0
+ BPF_ALIGNMENT = 0x4
+ BPF_ALU = 0x4
+ BPF_AND = 0x50
+ BPF_B = 0x10
+ BPF_DIRECTION_IN = 0x1
+ BPF_DIRECTION_OUT = 0x2
+ BPF_DIV = 0x30
+ BPF_FILDROP_CAPTURE = 0x1
+ BPF_FILDROP_DROP = 0x2
+ BPF_FILDROP_PASS = 0x0
+ BPF_H = 0x8
+ BPF_IMM = 0x0
+ BPF_IND = 0x40
+ BPF_JA = 0x0
+ BPF_JEQ = 0x10
+ BPF_JGE = 0x30
+ BPF_JGT = 0x20
+ BPF_JMP = 0x5
+ BPF_JSET = 0x40
+ BPF_K = 0x0
+ BPF_LD = 0x0
+ BPF_LDX = 0x1
+ BPF_LEN = 0x80
+ BPF_LSH = 0x60
+ BPF_MAJOR_VERSION = 0x1
+ BPF_MAXBUFSIZE = 0x200000
+ BPF_MAXINSNS = 0x200
+ BPF_MEM = 0x60
+ BPF_MEMWORDS = 0x10
+ BPF_MINBUFSIZE = 0x20
+ BPF_MINOR_VERSION = 0x1
+ BPF_MISC = 0x7
+ BPF_MSH = 0xa0
+ BPF_MUL = 0x20
+ BPF_NEG = 0x80
+ BPF_OR = 0x40
+ BPF_RELEASE = 0x30bb6
+ BPF_RET = 0x6
+ BPF_RSH = 0x70
+ BPF_ST = 0x2
+ BPF_STX = 0x3
+ BPF_SUB = 0x10
+ BPF_TAX = 0x0
+ BPF_TXA = 0x80
+ BPF_W = 0x0
+ BPF_X = 0x8
+ BRKINT = 0x2
+ CFLUSH = 0xf
+ CLOCAL = 0x8000
+ CLOCK_BOOTTIME = 0x6
+ CLOCK_MONOTONIC = 0x3
+ CLOCK_PROCESS_CPUTIME_ID = 0x2
+ CLOCK_REALTIME = 0x0
+ CLOCK_THREAD_CPUTIME_ID = 0x4
+ CLOCK_UPTIME = 0x5
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
+ CREAD = 0x800
+ CRTSCTS = 0x10000
+ CS5 = 0x0
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTART = 0x11
+ CSTATUS = 0xff
+ CSTOP = 0x13
+ CSTOPB = 0x400
+ CSUSP = 0x1a
+ CTL_HW = 0x6
+ CTL_KERN = 0x1
+ CTL_MAXNAME = 0xc
+ CTL_NET = 0x4
+ DIOCADDQUEUE = 0xc110445d
+ DIOCADDRULE = 0xcd604404
+ DIOCADDSTATE = 0xc1084425
+ DIOCCHANGERULE = 0xcd60441a
+ DIOCCLRIFFLAG = 0xc028445a
+ DIOCCLRSRCNODES = 0x20004455
+ DIOCCLRSTATES = 0xc0e04412
+ DIOCCLRSTATUS = 0xc0284416
+ DIOCGETLIMIT = 0xc0084427
+ DIOCGETQSTATS = 0xc1204460
+ DIOCGETQUEUE = 0xc110445f
+ DIOCGETQUEUES = 0xc110445e
+ DIOCGETRULE = 0xcd604407
+ DIOCGETRULES = 0xcd604406
+ DIOCGETRULESET = 0xc444443b
+ DIOCGETRULESETS = 0xc444443a
+ DIOCGETSRCNODES = 0xc0104454
+ DIOCGETSTATE = 0xc1084413
+ DIOCGETSTATES = 0xc0104419
+ DIOCGETSTATUS = 0xc1e84415
+ DIOCGETSYNFLWATS = 0xc0084463
+ DIOCGETTIMEOUT = 0xc008441e
+ DIOCIGETIFACES = 0xc0284457
+ DIOCKILLSRCNODES = 0xc080445b
+ DIOCKILLSTATES = 0xc0e04429
+ DIOCNATLOOK = 0xc0504417
+ DIOCOSFPADD = 0xc088444f
+ DIOCOSFPFLUSH = 0x2000444e
+ DIOCOSFPGET = 0xc0884450
+ DIOCRADDADDRS = 0xc4504443
+ DIOCRADDTABLES = 0xc450443d
+ DIOCRCLRADDRS = 0xc4504442
+ DIOCRCLRASTATS = 0xc4504448
+ DIOCRCLRTABLES = 0xc450443c
+ DIOCRCLRTSTATS = 0xc4504441
+ DIOCRDELADDRS = 0xc4504444
+ DIOCRDELTABLES = 0xc450443e
+ DIOCRGETADDRS = 0xc4504446
+ DIOCRGETASTATS = 0xc4504447
+ DIOCRGETTABLES = 0xc450443f
+ DIOCRGETTSTATS = 0xc4504440
+ DIOCRINADEFINE = 0xc450444d
+ DIOCRSETADDRS = 0xc4504445
+ DIOCRSETTFLAGS = 0xc450444a
+ DIOCRTSTADDRS = 0xc4504449
+ DIOCSETDEBUG = 0xc0044418
+ DIOCSETHOSTID = 0xc0044456
+ DIOCSETIFFLAG = 0xc0284459
+ DIOCSETLIMIT = 0xc0084428
+ DIOCSETREASS = 0xc004445c
+ DIOCSETSTATUSIF = 0xc0284414
+ DIOCSETSYNCOOKIES = 0xc0014462
+ DIOCSETSYNFLWATS = 0xc0084461
+ DIOCSETTIMEOUT = 0xc008441d
+ DIOCSTART = 0x20004401
+ DIOCSTOP = 0x20004402
+ DIOCXBEGIN = 0xc0104451
+ DIOCXCOMMIT = 0xc0104452
+ DIOCXROLLBACK = 0xc0104453
+ DLT_ARCNET = 0x7
+ DLT_ATM_RFC1483 = 0xb
+ DLT_AX25 = 0x3
+ DLT_CHAOS = 0x5
+ DLT_C_HDLC = 0x68
+ DLT_EN10MB = 0x1
+ DLT_EN3MB = 0x2
+ DLT_ENC = 0xd
+ DLT_FDDI = 0xa
+ DLT_IEEE802 = 0x6
+ DLT_IEEE802_11 = 0x69
+ DLT_IEEE802_11_RADIO = 0x7f
+ DLT_LOOP = 0xc
+ DLT_MPLS = 0xdb
+ DLT_NULL = 0x0
+ DLT_OPENFLOW = 0x10b
+ DLT_PFLOG = 0x75
+ DLT_PFSYNC = 0x12
+ DLT_PPP = 0x9
+ DLT_PPP_BSDOS = 0x10
+ DLT_PPP_ETHER = 0x33
+ DLT_PPP_SERIAL = 0x32
+ DLT_PRONET = 0x4
+ DLT_RAW = 0xe
+ DLT_SLIP = 0x8
+ DLT_SLIP_BSDOS = 0xf
+ DLT_USBPCAP = 0xf9
+ 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
+ DT_BLK = 0x6
+ DT_CHR = 0x2
+ DT_DIR = 0x4
+ DT_FIFO = 0x1
+ DT_LNK = 0xa
+ DT_REG = 0x8
+ DT_SOCK = 0xc
+ DT_UNKNOWN = 0x0
+ ECHO = 0x8
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EMT_TAGOVF = 0x1
+ EMUL_ENABLED = 0x1
+ EMUL_NATIVE = 0x2
+ ENDRUNDISC = 0x9
+ ETHERMIN = 0x2e
+ ETHERMTU = 0x5dc
+ ETHERTYPE_8023 = 0x4
+ ETHERTYPE_AARP = 0x80f3
+ ETHERTYPE_ACCTON = 0x8390
+ ETHERTYPE_AEONIC = 0x8036
+ ETHERTYPE_ALPHA = 0x814a
+ ETHERTYPE_AMBER = 0x6008
+ ETHERTYPE_AMOEBA = 0x8145
+ ETHERTYPE_AOE = 0x88a2
+ ETHERTYPE_APOLLO = 0x80f7
+ ETHERTYPE_APOLLODOMAIN = 0x8019
+ ETHERTYPE_APPLETALK = 0x809b
+ ETHERTYPE_APPLITEK = 0x80c7
+ ETHERTYPE_ARGONAUT = 0x803a
+ ETHERTYPE_ARP = 0x806
+ ETHERTYPE_AT = 0x809b
+ ETHERTYPE_ATALK = 0x809b
+ ETHERTYPE_ATOMIC = 0x86df
+ ETHERTYPE_ATT = 0x8069
+ ETHERTYPE_ATTSTANFORD = 0x8008
+ ETHERTYPE_AUTOPHON = 0x806a
+ ETHERTYPE_AXIS = 0x8856
+ ETHERTYPE_BCLOOP = 0x9003
+ ETHERTYPE_BOFL = 0x8102
+ ETHERTYPE_CABLETRON = 0x7034
+ ETHERTYPE_CHAOS = 0x804
+ ETHERTYPE_COMDESIGN = 0x806c
+ ETHERTYPE_COMPUGRAPHIC = 0x806d
+ ETHERTYPE_COUNTERPOINT = 0x8062
+ ETHERTYPE_CRONUS = 0x8004
+ ETHERTYPE_CRONUSVLN = 0x8003
+ ETHERTYPE_DCA = 0x1234
+ ETHERTYPE_DDE = 0x807b
+ ETHERTYPE_DEBNI = 0xaaaa
+ ETHERTYPE_DECAM = 0x8048
+ ETHERTYPE_DECCUST = 0x6006
+ ETHERTYPE_DECDIAG = 0x6005
+ ETHERTYPE_DECDNS = 0x803c
+ ETHERTYPE_DECDTS = 0x803e
+ ETHERTYPE_DECEXPER = 0x6000
+ ETHERTYPE_DECLAST = 0x8041
+ ETHERTYPE_DECLTM = 0x803f
+ ETHERTYPE_DECMUMPS = 0x6009
+ ETHERTYPE_DECNETBIOS = 0x8040
+ ETHERTYPE_DELTACON = 0x86de
+ ETHERTYPE_DIDDLE = 0x4321
+ ETHERTYPE_DLOG1 = 0x660
+ ETHERTYPE_DLOG2 = 0x661
+ ETHERTYPE_DN = 0x6003
+ ETHERTYPE_DOGFIGHT = 0x1989
+ ETHERTYPE_DSMD = 0x8039
+ ETHERTYPE_ECMA = 0x803
+ ETHERTYPE_ENCRYPT = 0x803d
+ ETHERTYPE_ES = 0x805d
+ ETHERTYPE_EXCELAN = 0x8010
+ ETHERTYPE_EXPERDATA = 0x8049
+ ETHERTYPE_FLIP = 0x8146
+ ETHERTYPE_FLOWCONTROL = 0x8808
+ ETHERTYPE_FRARP = 0x808
+ ETHERTYPE_GENDYN = 0x8068
+ ETHERTYPE_HAYES = 0x8130
+ ETHERTYPE_HIPPI_FP = 0x8180
+ ETHERTYPE_HITACHI = 0x8820
+ ETHERTYPE_HP = 0x8005
+ ETHERTYPE_IEEEPUP = 0xa00
+ ETHERTYPE_IEEEPUPAT = 0xa01
+ ETHERTYPE_IMLBL = 0x4c42
+ ETHERTYPE_IMLBLDIAG = 0x424c
+ ETHERTYPE_IP = 0x800
+ ETHERTYPE_IPAS = 0x876c
+ ETHERTYPE_IPV6 = 0x86dd
+ ETHERTYPE_IPX = 0x8137
+ ETHERTYPE_IPXNEW = 0x8037
+ ETHERTYPE_KALPANA = 0x8582
+ ETHERTYPE_LANBRIDGE = 0x8038
+ ETHERTYPE_LANPROBE = 0x8888
+ ETHERTYPE_LAT = 0x6004
+ ETHERTYPE_LBACK = 0x9000
+ ETHERTYPE_LITTLE = 0x8060
+ ETHERTYPE_LLDP = 0x88cc
+ ETHERTYPE_LOGICRAFT = 0x8148
+ ETHERTYPE_LOOPBACK = 0x9000
+ ETHERTYPE_MACSEC = 0x88e5
+ ETHERTYPE_MATRA = 0x807a
+ ETHERTYPE_MAX = 0xffff
+ ETHERTYPE_MERIT = 0x807c
+ ETHERTYPE_MICP = 0x873a
+ ETHERTYPE_MOPDL = 0x6001
+ ETHERTYPE_MOPRC = 0x6002
+ ETHERTYPE_MOTOROLA = 0x818d
+ ETHERTYPE_MPLS = 0x8847
+ ETHERTYPE_MPLS_MCAST = 0x8848
+ ETHERTYPE_MUMPS = 0x813f
+ ETHERTYPE_NBPCC = 0x3c04
+ ETHERTYPE_NBPCLAIM = 0x3c09
+ ETHERTYPE_NBPCLREQ = 0x3c05
+ ETHERTYPE_NBPCLRSP = 0x3c06
+ ETHERTYPE_NBPCREQ = 0x3c02
+ ETHERTYPE_NBPCRSP = 0x3c03
+ ETHERTYPE_NBPDG = 0x3c07
+ ETHERTYPE_NBPDGB = 0x3c08
+ ETHERTYPE_NBPDLTE = 0x3c0a
+ ETHERTYPE_NBPRAR = 0x3c0c
+ ETHERTYPE_NBPRAS = 0x3c0b
+ ETHERTYPE_NBPRST = 0x3c0d
+ ETHERTYPE_NBPSCD = 0x3c01
+ ETHERTYPE_NBPVCD = 0x3c00
+ ETHERTYPE_NBS = 0x802
+ ETHERTYPE_NCD = 0x8149
+ ETHERTYPE_NESTAR = 0x8006
+ ETHERTYPE_NETBEUI = 0x8191
+ ETHERTYPE_NOVELL = 0x8138
+ ETHERTYPE_NS = 0x600
+ ETHERTYPE_NSAT = 0x601
+ ETHERTYPE_NSCOMPAT = 0x807
+ ETHERTYPE_NTRAILER = 0x10
+ ETHERTYPE_OS9 = 0x7007
+ ETHERTYPE_OS9NET = 0x7009
+ ETHERTYPE_PACER = 0x80c6
+ ETHERTYPE_PAE = 0x888e
+ ETHERTYPE_PBB = 0x88e7
+ ETHERTYPE_PCS = 0x4242
+ ETHERTYPE_PLANNING = 0x8044
+ ETHERTYPE_PPP = 0x880b
+ ETHERTYPE_PPPOE = 0x8864
+ ETHERTYPE_PPPOEDISC = 0x8863
+ ETHERTYPE_PRIMENTS = 0x7031
+ ETHERTYPE_PUP = 0x200
+ ETHERTYPE_PUPAT = 0x200
+ ETHERTYPE_QINQ = 0x88a8
+ ETHERTYPE_RACAL = 0x7030
+ ETHERTYPE_RATIONAL = 0x8150
+ ETHERTYPE_RAWFR = 0x6559
+ ETHERTYPE_RCL = 0x1995
+ ETHERTYPE_RDP = 0x8739
+ ETHERTYPE_RETIX = 0x80f2
+ ETHERTYPE_REVARP = 0x8035
+ ETHERTYPE_SCA = 0x6007
+ ETHERTYPE_SECTRA = 0x86db
+ ETHERTYPE_SECUREDATA = 0x876d
+ ETHERTYPE_SGITW = 0x817e
+ ETHERTYPE_SG_BOUNCE = 0x8016
+ ETHERTYPE_SG_DIAG = 0x8013
+ ETHERTYPE_SG_NETGAMES = 0x8014
+ ETHERTYPE_SG_RESV = 0x8015
+ ETHERTYPE_SIMNET = 0x5208
+ ETHERTYPE_SLOW = 0x8809
+ ETHERTYPE_SNA = 0x80d5
+ ETHERTYPE_SNMP = 0x814c
+ ETHERTYPE_SONIX = 0xfaf5
+ ETHERTYPE_SPIDER = 0x809f
+ ETHERTYPE_SPRITE = 0x500
+ ETHERTYPE_STP = 0x8181
+ ETHERTYPE_TALARIS = 0x812b
+ ETHERTYPE_TALARISMC = 0x852b
+ ETHERTYPE_TCPCOMP = 0x876b
+ ETHERTYPE_TCPSM = 0x9002
+ ETHERTYPE_TEC = 0x814f
+ ETHERTYPE_TIGAN = 0x802f
+ ETHERTYPE_TRAIL = 0x1000
+ ETHERTYPE_TRANSETHER = 0x6558
+ ETHERTYPE_TYMSHARE = 0x802e
+ ETHERTYPE_UBBST = 0x7005
+ ETHERTYPE_UBDEBUG = 0x900
+ ETHERTYPE_UBDIAGLOOP = 0x7002
+ ETHERTYPE_UBDL = 0x7000
+ ETHERTYPE_UBNIU = 0x7001
+ ETHERTYPE_UBNMC = 0x7003
+ ETHERTYPE_VALID = 0x1600
+ ETHERTYPE_VARIAN = 0x80dd
+ ETHERTYPE_VAXELN = 0x803b
+ ETHERTYPE_VEECO = 0x8067
+ ETHERTYPE_VEXP = 0x805b
+ ETHERTYPE_VGLAB = 0x8131
+ ETHERTYPE_VINES = 0xbad
+ ETHERTYPE_VINESECHO = 0xbaf
+ ETHERTYPE_VINESLOOP = 0xbae
+ ETHERTYPE_VITAL = 0xff00
+ ETHERTYPE_VLAN = 0x8100
+ ETHERTYPE_VLTLMAN = 0x8080
+ ETHERTYPE_VPROD = 0x805c
+ ETHERTYPE_VURESERVED = 0x8147
+ ETHERTYPE_WATERLOO = 0x8130
+ ETHERTYPE_WELLFLEET = 0x8103
+ ETHERTYPE_X25 = 0x805
+ ETHERTYPE_X75 = 0x801
+ ETHERTYPE_XNSSM = 0x9001
+ ETHERTYPE_XTP = 0x817d
+ ETHER_ADDR_LEN = 0x6
+ ETHER_ALIGN = 0x2
+ ETHER_CRC_LEN = 0x4
+ ETHER_CRC_POLY_BE = 0x4c11db6
+ ETHER_CRC_POLY_LE = 0xedb88320
+ ETHER_HDR_LEN = 0xe
+ ETHER_MAX_DIX_LEN = 0x600
+ ETHER_MAX_HARDMTU_LEN = 0xff9b
+ ETHER_MAX_LEN = 0x5ee
+ ETHER_MIN_LEN = 0x40
+ ETHER_TYPE_LEN = 0x2
+ ETHER_VLAN_ENCAP_LEN = 0x4
+ EVFILT_AIO = -0x3
+ EVFILT_DEVICE = -0x8
+ EVFILT_PROC = -0x5
+ EVFILT_READ = -0x1
+ EVFILT_SIGNAL = -0x6
+ EVFILT_SYSCOUNT = 0x8
+ EVFILT_TIMER = -0x7
+ EVFILT_VNODE = -0x4
+ EVFILT_WRITE = -0x2
+ EVL_ENCAPLEN = 0x4
+ EVL_PRIO_BITS = 0xd
+ EVL_PRIO_MAX = 0x7
+ EVL_VLID_MASK = 0xfff
+ EVL_VLID_MAX = 0xffe
+ EVL_VLID_MIN = 0x1
+ EVL_VLID_NULL = 0x0
+ EV_ADD = 0x1
+ EV_CLEAR = 0x20
+ EV_DELETE = 0x2
+ EV_DISABLE = 0x8
+ EV_DISPATCH = 0x80
+ EV_ENABLE = 0x4
+ EV_EOF = 0x8000
+ EV_ERROR = 0x4000
+ EV_FLAG1 = 0x2000
+ EV_ONESHOT = 0x10
+ EV_RECEIPT = 0x40
+ EV_SYSFLAGS = 0xf000
+ EXTA = 0x4b00
+ EXTB = 0x9600
+ EXTPROC = 0x800
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0x400
+ FLUSHO = 0x800000
+ F_DUPFD = 0x0
+ F_DUPFD_CLOEXEC = 0xa
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLK = 0x7
+ F_GETOWN = 0x5
+ F_ISATTY = 0xb
+ F_OK = 0x0
+ F_RDLCK = 0x1
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLK = 0x8
+ F_SETLKW = 0x9
+ F_SETOWN = 0x6
+ F_UNLCK = 0x2
+ F_WRLCK = 0x3
+ HUPCL = 0x4000
+ HW_MACHINE = 0x1
+ ICANON = 0x100
+ ICMP6_FILTER = 0x12
+ ICRNL = 0x100
+ IEXTEN = 0x400
+ IFAN_ARRIVAL = 0x0
+ IFAN_DEPARTURE = 0x1
+ IFF_ALLMULTI = 0x200
+ IFF_BROADCAST = 0x2
+ IFF_CANTCHANGE = 0x8e52
+ IFF_DEBUG = 0x4
+ IFF_LINK0 = 0x1000
+ IFF_LINK1 = 0x2000
+ IFF_LINK2 = 0x4000
+ IFF_LOOPBACK = 0x8
+ IFF_MULTICAST = 0x8000
+ IFF_NOARP = 0x80
+ IFF_OACTIVE = 0x400
+ IFF_POINTOPOINT = 0x10
+ IFF_PROMISC = 0x100
+ IFF_RUNNING = 0x40
+ IFF_SIMPLEX = 0x800
+ IFF_STATICARP = 0x20
+ IFF_UP = 0x1
+ IFNAMSIZ = 0x10
+ IFT_1822 = 0x2
+ IFT_A12MPPSWITCH = 0x82
+ IFT_AAL2 = 0xbb
+ IFT_AAL5 = 0x31
+ IFT_ADSL = 0x5e
+ IFT_AFLANE8023 = 0x3b
+ IFT_AFLANE8025 = 0x3c
+ IFT_ARAP = 0x58
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ASYNC = 0x54
+ IFT_ATM = 0x25
+ IFT_ATMDXI = 0x69
+ IFT_ATMFUNI = 0x6a
+ IFT_ATMIMA = 0x6b
+ IFT_ATMLOGICAL = 0x50
+ IFT_ATMRADIO = 0xbd
+ IFT_ATMSUBINTERFACE = 0x86
+ IFT_ATMVCIENDPT = 0xc2
+ IFT_ATMVIRTUAL = 0x95
+ IFT_BGPPOLICYACCOUNTING = 0xa2
+ IFT_BLUETOOTH = 0xf8
+ IFT_BRIDGE = 0xd1
+ IFT_BSC = 0x53
+ IFT_CARP = 0xf7
+ IFT_CCTEMUL = 0x3d
+ IFT_CEPT = 0x13
+ IFT_CES = 0x85
+ IFT_CHANNEL = 0x46
+ IFT_CNR = 0x55
+ IFT_COFFEE = 0x84
+ IFT_COMPOSITELINK = 0x9b
+ IFT_DCN = 0x8d
+ IFT_DIGITALPOWERLINE = 0x8a
+ IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
+ IFT_DLSW = 0x4a
+ IFT_DOCSCABLEDOWNSTREAM = 0x80
+ IFT_DOCSCABLEMACLAYER = 0x7f
+ IFT_DOCSCABLEUPSTREAM = 0x81
+ IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
+ IFT_DS0 = 0x51
+ IFT_DS0BUNDLE = 0x52
+ IFT_DS1FDL = 0xaa
+ IFT_DS3 = 0x1e
+ IFT_DTM = 0x8c
+ IFT_DUMMY = 0xf1
+ IFT_DVBASILN = 0xac
+ IFT_DVBASIOUT = 0xad
+ IFT_DVBRCCDOWNSTREAM = 0x93
+ IFT_DVBRCCMACLAYER = 0x92
+ IFT_DVBRCCUPSTREAM = 0x94
+ IFT_ECONET = 0xce
+ IFT_ENC = 0xf4
+ IFT_EON = 0x19
+ IFT_EPLRS = 0x57
+ IFT_ESCON = 0x49
+ IFT_ETHER = 0x6
+ IFT_FAITH = 0xf3
+ IFT_FAST = 0x7d
+ IFT_FASTETHER = 0x3e
+ IFT_FASTETHERFX = 0x45
+ IFT_FDDI = 0xf
+ IFT_FIBRECHANNEL = 0x38
+ IFT_FRAMERELAYINTERCONNECT = 0x3a
+ IFT_FRAMERELAYMPI = 0x5c
+ IFT_FRDLCIENDPT = 0xc1
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_FRF16MFRBUNDLE = 0xa3
+ IFT_FRFORWARD = 0x9e
+ IFT_G703AT2MB = 0x43
+ IFT_G703AT64K = 0x42
+ IFT_GIF = 0xf0
+ IFT_GIGABITETHERNET = 0x75
+ IFT_GR303IDT = 0xb2
+ IFT_GR303RDT = 0xb1
+ IFT_H323GATEKEEPER = 0xa4
+ IFT_H323PROXY = 0xa5
+ IFT_HDH1822 = 0x3
+ IFT_HDLC = 0x76
+ IFT_HDSL2 = 0xa8
+ IFT_HIPERLAN2 = 0xb7
+ IFT_HIPPI = 0x2f
+ IFT_HIPPIINTERFACE = 0x39
+ IFT_HOSTPAD = 0x5a
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IBM370PARCHAN = 0x48
+ IFT_IDSL = 0x9a
+ IFT_IEEE1394 = 0x90
+ IFT_IEEE80211 = 0x47
+ IFT_IEEE80212 = 0x37
+ IFT_IEEE8023ADLAG = 0xa1
+ IFT_IFGSN = 0x91
+ IFT_IMT = 0xbe
+ IFT_INFINIBAND = 0xc7
+ IFT_INTERLEAVE = 0x7c
+ IFT_IP = 0x7e
+ IFT_IPFORWARD = 0x8e
+ IFT_IPOVERATM = 0x72
+ IFT_IPOVERCDLC = 0x6d
+ IFT_IPOVERCLAW = 0x6e
+ IFT_IPSWITCH = 0x4e
+ IFT_ISDN = 0x3f
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISDNS = 0x4b
+ IFT_ISDNU = 0x4c
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88025CRFPINT = 0x62
+ IFT_ISO88025DTR = 0x56
+ IFT_ISO88025FIBER = 0x73
+ IFT_ISO88026 = 0xa
+ IFT_ISUP = 0xb3
+ IFT_L2VLAN = 0x87
+ IFT_L3IPVLAN = 0x88
+ IFT_L3IPXVLAN = 0x89
+ IFT_LAPB = 0x10
+ IFT_LAPD = 0x4d
+ IFT_LAPF = 0x77
+ IFT_LINEGROUP = 0xd2
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MBIM = 0xfa
+ IFT_MEDIAMAILOVERIP = 0x8b
+ IFT_MFSIGLINK = 0xa7
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_MPC = 0x71
+ IFT_MPLS = 0xa6
+ IFT_MPLSTUNNEL = 0x96
+ IFT_MSDSL = 0x8f
+ IFT_MVL = 0xbf
+ IFT_MYRINET = 0x63
+ IFT_NFAS = 0xaf
+ IFT_NSIP = 0x1b
+ IFT_OPTICALCHANNEL = 0xc3
+ IFT_OPTICALTRANSPORT = 0xc4
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PFLOG = 0xf5
+ IFT_PFLOW = 0xf9
+ IFT_PFSYNC = 0xf6
+ IFT_PLC = 0xae
+ IFT_PON155 = 0xcf
+ IFT_PON622 = 0xd0
+ IFT_POS = 0xab
+ IFT_PPP = 0x17
+ IFT_PPPMULTILINKBUNDLE = 0x6c
+ IFT_PROPATM = 0xc5
+ IFT_PROPBWAP2MP = 0xb8
+ IFT_PROPCNLS = 0x59
+ IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
+ IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
+ IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
+ IFT_PROPMUX = 0x36
+ IFT_PROPVIRTUAL = 0x35
+ IFT_PROPWIRELESSP2P = 0x9d
+ IFT_PTPSERIAL = 0x16
+ IFT_PVC = 0xf2
+ IFT_Q2931 = 0xc9
+ IFT_QLLC = 0x44
+ IFT_RADIOMAC = 0xbc
+ IFT_RADSL = 0x5f
+ IFT_REACHDSL = 0xc0
+ IFT_RFC1483 = 0x9f
+ IFT_RS232 = 0x21
+ IFT_RSRB = 0x4f
+ IFT_SDLC = 0x11
+ IFT_SDSL = 0x60
+ IFT_SHDSL = 0xa9
+ IFT_SIP = 0x1f
+ IFT_SIPSIG = 0xcc
+ IFT_SIPTG = 0xcb
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SONET = 0x27
+ IFT_SONETOVERHEADCHANNEL = 0xb9
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_SRP = 0x97
+ IFT_SS7SIGLINK = 0x9c
+ IFT_STACKTOSTACK = 0x6f
+ IFT_STARLAN = 0xb
+ IFT_T1 = 0x12
+ IFT_TDLC = 0x74
+ IFT_TELINK = 0xc8
+ IFT_TERMPAD = 0x5b
+ IFT_TR008 = 0xb0
+ IFT_TRANSPHDLC = 0x7b
+ IFT_TUNNEL = 0x83
+ IFT_ULTRA = 0x1d
+ IFT_USB = 0xa0
+ IFT_V11 = 0x40
+ IFT_V35 = 0x2d
+ IFT_V36 = 0x41
+ IFT_V37 = 0x78
+ IFT_VDSL = 0x61
+ IFT_VIRTUALIPADDRESS = 0x70
+ IFT_VIRTUALTG = 0xca
+ IFT_VOICEDID = 0xd5
+ IFT_VOICEEM = 0x64
+ IFT_VOICEEMFGD = 0xd3
+ IFT_VOICEENCAP = 0x67
+ IFT_VOICEFGDEANA = 0xd4
+ IFT_VOICEFXO = 0x65
+ IFT_VOICEFXS = 0x66
+ IFT_VOICEOVERATM = 0x98
+ IFT_VOICEOVERCABLE = 0xc6
+ IFT_VOICEOVERFRAMERELAY = 0x99
+ IFT_VOICEOVERIP = 0x68
+ IFT_X213 = 0x5d
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25HUNTGROUP = 0x7a
+ IFT_X25MLP = 0x79
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x2000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLASSD_HOST = 0xfffffff
+ IN_CLASSD_NET = 0xf0000000
+ IN_CLASSD_NSHIFT = 0x1c
+ IN_LOOPBACKNET = 0x7f
+ IN_RFC3021_HOST = 0x1
+ IN_RFC3021_NET = 0xfffffffe
+ IN_RFC3021_NSHIFT = 0x1f
+ IPPROTO_AH = 0x33
+ IPPROTO_CARP = 0x70
+ IPPROTO_DIVERT = 0x102
+ IPPROTO_DONE = 0x101
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_ENCAP = 0x62
+ IPPROTO_EON = 0x50
+ IPPROTO_ESP = 0x32
+ IPPROTO_ETHERIP = 0x61
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GGP = 0x3
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IP = 0x0
+ IPPROTO_IPCOMP = 0x6c
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPV4 = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_MAX = 0x100
+ IPPROTO_MAXID = 0x103
+ IPPROTO_MOBILE = 0x37
+ IPPROTO_MPLS = 0x89
+ IPPROTO_NONE = 0x3b
+ IPPROTO_PFSYNC = 0xf0
+ IPPROTO_PIM = 0x67
+ IPPROTO_PUP = 0xc
+ IPPROTO_RAW = 0xff
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_UDP = 0x11
+ IPPROTO_UDPLITE = 0x88
+ IPV6_AUTH_LEVEL = 0x35
+ IPV6_AUTOFLOWLABEL = 0x3b
+ IPV6_CHECKSUM = 0x1a
+ IPV6_DEFAULT_MULTICAST_HOPS = 0x1
+ IPV6_DEFAULT_MULTICAST_LOOP = 0x1
+ IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
+ IPV6_ESP_NETWORK_LEVEL = 0x37
+ IPV6_ESP_TRANS_LEVEL = 0x36
+ IPV6_FAITH = 0x1d
+ IPV6_FLOWINFO_MASK = 0xfffffff
+ IPV6_FLOWLABEL_MASK = 0xfffff
+ IPV6_FRAGTTL = 0x78
+ IPV6_HLIMDEC = 0x1
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
+ IPV6_IPCOMP_LEVEL = 0x3c
+ IPV6_JOIN_GROUP = 0xc
+ IPV6_LEAVE_GROUP = 0xd
+ IPV6_MAXHLIM = 0xff
+ IPV6_MAXPACKET = 0xffff
+ IPV6_MINHOPCOUNT = 0x41
+ IPV6_MMTU = 0x500
+ IPV6_MULTICAST_HOPS = 0xa
+ IPV6_MULTICAST_IF = 0x9
+ IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_OPTIONS = 0x1
+ IPV6_PATHMTU = 0x2c
+ IPV6_PIPEX = 0x3f
+ IPV6_PKTINFO = 0x2e
+ IPV6_PORTRANGE = 0xe
+ IPV6_PORTRANGE_DEFAULT = 0x0
+ IPV6_PORTRANGE_HIGH = 0x1
+ IPV6_PORTRANGE_LOW = 0x2
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVDSTPORT = 0x40
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x24
+ IPV6_RECVRTHDR = 0x26
+ IPV6_RECVTCLASS = 0x39
+ IPV6_RTABLE = 0x1021
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x23
+ IPV6_RTHDR_LOOSE = 0x0
+ IPV6_RTHDR_STRICT = 0x1
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_SOCKOPT_RESERVED1 = 0x3
+ IPV6_TCLASS = 0x3d
+ IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2a
+ IPV6_V6ONLY = 0x1b
+ IPV6_VERSION = 0x60
+ IPV6_VERSION_MASK = 0xf0
+ IP_ADD_MEMBERSHIP = 0xc
+ IP_AUTH_LEVEL = 0x14
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DROP_MEMBERSHIP = 0xd
+ IP_ESP_NETWORK_LEVEL = 0x16
+ IP_ESP_TRANS_LEVEL = 0x15
+ IP_HDRINCL = 0x2
+ IP_IPCOMP_LEVEL = 0x1d
+ IP_IPDEFTTL = 0x25
+ IP_IPSECFLOWINFO = 0x24
+ IP_IPSEC_LOCAL_AUTH = 0x1b
+ IP_IPSEC_LOCAL_CRED = 0x19
+ IP_IPSEC_LOCAL_ID = 0x17
+ IP_IPSEC_REMOTE_AUTH = 0x1c
+ IP_IPSEC_REMOTE_CRED = 0x1a
+ IP_IPSEC_REMOTE_ID = 0x18
+ IP_MAXPACKET = 0xffff
+ IP_MAX_MEMBERSHIPS = 0xfff
+ IP_MF = 0x2000
+ IP_MINTTL = 0x20
+ IP_MIN_MEMBERSHIPS = 0xf
+ IP_MSS = 0x240
+ IP_MULTICAST_IF = 0x9
+ IP_MULTICAST_LOOP = 0xb
+ IP_MULTICAST_TTL = 0xa
+ IP_OFFMASK = 0x1fff
+ IP_OPTIONS = 0x1
+ IP_PIPEX = 0x22
+ IP_PORTRANGE = 0x13
+ IP_PORTRANGE_DEFAULT = 0x0
+ IP_PORTRANGE_HIGH = 0x1
+ IP_PORTRANGE_LOW = 0x2
+ IP_RECVDSTADDR = 0x7
+ IP_RECVDSTPORT = 0x21
+ IP_RECVIF = 0x1e
+ IP_RECVOPTS = 0x5
+ IP_RECVRETOPTS = 0x6
+ IP_RECVRTABLE = 0x23
+ IP_RECVTTL = 0x1f
+ IP_RETOPTS = 0x8
+ IP_RF = 0x8000
+ IP_RTABLE = 0x1021
+ IP_SENDSRCADDR = 0x7
+ IP_TOS = 0x3
+ IP_TTL = 0x4
+ ISIG = 0x80
+ ISTRIP = 0x20
+ IUCLC = 0x1000
+ IXANY = 0x800
+ IXOFF = 0x400
+ IXON = 0x200
+ KERN_HOSTNAME = 0xa
+ KERN_OSRELEASE = 0x2
+ KERN_OSTYPE = 0x1
+ KERN_VERSION = 0x4
+ LCNT_OVERLOAD_FLUSH = 0x6
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ MADV_DONTNEED = 0x4
+ MADV_FREE = 0x6
+ MADV_NORMAL = 0x0
+ MADV_RANDOM = 0x1
+ MADV_SEQUENTIAL = 0x2
+ MADV_SPACEAVAIL = 0x5
+ MADV_WILLNEED = 0x3
+ MAP_ANON = 0x1000
+ MAP_ANONYMOUS = 0x1000
+ MAP_CONCEAL = 0x8000
+ MAP_COPY = 0x2
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x10
+ MAP_FLAGMASK = 0xfff7
+ MAP_HASSEMAPHORE = 0x0
+ MAP_INHERIT = 0x0
+ MAP_INHERIT_COPY = 0x1
+ MAP_INHERIT_NONE = 0x2
+ MAP_INHERIT_SHARE = 0x0
+ MAP_INHERIT_ZERO = 0x3
+ MAP_NOEXTEND = 0x0
+ MAP_NORESERVE = 0x0
+ MAP_PRIVATE = 0x2
+ MAP_RENAME = 0x0
+ MAP_SHARED = 0x1
+ MAP_STACK = 0x4000
+ MAP_TRYFIXED = 0x0
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_DEFEXPORTED = 0x200
+ MNT_DELEXPORT = 0x20000
+ MNT_DOOMED = 0x8000000
+ MNT_EXPORTANON = 0x400
+ MNT_EXPORTED = 0x100
+ MNT_EXRDONLY = 0x80
+ MNT_FORCE = 0x80000
+ MNT_LAZY = 0x3
+ MNT_LOCAL = 0x1000
+ MNT_NOATIME = 0x8000
+ MNT_NODEV = 0x10
+ MNT_NOEXEC = 0x4
+ MNT_NOPERM = 0x20
+ MNT_NOSUID = 0x8
+ MNT_NOWAIT = 0x2
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELOAD = 0x40000
+ MNT_ROOTFS = 0x4000
+ MNT_SOFTDEP = 0x4000000
+ MNT_STALLED = 0x100000
+ MNT_SWAPPABLE = 0x200000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0x400ffff
+ MNT_WAIT = 0x1
+ MNT_WANTRDWR = 0x2000000
+ MNT_WXALLOWED = 0x800
+ MSG_BCAST = 0x100
+ MSG_CMSG_CLOEXEC = 0x800
+ MSG_CTRUNC = 0x20
+ MSG_DONTROUTE = 0x4
+ MSG_DONTWAIT = 0x80
+ MSG_EOR = 0x8
+ MSG_MCAST = 0x200
+ MSG_NOSIGNAL = 0x400
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_TRUNC = 0x10
+ MSG_WAITALL = 0x40
+ MS_ASYNC = 0x1
+ MS_INVALIDATE = 0x4
+ MS_SYNC = 0x2
+ NAME_MAX = 0xff
+ NET_RT_DUMP = 0x1
+ NET_RT_FLAGS = 0x2
+ NET_RT_IFLIST = 0x3
+ NET_RT_IFNAMES = 0x6
+ NET_RT_MAXID = 0x7
+ NET_RT_STATS = 0x4
+ NET_RT_TABLE = 0x5
+ NFDBITS = 0x20
+ NOFLSH = 0x80000000
+ NOKERNINFO = 0x2000000
+ NOTE_ATTRIB = 0x8
+ NOTE_CHANGE = 0x1
+ NOTE_CHILD = 0x4
+ NOTE_DELETE = 0x1
+ NOTE_EOF = 0x2
+ NOTE_EXEC = 0x20000000
+ NOTE_EXIT = 0x80000000
+ NOTE_EXTEND = 0x4
+ NOTE_FORK = 0x40000000
+ NOTE_LINK = 0x10
+ NOTE_LOWAT = 0x1
+ NOTE_PCTRLMASK = 0xf0000000
+ NOTE_PDATAMASK = 0xfffff
+ NOTE_RENAME = 0x20
+ NOTE_REVOKE = 0x40
+ NOTE_TRACK = 0x1
+ NOTE_TRACKERR = 0x2
+ NOTE_TRUNCATE = 0x80
+ NOTE_WRITE = 0x2
+ OCRNL = 0x10
+ OLCUC = 0x20
+ ONLCR = 0x2
+ ONLRET = 0x80
+ ONOCR = 0x40
+ ONOEOT = 0x8
+ OPOST = 0x1
+ OXTABS = 0x4
+ O_ACCMODE = 0x3
+ O_APPEND = 0x8
+ O_ASYNC = 0x40
+ O_CLOEXEC = 0x10000
+ O_CREAT = 0x200
+ O_DIRECTORY = 0x20000
+ O_DSYNC = 0x80
+ O_EXCL = 0x800
+ O_EXLOCK = 0x20
+ O_FSYNC = 0x80
+ O_NDELAY = 0x4
+ O_NOCTTY = 0x8000
+ O_NOFOLLOW = 0x100
+ O_NONBLOCK = 0x4
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_RSYNC = 0x80
+ O_SHLOCK = 0x10
+ O_SYNC = 0x80
+ O_TRUNC = 0x400
+ O_WRONLY = 0x1
+ PARENB = 0x1000
+ PARMRK = 0x8
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PF_FLUSH = 0x1
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROT_EXEC = 0x4
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_MEMLOCK = 0x6
+ RLIMIT_NOFILE = 0x8
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0x7fffffffffffffff
+ RTAX_AUTHOR = 0x6
+ RTAX_BFD = 0xb
+ RTAX_BRD = 0x7
+ RTAX_DNS = 0xc
+ RTAX_DST = 0x0
+ RTAX_GATEWAY = 0x1
+ RTAX_GENMASK = 0x3
+ RTAX_IFA = 0x5
+ RTAX_IFP = 0x4
+ RTAX_LABEL = 0xa
+ RTAX_MAX = 0xf
+ RTAX_NETMASK = 0x2
+ RTAX_SEARCH = 0xe
+ RTAX_SRC = 0x8
+ RTAX_SRCMASK = 0x9
+ RTAX_STATIC = 0xd
+ RTA_AUTHOR = 0x40
+ RTA_BFD = 0x800
+ RTA_BRD = 0x80
+ RTA_DNS = 0x1000
+ RTA_DST = 0x1
+ RTA_GATEWAY = 0x2
+ RTA_GENMASK = 0x8
+ RTA_IFA = 0x20
+ RTA_IFP = 0x10
+ RTA_LABEL = 0x400
+ RTA_NETMASK = 0x4
+ RTA_SEARCH = 0x4000
+ RTA_SRC = 0x100
+ RTA_SRCMASK = 0x200
+ RTA_STATIC = 0x2000
+ RTF_ANNOUNCE = 0x4000
+ RTF_BFD = 0x1000000
+ RTF_BLACKHOLE = 0x1000
+ RTF_BROADCAST = 0x400000
+ RTF_CACHED = 0x20000
+ RTF_CLONED = 0x10000
+ RTF_CLONING = 0x100
+ RTF_CONNECTED = 0x800000
+ RTF_DONE = 0x40
+ RTF_DYNAMIC = 0x10
+ RTF_FMASK = 0x110fc08
+ RTF_GATEWAY = 0x2
+ RTF_HOST = 0x4
+ RTF_LLINFO = 0x400
+ RTF_LOCAL = 0x200000
+ RTF_MODIFIED = 0x20
+ RTF_MPATH = 0x40000
+ RTF_MPLS = 0x100000
+ RTF_MULTICAST = 0x200
+ RTF_PERMANENT_ARP = 0x2000
+ RTF_PROTO1 = 0x8000
+ RTF_PROTO2 = 0x4000
+ RTF_PROTO3 = 0x2000
+ RTF_REJECT = 0x8
+ RTF_STATIC = 0x800
+ RTF_UP = 0x1
+ RTF_USETRAILERS = 0x8000
+ RTM_80211INFO = 0x15
+ RTM_ADD = 0x1
+ RTM_BFD = 0x12
+ RTM_CHANGE = 0x3
+ RTM_CHGADDRATTR = 0x14
+ RTM_DELADDR = 0xd
+ RTM_DELETE = 0x2
+ RTM_DESYNC = 0x10
+ RTM_GET = 0x4
+ RTM_IFANNOUNCE = 0xf
+ RTM_IFINFO = 0xe
+ RTM_INVALIDATE = 0x11
+ RTM_LOSING = 0x5
+ RTM_MAXSIZE = 0x800
+ RTM_MISS = 0x7
+ RTM_NEWADDR = 0xc
+ RTM_PROPOSAL = 0x13
+ RTM_REDIRECT = 0x6
+ RTM_RESOLVE = 0xb
+ RTM_RTTUNIT = 0xf4240
+ RTM_VERSION = 0x5
+ RTV_EXPIRE = 0x4
+ RTV_HOPCOUNT = 0x2
+ RTV_MTU = 0x1
+ RTV_RPIPE = 0x8
+ RTV_RTT = 0x40
+ RTV_RTTVAR = 0x80
+ RTV_SPIPE = 0x10
+ RTV_SSTHRESH = 0x20
+ RT_TABLEID_BITS = 0x8
+ RT_TABLEID_MASK = 0xff
+ RT_TABLEID_MAX = 0xff
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ RUSAGE_THREAD = 0x1
+ SCM_RIGHTS = 0x1
+ SCM_TIMESTAMP = 0x4
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIOCADDMULTI = 0x80206931
+ SIOCAIFADDR = 0x8040691a
+ SIOCAIFGROUP = 0x80286987
+ SIOCATMARK = 0x40047307
+ SIOCBRDGADD = 0x8060693c
+ SIOCBRDGADDL = 0x80606949
+ SIOCBRDGADDS = 0x80606941
+ SIOCBRDGARL = 0x808c694d
+ SIOCBRDGDADDR = 0x81286947
+ SIOCBRDGDEL = 0x8060693d
+ SIOCBRDGDELS = 0x80606942
+ SIOCBRDGFLUSH = 0x80606948
+ SIOCBRDGFRL = 0x808c694e
+ SIOCBRDGGCACHE = 0xc0186941
+ SIOCBRDGGFD = 0xc0186952
+ SIOCBRDGGHT = 0xc0186951
+ SIOCBRDGGIFFLGS = 0xc060693e
+ SIOCBRDGGMA = 0xc0186953
+ SIOCBRDGGPARAM = 0xc0406958
+ SIOCBRDGGPRI = 0xc0186950
+ SIOCBRDGGRL = 0xc030694f
+ SIOCBRDGGTO = 0xc0186946
+ SIOCBRDGIFS = 0xc0606942
+ SIOCBRDGRTS = 0xc0206943
+ SIOCBRDGSADDR = 0xc1286944
+ SIOCBRDGSCACHE = 0x80186940
+ SIOCBRDGSFD = 0x80186952
+ SIOCBRDGSHT = 0x80186951
+ SIOCBRDGSIFCOST = 0x80606955
+ SIOCBRDGSIFFLGS = 0x8060693f
+ SIOCBRDGSIFPRIO = 0x80606954
+ SIOCBRDGSIFPROT = 0x8060694a
+ SIOCBRDGSMA = 0x80186953
+ SIOCBRDGSPRI = 0x80186950
+ SIOCBRDGSPROTO = 0x8018695a
+ SIOCBRDGSTO = 0x80186945
+ SIOCBRDGSTXHC = 0x80186959
+ SIOCDELLABEL = 0x80206997
+ SIOCDELMULTI = 0x80206932
+ SIOCDIFADDR = 0x80206919
+ SIOCDIFGROUP = 0x80286989
+ SIOCDIFPARENT = 0x802069b4
+ SIOCDIFPHYADDR = 0x80206949
+ SIOCDPWE3NEIGHBOR = 0x802069de
+ SIOCDVNETID = 0x802069af
+ SIOCGETKALIVE = 0xc01869a4
+ SIOCGETLABEL = 0x8020699a
+ SIOCGETMPWCFG = 0xc02069ae
+ SIOCGETPFLOW = 0xc02069fe
+ SIOCGETPFSYNC = 0xc02069f8
+ SIOCGETSGCNT = 0xc0207534
+ SIOCGETVIFCNT = 0xc0287533
+ SIOCGETVLAN = 0xc0206990
+ SIOCGIFADDR = 0xc0206921
+ SIOCGIFBRDADDR = 0xc0206923
+ SIOCGIFCONF = 0xc0106924
+ SIOCGIFDATA = 0xc020691b
+ SIOCGIFDESCR = 0xc0206981
+ SIOCGIFDSTADDR = 0xc0206922
+ SIOCGIFFLAGS = 0xc0206911
+ SIOCGIFGATTR = 0xc028698b
+ SIOCGIFGENERIC = 0xc020693a
+ SIOCGIFGLIST = 0xc028698d
+ SIOCGIFGMEMB = 0xc028698a
+ SIOCGIFGROUP = 0xc0286988
+ SIOCGIFHARDMTU = 0xc02069a5
+ SIOCGIFLLPRIO = 0xc02069b6
+ SIOCGIFMEDIA = 0xc0406938
+ SIOCGIFMETRIC = 0xc0206917
+ SIOCGIFMTU = 0xc020697e
+ SIOCGIFNETMASK = 0xc0206925
+ SIOCGIFPAIR = 0xc02069b1
+ SIOCGIFPARENT = 0xc02069b3
+ SIOCGIFPRIORITY = 0xc020699c
+ SIOCGIFRDOMAIN = 0xc02069a0
+ SIOCGIFRTLABEL = 0xc0206983
+ SIOCGIFRXR = 0x802069aa
+ SIOCGIFSFFPAGE = 0xc1126939
+ SIOCGIFXFLAGS = 0xc020699e
+ SIOCGLIFPHYADDR = 0xc218694b
+ SIOCGLIFPHYDF = 0xc02069c2
+ SIOCGLIFPHYECN = 0xc02069c8
+ SIOCGLIFPHYRTABLE = 0xc02069a2
+ SIOCGLIFPHYTTL = 0xc02069a9
+ SIOCGPGRP = 0x40047309
+ SIOCGPWE3 = 0xc0206998
+ SIOCGPWE3CTRLWORD = 0xc02069dc
+ SIOCGPWE3FAT = 0xc02069dd
+ SIOCGPWE3NEIGHBOR = 0xc21869de
+ SIOCGRXHPRIO = 0xc02069db
+ SIOCGSPPPPARAMS = 0xc0206994
+ SIOCGTXHPRIO = 0xc02069c6
+ SIOCGUMBINFO = 0xc02069be
+ SIOCGUMBPARAM = 0xc02069c0
+ SIOCGVH = 0xc02069f6
+ SIOCGVNETFLOWID = 0xc02069c4
+ SIOCGVNETID = 0xc02069a7
+ SIOCIFAFATTACH = 0x801169ab
+ SIOCIFAFDETACH = 0x801169ac
+ SIOCIFCREATE = 0x8020697a
+ SIOCIFDESTROY = 0x80206979
+ SIOCIFGCLONERS = 0xc0106978
+ SIOCSETKALIVE = 0x801869a3
+ SIOCSETLABEL = 0x80206999
+ SIOCSETMPWCFG = 0x802069ad
+ SIOCSETPFLOW = 0x802069fd
+ SIOCSETPFSYNC = 0x802069f7
+ SIOCSETVLAN = 0x8020698f
+ SIOCSIFADDR = 0x8020690c
+ SIOCSIFBRDADDR = 0x80206913
+ SIOCSIFDESCR = 0x80206980
+ SIOCSIFDSTADDR = 0x8020690e
+ SIOCSIFFLAGS = 0x80206910
+ SIOCSIFGATTR = 0x8028698c
+ SIOCSIFGENERIC = 0x80206939
+ SIOCSIFLLADDR = 0x8020691f
+ SIOCSIFLLPRIO = 0x802069b5
+ SIOCSIFMEDIA = 0xc0206937
+ SIOCSIFMETRIC = 0x80206918
+ SIOCSIFMTU = 0x8020697f
+ SIOCSIFNETMASK = 0x80206916
+ SIOCSIFPAIR = 0x802069b0
+ SIOCSIFPARENT = 0x802069b2
+ SIOCSIFPRIORITY = 0x8020699b
+ SIOCSIFRDOMAIN = 0x8020699f
+ SIOCSIFRTLABEL = 0x80206982
+ SIOCSIFXFLAGS = 0x8020699d
+ SIOCSLIFPHYADDR = 0x8218694a
+ SIOCSLIFPHYDF = 0x802069c1
+ SIOCSLIFPHYECN = 0x802069c7
+ SIOCSLIFPHYRTABLE = 0x802069a1
+ SIOCSLIFPHYTTL = 0x802069a8
+ SIOCSPGRP = 0x80047308
+ SIOCSPWE3CTRLWORD = 0x802069dc
+ SIOCSPWE3FAT = 0x802069dd
+ SIOCSPWE3NEIGHBOR = 0x821869de
+ SIOCSRXHPRIO = 0x802069db
+ SIOCSSPPPPARAMS = 0x80206993
+ SIOCSTXHPRIO = 0x802069c5
+ SIOCSUMBPARAM = 0x802069bf
+ SIOCSVH = 0xc02069f5
+ SIOCSVNETFLOWID = 0x802069c3
+ SIOCSVNETID = 0x802069a6
+ SIOCSWGDPID = 0xc018695b
+ SIOCSWGMAXFLOW = 0xc0186960
+ SIOCSWGMAXGROUP = 0xc018695d
+ SIOCSWSDPID = 0x8018695c
+ SIOCSWSPORTNO = 0xc060695f
+ SOCK_CLOEXEC = 0x8000
+ SOCK_DGRAM = 0x2
+ SOCK_DNS = 0x1000
+ SOCK_NONBLOCK = 0x4000
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0xffff
+ SOMAXCONN = 0x80
+ SO_ACCEPTCONN = 0x2
+ SO_BINDANY = 0x1000
+ SO_BROADCAST = 0x20
+ SO_DEBUG = 0x1
+ SO_DOMAIN = 0x1024
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_NETPROC = 0x1020
+ SO_OOBINLINE = 0x100
+ SO_PEERCRED = 0x1022
+ SO_PROTOCOL = 0x1025
+ SO_RCVBUF = 0x1002
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RTABLE = 0x1021
+ SO_SNDBUF = 0x1001
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_SPLICE = 0x1023
+ SO_TIMESTAMP = 0x800
+ SO_TYPE = 0x1008
+ SO_USELOOPBACK = 0x40
+ SO_ZEROIZE = 0x2000
+ S_BLKSIZE = 0x200
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFLNK = 0xa000
+ S_IFMT = 0xf000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISTXT = 0x200
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXGRP = 0x8
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ TCIFLUSH = 0x1
+ TCIOFF = 0x3
+ TCIOFLUSH = 0x3
+ TCION = 0x4
+ TCOFLUSH = 0x2
+ TCOOFF = 0x1
+ TCOON = 0x2
+ TCP_MAXBURST = 0x4
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAX_SACK = 0x3
+ TCP_MAX_WINSHIFT = 0xe
+ TCP_MD5SIG = 0x4
+ TCP_MSS = 0x200
+ TCP_NODELAY = 0x1
+ TCP_NOPUSH = 0x10
+ TCP_SACKHOLE_LIMIT = 0x80
+ TCP_SACK_ENABLE = 0x8
+ TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
+ TIOCCBRK = 0x2000747a
+ TIOCCDTR = 0x20007478
+ TIOCCHKVERAUTH = 0x2000741e
+ TIOCCLRVERAUTH = 0x2000741d
+ TIOCCONS = 0x80047462
+ TIOCDRAIN = 0x2000745e
+ TIOCEXCL = 0x2000740d
+ TIOCEXT = 0x80047460
+ TIOCFLAG_CLOCAL = 0x2
+ TIOCFLAG_CRTSCTS = 0x4
+ TIOCFLAG_MDMBUF = 0x8
+ TIOCFLAG_PPS = 0x10
+ TIOCFLAG_SOFTCAR = 0x1
+ TIOCFLUSH = 0x80047410
+ TIOCGETA = 0x402c7413
+ TIOCGETD = 0x4004741a
+ TIOCGFLAGS = 0x4004745d
+ TIOCGPGRP = 0x40047477
+ TIOCGSID = 0x40047463
+ TIOCGTSTAMP = 0x4010745b
+ TIOCGWINSZ = 0x40087468
+ TIOCMBIC = 0x8004746b
+ TIOCMBIS = 0x8004746c
+ TIOCMGET = 0x4004746a
+ TIOCMODG = 0x4004746a
+ TIOCMODS = 0x8004746d
+ TIOCMSET = 0x8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_RTS = 0x4
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x80047470
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_IOCTL = 0x40
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIOCREMOTE = 0x80047469
+ TIOCSBRK = 0x2000747b
+ TIOCSCTTY = 0x20007461
+ TIOCSDTR = 0x20007479
+ TIOCSETA = 0x802c7414
+ TIOCSETAF = 0x802c7416
+ TIOCSETAW = 0x802c7415
+ TIOCSETD = 0x8004741b
+ TIOCSETVERAUTH = 0x8004741c
+ TIOCSFLAGS = 0x8004745c
+ TIOCSIG = 0x8004745f
+ TIOCSPGRP = 0x80047476
+ TIOCSTART = 0x2000746e
+ TIOCSTAT = 0x20007465
+ TIOCSTOP = 0x2000746f
+ TIOCSTSTAMP = 0x8008745a
+ TIOCSWINSZ = 0x80087467
+ TIOCUCNTL = 0x80047466
+ TIOCUCNTL_CBRK = 0x7a
+ TIOCUCNTL_SBRK = 0x7b
+ TOSTOP = 0x400000
+ UTIME_NOW = -0x2
+ UTIME_OMIT = -0x1
+ VDISCARD = 0xf
+ VDSUSP = 0xb
+ VEOF = 0x0
+ VEOL = 0x1
+ VEOL2 = 0x2
+ VERASE = 0x3
+ VINTR = 0x8
+ VKILL = 0x5
+ VLNEXT = 0xe
+ VMIN = 0x10
+ VM_ANONMIN = 0x7
+ VM_LOADAVG = 0x2
+ VM_MALLOC_CONF = 0xc
+ VM_MAXID = 0xd
+ VM_MAXSLP = 0xa
+ VM_METER = 0x1
+ VM_NKMEMPAGES = 0x6
+ VM_PSSTRINGS = 0x3
+ VM_SWAPENCRYPT = 0x5
+ VM_USPACE = 0xb
+ VM_UVMEXP = 0x4
+ VM_VNODEMIN = 0x9
+ VM_VTEXTMIN = 0x8
+ VQUIT = 0x9
+ VREPRINT = 0x6
+ VSTART = 0xc
+ VSTATUS = 0x12
+ VSTOP = 0xd
+ VSUSP = 0xa
+ VTIME = 0x11
+ VWERASE = 0x4
+ WALTSIG = 0x4
+ WCONTINUED = 0x8
+ WCOREFLAG = 0x80
+ WNOHANG = 0x1
+ WUNTRACED = 0x2
+ XCASE = 0x1000000
+)
+
+// Errors
+const (
+ E2BIG = syscall.Errno(0x7)
+ EACCES = syscall.Errno(0xd)
+ EADDRINUSE = syscall.Errno(0x30)
+ EADDRNOTAVAIL = syscall.Errno(0x31)
+ EAFNOSUPPORT = syscall.Errno(0x2f)
+ EAGAIN = syscall.Errno(0x23)
+ EALREADY = syscall.Errno(0x25)
+ EAUTH = syscall.Errno(0x50)
+ EBADF = syscall.Errno(0x9)
+ EBADMSG = syscall.Errno(0x5c)
+ EBADRPC = syscall.Errno(0x48)
+ EBUSY = syscall.Errno(0x10)
+ ECANCELED = syscall.Errno(0x58)
+ ECHILD = syscall.Errno(0xa)
+ ECONNABORTED = syscall.Errno(0x35)
+ ECONNREFUSED = syscall.Errno(0x3d)
+ ECONNRESET = syscall.Errno(0x36)
+ EDEADLK = syscall.Errno(0xb)
+ EDESTADDRREQ = syscall.Errno(0x27)
+ EDOM = syscall.Errno(0x21)
+ EDQUOT = syscall.Errno(0x45)
+ EEXIST = syscall.Errno(0x11)
+ EFAULT = syscall.Errno(0xe)
+ EFBIG = syscall.Errno(0x1b)
+ EFTYPE = syscall.Errno(0x4f)
+ EHOSTDOWN = syscall.Errno(0x40)
+ EHOSTUNREACH = syscall.Errno(0x41)
+ EIDRM = syscall.Errno(0x59)
+ EILSEQ = syscall.Errno(0x54)
+ EINPROGRESS = syscall.Errno(0x24)
+ EINTR = syscall.Errno(0x4)
+ EINVAL = syscall.Errno(0x16)
+ EIO = syscall.Errno(0x5)
+ EIPSEC = syscall.Errno(0x52)
+ EISCONN = syscall.Errno(0x38)
+ EISDIR = syscall.Errno(0x15)
+ ELAST = syscall.Errno(0x5f)
+ ELOOP = syscall.Errno(0x3e)
+ EMEDIUMTYPE = syscall.Errno(0x56)
+ EMFILE = syscall.Errno(0x18)
+ EMLINK = syscall.Errno(0x1f)
+ EMSGSIZE = syscall.Errno(0x28)
+ ENAMETOOLONG = syscall.Errno(0x3f)
+ ENEEDAUTH = syscall.Errno(0x51)
+ ENETDOWN = syscall.Errno(0x32)
+ ENETRESET = syscall.Errno(0x34)
+ ENETUNREACH = syscall.Errno(0x33)
+ ENFILE = syscall.Errno(0x17)
+ ENOATTR = syscall.Errno(0x53)
+ ENOBUFS = syscall.Errno(0x37)
+ ENODEV = syscall.Errno(0x13)
+ ENOENT = syscall.Errno(0x2)
+ ENOEXEC = syscall.Errno(0x8)
+ ENOLCK = syscall.Errno(0x4d)
+ ENOMEDIUM = syscall.Errno(0x55)
+ ENOMEM = syscall.Errno(0xc)
+ ENOMSG = syscall.Errno(0x5a)
+ ENOPROTOOPT = syscall.Errno(0x2a)
+ ENOSPC = syscall.Errno(0x1c)
+ ENOSYS = syscall.Errno(0x4e)
+ ENOTBLK = syscall.Errno(0xf)
+ ENOTCONN = syscall.Errno(0x39)
+ ENOTDIR = syscall.Errno(0x14)
+ ENOTEMPTY = syscall.Errno(0x42)
+ ENOTRECOVERABLE = syscall.Errno(0x5d)
+ ENOTSOCK = syscall.Errno(0x26)
+ ENOTSUP = syscall.Errno(0x5b)
+ ENOTTY = syscall.Errno(0x19)
+ ENXIO = syscall.Errno(0x6)
+ EOPNOTSUPP = syscall.Errno(0x2d)
+ EOVERFLOW = syscall.Errno(0x57)
+ EOWNERDEAD = syscall.Errno(0x5e)
+ EPERM = syscall.Errno(0x1)
+ EPFNOSUPPORT = syscall.Errno(0x2e)
+ EPIPE = syscall.Errno(0x20)
+ EPROCLIM = syscall.Errno(0x43)
+ EPROCUNAVAIL = syscall.Errno(0x4c)
+ EPROGMISMATCH = syscall.Errno(0x4b)
+ EPROGUNAVAIL = syscall.Errno(0x4a)
+ EPROTO = syscall.Errno(0x5f)
+ EPROTONOSUPPORT = syscall.Errno(0x2b)
+ EPROTOTYPE = syscall.Errno(0x29)
+ ERANGE = syscall.Errno(0x22)
+ EREMOTE = syscall.Errno(0x47)
+ EROFS = syscall.Errno(0x1e)
+ ERPCMISMATCH = syscall.Errno(0x49)
+ ESHUTDOWN = syscall.Errno(0x3a)
+ ESOCKTNOSUPPORT = syscall.Errno(0x2c)
+ ESPIPE = syscall.Errno(0x1d)
+ ESRCH = syscall.Errno(0x3)
+ ESTALE = syscall.Errno(0x46)
+ ETIMEDOUT = syscall.Errno(0x3c)
+ ETOOMANYREFS = syscall.Errno(0x3b)
+ ETXTBSY = syscall.Errno(0x1a)
+ EUSERS = syscall.Errno(0x44)
+ EWOULDBLOCK = syscall.Errno(0x23)
+ EXDEV = syscall.Errno(0x12)
+)
+
+// Signals
+const (
+ SIGABRT = syscall.Signal(0x6)
+ SIGALRM = syscall.Signal(0xe)
+ SIGBUS = syscall.Signal(0xa)
+ SIGCHLD = syscall.Signal(0x14)
+ SIGCONT = syscall.Signal(0x13)
+ SIGEMT = syscall.Signal(0x7)
+ SIGFPE = syscall.Signal(0x8)
+ SIGHUP = syscall.Signal(0x1)
+ SIGILL = syscall.Signal(0x4)
+ SIGINFO = syscall.Signal(0x1d)
+ SIGINT = syscall.Signal(0x2)
+ SIGIO = syscall.Signal(0x17)
+ SIGIOT = syscall.Signal(0x6)
+ SIGKILL = syscall.Signal(0x9)
+ SIGPIPE = syscall.Signal(0xd)
+ SIGPROF = syscall.Signal(0x1b)
+ SIGQUIT = syscall.Signal(0x3)
+ SIGSEGV = syscall.Signal(0xb)
+ SIGSTOP = syscall.Signal(0x11)
+ SIGSYS = syscall.Signal(0xc)
+ SIGTERM = syscall.Signal(0xf)
+ SIGTHR = syscall.Signal(0x20)
+ SIGTRAP = syscall.Signal(0x5)
+ SIGTSTP = syscall.Signal(0x12)
+ SIGTTIN = syscall.Signal(0x15)
+ SIGTTOU = syscall.Signal(0x16)
+ SIGURG = syscall.Signal(0x10)
+ SIGUSR1 = syscall.Signal(0x1e)
+ SIGUSR2 = syscall.Signal(0x1f)
+ SIGVTALRM = syscall.Signal(0x1a)
+ SIGWINCH = syscall.Signal(0x1c)
+ SIGXCPU = syscall.Signal(0x18)
+ SIGXFSZ = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+ num syscall.Errno
+ name string
+ desc string
+}{
+ {1, "EPERM", "operation not permitted"},
+ {2, "ENOENT", "no such file or directory"},
+ {3, "ESRCH", "no such process"},
+ {4, "EINTR", "interrupted system call"},
+ {5, "EIO", "input/output error"},
+ {6, "ENXIO", "device not configured"},
+ {7, "E2BIG", "argument list too long"},
+ {8, "ENOEXEC", "exec format error"},
+ {9, "EBADF", "bad file descriptor"},
+ {10, "ECHILD", "no child processes"},
+ {11, "EDEADLK", "resource deadlock avoided"},
+ {12, "ENOMEM", "cannot allocate memory"},
+ {13, "EACCES", "permission denied"},
+ {14, "EFAULT", "bad address"},
+ {15, "ENOTBLK", "block device required"},
+ {16, "EBUSY", "device busy"},
+ {17, "EEXIST", "file exists"},
+ {18, "EXDEV", "cross-device link"},
+ {19, "ENODEV", "operation not supported by device"},
+ {20, "ENOTDIR", "not a directory"},
+ {21, "EISDIR", "is a directory"},
+ {22, "EINVAL", "invalid argument"},
+ {23, "ENFILE", "too many open files in system"},
+ {24, "EMFILE", "too many open files"},
+ {25, "ENOTTY", "inappropriate ioctl for device"},
+ {26, "ETXTBSY", "text file busy"},
+ {27, "EFBIG", "file too large"},
+ {28, "ENOSPC", "no space left on device"},
+ {29, "ESPIPE", "illegal seek"},
+ {30, "EROFS", "read-only file system"},
+ {31, "EMLINK", "too many links"},
+ {32, "EPIPE", "broken pipe"},
+ {33, "EDOM", "numerical argument out of domain"},
+ {34, "ERANGE", "result too large"},
+ {35, "EAGAIN", "resource temporarily unavailable"},
+ {36, "EINPROGRESS", "operation now in progress"},
+ {37, "EALREADY", "operation already in progress"},
+ {38, "ENOTSOCK", "socket operation on non-socket"},
+ {39, "EDESTADDRREQ", "destination address required"},
+ {40, "EMSGSIZE", "message too long"},
+ {41, "EPROTOTYPE", "protocol wrong type for socket"},
+ {42, "ENOPROTOOPT", "protocol not available"},
+ {43, "EPROTONOSUPPORT", "protocol not supported"},
+ {44, "ESOCKTNOSUPPORT", "socket type not supported"},
+ {45, "EOPNOTSUPP", "operation not supported"},
+ {46, "EPFNOSUPPORT", "protocol family not supported"},
+ {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
+ {48, "EADDRINUSE", "address already in use"},
+ {49, "EADDRNOTAVAIL", "can't assign requested address"},
+ {50, "ENETDOWN", "network is down"},
+ {51, "ENETUNREACH", "network is unreachable"},
+ {52, "ENETRESET", "network dropped connection on reset"},
+ {53, "ECONNABORTED", "software caused connection abort"},
+ {54, "ECONNRESET", "connection reset by peer"},
+ {55, "ENOBUFS", "no buffer space available"},
+ {56, "EISCONN", "socket is already connected"},
+ {57, "ENOTCONN", "socket is not connected"},
+ {58, "ESHUTDOWN", "can't send after socket shutdown"},
+ {59, "ETOOMANYREFS", "too many references: can't splice"},
+ {60, "ETIMEDOUT", "operation timed out"},
+ {61, "ECONNREFUSED", "connection refused"},
+ {62, "ELOOP", "too many levels of symbolic links"},
+ {63, "ENAMETOOLONG", "file name too long"},
+ {64, "EHOSTDOWN", "host is down"},
+ {65, "EHOSTUNREACH", "no route to host"},
+ {66, "ENOTEMPTY", "directory not empty"},
+ {67, "EPROCLIM", "too many processes"},
+ {68, "EUSERS", "too many users"},
+ {69, "EDQUOT", "disk quota exceeded"},
+ {70, "ESTALE", "stale NFS file handle"},
+ {71, "EREMOTE", "too many levels of remote in path"},
+ {72, "EBADRPC", "RPC struct is bad"},
+ {73, "ERPCMISMATCH", "RPC version wrong"},
+ {74, "EPROGUNAVAIL", "RPC program not available"},
+ {75, "EPROGMISMATCH", "program version wrong"},
+ {76, "EPROCUNAVAIL", "bad procedure for program"},
+ {77, "ENOLCK", "no locks available"},
+ {78, "ENOSYS", "function not implemented"},
+ {79, "EFTYPE", "inappropriate file type or format"},
+ {80, "EAUTH", "authentication error"},
+ {81, "ENEEDAUTH", "need authenticator"},
+ {82, "EIPSEC", "IPsec processing failure"},
+ {83, "ENOATTR", "attribute not found"},
+ {84, "EILSEQ", "illegal byte sequence"},
+ {85, "ENOMEDIUM", "no medium found"},
+ {86, "EMEDIUMTYPE", "wrong medium type"},
+ {87, "EOVERFLOW", "value too large to be stored in data type"},
+ {88, "ECANCELED", "operation canceled"},
+ {89, "EIDRM", "identifier removed"},
+ {90, "ENOMSG", "no message of desired type"},
+ {91, "ENOTSUP", "not supported"},
+ {92, "EBADMSG", "bad message"},
+ {93, "ENOTRECOVERABLE", "state not recoverable"},
+ {94, "EOWNERDEAD", "previous owner died"},
+ {95, "ELAST", "protocol error"},
+}
+
+// Signal table
+var signalList = [...]struct {
+ num syscall.Signal
+ name string
+ desc string
+}{
+ {1, "SIGHUP", "hangup"},
+ {2, "SIGINT", "interrupt"},
+ {3, "SIGQUIT", "quit"},
+ {4, "SIGILL", "illegal instruction"},
+ {5, "SIGTRAP", "trace/BPT trap"},
+ {6, "SIGABRT", "abort trap"},
+ {7, "SIGEMT", "EMT trap"},
+ {8, "SIGFPE", "floating point exception"},
+ {9, "SIGKILL", "killed"},
+ {10, "SIGBUS", "bus error"},
+ {11, "SIGSEGV", "segmentation fault"},
+ {12, "SIGSYS", "bad system call"},
+ {13, "SIGPIPE", "broken pipe"},
+ {14, "SIGALRM", "alarm clock"},
+ {15, "SIGTERM", "terminated"},
+ {16, "SIGURG", "urgent I/O condition"},
+ {17, "SIGSTOP", "suspended (signal)"},
+ {18, "SIGTSTP", "suspended"},
+ {19, "SIGCONT", "continued"},
+ {20, "SIGCHLD", "child exited"},
+ {21, "SIGTTIN", "stopped (tty input)"},
+ {22, "SIGTTOU", "stopped (tty output)"},
+ {23, "SIGIO", "I/O possible"},
+ {24, "SIGXCPU", "cputime limit exceeded"},
+ {25, "SIGXFSZ", "filesize limit exceeded"},
+ {26, "SIGVTALRM", "virtual timer expired"},
+ {27, "SIGPROF", "profiling timer expired"},
+ {28, "SIGWINCH", "window size changes"},
+ {29, "SIGINFO", "information request"},
+ {30, "SIGUSR1", "user defined signal 1"},
+ {31, "SIGUSR2", "user defined signal 2"},
+ {32, "SIGTHR", "thread AST"},
+}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
index 46e054c..1afee6a 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
@@ -1,6 +1,7 @@
// mkerrors.sh -m64
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && solaris
// +build amd64,solaris
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
@@ -192,6 +193,12 @@ const (
CSTOPB = 0x40
CSUSP = 0x1a
CSWTCH = 0x1a
+ DIOC = 0x6400
+ DIOCGETB = 0x6402
+ DIOCGETC = 0x6401
+ DIOCGETP = 0x6408
+ DIOCSETE = 0x6403
+ DIOCSETP = 0x6409
DLT_AIRONET_HEADER = 0x78
DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
DLT_ARCNET = 0x7
@@ -290,6 +297,7 @@ const (
FF0 = 0x0
FF1 = 0x8000
FFDLY = 0x8000
+ FIORDCHK = 0x6603
FLUSHALL = 0x1
FLUSHDATA = 0x0
FLUSHO = 0x2000
@@ -358,6 +366,7 @@ const (
HUPCL = 0x400
IBSHIFT = 0x10
ICANON = 0x2
+ ICMP6_FILTER = 0x1
ICRNL = 0x100
IEXTEN = 0x8000
IFF_ADDRCONF = 0x80000
@@ -604,6 +613,7 @@ const (
IP_RECVPKTINFO = 0x1a
IP_RECVRETOPTS = 0x6
IP_RECVSLLA = 0xa
+ IP_RECVTOS = 0xc
IP_RECVTTL = 0xb
IP_RETOPTS = 0x8
IP_REUSEADDR = 0x104
@@ -645,6 +655,14 @@ const (
MAP_SHARED = 0x1
MAP_TEXT = 0x400
MAP_TYPE = 0xf
+ MCAST_BLOCK_SOURCE = 0x2b
+ MCAST_EXCLUDE = 0x2
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x29
+ MCAST_JOIN_SOURCE_GROUP = 0x2d
+ MCAST_LEAVE_GROUP = 0x2a
+ MCAST_LEAVE_SOURCE_GROUP = 0x2e
+ MCAST_UNBLOCK_SOURCE = 0x2c
MCL_CURRENT = 0x1
MCL_FUTURE = 0x2
MSG_CTRUNC = 0x10
@@ -653,6 +671,7 @@ const (
MSG_DUPCTRL = 0x800
MSG_EOR = 0x8
MSG_MAXIOVLEN = 0x10
+ MSG_NOSIGNAL = 0x200
MSG_NOTIFICATION = 0x100
MSG_OOB = 0x1
MSG_PEEK = 0x2
@@ -687,6 +706,8 @@ const (
O_APPEND = 0x8
O_CLOEXEC = 0x800000
O_CREAT = 0x100
+ O_DIRECT = 0x2000000
+ O_DIRECTORY = 0x1000000
O_DSYNC = 0x40
O_EXCL = 0x400
O_EXEC = 0x400000
@@ -725,7 +746,7 @@ const (
RLIMIT_FSIZE = 0x1
RLIMIT_NOFILE = 0x5
RLIMIT_STACK = 0x3
- RLIM_INFINITY = -0x3
+ RLIM_INFINITY = 0xfffffffffffffffd
RTAX_AUTHOR = 0x6
RTAX_BRD = 0x7
RTAX_DST = 0x0
@@ -1047,6 +1068,7 @@ const (
TCOON = 0x1
TCP_ABORT_THRESHOLD = 0x11
TCP_ANONPRIVBIND = 0x20
+ TCP_CONGESTION = 0x25
TCP_CONN_ABORT_THRESHOLD = 0x13
TCP_CONN_NOTIFY_THRESHOLD = 0x12
TCP_CORK = 0x18
@@ -1076,6 +1098,8 @@ const (
TCSETSF = 0x5410
TCSETSW = 0x540f
TCXONC = 0x5406
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
TIOC = 0x5400
TIOCCBRK = 0x747a
TIOCCDTR = 0x7478
diff --git a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
new file mode 100644
index 0000000..4e87b4b
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go
@@ -0,0 +1,838 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build zos && s390x
+// +build zos,s390x
+
+// Hand edited based on zerrors_linux_s390x.go
+// TODO: auto-generate.
+
+package unix
+
+const (
+ BRKINT = 0x0001
+ CLOCK_MONOTONIC = 0x1
+ CLOCK_PROCESS_CPUTIME_ID = 0x2
+ CLOCK_REALTIME = 0x0
+ CLOCK_THREAD_CPUTIME_ID = 0x3
+ CS8 = 0x0030
+ CSIZE = 0x0030
+ ECHO = 0x00000008
+ ECHONL = 0x00000001
+ FD_CLOEXEC = 0x01
+ FD_CLOFORK = 0x02
+ FNDELAY = 0x04
+ F_CLOSFD = 9
+ F_CONTROL_CVT = 13
+ F_DUPFD = 0
+ F_DUPFD2 = 8
+ F_GETFD = 1
+ F_GETFL = 259
+ F_GETLK = 5
+ F_GETOWN = 10
+ F_OK = 0x0
+ F_RDLCK = 1
+ F_SETFD = 2
+ F_SETFL = 4
+ F_SETLK = 6
+ F_SETLKW = 7
+ F_SETOWN = 11
+ F_SETTAG = 12
+ F_UNLCK = 3
+ F_WRLCK = 2
+ FSTYPE_ZFS = 0xe9 //"Z"
+ FSTYPE_HFS = 0xc8 //"H"
+ FSTYPE_NFS = 0xd5 //"N"
+ FSTYPE_TFS = 0xe3 //"T"
+ FSTYPE_AUTOMOUNT = 0xc1 //"A"
+ IP6F_MORE_FRAG = 0x0001
+ IP6F_OFF_MASK = 0xfff8
+ IP6F_RESERVED_MASK = 0x0006
+ IP6OPT_JUMBO = 0xc2
+ IP6OPT_JUMBO_LEN = 6
+ IP6OPT_MUTABLE = 0x20
+ IP6OPT_NSAP_ADDR = 0xc3
+ IP6OPT_PAD1 = 0x00
+ IP6OPT_PADN = 0x01
+ IP6OPT_ROUTER_ALERT = 0x05
+ IP6OPT_TUNNEL_LIMIT = 0x04
+ IP6OPT_TYPE_DISCARD = 0x40
+ IP6OPT_TYPE_FORCEICMP = 0x80
+ IP6OPT_TYPE_ICMP = 0xc0
+ IP6OPT_TYPE_SKIP = 0x00
+ IP6_ALERT_AN = 0x0002
+ IP6_ALERT_MLD = 0x0000
+ IP6_ALERT_RSVP = 0x0001
+ IPPORT_RESERVED = 1024
+ IPPORT_USERRESERVED = 5000
+ IPPROTO_AH = 51
+ IPPROTO_DSTOPTS = 60
+ IPPROTO_EGP = 8
+ IPPROTO_ESP = 50
+ IPPROTO_FRAGMENT = 44
+ IPPROTO_GGP = 2
+ IPPROTO_HOPOPTS = 0
+ IPPROTO_ICMP = 1
+ IPPROTO_ICMPV6 = 58
+ IPPROTO_IDP = 22
+ IPPROTO_IP = 0
+ IPPROTO_IPV6 = 41
+ IPPROTO_MAX = 256
+ IPPROTO_NONE = 59
+ IPPROTO_PUP = 12
+ IPPROTO_RAW = 255
+ IPPROTO_ROUTING = 43
+ IPPROTO_TCP = 6
+ IPPROTO_UDP = 17
+ IPV6_ADDR_PREFERENCES = 32
+ IPV6_CHECKSUM = 19
+ IPV6_DONTFRAG = 29
+ IPV6_DSTOPTS = 23
+ IPV6_HOPLIMIT = 11
+ IPV6_HOPOPTS = 22
+ IPV6_JOIN_GROUP = 5
+ IPV6_LEAVE_GROUP = 6
+ IPV6_MULTICAST_HOPS = 9
+ IPV6_MULTICAST_IF = 7
+ IPV6_MULTICAST_LOOP = 4
+ IPV6_NEXTHOP = 20
+ IPV6_PATHMTU = 12
+ IPV6_PKTINFO = 13
+ IPV6_PREFER_SRC_CGA = 0x10
+ IPV6_PREFER_SRC_COA = 0x02
+ IPV6_PREFER_SRC_HOME = 0x01
+ IPV6_PREFER_SRC_NONCGA = 0x20
+ IPV6_PREFER_SRC_PUBLIC = 0x08
+ IPV6_PREFER_SRC_TMP = 0x04
+ IPV6_RECVDSTOPTS = 28
+ IPV6_RECVHOPLIMIT = 14
+ IPV6_RECVHOPOPTS = 26
+ IPV6_RECVPATHMTU = 16
+ IPV6_RECVPKTINFO = 15
+ IPV6_RECVRTHDR = 25
+ IPV6_RECVTCLASS = 31
+ IPV6_RTHDR = 21
+ IPV6_RTHDRDSTOPTS = 24
+ IPV6_RTHDR_TYPE_0 = 0
+ IPV6_TCLASS = 30
+ IPV6_UNICAST_HOPS = 3
+ IPV6_USE_MIN_MTU = 18
+ IPV6_V6ONLY = 10
+ IP_ADD_MEMBERSHIP = 5
+ IP_ADD_SOURCE_MEMBERSHIP = 12
+ IP_BLOCK_SOURCE = 10
+ IP_DEFAULT_MULTICAST_LOOP = 1
+ IP_DEFAULT_MULTICAST_TTL = 1
+ IP_DROP_MEMBERSHIP = 6
+ IP_DROP_SOURCE_MEMBERSHIP = 13
+ IP_MAX_MEMBERSHIPS = 20
+ IP_MULTICAST_IF = 7
+ IP_MULTICAST_LOOP = 4
+ IP_MULTICAST_TTL = 3
+ IP_OPTIONS = 1
+ IP_PKTINFO = 101
+ IP_RECVPKTINFO = 102
+ IP_TOS = 2
+ IP_TTL = 3
+ IP_UNBLOCK_SOURCE = 11
+ ICANON = 0x0010
+ ICMP6_FILTER = 0x26
+ ICRNL = 0x0002
+ IEXTEN = 0x0020
+ IGNBRK = 0x0004
+ IGNCR = 0x0008
+ INLCR = 0x0020
+ ISIG = 0x0040
+ ISTRIP = 0x0080
+ IXON = 0x0200
+ IXOFF = 0x0100
+ LOCK_SH = 0x1 // Not exist on zOS
+ LOCK_EX = 0x2 // Not exist on zOS
+ LOCK_NB = 0x4 // Not exist on zOS
+ LOCK_UN = 0x8 // Not exist on zOS
+ POLLIN = 0x0003
+ POLLOUT = 0x0004
+ POLLPRI = 0x0010
+ POLLERR = 0x0020
+ POLLHUP = 0x0040
+ POLLNVAL = 0x0080
+ PROT_READ = 0x1 // mmap - page can be read
+ PROT_WRITE = 0x2 // page can be written
+ PROT_NONE = 0x4 // can't be accessed
+ PROT_EXEC = 0x8 // can be executed
+ MAP_PRIVATE = 0x1 // changes are private
+ MAP_SHARED = 0x2 // changes are shared
+ MAP_FIXED = 0x4 // place exactly
+ MCAST_JOIN_GROUP = 40
+ MCAST_LEAVE_GROUP = 41
+ MCAST_JOIN_SOURCE_GROUP = 42
+ MCAST_LEAVE_SOURCE_GROUP = 43
+ MCAST_BLOCK_SOURCE = 44
+ MCAST_UNBLOCK_SOURCE = 45
+ MS_SYNC = 0x1 // msync - synchronous writes
+ MS_ASYNC = 0x2 // asynchronous writes
+ MS_INVALIDATE = 0x4 // invalidate mappings
+ MTM_RDONLY = 0x80000000
+ MTM_RDWR = 0x40000000
+ MTM_UMOUNT = 0x10000000
+ MTM_IMMED = 0x08000000
+ MTM_FORCE = 0x04000000
+ MTM_DRAIN = 0x02000000
+ MTM_RESET = 0x01000000
+ MTM_SAMEMODE = 0x00100000
+ MTM_UNQSEFORCE = 0x00040000
+ MTM_NOSUID = 0x00000400
+ MTM_SYNCHONLY = 0x00000200
+ MTM_REMOUNT = 0x00000100
+ MTM_NOSECURITY = 0x00000080
+ O_ACCMODE = 0x03
+ O_APPEND = 0x08
+ O_ASYNCSIG = 0x0200
+ O_CREAT = 0x80
+ O_EXCL = 0x40
+ O_GETFL = 0x0F
+ O_LARGEFILE = 0x0400
+ O_NONBLOCK = 0x04
+ O_RDONLY = 0x02
+ O_RDWR = 0x03
+ O_SYNC = 0x0100
+ O_TRUNC = 0x10
+ O_WRONLY = 0x01
+ O_NOCTTY = 0x20
+ OPOST = 0x0001
+ ONLCR = 0x0004
+ PARENB = 0x0200
+ PARMRK = 0x0400
+ QUERYCVT = 3
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0 // RUSAGE_THREAD unsupported on z/OS
+ SEEK_CUR = 1
+ SEEK_END = 2
+ SEEK_SET = 0
+ SETAUTOCVTALL = 5
+ SETAUTOCVTON = 2
+ SETCVTALL = 4
+ SETCVTOFF = 0
+ SETCVTON = 1
+ AF_APPLETALK = 16
+ AF_CCITT = 10
+ AF_CHAOS = 5
+ AF_DATAKIT = 9
+ AF_DLI = 13
+ AF_ECMA = 8
+ AF_HYLINK = 15
+ AF_IMPLINK = 3
+ AF_INET = 2
+ AF_INET6 = 19
+ AF_INTF = 20
+ AF_IUCV = 17
+ AF_LAT = 14
+ AF_LINK = 18
+ AF_MAX = 30
+ AF_NBS = 7
+ AF_NDD = 23
+ AF_NETWARE = 22
+ AF_NS = 6
+ AF_PUP = 4
+ AF_RIF = 21
+ AF_ROUTE = 20
+ AF_SNA = 11
+ AF_UNIX = 1
+ AF_UNSPEC = 0
+ IBMTCP_IMAGE = 1
+ MSG_ACK_EXPECTED = 0x10
+ MSG_ACK_GEN = 0x40
+ MSG_ACK_TIMEOUT = 0x20
+ MSG_CONNTERM = 0x80
+ MSG_CTRUNC = 0x20
+ MSG_DONTROUTE = 0x4
+ MSG_EOF = 0x8000
+ MSG_EOR = 0x8
+ MSG_MAXIOVLEN = 16
+ MSG_NONBLOCK = 0x4000
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_TRUNC = 0x10
+ MSG_WAITALL = 0x40
+ PRIO_PROCESS = 1
+ PRIO_PGRP = 2
+ PRIO_USER = 3
+ RLIMIT_CPU = 0
+ RLIMIT_FSIZE = 1
+ RLIMIT_DATA = 2
+ RLIMIT_STACK = 3
+ RLIMIT_CORE = 4
+ RLIMIT_AS = 5
+ RLIMIT_NOFILE = 6
+ RLIMIT_MEMLIMIT = 7
+ RLIM_INFINITY = 2147483647
+ SCM_RIGHTS = 0x01
+ SF_CLOSE = 0x00000002
+ SF_REUSE = 0x00000001
+ SHUT_RD = 0
+ SHUT_RDWR = 2
+ SHUT_WR = 1
+ SOCK_CONN_DGRAM = 6
+ SOCK_DGRAM = 2
+ SOCK_RAW = 3
+ SOCK_RDM = 4
+ SOCK_SEQPACKET = 5
+ SOCK_STREAM = 1
+ SOL_SOCKET = 0xffff
+ SOMAXCONN = 10
+ SO_ACCEPTCONN = 0x0002
+ SO_ACCEPTECONNABORTED = 0x0006
+ SO_ACKNOW = 0x7700
+ SO_BROADCAST = 0x0020
+ SO_BULKMODE = 0x8000
+ SO_CKSUMRECV = 0x0800
+ SO_CLOSE = 0x01
+ SO_CLUSTERCONNTYPE = 0x00004001
+ SO_CLUSTERCONNTYPE_INTERNAL = 8
+ SO_CLUSTERCONNTYPE_NOCONN = 0
+ SO_CLUSTERCONNTYPE_NONE = 1
+ SO_CLUSTERCONNTYPE_SAME_CLUSTER = 2
+ SO_CLUSTERCONNTYPE_SAME_IMAGE = 4
+ SO_DEBUG = 0x0001
+ SO_DONTROUTE = 0x0010
+ SO_ERROR = 0x1007
+ SO_IGNOREINCOMINGPUSH = 0x1
+ SO_IGNORESOURCEVIPA = 0x0002
+ SO_KEEPALIVE = 0x0008
+ SO_LINGER = 0x0080
+ SO_NONBLOCKLOCAL = 0x8001
+ SO_NOREUSEADDR = 0x1000
+ SO_OOBINLINE = 0x0100
+ SO_OPTACK = 0x8004
+ SO_OPTMSS = 0x8003
+ SO_RCVBUF = 0x1002
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_REUSEADDR = 0x0004
+ SO_REUSEPORT = 0x0200
+ SO_SECINFO = 0x00004002
+ SO_SET = 0x0200
+ SO_SNDBUF = 0x1001
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_TYPE = 0x1008
+ SO_UNSET = 0x0400
+ SO_USELOOPBACK = 0x0040
+ SO_USE_IFBUFS = 0x0400
+ S_ISUID = 0x0800
+ S_ISGID = 0x0400
+ S_ISVTX = 0x0200
+ S_IRUSR = 0x0100
+ S_IWUSR = 0x0080
+ S_IXUSR = 0x0040
+ S_IRWXU = 0x01C0
+ S_IRGRP = 0x0020
+ S_IWGRP = 0x0010
+ S_IXGRP = 0x0008
+ S_IRWXG = 0x0038
+ S_IROTH = 0x0004
+ S_IWOTH = 0x0002
+ S_IXOTH = 0x0001
+ S_IRWXO = 0x0007
+ S_IREAD = S_IRUSR
+ S_IWRITE = S_IWUSR
+ S_IEXEC = S_IXUSR
+ S_IFDIR = 0x01000000
+ S_IFCHR = 0x02000000
+ S_IFREG = 0x03000000
+ S_IFFIFO = 0x04000000
+ S_IFIFO = 0x04000000
+ S_IFLNK = 0x05000000
+ S_IFBLK = 0x06000000
+ S_IFSOCK = 0x07000000
+ S_IFVMEXTL = 0xFE000000
+ S_IFVMEXTL_EXEC = 0x00010000
+ S_IFVMEXTL_DATA = 0x00020000
+ S_IFVMEXTL_MEL = 0x00030000
+ S_IFEXTL = 0x00000001
+ S_IFPROGCTL = 0x00000002
+ S_IFAPFCTL = 0x00000004
+ S_IFNOSHARE = 0x00000008
+ S_IFSHARELIB = 0x00000010
+ S_IFMT = 0xFF000000
+ S_IFMST = 0x00FF0000
+ TCP_KEEPALIVE = 0x8
+ TCP_NODELAY = 0x1
+ TIOCGWINSZ = 0x4008a368
+ TIOCSWINSZ = 0x8008a367
+ TIOCSBRK = 0x2000a77b
+ TIOCCBRK = 0x2000a77a
+ TIOCSTI = 0x8001a772
+ TIOCGPGRP = 0x4004a777 // _IOR(167, 119, int)
+ TCSANOW = 0
+ TCSETS = 0 // equivalent to TCSANOW for tcsetattr
+ TCSADRAIN = 1
+ TCSETSW = 1 // equivalent to TCSADRAIN for tcsetattr
+ TCSAFLUSH = 2
+ TCSETSF = 2 // equivalent to TCSAFLUSH for tcsetattr
+ TCGETS = 3 // not defined in ioctl.h -- zos golang only
+ TCIFLUSH = 0
+ TCOFLUSH = 1
+ TCIOFLUSH = 2
+ TCOOFF = 0
+ TCOON = 1
+ TCIOFF = 2
+ TCION = 3
+ TIOCSPGRP = 0x8004a776
+ TIOCNOTTY = 0x2000a771
+ TIOCEXCL = 0x2000a70d
+ TIOCNXCL = 0x2000a70e
+ TIOCGETD = 0x4004a700
+ TIOCSETD = 0x8004a701
+ TIOCPKT = 0x8004a770
+ TIOCSTOP = 0x2000a76f
+ TIOCSTART = 0x2000a76e
+ TIOCUCNTL = 0x8004a766
+ TIOCREMOTE = 0x8004a769
+ TIOCMGET = 0x4004a76a
+ TIOCMSET = 0x8004a76d
+ TIOCMBIC = 0x8004a76b
+ TIOCMBIS = 0x8004a76c
+ VINTR = 0
+ VQUIT = 1
+ VERASE = 2
+ VKILL = 3
+ VEOF = 4
+ VEOL = 5
+ VMIN = 6
+ VSTART = 7
+ VSTOP = 8
+ VSUSP = 9
+ VTIME = 10
+ WCONTINUED = 0x4
+ WNOHANG = 0x1
+ WUNTRACED = 0x2
+ _BPX_SWAP = 1
+ _BPX_NONSWAP = 2
+ MCL_CURRENT = 1 // for Linux compatibility -- no zos semantics
+ MCL_FUTURE = 2 // for Linux compatibility -- no zos semantics
+ MCL_ONFAULT = 3 // for Linux compatibility -- no zos semantics
+ MADV_NORMAL = 0 // for Linux compatibility -- no zos semantics
+ MADV_RANDOM = 1 // for Linux compatibility -- no zos semantics
+ MADV_SEQUENTIAL = 2 // for Linux compatibility -- no zos semantics
+ MADV_WILLNEED = 3 // for Linux compatibility -- no zos semantics
+ MADV_REMOVE = 4 // for Linux compatibility -- no zos semantics
+ MADV_DONTFORK = 5 // for Linux compatibility -- no zos semantics
+ MADV_DOFORK = 6 // for Linux compatibility -- no zos semantics
+ MADV_HWPOISON = 7 // for Linux compatibility -- no zos semantics
+ MADV_MERGEABLE = 8 // for Linux compatibility -- no zos semantics
+ MADV_UNMERGEABLE = 9 // for Linux compatibility -- no zos semantics
+ MADV_SOFT_OFFLINE = 10 // for Linux compatibility -- no zos semantics
+ MADV_HUGEPAGE = 11 // for Linux compatibility -- no zos semantics
+ MADV_NOHUGEPAGE = 12 // for Linux compatibility -- no zos semantics
+ MADV_DONTDUMP = 13 // for Linux compatibility -- no zos semantics
+ MADV_DODUMP = 14 // for Linux compatibility -- no zos semantics
+ MADV_FREE = 15 // for Linux compatibility -- no zos semantics
+ MADV_WIPEONFORK = 16 // for Linux compatibility -- no zos semantics
+ MADV_KEEPONFORK = 17 // for Linux compatibility -- no zos semantics
+ AT_SYMLINK_NOFOLLOW = 1 // for Unix compatibility -- no zos semantics
+ AT_FDCWD = 2 // for Unix compatibility -- no zos semantics
+)
+
+const (
+ EDOM = Errno(1)
+ ERANGE = Errno(2)
+ EACCES = Errno(111)
+ EAGAIN = Errno(112)
+ EBADF = Errno(113)
+ EBUSY = Errno(114)
+ ECHILD = Errno(115)
+ EDEADLK = Errno(116)
+ EEXIST = Errno(117)
+ EFAULT = Errno(118)
+ EFBIG = Errno(119)
+ EINTR = Errno(120)
+ EINVAL = Errno(121)
+ EIO = Errno(122)
+ EISDIR = Errno(123)
+ EMFILE = Errno(124)
+ EMLINK = Errno(125)
+ ENAMETOOLONG = Errno(126)
+ ENFILE = Errno(127)
+ ENODEV = Errno(128)
+ ENOENT = Errno(129)
+ ENOEXEC = Errno(130)
+ ENOLCK = Errno(131)
+ ENOMEM = Errno(132)
+ ENOSPC = Errno(133)
+ ENOSYS = Errno(134)
+ ENOTDIR = Errno(135)
+ ENOTEMPTY = Errno(136)
+ ENOTTY = Errno(137)
+ ENXIO = Errno(138)
+ EPERM = Errno(139)
+ EPIPE = Errno(140)
+ EROFS = Errno(141)
+ ESPIPE = Errno(142)
+ ESRCH = Errno(143)
+ EXDEV = Errno(144)
+ E2BIG = Errno(145)
+ ELOOP = Errno(146)
+ EILSEQ = Errno(147)
+ ENODATA = Errno(148)
+ EOVERFLOW = Errno(149)
+ EMVSNOTUP = Errno(150)
+ ECMSSTORAGE = Errno(151)
+ EMVSDYNALC = Errno(151)
+ EMVSCVAF = Errno(152)
+ EMVSCATLG = Errno(153)
+ ECMSINITIAL = Errno(156)
+ EMVSINITIAL = Errno(156)
+ ECMSERR = Errno(157)
+ EMVSERR = Errno(157)
+ EMVSPARM = Errno(158)
+ ECMSPFSFILE = Errno(159)
+ EMVSPFSFILE = Errno(159)
+ EMVSBADCHAR = Errno(160)
+ ECMSPFSPERM = Errno(162)
+ EMVSPFSPERM = Errno(162)
+ EMVSSAFEXTRERR = Errno(163)
+ EMVSSAF2ERR = Errno(164)
+ EMVSTODNOTSET = Errno(165)
+ EMVSPATHOPTS = Errno(166)
+ EMVSNORTL = Errno(167)
+ EMVSEXPIRE = Errno(168)
+ EMVSPASSWORD = Errno(169)
+ EMVSWLMERROR = Errno(170)
+ EMVSCPLERROR = Errno(171)
+ EMVSARMERROR = Errno(172)
+ ELENOFORK = Errno(200)
+ ELEMSGERR = Errno(201)
+ EFPMASKINV = Errno(202)
+ EFPMODEINV = Errno(203)
+ EBUFLEN = Errno(227)
+ EEXTLINK = Errno(228)
+ ENODD = Errno(229)
+ ECMSESMERR = Errno(230)
+ ECPERR = Errno(231)
+ ELEMULTITHREAD = Errno(232)
+ ELEFENCE = Errno(244)
+ EBADDATA = Errno(245)
+ EUNKNOWN = Errno(246)
+ ENOTSUP = Errno(247)
+ EBADNAME = Errno(248)
+ ENOTSAFE = Errno(249)
+ ELEMULTITHREADFORK = Errno(257)
+ ECUNNOENV = Errno(258)
+ ECUNNOCONV = Errno(259)
+ ECUNNOTALIGNED = Errno(260)
+ ECUNERR = Errno(262)
+ EIBMBADCALL = Errno(1000)
+ EIBMBADPARM = Errno(1001)
+ EIBMSOCKOUTOFRANGE = Errno(1002)
+ EIBMSOCKINUSE = Errno(1003)
+ EIBMIUCVERR = Errno(1004)
+ EOFFLOADboxERROR = Errno(1005)
+ EOFFLOADboxRESTART = Errno(1006)
+ EOFFLOADboxDOWN = Errno(1007)
+ EIBMCONFLICT = Errno(1008)
+ EIBMCANCELLED = Errno(1009)
+ EIBMBADTCPNAME = Errno(1011)
+ ENOTBLK = Errno(1100)
+ ETXTBSY = Errno(1101)
+ EWOULDBLOCK = Errno(1102)
+ EINPROGRESS = Errno(1103)
+ EALREADY = Errno(1104)
+ ENOTSOCK = Errno(1105)
+ EDESTADDRREQ = Errno(1106)
+ EMSGSIZE = Errno(1107)
+ EPROTOTYPE = Errno(1108)
+ ENOPROTOOPT = Errno(1109)
+ EPROTONOSUPPORT = Errno(1110)
+ ESOCKTNOSUPPORT = Errno(1111)
+ EOPNOTSUPP = Errno(1112)
+ EPFNOSUPPORT = Errno(1113)
+ EAFNOSUPPORT = Errno(1114)
+ EADDRINUSE = Errno(1115)
+ EADDRNOTAVAIL = Errno(1116)
+ ENETDOWN = Errno(1117)
+ ENETUNREACH = Errno(1118)
+ ENETRESET = Errno(1119)
+ ECONNABORTED = Errno(1120)
+ ECONNRESET = Errno(1121)
+ ENOBUFS = Errno(1122)
+ EISCONN = Errno(1123)
+ ENOTCONN = Errno(1124)
+ ESHUTDOWN = Errno(1125)
+ ETOOMANYREFS = Errno(1126)
+ ETIMEDOUT = Errno(1127)
+ ECONNREFUSED = Errno(1128)
+ EHOSTDOWN = Errno(1129)
+ EHOSTUNREACH = Errno(1130)
+ EPROCLIM = Errno(1131)
+ EUSERS = Errno(1132)
+ EDQUOT = Errno(1133)
+ ESTALE = Errno(1134)
+ EREMOTE = Errno(1135)
+ ENOSTR = Errno(1136)
+ ETIME = Errno(1137)
+ ENOSR = Errno(1138)
+ ENOMSG = Errno(1139)
+ EBADMSG = Errno(1140)
+ EIDRM = Errno(1141)
+ ENONET = Errno(1142)
+ ERREMOTE = Errno(1143)
+ ENOLINK = Errno(1144)
+ EADV = Errno(1145)
+ ESRMNT = Errno(1146)
+ ECOMM = Errno(1147)
+ EPROTO = Errno(1148)
+ EMULTIHOP = Errno(1149)
+ EDOTDOT = Errno(1150)
+ EREMCHG = Errno(1151)
+ ECANCELED = Errno(1152)
+ EINTRNODATA = Errno(1159)
+ ENOREUSE = Errno(1160)
+ ENOMOVE = Errno(1161)
+)
+
+// Signals
+const (
+ SIGHUP = Signal(1)
+ SIGINT = Signal(2)
+ SIGABRT = Signal(3)
+ SIGILL = Signal(4)
+ SIGPOLL = Signal(5)
+ SIGURG = Signal(6)
+ SIGSTOP = Signal(7)
+ SIGFPE = Signal(8)
+ SIGKILL = Signal(9)
+ SIGBUS = Signal(10)
+ SIGSEGV = Signal(11)
+ SIGSYS = Signal(12)
+ SIGPIPE = Signal(13)
+ SIGALRM = Signal(14)
+ SIGTERM = Signal(15)
+ SIGUSR1 = Signal(16)
+ SIGUSR2 = Signal(17)
+ SIGABND = Signal(18)
+ SIGCONT = Signal(19)
+ SIGCHLD = Signal(20)
+ SIGTTIN = Signal(21)
+ SIGTTOU = Signal(22)
+ SIGIO = Signal(23)
+ SIGQUIT = Signal(24)
+ SIGTSTP = Signal(25)
+ SIGTRAP = Signal(26)
+ SIGIOERR = Signal(27)
+ SIGWINCH = Signal(28)
+ SIGXCPU = Signal(29)
+ SIGXFSZ = Signal(30)
+ SIGVTALRM = Signal(31)
+ SIGPROF = Signal(32)
+ SIGDANGER = Signal(33)
+ SIGTHSTOP = Signal(34)
+ SIGTHCONT = Signal(35)
+ SIGTRACE = Signal(37)
+ SIGDCE = Signal(38)
+ SIGDUMP = Signal(39)
+)
+
+// Error table
+var errorList = [...]struct {
+ num Errno
+ name string
+ desc string
+}{
+ {1, "EDC5001I", "A domain error occurred."},
+ {2, "EDC5002I", "A range error occurred."},
+ {111, "EDC5111I", "Permission denied."},
+ {112, "EDC5112I", "Resource temporarily unavailable."},
+ {113, "EDC5113I", "Bad file descriptor."},
+ {114, "EDC5114I", "Resource busy."},
+ {115, "EDC5115I", "No child processes."},
+ {116, "EDC5116I", "Resource deadlock avoided."},
+ {117, "EDC5117I", "File exists."},
+ {118, "EDC5118I", "Incorrect address."},
+ {119, "EDC5119I", "File too large."},
+ {120, "EDC5120I", "Interrupted function call."},
+ {121, "EDC5121I", "Invalid argument."},
+ {122, "EDC5122I", "Input/output error."},
+ {123, "EDC5123I", "Is a directory."},
+ {124, "EDC5124I", "Too many open files."},
+ {125, "EDC5125I", "Too many links."},
+ {126, "EDC5126I", "Filename too long."},
+ {127, "EDC5127I", "Too many open files in system."},
+ {128, "EDC5128I", "No such device."},
+ {129, "EDC5129I", "No such file or directory."},
+ {130, "EDC5130I", "Exec format error."},
+ {131, "EDC5131I", "No locks available."},
+ {132, "EDC5132I", "Not enough memory."},
+ {133, "EDC5133I", "No space left on device."},
+ {134, "EDC5134I", "Function not implemented."},
+ {135, "EDC5135I", "Not a directory."},
+ {136, "EDC5136I", "Directory not empty."},
+ {137, "EDC5137I", "Inappropriate I/O control operation."},
+ {138, "EDC5138I", "No such device or address."},
+ {139, "EDC5139I", "Operation not permitted."},
+ {140, "EDC5140I", "Broken pipe."},
+ {141, "EDC5141I", "Read-only file system."},
+ {142, "EDC5142I", "Invalid seek."},
+ {143, "EDC5143I", "No such process."},
+ {144, "EDC5144I", "Improper link."},
+ {145, "EDC5145I", "The parameter list is too long, or the message to receive was too large for the buffer."},
+ {146, "EDC5146I", "Too many levels of symbolic links."},
+ {147, "EDC5147I", "Illegal byte sequence."},
+ {148, "", ""},
+ {149, "EDC5149I", "Value Overflow Error."},
+ {150, "EDC5150I", "UNIX System Services is not active."},
+ {151, "EDC5151I", "Dynamic allocation error."},
+ {152, "EDC5152I", "Common VTOC access facility (CVAF) error."},
+ {153, "EDC5153I", "Catalog obtain error."},
+ {156, "EDC5156I", "Process initialization error."},
+ {157, "EDC5157I", "An internal error has occurred."},
+ {158, "EDC5158I", "Bad parameters were passed to the service."},
+ {159, "EDC5159I", "The Physical File System encountered a permanent file error."},
+ {160, "EDC5160I", "Bad character in environment variable name."},
+ {162, "EDC5162I", "The Physical File System encountered a system error."},
+ {163, "EDC5163I", "SAF/RACF extract error."},
+ {164, "EDC5164I", "SAF/RACF error."},
+ {165, "EDC5165I", "System TOD clock not set."},
+ {166, "EDC5166I", "Access mode argument on function call conflicts with PATHOPTS parameter on JCL DD statement."},
+ {167, "EDC5167I", "Access to the UNIX System Services version of the C RTL is denied."},
+ {168, "EDC5168I", "Password has expired."},
+ {169, "EDC5169I", "Password is invalid."},
+ {170, "EDC5170I", "An error was encountered with WLM."},
+ {171, "EDC5171I", "An error was encountered with CPL."},
+ {172, "EDC5172I", "An error was encountered with Application Response Measurement (ARM) component."},
+ {200, "EDC5200I", "The application contains a Language Environment member language that cannot tolerate a fork()."},
+ {201, "EDC5201I", "The Language Environment message file was not found in the hierarchical file system."},
+ {202, "EDC5202E", "DLL facilities are not supported under SPC environment."},
+ {203, "EDC5203E", "DLL facilities are not supported under POSIX environment."},
+ {227, "EDC5227I", "Buffer is not long enough to contain a path definition"},
+ {228, "EDC5228I", "The file referred to is an external link"},
+ {229, "EDC5229I", "No path definition for ddname in effect"},
+ {230, "EDC5230I", "ESM error."},
+ {231, "EDC5231I", "CP or the external security manager had an error"},
+ {232, "EDC5232I", "The function failed because it was invoked from a multithread environment."},
+ {244, "EDC5244I", "The program, module or DLL is not supported in this environment."},
+ {245, "EDC5245I", "Data is not valid."},
+ {246, "EDC5246I", "Unknown system state."},
+ {247, "EDC5247I", "Operation not supported."},
+ {248, "EDC5248I", "The object name specified is not correct."},
+ {249, "EDC5249I", "The function is not allowed."},
+ {257, "EDC5257I", "Function cannot be called in the child process of a fork() from a multithreaded process until exec() is called."},
+ {258, "EDC5258I", "A CUN_RS_NO_UNI_ENV error was issued by Unicode Services."},
+ {259, "EDC5259I", "A CUN_RS_NO_CONVERSION error was issued by Unicode Services."},
+ {260, "EDC5260I", "A CUN_RS_TABLE_NOT_ALIGNED error was issued by Unicode Services."},
+ {262, "EDC5262I", "An iconv() function encountered an unexpected error while using Unicode Services."},
+ {1000, "EDC8000I", "A bad socket-call constant was found in the IUCV header."},
+ {1001, "EDC8001I", "An error was found in the IUCV header."},
+ {1002, "EDC8002I", "A socket descriptor is out of range."},
+ {1003, "EDC8003I", "A socket descriptor is in use."},
+ {1004, "EDC8004I", "Request failed because of an IUCV error."},
+ {1005, "EDC8005I", "Offload box error."},
+ {1006, "EDC8006I", "Offload box restarted."},
+ {1007, "EDC8007I", "Offload box down."},
+ {1008, "EDC8008I", "Already a conflicting call outstanding on socket."},
+ {1009, "EDC8009I", "Request cancelled using a SOCKcallCANCEL request."},
+ {1011, "EDC8011I", "A name of a PFS was specified that either is not configured or is not a Sockets PFS."},
+ {1100, "EDC8100I", "Block device required."},
+ {1101, "EDC8101I", "Text file busy."},
+ {1102, "EDC8102I", "Operation would block."},
+ {1103, "EDC8103I", "Operation now in progress."},
+ {1104, "EDC8104I", "Connection already in progress."},
+ {1105, "EDC8105I", "Socket operation on non-socket."},
+ {1106, "EDC8106I", "Destination address required."},
+ {1107, "EDC8107I", "Message too long."},
+ {1108, "EDC8108I", "Protocol wrong type for socket."},
+ {1109, "EDC8109I", "Protocol not available."},
+ {1110, "EDC8110I", "Protocol not supported."},
+ {1111, "EDC8111I", "Socket type not supported."},
+ {1112, "EDC8112I", "Operation not supported on socket."},
+ {1113, "EDC8113I", "Protocol family not supported."},
+ {1114, "EDC8114I", "Address family not supported."},
+ {1115, "EDC8115I", "Address already in use."},
+ {1116, "EDC8116I", "Address not available."},
+ {1117, "EDC8117I", "Network is down."},
+ {1118, "EDC8118I", "Network is unreachable."},
+ {1119, "EDC8119I", "Network dropped connection on reset."},
+ {1120, "EDC8120I", "Connection ended abnormally."},
+ {1121, "EDC8121I", "Connection reset."},
+ {1122, "EDC8122I", "No buffer space available."},
+ {1123, "EDC8123I", "Socket already connected."},
+ {1124, "EDC8124I", "Socket not connected."},
+ {1125, "EDC8125I", "Can't send after socket shutdown."},
+ {1126, "EDC8126I", "Too many references; can't splice."},
+ {1127, "EDC8127I", "Connection timed out."},
+ {1128, "EDC8128I", "Connection refused."},
+ {1129, "EDC8129I", "Host is not available."},
+ {1130, "EDC8130I", "Host cannot be reached."},
+ {1131, "EDC8131I", "Too many processes."},
+ {1132, "EDC8132I", "Too many users."},
+ {1133, "EDC8133I", "Disk quota exceeded."},
+ {1134, "EDC8134I", "Stale file handle."},
+ {1135, "", ""},
+ {1136, "EDC8136I", "File is not a STREAM."},
+ {1137, "EDC8137I", "STREAMS ioctl() timeout."},
+ {1138, "EDC8138I", "No STREAMS resources."},
+ {1139, "EDC8139I", "The message identified by set_id and msg_id is not in the message catalog."},
+ {1140, "EDC8140I", "Bad message."},
+ {1141, "EDC8141I", "Identifier removed."},
+ {1142, "", ""},
+ {1143, "", ""},
+ {1144, "EDC8144I", "The link has been severed."},
+ {1145, "", ""},
+ {1146, "", ""},
+ {1147, "", ""},
+ {1148, "EDC8148I", "Protocol error."},
+ {1149, "EDC8149I", "Multihop not allowed."},
+ {1150, "", ""},
+ {1151, "", ""},
+ {1152, "EDC8152I", "The asynchronous I/O request has been canceled."},
+ {1159, "EDC8159I", "Function call was interrupted before any data was received."},
+ {1160, "EDC8160I", "Socket reuse is not supported."},
+ {1161, "EDC8161I", "The file system cannot currently be moved."},
+}
+
+// Signal table
+var signalList = [...]struct {
+ num Signal
+ name string
+ desc string
+}{
+ {1, "SIGHUP", "hangup"},
+ {2, "SIGINT", "interrupt"},
+ {3, "SIGABT", "aborted"},
+ {4, "SIGILL", "illegal instruction"},
+ {5, "SIGPOLL", "pollable event"},
+ {6, "SIGURG", "urgent I/O condition"},
+ {7, "SIGSTOP", "stop process"},
+ {8, "SIGFPE", "floating point exception"},
+ {9, "SIGKILL", "killed"},
+ {10, "SIGBUS", "bus error"},
+ {11, "SIGSEGV", "segmentation fault"},
+ {12, "SIGSYS", "bad argument to routine"},
+ {13, "SIGPIPE", "broken pipe"},
+ {14, "SIGALRM", "alarm clock"},
+ {15, "SIGTERM", "terminated"},
+ {16, "SIGUSR1", "user defined signal 1"},
+ {17, "SIGUSR2", "user defined signal 2"},
+ {18, "SIGABND", "abend"},
+ {19, "SIGCONT", "continued"},
+ {20, "SIGCHLD", "child exited"},
+ {21, "SIGTTIN", "stopped (tty input)"},
+ {22, "SIGTTOU", "stopped (tty output)"},
+ {23, "SIGIO", "I/O possible"},
+ {24, "SIGQUIT", "quit"},
+ {25, "SIGTSTP", "stopped"},
+ {26, "SIGTRAP", "trace/breakpoint trap"},
+ {27, "SIGIOER", "I/O error"},
+ {28, "SIGWINCH", "window changed"},
+ {29, "SIGXCPU", "CPU time limit exceeded"},
+ {30, "SIGXFSZ", "file size limit exceeded"},
+ {31, "SIGVTALRM", "virtual timer expired"},
+ {32, "SIGPROF", "profiling timer expired"},
+ {33, "SIGDANGER", "danger"},
+ {34, "SIGTHSTOP", "stop thread"},
+ {35, "SIGTHCONT", "continue thread"},
+ {37, "SIGTRACE", "trace"},
+ {38, "", "DCE"},
+ {39, "SIGDUMP", "dump"},
+}
diff --git a/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go b/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go
index 89c5920..bd001a6 100644
--- a/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go
+++ b/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go
@@ -1,5 +1,6 @@
// Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT.
+//go:build linux && (arm || arm64)
// +build linux
// +build arm arm64
diff --git a/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go b/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go
index 24b841e..c34d063 100644
--- a/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go
+++ b/vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go
@@ -1,5 +1,6 @@
// Code generated by linux/mkall.go generatePtracePair("mips", "mips64"). DO NOT EDIT.
+//go:build linux && (mips || mips64)
// +build linux
// +build mips mips64
diff --git a/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go b/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go
index 47b0489..3ccf0c0 100644
--- a/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go
+++ b/vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go
@@ -1,5 +1,6 @@
// Code generated by linux/mkall.go generatePtracePair("mipsle", "mips64le"). DO NOT EDIT.
+//go:build linux && (mipsle || mips64le)
// +build linux
// +build mipsle mips64le
diff --git a/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go b/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
index ea5d9cb..7d65857 100644
--- a/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
+++ b/vendor/golang.org/x/sys/unix/zptrace_x86_linux.go
@@ -1,5 +1,6 @@
// Code generated by linux/mkall.go generatePtracePair("386", "amd64"). DO NOT EDIT.
+//go:build linux && (386 || amd64)
// +build linux
// +build 386 amd64
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
index ed657ff..91a23cc 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
@@ -1,6 +1,7 @@
// go run mksyscall_aix_ppc.go -aix -tags aix,ppc syscall_aix.go syscall_aix_ppc.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build aix && ppc
// +build aix,ppc
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
index 664b293..33c2609 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
@@ -1,6 +1,7 @@
// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build aix && ppc64
// +build aix,ppc64
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
index 4b3a8ad..8b737fa 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
@@ -1,8 +1,8 @@
// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
-// +build aix,ppc64
-// +build !gccgo
+//go:build aix && ppc64 && gc
+// +build aix,ppc64,gc
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
index cde4dbc..3c26091 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
@@ -1,8 +1,8 @@
// go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
-// +build aix,ppc64
-// +build gccgo
+//go:build aix && ppc64 && gccgo
+// +build aix,ppc64,gccgo
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go
index e263fbd..48a62e3 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -tags darwin,386,go1.13 syscall_darwin.1_13.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build darwin && 386 && go1.13
// +build darwin,386,go1.13
package unix
@@ -24,7 +25,6 @@ func closedir(dir uintptr) (err error) {
func libc_closedir_trampoline()
-//go:linkname libc_closedir libc_closedir
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -37,5 +37,4 @@ func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
func libc_readdir_r_trampoline()
-//go:linkname libc_readdir_r libc_readdir_r
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
index a3fc490..a266636 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -tags darwin,386,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build darwin && 386 && go1.12
// +build darwin,386,go1.12
package unix
@@ -25,7 +26,6 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
func libc_getgroups_trampoline()
-//go:linkname libc_getgroups libc_getgroups
//go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -40,7 +40,6 @@ func setgroups(ngid int, gid *_Gid_t) (err error) {
func libc_setgroups_trampoline()
-//go:linkname libc_setgroups libc_setgroups
//go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -56,7 +55,6 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
func libc_wait4_trampoline()
-//go:linkname libc_wait4 libc_wait4
//go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -72,7 +70,6 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
func libc_accept_trampoline()
-//go:linkname libc_accept libc_accept
//go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -87,7 +84,6 @@ func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
func libc_bind_trampoline()
-//go:linkname libc_bind libc_bind
//go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -102,7 +98,6 @@ func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
func libc_connect_trampoline()
-//go:linkname libc_connect libc_connect
//go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -118,7 +113,6 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
func libc_socket_trampoline()
-//go:linkname libc_socket libc_socket
//go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -133,7 +127,6 @@ func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen
func libc_getsockopt_trampoline()
-//go:linkname libc_getsockopt libc_getsockopt
//go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -148,7 +141,6 @@ func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr)
func libc_setsockopt_trampoline()
-//go:linkname libc_setsockopt libc_setsockopt
//go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -163,7 +155,6 @@ func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
func libc_getpeername_trampoline()
-//go:linkname libc_getpeername libc_getpeername
//go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -178,7 +169,6 @@ func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
func libc_getsockname_trampoline()
-//go:linkname libc_getsockname libc_getsockname
//go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -193,7 +183,6 @@ func Shutdown(s int, how int) (err error) {
func libc_shutdown_trampoline()
-//go:linkname libc_shutdown libc_shutdown
//go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -208,7 +197,6 @@ func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
func libc_socketpair_trampoline()
-//go:linkname libc_socketpair libc_socketpair
//go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -230,7 +218,6 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
func libc_recvfrom_trampoline()
-//go:linkname libc_recvfrom libc_recvfrom
//go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -251,7 +238,6 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
func libc_sendto_trampoline()
-//go:linkname libc_sendto libc_sendto
//go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -267,7 +253,6 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
func libc_recvmsg_trampoline()
-//go:linkname libc_recvmsg libc_recvmsg
//go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -283,7 +268,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
func libc_sendmsg_trampoline()
-//go:linkname libc_sendmsg libc_sendmsg
//go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -299,7 +283,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
func libc_kevent_trampoline()
-//go:linkname libc_kevent libc_kevent
//go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -319,7 +302,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
func libc_utimes_trampoline()
-//go:linkname libc_utimes libc_utimes
//go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -334,7 +316,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
func libc_futimes_trampoline()
-//go:linkname libc_futimes libc_futimes
//go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -350,7 +331,6 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
func libc_poll_trampoline()
-//go:linkname libc_poll libc_poll
//go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -371,7 +351,6 @@ func Madvise(b []byte, behav int) (err error) {
func libc_madvise_trampoline()
-//go:linkname libc_madvise libc_madvise
//go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -392,7 +371,6 @@ func Mlock(b []byte) (err error) {
func libc_mlock_trampoline()
-//go:linkname libc_mlock libc_mlock
//go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -407,7 +385,6 @@ func Mlockall(flags int) (err error) {
func libc_mlockall_trampoline()
-//go:linkname libc_mlockall libc_mlockall
//go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -428,7 +405,6 @@ func Mprotect(b []byte, prot int) (err error) {
func libc_mprotect_trampoline()
-//go:linkname libc_mprotect libc_mprotect
//go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -449,7 +425,6 @@ func Msync(b []byte, flags int) (err error) {
func libc_msync_trampoline()
-//go:linkname libc_msync libc_msync
//go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -470,7 +445,6 @@ func Munlock(b []byte) (err error) {
func libc_munlock_trampoline()
-//go:linkname libc_munlock libc_munlock
//go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -485,30 +459,12 @@ func Munlockall() (err error) {
func libc_munlockall_trampoline()
-//go:linkname libc_munlockall libc_munlockall
//go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
// 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) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
- r = int(r0)
- w = int(r1)
+func pipe(p *[2]int32) (err error) {
+ _, _, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -517,7 +473,6 @@ func pipe() (r int, w int, err error) {
func libc_pipe_trampoline()
-//go:linkname libc_pipe libc_pipe
//go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -543,7 +498,6 @@ func getxattr(path string, attr string, dest *byte, size int, position uint32, o
func libc_getxattr_trampoline()
-//go:linkname libc_getxattr libc_getxattr
//go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -564,7 +518,6 @@ func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, optio
func libc_fgetxattr_trampoline()
-//go:linkname libc_fgetxattr libc_fgetxattr
//go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -589,7 +542,6 @@ func setxattr(path string, attr string, data *byte, size int, position uint32, o
func libc_setxattr_trampoline()
-//go:linkname libc_setxattr libc_setxattr
//go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -609,7 +561,6 @@ func fsetxattr(fd int, attr string, data *byte, size int, position uint32, optio
func libc_fsetxattr_trampoline()
-//go:linkname libc_fsetxattr libc_fsetxattr
//go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -634,7 +585,6 @@ func removexattr(path string, attr string, options int) (err error) {
func libc_removexattr_trampoline()
-//go:linkname libc_removexattr libc_removexattr
//go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -654,7 +604,6 @@ func fremovexattr(fd int, attr string, options int) (err error) {
func libc_fremovexattr_trampoline()
-//go:linkname libc_fremovexattr libc_fremovexattr
//go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -675,7 +624,6 @@ func listxattr(path string, dest *byte, size int, options int) (sz int, err erro
func libc_listxattr_trampoline()
-//go:linkname libc_listxattr libc_listxattr
//go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -691,7 +639,6 @@ func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
func libc_flistxattr_trampoline()
-//go:linkname libc_flistxattr libc_flistxattr
//go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -706,7 +653,6 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
func libc_setattrlist_trampoline()
-//go:linkname libc_setattrlist libc_setattrlist
//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -722,7 +668,6 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
func libc_fcntl_trampoline()
-//go:linkname libc_fcntl libc_fcntl
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -737,7 +682,6 @@ func kill(pid int, signum int, posix int) (err error) {
func libc_kill_trampoline()
-//go:linkname libc_kill libc_kill
//go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -752,7 +696,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
func libc_ioctl_trampoline()
-//go:linkname libc_ioctl libc_ioctl
//go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -773,7 +716,6 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
func libc_sysctl_trampoline()
-//go:linkname libc_sysctl libc_sysctl
//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -788,7 +730,6 @@ func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer
func libc_sendfile_trampoline()
-//go:linkname libc_sendfile libc_sendfile
//go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -808,7 +749,6 @@ func Access(path string, mode uint32) (err error) {
func libc_access_trampoline()
-//go:linkname libc_access libc_access
//go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -823,7 +763,6 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
func libc_adjtime_trampoline()
-//go:linkname libc_adjtime libc_adjtime
//go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -843,7 +782,6 @@ func Chdir(path string) (err error) {
func libc_chdir_trampoline()
-//go:linkname libc_chdir libc_chdir
//go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -863,7 +801,6 @@ func Chflags(path string, flags int) (err error) {
func libc_chflags_trampoline()
-//go:linkname libc_chflags libc_chflags
//go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -883,7 +820,6 @@ func Chmod(path string, mode uint32) (err error) {
func libc_chmod_trampoline()
-//go:linkname libc_chmod libc_chmod
//go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -903,7 +839,6 @@ func Chown(path string, uid int, gid int) (err error) {
func libc_chown_trampoline()
-//go:linkname libc_chown libc_chown
//go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -923,7 +858,6 @@ func Chroot(path string) (err error) {
func libc_chroot_trampoline()
-//go:linkname libc_chroot libc_chroot
//go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -938,7 +872,6 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
func libc_clock_gettime_trampoline()
-//go:linkname libc_clock_gettime libc_clock_gettime
//go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -953,11 +886,58 @@ func Close(fd int) (err error) {
func libc_close_trampoline()
-//go:linkname libc_close libc_close
//go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Clonefile(src string, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(src)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(funcPC(libc_clonefile_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_clonefile_trampoline()
+
+//go:cgo_import_dynamic libc_clonefile clonefile "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(src)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(funcPC(libc_clonefileat_trampoline), uintptr(srcDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_clonefileat_trampoline()
+
+//go:cgo_import_dynamic libc_clonefileat clonefileat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Dup(fd int) (nfd int, err error) {
r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
nfd = int(r0)
@@ -969,7 +949,6 @@ func Dup(fd int) (nfd int, err error) {
func libc_dup_trampoline()
-//go:linkname libc_dup libc_dup
//go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -984,7 +963,6 @@ func Dup2(from int, to int) (err error) {
func libc_dup2_trampoline()
-//go:linkname libc_dup2 libc_dup2
//go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1009,7 +987,6 @@ func Exchangedata(path1 string, path2 string, options int) (err error) {
func libc_exchangedata_trampoline()
-//go:linkname libc_exchangedata libc_exchangedata
//go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1021,7 +998,6 @@ func Exit(code int) {
func libc_exit_trampoline()
-//go:linkname libc_exit libc_exit
//go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1041,7 +1017,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
func libc_faccessat_trampoline()
-//go:linkname libc_faccessat libc_faccessat
//go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1056,7 +1031,6 @@ func Fchdir(fd int) (err error) {
func libc_fchdir_trampoline()
-//go:linkname libc_fchdir libc_fchdir
//go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1071,7 +1045,6 @@ func Fchflags(fd int, flags int) (err error) {
func libc_fchflags_trampoline()
-//go:linkname libc_fchflags libc_fchflags
//go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1086,7 +1059,6 @@ func Fchmod(fd int, mode uint32) (err error) {
func libc_fchmod_trampoline()
-//go:linkname libc_fchmod libc_fchmod
//go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1106,7 +1078,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
func libc_fchmodat_trampoline()
-//go:linkname libc_fchmodat libc_fchmodat
//go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1121,7 +1092,6 @@ func Fchown(fd int, uid int, gid int) (err error) {
func libc_fchown_trampoline()
-//go:linkname libc_fchown libc_fchown
//go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1141,11 +1111,29 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
func libc_fchownat_trampoline()
-//go:linkname libc_fchownat libc_fchownat
//go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(funcPC(libc_fclonefileat_trampoline), uintptr(srcDirfd), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_fclonefileat_trampoline()
+
+//go:cgo_import_dynamic libc_fclonefileat fclonefileat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Flock(fd int, how int) (err error) {
_, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
if e1 != 0 {
@@ -1156,7 +1144,6 @@ func Flock(fd int, how int) (err error) {
func libc_flock_trampoline()
-//go:linkname libc_flock libc_flock
//go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1172,7 +1159,6 @@ func Fpathconf(fd int, name int) (val int, err error) {
func libc_fpathconf_trampoline()
-//go:linkname libc_fpathconf libc_fpathconf
//go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1187,7 +1173,6 @@ func Fsync(fd int) (err error) {
func libc_fsync_trampoline()
-//go:linkname libc_fsync libc_fsync
//go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1202,11 +1187,31 @@ func Ftruncate(fd int, length int64) (err error) {
func libc_ftruncate_trampoline()
-//go:linkname libc_ftruncate libc_ftruncate
//go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
// 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: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) {
r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
size = int(r0)
@@ -1215,7 +1220,6 @@ func Getdtablesize() (size int) {
func libc_getdtablesize_trampoline()
-//go:linkname libc_getdtablesize libc_getdtablesize
//go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1228,7 +1232,6 @@ func Getegid() (egid int) {
func libc_getegid_trampoline()
-//go:linkname libc_getegid libc_getegid
//go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1241,7 +1244,6 @@ func Geteuid() (uid int) {
func libc_geteuid_trampoline()
-//go:linkname libc_geteuid libc_geteuid
//go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1254,7 +1256,6 @@ func Getgid() (gid int) {
func libc_getgid_trampoline()
-//go:linkname libc_getgid libc_getgid
//go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1270,7 +1271,6 @@ func Getpgid(pid int) (pgid int, err error) {
func libc_getpgid_trampoline()
-//go:linkname libc_getpgid libc_getpgid
//go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1283,7 +1283,6 @@ func Getpgrp() (pgrp int) {
func libc_getpgrp_trampoline()
-//go:linkname libc_getpgrp libc_getpgrp
//go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1296,7 +1295,6 @@ func Getpid() (pid int) {
func libc_getpid_trampoline()
-//go:linkname libc_getpid libc_getpid
//go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1309,7 +1307,6 @@ func Getppid() (ppid int) {
func libc_getppid_trampoline()
-//go:linkname libc_getppid libc_getppid
//go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1325,7 +1322,6 @@ func Getpriority(which int, who int) (prio int, err error) {
func libc_getpriority_trampoline()
-//go:linkname libc_getpriority libc_getpriority
//go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1340,7 +1336,6 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
func libc_getrlimit_trampoline()
-//go:linkname libc_getrlimit libc_getrlimit
//go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1355,7 +1350,6 @@ func Getrusage(who int, rusage *Rusage) (err error) {
func libc_getrusage_trampoline()
-//go:linkname libc_getrusage libc_getrusage
//go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1371,11 +1365,24 @@ func Getsid(pid int) (sid int, err error) {
func libc_getsid_trampoline()
-//go:linkname libc_getsid libc_getsid
//go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Gettimeofday(tp *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_gettimeofday_trampoline()
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getuid() (uid int) {
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
uid = int(r0)
@@ -1384,7 +1391,6 @@ func Getuid() (uid int) {
func libc_getuid_trampoline()
-//go:linkname libc_getuid libc_getuid
//go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1397,7 +1403,6 @@ func Issetugid() (tainted bool) {
func libc_issetugid_trampoline()
-//go:linkname libc_issetugid libc_issetugid
//go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1413,7 +1418,6 @@ func Kqueue() (fd int, err error) {
func libc_kqueue_trampoline()
-//go:linkname libc_kqueue libc_kqueue
//go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1433,7 +1437,6 @@ func Lchown(path string, uid int, gid int) (err error) {
func libc_lchown_trampoline()
-//go:linkname libc_lchown libc_lchown
//go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1458,7 +1461,6 @@ func Link(path string, link string) (err error) {
func libc_link_trampoline()
-//go:linkname libc_link libc_link
//go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1483,7 +1485,6 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
func libc_linkat_trampoline()
-//go:linkname libc_linkat libc_linkat
//go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1498,7 +1499,6 @@ func Listen(s int, backlog int) (err error) {
func libc_listen_trampoline()
-//go:linkname libc_listen libc_listen
//go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1518,7 +1518,6 @@ func Mkdir(path string, mode uint32) (err error) {
func libc_mkdir_trampoline()
-//go:linkname libc_mkdir libc_mkdir
//go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1538,7 +1537,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
func libc_mkdirat_trampoline()
-//go:linkname libc_mkdirat libc_mkdirat
//go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1558,7 +1556,6 @@ func Mkfifo(path string, mode uint32) (err error) {
func libc_mkfifo_trampoline()
-//go:linkname libc_mkfifo libc_mkfifo
//go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1578,7 +1575,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
func libc_mknod_trampoline()
-//go:linkname libc_mknod libc_mknod
//go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1599,7 +1595,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
func libc_open_trampoline()
-//go:linkname libc_open libc_open
//go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1620,7 +1615,6 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
func libc_openat_trampoline()
-//go:linkname libc_openat libc_openat
//go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1641,7 +1635,6 @@ func Pathconf(path string, name int) (val int, err error) {
func libc_pathconf_trampoline()
-//go:linkname libc_pathconf libc_pathconf
//go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1663,7 +1656,6 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
func libc_pread_trampoline()
-//go:linkname libc_pread libc_pread
//go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1685,7 +1677,6 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
func libc_pwrite_trampoline()
-//go:linkname libc_pwrite libc_pwrite
//go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1707,7 +1698,6 @@ func read(fd int, p []byte) (n int, err error) {
func libc_read_trampoline()
-//go:linkname libc_read libc_read
//go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1734,7 +1724,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
func libc_readlink_trampoline()
-//go:linkname libc_readlink libc_readlink
//go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1761,7 +1750,6 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
func libc_readlinkat_trampoline()
-//go:linkname libc_readlinkat libc_readlinkat
//go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1786,7 +1774,6 @@ func Rename(from string, to string) (err error) {
func libc_rename_trampoline()
-//go:linkname libc_rename libc_rename
//go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1811,7 +1798,6 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
func libc_renameat_trampoline()
-//go:linkname libc_renameat libc_renameat
//go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1831,7 +1817,6 @@ func Revoke(path string) (err error) {
func libc_revoke_trampoline()
-//go:linkname libc_revoke libc_revoke
//go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1851,7 +1836,6 @@ func Rmdir(path string) (err error) {
func libc_rmdir_trampoline()
-//go:linkname libc_rmdir libc_rmdir
//go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1867,7 +1851,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
func libc_lseek_trampoline()
-//go:linkname libc_lseek libc_lseek
//go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1883,7 +1866,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
func libc_select_trampoline()
-//go:linkname libc_select libc_select
//go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1898,7 +1880,6 @@ func Setegid(egid int) (err error) {
func libc_setegid_trampoline()
-//go:linkname libc_setegid libc_setegid
//go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1913,7 +1894,6 @@ func Seteuid(euid int) (err error) {
func libc_seteuid_trampoline()
-//go:linkname libc_seteuid libc_seteuid
//go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1928,7 +1908,6 @@ func Setgid(gid int) (err error) {
func libc_setgid_trampoline()
-//go:linkname libc_setgid libc_setgid
//go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1948,7 +1927,6 @@ func Setlogin(name string) (err error) {
func libc_setlogin_trampoline()
-//go:linkname libc_setlogin libc_setlogin
//go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1963,7 +1941,6 @@ func Setpgid(pid int, pgid int) (err error) {
func libc_setpgid_trampoline()
-//go:linkname libc_setpgid libc_setpgid
//go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1978,7 +1955,6 @@ func Setpriority(which int, who int, prio int) (err error) {
func libc_setpriority_trampoline()
-//go:linkname libc_setpriority libc_setpriority
//go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1993,7 +1969,6 @@ func Setprivexec(flag int) (err error) {
func libc_setprivexec_trampoline()
-//go:linkname libc_setprivexec libc_setprivexec
//go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2008,7 +1983,6 @@ func Setregid(rgid int, egid int) (err error) {
func libc_setregid_trampoline()
-//go:linkname libc_setregid libc_setregid
//go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2023,7 +1997,6 @@ func Setreuid(ruid int, euid int) (err error) {
func libc_setreuid_trampoline()
-//go:linkname libc_setreuid libc_setreuid
//go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2038,7 +2011,6 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
func libc_setrlimit_trampoline()
-//go:linkname libc_setrlimit libc_setrlimit
//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2054,7 +2026,6 @@ func Setsid() (pid int, err error) {
func libc_setsid_trampoline()
-//go:linkname libc_setsid libc_setsid
//go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2069,7 +2040,6 @@ func Settimeofday(tp *Timeval) (err error) {
func libc_settimeofday_trampoline()
-//go:linkname libc_settimeofday libc_settimeofday
//go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2084,7 +2054,6 @@ func Setuid(uid int) (err error) {
func libc_setuid_trampoline()
-//go:linkname libc_setuid libc_setuid
//go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2109,7 +2078,6 @@ func Symlink(path string, link string) (err error) {
func libc_symlink_trampoline()
-//go:linkname libc_symlink libc_symlink
//go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2134,7 +2102,6 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
func libc_symlinkat_trampoline()
-//go:linkname libc_symlinkat libc_symlinkat
//go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2149,7 +2116,6 @@ func Sync() (err error) {
func libc_sync_trampoline()
-//go:linkname libc_sync libc_sync
//go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2169,7 +2135,6 @@ func Truncate(path string, length int64) (err error) {
func libc_truncate_trampoline()
-//go:linkname libc_truncate libc_truncate
//go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2182,7 +2147,6 @@ func Umask(newmask int) (oldmask int) {
func libc_umask_trampoline()
-//go:linkname libc_umask libc_umask
//go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2202,7 +2166,6 @@ func Undelete(path string) (err error) {
func libc_undelete_trampoline()
-//go:linkname libc_undelete libc_undelete
//go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2222,7 +2185,6 @@ func Unlink(path string) (err error) {
func libc_unlink_trampoline()
-//go:linkname libc_unlink libc_unlink
//go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2242,7 +2204,6 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
func libc_unlinkat_trampoline()
-//go:linkname libc_unlinkat libc_unlinkat
//go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2262,7 +2223,6 @@ func Unmount(path string, flags int) (err error) {
func libc_unmount_trampoline()
-//go:linkname libc_unmount libc_unmount
//go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2284,7 +2244,6 @@ func write(fd int, p []byte) (n int, err error) {
func libc_write_trampoline()
-//go:linkname libc_write libc_write
//go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2300,7 +2259,6 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
func libc_mmap_trampoline()
-//go:linkname libc_mmap libc_mmap
//go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2315,7 +2273,6 @@ func munmap(addr uintptr, length uintptr) (err error) {
func libc_munmap_trampoline()
-//go:linkname libc_munmap libc_munmap
//go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2342,38 +2299,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_ptrace_trampoline()
-
-//go:linkname libc_ptrace libc_ptrace
-//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int32(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_gettimeofday_trampoline()
-
-//go:linkname libc_gettimeofday libc_gettimeofday
-//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fstat(fd int, stat *Stat_t) (err error) {
_, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
@@ -2384,7 +2309,6 @@ func Fstat(fd int, stat *Stat_t) (err error) {
func libc_fstat64_trampoline()
-//go:linkname libc_fstat64 libc_fstat64
//go:cgo_import_dynamic libc_fstat64 fstat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2404,7 +2328,6 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
func libc_fstatat64_trampoline()
-//go:linkname libc_fstatat64 libc_fstatat64
//go:cgo_import_dynamic libc_fstatat64 fstatat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2419,7 +2342,6 @@ func Fstatfs(fd int, stat *Statfs_t) (err error) {
func libc_fstatfs64_trampoline()
-//go:linkname libc_fstatfs64 libc_fstatfs64
//go:cgo_import_dynamic libc_fstatfs64 fstatfs64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2435,7 +2357,6 @@ func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
func libc_getfsstat64_trampoline()
-//go:linkname libc_getfsstat64 libc_getfsstat64
//go:cgo_import_dynamic libc_getfsstat64 getfsstat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2455,11 +2376,24 @@ func Lstat(path string, stat *Stat_t) (err error) {
func libc_lstat64_trampoline()
-//go:linkname libc_lstat64 libc_lstat64
//go:cgo_import_dynamic libc_lstat64 lstat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
+ _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_ptrace_trampoline()
+
+//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Stat(path string, stat *Stat_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -2475,7 +2409,6 @@ func Stat(path string, stat *Stat_t) (err error) {
func libc_stat64_trampoline()
-//go:linkname libc_stat64 libc_stat64
//go:cgo_import_dynamic libc_stat64 stat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2495,5 +2428,4 @@ func Statfs(path string, stat *Statfs_t) (err error) {
func libc_statfs64_trampoline()
-//go:linkname libc_statfs64 libc_statfs64
//go:cgo_import_dynamic libc_statfs64 statfs64 "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
index 6836a41..1c53979 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.s
@@ -60,8 +60,6 @@ TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlock(SB)
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlockall(SB)
-TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getattrlist(SB)
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
@@ -110,6 +108,10 @@ TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
JMP libc_clock_gettime(SB)
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
JMP libc_close(SB)
+TEXT ·libc_clonefile_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_clonefile(SB)
+TEXT ·libc_clonefileat_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_clonefileat(SB)
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
JMP libc_dup(SB)
TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
@@ -132,6 +134,8 @@ TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
JMP libc_fchown(SB)
TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
JMP libc_fchownat(SB)
+TEXT ·libc_fclonefileat_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_fclonefileat(SB)
TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
JMP libc_flock(SB)
TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
@@ -140,6 +144,8 @@ TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
JMP libc_fsync(SB)
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
JMP libc_ftruncate(SB)
+TEXT ·libc_getcwd_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
JMP libc_getdtablesize(SB)
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
@@ -164,6 +170,8 @@ TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
JMP libc_getrusage(SB)
TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
JMP libc_getsid(SB)
+TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
JMP libc_getuid(SB)
TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
@@ -264,10 +272,6 @@ TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
JMP libc_mmap(SB)
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
JMP libc_munmap(SB)
-TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
- JMP libc_ptrace(SB)
-TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
- JMP libc_gettimeofday(SB)
TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
JMP libc_fstat64(SB)
TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
@@ -278,6 +282,8 @@ TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
JMP libc_getfsstat64(SB)
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
JMP libc_lstat64(SB)
+TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_ptrace(SB)
TEXT ·libc_stat64_trampoline(SB),NOSPLIT,$0-0
JMP libc_stat64(SB)
TEXT ·libc_statfs64_trampoline(SB),NOSPLIT,$0-0
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go
deleted file mode 100644
index f8e5c37..0000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_11.go
+++ /dev/null
@@ -1,1811 +0,0 @@
-// go run mksyscall.go -tags darwin,amd64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.1_11.go syscall_darwin_amd64.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-// +build darwin,amd64,!go1.12
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, behav int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func removexattr(path string, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fremovexattr(fd int, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
- r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(fromfd int, from string, tofd int, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
- newoffset = int64(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int64(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(buf), uintptr(size), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
index 314042a..e36299e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags darwin,amd64,go1.13 syscall_darwin.1_13.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build darwin && amd64 && go1.13
// +build darwin,amd64,go1.13
package unix
@@ -24,7 +25,6 @@ func closedir(dir uintptr) (err error) {
func libc_closedir_trampoline()
-//go:linkname libc_closedir libc_closedir
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -37,5 +37,4 @@ func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
func libc_readdir_r_trampoline()
-//go:linkname libc_readdir_r libc_readdir_r
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index 50d6437..f411162 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags darwin,amd64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build darwin && amd64 && go1.12
// +build darwin,amd64,go1.12
package unix
@@ -25,7 +26,6 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
func libc_getgroups_trampoline()
-//go:linkname libc_getgroups libc_getgroups
//go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -40,7 +40,6 @@ func setgroups(ngid int, gid *_Gid_t) (err error) {
func libc_setgroups_trampoline()
-//go:linkname libc_setgroups libc_setgroups
//go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -56,7 +55,6 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
func libc_wait4_trampoline()
-//go:linkname libc_wait4 libc_wait4
//go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -72,7 +70,6 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
func libc_accept_trampoline()
-//go:linkname libc_accept libc_accept
//go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -87,7 +84,6 @@ func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
func libc_bind_trampoline()
-//go:linkname libc_bind libc_bind
//go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -102,7 +98,6 @@ func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
func libc_connect_trampoline()
-//go:linkname libc_connect libc_connect
//go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -118,7 +113,6 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
func libc_socket_trampoline()
-//go:linkname libc_socket libc_socket
//go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -133,7 +127,6 @@ func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen
func libc_getsockopt_trampoline()
-//go:linkname libc_getsockopt libc_getsockopt
//go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -148,7 +141,6 @@ func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr)
func libc_setsockopt_trampoline()
-//go:linkname libc_setsockopt libc_setsockopt
//go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -163,7 +155,6 @@ func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
func libc_getpeername_trampoline()
-//go:linkname libc_getpeername libc_getpeername
//go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -178,7 +169,6 @@ func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
func libc_getsockname_trampoline()
-//go:linkname libc_getsockname libc_getsockname
//go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -193,7 +183,6 @@ func Shutdown(s int, how int) (err error) {
func libc_shutdown_trampoline()
-//go:linkname libc_shutdown libc_shutdown
//go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -208,7 +197,6 @@ func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
func libc_socketpair_trampoline()
-//go:linkname libc_socketpair libc_socketpair
//go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -230,7 +218,6 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
func libc_recvfrom_trampoline()
-//go:linkname libc_recvfrom libc_recvfrom
//go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -251,7 +238,6 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
func libc_sendto_trampoline()
-//go:linkname libc_sendto libc_sendto
//go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -267,7 +253,6 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
func libc_recvmsg_trampoline()
-//go:linkname libc_recvmsg libc_recvmsg
//go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -283,7 +268,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
func libc_sendmsg_trampoline()
-//go:linkname libc_sendmsg libc_sendmsg
//go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -299,7 +283,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
func libc_kevent_trampoline()
-//go:linkname libc_kevent libc_kevent
//go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -319,7 +302,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
func libc_utimes_trampoline()
-//go:linkname libc_utimes libc_utimes
//go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -334,7 +316,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
func libc_futimes_trampoline()
-//go:linkname libc_futimes libc_futimes
//go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -350,7 +331,6 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
func libc_poll_trampoline()
-//go:linkname libc_poll libc_poll
//go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -371,7 +351,6 @@ func Madvise(b []byte, behav int) (err error) {
func libc_madvise_trampoline()
-//go:linkname libc_madvise libc_madvise
//go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -392,7 +371,6 @@ func Mlock(b []byte) (err error) {
func libc_mlock_trampoline()
-//go:linkname libc_mlock libc_mlock
//go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -407,7 +385,6 @@ func Mlockall(flags int) (err error) {
func libc_mlockall_trampoline()
-//go:linkname libc_mlockall libc_mlockall
//go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -428,7 +405,6 @@ func Mprotect(b []byte, prot int) (err error) {
func libc_mprotect_trampoline()
-//go:linkname libc_mprotect libc_mprotect
//go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -449,7 +425,6 @@ func Msync(b []byte, flags int) (err error) {
func libc_msync_trampoline()
-//go:linkname libc_msync libc_msync
//go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -470,7 +445,6 @@ func Munlock(b []byte) (err error) {
func libc_munlock_trampoline()
-//go:linkname libc_munlock libc_munlock
//go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -485,30 +459,12 @@ func Munlockall() (err error) {
func libc_munlockall_trampoline()
-//go:linkname libc_munlockall libc_munlockall
//go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
// 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) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
- r = int(r0)
- w = int(r1)
+func pipe(p *[2]int32) (err error) {
+ _, _, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -517,7 +473,6 @@ func pipe() (r int, w int, err error) {
func libc_pipe_trampoline()
-//go:linkname libc_pipe libc_pipe
//go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -543,7 +498,6 @@ func getxattr(path string, attr string, dest *byte, size int, position uint32, o
func libc_getxattr_trampoline()
-//go:linkname libc_getxattr libc_getxattr
//go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -564,7 +518,6 @@ func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, optio
func libc_fgetxattr_trampoline()
-//go:linkname libc_fgetxattr libc_fgetxattr
//go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -589,7 +542,6 @@ func setxattr(path string, attr string, data *byte, size int, position uint32, o
func libc_setxattr_trampoline()
-//go:linkname libc_setxattr libc_setxattr
//go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -609,7 +561,6 @@ func fsetxattr(fd int, attr string, data *byte, size int, position uint32, optio
func libc_fsetxattr_trampoline()
-//go:linkname libc_fsetxattr libc_fsetxattr
//go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -634,7 +585,6 @@ func removexattr(path string, attr string, options int) (err error) {
func libc_removexattr_trampoline()
-//go:linkname libc_removexattr libc_removexattr
//go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -654,7 +604,6 @@ func fremovexattr(fd int, attr string, options int) (err error) {
func libc_fremovexattr_trampoline()
-//go:linkname libc_fremovexattr libc_fremovexattr
//go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -675,7 +624,6 @@ func listxattr(path string, dest *byte, size int, options int) (sz int, err erro
func libc_listxattr_trampoline()
-//go:linkname libc_listxattr libc_listxattr
//go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -691,7 +639,6 @@ func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
func libc_flistxattr_trampoline()
-//go:linkname libc_flistxattr libc_flistxattr
//go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -706,7 +653,6 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
func libc_setattrlist_trampoline()
-//go:linkname libc_setattrlist libc_setattrlist
//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -722,7 +668,6 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
func libc_fcntl_trampoline()
-//go:linkname libc_fcntl libc_fcntl
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -737,7 +682,6 @@ func kill(pid int, signum int, posix int) (err error) {
func libc_kill_trampoline()
-//go:linkname libc_kill libc_kill
//go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -752,7 +696,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
func libc_ioctl_trampoline()
-//go:linkname libc_ioctl libc_ioctl
//go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -773,7 +716,6 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
func libc_sysctl_trampoline()
-//go:linkname libc_sysctl libc_sysctl
//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -788,7 +730,6 @@ func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer
func libc_sendfile_trampoline()
-//go:linkname libc_sendfile libc_sendfile
//go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -808,7 +749,6 @@ func Access(path string, mode uint32) (err error) {
func libc_access_trampoline()
-//go:linkname libc_access libc_access
//go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -823,7 +763,6 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
func libc_adjtime_trampoline()
-//go:linkname libc_adjtime libc_adjtime
//go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -843,7 +782,6 @@ func Chdir(path string) (err error) {
func libc_chdir_trampoline()
-//go:linkname libc_chdir libc_chdir
//go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -863,7 +801,6 @@ func Chflags(path string, flags int) (err error) {
func libc_chflags_trampoline()
-//go:linkname libc_chflags libc_chflags
//go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -883,7 +820,6 @@ func Chmod(path string, mode uint32) (err error) {
func libc_chmod_trampoline()
-//go:linkname libc_chmod libc_chmod
//go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -903,7 +839,6 @@ func Chown(path string, uid int, gid int) (err error) {
func libc_chown_trampoline()
-//go:linkname libc_chown libc_chown
//go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -923,7 +858,6 @@ func Chroot(path string) (err error) {
func libc_chroot_trampoline()
-//go:linkname libc_chroot libc_chroot
//go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -938,7 +872,6 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
func libc_clock_gettime_trampoline()
-//go:linkname libc_clock_gettime libc_clock_gettime
//go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -953,11 +886,58 @@ func Close(fd int) (err error) {
func libc_close_trampoline()
-//go:linkname libc_close libc_close
//go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Clonefile(src string, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(src)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(funcPC(libc_clonefile_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_clonefile_trampoline()
+
+//go:cgo_import_dynamic libc_clonefile clonefile "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(src)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(funcPC(libc_clonefileat_trampoline), uintptr(srcDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_clonefileat_trampoline()
+
+//go:cgo_import_dynamic libc_clonefileat clonefileat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Dup(fd int) (nfd int, err error) {
r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
nfd = int(r0)
@@ -969,7 +949,6 @@ func Dup(fd int) (nfd int, err error) {
func libc_dup_trampoline()
-//go:linkname libc_dup libc_dup
//go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -984,7 +963,6 @@ func Dup2(from int, to int) (err error) {
func libc_dup2_trampoline()
-//go:linkname libc_dup2 libc_dup2
//go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1009,7 +987,6 @@ func Exchangedata(path1 string, path2 string, options int) (err error) {
func libc_exchangedata_trampoline()
-//go:linkname libc_exchangedata libc_exchangedata
//go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1021,7 +998,6 @@ func Exit(code int) {
func libc_exit_trampoline()
-//go:linkname libc_exit libc_exit
//go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1041,7 +1017,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
func libc_faccessat_trampoline()
-//go:linkname libc_faccessat libc_faccessat
//go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1056,7 +1031,6 @@ func Fchdir(fd int) (err error) {
func libc_fchdir_trampoline()
-//go:linkname libc_fchdir libc_fchdir
//go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1071,7 +1045,6 @@ func Fchflags(fd int, flags int) (err error) {
func libc_fchflags_trampoline()
-//go:linkname libc_fchflags libc_fchflags
//go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1086,7 +1059,6 @@ func Fchmod(fd int, mode uint32) (err error) {
func libc_fchmod_trampoline()
-//go:linkname libc_fchmod libc_fchmod
//go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1106,7 +1078,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
func libc_fchmodat_trampoline()
-//go:linkname libc_fchmodat libc_fchmodat
//go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1121,7 +1092,6 @@ func Fchown(fd int, uid int, gid int) (err error) {
func libc_fchown_trampoline()
-//go:linkname libc_fchown libc_fchown
//go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1141,11 +1111,29 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
func libc_fchownat_trampoline()
-//go:linkname libc_fchownat libc_fchownat
//go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(funcPC(libc_fclonefileat_trampoline), uintptr(srcDirfd), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_fclonefileat_trampoline()
+
+//go:cgo_import_dynamic libc_fclonefileat fclonefileat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Flock(fd int, how int) (err error) {
_, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
if e1 != 0 {
@@ -1156,7 +1144,6 @@ func Flock(fd int, how int) (err error) {
func libc_flock_trampoline()
-//go:linkname libc_flock libc_flock
//go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1172,7 +1159,6 @@ func Fpathconf(fd int, name int) (val int, err error) {
func libc_fpathconf_trampoline()
-//go:linkname libc_fpathconf libc_fpathconf
//go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1187,7 +1173,6 @@ func Fsync(fd int) (err error) {
func libc_fsync_trampoline()
-//go:linkname libc_fsync libc_fsync
//go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1202,11 +1187,31 @@ func Ftruncate(fd int, length int64) (err error) {
func libc_ftruncate_trampoline()
-//go:linkname libc_ftruncate libc_ftruncate
//go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
// 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: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) {
r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
size = int(r0)
@@ -1215,7 +1220,6 @@ func Getdtablesize() (size int) {
func libc_getdtablesize_trampoline()
-//go:linkname libc_getdtablesize libc_getdtablesize
//go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1228,7 +1232,6 @@ func Getegid() (egid int) {
func libc_getegid_trampoline()
-//go:linkname libc_getegid libc_getegid
//go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1241,7 +1244,6 @@ func Geteuid() (uid int) {
func libc_geteuid_trampoline()
-//go:linkname libc_geteuid libc_geteuid
//go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1254,7 +1256,6 @@ func Getgid() (gid int) {
func libc_getgid_trampoline()
-//go:linkname libc_getgid libc_getgid
//go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1270,7 +1271,6 @@ func Getpgid(pid int) (pgid int, err error) {
func libc_getpgid_trampoline()
-//go:linkname libc_getpgid libc_getpgid
//go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1283,7 +1283,6 @@ func Getpgrp() (pgrp int) {
func libc_getpgrp_trampoline()
-//go:linkname libc_getpgrp libc_getpgrp
//go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1296,7 +1295,6 @@ func Getpid() (pid int) {
func libc_getpid_trampoline()
-//go:linkname libc_getpid libc_getpid
//go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1309,7 +1307,6 @@ func Getppid() (ppid int) {
func libc_getppid_trampoline()
-//go:linkname libc_getppid libc_getppid
//go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1325,7 +1322,6 @@ func Getpriority(which int, who int) (prio int, err error) {
func libc_getpriority_trampoline()
-//go:linkname libc_getpriority libc_getpriority
//go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1340,7 +1336,6 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
func libc_getrlimit_trampoline()
-//go:linkname libc_getrlimit libc_getrlimit
//go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1355,7 +1350,6 @@ func Getrusage(who int, rusage *Rusage) (err error) {
func libc_getrusage_trampoline()
-//go:linkname libc_getrusage libc_getrusage
//go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1371,11 +1365,24 @@ func Getsid(pid int) (sid int, err error) {
func libc_getsid_trampoline()
-//go:linkname libc_getsid libc_getsid
//go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Gettimeofday(tp *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_gettimeofday_trampoline()
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getuid() (uid int) {
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
uid = int(r0)
@@ -1384,7 +1391,6 @@ func Getuid() (uid int) {
func libc_getuid_trampoline()
-//go:linkname libc_getuid libc_getuid
//go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1397,7 +1403,6 @@ func Issetugid() (tainted bool) {
func libc_issetugid_trampoline()
-//go:linkname libc_issetugid libc_issetugid
//go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1413,7 +1418,6 @@ func Kqueue() (fd int, err error) {
func libc_kqueue_trampoline()
-//go:linkname libc_kqueue libc_kqueue
//go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1433,7 +1437,6 @@ func Lchown(path string, uid int, gid int) (err error) {
func libc_lchown_trampoline()
-//go:linkname libc_lchown libc_lchown
//go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1458,7 +1461,6 @@ func Link(path string, link string) (err error) {
func libc_link_trampoline()
-//go:linkname libc_link libc_link
//go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1483,7 +1485,6 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
func libc_linkat_trampoline()
-//go:linkname libc_linkat libc_linkat
//go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1498,7 +1499,6 @@ func Listen(s int, backlog int) (err error) {
func libc_listen_trampoline()
-//go:linkname libc_listen libc_listen
//go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1518,7 +1518,6 @@ func Mkdir(path string, mode uint32) (err error) {
func libc_mkdir_trampoline()
-//go:linkname libc_mkdir libc_mkdir
//go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1538,7 +1537,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
func libc_mkdirat_trampoline()
-//go:linkname libc_mkdirat libc_mkdirat
//go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1558,7 +1556,6 @@ func Mkfifo(path string, mode uint32) (err error) {
func libc_mkfifo_trampoline()
-//go:linkname libc_mkfifo libc_mkfifo
//go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1578,7 +1575,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
func libc_mknod_trampoline()
-//go:linkname libc_mknod libc_mknod
//go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1599,7 +1595,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
func libc_open_trampoline()
-//go:linkname libc_open libc_open
//go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1620,7 +1615,6 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
func libc_openat_trampoline()
-//go:linkname libc_openat libc_openat
//go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1641,7 +1635,6 @@ func Pathconf(path string, name int) (val int, err error) {
func libc_pathconf_trampoline()
-//go:linkname libc_pathconf libc_pathconf
//go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1663,7 +1656,6 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
func libc_pread_trampoline()
-//go:linkname libc_pread libc_pread
//go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1685,7 +1677,6 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
func libc_pwrite_trampoline()
-//go:linkname libc_pwrite libc_pwrite
//go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1707,7 +1698,6 @@ func read(fd int, p []byte) (n int, err error) {
func libc_read_trampoline()
-//go:linkname libc_read libc_read
//go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1734,7 +1724,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
func libc_readlink_trampoline()
-//go:linkname libc_readlink libc_readlink
//go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1761,7 +1750,6 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
func libc_readlinkat_trampoline()
-//go:linkname libc_readlinkat libc_readlinkat
//go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1786,7 +1774,6 @@ func Rename(from string, to string) (err error) {
func libc_rename_trampoline()
-//go:linkname libc_rename libc_rename
//go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1811,7 +1798,6 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
func libc_renameat_trampoline()
-//go:linkname libc_renameat libc_renameat
//go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1831,7 +1817,6 @@ func Revoke(path string) (err error) {
func libc_revoke_trampoline()
-//go:linkname libc_revoke libc_revoke
//go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1851,7 +1836,6 @@ func Rmdir(path string) (err error) {
func libc_rmdir_trampoline()
-//go:linkname libc_rmdir libc_rmdir
//go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1867,7 +1851,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
func libc_lseek_trampoline()
-//go:linkname libc_lseek libc_lseek
//go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1883,7 +1866,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
func libc_select_trampoline()
-//go:linkname libc_select libc_select
//go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1898,7 +1880,6 @@ func Setegid(egid int) (err error) {
func libc_setegid_trampoline()
-//go:linkname libc_setegid libc_setegid
//go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1913,7 +1894,6 @@ func Seteuid(euid int) (err error) {
func libc_seteuid_trampoline()
-//go:linkname libc_seteuid libc_seteuid
//go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1928,7 +1908,6 @@ func Setgid(gid int) (err error) {
func libc_setgid_trampoline()
-//go:linkname libc_setgid libc_setgid
//go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1948,7 +1927,6 @@ func Setlogin(name string) (err error) {
func libc_setlogin_trampoline()
-//go:linkname libc_setlogin libc_setlogin
//go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1963,7 +1941,6 @@ func Setpgid(pid int, pgid int) (err error) {
func libc_setpgid_trampoline()
-//go:linkname libc_setpgid libc_setpgid
//go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1978,7 +1955,6 @@ func Setpriority(which int, who int, prio int) (err error) {
func libc_setpriority_trampoline()
-//go:linkname libc_setpriority libc_setpriority
//go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1993,7 +1969,6 @@ func Setprivexec(flag int) (err error) {
func libc_setprivexec_trampoline()
-//go:linkname libc_setprivexec libc_setprivexec
//go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2008,7 +1983,6 @@ func Setregid(rgid int, egid int) (err error) {
func libc_setregid_trampoline()
-//go:linkname libc_setregid libc_setregid
//go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2023,7 +1997,6 @@ func Setreuid(ruid int, euid int) (err error) {
func libc_setreuid_trampoline()
-//go:linkname libc_setreuid libc_setreuid
//go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2038,7 +2011,6 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
func libc_setrlimit_trampoline()
-//go:linkname libc_setrlimit libc_setrlimit
//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2054,7 +2026,6 @@ func Setsid() (pid int, err error) {
func libc_setsid_trampoline()
-//go:linkname libc_setsid libc_setsid
//go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2069,7 +2040,6 @@ func Settimeofday(tp *Timeval) (err error) {
func libc_settimeofday_trampoline()
-//go:linkname libc_settimeofday libc_settimeofday
//go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2084,7 +2054,6 @@ func Setuid(uid int) (err error) {
func libc_setuid_trampoline()
-//go:linkname libc_setuid libc_setuid
//go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2109,7 +2078,6 @@ func Symlink(path string, link string) (err error) {
func libc_symlink_trampoline()
-//go:linkname libc_symlink libc_symlink
//go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2134,7 +2102,6 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
func libc_symlinkat_trampoline()
-//go:linkname libc_symlinkat libc_symlinkat
//go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2149,7 +2116,6 @@ func Sync() (err error) {
func libc_sync_trampoline()
-//go:linkname libc_sync libc_sync
//go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2169,7 +2135,6 @@ func Truncate(path string, length int64) (err error) {
func libc_truncate_trampoline()
-//go:linkname libc_truncate libc_truncate
//go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2182,7 +2147,6 @@ func Umask(newmask int) (oldmask int) {
func libc_umask_trampoline()
-//go:linkname libc_umask libc_umask
//go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2202,7 +2166,6 @@ func Undelete(path string) (err error) {
func libc_undelete_trampoline()
-//go:linkname libc_undelete libc_undelete
//go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2222,7 +2185,6 @@ func Unlink(path string) (err error) {
func libc_unlink_trampoline()
-//go:linkname libc_unlink libc_unlink
//go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2242,7 +2204,6 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
func libc_unlinkat_trampoline()
-//go:linkname libc_unlinkat libc_unlinkat
//go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2262,7 +2223,6 @@ func Unmount(path string, flags int) (err error) {
func libc_unmount_trampoline()
-//go:linkname libc_unmount libc_unmount
//go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2284,7 +2244,6 @@ func write(fd int, p []byte) (n int, err error) {
func libc_write_trampoline()
-//go:linkname libc_write libc_write
//go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2300,7 +2259,6 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
func libc_mmap_trampoline()
-//go:linkname libc_mmap libc_mmap
//go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2315,7 +2273,6 @@ func munmap(addr uintptr, length uintptr) (err error) {
func libc_munmap_trampoline()
-//go:linkname libc_munmap libc_munmap
//go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2342,38 +2299,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_ptrace_trampoline()
-
-//go:linkname libc_ptrace libc_ptrace
-//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int64(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_gettimeofday_trampoline()
-
-//go:linkname libc_gettimeofday libc_gettimeofday
-//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fstat(fd int, stat *Stat_t) (err error) {
_, _, e1 := syscall_syscall(funcPC(libc_fstat64_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
@@ -2384,7 +2309,6 @@ func Fstat(fd int, stat *Stat_t) (err error) {
func libc_fstat64_trampoline()
-//go:linkname libc_fstat64 libc_fstat64
//go:cgo_import_dynamic libc_fstat64 fstat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2404,7 +2328,6 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
func libc_fstatat64_trampoline()
-//go:linkname libc_fstatat64 libc_fstatat64
//go:cgo_import_dynamic libc_fstatat64 fstatat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2419,7 +2342,6 @@ func Fstatfs(fd int, stat *Statfs_t) (err error) {
func libc_fstatfs64_trampoline()
-//go:linkname libc_fstatfs64 libc_fstatfs64
//go:cgo_import_dynamic libc_fstatfs64 fstatfs64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2435,7 +2357,6 @@ func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
func libc_getfsstat64_trampoline()
-//go:linkname libc_getfsstat64 libc_getfsstat64
//go:cgo_import_dynamic libc_getfsstat64 getfsstat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2455,11 +2376,24 @@ func Lstat(path string, stat *Stat_t) (err error) {
func libc_lstat64_trampoline()
-//go:linkname libc_lstat64 libc_lstat64
//go:cgo_import_dynamic libc_lstat64 lstat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
+ _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_ptrace_trampoline()
+
+//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Stat(path string, stat *Stat_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -2475,7 +2409,6 @@ func Stat(path string, stat *Stat_t) (err error) {
func libc_stat64_trampoline()
-//go:linkname libc_stat64 libc_stat64
//go:cgo_import_dynamic libc_stat64 stat64 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2495,5 +2428,4 @@ func Statfs(path string, stat *Statfs_t) (err error) {
func libc_statfs64_trampoline()
-//go:linkname libc_statfs64 libc_statfs64
//go:cgo_import_dynamic libc_statfs64 statfs64 "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
index a3fdf09..c77bd6e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
@@ -60,8 +60,6 @@ TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlock(SB)
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlockall(SB)
-TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getattrlist(SB)
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
@@ -110,6 +108,10 @@ TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
JMP libc_clock_gettime(SB)
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
JMP libc_close(SB)
+TEXT ·libc_clonefile_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_clonefile(SB)
+TEXT ·libc_clonefileat_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_clonefileat(SB)
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
JMP libc_dup(SB)
TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
@@ -132,6 +134,8 @@ TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
JMP libc_fchown(SB)
TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
JMP libc_fchownat(SB)
+TEXT ·libc_fclonefileat_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_fclonefileat(SB)
TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
JMP libc_flock(SB)
TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
@@ -140,6 +144,8 @@ TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
JMP libc_fsync(SB)
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
JMP libc_ftruncate(SB)
+TEXT ·libc_getcwd_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
JMP libc_getdtablesize(SB)
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
@@ -164,6 +170,8 @@ TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
JMP libc_getrusage(SB)
TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
JMP libc_getsid(SB)
+TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
JMP libc_getuid(SB)
TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
@@ -264,10 +272,6 @@ TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
JMP libc_mmap(SB)
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
JMP libc_munmap(SB)
-TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
- JMP libc_ptrace(SB)
-TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
- JMP libc_gettimeofday(SB)
TEXT ·libc_fstat64_trampoline(SB),NOSPLIT,$0-0
JMP libc_fstat64(SB)
TEXT ·libc_fstatat64_trampoline(SB),NOSPLIT,$0-0
@@ -278,6 +282,8 @@ TEXT ·libc_getfsstat64_trampoline(SB),NOSPLIT,$0-0
JMP libc_getfsstat64(SB)
TEXT ·libc_lstat64_trampoline(SB),NOSPLIT,$0-0
JMP libc_lstat64(SB)
+TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_ptrace(SB)
TEXT ·libc_stat64_trampoline(SB),NOSPLIT,$0-0
JMP libc_stat64(SB)
TEXT ·libc_statfs64_trampoline(SB),NOSPLIT,$0-0
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go
deleted file mode 100644
index cea04e0..0000000
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_11.go
+++ /dev/null
@@ -1,1784 +0,0 @@
-// go run mksyscall.go -l32 -tags darwin,arm,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm.1_11.go syscall_darwin_arm.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-// +build darwin,arm,!go1.12
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, behav int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func removexattr(path string, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fremovexattr(fd int, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
- r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(fromfd int, from string, tofd int, to string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(from)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(to)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
- ret = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int32(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(buf), uintptr(size), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go
index f519ce9..ed437f8 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -tags darwin,arm,go1.13 syscall_darwin.1_13.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build darwin && arm && go1.13
// +build darwin,arm,go1.13
package unix
@@ -24,7 +25,6 @@ func closedir(dir uintptr) (err error) {
func libc_closedir_trampoline()
-//go:linkname libc_closedir libc_closedir
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -37,5 +37,4 @@ func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
func libc_readdir_r_trampoline()
-//go:linkname libc_readdir_r libc_readdir_r
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
index 6310395..7f88cb5 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -tags darwin,arm,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build darwin && arm && go1.12
// +build darwin,arm,go1.12
package unix
@@ -25,7 +26,6 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
func libc_getgroups_trampoline()
-//go:linkname libc_getgroups libc_getgroups
//go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -40,7 +40,6 @@ func setgroups(ngid int, gid *_Gid_t) (err error) {
func libc_setgroups_trampoline()
-//go:linkname libc_setgroups libc_setgroups
//go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -56,7 +55,6 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
func libc_wait4_trampoline()
-//go:linkname libc_wait4 libc_wait4
//go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -72,7 +70,6 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
func libc_accept_trampoline()
-//go:linkname libc_accept libc_accept
//go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -87,7 +84,6 @@ func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
func libc_bind_trampoline()
-//go:linkname libc_bind libc_bind
//go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -102,7 +98,6 @@ func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
func libc_connect_trampoline()
-//go:linkname libc_connect libc_connect
//go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -118,7 +113,6 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
func libc_socket_trampoline()
-//go:linkname libc_socket libc_socket
//go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -133,7 +127,6 @@ func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen
func libc_getsockopt_trampoline()
-//go:linkname libc_getsockopt libc_getsockopt
//go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -148,7 +141,6 @@ func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr)
func libc_setsockopt_trampoline()
-//go:linkname libc_setsockopt libc_setsockopt
//go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -163,7 +155,6 @@ func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
func libc_getpeername_trampoline()
-//go:linkname libc_getpeername libc_getpeername
//go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -178,7 +169,6 @@ func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
func libc_getsockname_trampoline()
-//go:linkname libc_getsockname libc_getsockname
//go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -193,7 +183,6 @@ func Shutdown(s int, how int) (err error) {
func libc_shutdown_trampoline()
-//go:linkname libc_shutdown libc_shutdown
//go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -208,7 +197,6 @@ func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
func libc_socketpair_trampoline()
-//go:linkname libc_socketpair libc_socketpair
//go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -230,7 +218,6 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
func libc_recvfrom_trampoline()
-//go:linkname libc_recvfrom libc_recvfrom
//go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -251,7 +238,6 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
func libc_sendto_trampoline()
-//go:linkname libc_sendto libc_sendto
//go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -267,7 +253,6 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
func libc_recvmsg_trampoline()
-//go:linkname libc_recvmsg libc_recvmsg
//go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -283,7 +268,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
func libc_sendmsg_trampoline()
-//go:linkname libc_sendmsg libc_sendmsg
//go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -299,7 +283,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
func libc_kevent_trampoline()
-//go:linkname libc_kevent libc_kevent
//go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -319,7 +302,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
func libc_utimes_trampoline()
-//go:linkname libc_utimes libc_utimes
//go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -334,7 +316,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
func libc_futimes_trampoline()
-//go:linkname libc_futimes libc_futimes
//go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -350,7 +331,6 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
func libc_poll_trampoline()
-//go:linkname libc_poll libc_poll
//go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -371,7 +351,6 @@ func Madvise(b []byte, behav int) (err error) {
func libc_madvise_trampoline()
-//go:linkname libc_madvise libc_madvise
//go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -392,7 +371,6 @@ func Mlock(b []byte) (err error) {
func libc_mlock_trampoline()
-//go:linkname libc_mlock libc_mlock
//go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -407,7 +385,6 @@ func Mlockall(flags int) (err error) {
func libc_mlockall_trampoline()
-//go:linkname libc_mlockall libc_mlockall
//go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -428,7 +405,6 @@ func Mprotect(b []byte, prot int) (err error) {
func libc_mprotect_trampoline()
-//go:linkname libc_mprotect libc_mprotect
//go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -449,7 +425,6 @@ func Msync(b []byte, flags int) (err error) {
func libc_msync_trampoline()
-//go:linkname libc_msync libc_msync
//go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -470,7 +445,6 @@ func Munlock(b []byte) (err error) {
func libc_munlock_trampoline()
-//go:linkname libc_munlock libc_munlock
//go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -485,30 +459,12 @@ func Munlockall() (err error) {
func libc_munlockall_trampoline()
-//go:linkname libc_munlockall libc_munlockall
//go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
// 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) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
- r = int(r0)
- w = int(r1)
+func pipe(p *[2]int32) (err error) {
+ _, _, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -517,7 +473,6 @@ func pipe() (r int, w int, err error) {
func libc_pipe_trampoline()
-//go:linkname libc_pipe libc_pipe
//go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -543,7 +498,6 @@ func getxattr(path string, attr string, dest *byte, size int, position uint32, o
func libc_getxattr_trampoline()
-//go:linkname libc_getxattr libc_getxattr
//go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -564,7 +518,6 @@ func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, optio
func libc_fgetxattr_trampoline()
-//go:linkname libc_fgetxattr libc_fgetxattr
//go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -589,7 +542,6 @@ func setxattr(path string, attr string, data *byte, size int, position uint32, o
func libc_setxattr_trampoline()
-//go:linkname libc_setxattr libc_setxattr
//go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -609,7 +561,6 @@ func fsetxattr(fd int, attr string, data *byte, size int, position uint32, optio
func libc_fsetxattr_trampoline()
-//go:linkname libc_fsetxattr libc_fsetxattr
//go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -634,7 +585,6 @@ func removexattr(path string, attr string, options int) (err error) {
func libc_removexattr_trampoline()
-//go:linkname libc_removexattr libc_removexattr
//go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -654,7 +604,6 @@ func fremovexattr(fd int, attr string, options int) (err error) {
func libc_fremovexattr_trampoline()
-//go:linkname libc_fremovexattr libc_fremovexattr
//go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -675,7 +624,6 @@ func listxattr(path string, dest *byte, size int, options int) (sz int, err erro
func libc_listxattr_trampoline()
-//go:linkname libc_listxattr libc_listxattr
//go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -691,7 +639,6 @@ func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
func libc_flistxattr_trampoline()
-//go:linkname libc_flistxattr libc_flistxattr
//go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -706,7 +653,6 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
func libc_setattrlist_trampoline()
-//go:linkname libc_setattrlist libc_setattrlist
//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -722,7 +668,6 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
func libc_fcntl_trampoline()
-//go:linkname libc_fcntl libc_fcntl
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -737,7 +682,6 @@ func kill(pid int, signum int, posix int) (err error) {
func libc_kill_trampoline()
-//go:linkname libc_kill libc_kill
//go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -752,7 +696,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
func libc_ioctl_trampoline()
-//go:linkname libc_ioctl libc_ioctl
//go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -773,7 +716,6 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
func libc_sysctl_trampoline()
-//go:linkname libc_sysctl libc_sysctl
//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -788,7 +730,6 @@ func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer
func libc_sendfile_trampoline()
-//go:linkname libc_sendfile libc_sendfile
//go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -808,7 +749,6 @@ func Access(path string, mode uint32) (err error) {
func libc_access_trampoline()
-//go:linkname libc_access libc_access
//go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -823,7 +763,6 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
func libc_adjtime_trampoline()
-//go:linkname libc_adjtime libc_adjtime
//go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -843,7 +782,6 @@ func Chdir(path string) (err error) {
func libc_chdir_trampoline()
-//go:linkname libc_chdir libc_chdir
//go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -863,7 +801,6 @@ func Chflags(path string, flags int) (err error) {
func libc_chflags_trampoline()
-//go:linkname libc_chflags libc_chflags
//go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -883,7 +820,6 @@ func Chmod(path string, mode uint32) (err error) {
func libc_chmod_trampoline()
-//go:linkname libc_chmod libc_chmod
//go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -903,7 +839,6 @@ func Chown(path string, uid int, gid int) (err error) {
func libc_chown_trampoline()
-//go:linkname libc_chown libc_chown
//go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -923,7 +858,6 @@ func Chroot(path string) (err error) {
func libc_chroot_trampoline()
-//go:linkname libc_chroot libc_chroot
//go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -938,7 +872,6 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
func libc_clock_gettime_trampoline()
-//go:linkname libc_clock_gettime libc_clock_gettime
//go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -953,11 +886,58 @@ func Close(fd int) (err error) {
func libc_close_trampoline()
-//go:linkname libc_close libc_close
//go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Clonefile(src string, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(src)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(funcPC(libc_clonefile_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_clonefile_trampoline()
+
+//go:cgo_import_dynamic libc_clonefile clonefile "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(src)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(funcPC(libc_clonefileat_trampoline), uintptr(srcDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_clonefileat_trampoline()
+
+//go:cgo_import_dynamic libc_clonefileat clonefileat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Dup(fd int) (nfd int, err error) {
r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
nfd = int(r0)
@@ -969,7 +949,6 @@ func Dup(fd int) (nfd int, err error) {
func libc_dup_trampoline()
-//go:linkname libc_dup libc_dup
//go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -984,7 +963,6 @@ func Dup2(from int, to int) (err error) {
func libc_dup2_trampoline()
-//go:linkname libc_dup2 libc_dup2
//go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1009,7 +987,6 @@ func Exchangedata(path1 string, path2 string, options int) (err error) {
func libc_exchangedata_trampoline()
-//go:linkname libc_exchangedata libc_exchangedata
//go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1021,7 +998,6 @@ func Exit(code int) {
func libc_exit_trampoline()
-//go:linkname libc_exit libc_exit
//go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1041,7 +1017,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
func libc_faccessat_trampoline()
-//go:linkname libc_faccessat libc_faccessat
//go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1056,7 +1031,6 @@ func Fchdir(fd int) (err error) {
func libc_fchdir_trampoline()
-//go:linkname libc_fchdir libc_fchdir
//go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1071,7 +1045,6 @@ func Fchflags(fd int, flags int) (err error) {
func libc_fchflags_trampoline()
-//go:linkname libc_fchflags libc_fchflags
//go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1086,7 +1059,6 @@ func Fchmod(fd int, mode uint32) (err error) {
func libc_fchmod_trampoline()
-//go:linkname libc_fchmod libc_fchmod
//go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1106,7 +1078,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
func libc_fchmodat_trampoline()
-//go:linkname libc_fchmodat libc_fchmodat
//go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1121,7 +1092,6 @@ func Fchown(fd int, uid int, gid int) (err error) {
func libc_fchown_trampoline()
-//go:linkname libc_fchown libc_fchown
//go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1141,11 +1111,29 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
func libc_fchownat_trampoline()
-//go:linkname libc_fchownat libc_fchownat
//go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(funcPC(libc_fclonefileat_trampoline), uintptr(srcDirfd), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_fclonefileat_trampoline()
+
+//go:cgo_import_dynamic libc_fclonefileat fclonefileat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Flock(fd int, how int) (err error) {
_, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
if e1 != 0 {
@@ -1156,7 +1144,6 @@ func Flock(fd int, how int) (err error) {
func libc_flock_trampoline()
-//go:linkname libc_flock libc_flock
//go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1172,7 +1159,6 @@ func Fpathconf(fd int, name int) (val int, err error) {
func libc_fpathconf_trampoline()
-//go:linkname libc_fpathconf libc_fpathconf
//go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1187,7 +1173,6 @@ func Fsync(fd int) (err error) {
func libc_fsync_trampoline()
-//go:linkname libc_fsync libc_fsync
//go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1202,11 +1187,31 @@ func Ftruncate(fd int, length int64) (err error) {
func libc_ftruncate_trampoline()
-//go:linkname libc_ftruncate libc_ftruncate
//go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
// 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: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) {
r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
size = int(r0)
@@ -1215,7 +1220,6 @@ func Getdtablesize() (size int) {
func libc_getdtablesize_trampoline()
-//go:linkname libc_getdtablesize libc_getdtablesize
//go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1228,7 +1232,6 @@ func Getegid() (egid int) {
func libc_getegid_trampoline()
-//go:linkname libc_getegid libc_getegid
//go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1241,7 +1244,6 @@ func Geteuid() (uid int) {
func libc_geteuid_trampoline()
-//go:linkname libc_geteuid libc_geteuid
//go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1254,7 +1256,6 @@ func Getgid() (gid int) {
func libc_getgid_trampoline()
-//go:linkname libc_getgid libc_getgid
//go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1270,7 +1271,6 @@ func Getpgid(pid int) (pgid int, err error) {
func libc_getpgid_trampoline()
-//go:linkname libc_getpgid libc_getpgid
//go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1283,7 +1283,6 @@ func Getpgrp() (pgrp int) {
func libc_getpgrp_trampoline()
-//go:linkname libc_getpgrp libc_getpgrp
//go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1296,7 +1295,6 @@ func Getpid() (pid int) {
func libc_getpid_trampoline()
-//go:linkname libc_getpid libc_getpid
//go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1309,7 +1307,6 @@ func Getppid() (ppid int) {
func libc_getppid_trampoline()
-//go:linkname libc_getppid libc_getppid
//go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1325,7 +1322,6 @@ func Getpriority(which int, who int) (prio int, err error) {
func libc_getpriority_trampoline()
-//go:linkname libc_getpriority libc_getpriority
//go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1340,7 +1336,6 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
func libc_getrlimit_trampoline()
-//go:linkname libc_getrlimit libc_getrlimit
//go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1355,7 +1350,6 @@ func Getrusage(who int, rusage *Rusage) (err error) {
func libc_getrusage_trampoline()
-//go:linkname libc_getrusage libc_getrusage
//go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1371,11 +1365,24 @@ func Getsid(pid int) (sid int, err error) {
func libc_getsid_trampoline()
-//go:linkname libc_getsid libc_getsid
//go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Gettimeofday(tp *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_gettimeofday_trampoline()
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getuid() (uid int) {
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
uid = int(r0)
@@ -1384,7 +1391,6 @@ func Getuid() (uid int) {
func libc_getuid_trampoline()
-//go:linkname libc_getuid libc_getuid
//go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1397,7 +1403,6 @@ func Issetugid() (tainted bool) {
func libc_issetugid_trampoline()
-//go:linkname libc_issetugid libc_issetugid
//go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1413,7 +1418,6 @@ func Kqueue() (fd int, err error) {
func libc_kqueue_trampoline()
-//go:linkname libc_kqueue libc_kqueue
//go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1433,7 +1437,6 @@ func Lchown(path string, uid int, gid int) (err error) {
func libc_lchown_trampoline()
-//go:linkname libc_lchown libc_lchown
//go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1458,7 +1461,6 @@ func Link(path string, link string) (err error) {
func libc_link_trampoline()
-//go:linkname libc_link libc_link
//go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1483,7 +1485,6 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
func libc_linkat_trampoline()
-//go:linkname libc_linkat libc_linkat
//go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1498,7 +1499,6 @@ func Listen(s int, backlog int) (err error) {
func libc_listen_trampoline()
-//go:linkname libc_listen libc_listen
//go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1518,7 +1518,6 @@ func Mkdir(path string, mode uint32) (err error) {
func libc_mkdir_trampoline()
-//go:linkname libc_mkdir libc_mkdir
//go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1538,7 +1537,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
func libc_mkdirat_trampoline()
-//go:linkname libc_mkdirat libc_mkdirat
//go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1558,7 +1556,6 @@ func Mkfifo(path string, mode uint32) (err error) {
func libc_mkfifo_trampoline()
-//go:linkname libc_mkfifo libc_mkfifo
//go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1578,7 +1575,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
func libc_mknod_trampoline()
-//go:linkname libc_mknod libc_mknod
//go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1599,7 +1595,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
func libc_open_trampoline()
-//go:linkname libc_open libc_open
//go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1620,7 +1615,6 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
func libc_openat_trampoline()
-//go:linkname libc_openat libc_openat
//go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1641,7 +1635,6 @@ func Pathconf(path string, name int) (val int, err error) {
func libc_pathconf_trampoline()
-//go:linkname libc_pathconf libc_pathconf
//go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1663,7 +1656,6 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
func libc_pread_trampoline()
-//go:linkname libc_pread libc_pread
//go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1685,7 +1677,6 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
func libc_pwrite_trampoline()
-//go:linkname libc_pwrite libc_pwrite
//go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1707,7 +1698,6 @@ func read(fd int, p []byte) (n int, err error) {
func libc_read_trampoline()
-//go:linkname libc_read libc_read
//go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1734,7 +1724,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
func libc_readlink_trampoline()
-//go:linkname libc_readlink libc_readlink
//go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1761,7 +1750,6 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
func libc_readlinkat_trampoline()
-//go:linkname libc_readlinkat libc_readlinkat
//go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1786,7 +1774,6 @@ func Rename(from string, to string) (err error) {
func libc_rename_trampoline()
-//go:linkname libc_rename libc_rename
//go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1811,7 +1798,6 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
func libc_renameat_trampoline()
-//go:linkname libc_renameat libc_renameat
//go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1831,7 +1817,6 @@ func Revoke(path string) (err error) {
func libc_revoke_trampoline()
-//go:linkname libc_revoke libc_revoke
//go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1851,7 +1836,6 @@ func Rmdir(path string) (err error) {
func libc_rmdir_trampoline()
-//go:linkname libc_rmdir libc_rmdir
//go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1867,7 +1851,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
func libc_lseek_trampoline()
-//go:linkname libc_lseek libc_lseek
//go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1883,7 +1866,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
func libc_select_trampoline()
-//go:linkname libc_select libc_select
//go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1898,7 +1880,6 @@ func Setegid(egid int) (err error) {
func libc_setegid_trampoline()
-//go:linkname libc_setegid libc_setegid
//go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1913,7 +1894,6 @@ func Seteuid(euid int) (err error) {
func libc_seteuid_trampoline()
-//go:linkname libc_seteuid libc_seteuid
//go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1928,7 +1908,6 @@ func Setgid(gid int) (err error) {
func libc_setgid_trampoline()
-//go:linkname libc_setgid libc_setgid
//go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1948,7 +1927,6 @@ func Setlogin(name string) (err error) {
func libc_setlogin_trampoline()
-//go:linkname libc_setlogin libc_setlogin
//go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1963,7 +1941,6 @@ func Setpgid(pid int, pgid int) (err error) {
func libc_setpgid_trampoline()
-//go:linkname libc_setpgid libc_setpgid
//go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1978,7 +1955,6 @@ func Setpriority(which int, who int, prio int) (err error) {
func libc_setpriority_trampoline()
-//go:linkname libc_setpriority libc_setpriority
//go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1993,7 +1969,6 @@ func Setprivexec(flag int) (err error) {
func libc_setprivexec_trampoline()
-//go:linkname libc_setprivexec libc_setprivexec
//go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2008,7 +1983,6 @@ func Setregid(rgid int, egid int) (err error) {
func libc_setregid_trampoline()
-//go:linkname libc_setregid libc_setregid
//go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2023,7 +1997,6 @@ func Setreuid(ruid int, euid int) (err error) {
func libc_setreuid_trampoline()
-//go:linkname libc_setreuid libc_setreuid
//go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2038,7 +2011,6 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
func libc_setrlimit_trampoline()
-//go:linkname libc_setrlimit libc_setrlimit
//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2054,7 +2026,6 @@ func Setsid() (pid int, err error) {
func libc_setsid_trampoline()
-//go:linkname libc_setsid libc_setsid
//go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2069,7 +2040,6 @@ func Settimeofday(tp *Timeval) (err error) {
func libc_settimeofday_trampoline()
-//go:linkname libc_settimeofday libc_settimeofday
//go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2084,7 +2054,6 @@ func Setuid(uid int) (err error) {
func libc_setuid_trampoline()
-//go:linkname libc_setuid libc_setuid
//go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2109,7 +2078,6 @@ func Symlink(path string, link string) (err error) {
func libc_symlink_trampoline()
-//go:linkname libc_symlink libc_symlink
//go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2134,7 +2102,6 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
func libc_symlinkat_trampoline()
-//go:linkname libc_symlinkat libc_symlinkat
//go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2149,7 +2116,6 @@ func Sync() (err error) {
func libc_sync_trampoline()
-//go:linkname libc_sync libc_sync
//go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2169,7 +2135,6 @@ func Truncate(path string, length int64) (err error) {
func libc_truncate_trampoline()
-//go:linkname libc_truncate libc_truncate
//go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2182,7 +2147,6 @@ func Umask(newmask int) (oldmask int) {
func libc_umask_trampoline()
-//go:linkname libc_umask libc_umask
//go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2202,7 +2166,6 @@ func Undelete(path string) (err error) {
func libc_undelete_trampoline()
-//go:linkname libc_undelete libc_undelete
//go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2222,7 +2185,6 @@ func Unlink(path string) (err error) {
func libc_unlink_trampoline()
-//go:linkname libc_unlink libc_unlink
//go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2242,7 +2204,6 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
func libc_unlinkat_trampoline()
-//go:linkname libc_unlinkat libc_unlinkat
//go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2262,7 +2223,6 @@ func Unmount(path string, flags int) (err error) {
func libc_unmount_trampoline()
-//go:linkname libc_unmount libc_unmount
//go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2284,7 +2244,6 @@ func write(fd int, p []byte) (n int, err error) {
func libc_write_trampoline()
-//go:linkname libc_write libc_write
//go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2300,7 +2259,6 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
func libc_mmap_trampoline()
-//go:linkname libc_mmap libc_mmap
//go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2315,7 +2273,6 @@ func munmap(addr uintptr, length uintptr) (err error) {
func libc_munmap_trampoline()
-//go:linkname libc_munmap libc_munmap
//go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2342,23 +2299,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int32(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_gettimeofday_trampoline()
-
-//go:linkname libc_gettimeofday libc_gettimeofday
-//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fstat(fd int, stat *Stat_t) (err error) {
_, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
@@ -2369,7 +2309,6 @@ func Fstat(fd int, stat *Stat_t) (err error) {
func libc_fstat_trampoline()
-//go:linkname libc_fstat libc_fstat
//go:cgo_import_dynamic libc_fstat fstat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2389,7 +2328,6 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
func libc_fstatat_trampoline()
-//go:linkname libc_fstatat libc_fstatat
//go:cgo_import_dynamic libc_fstatat fstatat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2404,7 +2342,6 @@ func Fstatfs(fd int, stat *Statfs_t) (err error) {
func libc_fstatfs_trampoline()
-//go:linkname libc_fstatfs libc_fstatfs
//go:cgo_import_dynamic libc_fstatfs fstatfs "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2420,7 +2357,6 @@ func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
func libc_getfsstat_trampoline()
-//go:linkname libc_getfsstat libc_getfsstat
//go:cgo_import_dynamic libc_getfsstat getfsstat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2440,7 +2376,6 @@ func Lstat(path string, stat *Stat_t) (err error) {
func libc_lstat_trampoline()
-//go:linkname libc_lstat libc_lstat
//go:cgo_import_dynamic libc_lstat lstat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2460,7 +2395,6 @@ func Stat(path string, stat *Stat_t) (err error) {
func libc_stat_trampoline()
-//go:linkname libc_stat libc_stat
//go:cgo_import_dynamic libc_stat stat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2480,5 +2414,4 @@ func Statfs(path string, stat *Statfs_t) (err error) {
func libc_statfs_trampoline()
-//go:linkname libc_statfs libc_statfs
//go:cgo_import_dynamic libc_statfs statfs "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s
index b67f518..5eec5f1 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.s
@@ -60,8 +60,6 @@ TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlock(SB)
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlockall(SB)
-TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getattrlist(SB)
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
@@ -110,6 +108,10 @@ TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
JMP libc_clock_gettime(SB)
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
JMP libc_close(SB)
+TEXT ·libc_clonefile_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_clonefile(SB)
+TEXT ·libc_clonefileat_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_clonefileat(SB)
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
JMP libc_dup(SB)
TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
@@ -132,6 +134,8 @@ TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
JMP libc_fchown(SB)
TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
JMP libc_fchownat(SB)
+TEXT ·libc_fclonefileat_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_fclonefileat(SB)
TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
JMP libc_flock(SB)
TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
@@ -140,6 +144,8 @@ TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
JMP libc_fsync(SB)
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
JMP libc_ftruncate(SB)
+TEXT ·libc_getcwd_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
JMP libc_getdtablesize(SB)
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
@@ -164,6 +170,8 @@ TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
JMP libc_getrusage(SB)
TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
JMP libc_getsid(SB)
+TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
JMP libc_getuid(SB)
TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
@@ -264,8 +272,6 @@ TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
JMP libc_mmap(SB)
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
JMP libc_munmap(SB)
-TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
- JMP libc_gettimeofday(SB)
TEXT ·libc_fstat_trampoline(SB),NOSPLIT,$0-0
JMP libc_fstat(SB)
TEXT ·libc_fstatat_trampoline(SB),NOSPLIT,$0-0
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
index d64e6c8..d30ec4e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags darwin,arm64,go1.13 syscall_darwin.1_13.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build darwin && arm64 && go1.13
// +build darwin,arm64,go1.13
package unix
@@ -24,7 +25,6 @@ func closedir(dir uintptr) (err error) {
func libc_closedir_trampoline()
-//go:linkname libc_closedir libc_closedir
//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -37,5 +37,4 @@ func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
func libc_readdir_r_trampoline()
-//go:linkname libc_readdir_r libc_readdir_r
//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index a8709f7..a10df58 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags darwin,arm64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build darwin && arm64 && go1.12
// +build darwin,arm64,go1.12
package unix
@@ -25,7 +26,6 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
func libc_getgroups_trampoline()
-//go:linkname libc_getgroups libc_getgroups
//go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -40,7 +40,6 @@ func setgroups(ngid int, gid *_Gid_t) (err error) {
func libc_setgroups_trampoline()
-//go:linkname libc_setgroups libc_setgroups
//go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -56,7 +55,6 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
func libc_wait4_trampoline()
-//go:linkname libc_wait4 libc_wait4
//go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -72,7 +70,6 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
func libc_accept_trampoline()
-//go:linkname libc_accept libc_accept
//go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -87,7 +84,6 @@ func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
func libc_bind_trampoline()
-//go:linkname libc_bind libc_bind
//go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -102,7 +98,6 @@ func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
func libc_connect_trampoline()
-//go:linkname libc_connect libc_connect
//go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -118,7 +113,6 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
func libc_socket_trampoline()
-//go:linkname libc_socket libc_socket
//go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -133,7 +127,6 @@ func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen
func libc_getsockopt_trampoline()
-//go:linkname libc_getsockopt libc_getsockopt
//go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -148,7 +141,6 @@ func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr)
func libc_setsockopt_trampoline()
-//go:linkname libc_setsockopt libc_setsockopt
//go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -163,7 +155,6 @@ func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
func libc_getpeername_trampoline()
-//go:linkname libc_getpeername libc_getpeername
//go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -178,7 +169,6 @@ func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
func libc_getsockname_trampoline()
-//go:linkname libc_getsockname libc_getsockname
//go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -193,7 +183,6 @@ func Shutdown(s int, how int) (err error) {
func libc_shutdown_trampoline()
-//go:linkname libc_shutdown libc_shutdown
//go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -208,7 +197,6 @@ func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
func libc_socketpair_trampoline()
-//go:linkname libc_socketpair libc_socketpair
//go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -230,7 +218,6 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
func libc_recvfrom_trampoline()
-//go:linkname libc_recvfrom libc_recvfrom
//go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -251,7 +238,6 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
func libc_sendto_trampoline()
-//go:linkname libc_sendto libc_sendto
//go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -267,7 +253,6 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
func libc_recvmsg_trampoline()
-//go:linkname libc_recvmsg libc_recvmsg
//go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -283,7 +268,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
func libc_sendmsg_trampoline()
-//go:linkname libc_sendmsg libc_sendmsg
//go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -299,7 +283,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
func libc_kevent_trampoline()
-//go:linkname libc_kevent libc_kevent
//go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -319,7 +302,6 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
func libc_utimes_trampoline()
-//go:linkname libc_utimes libc_utimes
//go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -334,7 +316,6 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
func libc_futimes_trampoline()
-//go:linkname libc_futimes libc_futimes
//go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -350,7 +331,6 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
func libc_poll_trampoline()
-//go:linkname libc_poll libc_poll
//go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -371,7 +351,6 @@ func Madvise(b []byte, behav int) (err error) {
func libc_madvise_trampoline()
-//go:linkname libc_madvise libc_madvise
//go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -392,7 +371,6 @@ func Mlock(b []byte) (err error) {
func libc_mlock_trampoline()
-//go:linkname libc_mlock libc_mlock
//go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -407,7 +385,6 @@ func Mlockall(flags int) (err error) {
func libc_mlockall_trampoline()
-//go:linkname libc_mlockall libc_mlockall
//go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -428,7 +405,6 @@ func Mprotect(b []byte, prot int) (err error) {
func libc_mprotect_trampoline()
-//go:linkname libc_mprotect libc_mprotect
//go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -449,7 +425,6 @@ func Msync(b []byte, flags int) (err error) {
func libc_msync_trampoline()
-//go:linkname libc_msync libc_msync
//go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -470,7 +445,6 @@ func Munlock(b []byte) (err error) {
func libc_munlock_trampoline()
-//go:linkname libc_munlock libc_munlock
//go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -485,30 +459,12 @@ func Munlockall() (err error) {
func libc_munlockall_trampoline()
-//go:linkname libc_munlockall libc_munlockall
//go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib"
// 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) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), 0, 0, 0)
- r = int(r0)
- w = int(r1)
+func pipe(p *[2]int32) (err error) {
+ _, _, e1 := syscall_rawSyscall(funcPC(libc_pipe_trampoline), uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -517,7 +473,6 @@ func pipe() (r int, w int, err error) {
func libc_pipe_trampoline()
-//go:linkname libc_pipe libc_pipe
//go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -543,7 +498,6 @@ func getxattr(path string, attr string, dest *byte, size int, position uint32, o
func libc_getxattr_trampoline()
-//go:linkname libc_getxattr libc_getxattr
//go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -564,7 +518,6 @@ func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, optio
func libc_fgetxattr_trampoline()
-//go:linkname libc_fgetxattr libc_fgetxattr
//go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -589,7 +542,6 @@ func setxattr(path string, attr string, data *byte, size int, position uint32, o
func libc_setxattr_trampoline()
-//go:linkname libc_setxattr libc_setxattr
//go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -609,7 +561,6 @@ func fsetxattr(fd int, attr string, data *byte, size int, position uint32, optio
func libc_fsetxattr_trampoline()
-//go:linkname libc_fsetxattr libc_fsetxattr
//go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -634,7 +585,6 @@ func removexattr(path string, attr string, options int) (err error) {
func libc_removexattr_trampoline()
-//go:linkname libc_removexattr libc_removexattr
//go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -654,7 +604,6 @@ func fremovexattr(fd int, attr string, options int) (err error) {
func libc_fremovexattr_trampoline()
-//go:linkname libc_fremovexattr libc_fremovexattr
//go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -675,7 +624,6 @@ func listxattr(path string, dest *byte, size int, options int) (sz int, err erro
func libc_listxattr_trampoline()
-//go:linkname libc_listxattr libc_listxattr
//go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -691,7 +639,6 @@ func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
func libc_flistxattr_trampoline()
-//go:linkname libc_flistxattr libc_flistxattr
//go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -706,7 +653,6 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
func libc_setattrlist_trampoline()
-//go:linkname libc_setattrlist libc_setattrlist
//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -722,7 +668,6 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
func libc_fcntl_trampoline()
-//go:linkname libc_fcntl libc_fcntl
//go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -737,7 +682,6 @@ func kill(pid int, signum int, posix int) (err error) {
func libc_kill_trampoline()
-//go:linkname libc_kill libc_kill
//go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -752,7 +696,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
func libc_ioctl_trampoline()
-//go:linkname libc_ioctl libc_ioctl
//go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -773,7 +716,6 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
func libc_sysctl_trampoline()
-//go:linkname libc_sysctl libc_sysctl
//go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -788,7 +730,6 @@ func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer
func libc_sendfile_trampoline()
-//go:linkname libc_sendfile libc_sendfile
//go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -808,7 +749,6 @@ func Access(path string, mode uint32) (err error) {
func libc_access_trampoline()
-//go:linkname libc_access libc_access
//go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -823,7 +763,6 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
func libc_adjtime_trampoline()
-//go:linkname libc_adjtime libc_adjtime
//go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -843,7 +782,6 @@ func Chdir(path string) (err error) {
func libc_chdir_trampoline()
-//go:linkname libc_chdir libc_chdir
//go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -863,7 +801,6 @@ func Chflags(path string, flags int) (err error) {
func libc_chflags_trampoline()
-//go:linkname libc_chflags libc_chflags
//go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -883,7 +820,6 @@ func Chmod(path string, mode uint32) (err error) {
func libc_chmod_trampoline()
-//go:linkname libc_chmod libc_chmod
//go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -903,7 +839,6 @@ func Chown(path string, uid int, gid int) (err error) {
func libc_chown_trampoline()
-//go:linkname libc_chown libc_chown
//go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -923,7 +858,6 @@ func Chroot(path string) (err error) {
func libc_chroot_trampoline()
-//go:linkname libc_chroot libc_chroot
//go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -938,7 +872,6 @@ func ClockGettime(clockid int32, time *Timespec) (err error) {
func libc_clock_gettime_trampoline()
-//go:linkname libc_clock_gettime libc_clock_gettime
//go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -953,11 +886,58 @@ func Close(fd int) (err error) {
func libc_close_trampoline()
-//go:linkname libc_close libc_close
//go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Clonefile(src string, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(src)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(funcPC(libc_clonefile_trampoline), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_clonefile_trampoline()
+
+//go:cgo_import_dynamic libc_clonefile clonefile "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(src)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(funcPC(libc_clonefileat_trampoline), uintptr(srcDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_clonefileat_trampoline()
+
+//go:cgo_import_dynamic libc_clonefileat clonefileat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Dup(fd int) (nfd int, err error) {
r0, _, e1 := syscall_syscall(funcPC(libc_dup_trampoline), uintptr(fd), 0, 0)
nfd = int(r0)
@@ -969,7 +949,6 @@ func Dup(fd int) (nfd int, err error) {
func libc_dup_trampoline()
-//go:linkname libc_dup libc_dup
//go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -984,7 +963,6 @@ func Dup2(from int, to int) (err error) {
func libc_dup2_trampoline()
-//go:linkname libc_dup2 libc_dup2
//go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1009,7 +987,6 @@ func Exchangedata(path1 string, path2 string, options int) (err error) {
func libc_exchangedata_trampoline()
-//go:linkname libc_exchangedata libc_exchangedata
//go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1021,7 +998,6 @@ func Exit(code int) {
func libc_exit_trampoline()
-//go:linkname libc_exit libc_exit
//go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1041,7 +1017,6 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
func libc_faccessat_trampoline()
-//go:linkname libc_faccessat libc_faccessat
//go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1056,7 +1031,6 @@ func Fchdir(fd int) (err error) {
func libc_fchdir_trampoline()
-//go:linkname libc_fchdir libc_fchdir
//go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1071,7 +1045,6 @@ func Fchflags(fd int, flags int) (err error) {
func libc_fchflags_trampoline()
-//go:linkname libc_fchflags libc_fchflags
//go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1086,7 +1059,6 @@ func Fchmod(fd int, mode uint32) (err error) {
func libc_fchmod_trampoline()
-//go:linkname libc_fchmod libc_fchmod
//go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1106,7 +1078,6 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
func libc_fchmodat_trampoline()
-//go:linkname libc_fchmodat libc_fchmodat
//go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1121,7 +1092,6 @@ func Fchown(fd int, uid int, gid int) (err error) {
func libc_fchown_trampoline()
-//go:linkname libc_fchown libc_fchown
//go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1141,11 +1111,29 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
func libc_fchownat_trampoline()
-//go:linkname libc_fchownat libc_fchownat
//go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(dst)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(funcPC(libc_fclonefileat_trampoline), uintptr(srcDirfd), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_fclonefileat_trampoline()
+
+//go:cgo_import_dynamic libc_fclonefileat fclonefileat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Flock(fd int, how int) (err error) {
_, _, e1 := syscall_syscall(funcPC(libc_flock_trampoline), uintptr(fd), uintptr(how), 0)
if e1 != 0 {
@@ -1156,7 +1144,6 @@ func Flock(fd int, how int) (err error) {
func libc_flock_trampoline()
-//go:linkname libc_flock libc_flock
//go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1172,7 +1159,6 @@ func Fpathconf(fd int, name int) (val int, err error) {
func libc_fpathconf_trampoline()
-//go:linkname libc_fpathconf libc_fpathconf
//go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1187,7 +1173,6 @@ func Fsync(fd int) (err error) {
func libc_fsync_trampoline()
-//go:linkname libc_fsync libc_fsync
//go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1202,11 +1187,31 @@ func Ftruncate(fd int, length int64) (err error) {
func libc_ftruncate_trampoline()
-//go:linkname libc_ftruncate libc_ftruncate
//go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib"
// 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: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) {
r0, _, _ := syscall_syscall(funcPC(libc_getdtablesize_trampoline), 0, 0, 0)
size = int(r0)
@@ -1215,7 +1220,6 @@ func Getdtablesize() (size int) {
func libc_getdtablesize_trampoline()
-//go:linkname libc_getdtablesize libc_getdtablesize
//go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1228,7 +1232,6 @@ func Getegid() (egid int) {
func libc_getegid_trampoline()
-//go:linkname libc_getegid libc_getegid
//go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1241,7 +1244,6 @@ func Geteuid() (uid int) {
func libc_geteuid_trampoline()
-//go:linkname libc_geteuid libc_geteuid
//go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1254,7 +1256,6 @@ func Getgid() (gid int) {
func libc_getgid_trampoline()
-//go:linkname libc_getgid libc_getgid
//go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1270,7 +1271,6 @@ func Getpgid(pid int) (pgid int, err error) {
func libc_getpgid_trampoline()
-//go:linkname libc_getpgid libc_getpgid
//go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1283,7 +1283,6 @@ func Getpgrp() (pgrp int) {
func libc_getpgrp_trampoline()
-//go:linkname libc_getpgrp libc_getpgrp
//go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1296,7 +1295,6 @@ func Getpid() (pid int) {
func libc_getpid_trampoline()
-//go:linkname libc_getpid libc_getpid
//go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1309,7 +1307,6 @@ func Getppid() (ppid int) {
func libc_getppid_trampoline()
-//go:linkname libc_getppid libc_getppid
//go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1325,7 +1322,6 @@ func Getpriority(which int, who int) (prio int, err error) {
func libc_getpriority_trampoline()
-//go:linkname libc_getpriority libc_getpriority
//go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1340,7 +1336,6 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
func libc_getrlimit_trampoline()
-//go:linkname libc_getrlimit libc_getrlimit
//go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1355,7 +1350,6 @@ func Getrusage(who int, rusage *Rusage) (err error) {
func libc_getrusage_trampoline()
-//go:linkname libc_getrusage libc_getrusage
//go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1371,11 +1365,24 @@ func Getsid(pid int) (sid int, err error) {
func libc_getsid_trampoline()
-//go:linkname libc_getsid libc_getsid
//go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Gettimeofday(tp *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_gettimeofday_trampoline()
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getuid() (uid int) {
r0, _, _ := syscall_rawSyscall(funcPC(libc_getuid_trampoline), 0, 0, 0)
uid = int(r0)
@@ -1384,7 +1391,6 @@ func Getuid() (uid int) {
func libc_getuid_trampoline()
-//go:linkname libc_getuid libc_getuid
//go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1397,7 +1403,6 @@ func Issetugid() (tainted bool) {
func libc_issetugid_trampoline()
-//go:linkname libc_issetugid libc_issetugid
//go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1413,7 +1418,6 @@ func Kqueue() (fd int, err error) {
func libc_kqueue_trampoline()
-//go:linkname libc_kqueue libc_kqueue
//go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1433,7 +1437,6 @@ func Lchown(path string, uid int, gid int) (err error) {
func libc_lchown_trampoline()
-//go:linkname libc_lchown libc_lchown
//go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1458,7 +1461,6 @@ func Link(path string, link string) (err error) {
func libc_link_trampoline()
-//go:linkname libc_link libc_link
//go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1483,7 +1485,6 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
func libc_linkat_trampoline()
-//go:linkname libc_linkat libc_linkat
//go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1498,7 +1499,6 @@ func Listen(s int, backlog int) (err error) {
func libc_listen_trampoline()
-//go:linkname libc_listen libc_listen
//go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1518,7 +1518,6 @@ func Mkdir(path string, mode uint32) (err error) {
func libc_mkdir_trampoline()
-//go:linkname libc_mkdir libc_mkdir
//go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1538,7 +1537,6 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
func libc_mkdirat_trampoline()
-//go:linkname libc_mkdirat libc_mkdirat
//go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1558,7 +1556,6 @@ func Mkfifo(path string, mode uint32) (err error) {
func libc_mkfifo_trampoline()
-//go:linkname libc_mkfifo libc_mkfifo
//go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1578,7 +1575,6 @@ func Mknod(path string, mode uint32, dev int) (err error) {
func libc_mknod_trampoline()
-//go:linkname libc_mknod libc_mknod
//go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1599,7 +1595,6 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
func libc_open_trampoline()
-//go:linkname libc_open libc_open
//go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1620,7 +1615,6 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
func libc_openat_trampoline()
-//go:linkname libc_openat libc_openat
//go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1641,7 +1635,6 @@ func Pathconf(path string, name int) (val int, err error) {
func libc_pathconf_trampoline()
-//go:linkname libc_pathconf libc_pathconf
//go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1663,7 +1656,6 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
func libc_pread_trampoline()
-//go:linkname libc_pread libc_pread
//go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1685,7 +1677,6 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
func libc_pwrite_trampoline()
-//go:linkname libc_pwrite libc_pwrite
//go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1707,7 +1698,6 @@ func read(fd int, p []byte) (n int, err error) {
func libc_read_trampoline()
-//go:linkname libc_read libc_read
//go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1734,7 +1724,6 @@ func Readlink(path string, buf []byte) (n int, err error) {
func libc_readlink_trampoline()
-//go:linkname libc_readlink libc_readlink
//go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1761,7 +1750,6 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
func libc_readlinkat_trampoline()
-//go:linkname libc_readlinkat libc_readlinkat
//go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1786,7 +1774,6 @@ func Rename(from string, to string) (err error) {
func libc_rename_trampoline()
-//go:linkname libc_rename libc_rename
//go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1811,7 +1798,6 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
func libc_renameat_trampoline()
-//go:linkname libc_renameat libc_renameat
//go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1831,7 +1817,6 @@ func Revoke(path string) (err error) {
func libc_revoke_trampoline()
-//go:linkname libc_revoke libc_revoke
//go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1851,7 +1836,6 @@ func Rmdir(path string) (err error) {
func libc_rmdir_trampoline()
-//go:linkname libc_rmdir libc_rmdir
//go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1867,7 +1851,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
func libc_lseek_trampoline()
-//go:linkname libc_lseek libc_lseek
//go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1883,7 +1866,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
func libc_select_trampoline()
-//go:linkname libc_select libc_select
//go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1898,7 +1880,6 @@ func Setegid(egid int) (err error) {
func libc_setegid_trampoline()
-//go:linkname libc_setegid libc_setegid
//go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1913,7 +1894,6 @@ func Seteuid(euid int) (err error) {
func libc_seteuid_trampoline()
-//go:linkname libc_seteuid libc_seteuid
//go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1928,7 +1908,6 @@ func Setgid(gid int) (err error) {
func libc_setgid_trampoline()
-//go:linkname libc_setgid libc_setgid
//go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1948,7 +1927,6 @@ func Setlogin(name string) (err error) {
func libc_setlogin_trampoline()
-//go:linkname libc_setlogin libc_setlogin
//go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1963,7 +1941,6 @@ func Setpgid(pid int, pgid int) (err error) {
func libc_setpgid_trampoline()
-//go:linkname libc_setpgid libc_setpgid
//go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1978,7 +1955,6 @@ func Setpriority(which int, who int, prio int) (err error) {
func libc_setpriority_trampoline()
-//go:linkname libc_setpriority libc_setpriority
//go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1993,7 +1969,6 @@ func Setprivexec(flag int) (err error) {
func libc_setprivexec_trampoline()
-//go:linkname libc_setprivexec libc_setprivexec
//go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2008,7 +1983,6 @@ func Setregid(rgid int, egid int) (err error) {
func libc_setregid_trampoline()
-//go:linkname libc_setregid libc_setregid
//go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2023,7 +1997,6 @@ func Setreuid(ruid int, euid int) (err error) {
func libc_setreuid_trampoline()
-//go:linkname libc_setreuid libc_setreuid
//go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2038,7 +2011,6 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
func libc_setrlimit_trampoline()
-//go:linkname libc_setrlimit libc_setrlimit
//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2054,7 +2026,6 @@ func Setsid() (pid int, err error) {
func libc_setsid_trampoline()
-//go:linkname libc_setsid libc_setsid
//go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2069,7 +2040,6 @@ func Settimeofday(tp *Timeval) (err error) {
func libc_settimeofday_trampoline()
-//go:linkname libc_settimeofday libc_settimeofday
//go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2084,7 +2054,6 @@ func Setuid(uid int) (err error) {
func libc_setuid_trampoline()
-//go:linkname libc_setuid libc_setuid
//go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2109,7 +2078,6 @@ func Symlink(path string, link string) (err error) {
func libc_symlink_trampoline()
-//go:linkname libc_symlink libc_symlink
//go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2134,7 +2102,6 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
func libc_symlinkat_trampoline()
-//go:linkname libc_symlinkat libc_symlinkat
//go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2149,7 +2116,6 @@ func Sync() (err error) {
func libc_sync_trampoline()
-//go:linkname libc_sync libc_sync
//go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2169,7 +2135,6 @@ func Truncate(path string, length int64) (err error) {
func libc_truncate_trampoline()
-//go:linkname libc_truncate libc_truncate
//go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2182,7 +2147,6 @@ func Umask(newmask int) (oldmask int) {
func libc_umask_trampoline()
-//go:linkname libc_umask libc_umask
//go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2202,7 +2166,6 @@ func Undelete(path string) (err error) {
func libc_undelete_trampoline()
-//go:linkname libc_undelete libc_undelete
//go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2222,7 +2185,6 @@ func Unlink(path string) (err error) {
func libc_unlink_trampoline()
-//go:linkname libc_unlink libc_unlink
//go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2242,7 +2204,6 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
func libc_unlinkat_trampoline()
-//go:linkname libc_unlinkat libc_unlinkat
//go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2262,7 +2223,6 @@ func Unmount(path string, flags int) (err error) {
func libc_unmount_trampoline()
-//go:linkname libc_unmount libc_unmount
//go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2284,7 +2244,6 @@ func write(fd int, p []byte) (n int, err error) {
func libc_write_trampoline()
-//go:linkname libc_write libc_write
//go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2300,7 +2259,6 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
func libc_mmap_trampoline()
-//go:linkname libc_mmap libc_mmap
//go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2315,7 +2273,6 @@ func munmap(addr uintptr, length uintptr) (err error) {
func libc_munmap_trampoline()
-//go:linkname libc_munmap libc_munmap
//go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2342,23 +2299,6 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
- r0, r1, e1 := syscall_rawSyscall(funcPC(libc_gettimeofday_trampoline), uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int64(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-func libc_gettimeofday_trampoline()
-
-//go:linkname libc_gettimeofday libc_gettimeofday
-//go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fstat(fd int, stat *Stat_t) (err error) {
_, _, e1 := syscall_syscall(funcPC(libc_fstat_trampoline), uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
@@ -2369,7 +2309,6 @@ func Fstat(fd int, stat *Stat_t) (err error) {
func libc_fstat_trampoline()
-//go:linkname libc_fstat libc_fstat
//go:cgo_import_dynamic libc_fstat fstat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2389,7 +2328,6 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
func libc_fstatat_trampoline()
-//go:linkname libc_fstatat libc_fstatat
//go:cgo_import_dynamic libc_fstatat fstatat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2404,7 +2342,6 @@ func Fstatfs(fd int, stat *Statfs_t) (err error) {
func libc_fstatfs_trampoline()
-//go:linkname libc_fstatfs libc_fstatfs
//go:cgo_import_dynamic libc_fstatfs fstatfs "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2420,7 +2357,6 @@ func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
func libc_getfsstat_trampoline()
-//go:linkname libc_getfsstat libc_getfsstat
//go:cgo_import_dynamic libc_getfsstat getfsstat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2440,11 +2376,24 @@ func Lstat(path string, stat *Stat_t) (err error) {
func libc_lstat_trampoline()
-//go:linkname libc_lstat libc_lstat
//go:cgo_import_dynamic libc_lstat lstat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
+ _, _, e1 := syscall_syscall6(funcPC(libc_ptrace_trampoline), uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func libc_ptrace_trampoline()
+
+//go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Stat(path string, stat *Stat_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -2460,7 +2409,6 @@ func Stat(path string, stat *Stat_t) (err error) {
func libc_stat_trampoline()
-//go:linkname libc_stat libc_stat
//go:cgo_import_dynamic libc_stat stat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2480,5 +2428,4 @@ func Statfs(path string, stat *Statfs_t) (err error) {
func libc_statfs_trampoline()
-//go:linkname libc_statfs libc_statfs
//go:cgo_import_dynamic libc_statfs statfs "/usr/lib/libSystem.B.dylib"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
index 40cce1b..53c402b 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
@@ -60,8 +60,6 @@ TEXT ·libc_munlock_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlock(SB)
TEXT ·libc_munlockall_trampoline(SB),NOSPLIT,$0-0
JMP libc_munlockall(SB)
-TEXT ·libc_getattrlist_trampoline(SB),NOSPLIT,$0-0
- JMP libc_getattrlist(SB)
TEXT ·libc_pipe_trampoline(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
TEXT ·libc_getxattr_trampoline(SB),NOSPLIT,$0-0
@@ -110,6 +108,10 @@ TEXT ·libc_clock_gettime_trampoline(SB),NOSPLIT,$0-0
JMP libc_clock_gettime(SB)
TEXT ·libc_close_trampoline(SB),NOSPLIT,$0-0
JMP libc_close(SB)
+TEXT ·libc_clonefile_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_clonefile(SB)
+TEXT ·libc_clonefileat_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_clonefileat(SB)
TEXT ·libc_dup_trampoline(SB),NOSPLIT,$0-0
JMP libc_dup(SB)
TEXT ·libc_dup2_trampoline(SB),NOSPLIT,$0-0
@@ -132,6 +134,8 @@ TEXT ·libc_fchown_trampoline(SB),NOSPLIT,$0-0
JMP libc_fchown(SB)
TEXT ·libc_fchownat_trampoline(SB),NOSPLIT,$0-0
JMP libc_fchownat(SB)
+TEXT ·libc_fclonefileat_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_fclonefileat(SB)
TEXT ·libc_flock_trampoline(SB),NOSPLIT,$0-0
JMP libc_flock(SB)
TEXT ·libc_fpathconf_trampoline(SB),NOSPLIT,$0-0
@@ -140,6 +144,8 @@ TEXT ·libc_fsync_trampoline(SB),NOSPLIT,$0-0
JMP libc_fsync(SB)
TEXT ·libc_ftruncate_trampoline(SB),NOSPLIT,$0-0
JMP libc_ftruncate(SB)
+TEXT ·libc_getcwd_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
TEXT ·libc_getdtablesize_trampoline(SB),NOSPLIT,$0-0
JMP libc_getdtablesize(SB)
TEXT ·libc_getegid_trampoline(SB),NOSPLIT,$0-0
@@ -164,6 +170,8 @@ TEXT ·libc_getrusage_trampoline(SB),NOSPLIT,$0-0
JMP libc_getrusage(SB)
TEXT ·libc_getsid_trampoline(SB),NOSPLIT,$0-0
JMP libc_getsid(SB)
+TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
TEXT ·libc_getuid_trampoline(SB),NOSPLIT,$0-0
JMP libc_getuid(SB)
TEXT ·libc_issetugid_trampoline(SB),NOSPLIT,$0-0
@@ -264,8 +272,6 @@ TEXT ·libc_mmap_trampoline(SB),NOSPLIT,$0-0
JMP libc_mmap(SB)
TEXT ·libc_munmap_trampoline(SB),NOSPLIT,$0-0
JMP libc_munmap(SB)
-TEXT ·libc_gettimeofday_trampoline(SB),NOSPLIT,$0-0
- JMP libc_gettimeofday(SB)
TEXT ·libc_fstat_trampoline(SB),NOSPLIT,$0-0
JMP libc_fstat(SB)
TEXT ·libc_fstatat_trampoline(SB),NOSPLIT,$0-0
@@ -276,6 +282,8 @@ TEXT ·libc_getfsstat_trampoline(SB),NOSPLIT,$0-0
JMP libc_getfsstat(SB)
TEXT ·libc_lstat_trampoline(SB),NOSPLIT,$0-0
JMP libc_lstat(SB)
+TEXT ·libc_ptrace_trampoline(SB),NOSPLIT,$0-0
+ JMP libc_ptrace(SB)
TEXT ·libc_stat_trampoline(SB),NOSPLIT,$0-0
JMP libc_stat(SB)
TEXT ·libc_statfs_trampoline(SB),NOSPLIT,$0-0
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
index fe1fdd7..1b6eedf 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build dragonfly && amd64
// +build dragonfly,amd64
package unix
@@ -214,22 +215,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -378,6 +363,18 @@ func pipe() (r int, w int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pipe2(p *[2]_C_int, flags int) (r int, w int, err error) {
+ r0, r1, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ r = int(r0)
+ w = int(r1)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
@@ -439,6 +436,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
index c9058f3..3e9bddb 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build freebsd && 386
// +build freebsd,386
package unix
@@ -214,22 +215,6 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -376,8 +361,15 @@ func pipe2(p *[2]_C_int, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ptrace(request int, pid int, addr uintptr, data int) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+func Getcwd(buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -386,15 +378,24 @@ func ptrace(request int, pid int, addr uintptr, data int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getcwd(buf []byte) (n int, err error) {
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
+ _, _, 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)
}
@@ -403,8 +404,8 @@ func Getcwd(buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+func ptrace(request int, pid int, addr uintptr, data int) (err error) {
+ _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1352,7 +1353,7 @@ func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), uintptr(dev>>32), 0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
index 49b20c2..c72a462 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build freebsd && amd64
// +build freebsd,amd64
package unix
@@ -350,22 +351,6 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func pipe2(p *[2]_C_int, flags int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
@@ -403,6 +388,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data int) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
index 31d2c46..530d5df 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build freebsd && arm
// +build freebsd,arm
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
index abab3d7..71e7df9 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
@@ -1,6 +1,7 @@
-// go run mksyscall.go -tags freebsd,arm64 -- syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm64.go
+// go run mksyscall.go -tags freebsd,arm64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build freebsd && arm64
// +build freebsd,arm64
package unix
@@ -350,22 +351,6 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func pipe2(p *[2]_C_int, flags int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
@@ -403,6 +388,22 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ptrace(request int, pid int, addr uintptr, data int) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
new file mode 100644
index 0000000..af5cb06
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
@@ -0,0 +1,128 @@
+// go run mksyscall_solaris.go -illumos -tags illumos,amd64 syscall_illumos.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build illumos && amd64
+// +build illumos,amd64
+
+package unix
+
+import (
+ "unsafe"
+)
+
+//go:cgo_import_dynamic libc_readv readv "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_pwritev pwritev "libc.so"
+//go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so"
+//go:cgo_import_dynamic libc_putmsg putmsg "libc.so"
+//go:cgo_import_dynamic libc_getmsg getmsg "libc.so"
+
+//go:linkname procreadv libc_readv
+//go:linkname procpreadv libc_preadv
+//go:linkname procwritev libc_writev
+//go:linkname procpwritev libc_pwritev
+//go:linkname procaccept4 libc_accept4
+//go:linkname procputmsg libc_putmsg
+//go:linkname procgetmsg libc_getmsg
+
+var (
+ procreadv,
+ procpreadv,
+ procwritev,
+ procpwritev,
+ procaccept4,
+ procputmsg,
+ procgetmsg syscallFunc
+)
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readv(fd int, iovs []Iovec) (n int, err error) {
+ var _p0 *Iovec
+ if len(iovs) > 0 {
+ _p0 = &iovs[0]
+ }
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procreadv)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func preadv(fd int, iovs []Iovec, off int64) (n int, err error) {
+ var _p0 *Iovec
+ if len(iovs) > 0 {
+ _p0 = &iovs[0]
+ }
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpreadv)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writev(fd int, iovs []Iovec) (n int, err error) {
+ var _p0 *Iovec
+ if len(iovs) > 0 {
+ _p0 = &iovs[0]
+ }
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwritev)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwritev(fd int, iovs []Iovec, off int64) (n int, err error) {
+ var _p0 *Iovec
+ if len(iovs) > 0 {
+ _p0 = &iovs[0]
+ }
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpwritev)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept4)), 4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {
+ _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) {
+ _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index c1cc0a4..7305cc9 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_11.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -1,7 +1,7 @@
-// go run mksyscall.go -l32 -tags darwin,386,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_386.1_11.go syscall_darwin_386.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
+// Code generated by mkmerge.go; DO NOT EDIT.
-// +build darwin,386,!go1.12
+//go:build linux
+// +build linux
package unix
@@ -10,13 +10,11 @@ import (
"unsafe"
)
-var _ syscall.Errno
-
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- n = int(r0)
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -25,19 +23,13 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
+func fchmodat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
+ _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -46,9 +38,8 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -57,29 +48,18 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
+func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
- fd = int(r0)
+ _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -88,18 +68,14 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
+func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -108,18 +84,14 @@ func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr)
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if e1 != 0 {
- err = errnoErr(e1)
+func openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r0, _, e1 := Syscall6(SYS_OPENAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(open_how)), uintptr(size), 0, 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -128,8 +100,9 @@ func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
+func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -138,24 +111,19 @@ func Shutdown(s int, how int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
+ var _p1 unsafe.Pointer
+ if len(buf) > 0 {
+ _p1 = unsafe.Pointer(&buf[0])
} else {
- _p0 = unsafe.Pointer(&_zero)
+ _p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -165,25 +133,18 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
}
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e1 != 0 {
- err = errnoErr(e1)
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
+ _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -192,20 +153,13 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
+func Unlinkat(dirfd int, path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
- n = int(r0)
+ _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -214,13 +168,13 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func utimes(path string, timeval *[2]Timeval) (err error) {
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -229,8 +183,15 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+func Getcwd(buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -239,9 +200,9 @@ func futimes(fd int, timeval *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
+func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
+ r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -250,14 +211,9 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Madvise(b []byte, behav int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
+ r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
+ ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -266,14 +222,15 @@ func Madvise(b []byte, behav int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Mlock(b []byte) (err error) {
+func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
+ ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -282,8 +239,14 @@ func Mlock(b []byte) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
+func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(arg2)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
+ ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -292,14 +255,19 @@ func Mlockall(flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
+func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(arg3)
+ if err != nil {
+ return
}
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ var _p1 *byte
+ _p1, err = BytePtrFromString(arg4)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
+ ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -308,14 +276,14 @@ func Mprotect(b []byte, prot int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Msync(b []byte, flags int) (err error) {
+func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
+ if len(payload) > 0 {
+ _p0 = unsafe.Pointer(&payload[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -324,14 +292,15 @@ func Msync(b []byte, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Munlock(b []byte) (err error) {
+func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
+ ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -340,8 +309,18 @@ func Munlock(b []byte) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
+func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(keyType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(restriction)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -350,8 +329,8 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
+ _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -360,10 +339,8 @@ func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
+func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
+ _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -372,19 +349,13 @@ func pipe() (r int, w int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
+func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
+ _p0, err = BytePtrFromString(arg)
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
+ _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -393,34 +364,23 @@ func getxattr(path string, attr string, dest *byte, size int, position uint32, o
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
+func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(attr)
+ _p0, err = BytePtrFromString(source)
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ var _p1 *byte
+ _p1, err = BytePtrFromString(target)
if err != nil {
return
}
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
+ var _p2 *byte
+ _p2, err = BytePtrFromString(fstype)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
+ _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -429,13 +389,13 @@ func setxattr(path string, attr string, data *byte, size int, position uint32, o
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
+func Acct(path string) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(attr)
+ _p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
+ _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -444,18 +404,25 @@ func fsetxattr(fd int, attr string, data *byte, size int, position uint32, optio
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func removexattr(path string, attr string, options int) (err error) {
+func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ _p0, err = BytePtrFromString(keyType)
if err != nil {
return
}
var _p1 *byte
- _p1, err = BytePtrFromString(attr)
+ _p1, err = BytePtrFromString(description)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
+ var _p2 unsafe.Pointer
+ if len(payload) > 0 {
+ _p2 = unsafe.Pointer(&payload[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
+ id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -464,13 +431,9 @@ func removexattr(path string, attr string, options int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fremovexattr(fd int, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
+func Adjtimex(buf *Timex) (state int, err error) {
+ r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
+ state = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -479,14 +442,8 @@ func fremovexattr(fd int, attr string, options int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
+func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
+ _, _, e1 := RawSyscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -495,9 +452,8 @@ func listxattr(path string, dest *byte, size int, options int) (sz int, err erro
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
- r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
+func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
+ _, _, e1 := RawSyscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -506,8 +462,13 @@ func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+func Chdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -516,9 +477,13 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
+func Chroot(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -527,8 +492,8 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
+func ClockGetres(clockid int32, res *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -537,8 +502,8 @@ func kill(pid int, signum int, posix int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+func ClockGettime(clockid int32, time *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -547,14 +512,8 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
- var _p0 unsafe.Pointer
- if len(mib) > 0 {
- _p0 = unsafe.Pointer(&mib[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
+ _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -563,8 +522,8 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0)
+func Close(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -573,13 +532,8 @@ func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Access(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+func CloseRange(first uint, last uint, flags uint) (err error) {
+ _, _, e1 := Syscall(SYS_CLOSE_RANGE, uintptr(first), uintptr(last), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -588,8 +542,9 @@ func Access(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -598,13 +553,13 @@ func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Chdir(path string) (err error) {
+func DeleteModule(name string, flags int) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ _p0, err = BytePtrFromString(name)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -613,13 +568,9 @@ func Chdir(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Chflags(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+func Dup(oldfd int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -628,13 +579,8 @@ func Chflags(path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Chmod(path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+func Dup3(oldfd int, newfd int, flags int) (err error) {
+ _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -643,13 +589,9 @@ func Chmod(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Chown(path string, uid int, gid int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+func EpollCreate1(flag int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -658,13 +600,8 @@ func Chown(path string, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
+ _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -673,8 +610,9 @@ func Chroot(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+func Eventfd(initval uint, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -683,19 +621,15 @@ func Close(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
- nfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
+func Exit(code int) {
+ SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+func Fchdir(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -704,18 +638,8 @@ func Dup2(from int, to int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
+func Fchmod(fd int, mode uint32) (err error) {
+ _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -724,20 +648,13 @@ func Exchangedata(path1 string, path2 string, options int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
+func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -746,8 +663,8 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+func Fdatasync(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -756,8 +673,20 @@ func Fchdir(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
+func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(dest) > 0 {
+ _p1 = unsafe.Pointer(&dest[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
+ sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -766,8 +695,13 @@ func Fchflags(fd int, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+func FinitModule(fd int, params string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(params)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -776,13 +710,15 @@ func Fchmod(fd int, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func Flistxattr(fd int, dest []byte) (sz int, err error) {
+ var _p0 unsafe.Pointer
+ if len(dest) > 0 {
+ _p0 = unsafe.Pointer(&dest[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
+ sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -791,8 +727,8 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+func Flock(fd int, how int) (err error) {
+ _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -801,13 +737,13 @@ func Fchown(fd int, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
+func Fremovexattr(fd int, attr string) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ _p0, err = BytePtrFromString(attr)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -816,8 +752,19 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
+func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(dest) > 0 {
+ _p1 = unsafe.Pointer(&dest[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -826,9 +773,8 @@ func Flock(fd int, how int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
- val = int(r0)
+func Fsync(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -837,8 +783,15 @@ func Fpathconf(fd int, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+func Getdents(fd int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -847,8 +800,9 @@ func Fsync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
+func Getpgid(pid int) (pgid int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -857,41 +811,52 @@ func Ftruncate(fd int, length int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
+func Getpid() (pid int) {
+ r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
+ pid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
- egid = int(r0)
+func Getppid() (ppid int) {
+ r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
+ ppid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
- uid = int(r0)
+func Getpriority(which int, who int) (prio int, err error) {
+ r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ prio = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
- gid = int(r0)
+func Getrandom(buf []byte, flags int) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
+func Getrusage(who int, rusage *Rusage) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -900,33 +865,65 @@ func Getpgid(pid int) (pgid int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
- pgrp = int(r0)
+func Getsid(pid int) (sid int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
+ sid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
+func Gettid() (tid int) {
+ r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
+ tid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
+func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(dest) > 0 {
+ _p2 = unsafe.Pointer(&dest[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
+ sz = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
+func InitModule(moduleImage []byte, params string) (err error) {
+ var _p0 unsafe.Pointer
+ if len(moduleImage) > 0 {
+ _p0 = unsafe.Pointer(&moduleImage[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(params)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -935,8 +932,14 @@ func Getpriority(which int, who int) (prio int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(pathname)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
+ watchdesc = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -945,8 +948,9 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+func InotifyInit1(flags int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -955,9 +959,9 @@ func Getrusage(who int, rusage *Rusage) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
+func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
+ r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
+ success = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -966,25 +970,52 @@ func Getsid(pid int) (sid int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
- uid = int(r0)
+func Kill(pid int, sig syscall.Signal) (err error) {
+ _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
- tainted = bool(r0 != 0)
+func Klogctl(typ int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
- fd = int(r0)
+func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(dest) > 0 {
+ _p2 = unsafe.Pointer(&dest[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
+ sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -993,13 +1024,20 @@ func Kqueue() (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Lchown(path string, uid int, gid int) (err error) {
+func Listxattr(path string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ var _p1 unsafe.Pointer
+ if len(dest) > 0 {
+ _p1 = unsafe.Pointer(&dest[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
+ sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1008,18 +1046,20 @@ func Lchown(path string, uid int, gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Link(path string, link string) (err error) {
+func Llistxattr(path string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
+ var _p1 unsafe.Pointer
+ if len(dest) > 0 {
+ _p1 = unsafe.Pointer(&dest[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
+ sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1028,18 +1068,18 @@ func Link(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
+func Lremovexattr(path string, attr string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
- _p1, err = BytePtrFromString(link)
+ _p1, err = BytePtrFromString(attr)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1048,8 +1088,24 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
+func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(data) > 0 {
+ _p2 = unsafe.Pointer(&data[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1058,13 +1114,14 @@ func Listen(s int, backlog int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Mkdir(path string, mode uint32) (err error) {
+func MemfdCreate(name string, flags int) (fd int, err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ _p0, err = BytePtrFromString(name)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1088,13 +1145,13 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Mkfifo(path string, mode uint32) (err error) {
+func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1103,13 +1160,8 @@ func Mkfifo(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Mknod(path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1118,13 +1170,8 @@ func Mknod(path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1134,14 +1181,18 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
+func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ _p0, err = BytePtrFromString(newroot)
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
- fd = int(r0)
+ var _p1 *byte
+ _p1, err = BytePtrFromString(putold)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1150,14 +1201,8 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pathconf(path string, name int) (val int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
- val = int(r0)
+func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
+ _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1166,15 +1211,8 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
- n = int(r0)
+func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
+ _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1183,14 +1221,8 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
+func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1217,42 +1249,18 @@ func read(fd int, p []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Readlink(path string, buf []byte) (n int, err error) {
+func Removexattr(path string, attr string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
if err != nil {
return
}
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
+ _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1261,18 +1269,18 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Rename(from string, to string) (err error) {
+func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(from)
+ _p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
- _p1, err = BytePtrFromString(to)
+ _p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1281,18 +1289,24 @@ func Rename(from string, to string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Renameat(fromfd int, from string, tofd int, to string) (err error) {
+func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(from)
+ _p0, err = BytePtrFromString(keyType)
if err != nil {
return
}
var _p1 *byte
- _p1, err = BytePtrFromString(to)
+ _p1, err = BytePtrFromString(description)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ var _p2 *byte
+ _p2, err = BytePtrFromString(callback)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
+ id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1301,13 +1315,14 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Revoke(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func Setdomainname(p []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1316,13 +1331,14 @@ func Revoke(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Rmdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func Sethostname(p []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1331,9 +1347,8 @@ func Rmdir(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
- newoffset = int64(int64(r1)<<32 | int64(r0))
+func Setpgid(pid int, pgid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1342,9 +1357,9 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
- n = int(r0)
+func Setsid() (pid int, err error) {
+ r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
+ pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1353,8 +1368,8 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
+func Settimeofday(tv *Timeval) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1363,8 +1378,8 @@ func Setegid(egid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
+func Setns(fd int, nstype int) (err error) {
+ _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1373,8 +1388,8 @@ func Seteuid(euid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
+func Setpriority(which int, who int, prio int) (err error) {
+ _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1383,13 +1398,24 @@ func Setgid(gid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setlogin(name string) (err error) {
+func Setxattr(path string, attr string, data []byte, flags int) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(name)
+ _p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ var _p1 *byte
+ _p1, err = BytePtrFromString(attr)
+ if err != nil {
+ return
+ }
+ var _p2 unsafe.Pointer
+ if len(data) > 0 {
+ _p2 = unsafe.Pointer(&data[0])
+ } else {
+ _p2 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1398,8 +1424,9 @@ func Setlogin(name string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
+ r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
+ newfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1408,8 +1435,13 @@ func Setpgid(pid int, pgid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1418,8 +1450,15 @@ func Setpriority(which int, who int, prio int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
+func Sync() {
+ SyscallNoError(SYS_SYNC, 0, 0, 0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Syncfs(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1428,8 +1467,8 @@ func Setprivexec(flag int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+func Sysinfo(info *Sysinfo_t) (err error) {
+ _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1438,8 +1477,9 @@ func Setregid(rgid int, egid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+func TimerfdCreate(clockid int, flags int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_TIMERFD_CREATE, uintptr(clockid), uintptr(flags), 0)
+ fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1448,8 +1488,8 @@ func Setreuid(ruid int, euid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+func TimerfdGettime(fd int, currValue *ItimerSpec) (err error) {
+ _, _, e1 := RawSyscall(SYS_TIMERFD_GETTIME, uintptr(fd), uintptr(unsafe.Pointer(currValue)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1458,9 +1498,8 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
+func TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error) {
+ _, _, e1 := RawSyscall6(SYS_TIMERFD_SETTIME, uintptr(fd), uintptr(flags), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1469,8 +1508,8 @@ func Setsid() (pid int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
+func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
+ _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1479,8 +1518,9 @@ func Settimeofday(tp *Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
+func Times(tms *Tms) (ticks uintptr, err error) {
+ r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
+ ticks = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1489,18 +1529,16 @@ func Setuid(uid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Symlink(path string, link string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(link)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+func Umask(mask int) (oldmask int) {
+ r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
+ oldmask = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Uname(buf *Utsname) (err error) {
+ _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1509,18 +1547,13 @@ func Symlink(path string, link string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+func Unmount(target string, flags int) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
+ _p0, err = BytePtrFromString(target)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1529,8 +1562,8 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
+func Unshare(flags int) (err error) {
+ _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1539,13 +1572,15 @@ func Sync() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Truncate(path string, length int64) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func write(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
+ r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1554,21 +1589,19 @@ func Truncate(path string, length int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
- oldmask = int(r0)
+func exitThread(code int) (err error) {
+ _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+func readlen(fd int, p *byte, np int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1577,13 +1610,9 @@ func Undelete(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Unlink(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
+func writelen(fd int, p *byte, np int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1592,13 +1621,15 @@ func Unlink(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func readv(fd int, iovs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovs) > 0 {
+ _p0 = unsafe.Pointer(&iovs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1607,13 +1638,15 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Unmount(path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func writev(fd int, iovs []Iovec) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovs) > 0 {
+ _p0 = unsafe.Pointer(&iovs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1622,14 +1655,14 @@ func Unmount(path string, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func write(fd int, p []byte) (n int, err error) {
+func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
+ if len(iovs) > 0 {
+ _p0 = unsafe.Pointer(&iovs[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1639,9 +1672,15 @@ func write(fd int, p []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
- ret = uintptr(r0)
+func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovs) > 0 {
+ _p0 = unsafe.Pointer(&iovs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1650,8 +1689,15 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovs) > 0 {
+ _p0 = unsafe.Pointer(&iovs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1660,8 +1706,14 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(iovs) > 0 {
+ _p0 = unsafe.Pointer(&iovs[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1671,9 +1723,8 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
- n = int(r0)
+func munmap(addr uintptr, length uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1682,15 +1733,14 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+func Madvise(b []byte, advice int) (err error) {
var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
+ _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1699,8 +1749,14 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
+func Mprotect(b []byte, prot int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1709,10 +1765,14 @@ func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int32(r0)
- usec = int32(r1)
+func Mlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1721,8 +1781,8 @@ func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+func Mlockall(flags int) (err error) {
+ _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1731,13 +1791,14 @@ func Fstat(fd int, stat *Stat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
+func Msync(b []byte, flags int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1746,8 +1807,14 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+func Munlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1756,9 +1823,8 @@ func Fstatfs(fd int, stat *Statfs_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(buf), uintptr(size), uintptr(flags))
- n = int(r0)
+func Munlockall() (err error) {
+ _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1767,13 +1833,13 @@ func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Lstat(path string, stat *Stat_t) (err error) {
+func faccessat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1782,13 +1848,13 @@ func Lstat(path string, stat *Stat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Stat(path string, stat *Stat_t) (err error) {
+func Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := Syscall6(SYS_FACCESSAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1797,13 +1863,80 @@ func Stat(path string, stat *Stat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Statfs(path string, stat *Statfs_t) (err error) {
+func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
var _p0 *byte
- _p0, err = BytePtrFromString(path)
+ _p0, err = BytePtrFromString(pathname)
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(localIov) > 0 {
+ _p0 = unsafe.Pointer(&localIov[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ var _p1 unsafe.Pointer
+ if len(remoteIov) > 0 {
+ _p1 = unsafe.Pointer(&remoteIov[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PROCESS_VM_READV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(localIov) > 0 {
+ _p0 = unsafe.Pointer(&localIov[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ var _p1 unsafe.Pointer
+ if len(remoteIov) > 0 {
+ _p1 = unsafe.Pointer(&remoteIov[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PROCESS_VM_WRITEV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
index 0e68c14..e37096e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && 386
// +build linux,386
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(int64(r1)<<32 | int64(r0))
@@ -1484,372 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func pipe(p *[2]_C_int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
@@ -1860,17 +56,7 @@ func pipe(p *[2]_C_int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
+func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
index c038e52..9919d84 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && amd64
// +build linux,amd64
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,373 +46,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
+func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2525,16 +721,6 @@ func pipe(p *[2]_C_int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
index 333683d..076754d 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -arm -tags linux,arm syscall_linux.go syscall_linux_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && arm
// +build linux,arm
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(int64(r1)<<32 | int64(r0))
@@ -1484,372 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func pipe(p *[2]_C_int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
@@ -1860,16 +56,6 @@ func pipe(p *[2]_C_int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
@@ -2049,7 +235,7 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Dup2(oldfd int, newfd int) (err error) {
+func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
index 838bbdb..e893f98 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,arm64 syscall_linux.go syscall_linux_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && arm64
// +build linux,arm64
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,372 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -1956,7 +152,7 @@ func Getgid() (gid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
+func getrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2112,7 +308,7 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
+func setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2393,16 +589,6 @@ func Gettimeofday(tv *Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(cmdline)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
index 7da49ae..4703cf3 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && mips
// +build linux,mips
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off>>32), uintptr(off), uintptr(len>>32), uintptr(len))
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(int64(r0)<<32 | int64(r1))
@@ -1484,373 +46,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
+func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2510,16 +706,6 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func pipe() (p1 int, p2 int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
p1 = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
index f22f83f..a134f9a 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && mips64
// +build linux,mips64
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,373 +46,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
+func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2469,16 +665,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fstat(fd int, st *stat_t) (err error) {
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
index 307c430..b1fff2d 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,mips64le syscall_linux.go syscall_linux_mips64x.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && mips64le
// +build linux,mips64le
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,373 +46,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
+func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2469,16 +665,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fstat(fd int, st *stat_t) (err error) {
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
index 0997b6e..d13d6da 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && mipsle
// +build linux,mipsle
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(int64(r1)<<32 | int64(r0))
@@ -1484,373 +46,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
+func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2510,16 +706,6 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func pipe() (p1 int, p2 int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
p1 = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
new file mode 100644
index 0000000..927cf1a
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
@@ -0,0 +1,762 @@
+// go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build linux && ppc
+// +build linux,ppc
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+ _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
+ _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off>>32), uintptr(off), uintptr(len>>32), uintptr(len))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
+ r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
+ n = int64(int64(r0)<<32 | int64(r1))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func dup2(oldfd int, newfd int) (err error) {
+ _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func EpollCreate(size int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(events) > 0 {
+ _p0 = unsafe.Pointer(&events[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchown(fd int, uid int, gid int) (err error) {
+ _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length>>32), uintptr(length))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+ r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
+ egid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (euid int) {
+ r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
+ euid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+ r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+ r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func InotifyInit() (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ioperm(from int, num int, on int) (err error) {
+ _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Iopl(level int) (err error) {
+ _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lchown(path string, uid int, gid int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, n int) (err error) {
+ _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lstat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pause() (err error) {
+ _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset>>32), uintptr(offset), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset>>32), uintptr(offset), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
+ r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
+ written = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setfsgid(gid int) (prev int, err error) {
+ r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
+ prev = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setfsuid(uid int) (prev int, err error) {
+ r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
+ prev = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresgid(rgid int, egid int, sgid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresuid(ruid int, euid int, suid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(fd int, how int) (err error) {
+ _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Stat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length>>32), uintptr(length))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ustat(dev int, ubuf *Ustat_t) (err error) {
+ _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(n int, list *_Gid_t) (nn int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ nn = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(n int, list *_Gid_t) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+ _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+ _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+ _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gettimeofday(tv *Timeval) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Time(t *Time_t) (tt Time_t, err error) {
+ r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
+ tt = Time_t(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Utime(path string, buf *Utimbuf) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimes(path string, times *[2]Timeval) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
+ r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
+ xaddr = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getrlimit(resource int, rlim *rlimit32) (err error) {
+ _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setrlimit(resource int, rlim *rlimit32) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe(p *[2]_C_int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
+ _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(cmdline)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
index a601e72..da8ec03 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && ppc64
// +build linux,ppc64
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,373 +46,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
+func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2577,16 +773,6 @@ func pipe(p *[2]_C_int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
index 6e4cb19..083f493 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && ppc64le
// +build linux,ppc64le
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,373 +46,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
+func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2577,16 +773,6 @@ func pipe(p *[2]_C_int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
index e690f19..63b393b 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,riscv64 syscall_linux.go syscall_linux_riscv64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && riscv64
// +build linux,riscv64
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,372 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -2373,16 +569,6 @@ func Gettimeofday(tv *Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(cmdline)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
index f4cd086..bb34740 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && s390x
// +build linux,s390x
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,373 +46,7 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
+func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2357,16 +553,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
index 2447f2a..8edc517 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build linux && sparc64
// +build linux,sparc64
package unix
@@ -14,17 +15,6 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
@@ -35,585 +25,6 @@ func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fchmodat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(buf) > 0 {
- _p1 = unsafe.Pointer(&buf[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
- wpid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg2)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg3)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(arg4)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
- var _p0 unsafe.Pointer
- if len(payload) > 0 {
- _p0 = unsafe.Pointer(&payload[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
- ret = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(restriction)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
- _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(arg)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(source)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(fstype)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(payload) > 0 {
- _p2 = unsafe.Pointer(&payload[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
- r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
- state = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
- _, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGetres(clockid int32, res *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
- _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func DeleteModule(name string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
- _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Eventfd(initval uint, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
- SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
@@ -624,855 +35,6 @@ func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func FinitModule(fd int, params string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- var _p0 unsafe.Pointer
- if len(dest) > 0 {
- _p0 = unsafe.Pointer(&dest[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fremovexattr(fd int, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
- pgid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
- r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
- pid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
- r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
- ppid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
- prio = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrandom(buf []byte, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
- sid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
- r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
- tid = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InitModule(moduleImage []byte, params string) (err error) {
- var _p0 unsafe.Pointer
- if len(moduleImage) > 0 {
- _p0 = unsafe.Pointer(&moduleImage[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(params)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
- watchdesc = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
- success = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(dest) > 0 {
- _p2 = unsafe.Pointer(&dest[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Llistxattr(path string, dest []byte) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 unsafe.Pointer
- if len(dest) > 0 {
- _p1 = unsafe.Pointer(&dest[0])
- } else {
- _p1 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lremovexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func MemfdCreate(name string, flags int) (fd int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(name)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
- r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(newroot)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(putold)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(oldpath)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(newpath)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(keyType)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(description)
- if err != nil {
- return
- }
- var _p2 *byte
- _p2, err = BytePtrFromString(callback)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
- id = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
- pid = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
- _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- var _p2 unsafe.Pointer
- if len(data) > 0 {
- _p2 = unsafe.Pointer(&data[0])
- } else {
- _p2 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
- r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
- newfd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
- SyscallNoError(SYS_SYNC, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Syncfs(fd int) (err error) {
- _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
@@ -1484,372 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
- _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
- r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
- ticks = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
- r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
- oldmask = int(r0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
- _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(target)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
- _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(p) > 0 {
- _p0 = unsafe.Pointer(&p[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
- _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readv(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writev(fd int, iovs []Iovec) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 0)
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- if len(iovs) > 0 {
- _p0 = unsafe.Pointer(&iovs[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Msync(b []byte, flags int) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
- var _p0 unsafe.Pointer
- if len(b) > 0 {
- _p0 = unsafe.Pointer(&b[0])
- } else {
- _p0 = unsafe.Pointer(&_zero)
- }
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func faccessat(dirfd int, path string, mode uint32) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(pathname)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -1877,7 +73,7 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Dup2(oldfd int, newfd int) (err error) {
+func dup2(oldfd int, newfd int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
if e1 != 0 {
err = errnoErr(e1)
@@ -2535,16 +731,6 @@ func pipe(p *[2]_C_int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
index 3bbd9e3..4726ab3 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -netbsd -tags netbsd,386 syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build netbsd && 386
// +build netbsd,386
package unix
@@ -362,6 +363,16 @@ func pipe() (fd1 int, fd2 int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getdents(fd int, buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
index d8cf501..fe71456 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -netbsd -tags netbsd,amd64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build netbsd && amd64
// +build netbsd,amd64
package unix
@@ -362,6 +363,16 @@ func pipe() (fd1 int, fd2 int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getdents(fd int, buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
index 1153fe6..0b5b2f0 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -netbsd -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build netbsd && arm
// +build netbsd,arm
package unix
@@ -362,6 +363,16 @@ func pipe() (fd1 int, fd2 int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getdents(fd int, buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
index 24b4ebb..bfca286 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -netbsd -tags netbsd,arm64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build netbsd && arm64
// +build netbsd,arm64
package unix
@@ -362,6 +363,16 @@ func pipe() (fd1 int, fd2 int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getdents(fd int, buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
index b44b31a..8f80f4a 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -openbsd -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build openbsd && 386
// +build openbsd,386
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
index 67f93ee..3a47aca 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -openbsd -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build openbsd && amd64
// +build openbsd,amd64
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
index d7c878b..883a9b4 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -openbsd -arm -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build openbsd && arm
// +build openbsd,arm
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
index 8facd69..aac7fdc 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -openbsd -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build openbsd && arm64
// +build openbsd,arm64
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
index 8c3bb3a..8776187 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_11.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
@@ -1,7 +1,8 @@
-// go run mksyscall.go -tags darwin,arm64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.1_11.go syscall_darwin_arm64.go
+// go run mksyscall.go -openbsd -tags openbsd,mips64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_mips64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
-// +build darwin,arm64,!go1.12
+//go:build openbsd && mips64
+// +build openbsd,mips64
package unix
@@ -350,8 +351,8 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -360,154 +361,15 @@ func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (r int, w int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- r = int(r0)
- w = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func removexattr(path string, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fremovexattr(fd int, attr string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(attr)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
- r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
- sz = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
+func Getdents(fd int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+ r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -516,19 +378,15 @@ func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintp
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
- val = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
+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)
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
+ r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -554,7 +412,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} 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))
+ _, _, 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)
}
@@ -563,8 +421,9 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
- _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
+func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -704,18 +563,8 @@ func Dup2(from int, to int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Exchangedata(path1 string, path2 string, options int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path1)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = BytePtrFromString(path2)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
+func Dup3(from int, to int, flags int) (err error) {
+ _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -837,8 +686,8 @@ func Fpathconf(fd int, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+func Fstat(fd int, stat *Stat_t) (err error) {
+ _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -847,8 +696,13 @@ func Fsync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
+func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -857,9 +711,31 @@ func Ftruncate(fd int, length int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Getdtablesize() (size int) {
- r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
- size = int(r0)
+func Fstatfs(fd int, stat *Statfs_t) (err error) {
+ _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsync(fd int) (err error) {
+ _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
return
}
@@ -945,6 +821,17 @@ func Getrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Getrtable() (rtable int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
+ rtable = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getrusage(who int, rusage *Rusage) (err error) {
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
@@ -966,6 +853,16 @@ func Getsid(pid int) (sid int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Gettimeofday(tv *Timeval) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getuid() (uid int) {
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
uid = int(r0)
@@ -975,13 +872,23 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
- r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
+ r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Kill(pid int, signum syscall.Signal) (err error) {
+ _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Kqueue() (fd int, err error) {
r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
fd = int(r0)
@@ -1058,6 +965,21 @@ func Listen(s int, backlog int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Lstat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mkdir(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1103,6 +1025,21 @@ func Mkfifo(path string, mode uint32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Mknod(path string, mode uint32, dev int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1118,6 +1055,31 @@ func Mknod(path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
+ _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Open(path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1173,7 +1135,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1190,7 +1152,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1332,7 +1294,7 @@ func Rmdir(path string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
+ r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
newoffset = int64(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1354,7 +1316,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
- _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
+ _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1418,8 +1380,8 @@ func Setpriority(which int, who int, prio int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setprivexec(flag int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
+func Setregid(rgid int, egid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1428,8 +1390,8 @@ func Setprivexec(flag int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+func Setreuid(ruid int, euid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1438,8 +1400,18 @@ func Setregid(rgid int, egid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+func Setresgid(rgid int, egid int, sgid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresuid(ruid int, euid int, suid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1458,6 +1430,16 @@ func Setrlimit(which int, lim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Setrtable(rtable int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
@@ -1489,6 +1471,36 @@ func Setuid(uid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Stat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statfs(path string, stat *Statfs_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Symlink(path string, link string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1545,7 +1557,7 @@ func Truncate(path string, length int64) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1562,21 +1574,6 @@ func Umask(newmask int) (oldmask int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Undelete(path string) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Unlink(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1640,7 +1637,7 @@ func write(fd int, p []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
+ r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1682,101 +1679,13 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
- r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
- sec = int64(r0)
- usec = int32(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(buf), uintptr(size), uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return
- }
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
index a96165d..4e18d5c 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall_solaris.go -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build solaris && amd64
// +build solaris,amd64
package unix
@@ -11,6 +12,7 @@ import (
)
//go:cgo_import_dynamic libc_pipe pipe "libc.so"
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
//go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so"
//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
@@ -114,6 +116,7 @@ import (
//go:cgo_import_dynamic libc_statvfs statvfs "libc.so"
//go:cgo_import_dynamic libc_symlink symlink "libc.so"
//go:cgo_import_dynamic libc_sync sync "libc.so"
+//go:cgo_import_dynamic libc_sysconf sysconf "libc.so"
//go:cgo_import_dynamic libc_times times "libc.so"
//go:cgo_import_dynamic libc_truncate truncate "libc.so"
//go:cgo_import_dynamic libc_fsync fsync "libc.so"
@@ -140,6 +143,7 @@ import (
//go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
//go:linkname procpipe libc_pipe
+//go:linkname procpipe2 libc_pipe2
//go:linkname procgetsockname libc_getsockname
//go:linkname procGetcwd libc_getcwd
//go:linkname procgetgroups libc_getgroups
@@ -243,6 +247,7 @@ import (
//go:linkname procStatvfs libc_statvfs
//go:linkname procSymlink libc_symlink
//go:linkname procSync libc_sync
+//go:linkname procSysconf libc_sysconf
//go:linkname procTimes libc_times
//go:linkname procTruncate libc_truncate
//go:linkname procFsync libc_fsync
@@ -270,6 +275,7 @@ import (
var (
procpipe,
+ procpipe2,
procgetsockname,
procGetcwd,
procgetgroups,
@@ -373,6 +379,7 @@ var (
procStatvfs,
procSymlink,
procSync,
+ procSysconf,
procTimes,
procTruncate,
procFsync,
@@ -412,6 +419,16 @@ func pipe(p *[2]_C_int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe2)), 2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0, 0, 0, 0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
if e1 != 0 {
@@ -602,8 +619,9 @@ func __minor(version int, dev uint64) (val uint) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
+func ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
+ ret = int(r0)
if e1 != 0 {
err = e1
}
@@ -1674,6 +1692,17 @@ func Sync() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Sysconf(which int) (n int64, err error) {
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSysconf)), 1, uintptr(which), 0, 0, 0, 0, 0)
+ n = int64(r0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Times(tms *Tms) (ticks uintptr, err error) {
r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0)
ticks = uintptr(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
new file mode 100644
index 0000000..8285ab8
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
@@ -0,0 +1,1217 @@
+// go run mksyscall.go -tags zos,s390x syscall_zos_s390x.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build zos && s390x
+// +build zos,s390x
+
+package unix
+
+import (
+ "unsafe"
+)
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fcntl(fd int, cmd int, arg int) (val int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
+ val = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func read(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func write(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
+ r0, _, e1 := syscall_syscall(SYS___ACCEPT_A, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := syscall_syscall(SYS___BIND_A, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := syscall_syscall(SYS___CONNECT_A, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(n int, list *_Gid_t) (nn int, err error) {
+ r0, _, e1 := syscall_rawsyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ nn = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(n int, list *_Gid_t) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+ _, _, e1 := syscall_syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+ _, _, e1 := syscall_syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+ r0, _, e1 := syscall_rawsyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+ _, _, e1 := syscall_rawsyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS___GETPEERNAME_A, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS___GETSOCKNAME_A, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(SYS___RECVFROM_A, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(SYS___SENDTO_A, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(SYS___RECVMSG_A, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(SYS___SENDMSG_A, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
+ r0, _, e1 := syscall_syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
+ ret = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func munmap(addr uintptr, length uintptr) (err error) {
+ _, _, e1 := syscall_syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Access(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___ACCESS_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___CHDIR_A, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chown(path string, uid int, gid int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___CHOWN_A, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chmod(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___CHMOD_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Creat(path string, mode uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall(SYS___CREAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup(oldfd int) (fd int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_DUP, uintptr(oldfd), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup2(oldfd int, newfd int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Exit(code int) {
+ syscall_syscall(SYS_EXIT, uintptr(code), 0, 0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchdir(fd int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmod(fd int, mode uint32) (err error) {
+ _, _, e1 := syscall_syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchown(fd int, uid int, gid int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
+ retval = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fstat(fd int, stat *Stat_LE_t) (err error) {
+ _, _, e1 := syscall_syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatvfs(fd int, stat *Statvfs_t) (err error) {
+ _, _, e1 := syscall_syscall(SYS_FSTATVFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsync(fd int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ _, _, e1 := syscall_syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpagesize() (pgsize int) {
+ r0, _, _ := syscall_syscall(SYS_GETPAGESIZE, 0, 0, 0)
+ pgsize = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mprotect(b []byte, prot int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Msync(b []byte, flags int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(fds) > 0 {
+ _p0 = unsafe.Pointer(&fds[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(SYS_POLL, uintptr(_p0), uintptr(len(fds)), uintptr(timeout))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Times(tms *Tms) (ticks uintptr, err error) {
+ r0, _, e1 := syscall_syscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
+ ticks = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func W_Getmntent(buff *byte, size int) (lastsys int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_W_GETMNTENT, uintptr(unsafe.Pointer(buff)), uintptr(size), 0)
+ lastsys = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mount(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(filesystem)
+ if err != nil {
+ return
+ }
+ var _p2 *byte
+ _p2, err = BytePtrFromString(fstype)
+ if err != nil {
+ return
+ }
+ var _p3 *byte
+ _p3, err = BytePtrFromString(parm)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(SYS___MOUNT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(mtm), uintptr(parmlen), uintptr(unsafe.Pointer(_p3)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unmount(filesystem string, mtm int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(filesystem)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___UMOUNT_A, uintptr(unsafe.Pointer(_p0)), uintptr(mtm), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chroot(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___CHROOT_A, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Uname(buf *Utsname) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS___UNAME_A, uintptr(unsafe.Pointer(buf)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gethostname(buf []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(SYS___GETHOSTNAME_A, uintptr(_p0), uintptr(len(buf)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+ r0, _, _ := syscall_rawsyscall(SYS_GETEGID, 0, 0, 0)
+ egid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (uid int) {
+ r0, _, _ := syscall_rawsyscall(SYS_GETEUID, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+ r0, _, _ := syscall_rawsyscall(SYS_GETGID, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpid() (pid int) {
+ r0, _, _ := syscall_rawsyscall(SYS_GETPID, 0, 0, 0)
+ pid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgid(pid int) (pgid int, err error) {
+ r0, _, e1 := syscall_rawsyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ pgid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getppid() (pid int) {
+ r0, _, _ := syscall_rawsyscall(SYS_GETPPID, 0, 0, 0)
+ pid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpriority(which int, who int) (prio int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ prio = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrlimit(resource int, rlim *Rlimit) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getrusage(who int, rusage *rusage_zos) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getsid(pid int) (sid int, err error) {
+ r0, _, e1 := syscall_rawsyscall(SYS_GETSID, uintptr(pid), 0, 0)
+ sid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+ r0, _, _ := syscall_rawsyscall(SYS_GETUID, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kill(pid int, sig Signal) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lchown(path string, uid int, gid int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___LCHOWN_A, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Link(path string, link string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___LINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, n int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func lstat(path string, stat *Stat_LE_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___LSTAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdir(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___MKDIR_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkfifo(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___MKFIFO_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknod(path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___MKNOD_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlink(path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(buf) > 0 {
+ _p1 = unsafe.Pointer(&buf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(SYS___READLINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rename(from string, to string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___RENAME_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rmdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___RMDIR_A, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seek(fd int, offset int64, whence int) (off int64, err error) {
+ r0, _, e1 := syscall_syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
+ off = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpriority(which int, who int, prio int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpgid(pid int, pgid int) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrlimit(resource int, lim *Rlimit) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(lim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setsid() (pid int, err error) {
+ r0, _, e1 := syscall_rawsyscall(SYS_SETSID, 0, 0, 0)
+ pid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setuid(uid int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_SETUID, uintptr(uid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setgid(uid int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_SETGID, uintptr(uid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(fd int, how int) (err error) {
+ _, _, e1 := syscall_syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func stat(path string, statLE *Stat_LE_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___STAT_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(statLE)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Symlink(path string, link string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___SYMLINK_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sync() {
+ syscall_syscall(SYS_SYNC, 0, 0, 0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___TRUNCATE_A, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Tcgetattr(fildes int, termptr *Termios) (err error) {
+ _, _, e1 := syscall_syscall(SYS_TCGETATTR, uintptr(fildes), uintptr(unsafe.Pointer(termptr)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Tcsetattr(fildes int, when int, termptr *Termios) (err error) {
+ _, _, e1 := syscall_syscall(SYS_TCSETATTR, uintptr(fildes), uintptr(when), uintptr(unsafe.Pointer(termptr)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Umask(mask int) (oldmask int) {
+ r0, _, _ := syscall_syscall(SYS_UMASK, uintptr(mask), 0, 0)
+ oldmask = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlink(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___UNLINK_A, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Utime(path string, utim *Utimbuf) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___UTIME_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(utim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func open(path string, mode int, perm uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall(SYS___OPEN_A, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func remove(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error) {
+ r0, _, e1 := syscall_syscall(SYS_WAITPID, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options))
+ wpid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func gettimeofday(tv *timeval_zos) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe(p *[2]_C_int) (err error) {
+ _, _, e1 := syscall_rawsyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimes(path string, timeval *[2]Timeval) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(SYS___UTIMES_A, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
index 37dcc74..9e9d0b2 100644
--- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go
@@ -1,6 +1,7 @@
-// mksysctl_openbsd.pl
+// go run mksysctl_openbsd.go
// Code generated by the command above; DO NOT EDIT.
+//go:build 386 && openbsd
// +build 386,openbsd
package unix
@@ -30,6 +31,7 @@ var sysctlMib = []mibentry{
{"hw.model", []_C_int{6, 2}},
{"hw.ncpu", []_C_int{6, 3}},
{"hw.ncpufound", []_C_int{6, 21}},
+ {"hw.ncpuonline", []_C_int{6, 25}},
{"hw.pagesize", []_C_int{6, 7}},
{"hw.physmem", []_C_int{6, 19}},
{"hw.product", []_C_int{6, 15}},
diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go
index fe6caa6..adecd09 100644
--- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksysctl_openbsd.go
// Code generated by the command above; DO NOT EDIT.
+//go:build amd64 && openbsd
// +build amd64,openbsd
package unix
@@ -31,6 +32,7 @@ var sysctlMib = []mibentry{
{"hw.model", []_C_int{6, 2}},
{"hw.ncpu", []_C_int{6, 3}},
{"hw.ncpufound", []_C_int{6, 21}},
+ {"hw.ncpuonline", []_C_int{6, 25}},
{"hw.pagesize", []_C_int{6, 7}},
{"hw.perfpolicy", []_C_int{6, 23}},
{"hw.physmem", []_C_int{6, 19}},
diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go
index 6eb8c0b..8ea52a4 100644
--- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go
@@ -1,6 +1,7 @@
// go run mksysctl_openbsd.go
// Code generated by the command above; DO NOT EDIT.
+//go:build arm && openbsd
// +build arm,openbsd
package unix
@@ -30,6 +31,7 @@ var sysctlMib = []mibentry{
{"hw.model", []_C_int{6, 2}},
{"hw.ncpu", []_C_int{6, 3}},
{"hw.ncpufound", []_C_int{6, 21}},
+ {"hw.ncpuonline", []_C_int{6, 25}},
{"hw.pagesize", []_C_int{6, 7}},
{"hw.physmem", []_C_int{6, 19}},
{"hw.product", []_C_int{6, 15}},
diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go
index ba4304f..154b57a 100644
--- a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go
@@ -1,6 +1,7 @@
// go run mksysctl_openbsd.go
// Code generated by the command above; DO NOT EDIT.
+//go:build arm64 && openbsd
// +build arm64,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go
new file mode 100644
index 0000000..d96bb2b
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go
@@ -0,0 +1,280 @@
+// go run mksysctl_openbsd.go
+// Code generated by the command above; DO NOT EDIT.
+
+//go:build mips64 && openbsd
+// +build mips64,openbsd
+
+package unix
+
+type mibentry struct {
+ ctlname string
+ ctloid []_C_int
+}
+
+var sysctlMib = []mibentry{
+ {"ddb.console", []_C_int{9, 6}},
+ {"ddb.log", []_C_int{9, 7}},
+ {"ddb.max_line", []_C_int{9, 3}},
+ {"ddb.max_width", []_C_int{9, 2}},
+ {"ddb.panic", []_C_int{9, 5}},
+ {"ddb.profile", []_C_int{9, 9}},
+ {"ddb.radix", []_C_int{9, 1}},
+ {"ddb.tab_stop_width", []_C_int{9, 4}},
+ {"ddb.trigger", []_C_int{9, 8}},
+ {"fs.posix.setuid", []_C_int{3, 1, 1}},
+ {"hw.allowpowerdown", []_C_int{6, 22}},
+ {"hw.byteorder", []_C_int{6, 4}},
+ {"hw.cpuspeed", []_C_int{6, 12}},
+ {"hw.diskcount", []_C_int{6, 10}},
+ {"hw.disknames", []_C_int{6, 8}},
+ {"hw.diskstats", []_C_int{6, 9}},
+ {"hw.machine", []_C_int{6, 1}},
+ {"hw.model", []_C_int{6, 2}},
+ {"hw.ncpu", []_C_int{6, 3}},
+ {"hw.ncpufound", []_C_int{6, 21}},
+ {"hw.ncpuonline", []_C_int{6, 25}},
+ {"hw.pagesize", []_C_int{6, 7}},
+ {"hw.perfpolicy", []_C_int{6, 23}},
+ {"hw.physmem", []_C_int{6, 19}},
+ {"hw.product", []_C_int{6, 15}},
+ {"hw.serialno", []_C_int{6, 17}},
+ {"hw.setperf", []_C_int{6, 13}},
+ {"hw.smt", []_C_int{6, 24}},
+ {"hw.usermem", []_C_int{6, 20}},
+ {"hw.uuid", []_C_int{6, 18}},
+ {"hw.vendor", []_C_int{6, 14}},
+ {"hw.version", []_C_int{6, 16}},
+ {"kern.allowdt", []_C_int{1, 65}},
+ {"kern.allowkmem", []_C_int{1, 52}},
+ {"kern.argmax", []_C_int{1, 8}},
+ {"kern.audio", []_C_int{1, 84}},
+ {"kern.boottime", []_C_int{1, 21}},
+ {"kern.bufcachepercent", []_C_int{1, 72}},
+ {"kern.ccpu", []_C_int{1, 45}},
+ {"kern.clockrate", []_C_int{1, 12}},
+ {"kern.consbuf", []_C_int{1, 83}},
+ {"kern.consbufsize", []_C_int{1, 82}},
+ {"kern.consdev", []_C_int{1, 75}},
+ {"kern.cp_time", []_C_int{1, 40}},
+ {"kern.cp_time2", []_C_int{1, 71}},
+ {"kern.cpustats", []_C_int{1, 85}},
+ {"kern.domainname", []_C_int{1, 22}},
+ {"kern.file", []_C_int{1, 73}},
+ {"kern.forkstat", []_C_int{1, 42}},
+ {"kern.fscale", []_C_int{1, 46}},
+ {"kern.fsync", []_C_int{1, 33}},
+ {"kern.global_ptrace", []_C_int{1, 81}},
+ {"kern.hostid", []_C_int{1, 11}},
+ {"kern.hostname", []_C_int{1, 10}},
+ {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}},
+ {"kern.job_control", []_C_int{1, 19}},
+ {"kern.malloc.buckets", []_C_int{1, 39, 1}},
+ {"kern.malloc.kmemnames", []_C_int{1, 39, 3}},
+ {"kern.maxclusters", []_C_int{1, 67}},
+ {"kern.maxfiles", []_C_int{1, 7}},
+ {"kern.maxlocksperuid", []_C_int{1, 70}},
+ {"kern.maxpartitions", []_C_int{1, 23}},
+ {"kern.maxproc", []_C_int{1, 6}},
+ {"kern.maxthread", []_C_int{1, 25}},
+ {"kern.maxvnodes", []_C_int{1, 5}},
+ {"kern.mbstat", []_C_int{1, 59}},
+ {"kern.msgbuf", []_C_int{1, 48}},
+ {"kern.msgbufsize", []_C_int{1, 38}},
+ {"kern.nchstats", []_C_int{1, 41}},
+ {"kern.netlivelocks", []_C_int{1, 76}},
+ {"kern.nfiles", []_C_int{1, 56}},
+ {"kern.ngroups", []_C_int{1, 18}},
+ {"kern.nosuidcoredump", []_C_int{1, 32}},
+ {"kern.nprocs", []_C_int{1, 47}},
+ {"kern.nselcoll", []_C_int{1, 43}},
+ {"kern.nthreads", []_C_int{1, 26}},
+ {"kern.numvnodes", []_C_int{1, 58}},
+ {"kern.osrelease", []_C_int{1, 2}},
+ {"kern.osrevision", []_C_int{1, 3}},
+ {"kern.ostype", []_C_int{1, 1}},
+ {"kern.osversion", []_C_int{1, 27}},
+ {"kern.pfstatus", []_C_int{1, 86}},
+ {"kern.pool_debug", []_C_int{1, 77}},
+ {"kern.posix1version", []_C_int{1, 17}},
+ {"kern.proc", []_C_int{1, 66}},
+ {"kern.rawpartition", []_C_int{1, 24}},
+ {"kern.saved_ids", []_C_int{1, 20}},
+ {"kern.securelevel", []_C_int{1, 9}},
+ {"kern.seminfo", []_C_int{1, 61}},
+ {"kern.shminfo", []_C_int{1, 62}},
+ {"kern.somaxconn", []_C_int{1, 28}},
+ {"kern.sominconn", []_C_int{1, 29}},
+ {"kern.splassert", []_C_int{1, 54}},
+ {"kern.stackgap_random", []_C_int{1, 50}},
+ {"kern.sysvipc_info", []_C_int{1, 51}},
+ {"kern.sysvmsg", []_C_int{1, 34}},
+ {"kern.sysvsem", []_C_int{1, 35}},
+ {"kern.sysvshm", []_C_int{1, 36}},
+ {"kern.timecounter.choice", []_C_int{1, 69, 4}},
+ {"kern.timecounter.hardware", []_C_int{1, 69, 3}},
+ {"kern.timecounter.tick", []_C_int{1, 69, 1}},
+ {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}},
+ {"kern.timeout_stats", []_C_int{1, 87}},
+ {"kern.tty.tk_cancc", []_C_int{1, 44, 4}},
+ {"kern.tty.tk_nin", []_C_int{1, 44, 1}},
+ {"kern.tty.tk_nout", []_C_int{1, 44, 2}},
+ {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}},
+ {"kern.tty.ttyinfo", []_C_int{1, 44, 5}},
+ {"kern.ttycount", []_C_int{1, 57}},
+ {"kern.utc_offset", []_C_int{1, 88}},
+ {"kern.version", []_C_int{1, 4}},
+ {"kern.watchdog.auto", []_C_int{1, 64, 2}},
+ {"kern.watchdog.period", []_C_int{1, 64, 1}},
+ {"kern.witnesswatch", []_C_int{1, 53}},
+ {"kern.wxabort", []_C_int{1, 74}},
+ {"net.bpf.bufsize", []_C_int{4, 31, 1}},
+ {"net.bpf.maxbufsize", []_C_int{4, 31, 2}},
+ {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}},
+ {"net.inet.ah.stats", []_C_int{4, 2, 51, 2}},
+ {"net.inet.carp.allow", []_C_int{4, 2, 112, 1}},
+ {"net.inet.carp.log", []_C_int{4, 2, 112, 3}},
+ {"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}},
+ {"net.inet.carp.stats", []_C_int{4, 2, 112, 4}},
+ {"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}},
+ {"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}},
+ {"net.inet.divert.stats", []_C_int{4, 2, 258, 3}},
+ {"net.inet.esp.enable", []_C_int{4, 2, 50, 1}},
+ {"net.inet.esp.stats", []_C_int{4, 2, 50, 4}},
+ {"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}},
+ {"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}},
+ {"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}},
+ {"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}},
+ {"net.inet.gre.allow", []_C_int{4, 2, 47, 1}},
+ {"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}},
+ {"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}},
+ {"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}},
+ {"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}},
+ {"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}},
+ {"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}},
+ {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}},
+ {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}},
+ {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}},
+ {"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}},
+ {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}},
+ {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}},
+ {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}},
+ {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}},
+ {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}},
+ {"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}},
+ {"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}},
+ {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}},
+ {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}},
+ {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}},
+ {"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}},
+ {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}},
+ {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}},
+ {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}},
+ {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}},
+ {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}},
+ {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}},
+ {"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}},
+ {"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}},
+ {"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}},
+ {"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}},
+ {"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}},
+ {"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}},
+ {"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}},
+ {"net.inet.ip.stats", []_C_int{4, 2, 0, 33}},
+ {"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}},
+ {"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}},
+ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}},
+ {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}},
+ {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}},
+ {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}},
+ {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}},
+ {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}},
+ {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}},
+ {"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}},
+ {"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}},
+ {"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}},
+ {"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}},
+ {"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}},
+ {"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}},
+ {"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}},
+ {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}},
+ {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}},
+ {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}},
+ {"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}},
+ {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}},
+ {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}},
+ {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}},
+ {"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}},
+ {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}},
+ {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}},
+ {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}},
+ {"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}},
+ {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}},
+ {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}},
+ {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}},
+ {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}},
+ {"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}},
+ {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}},
+ {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}},
+ {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}},
+ {"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}},
+ {"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}},
+ {"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}},
+ {"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}},
+ {"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}},
+ {"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}},
+ {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}},
+ {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}},
+ {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}},
+ {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}},
+ {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}},
+ {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}},
+ {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}},
+ {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}},
+ {"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}},
+ {"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}},
+ {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}},
+ {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}},
+ {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}},
+ {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}},
+ {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
+ {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
+ {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}},
+ {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}},
+ {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}},
+ {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}},
+ {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}},
+ {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}},
+ {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}},
+ {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}},
+ {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}},
+ {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}},
+ {"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}},
+ {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}},
+ {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}},
+ {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}},
+ {"net.key.sadb_dump", []_C_int{4, 30, 1}},
+ {"net.key.spd_dump", []_C_int{4, 30, 2}},
+ {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}},
+ {"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}},
+ {"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}},
+ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}},
+ {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}},
+ {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}},
+ {"net.mpls.ttl", []_C_int{4, 33, 2}},
+ {"net.pflow.stats", []_C_int{4, 34, 1}},
+ {"net.pipex.enable", []_C_int{4, 35, 1}},
+ {"vm.anonmin", []_C_int{2, 7}},
+ {"vm.loadavg", []_C_int{2, 2}},
+ {"vm.malloc_conf", []_C_int{2, 12}},
+ {"vm.maxslp", []_C_int{2, 10}},
+ {"vm.nkmempages", []_C_int{2, 6}},
+ {"vm.psstrings", []_C_int{2, 3}},
+ {"vm.swapencrypt.enable", []_C_int{2, 5, 0}},
+ {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}},
+ {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}},
+ {"vm.uspace", []_C_int{2, 11}},
+ {"vm.uvmexp", []_C_int{2, 4}},
+ {"vm.vmmeter", []_C_int{2, 1}},
+ {"vm.vnodemin", []_C_int{2, 9}},
+ {"vm.vtextmin", []_C_int{2, 8}},
+}
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
index f336145..1794ffc 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
@@ -1,10 +1,12 @@
// go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/syscall.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && darwin
// +build 386,darwin
package unix
+// Deprecated: Use libSystem wrappers instead of direct syscalls.
const (
SYS_SYSCALL = 0
SYS_EXIT = 1
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
index 654dd3d..f8298ff 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
@@ -1,10 +1,12 @@
// go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/syscall.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && darwin
// +build amd64,darwin
package unix
+// Deprecated: Use libSystem wrappers instead of direct syscalls.
const (
SYS_SYSCALL = 0
SYS_EXIT = 1
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
index 103a72e..6dc7364 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
@@ -1,10 +1,12 @@
// go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && darwin
// +build arm,darwin
package unix
+// Deprecated: Use libSystem wrappers instead of direct syscalls.
const (
SYS_SYSCALL = 0
SYS_EXIT = 1
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
index 7ab2130..5eb433b 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
@@ -1,10 +1,12 @@
// go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && darwin
// +build arm64,darwin
package unix
+// Deprecated: Use libSystem wrappers instead of direct syscalls.
const (
SYS_SYSCALL = 0
SYS_EXIT = 1
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
index 464c9a9..703675c 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go
@@ -1,134 +1,131 @@
// go run mksysnum.go https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && dragonfly
// +build amd64,dragonfly
package unix
const (
- // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int
- SYS_EXIT = 1 // { void exit(int rval); }
- SYS_FORK = 2 // { int fork(void); }
- 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_OPEN = 5 // { int open(char *path, int flags, int mode); }
- 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_LINK = 9 // { int link(char *path, char *link); }
- SYS_UNLINK = 10 // { int unlink(char *path); }
- SYS_CHDIR = 12 // { int chdir(char *path); }
- SYS_FCHDIR = 13 // { int fchdir(int fd); }
- SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
- SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
- SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
- SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
- SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, int flags); }
- SYS_GETPID = 20 // { pid_t getpid(void); }
- SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
- SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
- SYS_SETUID = 23 // { int setuid(uid_t uid); }
- SYS_GETUID = 24 // { uid_t getuid(void); }
- SYS_GETEUID = 25 // { uid_t geteuid(void); }
- 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_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_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); }
- 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_ACCESS = 33 // { int access(char *path, int flags); }
- SYS_CHFLAGS = 34 // { int chflags(char *path, int flags); }
- SYS_FCHFLAGS = 35 // { int fchflags(int fd, int flags); }
- SYS_SYNC = 36 // { int sync(void); }
- SYS_KILL = 37 // { int kill(int pid, int signum); }
- SYS_GETPPID = 39 // { pid_t getppid(void); }
- SYS_DUP = 41 // { int dup(int fd); }
- SYS_PIPE = 42 // { int pipe(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_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); }
- SYS_GETGID = 47 // { gid_t getgid(void); }
- SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); }
- SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
- SYS_ACCT = 51 // { int acct(char *path); }
- 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_REBOOT = 55 // { int reboot(int opt); }
- SYS_REVOKE = 56 // { int revoke(char *path); }
- SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
- SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); }
- SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
- SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
- SYS_CHROOT = 61 // { int chroot(char *path); }
- SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
- SYS_VFORK = 66 // { pid_t vfork(void); }
- SYS_SBRK = 69 // { int sbrk(int incr); }
- SYS_SSTK = 70 // { int sstk(int incr); }
- SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
- 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_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
- SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
- SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
- SYS_GETPGRP = 81 // { int getpgrp(void); }
- SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
- SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }
- SYS_SWAPON = 85 // { int swapon(char *name); }
- SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
- SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
- SYS_DUP2 = 90 // { int dup2(int from, int to); }
- 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_FSYNC = 95 // { int fsync(int fd); }
- SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
- SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
- SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
- SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
- 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_LISTEN = 106 // { int listen(int s, int backlog); }
- SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }
- 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_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_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }
- SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
- SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
- SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
- SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
- SYS_RENAME = 128 // { int rename(char *from, char *to); }
- SYS_FLOCK = 131 // { int flock(int fd, int how); }
- 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_SHUTDOWN = 134 // { int shutdown(int s, int how); }
- SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }
- SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
- SYS_RMDIR = 137 // { int rmdir(char *path); }
- SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
- SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }
- SYS_SETSID = 147 // { int setsid(void); }
- 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_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); }
- SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
- SYS_GETDOMAINNAME = 162 // { int getdomainname(char *domainname, int len); }
- SYS_SETDOMAINNAME = 163 // { int setdomainname(char *domainname, int len); }
- SYS_UNAME = 164 // { int uname(struct utsname *name); }
- SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
- SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }
- SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, size_t nbyte, int flags, off_t offset); }
- SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, size_t nbyte, int flags, off_t offset); }
- SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
- SYS_SETGID = 181 // { int setgid(gid_t gid); }
- SYS_SETEGID = 182 // { int setegid(gid_t egid); }
- SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
- SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
- SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
- 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_EXIT = 1 // { void exit(int rval); }
+ SYS_FORK = 2 // { int fork(void); }
+ 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_OPEN = 5 // { int open(char *path, int flags, int mode); }
+ 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_NOSYS = 8; // { int nosys(void); } __nosys nosys_args int
+ SYS_LINK = 9 // { int link(char *path, char *link); }
+ SYS_UNLINK = 10 // { int unlink(char *path); }
+ SYS_CHDIR = 12 // { int chdir(char *path); }
+ SYS_FCHDIR = 13 // { int fchdir(int fd); }
+ SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); }
+ SYS_CHMOD = 15 // { int chmod(char *path, int mode); }
+ SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); }
+ SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int
+ SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, int flags); }
+ SYS_GETPID = 20 // { pid_t getpid(void); }
+ SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); }
+ SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); }
+ SYS_SETUID = 23 // { int setuid(uid_t uid); }
+ SYS_GETUID = 24 // { uid_t getuid(void); }
+ SYS_GETEUID = 25 // { uid_t geteuid(void); }
+ 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_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_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); }
+ 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_ACCESS = 33 // { int access(char *path, int flags); }
+ SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); }
+ SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); }
+ SYS_SYNC = 36 // { int sync(void); }
+ SYS_KILL = 37 // { int kill(int pid, int signum); }
+ SYS_GETPPID = 39 // { pid_t getppid(void); }
+ SYS_DUP = 41 // { int dup(int fd); }
+ SYS_PIPE = 42 // { int pipe(void); }
+ SYS_GETEGID = 43 // { gid_t getegid(void); }
+ 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_GETGID = 47 // { gid_t getgid(void); }
+ SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, size_t namelen); }
+ SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); }
+ SYS_ACCT = 51 // { int acct(char *path); }
+ 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_REBOOT = 55 // { int reboot(int opt); }
+ SYS_REVOKE = 56 // { int revoke(char *path); }
+ SYS_SYMLINK = 57 // { int symlink(char *path, char *link); }
+ SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); }
+ SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); }
+ SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int
+ SYS_CHROOT = 61 // { int chroot(char *path); }
+ SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); }
+ SYS_VFORK = 66 // { pid_t vfork(void); }
+ SYS_SBRK = 69 // { caddr_t sbrk(size_t incr); }
+ SYS_SSTK = 70 // { int sstk(size_t incr); }
+ SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); }
+ 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_MINCORE = 78 // { int mincore(const void *addr, size_t len, char *vec); }
+ SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); }
+ SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); }
+ SYS_GETPGRP = 81 // { int getpgrp(void); }
+ SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); }
+ SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, struct itimerval *oitv); }
+ SYS_SWAPON = 85 // { int swapon(char *name); }
+ SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); }
+ SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); }
+ SYS_DUP2 = 90 // { int dup2(int from, int to); }
+ 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_FSYNC = 95 // { int fsync(int fd); }
+ SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); }
+ SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); }
+ SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); }
+ SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); }
+ 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_LISTEN = 106 // { int listen(int s, int backlog); }
+ SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); }
+ 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_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_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); }
+ SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); }
+ SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); }
+ SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); }
+ SYS_SETREGID = 127 // { int setregid(int rgid, int egid); }
+ SYS_RENAME = 128 // { int rename(char *from, char *to); }
+ SYS_FLOCK = 131 // { int flock(int fd, int how); }
+ 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_SHUTDOWN = 134 // { int shutdown(int s, int how); }
+ SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); }
+ SYS_MKDIR = 136 // { int mkdir(char *path, int mode); }
+ SYS_RMDIR = 137 // { int rmdir(char *path); }
+ SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); }
+ SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, struct timeval *olddelta); }
+ SYS_SETSID = 147 // { int setsid(void); }
+ 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_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); }
+ SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); }
+ SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); }
+ SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); }
+ SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, size_t nbyte, int flags, off_t offset); }
+ SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, size_t nbyte, int flags, off_t offset); }
+ SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); }
+ SYS_SETGID = 181 // { int setgid(gid_t gid); }
+ SYS_SETEGID = 182 // { int setegid(gid_t egid); }
+ SYS_SETEUID = 183 // { int seteuid(uid_t euid); }
+ SYS_PATHCONF = 191 // { int pathconf(char *path, int name); }
+ SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); }
+ 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_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_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); }
@@ -161,8 +158,8 @@ const (
SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); }
SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); }
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_EXTPWRITEV = 290 // { ssize_t extpwritev(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, 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_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); }
SYS_MODNEXT = 300 // { int modnext(int modid); }
@@ -225,7 +222,7 @@ const (
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_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_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); }
@@ -302,7 +299,7 @@ const (
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_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_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); }
@@ -312,4 +309,9 @@ const (
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_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); }
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
index 9474974..59d5dfc 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && freebsd
// +build 386,freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
index 48a7bea..342d471 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && freebsd
// +build amd64,freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
index 4a6dfd4..e2e3d72 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && freebsd
// +build arm,freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go
index 3e51af8..61ad5ca 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://svn.freebsd.org/base/stable/11/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && freebsd
// +build arm64,freebsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
index 7aae554..8e53597 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -m32 /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && linux
// +build 386,linux
package unix
@@ -431,4 +432,10 @@ const (
SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
index 7968439..d7dceb7 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -m64 /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && linux
// +build amd64,linux
package unix
@@ -353,4 +354,10 @@ const (
SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
index 3c663c6..04093a6 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && linux
// +build arm,linux
package unix
@@ -395,4 +396,10 @@ const (
SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
index 1f3b4d1..48f94f1 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && linux
// +build arm64,linux
package unix
@@ -298,4 +299,10 @@ const (
SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
index 00da3de..499978c 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips && linux
// +build mips,linux
package unix
@@ -416,4 +417,10 @@ const (
SYS_FSPICK = 4433
SYS_PIDFD_OPEN = 4434
SYS_CLONE3 = 4435
+ SYS_CLOSE_RANGE = 4436
+ SYS_OPENAT2 = 4437
+ SYS_PIDFD_GETFD = 4438
+ SYS_FACCESSAT2 = 4439
+ SYS_PROCESS_MADVISE = 4440
+ SYS_EPOLL_PWAIT2 = 4441
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
index d404fbd..10d1db2 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips64 && linux
// +build mips64,linux
package unix
@@ -346,4 +347,10 @@ const (
SYS_FSPICK = 5433
SYS_PIDFD_OPEN = 5434
SYS_CLONE3 = 5435
+ SYS_CLOSE_RANGE = 5436
+ SYS_OPENAT2 = 5437
+ SYS_PIDFD_GETFD = 5438
+ SYS_FACCESSAT2 = 5439
+ SYS_PROCESS_MADVISE = 5440
+ SYS_EPOLL_PWAIT2 = 5441
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
index bfbf242..208d5dc 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips64le && linux
// +build mips64le,linux
package unix
@@ -346,4 +347,10 @@ const (
SYS_FSPICK = 5433
SYS_PIDFD_OPEN = 5434
SYS_CLONE3 = 5435
+ SYS_CLOSE_RANGE = 5436
+ SYS_OPENAT2 = 5437
+ SYS_PIDFD_GETFD = 5438
+ SYS_FACCESSAT2 = 5439
+ SYS_PROCESS_MADVISE = 5440
+ SYS_EPOLL_PWAIT2 = 5441
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
index 3826f49..f825060 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mipsle && linux
// +build mipsle,linux
package unix
@@ -416,4 +417,10 @@ const (
SYS_FSPICK = 4433
SYS_PIDFD_OPEN = 4434
SYS_CLONE3 = 4435
+ SYS_CLOSE_RANGE = 4436
+ SYS_OPENAT2 = 4437
+ SYS_PIDFD_GETFD = 4438
+ SYS_FACCESSAT2 = 4439
+ SYS_PROCESS_MADVISE = 4440
+ SYS_EPOLL_PWAIT2 = 4441
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
new file mode 100644
index 0000000..7693656
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
@@ -0,0 +1,433 @@
+// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build ppc && linux
+// +build ppc,linux
+
+package unix
+
+const (
+ SYS_RESTART_SYSCALL = 0
+ SYS_EXIT = 1
+ SYS_FORK = 2
+ SYS_READ = 3
+ SYS_WRITE = 4
+ SYS_OPEN = 5
+ SYS_CLOSE = 6
+ SYS_WAITPID = 7
+ SYS_CREAT = 8
+ SYS_LINK = 9
+ SYS_UNLINK = 10
+ SYS_EXECVE = 11
+ SYS_CHDIR = 12
+ SYS_TIME = 13
+ SYS_MKNOD = 14
+ SYS_CHMOD = 15
+ SYS_LCHOWN = 16
+ SYS_BREAK = 17
+ SYS_OLDSTAT = 18
+ SYS_LSEEK = 19
+ SYS_GETPID = 20
+ SYS_MOUNT = 21
+ SYS_UMOUNT = 22
+ SYS_SETUID = 23
+ SYS_GETUID = 24
+ SYS_STIME = 25
+ SYS_PTRACE = 26
+ SYS_ALARM = 27
+ SYS_OLDFSTAT = 28
+ SYS_PAUSE = 29
+ SYS_UTIME = 30
+ SYS_STTY = 31
+ SYS_GTTY = 32
+ SYS_ACCESS = 33
+ SYS_NICE = 34
+ SYS_FTIME = 35
+ SYS_SYNC = 36
+ SYS_KILL = 37
+ SYS_RENAME = 38
+ SYS_MKDIR = 39
+ SYS_RMDIR = 40
+ SYS_DUP = 41
+ SYS_PIPE = 42
+ SYS_TIMES = 43
+ SYS_PROF = 44
+ SYS_BRK = 45
+ SYS_SETGID = 46
+ SYS_GETGID = 47
+ SYS_SIGNAL = 48
+ SYS_GETEUID = 49
+ SYS_GETEGID = 50
+ SYS_ACCT = 51
+ SYS_UMOUNT2 = 52
+ SYS_LOCK = 53
+ SYS_IOCTL = 54
+ SYS_FCNTL = 55
+ SYS_MPX = 56
+ SYS_SETPGID = 57
+ SYS_ULIMIT = 58
+ SYS_OLDOLDUNAME = 59
+ SYS_UMASK = 60
+ SYS_CHROOT = 61
+ SYS_USTAT = 62
+ SYS_DUP2 = 63
+ SYS_GETPPID = 64
+ SYS_GETPGRP = 65
+ SYS_SETSID = 66
+ SYS_SIGACTION = 67
+ SYS_SGETMASK = 68
+ SYS_SSETMASK = 69
+ SYS_SETREUID = 70
+ SYS_SETREGID = 71
+ SYS_SIGSUSPEND = 72
+ SYS_SIGPENDING = 73
+ SYS_SETHOSTNAME = 74
+ SYS_SETRLIMIT = 75
+ SYS_GETRLIMIT = 76
+ SYS_GETRUSAGE = 77
+ SYS_GETTIMEOFDAY = 78
+ SYS_SETTIMEOFDAY = 79
+ SYS_GETGROUPS = 80
+ SYS_SETGROUPS = 81
+ SYS_SELECT = 82
+ SYS_SYMLINK = 83
+ SYS_OLDLSTAT = 84
+ SYS_READLINK = 85
+ SYS_USELIB = 86
+ SYS_SWAPON = 87
+ SYS_REBOOT = 88
+ SYS_READDIR = 89
+ SYS_MMAP = 90
+ SYS_MUNMAP = 91
+ SYS_TRUNCATE = 92
+ SYS_FTRUNCATE = 93
+ SYS_FCHMOD = 94
+ SYS_FCHOWN = 95
+ SYS_GETPRIORITY = 96
+ SYS_SETPRIORITY = 97
+ SYS_PROFIL = 98
+ SYS_STATFS = 99
+ SYS_FSTATFS = 100
+ SYS_IOPERM = 101
+ SYS_SOCKETCALL = 102
+ SYS_SYSLOG = 103
+ SYS_SETITIMER = 104
+ SYS_GETITIMER = 105
+ SYS_STAT = 106
+ SYS_LSTAT = 107
+ SYS_FSTAT = 108
+ SYS_OLDUNAME = 109
+ SYS_IOPL = 110
+ SYS_VHANGUP = 111
+ SYS_IDLE = 112
+ SYS_VM86 = 113
+ SYS_WAIT4 = 114
+ SYS_SWAPOFF = 115
+ SYS_SYSINFO = 116
+ SYS_IPC = 117
+ SYS_FSYNC = 118
+ SYS_SIGRETURN = 119
+ SYS_CLONE = 120
+ SYS_SETDOMAINNAME = 121
+ SYS_UNAME = 122
+ SYS_MODIFY_LDT = 123
+ SYS_ADJTIMEX = 124
+ SYS_MPROTECT = 125
+ SYS_SIGPROCMASK = 126
+ SYS_CREATE_MODULE = 127
+ SYS_INIT_MODULE = 128
+ SYS_DELETE_MODULE = 129
+ SYS_GET_KERNEL_SYMS = 130
+ SYS_QUOTACTL = 131
+ SYS_GETPGID = 132
+ SYS_FCHDIR = 133
+ SYS_BDFLUSH = 134
+ SYS_SYSFS = 135
+ SYS_PERSONALITY = 136
+ SYS_AFS_SYSCALL = 137
+ SYS_SETFSUID = 138
+ SYS_SETFSGID = 139
+ SYS__LLSEEK = 140
+ SYS_GETDENTS = 141
+ SYS__NEWSELECT = 142
+ SYS_FLOCK = 143
+ SYS_MSYNC = 144
+ SYS_READV = 145
+ SYS_WRITEV = 146
+ SYS_GETSID = 147
+ SYS_FDATASYNC = 148
+ SYS__SYSCTL = 149
+ SYS_MLOCK = 150
+ SYS_MUNLOCK = 151
+ SYS_MLOCKALL = 152
+ SYS_MUNLOCKALL = 153
+ SYS_SCHED_SETPARAM = 154
+ SYS_SCHED_GETPARAM = 155
+ SYS_SCHED_SETSCHEDULER = 156
+ SYS_SCHED_GETSCHEDULER = 157
+ SYS_SCHED_YIELD = 158
+ SYS_SCHED_GET_PRIORITY_MAX = 159
+ SYS_SCHED_GET_PRIORITY_MIN = 160
+ SYS_SCHED_RR_GET_INTERVAL = 161
+ SYS_NANOSLEEP = 162
+ SYS_MREMAP = 163
+ SYS_SETRESUID = 164
+ SYS_GETRESUID = 165
+ SYS_QUERY_MODULE = 166
+ SYS_POLL = 167
+ SYS_NFSSERVCTL = 168
+ SYS_SETRESGID = 169
+ SYS_GETRESGID = 170
+ SYS_PRCTL = 171
+ SYS_RT_SIGRETURN = 172
+ SYS_RT_SIGACTION = 173
+ SYS_RT_SIGPROCMASK = 174
+ SYS_RT_SIGPENDING = 175
+ SYS_RT_SIGTIMEDWAIT = 176
+ SYS_RT_SIGQUEUEINFO = 177
+ SYS_RT_SIGSUSPEND = 178
+ SYS_PREAD64 = 179
+ SYS_PWRITE64 = 180
+ SYS_CHOWN = 181
+ SYS_GETCWD = 182
+ SYS_CAPGET = 183
+ SYS_CAPSET = 184
+ SYS_SIGALTSTACK = 185
+ SYS_SENDFILE = 186
+ SYS_GETPMSG = 187
+ SYS_PUTPMSG = 188
+ SYS_VFORK = 189
+ SYS_UGETRLIMIT = 190
+ SYS_READAHEAD = 191
+ SYS_MMAP2 = 192
+ SYS_TRUNCATE64 = 193
+ SYS_FTRUNCATE64 = 194
+ SYS_STAT64 = 195
+ SYS_LSTAT64 = 196
+ SYS_FSTAT64 = 197
+ SYS_PCICONFIG_READ = 198
+ SYS_PCICONFIG_WRITE = 199
+ SYS_PCICONFIG_IOBASE = 200
+ SYS_MULTIPLEXER = 201
+ SYS_GETDENTS64 = 202
+ SYS_PIVOT_ROOT = 203
+ SYS_FCNTL64 = 204
+ SYS_MADVISE = 205
+ SYS_MINCORE = 206
+ SYS_GETTID = 207
+ SYS_TKILL = 208
+ SYS_SETXATTR = 209
+ SYS_LSETXATTR = 210
+ SYS_FSETXATTR = 211
+ SYS_GETXATTR = 212
+ SYS_LGETXATTR = 213
+ SYS_FGETXATTR = 214
+ SYS_LISTXATTR = 215
+ SYS_LLISTXATTR = 216
+ SYS_FLISTXATTR = 217
+ SYS_REMOVEXATTR = 218
+ SYS_LREMOVEXATTR = 219
+ SYS_FREMOVEXATTR = 220
+ SYS_FUTEX = 221
+ SYS_SCHED_SETAFFINITY = 222
+ SYS_SCHED_GETAFFINITY = 223
+ SYS_TUXCALL = 225
+ SYS_SENDFILE64 = 226
+ SYS_IO_SETUP = 227
+ SYS_IO_DESTROY = 228
+ SYS_IO_GETEVENTS = 229
+ SYS_IO_SUBMIT = 230
+ SYS_IO_CANCEL = 231
+ SYS_SET_TID_ADDRESS = 232
+ SYS_FADVISE64 = 233
+ SYS_EXIT_GROUP = 234
+ SYS_LOOKUP_DCOOKIE = 235
+ SYS_EPOLL_CREATE = 236
+ SYS_EPOLL_CTL = 237
+ SYS_EPOLL_WAIT = 238
+ SYS_REMAP_FILE_PAGES = 239
+ SYS_TIMER_CREATE = 240
+ SYS_TIMER_SETTIME = 241
+ SYS_TIMER_GETTIME = 242
+ SYS_TIMER_GETOVERRUN = 243
+ SYS_TIMER_DELETE = 244
+ SYS_CLOCK_SETTIME = 245
+ SYS_CLOCK_GETTIME = 246
+ SYS_CLOCK_GETRES = 247
+ SYS_CLOCK_NANOSLEEP = 248
+ SYS_SWAPCONTEXT = 249
+ SYS_TGKILL = 250
+ SYS_UTIMES = 251
+ SYS_STATFS64 = 252
+ SYS_FSTATFS64 = 253
+ SYS_FADVISE64_64 = 254
+ SYS_RTAS = 255
+ SYS_SYS_DEBUG_SETCONTEXT = 256
+ SYS_MIGRATE_PAGES = 258
+ SYS_MBIND = 259
+ SYS_GET_MEMPOLICY = 260
+ SYS_SET_MEMPOLICY = 261
+ SYS_MQ_OPEN = 262
+ SYS_MQ_UNLINK = 263
+ SYS_MQ_TIMEDSEND = 264
+ SYS_MQ_TIMEDRECEIVE = 265
+ SYS_MQ_NOTIFY = 266
+ SYS_MQ_GETSETATTR = 267
+ SYS_KEXEC_LOAD = 268
+ SYS_ADD_KEY = 269
+ SYS_REQUEST_KEY = 270
+ SYS_KEYCTL = 271
+ SYS_WAITID = 272
+ SYS_IOPRIO_SET = 273
+ SYS_IOPRIO_GET = 274
+ SYS_INOTIFY_INIT = 275
+ SYS_INOTIFY_ADD_WATCH = 276
+ SYS_INOTIFY_RM_WATCH = 277
+ SYS_SPU_RUN = 278
+ SYS_SPU_CREATE = 279
+ SYS_PSELECT6 = 280
+ SYS_PPOLL = 281
+ SYS_UNSHARE = 282
+ SYS_SPLICE = 283
+ SYS_TEE = 284
+ SYS_VMSPLICE = 285
+ SYS_OPENAT = 286
+ SYS_MKDIRAT = 287
+ SYS_MKNODAT = 288
+ SYS_FCHOWNAT = 289
+ SYS_FUTIMESAT = 290
+ SYS_FSTATAT64 = 291
+ SYS_UNLINKAT = 292
+ SYS_RENAMEAT = 293
+ SYS_LINKAT = 294
+ SYS_SYMLINKAT = 295
+ SYS_READLINKAT = 296
+ SYS_FCHMODAT = 297
+ SYS_FACCESSAT = 298
+ SYS_GET_ROBUST_LIST = 299
+ SYS_SET_ROBUST_LIST = 300
+ SYS_MOVE_PAGES = 301
+ SYS_GETCPU = 302
+ SYS_EPOLL_PWAIT = 303
+ SYS_UTIMENSAT = 304
+ SYS_SIGNALFD = 305
+ SYS_TIMERFD_CREATE = 306
+ SYS_EVENTFD = 307
+ SYS_SYNC_FILE_RANGE2 = 308
+ SYS_FALLOCATE = 309
+ SYS_SUBPAGE_PROT = 310
+ SYS_TIMERFD_SETTIME = 311
+ SYS_TIMERFD_GETTIME = 312
+ SYS_SIGNALFD4 = 313
+ SYS_EVENTFD2 = 314
+ SYS_EPOLL_CREATE1 = 315
+ SYS_DUP3 = 316
+ SYS_PIPE2 = 317
+ SYS_INOTIFY_INIT1 = 318
+ SYS_PERF_EVENT_OPEN = 319
+ SYS_PREADV = 320
+ SYS_PWRITEV = 321
+ SYS_RT_TGSIGQUEUEINFO = 322
+ SYS_FANOTIFY_INIT = 323
+ SYS_FANOTIFY_MARK = 324
+ SYS_PRLIMIT64 = 325
+ SYS_SOCKET = 326
+ SYS_BIND = 327
+ SYS_CONNECT = 328
+ SYS_LISTEN = 329
+ SYS_ACCEPT = 330
+ SYS_GETSOCKNAME = 331
+ SYS_GETPEERNAME = 332
+ SYS_SOCKETPAIR = 333
+ SYS_SEND = 334
+ SYS_SENDTO = 335
+ SYS_RECV = 336
+ SYS_RECVFROM = 337
+ SYS_SHUTDOWN = 338
+ SYS_SETSOCKOPT = 339
+ SYS_GETSOCKOPT = 340
+ SYS_SENDMSG = 341
+ SYS_RECVMSG = 342
+ SYS_RECVMMSG = 343
+ SYS_ACCEPT4 = 344
+ SYS_NAME_TO_HANDLE_AT = 345
+ SYS_OPEN_BY_HANDLE_AT = 346
+ SYS_CLOCK_ADJTIME = 347
+ SYS_SYNCFS = 348
+ SYS_SENDMMSG = 349
+ SYS_SETNS = 350
+ SYS_PROCESS_VM_READV = 351
+ SYS_PROCESS_VM_WRITEV = 352
+ SYS_FINIT_MODULE = 353
+ SYS_KCMP = 354
+ SYS_SCHED_SETATTR = 355
+ SYS_SCHED_GETATTR = 356
+ SYS_RENAMEAT2 = 357
+ SYS_SECCOMP = 358
+ SYS_GETRANDOM = 359
+ SYS_MEMFD_CREATE = 360
+ SYS_BPF = 361
+ SYS_EXECVEAT = 362
+ SYS_SWITCH_ENDIAN = 363
+ SYS_USERFAULTFD = 364
+ SYS_MEMBARRIER = 365
+ SYS_MLOCK2 = 378
+ SYS_COPY_FILE_RANGE = 379
+ SYS_PREADV2 = 380
+ SYS_PWRITEV2 = 381
+ SYS_KEXEC_FILE_LOAD = 382
+ SYS_STATX = 383
+ SYS_PKEY_ALLOC = 384
+ SYS_PKEY_FREE = 385
+ SYS_PKEY_MPROTECT = 386
+ SYS_RSEQ = 387
+ SYS_IO_PGETEVENTS = 388
+ SYS_SEMGET = 393
+ SYS_SEMCTL = 394
+ SYS_SHMGET = 395
+ SYS_SHMCTL = 396
+ SYS_SHMAT = 397
+ SYS_SHMDT = 398
+ SYS_MSGGET = 399
+ SYS_MSGSND = 400
+ SYS_MSGRCV = 401
+ SYS_MSGCTL = 402
+ SYS_CLOCK_GETTIME64 = 403
+ SYS_CLOCK_SETTIME64 = 404
+ SYS_CLOCK_ADJTIME64 = 405
+ SYS_CLOCK_GETRES_TIME64 = 406
+ SYS_CLOCK_NANOSLEEP_TIME64 = 407
+ SYS_TIMER_GETTIME64 = 408
+ SYS_TIMER_SETTIME64 = 409
+ SYS_TIMERFD_GETTIME64 = 410
+ SYS_TIMERFD_SETTIME64 = 411
+ SYS_UTIMENSAT_TIME64 = 412
+ SYS_PSELECT6_TIME64 = 413
+ SYS_PPOLL_TIME64 = 414
+ SYS_IO_PGETEVENTS_TIME64 = 416
+ SYS_RECVMMSG_TIME64 = 417
+ SYS_MQ_TIMEDSEND_TIME64 = 418
+ SYS_MQ_TIMEDRECEIVE_TIME64 = 419
+ SYS_SEMTIMEDOP_TIME64 = 420
+ SYS_RT_SIGTIMEDWAIT_TIME64 = 421
+ SYS_FUTEX_TIME64 = 422
+ SYS_SCHED_RR_GET_INTERVAL_TIME64 = 423
+ SYS_PIDFD_SEND_SIGNAL = 424
+ SYS_IO_URING_SETUP = 425
+ SYS_IO_URING_ENTER = 426
+ SYS_IO_URING_REGISTER = 427
+ SYS_OPEN_TREE = 428
+ SYS_MOVE_MOUNT = 429
+ SYS_FSOPEN = 430
+ SYS_FSCONFIG = 431
+ SYS_FSMOUNT = 432
+ SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
+)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
index 52e3da6..d5ed3ff 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64 && linux
// +build ppc64,linux
package unix
@@ -395,4 +396,10 @@ const (
SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
index 6141f90..e29b442 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64le && linux
// +build ppc64le,linux
package unix
@@ -395,4 +396,10 @@ const (
SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
index 4f7261a..41deed6 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build riscv64 && linux
// +build riscv64,linux
package unix
@@ -297,4 +298,10 @@ const (
SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
index f47014a..8e53a9e 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build s390x && linux
// +build s390x,linux
package unix
@@ -360,4 +361,10 @@ const (
SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434
SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
index dd78abb..596e5bc 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
@@ -1,6 +1,7 @@
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build sparc64 && linux
// +build sparc64,linux
package unix
@@ -374,4 +375,10 @@ const (
SYS_FSMOUNT = 432
SYS_FSPICK = 433
SYS_PIDFD_OPEN = 434
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
index e66a8c9..3a6699e 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go
@@ -1,6 +1,7 @@
// go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && netbsd
// +build 386,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
index 42c788f..5677cd4 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && netbsd
// +build amd64,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
index 0a07571..e784cb6 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go
@@ -1,6 +1,7 @@
// go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && netbsd
// +build arm,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go
index 0291c09..bd4952e 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go
@@ -1,6 +1,7 @@
// go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; DO NOT EDIT.
+//go:build arm64 && netbsd
// +build arm64,netbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
index b0207d1..817edbf 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && openbsd
// +build 386,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
index f0dec6f..ea45361 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && openbsd
// +build amd64,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
index 33d1dc5..467971e 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && openbsd
// +build arm,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
index fe2b689..32eec5e 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
@@ -1,6 +1,7 @@
// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && openbsd
// +build arm64,openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go
new file mode 100644
index 0000000..a37f773
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go
@@ -0,0 +1,221 @@
+// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build mips64 && openbsd
+// +build mips64,openbsd
+
+package unix
+
+const (
+ SYS_EXIT = 1 // { void sys_exit(int rval); }
+ SYS_FORK = 2 // { int sys_fork(void); }
+ SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
+ SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }
+ SYS_OPEN = 5 // { int sys_open(const char *path, int flags, ... mode_t mode); }
+ SYS_CLOSE = 6 // { int sys_close(int fd); }
+ SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); }
+ SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); }
+ SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
+ SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
+ SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
+ SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
+ SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
+ SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }
+ SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
+ SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, gid_t gid); }
+ SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
+ SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
+ SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); }
+ SYS_GETPID = 20 // { pid_t sys_getpid(void); }
+ SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); }
+ SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
+ SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
+ SYS_GETUID = 24 // { uid_t sys_getuid(void); }
+ SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
+ SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }
+ SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }
+ SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }
+ SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
+ SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }
+ SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
+ SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
+ SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); }
+ SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
+ SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
+ SYS_SYNC = 36 // { void sys_sync(void); }
+ SYS_MSYSCALL = 37 // { int sys_msyscall(void *addr, size_t len); }
+ SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
+ SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
+ SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
+ SYS_DUP = 41 // { int sys_dup(int fd); }
+ SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }
+ SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
+ SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }
+ SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }
+ SYS_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }
+ SYS_GETGID = 47 // { gid_t sys_getgid(void); }
+ SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
+ SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
+ SYS_ACCT = 51 // { int sys_acct(const char *path); }
+ SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
+ SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
+ SYS_IOCTL = 54 // { int sys_ioctl(int fd, u_long com, ... void *data); }
+ SYS_REBOOT = 55 // { int sys_reboot(int opt); }
+ SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
+ SYS_SYMLINK = 57 // { int sys_symlink(const char *path, const char *link); }
+ SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }
+ SYS_EXECVE = 59 // { int sys_execve(const char *path, char * const *argp, char * const *envp); }
+ SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
+ SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
+ SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }
+ SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); }
+ SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
+ SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }
+ SYS_VFORK = 66 // { int sys_vfork(void); }
+ SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }
+ SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }
+ SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
+ SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); }
+ SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
+ SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
+ SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
+ SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, int prot); }
+ SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, int behav); }
+ SYS_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); }
+ SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); }
+ SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, gid_t *gidset); }
+ SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }
+ SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
+ SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); }
+ SYS_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }
+ SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }
+ SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); }
+ SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }
+ SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }
+ SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }
+ SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }
+ SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
+ SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
+ SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
+ SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }
+ SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }
+ SYS_FSYNC = 95 // { int sys_fsync(int fd); }
+ SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
+ SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
+ SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }
+ SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
+ SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
+ SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); }
+ SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); }
+ SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
+ SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }
+ SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
+ SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
+ SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }
+ SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); }
+ SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
+ SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
+ SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
+ SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }
+ SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); }
+ SYS___REALPATH = 115 // { int sys___realpath(const char *pathname, char *resolved); }
+ SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
+ SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }
+ SYS_READV = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }
+ SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }
+ SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
+ SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
+ SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
+ SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
+ SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
+ SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
+ SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
+ SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
+ SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
+ SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
+ SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }
+ SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
+ SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
+ SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }
+ SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }
+ SYS_SETSID = 147 // { int sys_setsid(void); }
+ SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }
+ SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
+ SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
+ SYS___TMPFD = 164 // { int sys___tmpfd(int flags); }
+ SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
+ SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
+ SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
+ SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
+ SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
+ SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
+ SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
+ SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
+ SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
+ SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }
+ SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }
+ SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
+ SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }
+ SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, off_t length); }
+ SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
+ SYS_SYSCTL = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
+ SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
+ SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
+ SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
+ SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }
+ SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
+ SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
+ SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
+ SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
+ SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }
+ SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
+ SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }
+ SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }
+ SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
+ SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
+ SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
+ SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
+ SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
+ SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
+ SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
+ SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
+ SYS_KQUEUE = 269 // { int sys_kqueue(void); }
+ SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
+ SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
+ SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
+ SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }
+ SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
+ SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
+ SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
+ SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
+ SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }
+ SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
+ SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }
+ SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }
+ SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }
+ SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }
+ SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }
+ SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
+ SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
+ SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }
+ SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
+ SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }
+ SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
+ SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }
+ SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
+ SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
+ SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }
+ SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }
+ SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }
+ SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }
+ SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }
+ SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }
+ SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }
+ SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }
+ SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }
+ SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }
+ SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }
+ SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }
+ SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
+ SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
+)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go
new file mode 100644
index 0000000..073daad
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go
@@ -0,0 +1,2670 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build zos && s390x
+// +build zos,s390x
+
+package unix
+
+// TODO: auto-generate.
+
+const (
+ SYS_ACOSD128 = 0xB80
+ SYS_ACOSD32 = 0xB7E
+ SYS_ACOSD64 = 0xB7F
+ SYS_ACOSHD128 = 0xB83
+ SYS_ACOSHD32 = 0xB81
+ SYS_ACOSHD64 = 0xB82
+ SYS_AIO_FSYNC = 0xC69
+ SYS_ASCTIME = 0x0AE
+ SYS_ASCTIME64 = 0xCD7
+ SYS_ASCTIME64_R = 0xCD8
+ SYS_ASIND128 = 0xB86
+ SYS_ASIND32 = 0xB84
+ SYS_ASIND64 = 0xB85
+ SYS_ASINHD128 = 0xB89
+ SYS_ASINHD32 = 0xB87
+ SYS_ASINHD64 = 0xB88
+ SYS_ATAN2D128 = 0xB8F
+ SYS_ATAN2D32 = 0xB8D
+ SYS_ATAN2D64 = 0xB8E
+ SYS_ATAND128 = 0xB8C
+ SYS_ATAND32 = 0xB8A
+ SYS_ATAND64 = 0xB8B
+ SYS_ATANHD128 = 0xB92
+ SYS_ATANHD32 = 0xB90
+ SYS_ATANHD64 = 0xB91
+ SYS_BIND2ADDRSEL = 0xD59
+ SYS_C16RTOMB = 0xD40
+ SYS_C32RTOMB = 0xD41
+ SYS_CBRTD128 = 0xB95
+ SYS_CBRTD32 = 0xB93
+ SYS_CBRTD64 = 0xB94
+ SYS_CEILD128 = 0xB98
+ SYS_CEILD32 = 0xB96
+ SYS_CEILD64 = 0xB97
+ SYS_CLEARENV = 0x0C9
+ SYS_CLEARERR_UNLOCKED = 0xCA1
+ SYS_CLOCK = 0x0AA
+ SYS_CLOGL = 0xA00
+ SYS_CLRMEMF = 0x0BD
+ SYS_CONJ = 0xA03
+ SYS_CONJF = 0xA06
+ SYS_CONJL = 0xA09
+ SYS_COPYSIGND128 = 0xB9E
+ SYS_COPYSIGND32 = 0xB9C
+ SYS_COPYSIGND64 = 0xB9D
+ SYS_COSD128 = 0xBA1
+ SYS_COSD32 = 0xB9F
+ SYS_COSD64 = 0xBA0
+ SYS_COSHD128 = 0xBA4
+ SYS_COSHD32 = 0xBA2
+ SYS_COSHD64 = 0xBA3
+ SYS_CPOW = 0xA0C
+ SYS_CPOWF = 0xA0F
+ SYS_CPOWL = 0xA12
+ SYS_CPROJ = 0xA15
+ SYS_CPROJF = 0xA18
+ SYS_CPROJL = 0xA1B
+ SYS_CREAL = 0xA1E
+ SYS_CREALF = 0xA21
+ SYS_CREALL = 0xA24
+ SYS_CSIN = 0xA27
+ SYS_CSINF = 0xA2A
+ SYS_CSINH = 0xA30
+ SYS_CSINHF = 0xA33
+ SYS_CSINHL = 0xA36
+ SYS_CSINL = 0xA2D
+ SYS_CSNAP = 0x0C5
+ SYS_CSQRT = 0xA39
+ SYS_CSQRTF = 0xA3C
+ SYS_CSQRTL = 0xA3F
+ SYS_CTAN = 0xA42
+ SYS_CTANF = 0xA45
+ SYS_CTANH = 0xA4B
+ SYS_CTANHF = 0xA4E
+ SYS_CTANHL = 0xA51
+ SYS_CTANL = 0xA48
+ SYS_CTIME = 0x0AB
+ SYS_CTIME64 = 0xCD9
+ SYS_CTIME64_R = 0xCDA
+ SYS_CTRACE = 0x0C6
+ SYS_DIFFTIME = 0x0A7
+ SYS_DIFFTIME64 = 0xCDB
+ SYS_DLADDR = 0xC82
+ SYS_DYNALLOC = 0x0C3
+ SYS_DYNFREE = 0x0C2
+ SYS_ERFCD128 = 0xBAA
+ SYS_ERFCD32 = 0xBA8
+ SYS_ERFCD64 = 0xBA9
+ SYS_ERFD128 = 0xBA7
+ SYS_ERFD32 = 0xBA5
+ SYS_ERFD64 = 0xBA6
+ SYS_EXP2D128 = 0xBB0
+ SYS_EXP2D32 = 0xBAE
+ SYS_EXP2D64 = 0xBAF
+ SYS_EXPD128 = 0xBAD
+ SYS_EXPD32 = 0xBAB
+ SYS_EXPD64 = 0xBAC
+ SYS_EXPM1D128 = 0xBB3
+ SYS_EXPM1D32 = 0xBB1
+ SYS_EXPM1D64 = 0xBB2
+ SYS_FABSD128 = 0xBB6
+ SYS_FABSD32 = 0xBB4
+ SYS_FABSD64 = 0xBB5
+ SYS_FDELREC_UNLOCKED = 0xCA2
+ SYS_FDIMD128 = 0xBB9
+ SYS_FDIMD32 = 0xBB7
+ SYS_FDIMD64 = 0xBB8
+ SYS_FDOPEN_UNLOCKED = 0xCFC
+ SYS_FECLEAREXCEPT = 0xAEA
+ SYS_FEGETENV = 0xAEB
+ SYS_FEGETEXCEPTFLAG = 0xAEC
+ SYS_FEGETROUND = 0xAED
+ SYS_FEHOLDEXCEPT = 0xAEE
+ SYS_FEOF_UNLOCKED = 0xCA3
+ SYS_FERAISEEXCEPT = 0xAEF
+ SYS_FERROR_UNLOCKED = 0xCA4
+ SYS_FESETENV = 0xAF0
+ SYS_FESETEXCEPTFLAG = 0xAF1
+ SYS_FESETROUND = 0xAF2
+ SYS_FETCHEP = 0x0BF
+ SYS_FETESTEXCEPT = 0xAF3
+ SYS_FEUPDATEENV = 0xAF4
+ SYS_FE_DEC_GETROUND = 0xBBA
+ SYS_FE_DEC_SETROUND = 0xBBB
+ SYS_FFLUSH_UNLOCKED = 0xCA5
+ SYS_FGETC_UNLOCKED = 0xC80
+ SYS_FGETPOS64 = 0xCEE
+ SYS_FGETPOS64_UNLOCKED = 0xCF4
+ SYS_FGETPOS_UNLOCKED = 0xCA6
+ SYS_FGETS_UNLOCKED = 0xC7C
+ SYS_FGETWC_UNLOCKED = 0xCA7
+ SYS_FGETWS_UNLOCKED = 0xCA8
+ SYS_FILENO_UNLOCKED = 0xCA9
+ SYS_FLDATA = 0x0C1
+ SYS_FLDATA_UNLOCKED = 0xCAA
+ SYS_FLOCATE_UNLOCKED = 0xCAB
+ SYS_FLOORD128 = 0xBBE
+ SYS_FLOORD32 = 0xBBC
+ SYS_FLOORD64 = 0xBBD
+ SYS_FMA = 0xA63
+ SYS_FMAD128 = 0xBC1
+ SYS_FMAD32 = 0xBBF
+ SYS_FMAD64 = 0xBC0
+ SYS_FMAF = 0xA66
+ SYS_FMAL = 0xA69
+ SYS_FMAX = 0xA6C
+ SYS_FMAXD128 = 0xBC4
+ SYS_FMAXD32 = 0xBC2
+ SYS_FMAXD64 = 0xBC3
+ SYS_FMAXF = 0xA6F
+ SYS_FMAXL = 0xA72
+ SYS_FMIN = 0xA75
+ SYS_FMIND128 = 0xBC7
+ SYS_FMIND32 = 0xBC5
+ SYS_FMIND64 = 0xBC6
+ SYS_FMINF = 0xA78
+ SYS_FMINL = 0xA7B
+ SYS_FMODD128 = 0xBCA
+ SYS_FMODD32 = 0xBC8
+ SYS_FMODD64 = 0xBC9
+ SYS_FOPEN64 = 0xD49
+ SYS_FOPEN64_UNLOCKED = 0xD4A
+ SYS_FOPEN_UNLOCKED = 0xCFA
+ SYS_FPRINTF_UNLOCKED = 0xCAC
+ SYS_FPUTC_UNLOCKED = 0xC81
+ SYS_FPUTS_UNLOCKED = 0xC7E
+ SYS_FPUTWC_UNLOCKED = 0xCAD
+ SYS_FPUTWS_UNLOCKED = 0xCAE
+ SYS_FREAD_NOUPDATE = 0xCEC
+ SYS_FREAD_NOUPDATE_UNLOCKED = 0xCED
+ SYS_FREAD_UNLOCKED = 0xC7B
+ SYS_FREEIFADDRS = 0xCE6
+ SYS_FREOPEN64 = 0xD4B
+ SYS_FREOPEN64_UNLOCKED = 0xD4C
+ SYS_FREOPEN_UNLOCKED = 0xCFB
+ SYS_FREXPD128 = 0xBCE
+ SYS_FREXPD32 = 0xBCC
+ SYS_FREXPD64 = 0xBCD
+ SYS_FSCANF_UNLOCKED = 0xCAF
+ SYS_FSEEK64 = 0xCEF
+ SYS_FSEEK64_UNLOCKED = 0xCF5
+ SYS_FSEEKO64 = 0xCF0
+ SYS_FSEEKO64_UNLOCKED = 0xCF6
+ SYS_FSEEKO_UNLOCKED = 0xCB1
+ SYS_FSEEK_UNLOCKED = 0xCB0
+ SYS_FSETPOS64 = 0xCF1
+ SYS_FSETPOS64_UNLOCKED = 0xCF7
+ SYS_FSETPOS_UNLOCKED = 0xCB3
+ SYS_FTELL64 = 0xCF2
+ SYS_FTELL64_UNLOCKED = 0xCF8
+ SYS_FTELLO64 = 0xCF3
+ SYS_FTELLO64_UNLOCKED = 0xCF9
+ SYS_FTELLO_UNLOCKED = 0xCB5
+ SYS_FTELL_UNLOCKED = 0xCB4
+ SYS_FUPDATE = 0x0B5
+ SYS_FUPDATE_UNLOCKED = 0xCB7
+ SYS_FWIDE_UNLOCKED = 0xCB8
+ SYS_FWPRINTF_UNLOCKED = 0xCB9
+ SYS_FWRITE_UNLOCKED = 0xC7A
+ SYS_FWSCANF_UNLOCKED = 0xCBA
+ SYS_GETDATE64 = 0xD4F
+ SYS_GETIFADDRS = 0xCE7
+ SYS_GETIPV4SOURCEFILTER = 0xC77
+ SYS_GETSOURCEFILTER = 0xC79
+ SYS_GETSYNTX = 0x0FD
+ SYS_GETS_UNLOCKED = 0xC7D
+ SYS_GETTIMEOFDAY64 = 0xD50
+ SYS_GETWCHAR_UNLOCKED = 0xCBC
+ SYS_GETWC_UNLOCKED = 0xCBB
+ SYS_GMTIME = 0x0B0
+ SYS_GMTIME64 = 0xCDC
+ SYS_GMTIME64_R = 0xCDD
+ SYS_HYPOTD128 = 0xBD1
+ SYS_HYPOTD32 = 0xBCF
+ SYS_HYPOTD64 = 0xBD0
+ SYS_ILOGBD128 = 0xBD4
+ SYS_ILOGBD32 = 0xBD2
+ SYS_ILOGBD64 = 0xBD3
+ SYS_ILOGBF = 0xA7E
+ SYS_ILOGBL = 0xA81
+ SYS_INET6_IS_SRCADDR = 0xD5A
+ SYS_ISBLANK = 0x0FE
+ SYS_ISWALNUM = 0x0FF
+ SYS_LDEXPD128 = 0xBD7
+ SYS_LDEXPD32 = 0xBD5
+ SYS_LDEXPD64 = 0xBD6
+ SYS_LGAMMAD128 = 0xBDA
+ SYS_LGAMMAD32 = 0xBD8
+ SYS_LGAMMAD64 = 0xBD9
+ SYS_LIO_LISTIO = 0xC6A
+ SYS_LLRINT = 0xA84
+ SYS_LLRINTD128 = 0xBDD
+ SYS_LLRINTD32 = 0xBDB
+ SYS_LLRINTD64 = 0xBDC
+ SYS_LLRINTF = 0xA87
+ SYS_LLRINTL = 0xA8A
+ SYS_LLROUND = 0xA8D
+ SYS_LLROUNDD128 = 0xBE0
+ SYS_LLROUNDD32 = 0xBDE
+ SYS_LLROUNDD64 = 0xBDF
+ SYS_LLROUNDF = 0xA90
+ SYS_LLROUNDL = 0xA93
+ SYS_LOCALTIM = 0x0B1
+ SYS_LOCALTIME = 0x0B1
+ SYS_LOCALTIME64 = 0xCDE
+ SYS_LOCALTIME64_R = 0xCDF
+ SYS_LOG10D128 = 0xBE6
+ SYS_LOG10D32 = 0xBE4
+ SYS_LOG10D64 = 0xBE5
+ SYS_LOG1PD128 = 0xBE9
+ SYS_LOG1PD32 = 0xBE7
+ SYS_LOG1PD64 = 0xBE8
+ SYS_LOG2D128 = 0xBEC
+ SYS_LOG2D32 = 0xBEA
+ SYS_LOG2D64 = 0xBEB
+ SYS_LOGBD128 = 0xBEF
+ SYS_LOGBD32 = 0xBED
+ SYS_LOGBD64 = 0xBEE
+ SYS_LOGBF = 0xA96
+ SYS_LOGBL = 0xA99
+ SYS_LOGD128 = 0xBE3
+ SYS_LOGD32 = 0xBE1
+ SYS_LOGD64 = 0xBE2
+ SYS_LRINT = 0xA9C
+ SYS_LRINTD128 = 0xBF2
+ SYS_LRINTD32 = 0xBF0
+ SYS_LRINTD64 = 0xBF1
+ SYS_LRINTF = 0xA9F
+ SYS_LRINTL = 0xAA2
+ SYS_LROUNDD128 = 0xBF5
+ SYS_LROUNDD32 = 0xBF3
+ SYS_LROUNDD64 = 0xBF4
+ SYS_LROUNDL = 0xAA5
+ SYS_MBLEN = 0x0AF
+ SYS_MBRTOC16 = 0xD42
+ SYS_MBRTOC32 = 0xD43
+ SYS_MEMSET = 0x0A3
+ SYS_MKTIME = 0x0AC
+ SYS_MKTIME64 = 0xCE0
+ SYS_MODFD128 = 0xBF8
+ SYS_MODFD32 = 0xBF6
+ SYS_MODFD64 = 0xBF7
+ SYS_NAN = 0xAA8
+ SYS_NAND128 = 0xBFB
+ SYS_NAND32 = 0xBF9
+ SYS_NAND64 = 0xBFA
+ SYS_NANF = 0xAAA
+ SYS_NANL = 0xAAC
+ SYS_NEARBYINT = 0xAAE
+ SYS_NEARBYINTD128 = 0xBFE
+ SYS_NEARBYINTD32 = 0xBFC
+ SYS_NEARBYINTD64 = 0xBFD
+ SYS_NEARBYINTF = 0xAB1
+ SYS_NEARBYINTL = 0xAB4
+ SYS_NEXTAFTERD128 = 0xC01
+ SYS_NEXTAFTERD32 = 0xBFF
+ SYS_NEXTAFTERD64 = 0xC00
+ SYS_NEXTAFTERF = 0xAB7
+ SYS_NEXTAFTERL = 0xABA
+ SYS_NEXTTOWARD = 0xABD
+ SYS_NEXTTOWARDD128 = 0xC04
+ SYS_NEXTTOWARDD32 = 0xC02
+ SYS_NEXTTOWARDD64 = 0xC03
+ SYS_NEXTTOWARDF = 0xAC0
+ SYS_NEXTTOWARDL = 0xAC3
+ SYS_NL_LANGINFO = 0x0FC
+ SYS_PERROR_UNLOCKED = 0xCBD
+ SYS_POSIX_FALLOCATE = 0xCE8
+ SYS_POSIX_MEMALIGN = 0xCE9
+ SYS_POSIX_OPENPT = 0xC66
+ SYS_POWD128 = 0xC07
+ SYS_POWD32 = 0xC05
+ SYS_POWD64 = 0xC06
+ SYS_PRINTF_UNLOCKED = 0xCBE
+ SYS_PSELECT = 0xC67
+ SYS_PTHREAD_ATTR_GETSTACK = 0xB3E
+ SYS_PTHREAD_ATTR_SETSTACK = 0xB3F
+ SYS_PTHREAD_SECURITY_APPLID_NP = 0xCE4
+ SYS_PUTS_UNLOCKED = 0xC7F
+ SYS_PUTWCHAR_UNLOCKED = 0xCC0
+ SYS_PUTWC_UNLOCKED = 0xCBF
+ SYS_QUANTEXPD128 = 0xD46
+ SYS_QUANTEXPD32 = 0xD44
+ SYS_QUANTEXPD64 = 0xD45
+ SYS_QUANTIZED128 = 0xC0A
+ SYS_QUANTIZED32 = 0xC08
+ SYS_QUANTIZED64 = 0xC09
+ SYS_REMAINDERD128 = 0xC0D
+ SYS_REMAINDERD32 = 0xC0B
+ SYS_REMAINDERD64 = 0xC0C
+ SYS_RESIZE_ALLOC = 0xCEB
+ SYS_REWIND_UNLOCKED = 0xCC1
+ SYS_RINTD128 = 0xC13
+ SYS_RINTD32 = 0xC11
+ SYS_RINTD64 = 0xC12
+ SYS_RINTF = 0xACB
+ SYS_RINTL = 0xACD
+ SYS_ROUND = 0xACF
+ SYS_ROUNDD128 = 0xC16
+ SYS_ROUNDD32 = 0xC14
+ SYS_ROUNDD64 = 0xC15
+ SYS_ROUNDF = 0xAD2
+ SYS_ROUNDL = 0xAD5
+ SYS_SAMEQUANTUMD128 = 0xC19
+ SYS_SAMEQUANTUMD32 = 0xC17
+ SYS_SAMEQUANTUMD64 = 0xC18
+ SYS_SCALBLN = 0xAD8
+ SYS_SCALBLND128 = 0xC1C
+ SYS_SCALBLND32 = 0xC1A
+ SYS_SCALBLND64 = 0xC1B
+ SYS_SCALBLNF = 0xADB
+ SYS_SCALBLNL = 0xADE
+ SYS_SCALBND128 = 0xC1F
+ SYS_SCALBND32 = 0xC1D
+ SYS_SCALBND64 = 0xC1E
+ SYS_SCALBNF = 0xAE3
+ SYS_SCALBNL = 0xAE6
+ SYS_SCANF_UNLOCKED = 0xCC2
+ SYS_SCHED_YIELD = 0xB32
+ SYS_SETENV = 0x0C8
+ SYS_SETIPV4SOURCEFILTER = 0xC76
+ SYS_SETSOURCEFILTER = 0xC78
+ SYS_SHM_OPEN = 0xC8C
+ SYS_SHM_UNLINK = 0xC8D
+ SYS_SIND128 = 0xC22
+ SYS_SIND32 = 0xC20
+ SYS_SIND64 = 0xC21
+ SYS_SINHD128 = 0xC25
+ SYS_SINHD32 = 0xC23
+ SYS_SINHD64 = 0xC24
+ SYS_SIZEOF_ALLOC = 0xCEA
+ SYS_SOCKATMARK = 0xC68
+ SYS_SQRTD128 = 0xC28
+ SYS_SQRTD32 = 0xC26
+ SYS_SQRTD64 = 0xC27
+ SYS_STRCHR = 0x0A0
+ SYS_STRCSPN = 0x0A1
+ SYS_STRERROR = 0x0A8
+ SYS_STRERROR_R = 0xB33
+ SYS_STRFTIME = 0x0B2
+ SYS_STRLEN = 0x0A9
+ SYS_STRPBRK = 0x0A2
+ SYS_STRSPN = 0x0A4
+ SYS_STRSTR = 0x0A5
+ SYS_STRTOD128 = 0xC2B
+ SYS_STRTOD32 = 0xC29
+ SYS_STRTOD64 = 0xC2A
+ SYS_STRTOK = 0x0A6
+ SYS_TAND128 = 0xC2E
+ SYS_TAND32 = 0xC2C
+ SYS_TAND64 = 0xC2D
+ SYS_TANHD128 = 0xC31
+ SYS_TANHD32 = 0xC2F
+ SYS_TANHD64 = 0xC30
+ SYS_TGAMMAD128 = 0xC34
+ SYS_TGAMMAD32 = 0xC32
+ SYS_TGAMMAD64 = 0xC33
+ SYS_TIME = 0x0AD
+ SYS_TIME64 = 0xCE1
+ SYS_TMPFILE64 = 0xD4D
+ SYS_TMPFILE64_UNLOCKED = 0xD4E
+ SYS_TMPFILE_UNLOCKED = 0xCFD
+ SYS_TRUNCD128 = 0xC40
+ SYS_TRUNCD32 = 0xC3E
+ SYS_TRUNCD64 = 0xC3F
+ SYS_UNGETC_UNLOCKED = 0xCC3
+ SYS_UNGETWC_UNLOCKED = 0xCC4
+ SYS_UNSETENV = 0xB34
+ SYS_VFPRINTF_UNLOCKED = 0xCC5
+ SYS_VFSCANF_UNLOCKED = 0xCC7
+ SYS_VFWPRINTF_UNLOCKED = 0xCC9
+ SYS_VFWSCANF_UNLOCKED = 0xCCB
+ SYS_VPRINTF_UNLOCKED = 0xCCD
+ SYS_VSCANF_UNLOCKED = 0xCCF
+ SYS_VWPRINTF_UNLOCKED = 0xCD1
+ SYS_VWSCANF_UNLOCKED = 0xCD3
+ SYS_WCSTOD128 = 0xC43
+ SYS_WCSTOD32 = 0xC41
+ SYS_WCSTOD64 = 0xC42
+ SYS_WPRINTF_UNLOCKED = 0xCD5
+ SYS_WSCANF_UNLOCKED = 0xCD6
+ SYS__FLUSHLBF = 0xD68
+ SYS__FLUSHLBF_UNLOCKED = 0xD6F
+ SYS___ACOSHF_H = 0xA54
+ SYS___ACOSHL_H = 0xA55
+ SYS___ASINHF_H = 0xA56
+ SYS___ASINHL_H = 0xA57
+ SYS___ATANPID128 = 0xC6D
+ SYS___ATANPID32 = 0xC6B
+ SYS___ATANPID64 = 0xC6C
+ SYS___CBRTF_H = 0xA58
+ SYS___CBRTL_H = 0xA59
+ SYS___CDUMP = 0x0C4
+ SYS___CLASS = 0xAFA
+ SYS___CLASS2 = 0xB99
+ SYS___CLASS2D128 = 0xC99
+ SYS___CLASS2D32 = 0xC97
+ SYS___CLASS2D64 = 0xC98
+ SYS___CLASS2F = 0xC91
+ SYS___CLASS2F_B = 0xC93
+ SYS___CLASS2F_H = 0xC94
+ SYS___CLASS2L = 0xC92
+ SYS___CLASS2L_B = 0xC95
+ SYS___CLASS2L_H = 0xC96
+ SYS___CLASS2_B = 0xB9A
+ SYS___CLASS2_H = 0xB9B
+ SYS___CLASS_B = 0xAFB
+ SYS___CLASS_H = 0xAFC
+ SYS___CLOGL_B = 0xA01
+ SYS___CLOGL_H = 0xA02
+ SYS___CLRENV = 0x0C9
+ SYS___CLRMF = 0x0BD
+ SYS___CODEPAGE_INFO = 0xC64
+ SYS___CONJF_B = 0xA07
+ SYS___CONJF_H = 0xA08
+ SYS___CONJL_B = 0xA0A
+ SYS___CONJL_H = 0xA0B
+ SYS___CONJ_B = 0xA04
+ SYS___CONJ_H = 0xA05
+ SYS___COPYSIGN_B = 0xA5A
+ SYS___COPYSIGN_H = 0xAF5
+ SYS___COSPID128 = 0xC70
+ SYS___COSPID32 = 0xC6E
+ SYS___COSPID64 = 0xC6F
+ SYS___CPOWF_B = 0xA10
+ SYS___CPOWF_H = 0xA11
+ SYS___CPOWL_B = 0xA13
+ SYS___CPOWL_H = 0xA14
+ SYS___CPOW_B = 0xA0D
+ SYS___CPOW_H = 0xA0E
+ SYS___CPROJF_B = 0xA19
+ SYS___CPROJF_H = 0xA1A
+ SYS___CPROJL_B = 0xA1C
+ SYS___CPROJL_H = 0xA1D
+ SYS___CPROJ_B = 0xA16
+ SYS___CPROJ_H = 0xA17
+ SYS___CREALF_B = 0xA22
+ SYS___CREALF_H = 0xA23
+ SYS___CREALL_B = 0xA25
+ SYS___CREALL_H = 0xA26
+ SYS___CREAL_B = 0xA1F
+ SYS___CREAL_H = 0xA20
+ SYS___CSINF_B = 0xA2B
+ SYS___CSINF_H = 0xA2C
+ SYS___CSINHF_B = 0xA34
+ SYS___CSINHF_H = 0xA35
+ SYS___CSINHL_B = 0xA37
+ SYS___CSINHL_H = 0xA38
+ SYS___CSINH_B = 0xA31
+ SYS___CSINH_H = 0xA32
+ SYS___CSINL_B = 0xA2E
+ SYS___CSINL_H = 0xA2F
+ SYS___CSIN_B = 0xA28
+ SYS___CSIN_H = 0xA29
+ SYS___CSNAP = 0x0C5
+ SYS___CSQRTF_B = 0xA3D
+ SYS___CSQRTF_H = 0xA3E
+ SYS___CSQRTL_B = 0xA40
+ SYS___CSQRTL_H = 0xA41
+ SYS___CSQRT_B = 0xA3A
+ SYS___CSQRT_H = 0xA3B
+ SYS___CTANF_B = 0xA46
+ SYS___CTANF_H = 0xA47
+ SYS___CTANHF_B = 0xA4F
+ SYS___CTANHF_H = 0xA50
+ SYS___CTANHL_B = 0xA52
+ SYS___CTANHL_H = 0xA53
+ SYS___CTANH_B = 0xA4C
+ SYS___CTANH_H = 0xA4D
+ SYS___CTANL_B = 0xA49
+ SYS___CTANL_H = 0xA4A
+ SYS___CTAN_B = 0xA43
+ SYS___CTAN_H = 0xA44
+ SYS___CTEST = 0x0C7
+ SYS___CTRACE = 0x0C6
+ SYS___D1TOP = 0xC9B
+ SYS___D2TOP = 0xC9C
+ SYS___D4TOP = 0xC9D
+ SYS___DYNALL = 0x0C3
+ SYS___DYNFRE = 0x0C2
+ SYS___EXP2F_H = 0xA5E
+ SYS___EXP2L_H = 0xA5F
+ SYS___EXP2_H = 0xA5D
+ SYS___EXPM1F_H = 0xA5B
+ SYS___EXPM1L_H = 0xA5C
+ SYS___FBUFSIZE = 0xD60
+ SYS___FLBF = 0xD62
+ SYS___FLDATA = 0x0C1
+ SYS___FMAF_B = 0xA67
+ SYS___FMAF_H = 0xA68
+ SYS___FMAL_B = 0xA6A
+ SYS___FMAL_H = 0xA6B
+ SYS___FMAXF_B = 0xA70
+ SYS___FMAXF_H = 0xA71
+ SYS___FMAXL_B = 0xA73
+ SYS___FMAXL_H = 0xA74
+ SYS___FMAX_B = 0xA6D
+ SYS___FMAX_H = 0xA6E
+ SYS___FMA_B = 0xA64
+ SYS___FMA_H = 0xA65
+ SYS___FMINF_B = 0xA79
+ SYS___FMINF_H = 0xA7A
+ SYS___FMINL_B = 0xA7C
+ SYS___FMINL_H = 0xA7D
+ SYS___FMIN_B = 0xA76
+ SYS___FMIN_H = 0xA77
+ SYS___FPENDING = 0xD61
+ SYS___FPENDING_UNLOCKED = 0xD6C
+ SYS___FPURGE = 0xD69
+ SYS___FPURGE_UNLOCKED = 0xD70
+ SYS___FP_CAST_D = 0xBCB
+ SYS___FREADABLE = 0xD63
+ SYS___FREADAHEAD = 0xD6A
+ SYS___FREADAHEAD_UNLOCKED = 0xD71
+ SYS___FREADING = 0xD65
+ SYS___FREADING_UNLOCKED = 0xD6D
+ SYS___FSEEK2 = 0xB3C
+ SYS___FSETERR = 0xD6B
+ SYS___FSETLOCKING = 0xD67
+ SYS___FTCHEP = 0x0BF
+ SYS___FTELL2 = 0xB3B
+ SYS___FUPDT = 0x0B5
+ SYS___FWRITABLE = 0xD64
+ SYS___FWRITING = 0xD66
+ SYS___FWRITING_UNLOCKED = 0xD6E
+ SYS___GETCB = 0x0B4
+ SYS___GETGRGID1 = 0xD5B
+ SYS___GETGRNAM1 = 0xD5C
+ SYS___GETTHENT = 0xCE5
+ SYS___GETTOD = 0xD3E
+ SYS___HYPOTF_H = 0xAF6
+ SYS___HYPOTL_H = 0xAF7
+ SYS___ILOGBF_B = 0xA7F
+ SYS___ILOGBF_H = 0xA80
+ SYS___ILOGBL_B = 0xA82
+ SYS___ILOGBL_H = 0xA83
+ SYS___ISBLANK_A = 0xB2E
+ SYS___ISBLNK = 0x0FE
+ SYS___ISWBLANK_A = 0xB2F
+ SYS___LE_CEEGTJS = 0xD72
+ SYS___LE_TRACEBACK = 0xB7A
+ SYS___LGAMMAL_H = 0xA62
+ SYS___LGAMMA_B_C99 = 0xB39
+ SYS___LGAMMA_H_C99 = 0xB38
+ SYS___LGAMMA_R_C99 = 0xB3A
+ SYS___LLRINTF_B = 0xA88
+ SYS___LLRINTF_H = 0xA89
+ SYS___LLRINTL_B = 0xA8B
+ SYS___LLRINTL_H = 0xA8C
+ SYS___LLRINT_B = 0xA85
+ SYS___LLRINT_H = 0xA86
+ SYS___LLROUNDF_B = 0xA91
+ SYS___LLROUNDF_H = 0xA92
+ SYS___LLROUNDL_B = 0xA94
+ SYS___LLROUNDL_H = 0xA95
+ SYS___LLROUND_B = 0xA8E
+ SYS___LLROUND_H = 0xA8F
+ SYS___LOCALE_CTL = 0xD47
+ SYS___LOG1PF_H = 0xA60
+ SYS___LOG1PL_H = 0xA61
+ SYS___LOGBF_B = 0xA97
+ SYS___LOGBF_H = 0xA98
+ SYS___LOGBL_B = 0xA9A
+ SYS___LOGBL_H = 0xA9B
+ SYS___LOGIN_APPLID = 0xCE2
+ SYS___LRINTF_B = 0xAA0
+ SYS___LRINTF_H = 0xAA1
+ SYS___LRINTL_B = 0xAA3
+ SYS___LRINTL_H = 0xAA4
+ SYS___LRINT_B = 0xA9D
+ SYS___LRINT_H = 0xA9E
+ SYS___LROUNDF_FIXUP = 0xB31
+ SYS___LROUNDL_B = 0xAA6
+ SYS___LROUNDL_H = 0xAA7
+ SYS___LROUND_FIXUP = 0xB30
+ SYS___MOSERVICES = 0xD3D
+ SYS___MUST_STAY_CLEAN = 0xB7C
+ SYS___NANF_B = 0xAAB
+ SYS___NANL_B = 0xAAD
+ SYS___NAN_B = 0xAA9
+ SYS___NEARBYINTF_B = 0xAB2
+ SYS___NEARBYINTF_H = 0xAB3
+ SYS___NEARBYINTL_B = 0xAB5
+ SYS___NEARBYINTL_H = 0xAB6
+ SYS___NEARBYINT_B = 0xAAF
+ SYS___NEARBYINT_H = 0xAB0
+ SYS___NEXTAFTERF_B = 0xAB8
+ SYS___NEXTAFTERF_H = 0xAB9
+ SYS___NEXTAFTERL_B = 0xABB
+ SYS___NEXTAFTERL_H = 0xABC
+ SYS___NEXTTOWARDF_B = 0xAC1
+ SYS___NEXTTOWARDF_H = 0xAC2
+ SYS___NEXTTOWARDL_B = 0xAC4
+ SYS___NEXTTOWARDL_H = 0xAC5
+ SYS___NEXTTOWARD_B = 0xABE
+ SYS___NEXTTOWARD_H = 0xABF
+ SYS___O_ENV = 0xB7D
+ SYS___PASSWD_APPLID = 0xCE3
+ SYS___PTOD1 = 0xC9E
+ SYS___PTOD2 = 0xC9F
+ SYS___PTOD4 = 0xCA0
+ SYS___REGCOMP_STD = 0x0EA
+ SYS___REMAINDERF_H = 0xAC6
+ SYS___REMAINDERL_H = 0xAC7
+ SYS___REMQUOD128 = 0xC10
+ SYS___REMQUOD32 = 0xC0E
+ SYS___REMQUOD64 = 0xC0F
+ SYS___REMQUOF_H = 0xAC9
+ SYS___REMQUOL_H = 0xACA
+ SYS___REMQUO_H = 0xAC8
+ SYS___RINTF_B = 0xACC
+ SYS___RINTL_B = 0xACE
+ SYS___ROUNDF_B = 0xAD3
+ SYS___ROUNDF_H = 0xAD4
+ SYS___ROUNDL_B = 0xAD6
+ SYS___ROUNDL_H = 0xAD7
+ SYS___ROUND_B = 0xAD0
+ SYS___ROUND_H = 0xAD1
+ SYS___SCALBLNF_B = 0xADC
+ SYS___SCALBLNF_H = 0xADD
+ SYS___SCALBLNL_B = 0xADF
+ SYS___SCALBLNL_H = 0xAE0
+ SYS___SCALBLN_B = 0xAD9
+ SYS___SCALBLN_H = 0xADA
+ SYS___SCALBNF_B = 0xAE4
+ SYS___SCALBNF_H = 0xAE5
+ SYS___SCALBNL_B = 0xAE7
+ SYS___SCALBNL_H = 0xAE8
+ SYS___SCALBN_B = 0xAE1
+ SYS___SCALBN_H = 0xAE2
+ SYS___SETENV = 0x0C8
+ SYS___SINPID128 = 0xC73
+ SYS___SINPID32 = 0xC71
+ SYS___SINPID64 = 0xC72
+ SYS___SMF_RECORD2 = 0xD48
+ SYS___STATIC_REINIT = 0xB3D
+ SYS___TGAMMAF_H_C99 = 0xB79
+ SYS___TGAMMAL_H = 0xAE9
+ SYS___TGAMMA_H_C99 = 0xB78
+ SYS___TOCSNAME2 = 0xC9A
+ SYS_CEIL = 0x01F
+ SYS_CHAUDIT = 0x1E0
+ SYS_EXP = 0x01A
+ SYS_FCHAUDIT = 0x1E1
+ SYS_FREXP = 0x01D
+ SYS_GETGROUPSBYNAME = 0x1E2
+ SYS_GETPWUID = 0x1A0
+ SYS_GETUID = 0x1A1
+ SYS_ISATTY = 0x1A3
+ SYS_KILL = 0x1A4
+ SYS_LDEXP = 0x01E
+ SYS_LINK = 0x1A5
+ SYS_LOG10 = 0x01C
+ SYS_LSEEK = 0x1A6
+ SYS_LSTAT = 0x1A7
+ SYS_MKDIR = 0x1A8
+ SYS_MKFIFO = 0x1A9
+ SYS_MKNOD = 0x1AA
+ SYS_MODF = 0x01B
+ SYS_MOUNT = 0x1AB
+ SYS_OPEN = 0x1AC
+ SYS_OPENDIR = 0x1AD
+ SYS_PATHCONF = 0x1AE
+ SYS_PAUSE = 0x1AF
+ SYS_PIPE = 0x1B0
+ SYS_PTHREAD_ATTR_DESTROY = 0x1E7
+ SYS_PTHREAD_ATTR_GETDETACHSTATE = 0x1EB
+ SYS_PTHREAD_ATTR_GETSTACKSIZE = 0x1E9
+ SYS_PTHREAD_ATTR_GETWEIGHT_NP = 0x1ED
+ SYS_PTHREAD_ATTR_INIT = 0x1E6
+ SYS_PTHREAD_ATTR_SETDETACHSTATE = 0x1EA
+ SYS_PTHREAD_ATTR_SETSTACKSIZE = 0x1E8
+ SYS_PTHREAD_ATTR_SETWEIGHT_NP = 0x1EC
+ SYS_PTHREAD_CANCEL = 0x1EE
+ SYS_PTHREAD_CLEANUP_POP = 0x1F0
+ SYS_PTHREAD_CLEANUP_PUSH = 0x1EF
+ SYS_PTHREAD_CONDATTR_DESTROY = 0x1F2
+ SYS_PTHREAD_CONDATTR_INIT = 0x1F1
+ SYS_PTHREAD_COND_BROADCAST = 0x1F6
+ SYS_PTHREAD_COND_DESTROY = 0x1F4
+ SYS_PTHREAD_COND_INIT = 0x1F3
+ SYS_PTHREAD_COND_SIGNAL = 0x1F5
+ SYS_PTHREAD_COND_TIMEDWAIT = 0x1F8
+ SYS_PTHREAD_COND_WAIT = 0x1F7
+ SYS_PTHREAD_CREATE = 0x1F9
+ SYS_PTHREAD_DETACH = 0x1FA
+ SYS_PTHREAD_EQUAL = 0x1FB
+ SYS_PTHREAD_EXIT = 0x1E4
+ SYS_PTHREAD_GETSPECIFIC = 0x1FC
+ SYS_PTHREAD_JOIN = 0x1FD
+ SYS_PTHREAD_KEY_CREATE = 0x1FE
+ SYS_PTHREAD_KILL = 0x1E5
+ SYS_PTHREAD_MUTEXATTR_INIT = 0x1FF
+ SYS_READ = 0x1B2
+ SYS_READDIR = 0x1B3
+ SYS_READLINK = 0x1B4
+ SYS_REWINDDIR = 0x1B5
+ SYS_RMDIR = 0x1B6
+ SYS_SETEGID = 0x1B7
+ SYS_SETEUID = 0x1B8
+ SYS_SETGID = 0x1B9
+ SYS_SETPGID = 0x1BA
+ SYS_SETSID = 0x1BB
+ SYS_SETUID = 0x1BC
+ SYS_SIGACTION = 0x1BD
+ SYS_SIGADDSET = 0x1BE
+ SYS_SIGDELSET = 0x1BF
+ SYS_SIGEMPTYSET = 0x1C0
+ SYS_SIGFILLSET = 0x1C1
+ SYS_SIGISMEMBER = 0x1C2
+ SYS_SIGLONGJMP = 0x1C3
+ SYS_SIGPENDING = 0x1C4
+ SYS_SIGPROCMASK = 0x1C5
+ SYS_SIGSETJMP = 0x1C6
+ SYS_SIGSUSPEND = 0x1C7
+ SYS_SIGWAIT = 0x1E3
+ SYS_SLEEP = 0x1C8
+ SYS_STAT = 0x1C9
+ SYS_SYMLINK = 0x1CB
+ SYS_SYSCONF = 0x1CC
+ SYS_TCDRAIN = 0x1CD
+ SYS_TCFLOW = 0x1CE
+ SYS_TCFLUSH = 0x1CF
+ SYS_TCGETATTR = 0x1D0
+ SYS_TCGETPGRP = 0x1D1
+ SYS_TCSENDBREAK = 0x1D2
+ SYS_TCSETATTR = 0x1D3
+ SYS_TCSETPGRP = 0x1D4
+ SYS_TIMES = 0x1D5
+ SYS_TTYNAME = 0x1D6
+ SYS_TZSET = 0x1D7
+ SYS_UMASK = 0x1D8
+ SYS_UMOUNT = 0x1D9
+ SYS_UNAME = 0x1DA
+ SYS_UNLINK = 0x1DB
+ SYS_UTIME = 0x1DC
+ SYS_WAIT = 0x1DD
+ SYS_WAITPID = 0x1DE
+ SYS_WRITE = 0x1DF
+ SYS_W_GETPSENT = 0x1B1
+ SYS_W_IOCTL = 0x1A2
+ SYS_W_STATFS = 0x1CA
+ SYS_A64L = 0x2EF
+ SYS_BCMP = 0x2B9
+ SYS_BCOPY = 0x2BA
+ SYS_BZERO = 0x2BB
+ SYS_CATCLOSE = 0x2B6
+ SYS_CATGETS = 0x2B7
+ SYS_CATOPEN = 0x2B8
+ SYS_CRYPT = 0x2AC
+ SYS_DBM_CLEARERR = 0x2F7
+ SYS_DBM_CLOSE = 0x2F8
+ SYS_DBM_DELETE = 0x2F9
+ SYS_DBM_ERROR = 0x2FA
+ SYS_DBM_FETCH = 0x2FB
+ SYS_DBM_FIRSTKEY = 0x2FC
+ SYS_DBM_NEXTKEY = 0x2FD
+ SYS_DBM_OPEN = 0x2FE
+ SYS_DBM_STORE = 0x2FF
+ SYS_DRAND48 = 0x2B2
+ SYS_ENCRYPT = 0x2AD
+ SYS_ENDUTXENT = 0x2E1
+ SYS_ERAND48 = 0x2B3
+ SYS_ERF = 0x02C
+ SYS_ERFC = 0x02D
+ SYS_FCHDIR = 0x2D9
+ SYS_FFS = 0x2BC
+ SYS_FMTMSG = 0x2E5
+ SYS_FSTATVFS = 0x2B4
+ SYS_FTIME = 0x2F5
+ SYS_GAMMA = 0x02E
+ SYS_GETDATE = 0x2A6
+ SYS_GETPAGESIZE = 0x2D8
+ SYS_GETTIMEOFDAY = 0x2F6
+ SYS_GETUTXENT = 0x2E0
+ SYS_GETUTXID = 0x2E2
+ SYS_GETUTXLINE = 0x2E3
+ SYS_HCREATE = 0x2C6
+ SYS_HDESTROY = 0x2C7
+ SYS_HSEARCH = 0x2C8
+ SYS_HYPOT = 0x02B
+ SYS_INDEX = 0x2BD
+ SYS_INITSTATE = 0x2C2
+ SYS_INSQUE = 0x2CF
+ SYS_ISASCII = 0x2ED
+ SYS_JRAND48 = 0x2E6
+ SYS_L64A = 0x2F0
+ SYS_LCONG48 = 0x2EA
+ SYS_LFIND = 0x2C9
+ SYS_LRAND48 = 0x2E7
+ SYS_LSEARCH = 0x2CA
+ SYS_MEMCCPY = 0x2D4
+ SYS_MRAND48 = 0x2E8
+ SYS_NRAND48 = 0x2E9
+ SYS_PCLOSE = 0x2D2
+ SYS_POPEN = 0x2D1
+ SYS_PUTUTXLINE = 0x2E4
+ SYS_RANDOM = 0x2C4
+ SYS_REMQUE = 0x2D0
+ SYS_RINDEX = 0x2BE
+ SYS_SEED48 = 0x2EC
+ SYS_SETKEY = 0x2AE
+ SYS_SETSTATE = 0x2C3
+ SYS_SETUTXENT = 0x2DF
+ SYS_SRAND48 = 0x2EB
+ SYS_SRANDOM = 0x2C5
+ SYS_STATVFS = 0x2B5
+ SYS_STRCASECMP = 0x2BF
+ SYS_STRDUP = 0x2C0
+ SYS_STRNCASECMP = 0x2C1
+ SYS_SWAB = 0x2D3
+ SYS_TDELETE = 0x2CB
+ SYS_TFIND = 0x2CC
+ SYS_TOASCII = 0x2EE
+ SYS_TSEARCH = 0x2CD
+ SYS_TWALK = 0x2CE
+ SYS_UALARM = 0x2F1
+ SYS_USLEEP = 0x2F2
+ SYS_WAIT3 = 0x2A7
+ SYS_WAITID = 0x2A8
+ SYS_Y1 = 0x02A
+ SYS___ATOE = 0x2DB
+ SYS___ATOE_L = 0x2DC
+ SYS___CATTRM = 0x2A9
+ SYS___CNVBLK = 0x2AF
+ SYS___CRYTRM = 0x2B0
+ SYS___DLGHT = 0x2A1
+ SYS___ECRTRM = 0x2B1
+ SYS___ETOA = 0x2DD
+ SYS___ETOA_L = 0x2DE
+ SYS___GDTRM = 0x2AA
+ SYS___OCLCK = 0x2DA
+ SYS___OPARGF = 0x2A2
+ SYS___OPERRF = 0x2A5
+ SYS___OPINDF = 0x2A4
+ SYS___OPOPTF = 0x2A3
+ SYS___RNDTRM = 0x2AB
+ SYS___SRCTRM = 0x2F4
+ SYS___TZONE = 0x2A0
+ SYS___UTXTRM = 0x2F3
+ SYS_ASIN = 0x03E
+ SYS_ISXDIGIT = 0x03B
+ SYS_SETLOCAL = 0x03A
+ SYS_SETLOCALE = 0x03A
+ SYS_SIN = 0x03F
+ SYS_TOLOWER = 0x03C
+ SYS_TOUPPER = 0x03D
+ SYS_ACCEPT_AND_RECV = 0x4F7
+ SYS_ATOL = 0x04E
+ SYS_CHECKSCH = 0x4BC
+ SYS_CHECKSCHENV = 0x4BC
+ SYS_CLEARERR = 0x04C
+ SYS_CONNECTS = 0x4B5
+ SYS_CONNECTSERVER = 0x4B5
+ SYS_CONNECTW = 0x4B4
+ SYS_CONNECTWORKMGR = 0x4B4
+ SYS_CONTINUE = 0x4B3
+ SYS_CONTINUEWORKUNIT = 0x4B3
+ SYS_COPYSIGN = 0x4C2
+ SYS_CREATEWO = 0x4B2
+ SYS_CREATEWORKUNIT = 0x4B2
+ SYS_DELETEWO = 0x4B9
+ SYS_DELETEWORKUNIT = 0x4B9
+ SYS_DISCONNE = 0x4B6
+ SYS_DISCONNECTSERVER = 0x4B6
+ SYS_FEOF = 0x04D
+ SYS_FERROR = 0x04A
+ SYS_FINITE = 0x4C8
+ SYS_GAMMA_R = 0x4E2
+ SYS_JOINWORK = 0x4B7
+ SYS_JOINWORKUNIT = 0x4B7
+ SYS_LEAVEWOR = 0x4B8
+ SYS_LEAVEWORKUNIT = 0x4B8
+ SYS_LGAMMA_R = 0x4EB
+ SYS_MATHERR = 0x4D0
+ SYS_PERROR = 0x04F
+ SYS_QUERYMET = 0x4BA
+ SYS_QUERYMETRICS = 0x4BA
+ SYS_QUERYSCH = 0x4BB
+ SYS_QUERYSCHENV = 0x4BB
+ SYS_REWIND = 0x04B
+ SYS_SCALBN = 0x4D4
+ SYS_SIGNIFIC = 0x4D5
+ SYS_SIGNIFICAND = 0x4D5
+ SYS___ACOSH_B = 0x4DA
+ SYS___ACOS_B = 0x4D9
+ SYS___ASINH_B = 0x4BE
+ SYS___ASIN_B = 0x4DB
+ SYS___ATAN2_B = 0x4DC
+ SYS___ATANH_B = 0x4DD
+ SYS___ATAN_B = 0x4BF
+ SYS___CBRT_B = 0x4C0
+ SYS___CEIL_B = 0x4C1
+ SYS___COSH_B = 0x4DE
+ SYS___COS_B = 0x4C3
+ SYS___DGHT = 0x4A8
+ SYS___ENVN = 0x4B0
+ SYS___ERFC_B = 0x4C5
+ SYS___ERF_B = 0x4C4
+ SYS___EXPM1_B = 0x4C6
+ SYS___EXP_B = 0x4DF
+ SYS___FABS_B = 0x4C7
+ SYS___FLOOR_B = 0x4C9
+ SYS___FMOD_B = 0x4E0
+ SYS___FP_SETMODE = 0x4F8
+ SYS___FREXP_B = 0x4CA
+ SYS___GAMMA_B = 0x4E1
+ SYS___GDRR = 0x4A1
+ SYS___HRRNO = 0x4A2
+ SYS___HYPOT_B = 0x4E3
+ SYS___ILOGB_B = 0x4CB
+ SYS___ISNAN_B = 0x4CC
+ SYS___J0_B = 0x4E4
+ SYS___J1_B = 0x4E6
+ SYS___JN_B = 0x4E8
+ SYS___LDEXP_B = 0x4CD
+ SYS___LGAMMA_B = 0x4EA
+ SYS___LOG10_B = 0x4ED
+ SYS___LOG1P_B = 0x4CE
+ SYS___LOGB_B = 0x4CF
+ SYS___LOGIN = 0x4F5
+ SYS___LOG_B = 0x4EC
+ SYS___MLOCKALL = 0x4B1
+ SYS___MODF_B = 0x4D1
+ SYS___NEXTAFTER_B = 0x4D2
+ SYS___OPENDIR2 = 0x4F3
+ SYS___OPEN_STAT = 0x4F6
+ SYS___OPND = 0x4A5
+ SYS___OPPT = 0x4A6
+ SYS___OPRG = 0x4A3
+ SYS___OPRR = 0x4A4
+ SYS___PID_AFFINITY = 0x4BD
+ SYS___POW_B = 0x4EE
+ SYS___READDIR2 = 0x4F4
+ SYS___REMAINDER_B = 0x4EF
+ SYS___RINT_B = 0x4D3
+ SYS___SCALB_B = 0x4F0
+ SYS___SIGACTIONSET = 0x4FB
+ SYS___SIGGM = 0x4A7
+ SYS___SINH_B = 0x4F1
+ SYS___SIN_B = 0x4D6
+ SYS___SQRT_B = 0x4F2
+ SYS___TANH_B = 0x4D8
+ SYS___TAN_B = 0x4D7
+ SYS___TRRNO = 0x4AF
+ SYS___TZNE = 0x4A9
+ SYS___TZZN = 0x4AA
+ SYS___UCREATE = 0x4FC
+ SYS___UFREE = 0x4FE
+ SYS___UHEAPREPORT = 0x4FF
+ SYS___UMALLOC = 0x4FD
+ SYS___Y0_B = 0x4E5
+ SYS___Y1_B = 0x4E7
+ SYS___YN_B = 0x4E9
+ SYS_ABORT = 0x05C
+ SYS_ASCTIME_R = 0x5E0
+ SYS_ATEXIT = 0x05D
+ SYS_CONNECTE = 0x5AE
+ SYS_CONNECTEXPORTIMPORT = 0x5AE
+ SYS_CTIME_R = 0x5E1
+ SYS_DN_COMP = 0x5DF
+ SYS_DN_EXPAND = 0x5DD
+ SYS_DN_SKIPNAME = 0x5DE
+ SYS_EXIT = 0x05A
+ SYS_EXPORTWO = 0x5A1
+ SYS_EXPORTWORKUNIT = 0x5A1
+ SYS_EXTRACTW = 0x5A5
+ SYS_EXTRACTWORKUNIT = 0x5A5
+ SYS_FSEEKO = 0x5C9
+ SYS_FTELLO = 0x5C8
+ SYS_GETGRGID_R = 0x5E7
+ SYS_GETGRNAM_R = 0x5E8
+ SYS_GETLOGIN_R = 0x5E9
+ SYS_GETPWNAM_R = 0x5EA
+ SYS_GETPWUID_R = 0x5EB
+ SYS_GMTIME_R = 0x5E2
+ SYS_IMPORTWO = 0x5A3
+ SYS_IMPORTWORKUNIT = 0x5A3
+ SYS_INET_NTOP = 0x5D3
+ SYS_INET_PTON = 0x5D4
+ SYS_LLABS = 0x5CE
+ SYS_LLDIV = 0x5CB
+ SYS_LOCALTIME_R = 0x5E3
+ SYS_PTHREAD_ATFORK = 0x5ED
+ SYS_PTHREAD_ATTR_GETDETACHSTATE_U98 = 0x5FB
+ SYS_PTHREAD_ATTR_GETGUARDSIZE = 0x5EE
+ SYS_PTHREAD_ATTR_GETSCHEDPARAM = 0x5F9
+ SYS_PTHREAD_ATTR_GETSTACKADDR = 0x5EF
+ SYS_PTHREAD_ATTR_SETDETACHSTATE_U98 = 0x5FC
+ SYS_PTHREAD_ATTR_SETGUARDSIZE = 0x5F0
+ SYS_PTHREAD_ATTR_SETSCHEDPARAM = 0x5FA
+ SYS_PTHREAD_ATTR_SETSTACKADDR = 0x5F1
+ SYS_PTHREAD_CONDATTR_GETPSHARED = 0x5F2
+ SYS_PTHREAD_CONDATTR_SETPSHARED = 0x5F3
+ SYS_PTHREAD_DETACH_U98 = 0x5FD
+ SYS_PTHREAD_GETCONCURRENCY = 0x5F4
+ SYS_PTHREAD_GETSPECIFIC_U98 = 0x5FE
+ SYS_PTHREAD_KEY_DELETE = 0x5F5
+ SYS_PTHREAD_SETCANCELSTATE = 0x5FF
+ SYS_PTHREAD_SETCONCURRENCY = 0x5F6
+ SYS_PTHREAD_SIGMASK = 0x5F7
+ SYS_QUERYENC = 0x5AD
+ SYS_QUERYWORKUNITCLASSIFICATION = 0x5AD
+ SYS_RAISE = 0x05E
+ SYS_RAND_R = 0x5E4
+ SYS_READDIR_R = 0x5E6
+ SYS_REALLOC = 0x05B
+ SYS_RES_INIT = 0x5D8
+ SYS_RES_MKQUERY = 0x5D7
+ SYS_RES_QUERY = 0x5D9
+ SYS_RES_QUERYDOMAIN = 0x5DC
+ SYS_RES_SEARCH = 0x5DA
+ SYS_RES_SEND = 0x5DB
+ SYS_SETJMP = 0x05F
+ SYS_SIGQUEUE = 0x5A9
+ SYS_STRTOK_R = 0x5E5
+ SYS_STRTOLL = 0x5B0
+ SYS_STRTOULL = 0x5B1
+ SYS_TTYNAME_R = 0x5EC
+ SYS_UNDOEXPO = 0x5A2
+ SYS_UNDOEXPORTWORKUNIT = 0x5A2
+ SYS_UNDOIMPO = 0x5A4
+ SYS_UNDOIMPORTWORKUNIT = 0x5A4
+ SYS_WCSTOLL = 0x5CC
+ SYS_WCSTOULL = 0x5CD
+ SYS___ABORT = 0x05C
+ SYS___CONSOLE2 = 0x5D2
+ SYS___CPL = 0x5A6
+ SYS___DISCARDDATA = 0x5F8
+ SYS___DSA_PREV = 0x5B2
+ SYS___EP_FIND = 0x5B3
+ SYS___FP_SWAPMODE = 0x5AF
+ SYS___GETUSERID = 0x5AB
+ SYS___GET_CPUID = 0x5B9
+ SYS___GET_SYSTEM_SETTINGS = 0x5BA
+ SYS___IPDOMAINNAME = 0x5AC
+ SYS___MAP_INIT = 0x5A7
+ SYS___MAP_SERVICE = 0x5A8
+ SYS___MOUNT = 0x5AA
+ SYS___MSGRCV_TIMED = 0x5B7
+ SYS___RES = 0x5D6
+ SYS___SEMOP_TIMED = 0x5B8
+ SYS___SERVER_THREADS_QUERY = 0x5B4
+ SYS_FPRINTF = 0x06D
+ SYS_FSCANF = 0x06A
+ SYS_PRINTF = 0x06F
+ SYS_SETBUF = 0x06B
+ SYS_SETVBUF = 0x06C
+ SYS_SSCANF = 0x06E
+ SYS___CATGETS_A = 0x6C0
+ SYS___CHAUDIT_A = 0x6F4
+ SYS___CHMOD_A = 0x6E8
+ SYS___COLLATE_INIT_A = 0x6AC
+ SYS___CREAT_A = 0x6F6
+ SYS___CTYPE_INIT_A = 0x6AF
+ SYS___DLLLOAD_A = 0x6DF
+ SYS___DLLQUERYFN_A = 0x6E0
+ SYS___DLLQUERYVAR_A = 0x6E1
+ SYS___E2A_L = 0x6E3
+ SYS___EXECLE_A = 0x6A0
+ SYS___EXECLP_A = 0x6A4
+ SYS___EXECVE_A = 0x6C1
+ SYS___EXECVP_A = 0x6C2
+ SYS___EXECV_A = 0x6B1
+ SYS___FPRINTF_A = 0x6FA
+ SYS___GETADDRINFO_A = 0x6BF
+ SYS___GETNAMEINFO_A = 0x6C4
+ SYS___GET_WCTYPE_STD_A = 0x6AE
+ SYS___ICONV_OPEN_A = 0x6DE
+ SYS___IF_INDEXTONAME_A = 0x6DC
+ SYS___IF_NAMETOINDEX_A = 0x6DB
+ SYS___ISWCTYPE_A = 0x6B0
+ SYS___IS_WCTYPE_STD_A = 0x6B2
+ SYS___LOCALECONV_A = 0x6B8
+ SYS___LOCALECONV_STD_A = 0x6B9
+ SYS___LOCALE_INIT_A = 0x6B7
+ SYS___LSTAT_A = 0x6EE
+ SYS___LSTAT_O_A = 0x6EF
+ SYS___MKDIR_A = 0x6E9
+ SYS___MKFIFO_A = 0x6EC
+ SYS___MKNOD_A = 0x6F0
+ SYS___MONETARY_INIT_A = 0x6BC
+ SYS___MOUNT_A = 0x6F1
+ SYS___NL_CSINFO_A = 0x6D6
+ SYS___NL_LANGINFO_A = 0x6BA
+ SYS___NL_LNAGINFO_STD_A = 0x6BB
+ SYS___NL_MONINFO_A = 0x6D7
+ SYS___NL_NUMINFO_A = 0x6D8
+ SYS___NL_RESPINFO_A = 0x6D9
+ SYS___NL_TIMINFO_A = 0x6DA
+ SYS___NUMERIC_INIT_A = 0x6C6
+ SYS___OPEN_A = 0x6F7
+ SYS___PRINTF_A = 0x6DD
+ SYS___RESP_INIT_A = 0x6C7
+ SYS___RPMATCH_A = 0x6C8
+ SYS___RPMATCH_C_A = 0x6C9
+ SYS___RPMATCH_STD_A = 0x6CA
+ SYS___SETLOCALE_A = 0x6F9
+ SYS___SPAWNP_A = 0x6C5
+ SYS___SPAWN_A = 0x6C3
+ SYS___SPRINTF_A = 0x6FB
+ SYS___STAT_A = 0x6EA
+ SYS___STAT_O_A = 0x6EB
+ SYS___STRCOLL_STD_A = 0x6A1
+ SYS___STRFMON_A = 0x6BD
+ SYS___STRFMON_STD_A = 0x6BE
+ SYS___STRFTIME_A = 0x6CC
+ SYS___STRFTIME_STD_A = 0x6CD
+ SYS___STRPTIME_A = 0x6CE
+ SYS___STRPTIME_STD_A = 0x6CF
+ SYS___STRXFRM_A = 0x6A2
+ SYS___STRXFRM_C_A = 0x6A3
+ SYS___STRXFRM_STD_A = 0x6A5
+ SYS___SYNTAX_INIT_A = 0x6D4
+ SYS___TIME_INIT_A = 0x6CB
+ SYS___TOD_INIT_A = 0x6D5
+ SYS___TOWLOWER_A = 0x6B3
+ SYS___TOWLOWER_STD_A = 0x6B4
+ SYS___TOWUPPER_A = 0x6B5
+ SYS___TOWUPPER_STD_A = 0x6B6
+ SYS___UMOUNT_A = 0x6F2
+ SYS___VFPRINTF_A = 0x6FC
+ SYS___VPRINTF_A = 0x6FD
+ SYS___VSPRINTF_A = 0x6FE
+ SYS___VSWPRINTF_A = 0x6FF
+ SYS___WCSCOLL_A = 0x6A6
+ SYS___WCSCOLL_C_A = 0x6A7
+ SYS___WCSCOLL_STD_A = 0x6A8
+ SYS___WCSFTIME_A = 0x6D0
+ SYS___WCSFTIME_STD_A = 0x6D1
+ SYS___WCSXFRM_A = 0x6A9
+ SYS___WCSXFRM_C_A = 0x6AA
+ SYS___WCSXFRM_STD_A = 0x6AB
+ SYS___WCTYPE_A = 0x6AD
+ SYS___W_GETMNTENT_A = 0x6F5
+ SYS_____CCSIDTYPE_A = 0x6E6
+ SYS_____CHATTR_A = 0x6E2
+ SYS_____CSNAMETYPE_A = 0x6E7
+ SYS_____OPEN_STAT_A = 0x6ED
+ SYS_____SPAWN2_A = 0x6D2
+ SYS_____SPAWNP2_A = 0x6D3
+ SYS_____TOCCSID_A = 0x6E4
+ SYS_____TOCSNAME_A = 0x6E5
+ SYS_ACL_FREE = 0x7FF
+ SYS_ACL_INIT = 0x7FE
+ SYS_FWIDE = 0x7DF
+ SYS_FWPRINTF = 0x7D1
+ SYS_FWRITE = 0x07E
+ SYS_FWSCANF = 0x7D5
+ SYS_GETCHAR = 0x07B
+ SYS_GETS = 0x07C
+ SYS_M_CREATE_LAYOUT = 0x7C9
+ SYS_M_DESTROY_LAYOUT = 0x7CA
+ SYS_M_GETVALUES_LAYOUT = 0x7CB
+ SYS_M_SETVALUES_LAYOUT = 0x7CC
+ SYS_M_TRANSFORM_LAYOUT = 0x7CD
+ SYS_M_WTRANSFORM_LAYOUT = 0x7CE
+ SYS_PREAD = 0x7C7
+ SYS_PUTC = 0x07D
+ SYS_PUTCHAR = 0x07A
+ SYS_PUTS = 0x07F
+ SYS_PWRITE = 0x7C8
+ SYS_TOWCTRAN = 0x7D8
+ SYS_TOWCTRANS = 0x7D8
+ SYS_UNATEXIT = 0x7B5
+ SYS_VFWPRINT = 0x7D3
+ SYS_VFWPRINTF = 0x7D3
+ SYS_VWPRINTF = 0x7D4
+ SYS_WCTRANS = 0x7D7
+ SYS_WPRINTF = 0x7D2
+ SYS_WSCANF = 0x7D6
+ SYS___ASCTIME_R_A = 0x7A1
+ SYS___BASENAME_A = 0x7DC
+ SYS___BTOWC_A = 0x7E4
+ SYS___CDUMP_A = 0x7B7
+ SYS___CEE3DMP_A = 0x7B6
+ SYS___CEILF_H = 0x7F4
+ SYS___CEILL_H = 0x7F5
+ SYS___CEIL_H = 0x7EA
+ SYS___CRYPT_A = 0x7BE
+ SYS___CSNAP_A = 0x7B8
+ SYS___CTEST_A = 0x7B9
+ SYS___CTIME_R_A = 0x7A2
+ SYS___CTRACE_A = 0x7BA
+ SYS___DBM_OPEN_A = 0x7E6
+ SYS___DIRNAME_A = 0x7DD
+ SYS___FABSF_H = 0x7FA
+ SYS___FABSL_H = 0x7FB
+ SYS___FABS_H = 0x7ED
+ SYS___FGETWC_A = 0x7AA
+ SYS___FGETWS_A = 0x7AD
+ SYS___FLOORF_H = 0x7F6
+ SYS___FLOORL_H = 0x7F7
+ SYS___FLOOR_H = 0x7EB
+ SYS___FPUTWC_A = 0x7A5
+ SYS___FPUTWS_A = 0x7A8
+ SYS___GETTIMEOFDAY_A = 0x7AE
+ SYS___GETWCHAR_A = 0x7AC
+ SYS___GETWC_A = 0x7AB
+ SYS___GLOB_A = 0x7DE
+ SYS___GMTIME_A = 0x7AF
+ SYS___GMTIME_R_A = 0x7B0
+ SYS___INET_PTON_A = 0x7BC
+ SYS___J0_H = 0x7EE
+ SYS___J1_H = 0x7EF
+ SYS___JN_H = 0x7F0
+ SYS___LOCALTIME_A = 0x7B1
+ SYS___LOCALTIME_R_A = 0x7B2
+ SYS___MALLOC24 = 0x7FC
+ SYS___MALLOC31 = 0x7FD
+ SYS___MKTIME_A = 0x7B3
+ SYS___MODFF_H = 0x7F8
+ SYS___MODFL_H = 0x7F9
+ SYS___MODF_H = 0x7EC
+ SYS___OPENDIR_A = 0x7C2
+ SYS___OSNAME = 0x7E0
+ SYS___PUTWCHAR_A = 0x7A7
+ SYS___PUTWC_A = 0x7A6
+ SYS___READDIR_A = 0x7C3
+ SYS___STRTOLL_A = 0x7A3
+ SYS___STRTOULL_A = 0x7A4
+ SYS___SYSLOG_A = 0x7BD
+ SYS___TZZNA = 0x7B4
+ SYS___UNGETWC_A = 0x7A9
+ SYS___UTIME_A = 0x7A0
+ SYS___VFPRINTF2_A = 0x7E7
+ SYS___VPRINTF2_A = 0x7E8
+ SYS___VSPRINTF2_A = 0x7E9
+ SYS___VSWPRNTF2_A = 0x7BB
+ SYS___WCSTOD_A = 0x7D9
+ SYS___WCSTOL_A = 0x7DA
+ SYS___WCSTOUL_A = 0x7DB
+ SYS___WCTOB_A = 0x7E5
+ SYS___Y0_H = 0x7F1
+ SYS___Y1_H = 0x7F2
+ SYS___YN_H = 0x7F3
+ SYS_____OPENDIR2_A = 0x7BF
+ SYS_____OSNAME_A = 0x7E1
+ SYS_____READDIR2_A = 0x7C0
+ SYS_DLCLOSE = 0x8DF
+ SYS_DLERROR = 0x8E0
+ SYS_DLOPEN = 0x8DD
+ SYS_DLSYM = 0x8DE
+ SYS_FLOCKFILE = 0x8D3
+ SYS_FTRYLOCKFILE = 0x8D4
+ SYS_FUNLOCKFILE = 0x8D5
+ SYS_GETCHAR_UNLOCKED = 0x8D7
+ SYS_GETC_UNLOCKED = 0x8D6
+ SYS_PUTCHAR_UNLOCKED = 0x8D9
+ SYS_PUTC_UNLOCKED = 0x8D8
+ SYS_SNPRINTF = 0x8DA
+ SYS_VSNPRINTF = 0x8DB
+ SYS_WCSCSPN = 0x08B
+ SYS_WCSLEN = 0x08C
+ SYS_WCSNCAT = 0x08D
+ SYS_WCSNCMP = 0x08A
+ SYS_WCSNCPY = 0x08F
+ SYS_WCSSPN = 0x08E
+ SYS___ABSF_H = 0x8E7
+ SYS___ABSL_H = 0x8E8
+ SYS___ABS_H = 0x8E6
+ SYS___ACOSF_H = 0x8EA
+ SYS___ACOSH_H = 0x8EC
+ SYS___ACOSL_H = 0x8EB
+ SYS___ACOS_H = 0x8E9
+ SYS___ASINF_H = 0x8EE
+ SYS___ASINH_H = 0x8F0
+ SYS___ASINL_H = 0x8EF
+ SYS___ASIN_H = 0x8ED
+ SYS___ATAN2F_H = 0x8F8
+ SYS___ATAN2L_H = 0x8F9
+ SYS___ATAN2_H = 0x8F7
+ SYS___ATANF_H = 0x8F2
+ SYS___ATANHF_H = 0x8F5
+ SYS___ATANHL_H = 0x8F6
+ SYS___ATANH_H = 0x8F4
+ SYS___ATANL_H = 0x8F3
+ SYS___ATAN_H = 0x8F1
+ SYS___CBRT_H = 0x8FA
+ SYS___COPYSIGNF_H = 0x8FB
+ SYS___COPYSIGNL_H = 0x8FC
+ SYS___COSF_H = 0x8FE
+ SYS___COSL_H = 0x8FF
+ SYS___COS_H = 0x8FD
+ SYS___DLERROR_A = 0x8D2
+ SYS___DLOPEN_A = 0x8D0
+ SYS___DLSYM_A = 0x8D1
+ SYS___GETUTXENT_A = 0x8C6
+ SYS___GETUTXID_A = 0x8C7
+ SYS___GETUTXLINE_A = 0x8C8
+ SYS___ITOA = 0x8AA
+ SYS___ITOA_A = 0x8B0
+ SYS___LE_CONDITION_TOKEN_BUILD = 0x8A5
+ SYS___LE_MSG_ADD_INSERT = 0x8A6
+ SYS___LE_MSG_GET = 0x8A7
+ SYS___LE_MSG_GET_AND_WRITE = 0x8A8
+ SYS___LE_MSG_WRITE = 0x8A9
+ SYS___LLTOA = 0x8AE
+ SYS___LLTOA_A = 0x8B4
+ SYS___LTOA = 0x8AC
+ SYS___LTOA_A = 0x8B2
+ SYS___PUTCHAR_UNLOCKED_A = 0x8CC
+ SYS___PUTC_UNLOCKED_A = 0x8CB
+ SYS___PUTUTXLINE_A = 0x8C9
+ SYS___RESET_EXCEPTION_HANDLER = 0x8E3
+ SYS___REXEC_A = 0x8C4
+ SYS___REXEC_AF_A = 0x8C5
+ SYS___SET_EXCEPTION_HANDLER = 0x8E2
+ SYS___SNPRINTF_A = 0x8CD
+ SYS___SUPERKILL = 0x8A4
+ SYS___TCGETATTR_A = 0x8A1
+ SYS___TCSETATTR_A = 0x8A2
+ SYS___ULLTOA = 0x8AF
+ SYS___ULLTOA_A = 0x8B5
+ SYS___ULTOA = 0x8AD
+ SYS___ULTOA_A = 0x8B3
+ SYS___UTOA = 0x8AB
+ SYS___UTOA_A = 0x8B1
+ SYS___VHM_EVENT = 0x8E4
+ SYS___VSNPRINTF_A = 0x8CE
+ SYS_____GETENV_A = 0x8C3
+ SYS_____UTMPXNAME_A = 0x8CA
+ SYS_CACOSH = 0x9A0
+ SYS_CACOSHF = 0x9A3
+ SYS_CACOSHL = 0x9A6
+ SYS_CARG = 0x9A9
+ SYS_CARGF = 0x9AC
+ SYS_CARGL = 0x9AF
+ SYS_CASIN = 0x9B2
+ SYS_CASINF = 0x9B5
+ SYS_CASINH = 0x9BB
+ SYS_CASINHF = 0x9BE
+ SYS_CASINHL = 0x9C1
+ SYS_CASINL = 0x9B8
+ SYS_CATAN = 0x9C4
+ SYS_CATANF = 0x9C7
+ SYS_CATANH = 0x9CD
+ SYS_CATANHF = 0x9D0
+ SYS_CATANHL = 0x9D3
+ SYS_CATANL = 0x9CA
+ SYS_CCOS = 0x9D6
+ SYS_CCOSF = 0x9D9
+ SYS_CCOSH = 0x9DF
+ SYS_CCOSHF = 0x9E2
+ SYS_CCOSHL = 0x9E5
+ SYS_CCOSL = 0x9DC
+ SYS_CEXP = 0x9E8
+ SYS_CEXPF = 0x9EB
+ SYS_CEXPL = 0x9EE
+ SYS_CIMAG = 0x9F1
+ SYS_CIMAGF = 0x9F4
+ SYS_CIMAGL = 0x9F7
+ SYS_CLOGF = 0x9FD
+ SYS_MEMCHR = 0x09B
+ SYS_MEMCMP = 0x09A
+ SYS_STRCOLL = 0x09C
+ SYS_STRNCMP = 0x09D
+ SYS_STRRCHR = 0x09F
+ SYS_STRXFRM = 0x09E
+ SYS___CACOSHF_B = 0x9A4
+ SYS___CACOSHF_H = 0x9A5
+ SYS___CACOSHL_B = 0x9A7
+ SYS___CACOSHL_H = 0x9A8
+ SYS___CACOSH_B = 0x9A1
+ SYS___CACOSH_H = 0x9A2
+ SYS___CARGF_B = 0x9AD
+ SYS___CARGF_H = 0x9AE
+ SYS___CARGL_B = 0x9B0
+ SYS___CARGL_H = 0x9B1
+ SYS___CARG_B = 0x9AA
+ SYS___CARG_H = 0x9AB
+ SYS___CASINF_B = 0x9B6
+ SYS___CASINF_H = 0x9B7
+ SYS___CASINHF_B = 0x9BF
+ SYS___CASINHF_H = 0x9C0
+ SYS___CASINHL_B = 0x9C2
+ SYS___CASINHL_H = 0x9C3
+ SYS___CASINH_B = 0x9BC
+ SYS___CASINH_H = 0x9BD
+ SYS___CASINL_B = 0x9B9
+ SYS___CASINL_H = 0x9BA
+ SYS___CASIN_B = 0x9B3
+ SYS___CASIN_H = 0x9B4
+ SYS___CATANF_B = 0x9C8
+ SYS___CATANF_H = 0x9C9
+ SYS___CATANHF_B = 0x9D1
+ SYS___CATANHF_H = 0x9D2
+ SYS___CATANHL_B = 0x9D4
+ SYS___CATANHL_H = 0x9D5
+ SYS___CATANH_B = 0x9CE
+ SYS___CATANH_H = 0x9CF
+ SYS___CATANL_B = 0x9CB
+ SYS___CATANL_H = 0x9CC
+ SYS___CATAN_B = 0x9C5
+ SYS___CATAN_H = 0x9C6
+ SYS___CCOSF_B = 0x9DA
+ SYS___CCOSF_H = 0x9DB
+ SYS___CCOSHF_B = 0x9E3
+ SYS___CCOSHF_H = 0x9E4
+ SYS___CCOSHL_B = 0x9E6
+ SYS___CCOSHL_H = 0x9E7
+ SYS___CCOSH_B = 0x9E0
+ SYS___CCOSH_H = 0x9E1
+ SYS___CCOSL_B = 0x9DD
+ SYS___CCOSL_H = 0x9DE
+ SYS___CCOS_B = 0x9D7
+ SYS___CCOS_H = 0x9D8
+ SYS___CEXPF_B = 0x9EC
+ SYS___CEXPF_H = 0x9ED
+ SYS___CEXPL_B = 0x9EF
+ SYS___CEXPL_H = 0x9F0
+ SYS___CEXP_B = 0x9E9
+ SYS___CEXP_H = 0x9EA
+ SYS___CIMAGF_B = 0x9F5
+ SYS___CIMAGF_H = 0x9F6
+ SYS___CIMAGL_B = 0x9F8
+ SYS___CIMAGL_H = 0x9F9
+ SYS___CIMAG_B = 0x9F2
+ SYS___CIMAG_H = 0x9F3
+ SYS___CLOG = 0x9FA
+ SYS___CLOGF_B = 0x9FE
+ SYS___CLOGF_H = 0x9FF
+ SYS___CLOG_B = 0x9FB
+ SYS___CLOG_H = 0x9FC
+ SYS_ISWCTYPE = 0x10C
+ SYS_ISWXDIGI = 0x10A
+ SYS_ISWXDIGIT = 0x10A
+ SYS_MBSINIT = 0x10F
+ SYS_TOWLOWER = 0x10D
+ SYS_TOWUPPER = 0x10E
+ SYS_WCTYPE = 0x10B
+ SYS_WCSSTR = 0x11B
+ SYS___RPMTCH = 0x11A
+ SYS_WCSTOD = 0x12E
+ SYS_WCSTOK = 0x12C
+ SYS_WCSTOL = 0x12D
+ SYS_WCSTOUL = 0x12F
+ SYS_FGETWC = 0x13C
+ SYS_FGETWS = 0x13D
+ SYS_FPUTWC = 0x13E
+ SYS_FPUTWS = 0x13F
+ SYS_REGERROR = 0x13B
+ SYS_REGFREE = 0x13A
+ SYS_COLLEQUIV = 0x14F
+ SYS_COLLTOSTR = 0x14E
+ SYS_ISMCCOLLEL = 0x14C
+ SYS_STRTOCOLL = 0x14D
+ SYS_DLLFREE = 0x16F
+ SYS_DLLQUERYFN = 0x16D
+ SYS_DLLQUERYVAR = 0x16E
+ SYS_GETMCCOLL = 0x16A
+ SYS_GETWMCCOLL = 0x16B
+ SYS___ERR2AD = 0x16C
+ SYS_CFSETOSPEED = 0x17A
+ SYS_CHDIR = 0x17B
+ SYS_CHMOD = 0x17C
+ SYS_CHOWN = 0x17D
+ SYS_CLOSE = 0x17E
+ SYS_CLOSEDIR = 0x17F
+ SYS_LOG = 0x017
+ SYS_COSH = 0x018
+ SYS_FCHMOD = 0x18A
+ SYS_FCHOWN = 0x18B
+ SYS_FCNTL = 0x18C
+ SYS_FILENO = 0x18D
+ SYS_FORK = 0x18E
+ SYS_FPATHCONF = 0x18F
+ SYS_GETLOGIN = 0x19A
+ SYS_GETPGRP = 0x19C
+ SYS_GETPID = 0x19D
+ SYS_GETPPID = 0x19E
+ SYS_GETPWNAM = 0x19F
+ SYS_TANH = 0x019
+ SYS_W_GETMNTENT = 0x19B
+ SYS_POW = 0x020
+ SYS_PTHREAD_SELF = 0x20A
+ SYS_PTHREAD_SETINTR = 0x20B
+ SYS_PTHREAD_SETINTRTYPE = 0x20C
+ SYS_PTHREAD_SETSPECIFIC = 0x20D
+ SYS_PTHREAD_TESTINTR = 0x20E
+ SYS_PTHREAD_YIELD = 0x20F
+ SYS_SQRT = 0x021
+ SYS_FLOOR = 0x022
+ SYS_J1 = 0x023
+ SYS_WCSPBRK = 0x23F
+ SYS_BSEARCH = 0x24C
+ SYS_FABS = 0x024
+ SYS_GETENV = 0x24A
+ SYS_LDIV = 0x24D
+ SYS_SYSTEM = 0x24B
+ SYS_FMOD = 0x025
+ SYS___RETHROW = 0x25F
+ SYS___THROW = 0x25E
+ SYS_J0 = 0x026
+ SYS_PUTENV = 0x26A
+ SYS___GETENV = 0x26F
+ SYS_SEMCTL = 0x27A
+ SYS_SEMGET = 0x27B
+ SYS_SEMOP = 0x27C
+ SYS_SHMAT = 0x27D
+ SYS_SHMCTL = 0x27E
+ SYS_SHMDT = 0x27F
+ SYS_YN = 0x027
+ SYS_JN = 0x028
+ SYS_SIGALTSTACK = 0x28A
+ SYS_SIGHOLD = 0x28B
+ SYS_SIGIGNORE = 0x28C
+ SYS_SIGINTERRUPT = 0x28D
+ SYS_SIGPAUSE = 0x28E
+ SYS_SIGRELSE = 0x28F
+ SYS_GETOPT = 0x29A
+ SYS_GETSUBOPT = 0x29D
+ SYS_LCHOWN = 0x29B
+ SYS_SETPGRP = 0x29E
+ SYS_TRUNCATE = 0x29C
+ SYS_Y0 = 0x029
+ SYS___GDERR = 0x29F
+ SYS_ISALPHA = 0x030
+ SYS_VFORK = 0x30F
+ SYS__LONGJMP = 0x30D
+ SYS__SETJMP = 0x30E
+ SYS_GLOB = 0x31A
+ SYS_GLOBFREE = 0x31B
+ SYS_ISALNUM = 0x031
+ SYS_PUTW = 0x31C
+ SYS_SEEKDIR = 0x31D
+ SYS_TELLDIR = 0x31E
+ SYS_TEMPNAM = 0x31F
+ SYS_GETTIMEOFDAY_R = 0x32E
+ SYS_ISLOWER = 0x032
+ SYS_LGAMMA = 0x32C
+ SYS_REMAINDER = 0x32A
+ SYS_SCALB = 0x32B
+ SYS_SYNC = 0x32F
+ SYS_TTYSLOT = 0x32D
+ SYS_ENDPROTOENT = 0x33A
+ SYS_ENDSERVENT = 0x33B
+ SYS_GETHOSTBYADDR = 0x33D
+ SYS_GETHOSTBYADDR_R = 0x33C
+ SYS_GETHOSTBYNAME = 0x33F
+ SYS_GETHOSTBYNAME_R = 0x33E
+ SYS_ISCNTRL = 0x033
+ SYS_GETSERVBYNAME = 0x34A
+ SYS_GETSERVBYPORT = 0x34B
+ SYS_GETSERVENT = 0x34C
+ SYS_GETSOCKNAME = 0x34D
+ SYS_GETSOCKOPT = 0x34E
+ SYS_INET_ADDR = 0x34F
+ SYS_ISDIGIT = 0x034
+ SYS_ISGRAPH = 0x035
+ SYS_SELECT = 0x35B
+ SYS_SELECTEX = 0x35C
+ SYS_SEND = 0x35D
+ SYS_SENDTO = 0x35F
+ SYS_CHROOT = 0x36A
+ SYS_ISNAN = 0x36D
+ SYS_ISUPPER = 0x036
+ SYS_ULIMIT = 0x36C
+ SYS_UTIMES = 0x36E
+ SYS_W_STATVFS = 0x36B
+ SYS___H_ERRNO = 0x36F
+ SYS_GRANTPT = 0x37A
+ SYS_ISPRINT = 0x037
+ SYS_TCGETSID = 0x37C
+ SYS_UNLOCKPT = 0x37B
+ SYS___TCGETCP = 0x37D
+ SYS___TCSETCP = 0x37E
+ SYS___TCSETTABLES = 0x37F
+ SYS_ISPUNCT = 0x038
+ SYS_NLIST = 0x38C
+ SYS___IPDBCS = 0x38D
+ SYS___IPDSPX = 0x38E
+ SYS___IPMSGC = 0x38F
+ SYS___STHOSTENT = 0x38B
+ SYS___STSERVENT = 0x38A
+ SYS_ISSPACE = 0x039
+ SYS_COS = 0x040
+ SYS_T_ALLOC = 0x40A
+ SYS_T_BIND = 0x40B
+ SYS_T_CLOSE = 0x40C
+ SYS_T_CONNECT = 0x40D
+ SYS_T_ERROR = 0x40E
+ SYS_T_FREE = 0x40F
+ SYS_TAN = 0x041
+ SYS_T_RCVREL = 0x41A
+ SYS_T_RCVUDATA = 0x41B
+ SYS_T_RCVUDERR = 0x41C
+ SYS_T_SND = 0x41D
+ SYS_T_SNDDIS = 0x41E
+ SYS_T_SNDREL = 0x41F
+ SYS_GETPMSG = 0x42A
+ SYS_ISASTREAM = 0x42B
+ SYS_PUTMSG = 0x42C
+ SYS_PUTPMSG = 0x42D
+ SYS_SINH = 0x042
+ SYS___ISPOSIXON = 0x42E
+ SYS___OPENMVSREL = 0x42F
+ SYS_ACOS = 0x043
+ SYS_ATAN = 0x044
+ SYS_ATAN2 = 0x045
+ SYS_FTELL = 0x046
+ SYS_FGETPOS = 0x047
+ SYS_SOCK_DEBUG = 0x47A
+ SYS_SOCK_DO_TESTSTOR = 0x47D
+ SYS_TAKESOCKET = 0x47E
+ SYS___SERVER_INIT = 0x47F
+ SYS_FSEEK = 0x048
+ SYS___IPHOST = 0x48B
+ SYS___IPNODE = 0x48C
+ SYS___SERVER_CLASSIFY_CREATE = 0x48D
+ SYS___SERVER_CLASSIFY_DESTROY = 0x48E
+ SYS___SERVER_CLASSIFY_RESET = 0x48F
+ SYS___SMF_RECORD = 0x48A
+ SYS_FSETPOS = 0x049
+ SYS___FNWSA = 0x49B
+ SYS___SPAWN2 = 0x49D
+ SYS___SPAWNP2 = 0x49E
+ SYS_ATOF = 0x050
+ SYS_PTHREAD_MUTEXATTR_GETPSHARED = 0x50A
+ SYS_PTHREAD_MUTEXATTR_SETPSHARED = 0x50B
+ SYS_PTHREAD_RWLOCK_DESTROY = 0x50C
+ SYS_PTHREAD_RWLOCK_INIT = 0x50D
+ SYS_PTHREAD_RWLOCK_RDLOCK = 0x50E
+ SYS_PTHREAD_RWLOCK_TRYRDLOCK = 0x50F
+ SYS_ATOI = 0x051
+ SYS___FP_CLASS = 0x51D
+ SYS___FP_CLR_FLAG = 0x51A
+ SYS___FP_FINITE = 0x51E
+ SYS___FP_ISNAN = 0x51F
+ SYS___FP_RAISE_XCP = 0x51C
+ SYS___FP_READ_FLAG = 0x51B
+ SYS_RAND = 0x052
+ SYS_SIGTIMEDWAIT = 0x52D
+ SYS_SIGWAITINFO = 0x52E
+ SYS___CHKBFP = 0x52F
+ SYS___FPC_RS = 0x52C
+ SYS___FPC_RW = 0x52A
+ SYS___FPC_SM = 0x52B
+ SYS_STRTOD = 0x053
+ SYS_STRTOL = 0x054
+ SYS_STRTOUL = 0x055
+ SYS_MALLOC = 0x056
+ SYS_SRAND = 0x057
+ SYS_CALLOC = 0x058
+ SYS_FREE = 0x059
+ SYS___OSENV = 0x59F
+ SYS___W_PIOCTL = 0x59E
+ SYS_LONGJMP = 0x060
+ SYS___FLOORF_B = 0x60A
+ SYS___FLOORL_B = 0x60B
+ SYS___FREXPF_B = 0x60C
+ SYS___FREXPL_B = 0x60D
+ SYS___LDEXPF_B = 0x60E
+ SYS___LDEXPL_B = 0x60F
+ SYS_SIGNAL = 0x061
+ SYS___ATAN2F_B = 0x61A
+ SYS___ATAN2L_B = 0x61B
+ SYS___COSHF_B = 0x61C
+ SYS___COSHL_B = 0x61D
+ SYS___EXPF_B = 0x61E
+ SYS___EXPL_B = 0x61F
+ SYS_TMPNAM = 0x062
+ SYS___ABSF_B = 0x62A
+ SYS___ABSL_B = 0x62C
+ SYS___ABS_B = 0x62B
+ SYS___FMODF_B = 0x62D
+ SYS___FMODL_B = 0x62E
+ SYS___MODFF_B = 0x62F
+ SYS_ATANL = 0x63A
+ SYS_CEILF = 0x63B
+ SYS_CEILL = 0x63C
+ SYS_COSF = 0x63D
+ SYS_COSHF = 0x63F
+ SYS_COSL = 0x63E
+ SYS_REMOVE = 0x063
+ SYS_POWL = 0x64A
+ SYS_RENAME = 0x064
+ SYS_SINF = 0x64B
+ SYS_SINHF = 0x64F
+ SYS_SINL = 0x64C
+ SYS_SQRTF = 0x64D
+ SYS_SQRTL = 0x64E
+ SYS_BTOWC = 0x65F
+ SYS_FREXPL = 0x65A
+ SYS_LDEXPF = 0x65B
+ SYS_LDEXPL = 0x65C
+ SYS_MODFF = 0x65D
+ SYS_MODFL = 0x65E
+ SYS_TMPFILE = 0x065
+ SYS_FREOPEN = 0x066
+ SYS___CHARMAP_INIT_A = 0x66E
+ SYS___GETHOSTBYADDR_R_A = 0x66C
+ SYS___GETHOSTBYNAME_A = 0x66A
+ SYS___GETHOSTBYNAME_R_A = 0x66D
+ SYS___MBLEN_A = 0x66F
+ SYS___RES_INIT_A = 0x66B
+ SYS_FCLOSE = 0x067
+ SYS___GETGRGID_R_A = 0x67D
+ SYS___WCSTOMBS_A = 0x67A
+ SYS___WCSTOMBS_STD_A = 0x67B
+ SYS___WCSWIDTH_A = 0x67C
+ SYS___WCSWIDTH_ASIA = 0x67F
+ SYS___WCSWIDTH_STD_A = 0x67E
+ SYS_FFLUSH = 0x068
+ SYS___GETLOGIN_R_A = 0x68E
+ SYS___GETPWNAM_R_A = 0x68C
+ SYS___GETPWUID_R_A = 0x68D
+ SYS___TTYNAME_R_A = 0x68F
+ SYS___WCWIDTH_ASIA = 0x68B
+ SYS___WCWIDTH_STD_A = 0x68A
+ SYS_FOPEN = 0x069
+ SYS___REGEXEC_A = 0x69A
+ SYS___REGEXEC_STD_A = 0x69B
+ SYS___REGFREE_A = 0x69C
+ SYS___REGFREE_STD_A = 0x69D
+ SYS___STRCOLL_A = 0x69E
+ SYS___STRCOLL_C_A = 0x69F
+ SYS_SCANF = 0x070
+ SYS___A64L_A = 0x70C
+ SYS___ECVT_A = 0x70D
+ SYS___FCVT_A = 0x70E
+ SYS___GCVT_A = 0x70F
+ SYS___STRTOUL_A = 0x70A
+ SYS_____AE_CORRESTBL_QUERY_A = 0x70B
+ SYS_SPRINTF = 0x071
+ SYS___ACCESS_A = 0x71F
+ SYS___CATOPEN_A = 0x71E
+ SYS___GETOPT_A = 0x71D
+ SYS___REALPATH_A = 0x71A
+ SYS___SETENV_A = 0x71B
+ SYS___SYSTEM_A = 0x71C
+ SYS_FGETC = 0x072
+ SYS___GAI_STRERROR_A = 0x72F
+ SYS___RMDIR_A = 0x72A
+ SYS___STATVFS_A = 0x72B
+ SYS___SYMLINK_A = 0x72C
+ SYS___TRUNCATE_A = 0x72D
+ SYS___UNLINK_A = 0x72E
+ SYS_VFPRINTF = 0x073
+ SYS___ISSPACE_A = 0x73A
+ SYS___ISUPPER_A = 0x73B
+ SYS___ISWALNUM_A = 0x73F
+ SYS___ISXDIGIT_A = 0x73C
+ SYS___TOLOWER_A = 0x73D
+ SYS___TOUPPER_A = 0x73E
+ SYS_VPRINTF = 0x074
+ SYS___CONFSTR_A = 0x74B
+ SYS___FDOPEN_A = 0x74E
+ SYS___FLDATA_A = 0x74F
+ SYS___FTOK_A = 0x74C
+ SYS___ISWXDIGIT_A = 0x74A
+ SYS___MKTEMP_A = 0x74D
+ SYS_VSPRINTF = 0x075
+ SYS___GETGRGID_A = 0x75A
+ SYS___GETGRNAM_A = 0x75B
+ SYS___GETGROUPSBYNAME_A = 0x75C
+ SYS___GETHOSTENT_A = 0x75D
+ SYS___GETHOSTNAME_A = 0x75E
+ SYS___GETLOGIN_A = 0x75F
+ SYS_GETC = 0x076
+ SYS___CREATEWORKUNIT_A = 0x76A
+ SYS___CTERMID_A = 0x76B
+ SYS___FMTMSG_A = 0x76C
+ SYS___INITGROUPS_A = 0x76D
+ SYS___MSGRCV_A = 0x76F
+ SYS_____LOGIN_A = 0x76E
+ SYS_FGETS = 0x077
+ SYS___STRCASECMP_A = 0x77B
+ SYS___STRNCASECMP_A = 0x77C
+ SYS___TTYNAME_A = 0x77D
+ SYS___UNAME_A = 0x77E
+ SYS___UTIMES_A = 0x77F
+ SYS_____SERVER_PWU_A = 0x77A
+ SYS_FPUTC = 0x078
+ SYS___CREAT_O_A = 0x78E
+ SYS___ENVNA = 0x78F
+ SYS___FREAD_A = 0x78A
+ SYS___FWRITE_A = 0x78B
+ SYS___ISASCII = 0x78D
+ SYS___OPEN_O_A = 0x78C
+ SYS_FPUTS = 0x079
+ SYS___ASCTIME_A = 0x79C
+ SYS___CTIME_A = 0x79D
+ SYS___GETDATE_A = 0x79E
+ SYS___GETSERVBYPORT_A = 0x79A
+ SYS___GETSERVENT_A = 0x79B
+ SYS___TZSET_A = 0x79F
+ SYS_ACL_FROM_TEXT = 0x80C
+ SYS_ACL_SET_FD = 0x80A
+ SYS_ACL_SET_FILE = 0x80B
+ SYS_ACL_SORT = 0x80E
+ SYS_ACL_TO_TEXT = 0x80D
+ SYS_UNGETC = 0x080
+ SYS___SHUTDOWN_REGISTRATION = 0x80F
+ SYS_FREAD = 0x081
+ SYS_FREEADDRINFO = 0x81A
+ SYS_GAI_STRERROR = 0x81B
+ SYS_REXEC_AF = 0x81C
+ SYS___DYNALLOC_A = 0x81F
+ SYS___POE = 0x81D
+ SYS_WCSTOMBS = 0x082
+ SYS___INET_ADDR_A = 0x82F
+ SYS___NLIST_A = 0x82A
+ SYS_____TCGETCP_A = 0x82B
+ SYS_____TCSETCP_A = 0x82C
+ SYS_____W_PIOCTL_A = 0x82E
+ SYS_MBTOWC = 0x083
+ SYS___CABEND = 0x83D
+ SYS___LE_CIB_GET = 0x83E
+ SYS___RECVMSG_A = 0x83B
+ SYS___SENDMSG_A = 0x83A
+ SYS___SET_LAA_FOR_JIT = 0x83F
+ SYS_____LCHATTR_A = 0x83C
+ SYS_WCTOMB = 0x084
+ SYS___CBRTL_B = 0x84A
+ SYS___COPYSIGNF_B = 0x84B
+ SYS___COPYSIGNL_B = 0x84C
+ SYS___COTANF_B = 0x84D
+ SYS___COTANL_B = 0x84F
+ SYS___COTAN_B = 0x84E
+ SYS_MBSTOWCS = 0x085
+ SYS___LOG1PL_B = 0x85A
+ SYS___LOG2F_B = 0x85B
+ SYS___LOG2L_B = 0x85D
+ SYS___LOG2_B = 0x85C
+ SYS___REMAINDERF_B = 0x85E
+ SYS___REMAINDERL_B = 0x85F
+ SYS_ACOSHF = 0x86E
+ SYS_ACOSHL = 0x86F
+ SYS_WCSCPY = 0x086
+ SYS___ERFCF_B = 0x86D
+ SYS___ERFF_B = 0x86C
+ SYS___LROUNDF_B = 0x86A
+ SYS___LROUND_B = 0x86B
+ SYS_COTANL = 0x87A
+ SYS_EXP2F = 0x87B
+ SYS_EXP2L = 0x87C
+ SYS_EXPM1F = 0x87D
+ SYS_EXPM1L = 0x87E
+ SYS_FDIMF = 0x87F
+ SYS_WCSCAT = 0x087
+ SYS___COTANL = 0x87A
+ SYS_REMAINDERF = 0x88A
+ SYS_REMAINDERL = 0x88B
+ SYS_REMAINDF = 0x88A
+ SYS_REMAINDL = 0x88B
+ SYS_REMQUO = 0x88D
+ SYS_REMQUOF = 0x88C
+ SYS_REMQUOL = 0x88E
+ SYS_TGAMMAF = 0x88F
+ SYS_WCSCHR = 0x088
+ SYS_ERFCF = 0x89B
+ SYS_ERFCL = 0x89C
+ SYS_ERFL = 0x89A
+ SYS_EXP2 = 0x89E
+ SYS_WCSCMP = 0x089
+ SYS___EXP2_B = 0x89D
+ SYS___FAR_JUMP = 0x89F
+ SYS_ABS = 0x090
+ SYS___ERFCL_H = 0x90A
+ SYS___EXPF_H = 0x90C
+ SYS___EXPL_H = 0x90D
+ SYS___EXPM1_H = 0x90E
+ SYS___EXP_H = 0x90B
+ SYS___FDIM_H = 0x90F
+ SYS_DIV = 0x091
+ SYS___LOG2F_H = 0x91F
+ SYS___LOG2_H = 0x91E
+ SYS___LOGB_H = 0x91D
+ SYS___LOGF_H = 0x91B
+ SYS___LOGL_H = 0x91C
+ SYS___LOG_H = 0x91A
+ SYS_LABS = 0x092
+ SYS___POWL_H = 0x92A
+ SYS___REMAINDER_H = 0x92B
+ SYS___RINT_H = 0x92C
+ SYS___SCALB_H = 0x92D
+ SYS___SINF_H = 0x92F
+ SYS___SIN_H = 0x92E
+ SYS_STRNCPY = 0x093
+ SYS___TANHF_H = 0x93B
+ SYS___TANHL_H = 0x93C
+ SYS___TANH_H = 0x93A
+ SYS___TGAMMAF_H = 0x93E
+ SYS___TGAMMA_H = 0x93D
+ SYS___TRUNC_H = 0x93F
+ SYS_MEMCPY = 0x094
+ SYS_VFWSCANF = 0x94A
+ SYS_VSWSCANF = 0x94E
+ SYS_VWSCANF = 0x94C
+ SYS_INET6_RTH_ADD = 0x95D
+ SYS_INET6_RTH_INIT = 0x95C
+ SYS_INET6_RTH_REVERSE = 0x95E
+ SYS_INET6_RTH_SEGMENTS = 0x95F
+ SYS_INET6_RTH_SPACE = 0x95B
+ SYS_MEMMOVE = 0x095
+ SYS_WCSTOLD = 0x95A
+ SYS_STRCPY = 0x096
+ SYS_STRCMP = 0x097
+ SYS_CABS = 0x98E
+ SYS_STRCAT = 0x098
+ SYS___CABS_B = 0x98F
+ SYS___POW_II = 0x98A
+ SYS___POW_II_B = 0x98B
+ SYS___POW_II_H = 0x98C
+ SYS_CACOSF = 0x99A
+ SYS_CACOSL = 0x99D
+ SYS_STRNCAT = 0x099
+ SYS___CACOSF_B = 0x99B
+ SYS___CACOSF_H = 0x99C
+ SYS___CACOSL_B = 0x99E
+ SYS___CACOSL_H = 0x99F
+ SYS_ISWALPHA = 0x100
+ SYS_ISWBLANK = 0x101
+ SYS___ISWBLK = 0x101
+ SYS_ISWCNTRL = 0x102
+ SYS_ISWDIGIT = 0x103
+ SYS_ISWGRAPH = 0x104
+ SYS_ISWLOWER = 0x105
+ SYS_ISWPRINT = 0x106
+ SYS_ISWPUNCT = 0x107
+ SYS_ISWSPACE = 0x108
+ SYS_ISWUPPER = 0x109
+ SYS_WCTOB = 0x110
+ SYS_MBRLEN = 0x111
+ SYS_MBRTOWC = 0x112
+ SYS_MBSRTOWC = 0x113
+ SYS_MBSRTOWCS = 0x113
+ SYS_WCRTOMB = 0x114
+ SYS_WCSRTOMB = 0x115
+ SYS_WCSRTOMBS = 0x115
+ SYS___CSID = 0x116
+ SYS___WCSID = 0x117
+ SYS_STRPTIME = 0x118
+ SYS___STRPTM = 0x118
+ SYS_STRFMON = 0x119
+ SYS_WCSCOLL = 0x130
+ SYS_WCSXFRM = 0x131
+ SYS_WCSWIDTH = 0x132
+ SYS_WCWIDTH = 0x133
+ SYS_WCSFTIME = 0x134
+ SYS_SWPRINTF = 0x135
+ SYS_VSWPRINT = 0x136
+ SYS_VSWPRINTF = 0x136
+ SYS_SWSCANF = 0x137
+ SYS_REGCOMP = 0x138
+ SYS_REGEXEC = 0x139
+ SYS_GETWC = 0x140
+ SYS_GETWCHAR = 0x141
+ SYS_PUTWC = 0x142
+ SYS_PUTWCHAR = 0x143
+ SYS_UNGETWC = 0x144
+ SYS_ICONV_OPEN = 0x145
+ SYS_ICONV = 0x146
+ SYS_ICONV_CLOSE = 0x147
+ SYS_COLLRANGE = 0x150
+ SYS_CCLASS = 0x151
+ SYS_COLLORDER = 0x152
+ SYS___DEMANGLE = 0x154
+ SYS_FDOPEN = 0x155
+ SYS___ERRNO = 0x156
+ SYS___ERRNO2 = 0x157
+ SYS___TERROR = 0x158
+ SYS_MAXCOLL = 0x169
+ SYS_DLLLOAD = 0x170
+ SYS__EXIT = 0x174
+ SYS_ACCESS = 0x175
+ SYS_ALARM = 0x176
+ SYS_CFGETISPEED = 0x177
+ SYS_CFGETOSPEED = 0x178
+ SYS_CFSETISPEED = 0x179
+ SYS_CREAT = 0x180
+ SYS_CTERMID = 0x181
+ SYS_DUP = 0x182
+ SYS_DUP2 = 0x183
+ SYS_EXECL = 0x184
+ SYS_EXECLE = 0x185
+ SYS_EXECLP = 0x186
+ SYS_EXECV = 0x187
+ SYS_EXECVE = 0x188
+ SYS_EXECVP = 0x189
+ SYS_FSTAT = 0x190
+ SYS_FSYNC = 0x191
+ SYS_FTRUNCATE = 0x192
+ SYS_GETCWD = 0x193
+ SYS_GETEGID = 0x194
+ SYS_GETEUID = 0x195
+ SYS_GETGID = 0x196
+ SYS_GETGRGID = 0x197
+ SYS_GETGRNAM = 0x198
+ SYS_GETGROUPS = 0x199
+ SYS_PTHREAD_MUTEXATTR_DESTROY = 0x200
+ SYS_PTHREAD_MUTEXATTR_SETKIND_NP = 0x201
+ SYS_PTHREAD_MUTEXATTR_GETKIND_NP = 0x202
+ SYS_PTHREAD_MUTEX_INIT = 0x203
+ SYS_PTHREAD_MUTEX_DESTROY = 0x204
+ SYS_PTHREAD_MUTEX_LOCK = 0x205
+ SYS_PTHREAD_MUTEX_TRYLOCK = 0x206
+ SYS_PTHREAD_MUTEX_UNLOCK = 0x207
+ SYS_PTHREAD_ONCE = 0x209
+ SYS_TW_OPEN = 0x210
+ SYS_TW_FCNTL = 0x211
+ SYS_PTHREAD_JOIN_D4_NP = 0x212
+ SYS_PTHREAD_CONDATTR_SETKIND_NP = 0x213
+ SYS_PTHREAD_CONDATTR_GETKIND_NP = 0x214
+ SYS_EXTLINK_NP = 0x215
+ SYS___PASSWD = 0x216
+ SYS_SETGROUPS = 0x217
+ SYS_INITGROUPS = 0x218
+ SYS_WCSRCHR = 0x240
+ SYS_SVC99 = 0x241
+ SYS___SVC99 = 0x241
+ SYS_WCSWCS = 0x242
+ SYS_LOCALECO = 0x243
+ SYS_LOCALECONV = 0x243
+ SYS___LIBREL = 0x244
+ SYS_RELEASE = 0x245
+ SYS___RLSE = 0x245
+ SYS_FLOCATE = 0x246
+ SYS___FLOCT = 0x246
+ SYS_FDELREC = 0x247
+ SYS___FDLREC = 0x247
+ SYS_FETCH = 0x248
+ SYS___FETCH = 0x248
+ SYS_QSORT = 0x249
+ SYS___CLEANUPCATCH = 0x260
+ SYS___CATCHMATCH = 0x261
+ SYS___CLEAN2UPCATCH = 0x262
+ SYS_GETPRIORITY = 0x270
+ SYS_NICE = 0x271
+ SYS_SETPRIORITY = 0x272
+ SYS_GETITIMER = 0x273
+ SYS_SETITIMER = 0x274
+ SYS_MSGCTL = 0x275
+ SYS_MSGGET = 0x276
+ SYS_MSGRCV = 0x277
+ SYS_MSGSND = 0x278
+ SYS_MSGXRCV = 0x279
+ SYS___MSGXR = 0x279
+ SYS_SHMGET = 0x280
+ SYS___GETIPC = 0x281
+ SYS_SETGRENT = 0x282
+ SYS_GETGRENT = 0x283
+ SYS_ENDGRENT = 0x284
+ SYS_SETPWENT = 0x285
+ SYS_GETPWENT = 0x286
+ SYS_ENDPWENT = 0x287
+ SYS_BSD_SIGNAL = 0x288
+ SYS_KILLPG = 0x289
+ SYS_SIGSET = 0x290
+ SYS_SIGSTACK = 0x291
+ SYS_GETRLIMIT = 0x292
+ SYS_SETRLIMIT = 0x293
+ SYS_GETRUSAGE = 0x294
+ SYS_MMAP = 0x295
+ SYS_MPROTECT = 0x296
+ SYS_MSYNC = 0x297
+ SYS_MUNMAP = 0x298
+ SYS_CONFSTR = 0x299
+ SYS___NDMTRM = 0x300
+ SYS_FTOK = 0x301
+ SYS_BASENAME = 0x302
+ SYS_DIRNAME = 0x303
+ SYS_GETDTABLESIZE = 0x304
+ SYS_MKSTEMP = 0x305
+ SYS_MKTEMP = 0x306
+ SYS_NFTW = 0x307
+ SYS_GETWD = 0x308
+ SYS_LOCKF = 0x309
+ SYS_WORDEXP = 0x310
+ SYS_WORDFREE = 0x311
+ SYS_GETPGID = 0x312
+ SYS_GETSID = 0x313
+ SYS___UTMPXNAME = 0x314
+ SYS_CUSERID = 0x315
+ SYS_GETPASS = 0x316
+ SYS_FNMATCH = 0x317
+ SYS_FTW = 0x318
+ SYS_GETW = 0x319
+ SYS_ACOSH = 0x320
+ SYS_ASINH = 0x321
+ SYS_ATANH = 0x322
+ SYS_CBRT = 0x323
+ SYS_EXPM1 = 0x324
+ SYS_ILOGB = 0x325
+ SYS_LOGB = 0x326
+ SYS_LOG1P = 0x327
+ SYS_NEXTAFTER = 0x328
+ SYS_RINT = 0x329
+ SYS_SPAWN = 0x330
+ SYS_SPAWNP = 0x331
+ SYS_GETLOGIN_UU = 0x332
+ SYS_ECVT = 0x333
+ SYS_FCVT = 0x334
+ SYS_GCVT = 0x335
+ SYS_ACCEPT = 0x336
+ SYS_BIND = 0x337
+ SYS_CONNECT = 0x338
+ SYS_ENDHOSTENT = 0x339
+ SYS_GETHOSTENT = 0x340
+ SYS_GETHOSTID = 0x341
+ SYS_GETHOSTNAME = 0x342
+ SYS_GETNETBYADDR = 0x343
+ SYS_GETNETBYNAME = 0x344
+ SYS_GETNETENT = 0x345
+ SYS_GETPEERNAME = 0x346
+ SYS_GETPROTOBYNAME = 0x347
+ SYS_GETPROTOBYNUMBER = 0x348
+ SYS_GETPROTOENT = 0x349
+ SYS_INET_LNAOF = 0x350
+ SYS_INET_MAKEADDR = 0x351
+ SYS_INET_NETOF = 0x352
+ SYS_INET_NETWORK = 0x353
+ SYS_INET_NTOA = 0x354
+ SYS_IOCTL = 0x355
+ SYS_LISTEN = 0x356
+ SYS_READV = 0x357
+ SYS_RECV = 0x358
+ SYS_RECVFROM = 0x359
+ SYS_SETHOSTENT = 0x360
+ SYS_SETNETENT = 0x361
+ SYS_SETPEER = 0x362
+ SYS_SETPROTOENT = 0x363
+ SYS_SETSERVENT = 0x364
+ SYS_SETSOCKOPT = 0x365
+ SYS_SHUTDOWN = 0x366
+ SYS_SOCKET = 0x367
+ SYS_SOCKETPAIR = 0x368
+ SYS_WRITEV = 0x369
+ SYS_ENDNETENT = 0x370
+ SYS_CLOSELOG = 0x371
+ SYS_OPENLOG = 0x372
+ SYS_SETLOGMASK = 0x373
+ SYS_SYSLOG = 0x374
+ SYS_PTSNAME = 0x375
+ SYS_SETREUID = 0x376
+ SYS_SETREGID = 0x377
+ SYS_REALPATH = 0x378
+ SYS___SIGNGAM = 0x379
+ SYS_POLL = 0x380
+ SYS_REXEC = 0x381
+ SYS___ISASCII2 = 0x382
+ SYS___TOASCII2 = 0x383
+ SYS_CHPRIORITY = 0x384
+ SYS_PTHREAD_ATTR_SETSYNCTYPE_NP = 0x385
+ SYS_PTHREAD_ATTR_GETSYNCTYPE_NP = 0x386
+ SYS_PTHREAD_SET_LIMIT_NP = 0x387
+ SYS___STNETENT = 0x388
+ SYS___STPROTOENT = 0x389
+ SYS___SELECT1 = 0x390
+ SYS_PTHREAD_SECURITY_NP = 0x391
+ SYS___CHECK_RESOURCE_AUTH_NP = 0x392
+ SYS___CONVERT_ID_NP = 0x393
+ SYS___OPENVMREL = 0x394
+ SYS_WMEMCHR = 0x395
+ SYS_WMEMCMP = 0x396
+ SYS_WMEMCPY = 0x397
+ SYS_WMEMMOVE = 0x398
+ SYS_WMEMSET = 0x399
+ SYS___FPUTWC = 0x400
+ SYS___PUTWC = 0x401
+ SYS___PWCHAR = 0x402
+ SYS___WCSFTM = 0x403
+ SYS___WCSTOK = 0x404
+ SYS___WCWDTH = 0x405
+ SYS_T_ACCEPT = 0x409
+ SYS_T_GETINFO = 0x410
+ SYS_T_GETPROTADDR = 0x411
+ SYS_T_GETSTATE = 0x412
+ SYS_T_LISTEN = 0x413
+ SYS_T_LOOK = 0x414
+ SYS_T_OPEN = 0x415
+ SYS_T_OPTMGMT = 0x416
+ SYS_T_RCV = 0x417
+ SYS_T_RCVCONNECT = 0x418
+ SYS_T_RCVDIS = 0x419
+ SYS_T_SNDUDATA = 0x420
+ SYS_T_STRERROR = 0x421
+ SYS_T_SYNC = 0x422
+ SYS_T_UNBIND = 0x423
+ SYS___T_ERRNO = 0x424
+ SYS___RECVMSG2 = 0x425
+ SYS___SENDMSG2 = 0x426
+ SYS_FATTACH = 0x427
+ SYS_FDETACH = 0x428
+ SYS_GETMSG = 0x429
+ SYS_GETCONTEXT = 0x430
+ SYS_SETCONTEXT = 0x431
+ SYS_MAKECONTEXT = 0x432
+ SYS_SWAPCONTEXT = 0x433
+ SYS_PTHREAD_GETSPECIFIC_D8_NP = 0x434
+ SYS_GETCLIENTID = 0x470
+ SYS___GETCLIENTID = 0x471
+ SYS_GETSTABLESIZE = 0x472
+ SYS_GETIBMOPT = 0x473
+ SYS_GETIBMSOCKOPT = 0x474
+ SYS_GIVESOCKET = 0x475
+ SYS_IBMSFLUSH = 0x476
+ SYS_MAXDESC = 0x477
+ SYS_SETIBMOPT = 0x478
+ SYS_SETIBMSOCKOPT = 0x479
+ SYS___SERVER_PWU = 0x480
+ SYS_PTHREAD_TAG_NP = 0x481
+ SYS___CONSOLE = 0x482
+ SYS___WSINIT = 0x483
+ SYS___IPTCPN = 0x489
+ SYS___SERVER_CLASSIFY = 0x490
+ SYS___HEAPRPT = 0x496
+ SYS___ISBFP = 0x500
+ SYS___FP_CAST = 0x501
+ SYS___CERTIFICATE = 0x502
+ SYS_SEND_FILE = 0x503
+ SYS_AIO_CANCEL = 0x504
+ SYS_AIO_ERROR = 0x505
+ SYS_AIO_READ = 0x506
+ SYS_AIO_RETURN = 0x507
+ SYS_AIO_SUSPEND = 0x508
+ SYS_AIO_WRITE = 0x509
+ SYS_PTHREAD_RWLOCK_TRYWRLOCK = 0x510
+ SYS_PTHREAD_RWLOCK_UNLOCK = 0x511
+ SYS_PTHREAD_RWLOCK_WRLOCK = 0x512
+ SYS_PTHREAD_RWLOCKATTR_GETPSHARED = 0x513
+ SYS_PTHREAD_RWLOCKATTR_SETPSHARED = 0x514
+ SYS_PTHREAD_RWLOCKATTR_INIT = 0x515
+ SYS_PTHREAD_RWLOCKATTR_DESTROY = 0x516
+ SYS___CTTBL = 0x517
+ SYS_PTHREAD_MUTEXATTR_SETTYPE = 0x518
+ SYS_PTHREAD_MUTEXATTR_GETTYPE = 0x519
+ SYS___FP_UNORDERED = 0x520
+ SYS___FP_READ_RND = 0x521
+ SYS___FP_READ_RND_B = 0x522
+ SYS___FP_SWAP_RND = 0x523
+ SYS___FP_SWAP_RND_B = 0x524
+ SYS___FP_LEVEL = 0x525
+ SYS___FP_BTOH = 0x526
+ SYS___FP_HTOB = 0x527
+ SYS___FPC_RD = 0x528
+ SYS___FPC_WR = 0x529
+ SYS_PTHREAD_SETCANCELTYPE = 0x600
+ SYS_PTHREAD_TESTCANCEL = 0x601
+ SYS___ATANF_B = 0x602
+ SYS___ATANL_B = 0x603
+ SYS___CEILF_B = 0x604
+ SYS___CEILL_B = 0x605
+ SYS___COSF_B = 0x606
+ SYS___COSL_B = 0x607
+ SYS___FABSF_B = 0x608
+ SYS___FABSL_B = 0x609
+ SYS___SINF_B = 0x610
+ SYS___SINL_B = 0x611
+ SYS___TANF_B = 0x612
+ SYS___TANL_B = 0x613
+ SYS___TANHF_B = 0x614
+ SYS___TANHL_B = 0x615
+ SYS___ACOSF_B = 0x616
+ SYS___ACOSL_B = 0x617
+ SYS___ASINF_B = 0x618
+ SYS___ASINL_B = 0x619
+ SYS___LOGF_B = 0x620
+ SYS___LOGL_B = 0x621
+ SYS___LOG10F_B = 0x622
+ SYS___LOG10L_B = 0x623
+ SYS___POWF_B = 0x624
+ SYS___POWL_B = 0x625
+ SYS___SINHF_B = 0x626
+ SYS___SINHL_B = 0x627
+ SYS___SQRTF_B = 0x628
+ SYS___SQRTL_B = 0x629
+ SYS___MODFL_B = 0x630
+ SYS_ABSF = 0x631
+ SYS_ABSL = 0x632
+ SYS_ACOSF = 0x633
+ SYS_ACOSL = 0x634
+ SYS_ASINF = 0x635
+ SYS_ASINL = 0x636
+ SYS_ATAN2F = 0x637
+ SYS_ATAN2L = 0x638
+ SYS_ATANF = 0x639
+ SYS_COSHL = 0x640
+ SYS_EXPF = 0x641
+ SYS_EXPL = 0x642
+ SYS_TANHF = 0x643
+ SYS_TANHL = 0x644
+ SYS_LOG10F = 0x645
+ SYS_LOG10L = 0x646
+ SYS_LOGF = 0x647
+ SYS_LOGL = 0x648
+ SYS_POWF = 0x649
+ SYS_SINHL = 0x650
+ SYS_TANF = 0x651
+ SYS_TANL = 0x652
+ SYS_FABSF = 0x653
+ SYS_FABSL = 0x654
+ SYS_FLOORF = 0x655
+ SYS_FLOORL = 0x656
+ SYS_FMODF = 0x657
+ SYS_FMODL = 0x658
+ SYS_FREXPF = 0x659
+ SYS___CHATTR = 0x660
+ SYS___FCHATTR = 0x661
+ SYS___TOCCSID = 0x662
+ SYS___CSNAMETYPE = 0x663
+ SYS___TOCSNAME = 0x664
+ SYS___CCSIDTYPE = 0x665
+ SYS___AE_CORRESTBL_QUERY = 0x666
+ SYS___AE_AUTOCONVERT_STATE = 0x667
+ SYS_DN_FIND = 0x668
+ SYS___GETHOSTBYADDR_A = 0x669
+ SYS___MBLEN_SB_A = 0x670
+ SYS___MBLEN_STD_A = 0x671
+ SYS___MBLEN_UTF = 0x672
+ SYS___MBSTOWCS_A = 0x673
+ SYS___MBSTOWCS_STD_A = 0x674
+ SYS___MBTOWC_A = 0x675
+ SYS___MBTOWC_ISO1 = 0x676
+ SYS___MBTOWC_SBCS = 0x677
+ SYS___MBTOWC_MBCS = 0x678
+ SYS___MBTOWC_UTF = 0x679
+ SYS___CSID_A = 0x680
+ SYS___CSID_STD_A = 0x681
+ SYS___WCSID_A = 0x682
+ SYS___WCSID_STD_A = 0x683
+ SYS___WCTOMB_A = 0x684
+ SYS___WCTOMB_ISO1 = 0x685
+ SYS___WCTOMB_STD_A = 0x686
+ SYS___WCTOMB_UTF = 0x687
+ SYS___WCWIDTH_A = 0x688
+ SYS___GETGRNAM_R_A = 0x689
+ SYS___READDIR_R_A = 0x690
+ SYS___E2A_S = 0x691
+ SYS___FNMATCH_A = 0x692
+ SYS___FNMATCH_C_A = 0x693
+ SYS___EXECL_A = 0x694
+ SYS___FNMATCH_STD_A = 0x695
+ SYS___REGCOMP_A = 0x696
+ SYS___REGCOMP_STD_A = 0x697
+ SYS___REGERROR_A = 0x698
+ SYS___REGERROR_STD_A = 0x699
+ SYS___SWPRINTF_A = 0x700
+ SYS___FSCANF_A = 0x701
+ SYS___SCANF_A = 0x702
+ SYS___SSCANF_A = 0x703
+ SYS___SWSCANF_A = 0x704
+ SYS___ATOF_A = 0x705
+ SYS___ATOI_A = 0x706
+ SYS___ATOL_A = 0x707
+ SYS___STRTOD_A = 0x708
+ SYS___STRTOL_A = 0x709
+ SYS___L64A_A = 0x710
+ SYS___STRERROR_A = 0x711
+ SYS___PERROR_A = 0x712
+ SYS___FETCH_A = 0x713
+ SYS___GETENV_A = 0x714
+ SYS___MKSTEMP_A = 0x717
+ SYS___PTSNAME_A = 0x718
+ SYS___PUTENV_A = 0x719
+ SYS___CHDIR_A = 0x720
+ SYS___CHOWN_A = 0x721
+ SYS___CHROOT_A = 0x722
+ SYS___GETCWD_A = 0x723
+ SYS___GETWD_A = 0x724
+ SYS___LCHOWN_A = 0x725
+ SYS___LINK_A = 0x726
+ SYS___PATHCONF_A = 0x727
+ SYS___IF_NAMEINDEX_A = 0x728
+ SYS___READLINK_A = 0x729
+ SYS___EXTLINK_NP_A = 0x730
+ SYS___ISALNUM_A = 0x731
+ SYS___ISALPHA_A = 0x732
+ SYS___A2E_S = 0x733
+ SYS___ISCNTRL_A = 0x734
+ SYS___ISDIGIT_A = 0x735
+ SYS___ISGRAPH_A = 0x736
+ SYS___ISLOWER_A = 0x737
+ SYS___ISPRINT_A = 0x738
+ SYS___ISPUNCT_A = 0x739
+ SYS___ISWALPHA_A = 0x740
+ SYS___A2E_L = 0x741
+ SYS___ISWCNTRL_A = 0x742
+ SYS___ISWDIGIT_A = 0x743
+ SYS___ISWGRAPH_A = 0x744
+ SYS___ISWLOWER_A = 0x745
+ SYS___ISWPRINT_A = 0x746
+ SYS___ISWPUNCT_A = 0x747
+ SYS___ISWSPACE_A = 0x748
+ SYS___ISWUPPER_A = 0x749
+ SYS___REMOVE_A = 0x750
+ SYS___RENAME_A = 0x751
+ SYS___TMPNAM_A = 0x752
+ SYS___FOPEN_A = 0x753
+ SYS___FREOPEN_A = 0x754
+ SYS___CUSERID_A = 0x755
+ SYS___POPEN_A = 0x756
+ SYS___TEMPNAM_A = 0x757
+ SYS___FTW_A = 0x758
+ SYS___GETGRENT_A = 0x759
+ SYS___INET_NTOP_A = 0x760
+ SYS___GETPASS_A = 0x761
+ SYS___GETPWENT_A = 0x762
+ SYS___GETPWNAM_A = 0x763
+ SYS___GETPWUID_A = 0x764
+ SYS_____CHECK_RESOURCE_AUTH_NP_A = 0x765
+ SYS___CHECKSCHENV_A = 0x766
+ SYS___CONNECTSERVER_A = 0x767
+ SYS___CONNECTWORKMGR_A = 0x768
+ SYS_____CONSOLE_A = 0x769
+ SYS___MSGSND_A = 0x770
+ SYS___MSGXRCV_A = 0x771
+ SYS___NFTW_A = 0x772
+ SYS_____PASSWD_A = 0x773
+ SYS___PTHREAD_SECURITY_NP_A = 0x774
+ SYS___QUERYMETRICS_A = 0x775
+ SYS___QUERYSCHENV = 0x776
+ SYS___READV_A = 0x777
+ SYS_____SERVER_CLASSIFY_A = 0x778
+ SYS_____SERVER_INIT_A = 0x779
+ SYS___W_GETPSENT_A = 0x780
+ SYS___WRITEV_A = 0x781
+ SYS___W_STATFS_A = 0x782
+ SYS___W_STATVFS_A = 0x783
+ SYS___FPUTC_A = 0x784
+ SYS___PUTCHAR_A = 0x785
+ SYS___PUTS_A = 0x786
+ SYS___FGETS_A = 0x787
+ SYS___GETS_A = 0x788
+ SYS___FPUTS_A = 0x789
+ SYS___PUTC_A = 0x790
+ SYS___AE_THREAD_SETMODE = 0x791
+ SYS___AE_THREAD_SWAPMODE = 0x792
+ SYS___GETNETBYADDR_A = 0x793
+ SYS___GETNETBYNAME_A = 0x794
+ SYS___GETNETENT_A = 0x795
+ SYS___GETPROTOBYNAME_A = 0x796
+ SYS___GETPROTOBYNUMBER_A = 0x797
+ SYS___GETPROTOENT_A = 0x798
+ SYS___GETSERVBYNAME_A = 0x799
+ SYS_ACL_FIRST_ENTRY = 0x800
+ SYS_ACL_GET_ENTRY = 0x801
+ SYS_ACL_VALID = 0x802
+ SYS_ACL_CREATE_ENTRY = 0x803
+ SYS_ACL_DELETE_ENTRY = 0x804
+ SYS_ACL_UPDATE_ENTRY = 0x805
+ SYS_ACL_DELETE_FD = 0x806
+ SYS_ACL_DELETE_FILE = 0x807
+ SYS_ACL_GET_FD = 0x808
+ SYS_ACL_GET_FILE = 0x809
+ SYS___ERFL_B = 0x810
+ SYS___ERFCL_B = 0x811
+ SYS___LGAMMAL_B = 0x812
+ SYS___SETHOOKEVENTS = 0x813
+ SYS_IF_NAMETOINDEX = 0x814
+ SYS_IF_INDEXTONAME = 0x815
+ SYS_IF_NAMEINDEX = 0x816
+ SYS_IF_FREENAMEINDEX = 0x817
+ SYS_GETADDRINFO = 0x818
+ SYS_GETNAMEINFO = 0x819
+ SYS___DYNFREE_A = 0x820
+ SYS___RES_QUERY_A = 0x821
+ SYS___RES_SEARCH_A = 0x822
+ SYS___RES_QUERYDOMAIN_A = 0x823
+ SYS___RES_MKQUERY_A = 0x824
+ SYS___RES_SEND_A = 0x825
+ SYS___DN_EXPAND_A = 0x826
+ SYS___DN_SKIPNAME_A = 0x827
+ SYS___DN_COMP_A = 0x828
+ SYS___DN_FIND_A = 0x829
+ SYS___INET_NTOA_A = 0x830
+ SYS___INET_NETWORK_A = 0x831
+ SYS___ACCEPT_A = 0x832
+ SYS___ACCEPT_AND_RECV_A = 0x833
+ SYS___BIND_A = 0x834
+ SYS___CONNECT_A = 0x835
+ SYS___GETPEERNAME_A = 0x836
+ SYS___GETSOCKNAME_A = 0x837
+ SYS___RECVFROM_A = 0x838
+ SYS___SENDTO_A = 0x839
+ SYS___LCHATTR = 0x840
+ SYS___WRITEDOWN = 0x841
+ SYS_PTHREAD_MUTEX_INIT2 = 0x842
+ SYS___ACOSHF_B = 0x843
+ SYS___ACOSHL_B = 0x844
+ SYS___ASINHF_B = 0x845
+ SYS___ASINHL_B = 0x846
+ SYS___ATANHF_B = 0x847
+ SYS___ATANHL_B = 0x848
+ SYS___CBRTF_B = 0x849
+ SYS___EXP2F_B = 0x850
+ SYS___EXP2L_B = 0x851
+ SYS___EXPM1F_B = 0x852
+ SYS___EXPM1L_B = 0x853
+ SYS___FDIMF_B = 0x854
+ SYS___FDIM_B = 0x855
+ SYS___FDIML_B = 0x856
+ SYS___HYPOTF_B = 0x857
+ SYS___HYPOTL_B = 0x858
+ SYS___LOG1PF_B = 0x859
+ SYS___REMQUOF_B = 0x860
+ SYS___REMQUO_B = 0x861
+ SYS___REMQUOL_B = 0x862
+ SYS___TGAMMAF_B = 0x863
+ SYS___TGAMMA_B = 0x864
+ SYS___TGAMMAL_B = 0x865
+ SYS___TRUNCF_B = 0x866
+ SYS___TRUNC_B = 0x867
+ SYS___TRUNCL_B = 0x868
+ SYS___LGAMMAF_B = 0x869
+ SYS_ASINHF = 0x870
+ SYS_ASINHL = 0x871
+ SYS_ATANHF = 0x872
+ SYS_ATANHL = 0x873
+ SYS_CBRTF = 0x874
+ SYS_CBRTL = 0x875
+ SYS_COPYSIGNF = 0x876
+ SYS_CPYSIGNF = 0x876
+ SYS_COPYSIGNL = 0x877
+ SYS_CPYSIGNL = 0x877
+ SYS_COTANF = 0x878
+ SYS___COTANF = 0x878
+ SYS_COTAN = 0x879
+ SYS___COTAN = 0x879
+ SYS_FDIM = 0x881
+ SYS_FDIML = 0x882
+ SYS_HYPOTF = 0x883
+ SYS_HYPOTL = 0x884
+ SYS_LOG1PF = 0x885
+ SYS_LOG1PL = 0x886
+ SYS_LOG2F = 0x887
+ SYS_LOG2 = 0x888
+ SYS_LOG2L = 0x889
+ SYS_TGAMMA = 0x890
+ SYS_TGAMMAL = 0x891
+ SYS_TRUNCF = 0x892
+ SYS_TRUNC = 0x893
+ SYS_TRUNCL = 0x894
+ SYS_LGAMMAF = 0x895
+ SYS_LGAMMAL = 0x896
+ SYS_LROUNDF = 0x897
+ SYS_LROUND = 0x898
+ SYS_ERFF = 0x899
+ SYS___COSHF_H = 0x900
+ SYS___COSHL_H = 0x901
+ SYS___COTAN_H = 0x902
+ SYS___COTANF_H = 0x903
+ SYS___COTANL_H = 0x904
+ SYS___ERF_H = 0x905
+ SYS___ERFF_H = 0x906
+ SYS___ERFL_H = 0x907
+ SYS___ERFC_H = 0x908
+ SYS___ERFCF_H = 0x909
+ SYS___FDIMF_H = 0x910
+ SYS___FDIML_H = 0x911
+ SYS___FMOD_H = 0x912
+ SYS___FMODF_H = 0x913
+ SYS___FMODL_H = 0x914
+ SYS___GAMMA_H = 0x915
+ SYS___HYPOT_H = 0x916
+ SYS___ILOGB_H = 0x917
+ SYS___LGAMMA_H = 0x918
+ SYS___LGAMMAF_H = 0x919
+ SYS___LOG2L_H = 0x920
+ SYS___LOG1P_H = 0x921
+ SYS___LOG10_H = 0x922
+ SYS___LOG10F_H = 0x923
+ SYS___LOG10L_H = 0x924
+ SYS___LROUND_H = 0x925
+ SYS___LROUNDF_H = 0x926
+ SYS___NEXTAFTER_H = 0x927
+ SYS___POW_H = 0x928
+ SYS___POWF_H = 0x929
+ SYS___SINL_H = 0x930
+ SYS___SINH_H = 0x931
+ SYS___SINHF_H = 0x932
+ SYS___SINHL_H = 0x933
+ SYS___SQRT_H = 0x934
+ SYS___SQRTF_H = 0x935
+ SYS___SQRTL_H = 0x936
+ SYS___TAN_H = 0x937
+ SYS___TANF_H = 0x938
+ SYS___TANL_H = 0x939
+ SYS___TRUNCF_H = 0x940
+ SYS___TRUNCL_H = 0x941
+ SYS___COSH_H = 0x942
+ SYS___LE_DEBUG_SET_RESUME_MCH = 0x943
+ SYS_VFSCANF = 0x944
+ SYS_VSCANF = 0x946
+ SYS_VSSCANF = 0x948
+ SYS_IMAXABS = 0x950
+ SYS_IMAXDIV = 0x951
+ SYS_STRTOIMAX = 0x952
+ SYS_STRTOUMAX = 0x953
+ SYS_WCSTOIMAX = 0x954
+ SYS_WCSTOUMAX = 0x955
+ SYS_ATOLL = 0x956
+ SYS_STRTOF = 0x957
+ SYS_STRTOLD = 0x958
+ SYS_WCSTOF = 0x959
+ SYS_INET6_RTH_GETADDR = 0x960
+ SYS_INET6_OPT_INIT = 0x961
+ SYS_INET6_OPT_APPEND = 0x962
+ SYS_INET6_OPT_FINISH = 0x963
+ SYS_INET6_OPT_SET_VAL = 0x964
+ SYS_INET6_OPT_NEXT = 0x965
+ SYS_INET6_OPT_FIND = 0x966
+ SYS_INET6_OPT_GET_VAL = 0x967
+ SYS___POW_I = 0x987
+ SYS___POW_I_B = 0x988
+ SYS___POW_I_H = 0x989
+ SYS___CABS_H = 0x990
+ SYS_CABSF = 0x991
+ SYS___CABSF_B = 0x992
+ SYS___CABSF_H = 0x993
+ SYS_CABSL = 0x994
+ SYS___CABSL_B = 0x995
+ SYS___CABSL_H = 0x996
+ SYS_CACOS = 0x997
+ SYS___CACOS_B = 0x998
+ SYS___CACOS_H = 0x999
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
index 2c1f815..7a8161c 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go
@@ -1,6 +1,7 @@
// cgo -godefs types_aix.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc && aix
// +build ppc,aix
package unix
@@ -219,6 +220,7 @@ const (
SizeofSockaddrUnix = 0x401
SizeofSockaddrDatalink = 0x80
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofIPv6MTUInfo = 0x20
diff --git a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
index b4a069e..07ed733 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_aix.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64 && aix
// +build ppc64,aix
package unix
@@ -223,6 +224,7 @@ const (
SizeofSockaddrUnix = 0x401
SizeofSockaddrDatalink = 0x80
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofIPv6MTUInfo = 0x20
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go
index 9f47b87..883b64a 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go
@@ -1,6 +1,7 @@
// cgo -godefs types_darwin.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && darwin
// +build 386,darwin
package unix
@@ -92,9 +93,9 @@ type Statfs_t struct {
Type uint32
Flags uint32
Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
+ Fstypename [16]byte
+ Mntonname [1024]byte
+ Mntfromname [1024]byte
Reserved [8]uint32
}
@@ -145,6 +146,10 @@ type Dirent struct {
_ [3]byte
}
+const (
+ PathMax = 0x400
+)
+
type RawSockaddrInet4 struct {
Len uint8
Family uint8
@@ -190,6 +195,15 @@ type RawSockaddrAny struct {
Pad [92]int8
}
+type RawSockaddrCtl struct {
+ Sc_len uint8
+ Sc_family uint8
+ Ss_sysaddr uint16
+ Sc_id uint32
+ Sc_unit uint32
+ Sc_reserved [5]uint32
+}
+
type _Socklen uint32
type Linger struct {
@@ -207,6 +221,12 @@ type IPMreq struct {
Interface [4]byte /* in_addr */
}
+type IPMreqn struct {
+ Multiaddr [4]byte /* in_addr */
+ Address [4]byte /* in_addr */
+ Ifindex int32
+}
+
type IPv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
@@ -254,8 +274,11 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
+ SizeofSockaddrCtl = 0x20
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
+ SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x1c
SizeofCmsghdr = 0xc
@@ -301,7 +324,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -344,7 +366,6 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Metric int32
}
@@ -365,7 +386,6 @@ type IfmaMsghdr2 struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Refcount int32
}
@@ -374,7 +394,6 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -396,7 +415,8 @@ type RtMetrics struct {
Rtt uint32
Rttvar uint32
Pksent uint32
- Filler [4]uint32
+ State uint32
+ Filler [3]uint32
}
const (
@@ -497,3 +517,8 @@ type Clockinfo struct {
Stathz int32
Profhz int32
}
+
+type CtlInfo struct {
+ Id uint32
+ Name [96]byte
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
index 966798a..2673e6c 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_darwin.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && darwin
// +build amd64,darwin
package unix
@@ -70,7 +71,6 @@ type Stat_t struct {
Uid uint32
Gid uint32
Rdev int32
- _ [4]byte
Atim Timespec
Mtim Timespec
Ctim Timespec
@@ -97,10 +97,11 @@ type Statfs_t struct {
Type uint32
Flags uint32
Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
+ Fstypename [16]byte
+ Mntonname [1024]byte
+ Mntfromname [1024]byte
+ Flags_ext uint32
+ Reserved [7]uint32
}
type Flock_t struct {
@@ -133,8 +134,7 @@ type Fbootstraptransfer_t struct {
type Log2phys_t struct {
Flags uint32
- _ [8]byte
- _ [8]byte
+ _ [16]byte
}
type Fsid struct {
@@ -151,6 +151,10 @@ type Dirent struct {
_ [3]byte
}
+const (
+ PathMax = 0x400
+)
+
type RawSockaddrInet4 struct {
Len uint8
Family uint8
@@ -196,8 +200,24 @@ type RawSockaddrAny struct {
Pad [92]int8
}
+type RawSockaddrCtl struct {
+ Sc_len uint8
+ Sc_family uint8
+ Ss_sysaddr uint16
+ Sc_id uint32
+ Sc_unit uint32
+ Sc_reserved [5]uint32
+}
+
type _Socklen uint32
+type Xucred struct {
+ Version uint32
+ Uid uint32
+ Ngroups int16
+ Groups [16]uint32
+}
+
type Linger struct {
Onoff int32
Linger int32
@@ -213,6 +233,12 @@ type IPMreq struct {
Interface [4]byte /* in_addr */
}
+type IPMreqn struct {
+ Multiaddr [4]byte /* in_addr */
+ Address [4]byte /* in_addr */
+ Ifindex int32
+}
+
type IPv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
@@ -221,10 +247,8 @@ type IPv6Mreq struct {
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Control *byte
Controllen uint32
Flags int32
@@ -262,8 +286,12 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
+ SizeofSockaddrCtl = 0x20
+ SizeofXucred = 0x4c
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
+ SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
SizeofCmsghdr = 0xc
@@ -309,7 +337,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -352,7 +379,6 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Metric int32
}
@@ -373,7 +399,6 @@ type IfmaMsghdr2 struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Refcount int32
}
@@ -382,7 +407,6 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -404,7 +428,8 @@ type RtMetrics struct {
Rtt uint32
Rttvar uint32
Pksent uint32
- Filler [4]uint32
+ State uint32
+ Filler [3]uint32
}
const (
@@ -427,7 +452,6 @@ type BpfStat struct {
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
@@ -452,7 +476,6 @@ type Termios struct {
Cflag uint64
Lflag uint64
Cc [20]uint8
- _ [4]byte
Ispeed uint64
Ospeed uint64
}
@@ -507,3 +530,8 @@ type Clockinfo struct {
Stathz int32
Profhz int32
}
+
+type CtlInfo struct {
+ Id uint32
+ Name [96]byte
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go
index 4fe4c9c..eef5133 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go
@@ -1,7 +1,7 @@
-// NOTE: cgo can't generate struct Stat_t and struct Statfs_t yet
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs types_darwin.go
+// cgo -godefs types_darwin.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && darwin
// +build arm,darwin
package unix
@@ -31,7 +31,7 @@ type Timeval struct {
Usec int32
}
-type Timeval32 [0]byte
+type Timeval32 struct{}
type Rusage struct {
Utime Timeval
@@ -93,9 +93,9 @@ type Statfs_t struct {
Type uint32
Flags uint32
Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
+ Fstypename [16]byte
+ Mntonname [1024]byte
+ Mntfromname [1024]byte
Reserved [8]uint32
}
@@ -146,6 +146,10 @@ type Dirent struct {
_ [3]byte
}
+const (
+ PathMax = 0x400
+)
+
type RawSockaddrInet4 struct {
Len uint8
Family uint8
@@ -191,6 +195,15 @@ type RawSockaddrAny struct {
Pad [92]int8
}
+type RawSockaddrCtl struct {
+ Sc_len uint8
+ Sc_family uint8
+ Ss_sysaddr uint16
+ Sc_id uint32
+ Sc_unit uint32
+ Sc_reserved [5]uint32
+}
+
type _Socklen uint32
type Linger struct {
@@ -208,6 +221,12 @@ type IPMreq struct {
Interface [4]byte /* in_addr */
}
+type IPMreqn struct {
+ Multiaddr [4]byte /* in_addr */
+ Address [4]byte /* in_addr */
+ Ifindex int32
+}
+
type IPv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
@@ -255,8 +274,11 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
+ SizeofSockaddrCtl = 0x20
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
+ SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x1c
SizeofCmsghdr = 0xc
@@ -302,7 +324,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -345,7 +366,6 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Metric int32
}
@@ -366,7 +386,6 @@ type IfmaMsghdr2 struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Refcount int32
}
@@ -375,7 +394,6 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -397,7 +415,8 @@ type RtMetrics struct {
Rtt uint32
Rttvar uint32
Pksent uint32
- Filler [4]uint32
+ State uint32
+ Filler [3]uint32
}
const (
@@ -498,3 +517,8 @@ type Clockinfo struct {
Stathz int32
Profhz int32
}
+
+type CtlInfo struct {
+ Id uint32
+ Name [96]byte
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
index 21999e4..1465cbc 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_darwin.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && darwin
// +build arm64,darwin
package unix
@@ -70,7 +71,6 @@ type Stat_t struct {
Uid uint32
Gid uint32
Rdev int32
- _ [4]byte
Atim Timespec
Mtim Timespec
Ctim Timespec
@@ -97,10 +97,11 @@ type Statfs_t struct {
Type uint32
Flags uint32
Fssubtype uint32
- Fstypename [16]int8
- Mntonname [1024]int8
- Mntfromname [1024]int8
- Reserved [8]uint32
+ Fstypename [16]byte
+ Mntonname [1024]byte
+ Mntfromname [1024]byte
+ Flags_ext uint32
+ Reserved [7]uint32
}
type Flock_t struct {
@@ -133,8 +134,7 @@ type Fbootstraptransfer_t struct {
type Log2phys_t struct {
Flags uint32
- _ [8]byte
- _ [8]byte
+ _ [16]byte
}
type Fsid struct {
@@ -151,6 +151,10 @@ type Dirent struct {
_ [3]byte
}
+const (
+ PathMax = 0x400
+)
+
type RawSockaddrInet4 struct {
Len uint8
Family uint8
@@ -196,8 +200,24 @@ type RawSockaddrAny struct {
Pad [92]int8
}
+type RawSockaddrCtl struct {
+ Sc_len uint8
+ Sc_family uint8
+ Ss_sysaddr uint16
+ Sc_id uint32
+ Sc_unit uint32
+ Sc_reserved [5]uint32
+}
+
type _Socklen uint32
+type Xucred struct {
+ Version uint32
+ Uid uint32
+ Ngroups int16
+ Groups [16]uint32
+}
+
type Linger struct {
Onoff int32
Linger int32
@@ -213,6 +233,12 @@ type IPMreq struct {
Interface [4]byte /* in_addr */
}
+type IPMreqn struct {
+ Multiaddr [4]byte /* in_addr */
+ Address [4]byte /* in_addr */
+ Ifindex int32
+}
+
type IPv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
@@ -221,10 +247,8 @@ type IPv6Mreq struct {
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Control *byte
Controllen uint32
Flags int32
@@ -262,8 +286,12 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
+ SizeofSockaddrCtl = 0x20
+ SizeofXucred = 0x4c
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
+ SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
SizeofCmsghdr = 0xc
@@ -309,7 +337,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -352,7 +379,6 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Metric int32
}
@@ -373,7 +399,6 @@ type IfmaMsghdr2 struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Refcount int32
}
@@ -382,7 +407,6 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -404,7 +428,8 @@ type RtMetrics struct {
Rtt uint32
Rttvar uint32
Pksent uint32
- Filler [4]uint32
+ State uint32
+ Filler [3]uint32
}
const (
@@ -427,7 +452,6 @@ type BpfStat struct {
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
@@ -452,7 +476,6 @@ type Termios struct {
Cflag uint64
Lflag uint64
Cc [20]uint8
- _ [4]byte
Ispeed uint64
Ospeed uint64
}
@@ -507,3 +530,8 @@ type Clockinfo struct {
Stathz int32
Profhz int32
}
+
+type CtlInfo struct {
+ Id uint32
+ Name [96]byte
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
index 71ea1d6..1d049d7 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_dragonfly.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && dragonfly
// +build amd64,dragonfly
package unix
@@ -70,11 +71,11 @@ type Stat_t struct {
Ctim Timespec
Size int64
Blocks int64
- Blksize uint32
+ _ uint32
Flags uint32
Gen uint32
Lspare int32
- Qspare1 int64
+ Blksize int64
Qspare2 int64
}
@@ -91,17 +92,15 @@ type Statfs_t struct {
Owner uint32
Type int32
Flags int32
- _ [4]byte
Syncwrites int64
Asyncwrites int64
- Fstypename [16]int8
- Mntonname [80]int8
+ Fstypename [16]byte
+ Mntonname [80]byte
Syncreads int64
Asyncreads int64
Spares1 int16
- Mntfromname [80]int8
+ Mntfromname [80]byte
Spares2 int16
- _ [4]byte
Spare [2]int64
}
@@ -202,10 +201,8 @@ type IPv6Mreq struct {
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Control *byte
Controllen uint32
Flags int32
@@ -238,6 +235,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
@@ -269,7 +267,7 @@ type FdSet struct {
const (
SizeofIfMsghdr = 0xb0
SizeofIfData = 0xa0
- SizeofIfaMsghdr = 0x14
+ SizeofIfaMsghdr = 0x18
SizeofIfmaMsghdr = 0x10
SizeofIfAnnounceMsghdr = 0x18
SizeofRtMsghdr = 0x98
@@ -280,10 +278,9 @@ type IfMsghdr struct {
Msglen uint16
Version uint8
Type uint8
- Addrs int32
- Flags int32
Index uint16
- _ [2]byte
+ Flags int32
+ Addrs int32
Data IfData
}
@@ -294,7 +291,6 @@ type IfData struct {
Hdrlen uint8
Recvquota uint8
Xmitquota uint8
- _ [2]byte
Mtu uint64
Metric uint64
Link_state uint64
@@ -316,24 +312,23 @@ type IfData struct {
}
type IfaMsghdr struct {
- Msglen uint16
- Version uint8
- Type uint8
- Addrs int32
- Flags int32
- Index uint16
- _ [2]byte
- Metric int32
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Index uint16
+ Flags int32
+ Addrs int32
+ Addrflags int32
+ Metric int32
}
type IfmaMsghdr struct {
Msglen uint16
Version uint8
Type uint8
- Addrs int32
- Flags int32
Index uint16
- _ [2]byte
+ Flags int32
+ Addrs int32
}
type IfAnnounceMsghdr struct {
@@ -350,7 +345,6 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -374,7 +368,6 @@ type RtMetrics struct {
Hopcount uint64
Mssopt uint16
Pad uint16
- _ [4]byte
Msl uint64
Iwmaxsegs uint64
Iwcapsegs uint64
@@ -400,7 +393,6 @@ type BpfStat struct {
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
index 0ec1596..c51bc88 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
@@ -1,6 +1,7 @@
// cgo -godefs types_freebsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && freebsd
// +build 386,freebsd
package unix
@@ -128,9 +129,9 @@ type Statfs_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [1024]int8
- Mntonname [1024]int8
+ Fstypename [16]byte
+ Mntfromname [1024]byte
+ Mntonname [1024]byte
}
type statfs_freebsd11_t struct {
@@ -153,9 +154,9 @@ type statfs_freebsd11_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
+ Fstypename [16]byte
+ Mntfromname [88]byte
+ Mntonname [88]byte
}
type Flock_t struct {
@@ -250,6 +251,14 @@ type RawSockaddrAny struct {
type _Socklen uint32
+type Xucred struct {
+ Version uint32
+ Uid uint32
+ Ngroups int16
+ Groups [16]uint32
+ _ *byte
+}
+
type Linger struct {
Onoff int32
Linger int32
@@ -312,7 +321,9 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
+ SizeofXucred = 0x50
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
@@ -375,15 +386,15 @@ type PtraceLwpInfoStruct struct {
}
type __Siginfo struct {
- Signo int32
- Errno int32
- Code int32
- Pid int32
- Uid uint32
- Status int32
- Addr *byte
- Value [4]byte
- X_reason [32]byte
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr *byte
+ Value [4]byte
+ _ [32]byte
}
type Sigset_t struct {
@@ -458,7 +469,7 @@ type ifMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
Data ifData
}
@@ -469,7 +480,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -536,7 +546,7 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
Metric int32
}
@@ -547,7 +557,7 @@ type IfmaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
}
type IfAnnounceMsghdr struct {
@@ -564,7 +574,7 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
+ _ uint16
Flags int32
Addrs int32
Pid int32
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
index 8340f57..395b691 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_freebsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && freebsd
// +build amd64,freebsd
package unix
@@ -123,9 +124,9 @@ type Statfs_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [1024]int8
- Mntonname [1024]int8
+ Fstypename [16]byte
+ Mntfromname [1024]byte
+ Mntonname [1024]byte
}
type statfs_freebsd11_t struct {
@@ -148,9 +149,9 @@ type statfs_freebsd11_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
+ Fstypename [16]byte
+ Mntfromname [88]byte
+ Mntonname [88]byte
}
type Flock_t struct {
@@ -246,6 +247,14 @@ type RawSockaddrAny struct {
type _Socklen uint32
+type Xucred struct {
+ Version uint32
+ Uid uint32
+ Ngroups int16
+ Groups [16]uint32
+ _ *byte
+}
+
type Linger struct {
Onoff int32
Linger int32
@@ -275,10 +284,8 @@ type IPv6Mreq struct {
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Control *byte
Controllen uint32
Flags int32
@@ -310,7 +317,9 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
+ SizeofXucred = 0x58
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
@@ -463,7 +472,7 @@ type ifMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
Data ifData
}
@@ -474,7 +483,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -541,7 +549,7 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
Metric int32
}
@@ -552,7 +560,7 @@ type IfmaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
}
type IfAnnounceMsghdr struct {
@@ -569,7 +577,7 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
+ _ uint16
Flags int32
Addrs int32
Pid int32
@@ -623,7 +631,6 @@ type BpfZbuf struct {
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
index 6f79227..d3f9d25 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
@@ -1,6 +1,7 @@
// cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && freebsd
// +build arm,freebsd
package unix
@@ -125,9 +126,9 @@ type Statfs_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [1024]int8
- Mntonname [1024]int8
+ Fstypename [16]byte
+ Mntfromname [1024]byte
+ Mntonname [1024]byte
}
type statfs_freebsd11_t struct {
@@ -150,9 +151,9 @@ type statfs_freebsd11_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
+ Fstypename [16]byte
+ Mntfromname [88]byte
+ Mntonname [88]byte
}
type Flock_t struct {
@@ -248,6 +249,14 @@ type RawSockaddrAny struct {
type _Socklen uint32
+type Xucred struct {
+ Version uint32
+ Uid uint32
+ Ngroups int16
+ Groups [16]uint32
+ _ *byte
+}
+
type Linger struct {
Onoff int32
Linger int32
@@ -310,7 +319,9 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
+ SizeofXucred = 0x50
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
index e751e00..434d6e8 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
@@ -1,6 +1,7 @@
-// cgo -godefs types_freebsd.go | go run mkpost.go
+// cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && freebsd
// +build arm64,freebsd
package unix
@@ -123,9 +124,9 @@ type Statfs_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [1024]int8
- Mntonname [1024]int8
+ Fstypename [16]byte
+ Mntfromname [1024]byte
+ Mntonname [1024]byte
}
type statfs_freebsd11_t struct {
@@ -148,9 +149,9 @@ type statfs_freebsd11_t struct {
Owner uint32
Fsid Fsid
Charspare [80]int8
- Fstypename [16]int8
- Mntfromname [88]int8
- Mntonname [88]int8
+ Fstypename [16]byte
+ Mntfromname [88]byte
+ Mntonname [88]byte
}
type Flock_t struct {
@@ -246,6 +247,14 @@ type RawSockaddrAny struct {
type _Socklen uint32
+type Xucred struct {
+ Version uint32
+ Uid uint32
+ Ngroups int16
+ Groups [16]uint32
+ _ *byte
+}
+
type Linger struct {
Onoff int32
Linger int32
@@ -275,10 +284,8 @@ type IPv6Mreq struct {
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Control *byte
Controllen uint32
Flags int32
@@ -310,7 +317,9 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
+ SizeofXucred = 0x58
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
@@ -326,11 +335,9 @@ const (
PTRACE_CONT = 0x7
PTRACE_DETACH = 0xb
PTRACE_GETFPREGS = 0x23
- PTRACE_GETFSBASE = 0x47
PTRACE_GETLWPLIST = 0xf
PTRACE_GETNUMLWPS = 0xe
PTRACE_GETREGS = 0x21
- PTRACE_GETXSTATE = 0x45
PTRACE_IO = 0xc
PTRACE_KILL = 0x8
PTRACE_LWPEVENTS = 0x18
@@ -373,15 +380,15 @@ type PtraceLwpInfoStruct struct {
}
type __Siginfo struct {
- Signo int32
- Errno int32
- Code int32
- Pid int32
- Uid uint32
- Status int32
- Addr *byte
- Value [8]byte
- X_reason [40]byte
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr *byte
+ Value [8]byte
+ _ [40]byte
}
type Sigset_t struct {
@@ -394,12 +401,14 @@ type Reg struct {
Sp uint64
Elr uint64
Spsr uint32
+ _ [4]byte
}
type FpReg struct {
- Fp_q [512]uint8
- Fp_sr uint32
- Fp_cr uint32
+ Q [32][16]uint8
+ Sr uint32
+ Cr uint32
+ _ [8]byte
}
type PtraceIoDesc struct {
@@ -441,7 +450,7 @@ type ifMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
Data ifData
}
@@ -452,7 +461,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -519,7 +527,7 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
Metric int32
}
@@ -530,7 +538,7 @@ type IfmaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
+ _ uint16
}
type IfAnnounceMsghdr struct {
@@ -547,7 +555,7 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
+ _ uint16
Flags int32
Addrs int32
Pid int32
@@ -601,7 +609,6 @@ type BpfZbuf struct {
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
new file mode 100644
index 0000000..1137a5a
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
@@ -0,0 +1,40 @@
+// cgo -godefs types_illumos.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build amd64 && illumos
+// +build amd64,illumos
+
+package unix
+
+const (
+ TUNNEWPPA = 0x540001
+ TUNSETPPA = 0x540002
+
+ I_STR = 0x5308
+ I_POP = 0x5303
+ I_PUSH = 0x5302
+ I_PLINK = 0x5316
+ I_PUNLINK = 0x5317
+
+ IF_UNITSEL = -0x7ffb8cca
+)
+
+type strbuf struct {
+ Maxlen int32
+ Len int32
+ Buf *int8
+}
+
+type strioctl struct {
+ Cmd int32
+ Timout int32
+ Len int32
+ Dp *int8
+}
+
+type lifreq struct {
+ Name [32]int8
+ Lifru1 [4]byte
+ Type uint32
+ Lifru [336]byte
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go
new file mode 100644
index 0000000..3bfc6f7
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -0,0 +1,3737 @@
+// Code generated by mkmerge.go; DO NOT EDIT.
+
+//go:build linux
+// +build linux
+
+package unix
+
+const (
+ SizeofShort = 0x2
+ SizeofInt = 0x4
+ SizeofLongLong = 0x8
+ PathMax = 0x1000
+)
+
+type (
+ _C_short int16
+ _C_int int32
+
+ _C_long_long int64
+)
+
+type ItimerSpec struct {
+ Interval Timespec
+ Value Timespec
+}
+
+const (
+ TIME_OK = 0x0
+ TIME_INS = 0x1
+ TIME_DEL = 0x2
+ TIME_OOP = 0x3
+ TIME_WAIT = 0x4
+ TIME_ERROR = 0x5
+ TIME_BAD = 0x5
+)
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+type _Gid_t uint32
+
+type StatxTimestamp struct {
+ Sec int64
+ Nsec uint32
+ _ int32
+}
+
+type Statx_t struct {
+ Mask uint32
+ Blksize uint32
+ Attributes uint64
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Mode uint16
+ _ [1]uint16
+ Ino uint64
+ Size uint64
+ Blocks uint64
+ Attributes_mask uint64
+ Atime StatxTimestamp
+ Btime StatxTimestamp
+ Ctime StatxTimestamp
+ Mtime StatxTimestamp
+ Rdev_major uint32
+ Rdev_minor uint32
+ Dev_major uint32
+ Dev_minor uint32
+ Mnt_id uint64
+ _ uint64
+ _ [12]uint64
+}
+
+type Fsid struct {
+ Val [2]int32
+}
+
+type FileCloneRange struct {
+ Src_fd int64
+ Src_offset uint64
+ Src_length uint64
+ Dest_offset uint64
+}
+
+type RawFileDedupeRange struct {
+ Src_offset uint64
+ Src_length uint64
+ Dest_count uint16
+ Reserved1 uint16
+ Reserved2 uint32
+}
+
+type RawFileDedupeRangeInfo struct {
+ Dest_fd int64
+ Dest_offset uint64
+ Bytes_deduped uint64
+ Status int32
+ Reserved uint32
+}
+
+const (
+ SizeofRawFileDedupeRange = 0x18
+ SizeofRawFileDedupeRangeInfo = 0x20
+ FILE_DEDUPE_RANGE_SAME = 0x0
+ FILE_DEDUPE_RANGE_DIFFERS = 0x1
+)
+
+type FscryptPolicy struct {
+ Version uint8
+ Contents_encryption_mode uint8
+ Filenames_encryption_mode uint8
+ Flags uint8
+ Master_key_descriptor [8]uint8
+}
+
+type FscryptKey struct {
+ Mode uint32
+ Raw [64]uint8
+ Size uint32
+}
+
+type FscryptPolicyV1 struct {
+ Version uint8
+ Contents_encryption_mode uint8
+ Filenames_encryption_mode uint8
+ Flags uint8
+ Master_key_descriptor [8]uint8
+}
+
+type FscryptPolicyV2 struct {
+ Version uint8
+ Contents_encryption_mode uint8
+ Filenames_encryption_mode uint8
+ Flags uint8
+ _ [4]uint8
+ Master_key_identifier [16]uint8
+}
+
+type FscryptGetPolicyExArg struct {
+ Size uint64
+ Policy [24]byte
+}
+
+type FscryptKeySpecifier struct {
+ Type uint32
+ _ uint32
+ U [32]byte
+}
+
+type FscryptAddKeyArg struct {
+ Key_spec FscryptKeySpecifier
+ Raw_size uint32
+ Key_id uint32
+ _ [8]uint32
+}
+
+type FscryptRemoveKeyArg struct {
+ Key_spec FscryptKeySpecifier
+ Removal_status_flags uint32
+ _ [5]uint32
+}
+
+type FscryptGetKeyStatusArg struct {
+ Key_spec FscryptKeySpecifier
+ _ [6]uint32
+ Status uint32
+ Status_flags uint32
+ User_count uint32
+ _ [13]uint32
+}
+
+type DmIoctl struct {
+ Version [3]uint32
+ Data_size uint32
+ Data_start uint32
+ Target_count uint32
+ Open_count int32
+ Flags uint32
+ Event_nr uint32
+ _ uint32
+ Dev uint64
+ Name [128]byte
+ Uuid [129]byte
+ Data [7]byte
+}
+
+type DmTargetSpec struct {
+ Sector_start uint64
+ Length uint64
+ Status int32
+ Next uint32
+ Target_type [16]byte
+}
+
+type DmTargetDeps struct {
+ Count uint32
+ _ uint32
+}
+
+type DmTargetVersions struct {
+ Next uint32
+ Version [3]uint32
+}
+
+type DmTargetMsg struct {
+ Sector uint64
+}
+
+const (
+ SizeofDmIoctl = 0x138
+ SizeofDmTargetSpec = 0x28
+)
+
+type KeyctlDHParams struct {
+ Private int32
+ Prime int32
+ Base int32
+}
+
+const (
+ FADV_NORMAL = 0x0
+ FADV_RANDOM = 0x1
+ FADV_SEQUENTIAL = 0x2
+ FADV_WILLNEED = 0x3
+)
+
+type RawSockaddrInet4 struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]uint8
+}
+
+type RawSockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Family uint16
+ Path [108]int8
+}
+
+type RawSockaddrLinklayer struct {
+ Family uint16
+ Protocol uint16
+ Ifindex int32
+ Hatype uint16
+ Pkttype uint8
+ Halen uint8
+ Addr [8]uint8
+}
+
+type RawSockaddrNetlink struct {
+ Family uint16
+ Pad uint16
+ Pid uint32
+ Groups uint32
+}
+
+type RawSockaddrHCI struct {
+ Family uint16
+ Dev uint16
+ Channel uint16
+}
+
+type RawSockaddrL2 struct {
+ Family uint16
+ Psm uint16
+ Bdaddr [6]uint8
+ Cid uint16
+ Bdaddr_type uint8
+ _ [1]byte
+}
+
+type RawSockaddrRFCOMM struct {
+ Family uint16
+ Bdaddr [6]uint8
+ Channel uint8
+ _ [1]byte
+}
+
+type RawSockaddrCAN struct {
+ Family uint16
+ Ifindex int32
+ Addr [16]byte
+}
+
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
+type RawSockaddrVM struct {
+ Family uint16
+ Reserved1 uint16
+ Port uint32
+ Cid uint32
+ Flags uint8
+ Zero [3]uint8
+}
+
+type RawSockaddrXDP struct {
+ Family uint16
+ Flags uint16
+ Ifindex uint32
+ Queue_id uint32
+ Shared_umem_fd uint32
+}
+
+type RawSockaddrPPPoX [0x1e]byte
+
+type RawSockaddrTIPC struct {
+ Family uint16
+ Addrtype uint8
+ Scope int8
+ Addr [12]byte
+}
+
+type RawSockaddrL2TPIP struct {
+ Family uint16
+ Unused uint16
+ Addr [4]byte /* in_addr */
+ Conn_id uint32
+ _ [4]uint8
+}
+
+type RawSockaddrL2TPIP6 struct {
+ Family uint16
+ Unused uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+ Conn_id uint32
+}
+
+type RawSockaddrIUCV struct {
+ Family uint16
+ Port uint16
+ Addr uint32
+ Nodeid [8]int8
+ User_id [8]int8
+ Name [8]int8
+}
+
+type _Socklen uint32
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPMreqn struct {
+ Multiaddr [4]byte /* in_addr */
+ Address [4]byte /* in_addr */
+ Ifindex int32
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type PacketMreq struct {
+ Ifindex int32
+ Type uint16
+ Alen uint16
+ Address [8]uint8
+}
+
+type Inet4Pktinfo struct {
+ Ifindex int32
+ Spec_dst [4]byte /* in_addr */
+ Addr [4]byte /* in_addr */
+}
+
+type Inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Data [8]uint32
+}
+
+type Ucred struct {
+ Pid int32
+ Uid uint32
+ Gid uint32
+}
+
+type TCPInfo struct {
+ State uint8
+ Ca_state uint8
+ Retransmits uint8
+ Probes uint8
+ Backoff uint8
+ Options uint8
+ Rto uint32
+ Ato uint32
+ Snd_mss uint32
+ Rcv_mss uint32
+ Unacked uint32
+ Sacked uint32
+ Lost uint32
+ Retrans uint32
+ Fackets uint32
+ Last_data_sent uint32
+ Last_ack_sent uint32
+ Last_data_recv uint32
+ Last_ack_recv uint32
+ Pmtu uint32
+ Rcv_ssthresh uint32
+ Rtt uint32
+ Rttvar uint32
+ Snd_ssthresh uint32
+ Snd_cwnd uint32
+ Advmss uint32
+ Reordering uint32
+ Rcv_rtt uint32
+ Rcv_space uint32
+ Total_retrans uint32
+}
+
+type CanFilter struct {
+ Id uint32
+ Mask uint32
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x70
+ SizeofSockaddrUnix = 0x6e
+ SizeofSockaddrLinklayer = 0x14
+ SizeofSockaddrNetlink = 0xc
+ SizeofSockaddrHCI = 0x6
+ SizeofSockaddrL2 = 0xe
+ SizeofSockaddrRFCOMM = 0xa
+ SizeofSockaddrCAN = 0x18
+ SizeofSockaddrALG = 0x58
+ SizeofSockaddrVM = 0x10
+ SizeofSockaddrXDP = 0x10
+ SizeofSockaddrPPPoX = 0x1e
+ SizeofSockaddrTIPC = 0x10
+ SizeofSockaddrL2TPIP = 0x10
+ SizeofSockaddrL2TPIP6 = 0x20
+ SizeofSockaddrIUCV = 0x20
+ SizeofLinger = 0x8
+ SizeofIPMreq = 0x8
+ SizeofIPMreqn = 0xc
+ SizeofIPv6Mreq = 0x14
+ SizeofPacketMreq = 0x10
+ SizeofInet4Pktinfo = 0xc
+ SizeofInet6Pktinfo = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofICMPv6Filter = 0x20
+ SizeofUcred = 0xc
+ SizeofTCPInfo = 0x68
+ SizeofCanFilter = 0x8
+)
+
+const (
+ NDA_UNSPEC = 0x0
+ NDA_DST = 0x1
+ NDA_LLADDR = 0x2
+ NDA_CACHEINFO = 0x3
+ NDA_PROBES = 0x4
+ NDA_VLAN = 0x5
+ NDA_PORT = 0x6
+ NDA_VNI = 0x7
+ NDA_IFINDEX = 0x8
+ NDA_MASTER = 0x9
+ NDA_LINK_NETNSID = 0xa
+ NDA_SRC_VNI = 0xb
+ NTF_USE = 0x1
+ NTF_SELF = 0x2
+ NTF_MASTER = 0x4
+ NTF_PROXY = 0x8
+ NTF_EXT_LEARNED = 0x10
+ NTF_OFFLOADED = 0x20
+ NTF_ROUTER = 0x80
+ NUD_INCOMPLETE = 0x1
+ NUD_REACHABLE = 0x2
+ NUD_STALE = 0x4
+ NUD_DELAY = 0x8
+ NUD_PROBE = 0x10
+ NUD_FAILED = 0x20
+ NUD_NOARP = 0x40
+ NUD_PERMANENT = 0x80
+ NUD_NONE = 0x0
+ IFA_UNSPEC = 0x0
+ IFA_ADDRESS = 0x1
+ IFA_LOCAL = 0x2
+ IFA_LABEL = 0x3
+ IFA_BROADCAST = 0x4
+ IFA_ANYCAST = 0x5
+ IFA_CACHEINFO = 0x6
+ IFA_MULTICAST = 0x7
+ IFA_FLAGS = 0x8
+ IFA_RT_PRIORITY = 0x9
+ IFA_TARGET_NETNSID = 0xa
+ RT_SCOPE_UNIVERSE = 0x0
+ RT_SCOPE_SITE = 0xc8
+ RT_SCOPE_LINK = 0xfd
+ RT_SCOPE_HOST = 0xfe
+ RT_SCOPE_NOWHERE = 0xff
+ RT_TABLE_UNSPEC = 0x0
+ RT_TABLE_COMPAT = 0xfc
+ RT_TABLE_DEFAULT = 0xfd
+ RT_TABLE_MAIN = 0xfe
+ RT_TABLE_LOCAL = 0xff
+ RT_TABLE_MAX = 0xffffffff
+ RTA_UNSPEC = 0x0
+ RTA_DST = 0x1
+ RTA_SRC = 0x2
+ RTA_IIF = 0x3
+ RTA_OIF = 0x4
+ RTA_GATEWAY = 0x5
+ RTA_PRIORITY = 0x6
+ RTA_PREFSRC = 0x7
+ RTA_METRICS = 0x8
+ RTA_MULTIPATH = 0x9
+ RTA_FLOW = 0xb
+ RTA_CACHEINFO = 0xc
+ RTA_TABLE = 0xf
+ RTA_MARK = 0x10
+ RTA_MFC_STATS = 0x11
+ RTA_VIA = 0x12
+ RTA_NEWDST = 0x13
+ RTA_PREF = 0x14
+ RTA_ENCAP_TYPE = 0x15
+ RTA_ENCAP = 0x16
+ RTA_EXPIRES = 0x17
+ RTA_PAD = 0x18
+ RTA_UID = 0x19
+ RTA_TTL_PROPAGATE = 0x1a
+ RTA_IP_PROTO = 0x1b
+ RTA_SPORT = 0x1c
+ RTA_DPORT = 0x1d
+ RTN_UNSPEC = 0x0
+ RTN_UNICAST = 0x1
+ RTN_LOCAL = 0x2
+ RTN_BROADCAST = 0x3
+ RTN_ANYCAST = 0x4
+ RTN_MULTICAST = 0x5
+ RTN_BLACKHOLE = 0x6
+ RTN_UNREACHABLE = 0x7
+ RTN_PROHIBIT = 0x8
+ RTN_THROW = 0x9
+ RTN_NAT = 0xa
+ RTN_XRESOLVE = 0xb
+ SizeofNlMsghdr = 0x10
+ SizeofNlMsgerr = 0x14
+ SizeofRtGenmsg = 0x1
+ SizeofNlAttr = 0x4
+ SizeofRtAttr = 0x4
+ SizeofIfInfomsg = 0x10
+ SizeofIfAddrmsg = 0x8
+ SizeofIfaCacheinfo = 0x10
+ SizeofRtMsg = 0xc
+ SizeofRtNexthop = 0x8
+ SizeofNdUseroptmsg = 0x10
+ SizeofNdMsg = 0xc
+)
+
+type NlMsghdr struct {
+ Len uint32
+ Type uint16
+ Flags uint16
+ Seq uint32
+ Pid uint32
+}
+
+type NlMsgerr struct {
+ Error int32
+ Msg NlMsghdr
+}
+
+type RtGenmsg struct {
+ Family uint8
+}
+
+type NlAttr struct {
+ Len uint16
+ Type uint16
+}
+
+type RtAttr struct {
+ Len uint16
+ Type uint16
+}
+
+type IfInfomsg struct {
+ Family uint8
+ _ uint8
+ Type uint16
+ Index int32
+ Flags uint32
+ Change uint32
+}
+
+type IfAddrmsg struct {
+ Family uint8
+ Prefixlen uint8
+ Flags uint8
+ Scope uint8
+ Index uint32
+}
+
+type IfaCacheinfo struct {
+ Prefered uint32
+ Valid uint32
+ Cstamp uint32
+ Tstamp uint32
+}
+
+type RtMsg struct {
+ Family uint8
+ Dst_len uint8
+ Src_len uint8
+ Tos uint8
+ Table uint8
+ Protocol uint8
+ Scope uint8
+ Type uint8
+ Flags uint32
+}
+
+type RtNexthop struct {
+ Len uint16
+ Flags uint8
+ Hops uint8
+ Ifindex int32
+}
+
+type NdUseroptmsg struct {
+ Family uint8
+ Pad1 uint8
+ Opts_len uint16
+ Ifindex int32
+ Icmp_type uint8
+ Icmp_code uint8
+ Pad2 uint16
+ Pad3 uint32
+}
+
+type NdMsg struct {
+ Family uint8
+ Pad1 uint8
+ Pad2 uint16
+ Ifindex int32
+ State uint16
+ Flags uint8
+ Type uint8
+}
+
+const (
+ SizeofSockFilter = 0x8
+)
+
+type SockFilter struct {
+ Code uint16
+ Jt uint8
+ Jf uint8
+ K uint32
+}
+
+type SockFprog struct {
+ Len uint16
+ Filter *SockFilter
+}
+
+type InotifyEvent struct {
+ Wd int32
+ Mask uint32
+ Cookie uint32
+ Len uint32
+}
+
+const SizeofInotifyEvent = 0x10
+
+const SI_LOAD_SHIFT = 0x10
+
+type Utsname struct {
+ Sysname [65]byte
+ Nodename [65]byte
+ Release [65]byte
+ Version [65]byte
+ Machine [65]byte
+ Domainname [65]byte
+}
+
+const (
+ AT_EMPTY_PATH = 0x1000
+ AT_FDCWD = -0x64
+ AT_NO_AUTOMOUNT = 0x800
+ AT_REMOVEDIR = 0x200
+
+ AT_STATX_SYNC_AS_STAT = 0x0
+ AT_STATX_FORCE_SYNC = 0x2000
+ AT_STATX_DONT_SYNC = 0x4000
+
+ AT_SYMLINK_FOLLOW = 0x400
+ AT_SYMLINK_NOFOLLOW = 0x100
+
+ AT_EACCESS = 0x200
+)
+
+type OpenHow struct {
+ Flags uint64
+ Mode uint64
+ Resolve uint64
+}
+
+const SizeofOpenHow = 0x18
+
+const (
+ RESOLVE_BENEATH = 0x8
+ RESOLVE_IN_ROOT = 0x10
+ RESOLVE_NO_MAGICLINKS = 0x2
+ RESOLVE_NO_SYMLINKS = 0x4
+ RESOLVE_NO_XDEV = 0x1
+)
+
+type PollFd struct {
+ Fd int32
+ Events int16
+ Revents int16
+}
+
+const (
+ POLLIN = 0x1
+ POLLPRI = 0x2
+ POLLOUT = 0x4
+ POLLERR = 0x8
+ POLLHUP = 0x10
+ POLLNVAL = 0x20
+)
+
+type SignalfdSiginfo struct {
+ Signo uint32
+ Errno int32
+ Code int32
+ Pid uint32
+ Uid uint32
+ Fd int32
+ Tid uint32
+ Band uint32
+ Overrun uint32
+ Trapno uint32
+ Status int32
+ Int int32
+ Ptr uint64
+ Utime uint64
+ Stime uint64
+ Addr uint64
+ Addr_lsb uint16
+ _ uint16
+ Syscall int32
+ Call_addr uint64
+ Arch uint32
+ _ [28]uint8
+}
+
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
+const (
+ TASKSTATS_CMD_UNSPEC = 0x0
+ TASKSTATS_CMD_GET = 0x1
+ TASKSTATS_CMD_NEW = 0x2
+ TASKSTATS_TYPE_UNSPEC = 0x0
+ TASKSTATS_TYPE_PID = 0x1
+ TASKSTATS_TYPE_TGID = 0x2
+ TASKSTATS_TYPE_STATS = 0x3
+ TASKSTATS_TYPE_AGGR_PID = 0x4
+ TASKSTATS_TYPE_AGGR_TGID = 0x5
+ TASKSTATS_TYPE_NULL = 0x6
+ TASKSTATS_CMD_ATTR_UNSPEC = 0x0
+ TASKSTATS_CMD_ATTR_PID = 0x1
+ TASKSTATS_CMD_ATTR_TGID = 0x2
+ TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
+ TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
+)
+
+type CGroupStats struct {
+ Sleeping uint64
+ Running uint64
+ Stopped uint64
+ Uninterruptible uint64
+ Io_wait uint64
+}
+
+const (
+ CGROUPSTATS_CMD_UNSPEC = 0x3
+ CGROUPSTATS_CMD_GET = 0x4
+ CGROUPSTATS_CMD_NEW = 0x5
+ CGROUPSTATS_TYPE_UNSPEC = 0x0
+ CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
+ CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
+ CGROUPSTATS_CMD_ATTR_FD = 0x1
+)
+
+type Genlmsghdr struct {
+ Cmd uint8
+ Version uint8
+ Reserved uint16
+}
+
+const (
+ CTRL_CMD_UNSPEC = 0x0
+ CTRL_CMD_NEWFAMILY = 0x1
+ CTRL_CMD_DELFAMILY = 0x2
+ CTRL_CMD_GETFAMILY = 0x3
+ CTRL_CMD_NEWOPS = 0x4
+ CTRL_CMD_DELOPS = 0x5
+ CTRL_CMD_GETOPS = 0x6
+ CTRL_CMD_NEWMCAST_GRP = 0x7
+ CTRL_CMD_DELMCAST_GRP = 0x8
+ CTRL_CMD_GETMCAST_GRP = 0x9
+ CTRL_ATTR_UNSPEC = 0x0
+ CTRL_ATTR_FAMILY_ID = 0x1
+ CTRL_ATTR_FAMILY_NAME = 0x2
+ CTRL_ATTR_VERSION = 0x3
+ CTRL_ATTR_HDRSIZE = 0x4
+ CTRL_ATTR_MAXATTR = 0x5
+ CTRL_ATTR_OPS = 0x6
+ CTRL_ATTR_MCAST_GROUPS = 0x7
+ CTRL_ATTR_OP_UNSPEC = 0x0
+ CTRL_ATTR_OP_ID = 0x1
+ CTRL_ATTR_OP_FLAGS = 0x2
+ CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
+ CTRL_ATTR_MCAST_GRP_NAME = 0x1
+ CTRL_ATTR_MCAST_GRP_ID = 0x2
+)
+
+const (
+ _CPU_SETSIZE = 0x400
+)
+
+const (
+ BDADDR_BREDR = 0x0
+ BDADDR_LE_PUBLIC = 0x1
+ BDADDR_LE_RANDOM = 0x2
+)
+
+type PerfEventAttr struct {
+ Type uint32
+ Size uint32
+ Config uint64
+ Sample uint64
+ Sample_type uint64
+ Read_format uint64
+ Bits uint64
+ Wakeup uint32
+ Bp_type uint32
+ Ext1 uint64
+ Ext2 uint64
+ Branch_sample_type uint64
+ Sample_regs_user uint64
+ Sample_stack_user uint32
+ Clockid int32
+ Sample_regs_intr uint64
+ Aux_watermark uint32
+ Sample_max_stack uint16
+ _ uint16
+}
+
+type PerfEventMmapPage struct {
+ Version uint32
+ Compat_version uint32
+ Lock uint32
+ Index uint32
+ Offset int64
+ Time_enabled uint64
+ Time_running uint64
+ Capabilities uint64
+ Pmc_width uint16
+ Time_shift uint16
+ Time_mult uint32
+ Time_offset uint64
+ Time_zero uint64
+ Size uint32
+ _ uint32
+ Time_cycles uint64
+ Time_mask uint64
+ _ [928]uint8
+ Data_head uint64
+ Data_tail uint64
+ Data_offset uint64
+ Data_size uint64
+ Aux_head uint64
+ Aux_tail uint64
+ Aux_offset uint64
+ Aux_size uint64
+}
+
+const (
+ PerfBitDisabled uint64 = CBitFieldMaskBit0
+ PerfBitInherit = CBitFieldMaskBit1
+ PerfBitPinned = CBitFieldMaskBit2
+ PerfBitExclusive = CBitFieldMaskBit3
+ PerfBitExcludeUser = CBitFieldMaskBit4
+ PerfBitExcludeKernel = CBitFieldMaskBit5
+ PerfBitExcludeHv = CBitFieldMaskBit6
+ PerfBitExcludeIdle = CBitFieldMaskBit7
+ PerfBitMmap = CBitFieldMaskBit8
+ PerfBitComm = CBitFieldMaskBit9
+ PerfBitFreq = CBitFieldMaskBit10
+ PerfBitInheritStat = CBitFieldMaskBit11
+ PerfBitEnableOnExec = CBitFieldMaskBit12
+ PerfBitTask = CBitFieldMaskBit13
+ PerfBitWatermark = CBitFieldMaskBit14
+ PerfBitPreciseIPBit1 = CBitFieldMaskBit15
+ PerfBitPreciseIPBit2 = CBitFieldMaskBit16
+ PerfBitMmapData = CBitFieldMaskBit17
+ PerfBitSampleIDAll = CBitFieldMaskBit18
+ PerfBitExcludeHost = CBitFieldMaskBit19
+ PerfBitExcludeGuest = CBitFieldMaskBit20
+ PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
+ PerfBitExcludeCallchainUser = CBitFieldMaskBit22
+ PerfBitMmap2 = CBitFieldMaskBit23
+ PerfBitCommExec = CBitFieldMaskBit24
+ PerfBitUseClockID = CBitFieldMaskBit25
+ PerfBitContextSwitch = CBitFieldMaskBit26
+)
+
+const (
+ PERF_TYPE_HARDWARE = 0x0
+ PERF_TYPE_SOFTWARE = 0x1
+ PERF_TYPE_TRACEPOINT = 0x2
+ PERF_TYPE_HW_CACHE = 0x3
+ PERF_TYPE_RAW = 0x4
+ PERF_TYPE_BREAKPOINT = 0x5
+ PERF_TYPE_MAX = 0x6
+ PERF_COUNT_HW_CPU_CYCLES = 0x0
+ PERF_COUNT_HW_INSTRUCTIONS = 0x1
+ PERF_COUNT_HW_CACHE_REFERENCES = 0x2
+ PERF_COUNT_HW_CACHE_MISSES = 0x3
+ PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
+ PERF_COUNT_HW_BRANCH_MISSES = 0x5
+ PERF_COUNT_HW_BUS_CYCLES = 0x6
+ PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
+ PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
+ PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
+ PERF_COUNT_HW_MAX = 0xa
+ PERF_COUNT_HW_CACHE_L1D = 0x0
+ PERF_COUNT_HW_CACHE_L1I = 0x1
+ PERF_COUNT_HW_CACHE_LL = 0x2
+ PERF_COUNT_HW_CACHE_DTLB = 0x3
+ PERF_COUNT_HW_CACHE_ITLB = 0x4
+ PERF_COUNT_HW_CACHE_BPU = 0x5
+ PERF_COUNT_HW_CACHE_NODE = 0x6
+ PERF_COUNT_HW_CACHE_MAX = 0x7
+ PERF_COUNT_HW_CACHE_OP_READ = 0x0
+ PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
+ PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
+ PERF_COUNT_HW_CACHE_OP_MAX = 0x3
+ PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
+ PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
+ PERF_COUNT_HW_CACHE_RESULT_MAX = 0x2
+ PERF_COUNT_SW_CPU_CLOCK = 0x0
+ PERF_COUNT_SW_TASK_CLOCK = 0x1
+ PERF_COUNT_SW_PAGE_FAULTS = 0x2
+ PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
+ PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
+ PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
+ PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
+ PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
+ PERF_COUNT_SW_EMULATION_FAULTS = 0x8
+ PERF_COUNT_SW_DUMMY = 0x9
+ PERF_COUNT_SW_BPF_OUTPUT = 0xa
+ PERF_COUNT_SW_MAX = 0xb
+ PERF_SAMPLE_IP = 0x1
+ PERF_SAMPLE_TID = 0x2
+ PERF_SAMPLE_TIME = 0x4
+ PERF_SAMPLE_ADDR = 0x8
+ PERF_SAMPLE_READ = 0x10
+ PERF_SAMPLE_CALLCHAIN = 0x20
+ PERF_SAMPLE_ID = 0x40
+ PERF_SAMPLE_CPU = 0x80
+ PERF_SAMPLE_PERIOD = 0x100
+ PERF_SAMPLE_STREAM_ID = 0x200
+ PERF_SAMPLE_RAW = 0x400
+ PERF_SAMPLE_BRANCH_STACK = 0x800
+ PERF_SAMPLE_REGS_USER = 0x1000
+ PERF_SAMPLE_STACK_USER = 0x2000
+ PERF_SAMPLE_WEIGHT = 0x4000
+ PERF_SAMPLE_DATA_SRC = 0x8000
+ PERF_SAMPLE_IDENTIFIER = 0x10000
+ PERF_SAMPLE_TRANSACTION = 0x20000
+ PERF_SAMPLE_REGS_INTR = 0x40000
+ PERF_SAMPLE_PHYS_ADDR = 0x80000
+ PERF_SAMPLE_AUX = 0x100000
+ PERF_SAMPLE_CGROUP = 0x200000
+ PERF_SAMPLE_MAX = 0x1000000
+ PERF_SAMPLE_BRANCH_USER_SHIFT = 0x0
+ PERF_SAMPLE_BRANCH_KERNEL_SHIFT = 0x1
+ PERF_SAMPLE_BRANCH_HV_SHIFT = 0x2
+ PERF_SAMPLE_BRANCH_ANY_SHIFT = 0x3
+ PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT = 0x4
+ PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT = 0x5
+ PERF_SAMPLE_BRANCH_IND_CALL_SHIFT = 0x6
+ PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT = 0x7
+ PERF_SAMPLE_BRANCH_IN_TX_SHIFT = 0x8
+ PERF_SAMPLE_BRANCH_NO_TX_SHIFT = 0x9
+ PERF_SAMPLE_BRANCH_COND_SHIFT = 0xa
+ PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT = 0xb
+ PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT = 0xc
+ PERF_SAMPLE_BRANCH_CALL_SHIFT = 0xd
+ PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT = 0xe
+ PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT = 0xf
+ PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 0x10
+ PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT = 0x11
+ PERF_SAMPLE_BRANCH_MAX_SHIFT = 0x12
+ PERF_SAMPLE_BRANCH_USER = 0x1
+ PERF_SAMPLE_BRANCH_KERNEL = 0x2
+ PERF_SAMPLE_BRANCH_HV = 0x4
+ PERF_SAMPLE_BRANCH_ANY = 0x8
+ PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
+ PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
+ PERF_SAMPLE_BRANCH_IND_CALL = 0x40
+ PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
+ PERF_SAMPLE_BRANCH_IN_TX = 0x100
+ PERF_SAMPLE_BRANCH_NO_TX = 0x200
+ PERF_SAMPLE_BRANCH_COND = 0x400
+ PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
+ PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
+ PERF_SAMPLE_BRANCH_CALL = 0x2000
+ PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
+ PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
+ PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
+ PERF_SAMPLE_BRANCH_HW_INDEX = 0x20000
+ PERF_SAMPLE_BRANCH_MAX = 0x40000
+ PERF_BR_UNKNOWN = 0x0
+ PERF_BR_COND = 0x1
+ PERF_BR_UNCOND = 0x2
+ PERF_BR_IND = 0x3
+ PERF_BR_CALL = 0x4
+ PERF_BR_IND_CALL = 0x5
+ PERF_BR_RET = 0x6
+ PERF_BR_SYSCALL = 0x7
+ PERF_BR_SYSRET = 0x8
+ PERF_BR_COND_CALL = 0x9
+ 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 {
+ Addr SockaddrStorage
+ Flags uint8
+ Prefixlen uint8
+ Keylen uint16
+ _ uint32
+ Key [80]uint8
+}
+
+type HDDriveCmdHdr struct {
+ Command uint8
+ Number uint8
+ Feature uint8
+ Count uint8
+}
+
+type HDDriveID struct {
+ Config uint16
+ Cyls uint16
+ Reserved2 uint16
+ Heads uint16
+ Track_bytes uint16
+ Sector_bytes uint16
+ Sectors uint16
+ Vendor0 uint16
+ Vendor1 uint16
+ Vendor2 uint16
+ Serial_no [20]uint8
+ Buf_type uint16
+ Buf_size uint16
+ Ecc_bytes uint16
+ Fw_rev [8]uint8
+ Model [40]uint8
+ Max_multsect uint8
+ Vendor3 uint8
+ Dword_io uint16
+ Vendor4 uint8
+ Capability uint8
+ Reserved50 uint16
+ Vendor5 uint8
+ TPIO uint8
+ Vendor6 uint8
+ TDMA uint8
+ Field_valid uint16
+ Cur_cyls uint16
+ Cur_heads uint16
+ Cur_sectors uint16
+ Cur_capacity0 uint16
+ Cur_capacity1 uint16
+ Multsect uint8
+ Multsect_valid uint8
+ Lba_capacity uint32
+ Dma_1word uint16
+ Dma_mword uint16
+ Eide_pio_modes uint16
+ Eide_dma_min uint16
+ Eide_dma_time uint16
+ Eide_pio uint16
+ Eide_pio_iordy uint16
+ Words69_70 [2]uint16
+ Words71_74 [4]uint16
+ Queue_depth uint16
+ Words76_79 [4]uint16
+ Major_rev_num uint16
+ Minor_rev_num uint16
+ Command_set_1 uint16
+ Command_set_2 uint16
+ Cfsse uint16
+ Cfs_enable_1 uint16
+ Cfs_enable_2 uint16
+ Csf_default uint16
+ Dma_ultra uint16
+ Trseuc uint16
+ TrsEuc uint16
+ CurAPMvalues uint16
+ Mprc uint16
+ Hw_config uint16
+ Acoustic uint16
+ Msrqs uint16
+ Sxfert uint16
+ Sal uint16
+ Spg uint32
+ Lba_capacity_2 uint64
+ Words104_125 [22]uint16
+ Last_lun uint16
+ Word127 uint16
+ Dlf uint16
+ Csfo uint16
+ Words130_155 [26]uint16
+ Word156 uint16
+ Words157_159 [3]uint16
+ Cfa_power uint16
+ Words161_175 [15]uint16
+ Words176_205 [30]uint16
+ Words206_254 [49]uint16
+ Integrity_word uint16
+}
+
+const (
+ ST_MANDLOCK = 0x40
+ ST_NOATIME = 0x400
+ ST_NODEV = 0x4
+ ST_NODIRATIME = 0x800
+ ST_NOEXEC = 0x8
+ ST_NOSUID = 0x2
+ ST_RDONLY = 0x1
+ ST_RELATIME = 0x1000
+ ST_SYNCHRONOUS = 0x10
+)
+
+type Tpacket2Hdr struct {
+ Status uint32
+ Len uint32
+ Snaplen uint32
+ Mac uint16
+ Net uint16
+ Sec uint32
+ Nsec uint32
+ Vlan_tci uint16
+ Vlan_tpid uint16
+ _ [4]uint8
+}
+
+type Tpacket3Hdr struct {
+ Next_offset uint32
+ Sec uint32
+ Nsec uint32
+ Snaplen uint32
+ Len uint32
+ Status uint32
+ Mac uint16
+ Net uint16
+ Hv1 TpacketHdrVariant1
+ _ [8]uint8
+}
+
+type TpacketHdrVariant1 struct {
+ Rxhash uint32
+ Vlan_tci uint32
+ Vlan_tpid uint16
+ _ uint16
+}
+
+type TpacketBlockDesc struct {
+ Version uint32
+ To_priv uint32
+ Hdr [40]byte
+}
+
+type TpacketBDTS struct {
+ Sec uint32
+ Usec uint32
+}
+
+type TpacketHdrV1 struct {
+ Block_status uint32
+ Num_pkts uint32
+ Offset_to_first_pkt uint32
+ Blk_len uint32
+ Seq_num uint64
+ Ts_first_pkt TpacketBDTS
+ Ts_last_pkt TpacketBDTS
+}
+
+type TpacketReq struct {
+ Block_size uint32
+ Block_nr uint32
+ Frame_size uint32
+ Frame_nr uint32
+}
+
+type TpacketReq3 struct {
+ Block_size uint32
+ Block_nr uint32
+ Frame_size uint32
+ Frame_nr uint32
+ Retire_blk_tov uint32
+ Sizeof_priv uint32
+ Feature_req_word uint32
+}
+
+type TpacketStats struct {
+ Packets uint32
+ Drops uint32
+}
+
+type TpacketStatsV3 struct {
+ Packets uint32
+ Drops uint32
+ Freeze_q_cnt uint32
+}
+
+type TpacketAuxdata struct {
+ Status uint32
+ Len uint32
+ Snaplen uint32
+ Mac uint16
+ Net uint16
+ Vlan_tci uint16
+ Vlan_tpid uint16
+}
+
+const (
+ TPACKET_V1 = 0x0
+ TPACKET_V2 = 0x1
+ TPACKET_V3 = 0x2
+)
+
+const (
+ SizeofTpacket2Hdr = 0x20
+ SizeofTpacket3Hdr = 0x30
+
+ SizeofTpacketStats = 0x8
+ SizeofTpacketStatsV3 = 0xc
+)
+
+const (
+ IFLA_UNSPEC = 0x0
+ IFLA_ADDRESS = 0x1
+ IFLA_BROADCAST = 0x2
+ IFLA_IFNAME = 0x3
+ IFLA_MTU = 0x4
+ IFLA_LINK = 0x5
+ IFLA_QDISC = 0x6
+ IFLA_STATS = 0x7
+ IFLA_COST = 0x8
+ IFLA_PRIORITY = 0x9
+ IFLA_MASTER = 0xa
+ IFLA_WIRELESS = 0xb
+ IFLA_PROTINFO = 0xc
+ IFLA_TXQLEN = 0xd
+ IFLA_MAP = 0xe
+ IFLA_WEIGHT = 0xf
+ IFLA_OPERSTATE = 0x10
+ IFLA_LINKMODE = 0x11
+ IFLA_LINKINFO = 0x12
+ IFLA_NET_NS_PID = 0x13
+ IFLA_IFALIAS = 0x14
+ IFLA_NUM_VF = 0x15
+ IFLA_VFINFO_LIST = 0x16
+ IFLA_STATS64 = 0x17
+ IFLA_VF_PORTS = 0x18
+ IFLA_PORT_SELF = 0x19
+ IFLA_AF_SPEC = 0x1a
+ IFLA_GROUP = 0x1b
+ IFLA_NET_NS_FD = 0x1c
+ IFLA_EXT_MASK = 0x1d
+ IFLA_PROMISCUITY = 0x1e
+ IFLA_NUM_TX_QUEUES = 0x1f
+ IFLA_NUM_RX_QUEUES = 0x20
+ IFLA_CARRIER = 0x21
+ IFLA_PHYS_PORT_ID = 0x22
+ IFLA_CARRIER_CHANGES = 0x23
+ IFLA_PHYS_SWITCH_ID = 0x24
+ IFLA_LINK_NETNSID = 0x25
+ IFLA_PHYS_PORT_NAME = 0x26
+ IFLA_PROTO_DOWN = 0x27
+ IFLA_GSO_MAX_SEGS = 0x28
+ IFLA_GSO_MAX_SIZE = 0x29
+ IFLA_PAD = 0x2a
+ IFLA_XDP = 0x2b
+ IFLA_EVENT = 0x2c
+ IFLA_NEW_NETNSID = 0x2d
+ IFLA_IF_NETNSID = 0x2e
+ IFLA_TARGET_NETNSID = 0x2e
+ IFLA_CARRIER_UP_COUNT = 0x2f
+ IFLA_CARRIER_DOWN_COUNT = 0x30
+ IFLA_NEW_IFINDEX = 0x31
+ IFLA_MIN_MTU = 0x32
+ IFLA_MAX_MTU = 0x33
+ IFLA_PROP_LIST = 0x34
+ IFLA_ALT_IFNAME = 0x35
+ IFLA_PERM_ADDRESS = 0x36
+ IFLA_PROTO_DOWN_REASON = 0x37
+ IFLA_PROTO_DOWN_REASON_UNSPEC = 0x0
+ IFLA_PROTO_DOWN_REASON_MASK = 0x1
+ IFLA_PROTO_DOWN_REASON_VALUE = 0x2
+ IFLA_PROTO_DOWN_REASON_MAX = 0x2
+ IFLA_INET_UNSPEC = 0x0
+ IFLA_INET_CONF = 0x1
+ IFLA_INET6_UNSPEC = 0x0
+ IFLA_INET6_FLAGS = 0x1
+ IFLA_INET6_CONF = 0x2
+ IFLA_INET6_STATS = 0x3
+ IFLA_INET6_MCAST = 0x4
+ IFLA_INET6_CACHEINFO = 0x5
+ IFLA_INET6_ICMP6STATS = 0x6
+ IFLA_INET6_TOKEN = 0x7
+ IFLA_INET6_ADDR_GEN_MODE = 0x8
+ IFLA_BR_UNSPEC = 0x0
+ IFLA_BR_FORWARD_DELAY = 0x1
+ IFLA_BR_HELLO_TIME = 0x2
+ IFLA_BR_MAX_AGE = 0x3
+ IFLA_BR_AGEING_TIME = 0x4
+ IFLA_BR_STP_STATE = 0x5
+ IFLA_BR_PRIORITY = 0x6
+ IFLA_BR_VLAN_FILTERING = 0x7
+ IFLA_BR_VLAN_PROTOCOL = 0x8
+ IFLA_BR_GROUP_FWD_MASK = 0x9
+ IFLA_BR_ROOT_ID = 0xa
+ IFLA_BR_BRIDGE_ID = 0xb
+ IFLA_BR_ROOT_PORT = 0xc
+ IFLA_BR_ROOT_PATH_COST = 0xd
+ IFLA_BR_TOPOLOGY_CHANGE = 0xe
+ IFLA_BR_TOPOLOGY_CHANGE_DETECTED = 0xf
+ IFLA_BR_HELLO_TIMER = 0x10
+ IFLA_BR_TCN_TIMER = 0x11
+ IFLA_BR_TOPOLOGY_CHANGE_TIMER = 0x12
+ IFLA_BR_GC_TIMER = 0x13
+ IFLA_BR_GROUP_ADDR = 0x14
+ IFLA_BR_FDB_FLUSH = 0x15
+ IFLA_BR_MCAST_ROUTER = 0x16
+ IFLA_BR_MCAST_SNOOPING = 0x17
+ IFLA_BR_MCAST_QUERY_USE_IFADDR = 0x18
+ IFLA_BR_MCAST_QUERIER = 0x19
+ IFLA_BR_MCAST_HASH_ELASTICITY = 0x1a
+ IFLA_BR_MCAST_HASH_MAX = 0x1b
+ IFLA_BR_MCAST_LAST_MEMBER_CNT = 0x1c
+ IFLA_BR_MCAST_STARTUP_QUERY_CNT = 0x1d
+ IFLA_BR_MCAST_LAST_MEMBER_INTVL = 0x1e
+ IFLA_BR_MCAST_MEMBERSHIP_INTVL = 0x1f
+ IFLA_BR_MCAST_QUERIER_INTVL = 0x20
+ IFLA_BR_MCAST_QUERY_INTVL = 0x21
+ IFLA_BR_MCAST_QUERY_RESPONSE_INTVL = 0x22
+ IFLA_BR_MCAST_STARTUP_QUERY_INTVL = 0x23
+ IFLA_BR_NF_CALL_IPTABLES = 0x24
+ IFLA_BR_NF_CALL_IP6TABLES = 0x25
+ IFLA_BR_NF_CALL_ARPTABLES = 0x26
+ IFLA_BR_VLAN_DEFAULT_PVID = 0x27
+ IFLA_BR_PAD = 0x28
+ IFLA_BR_VLAN_STATS_ENABLED = 0x29
+ IFLA_BR_MCAST_STATS_ENABLED = 0x2a
+ IFLA_BR_MCAST_IGMP_VERSION = 0x2b
+ IFLA_BR_MCAST_MLD_VERSION = 0x2c
+ IFLA_BR_VLAN_STATS_PER_PORT = 0x2d
+ IFLA_BR_MULTI_BOOLOPT = 0x2e
+ IFLA_BRPORT_UNSPEC = 0x0
+ IFLA_BRPORT_STATE = 0x1
+ IFLA_BRPORT_PRIORITY = 0x2
+ IFLA_BRPORT_COST = 0x3
+ IFLA_BRPORT_MODE = 0x4
+ IFLA_BRPORT_GUARD = 0x5
+ IFLA_BRPORT_PROTECT = 0x6
+ IFLA_BRPORT_FAST_LEAVE = 0x7
+ IFLA_BRPORT_LEARNING = 0x8
+ IFLA_BRPORT_UNICAST_FLOOD = 0x9
+ IFLA_BRPORT_PROXYARP = 0xa
+ IFLA_BRPORT_LEARNING_SYNC = 0xb
+ IFLA_BRPORT_PROXYARP_WIFI = 0xc
+ IFLA_BRPORT_ROOT_ID = 0xd
+ IFLA_BRPORT_BRIDGE_ID = 0xe
+ IFLA_BRPORT_DESIGNATED_PORT = 0xf
+ IFLA_BRPORT_DESIGNATED_COST = 0x10
+ IFLA_BRPORT_ID = 0x11
+ IFLA_BRPORT_NO = 0x12
+ IFLA_BRPORT_TOPOLOGY_CHANGE_ACK = 0x13
+ IFLA_BRPORT_CONFIG_PENDING = 0x14
+ IFLA_BRPORT_MESSAGE_AGE_TIMER = 0x15
+ IFLA_BRPORT_FORWARD_DELAY_TIMER = 0x16
+ IFLA_BRPORT_HOLD_TIMER = 0x17
+ IFLA_BRPORT_FLUSH = 0x18
+ IFLA_BRPORT_MULTICAST_ROUTER = 0x19
+ IFLA_BRPORT_PAD = 0x1a
+ IFLA_BRPORT_MCAST_FLOOD = 0x1b
+ IFLA_BRPORT_MCAST_TO_UCAST = 0x1c
+ IFLA_BRPORT_VLAN_TUNNEL = 0x1d
+ IFLA_BRPORT_BCAST_FLOOD = 0x1e
+ IFLA_BRPORT_GROUP_FWD_MASK = 0x1f
+ IFLA_BRPORT_NEIGH_SUPPRESS = 0x20
+ IFLA_BRPORT_ISOLATED = 0x21
+ IFLA_BRPORT_BACKUP_PORT = 0x22
+ IFLA_BRPORT_MRP_RING_OPEN = 0x23
+ IFLA_BRPORT_MRP_IN_OPEN = 0x24
+ IFLA_INFO_UNSPEC = 0x0
+ IFLA_INFO_KIND = 0x1
+ IFLA_INFO_DATA = 0x2
+ IFLA_INFO_XSTATS = 0x3
+ IFLA_INFO_SLAVE_KIND = 0x4
+ IFLA_INFO_SLAVE_DATA = 0x5
+ IFLA_VLAN_UNSPEC = 0x0
+ IFLA_VLAN_ID = 0x1
+ IFLA_VLAN_FLAGS = 0x2
+ IFLA_VLAN_EGRESS_QOS = 0x3
+ IFLA_VLAN_INGRESS_QOS = 0x4
+ IFLA_VLAN_PROTOCOL = 0x5
+ IFLA_VLAN_QOS_UNSPEC = 0x0
+ IFLA_VLAN_QOS_MAPPING = 0x1
+ IFLA_MACVLAN_UNSPEC = 0x0
+ IFLA_MACVLAN_MODE = 0x1
+ IFLA_MACVLAN_FLAGS = 0x2
+ IFLA_MACVLAN_MACADDR_MODE = 0x3
+ IFLA_MACVLAN_MACADDR = 0x4
+ IFLA_MACVLAN_MACADDR_DATA = 0x5
+ IFLA_MACVLAN_MACADDR_COUNT = 0x6
+ IFLA_VRF_UNSPEC = 0x0
+ IFLA_VRF_TABLE = 0x1
+ IFLA_VRF_PORT_UNSPEC = 0x0
+ IFLA_VRF_PORT_TABLE = 0x1
+ IFLA_MACSEC_UNSPEC = 0x0
+ IFLA_MACSEC_SCI = 0x1
+ IFLA_MACSEC_PORT = 0x2
+ IFLA_MACSEC_ICV_LEN = 0x3
+ IFLA_MACSEC_CIPHER_SUITE = 0x4
+ IFLA_MACSEC_WINDOW = 0x5
+ IFLA_MACSEC_ENCODING_SA = 0x6
+ IFLA_MACSEC_ENCRYPT = 0x7
+ IFLA_MACSEC_PROTECT = 0x8
+ IFLA_MACSEC_INC_SCI = 0x9
+ IFLA_MACSEC_ES = 0xa
+ IFLA_MACSEC_SCB = 0xb
+ IFLA_MACSEC_REPLAY_PROTECT = 0xc
+ IFLA_MACSEC_VALIDATION = 0xd
+ IFLA_MACSEC_PAD = 0xe
+ IFLA_MACSEC_OFFLOAD = 0xf
+ IFLA_XFRM_UNSPEC = 0x0
+ IFLA_XFRM_LINK = 0x1
+ IFLA_XFRM_IF_ID = 0x2
+ IFLA_IPVLAN_UNSPEC = 0x0
+ IFLA_IPVLAN_MODE = 0x1
+ IFLA_IPVLAN_FLAGS = 0x2
+ IFLA_VXLAN_UNSPEC = 0x0
+ IFLA_VXLAN_ID = 0x1
+ IFLA_VXLAN_GROUP = 0x2
+ IFLA_VXLAN_LINK = 0x3
+ IFLA_VXLAN_LOCAL = 0x4
+ IFLA_VXLAN_TTL = 0x5
+ IFLA_VXLAN_TOS = 0x6
+ IFLA_VXLAN_LEARNING = 0x7
+ IFLA_VXLAN_AGEING = 0x8
+ IFLA_VXLAN_LIMIT = 0x9
+ IFLA_VXLAN_PORT_RANGE = 0xa
+ IFLA_VXLAN_PROXY = 0xb
+ IFLA_VXLAN_RSC = 0xc
+ IFLA_VXLAN_L2MISS = 0xd
+ IFLA_VXLAN_L3MISS = 0xe
+ IFLA_VXLAN_PORT = 0xf
+ IFLA_VXLAN_GROUP6 = 0x10
+ IFLA_VXLAN_LOCAL6 = 0x11
+ IFLA_VXLAN_UDP_CSUM = 0x12
+ IFLA_VXLAN_UDP_ZERO_CSUM6_TX = 0x13
+ IFLA_VXLAN_UDP_ZERO_CSUM6_RX = 0x14
+ IFLA_VXLAN_REMCSUM_TX = 0x15
+ IFLA_VXLAN_REMCSUM_RX = 0x16
+ IFLA_VXLAN_GBP = 0x17
+ IFLA_VXLAN_REMCSUM_NOPARTIAL = 0x18
+ IFLA_VXLAN_COLLECT_METADATA = 0x19
+ IFLA_VXLAN_LABEL = 0x1a
+ IFLA_VXLAN_GPE = 0x1b
+ IFLA_VXLAN_TTL_INHERIT = 0x1c
+ IFLA_VXLAN_DF = 0x1d
+ IFLA_GENEVE_UNSPEC = 0x0
+ IFLA_GENEVE_ID = 0x1
+ IFLA_GENEVE_REMOTE = 0x2
+ IFLA_GENEVE_TTL = 0x3
+ IFLA_GENEVE_TOS = 0x4
+ IFLA_GENEVE_PORT = 0x5
+ IFLA_GENEVE_COLLECT_METADATA = 0x6
+ IFLA_GENEVE_REMOTE6 = 0x7
+ IFLA_GENEVE_UDP_CSUM = 0x8
+ IFLA_GENEVE_UDP_ZERO_CSUM6_TX = 0x9
+ IFLA_GENEVE_UDP_ZERO_CSUM6_RX = 0xa
+ IFLA_GENEVE_LABEL = 0xb
+ IFLA_GENEVE_TTL_INHERIT = 0xc
+ IFLA_GENEVE_DF = 0xd
+ IFLA_BAREUDP_UNSPEC = 0x0
+ IFLA_BAREUDP_PORT = 0x1
+ IFLA_BAREUDP_ETHERTYPE = 0x2
+ IFLA_BAREUDP_SRCPORT_MIN = 0x3
+ IFLA_BAREUDP_MULTIPROTO_MODE = 0x4
+ IFLA_PPP_UNSPEC = 0x0
+ IFLA_PPP_DEV_FD = 0x1
+ IFLA_GTP_UNSPEC = 0x0
+ IFLA_GTP_FD0 = 0x1
+ IFLA_GTP_FD1 = 0x2
+ IFLA_GTP_PDP_HASHSIZE = 0x3
+ IFLA_GTP_ROLE = 0x4
+ IFLA_BOND_UNSPEC = 0x0
+ IFLA_BOND_MODE = 0x1
+ IFLA_BOND_ACTIVE_SLAVE = 0x2
+ IFLA_BOND_MIIMON = 0x3
+ IFLA_BOND_UPDELAY = 0x4
+ IFLA_BOND_DOWNDELAY = 0x5
+ IFLA_BOND_USE_CARRIER = 0x6
+ IFLA_BOND_ARP_INTERVAL = 0x7
+ IFLA_BOND_ARP_IP_TARGET = 0x8
+ IFLA_BOND_ARP_VALIDATE = 0x9
+ IFLA_BOND_ARP_ALL_TARGETS = 0xa
+ IFLA_BOND_PRIMARY = 0xb
+ IFLA_BOND_PRIMARY_RESELECT = 0xc
+ IFLA_BOND_FAIL_OVER_MAC = 0xd
+ IFLA_BOND_XMIT_HASH_POLICY = 0xe
+ IFLA_BOND_RESEND_IGMP = 0xf
+ IFLA_BOND_NUM_PEER_NOTIF = 0x10
+ IFLA_BOND_ALL_SLAVES_ACTIVE = 0x11
+ IFLA_BOND_MIN_LINKS = 0x12
+ IFLA_BOND_LP_INTERVAL = 0x13
+ IFLA_BOND_PACKETS_PER_SLAVE = 0x14
+ IFLA_BOND_AD_LACP_RATE = 0x15
+ IFLA_BOND_AD_SELECT = 0x16
+ IFLA_BOND_AD_INFO = 0x17
+ IFLA_BOND_AD_ACTOR_SYS_PRIO = 0x18
+ IFLA_BOND_AD_USER_PORT_KEY = 0x19
+ IFLA_BOND_AD_ACTOR_SYSTEM = 0x1a
+ IFLA_BOND_TLB_DYNAMIC_LB = 0x1b
+ IFLA_BOND_PEER_NOTIF_DELAY = 0x1c
+ IFLA_BOND_AD_INFO_UNSPEC = 0x0
+ IFLA_BOND_AD_INFO_AGGREGATOR = 0x1
+ IFLA_BOND_AD_INFO_NUM_PORTS = 0x2
+ IFLA_BOND_AD_INFO_ACTOR_KEY = 0x3
+ IFLA_BOND_AD_INFO_PARTNER_KEY = 0x4
+ IFLA_BOND_AD_INFO_PARTNER_MAC = 0x5
+ IFLA_BOND_SLAVE_UNSPEC = 0x0
+ IFLA_BOND_SLAVE_STATE = 0x1
+ IFLA_BOND_SLAVE_MII_STATUS = 0x2
+ IFLA_BOND_SLAVE_LINK_FAILURE_COUNT = 0x3
+ IFLA_BOND_SLAVE_PERM_HWADDR = 0x4
+ IFLA_BOND_SLAVE_QUEUE_ID = 0x5
+ IFLA_BOND_SLAVE_AD_AGGREGATOR_ID = 0x6
+ IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE = 0x7
+ IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE = 0x8
+ IFLA_VF_INFO_UNSPEC = 0x0
+ IFLA_VF_INFO = 0x1
+ IFLA_VF_UNSPEC = 0x0
+ IFLA_VF_MAC = 0x1
+ IFLA_VF_VLAN = 0x2
+ IFLA_VF_TX_RATE = 0x3
+ IFLA_VF_SPOOFCHK = 0x4
+ IFLA_VF_LINK_STATE = 0x5
+ IFLA_VF_RATE = 0x6
+ IFLA_VF_RSS_QUERY_EN = 0x7
+ IFLA_VF_STATS = 0x8
+ IFLA_VF_TRUST = 0x9
+ IFLA_VF_IB_NODE_GUID = 0xa
+ IFLA_VF_IB_PORT_GUID = 0xb
+ IFLA_VF_VLAN_LIST = 0xc
+ IFLA_VF_BROADCAST = 0xd
+ IFLA_VF_VLAN_INFO_UNSPEC = 0x0
+ IFLA_VF_VLAN_INFO = 0x1
+ IFLA_VF_LINK_STATE_AUTO = 0x0
+ IFLA_VF_LINK_STATE_ENABLE = 0x1
+ IFLA_VF_LINK_STATE_DISABLE = 0x2
+ IFLA_VF_STATS_RX_PACKETS = 0x0
+ IFLA_VF_STATS_TX_PACKETS = 0x1
+ IFLA_VF_STATS_RX_BYTES = 0x2
+ IFLA_VF_STATS_TX_BYTES = 0x3
+ IFLA_VF_STATS_BROADCAST = 0x4
+ IFLA_VF_STATS_MULTICAST = 0x5
+ IFLA_VF_STATS_PAD = 0x6
+ IFLA_VF_STATS_RX_DROPPED = 0x7
+ IFLA_VF_STATS_TX_DROPPED = 0x8
+ IFLA_VF_PORT_UNSPEC = 0x0
+ IFLA_VF_PORT = 0x1
+ IFLA_PORT_UNSPEC = 0x0
+ IFLA_PORT_VF = 0x1
+ IFLA_PORT_PROFILE = 0x2
+ IFLA_PORT_VSI_TYPE = 0x3
+ IFLA_PORT_INSTANCE_UUID = 0x4
+ IFLA_PORT_HOST_UUID = 0x5
+ IFLA_PORT_REQUEST = 0x6
+ IFLA_PORT_RESPONSE = 0x7
+ IFLA_IPOIB_UNSPEC = 0x0
+ IFLA_IPOIB_PKEY = 0x1
+ IFLA_IPOIB_MODE = 0x2
+ IFLA_IPOIB_UMCAST = 0x3
+ IFLA_HSR_UNSPEC = 0x0
+ IFLA_HSR_SLAVE1 = 0x1
+ IFLA_HSR_SLAVE2 = 0x2
+ IFLA_HSR_MULTICAST_SPEC = 0x3
+ IFLA_HSR_SUPERVISION_ADDR = 0x4
+ IFLA_HSR_SEQ_NR = 0x5
+ IFLA_HSR_VERSION = 0x6
+ IFLA_HSR_PROTOCOL = 0x7
+ IFLA_STATS_UNSPEC = 0x0
+ IFLA_STATS_LINK_64 = 0x1
+ IFLA_STATS_LINK_XSTATS = 0x2
+ IFLA_STATS_LINK_XSTATS_SLAVE = 0x3
+ IFLA_STATS_LINK_OFFLOAD_XSTATS = 0x4
+ IFLA_STATS_AF_SPEC = 0x5
+ IFLA_OFFLOAD_XSTATS_UNSPEC = 0x0
+ IFLA_OFFLOAD_XSTATS_CPU_HIT = 0x1
+ IFLA_XDP_UNSPEC = 0x0
+ IFLA_XDP_FD = 0x1
+ IFLA_XDP_ATTACHED = 0x2
+ IFLA_XDP_FLAGS = 0x3
+ IFLA_XDP_PROG_ID = 0x4
+ IFLA_XDP_DRV_PROG_ID = 0x5
+ IFLA_XDP_SKB_PROG_ID = 0x6
+ IFLA_XDP_HW_PROG_ID = 0x7
+ IFLA_XDP_EXPECTED_FD = 0x8
+ IFLA_EVENT_NONE = 0x0
+ IFLA_EVENT_REBOOT = 0x1
+ IFLA_EVENT_FEATURES = 0x2
+ IFLA_EVENT_BONDING_FAILOVER = 0x3
+ IFLA_EVENT_NOTIFY_PEERS = 0x4
+ IFLA_EVENT_IGMP_RESEND = 0x5
+ IFLA_EVENT_BONDING_OPTIONS = 0x6
+ IFLA_TUN_UNSPEC = 0x0
+ IFLA_TUN_OWNER = 0x1
+ IFLA_TUN_GROUP = 0x2
+ IFLA_TUN_TYPE = 0x3
+ IFLA_TUN_PI = 0x4
+ IFLA_TUN_VNET_HDR = 0x5
+ IFLA_TUN_PERSIST = 0x6
+ IFLA_TUN_MULTI_QUEUE = 0x7
+ IFLA_TUN_NUM_QUEUES = 0x8
+ IFLA_TUN_NUM_DISABLED_QUEUES = 0x9
+ IFLA_RMNET_UNSPEC = 0x0
+ IFLA_RMNET_MUX_ID = 0x1
+ IFLA_RMNET_FLAGS = 0x2
+)
+
+const (
+ NF_INET_PRE_ROUTING = 0x0
+ NF_INET_LOCAL_IN = 0x1
+ NF_INET_FORWARD = 0x2
+ NF_INET_LOCAL_OUT = 0x3
+ NF_INET_POST_ROUTING = 0x4
+ NF_INET_NUMHOOKS = 0x5
+)
+
+const (
+ NF_NETDEV_INGRESS = 0x0
+ NF_NETDEV_NUMHOOKS = 0x1
+)
+
+const (
+ NFPROTO_UNSPEC = 0x0
+ NFPROTO_INET = 0x1
+ NFPROTO_IPV4 = 0x2
+ NFPROTO_ARP = 0x3
+ NFPROTO_NETDEV = 0x5
+ NFPROTO_BRIDGE = 0x7
+ NFPROTO_IPV6 = 0xa
+ NFPROTO_DECNET = 0xc
+ NFPROTO_NUMPROTO = 0xd
+)
+
+type Nfgenmsg struct {
+ Nfgen_family uint8
+ Version uint8
+ Res_id uint16
+}
+
+const (
+ NFNL_BATCH_UNSPEC = 0x0
+ NFNL_BATCH_GENID = 0x1
+)
+
+const (
+ NFT_REG_VERDICT = 0x0
+ NFT_REG_1 = 0x1
+ NFT_REG_2 = 0x2
+ NFT_REG_3 = 0x3
+ NFT_REG_4 = 0x4
+ NFT_REG32_00 = 0x8
+ NFT_REG32_01 = 0x9
+ NFT_REG32_02 = 0xa
+ NFT_REG32_03 = 0xb
+ NFT_REG32_04 = 0xc
+ NFT_REG32_05 = 0xd
+ NFT_REG32_06 = 0xe
+ NFT_REG32_07 = 0xf
+ NFT_REG32_08 = 0x10
+ NFT_REG32_09 = 0x11
+ NFT_REG32_10 = 0x12
+ NFT_REG32_11 = 0x13
+ NFT_REG32_12 = 0x14
+ NFT_REG32_13 = 0x15
+ NFT_REG32_14 = 0x16
+ NFT_REG32_15 = 0x17
+ NFT_CONTINUE = -0x1
+ NFT_BREAK = -0x2
+ NFT_JUMP = -0x3
+ NFT_GOTO = -0x4
+ NFT_RETURN = -0x5
+ NFT_MSG_NEWTABLE = 0x0
+ NFT_MSG_GETTABLE = 0x1
+ NFT_MSG_DELTABLE = 0x2
+ NFT_MSG_NEWCHAIN = 0x3
+ NFT_MSG_GETCHAIN = 0x4
+ NFT_MSG_DELCHAIN = 0x5
+ NFT_MSG_NEWRULE = 0x6
+ NFT_MSG_GETRULE = 0x7
+ NFT_MSG_DELRULE = 0x8
+ NFT_MSG_NEWSET = 0x9
+ NFT_MSG_GETSET = 0xa
+ NFT_MSG_DELSET = 0xb
+ NFT_MSG_NEWSETELEM = 0xc
+ NFT_MSG_GETSETELEM = 0xd
+ NFT_MSG_DELSETELEM = 0xe
+ NFT_MSG_NEWGEN = 0xf
+ NFT_MSG_GETGEN = 0x10
+ NFT_MSG_TRACE = 0x11
+ NFT_MSG_NEWOBJ = 0x12
+ NFT_MSG_GETOBJ = 0x13
+ NFT_MSG_DELOBJ = 0x14
+ NFT_MSG_GETOBJ_RESET = 0x15
+ NFT_MSG_MAX = 0x19
+ NFTA_LIST_UNSPEC = 0x0
+ NFTA_LIST_ELEM = 0x1
+ NFTA_HOOK_UNSPEC = 0x0
+ NFTA_HOOK_HOOKNUM = 0x1
+ NFTA_HOOK_PRIORITY = 0x2
+ NFTA_HOOK_DEV = 0x3
+ NFT_TABLE_F_DORMANT = 0x1
+ NFTA_TABLE_UNSPEC = 0x0
+ NFTA_TABLE_NAME = 0x1
+ NFTA_TABLE_FLAGS = 0x2
+ NFTA_TABLE_USE = 0x3
+ NFTA_CHAIN_UNSPEC = 0x0
+ NFTA_CHAIN_TABLE = 0x1
+ NFTA_CHAIN_HANDLE = 0x2
+ NFTA_CHAIN_NAME = 0x3
+ NFTA_CHAIN_HOOK = 0x4
+ NFTA_CHAIN_POLICY = 0x5
+ NFTA_CHAIN_USE = 0x6
+ NFTA_CHAIN_TYPE = 0x7
+ NFTA_CHAIN_COUNTERS = 0x8
+ NFTA_CHAIN_PAD = 0x9
+ NFTA_RULE_UNSPEC = 0x0
+ NFTA_RULE_TABLE = 0x1
+ NFTA_RULE_CHAIN = 0x2
+ NFTA_RULE_HANDLE = 0x3
+ NFTA_RULE_EXPRESSIONS = 0x4
+ NFTA_RULE_COMPAT = 0x5
+ NFTA_RULE_POSITION = 0x6
+ NFTA_RULE_USERDATA = 0x7
+ NFTA_RULE_PAD = 0x8
+ NFTA_RULE_ID = 0x9
+ NFT_RULE_COMPAT_F_INV = 0x2
+ NFT_RULE_COMPAT_F_MASK = 0x2
+ NFTA_RULE_COMPAT_UNSPEC = 0x0
+ NFTA_RULE_COMPAT_PROTO = 0x1
+ NFTA_RULE_COMPAT_FLAGS = 0x2
+ NFT_SET_ANONYMOUS = 0x1
+ NFT_SET_CONSTANT = 0x2
+ NFT_SET_INTERVAL = 0x4
+ NFT_SET_MAP = 0x8
+ NFT_SET_TIMEOUT = 0x10
+ NFT_SET_EVAL = 0x20
+ NFT_SET_OBJECT = 0x40
+ NFT_SET_POL_PERFORMANCE = 0x0
+ NFT_SET_POL_MEMORY = 0x1
+ NFTA_SET_DESC_UNSPEC = 0x0
+ NFTA_SET_DESC_SIZE = 0x1
+ NFTA_SET_UNSPEC = 0x0
+ NFTA_SET_TABLE = 0x1
+ NFTA_SET_NAME = 0x2
+ NFTA_SET_FLAGS = 0x3
+ NFTA_SET_KEY_TYPE = 0x4
+ NFTA_SET_KEY_LEN = 0x5
+ NFTA_SET_DATA_TYPE = 0x6
+ NFTA_SET_DATA_LEN = 0x7
+ NFTA_SET_POLICY = 0x8
+ NFTA_SET_DESC = 0x9
+ NFTA_SET_ID = 0xa
+ NFTA_SET_TIMEOUT = 0xb
+ NFTA_SET_GC_INTERVAL = 0xc
+ NFTA_SET_USERDATA = 0xd
+ NFTA_SET_PAD = 0xe
+ NFTA_SET_OBJ_TYPE = 0xf
+ NFT_SET_ELEM_INTERVAL_END = 0x1
+ NFTA_SET_ELEM_UNSPEC = 0x0
+ NFTA_SET_ELEM_KEY = 0x1
+ NFTA_SET_ELEM_DATA = 0x2
+ NFTA_SET_ELEM_FLAGS = 0x3
+ NFTA_SET_ELEM_TIMEOUT = 0x4
+ NFTA_SET_ELEM_EXPIRATION = 0x5
+ NFTA_SET_ELEM_USERDATA = 0x6
+ NFTA_SET_ELEM_EXPR = 0x7
+ NFTA_SET_ELEM_PAD = 0x8
+ NFTA_SET_ELEM_OBJREF = 0x9
+ NFTA_SET_ELEM_LIST_UNSPEC = 0x0
+ NFTA_SET_ELEM_LIST_TABLE = 0x1
+ NFTA_SET_ELEM_LIST_SET = 0x2
+ NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
+ NFTA_SET_ELEM_LIST_SET_ID = 0x4
+ NFT_DATA_VALUE = 0x0
+ NFT_DATA_VERDICT = 0xffffff00
+ NFTA_DATA_UNSPEC = 0x0
+ NFTA_DATA_VALUE = 0x1
+ NFTA_DATA_VERDICT = 0x2
+ NFTA_VERDICT_UNSPEC = 0x0
+ NFTA_VERDICT_CODE = 0x1
+ NFTA_VERDICT_CHAIN = 0x2
+ NFTA_EXPR_UNSPEC = 0x0
+ NFTA_EXPR_NAME = 0x1
+ NFTA_EXPR_DATA = 0x2
+ NFTA_IMMEDIATE_UNSPEC = 0x0
+ NFTA_IMMEDIATE_DREG = 0x1
+ NFTA_IMMEDIATE_DATA = 0x2
+ NFTA_BITWISE_UNSPEC = 0x0
+ NFTA_BITWISE_SREG = 0x1
+ NFTA_BITWISE_DREG = 0x2
+ NFTA_BITWISE_LEN = 0x3
+ NFTA_BITWISE_MASK = 0x4
+ NFTA_BITWISE_XOR = 0x5
+ NFT_BYTEORDER_NTOH = 0x0
+ NFT_BYTEORDER_HTON = 0x1
+ NFTA_BYTEORDER_UNSPEC = 0x0
+ NFTA_BYTEORDER_SREG = 0x1
+ NFTA_BYTEORDER_DREG = 0x2
+ NFTA_BYTEORDER_OP = 0x3
+ NFTA_BYTEORDER_LEN = 0x4
+ NFTA_BYTEORDER_SIZE = 0x5
+ NFT_CMP_EQ = 0x0
+ NFT_CMP_NEQ = 0x1
+ NFT_CMP_LT = 0x2
+ NFT_CMP_LTE = 0x3
+ NFT_CMP_GT = 0x4
+ NFT_CMP_GTE = 0x5
+ NFTA_CMP_UNSPEC = 0x0
+ NFTA_CMP_SREG = 0x1
+ NFTA_CMP_OP = 0x2
+ NFTA_CMP_DATA = 0x3
+ NFT_RANGE_EQ = 0x0
+ NFT_RANGE_NEQ = 0x1
+ NFTA_RANGE_UNSPEC = 0x0
+ NFTA_RANGE_SREG = 0x1
+ NFTA_RANGE_OP = 0x2
+ NFTA_RANGE_FROM_DATA = 0x3
+ NFTA_RANGE_TO_DATA = 0x4
+ NFT_LOOKUP_F_INV = 0x1
+ NFTA_LOOKUP_UNSPEC = 0x0
+ NFTA_LOOKUP_SET = 0x1
+ NFTA_LOOKUP_SREG = 0x2
+ NFTA_LOOKUP_DREG = 0x3
+ NFTA_LOOKUP_SET_ID = 0x4
+ NFTA_LOOKUP_FLAGS = 0x5
+ NFT_DYNSET_OP_ADD = 0x0
+ NFT_DYNSET_OP_UPDATE = 0x1
+ NFT_DYNSET_F_INV = 0x1
+ NFTA_DYNSET_UNSPEC = 0x0
+ NFTA_DYNSET_SET_NAME = 0x1
+ NFTA_DYNSET_SET_ID = 0x2
+ NFTA_DYNSET_OP = 0x3
+ NFTA_DYNSET_SREG_KEY = 0x4
+ NFTA_DYNSET_SREG_DATA = 0x5
+ NFTA_DYNSET_TIMEOUT = 0x6
+ NFTA_DYNSET_EXPR = 0x7
+ NFTA_DYNSET_PAD = 0x8
+ NFTA_DYNSET_FLAGS = 0x9
+ NFT_PAYLOAD_LL_HEADER = 0x0
+ NFT_PAYLOAD_NETWORK_HEADER = 0x1
+ NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
+ NFT_PAYLOAD_CSUM_NONE = 0x0
+ NFT_PAYLOAD_CSUM_INET = 0x1
+ NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
+ NFTA_PAYLOAD_UNSPEC = 0x0
+ NFTA_PAYLOAD_DREG = 0x1
+ NFTA_PAYLOAD_BASE = 0x2
+ NFTA_PAYLOAD_OFFSET = 0x3
+ NFTA_PAYLOAD_LEN = 0x4
+ NFTA_PAYLOAD_SREG = 0x5
+ NFTA_PAYLOAD_CSUM_TYPE = 0x6
+ NFTA_PAYLOAD_CSUM_OFFSET = 0x7
+ NFTA_PAYLOAD_CSUM_FLAGS = 0x8
+ NFT_EXTHDR_F_PRESENT = 0x1
+ NFT_EXTHDR_OP_IPV6 = 0x0
+ NFT_EXTHDR_OP_TCPOPT = 0x1
+ NFTA_EXTHDR_UNSPEC = 0x0
+ NFTA_EXTHDR_DREG = 0x1
+ NFTA_EXTHDR_TYPE = 0x2
+ NFTA_EXTHDR_OFFSET = 0x3
+ NFTA_EXTHDR_LEN = 0x4
+ NFTA_EXTHDR_FLAGS = 0x5
+ NFTA_EXTHDR_OP = 0x6
+ NFTA_EXTHDR_SREG = 0x7
+ NFT_META_LEN = 0x0
+ NFT_META_PROTOCOL = 0x1
+ NFT_META_PRIORITY = 0x2
+ NFT_META_MARK = 0x3
+ NFT_META_IIF = 0x4
+ NFT_META_OIF = 0x5
+ NFT_META_IIFNAME = 0x6
+ NFT_META_OIFNAME = 0x7
+ NFT_META_IIFTYPE = 0x8
+ NFT_META_OIFTYPE = 0x9
+ NFT_META_SKUID = 0xa
+ NFT_META_SKGID = 0xb
+ NFT_META_NFTRACE = 0xc
+ NFT_META_RTCLASSID = 0xd
+ NFT_META_SECMARK = 0xe
+ NFT_META_NFPROTO = 0xf
+ NFT_META_L4PROTO = 0x10
+ NFT_META_BRI_IIFNAME = 0x11
+ NFT_META_BRI_OIFNAME = 0x12
+ NFT_META_PKTTYPE = 0x13
+ NFT_META_CPU = 0x14
+ NFT_META_IIFGROUP = 0x15
+ NFT_META_OIFGROUP = 0x16
+ NFT_META_CGROUP = 0x17
+ NFT_META_PRANDOM = 0x18
+ NFT_RT_CLASSID = 0x0
+ NFT_RT_NEXTHOP4 = 0x1
+ NFT_RT_NEXTHOP6 = 0x2
+ NFT_RT_TCPMSS = 0x3
+ NFT_HASH_JENKINS = 0x0
+ NFT_HASH_SYM = 0x1
+ NFTA_HASH_UNSPEC = 0x0
+ NFTA_HASH_SREG = 0x1
+ NFTA_HASH_DREG = 0x2
+ NFTA_HASH_LEN = 0x3
+ NFTA_HASH_MODULUS = 0x4
+ NFTA_HASH_SEED = 0x5
+ NFTA_HASH_OFFSET = 0x6
+ NFTA_HASH_TYPE = 0x7
+ NFTA_META_UNSPEC = 0x0
+ NFTA_META_DREG = 0x1
+ NFTA_META_KEY = 0x2
+ NFTA_META_SREG = 0x3
+ NFTA_RT_UNSPEC = 0x0
+ NFTA_RT_DREG = 0x1
+ NFTA_RT_KEY = 0x2
+ NFT_CT_STATE = 0x0
+ NFT_CT_DIRECTION = 0x1
+ NFT_CT_STATUS = 0x2
+ NFT_CT_MARK = 0x3
+ NFT_CT_SECMARK = 0x4
+ NFT_CT_EXPIRATION = 0x5
+ NFT_CT_HELPER = 0x6
+ NFT_CT_L3PROTOCOL = 0x7
+ NFT_CT_SRC = 0x8
+ NFT_CT_DST = 0x9
+ NFT_CT_PROTOCOL = 0xa
+ NFT_CT_PROTO_SRC = 0xb
+ NFT_CT_PROTO_DST = 0xc
+ NFT_CT_LABELS = 0xd
+ NFT_CT_PKTS = 0xe
+ NFT_CT_BYTES = 0xf
+ NFT_CT_AVGPKT = 0x10
+ NFT_CT_ZONE = 0x11
+ NFT_CT_EVENTMASK = 0x12
+ NFTA_CT_UNSPEC = 0x0
+ NFTA_CT_DREG = 0x1
+ NFTA_CT_KEY = 0x2
+ NFTA_CT_DIRECTION = 0x3
+ NFTA_CT_SREG = 0x4
+ NFT_LIMIT_PKTS = 0x0
+ NFT_LIMIT_PKT_BYTES = 0x1
+ NFT_LIMIT_F_INV = 0x1
+ NFTA_LIMIT_UNSPEC = 0x0
+ NFTA_LIMIT_RATE = 0x1
+ NFTA_LIMIT_UNIT = 0x2
+ NFTA_LIMIT_BURST = 0x3
+ NFTA_LIMIT_TYPE = 0x4
+ NFTA_LIMIT_FLAGS = 0x5
+ NFTA_LIMIT_PAD = 0x6
+ NFTA_COUNTER_UNSPEC = 0x0
+ NFTA_COUNTER_BYTES = 0x1
+ NFTA_COUNTER_PACKETS = 0x2
+ NFTA_COUNTER_PAD = 0x3
+ NFTA_LOG_UNSPEC = 0x0
+ NFTA_LOG_GROUP = 0x1
+ NFTA_LOG_PREFIX = 0x2
+ NFTA_LOG_SNAPLEN = 0x3
+ NFTA_LOG_QTHRESHOLD = 0x4
+ NFTA_LOG_LEVEL = 0x5
+ NFTA_LOG_FLAGS = 0x6
+ NFTA_QUEUE_UNSPEC = 0x0
+ NFTA_QUEUE_NUM = 0x1
+ NFTA_QUEUE_TOTAL = 0x2
+ NFTA_QUEUE_FLAGS = 0x3
+ NFTA_QUEUE_SREG_QNUM = 0x4
+ NFT_QUOTA_F_INV = 0x1
+ NFT_QUOTA_F_DEPLETED = 0x2
+ NFTA_QUOTA_UNSPEC = 0x0
+ NFTA_QUOTA_BYTES = 0x1
+ NFTA_QUOTA_FLAGS = 0x2
+ NFTA_QUOTA_PAD = 0x3
+ NFTA_QUOTA_CONSUMED = 0x4
+ NFT_REJECT_ICMP_UNREACH = 0x0
+ NFT_REJECT_TCP_RST = 0x1
+ NFT_REJECT_ICMPX_UNREACH = 0x2
+ NFT_REJECT_ICMPX_NO_ROUTE = 0x0
+ NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
+ NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
+ NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
+ NFTA_REJECT_UNSPEC = 0x0
+ NFTA_REJECT_TYPE = 0x1
+ NFTA_REJECT_ICMP_CODE = 0x2
+ NFT_NAT_SNAT = 0x0
+ NFT_NAT_DNAT = 0x1
+ NFTA_NAT_UNSPEC = 0x0
+ NFTA_NAT_TYPE = 0x1
+ NFTA_NAT_FAMILY = 0x2
+ NFTA_NAT_REG_ADDR_MIN = 0x3
+ NFTA_NAT_REG_ADDR_MAX = 0x4
+ NFTA_NAT_REG_PROTO_MIN = 0x5
+ NFTA_NAT_REG_PROTO_MAX = 0x6
+ NFTA_NAT_FLAGS = 0x7
+ NFTA_MASQ_UNSPEC = 0x0
+ NFTA_MASQ_FLAGS = 0x1
+ NFTA_MASQ_REG_PROTO_MIN = 0x2
+ NFTA_MASQ_REG_PROTO_MAX = 0x3
+ NFTA_REDIR_UNSPEC = 0x0
+ NFTA_REDIR_REG_PROTO_MIN = 0x1
+ NFTA_REDIR_REG_PROTO_MAX = 0x2
+ NFTA_REDIR_FLAGS = 0x3
+ NFTA_DUP_UNSPEC = 0x0
+ NFTA_DUP_SREG_ADDR = 0x1
+ NFTA_DUP_SREG_DEV = 0x2
+ NFTA_FWD_UNSPEC = 0x0
+ NFTA_FWD_SREG_DEV = 0x1
+ NFTA_OBJREF_UNSPEC = 0x0
+ NFTA_OBJREF_IMM_TYPE = 0x1
+ NFTA_OBJREF_IMM_NAME = 0x2
+ NFTA_OBJREF_SET_SREG = 0x3
+ NFTA_OBJREF_SET_NAME = 0x4
+ NFTA_OBJREF_SET_ID = 0x5
+ NFTA_GEN_UNSPEC = 0x0
+ NFTA_GEN_ID = 0x1
+ NFTA_GEN_PROC_PID = 0x2
+ NFTA_GEN_PROC_NAME = 0x3
+ NFTA_FIB_UNSPEC = 0x0
+ NFTA_FIB_DREG = 0x1
+ NFTA_FIB_RESULT = 0x2
+ NFTA_FIB_FLAGS = 0x3
+ NFT_FIB_RESULT_UNSPEC = 0x0
+ NFT_FIB_RESULT_OIF = 0x1
+ NFT_FIB_RESULT_OIFNAME = 0x2
+ NFT_FIB_RESULT_ADDRTYPE = 0x3
+ NFTA_FIB_F_SADDR = 0x1
+ NFTA_FIB_F_DADDR = 0x2
+ NFTA_FIB_F_MARK = 0x4
+ NFTA_FIB_F_IIF = 0x8
+ NFTA_FIB_F_OIF = 0x10
+ NFTA_FIB_F_PRESENT = 0x20
+ NFTA_CT_HELPER_UNSPEC = 0x0
+ NFTA_CT_HELPER_NAME = 0x1
+ NFTA_CT_HELPER_L3PROTO = 0x2
+ NFTA_CT_HELPER_L4PROTO = 0x3
+ NFTA_OBJ_UNSPEC = 0x0
+ NFTA_OBJ_TABLE = 0x1
+ NFTA_OBJ_NAME = 0x2
+ NFTA_OBJ_TYPE = 0x3
+ NFTA_OBJ_DATA = 0x4
+ NFTA_OBJ_USE = 0x5
+ NFTA_TRACE_UNSPEC = 0x0
+ NFTA_TRACE_TABLE = 0x1
+ NFTA_TRACE_CHAIN = 0x2
+ NFTA_TRACE_RULE_HANDLE = 0x3
+ NFTA_TRACE_TYPE = 0x4
+ NFTA_TRACE_VERDICT = 0x5
+ NFTA_TRACE_ID = 0x6
+ NFTA_TRACE_LL_HEADER = 0x7
+ NFTA_TRACE_NETWORK_HEADER = 0x8
+ NFTA_TRACE_TRANSPORT_HEADER = 0x9
+ NFTA_TRACE_IIF = 0xa
+ NFTA_TRACE_IIFTYPE = 0xb
+ NFTA_TRACE_OIF = 0xc
+ NFTA_TRACE_OIFTYPE = 0xd
+ NFTA_TRACE_MARK = 0xe
+ NFTA_TRACE_NFPROTO = 0xf
+ NFTA_TRACE_POLICY = 0x10
+ NFTA_TRACE_PAD = 0x11
+ NFT_TRACETYPE_UNSPEC = 0x0
+ NFT_TRACETYPE_POLICY = 0x1
+ NFT_TRACETYPE_RETURN = 0x2
+ NFT_TRACETYPE_RULE = 0x3
+ NFTA_NG_UNSPEC = 0x0
+ NFTA_NG_DREG = 0x1
+ NFTA_NG_MODULUS = 0x2
+ NFTA_NG_TYPE = 0x3
+ NFTA_NG_OFFSET = 0x4
+ NFT_NG_INCREMENTAL = 0x0
+ NFT_NG_RANDOM = 0x1
+)
+
+const (
+ NFTA_TARGET_UNSPEC = 0x0
+ NFTA_TARGET_NAME = 0x1
+ NFTA_TARGET_REV = 0x2
+ NFTA_TARGET_INFO = 0x3
+ NFTA_MATCH_UNSPEC = 0x0
+ NFTA_MATCH_NAME = 0x1
+ NFTA_MATCH_REV = 0x2
+ NFTA_MATCH_INFO = 0x3
+ NFTA_COMPAT_UNSPEC = 0x0
+ NFTA_COMPAT_NAME = 0x1
+ NFTA_COMPAT_REV = 0x2
+ NFTA_COMPAT_TYPE = 0x3
+)
+
+type RTCTime struct {
+ Sec int32
+ Min int32
+ Hour int32
+ Mday int32
+ Mon int32
+ Year int32
+ Wday int32
+ Yday int32
+ Isdst int32
+}
+
+type RTCWkAlrm struct {
+ Enabled uint8
+ Pending uint8
+ Time RTCTime
+}
+
+type BlkpgIoctlArg struct {
+ Op int32
+ Flags int32
+ Datalen int32
+ Data *byte
+}
+
+const (
+ BLKPG_ADD_PARTITION = 0x1
+ BLKPG_DEL_PARTITION = 0x2
+ BLKPG_RESIZE_PARTITION = 0x3
+)
+
+const (
+ NETNSA_NONE = 0x0
+ NETNSA_NSID = 0x1
+ NETNSA_PID = 0x2
+ NETNSA_FD = 0x3
+ NETNSA_TARGET_NSID = 0x4
+ NETNSA_CURRENT_NSID = 0x5
+)
+
+type XDPRingOffset struct {
+ Producer uint64
+ Consumer uint64
+ Desc uint64
+ Flags uint64
+}
+
+type XDPMmapOffsets struct {
+ Rx XDPRingOffset
+ Tx XDPRingOffset
+ Fr XDPRingOffset
+ Cr XDPRingOffset
+}
+
+type XDPStatistics struct {
+ Rx_dropped uint64
+ Rx_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 {
+ Addr uint64
+ Len uint32
+ Options uint32
+}
+
+const (
+ NCSI_CMD_UNSPEC = 0x0
+ NCSI_CMD_PKG_INFO = 0x1
+ NCSI_CMD_SET_INTERFACE = 0x2
+ NCSI_CMD_CLEAR_INTERFACE = 0x3
+ NCSI_ATTR_UNSPEC = 0x0
+ NCSI_ATTR_IFINDEX = 0x1
+ NCSI_ATTR_PACKAGE_LIST = 0x2
+ NCSI_ATTR_PACKAGE_ID = 0x3
+ NCSI_ATTR_CHANNEL_ID = 0x4
+ NCSI_PKG_ATTR_UNSPEC = 0x0
+ NCSI_PKG_ATTR = 0x1
+ NCSI_PKG_ATTR_ID = 0x2
+ NCSI_PKG_ATTR_FORCED = 0x3
+ NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
+ NCSI_CHANNEL_ATTR_UNSPEC = 0x0
+ NCSI_CHANNEL_ATTR = 0x1
+ NCSI_CHANNEL_ATTR_ID = 0x2
+ NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
+ NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
+ NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
+ NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
+ NCSI_CHANNEL_ATTR_ACTIVE = 0x7
+ NCSI_CHANNEL_ATTR_FORCED = 0x8
+ NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
+ NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
+)
+
+type ScmTimestamping struct {
+ Ts [3]Timespec
+}
+
+const (
+ SOF_TIMESTAMPING_TX_HARDWARE = 0x1
+ SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
+ SOF_TIMESTAMPING_RX_HARDWARE = 0x4
+ SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
+ SOF_TIMESTAMPING_SOFTWARE = 0x10
+ SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
+ SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
+ SOF_TIMESTAMPING_OPT_ID = 0x80
+ SOF_TIMESTAMPING_TX_SCHED = 0x100
+ SOF_TIMESTAMPING_TX_ACK = 0x200
+ SOF_TIMESTAMPING_OPT_CMSG = 0x400
+ SOF_TIMESTAMPING_OPT_TSONLY = 0x800
+ SOF_TIMESTAMPING_OPT_STATS = 0x1000
+ SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
+ SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
+
+ SOF_TIMESTAMPING_LAST = 0x4000
+ SOF_TIMESTAMPING_MASK = 0x7fff
+
+ SCM_TSTAMP_SND = 0x0
+ SCM_TSTAMP_SCHED = 0x1
+ SCM_TSTAMP_ACK = 0x2
+)
+
+type SockExtendedErr struct {
+ Errno uint32
+ Origin uint8
+ Type uint8
+ Code uint8
+ Pad uint8
+ Info uint32
+ Data uint32
+}
+
+type FanotifyEventMetadata struct {
+ Event_len uint32
+ Vers uint8
+ Reserved uint8
+ Metadata_len uint16
+ Mask uint64
+ Fd int32
+ Pid int32
+}
+
+type FanotifyResponse struct {
+ Fd int32
+ Response uint32
+}
+
+const (
+ CRYPTO_MSG_BASE = 0x10
+ CRYPTO_MSG_NEWALG = 0x10
+ CRYPTO_MSG_DELALG = 0x11
+ CRYPTO_MSG_UPDATEALG = 0x12
+ CRYPTO_MSG_GETALG = 0x13
+ CRYPTO_MSG_DELRNG = 0x14
+ CRYPTO_MSG_GETSTAT = 0x15
+)
+
+const (
+ CRYPTOCFGA_UNSPEC = 0x0
+ CRYPTOCFGA_PRIORITY_VAL = 0x1
+ CRYPTOCFGA_REPORT_LARVAL = 0x2
+ CRYPTOCFGA_REPORT_HASH = 0x3
+ CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
+ CRYPTOCFGA_REPORT_AEAD = 0x5
+ CRYPTOCFGA_REPORT_COMPRESS = 0x6
+ CRYPTOCFGA_REPORT_RNG = 0x7
+ CRYPTOCFGA_REPORT_CIPHER = 0x8
+ CRYPTOCFGA_REPORT_AKCIPHER = 0x9
+ CRYPTOCFGA_REPORT_KPP = 0xa
+ CRYPTOCFGA_REPORT_ACOMP = 0xb
+ CRYPTOCFGA_STAT_LARVAL = 0xc
+ CRYPTOCFGA_STAT_HASH = 0xd
+ CRYPTOCFGA_STAT_BLKCIPHER = 0xe
+ CRYPTOCFGA_STAT_AEAD = 0xf
+ CRYPTOCFGA_STAT_COMPRESS = 0x10
+ CRYPTOCFGA_STAT_RNG = 0x11
+ CRYPTOCFGA_STAT_CIPHER = 0x12
+ CRYPTOCFGA_STAT_AKCIPHER = 0x13
+ CRYPTOCFGA_STAT_KPP = 0x14
+ CRYPTOCFGA_STAT_ACOMP = 0x15
+)
+
+const (
+ BPF_REG_0 = 0x0
+ BPF_REG_1 = 0x1
+ BPF_REG_2 = 0x2
+ BPF_REG_3 = 0x3
+ BPF_REG_4 = 0x4
+ BPF_REG_5 = 0x5
+ BPF_REG_6 = 0x6
+ BPF_REG_7 = 0x7
+ BPF_REG_8 = 0x8
+ BPF_REG_9 = 0x9
+ BPF_REG_10 = 0xa
+ BPF_MAP_CREATE = 0x0
+ BPF_MAP_LOOKUP_ELEM = 0x1
+ BPF_MAP_UPDATE_ELEM = 0x2
+ BPF_MAP_DELETE_ELEM = 0x3
+ BPF_MAP_GET_NEXT_KEY = 0x4
+ BPF_PROG_LOAD = 0x5
+ BPF_OBJ_PIN = 0x6
+ BPF_OBJ_GET = 0x7
+ BPF_PROG_ATTACH = 0x8
+ BPF_PROG_DETACH = 0x9
+ BPF_PROG_TEST_RUN = 0xa
+ BPF_PROG_GET_NEXT_ID = 0xb
+ BPF_MAP_GET_NEXT_ID = 0xc
+ BPF_PROG_GET_FD_BY_ID = 0xd
+ BPF_MAP_GET_FD_BY_ID = 0xe
+ BPF_OBJ_GET_INFO_BY_FD = 0xf
+ BPF_PROG_QUERY = 0x10
+ BPF_RAW_TRACEPOINT_OPEN = 0x11
+ BPF_BTF_LOAD = 0x12
+ BPF_BTF_GET_FD_BY_ID = 0x13
+ BPF_TASK_FD_QUERY = 0x14
+ BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
+ BPF_MAP_FREEZE = 0x16
+ BPF_BTF_GET_NEXT_ID = 0x17
+ BPF_MAP_LOOKUP_BATCH = 0x18
+ BPF_MAP_LOOKUP_AND_DELETE_BATCH = 0x19
+ BPF_MAP_UPDATE_BATCH = 0x1a
+ BPF_MAP_DELETE_BATCH = 0x1b
+ BPF_LINK_CREATE = 0x1c
+ BPF_LINK_UPDATE = 0x1d
+ BPF_LINK_GET_FD_BY_ID = 0x1e
+ BPF_LINK_GET_NEXT_ID = 0x1f
+ BPF_ENABLE_STATS = 0x20
+ BPF_ITER_CREATE = 0x21
+ BPF_LINK_DETACH = 0x22
+ BPF_PROG_BIND_MAP = 0x23
+ BPF_MAP_TYPE_UNSPEC = 0x0
+ BPF_MAP_TYPE_HASH = 0x1
+ BPF_MAP_TYPE_ARRAY = 0x2
+ BPF_MAP_TYPE_PROG_ARRAY = 0x3
+ BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
+ BPF_MAP_TYPE_PERCPU_HASH = 0x5
+ BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
+ BPF_MAP_TYPE_STACK_TRACE = 0x7
+ BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
+ BPF_MAP_TYPE_LRU_HASH = 0x9
+ BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
+ BPF_MAP_TYPE_LPM_TRIE = 0xb
+ BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
+ BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
+ BPF_MAP_TYPE_DEVMAP = 0xe
+ BPF_MAP_TYPE_SOCKMAP = 0xf
+ BPF_MAP_TYPE_CPUMAP = 0x10
+ BPF_MAP_TYPE_XSKMAP = 0x11
+ BPF_MAP_TYPE_SOCKHASH = 0x12
+ BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
+ BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
+ BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
+ BPF_MAP_TYPE_QUEUE = 0x16
+ BPF_MAP_TYPE_STACK = 0x17
+ BPF_MAP_TYPE_SK_STORAGE = 0x18
+ BPF_MAP_TYPE_DEVMAP_HASH = 0x19
+ BPF_MAP_TYPE_STRUCT_OPS = 0x1a
+ BPF_MAP_TYPE_RINGBUF = 0x1b
+ BPF_MAP_TYPE_INODE_STORAGE = 0x1c
+ BPF_PROG_TYPE_UNSPEC = 0x0
+ BPF_PROG_TYPE_SOCKET_FILTER = 0x1
+ BPF_PROG_TYPE_KPROBE = 0x2
+ BPF_PROG_TYPE_SCHED_CLS = 0x3
+ BPF_PROG_TYPE_SCHED_ACT = 0x4
+ BPF_PROG_TYPE_TRACEPOINT = 0x5
+ BPF_PROG_TYPE_XDP = 0x6
+ BPF_PROG_TYPE_PERF_EVENT = 0x7
+ BPF_PROG_TYPE_CGROUP_SKB = 0x8
+ BPF_PROG_TYPE_CGROUP_SOCK = 0x9
+ BPF_PROG_TYPE_LWT_IN = 0xa
+ BPF_PROG_TYPE_LWT_OUT = 0xb
+ BPF_PROG_TYPE_LWT_XMIT = 0xc
+ BPF_PROG_TYPE_SOCK_OPS = 0xd
+ BPF_PROG_TYPE_SK_SKB = 0xe
+ BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
+ BPF_PROG_TYPE_SK_MSG = 0x10
+ BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
+ BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
+ BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
+ BPF_PROG_TYPE_LIRC_MODE2 = 0x14
+ BPF_PROG_TYPE_SK_REUSEPORT = 0x15
+ BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
+ BPF_PROG_TYPE_CGROUP_SYSCTL = 0x17
+ BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 0x18
+ BPF_PROG_TYPE_CGROUP_SOCKOPT = 0x19
+ BPF_PROG_TYPE_TRACING = 0x1a
+ BPF_PROG_TYPE_STRUCT_OPS = 0x1b
+ BPF_PROG_TYPE_EXT = 0x1c
+ BPF_PROG_TYPE_LSM = 0x1d
+ BPF_PROG_TYPE_SK_LOOKUP = 0x1e
+ BPF_CGROUP_INET_INGRESS = 0x0
+ BPF_CGROUP_INET_EGRESS = 0x1
+ BPF_CGROUP_INET_SOCK_CREATE = 0x2
+ BPF_CGROUP_SOCK_OPS = 0x3
+ BPF_SK_SKB_STREAM_PARSER = 0x4
+ BPF_SK_SKB_STREAM_VERDICT = 0x5
+ BPF_CGROUP_DEVICE = 0x6
+ BPF_SK_MSG_VERDICT = 0x7
+ BPF_CGROUP_INET4_BIND = 0x8
+ BPF_CGROUP_INET6_BIND = 0x9
+ BPF_CGROUP_INET4_CONNECT = 0xa
+ BPF_CGROUP_INET6_CONNECT = 0xb
+ BPF_CGROUP_INET4_POST_BIND = 0xc
+ BPF_CGROUP_INET6_POST_BIND = 0xd
+ BPF_CGROUP_UDP4_SENDMSG = 0xe
+ BPF_CGROUP_UDP6_SENDMSG = 0xf
+ BPF_LIRC_MODE2 = 0x10
+ BPF_FLOW_DISSECTOR = 0x11
+ BPF_CGROUP_SYSCTL = 0x12
+ BPF_CGROUP_UDP4_RECVMSG = 0x13
+ BPF_CGROUP_UDP6_RECVMSG = 0x14
+ BPF_CGROUP_GETSOCKOPT = 0x15
+ BPF_CGROUP_SETSOCKOPT = 0x16
+ BPF_TRACE_RAW_TP = 0x17
+ BPF_TRACE_FENTRY = 0x18
+ BPF_TRACE_FEXIT = 0x19
+ BPF_MODIFY_RETURN = 0x1a
+ BPF_LSM_MAC = 0x1b
+ BPF_TRACE_ITER = 0x1c
+ BPF_CGROUP_INET4_GETPEERNAME = 0x1d
+ BPF_CGROUP_INET6_GETPEERNAME = 0x1e
+ BPF_CGROUP_INET4_GETSOCKNAME = 0x1f
+ BPF_CGROUP_INET6_GETSOCKNAME = 0x20
+ BPF_XDP_DEVMAP = 0x21
+ BPF_CGROUP_INET_SOCK_RELEASE = 0x22
+ BPF_XDP_CPUMAP = 0x23
+ BPF_SK_LOOKUP = 0x24
+ BPF_XDP = 0x25
+ BPF_LINK_TYPE_UNSPEC = 0x0
+ BPF_LINK_TYPE_RAW_TRACEPOINT = 0x1
+ BPF_LINK_TYPE_TRACING = 0x2
+ BPF_LINK_TYPE_CGROUP = 0x3
+ BPF_LINK_TYPE_ITER = 0x4
+ BPF_LINK_TYPE_NETNS = 0x5
+ BPF_LINK_TYPE_XDP = 0x6
+ BPF_ANY = 0x0
+ BPF_NOEXIST = 0x1
+ BPF_EXIST = 0x2
+ BPF_F_LOCK = 0x4
+ BPF_F_NO_PREALLOC = 0x1
+ BPF_F_NO_COMMON_LRU = 0x2
+ BPF_F_NUMA_NODE = 0x4
+ BPF_F_RDONLY = 0x8
+ BPF_F_WRONLY = 0x10
+ BPF_F_STACK_BUILD_ID = 0x20
+ BPF_F_ZERO_SEED = 0x40
+ BPF_F_RDONLY_PROG = 0x80
+ BPF_F_WRONLY_PROG = 0x100
+ BPF_F_CLONE = 0x200
+ BPF_F_MMAPABLE = 0x400
+ BPF_F_PRESERVE_ELEMS = 0x800
+ BPF_F_INNER_MAP = 0x1000
+ BPF_STATS_RUN_TIME = 0x0
+ BPF_STACK_BUILD_ID_EMPTY = 0x0
+ BPF_STACK_BUILD_ID_VALID = 0x1
+ BPF_STACK_BUILD_ID_IP = 0x2
+ BPF_F_RECOMPUTE_CSUM = 0x1
+ BPF_F_INVALIDATE_HASH = 0x2
+ BPF_F_HDR_FIELD_MASK = 0xf
+ BPF_F_PSEUDO_HDR = 0x10
+ BPF_F_MARK_MANGLED_0 = 0x20
+ BPF_F_MARK_ENFORCE = 0x40
+ BPF_F_INGRESS = 0x1
+ BPF_F_TUNINFO_IPV6 = 0x1
+ BPF_F_SKIP_FIELD_MASK = 0xff
+ BPF_F_USER_STACK = 0x100
+ BPF_F_FAST_STACK_CMP = 0x200
+ BPF_F_REUSE_STACKID = 0x400
+ BPF_F_USER_BUILD_ID = 0x800
+ BPF_F_ZERO_CSUM_TX = 0x2
+ BPF_F_DONT_FRAGMENT = 0x4
+ BPF_F_SEQ_NUMBER = 0x8
+ BPF_F_INDEX_MASK = 0xffffffff
+ BPF_F_CURRENT_CPU = 0xffffffff
+ BPF_F_CTXLEN_MASK = 0xfffff00000000
+ BPF_F_CURRENT_NETNS = -0x1
+ BPF_CSUM_LEVEL_QUERY = 0x0
+ BPF_CSUM_LEVEL_INC = 0x1
+ BPF_CSUM_LEVEL_DEC = 0x2
+ BPF_CSUM_LEVEL_RESET = 0x3
+ BPF_F_ADJ_ROOM_FIXED_GSO = 0x1
+ BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2
+ BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4
+ BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8
+ BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10
+ BPF_F_ADJ_ROOM_NO_CSUM_RESET = 0x20
+ BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff
+ BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38
+ BPF_F_SYSCTL_BASE_NAME = 0x1
+ BPF_LOCAL_STORAGE_GET_F_CREATE = 0x1
+ BPF_SK_STORAGE_GET_F_CREATE = 0x1
+ BPF_F_GET_BRANCH_RECORDS_SIZE = 0x1
+ BPF_RB_NO_WAKEUP = 0x1
+ BPF_RB_FORCE_WAKEUP = 0x2
+ BPF_RB_AVAIL_DATA = 0x0
+ BPF_RB_RING_SIZE = 0x1
+ BPF_RB_CONS_POS = 0x2
+ BPF_RB_PROD_POS = 0x3
+ BPF_RINGBUF_BUSY_BIT = 0x80000000
+ BPF_RINGBUF_DISCARD_BIT = 0x40000000
+ BPF_RINGBUF_HDR_SZ = 0x8
+ BPF_SK_LOOKUP_F_REPLACE = 0x1
+ BPF_SK_LOOKUP_F_NO_REUSEPORT = 0x2
+ BPF_ADJ_ROOM_NET = 0x0
+ BPF_ADJ_ROOM_MAC = 0x1
+ BPF_HDR_START_MAC = 0x0
+ BPF_HDR_START_NET = 0x1
+ BPF_LWT_ENCAP_SEG6 = 0x0
+ BPF_LWT_ENCAP_SEG6_INLINE = 0x1
+ BPF_LWT_ENCAP_IP = 0x2
+ BPF_OK = 0x0
+ BPF_DROP = 0x2
+ BPF_REDIRECT = 0x7
+ BPF_LWT_REROUTE = 0x80
+ BPF_SOCK_OPS_RTO_CB_FLAG = 0x1
+ BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2
+ BPF_SOCK_OPS_STATE_CB_FLAG = 0x4
+ BPF_SOCK_OPS_RTT_CB_FLAG = 0x8
+ BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 0x10
+ BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 0x20
+ BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 0x40
+ BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7f
+ BPF_SOCK_OPS_VOID = 0x0
+ BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
+ BPF_SOCK_OPS_RWND_INIT = 0x2
+ BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
+ BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
+ BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
+ BPF_SOCK_OPS_NEEDS_ECN = 0x6
+ BPF_SOCK_OPS_BASE_RTT = 0x7
+ BPF_SOCK_OPS_RTO_CB = 0x8
+ BPF_SOCK_OPS_RETRANS_CB = 0x9
+ BPF_SOCK_OPS_STATE_CB = 0xa
+ BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
+ BPF_SOCK_OPS_RTT_CB = 0xc
+ BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 0xd
+ BPF_SOCK_OPS_HDR_OPT_LEN_CB = 0xe
+ BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 0xf
+ BPF_TCP_ESTABLISHED = 0x1
+ BPF_TCP_SYN_SENT = 0x2
+ BPF_TCP_SYN_RECV = 0x3
+ BPF_TCP_FIN_WAIT1 = 0x4
+ BPF_TCP_FIN_WAIT2 = 0x5
+ BPF_TCP_TIME_WAIT = 0x6
+ BPF_TCP_CLOSE = 0x7
+ BPF_TCP_CLOSE_WAIT = 0x8
+ BPF_TCP_LAST_ACK = 0x9
+ BPF_TCP_LISTEN = 0xa
+ BPF_TCP_CLOSING = 0xb
+ BPF_TCP_NEW_SYN_RECV = 0xc
+ BPF_TCP_MAX_STATES = 0xd
+ TCP_BPF_IW = 0x3e9
+ TCP_BPF_SNDCWND_CLAMP = 0x3ea
+ TCP_BPF_DELACK_MAX = 0x3eb
+ TCP_BPF_RTO_MIN = 0x3ec
+ TCP_BPF_SYN = 0x3ed
+ TCP_BPF_SYN_IP = 0x3ee
+ TCP_BPF_SYN_MAC = 0x3ef
+ BPF_LOAD_HDR_OPT_TCP_SYN = 0x1
+ BPF_WRITE_HDR_TCP_CURRENT_MSS = 0x1
+ BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 0x2
+ BPF_DEVCG_ACC_MKNOD = 0x1
+ BPF_DEVCG_ACC_READ = 0x2
+ BPF_DEVCG_ACC_WRITE = 0x4
+ BPF_DEVCG_DEV_BLOCK = 0x1
+ BPF_DEVCG_DEV_CHAR = 0x2
+ BPF_FIB_LOOKUP_DIRECT = 0x1
+ BPF_FIB_LOOKUP_OUTPUT = 0x2
+ BPF_FIB_LKUP_RET_SUCCESS = 0x0
+ BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
+ BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
+ BPF_FIB_LKUP_RET_PROHIBIT = 0x3
+ BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
+ BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
+ BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
+ BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
+ BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
+ BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
+ BPF_FD_TYPE_TRACEPOINT = 0x1
+ BPF_FD_TYPE_KPROBE = 0x2
+ BPF_FD_TYPE_KRETPROBE = 0x3
+ BPF_FD_TYPE_UPROBE = 0x4
+ BPF_FD_TYPE_URETPROBE = 0x5
+ BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1
+ BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2
+ BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4
+)
+
+const (
+ RTNLGRP_NONE = 0x0
+ RTNLGRP_LINK = 0x1
+ RTNLGRP_NOTIFY = 0x2
+ RTNLGRP_NEIGH = 0x3
+ RTNLGRP_TC = 0x4
+ RTNLGRP_IPV4_IFADDR = 0x5
+ RTNLGRP_IPV4_MROUTE = 0x6
+ RTNLGRP_IPV4_ROUTE = 0x7
+ RTNLGRP_IPV4_RULE = 0x8
+ RTNLGRP_IPV6_IFADDR = 0x9
+ RTNLGRP_IPV6_MROUTE = 0xa
+ RTNLGRP_IPV6_ROUTE = 0xb
+ RTNLGRP_IPV6_IFINFO = 0xc
+ RTNLGRP_DECnet_IFADDR = 0xd
+ RTNLGRP_NOP2 = 0xe
+ RTNLGRP_DECnet_ROUTE = 0xf
+ RTNLGRP_DECnet_RULE = 0x10
+ RTNLGRP_NOP4 = 0x11
+ RTNLGRP_IPV6_PREFIX = 0x12
+ RTNLGRP_IPV6_RULE = 0x13
+ RTNLGRP_ND_USEROPT = 0x14
+ RTNLGRP_PHONET_IFADDR = 0x15
+ RTNLGRP_PHONET_ROUTE = 0x16
+ RTNLGRP_DCB = 0x17
+ RTNLGRP_IPV4_NETCONF = 0x18
+ RTNLGRP_IPV6_NETCONF = 0x19
+ RTNLGRP_MDB = 0x1a
+ RTNLGRP_MPLS_ROUTE = 0x1b
+ RTNLGRP_NSID = 0x1c
+ RTNLGRP_MPLS_NETCONF = 0x1d
+ RTNLGRP_IPV4_MROUTE_R = 0x1e
+ RTNLGRP_IPV6_MROUTE_R = 0x1f
+ RTNLGRP_NEXTHOP = 0x20
+ RTNLGRP_BRVLAN = 0x21
+)
+
+type CapUserHeader struct {
+ Version uint32
+ Pid int32
+}
+
+type CapUserData struct {
+ Effective uint32
+ Permitted uint32
+ Inheritable uint32
+}
+
+const (
+ LINUX_CAPABILITY_VERSION_1 = 0x19980330
+ LINUX_CAPABILITY_VERSION_2 = 0x20071026
+ LINUX_CAPABILITY_VERSION_3 = 0x20080522
+)
+
+const (
+ LO_FLAGS_READ_ONLY = 0x1
+ LO_FLAGS_AUTOCLEAR = 0x4
+ LO_FLAGS_PARTSCAN = 0x8
+ LO_FLAGS_DIRECT_IO = 0x10
+)
+
+type LoopInfo64 struct {
+ Device uint64
+ Inode uint64
+ Rdevice uint64
+ Offset uint64
+ Sizelimit uint64
+ Number uint32
+ Encrypt_type uint32
+ Encrypt_key_size uint32
+ Flags uint32
+ File_name [64]uint8
+ Crypt_name [64]uint8
+ Encrypt_key [32]uint8
+ Init [2]uint64
+}
+
+type TIPCSocketAddr struct {
+ Ref uint32
+ Node uint32
+}
+
+type TIPCServiceRange struct {
+ Type uint32
+ Lower uint32
+ Upper uint32
+}
+
+type TIPCServiceName struct {
+ Type uint32
+ Instance uint32
+ Domain uint32
+}
+
+type TIPCEvent struct {
+ Event uint32
+ Lower uint32
+ Upper uint32
+ Port TIPCSocketAddr
+ S TIPCSubscr
+}
+
+type TIPCGroupReq struct {
+ Type uint32
+ Instance uint32
+ Scope uint32
+ Flags uint32
+}
+
+const (
+ TIPC_CLUSTER_SCOPE = 0x2
+ TIPC_NODE_SCOPE = 0x3
+)
+
+const (
+ SYSLOG_ACTION_CLOSE = 0
+ SYSLOG_ACTION_OPEN = 1
+ SYSLOG_ACTION_READ = 2
+ SYSLOG_ACTION_READ_ALL = 3
+ SYSLOG_ACTION_READ_CLEAR = 4
+ SYSLOG_ACTION_CLEAR = 5
+ SYSLOG_ACTION_CONSOLE_OFF = 6
+ SYSLOG_ACTION_CONSOLE_ON = 7
+ SYSLOG_ACTION_CONSOLE_LEVEL = 8
+ SYSLOG_ACTION_SIZE_UNREAD = 9
+ SYSLOG_ACTION_SIZE_BUFFER = 10
+)
+
+const (
+ DEVLINK_CMD_UNSPEC = 0x0
+ DEVLINK_CMD_GET = 0x1
+ DEVLINK_CMD_SET = 0x2
+ DEVLINK_CMD_NEW = 0x3
+ DEVLINK_CMD_DEL = 0x4
+ DEVLINK_CMD_PORT_GET = 0x5
+ DEVLINK_CMD_PORT_SET = 0x6
+ DEVLINK_CMD_PORT_NEW = 0x7
+ DEVLINK_CMD_PORT_DEL = 0x8
+ DEVLINK_CMD_PORT_SPLIT = 0x9
+ DEVLINK_CMD_PORT_UNSPLIT = 0xa
+ DEVLINK_CMD_SB_GET = 0xb
+ DEVLINK_CMD_SB_SET = 0xc
+ DEVLINK_CMD_SB_NEW = 0xd
+ DEVLINK_CMD_SB_DEL = 0xe
+ DEVLINK_CMD_SB_POOL_GET = 0xf
+ DEVLINK_CMD_SB_POOL_SET = 0x10
+ DEVLINK_CMD_SB_POOL_NEW = 0x11
+ DEVLINK_CMD_SB_POOL_DEL = 0x12
+ DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
+ DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
+ DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
+ DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
+ DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
+ DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
+ DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
+ DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
+ DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
+ DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
+ DEVLINK_CMD_ESWITCH_GET = 0x1d
+ DEVLINK_CMD_ESWITCH_SET = 0x1e
+ DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
+ DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
+ DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
+ DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
+ DEVLINK_CMD_RESOURCE_SET = 0x23
+ DEVLINK_CMD_RESOURCE_DUMP = 0x24
+ DEVLINK_CMD_RELOAD = 0x25
+ DEVLINK_CMD_PARAM_GET = 0x26
+ DEVLINK_CMD_PARAM_SET = 0x27
+ DEVLINK_CMD_PARAM_NEW = 0x28
+ DEVLINK_CMD_PARAM_DEL = 0x29
+ DEVLINK_CMD_REGION_GET = 0x2a
+ DEVLINK_CMD_REGION_SET = 0x2b
+ DEVLINK_CMD_REGION_NEW = 0x2c
+ DEVLINK_CMD_REGION_DEL = 0x2d
+ DEVLINK_CMD_REGION_READ = 0x2e
+ DEVLINK_CMD_PORT_PARAM_GET = 0x2f
+ DEVLINK_CMD_PORT_PARAM_SET = 0x30
+ DEVLINK_CMD_PORT_PARAM_NEW = 0x31
+ DEVLINK_CMD_PORT_PARAM_DEL = 0x32
+ DEVLINK_CMD_INFO_GET = 0x33
+ DEVLINK_CMD_HEALTH_REPORTER_GET = 0x34
+ DEVLINK_CMD_HEALTH_REPORTER_SET = 0x35
+ DEVLINK_CMD_HEALTH_REPORTER_RECOVER = 0x36
+ DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE = 0x37
+ DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET = 0x38
+ DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR = 0x39
+ DEVLINK_CMD_FLASH_UPDATE = 0x3a
+ DEVLINK_CMD_FLASH_UPDATE_END = 0x3b
+ DEVLINK_CMD_FLASH_UPDATE_STATUS = 0x3c
+ DEVLINK_CMD_TRAP_GET = 0x3d
+ DEVLINK_CMD_TRAP_SET = 0x3e
+ DEVLINK_CMD_TRAP_NEW = 0x3f
+ DEVLINK_CMD_TRAP_DEL = 0x40
+ DEVLINK_CMD_TRAP_GROUP_GET = 0x41
+ DEVLINK_CMD_TRAP_GROUP_SET = 0x42
+ DEVLINK_CMD_TRAP_GROUP_NEW = 0x43
+ DEVLINK_CMD_TRAP_GROUP_DEL = 0x44
+ DEVLINK_CMD_TRAP_POLICER_GET = 0x45
+ DEVLINK_CMD_TRAP_POLICER_SET = 0x46
+ DEVLINK_CMD_TRAP_POLICER_NEW = 0x47
+ DEVLINK_CMD_TRAP_POLICER_DEL = 0x48
+ DEVLINK_CMD_HEALTH_REPORTER_TEST = 0x49
+ DEVLINK_CMD_MAX = 0x49
+ DEVLINK_PORT_TYPE_NOTSET = 0x0
+ DEVLINK_PORT_TYPE_AUTO = 0x1
+ DEVLINK_PORT_TYPE_ETH = 0x2
+ DEVLINK_PORT_TYPE_IB = 0x3
+ DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
+ DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
+ DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
+ DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
+ DEVLINK_ESWITCH_MODE_LEGACY = 0x0
+ DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
+ DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
+ DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
+ DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
+ DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
+ DEVLINK_PORT_FLAVOUR_PHYSICAL = 0x0
+ DEVLINK_PORT_FLAVOUR_CPU = 0x1
+ DEVLINK_PORT_FLAVOUR_DSA = 0x2
+ DEVLINK_PORT_FLAVOUR_PCI_PF = 0x3
+ DEVLINK_PORT_FLAVOUR_PCI_VF = 0x4
+ DEVLINK_PORT_FLAVOUR_VIRTUAL = 0x5
+ DEVLINK_PORT_FLAVOUR_UNUSED = 0x6
+ DEVLINK_PARAM_CMODE_RUNTIME = 0x0
+ DEVLINK_PARAM_CMODE_DRIVERINIT = 0x1
+ DEVLINK_PARAM_CMODE_PERMANENT = 0x2
+ DEVLINK_PARAM_CMODE_MAX = 0x2
+ DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER = 0x0
+ DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH = 0x1
+ DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK = 0x2
+ DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_UNKNOWN = 0x3
+ DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_UNKNOWN = 0x0
+ DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_ALWAYS = 0x1
+ DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_NEVER = 0x2
+ DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK = 0x3
+ DEVLINK_ATTR_STATS_RX_PACKETS = 0x0
+ DEVLINK_ATTR_STATS_RX_BYTES = 0x1
+ DEVLINK_ATTR_STATS_RX_DROPPED = 0x2
+ DEVLINK_ATTR_STATS_MAX = 0x2
+ DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT = 0x0
+ DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT = 0x1
+ DEVLINK_FLASH_OVERWRITE_MAX_BIT = 0x1
+ DEVLINK_TRAP_ACTION_DROP = 0x0
+ DEVLINK_TRAP_ACTION_TRAP = 0x1
+ DEVLINK_TRAP_ACTION_MIRROR = 0x2
+ DEVLINK_TRAP_TYPE_DROP = 0x0
+ DEVLINK_TRAP_TYPE_EXCEPTION = 0x1
+ DEVLINK_TRAP_TYPE_CONTROL = 0x2
+ DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT = 0x0
+ DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE = 0x1
+ DEVLINK_RELOAD_ACTION_UNSPEC = 0x0
+ DEVLINK_RELOAD_ACTION_DRIVER_REINIT = 0x1
+ DEVLINK_RELOAD_ACTION_FW_ACTIVATE = 0x2
+ DEVLINK_RELOAD_ACTION_MAX = 0x2
+ DEVLINK_RELOAD_LIMIT_UNSPEC = 0x0
+ DEVLINK_RELOAD_LIMIT_NO_RESET = 0x1
+ DEVLINK_RELOAD_LIMIT_MAX = 0x1
+ DEVLINK_ATTR_UNSPEC = 0x0
+ DEVLINK_ATTR_BUS_NAME = 0x1
+ DEVLINK_ATTR_DEV_NAME = 0x2
+ DEVLINK_ATTR_PORT_INDEX = 0x3
+ DEVLINK_ATTR_PORT_TYPE = 0x4
+ DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
+ DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
+ DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
+ DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
+ DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
+ DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
+ DEVLINK_ATTR_SB_INDEX = 0xb
+ DEVLINK_ATTR_SB_SIZE = 0xc
+ DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
+ DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
+ DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
+ DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
+ DEVLINK_ATTR_SB_POOL_INDEX = 0x11
+ DEVLINK_ATTR_SB_POOL_TYPE = 0x12
+ DEVLINK_ATTR_SB_POOL_SIZE = 0x13
+ DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
+ DEVLINK_ATTR_SB_THRESHOLD = 0x15
+ DEVLINK_ATTR_SB_TC_INDEX = 0x16
+ DEVLINK_ATTR_SB_OCC_CUR = 0x17
+ DEVLINK_ATTR_SB_OCC_MAX = 0x18
+ DEVLINK_ATTR_ESWITCH_MODE = 0x19
+ DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
+ DEVLINK_ATTR_DPIPE_TABLES = 0x1b
+ DEVLINK_ATTR_DPIPE_TABLE = 0x1c
+ DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
+ DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
+ DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
+ DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
+ DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
+ DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
+ DEVLINK_ATTR_DPIPE_ENTRY = 0x23
+ DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
+ DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
+ DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
+ DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
+ DEVLINK_ATTR_DPIPE_MATCH = 0x28
+ DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
+ DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
+ DEVLINK_ATTR_DPIPE_ACTION = 0x2b
+ DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
+ DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
+ DEVLINK_ATTR_DPIPE_VALUE = 0x2e
+ DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
+ DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
+ DEVLINK_ATTR_DPIPE_HEADERS = 0x31
+ DEVLINK_ATTR_DPIPE_HEADER = 0x32
+ DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
+ DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
+ DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
+ DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
+ DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
+ DEVLINK_ATTR_DPIPE_FIELD = 0x38
+ DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
+ DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
+ DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
+ DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
+ DEVLINK_ATTR_PAD = 0x3d
+ DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
+ DEVLINK_ATTR_RESOURCE_LIST = 0x3f
+ DEVLINK_ATTR_RESOURCE = 0x40
+ DEVLINK_ATTR_RESOURCE_NAME = 0x41
+ DEVLINK_ATTR_RESOURCE_ID = 0x42
+ DEVLINK_ATTR_RESOURCE_SIZE = 0x43
+ DEVLINK_ATTR_RESOURCE_SIZE_NEW = 0x44
+ DEVLINK_ATTR_RESOURCE_SIZE_VALID = 0x45
+ DEVLINK_ATTR_RESOURCE_SIZE_MIN = 0x46
+ DEVLINK_ATTR_RESOURCE_SIZE_MAX = 0x47
+ DEVLINK_ATTR_RESOURCE_SIZE_GRAN = 0x48
+ DEVLINK_ATTR_RESOURCE_UNIT = 0x49
+ DEVLINK_ATTR_RESOURCE_OCC = 0x4a
+ DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID = 0x4b
+ DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_UNITS = 0x4c
+ DEVLINK_ATTR_PORT_FLAVOUR = 0x4d
+ DEVLINK_ATTR_PORT_NUMBER = 0x4e
+ DEVLINK_ATTR_PORT_SPLIT_SUBPORT_NUMBER = 0x4f
+ DEVLINK_ATTR_PARAM = 0x50
+ DEVLINK_ATTR_PARAM_NAME = 0x51
+ DEVLINK_ATTR_PARAM_GENERIC = 0x52
+ DEVLINK_ATTR_PARAM_TYPE = 0x53
+ DEVLINK_ATTR_PARAM_VALUES_LIST = 0x54
+ DEVLINK_ATTR_PARAM_VALUE = 0x55
+ DEVLINK_ATTR_PARAM_VALUE_DATA = 0x56
+ DEVLINK_ATTR_PARAM_VALUE_CMODE = 0x57
+ DEVLINK_ATTR_REGION_NAME = 0x58
+ DEVLINK_ATTR_REGION_SIZE = 0x59
+ DEVLINK_ATTR_REGION_SNAPSHOTS = 0x5a
+ DEVLINK_ATTR_REGION_SNAPSHOT = 0x5b
+ DEVLINK_ATTR_REGION_SNAPSHOT_ID = 0x5c
+ DEVLINK_ATTR_REGION_CHUNKS = 0x5d
+ DEVLINK_ATTR_REGION_CHUNK = 0x5e
+ DEVLINK_ATTR_REGION_CHUNK_DATA = 0x5f
+ DEVLINK_ATTR_REGION_CHUNK_ADDR = 0x60
+ DEVLINK_ATTR_REGION_CHUNK_LEN = 0x61
+ DEVLINK_ATTR_INFO_DRIVER_NAME = 0x62
+ DEVLINK_ATTR_INFO_SERIAL_NUMBER = 0x63
+ DEVLINK_ATTR_INFO_VERSION_FIXED = 0x64
+ DEVLINK_ATTR_INFO_VERSION_RUNNING = 0x65
+ DEVLINK_ATTR_INFO_VERSION_STORED = 0x66
+ DEVLINK_ATTR_INFO_VERSION_NAME = 0x67
+ DEVLINK_ATTR_INFO_VERSION_VALUE = 0x68
+ DEVLINK_ATTR_SB_POOL_CELL_SIZE = 0x69
+ DEVLINK_ATTR_FMSG = 0x6a
+ DEVLINK_ATTR_FMSG_OBJ_NEST_START = 0x6b
+ DEVLINK_ATTR_FMSG_PAIR_NEST_START = 0x6c
+ DEVLINK_ATTR_FMSG_ARR_NEST_START = 0x6d
+ DEVLINK_ATTR_FMSG_NEST_END = 0x6e
+ DEVLINK_ATTR_FMSG_OBJ_NAME = 0x6f
+ DEVLINK_ATTR_FMSG_OBJ_VALUE_TYPE = 0x70
+ DEVLINK_ATTR_FMSG_OBJ_VALUE_DATA = 0x71
+ DEVLINK_ATTR_HEALTH_REPORTER = 0x72
+ DEVLINK_ATTR_HEALTH_REPORTER_NAME = 0x73
+ DEVLINK_ATTR_HEALTH_REPORTER_STATE = 0x74
+ DEVLINK_ATTR_HEALTH_REPORTER_ERR_COUNT = 0x75
+ DEVLINK_ATTR_HEALTH_REPORTER_RECOVER_COUNT = 0x76
+ DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS = 0x77
+ DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD = 0x78
+ DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER = 0x79
+ DEVLINK_ATTR_FLASH_UPDATE_FILE_NAME = 0x7a
+ DEVLINK_ATTR_FLASH_UPDATE_COMPONENT = 0x7b
+ DEVLINK_ATTR_FLASH_UPDATE_STATUS_MSG = 0x7c
+ DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE = 0x7d
+ DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL = 0x7e
+ DEVLINK_ATTR_PORT_PCI_PF_NUMBER = 0x7f
+ DEVLINK_ATTR_PORT_PCI_VF_NUMBER = 0x80
+ DEVLINK_ATTR_STATS = 0x81
+ DEVLINK_ATTR_TRAP_NAME = 0x82
+ DEVLINK_ATTR_TRAP_ACTION = 0x83
+ DEVLINK_ATTR_TRAP_TYPE = 0x84
+ DEVLINK_ATTR_TRAP_GENERIC = 0x85
+ DEVLINK_ATTR_TRAP_METADATA = 0x86
+ DEVLINK_ATTR_TRAP_GROUP_NAME = 0x87
+ DEVLINK_ATTR_RELOAD_FAILED = 0x88
+ DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS_NS = 0x89
+ DEVLINK_ATTR_NETNS_FD = 0x8a
+ DEVLINK_ATTR_NETNS_PID = 0x8b
+ DEVLINK_ATTR_NETNS_ID = 0x8c
+ DEVLINK_ATTR_HEALTH_REPORTER_AUTO_DUMP = 0x8d
+ DEVLINK_ATTR_TRAP_POLICER_ID = 0x8e
+ DEVLINK_ATTR_TRAP_POLICER_RATE = 0x8f
+ DEVLINK_ATTR_TRAP_POLICER_BURST = 0x90
+ DEVLINK_ATTR_PORT_FUNCTION = 0x91
+ DEVLINK_ATTR_INFO_BOARD_SERIAL_NUMBER = 0x92
+ DEVLINK_ATTR_PORT_LANES = 0x93
+ DEVLINK_ATTR_PORT_SPLITTABLE = 0x94
+ DEVLINK_ATTR_PORT_EXTERNAL = 0x95
+ DEVLINK_ATTR_PORT_CONTROLLER_NUMBER = 0x96
+ DEVLINK_ATTR_FLASH_UPDATE_STATUS_TIMEOUT = 0x97
+ DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK = 0x98
+ DEVLINK_ATTR_RELOAD_ACTION = 0x99
+ DEVLINK_ATTR_RELOAD_ACTIONS_PERFORMED = 0x9a
+ DEVLINK_ATTR_RELOAD_LIMITS = 0x9b
+ DEVLINK_ATTR_DEV_STATS = 0x9c
+ DEVLINK_ATTR_RELOAD_STATS = 0x9d
+ DEVLINK_ATTR_RELOAD_STATS_ENTRY = 0x9e
+ DEVLINK_ATTR_RELOAD_STATS_LIMIT = 0x9f
+ DEVLINK_ATTR_RELOAD_STATS_VALUE = 0xa0
+ DEVLINK_ATTR_REMOTE_RELOAD_STATS = 0xa1
+ DEVLINK_ATTR_RELOAD_ACTION_INFO = 0xa2
+ DEVLINK_ATTR_RELOAD_ACTION_STATS = 0xa3
+ DEVLINK_ATTR_MAX = 0xa3
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
+ DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
+ DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
+ DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
+ DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
+ DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
+ DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
+ DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
+ DEVLINK_DPIPE_HEADER_IPV4 = 0x1
+ DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ DEVLINK_RESOURCE_UNIT_ENTRY = 0x0
+ DEVLINK_PORT_FUNCTION_ATTR_UNSPEC = 0x0
+ DEVLINK_PORT_FUNCTION_ATTR_HW_ADDR = 0x1
+ DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x1
+)
+
+type FsverityDigest struct {
+ Algorithm uint16
+ Size uint16
+}
+
+type FsverityEnableArg struct {
+ Version uint32
+ Hash_algorithm uint32
+ Block_size uint32
+ Salt_size uint32
+ Salt_ptr uint64
+ Sig_size uint32
+ _ uint32
+ Sig_ptr uint64
+ _ [11]uint64
+}
+
+type Nhmsg struct {
+ Family uint8
+ Scope uint8
+ Protocol uint8
+ Resvd uint8
+ Flags uint32
+}
+
+type NexthopGrp struct {
+ Id uint32
+ Weight uint8
+ Resvd1 uint8
+ Resvd2 uint16
+}
+
+const (
+ NHA_UNSPEC = 0x0
+ NHA_ID = 0x1
+ NHA_GROUP = 0x2
+ NHA_GROUP_TYPE = 0x3
+ NHA_BLACKHOLE = 0x4
+ NHA_OIF = 0x5
+ NHA_GATEWAY = 0x6
+ NHA_ENCAP_TYPE = 0x7
+ NHA_ENCAP = 0x8
+ NHA_GROUPS = 0x9
+ NHA_MASTER = 0xa
+)
+
+const (
+ CAN_RAW_FILTER = 0x1
+ CAN_RAW_ERR_FILTER = 0x2
+ CAN_RAW_LOOPBACK = 0x3
+ CAN_RAW_RECV_OWN_MSGS = 0x4
+ CAN_RAW_FD_FRAMES = 0x5
+ CAN_RAW_JOIN_FILTERS = 0x6
+)
+
+type WatchdogInfo struct {
+ Options uint32
+ Version uint32
+ Identity [32]uint8
+}
+
+type PPSFData struct {
+ Info PPSKInfo
+ Timeout PPSKTime
+}
+
+type PPSKParams struct {
+ Api_version int32
+ Mode int32
+ Assert_off_tu PPSKTime
+ Clear_off_tu PPSKTime
+}
+
+type PPSKTime struct {
+ Sec int64
+ Nsec int32
+ Flags uint32
+}
+
+const (
+ LWTUNNEL_ENCAP_NONE = 0x0
+ LWTUNNEL_ENCAP_MPLS = 0x1
+ LWTUNNEL_ENCAP_IP = 0x2
+ LWTUNNEL_ENCAP_ILA = 0x3
+ LWTUNNEL_ENCAP_IP6 = 0x4
+ LWTUNNEL_ENCAP_SEG6 = 0x5
+ LWTUNNEL_ENCAP_BPF = 0x6
+ LWTUNNEL_ENCAP_SEG6_LOCAL = 0x7
+ LWTUNNEL_ENCAP_RPL = 0x8
+ LWTUNNEL_ENCAP_MAX = 0x8
+
+ MPLS_IPTUNNEL_UNSPEC = 0x0
+ MPLS_IPTUNNEL_DST = 0x1
+ MPLS_IPTUNNEL_TTL = 0x2
+ MPLS_IPTUNNEL_MAX = 0x2
+)
+
+const (
+ ETHTOOL_ID_UNSPEC = 0x0
+ ETHTOOL_RX_COPYBREAK = 0x1
+ ETHTOOL_TX_COPYBREAK = 0x2
+ ETHTOOL_PFC_PREVENTION_TOUT = 0x3
+ ETHTOOL_TUNABLE_UNSPEC = 0x0
+ ETHTOOL_TUNABLE_U8 = 0x1
+ ETHTOOL_TUNABLE_U16 = 0x2
+ ETHTOOL_TUNABLE_U32 = 0x3
+ ETHTOOL_TUNABLE_U64 = 0x4
+ ETHTOOL_TUNABLE_STRING = 0x5
+ ETHTOOL_TUNABLE_S8 = 0x6
+ ETHTOOL_TUNABLE_S16 = 0x7
+ ETHTOOL_TUNABLE_S32 = 0x8
+ ETHTOOL_TUNABLE_S64 = 0x9
+ ETHTOOL_PHY_ID_UNSPEC = 0x0
+ ETHTOOL_PHY_DOWNSHIFT = 0x1
+ ETHTOOL_PHY_FAST_LINK_DOWN = 0x2
+ ETHTOOL_PHY_EDPD = 0x3
+ ETHTOOL_LINK_EXT_STATE_AUTONEG = 0x0
+ ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE = 0x1
+ ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH = 0x2
+ ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY = 0x3
+ ETHTOOL_LINK_EXT_STATE_NO_CABLE = 0x4
+ ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE = 0x5
+ ETHTOOL_LINK_EXT_STATE_EEPROM_ISSUE = 0x6
+ ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE = 0x7
+ ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED = 0x8
+ ETHTOOL_LINK_EXT_STATE_OVERHEAT = 0x9
+ ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED = 0x1
+ ETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED = 0x2
+ ETHTOOL_LINK_EXT_SUBSTATE_AN_NEXT_PAGE_EXCHANGE_FAILED = 0x3
+ ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED_FORCE_MODE = 0x4
+ ETHTOOL_LINK_EXT_SUBSTATE_AN_FEC_MISMATCH_DURING_OVERRIDE = 0x5
+ ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD = 0x6
+ ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED = 0x1
+ ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_INHIBIT_TIMEOUT = 0x2
+ ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_PARTNER_DID_NOT_SET_RECEIVER_READY = 0x3
+ ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT = 0x4
+ ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK = 0x1
+ ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_AM_LOCK = 0x2
+ ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_GET_ALIGN_STATUS = 0x3
+ ETHTOOL_LINK_EXT_SUBSTATE_LLM_FC_FEC_IS_NOT_LOCKED = 0x4
+ ETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED = 0x5
+ ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS = 0x1
+ ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE = 0x2
+ ETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE = 0x1
+ ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE = 0x2
+ ETHTOOL_FLASH_ALL_REGIONS = 0x0
+ ETHTOOL_F_UNSUPPORTED__BIT = 0x0
+ ETHTOOL_F_WISH__BIT = 0x1
+ ETHTOOL_F_COMPAT__BIT = 0x2
+ ETHTOOL_FEC_NONE_BIT = 0x0
+ ETHTOOL_FEC_AUTO_BIT = 0x1
+ ETHTOOL_FEC_OFF_BIT = 0x2
+ ETHTOOL_FEC_RS_BIT = 0x3
+ ETHTOOL_FEC_BASER_BIT = 0x4
+ ETHTOOL_FEC_LLRS_BIT = 0x5
+ ETHTOOL_LINK_MODE_10baseT_Half_BIT = 0x0
+ ETHTOOL_LINK_MODE_10baseT_Full_BIT = 0x1
+ ETHTOOL_LINK_MODE_100baseT_Half_BIT = 0x2
+ ETHTOOL_LINK_MODE_100baseT_Full_BIT = 0x3
+ ETHTOOL_LINK_MODE_1000baseT_Half_BIT = 0x4
+ ETHTOOL_LINK_MODE_1000baseT_Full_BIT = 0x5
+ ETHTOOL_LINK_MODE_Autoneg_BIT = 0x6
+ ETHTOOL_LINK_MODE_TP_BIT = 0x7
+ ETHTOOL_LINK_MODE_AUI_BIT = 0x8
+ ETHTOOL_LINK_MODE_MII_BIT = 0x9
+ ETHTOOL_LINK_MODE_FIBRE_BIT = 0xa
+ ETHTOOL_LINK_MODE_BNC_BIT = 0xb
+ ETHTOOL_LINK_MODE_10000baseT_Full_BIT = 0xc
+ ETHTOOL_LINK_MODE_Pause_BIT = 0xd
+ ETHTOOL_LINK_MODE_Asym_Pause_BIT = 0xe
+ ETHTOOL_LINK_MODE_2500baseX_Full_BIT = 0xf
+ ETHTOOL_LINK_MODE_Backplane_BIT = 0x10
+ ETHTOOL_LINK_MODE_1000baseKX_Full_BIT = 0x11
+ ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT = 0x12
+ ETHTOOL_LINK_MODE_10000baseKR_Full_BIT = 0x13
+ ETHTOOL_LINK_MODE_10000baseR_FEC_BIT = 0x14
+ ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT = 0x15
+ ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT = 0x16
+ ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT = 0x17
+ ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT = 0x18
+ ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT = 0x19
+ ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT = 0x1a
+ ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT = 0x1b
+ ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT = 0x1c
+ ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT = 0x1d
+ ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT = 0x1e
+ ETHTOOL_LINK_MODE_25000baseCR_Full_BIT = 0x1f
+ ETHTOOL_LINK_MODE_25000baseKR_Full_BIT = 0x20
+ ETHTOOL_LINK_MODE_25000baseSR_Full_BIT = 0x21
+ ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT = 0x22
+ ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT = 0x23
+ ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT = 0x24
+ ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT = 0x25
+ ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT = 0x26
+ ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT = 0x27
+ ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT = 0x28
+ ETHTOOL_LINK_MODE_1000baseX_Full_BIT = 0x29
+ ETHTOOL_LINK_MODE_10000baseCR_Full_BIT = 0x2a
+ ETHTOOL_LINK_MODE_10000baseSR_Full_BIT = 0x2b
+ ETHTOOL_LINK_MODE_10000baseLR_Full_BIT = 0x2c
+ ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT = 0x2d
+ ETHTOOL_LINK_MODE_10000baseER_Full_BIT = 0x2e
+ ETHTOOL_LINK_MODE_2500baseT_Full_BIT = 0x2f
+ ETHTOOL_LINK_MODE_5000baseT_Full_BIT = 0x30
+ ETHTOOL_LINK_MODE_FEC_NONE_BIT = 0x31
+ ETHTOOL_LINK_MODE_FEC_RS_BIT = 0x32
+ ETHTOOL_LINK_MODE_FEC_BASER_BIT = 0x33
+ ETHTOOL_LINK_MODE_50000baseKR_Full_BIT = 0x34
+ ETHTOOL_LINK_MODE_50000baseSR_Full_BIT = 0x35
+ ETHTOOL_LINK_MODE_50000baseCR_Full_BIT = 0x36
+ ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT = 0x37
+ ETHTOOL_LINK_MODE_50000baseDR_Full_BIT = 0x38
+ ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT = 0x39
+ ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT = 0x3a
+ ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT = 0x3b
+ ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT = 0x3c
+ ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT = 0x3d
+ ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT = 0x3e
+ ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT = 0x3f
+ ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT = 0x40
+ ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT = 0x41
+ ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT = 0x42
+ ETHTOOL_LINK_MODE_100baseT1_Full_BIT = 0x43
+ ETHTOOL_LINK_MODE_1000baseT1_Full_BIT = 0x44
+ ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT = 0x45
+ ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT = 0x46
+ ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT = 0x47
+ ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT = 0x48
+ ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT = 0x49
+ ETHTOOL_LINK_MODE_FEC_LLRS_BIT = 0x4a
+ ETHTOOL_LINK_MODE_100000baseKR_Full_BIT = 0x4b
+ ETHTOOL_LINK_MODE_100000baseSR_Full_BIT = 0x4c
+ ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT = 0x4d
+ ETHTOOL_LINK_MODE_100000baseCR_Full_BIT = 0x4e
+ ETHTOOL_LINK_MODE_100000baseDR_Full_BIT = 0x4f
+ ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT = 0x50
+ ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT = 0x51
+ ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT = 0x52
+ ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT = 0x53
+ ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT = 0x54
+ ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT = 0x55
+ ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT = 0x56
+ ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT = 0x57
+ ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT = 0x58
+ ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT = 0x59
+ ETHTOOL_LINK_MODE_100baseFX_Half_BIT = 0x5a
+ ETHTOOL_LINK_MODE_100baseFX_Full_BIT = 0x5b
+
+ ETHTOOL_MSG_USER_NONE = 0x0
+ ETHTOOL_MSG_STRSET_GET = 0x1
+ ETHTOOL_MSG_LINKINFO_GET = 0x2
+ ETHTOOL_MSG_LINKINFO_SET = 0x3
+ ETHTOOL_MSG_LINKMODES_GET = 0x4
+ ETHTOOL_MSG_LINKMODES_SET = 0x5
+ ETHTOOL_MSG_LINKSTATE_GET = 0x6
+ ETHTOOL_MSG_DEBUG_GET = 0x7
+ ETHTOOL_MSG_DEBUG_SET = 0x8
+ ETHTOOL_MSG_WOL_GET = 0x9
+ ETHTOOL_MSG_WOL_SET = 0xa
+ ETHTOOL_MSG_FEATURES_GET = 0xb
+ ETHTOOL_MSG_FEATURES_SET = 0xc
+ ETHTOOL_MSG_PRIVFLAGS_GET = 0xd
+ ETHTOOL_MSG_PRIVFLAGS_SET = 0xe
+ ETHTOOL_MSG_RINGS_GET = 0xf
+ ETHTOOL_MSG_RINGS_SET = 0x10
+ ETHTOOL_MSG_CHANNELS_GET = 0x11
+ ETHTOOL_MSG_CHANNELS_SET = 0x12
+ ETHTOOL_MSG_COALESCE_GET = 0x13
+ ETHTOOL_MSG_COALESCE_SET = 0x14
+ ETHTOOL_MSG_PAUSE_GET = 0x15
+ ETHTOOL_MSG_PAUSE_SET = 0x16
+ ETHTOOL_MSG_EEE_GET = 0x17
+ ETHTOOL_MSG_EEE_SET = 0x18
+ ETHTOOL_MSG_TSINFO_GET = 0x19
+ ETHTOOL_MSG_CABLE_TEST_ACT = 0x1a
+ ETHTOOL_MSG_CABLE_TEST_TDR_ACT = 0x1b
+ ETHTOOL_MSG_TUNNEL_INFO_GET = 0x1c
+ ETHTOOL_MSG_USER_MAX = 0x1c
+ ETHTOOL_MSG_KERNEL_NONE = 0x0
+ ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
+ ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
+ ETHTOOL_MSG_LINKINFO_NTF = 0x3
+ ETHTOOL_MSG_LINKMODES_GET_REPLY = 0x4
+ ETHTOOL_MSG_LINKMODES_NTF = 0x5
+ ETHTOOL_MSG_LINKSTATE_GET_REPLY = 0x6
+ ETHTOOL_MSG_DEBUG_GET_REPLY = 0x7
+ ETHTOOL_MSG_DEBUG_NTF = 0x8
+ ETHTOOL_MSG_WOL_GET_REPLY = 0x9
+ ETHTOOL_MSG_WOL_NTF = 0xa
+ ETHTOOL_MSG_FEATURES_GET_REPLY = 0xb
+ ETHTOOL_MSG_FEATURES_SET_REPLY = 0xc
+ ETHTOOL_MSG_FEATURES_NTF = 0xd
+ ETHTOOL_MSG_PRIVFLAGS_GET_REPLY = 0xe
+ ETHTOOL_MSG_PRIVFLAGS_NTF = 0xf
+ ETHTOOL_MSG_RINGS_GET_REPLY = 0x10
+ ETHTOOL_MSG_RINGS_NTF = 0x11
+ ETHTOOL_MSG_CHANNELS_GET_REPLY = 0x12
+ ETHTOOL_MSG_CHANNELS_NTF = 0x13
+ ETHTOOL_MSG_COALESCE_GET_REPLY = 0x14
+ ETHTOOL_MSG_COALESCE_NTF = 0x15
+ ETHTOOL_MSG_PAUSE_GET_REPLY = 0x16
+ ETHTOOL_MSG_PAUSE_NTF = 0x17
+ ETHTOOL_MSG_EEE_GET_REPLY = 0x18
+ ETHTOOL_MSG_EEE_NTF = 0x19
+ ETHTOOL_MSG_TSINFO_GET_REPLY = 0x1a
+ ETHTOOL_MSG_CABLE_TEST_NTF = 0x1b
+ ETHTOOL_MSG_CABLE_TEST_TDR_NTF = 0x1c
+ ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY = 0x1d
+ ETHTOOL_MSG_KERNEL_MAX = 0x1d
+ ETHTOOL_A_HEADER_UNSPEC = 0x0
+ ETHTOOL_A_HEADER_DEV_INDEX = 0x1
+ ETHTOOL_A_HEADER_DEV_NAME = 0x2
+ ETHTOOL_A_HEADER_FLAGS = 0x3
+ ETHTOOL_A_HEADER_MAX = 0x3
+ ETHTOOL_A_BITSET_BIT_UNSPEC = 0x0
+ ETHTOOL_A_BITSET_BIT_INDEX = 0x1
+ ETHTOOL_A_BITSET_BIT_NAME = 0x2
+ ETHTOOL_A_BITSET_BIT_VALUE = 0x3
+ ETHTOOL_A_BITSET_BIT_MAX = 0x3
+ ETHTOOL_A_BITSET_BITS_UNSPEC = 0x0
+ ETHTOOL_A_BITSET_BITS_BIT = 0x1
+ ETHTOOL_A_BITSET_BITS_MAX = 0x1
+ ETHTOOL_A_BITSET_UNSPEC = 0x0
+ ETHTOOL_A_BITSET_NOMASK = 0x1
+ ETHTOOL_A_BITSET_SIZE = 0x2
+ ETHTOOL_A_BITSET_BITS = 0x3
+ ETHTOOL_A_BITSET_VALUE = 0x4
+ ETHTOOL_A_BITSET_MASK = 0x5
+ ETHTOOL_A_BITSET_MAX = 0x5
+ ETHTOOL_A_STRING_UNSPEC = 0x0
+ ETHTOOL_A_STRING_INDEX = 0x1
+ ETHTOOL_A_STRING_VALUE = 0x2
+ ETHTOOL_A_STRING_MAX = 0x2
+ ETHTOOL_A_STRINGS_UNSPEC = 0x0
+ ETHTOOL_A_STRINGS_STRING = 0x1
+ ETHTOOL_A_STRINGS_MAX = 0x1
+ ETHTOOL_A_STRINGSET_UNSPEC = 0x0
+ ETHTOOL_A_STRINGSET_ID = 0x1
+ ETHTOOL_A_STRINGSET_COUNT = 0x2
+ ETHTOOL_A_STRINGSET_STRINGS = 0x3
+ ETHTOOL_A_STRINGSET_MAX = 0x3
+ ETHTOOL_A_STRINGSETS_UNSPEC = 0x0
+ ETHTOOL_A_STRINGSETS_STRINGSET = 0x1
+ ETHTOOL_A_STRINGSETS_MAX = 0x1
+ ETHTOOL_A_STRSET_UNSPEC = 0x0
+ ETHTOOL_A_STRSET_HEADER = 0x1
+ ETHTOOL_A_STRSET_STRINGSETS = 0x2
+ ETHTOOL_A_STRSET_COUNTS_ONLY = 0x3
+ ETHTOOL_A_STRSET_MAX = 0x3
+ ETHTOOL_A_LINKINFO_UNSPEC = 0x0
+ ETHTOOL_A_LINKINFO_HEADER = 0x1
+ ETHTOOL_A_LINKINFO_PORT = 0x2
+ ETHTOOL_A_LINKINFO_PHYADDR = 0x3
+ ETHTOOL_A_LINKINFO_TP_MDIX = 0x4
+ ETHTOOL_A_LINKINFO_TP_MDIX_CTRL = 0x5
+ ETHTOOL_A_LINKINFO_TRANSCEIVER = 0x6
+ ETHTOOL_A_LINKINFO_MAX = 0x6
+ ETHTOOL_A_LINKMODES_UNSPEC = 0x0
+ ETHTOOL_A_LINKMODES_HEADER = 0x1
+ ETHTOOL_A_LINKMODES_AUTONEG = 0x2
+ ETHTOOL_A_LINKMODES_OURS = 0x3
+ ETHTOOL_A_LINKMODES_PEER = 0x4
+ ETHTOOL_A_LINKMODES_SPEED = 0x5
+ ETHTOOL_A_LINKMODES_DUPLEX = 0x6
+ ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG = 0x7
+ ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE = 0x8
+ ETHTOOL_A_LINKMODES_MAX = 0x8
+ ETHTOOL_A_LINKSTATE_UNSPEC = 0x0
+ ETHTOOL_A_LINKSTATE_HEADER = 0x1
+ ETHTOOL_A_LINKSTATE_LINK = 0x2
+ ETHTOOL_A_LINKSTATE_SQI = 0x3
+ ETHTOOL_A_LINKSTATE_SQI_MAX = 0x4
+ ETHTOOL_A_LINKSTATE_EXT_STATE = 0x5
+ ETHTOOL_A_LINKSTATE_EXT_SUBSTATE = 0x6
+ ETHTOOL_A_LINKSTATE_MAX = 0x6
+ ETHTOOL_A_DEBUG_UNSPEC = 0x0
+ ETHTOOL_A_DEBUG_HEADER = 0x1
+ ETHTOOL_A_DEBUG_MSGMASK = 0x2
+ ETHTOOL_A_DEBUG_MAX = 0x2
+ ETHTOOL_A_WOL_UNSPEC = 0x0
+ ETHTOOL_A_WOL_HEADER = 0x1
+ ETHTOOL_A_WOL_MODES = 0x2
+ ETHTOOL_A_WOL_SOPASS = 0x3
+ ETHTOOL_A_WOL_MAX = 0x3
+ ETHTOOL_A_FEATURES_UNSPEC = 0x0
+ ETHTOOL_A_FEATURES_HEADER = 0x1
+ ETHTOOL_A_FEATURES_HW = 0x2
+ ETHTOOL_A_FEATURES_WANTED = 0x3
+ ETHTOOL_A_FEATURES_ACTIVE = 0x4
+ ETHTOOL_A_FEATURES_NOCHANGE = 0x5
+ ETHTOOL_A_FEATURES_MAX = 0x5
+ ETHTOOL_A_PRIVFLAGS_UNSPEC = 0x0
+ ETHTOOL_A_PRIVFLAGS_HEADER = 0x1
+ ETHTOOL_A_PRIVFLAGS_FLAGS = 0x2
+ ETHTOOL_A_PRIVFLAGS_MAX = 0x2
+ ETHTOOL_A_RINGS_UNSPEC = 0x0
+ ETHTOOL_A_RINGS_HEADER = 0x1
+ ETHTOOL_A_RINGS_RX_MAX = 0x2
+ ETHTOOL_A_RINGS_RX_MINI_MAX = 0x3
+ ETHTOOL_A_RINGS_RX_JUMBO_MAX = 0x4
+ ETHTOOL_A_RINGS_TX_MAX = 0x5
+ ETHTOOL_A_RINGS_RX = 0x6
+ ETHTOOL_A_RINGS_RX_MINI = 0x7
+ ETHTOOL_A_RINGS_RX_JUMBO = 0x8
+ ETHTOOL_A_RINGS_TX = 0x9
+ ETHTOOL_A_RINGS_MAX = 0x9
+ ETHTOOL_A_CHANNELS_UNSPEC = 0x0
+ ETHTOOL_A_CHANNELS_HEADER = 0x1
+ ETHTOOL_A_CHANNELS_RX_MAX = 0x2
+ ETHTOOL_A_CHANNELS_TX_MAX = 0x3
+ ETHTOOL_A_CHANNELS_OTHER_MAX = 0x4
+ ETHTOOL_A_CHANNELS_COMBINED_MAX = 0x5
+ ETHTOOL_A_CHANNELS_RX_COUNT = 0x6
+ ETHTOOL_A_CHANNELS_TX_COUNT = 0x7
+ ETHTOOL_A_CHANNELS_OTHER_COUNT = 0x8
+ ETHTOOL_A_CHANNELS_COMBINED_COUNT = 0x9
+ ETHTOOL_A_CHANNELS_MAX = 0x9
+ ETHTOOL_A_COALESCE_UNSPEC = 0x0
+ ETHTOOL_A_COALESCE_HEADER = 0x1
+ ETHTOOL_A_COALESCE_RX_USECS = 0x2
+ ETHTOOL_A_COALESCE_RX_MAX_FRAMES = 0x3
+ ETHTOOL_A_COALESCE_RX_USECS_IRQ = 0x4
+ ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ = 0x5
+ ETHTOOL_A_COALESCE_TX_USECS = 0x6
+ ETHTOOL_A_COALESCE_TX_MAX_FRAMES = 0x7
+ ETHTOOL_A_COALESCE_TX_USECS_IRQ = 0x8
+ ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ = 0x9
+ ETHTOOL_A_COALESCE_STATS_BLOCK_USECS = 0xa
+ ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX = 0xb
+ ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX = 0xc
+ ETHTOOL_A_COALESCE_PKT_RATE_LOW = 0xd
+ ETHTOOL_A_COALESCE_RX_USECS_LOW = 0xe
+ ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW = 0xf
+ ETHTOOL_A_COALESCE_TX_USECS_LOW = 0x10
+ ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW = 0x11
+ ETHTOOL_A_COALESCE_PKT_RATE_HIGH = 0x12
+ ETHTOOL_A_COALESCE_RX_USECS_HIGH = 0x13
+ ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH = 0x14
+ ETHTOOL_A_COALESCE_TX_USECS_HIGH = 0x15
+ ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH = 0x16
+ ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = 0x17
+ ETHTOOL_A_COALESCE_MAX = 0x17
+ ETHTOOL_A_PAUSE_UNSPEC = 0x0
+ ETHTOOL_A_PAUSE_HEADER = 0x1
+ ETHTOOL_A_PAUSE_AUTONEG = 0x2
+ ETHTOOL_A_PAUSE_RX = 0x3
+ ETHTOOL_A_PAUSE_TX = 0x4
+ ETHTOOL_A_PAUSE_STATS = 0x5
+ ETHTOOL_A_PAUSE_MAX = 0x5
+ ETHTOOL_A_PAUSE_STAT_UNSPEC = 0x0
+ ETHTOOL_A_PAUSE_STAT_PAD = 0x1
+ ETHTOOL_A_PAUSE_STAT_TX_FRAMES = 0x2
+ ETHTOOL_A_PAUSE_STAT_RX_FRAMES = 0x3
+ ETHTOOL_A_PAUSE_STAT_MAX = 0x3
+ ETHTOOL_A_EEE_UNSPEC = 0x0
+ ETHTOOL_A_EEE_HEADER = 0x1
+ ETHTOOL_A_EEE_MODES_OURS = 0x2
+ ETHTOOL_A_EEE_MODES_PEER = 0x3
+ ETHTOOL_A_EEE_ACTIVE = 0x4
+ ETHTOOL_A_EEE_ENABLED = 0x5
+ ETHTOOL_A_EEE_TX_LPI_ENABLED = 0x6
+ ETHTOOL_A_EEE_TX_LPI_TIMER = 0x7
+ ETHTOOL_A_EEE_MAX = 0x7
+ ETHTOOL_A_TSINFO_UNSPEC = 0x0
+ ETHTOOL_A_TSINFO_HEADER = 0x1
+ ETHTOOL_A_TSINFO_TIMESTAMPING = 0x2
+ ETHTOOL_A_TSINFO_TX_TYPES = 0x3
+ ETHTOOL_A_TSINFO_RX_FILTERS = 0x4
+ ETHTOOL_A_TSINFO_PHC_INDEX = 0x5
+ ETHTOOL_A_TSINFO_MAX = 0x5
+ ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TEST_HEADER = 0x1
+ ETHTOOL_A_CABLE_TEST_MAX = 0x1
+ ETHTOOL_A_CABLE_RESULT_CODE_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_RESULT_CODE_OK = 0x1
+ ETHTOOL_A_CABLE_RESULT_CODE_OPEN = 0x2
+ ETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT = 0x3
+ ETHTOOL_A_CABLE_RESULT_CODE_CROSS_SHORT = 0x4
+ ETHTOOL_A_CABLE_PAIR_A = 0x0
+ ETHTOOL_A_CABLE_PAIR_B = 0x1
+ ETHTOOL_A_CABLE_PAIR_C = 0x2
+ ETHTOOL_A_CABLE_PAIR_D = 0x3
+ ETHTOOL_A_CABLE_RESULT_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_RESULT_PAIR = 0x1
+ ETHTOOL_A_CABLE_RESULT_CODE = 0x2
+ ETHTOOL_A_CABLE_RESULT_MAX = 0x2
+ ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR = 0x1
+ ETHTOOL_A_CABLE_FAULT_LENGTH_CM = 0x2
+ ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = 0x2
+ ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED = 0x1
+ ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED = 0x2
+ ETHTOOL_A_CABLE_NEST_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_NEST_RESULT = 0x1
+ ETHTOOL_A_CABLE_NEST_FAULT_LENGTH = 0x2
+ ETHTOOL_A_CABLE_NEST_MAX = 0x2
+ ETHTOOL_A_CABLE_TEST_NTF_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TEST_NTF_HEADER = 0x1
+ ETHTOOL_A_CABLE_TEST_NTF_STATUS = 0x2
+ ETHTOOL_A_CABLE_TEST_NTF_NEST = 0x3
+ ETHTOOL_A_CABLE_TEST_NTF_MAX = 0x3
+ ETHTOOL_A_CABLE_TEST_TDR_CFG_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST = 0x1
+ ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST = 0x2
+ ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP = 0x3
+ ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR = 0x4
+ ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX = 0x4
+ ETHTOOL_A_CABLE_TEST_TDR_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TEST_TDR_HEADER = 0x1
+ ETHTOOL_A_CABLE_TEST_TDR_CFG = 0x2
+ ETHTOOL_A_CABLE_TEST_TDR_MAX = 0x2
+ ETHTOOL_A_CABLE_AMPLITUDE_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 0x1
+ ETHTOOL_A_CABLE_AMPLITUDE_mV = 0x2
+ ETHTOOL_A_CABLE_AMPLITUDE_MAX = 0x2
+ ETHTOOL_A_CABLE_PULSE_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_PULSE_mV = 0x1
+ ETHTOOL_A_CABLE_PULSE_MAX = 0x1
+ ETHTOOL_A_CABLE_STEP_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE = 0x1
+ ETHTOOL_A_CABLE_STEP_LAST_DISTANCE = 0x2
+ ETHTOOL_A_CABLE_STEP_STEP_DISTANCE = 0x3
+ ETHTOOL_A_CABLE_STEP_MAX = 0x3
+ ETHTOOL_A_CABLE_TDR_NEST_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TDR_NEST_STEP = 0x1
+ ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE = 0x2
+ ETHTOOL_A_CABLE_TDR_NEST_PULSE = 0x3
+ ETHTOOL_A_CABLE_TDR_NEST_MAX = 0x3
+ ETHTOOL_A_CABLE_TEST_TDR_NTF_UNSPEC = 0x0
+ ETHTOOL_A_CABLE_TEST_TDR_NTF_HEADER = 0x1
+ ETHTOOL_A_CABLE_TEST_TDR_NTF_STATUS = 0x2
+ ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST = 0x3
+ ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = 0x3
+ ETHTOOL_UDP_TUNNEL_TYPE_VXLAN = 0x0
+ ETHTOOL_UDP_TUNNEL_TYPE_GENEVE = 0x1
+ ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE = 0x2
+ ETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC = 0x0
+ ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT = 0x1
+ ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE = 0x2
+ ETHTOOL_A_TUNNEL_UDP_ENTRY_MAX = 0x2
+ ETHTOOL_A_TUNNEL_UDP_TABLE_UNSPEC = 0x0
+ ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE = 0x1
+ ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES = 0x2
+ ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY = 0x3
+ ETHTOOL_A_TUNNEL_UDP_TABLE_MAX = 0x3
+ ETHTOOL_A_TUNNEL_UDP_UNSPEC = 0x0
+ ETHTOOL_A_TUNNEL_UDP_TABLE = 0x1
+ ETHTOOL_A_TUNNEL_UDP_MAX = 0x1
+ ETHTOOL_A_TUNNEL_INFO_UNSPEC = 0x0
+ ETHTOOL_A_TUNNEL_INFO_HEADER = 0x1
+ ETHTOOL_A_TUNNEL_INFO_UDP_PORTS = 0x2
+ ETHTOOL_A_TUNNEL_INFO_MAX = 0x2
+)
+
+type EthtoolDrvinfo struct {
+ Cmd uint32
+ Driver [32]byte
+ Version [32]byte
+ Fw_version [32]byte
+ Bus_info [32]byte
+ Erom_version [32]byte
+ Reserved2 [12]byte
+ N_priv_flags uint32
+ N_stats uint32
+ Testinfo_len uint32
+ Eedump_len uint32
+ Regdump_len uint32
+}
+
+type (
+ HIDRawReportDescriptor struct {
+ Size uint32
+ Value [4096]uint8
+ }
+ HIDRawDevInfo struct {
+ Bustype uint32
+ Vendor int16
+ Product int16
+ }
+)
+
+const (
+ CLOSE_RANGE_UNSHARE = 0x2
+ CLOSE_RANGE_CLOEXEC = 0x4
+)
+
+const (
+ NLMSGERR_ATTR_MSG = 0x1
+ NLMSGERR_ATTR_OFFS = 0x2
+ NLMSGERR_ATTR_COOKIE = 0x3
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index d808958..4d4d283 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && linux
// +build 386,linux
package unix
const (
- SizeofPtr = 0x4
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x4
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x4
+ SizeofLong = 0x4
)
type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
+ _C_long int32
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int32
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
_ uint16
@@ -114,36 +101,6 @@ type Stat_t struct {
Ino uint64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -153,10 +110,6 @@ type Dirent struct {
_ [1]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -165,182 +118,16 @@ type Flock_t struct {
Pid int32
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
-}
-
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -351,41 +138,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint32
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -402,383 +159,16 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x35
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofIovec = 0x8
+ SizeofMsghdr = 0x1c
+ SizeofCmsghdr = 0xc
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x8
+ SizeofSockFprog = 0x8
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Ebx int32
Ecx int32
@@ -820,15 +210,6 @@ type Sysinfo_t struct {
_ [8]int8
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint32
@@ -843,35 +224,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -880,33 +233,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -918,13 +244,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -974,279 +293,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint32
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x20
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_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_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x20
)
const (
@@ -1322,22 +375,6 @@ type SockaddrStorage struct {
_ uint32
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1345,88 +382,6 @@ type HDGeometry struct {
Start uint32
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int32
Bsize int32
@@ -1442,18 +397,6 @@ type Statfs_t struct {
Spare [4]int32
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint32
Len uint32
@@ -1464,589 +407,10 @@ type TpacketHdr struct {
Usec uint32
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x18
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x18
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2057,13 +421,6 @@ type RTCPLLInfo struct {
Clock int32
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2073,33 +430,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x1269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x1269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2108,135 +441,6 @@ type XDPUmemReg struct {
Flags uint32
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2367,218 +571,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint16
@@ -2593,38 +585,6 @@ type LoopInfo struct {
Init [2]uint32
Reserved [4]int8
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2633,21 +593,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2659,150 +604,17 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
-
-const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+}
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x8c
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ PPS_GETPARAMS = 0x800470a1
+ PPS_SETPARAMS = 0x400470a2
+ PPS_GETCAP = 0x800470a3
+ PPS_FETCH = 0xc00470a4
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index 88c7639..8a2eed5 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && linux
// +build amd64,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
Ino uint64
@@ -113,36 +100,6 @@ type Stat_t struct {
_ [3]int64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -152,10 +109,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -165,182 +118,18 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
-}
-
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -351,41 +140,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -403,383 +162,16 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x35
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofSockFprog = 0x10
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
R15 uint64
R14 uint64
@@ -832,15 +224,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -856,35 +239,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -893,33 +248,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -931,13 +259,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -985,279 +306,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_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_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1333,22 +388,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1356,88 +395,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1453,18 +410,6 @@ type Statfs_t struct {
Spare [4]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1476,589 +421,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x20
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2069,13 +435,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2086,33 +445,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x1269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x1269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2122,135 +457,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2381,218 +587,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint64
@@ -2608,38 +602,6 @@ type LoopInfo struct {
Reserved [4]int8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2648,21 +610,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2674,150 +621,18 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
-
-const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x8c
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ PPS_GETPARAMS = 0x800870a1
+ PPS_SETPARAMS = 0x400870a2
+ PPS_GETCAP = 0x800870a3
+ PPS_FETCH = 0xc00870a4
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index 0c0f24c..94b34ad 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && linux
// +build arm,linux
package unix
const (
- SizeofPtr = 0x4
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x4
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x4
+ SizeofLong = 0x4
)
type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
+ _C_long int32
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int32
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
_ uint16
@@ -116,36 +103,6 @@ type Stat_t struct {
Ino uint64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -155,10 +112,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -169,182 +122,18 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
-}
-
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -355,41 +144,11 @@ type RawSockaddrAny struct {
Pad [96]uint8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint32
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -406,383 +165,16 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x35
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofIovec = 0x8
+ SizeofMsghdr = 0x1c
+ SizeofCmsghdr = 0xc
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x8
+ SizeofSockFprog = 0x8
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Uregs [18]uint32
}
@@ -808,15 +200,6 @@ type Sysinfo_t struct {
_ [8]uint8
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint32
@@ -832,35 +215,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -869,33 +224,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -907,13 +235,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -963,279 +284,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint32
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x20
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_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_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x20
)
const (
@@ -1311,22 +366,6 @@ type SockaddrStorage struct {
_ uint32
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1334,88 +373,6 @@ type HDGeometry struct {
Start uint32
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int32
Bsize int32
@@ -1432,18 +389,6 @@ type Statfs_t struct {
_ [4]byte
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint32
Len uint32
@@ -1454,589 +399,10 @@ type TpacketHdr struct {
Usec uint32
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x18
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x18
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2047,13 +413,6 @@ type RTCPLLInfo struct {
Clock int32
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2064,33 +423,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x1269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x1269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2100,135 +435,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]uint8
Driver_name [64]uint8
@@ -2359,218 +565,6 @@ type CryptoReportAcomp struct {
Type [64]uint8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint16
@@ -2585,38 +579,6 @@ type LoopInfo struct {
Init [2]uint32
Reserved [4]uint8
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2625,21 +587,6 @@ type TIPCSubscr struct {
Handle [8]uint8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2651,150 +598,18 @@ type TIPCSIOCNodeIDReq struct {
Id [16]uint8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
-
-const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x8c
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ PPS_GETPARAMS = 0x800470a1
+ PPS_SETPARAMS = 0x400470a2
+ PPS_GETCAP = 0x800470a3
+ PPS_FETCH = 0xc00470a4
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index 6065d2d..2143de4 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && linux
// +build arm64,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
Ino uint64
@@ -114,36 +101,6 @@ type Stat_t struct {
_ [2]int32
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -153,10 +110,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -166,182 +119,18 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
-}
-
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -352,41 +141,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -404,383 +163,16 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x35
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Regs [31]uint64
Sp uint64
@@ -810,15 +202,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -835,35 +218,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -872,33 +227,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -910,13 +238,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -964,279 +285,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_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_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1312,22 +367,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1335,88 +374,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1432,18 +389,6 @@ type Statfs_t struct {
Spare [4]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1455,589 +400,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
-const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
-)
-
const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
+ SizeofTpacketHdr = 0x20
)
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2048,13 +414,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2065,33 +424,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x1269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
-)
-
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
+ BLKPG = 0x1269
)
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2101,135 +436,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2360,218 +566,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2587,38 +581,6 @@ type LoopInfo struct {
Reserved [4]int8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2627,21 +589,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2653,150 +600,18 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
-
-const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x8c
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ PPS_GETPARAMS = 0x800870a1
+ PPS_SETPARAMS = 0x400870a2
+ PPS_GETCAP = 0x800870a3
+ PPS_FETCH = 0xc00870a4
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index 29d4408..a40216e 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips && linux
// +build mips,linux
package unix
const (
- SizeofPtr = 0x4
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x4
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x4
+ SizeofLong = 0x4
)
type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
+ _C_long int32
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int32
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint32
Pad1 [3]int32
@@ -115,36 +102,6 @@ type Stat_t struct {
Pad5 [14]int32
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -154,10 +111,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -168,182 +121,18 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
-}
-
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -354,41 +143,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint32
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -405,383 +164,16 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x35
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofIovec = 0x8
+ SizeofMsghdr = 0x1c
+ SizeofCmsghdr = 0xc
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x8
+ SizeofSockFprog = 0x8
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Regs [32]uint64
Lo uint64
@@ -813,15 +205,6 @@ type Sysinfo_t struct {
_ [8]int8
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint32
@@ -837,35 +220,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -874,33 +229,6 @@ type Sigset_t struct {
const _C__NSIG = 0x80
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -912,13 +240,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -968,279 +289,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint32
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x20
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_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_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x20
)
const (
@@ -1316,22 +371,6 @@ type SockaddrStorage struct {
_ uint32
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1339,88 +378,6 @@ type HDGeometry struct {
Start uint32
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int32
Bsize int32
@@ -1438,18 +395,6 @@ type Statfs_t struct {
_ [4]byte
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint32
Len uint32
@@ -1460,589 +405,10 @@ type TpacketHdr struct {
Usec uint32
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x18
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x18
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2053,13 +419,6 @@ type RTCPLLInfo struct {
Clock int32
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2070,33 +429,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x20001269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2106,135 +441,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2365,218 +571,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2591,38 +585,6 @@ type LoopInfo struct {
Init [2]uint32
Reserved [4]int8
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2631,21 +593,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2657,150 +604,18 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
-
-const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x8c
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ PPS_GETPARAMS = 0x400470a1
+ PPS_SETPARAMS = 0x800470a2
+ PPS_GETCAP = 0x400470a3
+ PPS_FETCH = 0xc00470a4
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index 9cac9ff..e834b06 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips64 && linux
// +build mips64,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint32
Pad1 [3]uint32
@@ -114,36 +101,6 @@ type Stat_t struct {
Blocks int64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -153,10 +110,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -166,182 +119,18 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
-}
-
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -352,41 +141,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -404,383 +163,16 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x35
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Regs [32]uint64
Lo uint64
@@ -813,15 +205,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -838,35 +221,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -875,33 +230,6 @@ type Sigset_t struct {
const _C__NSIG = 0x80
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -913,13 +241,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -967,279 +288,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_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_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1315,22 +370,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1338,88 +377,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1435,18 +392,6 @@ type Statfs_t struct {
Spare [5]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1458,589 +403,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
-const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
-)
-
const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
+ SizeofTpacketHdr = 0x20
)
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2051,13 +417,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2068,33 +427,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
-)
-
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
+ BLKPG = 0x20001269
)
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2104,135 +439,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2363,218 +569,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2590,38 +584,6 @@ type LoopInfo struct {
Reserved [4]int8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2630,21 +592,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2656,150 +603,18 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
-
-const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x8c
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ PPS_GETPARAMS = 0x400870a1
+ PPS_SETPARAMS = 0x800870a2
+ PPS_GETCAP = 0x400870a3
+ PPS_FETCH = 0xc00870a4
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index dbc21cf..e31083b 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mips64le && linux
// +build mips64le,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint32
Pad1 [3]uint32
@@ -114,36 +101,6 @@ type Stat_t struct {
Blocks int64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -153,10 +110,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -166,182 +119,18 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
-}
-
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -352,41 +141,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -404,383 +163,16 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x35
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Regs [32]uint64
Lo uint64
@@ -813,15 +205,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -838,35 +221,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -875,33 +230,6 @@ type Sigset_t struct {
const _C__NSIG = 0x80
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -913,13 +241,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -967,279 +288,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_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_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1315,22 +370,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1338,88 +377,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1435,18 +392,6 @@ type Statfs_t struct {
Spare [5]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1458,589 +403,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
-const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
-)
-
const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
+ SizeofTpacketHdr = 0x20
)
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2051,13 +417,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2068,33 +427,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
-)
-
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
+ BLKPG = 0x20001269
)
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2104,135 +439,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2363,218 +569,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2590,38 +584,6 @@ type LoopInfo struct {
Reserved [4]int8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2630,21 +592,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2656,150 +603,18 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
-
-const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x8c
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ PPS_GETPARAMS = 0x400870a1
+ PPS_SETPARAMS = 0x800870a2
+ PPS_GETCAP = 0x400870a3
+ PPS_FETCH = 0xc00870a4
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index a266237..42811f7 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build mipsle && linux
// +build mipsle,linux
package unix
const (
- SizeofPtr = 0x4
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x4
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x4
+ SizeofLong = 0x4
)
type (
- _C_short int16
- _C_int int32
- _C_long int32
- _C_long_long int64
+ _C_long int32
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int32
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint32
Pad1 [3]int32
@@ -115,36 +102,6 @@ type Stat_t struct {
Pad5 [14]int32
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -154,10 +111,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -168,182 +121,18 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
-}
-
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -354,41 +143,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint32
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -405,383 +164,16 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x8
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x1c
- SizeofCmsghdr = 0xc
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x35
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofIovec = 0x8
+ SizeofMsghdr = 0x1c
+ SizeofCmsghdr = 0xc
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x8
+ SizeofSockFprog = 0x8
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Regs [32]uint64
Lo uint64
@@ -813,15 +205,6 @@ type Sysinfo_t struct {
_ [8]int8
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint32
@@ -837,35 +220,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -874,33 +229,6 @@ type Sigset_t struct {
const _C__NSIG = 0x80
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -912,13 +240,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -968,279 +289,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint32
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x20
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_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_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x20
)
const (
@@ -1316,22 +371,6 @@ type SockaddrStorage struct {
_ uint32
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1339,88 +378,6 @@ type HDGeometry struct {
Start uint32
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int32
Bsize int32
@@ -1438,18 +395,6 @@ type Statfs_t struct {
_ [4]byte
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint32
Len uint32
@@ -1460,589 +405,10 @@ type TpacketHdr struct {
Usec uint32
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x18
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x18
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2053,13 +419,6 @@ type RTCPLLInfo struct {
Clock int32
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2070,33 +429,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x20001269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2106,135 +441,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2365,218 +571,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2591,38 +585,6 @@ type LoopInfo struct {
Init [2]uint32
Reserved [4]int8
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2631,21 +593,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2657,150 +604,18 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
-
-const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x8c
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ PPS_GETPARAMS = 0x400470a1
+ PPS_SETPARAMS = 0x800470a2
+ PPS_GETCAP = 0x400470a3
+ PPS_FETCH = 0xc00470a4
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
new file mode 100644
index 0000000..af7a720
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
@@ -0,0 +1,627 @@
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build ppc && linux
+// +build ppc,linux
+
+package unix
+
+const (
+ SizeofPtr = 0x4
+ SizeofLong = 0x4
+)
+
+type (
+ _C_long int32
+)
+
+type Timespec struct {
+ Sec int32
+ Nsec int32
+}
+
+type Timeval struct {
+ Sec int32
+ Usec int32
+}
+
+type Timex struct {
+ Modes uint32
+ Offset int32
+ Freq int32
+ Maxerror int32
+ Esterror int32
+ Status int32
+ Constant int32
+ Precision int32
+ Tolerance int32
+ Time Timeval
+ Tick int32
+ Ppsfreq int32
+ Jitter int32
+ Shift int32
+ Stabil int32
+ Jitcnt int32
+ Calcnt int32
+ Errcnt int32
+ Stbcnt int32
+ Tai int32
+ _ [44]byte
+}
+
+type Time_t int32
+
+type Tms struct {
+ Utime int32
+ Stime int32
+ Cutime int32
+ Cstime int32
+}
+
+type Utimbuf struct {
+ Actime int32
+ Modtime int32
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int32
+ Ixrss int32
+ Idrss int32
+ Isrss int32
+ Minflt int32
+ Majflt int32
+ Nswap int32
+ Inblock int32
+ Oublock int32
+ Msgsnd int32
+ Msgrcv int32
+ Nsignals int32
+ Nvcsw int32
+ Nivcsw int32
+}
+
+type Stat_t struct {
+ Dev uint64
+ Ino uint64
+ Mode uint32
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Rdev uint64
+ _ uint16
+ _ [4]byte
+ Size int64
+ Blksize int32
+ _ [4]byte
+ Blocks int64
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ _ uint32
+ _ uint32
+}
+
+type Dirent struct {
+ Ino uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Name [256]uint8
+ _ [5]byte
+}
+
+type Flock_t struct {
+ Type int16
+ Whence int16
+ _ [4]byte
+ Start int64
+ Len int64
+ Pid int32
+ _ [4]byte
+}
+
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
+}
+
+const (
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
+)
+
+type RawSockaddr struct {
+ Family uint16
+ Data [14]uint8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ Pad [96]uint8
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type Msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *Iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type Cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+const (
+ SizeofIovec = 0x8
+ SizeofMsghdr = 0x1c
+ SizeofCmsghdr = 0xc
+)
+
+const (
+ SizeofSockFprog = 0x8
+)
+
+type PtraceRegs struct {
+ Gpr [32]uint32
+ Nip uint32
+ Msr uint32
+ Orig_gpr3 uint32
+ Ctr uint32
+ Link uint32
+ Xer uint32
+ Ccr uint32
+ Mq uint32
+ Trap uint32
+ Dar uint32
+ Dsisr uint32
+ Result uint32
+}
+
+type FdSet struct {
+ Bits [32]int32
+}
+
+type Sysinfo_t struct {
+ Uptime int32
+ Loads [3]uint32
+ Totalram uint32
+ Freeram uint32
+ Sharedram uint32
+ Bufferram uint32
+ Totalswap uint32
+ Freeswap uint32
+ Procs uint16
+ Pad uint16
+ Totalhigh uint32
+ Freehigh uint32
+ Unit uint32
+ _ [8]uint8
+}
+
+type Ustat_t struct {
+ Tfree int32
+ Tinode uint32
+ Fname [6]uint8
+ Fpack [6]uint8
+}
+
+type EpollEvent struct {
+ Events uint32
+ _ int32
+ Fd int32
+ Pad int32
+}
+
+const (
+ POLLRDHUP = 0x2000
+)
+
+type Sigset_t struct {
+ Val [32]uint32
+}
+
+const _C__NSIG = 0x41
+
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [19]uint8
+ Line uint8
+ Ispeed uint32
+ Ospeed uint32
+}
+
+type Taskstats struct {
+ Version uint16
+ Ac_exitcode uint32
+ Ac_flag uint8
+ Ac_nice uint8
+ _ [4]byte
+ Cpu_count uint64
+ Cpu_delay_total uint64
+ Blkio_count uint64
+ Blkio_delay_total uint64
+ Swapin_count uint64
+ Swapin_delay_total uint64
+ Cpu_run_real_total uint64
+ Cpu_run_virtual_total uint64
+ Ac_comm [32]uint8
+ Ac_sched uint8
+ Ac_pad [3]uint8
+ _ [4]byte
+ Ac_uid uint32
+ Ac_gid uint32
+ Ac_pid uint32
+ Ac_ppid uint32
+ Ac_btime uint32
+ _ [4]byte
+ Ac_etime uint64
+ Ac_utime uint64
+ Ac_stime uint64
+ Ac_minflt uint64
+ Ac_majflt uint64
+ Coremem uint64
+ Virtmem uint64
+ Hiwater_rss uint64
+ Hiwater_vm uint64
+ Read_char uint64
+ Write_char uint64
+ Read_syscalls uint64
+ Write_syscalls uint64
+ Read_bytes uint64
+ Write_bytes uint64
+ Cancelled_write_bytes uint64
+ Nvcsw uint64
+ Nivcsw uint64
+ Ac_utimescaled uint64
+ Ac_stimescaled uint64
+ Cpu_scaled_run_real_total uint64
+ Freepages_count uint64
+ Freepages_delay_total uint64
+ Thrashing_count uint64
+ Thrashing_delay_total uint64
+ Ac_btime64 uint64
+}
+
+type cpuMask uint32
+
+const (
+ _NCPUBITS = 0x20
+)
+
+const (
+ CBitFieldMaskBit0 = 0x8000000000000000
+ CBitFieldMaskBit1 = 0x4000000000000000
+ CBitFieldMaskBit2 = 0x2000000000000000
+ CBitFieldMaskBit3 = 0x1000000000000000
+ CBitFieldMaskBit4 = 0x800000000000000
+ CBitFieldMaskBit5 = 0x400000000000000
+ CBitFieldMaskBit6 = 0x200000000000000
+ CBitFieldMaskBit7 = 0x100000000000000
+ CBitFieldMaskBit8 = 0x80000000000000
+ CBitFieldMaskBit9 = 0x40000000000000
+ CBitFieldMaskBit10 = 0x20000000000000
+ CBitFieldMaskBit11 = 0x10000000000000
+ CBitFieldMaskBit12 = 0x8000000000000
+ CBitFieldMaskBit13 = 0x4000000000000
+ CBitFieldMaskBit14 = 0x2000000000000
+ CBitFieldMaskBit15 = 0x1000000000000
+ CBitFieldMaskBit16 = 0x800000000000
+ CBitFieldMaskBit17 = 0x400000000000
+ CBitFieldMaskBit18 = 0x200000000000
+ CBitFieldMaskBit19 = 0x100000000000
+ CBitFieldMaskBit20 = 0x80000000000
+ CBitFieldMaskBit21 = 0x40000000000
+ CBitFieldMaskBit22 = 0x20000000000
+ CBitFieldMaskBit23 = 0x10000000000
+ CBitFieldMaskBit24 = 0x8000000000
+ CBitFieldMaskBit25 = 0x4000000000
+ CBitFieldMaskBit26 = 0x2000000000
+ CBitFieldMaskBit27 = 0x1000000000
+ CBitFieldMaskBit28 = 0x800000000
+ CBitFieldMaskBit29 = 0x400000000
+ CBitFieldMaskBit30 = 0x200000000
+ CBitFieldMaskBit31 = 0x100000000
+ CBitFieldMaskBit32 = 0x80000000
+ CBitFieldMaskBit33 = 0x40000000
+ CBitFieldMaskBit34 = 0x20000000
+ CBitFieldMaskBit35 = 0x10000000
+ CBitFieldMaskBit36 = 0x8000000
+ CBitFieldMaskBit37 = 0x4000000
+ CBitFieldMaskBit38 = 0x2000000
+ CBitFieldMaskBit39 = 0x1000000
+ CBitFieldMaskBit40 = 0x800000
+ CBitFieldMaskBit41 = 0x400000
+ CBitFieldMaskBit42 = 0x200000
+ CBitFieldMaskBit43 = 0x100000
+ CBitFieldMaskBit44 = 0x80000
+ CBitFieldMaskBit45 = 0x40000
+ CBitFieldMaskBit46 = 0x20000
+ CBitFieldMaskBit47 = 0x10000
+ CBitFieldMaskBit48 = 0x8000
+ CBitFieldMaskBit49 = 0x4000
+ CBitFieldMaskBit50 = 0x2000
+ CBitFieldMaskBit51 = 0x1000
+ CBitFieldMaskBit52 = 0x800
+ CBitFieldMaskBit53 = 0x400
+ CBitFieldMaskBit54 = 0x200
+ CBitFieldMaskBit55 = 0x100
+ CBitFieldMaskBit56 = 0x80
+ CBitFieldMaskBit57 = 0x40
+ CBitFieldMaskBit58 = 0x20
+ CBitFieldMaskBit59 = 0x10
+ CBitFieldMaskBit60 = 0x8
+ CBitFieldMaskBit61 = 0x4
+ CBitFieldMaskBit62 = 0x2
+ CBitFieldMaskBit63 = 0x1
+)
+
+type SockaddrStorage struct {
+ Family uint16
+ _ [122]uint8
+ _ uint32
+}
+
+type HDGeometry struct {
+ Heads uint8
+ Sectors uint8
+ Cylinders uint16
+ Start uint32
+}
+
+type Statfs_t struct {
+ Type int32
+ Bsize int32
+ Blocks uint64
+ Bfree uint64
+ Bavail uint64
+ Files uint64
+ Ffree uint64
+ Fsid Fsid
+ Namelen int32
+ Frsize int32
+ Flags int32
+ Spare [4]int32
+ _ [4]byte
+}
+
+type TpacketHdr struct {
+ Status uint32
+ Len uint32
+ Snaplen uint32
+ Mac uint16
+ Net uint16
+ Sec uint32
+ Usec uint32
+}
+
+const (
+ SizeofTpacketHdr = 0x18
+)
+
+type RTCPLLInfo struct {
+ Ctrl int32
+ Value int32
+ Max int32
+ Min int32
+ Posmult int32
+ Negmult int32
+ Clock int32
+}
+
+type BlkpgPartition struct {
+ Start int64
+ Length int64
+ Pno int32
+ Devname [64]uint8
+ Volname [64]uint8
+ _ [4]byte
+}
+
+const (
+ BLKPG = 0x20001269
+)
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+ Flags uint32
+ _ [4]byte
+}
+
+type CryptoUserAlg struct {
+ Name [64]uint8
+ Driver_name [64]uint8
+ Module_name [64]uint8
+ Type uint32
+ Mask uint32
+ Refcnt uint32
+ Flags uint32
+}
+
+type CryptoStatAEAD struct {
+ Type [64]uint8
+ Encrypt_cnt uint64
+ Encrypt_tlen uint64
+ Decrypt_cnt uint64
+ Decrypt_tlen uint64
+ Err_cnt uint64
+}
+
+type CryptoStatAKCipher struct {
+ Type [64]uint8
+ Encrypt_cnt uint64
+ Encrypt_tlen uint64
+ Decrypt_cnt uint64
+ Decrypt_tlen uint64
+ Verify_cnt uint64
+ Sign_cnt uint64
+ Err_cnt uint64
+}
+
+type CryptoStatCipher struct {
+ Type [64]uint8
+ Encrypt_cnt uint64
+ Encrypt_tlen uint64
+ Decrypt_cnt uint64
+ Decrypt_tlen uint64
+ Err_cnt uint64
+}
+
+type CryptoStatCompress struct {
+ Type [64]uint8
+ Compress_cnt uint64
+ Compress_tlen uint64
+ Decompress_cnt uint64
+ Decompress_tlen uint64
+ Err_cnt uint64
+}
+
+type CryptoStatHash struct {
+ Type [64]uint8
+ Hash_cnt uint64
+ Hash_tlen uint64
+ Err_cnt uint64
+}
+
+type CryptoStatKPP struct {
+ Type [64]uint8
+ Setsecret_cnt uint64
+ Generate_public_key_cnt uint64
+ Compute_shared_secret_cnt uint64
+ Err_cnt uint64
+}
+
+type CryptoStatRNG struct {
+ Type [64]uint8
+ Generate_cnt uint64
+ Generate_tlen uint64
+ Seed_cnt uint64
+ Err_cnt uint64
+}
+
+type CryptoStatLarval struct {
+ Type [64]uint8
+}
+
+type CryptoReportLarval struct {
+ Type [64]uint8
+}
+
+type CryptoReportHash struct {
+ Type [64]uint8
+ Blocksize uint32
+ Digestsize uint32
+}
+
+type CryptoReportCipher struct {
+ Type [64]uint8
+ Blocksize uint32
+ Min_keysize uint32
+ Max_keysize uint32
+}
+
+type CryptoReportBlkCipher struct {
+ Type [64]uint8
+ Geniv [64]uint8
+ Blocksize uint32
+ Min_keysize uint32
+ Max_keysize uint32
+ Ivsize uint32
+}
+
+type CryptoReportAEAD struct {
+ Type [64]uint8
+ Geniv [64]uint8
+ Blocksize uint32
+ Maxauthsize uint32
+ Ivsize uint32
+}
+
+type CryptoReportComp struct {
+ Type [64]uint8
+}
+
+type CryptoReportRNG struct {
+ Type [64]uint8
+ Seedsize uint32
+}
+
+type CryptoReportAKCipher struct {
+ Type [64]uint8
+}
+
+type CryptoReportKPP struct {
+ Type [64]uint8
+}
+
+type CryptoReportAcomp struct {
+ Type [64]uint8
+}
+
+type LoopInfo struct {
+ Number int32
+ Device uint32
+ Inode uint32
+ Rdevice uint32
+ Offset int32
+ Encrypt_type int32
+ Encrypt_key_size int32
+ Flags int32
+ Name [64]uint8
+ Encrypt_key [32]uint8
+ Init [2]uint32
+ Reserved [4]uint8
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]uint8
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]uint8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]uint8
+}
+
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
+
+const (
+ PPS_GETPARAMS = 0x400470a1
+ PPS_SETPARAMS = 0x800470a2
+ PPS_GETCAP = 0x400470a3
+ PPS_FETCH = 0xc00470a4
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index e93b73c..2a3afba 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64 && linux
// +build ppc64,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
Ino uint64
@@ -115,36 +102,6 @@ type Stat_t struct {
_ uint64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -154,10 +111,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -167,182 +120,18 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
-}
-
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -353,41 +142,11 @@ type RawSockaddrAny struct {
Pad [96]uint8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -405,383 +164,16 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x35
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofSockFprog = 0x10
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Gpr [32]uint64
Nip uint64
@@ -820,15 +212,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -845,35 +228,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -882,33 +237,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -920,13 +248,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -974,279 +295,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_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_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1322,22 +377,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1345,88 +384,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1442,18 +399,6 @@ type Statfs_t struct {
Spare [4]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1465,589 +410,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x20
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2058,13 +424,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2075,33 +434,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x20001269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2111,135 +446,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]uint8
Driver_name [64]uint8
@@ -2370,218 +576,6 @@ type CryptoReportAcomp struct {
Type [64]uint8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint64
@@ -2597,38 +591,6 @@ type LoopInfo struct {
Reserved [4]uint8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2637,21 +599,6 @@ type TIPCSubscr struct {
Handle [8]uint8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2663,150 +610,18 @@ type TIPCSIOCNodeIDReq struct {
Id [16]uint8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
-
-const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x8c
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ PPS_GETPARAMS = 0x400870a1
+ PPS_SETPARAMS = 0x800870a2
+ PPS_GETCAP = 0x400870a3
+ PPS_FETCH = 0xc00870a4
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index 1f431b6..c0de30a 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build ppc64le && linux
// +build ppc64le,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
Ino uint64
@@ -115,36 +102,6 @@ type Stat_t struct {
_ uint64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -154,10 +111,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -167,182 +120,18 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
-}
-
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -353,41 +142,11 @@ type RawSockaddrAny struct {
Pad [96]uint8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -405,383 +164,16 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x35
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofSockFprog = 0x10
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
-)
-
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Gpr [32]uint64
Nip uint64
@@ -820,15 +212,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -845,35 +228,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -882,33 +237,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -920,13 +248,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -974,279 +295,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_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_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1322,22 +377,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1345,88 +384,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1442,18 +399,6 @@ type Statfs_t struct {
Spare [4]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1465,589 +410,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
+ SizeofTpacketHdr = 0x20
)
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2058,13 +424,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2075,33 +434,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
+ BLKPG = 0x20001269
)
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
-)
-
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2111,135 +446,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]uint8
Driver_name [64]uint8
@@ -2370,218 +576,6 @@ type CryptoReportAcomp struct {
Type [64]uint8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint64
@@ -2597,38 +591,6 @@ type LoopInfo struct {
Reserved [4]uint8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2637,21 +599,6 @@ type TIPCSubscr struct {
Handle [8]uint8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2663,150 +610,18 @@ type TIPCSIOCNodeIDReq struct {
Id [16]uint8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
-
-const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x8c
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ PPS_GETPARAMS = 0x400870a1
+ PPS_SETPARAMS = 0x800870a2
+ PPS_GETCAP = 0x400870a3
+ PPS_FETCH = 0xc00870a4
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
index 81a5dc1..74faf2e 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build riscv64 && linux
// +build riscv64,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
Ino uint64
@@ -114,36 +101,6 @@ type Stat_t struct {
_ [2]int32
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -153,10 +110,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -166,182 +119,18 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
-}
-
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -352,41 +141,11 @@ type RawSockaddrAny struct {
Pad [96]uint8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -404,383 +163,16 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x35
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Pc uint64
Ra uint64
@@ -838,15 +230,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -863,35 +246,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -900,33 +255,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -938,13 +266,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -992,279 +313,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_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_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1340,22 +395,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1363,88 +402,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1460,18 +417,6 @@ type Statfs_t struct {
Spare [4]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1483,589 +428,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
-const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
-)
-
const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
+ SizeofTpacketHdr = 0x20
)
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2076,13 +442,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2093,33 +452,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x1269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
-)
-
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
+ BLKPG = 0x1269
)
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2129,135 +464,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]uint8
Driver_name [64]uint8
@@ -2388,218 +594,6 @@ type CryptoReportAcomp struct {
Type [64]uint8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2615,38 +609,6 @@ type LoopInfo struct {
Reserved [4]uint8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2655,21 +617,6 @@ type TIPCSubscr struct {
Handle [8]uint8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2681,150 +628,18 @@ type TIPCSIOCNodeIDReq struct {
Id [16]uint8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
-
-const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x8c
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ PPS_GETPARAMS = 0x800870a1
+ PPS_SETPARAMS = 0x400870a2
+ PPS_GETCAP = 0x800870a3
+ PPS_FETCH = 0xc00870a4
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index ae765d4..9a8f0c2 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build s390x && linux
// +build s390x,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -88,13 +82,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
Ino uint64
@@ -113,36 +100,6 @@ type Stat_t struct {
_ [3]int64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -152,10 +109,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -165,182 +118,18 @@ type Flock_t struct {
_ [4]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x6
- FADV_NOREUSE = 0x7
+ FADV_DONTNEED = 0x6
+ FADV_NOREUSE = 0x7
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
-}
-
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -351,41 +140,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -403,383 +162,16 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
-const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
-)
-
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x35
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Psw PtracePsw
Gprs [16]uint64
@@ -833,15 +225,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -858,35 +241,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x2000
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -895,33 +250,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -933,13 +261,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -987,279 +308,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_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_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1335,22 +390,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1358,88 +397,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type uint32
Bsize uint32
@@ -1456,18 +413,6 @@ type Statfs_t struct {
_ [4]byte
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1479,589 +424,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
-const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
-)
-
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
-const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
-)
-
const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
+ SizeofTpacketHdr = 0x20
)
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2072,13 +438,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2089,33 +448,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x1269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
-)
-
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
+ BLKPG = 0x1269
)
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2125,135 +460,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2384,218 +590,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint16
@@ -2611,38 +605,6 @@ type LoopInfo struct {
Reserved [4]int8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2651,21 +613,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2677,150 +624,18 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
-
-const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x8c
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ PPS_GETPARAMS = 0x800870a1
+ PPS_SETPARAMS = 0x400870a2
+ PPS_GETCAP = 0x800870a3
+ PPS_FETCH = 0xc00870a4
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
index 63685ca..72cdda7 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -1,24 +1,18 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build sparc64 && linux
// +build sparc64,linux
package unix
const (
- SizeofPtr = 0x8
- SizeofShort = 0x2
- SizeofInt = 0x4
- SizeofLong = 0x8
- SizeofLongLong = 0x8
- PathMax = 0x1000
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
)
type (
- _C_short int16
- _C_int int32
- _C_long int64
- _C_long_long int64
+ _C_long int64
)
type Timespec struct {
@@ -89,13 +83,6 @@ type Rusage struct {
Nivcsw int64
}
-type Rlimit struct {
- Cur uint64
- Max uint64
-}
-
-type _Gid_t uint32
-
type Stat_t struct {
Dev uint64
_ uint16
@@ -116,36 +103,6 @@ type Stat_t struct {
_ uint64
}
-type StatxTimestamp struct {
- Sec int64
- Nsec uint32
- _ int32
-}
-
-type Statx_t struct {
- Mask uint32
- Blksize uint32
- Attributes uint64
- Nlink uint32
- Uid uint32
- Gid uint32
- Mode uint16
- _ [1]uint16
- Ino uint64
- Size uint64
- Blocks uint64
- Attributes_mask uint64
- Atime StatxTimestamp
- Btime StatxTimestamp
- Ctime StatxTimestamp
- Mtime StatxTimestamp
- Rdev_major uint32
- Rdev_minor uint32
- Dev_major uint32
- Dev_minor uint32
- _ [14]uint64
-}
-
type Dirent struct {
Ino uint64
Off int64
@@ -155,10 +112,6 @@ type Dirent struct {
_ [5]byte
}
-type Fsid struct {
- Val [2]int32
-}
-
type Flock_t struct {
Type int16
Whence int16
@@ -169,182 +122,18 @@ type Flock_t struct {
_ [2]byte
}
-type FscryptPolicy struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptKey struct {
- Mode uint32
- Raw [64]uint8
- Size uint32
-}
-
-type FscryptPolicyV1 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- Master_key_descriptor [8]uint8
-}
-
-type FscryptPolicyV2 struct {
- Version uint8
- Contents_encryption_mode uint8
- Filenames_encryption_mode uint8
- Flags uint8
- _ [4]uint8
- Master_key_identifier [16]uint8
-}
-
-type FscryptGetPolicyExArg struct {
- Size uint64
- Policy [24]byte
-}
-
-type FscryptKeySpecifier struct {
- Type uint32
- _ uint32
- U [32]byte
-}
-
-type FscryptAddKeyArg struct {
- Key_spec FscryptKeySpecifier
- Raw_size uint32
- _ [9]uint32
-}
-
-type FscryptRemoveKeyArg struct {
- Key_spec FscryptKeySpecifier
- Removal_status_flags uint32
- _ [5]uint32
-}
-
-type FscryptGetKeyStatusArg struct {
- Key_spec FscryptKeySpecifier
- _ [6]uint32
- Status uint32
- Status_flags uint32
- User_count uint32
- _ [13]uint32
-}
-
-type KeyctlDHParams struct {
- Private int32
- Prime int32
- Base int32
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
}
const (
- FADV_NORMAL = 0x0
- FADV_RANDOM = 0x1
- FADV_SEQUENTIAL = 0x2
- FADV_WILLNEED = 0x3
- FADV_DONTNEED = 0x4
- FADV_NOREUSE = 0x5
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
)
-type RawSockaddrInet4 struct {
- Family uint16
- Port uint16
- Addr [4]byte /* in_addr */
- Zero [8]uint8
-}
-
-type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
-}
-
-type RawSockaddrUnix struct {
- Family uint16
- Path [108]int8
-}
-
-type RawSockaddrLinklayer struct {
- Family uint16
- Protocol uint16
- Ifindex int32
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]uint8
-}
-
-type RawSockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
-}
-
-type RawSockaddrHCI struct {
- Family uint16
- Dev uint16
- Channel uint16
-}
-
-type RawSockaddrL2 struct {
- Family uint16
- Psm uint16
- Bdaddr [6]uint8
- Cid uint16
- Bdaddr_type uint8
- _ [1]byte
-}
-
-type RawSockaddrRFCOMM struct {
- Family uint16
- Bdaddr [6]uint8
- Channel uint8
- _ [1]byte
-}
-
-type RawSockaddrCAN struct {
- Family uint16
- Ifindex int32
- Addr [16]byte
-}
-
-type RawSockaddrALG struct {
- Family uint16
- Type [14]uint8
- Feat uint32
- Mask uint32
- Name [64]uint8
-}
-
-type RawSockaddrVM struct {
- Family uint16
- Reserved1 uint16
- Port uint32
- Cid uint32
- Zero [4]uint8
-}
-
-type RawSockaddrXDP struct {
- Family uint16
- Flags uint16
- Ifindex uint32
- Queue_id uint32
- Shared_umem_fd uint32
-}
-
-type RawSockaddrPPPoX [0x1e]byte
-
-type RawSockaddrTIPC struct {
- Family uint16
- Addrtype uint8
- Scope int8
- Addr [12]byte
-}
-
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -355,41 +144,11 @@ type RawSockaddrAny struct {
Pad [96]int8
}
-type _Socklen uint32
-
-type Linger struct {
- Onoff int32
- Linger int32
-}
-
type Iovec struct {
Base *byte
Len uint64
}
-type IPMreq struct {
- Multiaddr [4]byte /* in_addr */
- Interface [4]byte /* in_addr */
-}
-
-type IPMreqn struct {
- Multiaddr [4]byte /* in_addr */
- Address [4]byte /* in_addr */
- Ifindex int32
-}
-
-type IPv6Mreq struct {
- Multiaddr [16]byte /* in6_addr */
- Interface uint32
-}
-
-type PacketMreq struct {
- Ifindex int32
- Type uint16
- Alen uint16
- Address [8]uint8
-}
-
type Msghdr struct {
Name *byte
Namelen uint32
@@ -407,383 +166,16 @@ type Cmsghdr struct {
Type int32
}
-type Inet4Pktinfo struct {
- Ifindex int32
- Spec_dst [4]byte /* in_addr */
- Addr [4]byte /* in_addr */
-}
-
-type Inet6Pktinfo struct {
- Addr [16]byte /* in6_addr */
- Ifindex uint32
-}
-
-type IPv6MTUInfo struct {
- Addr RawSockaddrInet6
- Mtu uint32
-}
-
-type ICMPv6Filter struct {
- Data [8]uint32
-}
-
-type Ucred struct {
- Pid int32
- Uid uint32
- Gid uint32
-}
-
-type TCPInfo struct {
- State uint8
- Ca_state uint8
- Retransmits uint8
- Probes uint8
- Backoff uint8
- Options uint8
- Rto uint32
- Ato uint32
- Snd_mss uint32
- Rcv_mss uint32
- Unacked uint32
- Sacked uint32
- Lost uint32
- Retrans uint32
- Fackets uint32
- Last_data_sent uint32
- Last_ack_sent uint32
- Last_data_recv uint32
- Last_ack_recv uint32
- Pmtu uint32
- Rcv_ssthresh uint32
- Rtt uint32
- Rttvar uint32
- Snd_ssthresh uint32
- Snd_cwnd uint32
- Advmss uint32
- Reordering uint32
- Rcv_rtt uint32
- Rcv_space uint32
- Total_retrans uint32
-}
-
-type CanFilter struct {
- Id uint32
- Mask uint32
-}
-
const (
- SizeofSockaddrInet4 = 0x10
- SizeofSockaddrInet6 = 0x1c
- SizeofSockaddrAny = 0x70
- SizeofSockaddrUnix = 0x6e
- SizeofSockaddrLinklayer = 0x14
- SizeofSockaddrNetlink = 0xc
- SizeofSockaddrHCI = 0x6
- SizeofSockaddrL2 = 0xe
- SizeofSockaddrRFCOMM = 0xa
- SizeofSockaddrCAN = 0x18
- SizeofSockaddrALG = 0x58
- SizeofSockaddrVM = 0x10
- SizeofSockaddrXDP = 0x10
- SizeofSockaddrPPPoX = 0x1e
- SizeofSockaddrTIPC = 0x10
- SizeofLinger = 0x8
- SizeofIovec = 0x10
- SizeofIPMreq = 0x8
- SizeofIPMreqn = 0xc
- SizeofIPv6Mreq = 0x14
- SizeofPacketMreq = 0x10
- SizeofMsghdr = 0x38
- SizeofCmsghdr = 0x10
- SizeofInet4Pktinfo = 0xc
- SizeofInet6Pktinfo = 0x14
- SizeofIPv6MTUInfo = 0x20
- SizeofICMPv6Filter = 0x20
- SizeofUcred = 0xc
- SizeofTCPInfo = 0x68
- SizeofCanFilter = 0x8
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
)
const (
- NDA_UNSPEC = 0x0
- NDA_DST = 0x1
- NDA_LLADDR = 0x2
- NDA_CACHEINFO = 0x3
- NDA_PROBES = 0x4
- NDA_VLAN = 0x5
- NDA_PORT = 0x6
- NDA_VNI = 0x7
- NDA_IFINDEX = 0x8
- NDA_MASTER = 0x9
- NDA_LINK_NETNSID = 0xa
- NDA_SRC_VNI = 0xb
- NTF_USE = 0x1
- NTF_SELF = 0x2
- NTF_MASTER = 0x4
- NTF_PROXY = 0x8
- NTF_EXT_LEARNED = 0x10
- NTF_OFFLOADED = 0x20
- NTF_ROUTER = 0x80
- NUD_INCOMPLETE = 0x1
- NUD_REACHABLE = 0x2
- NUD_STALE = 0x4
- NUD_DELAY = 0x8
- NUD_PROBE = 0x10
- NUD_FAILED = 0x20
- NUD_NOARP = 0x40
- NUD_PERMANENT = 0x80
- NUD_NONE = 0x0
- IFA_UNSPEC = 0x0
- IFA_ADDRESS = 0x1
- IFA_LOCAL = 0x2
- IFA_LABEL = 0x3
- IFA_BROADCAST = 0x4
- IFA_ANYCAST = 0x5
- IFA_CACHEINFO = 0x6
- IFA_MULTICAST = 0x7
- IFA_FLAGS = 0x8
- IFA_RT_PRIORITY = 0x9
- IFA_TARGET_NETNSID = 0xa
- IFLA_UNSPEC = 0x0
- IFLA_ADDRESS = 0x1
- IFLA_BROADCAST = 0x2
- IFLA_IFNAME = 0x3
- IFLA_MTU = 0x4
- IFLA_LINK = 0x5
- IFLA_QDISC = 0x6
- IFLA_STATS = 0x7
- IFLA_COST = 0x8
- IFLA_PRIORITY = 0x9
- IFLA_MASTER = 0xa
- IFLA_WIRELESS = 0xb
- IFLA_PROTINFO = 0xc
- IFLA_TXQLEN = 0xd
- IFLA_MAP = 0xe
- IFLA_WEIGHT = 0xf
- IFLA_OPERSTATE = 0x10
- IFLA_LINKMODE = 0x11
- IFLA_LINKINFO = 0x12
- IFLA_NET_NS_PID = 0x13
- IFLA_IFALIAS = 0x14
- IFLA_NUM_VF = 0x15
- IFLA_VFINFO_LIST = 0x16
- IFLA_STATS64 = 0x17
- IFLA_VF_PORTS = 0x18
- IFLA_PORT_SELF = 0x19
- IFLA_AF_SPEC = 0x1a
- IFLA_GROUP = 0x1b
- IFLA_NET_NS_FD = 0x1c
- IFLA_EXT_MASK = 0x1d
- IFLA_PROMISCUITY = 0x1e
- IFLA_NUM_TX_QUEUES = 0x1f
- IFLA_NUM_RX_QUEUES = 0x20
- IFLA_CARRIER = 0x21
- IFLA_PHYS_PORT_ID = 0x22
- IFLA_CARRIER_CHANGES = 0x23
- IFLA_PHYS_SWITCH_ID = 0x24
- IFLA_LINK_NETNSID = 0x25
- IFLA_PHYS_PORT_NAME = 0x26
- IFLA_PROTO_DOWN = 0x27
- IFLA_GSO_MAX_SEGS = 0x28
- IFLA_GSO_MAX_SIZE = 0x29
- IFLA_PAD = 0x2a
- IFLA_XDP = 0x2b
- IFLA_EVENT = 0x2c
- IFLA_NEW_NETNSID = 0x2d
- IFLA_IF_NETNSID = 0x2e
- IFLA_TARGET_NETNSID = 0x2e
- IFLA_CARRIER_UP_COUNT = 0x2f
- IFLA_CARRIER_DOWN_COUNT = 0x30
- IFLA_NEW_IFINDEX = 0x31
- IFLA_MIN_MTU = 0x32
- IFLA_MAX_MTU = 0x33
- IFLA_MAX = 0x35
- IFLA_INFO_KIND = 0x1
- IFLA_INFO_DATA = 0x2
- IFLA_INFO_XSTATS = 0x3
- IFLA_INFO_SLAVE_KIND = 0x4
- IFLA_INFO_SLAVE_DATA = 0x5
- RT_SCOPE_UNIVERSE = 0x0
- RT_SCOPE_SITE = 0xc8
- RT_SCOPE_LINK = 0xfd
- RT_SCOPE_HOST = 0xfe
- RT_SCOPE_NOWHERE = 0xff
- RT_TABLE_UNSPEC = 0x0
- RT_TABLE_COMPAT = 0xfc
- RT_TABLE_DEFAULT = 0xfd
- RT_TABLE_MAIN = 0xfe
- RT_TABLE_LOCAL = 0xff
- RT_TABLE_MAX = 0xffffffff
- RTA_UNSPEC = 0x0
- RTA_DST = 0x1
- RTA_SRC = 0x2
- RTA_IIF = 0x3
- RTA_OIF = 0x4
- RTA_GATEWAY = 0x5
- RTA_PRIORITY = 0x6
- RTA_PREFSRC = 0x7
- RTA_METRICS = 0x8
- RTA_MULTIPATH = 0x9
- RTA_FLOW = 0xb
- RTA_CACHEINFO = 0xc
- RTA_TABLE = 0xf
- RTA_MARK = 0x10
- RTA_MFC_STATS = 0x11
- RTA_VIA = 0x12
- RTA_NEWDST = 0x13
- RTA_PREF = 0x14
- RTA_ENCAP_TYPE = 0x15
- RTA_ENCAP = 0x16
- RTA_EXPIRES = 0x17
- RTA_PAD = 0x18
- RTA_UID = 0x19
- RTA_TTL_PROPAGATE = 0x1a
- RTA_IP_PROTO = 0x1b
- RTA_SPORT = 0x1c
- RTA_DPORT = 0x1d
- RTN_UNSPEC = 0x0
- RTN_UNICAST = 0x1
- RTN_LOCAL = 0x2
- RTN_BROADCAST = 0x3
- RTN_ANYCAST = 0x4
- RTN_MULTICAST = 0x5
- RTN_BLACKHOLE = 0x6
- RTN_UNREACHABLE = 0x7
- RTN_PROHIBIT = 0x8
- RTN_THROW = 0x9
- RTN_NAT = 0xa
- RTN_XRESOLVE = 0xb
- SizeofNlMsghdr = 0x10
- SizeofNlMsgerr = 0x14
- SizeofRtGenmsg = 0x1
- SizeofNlAttr = 0x4
- SizeofRtAttr = 0x4
- SizeofIfInfomsg = 0x10
- SizeofIfAddrmsg = 0x8
- SizeofIfaCacheinfo = 0x10
- SizeofRtMsg = 0xc
- SizeofRtNexthop = 0x8
- SizeofNdUseroptmsg = 0x10
- SizeofNdMsg = 0xc
-)
-
-type NlMsghdr struct {
- Len uint32
- Type uint16
- Flags uint16
- Seq uint32
- Pid uint32
-}
-
-type NlMsgerr struct {
- Error int32
- Msg NlMsghdr
-}
-
-type RtGenmsg struct {
- Family uint8
-}
-
-type NlAttr struct {
- Len uint16
- Type uint16
-}
-
-type RtAttr struct {
- Len uint16
- Type uint16
-}
-
-type IfInfomsg struct {
- Family uint8
- _ uint8
- Type uint16
- Index int32
- Flags uint32
- Change uint32
-}
-
-type IfAddrmsg struct {
- Family uint8
- Prefixlen uint8
- Flags uint8
- Scope uint8
- Index uint32
-}
-
-type IfaCacheinfo struct {
- Prefered uint32
- Valid uint32
- Cstamp uint32
- Tstamp uint32
-}
-
-type RtMsg struct {
- Family uint8
- Dst_len uint8
- Src_len uint8
- Tos uint8
- Table uint8
- Protocol uint8
- Scope uint8
- Type uint8
- Flags uint32
-}
-
-type RtNexthop struct {
- Len uint16
- Flags uint8
- Hops uint8
- Ifindex int32
-}
-
-type NdUseroptmsg struct {
- Family uint8
- Pad1 uint8
- Opts_len uint16
- Ifindex int32
- Icmp_type uint8
- Icmp_code uint8
- Pad2 uint16
- Pad3 uint32
-}
-
-type NdMsg struct {
- Family uint8
- Pad1 uint8
- Pad2 uint16
- Ifindex int32
- State uint16
- Flags uint8
- Type uint8
-}
-
-const (
- SizeofSockFilter = 0x8
- SizeofSockFprog = 0x10
+ SizeofSockFprog = 0x10
)
-type SockFilter struct {
- Code uint16
- Jt uint8
- Jf uint8
- K uint32
-}
-
-type SockFprog struct {
- Len uint16
- Filter *SockFilter
-}
-
-type InotifyEvent struct {
- Wd int32
- Mask uint32
- Cookie uint32
- Len uint32
-}
-
-const SizeofInotifyEvent = 0x10
-
type PtraceRegs struct {
Regs [16]uint64
Tstate uint64
@@ -815,15 +207,6 @@ type Sysinfo_t struct {
_ [4]byte
}
-type Utsname struct {
- Sysname [65]byte
- Nodename [65]byte
- Release [65]byte
- Version [65]byte
- Machine [65]byte
- Domainname [65]byte
-}
-
type Ustat_t struct {
Tfree int32
Tinode uint64
@@ -840,35 +223,7 @@ type EpollEvent struct {
}
const (
- AT_EMPTY_PATH = 0x1000
- AT_FDCWD = -0x64
- AT_NO_AUTOMOUNT = 0x800
- AT_REMOVEDIR = 0x200
-
- AT_STATX_SYNC_AS_STAT = 0x0
- AT_STATX_FORCE_SYNC = 0x2000
- AT_STATX_DONT_SYNC = 0x4000
-
- AT_SYMLINK_FOLLOW = 0x400
- AT_SYMLINK_NOFOLLOW = 0x100
-
- AT_EACCESS = 0x200
-)
-
-type PollFd struct {
- Fd int32
- Events int16
- Revents int16
-}
-
-const (
- POLLIN = 0x1
- POLLPRI = 0x2
- POLLOUT = 0x4
POLLRDHUP = 0x800
- POLLERR = 0x8
- POLLHUP = 0x10
- POLLNVAL = 0x20
)
type Sigset_t struct {
@@ -877,33 +232,6 @@ type Sigset_t struct {
const _C__NSIG = 0x41
-type SignalfdSiginfo struct {
- Signo uint32
- Errno int32
- Code int32
- Pid uint32
- Uid uint32
- Fd int32
- Tid uint32
- Band uint32
- Overrun uint32
- Trapno uint32
- Status int32
- Int int32
- Ptr uint64
- Utime uint64
- Stime uint64
- Addr uint64
- Addr_lsb uint16
- _ uint16
- Syscall int32
- Call_addr uint64
- Arch uint32
- _ [28]uint8
-}
-
-const PERF_IOC_FLAG_GROUP = 0x1
-
type Termios struct {
Iflag uint32
Oflag uint32
@@ -915,13 +243,6 @@ type Termios struct {
Ospeed uint32
}
-type Winsize struct {
- Row uint16
- Col uint16
- Xpixel uint16
- Ypixel uint16
-}
-
type Taskstats struct {
Version uint16
Ac_exitcode uint32
@@ -969,279 +290,13 @@ type Taskstats struct {
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
+ Ac_btime64 uint64
}
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type CGroupStats struct {
- Sleeping uint64
- Running uint64
- Stopped uint64
- Uninterruptible uint64
- Io_wait uint64
-}
-
-const (
- CGROUPSTATS_CMD_UNSPEC = 0x3
- CGROUPSTATS_CMD_GET = 0x4
- CGROUPSTATS_CMD_NEW = 0x5
- CGROUPSTATS_TYPE_UNSPEC = 0x0
- CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
- CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
- CGROUPSTATS_CMD_ATTR_FD = 0x1
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
-
type cpuMask uint64
const (
- _CPU_SETSIZE = 0x400
- _NCPUBITS = 0x40
-)
-
-const (
- BDADDR_BREDR = 0x0
- BDADDR_LE_PUBLIC = 0x1
- BDADDR_LE_RANDOM = 0x2
-)
-
-type PerfEventAttr struct {
- Type uint32
- Size uint32
- Config uint64
- Sample uint64
- Sample_type uint64
- Read_format uint64
- Bits uint64
- Wakeup uint32
- Bp_type uint32
- Ext1 uint64
- Ext2 uint64
- Branch_sample_type uint64
- Sample_regs_user uint64
- Sample_stack_user uint32
- Clockid int32
- Sample_regs_intr uint64
- Aux_watermark uint32
- Sample_max_stack uint16
- _ uint16
-}
-
-type PerfEventMmapPage struct {
- Version uint32
- Compat_version uint32
- Lock uint32
- Index uint32
- Offset int64
- Time_enabled uint64
- Time_running uint64
- Capabilities uint64
- Pmc_width uint16
- Time_shift uint16
- Time_mult uint32
- Time_offset uint64
- Time_zero uint64
- Size uint32
- _ [948]uint8
- Data_head uint64
- Data_tail uint64
- Data_offset uint64
- Data_size uint64
- Aux_head uint64
- Aux_tail uint64
- Aux_offset uint64
- Aux_size uint64
-}
-
-const (
- PerfBitDisabled uint64 = CBitFieldMaskBit0
- PerfBitInherit = CBitFieldMaskBit1
- PerfBitPinned = CBitFieldMaskBit2
- PerfBitExclusive = CBitFieldMaskBit3
- PerfBitExcludeUser = CBitFieldMaskBit4
- PerfBitExcludeKernel = CBitFieldMaskBit5
- PerfBitExcludeHv = CBitFieldMaskBit6
- PerfBitExcludeIdle = CBitFieldMaskBit7
- PerfBitMmap = CBitFieldMaskBit8
- PerfBitComm = CBitFieldMaskBit9
- PerfBitFreq = CBitFieldMaskBit10
- PerfBitInheritStat = CBitFieldMaskBit11
- PerfBitEnableOnExec = CBitFieldMaskBit12
- PerfBitTask = CBitFieldMaskBit13
- PerfBitWatermark = CBitFieldMaskBit14
- PerfBitPreciseIPBit1 = CBitFieldMaskBit15
- PerfBitPreciseIPBit2 = CBitFieldMaskBit16
- PerfBitMmapData = CBitFieldMaskBit17
- PerfBitSampleIDAll = CBitFieldMaskBit18
- PerfBitExcludeHost = CBitFieldMaskBit19
- PerfBitExcludeGuest = CBitFieldMaskBit20
- PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
- PerfBitExcludeCallchainUser = CBitFieldMaskBit22
- PerfBitMmap2 = CBitFieldMaskBit23
- PerfBitCommExec = CBitFieldMaskBit24
- PerfBitUseClockID = CBitFieldMaskBit25
- PerfBitContextSwitch = CBitFieldMaskBit26
-)
-
-const (
- PERF_TYPE_HARDWARE = 0x0
- PERF_TYPE_SOFTWARE = 0x1
- PERF_TYPE_TRACEPOINT = 0x2
- PERF_TYPE_HW_CACHE = 0x3
- PERF_TYPE_RAW = 0x4
- PERF_TYPE_BREAKPOINT = 0x5
-
- PERF_COUNT_HW_CPU_CYCLES = 0x0
- PERF_COUNT_HW_INSTRUCTIONS = 0x1
- PERF_COUNT_HW_CACHE_REFERENCES = 0x2
- PERF_COUNT_HW_CACHE_MISSES = 0x3
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
- PERF_COUNT_HW_BRANCH_MISSES = 0x5
- PERF_COUNT_HW_BUS_CYCLES = 0x6
- PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
- PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
- PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
-
- PERF_COUNT_HW_CACHE_L1D = 0x0
- PERF_COUNT_HW_CACHE_L1I = 0x1
- PERF_COUNT_HW_CACHE_LL = 0x2
- PERF_COUNT_HW_CACHE_DTLB = 0x3
- PERF_COUNT_HW_CACHE_ITLB = 0x4
- PERF_COUNT_HW_CACHE_BPU = 0x5
- PERF_COUNT_HW_CACHE_NODE = 0x6
-
- PERF_COUNT_HW_CACHE_OP_READ = 0x0
- PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
-
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
- PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
-
- PERF_COUNT_SW_CPU_CLOCK = 0x0
- PERF_COUNT_SW_TASK_CLOCK = 0x1
- PERF_COUNT_SW_PAGE_FAULTS = 0x2
- PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
- PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
- PERF_COUNT_SW_EMULATION_FAULTS = 0x8
- PERF_COUNT_SW_DUMMY = 0x9
- PERF_COUNT_SW_BPF_OUTPUT = 0xa
-
- PERF_SAMPLE_IP = 0x1
- PERF_SAMPLE_TID = 0x2
- PERF_SAMPLE_TIME = 0x4
- PERF_SAMPLE_ADDR = 0x8
- PERF_SAMPLE_READ = 0x10
- PERF_SAMPLE_CALLCHAIN = 0x20
- PERF_SAMPLE_ID = 0x40
- PERF_SAMPLE_CPU = 0x80
- PERF_SAMPLE_PERIOD = 0x100
- PERF_SAMPLE_STREAM_ID = 0x200
- PERF_SAMPLE_RAW = 0x400
- PERF_SAMPLE_BRANCH_STACK = 0x800
-
- PERF_SAMPLE_BRANCH_USER = 0x1
- PERF_SAMPLE_BRANCH_KERNEL = 0x2
- PERF_SAMPLE_BRANCH_HV = 0x4
- PERF_SAMPLE_BRANCH_ANY = 0x8
- PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
- PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
- PERF_SAMPLE_BRANCH_IND_CALL = 0x40
- PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
- PERF_SAMPLE_BRANCH_IN_TX = 0x100
- PERF_SAMPLE_BRANCH_NO_TX = 0x200
- PERF_SAMPLE_BRANCH_COND = 0x400
- PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
- PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
- PERF_SAMPLE_BRANCH_CALL = 0x2000
- PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
- PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
- PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
-
- PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
- PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
- PERF_FORMAT_ID = 0x4
- PERF_FORMAT_GROUP = 0x8
-
- PERF_RECORD_MMAP = 0x1
- PERF_RECORD_LOST = 0x2
- PERF_RECORD_COMM = 0x3
- PERF_RECORD_EXIT = 0x4
- PERF_RECORD_THROTTLE = 0x5
- PERF_RECORD_UNTHROTTLE = 0x6
- PERF_RECORD_FORK = 0x7
- PERF_RECORD_READ = 0x8
- PERF_RECORD_SAMPLE = 0x9
- PERF_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_CONTEXT_HV = -0x20
- PERF_CONTEXT_KERNEL = -0x80
- PERF_CONTEXT_USER = -0x200
-
- PERF_CONTEXT_GUEST = -0x800
- PERF_CONTEXT_GUEST_KERNEL = -0x880
- PERF_CONTEXT_GUEST_USER = -0xa00
-
- PERF_FLAG_FD_NO_GROUP = 0x1
- PERF_FLAG_FD_OUTPUT = 0x2
- PERF_FLAG_PID_CGROUP = 0x4
- PERF_FLAG_FD_CLOEXEC = 0x8
+ _NCPUBITS = 0x40
)
const (
@@ -1317,22 +372,6 @@ type SockaddrStorage struct {
_ uint64
}
-type TCPMD5Sig struct {
- Addr SockaddrStorage
- Flags uint8
- Prefixlen uint8
- Keylen uint16
- _ uint32
- Key [80]uint8
-}
-
-type HDDriveCmdHdr struct {
- Command uint8
- Number uint8
- Feature uint8
- Count uint8
-}
-
type HDGeometry struct {
Heads uint8
Sectors uint8
@@ -1340,88 +379,6 @@ type HDGeometry struct {
Start uint64
}
-type HDDriveID struct {
- Config uint16
- Cyls uint16
- Reserved2 uint16
- Heads uint16
- Track_bytes uint16
- Sector_bytes uint16
- Sectors uint16
- Vendor0 uint16
- Vendor1 uint16
- Vendor2 uint16
- Serial_no [20]uint8
- Buf_type uint16
- Buf_size uint16
- Ecc_bytes uint16
- Fw_rev [8]uint8
- Model [40]uint8
- Max_multsect uint8
- Vendor3 uint8
- Dword_io uint16
- Vendor4 uint8
- Capability uint8
- Reserved50 uint16
- Vendor5 uint8
- TPIO uint8
- Vendor6 uint8
- TDMA uint8
- Field_valid uint16
- Cur_cyls uint16
- Cur_heads uint16
- Cur_sectors uint16
- Cur_capacity0 uint16
- Cur_capacity1 uint16
- Multsect uint8
- Multsect_valid uint8
- Lba_capacity uint32
- Dma_1word uint16
- Dma_mword uint16
- Eide_pio_modes uint16
- Eide_dma_min uint16
- Eide_dma_time uint16
- Eide_pio uint16
- Eide_pio_iordy uint16
- Words69_70 [2]uint16
- Words71_74 [4]uint16
- Queue_depth uint16
- Words76_79 [4]uint16
- Major_rev_num uint16
- Minor_rev_num uint16
- Command_set_1 uint16
- Command_set_2 uint16
- Cfsse uint16
- Cfs_enable_1 uint16
- Cfs_enable_2 uint16
- Csf_default uint16
- Dma_ultra uint16
- Trseuc uint16
- TrsEuc uint16
- CurAPMvalues uint16
- Mprc uint16
- Hw_config uint16
- Acoustic uint16
- Msrqs uint16
- Sxfert uint16
- Sal uint16
- Spg uint32
- Lba_capacity_2 uint64
- Words104_125 [22]uint16
- Last_lun uint16
- Word127 uint16
- Dlf uint16
- Csfo uint16
- Words130_155 [26]uint16
- Word156 uint16
- Words157_159 [3]uint16
- Cfa_power uint16
- Words161_175 [15]uint16
- Words176_205 [30]uint16
- Words206_254 [49]uint16
- Integrity_word uint16
-}
-
type Statfs_t struct {
Type int64
Bsize int64
@@ -1437,18 +394,6 @@ type Statfs_t struct {
Spare [4]int64
}
-const (
- ST_MANDLOCK = 0x40
- ST_NOATIME = 0x400
- ST_NODEV = 0x4
- ST_NODIRATIME = 0x800
- ST_NOEXEC = 0x8
- ST_NOSUID = 0x2
- ST_RDONLY = 0x1
- ST_RELATIME = 0x1000
- ST_SYNCHRONOUS = 0x10
-)
-
type TpacketHdr struct {
Status uint64
Len uint32
@@ -1460,589 +405,10 @@ type TpacketHdr struct {
_ [4]byte
}
-type Tpacket2Hdr struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Sec uint32
- Nsec uint32
- Vlan_tci uint16
- Vlan_tpid uint16
- _ [4]uint8
-}
-
-type Tpacket3Hdr struct {
- Next_offset uint32
- Sec uint32
- Nsec uint32
- Snaplen uint32
- Len uint32
- Status uint32
- Mac uint16
- Net uint16
- Hv1 TpacketHdrVariant1
- _ [8]uint8
-}
-
-type TpacketHdrVariant1 struct {
- Rxhash uint32
- Vlan_tci uint32
- Vlan_tpid uint16
- _ uint16
-}
-
-type TpacketBlockDesc struct {
- Version uint32
- To_priv uint32
- Hdr [40]byte
-}
-
-type TpacketBDTS struct {
- Sec uint32
- Usec uint32
-}
-
-type TpacketHdrV1 struct {
- Block_status uint32
- Num_pkts uint32
- Offset_to_first_pkt uint32
- Blk_len uint32
- Seq_num uint64
- Ts_first_pkt TpacketBDTS
- Ts_last_pkt TpacketBDTS
-}
-
-type TpacketReq struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
-}
-
-type TpacketReq3 struct {
- Block_size uint32
- Block_nr uint32
- Frame_size uint32
- Frame_nr uint32
- Retire_blk_tov uint32
- Sizeof_priv uint32
- Feature_req_word uint32
-}
-
-type TpacketStats struct {
- Packets uint32
- Drops uint32
-}
-
-type TpacketStatsV3 struct {
- Packets uint32
- Drops uint32
- Freeze_q_cnt uint32
-}
-
-type TpacketAuxdata struct {
- Status uint32
- Len uint32
- Snaplen uint32
- Mac uint16
- Net uint16
- Vlan_tci uint16
- Vlan_tpid uint16
-}
-
-const (
- TPACKET_V1 = 0x0
- TPACKET_V2 = 0x1
- TPACKET_V3 = 0x2
-)
-
-const (
- SizeofTpacketHdr = 0x20
- SizeofTpacket2Hdr = 0x20
- SizeofTpacket3Hdr = 0x30
-
- SizeofTpacketStats = 0x8
- SizeofTpacketStatsV3 = 0xc
-)
-
const (
- NF_INET_PRE_ROUTING = 0x0
- NF_INET_LOCAL_IN = 0x1
- NF_INET_FORWARD = 0x2
- NF_INET_LOCAL_OUT = 0x3
- NF_INET_POST_ROUTING = 0x4
- NF_INET_NUMHOOKS = 0x5
+ SizeofTpacketHdr = 0x20
)
-const (
- NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
-)
-
-const (
- NFPROTO_UNSPEC = 0x0
- NFPROTO_INET = 0x1
- NFPROTO_IPV4 = 0x2
- NFPROTO_ARP = 0x3
- NFPROTO_NETDEV = 0x5
- NFPROTO_BRIDGE = 0x7
- NFPROTO_IPV6 = 0xa
- NFPROTO_DECNET = 0xc
- NFPROTO_NUMPROTO = 0xd
-)
-
-type Nfgenmsg struct {
- Nfgen_family uint8
- Version uint8
- Res_id uint16
-}
-
-const (
- NFNL_BATCH_UNSPEC = 0x0
- NFNL_BATCH_GENID = 0x1
-)
-
-const (
- NFT_REG_VERDICT = 0x0
- NFT_REG_1 = 0x1
- NFT_REG_2 = 0x2
- NFT_REG_3 = 0x3
- NFT_REG_4 = 0x4
- NFT_REG32_00 = 0x8
- NFT_REG32_01 = 0x9
- NFT_REG32_02 = 0xa
- NFT_REG32_03 = 0xb
- NFT_REG32_04 = 0xc
- NFT_REG32_05 = 0xd
- NFT_REG32_06 = 0xe
- NFT_REG32_07 = 0xf
- NFT_REG32_08 = 0x10
- NFT_REG32_09 = 0x11
- NFT_REG32_10 = 0x12
- NFT_REG32_11 = 0x13
- NFT_REG32_12 = 0x14
- NFT_REG32_13 = 0x15
- NFT_REG32_14 = 0x16
- NFT_REG32_15 = 0x17
- NFT_CONTINUE = -0x1
- NFT_BREAK = -0x2
- NFT_JUMP = -0x3
- NFT_GOTO = -0x4
- NFT_RETURN = -0x5
- NFT_MSG_NEWTABLE = 0x0
- NFT_MSG_GETTABLE = 0x1
- NFT_MSG_DELTABLE = 0x2
- NFT_MSG_NEWCHAIN = 0x3
- NFT_MSG_GETCHAIN = 0x4
- NFT_MSG_DELCHAIN = 0x5
- NFT_MSG_NEWRULE = 0x6
- NFT_MSG_GETRULE = 0x7
- NFT_MSG_DELRULE = 0x8
- NFT_MSG_NEWSET = 0x9
- NFT_MSG_GETSET = 0xa
- NFT_MSG_DELSET = 0xb
- NFT_MSG_NEWSETELEM = 0xc
- NFT_MSG_GETSETELEM = 0xd
- NFT_MSG_DELSETELEM = 0xe
- NFT_MSG_NEWGEN = 0xf
- NFT_MSG_GETGEN = 0x10
- NFT_MSG_TRACE = 0x11
- NFT_MSG_NEWOBJ = 0x12
- NFT_MSG_GETOBJ = 0x13
- NFT_MSG_DELOBJ = 0x14
- NFT_MSG_GETOBJ_RESET = 0x15
- NFT_MSG_MAX = 0x19
- NFTA_LIST_UNPEC = 0x0
- NFTA_LIST_ELEM = 0x1
- NFTA_HOOK_UNSPEC = 0x0
- NFTA_HOOK_HOOKNUM = 0x1
- NFTA_HOOK_PRIORITY = 0x2
- NFTA_HOOK_DEV = 0x3
- NFT_TABLE_F_DORMANT = 0x1
- NFTA_TABLE_UNSPEC = 0x0
- NFTA_TABLE_NAME = 0x1
- NFTA_TABLE_FLAGS = 0x2
- NFTA_TABLE_USE = 0x3
- NFTA_CHAIN_UNSPEC = 0x0
- NFTA_CHAIN_TABLE = 0x1
- NFTA_CHAIN_HANDLE = 0x2
- NFTA_CHAIN_NAME = 0x3
- NFTA_CHAIN_HOOK = 0x4
- NFTA_CHAIN_POLICY = 0x5
- NFTA_CHAIN_USE = 0x6
- NFTA_CHAIN_TYPE = 0x7
- NFTA_CHAIN_COUNTERS = 0x8
- NFTA_CHAIN_PAD = 0x9
- NFTA_RULE_UNSPEC = 0x0
- NFTA_RULE_TABLE = 0x1
- NFTA_RULE_CHAIN = 0x2
- NFTA_RULE_HANDLE = 0x3
- NFTA_RULE_EXPRESSIONS = 0x4
- NFTA_RULE_COMPAT = 0x5
- NFTA_RULE_POSITION = 0x6
- NFTA_RULE_USERDATA = 0x7
- NFTA_RULE_PAD = 0x8
- NFTA_RULE_ID = 0x9
- NFT_RULE_COMPAT_F_INV = 0x2
- NFT_RULE_COMPAT_F_MASK = 0x2
- NFTA_RULE_COMPAT_UNSPEC = 0x0
- NFTA_RULE_COMPAT_PROTO = 0x1
- NFTA_RULE_COMPAT_FLAGS = 0x2
- NFT_SET_ANONYMOUS = 0x1
- NFT_SET_CONSTANT = 0x2
- NFT_SET_INTERVAL = 0x4
- NFT_SET_MAP = 0x8
- NFT_SET_TIMEOUT = 0x10
- NFT_SET_EVAL = 0x20
- NFT_SET_OBJECT = 0x40
- NFT_SET_POL_PERFORMANCE = 0x0
- NFT_SET_POL_MEMORY = 0x1
- NFTA_SET_DESC_UNSPEC = 0x0
- NFTA_SET_DESC_SIZE = 0x1
- NFTA_SET_UNSPEC = 0x0
- NFTA_SET_TABLE = 0x1
- NFTA_SET_NAME = 0x2
- NFTA_SET_FLAGS = 0x3
- NFTA_SET_KEY_TYPE = 0x4
- NFTA_SET_KEY_LEN = 0x5
- NFTA_SET_DATA_TYPE = 0x6
- NFTA_SET_DATA_LEN = 0x7
- NFTA_SET_POLICY = 0x8
- NFTA_SET_DESC = 0x9
- NFTA_SET_ID = 0xa
- NFTA_SET_TIMEOUT = 0xb
- NFTA_SET_GC_INTERVAL = 0xc
- NFTA_SET_USERDATA = 0xd
- NFTA_SET_PAD = 0xe
- NFTA_SET_OBJ_TYPE = 0xf
- NFT_SET_ELEM_INTERVAL_END = 0x1
- NFTA_SET_ELEM_UNSPEC = 0x0
- NFTA_SET_ELEM_KEY = 0x1
- NFTA_SET_ELEM_DATA = 0x2
- NFTA_SET_ELEM_FLAGS = 0x3
- NFTA_SET_ELEM_TIMEOUT = 0x4
- NFTA_SET_ELEM_EXPIRATION = 0x5
- NFTA_SET_ELEM_USERDATA = 0x6
- NFTA_SET_ELEM_EXPR = 0x7
- NFTA_SET_ELEM_PAD = 0x8
- NFTA_SET_ELEM_OBJREF = 0x9
- NFTA_SET_ELEM_LIST_UNSPEC = 0x0
- NFTA_SET_ELEM_LIST_TABLE = 0x1
- NFTA_SET_ELEM_LIST_SET = 0x2
- NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
- NFTA_SET_ELEM_LIST_SET_ID = 0x4
- NFT_DATA_VALUE = 0x0
- NFT_DATA_VERDICT = 0xffffff00
- NFTA_DATA_UNSPEC = 0x0
- NFTA_DATA_VALUE = 0x1
- NFTA_DATA_VERDICT = 0x2
- NFTA_VERDICT_UNSPEC = 0x0
- NFTA_VERDICT_CODE = 0x1
- NFTA_VERDICT_CHAIN = 0x2
- NFTA_EXPR_UNSPEC = 0x0
- NFTA_EXPR_NAME = 0x1
- NFTA_EXPR_DATA = 0x2
- NFTA_IMMEDIATE_UNSPEC = 0x0
- NFTA_IMMEDIATE_DREG = 0x1
- NFTA_IMMEDIATE_DATA = 0x2
- NFTA_BITWISE_UNSPEC = 0x0
- NFTA_BITWISE_SREG = 0x1
- NFTA_BITWISE_DREG = 0x2
- NFTA_BITWISE_LEN = 0x3
- NFTA_BITWISE_MASK = 0x4
- NFTA_BITWISE_XOR = 0x5
- NFT_BYTEORDER_NTOH = 0x0
- NFT_BYTEORDER_HTON = 0x1
- NFTA_BYTEORDER_UNSPEC = 0x0
- NFTA_BYTEORDER_SREG = 0x1
- NFTA_BYTEORDER_DREG = 0x2
- NFTA_BYTEORDER_OP = 0x3
- NFTA_BYTEORDER_LEN = 0x4
- NFTA_BYTEORDER_SIZE = 0x5
- NFT_CMP_EQ = 0x0
- NFT_CMP_NEQ = 0x1
- NFT_CMP_LT = 0x2
- NFT_CMP_LTE = 0x3
- NFT_CMP_GT = 0x4
- NFT_CMP_GTE = 0x5
- NFTA_CMP_UNSPEC = 0x0
- NFTA_CMP_SREG = 0x1
- NFTA_CMP_OP = 0x2
- NFTA_CMP_DATA = 0x3
- NFT_RANGE_EQ = 0x0
- NFT_RANGE_NEQ = 0x1
- NFTA_RANGE_UNSPEC = 0x0
- NFTA_RANGE_SREG = 0x1
- NFTA_RANGE_OP = 0x2
- NFTA_RANGE_FROM_DATA = 0x3
- NFTA_RANGE_TO_DATA = 0x4
- NFT_LOOKUP_F_INV = 0x1
- NFTA_LOOKUP_UNSPEC = 0x0
- NFTA_LOOKUP_SET = 0x1
- NFTA_LOOKUP_SREG = 0x2
- NFTA_LOOKUP_DREG = 0x3
- NFTA_LOOKUP_SET_ID = 0x4
- NFTA_LOOKUP_FLAGS = 0x5
- NFT_DYNSET_OP_ADD = 0x0
- NFT_DYNSET_OP_UPDATE = 0x1
- NFT_DYNSET_F_INV = 0x1
- NFTA_DYNSET_UNSPEC = 0x0
- NFTA_DYNSET_SET_NAME = 0x1
- NFTA_DYNSET_SET_ID = 0x2
- NFTA_DYNSET_OP = 0x3
- NFTA_DYNSET_SREG_KEY = 0x4
- NFTA_DYNSET_SREG_DATA = 0x5
- NFTA_DYNSET_TIMEOUT = 0x6
- NFTA_DYNSET_EXPR = 0x7
- NFTA_DYNSET_PAD = 0x8
- NFTA_DYNSET_FLAGS = 0x9
- NFT_PAYLOAD_LL_HEADER = 0x0
- NFT_PAYLOAD_NETWORK_HEADER = 0x1
- NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
- NFT_PAYLOAD_CSUM_NONE = 0x0
- NFT_PAYLOAD_CSUM_INET = 0x1
- NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
- NFTA_PAYLOAD_UNSPEC = 0x0
- NFTA_PAYLOAD_DREG = 0x1
- NFTA_PAYLOAD_BASE = 0x2
- NFTA_PAYLOAD_OFFSET = 0x3
- NFTA_PAYLOAD_LEN = 0x4
- NFTA_PAYLOAD_SREG = 0x5
- NFTA_PAYLOAD_CSUM_TYPE = 0x6
- NFTA_PAYLOAD_CSUM_OFFSET = 0x7
- NFTA_PAYLOAD_CSUM_FLAGS = 0x8
- NFT_EXTHDR_F_PRESENT = 0x1
- NFT_EXTHDR_OP_IPV6 = 0x0
- NFT_EXTHDR_OP_TCPOPT = 0x1
- NFTA_EXTHDR_UNSPEC = 0x0
- NFTA_EXTHDR_DREG = 0x1
- NFTA_EXTHDR_TYPE = 0x2
- NFTA_EXTHDR_OFFSET = 0x3
- NFTA_EXTHDR_LEN = 0x4
- NFTA_EXTHDR_FLAGS = 0x5
- NFTA_EXTHDR_OP = 0x6
- NFTA_EXTHDR_SREG = 0x7
- NFT_META_LEN = 0x0
- NFT_META_PROTOCOL = 0x1
- NFT_META_PRIORITY = 0x2
- NFT_META_MARK = 0x3
- NFT_META_IIF = 0x4
- NFT_META_OIF = 0x5
- NFT_META_IIFNAME = 0x6
- NFT_META_OIFNAME = 0x7
- NFT_META_IIFTYPE = 0x8
- NFT_META_OIFTYPE = 0x9
- NFT_META_SKUID = 0xa
- NFT_META_SKGID = 0xb
- NFT_META_NFTRACE = 0xc
- NFT_META_RTCLASSID = 0xd
- NFT_META_SECMARK = 0xe
- NFT_META_NFPROTO = 0xf
- NFT_META_L4PROTO = 0x10
- NFT_META_BRI_IIFNAME = 0x11
- NFT_META_BRI_OIFNAME = 0x12
- NFT_META_PKTTYPE = 0x13
- NFT_META_CPU = 0x14
- NFT_META_IIFGROUP = 0x15
- NFT_META_OIFGROUP = 0x16
- NFT_META_CGROUP = 0x17
- NFT_META_PRANDOM = 0x18
- NFT_RT_CLASSID = 0x0
- NFT_RT_NEXTHOP4 = 0x1
- NFT_RT_NEXTHOP6 = 0x2
- NFT_RT_TCPMSS = 0x3
- NFT_HASH_JENKINS = 0x0
- NFT_HASH_SYM = 0x1
- NFTA_HASH_UNSPEC = 0x0
- NFTA_HASH_SREG = 0x1
- NFTA_HASH_DREG = 0x2
- NFTA_HASH_LEN = 0x3
- NFTA_HASH_MODULUS = 0x4
- NFTA_HASH_SEED = 0x5
- NFTA_HASH_OFFSET = 0x6
- NFTA_HASH_TYPE = 0x7
- NFTA_META_UNSPEC = 0x0
- NFTA_META_DREG = 0x1
- NFTA_META_KEY = 0x2
- NFTA_META_SREG = 0x3
- NFTA_RT_UNSPEC = 0x0
- NFTA_RT_DREG = 0x1
- NFTA_RT_KEY = 0x2
- NFT_CT_STATE = 0x0
- NFT_CT_DIRECTION = 0x1
- NFT_CT_STATUS = 0x2
- NFT_CT_MARK = 0x3
- NFT_CT_SECMARK = 0x4
- NFT_CT_EXPIRATION = 0x5
- NFT_CT_HELPER = 0x6
- NFT_CT_L3PROTOCOL = 0x7
- NFT_CT_SRC = 0x8
- NFT_CT_DST = 0x9
- NFT_CT_PROTOCOL = 0xa
- NFT_CT_PROTO_SRC = 0xb
- NFT_CT_PROTO_DST = 0xc
- NFT_CT_LABELS = 0xd
- NFT_CT_PKTS = 0xe
- NFT_CT_BYTES = 0xf
- NFT_CT_AVGPKT = 0x10
- NFT_CT_ZONE = 0x11
- NFT_CT_EVENTMASK = 0x12
- NFTA_CT_UNSPEC = 0x0
- NFTA_CT_DREG = 0x1
- NFTA_CT_KEY = 0x2
- NFTA_CT_DIRECTION = 0x3
- NFTA_CT_SREG = 0x4
- NFT_LIMIT_PKTS = 0x0
- NFT_LIMIT_PKT_BYTES = 0x1
- NFT_LIMIT_F_INV = 0x1
- NFTA_LIMIT_UNSPEC = 0x0
- NFTA_LIMIT_RATE = 0x1
- NFTA_LIMIT_UNIT = 0x2
- NFTA_LIMIT_BURST = 0x3
- NFTA_LIMIT_TYPE = 0x4
- NFTA_LIMIT_FLAGS = 0x5
- NFTA_LIMIT_PAD = 0x6
- NFTA_COUNTER_UNSPEC = 0x0
- NFTA_COUNTER_BYTES = 0x1
- NFTA_COUNTER_PACKETS = 0x2
- NFTA_COUNTER_PAD = 0x3
- NFTA_LOG_UNSPEC = 0x0
- NFTA_LOG_GROUP = 0x1
- NFTA_LOG_PREFIX = 0x2
- NFTA_LOG_SNAPLEN = 0x3
- NFTA_LOG_QTHRESHOLD = 0x4
- NFTA_LOG_LEVEL = 0x5
- NFTA_LOG_FLAGS = 0x6
- NFTA_QUEUE_UNSPEC = 0x0
- NFTA_QUEUE_NUM = 0x1
- NFTA_QUEUE_TOTAL = 0x2
- NFTA_QUEUE_FLAGS = 0x3
- NFTA_QUEUE_SREG_QNUM = 0x4
- NFT_QUOTA_F_INV = 0x1
- NFT_QUOTA_F_DEPLETED = 0x2
- NFTA_QUOTA_UNSPEC = 0x0
- NFTA_QUOTA_BYTES = 0x1
- NFTA_QUOTA_FLAGS = 0x2
- NFTA_QUOTA_PAD = 0x3
- NFTA_QUOTA_CONSUMED = 0x4
- NFT_REJECT_ICMP_UNREACH = 0x0
- NFT_REJECT_TCP_RST = 0x1
- NFT_REJECT_ICMPX_UNREACH = 0x2
- NFT_REJECT_ICMPX_NO_ROUTE = 0x0
- NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
- NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
- NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
- NFTA_REJECT_UNSPEC = 0x0
- NFTA_REJECT_TYPE = 0x1
- NFTA_REJECT_ICMP_CODE = 0x2
- NFT_NAT_SNAT = 0x0
- NFT_NAT_DNAT = 0x1
- NFTA_NAT_UNSPEC = 0x0
- NFTA_NAT_TYPE = 0x1
- NFTA_NAT_FAMILY = 0x2
- NFTA_NAT_REG_ADDR_MIN = 0x3
- NFTA_NAT_REG_ADDR_MAX = 0x4
- NFTA_NAT_REG_PROTO_MIN = 0x5
- NFTA_NAT_REG_PROTO_MAX = 0x6
- NFTA_NAT_FLAGS = 0x7
- NFTA_MASQ_UNSPEC = 0x0
- NFTA_MASQ_FLAGS = 0x1
- NFTA_MASQ_REG_PROTO_MIN = 0x2
- NFTA_MASQ_REG_PROTO_MAX = 0x3
- NFTA_REDIR_UNSPEC = 0x0
- NFTA_REDIR_REG_PROTO_MIN = 0x1
- NFTA_REDIR_REG_PROTO_MAX = 0x2
- NFTA_REDIR_FLAGS = 0x3
- NFTA_DUP_UNSPEC = 0x0
- NFTA_DUP_SREG_ADDR = 0x1
- NFTA_DUP_SREG_DEV = 0x2
- NFTA_FWD_UNSPEC = 0x0
- NFTA_FWD_SREG_DEV = 0x1
- NFTA_OBJREF_UNSPEC = 0x0
- NFTA_OBJREF_IMM_TYPE = 0x1
- NFTA_OBJREF_IMM_NAME = 0x2
- NFTA_OBJREF_SET_SREG = 0x3
- NFTA_OBJREF_SET_NAME = 0x4
- NFTA_OBJREF_SET_ID = 0x5
- NFTA_GEN_UNSPEC = 0x0
- NFTA_GEN_ID = 0x1
- NFTA_GEN_PROC_PID = 0x2
- NFTA_GEN_PROC_NAME = 0x3
- NFTA_FIB_UNSPEC = 0x0
- NFTA_FIB_DREG = 0x1
- NFTA_FIB_RESULT = 0x2
- NFTA_FIB_FLAGS = 0x3
- NFT_FIB_RESULT_UNSPEC = 0x0
- NFT_FIB_RESULT_OIF = 0x1
- NFT_FIB_RESULT_OIFNAME = 0x2
- NFT_FIB_RESULT_ADDRTYPE = 0x3
- NFTA_FIB_F_SADDR = 0x1
- NFTA_FIB_F_DADDR = 0x2
- NFTA_FIB_F_MARK = 0x4
- NFTA_FIB_F_IIF = 0x8
- NFTA_FIB_F_OIF = 0x10
- NFTA_FIB_F_PRESENT = 0x20
- NFTA_CT_HELPER_UNSPEC = 0x0
- NFTA_CT_HELPER_NAME = 0x1
- NFTA_CT_HELPER_L3PROTO = 0x2
- NFTA_CT_HELPER_L4PROTO = 0x3
- NFTA_OBJ_UNSPEC = 0x0
- NFTA_OBJ_TABLE = 0x1
- NFTA_OBJ_NAME = 0x2
- NFTA_OBJ_TYPE = 0x3
- NFTA_OBJ_DATA = 0x4
- NFTA_OBJ_USE = 0x5
- NFTA_TRACE_UNSPEC = 0x0
- NFTA_TRACE_TABLE = 0x1
- NFTA_TRACE_CHAIN = 0x2
- NFTA_TRACE_RULE_HANDLE = 0x3
- NFTA_TRACE_TYPE = 0x4
- NFTA_TRACE_VERDICT = 0x5
- NFTA_TRACE_ID = 0x6
- NFTA_TRACE_LL_HEADER = 0x7
- NFTA_TRACE_NETWORK_HEADER = 0x8
- NFTA_TRACE_TRANSPORT_HEADER = 0x9
- NFTA_TRACE_IIF = 0xa
- NFTA_TRACE_IIFTYPE = 0xb
- NFTA_TRACE_OIF = 0xc
- NFTA_TRACE_OIFTYPE = 0xd
- NFTA_TRACE_MARK = 0xe
- NFTA_TRACE_NFPROTO = 0xf
- NFTA_TRACE_POLICY = 0x10
- NFTA_TRACE_PAD = 0x11
- NFT_TRACETYPE_UNSPEC = 0x0
- NFT_TRACETYPE_POLICY = 0x1
- NFT_TRACETYPE_RETURN = 0x2
- NFT_TRACETYPE_RULE = 0x3
- NFTA_NG_UNSPEC = 0x0
- NFTA_NG_DREG = 0x1
- NFTA_NG_MODULUS = 0x2
- NFTA_NG_TYPE = 0x3
- NFTA_NG_OFFSET = 0x4
- NFT_NG_INCREMENTAL = 0x0
- NFT_NG_RANDOM = 0x1
-)
-
-type RTCTime struct {
- Sec int32
- Min int32
- Hour int32
- Mday int32
- Mon int32
- Year int32
- Wday int32
- Yday int32
- Isdst int32
-}
-
-type RTCWkAlrm struct {
- Enabled uint8
- Pending uint8
- Time RTCTime
-}
-
type RTCPLLInfo struct {
Ctrl int32
Value int32
@@ -2053,13 +419,6 @@ type RTCPLLInfo struct {
Clock int64
}
-type BlkpgIoctlArg struct {
- Op int32
- Flags int32
- Datalen int32
- Data *byte
-}
-
type BlkpgPartition struct {
Start int64
Length int64
@@ -2070,33 +429,9 @@ type BlkpgPartition struct {
}
const (
- BLKPG = 0x20001269
- BLKPG_ADD_PARTITION = 0x1
- BLKPG_DEL_PARTITION = 0x2
- BLKPG_RESIZE_PARTITION = 0x3
-)
-
-const (
- NETNSA_NONE = 0x0
- NETNSA_NSID = 0x1
- NETNSA_PID = 0x2
- NETNSA_FD = 0x3
+ BLKPG = 0x20001269
)
-type XDPRingOffset struct {
- Producer uint64
- Consumer uint64
- Desc uint64
- Flags uint64
-}
-
-type XDPMmapOffsets struct {
- Rx XDPRingOffset
- Tx XDPRingOffset
- Fr XDPRingOffset
- Cr XDPRingOffset
-}
-
type XDPUmemReg struct {
Addr uint64
Len uint64
@@ -2106,135 +441,6 @@ type XDPUmemReg struct {
_ [4]byte
}
-type XDPStatistics struct {
- Rx_dropped uint64
- Rx_invalid_descs uint64
- Tx_invalid_descs uint64
-}
-
-type XDPDesc struct {
- Addr uint64
- Len uint32
- Options uint32
-}
-
-const (
- NCSI_CMD_UNSPEC = 0x0
- NCSI_CMD_PKG_INFO = 0x1
- NCSI_CMD_SET_INTERFACE = 0x2
- NCSI_CMD_CLEAR_INTERFACE = 0x3
- NCSI_ATTR_UNSPEC = 0x0
- NCSI_ATTR_IFINDEX = 0x1
- NCSI_ATTR_PACKAGE_LIST = 0x2
- NCSI_ATTR_PACKAGE_ID = 0x3
- NCSI_ATTR_CHANNEL_ID = 0x4
- NCSI_PKG_ATTR_UNSPEC = 0x0
- NCSI_PKG_ATTR = 0x1
- NCSI_PKG_ATTR_ID = 0x2
- NCSI_PKG_ATTR_FORCED = 0x3
- NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
- NCSI_CHANNEL_ATTR_UNSPEC = 0x0
- NCSI_CHANNEL_ATTR = 0x1
- NCSI_CHANNEL_ATTR_ID = 0x2
- NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
- NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
- NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
- NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
- NCSI_CHANNEL_ATTR_ACTIVE = 0x7
- NCSI_CHANNEL_ATTR_FORCED = 0x8
- NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
- NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
-)
-
-type ScmTimestamping struct {
- Ts [3]Timespec
-}
-
-const (
- SOF_TIMESTAMPING_TX_HARDWARE = 0x1
- SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
- SOF_TIMESTAMPING_RX_HARDWARE = 0x4
- SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
- SOF_TIMESTAMPING_SOFTWARE = 0x10
- SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
- SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
- SOF_TIMESTAMPING_OPT_ID = 0x80
- SOF_TIMESTAMPING_TX_SCHED = 0x100
- SOF_TIMESTAMPING_TX_ACK = 0x200
- SOF_TIMESTAMPING_OPT_CMSG = 0x400
- SOF_TIMESTAMPING_OPT_TSONLY = 0x800
- SOF_TIMESTAMPING_OPT_STATS = 0x1000
- SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
- SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
-
- SOF_TIMESTAMPING_LAST = 0x4000
- SOF_TIMESTAMPING_MASK = 0x7fff
-
- SCM_TSTAMP_SND = 0x0
- SCM_TSTAMP_SCHED = 0x1
- SCM_TSTAMP_ACK = 0x2
-)
-
-type SockExtendedErr struct {
- Errno uint32
- Origin uint8
- Type uint8
- Code uint8
- Pad uint8
- Info uint32
- Data uint32
-}
-
-type FanotifyEventMetadata struct {
- Event_len uint32
- Vers uint8
- Reserved uint8
- Metadata_len uint16
- Mask uint64
- Fd int32
- Pid int32
-}
-
-type FanotifyResponse struct {
- Fd int32
- Response uint32
-}
-
-const (
- CRYPTO_MSG_BASE = 0x10
- CRYPTO_MSG_NEWALG = 0x10
- CRYPTO_MSG_DELALG = 0x11
- CRYPTO_MSG_UPDATEALG = 0x12
- CRYPTO_MSG_GETALG = 0x13
- CRYPTO_MSG_DELRNG = 0x14
- CRYPTO_MSG_GETSTAT = 0x15
-)
-
-const (
- CRYPTOCFGA_UNSPEC = 0x0
- CRYPTOCFGA_PRIORITY_VAL = 0x1
- CRYPTOCFGA_REPORT_LARVAL = 0x2
- CRYPTOCFGA_REPORT_HASH = 0x3
- CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
- CRYPTOCFGA_REPORT_AEAD = 0x5
- CRYPTOCFGA_REPORT_COMPRESS = 0x6
- CRYPTOCFGA_REPORT_RNG = 0x7
- CRYPTOCFGA_REPORT_CIPHER = 0x8
- CRYPTOCFGA_REPORT_AKCIPHER = 0x9
- CRYPTOCFGA_REPORT_KPP = 0xa
- CRYPTOCFGA_REPORT_ACOMP = 0xb
- CRYPTOCFGA_STAT_LARVAL = 0xc
- CRYPTOCFGA_STAT_HASH = 0xd
- CRYPTOCFGA_STAT_BLKCIPHER = 0xe
- CRYPTOCFGA_STAT_AEAD = 0xf
- CRYPTOCFGA_STAT_COMPRESS = 0x10
- CRYPTOCFGA_STAT_RNG = 0x11
- CRYPTOCFGA_STAT_CIPHER = 0x12
- CRYPTOCFGA_STAT_AKCIPHER = 0x13
- CRYPTOCFGA_STAT_KPP = 0x14
- CRYPTOCFGA_STAT_ACOMP = 0x15
-)
-
type CryptoUserAlg struct {
Name [64]int8
Driver_name [64]int8
@@ -2365,218 +571,6 @@ type CryptoReportAcomp struct {
Type [64]int8
}
-const (
- BPF_REG_0 = 0x0
- BPF_REG_1 = 0x1
- BPF_REG_2 = 0x2
- BPF_REG_3 = 0x3
- BPF_REG_4 = 0x4
- BPF_REG_5 = 0x5
- BPF_REG_6 = 0x6
- BPF_REG_7 = 0x7
- BPF_REG_8 = 0x8
- BPF_REG_9 = 0x9
- BPF_REG_10 = 0xa
- BPF_MAP_CREATE = 0x0
- BPF_MAP_LOOKUP_ELEM = 0x1
- BPF_MAP_UPDATE_ELEM = 0x2
- BPF_MAP_DELETE_ELEM = 0x3
- BPF_MAP_GET_NEXT_KEY = 0x4
- BPF_PROG_LOAD = 0x5
- BPF_OBJ_PIN = 0x6
- BPF_OBJ_GET = 0x7
- BPF_PROG_ATTACH = 0x8
- BPF_PROG_DETACH = 0x9
- BPF_PROG_TEST_RUN = 0xa
- BPF_PROG_GET_NEXT_ID = 0xb
- BPF_MAP_GET_NEXT_ID = 0xc
- BPF_PROG_GET_FD_BY_ID = 0xd
- BPF_MAP_GET_FD_BY_ID = 0xe
- BPF_OBJ_GET_INFO_BY_FD = 0xf
- BPF_PROG_QUERY = 0x10
- BPF_RAW_TRACEPOINT_OPEN = 0x11
- BPF_BTF_LOAD = 0x12
- BPF_BTF_GET_FD_BY_ID = 0x13
- BPF_TASK_FD_QUERY = 0x14
- BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
- BPF_MAP_TYPE_UNSPEC = 0x0
- BPF_MAP_TYPE_HASH = 0x1
- BPF_MAP_TYPE_ARRAY = 0x2
- BPF_MAP_TYPE_PROG_ARRAY = 0x3
- BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
- BPF_MAP_TYPE_PERCPU_HASH = 0x5
- BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
- BPF_MAP_TYPE_STACK_TRACE = 0x7
- BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
- BPF_MAP_TYPE_LRU_HASH = 0x9
- BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
- BPF_MAP_TYPE_LPM_TRIE = 0xb
- BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
- BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
- BPF_MAP_TYPE_DEVMAP = 0xe
- BPF_MAP_TYPE_SOCKMAP = 0xf
- BPF_MAP_TYPE_CPUMAP = 0x10
- BPF_MAP_TYPE_XSKMAP = 0x11
- BPF_MAP_TYPE_SOCKHASH = 0x12
- BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
- BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
- BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
- BPF_MAP_TYPE_QUEUE = 0x16
- BPF_MAP_TYPE_STACK = 0x17
- BPF_PROG_TYPE_UNSPEC = 0x0
- BPF_PROG_TYPE_SOCKET_FILTER = 0x1
- BPF_PROG_TYPE_KPROBE = 0x2
- BPF_PROG_TYPE_SCHED_CLS = 0x3
- BPF_PROG_TYPE_SCHED_ACT = 0x4
- BPF_PROG_TYPE_TRACEPOINT = 0x5
- BPF_PROG_TYPE_XDP = 0x6
- BPF_PROG_TYPE_PERF_EVENT = 0x7
- BPF_PROG_TYPE_CGROUP_SKB = 0x8
- BPF_PROG_TYPE_CGROUP_SOCK = 0x9
- BPF_PROG_TYPE_LWT_IN = 0xa
- BPF_PROG_TYPE_LWT_OUT = 0xb
- BPF_PROG_TYPE_LWT_XMIT = 0xc
- BPF_PROG_TYPE_SOCK_OPS = 0xd
- BPF_PROG_TYPE_SK_SKB = 0xe
- BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
- BPF_PROG_TYPE_SK_MSG = 0x10
- BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
- BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
- BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
- BPF_PROG_TYPE_LIRC_MODE2 = 0x14
- BPF_PROG_TYPE_SK_REUSEPORT = 0x15
- BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
- BPF_CGROUP_INET_INGRESS = 0x0
- BPF_CGROUP_INET_EGRESS = 0x1
- BPF_CGROUP_INET_SOCK_CREATE = 0x2
- BPF_CGROUP_SOCK_OPS = 0x3
- BPF_SK_SKB_STREAM_PARSER = 0x4
- BPF_SK_SKB_STREAM_VERDICT = 0x5
- BPF_CGROUP_DEVICE = 0x6
- BPF_SK_MSG_VERDICT = 0x7
- BPF_CGROUP_INET4_BIND = 0x8
- BPF_CGROUP_INET6_BIND = 0x9
- BPF_CGROUP_INET4_CONNECT = 0xa
- BPF_CGROUP_INET6_CONNECT = 0xb
- BPF_CGROUP_INET4_POST_BIND = 0xc
- BPF_CGROUP_INET6_POST_BIND = 0xd
- BPF_CGROUP_UDP4_SENDMSG = 0xe
- BPF_CGROUP_UDP6_SENDMSG = 0xf
- BPF_LIRC_MODE2 = 0x10
- BPF_FLOW_DISSECTOR = 0x11
- BPF_STACK_BUILD_ID_EMPTY = 0x0
- BPF_STACK_BUILD_ID_VALID = 0x1
- BPF_STACK_BUILD_ID_IP = 0x2
- BPF_ADJ_ROOM_NET = 0x0
- BPF_HDR_START_MAC = 0x0
- BPF_HDR_START_NET = 0x1
- BPF_LWT_ENCAP_SEG6 = 0x0
- BPF_LWT_ENCAP_SEG6_INLINE = 0x1
- BPF_OK = 0x0
- BPF_DROP = 0x2
- BPF_REDIRECT = 0x7
- BPF_SOCK_OPS_VOID = 0x0
- BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
- BPF_SOCK_OPS_RWND_INIT = 0x2
- BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
- BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
- BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
- BPF_SOCK_OPS_NEEDS_ECN = 0x6
- BPF_SOCK_OPS_BASE_RTT = 0x7
- BPF_SOCK_OPS_RTO_CB = 0x8
- BPF_SOCK_OPS_RETRANS_CB = 0x9
- BPF_SOCK_OPS_STATE_CB = 0xa
- BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
- BPF_TCP_ESTABLISHED = 0x1
- BPF_TCP_SYN_SENT = 0x2
- BPF_TCP_SYN_RECV = 0x3
- BPF_TCP_FIN_WAIT1 = 0x4
- BPF_TCP_FIN_WAIT2 = 0x5
- BPF_TCP_TIME_WAIT = 0x6
- BPF_TCP_CLOSE = 0x7
- BPF_TCP_CLOSE_WAIT = 0x8
- BPF_TCP_LAST_ACK = 0x9
- BPF_TCP_LISTEN = 0xa
- BPF_TCP_CLOSING = 0xb
- BPF_TCP_NEW_SYN_RECV = 0xc
- BPF_TCP_MAX_STATES = 0xd
- BPF_FIB_LKUP_RET_SUCCESS = 0x0
- BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
- BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
- BPF_FIB_LKUP_RET_PROHIBIT = 0x3
- BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
- BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
- BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
- BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
- BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
- BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
- BPF_FD_TYPE_TRACEPOINT = 0x1
- BPF_FD_TYPE_KPROBE = 0x2
- BPF_FD_TYPE_KRETPROBE = 0x3
- BPF_FD_TYPE_UPROBE = 0x4
- BPF_FD_TYPE_URETPROBE = 0x5
-)
-
-const (
- RTNLGRP_NONE = 0x0
- RTNLGRP_LINK = 0x1
- RTNLGRP_NOTIFY = 0x2
- RTNLGRP_NEIGH = 0x3
- RTNLGRP_TC = 0x4
- RTNLGRP_IPV4_IFADDR = 0x5
- RTNLGRP_IPV4_MROUTE = 0x6
- RTNLGRP_IPV4_ROUTE = 0x7
- RTNLGRP_IPV4_RULE = 0x8
- RTNLGRP_IPV6_IFADDR = 0x9
- RTNLGRP_IPV6_MROUTE = 0xa
- RTNLGRP_IPV6_ROUTE = 0xb
- RTNLGRP_IPV6_IFINFO = 0xc
- RTNLGRP_DECnet_IFADDR = 0xd
- RTNLGRP_NOP2 = 0xe
- RTNLGRP_DECnet_ROUTE = 0xf
- RTNLGRP_DECnet_RULE = 0x10
- RTNLGRP_NOP4 = 0x11
- RTNLGRP_IPV6_PREFIX = 0x12
- RTNLGRP_IPV6_RULE = 0x13
- RTNLGRP_ND_USEROPT = 0x14
- RTNLGRP_PHONET_IFADDR = 0x15
- RTNLGRP_PHONET_ROUTE = 0x16
- RTNLGRP_DCB = 0x17
- RTNLGRP_IPV4_NETCONF = 0x18
- RTNLGRP_IPV6_NETCONF = 0x19
- RTNLGRP_MDB = 0x1a
- RTNLGRP_MPLS_ROUTE = 0x1b
- RTNLGRP_NSID = 0x1c
- RTNLGRP_MPLS_NETCONF = 0x1d
- RTNLGRP_IPV4_MROUTE_R = 0x1e
- RTNLGRP_IPV6_MROUTE_R = 0x1f
- RTNLGRP_NEXTHOP = 0x20
-)
-
-type CapUserHeader struct {
- Version uint32
- Pid int32
-}
-
-type CapUserData struct {
- Effective uint32
- Permitted uint32
- Inheritable uint32
-}
-
-const (
- LINUX_CAPABILITY_VERSION_1 = 0x19980330
- LINUX_CAPABILITY_VERSION_2 = 0x20071026
- LINUX_CAPABILITY_VERSION_3 = 0x20080522
-)
-
-const (
- LO_FLAGS_READ_ONLY = 0x1
- LO_FLAGS_AUTOCLEAR = 0x4
- LO_FLAGS_PARTSCAN = 0x8
- LO_FLAGS_DIRECT_IO = 0x10
-)
-
type LoopInfo struct {
Number int32
Device uint32
@@ -2592,38 +586,6 @@ type LoopInfo struct {
Reserved [4]int8
_ [4]byte
}
-type LoopInfo64 struct {
- Device uint64
- Inode uint64
- Rdevice uint64
- Offset uint64
- Sizelimit uint64
- Number uint32
- Encrypt_type uint32
- Encrypt_key_size uint32
- Flags uint32
- File_name [64]uint8
- Crypt_name [64]uint8
- Encrypt_key [32]uint8
- Init [2]uint64
-}
-
-type TIPCSocketAddr struct {
- Ref uint32
- Node uint32
-}
-
-type TIPCServiceRange struct {
- Type uint32
- Lower uint32
- Upper uint32
-}
-
-type TIPCServiceName struct {
- Type uint32
- Instance uint32
- Domain uint32
-}
type TIPCSubscr struct {
Seq TIPCServiceRange
@@ -2632,21 +594,6 @@ type TIPCSubscr struct {
Handle [8]int8
}
-type TIPCEvent struct {
- Event uint32
- Lower uint32
- Upper uint32
- Port TIPCSocketAddr
- S TIPCSubscr
-}
-
-type TIPCGroupReq struct {
- Type uint32
- Instance uint32
- Scope uint32
- Flags uint32
-}
-
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
@@ -2658,150 +605,18 @@ type TIPCSIOCNodeIDReq struct {
Id [16]int8
}
-const (
- TIPC_CLUSTER_SCOPE = 0x2
- TIPC_NODE_SCOPE = 0x3
-)
-
-const (
- SYSLOG_ACTION_CLOSE = 0
- SYSLOG_ACTION_OPEN = 1
- SYSLOG_ACTION_READ = 2
- SYSLOG_ACTION_READ_ALL = 3
- SYSLOG_ACTION_READ_CLEAR = 4
- SYSLOG_ACTION_CLEAR = 5
- SYSLOG_ACTION_CONSOLE_OFF = 6
- SYSLOG_ACTION_CONSOLE_ON = 7
- SYSLOG_ACTION_CONSOLE_LEVEL = 8
- SYSLOG_ACTION_SIZE_UNREAD = 9
- SYSLOG_ACTION_SIZE_BUFFER = 10
-)
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
const (
- DEVLINK_CMD_UNSPEC = 0x0
- DEVLINK_CMD_GET = 0x1
- DEVLINK_CMD_SET = 0x2
- DEVLINK_CMD_NEW = 0x3
- DEVLINK_CMD_DEL = 0x4
- DEVLINK_CMD_PORT_GET = 0x5
- DEVLINK_CMD_PORT_SET = 0x6
- DEVLINK_CMD_PORT_NEW = 0x7
- DEVLINK_CMD_PORT_DEL = 0x8
- DEVLINK_CMD_PORT_SPLIT = 0x9
- DEVLINK_CMD_PORT_UNSPLIT = 0xa
- DEVLINK_CMD_SB_GET = 0xb
- DEVLINK_CMD_SB_SET = 0xc
- DEVLINK_CMD_SB_NEW = 0xd
- DEVLINK_CMD_SB_DEL = 0xe
- DEVLINK_CMD_SB_POOL_GET = 0xf
- DEVLINK_CMD_SB_POOL_SET = 0x10
- DEVLINK_CMD_SB_POOL_NEW = 0x11
- DEVLINK_CMD_SB_POOL_DEL = 0x12
- DEVLINK_CMD_SB_PORT_POOL_GET = 0x13
- DEVLINK_CMD_SB_PORT_POOL_SET = 0x14
- DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15
- DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16
- DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17
- DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18
- DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19
- DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a
- DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b
- DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c
- DEVLINK_CMD_ESWITCH_GET = 0x1d
- DEVLINK_CMD_ESWITCH_SET = 0x1e
- DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f
- DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20
- DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21
- DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22
- DEVLINK_CMD_MAX = 0x44
- DEVLINK_PORT_TYPE_NOTSET = 0x0
- DEVLINK_PORT_TYPE_AUTO = 0x1
- DEVLINK_PORT_TYPE_ETH = 0x2
- DEVLINK_PORT_TYPE_IB = 0x3
- DEVLINK_SB_POOL_TYPE_INGRESS = 0x0
- DEVLINK_SB_POOL_TYPE_EGRESS = 0x1
- DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0
- DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1
- DEVLINK_ESWITCH_MODE_LEGACY = 0x0
- DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0
- DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1
- DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2
- DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3
- DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0
- DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1
- DEVLINK_ATTR_UNSPEC = 0x0
- DEVLINK_ATTR_BUS_NAME = 0x1
- DEVLINK_ATTR_DEV_NAME = 0x2
- DEVLINK_ATTR_PORT_INDEX = 0x3
- DEVLINK_ATTR_PORT_TYPE = 0x4
- DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5
- DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6
- DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7
- DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8
- DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9
- DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa
- DEVLINK_ATTR_SB_INDEX = 0xb
- DEVLINK_ATTR_SB_SIZE = 0xc
- DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd
- DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe
- DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf
- DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10
- DEVLINK_ATTR_SB_POOL_INDEX = 0x11
- DEVLINK_ATTR_SB_POOL_TYPE = 0x12
- DEVLINK_ATTR_SB_POOL_SIZE = 0x13
- DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14
- DEVLINK_ATTR_SB_THRESHOLD = 0x15
- DEVLINK_ATTR_SB_TC_INDEX = 0x16
- DEVLINK_ATTR_SB_OCC_CUR = 0x17
- DEVLINK_ATTR_SB_OCC_MAX = 0x18
- DEVLINK_ATTR_ESWITCH_MODE = 0x19
- DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a
- DEVLINK_ATTR_DPIPE_TABLES = 0x1b
- DEVLINK_ATTR_DPIPE_TABLE = 0x1c
- DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d
- DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e
- DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f
- DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20
- DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21
- DEVLINK_ATTR_DPIPE_ENTRIES = 0x22
- DEVLINK_ATTR_DPIPE_ENTRY = 0x23
- DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24
- DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25
- DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26
- DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27
- DEVLINK_ATTR_DPIPE_MATCH = 0x28
- DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29
- DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a
- DEVLINK_ATTR_DPIPE_ACTION = 0x2b
- DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c
- DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d
- DEVLINK_ATTR_DPIPE_VALUE = 0x2e
- DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f
- DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30
- DEVLINK_ATTR_DPIPE_HEADERS = 0x31
- DEVLINK_ATTR_DPIPE_HEADER = 0x32
- DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33
- DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34
- DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35
- DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36
- DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37
- DEVLINK_ATTR_DPIPE_FIELD = 0x38
- DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39
- DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a
- DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b
- DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c
- DEVLINK_ATTR_PAD = 0x3d
- DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e
- DEVLINK_ATTR_MAX = 0x8c
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
- DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
- DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
- DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0
- DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0
- DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0
- DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0
- DEVLINK_DPIPE_HEADER_ETHERNET = 0x0
- DEVLINK_DPIPE_HEADER_IPV4 = 0x1
- DEVLINK_DPIPE_HEADER_IPV6 = 0x2
+ PPS_GETPARAMS = 0x400870a1
+ PPS_SETPARAMS = 0x800870a2
+ PPS_GETCAP = 0x400870a3
+ PPS_FETCH = 0xc00870a4
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
index a89100c..b10e73a 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
@@ -1,6 +1,7 @@
// cgo -godefs types_netbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && netbsd
// +build 386,netbsd
package unix
@@ -248,6 +249,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x1c
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
index 289184e..28ed6d5 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_netbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && netbsd
// +build amd64,netbsd
package unix
@@ -255,6 +256,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
index 428c450..4ba196e 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
@@ -1,6 +1,7 @@
// cgo -godefs types_netbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && netbsd
// +build arm,netbsd
package unix
@@ -253,6 +254,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x1c
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go
index 6f1f284..dd642bd 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_netbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && netbsd
// +build arm64,netbsd
package unix
@@ -255,6 +256,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
index 61ea001..1fdb0e5 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
@@ -1,6 +1,7 @@
// cgo -godefs types_openbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build 386 && openbsd
// +build 386,openbsd
package unix
@@ -231,6 +232,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x20
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x1c
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
index 87a493f..e2fc93c 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_openbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && openbsd
// +build amd64,openbsd
package unix
@@ -235,6 +236,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x20
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
index d80836e..8d34b5a 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
@@ -1,6 +1,7 @@
// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm && openbsd
// +build arm,openbsd
package unix
@@ -235,6 +236,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x20
SizeofLinger = 0x8
+ SizeofIovec = 0x8
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x1c
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
index 4e15874..ea8f1a0 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
@@ -1,6 +1,7 @@
// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build arm64 && openbsd
// +build arm64,openbsd
package unix
@@ -231,6 +232,7 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x20
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
new file mode 100644
index 0000000..ec6e8bc
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
@@ -0,0 +1,567 @@
+// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build mips64 && openbsd
+// +build mips64,openbsd
+
+package unix
+
+const (
+ SizeofPtr = 0x8
+ SizeofShort = 0x2
+ SizeofInt = 0x4
+ SizeofLong = 0x8
+ SizeofLongLong = 0x8
+)
+
+type (
+ _C_short int16
+ _C_int int32
+ _C_long int64
+ _C_long_long int64
+)
+
+type Timespec struct {
+ Sec int64
+ Nsec int64
+}
+
+type Timeval struct {
+ Sec int64
+ Usec int64
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int64
+ Ixrss int64
+ Idrss int64
+ Isrss int64
+ Minflt int64
+ Majflt int64
+ Nswap int64
+ Inblock int64
+ Oublock int64
+ Msgsnd int64
+ Msgrcv int64
+ Nsignals int64
+ Nvcsw int64
+ Nivcsw int64
+}
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+type _Gid_t uint32
+
+type Stat_t struct {
+ Mode uint32
+ Dev int32
+ Ino uint64
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Rdev int32
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ Size int64
+ Blocks int64
+ Blksize int32
+ Flags uint32
+ Gen uint32
+ _ Timespec
+}
+
+type Statfs_t struct {
+ F_flags uint32
+ F_bsize uint32
+ F_iosize uint32
+ F_blocks uint64
+ F_bfree uint64
+ F_bavail int64
+ F_files uint64
+ F_ffree uint64
+ F_favail int64
+ F_syncwrites uint64
+ F_syncreads uint64
+ F_asyncwrites uint64
+ F_asyncreads uint64
+ F_fsid Fsid
+ F_namemax uint32
+ F_owner uint32
+ F_ctime uint64
+ F_fstypename [16]int8
+ F_mntonname [90]int8
+ F_mntfromname [90]int8
+ F_mntfromspec [90]int8
+ _ [2]byte
+ Mount_info [160]byte
+}
+
+type Flock_t struct {
+ Start int64
+ Len int64
+ Pid int32
+ Type int16
+ Whence int16
+}
+
+type Dirent struct {
+ Fileno uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Namlen uint8
+ _ [4]uint8
+ Name [256]int8
+}
+
+type Fsid struct {
+ Val [2]int32
+}
+
+const (
+ PathMax = 0x400
+)
+
+type RawSockaddrInet4 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type RawSockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Len uint8
+ Family uint8
+ Path [104]int8
+}
+
+type RawSockaddrDatalink struct {
+ Len uint8
+ Family uint8
+ Index uint16
+ Type uint8
+ Nlen uint8
+ Alen uint8
+ Slen uint8
+ Data [24]int8
+}
+
+type RawSockaddr struct {
+ Len uint8
+ Family uint8
+ Data [14]int8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ Pad [92]int8
+}
+
+type _Socklen uint32
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type Msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *Iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type Cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type Inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Filt [8]uint32
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x6c
+ SizeofSockaddrUnix = 0x6a
+ SizeofSockaddrDatalink = 0x20
+ SizeofLinger = 0x8
+ SizeofIovec = 0x10
+ SizeofIPMreq = 0x8
+ SizeofIPv6Mreq = 0x14
+ SizeofMsghdr = 0x30
+ SizeofCmsghdr = 0xc
+ SizeofInet6Pktinfo = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofICMPv6Filter = 0x20
+)
+
+const (
+ PTRACE_TRACEME = 0x0
+ PTRACE_CONT = 0x7
+ PTRACE_KILL = 0x8
+)
+
+type Kevent_t struct {
+ Ident uint64
+ Filter int16
+ Flags uint16
+ Fflags uint32
+ Data int64
+ Udata *byte
+}
+
+type FdSet struct {
+ Bits [32]uint32
+}
+
+const (
+ SizeofIfMsghdr = 0xa8
+ SizeofIfData = 0x90
+ SizeofIfaMsghdr = 0x18
+ SizeofIfAnnounceMsghdr = 0x1a
+ SizeofRtMsghdr = 0x60
+ SizeofRtMetrics = 0x38
+)
+
+type IfMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Pad1 uint8
+ Pad2 uint8
+ Addrs int32
+ Flags int32
+ Xflags int32
+ Data IfData
+}
+
+type IfData struct {
+ Type uint8
+ Addrlen uint8
+ Hdrlen uint8
+ Link_state uint8
+ Mtu uint32
+ Metric uint32
+ Rdomain uint32
+ Baudrate uint64
+ Ipackets uint64
+ Ierrors uint64
+ Opackets uint64
+ Oerrors uint64
+ Collisions uint64
+ Ibytes uint64
+ Obytes uint64
+ Imcasts uint64
+ Omcasts uint64
+ Iqdrops uint64
+ Oqdrops uint64
+ Noproto uint64
+ Capabilities uint32
+ Lastchange Timeval
+}
+
+type IfaMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Pad1 uint8
+ Pad2 uint8
+ Addrs int32
+ Flags int32
+ Metric int32
+}
+
+type IfAnnounceMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ What uint16
+ Name [16]int8
+}
+
+type RtMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Priority uint8
+ Mpls uint8
+ Addrs int32
+ Flags int32
+ Fmask int32
+ Pid int32
+ Seq int32
+ Errno int32
+ Inits uint32
+ Rmx RtMetrics
+}
+
+type RtMetrics struct {
+ Pksent uint64
+ Expire int64
+ Locks uint32
+ Mtu uint32
+ Refcnt uint32
+ Hopcount uint32
+ Recvpipe uint32
+ Sendpipe uint32
+ Ssthresh uint32
+ Rtt uint32
+ Rttvar uint32
+ Pad uint32
+}
+
+type Mclpool struct{}
+
+const (
+ SizeofBpfVersion = 0x4
+ SizeofBpfStat = 0x8
+ SizeofBpfProgram = 0x10
+ SizeofBpfInsn = 0x8
+ SizeofBpfHdr = 0x14
+)
+
+type BpfVersion struct {
+ Major uint16
+ Minor uint16
+}
+
+type BpfStat struct {
+ Recv uint32
+ Drop uint32
+}
+
+type BpfProgram struct {
+ Len uint32
+ Insns *BpfInsn
+}
+
+type BpfInsn struct {
+ Code uint16
+ Jt uint8
+ Jf uint8
+ K uint32
+}
+
+type BpfHdr struct {
+ Tstamp BpfTimeval
+ Caplen uint32
+ Datalen uint32
+ Hdrlen uint16
+ _ [2]byte
+}
+
+type BpfTimeval struct {
+ Sec uint32
+ Usec uint32
+}
+
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [20]uint8
+ Ispeed int32
+ Ospeed int32
+}
+
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
+const (
+ AT_FDCWD = -0x64
+ AT_SYMLINK_FOLLOW = 0x4
+ AT_SYMLINK_NOFOLLOW = 0x2
+)
+
+type PollFd struct {
+ Fd int32
+ Events int16
+ Revents int16
+}
+
+const (
+ POLLERR = 0x8
+ POLLHUP = 0x10
+ POLLIN = 0x1
+ POLLNVAL = 0x20
+ POLLOUT = 0x4
+ POLLPRI = 0x2
+ POLLRDBAND = 0x80
+ POLLRDNORM = 0x40
+ POLLWRBAND = 0x100
+ POLLWRNORM = 0x4
+)
+
+type Sigset_t uint32
+
+type Utsname struct {
+ Sysname [256]byte
+ Nodename [256]byte
+ Release [256]byte
+ Version [256]byte
+ Machine [256]byte
+}
+
+const SizeofUvmexp = 0x158
+
+type Uvmexp struct {
+ Pagesize int32
+ Pagemask int32
+ Pageshift int32
+ Npages int32
+ Free int32
+ Active int32
+ Inactive int32
+ Paging int32
+ Wired int32
+ Zeropages int32
+ Reserve_pagedaemon int32
+ Reserve_kernel int32
+ Unused01 int32
+ Vnodepages int32
+ Vtextpages int32
+ Freemin int32
+ Freetarg int32
+ Inactarg int32
+ Wiredmax int32
+ Anonmin int32
+ Vtextmin int32
+ Vnodemin int32
+ Anonminpct int32
+ Vtextminpct int32
+ Vnodeminpct int32
+ Nswapdev int32
+ Swpages int32
+ Swpginuse int32
+ Swpgonly int32
+ Nswget int32
+ Nanon int32
+ Unused05 int32
+ Unused06 int32
+ Faults int32
+ Traps int32
+ Intrs int32
+ Swtch int32
+ Softs int32
+ Syscalls int32
+ Pageins int32
+ Unused07 int32
+ Unused08 int32
+ Pgswapin int32
+ Pgswapout int32
+ Forks int32
+ Forks_ppwait int32
+ Forks_sharevm int32
+ Pga_zerohit int32
+ Pga_zeromiss int32
+ Unused09 int32
+ Fltnoram int32
+ Fltnoanon int32
+ Fltnoamap int32
+ Fltpgwait int32
+ Fltpgrele int32
+ Fltrelck int32
+ Fltrelckok int32
+ Fltanget int32
+ Fltanretry int32
+ Fltamcopy int32
+ Fltnamap int32
+ Fltnomap int32
+ Fltlget int32
+ Fltget int32
+ Flt_anon int32
+ Flt_acow int32
+ Flt_obj int32
+ Flt_prcopy int32
+ Flt_przero int32
+ Pdwoke int32
+ Pdrevs int32
+ Pdswout int32
+ Pdfreed int32
+ Pdscans int32
+ Pdanscan int32
+ Pdobscan int32
+ Pdreact int32
+ Pdbusy int32
+ Pdpageouts int32
+ Pdpending int32
+ Pddeact int32
+ Unused11 int32
+ Unused12 int32
+ Unused13 int32
+ Fpswtch int32
+ Kmapent int32
+}
+
+const SizeofClockinfo = 0x14
+
+type Clockinfo struct {
+ Hz int32
+ Tick int32
+ Tickadj int32
+ Stathz int32
+ Profhz int32
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
index 23ed9fe..85effef 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
@@ -1,6 +1,7 @@
// cgo -godefs types_solaris.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build amd64 && solaris
// +build amd64,solaris
package unix
@@ -88,7 +89,6 @@ type Stat_t struct {
Mtim Timespec
Ctim Timespec
Blksize int32
- _ [4]byte
Blocks int64
Fstype [16]int8
}
@@ -96,7 +96,6 @@ type Stat_t struct {
type Flock_t struct {
Type int16
Whence int16
- _ [4]byte
Start int64
Len int64
Sysid int32
@@ -138,12 +137,12 @@ type RawSockaddrInet4 struct {
}
type RawSockaddrInet6 struct {
- Family uint16
- Port uint16
- Flowinfo uint32
- Addr [16]byte /* in6_addr */
- Scope_id uint32
- X__sin6_src_id uint32
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+ _ uint32
}
type RawSockaddrUnix struct {
@@ -196,10 +195,8 @@ type IPv6Mreq struct {
type Msghdr struct {
Name *byte
Namelen uint32
- _ [4]byte
Iov *Iovec
Iovlen int32
- _ [4]byte
Accrights *int8
Accrightslen int32
_ [4]byte
@@ -228,7 +225,7 @@ type IPv6MTUInfo struct {
}
type ICMPv6Filter struct {
- X__icmp6_filt [8]uint32
+ Filt [8]uint32
}
const (
@@ -238,6 +235,7 @@ const (
SizeofSockaddrUnix = 0x6e
SizeofSockaddrDatalink = 0xfc
SizeofLinger = 0x8
+ SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPv6Mreq = 0x14
SizeofMsghdr = 0x30
@@ -291,7 +289,6 @@ type IfMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Data IfData
}
@@ -299,7 +296,6 @@ type IfData struct {
Type uint8
Addrlen uint8
Hdrlen uint8
- _ [1]byte
Mtu uint32
Metric uint32
Baudrate uint32
@@ -324,7 +320,6 @@ type IfaMsghdr struct {
Addrs int32
Flags int32
Index uint16
- _ [2]byte
Metric int32
}
@@ -333,7 +328,6 @@ type RtMsghdr struct {
Version uint8
Type uint8
Index uint16
- _ [2]byte
Flags int32
Addrs int32
Pid int32
@@ -371,15 +365,14 @@ type BpfVersion struct {
}
type BpfStat struct {
- Recv uint64
- Drop uint64
- Capt uint64
- Padding [13]uint64
+ Recv uint64
+ Drop uint64
+ Capt uint64
+ _ [13]uint64
}
type BpfProgram struct {
Len uint32
- _ [4]byte
Insns *BpfInsn
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
new file mode 100644
index 0000000..8bffde7
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
@@ -0,0 +1,402 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build zos && s390x
+// +build zos,s390x
+
+// Hand edited based on ztypes_linux_s390x.go
+// TODO: auto-generate.
+
+package unix
+
+const (
+ SizeofPtr = 0x8
+ SizeofShort = 0x2
+ SizeofInt = 0x4
+ SizeofLong = 0x8
+ SizeofLongLong = 0x8
+ PathMax = 0x1000
+)
+
+const (
+ SizeofSockaddrAny = 128
+ SizeofCmsghdr = 12
+ SizeofIPMreq = 8
+ SizeofIPv6Mreq = 20
+ SizeofICMPv6Filter = 32
+ SizeofIPv6MTUInfo = 32
+ SizeofLinger = 8
+ SizeofSockaddrInet4 = 16
+ SizeofSockaddrInet6 = 28
+ SizeofTCPInfo = 0x68
+)
+
+type (
+ _C_short int16
+ _C_int int32
+ _C_long int64
+ _C_long_long int64
+)
+
+type Timespec struct {
+ Sec int64
+ Nsec int64
+}
+
+type Timeval struct {
+ Sec int64
+ Usec int64
+}
+
+type timeval_zos struct { //correct (with padding and all)
+ Sec int64
+ _ [4]byte // pad
+ Usec int32
+}
+
+type Tms struct { //clock_t is 4-byte unsigned int in zos
+ Utime uint32
+ Stime uint32
+ Cutime uint32
+ Cstime uint32
+}
+
+type Time_t int64
+
+type Utimbuf struct {
+ Actime int64
+ Modtime int64
+}
+
+type Utsname struct {
+ Sysname [65]byte
+ Nodename [65]byte
+ Release [65]byte
+ Version [65]byte
+ Machine [65]byte
+ Domainname [65]byte
+}
+
+type RawSockaddrInet4 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]uint8
+}
+
+type RawSockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Len uint8
+ Family uint8
+ Path [108]int8
+}
+
+type RawSockaddr struct {
+ Len uint8
+ Family uint8
+ Data [14]uint8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ _ [112]uint8 // pad
+}
+
+type _Socklen uint32
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type Msghdr struct {
+ Name *byte
+ Iov *Iovec
+ Control *byte
+ Flags int32
+ Namelen int32
+ Iovlen int32
+ Controllen int32
+}
+
+type Cmsghdr struct {
+ Len int32
+ Level int32
+ Type int32
+}
+
+type Inet4Pktinfo struct {
+ Addr [4]byte /* in_addr */
+ Ifindex uint32
+}
+
+type Inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Data [8]uint32
+}
+
+type TCPInfo struct {
+ State uint8
+ Ca_state uint8
+ Retransmits uint8
+ Probes uint8
+ Backoff uint8
+ Options uint8
+ Rto uint32
+ Ato uint32
+ Snd_mss uint32
+ Rcv_mss uint32
+ Unacked uint32
+ Sacked uint32
+ Lost uint32
+ Retrans uint32
+ Fackets uint32
+ Last_data_sent uint32
+ Last_ack_sent uint32
+ Last_data_recv uint32
+ Last_ack_recv uint32
+ Pmtu uint32
+ Rcv_ssthresh uint32
+ Rtt uint32
+ Rttvar uint32
+ Snd_ssthresh uint32
+ Snd_cwnd uint32
+ Advmss uint32
+ Reordering uint32
+ Rcv_rtt uint32
+ Rcv_space uint32
+ Total_retrans uint32
+}
+
+type _Gid_t uint32
+
+type rusage_zos struct {
+ Utime timeval_zos
+ Stime timeval_zos
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int64
+ Ixrss int64
+ Idrss int64
+ Isrss int64
+ Minflt int64
+ Majflt int64
+ Nswap int64
+ Inblock int64
+ Oublock int64
+ Msgsnd int64
+ Msgrcv int64
+ Nsignals int64
+ Nvcsw int64
+ Nivcsw int64
+}
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+// { int, short, short } in poll.h
+type PollFd struct {
+ Fd int32
+ Events int16
+ Revents int16
+}
+
+type Stat_t struct { //Linux Definition
+ Dev uint64
+ Ino uint64
+ Nlink uint64
+ Mode uint32
+ Uid uint32
+ Gid uint32
+ _ int32
+ Rdev uint64
+ Size int64
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ Blksize int64
+ Blocks int64
+ _ [3]int64
+}
+
+type Stat_LE_t struct {
+ _ [4]byte // eye catcher
+ Length uint16
+ Version uint16
+ Mode int32
+ Ino uint32
+ Dev uint32
+ Nlink int32
+ Uid int32
+ Gid int32
+ Size int64
+ Atim31 [4]byte
+ Mtim31 [4]byte
+ Ctim31 [4]byte
+ Rdev uint32
+ Auditoraudit uint32
+ Useraudit uint32
+ Blksize int32
+ Creatim31 [4]byte
+ AuditID [16]byte
+ _ [4]byte // rsrvd1
+ File_tag struct {
+ Ccsid uint16
+ Txtflag uint16 // aggregating Txflag:1 deferred:1 rsvflags:14
+ }
+ CharsetID [8]byte
+ Blocks int64
+ Genvalue uint32
+ Reftim31 [4]byte
+ Fid [8]byte
+ Filefmt byte
+ Fspflag2 byte
+ _ [2]byte // rsrvd2
+ Ctimemsec int32
+ Seclabel [8]byte
+ _ [4]byte // rsrvd3
+ _ [4]byte // rsrvd4
+ Atim Time_t
+ Mtim Time_t
+ Ctim Time_t
+ Creatim Time_t
+ Reftim Time_t
+ _ [24]byte // rsrvd5
+}
+
+type Statvfs_t struct {
+ ID [4]byte
+ Len int32
+ Bsize uint64
+ Blocks uint64
+ Usedspace uint64
+ Bavail uint64
+ Flag uint64
+ Maxfilesize int64
+ _ [16]byte
+ Frsize uint64
+ Bfree uint64
+ Files uint32
+ Ffree uint32
+ Favail uint32
+ Namemax31 uint32
+ Invarsec uint32
+ _ [4]byte
+ Fsid uint64
+ Namemax uint64
+}
+
+type Statfs_t struct {
+ Type uint32
+ Bsize uint64
+ Blocks uint64
+ Bfree uint64
+ Bavail uint64
+ Files uint32
+ Ffree uint32
+ Fsid uint64
+ Namelen uint64
+ Frsize uint64
+ Flags uint64
+}
+
+type Dirent struct {
+ Reclen uint16
+ Namlen uint16
+ Ino uint32
+ Extra uintptr
+ Name [256]byte
+}
+
+// This struct is packed on z/OS so it can't be used directly.
+type Flock_t struct {
+ Type int16
+ Whence int16
+ Start int64
+ Len int64
+ Pid int32
+}
+
+type Termios struct {
+ Cflag uint32
+ Iflag uint32
+ Lflag uint32
+ Oflag uint32
+ Cc [11]uint8
+}
+
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
+type W_Mnth struct {
+ Hid [4]byte
+ Size int32
+ Cur1 int32 //32bit pointer
+ Cur2 int32 //^
+ Devno uint32
+ _ [4]byte
+}
+
+type W_Mntent struct {
+ Fstype uint32
+ Mode uint32
+ Dev uint32
+ Parentdev uint32
+ Rootino uint32
+ Status byte
+ Ddname [9]byte
+ Fstname [9]byte
+ Fsname [45]byte
+ Pathlen uint32
+ Mountpoint [1024]byte
+ Jobname [8]byte
+ PID int32
+ Parmoffset int32
+ Parmlen int16
+ Owner [8]byte
+ Quiesceowner [8]byte
+ _ [38]byte
+}
diff --git a/vendor/golang.org/x/sys/windows/dll_windows.go b/vendor/golang.org/x/sys/windows/dll_windows.go
index d777113..115341f 100644
--- a/vendor/golang.org/x/sys/windows/dll_windows.go
+++ b/vendor/golang.org/x/sys/windows/dll_windows.go
@@ -32,6 +32,8 @@ type DLLError struct {
func (e *DLLError) Error() string { return e.Msg }
+func (e *DLLError) Unwrap() error { return e.Err }
+
// A DLL implements access to a single DLL.
type DLL struct {
Name string
@@ -104,6 +106,35 @@ func (d *DLL) MustFindProc(name string) *Proc {
return p
}
+// FindProcByOrdinal searches DLL d for procedure by ordinal and returns *Proc
+// if found. It returns an error if search fails.
+func (d *DLL) FindProcByOrdinal(ordinal uintptr) (proc *Proc, err error) {
+ a, e := GetProcAddressByOrdinal(d.Handle, ordinal)
+ name := "#" + itoa(int(ordinal))
+ if e != nil {
+ return nil, &DLLError{
+ Err: e,
+ ObjName: name,
+ Msg: "Failed to find " + name + " procedure in " + d.Name + ": " + e.Error(),
+ }
+ }
+ p := &Proc{
+ Dll: d,
+ Name: name,
+ addr: a,
+ }
+ return p, nil
+}
+
+// MustFindProcByOrdinal is like FindProcByOrdinal but panics if search fails.
+func (d *DLL) MustFindProcByOrdinal(ordinal uintptr) *Proc {
+ p, e := d.FindProcByOrdinal(ordinal)
+ if e != nil {
+ panic(e)
+ }
+ return p
+}
+
// Release unloads DLL d from memory.
func (d *DLL) Release() (err error) {
return FreeLibrary(d.Handle)
@@ -360,7 +391,6 @@ func loadLibraryEx(name string, system bool) (*DLL, error) {
var flags uintptr
if system {
if canDoSearchSystem32() {
- const LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800
flags = LOAD_LIBRARY_SEARCH_SYSTEM32
} else if isBaseName(name) {
// WindowsXP or unpatched Windows machine
diff --git a/vendor/golang.org/x/sys/windows/env_windows.go b/vendor/golang.org/x/sys/windows/env_windows.go
index f482a9f..92ac05f 100644
--- a/vendor/golang.org/x/sys/windows/env_windows.go
+++ b/vendor/golang.org/x/sys/windows/env_windows.go
@@ -8,7 +8,6 @@ package windows
import (
"syscall"
- "unicode/utf16"
"unsafe"
)
@@ -40,17 +39,11 @@ func (token Token) Environ(inheritExisting bool) (env []string, err error) {
defer DestroyEnvironmentBlock(block)
blockp := uintptr(unsafe.Pointer(block))
for {
- entry := (*[(1 << 30) - 1]uint16)(unsafe.Pointer(blockp))[:]
- for i, v := range entry {
- if v == 0 {
- entry = entry[:i]
- break
- }
- }
+ entry := UTF16PtrToString((*uint16)(unsafe.Pointer(blockp)))
if len(entry) == 0 {
break
}
- env = append(env, string(utf16.Decode(entry)))
+ env = append(env, entry)
blockp += 2 * (uintptr(len(entry)) + 1)
}
return env, nil
diff --git a/vendor/golang.org/x/sys/windows/exec_windows.go b/vendor/golang.org/x/sys/windows/exec_windows.go
index 3606c3a..9eb1fb6 100644
--- a/vendor/golang.org/x/sys/windows/exec_windows.go
+++ b/vendor/golang.org/x/sys/windows/exec_windows.go
@@ -6,6 +6,11 @@
package windows
+import (
+ errorspkg "errors"
+ "unsafe"
+)
+
// EscapeArg rewrites command line argument s as prescribed
// in http://msdn.microsoft.com/en-us/library/ms880421.
// This function returns "" (2 double quotes) if s is empty.
@@ -95,3 +100,33 @@ func FullPath(name string) (path string, err error) {
}
}
}
+
+// NewProcThreadAttributeList allocates a new ProcThreadAttributeList, with the requested maximum number of attributes.
+func NewProcThreadAttributeList(maxAttrCount uint32) (*ProcThreadAttributeList, error) {
+ var size uintptr
+ err := initializeProcThreadAttributeList(nil, maxAttrCount, 0, &size)
+ if err != ERROR_INSUFFICIENT_BUFFER {
+ if err == nil {
+ return nil, errorspkg.New("unable to query buffer size from InitializeProcThreadAttributeList")
+ }
+ return nil, err
+ }
+ const psize = unsafe.Sizeof(uintptr(0))
+ // size is guaranteed to be ≥1 by InitializeProcThreadAttributeList.
+ al := (*ProcThreadAttributeList)(unsafe.Pointer(&make([]unsafe.Pointer, (size+psize-1)/psize)[0]))
+ err = initializeProcThreadAttributeList(al, maxAttrCount, 0, &size)
+ if err != nil {
+ return nil, err
+ }
+ return al, err
+}
+
+// Update modifies the ProcThreadAttributeList using UpdateProcThreadAttribute.
+func (al *ProcThreadAttributeList) Update(attribute uintptr, flags uint32, value unsafe.Pointer, size uintptr, prevValue unsafe.Pointer, returnedSize *uintptr) error {
+ return updateProcThreadAttribute(al, flags, attribute, value, size, prevValue, returnedSize)
+}
+
+// Delete frees ProcThreadAttributeList's resources.
+func (al *ProcThreadAttributeList) Delete() {
+ deleteProcThreadAttributeList(al)
+}
diff --git a/vendor/golang.org/x/sys/windows/memory_windows.go b/vendor/golang.org/x/sys/windows/memory_windows.go
index f80a420..1adb607 100644
--- a/vendor/golang.org/x/sys/windows/memory_windows.go
+++ b/vendor/golang.org/x/sys/windows/memory_windows.go
@@ -16,11 +16,22 @@ const (
MEM_RESET_UNDO = 0x01000000
MEM_LARGE_PAGES = 0x20000000
- PAGE_NOACCESS = 0x01
- PAGE_READONLY = 0x02
- PAGE_READWRITE = 0x04
- PAGE_WRITECOPY = 0x08
- PAGE_EXECUTE_READ = 0x20
- PAGE_EXECUTE_READWRITE = 0x40
- PAGE_EXECUTE_WRITECOPY = 0x80
+ PAGE_NOACCESS = 0x00000001
+ PAGE_READONLY = 0x00000002
+ PAGE_READWRITE = 0x00000004
+ PAGE_WRITECOPY = 0x00000008
+ PAGE_EXECUTE = 0x00000010
+ PAGE_EXECUTE_READ = 0x00000020
+ PAGE_EXECUTE_READWRITE = 0x00000040
+ PAGE_EXECUTE_WRITECOPY = 0x00000080
+ PAGE_GUARD = 0x00000100
+ PAGE_NOCACHE = 0x00000200
+ PAGE_WRITECOMBINE = 0x00000400
+ PAGE_TARGETS_INVALID = 0x40000000
+ PAGE_TARGETS_NO_UPDATE = 0x40000000
+
+ QUOTA_LIMITS_HARDWS_MIN_DISABLE = 0x00000002
+ QUOTA_LIMITS_HARDWS_MIN_ENABLE = 0x00000001
+ QUOTA_LIMITS_HARDWS_MAX_DISABLE = 0x00000008
+ QUOTA_LIMITS_HARDWS_MAX_ENABLE = 0x00000004
)
diff --git a/vendor/golang.org/x/sys/windows/mkerrors.bash b/vendor/golang.org/x/sys/windows/mkerrors.bash
index 2163843..58e0188 100644
--- a/vendor/golang.org/x/sys/windows/mkerrors.bash
+++ b/vendor/golang.org/x/sys/windows/mkerrors.bash
@@ -9,6 +9,8 @@ shopt -s nullglob
winerror="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/shared/winerror.h | sort -Vr | head -n 1)"
[[ -n $winerror ]] || { echo "Unable to find winerror.h" >&2; exit 1; }
+ntstatus="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/shared/ntstatus.h | sort -Vr | head -n 1)"
+[[ -n $ntstatus ]] || { echo "Unable to find ntstatus.h" >&2; exit 1; }
declare -A errors
@@ -59,5 +61,10 @@ declare -A errors
echo "$key $vtype = $value"
done < "$winerror"
+ while read -r line; do
+ [[ $line =~ ^#define\ (STATUS_[^\s]+)\ +\(\(NTSTATUS\)((0x)?[0-9a-fA-F]+)L?\) ]] || continue
+ echo "${BASH_REMATCH[1]} NTStatus = ${BASH_REMATCH[2]}"
+ done < "$ntstatus"
+
echo ")"
} | gofmt > "zerrors_windows.go"
diff --git a/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go
index 3778075..fc1835d 100644
--- a/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go
@@ -19,6 +19,7 @@ const (
var (
errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
+ errERROR_EINVAL error = syscall.EINVAL
)
// errnoErr returns common boxed Errno values, to prevent
@@ -26,7 +27,7 @@ var (
func errnoErr(e syscall.Errno) error {
switch e {
case 0:
- return nil
+ return errERROR_EINVAL
case errnoERROR_IO_PENDING:
return errERROR_IO_PENDING
}
@@ -40,50 +41,50 @@ var (
modadvapi32 = windows.NewLazySystemDLL("advapi32.dll")
modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
+ procRegConnectRegistryW = modadvapi32.NewProc("RegConnectRegistryW")
procRegCreateKeyExW = modadvapi32.NewProc("RegCreateKeyExW")
procRegDeleteKeyW = modadvapi32.NewProc("RegDeleteKeyW")
- procRegSetValueExW = modadvapi32.NewProc("RegSetValueExW")
- procRegEnumValueW = modadvapi32.NewProc("RegEnumValueW")
procRegDeleteValueW = modadvapi32.NewProc("RegDeleteValueW")
+ procRegEnumValueW = modadvapi32.NewProc("RegEnumValueW")
procRegLoadMUIStringW = modadvapi32.NewProc("RegLoadMUIStringW")
- procRegConnectRegistryW = modadvapi32.NewProc("RegConnectRegistryW")
+ procRegSetValueExW = modadvapi32.NewProc("RegSetValueExW")
procExpandEnvironmentStringsW = modkernel32.NewProc("ExpandEnvironmentStringsW")
)
-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)))
+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 regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) {
- r0, _, _ := syscall.Syscall(procRegDeleteKeyW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(subkey)), 0)
+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)))
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
return
}
-func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) {
- r0, _, _ := syscall.Syscall6(procRegSetValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(valueName)), uintptr(reserved), uintptr(vtype), uintptr(unsafe.Pointer(buf)), uintptr(bufsize))
+func regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) {
+ r0, _, _ := syscall.Syscall(procRegDeleteKeyW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(subkey)), 0)
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
return
}
-func regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
- r0, _, _ := syscall.Syscall9(procRegEnumValueW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)), 0)
+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 regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) {
- r0, _, _ := syscall.Syscall(procRegDeleteValueW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(name)), 0)
+func regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
+ r0, _, _ := syscall.Syscall9(procRegEnumValueW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)), 0)
if r0 != 0 {
regerrno = syscall.Errno(r0)
}
@@ -98,8 +99,8 @@ func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint
return
}
-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)))
+func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) {
+ 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 {
regerrno = syscall.Errno(r0)
}
@@ -110,11 +111,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))
n = uint32(r0)
if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go
index 4b6eff1..111c10d 100644
--- a/vendor/golang.org/x/sys/windows/security_windows.go
+++ b/vendor/golang.org/x/sys/windows/security_windows.go
@@ -7,6 +7,8 @@ package windows
import (
"syscall"
"unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
)
const (
@@ -622,6 +624,7 @@ func (tml *Tokenmandatorylabel) Size() uint32 {
// Authorization Functions
//sys checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) = advapi32.CheckTokenMembership
+//sys isTokenRestricted(tokenHandle Token) (ret bool, err error) [!failretval] = advapi32.IsTokenRestricted
//sys OpenProcessToken(process Handle, access uint32, token *Token) (err error) = advapi32.OpenProcessToken
//sys OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token) (err error) = advapi32.OpenThreadToken
//sys ImpersonateSelf(impersonationlevel uint32) (err error) = advapi32.ImpersonateSelf
@@ -835,6 +838,16 @@ func (t Token) IsMember(sid *SID) (bool, error) {
return b != 0, nil
}
+// IsRestricted reports whether the access token t is a restricted token.
+func (t Token) IsRestricted() (isRestricted bool, err error) {
+ isRestricted, err = isTokenRestricted(t)
+ if !isRestricted && err == syscall.EINVAL {
+ // If err is EINVAL, this returned ERROR_SUCCESS indicating a non-restricted token.
+ err = nil
+ }
+ return
+}
+
const (
WTS_CONSOLE_CONNECT = 0x1
WTS_CONSOLE_DISCONNECT = 0x2
@@ -895,6 +908,19 @@ type SECURITY_DESCRIPTOR struct {
dacl *ACL
}
+type SECURITY_QUALITY_OF_SERVICE struct {
+ Length uint32
+ ImpersonationLevel uint32
+ ContextTrackingMode byte
+ EffectiveOnly byte
+}
+
+// Constants for the ContextTrackingMode field of SECURITY_QUALITY_OF_SERVICE.
+const (
+ SECURITY_STATIC_TRACKING = 0
+ SECURITY_DYNAMIC_TRACKING = 1
+)
+
type SecurityAttributes struct {
Length uint32
SecurityDescriptor *SECURITY_DESCRIPTOR
@@ -1101,9 +1127,10 @@ type OBJECTS_AND_NAME struct {
}
//sys getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) = advapi32.GetSecurityInfo
-//sys SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) = advapi32.SetSecurityInfo
+//sys SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) = advapi32.SetSecurityInfo
//sys getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) = advapi32.GetNamedSecurityInfoW
//sys SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) = advapi32.SetNamedSecurityInfoW
+//sys SetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) = advapi32.SetKernelObjectSecurity
//sys buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) = advapi32.BuildSecurityDescriptorW
//sys initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) = advapi32.InitializeSecurityDescriptor
@@ -1229,7 +1256,7 @@ func (sd *SECURITY_DESCRIPTOR) String() string {
return ""
}
defer LocalFree(Handle(unsafe.Pointer(sddl)))
- return UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(sddl))[:])
+ return UTF16PtrToString(sddl)
}
// ToAbsolute converts a self-relative security descriptor into an absolute one.
@@ -1307,9 +1334,29 @@ func (absoluteSD *SECURITY_DESCRIPTOR) ToSelfRelative() (selfRelativeSD *SECURIT
}
func (selfRelativeSD *SECURITY_DESCRIPTOR) copySelfRelativeSecurityDescriptor() *SECURITY_DESCRIPTOR {
- sdBytes := make([]byte, selfRelativeSD.Length())
- copy(sdBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(selfRelativeSD))[:len(sdBytes)])
- return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&sdBytes[0]))
+ sdLen := int(selfRelativeSD.Length())
+ const min = int(unsafe.Sizeof(SECURITY_DESCRIPTOR{}))
+ if sdLen < min {
+ sdLen = min
+ }
+
+ var src []byte
+ h := (*unsafeheader.Slice)(unsafe.Pointer(&src))
+ h.Data = unsafe.Pointer(selfRelativeSD)
+ h.Len = sdLen
+ h.Cap = sdLen
+
+ const psize = int(unsafe.Sizeof(uintptr(0)))
+
+ var dst []byte
+ h = (*unsafeheader.Slice)(unsafe.Pointer(&dst))
+ alloc := make([]uintptr, (sdLen+psize-1)/psize)
+ h.Data = (*unsafeheader.Slice)(unsafe.Pointer(&alloc)).Data
+ h.Len = sdLen
+ h.Cap = sdLen
+
+ copy(dst, src)
+ return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&dst[0]))
}
// SecurityDescriptorFromString converts an SDDL string describing a security descriptor into a
@@ -1391,6 +1438,6 @@ func ACLFromEntries(explicitEntries []EXPLICIT_ACCESS, mergedACL *ACL) (acl *ACL
}
defer LocalFree(Handle(unsafe.Pointer(winHeapACL)))
aclBytes := make([]byte, winHeapACL.aclSize)
- copy(aclBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(winHeapACL))[:len(aclBytes)])
+ copy(aclBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(winHeapACL))[:len(aclBytes):len(aclBytes)])
return (*ACL)(unsafe.Pointer(&aclBytes[0])), nil
}
diff --git a/vendor/golang.org/x/sys/windows/service.go b/vendor/golang.org/x/sys/windows/service.go
index 847e00b..b269850 100644
--- a/vendor/golang.org/x/sys/windows/service.go
+++ b/vendor/golang.org/x/sys/windows/service.go
@@ -65,6 +65,7 @@ const (
SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 32
SERVICE_ACCEPT_POWEREVENT = 64
SERVICE_ACCEPT_SESSIONCHANGE = 128
+ SERVICE_ACCEPT_PRESHUTDOWN = 256
SERVICE_CONTROL_STOP = 1
SERVICE_CONTROL_PAUSE = 2
@@ -80,6 +81,7 @@ const (
SERVICE_CONTROL_HARDWAREPROFILECHANGE = 12
SERVICE_CONTROL_POWEREVENT = 13
SERVICE_CONTROL_SESSIONCHANGE = 14
+ SERVICE_CONTROL_PRESHUTDOWN = 15
SERVICE_ACTIVE = 1
SERVICE_INACTIVE = 2
@@ -126,6 +128,10 @@ const (
SERVICE_NOTIFY_CREATED = 0x00000080
SERVICE_NOTIFY_DELETED = 0x00000100
SERVICE_NOTIFY_DELETE_PENDING = 0x00000200
+
+ SC_EVENT_DATABASE_CHANGE = 0
+ SC_EVENT_PROPERTY_CHANGE = 1
+ SC_EVENT_STATUS_CHANGE = 2
)
type SERVICE_STATUS struct {
@@ -227,3 +233,5 @@ type QUERY_SERVICE_LOCK_STATUS struct {
//sys EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) = advapi32.EnumServicesStatusExW
//sys QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceStatusEx
//sys NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) = advapi32.NotifyServiceStatusChangeW
+//sys SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) = sechost.SubscribeServiceChangeNotifications?
+//sys UnsubscribeServiceChangeNotifications(subscription uintptr) = sechost.UnsubscribeServiceChangeNotifications?
diff --git a/vendor/golang.org/x/sys/windows/setupapierrors_windows.go b/vendor/golang.org/x/sys/windows/setupapierrors_windows.go
new file mode 100644
index 0000000..1681810
--- /dev/null
+++ b/vendor/golang.org/x/sys/windows/setupapierrors_windows.go
@@ -0,0 +1,100 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package windows
+
+import "syscall"
+
+const (
+ ERROR_EXPECTED_SECTION_NAME syscall.Errno = 0x20000000 | 0xC0000000 | 0
+ ERROR_BAD_SECTION_NAME_LINE syscall.Errno = 0x20000000 | 0xC0000000 | 1
+ ERROR_SECTION_NAME_TOO_LONG syscall.Errno = 0x20000000 | 0xC0000000 | 2
+ ERROR_GENERAL_SYNTAX syscall.Errno = 0x20000000 | 0xC0000000 | 3
+ ERROR_WRONG_INF_STYLE syscall.Errno = 0x20000000 | 0xC0000000 | 0x100
+ ERROR_SECTION_NOT_FOUND syscall.Errno = 0x20000000 | 0xC0000000 | 0x101
+ ERROR_LINE_NOT_FOUND syscall.Errno = 0x20000000 | 0xC0000000 | 0x102
+ ERROR_NO_BACKUP syscall.Errno = 0x20000000 | 0xC0000000 | 0x103
+ ERROR_NO_ASSOCIATED_CLASS syscall.Errno = 0x20000000 | 0xC0000000 | 0x200
+ ERROR_CLASS_MISMATCH syscall.Errno = 0x20000000 | 0xC0000000 | 0x201
+ ERROR_DUPLICATE_FOUND syscall.Errno = 0x20000000 | 0xC0000000 | 0x202
+ ERROR_NO_DRIVER_SELECTED syscall.Errno = 0x20000000 | 0xC0000000 | 0x203
+ ERROR_KEY_DOES_NOT_EXIST syscall.Errno = 0x20000000 | 0xC0000000 | 0x204
+ ERROR_INVALID_DEVINST_NAME syscall.Errno = 0x20000000 | 0xC0000000 | 0x205
+ ERROR_INVALID_CLASS syscall.Errno = 0x20000000 | 0xC0000000 | 0x206
+ ERROR_DEVINST_ALREADY_EXISTS syscall.Errno = 0x20000000 | 0xC0000000 | 0x207
+ ERROR_DEVINFO_NOT_REGISTERED syscall.Errno = 0x20000000 | 0xC0000000 | 0x208
+ ERROR_INVALID_REG_PROPERTY syscall.Errno = 0x20000000 | 0xC0000000 | 0x209
+ ERROR_NO_INF syscall.Errno = 0x20000000 | 0xC0000000 | 0x20A
+ ERROR_NO_SUCH_DEVINST syscall.Errno = 0x20000000 | 0xC0000000 | 0x20B
+ ERROR_CANT_LOAD_CLASS_ICON syscall.Errno = 0x20000000 | 0xC0000000 | 0x20C
+ ERROR_INVALID_CLASS_INSTALLER syscall.Errno = 0x20000000 | 0xC0000000 | 0x20D
+ ERROR_DI_DO_DEFAULT syscall.Errno = 0x20000000 | 0xC0000000 | 0x20E
+ ERROR_DI_NOFILECOPY syscall.Errno = 0x20000000 | 0xC0000000 | 0x20F
+ ERROR_INVALID_HWPROFILE syscall.Errno = 0x20000000 | 0xC0000000 | 0x210
+ ERROR_NO_DEVICE_SELECTED syscall.Errno = 0x20000000 | 0xC0000000 | 0x211
+ ERROR_DEVINFO_LIST_LOCKED syscall.Errno = 0x20000000 | 0xC0000000 | 0x212
+ ERROR_DEVINFO_DATA_LOCKED syscall.Errno = 0x20000000 | 0xC0000000 | 0x213
+ ERROR_DI_BAD_PATH syscall.Errno = 0x20000000 | 0xC0000000 | 0x214
+ ERROR_NO_CLASSINSTALL_PARAMS syscall.Errno = 0x20000000 | 0xC0000000 | 0x215
+ ERROR_FILEQUEUE_LOCKED syscall.Errno = 0x20000000 | 0xC0000000 | 0x216
+ ERROR_BAD_SERVICE_INSTALLSECT syscall.Errno = 0x20000000 | 0xC0000000 | 0x217
+ ERROR_NO_CLASS_DRIVER_LIST syscall.Errno = 0x20000000 | 0xC0000000 | 0x218
+ ERROR_NO_ASSOCIATED_SERVICE syscall.Errno = 0x20000000 | 0xC0000000 | 0x219
+ ERROR_NO_DEFAULT_DEVICE_INTERFACE syscall.Errno = 0x20000000 | 0xC0000000 | 0x21A
+ ERROR_DEVICE_INTERFACE_ACTIVE syscall.Errno = 0x20000000 | 0xC0000000 | 0x21B
+ ERROR_DEVICE_INTERFACE_REMOVED syscall.Errno = 0x20000000 | 0xC0000000 | 0x21C
+ ERROR_BAD_INTERFACE_INSTALLSECT syscall.Errno = 0x20000000 | 0xC0000000 | 0x21D
+ ERROR_NO_SUCH_INTERFACE_CLASS syscall.Errno = 0x20000000 | 0xC0000000 | 0x21E
+ ERROR_INVALID_REFERENCE_STRING syscall.Errno = 0x20000000 | 0xC0000000 | 0x21F
+ ERROR_INVALID_MACHINENAME syscall.Errno = 0x20000000 | 0xC0000000 | 0x220
+ ERROR_REMOTE_COMM_FAILURE syscall.Errno = 0x20000000 | 0xC0000000 | 0x221
+ ERROR_MACHINE_UNAVAILABLE syscall.Errno = 0x20000000 | 0xC0000000 | 0x222
+ ERROR_NO_CONFIGMGR_SERVICES syscall.Errno = 0x20000000 | 0xC0000000 | 0x223
+ ERROR_INVALID_PROPPAGE_PROVIDER syscall.Errno = 0x20000000 | 0xC0000000 | 0x224
+ ERROR_NO_SUCH_DEVICE_INTERFACE syscall.Errno = 0x20000000 | 0xC0000000 | 0x225
+ ERROR_DI_POSTPROCESSING_REQUIRED syscall.Errno = 0x20000000 | 0xC0000000 | 0x226
+ ERROR_INVALID_COINSTALLER syscall.Errno = 0x20000000 | 0xC0000000 | 0x227
+ ERROR_NO_COMPAT_DRIVERS syscall.Errno = 0x20000000 | 0xC0000000 | 0x228
+ ERROR_NO_DEVICE_ICON syscall.Errno = 0x20000000 | 0xC0000000 | 0x229
+ ERROR_INVALID_INF_LOGCONFIG syscall.Errno = 0x20000000 | 0xC0000000 | 0x22A
+ ERROR_DI_DONT_INSTALL syscall.Errno = 0x20000000 | 0xC0000000 | 0x22B
+ ERROR_INVALID_FILTER_DRIVER syscall.Errno = 0x20000000 | 0xC0000000 | 0x22C
+ ERROR_NON_WINDOWS_NT_DRIVER syscall.Errno = 0x20000000 | 0xC0000000 | 0x22D
+ ERROR_NON_WINDOWS_DRIVER syscall.Errno = 0x20000000 | 0xC0000000 | 0x22E
+ ERROR_NO_CATALOG_FOR_OEM_INF syscall.Errno = 0x20000000 | 0xC0000000 | 0x22F
+ ERROR_DEVINSTALL_QUEUE_NONNATIVE syscall.Errno = 0x20000000 | 0xC0000000 | 0x230
+ ERROR_NOT_DISABLEABLE syscall.Errno = 0x20000000 | 0xC0000000 | 0x231
+ ERROR_CANT_REMOVE_DEVINST syscall.Errno = 0x20000000 | 0xC0000000 | 0x232
+ ERROR_INVALID_TARGET syscall.Errno = 0x20000000 | 0xC0000000 | 0x233
+ ERROR_DRIVER_NONNATIVE syscall.Errno = 0x20000000 | 0xC0000000 | 0x234
+ ERROR_IN_WOW64 syscall.Errno = 0x20000000 | 0xC0000000 | 0x235
+ ERROR_SET_SYSTEM_RESTORE_POINT syscall.Errno = 0x20000000 | 0xC0000000 | 0x236
+ ERROR_SCE_DISABLED syscall.Errno = 0x20000000 | 0xC0000000 | 0x238
+ ERROR_UNKNOWN_EXCEPTION syscall.Errno = 0x20000000 | 0xC0000000 | 0x239
+ ERROR_PNP_REGISTRY_ERROR syscall.Errno = 0x20000000 | 0xC0000000 | 0x23A
+ ERROR_REMOTE_REQUEST_UNSUPPORTED syscall.Errno = 0x20000000 | 0xC0000000 | 0x23B
+ ERROR_NOT_AN_INSTALLED_OEM_INF syscall.Errno = 0x20000000 | 0xC0000000 | 0x23C
+ ERROR_INF_IN_USE_BY_DEVICES syscall.Errno = 0x20000000 | 0xC0000000 | 0x23D
+ ERROR_DI_FUNCTION_OBSOLETE syscall.Errno = 0x20000000 | 0xC0000000 | 0x23E
+ ERROR_NO_AUTHENTICODE_CATALOG syscall.Errno = 0x20000000 | 0xC0000000 | 0x23F
+ ERROR_AUTHENTICODE_DISALLOWED syscall.Errno = 0x20000000 | 0xC0000000 | 0x240
+ ERROR_AUTHENTICODE_TRUSTED_PUBLISHER syscall.Errno = 0x20000000 | 0xC0000000 | 0x241
+ ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED syscall.Errno = 0x20000000 | 0xC0000000 | 0x242
+ ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED syscall.Errno = 0x20000000 | 0xC0000000 | 0x243
+ ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH syscall.Errno = 0x20000000 | 0xC0000000 | 0x244
+ ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE syscall.Errno = 0x20000000 | 0xC0000000 | 0x245
+ ERROR_DEVICE_INSTALLER_NOT_READY syscall.Errno = 0x20000000 | 0xC0000000 | 0x246
+ ERROR_DRIVER_STORE_ADD_FAILED syscall.Errno = 0x20000000 | 0xC0000000 | 0x247
+ ERROR_DEVICE_INSTALL_BLOCKED syscall.Errno = 0x20000000 | 0xC0000000 | 0x248
+ ERROR_DRIVER_INSTALL_BLOCKED syscall.Errno = 0x20000000 | 0xC0000000 | 0x249
+ ERROR_WRONG_INF_TYPE syscall.Errno = 0x20000000 | 0xC0000000 | 0x24A
+ ERROR_FILE_HASH_NOT_IN_CATALOG syscall.Errno = 0x20000000 | 0xC0000000 | 0x24B
+ ERROR_DRIVER_STORE_DELETE_FAILED syscall.Errno = 0x20000000 | 0xC0000000 | 0x24C
+ ERROR_UNRECOVERABLE_STACK_OVERFLOW syscall.Errno = 0x20000000 | 0xC0000000 | 0x300
+ EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW syscall.Errno = ERROR_UNRECOVERABLE_STACK_OVERFLOW
+ ERROR_NO_DEFAULT_INTERFACE_DEVICE syscall.Errno = ERROR_NO_DEFAULT_DEVICE_INTERFACE
+ ERROR_INTERFACE_DEVICE_ACTIVE syscall.Errno = ERROR_DEVICE_INTERFACE_ACTIVE
+ ERROR_INTERFACE_DEVICE_REMOVED syscall.Errno = ERROR_DEVICE_INTERFACE_REMOVED
+ ERROR_NO_SUCH_INTERFACE_DEVICE syscall.Errno = ERROR_NO_SUCH_DEVICE_INTERFACE
+)
diff --git a/vendor/golang.org/x/sys/windows/svc/mgr/config.go b/vendor/golang.org/x/sys/windows/svc/mgr/config.go
index 8431edb..da4df63 100644
--- a/vendor/golang.org/x/sys/windows/svc/mgr/config.go
+++ b/vendor/golang.org/x/sys/windows/svc/mgr/config.go
@@ -8,7 +8,6 @@ package mgr
import (
"syscall"
- "unicode/utf16"
"unsafe"
"golang.org/x/sys/windows"
@@ -46,28 +45,21 @@ type Config struct {
DelayedAutoStart bool // the service is started after other auto-start services are started plus a short delay
}
-func toString(p *uint16) string {
- if p == nil {
- return ""
- }
- return syscall.UTF16ToString((*[4096]uint16)(unsafe.Pointer(p))[:])
-}
-
func toStringSlice(ps *uint16) []string {
- if ps == nil {
- return nil
- }
r := make([]string, 0)
- for from, i, p := 0, 0, (*[1 << 24]uint16)(unsafe.Pointer(ps)); true; i++ {
- if p[i] == 0 {
- // empty string marks the end
- if i <= from {
- break
- }
- r = append(r, string(utf16.Decode(p[from:i])))
- from = i + 1
+ p := unsafe.Pointer(ps)
+
+ for {
+ s := windows.UTF16PtrToString((*uint16)(p))
+ if len(s) == 0 {
+ break
}
+
+ r = append(r, s)
+ offset := unsafe.Sizeof(uint16(0)) * (uintptr)(len(s)+1)
+ p = unsafe.Pointer(uintptr(p) + offset)
}
+
return r
}
@@ -106,18 +98,25 @@ func (s *Service) Config() (Config, error) {
delayedStart = true
}
+ b, err = s.queryServiceConfig2(windows.SERVICE_CONFIG_SERVICE_SID_INFO)
+ if err != nil {
+ return Config{}, err
+ }
+ sidType := *(*uint32)(unsafe.Pointer(&b[0]))
+
return Config{
ServiceType: p.ServiceType,
StartType: p.StartType,
ErrorControl: p.ErrorControl,
- BinaryPathName: toString(p.BinaryPathName),
- LoadOrderGroup: toString(p.LoadOrderGroup),
+ BinaryPathName: windows.UTF16PtrToString(p.BinaryPathName),
+ LoadOrderGroup: windows.UTF16PtrToString(p.LoadOrderGroup),
TagId: p.TagId,
Dependencies: toStringSlice(p.Dependencies),
- ServiceStartName: toString(p.ServiceStartName),
- DisplayName: toString(p.DisplayName),
- Description: toString(p2.Description),
+ ServiceStartName: windows.UTF16PtrToString(p.ServiceStartName),
+ DisplayName: windows.UTF16PtrToString(p.DisplayName),
+ Description: windows.UTF16PtrToString(p2.Description),
DelayedAutoStart: delayedStart,
+ SidType: sidType,
}, nil
}
diff --git a/vendor/golang.org/x/sys/windows/svc/mgr/mgr.go b/vendor/golang.org/x/sys/windows/svc/mgr/mgr.go
index 33944d0..8e78daf 100644
--- a/vendor/golang.org/x/sys/windows/svc/mgr/mgr.go
+++ b/vendor/golang.org/x/sys/windows/svc/mgr/mgr.go
@@ -17,6 +17,7 @@ import (
"unicode/utf16"
"unsafe"
+ "golang.org/x/sys/internal/unsafeheader"
"golang.org/x/sys/windows"
)
@@ -73,7 +74,7 @@ func (m *Mgr) LockStatus() (*LockStatus, error) {
status := &LockStatus{
IsLocked: lockStatus.IsLocked != 0,
Age: time.Duration(lockStatus.LockDuration) * time.Second,
- Owner: windows.UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(lockStatus.LockOwner))[:]),
+ Owner: windows.UTF16PtrToString(lockStatus.LockOwner),
}
return status, nil
}
@@ -116,9 +117,6 @@ func (m *Mgr) CreateService(name, exepath string, c Config, args ...string) (*Se
if c.StartType == 0 {
c.StartType = StartManual
}
- if c.ErrorControl == 0 {
- c.ErrorControl = ErrorNormal
- }
if c.ServiceType == 0 {
c.ServiceType = windows.SERVICE_WIN32_OWN_PROCESS
}
@@ -201,10 +199,16 @@ func (m *Mgr) ListServices() ([]string, error) {
if servicesReturned == 0 {
return nil, nil
}
- services := (*[1 << 20]windows.ENUM_SERVICE_STATUS_PROCESS)(unsafe.Pointer(&buf[0]))[:servicesReturned]
+
+ var services []windows.ENUM_SERVICE_STATUS_PROCESS
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&services))
+ hdr.Data = unsafe.Pointer(&buf[0])
+ hdr.Len = int(servicesReturned)
+ hdr.Cap = int(servicesReturned)
+
var names []string
for _, s := range services {
- name := syscall.UTF16ToString((*[1 << 20]uint16)(unsafe.Pointer(s.ServiceName))[:])
+ name := windows.UTF16PtrToString(s.ServiceName)
names = append(names, name)
}
return names, nil
diff --git a/vendor/golang.org/x/sys/windows/svc/mgr/recovery.go b/vendor/golang.org/x/sys/windows/svc/mgr/recovery.go
index 71ce2b8..e465cbb 100644
--- a/vendor/golang.org/x/sys/windows/svc/mgr/recovery.go
+++ b/vendor/golang.org/x/sys/windows/svc/mgr/recovery.go
@@ -12,6 +12,7 @@ import (
"time"
"unsafe"
+ "golang.org/x/sys/internal/unsafeheader"
"golang.org/x/sys/windows"
)
@@ -68,8 +69,13 @@ func (s *Service) RecoveryActions() ([]RecoveryAction, error) {
return nil, err
}
+ var actions []windows.SC_ACTION
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&actions))
+ hdr.Data = unsafe.Pointer(p.Actions)
+ hdr.Len = int(p.ActionsCount)
+ hdr.Cap = int(p.ActionsCount)
+
var recoveryActions []RecoveryAction
- actions := (*[1024]windows.SC_ACTION)(unsafe.Pointer(p.Actions))[:p.ActionsCount]
for _, action := range actions {
recoveryActions = append(recoveryActions, RecoveryAction{Type: int(action.Type), Delay: time.Duration(action.Delay) * time.Millisecond})
}
@@ -112,7 +118,7 @@ func (s *Service) RebootMessage() (string, error) {
return "", err
}
p := (*windows.SERVICE_FAILURE_ACTIONS)(unsafe.Pointer(&b[0]))
- return toString(p.RebootMsg), nil
+ return windows.UTF16PtrToString(p.RebootMsg), nil
}
// SetRecoveryCommand sets the command line of the process to execute in response to the RunCommand service controller action.
@@ -131,5 +137,5 @@ func (s *Service) RecoveryCommand() (string, error) {
return "", err
}
p := (*windows.SERVICE_FAILURE_ACTIONS)(unsafe.Pointer(&b[0]))
- return toString(p.Command), nil
+ return windows.UTF16PtrToString(p.Command), nil
}
diff --git a/vendor/golang.org/x/sys/windows/svc/mgr/service.go b/vendor/golang.org/x/sys/windows/svc/mgr/service.go
index ded1c7a..aee2d3d 100644
--- a/vendor/golang.org/x/sys/windows/svc/mgr/service.go
+++ b/vendor/golang.org/x/sys/windows/svc/mgr/service.go
@@ -68,8 +68,10 @@ func (s *Service) Query() (svc.Status, error) {
return svc.Status{}, err
}
return svc.Status{
- State: svc.State(t.CurrentState),
- Accepts: svc.Accepted(t.ControlsAccepted),
- ProcessId: t.ProcessId,
+ State: svc.State(t.CurrentState),
+ Accepts: svc.Accepted(t.ControlsAccepted),
+ ProcessId: t.ProcessId,
+ Win32ExitCode: t.Win32ExitCode,
+ ServiceSpecificExitCode: t.ServiceSpecificExitCode,
}, nil
}
diff --git a/vendor/golang.org/x/sys/windows/svc/security.go b/vendor/golang.org/x/sys/windows/svc/security.go
index 6fbc923..ef719c1 100644
--- a/vendor/golang.org/x/sys/windows/svc/security.go
+++ b/vendor/golang.org/x/sys/windows/svc/security.go
@@ -7,6 +7,8 @@
package svc
import (
+ "path/filepath"
+ "strings"
"unsafe"
"golang.org/x/sys/windows"
@@ -25,6 +27,8 @@ func allocSid(subAuth0 uint32) (*windows.SID, error) {
// IsAnInteractiveSession determines if calling process is running interactively.
// 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
+//
+// Deprecated: Use IsWindowsService instead.
func IsAnInteractiveSession() (bool, error) {
interSid, err := allocSid(windows.SECURITY_INTERACTIVE_RID)
if err != nil {
@@ -48,9 +52,8 @@ func IsAnInteractiveSession() (bool, error) {
if err != nil {
return false, err
}
- p := unsafe.Pointer(&gs.Groups[0])
- groups := (*[2 << 20]windows.SIDAndAttributes)(p)[:gs.GroupCount]
- for _, g := range groups {
+
+ for _, g := range gs.AllGroups() {
if windows.EqualSid(g.Sid, interSid) {
return true, nil
}
@@ -60,3 +63,46 @@ func IsAnInteractiveSession() (bool, error) {
}
return false, nil
}
+
+// IsWindowsService reports whether the process is currently executing
+// as a Windows service.
+func IsWindowsService() (bool, error) {
+ // 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".
+
+ var pbi windows.PROCESS_BASIC_INFORMATION
+ pbiLen := uint32(unsafe.Sizeof(pbi))
+ err := windows.NtQueryInformationProcess(windows.CurrentProcess(), windows.ProcessBasicInformation, unsafe.Pointer(&pbi), pbiLen, &pbiLen)
+ if err != nil {
+ return false, err
+ }
+ var psid uint32
+ err = windows.ProcessIdToSessionId(uint32(pbi.InheritedFromUniqueProcessId), &psid)
+ if err != nil || psid != 0 {
+ return false, nil
+ }
+ pproc, err := windows.OpenProcess(windows.PROCESS_QUERY_LIMITED_INFORMATION, false, uint32(pbi.InheritedFromUniqueProcessId))
+ if err != nil {
+ return false, err
+ }
+ defer windows.CloseHandle(pproc)
+ var exeNameBuf [261]uint16
+ exeNameLen := uint32(len(exeNameBuf) - 1)
+ err = windows.QueryFullProcessImageName(pproc, 0, &exeNameBuf[0], &exeNameLen)
+ if err != nil {
+ return false, err
+ }
+ exeName := windows.UTF16ToString(exeNameBuf[:exeNameLen])
+ if !strings.EqualFold(filepath.Base(exeName), "services.exe") {
+ return false, nil
+ }
+ system32, err := windows.GetSystemDirectory()
+ if err != nil {
+ return false, err
+ }
+ targetExeName := filepath.Join(system32, "services.exe")
+ return strings.EqualFold(exeName, targetExeName), nil
+}
diff --git a/vendor/golang.org/x/sys/windows/svc/service.go b/vendor/golang.org/x/sys/windows/svc/service.go
index ee3d696..3748528 100644
--- a/vendor/golang.org/x/sys/windows/svc/service.go
+++ b/vendor/golang.org/x/sys/windows/svc/service.go
@@ -14,6 +14,7 @@ import (
"syscall"
"unsafe"
+ "golang.org/x/sys/internal/unsafeheader"
"golang.org/x/sys/windows"
)
@@ -49,6 +50,7 @@ const (
HardwareProfileChange = Cmd(windows.SERVICE_CONTROL_HARDWAREPROFILECHANGE)
PowerEvent = Cmd(windows.SERVICE_CONTROL_POWEREVENT)
SessionChange = Cmd(windows.SERVICE_CONTROL_SESSIONCHANGE)
+ PreShutdown = Cmd(windows.SERVICE_CONTROL_PRESHUTDOWN)
)
// Accepted is used to describe commands accepted by the service.
@@ -64,15 +66,18 @@ const (
AcceptHardwareProfileChange = Accepted(windows.SERVICE_ACCEPT_HARDWAREPROFILECHANGE)
AcceptPowerEvent = Accepted(windows.SERVICE_ACCEPT_POWEREVENT)
AcceptSessionChange = Accepted(windows.SERVICE_ACCEPT_SESSIONCHANGE)
+ AcceptPreShutdown = Accepted(windows.SERVICE_ACCEPT_PRESHUTDOWN)
)
// Status combines State and Accepted commands to fully describe running service.
type Status struct {
- State State
- Accepts Accepted
- CheckPoint uint32 // used to report progress during a lengthy operation
- WaitHint uint32 // estimated time required for a pending operation, in milliseconds
- ProcessId uint32 // if the service is running, the process identifier of it, and otherwise zero
+ State State
+ Accepts Accepted
+ CheckPoint uint32 // used to report progress during a lengthy operation
+ WaitHint uint32 // estimated time required for a pending operation, in milliseconds
+ ProcessId uint32 // if the service is running, the process identifier of it, and otherwise zero
+ Win32ExitCode uint32 // set if the service has exited with a win32 exit code
+ ServiceSpecificExitCode uint32 // set if the service has exited with a service-specific exit code
}
// ChangeRequest is sent to the service Handler to request service status change.
@@ -201,6 +206,9 @@ func (s *service) updateStatus(status *Status, ec *exitCode) error {
if status.Accepts&AcceptSessionChange != 0 {
t.ControlsAccepted |= windows.SERVICE_ACCEPT_SESSIONCHANGE
}
+ if status.Accepts&AcceptPreShutdown != 0 {
+ t.ControlsAccepted |= windows.SERVICE_ACCEPT_PRESHUTDOWN
+ }
if ec.errno == 0 {
t.Win32ExitCode = windows.NO_ERROR
t.ServiceSpecificExitCode = windows.NO_ERROR
@@ -224,10 +232,16 @@ const (
func (s *service) run() {
s.goWaits.Wait()
s.h = windows.Handle(ssHandle)
- argv := (*[100]*int16)(unsafe.Pointer(sArgv))[:sArgc]
+
+ var argv []*uint16
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&argv))
+ hdr.Data = unsafe.Pointer(sArgv)
+ hdr.Len = int(sArgc)
+ hdr.Cap = int(sArgc)
+
args := make([]string, len(argv))
for i, a := range argv {
- args[i] = syscall.UTF16ToString((*[1 << 20]uint16)(unsafe.Pointer(a))[:])
+ args[i] = windows.UTF16PtrToString(a)
}
cmdsToHandler := make(chan ChangeRequest)
diff --git a/vendor/golang.org/x/sys/windows/svc/sys_386.s b/vendor/golang.org/x/sys/windows/svc/sys_windows_386.s
index c8a583d..1ed9141 100644
--- a/vendor/golang.org/x/sys/windows/svc/sys_386.s
+++ b/vendor/golang.org/x/sys/windows/svc/sys_windows_386.s
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build windows
-
// func servicemain(argc uint32, argv **uint16)
TEXT ·servicemain(SB),7,$0
MOVL argc+0(FP), AX
diff --git a/vendor/golang.org/x/sys/windows/svc/sys_amd64.s b/vendor/golang.org/x/sys/windows/svc/sys_windows_amd64.s
index 2f7609c..1e5ef92 100644
--- a/vendor/golang.org/x/sys/windows/svc/sys_amd64.s
+++ b/vendor/golang.org/x/sys/windows/svc/sys_windows_amd64.s
@@ -2,15 +2,17 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build windows
-
// func servicemain(argc uint32, argv **uint16)
TEXT ·servicemain(SB),7,$0
+ MOVQ SP, AX
+ ANDQ $~15, SP // alignment as per Windows requirement
+ SUBQ $48, SP // room for SP and 4 args as per Windows requirement
+ // plus one extra word to keep stack 16 bytes aligned
+ MOVQ AX, 32(SP)
+
MOVL CX, ·sArgc(SB)
MOVQ DX, ·sArgv(SB)
- SUBQ $32, SP // stack for the first 4 syscall params
-
MOVQ ·sName(SB), CX
MOVQ $·servicectlhandler(SB), DX
// BUG(pastarmovj): Figure out a way to pass in context in R8.
@@ -32,7 +34,7 @@ TEXT ·servicemain(SB),7,$0
CALL AX
exit:
- ADDQ $32, SP
+ MOVQ 32(SP), SP
RET
// I do not know why, but this seems to be the only way to call
diff --git a/vendor/golang.org/x/sys/windows/svc/sys_arm.s b/vendor/golang.org/x/sys/windows/svc/sys_windows_arm.s
index 33c692a..360b86e 100644
--- a/vendor/golang.org/x/sys/windows/svc/sys_arm.s
+++ b/vendor/golang.org/x/sys/windows/svc/sys_windows_arm.s
@@ -2,15 +2,13 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build windows
-
#include "textflag.h"
// func servicemain(argc uint32, argv **uint16)
TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
MOVM.DB.W [R4, R14], (R13) // push {r4, lr}
- MOVW R13, R4
- BIC $0x7, R13 // alignment for ABI
+ MOVW R13, R4
+ BIC $0x7, R13 // alignment for ABI
MOVW R0, ·sArgc(SB)
MOVW R1, ·sArgv(SB)
@@ -19,19 +17,19 @@ TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
MOVW ·ctlHandlerExProc(SB), R1
MOVW $0, R2
MOVW ·cRegisterServiceCtrlHandlerExW(SB), R3
- BL (R3)
- CMP $0, R0
- BEQ exit
+ BL (R3)
+ CMP $0, R0
+ BEQ exit
MOVW R0, ·ssHandle(SB)
MOVW ·goWaitsH(SB), R0
MOVW ·cSetEvent(SB), R1
- BL (R1)
+ BL (R1)
MOVW ·cWaitsH(SB), R0
MOVW $-1, R1
MOVW ·cWaitForSingleObject(SB), R2
- BL (R2)
+ BL (R2)
exit:
MOVW R4, R13 // free extra stack space
diff --git a/vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s b/vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s
new file mode 100644
index 0000000..3ca540e
--- /dev/null
+++ b/vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s
@@ -0,0 +1,31 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+// func servicemain(argc uint32, argv **uint16)
+TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
+ MOVD R0, ·sArgc(SB)
+ MOVD R1, ·sArgv(SB)
+
+ MOVD ·sName(SB), R0
+ MOVD ·ctlHandlerExProc(SB), R1
+ MOVD $0, R2
+ MOVD ·cRegisterServiceCtrlHandlerExW(SB), R3
+ BL (R3)
+ CMP $0, R0
+ BEQ exit
+ MOVD R0, ·ssHandle(SB)
+
+ MOVD ·goWaitsH(SB), R0
+ MOVD ·cSetEvent(SB), R1
+ BL (R1)
+
+ MOVD ·cWaitsH(SB), R0
+ MOVD $-1, R1
+ MOVD ·cWaitForSingleObject(SB), R2
+ BL (R2)
+
+exit:
+ RET
diff --git a/vendor/golang.org/x/sys/windows/syscall.go b/vendor/golang.org/x/sys/windows/syscall.go
index af828a9..6122f55 100644
--- a/vendor/golang.org/x/sys/windows/syscall.go
+++ b/vendor/golang.org/x/sys/windows/syscall.go
@@ -25,17 +25,20 @@
package windows // import "golang.org/x/sys/windows"
import (
+ "bytes"
+ "strings"
"syscall"
+ "unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
)
// ByteSliceFromString returns a NUL-terminated slice of bytes
// containing the text of s. If s contains a NUL byte at any
// location, it returns (nil, syscall.EINVAL).
func ByteSliceFromString(s string) ([]byte, error) {
- for i := 0; i < len(s); i++ {
- if s[i] == 0 {
- return nil, syscall.EINVAL
- }
+ if strings.IndexByte(s, 0) != -1 {
+ return nil, syscall.EINVAL
}
a := make([]byte, len(s)+1)
copy(a, s)
@@ -53,6 +56,41 @@ func BytePtrFromString(s string) (*byte, error) {
return &a[0], nil
}
+// ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any
+// bytes after the NUL removed.
+func ByteSliceToString(s []byte) string {
+ if i := bytes.IndexByte(s, 0); i != -1 {
+ s = s[:i]
+ }
+ return string(s)
+}
+
+// BytePtrToString takes a pointer to a sequence of text and returns the corresponding string.
+// If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated
+// at a zero byte; if the zero byte is not present, the program may crash.
+func BytePtrToString(p *byte) string {
+ if p == nil {
+ return ""
+ }
+ if *p == 0 {
+ return ""
+ }
+
+ // Find NUL terminator.
+ n := 0
+ for ptr := unsafe.Pointer(p); *(*byte)(ptr) != 0; n++ {
+ ptr = unsafe.Pointer(uintptr(ptr) + 1)
+ }
+
+ var s []byte
+ h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
+ h.Data = unsafe.Pointer(p)
+ h.Len = n
+ h.Cap = n
+
+ return string(s)
+}
+
// Single-word zero for use when we need a valid pointer to 0 bytes.
// See mksyscall.pl.
var _zero uintptr
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index 053d664..bb6aaf8 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -8,17 +8,23 @@ package windows
import (
errorspkg "errors"
+ "fmt"
+ "runtime"
"sync"
"syscall"
"time"
"unicode/utf16"
"unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
)
type Handle uintptr
+type HWND uintptr
const (
InvalidHandle = ^Handle(0)
+ InvalidHWND = ^HWND(0)
// Flags for DefineDosDevice.
DDD_EXACT_MATCH_ON_REMOVE = 0x00000004
@@ -61,9 +67,8 @@ const (
LOCKFILE_FAIL_IMMEDIATELY = 0x00000001
LOCKFILE_EXCLUSIVE_LOCK = 0x00000002
- // Return values of SleepEx and other APC functions
- STATUS_USER_APC = 0x000000C0
- WAIT_IO_COMPLETION = STATUS_USER_APC
+ // Return value of SleepEx and other APC functions
+ WAIT_IO_COMPLETION = 0x000000C0
)
// StringToUTF16 is deprecated. Use UTF16FromString instead.
@@ -90,11 +95,11 @@ func UTF16FromString(s string) ([]uint16, error) {
}
// UTF16ToString returns the UTF-8 encoding of the UTF-16 sequence s,
-// with a terminating NUL removed.
+// with a terminating NUL and any bytes after the NUL removed.
func UTF16ToString(s []uint16) string {
for i, v := range s {
if v == 0 {
- s = s[0:i]
+ s = s[:i]
break
}
}
@@ -117,6 +122,32 @@ func UTF16PtrFromString(s string) (*uint16, error) {
return &a[0], nil
}
+// UTF16PtrToString takes a pointer to a UTF-16 sequence and returns the corresponding UTF-8 encoded string.
+// If the pointer is nil, it returns the empty string. It assumes that the UTF-16 sequence is terminated
+// at a zero word; if the zero word is not present, the program may crash.
+func UTF16PtrToString(p *uint16) string {
+ if p == nil {
+ return ""
+ }
+ if *p == 0 {
+ return ""
+ }
+
+ // Find NUL terminator.
+ n := 0
+ for ptr := unsafe.Pointer(p); *(*uint16)(ptr) != 0; n++ {
+ ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p))
+ }
+
+ var s []uint16
+ h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
+ h.Data = unsafe.Pointer(p)
+ h.Len = n
+ h.Cap = n
+
+ return string(utf16.Decode(s))
+}
+
func Getpagesize() int { return 4096 }
// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention.
@@ -142,11 +173,19 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys GetProcAddress(module Handle, procname string) (proc uintptr, err error)
//sys GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) = kernel32.GetModuleFileNameW
//sys GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) = kernel32.GetModuleHandleExW
+//sys SetDefaultDllDirectories(directoryFlags uint32) (err error)
+//sys SetDllDirectory(path string) (err error) = kernel32.SetDllDirectoryW
//sys GetVersion() (ver uint32, err error)
//sys FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) = FormatMessageW
//sys ExitProcess(exitcode uint32)
//sys IsWow64Process(handle Handle, isWow64 *bool) (err error) = IsWow64Process
+//sys IsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint16) (err error) = IsWow64Process2?
//sys CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW
+//sys CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) [failretval==InvalidHandle] = CreateNamedPipeW
+//sys ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error)
+//sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error)
+//sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
+//sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState
//sys ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
//sys WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
//sys GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error)
@@ -159,6 +198,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys FindClose(handle Handle) (err error)
//sys GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error)
//sys GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error)
+//sys SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inBufferLen uint32) (err error)
//sys GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) = GetCurrentDirectoryW
//sys SetCurrentDirectory(path *uint16) (err error) = SetCurrentDirectoryW
//sys CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) = CreateDirectoryW
@@ -174,14 +214,21 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys GetSystemTimeAsFileTime(time *Filetime)
//sys GetSystemTimePreciseAsFileTime(time *Filetime)
//sys GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff]
-//sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error)
-//sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error)
-//sys PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error)
+//sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, threadcnt uint32) (handle Handle, err error)
+//sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overlapped **Overlapped, timeout uint32) (err error)
+//sys PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overlapped *Overlapped) (err error)
//sys CancelIo(s Handle) (err error)
//sys CancelIoEx(s Handle, o *Overlapped) (err error)
//sys CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) = CreateProcessW
+//sys initializeProcThreadAttributeList(attrlist *ProcThreadAttributeList, attrcount uint32, flags uint32, size *uintptr) (err error) = InitializeProcThreadAttributeList
+//sys deleteProcThreadAttributeList(attrlist *ProcThreadAttributeList) = DeleteProcThreadAttributeList
+//sys updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32, attr uintptr, value unsafe.Pointer, size uintptr, prevvalue unsafe.Pointer, returnedsize *uintptr) (err error) = UpdateProcThreadAttribute
//sys OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error)
//sys ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) [failretval<=32] = shell32.ShellExecuteW
+//sys GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) = user32.GetWindowThreadProcessId
+//sys GetShellWindow() (shellWindow HWND) = user32.GetShellWindow
+//sys MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW
+//sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx
//sys shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) = shell32.SHGetKnownFolderPath
//sys TerminateProcess(handle Handle, exitcode uint32) (err error)
//sys GetExitCodeProcess(handle Handle, exitcode *uint32) (err error)
@@ -210,12 +257,14 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys GetCommandLine() (cmd *uint16) = kernel32.GetCommandLineW
//sys CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) [failretval==nil] = shell32.CommandLineToArgvW
//sys LocalFree(hmem Handle) (handle Handle, err error) [failretval!=0]
+//sys LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error)
//sys SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error)
//sys FlushFileBuffers(handle Handle) (err error)
//sys GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) = kernel32.GetFullPathNameW
//sys GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) = kernel32.GetLongPathNameW
//sys GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) = kernel32.GetShortPathNameW
-//sys CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) = kernel32.CreateFileMappingW
+//sys GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) = kernel32.GetFinalPathNameByHandleW
+//sys CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateFileMappingW
//sys MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error)
//sys UnmapViewOfFile(addr uintptr) (err error)
//sys FlushViewOfFile(addr uintptr, length uintptr) (err error)
@@ -226,25 +275,44 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) = kernel32.VirtualProtect
//sys TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) = mswsock.TransmitFile
//sys ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) = kernel32.ReadDirectoryChangesW
+//sys FindFirstChangeNotification(path string, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.FindFirstChangeNotificationW
+//sys FindNextChangeNotification(handle Handle) (err error)
+//sys FindCloseChangeNotification(handle Handle) (err error)
//sys CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) = crypt32.CertOpenSystemStoreW
-//sys CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) [failretval==InvalidHandle] = crypt32.CertOpenStore
+//sys CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) = crypt32.CertOpenStore
//sys CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) [failretval==nil] = crypt32.CertEnumCertificatesInStore
-//sys CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) = crypt32.CertAddCertificateContextToStore
+//sys CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) = crypt32.CertAddCertificateContextToStore
//sys CertCloseStore(store Handle, flags uint32) (err error) = crypt32.CertCloseStore
-//sys CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) = crypt32.CertGetCertificateChain
-//sys CertFreeCertificateChain(ctx *CertChainContext) = crypt32.CertFreeCertificateChain
-//sys CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) [failretval==nil] = crypt32.CertCreateCertificateContext
-//sys CertFreeCertificateContext(ctx *CertContext) (err error) = crypt32.CertFreeCertificateContext
-//sys CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) = crypt32.CertVerifyCertificateChainPolicy
+//sys CertDeleteCertificateFromStore(certContext *CertContext) (err error) = crypt32.CertDeleteCertificateFromStore
+//sys CertDuplicateCertificateContext(certContext *CertContext) (dupContext *CertContext) = crypt32.CertDuplicateCertificateContext
+//sys PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (store Handle, err error) = crypt32.PFXImportCertStore
+//sys CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) = crypt32.CertGetCertificateChain
+//sys CertFreeCertificateChain(ctx *CertChainContext) = crypt32.CertFreeCertificateChain
+//sys CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) [failretval==nil] = crypt32.CertCreateCertificateContext
+//sys CertFreeCertificateContext(ctx *CertContext) (err error) = crypt32.CertFreeCertificateContext
+//sys CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) = crypt32.CertVerifyCertificateChainPolicy
+//sys CertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, name *uint16, size uint32) (chars uint32) = crypt32.CertGetNameStringW
+//sys CertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) = crypt32.CertFindExtension
+//sys CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) [failretval==nil] = crypt32.CertFindCertificateInStore
+//sys CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) [failretval==nil] = crypt32.CertFindChainInStore
+//sys CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, parameters unsafe.Pointer, cryptProvOrNCryptKey *Handle, keySpec *uint32, callerFreeProvOrNCryptKey *bool) (err error) = crypt32.CryptAcquireCertificatePrivateKey
+//sys CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) = crypt32.CryptQueryObject
+//sys CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) = crypt32.CryptDecodeObject
+//sys CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) = crypt32.CryptProtectData
+//sys CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) = crypt32.CryptUnprotectData
+//sys WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) = wintrust.WinVerifyTrustEx
//sys RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) = advapi32.RegOpenKeyExW
//sys RegCloseKey(key Handle) (regerrno error) = advapi32.RegCloseKey
//sys RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegQueryInfoKeyW
//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 RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32, event Handle, asynchronous bool) (regerrno error) = advapi32.RegNotifyChangeKeyValue
//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 SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode
//sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo
+//sys setConsoleCursorPosition(console Handle, position uint32) (err error) = kernel32.SetConsoleCursorPosition
//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 CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot
@@ -257,14 +325,14 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) [failretval&0xff==0] = CreateSymbolicLinkW
//sys CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) [failretval&0xff==0] = CreateHardLinkW
//sys GetCurrentThreadId() (id uint32)
-//sys CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) = kernel32.CreateEventW
-//sys CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) = kernel32.CreateEventExW
+//sys CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateEventW
+//sys CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateEventExW
//sys OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) = kernel32.OpenEventW
//sys SetEvent(event Handle) (err error) = kernel32.SetEvent
//sys ResetEvent(event Handle) (err error) = kernel32.ResetEvent
//sys PulseEvent(event Handle) (err error) = kernel32.PulseEvent
-//sys CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) = kernel32.CreateMutexW
-//sys CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) = kernel32.CreateMutexExW
+//sys CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateMutexW
+//sys CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateMutexExW
//sys OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) = kernel32.OpenMutexW
//sys ReleaseMutex(mutex Handle) (err error) = kernel32.ReleaseMutex
//sys SleepEx(milliseconds uint32, alertable bool) (ret uint32) = kernel32.SleepEx
@@ -275,11 +343,17 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys ResumeThread(thread Handle) (ret uint32, err error) [failretval==0xffffffff] = kernel32.ResumeThread
//sys SetPriorityClass(process Handle, priorityClass uint32) (err error) = kernel32.SetPriorityClass
//sys GetPriorityClass(process Handle) (ret uint32, err error) = kernel32.GetPriorityClass
+//sys QueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobObjectInformation uintptr, JobObjectInformationLength uint32, retlen *uint32) (err error) = kernel32.QueryInformationJobObject
//sys SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error)
//sys GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error)
//sys GetProcessId(process Handle) (id uint32, err error)
+//sys QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size *uint32) (err error) = kernel32.QueryFullProcessImageNameW
//sys OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error)
//sys SetProcessPriorityBoost(process Handle, disable bool) (err error) = kernel32.SetProcessPriorityBoost
+//sys GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32)
+//sys SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error)
+//sys GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
+//sys SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
// Volume Management Functions
//sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW
@@ -302,8 +376,6 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) [failretval==0] = QueryDosDeviceW
//sys SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) = SetVolumeLabelW
//sys SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) = SetVolumeMountPointW
-//sys MessageBox(hwnd Handle, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW
-//sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx
//sys InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint32, forceAppsClosed bool, rebootAfterShutdown bool, reason uint32) (err error) = advapi32.InitiateSystemShutdownExW
//sys SetProcessShutdownParameters(level uint32, flags uint32) (err error) = kernel32.SetProcessShutdownParameters
//sys GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) = kernel32.GetProcessShutdownParameters
@@ -311,16 +383,36 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) = ole32.StringFromGUID2
//sys coCreateGuid(pguid *GUID) (ret error) = ole32.CoCreateGuid
//sys CoTaskMemFree(address unsafe.Pointer) = ole32.CoTaskMemFree
-//sys rtlGetVersion(info *OsVersionInfoEx) (ret error) = ntdll.RtlGetVersion
-//sys rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) = ntdll.RtlGetNtVersionNumbers
+//sys CoInitializeEx(reserved uintptr, coInit uint32) (ret error) = ole32.CoInitializeEx
+//sys CoUninitialize() = ole32.CoUninitialize
+//sys CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable **uintptr) (ret error) = ole32.CoGetObject
//sys getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetProcessPreferredUILanguages
//sys getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetThreadPreferredUILanguages
//sys getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetUserPreferredUILanguages
//sys getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetSystemPreferredUILanguages
+//sys findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle, err error) = kernel32.FindResourceW
+//sys SizeofResource(module Handle, resInfo Handle) (size uint32, err error) = kernel32.SizeofResource
+//sys LoadResource(module Handle, resInfo Handle) (resData Handle, err error) = kernel32.LoadResource
+//sys LockResource(resData Handle) (addr uintptr, err error) = kernel32.LockResource
// Process Status API (PSAPI)
//sys EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
+// NT Native APIs
+//sys rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) = ntdll.RtlNtStatusToDosErrorNoTeb
+//sys rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) = ntdll.RtlGetVersion
+//sys rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) = ntdll.RtlGetNtVersionNumbers
+//sys RtlGetCurrentPeb() (peb *PEB) = ntdll.RtlGetCurrentPeb
+//sys RtlInitUnicodeString(destinationString *NTUnicodeString, sourceString *uint16) = ntdll.RtlInitUnicodeString
+//sys RtlInitString(destinationString *NTString, sourceString *byte) = ntdll.RtlInitString
+//sys NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) = ntdll.NtCreateFile
+//sys NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) = ntdll.NtCreateNamedPipeFile
+//sys RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToNtPathName_U_WithStatus
+//sys RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToRelativeNtPathName_U_WithStatus
+//sys RtlDefaultNpAcl(acl **ACL) (ntstatus error) = ntdll.RtlDefaultNpAcl
+//sys NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQueryInformationProcess
+//sys NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) = ntdll.NtSetInformationProcess
+
// syscall interface implementation for other packages
// GetCurrentProcess returns the handle for the current process.
@@ -357,11 +449,7 @@ func GetProcAddressByOrdinal(module Handle, ordinal uintptr) (proc uintptr, err
r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), ordinal, 0)
proc = uintptr(r0)
if proc == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
@@ -718,6 +806,7 @@ const socket_error = uintptr(^uint32(0))
//sys WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASend
//sys WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecvFrom
//sys WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASendTo
+//sys WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.WSASocketW
//sys GetHostByName(name string) (h *Hostent, err error) [failretval==nil] = ws2_32.gethostbyname
//sys GetServByName(name string, proto string) (s *Servent, err error) [failretval==nil] = ws2_32.getservbyname
//sys Ntohs(netshort uint16) (u uint16) = ws2_32.ntohs
@@ -731,6 +820,7 @@ const socket_error = uintptr(^uint32(0))
//sys GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) = iphlpapi.GetAdaptersInfo
//sys SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) = kernel32.SetFileCompletionNotificationModes
//sys WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) [failretval==-1] = ws2_32.WSAEnumProtocolsW
+//sys WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult
//sys GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) = iphlpapi.GetAdaptersAddresses
//sys GetACP() (acp uint32) = kernel32.GetACP
//sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar
@@ -1058,11 +1148,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)))
if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return err
}
@@ -1074,11 +1160,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)
if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return err
}
@@ -1181,7 +1263,12 @@ type IPv6Mreq struct {
Interface uint32
}
-func GetsockoptInt(fd Handle, level, opt int) (int, error) { return -1, syscall.EWINDOWS }
+func GetsockoptInt(fd Handle, level, opt int) (int, error) {
+ v := int32(0)
+ l := int32(unsafe.Sizeof(v))
+ err := Getsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&v)), &l)
+ return int(v), err
+}
func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) {
sys := sysLinger{Onoff: uint16(l.Onoff), Linger: uint16(l.Linger)}
@@ -1378,7 +1465,7 @@ func (t Token) KnownFolderPath(folderID *KNOWNFOLDERID, flags uint32) (string, e
return "", err
}
defer CoTaskMemFree(unsafe.Pointer(p))
- return UTF16ToString((*[(1 << 30) - 1]uint16)(unsafe.Pointer(p))[:]), nil
+ return UTF16PtrToString(p), nil
}
// RtlGetVersion returns the version of the underlying operating system, ignoring
@@ -1452,3 +1539,133 @@ func getUILanguages(flags uint32, f func(flags uint32, numLanguages *uint32, buf
return languages, nil
}
}
+
+func SetConsoleCursorPosition(console Handle, position Coord) error {
+ return setConsoleCursorPosition(console, *((*uint32)(unsafe.Pointer(&position))))
+}
+
+func (s NTStatus) Errno() syscall.Errno {
+ return rtlNtStatusToDosErrorNoTeb(s)
+}
+
+func langID(pri, sub uint16) uint32 { return uint32(sub)<<10 | uint32(pri) }
+
+func (s NTStatus) Error() string {
+ b := make([]uint16, 300)
+ n, err := FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_FROM_HMODULE|FORMAT_MESSAGE_ARGUMENT_ARRAY, modntdll.Handle(), uint32(s), langID(LANG_ENGLISH, SUBLANG_ENGLISH_US), b, nil)
+ if err != nil {
+ return fmt.Sprintf("NTSTATUS 0x%08x", uint32(s))
+ }
+ // trim terminating \r and \n
+ for ; n > 0 && (b[n-1] == '\n' || b[n-1] == '\r'); n-- {
+ }
+ return string(utf16.Decode(b[:n]))
+}
+
+// NewNTUnicodeString returns a new NTUnicodeString structure for use with native
+// NT APIs that work over the NTUnicodeString type. Note that most Windows APIs
+// do not use NTUnicodeString, and instead UTF16PtrFromString should be used for
+// the more common *uint16 string type.
+func NewNTUnicodeString(s string) (*NTUnicodeString, error) {
+ var u NTUnicodeString
+ s16, err := UTF16PtrFromString(s)
+ if err != nil {
+ return nil, err
+ }
+ RtlInitUnicodeString(&u, s16)
+ return &u, nil
+}
+
+// Slice returns a uint16 slice that aliases the data in the NTUnicodeString.
+func (s *NTUnicodeString) Slice() []uint16 {
+ var slice []uint16
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&slice))
+ hdr.Data = unsafe.Pointer(s.Buffer)
+ hdr.Len = int(s.Length)
+ hdr.Cap = int(s.MaximumLength)
+ return slice
+}
+
+func (s *NTUnicodeString) String() string {
+ return UTF16ToString(s.Slice())
+}
+
+// NewNTString returns a new NTString structure for use with native
+// NT APIs that work over the NTString type. Note that most Windows APIs
+// do not use NTString, and instead UTF16PtrFromString should be used for
+// the more common *uint16 string type.
+func NewNTString(s string) (*NTString, error) {
+ var nts NTString
+ s8, err := BytePtrFromString(s)
+ if err != nil {
+ return nil, err
+ }
+ RtlInitString(&nts, s8)
+ return &nts, nil
+}
+
+// Slice returns a byte slice that aliases the data in the NTString.
+func (s *NTString) Slice() []byte {
+ var slice []byte
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&slice))
+ hdr.Data = unsafe.Pointer(s.Buffer)
+ hdr.Len = int(s.Length)
+ hdr.Cap = int(s.MaximumLength)
+ return slice
+}
+
+func (s *NTString) String() string {
+ return ByteSliceToString(s.Slice())
+}
+
+// FindResource resolves a resource of the given name and resource type.
+func FindResource(module Handle, name, resType ResourceIDOrString) (Handle, error) {
+ var namePtr, resTypePtr uintptr
+ var name16, resType16 *uint16
+ var err error
+ resolvePtr := func(i interface{}, keep **uint16) (uintptr, error) {
+ switch v := i.(type) {
+ case string:
+ *keep, err = UTF16PtrFromString(v)
+ if err != nil {
+ return 0, err
+ }
+ return uintptr(unsafe.Pointer(*keep)), nil
+ case ResourceID:
+ return uintptr(v), nil
+ }
+ return 0, errorspkg.New("parameter must be a ResourceID or a string")
+ }
+ namePtr, err = resolvePtr(name, &name16)
+ if err != nil {
+ return 0, err
+ }
+ resTypePtr, err = resolvePtr(resType, &resType16)
+ if err != nil {
+ return 0, err
+ }
+ resInfo, err := findResource(module, namePtr, resTypePtr)
+ runtime.KeepAlive(name16)
+ runtime.KeepAlive(resType16)
+ return resInfo, err
+}
+
+func LoadResourceData(module, resInfo Handle) (data []byte, err error) {
+ size, err := SizeofResource(module, resInfo)
+ if err != nil {
+ return
+ }
+ resData, err := LoadResource(module, resInfo)
+ if err != nil {
+ return
+ }
+ ptr, err := LockResource(resData)
+ if err != nil {
+ return
+ }
+ h := (*unsafeheader.Slice)(unsafe.Pointer(&data))
+ h.Data = unsafe.Pointer(ptr)
+ h.Len = int(size)
+ h.Cap = int(size)
+ return
+}
diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go
index 809fff0..23fe18e 100644
--- a/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/vendor/golang.org/x/sys/windows/types_windows.go
@@ -10,6 +10,10 @@ import (
"unsafe"
)
+// NTStatus corresponds with NTSTATUS, error values returned by ntdll.dll and
+// other native functions.
+type NTStatus uint32
+
const (
// Invented values to support what package os expects.
O_RDONLY = 0x00000
@@ -216,6 +220,18 @@ const (
)
const (
+ // attributes for ProcThreadAttributeList
+ PROC_THREAD_ATTRIBUTE_PARENT_PROCESS = 0x00020000
+ PROC_THREAD_ATTRIBUTE_HANDLE_LIST = 0x00020002
+ PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY = 0x00030003
+ PROC_THREAD_ATTRIBUTE_PREFERRED_NODE = 0x00020004
+ PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR = 0x00030005
+ PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY = 0x00020007
+ PROC_THREAD_ATTRIBUTE_UMS_THREAD = 0x00030006
+ PROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL = 0x0002000b
+)
+
+const (
// flags for CreateToolhelp32Snapshot
TH32CS_SNAPHEAPLIST = 0x01
TH32CS_SNAPPROCESS = 0x02
@@ -227,7 +243,7 @@ const (
)
const (
- // filters for ReadDirectoryChangesW
+ // filters for ReadDirectoryChangesW and FindFirstChangeNotificationW
FILE_NOTIFY_CHANGE_FILE_NAME = 0x001
FILE_NOTIFY_CHANGE_DIR_NAME = 0x002
FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x004
@@ -249,24 +265,27 @@ const (
const (
// wincrypt.h
- PROV_RSA_FULL = 1
- PROV_RSA_SIG = 2
- PROV_DSS = 3
- PROV_FORTEZZA = 4
- PROV_MS_EXCHANGE = 5
- PROV_SSL = 6
- PROV_RSA_SCHANNEL = 12
- PROV_DSS_DH = 13
- PROV_EC_ECDSA_SIG = 14
- PROV_EC_ECNRA_SIG = 15
- PROV_EC_ECDSA_FULL = 16
- PROV_EC_ECNRA_FULL = 17
- PROV_DH_SCHANNEL = 18
- PROV_SPYRUS_LYNKS = 20
- PROV_RNG = 21
- PROV_INTEL_SEC = 22
- PROV_REPLACE_OWF = 23
- PROV_RSA_AES = 24
+ /* certenrolld_begin -- PROV_RSA_*/
+ PROV_RSA_FULL = 1
+ PROV_RSA_SIG = 2
+ PROV_DSS = 3
+ PROV_FORTEZZA = 4
+ PROV_MS_EXCHANGE = 5
+ PROV_SSL = 6
+ PROV_RSA_SCHANNEL = 12
+ PROV_DSS_DH = 13
+ PROV_EC_ECDSA_SIG = 14
+ PROV_EC_ECNRA_SIG = 15
+ PROV_EC_ECDSA_FULL = 16
+ PROV_EC_ECNRA_FULL = 17
+ PROV_DH_SCHANNEL = 18
+ PROV_SPYRUS_LYNKS = 20
+ PROV_RNG = 21
+ PROV_INTEL_SEC = 22
+ PROV_REPLACE_OWF = 23
+ PROV_RSA_AES = 24
+
+ /* dwFlags definitions for CryptAcquireContext */
CRYPT_VERIFYCONTEXT = 0xF0000000
CRYPT_NEWKEYSET = 0x00000008
CRYPT_DELETEKEYSET = 0x00000010
@@ -274,6 +293,34 @@ const (
CRYPT_SILENT = 0x00000040
CRYPT_DEFAULT_CONTAINER_OPTIONAL = 0x00000080
+ /* Flags for PFXImportCertStore */
+ CRYPT_EXPORTABLE = 0x00000001
+ CRYPT_USER_PROTECTED = 0x00000002
+ CRYPT_USER_KEYSET = 0x00001000
+ PKCS12_PREFER_CNG_KSP = 0x00000100
+ PKCS12_ALWAYS_CNG_KSP = 0x00000200
+ PKCS12_ALLOW_OVERWRITE_KEY = 0x00004000
+ PKCS12_NO_PERSIST_KEY = 0x00008000
+ PKCS12_INCLUDE_EXTENDED_PROPERTIES = 0x00000010
+
+ /* Flags for CryptAcquireCertificatePrivateKey */
+ CRYPT_ACQUIRE_CACHE_FLAG = 0x00000001
+ CRYPT_ACQUIRE_USE_PROV_INFO_FLAG = 0x00000002
+ CRYPT_ACQUIRE_COMPARE_KEY_FLAG = 0x00000004
+ CRYPT_ACQUIRE_NO_HEALING = 0x00000008
+ CRYPT_ACQUIRE_SILENT_FLAG = 0x00000040
+ CRYPT_ACQUIRE_WINDOW_HANDLE_FLAG = 0x00000080
+ CRYPT_ACQUIRE_NCRYPT_KEY_FLAGS_MASK = 0x00070000
+ CRYPT_ACQUIRE_ALLOW_NCRYPT_KEY_FLAG = 0x00010000
+ CRYPT_ACQUIRE_PREFER_NCRYPT_KEY_FLAG = 0x00020000
+ CRYPT_ACQUIRE_ONLY_NCRYPT_KEY_FLAG = 0x00040000
+
+ /* pdwKeySpec for CryptAcquireCertificatePrivateKey */
+ AT_KEYEXCHANGE = 1
+ AT_SIGNATURE = 2
+ CERT_NCRYPT_KEY_SPEC = 0xFFFFFFFF
+
+ /* Default usage match type is AND with value zero */
USAGE_MATCH_TYPE_AND = 0
USAGE_MATCH_TYPE_OR = 1
@@ -398,6 +445,89 @@ const (
CERT_TRUST_IS_CA_TRUSTED = 0x00004000
CERT_TRUST_IS_COMPLEX_CHAIN = 0x00010000
+ /* Certificate Information Flags */
+ CERT_INFO_VERSION_FLAG = 1
+ CERT_INFO_SERIAL_NUMBER_FLAG = 2
+ CERT_INFO_SIGNATURE_ALGORITHM_FLAG = 3
+ CERT_INFO_ISSUER_FLAG = 4
+ CERT_INFO_NOT_BEFORE_FLAG = 5
+ CERT_INFO_NOT_AFTER_FLAG = 6
+ CERT_INFO_SUBJECT_FLAG = 7
+ CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG = 8
+ CERT_INFO_ISSUER_UNIQUE_ID_FLAG = 9
+ CERT_INFO_SUBJECT_UNIQUE_ID_FLAG = 10
+ CERT_INFO_EXTENSION_FLAG = 11
+
+ /* dwFindType for CertFindCertificateInStore */
+ CERT_COMPARE_MASK = 0xFFFF
+ CERT_COMPARE_SHIFT = 16
+ CERT_COMPARE_ANY = 0
+ CERT_COMPARE_SHA1_HASH = 1
+ CERT_COMPARE_NAME = 2
+ CERT_COMPARE_ATTR = 3
+ CERT_COMPARE_MD5_HASH = 4
+ CERT_COMPARE_PROPERTY = 5
+ CERT_COMPARE_PUBLIC_KEY = 6
+ CERT_COMPARE_HASH = CERT_COMPARE_SHA1_HASH
+ CERT_COMPARE_NAME_STR_A = 7
+ CERT_COMPARE_NAME_STR_W = 8
+ CERT_COMPARE_KEY_SPEC = 9
+ CERT_COMPARE_ENHKEY_USAGE = 10
+ CERT_COMPARE_CTL_USAGE = CERT_COMPARE_ENHKEY_USAGE
+ CERT_COMPARE_SUBJECT_CERT = 11
+ CERT_COMPARE_ISSUER_OF = 12
+ CERT_COMPARE_EXISTING = 13
+ CERT_COMPARE_SIGNATURE_HASH = 14
+ CERT_COMPARE_KEY_IDENTIFIER = 15
+ CERT_COMPARE_CERT_ID = 16
+ CERT_COMPARE_CROSS_CERT_DIST_POINTS = 17
+ CERT_COMPARE_PUBKEY_MD5_HASH = 18
+ CERT_COMPARE_SUBJECT_INFO_ACCESS = 19
+ CERT_COMPARE_HASH_STR = 20
+ CERT_COMPARE_HAS_PRIVATE_KEY = 21
+ CERT_FIND_ANY = (CERT_COMPARE_ANY << CERT_COMPARE_SHIFT)
+ CERT_FIND_SHA1_HASH = (CERT_COMPARE_SHA1_HASH << CERT_COMPARE_SHIFT)
+ CERT_FIND_MD5_HASH = (CERT_COMPARE_MD5_HASH << CERT_COMPARE_SHIFT)
+ CERT_FIND_SIGNATURE_HASH = (CERT_COMPARE_SIGNATURE_HASH << CERT_COMPARE_SHIFT)
+ CERT_FIND_KEY_IDENTIFIER = (CERT_COMPARE_KEY_IDENTIFIER << CERT_COMPARE_SHIFT)
+ CERT_FIND_HASH = CERT_FIND_SHA1_HASH
+ CERT_FIND_PROPERTY = (CERT_COMPARE_PROPERTY << CERT_COMPARE_SHIFT)
+ CERT_FIND_PUBLIC_KEY = (CERT_COMPARE_PUBLIC_KEY << CERT_COMPARE_SHIFT)
+ CERT_FIND_SUBJECT_NAME = (CERT_COMPARE_NAME<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)
+ CERT_FIND_SUBJECT_ATTR = (CERT_COMPARE_ATTR<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)
+ CERT_FIND_ISSUER_NAME = (CERT_COMPARE_NAME<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)
+ CERT_FIND_ISSUER_ATTR = (CERT_COMPARE_ATTR<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)
+ CERT_FIND_SUBJECT_STR_A = (CERT_COMPARE_NAME_STR_A<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)
+ CERT_FIND_SUBJECT_STR_W = (CERT_COMPARE_NAME_STR_W<<CERT_COMPARE_SHIFT | CERT_INFO_SUBJECT_FLAG)
+ CERT_FIND_SUBJECT_STR = CERT_FIND_SUBJECT_STR_W
+ CERT_FIND_ISSUER_STR_A = (CERT_COMPARE_NAME_STR_A<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)
+ CERT_FIND_ISSUER_STR_W = (CERT_COMPARE_NAME_STR_W<<CERT_COMPARE_SHIFT | CERT_INFO_ISSUER_FLAG)
+ CERT_FIND_ISSUER_STR = CERT_FIND_ISSUER_STR_W
+ CERT_FIND_KEY_SPEC = (CERT_COMPARE_KEY_SPEC << CERT_COMPARE_SHIFT)
+ CERT_FIND_ENHKEY_USAGE = (CERT_COMPARE_ENHKEY_USAGE << CERT_COMPARE_SHIFT)
+ CERT_FIND_CTL_USAGE = CERT_FIND_ENHKEY_USAGE
+ CERT_FIND_SUBJECT_CERT = (CERT_COMPARE_SUBJECT_CERT << CERT_COMPARE_SHIFT)
+ CERT_FIND_ISSUER_OF = (CERT_COMPARE_ISSUER_OF << CERT_COMPARE_SHIFT)
+ CERT_FIND_EXISTING = (CERT_COMPARE_EXISTING << CERT_COMPARE_SHIFT)
+ CERT_FIND_CERT_ID = (CERT_COMPARE_CERT_ID << CERT_COMPARE_SHIFT)
+ CERT_FIND_CROSS_CERT_DIST_POINTS = (CERT_COMPARE_CROSS_CERT_DIST_POINTS << CERT_COMPARE_SHIFT)
+ CERT_FIND_PUBKEY_MD5_HASH = (CERT_COMPARE_PUBKEY_MD5_HASH << CERT_COMPARE_SHIFT)
+ CERT_FIND_SUBJECT_INFO_ACCESS = (CERT_COMPARE_SUBJECT_INFO_ACCESS << CERT_COMPARE_SHIFT)
+ CERT_FIND_HASH_STR = (CERT_COMPARE_HASH_STR << CERT_COMPARE_SHIFT)
+ CERT_FIND_HAS_PRIVATE_KEY = (CERT_COMPARE_HAS_PRIVATE_KEY << CERT_COMPARE_SHIFT)
+ CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG = 0x1
+ CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG = 0x2
+ CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG = 0x4
+ CERT_FIND_NO_ENHKEY_USAGE_FLAG = 0x8
+ CERT_FIND_OR_ENHKEY_USAGE_FLAG = 0x10
+ CERT_FIND_VALID_ENHKEY_USAGE_FLAG = 0x20
+ CERT_FIND_OPTIONAL_CTL_USAGE_FLAG = CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG
+ CERT_FIND_EXT_ONLY_CTL_USAGE_FLAG = CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG
+ CERT_FIND_PROP_ONLY_CTL_USAGE_FLAG = CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG
+ CERT_FIND_NO_CTL_USAGE_FLAG = CERT_FIND_NO_ENHKEY_USAGE_FLAG
+ CERT_FIND_OR_CTL_USAGE_FLAG = CERT_FIND_OR_ENHKEY_USAGE_FLAG
+ CERT_FIND_VALID_CTL_USAGE_FLAG = CERT_FIND_VALID_ENHKEY_USAGE_FLAG
+
/* policyOID values for CertVerifyCertificateChainPolicy function */
CERT_CHAIN_POLICY_BASE = 1
CERT_CHAIN_POLICY_AUTHENTICODE = 2
@@ -409,6 +539,82 @@ const (
CERT_CHAIN_POLICY_EV = 8
CERT_CHAIN_POLICY_SSL_F12 = 9
+ /* flag for dwFindType CertFindChainInStore */
+ CERT_CHAIN_FIND_BY_ISSUER = 1
+
+ /* dwFindFlags for CertFindChainInStore when dwFindType == CERT_CHAIN_FIND_BY_ISSUER */
+ CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG = 0x0001
+ CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG = 0x0002
+ CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG = 0x0004
+ CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG = 0x0008
+ CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG = 0x4000
+ CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG = 0x8000
+
+ /* Certificate Store close flags */
+ CERT_CLOSE_STORE_FORCE_FLAG = 0x00000001
+ CERT_CLOSE_STORE_CHECK_FLAG = 0x00000002
+
+ /* CryptQueryObject object type */
+ CERT_QUERY_OBJECT_FILE = 1
+ CERT_QUERY_OBJECT_BLOB = 2
+
+ /* CryptQueryObject content type flags */
+ CERT_QUERY_CONTENT_CERT = 1
+ CERT_QUERY_CONTENT_CTL = 2
+ CERT_QUERY_CONTENT_CRL = 3
+ CERT_QUERY_CONTENT_SERIALIZED_STORE = 4
+ CERT_QUERY_CONTENT_SERIALIZED_CERT = 5
+ CERT_QUERY_CONTENT_SERIALIZED_CTL = 6
+ CERT_QUERY_CONTENT_SERIALIZED_CRL = 7
+ CERT_QUERY_CONTENT_PKCS7_SIGNED = 8
+ CERT_QUERY_CONTENT_PKCS7_UNSIGNED = 9
+ CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED = 10
+ CERT_QUERY_CONTENT_PKCS10 = 11
+ CERT_QUERY_CONTENT_PFX = 12
+ CERT_QUERY_CONTENT_CERT_PAIR = 13
+ CERT_QUERY_CONTENT_PFX_AND_LOAD = 14
+ CERT_QUERY_CONTENT_FLAG_CERT = (1 << CERT_QUERY_CONTENT_CERT)
+ CERT_QUERY_CONTENT_FLAG_CTL = (1 << CERT_QUERY_CONTENT_CTL)
+ CERT_QUERY_CONTENT_FLAG_CRL = (1 << CERT_QUERY_CONTENT_CRL)
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE = (1 << CERT_QUERY_CONTENT_SERIALIZED_STORE)
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT = (1 << CERT_QUERY_CONTENT_SERIALIZED_CERT)
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL = (1 << CERT_QUERY_CONTENT_SERIALIZED_CTL)
+ CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL = (1 << CERT_QUERY_CONTENT_SERIALIZED_CRL)
+ CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED = (1 << CERT_QUERY_CONTENT_PKCS7_SIGNED)
+ CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED = (1 << CERT_QUERY_CONTENT_PKCS7_UNSIGNED)
+ CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED = (1 << CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED)
+ CERT_QUERY_CONTENT_FLAG_PKCS10 = (1 << CERT_QUERY_CONTENT_PKCS10)
+ CERT_QUERY_CONTENT_FLAG_PFX = (1 << CERT_QUERY_CONTENT_PFX)
+ CERT_QUERY_CONTENT_FLAG_CERT_PAIR = (1 << CERT_QUERY_CONTENT_CERT_PAIR)
+ CERT_QUERY_CONTENT_FLAG_PFX_AND_LOAD = (1 << CERT_QUERY_CONTENT_PFX_AND_LOAD)
+ CERT_QUERY_CONTENT_FLAG_ALL = (CERT_QUERY_CONTENT_FLAG_CERT | CERT_QUERY_CONTENT_FLAG_CTL | CERT_QUERY_CONTENT_FLAG_CRL | CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL | CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED | CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED | CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED | CERT_QUERY_CONTENT_FLAG_PKCS10 | CERT_QUERY_CONTENT_FLAG_PFX | CERT_QUERY_CONTENT_FLAG_CERT_PAIR)
+ CERT_QUERY_CONTENT_FLAG_ALL_ISSUER_CERT = (CERT_QUERY_CONTENT_FLAG_CERT | CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE | CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT | CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED | CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED)
+
+ /* CryptQueryObject format type flags */
+ CERT_QUERY_FORMAT_BINARY = 1
+ CERT_QUERY_FORMAT_BASE64_ENCODED = 2
+ CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED = 3
+ CERT_QUERY_FORMAT_FLAG_BINARY = (1 << CERT_QUERY_FORMAT_BINARY)
+ CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED = (1 << CERT_QUERY_FORMAT_BASE64_ENCODED)
+ CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED = (1 << CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED)
+ CERT_QUERY_FORMAT_FLAG_ALL = (CERT_QUERY_FORMAT_FLAG_BINARY | CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED | CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED)
+
+ /* CertGetNameString name types */
+ CERT_NAME_EMAIL_TYPE = 1
+ CERT_NAME_RDN_TYPE = 2
+ CERT_NAME_ATTR_TYPE = 3
+ CERT_NAME_SIMPLE_DISPLAY_TYPE = 4
+ CERT_NAME_FRIENDLY_DISPLAY_TYPE = 5
+ CERT_NAME_DNS_TYPE = 6
+ CERT_NAME_URL_TYPE = 7
+ CERT_NAME_UPN_TYPE = 8
+
+ /* CertGetNameString flags */
+ CERT_NAME_ISSUER_FLAG = 0x1
+ CERT_NAME_DISABLE_IE4_UTF8_FLAG = 0x10000
+ CERT_NAME_SEARCH_ALL_NAMES_FLAG = 0x2
+ CERT_NAME_STR_ENABLE_PUNYCODE_FLAG = 0x00200000
+
/* AuthType values for SSLExtraCertChainPolicyPara struct */
AUTHTYPE_CLIENT = 1
AUTHTYPE_SERVER = 2
@@ -419,6 +625,22 @@ const (
SECURITY_FLAG_IGNORE_WRONG_USAGE = 0x00000200
SECURITY_FLAG_IGNORE_CERT_CN_INVALID = 0x00001000
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID = 0x00002000
+
+ /* Flags for Crypt[Un]ProtectData */
+ CRYPTPROTECT_UI_FORBIDDEN = 0x1
+ CRYPTPROTECT_LOCAL_MACHINE = 0x4
+ CRYPTPROTECT_CRED_SYNC = 0x8
+ CRYPTPROTECT_AUDIT = 0x10
+ CRYPTPROTECT_NO_RECOVERY = 0x20
+ CRYPTPROTECT_VERIFY_PROTECTION = 0x40
+ CRYPTPROTECT_CRED_REGENERATE = 0x80
+
+ /* Flags for CryptProtectPromptStruct */
+ CRYPTPROTECT_PROMPT_ON_UNPROTECT = 1
+ CRYPTPROTECT_PROMPT_ON_PROTECT = 2
+ CRYPTPROTECT_PROMPT_RESERVED = 4
+ CRYPTPROTECT_PROMPT_STRONG = 8
+ CRYPTPROTECT_PROMPT_REQUIRE_STRONG = 16
)
const (
@@ -441,10 +663,58 @@ const (
REALTIME_PRIORITY_CLASS = 0x00000100
)
+/* wintrust.h constants for WinVerifyTrustEx */
+const (
+ WTD_UI_ALL = 1
+ WTD_UI_NONE = 2
+ WTD_UI_NOBAD = 3
+ WTD_UI_NOGOOD = 4
+
+ WTD_REVOKE_NONE = 0
+ WTD_REVOKE_WHOLECHAIN = 1
+
+ WTD_CHOICE_FILE = 1
+ WTD_CHOICE_CATALOG = 2
+ WTD_CHOICE_BLOB = 3
+ WTD_CHOICE_SIGNER = 4
+ WTD_CHOICE_CERT = 5
+
+ WTD_STATEACTION_IGNORE = 0x00000000
+ WTD_STATEACTION_VERIFY = 0x00000010
+ WTD_STATEACTION_CLOSE = 0x00000002
+ WTD_STATEACTION_AUTO_CACHE = 0x00000003
+ WTD_STATEACTION_AUTO_CACHE_FLUSH = 0x00000004
+
+ WTD_USE_IE4_TRUST_FLAG = 0x1
+ WTD_NO_IE4_CHAIN_FLAG = 0x2
+ WTD_NO_POLICY_USAGE_FLAG = 0x4
+ WTD_REVOCATION_CHECK_NONE = 0x10
+ WTD_REVOCATION_CHECK_END_CERT = 0x20
+ WTD_REVOCATION_CHECK_CHAIN = 0x40
+ WTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = 0x80
+ WTD_SAFER_FLAG = 0x100
+ WTD_HASH_ONLY_FLAG = 0x200
+ WTD_USE_DEFAULT_OSVER_CHECK = 0x400
+ WTD_LIFETIME_SIGNING_FLAG = 0x800
+ WTD_CACHE_ONLY_URL_RETRIEVAL = 0x1000
+ WTD_DISABLE_MD2_MD4 = 0x2000
+ WTD_MOTW = 0x4000
+
+ WTD_UICONTEXT_EXECUTE = 0
+ WTD_UICONTEXT_INSTALL = 1
+)
+
var (
OID_PKIX_KP_SERVER_AUTH = []byte("1.3.6.1.5.5.7.3.1\x00")
OID_SERVER_GATED_CRYPTO = []byte("1.3.6.1.4.1.311.10.3.3\x00")
OID_SGC_NETSCAPE = []byte("2.16.840.1.113730.4.1\x00")
+
+ WINTRUST_ACTION_GENERIC_VERIFY_V2 = GUID{
+ Data1: 0xaac56b,
+ Data2: 0xcd44,
+ Data3: 0x11d0,
+ Data4: [8]byte{0x8c, 0xc2, 0x0, 0xc0, 0x4f, 0xc2, 0x95, 0xee},
+ }
)
// Pointer represents a pointer to an arbitrary Windows type.
@@ -540,6 +810,14 @@ type win32finddata1 struct {
Reserved1 uint32
FileName [MAX_PATH]uint16
AlternateFileName [14]uint16
+
+ // The Microsoft documentation for this struct¹ describes three additional
+ // fields: dwFileType, dwCreatorType, and wFinderFlags. However, those fields
+ // are empirically only present in the macOS port of the Win32 API,² and thus
+ // not needed for binaries built for Windows.
+ //
+ // ¹ https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-win32_find_dataw describe
+ // ² https://golang.org/issue/42637#issuecomment-760715755.
}
func copyFindData(dst *Win32finddata, src *win32finddata1) {
@@ -624,6 +902,23 @@ type StartupInfo struct {
StdErr Handle
}
+type StartupInfoEx struct {
+ StartupInfo
+ ProcThreadAttributeList *ProcThreadAttributeList
+}
+
+// ProcThreadAttributeList is a placeholder type to represent a PROC_THREAD_ATTRIBUTE_LIST.
+//
+// To create a *ProcThreadAttributeList, use NewProcThreadAttributeList, and
+// free its memory using ProcThreadAttributeList.Delete.
+type ProcThreadAttributeList struct {
+ // This is of type unsafe.Pointer, not of type byte or uintptr, because
+ // the contents of it is mostly a list of pointers, and in most cases,
+ // that's a list of pointers to Go-allocated objects. In order to keep
+ // the GC from collecting these objects, we declare this as unsafe.Pointer.
+ _ [1]unsafe.Pointer
+}
+
type ProcessInformation struct {
Process Handle
Thread Handle
@@ -725,6 +1020,7 @@ const (
// cf. http://support.microsoft.com/default.aspx?scid=kb;en-us;257460
+ IP_HDRINCL = 0x2
IP_TOS = 0x3
IP_TTL = 0x4
IP_MULTICAST_IF = 0x9
@@ -732,6 +1028,7 @@ const (
IP_MULTICAST_LOOP = 0xb
IP_ADD_MEMBERSHIP = 0xc
IP_DROP_MEMBERSHIP = 0xd
+ IP_PKTINFO = 0x13
IPV6_V6ONLY = 0x1b
IPV6_UNICAST_HOPS = 0x4
@@ -740,6 +1037,7 @@ const (
IPV6_MULTICAST_LOOP = 0xb
IPV6_JOIN_GROUP = 0xc
IPV6_LEAVE_GROUP = 0xd
+ IPV6_PKTINFO = 0x13
MSG_OOB = 0x1
MSG_PEEK = 0x2
@@ -777,6 +1075,18 @@ type WSAMsg struct {
Flags uint32
}
+// Flags for WSASocket
+const (
+ WSA_FLAG_OVERLAPPED = 0x01
+ WSA_FLAG_MULTIPOINT_C_ROOT = 0x02
+ WSA_FLAG_MULTIPOINT_C_LEAF = 0x04
+ WSA_FLAG_MULTIPOINT_D_ROOT = 0x08
+ WSA_FLAG_MULTIPOINT_D_LEAF = 0x10
+ WSA_FLAG_ACCESS_SYSTEM_SECURITY = 0x40
+ WSA_FLAG_NO_HANDLE_INHERIT = 0x80
+ WSA_FLAG_REGISTERED_IO = 0x100
+)
+
// Invented values to support what package os expects.
const (
S_IFMT = 0x1f000
@@ -1033,7 +1343,57 @@ type MibIfRow struct {
}
type CertInfo struct {
- // Not implemented
+ Version uint32
+ SerialNumber CryptIntegerBlob
+ SignatureAlgorithm CryptAlgorithmIdentifier
+ Issuer CertNameBlob
+ NotBefore Filetime
+ NotAfter Filetime
+ Subject CertNameBlob
+ SubjectPublicKeyInfo CertPublicKeyInfo
+ IssuerUniqueId CryptBitBlob
+ SubjectUniqueId CryptBitBlob
+ CountExtensions uint32
+ Extensions *CertExtension
+}
+
+type CertExtension struct {
+ ObjId *byte
+ Critical int32
+ Value CryptObjidBlob
+}
+
+type CryptAlgorithmIdentifier struct {
+ ObjId *byte
+ Parameters CryptObjidBlob
+}
+
+type CertPublicKeyInfo struct {
+ Algorithm CryptAlgorithmIdentifier
+ PublicKey CryptBitBlob
+}
+
+type DataBlob struct {
+ Size uint32
+ Data *byte
+}
+type CryptIntegerBlob DataBlob
+type CryptUintBlob DataBlob
+type CryptObjidBlob DataBlob
+type CertNameBlob DataBlob
+type CertRdnValueBlob DataBlob
+type CertBlob DataBlob
+type CrlBlob DataBlob
+type CryptDataBlob DataBlob
+type CryptHashBlob DataBlob
+type CryptDigestBlob DataBlob
+type CryptDerBlob DataBlob
+type CryptAttrBlob DataBlob
+
+type CryptBitBlob struct {
+ Size uint32
+ Data *byte
+ UnusedBits uint32
}
type CertContext struct {
@@ -1139,6 +1499,79 @@ type CertChainPolicyStatus struct {
ExtraPolicyStatus Pointer
}
+type CertPolicyInfo struct {
+ Identifier *byte
+ CountQualifiers uint32
+ Qualifiers *CertPolicyQualifierInfo
+}
+
+type CertPoliciesInfo struct {
+ Count uint32
+ PolicyInfos *CertPolicyInfo
+}
+
+type CertPolicyQualifierInfo struct {
+ // Not implemented
+}
+
+type CertStrongSignPara struct {
+ Size uint32
+ InfoChoice uint32
+ InfoOrSerializedInfoOrOID unsafe.Pointer
+}
+
+type CryptProtectPromptStruct struct {
+ Size uint32
+ PromptFlags uint32
+ App HWND
+ Prompt *uint16
+}
+
+type CertChainFindByIssuerPara struct {
+ Size uint32
+ UsageIdentifier *byte
+ KeySpec uint32
+ AcquirePrivateKeyFlags uint32
+ IssuerCount uint32
+ Issuer Pointer
+ FindCallback Pointer
+ FindArg Pointer
+ IssuerChainIndex *uint32
+ IssuerElementIndex *uint32
+}
+
+type WinTrustData struct {
+ Size uint32
+ PolicyCallbackData uintptr
+ SIPClientData uintptr
+ UIChoice uint32
+ RevocationChecks uint32
+ UnionChoice uint32
+ FileOrCatalogOrBlobOrSgnrOrCert unsafe.Pointer
+ StateAction uint32
+ StateData Handle
+ URLReference *uint16
+ ProvFlags uint32
+ UIContext uint32
+ SignatureSettings *WinTrustSignatureSettings
+}
+
+type WinTrustFileInfo struct {
+ Size uint32
+ FilePath *uint16
+ File Handle
+ KnownSubject *GUID
+}
+
+type WinTrustSignatureSettings struct {
+ Size uint32
+ Index uint32
+ Flags uint32
+ SecondarySigs uint32
+ VerifiedSigIndex uint32
+ CryptoPolicy *CertStrongSignPara
+}
+
const (
// do not reorder
HKEY_CLASSES_ROOT = 0x80000000 + iota
@@ -1584,18 +2017,6 @@ const (
JOB_OBJECT_LIMIT_WORKINGSET = 0x00000001
)
-type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
- PerProcessUserTimeLimit int64
- PerJobUserTimeLimit int64
- LimitFlags uint32
- MinimumWorkingSetSize uintptr
- MaximumWorkingSetSize uintptr
- ActiveProcessLimit uint32
- Affinity uintptr
- PriorityClass uint32
- SchedulingClass uint32
-}
-
type IO_COUNTERS struct {
ReadOperationCount uint64
WriteOperationCount uint64
@@ -1784,3 +2205,570 @@ const (
MUI_LANGUAGE_INSTALLED = 0x20
MUI_LANGUAGE_LICENSED = 0x40
)
+
+// FILE_INFO_BY_HANDLE_CLASS constants for SetFileInformationByHandle/GetFileInformationByHandleEx
+const (
+ FileBasicInfo = 0
+ FileStandardInfo = 1
+ FileNameInfo = 2
+ FileRenameInfo = 3
+ FileDispositionInfo = 4
+ FileAllocationInfo = 5
+ FileEndOfFileInfo = 6
+ FileStreamInfo = 7
+ FileCompressionInfo = 8
+ FileAttributeTagInfo = 9
+ FileIdBothDirectoryInfo = 10
+ FileIdBothDirectoryRestartInfo = 11
+ FileIoPriorityHintInfo = 12
+ FileRemoteProtocolInfo = 13
+ FileFullDirectoryInfo = 14
+ FileFullDirectoryRestartInfo = 15
+ FileStorageInfo = 16
+ FileAlignmentInfo = 17
+ FileIdInfo = 18
+ FileIdExtdDirectoryInfo = 19
+ FileIdExtdDirectoryRestartInfo = 20
+ FileDispositionInfoEx = 21
+ FileRenameInfoEx = 22
+ FileCaseSensitiveInfo = 23
+ FileNormalizedNameInfo = 24
+)
+
+// LoadLibrary flags for determining from where to search for a DLL
+const (
+ DONT_RESOLVE_DLL_REFERENCES = 0x1
+ LOAD_LIBRARY_AS_DATAFILE = 0x2
+ LOAD_WITH_ALTERED_SEARCH_PATH = 0x8
+ LOAD_IGNORE_CODE_AUTHZ_LEVEL = 0x10
+ LOAD_LIBRARY_AS_IMAGE_RESOURCE = 0x20
+ LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE = 0x40
+ LOAD_LIBRARY_REQUIRE_SIGNED_TARGET = 0x80
+ LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR = 0x100
+ LOAD_LIBRARY_SEARCH_APPLICATION_DIR = 0x200
+ LOAD_LIBRARY_SEARCH_USER_DIRS = 0x400
+ LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x800
+ LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x1000
+ LOAD_LIBRARY_SAFE_CURRENT_DIRS = 0x00002000
+ LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER = 0x00004000
+ LOAD_LIBRARY_OS_INTEGRITY_CONTINUITY = 0x00008000
+)
+
+// RegNotifyChangeKeyValue notifyFilter flags.
+const (
+ // REG_NOTIFY_CHANGE_NAME notifies the caller if a subkey is added or deleted.
+ REG_NOTIFY_CHANGE_NAME = 0x00000001
+
+ // REG_NOTIFY_CHANGE_ATTRIBUTES notifies the caller of changes to the attributes of the key, such as the security descriptor information.
+ REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002
+
+ // REG_NOTIFY_CHANGE_LAST_SET notifies the caller of changes to a value of the key. This can include adding or deleting a value, or changing an existing value.
+ REG_NOTIFY_CHANGE_LAST_SET = 0x00000004
+
+ // REG_NOTIFY_CHANGE_SECURITY notifies the caller of changes to the security descriptor of the key.
+ REG_NOTIFY_CHANGE_SECURITY = 0x00000008
+
+ // REG_NOTIFY_THREAD_AGNOSTIC indicates that the lifetime of the registration must not be tied to the lifetime of the thread issuing the RegNotifyChangeKeyValue call. Note: This flag value is only supported in Windows 8 and later.
+ REG_NOTIFY_THREAD_AGNOSTIC = 0x10000000
+)
+
+type CommTimeouts struct {
+ ReadIntervalTimeout uint32
+ ReadTotalTimeoutMultiplier uint32
+ ReadTotalTimeoutConstant uint32
+ WriteTotalTimeoutMultiplier uint32
+ WriteTotalTimeoutConstant uint32
+}
+
+// NTUnicodeString is a UTF-16 string for NT native APIs, corresponding to UNICODE_STRING.
+type NTUnicodeString struct {
+ Length uint16
+ MaximumLength uint16
+ Buffer *uint16
+}
+
+// NTString is an ANSI string for NT native APIs, corresponding to STRING.
+type NTString struct {
+ Length uint16
+ MaximumLength uint16
+ Buffer *byte
+}
+
+type LIST_ENTRY struct {
+ Flink *LIST_ENTRY
+ Blink *LIST_ENTRY
+}
+
+type LDR_DATA_TABLE_ENTRY struct {
+ reserved1 [2]uintptr
+ InMemoryOrderLinks LIST_ENTRY
+ reserved2 [2]uintptr
+ DllBase uintptr
+ reserved3 [2]uintptr
+ FullDllName NTUnicodeString
+ reserved4 [8]byte
+ reserved5 [3]uintptr
+ reserved6 uintptr
+ TimeDateStamp uint32
+}
+
+type PEB_LDR_DATA struct {
+ reserved1 [8]byte
+ reserved2 [3]uintptr
+ InMemoryOrderModuleList LIST_ENTRY
+}
+
+type CURDIR struct {
+ DosPath NTUnicodeString
+ Handle Handle
+}
+
+type RTL_DRIVE_LETTER_CURDIR struct {
+ Flags uint16
+ Length uint16
+ TimeStamp uint32
+ DosPath NTString
+}
+
+type RTL_USER_PROCESS_PARAMETERS struct {
+ MaximumLength, Length uint32
+
+ Flags, DebugFlags uint32
+
+ ConsoleHandle Handle
+ ConsoleFlags uint32
+ StandardInput, StandardOutput, StandardError Handle
+
+ CurrentDirectory CURDIR
+ DllPath NTUnicodeString
+ ImagePathName NTUnicodeString
+ CommandLine NTUnicodeString
+ Environment unsafe.Pointer
+
+ StartingX, StartingY, CountX, CountY, CountCharsX, CountCharsY, FillAttribute uint32
+
+ WindowFlags, ShowWindowFlags uint32
+ WindowTitle, DesktopInfo, ShellInfo, RuntimeData NTUnicodeString
+ CurrentDirectories [32]RTL_DRIVE_LETTER_CURDIR
+
+ EnvironmentSize, EnvironmentVersion uintptr
+
+ PackageDependencyData unsafe.Pointer
+ ProcessGroupId uint32
+ LoaderThreads uint32
+
+ RedirectionDllName NTUnicodeString
+ HeapPartitionName NTUnicodeString
+ DefaultThreadpoolCpuSetMasks uintptr
+ DefaultThreadpoolCpuSetMaskCount uint32
+}
+
+type PEB struct {
+ reserved1 [2]byte
+ BeingDebugged byte
+ BitField byte
+ reserved3 uintptr
+ ImageBaseAddress uintptr
+ Ldr *PEB_LDR_DATA
+ ProcessParameters *RTL_USER_PROCESS_PARAMETERS
+ reserved4 [3]uintptr
+ AtlThunkSListPtr uintptr
+ reserved5 uintptr
+ reserved6 uint32
+ reserved7 uintptr
+ reserved8 uint32
+ AtlThunkSListPtr32 uint32
+ reserved9 [45]uintptr
+ reserved10 [96]byte
+ PostProcessInitRoutine uintptr
+ reserved11 [128]byte
+ reserved12 [1]uintptr
+ SessionId uint32
+}
+
+type OBJECT_ATTRIBUTES struct {
+ Length uint32
+ RootDirectory Handle
+ ObjectName *NTUnicodeString
+ Attributes uint32
+ SecurityDescriptor *SECURITY_DESCRIPTOR
+ SecurityQoS *SECURITY_QUALITY_OF_SERVICE
+}
+
+// Values for the Attributes member of OBJECT_ATTRIBUTES.
+const (
+ OBJ_INHERIT = 0x00000002
+ OBJ_PERMANENT = 0x00000010
+ OBJ_EXCLUSIVE = 0x00000020
+ OBJ_CASE_INSENSITIVE = 0x00000040
+ OBJ_OPENIF = 0x00000080
+ OBJ_OPENLINK = 0x00000100
+ OBJ_KERNEL_HANDLE = 0x00000200
+ OBJ_FORCE_ACCESS_CHECK = 0x00000400
+ OBJ_IGNORE_IMPERSONATED_DEVICEMAP = 0x00000800
+ OBJ_DONT_REPARSE = 0x00001000
+ OBJ_VALID_ATTRIBUTES = 0x00001FF2
+)
+
+type IO_STATUS_BLOCK struct {
+ Status NTStatus
+ Information uintptr
+}
+
+type RTLP_CURDIR_REF struct {
+ RefCount int32
+ Handle Handle
+}
+
+type RTL_RELATIVE_NAME struct {
+ RelativeName NTUnicodeString
+ ContainingDirectory Handle
+ CurDirRef *RTLP_CURDIR_REF
+}
+
+const (
+ // CreateDisposition flags for NtCreateFile and NtCreateNamedPipeFile.
+ FILE_SUPERSEDE = 0x00000000
+ FILE_OPEN = 0x00000001
+ FILE_CREATE = 0x00000002
+ FILE_OPEN_IF = 0x00000003
+ FILE_OVERWRITE = 0x00000004
+ FILE_OVERWRITE_IF = 0x00000005
+ FILE_MAXIMUM_DISPOSITION = 0x00000005
+
+ // CreateOptions flags for NtCreateFile and NtCreateNamedPipeFile.
+ FILE_DIRECTORY_FILE = 0x00000001
+ FILE_WRITE_THROUGH = 0x00000002
+ FILE_SEQUENTIAL_ONLY = 0x00000004
+ FILE_NO_INTERMEDIATE_BUFFERING = 0x00000008
+ FILE_SYNCHRONOUS_IO_ALERT = 0x00000010
+ FILE_SYNCHRONOUS_IO_NONALERT = 0x00000020
+ FILE_NON_DIRECTORY_FILE = 0x00000040
+ FILE_CREATE_TREE_CONNECTION = 0x00000080
+ FILE_COMPLETE_IF_OPLOCKED = 0x00000100
+ FILE_NO_EA_KNOWLEDGE = 0x00000200
+ FILE_OPEN_REMOTE_INSTANCE = 0x00000400
+ FILE_RANDOM_ACCESS = 0x00000800
+ FILE_DELETE_ON_CLOSE = 0x00001000
+ FILE_OPEN_BY_FILE_ID = 0x00002000
+ FILE_OPEN_FOR_BACKUP_INTENT = 0x00004000
+ FILE_NO_COMPRESSION = 0x00008000
+ FILE_OPEN_REQUIRING_OPLOCK = 0x00010000
+ FILE_DISALLOW_EXCLUSIVE = 0x00020000
+ FILE_RESERVE_OPFILTER = 0x00100000
+ FILE_OPEN_REPARSE_POINT = 0x00200000
+ FILE_OPEN_NO_RECALL = 0x00400000
+ FILE_OPEN_FOR_FREE_SPACE_QUERY = 0x00800000
+
+ // Parameter constants for NtCreateNamedPipeFile.
+
+ FILE_PIPE_BYTE_STREAM_TYPE = 0x00000000
+ FILE_PIPE_MESSAGE_TYPE = 0x00000001
+
+ FILE_PIPE_ACCEPT_REMOTE_CLIENTS = 0x00000000
+ FILE_PIPE_REJECT_REMOTE_CLIENTS = 0x00000002
+
+ FILE_PIPE_TYPE_VALID_MASK = 0x00000003
+
+ FILE_PIPE_BYTE_STREAM_MODE = 0x00000000
+ FILE_PIPE_MESSAGE_MODE = 0x00000001
+
+ FILE_PIPE_QUEUE_OPERATION = 0x00000000
+ FILE_PIPE_COMPLETE_OPERATION = 0x00000001
+
+ FILE_PIPE_INBOUND = 0x00000000
+ FILE_PIPE_OUTBOUND = 0x00000001
+ FILE_PIPE_FULL_DUPLEX = 0x00000002
+
+ FILE_PIPE_DISCONNECTED_STATE = 0x00000001
+ FILE_PIPE_LISTENING_STATE = 0x00000002
+ FILE_PIPE_CONNECTED_STATE = 0x00000003
+ FILE_PIPE_CLOSING_STATE = 0x00000004
+
+ FILE_PIPE_CLIENT_END = 0x00000000
+ FILE_PIPE_SERVER_END = 0x00000001
+)
+
+// ProcessInformationClasses for NtQueryInformationProcess and NtSetInformationProcess.
+const (
+ ProcessBasicInformation = iota
+ ProcessQuotaLimits
+ ProcessIoCounters
+ ProcessVmCounters
+ ProcessTimes
+ ProcessBasePriority
+ ProcessRaisePriority
+ ProcessDebugPort
+ ProcessExceptionPort
+ ProcessAccessToken
+ ProcessLdtInformation
+ ProcessLdtSize
+ ProcessDefaultHardErrorMode
+ ProcessIoPortHandlers
+ ProcessPooledUsageAndLimits
+ ProcessWorkingSetWatch
+ ProcessUserModeIOPL
+ ProcessEnableAlignmentFaultFixup
+ ProcessPriorityClass
+ ProcessWx86Information
+ ProcessHandleCount
+ ProcessAffinityMask
+ ProcessPriorityBoost
+ ProcessDeviceMap
+ ProcessSessionInformation
+ ProcessForegroundInformation
+ ProcessWow64Information
+ ProcessImageFileName
+ ProcessLUIDDeviceMapsEnabled
+ ProcessBreakOnTermination
+ ProcessDebugObjectHandle
+ ProcessDebugFlags
+ ProcessHandleTracing
+ ProcessIoPriority
+ ProcessExecuteFlags
+ ProcessTlsInformation
+ ProcessCookie
+ ProcessImageInformation
+ ProcessCycleTime
+ ProcessPagePriority
+ ProcessInstrumentationCallback
+ ProcessThreadStackAllocation
+ ProcessWorkingSetWatchEx
+ ProcessImageFileNameWin32
+ ProcessImageFileMapping
+ ProcessAffinityUpdateMode
+ ProcessMemoryAllocationMode
+ ProcessGroupInformation
+ ProcessTokenVirtualizationEnabled
+ ProcessConsoleHostProcess
+ ProcessWindowInformation
+ ProcessHandleInformation
+ ProcessMitigationPolicy
+ ProcessDynamicFunctionTableInformation
+ ProcessHandleCheckingMode
+ ProcessKeepAliveCount
+ ProcessRevokeFileHandles
+ ProcessWorkingSetControl
+ ProcessHandleTable
+ ProcessCheckStackExtentsMode
+ ProcessCommandLineInformation
+ ProcessProtectionInformation
+ ProcessMemoryExhaustion
+ ProcessFaultInformation
+ ProcessTelemetryIdInformation
+ ProcessCommitReleaseInformation
+ ProcessDefaultCpuSetsInformation
+ ProcessAllowedCpuSetsInformation
+ ProcessSubsystemProcess
+ ProcessJobMemoryInformation
+ ProcessInPrivate
+ ProcessRaiseUMExceptionOnInvalidHandleClose
+ ProcessIumChallengeResponse
+ ProcessChildProcessInformation
+ ProcessHighGraphicsPriorityInformation
+ ProcessSubsystemInformation
+ ProcessEnergyValues
+ ProcessActivityThrottleState
+ ProcessActivityThrottlePolicy
+ ProcessWin32kSyscallFilterInformation
+ ProcessDisableSystemAllowedCpuSets
+ ProcessWakeInformation
+ ProcessEnergyTrackingState
+ ProcessManageWritesToExecutableMemory
+ ProcessCaptureTrustletLiveDump
+ ProcessTelemetryCoverage
+ ProcessEnclaveInformation
+ ProcessEnableReadWriteVmLogging
+ ProcessUptimeInformation
+ ProcessImageSection
+ ProcessDebugAuthInformation
+ ProcessSystemResourceManagement
+ ProcessSequenceNumber
+ ProcessLoaderDetour
+ ProcessSecurityDomainInformation
+ ProcessCombineSecurityDomainsInformation
+ ProcessEnableLogging
+ ProcessLeapSecondInformation
+ ProcessFiberShadowStackAllocation
+ ProcessFreeFiberShadowStackAllocation
+ ProcessAltSystemCallInformation
+ ProcessDynamicEHContinuationTargets
+ ProcessDynamicEnforcedCetCompatibleRanges
+)
+
+type PROCESS_BASIC_INFORMATION struct {
+ ExitStatus NTStatus
+ PebBaseAddress *PEB
+ AffinityMask uintptr
+ BasePriority int32
+ UniqueProcessId uintptr
+ InheritedFromUniqueProcessId uintptr
+}
+
+// Constants for LocalAlloc flags.
+const (
+ LMEM_FIXED = 0x0
+ LMEM_MOVEABLE = 0x2
+ LMEM_NOCOMPACT = 0x10
+ LMEM_NODISCARD = 0x20
+ LMEM_ZEROINIT = 0x40
+ LMEM_MODIFY = 0x80
+ LMEM_DISCARDABLE = 0xf00
+ LMEM_VALID_FLAGS = 0xf72
+ LMEM_INVALID_HANDLE = 0x8000
+ LHND = LMEM_MOVEABLE | LMEM_ZEROINIT
+ LPTR = LMEM_FIXED | LMEM_ZEROINIT
+ NONZEROLHND = LMEM_MOVEABLE
+ NONZEROLPTR = LMEM_FIXED
+)
+
+// Constants for the CreateNamedPipe-family of functions.
+const (
+ PIPE_ACCESS_INBOUND = 0x1
+ PIPE_ACCESS_OUTBOUND = 0x2
+ PIPE_ACCESS_DUPLEX = 0x3
+
+ PIPE_CLIENT_END = 0x0
+ PIPE_SERVER_END = 0x1
+
+ PIPE_WAIT = 0x0
+ PIPE_NOWAIT = 0x1
+ PIPE_READMODE_BYTE = 0x0
+ PIPE_READMODE_MESSAGE = 0x2
+ PIPE_TYPE_BYTE = 0x0
+ PIPE_TYPE_MESSAGE = 0x4
+ PIPE_ACCEPT_REMOTE_CLIENTS = 0x0
+ PIPE_REJECT_REMOTE_CLIENTS = 0x8
+
+ PIPE_UNLIMITED_INSTANCES = 255
+)
+
+// Constants for security attributes when opening named pipes.
+const (
+ SECURITY_ANONYMOUS = SecurityAnonymous << 16
+ SECURITY_IDENTIFICATION = SecurityIdentification << 16
+ SECURITY_IMPERSONATION = SecurityImpersonation << 16
+ SECURITY_DELEGATION = SecurityDelegation << 16
+
+ SECURITY_CONTEXT_TRACKING = 0x40000
+ SECURITY_EFFECTIVE_ONLY = 0x80000
+
+ SECURITY_SQOS_PRESENT = 0x100000
+ SECURITY_VALID_SQOS_FLAGS = 0x1f0000
+)
+
+// ResourceID represents a 16-bit resource identifier, traditionally created with the MAKEINTRESOURCE macro.
+type ResourceID uint16
+
+// ResourceIDOrString must be either a ResourceID, to specify a resource or resource type by ID,
+// or a string, to specify a resource or resource type by name.
+type ResourceIDOrString interface{}
+
+// Predefined resource names and types.
+var (
+ // Predefined names.
+ CREATEPROCESS_MANIFEST_RESOURCE_ID ResourceID = 1
+ ISOLATIONAWARE_MANIFEST_RESOURCE_ID ResourceID = 2
+ ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID ResourceID = 3
+ ISOLATIONPOLICY_MANIFEST_RESOURCE_ID ResourceID = 4
+ ISOLATIONPOLICY_BROWSER_MANIFEST_RESOURCE_ID ResourceID = 5
+ MINIMUM_RESERVED_MANIFEST_RESOURCE_ID ResourceID = 1 // inclusive
+ MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID ResourceID = 16 // inclusive
+
+ // Predefined types.
+ RT_CURSOR ResourceID = 1
+ RT_BITMAP ResourceID = 2
+ RT_ICON ResourceID = 3
+ RT_MENU ResourceID = 4
+ RT_DIALOG ResourceID = 5
+ RT_STRING ResourceID = 6
+ RT_FONTDIR ResourceID = 7
+ RT_FONT ResourceID = 8
+ RT_ACCELERATOR ResourceID = 9
+ RT_RCDATA ResourceID = 10
+ RT_MESSAGETABLE ResourceID = 11
+ RT_GROUP_CURSOR ResourceID = 12
+ RT_GROUP_ICON ResourceID = 14
+ RT_VERSION ResourceID = 16
+ RT_DLGINCLUDE ResourceID = 17
+ RT_PLUGPLAY ResourceID = 19
+ RT_VXD ResourceID = 20
+ RT_ANICURSOR ResourceID = 21
+ RT_ANIICON ResourceID = 22
+ RT_HTML ResourceID = 23
+ RT_MANIFEST ResourceID = 24
+)
+
+type COAUTHIDENTITY struct {
+ User *uint16
+ UserLength uint32
+ Domain *uint16
+ DomainLength uint32
+ Password *uint16
+ PasswordLength uint32
+ Flags uint32
+}
+
+type COAUTHINFO struct {
+ AuthnSvc uint32
+ AuthzSvc uint32
+ ServerPrincName *uint16
+ AuthnLevel uint32
+ ImpersonationLevel uint32
+ AuthIdentityData *COAUTHIDENTITY
+ Capabilities uint32
+}
+
+type COSERVERINFO struct {
+ Reserved1 uint32
+ Aame *uint16
+ AuthInfo *COAUTHINFO
+ Reserved2 uint32
+}
+
+type BIND_OPTS3 struct {
+ CbStruct uint32
+ Flags uint32
+ Mode uint32
+ TickCountDeadline uint32
+ TrackFlags uint32
+ ClassContext uint32
+ Locale uint32
+ ServerInfo *COSERVERINFO
+ Hwnd HWND
+}
+
+const (
+ CLSCTX_INPROC_SERVER = 0x1
+ CLSCTX_INPROC_HANDLER = 0x2
+ CLSCTX_LOCAL_SERVER = 0x4
+ CLSCTX_INPROC_SERVER16 = 0x8
+ CLSCTX_REMOTE_SERVER = 0x10
+ CLSCTX_INPROC_HANDLER16 = 0x20
+ CLSCTX_RESERVED1 = 0x40
+ CLSCTX_RESERVED2 = 0x80
+ CLSCTX_RESERVED3 = 0x100
+ CLSCTX_RESERVED4 = 0x200
+ CLSCTX_NO_CODE_DOWNLOAD = 0x400
+ CLSCTX_RESERVED5 = 0x800
+ CLSCTX_NO_CUSTOM_MARSHAL = 0x1000
+ CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000
+ CLSCTX_NO_FAILURE_LOG = 0x4000
+ CLSCTX_DISABLE_AAA = 0x8000
+ CLSCTX_ENABLE_AAA = 0x10000
+ CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000
+ CLSCTX_ACTIVATE_32_BIT_SERVER = 0x40000
+ CLSCTX_ACTIVATE_64_BIT_SERVER = 0x80000
+ CLSCTX_ENABLE_CLOAKING = 0x100000
+ CLSCTX_APPCONTAINER = 0x400000
+ CLSCTX_ACTIVATE_AAA_AS_IU = 0x800000
+ CLSCTX_PS_DLL = 0x80000000
+
+ COINIT_MULTITHREADED = 0x0
+ COINIT_APARTMENTTHREADED = 0x2
+ COINIT_DISABLE_OLE1DDE = 0x4
+ COINIT_SPEED_OVER_MEMORY = 0x8
+)
+
+// Flag for QueryFullProcessImageName.
+const PROCESS_NAME_NATIVE = 1
diff --git a/vendor/golang.org/x/sys/windows/types_windows_386.go b/vendor/golang.org/x/sys/windows/types_windows_386.go
index fe0ddd0..8bce3e2 100644
--- a/vendor/golang.org/x/sys/windows/types_windows_386.go
+++ b/vendor/golang.org/x/sys/windows/types_windows_386.go
@@ -20,3 +20,16 @@ type Servent struct {
Port uint16
Proto *byte
}
+
+type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
+ PerProcessUserTimeLimit int64
+ PerJobUserTimeLimit int64
+ LimitFlags uint32
+ MinimumWorkingSetSize uintptr
+ MaximumWorkingSetSize uintptr
+ ActiveProcessLimit uint32
+ Affinity uintptr
+ PriorityClass uint32
+ SchedulingClass uint32
+ _ uint32 // pad to 8 byte boundary
+}
diff --git a/vendor/golang.org/x/sys/windows/types_windows_amd64.go b/vendor/golang.org/x/sys/windows/types_windows_amd64.go
index 7e154c2..fdddc0c 100644
--- a/vendor/golang.org/x/sys/windows/types_windows_amd64.go
+++ b/vendor/golang.org/x/sys/windows/types_windows_amd64.go
@@ -20,3 +20,15 @@ type Servent struct {
Proto *byte
Port uint16
}
+
+type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
+ PerProcessUserTimeLimit int64
+ PerJobUserTimeLimit int64
+ LimitFlags uint32
+ MinimumWorkingSetSize uintptr
+ MaximumWorkingSetSize uintptr
+ ActiveProcessLimit uint32
+ Affinity uintptr
+ PriorityClass uint32
+ SchedulingClass uint32
+}
diff --git a/vendor/golang.org/x/sys/windows/types_windows_arm.go b/vendor/golang.org/x/sys/windows/types_windows_arm.go
index 74571e3..321872c 100644
--- a/vendor/golang.org/x/sys/windows/types_windows_arm.go
+++ b/vendor/golang.org/x/sys/windows/types_windows_arm.go
@@ -20,3 +20,16 @@ type Servent struct {
Port uint16
Proto *byte
}
+
+type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
+ PerProcessUserTimeLimit int64
+ PerJobUserTimeLimit int64
+ LimitFlags uint32
+ MinimumWorkingSetSize uintptr
+ MaximumWorkingSetSize uintptr
+ ActiveProcessLimit uint32
+ Affinity uintptr
+ PriorityClass uint32
+ SchedulingClass uint32
+ _ uint32 // pad to 8 byte boundary
+}
diff --git a/vendor/golang.org/x/sys/windows/types_windows_arm64.go b/vendor/golang.org/x/sys/windows/types_windows_arm64.go
new file mode 100644
index 0000000..fdddc0c
--- /dev/null
+++ b/vendor/golang.org/x/sys/windows/types_windows_arm64.go
@@ -0,0 +1,34 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package windows
+
+type WSAData struct {
+ Version uint16
+ HighVersion uint16
+ MaxSockets uint16
+ MaxUdpDg uint16
+ VendorInfo *byte
+ Description [WSADESCRIPTION_LEN + 1]byte
+ SystemStatus [WSASYS_STATUS_LEN + 1]byte
+}
+
+type Servent struct {
+ Name *byte
+ Aliases **byte
+ Proto *byte
+ Port uint16
+}
+
+type JOBOBJECT_BASIC_LIMIT_INFORMATION struct {
+ PerProcessUserTimeLimit int64
+ PerJobUserTimeLimit int64
+ LimitFlags uint32
+ MinimumWorkingSetSize uintptr
+ MaximumWorkingSetSize uintptr
+ ActiveProcessLimit uint32
+ Affinity uintptr
+ PriorityClass uint32
+ SchedulingClass uint32
+}
diff --git a/vendor/golang.org/x/sys/windows/zerrors_windows.go b/vendor/golang.org/x/sys/windows/zerrors_windows.go
index f021200..0cf658f 100644
--- a/vendor/golang.org/x/sys/windows/zerrors_windows.go
+++ b/vendor/golang.org/x/sys/windows/zerrors_windows.go
@@ -146,6 +146,7 @@ const (
FACILITY_WEP = 2049
FACILITY_SYNCENGINE = 2050
FACILITY_XBOX = 2339
+ FACILITY_GAME = 2340
FACILITY_PIX = 2748
ERROR_SUCCESS syscall.Errno = 0
NO_ERROR = 0
@@ -469,9 +470,18 @@ const (
ERROR_STORAGE_RESERVE_NOT_EMPTY syscall.Errno = 419
ERROR_NOT_A_DAX_VOLUME syscall.Errno = 420
ERROR_NOT_DAX_MAPPABLE syscall.Errno = 421
- ERROR_TIME_CRITICAL_THREAD syscall.Errno = 422
+ ERROR_TIME_SENSITIVE_THREAD syscall.Errno = 422
ERROR_DPL_NOT_SUPPORTED_FOR_USER syscall.Errno = 423
ERROR_CASE_DIFFERING_NAMES_IN_DIR syscall.Errno = 424
+ ERROR_FILE_NOT_SUPPORTED syscall.Errno = 425
+ ERROR_CLOUD_FILE_REQUEST_TIMEOUT syscall.Errno = 426
+ ERROR_NO_TASK_QUEUE syscall.Errno = 427
+ ERROR_SRC_SRV_DLL_LOAD_FAILED syscall.Errno = 428
+ ERROR_NOT_SUPPORTED_WITH_BTT syscall.Errno = 429
+ ERROR_ENCRYPTION_DISABLED syscall.Errno = 430
+ ERROR_ENCRYPTING_METADATA_DISALLOWED syscall.Errno = 431
+ ERROR_CANT_CLEAR_ENCRYPTION_FLAG syscall.Errno = 432
+ ERROR_NO_SUCH_DEVICE syscall.Errno = 433
ERROR_CAPAUTHZ_NOT_DEVUNLOCKED syscall.Errno = 450
ERROR_CAPAUTHZ_CHANGE_TYPE syscall.Errno = 451
ERROR_CAPAUTHZ_NOT_PROVISIONED syscall.Errno = 452
@@ -1593,6 +1603,8 @@ const (
ERROR_SYSTEM_INTEGRITY_POLICY_VIOLATION syscall.Errno = 4551
ERROR_SYSTEM_INTEGRITY_INVALID_POLICY syscall.Errno = 4552
ERROR_SYSTEM_INTEGRITY_POLICY_NOT_SIGNED syscall.Errno = 4553
+ ERROR_SYSTEM_INTEGRITY_TOO_MANY_POLICIES syscall.Errno = 4554
+ ERROR_SYSTEM_INTEGRITY_SUPPLEMENTAL_POLICY_NOT_AUTHORIZED syscall.Errno = 4555
ERROR_VSM_NOT_INITIALIZED syscall.Errno = 4560
ERROR_VSM_DMA_PROTECTION_NOT_IN_USE syscall.Errno = 4561
ERROR_PLATFORM_MANIFEST_NOT_AUTHORIZED syscall.Errno = 4570
@@ -1824,6 +1836,7 @@ const (
ERROR_CS_ENCRYPTION_NEW_ENCRYPTED_FILE syscall.Errno = 6020
ERROR_CS_ENCRYPTION_FILE_NOT_CSE syscall.Errno = 6021
ERROR_ENCRYPTION_POLICY_DENIES_OPERATION syscall.Errno = 6022
+ ERROR_WIP_ENCRYPTION_FAILED syscall.Errno = 6023
ERROR_NO_BROWSER_SERVERS_FOUND syscall.Errno = 6118
SCHED_E_SERVICE_NOT_LOCALSYSTEM syscall.Errno = 6200
ERROR_LOG_SECTOR_INVALID syscall.Errno = 6600
@@ -3000,6 +3013,7 @@ const (
ERROR_SMI_PRIMITIVE_INSTALLER_FAILED syscall.Errno = 14108
ERROR_GENERIC_COMMAND_FAILED syscall.Errno = 14109
ERROR_SXS_FILE_HASH_MISSING syscall.Errno = 14110
+ ERROR_SXS_DUPLICATE_ACTIVATABLE_CLASS syscall.Errno = 14111
ERROR_EVT_INVALID_CHANNEL_PATH syscall.Errno = 15000
ERROR_EVT_INVALID_QUERY syscall.Errno = 15001
ERROR_EVT_PUBLISHER_METADATA_NOT_FOUND syscall.Errno = 15002
@@ -3093,6 +3107,7 @@ const (
ERROR_PRI_MERGE_RESOURCE_PACKAGE_REQUIRED syscall.Errno = 15157
ERROR_PRI_MERGE_INVALID_FILE_NAME syscall.Errno = 15158
ERROR_MRM_PACKAGE_NOT_FOUND syscall.Errno = 15159
+ ERROR_MRM_MISSING_DEFAULT_LANGUAGE syscall.Errno = 15160
ERROR_MCA_INVALID_CAPABILITIES_STRING syscall.Errno = 15200
ERROR_MCA_INVALID_VCP_VERSION syscall.Errno = 15201
ERROR_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION syscall.Errno = 15202
@@ -3167,6 +3182,15 @@ const (
ERROR_DEPLOYMENT_OPTION_NOT_SUPPORTED syscall.Errno = 15645
ERROR_APPINSTALLER_ACTIVATION_BLOCKED syscall.Errno = 15646
ERROR_REGISTRATION_FROM_REMOTE_DRIVE_NOT_SUPPORTED syscall.Errno = 15647
+ ERROR_APPX_RAW_DATA_WRITE_FAILED syscall.Errno = 15648
+ ERROR_DEPLOYMENT_BLOCKED_BY_VOLUME_POLICY_PACKAGE syscall.Errno = 15649
+ ERROR_DEPLOYMENT_BLOCKED_BY_VOLUME_POLICY_MACHINE syscall.Errno = 15650
+ ERROR_DEPLOYMENT_BLOCKED_BY_PROFILE_POLICY syscall.Errno = 15651
+ ERROR_DEPLOYMENT_FAILED_CONFLICTING_MUTABLE_PACKAGE_DIRECTORY syscall.Errno = 15652
+ ERROR_SINGLETON_RESOURCE_INSTALLED_IN_ACTIVE_USER syscall.Errno = 15653
+ ERROR_DIFFERENT_VERSION_OF_PACKAGED_SERVICE_INSTALLED syscall.Errno = 15654
+ ERROR_SERVICE_EXISTS_AS_NON_PACKAGED_SERVICE syscall.Errno = 15655
+ ERROR_PACKAGED_SERVICE_REQUIRES_ADMIN_PRIVILEGES syscall.Errno = 15656
APPMODEL_ERROR_NO_PACKAGE syscall.Errno = 15700
APPMODEL_ERROR_PACKAGE_RUNTIME_CORRUPT syscall.Errno = 15701
APPMODEL_ERROR_PACKAGE_IDENTITY_CORRUPT syscall.Errno = 15702
@@ -3174,6 +3198,7 @@ const (
APPMODEL_ERROR_DYNAMIC_PROPERTY_READ_FAILED syscall.Errno = 15704
APPMODEL_ERROR_DYNAMIC_PROPERTY_INVALID syscall.Errno = 15705
APPMODEL_ERROR_PACKAGE_NOT_AVAILABLE syscall.Errno = 15706
+ APPMODEL_ERROR_NO_MUTABLE_DIRECTORY syscall.Errno = 15707
ERROR_STATE_LOAD_STORE_FAILED syscall.Errno = 15800
ERROR_STATE_GET_VERSION_FAILED syscall.Errno = 15801
ERROR_STATE_SET_VERSION_FAILED syscall.Errno = 15802
@@ -3204,7 +3229,8 @@ const (
E_NOT_SET = ERROR_NOT_FOUND
E_NOT_VALID_STATE = ERROR_INVALID_STATE
E_NOT_SUFFICIENT_BUFFER = ERROR_INSUFFICIENT_BUFFER
- E_TIME_CRITICAL_THREAD = ERROR_TIME_CRITICAL_THREAD
+ E_TIME_SENSITIVE_THREAD = ERROR_TIME_SENSITIVE_THREAD
+ E_NO_TASK_QUEUE = ERROR_NO_TASK_QUEUE
NOERROR syscall.Errno = 0
E_UNEXPECTED Handle = 0x8000FFFF
E_NOTIMPL Handle = 0x80004001
@@ -3966,6 +3992,7 @@ const (
SEC_I_COMPLETE_NEEDED Handle = 0x00090313
SEC_I_COMPLETE_AND_CONTINUE Handle = 0x00090314
SEC_I_LOCAL_LOGON Handle = 0x00090315
+ SEC_I_GENERIC_EXTENSION_RECEIVED Handle = 0x00090316
SEC_E_BAD_PKGID Handle = 0x80090316
SEC_E_CONTEXT_EXPIRED Handle = 0x80090317
SEC_I_CONTEXT_EXPIRED Handle = 0x00090317
@@ -4033,6 +4060,8 @@ const (
SEC_E_APPLICATION_PROTOCOL_MISMATCH Handle = 0x80090367
SEC_I_ASYNC_CALL_PENDING Handle = 0x00090368
SEC_E_INVALID_UPN_NAME Handle = 0x80090369
+ SEC_E_EXT_BUFFER_TOO_SMALL Handle = 0x8009036A
+ SEC_E_INSUFFICIENT_BUFFERS Handle = 0x8009036B
SEC_E_NO_SPM = SEC_E_INTERNAL_ERROR
SEC_E_NOT_SUPPORTED = SEC_E_UNSUPPORTED_FUNCTION
CRYPT_E_MSG_ERROR Handle = 0x80091001
@@ -4637,6 +4666,8 @@ const (
ERROR_GRAPHICS_PRESENT_INVALID_WINDOW Handle = 0xC026200F
ERROR_GRAPHICS_PRESENT_BUFFER_NOT_BOUND Handle = 0xC0262010
ERROR_GRAPHICS_VAIL_STATE_CHANGED Handle = 0xC0262011
+ ERROR_GRAPHICS_INDIRECT_DISPLAY_ABANDON_SWAPCHAIN Handle = 0xC0262012
+ ERROR_GRAPHICS_INDIRECT_DISPLAY_DEVICE_STOPPED Handle = 0xC0262013
ERROR_GRAPHICS_NO_VIDEO_MEMORY Handle = 0xC0262100
ERROR_GRAPHICS_CANT_LOCK_MEMORY Handle = 0xC0262101
ERROR_GRAPHICS_ALLOCATION_BUSY Handle = 0xC0262102
@@ -5393,6 +5424,13 @@ const (
FVE_E_NOT_DE_VOLUME Handle = 0x803100D7
FVE_E_PROTECTION_CANNOT_BE_DISABLED Handle = 0x803100D8
FVE_E_OSV_KSR_NOT_ALLOWED Handle = 0x803100D9
+ FVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_OS_DRIVE Handle = 0x803100DA
+ FVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_FIXED_DRIVE Handle = 0x803100DB
+ FVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_REMOVABLE_DRIVE Handle = 0x803100DC
+ FVE_E_KEY_ROTATION_NOT_SUPPORTED Handle = 0x803100DD
+ FVE_E_EXECUTE_REQUEST_SENT_TOO_SOON Handle = 0x803100DE
+ FVE_E_KEY_ROTATION_NOT_ENABLED Handle = 0x803100DF
+ FVE_E_DEVICE_NOT_JOINED Handle = 0x803100E0
FWP_E_CALLOUT_NOT_FOUND Handle = 0x80320001
FWP_E_CONDITION_NOT_FOUND Handle = 0x80320002
FWP_E_FILTER_NOT_FOUND Handle = 0x80320003
@@ -5881,6 +5919,12 @@ const (
GCN_E_NETCOMPARTMENT_NOT_FOUND Handle = 0x803B0027
GCN_E_NETINTERFACE_NOT_FOUND Handle = 0x803B0028
GCN_E_DEFAULTNAMESPACE_EXISTS Handle = 0x803B0029
+ HCN_E_ICS_DISABLED Handle = 0x803B002A
+ HCN_E_ENDPOINT_NAMESPACE_ALREADY_EXISTS Handle = 0x803B002B
+ HCN_E_ENTITY_HAS_REFERENCES Handle = 0x803B002C
+ HCN_E_INVALID_INTERNAL_PORT Handle = 0x803B002D
+ HCN_E_NAMESPACE_ATTACH_FAILED Handle = 0x803B002E
+ HCN_E_ADDR_INVALID_OR_RESERVED Handle = 0x803B002F
SDIAG_E_CANCELLED syscall.Errno = 0x803C0100
SDIAG_E_SCRIPT syscall.Errno = 0x803C0101
SDIAG_E_POWERSHELL syscall.Errno = 0x803C0102
@@ -6846,8 +6890,2579 @@ const (
UTC_E_INSUFFICIENT_SPACE_TO_START_TRACE Handle = 0x87C51059
UTC_E_ESCALATION_CANCELLED_AT_SHUTDOWN Handle = 0x87C5105A
UTC_E_GETFILEINFOACTION_FILE_NOT_APPROVED Handle = 0x87C5105B
+ UTC_E_SETREGKEYACTION_TYPE_NOT_APPROVED Handle = 0x87C5105C
WINML_ERR_INVALID_DEVICE Handle = 0x88900001
WINML_ERR_INVALID_BINDING Handle = 0x88900002
WINML_ERR_VALUE_NOTFOUND Handle = 0x88900003
WINML_ERR_SIZE_MISMATCH Handle = 0x88900004
+ STATUS_WAIT_0 NTStatus = 0x00000000
+ STATUS_SUCCESS NTStatus = 0x00000000
+ STATUS_WAIT_1 NTStatus = 0x00000001
+ STATUS_WAIT_2 NTStatus = 0x00000002
+ STATUS_WAIT_3 NTStatus = 0x00000003
+ STATUS_WAIT_63 NTStatus = 0x0000003F
+ STATUS_ABANDONED NTStatus = 0x00000080
+ STATUS_ABANDONED_WAIT_0 NTStatus = 0x00000080
+ STATUS_ABANDONED_WAIT_63 NTStatus = 0x000000BF
+ STATUS_USER_APC NTStatus = 0x000000C0
+ STATUS_ALREADY_COMPLETE NTStatus = 0x000000FF
+ STATUS_KERNEL_APC NTStatus = 0x00000100
+ STATUS_ALERTED NTStatus = 0x00000101
+ STATUS_TIMEOUT NTStatus = 0x00000102
+ STATUS_PENDING NTStatus = 0x00000103
+ STATUS_REPARSE NTStatus = 0x00000104
+ STATUS_MORE_ENTRIES NTStatus = 0x00000105
+ STATUS_NOT_ALL_ASSIGNED NTStatus = 0x00000106
+ STATUS_SOME_NOT_MAPPED NTStatus = 0x00000107
+ STATUS_OPLOCK_BREAK_IN_PROGRESS NTStatus = 0x00000108
+ STATUS_VOLUME_MOUNTED NTStatus = 0x00000109
+ STATUS_RXACT_COMMITTED NTStatus = 0x0000010A
+ STATUS_NOTIFY_CLEANUP NTStatus = 0x0000010B
+ STATUS_NOTIFY_ENUM_DIR NTStatus = 0x0000010C
+ STATUS_NO_QUOTAS_FOR_ACCOUNT NTStatus = 0x0000010D
+ STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED NTStatus = 0x0000010E
+ STATUS_PAGE_FAULT_TRANSITION NTStatus = 0x00000110
+ STATUS_PAGE_FAULT_DEMAND_ZERO NTStatus = 0x00000111
+ STATUS_PAGE_FAULT_COPY_ON_WRITE NTStatus = 0x00000112
+ STATUS_PAGE_FAULT_GUARD_PAGE NTStatus = 0x00000113
+ STATUS_PAGE_FAULT_PAGING_FILE NTStatus = 0x00000114
+ STATUS_CACHE_PAGE_LOCKED NTStatus = 0x00000115
+ STATUS_CRASH_DUMP NTStatus = 0x00000116
+ STATUS_BUFFER_ALL_ZEROS NTStatus = 0x00000117
+ STATUS_REPARSE_OBJECT NTStatus = 0x00000118
+ STATUS_RESOURCE_REQUIREMENTS_CHANGED NTStatus = 0x00000119
+ STATUS_TRANSLATION_COMPLETE NTStatus = 0x00000120
+ STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY NTStatus = 0x00000121
+ STATUS_NOTHING_TO_TERMINATE NTStatus = 0x00000122
+ STATUS_PROCESS_NOT_IN_JOB NTStatus = 0x00000123
+ STATUS_PROCESS_IN_JOB NTStatus = 0x00000124
+ STATUS_VOLSNAP_HIBERNATE_READY NTStatus = 0x00000125
+ STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY NTStatus = 0x00000126
+ STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED NTStatus = 0x00000127
+ STATUS_INTERRUPT_STILL_CONNECTED NTStatus = 0x00000128
+ STATUS_PROCESS_CLONED NTStatus = 0x00000129
+ STATUS_FILE_LOCKED_WITH_ONLY_READERS NTStatus = 0x0000012A
+ STATUS_FILE_LOCKED_WITH_WRITERS NTStatus = 0x0000012B
+ STATUS_VALID_IMAGE_HASH NTStatus = 0x0000012C
+ STATUS_VALID_CATALOG_HASH NTStatus = 0x0000012D
+ STATUS_VALID_STRONG_CODE_HASH NTStatus = 0x0000012E
+ STATUS_GHOSTED NTStatus = 0x0000012F
+ STATUS_DATA_OVERWRITTEN NTStatus = 0x00000130
+ STATUS_RESOURCEMANAGER_READ_ONLY NTStatus = 0x00000202
+ STATUS_RING_PREVIOUSLY_EMPTY NTStatus = 0x00000210
+ STATUS_RING_PREVIOUSLY_FULL NTStatus = 0x00000211
+ STATUS_RING_PREVIOUSLY_ABOVE_QUOTA NTStatus = 0x00000212
+ STATUS_RING_NEWLY_EMPTY NTStatus = 0x00000213
+ STATUS_RING_SIGNAL_OPPOSITE_ENDPOINT NTStatus = 0x00000214
+ STATUS_OPLOCK_SWITCHED_TO_NEW_HANDLE NTStatus = 0x00000215
+ STATUS_OPLOCK_HANDLE_CLOSED NTStatus = 0x00000216
+ STATUS_WAIT_FOR_OPLOCK NTStatus = 0x00000367
+ STATUS_REPARSE_GLOBAL NTStatus = 0x00000368
+ STATUS_FLT_IO_COMPLETE NTStatus = 0x001C0001
+ STATUS_OBJECT_NAME_EXISTS NTStatus = 0x40000000
+ STATUS_THREAD_WAS_SUSPENDED NTStatus = 0x40000001
+ STATUS_WORKING_SET_LIMIT_RANGE NTStatus = 0x40000002
+ STATUS_IMAGE_NOT_AT_BASE NTStatus = 0x40000003
+ STATUS_RXACT_STATE_CREATED NTStatus = 0x40000004
+ STATUS_SEGMENT_NOTIFICATION NTStatus = 0x40000005
+ STATUS_LOCAL_USER_SESSION_KEY NTStatus = 0x40000006
+ STATUS_BAD_CURRENT_DIRECTORY NTStatus = 0x40000007
+ STATUS_SERIAL_MORE_WRITES NTStatus = 0x40000008
+ STATUS_REGISTRY_RECOVERED NTStatus = 0x40000009
+ STATUS_FT_READ_RECOVERY_FROM_BACKUP NTStatus = 0x4000000A
+ STATUS_FT_WRITE_RECOVERY NTStatus = 0x4000000B
+ STATUS_SERIAL_COUNTER_TIMEOUT NTStatus = 0x4000000C
+ STATUS_NULL_LM_PASSWORD NTStatus = 0x4000000D
+ STATUS_IMAGE_MACHINE_TYPE_MISMATCH NTStatus = 0x4000000E
+ STATUS_RECEIVE_PARTIAL NTStatus = 0x4000000F
+ STATUS_RECEIVE_EXPEDITED NTStatus = 0x40000010
+ STATUS_RECEIVE_PARTIAL_EXPEDITED NTStatus = 0x40000011
+ STATUS_EVENT_DONE NTStatus = 0x40000012
+ STATUS_EVENT_PENDING NTStatus = 0x40000013
+ STATUS_CHECKING_FILE_SYSTEM NTStatus = 0x40000014
+ STATUS_FATAL_APP_EXIT NTStatus = 0x40000015
+ STATUS_PREDEFINED_HANDLE NTStatus = 0x40000016
+ STATUS_WAS_UNLOCKED NTStatus = 0x40000017
+ STATUS_SERVICE_NOTIFICATION NTStatus = 0x40000018
+ STATUS_WAS_LOCKED NTStatus = 0x40000019
+ STATUS_LOG_HARD_ERROR NTStatus = 0x4000001A
+ STATUS_ALREADY_WIN32 NTStatus = 0x4000001B
+ STATUS_WX86_UNSIMULATE NTStatus = 0x4000001C
+ STATUS_WX86_CONTINUE NTStatus = 0x4000001D
+ STATUS_WX86_SINGLE_STEP NTStatus = 0x4000001E
+ STATUS_WX86_BREAKPOINT NTStatus = 0x4000001F
+ STATUS_WX86_EXCEPTION_CONTINUE NTStatus = 0x40000020
+ STATUS_WX86_EXCEPTION_LASTCHANCE NTStatus = 0x40000021
+ STATUS_WX86_EXCEPTION_CHAIN NTStatus = 0x40000022
+ STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE NTStatus = 0x40000023
+ STATUS_NO_YIELD_PERFORMED NTStatus = 0x40000024
+ STATUS_TIMER_RESUME_IGNORED NTStatus = 0x40000025
+ STATUS_ARBITRATION_UNHANDLED NTStatus = 0x40000026
+ STATUS_CARDBUS_NOT_SUPPORTED NTStatus = 0x40000027
+ STATUS_WX86_CREATEWX86TIB NTStatus = 0x40000028
+ STATUS_MP_PROCESSOR_MISMATCH NTStatus = 0x40000029
+ STATUS_HIBERNATED NTStatus = 0x4000002A
+ STATUS_RESUME_HIBERNATION NTStatus = 0x4000002B
+ STATUS_FIRMWARE_UPDATED NTStatus = 0x4000002C
+ STATUS_DRIVERS_LEAKING_LOCKED_PAGES NTStatus = 0x4000002D
+ STATUS_MESSAGE_RETRIEVED NTStatus = 0x4000002E
+ STATUS_SYSTEM_POWERSTATE_TRANSITION NTStatus = 0x4000002F
+ STATUS_ALPC_CHECK_COMPLETION_LIST NTStatus = 0x40000030
+ STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION NTStatus = 0x40000031
+ STATUS_ACCESS_AUDIT_BY_POLICY NTStatus = 0x40000032
+ STATUS_ABANDON_HIBERFILE NTStatus = 0x40000033
+ STATUS_BIZRULES_NOT_ENABLED NTStatus = 0x40000034
+ STATUS_FT_READ_FROM_COPY NTStatus = 0x40000035
+ STATUS_IMAGE_AT_DIFFERENT_BASE NTStatus = 0x40000036
+ STATUS_PATCH_DEFERRED NTStatus = 0x40000037
+ STATUS_HEURISTIC_DAMAGE_POSSIBLE NTStatus = 0x40190001
+ STATUS_GUARD_PAGE_VIOLATION NTStatus = 0x80000001
+ STATUS_DATATYPE_MISALIGNMENT NTStatus = 0x80000002
+ STATUS_BREAKPOINT NTStatus = 0x80000003
+ STATUS_SINGLE_STEP NTStatus = 0x80000004
+ STATUS_BUFFER_OVERFLOW NTStatus = 0x80000005
+ STATUS_NO_MORE_FILES NTStatus = 0x80000006
+ STATUS_WAKE_SYSTEM_DEBUGGER NTStatus = 0x80000007
+ STATUS_HANDLES_CLOSED NTStatus = 0x8000000A
+ STATUS_NO_INHERITANCE NTStatus = 0x8000000B
+ STATUS_GUID_SUBSTITUTION_MADE NTStatus = 0x8000000C
+ STATUS_PARTIAL_COPY NTStatus = 0x8000000D
+ STATUS_DEVICE_PAPER_EMPTY NTStatus = 0x8000000E
+ STATUS_DEVICE_POWERED_OFF NTStatus = 0x8000000F
+ STATUS_DEVICE_OFF_LINE NTStatus = 0x80000010
+ STATUS_DEVICE_BUSY NTStatus = 0x80000011
+ STATUS_NO_MORE_EAS NTStatus = 0x80000012
+ STATUS_INVALID_EA_NAME NTStatus = 0x80000013
+ STATUS_EA_LIST_INCONSISTENT NTStatus = 0x80000014
+ STATUS_INVALID_EA_FLAG NTStatus = 0x80000015
+ STATUS_VERIFY_REQUIRED NTStatus = 0x80000016
+ STATUS_EXTRANEOUS_INFORMATION NTStatus = 0x80000017
+ STATUS_RXACT_COMMIT_NECESSARY NTStatus = 0x80000018
+ STATUS_NO_MORE_ENTRIES NTStatus = 0x8000001A
+ STATUS_FILEMARK_DETECTED NTStatus = 0x8000001B
+ STATUS_MEDIA_CHANGED NTStatus = 0x8000001C
+ STATUS_BUS_RESET NTStatus = 0x8000001D
+ STATUS_END_OF_MEDIA NTStatus = 0x8000001E
+ STATUS_BEGINNING_OF_MEDIA NTStatus = 0x8000001F
+ STATUS_MEDIA_CHECK NTStatus = 0x80000020
+ STATUS_SETMARK_DETECTED NTStatus = 0x80000021
+ STATUS_NO_DATA_DETECTED NTStatus = 0x80000022
+ STATUS_REDIRECTOR_HAS_OPEN_HANDLES NTStatus = 0x80000023
+ STATUS_SERVER_HAS_OPEN_HANDLES NTStatus = 0x80000024
+ STATUS_ALREADY_DISCONNECTED NTStatus = 0x80000025
+ STATUS_LONGJUMP NTStatus = 0x80000026
+ STATUS_CLEANER_CARTRIDGE_INSTALLED NTStatus = 0x80000027
+ STATUS_PLUGPLAY_QUERY_VETOED NTStatus = 0x80000028
+ STATUS_UNWIND_CONSOLIDATE NTStatus = 0x80000029
+ STATUS_REGISTRY_HIVE_RECOVERED NTStatus = 0x8000002A
+ STATUS_DLL_MIGHT_BE_INSECURE NTStatus = 0x8000002B
+ STATUS_DLL_MIGHT_BE_INCOMPATIBLE NTStatus = 0x8000002C
+ STATUS_STOPPED_ON_SYMLINK NTStatus = 0x8000002D
+ STATUS_CANNOT_GRANT_REQUESTED_OPLOCK NTStatus = 0x8000002E
+ STATUS_NO_ACE_CONDITION NTStatus = 0x8000002F
+ STATUS_DEVICE_SUPPORT_IN_PROGRESS NTStatus = 0x80000030
+ STATUS_DEVICE_POWER_CYCLE_REQUIRED NTStatus = 0x80000031
+ STATUS_NO_WORK_DONE NTStatus = 0x80000032
+ STATUS_CLUSTER_NODE_ALREADY_UP NTStatus = 0x80130001
+ STATUS_CLUSTER_NODE_ALREADY_DOWN NTStatus = 0x80130002
+ STATUS_CLUSTER_NETWORK_ALREADY_ONLINE NTStatus = 0x80130003
+ STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE NTStatus = 0x80130004
+ STATUS_CLUSTER_NODE_ALREADY_MEMBER NTStatus = 0x80130005
+ STATUS_FLT_BUFFER_TOO_SMALL NTStatus = 0x801C0001
+ STATUS_FVE_PARTIAL_METADATA NTStatus = 0x80210001
+ STATUS_FVE_TRANSIENT_STATE NTStatus = 0x80210002
+ STATUS_CLOUD_FILE_PROPERTY_BLOB_CHECKSUM_MISMATCH NTStatus = 0x8000CF00
+ STATUS_UNSUCCESSFUL NTStatus = 0xC0000001
+ STATUS_NOT_IMPLEMENTED NTStatus = 0xC0000002
+ STATUS_INVALID_INFO_CLASS NTStatus = 0xC0000003
+ STATUS_INFO_LENGTH_MISMATCH NTStatus = 0xC0000004
+ STATUS_ACCESS_VIOLATION NTStatus = 0xC0000005
+ STATUS_IN_PAGE_ERROR NTStatus = 0xC0000006
+ STATUS_PAGEFILE_QUOTA NTStatus = 0xC0000007
+ STATUS_INVALID_HANDLE NTStatus = 0xC0000008
+ STATUS_BAD_INITIAL_STACK NTStatus = 0xC0000009
+ STATUS_BAD_INITIAL_PC NTStatus = 0xC000000A
+ STATUS_INVALID_CID NTStatus = 0xC000000B
+ STATUS_TIMER_NOT_CANCELED NTStatus = 0xC000000C
+ STATUS_INVALID_PARAMETER NTStatus = 0xC000000D
+ STATUS_NO_SUCH_DEVICE NTStatus = 0xC000000E
+ STATUS_NO_SUCH_FILE NTStatus = 0xC000000F
+ STATUS_INVALID_DEVICE_REQUEST NTStatus = 0xC0000010
+ STATUS_END_OF_FILE NTStatus = 0xC0000011
+ STATUS_WRONG_VOLUME NTStatus = 0xC0000012
+ STATUS_NO_MEDIA_IN_DEVICE NTStatus = 0xC0000013
+ STATUS_UNRECOGNIZED_MEDIA NTStatus = 0xC0000014
+ STATUS_NONEXISTENT_SECTOR NTStatus = 0xC0000015
+ STATUS_MORE_PROCESSING_REQUIRED NTStatus = 0xC0000016
+ STATUS_NO_MEMORY NTStatus = 0xC0000017
+ STATUS_CONFLICTING_ADDRESSES NTStatus = 0xC0000018
+ STATUS_NOT_MAPPED_VIEW NTStatus = 0xC0000019
+ STATUS_UNABLE_TO_FREE_VM NTStatus = 0xC000001A
+ STATUS_UNABLE_TO_DELETE_SECTION NTStatus = 0xC000001B
+ STATUS_INVALID_SYSTEM_SERVICE NTStatus = 0xC000001C
+ STATUS_ILLEGAL_INSTRUCTION NTStatus = 0xC000001D
+ STATUS_INVALID_LOCK_SEQUENCE NTStatus = 0xC000001E
+ STATUS_INVALID_VIEW_SIZE NTStatus = 0xC000001F
+ STATUS_INVALID_FILE_FOR_SECTION NTStatus = 0xC0000020
+ STATUS_ALREADY_COMMITTED NTStatus = 0xC0000021
+ STATUS_ACCESS_DENIED NTStatus = 0xC0000022
+ STATUS_BUFFER_TOO_SMALL NTStatus = 0xC0000023
+ STATUS_OBJECT_TYPE_MISMATCH NTStatus = 0xC0000024
+ STATUS_NONCONTINUABLE_EXCEPTION NTStatus = 0xC0000025
+ STATUS_INVALID_DISPOSITION NTStatus = 0xC0000026
+ STATUS_UNWIND NTStatus = 0xC0000027
+ STATUS_BAD_STACK NTStatus = 0xC0000028
+ STATUS_INVALID_UNWIND_TARGET NTStatus = 0xC0000029
+ STATUS_NOT_LOCKED NTStatus = 0xC000002A
+ STATUS_PARITY_ERROR NTStatus = 0xC000002B
+ STATUS_UNABLE_TO_DECOMMIT_VM NTStatus = 0xC000002C
+ STATUS_NOT_COMMITTED NTStatus = 0xC000002D
+ STATUS_INVALID_PORT_ATTRIBUTES NTStatus = 0xC000002E
+ STATUS_PORT_MESSAGE_TOO_LONG NTStatus = 0xC000002F
+ STATUS_INVALID_PARAMETER_MIX NTStatus = 0xC0000030
+ STATUS_INVALID_QUOTA_LOWER NTStatus = 0xC0000031
+ STATUS_DISK_CORRUPT_ERROR NTStatus = 0xC0000032
+ STATUS_OBJECT_NAME_INVALID NTStatus = 0xC0000033
+ STATUS_OBJECT_NAME_NOT_FOUND NTStatus = 0xC0000034
+ STATUS_OBJECT_NAME_COLLISION NTStatus = 0xC0000035
+ STATUS_PORT_DO_NOT_DISTURB NTStatus = 0xC0000036
+ STATUS_PORT_DISCONNECTED NTStatus = 0xC0000037
+ STATUS_DEVICE_ALREADY_ATTACHED NTStatus = 0xC0000038
+ STATUS_OBJECT_PATH_INVALID NTStatus = 0xC0000039
+ STATUS_OBJECT_PATH_NOT_FOUND NTStatus = 0xC000003A
+ STATUS_OBJECT_PATH_SYNTAX_BAD NTStatus = 0xC000003B
+ STATUS_DATA_OVERRUN NTStatus = 0xC000003C
+ STATUS_DATA_LATE_ERROR NTStatus = 0xC000003D
+ STATUS_DATA_ERROR NTStatus = 0xC000003E
+ STATUS_CRC_ERROR NTStatus = 0xC000003F
+ STATUS_SECTION_TOO_BIG NTStatus = 0xC0000040
+ STATUS_PORT_CONNECTION_REFUSED NTStatus = 0xC0000041
+ STATUS_INVALID_PORT_HANDLE NTStatus = 0xC0000042
+ STATUS_SHARING_VIOLATION NTStatus = 0xC0000043
+ STATUS_QUOTA_EXCEEDED NTStatus = 0xC0000044
+ STATUS_INVALID_PAGE_PROTECTION NTStatus = 0xC0000045
+ STATUS_MUTANT_NOT_OWNED NTStatus = 0xC0000046
+ STATUS_SEMAPHORE_LIMIT_EXCEEDED NTStatus = 0xC0000047
+ STATUS_PORT_ALREADY_SET NTStatus = 0xC0000048
+ STATUS_SECTION_NOT_IMAGE NTStatus = 0xC0000049
+ STATUS_SUSPEND_COUNT_EXCEEDED NTStatus = 0xC000004A
+ STATUS_THREAD_IS_TERMINATING NTStatus = 0xC000004B
+ STATUS_BAD_WORKING_SET_LIMIT NTStatus = 0xC000004C
+ STATUS_INCOMPATIBLE_FILE_MAP NTStatus = 0xC000004D
+ STATUS_SECTION_PROTECTION NTStatus = 0xC000004E
+ STATUS_EAS_NOT_SUPPORTED NTStatus = 0xC000004F
+ STATUS_EA_TOO_LARGE NTStatus = 0xC0000050
+ STATUS_NONEXISTENT_EA_ENTRY NTStatus = 0xC0000051
+ STATUS_NO_EAS_ON_FILE NTStatus = 0xC0000052
+ STATUS_EA_CORRUPT_ERROR NTStatus = 0xC0000053
+ STATUS_FILE_LOCK_CONFLICT NTStatus = 0xC0000054
+ STATUS_LOCK_NOT_GRANTED NTStatus = 0xC0000055
+ STATUS_DELETE_PENDING NTStatus = 0xC0000056
+ STATUS_CTL_FILE_NOT_SUPPORTED NTStatus = 0xC0000057
+ STATUS_UNKNOWN_REVISION NTStatus = 0xC0000058
+ STATUS_REVISION_MISMATCH NTStatus = 0xC0000059
+ STATUS_INVALID_OWNER NTStatus = 0xC000005A
+ STATUS_INVALID_PRIMARY_GROUP NTStatus = 0xC000005B
+ STATUS_NO_IMPERSONATION_TOKEN NTStatus = 0xC000005C
+ STATUS_CANT_DISABLE_MANDATORY NTStatus = 0xC000005D
+ STATUS_NO_LOGON_SERVERS NTStatus = 0xC000005E
+ STATUS_NO_SUCH_LOGON_SESSION NTStatus = 0xC000005F
+ STATUS_NO_SUCH_PRIVILEGE NTStatus = 0xC0000060
+ STATUS_PRIVILEGE_NOT_HELD NTStatus = 0xC0000061
+ STATUS_INVALID_ACCOUNT_NAME NTStatus = 0xC0000062
+ STATUS_USER_EXISTS NTStatus = 0xC0000063
+ STATUS_NO_SUCH_USER NTStatus = 0xC0000064
+ STATUS_GROUP_EXISTS NTStatus = 0xC0000065
+ STATUS_NO_SUCH_GROUP NTStatus = 0xC0000066
+ STATUS_MEMBER_IN_GROUP NTStatus = 0xC0000067
+ STATUS_MEMBER_NOT_IN_GROUP NTStatus = 0xC0000068
+ STATUS_LAST_ADMIN NTStatus = 0xC0000069
+ STATUS_WRONG_PASSWORD NTStatus = 0xC000006A
+ STATUS_ILL_FORMED_PASSWORD NTStatus = 0xC000006B
+ STATUS_PASSWORD_RESTRICTION NTStatus = 0xC000006C
+ STATUS_LOGON_FAILURE NTStatus = 0xC000006D
+ STATUS_ACCOUNT_RESTRICTION NTStatus = 0xC000006E
+ STATUS_INVALID_LOGON_HOURS NTStatus = 0xC000006F
+ STATUS_INVALID_WORKSTATION NTStatus = 0xC0000070
+ STATUS_PASSWORD_EXPIRED NTStatus = 0xC0000071
+ STATUS_ACCOUNT_DISABLED NTStatus = 0xC0000072
+ STATUS_NONE_MAPPED NTStatus = 0xC0000073
+ STATUS_TOO_MANY_LUIDS_REQUESTED NTStatus = 0xC0000074
+ STATUS_LUIDS_EXHAUSTED NTStatus = 0xC0000075
+ STATUS_INVALID_SUB_AUTHORITY NTStatus = 0xC0000076
+ STATUS_INVALID_ACL NTStatus = 0xC0000077
+ STATUS_INVALID_SID NTStatus = 0xC0000078
+ STATUS_INVALID_SECURITY_DESCR NTStatus = 0xC0000079
+ STATUS_PROCEDURE_NOT_FOUND NTStatus = 0xC000007A
+ STATUS_INVALID_IMAGE_FORMAT NTStatus = 0xC000007B
+ STATUS_NO_TOKEN NTStatus = 0xC000007C
+ STATUS_BAD_INHERITANCE_ACL NTStatus = 0xC000007D
+ STATUS_RANGE_NOT_LOCKED NTStatus = 0xC000007E
+ STATUS_DISK_FULL NTStatus = 0xC000007F
+ STATUS_SERVER_DISABLED NTStatus = 0xC0000080
+ STATUS_SERVER_NOT_DISABLED NTStatus = 0xC0000081
+ STATUS_TOO_MANY_GUIDS_REQUESTED NTStatus = 0xC0000082
+ STATUS_GUIDS_EXHAUSTED NTStatus = 0xC0000083
+ STATUS_INVALID_ID_AUTHORITY NTStatus = 0xC0000084
+ STATUS_AGENTS_EXHAUSTED NTStatus = 0xC0000085
+ STATUS_INVALID_VOLUME_LABEL NTStatus = 0xC0000086
+ STATUS_SECTION_NOT_EXTENDED NTStatus = 0xC0000087
+ STATUS_NOT_MAPPED_DATA NTStatus = 0xC0000088
+ STATUS_RESOURCE_DATA_NOT_FOUND NTStatus = 0xC0000089
+ STATUS_RESOURCE_TYPE_NOT_FOUND NTStatus = 0xC000008A
+ STATUS_RESOURCE_NAME_NOT_FOUND NTStatus = 0xC000008B
+ STATUS_ARRAY_BOUNDS_EXCEEDED NTStatus = 0xC000008C
+ STATUS_FLOAT_DENORMAL_OPERAND NTStatus = 0xC000008D
+ STATUS_FLOAT_DIVIDE_BY_ZERO NTStatus = 0xC000008E
+ STATUS_FLOAT_INEXACT_RESULT NTStatus = 0xC000008F
+ STATUS_FLOAT_INVALID_OPERATION NTStatus = 0xC0000090
+ STATUS_FLOAT_OVERFLOW NTStatus = 0xC0000091
+ STATUS_FLOAT_STACK_CHECK NTStatus = 0xC0000092
+ STATUS_FLOAT_UNDERFLOW NTStatus = 0xC0000093
+ STATUS_INTEGER_DIVIDE_BY_ZERO NTStatus = 0xC0000094
+ STATUS_INTEGER_OVERFLOW NTStatus = 0xC0000095
+ STATUS_PRIVILEGED_INSTRUCTION NTStatus = 0xC0000096
+ STATUS_TOO_MANY_PAGING_FILES NTStatus = 0xC0000097
+ STATUS_FILE_INVALID NTStatus = 0xC0000098
+ STATUS_ALLOTTED_SPACE_EXCEEDED NTStatus = 0xC0000099
+ STATUS_INSUFFICIENT_RESOURCES NTStatus = 0xC000009A
+ STATUS_DFS_EXIT_PATH_FOUND NTStatus = 0xC000009B
+ STATUS_DEVICE_DATA_ERROR NTStatus = 0xC000009C
+ STATUS_DEVICE_NOT_CONNECTED NTStatus = 0xC000009D
+ STATUS_DEVICE_POWER_FAILURE NTStatus = 0xC000009E
+ STATUS_FREE_VM_NOT_AT_BASE NTStatus = 0xC000009F
+ STATUS_MEMORY_NOT_ALLOCATED NTStatus = 0xC00000A0
+ STATUS_WORKING_SET_QUOTA NTStatus = 0xC00000A1
+ STATUS_MEDIA_WRITE_PROTECTED NTStatus = 0xC00000A2
+ STATUS_DEVICE_NOT_READY NTStatus = 0xC00000A3
+ STATUS_INVALID_GROUP_ATTRIBUTES NTStatus = 0xC00000A4
+ STATUS_BAD_IMPERSONATION_LEVEL NTStatus = 0xC00000A5
+ STATUS_CANT_OPEN_ANONYMOUS NTStatus = 0xC00000A6
+ STATUS_BAD_VALIDATION_CLASS NTStatus = 0xC00000A7
+ STATUS_BAD_TOKEN_TYPE NTStatus = 0xC00000A8
+ STATUS_BAD_MASTER_BOOT_RECORD NTStatus = 0xC00000A9
+ STATUS_INSTRUCTION_MISALIGNMENT NTStatus = 0xC00000AA
+ STATUS_INSTANCE_NOT_AVAILABLE NTStatus = 0xC00000AB
+ STATUS_PIPE_NOT_AVAILABLE NTStatus = 0xC00000AC
+ STATUS_INVALID_PIPE_STATE NTStatus = 0xC00000AD
+ STATUS_PIPE_BUSY NTStatus = 0xC00000AE
+ STATUS_ILLEGAL_FUNCTION NTStatus = 0xC00000AF
+ STATUS_PIPE_DISCONNECTED NTStatus = 0xC00000B0
+ STATUS_PIPE_CLOSING NTStatus = 0xC00000B1
+ STATUS_PIPE_CONNECTED NTStatus = 0xC00000B2
+ STATUS_PIPE_LISTENING NTStatus = 0xC00000B3
+ STATUS_INVALID_READ_MODE NTStatus = 0xC00000B4
+ STATUS_IO_TIMEOUT NTStatus = 0xC00000B5
+ STATUS_FILE_FORCED_CLOSED NTStatus = 0xC00000B6
+ STATUS_PROFILING_NOT_STARTED NTStatus = 0xC00000B7
+ STATUS_PROFILING_NOT_STOPPED NTStatus = 0xC00000B8
+ STATUS_COULD_NOT_INTERPRET NTStatus = 0xC00000B9
+ STATUS_FILE_IS_A_DIRECTORY NTStatus = 0xC00000BA
+ STATUS_NOT_SUPPORTED NTStatus = 0xC00000BB
+ STATUS_REMOTE_NOT_LISTENING NTStatus = 0xC00000BC
+ STATUS_DUPLICATE_NAME NTStatus = 0xC00000BD
+ STATUS_BAD_NETWORK_PATH NTStatus = 0xC00000BE
+ STATUS_NETWORK_BUSY NTStatus = 0xC00000BF
+ STATUS_DEVICE_DOES_NOT_EXIST NTStatus = 0xC00000C0
+ STATUS_TOO_MANY_COMMANDS NTStatus = 0xC00000C1
+ STATUS_ADAPTER_HARDWARE_ERROR NTStatus = 0xC00000C2
+ STATUS_INVALID_NETWORK_RESPONSE NTStatus = 0xC00000C3
+ STATUS_UNEXPECTED_NETWORK_ERROR NTStatus = 0xC00000C4
+ STATUS_BAD_REMOTE_ADAPTER NTStatus = 0xC00000C5
+ STATUS_PRINT_QUEUE_FULL NTStatus = 0xC00000C6
+ STATUS_NO_SPOOL_SPACE NTStatus = 0xC00000C7
+ STATUS_PRINT_CANCELLED NTStatus = 0xC00000C8
+ STATUS_NETWORK_NAME_DELETED NTStatus = 0xC00000C9
+ STATUS_NETWORK_ACCESS_DENIED NTStatus = 0xC00000CA
+ STATUS_BAD_DEVICE_TYPE NTStatus = 0xC00000CB
+ STATUS_BAD_NETWORK_NAME NTStatus = 0xC00000CC
+ STATUS_TOO_MANY_NAMES NTStatus = 0xC00000CD
+ STATUS_TOO_MANY_SESSIONS NTStatus = 0xC00000CE
+ STATUS_SHARING_PAUSED NTStatus = 0xC00000CF
+ STATUS_REQUEST_NOT_ACCEPTED NTStatus = 0xC00000D0
+ STATUS_REDIRECTOR_PAUSED NTStatus = 0xC00000D1
+ STATUS_NET_WRITE_FAULT NTStatus = 0xC00000D2
+ STATUS_PROFILING_AT_LIMIT NTStatus = 0xC00000D3
+ STATUS_NOT_SAME_DEVICE NTStatus = 0xC00000D4
+ STATUS_FILE_RENAMED NTStatus = 0xC00000D5
+ STATUS_VIRTUAL_CIRCUIT_CLOSED NTStatus = 0xC00000D6
+ STATUS_NO_SECURITY_ON_OBJECT NTStatus = 0xC00000D7
+ STATUS_CANT_WAIT NTStatus = 0xC00000D8
+ STATUS_PIPE_EMPTY NTStatus = 0xC00000D9
+ STATUS_CANT_ACCESS_DOMAIN_INFO NTStatus = 0xC00000DA
+ STATUS_CANT_TERMINATE_SELF NTStatus = 0xC00000DB
+ STATUS_INVALID_SERVER_STATE NTStatus = 0xC00000DC
+ STATUS_INVALID_DOMAIN_STATE NTStatus = 0xC00000DD
+ STATUS_INVALID_DOMAIN_ROLE NTStatus = 0xC00000DE
+ STATUS_NO_SUCH_DOMAIN NTStatus = 0xC00000DF
+ STATUS_DOMAIN_EXISTS NTStatus = 0xC00000E0
+ STATUS_DOMAIN_LIMIT_EXCEEDED NTStatus = 0xC00000E1
+ STATUS_OPLOCK_NOT_GRANTED NTStatus = 0xC00000E2
+ STATUS_INVALID_OPLOCK_PROTOCOL NTStatus = 0xC00000E3
+ STATUS_INTERNAL_DB_CORRUPTION NTStatus = 0xC00000E4
+ STATUS_INTERNAL_ERROR NTStatus = 0xC00000E5
+ STATUS_GENERIC_NOT_MAPPED NTStatus = 0xC00000E6
+ STATUS_BAD_DESCRIPTOR_FORMAT NTStatus = 0xC00000E7
+ STATUS_INVALID_USER_BUFFER NTStatus = 0xC00000E8
+ STATUS_UNEXPECTED_IO_ERROR NTStatus = 0xC00000E9
+ STATUS_UNEXPECTED_MM_CREATE_ERR NTStatus = 0xC00000EA
+ STATUS_UNEXPECTED_MM_MAP_ERROR NTStatus = 0xC00000EB
+ STATUS_UNEXPECTED_MM_EXTEND_ERR NTStatus = 0xC00000EC
+ STATUS_NOT_LOGON_PROCESS NTStatus = 0xC00000ED
+ STATUS_LOGON_SESSION_EXISTS NTStatus = 0xC00000EE
+ STATUS_INVALID_PARAMETER_1 NTStatus = 0xC00000EF
+ STATUS_INVALID_PARAMETER_2 NTStatus = 0xC00000F0
+ STATUS_INVALID_PARAMETER_3 NTStatus = 0xC00000F1
+ STATUS_INVALID_PARAMETER_4 NTStatus = 0xC00000F2
+ STATUS_INVALID_PARAMETER_5 NTStatus = 0xC00000F3
+ STATUS_INVALID_PARAMETER_6 NTStatus = 0xC00000F4
+ STATUS_INVALID_PARAMETER_7 NTStatus = 0xC00000F5
+ STATUS_INVALID_PARAMETER_8 NTStatus = 0xC00000F6
+ STATUS_INVALID_PARAMETER_9 NTStatus = 0xC00000F7
+ STATUS_INVALID_PARAMETER_10 NTStatus = 0xC00000F8
+ STATUS_INVALID_PARAMETER_11 NTStatus = 0xC00000F9
+ STATUS_INVALID_PARAMETER_12 NTStatus = 0xC00000FA
+ STATUS_REDIRECTOR_NOT_STARTED NTStatus = 0xC00000FB
+ STATUS_REDIRECTOR_STARTED NTStatus = 0xC00000FC
+ STATUS_STACK_OVERFLOW NTStatus = 0xC00000FD
+ STATUS_NO_SUCH_PACKAGE NTStatus = 0xC00000FE
+ STATUS_BAD_FUNCTION_TABLE NTStatus = 0xC00000FF
+ STATUS_VARIABLE_NOT_FOUND NTStatus = 0xC0000100
+ STATUS_DIRECTORY_NOT_EMPTY NTStatus = 0xC0000101
+ STATUS_FILE_CORRUPT_ERROR NTStatus = 0xC0000102
+ STATUS_NOT_A_DIRECTORY NTStatus = 0xC0000103
+ STATUS_BAD_LOGON_SESSION_STATE NTStatus = 0xC0000104
+ STATUS_LOGON_SESSION_COLLISION NTStatus = 0xC0000105
+ STATUS_NAME_TOO_LONG NTStatus = 0xC0000106
+ STATUS_FILES_OPEN NTStatus = 0xC0000107
+ STATUS_CONNECTION_IN_USE NTStatus = 0xC0000108
+ STATUS_MESSAGE_NOT_FOUND NTStatus = 0xC0000109
+ STATUS_PROCESS_IS_TERMINATING NTStatus = 0xC000010A
+ STATUS_INVALID_LOGON_TYPE NTStatus = 0xC000010B
+ STATUS_NO_GUID_TRANSLATION NTStatus = 0xC000010C
+ STATUS_CANNOT_IMPERSONATE NTStatus = 0xC000010D
+ STATUS_IMAGE_ALREADY_LOADED NTStatus = 0xC000010E
+ STATUS_ABIOS_NOT_PRESENT NTStatus = 0xC000010F
+ STATUS_ABIOS_LID_NOT_EXIST NTStatus = 0xC0000110
+ STATUS_ABIOS_LID_ALREADY_OWNED NTStatus = 0xC0000111
+ STATUS_ABIOS_NOT_LID_OWNER NTStatus = 0xC0000112
+ STATUS_ABIOS_INVALID_COMMAND NTStatus = 0xC0000113
+ STATUS_ABIOS_INVALID_LID NTStatus = 0xC0000114
+ STATUS_ABIOS_SELECTOR_NOT_AVAILABLE NTStatus = 0xC0000115
+ STATUS_ABIOS_INVALID_SELECTOR NTStatus = 0xC0000116
+ STATUS_NO_LDT NTStatus = 0xC0000117
+ STATUS_INVALID_LDT_SIZE NTStatus = 0xC0000118
+ STATUS_INVALID_LDT_OFFSET NTStatus = 0xC0000119
+ STATUS_INVALID_LDT_DESCRIPTOR NTStatus = 0xC000011A
+ STATUS_INVALID_IMAGE_NE_FORMAT NTStatus = 0xC000011B
+ STATUS_RXACT_INVALID_STATE NTStatus = 0xC000011C
+ STATUS_RXACT_COMMIT_FAILURE NTStatus = 0xC000011D
+ STATUS_MAPPED_FILE_SIZE_ZERO NTStatus = 0xC000011E
+ STATUS_TOO_MANY_OPENED_FILES NTStatus = 0xC000011F
+ STATUS_CANCELLED NTStatus = 0xC0000120
+ STATUS_CANNOT_DELETE NTStatus = 0xC0000121
+ STATUS_INVALID_COMPUTER_NAME NTStatus = 0xC0000122
+ STATUS_FILE_DELETED NTStatus = 0xC0000123
+ STATUS_SPECIAL_ACCOUNT NTStatus = 0xC0000124
+ STATUS_SPECIAL_GROUP NTStatus = 0xC0000125
+ STATUS_SPECIAL_USER NTStatus = 0xC0000126
+ STATUS_MEMBERS_PRIMARY_GROUP NTStatus = 0xC0000127
+ STATUS_FILE_CLOSED NTStatus = 0xC0000128
+ STATUS_TOO_MANY_THREADS NTStatus = 0xC0000129
+ STATUS_THREAD_NOT_IN_PROCESS NTStatus = 0xC000012A
+ STATUS_TOKEN_ALREADY_IN_USE NTStatus = 0xC000012B
+ STATUS_PAGEFILE_QUOTA_EXCEEDED NTStatus = 0xC000012C
+ STATUS_COMMITMENT_LIMIT NTStatus = 0xC000012D
+ STATUS_INVALID_IMAGE_LE_FORMAT NTStatus = 0xC000012E
+ STATUS_INVALID_IMAGE_NOT_MZ NTStatus = 0xC000012F
+ STATUS_INVALID_IMAGE_PROTECT NTStatus = 0xC0000130
+ STATUS_INVALID_IMAGE_WIN_16 NTStatus = 0xC0000131
+ STATUS_LOGON_SERVER_CONFLICT NTStatus = 0xC0000132
+ STATUS_TIME_DIFFERENCE_AT_DC NTStatus = 0xC0000133
+ STATUS_SYNCHRONIZATION_REQUIRED NTStatus = 0xC0000134
+ STATUS_DLL_NOT_FOUND NTStatus = 0xC0000135
+ STATUS_OPEN_FAILED NTStatus = 0xC0000136
+ STATUS_IO_PRIVILEGE_FAILED NTStatus = 0xC0000137
+ STATUS_ORDINAL_NOT_FOUND NTStatus = 0xC0000138
+ STATUS_ENTRYPOINT_NOT_FOUND NTStatus = 0xC0000139
+ STATUS_CONTROL_C_EXIT NTStatus = 0xC000013A
+ STATUS_LOCAL_DISCONNECT NTStatus = 0xC000013B
+ STATUS_REMOTE_DISCONNECT NTStatus = 0xC000013C
+ STATUS_REMOTE_RESOURCES NTStatus = 0xC000013D
+ STATUS_LINK_FAILED NTStatus = 0xC000013E
+ STATUS_LINK_TIMEOUT NTStatus = 0xC000013F
+ STATUS_INVALID_CONNECTION NTStatus = 0xC0000140
+ STATUS_INVALID_ADDRESS NTStatus = 0xC0000141
+ STATUS_DLL_INIT_FAILED NTStatus = 0xC0000142
+ STATUS_MISSING_SYSTEMFILE NTStatus = 0xC0000143
+ STATUS_UNHANDLED_EXCEPTION NTStatus = 0xC0000144
+ STATUS_APP_INIT_FAILURE NTStatus = 0xC0000145
+ STATUS_PAGEFILE_CREATE_FAILED NTStatus = 0xC0000146
+ STATUS_NO_PAGEFILE NTStatus = 0xC0000147
+ STATUS_INVALID_LEVEL NTStatus = 0xC0000148
+ STATUS_WRONG_PASSWORD_CORE NTStatus = 0xC0000149
+ STATUS_ILLEGAL_FLOAT_CONTEXT NTStatus = 0xC000014A
+ STATUS_PIPE_BROKEN NTStatus = 0xC000014B
+ STATUS_REGISTRY_CORRUPT NTStatus = 0xC000014C
+ STATUS_REGISTRY_IO_FAILED NTStatus = 0xC000014D
+ STATUS_NO_EVENT_PAIR NTStatus = 0xC000014E
+ STATUS_UNRECOGNIZED_VOLUME NTStatus = 0xC000014F
+ STATUS_SERIAL_NO_DEVICE_INITED NTStatus = 0xC0000150
+ STATUS_NO_SUCH_ALIAS NTStatus = 0xC0000151
+ STATUS_MEMBER_NOT_IN_ALIAS NTStatus = 0xC0000152
+ STATUS_MEMBER_IN_ALIAS NTStatus = 0xC0000153
+ STATUS_ALIAS_EXISTS NTStatus = 0xC0000154
+ STATUS_LOGON_NOT_GRANTED NTStatus = 0xC0000155
+ STATUS_TOO_MANY_SECRETS NTStatus = 0xC0000156
+ STATUS_SECRET_TOO_LONG NTStatus = 0xC0000157
+ STATUS_INTERNAL_DB_ERROR NTStatus = 0xC0000158
+ STATUS_FULLSCREEN_MODE NTStatus = 0xC0000159
+ STATUS_TOO_MANY_CONTEXT_IDS NTStatus = 0xC000015A
+ STATUS_LOGON_TYPE_NOT_GRANTED NTStatus = 0xC000015B
+ STATUS_NOT_REGISTRY_FILE NTStatus = 0xC000015C
+ STATUS_NT_CROSS_ENCRYPTION_REQUIRED NTStatus = 0xC000015D
+ STATUS_DOMAIN_CTRLR_CONFIG_ERROR NTStatus = 0xC000015E
+ STATUS_FT_MISSING_MEMBER NTStatus = 0xC000015F
+ STATUS_ILL_FORMED_SERVICE_ENTRY NTStatus = 0xC0000160
+ STATUS_ILLEGAL_CHARACTER NTStatus = 0xC0000161
+ STATUS_UNMAPPABLE_CHARACTER NTStatus = 0xC0000162
+ STATUS_UNDEFINED_CHARACTER NTStatus = 0xC0000163
+ STATUS_FLOPPY_VOLUME NTStatus = 0xC0000164
+ STATUS_FLOPPY_ID_MARK_NOT_FOUND NTStatus = 0xC0000165
+ STATUS_FLOPPY_WRONG_CYLINDER NTStatus = 0xC0000166
+ STATUS_FLOPPY_UNKNOWN_ERROR NTStatus = 0xC0000167
+ STATUS_FLOPPY_BAD_REGISTERS NTStatus = 0xC0000168
+ STATUS_DISK_RECALIBRATE_FAILED NTStatus = 0xC0000169
+ STATUS_DISK_OPERATION_FAILED NTStatus = 0xC000016A
+ STATUS_DISK_RESET_FAILED NTStatus = 0xC000016B
+ STATUS_SHARED_IRQ_BUSY NTStatus = 0xC000016C
+ STATUS_FT_ORPHANING NTStatus = 0xC000016D
+ STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT NTStatus = 0xC000016E
+ STATUS_PARTITION_FAILURE NTStatus = 0xC0000172
+ STATUS_INVALID_BLOCK_LENGTH NTStatus = 0xC0000173
+ STATUS_DEVICE_NOT_PARTITIONED NTStatus = 0xC0000174
+ STATUS_UNABLE_TO_LOCK_MEDIA NTStatus = 0xC0000175
+ STATUS_UNABLE_TO_UNLOAD_MEDIA NTStatus = 0xC0000176
+ STATUS_EOM_OVERFLOW NTStatus = 0xC0000177
+ STATUS_NO_MEDIA NTStatus = 0xC0000178
+ STATUS_NO_SUCH_MEMBER NTStatus = 0xC000017A
+ STATUS_INVALID_MEMBER NTStatus = 0xC000017B
+ STATUS_KEY_DELETED NTStatus = 0xC000017C
+ STATUS_NO_LOG_SPACE NTStatus = 0xC000017D
+ STATUS_TOO_MANY_SIDS NTStatus = 0xC000017E
+ STATUS_LM_CROSS_ENCRYPTION_REQUIRED NTStatus = 0xC000017F
+ STATUS_KEY_HAS_CHILDREN NTStatus = 0xC0000180
+ STATUS_CHILD_MUST_BE_VOLATILE NTStatus = 0xC0000181
+ STATUS_DEVICE_CONFIGURATION_ERROR NTStatus = 0xC0000182
+ STATUS_DRIVER_INTERNAL_ERROR NTStatus = 0xC0000183
+ STATUS_INVALID_DEVICE_STATE NTStatus = 0xC0000184
+ STATUS_IO_DEVICE_ERROR NTStatus = 0xC0000185
+ STATUS_DEVICE_PROTOCOL_ERROR NTStatus = 0xC0000186
+ STATUS_BACKUP_CONTROLLER NTStatus = 0xC0000187
+ STATUS_LOG_FILE_FULL NTStatus = 0xC0000188
+ STATUS_TOO_LATE NTStatus = 0xC0000189
+ STATUS_NO_TRUST_LSA_SECRET NTStatus = 0xC000018A
+ STATUS_NO_TRUST_SAM_ACCOUNT NTStatus = 0xC000018B
+ STATUS_TRUSTED_DOMAIN_FAILURE NTStatus = 0xC000018C
+ STATUS_TRUSTED_RELATIONSHIP_FAILURE NTStatus = 0xC000018D
+ STATUS_EVENTLOG_FILE_CORRUPT NTStatus = 0xC000018E
+ STATUS_EVENTLOG_CANT_START NTStatus = 0xC000018F
+ STATUS_TRUST_FAILURE NTStatus = 0xC0000190
+ STATUS_MUTANT_LIMIT_EXCEEDED NTStatus = 0xC0000191
+ STATUS_NETLOGON_NOT_STARTED NTStatus = 0xC0000192
+ STATUS_ACCOUNT_EXPIRED NTStatus = 0xC0000193
+ STATUS_POSSIBLE_DEADLOCK NTStatus = 0xC0000194
+ STATUS_NETWORK_CREDENTIAL_CONFLICT NTStatus = 0xC0000195
+ STATUS_REMOTE_SESSION_LIMIT NTStatus = 0xC0000196
+ STATUS_EVENTLOG_FILE_CHANGED NTStatus = 0xC0000197
+ STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT NTStatus = 0xC0000198
+ STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT NTStatus = 0xC0000199
+ STATUS_NOLOGON_SERVER_TRUST_ACCOUNT NTStatus = 0xC000019A
+ STATUS_DOMAIN_TRUST_INCONSISTENT NTStatus = 0xC000019B
+ STATUS_FS_DRIVER_REQUIRED NTStatus = 0xC000019C
+ STATUS_IMAGE_ALREADY_LOADED_AS_DLL NTStatus = 0xC000019D
+ STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING NTStatus = 0xC000019E
+ STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME NTStatus = 0xC000019F
+ STATUS_SECURITY_STREAM_IS_INCONSISTENT NTStatus = 0xC00001A0
+ STATUS_INVALID_LOCK_RANGE NTStatus = 0xC00001A1
+ STATUS_INVALID_ACE_CONDITION NTStatus = 0xC00001A2
+ STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT NTStatus = 0xC00001A3
+ STATUS_NOTIFICATION_GUID_ALREADY_DEFINED NTStatus = 0xC00001A4
+ STATUS_INVALID_EXCEPTION_HANDLER NTStatus = 0xC00001A5
+ STATUS_DUPLICATE_PRIVILEGES NTStatus = 0xC00001A6
+ STATUS_NOT_ALLOWED_ON_SYSTEM_FILE NTStatus = 0xC00001A7
+ STATUS_REPAIR_NEEDED NTStatus = 0xC00001A8
+ STATUS_QUOTA_NOT_ENABLED NTStatus = 0xC00001A9
+ STATUS_NO_APPLICATION_PACKAGE NTStatus = 0xC00001AA
+ STATUS_FILE_METADATA_OPTIMIZATION_IN_PROGRESS NTStatus = 0xC00001AB
+ STATUS_NOT_SAME_OBJECT NTStatus = 0xC00001AC
+ STATUS_FATAL_MEMORY_EXHAUSTION NTStatus = 0xC00001AD
+ STATUS_ERROR_PROCESS_NOT_IN_JOB NTStatus = 0xC00001AE
+ STATUS_CPU_SET_INVALID NTStatus = 0xC00001AF
+ STATUS_IO_DEVICE_INVALID_DATA NTStatus = 0xC00001B0
+ STATUS_IO_UNALIGNED_WRITE NTStatus = 0xC00001B1
+ STATUS_NETWORK_OPEN_RESTRICTION NTStatus = 0xC0000201
+ STATUS_NO_USER_SESSION_KEY NTStatus = 0xC0000202
+ STATUS_USER_SESSION_DELETED NTStatus = 0xC0000203
+ STATUS_RESOURCE_LANG_NOT_FOUND NTStatus = 0xC0000204
+ STATUS_INSUFF_SERVER_RESOURCES NTStatus = 0xC0000205
+ STATUS_INVALID_BUFFER_SIZE NTStatus = 0xC0000206
+ STATUS_INVALID_ADDRESS_COMPONENT NTStatus = 0xC0000207
+ STATUS_INVALID_ADDRESS_WILDCARD NTStatus = 0xC0000208
+ STATUS_TOO_MANY_ADDRESSES NTStatus = 0xC0000209
+ STATUS_ADDRESS_ALREADY_EXISTS NTStatus = 0xC000020A
+ STATUS_ADDRESS_CLOSED NTStatus = 0xC000020B
+ STATUS_CONNECTION_DISCONNECTED NTStatus = 0xC000020C
+ STATUS_CONNECTION_RESET NTStatus = 0xC000020D
+ STATUS_TOO_MANY_NODES NTStatus = 0xC000020E
+ STATUS_TRANSACTION_ABORTED NTStatus = 0xC000020F
+ STATUS_TRANSACTION_TIMED_OUT NTStatus = 0xC0000210
+ STATUS_TRANSACTION_NO_RELEASE NTStatus = 0xC0000211
+ STATUS_TRANSACTION_NO_MATCH NTStatus = 0xC0000212
+ STATUS_TRANSACTION_RESPONDED NTStatus = 0xC0000213
+ STATUS_TRANSACTION_INVALID_ID NTStatus = 0xC0000214
+ STATUS_TRANSACTION_INVALID_TYPE NTStatus = 0xC0000215
+ STATUS_NOT_SERVER_SESSION NTStatus = 0xC0000216
+ STATUS_NOT_CLIENT_SESSION NTStatus = 0xC0000217
+ STATUS_CANNOT_LOAD_REGISTRY_FILE NTStatus = 0xC0000218
+ STATUS_DEBUG_ATTACH_FAILED NTStatus = 0xC0000219
+ STATUS_SYSTEM_PROCESS_TERMINATED NTStatus = 0xC000021A
+ STATUS_DATA_NOT_ACCEPTED NTStatus = 0xC000021B
+ STATUS_NO_BROWSER_SERVERS_FOUND NTStatus = 0xC000021C
+ STATUS_VDM_HARD_ERROR NTStatus = 0xC000021D
+ STATUS_DRIVER_CANCEL_TIMEOUT NTStatus = 0xC000021E
+ STATUS_REPLY_MESSAGE_MISMATCH NTStatus = 0xC000021F
+ STATUS_MAPPED_ALIGNMENT NTStatus = 0xC0000220
+ STATUS_IMAGE_CHECKSUM_MISMATCH NTStatus = 0xC0000221
+ STATUS_LOST_WRITEBEHIND_DATA NTStatus = 0xC0000222
+ STATUS_CLIENT_SERVER_PARAMETERS_INVALID NTStatus = 0xC0000223
+ STATUS_PASSWORD_MUST_CHANGE NTStatus = 0xC0000224
+ STATUS_NOT_FOUND NTStatus = 0xC0000225
+ STATUS_NOT_TINY_STREAM NTStatus = 0xC0000226
+ STATUS_RECOVERY_FAILURE NTStatus = 0xC0000227
+ STATUS_STACK_OVERFLOW_READ NTStatus = 0xC0000228
+ STATUS_FAIL_CHECK NTStatus = 0xC0000229
+ STATUS_DUPLICATE_OBJECTID NTStatus = 0xC000022A
+ STATUS_OBJECTID_EXISTS NTStatus = 0xC000022B
+ STATUS_CONVERT_TO_LARGE NTStatus = 0xC000022C
+ STATUS_RETRY NTStatus = 0xC000022D
+ STATUS_FOUND_OUT_OF_SCOPE NTStatus = 0xC000022E
+ STATUS_ALLOCATE_BUCKET NTStatus = 0xC000022F
+ STATUS_PROPSET_NOT_FOUND NTStatus = 0xC0000230
+ STATUS_MARSHALL_OVERFLOW NTStatus = 0xC0000231
+ STATUS_INVALID_VARIANT NTStatus = 0xC0000232
+ STATUS_DOMAIN_CONTROLLER_NOT_FOUND NTStatus = 0xC0000233
+ STATUS_ACCOUNT_LOCKED_OUT NTStatus = 0xC0000234
+ STATUS_HANDLE_NOT_CLOSABLE NTStatus = 0xC0000235
+ STATUS_CONNECTION_REFUSED NTStatus = 0xC0000236
+ STATUS_GRACEFUL_DISCONNECT NTStatus = 0xC0000237
+ STATUS_ADDRESS_ALREADY_ASSOCIATED NTStatus = 0xC0000238
+ STATUS_ADDRESS_NOT_ASSOCIATED NTStatus = 0xC0000239
+ STATUS_CONNECTION_INVALID NTStatus = 0xC000023A
+ STATUS_CONNECTION_ACTIVE NTStatus = 0xC000023B
+ STATUS_NETWORK_UNREACHABLE NTStatus = 0xC000023C
+ STATUS_HOST_UNREACHABLE NTStatus = 0xC000023D
+ STATUS_PROTOCOL_UNREACHABLE NTStatus = 0xC000023E
+ STATUS_PORT_UNREACHABLE NTStatus = 0xC000023F
+ STATUS_REQUEST_ABORTED NTStatus = 0xC0000240
+ STATUS_CONNECTION_ABORTED NTStatus = 0xC0000241
+ STATUS_BAD_COMPRESSION_BUFFER NTStatus = 0xC0000242
+ STATUS_USER_MAPPED_FILE NTStatus = 0xC0000243
+ STATUS_AUDIT_FAILED NTStatus = 0xC0000244
+ STATUS_TIMER_RESOLUTION_NOT_SET NTStatus = 0xC0000245
+ STATUS_CONNECTION_COUNT_LIMIT NTStatus = 0xC0000246
+ STATUS_LOGIN_TIME_RESTRICTION NTStatus = 0xC0000247
+ STATUS_LOGIN_WKSTA_RESTRICTION NTStatus = 0xC0000248
+ STATUS_IMAGE_MP_UP_MISMATCH NTStatus = 0xC0000249
+ STATUS_INSUFFICIENT_LOGON_INFO NTStatus = 0xC0000250
+ STATUS_BAD_DLL_ENTRYPOINT NTStatus = 0xC0000251
+ STATUS_BAD_SERVICE_ENTRYPOINT NTStatus = 0xC0000252
+ STATUS_LPC_REPLY_LOST NTStatus = 0xC0000253
+ STATUS_IP_ADDRESS_CONFLICT1 NTStatus = 0xC0000254
+ STATUS_IP_ADDRESS_CONFLICT2 NTStatus = 0xC0000255
+ STATUS_REGISTRY_QUOTA_LIMIT NTStatus = 0xC0000256
+ STATUS_PATH_NOT_COVERED NTStatus = 0xC0000257
+ STATUS_NO_CALLBACK_ACTIVE NTStatus = 0xC0000258
+ STATUS_LICENSE_QUOTA_EXCEEDED NTStatus = 0xC0000259
+ STATUS_PWD_TOO_SHORT NTStatus = 0xC000025A
+ STATUS_PWD_TOO_RECENT NTStatus = 0xC000025B
+ STATUS_PWD_HISTORY_CONFLICT NTStatus = 0xC000025C
+ STATUS_PLUGPLAY_NO_DEVICE NTStatus = 0xC000025E
+ STATUS_UNSUPPORTED_COMPRESSION NTStatus = 0xC000025F
+ STATUS_INVALID_HW_PROFILE NTStatus = 0xC0000260
+ STATUS_INVALID_PLUGPLAY_DEVICE_PATH NTStatus = 0xC0000261
+ STATUS_DRIVER_ORDINAL_NOT_FOUND NTStatus = 0xC0000262
+ STATUS_DRIVER_ENTRYPOINT_NOT_FOUND NTStatus = 0xC0000263
+ STATUS_RESOURCE_NOT_OWNED NTStatus = 0xC0000264
+ STATUS_TOO_MANY_LINKS NTStatus = 0xC0000265
+ STATUS_QUOTA_LIST_INCONSISTENT NTStatus = 0xC0000266
+ STATUS_FILE_IS_OFFLINE NTStatus = 0xC0000267
+ STATUS_EVALUATION_EXPIRATION NTStatus = 0xC0000268
+ STATUS_ILLEGAL_DLL_RELOCATION NTStatus = 0xC0000269
+ STATUS_LICENSE_VIOLATION NTStatus = 0xC000026A
+ STATUS_DLL_INIT_FAILED_LOGOFF NTStatus = 0xC000026B
+ STATUS_DRIVER_UNABLE_TO_LOAD NTStatus = 0xC000026C
+ STATUS_DFS_UNAVAILABLE NTStatus = 0xC000026D
+ STATUS_VOLUME_DISMOUNTED NTStatus = 0xC000026E
+ STATUS_WX86_INTERNAL_ERROR NTStatus = 0xC000026F
+ STATUS_WX86_FLOAT_STACK_CHECK NTStatus = 0xC0000270
+ STATUS_VALIDATE_CONTINUE NTStatus = 0xC0000271
+ STATUS_NO_MATCH NTStatus = 0xC0000272
+ STATUS_NO_MORE_MATCHES NTStatus = 0xC0000273
+ STATUS_NOT_A_REPARSE_POINT NTStatus = 0xC0000275
+ STATUS_IO_REPARSE_TAG_INVALID NTStatus = 0xC0000276
+ STATUS_IO_REPARSE_TAG_MISMATCH NTStatus = 0xC0000277
+ STATUS_IO_REPARSE_DATA_INVALID NTStatus = 0xC0000278
+ STATUS_IO_REPARSE_TAG_NOT_HANDLED NTStatus = 0xC0000279
+ STATUS_PWD_TOO_LONG NTStatus = 0xC000027A
+ STATUS_STOWED_EXCEPTION NTStatus = 0xC000027B
+ STATUS_CONTEXT_STOWED_EXCEPTION NTStatus = 0xC000027C
+ STATUS_REPARSE_POINT_NOT_RESOLVED NTStatus = 0xC0000280
+ STATUS_DIRECTORY_IS_A_REPARSE_POINT NTStatus = 0xC0000281
+ STATUS_RANGE_LIST_CONFLICT NTStatus = 0xC0000282
+ STATUS_SOURCE_ELEMENT_EMPTY NTStatus = 0xC0000283
+ STATUS_DESTINATION_ELEMENT_FULL NTStatus = 0xC0000284
+ STATUS_ILLEGAL_ELEMENT_ADDRESS NTStatus = 0xC0000285
+ STATUS_MAGAZINE_NOT_PRESENT NTStatus = 0xC0000286
+ STATUS_REINITIALIZATION_NEEDED NTStatus = 0xC0000287
+ STATUS_DEVICE_REQUIRES_CLEANING NTStatus = 0x80000288
+ STATUS_DEVICE_DOOR_OPEN NTStatus = 0x80000289
+ STATUS_ENCRYPTION_FAILED NTStatus = 0xC000028A
+ STATUS_DECRYPTION_FAILED NTStatus = 0xC000028B
+ STATUS_RANGE_NOT_FOUND NTStatus = 0xC000028C
+ STATUS_NO_RECOVERY_POLICY NTStatus = 0xC000028D
+ STATUS_NO_EFS NTStatus = 0xC000028E
+ STATUS_WRONG_EFS NTStatus = 0xC000028F
+ STATUS_NO_USER_KEYS NTStatus = 0xC0000290
+ STATUS_FILE_NOT_ENCRYPTED NTStatus = 0xC0000291
+ STATUS_NOT_EXPORT_FORMAT NTStatus = 0xC0000292
+ STATUS_FILE_ENCRYPTED NTStatus = 0xC0000293
+ STATUS_WAKE_SYSTEM NTStatus = 0x40000294
+ STATUS_WMI_GUID_NOT_FOUND NTStatus = 0xC0000295
+ STATUS_WMI_INSTANCE_NOT_FOUND NTStatus = 0xC0000296
+ STATUS_WMI_ITEMID_NOT_FOUND NTStatus = 0xC0000297
+ STATUS_WMI_TRY_AGAIN NTStatus = 0xC0000298
+ STATUS_SHARED_POLICY NTStatus = 0xC0000299
+ STATUS_POLICY_OBJECT_NOT_FOUND NTStatus = 0xC000029A
+ STATUS_POLICY_ONLY_IN_DS NTStatus = 0xC000029B
+ STATUS_VOLUME_NOT_UPGRADED NTStatus = 0xC000029C
+ STATUS_REMOTE_STORAGE_NOT_ACTIVE NTStatus = 0xC000029D
+ STATUS_REMOTE_STORAGE_MEDIA_ERROR NTStatus = 0xC000029E
+ STATUS_NO_TRACKING_SERVICE NTStatus = 0xC000029F
+ STATUS_SERVER_SID_MISMATCH NTStatus = 0xC00002A0
+ STATUS_DS_NO_ATTRIBUTE_OR_VALUE NTStatus = 0xC00002A1
+ STATUS_DS_INVALID_ATTRIBUTE_SYNTAX NTStatus = 0xC00002A2
+ STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED NTStatus = 0xC00002A3
+ STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS NTStatus = 0xC00002A4
+ STATUS_DS_BUSY NTStatus = 0xC00002A5
+ STATUS_DS_UNAVAILABLE NTStatus = 0xC00002A6
+ STATUS_DS_NO_RIDS_ALLOCATED NTStatus = 0xC00002A7
+ STATUS_DS_NO_MORE_RIDS NTStatus = 0xC00002A8
+ STATUS_DS_INCORRECT_ROLE_OWNER NTStatus = 0xC00002A9
+ STATUS_DS_RIDMGR_INIT_ERROR NTStatus = 0xC00002AA
+ STATUS_DS_OBJ_CLASS_VIOLATION NTStatus = 0xC00002AB
+ STATUS_DS_CANT_ON_NON_LEAF NTStatus = 0xC00002AC
+ STATUS_DS_CANT_ON_RDN NTStatus = 0xC00002AD
+ STATUS_DS_CANT_MOD_OBJ_CLASS NTStatus = 0xC00002AE
+ STATUS_DS_CROSS_DOM_MOVE_FAILED NTStatus = 0xC00002AF
+ STATUS_DS_GC_NOT_AVAILABLE NTStatus = 0xC00002B0
+ STATUS_DIRECTORY_SERVICE_REQUIRED NTStatus = 0xC00002B1
+ STATUS_REPARSE_ATTRIBUTE_CONFLICT NTStatus = 0xC00002B2
+ STATUS_CANT_ENABLE_DENY_ONLY NTStatus = 0xC00002B3
+ STATUS_FLOAT_MULTIPLE_FAULTS NTStatus = 0xC00002B4
+ STATUS_FLOAT_MULTIPLE_TRAPS NTStatus = 0xC00002B5
+ STATUS_DEVICE_REMOVED NTStatus = 0xC00002B6
+ STATUS_JOURNAL_DELETE_IN_PROGRESS NTStatus = 0xC00002B7
+ STATUS_JOURNAL_NOT_ACTIVE NTStatus = 0xC00002B8
+ STATUS_NOINTERFACE NTStatus = 0xC00002B9
+ STATUS_DS_RIDMGR_DISABLED NTStatus = 0xC00002BA
+ STATUS_DS_ADMIN_LIMIT_EXCEEDED NTStatus = 0xC00002C1
+ STATUS_DRIVER_FAILED_SLEEP NTStatus = 0xC00002C2
+ STATUS_MUTUAL_AUTHENTICATION_FAILED NTStatus = 0xC00002C3
+ STATUS_CORRUPT_SYSTEM_FILE NTStatus = 0xC00002C4
+ STATUS_DATATYPE_MISALIGNMENT_ERROR NTStatus = 0xC00002C5
+ STATUS_WMI_READ_ONLY NTStatus = 0xC00002C6
+ STATUS_WMI_SET_FAILURE NTStatus = 0xC00002C7
+ STATUS_COMMITMENT_MINIMUM NTStatus = 0xC00002C8
+ STATUS_REG_NAT_CONSUMPTION NTStatus = 0xC00002C9
+ STATUS_TRANSPORT_FULL NTStatus = 0xC00002CA
+ STATUS_DS_SAM_INIT_FAILURE NTStatus = 0xC00002CB
+ STATUS_ONLY_IF_CONNECTED NTStatus = 0xC00002CC
+ STATUS_DS_SENSITIVE_GROUP_VIOLATION NTStatus = 0xC00002CD
+ STATUS_PNP_RESTART_ENUMERATION NTStatus = 0xC00002CE
+ STATUS_JOURNAL_ENTRY_DELETED NTStatus = 0xC00002CF
+ STATUS_DS_CANT_MOD_PRIMARYGROUPID NTStatus = 0xC00002D0
+ STATUS_SYSTEM_IMAGE_BAD_SIGNATURE NTStatus = 0xC00002D1
+ STATUS_PNP_REBOOT_REQUIRED NTStatus = 0xC00002D2
+ STATUS_POWER_STATE_INVALID NTStatus = 0xC00002D3
+ STATUS_DS_INVALID_GROUP_TYPE NTStatus = 0xC00002D4
+ STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN NTStatus = 0xC00002D5
+ STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN NTStatus = 0xC00002D6
+ STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER NTStatus = 0xC00002D7
+ STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER NTStatus = 0xC00002D8
+ STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER NTStatus = 0xC00002D9
+ STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER NTStatus = 0xC00002DA
+ STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER NTStatus = 0xC00002DB
+ STATUS_DS_HAVE_PRIMARY_MEMBERS NTStatus = 0xC00002DC
+ STATUS_WMI_NOT_SUPPORTED NTStatus = 0xC00002DD
+ STATUS_INSUFFICIENT_POWER NTStatus = 0xC00002DE
+ STATUS_SAM_NEED_BOOTKEY_PASSWORD NTStatus = 0xC00002DF
+ STATUS_SAM_NEED_BOOTKEY_FLOPPY NTStatus = 0xC00002E0
+ STATUS_DS_CANT_START NTStatus = 0xC00002E1
+ STATUS_DS_INIT_FAILURE NTStatus = 0xC00002E2
+ STATUS_SAM_INIT_FAILURE NTStatus = 0xC00002E3
+ STATUS_DS_GC_REQUIRED NTStatus = 0xC00002E4
+ STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY NTStatus = 0xC00002E5
+ STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS NTStatus = 0xC00002E6
+ STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED NTStatus = 0xC00002E7
+ STATUS_MULTIPLE_FAULT_VIOLATION NTStatus = 0xC00002E8
+ STATUS_CURRENT_DOMAIN_NOT_ALLOWED NTStatus = 0xC00002E9
+ STATUS_CANNOT_MAKE NTStatus = 0xC00002EA
+ STATUS_SYSTEM_SHUTDOWN NTStatus = 0xC00002EB
+ STATUS_DS_INIT_FAILURE_CONSOLE NTStatus = 0xC00002EC
+ STATUS_DS_SAM_INIT_FAILURE_CONSOLE NTStatus = 0xC00002ED
+ STATUS_UNFINISHED_CONTEXT_DELETED NTStatus = 0xC00002EE
+ STATUS_NO_TGT_REPLY NTStatus = 0xC00002EF
+ STATUS_OBJECTID_NOT_FOUND NTStatus = 0xC00002F0
+ STATUS_NO_IP_ADDRESSES NTStatus = 0xC00002F1
+ STATUS_WRONG_CREDENTIAL_HANDLE NTStatus = 0xC00002F2
+ STATUS_CRYPTO_SYSTEM_INVALID NTStatus = 0xC00002F3
+ STATUS_MAX_REFERRALS_EXCEEDED NTStatus = 0xC00002F4
+ STATUS_MUST_BE_KDC NTStatus = 0xC00002F5
+ STATUS_STRONG_CRYPTO_NOT_SUPPORTED NTStatus = 0xC00002F6
+ STATUS_TOO_MANY_PRINCIPALS NTStatus = 0xC00002F7
+ STATUS_NO_PA_DATA NTStatus = 0xC00002F8
+ STATUS_PKINIT_NAME_MISMATCH NTStatus = 0xC00002F9
+ STATUS_SMARTCARD_LOGON_REQUIRED NTStatus = 0xC00002FA
+ STATUS_KDC_INVALID_REQUEST NTStatus = 0xC00002FB
+ STATUS_KDC_UNABLE_TO_REFER NTStatus = 0xC00002FC
+ STATUS_KDC_UNKNOWN_ETYPE NTStatus = 0xC00002FD
+ STATUS_SHUTDOWN_IN_PROGRESS NTStatus = 0xC00002FE
+ STATUS_SERVER_SHUTDOWN_IN_PROGRESS NTStatus = 0xC00002FF
+ STATUS_NOT_SUPPORTED_ON_SBS NTStatus = 0xC0000300
+ STATUS_WMI_GUID_DISCONNECTED NTStatus = 0xC0000301
+ STATUS_WMI_ALREADY_DISABLED NTStatus = 0xC0000302
+ STATUS_WMI_ALREADY_ENABLED NTStatus = 0xC0000303
+ STATUS_MFT_TOO_FRAGMENTED NTStatus = 0xC0000304
+ STATUS_COPY_PROTECTION_FAILURE NTStatus = 0xC0000305
+ STATUS_CSS_AUTHENTICATION_FAILURE NTStatus = 0xC0000306
+ STATUS_CSS_KEY_NOT_PRESENT NTStatus = 0xC0000307
+ STATUS_CSS_KEY_NOT_ESTABLISHED NTStatus = 0xC0000308
+ STATUS_CSS_SCRAMBLED_SECTOR NTStatus = 0xC0000309
+ STATUS_CSS_REGION_MISMATCH NTStatus = 0xC000030A
+ STATUS_CSS_RESETS_EXHAUSTED NTStatus = 0xC000030B
+ STATUS_PASSWORD_CHANGE_REQUIRED NTStatus = 0xC000030C
+ STATUS_LOST_MODE_LOGON_RESTRICTION NTStatus = 0xC000030D
+ STATUS_PKINIT_FAILURE NTStatus = 0xC0000320
+ STATUS_SMARTCARD_SUBSYSTEM_FAILURE NTStatus = 0xC0000321
+ STATUS_NO_KERB_KEY NTStatus = 0xC0000322
+ STATUS_HOST_DOWN NTStatus = 0xC0000350
+ STATUS_UNSUPPORTED_PREAUTH NTStatus = 0xC0000351
+ STATUS_EFS_ALG_BLOB_TOO_BIG NTStatus = 0xC0000352
+ STATUS_PORT_NOT_SET NTStatus = 0xC0000353
+ STATUS_DEBUGGER_INACTIVE NTStatus = 0xC0000354
+ STATUS_DS_VERSION_CHECK_FAILURE NTStatus = 0xC0000355
+ STATUS_AUDITING_DISABLED NTStatus = 0xC0000356
+ STATUS_PRENT4_MACHINE_ACCOUNT NTStatus = 0xC0000357
+ STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER NTStatus = 0xC0000358
+ STATUS_INVALID_IMAGE_WIN_32 NTStatus = 0xC0000359
+ STATUS_INVALID_IMAGE_WIN_64 NTStatus = 0xC000035A
+ STATUS_BAD_BINDINGS NTStatus = 0xC000035B
+ STATUS_NETWORK_SESSION_EXPIRED NTStatus = 0xC000035C
+ STATUS_APPHELP_BLOCK NTStatus = 0xC000035D
+ STATUS_ALL_SIDS_FILTERED NTStatus = 0xC000035E
+ STATUS_NOT_SAFE_MODE_DRIVER NTStatus = 0xC000035F
+ STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT NTStatus = 0xC0000361
+ STATUS_ACCESS_DISABLED_BY_POLICY_PATH NTStatus = 0xC0000362
+ STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER NTStatus = 0xC0000363
+ STATUS_ACCESS_DISABLED_BY_POLICY_OTHER NTStatus = 0xC0000364
+ STATUS_FAILED_DRIVER_ENTRY NTStatus = 0xC0000365
+ STATUS_DEVICE_ENUMERATION_ERROR NTStatus = 0xC0000366
+ STATUS_MOUNT_POINT_NOT_RESOLVED NTStatus = 0xC0000368
+ STATUS_INVALID_DEVICE_OBJECT_PARAMETER NTStatus = 0xC0000369
+ STATUS_MCA_OCCURED NTStatus = 0xC000036A
+ STATUS_DRIVER_BLOCKED_CRITICAL NTStatus = 0xC000036B
+ STATUS_DRIVER_BLOCKED NTStatus = 0xC000036C
+ STATUS_DRIVER_DATABASE_ERROR NTStatus = 0xC000036D
+ STATUS_SYSTEM_HIVE_TOO_LARGE NTStatus = 0xC000036E
+ STATUS_INVALID_IMPORT_OF_NON_DLL NTStatus = 0xC000036F
+ STATUS_DS_SHUTTING_DOWN NTStatus = 0x40000370
+ STATUS_NO_SECRETS NTStatus = 0xC0000371
+ STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY NTStatus = 0xC0000372
+ STATUS_FAILED_STACK_SWITCH NTStatus = 0xC0000373
+ STATUS_HEAP_CORRUPTION NTStatus = 0xC0000374
+ STATUS_SMARTCARD_WRONG_PIN NTStatus = 0xC0000380
+ STATUS_SMARTCARD_CARD_BLOCKED NTStatus = 0xC0000381
+ STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED NTStatus = 0xC0000382
+ STATUS_SMARTCARD_NO_CARD NTStatus = 0xC0000383
+ STATUS_SMARTCARD_NO_KEY_CONTAINER NTStatus = 0xC0000384
+ STATUS_SMARTCARD_NO_CERTIFICATE NTStatus = 0xC0000385
+ STATUS_SMARTCARD_NO_KEYSET NTStatus = 0xC0000386
+ STATUS_SMARTCARD_IO_ERROR NTStatus = 0xC0000387
+ STATUS_DOWNGRADE_DETECTED NTStatus = 0xC0000388
+ STATUS_SMARTCARD_CERT_REVOKED NTStatus = 0xC0000389
+ STATUS_ISSUING_CA_UNTRUSTED NTStatus = 0xC000038A
+ STATUS_REVOCATION_OFFLINE_C NTStatus = 0xC000038B
+ STATUS_PKINIT_CLIENT_FAILURE NTStatus = 0xC000038C
+ STATUS_SMARTCARD_CERT_EXPIRED NTStatus = 0xC000038D
+ STATUS_DRIVER_FAILED_PRIOR_UNLOAD NTStatus = 0xC000038E
+ STATUS_SMARTCARD_SILENT_CONTEXT NTStatus = 0xC000038F
+ STATUS_PER_USER_TRUST_QUOTA_EXCEEDED NTStatus = 0xC0000401
+ STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED NTStatus = 0xC0000402
+ STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED NTStatus = 0xC0000403
+ STATUS_DS_NAME_NOT_UNIQUE NTStatus = 0xC0000404
+ STATUS_DS_DUPLICATE_ID_FOUND NTStatus = 0xC0000405
+ STATUS_DS_GROUP_CONVERSION_ERROR NTStatus = 0xC0000406
+ STATUS_VOLSNAP_PREPARE_HIBERNATE NTStatus = 0xC0000407
+ STATUS_USER2USER_REQUIRED NTStatus = 0xC0000408
+ STATUS_STACK_BUFFER_OVERRUN NTStatus = 0xC0000409
+ STATUS_NO_S4U_PROT_SUPPORT NTStatus = 0xC000040A
+ STATUS_CROSSREALM_DELEGATION_FAILURE NTStatus = 0xC000040B
+ STATUS_REVOCATION_OFFLINE_KDC NTStatus = 0xC000040C
+ STATUS_ISSUING_CA_UNTRUSTED_KDC NTStatus = 0xC000040D
+ STATUS_KDC_CERT_EXPIRED NTStatus = 0xC000040E
+ STATUS_KDC_CERT_REVOKED NTStatus = 0xC000040F
+ STATUS_PARAMETER_QUOTA_EXCEEDED NTStatus = 0xC0000410
+ STATUS_HIBERNATION_FAILURE NTStatus = 0xC0000411
+ STATUS_DELAY_LOAD_FAILED NTStatus = 0xC0000412
+ STATUS_AUTHENTICATION_FIREWALL_FAILED NTStatus = 0xC0000413
+ STATUS_VDM_DISALLOWED NTStatus = 0xC0000414
+ STATUS_HUNG_DISPLAY_DRIVER_THREAD NTStatus = 0xC0000415
+ STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE NTStatus = 0xC0000416
+ STATUS_INVALID_CRUNTIME_PARAMETER NTStatus = 0xC0000417
+ STATUS_NTLM_BLOCKED NTStatus = 0xC0000418
+ STATUS_DS_SRC_SID_EXISTS_IN_FOREST NTStatus = 0xC0000419
+ STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST NTStatus = 0xC000041A
+ STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST NTStatus = 0xC000041B
+ STATUS_INVALID_USER_PRINCIPAL_NAME NTStatus = 0xC000041C
+ STATUS_FATAL_USER_CALLBACK_EXCEPTION NTStatus = 0xC000041D
+ STATUS_ASSERTION_FAILURE NTStatus = 0xC0000420
+ STATUS_VERIFIER_STOP NTStatus = 0xC0000421
+ STATUS_CALLBACK_POP_STACK NTStatus = 0xC0000423
+ STATUS_INCOMPATIBLE_DRIVER_BLOCKED NTStatus = 0xC0000424
+ STATUS_HIVE_UNLOADED NTStatus = 0xC0000425
+ STATUS_COMPRESSION_DISABLED NTStatus = 0xC0000426
+ STATUS_FILE_SYSTEM_LIMITATION NTStatus = 0xC0000427
+ STATUS_INVALID_IMAGE_HASH NTStatus = 0xC0000428
+ STATUS_NOT_CAPABLE NTStatus = 0xC0000429
+ STATUS_REQUEST_OUT_OF_SEQUENCE NTStatus = 0xC000042A
+ STATUS_IMPLEMENTATION_LIMIT NTStatus = 0xC000042B
+ STATUS_ELEVATION_REQUIRED NTStatus = 0xC000042C
+ STATUS_NO_SECURITY_CONTEXT NTStatus = 0xC000042D
+ STATUS_PKU2U_CERT_FAILURE NTStatus = 0xC000042F
+ STATUS_BEYOND_VDL NTStatus = 0xC0000432
+ STATUS_ENCOUNTERED_WRITE_IN_PROGRESS NTStatus = 0xC0000433
+ STATUS_PTE_CHANGED NTStatus = 0xC0000434
+ STATUS_PURGE_FAILED NTStatus = 0xC0000435
+ STATUS_CRED_REQUIRES_CONFIRMATION NTStatus = 0xC0000440
+ STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE NTStatus = 0xC0000441
+ STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER NTStatus = 0xC0000442
+ STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE NTStatus = 0xC0000443
+ STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE NTStatus = 0xC0000444
+ STATUS_CS_ENCRYPTION_FILE_NOT_CSE NTStatus = 0xC0000445
+ STATUS_INVALID_LABEL NTStatus = 0xC0000446
+ STATUS_DRIVER_PROCESS_TERMINATED NTStatus = 0xC0000450
+ STATUS_AMBIGUOUS_SYSTEM_DEVICE NTStatus = 0xC0000451
+ STATUS_SYSTEM_DEVICE_NOT_FOUND NTStatus = 0xC0000452
+ STATUS_RESTART_BOOT_APPLICATION NTStatus = 0xC0000453
+ STATUS_INSUFFICIENT_NVRAM_RESOURCES NTStatus = 0xC0000454
+ STATUS_INVALID_SESSION NTStatus = 0xC0000455
+ STATUS_THREAD_ALREADY_IN_SESSION NTStatus = 0xC0000456
+ STATUS_THREAD_NOT_IN_SESSION NTStatus = 0xC0000457
+ STATUS_INVALID_WEIGHT NTStatus = 0xC0000458
+ STATUS_REQUEST_PAUSED NTStatus = 0xC0000459
+ STATUS_NO_RANGES_PROCESSED NTStatus = 0xC0000460
+ STATUS_DISK_RESOURCES_EXHAUSTED NTStatus = 0xC0000461
+ STATUS_NEEDS_REMEDIATION NTStatus = 0xC0000462
+ STATUS_DEVICE_FEATURE_NOT_SUPPORTED NTStatus = 0xC0000463
+ STATUS_DEVICE_UNREACHABLE NTStatus = 0xC0000464
+ STATUS_INVALID_TOKEN NTStatus = 0xC0000465
+ STATUS_SERVER_UNAVAILABLE NTStatus = 0xC0000466
+ STATUS_FILE_NOT_AVAILABLE NTStatus = 0xC0000467
+ STATUS_DEVICE_INSUFFICIENT_RESOURCES NTStatus = 0xC0000468
+ STATUS_PACKAGE_UPDATING NTStatus = 0xC0000469
+ STATUS_NOT_READ_FROM_COPY NTStatus = 0xC000046A
+ STATUS_FT_WRITE_FAILURE NTStatus = 0xC000046B
+ STATUS_FT_DI_SCAN_REQUIRED NTStatus = 0xC000046C
+ STATUS_OBJECT_NOT_EXTERNALLY_BACKED NTStatus = 0xC000046D
+ STATUS_EXTERNAL_BACKING_PROVIDER_UNKNOWN NTStatus = 0xC000046E
+ STATUS_COMPRESSION_NOT_BENEFICIAL NTStatus = 0xC000046F
+ STATUS_DATA_CHECKSUM_ERROR NTStatus = 0xC0000470
+ STATUS_INTERMIXED_KERNEL_EA_OPERATION NTStatus = 0xC0000471
+ STATUS_TRIM_READ_ZERO_NOT_SUPPORTED NTStatus = 0xC0000472
+ STATUS_TOO_MANY_SEGMENT_DESCRIPTORS NTStatus = 0xC0000473
+ STATUS_INVALID_OFFSET_ALIGNMENT NTStatus = 0xC0000474
+ STATUS_INVALID_FIELD_IN_PARAMETER_LIST NTStatus = 0xC0000475
+ STATUS_OPERATION_IN_PROGRESS NTStatus = 0xC0000476
+ STATUS_INVALID_INITIATOR_TARGET_PATH NTStatus = 0xC0000477
+ STATUS_SCRUB_DATA_DISABLED NTStatus = 0xC0000478
+ STATUS_NOT_REDUNDANT_STORAGE NTStatus = 0xC0000479
+ STATUS_RESIDENT_FILE_NOT_SUPPORTED NTStatus = 0xC000047A
+ STATUS_COMPRESSED_FILE_NOT_SUPPORTED NTStatus = 0xC000047B
+ STATUS_DIRECTORY_NOT_SUPPORTED NTStatus = 0xC000047C
+ STATUS_IO_OPERATION_TIMEOUT NTStatus = 0xC000047D
+ STATUS_SYSTEM_NEEDS_REMEDIATION NTStatus = 0xC000047E
+ STATUS_APPX_INTEGRITY_FAILURE_CLR_NGEN NTStatus = 0xC000047F
+ STATUS_SHARE_UNAVAILABLE NTStatus = 0xC0000480
+ STATUS_APISET_NOT_HOSTED NTStatus = 0xC0000481
+ STATUS_APISET_NOT_PRESENT NTStatus = 0xC0000482
+ STATUS_DEVICE_HARDWARE_ERROR NTStatus = 0xC0000483
+ STATUS_FIRMWARE_SLOT_INVALID NTStatus = 0xC0000484
+ STATUS_FIRMWARE_IMAGE_INVALID NTStatus = 0xC0000485
+ STATUS_STORAGE_TOPOLOGY_ID_MISMATCH NTStatus = 0xC0000486
+ STATUS_WIM_NOT_BOOTABLE NTStatus = 0xC0000487
+ STATUS_BLOCKED_BY_PARENTAL_CONTROLS NTStatus = 0xC0000488
+ STATUS_NEEDS_REGISTRATION NTStatus = 0xC0000489
+ STATUS_QUOTA_ACTIVITY NTStatus = 0xC000048A
+ STATUS_CALLBACK_INVOKE_INLINE NTStatus = 0xC000048B
+ STATUS_BLOCK_TOO_MANY_REFERENCES NTStatus = 0xC000048C
+ STATUS_MARKED_TO_DISALLOW_WRITES NTStatus = 0xC000048D
+ STATUS_NETWORK_ACCESS_DENIED_EDP NTStatus = 0xC000048E
+ STATUS_ENCLAVE_FAILURE NTStatus = 0xC000048F
+ STATUS_PNP_NO_COMPAT_DRIVERS NTStatus = 0xC0000490
+ STATUS_PNP_DRIVER_PACKAGE_NOT_FOUND NTStatus = 0xC0000491
+ STATUS_PNP_DRIVER_CONFIGURATION_NOT_FOUND NTStatus = 0xC0000492
+ STATUS_PNP_DRIVER_CONFIGURATION_INCOMPLETE NTStatus = 0xC0000493
+ STATUS_PNP_FUNCTION_DRIVER_REQUIRED NTStatus = 0xC0000494
+ STATUS_PNP_DEVICE_CONFIGURATION_PENDING NTStatus = 0xC0000495
+ STATUS_DEVICE_HINT_NAME_BUFFER_TOO_SMALL NTStatus = 0xC0000496
+ STATUS_PACKAGE_NOT_AVAILABLE NTStatus = 0xC0000497
+ STATUS_DEVICE_IN_MAINTENANCE NTStatus = 0xC0000499
+ STATUS_NOT_SUPPORTED_ON_DAX NTStatus = 0xC000049A
+ STATUS_FREE_SPACE_TOO_FRAGMENTED NTStatus = 0xC000049B
+ STATUS_DAX_MAPPING_EXISTS NTStatus = 0xC000049C
+ STATUS_CHILD_PROCESS_BLOCKED NTStatus = 0xC000049D
+ STATUS_STORAGE_LOST_DATA_PERSISTENCE NTStatus = 0xC000049E
+ STATUS_VRF_CFG_ENABLED NTStatus = 0xC000049F
+ STATUS_PARTITION_TERMINATING NTStatus = 0xC00004A0
+ STATUS_EXTERNAL_SYSKEY_NOT_SUPPORTED NTStatus = 0xC00004A1
+ STATUS_ENCLAVE_VIOLATION NTStatus = 0xC00004A2
+ STATUS_FILE_PROTECTED_UNDER_DPL NTStatus = 0xC00004A3
+ STATUS_VOLUME_NOT_CLUSTER_ALIGNED NTStatus = 0xC00004A4
+ STATUS_NO_PHYSICALLY_ALIGNED_FREE_SPACE_FOUND NTStatus = 0xC00004A5
+ STATUS_APPX_FILE_NOT_ENCRYPTED NTStatus = 0xC00004A6
+ STATUS_RWRAW_ENCRYPTED_FILE_NOT_ENCRYPTED NTStatus = 0xC00004A7
+ STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILEOFFSET NTStatus = 0xC00004A8
+ STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILERANGE NTStatus = 0xC00004A9
+ STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_PARAMETER NTStatus = 0xC00004AA
+ STATUS_FT_READ_FAILURE NTStatus = 0xC00004AB
+ STATUS_PATCH_CONFLICT NTStatus = 0xC00004AC
+ STATUS_STORAGE_RESERVE_ID_INVALID NTStatus = 0xC00004AD
+ STATUS_STORAGE_RESERVE_DOES_NOT_EXIST NTStatus = 0xC00004AE
+ STATUS_STORAGE_RESERVE_ALREADY_EXISTS NTStatus = 0xC00004AF
+ STATUS_STORAGE_RESERVE_NOT_EMPTY NTStatus = 0xC00004B0
+ STATUS_NOT_A_DAX_VOLUME NTStatus = 0xC00004B1
+ STATUS_NOT_DAX_MAPPABLE NTStatus = 0xC00004B2
+ STATUS_CASE_DIFFERING_NAMES_IN_DIR NTStatus = 0xC00004B3
+ STATUS_FILE_NOT_SUPPORTED NTStatus = 0xC00004B4
+ STATUS_NOT_SUPPORTED_WITH_BTT NTStatus = 0xC00004B5
+ STATUS_ENCRYPTION_DISABLED NTStatus = 0xC00004B6
+ STATUS_ENCRYPTING_METADATA_DISALLOWED NTStatus = 0xC00004B7
+ STATUS_CANT_CLEAR_ENCRYPTION_FLAG NTStatus = 0xC00004B8
+ STATUS_INVALID_TASK_NAME NTStatus = 0xC0000500
+ STATUS_INVALID_TASK_INDEX NTStatus = 0xC0000501
+ STATUS_THREAD_ALREADY_IN_TASK NTStatus = 0xC0000502
+ STATUS_CALLBACK_BYPASS NTStatus = 0xC0000503
+ STATUS_UNDEFINED_SCOPE NTStatus = 0xC0000504
+ STATUS_INVALID_CAP NTStatus = 0xC0000505
+ STATUS_NOT_GUI_PROCESS NTStatus = 0xC0000506
+ STATUS_DEVICE_HUNG NTStatus = 0xC0000507
+ STATUS_CONTAINER_ASSIGNED NTStatus = 0xC0000508
+ STATUS_JOB_NO_CONTAINER NTStatus = 0xC0000509
+ STATUS_DEVICE_UNRESPONSIVE NTStatus = 0xC000050A
+ STATUS_REPARSE_POINT_ENCOUNTERED NTStatus = 0xC000050B
+ STATUS_ATTRIBUTE_NOT_PRESENT NTStatus = 0xC000050C
+ STATUS_NOT_A_TIERED_VOLUME NTStatus = 0xC000050D
+ STATUS_ALREADY_HAS_STREAM_ID NTStatus = 0xC000050E
+ STATUS_JOB_NOT_EMPTY NTStatus = 0xC000050F
+ STATUS_ALREADY_INITIALIZED NTStatus = 0xC0000510
+ STATUS_ENCLAVE_NOT_TERMINATED NTStatus = 0xC0000511
+ STATUS_ENCLAVE_IS_TERMINATING NTStatus = 0xC0000512
+ STATUS_SMB1_NOT_AVAILABLE NTStatus = 0xC0000513
+ STATUS_SMR_GARBAGE_COLLECTION_REQUIRED NTStatus = 0xC0000514
+ STATUS_INTERRUPTED NTStatus = 0xC0000515
+ STATUS_THREAD_NOT_RUNNING NTStatus = 0xC0000516
+ STATUS_FAIL_FAST_EXCEPTION NTStatus = 0xC0000602
+ STATUS_IMAGE_CERT_REVOKED NTStatus = 0xC0000603
+ STATUS_DYNAMIC_CODE_BLOCKED NTStatus = 0xC0000604
+ STATUS_IMAGE_CERT_EXPIRED NTStatus = 0xC0000605
+ STATUS_STRICT_CFG_VIOLATION NTStatus = 0xC0000606
+ STATUS_SET_CONTEXT_DENIED NTStatus = 0xC000060A
+ STATUS_CROSS_PARTITION_VIOLATION NTStatus = 0xC000060B
+ STATUS_PORT_CLOSED NTStatus = 0xC0000700
+ STATUS_MESSAGE_LOST NTStatus = 0xC0000701
+ STATUS_INVALID_MESSAGE NTStatus = 0xC0000702
+ STATUS_REQUEST_CANCELED NTStatus = 0xC0000703
+ STATUS_RECURSIVE_DISPATCH NTStatus = 0xC0000704
+ STATUS_LPC_RECEIVE_BUFFER_EXPECTED NTStatus = 0xC0000705
+ STATUS_LPC_INVALID_CONNECTION_USAGE NTStatus = 0xC0000706
+ STATUS_LPC_REQUESTS_NOT_ALLOWED NTStatus = 0xC0000707
+ STATUS_RESOURCE_IN_USE NTStatus = 0xC0000708
+ STATUS_HARDWARE_MEMORY_ERROR NTStatus = 0xC0000709
+ STATUS_THREADPOOL_HANDLE_EXCEPTION NTStatus = 0xC000070A
+ STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED NTStatus = 0xC000070B
+ STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED NTStatus = 0xC000070C
+ STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED NTStatus = 0xC000070D
+ STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED NTStatus = 0xC000070E
+ STATUS_THREADPOOL_RELEASED_DURING_OPERATION NTStatus = 0xC000070F
+ STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING NTStatus = 0xC0000710
+ STATUS_APC_RETURNED_WHILE_IMPERSONATING NTStatus = 0xC0000711
+ STATUS_PROCESS_IS_PROTECTED NTStatus = 0xC0000712
+ STATUS_MCA_EXCEPTION NTStatus = 0xC0000713
+ STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE NTStatus = 0xC0000714
+ STATUS_SYMLINK_CLASS_DISABLED NTStatus = 0xC0000715
+ STATUS_INVALID_IDN_NORMALIZATION NTStatus = 0xC0000716
+ STATUS_NO_UNICODE_TRANSLATION NTStatus = 0xC0000717
+ STATUS_ALREADY_REGISTERED NTStatus = 0xC0000718
+ STATUS_CONTEXT_MISMATCH NTStatus = 0xC0000719
+ STATUS_PORT_ALREADY_HAS_COMPLETION_LIST NTStatus = 0xC000071A
+ STATUS_CALLBACK_RETURNED_THREAD_PRIORITY NTStatus = 0xC000071B
+ STATUS_INVALID_THREAD NTStatus = 0xC000071C
+ STATUS_CALLBACK_RETURNED_TRANSACTION NTStatus = 0xC000071D
+ STATUS_CALLBACK_RETURNED_LDR_LOCK NTStatus = 0xC000071E
+ STATUS_CALLBACK_RETURNED_LANG NTStatus = 0xC000071F
+ STATUS_CALLBACK_RETURNED_PRI_BACK NTStatus = 0xC0000720
+ STATUS_CALLBACK_RETURNED_THREAD_AFFINITY NTStatus = 0xC0000721
+ STATUS_LPC_HANDLE_COUNT_EXCEEDED NTStatus = 0xC0000722
+ STATUS_EXECUTABLE_MEMORY_WRITE NTStatus = 0xC0000723
+ STATUS_KERNEL_EXECUTABLE_MEMORY_WRITE NTStatus = 0xC0000724
+ STATUS_ATTACHED_EXECUTABLE_MEMORY_WRITE NTStatus = 0xC0000725
+ STATUS_TRIGGERED_EXECUTABLE_MEMORY_WRITE NTStatus = 0xC0000726
+ STATUS_DISK_REPAIR_DISABLED NTStatus = 0xC0000800
+ STATUS_DS_DOMAIN_RENAME_IN_PROGRESS NTStatus = 0xC0000801
+ STATUS_DISK_QUOTA_EXCEEDED NTStatus = 0xC0000802
+ STATUS_DATA_LOST_REPAIR NTStatus = 0x80000803
+ STATUS_CONTENT_BLOCKED NTStatus = 0xC0000804
+ STATUS_BAD_CLUSTERS NTStatus = 0xC0000805
+ STATUS_VOLUME_DIRTY NTStatus = 0xC0000806
+ STATUS_DISK_REPAIR_REDIRECTED NTStatus = 0x40000807
+ STATUS_DISK_REPAIR_UNSUCCESSFUL NTStatus = 0xC0000808
+ STATUS_CORRUPT_LOG_OVERFULL NTStatus = 0xC0000809
+ STATUS_CORRUPT_LOG_CORRUPTED NTStatus = 0xC000080A
+ STATUS_CORRUPT_LOG_UNAVAILABLE NTStatus = 0xC000080B
+ STATUS_CORRUPT_LOG_DELETED_FULL NTStatus = 0xC000080C
+ STATUS_CORRUPT_LOG_CLEARED NTStatus = 0xC000080D
+ STATUS_ORPHAN_NAME_EXHAUSTED NTStatus = 0xC000080E
+ STATUS_PROACTIVE_SCAN_IN_PROGRESS NTStatus = 0xC000080F
+ STATUS_ENCRYPTED_IO_NOT_POSSIBLE NTStatus = 0xC0000810
+ STATUS_CORRUPT_LOG_UPLEVEL_RECORDS NTStatus = 0xC0000811
+ STATUS_FILE_CHECKED_OUT NTStatus = 0xC0000901
+ STATUS_CHECKOUT_REQUIRED NTStatus = 0xC0000902
+ STATUS_BAD_FILE_TYPE NTStatus = 0xC0000903
+ STATUS_FILE_TOO_LARGE NTStatus = 0xC0000904
+ STATUS_FORMS_AUTH_REQUIRED NTStatus = 0xC0000905
+ STATUS_VIRUS_INFECTED NTStatus = 0xC0000906
+ STATUS_VIRUS_DELETED NTStatus = 0xC0000907
+ STATUS_BAD_MCFG_TABLE NTStatus = 0xC0000908
+ STATUS_CANNOT_BREAK_OPLOCK NTStatus = 0xC0000909
+ STATUS_BAD_KEY NTStatus = 0xC000090A
+ STATUS_BAD_DATA NTStatus = 0xC000090B
+ STATUS_NO_KEY NTStatus = 0xC000090C
+ STATUS_FILE_HANDLE_REVOKED NTStatus = 0xC0000910
+ STATUS_WOW_ASSERTION NTStatus = 0xC0009898
+ STATUS_INVALID_SIGNATURE NTStatus = 0xC000A000
+ STATUS_HMAC_NOT_SUPPORTED NTStatus = 0xC000A001
+ STATUS_AUTH_TAG_MISMATCH NTStatus = 0xC000A002
+ STATUS_INVALID_STATE_TRANSITION NTStatus = 0xC000A003
+ STATUS_INVALID_KERNEL_INFO_VERSION NTStatus = 0xC000A004
+ STATUS_INVALID_PEP_INFO_VERSION NTStatus = 0xC000A005
+ STATUS_HANDLE_REVOKED NTStatus = 0xC000A006
+ STATUS_EOF_ON_GHOSTED_RANGE NTStatus = 0xC000A007
+ STATUS_IPSEC_QUEUE_OVERFLOW NTStatus = 0xC000A010
+ STATUS_ND_QUEUE_OVERFLOW NTStatus = 0xC000A011
+ STATUS_HOPLIMIT_EXCEEDED NTStatus = 0xC000A012
+ STATUS_PROTOCOL_NOT_SUPPORTED NTStatus = 0xC000A013
+ STATUS_FASTPATH_REJECTED NTStatus = 0xC000A014
+ STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED NTStatus = 0xC000A080
+ STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR NTStatus = 0xC000A081
+ STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR NTStatus = 0xC000A082
+ STATUS_XML_PARSE_ERROR NTStatus = 0xC000A083
+ STATUS_XMLDSIG_ERROR NTStatus = 0xC000A084
+ STATUS_WRONG_COMPARTMENT NTStatus = 0xC000A085
+ STATUS_AUTHIP_FAILURE NTStatus = 0xC000A086
+ STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS NTStatus = 0xC000A087
+ STATUS_DS_OID_NOT_FOUND NTStatus = 0xC000A088
+ STATUS_INCORRECT_ACCOUNT_TYPE NTStatus = 0xC000A089
+ STATUS_HASH_NOT_SUPPORTED NTStatus = 0xC000A100
+ STATUS_HASH_NOT_PRESENT NTStatus = 0xC000A101
+ STATUS_SECONDARY_IC_PROVIDER_NOT_REGISTERED NTStatus = 0xC000A121
+ STATUS_GPIO_CLIENT_INFORMATION_INVALID NTStatus = 0xC000A122
+ STATUS_GPIO_VERSION_NOT_SUPPORTED NTStatus = 0xC000A123
+ STATUS_GPIO_INVALID_REGISTRATION_PACKET NTStatus = 0xC000A124
+ STATUS_GPIO_OPERATION_DENIED NTStatus = 0xC000A125
+ STATUS_GPIO_INCOMPATIBLE_CONNECT_MODE NTStatus = 0xC000A126
+ STATUS_GPIO_INTERRUPT_ALREADY_UNMASKED NTStatus = 0x8000A127
+ STATUS_CANNOT_SWITCH_RUNLEVEL NTStatus = 0xC000A141
+ STATUS_INVALID_RUNLEVEL_SETTING NTStatus = 0xC000A142
+ STATUS_RUNLEVEL_SWITCH_TIMEOUT NTStatus = 0xC000A143
+ STATUS_SERVICES_FAILED_AUTOSTART NTStatus = 0x4000A144
+ STATUS_RUNLEVEL_SWITCH_AGENT_TIMEOUT NTStatus = 0xC000A145
+ STATUS_RUNLEVEL_SWITCH_IN_PROGRESS NTStatus = 0xC000A146
+ STATUS_NOT_APPCONTAINER NTStatus = 0xC000A200
+ STATUS_NOT_SUPPORTED_IN_APPCONTAINER NTStatus = 0xC000A201
+ STATUS_INVALID_PACKAGE_SID_LENGTH NTStatus = 0xC000A202
+ STATUS_LPAC_ACCESS_DENIED NTStatus = 0xC000A203
+ STATUS_ADMINLESS_ACCESS_DENIED NTStatus = 0xC000A204
+ STATUS_APP_DATA_NOT_FOUND NTStatus = 0xC000A281
+ STATUS_APP_DATA_EXPIRED NTStatus = 0xC000A282
+ STATUS_APP_DATA_CORRUPT NTStatus = 0xC000A283
+ STATUS_APP_DATA_LIMIT_EXCEEDED NTStatus = 0xC000A284
+ STATUS_APP_DATA_REBOOT_REQUIRED NTStatus = 0xC000A285
+ STATUS_OFFLOAD_READ_FLT_NOT_SUPPORTED NTStatus = 0xC000A2A1
+ STATUS_OFFLOAD_WRITE_FLT_NOT_SUPPORTED NTStatus = 0xC000A2A2
+ STATUS_OFFLOAD_READ_FILE_NOT_SUPPORTED NTStatus = 0xC000A2A3
+ STATUS_OFFLOAD_WRITE_FILE_NOT_SUPPORTED NTStatus = 0xC000A2A4
+ STATUS_WOF_WIM_HEADER_CORRUPT NTStatus = 0xC000A2A5
+ STATUS_WOF_WIM_RESOURCE_TABLE_CORRUPT NTStatus = 0xC000A2A6
+ STATUS_WOF_FILE_RESOURCE_TABLE_CORRUPT NTStatus = 0xC000A2A7
+ STATUS_FILE_SYSTEM_VIRTUALIZATION_UNAVAILABLE NTStatus = 0xC000CE01
+ STATUS_FILE_SYSTEM_VIRTUALIZATION_METADATA_CORRUPT NTStatus = 0xC000CE02
+ STATUS_FILE_SYSTEM_VIRTUALIZATION_BUSY NTStatus = 0xC000CE03
+ STATUS_FILE_SYSTEM_VIRTUALIZATION_PROVIDER_UNKNOWN NTStatus = 0xC000CE04
+ STATUS_FILE_SYSTEM_VIRTUALIZATION_INVALID_OPERATION NTStatus = 0xC000CE05
+ STATUS_CLOUD_FILE_SYNC_ROOT_METADATA_CORRUPT NTStatus = 0xC000CF00
+ STATUS_CLOUD_FILE_PROVIDER_NOT_RUNNING NTStatus = 0xC000CF01
+ STATUS_CLOUD_FILE_METADATA_CORRUPT NTStatus = 0xC000CF02
+ STATUS_CLOUD_FILE_METADATA_TOO_LARGE NTStatus = 0xC000CF03
+ STATUS_CLOUD_FILE_PROPERTY_BLOB_TOO_LARGE NTStatus = 0x8000CF04
+ STATUS_CLOUD_FILE_TOO_MANY_PROPERTY_BLOBS NTStatus = 0x8000CF05
+ STATUS_CLOUD_FILE_PROPERTY_VERSION_NOT_SUPPORTED NTStatus = 0xC000CF06
+ STATUS_NOT_A_CLOUD_FILE NTStatus = 0xC000CF07
+ STATUS_CLOUD_FILE_NOT_IN_SYNC NTStatus = 0xC000CF08
+ STATUS_CLOUD_FILE_ALREADY_CONNECTED NTStatus = 0xC000CF09
+ STATUS_CLOUD_FILE_NOT_SUPPORTED NTStatus = 0xC000CF0A
+ STATUS_CLOUD_FILE_INVALID_REQUEST NTStatus = 0xC000CF0B
+ STATUS_CLOUD_FILE_READ_ONLY_VOLUME NTStatus = 0xC000CF0C
+ STATUS_CLOUD_FILE_CONNECTED_PROVIDER_ONLY NTStatus = 0xC000CF0D
+ STATUS_CLOUD_FILE_VALIDATION_FAILED NTStatus = 0xC000CF0E
+ STATUS_CLOUD_FILE_AUTHENTICATION_FAILED NTStatus = 0xC000CF0F
+ STATUS_CLOUD_FILE_INSUFFICIENT_RESOURCES NTStatus = 0xC000CF10
+ STATUS_CLOUD_FILE_NETWORK_UNAVAILABLE NTStatus = 0xC000CF11
+ STATUS_CLOUD_FILE_UNSUCCESSFUL NTStatus = 0xC000CF12
+ STATUS_CLOUD_FILE_NOT_UNDER_SYNC_ROOT NTStatus = 0xC000CF13
+ STATUS_CLOUD_FILE_IN_USE NTStatus = 0xC000CF14
+ STATUS_CLOUD_FILE_PINNED NTStatus = 0xC000CF15
+ STATUS_CLOUD_FILE_REQUEST_ABORTED NTStatus = 0xC000CF16
+ STATUS_CLOUD_FILE_PROPERTY_CORRUPT NTStatus = 0xC000CF17
+ STATUS_CLOUD_FILE_ACCESS_DENIED NTStatus = 0xC000CF18
+ STATUS_CLOUD_FILE_INCOMPATIBLE_HARDLINKS NTStatus = 0xC000CF19
+ STATUS_CLOUD_FILE_PROPERTY_LOCK_CONFLICT NTStatus = 0xC000CF1A
+ STATUS_CLOUD_FILE_REQUEST_CANCELED NTStatus = 0xC000CF1B
+ STATUS_CLOUD_FILE_PROVIDER_TERMINATED NTStatus = 0xC000CF1D
+ STATUS_NOT_A_CLOUD_SYNC_ROOT NTStatus = 0xC000CF1E
+ STATUS_CLOUD_FILE_REQUEST_TIMEOUT NTStatus = 0xC000CF1F
+ STATUS_ACPI_INVALID_OPCODE NTStatus = 0xC0140001
+ STATUS_ACPI_STACK_OVERFLOW NTStatus = 0xC0140002
+ STATUS_ACPI_ASSERT_FAILED NTStatus = 0xC0140003
+ STATUS_ACPI_INVALID_INDEX NTStatus = 0xC0140004
+ STATUS_ACPI_INVALID_ARGUMENT NTStatus = 0xC0140005
+ STATUS_ACPI_FATAL NTStatus = 0xC0140006
+ STATUS_ACPI_INVALID_SUPERNAME NTStatus = 0xC0140007
+ STATUS_ACPI_INVALID_ARGTYPE NTStatus = 0xC0140008
+ STATUS_ACPI_INVALID_OBJTYPE NTStatus = 0xC0140009
+ STATUS_ACPI_INVALID_TARGETTYPE NTStatus = 0xC014000A
+ STATUS_ACPI_INCORRECT_ARGUMENT_COUNT NTStatus = 0xC014000B
+ STATUS_ACPI_ADDRESS_NOT_MAPPED NTStatus = 0xC014000C
+ STATUS_ACPI_INVALID_EVENTTYPE NTStatus = 0xC014000D
+ STATUS_ACPI_HANDLER_COLLISION NTStatus = 0xC014000E
+ STATUS_ACPI_INVALID_DATA NTStatus = 0xC014000F
+ STATUS_ACPI_INVALID_REGION NTStatus = 0xC0140010
+ STATUS_ACPI_INVALID_ACCESS_SIZE NTStatus = 0xC0140011
+ STATUS_ACPI_ACQUIRE_GLOBAL_LOCK NTStatus = 0xC0140012
+ STATUS_ACPI_ALREADY_INITIALIZED NTStatus = 0xC0140013
+ STATUS_ACPI_NOT_INITIALIZED NTStatus = 0xC0140014
+ STATUS_ACPI_INVALID_MUTEX_LEVEL NTStatus = 0xC0140015
+ STATUS_ACPI_MUTEX_NOT_OWNED NTStatus = 0xC0140016
+ STATUS_ACPI_MUTEX_NOT_OWNER NTStatus = 0xC0140017
+ STATUS_ACPI_RS_ACCESS NTStatus = 0xC0140018
+ STATUS_ACPI_INVALID_TABLE NTStatus = 0xC0140019
+ STATUS_ACPI_REG_HANDLER_FAILED NTStatus = 0xC0140020
+ STATUS_ACPI_POWER_REQUEST_FAILED NTStatus = 0xC0140021
+ STATUS_CTX_WINSTATION_NAME_INVALID NTStatus = 0xC00A0001
+ STATUS_CTX_INVALID_PD NTStatus = 0xC00A0002
+ STATUS_CTX_PD_NOT_FOUND NTStatus = 0xC00A0003
+ STATUS_CTX_CDM_CONNECT NTStatus = 0x400A0004
+ STATUS_CTX_CDM_DISCONNECT NTStatus = 0x400A0005
+ STATUS_CTX_CLOSE_PENDING NTStatus = 0xC00A0006
+ STATUS_CTX_NO_OUTBUF NTStatus = 0xC00A0007
+ STATUS_CTX_MODEM_INF_NOT_FOUND NTStatus = 0xC00A0008
+ STATUS_CTX_INVALID_MODEMNAME NTStatus = 0xC00A0009
+ STATUS_CTX_RESPONSE_ERROR NTStatus = 0xC00A000A
+ STATUS_CTX_MODEM_RESPONSE_TIMEOUT NTStatus = 0xC00A000B
+ STATUS_CTX_MODEM_RESPONSE_NO_CARRIER NTStatus = 0xC00A000C
+ STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE NTStatus = 0xC00A000D
+ STATUS_CTX_MODEM_RESPONSE_BUSY NTStatus = 0xC00A000E
+ STATUS_CTX_MODEM_RESPONSE_VOICE NTStatus = 0xC00A000F
+ STATUS_CTX_TD_ERROR NTStatus = 0xC00A0010
+ STATUS_CTX_LICENSE_CLIENT_INVALID NTStatus = 0xC00A0012
+ STATUS_CTX_LICENSE_NOT_AVAILABLE NTStatus = 0xC00A0013
+ STATUS_CTX_LICENSE_EXPIRED NTStatus = 0xC00A0014
+ STATUS_CTX_WINSTATION_NOT_FOUND NTStatus = 0xC00A0015
+ STATUS_CTX_WINSTATION_NAME_COLLISION NTStatus = 0xC00A0016
+ STATUS_CTX_WINSTATION_BUSY NTStatus = 0xC00A0017
+ STATUS_CTX_BAD_VIDEO_MODE NTStatus = 0xC00A0018
+ STATUS_CTX_GRAPHICS_INVALID NTStatus = 0xC00A0022
+ STATUS_CTX_NOT_CONSOLE NTStatus = 0xC00A0024
+ STATUS_CTX_CLIENT_QUERY_TIMEOUT NTStatus = 0xC00A0026
+ STATUS_CTX_CONSOLE_DISCONNECT NTStatus = 0xC00A0027
+ STATUS_CTX_CONSOLE_CONNECT NTStatus = 0xC00A0028
+ STATUS_CTX_SHADOW_DENIED NTStatus = 0xC00A002A
+ STATUS_CTX_WINSTATION_ACCESS_DENIED NTStatus = 0xC00A002B
+ STATUS_CTX_INVALID_WD NTStatus = 0xC00A002E
+ STATUS_CTX_WD_NOT_FOUND NTStatus = 0xC00A002F
+ STATUS_CTX_SHADOW_INVALID NTStatus = 0xC00A0030
+ STATUS_CTX_SHADOW_DISABLED NTStatus = 0xC00A0031
+ STATUS_RDP_PROTOCOL_ERROR NTStatus = 0xC00A0032
+ STATUS_CTX_CLIENT_LICENSE_NOT_SET NTStatus = 0xC00A0033
+ STATUS_CTX_CLIENT_LICENSE_IN_USE NTStatus = 0xC00A0034
+ STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE NTStatus = 0xC00A0035
+ STATUS_CTX_SHADOW_NOT_RUNNING NTStatus = 0xC00A0036
+ STATUS_CTX_LOGON_DISABLED NTStatus = 0xC00A0037
+ STATUS_CTX_SECURITY_LAYER_ERROR NTStatus = 0xC00A0038
+ STATUS_TS_INCOMPATIBLE_SESSIONS NTStatus = 0xC00A0039
+ STATUS_TS_VIDEO_SUBSYSTEM_ERROR NTStatus = 0xC00A003A
+ STATUS_PNP_BAD_MPS_TABLE NTStatus = 0xC0040035
+ STATUS_PNP_TRANSLATION_FAILED NTStatus = 0xC0040036
+ STATUS_PNP_IRQ_TRANSLATION_FAILED NTStatus = 0xC0040037
+ STATUS_PNP_INVALID_ID NTStatus = 0xC0040038
+ STATUS_IO_REISSUE_AS_CACHED NTStatus = 0xC0040039
+ STATUS_MUI_FILE_NOT_FOUND NTStatus = 0xC00B0001
+ STATUS_MUI_INVALID_FILE NTStatus = 0xC00B0002
+ STATUS_MUI_INVALID_RC_CONFIG NTStatus = 0xC00B0003
+ STATUS_MUI_INVALID_LOCALE_NAME NTStatus = 0xC00B0004
+ STATUS_MUI_INVALID_ULTIMATEFALLBACK_NAME NTStatus = 0xC00B0005
+ STATUS_MUI_FILE_NOT_LOADED NTStatus = 0xC00B0006
+ STATUS_RESOURCE_ENUM_USER_STOP NTStatus = 0xC00B0007
+ STATUS_FLT_NO_HANDLER_DEFINED NTStatus = 0xC01C0001
+ STATUS_FLT_CONTEXT_ALREADY_DEFINED NTStatus = 0xC01C0002
+ STATUS_FLT_INVALID_ASYNCHRONOUS_REQUEST NTStatus = 0xC01C0003
+ STATUS_FLT_DISALLOW_FAST_IO NTStatus = 0xC01C0004
+ STATUS_FLT_INVALID_NAME_REQUEST NTStatus = 0xC01C0005
+ STATUS_FLT_NOT_SAFE_TO_POST_OPERATION NTStatus = 0xC01C0006
+ STATUS_FLT_NOT_INITIALIZED NTStatus = 0xC01C0007
+ STATUS_FLT_FILTER_NOT_READY NTStatus = 0xC01C0008
+ STATUS_FLT_POST_OPERATION_CLEANUP NTStatus = 0xC01C0009
+ STATUS_FLT_INTERNAL_ERROR NTStatus = 0xC01C000A
+ STATUS_FLT_DELETING_OBJECT NTStatus = 0xC01C000B
+ STATUS_FLT_MUST_BE_NONPAGED_POOL NTStatus = 0xC01C000C
+ STATUS_FLT_DUPLICATE_ENTRY NTStatus = 0xC01C000D
+ STATUS_FLT_CBDQ_DISABLED NTStatus = 0xC01C000E
+ STATUS_FLT_DO_NOT_ATTACH NTStatus = 0xC01C000F
+ STATUS_FLT_DO_NOT_DETACH NTStatus = 0xC01C0010
+ STATUS_FLT_INSTANCE_ALTITUDE_COLLISION NTStatus = 0xC01C0011
+ STATUS_FLT_INSTANCE_NAME_COLLISION NTStatus = 0xC01C0012
+ STATUS_FLT_FILTER_NOT_FOUND NTStatus = 0xC01C0013
+ STATUS_FLT_VOLUME_NOT_FOUND NTStatus = 0xC01C0014
+ STATUS_FLT_INSTANCE_NOT_FOUND NTStatus = 0xC01C0015
+ STATUS_FLT_CONTEXT_ALLOCATION_NOT_FOUND NTStatus = 0xC01C0016
+ STATUS_FLT_INVALID_CONTEXT_REGISTRATION NTStatus = 0xC01C0017
+ STATUS_FLT_NAME_CACHE_MISS NTStatus = 0xC01C0018
+ STATUS_FLT_NO_DEVICE_OBJECT NTStatus = 0xC01C0019
+ STATUS_FLT_VOLUME_ALREADY_MOUNTED NTStatus = 0xC01C001A
+ STATUS_FLT_ALREADY_ENLISTED NTStatus = 0xC01C001B
+ STATUS_FLT_CONTEXT_ALREADY_LINKED NTStatus = 0xC01C001C
+ STATUS_FLT_NO_WAITER_FOR_REPLY NTStatus = 0xC01C0020
+ STATUS_FLT_REGISTRATION_BUSY NTStatus = 0xC01C0023
+ STATUS_SXS_SECTION_NOT_FOUND NTStatus = 0xC0150001
+ STATUS_SXS_CANT_GEN_ACTCTX NTStatus = 0xC0150002
+ STATUS_SXS_INVALID_ACTCTXDATA_FORMAT NTStatus = 0xC0150003
+ STATUS_SXS_ASSEMBLY_NOT_FOUND NTStatus = 0xC0150004
+ STATUS_SXS_MANIFEST_FORMAT_ERROR NTStatus = 0xC0150005
+ STATUS_SXS_MANIFEST_PARSE_ERROR NTStatus = 0xC0150006
+ STATUS_SXS_ACTIVATION_CONTEXT_DISABLED NTStatus = 0xC0150007
+ STATUS_SXS_KEY_NOT_FOUND NTStatus = 0xC0150008
+ STATUS_SXS_VERSION_CONFLICT NTStatus = 0xC0150009
+ STATUS_SXS_WRONG_SECTION_TYPE NTStatus = 0xC015000A
+ STATUS_SXS_THREAD_QUERIES_DISABLED NTStatus = 0xC015000B
+ STATUS_SXS_ASSEMBLY_MISSING NTStatus = 0xC015000C
+ STATUS_SXS_RELEASE_ACTIVATION_CONTEXT NTStatus = 0x4015000D
+ STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET NTStatus = 0xC015000E
+ STATUS_SXS_EARLY_DEACTIVATION NTStatus = 0xC015000F
+ STATUS_SXS_INVALID_DEACTIVATION NTStatus = 0xC0150010
+ STATUS_SXS_MULTIPLE_DEACTIVATION NTStatus = 0xC0150011
+ STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY NTStatus = 0xC0150012
+ STATUS_SXS_PROCESS_TERMINATION_REQUESTED NTStatus = 0xC0150013
+ STATUS_SXS_CORRUPT_ACTIVATION_STACK NTStatus = 0xC0150014
+ STATUS_SXS_CORRUPTION NTStatus = 0xC0150015
+ STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE NTStatus = 0xC0150016
+ STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME NTStatus = 0xC0150017
+ STATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE NTStatus = 0xC0150018
+ STATUS_SXS_IDENTITY_PARSE_ERROR NTStatus = 0xC0150019
+ STATUS_SXS_COMPONENT_STORE_CORRUPT NTStatus = 0xC015001A
+ STATUS_SXS_FILE_HASH_MISMATCH NTStatus = 0xC015001B
+ STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT NTStatus = 0xC015001C
+ STATUS_SXS_IDENTITIES_DIFFERENT NTStatus = 0xC015001D
+ STATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT NTStatus = 0xC015001E
+ STATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY NTStatus = 0xC015001F
+ STATUS_ADVANCED_INSTALLER_FAILED NTStatus = 0xC0150020
+ STATUS_XML_ENCODING_MISMATCH NTStatus = 0xC0150021
+ STATUS_SXS_MANIFEST_TOO_BIG NTStatus = 0xC0150022
+ STATUS_SXS_SETTING_NOT_REGISTERED NTStatus = 0xC0150023
+ STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE NTStatus = 0xC0150024
+ STATUS_SMI_PRIMITIVE_INSTALLER_FAILED NTStatus = 0xC0150025
+ STATUS_GENERIC_COMMAND_FAILED NTStatus = 0xC0150026
+ STATUS_SXS_FILE_HASH_MISSING NTStatus = 0xC0150027
+ STATUS_CLUSTER_INVALID_NODE NTStatus = 0xC0130001
+ STATUS_CLUSTER_NODE_EXISTS NTStatus = 0xC0130002
+ STATUS_CLUSTER_JOIN_IN_PROGRESS NTStatus = 0xC0130003
+ STATUS_CLUSTER_NODE_NOT_FOUND NTStatus = 0xC0130004
+ STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND NTStatus = 0xC0130005
+ STATUS_CLUSTER_NETWORK_EXISTS NTStatus = 0xC0130006
+ STATUS_CLUSTER_NETWORK_NOT_FOUND NTStatus = 0xC0130007
+ STATUS_CLUSTER_NETINTERFACE_EXISTS NTStatus = 0xC0130008
+ STATUS_CLUSTER_NETINTERFACE_NOT_FOUND NTStatus = 0xC0130009
+ STATUS_CLUSTER_INVALID_REQUEST NTStatus = 0xC013000A
+ STATUS_CLUSTER_INVALID_NETWORK_PROVIDER NTStatus = 0xC013000B
+ STATUS_CLUSTER_NODE_DOWN NTStatus = 0xC013000C
+ STATUS_CLUSTER_NODE_UNREACHABLE NTStatus = 0xC013000D
+ STATUS_CLUSTER_NODE_NOT_MEMBER NTStatus = 0xC013000E
+ STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS NTStatus = 0xC013000F
+ STATUS_CLUSTER_INVALID_NETWORK NTStatus = 0xC0130010
+ STATUS_CLUSTER_NO_NET_ADAPTERS NTStatus = 0xC0130011
+ STATUS_CLUSTER_NODE_UP NTStatus = 0xC0130012
+ STATUS_CLUSTER_NODE_PAUSED NTStatus = 0xC0130013
+ STATUS_CLUSTER_NODE_NOT_PAUSED NTStatus = 0xC0130014
+ STATUS_CLUSTER_NO_SECURITY_CONTEXT NTStatus = 0xC0130015
+ STATUS_CLUSTER_NETWORK_NOT_INTERNAL NTStatus = 0xC0130016
+ STATUS_CLUSTER_POISONED NTStatus = 0xC0130017
+ STATUS_CLUSTER_NON_CSV_PATH NTStatus = 0xC0130018
+ STATUS_CLUSTER_CSV_VOLUME_NOT_LOCAL NTStatus = 0xC0130019
+ STATUS_CLUSTER_CSV_READ_OPLOCK_BREAK_IN_PROGRESS NTStatus = 0xC0130020
+ STATUS_CLUSTER_CSV_AUTO_PAUSE_ERROR NTStatus = 0xC0130021
+ STATUS_CLUSTER_CSV_REDIRECTED NTStatus = 0xC0130022
+ STATUS_CLUSTER_CSV_NOT_REDIRECTED NTStatus = 0xC0130023
+ STATUS_CLUSTER_CSV_VOLUME_DRAINING NTStatus = 0xC0130024
+ STATUS_CLUSTER_CSV_SNAPSHOT_CREATION_IN_PROGRESS NTStatus = 0xC0130025
+ STATUS_CLUSTER_CSV_VOLUME_DRAINING_SUCCEEDED_DOWNLEVEL NTStatus = 0xC0130026
+ STATUS_CLUSTER_CSV_NO_SNAPSHOTS NTStatus = 0xC0130027
+ STATUS_CSV_IO_PAUSE_TIMEOUT NTStatus = 0xC0130028
+ STATUS_CLUSTER_CSV_INVALID_HANDLE NTStatus = 0xC0130029
+ STATUS_CLUSTER_CSV_SUPPORTED_ONLY_ON_COORDINATOR NTStatus = 0xC0130030
+ STATUS_CLUSTER_CAM_TICKET_REPLAY_DETECTED NTStatus = 0xC0130031
+ STATUS_TRANSACTIONAL_CONFLICT NTStatus = 0xC0190001
+ STATUS_INVALID_TRANSACTION NTStatus = 0xC0190002
+ STATUS_TRANSACTION_NOT_ACTIVE NTStatus = 0xC0190003
+ STATUS_TM_INITIALIZATION_FAILED NTStatus = 0xC0190004
+ STATUS_RM_NOT_ACTIVE NTStatus = 0xC0190005
+ STATUS_RM_METADATA_CORRUPT NTStatus = 0xC0190006
+ STATUS_TRANSACTION_NOT_JOINED NTStatus = 0xC0190007
+ STATUS_DIRECTORY_NOT_RM NTStatus = 0xC0190008
+ STATUS_COULD_NOT_RESIZE_LOG NTStatus = 0x80190009
+ STATUS_TRANSACTIONS_UNSUPPORTED_REMOTE NTStatus = 0xC019000A
+ STATUS_LOG_RESIZE_INVALID_SIZE NTStatus = 0xC019000B
+ STATUS_REMOTE_FILE_VERSION_MISMATCH NTStatus = 0xC019000C
+ STATUS_CRM_PROTOCOL_ALREADY_EXISTS NTStatus = 0xC019000F
+ STATUS_TRANSACTION_PROPAGATION_FAILED NTStatus = 0xC0190010
+ STATUS_CRM_PROTOCOL_NOT_FOUND NTStatus = 0xC0190011
+ STATUS_TRANSACTION_SUPERIOR_EXISTS NTStatus = 0xC0190012
+ STATUS_TRANSACTION_REQUEST_NOT_VALID NTStatus = 0xC0190013
+ STATUS_TRANSACTION_NOT_REQUESTED NTStatus = 0xC0190014
+ STATUS_TRANSACTION_ALREADY_ABORTED NTStatus = 0xC0190015
+ STATUS_TRANSACTION_ALREADY_COMMITTED NTStatus = 0xC0190016
+ STATUS_TRANSACTION_INVALID_MARSHALL_BUFFER NTStatus = 0xC0190017
+ STATUS_CURRENT_TRANSACTION_NOT_VALID NTStatus = 0xC0190018
+ STATUS_LOG_GROWTH_FAILED NTStatus = 0xC0190019
+ STATUS_OBJECT_NO_LONGER_EXISTS NTStatus = 0xC0190021
+ STATUS_STREAM_MINIVERSION_NOT_FOUND NTStatus = 0xC0190022
+ STATUS_STREAM_MINIVERSION_NOT_VALID NTStatus = 0xC0190023
+ STATUS_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION NTStatus = 0xC0190024
+ STATUS_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT NTStatus = 0xC0190025
+ STATUS_CANT_CREATE_MORE_STREAM_MINIVERSIONS NTStatus = 0xC0190026
+ STATUS_HANDLE_NO_LONGER_VALID NTStatus = 0xC0190028
+ STATUS_NO_TXF_METADATA NTStatus = 0x80190029
+ STATUS_LOG_CORRUPTION_DETECTED NTStatus = 0xC0190030
+ STATUS_CANT_RECOVER_WITH_HANDLE_OPEN NTStatus = 0x80190031
+ STATUS_RM_DISCONNECTED NTStatus = 0xC0190032
+ STATUS_ENLISTMENT_NOT_SUPERIOR NTStatus = 0xC0190033
+ STATUS_RECOVERY_NOT_NEEDED NTStatus = 0x40190034
+ STATUS_RM_ALREADY_STARTED NTStatus = 0x40190035
+ STATUS_FILE_IDENTITY_NOT_PERSISTENT NTStatus = 0xC0190036
+ STATUS_CANT_BREAK_TRANSACTIONAL_DEPENDENCY NTStatus = 0xC0190037
+ STATUS_CANT_CROSS_RM_BOUNDARY NTStatus = 0xC0190038
+ STATUS_TXF_DIR_NOT_EMPTY NTStatus = 0xC0190039
+ STATUS_INDOUBT_TRANSACTIONS_EXIST NTStatus = 0xC019003A
+ STATUS_TM_VOLATILE NTStatus = 0xC019003B
+ STATUS_ROLLBACK_TIMER_EXPIRED NTStatus = 0xC019003C
+ STATUS_TXF_ATTRIBUTE_CORRUPT NTStatus = 0xC019003D
+ STATUS_EFS_NOT_ALLOWED_IN_TRANSACTION NTStatus = 0xC019003E
+ STATUS_TRANSACTIONAL_OPEN_NOT_ALLOWED NTStatus = 0xC019003F
+ STATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE NTStatus = 0xC0190040
+ STATUS_TXF_METADATA_ALREADY_PRESENT NTStatus = 0x80190041
+ STATUS_TRANSACTION_SCOPE_CALLBACKS_NOT_SET NTStatus = 0x80190042
+ STATUS_TRANSACTION_REQUIRED_PROMOTION NTStatus = 0xC0190043
+ STATUS_CANNOT_EXECUTE_FILE_IN_TRANSACTION NTStatus = 0xC0190044
+ STATUS_TRANSACTIONS_NOT_FROZEN NTStatus = 0xC0190045
+ STATUS_TRANSACTION_FREEZE_IN_PROGRESS NTStatus = 0xC0190046
+ STATUS_NOT_SNAPSHOT_VOLUME NTStatus = 0xC0190047
+ STATUS_NO_SAVEPOINT_WITH_OPEN_FILES NTStatus = 0xC0190048
+ STATUS_SPARSE_NOT_ALLOWED_IN_TRANSACTION NTStatus = 0xC0190049
+ STATUS_TM_IDENTITY_MISMATCH NTStatus = 0xC019004A
+ STATUS_FLOATED_SECTION NTStatus = 0xC019004B
+ STATUS_CANNOT_ACCEPT_TRANSACTED_WORK NTStatus = 0xC019004C
+ STATUS_CANNOT_ABORT_TRANSACTIONS NTStatus = 0xC019004D
+ STATUS_TRANSACTION_NOT_FOUND NTStatus = 0xC019004E
+ STATUS_RESOURCEMANAGER_NOT_FOUND NTStatus = 0xC019004F
+ STATUS_ENLISTMENT_NOT_FOUND NTStatus = 0xC0190050
+ STATUS_TRANSACTIONMANAGER_NOT_FOUND NTStatus = 0xC0190051
+ STATUS_TRANSACTIONMANAGER_NOT_ONLINE NTStatus = 0xC0190052
+ STATUS_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION NTStatus = 0xC0190053
+ STATUS_TRANSACTION_NOT_ROOT NTStatus = 0xC0190054
+ STATUS_TRANSACTION_OBJECT_EXPIRED NTStatus = 0xC0190055
+ STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION NTStatus = 0xC0190056
+ STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED NTStatus = 0xC0190057
+ STATUS_TRANSACTION_RECORD_TOO_LONG NTStatus = 0xC0190058
+ STATUS_NO_LINK_TRACKING_IN_TRANSACTION NTStatus = 0xC0190059
+ STATUS_OPERATION_NOT_SUPPORTED_IN_TRANSACTION NTStatus = 0xC019005A
+ STATUS_TRANSACTION_INTEGRITY_VIOLATED NTStatus = 0xC019005B
+ STATUS_TRANSACTIONMANAGER_IDENTITY_MISMATCH NTStatus = 0xC019005C
+ STATUS_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT NTStatus = 0xC019005D
+ STATUS_TRANSACTION_MUST_WRITETHROUGH NTStatus = 0xC019005E
+ STATUS_TRANSACTION_NO_SUPERIOR NTStatus = 0xC019005F
+ STATUS_EXPIRED_HANDLE NTStatus = 0xC0190060
+ STATUS_TRANSACTION_NOT_ENLISTED NTStatus = 0xC0190061
+ STATUS_LOG_SECTOR_INVALID NTStatus = 0xC01A0001
+ STATUS_LOG_SECTOR_PARITY_INVALID NTStatus = 0xC01A0002
+ STATUS_LOG_SECTOR_REMAPPED NTStatus = 0xC01A0003
+ STATUS_LOG_BLOCK_INCOMPLETE NTStatus = 0xC01A0004
+ STATUS_LOG_INVALID_RANGE NTStatus = 0xC01A0005
+ STATUS_LOG_BLOCKS_EXHAUSTED NTStatus = 0xC01A0006
+ STATUS_LOG_READ_CONTEXT_INVALID NTStatus = 0xC01A0007
+ STATUS_LOG_RESTART_INVALID NTStatus = 0xC01A0008
+ STATUS_LOG_BLOCK_VERSION NTStatus = 0xC01A0009
+ STATUS_LOG_BLOCK_INVALID NTStatus = 0xC01A000A
+ STATUS_LOG_READ_MODE_INVALID NTStatus = 0xC01A000B
+ STATUS_LOG_NO_RESTART NTStatus = 0x401A000C
+ STATUS_LOG_METADATA_CORRUPT NTStatus = 0xC01A000D
+ STATUS_LOG_METADATA_INVALID NTStatus = 0xC01A000E
+ STATUS_LOG_METADATA_INCONSISTENT NTStatus = 0xC01A000F
+ STATUS_LOG_RESERVATION_INVALID NTStatus = 0xC01A0010
+ STATUS_LOG_CANT_DELETE NTStatus = 0xC01A0011
+ STATUS_LOG_CONTAINER_LIMIT_EXCEEDED NTStatus = 0xC01A0012
+ STATUS_LOG_START_OF_LOG NTStatus = 0xC01A0013
+ STATUS_LOG_POLICY_ALREADY_INSTALLED NTStatus = 0xC01A0014
+ STATUS_LOG_POLICY_NOT_INSTALLED NTStatus = 0xC01A0015
+ STATUS_LOG_POLICY_INVALID NTStatus = 0xC01A0016
+ STATUS_LOG_POLICY_CONFLICT NTStatus = 0xC01A0017
+ STATUS_LOG_PINNED_ARCHIVE_TAIL NTStatus = 0xC01A0018
+ STATUS_LOG_RECORD_NONEXISTENT NTStatus = 0xC01A0019
+ STATUS_LOG_RECORDS_RESERVED_INVALID NTStatus = 0xC01A001A
+ STATUS_LOG_SPACE_RESERVED_INVALID NTStatus = 0xC01A001B
+ STATUS_LOG_TAIL_INVALID NTStatus = 0xC01A001C
+ STATUS_LOG_FULL NTStatus = 0xC01A001D
+ STATUS_LOG_MULTIPLEXED NTStatus = 0xC01A001E
+ STATUS_LOG_DEDICATED NTStatus = 0xC01A001F
+ STATUS_LOG_ARCHIVE_NOT_IN_PROGRESS NTStatus = 0xC01A0020
+ STATUS_LOG_ARCHIVE_IN_PROGRESS NTStatus = 0xC01A0021
+ STATUS_LOG_EPHEMERAL NTStatus = 0xC01A0022
+ STATUS_LOG_NOT_ENOUGH_CONTAINERS NTStatus = 0xC01A0023
+ STATUS_LOG_CLIENT_ALREADY_REGISTERED NTStatus = 0xC01A0024
+ STATUS_LOG_CLIENT_NOT_REGISTERED NTStatus = 0xC01A0025
+ STATUS_LOG_FULL_HANDLER_IN_PROGRESS NTStatus = 0xC01A0026
+ STATUS_LOG_CONTAINER_READ_FAILED NTStatus = 0xC01A0027
+ STATUS_LOG_CONTAINER_WRITE_FAILED NTStatus = 0xC01A0028
+ STATUS_LOG_CONTAINER_OPEN_FAILED NTStatus = 0xC01A0029
+ STATUS_LOG_CONTAINER_STATE_INVALID NTStatus = 0xC01A002A
+ STATUS_LOG_STATE_INVALID NTStatus = 0xC01A002B
+ STATUS_LOG_PINNED NTStatus = 0xC01A002C
+ STATUS_LOG_METADATA_FLUSH_FAILED NTStatus = 0xC01A002D
+ STATUS_LOG_INCONSISTENT_SECURITY NTStatus = 0xC01A002E
+ STATUS_LOG_APPENDED_FLUSH_FAILED NTStatus = 0xC01A002F
+ STATUS_LOG_PINNED_RESERVATION NTStatus = 0xC01A0030
+ STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD NTStatus = 0xC01B00EA
+ STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD_RECOVERED NTStatus = 0x801B00EB
+ STATUS_VIDEO_DRIVER_DEBUG_REPORT_REQUEST NTStatus = 0x401B00EC
+ STATUS_MONITOR_NO_DESCRIPTOR NTStatus = 0xC01D0001
+ STATUS_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT NTStatus = 0xC01D0002
+ STATUS_MONITOR_INVALID_DESCRIPTOR_CHECKSUM NTStatus = 0xC01D0003
+ STATUS_MONITOR_INVALID_STANDARD_TIMING_BLOCK NTStatus = 0xC01D0004
+ STATUS_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED NTStatus = 0xC01D0005
+ STATUS_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK NTStatus = 0xC01D0006
+ STATUS_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK NTStatus = 0xC01D0007
+ STATUS_MONITOR_NO_MORE_DESCRIPTOR_DATA NTStatus = 0xC01D0008
+ STATUS_MONITOR_INVALID_DETAILED_TIMING_BLOCK NTStatus = 0xC01D0009
+ STATUS_MONITOR_INVALID_MANUFACTURE_DATE NTStatus = 0xC01D000A
+ STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER NTStatus = 0xC01E0000
+ STATUS_GRAPHICS_INSUFFICIENT_DMA_BUFFER NTStatus = 0xC01E0001
+ STATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER NTStatus = 0xC01E0002
+ STATUS_GRAPHICS_ADAPTER_WAS_RESET NTStatus = 0xC01E0003
+ STATUS_GRAPHICS_INVALID_DRIVER_MODEL NTStatus = 0xC01E0004
+ STATUS_GRAPHICS_PRESENT_MODE_CHANGED NTStatus = 0xC01E0005
+ STATUS_GRAPHICS_PRESENT_OCCLUDED NTStatus = 0xC01E0006
+ STATUS_GRAPHICS_PRESENT_DENIED NTStatus = 0xC01E0007
+ STATUS_GRAPHICS_CANNOTCOLORCONVERT NTStatus = 0xC01E0008
+ STATUS_GRAPHICS_DRIVER_MISMATCH NTStatus = 0xC01E0009
+ STATUS_GRAPHICS_PARTIAL_DATA_POPULATED NTStatus = 0x401E000A
+ STATUS_GRAPHICS_PRESENT_REDIRECTION_DISABLED NTStatus = 0xC01E000B
+ STATUS_GRAPHICS_PRESENT_UNOCCLUDED NTStatus = 0xC01E000C
+ STATUS_GRAPHICS_WINDOWDC_NOT_AVAILABLE NTStatus = 0xC01E000D
+ STATUS_GRAPHICS_WINDOWLESS_PRESENT_DISABLED NTStatus = 0xC01E000E
+ STATUS_GRAPHICS_PRESENT_INVALID_WINDOW NTStatus = 0xC01E000F
+ STATUS_GRAPHICS_PRESENT_BUFFER_NOT_BOUND NTStatus = 0xC01E0010
+ STATUS_GRAPHICS_VAIL_STATE_CHANGED NTStatus = 0xC01E0011
+ STATUS_GRAPHICS_INDIRECT_DISPLAY_ABANDON_SWAPCHAIN NTStatus = 0xC01E0012
+ STATUS_GRAPHICS_INDIRECT_DISPLAY_DEVICE_STOPPED NTStatus = 0xC01E0013
+ STATUS_GRAPHICS_NO_VIDEO_MEMORY NTStatus = 0xC01E0100
+ STATUS_GRAPHICS_CANT_LOCK_MEMORY NTStatus = 0xC01E0101
+ STATUS_GRAPHICS_ALLOCATION_BUSY NTStatus = 0xC01E0102
+ STATUS_GRAPHICS_TOO_MANY_REFERENCES NTStatus = 0xC01E0103
+ STATUS_GRAPHICS_TRY_AGAIN_LATER NTStatus = 0xC01E0104
+ STATUS_GRAPHICS_TRY_AGAIN_NOW NTStatus = 0xC01E0105
+ STATUS_GRAPHICS_ALLOCATION_INVALID NTStatus = 0xC01E0106
+ STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE NTStatus = 0xC01E0107
+ STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED NTStatus = 0xC01E0108
+ STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION NTStatus = 0xC01E0109
+ STATUS_GRAPHICS_INVALID_ALLOCATION_USAGE NTStatus = 0xC01E0110
+ STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION NTStatus = 0xC01E0111
+ STATUS_GRAPHICS_ALLOCATION_CLOSED NTStatus = 0xC01E0112
+ STATUS_GRAPHICS_INVALID_ALLOCATION_INSTANCE NTStatus = 0xC01E0113
+ STATUS_GRAPHICS_INVALID_ALLOCATION_HANDLE NTStatus = 0xC01E0114
+ STATUS_GRAPHICS_WRONG_ALLOCATION_DEVICE NTStatus = 0xC01E0115
+ STATUS_GRAPHICS_ALLOCATION_CONTENT_LOST NTStatus = 0xC01E0116
+ STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE NTStatus = 0xC01E0200
+ STATUS_GRAPHICS_SKIP_ALLOCATION_PREPARATION NTStatus = 0x401E0201
+ STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY NTStatus = 0xC01E0300
+ STATUS_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED NTStatus = 0xC01E0301
+ STATUS_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED NTStatus = 0xC01E0302
+ STATUS_GRAPHICS_INVALID_VIDPN NTStatus = 0xC01E0303
+ STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE NTStatus = 0xC01E0304
+ STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET NTStatus = 0xC01E0305
+ STATUS_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED NTStatus = 0xC01E0306
+ STATUS_GRAPHICS_MODE_NOT_PINNED NTStatus = 0x401E0307
+ STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET NTStatus = 0xC01E0308
+ STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET NTStatus = 0xC01E0309
+ STATUS_GRAPHICS_INVALID_FREQUENCY NTStatus = 0xC01E030A
+ STATUS_GRAPHICS_INVALID_ACTIVE_REGION NTStatus = 0xC01E030B
+ STATUS_GRAPHICS_INVALID_TOTAL_REGION NTStatus = 0xC01E030C
+ STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE NTStatus = 0xC01E0310
+ STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE NTStatus = 0xC01E0311
+ STATUS_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET NTStatus = 0xC01E0312
+ STATUS_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY NTStatus = 0xC01E0313
+ STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET NTStatus = 0xC01E0314
+ STATUS_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET NTStatus = 0xC01E0315
+ STATUS_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET NTStatus = 0xC01E0316
+ STATUS_GRAPHICS_SOURCE_ALREADY_IN_SET NTStatus = 0xC01E0317
+ STATUS_GRAPHICS_TARGET_ALREADY_IN_SET NTStatus = 0xC01E0318
+ STATUS_GRAPHICS_INVALID_VIDPN_PRESENT_PATH NTStatus = 0xC01E0319
+ STATUS_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY NTStatus = 0xC01E031A
+ STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET NTStatus = 0xC01E031B
+ STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE NTStatus = 0xC01E031C
+ STATUS_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET NTStatus = 0xC01E031D
+ STATUS_GRAPHICS_NO_PREFERRED_MODE NTStatus = 0x401E031E
+ STATUS_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET NTStatus = 0xC01E031F
+ STATUS_GRAPHICS_STALE_MODESET NTStatus = 0xC01E0320
+ STATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET NTStatus = 0xC01E0321
+ STATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE NTStatus = 0xC01E0322
+ STATUS_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN NTStatus = 0xC01E0323
+ STATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE NTStatus = 0xC01E0324
+ STATUS_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION NTStatus = 0xC01E0325
+ STATUS_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES NTStatus = 0xC01E0326
+ STATUS_GRAPHICS_PATH_NOT_IN_TOPOLOGY NTStatus = 0xC01E0327
+ STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE NTStatus = 0xC01E0328
+ STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET NTStatus = 0xC01E0329
+ STATUS_GRAPHICS_INVALID_MONITORDESCRIPTORSET NTStatus = 0xC01E032A
+ STATUS_GRAPHICS_INVALID_MONITORDESCRIPTOR NTStatus = 0xC01E032B
+ STATUS_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET NTStatus = 0xC01E032C
+ STATUS_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET NTStatus = 0xC01E032D
+ STATUS_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE NTStatus = 0xC01E032E
+ STATUS_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE NTStatus = 0xC01E032F
+ STATUS_GRAPHICS_RESOURCES_NOT_RELATED NTStatus = 0xC01E0330
+ STATUS_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE NTStatus = 0xC01E0331
+ STATUS_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE NTStatus = 0xC01E0332
+ STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET NTStatus = 0xC01E0333
+ STATUS_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER NTStatus = 0xC01E0334
+ STATUS_GRAPHICS_NO_VIDPNMGR NTStatus = 0xC01E0335
+ STATUS_GRAPHICS_NO_ACTIVE_VIDPN NTStatus = 0xC01E0336
+ STATUS_GRAPHICS_STALE_VIDPN_TOPOLOGY NTStatus = 0xC01E0337
+ STATUS_GRAPHICS_MONITOR_NOT_CONNECTED NTStatus = 0xC01E0338
+ STATUS_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY NTStatus = 0xC01E0339
+ STATUS_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE NTStatus = 0xC01E033A
+ STATUS_GRAPHICS_INVALID_VISIBLEREGION_SIZE NTStatus = 0xC01E033B
+ STATUS_GRAPHICS_INVALID_STRIDE NTStatus = 0xC01E033C
+ STATUS_GRAPHICS_INVALID_PIXELFORMAT NTStatus = 0xC01E033D
+ STATUS_GRAPHICS_INVALID_COLORBASIS NTStatus = 0xC01E033E
+ STATUS_GRAPHICS_INVALID_PIXELVALUEACCESSMODE NTStatus = 0xC01E033F
+ STATUS_GRAPHICS_TARGET_NOT_IN_TOPOLOGY NTStatus = 0xC01E0340
+ STATUS_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT NTStatus = 0xC01E0341
+ STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE NTStatus = 0xC01E0342
+ STATUS_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN NTStatus = 0xC01E0343
+ STATUS_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL NTStatus = 0xC01E0344
+ STATUS_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION NTStatus = 0xC01E0345
+ STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED NTStatus = 0xC01E0346
+ STATUS_GRAPHICS_INVALID_GAMMA_RAMP NTStatus = 0xC01E0347
+ STATUS_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED NTStatus = 0xC01E0348
+ STATUS_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED NTStatus = 0xC01E0349
+ STATUS_GRAPHICS_MODE_NOT_IN_MODESET NTStatus = 0xC01E034A
+ STATUS_GRAPHICS_DATASET_IS_EMPTY NTStatus = 0x401E034B
+ STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET NTStatus = 0x401E034C
+ STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON NTStatus = 0xC01E034D
+ STATUS_GRAPHICS_INVALID_PATH_CONTENT_TYPE NTStatus = 0xC01E034E
+ STATUS_GRAPHICS_INVALID_COPYPROTECTION_TYPE NTStatus = 0xC01E034F
+ STATUS_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS NTStatus = 0xC01E0350
+ STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED NTStatus = 0x401E0351
+ STATUS_GRAPHICS_INVALID_SCANLINE_ORDERING NTStatus = 0xC01E0352
+ STATUS_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED NTStatus = 0xC01E0353
+ STATUS_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS NTStatus = 0xC01E0354
+ STATUS_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT NTStatus = 0xC01E0355
+ STATUS_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM NTStatus = 0xC01E0356
+ STATUS_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN NTStatus = 0xC01E0357
+ STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT NTStatus = 0xC01E0358
+ STATUS_GRAPHICS_MAX_NUM_PATHS_REACHED NTStatus = 0xC01E0359
+ STATUS_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION NTStatus = 0xC01E035A
+ STATUS_GRAPHICS_INVALID_CLIENT_TYPE NTStatus = 0xC01E035B
+ STATUS_GRAPHICS_CLIENTVIDPN_NOT_SET NTStatus = 0xC01E035C
+ STATUS_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED NTStatus = 0xC01E0400
+ STATUS_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED NTStatus = 0xC01E0401
+ STATUS_GRAPHICS_UNKNOWN_CHILD_STATUS NTStatus = 0x401E042F
+ STATUS_GRAPHICS_NOT_A_LINKED_ADAPTER NTStatus = 0xC01E0430
+ STATUS_GRAPHICS_LEADLINK_NOT_ENUMERATED NTStatus = 0xC01E0431
+ STATUS_GRAPHICS_CHAINLINKS_NOT_ENUMERATED NTStatus = 0xC01E0432
+ STATUS_GRAPHICS_ADAPTER_CHAIN_NOT_READY NTStatus = 0xC01E0433
+ STATUS_GRAPHICS_CHAINLINKS_NOT_STARTED NTStatus = 0xC01E0434
+ STATUS_GRAPHICS_CHAINLINKS_NOT_POWERED_ON NTStatus = 0xC01E0435
+ STATUS_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE NTStatus = 0xC01E0436
+ STATUS_GRAPHICS_LEADLINK_START_DEFERRED NTStatus = 0x401E0437
+ STATUS_GRAPHICS_NOT_POST_DEVICE_DRIVER NTStatus = 0xC01E0438
+ STATUS_GRAPHICS_POLLING_TOO_FREQUENTLY NTStatus = 0x401E0439
+ STATUS_GRAPHICS_START_DEFERRED NTStatus = 0x401E043A
+ STATUS_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED NTStatus = 0xC01E043B
+ STATUS_GRAPHICS_DEPENDABLE_CHILD_STATUS NTStatus = 0x401E043C
+ STATUS_GRAPHICS_OPM_NOT_SUPPORTED NTStatus = 0xC01E0500
+ STATUS_GRAPHICS_COPP_NOT_SUPPORTED NTStatus = 0xC01E0501
+ STATUS_GRAPHICS_UAB_NOT_SUPPORTED NTStatus = 0xC01E0502
+ STATUS_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS NTStatus = 0xC01E0503
+ STATUS_GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST NTStatus = 0xC01E0505
+ STATUS_GRAPHICS_OPM_INTERNAL_ERROR NTStatus = 0xC01E050B
+ STATUS_GRAPHICS_OPM_INVALID_HANDLE NTStatus = 0xC01E050C
+ STATUS_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH NTStatus = 0xC01E050E
+ STATUS_GRAPHICS_OPM_SPANNING_MODE_ENABLED NTStatus = 0xC01E050F
+ STATUS_GRAPHICS_OPM_THEATER_MODE_ENABLED NTStatus = 0xC01E0510
+ STATUS_GRAPHICS_PVP_HFS_FAILED NTStatus = 0xC01E0511
+ STATUS_GRAPHICS_OPM_INVALID_SRM NTStatus = 0xC01E0512
+ STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP NTStatus = 0xC01E0513
+ STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP NTStatus = 0xC01E0514
+ STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA NTStatus = 0xC01E0515
+ STATUS_GRAPHICS_OPM_HDCP_SRM_NEVER_SET NTStatus = 0xC01E0516
+ STATUS_GRAPHICS_OPM_RESOLUTION_TOO_HIGH NTStatus = 0xC01E0517
+ STATUS_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE NTStatus = 0xC01E0518
+ STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS NTStatus = 0xC01E051A
+ STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS NTStatus = 0xC01E051C
+ STATUS_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST NTStatus = 0xC01E051D
+ STATUS_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR NTStatus = 0xC01E051E
+ STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS NTStatus = 0xC01E051F
+ STATUS_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED NTStatus = 0xC01E0520
+ STATUS_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST NTStatus = 0xC01E0521
+ STATUS_GRAPHICS_I2C_NOT_SUPPORTED NTStatus = 0xC01E0580
+ STATUS_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST NTStatus = 0xC01E0581
+ STATUS_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA NTStatus = 0xC01E0582
+ STATUS_GRAPHICS_I2C_ERROR_RECEIVING_DATA NTStatus = 0xC01E0583
+ STATUS_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED NTStatus = 0xC01E0584
+ STATUS_GRAPHICS_DDCCI_INVALID_DATA NTStatus = 0xC01E0585
+ STATUS_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE NTStatus = 0xC01E0586
+ STATUS_GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING NTStatus = 0xC01E0587
+ STATUS_GRAPHICS_MCA_INTERNAL_ERROR NTStatus = 0xC01E0588
+ STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND NTStatus = 0xC01E0589
+ STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH NTStatus = 0xC01E058A
+ STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM NTStatus = 0xC01E058B
+ STATUS_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE NTStatus = 0xC01E058C
+ STATUS_GRAPHICS_MONITOR_NO_LONGER_EXISTS NTStatus = 0xC01E058D
+ STATUS_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED NTStatus = 0xC01E05E0
+ STATUS_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME NTStatus = 0xC01E05E1
+ STATUS_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP NTStatus = 0xC01E05E2
+ STATUS_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED NTStatus = 0xC01E05E3
+ STATUS_GRAPHICS_INVALID_POINTER NTStatus = 0xC01E05E4
+ STATUS_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE NTStatus = 0xC01E05E5
+ STATUS_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL NTStatus = 0xC01E05E6
+ STATUS_GRAPHICS_INTERNAL_ERROR NTStatus = 0xC01E05E7
+ STATUS_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS NTStatus = 0xC01E05E8
+ STATUS_FVE_LOCKED_VOLUME NTStatus = 0xC0210000
+ STATUS_FVE_NOT_ENCRYPTED NTStatus = 0xC0210001
+ STATUS_FVE_BAD_INFORMATION NTStatus = 0xC0210002
+ STATUS_FVE_TOO_SMALL NTStatus = 0xC0210003
+ STATUS_FVE_FAILED_WRONG_FS NTStatus = 0xC0210004
+ STATUS_FVE_BAD_PARTITION_SIZE NTStatus = 0xC0210005
+ STATUS_FVE_FS_NOT_EXTENDED NTStatus = 0xC0210006
+ STATUS_FVE_FS_MOUNTED NTStatus = 0xC0210007
+ STATUS_FVE_NO_LICENSE NTStatus = 0xC0210008
+ STATUS_FVE_ACTION_NOT_ALLOWED NTStatus = 0xC0210009
+ STATUS_FVE_BAD_DATA NTStatus = 0xC021000A
+ STATUS_FVE_VOLUME_NOT_BOUND NTStatus = 0xC021000B
+ STATUS_FVE_NOT_DATA_VOLUME NTStatus = 0xC021000C
+ STATUS_FVE_CONV_READ_ERROR NTStatus = 0xC021000D
+ STATUS_FVE_CONV_WRITE_ERROR NTStatus = 0xC021000E
+ STATUS_FVE_OVERLAPPED_UPDATE NTStatus = 0xC021000F
+ STATUS_FVE_FAILED_SECTOR_SIZE NTStatus = 0xC0210010
+ STATUS_FVE_FAILED_AUTHENTICATION NTStatus = 0xC0210011
+ STATUS_FVE_NOT_OS_VOLUME NTStatus = 0xC0210012
+ STATUS_FVE_KEYFILE_NOT_FOUND NTStatus = 0xC0210013
+ STATUS_FVE_KEYFILE_INVALID NTStatus = 0xC0210014
+ STATUS_FVE_KEYFILE_NO_VMK NTStatus = 0xC0210015
+ STATUS_FVE_TPM_DISABLED NTStatus = 0xC0210016
+ STATUS_FVE_TPM_SRK_AUTH_NOT_ZERO NTStatus = 0xC0210017
+ STATUS_FVE_TPM_INVALID_PCR NTStatus = 0xC0210018
+ STATUS_FVE_TPM_NO_VMK NTStatus = 0xC0210019
+ STATUS_FVE_PIN_INVALID NTStatus = 0xC021001A
+ STATUS_FVE_AUTH_INVALID_APPLICATION NTStatus = 0xC021001B
+ STATUS_FVE_AUTH_INVALID_CONFIG NTStatus = 0xC021001C
+ STATUS_FVE_DEBUGGER_ENABLED NTStatus = 0xC021001D
+ STATUS_FVE_DRY_RUN_FAILED NTStatus = 0xC021001E
+ STATUS_FVE_BAD_METADATA_POINTER NTStatus = 0xC021001F
+ STATUS_FVE_OLD_METADATA_COPY NTStatus = 0xC0210020
+ STATUS_FVE_REBOOT_REQUIRED NTStatus = 0xC0210021
+ STATUS_FVE_RAW_ACCESS NTStatus = 0xC0210022
+ STATUS_FVE_RAW_BLOCKED NTStatus = 0xC0210023
+ STATUS_FVE_NO_AUTOUNLOCK_MASTER_KEY NTStatus = 0xC0210024
+ STATUS_FVE_MOR_FAILED NTStatus = 0xC0210025
+ STATUS_FVE_NO_FEATURE_LICENSE NTStatus = 0xC0210026
+ STATUS_FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED NTStatus = 0xC0210027
+ STATUS_FVE_CONV_RECOVERY_FAILED NTStatus = 0xC0210028
+ STATUS_FVE_VIRTUALIZED_SPACE_TOO_BIG NTStatus = 0xC0210029
+ STATUS_FVE_INVALID_DATUM_TYPE NTStatus = 0xC021002A
+ STATUS_FVE_VOLUME_TOO_SMALL NTStatus = 0xC0210030
+ STATUS_FVE_ENH_PIN_INVALID NTStatus = 0xC0210031
+ STATUS_FVE_FULL_ENCRYPTION_NOT_ALLOWED_ON_TP_STORAGE NTStatus = 0xC0210032
+ STATUS_FVE_WIPE_NOT_ALLOWED_ON_TP_STORAGE NTStatus = 0xC0210033
+ STATUS_FVE_NOT_ALLOWED_ON_CSV_STACK NTStatus = 0xC0210034
+ STATUS_FVE_NOT_ALLOWED_ON_CLUSTER NTStatus = 0xC0210035
+ STATUS_FVE_NOT_ALLOWED_TO_UPGRADE_WHILE_CONVERTING NTStatus = 0xC0210036
+ STATUS_FVE_WIPE_CANCEL_NOT_APPLICABLE NTStatus = 0xC0210037
+ STATUS_FVE_EDRIVE_DRY_RUN_FAILED NTStatus = 0xC0210038
+ STATUS_FVE_SECUREBOOT_DISABLED NTStatus = 0xC0210039
+ STATUS_FVE_SECUREBOOT_CONFIG_CHANGE NTStatus = 0xC021003A
+ STATUS_FVE_DEVICE_LOCKEDOUT NTStatus = 0xC021003B
+ STATUS_FVE_VOLUME_EXTEND_PREVENTS_EOW_DECRYPT NTStatus = 0xC021003C
+ STATUS_FVE_NOT_DE_VOLUME NTStatus = 0xC021003D
+ STATUS_FVE_PROTECTION_DISABLED NTStatus = 0xC021003E
+ STATUS_FVE_PROTECTION_CANNOT_BE_DISABLED NTStatus = 0xC021003F
+ STATUS_FVE_OSV_KSR_NOT_ALLOWED NTStatus = 0xC0210040
+ STATUS_FWP_CALLOUT_NOT_FOUND NTStatus = 0xC0220001
+ STATUS_FWP_CONDITION_NOT_FOUND NTStatus = 0xC0220002
+ STATUS_FWP_FILTER_NOT_FOUND NTStatus = 0xC0220003
+ STATUS_FWP_LAYER_NOT_FOUND NTStatus = 0xC0220004
+ STATUS_FWP_PROVIDER_NOT_FOUND NTStatus = 0xC0220005
+ STATUS_FWP_PROVIDER_CONTEXT_NOT_FOUND NTStatus = 0xC0220006
+ STATUS_FWP_SUBLAYER_NOT_FOUND NTStatus = 0xC0220007
+ STATUS_FWP_NOT_FOUND NTStatus = 0xC0220008
+ STATUS_FWP_ALREADY_EXISTS NTStatus = 0xC0220009
+ STATUS_FWP_IN_USE NTStatus = 0xC022000A
+ STATUS_FWP_DYNAMIC_SESSION_IN_PROGRESS NTStatus = 0xC022000B
+ STATUS_FWP_WRONG_SESSION NTStatus = 0xC022000C
+ STATUS_FWP_NO_TXN_IN_PROGRESS NTStatus = 0xC022000D
+ STATUS_FWP_TXN_IN_PROGRESS NTStatus = 0xC022000E
+ STATUS_FWP_TXN_ABORTED NTStatus = 0xC022000F
+ STATUS_FWP_SESSION_ABORTED NTStatus = 0xC0220010
+ STATUS_FWP_INCOMPATIBLE_TXN NTStatus = 0xC0220011
+ STATUS_FWP_TIMEOUT NTStatus = 0xC0220012
+ STATUS_FWP_NET_EVENTS_DISABLED NTStatus = 0xC0220013
+ STATUS_FWP_INCOMPATIBLE_LAYER NTStatus = 0xC0220014
+ STATUS_FWP_KM_CLIENTS_ONLY NTStatus = 0xC0220015
+ STATUS_FWP_LIFETIME_MISMATCH NTStatus = 0xC0220016
+ STATUS_FWP_BUILTIN_OBJECT NTStatus = 0xC0220017
+ STATUS_FWP_TOO_MANY_CALLOUTS NTStatus = 0xC0220018
+ STATUS_FWP_NOTIFICATION_DROPPED NTStatus = 0xC0220019
+ STATUS_FWP_TRAFFIC_MISMATCH NTStatus = 0xC022001A
+ STATUS_FWP_INCOMPATIBLE_SA_STATE NTStatus = 0xC022001B
+ STATUS_FWP_NULL_POINTER NTStatus = 0xC022001C
+ STATUS_FWP_INVALID_ENUMERATOR NTStatus = 0xC022001D
+ STATUS_FWP_INVALID_FLAGS NTStatus = 0xC022001E
+ STATUS_FWP_INVALID_NET_MASK NTStatus = 0xC022001F
+ STATUS_FWP_INVALID_RANGE NTStatus = 0xC0220020
+ STATUS_FWP_INVALID_INTERVAL NTStatus = 0xC0220021
+ STATUS_FWP_ZERO_LENGTH_ARRAY NTStatus = 0xC0220022
+ STATUS_FWP_NULL_DISPLAY_NAME NTStatus = 0xC0220023
+ STATUS_FWP_INVALID_ACTION_TYPE NTStatus = 0xC0220024
+ STATUS_FWP_INVALID_WEIGHT NTStatus = 0xC0220025
+ STATUS_FWP_MATCH_TYPE_MISMATCH NTStatus = 0xC0220026
+ STATUS_FWP_TYPE_MISMATCH NTStatus = 0xC0220027
+ STATUS_FWP_OUT_OF_BOUNDS NTStatus = 0xC0220028
+ STATUS_FWP_RESERVED NTStatus = 0xC0220029
+ STATUS_FWP_DUPLICATE_CONDITION NTStatus = 0xC022002A
+ STATUS_FWP_DUPLICATE_KEYMOD NTStatus = 0xC022002B
+ STATUS_FWP_ACTION_INCOMPATIBLE_WITH_LAYER NTStatus = 0xC022002C
+ STATUS_FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER NTStatus = 0xC022002D
+ STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER NTStatus = 0xC022002E
+ STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT NTStatus = 0xC022002F
+ STATUS_FWP_INCOMPATIBLE_AUTH_METHOD NTStatus = 0xC0220030
+ STATUS_FWP_INCOMPATIBLE_DH_GROUP NTStatus = 0xC0220031
+ STATUS_FWP_EM_NOT_SUPPORTED NTStatus = 0xC0220032
+ STATUS_FWP_NEVER_MATCH NTStatus = 0xC0220033
+ STATUS_FWP_PROVIDER_CONTEXT_MISMATCH NTStatus = 0xC0220034
+ STATUS_FWP_INVALID_PARAMETER NTStatus = 0xC0220035
+ STATUS_FWP_TOO_MANY_SUBLAYERS NTStatus = 0xC0220036
+ STATUS_FWP_CALLOUT_NOTIFICATION_FAILED NTStatus = 0xC0220037
+ STATUS_FWP_INVALID_AUTH_TRANSFORM NTStatus = 0xC0220038
+ STATUS_FWP_INVALID_CIPHER_TRANSFORM NTStatus = 0xC0220039
+ STATUS_FWP_INCOMPATIBLE_CIPHER_TRANSFORM NTStatus = 0xC022003A
+ STATUS_FWP_INVALID_TRANSFORM_COMBINATION NTStatus = 0xC022003B
+ STATUS_FWP_DUPLICATE_AUTH_METHOD NTStatus = 0xC022003C
+ STATUS_FWP_INVALID_TUNNEL_ENDPOINT NTStatus = 0xC022003D
+ STATUS_FWP_L2_DRIVER_NOT_READY NTStatus = 0xC022003E
+ STATUS_FWP_KEY_DICTATOR_ALREADY_REGISTERED NTStatus = 0xC022003F
+ STATUS_FWP_KEY_DICTATION_INVALID_KEYING_MATERIAL NTStatus = 0xC0220040
+ STATUS_FWP_CONNECTIONS_DISABLED NTStatus = 0xC0220041
+ STATUS_FWP_INVALID_DNS_NAME NTStatus = 0xC0220042
+ STATUS_FWP_STILL_ON NTStatus = 0xC0220043
+ STATUS_FWP_IKEEXT_NOT_RUNNING NTStatus = 0xC0220044
+ STATUS_FWP_TCPIP_NOT_READY NTStatus = 0xC0220100
+ STATUS_FWP_INJECT_HANDLE_CLOSING NTStatus = 0xC0220101
+ STATUS_FWP_INJECT_HANDLE_STALE NTStatus = 0xC0220102
+ STATUS_FWP_CANNOT_PEND NTStatus = 0xC0220103
+ STATUS_FWP_DROP_NOICMP NTStatus = 0xC0220104
+ STATUS_NDIS_CLOSING NTStatus = 0xC0230002
+ STATUS_NDIS_BAD_VERSION NTStatus = 0xC0230004
+ STATUS_NDIS_BAD_CHARACTERISTICS NTStatus = 0xC0230005
+ STATUS_NDIS_ADAPTER_NOT_FOUND NTStatus = 0xC0230006
+ STATUS_NDIS_OPEN_FAILED NTStatus = 0xC0230007
+ STATUS_NDIS_DEVICE_FAILED NTStatus = 0xC0230008
+ STATUS_NDIS_MULTICAST_FULL NTStatus = 0xC0230009
+ STATUS_NDIS_MULTICAST_EXISTS NTStatus = 0xC023000A
+ STATUS_NDIS_MULTICAST_NOT_FOUND NTStatus = 0xC023000B
+ STATUS_NDIS_REQUEST_ABORTED NTStatus = 0xC023000C
+ STATUS_NDIS_RESET_IN_PROGRESS NTStatus = 0xC023000D
+ STATUS_NDIS_NOT_SUPPORTED NTStatus = 0xC02300BB
+ STATUS_NDIS_INVALID_PACKET NTStatus = 0xC023000F
+ STATUS_NDIS_ADAPTER_NOT_READY NTStatus = 0xC0230011
+ STATUS_NDIS_INVALID_LENGTH NTStatus = 0xC0230014
+ STATUS_NDIS_INVALID_DATA NTStatus = 0xC0230015
+ STATUS_NDIS_BUFFER_TOO_SHORT NTStatus = 0xC0230016
+ STATUS_NDIS_INVALID_OID NTStatus = 0xC0230017
+ STATUS_NDIS_ADAPTER_REMOVED NTStatus = 0xC0230018
+ STATUS_NDIS_UNSUPPORTED_MEDIA NTStatus = 0xC0230019
+ STATUS_NDIS_GROUP_ADDRESS_IN_USE NTStatus = 0xC023001A
+ STATUS_NDIS_FILE_NOT_FOUND NTStatus = 0xC023001B
+ STATUS_NDIS_ERROR_READING_FILE NTStatus = 0xC023001C
+ STATUS_NDIS_ALREADY_MAPPED NTStatus = 0xC023001D
+ STATUS_NDIS_RESOURCE_CONFLICT NTStatus = 0xC023001E
+ STATUS_NDIS_MEDIA_DISCONNECTED NTStatus = 0xC023001F
+ STATUS_NDIS_INVALID_ADDRESS NTStatus = 0xC0230022
+ STATUS_NDIS_INVALID_DEVICE_REQUEST NTStatus = 0xC0230010
+ STATUS_NDIS_PAUSED NTStatus = 0xC023002A
+ STATUS_NDIS_INTERFACE_NOT_FOUND NTStatus = 0xC023002B
+ STATUS_NDIS_UNSUPPORTED_REVISION NTStatus = 0xC023002C
+ STATUS_NDIS_INVALID_PORT NTStatus = 0xC023002D
+ STATUS_NDIS_INVALID_PORT_STATE NTStatus = 0xC023002E
+ STATUS_NDIS_LOW_POWER_STATE NTStatus = 0xC023002F
+ STATUS_NDIS_REINIT_REQUIRED NTStatus = 0xC0230030
+ STATUS_NDIS_NO_QUEUES NTStatus = 0xC0230031
+ STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED NTStatus = 0xC0232000
+ STATUS_NDIS_DOT11_MEDIA_IN_USE NTStatus = 0xC0232001
+ STATUS_NDIS_DOT11_POWER_STATE_INVALID NTStatus = 0xC0232002
+ STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL NTStatus = 0xC0232003
+ STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL NTStatus = 0xC0232004
+ STATUS_NDIS_DOT11_AP_CHANNEL_CURRENTLY_NOT_AVAILABLE NTStatus = 0xC0232005
+ STATUS_NDIS_DOT11_AP_BAND_CURRENTLY_NOT_AVAILABLE NTStatus = 0xC0232006
+ STATUS_NDIS_DOT11_AP_CHANNEL_NOT_ALLOWED NTStatus = 0xC0232007
+ STATUS_NDIS_DOT11_AP_BAND_NOT_ALLOWED NTStatus = 0xC0232008
+ STATUS_NDIS_INDICATION_REQUIRED NTStatus = 0x40230001
+ STATUS_NDIS_OFFLOAD_POLICY NTStatus = 0xC023100F
+ STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED NTStatus = 0xC0231012
+ STATUS_NDIS_OFFLOAD_PATH_REJECTED NTStatus = 0xC0231013
+ STATUS_TPM_ERROR_MASK NTStatus = 0xC0290000
+ STATUS_TPM_AUTHFAIL NTStatus = 0xC0290001
+ STATUS_TPM_BADINDEX NTStatus = 0xC0290002
+ STATUS_TPM_BAD_PARAMETER NTStatus = 0xC0290003
+ STATUS_TPM_AUDITFAILURE NTStatus = 0xC0290004
+ STATUS_TPM_CLEAR_DISABLED NTStatus = 0xC0290005
+ STATUS_TPM_DEACTIVATED NTStatus = 0xC0290006
+ STATUS_TPM_DISABLED NTStatus = 0xC0290007
+ STATUS_TPM_DISABLED_CMD NTStatus = 0xC0290008
+ STATUS_TPM_FAIL NTStatus = 0xC0290009
+ STATUS_TPM_BAD_ORDINAL NTStatus = 0xC029000A
+ STATUS_TPM_INSTALL_DISABLED NTStatus = 0xC029000B
+ STATUS_TPM_INVALID_KEYHANDLE NTStatus = 0xC029000C
+ STATUS_TPM_KEYNOTFOUND NTStatus = 0xC029000D
+ STATUS_TPM_INAPPROPRIATE_ENC NTStatus = 0xC029000E
+ STATUS_TPM_MIGRATEFAIL NTStatus = 0xC029000F
+ STATUS_TPM_INVALID_PCR_INFO NTStatus = 0xC0290010
+ STATUS_TPM_NOSPACE NTStatus = 0xC0290011
+ STATUS_TPM_NOSRK NTStatus = 0xC0290012
+ STATUS_TPM_NOTSEALED_BLOB NTStatus = 0xC0290013
+ STATUS_TPM_OWNER_SET NTStatus = 0xC0290014
+ STATUS_TPM_RESOURCES NTStatus = 0xC0290015
+ STATUS_TPM_SHORTRANDOM NTStatus = 0xC0290016
+ STATUS_TPM_SIZE NTStatus = 0xC0290017
+ STATUS_TPM_WRONGPCRVAL NTStatus = 0xC0290018
+ STATUS_TPM_BAD_PARAM_SIZE NTStatus = 0xC0290019
+ STATUS_TPM_SHA_THREAD NTStatus = 0xC029001A
+ STATUS_TPM_SHA_ERROR NTStatus = 0xC029001B
+ STATUS_TPM_FAILEDSELFTEST NTStatus = 0xC029001C
+ STATUS_TPM_AUTH2FAIL NTStatus = 0xC029001D
+ STATUS_TPM_BADTAG NTStatus = 0xC029001E
+ STATUS_TPM_IOERROR NTStatus = 0xC029001F
+ STATUS_TPM_ENCRYPT_ERROR NTStatus = 0xC0290020
+ STATUS_TPM_DECRYPT_ERROR NTStatus = 0xC0290021
+ STATUS_TPM_INVALID_AUTHHANDLE NTStatus = 0xC0290022
+ STATUS_TPM_NO_ENDORSEMENT NTStatus = 0xC0290023
+ STATUS_TPM_INVALID_KEYUSAGE NTStatus = 0xC0290024
+ STATUS_TPM_WRONG_ENTITYTYPE NTStatus = 0xC0290025
+ STATUS_TPM_INVALID_POSTINIT NTStatus = 0xC0290026
+ STATUS_TPM_INAPPROPRIATE_SIG NTStatus = 0xC0290027
+ STATUS_TPM_BAD_KEY_PROPERTY NTStatus = 0xC0290028
+ STATUS_TPM_BAD_MIGRATION NTStatus = 0xC0290029
+ STATUS_TPM_BAD_SCHEME NTStatus = 0xC029002A
+ STATUS_TPM_BAD_DATASIZE NTStatus = 0xC029002B
+ STATUS_TPM_BAD_MODE NTStatus = 0xC029002C
+ STATUS_TPM_BAD_PRESENCE NTStatus = 0xC029002D
+ STATUS_TPM_BAD_VERSION NTStatus = 0xC029002E
+ STATUS_TPM_NO_WRAP_TRANSPORT NTStatus = 0xC029002F
+ STATUS_TPM_AUDITFAIL_UNSUCCESSFUL NTStatus = 0xC0290030
+ STATUS_TPM_AUDITFAIL_SUCCESSFUL NTStatus = 0xC0290031
+ STATUS_TPM_NOTRESETABLE NTStatus = 0xC0290032
+ STATUS_TPM_NOTLOCAL NTStatus = 0xC0290033
+ STATUS_TPM_BAD_TYPE NTStatus = 0xC0290034
+ STATUS_TPM_INVALID_RESOURCE NTStatus = 0xC0290035
+ STATUS_TPM_NOTFIPS NTStatus = 0xC0290036
+ STATUS_TPM_INVALID_FAMILY NTStatus = 0xC0290037
+ STATUS_TPM_NO_NV_PERMISSION NTStatus = 0xC0290038
+ STATUS_TPM_REQUIRES_SIGN NTStatus = 0xC0290039
+ STATUS_TPM_KEY_NOTSUPPORTED NTStatus = 0xC029003A
+ STATUS_TPM_AUTH_CONFLICT NTStatus = 0xC029003B
+ STATUS_TPM_AREA_LOCKED NTStatus = 0xC029003C
+ STATUS_TPM_BAD_LOCALITY NTStatus = 0xC029003D
+ STATUS_TPM_READ_ONLY NTStatus = 0xC029003E
+ STATUS_TPM_PER_NOWRITE NTStatus = 0xC029003F
+ STATUS_TPM_FAMILYCOUNT NTStatus = 0xC0290040
+ STATUS_TPM_WRITE_LOCKED NTStatus = 0xC0290041
+ STATUS_TPM_BAD_ATTRIBUTES NTStatus = 0xC0290042
+ STATUS_TPM_INVALID_STRUCTURE NTStatus = 0xC0290043
+ STATUS_TPM_KEY_OWNER_CONTROL NTStatus = 0xC0290044
+ STATUS_TPM_BAD_COUNTER NTStatus = 0xC0290045
+ STATUS_TPM_NOT_FULLWRITE NTStatus = 0xC0290046
+ STATUS_TPM_CONTEXT_GAP NTStatus = 0xC0290047
+ STATUS_TPM_MAXNVWRITES NTStatus = 0xC0290048
+ STATUS_TPM_NOOPERATOR NTStatus = 0xC0290049
+ STATUS_TPM_RESOURCEMISSING NTStatus = 0xC029004A
+ STATUS_TPM_DELEGATE_LOCK NTStatus = 0xC029004B
+ STATUS_TPM_DELEGATE_FAMILY NTStatus = 0xC029004C
+ STATUS_TPM_DELEGATE_ADMIN NTStatus = 0xC029004D
+ STATUS_TPM_TRANSPORT_NOTEXCLUSIVE NTStatus = 0xC029004E
+ STATUS_TPM_OWNER_CONTROL NTStatus = 0xC029004F
+ STATUS_TPM_DAA_RESOURCES NTStatus = 0xC0290050
+ STATUS_TPM_DAA_INPUT_DATA0 NTStatus = 0xC0290051
+ STATUS_TPM_DAA_INPUT_DATA1 NTStatus = 0xC0290052
+ STATUS_TPM_DAA_ISSUER_SETTINGS NTStatus = 0xC0290053
+ STATUS_TPM_DAA_TPM_SETTINGS NTStatus = 0xC0290054
+ STATUS_TPM_DAA_STAGE NTStatus = 0xC0290055
+ STATUS_TPM_DAA_ISSUER_VALIDITY NTStatus = 0xC0290056
+ STATUS_TPM_DAA_WRONG_W NTStatus = 0xC0290057
+ STATUS_TPM_BAD_HANDLE NTStatus = 0xC0290058
+ STATUS_TPM_BAD_DELEGATE NTStatus = 0xC0290059
+ STATUS_TPM_BADCONTEXT NTStatus = 0xC029005A
+ STATUS_TPM_TOOMANYCONTEXTS NTStatus = 0xC029005B
+ STATUS_TPM_MA_TICKET_SIGNATURE NTStatus = 0xC029005C
+ STATUS_TPM_MA_DESTINATION NTStatus = 0xC029005D
+ STATUS_TPM_MA_SOURCE NTStatus = 0xC029005E
+ STATUS_TPM_MA_AUTHORITY NTStatus = 0xC029005F
+ STATUS_TPM_PERMANENTEK NTStatus = 0xC0290061
+ STATUS_TPM_BAD_SIGNATURE NTStatus = 0xC0290062
+ STATUS_TPM_NOCONTEXTSPACE NTStatus = 0xC0290063
+ STATUS_TPM_20_E_ASYMMETRIC NTStatus = 0xC0290081
+ STATUS_TPM_20_E_ATTRIBUTES NTStatus = 0xC0290082
+ STATUS_TPM_20_E_HASH NTStatus = 0xC0290083
+ STATUS_TPM_20_E_VALUE NTStatus = 0xC0290084
+ STATUS_TPM_20_E_HIERARCHY NTStatus = 0xC0290085
+ STATUS_TPM_20_E_KEY_SIZE NTStatus = 0xC0290087
+ STATUS_TPM_20_E_MGF NTStatus = 0xC0290088
+ STATUS_TPM_20_E_MODE NTStatus = 0xC0290089
+ STATUS_TPM_20_E_TYPE NTStatus = 0xC029008A
+ STATUS_TPM_20_E_HANDLE NTStatus = 0xC029008B
+ STATUS_TPM_20_E_KDF NTStatus = 0xC029008C
+ STATUS_TPM_20_E_RANGE NTStatus = 0xC029008D
+ STATUS_TPM_20_E_AUTH_FAIL NTStatus = 0xC029008E
+ STATUS_TPM_20_E_NONCE NTStatus = 0xC029008F
+ STATUS_TPM_20_E_PP NTStatus = 0xC0290090
+ STATUS_TPM_20_E_SCHEME NTStatus = 0xC0290092
+ STATUS_TPM_20_E_SIZE NTStatus = 0xC0290095
+ STATUS_TPM_20_E_SYMMETRIC NTStatus = 0xC0290096
+ STATUS_TPM_20_E_TAG NTStatus = 0xC0290097
+ STATUS_TPM_20_E_SELECTOR NTStatus = 0xC0290098
+ STATUS_TPM_20_E_INSUFFICIENT NTStatus = 0xC029009A
+ STATUS_TPM_20_E_SIGNATURE NTStatus = 0xC029009B
+ STATUS_TPM_20_E_KEY NTStatus = 0xC029009C
+ STATUS_TPM_20_E_POLICY_FAIL NTStatus = 0xC029009D
+ STATUS_TPM_20_E_INTEGRITY NTStatus = 0xC029009F
+ STATUS_TPM_20_E_TICKET NTStatus = 0xC02900A0
+ STATUS_TPM_20_E_RESERVED_BITS NTStatus = 0xC02900A1
+ STATUS_TPM_20_E_BAD_AUTH NTStatus = 0xC02900A2
+ STATUS_TPM_20_E_EXPIRED NTStatus = 0xC02900A3
+ STATUS_TPM_20_E_POLICY_CC NTStatus = 0xC02900A4
+ STATUS_TPM_20_E_BINDING NTStatus = 0xC02900A5
+ STATUS_TPM_20_E_CURVE NTStatus = 0xC02900A6
+ STATUS_TPM_20_E_ECC_POINT NTStatus = 0xC02900A7
+ STATUS_TPM_20_E_INITIALIZE NTStatus = 0xC0290100
+ STATUS_TPM_20_E_FAILURE NTStatus = 0xC0290101
+ STATUS_TPM_20_E_SEQUENCE NTStatus = 0xC0290103
+ STATUS_TPM_20_E_PRIVATE NTStatus = 0xC029010B
+ STATUS_TPM_20_E_HMAC NTStatus = 0xC0290119
+ STATUS_TPM_20_E_DISABLED NTStatus = 0xC0290120
+ STATUS_TPM_20_E_EXCLUSIVE NTStatus = 0xC0290121
+ STATUS_TPM_20_E_ECC_CURVE NTStatus = 0xC0290123
+ STATUS_TPM_20_E_AUTH_TYPE NTStatus = 0xC0290124
+ STATUS_TPM_20_E_AUTH_MISSING NTStatus = 0xC0290125
+ STATUS_TPM_20_E_POLICY NTStatus = 0xC0290126
+ STATUS_TPM_20_E_PCR NTStatus = 0xC0290127
+ STATUS_TPM_20_E_PCR_CHANGED NTStatus = 0xC0290128
+ STATUS_TPM_20_E_UPGRADE NTStatus = 0xC029012D
+ STATUS_TPM_20_E_TOO_MANY_CONTEXTS NTStatus = 0xC029012E
+ STATUS_TPM_20_E_AUTH_UNAVAILABLE NTStatus = 0xC029012F
+ STATUS_TPM_20_E_REBOOT NTStatus = 0xC0290130
+ STATUS_TPM_20_E_UNBALANCED NTStatus = 0xC0290131
+ STATUS_TPM_20_E_COMMAND_SIZE NTStatus = 0xC0290142
+ STATUS_TPM_20_E_COMMAND_CODE NTStatus = 0xC0290143
+ STATUS_TPM_20_E_AUTHSIZE NTStatus = 0xC0290144
+ STATUS_TPM_20_E_AUTH_CONTEXT NTStatus = 0xC0290145
+ STATUS_TPM_20_E_NV_RANGE NTStatus = 0xC0290146
+ STATUS_TPM_20_E_NV_SIZE NTStatus = 0xC0290147
+ STATUS_TPM_20_E_NV_LOCKED NTStatus = 0xC0290148
+ STATUS_TPM_20_E_NV_AUTHORIZATION NTStatus = 0xC0290149
+ STATUS_TPM_20_E_NV_UNINITIALIZED NTStatus = 0xC029014A
+ STATUS_TPM_20_E_NV_SPACE NTStatus = 0xC029014B
+ STATUS_TPM_20_E_NV_DEFINED NTStatus = 0xC029014C
+ STATUS_TPM_20_E_BAD_CONTEXT NTStatus = 0xC0290150
+ STATUS_TPM_20_E_CPHASH NTStatus = 0xC0290151
+ STATUS_TPM_20_E_PARENT NTStatus = 0xC0290152
+ STATUS_TPM_20_E_NEEDS_TEST NTStatus = 0xC0290153
+ STATUS_TPM_20_E_NO_RESULT NTStatus = 0xC0290154
+ STATUS_TPM_20_E_SENSITIVE NTStatus = 0xC0290155
+ STATUS_TPM_COMMAND_BLOCKED NTStatus = 0xC0290400
+ STATUS_TPM_INVALID_HANDLE NTStatus = 0xC0290401
+ STATUS_TPM_DUPLICATE_VHANDLE NTStatus = 0xC0290402
+ STATUS_TPM_EMBEDDED_COMMAND_BLOCKED NTStatus = 0xC0290403
+ STATUS_TPM_EMBEDDED_COMMAND_UNSUPPORTED NTStatus = 0xC0290404
+ STATUS_TPM_RETRY NTStatus = 0xC0290800
+ STATUS_TPM_NEEDS_SELFTEST NTStatus = 0xC0290801
+ STATUS_TPM_DOING_SELFTEST NTStatus = 0xC0290802
+ STATUS_TPM_DEFEND_LOCK_RUNNING NTStatus = 0xC0290803
+ STATUS_TPM_COMMAND_CANCELED NTStatus = 0xC0291001
+ STATUS_TPM_TOO_MANY_CONTEXTS NTStatus = 0xC0291002
+ STATUS_TPM_NOT_FOUND NTStatus = 0xC0291003
+ STATUS_TPM_ACCESS_DENIED NTStatus = 0xC0291004
+ STATUS_TPM_INSUFFICIENT_BUFFER NTStatus = 0xC0291005
+ STATUS_TPM_PPI_FUNCTION_UNSUPPORTED NTStatus = 0xC0291006
+ STATUS_PCP_ERROR_MASK NTStatus = 0xC0292000
+ STATUS_PCP_DEVICE_NOT_READY NTStatus = 0xC0292001
+ STATUS_PCP_INVALID_HANDLE NTStatus = 0xC0292002
+ STATUS_PCP_INVALID_PARAMETER NTStatus = 0xC0292003
+ STATUS_PCP_FLAG_NOT_SUPPORTED NTStatus = 0xC0292004
+ STATUS_PCP_NOT_SUPPORTED NTStatus = 0xC0292005
+ STATUS_PCP_BUFFER_TOO_SMALL NTStatus = 0xC0292006
+ STATUS_PCP_INTERNAL_ERROR NTStatus = 0xC0292007
+ STATUS_PCP_AUTHENTICATION_FAILED NTStatus = 0xC0292008
+ STATUS_PCP_AUTHENTICATION_IGNORED NTStatus = 0xC0292009
+ STATUS_PCP_POLICY_NOT_FOUND NTStatus = 0xC029200A
+ STATUS_PCP_PROFILE_NOT_FOUND NTStatus = 0xC029200B
+ STATUS_PCP_VALIDATION_FAILED NTStatus = 0xC029200C
+ STATUS_PCP_DEVICE_NOT_FOUND NTStatus = 0xC029200D
+ STATUS_PCP_WRONG_PARENT NTStatus = 0xC029200E
+ STATUS_PCP_KEY_NOT_LOADED NTStatus = 0xC029200F
+ STATUS_PCP_NO_KEY_CERTIFICATION NTStatus = 0xC0292010
+ STATUS_PCP_KEY_NOT_FINALIZED NTStatus = 0xC0292011
+ STATUS_PCP_ATTESTATION_CHALLENGE_NOT_SET NTStatus = 0xC0292012
+ STATUS_PCP_NOT_PCR_BOUND NTStatus = 0xC0292013
+ STATUS_PCP_KEY_ALREADY_FINALIZED NTStatus = 0xC0292014
+ STATUS_PCP_KEY_USAGE_POLICY_NOT_SUPPORTED NTStatus = 0xC0292015
+ STATUS_PCP_KEY_USAGE_POLICY_INVALID NTStatus = 0xC0292016
+ STATUS_PCP_SOFT_KEY_ERROR NTStatus = 0xC0292017
+ STATUS_PCP_KEY_NOT_AUTHENTICATED NTStatus = 0xC0292018
+ STATUS_PCP_KEY_NOT_AIK NTStatus = 0xC0292019
+ STATUS_PCP_KEY_NOT_SIGNING_KEY NTStatus = 0xC029201A
+ STATUS_PCP_LOCKED_OUT NTStatus = 0xC029201B
+ STATUS_PCP_CLAIM_TYPE_NOT_SUPPORTED NTStatus = 0xC029201C
+ STATUS_PCP_TPM_VERSION_NOT_SUPPORTED NTStatus = 0xC029201D
+ STATUS_PCP_BUFFER_LENGTH_MISMATCH NTStatus = 0xC029201E
+ STATUS_PCP_IFX_RSA_KEY_CREATION_BLOCKED NTStatus = 0xC029201F
+ STATUS_PCP_TICKET_MISSING NTStatus = 0xC0292020
+ STATUS_PCP_RAW_POLICY_NOT_SUPPORTED NTStatus = 0xC0292021
+ STATUS_PCP_KEY_HANDLE_INVALIDATED NTStatus = 0xC0292022
+ STATUS_PCP_UNSUPPORTED_PSS_SALT NTStatus = 0x40292023
+ STATUS_RTPM_CONTEXT_CONTINUE NTStatus = 0x00293000
+ STATUS_RTPM_CONTEXT_COMPLETE NTStatus = 0x00293001
+ STATUS_RTPM_NO_RESULT NTStatus = 0xC0293002
+ STATUS_RTPM_PCR_READ_INCOMPLETE NTStatus = 0xC0293003
+ STATUS_RTPM_INVALID_CONTEXT NTStatus = 0xC0293004
+ STATUS_RTPM_UNSUPPORTED_CMD NTStatus = 0xC0293005
+ STATUS_TPM_ZERO_EXHAUST_ENABLED NTStatus = 0xC0294000
+ STATUS_HV_INVALID_HYPERCALL_CODE NTStatus = 0xC0350002
+ STATUS_HV_INVALID_HYPERCALL_INPUT NTStatus = 0xC0350003
+ STATUS_HV_INVALID_ALIGNMENT NTStatus = 0xC0350004
+ STATUS_HV_INVALID_PARAMETER NTStatus = 0xC0350005
+ STATUS_HV_ACCESS_DENIED NTStatus = 0xC0350006
+ STATUS_HV_INVALID_PARTITION_STATE NTStatus = 0xC0350007
+ STATUS_HV_OPERATION_DENIED NTStatus = 0xC0350008
+ STATUS_HV_UNKNOWN_PROPERTY NTStatus = 0xC0350009
+ STATUS_HV_PROPERTY_VALUE_OUT_OF_RANGE NTStatus = 0xC035000A
+ STATUS_HV_INSUFFICIENT_MEMORY NTStatus = 0xC035000B
+ STATUS_HV_PARTITION_TOO_DEEP NTStatus = 0xC035000C
+ STATUS_HV_INVALID_PARTITION_ID NTStatus = 0xC035000D
+ STATUS_HV_INVALID_VP_INDEX NTStatus = 0xC035000E
+ STATUS_HV_INVALID_PORT_ID NTStatus = 0xC0350011
+ STATUS_HV_INVALID_CONNECTION_ID NTStatus = 0xC0350012
+ STATUS_HV_INSUFFICIENT_BUFFERS NTStatus = 0xC0350013
+ STATUS_HV_NOT_ACKNOWLEDGED NTStatus = 0xC0350014
+ STATUS_HV_INVALID_VP_STATE NTStatus = 0xC0350015
+ STATUS_HV_ACKNOWLEDGED NTStatus = 0xC0350016
+ STATUS_HV_INVALID_SAVE_RESTORE_STATE NTStatus = 0xC0350017
+ STATUS_HV_INVALID_SYNIC_STATE NTStatus = 0xC0350018
+ STATUS_HV_OBJECT_IN_USE NTStatus = 0xC0350019
+ STATUS_HV_INVALID_PROXIMITY_DOMAIN_INFO NTStatus = 0xC035001A
+ STATUS_HV_NO_DATA NTStatus = 0xC035001B
+ STATUS_HV_INACTIVE NTStatus = 0xC035001C
+ STATUS_HV_NO_RESOURCES NTStatus = 0xC035001D
+ STATUS_HV_FEATURE_UNAVAILABLE NTStatus = 0xC035001E
+ STATUS_HV_INSUFFICIENT_BUFFER NTStatus = 0xC0350033
+ STATUS_HV_INSUFFICIENT_DEVICE_DOMAINS NTStatus = 0xC0350038
+ STATUS_HV_CPUID_FEATURE_VALIDATION_ERROR NTStatus = 0xC035003C
+ STATUS_HV_CPUID_XSAVE_FEATURE_VALIDATION_ERROR NTStatus = 0xC035003D
+ STATUS_HV_PROCESSOR_STARTUP_TIMEOUT NTStatus = 0xC035003E
+ STATUS_HV_SMX_ENABLED NTStatus = 0xC035003F
+ STATUS_HV_INVALID_LP_INDEX NTStatus = 0xC0350041
+ STATUS_HV_INVALID_REGISTER_VALUE NTStatus = 0xC0350050
+ STATUS_HV_INVALID_VTL_STATE NTStatus = 0xC0350051
+ STATUS_HV_NX_NOT_DETECTED NTStatus = 0xC0350055
+ STATUS_HV_INVALID_DEVICE_ID NTStatus = 0xC0350057
+ STATUS_HV_INVALID_DEVICE_STATE NTStatus = 0xC0350058
+ STATUS_HV_PENDING_PAGE_REQUESTS NTStatus = 0x00350059
+ STATUS_HV_PAGE_REQUEST_INVALID NTStatus = 0xC0350060
+ STATUS_HV_INVALID_CPU_GROUP_ID NTStatus = 0xC035006F
+ STATUS_HV_INVALID_CPU_GROUP_STATE NTStatus = 0xC0350070
+ STATUS_HV_OPERATION_FAILED NTStatus = 0xC0350071
+ STATUS_HV_NOT_ALLOWED_WITH_NESTED_VIRT_ACTIVE NTStatus = 0xC0350072
+ STATUS_HV_INSUFFICIENT_ROOT_MEMORY NTStatus = 0xC0350073
+ STATUS_HV_NOT_PRESENT NTStatus = 0xC0351000
+ STATUS_VID_DUPLICATE_HANDLER NTStatus = 0xC0370001
+ STATUS_VID_TOO_MANY_HANDLERS NTStatus = 0xC0370002
+ STATUS_VID_QUEUE_FULL NTStatus = 0xC0370003
+ STATUS_VID_HANDLER_NOT_PRESENT NTStatus = 0xC0370004
+ STATUS_VID_INVALID_OBJECT_NAME NTStatus = 0xC0370005
+ STATUS_VID_PARTITION_NAME_TOO_LONG NTStatus = 0xC0370006
+ STATUS_VID_MESSAGE_QUEUE_NAME_TOO_LONG NTStatus = 0xC0370007
+ STATUS_VID_PARTITION_ALREADY_EXISTS NTStatus = 0xC0370008
+ STATUS_VID_PARTITION_DOES_NOT_EXIST NTStatus = 0xC0370009
+ STATUS_VID_PARTITION_NAME_NOT_FOUND NTStatus = 0xC037000A
+ STATUS_VID_MESSAGE_QUEUE_ALREADY_EXISTS NTStatus = 0xC037000B
+ STATUS_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT NTStatus = 0xC037000C
+ STATUS_VID_MB_STILL_REFERENCED NTStatus = 0xC037000D
+ STATUS_VID_CHILD_GPA_PAGE_SET_CORRUPTED NTStatus = 0xC037000E
+ STATUS_VID_INVALID_NUMA_SETTINGS NTStatus = 0xC037000F
+ STATUS_VID_INVALID_NUMA_NODE_INDEX NTStatus = 0xC0370010
+ STATUS_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED NTStatus = 0xC0370011
+ STATUS_VID_INVALID_MEMORY_BLOCK_HANDLE NTStatus = 0xC0370012
+ STATUS_VID_PAGE_RANGE_OVERFLOW NTStatus = 0xC0370013
+ STATUS_VID_INVALID_MESSAGE_QUEUE_HANDLE NTStatus = 0xC0370014
+ STATUS_VID_INVALID_GPA_RANGE_HANDLE NTStatus = 0xC0370015
+ STATUS_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE NTStatus = 0xC0370016
+ STATUS_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED NTStatus = 0xC0370017
+ STATUS_VID_INVALID_PPM_HANDLE NTStatus = 0xC0370018
+ STATUS_VID_MBPS_ARE_LOCKED NTStatus = 0xC0370019
+ STATUS_VID_MESSAGE_QUEUE_CLOSED NTStatus = 0xC037001A
+ STATUS_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED NTStatus = 0xC037001B
+ STATUS_VID_STOP_PENDING NTStatus = 0xC037001C
+ STATUS_VID_INVALID_PROCESSOR_STATE NTStatus = 0xC037001D
+ STATUS_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT NTStatus = 0xC037001E
+ STATUS_VID_KM_INTERFACE_ALREADY_INITIALIZED NTStatus = 0xC037001F
+ STATUS_VID_MB_PROPERTY_ALREADY_SET_RESET NTStatus = 0xC0370020
+ STATUS_VID_MMIO_RANGE_DESTROYED NTStatus = 0xC0370021
+ STATUS_VID_INVALID_CHILD_GPA_PAGE_SET NTStatus = 0xC0370022
+ STATUS_VID_RESERVE_PAGE_SET_IS_BEING_USED NTStatus = 0xC0370023
+ STATUS_VID_RESERVE_PAGE_SET_TOO_SMALL NTStatus = 0xC0370024
+ STATUS_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE NTStatus = 0xC0370025
+ STATUS_VID_MBP_COUNT_EXCEEDED_LIMIT NTStatus = 0xC0370026
+ STATUS_VID_SAVED_STATE_CORRUPT NTStatus = 0xC0370027
+ STATUS_VID_SAVED_STATE_UNRECOGNIZED_ITEM NTStatus = 0xC0370028
+ STATUS_VID_SAVED_STATE_INCOMPATIBLE NTStatus = 0xC0370029
+ STATUS_VID_VTL_ACCESS_DENIED NTStatus = 0xC037002A
+ STATUS_VID_REMOTE_NODE_PARENT_GPA_PAGES_USED NTStatus = 0x80370001
+ STATUS_IPSEC_BAD_SPI NTStatus = 0xC0360001
+ STATUS_IPSEC_SA_LIFETIME_EXPIRED NTStatus = 0xC0360002
+ STATUS_IPSEC_WRONG_SA NTStatus = 0xC0360003
+ STATUS_IPSEC_REPLAY_CHECK_FAILED NTStatus = 0xC0360004
+ STATUS_IPSEC_INVALID_PACKET NTStatus = 0xC0360005
+ STATUS_IPSEC_INTEGRITY_CHECK_FAILED NTStatus = 0xC0360006
+ STATUS_IPSEC_CLEAR_TEXT_DROP NTStatus = 0xC0360007
+ STATUS_IPSEC_AUTH_FIREWALL_DROP NTStatus = 0xC0360008
+ STATUS_IPSEC_THROTTLE_DROP NTStatus = 0xC0360009
+ STATUS_IPSEC_DOSP_BLOCK NTStatus = 0xC0368000
+ STATUS_IPSEC_DOSP_RECEIVED_MULTICAST NTStatus = 0xC0368001
+ STATUS_IPSEC_DOSP_INVALID_PACKET NTStatus = 0xC0368002
+ STATUS_IPSEC_DOSP_STATE_LOOKUP_FAILED NTStatus = 0xC0368003
+ STATUS_IPSEC_DOSP_MAX_ENTRIES NTStatus = 0xC0368004
+ STATUS_IPSEC_DOSP_KEYMOD_NOT_ALLOWED NTStatus = 0xC0368005
+ STATUS_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES NTStatus = 0xC0368006
+ STATUS_VOLMGR_INCOMPLETE_REGENERATION NTStatus = 0x80380001
+ STATUS_VOLMGR_INCOMPLETE_DISK_MIGRATION NTStatus = 0x80380002
+ STATUS_VOLMGR_DATABASE_FULL NTStatus = 0xC0380001
+ STATUS_VOLMGR_DISK_CONFIGURATION_CORRUPTED NTStatus = 0xC0380002
+ STATUS_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC NTStatus = 0xC0380003
+ STATUS_VOLMGR_PACK_CONFIG_UPDATE_FAILED NTStatus = 0xC0380004
+ STATUS_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME NTStatus = 0xC0380005
+ STATUS_VOLMGR_DISK_DUPLICATE NTStatus = 0xC0380006
+ STATUS_VOLMGR_DISK_DYNAMIC NTStatus = 0xC0380007
+ STATUS_VOLMGR_DISK_ID_INVALID NTStatus = 0xC0380008
+ STATUS_VOLMGR_DISK_INVALID NTStatus = 0xC0380009
+ STATUS_VOLMGR_DISK_LAST_VOTER NTStatus = 0xC038000A
+ STATUS_VOLMGR_DISK_LAYOUT_INVALID NTStatus = 0xC038000B
+ STATUS_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS NTStatus = 0xC038000C
+ STATUS_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED NTStatus = 0xC038000D
+ STATUS_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL NTStatus = 0xC038000E
+ STATUS_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS NTStatus = 0xC038000F
+ STATUS_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS NTStatus = 0xC0380010
+ STATUS_VOLMGR_DISK_MISSING NTStatus = 0xC0380011
+ STATUS_VOLMGR_DISK_NOT_EMPTY NTStatus = 0xC0380012
+ STATUS_VOLMGR_DISK_NOT_ENOUGH_SPACE NTStatus = 0xC0380013
+ STATUS_VOLMGR_DISK_REVECTORING_FAILED NTStatus = 0xC0380014
+ STATUS_VOLMGR_DISK_SECTOR_SIZE_INVALID NTStatus = 0xC0380015
+ STATUS_VOLMGR_DISK_SET_NOT_CONTAINED NTStatus = 0xC0380016
+ STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS NTStatus = 0xC0380017
+ STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES NTStatus = 0xC0380018
+ STATUS_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED NTStatus = 0xC0380019
+ STATUS_VOLMGR_EXTENT_ALREADY_USED NTStatus = 0xC038001A
+ STATUS_VOLMGR_EXTENT_NOT_CONTIGUOUS NTStatus = 0xC038001B
+ STATUS_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION NTStatus = 0xC038001C
+ STATUS_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED NTStatus = 0xC038001D
+ STATUS_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION NTStatus = 0xC038001E
+ STATUS_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH NTStatus = 0xC038001F
+ STATUS_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED NTStatus = 0xC0380020
+ STATUS_VOLMGR_INTERLEAVE_LENGTH_INVALID NTStatus = 0xC0380021
+ STATUS_VOLMGR_MAXIMUM_REGISTERED_USERS NTStatus = 0xC0380022
+ STATUS_VOLMGR_MEMBER_IN_SYNC NTStatus = 0xC0380023
+ STATUS_VOLMGR_MEMBER_INDEX_DUPLICATE NTStatus = 0xC0380024
+ STATUS_VOLMGR_MEMBER_INDEX_INVALID NTStatus = 0xC0380025
+ STATUS_VOLMGR_MEMBER_MISSING NTStatus = 0xC0380026
+ STATUS_VOLMGR_MEMBER_NOT_DETACHED NTStatus = 0xC0380027
+ STATUS_VOLMGR_MEMBER_REGENERATING NTStatus = 0xC0380028
+ STATUS_VOLMGR_ALL_DISKS_FAILED NTStatus = 0xC0380029
+ STATUS_VOLMGR_NO_REGISTERED_USERS NTStatus = 0xC038002A
+ STATUS_VOLMGR_NO_SUCH_USER NTStatus = 0xC038002B
+ STATUS_VOLMGR_NOTIFICATION_RESET NTStatus = 0xC038002C
+ STATUS_VOLMGR_NUMBER_OF_MEMBERS_INVALID NTStatus = 0xC038002D
+ STATUS_VOLMGR_NUMBER_OF_PLEXES_INVALID NTStatus = 0xC038002E
+ STATUS_VOLMGR_PACK_DUPLICATE NTStatus = 0xC038002F
+ STATUS_VOLMGR_PACK_ID_INVALID NTStatus = 0xC0380030
+ STATUS_VOLMGR_PACK_INVALID NTStatus = 0xC0380031
+ STATUS_VOLMGR_PACK_NAME_INVALID NTStatus = 0xC0380032
+ STATUS_VOLMGR_PACK_OFFLINE NTStatus = 0xC0380033
+ STATUS_VOLMGR_PACK_HAS_QUORUM NTStatus = 0xC0380034
+ STATUS_VOLMGR_PACK_WITHOUT_QUORUM NTStatus = 0xC0380035
+ STATUS_VOLMGR_PARTITION_STYLE_INVALID NTStatus = 0xC0380036
+ STATUS_VOLMGR_PARTITION_UPDATE_FAILED NTStatus = 0xC0380037
+ STATUS_VOLMGR_PLEX_IN_SYNC NTStatus = 0xC0380038
+ STATUS_VOLMGR_PLEX_INDEX_DUPLICATE NTStatus = 0xC0380039
+ STATUS_VOLMGR_PLEX_INDEX_INVALID NTStatus = 0xC038003A
+ STATUS_VOLMGR_PLEX_LAST_ACTIVE NTStatus = 0xC038003B
+ STATUS_VOLMGR_PLEX_MISSING NTStatus = 0xC038003C
+ STATUS_VOLMGR_PLEX_REGENERATING NTStatus = 0xC038003D
+ STATUS_VOLMGR_PLEX_TYPE_INVALID NTStatus = 0xC038003E
+ STATUS_VOLMGR_PLEX_NOT_RAID5 NTStatus = 0xC038003F
+ STATUS_VOLMGR_PLEX_NOT_SIMPLE NTStatus = 0xC0380040
+ STATUS_VOLMGR_STRUCTURE_SIZE_INVALID NTStatus = 0xC0380041
+ STATUS_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS NTStatus = 0xC0380042
+ STATUS_VOLMGR_TRANSACTION_IN_PROGRESS NTStatus = 0xC0380043
+ STATUS_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE NTStatus = 0xC0380044
+ STATUS_VOLMGR_VOLUME_CONTAINS_MISSING_DISK NTStatus = 0xC0380045
+ STATUS_VOLMGR_VOLUME_ID_INVALID NTStatus = 0xC0380046
+ STATUS_VOLMGR_VOLUME_LENGTH_INVALID NTStatus = 0xC0380047
+ STATUS_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE NTStatus = 0xC0380048
+ STATUS_VOLMGR_VOLUME_NOT_MIRRORED NTStatus = 0xC0380049
+ STATUS_VOLMGR_VOLUME_NOT_RETAINED NTStatus = 0xC038004A
+ STATUS_VOLMGR_VOLUME_OFFLINE NTStatus = 0xC038004B
+ STATUS_VOLMGR_VOLUME_RETAINED NTStatus = 0xC038004C
+ STATUS_VOLMGR_NUMBER_OF_EXTENTS_INVALID NTStatus = 0xC038004D
+ STATUS_VOLMGR_DIFFERENT_SECTOR_SIZE NTStatus = 0xC038004E
+ STATUS_VOLMGR_BAD_BOOT_DISK NTStatus = 0xC038004F
+ STATUS_VOLMGR_PACK_CONFIG_OFFLINE NTStatus = 0xC0380050
+ STATUS_VOLMGR_PACK_CONFIG_ONLINE NTStatus = 0xC0380051
+ STATUS_VOLMGR_NOT_PRIMARY_PACK NTStatus = 0xC0380052
+ STATUS_VOLMGR_PACK_LOG_UPDATE_FAILED NTStatus = 0xC0380053
+ STATUS_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID NTStatus = 0xC0380054
+ STATUS_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID NTStatus = 0xC0380055
+ STATUS_VOLMGR_VOLUME_MIRRORED NTStatus = 0xC0380056
+ STATUS_VOLMGR_PLEX_NOT_SIMPLE_SPANNED NTStatus = 0xC0380057
+ STATUS_VOLMGR_NO_VALID_LOG_COPIES NTStatus = 0xC0380058
+ STATUS_VOLMGR_PRIMARY_PACK_PRESENT NTStatus = 0xC0380059
+ STATUS_VOLMGR_NUMBER_OF_DISKS_INVALID NTStatus = 0xC038005A
+ STATUS_VOLMGR_MIRROR_NOT_SUPPORTED NTStatus = 0xC038005B
+ STATUS_VOLMGR_RAID5_NOT_SUPPORTED NTStatus = 0xC038005C
+ STATUS_BCD_NOT_ALL_ENTRIES_IMPORTED NTStatus = 0x80390001
+ STATUS_BCD_TOO_MANY_ELEMENTS NTStatus = 0xC0390002
+ STATUS_BCD_NOT_ALL_ENTRIES_SYNCHRONIZED NTStatus = 0x80390003
+ STATUS_VHD_DRIVE_FOOTER_MISSING NTStatus = 0xC03A0001
+ STATUS_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH NTStatus = 0xC03A0002
+ STATUS_VHD_DRIVE_FOOTER_CORRUPT NTStatus = 0xC03A0003
+ STATUS_VHD_FORMAT_UNKNOWN NTStatus = 0xC03A0004
+ STATUS_VHD_FORMAT_UNSUPPORTED_VERSION NTStatus = 0xC03A0005
+ STATUS_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH NTStatus = 0xC03A0006
+ STATUS_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION NTStatus = 0xC03A0007
+ STATUS_VHD_SPARSE_HEADER_CORRUPT NTStatus = 0xC03A0008
+ STATUS_VHD_BLOCK_ALLOCATION_FAILURE NTStatus = 0xC03A0009
+ STATUS_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT NTStatus = 0xC03A000A
+ STATUS_VHD_INVALID_BLOCK_SIZE NTStatus = 0xC03A000B
+ STATUS_VHD_BITMAP_MISMATCH NTStatus = 0xC03A000C
+ STATUS_VHD_PARENT_VHD_NOT_FOUND NTStatus = 0xC03A000D
+ STATUS_VHD_CHILD_PARENT_ID_MISMATCH NTStatus = 0xC03A000E
+ STATUS_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH NTStatus = 0xC03A000F
+ STATUS_VHD_METADATA_READ_FAILURE NTStatus = 0xC03A0010
+ STATUS_VHD_METADATA_WRITE_FAILURE NTStatus = 0xC03A0011
+ STATUS_VHD_INVALID_SIZE NTStatus = 0xC03A0012
+ STATUS_VHD_INVALID_FILE_SIZE NTStatus = 0xC03A0013
+ STATUS_VIRTDISK_PROVIDER_NOT_FOUND NTStatus = 0xC03A0014
+ STATUS_VIRTDISK_NOT_VIRTUAL_DISK NTStatus = 0xC03A0015
+ STATUS_VHD_PARENT_VHD_ACCESS_DENIED NTStatus = 0xC03A0016
+ STATUS_VHD_CHILD_PARENT_SIZE_MISMATCH NTStatus = 0xC03A0017
+ STATUS_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED NTStatus = 0xC03A0018
+ STATUS_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT NTStatus = 0xC03A0019
+ STATUS_VIRTUAL_DISK_LIMITATION NTStatus = 0xC03A001A
+ STATUS_VHD_INVALID_TYPE NTStatus = 0xC03A001B
+ STATUS_VHD_INVALID_STATE NTStatus = 0xC03A001C
+ STATUS_VIRTDISK_UNSUPPORTED_DISK_SECTOR_SIZE NTStatus = 0xC03A001D
+ STATUS_VIRTDISK_DISK_ALREADY_OWNED NTStatus = 0xC03A001E
+ STATUS_VIRTDISK_DISK_ONLINE_AND_WRITABLE NTStatus = 0xC03A001F
+ STATUS_CTLOG_TRACKING_NOT_INITIALIZED NTStatus = 0xC03A0020
+ STATUS_CTLOG_LOGFILE_SIZE_EXCEEDED_MAXSIZE NTStatus = 0xC03A0021
+ STATUS_CTLOG_VHD_CHANGED_OFFLINE NTStatus = 0xC03A0022
+ STATUS_CTLOG_INVALID_TRACKING_STATE NTStatus = 0xC03A0023
+ STATUS_CTLOG_INCONSISTENT_TRACKING_FILE NTStatus = 0xC03A0024
+ STATUS_VHD_METADATA_FULL NTStatus = 0xC03A0028
+ STATUS_VHD_INVALID_CHANGE_TRACKING_ID NTStatus = 0xC03A0029
+ STATUS_VHD_CHANGE_TRACKING_DISABLED NTStatus = 0xC03A002A
+ STATUS_VHD_MISSING_CHANGE_TRACKING_INFORMATION NTStatus = 0xC03A0030
+ STATUS_VHD_RESIZE_WOULD_TRUNCATE_DATA NTStatus = 0xC03A0031
+ STATUS_VHD_COULD_NOT_COMPUTE_MINIMUM_VIRTUAL_SIZE NTStatus = 0xC03A0032
+ STATUS_VHD_ALREADY_AT_OR_BELOW_MINIMUM_VIRTUAL_SIZE NTStatus = 0xC03A0033
+ STATUS_QUERY_STORAGE_ERROR NTStatus = 0x803A0001
+ STATUS_GDI_HANDLE_LEAK NTStatus = 0x803F0001
+ STATUS_RKF_KEY_NOT_FOUND NTStatus = 0xC0400001
+ STATUS_RKF_DUPLICATE_KEY NTStatus = 0xC0400002
+ STATUS_RKF_BLOB_FULL NTStatus = 0xC0400003
+ STATUS_RKF_STORE_FULL NTStatus = 0xC0400004
+ STATUS_RKF_FILE_BLOCKED NTStatus = 0xC0400005
+ STATUS_RKF_ACTIVE_KEY NTStatus = 0xC0400006
+ STATUS_RDBSS_RESTART_OPERATION NTStatus = 0xC0410001
+ STATUS_RDBSS_CONTINUE_OPERATION NTStatus = 0xC0410002
+ STATUS_RDBSS_POST_OPERATION NTStatus = 0xC0410003
+ STATUS_RDBSS_RETRY_LOOKUP NTStatus = 0xC0410004
+ STATUS_BTH_ATT_INVALID_HANDLE NTStatus = 0xC0420001
+ STATUS_BTH_ATT_READ_NOT_PERMITTED NTStatus = 0xC0420002
+ STATUS_BTH_ATT_WRITE_NOT_PERMITTED NTStatus = 0xC0420003
+ STATUS_BTH_ATT_INVALID_PDU NTStatus = 0xC0420004
+ STATUS_BTH_ATT_INSUFFICIENT_AUTHENTICATION NTStatus = 0xC0420005
+ STATUS_BTH_ATT_REQUEST_NOT_SUPPORTED NTStatus = 0xC0420006
+ STATUS_BTH_ATT_INVALID_OFFSET NTStatus = 0xC0420007
+ STATUS_BTH_ATT_INSUFFICIENT_AUTHORIZATION NTStatus = 0xC0420008
+ STATUS_BTH_ATT_PREPARE_QUEUE_FULL NTStatus = 0xC0420009
+ STATUS_BTH_ATT_ATTRIBUTE_NOT_FOUND NTStatus = 0xC042000A
+ STATUS_BTH_ATT_ATTRIBUTE_NOT_LONG NTStatus = 0xC042000B
+ STATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION_KEY_SIZE NTStatus = 0xC042000C
+ STATUS_BTH_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH NTStatus = 0xC042000D
+ STATUS_BTH_ATT_UNLIKELY NTStatus = 0xC042000E
+ STATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION NTStatus = 0xC042000F
+ STATUS_BTH_ATT_UNSUPPORTED_GROUP_TYPE NTStatus = 0xC0420010
+ STATUS_BTH_ATT_INSUFFICIENT_RESOURCES NTStatus = 0xC0420011
+ STATUS_BTH_ATT_UNKNOWN_ERROR NTStatus = 0xC0421000
+ STATUS_SECUREBOOT_ROLLBACK_DETECTED NTStatus = 0xC0430001
+ STATUS_SECUREBOOT_POLICY_VIOLATION NTStatus = 0xC0430002
+ STATUS_SECUREBOOT_INVALID_POLICY NTStatus = 0xC0430003
+ STATUS_SECUREBOOT_POLICY_PUBLISHER_NOT_FOUND NTStatus = 0xC0430004
+ STATUS_SECUREBOOT_POLICY_NOT_SIGNED NTStatus = 0xC0430005
+ STATUS_SECUREBOOT_NOT_ENABLED NTStatus = 0x80430006
+ STATUS_SECUREBOOT_FILE_REPLACED NTStatus = 0xC0430007
+ STATUS_SECUREBOOT_POLICY_NOT_AUTHORIZED NTStatus = 0xC0430008
+ STATUS_SECUREBOOT_POLICY_UNKNOWN NTStatus = 0xC0430009
+ STATUS_SECUREBOOT_POLICY_MISSING_ANTIROLLBACKVERSION NTStatus = 0xC043000A
+ STATUS_SECUREBOOT_PLATFORM_ID_MISMATCH NTStatus = 0xC043000B
+ STATUS_SECUREBOOT_POLICY_ROLLBACK_DETECTED NTStatus = 0xC043000C
+ STATUS_SECUREBOOT_POLICY_UPGRADE_MISMATCH NTStatus = 0xC043000D
+ STATUS_SECUREBOOT_REQUIRED_POLICY_FILE_MISSING NTStatus = 0xC043000E
+ STATUS_SECUREBOOT_NOT_BASE_POLICY NTStatus = 0xC043000F
+ STATUS_SECUREBOOT_NOT_SUPPLEMENTAL_POLICY NTStatus = 0xC0430010
+ STATUS_PLATFORM_MANIFEST_NOT_AUTHORIZED NTStatus = 0xC0EB0001
+ STATUS_PLATFORM_MANIFEST_INVALID NTStatus = 0xC0EB0002
+ STATUS_PLATFORM_MANIFEST_FILE_NOT_AUTHORIZED NTStatus = 0xC0EB0003
+ STATUS_PLATFORM_MANIFEST_CATALOG_NOT_AUTHORIZED NTStatus = 0xC0EB0004
+ STATUS_PLATFORM_MANIFEST_BINARY_ID_NOT_FOUND NTStatus = 0xC0EB0005
+ STATUS_PLATFORM_MANIFEST_NOT_ACTIVE NTStatus = 0xC0EB0006
+ STATUS_PLATFORM_MANIFEST_NOT_SIGNED NTStatus = 0xC0EB0007
+ STATUS_SYSTEM_INTEGRITY_ROLLBACK_DETECTED NTStatus = 0xC0E90001
+ STATUS_SYSTEM_INTEGRITY_POLICY_VIOLATION NTStatus = 0xC0E90002
+ STATUS_SYSTEM_INTEGRITY_INVALID_POLICY NTStatus = 0xC0E90003
+ STATUS_SYSTEM_INTEGRITY_POLICY_NOT_SIGNED NTStatus = 0xC0E90004
+ STATUS_SYSTEM_INTEGRITY_TOO_MANY_POLICIES NTStatus = 0xC0E90005
+ STATUS_SYSTEM_INTEGRITY_SUPPLEMENTAL_POLICY_NOT_AUTHORIZED NTStatus = 0xC0E90006
+ STATUS_NO_APPLICABLE_APP_LICENSES_FOUND NTStatus = 0xC0EA0001
+ STATUS_CLIP_LICENSE_NOT_FOUND NTStatus = 0xC0EA0002
+ STATUS_CLIP_DEVICE_LICENSE_MISSING NTStatus = 0xC0EA0003
+ STATUS_CLIP_LICENSE_INVALID_SIGNATURE NTStatus = 0xC0EA0004
+ STATUS_CLIP_KEYHOLDER_LICENSE_MISSING_OR_INVALID NTStatus = 0xC0EA0005
+ STATUS_CLIP_LICENSE_EXPIRED NTStatus = 0xC0EA0006
+ STATUS_CLIP_LICENSE_SIGNED_BY_UNKNOWN_SOURCE NTStatus = 0xC0EA0007
+ STATUS_CLIP_LICENSE_NOT_SIGNED NTStatus = 0xC0EA0008
+ STATUS_CLIP_LICENSE_HARDWARE_ID_OUT_OF_TOLERANCE NTStatus = 0xC0EA0009
+ STATUS_CLIP_LICENSE_DEVICE_ID_MISMATCH NTStatus = 0xC0EA000A
+ STATUS_AUDIO_ENGINE_NODE_NOT_FOUND NTStatus = 0xC0440001
+ STATUS_HDAUDIO_EMPTY_CONNECTION_LIST NTStatus = 0xC0440002
+ STATUS_HDAUDIO_CONNECTION_LIST_NOT_SUPPORTED NTStatus = 0xC0440003
+ STATUS_HDAUDIO_NO_LOGICAL_DEVICES_CREATED NTStatus = 0xC0440004
+ STATUS_HDAUDIO_NULL_LINKED_LIST_ENTRY NTStatus = 0xC0440005
+ STATUS_SPACES_REPAIRED NTStatus = 0x00E70000
+ STATUS_SPACES_PAUSE NTStatus = 0x00E70001
+ STATUS_SPACES_COMPLETE NTStatus = 0x00E70002
+ STATUS_SPACES_REDIRECT NTStatus = 0x00E70003
+ STATUS_SPACES_FAULT_DOMAIN_TYPE_INVALID NTStatus = 0xC0E70001
+ STATUS_SPACES_RESILIENCY_TYPE_INVALID NTStatus = 0xC0E70003
+ STATUS_SPACES_DRIVE_SECTOR_SIZE_INVALID NTStatus = 0xC0E70004
+ STATUS_SPACES_DRIVE_REDUNDANCY_INVALID NTStatus = 0xC0E70006
+ STATUS_SPACES_NUMBER_OF_DATA_COPIES_INVALID NTStatus = 0xC0E70007
+ STATUS_SPACES_INTERLEAVE_LENGTH_INVALID NTStatus = 0xC0E70009
+ STATUS_SPACES_NUMBER_OF_COLUMNS_INVALID NTStatus = 0xC0E7000A
+ STATUS_SPACES_NOT_ENOUGH_DRIVES NTStatus = 0xC0E7000B
+ STATUS_SPACES_EXTENDED_ERROR NTStatus = 0xC0E7000C
+ STATUS_SPACES_PROVISIONING_TYPE_INVALID NTStatus = 0xC0E7000D
+ STATUS_SPACES_ALLOCATION_SIZE_INVALID NTStatus = 0xC0E7000E
+ STATUS_SPACES_ENCLOSURE_AWARE_INVALID NTStatus = 0xC0E7000F
+ STATUS_SPACES_WRITE_CACHE_SIZE_INVALID NTStatus = 0xC0E70010
+ STATUS_SPACES_NUMBER_OF_GROUPS_INVALID NTStatus = 0xC0E70011
+ STATUS_SPACES_DRIVE_OPERATIONAL_STATE_INVALID NTStatus = 0xC0E70012
+ STATUS_SPACES_UPDATE_COLUMN_STATE NTStatus = 0xC0E70013
+ STATUS_SPACES_MAP_REQUIRED NTStatus = 0xC0E70014
+ STATUS_SPACES_UNSUPPORTED_VERSION NTStatus = 0xC0E70015
+ STATUS_SPACES_CORRUPT_METADATA NTStatus = 0xC0E70016
+ STATUS_SPACES_DRT_FULL NTStatus = 0xC0E70017
+ STATUS_SPACES_INCONSISTENCY NTStatus = 0xC0E70018
+ STATUS_SPACES_LOG_NOT_READY NTStatus = 0xC0E70019
+ STATUS_SPACES_NO_REDUNDANCY NTStatus = 0xC0E7001A
+ STATUS_SPACES_DRIVE_NOT_READY NTStatus = 0xC0E7001B
+ STATUS_SPACES_DRIVE_SPLIT NTStatus = 0xC0E7001C
+ STATUS_SPACES_DRIVE_LOST_DATA NTStatus = 0xC0E7001D
+ STATUS_SPACES_ENTRY_INCOMPLETE NTStatus = 0xC0E7001E
+ STATUS_SPACES_ENTRY_INVALID NTStatus = 0xC0E7001F
+ STATUS_SPACES_MARK_DIRTY NTStatus = 0xC0E70020
+ STATUS_VOLSNAP_BOOTFILE_NOT_VALID NTStatus = 0xC0500003
+ STATUS_VOLSNAP_ACTIVATION_TIMEOUT NTStatus = 0xC0500004
+ STATUS_IO_PREEMPTED NTStatus = 0xC0510001
+ STATUS_SVHDX_ERROR_STORED NTStatus = 0xC05C0000
+ STATUS_SVHDX_ERROR_NOT_AVAILABLE NTStatus = 0xC05CFF00
+ STATUS_SVHDX_UNIT_ATTENTION_AVAILABLE NTStatus = 0xC05CFF01
+ STATUS_SVHDX_UNIT_ATTENTION_CAPACITY_DATA_CHANGED NTStatus = 0xC05CFF02
+ STATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_PREEMPTED NTStatus = 0xC05CFF03
+ STATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_RELEASED NTStatus = 0xC05CFF04
+ STATUS_SVHDX_UNIT_ATTENTION_REGISTRATIONS_PREEMPTED NTStatus = 0xC05CFF05
+ STATUS_SVHDX_UNIT_ATTENTION_OPERATING_DEFINITION_CHANGED NTStatus = 0xC05CFF06
+ STATUS_SVHDX_RESERVATION_CONFLICT NTStatus = 0xC05CFF07
+ STATUS_SVHDX_WRONG_FILE_TYPE NTStatus = 0xC05CFF08
+ STATUS_SVHDX_VERSION_MISMATCH NTStatus = 0xC05CFF09
+ STATUS_VHD_SHARED NTStatus = 0xC05CFF0A
+ STATUS_SVHDX_NO_INITIATOR NTStatus = 0xC05CFF0B
+ STATUS_VHDSET_BACKING_STORAGE_NOT_FOUND NTStatus = 0xC05CFF0C
+ STATUS_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP NTStatus = 0xC05D0000
+ STATUS_SMB_BAD_CLUSTER_DIALECT NTStatus = 0xC05D0001
+ STATUS_SMB_GUEST_LOGON_BLOCKED NTStatus = 0xC05D0002
+ STATUS_SECCORE_INVALID_COMMAND NTStatus = 0xC0E80000
+ STATUS_VSM_NOT_INITIALIZED NTStatus = 0xC0450000
+ STATUS_VSM_DMA_PROTECTION_NOT_IN_USE NTStatus = 0xC0450001
+ STATUS_APPEXEC_CONDITION_NOT_SATISFIED NTStatus = 0xC0EC0000
+ STATUS_APPEXEC_HANDLE_INVALIDATED NTStatus = 0xC0EC0001
+ STATUS_APPEXEC_INVALID_HOST_GENERATION NTStatus = 0xC0EC0002
+ STATUS_APPEXEC_UNEXPECTED_PROCESS_REGISTRATION NTStatus = 0xC0EC0003
+ STATUS_APPEXEC_INVALID_HOST_STATE NTStatus = 0xC0EC0004
+ STATUS_APPEXEC_NO_DONOR NTStatus = 0xC0EC0005
+ STATUS_APPEXEC_HOST_ID_MISMATCH NTStatus = 0xC0EC0006
+ STATUS_APPEXEC_UNKNOWN_USER NTStatus = 0xC0EC0007
)
diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 2aa4fa6..559bc84 100644
--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -17,6 +17,7 @@ const (
var (
errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
+ errERROR_EINVAL error = syscall.EINVAL
)
// errnoErr returns common boxed Errno values, to prevent
@@ -24,7 +25,7 @@ var (
func errnoErr(e syscall.Errno) error {
switch e {
case 0:
- return nil
+ return errERROR_EINVAL
case errnoERROR_IO_PENDING:
return errERROR_IO_PENDING
}
@@ -36,2292 +37,2053 @@ func errnoErr(e syscall.Errno) error {
var (
modadvapi32 = NewLazySystemDLL("advapi32.dll")
+ modcrypt32 = NewLazySystemDLL("crypt32.dll")
+ moddnsapi = NewLazySystemDLL("dnsapi.dll")
+ modiphlpapi = NewLazySystemDLL("iphlpapi.dll")
modkernel32 = NewLazySystemDLL("kernel32.dll")
- modshell32 = NewLazySystemDLL("shell32.dll")
- moduserenv = NewLazySystemDLL("userenv.dll")
modmswsock = NewLazySystemDLL("mswsock.dll")
- modcrypt32 = NewLazySystemDLL("crypt32.dll")
- moduser32 = NewLazySystemDLL("user32.dll")
- modole32 = NewLazySystemDLL("ole32.dll")
+ modnetapi32 = NewLazySystemDLL("netapi32.dll")
modntdll = NewLazySystemDLL("ntdll.dll")
+ modole32 = NewLazySystemDLL("ole32.dll")
modpsapi = NewLazySystemDLL("psapi.dll")
- modws2_32 = NewLazySystemDLL("ws2_32.dll")
- moddnsapi = NewLazySystemDLL("dnsapi.dll")
- modiphlpapi = NewLazySystemDLL("iphlpapi.dll")
+ modsechost = NewLazySystemDLL("sechost.dll")
modsecur32 = NewLazySystemDLL("secur32.dll")
- modnetapi32 = NewLazySystemDLL("netapi32.dll")
+ modshell32 = NewLazySystemDLL("shell32.dll")
+ moduser32 = NewLazySystemDLL("user32.dll")
+ moduserenv = NewLazySystemDLL("userenv.dll")
+ modwintrust = NewLazySystemDLL("wintrust.dll")
+ modws2_32 = NewLazySystemDLL("ws2_32.dll")
modwtsapi32 = NewLazySystemDLL("wtsapi32.dll")
- procRegisterEventSourceW = modadvapi32.NewProc("RegisterEventSourceW")
- procDeregisterEventSource = modadvapi32.NewProc("DeregisterEventSource")
- procReportEventW = modadvapi32.NewProc("ReportEventW")
- procOpenSCManagerW = modadvapi32.NewProc("OpenSCManagerW")
+ procAdjustTokenGroups = modadvapi32.NewProc("AdjustTokenGroups")
+ procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges")
+ procAllocateAndInitializeSid = modadvapi32.NewProc("AllocateAndInitializeSid")
+ procBuildSecurityDescriptorW = modadvapi32.NewProc("BuildSecurityDescriptorW")
+ procChangeServiceConfig2W = modadvapi32.NewProc("ChangeServiceConfig2W")
+ procChangeServiceConfigW = modadvapi32.NewProc("ChangeServiceConfigW")
+ procCheckTokenMembership = modadvapi32.NewProc("CheckTokenMembership")
procCloseServiceHandle = modadvapi32.NewProc("CloseServiceHandle")
+ procControlService = modadvapi32.NewProc("ControlService")
+ procConvertSecurityDescriptorToStringSecurityDescriptorW = modadvapi32.NewProc("ConvertSecurityDescriptorToStringSecurityDescriptorW")
+ procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW")
+ procConvertStringSecurityDescriptorToSecurityDescriptorW = modadvapi32.NewProc("ConvertStringSecurityDescriptorToSecurityDescriptorW")
+ procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW")
+ procCopySid = modadvapi32.NewProc("CopySid")
procCreateServiceW = modadvapi32.NewProc("CreateServiceW")
- procOpenServiceW = modadvapi32.NewProc("OpenServiceW")
+ procCreateWellKnownSid = modadvapi32.NewProc("CreateWellKnownSid")
+ procCryptAcquireContextW = modadvapi32.NewProc("CryptAcquireContextW")
+ procCryptGenRandom = modadvapi32.NewProc("CryptGenRandom")
+ procCryptReleaseContext = modadvapi32.NewProc("CryptReleaseContext")
procDeleteService = modadvapi32.NewProc("DeleteService")
- procStartServiceW = modadvapi32.NewProc("StartServiceW")
- procQueryServiceStatus = modadvapi32.NewProc("QueryServiceStatus")
- procQueryServiceLockStatusW = modadvapi32.NewProc("QueryServiceLockStatusW")
- procControlService = modadvapi32.NewProc("ControlService")
- procStartServiceCtrlDispatcherW = modadvapi32.NewProc("StartServiceCtrlDispatcherW")
- procSetServiceStatus = modadvapi32.NewProc("SetServiceStatus")
- procChangeServiceConfigW = modadvapi32.NewProc("ChangeServiceConfigW")
- procQueryServiceConfigW = modadvapi32.NewProc("QueryServiceConfigW")
- procChangeServiceConfig2W = modadvapi32.NewProc("ChangeServiceConfig2W")
- procQueryServiceConfig2W = modadvapi32.NewProc("QueryServiceConfig2W")
+ procDeregisterEventSource = modadvapi32.NewProc("DeregisterEventSource")
+ procDuplicateTokenEx = modadvapi32.NewProc("DuplicateTokenEx")
procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW")
- procQueryServiceStatusEx = modadvapi32.NewProc("QueryServiceStatusEx")
+ procEqualSid = modadvapi32.NewProc("EqualSid")
+ procFreeSid = modadvapi32.NewProc("FreeSid")
+ procGetLengthSid = modadvapi32.NewProc("GetLengthSid")
+ procGetNamedSecurityInfoW = modadvapi32.NewProc("GetNamedSecurityInfoW")
+ procGetSecurityDescriptorControl = modadvapi32.NewProc("GetSecurityDescriptorControl")
+ procGetSecurityDescriptorDacl = modadvapi32.NewProc("GetSecurityDescriptorDacl")
+ procGetSecurityDescriptorGroup = modadvapi32.NewProc("GetSecurityDescriptorGroup")
+ procGetSecurityDescriptorLength = modadvapi32.NewProc("GetSecurityDescriptorLength")
+ procGetSecurityDescriptorOwner = modadvapi32.NewProc("GetSecurityDescriptorOwner")
+ procGetSecurityDescriptorRMControl = modadvapi32.NewProc("GetSecurityDescriptorRMControl")
+ procGetSecurityDescriptorSacl = modadvapi32.NewProc("GetSecurityDescriptorSacl")
+ procGetSecurityInfo = modadvapi32.NewProc("GetSecurityInfo")
+ procGetSidIdentifierAuthority = modadvapi32.NewProc("GetSidIdentifierAuthority")
+ procGetSidSubAuthority = modadvapi32.NewProc("GetSidSubAuthority")
+ procGetSidSubAuthorityCount = modadvapi32.NewProc("GetSidSubAuthorityCount")
+ procGetTokenInformation = modadvapi32.NewProc("GetTokenInformation")
+ procImpersonateSelf = modadvapi32.NewProc("ImpersonateSelf")
+ procInitializeSecurityDescriptor = modadvapi32.NewProc("InitializeSecurityDescriptor")
+ procInitiateSystemShutdownExW = modadvapi32.NewProc("InitiateSystemShutdownExW")
+ procIsTokenRestricted = modadvapi32.NewProc("IsTokenRestricted")
+ procIsValidSecurityDescriptor = modadvapi32.NewProc("IsValidSecurityDescriptor")
+ procIsValidSid = modadvapi32.NewProc("IsValidSid")
+ procIsWellKnownSid = modadvapi32.NewProc("IsWellKnownSid")
+ procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW")
+ procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW")
+ procLookupPrivilegeValueW = modadvapi32.NewProc("LookupPrivilegeValueW")
+ procMakeAbsoluteSD = modadvapi32.NewProc("MakeAbsoluteSD")
+ procMakeSelfRelativeSD = modadvapi32.NewProc("MakeSelfRelativeSD")
procNotifyServiceStatusChangeW = modadvapi32.NewProc("NotifyServiceStatusChangeW")
- procGetLastError = modkernel32.NewProc("GetLastError")
- procLoadLibraryW = modkernel32.NewProc("LoadLibraryW")
- procLoadLibraryExW = modkernel32.NewProc("LoadLibraryExW")
- procFreeLibrary = modkernel32.NewProc("FreeLibrary")
- procGetProcAddress = modkernel32.NewProc("GetProcAddress")
- procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW")
- procGetModuleHandleExW = modkernel32.NewProc("GetModuleHandleExW")
- procGetVersion = modkernel32.NewProc("GetVersion")
- procFormatMessageW = modkernel32.NewProc("FormatMessageW")
- procExitProcess = modkernel32.NewProc("ExitProcess")
- procIsWow64Process = modkernel32.NewProc("IsWow64Process")
- procCreateFileW = modkernel32.NewProc("CreateFileW")
- procReadFile = modkernel32.NewProc("ReadFile")
- procWriteFile = modkernel32.NewProc("WriteFile")
- procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult")
- procSetFilePointer = modkernel32.NewProc("SetFilePointer")
- procCloseHandle = modkernel32.NewProc("CloseHandle")
- procGetStdHandle = modkernel32.NewProc("GetStdHandle")
- procSetStdHandle = modkernel32.NewProc("SetStdHandle")
- procFindFirstFileW = modkernel32.NewProc("FindFirstFileW")
- procFindNextFileW = modkernel32.NewProc("FindNextFileW")
- procFindClose = modkernel32.NewProc("FindClose")
- procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle")
- procGetFileInformationByHandleEx = modkernel32.NewProc("GetFileInformationByHandleEx")
- procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW")
- procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW")
- procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW")
- procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW")
- procDeleteFileW = modkernel32.NewProc("DeleteFileW")
- procMoveFileW = modkernel32.NewProc("MoveFileW")
- procMoveFileExW = modkernel32.NewProc("MoveFileExW")
- procLockFileEx = modkernel32.NewProc("LockFileEx")
- procUnlockFileEx = modkernel32.NewProc("UnlockFileEx")
- procGetComputerNameW = modkernel32.NewProc("GetComputerNameW")
- procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW")
- procSetEndOfFile = modkernel32.NewProc("SetEndOfFile")
- procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime")
- procGetSystemTimePreciseAsFileTime = modkernel32.NewProc("GetSystemTimePreciseAsFileTime")
- procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneInformation")
- procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
- procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
- procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCompletionStatus")
- procCancelIo = modkernel32.NewProc("CancelIo")
- procCancelIoEx = modkernel32.NewProc("CancelIoEx")
- procCreateProcessW = modkernel32.NewProc("CreateProcessW")
- procOpenProcess = modkernel32.NewProc("OpenProcess")
- procShellExecuteW = modshell32.NewProc("ShellExecuteW")
- procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath")
- procTerminateProcess = modkernel32.NewProc("TerminateProcess")
- procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeProcess")
- procGetStartupInfoW = modkernel32.NewProc("GetStartupInfoW")
- procGetProcessTimes = modkernel32.NewProc("GetProcessTimes")
- procDuplicateHandle = modkernel32.NewProc("DuplicateHandle")
- procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject")
- procWaitForMultipleObjects = modkernel32.NewProc("WaitForMultipleObjects")
- procGetTempPathW = modkernel32.NewProc("GetTempPathW")
- procCreatePipe = modkernel32.NewProc("CreatePipe")
- procGetFileType = modkernel32.NewProc("GetFileType")
- procCryptAcquireContextW = modadvapi32.NewProc("CryptAcquireContextW")
- procCryptReleaseContext = modadvapi32.NewProc("CryptReleaseContext")
- procCryptGenRandom = modadvapi32.NewProc("CryptGenRandom")
- procGetEnvironmentStringsW = modkernel32.NewProc("GetEnvironmentStringsW")
- procFreeEnvironmentStringsW = modkernel32.NewProc("FreeEnvironmentStringsW")
- procGetEnvironmentVariableW = modkernel32.NewProc("GetEnvironmentVariableW")
- procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW")
- procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
- procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
- procGetTickCount64 = modkernel32.NewProc("GetTickCount64")
- procSetFileTime = modkernel32.NewProc("SetFileTime")
- procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW")
- procSetFileAttributesW = modkernel32.NewProc("SetFileAttributesW")
- procGetFileAttributesExW = modkernel32.NewProc("GetFileAttributesExW")
- procGetCommandLineW = modkernel32.NewProc("GetCommandLineW")
- procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
- procLocalFree = modkernel32.NewProc("LocalFree")
- procSetHandleInformation = modkernel32.NewProc("SetHandleInformation")
- procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers")
- procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW")
- procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW")
- procGetShortPathNameW = modkernel32.NewProc("GetShortPathNameW")
- procCreateFileMappingW = modkernel32.NewProc("CreateFileMappingW")
- procMapViewOfFile = modkernel32.NewProc("MapViewOfFile")
- procUnmapViewOfFile = modkernel32.NewProc("UnmapViewOfFile")
- procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile")
- procVirtualLock = modkernel32.NewProc("VirtualLock")
- procVirtualUnlock = modkernel32.NewProc("VirtualUnlock")
- procVirtualAlloc = modkernel32.NewProc("VirtualAlloc")
- procVirtualFree = modkernel32.NewProc("VirtualFree")
- procVirtualProtect = modkernel32.NewProc("VirtualProtect")
- procTransmitFile = modmswsock.NewProc("TransmitFile")
- procReadDirectoryChangesW = modkernel32.NewProc("ReadDirectoryChangesW")
- procCertOpenSystemStoreW = modcrypt32.NewProc("CertOpenSystemStoreW")
- procCertOpenStore = modcrypt32.NewProc("CertOpenStore")
- procCertEnumCertificatesInStore = modcrypt32.NewProc("CertEnumCertificatesInStore")
+ procOpenProcessToken = modadvapi32.NewProc("OpenProcessToken")
+ procOpenSCManagerW = modadvapi32.NewProc("OpenSCManagerW")
+ procOpenServiceW = modadvapi32.NewProc("OpenServiceW")
+ procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken")
+ procQueryServiceConfig2W = modadvapi32.NewProc("QueryServiceConfig2W")
+ procQueryServiceConfigW = modadvapi32.NewProc("QueryServiceConfigW")
+ procQueryServiceLockStatusW = modadvapi32.NewProc("QueryServiceLockStatusW")
+ procQueryServiceStatus = modadvapi32.NewProc("QueryServiceStatus")
+ procQueryServiceStatusEx = modadvapi32.NewProc("QueryServiceStatusEx")
+ procRegCloseKey = modadvapi32.NewProc("RegCloseKey")
+ procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyExW")
+ procRegNotifyChangeKeyValue = modadvapi32.NewProc("RegNotifyChangeKeyValue")
+ procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyExW")
+ procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW")
+ procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW")
+ procRegisterEventSourceW = modadvapi32.NewProc("RegisterEventSourceW")
+ procReportEventW = modadvapi32.NewProc("ReportEventW")
+ procRevertToSelf = modadvapi32.NewProc("RevertToSelf")
+ procSetEntriesInAclW = modadvapi32.NewProc("SetEntriesInAclW")
+ procSetKernelObjectSecurity = modadvapi32.NewProc("SetKernelObjectSecurity")
+ procSetNamedSecurityInfoW = modadvapi32.NewProc("SetNamedSecurityInfoW")
+ procSetSecurityDescriptorControl = modadvapi32.NewProc("SetSecurityDescriptorControl")
+ procSetSecurityDescriptorDacl = modadvapi32.NewProc("SetSecurityDescriptorDacl")
+ procSetSecurityDescriptorGroup = modadvapi32.NewProc("SetSecurityDescriptorGroup")
+ procSetSecurityDescriptorOwner = modadvapi32.NewProc("SetSecurityDescriptorOwner")
+ procSetSecurityDescriptorRMControl = modadvapi32.NewProc("SetSecurityDescriptorRMControl")
+ procSetSecurityDescriptorSacl = modadvapi32.NewProc("SetSecurityDescriptorSacl")
+ procSetSecurityInfo = modadvapi32.NewProc("SetSecurityInfo")
+ procSetServiceStatus = modadvapi32.NewProc("SetServiceStatus")
+ procSetThreadToken = modadvapi32.NewProc("SetThreadToken")
+ procSetTokenInformation = modadvapi32.NewProc("SetTokenInformation")
+ procStartServiceCtrlDispatcherW = modadvapi32.NewProc("StartServiceCtrlDispatcherW")
+ procStartServiceW = modadvapi32.NewProc("StartServiceW")
procCertAddCertificateContextToStore = modcrypt32.NewProc("CertAddCertificateContextToStore")
procCertCloseStore = modcrypt32.NewProc("CertCloseStore")
- procCertGetCertificateChain = modcrypt32.NewProc("CertGetCertificateChain")
- procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCertificateChain")
procCertCreateCertificateContext = modcrypt32.NewProc("CertCreateCertificateContext")
+ procCertDeleteCertificateFromStore = modcrypt32.NewProc("CertDeleteCertificateFromStore")
+ procCertDuplicateCertificateContext = modcrypt32.NewProc("CertDuplicateCertificateContext")
+ procCertEnumCertificatesInStore = modcrypt32.NewProc("CertEnumCertificatesInStore")
+ procCertFindCertificateInStore = modcrypt32.NewProc("CertFindCertificateInStore")
+ procCertFindChainInStore = modcrypt32.NewProc("CertFindChainInStore")
+ procCertFindExtension = modcrypt32.NewProc("CertFindExtension")
+ procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCertificateChain")
procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCertificateContext")
+ procCertGetCertificateChain = modcrypt32.NewProc("CertGetCertificateChain")
+ procCertGetNameStringW = modcrypt32.NewProc("CertGetNameStringW")
+ procCertOpenStore = modcrypt32.NewProc("CertOpenStore")
+ procCertOpenSystemStoreW = modcrypt32.NewProc("CertOpenSystemStoreW")
procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCertificateChainPolicy")
- procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyExW")
- procRegCloseKey = modadvapi32.NewProc("RegCloseKey")
- procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW")
- procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyExW")
- procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW")
- procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId")
- procGetConsoleMode = modkernel32.NewProc("GetConsoleMode")
- procSetConsoleMode = modkernel32.NewProc("SetConsoleMode")
- procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo")
- procWriteConsoleW = modkernel32.NewProc("WriteConsoleW")
- procReadConsoleW = modkernel32.NewProc("ReadConsoleW")
- procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot")
- procProcess32FirstW = modkernel32.NewProc("Process32FirstW")
- procProcess32NextW = modkernel32.NewProc("Process32NextW")
- procThread32First = modkernel32.NewProc("Thread32First")
- procThread32Next = modkernel32.NewProc("Thread32Next")
- procDeviceIoControl = modkernel32.NewProc("DeviceIoControl")
- procCreateSymbolicLinkW = modkernel32.NewProc("CreateSymbolicLinkW")
- procCreateHardLinkW = modkernel32.NewProc("CreateHardLinkW")
- procGetCurrentThreadId = modkernel32.NewProc("GetCurrentThreadId")
- procCreateEventW = modkernel32.NewProc("CreateEventW")
+ procCryptAcquireCertificatePrivateKey = modcrypt32.NewProc("CryptAcquireCertificatePrivateKey")
+ procCryptDecodeObject = modcrypt32.NewProc("CryptDecodeObject")
+ procCryptProtectData = modcrypt32.NewProc("CryptProtectData")
+ procCryptQueryObject = modcrypt32.NewProc("CryptQueryObject")
+ procCryptUnprotectData = modcrypt32.NewProc("CryptUnprotectData")
+ procPFXImportCertStore = modcrypt32.NewProc("PFXImportCertStore")
+ procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W")
+ procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
+ procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
+ procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
+ procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
+ procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
+ procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
+ procCancelIo = modkernel32.NewProc("CancelIo")
+ procCancelIoEx = modkernel32.NewProc("CancelIoEx")
+ procCloseHandle = modkernel32.NewProc("CloseHandle")
+ procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe")
+ procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW")
procCreateEventExW = modkernel32.NewProc("CreateEventExW")
- procOpenEventW = modkernel32.NewProc("OpenEventW")
- procSetEvent = modkernel32.NewProc("SetEvent")
- procResetEvent = modkernel32.NewProc("ResetEvent")
- procPulseEvent = modkernel32.NewProc("PulseEvent")
- procCreateMutexW = modkernel32.NewProc("CreateMutexW")
- procCreateMutexExW = modkernel32.NewProc("CreateMutexExW")
- procOpenMutexW = modkernel32.NewProc("OpenMutexW")
- procReleaseMutex = modkernel32.NewProc("ReleaseMutex")
- procSleepEx = modkernel32.NewProc("SleepEx")
+ procCreateEventW = modkernel32.NewProc("CreateEventW")
+ procCreateFileMappingW = modkernel32.NewProc("CreateFileMappingW")
+ procCreateFileW = modkernel32.NewProc("CreateFileW")
+ procCreateHardLinkW = modkernel32.NewProc("CreateHardLinkW")
+ procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
procCreateJobObjectW = modkernel32.NewProc("CreateJobObjectW")
- procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject")
- procTerminateJobObject = modkernel32.NewProc("TerminateJobObject")
- procSetErrorMode = modkernel32.NewProc("SetErrorMode")
- procResumeThread = modkernel32.NewProc("ResumeThread")
- procSetPriorityClass = modkernel32.NewProc("SetPriorityClass")
- procGetPriorityClass = modkernel32.NewProc("GetPriorityClass")
- procSetInformationJobObject = modkernel32.NewProc("SetInformationJobObject")
- procGenerateConsoleCtrlEvent = modkernel32.NewProc("GenerateConsoleCtrlEvent")
- procGetProcessId = modkernel32.NewProc("GetProcessId")
- procOpenThread = modkernel32.NewProc("OpenThread")
- procSetProcessPriorityBoost = modkernel32.NewProc("SetProcessPriorityBoost")
+ procCreateMutexExW = modkernel32.NewProc("CreateMutexExW")
+ procCreateMutexW = modkernel32.NewProc("CreateMutexW")
+ procCreateNamedPipeW = modkernel32.NewProc("CreateNamedPipeW")
+ procCreatePipe = modkernel32.NewProc("CreatePipe")
+ procCreateProcessW = modkernel32.NewProc("CreateProcessW")
+ procCreateSymbolicLinkW = modkernel32.NewProc("CreateSymbolicLinkW")
+ procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot")
procDefineDosDeviceW = modkernel32.NewProc("DefineDosDeviceW")
+ procDeleteFileW = modkernel32.NewProc("DeleteFileW")
+ procDeleteProcThreadAttributeList = modkernel32.NewProc("DeleteProcThreadAttributeList")
procDeleteVolumeMountPointW = modkernel32.NewProc("DeleteVolumeMountPointW")
- procFindFirstVolumeW = modkernel32.NewProc("FindFirstVolumeW")
+ procDeviceIoControl = modkernel32.NewProc("DeviceIoControl")
+ procDuplicateHandle = modkernel32.NewProc("DuplicateHandle")
+ procExitProcess = modkernel32.NewProc("ExitProcess")
+ procFindClose = modkernel32.NewProc("FindClose")
+ procFindCloseChangeNotification = modkernel32.NewProc("FindCloseChangeNotification")
+ procFindFirstChangeNotificationW = modkernel32.NewProc("FindFirstChangeNotificationW")
+ procFindFirstFileW = modkernel32.NewProc("FindFirstFileW")
procFindFirstVolumeMountPointW = modkernel32.NewProc("FindFirstVolumeMountPointW")
- procFindNextVolumeW = modkernel32.NewProc("FindNextVolumeW")
+ procFindFirstVolumeW = modkernel32.NewProc("FindFirstVolumeW")
+ procFindNextChangeNotification = modkernel32.NewProc("FindNextChangeNotification")
+ procFindNextFileW = modkernel32.NewProc("FindNextFileW")
procFindNextVolumeMountPointW = modkernel32.NewProc("FindNextVolumeMountPointW")
+ procFindNextVolumeW = modkernel32.NewProc("FindNextVolumeW")
+ procFindResourceW = modkernel32.NewProc("FindResourceW")
procFindVolumeClose = modkernel32.NewProc("FindVolumeClose")
procFindVolumeMountPointClose = modkernel32.NewProc("FindVolumeMountPointClose")
+ procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers")
+ procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile")
+ procFormatMessageW = modkernel32.NewProc("FormatMessageW")
+ procFreeEnvironmentStringsW = modkernel32.NewProc("FreeEnvironmentStringsW")
+ procFreeLibrary = modkernel32.NewProc("FreeLibrary")
+ procGenerateConsoleCtrlEvent = modkernel32.NewProc("GenerateConsoleCtrlEvent")
+ procGetACP = modkernel32.NewProc("GetACP")
+ procGetCommTimeouts = modkernel32.NewProc("GetCommTimeouts")
+ procGetCommandLineW = modkernel32.NewProc("GetCommandLineW")
+ procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW")
+ procGetComputerNameW = modkernel32.NewProc("GetComputerNameW")
+ procGetConsoleMode = modkernel32.NewProc("GetConsoleMode")
+ procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo")
+ procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW")
+ procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId")
+ procGetCurrentThreadId = modkernel32.NewProc("GetCurrentThreadId")
procGetDiskFreeSpaceExW = modkernel32.NewProc("GetDiskFreeSpaceExW")
procGetDriveTypeW = modkernel32.NewProc("GetDriveTypeW")
- procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives")
+ procGetEnvironmentStringsW = modkernel32.NewProc("GetEnvironmentStringsW")
+ procGetEnvironmentVariableW = modkernel32.NewProc("GetEnvironmentVariableW")
+ procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeProcess")
+ procGetFileAttributesExW = modkernel32.NewProc("GetFileAttributesExW")
+ procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW")
+ procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle")
+ procGetFileInformationByHandleEx = modkernel32.NewProc("GetFileInformationByHandleEx")
+ procGetFileType = modkernel32.NewProc("GetFileType")
+ procGetFinalPathNameByHandleW = modkernel32.NewProc("GetFinalPathNameByHandleW")
+ procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW")
+ procGetLastError = modkernel32.NewProc("GetLastError")
procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW")
- procGetVolumeInformationW = modkernel32.NewProc("GetVolumeInformationW")
+ procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives")
+ procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW")
+ procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW")
+ procGetModuleHandleExW = modkernel32.NewProc("GetModuleHandleExW")
+ procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW")
+ procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo")
+ procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult")
+ procGetPriorityClass = modkernel32.NewProc("GetPriorityClass")
+ procGetProcAddress = modkernel32.NewProc("GetProcAddress")
+ procGetProcessId = modkernel32.NewProc("GetProcessId")
+ procGetProcessPreferredUILanguages = modkernel32.NewProc("GetProcessPreferredUILanguages")
+ procGetProcessShutdownParameters = modkernel32.NewProc("GetProcessShutdownParameters")
+ procGetProcessTimes = modkernel32.NewProc("GetProcessTimes")
+ procGetProcessWorkingSetSizeEx = modkernel32.NewProc("GetProcessWorkingSetSizeEx")
+ procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
+ procGetShortPathNameW = modkernel32.NewProc("GetShortPathNameW")
+ procGetStartupInfoW = modkernel32.NewProc("GetStartupInfoW")
+ procGetStdHandle = modkernel32.NewProc("GetStdHandle")
+ procGetSystemDirectoryW = modkernel32.NewProc("GetSystemDirectoryW")
+ procGetSystemPreferredUILanguages = modkernel32.NewProc("GetSystemPreferredUILanguages")
+ procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime")
+ procGetSystemTimePreciseAsFileTime = modkernel32.NewProc("GetSystemTimePreciseAsFileTime")
+ procGetSystemWindowsDirectoryW = modkernel32.NewProc("GetSystemWindowsDirectoryW")
+ procGetTempPathW = modkernel32.NewProc("GetTempPathW")
+ procGetThreadPreferredUILanguages = modkernel32.NewProc("GetThreadPreferredUILanguages")
+ procGetTickCount64 = modkernel32.NewProc("GetTickCount64")
+ procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneInformation")
+ procGetUserPreferredUILanguages = modkernel32.NewProc("GetUserPreferredUILanguages")
+ procGetVersion = modkernel32.NewProc("GetVersion")
procGetVolumeInformationByHandleW = modkernel32.NewProc("GetVolumeInformationByHandleW")
+ procGetVolumeInformationW = modkernel32.NewProc("GetVolumeInformationW")
procGetVolumeNameForVolumeMountPointW = modkernel32.NewProc("GetVolumeNameForVolumeMountPointW")
procGetVolumePathNameW = modkernel32.NewProc("GetVolumePathNameW")
procGetVolumePathNamesForVolumeNameW = modkernel32.NewProc("GetVolumePathNamesForVolumeNameW")
+ procGetWindowsDirectoryW = modkernel32.NewProc("GetWindowsDirectoryW")
+ procInitializeProcThreadAttributeList = modkernel32.NewProc("InitializeProcThreadAttributeList")
+ procIsWow64Process = modkernel32.NewProc("IsWow64Process")
+ procIsWow64Process2 = modkernel32.NewProc("IsWow64Process2")
+ procLoadLibraryExW = modkernel32.NewProc("LoadLibraryExW")
+ procLoadLibraryW = modkernel32.NewProc("LoadLibraryW")
+ procLoadResource = modkernel32.NewProc("LoadResource")
+ procLocalAlloc = modkernel32.NewProc("LocalAlloc")
+ procLocalFree = modkernel32.NewProc("LocalFree")
+ procLockFileEx = modkernel32.NewProc("LockFileEx")
+ procLockResource = modkernel32.NewProc("LockResource")
+ procMapViewOfFile = modkernel32.NewProc("MapViewOfFile")
+ procMoveFileExW = modkernel32.NewProc("MoveFileExW")
+ procMoveFileW = modkernel32.NewProc("MoveFileW")
+ procMultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar")
+ procOpenEventW = modkernel32.NewProc("OpenEventW")
+ procOpenMutexW = modkernel32.NewProc("OpenMutexW")
+ procOpenProcess = modkernel32.NewProc("OpenProcess")
+ procOpenThread = modkernel32.NewProc("OpenThread")
+ procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCompletionStatus")
+ procProcess32FirstW = modkernel32.NewProc("Process32FirstW")
+ procProcess32NextW = modkernel32.NewProc("Process32NextW")
+ procProcessIdToSessionId = modkernel32.NewProc("ProcessIdToSessionId")
+ procPulseEvent = modkernel32.NewProc("PulseEvent")
procQueryDosDeviceW = modkernel32.NewProc("QueryDosDeviceW")
+ procQueryFullProcessImageNameW = modkernel32.NewProc("QueryFullProcessImageNameW")
+ procQueryInformationJobObject = modkernel32.NewProc("QueryInformationJobObject")
+ procReadConsoleW = modkernel32.NewProc("ReadConsoleW")
+ procReadDirectoryChangesW = modkernel32.NewProc("ReadDirectoryChangesW")
+ procReadFile = modkernel32.NewProc("ReadFile")
+ procReleaseMutex = modkernel32.NewProc("ReleaseMutex")
+ procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW")
+ procResetEvent = modkernel32.NewProc("ResetEvent")
+ procResumeThread = modkernel32.NewProc("ResumeThread")
+ procSetCommTimeouts = modkernel32.NewProc("SetCommTimeouts")
+ procSetConsoleCursorPosition = modkernel32.NewProc("SetConsoleCursorPosition")
+ procSetConsoleMode = modkernel32.NewProc("SetConsoleMode")
+ procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW")
+ procSetDefaultDllDirectories = modkernel32.NewProc("SetDefaultDllDirectories")
+ procSetDllDirectoryW = modkernel32.NewProc("SetDllDirectoryW")
+ procSetEndOfFile = modkernel32.NewProc("SetEndOfFile")
+ procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW")
+ procSetErrorMode = modkernel32.NewProc("SetErrorMode")
+ procSetEvent = modkernel32.NewProc("SetEvent")
+ procSetFileAttributesW = modkernel32.NewProc("SetFileAttributesW")
+ procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes")
+ procSetFileInformationByHandle = modkernel32.NewProc("SetFileInformationByHandle")
+ procSetFilePointer = modkernel32.NewProc("SetFilePointer")
+ procSetFileTime = modkernel32.NewProc("SetFileTime")
+ procSetHandleInformation = modkernel32.NewProc("SetHandleInformation")
+ procSetInformationJobObject = modkernel32.NewProc("SetInformationJobObject")
+ procSetNamedPipeHandleState = modkernel32.NewProc("SetNamedPipeHandleState")
+ procSetPriorityClass = modkernel32.NewProc("SetPriorityClass")
+ procSetProcessPriorityBoost = modkernel32.NewProc("SetProcessPriorityBoost")
+ procSetProcessShutdownParameters = modkernel32.NewProc("SetProcessShutdownParameters")
+ procSetProcessWorkingSetSizeEx = modkernel32.NewProc("SetProcessWorkingSetSizeEx")
+ procSetStdHandle = modkernel32.NewProc("SetStdHandle")
procSetVolumeLabelW = modkernel32.NewProc("SetVolumeLabelW")
procSetVolumeMountPointW = modkernel32.NewProc("SetVolumeMountPointW")
- procMessageBoxW = moduser32.NewProc("MessageBoxW")
- procExitWindowsEx = moduser32.NewProc("ExitWindowsEx")
- procInitiateSystemShutdownExW = modadvapi32.NewProc("InitiateSystemShutdownExW")
- procSetProcessShutdownParameters = modkernel32.NewProc("SetProcessShutdownParameters")
- procGetProcessShutdownParameters = modkernel32.NewProc("GetProcessShutdownParameters")
+ procSizeofResource = modkernel32.NewProc("SizeofResource")
+ procSleepEx = modkernel32.NewProc("SleepEx")
+ procTerminateJobObject = modkernel32.NewProc("TerminateJobObject")
+ procTerminateProcess = modkernel32.NewProc("TerminateProcess")
+ procThread32First = modkernel32.NewProc("Thread32First")
+ procThread32Next = modkernel32.NewProc("Thread32Next")
+ procUnlockFileEx = modkernel32.NewProc("UnlockFileEx")
+ procUnmapViewOfFile = modkernel32.NewProc("UnmapViewOfFile")
+ procUpdateProcThreadAttribute = modkernel32.NewProc("UpdateProcThreadAttribute")
+ procVirtualAlloc = modkernel32.NewProc("VirtualAlloc")
+ procVirtualFree = modkernel32.NewProc("VirtualFree")
+ procVirtualLock = modkernel32.NewProc("VirtualLock")
+ procVirtualProtect = modkernel32.NewProc("VirtualProtect")
+ procVirtualUnlock = modkernel32.NewProc("VirtualUnlock")
+ procWaitForMultipleObjects = modkernel32.NewProc("WaitForMultipleObjects")
+ procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject")
+ procWriteConsoleW = modkernel32.NewProc("WriteConsoleW")
+ procWriteFile = modkernel32.NewProc("WriteFile")
+ procAcceptEx = modmswsock.NewProc("AcceptEx")
+ procGetAcceptExSockaddrs = modmswsock.NewProc("GetAcceptExSockaddrs")
+ procTransmitFile = modmswsock.NewProc("TransmitFile")
+ procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree")
+ procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation")
+ procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo")
+ procNtCreateFile = modntdll.NewProc("NtCreateFile")
+ procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile")
+ procNtQueryInformationProcess = modntdll.NewProc("NtQueryInformationProcess")
+ procNtSetInformationProcess = modntdll.NewProc("NtSetInformationProcess")
+ procRtlDefaultNpAcl = modntdll.NewProc("RtlDefaultNpAcl")
+ procRtlDosPathNameToNtPathName_U_WithStatus = modntdll.NewProc("RtlDosPathNameToNtPathName_U_WithStatus")
+ procRtlDosPathNameToRelativeNtPathName_U_WithStatus = modntdll.NewProc("RtlDosPathNameToRelativeNtPathName_U_WithStatus")
+ procRtlGetCurrentPeb = modntdll.NewProc("RtlGetCurrentPeb")
+ procRtlGetNtVersionNumbers = modntdll.NewProc("RtlGetNtVersionNumbers")
+ procRtlGetVersion = modntdll.NewProc("RtlGetVersion")
+ procRtlInitString = modntdll.NewProc("RtlInitString")
+ procRtlInitUnicodeString = modntdll.NewProc("RtlInitUnicodeString")
+ procRtlNtStatusToDosErrorNoTeb = modntdll.NewProc("RtlNtStatusToDosErrorNoTeb")
procCLSIDFromString = modole32.NewProc("CLSIDFromString")
- procStringFromGUID2 = modole32.NewProc("StringFromGUID2")
procCoCreateGuid = modole32.NewProc("CoCreateGuid")
+ procCoGetObject = modole32.NewProc("CoGetObject")
+ procCoInitializeEx = modole32.NewProc("CoInitializeEx")
procCoTaskMemFree = modole32.NewProc("CoTaskMemFree")
- procRtlGetVersion = modntdll.NewProc("RtlGetVersion")
- procRtlGetNtVersionNumbers = modntdll.NewProc("RtlGetNtVersionNumbers")
- procGetProcessPreferredUILanguages = modkernel32.NewProc("GetProcessPreferredUILanguages")
- procGetThreadPreferredUILanguages = modkernel32.NewProc("GetThreadPreferredUILanguages")
- procGetUserPreferredUILanguages = modkernel32.NewProc("GetUserPreferredUILanguages")
- procGetSystemPreferredUILanguages = modkernel32.NewProc("GetSystemPreferredUILanguages")
+ procCoUninitialize = modole32.NewProc("CoUninitialize")
+ procStringFromGUID2 = modole32.NewProc("StringFromGUID2")
procEnumProcesses = modpsapi.NewProc("EnumProcesses")
- procWSAStartup = modws2_32.NewProc("WSAStartup")
+ procSubscribeServiceChangeNotifications = modsechost.NewProc("SubscribeServiceChangeNotifications")
+ procUnsubscribeServiceChangeNotifications = modsechost.NewProc("UnsubscribeServiceChangeNotifications")
+ procGetUserNameExW = modsecur32.NewProc("GetUserNameExW")
+ procTranslateNameW = modsecur32.NewProc("TranslateNameW")
+ procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
+ procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath")
+ procShellExecuteW = modshell32.NewProc("ShellExecuteW")
+ procExitWindowsEx = moduser32.NewProc("ExitWindowsEx")
+ procGetShellWindow = moduser32.NewProc("GetShellWindow")
+ procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId")
+ procMessageBoxW = moduser32.NewProc("MessageBoxW")
+ procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
+ procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
+ procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW")
+ procWinVerifyTrustEx = modwintrust.NewProc("WinVerifyTrustEx")
+ procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW")
+ procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
procWSACleanup = modws2_32.NewProc("WSACleanup")
+ procWSAEnumProtocolsW = modws2_32.NewProc("WSAEnumProtocolsW")
+ procWSAGetOverlappedResult = modws2_32.NewProc("WSAGetOverlappedResult")
procWSAIoctl = modws2_32.NewProc("WSAIoctl")
- procsocket = modws2_32.NewProc("socket")
- procsendto = modws2_32.NewProc("sendto")
- procrecvfrom = modws2_32.NewProc("recvfrom")
- procsetsockopt = modws2_32.NewProc("setsockopt")
- procgetsockopt = modws2_32.NewProc("getsockopt")
- procbind = modws2_32.NewProc("bind")
- procconnect = modws2_32.NewProc("connect")
- procgetsockname = modws2_32.NewProc("getsockname")
- procgetpeername = modws2_32.NewProc("getpeername")
- proclisten = modws2_32.NewProc("listen")
- procshutdown = modws2_32.NewProc("shutdown")
- procclosesocket = modws2_32.NewProc("closesocket")
- procAcceptEx = modmswsock.NewProc("AcceptEx")
- procGetAcceptExSockaddrs = modmswsock.NewProc("GetAcceptExSockaddrs")
procWSARecv = modws2_32.NewProc("WSARecv")
- procWSASend = modws2_32.NewProc("WSASend")
procWSARecvFrom = modws2_32.NewProc("WSARecvFrom")
+ procWSASend = modws2_32.NewProc("WSASend")
procWSASendTo = modws2_32.NewProc("WSASendTo")
+ procWSASocketW = modws2_32.NewProc("WSASocketW")
+ procWSAStartup = modws2_32.NewProc("WSAStartup")
+ procbind = modws2_32.NewProc("bind")
+ procclosesocket = modws2_32.NewProc("closesocket")
+ procconnect = modws2_32.NewProc("connect")
procgethostbyname = modws2_32.NewProc("gethostbyname")
+ procgetpeername = modws2_32.NewProc("getpeername")
+ procgetprotobyname = modws2_32.NewProc("getprotobyname")
procgetservbyname = modws2_32.NewProc("getservbyname")
+ procgetsockname = modws2_32.NewProc("getsockname")
+ procgetsockopt = modws2_32.NewProc("getsockopt")
+ proclisten = modws2_32.NewProc("listen")
procntohs = modws2_32.NewProc("ntohs")
- procgetprotobyname = modws2_32.NewProc("getprotobyname")
- procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
- procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
- procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W")
- procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
- procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW")
- procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
- procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
- procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes")
- procWSAEnumProtocolsW = modws2_32.NewProc("WSAEnumProtocolsW")
- procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
- procGetACP = modkernel32.NewProc("GetACP")
- procMultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar")
- procTranslateNameW = modsecur32.NewProc("TranslateNameW")
- procGetUserNameExW = modsecur32.NewProc("GetUserNameExW")
- procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo")
- procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation")
- procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree")
- procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW")
- procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW")
- procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW")
- procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW")
- procGetLengthSid = modadvapi32.NewProc("GetLengthSid")
- procCopySid = modadvapi32.NewProc("CopySid")
- procAllocateAndInitializeSid = modadvapi32.NewProc("AllocateAndInitializeSid")
- procCreateWellKnownSid = modadvapi32.NewProc("CreateWellKnownSid")
- procIsWellKnownSid = modadvapi32.NewProc("IsWellKnownSid")
- procFreeSid = modadvapi32.NewProc("FreeSid")
- procEqualSid = modadvapi32.NewProc("EqualSid")
- procGetSidIdentifierAuthority = modadvapi32.NewProc("GetSidIdentifierAuthority")
- procGetSidSubAuthorityCount = modadvapi32.NewProc("GetSidSubAuthorityCount")
- procGetSidSubAuthority = modadvapi32.NewProc("GetSidSubAuthority")
- procIsValidSid = modadvapi32.NewProc("IsValidSid")
- procCheckTokenMembership = modadvapi32.NewProc("CheckTokenMembership")
- procOpenProcessToken = modadvapi32.NewProc("OpenProcessToken")
- procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken")
- procImpersonateSelf = modadvapi32.NewProc("ImpersonateSelf")
- procRevertToSelf = modadvapi32.NewProc("RevertToSelf")
- procSetThreadToken = modadvapi32.NewProc("SetThreadToken")
- procLookupPrivilegeValueW = modadvapi32.NewProc("LookupPrivilegeValueW")
- procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges")
- procAdjustTokenGroups = modadvapi32.NewProc("AdjustTokenGroups")
- procGetTokenInformation = modadvapi32.NewProc("GetTokenInformation")
- procSetTokenInformation = modadvapi32.NewProc("SetTokenInformation")
- procDuplicateTokenEx = modadvapi32.NewProc("DuplicateTokenEx")
- procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW")
- procGetSystemDirectoryW = modkernel32.NewProc("GetSystemDirectoryW")
- procGetWindowsDirectoryW = modkernel32.NewProc("GetWindowsDirectoryW")
- procGetSystemWindowsDirectoryW = modkernel32.NewProc("GetSystemWindowsDirectoryW")
- procWTSQueryUserToken = modwtsapi32.NewProc("WTSQueryUserToken")
+ procrecvfrom = modws2_32.NewProc("recvfrom")
+ procsendto = modws2_32.NewProc("sendto")
+ procsetsockopt = modws2_32.NewProc("setsockopt")
+ procshutdown = modws2_32.NewProc("shutdown")
+ procsocket = modws2_32.NewProc("socket")
procWTSEnumerateSessionsW = modwtsapi32.NewProc("WTSEnumerateSessionsW")
procWTSFreeMemory = modwtsapi32.NewProc("WTSFreeMemory")
- procGetSecurityInfo = modadvapi32.NewProc("GetSecurityInfo")
- procSetSecurityInfo = modadvapi32.NewProc("SetSecurityInfo")
- procGetNamedSecurityInfoW = modadvapi32.NewProc("GetNamedSecurityInfoW")
- procSetNamedSecurityInfoW = modadvapi32.NewProc("SetNamedSecurityInfoW")
- procBuildSecurityDescriptorW = modadvapi32.NewProc("BuildSecurityDescriptorW")
- procInitializeSecurityDescriptor = modadvapi32.NewProc("InitializeSecurityDescriptor")
- procGetSecurityDescriptorControl = modadvapi32.NewProc("GetSecurityDescriptorControl")
- procGetSecurityDescriptorDacl = modadvapi32.NewProc("GetSecurityDescriptorDacl")
- procGetSecurityDescriptorSacl = modadvapi32.NewProc("GetSecurityDescriptorSacl")
- procGetSecurityDescriptorOwner = modadvapi32.NewProc("GetSecurityDescriptorOwner")
- procGetSecurityDescriptorGroup = modadvapi32.NewProc("GetSecurityDescriptorGroup")
- procGetSecurityDescriptorLength = modadvapi32.NewProc("GetSecurityDescriptorLength")
- procGetSecurityDescriptorRMControl = modadvapi32.NewProc("GetSecurityDescriptorRMControl")
- procIsValidSecurityDescriptor = modadvapi32.NewProc("IsValidSecurityDescriptor")
- procSetSecurityDescriptorControl = modadvapi32.NewProc("SetSecurityDescriptorControl")
- procSetSecurityDescriptorDacl = modadvapi32.NewProc("SetSecurityDescriptorDacl")
- procSetSecurityDescriptorSacl = modadvapi32.NewProc("SetSecurityDescriptorSacl")
- procSetSecurityDescriptorOwner = modadvapi32.NewProc("SetSecurityDescriptorOwner")
- procSetSecurityDescriptorGroup = modadvapi32.NewProc("SetSecurityDescriptorGroup")
- procSetSecurityDescriptorRMControl = modadvapi32.NewProc("SetSecurityDescriptorRMControl")
- procConvertStringSecurityDescriptorToSecurityDescriptorW = modadvapi32.NewProc("ConvertStringSecurityDescriptorToSecurityDescriptorW")
- procConvertSecurityDescriptorToStringSecurityDescriptorW = modadvapi32.NewProc("ConvertSecurityDescriptorToStringSecurityDescriptorW")
- procMakeAbsoluteSD = modadvapi32.NewProc("MakeAbsoluteSD")
- procMakeSelfRelativeSD = modadvapi32.NewProc("MakeSelfRelativeSD")
- procSetEntriesInAclW = modadvapi32.NewProc("SetEntriesInAclW")
+ procWTSQueryUserToken = modwtsapi32.NewProc("WTSQueryUserToken")
)
-func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procRegisterEventSourceW.Addr(), 2, uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName)), 0)
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func AdjustTokenGroups(token Token, resetToDefault bool, newstate *Tokengroups, buflen uint32, prevstate *Tokengroups, returnlen *uint32) (err error) {
+ var _p0 uint32
+ if resetToDefault {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procAdjustTokenGroups.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func DeregisterEventSource(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procDeregisterEventSource.Addr(), 1, uintptr(handle), 0, 0)
+func AdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tokenprivileges, buflen uint32, prevstate *Tokenprivileges, returnlen *uint32) (err error) {
+ var _p0 uint32
+ if disableAllPrivileges {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procAdjustTokenPrivileges.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procReportEventW.Addr(), 9, uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData)))
+func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) {
+ r1, _, e1 := syscall.Syscall12(procAllocateAndInitializeSid.Addr(), 11, uintptr(unsafe.Pointer(identAuth)), uintptr(subAuth), uintptr(subAuth0), uintptr(subAuth1), uintptr(subAuth2), uintptr(subAuth3), uintptr(subAuth4), uintptr(subAuth5), uintptr(subAuth6), uintptr(subAuth7), uintptr(unsafe.Pointer(sid)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procOpenSCManagerW.Addr(), 3, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(databaseName)), uintptr(access))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) {
+ r0, _, _ := syscall.Syscall9(procBuildSecurityDescriptorW.Addr(), 9, uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(countAccessEntries), uintptr(unsafe.Pointer(accessEntries)), uintptr(countAuditEntries), uintptr(unsafe.Pointer(auditEntries)), uintptr(unsafe.Pointer(oldSecurityDescriptor)), uintptr(unsafe.Pointer(sizeNewSecurityDescriptor)), uintptr(unsafe.Pointer(newSecurityDescriptor)))
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
return
}
-func CloseServiceHandle(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procCloseServiceHandle.Addr(), 1, uintptr(handle), 0, 0)
+func ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) {
+ r1, _, e1 := syscall.Syscall(procChangeServiceConfig2W.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(info)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall15(procCreateServiceW.Addr(), 13, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(unsafe.Pointer(displayName)), uintptr(access), uintptr(srvType), uintptr(startType), uintptr(errCtl), uintptr(unsafe.Pointer(pathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), 0, 0)
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall12(procChangeServiceConfigW.Addr(), 11, uintptr(service), uintptr(serviceType), uintptr(startType), uintptr(errorControl), uintptr(unsafe.Pointer(binaryPathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), uintptr(unsafe.Pointer(displayName)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procOpenServiceW.Addr(), 3, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(access))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procCheckTokenMembership.Addr(), 3, uintptr(tokenHandle), uintptr(unsafe.Pointer(sidToCheck)), uintptr(unsafe.Pointer(isMember)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func DeleteService(service Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procDeleteService.Addr(), 1, uintptr(service), 0, 0)
+func CloseServiceHandle(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procCloseServiceHandle.Addr(), 1, uintptr(handle), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procStartServiceW.Addr(), 3, uintptr(service), uintptr(numArgs), uintptr(unsafe.Pointer(argVectors)))
+func ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) {
+ r1, _, e1 := syscall.Syscall(procControlService.Addr(), 3, uintptr(service), uintptr(control), uintptr(unsafe.Pointer(status)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) {
- r1, _, e1 := syscall.Syscall(procQueryServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(status)), 0)
+func convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR, revision uint32, securityInformation SECURITY_INFORMATION, str **uint16, strLen *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), 5, uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(securityInformation), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(strLen)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryServiceLockStatusW.Addr(), 4, uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
+func ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) {
- r1, _, e1 := syscall.Syscall(procControlService.Addr(), 3, uintptr(service), uintptr(control), uintptr(unsafe.Pointer(status)))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(str)
+ if err != nil {
+ return
}
- return
+ return _convertStringSecurityDescriptorToSecurityDescriptor(_p0, revision, sd, size)
}
-func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) {
- r1, _, e1 := syscall.Syscall(procStartServiceCtrlDispatcherW.Addr(), 1, uintptr(unsafe.Pointer(serviceTable)), 0, 0)
+func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), 4, uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) {
- r1, _, e1 := syscall.Syscall(procSetServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(serviceStatus)), 0)
+func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) {
+ r1, _, e1 := syscall.Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) {
- r1, _, e1 := syscall.Syscall12(procChangeServiceConfigW.Addr(), 11, uintptr(service), uintptr(serviceType), uintptr(startType), uintptr(errorControl), uintptr(unsafe.Pointer(binaryPathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), uintptr(unsafe.Pointer(displayName)), 0)
+func CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) {
+ r1, _, e1 := syscall.Syscall(procCopySid.Addr(), 3, uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryServiceConfigW.Addr(), 4, uintptr(service), uintptr(unsafe.Pointer(serviceConfig)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall15(procCreateServiceW.Addr(), 13, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(unsafe.Pointer(displayName)), uintptr(access), uintptr(srvType), uintptr(startType), uintptr(errCtl), uintptr(unsafe.Pointer(pathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), 0, 0)
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
}
return
}
-func ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) {
- r1, _, e1 := syscall.Syscall(procChangeServiceConfig2W.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(info)))
+func createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, sizeSid *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procCreateWellKnownSid.Addr(), 4, uintptr(sidType), uintptr(unsafe.Pointer(domainSid)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sizeSid)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryServiceConfig2W.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0)
+func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procCryptAcquireContextW.Addr(), 5, uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) {
- r1, _, e1 := syscall.Syscall12(procEnumServicesStatusExW.Addr(), 10, uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)), 0, 0)
+func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) {
+ r1, _, e1 := syscall.Syscall(procCryptGenRandom.Addr(), 3, uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procQueryServiceStatusEx.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0)
+func CryptReleaseContext(provhandle Handle, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procCryptReleaseContext.Addr(), 2, uintptr(provhandle), uintptr(flags), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) {
- r0, _, _ := syscall.Syscall(procNotifyServiceStatusChangeW.Addr(), 3, uintptr(service), uintptr(notifyMask), uintptr(unsafe.Pointer(notifier)))
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func DeleteService(service Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procDeleteService.Addr(), 1, uintptr(service), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetLastError() (lasterr error) {
- r0, _, _ := syscall.Syscall(procGetLastError.Addr(), 0, 0, 0, 0)
- if r0 != 0 {
- lasterr = syscall.Errno(r0)
+func DeregisterEventSource(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procDeregisterEventSource.Addr(), 1, uintptr(handle), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func LoadLibrary(libname string) (handle Handle, err error) {
- var _p0 *uint16
- _p0, err = syscall.UTF16PtrFromString(libname)
- if err != nil {
- return
+func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes *SecurityAttributes, impersonationLevel uint32, tokenType uint32, newToken *Token) (err error) {
+ r1, _, e1 := syscall.Syscall6(procDuplicateTokenEx.Addr(), 6, uintptr(existingToken), uintptr(desiredAccess), uintptr(unsafe.Pointer(tokenAttributes)), uintptr(impersonationLevel), uintptr(tokenType), uintptr(unsafe.Pointer(newToken)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
- return _LoadLibrary(_p0)
+ return
}
-func _LoadLibrary(libname *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procLoadLibraryW.Addr(), 1, uintptr(unsafe.Pointer(libname)), 0, 0)
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall12(procEnumServicesStatusExW.Addr(), 10, uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) {
- var _p0 *uint16
- _p0, err = syscall.UTF16PtrFromString(libname)
- if err != nil {
- return
- }
- return _LoadLibraryEx(_p0, zero, flags)
+func EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) {
+ r0, _, _ := syscall.Syscall(procEqualSid.Addr(), 2, uintptr(unsafe.Pointer(sid1)), uintptr(unsafe.Pointer(sid2)), 0)
+ isEqual = r0 != 0
+ return
}
-func _LoadLibraryEx(libname *uint16, zero Handle, flags uintptr) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procLoadLibraryExW.Addr(), 3, uintptr(unsafe.Pointer(libname)), uintptr(zero), uintptr(flags))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func FreeSid(sid *SID) (err error) {
+ r1, _, e1 := syscall.Syscall(procFreeSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ if r1 != 0 {
+ err = errnoErr(e1)
}
return
}
-func FreeLibrary(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFreeLibrary.Addr(), 1, uintptr(handle), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
- }
+func GetLengthSid(sid *SID) (len uint32) {
+ r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ len = uint32(r0)
return
}
-func GetProcAddress(module Handle, procname string) (proc uintptr, err error) {
- var _p0 *byte
- _p0, err = syscall.BytePtrFromString(procname)
- if err != nil {
+func getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
+ var _p0 *uint16
+ _p0, ret = syscall.UTF16PtrFromString(objectName)
+ if ret != nil {
return
}
- return _GetProcAddress(module, _p0)
+ return _getNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl, sd)
}
-func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) {
- r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), uintptr(unsafe.Pointer(procname)), 0)
- proc = uintptr(r0)
- if proc == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func _getNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
+ r0, _, _ := syscall.Syscall9(procGetNamedSecurityInfoW.Addr(), 8, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
return
}
-func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetModuleFileNameW.Addr(), 3, uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func getSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, control *SECURITY_DESCRIPTOR_CONTROL, revision *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(control)), uintptr(unsafe.Pointer(revision)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procGetModuleHandleExW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(moduleName)), uintptr(unsafe.Pointer(module)))
+func getSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent *bool, dacl **ACL, daclDefaulted *bool) (err error) {
+ var _p0 uint32
+ if *daclPresent {
+ _p0 = 1
+ }
+ var _p1 uint32
+ if *daclDefaulted {
+ _p1 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0)
+ *daclPresent = _p0 != 0
+ *daclDefaulted = _p1 != 0
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetVersion() (ver uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetVersion.Addr(), 0, 0, 0, 0)
- ver = uint32(r0)
- if ver == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefaulted *bool) (err error) {
+ var _p0 uint32
+ if *groupDefaulted {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(&_p0)))
+ *groupDefaulted = _p0 != 0
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) {
- var _p0 *uint16
- if len(buf) > 0 {
- _p0 = &buf[0]
+func getSecurityDescriptorLength(sd *SECURITY_DESCRIPTOR) (len uint32) {
+ r0, _, _ := syscall.Syscall(procGetSecurityDescriptorLength.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0)
+ len = uint32(r0)
+ return
+}
+
+func getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefaulted *bool) (err error) {
+ var _p0 uint32
+ if *ownerDefaulted {
+ _p0 = 1
}
- r0, _, e1 := syscall.Syscall9(procFormatMessageW.Addr(), 7, uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)), 0, 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(&_p0)))
+ *ownerDefaulted = _p0 != 0
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func ExitProcess(exitcode uint32) {
- syscall.Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0)
+func getSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) (ret error) {
+ r0, _, _ := syscall.Syscall(procGetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
return
}
-func IsWow64Process(handle Handle, isWow64 *bool) (err error) {
+func getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl **ACL, saclDefaulted *bool) (err error) {
var _p0 uint32
- if *isWow64 {
+ if *saclPresent {
_p0 = 1
- } else {
- _p0 = 0
}
- r1, _, e1 := syscall.Syscall(procIsWow64Process.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(&_p0)), 0)
- *isWow64 = _p0 != 0
+ var _p1 uint32
+ if *saclDefaulted {
+ _p1 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0)
+ *saclPresent = _p0 != 0
+ *saclDefaulted = _p1 != 0
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
+ r0, _, _ := syscall.Syscall9(procGetSecurityInfo.Addr(), 8, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
return
}
-func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
- }
- r1, _, e1 := syscall.Syscall6(procReadFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
+func getSidIdentifierAuthority(sid *SID) (authority *SidIdentifierAuthority) {
+ r0, _, _ := syscall.Syscall(procGetSidIdentifierAuthority.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ authority = (*SidIdentifierAuthority)(unsafe.Pointer(r0))
+ return
+}
+
+func getSidSubAuthority(sid *SID, index uint32) (subAuthority *uint32) {
+ r0, _, _ := syscall.Syscall(procGetSidSubAuthority.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(index), 0)
+ subAuthority = (*uint32)(unsafe.Pointer(r0))
+ return
+}
+
+func getSidSubAuthorityCount(sid *SID) (count *uint8) {
+ r0, _, _ := syscall.Syscall(procGetSidSubAuthorityCount.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ count = (*uint8)(unsafe.Pointer(r0))
+ return
+}
+
+func GetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetTokenInformation.Addr(), 5, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
+func ImpersonateSelf(impersonationlevel uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procImpersonateSelf.Addr(), 1, uintptr(impersonationlevel), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
- r1, _, e1 := syscall.Syscall6(procWriteFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
+ return
+}
+
+func initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procInitializeSecurityDescriptor.Addr(), 2, uintptr(unsafe.Pointer(absoluteSD)), uintptr(revision), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) {
+func InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint32, forceAppsClosed bool, rebootAfterShutdown bool, reason uint32) (err error) {
var _p0 uint32
- if wait {
+ if forceAppsClosed {
_p0 = 1
- } else {
- _p0 = 0
}
- r1, _, e1 := syscall.Syscall6(procGetOverlappedResult.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(done)), uintptr(_p0), 0, 0)
+ var _p1 uint32
+ if rebootAfterShutdown {
+ _p1 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procInitiateSystemShutdownExW.Addr(), 6, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(message)), uintptr(timeout), uintptr(_p0), uintptr(_p1), uintptr(reason))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) {
- r0, _, e1 := syscall.Syscall6(procSetFilePointer.Addr(), 4, uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence), 0, 0)
- newlowoffset = uint32(r0)
- if newlowoffset == 0xffffffff {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func isTokenRestricted(tokenHandle Token) (ret bool, err error) {
+ r0, _, e1 := syscall.Syscall(procIsTokenRestricted.Addr(), 1, uintptr(tokenHandle), 0, 0)
+ ret = r0 != 0
+ if !ret {
+ err = errnoErr(e1)
}
return
}
-func CloseHandle(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
- }
+func isValidSecurityDescriptor(sd *SECURITY_DESCRIPTOR) (isValid bool) {
+ r0, _, _ := syscall.Syscall(procIsValidSecurityDescriptor.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0)
+ isValid = r0 != 0
return
}
-func GetStdHandle(stdhandle uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procGetStdHandle.Addr(), 1, uintptr(stdhandle), 0, 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
- }
+func isValidSid(sid *SID) (isValid bool) {
+ r0, _, _ := syscall.Syscall(procIsValidSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
+ isValid = r0 != 0
return
}
-func SetStdHandle(stdhandle uint32, handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procSetStdHandle.Addr(), 2, uintptr(stdhandle), uintptr(handle), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
- }
+func isWellKnownSid(sid *SID, sidType WELL_KNOWN_SID_TYPE) (isWellKnown bool) {
+ r0, _, _ := syscall.Syscall(procIsWellKnownSid.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(sidType), 0)
+ isWellKnown = r0 != 0
return
}
-func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func findNextFile1(handle Handle, data *win32finddata1) (err error) {
- r1, _, e1 := syscall.Syscall(procFindNextFileW.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
+func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procLookupAccountSidW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func FindClose(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFindClose.Addr(), 1, uintptr(handle), 0, 0)
+func LookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err error) {
+ r1, _, e1 := syscall.Syscall(procLookupPrivilegeValueW.Addr(), 3, uintptr(unsafe.Pointer(systemname)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) {
- r1, _, e1 := syscall.Syscall(procGetFileInformationByHandle.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
+func makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DESCRIPTOR, absoluteSDSize *uint32, dacl *ACL, daclSize *uint32, sacl *ACL, saclSize *uint32, owner *SID, ownerSize *uint32, group *SID, groupSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall12(procMakeAbsoluteSD.Addr(), 11, uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(absoluteSDSize)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(daclSize)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(saclSize)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(ownerSize)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(groupSize)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen), 0, 0)
+func makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procMakeSelfRelativeSD.Addr(), 3, uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(selfRelativeSDSize)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetCurrentDirectoryW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) {
+ r0, _, _ := syscall.Syscall(procNotifyServiceStatusChangeW.Addr(), 3, uintptr(service), uintptr(notifyMask), uintptr(unsafe.Pointer(notifier)))
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
return
}
-func SetCurrentDirectory(path *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+func OpenProcessToken(process Handle, access uint32, token *Token) (err error) {
+ r1, _, e1 := syscall.Syscall(procOpenProcessToken.Addr(), 3, uintptr(process), uintptr(access), uintptr(unsafe.Pointer(token)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) {
- r1, _, e1 := syscall.Syscall(procCreateDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procOpenSCManagerW.Addr(), 3, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(databaseName)), uintptr(access))
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
}
return
}
-func RemoveDirectory(path *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procRemoveDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procOpenServiceW.Addr(), 3, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(access))
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
}
return
}
-func DeleteFile(path *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procDeleteFileW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+func OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token) (err error) {
+ var _p0 uint32
+ if openAsSelf {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procOpenThreadToken.Addr(), 4, uintptr(thread), uintptr(access), uintptr(_p0), uintptr(unsafe.Pointer(token)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func MoveFile(from *uint16, to *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procMoveFileW.Addr(), 2, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), 0)
+func QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procQueryServiceConfig2W.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags))
+func QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procQueryServiceConfigW.Addr(), 4, uintptr(service), uintptr(unsafe.Pointer(serviceConfig)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, uintptr(file), uintptr(flags), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)))
+func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procQueryServiceLockStatusW.Addr(), 4, uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall6(procUnlockFileEx.Addr(), 5, uintptr(file), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)), 0)
+func QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) {
+ r1, _, e1 := syscall.Syscall(procQueryServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(status)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetComputerName(buf *uint16, n *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetComputerNameW.Addr(), 2, uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)), 0)
+func QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procQueryServiceStatusEx.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetComputerNameExW.Addr(), 3, uintptr(nametype), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func RegCloseKey(key Handle) (regerrno error) {
+ r0, _, _ := syscall.Syscall(procRegCloseKey.Addr(), 1, uintptr(key), 0, 0)
+ if r0 != 0 {
+ regerrno = syscall.Errno(r0)
}
return
}
-func SetEndOfFile(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procSetEndOfFile.Addr(), 1, uintptr(handle), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) {
+ r0, _, _ := syscall.Syscall9(procRegEnumKeyExW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)), 0)
+ if r0 != 0 {
+ regerrno = syscall.Errno(r0)
}
return
}
-func GetSystemTimeAsFileTime(time *Filetime) {
- syscall.Syscall(procGetSystemTimeAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
+func RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32, event Handle, asynchronous bool) (regerrno error) {
+ var _p0 uint32
+ if watchSubtree {
+ _p0 = 1
+ }
+ var _p1 uint32
+ if asynchronous {
+ _p1 = 1
+ }
+ r0, _, _ := syscall.Syscall6(procRegNotifyChangeKeyValue.Addr(), 5, uintptr(key), uintptr(_p0), uintptr(notifyFilter), uintptr(event), uintptr(_p1), 0)
+ if r0 != 0 {
+ regerrno = syscall.Errno(r0)
+ }
return
}
-func GetSystemTimePreciseAsFileTime(time *Filetime) {
- syscall.Syscall(procGetSystemTimePreciseAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
+func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) {
+ r0, _, _ := syscall.Syscall6(procRegOpenKeyExW.Addr(), 5, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)), 0)
+ if r0 != 0 {
+ regerrno = syscall.Errno(r0)
+ }
return
}
-func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(tzi)), 0, 0)
- rc = uint32(r0)
- if rc == 0xffffffff {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) {
+ r0, _, _ := syscall.Syscall12(procRegQueryInfoKeyW.Addr(), 12, uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime)))
+ if r0 != 0 {
+ regerrno = syscall.Errno(r0)
}
return
}
-func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt), 0, 0)
+func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
+ r0, _, _ := syscall.Syscall6(procRegQueryValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)))
+ if r0 != 0 {
+ regerrno = syscall.Errno(r0)
+ }
+ return
+}
+
+func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procRegisterEventSourceW.Addr(), 2, uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName)), 0)
handle = Handle(r0)
if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout), 0)
+func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) {
+ r1, _, e1 := syscall.Syscall9(procReportEventW.Addr(), 9, uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall6(procPostQueuedCompletionStatus.Addr(), 4, uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)), 0, 0)
+func RevertToSelf() (err error) {
+ r1, _, e1 := syscall.Syscall(procRevertToSelf.Addr(), 0, 0, 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CancelIo(s Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procCancelIo.Addr(), 1, uintptr(s), 0, 0)
+func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) {
+ r0, _, _ := syscall.Syscall6(procSetEntriesInAclW.Addr(), 4, uintptr(countExplicitEntries), uintptr(unsafe.Pointer(explicitEntries)), uintptr(unsafe.Pointer(oldACL)), uintptr(unsafe.Pointer(newACL)), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func SetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetKernelObjectSecurity.Addr(), 3, uintptr(handle), uintptr(securityInformation), uintptr(unsafe.Pointer(securityDescriptor)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CancelIoEx(s Handle, o *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall(procCancelIoEx.Addr(), 2, uintptr(s), uintptr(unsafe.Pointer(o)), 0)
+func SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
+ var _p0 *uint16
+ _p0, ret = syscall.UTF16PtrFromString(objectName)
+ if ret != nil {
+ return
+ }
+ return _SetNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl)
+}
+
+func _SetNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
+ r0, _, _ := syscall.Syscall9(procSetNamedSecurityInfoW.Addr(), 7, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func setSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(controlBitsOfInterest), uintptr(controlBitsToSet))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) {
+func setSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent bool, dacl *ACL, daclDefaulted bool) (err error) {
var _p0 uint32
- if inheritHandles {
+ if daclPresent {
_p0 = 1
- } else {
- _p0 = 0
}
- r1, _, e1 := syscall.Syscall12(procCreateProcessW.Addr(), 10, uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0, 0)
+ var _p1 uint32
+ if daclDefaulted {
+ _p1 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(dacl)), uintptr(_p1), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error) {
+func setSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group *SID, groupDefaulted bool) (err error) {
var _p0 uint32
- if inheritHandle {
+ if groupDefaulted {
_p0 = 1
- } else {
- _p0 = 0
}
- r0, _, e1 := syscall.Syscall(procOpenProcess.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(processId))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(_p0))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) {
- r1, _, e1 := syscall.Syscall6(procShellExecuteW.Addr(), 6, uintptr(hwnd), uintptr(unsafe.Pointer(verb)), uintptr(unsafe.Pointer(file)), uintptr(unsafe.Pointer(args)), uintptr(unsafe.Pointer(cwd)), uintptr(showCmd))
- if r1 <= 32 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaulted bool) (err error) {
+ var _p0 uint32
+ if ownerDefaulted {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(_p0))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) {
- r0, _, _ := syscall.Syscall6(procSHGetKnownFolderPath.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(flags), uintptr(token), uintptr(unsafe.Pointer(path)), 0, 0)
+func setSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) {
+ syscall.Syscall(procSetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0)
+ return
+}
+
+func setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *ACL, saclDefaulted bool) (err error) {
+ var _p0 uint32
+ if saclPresent {
+ _p0 = 1
+ }
+ var _p1 uint32
+ if saclDefaulted {
+ _p1 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(sacl)), uintptr(_p1), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
+ r0, _, _ := syscall.Syscall9(procSetSecurityInfo.Addr(), 7, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
if r0 != 0 {
ret = syscall.Errno(r0)
}
return
}
-func TerminateProcess(handle Handle, exitcode uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procTerminateProcess.Addr(), 2, uintptr(handle), uintptr(exitcode), 0)
+func SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(serviceStatus)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetExitCodeProcess.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(exitcode)), 0)
+func SetThreadToken(thread *Handle, token Token) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetThreadToken.Addr(), 2, uintptr(unsafe.Pointer(thread)), uintptr(token), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetStartupInfo(startupInfo *StartupInfo) (err error) {
- r1, _, e1 := syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0)
+func SetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetTokenInformation.Addr(), 4, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetProcessTimes.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)), 0)
+func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) {
+ r1, _, e1 := syscall.Syscall(procStartServiceCtrlDispatcherW.Addr(), 1, uintptr(unsafe.Pointer(serviceTable)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error) {
- var _p0 uint32
- if bInheritHandle {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r1, _, e1 := syscall.Syscall9(procDuplicateHandle.Addr(), 7, uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions), 0, 0)
+func StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procStartServiceW.Addr(), 3, uintptr(service), uintptr(numArgs), uintptr(unsafe.Pointer(argVectors)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) {
- r0, _, e1 := syscall.Syscall(procWaitForSingleObject.Addr(), 2, uintptr(handle), uintptr(waitMilliseconds), 0)
- event = uint32(r0)
- if event == 0xffffffff {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) {
+ r1, _, e1 := syscall.Syscall6(procCertAddCertificateContextToStore.Addr(), 4, uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMilliseconds uint32) (event uint32, err error) {
- var _p0 uint32
- if waitAll {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r0, _, e1 := syscall.Syscall6(procWaitForMultipleObjects.Addr(), 4, uintptr(count), uintptr(handles), uintptr(_p0), uintptr(waitMilliseconds), 0, 0)
- event = uint32(r0)
- if event == 0xffffffff {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CertCloseStore(store Handle, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procCertCloseStore.Addr(), 2, uintptr(store), uintptr(flags), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetTempPathW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) {
+ r0, _, e1 := syscall.Syscall(procCertCreateCertificateContext.Addr(), 3, uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen))
+ context = (*CertContext)(unsafe.Pointer(r0))
+ if context == nil {
+ err = errnoErr(e1)
}
return
}
-func CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procCreatePipe.Addr(), 4, uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size), 0, 0)
+func CertDeleteCertificateFromStore(certContext *CertContext) (err error) {
+ r1, _, e1 := syscall.Syscall(procCertDeleteCertificateFromStore.Addr(), 1, uintptr(unsafe.Pointer(certContext)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetFileType(filehandle Handle) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CertDuplicateCertificateContext(certContext *CertContext) (dupContext *CertContext) {
+ r0, _, _ := syscall.Syscall(procCertDuplicateCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(certContext)), 0, 0)
+ dupContext = (*CertContext)(unsafe.Pointer(r0))
+ return
+}
+
+func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) {
+ r0, _, e1 := syscall.Syscall(procCertEnumCertificatesInStore.Addr(), 2, uintptr(store), uintptr(unsafe.Pointer(prevContext)), 0)
+ context = (*CertContext)(unsafe.Pointer(r0))
+ if context == nil {
+ err = errnoErr(e1)
}
return
}
-func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procCryptAcquireContextW.Addr(), 5, uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) {
+ r0, _, e1 := syscall.Syscall6(procCertFindCertificateInStore.Addr(), 6, uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevCertContext)))
+ cert = (*CertContext)(unsafe.Pointer(r0))
+ if cert == nil {
+ err = errnoErr(e1)
}
return
}
-func CryptReleaseContext(provhandle Handle, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procCryptReleaseContext.Addr(), 2, uintptr(provhandle), uintptr(flags), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) {
+ r0, _, e1 := syscall.Syscall6(procCertFindChainInStore.Addr(), 6, uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevChainContext)))
+ certchain = (*CertChainContext)(unsafe.Pointer(r0))
+ if certchain == nil {
+ err = errnoErr(e1)
}
return
}
-func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) {
- r1, _, e1 := syscall.Syscall(procCryptGenRandom.Addr(), 3, uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf)))
+func CertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) {
+ r0, _, _ := syscall.Syscall(procCertFindExtension.Addr(), 3, uintptr(unsafe.Pointer(objId)), uintptr(countExtensions), uintptr(unsafe.Pointer(extensions)))
+ ret = (*CertExtension)(unsafe.Pointer(r0))
+ return
+}
+
+func CertFreeCertificateChain(ctx *CertChainContext) {
+ syscall.Syscall(procCertFreeCertificateChain.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
+ return
+}
+
+func CertFreeCertificateContext(ctx *CertContext) (err error) {
+ r1, _, e1 := syscall.Syscall(procCertFreeCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetEnvironmentStrings() (envs *uint16, err error) {
- r0, _, e1 := syscall.Syscall(procGetEnvironmentStringsW.Addr(), 0, 0, 0, 0)
- envs = (*uint16)(unsafe.Pointer(r0))
- if envs == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) {
+ r1, _, e1 := syscall.Syscall9(procCertGetCertificateChain.Addr(), 8, uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func FreeEnvironmentStrings(envs *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procFreeEnvironmentStringsW.Addr(), 1, uintptr(unsafe.Pointer(envs)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, name *uint16, size uint32) (chars uint32) {
+ r0, _, _ := syscall.Syscall6(procCertGetNameStringW.Addr(), 6, uintptr(unsafe.Pointer(certContext)), uintptr(nameType), uintptr(flags), uintptr(typePara), uintptr(unsafe.Pointer(name)), uintptr(size))
+ chars = uint32(r0)
+ return
+}
+
+func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCertOpenStore.Addr(), 5, uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para), 0)
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetEnvironmentVariableW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procCertOpenSystemStoreW.Addr(), 2, uintptr(hprov), uintptr(unsafe.Pointer(name)), 0)
+ store = Handle(r0)
+ if store == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetEnvironmentVariable(name *uint16, value *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0)
+func CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) {
+ r1, _, e1 := syscall.Syscall6(procCertVerifyCertificateChainPolicy.Addr(), 4, uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) {
+func CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, parameters unsafe.Pointer, cryptProvOrNCryptKey *Handle, keySpec *uint32, callerFreeProvOrNCryptKey *bool) (err error) {
var _p0 uint32
- if inheritExisting {
+ if *callerFreeProvOrNCryptKey {
_p0 = 1
- } else {
- _p0 = 0
}
- r1, _, e1 := syscall.Syscall(procCreateEnvironmentBlock.Addr(), 3, uintptr(unsafe.Pointer(block)), uintptr(token), uintptr(_p0))
+ r1, _, e1 := syscall.Syscall6(procCryptAcquireCertificatePrivateKey.Addr(), 6, uintptr(unsafe.Pointer(cert)), uintptr(flags), uintptr(parameters), uintptr(unsafe.Pointer(cryptProvOrNCryptKey)), uintptr(unsafe.Pointer(keySpec)), uintptr(unsafe.Pointer(&_p0)))
+ *callerFreeProvOrNCryptKey = _p0 != 0
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func DestroyEnvironmentBlock(block *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procDestroyEnvironmentBlock.Addr(), 1, uintptr(unsafe.Pointer(block)), 0, 0)
+func CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procCryptDecodeObject.Addr(), 7, uintptr(encodingType), uintptr(unsafe.Pointer(structType)), uintptr(unsafe.Pointer(encodedBytes)), uintptr(lenEncodedBytes), uintptr(flags), uintptr(decoded), uintptr(unsafe.Pointer(decodedLen)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func getTickCount64() (ms uint64) {
- r0, _, _ := syscall.Syscall(procGetTickCount64.Addr(), 0, 0, 0, 0)
- ms = uint64(r0)
+func CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) {
+ r1, _, e1 := syscall.Syscall9(procCryptProtectData.Addr(), 7, uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0)
+func CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) {
+ r1, _, e1 := syscall.Syscall12(procCryptQueryObject.Addr(), 11, uintptr(objectType), uintptr(object), uintptr(expectedContentTypeFlags), uintptr(expectedFormatTypeFlags), uintptr(flags), uintptr(unsafe.Pointer(msgAndCertEncodingType)), uintptr(unsafe.Pointer(contentType)), uintptr(unsafe.Pointer(formatType)), uintptr(unsafe.Pointer(certStore)), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(context)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetFileAttributes(name *uint16) (attrs uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetFileAttributesW.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
- attrs = uint32(r0)
- if attrs == INVALID_FILE_ATTRIBUTES {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) {
+ r1, _, e1 := syscall.Syscall9(procCryptUnprotectData.Addr(), 7, uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetFileAttributes(name *uint16, attrs uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetFileAttributesW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(attrs), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (store Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procPFXImportCertStore.Addr(), 3, uintptr(unsafe.Pointer(pfx)), uintptr(unsafe.Pointer(password)), uintptr(flags))
+ store = Handle(r0)
+ if store == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) {
- r1, _, e1 := syscall.Syscall(procGetFileAttributesExW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info)))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) {
+ r0, _, _ := syscall.Syscall(procDnsNameCompare_W.Addr(), 2, uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2)), 0)
+ same = r0 != 0
+ return
+}
+
+func DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
+ var _p0 *uint16
+ _p0, status = syscall.UTF16PtrFromString(name)
+ if status != nil {
+ return
+ }
+ return _DnsQuery(_p0, qtype, options, extra, qrs, pr)
+}
+
+func _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
+ r0, _, _ := syscall.Syscall6(procDnsQuery_W.Addr(), 6, uintptr(unsafe.Pointer(name)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr)))
+ if r0 != 0 {
+ status = syscall.Errno(r0)
}
return
}
-func GetCommandLine() (cmd *uint16) {
- r0, _, _ := syscall.Syscall(procGetCommandLineW.Addr(), 0, 0, 0, 0)
- cmd = (*uint16)(unsafe.Pointer(r0))
+func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
+ syscall.Syscall(procDnsRecordListFree.Addr(), 2, uintptr(unsafe.Pointer(rl)), uintptr(freetype), 0)
return
}
-func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) {
- r0, _, e1 := syscall.Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0)
- argv = (*[8192]*[8192]uint16)(unsafe.Pointer(r0))
- if argv == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
+ r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0)
+ if r0 != 0 {
+ errcode = syscall.Errno(r0)
}
return
}
-func LocalFree(hmem Handle) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procLocalFree.Addr(), 1, uintptr(hmem), 0, 0)
- handle = Handle(r0)
- if handle != 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
+ r0, _, _ := syscall.Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)), 0)
+ if r0 != 0 {
+ errcode = syscall.Errno(r0)
}
return
}
-func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetHandleInformation.Addr(), 3, uintptr(handle), uintptr(mask), uintptr(flags))
+func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
+ r0, _, _ := syscall.Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0)
+ if r0 != 0 {
+ errcode = syscall.Errno(r0)
+ }
+ return
+}
+
+func AssignProcessToJobObject(job Handle, process Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procAssignProcessToJobObject.Addr(), 2, uintptr(job), uintptr(process), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func FlushFileBuffers(handle Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFlushFileBuffers.Addr(), 1, uintptr(handle), 0, 0)
+func CancelIo(s Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procCancelIo.Addr(), 1, uintptr(s), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall6(procGetFullPathNameW.Addr(), 4, uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)), 0, 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CancelIoEx(s Handle, o *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall(procCancelIoEx.Addr(), 2, uintptr(s), uintptr(unsafe.Pointer(o)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetLongPathNameW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CloseHandle(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetShortPathNameW.Addr(), 3, uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall(procConnectNamedPipe.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(overlapped)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateFileMappingW.Addr(), 6, uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name)))
+func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) {
+ r1, _, e1 := syscall.Syscall(procCreateDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCreateEventExW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0)
handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
+ err = errnoErr(e1)
}
return
}
-func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) {
- r0, _, e1 := syscall.Syscall6(procMapViewOfFile.Addr(), 5, uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length), 0)
- addr = uintptr(r0)
- if addr == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCreateEventW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name)), 0, 0)
+ handle = Handle(r0)
+ if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
+ err = errnoErr(e1)
}
return
}
-func UnmapViewOfFile(addr uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procUnmapViewOfFile.Addr(), 1, uintptr(addr), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCreateFileMappingW.Addr(), 6, uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name)))
+ handle = Handle(r0)
+ if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
+ err = errnoErr(e1)
}
return
}
-func FlushViewOfFile(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procFlushViewOfFile.Addr(), 2, uintptr(addr), uintptr(length), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
}
return
}
-func VirtualLock(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procVirtualLock.Addr(), 2, uintptr(addr), uintptr(length), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procCreateHardLinkW.Addr(), 3, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(existingfilename)), uintptr(reserved))
+ if r1&0xff == 0 {
+ err = errnoErr(e1)
}
return
}
-func VirtualUnlock(addr uintptr, length uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, threadcnt uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt), 0, 0)
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
}
return
}
-func VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) {
- r0, _, e1 := syscall.Syscall6(procVirtualAlloc.Addr(), 4, uintptr(address), uintptr(size), uintptr(alloctype), uintptr(protect), 0, 0)
- value = uintptr(r0)
- if value == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procCreateJobObjectW.Addr(), 2, uintptr(unsafe.Pointer(jobAttr)), uintptr(unsafe.Pointer(name)), 0)
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
}
return
}
-func VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procVirtualFree.Addr(), 3, uintptr(address), uintptr(size), uintptr(freetype))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCreateMutexExW.Addr(), 4, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0)
+ handle = Handle(r0)
+ if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
+ err = errnoErr(e1)
}
return
}
-func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procVirtualProtect.Addr(), 4, uintptr(address), uintptr(size), uintptr(newprotect), uintptr(unsafe.Pointer(oldprotect)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) {
+ var _p0 uint32
+ if initialOwner {
+ _p0 = 1
+ }
+ r0, _, e1 := syscall.Syscall(procCreateMutexW.Addr(), 3, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(_p0), uintptr(unsafe.Pointer(name)))
+ handle = Handle(r0)
+ if handle == 0 || e1 == ERROR_ALREADY_EXISTS {
+ err = errnoErr(e1)
}
return
}
-func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procTransmitFile.Addr(), 7, uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags), 0, 0)
+func CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall9(procCreateNamedPipeW.Addr(), 8, uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa)), 0)
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procCreatePipe.Addr(), 4, uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
+func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) {
var _p0 uint32
- if watchSubTree {
+ if inheritHandles {
_p0 = 1
- } else {
- _p0 = 0
}
- r1, _, e1 := syscall.Syscall9(procReadDirectoryChangesW.Addr(), 8, uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine), 0)
+ r1, _, e1 := syscall.Syscall12(procCreateProcessW.Addr(), 10, uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) {
- r0, _, e1 := syscall.Syscall(procCertOpenSystemStoreW.Addr(), 2, uintptr(hprov), uintptr(unsafe.Pointer(name)), 0)
- store = Handle(r0)
- if store == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procCreateSymbolicLinkW.Addr(), 3, uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags))
+ if r1&0xff == 0 {
+ err = errnoErr(e1)
}
return
}
-func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCertOpenStore.Addr(), 5, uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para), 0)
+func CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procCreateToolhelp32Snapshot.Addr(), 2, uintptr(flags), uintptr(processId), 0)
handle = Handle(r0)
if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) {
- r0, _, e1 := syscall.Syscall(procCertEnumCertificatesInStore.Addr(), 2, uintptr(store), uintptr(unsafe.Pointer(prevContext)), 0)
- context = (*CertContext)(unsafe.Pointer(r0))
- if context == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procDefineDosDeviceW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) {
- r1, _, e1 := syscall.Syscall6(procCertAddCertificateContextToStore.Addr(), 4, uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)), 0, 0)
+func DeleteFile(path *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procDeleteFileW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CertCloseStore(store Handle, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procCertCloseStore.Addr(), 2, uintptr(store), uintptr(flags), 0)
+func deleteProcThreadAttributeList(attrlist *ProcThreadAttributeList) {
+ syscall.Syscall(procDeleteProcThreadAttributeList.Addr(), 1, uintptr(unsafe.Pointer(attrlist)), 0, 0)
+ return
+}
+
+func DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procDeleteVolumeMountPointW.Addr(), 1, uintptr(unsafe.Pointer(volumeMountPoint)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) {
- r1, _, e1 := syscall.Syscall9(procCertGetCertificateChain.Addr(), 8, uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)), 0)
+func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall9(procDeviceIoControl.Addr(), 8, uintptr(handle), uintptr(ioControlCode), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferSize), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferSize), uintptr(unsafe.Pointer(bytesReturned)), uintptr(unsafe.Pointer(overlapped)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CertFreeCertificateChain(ctx *CertChainContext) {
- syscall.Syscall(procCertFreeCertificateChain.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
+func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error) {
+ var _p0 uint32
+ if bInheritHandle {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall9(procDuplicateHandle.Addr(), 7, uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) {
- r0, _, e1 := syscall.Syscall(procCertCreateCertificateContext.Addr(), 3, uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen))
- context = (*CertContext)(unsafe.Pointer(r0))
- if context == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
- }
+func ExitProcess(exitcode uint32) {
+ syscall.Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0)
return
}
-func CertFreeCertificateContext(ctx *CertContext) (err error) {
- r1, _, e1 := syscall.Syscall(procCertFreeCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0)
+func FindClose(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindClose.Addr(), 1, uintptr(handle), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) {
- r1, _, e1 := syscall.Syscall6(procCertVerifyCertificateChainPolicy.Addr(), 4, uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)), 0, 0)
+func FindCloseChangeNotification(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindCloseChangeNotification.Addr(), 1, uintptr(handle), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) {
- r0, _, _ := syscall.Syscall6(procRegOpenKeyExW.Addr(), 5, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)), 0)
- if r0 != 0 {
- regerrno = syscall.Errno(r0)
+func FindFirstChangeNotification(path string, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(path)
+ if err != nil {
+ return
+ }
+ return _FindFirstChangeNotification(_p0, watchSubtree, notifyFilter)
+}
+
+func _FindFirstChangeNotification(path *uint16, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) {
+ var _p1 uint32
+ if watchSubtree {
+ _p1 = 1
+ }
+ r0, _, e1 := syscall.Syscall(procFindFirstChangeNotificationW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(_p1), uintptr(notifyFilter))
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
}
return
}
-func RegCloseKey(key Handle) (regerrno error) {
- r0, _, _ := syscall.Syscall(procRegCloseKey.Addr(), 1, uintptr(key), 0, 0)
- if r0 != 0 {
- regerrno = syscall.Errno(r0)
+func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0)
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
}
return
}
-func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) {
- r0, _, _ := syscall.Syscall12(procRegQueryInfoKeyW.Addr(), 12, uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime)))
- if r0 != 0 {
- regerrno = syscall.Errno(r0)
+func FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procFindFirstVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
}
return
}
-func RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) {
- r0, _, _ := syscall.Syscall9(procRegEnumKeyExW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)), 0)
- if r0 != 0 {
- regerrno = syscall.Errno(r0)
+func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procFindFirstVolumeW.Addr(), 2, uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength), 0)
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
}
return
}
-func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) {
- r0, _, _ := syscall.Syscall6(procRegQueryValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)))
- if r0 != 0 {
- regerrno = syscall.Errno(r0)
+func FindNextChangeNotification(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindNextChangeNotification.Addr(), 1, uintptr(handle), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetCurrentProcessId() (pid uint32) {
- r0, _, _ := syscall.Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0)
- pid = uint32(r0)
+func findNextFile1(handle Handle, data *win32finddata1) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindNextFileW.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func GetConsoleMode(console Handle, mode *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0)
+func FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindNextVolumeMountPointW.Addr(), 3, uintptr(findVolumeMountPoint), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetConsoleMode(console Handle, mode uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(console), uintptr(mode), 0)
+func FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindNextVolumeW.Addr(), 3, uintptr(findVolume), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) {
- r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0)
+func findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procFindResourceW.Addr(), 3, uintptr(module), uintptr(name), uintptr(resType))
+ resInfo = Handle(r0)
+ if resInfo == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func FindVolumeClose(findVolume Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindVolumeClose.Addr(), 1, uintptr(findVolume), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) {
- r1, _, e1 := syscall.Syscall6(procWriteConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)), 0)
+func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFindVolumeMountPointClose.Addr(), 1, uintptr(findVolumeMountPoint), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) {
- r1, _, e1 := syscall.Syscall6(procReadConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)), 0)
+func FlushFileBuffers(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFlushFileBuffers.Addr(), 1, uintptr(handle), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procCreateToolhelp32Snapshot.Addr(), 2, uintptr(flags), uintptr(processId), 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func FlushViewOfFile(addr uintptr, length uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procFlushViewOfFile.Addr(), 2, uintptr(addr), uintptr(length), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procProcess32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0)
+func FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) {
+ var _p0 *uint16
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ r0, _, e1 := syscall.Syscall9(procFormatMessageW.Addr(), 7, uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)), 0, 0)
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func FreeEnvironmentStrings(envs *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procFreeEnvironmentStringsW.Addr(), 1, uintptr(unsafe.Pointer(envs)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procProcess32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0)
+func FreeLibrary(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procFreeLibrary.Addr(), 1, uintptr(handle), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procThread32First.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0)
+func GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGenerateConsoleCtrlEvent.Addr(), 2, uintptr(ctrlEvent), uintptr(processGroupID), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func Thread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
- r1, _, e1 := syscall.Syscall(procThread32Next.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0)
+func GetACP() (acp uint32) {
+ r0, _, _ := syscall.Syscall(procGetACP.Addr(), 0, 0, 0, 0)
+ acp = uint32(r0)
+ return
+}
+
+func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall9(procDeviceIoControl.Addr(), 8, uintptr(handle), uintptr(ioControlCode), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferSize), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferSize), uintptr(unsafe.Pointer(bytesReturned)), uintptr(unsafe.Pointer(overlapped)), 0)
+func GetCommandLine() (cmd *uint16) {
+ r0, _, _ := syscall.Syscall(procGetCommandLineW.Addr(), 0, 0, 0, 0)
+ cmd = (*uint16)(unsafe.Pointer(r0))
+ return
+}
+
+func GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetComputerNameExW.Addr(), 3, uintptr(nametype), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procCreateSymbolicLinkW.Addr(), 3, uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags))
- if r1&0xff == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetComputerName(buf *uint16, n *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetComputerNameW.Addr(), 2, uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) {
- r1, _, e1 := syscall.Syscall(procCreateHardLinkW.Addr(), 3, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(existingfilename)), uintptr(reserved))
- if r1&0xff == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetConsoleMode(console Handle, mode *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
+func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetCurrentDirectoryW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetCurrentProcessId() (pid uint32) {
+ r0, _, _ := syscall.Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0)
+ pid = uint32(r0)
+ return
+}
+
func GetCurrentThreadId() (id uint32) {
r0, _, _ := syscall.Syscall(procGetCurrentThreadId.Addr(), 0, 0, 0, 0)
id = uint32(r0)
return
}
-func CreateEvent(eventAttrs *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateEventW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name)), 0, 0)
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint64, totalNumberOfBytes *uint64, totalNumberOfFreeBytes *uint64) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetDiskFreeSpaceExW.Addr(), 4, uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateEventExW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0)
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
- }
+func GetDriveType(rootPathName *uint16) (driveType uint32) {
+ r0, _, _ := syscall.Syscall(procGetDriveTypeW.Addr(), 1, uintptr(unsafe.Pointer(rootPathName)), 0, 0)
+ driveType = uint32(r0)
return
}
-func OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) {
- var _p0 uint32
- if inheritHandle {
- _p0 = 1
- } else {
- _p0 = 0
+func GetEnvironmentStrings() (envs *uint16, err error) {
+ r0, _, e1 := syscall.Syscall(procGetEnvironmentStringsW.Addr(), 0, 0, 0, 0)
+ envs = (*uint16)(unsafe.Pointer(r0))
+ if envs == nil {
+ err = errnoErr(e1)
}
- r0, _, e1 := syscall.Syscall(procOpenEventW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetEnvironmentVariableW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size))
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetEvent(event Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procSetEvent.Addr(), 1, uintptr(event), 0, 0)
+func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetExitCodeProcess.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(exitcode)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ResetEvent(event Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procResetEvent.Addr(), 1, uintptr(event), 0, 0)
+func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetFileAttributesExW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func PulseEvent(event Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procPulseEvent.Addr(), 1, uintptr(event), 0, 0)
+func GetFileAttributes(name *uint16) (attrs uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetFileAttributesW.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
+ attrs = uint32(r0)
+ if attrs == INVALID_FILE_ATTRIBUTES {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetFileInformationByHandle.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) {
- var _p0 uint32
- if initialOwner {
- _p0 = 1
- } else {
- _p0 = 0
+func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
- r0, _, e1 := syscall.Syscall(procCreateMutexW.Addr(), 3, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(_p0), uintptr(unsafe.Pointer(name)))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func GetFileType(filehandle Handle) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0)
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall6(procCreateMutexExW.Addr(), 4, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0)
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall6(procGetFinalPathNameByHandleW.Addr(), 4, uintptr(file), uintptr(unsafe.Pointer(filePath)), uintptr(filePathSize), uintptr(flags), 0, 0)
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) {
- var _p0 uint32
- if inheritHandle {
- _p0 = 1
- } else {
- _p0 = 0
+func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall6(procGetFullPathNameW.Addr(), 4, uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)), 0, 0)
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
- r0, _, e1 := syscall.Syscall(procOpenMutexW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func GetLastError() (lasterr error) {
+ r0, _, _ := syscall.Syscall(procGetLastError.Addr(), 0, 0, 0, 0)
+ if r0 != 0 {
+ lasterr = syscall.Errno(r0)
}
return
}
-func ReleaseMutex(mutex Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procReleaseMutex.Addr(), 1, uintptr(mutex), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetLogicalDriveStringsW.Addr(), 2, uintptr(bufferLength), uintptr(unsafe.Pointer(buffer)), 0)
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func SleepEx(milliseconds uint32, alertable bool) (ret uint32) {
- var _p0 uint32
- if alertable {
- _p0 = 1
- } else {
- _p0 = 0
+func GetLogicalDrives() (drivesBitMask uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetLogicalDrives.Addr(), 0, 0, 0, 0)
+ drivesBitMask = uint32(r0)
+ if drivesBitMask == 0 {
+ err = errnoErr(e1)
}
- r0, _, _ := syscall.Syscall(procSleepEx.Addr(), 2, uintptr(milliseconds), uintptr(_p0), 0)
- ret = uint32(r0)
return
}
-func CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procCreateJobObjectW.Addr(), 2, uintptr(unsafe.Pointer(jobAttr)), uintptr(unsafe.Pointer(name)), 0)
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetLongPathNameW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen))
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func AssignProcessToJobObject(job Handle, process Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procAssignProcessToJobObject.Addr(), 2, uintptr(job), uintptr(process), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetModuleFileNameW.Addr(), 3, uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func TerminateJobObject(job Handle, exitCode uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procTerminateJobObject.Addr(), 2, uintptr(job), uintptr(exitCode), 0)
+func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetModuleHandleExW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(moduleName)), uintptr(unsafe.Pointer(module)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetErrorMode(mode uint32) (ret uint32) {
- r0, _, _ := syscall.Syscall(procSetErrorMode.Addr(), 1, uintptr(mode), 0, 0)
- ret = uint32(r0)
+func GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procGetNamedPipeHandleStateW.Addr(), 7, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func ResumeThread(thread Handle) (ret uint32, err error) {
- r0, _, e1 := syscall.Syscall(procResumeThread.Addr(), 1, uintptr(thread), 0, 0)
- ret = uint32(r0)
- if ret == 0xffffffff {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetNamedPipeInfo.Addr(), 5, uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetPriorityClass(process Handle, priorityClass uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetPriorityClass.Addr(), 2, uintptr(process), uintptr(priorityClass), 0)
+func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) {
+ var _p0 uint32
+ if wait {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procGetOverlappedResult.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(done)), uintptr(_p0), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
@@ -2330,36 +2092,25 @@ func GetPriorityClass(process Handle) (ret uint32, err error) {
r0, _, e1 := syscall.Syscall(procGetPriorityClass.Addr(), 1, uintptr(process), 0, 0)
ret = uint32(r0)
if ret == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error) {
- r0, _, e1 := syscall.Syscall6(procSetInformationJobObject.Addr(), 4, uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), 0, 0)
- ret = int(r0)
- if ret == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetProcAddress(module Handle, procname string) (proc uintptr, err error) {
+ var _p0 *byte
+ _p0, err = syscall.BytePtrFromString(procname)
+ if err != nil {
+ return
}
- return
+ return _GetProcAddress(module, _p0)
}
-func GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGenerateConsoleCtrlEvent.Addr(), 2, uintptr(ctrlEvent), uintptr(processGroupID), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) {
+ r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), uintptr(unsafe.Pointer(procname)), 0)
+ proc = uintptr(r0)
+ if proc == 0 {
+ err = errnoErr(e1)
}
return
}
@@ -2368,202 +2119,155 @@ func GetProcessId(process Handle) (id uint32, err error) {
r0, _, e1 := syscall.Syscall(procGetProcessId.Addr(), 1, uintptr(process), 0, 0)
id = uint32(r0)
if id == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error) {
- var _p0 uint32
- if inheritHandle {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r0, _, e1 := syscall.Syscall(procOpenThread.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(threadId))
- handle = Handle(r0)
- if handle == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetProcessPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetProcessPriorityBoost(process Handle, disable bool) (err error) {
- var _p0 uint32
- if disable {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r1, _, e1 := syscall.Syscall(procSetProcessPriorityBoost.Addr(), 2, uintptr(process), uintptr(_p0), 0)
+func GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetProcessShutdownParameters.Addr(), 2, uintptr(unsafe.Pointer(level)), uintptr(unsafe.Pointer(flags)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procDefineDosDeviceW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)))
+func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetProcessTimes.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procDeleteVolumeMountPointW.Addr(), 1, uintptr(unsafe.Pointer(volumeMountPoint)), 0, 0)
+func GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32) {
+ syscall.Syscall6(procGetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(unsafe.Pointer(lpMinimumWorkingSetSize)), uintptr(unsafe.Pointer(lpMaximumWorkingSetSize)), uintptr(unsafe.Pointer(flags)), 0, 0)
+ return
+}
+
+func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overlapped **Overlapped, timeout uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procFindFirstVolumeW.Addr(), 2, uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength), 0)
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetShortPathNameW.Addr(), 3, uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen))
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procFindFirstVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
+func GetStartupInfo(startupInfo *StartupInfo) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetStdHandle(stdhandle uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procGetStdHandle.Addr(), 1, uintptr(stdhandle), 0, 0)
handle = Handle(r0)
if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procFindNextVolumeW.Addr(), 3, uintptr(findVolume), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetSystemDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
+ len = uint32(r0)
+ if len == 0 {
+ err = errnoErr(e1)
}
return
}
-func FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procFindNextVolumeMountPointW.Addr(), 3, uintptr(findVolumeMountPoint), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength))
+func getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetSystemPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func FindVolumeClose(findVolume Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFindVolumeClose.Addr(), 1, uintptr(findVolume), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetSystemTimeAsFileTime(time *Filetime) {
+ syscall.Syscall(procGetSystemTimeAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
+ return
+}
+
+func GetSystemTimePreciseAsFileTime(time *Filetime) {
+ syscall.Syscall(procGetSystemTimePreciseAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0)
+ return
+}
+
+func getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetSystemWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
+ len = uint32(r0)
+ if len == 0 {
+ err = errnoErr(e1)
}
return
}
-func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procFindVolumeMountPointClose.Addr(), 1, uintptr(findVolumeMountPoint), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetTempPathW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0)
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint64, totalNumberOfBytes *uint64, totalNumberOfFreeBytes *uint64) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetDiskFreeSpaceExW.Addr(), 4, uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)), 0, 0)
+func getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetThreadPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetDriveType(rootPathName *uint16) (driveType uint32) {
- r0, _, _ := syscall.Syscall(procGetDriveTypeW.Addr(), 1, uintptr(unsafe.Pointer(rootPathName)), 0, 0)
- driveType = uint32(r0)
+func getTickCount64() (ms uint64) {
+ r0, _, _ := syscall.Syscall(procGetTickCount64.Addr(), 0, 0, 0, 0)
+ ms = uint64(r0)
return
}
-func GetLogicalDrives() (drivesBitMask uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetLogicalDrives.Addr(), 0, 0, 0, 0)
- drivesBitMask = uint32(r0)
- if drivesBitMask == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(tzi)), 0, 0)
+ rc = uint32(r0)
+ if rc == 0xffffffff {
+ err = errnoErr(e1)
}
return
}
-func GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetLogicalDriveStringsW.Addr(), 2, uintptr(bufferLength), uintptr(unsafe.Pointer(buffer)), 0)
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetUserPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procGetVolumeInformationW.Addr(), 8, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetVersion() (ver uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetVersion.Addr(), 0, 0, 0, 0)
+ ver = uint32(r0)
+ if ver == 0 {
+ err = errnoErr(e1)
}
return
}
@@ -2571,11 +2275,15 @@ func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volume
func GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {
r1, _, e1 := syscall.Syscall9(procGetVolumeInformationByHandleW.Addr(), 8, uintptr(file), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procGetVolumeInformationW.Addr(), 8, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
@@ -2583,11 +2291,7 @@ func GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeN
func GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) {
r1, _, e1 := syscall.Syscall(procGetVolumeNameForVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferlength))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
@@ -2595,11 +2299,7 @@ func GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint
func GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) {
r1, _, e1 := syscall.Syscall(procGetVolumePathNameW.Addr(), 3, uintptr(unsafe.Pointer(fileName)), uintptr(unsafe.Pointer(volumePathName)), uintptr(bufferLength))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
@@ -2607,1445 +2307,1333 @@ func GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength ui
func GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) {
r1, _, e1 := syscall.Syscall6(procGetVolumePathNamesForVolumeNameW.Addr(), 4, uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(volumePathNames)), uintptr(bufferLength), uintptr(unsafe.Pointer(returnLength)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) {
- r0, _, e1 := syscall.Syscall(procQueryDosDeviceW.Addr(), 3, uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max))
- n = uint32(r0)
- if n == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
+ len = uint32(r0)
+ if len == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procSetVolumeLabelW.Addr(), 2, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeName)), 0)
+func initializeProcThreadAttributeList(attrlist *ProcThreadAttributeList, attrcount uint32, flags uint32, size *uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall6(procInitializeProcThreadAttributeList.Addr(), 4, uintptr(unsafe.Pointer(attrlist)), uintptr(attrcount), uintptr(flags), uintptr(unsafe.Pointer(size)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procSetVolumeMountPointW.Addr(), 2, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), 0)
+func IsWow64Process(handle Handle, isWow64 *bool) (err error) {
+ var _p0 uint32
+ if *isWow64 {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall(procIsWow64Process.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(&_p0)), 0)
+ *isWow64 = _p0 != 0
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func MessageBox(hwnd Handle, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {
- r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0)
- ret = int32(r0)
- if ret == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func IsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint16) (err error) {
+ err = procIsWow64Process2.Find()
+ if err != nil {
+ return
+ }
+ r1, _, e1 := syscall.Syscall(procIsWow64Process2.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(processMachine)), uintptr(unsafe.Pointer(nativeMachine)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func ExitWindowsEx(flags uint32, reason uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procExitWindowsEx.Addr(), 2, uintptr(flags), uintptr(reason), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(libname)
+ if err != nil {
+ return
+ }
+ return _LoadLibraryEx(_p0, zero, flags)
+}
+
+func _LoadLibraryEx(libname *uint16, zero Handle, flags uintptr) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procLoadLibraryExW.Addr(), 3, uintptr(unsafe.Pointer(libname)), uintptr(zero), uintptr(flags))
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
}
return
}
-func InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint32, forceAppsClosed bool, rebootAfterShutdown bool, reason uint32) (err error) {
- var _p0 uint32
- if forceAppsClosed {
- _p0 = 1
- } else {
- _p0 = 0
+func LoadLibrary(libname string) (handle Handle, err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(libname)
+ if err != nil {
+ return
}
- var _p1 uint32
- if rebootAfterShutdown {
- _p1 = 1
- } else {
- _p1 = 0
+ return _LoadLibrary(_p0)
+}
+
+func _LoadLibrary(libname *uint16) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procLoadLibraryW.Addr(), 1, uintptr(unsafe.Pointer(libname)), 0, 0)
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
}
- r1, _, e1 := syscall.Syscall6(procInitiateSystemShutdownExW.Addr(), 6, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(message)), uintptr(timeout), uintptr(_p0), uintptr(_p1), uintptr(reason))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func LoadResource(module Handle, resInfo Handle) (resData Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procLoadResource.Addr(), 2, uintptr(module), uintptr(resInfo), 0)
+ resData = Handle(r0)
+ if resData == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetProcessShutdownParameters(level uint32, flags uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procSetProcessShutdownParameters.Addr(), 2, uintptr(level), uintptr(flags), 0)
+func LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error) {
+ r0, _, e1 := syscall.Syscall(procLocalAlloc.Addr(), 2, uintptr(flags), uintptr(length), 0)
+ ptr = uintptr(r0)
+ if ptr == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func LocalFree(hmem Handle) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procLocalFree.Addr(), 1, uintptr(hmem), 0, 0)
+ handle = Handle(r0)
+ if handle != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, uintptr(file), uintptr(flags), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetProcessShutdownParameters.Addr(), 2, uintptr(unsafe.Pointer(level)), uintptr(unsafe.Pointer(flags)), 0)
+func LockResource(resData Handle) (addr uintptr, err error) {
+ r0, _, e1 := syscall.Syscall(procLockResource.Addr(), 1, uintptr(resData), 0, 0)
+ addr = uintptr(r0)
+ if addr == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) {
+ r0, _, e1 := syscall.Syscall6(procMapViewOfFile.Addr(), 5, uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length), 0)
+ addr = uintptr(r0)
+ if addr == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) {
- r0, _, _ := syscall.Syscall(procCLSIDFromString.Addr(), 2, uintptr(unsafe.Pointer(lpsz)), uintptr(unsafe.Pointer(pclsid)), 0)
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func MoveFile(from *uint16, to *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procMoveFileW.Addr(), 2, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) {
- r0, _, _ := syscall.Syscall(procStringFromGUID2.Addr(), 3, uintptr(unsafe.Pointer(rguid)), uintptr(unsafe.Pointer(lpsz)), uintptr(cchMax))
- chars = int32(r0)
+func MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) {
+ r0, _, e1 := syscall.Syscall6(procMultiByteToWideChar.Addr(), 6, uintptr(codePage), uintptr(dwFlags), uintptr(unsafe.Pointer(str)), uintptr(nstr), uintptr(unsafe.Pointer(wchar)), uintptr(nwchar))
+ nwrite = int32(r0)
+ if nwrite == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func coCreateGuid(pguid *GUID) (ret error) {
- r0, _, _ := syscall.Syscall(procCoCreateGuid.Addr(), 1, uintptr(unsafe.Pointer(pguid)), 0, 0)
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) {
+ var _p0 uint32
+ if inheritHandle {
+ _p0 = 1
+ }
+ r0, _, e1 := syscall.Syscall(procOpenEventW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
}
return
}
-func CoTaskMemFree(address unsafe.Pointer) {
- syscall.Syscall(procCoTaskMemFree.Addr(), 1, uintptr(address), 0, 0)
+func OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) {
+ var _p0 uint32
+ if inheritHandle {
+ _p0 = 1
+ }
+ r0, _, e1 := syscall.Syscall(procOpenMutexW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name)))
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func rtlGetVersion(info *OsVersionInfoEx) (ret error) {
- r0, _, _ := syscall.Syscall(procRtlGetVersion.Addr(), 1, uintptr(unsafe.Pointer(info)), 0, 0)
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error) {
+ var _p0 uint32
+ if inheritHandle {
+ _p0 = 1
+ }
+ r0, _, e1 := syscall.Syscall(procOpenProcess.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(processId))
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
}
return
}
-func rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) {
- syscall.Syscall(procRtlGetNtVersionNumbers.Addr(), 3, uintptr(unsafe.Pointer(majorVersion)), uintptr(unsafe.Pointer(minorVersion)), uintptr(unsafe.Pointer(buildNumber)))
+func OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error) {
+ var _p0 uint32
+ if inheritHandle {
+ _p0 = 1
+ }
+ r0, _, e1 := syscall.Syscall(procOpenThread.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(threadId))
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetProcessPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, overlapped *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall6(procPostQueuedCompletionStatus.Addr(), 4, uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetThreadPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+func Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) {
+ r1, _, e1 := syscall.Syscall(procProcess32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetUserPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+func Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) {
+ r1, _, e1 := syscall.Syscall(procProcess32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetSystemPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+func ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procProcessIdToSessionId.Addr(), 2, uintptr(pid), uintptr(unsafe.Pointer(sessionid)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
- var _p0 *uint32
- if len(processIds) > 0 {
- _p0 = &processIds[0]
- }
- r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(processIds)), uintptr(unsafe.Pointer(bytesReturned)))
+func PulseEvent(event Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procPulseEvent.Addr(), 1, uintptr(event), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func WSAStartup(verreq uint32, data *WSAData) (sockerr error) {
- r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0)
- if r0 != 0 {
- sockerr = syscall.Errno(r0)
+func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procQueryDosDeviceW.Addr(), 3, uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max))
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
}
return
}
-func WSACleanup() (err error) {
- r1, _, e1 := syscall.Syscall(procWSACleanup.Addr(), 0, 0, 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procQueryFullProcessImageNameW.Addr(), 4, uintptr(proc), uintptr(flags), uintptr(unsafe.Pointer(exeName)), uintptr(unsafe.Pointer(size)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSAIoctl.Addr(), 9, uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func QueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobObjectInformation uintptr, JobObjectInformationLength uint32, retlen *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procQueryInformationJobObject.Addr(), 5, uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), uintptr(unsafe.Pointer(retlen)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func socket(af int32, typ int32, protocol int32) (handle Handle, err error) {
- r0, _, e1 := syscall.Syscall(procsocket.Addr(), 3, uintptr(af), uintptr(typ), uintptr(protocol))
- handle = Handle(r0)
- if handle == InvalidHandle {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) {
+ r1, _, e1 := syscall.Syscall6(procReadConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func sendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) (err error) {
- var _p0 *byte
- if len(buf) > 0 {
- _p0 = &buf[0]
+func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
+ var _p0 uint32
+ if watchSubTree {
+ _p0 = 1
}
- r1, _, e1 := syscall.Syscall6(procsendto.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(tolen))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ r1, _, e1 := syscall.Syscall9(procReadDirectoryChangesW.Addr(), 8, uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func recvfrom(s Handle, buf []byte, flags int32, from *RawSockaddrAny, fromlen *int32) (n int32, err error) {
+func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
var _p0 *byte
if len(buf) > 0 {
_p0 = &buf[0]
}
- r0, _, e1 := syscall.Syscall6(procrecvfrom.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- n = int32(r0)
- if n == -1 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ r1, _, e1 := syscall.Syscall6(procReadFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) {
- r1, _, e1 := syscall.Syscall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func ReleaseMutex(mutex Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procReleaseMutex.Addr(), 1, uintptr(mutex), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) {
- r1, _, e1 := syscall.Syscall6(procgetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func RemoveDirectory(path *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procRemoveDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) {
- r1, _, e1 := syscall.Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func ResetEvent(event Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procResetEvent.Addr(), 1, uintptr(event), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func connect(s Handle, name unsafe.Pointer, namelen int32) (err error) {
- r1, _, e1 := syscall.Syscall(procconnect.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func ResumeThread(thread Handle) (ret uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procResumeThread.Addr(), 1, uintptr(thread), 0, 0)
+ ret = uint32(r0)
+ if ret == 0xffffffff {
+ err = errnoErr(e1)
}
return
}
-func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
- r1, _, e1 := syscall.Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
- r1, _, e1 := syscall.Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func setConsoleCursorPosition(console Handle, position uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetConsoleCursorPosition.Addr(), 2, uintptr(console), uintptr(position), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func listen(s Handle, backlog int32) (err error) {
- r1, _, e1 := syscall.Syscall(proclisten.Addr(), 2, uintptr(s), uintptr(backlog), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetConsoleMode(console Handle, mode uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(console), uintptr(mode), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func shutdown(s Handle, how int32) (err error) {
- r1, _, e1 := syscall.Syscall(procshutdown.Addr(), 2, uintptr(s), uintptr(how), 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetCurrentDirectory(path *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func Closesocket(s Handle) (err error) {
- r1, _, e1 := syscall.Syscall(procclosesocket.Addr(), 1, uintptr(s), 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetDefaultDllDirectories(directoryFlags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetDefaultDllDirectories.Addr(), 1, uintptr(directoryFlags), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) {
- r1, _, e1 := syscall.Syscall9(procAcceptEx.Addr(), 8, uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)), 0)
+func SetDllDirectory(path string) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(path)
+ if err != nil {
+ return
+ }
+ return _SetDllDirectory(_p0)
+}
+
+func _SetDllDirectory(path *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetDllDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) {
- syscall.Syscall9(procGetAcceptExSockaddrs.Addr(), 8, uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(lrsa)), uintptr(unsafe.Pointer(lrsalen)), uintptr(unsafe.Pointer(rrsa)), uintptr(unsafe.Pointer(rrsalen)), 0)
+func SetEndOfFile(handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetEndOfFile.Addr(), 1, uintptr(handle), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSARecv.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetEnvironmentVariable(name *uint16, value *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSASend.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
- }
+func SetErrorMode(mode uint32) (ret uint32) {
+ r0, _, _ := syscall.Syscall(procSetErrorMode.Addr(), 1, uintptr(mode), 0, 0)
+ ret = uint32(r0)
return
}
-func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSARecvFrom.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetEvent(event Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetEvent.Addr(), 1, uintptr(event), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) {
- r1, _, e1 := syscall.Syscall9(procWSASendTo.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
- if r1 == socket_error {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetFileAttributes(name *uint16, attrs uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetFileAttributesW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(attrs), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetHostByName(name string) (h *Hostent, err error) {
- var _p0 *byte
- _p0, err = syscall.BytePtrFromString(name)
- if err != nil {
- return
+func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(handle), uintptr(flags), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
- return _GetHostByName(_p0)
+ return
}
-func _GetHostByName(name *byte) (h *Hostent, err error) {
- r0, _, e1 := syscall.Syscall(procgethostbyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
- h = (*Hostent)(unsafe.Pointer(r0))
- if h == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inBufferLen uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetFileInformationByHandle.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetServByName(name string, proto string) (s *Servent, err error) {
- var _p0 *byte
- _p0, err = syscall.BytePtrFromString(name)
- if err != nil {
- return
- }
- var _p1 *byte
- _p1, err = syscall.BytePtrFromString(proto)
- if err != nil {
- return
+func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) {
+ r0, _, e1 := syscall.Syscall6(procSetFilePointer.Addr(), 4, uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence), 0, 0)
+ newlowoffset = uint32(r0)
+ if newlowoffset == 0xffffffff {
+ err = errnoErr(e1)
}
- return _GetServByName(_p0, _p1)
+ return
}
-func _GetServByName(name *byte, proto *byte) (s *Servent, err error) {
- r0, _, e1 := syscall.Syscall(procgetservbyname.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(proto)), 0)
- s = (*Servent)(unsafe.Pointer(r0))
- if s == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func Ntohs(netshort uint16) (u uint16) {
- r0, _, _ := syscall.Syscall(procntohs.Addr(), 1, uintptr(netshort), 0, 0)
- u = uint16(r0)
+func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetHandleInformation.Addr(), 3, uintptr(handle), uintptr(mask), uintptr(flags))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func GetProtoByName(name string) (p *Protoent, err error) {
- var _p0 *byte
- _p0, err = syscall.BytePtrFromString(name)
- if err != nil {
- return
+func SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error) {
+ r0, _, e1 := syscall.Syscall6(procSetInformationJobObject.Addr(), 4, uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), 0, 0)
+ ret = int(r0)
+ if ret == 0 {
+ err = errnoErr(e1)
}
- return _GetProtoByName(_p0)
+ return
}
-func _GetProtoByName(name *byte) (p *Protoent, err error) {
- r0, _, e1 := syscall.Syscall(procgetprotobyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
- p = (*Protoent)(unsafe.Pointer(r0))
- if p == nil {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetNamedPipeHandleState.Addr(), 4, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
- var _p0 *uint16
- _p0, status = syscall.UTF16PtrFromString(name)
- if status != nil {
- return
+func SetPriorityClass(process Handle, priorityClass uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetPriorityClass.Addr(), 2, uintptr(process), uintptr(priorityClass), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
- return _DnsQuery(_p0, qtype, options, extra, qrs, pr)
+ return
}
-func _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) {
- r0, _, _ := syscall.Syscall6(procDnsQuery_W.Addr(), 6, uintptr(unsafe.Pointer(name)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr)))
- if r0 != 0 {
- status = syscall.Errno(r0)
+func SetProcessPriorityBoost(process Handle, disable bool) (err error) {
+ var _p0 uint32
+ if disable {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall(procSetProcessPriorityBoost.Addr(), 2, uintptr(process), uintptr(_p0), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
- syscall.Syscall(procDnsRecordListFree.Addr(), 2, uintptr(unsafe.Pointer(rl)), uintptr(freetype), 0)
+func SetProcessShutdownParameters(level uint32, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetProcessShutdownParameters.Addr(), 2, uintptr(level), uintptr(flags), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) {
- r0, _, _ := syscall.Syscall(procDnsNameCompare_W.Addr(), 2, uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2)), 0)
- same = r0 != 0
+func SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(dwMinimumWorkingSetSize), uintptr(dwMaximumWorkingSetSize), uintptr(flags), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) {
- r0, _, _ := syscall.Syscall6(procGetAddrInfoW.Addr(), 4, uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)), 0, 0)
- if r0 != 0 {
- sockerr = syscall.Errno(r0)
+func SetStdHandle(stdhandle uint32, handle Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetStdHandle.Addr(), 2, uintptr(stdhandle), uintptr(handle), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func FreeAddrInfoW(addrinfo *AddrinfoW) {
- syscall.Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 0)
+func SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetVolumeLabelW.Addr(), 2, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeName)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
- r0, _, _ := syscall.Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0)
- if r0 != 0 {
- errcode = syscall.Errno(r0)
+func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetVolumeMountPointW.Addr(), 2, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
- r0, _, _ := syscall.Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)), 0)
- if r0 != 0 {
- errcode = syscall.Errno(r0)
+func SizeofResource(module Handle, resInfo Handle) (size uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procSizeofResource.Addr(), 2, uintptr(module), uintptr(resInfo), 0)
+ size = uint32(r0)
+ if size == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) {
- r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(handle), uintptr(flags), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SleepEx(milliseconds uint32, alertable bool) (ret uint32) {
+ var _p0 uint32
+ if alertable {
+ _p0 = 1
}
+ r0, _, _ := syscall.Syscall(procSleepEx.Addr(), 2, uintptr(milliseconds), uintptr(_p0), 0)
+ ret = uint32(r0)
return
}
-func WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) {
- r0, _, e1 := syscall.Syscall(procWSAEnumProtocolsW.Addr(), 3, uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength)))
- n = int32(r0)
- if n == -1 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func TerminateJobObject(job Handle, exitCode uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procTerminateJobObject.Addr(), 2, uintptr(job), uintptr(exitCode), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
- r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0)
- if r0 != 0 {
- errcode = syscall.Errno(r0)
+func TerminateProcess(handle Handle, exitcode uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procTerminateProcess.Addr(), 2, uintptr(handle), uintptr(exitcode), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetACP() (acp uint32) {
- r0, _, _ := syscall.Syscall(procGetACP.Addr(), 0, 0, 0, 0)
- acp = uint32(r0)
+func Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
+ r1, _, e1 := syscall.Syscall(procThread32First.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) {
- r0, _, e1 := syscall.Syscall6(procMultiByteToWideChar.Addr(), 6, uintptr(codePage), uintptr(dwFlags), uintptr(unsafe.Pointer(str)), uintptr(nstr), uintptr(unsafe.Pointer(wchar)), uintptr(nwchar))
- nwrite = int32(r0)
- if nwrite == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func Thread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error) {
+ r1, _, e1 := syscall.Syscall(procThread32Next.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procTranslateNameW.Addr(), 5, uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)), 0)
- if r1&0xff == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall6(procUnlockFileEx.Addr(), 5, uintptr(file), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetUserNameExW.Addr(), 3, uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize)))
- if r1&0xff == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func UnmapViewOfFile(addr uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procUnmapViewOfFile.Addr(), 1, uintptr(addr), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) {
- r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0)
- if r0 != 0 {
- neterr = syscall.Errno(r0)
+func updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32, attr uintptr, value unsafe.Pointer, size uintptr, prevvalue unsafe.Pointer, returnedsize *uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall9(procUpdateProcThreadAttribute.Addr(), 7, uintptr(unsafe.Pointer(attrlist)), uintptr(flags), uintptr(attr), uintptr(value), uintptr(size), uintptr(prevvalue), uintptr(unsafe.Pointer(returnedsize)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) {
- r0, _, _ := syscall.Syscall(procNetGetJoinInformation.Addr(), 3, uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType)))
- if r0 != 0 {
- neterr = syscall.Errno(r0)
+func VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) {
+ r0, _, e1 := syscall.Syscall6(procVirtualAlloc.Addr(), 4, uintptr(address), uintptr(size), uintptr(alloctype), uintptr(protect), 0, 0)
+ value = uintptr(r0)
+ if value == 0 {
+ err = errnoErr(e1)
}
return
}
-func NetApiBufferFree(buf *byte) (neterr error) {
- r0, _, _ := syscall.Syscall(procNetApiBufferFree.Addr(), 1, uintptr(unsafe.Pointer(buf)), 0, 0)
- if r0 != 0 {
- neterr = syscall.Errno(r0)
+func VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procVirtualFree.Addr(), 3, uintptr(address), uintptr(size), uintptr(freetype))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procLookupAccountSidW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
+func VirtualLock(addr uintptr, length uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procVirtualLock.Addr(), 2, uintptr(addr), uintptr(length), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) {
- r1, _, e1 := syscall.Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0)
+func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procVirtualProtect.Addr(), 4, uintptr(address), uintptr(size), uintptr(newprotect), uintptr(unsafe.Pointer(oldprotect)), 0, 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) {
- r1, _, e1 := syscall.Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)), 0)
+func VirtualUnlock(addr uintptr, length uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) {
- r1, _, e1 := syscall.Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMilliseconds uint32) (event uint32, err error) {
+ var _p0 uint32
+ if waitAll {
+ _p0 = 1
+ }
+ r0, _, e1 := syscall.Syscall6(procWaitForMultipleObjects.Addr(), 4, uintptr(count), uintptr(handles), uintptr(_p0), uintptr(waitMilliseconds), 0, 0)
+ event = uint32(r0)
+ if event == 0xffffffff {
+ err = errnoErr(e1)
}
return
}
-func GetLengthSid(sid *SID) (len uint32) {
- r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
- len = uint32(r0)
+func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procWaitForSingleObject.Addr(), 2, uintptr(handle), uintptr(waitMilliseconds), 0)
+ event = uint32(r0)
+ if event == 0xffffffff {
+ err = errnoErr(e1)
+ }
return
}
-func CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) {
- r1, _, e1 := syscall.Syscall(procCopySid.Addr(), 3, uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid)))
+func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) {
+ r1, _, e1 := syscall.Syscall6(procWriteConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) {
- r1, _, e1 := syscall.Syscall12(procAllocateAndInitializeSid.Addr(), 11, uintptr(unsafe.Pointer(identAuth)), uintptr(subAuth), uintptr(subAuth0), uintptr(subAuth1), uintptr(subAuth2), uintptr(subAuth3), uintptr(subAuth4), uintptr(subAuth5), uintptr(subAuth6), uintptr(subAuth7), uintptr(unsafe.Pointer(sid)), 0)
+func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ r1, _, e1 := syscall.Syscall6(procWriteFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, sizeSid *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procCreateWellKnownSid.Addr(), 4, uintptr(sidType), uintptr(unsafe.Pointer(domainSid)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sizeSid)), 0, 0)
+func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall9(procAcceptEx.Addr(), 8, uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func isWellKnownSid(sid *SID, sidType WELL_KNOWN_SID_TYPE) (isWellKnown bool) {
- r0, _, _ := syscall.Syscall(procIsWellKnownSid.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(sidType), 0)
- isWellKnown = r0 != 0
+func GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) {
+ syscall.Syscall9(procGetAcceptExSockaddrs.Addr(), 8, uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(lrsa)), uintptr(unsafe.Pointer(lrsalen)), uintptr(unsafe.Pointer(rrsa)), uintptr(unsafe.Pointer(rrsalen)), 0)
return
}
-func FreeSid(sid *SID) (err error) {
- r1, _, e1 := syscall.Syscall(procFreeSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
- if r1 != 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procTransmitFile.Addr(), 7, uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) {
- r0, _, _ := syscall.Syscall(procEqualSid.Addr(), 2, uintptr(unsafe.Pointer(sid1)), uintptr(unsafe.Pointer(sid2)), 0)
- isEqual = r0 != 0
+func NetApiBufferFree(buf *byte) (neterr error) {
+ r0, _, _ := syscall.Syscall(procNetApiBufferFree.Addr(), 1, uintptr(unsafe.Pointer(buf)), 0, 0)
+ if r0 != 0 {
+ neterr = syscall.Errno(r0)
+ }
return
}
-func getSidIdentifierAuthority(sid *SID) (authority *SidIdentifierAuthority) {
- r0, _, _ := syscall.Syscall(procGetSidIdentifierAuthority.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
- authority = (*SidIdentifierAuthority)(unsafe.Pointer(r0))
+func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) {
+ r0, _, _ := syscall.Syscall(procNetGetJoinInformation.Addr(), 3, uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType)))
+ if r0 != 0 {
+ neterr = syscall.Errno(r0)
+ }
return
}
-func getSidSubAuthorityCount(sid *SID) (count *uint8) {
- r0, _, _ := syscall.Syscall(procGetSidSubAuthorityCount.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
- count = (*uint8)(unsafe.Pointer(r0))
+func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) {
+ r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0)
+ if r0 != 0 {
+ neterr = syscall.Errno(r0)
+ }
return
}
-func getSidSubAuthority(sid *SID, index uint32) (subAuthority *uint32) {
- r0, _, _ := syscall.Syscall(procGetSidSubAuthority.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(index), 0)
- subAuthority = (*uint32)(unsafe.Pointer(r0))
+func NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) {
+ r0, _, _ := syscall.Syscall12(procNtCreateFile.Addr(), 11, uintptr(unsafe.Pointer(handle)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(allocationSize)), uintptr(attributes), uintptr(share), uintptr(disposition), uintptr(options), uintptr(eabuffer), uintptr(ealength), 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
+ }
return
}
-func isValidSid(sid *SID) (isValid bool) {
- r0, _, _ := syscall.Syscall(procIsValidSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0)
- isValid = r0 != 0
+func NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) {
+ r0, _, _ := syscall.Syscall15(procNtCreateNamedPipeFile.Addr(), 14, uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout)), 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
+ }
return
}
-func checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) {
- r1, _, e1 := syscall.Syscall(procCheckTokenMembership.Addr(), 3, uintptr(tokenHandle), uintptr(unsafe.Pointer(sidToCheck)), uintptr(unsafe.Pointer(isMember)))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) {
+ r0, _, _ := syscall.Syscall6(procNtQueryInformationProcess.Addr(), 5, uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), uintptr(unsafe.Pointer(retLen)), 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
return
}
-func OpenProcessToken(process Handle, access uint32, token *Token) (err error) {
- r1, _, e1 := syscall.Syscall(procOpenProcessToken.Addr(), 3, uintptr(process), uintptr(access), uintptr(unsafe.Pointer(token)))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) {
+ r0, _, _ := syscall.Syscall6(procNtSetInformationProcess.Addr(), 4, uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), 0, 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
return
}
-func OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token) (err error) {
- var _p0 uint32
- if openAsSelf {
- _p0 = 1
- } else {
- _p0 = 0
- }
- r1, _, e1 := syscall.Syscall6(procOpenThreadToken.Addr(), 4, uintptr(thread), uintptr(access), uintptr(_p0), uintptr(unsafe.Pointer(token)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func RtlDefaultNpAcl(acl **ACL) (ntstatus error) {
+ r0, _, _ := syscall.Syscall(procRtlDefaultNpAcl.Addr(), 1, uintptr(unsafe.Pointer(acl)), 0, 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
return
}
-func ImpersonateSelf(impersonationlevel uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procImpersonateSelf.Addr(), 1, uintptr(impersonationlevel), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) {
+ r0, _, _ := syscall.Syscall6(procRtlDosPathNameToNtPathName_U_WithStatus.Addr(), 4, uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)), 0, 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
return
}
-func RevertToSelf() (err error) {
- r1, _, e1 := syscall.Syscall(procRevertToSelf.Addr(), 0, 0, 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) {
+ r0, _, _ := syscall.Syscall6(procRtlDosPathNameToRelativeNtPathName_U_WithStatus.Addr(), 4, uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)), 0, 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
return
}
-func SetThreadToken(thread *Handle, token Token) (err error) {
- r1, _, e1 := syscall.Syscall(procSetThreadToken.Addr(), 2, uintptr(unsafe.Pointer(thread)), uintptr(token), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
- }
+func RtlGetCurrentPeb() (peb *PEB) {
+ r0, _, _ := syscall.Syscall(procRtlGetCurrentPeb.Addr(), 0, 0, 0, 0)
+ peb = (*PEB)(unsafe.Pointer(r0))
return
}
-func LookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err error) {
- r1, _, e1 := syscall.Syscall(procLookupPrivilegeValueW.Addr(), 3, uintptr(unsafe.Pointer(systemname)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid)))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) {
+ syscall.Syscall(procRtlGetNtVersionNumbers.Addr(), 3, uintptr(unsafe.Pointer(majorVersion)), uintptr(unsafe.Pointer(minorVersion)), uintptr(unsafe.Pointer(buildNumber)))
+ return
+}
+
+func rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) {
+ r0, _, _ := syscall.Syscall(procRtlGetVersion.Addr(), 1, uintptr(unsafe.Pointer(info)), 0, 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
}
return
}
-func AdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tokenprivileges, buflen uint32, prevstate *Tokenprivileges, returnlen *uint32) (err error) {
- var _p0 uint32
- if disableAllPrivileges {
- _p0 = 1
- } else {
- _p0 = 0
+func RtlInitString(destinationString *NTString, sourceString *byte) {
+ syscall.Syscall(procRtlInitString.Addr(), 2, uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)), 0)
+ return
+}
+
+func RtlInitUnicodeString(destinationString *NTUnicodeString, sourceString *uint16) {
+ syscall.Syscall(procRtlInitUnicodeString.Addr(), 2, uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)), 0)
+ return
+}
+
+func rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) {
+ r0, _, _ := syscall.Syscall(procRtlNtStatusToDosErrorNoTeb.Addr(), 1, uintptr(ntstatus), 0, 0)
+ ret = syscall.Errno(r0)
+ return
+}
+
+func clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) {
+ r0, _, _ := syscall.Syscall(procCLSIDFromString.Addr(), 2, uintptr(unsafe.Pointer(lpsz)), uintptr(unsafe.Pointer(pclsid)), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
- r1, _, e1 := syscall.Syscall6(procAdjustTokenPrivileges.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func coCreateGuid(pguid *GUID) (ret error) {
+ r0, _, _ := syscall.Syscall(procCoCreateGuid.Addr(), 1, uintptr(unsafe.Pointer(pguid)), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
return
}
-func AdjustTokenGroups(token Token, resetToDefault bool, newstate *Tokengroups, buflen uint32, prevstate *Tokengroups, returnlen *uint32) (err error) {
- var _p0 uint32
- if resetToDefault {
- _p0 = 1
- } else {
- _p0 = 0
+func CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable **uintptr) (ret error) {
+ r0, _, _ := syscall.Syscall6(procCoGetObject.Addr(), 4, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bindOpts)), uintptr(unsafe.Pointer(guid)), uintptr(unsafe.Pointer(functionTable)), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
- r1, _, e1 := syscall.Syscall6(procAdjustTokenGroups.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen)))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func CoInitializeEx(reserved uintptr, coInit uint32) (ret error) {
+ r0, _, _ := syscall.Syscall(procCoInitializeEx.Addr(), 2, uintptr(reserved), uintptr(coInit), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
return
}
-func GetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procGetTokenInformation.Addr(), 5, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)), 0)
+func CoTaskMemFree(address unsafe.Pointer) {
+ syscall.Syscall(procCoTaskMemFree.Addr(), 1, uintptr(address), 0, 0)
+ return
+}
+
+func CoUninitialize() {
+ syscall.Syscall(procCoUninitialize.Addr(), 0, 0, 0, 0)
+ return
+}
+
+func stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) {
+ r0, _, _ := syscall.Syscall(procStringFromGUID2.Addr(), 3, uintptr(unsafe.Pointer(rguid)), uintptr(unsafe.Pointer(lpsz)), uintptr(cchMax))
+ chars = int32(r0)
+ return
+}
+
+func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
+ var _p0 *uint32
+ if len(processIds) > 0 {
+ _p0 = &processIds[0]
+ }
+ r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(processIds)), uintptr(unsafe.Pointer(bytesReturned)))
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func SetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procSetTokenInformation.Addr(), 4, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) {
+ ret = procSubscribeServiceChangeNotifications.Find()
+ if ret != nil {
+ return
+ }
+ r0, _, _ := syscall.Syscall6(procSubscribeServiceChangeNotifications.Addr(), 5, uintptr(service), uintptr(eventType), uintptr(callback), uintptr(callbackCtx), uintptr(unsafe.Pointer(subscription)), 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
return
}
-func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes *SecurityAttributes, impersonationLevel uint32, tokenType uint32, newToken *Token) (err error) {
- r1, _, e1 := syscall.Syscall6(procDuplicateTokenEx.Addr(), 6, uintptr(existingToken), uintptr(desiredAccess), uintptr(unsafe.Pointer(tokenAttributes)), uintptr(impersonationLevel), uintptr(tokenType), uintptr(unsafe.Pointer(newToken)))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func UnsubscribeServiceChangeNotifications(subscription uintptr) (err error) {
+ err = procUnsubscribeServiceChangeNotifications.Find()
+ if err != nil {
+ return
}
+ syscall.Syscall(procUnsubscribeServiceChangeNotifications.Addr(), 1, uintptr(subscription), 0, 0)
return
}
-func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen)))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetUserNameExW.Addr(), 3, uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize)))
+ if r1&0xff == 0 {
+ err = errnoErr(e1)
}
return
}
-func getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetSystemDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
- len = uint32(r0)
- if len == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procTranslateNameW.Addr(), 5, uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)), 0)
+ if r1&0xff == 0 {
+ err = errnoErr(e1)
}
return
}
-func getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
- len = uint32(r0)
- if len == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) {
+ r0, _, e1 := syscall.Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0)
+ argv = (*[8192]*[8192]uint16)(unsafe.Pointer(r0))
+ if argv == nil {
+ err = errnoErr(e1)
}
return
}
-func getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) {
- r0, _, e1 := syscall.Syscall(procGetSystemWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0)
- len = uint32(r0)
- if len == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) {
+ r0, _, _ := syscall.Syscall6(procSHGetKnownFolderPath.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(flags), uintptr(token), uintptr(unsafe.Pointer(path)), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
}
return
}
-func WTSQueryUserToken(session uint32, token *Token) (err error) {
- r1, _, e1 := syscall.Syscall(procWTSQueryUserToken.Addr(), 2, uintptr(session), uintptr(unsafe.Pointer(token)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procShellExecuteW.Addr(), 6, uintptr(hwnd), uintptr(unsafe.Pointer(verb)), uintptr(unsafe.Pointer(file)), uintptr(unsafe.Pointer(args)), uintptr(unsafe.Pointer(cwd)), uintptr(showCmd))
+ if r1 <= 32 {
+ err = errnoErr(e1)
}
return
}
-func WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procWTSEnumerateSessionsW.Addr(), 5, uintptr(handle), uintptr(reserved), uintptr(version), uintptr(unsafe.Pointer(sessions)), uintptr(unsafe.Pointer(count)), 0)
+func ExitWindowsEx(flags uint32, reason uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procExitWindowsEx.Addr(), 2, uintptr(flags), uintptr(reason), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func WTSFreeMemory(ptr uintptr) {
- syscall.Syscall(procWTSFreeMemory.Addr(), 1, uintptr(ptr), 0, 0)
+func GetShellWindow() (shellWindow HWND) {
+ r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0)
+ shellWindow = HWND(r0)
return
}
-func getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
- r0, _, _ := syscall.Syscall9(procGetSecurityInfo.Addr(), 8, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0)
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetWindowThreadProcessId.Addr(), 2, uintptr(hwnd), uintptr(unsafe.Pointer(pid)), 0)
+ tid = uint32(r0)
+ if tid == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) {
- syscall.Syscall9(procSetSecurityInfo.Addr(), 7, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
+func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {
+ r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0)
+ ret = int32(r0)
+ if ret == 0 {
+ err = errnoErr(e1)
+ }
return
}
-func getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
- var _p0 *uint16
- _p0, ret = syscall.UTF16PtrFromString(objectName)
- if ret != nil {
- return
+func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) {
+ var _p0 uint32
+ if inheritExisting {
+ _p0 = 1
}
- return _getNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl, sd)
+ r1, _, e1 := syscall.Syscall(procCreateEnvironmentBlock.Addr(), 3, uintptr(unsafe.Pointer(block)), uintptr(token), uintptr(_p0))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
}
-func _getNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) {
- r0, _, _ := syscall.Syscall9(procGetNamedSecurityInfoW.Addr(), 8, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0)
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func DestroyEnvironmentBlock(block *uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procDestroyEnvironmentBlock.Addr(), 1, uintptr(unsafe.Pointer(block)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
-func SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
- var _p0 *uint16
- _p0, ret = syscall.UTF16PtrFromString(objectName)
- if ret != nil {
- return
+func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen)))
+ if r1 == 0 {
+ err = errnoErr(e1)
}
- return _SetNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl)
+ return
}
-func _SetNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) {
- r0, _, _ := syscall.Syscall9(procSetNamedSecurityInfoW.Addr(), 7, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0)
+func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) {
+ r0, _, _ := syscall.Syscall(procWinVerifyTrustEx.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data)))
if r0 != 0 {
ret = syscall.Errno(r0)
}
return
}
-func buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) {
- r0, _, _ := syscall.Syscall9(procBuildSecurityDescriptorW.Addr(), 9, uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(countAccessEntries), uintptr(unsafe.Pointer(accessEntries)), uintptr(countAuditEntries), uintptr(unsafe.Pointer(auditEntries)), uintptr(unsafe.Pointer(oldSecurityDescriptor)), uintptr(unsafe.Pointer(sizeNewSecurityDescriptor)), uintptr(unsafe.Pointer(newSecurityDescriptor)))
+func FreeAddrInfoW(addrinfo *AddrinfoW) {
+ syscall.Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 0)
+ return
+}
+
+func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) {
+ r0, _, _ := syscall.Syscall6(procGetAddrInfoW.Addr(), 4, uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)), 0, 0)
if r0 != 0 {
- ret = syscall.Errno(r0)
+ sockerr = syscall.Errno(r0)
}
return
}
-func initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procInitializeSecurityDescriptor.Addr(), 2, uintptr(unsafe.Pointer(absoluteSD)), uintptr(revision), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func WSACleanup() (err error) {
+ r1, _, e1 := syscall.Syscall(procWSACleanup.Addr(), 0, 0, 0, 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func getSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, control *SECURITY_DESCRIPTOR_CONTROL, revision *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(control)), uintptr(unsafe.Pointer(revision)))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) {
+ r0, _, e1 := syscall.Syscall(procWSAEnumProtocolsW.Addr(), 3, uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength)))
+ n = int32(r0)
+ if n == -1 {
+ err = errnoErr(e1)
}
return
}
-func getSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent *bool, dacl **ACL, daclDefaulted *bool) (err error) {
+func WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) {
var _p0 uint32
- if *daclPresent {
+ if wait {
_p0 = 1
- } else {
- _p0 = 0
- }
- var _p1 uint32
- if *daclDefaulted {
- _p1 = 1
- } else {
- _p1 = 0
}
- r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0)
- *daclPresent = _p0 != 0
- *daclDefaulted = _p1 != 0
+ r1, _, e1 := syscall.Syscall6(procWSAGetOverlappedResult.Addr(), 5, uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl **ACL, saclDefaulted *bool) (err error) {
- var _p0 uint32
- if *saclPresent {
- _p0 = 1
- } else {
- _p0 = 0
- }
- var _p1 uint32
- if *saclDefaulted {
- _p1 = 1
- } else {
- _p1 = 0
- }
- r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0)
- *saclPresent = _p0 != 0
- *saclDefaulted = _p1 != 0
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall9(procWSAIoctl.Addr(), 9, uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefaulted *bool) (err error) {
- var _p0 uint32
- if *ownerDefaulted {
- _p0 = 1
- } else {
- _p0 = 0
+func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) {
+ r1, _, e1 := syscall.Syscall9(procWSARecv.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
- r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(&_p0)))
- *ownerDefaulted = _p0 != 0
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) {
+ r1, _, e1 := syscall.Syscall9(procWSARecvFrom.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefaulted *bool) (err error) {
- var _p0 uint32
- if *groupDefaulted {
- _p0 = 1
- } else {
- _p0 = 0
+func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) {
+ r1, _, e1 := syscall.Syscall9(procWSASend.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
- r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(&_p0)))
- *groupDefaulted = _p0 != 0
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) {
+ r1, _, e1 := syscall.Syscall9(procWSASendTo.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func getSecurityDescriptorLength(sd *SECURITY_DESCRIPTOR) (len uint32) {
- r0, _, _ := syscall.Syscall(procGetSecurityDescriptorLength.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0)
- len = uint32(r0)
+func WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procWSASocketW.Addr(), 6, uintptr(af), uintptr(typ), uintptr(protocol), uintptr(unsafe.Pointer(protoInfo)), uintptr(group), uintptr(flags))
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
+ }
return
}
-func getSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) (ret error) {
- r0, _, _ := syscall.Syscall(procGetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0)
+func WSAStartup(verreq uint32, data *WSAData) (sockerr error) {
+ r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0)
if r0 != 0 {
- ret = syscall.Errno(r0)
+ sockerr = syscall.Errno(r0)
}
return
}
-func isValidSecurityDescriptor(sd *SECURITY_DESCRIPTOR) (isValid bool) {
- r0, _, _ := syscall.Syscall(procIsValidSecurityDescriptor.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0)
- isValid = r0 != 0
+func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
+ if r1 == socket_error {
+ err = errnoErr(e1)
+ }
return
}
-func setSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) (err error) {
- r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(controlBitsOfInterest), uintptr(controlBitsToSet))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func Closesocket(s Handle) (err error) {
+ r1, _, e1 := syscall.Syscall(procclosesocket.Addr(), 1, uintptr(s), 0, 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func setSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent bool, dacl *ACL, daclDefaulted bool) (err error) {
- var _p0 uint32
- if daclPresent {
- _p0 = 1
- } else {
- _p0 = 0
+func connect(s Handle, name unsafe.Pointer, namelen int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procconnect.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
- var _p1 uint32
- if daclDefaulted {
- _p1 = 1
- } else {
- _p1 = 0
+ return
+}
+
+func GetHostByName(name string) (h *Hostent, err error) {
+ var _p0 *byte
+ _p0, err = syscall.BytePtrFromString(name)
+ if err != nil {
+ return
}
- r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(dacl)), uintptr(_p1), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return _GetHostByName(_p0)
+}
+
+func _GetHostByName(name *byte) (h *Hostent, err error) {
+ r0, _, e1 := syscall.Syscall(procgethostbyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
+ h = (*Hostent)(unsafe.Pointer(r0))
+ if h == nil {
+ err = errnoErr(e1)
}
return
}
-func setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *ACL, saclDefaulted bool) (err error) {
- var _p0 uint32
- if saclPresent {
- _p0 = 1
- } else {
- _p0 = 0
+func getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
- var _p1 uint32
- if saclDefaulted {
- _p1 = 1
- } else {
- _p1 = 0
+ return
+}
+
+func GetProtoByName(name string) (p *Protoent, err error) {
+ var _p0 *byte
+ _p0, err = syscall.BytePtrFromString(name)
+ if err != nil {
+ return
}
- r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(sacl)), uintptr(_p1), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return _GetProtoByName(_p0)
+}
+
+func _GetProtoByName(name *byte) (p *Protoent, err error) {
+ r0, _, e1 := syscall.Syscall(procgetprotobyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0)
+ p = (*Protoent)(unsafe.Pointer(r0))
+ if p == nil {
+ err = errnoErr(e1)
}
return
}
-func setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaulted bool) (err error) {
- var _p0 uint32
- if ownerDefaulted {
- _p0 = 1
- } else {
- _p0 = 0
+func GetServByName(name string, proto string) (s *Servent, err error) {
+ var _p0 *byte
+ _p0, err = syscall.BytePtrFromString(name)
+ if err != nil {
+ return
}
- r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(_p0))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ var _p1 *byte
+ _p1, err = syscall.BytePtrFromString(proto)
+ if err != nil {
+ return
+ }
+ return _GetServByName(_p0, _p1)
+}
+
+func _GetServByName(name *byte, proto *byte) (s *Servent, err error) {
+ r0, _, e1 := syscall.Syscall(procgetservbyname.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(proto)), 0)
+ s = (*Servent)(unsafe.Pointer(r0))
+ if s == nil {
+ err = errnoErr(e1)
}
return
}
-func setSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group *SID, groupDefaulted bool) (err error) {
- var _p0 uint32
- if groupDefaulted {
- _p0 = 1
- } else {
- _p0 = 0
+func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
- r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(_p0))
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ return
+}
+
+func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procgetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)), 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func setSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) {
- syscall.Syscall(procSetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0)
+func listen(s Handle, backlog int32) (err error) {
+ r1, _, e1 := syscall.Syscall(proclisten.Addr(), 2, uintptr(s), uintptr(backlog), 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
+ }
return
}
-func convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {
- var _p0 *uint16
- _p0, err = syscall.UTF16PtrFromString(str)
- if err != nil {
- return
+func Ntohs(netshort uint16) (u uint16) {
+ r0, _, _ := syscall.Syscall(procntohs.Addr(), 1, uintptr(netshort), 0, 0)
+ u = uint16(r0)
+ return
+}
+
+func recvfrom(s Handle, buf []byte, flags int32, from *RawSockaddrAny, fromlen *int32) (n int32, err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
}
- return _convertStringSecurityDescriptorToSecurityDescriptor(_p0, revision, sd, size)
+ r0, _, e1 := syscall.Syscall6(procrecvfrom.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ n = int32(r0)
+ if n == -1 {
+ err = errnoErr(e1)
+ }
+ return
}
-func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), 4, uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)), 0, 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func sendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) (err error) {
+ var _p0 *byte
+ if len(buf) > 0 {
+ _p0 = &buf[0]
+ }
+ r1, _, e1 := syscall.Syscall6(procsendto.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(tolen))
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR, revision uint32, securityInformation SECURITY_INFORMATION, str **uint16, strLen *uint32) (err error) {
- r1, _, e1 := syscall.Syscall6(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), 5, uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(securityInformation), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(strLen)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen), 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DESCRIPTOR, absoluteSDSize *uint32, dacl *ACL, daclSize *uint32, sacl *ACL, saclSize *uint32, owner *SID, ownerSize *uint32, group *SID, groupSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall12(procMakeAbsoluteSD.Addr(), 11, uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(absoluteSDSize)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(daclSize)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(saclSize)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(ownerSize)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(groupSize)), 0)
- if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+func shutdown(s Handle, how int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procshutdown.Addr(), 2, uintptr(s), uintptr(how), 0)
+ if r1 == socket_error {
+ err = errnoErr(e1)
}
return
}
-func makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) {
- r1, _, e1 := syscall.Syscall(procMakeSelfRelativeSD.Addr(), 3, uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(selfRelativeSDSize)))
+func socket(af int32, typ int32, protocol int32) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procsocket.Addr(), 3, uintptr(af), uintptr(typ), uintptr(protocol))
+ handle = Handle(r0)
+ if handle == InvalidHandle {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procWTSEnumerateSessionsW.Addr(), 5, uintptr(handle), uintptr(reserved), uintptr(version), uintptr(unsafe.Pointer(sessions)), uintptr(unsafe.Pointer(count)), 0)
if r1 == 0 {
- if e1 != 0 {
- err = errnoErr(e1)
- } else {
- err = syscall.EINVAL
- }
+ err = errnoErr(e1)
}
return
}
-func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) {
- r0, _, _ := syscall.Syscall6(procSetEntriesInAclW.Addr(), 4, uintptr(countExplicitEntries), uintptr(unsafe.Pointer(explicitEntries)), uintptr(unsafe.Pointer(oldACL)), uintptr(unsafe.Pointer(newACL)), 0, 0)
- if r0 != 0 {
- ret = syscall.Errno(r0)
+func WTSFreeMemory(ptr uintptr) {
+ syscall.Syscall(procWTSFreeMemory.Addr(), 1, uintptr(ptr), 0, 0)
+ return
+}
+
+func WTSQueryUserToken(session uint32, token *Token) (err error) {
+ r1, _, e1 := syscall.Syscall(procWTSQueryUserToken.Addr(), 2, uintptr(session), uintptr(unsafe.Pointer(token)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
}
return
}
diff --git a/vendor/golang.org/x/tools/AUTHORS b/vendor/golang.org/x/tools/AUTHORS
new file mode 100644
index 0000000..15167cd
--- /dev/null
+++ b/vendor/golang.org/x/tools/AUTHORS
@@ -0,0 +1,3 @@
+# This source code refers to The Go Authors for copyright purposes.
+# The master list of authors is in the main Go distribution,
+# visible at http://tip.golang.org/AUTHORS.
diff --git a/vendor/golang.org/x/tools/CONTRIBUTORS b/vendor/golang.org/x/tools/CONTRIBUTORS
new file mode 100644
index 0000000..1c4577e
--- /dev/null
+++ b/vendor/golang.org/x/tools/CONTRIBUTORS
@@ -0,0 +1,3 @@
+# This source code was written by the Go contributors.
+# The master list of contributors is in the main Go distribution,
+# visible at http://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/golang.org/x/tools/LICENSE b/vendor/golang.org/x/tools/LICENSE
new file mode 100644
index 0000000..6a66aea
--- /dev/null
+++ b/vendor/golang.org/x/tools/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2009 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/golang.org/x/tools/PATENTS b/vendor/golang.org/x/tools/PATENTS
new file mode 100644
index 0000000..7330990
--- /dev/null
+++ b/vendor/golang.org/x/tools/PATENTS
@@ -0,0 +1,22 @@
+Additional IP Rights Grant (Patents)
+
+"This implementation" means the copyrightable works distributed by
+Google as part of the Go project.
+
+Google hereby grants to You a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable (except as stated in this section)
+patent license to make, have made, use, offer to sell, sell, import,
+transfer and otherwise run, modify and propagate the contents of this
+implementation of Go, where such license applies only to those patent
+claims, both currently owned or controlled by Google and acquired in
+the future, licensable by Google that are necessarily infringed by this
+implementation of Go. This grant does not include claims that would be
+infringed only as a consequence of further modification of this
+implementation. If you or your agent or exclusive licensee institute or
+order or agree to the institution of patent litigation against any
+entity (including a cross-claim or counterclaim in a lawsuit) alleging
+that this implementation of Go or any code incorporated within this
+implementation of Go constitutes direct or contributory patent
+infringement, or inducement of patent infringement, then any patent
+rights granted to you under this License for this implementation of Go
+shall terminate as of the date such litigation is filed.
diff --git a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go
new file mode 100644
index 0000000..f8363d8
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go
@@ -0,0 +1,109 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package gcexportdata provides functions for locating, reading, and
+// writing export data files containing type information produced by the
+// gc compiler. This package supports go1.7 export data format and all
+// later versions.
+//
+// Although it might seem convenient for this package to live alongside
+// go/types in the standard library, this would cause version skew
+// problems for developer tools that use it, since they must be able to
+// consume the outputs of the gc compiler both before and after a Go
+// update such as from Go 1.7 to Go 1.8. Because this package lives in
+// golang.org/x/tools, sites can update their version of this repo some
+// time before the Go 1.8 release and rebuild and redeploy their
+// developer tools, which will then be able to consume both Go 1.7 and
+// Go 1.8 export data files, so they will work before and after the
+// Go update. (See discussion at https://golang.org/issue/15651.)
+//
+package gcexportdata // import "golang.org/x/tools/go/gcexportdata"
+
+import (
+ "bufio"
+ "bytes"
+ "fmt"
+ "go/token"
+ "go/types"
+ "io"
+ "io/ioutil"
+
+ "golang.org/x/tools/go/internal/gcimporter"
+)
+
+// Find returns the name of an object (.o) or archive (.a) file
+// containing type information for the specified import path,
+// using the workspace layout conventions of go/build.
+// If no file was found, an empty filename is returned.
+//
+// A relative srcDir is interpreted relative to the current working directory.
+//
+// Find also returns the package's resolved (canonical) import path,
+// reflecting the effects of srcDir and vendoring on importPath.
+func Find(importPath, srcDir string) (filename, path string) {
+ return gcimporter.FindPkg(importPath, srcDir)
+}
+
+// NewReader returns a reader for the export data section of an object
+// (.o) or archive (.a) file read from r. The new reader may provide
+// additional trailing data beyond the end of the export data.
+func NewReader(r io.Reader) (io.Reader, error) {
+ buf := bufio.NewReader(r)
+ _, err := gcimporter.FindExportData(buf)
+ // If we ever switch to a zip-like archive format with the ToC
+ // at the end, we can return the correct portion of export data,
+ // but for now we must return the entire rest of the file.
+ return buf, err
+}
+
+// Read reads export data from in, decodes it, and returns type
+// information for the package.
+// The package name is specified by path.
+// File position information is added to fset.
+//
+// Read may inspect and add to the imports map to ensure that references
+// within the export data to other packages are consistent. The caller
+// must ensure that imports[path] does not exist, or exists but is
+// incomplete (see types.Package.Complete), and Read inserts the
+// resulting package into this map entry.
+//
+// On return, the state of the reader is undefined.
+func Read(in io.Reader, fset *token.FileSet, imports map[string]*types.Package, path string) (*types.Package, error) {
+ data, err := ioutil.ReadAll(in)
+ if err != nil {
+ return nil, fmt.Errorf("reading export data for %q: %v", path, err)
+ }
+
+ if bytes.HasPrefix(data, []byte("!<arch>")) {
+ return nil, fmt.Errorf("can't read export data for %q directly from an archive file (call gcexportdata.NewReader first to extract export data)", path)
+ }
+
+ // The App Engine Go runtime v1.6 uses the old export data format.
+ // TODO(adonovan): delete once v1.7 has been around for a while.
+ if bytes.HasPrefix(data, []byte("package ")) {
+ return gcimporter.ImportData(imports, path, path, bytes.NewReader(data))
+ }
+
+ // The indexed export format starts with an 'i'; the older
+ // binary export format starts with a 'c', 'd', or 'v'
+ // (from "version"). Select appropriate importer.
+ if len(data) > 0 && data[0] == 'i' {
+ _, pkg, err := gcimporter.IImportData(fset, imports, data[1:], path)
+ return pkg, err
+ }
+
+ _, pkg, err := gcimporter.BImportData(fset, imports, data, path)
+ return pkg, err
+}
+
+// Write writes encoded type information for the specified package to out.
+// The FileSet provides file position information for named objects.
+func Write(out io.Writer, fset *token.FileSet, pkg *types.Package) error {
+ b, err := gcimporter.IExportData(fset, pkg)
+ if err != nil {
+ return err
+ }
+ _, err = out.Write(b)
+ return err
+}
diff --git a/vendor/golang.org/x/tools/go/gcexportdata/importer.go b/vendor/golang.org/x/tools/go/gcexportdata/importer.go
new file mode 100644
index 0000000..efe221e
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/gcexportdata/importer.go
@@ -0,0 +1,73 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package gcexportdata
+
+import (
+ "fmt"
+ "go/token"
+ "go/types"
+ "os"
+)
+
+// NewImporter returns a new instance of the types.Importer interface
+// that reads type information from export data files written by gc.
+// The Importer also satisfies types.ImporterFrom.
+//
+// Export data files are located using "go build" workspace conventions
+// and the build.Default context.
+//
+// Use this importer instead of go/importer.For("gc", ...) to avoid the
+// version-skew problems described in the documentation of this package,
+// or to control the FileSet or access the imports map populated during
+// package loading.
+//
+func NewImporter(fset *token.FileSet, imports map[string]*types.Package) types.ImporterFrom {
+ return importer{fset, imports}
+}
+
+type importer struct {
+ fset *token.FileSet
+ imports map[string]*types.Package
+}
+
+func (imp importer) Import(importPath string) (*types.Package, error) {
+ return imp.ImportFrom(importPath, "", 0)
+}
+
+func (imp importer) ImportFrom(importPath, srcDir string, mode types.ImportMode) (_ *types.Package, err error) {
+ filename, path := Find(importPath, srcDir)
+ if filename == "" {
+ if importPath == "unsafe" {
+ // Even for unsafe, call Find first in case
+ // the package was vendored.
+ return types.Unsafe, nil
+ }
+ return nil, fmt.Errorf("can't find import: %s", importPath)
+ }
+
+ if pkg, ok := imp.imports[path]; ok && pkg.Complete() {
+ return pkg, nil // cache hit
+ }
+
+ // open file
+ f, err := os.Open(filename)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ f.Close()
+ if err != nil {
+ // add file name to error
+ err = fmt.Errorf("reading export data: %s: %v", filename, err)
+ }
+ }()
+
+ r, err := NewReader(f)
+ if err != nil {
+ return nil, err
+ }
+
+ return Read(r, imp.fset, imp.imports, path)
+}
diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go
new file mode 100644
index 0000000..a807d0a
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/internal/gcimporter/bexport.go
@@ -0,0 +1,852 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Binary package export.
+// This file was derived from $GOROOT/src/cmd/compile/internal/gc/bexport.go;
+// see that file for specification of the format.
+
+package gcimporter
+
+import (
+ "bytes"
+ "encoding/binary"
+ "fmt"
+ "go/ast"
+ "go/constant"
+ "go/token"
+ "go/types"
+ "math"
+ "math/big"
+ "sort"
+ "strings"
+)
+
+// If debugFormat is set, each integer and string value is preceded by a marker
+// and position information in the encoding. This mechanism permits an importer
+// to recognize immediately when it is out of sync. The importer recognizes this
+// mode automatically (i.e., it can import export data produced with debugging
+// support even if debugFormat is not set at the time of import). This mode will
+// lead to massively larger export data (by a factor of 2 to 3) and should only
+// be enabled during development and debugging.
+//
+// NOTE: This flag is the first flag to enable if importing dies because of
+// (suspected) format errors, and whenever a change is made to the format.
+const debugFormat = false // default: false
+
+// If trace is set, debugging output is printed to std out.
+const trace = false // default: false
+
+// Current export format version. Increase with each format change.
+// Note: The latest binary (non-indexed) export format is at version 6.
+// This exporter is still at level 4, but it doesn't matter since
+// the binary importer can handle older versions just fine.
+// 6: package height (CL 105038) -- NOT IMPLEMENTED HERE
+// 5: improved position encoding efficiency (issue 20080, CL 41619) -- NOT IMPLEMEMTED HERE
+// 4: type name objects support type aliases, uses aliasTag
+// 3: Go1.8 encoding (same as version 2, aliasTag defined but never used)
+// 2: removed unused bool in ODCL export (compiler only)
+// 1: header format change (more regular), export package for _ struct fields
+// 0: Go1.7 encoding
+const exportVersion = 4
+
+// trackAllTypes enables cycle tracking for all types, not just named
+// types. The existing compiler invariants assume that unnamed types
+// that are not completely set up are not used, or else there are spurious
+// errors.
+// If disabled, only named types are tracked, possibly leading to slightly
+// less efficient encoding in rare cases. It also prevents the export of
+// some corner-case type declarations (but those are not handled correctly
+// with with the textual export format either).
+// TODO(gri) enable and remove once issues caused by it are fixed
+const trackAllTypes = false
+
+type exporter struct {
+ fset *token.FileSet
+ out bytes.Buffer
+
+ // object -> index maps, indexed in order of serialization
+ strIndex map[string]int
+ pkgIndex map[*types.Package]int
+ typIndex map[types.Type]int
+
+ // position encoding
+ posInfoFormat bool
+ prevFile string
+ prevLine int
+
+ // debugging support
+ written int // bytes written
+ indent int // for trace
+}
+
+// internalError represents an error generated inside this package.
+type internalError string
+
+func (e internalError) Error() string { return "gcimporter: " + string(e) }
+
+func internalErrorf(format string, args ...interface{}) error {
+ return internalError(fmt.Sprintf(format, args...))
+}
+
+// BExportData returns binary export data for pkg.
+// If no file set is provided, position info will be missing.
+func BExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ if ierr, ok := e.(internalError); ok {
+ err = ierr
+ return
+ }
+ // Not an internal error; panic again.
+ panic(e)
+ }
+ }()
+
+ p := exporter{
+ fset: fset,
+ strIndex: map[string]int{"": 0}, // empty string is mapped to 0
+ pkgIndex: make(map[*types.Package]int),
+ typIndex: make(map[types.Type]int),
+ posInfoFormat: true, // TODO(gri) might become a flag, eventually
+ }
+
+ // write version info
+ // The version string must start with "version %d" where %d is the version
+ // number. Additional debugging information may follow after a blank; that
+ // text is ignored by the importer.
+ p.rawStringln(fmt.Sprintf("version %d", exportVersion))
+ var debug string
+ if debugFormat {
+ debug = "debug"
+ }
+ p.rawStringln(debug) // cannot use p.bool since it's affected by debugFormat; also want to see this clearly
+ p.bool(trackAllTypes)
+ p.bool(p.posInfoFormat)
+
+ // --- generic export data ---
+
+ // populate type map with predeclared "known" types
+ for index, typ := range predeclared() {
+ p.typIndex[typ] = index
+ }
+ if len(p.typIndex) != len(predeclared()) {
+ return nil, internalError("duplicate entries in type map?")
+ }
+
+ // write package data
+ p.pkg(pkg, true)
+ if trace {
+ p.tracef("\n")
+ }
+
+ // write objects
+ objcount := 0
+ scope := pkg.Scope()
+ for _, name := range scope.Names() {
+ if !ast.IsExported(name) {
+ continue
+ }
+ if trace {
+ p.tracef("\n")
+ }
+ p.obj(scope.Lookup(name))
+ objcount++
+ }
+
+ // indicate end of list
+ if trace {
+ p.tracef("\n")
+ }
+ p.tag(endTag)
+
+ // for self-verification only (redundant)
+ p.int(objcount)
+
+ if trace {
+ p.tracef("\n")
+ }
+
+ // --- end of export data ---
+
+ return p.out.Bytes(), nil
+}
+
+func (p *exporter) pkg(pkg *types.Package, emptypath bool) {
+ if pkg == nil {
+ panic(internalError("unexpected nil pkg"))
+ }
+
+ // if we saw the package before, write its index (>= 0)
+ if i, ok := p.pkgIndex[pkg]; ok {
+ p.index('P', i)
+ return
+ }
+
+ // otherwise, remember the package, write the package tag (< 0) and package data
+ if trace {
+ p.tracef("P%d = { ", len(p.pkgIndex))
+ defer p.tracef("} ")
+ }
+ p.pkgIndex[pkg] = len(p.pkgIndex)
+
+ p.tag(packageTag)
+ p.string(pkg.Name())
+ if emptypath {
+ p.string("")
+ } else {
+ p.string(pkg.Path())
+ }
+}
+
+func (p *exporter) obj(obj types.Object) {
+ switch obj := obj.(type) {
+ case *types.Const:
+ p.tag(constTag)
+ p.pos(obj)
+ p.qualifiedName(obj)
+ p.typ(obj.Type())
+ p.value(obj.Val())
+
+ case *types.TypeName:
+ if obj.IsAlias() {
+ p.tag(aliasTag)
+ p.pos(obj)
+ p.qualifiedName(obj)
+ } else {
+ p.tag(typeTag)
+ }
+ p.typ(obj.Type())
+
+ case *types.Var:
+ p.tag(varTag)
+ p.pos(obj)
+ p.qualifiedName(obj)
+ p.typ(obj.Type())
+
+ case *types.Func:
+ p.tag(funcTag)
+ p.pos(obj)
+ p.qualifiedName(obj)
+ sig := obj.Type().(*types.Signature)
+ p.paramList(sig.Params(), sig.Variadic())
+ p.paramList(sig.Results(), false)
+
+ default:
+ panic(internalErrorf("unexpected object %v (%T)", obj, obj))
+ }
+}
+
+func (p *exporter) pos(obj types.Object) {
+ if !p.posInfoFormat {
+ return
+ }
+
+ file, line := p.fileLine(obj)
+ if file == p.prevFile {
+ // common case: write line delta
+ // delta == 0 means different file or no line change
+ delta := line - p.prevLine
+ p.int(delta)
+ if delta == 0 {
+ p.int(-1) // -1 means no file change
+ }
+ } else {
+ // different file
+ p.int(0)
+ // Encode filename as length of common prefix with previous
+ // filename, followed by (possibly empty) suffix. Filenames
+ // frequently share path prefixes, so this can save a lot
+ // of space and make export data size less dependent on file
+ // path length. The suffix is unlikely to be empty because
+ // file names tend to end in ".go".
+ n := commonPrefixLen(p.prevFile, file)
+ p.int(n) // n >= 0
+ p.string(file[n:]) // write suffix only
+ p.prevFile = file
+ p.int(line)
+ }
+ p.prevLine = line
+}
+
+func (p *exporter) fileLine(obj types.Object) (file string, line int) {
+ if p.fset != nil {
+ pos := p.fset.Position(obj.Pos())
+ file = pos.Filename
+ line = pos.Line
+ }
+ return
+}
+
+func commonPrefixLen(a, b string) int {
+ if len(a) > len(b) {
+ a, b = b, a
+ }
+ // len(a) <= len(b)
+ i := 0
+ for i < len(a) && a[i] == b[i] {
+ i++
+ }
+ return i
+}
+
+func (p *exporter) qualifiedName(obj types.Object) {
+ p.string(obj.Name())
+ p.pkg(obj.Pkg(), false)
+}
+
+func (p *exporter) typ(t types.Type) {
+ if t == nil {
+ panic(internalError("nil type"))
+ }
+
+ // Possible optimization: Anonymous pointer types *T where
+ // T is a named type are common. We could canonicalize all
+ // such types *T to a single type PT = *T. This would lead
+ // to at most one *T entry in typIndex, and all future *T's
+ // would be encoded as the respective index directly. Would
+ // save 1 byte (pointerTag) per *T and reduce the typIndex
+ // size (at the cost of a canonicalization map). We can do
+ // this later, without encoding format change.
+
+ // if we saw the type before, write its index (>= 0)
+ if i, ok := p.typIndex[t]; ok {
+ p.index('T', i)
+ return
+ }
+
+ // otherwise, remember the type, write the type tag (< 0) and type data
+ if trackAllTypes {
+ if trace {
+ p.tracef("T%d = {>\n", len(p.typIndex))
+ defer p.tracef("<\n} ")
+ }
+ p.typIndex[t] = len(p.typIndex)
+ }
+
+ switch t := t.(type) {
+ case *types.Named:
+ if !trackAllTypes {
+ // if we don't track all types, track named types now
+ p.typIndex[t] = len(p.typIndex)
+ }
+
+ p.tag(namedTag)
+ p.pos(t.Obj())
+ p.qualifiedName(t.Obj())
+ p.typ(t.Underlying())
+ if !types.IsInterface(t) {
+ p.assocMethods(t)
+ }
+
+ case *types.Array:
+ p.tag(arrayTag)
+ p.int64(t.Len())
+ p.typ(t.Elem())
+
+ case *types.Slice:
+ p.tag(sliceTag)
+ p.typ(t.Elem())
+
+ case *dddSlice:
+ p.tag(dddTag)
+ p.typ(t.elem)
+
+ case *types.Struct:
+ p.tag(structTag)
+ p.fieldList(t)
+
+ case *types.Pointer:
+ p.tag(pointerTag)
+ p.typ(t.Elem())
+
+ case *types.Signature:
+ p.tag(signatureTag)
+ p.paramList(t.Params(), t.Variadic())
+ p.paramList(t.Results(), false)
+
+ case *types.Interface:
+ p.tag(interfaceTag)
+ p.iface(t)
+
+ case *types.Map:
+ p.tag(mapTag)
+ p.typ(t.Key())
+ p.typ(t.Elem())
+
+ case *types.Chan:
+ p.tag(chanTag)
+ p.int(int(3 - t.Dir())) // hack
+ p.typ(t.Elem())
+
+ default:
+ panic(internalErrorf("unexpected type %T: %s", t, t))
+ }
+}
+
+func (p *exporter) assocMethods(named *types.Named) {
+ // Sort methods (for determinism).
+ var methods []*types.Func
+ for i := 0; i < named.NumMethods(); i++ {
+ methods = append(methods, named.Method(i))
+ }
+ sort.Sort(methodsByName(methods))
+
+ p.int(len(methods))
+
+ if trace && methods != nil {
+ p.tracef("associated methods {>\n")
+ }
+
+ for i, m := range methods {
+ if trace && i > 0 {
+ p.tracef("\n")
+ }
+
+ p.pos(m)
+ name := m.Name()
+ p.string(name)
+ if !exported(name) {
+ p.pkg(m.Pkg(), false)
+ }
+
+ sig := m.Type().(*types.Signature)
+ p.paramList(types.NewTuple(sig.Recv()), false)
+ p.paramList(sig.Params(), sig.Variadic())
+ p.paramList(sig.Results(), false)
+ p.int(0) // dummy value for go:nointerface pragma - ignored by importer
+ }
+
+ if trace && methods != nil {
+ p.tracef("<\n} ")
+ }
+}
+
+type methodsByName []*types.Func
+
+func (x methodsByName) Len() int { return len(x) }
+func (x methodsByName) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
+func (x methodsByName) Less(i, j int) bool { return x[i].Name() < x[j].Name() }
+
+func (p *exporter) fieldList(t *types.Struct) {
+ if trace && t.NumFields() > 0 {
+ p.tracef("fields {>\n")
+ defer p.tracef("<\n} ")
+ }
+
+ p.int(t.NumFields())
+ for i := 0; i < t.NumFields(); i++ {
+ if trace && i > 0 {
+ p.tracef("\n")
+ }
+ p.field(t.Field(i))
+ p.string(t.Tag(i))
+ }
+}
+
+func (p *exporter) field(f *types.Var) {
+ if !f.IsField() {
+ panic(internalError("field expected"))
+ }
+
+ p.pos(f)
+ p.fieldName(f)
+ p.typ(f.Type())
+}
+
+func (p *exporter) iface(t *types.Interface) {
+ // TODO(gri): enable importer to load embedded interfaces,
+ // then emit Embeddeds and ExplicitMethods separately here.
+ p.int(0)
+
+ n := t.NumMethods()
+ if trace && n > 0 {
+ p.tracef("methods {>\n")
+ defer p.tracef("<\n} ")
+ }
+ p.int(n)
+ for i := 0; i < n; i++ {
+ if trace && i > 0 {
+ p.tracef("\n")
+ }
+ p.method(t.Method(i))
+ }
+}
+
+func (p *exporter) method(m *types.Func) {
+ sig := m.Type().(*types.Signature)
+ if sig.Recv() == nil {
+ panic(internalError("method expected"))
+ }
+
+ p.pos(m)
+ p.string(m.Name())
+ if m.Name() != "_" && !ast.IsExported(m.Name()) {
+ p.pkg(m.Pkg(), false)
+ }
+
+ // interface method; no need to encode receiver.
+ p.paramList(sig.Params(), sig.Variadic())
+ p.paramList(sig.Results(), false)
+}
+
+func (p *exporter) fieldName(f *types.Var) {
+ name := f.Name()
+
+ if f.Anonymous() {
+ // anonymous field - we distinguish between 3 cases:
+ // 1) field name matches base type name and is exported
+ // 2) field name matches base type name and is not exported
+ // 3) field name doesn't match base type name (alias name)
+ bname := basetypeName(f.Type())
+ if name == bname {
+ if ast.IsExported(name) {
+ name = "" // 1) we don't need to know the field name or package
+ } else {
+ name = "?" // 2) use unexported name "?" to force package export
+ }
+ } else {
+ // 3) indicate alias and export name as is
+ // (this requires an extra "@" but this is a rare case)
+ p.string("@")
+ }
+ }
+
+ p.string(name)
+ if name != "" && !ast.IsExported(name) {
+ p.pkg(f.Pkg(), false)
+ }
+}
+
+func basetypeName(typ types.Type) string {
+ switch typ := deref(typ).(type) {
+ case *types.Basic:
+ return typ.Name()
+ case *types.Named:
+ return typ.Obj().Name()
+ default:
+ return "" // unnamed type
+ }
+}
+
+func (p *exporter) paramList(params *types.Tuple, variadic bool) {
+ // use negative length to indicate unnamed parameters
+ // (look at the first parameter only since either all
+ // names are present or all are absent)
+ n := params.Len()
+ if n > 0 && params.At(0).Name() == "" {
+ n = -n
+ }
+ p.int(n)
+ for i := 0; i < params.Len(); i++ {
+ q := params.At(i)
+ t := q.Type()
+ if variadic && i == params.Len()-1 {
+ t = &dddSlice{t.(*types.Slice).Elem()}
+ }
+ p.typ(t)
+ if n > 0 {
+ name := q.Name()
+ p.string(name)
+ if name != "_" {
+ p.pkg(q.Pkg(), false)
+ }
+ }
+ p.string("") // no compiler-specific info
+ }
+}
+
+func (p *exporter) value(x constant.Value) {
+ if trace {
+ p.tracef("= ")
+ }
+
+ switch x.Kind() {
+ case constant.Bool:
+ tag := falseTag
+ if constant.BoolVal(x) {
+ tag = trueTag
+ }
+ p.tag(tag)
+
+ case constant.Int:
+ if v, exact := constant.Int64Val(x); exact {
+ // common case: x fits into an int64 - use compact encoding
+ p.tag(int64Tag)
+ p.int64(v)
+ return
+ }
+ // uncommon case: large x - use float encoding
+ // (powers of 2 will be encoded efficiently with exponent)
+ p.tag(floatTag)
+ p.float(constant.ToFloat(x))
+
+ case constant.Float:
+ p.tag(floatTag)
+ p.float(x)
+
+ case constant.Complex:
+ p.tag(complexTag)
+ p.float(constant.Real(x))
+ p.float(constant.Imag(x))
+
+ case constant.String:
+ p.tag(stringTag)
+ p.string(constant.StringVal(x))
+
+ case constant.Unknown:
+ // package contains type errors
+ p.tag(unknownTag)
+
+ default:
+ panic(internalErrorf("unexpected value %v (%T)", x, x))
+ }
+}
+
+func (p *exporter) float(x constant.Value) {
+ if x.Kind() != constant.Float {
+ panic(internalErrorf("unexpected constant %v, want float", x))
+ }
+ // extract sign (there is no -0)
+ sign := constant.Sign(x)
+ if sign == 0 {
+ // x == 0
+ p.int(0)
+ return
+ }
+ // x != 0
+
+ var f big.Float
+ if v, exact := constant.Float64Val(x); exact {
+ // float64
+ f.SetFloat64(v)
+ } else if num, denom := constant.Num(x), constant.Denom(x); num.Kind() == constant.Int {
+ // TODO(gri): add big.Rat accessor to constant.Value.
+ r := valueToRat(num)
+ f.SetRat(r.Quo(r, valueToRat(denom)))
+ } else {
+ // Value too large to represent as a fraction => inaccessible.
+ // TODO(gri): add big.Float accessor to constant.Value.
+ f.SetFloat64(math.MaxFloat64) // FIXME
+ }
+
+ // extract exponent such that 0.5 <= m < 1.0
+ var m big.Float
+ exp := f.MantExp(&m)
+
+ // extract mantissa as *big.Int
+ // - set exponent large enough so mant satisfies mant.IsInt()
+ // - get *big.Int from mant
+ m.SetMantExp(&m, int(m.MinPrec()))
+ mant, acc := m.Int(nil)
+ if acc != big.Exact {
+ panic(internalError("internal error"))
+ }
+
+ p.int(sign)
+ p.int(exp)
+ p.string(string(mant.Bytes()))
+}
+
+func valueToRat(x constant.Value) *big.Rat {
+ // Convert little-endian to big-endian.
+ // I can't believe this is necessary.
+ bytes := constant.Bytes(x)
+ for i := 0; i < len(bytes)/2; i++ {
+ bytes[i], bytes[len(bytes)-1-i] = bytes[len(bytes)-1-i], bytes[i]
+ }
+ return new(big.Rat).SetInt(new(big.Int).SetBytes(bytes))
+}
+
+func (p *exporter) bool(b bool) bool {
+ if trace {
+ p.tracef("[")
+ defer p.tracef("= %v] ", b)
+ }
+
+ x := 0
+ if b {
+ x = 1
+ }
+ p.int(x)
+ return b
+}
+
+// ----------------------------------------------------------------------------
+// Low-level encoders
+
+func (p *exporter) index(marker byte, index int) {
+ if index < 0 {
+ panic(internalError("invalid index < 0"))
+ }
+ if debugFormat {
+ p.marker('t')
+ }
+ if trace {
+ p.tracef("%c%d ", marker, index)
+ }
+ p.rawInt64(int64(index))
+}
+
+func (p *exporter) tag(tag int) {
+ if tag >= 0 {
+ panic(internalError("invalid tag >= 0"))
+ }
+ if debugFormat {
+ p.marker('t')
+ }
+ if trace {
+ p.tracef("%s ", tagString[-tag])
+ }
+ p.rawInt64(int64(tag))
+}
+
+func (p *exporter) int(x int) {
+ p.int64(int64(x))
+}
+
+func (p *exporter) int64(x int64) {
+ if debugFormat {
+ p.marker('i')
+ }
+ if trace {
+ p.tracef("%d ", x)
+ }
+ p.rawInt64(x)
+}
+
+func (p *exporter) string(s string) {
+ if debugFormat {
+ p.marker('s')
+ }
+ if trace {
+ p.tracef("%q ", s)
+ }
+ // if we saw the string before, write its index (>= 0)
+ // (the empty string is mapped to 0)
+ if i, ok := p.strIndex[s]; ok {
+ p.rawInt64(int64(i))
+ return
+ }
+ // otherwise, remember string and write its negative length and bytes
+ p.strIndex[s] = len(p.strIndex)
+ p.rawInt64(-int64(len(s)))
+ for i := 0; i < len(s); i++ {
+ p.rawByte(s[i])
+ }
+}
+
+// marker emits a marker byte and position information which makes
+// it easy for a reader to detect if it is "out of sync". Used for
+// debugFormat format only.
+func (p *exporter) marker(m byte) {
+ p.rawByte(m)
+ // Enable this for help tracking down the location
+ // of an incorrect marker when running in debugFormat.
+ if false && trace {
+ p.tracef("#%d ", p.written)
+ }
+ p.rawInt64(int64(p.written))
+}
+
+// rawInt64 should only be used by low-level encoders.
+func (p *exporter) rawInt64(x int64) {
+ var tmp [binary.MaxVarintLen64]byte
+ n := binary.PutVarint(tmp[:], x)
+ for i := 0; i < n; i++ {
+ p.rawByte(tmp[i])
+ }
+}
+
+// rawStringln should only be used to emit the initial version string.
+func (p *exporter) rawStringln(s string) {
+ for i := 0; i < len(s); i++ {
+ p.rawByte(s[i])
+ }
+ p.rawByte('\n')
+}
+
+// rawByte is the bottleneck interface to write to p.out.
+// rawByte escapes b as follows (any encoding does that
+// hides '$'):
+//
+// '$' => '|' 'S'
+// '|' => '|' '|'
+//
+// Necessary so other tools can find the end of the
+// export data by searching for "$$".
+// rawByte should only be used by low-level encoders.
+func (p *exporter) rawByte(b byte) {
+ switch b {
+ case '$':
+ // write '$' as '|' 'S'
+ b = 'S'
+ fallthrough
+ case '|':
+ // write '|' as '|' '|'
+ p.out.WriteByte('|')
+ p.written++
+ }
+ p.out.WriteByte(b)
+ p.written++
+}
+
+// tracef is like fmt.Printf but it rewrites the format string
+// to take care of indentation.
+func (p *exporter) tracef(format string, args ...interface{}) {
+ if strings.ContainsAny(format, "<>\n") {
+ var buf bytes.Buffer
+ for i := 0; i < len(format); i++ {
+ // no need to deal with runes
+ ch := format[i]
+ switch ch {
+ case '>':
+ p.indent++
+ continue
+ case '<':
+ p.indent--
+ continue
+ }
+ buf.WriteByte(ch)
+ if ch == '\n' {
+ for j := p.indent; j > 0; j-- {
+ buf.WriteString(". ")
+ }
+ }
+ }
+ format = buf.String()
+ }
+ fmt.Printf(format, args...)
+}
+
+// Debugging support.
+// (tagString is only used when tracing is enabled)
+var tagString = [...]string{
+ // Packages
+ -packageTag: "package",
+
+ // Types
+ -namedTag: "named type",
+ -arrayTag: "array",
+ -sliceTag: "slice",
+ -dddTag: "ddd",
+ -structTag: "struct",
+ -pointerTag: "pointer",
+ -signatureTag: "signature",
+ -interfaceTag: "interface",
+ -mapTag: "map",
+ -chanTag: "chan",
+
+ // Values
+ -falseTag: "false",
+ -trueTag: "true",
+ -int64Tag: "int64",
+ -floatTag: "float",
+ -fractionTag: "fraction",
+ -complexTag: "complex",
+ -stringTag: "string",
+ -unknownTag: "unknown",
+
+ // Type aliases
+ -aliasTag: "alias",
+}
diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go
new file mode 100644
index 0000000..e9f73d1
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/internal/gcimporter/bimport.go
@@ -0,0 +1,1039 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file is a copy of $GOROOT/src/go/internal/gcimporter/bimport.go.
+
+package gcimporter
+
+import (
+ "encoding/binary"
+ "fmt"
+ "go/constant"
+ "go/token"
+ "go/types"
+ "sort"
+ "strconv"
+ "strings"
+ "sync"
+ "unicode"
+ "unicode/utf8"
+)
+
+type importer struct {
+ imports map[string]*types.Package
+ data []byte
+ importpath string
+ buf []byte // for reading strings
+ version int // export format version
+
+ // object lists
+ strList []string // in order of appearance
+ pathList []string // in order of appearance
+ pkgList []*types.Package // in order of appearance
+ typList []types.Type // in order of appearance
+ interfaceList []*types.Interface // for delayed completion only
+ trackAllTypes bool
+
+ // position encoding
+ posInfoFormat bool
+ prevFile string
+ prevLine int
+ fake fakeFileSet
+
+ // debugging support
+ debugFormat bool
+ read int // bytes read
+}
+
+// BImportData imports a package from the serialized package data
+// and returns the number of bytes consumed and a reference to the package.
+// If the export data version is not recognized or the format is otherwise
+// compromised, an error is returned.
+func BImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) {
+ // catch panics and return them as errors
+ const currentVersion = 6
+ version := -1 // unknown version
+ defer func() {
+ if e := recover(); e != nil {
+ // Return a (possibly nil or incomplete) package unchanged (see #16088).
+ if version > currentVersion {
+ err = fmt.Errorf("cannot import %q (%v), export data is newer version - update tool", path, e)
+ } else {
+ err = fmt.Errorf("cannot import %q (%v), possibly version skew - reinstall package", path, e)
+ }
+ }
+ }()
+
+ p := importer{
+ imports: imports,
+ data: data,
+ importpath: path,
+ version: version,
+ strList: []string{""}, // empty string is mapped to 0
+ pathList: []string{""}, // empty string is mapped to 0
+ fake: fakeFileSet{
+ fset: fset,
+ files: make(map[string]*token.File),
+ },
+ }
+
+ // read version info
+ var versionstr string
+ if b := p.rawByte(); b == 'c' || b == 'd' {
+ // Go1.7 encoding; first byte encodes low-level
+ // encoding format (compact vs debug).
+ // For backward-compatibility only (avoid problems with
+ // old installed packages). Newly compiled packages use
+ // the extensible format string.
+ // TODO(gri) Remove this support eventually; after Go1.8.
+ if b == 'd' {
+ p.debugFormat = true
+ }
+ p.trackAllTypes = p.rawByte() == 'a'
+ p.posInfoFormat = p.int() != 0
+ versionstr = p.string()
+ if versionstr == "v1" {
+ version = 0
+ }
+ } else {
+ // Go1.8 extensible encoding
+ // read version string and extract version number (ignore anything after the version number)
+ versionstr = p.rawStringln(b)
+ if s := strings.SplitN(versionstr, " ", 3); len(s) >= 2 && s[0] == "version" {
+ if v, err := strconv.Atoi(s[1]); err == nil && v > 0 {
+ version = v
+ }
+ }
+ }
+ p.version = version
+
+ // read version specific flags - extend as necessary
+ switch p.version {
+ // case currentVersion:
+ // ...
+ // fallthrough
+ case currentVersion, 5, 4, 3, 2, 1:
+ p.debugFormat = p.rawStringln(p.rawByte()) == "debug"
+ p.trackAllTypes = p.int() != 0
+ p.posInfoFormat = p.int() != 0
+ case 0:
+ // Go1.7 encoding format - nothing to do here
+ default:
+ errorf("unknown bexport format version %d (%q)", p.version, versionstr)
+ }
+
+ // --- generic export data ---
+
+ // populate typList with predeclared "known" types
+ p.typList = append(p.typList, predeclared()...)
+
+ // read package data
+ pkg = p.pkg()
+
+ // read objects of phase 1 only (see cmd/compile/internal/gc/bexport.go)
+ objcount := 0
+ for {
+ tag := p.tagOrIndex()
+ if tag == endTag {
+ break
+ }
+ p.obj(tag)
+ objcount++
+ }
+
+ // self-verification
+ if count := p.int(); count != objcount {
+ errorf("got %d objects; want %d", objcount, count)
+ }
+
+ // ignore compiler-specific import data
+
+ // complete interfaces
+ // TODO(gri) re-investigate if we still need to do this in a delayed fashion
+ for _, typ := range p.interfaceList {
+ typ.Complete()
+ }
+
+ // record all referenced packages as imports
+ list := append(([]*types.Package)(nil), p.pkgList[1:]...)
+ sort.Sort(byPath(list))
+ pkg.SetImports(list)
+
+ // package was imported completely and without errors
+ pkg.MarkComplete()
+
+ return p.read, pkg, nil
+}
+
+func errorf(format string, args ...interface{}) {
+ panic(fmt.Sprintf(format, args...))
+}
+
+func (p *importer) pkg() *types.Package {
+ // if the package was seen before, i is its index (>= 0)
+ i := p.tagOrIndex()
+ if i >= 0 {
+ return p.pkgList[i]
+ }
+
+ // otherwise, i is the package tag (< 0)
+ if i != packageTag {
+ errorf("unexpected package tag %d version %d", i, p.version)
+ }
+
+ // read package data
+ name := p.string()
+ var path string
+ if p.version >= 5 {
+ path = p.path()
+ } else {
+ path = p.string()
+ }
+ if p.version >= 6 {
+ p.int() // package height; unused by go/types
+ }
+
+ // we should never see an empty package name
+ if name == "" {
+ errorf("empty package name in import")
+ }
+
+ // an empty path denotes the package we are currently importing;
+ // it must be the first package we see
+ if (path == "") != (len(p.pkgList) == 0) {
+ errorf("package path %q for pkg index %d", path, len(p.pkgList))
+ }
+
+ // if the package was imported before, use that one; otherwise create a new one
+ if path == "" {
+ path = p.importpath
+ }
+ pkg := p.imports[path]
+ if pkg == nil {
+ pkg = types.NewPackage(path, name)
+ p.imports[path] = pkg
+ } else if pkg.Name() != name {
+ errorf("conflicting names %s and %s for package %q", pkg.Name(), name, path)
+ }
+ p.pkgList = append(p.pkgList, pkg)
+
+ return pkg
+}
+
+// objTag returns the tag value for each object kind.
+func objTag(obj types.Object) int {
+ switch obj.(type) {
+ case *types.Const:
+ return constTag
+ case *types.TypeName:
+ return typeTag
+ case *types.Var:
+ return varTag
+ case *types.Func:
+ return funcTag
+ default:
+ errorf("unexpected object: %v (%T)", obj, obj) // panics
+ panic("unreachable")
+ }
+}
+
+func sameObj(a, b types.Object) bool {
+ // Because unnamed types are not canonicalized, we cannot simply compare types for
+ // (pointer) identity.
+ // Ideally we'd check equality of constant values as well, but this is good enough.
+ return objTag(a) == objTag(b) && types.Identical(a.Type(), b.Type())
+}
+
+func (p *importer) declare(obj types.Object) {
+ pkg := obj.Pkg()
+ if alt := pkg.Scope().Insert(obj); alt != nil {
+ // This can only trigger if we import a (non-type) object a second time.
+ // Excluding type aliases, this cannot happen because 1) we only import a package
+ // once; and b) we ignore compiler-specific export data which may contain
+ // functions whose inlined function bodies refer to other functions that
+ // were already imported.
+ // However, type aliases require reexporting the original type, so we need
+ // to allow it (see also the comment in cmd/compile/internal/gc/bimport.go,
+ // method importer.obj, switch case importing functions).
+ // TODO(gri) review/update this comment once the gc compiler handles type aliases.
+ if !sameObj(obj, alt) {
+ errorf("inconsistent import:\n\t%v\npreviously imported as:\n\t%v\n", obj, alt)
+ }
+ }
+}
+
+func (p *importer) obj(tag int) {
+ switch tag {
+ case constTag:
+ pos := p.pos()
+ pkg, name := p.qualifiedName()
+ typ := p.typ(nil, nil)
+ val := p.value()
+ p.declare(types.NewConst(pos, pkg, name, typ, val))
+
+ case aliasTag:
+ // TODO(gri) verify type alias hookup is correct
+ pos := p.pos()
+ pkg, name := p.qualifiedName()
+ typ := p.typ(nil, nil)
+ p.declare(types.NewTypeName(pos, pkg, name, typ))
+
+ case typeTag:
+ p.typ(nil, nil)
+
+ case varTag:
+ pos := p.pos()
+ pkg, name := p.qualifiedName()
+ typ := p.typ(nil, nil)
+ p.declare(types.NewVar(pos, pkg, name, typ))
+
+ case funcTag:
+ pos := p.pos()
+ pkg, name := p.qualifiedName()
+ params, isddd := p.paramList()
+ result, _ := p.paramList()
+ sig := types.NewSignature(nil, params, result, isddd)
+ p.declare(types.NewFunc(pos, pkg, name, sig))
+
+ default:
+ errorf("unexpected object tag %d", tag)
+ }
+}
+
+const deltaNewFile = -64 // see cmd/compile/internal/gc/bexport.go
+
+func (p *importer) pos() token.Pos {
+ if !p.posInfoFormat {
+ return token.NoPos
+ }
+
+ file := p.prevFile
+ line := p.prevLine
+ delta := p.int()
+ line += delta
+ if p.version >= 5 {
+ if delta == deltaNewFile {
+ if n := p.int(); n >= 0 {
+ // file changed
+ file = p.path()
+ line = n
+ }
+ }
+ } else {
+ if delta == 0 {
+ if n := p.int(); n >= 0 {
+ // file changed
+ file = p.prevFile[:n] + p.string()
+ line = p.int()
+ }
+ }
+ }
+ p.prevFile = file
+ p.prevLine = line
+
+ return p.fake.pos(file, line, 0)
+}
+
+// Synthesize a token.Pos
+type fakeFileSet struct {
+ fset *token.FileSet
+ files map[string]*token.File
+}
+
+func (s *fakeFileSet) pos(file string, line, column int) token.Pos {
+ // TODO(mdempsky): Make use of column.
+
+ // Since we don't know the set of needed file positions, we
+ // reserve maxlines positions per file.
+ const maxlines = 64 * 1024
+ f := s.files[file]
+ if f == nil {
+ f = s.fset.AddFile(file, -1, maxlines)
+ s.files[file] = f
+ // Allocate the fake linebreak indices on first use.
+ // TODO(adonovan): opt: save ~512KB using a more complex scheme?
+ fakeLinesOnce.Do(func() {
+ fakeLines = make([]int, maxlines)
+ for i := range fakeLines {
+ fakeLines[i] = i
+ }
+ })
+ f.SetLines(fakeLines)
+ }
+
+ if line > maxlines {
+ line = 1
+ }
+
+ // Treat the file as if it contained only newlines
+ // and column=1: use the line number as the offset.
+ return f.Pos(line - 1)
+}
+
+var (
+ fakeLines []int
+ fakeLinesOnce sync.Once
+)
+
+func (p *importer) qualifiedName() (pkg *types.Package, name string) {
+ name = p.string()
+ pkg = p.pkg()
+ return
+}
+
+func (p *importer) record(t types.Type) {
+ p.typList = append(p.typList, t)
+}
+
+// A dddSlice is a types.Type representing ...T parameters.
+// It only appears for parameter types and does not escape
+// the importer.
+type dddSlice struct {
+ elem types.Type
+}
+
+func (t *dddSlice) Underlying() types.Type { return t }
+func (t *dddSlice) String() string { return "..." + t.elem.String() }
+
+// parent is the package which declared the type; parent == nil means
+// the package currently imported. The parent package is needed for
+// exported struct fields and interface methods which don't contain
+// explicit package information in the export data.
+//
+// A non-nil tname is used as the "owner" of the result type; i.e.,
+// the result type is the underlying type of tname. tname is used
+// to give interface methods a named receiver type where possible.
+func (p *importer) typ(parent *types.Package, tname *types.Named) types.Type {
+ // if the type was seen before, i is its index (>= 0)
+ i := p.tagOrIndex()
+ if i >= 0 {
+ return p.typList[i]
+ }
+
+ // otherwise, i is the type tag (< 0)
+ switch i {
+ case namedTag:
+ // read type object
+ pos := p.pos()
+ parent, name := p.qualifiedName()
+ scope := parent.Scope()
+ obj := scope.Lookup(name)
+
+ // if the object doesn't exist yet, create and insert it
+ if obj == nil {
+ obj = types.NewTypeName(pos, parent, name, nil)
+ scope.Insert(obj)
+ }
+
+ if _, ok := obj.(*types.TypeName); !ok {
+ errorf("pkg = %s, name = %s => %s", parent, name, obj)
+ }
+
+ // associate new named type with obj if it doesn't exist yet
+ t0 := types.NewNamed(obj.(*types.TypeName), nil, nil)
+
+ // but record the existing type, if any
+ tname := obj.Type().(*types.Named) // tname is either t0 or the existing type
+ p.record(tname)
+
+ // read underlying type
+ t0.SetUnderlying(p.typ(parent, t0))
+
+ // interfaces don't have associated methods
+ if types.IsInterface(t0) {
+ return tname
+ }
+
+ // read associated methods
+ for i := p.int(); i > 0; i-- {
+ // TODO(gri) replace this with something closer to fieldName
+ pos := p.pos()
+ name := p.string()
+ if !exported(name) {
+ p.pkg()
+ }
+
+ recv, _ := p.paramList() // TODO(gri) do we need a full param list for the receiver?
+ params, isddd := p.paramList()
+ result, _ := p.paramList()
+ p.int() // go:nointerface pragma - discarded
+
+ sig := types.NewSignature(recv.At(0), params, result, isddd)
+ t0.AddMethod(types.NewFunc(pos, parent, name, sig))
+ }
+
+ return tname
+
+ case arrayTag:
+ t := new(types.Array)
+ if p.trackAllTypes {
+ p.record(t)
+ }
+
+ n := p.int64()
+ *t = *types.NewArray(p.typ(parent, nil), n)
+ return t
+
+ case sliceTag:
+ t := new(types.Slice)
+ if p.trackAllTypes {
+ p.record(t)
+ }
+
+ *t = *types.NewSlice(p.typ(parent, nil))
+ return t
+
+ case dddTag:
+ t := new(dddSlice)
+ if p.trackAllTypes {
+ p.record(t)
+ }
+
+ t.elem = p.typ(parent, nil)
+ return t
+
+ case structTag:
+ t := new(types.Struct)
+ if p.trackAllTypes {
+ p.record(t)
+ }
+
+ *t = *types.NewStruct(p.fieldList(parent))
+ return t
+
+ case pointerTag:
+ t := new(types.Pointer)
+ if p.trackAllTypes {
+ p.record(t)
+ }
+
+ *t = *types.NewPointer(p.typ(parent, nil))
+ return t
+
+ case signatureTag:
+ t := new(types.Signature)
+ if p.trackAllTypes {
+ p.record(t)
+ }
+
+ params, isddd := p.paramList()
+ result, _ := p.paramList()
+ *t = *types.NewSignature(nil, params, result, isddd)
+ return t
+
+ case interfaceTag:
+ // Create a dummy entry in the type list. This is safe because we
+ // cannot expect the interface type to appear in a cycle, as any
+ // such cycle must contain a named type which would have been
+ // first defined earlier.
+ // TODO(gri) Is this still true now that we have type aliases?
+ // See issue #23225.
+ n := len(p.typList)
+ if p.trackAllTypes {
+ p.record(nil)
+ }
+
+ var embeddeds []types.Type
+ for n := p.int(); n > 0; n-- {
+ p.pos()
+ embeddeds = append(embeddeds, p.typ(parent, nil))
+ }
+
+ t := newInterface(p.methodList(parent, tname), embeddeds)
+ p.interfaceList = append(p.interfaceList, t)
+ if p.trackAllTypes {
+ p.typList[n] = t
+ }
+ return t
+
+ case mapTag:
+ t := new(types.Map)
+ if p.trackAllTypes {
+ p.record(t)
+ }
+
+ key := p.typ(parent, nil)
+ val := p.typ(parent, nil)
+ *t = *types.NewMap(key, val)
+ return t
+
+ case chanTag:
+ t := new(types.Chan)
+ if p.trackAllTypes {
+ p.record(t)
+ }
+
+ dir := chanDir(p.int())
+ val := p.typ(parent, nil)
+ *t = *types.NewChan(dir, val)
+ return t
+
+ default:
+ errorf("unexpected type tag %d", i) // panics
+ panic("unreachable")
+ }
+}
+
+func chanDir(d int) types.ChanDir {
+ // tag values must match the constants in cmd/compile/internal/gc/go.go
+ switch d {
+ case 1 /* Crecv */ :
+ return types.RecvOnly
+ case 2 /* Csend */ :
+ return types.SendOnly
+ case 3 /* Cboth */ :
+ return types.SendRecv
+ default:
+ errorf("unexpected channel dir %d", d)
+ return 0
+ }
+}
+
+func (p *importer) fieldList(parent *types.Package) (fields []*types.Var, tags []string) {
+ if n := p.int(); n > 0 {
+ fields = make([]*types.Var, n)
+ tags = make([]string, n)
+ for i := range fields {
+ fields[i], tags[i] = p.field(parent)
+ }
+ }
+ return
+}
+
+func (p *importer) field(parent *types.Package) (*types.Var, string) {
+ pos := p.pos()
+ pkg, name, alias := p.fieldName(parent)
+ typ := p.typ(parent, nil)
+ tag := p.string()
+
+ anonymous := false
+ if name == "" {
+ // anonymous field - typ must be T or *T and T must be a type name
+ switch typ := deref(typ).(type) {
+ case *types.Basic: // basic types are named types
+ pkg = nil // // objects defined in Universe scope have no package
+ name = typ.Name()
+ case *types.Named:
+ name = typ.Obj().Name()
+ default:
+ errorf("named base type expected")
+ }
+ anonymous = true
+ } else if alias {
+ // anonymous field: we have an explicit name because it's an alias
+ anonymous = true
+ }
+
+ return types.NewField(pos, pkg, name, typ, anonymous), tag
+}
+
+func (p *importer) methodList(parent *types.Package, baseType *types.Named) (methods []*types.Func) {
+ if n := p.int(); n > 0 {
+ methods = make([]*types.Func, n)
+ for i := range methods {
+ methods[i] = p.method(parent, baseType)
+ }
+ }
+ return
+}
+
+func (p *importer) method(parent *types.Package, baseType *types.Named) *types.Func {
+ pos := p.pos()
+ pkg, name, _ := p.fieldName(parent)
+ // If we don't have a baseType, use a nil receiver.
+ // A receiver using the actual interface type (which
+ // we don't know yet) will be filled in when we call
+ // types.Interface.Complete.
+ var recv *types.Var
+ if baseType != nil {
+ recv = types.NewVar(token.NoPos, parent, "", baseType)
+ }
+ params, isddd := p.paramList()
+ result, _ := p.paramList()
+ sig := types.NewSignature(recv, params, result, isddd)
+ return types.NewFunc(pos, pkg, name, sig)
+}
+
+func (p *importer) fieldName(parent *types.Package) (pkg *types.Package, name string, alias bool) {
+ name = p.string()
+ pkg = parent
+ if pkg == nil {
+ // use the imported package instead
+ pkg = p.pkgList[0]
+ }
+ if p.version == 0 && name == "_" {
+ // version 0 didn't export a package for _ fields
+ return
+ }
+ switch name {
+ case "":
+ // 1) field name matches base type name and is exported: nothing to do
+ case "?":
+ // 2) field name matches base type name and is not exported: need package
+ name = ""
+ pkg = p.pkg()
+ case "@":
+ // 3) field name doesn't match type name (alias)
+ name = p.string()
+ alias = true
+ fallthrough
+ default:
+ if !exported(name) {
+ pkg = p.pkg()
+ }
+ }
+ return
+}
+
+func (p *importer) paramList() (*types.Tuple, bool) {
+ n := p.int()
+ if n == 0 {
+ return nil, false
+ }
+ // negative length indicates unnamed parameters
+ named := true
+ if n < 0 {
+ n = -n
+ named = false
+ }
+ // n > 0
+ params := make([]*types.Var, n)
+ isddd := false
+ for i := range params {
+ params[i], isddd = p.param(named)
+ }
+ return types.NewTuple(params...), isddd
+}
+
+func (p *importer) param(named bool) (*types.Var, bool) {
+ t := p.typ(nil, nil)
+ td, isddd := t.(*dddSlice)
+ if isddd {
+ t = types.NewSlice(td.elem)
+ }
+
+ var pkg *types.Package
+ var name string
+ if named {
+ name = p.string()
+ if name == "" {
+ errorf("expected named parameter")
+ }
+ if name != "_" {
+ pkg = p.pkg()
+ }
+ if i := strings.Index(name, "·"); i > 0 {
+ name = name[:i] // cut off gc-specific parameter numbering
+ }
+ }
+
+ // read and discard compiler-specific info
+ p.string()
+
+ return types.NewVar(token.NoPos, pkg, name, t), isddd
+}
+
+func exported(name string) bool {
+ ch, _ := utf8.DecodeRuneInString(name)
+ return unicode.IsUpper(ch)
+}
+
+func (p *importer) value() constant.Value {
+ switch tag := p.tagOrIndex(); tag {
+ case falseTag:
+ return constant.MakeBool(false)
+ case trueTag:
+ return constant.MakeBool(true)
+ case int64Tag:
+ return constant.MakeInt64(p.int64())
+ case floatTag:
+ return p.float()
+ case complexTag:
+ re := p.float()
+ im := p.float()
+ return constant.BinaryOp(re, token.ADD, constant.MakeImag(im))
+ case stringTag:
+ return constant.MakeString(p.string())
+ case unknownTag:
+ return constant.MakeUnknown()
+ default:
+ errorf("unexpected value tag %d", tag) // panics
+ panic("unreachable")
+ }
+}
+
+func (p *importer) float() constant.Value {
+ sign := p.int()
+ if sign == 0 {
+ return constant.MakeInt64(0)
+ }
+
+ exp := p.int()
+ mant := []byte(p.string()) // big endian
+
+ // remove leading 0's if any
+ for len(mant) > 0 && mant[0] == 0 {
+ mant = mant[1:]
+ }
+
+ // convert to little endian
+ // TODO(gri) go/constant should have a more direct conversion function
+ // (e.g., once it supports a big.Float based implementation)
+ for i, j := 0, len(mant)-1; i < j; i, j = i+1, j-1 {
+ mant[i], mant[j] = mant[j], mant[i]
+ }
+
+ // adjust exponent (constant.MakeFromBytes creates an integer value,
+ // but mant represents the mantissa bits such that 0.5 <= mant < 1.0)
+ exp -= len(mant) << 3
+ if len(mant) > 0 {
+ for msd := mant[len(mant)-1]; msd&0x80 == 0; msd <<= 1 {
+ exp++
+ }
+ }
+
+ x := constant.MakeFromBytes(mant)
+ switch {
+ case exp < 0:
+ d := constant.Shift(constant.MakeInt64(1), token.SHL, uint(-exp))
+ x = constant.BinaryOp(x, token.QUO, d)
+ case exp > 0:
+ x = constant.Shift(x, token.SHL, uint(exp))
+ }
+
+ if sign < 0 {
+ x = constant.UnaryOp(token.SUB, x, 0)
+ }
+ return x
+}
+
+// ----------------------------------------------------------------------------
+// Low-level decoders
+
+func (p *importer) tagOrIndex() int {
+ if p.debugFormat {
+ p.marker('t')
+ }
+
+ return int(p.rawInt64())
+}
+
+func (p *importer) int() int {
+ x := p.int64()
+ if int64(int(x)) != x {
+ errorf("exported integer too large")
+ }
+ return int(x)
+}
+
+func (p *importer) int64() int64 {
+ if p.debugFormat {
+ p.marker('i')
+ }
+
+ return p.rawInt64()
+}
+
+func (p *importer) path() string {
+ if p.debugFormat {
+ p.marker('p')
+ }
+ // if the path was seen before, i is its index (>= 0)
+ // (the empty string is at index 0)
+ i := p.rawInt64()
+ if i >= 0 {
+ return p.pathList[i]
+ }
+ // otherwise, i is the negative path length (< 0)
+ a := make([]string, -i)
+ for n := range a {
+ a[n] = p.string()
+ }
+ s := strings.Join(a, "/")
+ p.pathList = append(p.pathList, s)
+ return s
+}
+
+func (p *importer) string() string {
+ if p.debugFormat {
+ p.marker('s')
+ }
+ // if the string was seen before, i is its index (>= 0)
+ // (the empty string is at index 0)
+ i := p.rawInt64()
+ if i >= 0 {
+ return p.strList[i]
+ }
+ // otherwise, i is the negative string length (< 0)
+ if n := int(-i); n <= cap(p.buf) {
+ p.buf = p.buf[:n]
+ } else {
+ p.buf = make([]byte, n)
+ }
+ for i := range p.buf {
+ p.buf[i] = p.rawByte()
+ }
+ s := string(p.buf)
+ p.strList = append(p.strList, s)
+ return s
+}
+
+func (p *importer) marker(want byte) {
+ if got := p.rawByte(); got != want {
+ errorf("incorrect marker: got %c; want %c (pos = %d)", got, want, p.read)
+ }
+
+ pos := p.read
+ if n := int(p.rawInt64()); n != pos {
+ errorf("incorrect position: got %d; want %d", n, pos)
+ }
+}
+
+// rawInt64 should only be used by low-level decoders.
+func (p *importer) rawInt64() int64 {
+ i, err := binary.ReadVarint(p)
+ if err != nil {
+ errorf("read error: %v", err)
+ }
+ return i
+}
+
+// rawStringln should only be used to read the initial version string.
+func (p *importer) rawStringln(b byte) string {
+ p.buf = p.buf[:0]
+ for b != '\n' {
+ p.buf = append(p.buf, b)
+ b = p.rawByte()
+ }
+ return string(p.buf)
+}
+
+// needed for binary.ReadVarint in rawInt64
+func (p *importer) ReadByte() (byte, error) {
+ return p.rawByte(), nil
+}
+
+// byte is the bottleneck interface for reading p.data.
+// It unescapes '|' 'S' to '$' and '|' '|' to '|'.
+// rawByte should only be used by low-level decoders.
+func (p *importer) rawByte() byte {
+ b := p.data[0]
+ r := 1
+ if b == '|' {
+ b = p.data[1]
+ r = 2
+ switch b {
+ case 'S':
+ b = '$'
+ case '|':
+ // nothing to do
+ default:
+ errorf("unexpected escape sequence in export data")
+ }
+ }
+ p.data = p.data[r:]
+ p.read += r
+ return b
+
+}
+
+// ----------------------------------------------------------------------------
+// Export format
+
+// Tags. Must be < 0.
+const (
+ // Objects
+ packageTag = -(iota + 1)
+ constTag
+ typeTag
+ varTag
+ funcTag
+ endTag
+
+ // Types
+ namedTag
+ arrayTag
+ sliceTag
+ dddTag
+ structTag
+ pointerTag
+ signatureTag
+ interfaceTag
+ mapTag
+ chanTag
+
+ // Values
+ falseTag
+ trueTag
+ int64Tag
+ floatTag
+ fractionTag // not used by gc
+ complexTag
+ stringTag
+ nilTag // only used by gc (appears in exported inlined function bodies)
+ unknownTag // not used by gc (only appears in packages with errors)
+
+ // Type aliases
+ aliasTag
+)
+
+var predeclOnce sync.Once
+var predecl []types.Type // initialized lazily
+
+func predeclared() []types.Type {
+ predeclOnce.Do(func() {
+ // initialize lazily to be sure that all
+ // elements have been initialized before
+ predecl = []types.Type{ // basic types
+ types.Typ[types.Bool],
+ types.Typ[types.Int],
+ types.Typ[types.Int8],
+ types.Typ[types.Int16],
+ types.Typ[types.Int32],
+ types.Typ[types.Int64],
+ types.Typ[types.Uint],
+ types.Typ[types.Uint8],
+ types.Typ[types.Uint16],
+ types.Typ[types.Uint32],
+ types.Typ[types.Uint64],
+ types.Typ[types.Uintptr],
+ types.Typ[types.Float32],
+ types.Typ[types.Float64],
+ types.Typ[types.Complex64],
+ types.Typ[types.Complex128],
+ types.Typ[types.String],
+
+ // basic type aliases
+ types.Universe.Lookup("byte").Type(),
+ types.Universe.Lookup("rune").Type(),
+
+ // error
+ types.Universe.Lookup("error").Type(),
+
+ // untyped types
+ types.Typ[types.UntypedBool],
+ types.Typ[types.UntypedInt],
+ types.Typ[types.UntypedRune],
+ types.Typ[types.UntypedFloat],
+ types.Typ[types.UntypedComplex],
+ types.Typ[types.UntypedString],
+ types.Typ[types.UntypedNil],
+
+ // package unsafe
+ types.Typ[types.UnsafePointer],
+
+ // invalid type
+ types.Typ[types.Invalid], // only appears in packages with errors
+
+ // used internally by gc; never used by this package or in .a files
+ anyType{},
+ }
+ })
+ return predecl
+}
+
+type anyType struct{}
+
+func (t anyType) Underlying() types.Type { return t }
+func (t anyType) String() string { return "any" }
diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go b/vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go
new file mode 100644
index 0000000..f33dc56
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/internal/gcimporter/exportdata.go
@@ -0,0 +1,93 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file is a copy of $GOROOT/src/go/internal/gcimporter/exportdata.go.
+
+// This file implements FindExportData.
+
+package gcimporter
+
+import (
+ "bufio"
+ "fmt"
+ "io"
+ "strconv"
+ "strings"
+)
+
+func readGopackHeader(r *bufio.Reader) (name string, size int, err error) {
+ // See $GOROOT/include/ar.h.
+ hdr := make([]byte, 16+12+6+6+8+10+2)
+ _, err = io.ReadFull(r, hdr)
+ if err != nil {
+ return
+ }
+ // leave for debugging
+ if false {
+ fmt.Printf("header: %s", hdr)
+ }
+ s := strings.TrimSpace(string(hdr[16+12+6+6+8:][:10]))
+ size, err = strconv.Atoi(s)
+ if err != nil || hdr[len(hdr)-2] != '`' || hdr[len(hdr)-1] != '\n' {
+ err = fmt.Errorf("invalid archive header")
+ return
+ }
+ name = strings.TrimSpace(string(hdr[:16]))
+ return
+}
+
+// FindExportData positions the reader r at the beginning of the
+// export data section of an underlying GC-created object/archive
+// file by reading from it. The reader must be positioned at the
+// start of the file before calling this function. The hdr result
+// is the string before the export data, either "$$" or "$$B".
+//
+func FindExportData(r *bufio.Reader) (hdr string, err error) {
+ // Read first line to make sure this is an object file.
+ line, err := r.ReadSlice('\n')
+ if err != nil {
+ err = fmt.Errorf("can't find export data (%v)", err)
+ return
+ }
+
+ if string(line) == "!<arch>\n" {
+ // Archive file. Scan to __.PKGDEF.
+ var name string
+ if name, _, err = readGopackHeader(r); err != nil {
+ return
+ }
+
+ // First entry should be __.PKGDEF.
+ if name != "__.PKGDEF" {
+ err = fmt.Errorf("go archive is missing __.PKGDEF")
+ return
+ }
+
+ // Read first line of __.PKGDEF data, so that line
+ // is once again the first line of the input.
+ if line, err = r.ReadSlice('\n'); err != nil {
+ err = fmt.Errorf("can't find export data (%v)", err)
+ return
+ }
+ }
+
+ // Now at __.PKGDEF in archive or still at beginning of file.
+ // Either way, line should begin with "go object ".
+ if !strings.HasPrefix(string(line), "go object ") {
+ err = fmt.Errorf("not a Go object file")
+ return
+ }
+
+ // Skip over object header to export data.
+ // Begins after first line starting with $$.
+ for line[0] != '$' {
+ if line, err = r.ReadSlice('\n'); err != nil {
+ err = fmt.Errorf("can't find export data (%v)", err)
+ return
+ }
+ }
+ hdr = string(line)
+
+ return
+}
diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go
new file mode 100644
index 0000000..8dcd8bb
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/internal/gcimporter/gcimporter.go
@@ -0,0 +1,1078 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file is a modified copy of $GOROOT/src/go/internal/gcimporter/gcimporter.go,
+// but it also contains the original source-based importer code for Go1.6.
+// Once we stop supporting 1.6, we can remove that code.
+
+// Package gcimporter provides various functions for reading
+// gc-generated object files that can be used to implement the
+// Importer interface defined by the Go 1.5 standard library package.
+package gcimporter // import "golang.org/x/tools/go/internal/gcimporter"
+
+import (
+ "bufio"
+ "errors"
+ "fmt"
+ "go/build"
+ "go/constant"
+ "go/token"
+ "go/types"
+ "io"
+ "io/ioutil"
+ "os"
+ "path/filepath"
+ "sort"
+ "strconv"
+ "strings"
+ "text/scanner"
+)
+
+// debugging/development support
+const debug = false
+
+var pkgExts = [...]string{".a", ".o"}
+
+// FindPkg returns the filename and unique package id for an import
+// path based on package information provided by build.Import (using
+// the build.Default build.Context). A relative srcDir is interpreted
+// relative to the current working directory.
+// If no file was found, an empty filename is returned.
+//
+func FindPkg(path, srcDir string) (filename, id string) {
+ if path == "" {
+ return
+ }
+
+ var noext string
+ switch {
+ default:
+ // "x" -> "$GOPATH/pkg/$GOOS_$GOARCH/x.ext", "x"
+ // Don't require the source files to be present.
+ if abs, err := filepath.Abs(srcDir); err == nil { // see issue 14282
+ srcDir = abs
+ }
+ bp, _ := build.Import(path, srcDir, build.FindOnly|build.AllowBinary)
+ if bp.PkgObj == "" {
+ id = path // make sure we have an id to print in error message
+ return
+ }
+ noext = strings.TrimSuffix(bp.PkgObj, ".a")
+ id = bp.ImportPath
+
+ case build.IsLocalImport(path):
+ // "./x" -> "/this/directory/x.ext", "/this/directory/x"
+ noext = filepath.Join(srcDir, path)
+ id = noext
+
+ case filepath.IsAbs(path):
+ // for completeness only - go/build.Import
+ // does not support absolute imports
+ // "/x" -> "/x.ext", "/x"
+ noext = path
+ id = path
+ }
+
+ if false { // for debugging
+ if path != id {
+ fmt.Printf("%s -> %s\n", path, id)
+ }
+ }
+
+ // try extensions
+ for _, ext := range pkgExts {
+ filename = noext + ext
+ if f, err := os.Stat(filename); err == nil && !f.IsDir() {
+ return
+ }
+ }
+
+ filename = "" // not found
+ return
+}
+
+// ImportData imports a package by reading the gc-generated export data,
+// adds the corresponding package object to the packages map indexed by id,
+// and returns the object.
+//
+// The packages map must contains all packages already imported. The data
+// reader position must be the beginning of the export data section. The
+// filename is only used in error messages.
+//
+// If packages[id] contains the completely imported package, that package
+// can be used directly, and there is no need to call this function (but
+// there is also no harm but for extra time used).
+//
+func ImportData(packages map[string]*types.Package, filename, id string, data io.Reader) (pkg *types.Package, err error) {
+ // support for parser error handling
+ defer func() {
+ switch r := recover().(type) {
+ case nil:
+ // nothing to do
+ case importError:
+ err = r
+ default:
+ panic(r) // internal error
+ }
+ }()
+
+ var p parser
+ p.init(filename, id, data, packages)
+ pkg = p.parseExport()
+
+ return
+}
+
+// Import imports a gc-generated package given its import path and srcDir, adds
+// the corresponding package object to the packages map, and returns the object.
+// The packages map must contain all packages already imported.
+//
+func Import(packages map[string]*types.Package, path, srcDir string, lookup func(path string) (io.ReadCloser, error)) (pkg *types.Package, err error) {
+ var rc io.ReadCloser
+ var filename, id string
+ if lookup != nil {
+ // With custom lookup specified, assume that caller has
+ // converted path to a canonical import path for use in the map.
+ if path == "unsafe" {
+ return types.Unsafe, nil
+ }
+ id = path
+
+ // No need to re-import if the package was imported completely before.
+ if pkg = packages[id]; pkg != nil && pkg.Complete() {
+ return
+ }
+ f, err := lookup(path)
+ if err != nil {
+ return nil, err
+ }
+ rc = f
+ } else {
+ filename, id = FindPkg(path, srcDir)
+ if filename == "" {
+ if path == "unsafe" {
+ return types.Unsafe, nil
+ }
+ return nil, fmt.Errorf("can't find import: %q", id)
+ }
+
+ // no need to re-import if the package was imported completely before
+ if pkg = packages[id]; pkg != nil && pkg.Complete() {
+ return
+ }
+
+ // open file
+ f, err := os.Open(filename)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ if err != nil {
+ // add file name to error
+ err = fmt.Errorf("%s: %v", filename, err)
+ }
+ }()
+ rc = f
+ }
+ defer rc.Close()
+
+ var hdr string
+ buf := bufio.NewReader(rc)
+ if hdr, err = FindExportData(buf); err != nil {
+ return
+ }
+
+ switch hdr {
+ case "$$\n":
+ // Work-around if we don't have a filename; happens only if lookup != nil.
+ // Either way, the filename is only needed for importer error messages, so
+ // this is fine.
+ if filename == "" {
+ filename = path
+ }
+ return ImportData(packages, filename, id, buf)
+
+ case "$$B\n":
+ var data []byte
+ data, err = ioutil.ReadAll(buf)
+ if err != nil {
+ break
+ }
+
+ // TODO(gri): allow clients of go/importer to provide a FileSet.
+ // Or, define a new standard go/types/gcexportdata package.
+ fset := token.NewFileSet()
+
+ // The indexed export format starts with an 'i'; the older
+ // binary export format starts with a 'c', 'd', or 'v'
+ // (from "version"). Select appropriate importer.
+ if len(data) > 0 && data[0] == 'i' {
+ _, pkg, err = IImportData(fset, packages, data[1:], id)
+ } else {
+ _, pkg, err = BImportData(fset, packages, data, id)
+ }
+
+ default:
+ err = fmt.Errorf("unknown export data header: %q", hdr)
+ }
+
+ return
+}
+
+// ----------------------------------------------------------------------------
+// Parser
+
+// TODO(gri) Imported objects don't have position information.
+// Ideally use the debug table line info; alternatively
+// create some fake position (or the position of the
+// import). That way error messages referring to imported
+// objects can print meaningful information.
+
+// parser parses the exports inside a gc compiler-produced
+// object/archive file and populates its scope with the results.
+type parser struct {
+ scanner scanner.Scanner
+ tok rune // current token
+ lit string // literal string; only valid for Ident, Int, String tokens
+ id string // package id of imported package
+ sharedPkgs map[string]*types.Package // package id -> package object (across importer)
+ localPkgs map[string]*types.Package // package id -> package object (just this package)
+}
+
+func (p *parser) init(filename, id string, src io.Reader, packages map[string]*types.Package) {
+ p.scanner.Init(src)
+ p.scanner.Error = func(_ *scanner.Scanner, msg string) { p.error(msg) }
+ p.scanner.Mode = scanner.ScanIdents | scanner.ScanInts | scanner.ScanChars | scanner.ScanStrings | scanner.ScanComments | scanner.SkipComments
+ p.scanner.Whitespace = 1<<'\t' | 1<<' '
+ p.scanner.Filename = filename // for good error messages
+ p.next()
+ p.id = id
+ p.sharedPkgs = packages
+ if debug {
+ // check consistency of packages map
+ for _, pkg := range packages {
+ if pkg.Name() == "" {
+ fmt.Printf("no package name for %s\n", pkg.Path())
+ }
+ }
+ }
+}
+
+func (p *parser) next() {
+ p.tok = p.scanner.Scan()
+ switch p.tok {
+ case scanner.Ident, scanner.Int, scanner.Char, scanner.String, '·':
+ p.lit = p.scanner.TokenText()
+ default:
+ p.lit = ""
+ }
+ if debug {
+ fmt.Printf("%s: %q -> %q\n", scanner.TokenString(p.tok), p.scanner.TokenText(), p.lit)
+ }
+}
+
+func declTypeName(pkg *types.Package, name string) *types.TypeName {
+ scope := pkg.Scope()
+ if obj := scope.Lookup(name); obj != nil {
+ return obj.(*types.TypeName)
+ }
+ obj := types.NewTypeName(token.NoPos, pkg, name, nil)
+ // a named type may be referred to before the underlying type
+ // is known - set it up
+ types.NewNamed(obj, nil, nil)
+ scope.Insert(obj)
+ return obj
+}
+
+// ----------------------------------------------------------------------------
+// Error handling
+
+// Internal errors are boxed as importErrors.
+type importError struct {
+ pos scanner.Position
+ err error
+}
+
+func (e importError) Error() string {
+ return fmt.Sprintf("import error %s (byte offset = %d): %s", e.pos, e.pos.Offset, e.err)
+}
+
+func (p *parser) error(err interface{}) {
+ if s, ok := err.(string); ok {
+ err = errors.New(s)
+ }
+ // panic with a runtime.Error if err is not an error
+ panic(importError{p.scanner.Pos(), err.(error)})
+}
+
+func (p *parser) errorf(format string, args ...interface{}) {
+ p.error(fmt.Sprintf(format, args...))
+}
+
+func (p *parser) expect(tok rune) string {
+ lit := p.lit
+ if p.tok != tok {
+ p.errorf("expected %s, got %s (%s)", scanner.TokenString(tok), scanner.TokenString(p.tok), lit)
+ }
+ p.next()
+ return lit
+}
+
+func (p *parser) expectSpecial(tok string) {
+ sep := 'x' // not white space
+ i := 0
+ for i < len(tok) && p.tok == rune(tok[i]) && sep > ' ' {
+ sep = p.scanner.Peek() // if sep <= ' ', there is white space before the next token
+ p.next()
+ i++
+ }
+ if i < len(tok) {
+ p.errorf("expected %q, got %q", tok, tok[0:i])
+ }
+}
+
+func (p *parser) expectKeyword(keyword string) {
+ lit := p.expect(scanner.Ident)
+ if lit != keyword {
+ p.errorf("expected keyword %s, got %q", keyword, lit)
+ }
+}
+
+// ----------------------------------------------------------------------------
+// Qualified and unqualified names
+
+// PackageId = string_lit .
+//
+func (p *parser) parsePackageID() string {
+ id, err := strconv.Unquote(p.expect(scanner.String))
+ if err != nil {
+ p.error(err)
+ }
+ // id == "" stands for the imported package id
+ // (only known at time of package installation)
+ if id == "" {
+ id = p.id
+ }
+ return id
+}
+
+// PackageName = ident .
+//
+func (p *parser) parsePackageName() string {
+ return p.expect(scanner.Ident)
+}
+
+// dotIdentifier = ( ident | '·' ) { ident | int | '·' } .
+func (p *parser) parseDotIdent() string {
+ ident := ""
+ if p.tok != scanner.Int {
+ sep := 'x' // not white space
+ for (p.tok == scanner.Ident || p.tok == scanner.Int || p.tok == '·') && sep > ' ' {
+ ident += p.lit
+ sep = p.scanner.Peek() // if sep <= ' ', there is white space before the next token
+ p.next()
+ }
+ }
+ if ident == "" {
+ p.expect(scanner.Ident) // use expect() for error handling
+ }
+ return ident
+}
+
+// QualifiedName = "@" PackageId "." ( "?" | dotIdentifier ) .
+//
+func (p *parser) parseQualifiedName() (id, name string) {
+ p.expect('@')
+ id = p.parsePackageID()
+ p.expect('.')
+ // Per rev f280b8a485fd (10/2/2013), qualified names may be used for anonymous fields.
+ if p.tok == '?' {
+ p.next()
+ } else {
+ name = p.parseDotIdent()
+ }
+ return
+}
+
+// getPkg returns the package for a given id. If the package is
+// not found, create the package and add it to the p.localPkgs
+// and p.sharedPkgs maps. name is the (expected) name of the
+// package. If name == "", the package name is expected to be
+// set later via an import clause in the export data.
+//
+// id identifies a package, usually by a canonical package path like
+// "encoding/json" but possibly by a non-canonical import path like
+// "./json".
+//
+func (p *parser) getPkg(id, name string) *types.Package {
+ // package unsafe is not in the packages maps - handle explicitly
+ if id == "unsafe" {
+ return types.Unsafe
+ }
+
+ pkg := p.localPkgs[id]
+ if pkg == nil {
+ // first import of id from this package
+ pkg = p.sharedPkgs[id]
+ if pkg == nil {
+ // first import of id by this importer;
+ // add (possibly unnamed) pkg to shared packages
+ pkg = types.NewPackage(id, name)
+ p.sharedPkgs[id] = pkg
+ }
+ // add (possibly unnamed) pkg to local packages
+ if p.localPkgs == nil {
+ p.localPkgs = make(map[string]*types.Package)
+ }
+ p.localPkgs[id] = pkg
+ } else if name != "" {
+ // package exists already and we have an expected package name;
+ // make sure names match or set package name if necessary
+ if pname := pkg.Name(); pname == "" {
+ pkg.SetName(name)
+ } else if pname != name {
+ p.errorf("%s package name mismatch: %s (given) vs %s (expected)", id, pname, name)
+ }
+ }
+ return pkg
+}
+
+// parseExportedName is like parseQualifiedName, but
+// the package id is resolved to an imported *types.Package.
+//
+func (p *parser) parseExportedName() (pkg *types.Package, name string) {
+ id, name := p.parseQualifiedName()
+ pkg = p.getPkg(id, "")
+ return
+}
+
+// ----------------------------------------------------------------------------
+// Types
+
+// BasicType = identifier .
+//
+func (p *parser) parseBasicType() types.Type {
+ id := p.expect(scanner.Ident)
+ obj := types.Universe.Lookup(id)
+ if obj, ok := obj.(*types.TypeName); ok {
+ return obj.Type()
+ }
+ p.errorf("not a basic type: %s", id)
+ return nil
+}
+
+// ArrayType = "[" int_lit "]" Type .
+//
+func (p *parser) parseArrayType(parent *types.Package) types.Type {
+ // "[" already consumed and lookahead known not to be "]"
+ lit := p.expect(scanner.Int)
+ p.expect(']')
+ elem := p.parseType(parent)
+ n, err := strconv.ParseInt(lit, 10, 64)
+ if err != nil {
+ p.error(err)
+ }
+ return types.NewArray(elem, n)
+}
+
+// MapType = "map" "[" Type "]" Type .
+//
+func (p *parser) parseMapType(parent *types.Package) types.Type {
+ p.expectKeyword("map")
+ p.expect('[')
+ key := p.parseType(parent)
+ p.expect(']')
+ elem := p.parseType(parent)
+ return types.NewMap(key, elem)
+}
+
+// Name = identifier | "?" | QualifiedName .
+//
+// For unqualified and anonymous names, the returned package is the parent
+// package unless parent == nil, in which case the returned package is the
+// package being imported. (The parent package is not nil if the the name
+// is an unqualified struct field or interface method name belonging to a
+// type declared in another package.)
+//
+// For qualified names, the returned package is nil (and not created if
+// it doesn't exist yet) unless materializePkg is set (which creates an
+// unnamed package with valid package path). In the latter case, a
+// subsequent import clause is expected to provide a name for the package.
+//
+func (p *parser) parseName(parent *types.Package, materializePkg bool) (pkg *types.Package, name string) {
+ pkg = parent
+ if pkg == nil {
+ pkg = p.sharedPkgs[p.id]
+ }
+ switch p.tok {
+ case scanner.Ident:
+ name = p.lit
+ p.next()
+ case '?':
+ // anonymous
+ p.next()
+ case '@':
+ // exported name prefixed with package path
+ pkg = nil
+ var id string
+ id, name = p.parseQualifiedName()
+ if materializePkg {
+ pkg = p.getPkg(id, "")
+ }
+ default:
+ p.error("name expected")
+ }
+ return
+}
+
+func deref(typ types.Type) types.Type {
+ if p, _ := typ.(*types.Pointer); p != nil {
+ return p.Elem()
+ }
+ return typ
+}
+
+// Field = Name Type [ string_lit ] .
+//
+func (p *parser) parseField(parent *types.Package) (*types.Var, string) {
+ pkg, name := p.parseName(parent, true)
+
+ if name == "_" {
+ // Blank fields should be package-qualified because they
+ // are unexported identifiers, but gc does not qualify them.
+ // Assuming that the ident belongs to the current package
+ // causes types to change during re-exporting, leading
+ // to spurious "can't assign A to B" errors from go/types.
+ // As a workaround, pretend all blank fields belong
+ // to the same unique dummy package.
+ const blankpkg = "<_>"
+ pkg = p.getPkg(blankpkg, blankpkg)
+ }
+
+ typ := p.parseType(parent)
+ anonymous := false
+ if name == "" {
+ // anonymous field - typ must be T or *T and T must be a type name
+ switch typ := deref(typ).(type) {
+ case *types.Basic: // basic types are named types
+ pkg = nil // objects defined in Universe scope have no package
+ name = typ.Name()
+ case *types.Named:
+ name = typ.Obj().Name()
+ default:
+ p.errorf("anonymous field expected")
+ }
+ anonymous = true
+ }
+ tag := ""
+ if p.tok == scanner.String {
+ s := p.expect(scanner.String)
+ var err error
+ tag, err = strconv.Unquote(s)
+ if err != nil {
+ p.errorf("invalid struct tag %s: %s", s, err)
+ }
+ }
+ return types.NewField(token.NoPos, pkg, name, typ, anonymous), tag
+}
+
+// StructType = "struct" "{" [ FieldList ] "}" .
+// FieldList = Field { ";" Field } .
+//
+func (p *parser) parseStructType(parent *types.Package) types.Type {
+ var fields []*types.Var
+ var tags []string
+
+ p.expectKeyword("struct")
+ p.expect('{')
+ for i := 0; p.tok != '}' && p.tok != scanner.EOF; i++ {
+ if i > 0 {
+ p.expect(';')
+ }
+ fld, tag := p.parseField(parent)
+ if tag != "" && tags == nil {
+ tags = make([]string, i)
+ }
+ if tags != nil {
+ tags = append(tags, tag)
+ }
+ fields = append(fields, fld)
+ }
+ p.expect('}')
+
+ return types.NewStruct(fields, tags)
+}
+
+// Parameter = ( identifier | "?" ) [ "..." ] Type [ string_lit ] .
+//
+func (p *parser) parseParameter() (par *types.Var, isVariadic bool) {
+ _, name := p.parseName(nil, false)
+ // remove gc-specific parameter numbering
+ if i := strings.Index(name, "·"); i >= 0 {
+ name = name[:i]
+ }
+ if p.tok == '.' {
+ p.expectSpecial("...")
+ isVariadic = true
+ }
+ typ := p.parseType(nil)
+ if isVariadic {
+ typ = types.NewSlice(typ)
+ }
+ // ignore argument tag (e.g. "noescape")
+ if p.tok == scanner.String {
+ p.next()
+ }
+ // TODO(gri) should we provide a package?
+ par = types.NewVar(token.NoPos, nil, name, typ)
+ return
+}
+
+// Parameters = "(" [ ParameterList ] ")" .
+// ParameterList = { Parameter "," } Parameter .
+//
+func (p *parser) parseParameters() (list []*types.Var, isVariadic bool) {
+ p.expect('(')
+ for p.tok != ')' && p.tok != scanner.EOF {
+ if len(list) > 0 {
+ p.expect(',')
+ }
+ par, variadic := p.parseParameter()
+ list = append(list, par)
+ if variadic {
+ if isVariadic {
+ p.error("... not on final argument")
+ }
+ isVariadic = true
+ }
+ }
+ p.expect(')')
+
+ return
+}
+
+// Signature = Parameters [ Result ] .
+// Result = Type | Parameters .
+//
+func (p *parser) parseSignature(recv *types.Var) *types.Signature {
+ params, isVariadic := p.parseParameters()
+
+ // optional result type
+ var results []*types.Var
+ if p.tok == '(' {
+ var variadic bool
+ results, variadic = p.parseParameters()
+ if variadic {
+ p.error("... not permitted on result type")
+ }
+ }
+
+ return types.NewSignature(recv, types.NewTuple(params...), types.NewTuple(results...), isVariadic)
+}
+
+// InterfaceType = "interface" "{" [ MethodList ] "}" .
+// MethodList = Method { ";" Method } .
+// Method = Name Signature .
+//
+// The methods of embedded interfaces are always "inlined"
+// by the compiler and thus embedded interfaces are never
+// visible in the export data.
+//
+func (p *parser) parseInterfaceType(parent *types.Package) types.Type {
+ var methods []*types.Func
+
+ p.expectKeyword("interface")
+ p.expect('{')
+ for i := 0; p.tok != '}' && p.tok != scanner.EOF; i++ {
+ if i > 0 {
+ p.expect(';')
+ }
+ pkg, name := p.parseName(parent, true)
+ sig := p.parseSignature(nil)
+ methods = append(methods, types.NewFunc(token.NoPos, pkg, name, sig))
+ }
+ p.expect('}')
+
+ // Complete requires the type's embedded interfaces to be fully defined,
+ // but we do not define any
+ return newInterface(methods, nil).Complete()
+}
+
+// ChanType = ( "chan" [ "<-" ] | "<-" "chan" ) Type .
+//
+func (p *parser) parseChanType(parent *types.Package) types.Type {
+ dir := types.SendRecv
+ if p.tok == scanner.Ident {
+ p.expectKeyword("chan")
+ if p.tok == '<' {
+ p.expectSpecial("<-")
+ dir = types.SendOnly
+ }
+ } else {
+ p.expectSpecial("<-")
+ p.expectKeyword("chan")
+ dir = types.RecvOnly
+ }
+ elem := p.parseType(parent)
+ return types.NewChan(dir, elem)
+}
+
+// Type =
+// BasicType | TypeName | ArrayType | SliceType | StructType |
+// PointerType | FuncType | InterfaceType | MapType | ChanType |
+// "(" Type ")" .
+//
+// BasicType = ident .
+// TypeName = ExportedName .
+// SliceType = "[" "]" Type .
+// PointerType = "*" Type .
+// FuncType = "func" Signature .
+//
+func (p *parser) parseType(parent *types.Package) types.Type {
+ switch p.tok {
+ case scanner.Ident:
+ switch p.lit {
+ default:
+ return p.parseBasicType()
+ case "struct":
+ return p.parseStructType(parent)
+ case "func":
+ // FuncType
+ p.next()
+ return p.parseSignature(nil)
+ case "interface":
+ return p.parseInterfaceType(parent)
+ case "map":
+ return p.parseMapType(parent)
+ case "chan":
+ return p.parseChanType(parent)
+ }
+ case '@':
+ // TypeName
+ pkg, name := p.parseExportedName()
+ return declTypeName(pkg, name).Type()
+ case '[':
+ p.next() // look ahead
+ if p.tok == ']' {
+ // SliceType
+ p.next()
+ return types.NewSlice(p.parseType(parent))
+ }
+ return p.parseArrayType(parent)
+ case '*':
+ // PointerType
+ p.next()
+ return types.NewPointer(p.parseType(parent))
+ case '<':
+ return p.parseChanType(parent)
+ case '(':
+ // "(" Type ")"
+ p.next()
+ typ := p.parseType(parent)
+ p.expect(')')
+ return typ
+ }
+ p.errorf("expected type, got %s (%q)", scanner.TokenString(p.tok), p.lit)
+ return nil
+}
+
+// ----------------------------------------------------------------------------
+// Declarations
+
+// ImportDecl = "import" PackageName PackageId .
+//
+func (p *parser) parseImportDecl() {
+ p.expectKeyword("import")
+ name := p.parsePackageName()
+ p.getPkg(p.parsePackageID(), name)
+}
+
+// int_lit = [ "+" | "-" ] { "0" ... "9" } .
+//
+func (p *parser) parseInt() string {
+ s := ""
+ switch p.tok {
+ case '-':
+ s = "-"
+ p.next()
+ case '+':
+ p.next()
+ }
+ return s + p.expect(scanner.Int)
+}
+
+// number = int_lit [ "p" int_lit ] .
+//
+func (p *parser) parseNumber() (typ *types.Basic, val constant.Value) {
+ // mantissa
+ mant := constant.MakeFromLiteral(p.parseInt(), token.INT, 0)
+ if mant == nil {
+ panic("invalid mantissa")
+ }
+
+ if p.lit == "p" {
+ // exponent (base 2)
+ p.next()
+ exp, err := strconv.ParseInt(p.parseInt(), 10, 0)
+ if err != nil {
+ p.error(err)
+ }
+ if exp < 0 {
+ denom := constant.MakeInt64(1)
+ denom = constant.Shift(denom, token.SHL, uint(-exp))
+ typ = types.Typ[types.UntypedFloat]
+ val = constant.BinaryOp(mant, token.QUO, denom)
+ return
+ }
+ if exp > 0 {
+ mant = constant.Shift(mant, token.SHL, uint(exp))
+ }
+ typ = types.Typ[types.UntypedFloat]
+ val = mant
+ return
+ }
+
+ typ = types.Typ[types.UntypedInt]
+ val = mant
+ return
+}
+
+// ConstDecl = "const" ExportedName [ Type ] "=" Literal .
+// Literal = bool_lit | int_lit | float_lit | complex_lit | rune_lit | string_lit .
+// bool_lit = "true" | "false" .
+// complex_lit = "(" float_lit "+" float_lit "i" ")" .
+// rune_lit = "(" int_lit "+" int_lit ")" .
+// string_lit = `"` { unicode_char } `"` .
+//
+func (p *parser) parseConstDecl() {
+ p.expectKeyword("const")
+ pkg, name := p.parseExportedName()
+
+ var typ0 types.Type
+ if p.tok != '=' {
+ // constant types are never structured - no need for parent type
+ typ0 = p.parseType(nil)
+ }
+
+ p.expect('=')
+ var typ types.Type
+ var val constant.Value
+ switch p.tok {
+ case scanner.Ident:
+ // bool_lit
+ if p.lit != "true" && p.lit != "false" {
+ p.error("expected true or false")
+ }
+ typ = types.Typ[types.UntypedBool]
+ val = constant.MakeBool(p.lit == "true")
+ p.next()
+
+ case '-', scanner.Int:
+ // int_lit
+ typ, val = p.parseNumber()
+
+ case '(':
+ // complex_lit or rune_lit
+ p.next()
+ if p.tok == scanner.Char {
+ p.next()
+ p.expect('+')
+ typ = types.Typ[types.UntypedRune]
+ _, val = p.parseNumber()
+ p.expect(')')
+ break
+ }
+ _, re := p.parseNumber()
+ p.expect('+')
+ _, im := p.parseNumber()
+ p.expectKeyword("i")
+ p.expect(')')
+ typ = types.Typ[types.UntypedComplex]
+ val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im))
+
+ case scanner.Char:
+ // rune_lit
+ typ = types.Typ[types.UntypedRune]
+ val = constant.MakeFromLiteral(p.lit, token.CHAR, 0)
+ p.next()
+
+ case scanner.String:
+ // string_lit
+ typ = types.Typ[types.UntypedString]
+ val = constant.MakeFromLiteral(p.lit, token.STRING, 0)
+ p.next()
+
+ default:
+ p.errorf("expected literal got %s", scanner.TokenString(p.tok))
+ }
+
+ if typ0 == nil {
+ typ0 = typ
+ }
+
+ pkg.Scope().Insert(types.NewConst(token.NoPos, pkg, name, typ0, val))
+}
+
+// TypeDecl = "type" ExportedName Type .
+//
+func (p *parser) parseTypeDecl() {
+ p.expectKeyword("type")
+ pkg, name := p.parseExportedName()
+ obj := declTypeName(pkg, name)
+
+ // The type object may have been imported before and thus already
+ // have a type associated with it. We still need to parse the type
+ // structure, but throw it away if the object already has a type.
+ // This ensures that all imports refer to the same type object for
+ // a given type declaration.
+ typ := p.parseType(pkg)
+
+ if name := obj.Type().(*types.Named); name.Underlying() == nil {
+ name.SetUnderlying(typ)
+ }
+}
+
+// VarDecl = "var" ExportedName Type .
+//
+func (p *parser) parseVarDecl() {
+ p.expectKeyword("var")
+ pkg, name := p.parseExportedName()
+ typ := p.parseType(pkg)
+ pkg.Scope().Insert(types.NewVar(token.NoPos, pkg, name, typ))
+}
+
+// Func = Signature [ Body ] .
+// Body = "{" ... "}" .
+//
+func (p *parser) parseFunc(recv *types.Var) *types.Signature {
+ sig := p.parseSignature(recv)
+ if p.tok == '{' {
+ p.next()
+ for i := 1; i > 0; p.next() {
+ switch p.tok {
+ case '{':
+ i++
+ case '}':
+ i--
+ }
+ }
+ }
+ return sig
+}
+
+// MethodDecl = "func" Receiver Name Func .
+// Receiver = "(" ( identifier | "?" ) [ "*" ] ExportedName ")" .
+//
+func (p *parser) parseMethodDecl() {
+ // "func" already consumed
+ p.expect('(')
+ recv, _ := p.parseParameter() // receiver
+ p.expect(')')
+
+ // determine receiver base type object
+ base := deref(recv.Type()).(*types.Named)
+
+ // parse method name, signature, and possibly inlined body
+ _, name := p.parseName(nil, false)
+ sig := p.parseFunc(recv)
+
+ // methods always belong to the same package as the base type object
+ pkg := base.Obj().Pkg()
+
+ // add method to type unless type was imported before
+ // and method exists already
+ // TODO(gri) This leads to a quadratic algorithm - ok for now because method counts are small.
+ base.AddMethod(types.NewFunc(token.NoPos, pkg, name, sig))
+}
+
+// FuncDecl = "func" ExportedName Func .
+//
+func (p *parser) parseFuncDecl() {
+ // "func" already consumed
+ pkg, name := p.parseExportedName()
+ typ := p.parseFunc(nil)
+ pkg.Scope().Insert(types.NewFunc(token.NoPos, pkg, name, typ))
+}
+
+// Decl = [ ImportDecl | ConstDecl | TypeDecl | VarDecl | FuncDecl | MethodDecl ] "\n" .
+//
+func (p *parser) parseDecl() {
+ if p.tok == scanner.Ident {
+ switch p.lit {
+ case "import":
+ p.parseImportDecl()
+ case "const":
+ p.parseConstDecl()
+ case "type":
+ p.parseTypeDecl()
+ case "var":
+ p.parseVarDecl()
+ case "func":
+ p.next() // look ahead
+ if p.tok == '(' {
+ p.parseMethodDecl()
+ } else {
+ p.parseFuncDecl()
+ }
+ }
+ }
+ p.expect('\n')
+}
+
+// ----------------------------------------------------------------------------
+// Export
+
+// Export = "PackageClause { Decl } "$$" .
+// PackageClause = "package" PackageName [ "safe" ] "\n" .
+//
+func (p *parser) parseExport() *types.Package {
+ p.expectKeyword("package")
+ name := p.parsePackageName()
+ if p.tok == scanner.Ident && p.lit == "safe" {
+ // package was compiled with -u option - ignore
+ p.next()
+ }
+ p.expect('\n')
+
+ pkg := p.getPkg(p.id, name)
+
+ for p.tok != '$' && p.tok != scanner.EOF {
+ p.parseDecl()
+ }
+
+ if ch := p.scanner.Peek(); p.tok != '$' || ch != '$' {
+ // don't call next()/expect() since reading past the
+ // export data may cause scanner errors (e.g. NUL chars)
+ p.errorf("expected '$$', got %s %c", scanner.TokenString(p.tok), ch)
+ }
+
+ if n := p.scanner.ErrorCount; n != 0 {
+ p.errorf("expected no scanner errors, got %d", n)
+ }
+
+ // Record all locally referenced packages as imports.
+ var imports []*types.Package
+ for id, pkg2 := range p.localPkgs {
+ if pkg2.Name() == "" {
+ p.errorf("%s package has no name", id)
+ }
+ if id == p.id {
+ continue // avoid self-edge
+ }
+ imports = append(imports, pkg2)
+ }
+ sort.Sort(byPath(imports))
+ pkg.SetImports(imports)
+
+ // package was imported completely and without errors
+ pkg.MarkComplete()
+
+ return pkg
+}
+
+type byPath []*types.Package
+
+func (a byPath) Len() int { return len(a) }
+func (a byPath) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
+func (a byPath) Less(i, j int) bool { return a[i].Path() < a[j].Path() }
diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go
new file mode 100644
index 0000000..4be32a2
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/internal/gcimporter/iexport.go
@@ -0,0 +1,739 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Indexed binary package export.
+// This file was derived from $GOROOT/src/cmd/compile/internal/gc/iexport.go;
+// see that file for specification of the format.
+
+package gcimporter
+
+import (
+ "bytes"
+ "encoding/binary"
+ "go/ast"
+ "go/constant"
+ "go/token"
+ "go/types"
+ "io"
+ "math/big"
+ "reflect"
+ "sort"
+)
+
+// Current indexed export format version. Increase with each format change.
+// 0: Go1.11 encoding
+const iexportVersion = 0
+
+// IExportData returns the binary export data for pkg.
+//
+// If no file set is provided, position info will be missing.
+// The package path of the top-level package will not be recorded,
+// so that calls to IImportData can override with a provided package path.
+func IExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) {
+ defer func() {
+ if e := recover(); e != nil {
+ if ierr, ok := e.(internalError); ok {
+ err = ierr
+ return
+ }
+ // Not an internal error; panic again.
+ panic(e)
+ }
+ }()
+
+ p := iexporter{
+ out: bytes.NewBuffer(nil),
+ fset: fset,
+ allPkgs: map[*types.Package]bool{},
+ stringIndex: map[string]uint64{},
+ declIndex: map[types.Object]uint64{},
+ typIndex: map[types.Type]uint64{},
+ localpkg: pkg,
+ }
+
+ for i, pt := range predeclared() {
+ p.typIndex[pt] = uint64(i)
+ }
+ if len(p.typIndex) > predeclReserved {
+ panic(internalErrorf("too many predeclared types: %d > %d", len(p.typIndex), predeclReserved))
+ }
+
+ // Initialize work queue with exported declarations.
+ scope := pkg.Scope()
+ for _, name := range scope.Names() {
+ if ast.IsExported(name) {
+ p.pushDecl(scope.Lookup(name))
+ }
+ }
+
+ // Loop until no more work.
+ for !p.declTodo.empty() {
+ p.doDecl(p.declTodo.popHead())
+ }
+
+ // Append indices to data0 section.
+ dataLen := uint64(p.data0.Len())
+ w := p.newWriter()
+ w.writeIndex(p.declIndex)
+ w.flush()
+
+ // Assemble header.
+ var hdr intWriter
+ hdr.WriteByte('i')
+ hdr.uint64(iexportVersion)
+ hdr.uint64(uint64(p.strings.Len()))
+ hdr.uint64(dataLen)
+
+ // Flush output.
+ io.Copy(p.out, &hdr)
+ io.Copy(p.out, &p.strings)
+ io.Copy(p.out, &p.data0)
+
+ return p.out.Bytes(), nil
+}
+
+// writeIndex writes out an object index. mainIndex indicates whether
+// we're writing out the main index, which is also read by
+// non-compiler tools and includes a complete package description
+// (i.e., name and height).
+func (w *exportWriter) writeIndex(index map[types.Object]uint64) {
+ // Build a map from packages to objects from that package.
+ pkgObjs := map[*types.Package][]types.Object{}
+
+ // For the main index, make sure to include every package that
+ // we reference, even if we're not exporting (or reexporting)
+ // any symbols from it.
+ pkgObjs[w.p.localpkg] = nil
+ for pkg := range w.p.allPkgs {
+ pkgObjs[pkg] = nil
+ }
+
+ for obj := range index {
+ pkgObjs[obj.Pkg()] = append(pkgObjs[obj.Pkg()], obj)
+ }
+
+ var pkgs []*types.Package
+ for pkg, objs := range pkgObjs {
+ pkgs = append(pkgs, pkg)
+
+ sort.Slice(objs, func(i, j int) bool {
+ return objs[i].Name() < objs[j].Name()
+ })
+ }
+
+ sort.Slice(pkgs, func(i, j int) bool {
+ return w.exportPath(pkgs[i]) < w.exportPath(pkgs[j])
+ })
+
+ w.uint64(uint64(len(pkgs)))
+ for _, pkg := range pkgs {
+ w.string(w.exportPath(pkg))
+ w.string(pkg.Name())
+ w.uint64(uint64(0)) // package height is not needed for go/types
+
+ objs := pkgObjs[pkg]
+ w.uint64(uint64(len(objs)))
+ for _, obj := range objs {
+ w.string(obj.Name())
+ w.uint64(index[obj])
+ }
+ }
+}
+
+type iexporter struct {
+ fset *token.FileSet
+ out *bytes.Buffer
+
+ localpkg *types.Package
+
+ // allPkgs tracks all packages that have been referenced by
+ // the export data, so we can ensure to include them in the
+ // main index.
+ allPkgs map[*types.Package]bool
+
+ declTodo objQueue
+
+ strings intWriter
+ stringIndex map[string]uint64
+
+ data0 intWriter
+ declIndex map[types.Object]uint64
+ typIndex map[types.Type]uint64
+}
+
+// stringOff returns the offset of s within the string section.
+// If not already present, it's added to the end.
+func (p *iexporter) stringOff(s string) uint64 {
+ off, ok := p.stringIndex[s]
+ if !ok {
+ off = uint64(p.strings.Len())
+ p.stringIndex[s] = off
+
+ p.strings.uint64(uint64(len(s)))
+ p.strings.WriteString(s)
+ }
+ return off
+}
+
+// pushDecl adds n to the declaration work queue, if not already present.
+func (p *iexporter) pushDecl(obj types.Object) {
+ // Package unsafe is known to the compiler and predeclared.
+ assert(obj.Pkg() != types.Unsafe)
+
+ if _, ok := p.declIndex[obj]; ok {
+ return
+ }
+
+ p.declIndex[obj] = ^uint64(0) // mark n present in work queue
+ p.declTodo.pushTail(obj)
+}
+
+// exportWriter handles writing out individual data section chunks.
+type exportWriter struct {
+ p *iexporter
+
+ data intWriter
+ currPkg *types.Package
+ prevFile string
+ prevLine int64
+}
+
+func (w *exportWriter) exportPath(pkg *types.Package) string {
+ if pkg == w.p.localpkg {
+ return ""
+ }
+ return pkg.Path()
+}
+
+func (p *iexporter) doDecl(obj types.Object) {
+ w := p.newWriter()
+ w.setPkg(obj.Pkg(), false)
+
+ switch obj := obj.(type) {
+ case *types.Var:
+ w.tag('V')
+ w.pos(obj.Pos())
+ w.typ(obj.Type(), obj.Pkg())
+
+ case *types.Func:
+ sig, _ := obj.Type().(*types.Signature)
+ if sig.Recv() != nil {
+ panic(internalErrorf("unexpected method: %v", sig))
+ }
+ w.tag('F')
+ w.pos(obj.Pos())
+ w.signature(sig)
+
+ case *types.Const:
+ w.tag('C')
+ w.pos(obj.Pos())
+ w.value(obj.Type(), obj.Val())
+
+ case *types.TypeName:
+ if obj.IsAlias() {
+ w.tag('A')
+ w.pos(obj.Pos())
+ w.typ(obj.Type(), obj.Pkg())
+ break
+ }
+
+ // Defined type.
+ w.tag('T')
+ w.pos(obj.Pos())
+
+ underlying := obj.Type().Underlying()
+ w.typ(underlying, obj.Pkg())
+
+ t := obj.Type()
+ if types.IsInterface(t) {
+ break
+ }
+
+ named, ok := t.(*types.Named)
+ if !ok {
+ panic(internalErrorf("%s is not a defined type", t))
+ }
+
+ n := named.NumMethods()
+ w.uint64(uint64(n))
+ for i := 0; i < n; i++ {
+ m := named.Method(i)
+ w.pos(m.Pos())
+ w.string(m.Name())
+ sig, _ := m.Type().(*types.Signature)
+ w.param(sig.Recv())
+ w.signature(sig)
+ }
+
+ default:
+ panic(internalErrorf("unexpected object: %v", obj))
+ }
+
+ p.declIndex[obj] = w.flush()
+}
+
+func (w *exportWriter) tag(tag byte) {
+ w.data.WriteByte(tag)
+}
+
+func (w *exportWriter) pos(pos token.Pos) {
+ if w.p.fset == nil {
+ w.int64(0)
+ return
+ }
+
+ p := w.p.fset.Position(pos)
+ file := p.Filename
+ line := int64(p.Line)
+
+ // When file is the same as the last position (common case),
+ // we can save a few bytes by delta encoding just the line
+ // number.
+ //
+ // Note: Because data objects may be read out of order (or not
+ // at all), we can only apply delta encoding within a single
+ // object. This is handled implicitly by tracking prevFile and
+ // prevLine as fields of exportWriter.
+
+ if file == w.prevFile {
+ delta := line - w.prevLine
+ w.int64(delta)
+ if delta == deltaNewFile {
+ w.int64(-1)
+ }
+ } else {
+ w.int64(deltaNewFile)
+ w.int64(line) // line >= 0
+ w.string(file)
+ w.prevFile = file
+ }
+ w.prevLine = line
+}
+
+func (w *exportWriter) pkg(pkg *types.Package) {
+ // Ensure any referenced packages are declared in the main index.
+ w.p.allPkgs[pkg] = true
+
+ w.string(w.exportPath(pkg))
+}
+
+func (w *exportWriter) qualifiedIdent(obj types.Object) {
+ // Ensure any referenced declarations are written out too.
+ w.p.pushDecl(obj)
+
+ w.string(obj.Name())
+ w.pkg(obj.Pkg())
+}
+
+func (w *exportWriter) typ(t types.Type, pkg *types.Package) {
+ w.data.uint64(w.p.typOff(t, pkg))
+}
+
+func (p *iexporter) newWriter() *exportWriter {
+ return &exportWriter{p: p}
+}
+
+func (w *exportWriter) flush() uint64 {
+ off := uint64(w.p.data0.Len())
+ io.Copy(&w.p.data0, &w.data)
+ return off
+}
+
+func (p *iexporter) typOff(t types.Type, pkg *types.Package) uint64 {
+ off, ok := p.typIndex[t]
+ if !ok {
+ w := p.newWriter()
+ w.doTyp(t, pkg)
+ off = predeclReserved + w.flush()
+ p.typIndex[t] = off
+ }
+ return off
+}
+
+func (w *exportWriter) startType(k itag) {
+ w.data.uint64(uint64(k))
+}
+
+func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) {
+ switch t := t.(type) {
+ case *types.Named:
+ w.startType(definedType)
+ w.qualifiedIdent(t.Obj())
+
+ case *types.Pointer:
+ w.startType(pointerType)
+ w.typ(t.Elem(), pkg)
+
+ case *types.Slice:
+ w.startType(sliceType)
+ w.typ(t.Elem(), pkg)
+
+ case *types.Array:
+ w.startType(arrayType)
+ w.uint64(uint64(t.Len()))
+ w.typ(t.Elem(), pkg)
+
+ case *types.Chan:
+ w.startType(chanType)
+ // 1 RecvOnly; 2 SendOnly; 3 SendRecv
+ var dir uint64
+ switch t.Dir() {
+ case types.RecvOnly:
+ dir = 1
+ case types.SendOnly:
+ dir = 2
+ case types.SendRecv:
+ dir = 3
+ }
+ w.uint64(dir)
+ w.typ(t.Elem(), pkg)
+
+ case *types.Map:
+ w.startType(mapType)
+ w.typ(t.Key(), pkg)
+ w.typ(t.Elem(), pkg)
+
+ case *types.Signature:
+ w.startType(signatureType)
+ w.setPkg(pkg, true)
+ w.signature(t)
+
+ case *types.Struct:
+ w.startType(structType)
+ w.setPkg(pkg, true)
+
+ n := t.NumFields()
+ w.uint64(uint64(n))
+ for i := 0; i < n; i++ {
+ f := t.Field(i)
+ w.pos(f.Pos())
+ w.string(f.Name())
+ w.typ(f.Type(), pkg)
+ w.bool(f.Anonymous())
+ w.string(t.Tag(i)) // note (or tag)
+ }
+
+ case *types.Interface:
+ w.startType(interfaceType)
+ w.setPkg(pkg, true)
+
+ n := t.NumEmbeddeds()
+ w.uint64(uint64(n))
+ for i := 0; i < n; i++ {
+ f := t.Embedded(i)
+ w.pos(f.Obj().Pos())
+ w.typ(f.Obj().Type(), f.Obj().Pkg())
+ }
+
+ n = t.NumExplicitMethods()
+ w.uint64(uint64(n))
+ for i := 0; i < n; i++ {
+ m := t.ExplicitMethod(i)
+ w.pos(m.Pos())
+ w.string(m.Name())
+ sig, _ := m.Type().(*types.Signature)
+ w.signature(sig)
+ }
+
+ default:
+ panic(internalErrorf("unexpected type: %v, %v", t, reflect.TypeOf(t)))
+ }
+}
+
+func (w *exportWriter) setPkg(pkg *types.Package, write bool) {
+ if write {
+ w.pkg(pkg)
+ }
+
+ w.currPkg = pkg
+}
+
+func (w *exportWriter) signature(sig *types.Signature) {
+ w.paramList(sig.Params())
+ w.paramList(sig.Results())
+ if sig.Params().Len() > 0 {
+ w.bool(sig.Variadic())
+ }
+}
+
+func (w *exportWriter) paramList(tup *types.Tuple) {
+ n := tup.Len()
+ w.uint64(uint64(n))
+ for i := 0; i < n; i++ {
+ w.param(tup.At(i))
+ }
+}
+
+func (w *exportWriter) param(obj types.Object) {
+ w.pos(obj.Pos())
+ w.localIdent(obj)
+ w.typ(obj.Type(), obj.Pkg())
+}
+
+func (w *exportWriter) value(typ types.Type, v constant.Value) {
+ w.typ(typ, nil)
+
+ switch v.Kind() {
+ case constant.Bool:
+ w.bool(constant.BoolVal(v))
+ case constant.Int:
+ var i big.Int
+ if i64, exact := constant.Int64Val(v); exact {
+ i.SetInt64(i64)
+ } else if ui64, exact := constant.Uint64Val(v); exact {
+ i.SetUint64(ui64)
+ } else {
+ i.SetString(v.ExactString(), 10)
+ }
+ w.mpint(&i, typ)
+ case constant.Float:
+ f := constantToFloat(v)
+ w.mpfloat(f, typ)
+ case constant.Complex:
+ w.mpfloat(constantToFloat(constant.Real(v)), typ)
+ w.mpfloat(constantToFloat(constant.Imag(v)), typ)
+ case constant.String:
+ w.string(constant.StringVal(v))
+ case constant.Unknown:
+ // package contains type errors
+ default:
+ panic(internalErrorf("unexpected value %v (%T)", v, v))
+ }
+}
+
+// constantToFloat converts a constant.Value with kind constant.Float to a
+// big.Float.
+func constantToFloat(x constant.Value) *big.Float {
+ assert(x.Kind() == constant.Float)
+ // Use the same floating-point precision (512) as cmd/compile
+ // (see Mpprec in cmd/compile/internal/gc/mpfloat.go).
+ const mpprec = 512
+ var f big.Float
+ f.SetPrec(mpprec)
+ if v, exact := constant.Float64Val(x); exact {
+ // float64
+ f.SetFloat64(v)
+ } else if num, denom := constant.Num(x), constant.Denom(x); num.Kind() == constant.Int {
+ // TODO(gri): add big.Rat accessor to constant.Value.
+ n := valueToRat(num)
+ d := valueToRat(denom)
+ f.SetRat(n.Quo(n, d))
+ } else {
+ // Value too large to represent as a fraction => inaccessible.
+ // TODO(gri): add big.Float accessor to constant.Value.
+ _, ok := f.SetString(x.ExactString())
+ assert(ok)
+ }
+ return &f
+}
+
+// mpint exports a multi-precision integer.
+//
+// For unsigned types, small values are written out as a single
+// byte. Larger values are written out as a length-prefixed big-endian
+// byte string, where the length prefix is encoded as its complement.
+// For example, bytes 0, 1, and 2 directly represent the integer
+// values 0, 1, and 2; while bytes 255, 254, and 253 indicate a 1-,
+// 2-, and 3-byte big-endian string follow.
+//
+// Encoding for signed types use the same general approach as for
+// unsigned types, except small values use zig-zag encoding and the
+// bottom bit of length prefix byte for large values is reserved as a
+// sign bit.
+//
+// The exact boundary between small and large encodings varies
+// according to the maximum number of bytes needed to encode a value
+// of type typ. As a special case, 8-bit types are always encoded as a
+// single byte.
+//
+// TODO(mdempsky): Is this level of complexity really worthwhile?
+func (w *exportWriter) mpint(x *big.Int, typ types.Type) {
+ basic, ok := typ.Underlying().(*types.Basic)
+ if !ok {
+ panic(internalErrorf("unexpected type %v (%T)", typ.Underlying(), typ.Underlying()))
+ }
+
+ signed, maxBytes := intSize(basic)
+
+ negative := x.Sign() < 0
+ if !signed && negative {
+ panic(internalErrorf("negative unsigned integer; type %v, value %v", typ, x))
+ }
+
+ b := x.Bytes()
+ if len(b) > 0 && b[0] == 0 {
+ panic(internalErrorf("leading zeros"))
+ }
+ if uint(len(b)) > maxBytes {
+ panic(internalErrorf("bad mpint length: %d > %d (type %v, value %v)", len(b), maxBytes, typ, x))
+ }
+
+ maxSmall := 256 - maxBytes
+ if signed {
+ maxSmall = 256 - 2*maxBytes
+ }
+ if maxBytes == 1 {
+ maxSmall = 256
+ }
+
+ // Check if x can use small value encoding.
+ if len(b) <= 1 {
+ var ux uint
+ if len(b) == 1 {
+ ux = uint(b[0])
+ }
+ if signed {
+ ux <<= 1
+ if negative {
+ ux--
+ }
+ }
+ if ux < maxSmall {
+ w.data.WriteByte(byte(ux))
+ return
+ }
+ }
+
+ n := 256 - uint(len(b))
+ if signed {
+ n = 256 - 2*uint(len(b))
+ if negative {
+ n |= 1
+ }
+ }
+ if n < maxSmall || n >= 256 {
+ panic(internalErrorf("encoding mistake: %d, %v, %v => %d", len(b), signed, negative, n))
+ }
+
+ w.data.WriteByte(byte(n))
+ w.data.Write(b)
+}
+
+// mpfloat exports a multi-precision floating point number.
+//
+// The number's value is decomposed into mantissa × 2**exponent, where
+// mantissa is an integer. The value is written out as mantissa (as a
+// multi-precision integer) and then the exponent, except exponent is
+// omitted if mantissa is zero.
+func (w *exportWriter) mpfloat(f *big.Float, typ types.Type) {
+ if f.IsInf() {
+ panic("infinite constant")
+ }
+
+ // Break into f = mant × 2**exp, with 0.5 <= mant < 1.
+ var mant big.Float
+ exp := int64(f.MantExp(&mant))
+
+ // Scale so that mant is an integer.
+ prec := mant.MinPrec()
+ mant.SetMantExp(&mant, int(prec))
+ exp -= int64(prec)
+
+ manti, acc := mant.Int(nil)
+ if acc != big.Exact {
+ panic(internalErrorf("mantissa scaling failed for %f (%s)", f, acc))
+ }
+ w.mpint(manti, typ)
+ if manti.Sign() != 0 {
+ w.int64(exp)
+ }
+}
+
+func (w *exportWriter) bool(b bool) bool {
+ var x uint64
+ if b {
+ x = 1
+ }
+ w.uint64(x)
+ return b
+}
+
+func (w *exportWriter) int64(x int64) { w.data.int64(x) }
+func (w *exportWriter) uint64(x uint64) { w.data.uint64(x) }
+func (w *exportWriter) string(s string) { w.uint64(w.p.stringOff(s)) }
+
+func (w *exportWriter) localIdent(obj types.Object) {
+ // Anonymous parameters.
+ if obj == nil {
+ w.string("")
+ return
+ }
+
+ name := obj.Name()
+ if name == "_" {
+ w.string("_")
+ return
+ }
+
+ w.string(name)
+}
+
+type intWriter struct {
+ bytes.Buffer
+}
+
+func (w *intWriter) int64(x int64) {
+ var buf [binary.MaxVarintLen64]byte
+ n := binary.PutVarint(buf[:], x)
+ w.Write(buf[:n])
+}
+
+func (w *intWriter) uint64(x uint64) {
+ var buf [binary.MaxVarintLen64]byte
+ n := binary.PutUvarint(buf[:], x)
+ w.Write(buf[:n])
+}
+
+func assert(cond bool) {
+ if !cond {
+ panic("internal error: assertion failed")
+ }
+}
+
+// The below is copied from go/src/cmd/compile/internal/gc/syntax.go.
+
+// objQueue is a FIFO queue of types.Object. The zero value of objQueue is
+// a ready-to-use empty queue.
+type objQueue struct {
+ ring []types.Object
+ head, tail int
+}
+
+// empty returns true if q contains no Nodes.
+func (q *objQueue) empty() bool {
+ return q.head == q.tail
+}
+
+// pushTail appends n to the tail of the queue.
+func (q *objQueue) pushTail(obj types.Object) {
+ if len(q.ring) == 0 {
+ q.ring = make([]types.Object, 16)
+ } else if q.head+len(q.ring) == q.tail {
+ // Grow the ring.
+ nring := make([]types.Object, len(q.ring)*2)
+ // Copy the old elements.
+ part := q.ring[q.head%len(q.ring):]
+ if q.tail-q.head <= len(part) {
+ part = part[:q.tail-q.head]
+ copy(nring, part)
+ } else {
+ pos := copy(nring, part)
+ copy(nring[pos:], q.ring[:q.tail%len(q.ring)])
+ }
+ q.ring, q.head, q.tail = nring, 0, q.tail-q.head
+ }
+
+ q.ring[q.tail%len(q.ring)] = obj
+ q.tail++
+}
+
+// popHead pops a node from the head of the queue. It panics if q is empty.
+func (q *objQueue) popHead() types.Object {
+ if q.empty() {
+ panic("dequeue empty")
+ }
+ obj := q.ring[q.head%len(q.ring)]
+ q.head++
+ return obj
+}
diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go
new file mode 100644
index 0000000..a31a880
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go
@@ -0,0 +1,630 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Indexed package import.
+// See cmd/compile/internal/gc/iexport.go for the export data format.
+
+// This file is a copy of $GOROOT/src/go/internal/gcimporter/iimport.go.
+
+package gcimporter
+
+import (
+ "bytes"
+ "encoding/binary"
+ "fmt"
+ "go/constant"
+ "go/token"
+ "go/types"
+ "io"
+ "sort"
+)
+
+type intReader struct {
+ *bytes.Reader
+ path string
+}
+
+func (r *intReader) int64() int64 {
+ i, err := binary.ReadVarint(r.Reader)
+ if err != nil {
+ errorf("import %q: read varint error: %v", r.path, err)
+ }
+ return i
+}
+
+func (r *intReader) uint64() uint64 {
+ i, err := binary.ReadUvarint(r.Reader)
+ if err != nil {
+ errorf("import %q: read varint error: %v", r.path, err)
+ }
+ return i
+}
+
+const predeclReserved = 32
+
+type itag uint64
+
+const (
+ // Types
+ definedType itag = iota
+ pointerType
+ sliceType
+ arrayType
+ chanType
+ mapType
+ signatureType
+ structType
+ interfaceType
+)
+
+// IImportData imports a package from the serialized package data
+// and returns the number of bytes consumed and a reference to the package.
+// If the export data version is not recognized or the format is otherwise
+// compromised, an error is returned.
+func IImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) {
+ const currentVersion = 1
+ version := int64(-1)
+ defer func() {
+ if e := recover(); e != nil {
+ if version > currentVersion {
+ err = fmt.Errorf("cannot import %q (%v), export data is newer version - update tool", path, e)
+ } else {
+ err = fmt.Errorf("cannot import %q (%v), possibly version skew - reinstall package", path, e)
+ }
+ }
+ }()
+
+ r := &intReader{bytes.NewReader(data), path}
+
+ version = int64(r.uint64())
+ switch version {
+ case currentVersion, 0:
+ default:
+ errorf("unknown iexport format version %d", version)
+ }
+
+ sLen := int64(r.uint64())
+ dLen := int64(r.uint64())
+
+ whence, _ := r.Seek(0, io.SeekCurrent)
+ stringData := data[whence : whence+sLen]
+ declData := data[whence+sLen : whence+sLen+dLen]
+ r.Seek(sLen+dLen, io.SeekCurrent)
+
+ p := iimporter{
+ ipath: path,
+ version: int(version),
+
+ stringData: stringData,
+ stringCache: make(map[uint64]string),
+ pkgCache: make(map[uint64]*types.Package),
+
+ declData: declData,
+ pkgIndex: make(map[*types.Package]map[string]uint64),
+ typCache: make(map[uint64]types.Type),
+
+ fake: fakeFileSet{
+ fset: fset,
+ files: make(map[string]*token.File),
+ },
+ }
+
+ for i, pt := range predeclared() {
+ p.typCache[uint64(i)] = pt
+ }
+
+ pkgList := make([]*types.Package, r.uint64())
+ for i := range pkgList {
+ pkgPathOff := r.uint64()
+ pkgPath := p.stringAt(pkgPathOff)
+ pkgName := p.stringAt(r.uint64())
+ _ = r.uint64() // package height; unused by go/types
+
+ if pkgPath == "" {
+ pkgPath = path
+ }
+ pkg := imports[pkgPath]
+ if pkg == nil {
+ pkg = types.NewPackage(pkgPath, pkgName)
+ imports[pkgPath] = pkg
+ } else if pkg.Name() != pkgName {
+ errorf("conflicting names %s and %s for package %q", pkg.Name(), pkgName, path)
+ }
+
+ p.pkgCache[pkgPathOff] = pkg
+
+ nameIndex := make(map[string]uint64)
+ for nSyms := r.uint64(); nSyms > 0; nSyms-- {
+ name := p.stringAt(r.uint64())
+ nameIndex[name] = r.uint64()
+ }
+
+ p.pkgIndex[pkg] = nameIndex
+ pkgList[i] = pkg
+ }
+ if len(pkgList) == 0 {
+ errorf("no packages found for %s", path)
+ panic("unreachable")
+ }
+ p.ipkg = pkgList[0]
+ names := make([]string, 0, len(p.pkgIndex[p.ipkg]))
+ for name := range p.pkgIndex[p.ipkg] {
+ names = append(names, name)
+ }
+ sort.Strings(names)
+ for _, name := range names {
+ p.doDecl(p.ipkg, name)
+ }
+
+ for _, typ := range p.interfaceList {
+ typ.Complete()
+ }
+
+ // record all referenced packages as imports
+ list := append(([]*types.Package)(nil), pkgList[1:]...)
+ sort.Sort(byPath(list))
+ p.ipkg.SetImports(list)
+
+ // package was imported completely and without errors
+ p.ipkg.MarkComplete()
+
+ consumed, _ := r.Seek(0, io.SeekCurrent)
+ return int(consumed), p.ipkg, nil
+}
+
+type iimporter struct {
+ ipath string
+ ipkg *types.Package
+ version int
+
+ stringData []byte
+ stringCache map[uint64]string
+ pkgCache map[uint64]*types.Package
+
+ declData []byte
+ pkgIndex map[*types.Package]map[string]uint64
+ typCache map[uint64]types.Type
+
+ fake fakeFileSet
+ interfaceList []*types.Interface
+}
+
+func (p *iimporter) doDecl(pkg *types.Package, name string) {
+ // See if we've already imported this declaration.
+ if obj := pkg.Scope().Lookup(name); obj != nil {
+ return
+ }
+
+ off, ok := p.pkgIndex[pkg][name]
+ if !ok {
+ errorf("%v.%v not in index", pkg, name)
+ }
+
+ r := &importReader{p: p, currPkg: pkg}
+ r.declReader.Reset(p.declData[off:])
+
+ r.obj(name)
+}
+
+func (p *iimporter) stringAt(off uint64) string {
+ if s, ok := p.stringCache[off]; ok {
+ return s
+ }
+
+ slen, n := binary.Uvarint(p.stringData[off:])
+ if n <= 0 {
+ errorf("varint failed")
+ }
+ spos := off + uint64(n)
+ s := string(p.stringData[spos : spos+slen])
+ p.stringCache[off] = s
+ return s
+}
+
+func (p *iimporter) pkgAt(off uint64) *types.Package {
+ if pkg, ok := p.pkgCache[off]; ok {
+ return pkg
+ }
+ path := p.stringAt(off)
+ if path == p.ipath {
+ return p.ipkg
+ }
+ errorf("missing package %q in %q", path, p.ipath)
+ return nil
+}
+
+func (p *iimporter) typAt(off uint64, base *types.Named) types.Type {
+ if t, ok := p.typCache[off]; ok && (base == nil || !isInterface(t)) {
+ return t
+ }
+
+ if off < predeclReserved {
+ errorf("predeclared type missing from cache: %v", off)
+ }
+
+ r := &importReader{p: p}
+ r.declReader.Reset(p.declData[off-predeclReserved:])
+ t := r.doType(base)
+
+ if base == nil || !isInterface(t) {
+ p.typCache[off] = t
+ }
+ return t
+}
+
+type importReader struct {
+ p *iimporter
+ declReader bytes.Reader
+ currPkg *types.Package
+ prevFile string
+ prevLine int64
+ prevColumn int64
+}
+
+func (r *importReader) obj(name string) {
+ tag := r.byte()
+ pos := r.pos()
+
+ switch tag {
+ case 'A':
+ typ := r.typ()
+
+ r.declare(types.NewTypeName(pos, r.currPkg, name, typ))
+
+ case 'C':
+ typ, val := r.value()
+
+ r.declare(types.NewConst(pos, r.currPkg, name, typ, val))
+
+ case 'F':
+ sig := r.signature(nil)
+
+ r.declare(types.NewFunc(pos, r.currPkg, name, sig))
+
+ case 'T':
+ // Types can be recursive. We need to setup a stub
+ // declaration before recursing.
+ obj := types.NewTypeName(pos, r.currPkg, name, nil)
+ named := types.NewNamed(obj, nil, nil)
+ r.declare(obj)
+
+ underlying := r.p.typAt(r.uint64(), named).Underlying()
+ named.SetUnderlying(underlying)
+
+ if !isInterface(underlying) {
+ for n := r.uint64(); n > 0; n-- {
+ mpos := r.pos()
+ mname := r.ident()
+ recv := r.param()
+ msig := r.signature(recv)
+
+ named.AddMethod(types.NewFunc(mpos, r.currPkg, mname, msig))
+ }
+ }
+
+ case 'V':
+ typ := r.typ()
+
+ r.declare(types.NewVar(pos, r.currPkg, name, typ))
+
+ default:
+ errorf("unexpected tag: %v", tag)
+ }
+}
+
+func (r *importReader) declare(obj types.Object) {
+ obj.Pkg().Scope().Insert(obj)
+}
+
+func (r *importReader) value() (typ types.Type, val constant.Value) {
+ typ = r.typ()
+
+ switch b := typ.Underlying().(*types.Basic); b.Info() & types.IsConstType {
+ case types.IsBoolean:
+ val = constant.MakeBool(r.bool())
+
+ case types.IsString:
+ val = constant.MakeString(r.string())
+
+ case types.IsInteger:
+ val = r.mpint(b)
+
+ case types.IsFloat:
+ val = r.mpfloat(b)
+
+ case types.IsComplex:
+ re := r.mpfloat(b)
+ im := r.mpfloat(b)
+ val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im))
+
+ default:
+ if b.Kind() == types.Invalid {
+ val = constant.MakeUnknown()
+ return
+ }
+ errorf("unexpected type %v", typ) // panics
+ panic("unreachable")
+ }
+
+ return
+}
+
+func intSize(b *types.Basic) (signed bool, maxBytes uint) {
+ if (b.Info() & types.IsUntyped) != 0 {
+ return true, 64
+ }
+
+ switch b.Kind() {
+ case types.Float32, types.Complex64:
+ return true, 3
+ case types.Float64, types.Complex128:
+ return true, 7
+ }
+
+ signed = (b.Info() & types.IsUnsigned) == 0
+ switch b.Kind() {
+ case types.Int8, types.Uint8:
+ maxBytes = 1
+ case types.Int16, types.Uint16:
+ maxBytes = 2
+ case types.Int32, types.Uint32:
+ maxBytes = 4
+ default:
+ maxBytes = 8
+ }
+
+ return
+}
+
+func (r *importReader) mpint(b *types.Basic) constant.Value {
+ signed, maxBytes := intSize(b)
+
+ maxSmall := 256 - maxBytes
+ if signed {
+ maxSmall = 256 - 2*maxBytes
+ }
+ if maxBytes == 1 {
+ maxSmall = 256
+ }
+
+ n, _ := r.declReader.ReadByte()
+ if uint(n) < maxSmall {
+ v := int64(n)
+ if signed {
+ v >>= 1
+ if n&1 != 0 {
+ v = ^v
+ }
+ }
+ return constant.MakeInt64(v)
+ }
+
+ v := -n
+ if signed {
+ v = -(n &^ 1) >> 1
+ }
+ if v < 1 || uint(v) > maxBytes {
+ errorf("weird decoding: %v, %v => %v", n, signed, v)
+ }
+
+ buf := make([]byte, v)
+ io.ReadFull(&r.declReader, buf)
+
+ // convert to little endian
+ // TODO(gri) go/constant should have a more direct conversion function
+ // (e.g., once it supports a big.Float based implementation)
+ for i, j := 0, len(buf)-1; i < j; i, j = i+1, j-1 {
+ buf[i], buf[j] = buf[j], buf[i]
+ }
+
+ x := constant.MakeFromBytes(buf)
+ if signed && n&1 != 0 {
+ x = constant.UnaryOp(token.SUB, x, 0)
+ }
+ return x
+}
+
+func (r *importReader) mpfloat(b *types.Basic) constant.Value {
+ x := r.mpint(b)
+ if constant.Sign(x) == 0 {
+ return x
+ }
+
+ exp := r.int64()
+ switch {
+ case exp > 0:
+ x = constant.Shift(x, token.SHL, uint(exp))
+ case exp < 0:
+ d := constant.Shift(constant.MakeInt64(1), token.SHL, uint(-exp))
+ x = constant.BinaryOp(x, token.QUO, d)
+ }
+ return x
+}
+
+func (r *importReader) ident() string {
+ return r.string()
+}
+
+func (r *importReader) qualifiedIdent() (*types.Package, string) {
+ name := r.string()
+ pkg := r.pkg()
+ return pkg, name
+}
+
+func (r *importReader) pos() token.Pos {
+ if r.p.version >= 1 {
+ r.posv1()
+ } else {
+ r.posv0()
+ }
+
+ if r.prevFile == "" && r.prevLine == 0 && r.prevColumn == 0 {
+ return token.NoPos
+ }
+ return r.p.fake.pos(r.prevFile, int(r.prevLine), int(r.prevColumn))
+}
+
+func (r *importReader) posv0() {
+ delta := r.int64()
+ if delta != deltaNewFile {
+ r.prevLine += delta
+ } else if l := r.int64(); l == -1 {
+ r.prevLine += deltaNewFile
+ } else {
+ r.prevFile = r.string()
+ r.prevLine = l
+ }
+}
+
+func (r *importReader) posv1() {
+ delta := r.int64()
+ r.prevColumn += delta >> 1
+ if delta&1 != 0 {
+ delta = r.int64()
+ r.prevLine += delta >> 1
+ if delta&1 != 0 {
+ r.prevFile = r.string()
+ }
+ }
+}
+
+func (r *importReader) typ() types.Type {
+ return r.p.typAt(r.uint64(), nil)
+}
+
+func isInterface(t types.Type) bool {
+ _, ok := t.(*types.Interface)
+ return ok
+}
+
+func (r *importReader) pkg() *types.Package { return r.p.pkgAt(r.uint64()) }
+func (r *importReader) string() string { return r.p.stringAt(r.uint64()) }
+
+func (r *importReader) doType(base *types.Named) types.Type {
+ switch k := r.kind(); k {
+ default:
+ errorf("unexpected kind tag in %q: %v", r.p.ipath, k)
+ return nil
+
+ case definedType:
+ pkg, name := r.qualifiedIdent()
+ r.p.doDecl(pkg, name)
+ return pkg.Scope().Lookup(name).(*types.TypeName).Type()
+ case pointerType:
+ return types.NewPointer(r.typ())
+ case sliceType:
+ return types.NewSlice(r.typ())
+ case arrayType:
+ n := r.uint64()
+ return types.NewArray(r.typ(), int64(n))
+ case chanType:
+ dir := chanDir(int(r.uint64()))
+ return types.NewChan(dir, r.typ())
+ case mapType:
+ return types.NewMap(r.typ(), r.typ())
+ case signatureType:
+ r.currPkg = r.pkg()
+ return r.signature(nil)
+
+ case structType:
+ r.currPkg = r.pkg()
+
+ fields := make([]*types.Var, r.uint64())
+ tags := make([]string, len(fields))
+ for i := range fields {
+ fpos := r.pos()
+ fname := r.ident()
+ ftyp := r.typ()
+ emb := r.bool()
+ tag := r.string()
+
+ fields[i] = types.NewField(fpos, r.currPkg, fname, ftyp, emb)
+ tags[i] = tag
+ }
+ return types.NewStruct(fields, tags)
+
+ case interfaceType:
+ r.currPkg = r.pkg()
+
+ embeddeds := make([]types.Type, r.uint64())
+ for i := range embeddeds {
+ _ = r.pos()
+ embeddeds[i] = r.typ()
+ }
+
+ methods := make([]*types.Func, r.uint64())
+ for i := range methods {
+ mpos := r.pos()
+ mname := r.ident()
+
+ // TODO(mdempsky): Matches bimport.go, but I
+ // don't agree with this.
+ var recv *types.Var
+ if base != nil {
+ recv = types.NewVar(token.NoPos, r.currPkg, "", base)
+ }
+
+ msig := r.signature(recv)
+ methods[i] = types.NewFunc(mpos, r.currPkg, mname, msig)
+ }
+
+ typ := newInterface(methods, embeddeds)
+ r.p.interfaceList = append(r.p.interfaceList, typ)
+ return typ
+ }
+}
+
+func (r *importReader) kind() itag {
+ return itag(r.uint64())
+}
+
+func (r *importReader) signature(recv *types.Var) *types.Signature {
+ params := r.paramList()
+ results := r.paramList()
+ variadic := params.Len() > 0 && r.bool()
+ return types.NewSignature(recv, params, results, variadic)
+}
+
+func (r *importReader) paramList() *types.Tuple {
+ xs := make([]*types.Var, r.uint64())
+ for i := range xs {
+ xs[i] = r.param()
+ }
+ return types.NewTuple(xs...)
+}
+
+func (r *importReader) param() *types.Var {
+ pos := r.pos()
+ name := r.ident()
+ typ := r.typ()
+ return types.NewParam(pos, r.currPkg, name, typ)
+}
+
+func (r *importReader) bool() bool {
+ return r.uint64() != 0
+}
+
+func (r *importReader) int64() int64 {
+ n, err := binary.ReadVarint(&r.declReader)
+ if err != nil {
+ errorf("readVarint: %v", err)
+ }
+ return n
+}
+
+func (r *importReader) uint64() uint64 {
+ n, err := binary.ReadUvarint(&r.declReader)
+ if err != nil {
+ errorf("readUvarint: %v", err)
+ }
+ return n
+}
+
+func (r *importReader) byte() byte {
+ x, err := r.declReader.ReadByte()
+ if err != nil {
+ errorf("declReader.ReadByte: %v", err)
+ }
+ return x
+}
diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go b/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go
new file mode 100644
index 0000000..463f252
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface10.go
@@ -0,0 +1,21 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !go1.11
+
+package gcimporter
+
+import "go/types"
+
+func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface {
+ named := make([]*types.Named, len(embeddeds))
+ for i, e := range embeddeds {
+ var ok bool
+ named[i], ok = e.(*types.Named)
+ if !ok {
+ panic("embedding of non-defined interfaces in interfaces is not supported before Go 1.11")
+ }
+ }
+ return types.NewInterface(methods, named)
+}
diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go b/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go
new file mode 100644
index 0000000..ab28b95
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/internal/gcimporter/newInterface11.go
@@ -0,0 +1,13 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build go1.11
+
+package gcimporter
+
+import "go/types"
+
+func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface {
+ return types.NewInterfaceType(methods, embeddeds)
+}
diff --git a/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go b/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go
new file mode 100644
index 0000000..dc6177c
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go
@@ -0,0 +1,117 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package packagesdriver fetches type sizes for go/packages and go/analysis.
+package packagesdriver
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "go/types"
+ "os/exec"
+ "strings"
+
+ "golang.org/x/tools/internal/gocommand"
+)
+
+var debug = false
+
+func GetSizes(ctx context.Context, buildFlags, env []string, gocmdRunner *gocommand.Runner, dir string) (types.Sizes, error) {
+ // TODO(matloob): Clean this up. This code is mostly a copy of packages.findExternalDriver.
+ const toolPrefix = "GOPACKAGESDRIVER="
+ tool := ""
+ for _, env := range env {
+ if val := strings.TrimPrefix(env, toolPrefix); val != env {
+ tool = val
+ }
+ }
+
+ if tool == "" {
+ var err error
+ tool, err = exec.LookPath("gopackagesdriver")
+ if err != nil {
+ // We did not find the driver, so use "go list".
+ tool = "off"
+ }
+ }
+
+ if tool == "off" {
+ return GetSizesGolist(ctx, buildFlags, env, gocmdRunner, dir)
+ }
+
+ req, err := json.Marshal(struct {
+ Command string `json:"command"`
+ Env []string `json:"env"`
+ BuildFlags []string `json:"build_flags"`
+ }{
+ Command: "sizes",
+ Env: env,
+ BuildFlags: buildFlags,
+ })
+ if err != nil {
+ return nil, fmt.Errorf("failed to encode message to driver tool: %v", err)
+ }
+
+ buf := new(bytes.Buffer)
+ cmd := exec.CommandContext(ctx, tool)
+ cmd.Dir = dir
+ cmd.Env = env
+ cmd.Stdin = bytes.NewReader(req)
+ cmd.Stdout = buf
+ cmd.Stderr = new(bytes.Buffer)
+ if err := cmd.Run(); err != nil {
+ return nil, fmt.Errorf("%v: %v: %s", tool, err, cmd.Stderr)
+ }
+ var response struct {
+ // Sizes, if not nil, is the types.Sizes to use when type checking.
+ Sizes *types.StdSizes
+ }
+ if err := json.Unmarshal(buf.Bytes(), &response); err != nil {
+ return nil, err
+ }
+ return response.Sizes, nil
+}
+
+func GetSizesGolist(ctx context.Context, buildFlags, env []string, gocmdRunner *gocommand.Runner, dir string) (types.Sizes, error) {
+ inv := gocommand.Invocation{
+ Verb: "list",
+ Args: []string{"-f", "{{context.GOARCH}} {{context.Compiler}}", "--", "unsafe"},
+ Env: env,
+ BuildFlags: buildFlags,
+ WorkingDir: dir,
+ }
+ stdout, stderr, friendlyErr, rawErr := gocmdRunner.RunRaw(ctx, inv)
+ var goarch, compiler string
+ if rawErr != nil {
+ if strings.Contains(rawErr.Error(), "cannot find main module") {
+ // User's running outside of a module. All bets are off. Get GOARCH and guess compiler is gc.
+ // TODO(matloob): Is this a problem in practice?
+ inv := gocommand.Invocation{
+ Verb: "env",
+ Args: []string{"GOARCH"},
+ Env: env,
+ WorkingDir: dir,
+ }
+ envout, enverr := gocmdRunner.Run(ctx, inv)
+ if enverr != nil {
+ return nil, enverr
+ }
+ goarch = strings.TrimSpace(envout.String())
+ compiler = "gc"
+ } else {
+ return nil, friendlyErr
+ }
+ } else {
+ fields := strings.Fields(stdout.String())
+ if len(fields) < 2 {
+ return nil, fmt.Errorf("could not parse GOARCH and Go compiler in format \"<GOARCH> <compiler>\":\nstdout: <<%s>>\nstderr: <<%s>>",
+ stdout.String(), stderr.String())
+ }
+ goarch = fields[0]
+ compiler = fields[1]
+ }
+ return types.SizesFor(compiler, goarch), nil
+}
diff --git a/vendor/golang.org/x/tools/go/packages/doc.go b/vendor/golang.org/x/tools/go/packages/doc.go
new file mode 100644
index 0000000..4bfe28a
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/packages/doc.go
@@ -0,0 +1,221 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+/*
+Package packages loads Go packages for inspection and analysis.
+
+The Load function takes as input a list of patterns and return a list of Package
+structs describing individual packages matched by those patterns.
+The LoadMode controls the amount of detail in the loaded packages.
+
+Load passes most patterns directly to the underlying build tool,
+but all patterns with the prefix "query=", where query is a
+non-empty string of letters from [a-z], are reserved and may be
+interpreted as query operators.
+
+Two query operators are currently supported: "file" and "pattern".
+
+The query "file=path/to/file.go" matches the package or packages enclosing
+the Go source file path/to/file.go. For example "file=~/go/src/fmt/print.go"
+might return the packages "fmt" and "fmt [fmt.test]".
+
+The query "pattern=string" causes "string" to be passed directly to
+the underlying build tool. In most cases this is unnecessary,
+but an application can use Load("pattern=" + x) as an escaping mechanism
+to ensure that x is not interpreted as a query operator if it contains '='.
+
+All other query operators are reserved for future use and currently
+cause Load to report an error.
+
+The Package struct provides basic information about the package, including
+
+ - ID, a unique identifier for the package in the returned set;
+ - GoFiles, the names of the package's Go source files;
+ - Imports, a map from source import strings to the Packages they name;
+ - Types, the type information for the package's exported symbols;
+ - Syntax, the parsed syntax trees for the package's source code; and
+ - TypeInfo, the result of a complete type-check of the package syntax trees.
+
+(See the documentation for type Package for the complete list of fields
+and more detailed descriptions.)
+
+For example,
+
+ Load(nil, "bytes", "unicode...")
+
+returns four Package structs describing the standard library packages
+bytes, unicode, unicode/utf16, and unicode/utf8. Note that one pattern
+can match multiple packages and that a package might be matched by
+multiple patterns: in general it is not possible to determine which
+packages correspond to which patterns.
+
+Note that the list returned by Load contains only the packages matched
+by the patterns. Their dependencies can be found by walking the import
+graph using the Imports fields.
+
+The Load function can be configured by passing a pointer to a Config as
+the first argument. A nil Config is equivalent to the zero Config, which
+causes Load to run in LoadFiles mode, collecting minimal information.
+See the documentation for type Config for details.
+
+As noted earlier, the Config.Mode controls the amount of detail
+reported about the loaded packages. See the documentation for type LoadMode
+for details.
+
+Most tools should pass their command-line arguments (after any flags)
+uninterpreted to the loader, so that the loader can interpret them
+according to the conventions of the underlying build system.
+See the Example function for typical usage.
+
+*/
+package packages // import "golang.org/x/tools/go/packages"
+
+/*
+
+Motivation and design considerations
+
+The new package's design solves problems addressed by two existing
+packages: go/build, which locates and describes packages, and
+golang.org/x/tools/go/loader, which loads, parses and type-checks them.
+The go/build.Package structure encodes too much of the 'go build' way
+of organizing projects, leaving us in need of a data type that describes a
+package of Go source code independent of the underlying build system.
+We wanted something that works equally well with go build and vgo, and
+also other build systems such as Bazel and Blaze, making it possible to
+construct analysis tools that work in all these environments.
+Tools such as errcheck and staticcheck were essentially unavailable to
+the Go community at Google, and some of Google's internal tools for Go
+are unavailable externally.
+This new package provides a uniform way to obtain package metadata by
+querying each of these build systems, optionally supporting their
+preferred command-line notations for packages, so that tools integrate
+neatly with users' build environments. The Metadata query function
+executes an external query tool appropriate to the current workspace.
+
+Loading packages always returns the complete import graph "all the way down",
+even if all you want is information about a single package, because the query
+mechanisms of all the build systems we currently support ({go,vgo} list, and
+blaze/bazel aspect-based query) cannot provide detailed information
+about one package without visiting all its dependencies too, so there is
+no additional asymptotic cost to providing transitive information.
+(This property might not be true of a hypothetical 5th build system.)
+
+In calls to TypeCheck, all initial packages, and any package that
+transitively depends on one of them, must be loaded from source.
+Consider A->B->C->D->E: if A,C are initial, A,B,C must be loaded from
+source; D may be loaded from export data, and E may not be loaded at all
+(though it's possible that D's export data mentions it, so a
+types.Package may be created for it and exposed.)
+
+The old loader had a feature to suppress type-checking of function
+bodies on a per-package basis, primarily intended to reduce the work of
+obtaining type information for imported packages. Now that imports are
+satisfied by export data, the optimization no longer seems necessary.
+
+Despite some early attempts, the old loader did not exploit export data,
+instead always using the equivalent of WholeProgram mode. This was due
+to the complexity of mixing source and export data packages (now
+resolved by the upward traversal mentioned above), and because export data
+files were nearly always missing or stale. Now that 'go build' supports
+caching, all the underlying build systems can guarantee to produce
+export data in a reasonable (amortized) time.
+
+Test "main" packages synthesized by the build system are now reported as
+first-class packages, avoiding the need for clients (such as go/ssa) to
+reinvent this generation logic.
+
+One way in which go/packages is simpler than the old loader is in its
+treatment of in-package tests. In-package tests are packages that
+consist of all the files of the library under test, plus the test files.
+The old loader constructed in-package tests by a two-phase process of
+mutation called "augmentation": first it would construct and type check
+all the ordinary library packages and type-check the packages that
+depend on them; then it would add more (test) files to the package and
+type-check again. This two-phase approach had four major problems:
+1) in processing the tests, the loader modified the library package,
+ leaving no way for a client application to see both the test
+ package and the library package; one would mutate into the other.
+2) because test files can declare additional methods on types defined in
+ the library portion of the package, the dispatch of method calls in
+ the library portion was affected by the presence of the test files.
+ This should have been a clue that the packages were logically
+ different.
+3) this model of "augmentation" assumed at most one in-package test
+ per library package, which is true of projects using 'go build',
+ but not other build systems.
+4) because of the two-phase nature of test processing, all packages that
+ import the library package had to be processed before augmentation,
+ forcing a "one-shot" API and preventing the client from calling Load
+ in several times in sequence as is now possible in WholeProgram mode.
+ (TypeCheck mode has a similar one-shot restriction for a different reason.)
+
+Early drafts of this package supported "multi-shot" operation.
+Although it allowed clients to make a sequence of calls (or concurrent
+calls) to Load, building up the graph of Packages incrementally,
+it was of marginal value: it complicated the API
+(since it allowed some options to vary across calls but not others),
+it complicated the implementation,
+it cannot be made to work in Types mode, as explained above,
+and it was less efficient than making one combined call (when this is possible).
+Among the clients we have inspected, none made multiple calls to load
+but could not be easily and satisfactorily modified to make only a single call.
+However, applications changes may be required.
+For example, the ssadump command loads the user-specified packages
+and in addition the runtime package. It is tempting to simply append
+"runtime" to the user-provided list, but that does not work if the user
+specified an ad-hoc package such as [a.go b.go].
+Instead, ssadump no longer requests the runtime package,
+but seeks it among the dependencies of the user-specified packages,
+and emits an error if it is not found.
+
+Overlays: The Overlay field in the Config allows providing alternate contents
+for Go source files, by providing a mapping from file path to contents.
+go/packages will pull in new imports added in overlay files when go/packages
+is run in LoadImports mode or greater.
+Overlay support for the go list driver isn't complete yet: if the file doesn't
+exist on disk, it will only be recognized in an overlay if it is a non-test file
+and the package would be reported even without the overlay.
+
+Questions & Tasks
+
+- Add GOARCH/GOOS?
+ They are not portable concepts, but could be made portable.
+ Our goal has been to allow users to express themselves using the conventions
+ of the underlying build system: if the build system honors GOARCH
+ during a build and during a metadata query, then so should
+ applications built atop that query mechanism.
+ Conversely, if the target architecture of the build is determined by
+ command-line flags, the application can pass the relevant
+ flags through to the build system using a command such as:
+ myapp -query_flag="--cpu=amd64" -query_flag="--os=darwin"
+ However, this approach is low-level, unwieldy, and non-portable.
+ GOOS and GOARCH seem important enough to warrant a dedicated option.
+
+- How should we handle partial failures such as a mixture of good and
+ malformed patterns, existing and non-existent packages, successful and
+ failed builds, import failures, import cycles, and so on, in a call to
+ Load?
+
+- Support bazel, blaze, and go1.10 list, not just go1.11 list.
+
+- Handle (and test) various partial success cases, e.g.
+ a mixture of good packages and:
+ invalid patterns
+ nonexistent packages
+ empty packages
+ packages with malformed package or import declarations
+ unreadable files
+ import cycles
+ other parse errors
+ type errors
+ Make sure we record errors at the correct place in the graph.
+
+- Missing packages among initial arguments are not reported.
+ Return bogus packages for them, like golist does.
+
+- "undeclared name" errors (for example) are reported out of source file
+ order. I suspect this is due to the breadth-first resolution now used
+ by go/types. Is that a bug? Discuss with gri.
+
+*/
diff --git a/vendor/golang.org/x/tools/go/packages/external.go b/vendor/golang.org/x/tools/go/packages/external.go
new file mode 100644
index 0000000..8c8473f
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/packages/external.go
@@ -0,0 +1,101 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file enables an external tool to intercept package requests.
+// If the tool is present then its results are used in preference to
+// the go list command.
+
+package packages
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "os"
+ "os/exec"
+ "strings"
+)
+
+// The Driver Protocol
+//
+// The driver, given the inputs to a call to Load, returns metadata about the packages specified.
+// This allows for different build systems to support go/packages by telling go/packages how the
+// packages' source is organized.
+// The driver is a binary, either specified by the GOPACKAGESDRIVER environment variable or in
+// the path as gopackagesdriver. It's given the inputs to load in its argv. See the package
+// documentation in doc.go for the full description of the patterns that need to be supported.
+// A driver receives as a JSON-serialized driverRequest struct in standard input and will
+// produce a JSON-serialized driverResponse (see definition in packages.go) in its standard output.
+
+// driverRequest is used to provide the portion of Load's Config that is needed by a driver.
+type driverRequest struct {
+ Mode LoadMode `json:"mode"`
+ // Env specifies the environment the underlying build system should be run in.
+ Env []string `json:"env"`
+ // BuildFlags are flags that should be passed to the underlying build system.
+ BuildFlags []string `json:"build_flags"`
+ // Tests specifies whether the patterns should also return test packages.
+ Tests bool `json:"tests"`
+ // Overlay maps file paths (relative to the driver's working directory) to the byte contents
+ // of overlay files.
+ Overlay map[string][]byte `json:"overlay"`
+}
+
+// findExternalDriver returns the file path of a tool that supplies
+// the build system package structure, or "" if not found."
+// If GOPACKAGESDRIVER is set in the environment findExternalTool returns its
+// value, otherwise it searches for a binary named gopackagesdriver on the PATH.
+func findExternalDriver(cfg *Config) driver {
+ const toolPrefix = "GOPACKAGESDRIVER="
+ tool := ""
+ for _, env := range cfg.Env {
+ if val := strings.TrimPrefix(env, toolPrefix); val != env {
+ tool = val
+ }
+ }
+ if tool != "" && tool == "off" {
+ return nil
+ }
+ if tool == "" {
+ var err error
+ tool, err = exec.LookPath("gopackagesdriver")
+ if err != nil {
+ return nil
+ }
+ }
+ return func(cfg *Config, words ...string) (*driverResponse, error) {
+ req, err := json.Marshal(driverRequest{
+ Mode: cfg.Mode,
+ Env: cfg.Env,
+ BuildFlags: cfg.BuildFlags,
+ Tests: cfg.Tests,
+ Overlay: cfg.Overlay,
+ })
+ if err != nil {
+ return nil, fmt.Errorf("failed to encode message to driver tool: %v", err)
+ }
+
+ buf := new(bytes.Buffer)
+ stderr := new(bytes.Buffer)
+ cmd := exec.CommandContext(cfg.Context, tool, words...)
+ cmd.Dir = cfg.Dir
+ cmd.Env = cfg.Env
+ cmd.Stdin = bytes.NewReader(req)
+ cmd.Stdout = buf
+ cmd.Stderr = stderr
+
+ if err := cmd.Run(); err != nil {
+ return nil, fmt.Errorf("%v: %v: %s", tool, err, cmd.Stderr)
+ }
+ if len(stderr.Bytes()) != 0 && os.Getenv("GOPACKAGESPRINTDRIVERERRORS") != "" {
+ fmt.Fprintf(os.Stderr, "%s stderr: <<%s>>\n", cmdDebugStr(cmd, words...), stderr)
+ }
+
+ var response driverResponse
+ if err := json.Unmarshal(buf.Bytes(), &response); err != nil {
+ return nil, err
+ }
+ return &response, nil
+ }
+}
diff --git a/vendor/golang.org/x/tools/go/packages/golist.go b/vendor/golang.org/x/tools/go/packages/golist.go
new file mode 100644
index 0000000..b4d232b
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/packages/golist.go
@@ -0,0 +1,996 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packages
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "fmt"
+ "go/types"
+ "log"
+ "os"
+ "os/exec"
+ "path"
+ "path/filepath"
+ "reflect"
+ "sort"
+ "strconv"
+ "strings"
+ "sync"
+ "unicode"
+
+ "golang.org/x/tools/go/internal/packagesdriver"
+ "golang.org/x/tools/internal/gocommand"
+ "golang.org/x/xerrors"
+)
+
+// debug controls verbose logging.
+var debug, _ = strconv.ParseBool(os.Getenv("GOPACKAGESDEBUG"))
+
+// A goTooOldError reports that the go command
+// found by exec.LookPath is too old to use the new go list behavior.
+type goTooOldError struct {
+ error
+}
+
+// responseDeduper wraps a driverResponse, deduplicating its contents.
+type responseDeduper struct {
+ seenRoots map[string]bool
+ seenPackages map[string]*Package
+ dr *driverResponse
+}
+
+func newDeduper() *responseDeduper {
+ return &responseDeduper{
+ dr: &driverResponse{},
+ seenRoots: map[string]bool{},
+ seenPackages: map[string]*Package{},
+ }
+}
+
+// addAll fills in r with a driverResponse.
+func (r *responseDeduper) addAll(dr *driverResponse) {
+ for _, pkg := range dr.Packages {
+ r.addPackage(pkg)
+ }
+ for _, root := range dr.Roots {
+ r.addRoot(root)
+ }
+}
+
+func (r *responseDeduper) addPackage(p *Package) {
+ if r.seenPackages[p.ID] != nil {
+ return
+ }
+ r.seenPackages[p.ID] = p
+ r.dr.Packages = append(r.dr.Packages, p)
+}
+
+func (r *responseDeduper) addRoot(id string) {
+ if r.seenRoots[id] {
+ return
+ }
+ r.seenRoots[id] = true
+ r.dr.Roots = append(r.dr.Roots, id)
+}
+
+type golistState struct {
+ cfg *Config
+ ctx context.Context
+
+ envOnce sync.Once
+ goEnvError error
+ goEnv map[string]string
+
+ rootsOnce sync.Once
+ rootDirsError error
+ rootDirs map[string]string
+
+ goVersionOnce sync.Once
+ goVersionError error
+ goVersion string // third field of 'go version'
+
+ // vendorDirs caches the (non)existence of vendor directories.
+ vendorDirs map[string]bool
+}
+
+// getEnv returns Go environment variables. Only specific variables are
+// populated -- computing all of them is slow.
+func (state *golistState) getEnv() (map[string]string, error) {
+ state.envOnce.Do(func() {
+ var b *bytes.Buffer
+ b, state.goEnvError = state.invokeGo("env", "-json", "GOMOD", "GOPATH")
+ if state.goEnvError != nil {
+ return
+ }
+
+ state.goEnv = make(map[string]string)
+ decoder := json.NewDecoder(b)
+ if state.goEnvError = decoder.Decode(&state.goEnv); state.goEnvError != nil {
+ return
+ }
+ })
+ return state.goEnv, state.goEnvError
+}
+
+// mustGetEnv is a convenience function that can be used if getEnv has already succeeded.
+func (state *golistState) mustGetEnv() map[string]string {
+ env, err := state.getEnv()
+ if err != nil {
+ panic(fmt.Sprintf("mustGetEnv: %v", err))
+ }
+ return env
+}
+
+// goListDriver uses the go list command to interpret the patterns and produce
+// the build system package structure.
+// See driver for more details.
+func goListDriver(cfg *Config, patterns ...string) (*driverResponse, error) {
+ // Make sure that any asynchronous go commands are killed when we return.
+ parentCtx := cfg.Context
+ if parentCtx == nil {
+ parentCtx = context.Background()
+ }
+ ctx, cancel := context.WithCancel(parentCtx)
+ defer cancel()
+
+ response := newDeduper()
+
+ // Fill in response.Sizes asynchronously if necessary.
+ var sizeserr error
+ var sizeswg sync.WaitGroup
+ if cfg.Mode&NeedTypesSizes != 0 || cfg.Mode&NeedTypes != 0 {
+ sizeswg.Add(1)
+ go func() {
+ var sizes types.Sizes
+ sizes, sizeserr = packagesdriver.GetSizesGolist(ctx, cfg.BuildFlags, cfg.Env, cfg.gocmdRunner, cfg.Dir)
+ // types.SizesFor always returns nil or a *types.StdSizes.
+ response.dr.Sizes, _ = sizes.(*types.StdSizes)
+ sizeswg.Done()
+ }()
+ }
+
+ state := &golistState{
+ cfg: cfg,
+ ctx: ctx,
+ vendorDirs: map[string]bool{},
+ }
+
+ // Determine files requested in contains patterns
+ var containFiles []string
+ restPatterns := make([]string, 0, len(patterns))
+ // Extract file= and other [querytype]= patterns. Report an error if querytype
+ // doesn't exist.
+extractQueries:
+ for _, pattern := range patterns {
+ eqidx := strings.Index(pattern, "=")
+ if eqidx < 0 {
+ restPatterns = append(restPatterns, pattern)
+ } else {
+ query, value := pattern[:eqidx], pattern[eqidx+len("="):]
+ switch query {
+ case "file":
+ containFiles = append(containFiles, value)
+ case "pattern":
+ restPatterns = append(restPatterns, value)
+ case "": // not a reserved query
+ restPatterns = append(restPatterns, pattern)
+ default:
+ for _, rune := range query {
+ if rune < 'a' || rune > 'z' { // not a reserved query
+ restPatterns = append(restPatterns, pattern)
+ continue extractQueries
+ }
+ }
+ // Reject all other patterns containing "="
+ return nil, fmt.Errorf("invalid query type %q in query pattern %q", query, pattern)
+ }
+ }
+ }
+
+ // See if we have any patterns to pass through to go list. Zero initial
+ // patterns also requires a go list call, since it's the equivalent of
+ // ".".
+ if len(restPatterns) > 0 || len(patterns) == 0 {
+ dr, err := state.createDriverResponse(restPatterns...)
+ if err != nil {
+ return nil, err
+ }
+ response.addAll(dr)
+ }
+
+ if len(containFiles) != 0 {
+ if err := state.runContainsQueries(response, containFiles); err != nil {
+ return nil, err
+ }
+ }
+
+ modifiedPkgs, needPkgs, err := state.processGolistOverlay(response)
+ if err != nil {
+ return nil, err
+ }
+
+ var containsCandidates []string
+ if len(containFiles) > 0 {
+ containsCandidates = append(containsCandidates, modifiedPkgs...)
+ containsCandidates = append(containsCandidates, needPkgs...)
+ }
+ if err := state.addNeededOverlayPackages(response, needPkgs); err != nil {
+ return nil, err
+ }
+ // Check candidate packages for containFiles.
+ if len(containFiles) > 0 {
+ for _, id := range containsCandidates {
+ pkg, ok := response.seenPackages[id]
+ if !ok {
+ response.addPackage(&Package{
+ ID: id,
+ Errors: []Error{
+ {
+ Kind: ListError,
+ Msg: fmt.Sprintf("package %s expected but not seen", id),
+ },
+ },
+ })
+ continue
+ }
+ for _, f := range containFiles {
+ for _, g := range pkg.GoFiles {
+ if sameFile(f, g) {
+ response.addRoot(id)
+ }
+ }
+ }
+ }
+ }
+
+ sizeswg.Wait()
+ if sizeserr != nil {
+ return nil, sizeserr
+ }
+ return response.dr, nil
+}
+
+func (state *golistState) addNeededOverlayPackages(response *responseDeduper, pkgs []string) error {
+ if len(pkgs) == 0 {
+ return nil
+ }
+ dr, err := state.createDriverResponse(pkgs...)
+ if err != nil {
+ return err
+ }
+ for _, pkg := range dr.Packages {
+ response.addPackage(pkg)
+ }
+ _, needPkgs, err := state.processGolistOverlay(response)
+ if err != nil {
+ return err
+ }
+ return state.addNeededOverlayPackages(response, needPkgs)
+}
+
+func (state *golistState) runContainsQueries(response *responseDeduper, queries []string) error {
+ for _, query := range queries {
+ // TODO(matloob): Do only one query per directory.
+ fdir := filepath.Dir(query)
+ // Pass absolute path of directory to go list so that it knows to treat it as a directory,
+ // not a package path.
+ pattern, err := filepath.Abs(fdir)
+ if err != nil {
+ return fmt.Errorf("could not determine absolute path of file= query path %q: %v", query, err)
+ }
+ dirResponse, err := state.createDriverResponse(pattern)
+
+ // If there was an error loading the package, or the package is returned
+ // with errors, try to load the file as an ad-hoc package.
+ // Usually the error will appear in a returned package, but may not if we're
+ // in module mode and the ad-hoc is located outside a module.
+ if err != nil || len(dirResponse.Packages) == 1 && len(dirResponse.Packages[0].GoFiles) == 0 &&
+ len(dirResponse.Packages[0].Errors) == 1 {
+ var queryErr error
+ if dirResponse, queryErr = state.adhocPackage(pattern, query); queryErr != nil {
+ return err // return the original error
+ }
+ }
+ isRoot := make(map[string]bool, len(dirResponse.Roots))
+ for _, root := range dirResponse.Roots {
+ isRoot[root] = true
+ }
+ for _, pkg := range dirResponse.Packages {
+ // Add any new packages to the main set
+ // We don't bother to filter packages that will be dropped by the changes of roots,
+ // that will happen anyway during graph construction outside this function.
+ // Over-reporting packages is not a problem.
+ response.addPackage(pkg)
+ // if the package was not a root one, it cannot have the file
+ if !isRoot[pkg.ID] {
+ continue
+ }
+ for _, pkgFile := range pkg.GoFiles {
+ if filepath.Base(query) == filepath.Base(pkgFile) {
+ response.addRoot(pkg.ID)
+ break
+ }
+ }
+ }
+ }
+ return nil
+}
+
+// adhocPackage attempts to load or construct an ad-hoc package for a given
+// query, if the original call to the driver produced inadequate results.
+func (state *golistState) adhocPackage(pattern, query string) (*driverResponse, error) {
+ response, err := state.createDriverResponse(query)
+ if err != nil {
+ return nil, err
+ }
+ // If we get nothing back from `go list`,
+ // try to make this file into its own ad-hoc package.
+ // TODO(rstambler): Should this check against the original response?
+ if len(response.Packages) == 0 {
+ response.Packages = append(response.Packages, &Package{
+ ID: "command-line-arguments",
+ PkgPath: query,
+ GoFiles: []string{query},
+ CompiledGoFiles: []string{query},
+ Imports: make(map[string]*Package),
+ })
+ response.Roots = append(response.Roots, "command-line-arguments")
+ }
+ // Handle special cases.
+ if len(response.Packages) == 1 {
+ // golang/go#33482: If this is a file= query for ad-hoc packages where
+ // the file only exists on an overlay, and exists outside of a module,
+ // add the file to the package and remove the errors.
+ if response.Packages[0].ID == "command-line-arguments" ||
+ filepath.ToSlash(response.Packages[0].PkgPath) == filepath.ToSlash(query) {
+ if len(response.Packages[0].GoFiles) == 0 {
+ filename := filepath.Join(pattern, filepath.Base(query)) // avoid recomputing abspath
+ // TODO(matloob): check if the file is outside of a root dir?
+ for path := range state.cfg.Overlay {
+ if path == filename {
+ response.Packages[0].Errors = nil
+ response.Packages[0].GoFiles = []string{path}
+ response.Packages[0].CompiledGoFiles = []string{path}
+ }
+ }
+ }
+ }
+ }
+ return response, nil
+}
+
+// Fields must match go list;
+// see $GOROOT/src/cmd/go/internal/load/pkg.go.
+type jsonPackage struct {
+ ImportPath string
+ Dir string
+ Name string
+ Export string
+ GoFiles []string
+ CompiledGoFiles []string
+ CFiles []string
+ CgoFiles []string
+ CXXFiles []string
+ MFiles []string
+ HFiles []string
+ FFiles []string
+ SFiles []string
+ SwigFiles []string
+ SwigCXXFiles []string
+ SysoFiles []string
+ Imports []string
+ ImportMap map[string]string
+ Deps []string
+ Module *Module
+ TestGoFiles []string
+ TestImports []string
+ XTestGoFiles []string
+ XTestImports []string
+ ForTest string // q in a "p [q.test]" package, else ""
+ DepOnly bool
+
+ Error *jsonPackageError
+}
+
+type jsonPackageError struct {
+ ImportStack []string
+ Pos string
+ Err string
+}
+
+func otherFiles(p *jsonPackage) [][]string {
+ return [][]string{p.CFiles, p.CXXFiles, p.MFiles, p.HFiles, p.FFiles, p.SFiles, p.SwigFiles, p.SwigCXXFiles, p.SysoFiles}
+}
+
+// createDriverResponse uses the "go list" command to expand the pattern
+// words and return a response for the specified packages.
+func (state *golistState) createDriverResponse(words ...string) (*driverResponse, error) {
+ // go list uses the following identifiers in ImportPath and Imports:
+ //
+ // "p" -- importable package or main (command)
+ // "q.test" -- q's test executable
+ // "p [q.test]" -- variant of p as built for q's test executable
+ // "q_test [q.test]" -- q's external test package
+ //
+ // The packages p that are built differently for a test q.test
+ // are q itself, plus any helpers used by the external test q_test,
+ // typically including "testing" and all its dependencies.
+
+ // Run "go list" for complete
+ // information on the specified packages.
+ buf, err := state.invokeGo("list", golistargs(state.cfg, words)...)
+ if err != nil {
+ return nil, err
+ }
+ seen := make(map[string]*jsonPackage)
+ pkgs := make(map[string]*Package)
+ additionalErrors := make(map[string][]Error)
+ // Decode the JSON and convert it to Package form.
+ var response driverResponse
+ for dec := json.NewDecoder(buf); dec.More(); {
+ p := new(jsonPackage)
+ if err := dec.Decode(p); err != nil {
+ return nil, fmt.Errorf("JSON decoding failed: %v", err)
+ }
+
+ if p.ImportPath == "" {
+ // The documentation for go list says that “[e]rroneous packages will have
+ // a non-empty ImportPath”. If for some reason it comes back empty, we
+ // prefer to error out rather than silently discarding data or handing
+ // back a package without any way to refer to it.
+ if p.Error != nil {
+ return nil, Error{
+ Pos: p.Error.Pos,
+ Msg: p.Error.Err,
+ }
+ }
+ return nil, fmt.Errorf("package missing import path: %+v", p)
+ }
+
+ // Work around https://golang.org/issue/33157:
+ // go list -e, when given an absolute path, will find the package contained at
+ // that directory. But when no package exists there, it will return a fake package
+ // with an error and the ImportPath set to the absolute path provided to go list.
+ // Try to convert that absolute path to what its package path would be if it's
+ // contained in a known module or GOPATH entry. This will allow the package to be
+ // properly "reclaimed" when overlays are processed.
+ if filepath.IsAbs(p.ImportPath) && p.Error != nil {
+ pkgPath, ok, err := state.getPkgPath(p.ImportPath)
+ if err != nil {
+ return nil, err
+ }
+ if ok {
+ p.ImportPath = pkgPath
+ }
+ }
+
+ if old, found := seen[p.ImportPath]; found {
+ // If one version of the package has an error, and the other doesn't, assume
+ // that this is a case where go list is reporting a fake dependency variant
+ // of the imported package: When a package tries to invalidly import another
+ // package, go list emits a variant of the imported package (with the same
+ // import path, but with an error on it, and the package will have a
+ // DepError set on it). An example of when this can happen is for imports of
+ // main packages: main packages can not be imported, but they may be
+ // separately matched and listed by another pattern.
+ // See golang.org/issue/36188 for more details.
+
+ // The plan is that eventually, hopefully in Go 1.15, the error will be
+ // reported on the importing package rather than the duplicate "fake"
+ // version of the imported package. Once all supported versions of Go
+ // have the new behavior this logic can be deleted.
+ // TODO(matloob): delete the workaround logic once all supported versions of
+ // Go return the errors on the proper package.
+
+ // There should be exactly one version of a package that doesn't have an
+ // error.
+ if old.Error == nil && p.Error == nil {
+ if !reflect.DeepEqual(p, old) {
+ return nil, fmt.Errorf("internal error: go list gives conflicting information for package %v", p.ImportPath)
+ }
+ continue
+ }
+
+ // Determine if this package's error needs to be bubbled up.
+ // This is a hack, and we expect for go list to eventually set the error
+ // on the package.
+ if old.Error != nil {
+ var errkind string
+ if strings.Contains(old.Error.Err, "not an importable package") {
+ errkind = "not an importable package"
+ } else if strings.Contains(old.Error.Err, "use of internal package") && strings.Contains(old.Error.Err, "not allowed") {
+ errkind = "use of internal package not allowed"
+ }
+ if errkind != "" {
+ if len(old.Error.ImportStack) < 1 {
+ return nil, fmt.Errorf(`internal error: go list gave a %q error with empty import stack`, errkind)
+ }
+ importingPkg := old.Error.ImportStack[len(old.Error.ImportStack)-1]
+ if importingPkg == old.ImportPath {
+ // Using an older version of Go which put this package itself on top of import
+ // stack, instead of the importer. Look for importer in second from top
+ // position.
+ if len(old.Error.ImportStack) < 2 {
+ return nil, fmt.Errorf(`internal error: go list gave a %q error with an import stack without importing package`, errkind)
+ }
+ importingPkg = old.Error.ImportStack[len(old.Error.ImportStack)-2]
+ }
+ additionalErrors[importingPkg] = append(additionalErrors[importingPkg], Error{
+ Pos: old.Error.Pos,
+ Msg: old.Error.Err,
+ Kind: ListError,
+ })
+ }
+ }
+
+ // Make sure that if there's a version of the package without an error,
+ // that's the one reported to the user.
+ if old.Error == nil {
+ continue
+ }
+
+ // This package will replace the old one at the end of the loop.
+ }
+ seen[p.ImportPath] = p
+
+ pkg := &Package{
+ Name: p.Name,
+ ID: p.ImportPath,
+ GoFiles: absJoin(p.Dir, p.GoFiles, p.CgoFiles),
+ CompiledGoFiles: absJoin(p.Dir, p.CompiledGoFiles),
+ OtherFiles: absJoin(p.Dir, otherFiles(p)...),
+ forTest: p.ForTest,
+ Module: p.Module,
+ }
+
+ if (state.cfg.Mode&typecheckCgo) != 0 && len(p.CgoFiles) != 0 {
+ if len(p.CompiledGoFiles) > len(p.GoFiles) {
+ // We need the cgo definitions, which are in the first
+ // CompiledGoFile after the non-cgo ones. This is a hack but there
+ // isn't currently a better way to find it. We also need the pure
+ // Go files and unprocessed cgo files, all of which are already
+ // in pkg.GoFiles.
+ cgoTypes := p.CompiledGoFiles[len(p.GoFiles)]
+ pkg.CompiledGoFiles = append([]string{cgoTypes}, pkg.GoFiles...)
+ } else {
+ // golang/go#38990: go list silently fails to do cgo processing
+ pkg.CompiledGoFiles = nil
+ pkg.Errors = append(pkg.Errors, Error{
+ Msg: "go list failed to return CompiledGoFiles; https://golang.org/issue/38990?",
+ Kind: ListError,
+ })
+ }
+ }
+
+ // Work around https://golang.org/issue/28749:
+ // cmd/go puts assembly, C, and C++ files in CompiledGoFiles.
+ // Filter out any elements of CompiledGoFiles that are also in OtherFiles.
+ // We have to keep this workaround in place until go1.12 is a distant memory.
+ if len(pkg.OtherFiles) > 0 {
+ other := make(map[string]bool, len(pkg.OtherFiles))
+ for _, f := range pkg.OtherFiles {
+ other[f] = true
+ }
+
+ out := pkg.CompiledGoFiles[:0]
+ for _, f := range pkg.CompiledGoFiles {
+ if other[f] {
+ continue
+ }
+ out = append(out, f)
+ }
+ pkg.CompiledGoFiles = out
+ }
+
+ // Extract the PkgPath from the package's ID.
+ if i := strings.IndexByte(pkg.ID, ' '); i >= 0 {
+ pkg.PkgPath = pkg.ID[:i]
+ } else {
+ pkg.PkgPath = pkg.ID
+ }
+
+ if pkg.PkgPath == "unsafe" {
+ pkg.GoFiles = nil // ignore fake unsafe.go file
+ }
+
+ // Assume go list emits only absolute paths for Dir.
+ if p.Dir != "" && !filepath.IsAbs(p.Dir) {
+ log.Fatalf("internal error: go list returned non-absolute Package.Dir: %s", p.Dir)
+ }
+
+ if p.Export != "" && !filepath.IsAbs(p.Export) {
+ pkg.ExportFile = filepath.Join(p.Dir, p.Export)
+ } else {
+ pkg.ExportFile = p.Export
+ }
+
+ // imports
+ //
+ // Imports contains the IDs of all imported packages.
+ // ImportsMap records (path, ID) only where they differ.
+ ids := make(map[string]bool)
+ for _, id := range p.Imports {
+ ids[id] = true
+ }
+ pkg.Imports = make(map[string]*Package)
+ for path, id := range p.ImportMap {
+ pkg.Imports[path] = &Package{ID: id} // non-identity import
+ delete(ids, id)
+ }
+ for id := range ids {
+ if id == "C" {
+ continue
+ }
+
+ pkg.Imports[id] = &Package{ID: id} // identity import
+ }
+ if !p.DepOnly {
+ response.Roots = append(response.Roots, pkg.ID)
+ }
+
+ // Work around for pre-go.1.11 versions of go list.
+ // TODO(matloob): they should be handled by the fallback.
+ // Can we delete this?
+ if len(pkg.CompiledGoFiles) == 0 {
+ pkg.CompiledGoFiles = pkg.GoFiles
+ }
+
+ // Temporary work-around for golang/go#39986. Parse filenames out of
+ // error messages. This happens if there are unrecoverable syntax
+ // errors in the source, so we can't match on a specific error message.
+ if err := p.Error; err != nil && state.shouldAddFilenameFromError(p) {
+ addFilenameFromPos := func(pos string) bool {
+ split := strings.Split(pos, ":")
+ if len(split) < 1 {
+ return false
+ }
+ filename := strings.TrimSpace(split[0])
+ if filename == "" {
+ return false
+ }
+ if !filepath.IsAbs(filename) {
+ filename = filepath.Join(state.cfg.Dir, filename)
+ }
+ info, _ := os.Stat(filename)
+ if info == nil {
+ return false
+ }
+ pkg.CompiledGoFiles = append(pkg.CompiledGoFiles, filename)
+ pkg.GoFiles = append(pkg.GoFiles, filename)
+ return true
+ }
+ found := addFilenameFromPos(err.Pos)
+ // In some cases, go list only reports the error position in the
+ // error text, not the error position. One such case is when the
+ // file's package name is a keyword (see golang.org/issue/39763).
+ if !found {
+ addFilenameFromPos(err.Err)
+ }
+ }
+
+ if p.Error != nil {
+ msg := strings.TrimSpace(p.Error.Err) // Trim to work around golang.org/issue/32363.
+ // Address golang.org/issue/35964 by appending import stack to error message.
+ if msg == "import cycle not allowed" && len(p.Error.ImportStack) != 0 {
+ msg += fmt.Sprintf(": import stack: %v", p.Error.ImportStack)
+ }
+ pkg.Errors = append(pkg.Errors, Error{
+ Pos: p.Error.Pos,
+ Msg: msg,
+ Kind: ListError,
+ })
+ }
+
+ pkgs[pkg.ID] = pkg
+ }
+
+ for id, errs := range additionalErrors {
+ if p, ok := pkgs[id]; ok {
+ p.Errors = append(p.Errors, errs...)
+ }
+ }
+ for _, pkg := range pkgs {
+ response.Packages = append(response.Packages, pkg)
+ }
+ sort.Slice(response.Packages, func(i, j int) bool { return response.Packages[i].ID < response.Packages[j].ID })
+
+ return &response, nil
+}
+
+func (state *golistState) shouldAddFilenameFromError(p *jsonPackage) bool {
+ if len(p.GoFiles) > 0 || len(p.CompiledGoFiles) > 0 {
+ return false
+ }
+
+ goV, err := state.getGoVersion()
+ if err != nil {
+ return false
+ }
+
+ // On Go 1.14 and earlier, only add filenames from errors if the import stack is empty.
+ // The import stack behaves differently for these versions than newer Go versions.
+ if strings.HasPrefix(goV, "go1.13") || strings.HasPrefix(goV, "go1.14") {
+ return len(p.Error.ImportStack) == 0
+ }
+
+ // On Go 1.15 and later, only parse filenames out of error if there's no import stack,
+ // or the current package is at the top of the import stack. This is not guaranteed
+ // to work perfectly, but should avoid some cases where files in errors don't belong to this
+ // package.
+ return len(p.Error.ImportStack) == 0 || p.Error.ImportStack[len(p.Error.ImportStack)-1] == p.ImportPath
+}
+
+func (state *golistState) getGoVersion() (string, error) {
+ state.goVersionOnce.Do(func() {
+ var b *bytes.Buffer
+ // Invoke go version. Don't use invokeGo because it will supply build flags, and
+ // go version doesn't expect build flags.
+ inv := gocommand.Invocation{
+ Verb: "version",
+ Env: state.cfg.Env,
+ Logf: state.cfg.Logf,
+ }
+ gocmdRunner := state.cfg.gocmdRunner
+ if gocmdRunner == nil {
+ gocmdRunner = &gocommand.Runner{}
+ }
+ b, _, _, state.goVersionError = gocmdRunner.RunRaw(state.cfg.Context, inv)
+ if state.goVersionError != nil {
+ return
+ }
+
+ sp := strings.Split(b.String(), " ")
+ if len(sp) < 3 {
+ state.goVersionError = fmt.Errorf("go version output: expected 'go version <version>', got '%s'", b.String())
+ return
+ }
+ state.goVersion = sp[2]
+ })
+ return state.goVersion, state.goVersionError
+}
+
+// getPkgPath finds the package path of a directory if it's relative to a root directory.
+func (state *golistState) getPkgPath(dir string) (string, bool, error) {
+ absDir, err := filepath.Abs(dir)
+ if err != nil {
+ return "", false, err
+ }
+ roots, err := state.determineRootDirs()
+ if err != nil {
+ return "", false, err
+ }
+
+ for rdir, rpath := range roots {
+ // Make sure that the directory is in the module,
+ // to avoid creating a path relative to another module.
+ if !strings.HasPrefix(absDir, rdir) {
+ continue
+ }
+ // TODO(matloob): This doesn't properly handle symlinks.
+ r, err := filepath.Rel(rdir, dir)
+ if err != nil {
+ continue
+ }
+ if rpath != "" {
+ // We choose only one root even though the directory even it can belong in multiple modules
+ // or GOPATH entries. This is okay because we only need to work with absolute dirs when a
+ // file is missing from disk, for instance when gopls calls go/packages in an overlay.
+ // Once the file is saved, gopls, or the next invocation of the tool will get the correct
+ // result straight from golist.
+ // TODO(matloob): Implement module tiebreaking?
+ return path.Join(rpath, filepath.ToSlash(r)), true, nil
+ }
+ return filepath.ToSlash(r), true, nil
+ }
+ return "", false, nil
+}
+
+// absJoin absolutizes and flattens the lists of files.
+func absJoin(dir string, fileses ...[]string) (res []string) {
+ for _, files := range fileses {
+ for _, file := range files {
+ if !filepath.IsAbs(file) {
+ file = filepath.Join(dir, file)
+ }
+ res = append(res, file)
+ }
+ }
+ return res
+}
+
+func golistargs(cfg *Config, words []string) []string {
+ const findFlags = NeedImports | NeedTypes | NeedSyntax | NeedTypesInfo
+ fullargs := []string{
+ "-e", "-json",
+ fmt.Sprintf("-compiled=%t", cfg.Mode&(NeedCompiledGoFiles|NeedSyntax|NeedTypes|NeedTypesInfo|NeedTypesSizes) != 0),
+ fmt.Sprintf("-test=%t", cfg.Tests),
+ fmt.Sprintf("-export=%t", usesExportData(cfg)),
+ fmt.Sprintf("-deps=%t", cfg.Mode&NeedImports != 0),
+ // go list doesn't let you pass -test and -find together,
+ // probably because you'd just get the TestMain.
+ fmt.Sprintf("-find=%t", !cfg.Tests && cfg.Mode&findFlags == 0),
+ }
+ fullargs = append(fullargs, cfg.BuildFlags...)
+ fullargs = append(fullargs, "--")
+ fullargs = append(fullargs, words...)
+ return fullargs
+}
+
+// invokeGo returns the stdout of a go command invocation.
+func (state *golistState) invokeGo(verb string, args ...string) (*bytes.Buffer, error) {
+ cfg := state.cfg
+
+ inv := gocommand.Invocation{
+ Verb: verb,
+ Args: args,
+ BuildFlags: cfg.BuildFlags,
+ Env: cfg.Env,
+ Logf: cfg.Logf,
+ WorkingDir: cfg.Dir,
+ }
+ gocmdRunner := cfg.gocmdRunner
+ if gocmdRunner == nil {
+ gocmdRunner = &gocommand.Runner{}
+ }
+ stdout, stderr, _, err := gocmdRunner.RunRaw(cfg.Context, inv)
+ if err != nil {
+ // Check for 'go' executable not being found.
+ if ee, ok := err.(*exec.Error); ok && ee.Err == exec.ErrNotFound {
+ return nil, fmt.Errorf("'go list' driver requires 'go', but %s", exec.ErrNotFound)
+ }
+
+ exitErr, ok := err.(*exec.ExitError)
+ if !ok {
+ // Catastrophic error:
+ // - context cancellation
+ return nil, xerrors.Errorf("couldn't run 'go': %w", err)
+ }
+
+ // Old go version?
+ if strings.Contains(stderr.String(), "flag provided but not defined") {
+ return nil, goTooOldError{fmt.Errorf("unsupported version of go: %s: %s", exitErr, stderr)}
+ }
+
+ // Related to #24854
+ if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "unexpected directory layout") {
+ return nil, fmt.Errorf("%s", stderr.String())
+ }
+
+ // Is there an error running the C compiler in cgo? This will be reported in the "Error" field
+ // and should be suppressed by go list -e.
+ //
+ // This condition is not perfect yet because the error message can include other error messages than runtime/cgo.
+ isPkgPathRune := func(r rune) bool {
+ // From https://golang.org/ref/spec#Import_declarations:
+ // Implementation restriction: A compiler may restrict ImportPaths to non-empty strings
+ // using only characters belonging to Unicode's L, M, N, P, and S general categories
+ // (the Graphic characters without spaces) and may also exclude the
+ // characters !"#$%&'()*,:;<=>?[\]^`{|} and the Unicode replacement character U+FFFD.
+ return unicode.IsOneOf([]*unicode.RangeTable{unicode.L, unicode.M, unicode.N, unicode.P, unicode.S}, r) &&
+ !strings.ContainsRune("!\"#$%&'()*,:;<=>?[\\]^`{|}\uFFFD", r)
+ }
+ if len(stderr.String()) > 0 && strings.HasPrefix(stderr.String(), "# ") {
+ msg := stderr.String()[len("# "):]
+ if strings.HasPrefix(strings.TrimLeftFunc(msg, isPkgPathRune), "\n") {
+ return stdout, nil
+ }
+ // Treat pkg-config errors as a special case (golang.org/issue/36770).
+ if strings.HasPrefix(msg, "pkg-config") {
+ return stdout, nil
+ }
+ }
+
+ // This error only appears in stderr. See golang.org/cl/166398 for a fix in go list to show
+ // the error in the Err section of stdout in case -e option is provided.
+ // This fix is provided for backwards compatibility.
+ if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "named files must be .go files") {
+ output := fmt.Sprintf(`{"ImportPath": "command-line-arguments","Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
+ strings.Trim(stderr.String(), "\n"))
+ return bytes.NewBufferString(output), nil
+ }
+
+ // Similar to the previous error, but currently lacks a fix in Go.
+ if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "named files must all be in one directory") {
+ output := fmt.Sprintf(`{"ImportPath": "command-line-arguments","Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
+ strings.Trim(stderr.String(), "\n"))
+ return bytes.NewBufferString(output), nil
+ }
+
+ // Backwards compatibility for Go 1.11 because 1.12 and 1.13 put the directory in the ImportPath.
+ // If the package doesn't exist, put the absolute path of the directory into the error message,
+ // as Go 1.13 list does.
+ const noSuchDirectory = "no such directory"
+ if len(stderr.String()) > 0 && strings.Contains(stderr.String(), noSuchDirectory) {
+ errstr := stderr.String()
+ abspath := strings.TrimSpace(errstr[strings.Index(errstr, noSuchDirectory)+len(noSuchDirectory):])
+ output := fmt.Sprintf(`{"ImportPath": %q,"Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
+ abspath, strings.Trim(stderr.String(), "\n"))
+ return bytes.NewBufferString(output), nil
+ }
+
+ // Workaround for #29280: go list -e has incorrect behavior when an ad-hoc package doesn't exist.
+ // Note that the error message we look for in this case is different that the one looked for above.
+ if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "no such file or directory") {
+ output := fmt.Sprintf(`{"ImportPath": "command-line-arguments","Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
+ strings.Trim(stderr.String(), "\n"))
+ return bytes.NewBufferString(output), nil
+ }
+
+ // Workaround for #34273. go list -e with GO111MODULE=on has incorrect behavior when listing a
+ // directory outside any module.
+ if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "outside available modules") {
+ output := fmt.Sprintf(`{"ImportPath": %q,"Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
+ // TODO(matloob): command-line-arguments isn't correct here.
+ "command-line-arguments", strings.Trim(stderr.String(), "\n"))
+ return bytes.NewBufferString(output), nil
+ }
+
+ // Another variation of the previous error
+ if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "outside module root") {
+ output := fmt.Sprintf(`{"ImportPath": %q,"Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
+ // TODO(matloob): command-line-arguments isn't correct here.
+ "command-line-arguments", strings.Trim(stderr.String(), "\n"))
+ return bytes.NewBufferString(output), nil
+ }
+
+ // Workaround for an instance of golang.org/issue/26755: go list -e will return a non-zero exit
+ // status if there's a dependency on a package that doesn't exist. But it should return
+ // a zero exit status and set an error on that package.
+ if len(stderr.String()) > 0 && strings.Contains(stderr.String(), "no Go files in") {
+ // Don't clobber stdout if `go list` actually returned something.
+ if len(stdout.String()) > 0 {
+ return stdout, nil
+ }
+ // try to extract package name from string
+ stderrStr := stderr.String()
+ var importPath string
+ colon := strings.Index(stderrStr, ":")
+ if colon > 0 && strings.HasPrefix(stderrStr, "go build ") {
+ importPath = stderrStr[len("go build "):colon]
+ }
+ output := fmt.Sprintf(`{"ImportPath": %q,"Incomplete": true,"Error": {"Pos": "","Err": %q}}`,
+ importPath, strings.Trim(stderrStr, "\n"))
+ return bytes.NewBufferString(output), nil
+ }
+
+ // Export mode entails a build.
+ // If that build fails, errors appear on stderr
+ // (despite the -e flag) and the Export field is blank.
+ // Do not fail in that case.
+ // The same is true if an ad-hoc package given to go list doesn't exist.
+ // TODO(matloob): Remove these once we can depend on go list to exit with a zero status with -e even when
+ // packages don't exist or a build fails.
+ if !usesExportData(cfg) && !containsGoFile(args) {
+ return nil, fmt.Errorf("go %v: %s: %s", args, exitErr, stderr)
+ }
+ }
+ return stdout, nil
+}
+
+func containsGoFile(s []string) bool {
+ for _, f := range s {
+ if strings.HasSuffix(f, ".go") {
+ return true
+ }
+ }
+ return false
+}
+
+func cmdDebugStr(cmd *exec.Cmd, args ...string) string {
+ env := make(map[string]string)
+ for _, kv := range cmd.Env {
+ split := strings.Split(kv, "=")
+ k, v := split[0], split[1]
+ env[k] = v
+ }
+ var quotedArgs []string
+ for _, arg := range args {
+ quotedArgs = append(quotedArgs, strconv.Quote(arg))
+ }
+
+ return fmt.Sprintf("GOROOT=%v GOPATH=%v GO111MODULE=%v PWD=%v go %s", env["GOROOT"], env["GOPATH"], env["GO111MODULE"], env["PWD"], strings.Join(quotedArgs, " "))
+}
diff --git a/vendor/golang.org/x/tools/go/packages/golist_overlay.go b/vendor/golang.org/x/tools/go/packages/golist_overlay.go
new file mode 100644
index 0000000..4eabfd9
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/packages/golist_overlay.go
@@ -0,0 +1,473 @@
+package packages
+
+import (
+ "encoding/json"
+ "fmt"
+ "go/parser"
+ "go/token"
+ "log"
+ "os"
+ "path/filepath"
+ "sort"
+ "strconv"
+ "strings"
+)
+
+// processGolistOverlay provides rudimentary support for adding
+// files that don't exist on disk to an overlay. The results can be
+// sometimes incorrect.
+// TODO(matloob): Handle unsupported cases, including the following:
+// - determining the correct package to add given a new import path
+func (state *golistState) processGolistOverlay(response *responseDeduper) (modifiedPkgs, needPkgs []string, err error) {
+ havePkgs := make(map[string]string) // importPath -> non-test package ID
+ needPkgsSet := make(map[string]bool)
+ modifiedPkgsSet := make(map[string]bool)
+
+ pkgOfDir := make(map[string][]*Package)
+ for _, pkg := range response.dr.Packages {
+ // This is an approximation of import path to id. This can be
+ // wrong for tests, vendored packages, and a number of other cases.
+ havePkgs[pkg.PkgPath] = pkg.ID
+ x := commonDir(pkg.GoFiles)
+ if x != "" {
+ pkgOfDir[x] = append(pkgOfDir[x], pkg)
+ }
+ }
+
+ // If no new imports are added, it is safe to avoid loading any needPkgs.
+ // Otherwise, it's hard to tell which package is actually being loaded
+ // (due to vendoring) and whether any modified package will show up
+ // in the transitive set of dependencies (because new imports are added,
+ // potentially modifying the transitive set of dependencies).
+ var overlayAddsImports bool
+
+ // If both a package and its test package are created by the overlay, we
+ // need the real package first. Process all non-test files before test
+ // files, and make the whole process deterministic while we're at it.
+ var overlayFiles []string
+ for opath := range state.cfg.Overlay {
+ overlayFiles = append(overlayFiles, opath)
+ }
+ sort.Slice(overlayFiles, func(i, j int) bool {
+ iTest := strings.HasSuffix(overlayFiles[i], "_test.go")
+ jTest := strings.HasSuffix(overlayFiles[j], "_test.go")
+ if iTest != jTest {
+ return !iTest // non-tests are before tests.
+ }
+ return overlayFiles[i] < overlayFiles[j]
+ })
+ for _, opath := range overlayFiles {
+ contents := state.cfg.Overlay[opath]
+ base := filepath.Base(opath)
+ dir := filepath.Dir(opath)
+ var pkg *Package // if opath belongs to both a package and its test variant, this will be the test variant
+ var testVariantOf *Package // if opath is a test file, this is the package it is testing
+ var fileExists bool
+ isTestFile := strings.HasSuffix(opath, "_test.go")
+ pkgName, ok := extractPackageName(opath, contents)
+ if !ok {
+ // Don't bother adding a file that doesn't even have a parsable package statement
+ // to the overlay.
+ continue
+ }
+ // If all the overlay files belong to a different package, change the
+ // package name to that package.
+ maybeFixPackageName(pkgName, isTestFile, pkgOfDir[dir])
+ nextPackage:
+ for _, p := range response.dr.Packages {
+ if pkgName != p.Name && p.ID != "command-line-arguments" {
+ continue
+ }
+ for _, f := range p.GoFiles {
+ if !sameFile(filepath.Dir(f), dir) {
+ continue
+ }
+ // Make sure to capture information on the package's test variant, if needed.
+ if isTestFile && !hasTestFiles(p) {
+ // TODO(matloob): Are there packages other than the 'production' variant
+ // of a package that this can match? This shouldn't match the test main package
+ // because the file is generated in another directory.
+ testVariantOf = p
+ continue nextPackage
+ }
+ // We must have already seen the package of which this is a test variant.
+ if pkg != nil && p != pkg && pkg.PkgPath == p.PkgPath {
+ if hasTestFiles(p) {
+ testVariantOf = pkg
+ }
+ }
+ pkg = p
+ if filepath.Base(f) == base {
+ fileExists = true
+ }
+ }
+ }
+ // The overlay could have included an entirely new package or an
+ // ad-hoc package. An ad-hoc package is one that we have manually
+ // constructed from inadequate `go list` results for a file= query.
+ // It will have the ID command-line-arguments.
+ if pkg == nil || pkg.ID == "command-line-arguments" {
+ // Try to find the module or gopath dir the file is contained in.
+ // Then for modules, add the module opath to the beginning.
+ pkgPath, ok, err := state.getPkgPath(dir)
+ if err != nil {
+ return nil, nil, err
+ }
+ if !ok {
+ break
+ }
+ var forTest string // only set for x tests
+ isXTest := strings.HasSuffix(pkgName, "_test")
+ if isXTest {
+ forTest = pkgPath
+ pkgPath += "_test"
+ }
+ id := pkgPath
+ if isTestFile {
+ if isXTest {
+ id = fmt.Sprintf("%s [%s.test]", pkgPath, forTest)
+ } else {
+ id = fmt.Sprintf("%s [%s.test]", pkgPath, pkgPath)
+ }
+ }
+ if pkg != nil {
+ // TODO(rstambler): We should change the package's path and ID
+ // here. The only issue is that this messes with the roots.
+ } else {
+ // Try to reclaim a package with the same ID, if it exists in the response.
+ for _, p := range response.dr.Packages {
+ if reclaimPackage(p, id, opath, contents) {
+ pkg = p
+ break
+ }
+ }
+ // Otherwise, create a new package.
+ if pkg == nil {
+ pkg = &Package{
+ PkgPath: pkgPath,
+ ID: id,
+ Name: pkgName,
+ Imports: make(map[string]*Package),
+ }
+ response.addPackage(pkg)
+ havePkgs[pkg.PkgPath] = id
+ // Add the production package's sources for a test variant.
+ if isTestFile && !isXTest && testVariantOf != nil {
+ pkg.GoFiles = append(pkg.GoFiles, testVariantOf.GoFiles...)
+ pkg.CompiledGoFiles = append(pkg.CompiledGoFiles, testVariantOf.CompiledGoFiles...)
+ // Add the package under test and its imports to the test variant.
+ pkg.forTest = testVariantOf.PkgPath
+ for k, v := range testVariantOf.Imports {
+ pkg.Imports[k] = &Package{ID: v.ID}
+ }
+ }
+ if isXTest {
+ pkg.forTest = forTest
+ }
+ }
+ }
+ }
+ if !fileExists {
+ pkg.GoFiles = append(pkg.GoFiles, opath)
+ // TODO(matloob): Adding the file to CompiledGoFiles can exhibit the wrong behavior
+ // if the file will be ignored due to its build tags.
+ pkg.CompiledGoFiles = append(pkg.CompiledGoFiles, opath)
+ modifiedPkgsSet[pkg.ID] = true
+ }
+ imports, err := extractImports(opath, contents)
+ if err != nil {
+ // Let the parser or type checker report errors later.
+ continue
+ }
+ for _, imp := range imports {
+ // TODO(rstambler): If the package is an x test and the import has
+ // a test variant, make sure to replace it.
+ if _, found := pkg.Imports[imp]; found {
+ continue
+ }
+ overlayAddsImports = true
+ id, ok := havePkgs[imp]
+ if !ok {
+ var err error
+ id, err = state.resolveImport(dir, imp)
+ if err != nil {
+ return nil, nil, err
+ }
+ }
+ pkg.Imports[imp] = &Package{ID: id}
+ // Add dependencies to the non-test variant version of this package as well.
+ if testVariantOf != nil {
+ testVariantOf.Imports[imp] = &Package{ID: id}
+ }
+ }
+ }
+
+ // toPkgPath guesses the package path given the id.
+ toPkgPath := func(sourceDir, id string) (string, error) {
+ if i := strings.IndexByte(id, ' '); i >= 0 {
+ return state.resolveImport(sourceDir, id[:i])
+ }
+ return state.resolveImport(sourceDir, id)
+ }
+
+ // Now that new packages have been created, do another pass to determine
+ // the new set of missing packages.
+ for _, pkg := range response.dr.Packages {
+ for _, imp := range pkg.Imports {
+ if len(pkg.GoFiles) == 0 {
+ return nil, nil, fmt.Errorf("cannot resolve imports for package %q with no Go files", pkg.PkgPath)
+ }
+ pkgPath, err := toPkgPath(filepath.Dir(pkg.GoFiles[0]), imp.ID)
+ if err != nil {
+ return nil, nil, err
+ }
+ if _, ok := havePkgs[pkgPath]; !ok {
+ needPkgsSet[pkgPath] = true
+ }
+ }
+ }
+
+ if overlayAddsImports {
+ needPkgs = make([]string, 0, len(needPkgsSet))
+ for pkg := range needPkgsSet {
+ needPkgs = append(needPkgs, pkg)
+ }
+ }
+ modifiedPkgs = make([]string, 0, len(modifiedPkgsSet))
+ for pkg := range modifiedPkgsSet {
+ modifiedPkgs = append(modifiedPkgs, pkg)
+ }
+ return modifiedPkgs, needPkgs, err
+}
+
+// resolveImport finds the the ID of a package given its import path.
+// In particular, it will find the right vendored copy when in GOPATH mode.
+func (state *golistState) resolveImport(sourceDir, importPath string) (string, error) {
+ env, err := state.getEnv()
+ if err != nil {
+ return "", err
+ }
+ if env["GOMOD"] != "" {
+ return importPath, nil
+ }
+
+ searchDir := sourceDir
+ for {
+ vendorDir := filepath.Join(searchDir, "vendor")
+ exists, ok := state.vendorDirs[vendorDir]
+ if !ok {
+ info, err := os.Stat(vendorDir)
+ exists = err == nil && info.IsDir()
+ state.vendorDirs[vendorDir] = exists
+ }
+
+ if exists {
+ vendoredPath := filepath.Join(vendorDir, importPath)
+ if info, err := os.Stat(vendoredPath); err == nil && info.IsDir() {
+ // We should probably check for .go files here, but shame on anyone who fools us.
+ path, ok, err := state.getPkgPath(vendoredPath)
+ if err != nil {
+ return "", err
+ }
+ if ok {
+ return path, nil
+ }
+ }
+ }
+
+ // We know we've hit the top of the filesystem when we Dir / and get /,
+ // or C:\ and get C:\, etc.
+ next := filepath.Dir(searchDir)
+ if next == searchDir {
+ break
+ }
+ searchDir = next
+ }
+ return importPath, nil
+}
+
+func hasTestFiles(p *Package) bool {
+ for _, f := range p.GoFiles {
+ if strings.HasSuffix(f, "_test.go") {
+ return true
+ }
+ }
+ return false
+}
+
+// determineRootDirs returns a mapping from absolute directories that could
+// contain code to their corresponding import path prefixes.
+func (state *golistState) determineRootDirs() (map[string]string, error) {
+ env, err := state.getEnv()
+ if err != nil {
+ return nil, err
+ }
+ if env["GOMOD"] != "" {
+ state.rootsOnce.Do(func() {
+ state.rootDirs, state.rootDirsError = state.determineRootDirsModules()
+ })
+ } else {
+ state.rootsOnce.Do(func() {
+ state.rootDirs, state.rootDirsError = state.determineRootDirsGOPATH()
+ })
+ }
+ return state.rootDirs, state.rootDirsError
+}
+
+func (state *golistState) determineRootDirsModules() (map[string]string, error) {
+ // This will only return the root directory for the main module.
+ // For now we only support overlays in main modules.
+ // Editing files in the module cache isn't a great idea, so we don't
+ // plan to ever support that, but editing files in replaced modules
+ // is something we may want to support. To do that, we'll want to
+ // do a go list -m to determine the replaced module's module path and
+ // directory, and then a go list -m {{with .Replace}}{{.Dir}}{{end}} <replaced module's path>
+ // from the main module to determine if that module is actually a replacement.
+ // See bcmills's comment here: https://github.com/golang/go/issues/37629#issuecomment-594179751
+ // for more information.
+ out, err := state.invokeGo("list", "-m", "-json")
+ if err != nil {
+ return nil, err
+ }
+ m := map[string]string{}
+ type jsonMod struct{ Path, Dir string }
+ for dec := json.NewDecoder(out); dec.More(); {
+ mod := new(jsonMod)
+ if err := dec.Decode(mod); err != nil {
+ return nil, err
+ }
+ if mod.Dir != "" && mod.Path != "" {
+ // This is a valid module; add it to the map.
+ absDir, err := filepath.Abs(mod.Dir)
+ if err != nil {
+ return nil, err
+ }
+ m[absDir] = mod.Path
+ }
+ }
+ return m, nil
+}
+
+func (state *golistState) determineRootDirsGOPATH() (map[string]string, error) {
+ m := map[string]string{}
+ for _, dir := range filepath.SplitList(state.mustGetEnv()["GOPATH"]) {
+ absDir, err := filepath.Abs(dir)
+ if err != nil {
+ return nil, err
+ }
+ m[filepath.Join(absDir, "src")] = ""
+ }
+ return m, nil
+}
+
+func extractImports(filename string, contents []byte) ([]string, error) {
+ f, err := parser.ParseFile(token.NewFileSet(), filename, contents, parser.ImportsOnly) // TODO(matloob): reuse fileset?
+ if err != nil {
+ return nil, err
+ }
+ var res []string
+ for _, imp := range f.Imports {
+ quotedPath := imp.Path.Value
+ path, err := strconv.Unquote(quotedPath)
+ if err != nil {
+ return nil, err
+ }
+ res = append(res, path)
+ }
+ return res, nil
+}
+
+// reclaimPackage attempts to reuse a package that failed to load in an overlay.
+//
+// If the package has errors and has no Name, GoFiles, or Imports,
+// then it's possible that it doesn't yet exist on disk.
+func reclaimPackage(pkg *Package, id string, filename string, contents []byte) bool {
+ // TODO(rstambler): Check the message of the actual error?
+ // It differs between $GOPATH and module mode.
+ if pkg.ID != id {
+ return false
+ }
+ if len(pkg.Errors) != 1 {
+ return false
+ }
+ if pkg.Name != "" || pkg.ExportFile != "" {
+ return false
+ }
+ if len(pkg.GoFiles) > 0 || len(pkg.CompiledGoFiles) > 0 || len(pkg.OtherFiles) > 0 {
+ return false
+ }
+ if len(pkg.Imports) > 0 {
+ return false
+ }
+ pkgName, ok := extractPackageName(filename, contents)
+ if !ok {
+ return false
+ }
+ pkg.Name = pkgName
+ pkg.Errors = nil
+ return true
+}
+
+func extractPackageName(filename string, contents []byte) (string, bool) {
+ // TODO(rstambler): Check the message of the actual error?
+ // It differs between $GOPATH and module mode.
+ f, err := parser.ParseFile(token.NewFileSet(), filename, contents, parser.PackageClauseOnly) // TODO(matloob): reuse fileset?
+ if err != nil {
+ return "", false
+ }
+ return f.Name.Name, true
+}
+
+func commonDir(a []string) string {
+ seen := make(map[string]bool)
+ x := append([]string{}, a...)
+ for _, f := range x {
+ seen[filepath.Dir(f)] = true
+ }
+ if len(seen) > 1 {
+ log.Fatalf("commonDir saw %v for %v", seen, x)
+ }
+ for k := range seen {
+ // len(seen) == 1
+ return k
+ }
+ return "" // no files
+}
+
+// It is possible that the files in the disk directory dir have a different package
+// name from newName, which is deduced from the overlays. If they all have a different
+// package name, and they all have the same package name, then that name becomes
+// the package name.
+// It returns true if it changes the package name, false otherwise.
+func maybeFixPackageName(newName string, isTestFile bool, pkgsOfDir []*Package) {
+ names := make(map[string]int)
+ for _, p := range pkgsOfDir {
+ names[p.Name]++
+ }
+ if len(names) != 1 {
+ // some files are in different packages
+ return
+ }
+ var oldName string
+ for k := range names {
+ oldName = k
+ }
+ if newName == oldName {
+ return
+ }
+ // We might have a case where all of the package names in the directory are
+ // the same, but the overlay file is for an x test, which belongs to its
+ // own package. If the x test does not yet exist on disk, we may not yet
+ // have its package name on disk, but we should not rename the packages.
+ //
+ // We use a heuristic to determine if this file belongs to an x test:
+ // The test file should have a package name whose package name has a _test
+ // suffix or looks like "newName_test".
+ maybeXTest := strings.HasPrefix(oldName+"_test", newName) || strings.HasSuffix(newName, "_test")
+ if isTestFile && maybeXTest {
+ return
+ }
+ for _, p := range pkgsOfDir {
+ p.Name = newName
+ }
+}
diff --git a/vendor/golang.org/x/tools/go/packages/loadmode_string.go b/vendor/golang.org/x/tools/go/packages/loadmode_string.go
new file mode 100644
index 0000000..7ea37e7
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/packages/loadmode_string.go
@@ -0,0 +1,57 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packages
+
+import (
+ "fmt"
+ "strings"
+)
+
+var allModes = []LoadMode{
+ NeedName,
+ NeedFiles,
+ NeedCompiledGoFiles,
+ NeedImports,
+ NeedDeps,
+ NeedExportsFile,
+ NeedTypes,
+ NeedSyntax,
+ NeedTypesInfo,
+ NeedTypesSizes,
+}
+
+var modeStrings = []string{
+ "NeedName",
+ "NeedFiles",
+ "NeedCompiledGoFiles",
+ "NeedImports",
+ "NeedDeps",
+ "NeedExportsFile",
+ "NeedTypes",
+ "NeedSyntax",
+ "NeedTypesInfo",
+ "NeedTypesSizes",
+}
+
+func (mod LoadMode) String() string {
+ m := mod
+ if m == 0 {
+ return "LoadMode(0)"
+ }
+ var out []string
+ for i, x := range allModes {
+ if x > m {
+ break
+ }
+ if (m & x) != 0 {
+ out = append(out, modeStrings[i])
+ m = m ^ x
+ }
+ }
+ if m != 0 {
+ out = append(out, "Unknown")
+ }
+ return fmt.Sprintf("LoadMode(%s)", strings.Join(out, "|"))
+}
diff --git a/vendor/golang.org/x/tools/go/packages/packages.go b/vendor/golang.org/x/tools/go/packages/packages.go
new file mode 100644
index 0000000..04053f1
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/packages/packages.go
@@ -0,0 +1,1212 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packages
+
+// See doc.go for package documentation and implementation notes.
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "go/ast"
+ "go/parser"
+ "go/scanner"
+ "go/token"
+ "go/types"
+ "io/ioutil"
+ "log"
+ "os"
+ "path/filepath"
+ "strings"
+ "sync"
+ "time"
+
+ "golang.org/x/tools/go/gcexportdata"
+ "golang.org/x/tools/internal/gocommand"
+ "golang.org/x/tools/internal/packagesinternal"
+ "golang.org/x/tools/internal/typesinternal"
+)
+
+// A LoadMode controls the amount of detail to return when loading.
+// The bits below can be combined to specify which fields should be
+// filled in the result packages.
+// The zero value is a special case, equivalent to combining
+// the NeedName, NeedFiles, and NeedCompiledGoFiles bits.
+// ID and Errors (if present) will always be filled.
+// Load may return more information than requested.
+type LoadMode int
+
+// TODO(matloob): When a V2 of go/packages is released, rename NeedExportsFile to
+// NeedExportFile to make it consistent with the Package field it's adding.
+
+const (
+ // NeedName adds Name and PkgPath.
+ NeedName LoadMode = 1 << iota
+
+ // NeedFiles adds GoFiles and OtherFiles.
+ NeedFiles
+
+ // NeedCompiledGoFiles adds CompiledGoFiles.
+ NeedCompiledGoFiles
+
+ // NeedImports adds Imports. If NeedDeps is not set, the Imports field will contain
+ // "placeholder" Packages with only the ID set.
+ NeedImports
+
+ // NeedDeps adds the fields requested by the LoadMode in the packages in Imports.
+ NeedDeps
+
+ // NeedExportsFile adds ExportFile.
+ NeedExportsFile
+
+ // NeedTypes adds Types, Fset, and IllTyped.
+ NeedTypes
+
+ // NeedSyntax adds Syntax.
+ NeedSyntax
+
+ // NeedTypesInfo adds TypesInfo.
+ NeedTypesInfo
+
+ // NeedTypesSizes adds TypesSizes.
+ NeedTypesSizes
+
+ // typecheckCgo enables full support for type checking cgo. Requires Go 1.15+.
+ // Modifies CompiledGoFiles and Types, and has no effect on its own.
+ typecheckCgo
+
+ // NeedModule adds Module.
+ NeedModule
+)
+
+const (
+ // Deprecated: LoadFiles exists for historical compatibility
+ // and should not be used. Please directly specify the needed fields using the Need values.
+ LoadFiles = NeedName | NeedFiles | NeedCompiledGoFiles
+
+ // Deprecated: LoadImports exists for historical compatibility
+ // and should not be used. Please directly specify the needed fields using the Need values.
+ LoadImports = LoadFiles | NeedImports
+
+ // Deprecated: LoadTypes exists for historical compatibility
+ // and should not be used. Please directly specify the needed fields using the Need values.
+ LoadTypes = LoadImports | NeedTypes | NeedTypesSizes
+
+ // Deprecated: LoadSyntax exists for historical compatibility
+ // and should not be used. Please directly specify the needed fields using the Need values.
+ LoadSyntax = LoadTypes | NeedSyntax | NeedTypesInfo
+
+ // Deprecated: LoadAllSyntax exists for historical compatibility
+ // and should not be used. Please directly specify the needed fields using the Need values.
+ LoadAllSyntax = LoadSyntax | NeedDeps
+)
+
+// A Config specifies details about how packages should be loaded.
+// The zero value is a valid configuration.
+// Calls to Load do not modify this struct.
+type Config struct {
+ // Mode controls the level of information returned for each package.
+ Mode LoadMode
+
+ // Context specifies the context for the load operation.
+ // If the context is cancelled, the loader may stop early
+ // and return an ErrCancelled error.
+ // If Context is nil, the load cannot be cancelled.
+ Context context.Context
+
+ // Logf is the logger for the config.
+ // If the user provides a logger, debug logging is enabled.
+ // If the GOPACKAGESDEBUG environment variable is set to true,
+ // but the logger is nil, default to log.Printf.
+ Logf func(format string, args ...interface{})
+
+ // Dir is the directory in which to run the build system's query tool
+ // that provides information about the packages.
+ // If Dir is empty, the tool is run in the current directory.
+ Dir string
+
+ // Env is the environment to use when invoking the build system's query tool.
+ // If Env is nil, the current environment is used.
+ // As in os/exec's Cmd, only the last value in the slice for
+ // each environment key is used. To specify the setting of only
+ // a few variables, append to the current environment, as in:
+ //
+ // opt.Env = append(os.Environ(), "GOOS=plan9", "GOARCH=386")
+ //
+ Env []string
+
+ // gocmdRunner guards go command calls from concurrency errors.
+ gocmdRunner *gocommand.Runner
+
+ // BuildFlags is a list of command-line flags to be passed through to
+ // the build system's query tool.
+ BuildFlags []string
+
+ // Fset provides source position information for syntax trees and types.
+ // If Fset is nil, Load will use a new fileset, but preserve Fset's value.
+ Fset *token.FileSet
+
+ // ParseFile is called to read and parse each file
+ // when preparing a package's type-checked syntax tree.
+ // It must be safe to call ParseFile simultaneously from multiple goroutines.
+ // If ParseFile is nil, the loader will uses parser.ParseFile.
+ //
+ // ParseFile should parse the source from src and use filename only for
+ // recording position information.
+ //
+ // An application may supply a custom implementation of ParseFile
+ // to change the effective file contents or the behavior of the parser,
+ // or to modify the syntax tree. For example, selectively eliminating
+ // unwanted function bodies can significantly accelerate type checking.
+ ParseFile func(fset *token.FileSet, filename string, src []byte) (*ast.File, error)
+
+ // If Tests is set, the loader includes not just the packages
+ // matching a particular pattern but also any related test packages,
+ // including test-only variants of the package and the test executable.
+ //
+ // For example, when using the go command, loading "fmt" with Tests=true
+ // returns four packages, with IDs "fmt" (the standard package),
+ // "fmt [fmt.test]" (the package as compiled for the test),
+ // "fmt_test" (the test functions from source files in package fmt_test),
+ // and "fmt.test" (the test binary).
+ //
+ // In build systems with explicit names for tests,
+ // setting Tests may have no effect.
+ Tests bool
+
+ // Overlay provides a mapping of absolute file paths to file contents.
+ // If the file with the given path already exists, the parser will use the
+ // alternative file contents provided by the map.
+ //
+ // Overlays provide incomplete support for when a given file doesn't
+ // already exist on disk. See the package doc above for more details.
+ Overlay map[string][]byte
+}
+
+// driver is the type for functions that query the build system for the
+// packages named by the patterns.
+type driver func(cfg *Config, patterns ...string) (*driverResponse, error)
+
+// driverResponse contains the results for a driver query.
+type driverResponse struct {
+ // NotHandled is returned if the request can't be handled by the current
+ // driver. If an external driver returns a response with NotHandled, the
+ // rest of the driverResponse is ignored, and go/packages will fallback
+ // to the next driver. If go/packages is extended in the future to support
+ // lists of multiple drivers, go/packages will fall back to the next driver.
+ NotHandled bool
+
+ // Sizes, if not nil, is the types.Sizes to use when type checking.
+ Sizes *types.StdSizes
+
+ // Roots is the set of package IDs that make up the root packages.
+ // We have to encode this separately because when we encode a single package
+ // we cannot know if it is one of the roots as that requires knowledge of the
+ // graph it is part of.
+ Roots []string `json:",omitempty"`
+
+ // Packages is the full set of packages in the graph.
+ // The packages are not connected into a graph.
+ // The Imports if populated will be stubs that only have their ID set.
+ // Imports will be connected and then type and syntax information added in a
+ // later pass (see refine).
+ Packages []*Package
+}
+
+// Load loads and returns the Go packages named by the given patterns.
+//
+// Config specifies loading options;
+// nil behaves the same as an empty Config.
+//
+// Load returns an error if any of the patterns was invalid
+// as defined by the underlying build system.
+// It may return an empty list of packages without an error,
+// for instance for an empty expansion of a valid wildcard.
+// Errors associated with a particular package are recorded in the
+// corresponding Package's Errors list, and do not cause Load to
+// return an error. Clients may need to handle such errors before
+// proceeding with further analysis. The PrintErrors function is
+// provided for convenient display of all errors.
+func Load(cfg *Config, patterns ...string) ([]*Package, error) {
+ l := newLoader(cfg)
+ response, err := defaultDriver(&l.Config, patterns...)
+ if err != nil {
+ return nil, err
+ }
+ l.sizes = response.Sizes
+ return l.refine(response.Roots, response.Packages...)
+}
+
+// defaultDriver is a driver that implements go/packages' fallback behavior.
+// It will try to request to an external driver, if one exists. If there's
+// no external driver, or the driver returns a response with NotHandled set,
+// defaultDriver will fall back to the go list driver.
+func defaultDriver(cfg *Config, patterns ...string) (*driverResponse, error) {
+ driver := findExternalDriver(cfg)
+ if driver == nil {
+ driver = goListDriver
+ }
+ response, err := driver(cfg, patterns...)
+ if err != nil {
+ return response, err
+ } else if response.NotHandled {
+ return goListDriver(cfg, patterns...)
+ }
+ return response, nil
+}
+
+// A Package describes a loaded Go package.
+type Package struct {
+ // ID is a unique identifier for a package,
+ // in a syntax provided by the underlying build system.
+ //
+ // Because the syntax varies based on the build system,
+ // clients should treat IDs as opaque and not attempt to
+ // interpret them.
+ ID string
+
+ // Name is the package name as it appears in the package source code.
+ Name string
+
+ // PkgPath is the package path as used by the go/types package.
+ PkgPath string
+
+ // Errors contains any errors encountered querying the metadata
+ // of the package, or while parsing or type-checking its files.
+ Errors []Error
+
+ // GoFiles lists the absolute file paths of the package's Go source files.
+ GoFiles []string
+
+ // CompiledGoFiles lists the absolute file paths of the package's source
+ // files that are suitable for type checking.
+ // This may differ from GoFiles if files are processed before compilation.
+ CompiledGoFiles []string
+
+ // OtherFiles lists the absolute file paths of the package's non-Go source files,
+ // including assembly, C, C++, Fortran, Objective-C, SWIG, and so on.
+ OtherFiles []string
+
+ // ExportFile is the absolute path to a file containing type
+ // information for the package as provided by the build system.
+ ExportFile string
+
+ // Imports maps import paths appearing in the package's Go source files
+ // to corresponding loaded Packages.
+ Imports map[string]*Package
+
+ // Types provides type information for the package.
+ // The NeedTypes LoadMode bit sets this field for packages matching the
+ // patterns; type information for dependencies may be missing or incomplete,
+ // unless NeedDeps and NeedImports are also set.
+ Types *types.Package
+
+ // Fset provides position information for Types, TypesInfo, and Syntax.
+ // It is set only when Types is set.
+ Fset *token.FileSet
+
+ // IllTyped indicates whether the package or any dependency contains errors.
+ // It is set only when Types is set.
+ IllTyped bool
+
+ // Syntax is the package's syntax trees, for the files listed in CompiledGoFiles.
+ //
+ // The NeedSyntax LoadMode bit populates this field for packages matching the patterns.
+ // If NeedDeps and NeedImports are also set, this field will also be populated
+ // for dependencies.
+ Syntax []*ast.File
+
+ // TypesInfo provides type information about the package's syntax trees.
+ // It is set only when Syntax is set.
+ TypesInfo *types.Info
+
+ // TypesSizes provides the effective size function for types in TypesInfo.
+ TypesSizes types.Sizes
+
+ // forTest is the package under test, if any.
+ forTest string
+
+ // module is the module information for the package if it exists.
+ Module *Module
+}
+
+// Module provides module information for a package.
+type Module struct {
+ Path string // module path
+ Version string // module version
+ Replace *Module // replaced by this module
+ Time *time.Time // time version was created
+ Main bool // is this the main module?
+ Indirect bool // is this module only an indirect dependency of main module?
+ Dir string // directory holding files for this module, if any
+ GoMod string // path to go.mod file used when loading this module, if any
+ GoVersion string // go version used in module
+ Error *ModuleError // error loading module
+}
+
+// ModuleError holds errors loading a module.
+type ModuleError struct {
+ Err string // the error itself
+}
+
+func init() {
+ packagesinternal.GetForTest = func(p interface{}) string {
+ return p.(*Package).forTest
+ }
+ packagesinternal.GetGoCmdRunner = func(config interface{}) *gocommand.Runner {
+ return config.(*Config).gocmdRunner
+ }
+ packagesinternal.SetGoCmdRunner = func(config interface{}, runner *gocommand.Runner) {
+ config.(*Config).gocmdRunner = runner
+ }
+ packagesinternal.TypecheckCgo = int(typecheckCgo)
+}
+
+// An Error describes a problem with a package's metadata, syntax, or types.
+type Error struct {
+ Pos string // "file:line:col" or "file:line" or "" or "-"
+ Msg string
+ Kind ErrorKind
+}
+
+// ErrorKind describes the source of the error, allowing the user to
+// differentiate between errors generated by the driver, the parser, or the
+// type-checker.
+type ErrorKind int
+
+const (
+ UnknownError ErrorKind = iota
+ ListError
+ ParseError
+ TypeError
+)
+
+func (err Error) Error() string {
+ pos := err.Pos
+ if pos == "" {
+ pos = "-" // like token.Position{}.String()
+ }
+ return pos + ": " + err.Msg
+}
+
+// flatPackage is the JSON form of Package
+// It drops all the type and syntax fields, and transforms the Imports
+//
+// TODO(adonovan): identify this struct with Package, effectively
+// publishing the JSON protocol.
+type flatPackage struct {
+ ID string
+ Name string `json:",omitempty"`
+ PkgPath string `json:",omitempty"`
+ Errors []Error `json:",omitempty"`
+ GoFiles []string `json:",omitempty"`
+ CompiledGoFiles []string `json:",omitempty"`
+ OtherFiles []string `json:",omitempty"`
+ ExportFile string `json:",omitempty"`
+ Imports map[string]string `json:",omitempty"`
+}
+
+// MarshalJSON returns the Package in its JSON form.
+// For the most part, the structure fields are written out unmodified, and
+// the type and syntax fields are skipped.
+// The imports are written out as just a map of path to package id.
+// The errors are written using a custom type that tries to preserve the
+// structure of error types we know about.
+//
+// This method exists to enable support for additional build systems. It is
+// not intended for use by clients of the API and we may change the format.
+func (p *Package) MarshalJSON() ([]byte, error) {
+ flat := &flatPackage{
+ ID: p.ID,
+ Name: p.Name,
+ PkgPath: p.PkgPath,
+ Errors: p.Errors,
+ GoFiles: p.GoFiles,
+ CompiledGoFiles: p.CompiledGoFiles,
+ OtherFiles: p.OtherFiles,
+ ExportFile: p.ExportFile,
+ }
+ if len(p.Imports) > 0 {
+ flat.Imports = make(map[string]string, len(p.Imports))
+ for path, ipkg := range p.Imports {
+ flat.Imports[path] = ipkg.ID
+ }
+ }
+ return json.Marshal(flat)
+}
+
+// UnmarshalJSON reads in a Package from its JSON format.
+// See MarshalJSON for details about the format accepted.
+func (p *Package) UnmarshalJSON(b []byte) error {
+ flat := &flatPackage{}
+ if err := json.Unmarshal(b, &flat); err != nil {
+ return err
+ }
+ *p = Package{
+ ID: flat.ID,
+ Name: flat.Name,
+ PkgPath: flat.PkgPath,
+ Errors: flat.Errors,
+ GoFiles: flat.GoFiles,
+ CompiledGoFiles: flat.CompiledGoFiles,
+ OtherFiles: flat.OtherFiles,
+ ExportFile: flat.ExportFile,
+ }
+ if len(flat.Imports) > 0 {
+ p.Imports = make(map[string]*Package, len(flat.Imports))
+ for path, id := range flat.Imports {
+ p.Imports[path] = &Package{ID: id}
+ }
+ }
+ return nil
+}
+
+func (p *Package) String() string { return p.ID }
+
+// loaderPackage augments Package with state used during the loading phase
+type loaderPackage struct {
+ *Package
+ importErrors map[string]error // maps each bad import to its error
+ loadOnce sync.Once
+ color uint8 // for cycle detection
+ needsrc bool // load from source (Mode >= LoadTypes)
+ needtypes bool // type information is either requested or depended on
+ initial bool // package was matched by a pattern
+}
+
+// loader holds the working state of a single call to load.
+type loader struct {
+ pkgs map[string]*loaderPackage
+ Config
+ sizes types.Sizes
+ parseCache map[string]*parseValue
+ parseCacheMu sync.Mutex
+ exportMu sync.Mutex // enforces mutual exclusion of exportdata operations
+
+ // Config.Mode contains the implied mode (see impliedLoadMode).
+ // Implied mode contains all the fields we need the data for.
+ // In requestedMode there are the actually requested fields.
+ // We'll zero them out before returning packages to the user.
+ // This makes it easier for us to get the conditions where
+ // we need certain modes right.
+ requestedMode LoadMode
+}
+
+type parseValue struct {
+ f *ast.File
+ err error
+ ready chan struct{}
+}
+
+func newLoader(cfg *Config) *loader {
+ ld := &loader{
+ parseCache: map[string]*parseValue{},
+ }
+ if cfg != nil {
+ ld.Config = *cfg
+ // If the user has provided a logger, use it.
+ ld.Config.Logf = cfg.Logf
+ }
+ if ld.Config.Logf == nil {
+ // If the GOPACKAGESDEBUG environment variable is set to true,
+ // but the user has not provided a logger, default to log.Printf.
+ if debug {
+ ld.Config.Logf = log.Printf
+ } else {
+ ld.Config.Logf = func(format string, args ...interface{}) {}
+ }
+ }
+ if ld.Config.Mode == 0 {
+ ld.Config.Mode = NeedName | NeedFiles | NeedCompiledGoFiles // Preserve zero behavior of Mode for backwards compatibility.
+ }
+ if ld.Config.Env == nil {
+ ld.Config.Env = os.Environ()
+ }
+ if ld.Config.gocmdRunner == nil {
+ ld.Config.gocmdRunner = &gocommand.Runner{}
+ }
+ if ld.Context == nil {
+ ld.Context = context.Background()
+ }
+ if ld.Dir == "" {
+ if dir, err := os.Getwd(); err == nil {
+ ld.Dir = dir
+ }
+ }
+
+ // Save the actually requested fields. We'll zero them out before returning packages to the user.
+ ld.requestedMode = ld.Mode
+ ld.Mode = impliedLoadMode(ld.Mode)
+
+ if ld.Mode&NeedTypes != 0 || ld.Mode&NeedSyntax != 0 {
+ if ld.Fset == nil {
+ ld.Fset = token.NewFileSet()
+ }
+
+ // ParseFile is required even in LoadTypes mode
+ // because we load source if export data is missing.
+ if ld.ParseFile == nil {
+ ld.ParseFile = func(fset *token.FileSet, filename string, src []byte) (*ast.File, error) {
+ const mode = parser.AllErrors | parser.ParseComments
+ return parser.ParseFile(fset, filename, src, mode)
+ }
+ }
+ }
+
+ return ld
+}
+
+// refine connects the supplied packages into a graph and then adds type and
+// and syntax information as requested by the LoadMode.
+func (ld *loader) refine(roots []string, list ...*Package) ([]*Package, error) {
+ rootMap := make(map[string]int, len(roots))
+ for i, root := range roots {
+ rootMap[root] = i
+ }
+ ld.pkgs = make(map[string]*loaderPackage)
+ // first pass, fixup and build the map and roots
+ var initial = make([]*loaderPackage, len(roots))
+ for _, pkg := range list {
+ rootIndex := -1
+ if i, found := rootMap[pkg.ID]; found {
+ rootIndex = i
+ }
+
+ // Overlays can invalidate export data.
+ // TODO(matloob): make this check fine-grained based on dependencies on overlaid files
+ exportDataInvalid := len(ld.Overlay) > 0 || pkg.ExportFile == "" && pkg.PkgPath != "unsafe"
+ // This package needs type information if the caller requested types and the package is
+ // either a root, or it's a non-root and the user requested dependencies ...
+ needtypes := (ld.Mode&NeedTypes|NeedTypesInfo != 0 && (rootIndex >= 0 || ld.Mode&NeedDeps != 0))
+ // This package needs source if the call requested source (or types info, which implies source)
+ // and the package is either a root, or itas a non- root and the user requested dependencies...
+ needsrc := ((ld.Mode&(NeedSyntax|NeedTypesInfo) != 0 && (rootIndex >= 0 || ld.Mode&NeedDeps != 0)) ||
+ // ... or if we need types and the exportData is invalid. We fall back to (incompletely)
+ // typechecking packages from source if they fail to compile.
+ (ld.Mode&NeedTypes|NeedTypesInfo != 0 && exportDataInvalid)) && pkg.PkgPath != "unsafe"
+ lpkg := &loaderPackage{
+ Package: pkg,
+ needtypes: needtypes,
+ needsrc: needsrc,
+ }
+ ld.pkgs[lpkg.ID] = lpkg
+ if rootIndex >= 0 {
+ initial[rootIndex] = lpkg
+ lpkg.initial = true
+ }
+ }
+ for i, root := range roots {
+ if initial[i] == nil {
+ return nil, fmt.Errorf("root package %v is missing", root)
+ }
+ }
+
+ // Materialize the import graph.
+
+ const (
+ white = 0 // new
+ grey = 1 // in progress
+ black = 2 // complete
+ )
+
+ // visit traverses the import graph, depth-first,
+ // and materializes the graph as Packages.Imports.
+ //
+ // Valid imports are saved in the Packages.Import map.
+ // Invalid imports (cycles and missing nodes) are saved in the importErrors map.
+ // Thus, even in the presence of both kinds of errors, the Import graph remains a DAG.
+ //
+ // visit returns whether the package needs src or has a transitive
+ // dependency on a package that does. These are the only packages
+ // for which we load source code.
+ var stack []*loaderPackage
+ var visit func(lpkg *loaderPackage) bool
+ var srcPkgs []*loaderPackage
+ visit = func(lpkg *loaderPackage) bool {
+ switch lpkg.color {
+ case black:
+ return lpkg.needsrc
+ case grey:
+ panic("internal error: grey node")
+ }
+ lpkg.color = grey
+ stack = append(stack, lpkg) // push
+ stubs := lpkg.Imports // the structure form has only stubs with the ID in the Imports
+ // If NeedImports isn't set, the imports fields will all be zeroed out.
+ if ld.Mode&NeedImports != 0 {
+ lpkg.Imports = make(map[string]*Package, len(stubs))
+ for importPath, ipkg := range stubs {
+ var importErr error
+ imp := ld.pkgs[ipkg.ID]
+ if imp == nil {
+ // (includes package "C" when DisableCgo)
+ importErr = fmt.Errorf("missing package: %q", ipkg.ID)
+ } else if imp.color == grey {
+ importErr = fmt.Errorf("import cycle: %s", stack)
+ }
+ if importErr != nil {
+ if lpkg.importErrors == nil {
+ lpkg.importErrors = make(map[string]error)
+ }
+ lpkg.importErrors[importPath] = importErr
+ continue
+ }
+
+ if visit(imp) {
+ lpkg.needsrc = true
+ }
+ lpkg.Imports[importPath] = imp.Package
+ }
+ }
+ if lpkg.needsrc {
+ srcPkgs = append(srcPkgs, lpkg)
+ }
+ if ld.Mode&NeedTypesSizes != 0 {
+ lpkg.TypesSizes = ld.sizes
+ }
+ stack = stack[:len(stack)-1] // pop
+ lpkg.color = black
+
+ return lpkg.needsrc
+ }
+
+ if ld.Mode&NeedImports == 0 {
+ // We do this to drop the stub import packages that we are not even going to try to resolve.
+ for _, lpkg := range initial {
+ lpkg.Imports = nil
+ }
+ } else {
+ // For each initial package, create its import DAG.
+ for _, lpkg := range initial {
+ visit(lpkg)
+ }
+ }
+ if ld.Mode&NeedImports != 0 && ld.Mode&NeedTypes != 0 {
+ for _, lpkg := range srcPkgs {
+ // Complete type information is required for the
+ // immediate dependencies of each source package.
+ for _, ipkg := range lpkg.Imports {
+ imp := ld.pkgs[ipkg.ID]
+ imp.needtypes = true
+ }
+ }
+ }
+ // Load type data and syntax if needed, starting at
+ // the initial packages (roots of the import DAG).
+ if ld.Mode&NeedTypes != 0 || ld.Mode&NeedSyntax != 0 {
+ var wg sync.WaitGroup
+ for _, lpkg := range initial {
+ wg.Add(1)
+ go func(lpkg *loaderPackage) {
+ ld.loadRecursive(lpkg)
+ wg.Done()
+ }(lpkg)
+ }
+ wg.Wait()
+ }
+
+ result := make([]*Package, len(initial))
+ for i, lpkg := range initial {
+ result[i] = lpkg.Package
+ }
+ for i := range ld.pkgs {
+ // Clear all unrequested fields, for extra de-Hyrum-ization.
+ if ld.requestedMode&NeedName == 0 {
+ ld.pkgs[i].Name = ""
+ ld.pkgs[i].PkgPath = ""
+ }
+ if ld.requestedMode&NeedFiles == 0 {
+ ld.pkgs[i].GoFiles = nil
+ ld.pkgs[i].OtherFiles = nil
+ }
+ if ld.requestedMode&NeedCompiledGoFiles == 0 {
+ ld.pkgs[i].CompiledGoFiles = nil
+ }
+ if ld.requestedMode&NeedImports == 0 {
+ ld.pkgs[i].Imports = nil
+ }
+ if ld.requestedMode&NeedExportsFile == 0 {
+ ld.pkgs[i].ExportFile = ""
+ }
+ if ld.requestedMode&NeedTypes == 0 {
+ ld.pkgs[i].Types = nil
+ ld.pkgs[i].Fset = nil
+ ld.pkgs[i].IllTyped = false
+ }
+ if ld.requestedMode&NeedSyntax == 0 {
+ ld.pkgs[i].Syntax = nil
+ }
+ if ld.requestedMode&NeedTypesInfo == 0 {
+ ld.pkgs[i].TypesInfo = nil
+ }
+ if ld.requestedMode&NeedTypesSizes == 0 {
+ ld.pkgs[i].TypesSizes = nil
+ }
+ if ld.requestedMode&NeedModule == 0 {
+ ld.pkgs[i].Module = nil
+ }
+ }
+
+ return result, nil
+}
+
+// loadRecursive loads the specified package and its dependencies,
+// recursively, in parallel, in topological order.
+// It is atomic and idempotent.
+// Precondition: ld.Mode&NeedTypes.
+func (ld *loader) loadRecursive(lpkg *loaderPackage) {
+ lpkg.loadOnce.Do(func() {
+ // Load the direct dependencies, in parallel.
+ var wg sync.WaitGroup
+ for _, ipkg := range lpkg.Imports {
+ imp := ld.pkgs[ipkg.ID]
+ wg.Add(1)
+ go func(imp *loaderPackage) {
+ ld.loadRecursive(imp)
+ wg.Done()
+ }(imp)
+ }
+ wg.Wait()
+ ld.loadPackage(lpkg)
+ })
+}
+
+// loadPackage loads the specified package.
+// It must be called only once per Package,
+// after immediate dependencies are loaded.
+// Precondition: ld.Mode & NeedTypes.
+func (ld *loader) loadPackage(lpkg *loaderPackage) {
+ if lpkg.PkgPath == "unsafe" {
+ // Fill in the blanks to avoid surprises.
+ lpkg.Types = types.Unsafe
+ lpkg.Fset = ld.Fset
+ lpkg.Syntax = []*ast.File{}
+ lpkg.TypesInfo = new(types.Info)
+ lpkg.TypesSizes = ld.sizes
+ return
+ }
+
+ // Call NewPackage directly with explicit name.
+ // This avoids skew between golist and go/types when the files'
+ // package declarations are inconsistent.
+ lpkg.Types = types.NewPackage(lpkg.PkgPath, lpkg.Name)
+ lpkg.Fset = ld.Fset
+
+ // Subtle: we populate all Types fields with an empty Package
+ // before loading export data so that export data processing
+ // never has to create a types.Package for an indirect dependency,
+ // which would then require that such created packages be explicitly
+ // inserted back into the Import graph as a final step after export data loading.
+ // The Diamond test exercises this case.
+ if !lpkg.needtypes && !lpkg.needsrc {
+ return
+ }
+ if !lpkg.needsrc {
+ ld.loadFromExportData(lpkg)
+ return // not a source package, don't get syntax trees
+ }
+
+ appendError := func(err error) {
+ // Convert various error types into the one true Error.
+ var errs []Error
+ switch err := err.(type) {
+ case Error:
+ // from driver
+ errs = append(errs, err)
+
+ case *os.PathError:
+ // from parser
+ errs = append(errs, Error{
+ Pos: err.Path + ":1",
+ Msg: err.Err.Error(),
+ Kind: ParseError,
+ })
+
+ case scanner.ErrorList:
+ // from parser
+ for _, err := range err {
+ errs = append(errs, Error{
+ Pos: err.Pos.String(),
+ Msg: err.Msg,
+ Kind: ParseError,
+ })
+ }
+
+ case types.Error:
+ // from type checker
+ errs = append(errs, Error{
+ Pos: err.Fset.Position(err.Pos).String(),
+ Msg: err.Msg,
+ Kind: TypeError,
+ })
+
+ default:
+ // unexpected impoverished error from parser?
+ errs = append(errs, Error{
+ Pos: "-",
+ Msg: err.Error(),
+ Kind: UnknownError,
+ })
+
+ // If you see this error message, please file a bug.
+ log.Printf("internal error: error %q (%T) without position", err, err)
+ }
+
+ lpkg.Errors = append(lpkg.Errors, errs...)
+ }
+
+ if ld.Config.Mode&NeedTypes != 0 && len(lpkg.CompiledGoFiles) == 0 && lpkg.ExportFile != "" {
+ // The config requested loading sources and types, but sources are missing.
+ // Add an error to the package and fall back to loading from export data.
+ appendError(Error{"-", fmt.Sprintf("sources missing for package %s", lpkg.ID), ParseError})
+ ld.loadFromExportData(lpkg)
+ return // can't get syntax trees for this package
+ }
+
+ files, errs := ld.parseFiles(lpkg.CompiledGoFiles)
+ for _, err := range errs {
+ appendError(err)
+ }
+
+ lpkg.Syntax = files
+ if ld.Config.Mode&NeedTypes == 0 {
+ return
+ }
+
+ lpkg.TypesInfo = &types.Info{
+ Types: make(map[ast.Expr]types.TypeAndValue),
+ Defs: make(map[*ast.Ident]types.Object),
+ Uses: make(map[*ast.Ident]types.Object),
+ Implicits: make(map[ast.Node]types.Object),
+ Scopes: make(map[ast.Node]*types.Scope),
+ Selections: make(map[*ast.SelectorExpr]*types.Selection),
+ }
+ lpkg.TypesSizes = ld.sizes
+
+ importer := importerFunc(func(path string) (*types.Package, error) {
+ if path == "unsafe" {
+ return types.Unsafe, nil
+ }
+
+ // The imports map is keyed by import path.
+ ipkg := lpkg.Imports[path]
+ if ipkg == nil {
+ if err := lpkg.importErrors[path]; err != nil {
+ return nil, err
+ }
+ // There was skew between the metadata and the
+ // import declarations, likely due to an edit
+ // race, or because the ParseFile feature was
+ // used to supply alternative file contents.
+ return nil, fmt.Errorf("no metadata for %s", path)
+ }
+
+ if ipkg.Types != nil && ipkg.Types.Complete() {
+ return ipkg.Types, nil
+ }
+ log.Fatalf("internal error: package %q without types was imported from %q", path, lpkg)
+ panic("unreachable")
+ })
+
+ // type-check
+ tc := &types.Config{
+ Importer: importer,
+
+ // Type-check bodies of functions only in non-initial packages.
+ // Example: for import graph A->B->C and initial packages {A,C},
+ // we can ignore function bodies in B.
+ IgnoreFuncBodies: ld.Mode&NeedDeps == 0 && !lpkg.initial,
+
+ Error: appendError,
+ Sizes: ld.sizes,
+ }
+ if (ld.Mode & typecheckCgo) != 0 {
+ if !typesinternal.SetUsesCgo(tc) {
+ appendError(Error{
+ Msg: "typecheckCgo requires Go 1.15+",
+ Kind: ListError,
+ })
+ return
+ }
+ }
+ types.NewChecker(tc, ld.Fset, lpkg.Types, lpkg.TypesInfo).Files(lpkg.Syntax)
+
+ lpkg.importErrors = nil // no longer needed
+
+ // If !Cgo, the type-checker uses FakeImportC mode, so
+ // it doesn't invoke the importer for import "C",
+ // nor report an error for the import,
+ // or for any undefined C.f reference.
+ // We must detect this explicitly and correctly
+ // mark the package as IllTyped (by reporting an error).
+ // TODO(adonovan): if these errors are annoying,
+ // we could just set IllTyped quietly.
+ if tc.FakeImportC {
+ outer:
+ for _, f := range lpkg.Syntax {
+ for _, imp := range f.Imports {
+ if imp.Path.Value == `"C"` {
+ err := types.Error{Fset: ld.Fset, Pos: imp.Pos(), Msg: `import "C" ignored`}
+ appendError(err)
+ break outer
+ }
+ }
+ }
+ }
+
+ // Record accumulated errors.
+ illTyped := len(lpkg.Errors) > 0
+ if !illTyped {
+ for _, imp := range lpkg.Imports {
+ if imp.IllTyped {
+ illTyped = true
+ break
+ }
+ }
+ }
+ lpkg.IllTyped = illTyped
+}
+
+// An importFunc is an implementation of the single-method
+// types.Importer interface based on a function value.
+type importerFunc func(path string) (*types.Package, error)
+
+func (f importerFunc) Import(path string) (*types.Package, error) { return f(path) }
+
+// We use a counting semaphore to limit
+// the number of parallel I/O calls per process.
+var ioLimit = make(chan bool, 20)
+
+func (ld *loader) parseFile(filename string) (*ast.File, error) {
+ ld.parseCacheMu.Lock()
+ v, ok := ld.parseCache[filename]
+ if ok {
+ // cache hit
+ ld.parseCacheMu.Unlock()
+ <-v.ready
+ } else {
+ // cache miss
+ v = &parseValue{ready: make(chan struct{})}
+ ld.parseCache[filename] = v
+ ld.parseCacheMu.Unlock()
+
+ var src []byte
+ for f, contents := range ld.Config.Overlay {
+ if sameFile(f, filename) {
+ src = contents
+ }
+ }
+ var err error
+ if src == nil {
+ ioLimit <- true // wait
+ src, err = ioutil.ReadFile(filename)
+ <-ioLimit // signal
+ }
+ if err != nil {
+ v.err = err
+ } else {
+ v.f, v.err = ld.ParseFile(ld.Fset, filename, src)
+ }
+
+ close(v.ready)
+ }
+ return v.f, v.err
+}
+
+// parseFiles reads and parses the Go source files and returns the ASTs
+// of the ones that could be at least partially parsed, along with a
+// list of I/O and parse errors encountered.
+//
+// Because files are scanned in parallel, the token.Pos
+// positions of the resulting ast.Files are not ordered.
+//
+func (ld *loader) parseFiles(filenames []string) ([]*ast.File, []error) {
+ var wg sync.WaitGroup
+ n := len(filenames)
+ parsed := make([]*ast.File, n)
+ errors := make([]error, n)
+ for i, file := range filenames {
+ if ld.Config.Context.Err() != nil {
+ parsed[i] = nil
+ errors[i] = ld.Config.Context.Err()
+ continue
+ }
+ wg.Add(1)
+ go func(i int, filename string) {
+ parsed[i], errors[i] = ld.parseFile(filename)
+ wg.Done()
+ }(i, file)
+ }
+ wg.Wait()
+
+ // Eliminate nils, preserving order.
+ var o int
+ for _, f := range parsed {
+ if f != nil {
+ parsed[o] = f
+ o++
+ }
+ }
+ parsed = parsed[:o]
+
+ o = 0
+ for _, err := range errors {
+ if err != nil {
+ errors[o] = err
+ o++
+ }
+ }
+ errors = errors[:o]
+
+ return parsed, errors
+}
+
+// sameFile returns true if x and y have the same basename and denote
+// the same file.
+//
+func sameFile(x, y string) bool {
+ if x == y {
+ // It could be the case that y doesn't exist.
+ // For instance, it may be an overlay file that
+ // hasn't been written to disk. To handle that case
+ // let x == y through. (We added the exact absolute path
+ // string to the CompiledGoFiles list, so the unwritten
+ // overlay case implies x==y.)
+ return true
+ }
+ if strings.EqualFold(filepath.Base(x), filepath.Base(y)) { // (optimisation)
+ if xi, err := os.Stat(x); err == nil {
+ if yi, err := os.Stat(y); err == nil {
+ return os.SameFile(xi, yi)
+ }
+ }
+ }
+ return false
+}
+
+// loadFromExportData returns type information for the specified
+// package, loading it from an export data file on the first request.
+func (ld *loader) loadFromExportData(lpkg *loaderPackage) (*types.Package, error) {
+ if lpkg.PkgPath == "" {
+ log.Fatalf("internal error: Package %s has no PkgPath", lpkg)
+ }
+
+ // Because gcexportdata.Read has the potential to create or
+ // modify the types.Package for each node in the transitive
+ // closure of dependencies of lpkg, all exportdata operations
+ // must be sequential. (Finer-grained locking would require
+ // changes to the gcexportdata API.)
+ //
+ // The exportMu lock guards the Package.Pkg field and the
+ // types.Package it points to, for each Package in the graph.
+ //
+ // Not all accesses to Package.Pkg need to be protected by exportMu:
+ // graph ordering ensures that direct dependencies of source
+ // packages are fully loaded before the importer reads their Pkg field.
+ ld.exportMu.Lock()
+ defer ld.exportMu.Unlock()
+
+ if tpkg := lpkg.Types; tpkg != nil && tpkg.Complete() {
+ return tpkg, nil // cache hit
+ }
+
+ lpkg.IllTyped = true // fail safe
+
+ if lpkg.ExportFile == "" {
+ // Errors while building export data will have been printed to stderr.
+ return nil, fmt.Errorf("no export data file")
+ }
+ f, err := os.Open(lpkg.ExportFile)
+ if err != nil {
+ return nil, err
+ }
+ defer f.Close()
+
+ // Read gc export data.
+ //
+ // We don't currently support gccgo export data because all
+ // underlying workspaces use the gc toolchain. (Even build
+ // systems that support gccgo don't use it for workspace
+ // queries.)
+ r, err := gcexportdata.NewReader(f)
+ if err != nil {
+ return nil, fmt.Errorf("reading %s: %v", lpkg.ExportFile, err)
+ }
+
+ // Build the view.
+ //
+ // The gcexportdata machinery has no concept of package ID.
+ // It identifies packages by their PkgPath, which although not
+ // globally unique is unique within the scope of one invocation
+ // of the linker, type-checker, or gcexportdata.
+ //
+ // So, we must build a PkgPath-keyed view of the global
+ // (conceptually ID-keyed) cache of packages and pass it to
+ // gcexportdata. The view must contain every existing
+ // package that might possibly be mentioned by the
+ // current package---its transitive closure.
+ //
+ // In loadPackage, we unconditionally create a types.Package for
+ // each dependency so that export data loading does not
+ // create new ones.
+ //
+ // TODO(adonovan): it would be simpler and more efficient
+ // if the export data machinery invoked a callback to
+ // get-or-create a package instead of a map.
+ //
+ view := make(map[string]*types.Package) // view seen by gcexportdata
+ seen := make(map[*loaderPackage]bool) // all visited packages
+ var visit func(pkgs map[string]*Package)
+ visit = func(pkgs map[string]*Package) {
+ for _, p := range pkgs {
+ lpkg := ld.pkgs[p.ID]
+ if !seen[lpkg] {
+ seen[lpkg] = true
+ view[lpkg.PkgPath] = lpkg.Types
+ visit(lpkg.Imports)
+ }
+ }
+ }
+ visit(lpkg.Imports)
+
+ viewLen := len(view) + 1 // adding the self package
+ // Parse the export data.
+ // (May modify incomplete packages in view but not create new ones.)
+ tpkg, err := gcexportdata.Read(r, ld.Fset, view, lpkg.PkgPath)
+ if err != nil {
+ return nil, fmt.Errorf("reading %s: %v", lpkg.ExportFile, err)
+ }
+ if viewLen != len(view) {
+ log.Fatalf("Unexpected package creation during export data loading")
+ }
+
+ lpkg.Types = tpkg
+ lpkg.IllTyped = false
+
+ return tpkg, nil
+}
+
+// impliedLoadMode returns loadMode with its dependencies.
+func impliedLoadMode(loadMode LoadMode) LoadMode {
+ if loadMode&NeedTypesInfo != 0 && loadMode&NeedImports == 0 {
+ // If NeedTypesInfo, go/packages needs to do typechecking itself so it can
+ // associate type info with the AST. To do so, we need the export data
+ // for dependencies, which means we need to ask for the direct dependencies.
+ // NeedImports is used to ask for the direct dependencies.
+ loadMode |= NeedImports
+ }
+
+ if loadMode&NeedDeps != 0 && loadMode&NeedImports == 0 {
+ // With NeedDeps we need to load at least direct dependencies.
+ // NeedImports is used to ask for the direct dependencies.
+ loadMode |= NeedImports
+ }
+
+ return loadMode
+}
+
+func usesExportData(cfg *Config) bool {
+ return cfg.Mode&NeedExportsFile != 0 || cfg.Mode&NeedTypes != 0 && cfg.Mode&NeedDeps == 0
+}
diff --git a/vendor/golang.org/x/tools/go/packages/visit.go b/vendor/golang.org/x/tools/go/packages/visit.go
new file mode 100644
index 0000000..b13cb08
--- /dev/null
+++ b/vendor/golang.org/x/tools/go/packages/visit.go
@@ -0,0 +1,55 @@
+package packages
+
+import (
+ "fmt"
+ "os"
+ "sort"
+)
+
+// Visit visits all the packages in the import graph whose roots are
+// pkgs, calling the optional pre function the first time each package
+// is encountered (preorder), and the optional post function after a
+// package's dependencies have been visited (postorder).
+// The boolean result of pre(pkg) determines whether
+// the imports of package pkg are visited.
+func Visit(pkgs []*Package, pre func(*Package) bool, post func(*Package)) {
+ seen := make(map[*Package]bool)
+ var visit func(*Package)
+ visit = func(pkg *Package) {
+ if !seen[pkg] {
+ seen[pkg] = true
+
+ if pre == nil || pre(pkg) {
+ paths := make([]string, 0, len(pkg.Imports))
+ for path := range pkg.Imports {
+ paths = append(paths, path)
+ }
+ sort.Strings(paths) // Imports is a map, this makes visit stable
+ for _, path := range paths {
+ visit(pkg.Imports[path])
+ }
+ }
+
+ if post != nil {
+ post(pkg)
+ }
+ }
+ }
+ for _, pkg := range pkgs {
+ visit(pkg)
+ }
+}
+
+// PrintErrors prints to os.Stderr the accumulated errors of all
+// packages in the import graph rooted at pkgs, dependencies first.
+// PrintErrors returns the number of errors printed.
+func PrintErrors(pkgs []*Package) int {
+ var n int
+ Visit(pkgs, nil, func(pkg *Package) {
+ for _, err := range pkg.Errors {
+ fmt.Fprintln(os.Stderr, err)
+ n++
+ }
+ })
+ return n
+}
diff --git a/vendor/golang.org/x/tools/internal/event/core/event.go b/vendor/golang.org/x/tools/internal/event/core/event.go
new file mode 100644
index 0000000..e37b494
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/event/core/event.go
@@ -0,0 +1,85 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package core provides support for event based telemetry.
+package core
+
+import (
+ "fmt"
+ "time"
+
+ "golang.org/x/tools/internal/event/label"
+)
+
+// Event holds the information about an event of note that ocurred.
+type Event struct {
+ at time.Time
+
+ // As events are often on the stack, storing the first few labels directly
+ // in the event can avoid an allocation at all for the very common cases of
+ // simple events.
+ // The length needs to be large enough to cope with the majority of events
+ // but no so large as to cause undue stack pressure.
+ // A log message with two values will use 3 labels (one for each value and
+ // one for the message itself).
+
+ static [3]label.Label // inline storage for the first few labels
+ dynamic []label.Label // dynamically sized storage for remaining labels
+}
+
+// eventLabelMap implements label.Map for a the labels of an Event.
+type eventLabelMap struct {
+ event Event
+}
+
+func (ev Event) At() time.Time { return ev.at }
+
+func (ev Event) Format(f fmt.State, r rune) {
+ if !ev.at.IsZero() {
+ fmt.Fprint(f, ev.at.Format("2006/01/02 15:04:05 "))
+ }
+ for index := 0; ev.Valid(index); index++ {
+ if l := ev.Label(index); l.Valid() {
+ fmt.Fprintf(f, "\n\t%v", l)
+ }
+ }
+}
+
+func (ev Event) Valid(index int) bool {
+ return index >= 0 && index < len(ev.static)+len(ev.dynamic)
+}
+
+func (ev Event) Label(index int) label.Label {
+ if index < len(ev.static) {
+ return ev.static[index]
+ }
+ return ev.dynamic[index-len(ev.static)]
+}
+
+func (ev Event) Find(key label.Key) label.Label {
+ for _, l := range ev.static {
+ if l.Key() == key {
+ return l
+ }
+ }
+ for _, l := range ev.dynamic {
+ if l.Key() == key {
+ return l
+ }
+ }
+ return label.Label{}
+}
+
+func MakeEvent(static [3]label.Label, labels []label.Label) Event {
+ return Event{
+ static: static,
+ dynamic: labels,
+ }
+}
+
+// CloneEvent event returns a copy of the event with the time adjusted to at.
+func CloneEvent(ev Event, at time.Time) Event {
+ ev.at = at
+ return ev
+}
diff --git a/vendor/golang.org/x/tools/internal/event/core/export.go b/vendor/golang.org/x/tools/internal/event/core/export.go
new file mode 100644
index 0000000..05f3a9a
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/event/core/export.go
@@ -0,0 +1,70 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package core
+
+import (
+ "context"
+ "sync/atomic"
+ "time"
+ "unsafe"
+
+ "golang.org/x/tools/internal/event/label"
+)
+
+// Exporter is a function that handles events.
+// It may return a modified context and event.
+type Exporter func(context.Context, Event, label.Map) context.Context
+
+var (
+ exporter unsafe.Pointer
+)
+
+// SetExporter sets the global exporter function that handles all events.
+// The exporter is called synchronously from the event call site, so it should
+// return quickly so as not to hold up user code.
+func SetExporter(e Exporter) {
+ p := unsafe.Pointer(&e)
+ if e == nil {
+ // &e is always valid, and so p is always valid, but for the early abort
+ // of ProcessEvent to be efficient it needs to make the nil check on the
+ // pointer without having to dereference it, so we make the nil function
+ // also a nil pointer
+ p = nil
+ }
+ atomic.StorePointer(&exporter, p)
+}
+
+// deliver is called to deliver an event to the supplied exporter.
+// it will fill in the time.
+func deliver(ctx context.Context, exporter Exporter, ev Event) context.Context {
+ // add the current time to the event
+ ev.at = time.Now()
+ // hand the event off to the current exporter
+ return exporter(ctx, ev, ev)
+}
+
+// Export is called to deliver an event to the global exporter if set.
+func Export(ctx context.Context, ev Event) context.Context {
+ // get the global exporter and abort early if there is not one
+ exporterPtr := (*Exporter)(atomic.LoadPointer(&exporter))
+ if exporterPtr == nil {
+ return ctx
+ }
+ return deliver(ctx, *exporterPtr, ev)
+}
+
+// ExportPair is called to deliver a start event to the supplied exporter.
+// It also returns a function that will deliver the end event to the same
+// exporter.
+// It will fill in the time.
+func ExportPair(ctx context.Context, begin, end Event) (context.Context, func()) {
+ // get the global exporter and abort early if there is not one
+ exporterPtr := (*Exporter)(atomic.LoadPointer(&exporter))
+ if exporterPtr == nil {
+ return ctx, func() {}
+ }
+ ctx = deliver(ctx, *exporterPtr, begin)
+ return ctx, func() { deliver(ctx, *exporterPtr, end) }
+}
diff --git a/vendor/golang.org/x/tools/internal/event/core/fast.go b/vendor/golang.org/x/tools/internal/event/core/fast.go
new file mode 100644
index 0000000..06c1d46
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/event/core/fast.go
@@ -0,0 +1,77 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package core
+
+import (
+ "context"
+
+ "golang.org/x/tools/internal/event/keys"
+ "golang.org/x/tools/internal/event/label"
+)
+
+// Log1 takes a message and one label delivers a log event to the exporter.
+// It is a customized version of Print that is faster and does no allocation.
+func Log1(ctx context.Context, message string, t1 label.Label) {
+ Export(ctx, MakeEvent([3]label.Label{
+ keys.Msg.Of(message),
+ t1,
+ }, nil))
+}
+
+// Log2 takes a message and two labels and delivers a log event to the exporter.
+// It is a customized version of Print that is faster and does no allocation.
+func Log2(ctx context.Context, message string, t1 label.Label, t2 label.Label) {
+ Export(ctx, MakeEvent([3]label.Label{
+ keys.Msg.Of(message),
+ t1,
+ t2,
+ }, nil))
+}
+
+// Metric1 sends a label event to the exporter with the supplied labels.
+func Metric1(ctx context.Context, t1 label.Label) context.Context {
+ return Export(ctx, MakeEvent([3]label.Label{
+ keys.Metric.New(),
+ t1,
+ }, nil))
+}
+
+// Metric2 sends a label event to the exporter with the supplied labels.
+func Metric2(ctx context.Context, t1, t2 label.Label) context.Context {
+ return Export(ctx, MakeEvent([3]label.Label{
+ keys.Metric.New(),
+ t1,
+ t2,
+ }, nil))
+}
+
+// Start1 sends a span start event with the supplied label list to the exporter.
+// It also returns a function that will end the span, which should normally be
+// deferred.
+func Start1(ctx context.Context, name string, t1 label.Label) (context.Context, func()) {
+ return ExportPair(ctx,
+ MakeEvent([3]label.Label{
+ keys.Start.Of(name),
+ t1,
+ }, nil),
+ MakeEvent([3]label.Label{
+ keys.End.New(),
+ }, nil))
+}
+
+// Start2 sends a span start event with the supplied label list to the exporter.
+// It also returns a function that will end the span, which should normally be
+// deferred.
+func Start2(ctx context.Context, name string, t1, t2 label.Label) (context.Context, func()) {
+ return ExportPair(ctx,
+ MakeEvent([3]label.Label{
+ keys.Start.Of(name),
+ t1,
+ t2,
+ }, nil),
+ MakeEvent([3]label.Label{
+ keys.End.New(),
+ }, nil))
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go b/vendor/golang.org/x/tools/internal/event/doc.go
index 6b223f9..5dc6e6b 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go
+++ b/vendor/golang.org/x/tools/internal/event/doc.go
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin,386,!go1.12
-
-package unix
-
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
+// Package event provides a set of packages that cover the main
+// concepts of telemetry in an implementation agnostic way.
+package event
diff --git a/vendor/golang.org/x/tools/internal/event/event.go b/vendor/golang.org/x/tools/internal/event/event.go
new file mode 100644
index 0000000..4d55e57
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/event/event.go
@@ -0,0 +1,127 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package event
+
+import (
+ "context"
+
+ "golang.org/x/tools/internal/event/core"
+ "golang.org/x/tools/internal/event/keys"
+ "golang.org/x/tools/internal/event/label"
+)
+
+// Exporter is a function that handles events.
+// It may return a modified context and event.
+type Exporter func(context.Context, core.Event, label.Map) context.Context
+
+// SetExporter sets the global exporter function that handles all events.
+// The exporter is called synchronously from the event call site, so it should
+// return quickly so as not to hold up user code.
+func SetExporter(e Exporter) {
+ core.SetExporter(core.Exporter(e))
+}
+
+// Log takes a message and a label list and combines them into a single event
+// before delivering them to the exporter.
+func Log(ctx context.Context, message string, labels ...label.Label) {
+ core.Export(ctx, core.MakeEvent([3]label.Label{
+ keys.Msg.Of(message),
+ }, labels))
+}
+
+// IsLog returns true if the event was built by the Log function.
+// It is intended to be used in exporters to identify the semantics of the
+// event when deciding what to do with it.
+func IsLog(ev core.Event) bool {
+ return ev.Label(0).Key() == keys.Msg
+}
+
+// Error takes a message and a label list and combines them into a single event
+// before delivering them to the exporter. It captures the error in the
+// delivered event.
+func Error(ctx context.Context, message string, err error, labels ...label.Label) {
+ core.Export(ctx, core.MakeEvent([3]label.Label{
+ keys.Msg.Of(message),
+ keys.Err.Of(err),
+ }, labels))
+}
+
+// IsError returns true if the event was built by the Error function.
+// It is intended to be used in exporters to identify the semantics of the
+// event when deciding what to do with it.
+func IsError(ev core.Event) bool {
+ return ev.Label(0).Key() == keys.Msg &&
+ ev.Label(1).Key() == keys.Err
+}
+
+// Metric sends a label event to the exporter with the supplied labels.
+func Metric(ctx context.Context, labels ...label.Label) {
+ core.Export(ctx, core.MakeEvent([3]label.Label{
+ keys.Metric.New(),
+ }, labels))
+}
+
+// IsMetric returns true if the event was built by the Metric function.
+// It is intended to be used in exporters to identify the semantics of the
+// event when deciding what to do with it.
+func IsMetric(ev core.Event) bool {
+ return ev.Label(0).Key() == keys.Metric
+}
+
+// Label sends a label event to the exporter with the supplied labels.
+func Label(ctx context.Context, labels ...label.Label) context.Context {
+ return core.Export(ctx, core.MakeEvent([3]label.Label{
+ keys.Label.New(),
+ }, labels))
+}
+
+// IsLabel returns true if the event was built by the Label function.
+// It is intended to be used in exporters to identify the semantics of the
+// event when deciding what to do with it.
+func IsLabel(ev core.Event) bool {
+ return ev.Label(0).Key() == keys.Label
+}
+
+// Start sends a span start event with the supplied label list to the exporter.
+// It also returns a function that will end the span, which should normally be
+// deferred.
+func Start(ctx context.Context, name string, labels ...label.Label) (context.Context, func()) {
+ return core.ExportPair(ctx,
+ core.MakeEvent([3]label.Label{
+ keys.Start.Of(name),
+ }, labels),
+ core.MakeEvent([3]label.Label{
+ keys.End.New(),
+ }, nil))
+}
+
+// IsStart returns true if the event was built by the Start function.
+// It is intended to be used in exporters to identify the semantics of the
+// event when deciding what to do with it.
+func IsStart(ev core.Event) bool {
+ return ev.Label(0).Key() == keys.Start
+}
+
+// IsEnd returns true if the event was built by the End function.
+// It is intended to be used in exporters to identify the semantics of the
+// event when deciding what to do with it.
+func IsEnd(ev core.Event) bool {
+ return ev.Label(0).Key() == keys.End
+}
+
+// Detach returns a context without an associated span.
+// This allows the creation of spans that are not children of the current span.
+func Detach(ctx context.Context) context.Context {
+ return core.Export(ctx, core.MakeEvent([3]label.Label{
+ keys.Detach.New(),
+ }, nil))
+}
+
+// IsDetach returns true if the event was built by the Detach function.
+// It is intended to be used in exporters to identify the semantics of the
+// event when deciding what to do with it.
+func IsDetach(ev core.Event) bool {
+ return ev.Label(0).Key() == keys.Detach
+}
diff --git a/vendor/golang.org/x/tools/internal/event/keys/keys.go b/vendor/golang.org/x/tools/internal/event/keys/keys.go
new file mode 100644
index 0000000..a02206e
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/event/keys/keys.go
@@ -0,0 +1,564 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package keys
+
+import (
+ "fmt"
+ "io"
+ "math"
+ "strconv"
+
+ "golang.org/x/tools/internal/event/label"
+)
+
+// Value represents a key for untyped values.
+type Value struct {
+ name string
+ description string
+}
+
+// New creates a new Key for untyped values.
+func New(name, description string) *Value {
+ return &Value{name: name, description: description}
+}
+
+func (k *Value) Name() string { return k.name }
+func (k *Value) Description() string { return k.description }
+
+func (k *Value) Format(w io.Writer, buf []byte, l label.Label) {
+ fmt.Fprint(w, k.From(l))
+}
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *Value) Get(lm label.Map) interface{} {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return nil
+}
+
+// From can be used to get a value from a Label.
+func (k *Value) From(t label.Label) interface{} { return t.UnpackValue() }
+
+// Of creates a new Label with this key and the supplied value.
+func (k *Value) Of(value interface{}) label.Label { return label.OfValue(k, value) }
+
+// Tag represents a key for tagging labels that have no value.
+// These are used when the existence of the label is the entire information it
+// carries, such as marking events to be of a specific kind, or from a specific
+// package.
+type Tag struct {
+ name string
+ description string
+}
+
+// NewTag creates a new Key for tagging labels.
+func NewTag(name, description string) *Tag {
+ return &Tag{name: name, description: description}
+}
+
+func (k *Tag) Name() string { return k.name }
+func (k *Tag) Description() string { return k.description }
+
+func (k *Tag) Format(w io.Writer, buf []byte, l label.Label) {}
+
+// New creates a new Label with this key.
+func (k *Tag) New() label.Label { return label.OfValue(k, nil) }
+
+// Int represents a key
+type Int struct {
+ name string
+ description string
+}
+
+// NewInt creates a new Key for int values.
+func NewInt(name, description string) *Int {
+ return &Int{name: name, description: description}
+}
+
+func (k *Int) Name() string { return k.name }
+func (k *Int) Description() string { return k.description }
+
+func (k *Int) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendInt(buf, int64(k.From(l)), 10))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *Int) Of(v int) label.Label { return label.Of64(k, uint64(v)) }
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *Int) Get(lm label.Map) int {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return 0
+}
+
+// From can be used to get a value from a Label.
+func (k *Int) From(t label.Label) int { return int(t.Unpack64()) }
+
+// Int8 represents a key
+type Int8 struct {
+ name string
+ description string
+}
+
+// NewInt8 creates a new Key for int8 values.
+func NewInt8(name, description string) *Int8 {
+ return &Int8{name: name, description: description}
+}
+
+func (k *Int8) Name() string { return k.name }
+func (k *Int8) Description() string { return k.description }
+
+func (k *Int8) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendInt(buf, int64(k.From(l)), 10))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *Int8) Of(v int8) label.Label { return label.Of64(k, uint64(v)) }
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *Int8) Get(lm label.Map) int8 {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return 0
+}
+
+// From can be used to get a value from a Label.
+func (k *Int8) From(t label.Label) int8 { return int8(t.Unpack64()) }
+
+// Int16 represents a key
+type Int16 struct {
+ name string
+ description string
+}
+
+// NewInt16 creates a new Key for int16 values.
+func NewInt16(name, description string) *Int16 {
+ return &Int16{name: name, description: description}
+}
+
+func (k *Int16) Name() string { return k.name }
+func (k *Int16) Description() string { return k.description }
+
+func (k *Int16) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendInt(buf, int64(k.From(l)), 10))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *Int16) Of(v int16) label.Label { return label.Of64(k, uint64(v)) }
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *Int16) Get(lm label.Map) int16 {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return 0
+}
+
+// From can be used to get a value from a Label.
+func (k *Int16) From(t label.Label) int16 { return int16(t.Unpack64()) }
+
+// Int32 represents a key
+type Int32 struct {
+ name string
+ description string
+}
+
+// NewInt32 creates a new Key for int32 values.
+func NewInt32(name, description string) *Int32 {
+ return &Int32{name: name, description: description}
+}
+
+func (k *Int32) Name() string { return k.name }
+func (k *Int32) Description() string { return k.description }
+
+func (k *Int32) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendInt(buf, int64(k.From(l)), 10))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *Int32) Of(v int32) label.Label { return label.Of64(k, uint64(v)) }
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *Int32) Get(lm label.Map) int32 {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return 0
+}
+
+// From can be used to get a value from a Label.
+func (k *Int32) From(t label.Label) int32 { return int32(t.Unpack64()) }
+
+// Int64 represents a key
+type Int64 struct {
+ name string
+ description string
+}
+
+// NewInt64 creates a new Key for int64 values.
+func NewInt64(name, description string) *Int64 {
+ return &Int64{name: name, description: description}
+}
+
+func (k *Int64) Name() string { return k.name }
+func (k *Int64) Description() string { return k.description }
+
+func (k *Int64) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendInt(buf, k.From(l), 10))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *Int64) Of(v int64) label.Label { return label.Of64(k, uint64(v)) }
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *Int64) Get(lm label.Map) int64 {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return 0
+}
+
+// From can be used to get a value from a Label.
+func (k *Int64) From(t label.Label) int64 { return int64(t.Unpack64()) }
+
+// UInt represents a key
+type UInt struct {
+ name string
+ description string
+}
+
+// NewUInt creates a new Key for uint values.
+func NewUInt(name, description string) *UInt {
+ return &UInt{name: name, description: description}
+}
+
+func (k *UInt) Name() string { return k.name }
+func (k *UInt) Description() string { return k.description }
+
+func (k *UInt) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendUint(buf, uint64(k.From(l)), 10))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *UInt) Of(v uint) label.Label { return label.Of64(k, uint64(v)) }
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *UInt) Get(lm label.Map) uint {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return 0
+}
+
+// From can be used to get a value from a Label.
+func (k *UInt) From(t label.Label) uint { return uint(t.Unpack64()) }
+
+// UInt8 represents a key
+type UInt8 struct {
+ name string
+ description string
+}
+
+// NewUInt8 creates a new Key for uint8 values.
+func NewUInt8(name, description string) *UInt8 {
+ return &UInt8{name: name, description: description}
+}
+
+func (k *UInt8) Name() string { return k.name }
+func (k *UInt8) Description() string { return k.description }
+
+func (k *UInt8) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendUint(buf, uint64(k.From(l)), 10))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *UInt8) Of(v uint8) label.Label { return label.Of64(k, uint64(v)) }
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *UInt8) Get(lm label.Map) uint8 {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return 0
+}
+
+// From can be used to get a value from a Label.
+func (k *UInt8) From(t label.Label) uint8 { return uint8(t.Unpack64()) }
+
+// UInt16 represents a key
+type UInt16 struct {
+ name string
+ description string
+}
+
+// NewUInt16 creates a new Key for uint16 values.
+func NewUInt16(name, description string) *UInt16 {
+ return &UInt16{name: name, description: description}
+}
+
+func (k *UInt16) Name() string { return k.name }
+func (k *UInt16) Description() string { return k.description }
+
+func (k *UInt16) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendUint(buf, uint64(k.From(l)), 10))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *UInt16) Of(v uint16) label.Label { return label.Of64(k, uint64(v)) }
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *UInt16) Get(lm label.Map) uint16 {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return 0
+}
+
+// From can be used to get a value from a Label.
+func (k *UInt16) From(t label.Label) uint16 { return uint16(t.Unpack64()) }
+
+// UInt32 represents a key
+type UInt32 struct {
+ name string
+ description string
+}
+
+// NewUInt32 creates a new Key for uint32 values.
+func NewUInt32(name, description string) *UInt32 {
+ return &UInt32{name: name, description: description}
+}
+
+func (k *UInt32) Name() string { return k.name }
+func (k *UInt32) Description() string { return k.description }
+
+func (k *UInt32) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendUint(buf, uint64(k.From(l)), 10))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *UInt32) Of(v uint32) label.Label { return label.Of64(k, uint64(v)) }
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *UInt32) Get(lm label.Map) uint32 {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return 0
+}
+
+// From can be used to get a value from a Label.
+func (k *UInt32) From(t label.Label) uint32 { return uint32(t.Unpack64()) }
+
+// UInt64 represents a key
+type UInt64 struct {
+ name string
+ description string
+}
+
+// NewUInt64 creates a new Key for uint64 values.
+func NewUInt64(name, description string) *UInt64 {
+ return &UInt64{name: name, description: description}
+}
+
+func (k *UInt64) Name() string { return k.name }
+func (k *UInt64) Description() string { return k.description }
+
+func (k *UInt64) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendUint(buf, k.From(l), 10))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *UInt64) Of(v uint64) label.Label { return label.Of64(k, v) }
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *UInt64) Get(lm label.Map) uint64 {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return 0
+}
+
+// From can be used to get a value from a Label.
+func (k *UInt64) From(t label.Label) uint64 { return t.Unpack64() }
+
+// Float32 represents a key
+type Float32 struct {
+ name string
+ description string
+}
+
+// NewFloat32 creates a new Key for float32 values.
+func NewFloat32(name, description string) *Float32 {
+ return &Float32{name: name, description: description}
+}
+
+func (k *Float32) Name() string { return k.name }
+func (k *Float32) Description() string { return k.description }
+
+func (k *Float32) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendFloat(buf, float64(k.From(l)), 'E', -1, 32))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *Float32) Of(v float32) label.Label {
+ return label.Of64(k, uint64(math.Float32bits(v)))
+}
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *Float32) Get(lm label.Map) float32 {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return 0
+}
+
+// From can be used to get a value from a Label.
+func (k *Float32) From(t label.Label) float32 {
+ return math.Float32frombits(uint32(t.Unpack64()))
+}
+
+// Float64 represents a key
+type Float64 struct {
+ name string
+ description string
+}
+
+// NewFloat64 creates a new Key for int64 values.
+func NewFloat64(name, description string) *Float64 {
+ return &Float64{name: name, description: description}
+}
+
+func (k *Float64) Name() string { return k.name }
+func (k *Float64) Description() string { return k.description }
+
+func (k *Float64) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendFloat(buf, k.From(l), 'E', -1, 64))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *Float64) Of(v float64) label.Label {
+ return label.Of64(k, math.Float64bits(v))
+}
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *Float64) Get(lm label.Map) float64 {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return 0
+}
+
+// From can be used to get a value from a Label.
+func (k *Float64) From(t label.Label) float64 {
+ return math.Float64frombits(t.Unpack64())
+}
+
+// String represents a key
+type String struct {
+ name string
+ description string
+}
+
+// NewString creates a new Key for int64 values.
+func NewString(name, description string) *String {
+ return &String{name: name, description: description}
+}
+
+func (k *String) Name() string { return k.name }
+func (k *String) Description() string { return k.description }
+
+func (k *String) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendQuote(buf, k.From(l)))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *String) Of(v string) label.Label { return label.OfString(k, v) }
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *String) Get(lm label.Map) string {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return ""
+}
+
+// From can be used to get a value from a Label.
+func (k *String) From(t label.Label) string { return t.UnpackString() }
+
+// Boolean represents a key
+type Boolean struct {
+ name string
+ description string
+}
+
+// NewBoolean creates a new Key for bool values.
+func NewBoolean(name, description string) *Boolean {
+ return &Boolean{name: name, description: description}
+}
+
+func (k *Boolean) Name() string { return k.name }
+func (k *Boolean) Description() string { return k.description }
+
+func (k *Boolean) Format(w io.Writer, buf []byte, l label.Label) {
+ w.Write(strconv.AppendBool(buf, k.From(l)))
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *Boolean) Of(v bool) label.Label {
+ if v {
+ return label.Of64(k, 1)
+ }
+ return label.Of64(k, 0)
+}
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *Boolean) Get(lm label.Map) bool {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return false
+}
+
+// From can be used to get a value from a Label.
+func (k *Boolean) From(t label.Label) bool { return t.Unpack64() > 0 }
+
+// Error represents a key
+type Error struct {
+ name string
+ description string
+}
+
+// NewError creates a new Key for int64 values.
+func NewError(name, description string) *Error {
+ return &Error{name: name, description: description}
+}
+
+func (k *Error) Name() string { return k.name }
+func (k *Error) Description() string { return k.description }
+
+func (k *Error) Format(w io.Writer, buf []byte, l label.Label) {
+ io.WriteString(w, k.From(l).Error())
+}
+
+// Of creates a new Label with this key and the supplied value.
+func (k *Error) Of(v error) label.Label { return label.OfValue(k, v) }
+
+// Get can be used to get a label for the key from a label.Map.
+func (k *Error) Get(lm label.Map) error {
+ if t := lm.Find(k); t.Valid() {
+ return k.From(t)
+ }
+ return nil
+}
+
+// From can be used to get a value from a Label.
+func (k *Error) From(t label.Label) error {
+ err, _ := t.UnpackValue().(error)
+ return err
+}
diff --git a/vendor/golang.org/x/tools/internal/event/keys/standard.go b/vendor/golang.org/x/tools/internal/event/keys/standard.go
new file mode 100644
index 0000000..7e95866
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/event/keys/standard.go
@@ -0,0 +1,22 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package keys
+
+var (
+ // Msg is a key used to add message strings to label lists.
+ Msg = NewString("message", "a readable message")
+ // Label is a key used to indicate an event adds labels to the context.
+ Label = NewTag("label", "a label context marker")
+ // Start is used for things like traces that have a name.
+ Start = NewString("start", "span start")
+ // Metric is a key used to indicate an event records metrics.
+ End = NewTag("end", "a span end marker")
+ // Metric is a key used to indicate an event records metrics.
+ Detach = NewTag("detach", "a span detach marker")
+ // Err is a key used to add error values to label lists.
+ Err = NewError("error", "an error that occurred")
+ // Metric is a key used to indicate an event records metrics.
+ Metric = NewTag("metric", "a metric event marker")
+)
diff --git a/vendor/golang.org/x/tools/internal/event/label/label.go b/vendor/golang.org/x/tools/internal/event/label/label.go
new file mode 100644
index 0000000..b55c12e
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/event/label/label.go
@@ -0,0 +1,213 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package label
+
+import (
+ "fmt"
+ "io"
+ "reflect"
+ "unsafe"
+)
+
+// Key is used as the identity of a Label.
+// Keys are intended to be compared by pointer only, the name should be unique
+// for communicating with external systems, but it is not required or enforced.
+type Key interface {
+ // Name returns the key name.
+ Name() string
+ // Description returns a string that can be used to describe the value.
+ Description() string
+
+ // Format is used in formatting to append the value of the label to the
+ // supplied buffer.
+ // The formatter may use the supplied buf as a scratch area to avoid
+ // allocations.
+ Format(w io.Writer, buf []byte, l Label)
+}
+
+// Label holds a key and value pair.
+// It is normally used when passing around lists of labels.
+type Label struct {
+ key Key
+ packed uint64
+ untyped interface{}
+}
+
+// Map is the interface to a collection of Labels indexed by key.
+type Map interface {
+ // Find returns the label that matches the supplied key.
+ Find(key Key) Label
+}
+
+// List is the interface to something that provides an iterable
+// list of labels.
+// Iteration should start from 0 and continue until Valid returns false.
+type List interface {
+ // Valid returns true if the index is within range for the list.
+ // It does not imply the label at that index will itself be valid.
+ Valid(index int) bool
+ // Label returns the label at the given index.
+ Label(index int) Label
+}
+
+// list implements LabelList for a list of Labels.
+type list struct {
+ labels []Label
+}
+
+// filter wraps a LabelList filtering out specific labels.
+type filter struct {
+ keys []Key
+ underlying List
+}
+
+// listMap implements LabelMap for a simple list of labels.
+type listMap struct {
+ labels []Label
+}
+
+// mapChain implements LabelMap for a list of underlying LabelMap.
+type mapChain struct {
+ maps []Map
+}
+
+// OfValue creates a new label from the key and value.
+// This method is for implementing new key types, label creation should
+// normally be done with the Of method of the key.
+func OfValue(k Key, value interface{}) Label { return Label{key: k, untyped: value} }
+
+// UnpackValue assumes the label was built using LabelOfValue and returns the value
+// that was passed to that constructor.
+// This method is for implementing new key types, for type safety normal
+// access should be done with the From method of the key.
+func (t Label) UnpackValue() interface{} { return t.untyped }
+
+// Of64 creates a new label from a key and a uint64. This is often
+// used for non uint64 values that can be packed into a uint64.
+// This method is for implementing new key types, label creation should
+// normally be done with the Of method of the key.
+func Of64(k Key, v uint64) Label { return Label{key: k, packed: v} }
+
+// Unpack64 assumes the label was built using LabelOf64 and returns the value that
+// was passed to that constructor.
+// This method is for implementing new key types, for type safety normal
+// access should be done with the From method of the key.
+func (t Label) Unpack64() uint64 { return t.packed }
+
+// OfString creates a new label from a key and a string.
+// This method is for implementing new key types, label creation should
+// normally be done with the Of method of the key.
+func OfString(k Key, v string) Label {
+ hdr := (*reflect.StringHeader)(unsafe.Pointer(&v))
+ return Label{
+ key: k,
+ packed: uint64(hdr.Len),
+ untyped: unsafe.Pointer(hdr.Data),
+ }
+}
+
+// UnpackString assumes the label was built using LabelOfString and returns the
+// value that was passed to that constructor.
+// This method is for implementing new key types, for type safety normal
+// access should be done with the From method of the key.
+func (t Label) UnpackString() string {
+ var v string
+ hdr := (*reflect.StringHeader)(unsafe.Pointer(&v))
+ hdr.Data = uintptr(t.untyped.(unsafe.Pointer))
+ hdr.Len = int(t.packed)
+ return *(*string)(unsafe.Pointer(hdr))
+}
+
+// Valid returns true if the Label is a valid one (it has a key).
+func (t Label) Valid() bool { return t.key != nil }
+
+// Key returns the key of this Label.
+func (t Label) Key() Key { return t.key }
+
+// Format is used for debug printing of labels.
+func (t Label) Format(f fmt.State, r rune) {
+ if !t.Valid() {
+ io.WriteString(f, `nil`)
+ return
+ }
+ io.WriteString(f, t.Key().Name())
+ io.WriteString(f, "=")
+ var buf [128]byte
+ t.Key().Format(f, buf[:0], t)
+}
+
+func (l *list) Valid(index int) bool {
+ return index >= 0 && index < len(l.labels)
+}
+
+func (l *list) Label(index int) Label {
+ return l.labels[index]
+}
+
+func (f *filter) Valid(index int) bool {
+ return f.underlying.Valid(index)
+}
+
+func (f *filter) Label(index int) Label {
+ l := f.underlying.Label(index)
+ for _, f := range f.keys {
+ if l.Key() == f {
+ return Label{}
+ }
+ }
+ return l
+}
+
+func (lm listMap) Find(key Key) Label {
+ for _, l := range lm.labels {
+ if l.Key() == key {
+ return l
+ }
+ }
+ return Label{}
+}
+
+func (c mapChain) Find(key Key) Label {
+ for _, src := range c.maps {
+ l := src.Find(key)
+ if l.Valid() {
+ return l
+ }
+ }
+ return Label{}
+}
+
+var emptyList = &list{}
+
+func NewList(labels ...Label) List {
+ if len(labels) == 0 {
+ return emptyList
+ }
+ return &list{labels: labels}
+}
+
+func Filter(l List, keys ...Key) List {
+ if len(keys) == 0 {
+ return l
+ }
+ return &filter{keys: keys, underlying: l}
+}
+
+func NewMap(labels ...Label) Map {
+ return listMap{labels: labels}
+}
+
+func MergeMaps(srcs ...Map) Map {
+ var nonNil []Map
+ for _, src := range srcs {
+ if src != nil {
+ nonNil = append(nonNil, src)
+ }
+ }
+ if len(nonNil) == 1 {
+ return nonNil[0]
+ }
+ return mapChain{maps: nonNil}
+}
diff --git a/vendor/golang.org/x/tools/internal/gocommand/invoke.go b/vendor/golang.org/x/tools/internal/gocommand/invoke.go
new file mode 100644
index 0000000..f516e17
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/gocommand/invoke.go
@@ -0,0 +1,230 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package gocommand is a helper for calling the go command.
+package gocommand
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "io"
+ "os"
+ "os/exec"
+ "regexp"
+ "strings"
+ "sync"
+ "time"
+
+ "golang.org/x/tools/internal/event"
+)
+
+// An Runner will run go command invocations and serialize
+// them if it sees a concurrency error.
+type Runner struct {
+ // once guards the runner initialization.
+ once sync.Once
+
+ // inFlight tracks available workers.
+ inFlight chan struct{}
+
+ // serialized guards the ability to run a go command serially,
+ // to avoid deadlocks when claiming workers.
+ serialized chan struct{}
+}
+
+const maxInFlight = 10
+
+func (runner *Runner) initialize() {
+ runner.once.Do(func() {
+ runner.inFlight = make(chan struct{}, maxInFlight)
+ runner.serialized = make(chan struct{}, 1)
+ })
+}
+
+// 1.13: go: updates to go.mod needed, but contents have changed
+// 1.14: go: updating go.mod: existing contents have changed since last read
+var modConcurrencyError = regexp.MustCompile(`go:.*go.mod.*contents have changed`)
+
+// Run is a convenience wrapper around RunRaw.
+// It returns only stdout and a "friendly" error.
+func (runner *Runner) Run(ctx context.Context, inv Invocation) (*bytes.Buffer, error) {
+ stdout, _, friendly, _ := runner.RunRaw(ctx, inv)
+ return stdout, friendly
+}
+
+// RunPiped runs the invocation serially, always waiting for any concurrent
+// invocations to complete first.
+func (runner *Runner) RunPiped(ctx context.Context, inv Invocation, stdout, stderr io.Writer) error {
+ _, err := runner.runPiped(ctx, inv, stdout, stderr)
+ return err
+}
+
+// RunRaw runs the invocation, serializing requests only if they fight over
+// go.mod changes.
+func (runner *Runner) RunRaw(ctx context.Context, inv Invocation) (*bytes.Buffer, *bytes.Buffer, error, error) {
+ // Make sure the runner is always initialized.
+ runner.initialize()
+
+ // First, try to run the go command concurrently.
+ stdout, stderr, friendlyErr, err := runner.runConcurrent(ctx, inv)
+
+ // If we encounter a load concurrency error, we need to retry serially.
+ if friendlyErr == nil || !modConcurrencyError.MatchString(friendlyErr.Error()) {
+ return stdout, stderr, friendlyErr, err
+ }
+ event.Error(ctx, "Load concurrency error, will retry serially", err)
+
+ // Run serially by calling runPiped.
+ stdout.Reset()
+ stderr.Reset()
+ friendlyErr, err = runner.runPiped(ctx, inv, stdout, stderr)
+ return stdout, stderr, friendlyErr, err
+}
+
+func (runner *Runner) runConcurrent(ctx context.Context, inv Invocation) (*bytes.Buffer, *bytes.Buffer, error, error) {
+ // Wait for 1 worker to become available.
+ select {
+ case <-ctx.Done():
+ return nil, nil, nil, ctx.Err()
+ case runner.inFlight <- struct{}{}:
+ defer func() { <-runner.inFlight }()
+ }
+
+ stdout, stderr := &bytes.Buffer{}, &bytes.Buffer{}
+ friendlyErr, err := inv.runWithFriendlyError(ctx, stdout, stderr)
+ return stdout, stderr, friendlyErr, err
+}
+
+func (runner *Runner) runPiped(ctx context.Context, inv Invocation, stdout, stderr io.Writer) (error, error) {
+ // Make sure the runner is always initialized.
+ runner.initialize()
+
+ // Acquire the serialization lock. This avoids deadlocks between two
+ // runPiped commands.
+ select {
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ case runner.serialized <- struct{}{}:
+ defer func() { <-runner.serialized }()
+ }
+
+ // Wait for all in-progress go commands to return before proceeding,
+ // to avoid load concurrency errors.
+ for i := 0; i < maxInFlight; i++ {
+ select {
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ case runner.inFlight <- struct{}{}:
+ // Make sure we always "return" any workers we took.
+ defer func() { <-runner.inFlight }()
+ }
+ }
+
+ return inv.runWithFriendlyError(ctx, stdout, stderr)
+}
+
+// An Invocation represents a call to the go command.
+type Invocation struct {
+ Verb string
+ Args []string
+ BuildFlags []string
+ Env []string
+ WorkingDir string
+ Logf func(format string, args ...interface{})
+}
+
+func (i *Invocation) runWithFriendlyError(ctx context.Context, stdout, stderr io.Writer) (friendlyError error, rawError error) {
+ rawError = i.run(ctx, stdout, stderr)
+ if rawError != nil {
+ friendlyError = rawError
+ // Check for 'go' executable not being found.
+ if ee, ok := rawError.(*exec.Error); ok && ee.Err == exec.ErrNotFound {
+ friendlyError = fmt.Errorf("go command required, not found: %v", ee)
+ }
+ if ctx.Err() != nil {
+ friendlyError = ctx.Err()
+ }
+ friendlyError = fmt.Errorf("err: %v: stderr: %s", friendlyError, stderr)
+ }
+ return
+}
+
+func (i *Invocation) run(ctx context.Context, stdout, stderr io.Writer) error {
+ log := i.Logf
+ if log == nil {
+ log = func(string, ...interface{}) {}
+ }
+
+ goArgs := []string{i.Verb}
+ switch i.Verb {
+ case "mod":
+ // mod needs the sub-verb before build flags.
+ goArgs = append(goArgs, i.Args[0])
+ goArgs = append(goArgs, i.BuildFlags...)
+ goArgs = append(goArgs, i.Args[1:]...)
+ case "env":
+ // env doesn't take build flags.
+ goArgs = append(goArgs, i.Args...)
+ default:
+ goArgs = append(goArgs, i.BuildFlags...)
+ goArgs = append(goArgs, i.Args...)
+ }
+ cmd := exec.Command("go", goArgs...)
+ cmd.Stdout = stdout
+ cmd.Stderr = stderr
+ // On darwin the cwd gets resolved to the real path, which breaks anything that
+ // expects the working directory to keep the original path, including the
+ // go command when dealing with modules.
+ // The Go stdlib has a special feature where if the cwd and the PWD are the
+ // same node then it trusts the PWD, so by setting it in the env for the child
+ // process we fix up all the paths returned by the go command.
+ cmd.Env = append(os.Environ(), i.Env...)
+ if i.WorkingDir != "" {
+ cmd.Env = append(cmd.Env, "PWD="+i.WorkingDir)
+ cmd.Dir = i.WorkingDir
+ }
+ defer func(start time.Time) { log("%s for %v", time.Since(start), cmdDebugStr(cmd)) }(time.Now())
+
+ return runCmdContext(ctx, cmd)
+}
+
+// runCmdContext is like exec.CommandContext except it sends os.Interrupt
+// before os.Kill.
+func runCmdContext(ctx context.Context, cmd *exec.Cmd) error {
+ if err := cmd.Start(); err != nil {
+ return err
+ }
+ resChan := make(chan error, 1)
+ go func() {
+ resChan <- cmd.Wait()
+ }()
+
+ select {
+ case err := <-resChan:
+ return err
+ case <-ctx.Done():
+ }
+ // Cancelled. Interrupt and see if it ends voluntarily.
+ cmd.Process.Signal(os.Interrupt)
+ select {
+ case err := <-resChan:
+ return err
+ case <-time.After(time.Second):
+ }
+ // Didn't shut down in response to interrupt. Kill it hard.
+ cmd.Process.Kill()
+ return <-resChan
+}
+
+func cmdDebugStr(cmd *exec.Cmd) string {
+ env := make(map[string]string)
+ for _, kv := range cmd.Env {
+ split := strings.Split(kv, "=")
+ k, v := split[0], split[1]
+ env[k] = v
+ }
+
+ return fmt.Sprintf("GOROOT=%v GOPATH=%v GO111MODULE=%v GOPROXY=%v PWD=%v go %v", env["GOROOT"], env["GOPATH"], env["GO111MODULE"], env["GOPROXY"], env["PWD"], cmd.Args)
+}
diff --git a/vendor/golang.org/x/tools/internal/gocommand/vendor.go b/vendor/golang.org/x/tools/internal/gocommand/vendor.go
new file mode 100644
index 0000000..1cd8d84
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/gocommand/vendor.go
@@ -0,0 +1,102 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package gocommand
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "os"
+ "path/filepath"
+ "regexp"
+ "strings"
+
+ "golang.org/x/mod/semver"
+)
+
+// ModuleJSON holds information about a module.
+type ModuleJSON struct {
+ Path string // module path
+ Replace *ModuleJSON // replaced by this module
+ Main bool // is this the main module?
+ Indirect bool // is this module only an indirect dependency of main module?
+ Dir string // directory holding files for this module, if any
+ GoMod string // path to go.mod file for this module, if any
+ GoVersion string // go version used in module
+}
+
+var modFlagRegexp = regexp.MustCompile(`-mod[ =](\w+)`)
+
+// VendorEnabled reports whether vendoring is enabled. It takes a *Runner to execute Go commands
+// with the supplied context.Context and Invocation. The Invocation can contain pre-defined fields,
+// of which only Verb and Args are modified to run the appropriate Go command.
+// Inspired by setDefaultBuildMod in modload/init.go
+func VendorEnabled(ctx context.Context, inv Invocation, r *Runner) (*ModuleJSON, bool, error) {
+ mainMod, go114, err := getMainModuleAnd114(ctx, inv, r)
+ if err != nil {
+ return nil, false, err
+ }
+
+ // We check the GOFLAGS to see if there is anything overridden or not.
+ inv.Verb = "env"
+ inv.Args = []string{"GOFLAGS"}
+ stdout, err := r.Run(ctx, inv)
+ if err != nil {
+ return nil, false, err
+ }
+ goflags := string(bytes.TrimSpace(stdout.Bytes()))
+ matches := modFlagRegexp.FindStringSubmatch(goflags)
+ var modFlag string
+ if len(matches) != 0 {
+ modFlag = matches[1]
+ }
+ if modFlag != "" {
+ // Don't override an explicit '-mod=' argument.
+ return mainMod, modFlag == "vendor", nil
+ }
+ if mainMod == nil || !go114 {
+ return mainMod, false, nil
+ }
+ // Check 1.14's automatic vendor mode.
+ if fi, err := os.Stat(filepath.Join(mainMod.Dir, "vendor")); err == nil && fi.IsDir() {
+ if mainMod.GoVersion != "" && semver.Compare("v"+mainMod.GoVersion, "v1.14") >= 0 {
+ // The Go version is at least 1.14, and a vendor directory exists.
+ // Set -mod=vendor by default.
+ return mainMod, true, nil
+ }
+ }
+ return mainMod, false, nil
+}
+
+// getMainModuleAnd114 gets the main module's information and whether the
+// go command in use is 1.14+. This is the information needed to figure out
+// if vendoring should be enabled.
+func getMainModuleAnd114(ctx context.Context, inv Invocation, r *Runner) (*ModuleJSON, bool, error) {
+ const format = `{{.Path}}
+{{.Dir}}
+{{.GoMod}}
+{{.GoVersion}}
+{{range context.ReleaseTags}}{{if eq . "go1.14"}}{{.}}{{end}}{{end}}
+`
+ inv.Verb = "list"
+ inv.Args = []string{"-m", "-f", format}
+ stdout, err := r.Run(ctx, inv)
+ if err != nil {
+ return nil, false, err
+ }
+
+ lines := strings.Split(stdout.String(), "\n")
+ if len(lines) < 5 {
+ return nil, false, fmt.Errorf("unexpected stdout: %q", stdout.String())
+ }
+ mod := &ModuleJSON{
+ Path: lines[0],
+ Dir: lines[1],
+ GoMod: lines[2],
+ GoVersion: lines[3],
+ Main: true,
+ }
+ return mod, lines[4] == "go1.14", nil
+}
diff --git a/vendor/golang.org/x/tools/internal/packagesinternal/packages.go b/vendor/golang.org/x/tools/internal/packagesinternal/packages.go
new file mode 100644
index 0000000..2c4527f
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/packagesinternal/packages.go
@@ -0,0 +1,14 @@
+// Package packagesinternal exposes internal-only fields from go/packages.
+package packagesinternal
+
+import (
+ "golang.org/x/tools/internal/gocommand"
+)
+
+var GetForTest = func(p interface{}) string { return "" }
+
+var GetGoCmdRunner = func(config interface{}) *gocommand.Runner { return nil }
+
+var SetGoCmdRunner = func(config interface{}, runner *gocommand.Runner) {}
+
+var TypecheckCgo int
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/types.go b/vendor/golang.org/x/tools/internal/typesinternal/types.go
new file mode 100644
index 0000000..a5bb408
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/typesinternal/types.go
@@ -0,0 +1,28 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package typesinternal
+
+import (
+ "go/types"
+ "reflect"
+ "unsafe"
+)
+
+func SetUsesCgo(conf *types.Config) bool {
+ v := reflect.ValueOf(conf).Elem()
+
+ f := v.FieldByName("go115UsesCgo")
+ if !f.IsValid() {
+ f = v.FieldByName("UsesCgo")
+ if !f.IsValid() {
+ return false
+ }
+ }
+
+ addr := unsafe.Pointer(f.UnsafeAddr())
+ *(*bool)(addr) = true
+
+ return true
+}
diff --git a/vendor/golang.org/x/xerrors/LICENSE b/vendor/golang.org/x/xerrors/LICENSE
new file mode 100644
index 0000000..e4a47e1
--- /dev/null
+++ b/vendor/golang.org/x/xerrors/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2019 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/golang.org/x/xerrors/PATENTS b/vendor/golang.org/x/xerrors/PATENTS
new file mode 100644
index 0000000..7330990
--- /dev/null
+++ b/vendor/golang.org/x/xerrors/PATENTS
@@ -0,0 +1,22 @@
+Additional IP Rights Grant (Patents)
+
+"This implementation" means the copyrightable works distributed by
+Google as part of the Go project.
+
+Google hereby grants to You a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable (except as stated in this section)
+patent license to make, have made, use, offer to sell, sell, import,
+transfer and otherwise run, modify and propagate the contents of this
+implementation of Go, where such license applies only to those patent
+claims, both currently owned or controlled by Google and acquired in
+the future, licensable by Google that are necessarily infringed by this
+implementation of Go. This grant does not include claims that would be
+infringed only as a consequence of further modification of this
+implementation. If you or your agent or exclusive licensee institute or
+order or agree to the institution of patent litigation against any
+entity (including a cross-claim or counterclaim in a lawsuit) alleging
+that this implementation of Go or any code incorporated within this
+implementation of Go constitutes direct or contributory patent
+infringement, or inducement of patent infringement, then any patent
+rights granted to you under this License for this implementation of Go
+shall terminate as of the date such litigation is filed.
diff --git a/vendor/golang.org/x/xerrors/README b/vendor/golang.org/x/xerrors/README
new file mode 100644
index 0000000..aac7867
--- /dev/null
+++ b/vendor/golang.org/x/xerrors/README
@@ -0,0 +1,2 @@
+This repository holds the transition packages for the new Go 1.13 error values.
+See golang.org/design/29934-error-values.
diff --git a/vendor/golang.org/x/xerrors/adaptor.go b/vendor/golang.org/x/xerrors/adaptor.go
new file mode 100644
index 0000000..4317f24
--- /dev/null
+++ b/vendor/golang.org/x/xerrors/adaptor.go
@@ -0,0 +1,193 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package xerrors
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "reflect"
+ "strconv"
+)
+
+// FormatError calls the FormatError method of f with an errors.Printer
+// configured according to s and verb, and writes the result to s.
+func FormatError(f Formatter, s fmt.State, verb rune) {
+ // Assuming this function is only called from the Format method, and given
+ // that FormatError takes precedence over Format, it cannot be called from
+ // any package that supports errors.Formatter. It is therefore safe to
+ // disregard that State may be a specific printer implementation and use one
+ // of our choice instead.
+
+ // limitations: does not support printing error as Go struct.
+
+ var (
+ sep = " " // separator before next error
+ p = &state{State: s}
+ direct = true
+ )
+
+ var err error = f
+
+ switch verb {
+ // Note that this switch must match the preference order
+ // for ordinary string printing (%#v before %+v, and so on).
+
+ case 'v':
+ if s.Flag('#') {
+ if stringer, ok := err.(fmt.GoStringer); ok {
+ io.WriteString(&p.buf, stringer.GoString())
+ goto exit
+ }
+ // proceed as if it were %v
+ } else if s.Flag('+') {
+ p.printDetail = true
+ sep = "\n - "
+ }
+ case 's':
+ case 'q', 'x', 'X':
+ // Use an intermediate buffer in the rare cases that precision,
+ // truncation, or one of the alternative verbs (q, x, and X) are
+ // specified.
+ direct = false
+
+ default:
+ p.buf.WriteString("%!")
+ p.buf.WriteRune(verb)
+ p.buf.WriteByte('(')
+ switch {
+ case err != nil:
+ p.buf.WriteString(reflect.TypeOf(f).String())
+ default:
+ p.buf.WriteString("<nil>")
+ }
+ p.buf.WriteByte(')')
+ io.Copy(s, &p.buf)
+ return
+ }
+
+loop:
+ for {
+ switch v := err.(type) {
+ case Formatter:
+ err = v.FormatError((*printer)(p))
+ case fmt.Formatter:
+ v.Format(p, 'v')
+ break loop
+ default:
+ io.WriteString(&p.buf, v.Error())
+ break loop
+ }
+ if err == nil {
+ break
+ }
+ if p.needColon || !p.printDetail {
+ p.buf.WriteByte(':')
+ p.needColon = false
+ }
+ p.buf.WriteString(sep)
+ p.inDetail = false
+ p.needNewline = false
+ }
+
+exit:
+ width, okW := s.Width()
+ prec, okP := s.Precision()
+
+ if !direct || (okW && width > 0) || okP {
+ // Construct format string from State s.
+ format := []byte{'%'}
+ if s.Flag('-') {
+ format = append(format, '-')
+ }
+ if s.Flag('+') {
+ format = append(format, '+')
+ }
+ if s.Flag(' ') {
+ format = append(format, ' ')
+ }
+ if okW {
+ format = strconv.AppendInt(format, int64(width), 10)
+ }
+ if okP {
+ format = append(format, '.')
+ format = strconv.AppendInt(format, int64(prec), 10)
+ }
+ format = append(format, string(verb)...)
+ fmt.Fprintf(s, string(format), p.buf.String())
+ } else {
+ io.Copy(s, &p.buf)
+ }
+}
+
+var detailSep = []byte("\n ")
+
+// state tracks error printing state. It implements fmt.State.
+type state struct {
+ fmt.State
+ buf bytes.Buffer
+
+ printDetail bool
+ inDetail bool
+ needColon bool
+ needNewline bool
+}
+
+func (s *state) Write(b []byte) (n int, err error) {
+ if s.printDetail {
+ if len(b) == 0 {
+ return 0, nil
+ }
+ if s.inDetail && s.needColon {
+ s.needNewline = true
+ if b[0] == '\n' {
+ b = b[1:]
+ }
+ }
+ k := 0
+ for i, c := range b {
+ if s.needNewline {
+ if s.inDetail && s.needColon {
+ s.buf.WriteByte(':')
+ s.needColon = false
+ }
+ s.buf.Write(detailSep)
+ s.needNewline = false
+ }
+ if c == '\n' {
+ s.buf.Write(b[k:i])
+ k = i + 1
+ s.needNewline = true
+ }
+ }
+ s.buf.Write(b[k:])
+ if !s.inDetail {
+ s.needColon = true
+ }
+ } else if !s.inDetail {
+ s.buf.Write(b)
+ }
+ return len(b), nil
+}
+
+// printer wraps a state to implement an xerrors.Printer.
+type printer state
+
+func (s *printer) Print(args ...interface{}) {
+ if !s.inDetail || s.printDetail {
+ fmt.Fprint((*state)(s), args...)
+ }
+}
+
+func (s *printer) Printf(format string, args ...interface{}) {
+ if !s.inDetail || s.printDetail {
+ fmt.Fprintf((*state)(s), format, args...)
+ }
+}
+
+func (s *printer) Detail() bool {
+ s.inDetail = true
+ return s.printDetail
+}
diff --git a/vendor/golang.org/x/xerrors/codereview.cfg b/vendor/golang.org/x/xerrors/codereview.cfg
new file mode 100644
index 0000000..3f8b14b
--- /dev/null
+++ b/vendor/golang.org/x/xerrors/codereview.cfg
@@ -0,0 +1 @@
+issuerepo: golang/go
diff --git a/vendor/golang.org/x/xerrors/doc.go b/vendor/golang.org/x/xerrors/doc.go
new file mode 100644
index 0000000..eef99d9
--- /dev/null
+++ b/vendor/golang.org/x/xerrors/doc.go
@@ -0,0 +1,22 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package xerrors implements functions to manipulate errors.
+//
+// This package is based on the Go 2 proposal for error values:
+// https://golang.org/design/29934-error-values
+//
+// These functions were incorporated into the standard library's errors package
+// in Go 1.13:
+// - Is
+// - As
+// - Unwrap
+//
+// Also, Errorf's %w verb was incorporated into fmt.Errorf.
+//
+// Use this package to get equivalent behavior in all supported Go versions.
+//
+// No other features of this package were included in Go 1.13, and at present
+// there are no plans to include any of them.
+package xerrors // import "golang.org/x/xerrors"
diff --git a/vendor/golang.org/x/xerrors/errors.go b/vendor/golang.org/x/xerrors/errors.go
new file mode 100644
index 0000000..e88d377
--- /dev/null
+++ b/vendor/golang.org/x/xerrors/errors.go
@@ -0,0 +1,33 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package xerrors
+
+import "fmt"
+
+// errorString is a trivial implementation of error.
+type errorString struct {
+ s string
+ frame Frame
+}
+
+// New returns an error that formats as the given text.
+//
+// The returned error contains a Frame set to the caller's location and
+// implements Formatter to show this information when printed with details.
+func New(text string) error {
+ return &errorString{text, Caller(1)}
+}
+
+func (e *errorString) Error() string {
+ return e.s
+}
+
+func (e *errorString) Format(s fmt.State, v rune) { FormatError(e, s, v) }
+
+func (e *errorString) FormatError(p Printer) (next error) {
+ p.Print(e.s)
+ e.frame.Format(p)
+ return nil
+}
diff --git a/vendor/golang.org/x/xerrors/fmt.go b/vendor/golang.org/x/xerrors/fmt.go
new file mode 100644
index 0000000..829862d
--- /dev/null
+++ b/vendor/golang.org/x/xerrors/fmt.go
@@ -0,0 +1,187 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package xerrors
+
+import (
+ "fmt"
+ "strings"
+ "unicode"
+ "unicode/utf8"
+
+ "golang.org/x/xerrors/internal"
+)
+
+const percentBangString = "%!"
+
+// Errorf formats according to a format specifier and returns the string as a
+// value that satisfies error.
+//
+// The returned error includes the file and line number of the caller when
+// formatted with additional detail enabled. If the last argument is an error
+// the returned error's Format method will return it if the format string ends
+// with ": %s", ": %v", or ": %w". If the last argument is an error and the
+// format string ends with ": %w", the returned error implements an Unwrap
+// method returning it.
+//
+// If the format specifier includes a %w verb with an error operand in a
+// position other than at the end, the returned error will still implement an
+// Unwrap method returning the operand, but the error's Format method will not
+// return the wrapped error.
+//
+// It is invalid to include more than one %w verb or to supply it with an
+// operand that does not implement the error interface. The %w verb is otherwise
+// a synonym for %v.
+func Errorf(format string, a ...interface{}) error {
+ format = formatPlusW(format)
+ // Support a ": %[wsv]" suffix, which works well with xerrors.Formatter.
+ wrap := strings.HasSuffix(format, ": %w")
+ idx, format2, ok := parsePercentW(format)
+ percentWElsewhere := !wrap && idx >= 0
+ if !percentWElsewhere && (wrap || strings.HasSuffix(format, ": %s") || strings.HasSuffix(format, ": %v")) {
+ err := errorAt(a, len(a)-1)
+ if err == nil {
+ return &noWrapError{fmt.Sprintf(format, a...), nil, Caller(1)}
+ }
+ // TODO: this is not entirely correct. The error value could be
+ // printed elsewhere in format if it mixes numbered with unnumbered
+ // substitutions. With relatively small changes to doPrintf we can
+ // have it optionally ignore extra arguments and pass the argument
+ // list in its entirety.
+ msg := fmt.Sprintf(format[:len(format)-len(": %s")], a[:len(a)-1]...)
+ frame := Frame{}
+ if internal.EnableTrace {
+ frame = Caller(1)
+ }
+ if wrap {
+ return &wrapError{msg, err, frame}
+ }
+ return &noWrapError{msg, err, frame}
+ }
+ // Support %w anywhere.
+ // TODO: don't repeat the wrapped error's message when %w occurs in the middle.
+ msg := fmt.Sprintf(format2, a...)
+ if idx < 0 {
+ return &noWrapError{msg, nil, Caller(1)}
+ }
+ err := errorAt(a, idx)
+ if !ok || err == nil {
+ // Too many %ws or argument of %w is not an error. Approximate the Go
+ // 1.13 fmt.Errorf message.
+ return &noWrapError{fmt.Sprintf("%sw(%s)", percentBangString, msg), nil, Caller(1)}
+ }
+ frame := Frame{}
+ if internal.EnableTrace {
+ frame = Caller(1)
+ }
+ return &wrapError{msg, err, frame}
+}
+
+func errorAt(args []interface{}, i int) error {
+ if i < 0 || i >= len(args) {
+ return nil
+ }
+ err, ok := args[i].(error)
+ if !ok {
+ return nil
+ }
+ return err
+}
+
+// formatPlusW is used to avoid the vet check that will barf at %w.
+func formatPlusW(s string) string {
+ return s
+}
+
+// Return the index of the only %w in format, or -1 if none.
+// Also return a rewritten format string with %w replaced by %v, and
+// false if there is more than one %w.
+// TODO: handle "%[N]w".
+func parsePercentW(format string) (idx int, newFormat string, ok bool) {
+ // Loosely copied from golang.org/x/tools/go/analysis/passes/printf/printf.go.
+ idx = -1
+ ok = true
+ n := 0
+ sz := 0
+ var isW bool
+ for i := 0; i < len(format); i += sz {
+ if format[i] != '%' {
+ sz = 1
+ continue
+ }
+ // "%%" is not a format directive.
+ if i+1 < len(format) && format[i+1] == '%' {
+ sz = 2
+ continue
+ }
+ sz, isW = parsePrintfVerb(format[i:])
+ if isW {
+ if idx >= 0 {
+ ok = false
+ } else {
+ idx = n
+ }
+ // "Replace" the last character, the 'w', with a 'v'.
+ p := i + sz - 1
+ format = format[:p] + "v" + format[p+1:]
+ }
+ n++
+ }
+ return idx, format, ok
+}
+
+// Parse the printf verb starting with a % at s[0].
+// Return how many bytes it occupies and whether the verb is 'w'.
+func parsePrintfVerb(s string) (int, bool) {
+ // Assume only that the directive is a sequence of non-letters followed by a single letter.
+ sz := 0
+ var r rune
+ for i := 1; i < len(s); i += sz {
+ r, sz = utf8.DecodeRuneInString(s[i:])
+ if unicode.IsLetter(r) {
+ return i + sz, r == 'w'
+ }
+ }
+ return len(s), false
+}
+
+type noWrapError struct {
+ msg string
+ err error
+ frame Frame
+}
+
+func (e *noWrapError) Error() string {
+ return fmt.Sprint(e)
+}
+
+func (e *noWrapError) Format(s fmt.State, v rune) { FormatError(e, s, v) }
+
+func (e *noWrapError) FormatError(p Printer) (next error) {
+ p.Print(e.msg)
+ e.frame.Format(p)
+ return e.err
+}
+
+type wrapError struct {
+ msg string
+ err error
+ frame Frame
+}
+
+func (e *wrapError) Error() string {
+ return fmt.Sprint(e)
+}
+
+func (e *wrapError) Format(s fmt.State, v rune) { FormatError(e, s, v) }
+
+func (e *wrapError) FormatError(p Printer) (next error) {
+ p.Print(e.msg)
+ e.frame.Format(p)
+ return e.err
+}
+
+func (e *wrapError) Unwrap() error {
+ return e.err
+}
diff --git a/vendor/golang.org/x/xerrors/format.go b/vendor/golang.org/x/xerrors/format.go
new file mode 100644
index 0000000..1bc9c26
--- /dev/null
+++ b/vendor/golang.org/x/xerrors/format.go
@@ -0,0 +1,34 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package xerrors
+
+// A Formatter formats error messages.
+type Formatter interface {
+ error
+
+ // FormatError prints the receiver's first error and returns the next error in
+ // the error chain, if any.
+ FormatError(p Printer) (next error)
+}
+
+// A Printer formats error messages.
+//
+// The most common implementation of Printer is the one provided by package fmt
+// during Printf (as of Go 1.13). Localization packages such as golang.org/x/text/message
+// typically provide their own implementations.
+type Printer interface {
+ // Print appends args to the message output.
+ Print(args ...interface{})
+
+ // Printf writes a formatted string.
+ Printf(format string, args ...interface{})
+
+ // Detail reports whether error detail is requested.
+ // After the first call to Detail, all text written to the Printer
+ // is formatted as additional detail, or ignored when
+ // detail has not been requested.
+ // If Detail returns false, the caller can avoid printing the detail at all.
+ Detail() bool
+}
diff --git a/vendor/golang.org/x/xerrors/frame.go b/vendor/golang.org/x/xerrors/frame.go
new file mode 100644
index 0000000..0de628e
--- /dev/null
+++ b/vendor/golang.org/x/xerrors/frame.go
@@ -0,0 +1,56 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package xerrors
+
+import (
+ "runtime"
+)
+
+// A Frame contains part of a call stack.
+type Frame struct {
+ // Make room for three PCs: the one we were asked for, what it called,
+ // and possibly a PC for skipPleaseUseCallersFrames. See:
+ // https://go.googlesource.com/go/+/032678e0fb/src/runtime/extern.go#169
+ frames [3]uintptr
+}
+
+// Caller returns a Frame that describes a frame on the caller's stack.
+// The argument skip is the number of frames to skip over.
+// Caller(0) returns the frame for the caller of Caller.
+func Caller(skip int) Frame {
+ var s Frame
+ runtime.Callers(skip+1, s.frames[:])
+ return s
+}
+
+// location reports the file, line, and function of a frame.
+//
+// The returned function may be "" even if file and line are not.
+func (f Frame) location() (function, file string, line int) {
+ frames := runtime.CallersFrames(f.frames[:])
+ if _, ok := frames.Next(); !ok {
+ return "", "", 0
+ }
+ fr, ok := frames.Next()
+ if !ok {
+ return "", "", 0
+ }
+ return fr.Function, fr.File, fr.Line
+}
+
+// Format prints the stack as error detail.
+// It should be called from an error's Format implementation
+// after printing any other error detail.
+func (f Frame) Format(p Printer) {
+ if p.Detail() {
+ function, file, line := f.location()
+ if function != "" {
+ p.Printf("%s\n ", function)
+ }
+ if file != "" {
+ p.Printf("%s:%d\n", file, line)
+ }
+ }
+}
diff --git a/vendor/golang.org/x/xerrors/go.mod b/vendor/golang.org/x/xerrors/go.mod
new file mode 100644
index 0000000..870d4f6
--- /dev/null
+++ b/vendor/golang.org/x/xerrors/go.mod
@@ -0,0 +1,3 @@
+module golang.org/x/xerrors
+
+go 1.11
diff --git a/vendor/golang.org/x/xerrors/internal/internal.go b/vendor/golang.org/x/xerrors/internal/internal.go
new file mode 100644
index 0000000..89f4eca
--- /dev/null
+++ b/vendor/golang.org/x/xerrors/internal/internal.go
@@ -0,0 +1,8 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package internal
+
+// EnableTrace indicates whether stack information should be recorded in errors.
+var EnableTrace = true
diff --git a/vendor/golang.org/x/xerrors/wrap.go b/vendor/golang.org/x/xerrors/wrap.go
new file mode 100644
index 0000000..9a3b510
--- /dev/null
+++ b/vendor/golang.org/x/xerrors/wrap.go
@@ -0,0 +1,106 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package xerrors
+
+import (
+ "reflect"
+)
+
+// A Wrapper provides context around another error.
+type Wrapper interface {
+ // Unwrap returns the next error in the error chain.
+ // If there is no next error, Unwrap returns nil.
+ Unwrap() error
+}
+
+// Opaque returns an error with the same error formatting as err
+// but that does not match err and cannot be unwrapped.
+func Opaque(err error) error {
+ return noWrapper{err}
+}
+
+type noWrapper struct {
+ error
+}
+
+func (e noWrapper) FormatError(p Printer) (next error) {
+ if f, ok := e.error.(Formatter); ok {
+ return f.FormatError(p)
+ }
+ p.Print(e.error)
+ return nil
+}
+
+// Unwrap returns the result of calling the Unwrap method on err, if err implements
+// Unwrap. Otherwise, Unwrap returns nil.
+func Unwrap(err error) error {
+ u, ok := err.(Wrapper)
+ if !ok {
+ return nil
+ }
+ return u.Unwrap()
+}
+
+// Is reports whether any error in err's chain matches target.
+//
+// An error is considered to match a target if it is equal to that target or if
+// it implements a method Is(error) bool such that Is(target) returns true.
+func Is(err, target error) bool {
+ if target == nil {
+ return err == target
+ }
+
+ isComparable := reflect.TypeOf(target).Comparable()
+ for {
+ if isComparable && err == target {
+ return true
+ }
+ if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) {
+ return true
+ }
+ // TODO: consider supporing target.Is(err). This would allow
+ // user-definable predicates, but also may allow for coping with sloppy
+ // APIs, thereby making it easier to get away with them.
+ if err = Unwrap(err); err == nil {
+ return false
+ }
+ }
+}
+
+// As finds the first error in err's chain that matches the type to which target
+// points, and if so, sets the target to its value and returns true. An error
+// matches a type if it is assignable to the target type, or if it has a method
+// As(interface{}) bool such that As(target) returns true. As will panic if target
+// is not a non-nil pointer to a type which implements error or is of interface type.
+//
+// The As method should set the target to its value and return true if err
+// matches the type to which target points.
+func As(err error, target interface{}) bool {
+ if target == nil {
+ panic("errors: target cannot be nil")
+ }
+ val := reflect.ValueOf(target)
+ typ := val.Type()
+ if typ.Kind() != reflect.Ptr || val.IsNil() {
+ panic("errors: target must be a non-nil pointer")
+ }
+ if e := typ.Elem(); e.Kind() != reflect.Interface && !e.Implements(errorType) {
+ panic("errors: *target must be interface or implement error")
+ }
+ targetType := typ.Elem()
+ for err != nil {
+ if reflect.TypeOf(err).AssignableTo(targetType) {
+ val.Elem().Set(reflect.ValueOf(err))
+ return true
+ }
+ if x, ok := err.(interface{ As(interface{}) bool }); ok && x.As(target) {
+ return true
+ }
+ err = Unwrap(err)
+ }
+ return false
+}
+
+var errorType = reflect.TypeOf((*error)(nil)).Elem()
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 0b4e9d2..b69974e 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,6 +1,16 @@
# 0xacab.org/leap/shapeshifter v0.0.0-20191029173606-85d3e8ac43e2
## explicit
0xacab.org/leap/shapeshifter
+# git.torproject.org/pluggable-transports/goptlib.git v1.1.0
+## explicit
+git.torproject.org/pluggable-transports/goptlib.git
+# git.torproject.org/pluggable-transports/snowflake.git v1.1.0
+## explicit
+git.torproject.org/pluggable-transports/snowflake.git/common/encapsulation
+git.torproject.org/pluggable-transports/snowflake.git/common/nat
+git.torproject.org/pluggable-transports/snowflake.git/common/safelog
+git.torproject.org/pluggable-transports/snowflake.git/common/turbotunnel
+git.torproject.org/pluggable-transports/snowflake.git/common/util
# github.com/OperatorFoundation/obfs4 v0.0.0-20161108041644-17f2cb99c264
## explicit
github.com/OperatorFoundation/obfs4/common/csrand
@@ -26,9 +36,23 @@ github.com/agl/ed25519/extra25519
## explicit
github.com/apparentlymart/go-openvpn-mgmt/demux
github.com/apparentlymart/go-openvpn-mgmt/openvpn
+# github.com/cretz/bine v0.2.0
+## explicit
+github.com/cretz/bine/control
+github.com/cretz/bine/process
+github.com/cretz/bine/tor
+github.com/cretz/bine/torutil
+github.com/cretz/bine/torutil/ed25519
+github.com/cretz/bine/torutil/ed25519/internal/edwards25519
# github.com/dchest/siphash v1.2.1
## explicit
github.com/dchest/siphash
+# github.com/google/uuid v1.2.0
+github.com/google/uuid
+# github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1
+github.com/gopherjs/gopherjs/js
+# github.com/jtolds/gls v4.20.0+incompatible
+github.com/jtolds/gls
# github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
## explicit
github.com/kardianos/osext
@@ -36,29 +60,157 @@ github.com/kardianos/osext
## explicit
github.com/keybase/go-ps
github.com/keybase/go-ps/darwincgo
+# github.com/klauspost/cpuid v1.3.1
+github.com/klauspost/cpuid
+# github.com/klauspost/reedsolomon v1.9.9
+github.com/klauspost/reedsolomon
+# github.com/mmcloughlin/avo v0.0.0-20200803215136-443f81d77104
+github.com/mmcloughlin/avo/attr
+github.com/mmcloughlin/avo/build
+github.com/mmcloughlin/avo/buildtags
+github.com/mmcloughlin/avo/gotypes
+github.com/mmcloughlin/avo/internal/prnt
+github.com/mmcloughlin/avo/internal/stack
+github.com/mmcloughlin/avo/ir
+github.com/mmcloughlin/avo/operand
+github.com/mmcloughlin/avo/pass
+github.com/mmcloughlin/avo/printer
+github.com/mmcloughlin/avo/reg
+github.com/mmcloughlin/avo/src
+github.com/mmcloughlin/avo/x86
+# github.com/pion/datachannel v1.4.21
+github.com/pion/datachannel
+# github.com/pion/dtls/v2 v2.0.8
+github.com/pion/dtls/v2
+github.com/pion/dtls/v2/internal/ciphersuite
+github.com/pion/dtls/v2/internal/closer
+github.com/pion/dtls/v2/internal/util
+github.com/pion/dtls/v2/pkg/crypto/ccm
+github.com/pion/dtls/v2/pkg/crypto/ciphersuite
+github.com/pion/dtls/v2/pkg/crypto/clientcertificate
+github.com/pion/dtls/v2/pkg/crypto/elliptic
+github.com/pion/dtls/v2/pkg/crypto/fingerprint
+github.com/pion/dtls/v2/pkg/crypto/hash
+github.com/pion/dtls/v2/pkg/crypto/prf
+github.com/pion/dtls/v2/pkg/crypto/signature
+github.com/pion/dtls/v2/pkg/crypto/signaturehash
+github.com/pion/dtls/v2/pkg/protocol
+github.com/pion/dtls/v2/pkg/protocol/alert
+github.com/pion/dtls/v2/pkg/protocol/extension
+github.com/pion/dtls/v2/pkg/protocol/handshake
+github.com/pion/dtls/v2/pkg/protocol/recordlayer
+# github.com/pion/ice/v2 v2.0.15
+github.com/pion/ice/v2
+# github.com/pion/interceptor v0.0.10
+github.com/pion/interceptor
+github.com/pion/interceptor/pkg/nack
+github.com/pion/interceptor/pkg/report
+# github.com/pion/logging v0.2.2
+github.com/pion/logging
+# github.com/pion/mdns v0.0.4
+github.com/pion/mdns
+# github.com/pion/randutil v0.1.0
+github.com/pion/randutil
+# github.com/pion/rtcp v1.2.6
+github.com/pion/rtcp
+# github.com/pion/rtp v1.6.2
+github.com/pion/rtp
+github.com/pion/rtp/codecs
+# github.com/pion/sctp v1.7.11
+github.com/pion/sctp
+# github.com/pion/sdp/v3 v3.0.4
+github.com/pion/sdp/v3
+# github.com/pion/srtp/v2 v2.0.2
+github.com/pion/srtp/v2
+# github.com/pion/stun v0.3.5
+github.com/pion/stun
+github.com/pion/stun/internal/hmac
+# github.com/pion/transport v0.12.3
+github.com/pion/transport/connctx
+github.com/pion/transport/deadline
+github.com/pion/transport/packetio
+github.com/pion/transport/replaydetector
+github.com/pion/transport/vnet
+# github.com/pion/turn/v2 v2.0.5
+github.com/pion/turn/v2
+github.com/pion/turn/v2/internal/allocation
+github.com/pion/turn/v2/internal/client
+github.com/pion/turn/v2/internal/ipnet
+github.com/pion/turn/v2/internal/proto
+github.com/pion/turn/v2/internal/server
+# github.com/pion/udp v0.1.0
+github.com/pion/udp
+# github.com/pion/webrtc/v3 v3.0.15
+## explicit
+github.com/pion/webrtc/v3
+github.com/pion/webrtc/v3/internal/mux
+github.com/pion/webrtc/v3/internal/util
+github.com/pion/webrtc/v3/pkg/media
+github.com/pion/webrtc/v3/pkg/rtcerr
+# github.com/pkg/errors v0.9.1
+github.com/pkg/errors
# github.com/rakyll/statik v0.1.7
## explicit
github.com/rakyll/statik/fs
# github.com/sevlyar/go-daemon v0.1.5
## explicit
github.com/sevlyar/go-daemon
-# github.com/stretchr/testify v1.3.0
-## explicit
-# golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59
-## explicit
+# github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d
+github.com/smartystreets/assertions
+github.com/smartystreets/assertions/internal/go-render/render
+github.com/smartystreets/assertions/internal/oglematchers
+# github.com/smartystreets/goconvey v1.6.4
+## explicit
+github.com/smartystreets/goconvey/convey
+github.com/smartystreets/goconvey/convey/gotest
+github.com/smartystreets/goconvey/convey/reporting
+# github.com/templexxx/cpu v0.0.7
+github.com/templexxx/cpu
+# github.com/templexxx/xorsimd v0.4.1
+github.com/templexxx/xorsimd
+# github.com/tjfoc/gmsm v1.3.2
+github.com/tjfoc/gmsm/sm4
+# github.com/xtaci/kcp-go/v5 v5.6.1
+## explicit
+github.com/xtaci/kcp-go/v5
+# github.com/xtaci/smux v1.5.15
+## explicit
+github.com/xtaci/smux
+# golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
+golang.org/x/crypto/blowfish
+golang.org/x/crypto/cast5
+golang.org/x/crypto/cryptobyte
+golang.org/x/crypto/cryptobyte/asn1
golang.org/x/crypto/curve25519
+golang.org/x/crypto/curve25519/internal/field
+golang.org/x/crypto/ed25519
+golang.org/x/crypto/ed25519/internal/edwards25519
golang.org/x/crypto/hkdf
golang.org/x/crypto/internal/subtle
golang.org/x/crypto/nacl/secretbox
+golang.org/x/crypto/pbkdf2
golang.org/x/crypto/poly1305
+golang.org/x/crypto/salsa20
golang.org/x/crypto/salsa20/salsa
-# golang.org/x/net v0.0.0-20200226121028-0de0cce0169b
-## explicit
+golang.org/x/crypto/sha3
+golang.org/x/crypto/tea
+golang.org/x/crypto/twofish
+golang.org/x/crypto/xtea
+# golang.org/x/mod v0.3.0
+golang.org/x/mod/semver
+# golang.org/x/net v0.0.0-20210525063256-abc453219eb5
+golang.org/x/net/bpf
+golang.org/x/net/dns/dnsmessage
+golang.org/x/net/internal/iana
+golang.org/x/net/internal/socket
golang.org/x/net/internal/socks
+golang.org/x/net/ipv4
+golang.org/x/net/ipv6
golang.org/x/net/proxy
-# golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4
+# golang.org/x/sys v0.0.0-20210423082822-04245dca01da
## explicit
golang.org/x/sys/cpu
+golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/unix
golang.org/x/sys/windows
golang.org/x/sys/windows/registry
@@ -66,3 +218,18 @@ golang.org/x/sys/windows/svc
golang.org/x/sys/windows/svc/debug
golang.org/x/sys/windows/svc/eventlog
golang.org/x/sys/windows/svc/mgr
+# golang.org/x/tools v0.0.0-20200808161706-5bf02b21f123
+golang.org/x/tools/go/gcexportdata
+golang.org/x/tools/go/internal/gcimporter
+golang.org/x/tools/go/internal/packagesdriver
+golang.org/x/tools/go/packages
+golang.org/x/tools/internal/event
+golang.org/x/tools/internal/event/core
+golang.org/x/tools/internal/event/keys
+golang.org/x/tools/internal/event/label
+golang.org/x/tools/internal/gocommand
+golang.org/x/tools/internal/packagesinternal
+golang.org/x/tools/internal/typesinternal
+# golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
+golang.org/x/xerrors
+golang.org/x/xerrors/internal